Fixed comment.
This commit is contained in:
parent
8bd891cbec
commit
2e1148b239
@ -165,8 +165,8 @@ extern int grep_main(int argc, char **argv)
|
|||||||
if ((argc-1) - (optind+1) > 0)
|
if ((argc-1) - (optind+1) > 0)
|
||||||
print_filename++;
|
print_filename++;
|
||||||
|
|
||||||
/* If no files were specified, take input from stdin. Otherwise, we grep
|
/* If no files were specified, or '-' was specified, take input from
|
||||||
* through all the files specified. */
|
* stdin. Otherwise, we grep through all the files specified. */
|
||||||
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
|
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
|
||||||
grep_file(stdin);
|
grep_file(stdin);
|
||||||
} else {
|
} else {
|
||||||
|
4
grep.c
4
grep.c
@ -165,8 +165,8 @@ extern int grep_main(int argc, char **argv)
|
|||||||
if ((argc-1) - (optind+1) > 0)
|
if ((argc-1) - (optind+1) > 0)
|
||||||
print_filename++;
|
print_filename++;
|
||||||
|
|
||||||
/* If no files were specified, take input from stdin. Otherwise, we grep
|
/* If no files were specified, or '-' was specified, take input from
|
||||||
* through all the files specified. */
|
* stdin. Otherwise, we grep through all the files specified. */
|
||||||
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
|
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
|
||||||
grep_file(stdin);
|
grep_file(stdin);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user