summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-07 18:30:14 +0100
committerJim Meyering <meyering@redhat.com>2012-01-09 21:50:08 +0100
commit36b9a1b6ac2730e78c14552fd55795fe10862a3d (patch)
tree193aeae1bfea1c96e1cd7226a51208d396bb4ec2
parentae2b0d2ddca458eb282bb0458987e75e1875a659 (diff)
downloadcoreutils-36b9a1b6ac2730e78c14552fd55795fe10862a3d.tar.gz
coreutils-36b9a1b6ac2730e78c14552fd55795fe10862a3d.tar.bz2
coreutils-36b9a1b6ac2730e78c14552fd55795fe10862a3d.zip
maint: adjust quoting: emit '...', not `...' in diagnostics
* src/csplit.c (parse_repeat_count, extract_regexp): As above. * src/date.c (main): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (decode_one_format, main): Likewise. * src/pathchk.c (no_leading_hyphen): Likewise. * src/pr.c (main, getoptarg): Likewise. * src/rm.c (diagnose_leading_hyphen): Likewise. * src/sort.c (key_warnings, incompatible_options, main): Likewise. * src/stat.c (print_esc_char): Print '\x', not `\x' in diagnostic. * src/test.c (main): Likewise. * src/touch.c (main): Likewise. * src/tr.c (build_spec_list, validate, append_range): Likewise. * tests/misc/mktemp: This is an unusual case, since the affected string contains only the ` of an `...' string. So we change the long ` to a lone '. * tests/pr/pr-tests: Manual quote adapting fix-up. * tests/ln/hard-to-sym: Likewise. * tests/split/suffix-length: Likewise. * tests/mv/part-fail: Likewise. * tests/misc/chcon: Likewise. * tests/misc/stat-printf: Likewise.
-rw-r--r--src/csplit.c6
-rw-r--r--src/date.c4
-rw-r--r--src/ls.c2
-rw-r--r--src/od.c4
-rw-r--r--src/pathchk.c2
-rw-r--r--src/pr.c14
-rw-r--r--src/rm.c2
-rw-r--r--src/sort.c22
-rw-r--r--src/stat.c2
-rw-r--r--src/test.c2
-rw-r--r--src/touch.c4
-rw-r--r--src/tr.c8
-rwxr-xr-xtests/ln/hard-to-sym6
-rwxr-xr-xtests/misc/chcon2
-rwxr-xr-xtests/misc/mktemp2
-rwxr-xr-xtests/misc/stat-printf2
-rwxr-xr-xtests/mv/part-fail2
-rwxr-xr-xtests/pr/pr-tests2
-rwxr-xr-xtests/split/suffix-length2
19 files changed, 45 insertions, 45 deletions
diff --git a/src/csplit.c b/src/csplit.c
index 607092adf..6488b8412 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -1070,7 +1070,7 @@ parse_repeat_count (int argnum, struct control *p, char *str)
end = str + strlen (str) - 1;
if (*end != '}')
- error (EXIT_FAILURE, 0, _("%s: `}' is required in repeat count"), str);
+ error (EXIT_FAILURE, 0, _("%s: '}' is required in repeat count"), str);
*end = '\0';
if (str+1 == end-1 && *(str+1) == '*')
@@ -1080,7 +1080,7 @@ parse_repeat_count (int argnum, struct control *p, char *str)
if (xstrtoumax (str + 1, NULL, 10, &val, "") != LONGINT_OK)
{
error (EXIT_FAILURE, 0,
- _("%s}: integer required between `{' and `}'"),
+ _("%s}: integer required between '{' and '}'"),
global_argv[argnum]);
}
p->repeat = val;
@@ -1107,7 +1107,7 @@ extract_regexp (int argnum, bool ignore, char const *str)
closing_delim = strrchr (str + 1, delim);
if (closing_delim == NULL)
error (EXIT_FAILURE, 0,
- _("%s: closing delimiter `%c' missing"), str, delim);
+ _("%s: closing delimiter '%c' missing"), str, delim);
len = closing_delim - str - 1;
p = new_control_record ();
diff --git a/src/date.c b/src/date.c
index 216d5db78..5fe80853b 100644
--- a/src/date.c
+++ b/src/date.c
@@ -451,9 +451,9 @@ main (int argc, char **argv)
else if (set_date || option_specified_date)
{
error (0, 0,
- _("the argument %s lacks a leading `+';\n"
+ _("the argument %s lacks a leading '+';\n"
"when using an option to specify date(s), any non-option\n"
- "argument must be a format string beginning with `+'"),
+ "argument must be a format string beginning with '+'"),
quote (argv[optind]));
usage (EXIT_FAILURE);
}
diff --git a/src/ls.c b/src/ls.c
index b12f8773d..362c58dd0 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2059,7 +2059,7 @@ decode_switches (int argc, char **argv)
char const *const *p = time_style_args;
while (*p)
fprintf (stderr, " - [posix-]%s\n", *p++);
- fputs (_(" - +FORMAT (e.g., +%H:%M) for a `date'-style"
+ fputs (_(" - +FORMAT (e.g., +%H:%M) for a 'date'-style"
" format\n"), stderr);
usage (LS_FAILURE);
}
diff --git a/src/od.c b/src/od.c
index 171e6c8c1..46a6abe80 100644
--- a/src/od.c
+++ b/src/od.c
@@ -816,7 +816,7 @@ this system doesn't provide a %lu-byte floating point type"),
break;
default:
- error (0, 0, _("invalid character `%c' in type string %s"),
+ error (0, 0, _("invalid character '%c' in type string %s"),
*s, quote (s_orig));
return false;
}
@@ -1598,7 +1598,7 @@ main (int argc, char **argv)
break;
default:
error (EXIT_FAILURE, 0,
- _("invalid output address radix `%c'; \
+ _("invalid output address radix '%c'; \
it must be one character from [doxn]"),
optarg[0]);
break;
diff --git a/src/pathchk.c b/src/pathchk.c
index b337a3ba5..56490a6b9 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -167,7 +167,7 @@ no_leading_hyphen (char const *file)
for (p = file; (p = strchr (p, '-')); p++)
if (p == file || p[-1] == '/')
{
- error (0, 0, _("leading `-' in a component of file name %s"),
+ error (0, 0, _("leading '-' in a component of file name %s"),
quote (file));
return false;
}
diff --git a/src/pr.c b/src/pr.c
index 3e473fcb0..867ee83de 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -909,7 +909,7 @@ main (int argc, char **argv)
{ /* dominates old opt +... */
if (! optarg)
error (EXIT_FAILURE, 0,
- _("`--pages=FIRST_PAGE[:LAST_PAGE]' missing argument"));
+ _("'--pages=FIRST_PAGE[:LAST_PAGE]' missing argument"));
else if (! first_last_page (oi, 0, optarg))
error (EXIT_FAILURE, 0, _("invalid page range %s"),
quote (optarg));
@@ -976,7 +976,7 @@ main (int argc, char **argv)
|| tmp_long <= 0 || tmp_long > INT_MAX)
{
error (EXIT_FAILURE, 0,
- _("`-l PAGE_LENGTH' invalid number of lines: %s"),
+ _("'-l PAGE_LENGTH' invalid number of lines: %s"),
quote (optarg));
}
lines_per_page = tmp_long;
@@ -1000,7 +1000,7 @@ main (int argc, char **argv)
|| tmp_long > INT_MAX)
{
error (EXIT_FAILURE, 0,
- _("`-N NUMBER' invalid starting line number: %s"),
+ _("'-N NUMBER' invalid starting line number: %s"),
quote (optarg));
}
start_line_num = tmp_long;
@@ -1012,7 +1012,7 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long < 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-o MARGIN' invalid line offset: %s"), quote (optarg));
+ _("'-o MARGIN' invalid line offset: %s"), quote (optarg));
chars_per_margin = tmp_long;
break;
}
@@ -1053,7 +1053,7 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-w PAGE_WIDTH' invalid number of characters: %s"),
+ _("'-w PAGE_WIDTH' invalid number of characters: %s"),
quote (optarg));
if (!truncate_lines)
chars_per_line = tmp_long;
@@ -1067,7 +1067,7 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-W PAGE_WIDTH' invalid number of characters: %s"),
+ _("'-W PAGE_WIDTH' invalid number of characters: %s"),
quote (optarg));
chars_per_line = tmp_long;
break;
@@ -1197,7 +1197,7 @@ getoptarg (char *arg, char switch_char, char *character, int *number)
|| tmp_long <= 0 || tmp_long > INT_MAX)
{
error (0, 0,
- _("`-%c' extra characters or invalid number in the argument: %s"),
+ _("'-%c' extra characters or invalid number in the argument: %s"),
switch_char, quote (arg));
usage (EXIT_FAILURE);
}
diff --git a/src/rm.c b/src/rm.c
index a5edfcf8f..e9d5a598f 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -115,7 +115,7 @@ diagnose_leading_hyphen (int argc, char **argv)
if (arg[0] == '-' && arg[1] && lstat (arg, &st) == 0)
{
fprintf (stderr,
- _("Try `%s ./%s' to remove the file %s.\n"),
+ _("Try '%s ./%s' to remove the file %s.\n"),
argv[0],
quotearg_n_style (1, shell_quoting_style, arg),
quote (arg));
diff --git a/src/sort.c b/src/sort.c
index dd7d56355..33f4ffe1c 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2373,7 +2373,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
umaxtostr (eword + 1
+ (key->echar == SIZE_MAX), tmp));
}
- error (0, 0, _("obsolescent key `%s' used; consider `%s' instead"),
+ error (0, 0, _("obsolescent key '%s' used; consider '%s' instead"),
obuf, nbuf);
}
@@ -2391,7 +2391,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
|| (!key->skipsblanks && key->schar)
|| (!key->skipeblanks && key->echar)))
error (0, 0, _("leading blanks are significant in key %lu; "
- "consider also specifying `b'"), keynum);
+ "consider also specifying 'b'"), keynum);
/* Warn about numeric comparisons spanning fields,
as field delimiters could be interpreted as part
@@ -2435,13 +2435,13 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
char opts[sizeof short_options];
key_to_opts (&ugkey, opts);
error (0, 0,
- ngettext ("option `-%s' is ignored",
- "options `-%s' are ignored",
+ ngettext ("option '-%s' is ignored",
+ "options '-%s' are ignored",
select_plural (strlen (opts))), opts);
ugkey.reverse = ugkey_reverse;
}
if (ugkey.reverse && !(stable || unique) && keylist)
- error (0, 0, _("option `-r' only applies to last-resort comparison"));
+ error (0, 0, _("option '-r' only applies to last-resort comparison"));
}
/* Compare two lines A and B trying every key in sequence until there
@@ -3936,7 +3936,7 @@ static void incompatible_options (char const *) ATTRIBUTE_NORETURN;
static void
incompatible_options (char const *opts)
{
- error (SORT_FAILURE, 0, _("options `-%s' are incompatible"), opts);
+ error (SORT_FAILURE, 0, _("options '-%s' are incompatible"), opts);
abort ();
}
@@ -4244,10 +4244,10 @@ main (int argc, char **argv)
{
char const *optarg1 = argv[optind++];
s = parse_field_count (optarg1 + 1, &key->eword,
- N_("invalid number after `-'"));
+ N_("invalid number after '-'"));
if (*s == '.')
s = parse_field_count (s + 1, &key->echar,
- N_("invalid number after `.'"));
+ N_("invalid number after '.'"));
if (!key->echar && key->eword)
{
/* obsolescent syntax +A.x -B.y is equivalent to:
@@ -4333,7 +4333,7 @@ main (int argc, char **argv)
if (*s == '.')
{
s = parse_field_count (s + 1, &key->schar,
- N_("invalid number after `.'"));
+ N_("invalid number after '.'"));
if (! key->schar--)
{
/* Provoke with `sort -k1.0' */
@@ -4352,7 +4352,7 @@ main (int argc, char **argv)
{
/* Get POS2. */
s = parse_field_count (s + 1, &key->eword,
- N_("invalid number after `,'"));
+ N_("invalid number after ','"));
if (! key->eword--)
{
/* Provoke with `sort -k1,0' */
@@ -4361,7 +4361,7 @@ main (int argc, char **argv)
if (*s == '.')
{
s = parse_field_count (s + 1, &key->echar,
- N_("invalid number after `.'"));
+ N_("invalid number after '.'"));
}
s = set_ordering (s, key, bl_end);
}
diff --git a/src/stat.c b/src/stat.c
index 0d40d9952..a2a502978 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1041,7 +1041,7 @@ print_esc_char (char c)
case '\\':
break;
default:
- error (0, 0, _("warning: unrecognized escape `\\%c'"), c);
+ error (0, 0, _("warning: unrecognized escape '\\%c'"), c);
break;
}
putchar (c);
diff --git a/src/test.c b/src/test.c
index 5bf712aa8..66df2fa2e 100644
--- a/src/test.c
+++ b/src/test.c
@@ -855,7 +855,7 @@ main (int margc, char **margv)
}
}
if (margc < 2 || !STREQ (margv[margc - 1], "]"))
- test_syntax_error (_("missing `]'"), NULL);
+ test_syntax_error (_("missing ']'"), NULL);
--margc;
}
diff --git a/src/touch.c b/src/touch.c
index 70d7567a4..0879e431b 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -411,8 +411,8 @@ main (int argc, char **argv)
would fail. However, skip the warning if it ever fails. */
if (tm)
error (0, 0,
- _("warning: `touch %s' is obsolete; use "
- "`touch -t %04ld%02d%02d%02d%02d.%02d'"),
+ _("warning: 'touch %s' is obsolete; use "
+ "'touch -t %04ld%02d%02d%02d%02d.%02d'"),
argv[optind],
tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
diff --git a/src/tr.c b/src/tr.c
index 5dc065cf8..7efb0e389 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -670,7 +670,7 @@ append_range (struct Spec_list *list, unsigned char first, unsigned char last)
char *tmp2 = make_printable_char (last);
error (0, 0,
- _("range-endpoints of `%s-%s' are in reverse collating sequence order"),
+ _("range-endpoints of '%s-%s' are in reverse collating sequence order"),
tmp1, tmp2);
free (tmp1);
free (tmp2);
@@ -907,10 +907,10 @@ build_spec_list (const struct E_string *es, struct Spec_list *result)
if (opnd_str_len == 0)
{
if (p[i + 1] == ':')
- error (0, 0, _("missing character class name `[::]'"));
+ error (0, 0, _("missing character class name '[::]'"));
else
error (0, 0,
- _("missing equivalence class character `[==]'"));
+ _("missing equivalence class character '[==]'"));
return false;
}
@@ -1503,7 +1503,7 @@ when translating"));
{
error (EXIT_FAILURE, 0,
_("when translating, the only character classes that may \
-appear in\nstring2 are `upper' and `lower'"));
+appear in\nstring2 are 'upper' and 'lower'"));
}
validate_case_classes (s1, s2);
diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym
index 3ea4570b1..044b10c0d 100755
--- a/tests/ln/hard-to-sym
+++ b/tests/ln/hard-to-sym
@@ -53,7 +53,7 @@ esac
ln -s /no-such-dir || framework_failure_
ln -L no-such-dir hard-to-dangle 2>err && fail=1
case `cat err` in
- *' accessing 'no-such-dir'\':*) ;;
+ *" accessing 'no-such-dir'":*) ;;
*) fail=1 ;;
esac
ln -P no-such-dir hard-to-dangle || fail=1
@@ -64,12 +64,12 @@ mkdir d || framework_failure_
ln -s d link-to-dir || framework_failure_
ln -L link-to-dir hard-to-dir-link 2>err && fail=1
case `cat err` in
- *': 'link-to-dir'\'': hard link not allowed for directory'*) ;;
+ *": 'link-to-dir': hard link not allowed for directory"*) ;;
*) fail=1 ;;
esac
ln -P link-to-dir/ hard-to-dir-link 2>err && fail=1
case `cat err` in
- *': 'link-to-dir/'\'': hard link not allowed for directory'*) ;;
+ *": 'link-to-dir/': hard link not allowed for directory"*) ;;
*) fail=1 ;;
esac
ln -P link-to-dir hard-to-dir-link || fail=1
diff --git a/tests/misc/chcon b/tests/misc/chcon
index caa483143..6b4458034 100755
--- a/tests/misc/chcon
+++ b/tests/misc/chcon
@@ -71,7 +71,7 @@ EOF
compare exp out || fail=1
chcon --verbose -u$u1 f > out || fail=1
-echo 'changing security context of 'f'\' > exp
+echo "changing security context of 'f'" > exp
compare exp out || fail=1
Exit $fail
diff --git a/tests/misc/mktemp b/tests/misc/mktemp
index c6291fbb6..49dfde494 100755
--- a/tests/misc/mktemp
+++ b/tests/misc/mktemp
@@ -190,7 +190,7 @@ my @Tests =
['pipe-bad-tmpdir',
{ENV => "TMPDIR=$bad_dir"},
{ERR_SUBST => "s,($bad_dir/)[^']+': .*,\$1...,"},
- {ERR => "$prog: failed to create file via template `$bad_dir/...\n"},
+ {ERR => "$prog: failed to create file via template '$bad_dir/...\n"},
{EXIT => 1}],
['pipe-bad-tmpdir-u', '-u', {OUT => "$bad_dir/tmp.ZZZZZZZZZZ\n"},
{ENV => "TMPDIR=$bad_dir"},
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf
index b576d250b..929b255e5 100755
--- a/tests/misc/stat-printf
+++ b/tests/misc/stat-printf
@@ -40,7 +40,7 @@ my @Tests =
['hex-1', q!--printf='\x34\xf' .!, {OUT=>"\x34\xf"}],
['hex-2', q!--printf='.\x18p\xfq' .!, {OUT=>".\x18p\x0fq"}],
['hex-3', q!--printf='\x' .!, {OUT=>'x'},
- {ERR=>"$prog: warning: unrecognized escape `\\x'\n"}],
+ {ERR=>"$prog: warning: unrecognized escape '\\x'\n"}],
# With --format, there *is* a trailing newline.
['f-nl', "--format=%n .", {OUT=>".\n"}],
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index f5d2bb3ee..3a3e37f21 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -31,7 +31,7 @@ chmod u-w "$other_partition_tmpdir" || framework_failure_
mv -f k "$other_partition_tmpdir" 2> out && fail=1
printf \
-'mv: inter-device move failed: '%s'\'' to '%s'\'';'\
+"mv: inter-device move failed: '%s' to '%s';"\
' unable to remove target: Permission denied\n' \
k "$other_partition_tmpdir/k" >exp
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests
index 2a333dc1e..2e1a80ca1 100755
--- a/tests/pr/pr-tests
+++ b/tests/pr/pr-tests
@@ -387,7 +387,7 @@ my @tv = (
['col-0', '-0', '', '', 1,
"$prog: invalid number of columns: '0'\n"],
['col-inval', '-'.'9'x100, '', '', 1,
- "$prog: invalid number of columns: `". ('9'x100) ."'\n"],
+ "$prog: invalid number of columns: '". ('9'x100) ."'\n"],
# Before coreutils-5.3.1, --pages=1:-1 would be treated like
# --pages=1:18446744073709551615.
diff --git a/tests/split/suffix-length b/tests/split/suffix-length
index 7779ef2f8..bc65e9f6d 100755
--- a/tests/split/suffix-length
+++ b/tests/split/suffix-length
@@ -31,7 +31,7 @@ done
files="${files}xba"
for f in $files; do
- printf 'creating file `%s'\''\n' $f
+ printf "creating file '%s'"'\n' $f
done > exp || framework_failure_
echo split: output file suffixes exhausted \