Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

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_
#define _BBSLIST_H_
#include "gen_defs.h"
#include <time.h>
#define LIST_NAME_MAX 30
......
......@@ -104,11 +104,12 @@ void viewscroll(void)
int syncmenu(struct bbslist *bbs)
{
char *opts[]={
"Scrollback (Alt-S)"
"Scrollback (Alt-B)"
,"Disconnect (Ctrl-Q)"
,"Send Login (Alt-L)"
,"Zmodem Upload (Alt-U)"
,"Zmodem Download (Alt-D)"
,"Exit (Alt-X)"
,""};
int opt=0;
int i;
......@@ -148,6 +149,12 @@ int syncmenu(struct bbslist *bbs)
SLEEP(10);
conn_send(bbs->password,strlen(bbs->password),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)
char listpath[MAX_PATH+1];
char *home=NULL;
char *inpath=NULL;
BOOL exit_now=FALSE;
/* UIFC initialization */
memset(&uifc,0,sizeof(uifc));
......@@ -280,11 +281,11 @@ int main(int argc, char **argv)
term.nostatus=bbs->nostatus;
if(drawwin())
return(1);
doterm(bbs);
exit_now=doterm(bbs);
textmode(txtinfo.currmode);
settitle("SyncTERM");
}
if(url[0]) {
if(exit_now || url[0]) {
if(bbs->id==-1) {
char *YesNo[3]={"Yes","No",""};
/* Started from the command-line with a URL */
......
......@@ -581,7 +581,7 @@ void zmodem_download(void)
}
/* End of Zmodem Stuff */
void doterm(struct bbslist *bbs)
BOOL doterm(struct bbslist *bbs)
{
unsigned char ch[2];
unsigned char buf[BUFSIZE];
......@@ -621,7 +621,7 @@ void doterm(struct bbslist *bbs)
cterm_end();
conn_close();
uifcmsg("Disconnected","`Disconnected`\n\nRemote host dropped connection");
return;
return(FALSE);
case 0:
break;
default:
......@@ -770,7 +770,7 @@ void doterm(struct bbslist *bbs)
case 0x2000: /* ALT-D - Download */
zmodem_download();
break;
case 0x1f00: /* ALT-S */
case 0x3000: /* ALT-B - Scrollback */
viewscroll();
break;
case 0x2600: /* ALT-L */
......@@ -788,7 +788,8 @@ void doterm(struct bbslist *bbs)
break;
}
/* FALLTHROUGH for curses/ansi modes */
case 0x2300: /* ALT-H */
case 0x2d00: /* Alt-X - Exit */
case 0x2300: /* Alt-H - Hangup */
{
char *opts[3]={
"Yes"
......@@ -809,7 +810,7 @@ void doterm(struct bbslist *bbs)
cterm_end();
free(scrollback);
conn_close();
return;
return(key==0x2d00 /* Alt-X? */);
}
uifcbail();
puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
......@@ -836,7 +837,18 @@ void doterm(struct bbslist *bbs)
cterm_end();
free(scrollback);
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);
break;
......@@ -852,4 +864,6 @@ void doterm(struct bbslist *bbs)
}
SLEEP(1);
}
return(FALSE);
}
......@@ -14,7 +14,7 @@ struct terminal {
extern struct terminal term;
extern int backlines;
void doterm(struct bbslist *);
BOOL doterm(struct bbslist *);
void mousedrag(unsigned char *scrollback);
#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