PERFORCE change 143474 for review
Gabor Kovesdan
gabor at FreeBSD.org
Sat Jun 14 22:22:15 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143474
Change 143474 by gabor at gabor_server on 2008/06/14 22:22:06
- Fix --color
Affected files ...
.. //depot/projects/soc2008/gabor_textproc/grep/util.c#17 edit
Differences ...
==== //depot/projects/soc2008/gabor_textproc/grep/util.c#17 (text+ko) ====
@@ -224,7 +224,7 @@
if (pmatch.rm_so != 0 || pmatch.rm_eo != l->len)
r = REG_NOMATCH;
}
- if ((r == 0) && (color != NULL) && !oflag) {
+ if ((r == 0) && (color != NULL) && !oflag && !nottext) {
/* XXX: this color stuff does not work yet :( */
char *tmp, *begin, *matched, *end;
@@ -248,7 +248,7 @@
l->len += strlen(color) + 8;
l->dat = tmp;
}
- if (r == 0 && oflag) {
+ if (r == 0 && oflag && !nottext) {
char *tmp, *matched;
if ((matched = malloc((pmatch.rm_eo - pmatch.rm_so + 2) * sizeof(char))) == NULL)
More information about the p4-projects
mailing list