Added support for reading from stdin with '-' as file name arg.

This commit is contained in:
Mark Whitley committed 2000-06-28 22:55:59 +00:00
1 parent 1ca41775bb
commit 8bd891cbec
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -167,7 +167,7 @@ extern int grep_main(int argc, char **argv)
/* If no files were specified, take input from stdin. Otherwise, we grep
* through all the files specified. */
if (argv[optind+1] == NULL) {
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
grep_file(stdin);
} else {
int i;
+1 -1
View File
@@ -167,7 +167,7 @@ extern int grep_main(int argc, char **argv)
/* If no files were specified, take input from stdin. Otherwise, we grep
* through all the files specified. */
if (argv[optind+1] == NULL) {
if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
grep_file(stdin);
} else {
int i;