diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-11-06 08:37:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-11-06 08:37:40 +0000 |
commit | e8a8fcd99459802db3f2725f5736635b1de4f255 (patch) | |
tree | ae22d0b738d9e33f93d400264c206ecfd45db8e4 /sys/kern | |
parent | 26463d1fa7ab418419f0426ac8b6eed996718e3f (diff) |
0377 handling in ISTRIP/PARMRK mode
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 12 |
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. */ |