2006-09-13 [wwp] 2.4.0cvs182
authorTristan Chabredier <wwp@claws-mail.org>
Wed, 13 Sep 2006 13:09:16 +0000 (13:09 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Wed, 13 Sep 2006 13:09:16 +0000 (13:09 +0000)
* configure.ac
* src/common/utils.h
* src/common/utils.c
get rid of unused wide-char functions.

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/common/utils.h

index 762dce13fd6ff75164f2ec74c0d0dcd43626603f..7804bf9021df85489a2cb85baa59c54744906f46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-13 [wwp]       2.4.0cvs182
+
+       * configure.ac
+       * src/common/utils.h
+       * src/common/utils.c
+               get rid of unused wide-char functions.
+
 2006-09-13 [wwp]       2.4.0cvs181
 
        * src/plugins/pgpinline/sylpheed.def
 2006-09-13 [wwp]       2.4.0cvs181
 
        * src/plugins/pgpinline/sylpheed.def
index a96576daea4c65d785953189a199cbf26d53bdc2..e9a2c11031fd407c6ae8b936599212a75c6d9a57 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.87.2.29 -r 1.87.2.30 src/folder.h;  cvs diff -u -r 1.274.2.149 -r 1.274.2.150 src/mainwindow.c;  cvs diff -u -r 1.395.2.247 -r 1.395.2.248 src/summaryview.c;  cvs diff -u -r 1.68.2.25 -r 1.68.2.26 src/summaryview.h;  ) > 2.4.0cvs179.patchset
 ( cvs diff -u -r 1.204.2.100 -r 1.204.2.101 src/prefs_common.c;  ) > 2.4.0cvs180.patchset
 ( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpinline/sylpheed.def;  cvs diff -u -r 1.96.2.146 -r 1.96.2.147 src/textview.c;  ) > 2.4.0cvs181.patchset
 ( cvs diff -u -r 1.87.2.29 -r 1.87.2.30 src/folder.h;  cvs diff -u -r 1.274.2.149 -r 1.274.2.150 src/mainwindow.c;  cvs diff -u -r 1.395.2.247 -r 1.395.2.248 src/summaryview.c;  cvs diff -u -r 1.68.2.25 -r 1.68.2.26 src/summaryview.h;  ) > 2.4.0cvs179.patchset
 ( cvs diff -u -r 1.204.2.100 -r 1.204.2.101 src/prefs_common.c;  ) > 2.4.0cvs180.patchset
 ( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpinline/sylpheed.def;  cvs diff -u -r 1.96.2.146 -r 1.96.2.147 src/textview.c;  ) > 2.4.0cvs181.patchset
+( cvs diff -u -r 1.654.2.1920 -r 1.654.2.1921 configure.ac;  cvs diff -u -r 1.20.2.37 -r 1.20.2.38 src/common/utils.h;  cvs diff -u -r 1.36.2.77 -r 1.36.2.78 src/common/utils.c;  ) > 2.4.0cvs182.patchset
index 73c11a7474a1610475d458015f106fba3d9d7807..40bf25918de37f36743eedf3fe3db668b4f4b7ed 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=181
+EXTRA_VERSION=182
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -276,8 +276,6 @@ AC_CHECK_SIZEOF(unsigned long, 4)
 dnl Checks for library functions.
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
 dnl Checks for library functions.
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
-              wcsstr wcswcs iswalnum iswspace towlower \
-              wcslen wcscpy wcsncpy \
               uname flock lockf inet_aton inet_addr \
               fchmod mkstemp truncate getuid regcomp)
 
               uname flock lockf inet_aton inet_addr \
               fchmod mkstemp truncate getuid regcomp)
 
index bd3fc89a8c9bf1e25281ba3a72f6c28e42a799fc..2c604d6e93371f1039e0373b41027a27f40d53d5 100644 (file)
@@ -559,210 +559,6 @@ gchar *strncpy2(gchar *dest, const gchar *src, size_t n)
        return dest;
 }
 
        return dest;
 }
 
