version 1.5, 2006/05/10 01:10:23 |
version 1.6, 2006/05/11 08:40:34 |
|
|
goto closem; |
goto closem; |
} |
} |
|
|
if (stat(file1, &stb1) < 0) { |
if (fstat(fileno(f1), &stb1) < 0) { |
warn("%s", file1); |
warn("%s", file1); |
goto closem; |
goto closem; |
} |
} |
|
|
if (stat(file2, &stb2) < 0) { |
if (fstat(fileno(f2), &stb2) < 0) { |
warn("%s", file2); |
warn("%s", file2); |
goto closem; |
goto closem; |
} |
} |
|
|
switch (files_differ(f1, f2)) { |
if (files_differ(f1, f2) != 1) |
case 0: |
|
goto closem; |
goto closem; |
case 1: |
|
break; |
|
default: |
|
/* error */ |
|
goto closem; |
|
} |
|
|
|
if (!asciifile(f1) || !asciifile(f2)) { |
if (!asciifile(f1) || !asciifile(f2)) { |
rval = D_ERROR; |
rval = D_ERROR; |
|
|
} |
} |
} |
} |
|
|
static __inline void |
static void |
range(int a, int b, char *separator) |
range(int a, int b, char *separator) |
{ |
{ |
diff_output("%d", a > b ? b : a); |
diff_output("%d", a > b ? b : a); |
|
|
diff_output("%s%d", separator, b); |
diff_output("%s%d", separator, b); |
} |
} |
|
|
static __inline void |
static void |
uni_range(int a, int b) |
uni_range(int a, int b) |
{ |
{ |
if (a < b) |
if (a < b) |