X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fargmatch.c;h=964270650c2b72150ba8f1375c8857378dd5be16;hb=3c8064cd38767ea997d489216386a67a2a45ff3f;hp=f08fba35e91386f8a777d5b4d15199aaaef5df37;hpb=d853588fe7d6602da23b28fd0ed74fbb4e2ba4cc;p=gnulib.git diff --git a/lib/argmatch.c b/lib/argmatch.c index f08fba35e..964270650 100644 --- a/lib/argmatch.c +++ b/lib/argmatch.c @@ -43,7 +43,7 @@ by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use literal_quoting_style. */ #ifndef ARGMATCH_QUOTING_STYLE -# define ARGMATCH_QUOTING_STYLE escape_quoting_style +# define ARGMATCH_QUOTING_STYLE locale_quoting_style #endif /* The following test is to work around the gross typo in @@ -155,21 +155,11 @@ argcasematch (const char *arg, const char *const *arglist, void argmatch_invalid (const char *context, const char *value, int problem) { - enum quoting_style saved_quoting_style; - char const *format; + char const *format = (problem == -1 + ? _("invalid argument %s for `%s'") + : _("ambiguous argument %s for `%s'")); - /* Make sure to have a good quoting style to report errors. - literal is insane here. */ - saved_quoting_style = get_quoting_style (NULL); - set_quoting_style (NULL, ARGMATCH_QUOTING_STYLE); - - format = (problem == -1 - ? _("invalid argument `%s' for `%s'") - : _("ambiguous argument `%s' for `%s'")); - - error (0, 0, format, quotearg (value), context); - - set_quoting_style (NULL, saved_quoting_style); + error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context); } /* List the valid arguments for argmatch.