Commit e72a4c12 authored by rswindell's avatar rswindell
Browse files

Use Alt-B (instead of Alt-S) for scrollback.

Added Alt-X (edit) menu option/key command.
Fixed Zmodem upload/download menu commands.
parent 5d334d77
#ifndef _BBSLIST_H_ #ifndef _BBSLIST_H_
#define _BBSLIST_H_ #define _BBSLIST_H_
#include "gen_defs.h"
#include <time.h> #include <time.h>
#define LIST_NAME_MAX 30 #define LIST_NAME_MAX 30
......
...@@ -104,11 +104,12 @@ void viewscroll(void) ...@@ -104,11 +104,12 @@ void viewscroll(void)
int syncmenu(struct bbslist *bbs) int syncmenu(struct bbslist *bbs)
{ {
char *opts[]={ char *opts[]={
"Scrollback (Alt-S)" "Scrollback (Alt-B)"
,"Disconnect (Ctrl-Q)" ,"Disconnect (Ctrl-Q)"
,"Send Login (Alt-L)" ,"Send Login (Alt-L)"
,"Zmodem Upload (Alt-U)" ,"Zmodem Upload (Alt-U)"
,"Zmodem Download (Alt-D)" ,"Zmodem Download (Alt-D)"
,"Exit (Alt-X)"
,""}; ,""};
int opt=0; int opt=0;
int i; int i;
...@@ -148,6 +149,12 @@ int syncmenu(struct bbslist *bbs) ...@@ -148,6 +149,12 @@ int syncmenu(struct bbslist *bbs)
SLEEP(10); SLEEP(10);
conn_send(bbs->password,strlen(bbs->password),0); conn_send(bbs->password,strlen(bbs->password),0);
conn_send("\r",1,0); conn_send("\r",1,0);
break;
default:
uifcbail();
puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
free(buf);
return(ret);
} }
} }
......
...@@ -65,6 +65,7 @@ int main(int argc, char **argv) ...@@ -65,6 +65,7 @@ int main(int argc, char **argv)
char listpath[MAX_PATH+1]; char listpath[MAX_PATH+1];
char *home=NULL; char *home=NULL;
char *inpath=NULL; char *inpath=NULL;
BOOL exit_now=FALSE;
/* UIFC initialization */ /* UIFC initialization */
memset(&uifc,0,sizeof(uifc)); memset(&uifc,0,sizeof(uifc));
...@@ -280,11 +281,11 @@ int main(int argc, char **argv) ...@@ -280,11 +281,11 @@ int main(int argc, char **argv)
term.nostatus=bbs->nostatus; term.nostatus=bbs->nostatus;
if(drawwin()) if(drawwin())
return(1); return(1);
doterm(bbs); exit_now=doterm(bbs);
textmode(txtinfo.currmode); textmode(txtinfo.currmode);
settitle("SyncTERM"); settitle("SyncTERM");
} }
if(url[0]) { if(exit_now || url[0]) {
if(bbs->id==-1) { if(bbs->id==-1) {
char *YesNo[3]={"Yes","No",""}; char *YesNo[3]={"Yes","No",""};
/* Started from the command-line with a URL */ /* Started from the command-line with a URL */
......
...@@ -581,7 +581,7 @@ void zmodem_download(void) ...@@ -581,7 +581,7 @@ void zmodem_download(void)
} }
/* End of Zmodem Stuff */ /* End of Zmodem Stuff */
void doterm(struct bbslist *bbs) BOOL doterm(struct bbslist *bbs)
{ {
unsigned char ch[2]; unsigned char ch[2];
unsigned char buf[BUFSIZE]; unsigned char buf[BUFSIZE];
...@@ -621,7 +621,7 @@ void doterm(struct bbslist *bbs) ...@@ -621,7 +621,7 @@ void doterm(struct bbslist *bbs)
cterm_end(); cterm_end();
conn_close(); conn_close();
uifcmsg("Disconnected","`Disconnected`\n\nRemote host dropped connection"); uifcmsg("Disconnected","`Disconnected`\n\nRemote host dropped connection");
return; return(FALSE);
case 0: case 0:
break; break;
default: default:
...@@ -770,7 +770,7 @@ void doterm(struct bbslist *bbs) ...@@ -770,7 +770,7 @@ void doterm(struct bbslist *bbs)
case 0x2000: /* ALT-D - Download */ case 0x2000: /* ALT-D - Download */
zmodem_download(); zmodem_download();
break; break;
case 0x1f00: /* ALT-S */ case 0x3000: /* ALT-B - Scrollback */
viewscroll(); viewscroll();
break; break;
case 0x2600: /* ALT-L */ case 0x2600: /* ALT-L */
...@@ -788,7 +788,8 @@ void doterm(struct bbslist *bbs) ...@@ -788,7 +788,8 @@ void doterm(struct bbslist *bbs)
break; break;
} }
/* FALLTHROUGH for curses/ansi modes */ /* FALLTHROUGH for curses/ansi modes */
case 0x2300: /* ALT-H */ case 0x2d00: /* Alt-X - Exit */
case 0x2300: /* Alt-H - Hangup */
{ {
char *opts[3]={ char *opts[3]={
"Yes" "Yes"
...@@ -809,7 +810,7 @@ void doterm(struct bbslist *bbs) ...@@ -809,7 +810,7 @@ void doterm(struct bbslist *bbs)
cterm_end(); cterm_end();
free(scrollback); free(scrollback);
conn_close(); conn_close();
return; return(key==0x2d00 /* Alt-X? */);
} }
uifcbail(); uifcbail();
puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf); puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
...@@ -836,7 +837,18 @@ void doterm(struct bbslist *bbs) ...@@ -836,7 +837,18 @@ void doterm(struct bbslist *bbs)
cterm_end(); cterm_end();
free(scrollback); free(scrollback);
conn_close(); conn_close();
return; return(FALSE);
case 3:
zmodem_upload();
break;
case 4:
zmodem_download();
break;
case 5:
cterm_end();
free(scrollback);
conn_close();
return(TRUE);
} }
gotoxy(i,j); gotoxy(i,j);
break; break;
...@@ -852,4 +864,6 @@ void doterm(struct bbslist *bbs) ...@@ -852,4 +864,6 @@ void doterm(struct bbslist *bbs)
} }
SLEEP(1); SLEEP(1);
} }
return(FALSE);
} }
...@@ -14,7 +14,7 @@ struct terminal { ...@@ -14,7 +14,7 @@ struct terminal {
extern struct terminal term; extern struct terminal term;
extern int backlines; extern int backlines;
void doterm(struct bbslist *); BOOL doterm(struct bbslist *);
void mousedrag(unsigned char *scrollback); void mousedrag(unsigned char *scrollback);
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment