summaryrefslogtreecommitdiffstats
path: root/bin/ed
diff options
context:
space:
mode:
authorhelbig <helbig@FreeBSD.org>1997-12-31 12:25:35 +0000
committerhelbig <helbig@FreeBSD.org>1997-12-31 12:25:35 +0000
commitab7e7a033c349ecd5a931f3e82871405b9cd9f75 (patch)
treefd9ec714bec4a0cf4aba1409f5ff1b3a1801b2bf /bin/ed
parent6f7edd1397ed7cb0493b61cdd226b2ee871d8ce7 (diff)
downloadFreeBSD-src-ab7e7a033c349ecd5a931f3e82871405b9cd9f75.zip
FreeBSD-src-ab7e7a033c349ecd5a931f3e82871405b9cd9f75.tar.gz
Ensure stdout is line buffered.
Change "pat" -> "re" in man page.
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/buf.c6
-rw-r--r--bin/ed/ed.14
2 files changed, 7 insertions, 3 deletions
diff --git a/bin/ed/buf.c b/bin/ed/buf.c
index 7694d5f..511d83a 100644
--- a/bin/ed/buf.c
+++ b/bin/ed/buf.c
@@ -31,7 +31,7 @@
static char * const rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
#else
static char * const rcsid =
- "$Id: buf.c,v 1.13 1997/10/08 13:46:39 eivind Exp $";
+ "$Id: buf.c,v 1.14 1997/10/09 11:05:16 eivind Exp $";
#endif
#endif /* not lint */
@@ -268,6 +268,10 @@ init_buffers()
hello, world
EOF */
setbuffer(stdin, stdinbuf, 1);
+
+ /* Ensure stdout is line buffered. This avoids bogus delays
+ of output if stdout is piped through utilities to a terminal. */
+ setvbuf(stdout, NULL, _IOLBF, 0);
if (open_sbuf() < 0)
quit(2);
REQUE(&buffer_head, &buffer_head);
diff --git a/bin/ed/ed.1 b/bin/ed/ed.1
index 4a7fd9f..de9d263 100644
--- a/bin/ed/ed.1
+++ b/bin/ed/ed.1
@@ -1,4 +1,4 @@
-.\" $Id: ed.1,v 1.10 1997/02/22 14:03:13 peter Exp $
+.\" $Id: ed.1,v 1.11 1997/08/30 11:09:26 jmg Exp $
.TH ED 1 "21 May 1993"
.SH NAME
.\" ed, red \- text editor
@@ -820,7 +820,7 @@ are treated as a single command by undo.
is its own inverse.
.TP 8
-.RI (1,$)v /pat/command-list
+.RI (1,$)v /re/command-list
Applies
.I command-list
to each of the addressed lines not matching a regular expression
OpenPOWER on IntegriCloud