PERFORCE change 145281 for review
Gabor Kovesdan
gabor at FreeBSD.org
Tue Jul 15 13:55:16 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=145281
Change 145281 by gabor at gabor_server on 2008/07/15 13:54:55
- Fix -v behaviour [1]
- Indenting
Reported by: kris [1]
Affected files ...
.. //depot/projects/soc2008/gabor_textproc/grep/util.c#63 edit
Differences ...
==== //depot/projects/soc2008/gabor_textproc/grep/util.c#63 (text+ko) ====
@@ -283,13 +283,10 @@
} else
c = !vflag;
- if (vflag)
- c = !c;
-
if (c && binbehave == BINFILE_BIN && nottext)
return (c); /* Binary file */
- if ((tail || c) && !cflag && !qflag) {
+ if ((tail || (c && !vflag)) && !cflag && !qflag) {
if (c) {
if (!first && !prev && !tail && Aflag)
printf("--\n");
@@ -380,8 +377,9 @@
fwrite(line->dat + a, matches[i].rm_so - a, 1, stdout);
if (color)
fprintf(stdout, "\33[%sm\33[K", color);
+
fwrite(line->dat + matches[i].rm_so,
- matches[i].rm_eo - matches[i].rm_so, 1, stdout);
+ matches[i].rm_eo - matches[i].rm_so, 1, stdout);
if (color)
fprintf(stdout, "\33[00m\33[K");
a = matches[i].rm_eo;
More information about the p4-projects
mailing list