commit 1ff2a54e8fbabfa3d6a7f49f06e63f039292efba
parent 44ccadcde30136253b7623a8eb2f17883d725d43
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 24 Feb 2018 00:08:28 -0800
ed: Write "?\n" and explanatory messages to stdout
This is the behavior specified by POSIX.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ed.c b/ed.c
@@ -85,10 +85,10 @@ error(char *msg)
{
exstatus = 1;
lasterr = msg;
- fputs("?\n", stderr);
+ puts("?");
if (optverbose)
- fprintf(stderr, "%s\n", msg);
+ puts(msg);
if (!newcmd)
undo();
@@ -703,7 +703,7 @@ static void
dohelp(void)
{
if (lasterr)
- fprintf(stderr, "%s\n", lasterr);
+ puts(lasterr);
}
static void