From owner-p4-projects@FreeBSD.ORG Sat Jun 14 22:22:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB001106566C; Sat, 14 Jun 2008 22:22:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC5E1065678 for ; Sat, 14 Jun 2008 22:22:14 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8AA8FC19 for ; Sat, 14 Jun 2008 22:22:14 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5EMMECb083326 for ; Sat, 14 Jun 2008 22:22:14 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5EMMEiK083324 for perforce@freebsd.org; Sat, 14 Jun 2008 22:22:14 GMT (envelope-from gabor@freebsd.org) Date: Sat, 14 Jun 2008 22:22:14 GMT Message-Id: <200806142222.m5EMMEiK083324@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 143474 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 22:22:15 -0000 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)