version 1.43, 2011/03/04 03:11:23 |
version 1.44, 2011/07/08 01:20:24 |
|
|
int iflag; /* -i: ignore case */ |
int iflag; /* -i: ignore case */ |
int lflag; /* -l: only show names of files with matches */ |
int lflag; /* -l: only show names of files with matches */ |
int nflag; /* -n: show line numbers in front of matching lines */ |
int nflag; /* -n: show line numbers in front of matching lines */ |
|
int oflag; /* -o: print each match */ |
int qflag; /* -q: quiet mode (don't output anything) */ |
int qflag; /* -q: quiet mode (don't output anything) */ |
int sflag; /* -s: silent mode (ignore errors) */ |
int sflag; /* -s: silent mode (ignore errors) */ |
int vflag; /* -v: only show non-matching lines */ |
int vflag; /* -v: only show non-matching lines */ |
|
|
{ |
{ |
fprintf(stderr, |
fprintf(stderr, |
#ifdef NOZ |
#ifdef NOZ |
"usage: %s [-abcEFGHhIiLlnqRsUVvwx] [-A num] [-B num] [-C[num]]\n" |
"usage: %s [-abcEFGHhIiLlnoqRsUVvwx] [-A num] [-B num] [-C[num]]\n" |
#else |
#else |
"usage: %s [-abcEFGHhIiLlnqRsUVvwxZ] [-A num] [-B num] [-C[num]]\n" |
"usage: %s [-abcEFGHhIiLlnoqRsUVvwxZ] [-A num] [-B num] [-C[num]]\n" |
#endif |
#endif |
"\t[-e pattern] [-f file] [--binary-files=value] [--context[=num]]\n" |
"\t[-e pattern] [-f file] [--binary-files=value] [--context[=num]]\n" |
"\t[--line-buffered] [pattern] [file ...]\n", __progname); |
"\t[--line-buffered] [pattern] [file ...]\n", __progname); |
|
|
} |
} |
|
|
#ifdef NOZ |
#ifdef NOZ |
static char *optstr = "0123456789A:B:CEFGHILRUVabce:f:hilnqrsuvwxy"; |
static char *optstr = "0123456789A:B:CEFGHILRUVabce:f:hilnoqrsuvwxy"; |
#else |
#else |
static char *optstr = "0123456789A:B:CEFGHILRUVZabce:f:hilnqrsuvwxy"; |
static char *optstr = "0123456789A:B:CEFGHILRUVZabce:f:hilnoqrsuvwxy"; |
#endif |
#endif |
|
|
struct option long_options[] = |
struct option long_options[] = |
|
|
break; |
break; |
case 'n': |
case 'n': |
nflag = 1; |
nflag = 1; |
|
break; |
|
case 'o': |
|
oflag = 1; |
break; |
break; |
case 'q': |
case 'q': |
qflag = 1; |
qflag = 1; |