From owner-p4-projects@FreeBSD.ORG Tue Jun 24 20:41:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E0F21065674; Tue, 24 Jun 2008 20:41:48 +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 A1204106567A for ; Tue, 24 Jun 2008 20:41:48 +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 9C7B18FC0A for ; Tue, 24 Jun 2008 20:41:48 +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 m5OKfmJD035427 for ; Tue, 24 Jun 2008 20:41:48 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5OKfmY5035425 for perforce@freebsd.org; Tue, 24 Jun 2008 20:41:48 GMT (envelope-from gabor@freebsd.org) Date: Tue, 24 Jun 2008 20:41:48 GMT Message-Id: <200806242041.m5OKfmY5035425@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 144052 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: Tue, 24 Jun 2008 20:41:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=144052 Change 144052 by gabor@gabor_server on 2008/06/24 20:41:16 - Fix -C - Improve some error message Affected files ... .. //depot/projects/soc2008/gabor_textproc/grep/grep.c#43 edit .. //depot/projects/soc2008/gabor_textproc/grep/nls/C.msg#2 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/grep/grep.c#43 (text+ko) ==== @@ -69,9 +69,11 @@ /* 8*/ "parentheses not balanced", /* 9*/ "context out of range", /*10*/ "FreeBSD grep 2.5.1\n", -/*11*/ "Unknown binary-files option", +/*11*/ "Unknown --binary-files option", /*12*/ "Binary file %s matches\n", -/*12*/ "Value out of range" +/*12*/ "Value out of range", +/*13*/ "Unknown -d or --directory option", +/*14*/ "Unknown --color option" }; /* Flags passed to regcomp() and regexec() */ @@ -156,7 +158,7 @@ exit(2); } -static char *optstr = "0123456789A:B:CD:EFGHIJLOPSRUVZabcd:e:f:hilm:noqrsuvwxy"; +static char *optstr = "0123456789A:B:C:D:EFGHIJLOPSRUVZabcd:e:f:hilm:noqrsuvwxy"; struct option long_options[] = { @@ -450,7 +452,7 @@ } else if (strcmp("skip", optarg) == 0) dirbehave = DIR_SKIP; else if (strcmp("read", optarg) != 0) - usage(); + errx(2, getstr(13)); break; case 'E': Fflag = Gflag = 0; @@ -576,7 +578,7 @@ } else if (strcmp("never", optarg) == 0) color = NULL; else - usage(); + errx(2, getstr(14)); break; case LABEL_OPT: label = optarg; ==== //depot/projects/soc2008/gabor_textproc/grep/nls/C.msg#2 (text+ko) ==== @@ -12,5 +12,8 @@ 8 "parentheses not balanced" 9 "context out of range" 10 "FreeBSD grep 2.5.1\n" -11 "Unknown binary-files option" +11 "Unknown --binary-files option" 12 "Binary file %s matches\n" +12 "Value out of range" +13 "Unknown -d or --directory option" +14 "Unknown --color option"