]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use c_strcasecmp instead of strcasecmp; needed for Turkish locale.
authorBruno Haible <bruno@clisp.org>
Tue, 8 Feb 2005 11:26:41 +0000 (11:26 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:10 +0000 (12:12 +0200)
gettext-tools/lib/Makefile.msvc
gettext-tools/lib/Makefile.vms
gettext-tools/src/ChangeLog
gettext-tools/src/msgcmp.c
gettext-tools/src/msginit.c
gettext-tools/src/msgmerge.c
gettext-tools/src/po-charset.c
gettext-tools/src/xgettext.c

index f606cd7b41c0ebcd5c8b8923e22a8aae1cb04eb1..8c5540c3ad2a41f3326679e7915580f2dab3a28f 100644 (file)
@@ -85,6 +85,8 @@ OBJECTS = \
   backupfile.obj addext.obj \
   basename.obj \
   c-ctype.obj \
+  c-strcasecmp.obj \
+  c-strncasecmp.obj \
   classpath.obj \
   closeout.obj \
   copy-file.obj \
@@ -156,6 +158,12 @@ basename.obj : basename.c
 c-ctype.obj : c-ctype.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-ctype.c
 
+c-strcasecmp.obj : c-strcasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-strcasecmp.c
+
+c-strncasecmp.obj : c-strncasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-strncasecmp.c
+
 classpath.obj : classpath.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c classpath.c
 
index e963897897d34c6e442d216c5a6b41f4092ccf25..65431e7242a83c22323cc562d041bbaf666296cc 100644 (file)
@@ -43,6 +43,8 @@ OBJECTS = \
   backupfile.obj, addext.obj, \
   basename.obj, \
   c-ctype.obj, \
+  c-strcasecmp.obj, \
+  c-strncasecmp.obj, \
   classpath.obj, \
   closeout.obj, \
   copy-file.obj, \
@@ -117,6 +119,12 @@ basename.obj : basename.c
 c-ctype.obj : c-ctype.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-ctype.c
 
+c-strcasecmp.obj : c-strcasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-strcasecmp.c
+
+c-strncasecmp.obj : c-strncasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-strncasecmp.c
+
 classpath.obj : classpath.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) classpath.c
 
index af51c49e837d14386f2594bd29c3e5e85496d849..670c2f91357aabcd266c5455521814b1423774c0 100644 (file)
@@ -1,3 +1,18 @@
+2005-02-07  Bruno Haible  <bruno@clisp.org>
+
+       Make the tools work in the tr_TR locale.
+       * po-charset.c: Include c-strcase.h instead of strcase.h.
+       (po_charset_canonicalize): Use c_strcasecmp.
+       * msgcmp.c: Include c-strcase.h instead of strcase.h.
+       (compare): Use c_strncasecmp.
+       * msginit.c: Include c-strcase.h instead of strcase.h.
+       (content_type): Use c_strcasecmp.
+       * msgmerge.c: Include c-strcase.h instead of strcase.h.
+       (message_merge, merge): Use c_strncasecmp.
+       * xgettext.c: Include c-strcase.h instead of strcase.h.
+       (language_to_extractor): Use c_strcasecmp.
+       Reported by Recai Oktas <roktas@omu.edu.tr>.
+
 2005-02-07  Bruno Haible  <bruno@clisp.org>
 
        * project-id: Use LC_ALL=C to protect range expression against
index 42f57909d0bf0a17675603ee77293bcb319b67f8..01776602958cc143f781ca56d5e4d39ac8b7a89a 100644 (file)
@@ -39,7 +39,7 @@
 #include "read-po.h"
 #include "msgl-iconv.h"
 #include "strstr.h"
-#include "strcase.h"
+#include "c-strcase.h"
 #include "gettext.h"
 
 #define _(str) gettext (str)
@@ -336,7 +336,7 @@ compare (const char *fn1, const char *fn2)
                      charsetstr += strlen ("charset=");
                      len = strcspn (charsetstr, " \t\n");
                      if (len == strlen ("UTF-8")
-                         && strncasecmp (charsetstr, "UTF-8", len) == 0)
+                         && c_strncasecmp (charsetstr, "UTF-8", len) == 0)
                        was_utf8 = true;
                    }
                }
