[hackers] [sbase] ed: Write "?\n" and explanatory messages to stdout || Michael Forney

From: <git_AT_suckless.org>
Date: Sat, 24 Feb 2018 09:15:19 +0100 (CET)

commit 1ff2a54e8fbabfa3d6a7f49f06e63f039292efba
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sat Feb 24 00:08:28 2018 -0800
Commit: Michael Forney <mforney_AT_mforney.org>
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
_AT_@ -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();
 
_AT_@ -703,7 +703,7 @@ static void
 dohelp(void)
 {
         if (lasterr)
- fprintf(stderr, "%s\n", lasterr);
+ puts(lasterr);
 }
 
 static void
Received on Sat Feb 24 2018 - 09:15:19 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 24 2018 - 09:24:26 CET