From ab7e7a033c349ecd5a931f3e82871405b9cd9f75 Mon Sep 17 00:00:00 2001 From: helbig Date: Wed, 31 Dec 1997 12:25:35 +0000 Subject: Ensure stdout is line buffered. Change "pat" -> "re" in man page. --- bin/ed/buf.c | 6 +++++- bin/ed/ed.1 | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/ed') 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 -- cgit v1.1