mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
use a more consistent quoting style.
See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
Use quotearg as often as possible instead of leaving the choice of
the quotes to the translators. Use shorter messages. Factor similar
messages to a single format, to make localization easier.
* src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
* src/scan-code.l, src/scan-gram.l, src/symtab.c:
Use quote() or quotearg_colon() on printf arguments instead of
quotes in the format string.
* data/bison.m4: Keep sync with the changes in muscle-tab.c.
* tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
expected messages.
(cherry picked from commit 4a9cd8f24a)
Conflicts:
src/muscle-tab.c
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <dirname.h>
|
||||
#include <get-errno.h>
|
||||
#include <quote.h>
|
||||
#include <quotearg.h>
|
||||
#include <stdio-safer.h>
|
||||
#include <xstrndup.h>
|
||||
|
||||
@@ -109,7 +110,8 @@ 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 (),
|
||||
_("%s: cannot open"), quotearg_colon (name));
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user