PERFORCE change 143641 for review
Gabor Kovesdan
gabor at FreeBSD.org
Tue Jun 17 13:22:53 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143641
Change 143641 by gabor at gabor_server on 2008/06/17 13:22:05
- Improve compatibility of -B
Affected files ...
.. //depot/projects/soc2008/gabor_textproc/grep/util.c#23 edit
Differences ...
==== //depot/projects/soc2008/gabor_textproc/grep/util.c#23 (text+ko) ====
@@ -276,7 +276,7 @@
if ((tail || c) && !cflag && !qflag) {
if (c) {
- if (!first && !prev && !tail && (Aflag || Bflag))
+ if (!first && !prev && !tail && Aflag)
printf("--\n");
tail = Aflag;
if (Bflag > 0)
@@ -284,16 +284,19 @@
linesqueued = 0;
printline(l, ':');
} else {
- prev = 0;
printline(l, '-');
tail--;
}
}
+ if (!c && Bflag && prev)
+ printf("--\n");
+
if (c) {
prev++;
first = 0;
- }
+ } else
+ prev = 0;
return (c);
}
More information about the p4-projects
mailing list