Date: Tue, 15 Jul 2008 13:55:15 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 145281 for review Message-ID: <200807151355.m6FDtFEQ050501@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145281 Change 145281 by gabor@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807151355.m6FDtFEQ050501>