diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-13 09:10:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-13 09:10:58 +0000 |
commit | f5fd9435d6f988a77fb85f6f6b1b85aa2d075ff5 (patch) | |
tree | acfb809bfb87f097f3857791cb2acd52b6b7689b /sys/kern | |
parent | f9f68389af0034cdf15661bc693e77fc1cb925c5 (diff) |
Count characters even when !OPOST and FLUSHO.
Don't output the \r for ONLCR if FLUSHO; mycroft
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d40ee80f0d5..9364d3a23ae 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.32 1997/11/13 03:56:55 deraadt Exp $ */ +/* $OpenBSD: tty.c,v 1.33 1997/11/13 09:10:57 deraadt Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -599,12 +599,10 @@ ttyoutput(c, tp) oflag = tp->t_oflag; if (!ISSET(oflag, OPOST)) { - if (ISSET(tp->t_lflag, FLUSHO)) - return (-1); - if (putc(c, &tp->t_outq)) - return (c); tk_nout++; tp->t_outcc++; + if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq)) + return (c); return (-1); } /* @@ -641,7 +639,7 @@ ttyoutput(c, tp) if (c == '\n' && ISSET(tp->t_oflag, ONLCR)) { tk_nout++; tp->t_outcc++; - if (putc('\r', &tp->t_outq)) + if (!ISSET(tp->t_lflag, FLUSHO) && putc('\r', &tp->t_outq)) return (c); tp->t_column = 0; } |