diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-07-18 23:51:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-07-18 23:51:27 +0000 |
commit | 164a716f964bba247c660bc70149234f95146871 (patch) | |
tree | 95a8a6f75cb2ed1bb07cb6019088db7348ebf4d4 /busybox/findutils | |
parent | 8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373 (diff) | |
download | busybox-w32-164a716f964bba247c660bc70149234f95146871.tar.gz busybox-w32-164a716f964bba247c660bc70149234f95146871.tar.bz2 busybox-w32-164a716f964bba247c660bc70149234f95146871.zip |
busybox-1.0.1-rc1.patch
http://busybox.net/lists/busybox/2005-July/014974.html
Diffstat (limited to 'busybox/findutils')
-rw-r--r-- | busybox/findutils/grep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/busybox/findutils/grep.c b/busybox/findutils/grep.c index 29f4ecd4f..9b26add9a 100644 --- a/busybox/findutils/grep.c +++ b/busybox/findutils/grep.c | |||
@@ -98,7 +98,7 @@ static void print_line(const char *line, int linenum, char decoration) | |||
98 | } | 98 | } |
99 | last_line_printed = linenum; | 99 | last_line_printed = linenum; |
100 | #endif | 100 | #endif |
101 | if (print_filename) | 101 | if (print_filename > 0) |
102 | printf("%s%c", cur_file, decoration); | 102 | printf("%s%c", cur_file, decoration); |
103 | if (print_line_num) | 103 | if (print_line_num) |
104 | printf("%i%c", linenum, decoration); | 104 | printf("%i%c", linenum, decoration); |
@@ -219,7 +219,7 @@ static int grep_file(FILE *file) | |||
219 | 219 | ||
220 | /* grep -c: print [filename:]count, even if count is zero */ | 220 | /* grep -c: print [filename:]count, even if count is zero */ |
221 | if (print_match_counts) { | 221 | if (print_match_counts) { |
222 | if (print_filename) | 222 | if (print_filename > 0) |
223 | printf("%s:", cur_file); | 223 | printf("%s:", cur_file); |
224 | printf("%d\n", nmatches); | 224 | printf("%d\n", nmatches); |
225 | } | 225 | } |