summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>1998-07-12 05:27:05 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>1998-07-12 05:27:05 +0000
commit6ac7feb3a6bb26ff1a35aa1336c9716685273c8b (patch)
treeac72b9ff5d8932bf8838d5b022f9f2873d3a3d2e /usr.bin
parent4029162019e26bbcf2ae98d8a9cf9db4101d3a10 (diff)
add no escape option (-n)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tip/tip.c14
-rw-r--r--usr.bin/tip/tip.h4
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 */