ed: Write "?\n" and explanatory messages to stdout

This is the behavior specified by POSIX.
This commit is contained in:
Michael Forney 2018-02-24 00:08:28 -08:00
parent 44ccadcde3
commit 1ff2a54e8f

6
ed.c
View File

@ -85,10 +85,10 @@ error(char *msg)
{ {
exstatus = 1; exstatus = 1;
lasterr = msg; lasterr = msg;
fputs("?\n", stderr); puts("?");
if (optverbose) if (optverbose)
fprintf(stderr, "%s\n", msg); puts(msg);
if (!newcmd) if (!newcmd)
undo(); undo();
@ -703,7 +703,7 @@ static void
dohelp(void) dohelp(void)
{ {
if (lasterr) if (lasterr)
fprintf(stderr, "%s\n", lasterr); puts(lasterr);
} }
static void static void