diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-22 14:29:27 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-22 14:29:27 +0000 |
commit | ddeafc6965f82456e6c073857185deb76f9c394a (patch) | |
tree | 981ed796e53dbfdc1c4c8a47650474c1e224b756 /grep.c | |
parent | 479db39297f5d5c8b9a1a625787c27359fcfd115 (diff) | |
download | busybox-w32-ddeafc6965f82456e6c073857185deb76f9c394a.tar.gz busybox-w32-ddeafc6965f82456e6c073857185deb76f9c394a.tar.bz2 busybox-w32-ddeafc6965f82456e6c073857185deb76f9c394a.zip |
Fixed extra -- lines (noted by Christophe Boyanique).
git-svn-id: svn://busybox.net/trunk/busybox@2699 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r-- | grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |