]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Rename strstr to c_strstr.
authorBruno Haible <bruno@clisp.org>
Mon, 31 Jul 2006 16:41:58 +0000 (16:41 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:44 +0000 (12:13 +0200)
18 files changed:
gettext-tools/ChangeLog
gettext-tools/configure.ac
gettext-tools/lib/ChangeLog
gettext-tools/lib/javacomp.c
gettext-tools/lib/propername.c
gettext-tools/src/ChangeLog
gettext-tools/src/msgcmp.c
gettext-tools/src/msginit.c
gettext-tools/src/msgl-cat.c
gettext-tools/src/msgl-charset.c
gettext-tools/src/msgl-check.c
gettext-tools/src/msgl-iconv.c
gettext-tools/src/msgmerge.c
gettext-tools/src/po-charset.c
gettext-tools/src/write-po.c
gettext-tools/src/write-stringtable.c
gettext-tools/src/x-python.c
gettext-tools/src/xgettext.c

index bcb690a09af86621bf9620fef092d8f3c835f527..def1444e77bc93dc0ec70f801ac2c494eb75f089 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-30  Bruno Haible  <bruno@clisp.org>
+
+       * configure.ac: Don't test for the strstr function.
+
 2006-07-30  Bruno Haible  <bruno@clisp.org>
 
        * configure.ac: Update for changed location of javacomp.sh.in,
index cad1d076437566d21e12d773a81a1536d9560e32..3be63341fe9f2bdd6c8a7d2118b4e0f5a6c20e0f 100644 (file)
@@ -157,8 +157,7 @@ dnl Checks for library functions.
 gl_ALLOCSA
 AC_CHECK_FUNCS([chown getcwd posix_spawn raise select strerror strtoul uname \
 utime utimes waitid])
-AC_REPLACE_FUNCS([atexit memmove memset stpcpy strcspn \
-strpbrk strstr vasprintf])
+AC_REPLACE_FUNCS([atexit memmove memset stpcpy strcspn strpbrk vasprintf])
 AM_FUNC_GETLINE
 if test $am_cv_func_working_getline != yes; then
   AC_CHECK_FUNCS(getdelim)
index 2710396e51944c3609aa1aaa5c784e3fb9d1e2a7..3e52e82c44525cf1056566e97b5536d48a3a7222 100644 (file)
@@ -1,3 +1,14 @@
+2006-07-30  Bruno Haible  <bruno@clisp.org>
+
+       * c-strstr.h: Renamed from strstr.h. Don't test HAVE_STRSTR.
+       (c_strstr): Renamed from strstr.
+       * c-strstr.c: Renamed from strstr.c.
+       (c_strstr): Renamed from strstr.
+       * javacomp.c: Include c-strstr.h instead of strstr.h.
+       (is_envjavac_gcj): Use c_strstr instead of strstr.
+       * propername.c: Include c-strstr.h.
+       (proper_name_utf8): Use c_strstr instead of strstr.
+
 2006-07-29  Bruno Haible  <bruno@clisp.org>
 
        * xreadlink.c: Assume <stdlib.h> exists.
index 859d0725b501d8663af35464a62ba8ebe20ee65b..d4dfac79de4f595bdd83f75355669e731da0ff96 100644 (file)
@@ -50,7 +50,7 @@
 #include "clean-temp.h"
 #include "error.h"
 #include "xvasprintf.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "gettext.h"
 
 #define _(str) gettext (str)
@@ -570,7 +570,7 @@ is_envjavac_gcj (const char *javac)
          fclose (fp);
          goto failed;
        }
-      envjavac_gcj = (strstr (line, "gcj") != NULL);
+      envjavac_gcj = (c_strstr (line, "gcj") != NULL);
 
       fclose (fp);
 
index 9a707dabd2eaffb9d6ccb92499a53b0167a96980..f66d828f45d1c2274b0fadd1c219fad159203451 100644 (file)
@@ -33,6 +33,7 @@
 #include "localcharset.h"
 #include "c-strcase.h"
 #include "iconvstring.h"
+#include "c-strstr.h"
 #include "strstr.h"
 #include "xalloc.h"
 #include "gettext.h"
