[hackers] [sbase] cmp: Make output of error message POSIX compliant || Richard Ipsum

From: <git_AT_suckless.org>
Date: Thu, 13 Apr 2023 06:41:38 +0200 (CEST)

commit 53040766d1a09baa7412c73c9a93afac2bfd6acc
Author: Richard Ipsum <richardipsum_AT_fastmail.co.uk>
AuthorDate: Mon May 20 09:36:32 2019 +0100
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Wed Apr 12 21:37:04 2023 -0700

    cmp: Make output of error message POSIX compliant
    
    From POSIX:
    
    in the POSIX locale the following diagnostic message shall be written:
    
        "cmp: EOF on %s%s\n", <name of shorter file>, <additional info>
    
    Amended by mcf: kept weprintf for consistency with other diagnostic
    messages, but dropped the doubled prefix.

diff --git a/cmp.c b/cmp.c
index ea8902f..83ab149 100644
--- a/cmp.c
+++ b/cmp.c
_AT_@ -57,7 +57,7 @@ main(int argc, char *argv[])
                         continue;
                 } else if (b[0] == EOF || b[1] == EOF) {
                         if (!sflag)
- weprintf("cmp: EOF on %s\n", argv[(b[0] != EOF)]);
+ weprintf("EOF on %s\n", argv[(b[0] != EOF)]);
                         same = 0;
                         break;
                 } else if (!lflag) {
Received on Thu Apr 13 2023 - 06:41:38 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 13 2023 - 06:48:37 CEST