Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/cmp/special.c
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | if (ch1 == EOF || ch2 == EOF) | ||||
break; | break; | ||||
if (ch1 != ch2) { | if (ch1 != ch2) { | ||||
if (xflag) { | if (xflag) { | ||||
dfound = 1; | dfound = 1; | ||||
(void)printf("%08llx %02x %02x\n", | (void)printf("%08llx %02x %02x\n", | ||||
(long long)byte - 1, ch1, ch2); | (long long)byte - 1, ch1, ch2); | ||||
} else if (lflag) { | } else if (lflag) { | ||||
dfound = 1; | dfound = 1; | ||||
if (bflag) | |||||
(void)printf("%6lld %3o %c %3o %c\n", | |||||
(long long)byte, ch1, ch1, ch2, | |||||
ch2); | |||||
else | |||||
(void)printf("%6lld %3o %3o\n", | (void)printf("%6lld %3o %3o\n", | ||||
(long long)byte, ch1, ch2); | (long long)byte, ch1, ch2); | ||||
} else { | } else { | ||||
diffmsg(file1, file2, byte, line); | diffmsg(file1, file2, byte, line, ch1, ch2); | ||||
/* NOTREACHED */ | /* NOTREACHED */ | ||||
} | } | ||||
} | } | ||||
if (ch1 == '\n') | if (ch1 == '\n') | ||||
++line; | ++line; | ||||
} | } | ||||
eof: if (ferror(fp1)) | eof: if (ferror(fp1)) | ||||
Show All 14 Lines |