X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6e30ede87a1c39c53842a6a747ecd9f7484d92a5..1cd5bad9b86930b35ad3e613f0277c8e825053f0:/src/files.c?ds=sidebyside diff --git a/src/files.c b/src/files.c index 49e8379e..31f38728 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; } @@ -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