svn commit: r210622 - in head/usr.bin/grep: . nls
Gabor Kovesdan
gabor at FreeBSD.org
Thu Jul 29 18:02:58 UTC 2010
Author: gabor
Date: Thu Jul 29 18:02:57 2010
New Revision: 210622
URL: http://svn.freebsd.org/changeset/base/210622
Log:
- Some minor changes to the messages to increase usefulness of error msgs
Reviewed by: hrs (Japanese catalogs),
pluknet <pluknet at gmail dot com> (Russian catalog)
Approved by: delphij (mentor)
Modified:
head/usr.bin/grep/grep.c
head/usr.bin/grep/nls/C.msg
head/usr.bin/grep/nls/es_ES.ISO8859-1.msg
head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg
head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg
head/usr.bin/grep/nls/ja_JP.SJIS.msg
head/usr.bin/grep/nls/ja_JP.UTF-8.msg
head/usr.bin/grep/nls/ja_JP.eucJP.msg
head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg
head/usr.bin/grep/nls/ru_RU.KOI8-R.msg
head/usr.bin/grep/util.c
Modified: head/usr.bin/grep/grep.c
==============================================================================
--- head/usr.bin/grep/grep.c Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/grep.c Thu Jul 29 18:02:57 2010 (r210622)
@@ -61,14 +61,13 @@ const char *errstr[] = {
"",
/* 1*/ "(standard input)",
/* 2*/ "cannot read bzip2 compressed file",
-/* 3*/ "unknown --color option",
+/* 3*/ "unknown %s option",
/* 4*/ "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n",
/* 5*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n",
/* 6*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n",
/* 7*/ "\t[--null] [pattern] [file ...]\n",
-/* 8*/ "unknown --binary-files option",
-/* 9*/ "Binary file %s matches\n",
-/*10*/ "%s (BSD grep) %s\n",
+/* 8*/ "Binary file %s matches\n",
+/* 9*/ "%s (BSD grep) %s\n",
};
/* Flags passed to regcomp() and regexec() */
@@ -445,10 +444,8 @@ main(int argc, char *argv[])
devbehave = DEV_SKIP;
else if (strcasecmp(optarg, "read") == 0)
devbehave = DEV_READ;
- else {
- errno = EINVAL;
- err(2, NULL);
- }
+ else
+ errx(2, getstr(3), "--devices");
break;
case 'd':
if (strcasecmp("recurse", optarg) == 0) {
@@ -458,10 +455,8 @@ main(int argc, char *argv[])
dirbehave = DIR_SKIP;
else if (strcasecmp("read", optarg) == 0)
dirbehave = DIR_READ;
- else {
- errno = EINVAL;
- err(2, NULL);
- }
+ else
+ errx(2, getstr(3), "--directories");
break;
case 'E':
grepbehave = GREP_EXTENDED;
@@ -552,7 +547,7 @@ main(int argc, char *argv[])
/* noop, compatibility */
break;
case 'V':
- printf(getstr(10), __progname, VERSION);
+ printf(getstr(9), __progname, VERSION);
exit(0);
case 'v':
vflag = true;
@@ -574,7 +569,7 @@ main(int argc, char *argv[])
else if (strcasecmp("text", optarg) == 0)
binbehave = BINFILE_TEXT;
else
- errx(2, "%s", getstr(8));
+ errx(2, getstr(3), "--binary-files");
break;
case COLOR_OPT:
color = NULL;
@@ -594,7 +589,7 @@ main(int argc, char *argv[])
} else if (strcasecmp("never", optarg) != 0 &&
strcasecmp("none", optarg) != 0 &&
strcasecmp("no", optarg) != 0)
- errx(2, "%s", getstr(3));
+ errx(2, getstr(3), "--color");
break;
case LABEL_OPT:
label = optarg;
Modified: head/usr.bin/grep/nls/C.msg
==============================================================================
--- head/usr.bin/grep/nls/C.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/C.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(standard input)"
2 "cannot read bzip2 compressed file"
-3 "unknown --color option"
+3 "unknown %s option"
4 "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n"
5 "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n"
6 "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n"
7 "\t[--null] [pattern] [file ...]\n"
-8 "unknown --binary-files option"
-9 "Binary file %s matches\n"
-10 "%s (BSD grep) %s\n"
+8 "Binary file %s matches\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/es_ES.ISO8859-1.msg
==============================================================================
--- head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(entrada estándar)"
2 "no se puede leer el fichero comprimido bzip2"
-3 "opción desconocida de --color"
+3 "opción desconocida de %s"
4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n"
5 "\t[-e pauta] [-f fichero] [--binary-files=valor] [--color=cuando]\n"
6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n"
7 "\t[--null] [pauta] [fichero ...]\n"
-8 "opción desconocida de --binary-files"
-9 "fichero binario %s se ajusta\n"
-10 "%s (BSD grep) %s\n"
+8 "fichero binario %s se ajusta\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg
==============================================================================
--- head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(entrada estándar)"
2 "non se pode ler o ficheiro comprimido bzip2"
-3 "opción descoñecida de --color"
+3 "opción descoñecida de %s"
4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n"
5 "\t[-e pauta] [-f ficheiro] [--binary-files=valor] [--color=cando]\n"
6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n"
7 "\t[--null] [pauta] [ficheiro ...]\n"
-8 "opción descoñecida de --binary-files"
-9 "ficheiro binario %s conforma\n"
-10 "%s (BSD grep) %s\n"
+8 "ficheiro binario %s conforma\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg
==============================================================================
--- head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(szabványos bemenet)"
2 "bzip2 tömörített fájl nem olvasható"
-3 "ismeretlen --color opció"
+3 "ismeretlen %s opció"
4 "használat: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A szám] [-B szám] [-C[szám]]\n"
5 "\t[-e minta] [-f fájl] [--binary-files=érték] [--color=mikor]\n"
6 "\t[--context[=szám]] [--directories=mûvelet] [--label] [--line-buffered]\n"
7 "\t[--null] [minta] [fájl ...]\n"
-8 "ismeretlen --binary-files opció"
-9 "%s bináris fájl illeszkedik\n"
-10 "%s (BSD grep) %s\n"
+8 "%s bináris fájl illeszkedik\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/ja_JP.SJIS.msg
==============================================================================
--- head/usr.bin/grep/nls/ja_JP.SJIS.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/ja_JP.SJIS.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(WüÍ)"
2 "bzip2 ³kt@CðÇÝޱƪūܹñ"
-3 "--color IvVÌwèlÉëèª èÜ·"
+3 "%s IvVÌwèlÉëèª èÜ·"
4 "g¢û: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ] [-B ] [-C[]]\n"
5 "\t[-e p^[] [-f t@C¼] [--binary-files=l] [--color=l]\n"
6 "\t[--context[=]] [--directories=®ì] [--label] [--line-buffered]\n"
7 "\t[--null] [p^[] [t@C¼ ...]\n"
-8 "--binary-files IvVÌwèlÉëèª èÜ·"
-9 "oCit@C %s É}b`µÜµ½\n"
-10 "%s (BSD grep) %s\n"
+8 "oCit@C %s É}b`µÜµ½\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/ja_JP.UTF-8.msg
==============================================================================
--- head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(æ¨æºå
¥å)"
2 "bzip2 å§ç¸®ãã¡ã¤ã«ãèªã¿è¾¼ããã¨ãã§ãã¾ãã"
-3 "--color ãªãã·ã§ã³ã®æå®å¤ã«èª¤ããããã¾ã"
+3 "%s ãªãã·ã§ã³ã®æå®å¤ã«èª¤ããããã¾ã"
4 "使ãæ¹: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A æ°å] [-B æ°å] [-C[æ°å]]\n"
5 "\t[-e ãã¿ã¼ã³] [-f ãã¡ã¤ã«å] [--binary-files=å¤] [--color=å¤]\n"
6 "\t[--context[=æ°å]] [--directories=åä½] [--label] [--line-buffered]\n"
7 "\t[--null] [ãã¿ã¼ã³] [ãã¡ã¤ã«å ...]\n"
-8 "--binary-files ãªãã·ã§ã³ã®æå®å¤ã«èª¤ããããã¾ã"
-9 "ãã¤ããªãã¡ã¤ã« %s ã«ããããã¾ãã\n"
-10 "%s (BSD grep) %s\n"
+8 "ãã¤ããªãã¡ã¤ã« %s ã«ããããã¾ãã\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/ja_JP.eucJP.msg
==============================================================================
--- head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(ɸ½àÆþÎÏ)"
2 "bzip2 °µ½Ì¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤³¤È¤¬¤Ç¤¤Þ¤»¤ó"
-3 "--color ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹"
+3 "%s ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹"
4 "»È¤¤Êý: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ¿ô»ú] [-B ¿ô»ú] [-C[¿ô»ú]]\n"
5 "\t[-e ¥Ñ¥¿¡¼¥ó] [-f ¥Õ¥¡¥¤¥ë̾] [--binary-files=ÃÍ] [--color=ÃÍ]\n"
6 "\t[--context[=¿ô»ú]] [--directories=Æ°ºî] [--label] [--line-buffered]\n"
7 "\t[--null] [¥Ñ¥¿¡¼¥ó] [¥Õ¥¡¥¤¥ë̾ ...]\n"
-8 "--binary-files ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹"
-9 "¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë %s ¤Ë¥Þ¥Ã¥Á¤·¤Þ¤·¤¿\n"
-10 "%s (BSD grep) %s\n"
+8 "¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë %s ¤Ë¥Þ¥Ã¥Á¤·¤Þ¤·¤¿\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg
==============================================================================
--- head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(entrada padrão)"
2 "não se posso ler o fichero comprimido bzip2"
-3 "opcão não conhecida de --color"
+3 "opcão não conhecida de %s"
4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n"
5 "\t[-e padrão] [-f arquivo] [--binary-files=valor] [--color=quando]\n"
6 "\t[--context[=num]] [--directories=ação] [--label] [--line-buffered]\n"
7 "\t[--null] [padrão] [arquivo ...]\n"
-8 "opcão não conhecida de --binary-files"
-9 "arquivo binário %s casa com o padrão\n"
-10 "%s (BSD grep) %s\n"
+8 "arquivo binário %s casa com o padrão\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/nls/ru_RU.KOI8-R.msg
==============================================================================
--- head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Thu Jul 29 18:02:57 2010 (r210622)
@@ -4,11 +4,10 @@ $set 1
$quote "
1 "(ÓÔÁÎÄÁÒÔÎÙÊ ××ÏÄ)"
2 "ÎÅ ÍÏÇÕ ÐÒÏÞÉÔÁÔØ ÓÖÁÔÙÊ × bzip2 ÆÁÊÌ"
-3 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ --color"
+3 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ %s"
4 "ÉÓÐÏÌØÚÏ×ÁÎÉÅ: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ÞÉÓ] [-B ÞÉÓ] [-C[ÞÉÓ]]\n"
5 "\t[-e ÛÁÂÌÏÎ] [-f ÆÁÊÌ] [--binary-files=ÚÎÁÞÅÎÉÅ] [--color=ËÏÇÄÁ]\n"
6 "\t[--context[=ÞÉÓ]] [--directories=ÄÅÊÓÔ×ÉÅ] [--label] [--line-buffered]\n"
7 "\t[--null] [ÛÁÂÌÏÎ] [ÆÁÊÌ ...]\n"
-8 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ --binary-files"
-9 "Ä×ÏÉÞÎÙÊ ÆÁÊÌ %s ÓÏ×ÐÁÄÁÅÔ\n"
-10 "%s (BSD grep) %s\n"
+8 "Ä×ÏÉÞÎÙÊ ÆÁÊÌ %s ÓÏ×ÐÁÄÁÅÔ\n"
+9 "%s (BSD grep) %s\n"
Modified: head/usr.bin/grep/util.c
==============================================================================
--- head/usr.bin/grep/util.c Thu Jul 29 17:52:23 2010 (r210621)
+++ head/usr.bin/grep/util.c Thu Jul 29 18:02:57 2010 (r210622)
@@ -260,7 +260,7 @@ procfile(const char *fn)
printf("%s\n", fn);
if (c && !cflag && !lflag && !Lflag &&
binbehave == BINFILE_BIN && f->binary && !qflag)
- printf(getstr(9), fn);
+ printf(getstr(8), fn);
free(ln.file);
free(f);
More information about the svn-src-all
mailing list