diff options
author | 1998-07-12 05:27:03 +0000 | |
---|---|---|
committer | 1998-07-12 05:27:03 +0000 | |
commit | 691348626c47c1072e44f18bb781f5921c306ac9 (patch) | |
tree | c4a3ee111701b43ae43d4de7c86506664df8bf5b | |
parent | allow to build correctly with ro /usr/src (diff) | |
download | wireguard-openbsd-691348626c47c1072e44f18bb781f5921c306ac9.tar.xz wireguard-openbsd-691348626c47c1072e44f18bb781f5921c306ac9.zip |
add no escape option (-n)
-rw-r--r-- | usr.bin/tip/tip.c | 14 | ||||
-rw-r--r-- | usr.bin/tip/tip.h | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c index 16cbef73ad2..8da489aaed3 100644 --- a/usr.bin/tip/tip.c +++ b/usr.bin/tip/tip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.c,v 1.8 1997/09/01 23:24:26 deraadt Exp $ */ +/* $OpenBSD: tip.c,v 1.9 1998/07/12 05:27:04 todd Exp $ */ /* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: tip.c,v 1.8 1997/09/01 23:24:26 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tip.c,v 1.9 1998/07/12 05:27:04 todd Exp $"; #endif /* not lint */ /* @@ -109,6 +109,10 @@ main(argc, argv) vflag++; break; + case 'n': + noesc++; + break; + case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': BR = atoi(&argv[1][1]); @@ -371,8 +375,10 @@ tipin() while (1) { gch = getchar()&STRIP_PAR; if ((gch == character(value(ESCAPE))) && bol) { - if (!(gch = escape())) - continue; + if (!noesc) { + if (!(gch = escape())) + continue; + } } else if (!cumode && gch == character(value(RAISECHAR))) { setboolean(value(RAISE), !boolean(value(RAISE))); continue; diff --git a/usr.bin/tip/tip.h b/usr.bin/tip/tip.h index 7b2e63fad63..17d3aa0a576 100644 --- a/usr.bin/tip/tip.h +++ b/usr.bin/tip/tip.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.h,v 1.8 1997/09/01 23:24:26 deraadt Exp $ */ +/* $OpenBSD: tip.h,v 1.9 1998/07/12 05:27:03 todd Exp $ */ /* $NetBSD: tip.h,v 1.7 1997/04/20 00:02:46 mellon Exp $ */ /* @@ -181,6 +181,7 @@ typedef #define PRIV 02 /* priviledged, root execute only */ extern int vflag; /* verbose during reading of .tiprc file */ +extern int noesc; /* no escape `~' char */ extern value_t vtable[]; /* variable table */ #ifndef ACULOG @@ -244,6 +245,7 @@ int repdes[2]; /* read process sychronization channel */ int FD; /* open file descriptor to remote host */ int AC; /* open file descriptor to dialer (v831 only) */ int vflag; /* print .tiprc initialization sequence */ +int noesc; /* no `~' escape char */ int sfd; /* for ~< operation */ int pid; /* pid of tipout */ uid_t uid, euid; /* real and effective user id's */ |