-/* $OpenBSD: commands.c,v 1.63 2014/07/20 08:56:47 guenther Exp $ */
+/* $OpenBSD: commands.c,v 1.64 2014/07/20 09:31:25 guenther Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
int
telnetsuspend()
{
-#ifdef SIGTSTP
setcommandmode();
{
long oldrows, oldcols, newrows, newcols, err;
/* reget parameters in case they were changed */
TerminalSaveState();
setconnmode(0);
-#else
- printf("Suspend is not supported. Try the '!' command instead\r\n");
-#endif
return 1;
}
-/* $OpenBSD: externs.h,v 1.23 2014/07/20 08:56:47 guenther Exp $ */
+/* $OpenBSD: externs.h,v 1.24 2014/07/20 09:31:25 guenther Exp $ */
/* $KTH: externs.h,v 1.16 1997/11/29 02:28:35 joda Exp $ */
/*
# define termIntChar new_tc.c_cc[VINTR]
# define termKillChar new_tc.c_cc[VKILL]
# define termQuitChar new_tc.c_cc[VQUIT]
+# define termSuspChar new_tc.c_cc[VSUSP]
-# ifndef VSUSP
-extern cc_t termSuspChar;
-# else
-# define termSuspChar new_tc.c_cc[VSUSP]
-# endif
# if defined(VFLUSHO) && !defined(VDISCARD)
# define VDISCARD VFLUSHO
# endif
-/* $OpenBSD: sys_bsd.c,v 1.21 2014/07/20 09:20:48 guenther Exp $ */
+/* $OpenBSD: sys_bsd.c,v 1.22 2014/07/20 09:31:25 guenther Exp $ */
/* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */
/*
case SLC_XOFF: return(&termStopChar);
case SLC_FORW1: return(&termForw1Char);
case SLC_FORW2: return(&termForw2Char);
+ case SLC_SUSP: return(&termSuspChar);
# ifdef VDISCARD
case SLC_AO: return(&termFlushChar);
# endif
-# ifdef VSUSP
- case SLC_SUSP: return(&termSuspChar);
-# endif
# ifdef VWERASE
case SLC_EW: return(&termWerasChar);
# endif
* local/no signal mapping
*/
-#ifdef SIGTSTP
static void susp();
-#endif /* SIGTSTP */
#ifdef SIGINFO
static void ayt();
#endif
}
if (f != -1) {
-#ifdef SIGTSTP
(void) signal(SIGTSTP, susp);
-#endif /* SIGTSTP */
#ifdef SIGINFO
(void) signal(SIGINFO, ayt);
#endif
# endif
}
} else {
-#ifdef SIGTSTP
sigset_t mask;
-#endif /* SIGTSTP */
#ifdef SIGINFO
void ayt_status();
(void) signal(SIGINFO, (void (*)(int))ayt_status);
#endif
-#ifdef SIGTSTP
(void) signal(SIGTSTP, SIG_DFL);
sigemptyset(&mask);
sigaddset(&mask, SIGTSTP);
sigprocmask(SIG_UNBLOCK, &mask, NULL);
-#endif /* SIGTSTP */
tmp_tc = old_tc;
}
if (tcsetattr(tin, TCSADRAIN, &tmp_tc) < 0)
}
}
-#ifdef SIGTSTP
/* ARGSUSED */
void
susp(sig)
if (localchars)
sendsusp();
}
-#endif
#ifdef SIGWINCH
/* ARGSUSED */
#ifdef SIGWINCH
(void) signal(SIGWINCH, sendwin);
#endif
-#ifdef SIGTSTP
(void) signal(SIGTSTP, susp);
-#endif
#ifdef SIGINFO
(void) signal(SIGINFO, ayt);
#endif
-/* $OpenBSD: terminal.c,v 1.10 2014/07/20 08:12:46 guenther Exp $ */
+/* $OpenBSD: terminal.c,v 1.11 2014/07/20 09:31:25 guenther Exp $ */
/* $NetBSD: terminal.c,v 1.5 1996/02/28 21:04:17 thorpej Exp $ */
/*
# ifndef VLNEXT
cc_t termLiteralNextChar;
# endif
-# ifndef VSUSP
-cc_t termSuspChar;
-# endif
# ifndef VWERASE
cc_t termWerasChar;
# endif