PERFORCE change 143650 for review
Gabor Kovesdan
gabor at FreeBSD.org
Tue Jun 17 16:13:48 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143650
Change 143650 by gabor at gabor_server on 2008/06/17 16:13:31
- Little compatibility change to --color
Affected files ...
.. //depot/projects/soc2008/gabor_textproc/grep/util.c#25 edit
Differences ...
==== //depot/projects/soc2008/gabor_textproc/grep/util.c#25 (text+ko) ====
@@ -236,13 +236,13 @@
strlcpy(matched, &(l->dat[pmatch.rm_so]), pmatch.rm_eo - pmatch.rm_so + 1);
strlcpy(end, &(l->dat[pmatch.rm_eo]), strlen(l->dat) - pmatch.rm_eo + 1);
- asprintf(&tmp, "%s\33[%sm%s\33[00m%s", begin, color, matched, end);
+ asprintf(&tmp, "%s\33[%sm\33[K%s\33[00m\33[K%s", begin, color, matched, end);
free(begin);
free(matched);
free(end);
- l->len += strlen(color) + 8;
+ l->len += strlen(color) + 14;
l->dat = tmp;
}
if (r == 0 && oflag && !nottext) {
More information about the p4-projects
mailing list