0.42
* Made tar creation support in busybox tar optional.
+ * Made grep and grep -h do the right thing wrt printing
+ the file name (it failed to print files names in many cases).
-Erik Andersen
char *cp;
char *needle;
char *fileName;
- int tellName=FALSE;
- int ignoreCase=FALSE;
+ int tellName=TRUE;
+ int ignoreCase=TRUE;
int tellLine=FALSE;
break;
case 'h':
- tellName = TRUE;
+ tellName = FALSE;
break;
case 'n':
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++;
char *cp;
char *needle;
char *fileName;
- int tellName=FALSE;
- int ignoreCase=FALSE;
+ int tellName=TRUE;
+ int ignoreCase=TRUE;
int tellLine=FALSE;
break;
case 'h':
- tellName = TRUE;
+ tellName = FALSE;
break;
case 'n':
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++;