version 1.19, 2003/07/04 02:54:36 |
version 1.20, 2003/07/04 17:37:07 |
|
|
int aflag; /* treat all files as text */ |
int aflag; /* treat all files as text */ |
int tflag; /* expand tabs on output */ |
int tflag; /* expand tabs on output */ |
/* Algorithm related options. */ |
/* Algorithm related options. */ |
int hflag; /* -h, use halfhearted DIFFH */ |
|
int bflag; /* ignore blanks in comparisons */ |
int bflag; /* ignore blanks in comparisons */ |
int wflag; /* totally ignore blanks in comparisons */ |
int wflag; /* totally ignore blanks in comparisons */ |
int iflag; /* ignore case in comparisons */ |
int iflag; /* ignore case in comparisons */ |
|
|
status = 2; |
status = 2; |
diffargv = argv; |
diffargv = argv; |
|
|
while ((ch = getopt(argc, argv, "abC:cD:efhilnrS:stU:uw")) != -1) { |
while ((ch = getopt(argc, argv, "abC:cD:efilnrS:stU:uw")) != -1) { |
switch (ch) { |
switch (ch) { |
case 'a': |
case 'a': |
aflag++; |
aflag++; |
|
|
case 'f': |
case 'f': |
opt = D_REVERSE; |
opt = D_REVERSE; |
break; |
break; |
case 'h': |
|
hflag++; |
|
break; |
|
case 'i': |
case 'i': |
iflag++; |
iflag++; |
break; |
break; |
|
|
errorx("two filename arguments required"); |
errorx("two filename arguments required"); |
file1 = argv[0]; |
file1 = argv[0]; |
file2 = argv[1]; |
file2 = argv[1]; |
if (hflag && opt) |
|
errorx("-h doesn't support -D, -c, -C, -e, -f, -I, -n, -u or -U"); |
|
if (!strcmp(file1, "-")) |
if (!strcmp(file1, "-")) |
stb1.st_mode = S_IFREG; |
stb1.st_mode = S_IFREG; |
else if (stat(file1, &stb1) < 0) |
else if (stat(file1, &stb1) < 0) |