Date: Sat, 14 Jun 2008 22:22:14 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 143474 for review Message-ID: <200806142222.m5EMMEiK083324@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143474 Change 143474 by gabor@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806142222.m5EMMEiK083324>