X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=grep.c;h=600f69f2fe2a0271f4bdf736f95f70c8f7381aa4;hb=834caf9a7b0850d5647426bcb7c4dae04d85a922;hp=e2c190a7f66f9e9311f91d9a41b7dc3f295f00fb;hpb=e782e12f89955dfb0be82098af3cfdd8dd0eaf80;p=git.git diff --git a/grep.c b/grep.c index e2c190a7f..600f69f2f 100644 --- a/grep.c +++ b/grep.c @@ -514,7 +514,7 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name, if (from <= last_shown) from = last_shown + 1; if (last_shown && from != last_shown + 1) - printf(hunk_mark); + fputs(hunk_mark, stdout); while (from < lno) { pcl = &prev[lno-from-1]; show_line(opt, pcl->bol, pcl->eol, @@ -524,7 +524,7 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name, last_shown = lno-1; } if (last_shown && lno != last_shown + 1) - printf(hunk_mark); + fputs(hunk_mark, stdout); if (!opt->count) show_line(opt, bol, eol, name, lno, ':'); last_shown = last_hit = lno; @@ -535,7 +535,7 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name, * we need to show this line. */ if (last_shown && lno != last_shown + 1) - printf(hunk_mark); + fputs(hunk_mark, stdout); show_line(opt, bol, eol, name, lno, '-'); last_shown = lno; }