diff options
-rw-r--r-- | usr.bin/telnet/externs.h | 60 | ||||
-rw-r--r-- | usr.bin/telnet/sys_bsd.c | 56 | ||||
-rw-r--r-- | usr.bin/telnet/terminal.c | 30 |
3 files changed, 12 insertions, 134 deletions
diff --git a/usr.bin/telnet/externs.h b/usr.bin/telnet/externs.h index ca7fe77aa53..d5c9858b02d 100644 --- a/usr.bin/telnet/externs.h +++ b/usr.bin/telnet/externs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: externs.h,v 1.30 2015/11/24 05:06:24 beck Exp $ */ +/* $OpenBSD: externs.h,v 1.31 2017/07/07 09:14:26 fcambus Exp $ */ /* $KTH: externs.h,v 1.16 1997/11/29 02:28:35 joda Exp $ */ /* @@ -277,55 +277,15 @@ extern struct termios new_tc; # define termKillChar new_tc.c_cc[VKILL] # define termQuitChar new_tc.c_cc[VQUIT] # define termSuspChar new_tc.c_cc[VSUSP] - -# if defined(VFLUSHO) && !defined(VDISCARD) -# define VDISCARD VFLUSHO -# endif -# ifndef VDISCARD -extern cc_t termFlushChar; -# else -# define termFlushChar new_tc.c_cc[VDISCARD] -# endif -# ifndef VWERASE -extern cc_t termWerasChar; -# else -# define termWerasChar new_tc.c_cc[VWERASE] -# endif -# ifndef VREPRINT -extern cc_t termRprntChar; -# else -# define termRprntChar new_tc.c_cc[VREPRINT] -# endif -# ifndef VLNEXT -extern cc_t termLiteralNextChar; -# else -# define termLiteralNextChar new_tc.c_cc[VLNEXT] -# endif -# ifndef VSTART -extern cc_t termStartChar; -# else -# define termStartChar new_tc.c_cc[VSTART] -# endif -# ifndef VSTOP -extern cc_t termStopChar; -# else -# define termStopChar new_tc.c_cc[VSTOP] -# endif -# ifndef VEOL -extern cc_t termForw1Char; -# else -# define termForw1Char new_tc.c_cc[VEOL] -# endif -# ifndef VEOL2 -extern cc_t termForw2Char; -# else -# define termForw2Char new_tc.c_cc[VEOL] -# endif -# ifndef VSTATUS -extern cc_t termAytChar; -#else -# define termAytChar new_tc.c_cc[VSTATUS] -#endif +# define termFlushChar new_tc.c_cc[VDISCARD] +# define termWerasChar new_tc.c_cc[VWERASE] +# define termRprntChar new_tc.c_cc[VREPRINT] +# define termLiteralNextChar new_tc.c_cc[VLNEXT] +# define termStartChar new_tc.c_cc[VSTART] +# define termStopChar new_tc.c_cc[VSTOP] +# define termForw1Char new_tc.c_cc[VEOL] +# define termForw2Char new_tc.c_cc[VEOL] +# define termAytChar new_tc.c_cc[VSTATUS] /* Ring buffer structures which are shared */ diff --git a/usr.bin/telnet/sys_bsd.c b/usr.bin/telnet/sys_bsd.c index 01ff9173900..9e8bb2ea1b3 100644 --- a/usr.bin/telnet/sys_bsd.c +++ b/usr.bin/telnet/sys_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_bsd.c,v 1.32 2016/03/16 15:41:11 krw Exp $ */ +/* $OpenBSD: sys_bsd.c,v 1.33 2017/07/07 09:14:26 fcambus Exp $ */ /* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */ /* @@ -123,28 +123,6 @@ TerminalSaveState(void) tcgetattr(0, &old_tc); new_tc = old_tc; - -#ifndef VDISCARD - termFlushChar = CONTROL('O'); -#endif -#ifndef VWERASE - termWerasChar = CONTROL('W'); -#endif -#ifndef VREPRINT - termRprntChar = CONTROL('R'); -#endif -#ifndef VLNEXT - termLiteralNextChar = CONTROL('V'); -#endif -#ifndef VSTART - termStartChar = CONTROL('Q'); -#endif -#ifndef VSTOP - termStopChar = CONTROL('S'); -#endif -#ifndef VSTATUS - termAytChar = CONTROL('T'); -#endif } cc_t * @@ -161,22 +139,11 @@ tcval(int func) case SLC_FORW1: return(&termForw1Char); case SLC_FORW2: return(&termForw2Char); case SLC_SUSP: return(&termSuspChar); -# ifdef VDISCARD case SLC_AO: return(&termFlushChar); -# endif -# ifdef VWERASE case SLC_EW: return(&termWerasChar); -# endif -# ifdef VREPRINT case SLC_RP: return(&termRprntChar); -# endif -# ifdef VLNEXT case SLC_LNEXT: return(&termLiteralNextChar); -# endif -# ifdef VSTATUS case SLC_AYT: return(&termAytChar); -# endif - case SLC_SYNCH: case SLC_BRK: case SLC_EOR: @@ -189,27 +156,6 @@ void TerminalDefaultChars(void) { memcpy(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc)); -# ifndef VDISCARD - termFlushChar = CONTROL('O'); -# endif -# ifndef VWERASE - termWerasChar = CONTROL('W'); -# endif -# ifndef VREPRINT - termRprntChar = CONTROL('R'); -# endif -# ifndef VLNEXT - termLiteralNextChar = CONTROL('V'); -# endif -# ifndef VSTART - termStartChar = CONTROL('Q'); -# endif -# ifndef VSTOP - termStopChar = CONTROL('S'); -# endif -# ifndef VSTATUS - termAytChar = CONTROL('T'); -# endif } /* diff --git a/usr.bin/telnet/terminal.c b/usr.bin/telnet/terminal.c index 5f6ca213226..7e8110d8906 100644 --- a/usr.bin/telnet/terminal.c +++ b/usr.bin/telnet/terminal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: terminal.c,v 1.13 2014/07/22 07:30:24 jsg Exp $ */ +/* $OpenBSD: terminal.c,v 1.14 2017/07/07 09:14:26 fcambus Exp $ */ /* $NetBSD: terminal.c,v 1.5 1996/02/28 21:04:17 thorpej Exp $ */ /* @@ -41,34 +41,6 @@ unsigned char ttyobuf[2*BUFSIZ], ttyibuf[BUFSIZ]; int termdata; /* Debugging flag */ -# ifndef VDISCARD -cc_t termFlushChar; -# endif -# ifndef VLNEXT -cc_t termLiteralNextChar; -# endif -# ifndef VWERASE -cc_t termWerasChar; -# endif -# ifndef VREPRINT -cc_t termRprntChar; -# endif -# ifndef VSTART -cc_t termStartChar; -# endif -# ifndef VSTOP -cc_t termStopChar; -# endif -# ifndef VEOL -cc_t termForw1Char; -# endif -# ifndef VEOL2 -cc_t termForw2Char; -# endif -# ifndef VSTATUS -cc_t termAytChar; -# endif - /* * initialize the terminal data structures. */ |