1 /* Simple utility to compare 2 files.
2 * Diff or cmp are not sufficient, when
5 * Copyright (c) 1998-2000 by Stefan Reinauer
11 int main (int argc
, char *argv
[])
16 if(argv
[1]==NULL
||argv
[2]==NULL
) {
17 printf ("Usage: %s file1 file2\n %s compares two files.\n",argv
[0],argv
[0]);
20 eins
=fopen(argv
[1],"r");
21 zwei
=fopen(argv
[2],"r");
24 printf ("File %s not found or unreadable.\n",argv
[1]);
28 printf ("File %s not found or unreadable.\n",argv
[2]);
36 if (flag
==0 && (a
==-1||b
==-1) && (a
!=-1||b
!=-1)) {
37 printf ("One file ended. Printing the rest of the other.\n");
40 if(a
!=b
) printf ("0x%06x: 0x%02x -> 0x%02x\n",i
,a
,b
);