diff options
author | Matt Kraai <kraai@debian.org> | 2001-05-22 14:29:27 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-05-22 14:29:27 +0000 |
commit | edc806507cb3db0790b27cb76c47050b57028c4b (patch) | |
tree | 981ed796e53dbfdc1c4c8a47650474c1e224b756 /findutils/grep.c | |
parent | 117231c44f2a6b25b211322b61b192d788917c84 (diff) | |
download | busybox-w32-edc806507cb3db0790b27cb76c47050b57028c4b.tar.gz busybox-w32-edc806507cb3db0790b27cb76c47050b57028c4b.tar.bz2 busybox-w32-edc806507cb3db0790b27cb76c47050b57028c4b.zip |
Fixed extra -- lines (noted by Christophe Boyanique).
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 061462ebc..07646e02a 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -60,7 +60,8 @@ static void print_line(const char *line, int linenum, char decoration) | |||
60 | { | 60 | { |
61 | #ifdef BB_FEATURE_GREP_CONTEXT | 61 | #ifdef BB_FEATURE_GREP_CONTEXT |
62 | /* possibly print the little '--' seperator */ | 62 | /* possibly print the little '--' seperator */ |
63 | if (last_line_printed && last_line_printed < linenum - 1) { | 63 | if ((lines_before || lines_after) && last_line_printed && |
64 | last_line_printed < linenum - 1) { | ||
64 | puts("--"); | 65 | puts("--"); |
65 | } | 66 | } |
66 | last_line_printed = linenum; | 67 | last_line_printed = linenum; |