-#if !HAVE_ISWALNUM
-int iswalnum(wint_t wc)
-{
-       return g_ascii_isalnum((int)wc);
-}
-#endif
-
-#if !HAVE_ISWSPACE
-int iswspace(wint_t wc)
-{
-       return g_ascii_isspace((int)wc);
-}
-#endif
-
-#if !HAVE_TOWLOWER
-wint_t towlower(wint_t wc)
-{
-       if (wc >= L'A' && wc <= L'Z')
-               return wc + L'a' - L'A';
-
-       return wc;
-}
-#endif
-
-#if !HAVE_WCSLEN
-size_t wcslen(const wchar_t *s)
-{
-       size_t len = 0;
-
-       while (*s != L'\0')
-               ++len, ++s;
-
-       return len;
-}
-#endif
-
-#if !HAVE_WCSCPY
-/* Copy SRC to DEST.  */
-wchar_t *wcscpy(wchar_t *dest, const wchar_t *src)
-{
-       wint_t c;
-       wchar_t *s = dest;
-
-       do {
-               c = *src++;
-               *dest++ = c;
-       } while (c != L'\0');
-
-       return s;
-}
-#endif
-
-#if !HAVE_WCSNCPY
-/* Copy no more than N wide-characters of SRC to DEST.  */
-wchar_t *wcsncpy (wchar_t *dest, const wchar_t *src, size_t n)
-{
-       wint_t c;
-       wchar_t *s = dest;
-
-       do {
-               c = *src++;
-               *dest++ = c;
-               if (--n == 0)
-                       return s;
-       } while (c != L'\0');
-
-       /* zero fill */
-       do
-               *dest++ = L'\0';
-       while (--n > 0);
-
-       return s;
-}
-#endif
-
-/* Duplicate S, returning an identical malloc'd string. */
-wchar_t *wcsdup(const wchar_t *s)
-{
-       wchar_t *new_str;
-
-       if (s) {
-               new_str = g_new(wchar_t, wcslen(s) + 1);
-               wcscpy(new_str, s);
-       } else
-               new_str = NULL;
-
-       return new_str;
-}
-
-/* Duplicate no more than N wide-characters of S,
-   returning an identical malloc'd string. */
-wchar_t *wcsndup(const wchar_t *s, size_t n)
-{
-       wchar_t *new_str;
-
-       if (s) {
-               new_str = g_new(wchar_t, n + 1);
-               wcsncpy(new_str, s, n);
-               new_str[n] = (wchar_t)0;
-       } else
-               new_str = NULL;
-
-       return new_str;
-}
-
-wchar_t *strdup_mbstowcs(const gchar *s)
-{
-       wchar_t *new_str;
-
-       if (s) {
-               new_str = g_new(wchar_t, strlen(s) + 1);
-               if (mbstowcs(new_str, s, strlen(s) + 1) < 0) {
-                       g_free(new_str);
-                       new_str = NULL;
-               } else
-                       new_str = g_realloc(new_str,
-                                           sizeof(wchar_t) * (wcslen(new_str) + 1));
-       } else
-               new_str = NULL;
-
-       return new_str;
-}
-
-gchar *strdup_wcstombs(const wchar_t *s)
-{
-       gchar *new_str;
-       size_t len;
-
-       if (s) {
-               len = wcslen(s) * MB_CUR_MAX + 1;
-               new_str = g_new(gchar, len);
-               if (wcstombs(new_str, s, len) < 0) {
-                       g_free(new_str);
-                       new_str = NULL;
-               } else
-                       new_str = g_realloc(new_str, strlen(new_str) + 1);
-       } else
-               new_str = NULL;
-
-       return new_str;
-}
-
-/* Compare S1 and S2, ignoring case.  */
-gint wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
-{
-       wint_t c1;
-       wint_t c2;
-
-       while (n--) {
-               c1 = towlower(*s1++);
-               c2 = towlower(*s2++);
-               if (c1 != c2)
-                       return c1 - c2;
-               else if (c1 == 0 && c2 == 0)
-                       break;
-       }
-
-       return 0;
-}
-
-/* Find the first occurrence of NEEDLE in HAYSTACK, ignoring case.  */
-wchar_t *wcscasestr(const wchar_t *haystack, const wchar_t *needle)
-{
-       register size_t haystack_len, needle_len;
-
-       haystack_len = wcslen(haystack);
-       needle_len   = wcslen(needle);
-
-       if (haystack_len < needle_len || needle_len == 0)
-               return NULL;
-
-       while (haystack_len >= needle_len) {
-               if (!wcsncasecmp(haystack, needle, needle_len))
-                       return (wchar_t *)haystack;
-               else {
-                       haystack++;
-                       haystack_len--;
-               }
-       }
-
-       return NULL;
-}
-
-gint get_mbs_len(const gchar *s)
-{
-       const gchar *p = s;
-       gint mb_len;
-       gint len = 0;
-
-       if (!p)
-               return -1;
-
-       while (*p != '\0') {
-               mb_len = g_utf8_skip[*(guchar *)p];
-               if (mb_len == 0)
-                       break;
-               else
-                       len++;
-
-               p += mb_len;
-       }
-
-       return len;
-}
 
 /* Examine if next block is non-ASCII string */
 gboolean is_next_nonascii(const gchar *s)
 
 /* Examine if next block is non-ASCII string */
 gboolean is_next_nonascii(const gchar *s)
index a82520ff9b12567a311491560132d4249065dfa5..c5b2e9440d3b261099893d7342c881fba51f0cd2 100644 (file)
@@ -257,42 +257,6 @@ gchar *strncpy2            (gchar          *dest,
                         const gchar    *src,
                         size_t          n);
 
                         const gchar    *src,
                         size_t          n);
 
-/* wide-character functions */
-#if !HAVE_ISWALNUM
-int iswalnum           (wint_t wc);
-#endif
-#if !HAVE_ISWSPACE
-int iswspace           (wint_t wc);
-#endif
-#if !HAVE_TOWLOWER
-wint_t towlower                (wint_t wc);
-#endif
-
-#if !HAVE_WCSLEN
-size_t wcslen          (const wchar_t *s);
-#endif
-#if !HAVE_WCSCPY
-wchar_t *wcscpy                (wchar_t       *dest,
-                        const wchar_t *src);
-#endif
-#if !HAVE_WCSNCPY
-wchar_t *wcsncpy       (wchar_t       *dest,
-                        const wchar_t *src,
-                        size_t         n);
-#endif
-
-wchar_t *wcsdup                        (const wchar_t *s);
-wchar_t *wcsndup               (const wchar_t *s,
-                                size_t         n);
-wchar_t *strdup_mbstowcs       (const gchar   *s);
-gchar *strdup_wcstombs         (const wchar_t *s);
-gint wcsncasecmp               (const wchar_t *s1,
-                                const wchar_t *s2,
-                                size_t         n);
-wchar_t *wcscasestr            (const wchar_t *haystack,
-                                const wchar_t *needle);
-gint get_mbs_len               (const gchar    *s);
-
 gboolean is_next_nonascii      (const gchar *s);
 gint get_next_word_len         (const gchar *s);
 
 gboolean is_next_nonascii      (const gchar *s);
 gint get_next_word_len         (const gchar *s);