version 1.2, 1996/06/26 05:32:07 |
version 1.3, 1999/08/03 16:02:44 |
|
|
if ((fp2 = fdopen(fd2, "r")) == NULL) |
if ((fp2 = fdopen(fd2, "r")) == NULL) |
err(ERR_EXIT, "%s", file2); |
err(ERR_EXIT, "%s", file2); |
|
|
|
dfound = 0; |
while (skip1--) |
while (skip1--) |
if (getc(fp1) == EOF) |
if (getc(fp1) == EOF) |
goto eof; |
goto eof; |
|
|
if (getc(fp2) == EOF) |
if (getc(fp2) == EOF) |
goto eof; |
goto eof; |
|
|
dfound = 0; |
|
for (byte = line = 1;; ++byte) { |
for (byte = line = 1;; ++byte) { |
ch1 = getc(fp1); |
ch1 = getc(fp1); |
ch2 = getc(fp2); |
ch2 = getc(fp2); |
if (ch1 == EOF || ch2 == EOF) |
if (ch1 == EOF || ch2 == EOF) |
break; |
break; |
if (ch1 != ch2) |
if (ch1 != ch2) { |
if (lflag) { |
if (lflag) { |
dfound = 1; |
dfound = 1; |
(void)printf("%6qd %3o %3o\n", byte, ch1, ch2); |
(void)printf("%6qd %3o %3o\n", byte, ch1, ch2); |
} else |
} else |
diffmsg(file1, file2, byte, line); |
diffmsg(file1, file2, byte, line); |
/* NOTREACHED */ |
/* NOTREACHED */ |
|
} |
if (ch1 == '\n') |
if (ch1 == '\n') |
++line; |
++line; |
} |
} |