Bug fix. grep wasn't printing file names they way it was supposed to.
-Erik
diff --git a/grep.c b/grep.c
index fdfc959..287d9f8 100644
--- a/grep.c
+++ b/grep.c
@@ -90,8 +90,8 @@
char *cp;
char *needle;
char *fileName;
- int tellName=FALSE;
- int ignoreCase=FALSE;
+ int tellName=TRUE;
+ int ignoreCase=TRUE;
int tellLine=FALSE;
@@ -115,7 +115,7 @@
break;
case 'h':
- tellName = TRUE;
+ tellName = FALSE;
break;
case 'n':
@@ -137,6 +137,9 @@
if (argc==0) {
do_grep( stdin, needle, "stdin", FALSE, ignoreCase, tellLine);
} else {
+ /* Never print the filename for just one file */
+ if (argc==1)
+ tellName=FALSE;
while (argc-- > 0) {
fileName = *argv++;