index 8d69062aa390dd2c81c2f7f07774f7874d3cc20f..97926ebbf55fe14e7ca5f251015f4a74f215e759 100644 (file)
@@ -77,7 +77,7 @@
 #include "basename.h"
 #include "strpbrk.h"
 #include "strstr.h"
-#include "strcase.h"
+#include "c-strcase.h"
 #include "message.h"
 #include "read-po.h"
 #include "write-po.h"
@@ -1350,7 +1350,7 @@ content_type (const char *header)
       if (charsetstr != NULL)
        {
          charsetstr += strlen ("charset=");
-         was_utf8 = (strcasecmp (charsetstr, "UTF-8") == 0);
+         was_utf8 = (c_strcasecmp (charsetstr, "UTF-8") == 0);
        }
     }
   return xasprintf ("text/plain; charset=%s",
index 693b76d1d54b3c3fc599582a672bcd4f10df3986..500b235a180d7f994626688ada902406aa59839d 100644 (file)
@@ -44,7 +44,7 @@
 #include "obstack.h"
 #include "strstr.h"
 #include "exit.h"
-#include "strcase.h"
+#include "c-strcase.h"
 #include "stpcpy.h"
 #include "stpncpy.h"
 #include "msgl-iconv.h"
@@ -704,7 +704,7 @@ message_merge (message_ty *def, message_ty *ref)
          for (cnt = 0;
               cnt < sizeof (known_fields) / sizeof (known_fields[0]);
               ++cnt)
-           if (strncasecmp (cp, known_fields[cnt].name, known_fields[cnt].len)
+           if (c_strncasecmp (cp, known_fields[cnt].name, known_fields[cnt].len)
                == 0)
              break;
 
@@ -1165,7 +1165,7 @@ merge (const char *fn1, const char *fn2, msgdomain_list_ty **defp)
                      charsetstr += strlen ("charset=");
                      len = strcspn (charsetstr, " \t\n");
                      if (len == strlen ("UTF-8")
-                         && strncasecmp (charsetstr, "UTF-8", len) == 0)
+                         && c_strncasecmp (charsetstr, "UTF-8", len) == 0)
                        was_utf8 = true;
                    }
                }
index ec7906d7a6636c42a176769afa41841f2395a3d4..b7533d6fe6d4773633276750a793bb93eafc192a 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset handling while reading PO files.
-   Copyright (C) 2001-2004 Free Software Foundation, Inc.
+   Copyright (C) 2001-2005 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,7 +34,7 @@
 #include "basename.h"
 #include "progname.h"
 #include "strstr.h"
-#include "strcase.h"
+#include "c-strcase.h"
 #include "gettext.h"
 
 #define _(str) gettext (str)
@@ -107,7 +107,7 @@ po_charset_canonicalize (const char *charset)
   size_t i;
 
   for (i = 0; i < SIZEOF (standard_charsets); i++)
-    if (strcasecmp (charset, standard_charsets[i]) == 0)
+    if (c_strcasecmp (charset, standard_charsets[i]) == 0)
       return standard_charsets[i < 3 ? 0 : i < 27 ? ((i - 3) & ~1) + 3 : i];
   return NULL;
 }
index e63bdc22fea8f5317b3c1785cab7690d0d9789ed..eb035f91b5efd7b3971c70555ca8162bef5637c1 100644 (file)
@@ -49,7 +49,7 @@
 #include "xerror.h"
 #include "exit.h"
 #include "pathname.h"
-#include "strcase.h"
+#include "c-strcase.h"
 #include "stpcpy.h"
 #include "open-po.h"
 #include "read-po-abstract.h"
@@ -2241,7 +2241,7 @@ language_to_extractor (const char *name)
   table_ty *tp;
 
   for (tp = table; tp < ENDOF(table); ++tp)
-    if (strcasecmp (name, tp->name) == 0)
+    if (c_strcasecmp (name, tp->name) == 0)
       {
        extractor_ty result;