From abf3f74b216c0ef4a5195ae1a5ebb7123b672387 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 16 Jan 2012 19:36:41 +0100 Subject: [PATCH] change more quotes in source, and adjust tests to match Run this command to change each `%s' to '%s' in source directories: git grep -l '`%s'\' src djgpp data \ |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g' * data/bison.m4: Affected per the above. * djgpp/subpipe.c: Likewise. * src/files.c: Likewise. * src/getargs.c: Likewise. * src/muscle-tab.c: Likewise. * src/reader.c: Likewise. * tests/glr-regression.at: Adjust to match. * tests/input.at: Likewise. * tests/push.at: Likewise. * tests/skeletons.at: Likewise. (cherry picked from commit 4aa9d1ff9ca9b838fe02a9bfe5ae4b0f935e5451) Conflicts: src/getargs.c src/muscle-tab.c src/reader.c tests/input.at --- data/bison.m4 | 20 +++++----- djgpp/subpipe.c | 14 +++---- src/files.c | 2 +- src/getargs.c | 18 ++++----- src/muscle-tab.c | 16 ++++---- src/reader.c | 4 +- tests/glr-regression.at | 4 +- tests/input.at | 86 ++++++++++++++++++++--------------------- tests/push.at | 2 +- tests/skeletons.at | 6 +-- 10 files changed, 86 insertions(+), 86 deletions(-) diff --git a/data/bison.m4 b/data/bison.m4 index ac1961d8..1696f39a 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -85,7 +85,7 @@ m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])]) # # For example: # -# b4_error([[warn]], [[invalid value for `%s': %s]], [[foo]], [[3]]) +# b4_error([[warn]], [[invalid value for '%s': %s]], [[foo]], [[3]]) m4_define([b4_error], [b4_cat([[@]$1[(]$2[]]dnl [m4_if([$#], [2], [], @@ -114,7 +114,7 @@ m4_define([b4_error_at], # # For example: # -# b4_warn([[invalid value for `%s': %s]], [[foo]], [[3]]) +# b4_warn([[invalid value for '%s': %s]], [[foo]], [[3]]) # # As a simple test suite, this: # @@ -354,7 +354,7 @@ m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl m4_ifndef($3[(]m4_quote(b4_user_name)[)], [b4_complain_at([b4_start], [b4_end], - [[%s `%s' is not used]], + [[%s '%s' is not used]], [$1], [b4_user_name])])[]dnl m4_popdef([b4_occurrence])dnl m4_popdef([b4_user_name])dnl @@ -412,7 +412,7 @@ m4_define([b4_percent_define_get_loc], [m4_pushdef([b4_loc], m4_indir([b4_percent_define_loc(]$1[)]))dnl b4_loc[]dnl m4_popdef([b4_loc])], - [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_loc]], [$1])])]) + [b4_fatal([[undefined %%define variable '%s' passed to b4_percent_define_get_loc]], [$1])])]) # b4_percent_define_get_syncline(VARIABLE) # ---------------------------------------- @@ -429,7 +429,7 @@ m4_popdef([b4_loc])], m4_define([b4_percent_define_get_syncline], [m4_ifdef([b4_percent_define_syncline(]$1[)], [m4_indir([b4_percent_define_syncline(]$1[)])], - [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_syncline]], [$1])])]) + [b4_fatal([[undefined %%define variable '%s' passed to b4_percent_define_get_syncline]], [$1])])]) # b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE]) # ------------------------------------------------------ @@ -464,10 +464,10 @@ m4_define([b4_percent_define_flag_if], [m4_case(b4_percent_define_get([$1]), [], [$2], [true], [$2], [false], [$3], [m4_expand_once([b4_complain_at(b4_percent_define_get_loc([$1]), - [[invalid value for %%define Boolean variable `%s']], + [[invalid value for %%define Boolean variable '%s']], [$1])], [[b4_percent_define_flag_if($1)]])])], - [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_flag_if]], [$1])])]) + [b4_fatal([[undefined %%define variable '%s' passed to b4_percent_define_flag_if]], [$1])])]) # b4_percent_define_default(VARIABLE, DEFAULT) # -------------------------------------------- @@ -516,15 +516,15 @@ m4_define([_b4_percent_define_check_values], [m4_define([b4_good_value], [1])])])])dnl m4_if(b4_good_value, [0], [b4_complain_at(b4_percent_define_get_loc([$1]), - [[invalid value for %%define variable `%s': `%s']], + [[invalid value for %%define variable '%s': '%s']], [$1], m4_dquote(m4_indir([b4_percent_define(]$1[)]))) m4_foreach([b4_value], m4_dquote(m4_shift($@)), [b4_complain_at(b4_percent_define_get_loc([$1]), - [[accepted value: `%s']], + [[accepted value: '%s']], m4_dquote(b4_value))])])dnl m4_popdef([b4_good_value])], - [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])]) + [b4_fatal([[undefined %%define variable '%s' passed to b4_percent_define_check_values]], [$1])])]) # b4_percent_code_get([QUALIFIER]) # -------------------------------- diff --git a/djgpp/subpipe.c b/djgpp/subpipe.c index f726b53d..f85e8f96 100644 --- a/djgpp/subpipe.c +++ b/djgpp/subpipe.c @@ -60,7 +60,7 @@ static char tmp_file_name[2][L_tmpnam]; do { \ close ((fd)); \ if (unlink ((name))) \ - error (EXIT_FAILURE, 0, _("removing of `%s' failed"), (name)); \ + error (EXIT_FAILURE, 0, _("removing of '%s' failed"), (name)); \ } while (0) @@ -231,17 +231,17 @@ end_of_output_subpipe(pid_t pid, int fd[2]) { remove_tmp_file(STDIN_FILENO, tmp_file_name[0]); remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]); - error(EXIT_FAILURE, 0, _("subsidiary program `%s' interrupted"), program); + error(EXIT_FAILURE, 0, _("subsidiary program '%s' interrupted"), program); } if (status) { remove_tmp_file(STDIN_FILENO, tmp_file_name[0]); remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]); error(EXIT_FAILURE, 0, _(errno == ENOENT - ? "subsidiary program `%s' not found" + ? "subsidiary program '%s' not found" : status < 1 - ? "subsidiary program `%s' failed" - : "subsidiary program `%s' failed (status=%i, errno=%i)"), program, status, errno); + ? "subsidiary program '%s' failed" + : "subsidiary program '%s' failed (status=%i, errno=%i)"), program, status, errno); } @@ -283,9 +283,9 @@ reap_subpipe(pid_t pid, char const *program) free(arguments); if (unlink(tmp_file_name[0])) - error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[0]); + error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[0]); if (unlink(tmp_file_name[1])) - error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[1]); + error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[1]); if (dup2(old_stdin, STDIN_FILENO) < 0) error(EXIT_FAILURE, 0, "restore of bison's stdin failed"); diff --git a/src/files.c b/src/files.c index 13eecf8e..aeaca4aa 100644 --- a/src/files.c +++ b/src/files.c @@ -109,7 +109,7 @@ xfopen (const char *name, const char *mode) ptr = fopen_safer (name, mode); if (!ptr) - error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name); + error (EXIT_FAILURE, get_errno (), _("cannot open file '%s'"), name); return ptr; } diff --git a/src/getargs.c b/src/getargs.c index 4e64f302..62147d49 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -418,13 +418,13 @@ language_argmatch (char const *arg, int prio, location loc) { int i; for (i = 0; valid_languages[i].language[0]; i++) - if (c_strcasecmp (arg, valid_languages[i].language) == 0) - { - language_prio = prio; - language = &valid_languages[i]; - return; - } - msg = _("invalid language `%s'"); + if (c_strcasecmp (arg, valid_languages[i].language) == 0) + { + language_prio = prio; + language = &valid_languages[i]; + return; + } + msg = _("invalid language '%s'"); } else if (language_prio == prio) msg = _("multiple language declarations are invalid"); @@ -679,9 +679,9 @@ getargs (int argc, char *argv[]) if (argc - optind != 1) { if (argc - optind < 1) - error (0, 0, _("missing operand after `%s'"), argv[argc - 1]); + error (0, 0, _("missing operand after '%s'"), argv[argc - 1]); else - error (0, 0, _("extra operand `%s'"), argv[optind + 1]); + error (0, 0, _("extra operand '%s'"), argv[optind + 1]); usage (EXIT_FAILURE); } diff --git a/src/muscle-tab.c b/src/muscle-tab.c index 302613a5..06f37d83 100644 --- a/src/muscle-tab.c +++ b/src/muscle-tab.c @@ -425,7 +425,7 @@ muscle_percent_define_insert (char const *variable, location variable_loc, free (variable_tr); return; } - complain_at (variable_loc, _("%%define variable `%s' redefined"), + complain_at (variable_loc, _("%%define variable '%s' redefined"), variable); complain_at (muscle_percent_define_get_loc (variable), _("previous definition")); @@ -467,7 +467,7 @@ muscle_percent_define_get_loc (char const *variable) char const *loc_name; loc_name = UNIQSTR_CONCAT ("percent_define_loc(", variable, ")"); if (!muscle_find_const (loc_name)) - fatal(_("undefined %%define variable `%s' passed to" + fatal(_("undefined %%define variable '%s' passed to" " muscle_percent_define_get_loc"), variable); return muscle_location_decode (loc_name); } @@ -481,7 +481,7 @@ muscle_percent_define_get_syncline (char const *variable) UNIQSTR_CONCAT ("percent_define_syncline(", variable, ")"); syncline = muscle_find_const (syncline_name); if (!syncline) - fatal(_("undefined %%define variable `%s' passed to" + fatal(_("undefined %%define variable '%s' passed to" " muscle_percent_define_get_syncline"), variable); return syncline; } @@ -527,13 +527,13 @@ muscle_percent_define_flag_if (char const *variable) { muscle_insert (invalid_boolean_name, ""); complain_at(muscle_percent_define_get_loc (variable), - _("invalid value for %%define Boolean variable `%s'"), + _("invalid value for %%define Boolean variable '%s'"), variable); } free (value); } else - fatal(_("undefined %%define variable `%s' passed to muscle_percent_define_flag_if"), + fatal(_("undefined %%define variable '%s' passed to muscle_percent_define_flag_if"), variable); return result; @@ -585,10 +585,10 @@ muscle_percent_define_check_values (char const * const *values) { location loc = muscle_percent_define_get_loc (*variablep); complain_at(loc, - _("invalid value for %%define variable `%s': `%s'"), + _("invalid value for %%define variable '%s': '%s'"), *variablep, value); for (values = variablep + 1; *values; ++values) - complain_at (loc, _("accepted value: `%s'"), *values); + complain_at (loc, _("accepted value: '%s'"), *values); } else { @@ -598,7 +598,7 @@ muscle_percent_define_check_values (char const * const *values) free (value); } else - fatal(_("undefined %%define variable `%s' passed to" + fatal(_("undefined %%define variable '%s' passed to" " muscle_percent_define_check_values"), *variablep); } diff --git a/src/reader.c b/src/reader.c index 942e8cfc..b3703eae 100644 --- a/src/reader.c +++ b/src/reader.c @@ -130,8 +130,8 @@ record_merge_function_type (int merger, uniqstr type, location declaration_loc) if (merge_function->type != NULL && !UNIQSTR_EQ (merge_function->type, type)) { complain_at (declaration_loc, - _("result type clash on merge function `%s': <%s> != <%s>"), - merge_function->name, type, merge_function->type); + _("result type clash on merge function '%s': <%s> != <%s>"), + merge_function->name, type, merge_function->type); complain_at (merge_function->type_declaration_location, _("previous declaration")); } diff --git a/tests/glr-regression.at b/tests/glr-regression.at index 7c4c814e..7e9202f5 100644 --- a/tests/glr-regression.at +++ b/tests/glr-regression.at @@ -1781,9 +1781,9 @@ main (void) ]]) AT_BISON_CHECK([[-o glr-regr18.c glr-regr18.y]], 1, [], -[glr-regr18.y:26.18-24: result type clash on merge function `merge': != +[glr-regr18.y:26.18-24: result type clash on merge function 'merge': != glr-regr18.y:25.18-24: previous declaration -glr-regr18.y:27.13-19: result type clash on merge function `merge': != +glr-regr18.y:27.13-19: result type clash on merge function 'merge': != glr-regr18.y:26.18-24: previous declaration ]) diff --git a/tests/input.at b/tests/input.at index 8bd3ba42..27fe4e78 100644 --- a/tests/input.at +++ b/tests/input.at @@ -837,10 +837,10 @@ AT_DATA([input-c.y], start: ; ]]) AT_BISON_CHECK([[input-c.y]], [[1]], [], -[[input-c.y:1.7: %code qualifier `q' is not used -input-c.y:2.7-9: %code qualifier `bad' is not used -input-c.y:3.7-9: %code qualifier `bad' is not used -input-c.y:4.7-12: %code qualifier `format' is not used +[[input-c.y:1.7: %code qualifier 'q' is not used +input-c.y:2.7-9: %code qualifier 'bad' is not used +input-c.y:3.7-9: %code qualifier 'bad' is not used +input-c.y:4.7-12: %code qualifier 'format' is not used ]]) AT_DATA([input-c-glr.y], @@ -851,9 +851,9 @@ AT_DATA([input-c-glr.y], start: ; ]]) AT_BISON_CHECK([[input-c-glr.y]], [[1]], [], -[[input-c-glr.y:1.7: %code qualifier `q' is not used -input-c-glr.y:2.7-9: %code qualifier `bad' is not used -input-c-glr.y:3.8-10: %code qualifier `bad' is not used +[[input-c-glr.y:1.7: %code qualifier 'q' is not used +input-c-glr.y:2.7-9: %code qualifier 'bad' is not used +input-c-glr.y:3.8-10: %code qualifier 'bad' is not used ]]) AT_DATA([input-c++.y], @@ -864,9 +864,9 @@ AT_DATA([input-c++.y], start: ; ]]) AT_BISON_CHECK([[input-c++.y]], [[1]], [], -[[input-c++.y:1.7: %code qualifier `q' is not used -input-c++.y:2.7-9: %code qualifier `bad' is not used -input-c++.y:3.8: %code qualifier `q' is not used +[[input-c++.y:1.7: %code qualifier 'q' is not used +input-c++.y:2.7-9: %code qualifier 'bad' is not used +input-c++.y:3.8: %code qualifier 'q' is not used ]]) AT_DATA([input-c++-glr.y], @@ -877,9 +877,9 @@ AT_DATA([input-c++-glr.y], start: ; ]]) AT_BISON_CHECK([[input-c++-glr.y]], [[1]], [], -[[input-c++-glr.y:1.7-9: %code qualifier `bad' is not used -input-c++-glr.y:2.7: %code qualifier `q' is not used -input-c++-glr.y:3.7: %code qualifier `q' is not used +[[input-c++-glr.y:1.7-9: %code qualifier 'bad' is not used +input-c++-glr.y:2.7: %code qualifier 'q' is not used +input-c++-glr.y:3.7: %code qualifier 'q' is not used ]]) AT_DATA([special-char-@@.y], @@ -890,9 +890,9 @@ AT_DATA([special-char-@@.y], start: ; ]]) AT_BISON_CHECK([[special-char-@@.y]], [[1]], [], -[[special-char-@@.y:1.7-9: %code qualifier `bad' is not used -special-char-@@.y:2.7: %code qualifier `q' is not used -special-char-@@.y:3.7: %code qualifier `q' is not used +[[special-char-@@.y:1.7-9: %code qualifier 'bad' is not used +special-char-@@.y:2.7: %code qualifier 'q' is not used +special-char-@@.y:3.7: %code qualifier 'q' is not used ]]) AT_DATA([special-char-@:>@.y], @@ -903,9 +903,9 @@ AT_DATA([special-char-@:>@.y], start: ; ]]) AT_BISON_CHECK([[special-char-@:>@.y]], [[1]], [], -[[special-char-@:>@.y:1.7-9: %code qualifier `bad' is not used -special-char-@:>@.y:2.7: %code qualifier `q' is not used -special-char-@:>@.y:3.7: %code qualifier `q' is not used +[[special-char-@:>@.y:1.7-9: %code qualifier 'bad' is not used +special-char-@:>@.y:2.7: %code qualifier 'q' is not used +special-char-@:>@.y:3.7: %code qualifier 'q' is not used ]]) AT_CLEANUP @@ -928,9 +928,9 @@ start: ; ]]) AT_BISON_CHECK([[input-redefined.y]], [[1]], [], -[[input-redefined.y:2.9-11: %define variable `var' redefined +[[input-redefined.y:2.9-11: %define variable 'var' redefined input-redefined.y:1.9-11: previous definition -input-redefined.y:3.10-12: %define variable `var' redefined +input-redefined.y:3.10-12: %define variable 'var' redefined input-redefined.y:2.9-11: previous definition ]]) @@ -941,7 +941,7 @@ start: ; ]]) AT_BISON_CHECK([[input-unused.y]], [[1]], [], -[[input-unused.y:1.9-11: %define variable `var' is not used +[[input-unused.y:1.9-11: %define variable 'var' is not used ]]) AT_CLEANUP @@ -985,7 +985,7 @@ AT_DATA([[input-dg.y]], start: ; ]]) AT_BISON_CHECK([[-Dvar=cmd-d input-dg.y]], [[1]], [], -[[input-dg.y:1.9-11: %define variable `var' redefined +[[input-dg.y:1.9-11: %define variable 'var' redefined :2: previous definition ]]) @@ -994,8 +994,8 @@ AT_DATA([[input-unused.y]], start: ; ]]) AT_BISON_CHECK([[-Dunused-d -Funused-f input-unused.y]], [[1]], [], -[[:2: %define variable `unused-d' is not used -:3: %define variable `unused-f' is not used +[[:2: %define variable 'unused-d' is not used +:3: %define variable 'unused-f' is not used ]]) AT_CLEANUP @@ -1015,7 +1015,7 @@ start: ; ]]) AT_BISON_CHECK([[Input.y]], [1], [], -[[Input.y:2.9-14: invalid value for %define Boolean variable `public' +[[Input.y:2.9-14: invalid value for %define Boolean variable 'public' ]]) AT_CLEANUP @@ -1033,10 +1033,10 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [[1]], [[]], -[[input.y:1.9-29: invalid value for %define variable `lr.default-reductions': `bogus' -input.y:1.9-29: accepted value: `most' -input.y:1.9-29: accepted value: `consistent' -input.y:1.9-29: accepted value: `accepting' +[[input.y:1.9-29: invalid value for %define variable 'lr.default-reductions': 'bogus' +input.y:1.9-29: accepted value: 'most' +input.y:1.9-29: accepted value: 'consistent' +input.y:1.9-29: accepted value: 'accepting' ]]) # Back-end. @@ -1046,10 +1046,10 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [1], [], -[[input.y:1.9-21: invalid value for %define variable `api.push-pull': `neither' -input.y:1.9-21: accepted value: `pull' -input.y:1.9-21: accepted value: `push' -input.y:1.9-21: accepted value: `both' +[[input.y:1.9-21: invalid value for %define variable 'api.push-pull': 'neither' +input.y:1.9-21: accepted value: 'pull' +input.y:1.9-21: accepted value: 'push' +input.y:1.9-21: accepted value: 'both' ]]) AT_CLEANUP @@ -1069,10 +1069,10 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [1], [], -[[input.y:1.9-21: invalid value for %define variable `api.push-pull': `neither' -input.y:1.9-21: accepted value: `pull' -input.y:1.9-21: accepted value: `push' -input.y:1.9-21: accepted value: `both' +[[input.y:1.9-21: invalid value for %define variable 'api.push-pull': 'neither' +input.y:1.9-21: accepted value: 'pull' +input.y:1.9-21: accepted value: 'push' +input.y:1.9-21: accepted value: 'both' ]]) AT_DATA([[input.y]], @@ -1081,7 +1081,7 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [1], [], -[[input.y:1.9-34: invalid value for %define Boolean variable `lr.keep-unreachable-states' +[[input.y:1.9-34: invalid value for %define Boolean variable 'lr.keep-unreachable-states' ]]) AT_DATA([[input.y]], @@ -1090,7 +1090,7 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [[1]], [], -[[input.y:1.9-15: %define variable `foo_bar' is not used +[[input.y:1.9-15: %define variable 'foo_bar' is not used ]]) AT_CLEANUP @@ -1115,7 +1115,7 @@ start: ; ]]) AT_BISON_CHECK([[input.y]], [[1]], [], -[[input.y:1.9-16: %define variable `api.pure' is not used +[[input.y:1.9-16: %define variable 'api.pure' is not used ]]) ]) @@ -1300,11 +1300,11 @@ start: ; # parse.lac.* options are useless if LAC isn't actually activated. AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 input.y]], [[1]], [], -[[:2: %define variable `parse.lac.es-capacity-initial' is not used +[[:2: %define variable 'parse.lac.es-capacity-initial' is not used ]]) AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]], [[1]], [], -[[:2: %define variable `parse.lac.memory-trace' is not used +[[:2: %define variable 'parse.lac.memory-trace' is not used ]]) AT_CLEANUP diff --git a/tests/push.at b/tests/push.at index 07879d8d..adb51358 100644 --- a/tests/push.at +++ b/tests/push.at @@ -163,7 +163,7 @@ start: ; ]]) AT_BISON_CHECK([[input.y]], [[1]], [], -[[input.y:2.9-21: %define variable `api.push-pull' is not used +[[input.y:2.9-21: %define variable 'api.push-pull' is not used ]]) AT_CLEANUP diff --git a/tests/skeletons.at b/tests/skeletons.at index f4157b26..eee57b0c 100644 --- a/tests/skeletons.at +++ b/tests/skeletons.at @@ -160,7 +160,7 @@ start: ; ]]) AT_BISON_CHECK([[input.y]], [[1]], [[]], -[[: invalid value for %define Boolean variable `foo' +[[: invalid value for %define Boolean variable 'foo' ]]) AT_CLEANUP @@ -228,7 +228,7 @@ start: ; ]]) AT_BISON_CHECK([[input3.y]], [[1]], [[]], -[[input3.y: fatal error: undefined %define variable `bogus' passed to b4_percent_define_get_loc +[[input3.y: fatal error: undefined %define variable 'bogus' passed to b4_percent_define_get_loc ]]) AT_DATA([[skel4.c]], @@ -242,7 +242,7 @@ start: ; ]]) AT_BISON_CHECK([[input4.y]], [[1]], [[]], -[[input4.y: fatal error: undefined %define variable `bogus' passed to b4_percent_define_get_syncline +[[input4.y: fatal error: undefined %define variable 'bogus' passed to b4_percent_define_get_syncline ]]) AT_CLEANUP -- 2.45.2