From: Bruno Haible Date: Mon, 31 Jul 2006 16:41:58 +0000 (+0000) Subject: Rename strstr to c_strstr. X-Git-Tag: 0.16.x-branchpoint~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0fe58bf6ef03eb4c6fb0235f97c4c5f3089c347;p=thirdparty%2Fgettext.git Rename strstr to c_strstr. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index bcb690a09..def1444e7 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,7 @@ +2006-07-30 Bruno Haible + + * configure.ac: Don't test for the strstr function. + 2006-07-30 Bruno Haible * configure.ac: Update for changed location of javacomp.sh.in, diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index cad1d0764..3be63341f 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -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) diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 2710396e5..3e52e82c4 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,14 @@ +2006-07-30 Bruno Haible + + * 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 * xreadlink.c: Assume exists. diff --git a/gettext-tools/lib/javacomp.c b/gettext-tools/lib/javacomp.c index 859d0725b..d4dfac79d 100644 --- a/gettext-tools/lib/javacomp.c +++ b/gettext-tools/lib/javacomp.c @@ -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); diff --git a/gettext-tools/lib/propername.c b/gettext-tools/lib/propername.c index 9a707dabd..f66d828f4 100644 --- a/gettext-tools/lib/propername.c +++ b/gettext-tools/lib/propername.c @@ -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 diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 5f1d3606c..5a72a13dd 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,31 @@ +2006-07-30 Bruno Haible + + * 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 Exploit CPUs with multiple execution units. diff --git a/gettext-tools/src/msgcmp.c b/gettext-tools/src/msgcmp.c index 73c17fe20..6d905d126 100644 --- a/gettext-tools/src/msgcmp.c +++ b/gettext-tools/src/msgcmp.c @@ -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) { diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index c612f72aa..02167f1e5 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -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) { diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c index 3ae79b88a..eed4a6e8a 100644 --- a/gettext-tools/src/msgl-cat.c +++ b/gettext-tools/src/msgl-cat.c @@ -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) { diff --git a/gettext-tools/src/msgl-charset.c b/gettext-tools/src/msgl-charset.c index 53592b620..1bdae22d3 100644 --- a/gettext-tools/src/msgl-charset.c +++ b/gettext-tools/src/msgl-charset.c @@ -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) { diff --git a/gettext-tools/src/msgl-check.c b/gettext-tools/src/msgl-check.c index 618a1a3c5..efca51b99 100644 --- a/gettext-tools/src/msgl-check.c +++ b/gettext-tools/src/msgl-check.c @@ -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) { diff --git a/gettext-tools/src/msgl-iconv.c b/gettext-tools/src/msgl-iconv.c index c171fa41e..645f35cfe 100644 --- a/gettext-tools/src/msgl-iconv.c +++ b/gettext-tools/src/msgl-iconv.c @@ -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) { diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 4fb86a6d3..60f686010 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -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) { diff --git a/gettext-tools/src/po-charset.c b/gettext-tools/src/po-charset.c index 46d7bc5f2..f46cd409c 100644 --- a/gettext-tools/src/po-charset.c +++ b/gettext-tools/src/po-charset.c @@ -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) { diff --git a/gettext-tools/src/write-po.c b/gettext-tools/src/write-po.c index 2ace2b25a..1c474de49 100644 --- a/gettext-tools/src/write-po.c +++ b/gettext-tools/src/write-po.c @@ -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) { diff --git a/gettext-tools/src/write-stringtable.c b/gettext-tools/src/write-stringtable.c index 6b0dfa3d6..7a5fa5f0e 100644 --- a/gettext-tools/src/write-stringtable.c +++ b/gettext-tools/src/write-stringtable.c @@ -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 , 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); diff --git a/gettext-tools/src/x-python.c b/gettext-tools/src/x-python.c index 7a3d4b122..4e0c45929 100644 --- a/gettext-tools/src/x-python.c +++ b/gettext-tools/src/x-python.c @@ -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) { diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 531fd3790..7c0e29832 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -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;