X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6e30ede87a1c39c53842a6a747ecd9f7484d92a5..7aa15a002657765f171865c11e368782f6109f7d:/src/files.c diff --git a/src/files.c b/src/files.c index 49e8379e..f698c7e9 100644 --- a/src/files.c +++ b/src/files.c @@ -1,7 +1,7 @@ /* Open and close files for Bison. - Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1986, 1989, 1992, 2000-2012 Free Software + Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -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; } @@ -125,7 +127,7 @@ xfclose (FILE *ptr) return; if (ferror (ptr)) - error (EXIT_FAILURE, 0, _("I/O error")); + error (EXIT_FAILURE, 0, _("input/output error")); if (fclose (ptr) != 0) error (EXIT_FAILURE, get_errno (), _("cannot close file")); @@ -205,7 +207,7 @@ file_name_split (const char *file_name, *base = last_component (file_name); /* Look for the extension, i.e., look for the last dot. */ - *ext = strrchr (*base, '.'); + *ext = mbsrchr (*base, '.'); *tab = NULL; /* If there is an extension, check if there is a `.tab' part right