From 4aa9d1ff9ca9b838fe02a9bfe5ae4b0f935e5451 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 16 Jan 2012 19:36:41 +0100 Subject: 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. --- data/bison.m4 | 20 +++++------ djgpp/subpipe.c | 14 ++++---- src/files.c | 2 +- src/getargs.c | 6 ++-- src/muscle-tab.c | 16 ++++----- src/reader.c | 2 +- tests/glr-regression.at | 4 +-- tests/input.at | 88 ++++++++++++++++++++++++------------------------- tests/push.at | 2 +- tests/skeletons.at | 6 ++-- 10 files changed, 80 insertions(+), 80 deletions(-) diff --git a/data/bison.m4 b/data/bison.m4 index c697368f..7dfb1a72 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -88,7 +88,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], [], @@ -117,7 +117,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: # @@ -542,7 +542,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 @@ -598,7 +598,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) # ---------------------------------------- @@ -615,7 +615,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]) # ------------------------------------------------------ @@ -656,10 +656,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) @@ -723,15 +723,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 a346c316..66d92185 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 15e1188f..5fa3c452 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -421,7 +421,7 @@ language_argmatch (char const *arg, int prio, location loc) language = &valid_languages[i]; return; } - msg = _("invalid language `%s'"); + 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 20dcf89e..e366d33b 100644 --- a/src/muscle-tab.c +++ b/src/muscle-tab.c @@ -439,7 +439,7 @@ muscle_percent_define_insert (char const *variable, location variable_loc, atoi (muscle_find_const (how_name)); if (how_old == MUSCLE_PERCENT_DEFINE_F) 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")); @@ -503,7 +503,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); } @@ -517,7 +517,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; } @@ -563,13 +563,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; @@ -621,10 +621,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 { @@ -634,7 +634,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 ce5e92ff..60fe7bd0 100644 --- a/src/reader.c +++ b/src/reader.c @@ -130,7 +130,7 @@ 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>"), + _("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 0e3dc6e1..070199ee 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 a4ce4b72..6a2bcdcc 100644 --- a/tests/input.at +++ b/tests/input.at @@ -832,10 +832,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], @@ -846,9 +846,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], @@ -859,9 +859,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], @@ -872,9 +872,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], @@ -885,9 +885,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], @@ -898,9 +898,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 @@ -923,9 +923,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 ]]) @@ -936,7 +936,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 @@ -980,7 +980,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 ]]) @@ -989,8 +989,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 @@ -1010,7 +1010,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 @@ -1028,10 +1028,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. @@ -1041,10 +1041,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 @@ -1064,10 +1064,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]], @@ -1076,7 +1076,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]], @@ -1086,7 +1086,7 @@ AT_DATA([[input.y]], start: ; ]]) AT_BISON_CHECK([[input.y]], [1], [], -[[input.y:2.9-21: %define variable `api.namespace' redefined +[[input.y:2.9-21: %define variable 'api.namespace' redefined input.y:1.9-17: previous definition ]]) @@ -1096,7 +1096,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 @@ -1121,7 +1121,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 ]]) ]) @@ -1306,11 +1306,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 -- cgit v1.2.1