version 1.24, 2003/07/06 22:02:36 |
version 1.25, 2003/07/06 22:17:21 |
|
|
struct stat stb1, stb2; |
struct stat stb1, stb2; |
struct excludes *excludes_list; |
struct excludes *excludes_list; |
|
|
#define OPTIONS "abC:cD:efhinNPrS:stU:uwX:x:" |
#define OPTIONS "abC:cD:efhinNPqrS:stU:uwX:x:" |
static struct option longopts[] = { |
static struct option longopts[] = { |
{ "text", no_argument, 0, 'a' }, |
{ "text", no_argument, 0, 'a' }, |
{ "ignore-space-change", no_argument, 0, 'b' }, |
{ "ignore-space-change", no_argument, 0, 'b' }, |
|
|
{ "new-file", no_argument, 0, 'N' }, |
{ "new-file", no_argument, 0, 'N' }, |
{ "rcs", no_argument, 0, 'n' }, |
{ "rcs", no_argument, 0, 'n' }, |
{ "unidirectional-new-file", no_argument, 0, 'P' }, |
{ "unidirectional-new-file", no_argument, 0, 'P' }, |
|
{ "brief", no_argument, 0, 'q' }, |
{ "recursive", no_argument, 0, 'r' }, |
{ "recursive", no_argument, 0, 'r' }, |
{ "report-identical-files", no_argument, 0, 's' }, |
{ "report-identical-files", no_argument, 0, 's' }, |
{ "starting-file", required_argument, 0, 'S' }, |
{ "starting-file", required_argument, 0, 'S' }, |
|
|
case 'r': |
case 'r': |
rflag = 1; |
rflag = 1; |
break; |
break; |
|
case 'q': |
|
format = D_BRIEF; |
|
break; |
case 'S': |
case 'S': |
start = optarg; |
start = optarg; |
break; |
break; |
|
|
usage(void) |
usage(void) |
{ |
{ |
(void)fprintf(stderr, |
(void)fprintf(stderr, |
"usage: diff [-bitw] [-c | -e | -f | -n | -u ] file1 file2\n" |
"usage: diff [-biqtw] [-c | -e | -f | -n | -u ] file1 file2\n" |
" diff [-bitw] -C number file1 file2\n" |
" diff [-biqtw] -C number file1 file2\n" |
" diff [-bitw] -D string file1 file2\n" |
" diff [-biqtw] -D string file1 file2\n" |
" diff [-bitw] -U number file1 file2\n" |
" diff [-biqtw] -U number file1 file2\n" |
" diff [-biNPwt] [-c | -e | -f | -n | -u ] [-r] [-s] [-S name]" |
" diff [-biNPqwt] [-c | -e | -f | -n | -u ] [-r] [-s] [-S name]" |
" [-X file]\n [-x pattern] dir1 dir2\n"); |
" [-X file]\n [-x pattern] dir1 dir2\n"); |
|
|
exit(2); |
exit(2); |