commit 1ff2a54e8fbabfa3d6a7f49f06e63f039292efba
Author:     Michael Forney <[email protected]>
AuthorDate: Sat Feb 24 00:08:28 2018 -0800
Commit:     Michael Forney <[email protected]>
CommitDate: Sat Feb 24 00:09:40 2018 -0800

    ed: Write "?\n" and explanatory messages to stdout
    
    This is the behavior specified by POSIX.

diff --git a/ed.c b/ed.c
index f45535c..2a84b60 100644
--- 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

Reply via email to