summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-06 08:37:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-06 08:37:40 +0000
commite8a8fcd99459802db3f2725f5736635b1de4f255 (patch)
treeae22d0b738d9e33f93d400264c206ecfd45db8e4 /sys/kern
parent26463d1fa7ab418419f0426ac8b6eed996718e3f (diff)
0377 handling in ISTRIP/PARMRK mode
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 1838115eecb..bfd8e35bd18 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.15 1996/11/05 04:49:16 tholo Exp $ */
+/* $OpenBSD: tty.c,v 1.16 1996/11/06 08:37:39 deraadt Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -264,19 +264,23 @@ ttyinput(c, tp)
c = cc[VINTR];
else if (ISSET(iflag, PARMRK))
goto parmrk;
- } else if ((ISSET(error, TTY_PE) &&
- ISSET(iflag, INPCK)) || ISSET(error, TTY_FE)) {
+ } else if ((ISSET(error, TTY_PE) && ISSET(iflag, INPCK)) ||
+ ISSET(error, TTY_FE)) {
if (ISSET(iflag, IGNPAR))
goto endcase;
else if (ISSET(iflag, PARMRK)) {
parmrk: (void)putc(0377 | TTY_QUOTE, &tp->t_rawq);
- (void)putc(0 | TTY_QUOTE, &tp->t_rawq);
+ if (ISSET(iflag, ISTRIP) || c != 0377)
+ (void)putc(0 | TTY_QUOTE, &tp->t_rawq);
(void)putc(c | TTY_QUOTE, &tp->t_rawq);
goto endcase;
} else
c = 0;
}
}
+ if (c == 0377 && !ISSET(iflag, ISTRIP) && ISSET(iflag, PARMRK))
+ goto parmrk;
+
/*
* In tandem mode, check high water mark.
*/