@@ -159,7 +160,7 @@ proper_name_utf8 (const char *name_ascii, const char *name_utf8)
     {
       /* See whether the translation contains the original name.
         A multibyte-aware strstr() is not absolutely necessary here.  */
-      if (strstr (translation, name_ascii) != NULL
+      if (c_strstr (translation, name_ascii) != NULL
          || (name_converted != NULL
              && strstr (translation, name_converted) != NULL)
          || (name_converted_translit != NULL
index 5f1d3606c0db002359d3ff680a7c05f1055eaa98..5a72a13dd83ba5b3a1c443c8e90ccf2ca91ecc3a 100644 (file)
@@ -1,3 +1,31 @@
+2006-07-30  Bruno Haible  <bruno@clisp.org>
+
+       * msgl-cat.c: Include c-strstr.h instead of strstr.h.
+       (catenate_msgdomain_list): Use c_strstr instead of strstr.
+       * msgl-charset.c: Include c-strstr.h instead of strstr.h.
+       (compare_po_locale_charsets): Use c_strstr instead of strstr.
+       * msgl-check.c: Include c-strstr.h instead of strstr.h.
+       (plural_help, check_plural, check_header_entry): Use c_strstr instead
+       of strstr.
+       * msgl-iconv.c: Include c-strstr.h instead of strstr.h.
+       (iconv_message_list): Use c_strstr instead of strstr.
+       * po-charset.c: Include c-strstr.h instead of strstr.h.
+       (po_lex_charset_set): Use c_strstr instead of strstr.
+       * write-po.c: Include c-strstr.h instead of strstr.h.
+       (msgdomain_list_print_po): Use c_strstr instead of strstr.
+       * write-stringtable.c: Include c-strstr.h instead of strstr.h.
+       (write_message): Use c_strstr instead of strstr.
+       * msgcmp.c: Include c-strstr.h instead of strstr.h.
+       (compare): Use c_strstr instead of strstr.
+       * msginit.c: Include c-strstr.h instead of strstr.h.
+       (content_type): Use c_strstr instead of strstr.
+       * msgmerge.c: Include c-strstr.h instead of strstr.h.
+       (message_merge, merge): Use c_strstr instead of strstr.
+       * x-python.c: Include c-strstr.h instead of strstr.h.
+       (try_to_extract_coding): Use c_strstr instead of strstr.
+       * xgettext.c: Include c-strstr.h instead of strstr.h.
+       (remember_a_message, finalize_header): Use c_strstr instead of strstr.
+
 2006-07-23  Bruno Haible  <bruno@clisp.org>
 
        Exploit CPUs with multiple execution units.
index 73c17fe202628cc8bc72458363161214be878bb9..6d905d126f293d8921115e577ede5144c9becb95 100644 (file)
@@ -38,7 +38,7 @@
 #include "exit.h"
 #include "read-po.h"
 #include "msgl-iconv.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "c-strcase.h"
 #include "propername.h"
 #include "gettext.h"
@@ -331,7 +331,7 @@ compare (const char *fn1, const char *fn2)
 
              if (header != NULL)
                {
-                 const char *charsetstr = strstr (header, "charset=");
+                 const char *charsetstr = c_strstr (header, "charset=");
 
                  if (charsetstr != NULL)
                    {
index c612f72aa06d76692c4bb0d6f2a3c65c45f3a426..02167f1e5990157d6ab1e33da3fa652578237901 100644 (file)
@@ -56,7 +56,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "strpbrk.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "c-strcase.h"
 #include "message.h"
 #include "read-po.h"
@@ -1151,7 +1151,7 @@ content_type (const char *header)
   old_field = get_field (header, "Content-Type");
   if (old_field != NULL)
     {
-      const char *charsetstr = strstr (old_field, "charset=");
+      const char *charsetstr = c_strstr (old_field, "charset=");
 
       if (charsetstr != NULL)
        {
index 3ae79b88aeff2a8de6ed4989519f84cee8ddd74c..eed4a6e8af0662ddabea7d6b5fee1235d07fe295 100644 (file)
@@ -40,7 +40,7 @@
 #include "msgl-iconv.h"
 #include "xalloc.h"
 #include "xallocsa.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "basename.h"
 #include "exit.h"
 #include "gettext.h"
@@ -144,7 +144,7 @@ catenate_msgdomain_list (string_list_ty *file_list, const char *to_code)
 
                    if (header != NULL)
                      {
-                       const char *charsetstr = strstr (header, "charset=");
+                       const char *charsetstr = c_strstr (header, "charset=");
 
                        if (charsetstr != NULL)
                          {
@@ -237,7 +237,7 @@ domain \"%s\" in input file `%s' doesn't contain a header entry with a charset s
 
                if (header != NULL)
                  {
-                   const char *cp = strstr (header, "Project-Id-Version:");
+                   const char *cp = c_strstr (header, "Project-Id-Version:");
 
                    if (cp != NULL)
                      {
index 53592b6201deb0cc8e76749ba8f115871c51b589..1bdae22d34bd7f1a4bdfccb85d9b150ef170945c 100644 (file)
@@ -37,7 +37,7 @@
 #include "xerror.h"
 #include "xvasprintf.h"
 #include "message.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "exit.h"
 #include "gettext.h"
 
@@ -68,7 +68,7 @@ compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
 
            if (header != NULL)
              {
-               const char *charsetstr = strstr (header, "charset=");
+               const char *charsetstr = c_strstr (header, "charset=");
 
                if (charsetstr != NULL)
                  {
index 618a1a3c5bbb08a1f20570774bd05901ad3af6a9..efca51b993331719e2e1135b5528dad4b32b42eb 100644 (file)
@@ -38,7 +38,7 @@
 #include "plural-exp.h"
 #include "plural-eval.h"
 #include "plural-table.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "vasprintf.h"
 #include "exit.h"
 #include "message.h"
@@ -172,7 +172,7 @@ plural_help (const char *nullentry)
   const char *language;
   size_t j;
 
-  language = strstr (nullentry, "Language-Team: ");
+  language = c_strstr (nullentry, "Language-Team: ");
   if (language != NULL)
     {
       language += 15;
@@ -260,8 +260,8 @@ check_plural (message_list_ty *mlp, unsigned char **plural_distribution)
 
       nullentry = header->msgstr;
 
-      plural = strstr (nullentry, "plural=");
-      nplurals = strstr (nullentry, "nplurals=");
+      plural = c_strstr (nullentry, "plural=");
+      nplurals = c_strstr (nullentry, "nplurals=");
       if (plural == NULL && has_plural != NULL)
        {
          const char *msg1 =
@@ -656,7 +656,7 @@ check_header_entry (const message_ty *mp, const char *msgstr_string)
 
   for (cnt = 0; cnt < nfields; ++cnt)
     {
-      char *endp = strstr (msgstr_string, required_fields[cnt]);
+      char *endp = c_strstr (msgstr_string, required_fields[cnt]);
 
       if (endp == NULL)
        {
index c171fa41ec379ab8dabab926a640169a9623bc16..645f35cfe6ec23351ed212e3fa1f98d20012d5d5 100644 (file)
@@ -41,7 +41,7 @@
 #include "msgl-ascii.h"
 #include "xalloc.h"
 #include "xallocsa.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "xvasprintf.h"
 #include "po-xerror.h"
 #include "gettext.h"
@@ -178,7 +178,7 @@ iconv_message_list (message_list_ty *mlp,
 
        if (header != NULL)
          {
-           const char *charsetstr = strstr (header, "charset=");
+           const char *charsetstr = c_strstr (header, "charset=");
 
            if (charsetstr != NULL)
              {
index 4fb86a6d3bf36f3208a9e7564721655ecd7acf36..60f68601013202191a5670f938191362f10ad262 100644 (file)
@@ -42,7 +42,7 @@
 #include "format.h"
 #include "xalloc.h"
 #include "obstack.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "exit.h"
 #include "c-strcase.h"
 #include "stpcpy.h"
@@ -876,7 +876,7 @@ message_merge (message_ty *def, message_ty *ref)
       {
        const char *msgid_bugs_ptr;
 
-       msgid_bugs_ptr = strstr (ref->msgstr, "Report-Msgid-Bugs-To:");
+       msgid_bugs_ptr = c_strstr (ref->msgstr, "Report-Msgid-Bugs-To:");
        if (msgid_bugs_ptr != NULL)
          {
            size_t msgid_bugs_len;
@@ -906,7 +906,7 @@ message_merge (message_ty *def, message_ty *ref)
       {
        const char *pot_date_ptr;
 
-       pot_date_ptr = strstr (ref->msgstr, "POT-Creation-Date:");
+       pot_date_ptr = c_strstr (ref->msgstr, "POT-Creation-Date:");
        if (pot_date_ptr != NULL)
          {
            size_t pot_date_len;
@@ -1346,7 +1346,7 @@ merge (const char *fn1, const char *fn2, msgdomain_list_ty **defp)
 
              if (header != NULL)
                {
-                 const char *charsetstr = strstr (header, "charset=");
+                 const char *charsetstr = c_strstr (header, "charset=");
 
                  if (charsetstr != NULL)
                    {
index 46d7bc5f2fc7c0d0db785bbd98d8fa5220e6d0a9..f46cd409c3631d50e4d6d43b0c873f0276631164 100644 (file)
@@ -33,7 +33,7 @@
 #include "po-xerror.h"
 #include "basename.h"
 #include "progname.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "c-strcase.h"
 #include "gettext.h"
 
@@ -461,7 +461,7 @@ po_lex_charset_set (const char *header_entry, const char *filename)
        0x5C bytes in the PO lexer,
      2. so that at run time, gettext() can call iconv() to convert
        msgstr.  */
-  const char *charsetstr = strstr (header_entry, "charset=");
+  const char *charsetstr = c_strstr (header_entry, "charset=");
 
   if (charsetstr != NULL)
     {
index 2ace2b25a5058f85ea8f52718b91ae0ae1013fb5..1c474de49bbc79066247d6802bb4006a269be840 100644 (file)
@@ -43,7 +43,7 @@
 #include "write-stringtable.h"
 #include "xalloc.h"
 #include "xallocsa.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "fwriteerror.h"
 #include "error-progname.h"
 #include "xvasprintf.h"
@@ -1036,7 +1036,7 @@ msgdomain_list_print_po (msgdomain_list_ty *mdlp, FILE *fp, bool debug)
       allocated_charset = NULL;
       if (header != NULL)
        {
-         const char *charsetstr = strstr (header, "charset=");
+         const char *charsetstr = c_strstr (header, "charset=");
 
          if (charsetstr != NULL)
            {
index 6b0dfa3d62434cf96f494efa19c999e9f974cea0..7a5fa5f0e0e049aaefc07e0929b6ec651d00ccf8 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -32,7 +32,7 @@
 #include "msgl-ascii.h"
 #include "msgl-iconv.h"
 #include "po-charset.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "write-po.h"
 
 /* The format of NeXTstep/GNUstep .strings files is documented in
@@ -112,7 +112,7 @@ write_message (FILE *fp, const message_ty *mp, size_t page_width, bool debug)
 
          /* Test whether it is safe to output the comment in C style, or
             whether we need C++ style for it.  */
-         if (strstr (s, "*/") == NULL)
+         if (c_strstr (s, "*/") == NULL)
            {
              fputs ("/*", fp);
              if (*s != '\0' && *s != '\n' && *s != ' ')
@@ -155,7 +155,7 @@ write_message (FILE *fp, const message_ty *mp, size_t page_width, bool debug)
 
          /* Test whether it is safe to output the comment in C style, or
             whether we need C++ style for it.  */
-         if (strstr (s, "*/") == NULL)
+         if (c_strstr (s, "*/") == NULL)
            {
              fputs ("/* Comment: ", fp);
              fputs (s, fp);
@@ -237,7 +237,7 @@ write_message (FILE *fp, const message_ty *mp, size_t page_width, bool debug)
 
          /* Output the msgstr as a comment, so that at runtime
             propertyListFromStringsFileFormat ignores it.  */
-         if (strstr (mp->msgstr, "*/") == NULL)
+         if (c_strstr (mp->msgstr, "*/") == NULL)
            {
              fputs (" /* = ", fp);
              write_escaped_string (fp, mp->msgstr);
index 7a3d4b122a003d2d62b6eff0f0a0d41fe077dcb3..4e0c45929660001387ae6df8add74bc9b01f723a 100644 (file)
@@ -39,7 +39,7 @@
 #include "xvasprintf.h"
 #include "xalloc.h"
 #include "exit.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "c-ctype.h"
 #include "po-charset.h"
 #include "uniname.h"
@@ -639,7 +639,7 @@ This version was built without iconv()."),
 static inline void
 try_to_extract_coding (const char *comment)
 {
-  const char *p = strstr (comment, "coding");
+  const char *p = c_strstr (comment, "coding");
 
   if (p != NULL)
     {
index 531fd3790a25890cd6db1d6af1d6abf9d9ee2e2c..7c0e29832d086ae7c9e7a4c79e06da55b1d03316 100644 (file)
@@ -46,7 +46,7 @@
 #include "xvasprintf.h"
 #include "xalloc.h"
 #include "xallocsa.h"
-#include "strstr.h"
+#include "c-strstr.h"
 #include "xerror.h"
 #include "exit.h"
 #include "pathname.h"
@@ -2077,7 +2077,7 @@ meta information, not the empty string.\n")));
        /* To reduce the possibility of unwanted matches we do a two
           step match: the line must contain `xgettext:' and one of
           the possible format description strings.  */
-       if ((t = strstr (s, "xgettext:")) != NULL)
+       if ((t = c_strstr (s, "xgettext:")) != NULL)
          {
            bool tmp_fuzzy;
            enum is_format tmp_format[NFORMATS];
@@ -2848,7 +2848,7 @@ finalize_header (msgdomain_list_ty *mdlp)
        message_ty *header =
          message_list_search (mdlp->item[0]->messages, NULL, "");
        if (header != NULL
-           && strstr (header->msgstr, "Plural-Forms:") == NULL)
+           && c_strstr (header->msgstr, "Plural-Forms:") == NULL)
          {
            size_t insertpos = strlen (header->msgstr);
            const char *suffix;