summaryrefslogtreecommitdiff
path: root/lib/argmatch.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-11 03:10:19 +0000
committerJim Meyering <jim@meyering.net>1999-01-11 03:10:19 +0000
commitdb0dadb263c7f45446dd3185a9a27fe0d63d01d3 (patch)
treec972b290302147f08bc31c1112a5f989a3678c16 /lib/argmatch.c
parent3c21ae616f548326008473d92d341976995a25b6 (diff)
downloadcoreutils-db0dadb263c7f45446dd3185a9a27fe0d63d01d3.tar.xz
(ARGMATCH_QUOTING_STYLE): Change from c_quoting_style to escape_quoting_style.
(argmatch_invalid): Now that the quoted quantity is no longer double quoted, remove the code that removed leading and trailing double quotes.
Diffstat (limited to 'lib/argmatch.c')
-rw-r--r--lib/argmatch.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/argmatch.c b/lib/argmatch.c
index 517c6e529..ed18c1834 100644
--- a/lib/argmatch.c
+++ b/lib/argmatch.c
@@ -43,7 +43,7 @@
ARGMATCH_QUOTING_STYLE. literal_quoting_style is not good. */
#ifndef ARGMATCH_QUOTING_STYLE
-# define ARGMATCH_QUOTING_STYLE c_quoting_style
+# define ARGMATCH_QUOTING_STYLE escape_quoting_style
#endif
extern char *program_name;
@@ -131,25 +131,17 @@ argmatch_invalid (const char *kind, const char *value, int problem)
{
enum quoting_style saved_quoting_style;
char const *format;
- char *quoted_arg;
/* 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);
- /* There is an error */
- quoted_arg = quotearg (value);
-
- /* Skip over the first quote character, and overwrite the last one. */
- ++quoted_arg;
- quoted_arg[strlen (quoted_arg) - 1] = '\0';
-
format = (problem == -1
? _("%s: invalid argument `%s' for `%s'\n")
: _("%s: ambiguous argument `%s' for `%s'\n"));
- fprintf (stderr, format, program_name, quoted_arg, kind);
+ fprintf (stderr, format, program_name, quotearg (value), kind);
set_quoting_style (NULL, saved_quoting_style);
}