bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strcasecmp


From: Paul Eggert
Subject: Re: strcasecmp
Date: Sun, 11 Feb 2007 22:12:53 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> It works fine if at least one argument is ASCII _and_ the locale is not
> a Turkish locale.

Thanks for mentioning this.  I didn't know that property of Turkish.
I installed this into Bison:

2007-02-11  Paul Eggert  <address@hidden>

        Undo my 2007-02-07 change, switching back to the c-strcase module
        introduced in the 2007-02-03 change.  Bruno Haible reported that
        the 2007-02-07 change would be dangerous in Turkish if we add a
        language whose name contains "i", since "i" is not lowercase "I"
        in Turkish.
        * bootstrap.conf (gnulib_modules): Add c-strcase.  Remove strcase.
        * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
        c-strcasecomp.c, c-strncasecmp.c.  Remove strcasecmp.c, strncasecmp.c.
        * m4/.cvsignore: Remove strcase.m4.
        * src/getargs.c: Revert 2007-02-07 change, as follows.
        Include c-strcase.h.
        (language_argmatch): Use c_strcasecmp rather than strcasecmp.

Index: bootstrap.conf
===================================================================
RCS file: /cvsroot/bison/bison/bootstrap.conf,v
retrieving revision 1.8
diff -u -p -r1.8 bootstrap.conf
--- bootstrap.conf      7 Feb 2007 20:37:29 -0000       1.8
+++ bootstrap.conf      12 Feb 2007 06:11:35 -0000
@@ -20,9 +20,10 @@

 # gnulib modules used by this package.
 gnulib_modules='
-       argmatch config-h configmake dirname error extensions fopen-safer
+       argmatch config-h c-strcase configmake
+       dirname error extensions fopen-safer
        getopt gettext hash inttypes javacomp-script javaexec-script malloc
-       mbswidth obstack quote quotearg stdbool stpcpy strcase strerror strtoul
+       mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
        strverscmp unistd unistd-safer unlocked-io verify xalloc xalloc-die
        xstrndup
 '
Index: lib/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/lib/.cvsignore,v
retrieving revision 1.26
diff -u -p -r1.26 .cvsignore
--- lib/.cvsignore      7 Feb 2007 20:37:29 -0000       1.26
+++ lib/.cvsignore      12 Feb 2007 06:11:35 -0000
@@ -4,6 +4,11 @@ Makefile.in
 argmatch.c
 argmatch.h
 basename.c
+c-ctype.c
+c-ctype.h
+c-strcase.h
+c-strcasecmp.c
+c-strncasecmp.c
 config.h
 config.hin
 configmake.h
@@ -46,12 +51,10 @@ stdint_.h
 stdio--.h
 stdio-safer.h
 stpcpy.c
-strcasecmp.c
 strerror.c
 string.h
 string_.h
 stripslash.c
-strncasecmp.c
 strndup.c
 strnlen.c
 strtol.c
Index: m4/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/m4/.cvsignore,v
retrieving revision 1.27
diff -u -p -r1.27 .cvsignore
--- m4/.cvsignore       7 Feb 2007 20:37:29 -0000       1.27
+++ m4/.cvsignore       12 Feb 2007 06:11:35 -0000
@@ -38,7 +38,6 @@ stdint.m4
 stdint_h.m4
 stdio-safer.m4
 stpcpy.m4
-strcase.m4
 strerror.m4
 string_h.m4
 strndup.m4
Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.91
diff -u -p -r1.91 getargs.c
--- src/getargs.c       7 Feb 2007 20:37:29 -0000       1.91
+++ src/getargs.c       12 Feb 2007 06:11:36 -0000
@@ -25,6 +25,7 @@
 #include "revision.h"

 #include <argmatch.h>
+#include <c-strcase.h>
 #include <configmake.h>
 #include <error.h>

@@ -366,7 +367,7 @@ language_argmatch (char const *arg, int 
     {
       int i;
       for (i = 0; valid_languages[i].language[0]; i++)
-       if (strcasecmp (arg, valid_languages[i].language) == 0)
+       if (c_strcasecmp (arg, valid_languages[i].language) == 0)
          {
            language_prio = prio;
            language = &valid_languages[i];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]