]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use mbsstr instead of strstr.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Mar 2007 22:17:49 +0000 (22:17 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:42 +0000 (12:14 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/propername.c
gnulib-local/modules/propername

index a8e54834cb48222253fb1855c16bb236a7ad22f7..400d5d1a3e62502a06de1647475649036af61065 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-04  Bruno Haible  <bruno@clisp.org>
+
+       * lib/propername.c (proper_name, proper_name_utf8): Use mbsstr instead
+       of strstr.
+       * modules/propername (Depends-on): Remove strstr. Add mbsstr.
+
 2007-03-04  Bruno Haible  <bruno@clisp.org>
 
        Moved --enable-relocatable infrastructure to gnulib.
index 7a7f4bcd873ca97df0d26e86817471b08fc74cd4..bc9818e03ab77b3f6fd45241e02c3587f1ce6d53 100644 (file)
@@ -47,7 +47,7 @@ proper_name (const char *name)
   if (translation != name)
     {
       /* See whether the translation contains the original name.  */
-      if (strstr (translation, name) != NULL)
+      if (mbsstr (translation, name) != NULL)
        return translation;
       else
        {
@@ -121,9 +121,9 @@ proper_name_utf8 (const char *name_ascii, const char *name_utf8)
         The multibyte-aware mbsstr() is not absolutely necessary here.  */
       if (c_strstr (translation, name_ascii) != NULL
          || (name_converted != NULL
-             && strstr (translation, name_converted) != NULL)
+             && mbsstr (translation, name_converted) != NULL)
          || (name_converted_translit != NULL
-             && strstr (translation, name_converted_translit) != NULL))
+             && mbsstr (translation, name_converted_translit) != NULL))
        {
          if (alloc_name_converted != NULL)
            free (alloc_name_converted);
index 4ab93eb07a02bb3d9e8e9aa7fc36d12917ee63b7..7fca804dd3e440abb0c9d084cbe77fef4c8793e8 100644 (file)
@@ -11,7 +11,7 @@ localcharset
 c-strcase
 xstriconv
 c-strstr
-strstr
+mbsstr
 xalloc
 gettext-h