Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/cmp/misc.c
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
eofmsg(const char *file) | eofmsg(const char *file) | ||||
{ | { | ||||
if (!sflag) | if (!sflag) | ||||
warnx("EOF on %s", file); | warnx("EOF on %s", file); | ||||
exit(DIFF_EXIT); | exit(DIFF_EXIT); | ||||
} | } | ||||
void | void | ||||
diffmsg(const char *file1, const char *file2, off_t byte, off_t line) | diffmsg(const char *file1, const char *file2, off_t byte, off_t line, | ||||
int b1, int b2) | |||||
{ | { | ||||
if (!sflag) | if (sflag) | ||||
goto out; | |||||
if (bflag) { | |||||
(void)printf("%s %s differ: char %lld, line %lld is %3o %c %3o %c\n", | |||||
markj: I'm not sure how important it is to be fully compatible, but gcmp prints "byte" instead of… | |||||
Done Inline ActionsI think here it's better to just maintain internal consistency... I don't /think/ anyone's trying to parse the output. kevans: I think here it's better to just maintain internal consistency... I don't /think/ anyone's… | |||||
file1, file2, (long long)byte, (long long)line, b1, b1, | |||||
b2, b2); | |||||
} else { | |||||
(void)printf("%s %s differ: char %lld, line %lld\n", | (void)printf("%s %s differ: char %lld, line %lld\n", | ||||
file1, file2, (long long)byte, (long long)line); | file1, file2, (long long)byte, (long long)line); | ||||
} | |||||
out: | |||||
exit(DIFF_EXIT); | exit(DIFF_EXIT); | ||||
} | } |
I'm not sure how important it is to be fully compatible, but gcmp prints "byte" instead of "char".