1
0
mirror of git://git.suckless.org/sbase synced 2024-12-21 22:50:16 +00:00

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.
This commit is contained in:
Richard Ipsum 2019-05-20 09:36:32 +01:00 committed by Michael Forney
parent 446903d688
commit 53040766d1

2
cmp.c
View File

@ -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) {