2004-10-26 [paul] 0.9.12cvs132.3
authorPaul Mangan <paul@claws-mail.org>
Tue, 26 Oct 2004 10:43:50 +0000 (10:43 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 26 Oct 2004 10:43:50 +0000 (10:43 +0000)
* src/account.c
* src/addressbook.c
* src/addrgather.c
* src/addrharvest.c
* src/codeconv.c
* src/compose.c
* src/customheader.c
* src/editaddress.c
* src/editgroup.c
* src/enriched.c
* src/expldifdlg.c
* src/exporthtml.c
* src/exportldif.c
* src/folder.c
* src/foldersel.c
* src/folderview.c
* src/grouplistdialog.c
* src/html.c
* src/imap.c
* src/jpilot.c
* src/ldapserver.c
* src/ldif.c
* src/mimeview.c
* src/news.c
* src/news_gtk.c
* src/pop.c
* src/prefs_display_header.c
* src/prefs_gtk.c
* src/prefs_msg_colors.c
* src/prefs_toolbar.c
* src/procheader.c
* src/procmime.c
* src/summaryview.c
* src/textview.c
* src/toolbar.c
* src/vcard.c
* src/common/mgutils.c
* src/common/nntp.c
* src/common/smtp.c
* src/common/template.c
* src/common/utils.c
* src/common/xmlprops.c
* src/plugins/pgpmime/pgpmime.c
* src/plugins/pgpmime/select-keys.c
* src/plugins/pgpmime/sgpgme.c
replace deprecated g_strcasecmp(), g_strncasecmp(),
g_string_sprintfa(), gtk_notebook_current_page()

48 files changed:
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/account.c
src/addressbook.c
src/addrgather.c
src/addrharvest.c
src/codeconv.c
src/common/mgutils.c
src/common/nntp.c
src/common/smtp.c
src/common/template.c
src/common/utils.c
src/common/xmlprops.c
src/compose.c
src/customheader.c
src/editaddress.c
src/editgroup.c
src/enriched.c
src/expldifdlg.c
src/exporthtml.c
src/exportldif.c
src/folder.c
src/foldersel.c
src/folderview.c
src/grouplistdialog.c
src/html.c
src/imap.c
src/jpilot.c
src/ldapserver.c
src/ldif.c
src/mimeview.c
src/news.c
src/news_gtk.c
src/plugins/pgpmime/pgpmime.c
src/plugins/pgpmime/select-keys.c
src/plugins/pgpmime/sgpgme.c
src/pop.c
src/prefs_display_header.c
src/prefs_gtk.c
src/prefs_msg_colors.c
src/prefs_toolbar.c
src/procheader.c
src/procmime.c
src/summaryview.c
src/textview.c
src/toolbar.c
src/vcard.c

index 8065fd1..45edf8b 100644 (file)
@@ -1,3 +1,53 @@
+2004-10-26 [paul]      0.9.12cvs132.3
+
+       * src/account.c
+       * src/addressbook.c
+       * src/addrgather.c
+       * src/addrharvest.c
+       * src/codeconv.c
+       * src/compose.c
+       * src/customheader.c
+       * src/editaddress.c
+       * src/editgroup.c
+       * src/enriched.c
+       * src/expldifdlg.c
+       * src/exporthtml.c
+       * src/exportldif.c
+       * src/folder.c
+       * src/foldersel.c
+       * src/folderview.c
+       * src/grouplistdialog.c
+       * src/html.c
+       * src/imap.c
+       * src/jpilot.c
+       * src/ldapserver.c
+       * src/ldif.c
+       * src/mimeview.c
+       * src/news.c
+       * src/news_gtk.c
+       * src/pop.c
+       * src/prefs_display_header.c
+       * src/prefs_gtk.c
+       * src/prefs_msg_colors.c
+       * src/prefs_toolbar.c
+       * src/procheader.c
+       * src/procmime.c
+       * src/summaryview.c
+       * src/textview.c
+       * src/toolbar.c
+       * src/vcard.c
+       * src/common/mgutils.c
+       * src/common/nntp.c
+       * src/common/smtp.c
+       * src/common/template.c
+       * src/common/utils.c
+       * src/common/xmlprops.c
+       * src/plugins/pgpmime/pgpmime.c
+       * src/plugins/pgpmime/select-keys.c
+       * src/plugins/pgpmime/sgpgme.c
+               replace deprecated g_strcasecmp(), g_strncasecmp(),
+               g_string_sprintfa(), gtk_notebook_current_page()
+
 2004-10-26 [colin]     0.9.12cvs132.2
 
        * src/prefs_folder_item.c
index bb58ffa..83c3119 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.54 -r 1.382.2.55 src/compose.c; cvs diff -u -r 1.9.2.7 -r 1.9.2.8 src/sourcewindow.c; ) > 0.9.12cvs131.2.patchset
 ( cvs diff -u -r 1.382.2.55 -r 1.382.2.56 src/compose.c; cvs diff -u -r 1.96.2.23 -r 1.96.2.24 src/textview.c; ) > 0.9.12cvs133.patchset
 ( cvs diff -u -r 1.52.2.7 -r 1.52.2.8 src/prefs_folder_item.c; ) > 0.9.12cvs132.2.patchset
+( cvs diff -u -r 1.61.2.13 -r 1.61.2.14 src/account.c; cvs diff -u -r 1.60.2.12 -r 1.60.2.13 src/addressbook.c; cvs diff -u -r 1.5.10.4 -r 1.5.10.5 src/addrgather.c; cvs diff -u -r 1.6 -r 1.7 src/addrharvest.c; cvs diff -u -r 1.65.2.16 -r 1.65.2.17 src/codeconv.c; cvs diff -u -r 1.382.2.56 -r 1.382.2.57 src/compose.c; cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/customheader.c; cvs diff -u -r 1.14.2.3 -r 1.14.2.4 src/editaddress.c; cvs diff -u -r 1.11.2.3 -r 1.11.2.4 src/editgroup.c; cvs diff -u -r 1.3.2.1 -r 1.3.2.2 src/enriched.c; cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/expldifdlg.c; cvs diff -u -r 1.5.2.1 -r 1.5.2.2 src/exporthtml.c; cvs diff -u -r 1.1.4.1 -r 1.1.4.2 src/exportldif.c; cvs diff -u -r 1.213.2.18 -r 1.213.2.19 src/folder.c; cvs diff -u -r 1.26.2.5 -r 1.26.2.6 src/foldersel.c; cvs diff -u -r 1.207.2.19 -r 1.207.2.20 src/folderview.c; cvs diff -u -r 1.14.2.5 -r 1.14.2.6 src/grouplistdialog.c; cvs diff -u -r 1.12.2.2 -r 1.12.2.3 src/html.c; cvs diff -u -r 1.179.2.9 -r 1.179.2.10 src/imap.c; cvs diff -u -r 1.18.2.3 -r 1.18.2.4 src/jpilot.c; cvs diff -u -r 1.4.2.2 -r 1.4.2.3 src/ldapserver.c; cvs diff -u -r 1.12 -r 1.13 src/ldif.c; cvs diff -u -r 1.83.2.22 -r 1.83.2.23 src/mimeview.c; cvs diff -u -r 1.101.2.6 -r 1.101.2.7 src/news.c; cvs diff -u -r 1.2.2.1 -r 1.2.2.2 src/news_gtk.c; cvs diff -u -r 1.56.2.26 -r 1.56.2.27 src/pop.c; cvs diff -u -r 1.16.2.4 -r 1.16.2.5 src/prefs_display_header.c; cvs diff -u -r 1.10.2.7 -r 1.10.2.8 src/prefs_gtk.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/prefs_msg_colors.c; cvs diff -u -r 1.30.2.4 -r 1.30.2.5 src/prefs_toolbar.c; cvs diff -u -r 1.47.2.10 -r 1.47.2.11 src/procheader.c; cvs diff -u -r 1.49.2.11 -r 1.49.2.12 src/procmime.c; cvs diff -u -r 1.395.2.36 -r 1.395.2.37 src/summaryview.c; cvs diff -u -r 1.96.2.24 -r 1.96.2.25 src/textview.c; cvs diff -u -r 1.43.2.10 -r 1.43.2.11 src/toolbar.c; cvs diff -u -r 1.14.2.1 -r 1.14.2.2 src/vcard.c; cvs diff -u -r 1.1 -r 1.2 src/common/mgutils.c; cvs diff -u -r 1.6.2.3 -r 1.6.2.4 src/common/nntp.c; cvs diff -u -r 1.11.2.4 -r 1.11.2.5 src/common/smtp.c; cvs diff -u -r 1.2.4.1 -r 1.2.4.2 src/common/template.c; cvs diff -u -r 1.36.2.10 -r 1.36.2.11 src/common/utils.c; cvs diff -u -r 1.1 -r 1.2 src/common/xmlprops.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/plugins/pgpmime/pgpmime.c; cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/plugins/pgpmime/select-keys.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpmime/sgpgme.c; ) > 0.9.12cvs132.3.patchset
index 0a34a5b..e5f0896 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=132
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.2
+EXTRA_GTK2_VERSION=.3
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 60092ae..3c2b284 100644 (file)
@@ -238,7 +238,7 @@ PrefsAccount *account_find_from_address(const gchar *address)
        for (cur = account_list; cur != NULL; cur = cur->next) {
                ac = (PrefsAccount *)cur->data;
                if (ac->protocol != A_NNTP && ac->address &&
-                   g_strcasecmp(address, ac->address) == 0)
+                   g_ascii_strcasecmp(address, ac->address) == 0)
                        return ac;
        }
 
