Makefile is regenerated when Makefile.in changes (ditto);
`realclean' is now known as `distclean';
portability fixes for older Unix make utilities
+ * citadel.c, citadel.h, commands.c: make client suspendable
Fri Oct 23 19:34:38 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* setup.c: default node name is now obtained from uname()
+/*
+ * catch SIGCONT to reset terminal modes when were are put back into the
+ * foreground.
+ */
+void catch_sigcont(int signum) {
+ sttybbs(SB_LAST);
+ }
+
+
+
/* general purpose routines */
void formout(char *name) /* display a file */
signal(SIGQUIT,SIG_IGN);
signal(SIGHUP,dropcarr); /* Cleanup gracefully if carrier is dropped */
signal(SIGTERM,dropcarr); /* Cleanup gracefully if terminated */
+signal(SIGCONT,catch_sigcont); /* Catch SIGCONT so we can reset terminal */
send_ansi_detect();
printf("Attaching to server...\r");
#define SB_YES_INTR 1 /* set to bbs mode, i/q enabled */
#define SB_SAVE 2 /* save settings */
#define SB_RESTORE 3 /* restore settings */
+#define SB_LAST 4 /* redo the last command sent */
#define NEXT_KEY 15
#define STOP_KEY 3
{
struct termios live;
static struct termios saved_settings;
+ static int last_cmd = 0;
+
+ if (cmd == SB_LAST)
+ cmd = last_cmd;
+ else
+ last_cmd = cmd;
if ( (cmd == 0) || (cmd == 1) ) {
tcgetattr(0,&live);
live.c_iflag=ISTRIP|IXON|IXANY;
live.c_oflag=OPOST|ONLCR;
- live.c_lflag=NOFLSH;
- if (cmd==1) live.c_lflag=ISIG|NOFLSH;
+ live.c_lflag=ISIG|NOFLSH;
if (cmd==SB_YES_INTR) {
live.c_cc[VINTR]=NEXT_KEY;