index aa163d3..92f943f 100644 (file)
@@ -3484,7 +3484,7 @@ static gint addressbook_treenode_compare_func(
        if( cell2 ) name2 = cell2->u.text;
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 /*
@@ -3505,7 +3505,7 @@ static gint addressbook_list_compare_func(
                /* Order by name */
                if( ! name1 ) return ( name2 != NULL );
                if( ! name2 ) return -1;
-               return g_strcasecmp( name1, name2 );
+               return g_utf8_collate( name1, name2 );
        }
        else {
                /* Order groups before person */
index 1b75063..39f8a32 100644 (file)
@@ -571,7 +571,7 @@ AddressBookFile *addrgather_dlg_execute(
                        gtk_toggle_button_set_active(
                                GTK_TOGGLE_BUTTON(addrgather_dlg.checkHeader[i]),
                                FALSE );
-                       if( g_strcasecmp( _harv_headerNames_[i], HEADER_FROM ) == 0 ) {
+                       if( g_utf8_collate( _harv_headerNames_[i], HEADER_FROM ) == 0 ) {
                                gtk_toggle_button_set_active(
                                        GTK_TOGGLE_BUTTON(addrgather_dlg.checkHeader[i]),
                                        TRUE );
index 35ef37d..18a5674 100644 (file)
@@ -201,7 +201,7 @@ static HeaderEntry *addrharvest_find(
                HeaderEntry *entry;
 
                entry = node->data;
-               if( g_strcasecmp( entry->header, name ) == 0 ) {
+               if( g_utf8_collate( entry->header, name ) == 0 ) {
                        retVal = entry;
                        break;
                }
@@ -550,7 +550,7 @@ static void addrharvest_parse_address(
                        mgu_str_ltc2space( buffer, '(', ')' );
                        g_strstrip( buffer );
 
-                       if( g_strcasecmp( buffer, email ) == 0 ) {
+                       if( g_ascii_strcasecmp( buffer, email ) == 0 ) {
                                name = "";
                        }
                        else {
@@ -586,7 +586,7 @@ static gboolean addrharvest_check_hdr( GList *listHdr, gchar *buf ) {
                node = listHdr;
                while( node ) {
                        nhdr = node->data;
-                       if( g_strcasecmp( nhdr, hdr ) == 0 ) {
+                       if( g_utf8_collate( nhdr, hdr ) == 0 ) {
                                retVal = TRUE;
                                break;
                        }
index a8580c8..c8bec28 100644 (file)
@@ -937,11 +937,11 @@ gchar *conv_iconv_strdup(const gchar *inbuf,
                dest_code = (char *)idest_code;
 
        /* don't convert if current codeset is US-ASCII */
-       if (!g_strcasecmp(dest_code, CS_US_ASCII))
+       if (!g_ascii_strcasecmp(dest_code, CS_US_ASCII))
                return g_strdup(inbuf);
 
        /* don't convert if src and dest codeset are identical */
-       if (!g_strcasecmp(src_code, dest_code))
+       if (!g_ascii_strcasecmp(src_code, dest_code))
                return g_strdup(inbuf);
 
        /* FIXME: unchecked inbuf? Can't see at this level. */
@@ -1291,14 +1291,14 @@ CharSet conv_get_current_charset(void)
 
                /* "ja_JP.EUC" matches with "ja_JP.eucJP", "ja_JP.EUC" and
                   "ja_JP". "ja_JP" matches with "ja_JP.xxxx" and "ja" */
-               if (!g_strncasecmp(cur_locale, locale_table[i].locale,
+               if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale,
                                 strlen(locale_table[i].locale))) {
                        cur_charset = locale_table[i].charset;
                        return cur_charset;
                } else if ((p = strchr(locale_table[i].locale, '_')) &&
                         !strchr(p + 1, '.')) {
                        if (strlen(cur_locale) == 2 &&
-                           !g_strncasecmp(cur_locale, locale_table[i].locale, 2)) {
+                           !g_ascii_strncasecmp(cur_locale, locale_table[i].locale, 2)) {
                                cur_charset = locale_table[i].charset;
                                return cur_charset;
                        }
@@ -1343,14 +1343,14 @@ CharSet conv_get_outgoing_charset(void)
        for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) {
                const gchar *p;
 
-               if (!g_strncasecmp(cur_locale, locale_table[i].locale,
+               if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale,
                                 strlen(locale_table[i].locale))) {
                        out_charset = locale_table[i].out_charset;
                        break;
                } else if ((p = strchr(locale_table[i].locale, '_')) &&
                         !strchr(p + 1, '.')) {
                        if (strlen(cur_locale) == 2 &&
-                           !g_strncasecmp(cur_locale, locale_table[i].locale, 2)) {
+                           !g_ascii_strncasecmp(cur_locale, locale_table[i].locale, 2)) {
                                out_charset = locale_table[i].out_charset;
                                break;
                        }
index 9094adf..91d904b 100644 (file)
@@ -377,7 +377,7 @@ gboolean mgu_slist_test_unq_nc( GSList *list, gchar *str ) {
                if( strlen( str ) > 0 ) {
                        node = list;
                        while( node ) {
-                               if( g_strcasecmp( str, node->data ) == 0 )
+                               if( g_utf8_collate( str, node->data ) == 0 )
                                        return FALSE;
                                node = g_slist_next( node );
                        }
@@ -401,7 +401,7 @@ gboolean mgu_list_test_unq_nc( GList *list, gchar *str ) {
                if( strlen( str ) > 0 ) {
                        node = list;
                        while( node ) {
-                               if( g_strcasecmp( str, node->data ) == 0 )
+                               if( g_utf8_collate( str, node->data ) == 0 )
                                        return FALSE;
                                node = g_list_next( node );
                        }
index 0bb0691..f5a4e36 100644 (file)
@@ -362,7 +362,7 @@ static gint nntp_gen_send(SockInfo *sock, const gchar *format, ...)
        va_end(args);
 
        if (verbose) {
-               if (!g_strncasecmp(buf, "AUTHINFO PASS", 13))
+               if (!g_ascii_strncasecmp(buf, "AUTHINFO PASS", 13))
                        log_print("NNTP> AUTHINFO PASS ********\n");
                else
                        log_print("NNTP> %s\n", buf);
index dd3f069..104d168 100644 (file)
@@ -269,7 +269,7 @@ static gint smtp_ehlo_recv(SMTPSession *session, const gchar *msg)
                const gchar *p = msg;
                p += 3;
                if (*p == '-' || *p == ' ') p++;
-               if (g_strncasecmp(p, "AUTH", 4) == 0) {
+               if (g_ascii_strncasecmp(p, "AUTH", 4) == 0) {
                        p += 5;
                        if (strcasestr(p, "LOGIN"))
                                session->avail_auth_type |= SMTPAUTH_LOGIN;
@@ -278,7 +278,7 @@ static gint smtp_ehlo_recv(SMTPSession *session, const gchar *msg)
                        if (strcasestr(p, "DIGEST-MD5"))
                                session->avail_auth_type |= SMTPAUTH_DIGEST_MD5;
                }
-               if (g_strncasecmp(p, "SIZE", 4) == 0) {
+               if (g_ascii_strncasecmp(p, "SIZE", 4) == 0) {
                        p += 5;
                        session->max_message_size = atoi(p);
                }
index fdafcf8..b4053ec 100644 (file)
@@ -61,27 +61,27 @@ static Template *template_load(gchar *filename)
 
                if (buf[0] == '\n')
                        break;
-               else if (!g_strncasecmp(buf, "Name:", 5)) {
+               else if (!g_ascii_strncasecmp(buf, "Name:", 5)) {
                        tmp = conv_codeset_strdup(buf + 5,
                                                  src_codeset,
                                                  dest_codeset);
                        tmpl->name = tmp ? g_strstrip(tmp) : g_strdup(buf + 5);
-               } else if (!g_strncasecmp(buf, "Subject:", 8)) {
+               } else if (!g_ascii_strncasecmp(buf, "Subject:", 8)) {
                        tmp = conv_codeset_strdup(buf + 8,
                                                  src_codeset,
                                                  dest_codeset);
                        tmpl->subject = tmp ? g_strstrip(tmp) : g_strdup(buf + 8);
-               } else if (!g_strncasecmp(buf, "To:", 3)) {
+               } else if (!g_ascii_strncasecmp(buf, "To:", 3)) {
                        tmp = conv_codeset_strdup(buf + 3,
                                                  src_codeset,
                                                  dest_codeset);
                        tmpl->to = tmp ? g_strstrip(tmp) : g_strdup(buf + 3);
-               } else if (!g_strncasecmp(buf, "Cc:", 3)) {
+               } else if (!g_ascii_strncasecmp(buf, "Cc:", 3)) {
                        tmp = conv_codeset_strdup(buf + 3,
                                                  src_codeset,
                                                  dest_codeset);
                        tmpl->cc = tmp ? g_strstrip(tmp) : g_strdup(buf + 3);
-               } else if (!g_strncasecmp(buf, "Bcc:", 4)) {
+               } else if (!g_ascii_strncasecmp(buf, "Bcc:", 4)) {
                        tmp = conv_codeset_strdup(buf + 4,
                                                  src_codeset,
                                                  dest_codeset);
index d8b7315..147e0f8 100644 (file)
@@ -114,7 +114,7 @@ void hash_free_value_mem(GHashTable *table)
 
 gint str_case_equal(gconstpointer v, gconstpointer v2)
 {
-       return g_strcasecmp((const gchar *)v, (const gchar *)v2) == 0;
+       return g_ascii_strcasecmp((const gchar *)v, (const gchar *)v2) == 0;
 }
 
 guint str_case_hash(gconstpointer key)
@@ -278,7 +278,7 @@ gchar *strcasestr(const gchar *haystack, const gchar *needle)
                return NULL;
 
        while (haystack_len >= needle_len) {
-               if (!g_strncasecmp(haystack, needle, needle_len))
+               if (!g_ascii_strncasecmp(haystack, needle, needle_len))
                        return (gchar *)haystack;
                else {
                        haystack++;
@@ -572,7 +572,7 @@ gint subject_compare_for_sort(const gchar *s1, const gchar *s2)
        trim_subject_for_sort(str1);
        trim_subject_for_sort(str2);
 
-       return g_strcasecmp(str1, str2);
+       return g_utf8_collate(str1, str2);
 }
 
 void trim_subject_for_compare(gchar *str)
@@ -1499,19 +1499,19 @@ static gint axtoi(const gchar *hexstr)
 
 gboolean is_uri_string(const gchar *str)
 {
-       return (g_strncasecmp(str, "http://", 7) == 0 ||
-               g_strncasecmp(str, "https://", 8) == 0 ||
-               g_strncasecmp(str, "ftp://", 6) == 0 ||
-               g_strncasecmp(str, "www.", 4) == 0);
+       return (g_ascii_strncasecmp(str, "http://", 7) == 0 ||
+               g_ascii_strncasecmp(str, "https://", 8) == 0 ||
+               g_ascii_strncasecmp(str, "ftp://", 6) == 0 ||
+               g_ascii_strncasecmp(str, "www.", 4) == 0);
 }
 
 gchar *get_uri_path(const gchar *uri)
 {
-       if (g_strncasecmp(uri, "http://", 7) == 0)
+       if (g_ascii_strncasecmp(uri, "http://", 7) == 0)
                return (gchar *)(uri + 7);
-       else if (g_strncasecmp(uri, "https://", 8) == 0)
+       else if (g_ascii_strncasecmp(uri, "https://", 8) == 0)
                return (gchar *)(uri + 8);
-       else if (g_strncasecmp(uri, "ftp://", 6) == 0)
+       else if (g_ascii_strncasecmp(uri, "ftp://", 6) == 0)
                return (gchar *)(uri + 6);
        else
                return (gchar *)uri;
@@ -1587,15 +1587,15 @@ gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
 
                if (*value == '\0') continue;
 
-               if (cc && !*cc && !g_strcasecmp(field, "cc")) {
+               if (cc && !*cc && !g_ascii_strcasecmp(field, "cc")) {
                        *cc = g_strdup(value);
-               } else if (bcc && !*bcc && !g_strcasecmp(field, "bcc")) {
+               } else if (bcc && !*bcc && !g_ascii_strcasecmp(field, "bcc")) {
                        *bcc = g_strdup(value);
                } else if (subject && !*subject &&
-                          !g_strcasecmp(field, "subject")) {
+                          !g_ascii_strcasecmp(field, "subject")) {
                        *subject = g_malloc(strlen(value) + 1);
                        decode_uri(*subject, value);
-               } else if (body && !*body && !g_strcasecmp(field, "body")) {
+               } else if (body && !*body && !g_ascii_strcasecmp(field, "body")) {
                        *body = g_malloc(strlen(value) + 1);
                        decode_uri(*body, value);
                }
@@ -2790,7 +2790,7 @@ gchar *get_outgoing_rfc2822_str(FILE *fp)
        /* output header part */
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                strretchomp(buf);
-               if (!g_strncasecmp(buf, "Bcc:", 4)) {
+               if (!g_ascii_strncasecmp(buf, "Bcc:", 4)) {
                        gint next;
 
                        for (;;) {
@@ -3262,7 +3262,7 @@ time_t remote_tzoffset_sec(const gchar *zone)
                remoteoffset = 0;
        } else if (strlen(zone3) == 3) {
                for (p = ustzstr; *p != '\0'; p += 3) {
-                       if (!g_strncasecmp(p, zone3, 3)) {
+                       if (!g_ascii_strncasecmp(p, zone3, 3)) {
                                iustz = ((gint)(p - ustzstr) / 3 + 1) / 2 - 8;
                                remoteoffset = iustz * 3600;
                                break;
@@ -3478,7 +3478,7 @@ int subject_get_prefix_length(const gchar *subject)
                for (n = 0; n < PREFIXES; n++)
                        /* Terminate each prefix regexpression by a
                         * "\ ?" (zero or ONE space), and OR them */
-                       g_string_sprintfa(s, "(%s\\ ?)%s",
+                       g_string_append_printf(s, "(%s\\ ?)%s",
                                          prefixes[n],
                                          n < PREFIXES - 1 ? 
                                          "|" : "");
@@ -3524,7 +3524,7 @@ gint g_stricase_equal(gconstpointer gptr1, gconstpointer gptr2)
        const char *str1 = gptr1;
        const char *str2 = gptr2;
 
-       return !g_strcasecmp(str1, str2);
+       return !g_utf8_collate(str1, str2);
 }
 
 gint g_int_compare(gconstpointer a, gconstpointer b)
index 491d223..1dd8d45 100644 (file)
@@ -416,7 +416,7 @@ gboolean xmlprops_get_property_b( XmlProperty *props, const gchar *name ) {
        g_return_val_if_fail( props != NULL, value );
        val = g_hash_table_lookup( props->propertyTable, name );
        if( val ) {
-               value = ( g_strcasecmp( val, "y" ) == 0 );
+               value = ( g_ascii_strcasecmp( val, "y" ) == 0 );
        }
        return value;
 }
index 2e8ee26..0b7e8d1 100644 (file)
@@ -1469,7 +1469,7 @@ void compose_entry_mark_default_to(Compose *compose, const gchar *mailto)
        for (h_list = compose->header_list; h_list != NULL; h_list = h_list->next) {
                entry = GTK_ENTRY(((ComposeHeaderEntry *)h_list->data)->entry);
                if (gtk_entry_get_text(entry) && 
-                   !g_strcasecmp(gtk_entry_get_text(entry), mailto)) {
+                   !g_utf8_collate(gtk_entry_get_text(entry), mailto)) {
                        gtk_widget_ensure_style(GTK_WIDGET(entry));
                        if (!bold_style) {
                                PangoFontDescription *font_desc = NULL;
@@ -1742,7 +1742,7 @@ static gchar *compose_parse_references(const gchar *ref, const gchar *msgid)
        for (cur = ref_id_list; cur != NULL; cur = cur->next) {
                if (new_ref->len > 0)
                        g_string_append(new_ref, "\n\t");
-               g_string_sprintfa(new_ref, "<%s>", (gchar *)cur->data);
+               g_string_append_printf(new_ref, "<%s>", (gchar *)cur->data);
        }
 
        slist_free_strings(ref_id_list);
@@ -2205,7 +2205,7 @@ static void compose_attach_append(Compose *compose, const gchar *file,
 
        if (content_type) {
                ainfo->content_type = g_strdup(content_type);
-               if (!g_strcasecmp(content_type, "message/rfc822")) {
+               if (!g_ascii_strcasecmp(content_type, "message/rfc822")) {
                        MsgInfo *msginfo;
                        MsgFlags flags = {0, 0};
                        const gchar *name;
@@ -2225,7 +2225,7 @@ static void compose_attach_append(Compose *compose, const gchar *file,
 
                        procmsg_msginfo_free(msginfo);
                } else {
-                       if (!g_strncasecmp(content_type, "text", 4))
+                       if (!g_ascii_strncasecmp(content_type, "text", 4))
                                ainfo->encoding =
                                        procmime_get_encoding_for_file(file);
                        else
@@ -2239,7 +2239,7 @@ static void compose_attach_append(Compose *compose, const gchar *file,
                        ainfo->content_type =
                                g_strdup("application/octet-stream");
                        ainfo->encoding = ENC_BASE64;
-               } else if (!g_strncasecmp(ainfo->content_type, "text", 4))
+               } else if (!g_ascii_strncasecmp(ainfo->content_type, "text", 4))
                        ainfo->encoding = procmime_get_encoding_for_file(file);
                else
                        ainfo->encoding = ENC_BASE64;
@@ -2324,7 +2324,7 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo)
                debug_print("First text part found\n");
        } else if (compose->mode == COMPOSE_REEDIT &&
                 child->type == MIMETYPE_APPLICATION &&
-                !g_strcasecmp(child->subtype, "pgp-encrypted")) {
+                !g_ascii_strcasecmp(child->subtype, "pgp-encrypted")) {
                AlertValue val;
                val = alertpanel(_("Encrypted message"),
                                 _("Cannot re-edit an encrypted message. \n"
@@ -3349,8 +3349,8 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                headerentry = ((ComposeHeaderEntry *)list->data);
                headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
 
-               if (g_strcasecmp(headerentryname, cc_hdr) == 0 
-                  || g_strcasecmp(headerentryname, to_hdr) == 0) {
+               if (g_utf8_collate(headerentryname, cc_hdr) == 0 
+                  || g_utf8_collate(headerentryname, to_hdr) == 0) {
                        const gchar *entstr = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
                        Xstrdup_a(str, entstr, return -1);
                        g_strstrip(str);
@@ -3358,7 +3358,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                                compose_convert_header
                                        (buf, sizeof(buf), str,
                                        strlen("Resent-To") + 2, TRUE);
-                               if (g_strcasecmp(headerentryname, to_hdr) == 0) {
+                               if (g_utf8_collate(headerentryname, to_hdr) == 0) {
                                        if (first_to_address) {
                                                fprintf(fp, "Resent-To: ");
                                                first_to_address = FALSE;
@@ -3366,7 +3366,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                                                fprintf(fp, ",");
                                        }
                                }
-                               if (g_strcasecmp(headerentryname, cc_hdr) == 0) {
+                               if (g_utf8_collate(headerentryname, cc_hdr) == 0) {
                                        if (first_cc_address) {
                                                fprintf(fp, "\n");
                                                fprintf(fp, "Resent-Cc: ");
@@ -3452,23 +3452,23 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
 
        while (procheader_get_one_field_asis(buf, sizeof(buf), fp) != -1) {
                /* should filter returnpath, delivered-to */
-               if (g_strncasecmp(buf, "Return-Path:",
-                                  strlen("Return-Path:")) == 0 ||
-                   g_strncasecmp(buf, "Delivered-To:",
-                                 strlen("Delivered-To:")) == 0 ||
-                   g_strncasecmp(buf, "Received:",
-                                 strlen("Received:")) == 0 ||
-                   g_strncasecmp(buf, "Subject:",
-                                 strlen("Subject:")) == 0 ||
-                   g_strncasecmp(buf, "X-UIDL:",
-                                 strlen("X-UIDL:")) == 0)
+               if (g_ascii_strncasecmp(buf, "Return-Path:",
+                                       strlen("Return-Path:")) == 0 ||
+                   g_ascii_strncasecmp(buf, "Delivered-To:",
+                                       strlen("Delivered-To:")) == 0 ||
+                   g_ascii_strncasecmp(buf, "Received:",
+                                       strlen("Received:")) == 0 ||
+                   g_ascii_strncasecmp(buf, "Subject:",
+                                       strlen("Subject:")) == 0 ||
+                   g_ascii_strncasecmp(buf, "X-UIDL:",
+                                       strlen("X-UIDL:")) == 0)
                        continue;
 
                if (fputs(buf, fdest) == -1)
                        goto error;
 
                if (!prefs_common.redirect_keep_from) {
-                       if (g_strncasecmp(buf, "From:",
+                       if (g_ascii_strncasecmp(buf, "From:",
                                          strlen("From:")) == 0) {
                                fputs(" (by way of ", fdest);
                                if (compose->account->name
@@ -3540,7 +3540,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action)
                const gchar *src_codeset;
 
                out_codeset = conv_get_outgoing_charset_str();
-               if (!g_strcasecmp(out_codeset, CS_US_ASCII))
+               if (!g_ascii_strcasecmp(out_codeset, CS_US_ASCII))
                        out_codeset = CS_ISO_8859_1;
 
                if (prefs_common.encoding_method == CTE_BASE64)
@@ -3555,7 +3555,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action)
                src_codeset = CS_UTF_8;
                /* if current encoding is US-ASCII, set it the same as
                   outgoing one to prevent code conversion failure */
-               if (!g_strcasecmp(src_codeset, CS_US_ASCII))
+               if (!g_ascii_strcasecmp(src_codeset, CS_US_ASCII))
                        src_codeset = out_codeset;
 
                debug_print("src encoding = %s, out encoding = %s, transfer encoding = %s\n",
@@ -3957,7 +3957,7 @@ static void compose_add_attachments(Compose *compose, MimeInfo *parent)
                g_free(type);
 
                if (mimepart->type == MIMETYPE_MESSAGE && 
-                   !g_strcasecmp(mimepart->subtype, "rfc822")) {
+                   !g_ascii_strcasecmp(mimepart->subtype, "rfc822")) {
                        mimepart->disposition = DISPOSITIONTYPE_INLINE;
                } else {
                        g_hash_table_insert(mimepart->typeparameters,
@@ -4031,7 +4031,7 @@ static void compose_add_headerfield_from_headerlist(Compose *compose,
                headerentry = ((ComposeHeaderEntry *)list->data);
                headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
 
-               if (!g_strcasecmp(trans_fieldname, headerentryname)) {
+               if (!g_utf8_collate(trans_fieldname, headerentryname)) {
                        str = gtk_editable_get_chars(GTK_EDITABLE(headerentry->entry), 0, -1);
                        g_strstrip(str);
                        if (str[0] != '\0') {
@@ -4050,7 +4050,7 @@ static void compose_add_headerfield_from_headerlist(Compose *compose,
                compose_convert_header
                        (buf, fieldstr->len * 4  + 256, fieldstr->str,
                        strlen(fieldname) + 2, TRUE);
-               g_string_sprintfa(header, "%s: %s\n", fieldname, buf);
+               g_string_append_printf(header, "%s: %s\n", fieldname, buf);
                g_free(buf);
        }
 
@@ -4080,7 +4080,7 @@ static gchar *compose_get_header(Compose *compose)
        /* Date */
        if (compose->account->add_date) {
                get_rfc822_date(buf, sizeof(buf));
-               g_string_sprintfa(header, "Date: %s\n", buf);
+               g_string_append_printf(header, "Date: %s\n", buf);
        }
 
        /* From */
@@ -4089,10 +4089,10 @@ static gchar *compose_get_header(Compose *compose)
                        (buf, sizeof(buf), compose->account->name,
                         strlen("From: "), TRUE);
                QUOTE_IF_REQUIRED(name, buf);
-               g_string_sprintfa(header, "From: %s <%s>\n",
+               g_string_append_printf(header, "From: %s <%s>\n",
                        name, compose->account->address);
        } else
-               g_string_sprintfa(header, "From: %s\n", compose->account->address);
+               g_string_append_printf(header, "From: %s\n", compose->account->address);
        
        /* To */
        compose_add_headerfield_from_headerlist(compose, header, "To", ", ");
@@ -4120,7 +4120,7 @@ static gchar *compose_get_header(Compose *compose)
                if (*str != '\0') {
                        compose_convert_header(buf, sizeof(buf), str,
                                               strlen("Subject: "), FALSE);
-                       g_string_sprintfa(header, "Subject: %s\n", buf);
+                       g_string_append_printf(header, "Subject: %s\n", buf);
                }
                g_free(tmpstr);
        }
@@ -4128,18 +4128,18 @@ static gchar *compose_get_header(Compose *compose)
        /* Message-ID */
        if (compose->account->gen_msgid) {
                generate_msgid(compose->account->address, buf, sizeof(buf));
-               g_string_sprintfa(header, "Message-ID: <%s>\n", buf);
+               g_string_append_printf(header, "Message-ID: <%s>\n", buf);
                compose->msgid = g_strdup(buf);
        }
 
        if (compose->remove_references == FALSE) {
                /* In-Reply-To */
                if (compose->inreplyto && compose->to_list)
-                       g_string_sprintfa(header, "In-Reply-To: <%s>\n", compose->inreplyto);
+                       g_string_append_printf(header, "In-Reply-To: <%s>\n", compose->inreplyto);
        
                /* References */
                if (compose->references)
-                       g_string_sprintfa(header, "References: %s\n", compose->references);
+                       g_string_append_printf(header, "References: %s\n", compose->references);
        }
 
        /* Followup-To */
@@ -4155,21 +4155,21 @@ static gchar *compose_get_header(Compose *compose)
                compose_convert_header(buf, sizeof(buf),
                                       compose->account->organization,
                                       strlen("Organization: "), FALSE);
-               g_string_sprintfa(header, "Organization: %s\n", buf);
+               g_string_append_printf(header, "Organization: %s\n", buf);
        }
 
        /* Program version and system info */
        /* uname(&utsbuf); */
        if (g_slist_length(compose->to_list) && !IS_IN_CUSTOM_HEADER("X-Mailer") &&
            !compose->newsgroup_list) {
-               g_string_sprintfa(header, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n",
+               g_string_append_printf(header, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n",
                        prog_version,
                        gtk_major_version, gtk_minor_version, gtk_micro_version,
                        TARGET_ALIAS);
                        /* utsbuf.sysname, utsbuf.release, utsbuf.machine); */
        }
        if (g_slist_length(compose->newsgroup_list) && !IS_IN_CUSTOM_HEADER("X-Newsreader")) {
-               g_string_sprintfa(header, "X-Newsreader: %s (GTK+ %d.%d.%d; %s)\n",
+               g_string_append_printf(header, "X-Newsreader: %s (GTK+ %d.%d.%d; %s)\n",
                        prog_version,
                        gtk_major_version, gtk_minor_version, gtk_micro_version,
                        TARGET_ALIAS);
@@ -4189,24 +4189,24 @@ static gchar *compose_get_header(Compose *compose)
                                        (buf, sizeof(buf),
                                         chdr->value ? chdr->value : "",
                                         strlen(chdr->name) + 2, FALSE);
-                               g_string_sprintfa(header, "%s: %s\n", chdr->name, buf);
+                               g_string_append_printf(header, "%s: %s\n", chdr->name, buf);
                        }
                }
        }
 
        /* PRIORITY */
        switch (compose->priority) {
-               case PRIORITY_HIGHEST: g_string_sprintfa(header, "Importance: high\n"
+               case PRIORITY_HIGHEST: g_string_append_printf(header, "Importance: high\n"
                                                   "X-Priority: 1 (Highest)\n");
                        break;
-               case PRIORITY_HIGH: g_string_sprintfa(header, "Importance: high\n"
+               case PRIORITY_HIGH: g_string_append_printf(header, "Importance: high\n"
                                                "X-Priority: 2 (High)\n");
                        break;
                case PRIORITY_NORMAL: break;
-               case PRIORITY_LOW: g_string_sprintfa(header, "Importance: low\n"
+               case PRIORITY_LOW: g_string_append_printf(header, "Importance: low\n"
                                               "X-Priority: 4 (Low)\n");
                        break;
-               case PRIORITY_LOWEST: g_string_sprintfa(header, "Importance: low\n"
+               case PRIORITY_LOWEST: g_string_append_printf(header, "Importance: low\n"
                                                  "X-Priority: 5 (Lowest)\n");
                        break;
                default: debug_print("compose: priority unknown : %d\n",
@@ -4222,9 +4222,9 @@ static gchar *compose_get_header(Compose *compose)
                                                       compose->account->name, 
                                                       strlen("Disposition-Notification-To: "),
                                                       TRUE);
-                               g_string_sprintfa(header, "Disposition-Notification-To: %s <%s>\n", buf, compose->account->address);
+                               g_string_append_printf(header, "Disposition-Notification-To: %s <%s>\n", buf, compose->account->address);
                        } else
-                               g_string_sprintfa(header, "Disposition-Notification-To: %s\n", compose->account->address);
+                               g_string_append_printf(header, "Disposition-Notification-To: %s\n", compose->account->address);
                }
        }
 
@@ -4268,7 +4268,7 @@ static gchar *compose_get_header(Compose *compose)
                        string++;
                }
                if (!standard_header && !IS_IN_CUSTOM_HEADER(headername))
-                       g_string_sprintfa(header, "%s %s\n", headername_wcolon, headervalue);
+                       g_string_append_printf(header, "%s %s\n", headername_wcolon, headervalue);
                                
                g_free(headername);
                g_free(headername_wcolon);              
@@ -5158,7 +5158,7 @@ static void compose_set_privacy_system_cb(gpointer data,
        GtkItemFactory *ifactory;
        gboolean can_sign = FALSE, can_encrypt = FALSE;
 
-       systemid = gtk_object_get_data(GTK_OBJECT(widget), "privacy_system");
+       systemid = g_object_get_data(G_OBJECT(widget), "privacy_system");
        g_free(compose->privacy_system);
        compose->privacy_system = NULL;
        if (systemid != NULL) {
@@ -5194,7 +5194,7 @@ static void compose_update_privacy_system_menu_item(Compose * compose)
                while (amenu != NULL) {
                        GList *alist = amenu->next;
 
-                       systemid = gtk_object_get_data(GTK_OBJECT(amenu->data), "privacy_system");
+                       systemid = g_object_get_data(G_OBJECT(amenu->data), "privacy_system");
                        if (systemid != NULL)
                                if (strcmp(systemid, compose->privacy_system) == 0) {
                                        menuitem = GTK_WIDGET(amenu->data);
index 0337455..e0eed16 100644 (file)
@@ -83,7 +83,7 @@ CustomHeader *custom_header_find(GSList *header_list, const gchar *header)
 
        for (cur = header_list; cur != NULL; cur = cur->next) {
                chdr = (CustomHeader *)cur->data;
-               if (!g_strcasecmp(chdr->name, header))
+               if (!g_utf8_collate(chdr->name, header))
                        return chdr;
        }
 
@@ -103,16 +103,16 @@ gboolean custom_header_is_allowed(const gchar *header)
 {
        g_return_val_if_fail(header != NULL, FALSE);
 
-       if (g_strcasecmp(header, "Date")         != 0 &&
-           g_strcasecmp(header, "From")         != 0 &&
-           g_strcasecmp(header, "To")           != 0 &&
-        /* g_strcasecmp(header, "Sender")       != 0 && */
-           g_strcasecmp(header, "Message-ID")   != 0 &&
-           g_strcasecmp(header, "In-Reply-To")  != 0 &&
-           g_strcasecmp(header, "References")   != 0 &&
-           g_strcasecmp(header, "Mime-Version") != 0 &&
-           g_strcasecmp(header, "Content-Type") != 0 &&
-           g_strcasecmp(header, "Content-Transfer-Encoding")
+       if (g_ascii_strcasecmp(header, "Date")         != 0 &&
+           g_ascii_strcasecmp(header, "From")         != 0 &&
+           g_ascii_strcasecmp(header, "To")           != 0 &&
+        /* g_ascii_strcasecmp(header, "Sender")       != 0 && */
+           g_ascii_strcasecmp(header, "Message-ID")   != 0 &&
+           g_ascii_strcasecmp(header, "In-Reply-To")  != 0 &&
+           g_ascii_strcasecmp(header, "References")   != 0 &&
+           g_ascii_strcasecmp(header, "Mime-Version") != 0 &&
+           g_ascii_strcasecmp(header, "Content-Type") != 0 &&
+           g_ascii_strcasecmp(header, "Content-Transfer-Encoding")
            != 0)
                return TRUE;
 
index 0d18362..36ac322 100644 (file)
@@ -345,7 +345,7 @@ static gint edit_person_attrib_compare_func(
        if( cell2 ) name2 = cell2->u.text;
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 /*
@@ -578,9 +578,9 @@ static void addressbook_edit_person_page_basic( gint pageNum, gchar *pageLbl ) {
        ATTACH_ROW(_("Display Name"), entry_name);
        locale = conv_get_current_locale();
        if (locale &&
-           (!g_strncasecmp(locale, "ja", 2) ||
-            !g_strncasecmp(locale, "ko", 2) ||
-            !g_strncasecmp(locale, "zh", 2))) {
+           (!g_ascii_strncasecmp(locale, "ja", 2) ||
+            !g_ascii_strncasecmp(locale, "ko", 2) ||
+            !g_ascii_strncasecmp(locale, "zh", 2))) {
                ATTACH_ROW(_("Last Name"), entry_ln);
                ATTACH_ROW(_("First Name"), entry_fn);
        } else {
index 8f4f1e1..33f19e8 100644 (file)
@@ -226,7 +226,7 @@ static gint edit_group_list_compare_func( GtkCList *clist, gconstpointer ptr1, g
        if( cell2 ) name2 = cell2->u.text;
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 static void addressbook_edit_group_create( gboolean *cancelled ) {
index 92597c9..06e17b3 100644 (file)
@@ -201,7 +201,7 @@ static void ertf_get_parenthesis(ERTFParser *parser, gchar *buf, gint len)
        g_return_if_fail(*parser->bufp == '<');
 
        /* ignore params */
-       if (!g_strncasecmp(parser->bufp, "<param>", 4)) {
+       if (!g_ascii_strncasecmp(parser->bufp, "<param>", 4)) {
                parser->bufp += 7;
                while ((p = strstr(parser->bufp, "</param>")) == NULL)
                        if (ertf_read_line(parser) == ERTF_EOF) return;
index fd2d384..3523d55 100644 (file)
@@ -105,7 +105,7 @@ static void export_ldif_message( void ) {
        gchar *sMsg = NULL;
        gint pageNum;
 
-       pageNum = gtk_notebook_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
+       pageNum = gtk_notebook_get_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
        if( pageNum == PAGE_FILE_INFO ) {
                sMsg = _( "Please specify output directory and LDIF filename to create." );
        }
@@ -126,7 +126,7 @@ static void export_ldif_message( void ) {
 static void export_ldif_cancel( GtkWidget *widget, gpointer data ) {
        gint pageNum;
 
-       pageNum = gtk_notebook_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
+       pageNum = gtk_notebook_get_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
        if( pageNum != PAGE_FINISH ) {
                expldif_dlg.cancelled = TRUE;
        }
@@ -284,7 +284,7 @@ static void exp_ldif_finish_show( void ) {
 static void export_ldif_prev( GtkWidget *widget ) {
        gint pageNum;
 
-       pageNum = gtk_notebook_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
+       pageNum = gtk_notebook_get_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
        if( pageNum == PAGE_DN ) {
                /* Goto file page stuff */
                gtk_notebook_set_page(
@@ -307,7 +307,7 @@ static void export_ldif_prev( GtkWidget *widget ) {
 static void export_ldif_next( GtkWidget *widget ) {
        gint pageNum;
 
-       pageNum = gtk_notebook_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
+       pageNum = gtk_notebook_get_current_page( GTK_NOTEBOOK(expldif_dlg.notebook) );
        if( pageNum == PAGE_FILE_INFO ) {
                /* Goto distinguished name page */
                if( exp_ldif_move_file() ) {
index a0c28c9..937230c 100644 (file)
@@ -438,7 +438,7 @@ static gint exporthtml_compare_name(
        if( item2 ) name2 = ADDRITEM_NAME( item2 );
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 /*
@@ -454,7 +454,7 @@ static gint exporthtml_compare_email(
        if( email2 ) name2 = email2->address;
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 /*
@@ -470,7 +470,7 @@ static gint exporthtml_compare_attrib(
        if( attr2 ) name2 = attr2->name;
        if( ! name1 ) return ( name2 != NULL );
        if( ! name2 ) return -1;
-       return g_strcasecmp( name1, name2 );
+       return g_utf8_collate( name1, name2 );
 }
 
 /*
index 570ee79..5cbe524 100644 (file)
@@ -316,7 +316,7 @@ static gchar *exportldif_find_dn(
                UserAttribute *attrib = node->data;
 
                node = g_list_next( node );
-               if( g_strcasecmp( attrib->name, LDIF_TAG_DN ) == 0 ) {
+               if( g_utf8_collate( attrib->name, LDIF_TAG_DN ) == 0 ) {
                        retVal = g_strdup( attrib->value );
                        break;
                }
index 8289532..d45cff3 100644 (file)
@@ -413,17 +413,17 @@ void folder_item_set_xml(Folder *folder, FolderItem *item, XMLTag *tag)
 
                if (!attr || !attr->name || !attr->value) continue;
                if (!strcmp(attr->name, "type")) {
-                       if (!g_strcasecmp(attr->value, "normal"))
+                       if (!g_ascii_strcasecmp(attr->value, "normal"))
                                item->stype = F_NORMAL;
-                       else if (!g_strcasecmp(attr->value, "inbox"))
+                       else if (!g_ascii_strcasecmp(attr->value, "inbox"))
                                item->stype = F_INBOX;
-                       else if (!g_strcasecmp(attr->value, "outbox"))
+                       else if (!g_ascii_strcasecmp(attr->value, "outbox"))
                                item->stype = F_OUTBOX;
-                       else if (!g_strcasecmp(attr->value, "draft"))
+                       else if (!g_ascii_strcasecmp(attr->value, "draft"))
                                item->stype = F_DRAFT;
-                       else if (!g_strcasecmp(attr->value, "queue"))
+                       else if (!g_ascii_strcasecmp(attr->value, "queue"))
                                item->stype = F_QUEUE;
-                       else if (!g_strcasecmp(attr->value, "trash"))
+                       else if (!g_ascii_strcasecmp(attr->value, "trash"))
                                item->stype = F_TRASH;
                } else if (!strcmp(attr->name, "name")) {
                        if (item->name != NULL)
@@ -899,7 +899,7 @@ static gboolean folder_get_status_full_all_func(GNode *node, gpointer data)
 
        if (status->str) {
                id = folder_item_get_identifier(item);
-               g_string_sprintfa(status->str, "%5d %5d %5d %s\n",
+               g_string_append_printf(status->str, "%5d %5d %5d %s\n",
                                  item->new_msgs, item->unread_msgs,
                                  item->total_msgs, id);
                g_free(id);
@@ -958,7 +958,7 @@ gchar *folder_get_status(GPtrArray *folders, gboolean full)
                                gchar *id;
 
                                id = folder_item_get_identifier(item);
-                               g_string_sprintfa(str, "%5d %5d %5d %s\n",
+                               g_string_append_printf(str, "%5d %5d %5d %s\n",
                                                  item->new_msgs, item->unread_msgs,
                                                  item->total_msgs, id);
                                g_free(id);
@@ -970,9 +970,9 @@ gchar *folder_get_status(GPtrArray *folders, gboolean full)
        }
 
        if (full)
-               g_string_sprintfa(str, "%5d %5d %5d\n", new, unread, total);
+               g_string_append_printf(str, "%5d %5d %5d\n", new, unread, total);
        else
-               g_string_sprintfa(str, "%d %d %d\n", new, unread, total);
+               g_string_append_printf(str, "%d %d %d\n", new, unread, total);
 
        ret = str->str;
        g_string_free(str, FALSE);
@@ -1077,7 +1077,7 @@ FolderClass *folder_get_class_from_string(const gchar *str)
        classlist = folder_get_class_list();
        for (; classlist != NULL; classlist = g_slist_next(classlist)) {
                FolderClass *class = (FolderClass *) classlist->data;
-               if (g_strcasecmp(class->idstr, str) == 0)
+               if (g_ascii_strcasecmp(class->idstr, str) == 0)
                        return class;
        }
 
index 0d9c75c..e10b8eb 100644 (file)
@@ -366,5 +366,5 @@ static gint foldersel_clist_compare(GtkCList *clist,
        if (!item2->name)
                return -1;
 
-       return g_strcasecmp(item1->name, item2->name);
+       return g_utf8_collate(item1->name, item2->name);
 }
index b0f8edd..e2719ff 100644 (file)
@@ -1839,7 +1839,7 @@ static gint folderview_clist_compare(GtkCList *clist,
        if (!item2->name)
                return -1;
 
-       return g_strcasecmp(item1->name, item2->name);
+       return g_utf8_collate(item1->name, item2->name);
 }
 
 static void folderview_processing_cb(FolderView *folderview, guint action,
index 9a90027..d1850c7 100644 (file)
@@ -424,7 +424,7 @@ static void grouplist_dialog_set_list(const gchar *pattern, gboolean refresh)
                if (fnmatch(pattern, ginfo->name, 0) == 0) {
                        node = grouplist_create_branch(ginfo, pattern);
                        if (g_slist_find_custom(subscribed, ginfo->name,
-                                               (GCompareFunc)g_strcasecmp)
+                                               (GCompareFunc)g_ascii_strcasecmp)
                                                != NULL) {
                                gtk_ctree_select(GTK_CTREE(ctree), node);
                        }
@@ -551,7 +551,7 @@ static gboolean button_press_cb(GtkCTree *ctree, GdkEventButton *button,
        if (!ginfo) return TRUE;
 
        list = g_slist_find_custom(subscribed, ginfo->name,
-                                  (GCompareFunc)g_strcasecmp);
+                                  (GCompareFunc)g_ascii_strcasecmp);
        if (list) {
                g_free(list->data);
                subscribed = g_slist_remove(subscribed, list->data);
index 47d6adc..11f5124 100644 (file)
@@ -752,14 +752,14 @@ static void html_get_parenthesis(HTMLParser *parser, gchar *buf, gint len)
                parser->bufp = p + 3;
                return;
        }
-       if (!g_strncasecmp(parser->bufp, "<style", 6)) {
+       if (!g_ascii_strncasecmp(parser->bufp, "<style", 6)) {
                parser->bufp += 6;
                while ((p = strcasestr(parser->bufp, "</style>")) == NULL)
                        if (html_read_line(parser) == HTML_EOF) return;
                parser->bufp = p + 8;
                return;
        }
-       if (!g_strncasecmp(parser->bufp, "<script", 7)) {
+       if (!g_ascii_strncasecmp(parser->bufp, "<script", 7)) {
                parser->bufp += 7;
                while ((p = strcasestr(parser->bufp, "</script>")) == NULL)
                        if (html_read_line(parser) == HTML_EOF) return;
index 01e4e75..3fd9f0c 100644 (file)
@@ -1370,16 +1370,16 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item)
 
                        base = g_basename(new_item->path);
 
-                       if (!folder->outbox && !g_strcasecmp(base, "Sent")) {
+                       if (!folder->outbox && !g_ascii_strcasecmp(base, "Sent")) {
                                new_item->stype = F_OUTBOX;
                                folder->outbox = new_item;
-                       } else if (!folder->draft && !g_strcasecmp(base, "Drafts")) {
+                       } else if (!folder->draft && !g_ascii_strcasecmp(base, "Drafts")) {
                                new_item->stype = F_DRAFT;
                                folder->draft = new_item;
-                       } else if (!folder->queue && !g_strcasecmp(base, "Queue")) {
+                       } else if (!folder->queue && !g_ascii_strcasecmp(base, "Queue")) {
                                new_item->stype = F_QUEUE;
                                folder->queue = new_item;
-                       } else if (!folder->trash && !g_strcasecmp(base, "Trash")) {
+                       } else if (!folder->trash && !g_ascii_strcasecmp(base, "Trash")) {
                                new_item->stype = F_TRASH;
                                folder->trash = new_item;
                        }
@@ -2296,15 +2296,15 @@ static MsgFlags imap_parse_flags(const gchar *flag_str)
        while ((p = strchr(p, '\\')) != NULL) {
                p++;
 
-               if (g_strncasecmp(p, "Recent", 6) == 0 && MSG_IS_UNREAD(flags)) {
+               if (g_ascii_strncasecmp(p, "Recent", 6) == 0 && MSG_IS_UNREAD(flags)) {
                        MSG_SET_PERM_FLAGS(flags, MSG_NEW);
-               } else if (g_strncasecmp(p, "Seen", 4) == 0) {
+               } else if (g_ascii_strncasecmp(p, "Seen", 4) == 0) {
                        MSG_UNSET_PERM_FLAGS(flags, MSG_NEW|MSG_UNREAD);
-               } else if (g_strncasecmp(p, "Deleted", 7) == 0) {
+               } else if (g_ascii_strncasecmp(p, "Deleted", 7) == 0) {
                        MSG_SET_PERM_FLAGS(flags, MSG_DELETED);
-               } else if (g_strncasecmp(p, "Flagged", 7) == 0) {
+               } else if (g_ascii_strncasecmp(p, "Flagged", 7) == 0) {
                        MSG_SET_PERM_FLAGS(flags, MSG_MARKED);
-               } else if (g_strncasecmp(p, "Answered", 8) == 0) {
+               } else if (g_ascii_strncasecmp(p, "Answered", 8) == 0) {
                        MSG_SET_PERM_FLAGS(flags, MSG_REPLIED);
                }
        }
@@ -2573,7 +2573,7 @@ static gboolean imap_has_capability(IMAPSession *session, const gchar *cap)
        gchar **p;
        
        for (p = session->capability; *p != NULL; ++p) {
-               if (!g_strcasecmp(*p, cap))
+               if (!g_ascii_strcasecmp(*p, cap))
                        return TRUE;
        }
 
@@ -3123,7 +3123,7 @@ gint imap_cmd_envelope(IMAPSession *session, IMAPSet set)
                        if (namelen <= 0)
                                continue;
 
-                       g_string_sprintfa(header_fields, "%s%.*s",
+                       g_string_append_printf(header_fields, "%s%.*s",
                                        header_fields->str[0] != '\0' ? " " : "",
                                        namelen, elem->name);
                }
@@ -3241,7 +3241,7 @@ static void imap_gen_send(IMAPSession *session, const gchar *format, ...)
        session->cmd_count++;
 
        buf = g_strdup_printf("%d %s\r\n", session->cmd_count, tmp);
-       if (!g_strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) {
+       if (!g_ascii_strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) {
                *p = '\0';
                log_print("IMAP4> %d %s ********\n", session->cmd_count, tmp);
        } else
@@ -3604,9 +3604,9 @@ static GSList *imap_get_seq_set_from_numlist(MsgNumberList *numlist)
                        if (str->len > 0)
                                g_string_append_c(str, ',');
                        if (first == last)
-                               g_string_sprintfa(str, "%u", first);
+                               g_string_append_printf(str, "%u", first);
                        else
-                               g_string_sprintfa(str, "%u:%u", first, last);
+                               g_string_append_printf(str, "%u:%u", first, last);
 
                        first = next;
 
index 683932d..4af2649 100644 (file)
@@ -1298,7 +1298,7 @@ static gboolean jpilot_setup_labels( JPilotFile *pilotFile ) {
                        gint i;
                        for( i = 0; i < JPILOT_NUM_LABELS; i++ ) {
                                gchar *labelName = ai->labels[i];
-                               if( g_strcasecmp( labelName, lbl ) == 0 ) {
+                               if( g_utf8_collate( labelName, lbl ) == 0 ) {
                                        ind = i;
                                        break;
                                }
@@ -1738,7 +1738,7 @@ gboolean jpilot_test_custom_label( JPilotFile *pilotFile, const gchar *labelName
        if( labelName ) {
                node = pilotFile->customLabels;
                while( node ) {
-                       if( g_strcasecmp( labelName, ( gchar * ) node->data ) == 0 ) {
+                       if( g_utf8_collate( labelName, ( gchar * ) node->data ) == 0 ) {
                                retVal = TRUE;
                                break;
                        }
index 35a640f..b92ce5a 100644 (file)
@@ -444,7 +444,7 @@ static LdapQuery *ldapsvr_locate_query(
        /* Search backwards for query */
        while( node ) {
                LdapQuery *qry = node->data;
-               if( g_strcasecmp( ADDRQUERY_SEARCHVALUE(qry), searchTerm ) == 0 ) {
+               if( g_utf8_collate( ADDRQUERY_SEARCHVALUE(qry), searchTerm ) == 0 ) {
                        if( qry->agedFlag ) continue;
                        if( qry->completed ) {
                                /* Found */
index c5dcd78..6c3b735 100644 (file)
@@ -576,19 +576,19 @@ static void ldif_add_value(
        }
        g_strstrip( val );
 
-       if( g_strcasecmp( nm, LDIF_TAG_COMMONNAME ) == 0 ) {
+       if( g_utf8_collate( nm, LDIF_TAG_COMMONNAME ) == 0 ) {
                rec->listCName = g_slist_append( rec->listCName, val );
        }
-       else if( g_strcasecmp( nm, LDIF_TAG_FIRSTNAME ) == 0 ) {
+       else if( g_utf8_collate( nm, LDIF_TAG_FIRSTNAME ) == 0 ) {
                rec->listFName = g_slist_append( rec->listFName, val );
        }
-       else if( g_strcasecmp( nm, LDIF_TAG_LASTNAME ) == 0 ) {
+       else if( g_utf8_collate( nm, LDIF_TAG_LASTNAME ) == 0 ) {
                rec->listLName = g_slist_append( rec->listLName, val );
        }
-       else if( g_strcasecmp( nm, LDIF_TAG_NICKNAME ) == 0 ) {
+       else if( g_utf8_collate( nm, LDIF_TAG_NICKNAME ) == 0 ) {
                rec->listNName = g_slist_append( rec->listNName, val );
        }
-       else if( g_strcasecmp( nm, LDIF_TAG_EMAIL ) == 0 ) {
+       else if( g_utf8_collate( nm, LDIF_TAG_EMAIL ) == 0 ) {
                rec->listAddress = g_slist_append( rec->listAddress, val );
        }
        else {
@@ -817,27 +817,27 @@ static void ldif_hash_add_list( GHashTable *table, GSList *list ) {
                        gchar *key = g_strdup( tag );
 
                        rec = ldif_create_fieldrec( tag );
-                       if( g_strcasecmp( tag, LDIF_TAG_DN ) == 0 ) {
+                       if( g_utf8_collate( tag, LDIF_TAG_DN ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( "dn" );
                        }
-                       else if( g_strcasecmp( tag, LDIF_TAG_COMMONNAME ) == 0 ) {
+                       else if( g_utf8_collate( tag, LDIF_TAG_COMMONNAME ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( _( "Display Name" ) );
                        }
-                       else if( g_strcasecmp( tag, LDIF_TAG_FIRSTNAME ) == 0 ) {
+                       else if( g_utf8_collate( tag, LDIF_TAG_FIRSTNAME ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( _( "First Name" ) );
                        }
-                       else if( g_strcasecmp( tag, LDIF_TAG_LASTNAME ) == 0 ) {
+                       else if( g_utf8_collate( tag, LDIF_TAG_LASTNAME ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( _( "Last Name" ) );
                        }
-                       else if( g_strcasecmp( tag, LDIF_TAG_NICKNAME ) == 0 ) {
+                       else if( g_utf8_collate( tag, LDIF_TAG_NICKNAME ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( _( "Nick Name" ) );
                        }
-                       else if( g_strcasecmp( tag, LDIF_TAG_EMAIL ) == 0 ) {
+                       else if( g_utf8_collate( tag, LDIF_TAG_EMAIL ) == 0 ) {
                                rec->reserved = rec->selected = TRUE;
                                rec->userName = g_strdup( _( "E-Mail Address" ) );
                        }
@@ -868,7 +868,7 @@ static gint ldif_field_compare( gconstpointer ptr1, gconstpointer ptr2 ) {
                        return -1;
                }
        }
-       return g_strcasecmp( rec1->tagName, rec2->tagName );
+       return g_utf8_collate( rec1->tagName, rec2->tagName );
 }
 
 /*
@@ -947,7 +947,7 @@ static void ldif_read_tag_list( LdifFile *ldifFile ) {
                                if( tagName ) {
                                        /* Add tag to list */
                                        listTags = g_slist_append( listTags, tagName );
-                                       if( g_strcasecmp(
+                                       if( g_utf8_collate(
                                                tagName, LDIF_TAG_EMAIL ) == 0 )
                                        {
                                                flagMail = TRUE;
index b48fbe2..92422f0 100644 (file)
@@ -532,7 +532,7 @@ static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinf
        MimeViewer *viewer = NULL;
 
        if ((partinfo->type == MIMETYPE_APPLICATION) &&
-            (!g_strcasecmp(partinfo->subtype, "octet-stream"))) {
+            (!g_ascii_strcasecmp(partinfo->subtype, "octet-stream"))) {
                const gchar *filename;
 
                filename = procmime_mimeinfo_get_parameter(partinfo, "filename");
@@ -823,7 +823,7 @@ static gboolean part_button_pressed(MimeView *mimeview, GdkEventButton *event,
                                           "/Display as text", TRUE);
                if (partinfo &&
                    partinfo->type == MIMETYPE_APPLICATION &&
-                   !g_strcasecmp(partinfo->subtype, "octet-stream"))
+                   !g_ascii_strcasecmp(partinfo->subtype, "octet-stream"))
                        menu_set_sensitive(mimeview->popupfactory,
                                           "/Open", FALSE);
                else
@@ -1273,7 +1273,7 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
                cmd = cmdline;
                def_cmd = NULL;
        } else if (MIMETYPE_APPLICATION == partinfo->type &&
-                  !g_strcasecmp(partinfo->subtype, "octet-stream")) {
+                  !g_ascii_strcasecmp(partinfo->subtype, "octet-stream")) {
                return;
        } else if (MIMETYPE_IMAGE == partinfo->type) {
                cmd = prefs_common.mime_image_viewer;
@@ -1515,9 +1515,9 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
        switch (mimeinfo->type) {
                
        case MIMETYPE_TEXT:
-               if (mimeinfo->subtype && !g_strcasecmp(mimeinfo->subtype, "html"))
+               if (mimeinfo->subtype && !g_ascii_strcasecmp(mimeinfo->subtype, "html"))
                        stockp = STOCK_PIXMAP_MIME_TEXT_HTML;
-               else if  (mimeinfo->subtype && !g_strcasecmp(mimeinfo->subtype, "enriched"))
+               else if  (mimeinfo->subtype && !g_ascii_strcasecmp(mimeinfo->subtype, "enriched"))
                        stockp = STOCK_PIXMAP_MIME_TEXT_ENRICHED;
                else
                        stockp = STOCK_PIXMAP_MIME_TEXT_PLAIN;
index 23a4d4c..71da53a 100644 (file)
@@ -364,7 +364,7 @@ static void news_group_info_free(NewsGroupInfo *ginfo)
 static gint news_group_info_compare(NewsGroupInfo *ginfo1,
                                    NewsGroupInfo *ginfo2)
 {
-       return g_strcasecmp(ginfo1->name, ginfo2->name);
+       return g_ascii_strcasecmp(ginfo1->name, ginfo2->name);
 }
 
 GSList *news_get_group_list(Folder *folder)
@@ -578,7 +578,7 @@ static gint news_select_group(NNTPSession *session, const gchar *group,
        gint num_, first_, last_;
 
        if (!num || !first || !last) {
-               if (session->group && g_strcasecmp(session->group, group) == 0)
+               if (session->group && g_ascii_strcasecmp(session->group, group) == 0)
                        return NN_SUCCESS;
                num = &num_;
                first = &first_;
index b800bf4..b285a37 100644 (file)
@@ -129,7 +129,7 @@ static void subscribe_newsgroup_cb(FolderView *folderview, guint action, GtkWidg
 
                item = FOLDER_ITEM(gnode->data);
                if (g_slist_find_custom(new_subscr, item->path,
-                                       (GCompareFunc)g_strcasecmp) != NULL) {
+                                       (GCompareFunc)g_ascii_strcasecmp) != NULL) {
                        gnode = next;
                        continue;
                }
index 2e0ee50..fc474cb 100644 (file)
@@ -93,10 +93,10 @@ static gboolean pgpmime_is_signed(MimeInfo *mimeinfo)
        if (parent == NULL)
                return FALSE;
        if ((parent->type != MIMETYPE_MULTIPART) ||
-           g_strcasecmp(parent->subtype, "signed"))
+           g_ascii_strcasecmp(parent->subtype, "signed"))
                return FALSE;
        protocol = procmime_mimeinfo_get_parameter(parent, "protocol");
-       if ((protocol == NULL) || g_strcasecmp(protocol, "application/pgp-signature"))
+       if ((protocol == NULL) || g_ascii_strcasecmp(protocol, "application/pgp-signature"))
                return FALSE;
 
        /* check if mimeinfo is the first child */
@@ -109,7 +109,7 @@ static gboolean pgpmime_is_signed(MimeInfo *mimeinfo)
        if (signature == NULL)
                return FALSE;
        if ((signature->type != MIMETYPE_APPLICATION) ||
-           g_strcasecmp(signature->subtype, "pgp-signature"))
+           g_ascii_strcasecmp(signature->subtype, "pgp-signature"))
                return FALSE;
 
        if (data == NULL) {
@@ -239,10 +239,10 @@ static gboolean pgpmime_is_encrypted(MimeInfo *mimeinfo)
        
        if (mimeinfo->type != MIMETYPE_MULTIPART)
                return FALSE;
-       if (g_strcasecmp(mimeinfo->subtype, "encrypted"))
+       if (g_ascii_strcasecmp(mimeinfo->subtype, "encrypted"))
                return FALSE;
        tmpstr = procmime_mimeinfo_get_parameter(mimeinfo, "protocol");
-       if ((tmpstr == NULL) || g_strcasecmp(tmpstr, "application/pgp-encrypted"))
+       if ((tmpstr == NULL) || g_ascii_strcasecmp(tmpstr, "application/pgp-encrypted"))
                return FALSE;
        if (g_node_n_children(mimeinfo->node) != 2)
                return FALSE;
@@ -250,13 +250,13 @@ static gboolean pgpmime_is_encrypted(MimeInfo *mimeinfo)
        tmpinfo = (MimeInfo *) g_node_nth_child(mimeinfo->node, 0)->data;
        if (tmpinfo->type != MIMETYPE_APPLICATION)
                return FALSE;
-       if (g_strcasecmp(tmpinfo->subtype, "pgp-encrypted"))
+       if (g_ascii_strcasecmp(tmpinfo->subtype, "pgp-encrypted"))
                return FALSE;
        
        tmpinfo = (MimeInfo *) g_node_nth_child(mimeinfo->node, 1)->data;
        if (tmpinfo->type != MIMETYPE_APPLICATION)
                return FALSE;
-       if (g_strcasecmp(tmpinfo->subtype, "octet-stream"))
+       if (g_ascii_strcasecmp(tmpinfo->subtype, "octet-stream"))
                return FALSE;
        
        return TRUE;
index 3b72e7c..6621ea5 100644 (file)
@@ -487,7 +487,7 @@ cmp_attr (gconstpointer pa, gconstpointer pb, GpgmeAttr attr)
         return !!sb;
     if (!sb)
         return -1;
-    return g_strcasecmp(sa, sb);
+    return g_ascii_strcasecmp(sa, sb);
 }
 
 static gint 
index 271a6ad..c1e5aa3 100644 (file)
@@ -166,7 +166,7 @@ gchar *sgpgme_sigstat_info_full(GpgmeCtx ctx, GpgmeSigStat status)
                strftime(timestr, 64, "%c", gmtime(&sigtime));
                keytype = gpgme_key_get_string_attr(key, GPGME_ATTR_ALGO, NULL, 0);
                keyid = gpgme_key_get_string_attr(key, GPGME_ATTR_KEYID, NULL, 0);
-               g_string_sprintfa(siginfo,
+               g_string_append_printf(siginfo,
                        _("Signature made %s using %s key ID %s\n"),
                        timestr, keytype, keyid);
                
@@ -175,17 +175,17 @@ gchar *sgpgme_sigstat_info_full(GpgmeCtx ctx, GpgmeSigStat status)
                switch (sigstatus) {
                case GPGME_SIG_STAT_GOOD:
                case GPGME_SIG_STAT_GOOD_EXPKEY:
-                       g_string_sprintfa(siginfo,
+                       g_string_append_printf(siginfo,
                                _("Good signature from \"%s\"\n"),
                                uid);
                        break;
                case GPGME_SIG_STAT_GOOD_EXP:
-                       g_string_sprintfa(siginfo,
+                       g_string_append_printf(siginfo,
                                _("Expired signature from \"%s\"\n"),
                                uid);
                        break;
                case GPGME_SIG_STAT_BAD:
-                       g_string_sprintfa(siginfo,
+                       g_string_append_printf(siginfo,
                                _("BAD signature from \"%s\"\n"),
                                uid);
                        break;
@@ -196,12 +196,12 @@ gchar *sgpgme_sigstat_info_full(GpgmeCtx ctx, GpgmeSigStat status)
                        gint j = 1;
                        
                        while ((uid = gpgme_key_get_string_attr(key, GPGME_ATTR_USERID, NULL, j)) != 0) {
-                               g_string_sprintfa(siginfo,
+                               g_string_append_printf(siginfo,
                                        _("                aka \"%s\"\n"),
                                        uid);
                                j++;
                        }
-                       g_string_sprintfa(siginfo,
+                       g_string_append_printf(siginfo,
                                _("Primary key fingerprint: %s\n"), 
                                gpgme_key_get_string_attr(key, GPGME_ATTR_FPR, NULL, 0));
                }
@@ -216,7 +216,7 @@ gchar *sgpgme_sigstat_info_full(GpgmeCtx ctx, GpgmeSigStat status)
                                format = _("Signature expires %s\n");
                        else
                                format = _("Signature expired %s\n");
-                       g_string_sprintfa(siginfo, format, timestr);
+                       g_string_append_printf(siginfo, format, timestr);
                }
                
                g_string_append(siginfo, "\n");
index fa7492b..dff3e6a 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -476,7 +476,7 @@ static void pop3_gen_send(Pop3Session *session, const gchar *format, ...)
        g_vsnprintf(buf, sizeof(buf) - 2, format, args);
        va_end(args);
 
-       if (!g_strncasecmp(buf, "PASS ", 5))
+       if (!g_ascii_strncasecmp(buf, "PASS ", 5))
                log_print("POP3> PASS ********\n");
        else
                log_print("POP3> %s\n", buf);
index 445e48e..3c22880 100644 (file)
@@ -509,7 +509,7 @@ static gint prefs_display_header_find_header(GtkCList *clist,
        DisplayHeaderProp *dp;
 
        while ((dp = gtk_clist_get_row_data(clist, row)) != NULL) {
-               if (g_strcasecmp(dp->name, header) == 0)
+               if (g_ascii_strcasecmp(dp->name, header) == 0)
                        return row;
                row++;
        }
index a8eff16..eff1200 100644 (file)
@@ -108,7 +108,7 @@ void prefs_config_parse_one_line(PrefParam *param, const gchar *buf)
 
        for (i = 0; param[i].name != NULL; i++) {
                name_len = strlen(param[i].name);
-               if (g_strncasecmp(buf, param[i].name, name_len))
+               if (g_ascii_strncasecmp(buf, param[i].name, name_len))
                        continue;
                if (buf[name_len] != '=')
                        continue;
@@ -395,7 +395,7 @@ void prefs_set_default(PrefParam *param)
                        break;
                case P_BOOL:
                        if (param[i].defval != NULL) {
-                               if (!g_strcasecmp(param[i].defval, "TRUE"))
+                               if (!g_ascii_strcasecmp(param[i].defval, "TRUE"))
                                        *((gboolean *)param[i].data) = TRUE;
                                else
                                        *((gboolean *)param[i].data) =
@@ -557,7 +557,7 @@ void prefs_set_dialog_to_default(PrefParam *param)
                case P_STRING:
                case P_PASSWORD:
                        if (tmpparam.defval) {
-                               if (!g_strncasecmp(tmpparam.defval, "ENV_", 4)) {
+                               if (!g_ascii_strncasecmp(tmpparam.defval, "ENV_", 4)) {
                                        str_data = g_strdup(g_getenv(param[i].defval + 4));
                                        tmpparam.data = &str_data;
                                        break;
@@ -588,7 +588,7 @@ void prefs_set_dialog_to_default(PrefParam *param)
                        break;
                case P_BOOL:
                        if (tmpparam.defval) {
-                               if (!g_strcasecmp(tmpparam.defval, "TRUE"))
+                               if (!g_ascii_strcasecmp(tmpparam.defval, "TRUE"))
                                        bool_data = TRUE;
                                else
                                        bool_data = atoi(tmpparam.defval)
index d18a9c0..6facc38 100644 (file)
@@ -229,22 +229,22 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
        gint rgbvalue = 0;
        GtkColorSelectionDialog *dialog;
 
-       if(g_strcasecmp(type, "LEVEL1") == 0) {
+       if(g_ascii_strcasecmp(type, "LEVEL1") == 0) {
                title = _("Pick color for quotation level 1");
                rgbvalue = prefs_common.quote_level1_col;
-       } else if(g_strcasecmp(type, "LEVEL2") == 0) {
+       } else if(g_ascii_strcasecmp(type, "LEVEL2") == 0) {
                title = _("Pick color for quotation level 2");
                rgbvalue = prefs_common.quote_level2_col;
-       } else if(g_strcasecmp(type, "LEVEL3") == 0) {
+       } else if(g_ascii_strcasecmp(type, "LEVEL3") == 0) {
                title = _("Pick color for quotation level 3");
                rgbvalue = prefs_common.quote_level3_col;
-       } else if(g_strcasecmp(type, "URI") == 0) {
+       } else if(g_ascii_strcasecmp(type, "URI") == 0) {
                title = _("Pick color for URI");
                rgbvalue = prefs_common.uri_col;
-       } else if(g_strcasecmp(type, "TGTFLD") == 0) {
+       } else if(g_ascii_strcasecmp(type, "TGTFLD") == 0) {
                title = _("Pick color for target folder");
                rgbvalue = prefs_common.tgt_folder_col;
-       } else if(g_strcasecmp(type, "SIGNATURE") == 0) {
+       } else if(g_ascii_strcasecmp(type, "SIGNATURE") == 0) {
                title = _("Pick color for signatures");
                rgbvalue = prefs_common.signature_col;
        } else {   /* Should never be called */
@@ -297,23 +297,23 @@ static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
        fprintf(stderr, "Color is %x\n", rgbvalue);
 #endif
 
-       if (g_strcasecmp(type, "LEVEL1") == 0) {
+       if (g_ascii_strcasecmp(type, "LEVEL1") == 0) {
                prefs_common.quote_level1_col = rgbvalue;
                set_button_bg_color(color_buttons.quote_level1_btn, rgbvalue);
-       } else if (g_strcasecmp(type, "LEVEL2") == 0) {
+       } else if (g_ascii_strcasecmp(type, "LEVEL2") == 0) {
                prefs_common.quote_level2_col = rgbvalue;
                set_button_bg_color(color_buttons.quote_level2_btn, rgbvalue);
-       } else if (g_strcasecmp(type, "LEVEL3") == 0) {
+       } else if (g_ascii_strcasecmp(type, "LEVEL3") == 0) {
                prefs_common.quote_level3_col = rgbvalue;
                set_button_bg_color(color_buttons.quote_level3_btn, rgbvalue);
-       } else if (g_strcasecmp(type, "URI") == 0) {
+       } else if (g_ascii_strcasecmp(type, "URI") == 0) {
                prefs_common.uri_col = rgbvalue;
                set_button_bg_color(color_buttons.uri_btn, rgbvalue);
-       } else if (g_strcasecmp(type, "TGTFLD") == 0) {
+       } else if (g_ascii_strcasecmp(type, "TGTFLD") == 0) {
                prefs_common.tgt_folder_col = rgbvalue;
                set_button_bg_color(color_buttons.tgt_folder_btn, rgbvalue);
                folderview_set_target_folder_color(prefs_common.tgt_folder_col);
-       } else if (g_strcasecmp(type, "SIGNATURE") == 0) {
+       } else if (g_ascii_strcasecmp(type, "SIGNATURE") == 0) {
                prefs_common.signature_col = rgbvalue;
                set_button_bg_color(color_buttons.signature_btn, rgbvalue);
        } else
index 28f9db3..5a70710 100644 (file)
@@ -319,12 +319,12 @@ static gboolean is_duplicate(ToolbarPage *prefs_toolbar, gchar *chosen_action)
                return FALSE;
        
        /* allow duplicate entries (A_SYL_ACTIONS) */
-       if (g_strcasecmp(syl_act, chosen_action) == 0)
+       if (g_utf8_collate(syl_act, chosen_action) == 0)
                return FALSE;
 
        do {
                gtk_clist_get_text(clist, row, 3, &entry);
-               if ( g_strcasecmp(chosen_action, entry) == 0)
+               if ( g_utf8_collate(chosen_action, entry) == 0)
                        return TRUE;
                row++;
        } while ((gtk_clist_get_text(clist, row, 3, &entry)) && (row <= clist->rows));
@@ -377,7 +377,7 @@ static void prefs_toolbar_register(GtkButton *button, ToolbarPage *prefs_toolbar
        item[3] = g_strdup(gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_entry)));
        
        /* SEPARATOR or other ? */
-       if (g_strcasecmp(item[1], toolbar_ret_descr_from_val(A_SEPARATOR)) == 0) {
+       if (g_utf8_collate(item[1], toolbar_ret_descr_from_val(A_SEPARATOR)) == 0) {
                item[0] = g_strdup(SEPARATOR_PIXMAP);
                item[2] = g_strdup("");
                item[3] = g_strdup(toolbar_ret_descr_from_val(A_SEPARATOR));
@@ -396,7 +396,7 @@ static void prefs_toolbar_register(GtkButton *button, ToolbarPage *prefs_toolbar
                stock_pixmap_gdk(prefs_toolbar->window, stock_pixmap_get_icon(item[1]),
                                  &xpm, &xpmmask);
 
-               if (g_strcasecmp(item[3], syl_act) == 0) {
+               if (g_utf8_collate(item[3], syl_act) == 0) {
 
                        const gchar *entry = gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
                        get_action_name(entry, &item[2]);
@@ -447,7 +447,7 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
        gtk_clist_get_text(clist_set, row_set, 3, &ac_set);
        item[3] = g_strdup(gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_entry)));
 
-       if (g_strcasecmp(item[1], toolbar_ret_descr_from_val(A_SEPARATOR)) == 0) {
+       if (g_utf8_collate(item[1], toolbar_ret_descr_from_val(A_SEPARATOR)) == 0) {
                item[0] = g_strdup(SEPARATOR_PIXMAP);
                item[2] = g_strdup("");
                item[3] = g_strdup(toolbar_ret_descr_from_val(A_SEPARATOR));
@@ -458,7 +458,7 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
                g_free(item[0]);
        } else {
 
-               if ((is_duplicate(prefs_toolbar, item[3])) && (g_strcasecmp(item[3], ac_set) != 0)){
+               if ((is_duplicate(prefs_toolbar, item[3])) && (g_utf8_collate(item[3], ac_set) != 0)){
                        alertpanel_error(ERROR_MSG);
                        g_free(item[3]);
                        return;
@@ -467,7 +467,7 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
                stock_pixmap_gdk(prefs_toolbar->window, stock_pixmap_get_icon(item[1]),
                                  &xpm, &xpmmask);
 
-               if (g_strcasecmp(item[3], syl_act) == 0) {
+               if (g_utf8_collate(item[3], syl_act) == 0) {
 
                        const gchar *entry = gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
                        get_action_name(entry, &item[2]);
@@ -562,13 +562,13 @@ static void prefs_toolbar_select_row_set(GtkCList *clist, gint row, gint column,
        gtk_clist_get_text(clist, row_set, 2, &icon_text);
        gtk_clist_get_text(clist, row_set, 3, &descr);
 
-       if (g_strcasecmp(descr, syl_act) != 0)
+       if (g_utf8_collate(descr, syl_act) != 0)
                gtk_entry_set_text(GTK_ENTRY(prefs_toolbar->entry_icon_text), icon_text);
        
        /* scan combo list for selected description an set combo item accordingly */
        for (cur = prefs_toolbar->combo_action_list; cur != NULL; cur = cur->next) {
                gchar *item_str = (gchar*)cur->data;
-               if (g_strcasecmp(item_str, descr) == 0) {
+               if (g_utf8_collate(item_str, descr) == 0) {
                        gtk_list_select_item(GTK_LIST(prefs_toolbar->combo_list), item_num);
                        break;
                }
@@ -579,7 +579,7 @@ static void prefs_toolbar_select_row_set(GtkCList *clist, gint row, gint column,
        do {
                gtk_clist_get_text(clist_ico, row_ico, 1, &entry);
                row_ico++;
-       } while(g_strcasecmp(entry, file) != 0);
+       } while(g_utf8_collate(entry, file) != 0);
        
        gtk_clist_select_row(clist_ico, row_ico - 1, 0);
        gtk_clist_moveto(clist_ico, row_ico - 1, 0, row_ico/clist_ico->rows, 0);
@@ -595,7 +595,7 @@ static void prefs_toolbar_select_row_icons(GtkCList *clist, gint row, gint colum
 
        if (!text) return;
 
-       if (g_strcasecmp(toolbar_ret_descr_from_val(A_SEPARATOR), text) == 0) {
+       if (g_utf8_collate(toolbar_ret_descr_from_val(A_SEPARATOR), text) == 0) {
                gtk_widget_set_sensitive(prefs_toolbar->combo_action,     FALSE);
                gtk_widget_set_sensitive(prefs_toolbar->entry_icon_text,  FALSE);
                gtk_widget_set_sensitive(prefs_toolbar->combo_syl_action, FALSE);
@@ -614,7 +614,7 @@ static void prefs_toolbar_selection_changed(GtkList *list,
 
        gtk_widget_set_sensitive(prefs_toolbar->combo_syl_action, TRUE);
 
-       if (g_strcasecmp(cur_entry, actions_entry) == 0) {
+       if (g_utf8_collate(cur_entry, actions_entry) == 0) {
                gtk_widget_hide(prefs_toolbar->entry_icon_text);
                gtk_widget_show(prefs_toolbar->combo_syl_action);
                gtk_label_set_text(GTK_LABEL(prefs_toolbar->label_icon_text), _("Sylpheed Action"));
index 7aaae5e..81481cc 100644 (file)
@@ -118,7 +118,7 @@ static gint generic_get_one_field(gchar *buf, gint len, void *data,
 
                        for (hp = hentry, hnum = 0; hp->name != NULL;
                             hp++, hnum++) {
-                               if (!g_strncasecmp(hp->name, buf,
+                               if (!g_ascii_strncasecmp(hp->name, buf,
                                                 strlen(hp->name)))
                                        break;
                        }
@@ -400,7 +400,7 @@ gboolean procheader_headername_equal(char * hdr1, char * hdr2)
        if (len1 != len2)
                return 0;
 
-       return (g_strncasecmp(hdr1, hdr2, len1) == 0);
+       return (g_ascii_strncasecmp(hdr1, hdr2, len1) == 0);
 }
 
 /*
@@ -681,7 +681,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                        }
                        break;
                case H_CONTENT_TYPE:
-                       if (!g_strncasecmp(hp, "multipart/", 10))
+                       if (!g_ascii_strncasecmp(hp, "multipart/", 10))
                                MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MULTIPART);
                        break;
 #ifdef ALLOW_HEADER_HINT                       
@@ -914,7 +914,7 @@ time_t procheader_date_parse(gchar *dest, const gchar *src, gint len)
 
        month[3] = '\0';
        for (p = monthstr; *p != '\0'; p += 3) {
-               if (!g_strncasecmp(p, month, 3)) {
+               if (!g_ascii_strncasecmp(p, month, 3)) {
                        dmonth = (gint)(p - monthstr) / 3 + 1;
                        break;
                }
index 1fdead7..e9305da 100644 (file)
@@ -625,7 +625,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo)
                struct ContentRenderer * cr;
 
                cr = cur->data;
-               if (g_strcasecmp(cr->content_type, content_type) == 0) {
+               if (g_ascii_strcasecmp(cr->content_type, content_type) == 0) {
                        renderer = cr;
                        break;
                }
@@ -654,7 +654,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo)
                dup2(oldout, 1);
 #warning FIXME_GTK2 HTML/RTF not yet utf8
 /* CodeConverter seems to have no effect here */
-       } else if (mimeinfo->type == MIMETYPE_TEXT && !g_strcasecmp(mimeinfo->subtype, "html")) {
+       } else if (mimeinfo->type == MIMETYPE_TEXT && !g_ascii_strcasecmp(mimeinfo->subtype, "html")) {
                HTMLParser *parser;
                CodeConverter *conv;
 
@@ -665,7 +665,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo)
                }
                html_parser_destroy(parser);
                conv_code_converter_destroy(conv);
-       } else if (mimeinfo->type == MIMETYPE_TEXT && !g_strcasecmp(mimeinfo->subtype, "enriched")) {
+       } else if (mimeinfo->type == MIMETYPE_TEXT && !g_ascii_strcasecmp(mimeinfo->subtype, "enriched")) {
                ERTFParser *parser;
                CodeConverter *conv;
 
@@ -800,7 +800,7 @@ gchar *procmime_get_tmp_file_name(MimeInfo *mimeinfo)
 
        g_snprintf(f_prefix, sizeof(f_prefix), "%08x.", id++);
 
-       if ((mimeinfo->type == MIMETYPE_TEXT) && !g_strcasecmp(mimeinfo->subtype, "html"))
+       if ((mimeinfo->type == MIMETYPE_TEXT) && !g_ascii_strcasecmp(mimeinfo->subtype, "html"))
                base = "mimetmp.html";
        else {
                const gchar *basetmp;
@@ -872,7 +872,7 @@ static gint procmime_str_equal(gconstpointer gptr1, gconstpointer gptr2)
        const char *str1 = gptr1;
        const char *str2 = gptr2;
 
-       return !g_strcasecmp(str1, str2);
+       return !g_utf8_collate(str1, str2);
 }
 
 static GHashTable *procmime_get_mime_type_table(void)
@@ -973,14 +973,14 @@ EncodingType procmime_get_encoding_for_charset(const gchar *charset)
 {
        if (!charset)
                return ENC_8BIT;
-       else if (!g_strncasecmp(charset, "ISO-2022-", 9) ||
-                !g_strcasecmp(charset, "US-ASCII"))
+       else if (!g_ascii_strncasecmp(charset, "ISO-2022-", 9) ||
+                !g_ascii_strcasecmp(charset, "US-ASCII"))
                return ENC_7BIT;
-       else if (!g_strcasecmp(charset, "ISO-8859-5") ||
-                !g_strncasecmp(charset, "KOI8-", 5) ||
-                !g_strcasecmp(charset, "Windows-1251"))
+       else if (!g_ascii_strcasecmp(charset, "ISO-8859-5") ||
+                !g_ascii_strncasecmp(charset, "KOI8-", 5) ||
+                !g_ascii_strcasecmp(charset, "Windows-1251"))
                return ENC_8BIT;
-       else if (!g_strncasecmp(charset, "ISO-8859-", 9))
+       else if (!g_ascii_strncasecmp(charset, "ISO-8859-", 9))
                return ENC_QUOTED_PRINTABLE;
        else
                return ENC_8BIT;
@@ -1074,7 +1074,7 @@ MimeMediaType procmime_get_media_type(const gchar *str)
        struct TypeTable *typetablearray;
 
        for (typetablearray = mime_type_table; typetablearray->str != NULL; typetablearray++)
-               if (g_strncasecmp(str, typetablearray->str, strlen(typetablearray->str)) == 0)
+               if (g_ascii_strncasecmp(str, typetablearray->str, strlen(typetablearray->str)) == 0)
                        return typetablearray->type;
 
        return MIMETYPE_UNKNOWN;
@@ -1334,9 +1334,9 @@ static void procmime_parse_content_disposition(const gchar *content_disposition,
                g_strfreev(content_disp_parts);
                return;
        }
-       if (!g_strcasecmp(str, "inline")) 
+       if (!g_ascii_strcasecmp(str, "inline")) 
                mimeinfo->disposition = DISPOSITIONTYPE_INLINE;
-       else if (!g_strcasecmp(str, "attachment"))
+       else if (!g_ascii_strcasecmp(str, "attachment"))
                mimeinfo->disposition = DISPOSITIONTYPE_ATTACHMENT;
        else
                mimeinfo->disposition = DISPOSITIONTYPE_ATTACHMENT;
@@ -1351,7 +1351,7 @@ static void procmime_parse_content_encoding(const gchar *content_encoding, MimeI
        struct EncodingTable *enc_table;
        
        for (enc_table = encoding_table; enc_table->str != NULL; enc_table++) {
-               if (g_strcasecmp(enc_table->str, content_encoding) == 0) {
+               if (g_ascii_strcasecmp(enc_table->str, content_encoding) == 0) {
                        mimeinfo->encoding_type = enc_table->enc_type;
                        return;
                }
@@ -1415,7 +1415,7 @@ void procmime_parse_mimepart(MimeInfo *parent,
        /* Call parser for mime type */
        switch (mimeinfo->type) {
                case MIMETYPE_MESSAGE:
-                       if (g_strcasecmp(mimeinfo->subtype, "rfc822") == 0) {
+                       if (g_ascii_strcasecmp(mimeinfo->subtype, "rfc822") == 0) {
                                procmime_parse_message_rfc822(mimeinfo);
                        }
                        break;
@@ -1592,12 +1592,12 @@ gint procmime_write_message_rfc822(MimeInfo *mimeinfo, FILE *fp)
                                break;
                        if (skip && (buf[0] == ' ' || buf[0] == '\t'))
                                continue;
-                       if (g_strncasecmp(buf, "Mime-Version:", 13) == 0 ||
-                           g_strncasecmp(buf, "Content-Type:", 13) == 0 ||
-                           g_strncasecmp(buf, "Content-Transfer-Encoding:", 26) == 0 ||
-                           g_strncasecmp(buf, "Content-Description:", 20) == 0 ||
-                           g_strncasecmp(buf, "Content-ID:", 11) == 0 ||
-                           g_strncasecmp(buf, "Content-Disposition:", 20) == 0) {
+                       if (g_ascii_strncasecmp(buf, "Mime-Version:", 13) == 0 ||
+                           g_ascii_strncasecmp(buf, "Content-Type:", 13) == 0 ||
+                           g_ascii_strncasecmp(buf, "Content-Transfer-Encoding:", 26) == 0 ||
+                           g_ascii_strncasecmp(buf, "Content-Description:", 20) == 0 ||
+                           g_ascii_strncasecmp(buf, "Content-ID:", 11) == 0 ||
+                           g_ascii_strncasecmp(buf, "Content-Disposition:", 20) == 0) {
                                skip = TRUE;
                                continue;
                        }
@@ -1715,7 +1715,7 @@ gint procmime_write_mimeinfo(MimeInfo *mimeinfo, FILE *fp)
                /* Call writer for mime type */
                switch (mimeinfo->type) {
                case MIMETYPE_MESSAGE:
-                       if (g_strcasecmp(mimeinfo->subtype, "rfc822") == 0)
+                       if (g_ascii_strcasecmp(mimeinfo->subtype, "rfc822") == 0)
                                return procmime_write_message_rfc822(mimeinfo, fp);
                        break;
                        
index 8fc152a..f1d611c 100644 (file)
@@ -778,7 +778,7 @@ GtkCTreeNode * summary_find_prev_important_score(SummaryView *summaryview,
 
 #define CURRENTLY_DISPLAYED(m) \
 ( (m->msgnum == displayed_msgnum) \
-  && (!g_strcasecmp(m->folder->name,item->name)) )
+  && (!g_ascii_strcasecmp(m->folder->name,item->name)) )
 
 gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 {
@@ -2911,7 +2911,7 @@ static gboolean check_permission(SummaryView *summaryview, MsgInfo * msginfo)
                                        g_strdup_printf("%s",
                                                        account->address);
                        
-                       if (g_strcasecmp(from_name, msginfo->from) == 0) {
+                       if (g_utf8_collate(from_name, msginfo->from) == 0) {
                                g_free(from_name);
                                found = TRUE;
                                break;
@@ -4844,7 +4844,7 @@ static gint func_name(GtkCList *clist,                                     \
        if (!msginfo2->var_name)                                         \
                return -1;                                               \
                                                                         \
-       return g_strcasecmp(msginfo1->var_name, msginfo2->var_name);     \
+       return g_utf8_collate(msginfo1->var_name, msginfo2->var_name);   \
 }
 
 CMP_FUNC_DEF(summary_cmp_by_to, to);
@@ -4886,7 +4886,7 @@ static gint summary_cmp_by_from(GtkCList *clist, gconstpointer ptr1,
        if (!str2)
                return -1;
  
-       return g_strcasecmp(str1, str2);
+       return g_utf8_collate(str1, str2);
 }
  
 static gint summary_cmp_by_simplified_subject
index e659a4e..97d8703 100644 (file)
@@ -332,7 +332,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
        g_return_if_fail(fp != NULL);
 
        if ((mimeinfo->type == MIMETYPE_MULTIPART) ||
-           ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_strcasecmp(mimeinfo->subtype, "rfc822"))) {
+           ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
                textview_clear(textview);
                textview_add_parts(textview, mimeinfo);
                return;
@@ -369,7 +369,7 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
 
        if (mimeinfo->type == MIMETYPE_MULTIPART) return;
 
-       if ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_strcasecmp(mimeinfo->subtype, "rfc822")) {
+       if ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822")) {
                FILE *fp;
 
                fp = fopen(mimeinfo->data.filename, "rb");
@@ -422,7 +422,7 @@ static void recursive_add_parts(TextView *textview, GNode *node)
             (mimeinfo->type != MIMETYPE_MESSAGE))
                 return;
         
-        if (g_strcasecmp(mimeinfo->subtype, "alternative") == 0) {
+        if (g_ascii_strcasecmp(mimeinfo->subtype, "alternative") == 0) {
                 GNode * prefered_body;
                 int prefered_score;
                 
@@ -445,7 +445,7 @@ static void recursive_add_parts(TextView *textview, GNode *node)
                                 score = 2;
                         
                         if (submime->subtype != NULL) {
-                                if (g_strcasecmp(submime->subtype, "plain") == 0)
+                                if (g_ascii_strcasecmp(submime->subtype, "plain") == 0)
                                         score = 3;
                         }
                         
@@ -547,7 +547,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 
        procmime_decode_content(mimeinfo);
 
-       if (!g_strcasecmp(mimeinfo->subtype, "html")) {
+       if (!g_ascii_strcasecmp(mimeinfo->subtype, "html")) {
                gchar *filename;
                
                filename = procmime_get_tmp_file_name(mimeinfo);
@@ -558,7 +558,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
                        unlink(filename);
                }
                g_free(filename);
-       } else if (!g_strcasecmp(mimeinfo->subtype, "enriched")) {
+       } else if (!g_ascii_strcasecmp(mimeinfo->subtype, "enriched")) {
                gchar *filename;
                
                filename = procmime_get_tmp_file_name(mimeinfo);
@@ -1778,9 +1778,9 @@ static gboolean uri_security_check(RemoteURI *uri, TextView *textview)
        gchar *clicked_str;
        gboolean retval = TRUE;
 
-       if (g_strncasecmp(uri->uri, "http:", 5) &&
-           g_strncasecmp(uri->uri, "https:", 6) &&
-           g_strncasecmp(uri->uri, "www.", 4)) 
+       if (g_ascii_strncasecmp(uri->uri, "http:", 5) &&
+           g_ascii_strncasecmp(uri->uri, "https:", 6) &&
+           g_ascii_strncasecmp(uri->uri, "www.", 4)) 
                return retval;
 
        clicked_str = gtk_editable_get_chars(GTK_EDITABLE(textview->text),
@@ -1790,9 +1790,9 @@ static gboolean uri_security_check(RemoteURI *uri, TextView *textview)
                return TRUE;
 
        if (strcmp(clicked_str, uri->uri) &&
-           (!g_strncasecmp(clicked_str, "http:",  5) ||
-            !g_strncasecmp(clicked_str, "https:", 6) ||
-            !g_strncasecmp(clicked_str, "www.",   4))) {
+           (!g_ascii_strncasecmp(clicked_str, "http:",  5) ||
+            !g_ascii_strncasecmp(clicked_str, "https:", 6) ||
+            !g_ascii_strncasecmp(clicked_str, "www.",   4))) {
                gchar *str;
                retval = FALSE;
 
@@ -1800,7 +1800,7 @@ static gboolean uri_security_check(RemoteURI *uri, TextView *textview)
                   and   clicked_str ==        somewhere.com */
                str = g_strconcat("http://", clicked_str, NULL);
 
-               if (!g_strcasecmp(str, uri->uri))
+               if (!g_ascii_strcasecmp(str, uri->uri))
                        retval = TRUE;
                g_free(str);
        }
@@ -1835,6 +1835,7 @@ static gboolean textview_uri_button_pressed(GtkTextTag *tag, GObject *obj,
        GdkEventButton *bevent;
        GSList *cur;
        gchar *trimmed_uri;
+       
        if (event->type != GDK_BUTTON_PRESS && event->type != GDK_2BUTTON_PRESS
                && event->type != GDK_MOTION_NOTIFY)
                return FALSE;
@@ -1865,7 +1866,7 @@ static gboolean textview_uri_button_pressed(GtkTextTag *tag, GObject *obj,
 
                trimmed_uri = trim_string(uri->uri, 60);
                /* hover or single click: display url in statusbar */
-
+               
                if (event->type == GDK_MOTION_NOTIFY
                    || (event->type == GDK_BUTTON_PRESS && bevent->button == 1)) {
                        if (textview->messageview->mainwin) {
@@ -1878,7 +1879,7 @@ static gboolean textview_uri_button_pressed(GtkTextTag *tag, GObject *obj,
                /* doubleclick: open compose / add address / browser */
                if ((event->type == GDK_2BUTTON_PRESS && bevent->button == 1) ||
                        bevent->button == 2 || bevent->button == 3) {
-                       if (!g_strncasecmp(uri->uri, "mailto:", 7)) {
+                       if (!g_ascii_strncasecmp(uri->uri, "mailto:", 7)) {
                                if (bevent->button == 3) {
                                        gchar *fromname, *fromaddress;
                                                
index 705d8eb..bd811e7 100644 (file)
@@ -232,7 +232,7 @@ gint toolbar_ret_val_from_descr(const gchar *descr)
        gint i;
 
        for (i = 0; i < N_ACTION_VAL; i++) {
-               if (g_strcasecmp(gettext(toolbar_text[i].descr), descr) == 0)
+               if (g_utf8_collate(gettext(toolbar_text[i].descr), descr) == 0)
                                return i;
        }
        
@@ -251,7 +251,7 @@ static gint toolbar_ret_val_from_text(const gchar *text)
        gint i;
        
        for (i = 0; i < N_ACTION_VAL; i++) {
-               if (g_strcasecmp(toolbar_text[i].index_str, text) == 0)
+               if (g_utf8_collate(toolbar_text[i].index_str, text) == 0)
                                return i;
        }
        
@@ -345,11 +345,11 @@ static void toolbar_parse_item(XMLFile *file, ToolbarType source)
                name = ((XMLAttr *)attr->data)->name;
                value = ((XMLAttr *)attr->data)->value;
                
-               if (g_strcasecmp(name, TOOLBAR_ICON_FILE) == 0) 
+               if (g_utf8_collate(name, TOOLBAR_ICON_FILE) == 0) 
                        item->file = g_strdup (value);
-               else if (g_strcasecmp(name, TOOLBAR_ICON_TEXT) == 0)
+               else if (g_utf8_collate(name, TOOLBAR_ICON_TEXT) == 0)
                        item->text = g_strdup (value);
-               else if (g_strcasecmp(name, TOOLBAR_ICON_ACTION) == 0)
+               else if (g_utf8_collate(name, TOOLBAR_ICON_ACTION) == 0)
                        item->index = toolbar_ret_val_from_text(value);
 
                attr = g_list_next(attr);
@@ -693,7 +693,7 @@ void toolbar_action_execute(GtkWidget    *widget,
 
                                action_p = strstr(action, ": ");
                                action_p[0] = 0x00;
-                               if (g_strcasecmp(act->name, action) == 0) {
+                               if (g_utf8_collate(act->name, action) == 0) {
                                        found = TRUE;
                                        g_free(action);
                                        break;
@@ -1302,7 +1302,7 @@ Toolbar *toolbar_create(ToolbarType        type,
        
        for (cur = toolbar_list; cur != NULL; cur = cur->next) {
 
-               if (g_strcasecmp(((ToolbarItem*)cur->data)->file, TOOLBAR_TAG_SEPARATOR) == 0) {
+               if (g_ascii_strcasecmp(((ToolbarItem*)cur->data)->file, TOOLBAR_TAG_SEPARATOR) == 0) {
                        gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
                        continue;
                }
index fe3ee5b..0f0c0d0 100644 (file)
@@ -368,7 +368,7 @@ static void vcard_build_items(
                                str = nodeRemarks->data;
                                if( nodeRemarks ) {
                                        if( str ) {
-                                               if( g_strcasecmp( str, "internet" ) != 0 ) {
+                                               if( g_utf8_collate( str, "internet" ) != 0 ) {
                                                        if( *str != '\0' )
                                                                addritem_email_set_remarks( email, str );
                                                }
@@ -485,34 +485,34 @@ static void vcard_read_file( VCardFile *cardFile ) {
                /* fprintf( stdout, "\ttype:  %s\n", tagtype ); */
                /* fprintf( stdout, "\tvalue: %s\n", tagvalue ); */
 
-               if( g_strcasecmp( tagtype, VCARD_TYPE_QP ) == 0 ) {
+               if( g_utf8_collate( tagtype, VCARD_TYPE_QP ) == 0 ) {
                        /* Quoted-Printable: could span multiple lines */
                        tagvalue = vcard_read_qp( cardFile, tagvalue );
                        vcard_unescape_qp( tagvalue );
                        /* fprintf( stdout, "QUOTED-PRINTABLE !!! final\n>%s<\n", tagvalue ); */
                }
 
-               if( g_strcasecmp( tagname, VCARD_TAG_START ) == 0 &&
-                       g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
+               if( g_utf8_collate( tagname, VCARD_TAG_START ) == 0 &&
+                       g_ascii_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
                        /* fprintf( stdout, "start card\n" ); */
                        vcard_free_lists( listName, listAddress, listRemarks, listID );
                        listName = listAddress = listRemarks = listID = NULL;
                }
-               if( g_strcasecmp( tagname, VCARD_TAG_FULLNAME ) == 0 ) {
+               if( g_utf8_collate( tagname, VCARD_TAG_FULLNAME ) == 0 ) {
                        /* fprintf( stdout, "- full name: %s\n", tagvalue ); */
                        listName = g_slist_append( listName, g_strdup( tagvalue ) );
                }
-               if( g_strcasecmp( tagname, VCARD_TAG_EMAIL ) == 0 ) {
+               if( g_utf8_collate( tagname, VCARD_TAG_EMAIL ) == 0 ) {
                        /* fprintf( stdout, "- address: %s\n", tagvalue ); */
                        listAddress = g_slist_append( listAddress, g_strdup( tagvalue ) );
                        listRemarks = g_slist_append( listRemarks, g_strdup( tagtype ) );
                }
-               if( g_strcasecmp( tagname, VCARD_TAG_UID ) == 0 ) {
+               if( g_utf8_collate( tagname, VCARD_TAG_UID ) == 0 ) {
                        /* fprintf( stdout, "- id: %s\n", tagvalue ); */
                        listID = g_slist_append( listID, g_strdup( tagvalue ) );
                }
-               if( g_strcasecmp( tagname, VCARD_TAG_END ) == 0 &&
-                       g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
+               if( g_utf8_collate( tagname, VCARD_TAG_END ) == 0 &&
+                       g_ascii_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
                        /* vCard is complete */
                        /* fprintf( stdout, "end card\n--\n" ); */
                        /* vcard_dump_lists( listName, listAddress, listRemarks, listID, stdout ); */
@@ -653,7 +653,7 @@ gchar *vcard_find_gnomecard( void ) {
                /* Read configuration file */
                lenlbl = strlen( GNOMECARD_SECTION );
                while( fgets( buf, sizeof( buf ), fp ) != NULL ) {
-                       if( 0 == g_strncasecmp( buf, GNOMECARD_SECTION, lenlbl ) ) {
+                       if( 0 == g_ascii_strncasecmp( buf, GNOMECARD_SECTION, lenlbl ) ) {
                                break;
                        }
                }
@@ -663,7 +663,7 @@ gchar *vcard_find_gnomecard( void ) {
                        if( buf[0] == '[' ) break;
                        for( i = 0; i < lenlbl; i++ ) {
                                if( buf[i] == '=' ) {
-                                       if( 0 == g_strncasecmp( buf, GNOMECARD_PARAM, i ) ) {
+                                       if( 0 == g_ascii_strncasecmp( buf, GNOMECARD_PARAM, i ) ) {
                                                fileSpec = g_strdup( buf + i + 1 );
                                                g_strstrip( fileSpec );
                                        }
@@ -726,17 +726,17 @@ gint vcard_test_read_file( const gchar *fileSpec ) {
                                tagtemp = NULL;
                        }
 
-                       if( g_strcasecmp( tagtype, VCARD_TYPE_QP ) == 0 ) {
+                       if( g_utf8_collate( tagtype, VCARD_TYPE_QP ) == 0 ) {
                                /* Quoted-Printable: could span multiple lines */
                                tagvalue = vcard_read_qp( cardFile, tagvalue );
                                vcard_unescape_qp( tagvalue );
                        }
-                       if( g_strcasecmp( tagname, VCARD_TAG_START ) == 0 &&
-                               g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
+                       if( g_utf8_collate( tagname, VCARD_TAG_START ) == 0 &&
+                               g_ascii_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
                                haveStart = TRUE;
                        }
-                       if( g_strcasecmp( tagname, VCARD_TAG_END ) == 0 &&
-                               g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
+                       if( g_utf8_collate( tagname, VCARD_TAG_END ) == 0 &&
+                               g_ascii_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
                                /* vCard is complete */
                                if( haveStart ) cardFile->retVal = MGU_SUCCESS;
                        }