** See bug #69446.
authorS.Çağlar Onur <caglar@uludag.org.tr>
Wed, 1 Dec 2004 03:03:09 +0000 (03:03 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Wed, 1 Dec 2004 03:03:09 +0000 (03:03 +0000)
2004-11-28      S.Çağlar Onur <caglar@uludag.org.tr>

        ** See bug #69446.

        * evolution-2.0.2/camel/camel-charset-map.c (camel_charset_iso_to_windows)
        * evolution-2.0.2/camel/camel-filter-search.c (check_header)
        * evolution-2.0.2/camel/camel-folder-search.c (check_header)
        * evolution-2.0.2/camel/camel-folder-summary.c (message_info_new,summary_build_content_info,camel_system_flag)
        * evolution-2.0.2/camel/camel-html-parser.c (camel_html_parser_attr)
        * evolution-2.0.2/camel/camel-mime-filter-enriched.c (param_parse,camel_mime_filter_enriched_init)
        * evolution-2.0.2/camel/camel-mime-parser.c (folder_scan_step,main)
        * evolution-2.0.2/camel/camel-mime-utils.c (camel_header_param,camel_header_set_param,camel_content_type_is,camel_transfer_encoding_from_string,camel_conten
t_type_format,camel_content_type_simple,camel_header_decode_date,header_raw_find_node)
        * evolution-2.0.2/camel/camel-sasl-digest-md5.c (decode_data_type)
        * evolution-2.0.2/camel/providers/imap/camel-imap-command.c (camel_imap_response_free)
        * evolution-2.0.2/camel/providers/imap/camel-imap-folder.c (camel_imap_folder_new,camel_imap_folder_selected,imap_refresh_info,camel_imap_folder_new,camel_i
map_folder_selected)
        * evolution-2.0.2/camel/providers/imap/camel-imap-store.c (imap_get_capability,imap_connect_online,get_folder_online,get_folder_offline,get_subscribed_folde
rs,folder_hash,get_folders)
        * evolution-2.0.2/camel/providers/pop3/camel-pop3-store.c (get_folder)
        * evolution-2.0.2/camel/tests/lib/folders.c: (test_folder_message_ops)
        some strcasecmp() calls changed with g_ascii_strcasecmp() for Turkish
        character conversiton problems [ http://www.i18nguy.com/unicode/turkish-i18n.html ]

15 files changed:
camel/ChangeLog
camel/camel-charset-map.c
camel/camel-filter-search.c
camel/camel-folder-search.c
camel/camel-folder-summary.c
camel/camel-html-parser.c
camel/camel-mime-filter-enriched.c
camel/camel-mime-parser.c
camel/camel-mime-utils.c
camel/camel-sasl-digest-md5.c
camel/providers/imap/camel-imap-command.c
camel/providers/imap/camel-imap-folder.c
camel/providers/imap/camel-imap-store.c
camel/providers/pop3/camel-pop3-store.c
camel/tests/lib/folders.c

index a9b3daf..837a3dc 100644 (file)
@@ -1,3 +1,24 @@
+2004-11-28     S.Çağlar Onur <caglar@uludag.org.tr>
+
+       ** See bug #69446.
+
+       * evolution-2.0.2/camel/camel-charset-map.c (camel_charset_iso_to_windows)
+       * evolution-2.0.2/camel/camel-filter-search.c (check_header)
+       * evolution-2.0.2/camel/camel-folder-search.c (check_header)
+       * evolution-2.0.2/camel/camel-folder-summary.c (message_info_new,summary_build_content_info,camel_system_flag)
+       * evolution-2.0.2/camel/camel-html-parser.c (camel_html_parser_attr)
+       * evolution-2.0.2/camel/camel-mime-filter-enriched.c (param_parse,camel_mime_filter_enriched_init)
+       * evolution-2.0.2/camel/camel-mime-parser.c (folder_scan_step,main)
+       * evolution-2.0.2/camel/camel-mime-utils.c (camel_header_param,camel_header_set_param,camel_content_type_is,camel_transfer_encoding_from_string,camel_content_type_format,camel_content_type_simple,camel_header_decode_date,header_raw_find_node)
+       * evolution-2.0.2/camel/camel-sasl-digest-md5.c (decode_data_type)
+       * evolution-2.0.2/camel/providers/imap/camel-imap-command.c (camel_imap_response_free)
+       * evolution-2.0.2/camel/providers/imap/camel-imap-folder.c (camel_imap_folder_new,camel_imap_folder_selected,imap_refresh_info,camel_imap_folder_new,camel_imap_folder_selected)
+       * evolution-2.0.2/camel/providers/imap/camel-imap-store.c (imap_get_capability,imap_connect_online,get_folder_online,get_folder_offline,get_subscribed_folders,folder_hash,get_folders)
+       * evolution-2.0.2/camel/providers/pop3/camel-pop3-store.c (get_folder)
+       * evolution-2.0.2/camel/tests/lib/folders.c: (test_folder_message_ops)
+       some strcasecmp() calls changed with g_ascii_strcasecmp() for Turkish 
+       character conversiton problems [ http://www.i18nguy.com/unicode/turkish-i18n.html ]
+
 2004-10-12  Radek Doulik  <rodo@ximian.com>
 
        * camel-junk-plugin.c: new init method implementation
index 318f691..59f916c 100644 (file)
@@ -336,23 +336,23 @@ camel_charset_iso_to_windows (const char *isocharset)
         *    windows-cp1257.
         */
        
-       if (!strcasecmp (isocharset, "iso-8859-1") || !strcasecmp (isocharset, "us-ascii"))
+       if (!g_ascii_strcasecmp (isocharset, "iso-8859-1") || !g_ascii_strcasecmp (isocharset, "us-ascii"))
                return "windows-cp1252";
-       else if (!strcasecmp (isocharset, "iso-8859-2"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-2"))
                return "windows-cp1250";
-       else if (!strcasecmp (isocharset, "iso-8859-4"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-4"))
                return "windows-cp1257";
-       else if (!strcasecmp (isocharset, "iso-8859-5"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-5"))
                return "windows-cp1251";
-       else if (!strcasecmp (isocharset, "iso-8859-6"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-6"))
                return "windows-cp1256";
-       else if (!strcasecmp (isocharset, "iso-8859-7"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-7"))
                return "windows-cp1253";
-       else if (!strcasecmp (isocharset, "iso-8859-8"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-8"))
                return "windows-cp1255";
-       else if (!strcasecmp (isocharset, "iso-8859-9"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-9"))
                return "windows-cp1254";
-       else if (!strcasecmp (isocharset, "iso-8859-13"))
+       else if (!g_ascii_strcasecmp (isocharset, "iso-8859-13"))
                return "windows-cp1257";
        
        return isocharset;
index 24578e4..5f0255b 100644 (file)
@@ -152,7 +152,7 @@ check_header (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess
                CamelContentType *ct;
                const char *charset = NULL;
                
-               if (strcasecmp(name, "x-camel-mlist") == 0) {
+               if (g_ascii_strcasecmp(name, "x-camel-mlist") == 0) {
                        header = camel_message_info_mlist(fms->info);
                        type = CAMEL_SEARCH_TYPE_MLIST;
                } else {
@@ -160,7 +160,7 @@ check_header (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess
                        
                        header = camel_medium_get_header (CAMEL_MEDIUM (message), argv[0]->value.string);
                        /* FIXME: what about Resent-To, Resent-Cc and Resent-From? */
-                       if (strcasecmp("to", name) == 0 || strcasecmp("cc", name) == 0 || strcasecmp("from", name) == 0)
+                       if (g_ascii_strcasecmp("to", name) == 0 || g_ascii_strcasecmp("cc", name) == 0 || g_ascii_strcasecmp("from", name) == 0)
                                type = CAMEL_SEARCH_TYPE_ADDRESS_ENCODED;
                        else {
                                ct = camel_mime_part_get_content_type (CAMEL_MIME_PART (message));
index ff5dee6..353f856 100644 (file)
@@ -872,7 +872,7 @@ check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolder
                } else if (!strcasecmp(headername, "cc")) {
                        header = camel_message_info_cc(search->current);
                        type = CAMEL_SEARCH_TYPE_ADDRESS;
-               } else if (!strcasecmp(headername, "x-camel-mlist")) {
+               } else if (!g_ascii_strcasecmp(headername, "x-camel-mlist")) {
                        header = camel_message_info_mlist(search->current);
                        type = CAMEL_SEARCH_TYPE_MLIST;
                } else {
index 57bf271..2a165a7 100644 (file)
@@ -1949,21 +1949,21 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
                        
                        encoding = camel_content_transfer_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
                        if (encoding) {
-                               if (!strcasecmp(encoding, "base64")) {
+                               if (!g_ascii_strcasecmp(encoding, "base64")) {
                                        d(printf(" decoding base64\n"));
                                        if (p->filter_64 == NULL)
                                                p->filter_64 = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
                                        else
                                                camel_mime_filter_reset((CamelMimeFilter *)p->filter_64);
                                        enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_64);
-                               } else if (!strcasecmp(encoding, "quoted-printable")) {
+                               } else if (!g_ascii_strcasecmp(encoding, "quoted-printable")) {
                                        d(printf(" decoding quoted-printable\n"));
                                        if (p->filter_qp == NULL)
                                                p->filter_qp = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
                                        else
                                                camel_mime_filter_reset((CamelMimeFilter *)p->filter_qp);
                                        enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_qp);
-                               } else if (!strcasecmp (encoding, "x-uuencode")) {
+                               } else if (!g_ascii_strcasecmp (encoding, "x-uuencode")) {
                                        d(printf(" decoding x-uuencode\n"));
                                        if (p->filter_uu == NULL)
                                                p->filter_uu = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_UU_DEC);
@@ -1978,8 +1978,8 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 
                        charset = camel_content_type_param(ct, "charset");
                        if (charset!=NULL
-                           && !(strcasecmp(charset, "us-ascii")==0
-                                || strcasecmp(charset, "utf-8")==0)) {
+                           && !(g_ascii_strcasecmp(charset, "us-ascii")==0
+                                || g_ascii_strcasecmp(charset, "utf-8")==0)) {
                                d(printf(" Adding conversion filter from %s to UTF-8\n", charset));
                                mfc = g_hash_table_lookup(p->filter_charset, charset);
                                if (mfc == NULL) {
@@ -2461,7 +2461,7 @@ camel_system_flag (const char *name)
        g_return_val_if_fail (name != NULL, 0);
        
        for (flag = flag_names; *flag->name; flag++)
-               if (!strcasecmp (name, flag->name))
+               if (!g_ascii_strcasecmp (name, flag->name))
                        return flag->value;
        
        return 0;
index 31c0aee..17bf52f 100644 (file)
@@ -162,7 +162,7 @@ const char *camel_html_parser_attr(CamelHTMLParser *hp, const char *name)
        CamelHTMLParserPrivate *p = hp->priv;
 
        for (i=0;i<p->attrs->len;i++) {
-               if (!strcasecmp(((GString *)p->attrs->pdata[i])->str, name)) {
+               if (!g_ascii_strcasecmp(((GString *)p->attrs->pdata[i])->str, name)) {
                        return ((GString *)p->values->pdata[i])->str;
                }
        }
index 18c9a41..4a679e3 100644 (file)
@@ -169,7 +169,7 @@ enriched_tag_needs_param (const char *tag)
        int i;
        
        for (i = 0; i < NUM_ENRICHED_TAGS; i++)
-               if (!strcasecmp (tag, enriched_tags[i].enriched))
+               if (!g_ascii_strcasecmp (tag, enriched_tags[i].enriched))
                        return enriched_tags[i].needs_param;
        
        return FALSE;
@@ -265,7 +265,7 @@ param_parse (const char *enriched, const char *inptr, int inlen)
        int i;
        
        for (i = 0; i < NUM_ENRICHED_TAGS; i++) {
-               if (!strcasecmp (enriched, enriched_tags[i].enriched))
+               if (!g_ascii_strcasecmp (enriched, enriched_tags[i].enriched))
                        return enriched_tags[i].parse_param (inptr, inlen);
        }
        
index 2748b32..7afd0ce 100644 (file)
@@ -1675,7 +1675,7 @@ tail_recurse:
                type = CAMEL_MIME_PARSER_STATE_HEADER;
                if ( (content = camel_header_raw_find(&h->headers, "Content-Type", NULL))
                     && (ct = camel_content_type_decode(content))) {
-                       if (!strcasecmp(ct->type, "multipart")) {
+                       if (!g_ascii_strcasecmp(ct->type, "multipart")) {
                                if (!camel_content_type_is(ct, "multipart", "signed")
                                    && (bound = camel_content_type_param(ct, "boundary"))) {
                                        d(printf("multipart, boundary = %s\n", bound));
@@ -1694,7 +1694,7 @@ tail_recurse:
                        } else if (!strcasecmp(ct->type, "message")) {
                                if (!strcasecmp(ct->subtype, "rfc822")
                                    || !strcasecmp(ct->subtype, "news")
-                                   /*|| !strcasecmp(ct->subtype, "partial")*/) {
+                                   /*|| !g_ascii_strcasecmp(ct->subtype, "partial")*/) {
                                        type = CAMEL_MIME_PARSER_STATE_MESSAGE;
                                }
                        }
@@ -1906,7 +1906,7 @@ int main(int argc, char **argv)
                        case CAMEL_MIME_PARSER_STATE_HEADER:
                                if (s->parts->content_type
                                    && (charset = camel_content_type_param(s->parts->content_type, "charset"))) {
-                                       if (strcasecmp(charset, "us-ascii")) {
+                                       if (g_ascii_strcasecmp(charset, "us-ascii")) {
 #if 0
                                                folder_push_filter_charset(s, "UTF-8", charset);
 #endif
index 4a7b867..8fe1cc2 100644 (file)
@@ -1929,7 +1929,7 @@ rfc2184_decode (const char *in, size_t len)
 char *
 camel_header_param (struct _camel_header_param *p, const char *name)
 {
-       while (p && strcasecmp (p->name, name) != 0)
+       while (p && g_ascii_strcasecmp (p->name, name) != 0)
                p = p->next;
        if (p)
                return p->value;
@@ -1946,7 +1946,7 @@ camel_header_set_param (struct _camel_header_param **l, const char *name, const
        
        while (p->next) {
                pn = p->next;
-               if (!strcasecmp (pn->name, name)) {
+               if (!g_ascii_strcasecmp (pn->name, name)) {
                        g_free (pn->value);
                        if (value) {
                                pn->value = g_strdup (value);
@@ -2005,14 +2005,14 @@ camel_content_type_is(CamelContentType *ct, const char *type, const char *subtyp
        /* no type == text/plain or text/"*" */
        if (ct==NULL || (ct->type == NULL && ct->subtype == NULL)) {
                return (!strcasecmp(type, "text")
-                       && (!strcasecmp(subtype, "plain")
+                       && (!g_ascii_strcasecmp(subtype, "plain")
                            || !strcasecmp(subtype, "*")));
        }
 
        return (ct->type != NULL
-               && (!strcasecmp(ct->type, type)
+               && (!g_ascii_strcasecmp(ct->type, type)
                    && ((ct->subtype != NULL
-                        && !strcasecmp(ct->subtype, subtype))
+                        && !g_ascii_strcasecmp(ct->subtype, subtype))
                        || !strcasecmp("*", subtype))));
 }
 
@@ -2789,7 +2789,7 @@ camel_transfer_encoding_from_string (const char *string)
        
        if (string != NULL) {
                for (i = 0; i < sizeof (encodings) / sizeof (encodings[0]); i++)
-                       if (!strcasecmp (string, encodings[i]))
+                       if (!g_ascii_strcasecmp (string, encodings[i]))
                                return i;
        }
        
@@ -3028,7 +3028,7 @@ header_encode_param (const unsigned char *in, gboolean *encoded)
        else
                charset = "iso-8859-1";
        
-       if (g_ascii_strcasecmp(charset, "UTF-8") != 0
+       if (strcasecmp(charset, "UTF-8") != 0
            && (outbuf = header_convert(charset, "UTF-8", in, strlen(in)))) {
                inptr = outbuf;
        } else {
@@ -3240,7 +3240,7 @@ camel_content_type_format (CamelContentType *ct)
                w(g_warning ("Content-Type with no main type"));
        } else if (ct->subtype == NULL) {
                w(g_warning ("Content-Type with no sub type: %s", ct->type));
-               if (!strcasecmp (ct->type, "multipart"))
+               if (!g_ascii_strcasecmp (ct->type, "multipart"))
                        g_string_append_printf (out, "%s/mixed", ct->type);
                else
                        g_string_append_printf (out, "%s", ct->type);
@@ -3263,7 +3263,7 @@ camel_content_type_simple (CamelContentType *ct)
                return g_strdup ("text/plain");
        } else if (ct->subtype == NULL) {
                w(g_warning ("Content-Type with no sub type: %s", ct->type));
-               if (!strcasecmp (ct->type, "multipart"))
+               if (!g_ascii_strcasecmp (ct->type, "multipart"))
                        return g_strdup_printf ("%s/mixed", ct->type);
                else
                        return g_strdup (ct->type);
@@ -3449,7 +3449,7 @@ camel_header_decode_date(const char *in, int *saveoffset)
        foundmonth = FALSE;
        if (monthname) {
                for (i=0;i<sizeof(tz_months)/sizeof(tz_months[0]);i++) {
-                       if (!strcasecmp(tz_months[i], monthname)) {
+                       if (!g_ascii_strcasecmp(tz_months[i], monthname)) {
                                tm.tm_mon = i;
                                foundmonth = TRUE;
                                break;
@@ -3501,7 +3501,7 @@ camel_header_decode_date(const char *in, int *saveoffset)
 
                if (tz) {
                        for (i=0;i<sizeof(tz_offsets)/sizeof(tz_offsets[0]);i++) {
-                               if (!strcasecmp(tz_offsets[i].name, tz)) {
+                               if (!g_ascii_strcasecmp(tz_offsets[i].name, tz)) {
                                        offset = tz_offsets[i].offset;
                                        break;
                                }
@@ -3671,7 +3671,7 @@ header_raw_find_node(struct _camel_header_raw **list, const char *name)
 
        l = *list;
        while (l) {
-               if (!strcasecmp(l->name, name))
+               if (!g_ascii_strcasecmp(l->name, name))
                        break;
                l = l->next;
        }
@@ -3723,7 +3723,7 @@ camel_header_raw_remove(struct _camel_header_raw **list, const char *name)
        p = (struct _camel_header_raw *)list;
        l = *list;
        while (l) {
-               if (!strcasecmp(l->name, name)) {
+               if (!g_ascii_strcasecmp(l->name, name)) {
                        p->next = l->next;
                        header_raw_free(l);
                        l = p->next;
index b526ff4..8f44425 100644 (file)
@@ -366,7 +366,7 @@ decode_data_type (DataType *dtype, const char *name)
        int i;
        
        for (i = 0; dtype[i].name; i++) {
-               if (!strcasecmp (dtype[i].name, name))
+               if (!g_ascii_strcasecmp (dtype[i].name, name))
                        break;
        }
        
@@ -473,7 +473,7 @@ parse_server_challenge (const char *tokens, gboolean *abort)
                        break;
                case DIGEST_STALE:
                        PARANOID (digest_abort (&got_stale, abort));
-                       if (!strcasecmp (param->value, "true"))
+                       if (!g_ascii_strcasecmp (param->value, "true"))
                                challenge->stale = TRUE;
                        else
                                challenge->stale = FALSE;
index 0e8db51..eeb3ecd 100644 (file)
@@ -549,7 +549,7 @@ camel_imap_response_free (CamelImapStore *store, CamelImapResponse *response)
                if (response->folder) {
                        /* Check if it's something we need to handle. */
                        number = strtoul (resp + 2, &p, 10);
-                       if (!strcasecmp (p, " EXISTS")) {
+                       if (!g_ascii_strcasecmp (p, " EXISTS")) {
                                exists = number;
                        } else if (!strcasecmp (p, " EXPUNGE")) {
                                if (!expunged) {
index 189844d..229fbbb 100644 (file)
@@ -371,7 +371,7 @@ camel_imap_folder_selected (CamelFolder *folder, CamelImapResponse *response,
                        val = strtoul (resp + 2, &resp, 10);
                        if (val == 0)
                                continue;
-                       if (!strcasecmp (resp, " EXISTS")) {
+                       if (!g_ascii_strcasecmp (resp, " EXISTS")) {
                                /* Another one?? */
                                exists = val;
                                continue;
@@ -512,7 +512,7 @@ imap_refresh_info (CamelFolder *folder, CamelException *ex)
         * should do it.  */
        CAMEL_SERVICE_LOCK (imap_store, connect_lock);
        if (imap_store->current_folder != folder
-           || strcasecmp(folder->full_name, "INBOX") == 0) {
+           || g_ascii_strcasecmp(folder->full_name, "INBOX") == 0) {
                response = camel_imap_command (imap_store, folder, ex, NULL);
                if (response) {
                        camel_imap_folder_selected (folder, response, ex);
@@ -528,7 +528,7 @@ imap_refresh_info (CamelFolder *folder, CamelException *ex)
 #if 0
                /* on some servers need to CHECKpoint INBOX to recieve new messages?? */
                /* rfc2060 suggests this, but havent seen a server that requires it */
-               if (strcasecmp(folder->full_name, "INBOX") == 0) {
+               if (g_ascii_strcasecmp(folder->full_name, "INBOX") == 0) {
                        response = camel_imap_command (imap_store, folder, ex, "CHECK");
                        camel_imap_response_free (imap_store, response);
                }
index eb66f48..52e0dfb 100644 (file)
@@ -483,7 +483,7 @@ imap_get_capability (CamelService *service, CamelException *ex)
                        continue;
                }
                for (i = 0; capabilities[i].name; i++) {
-                       if (strcasecmp (capa, capabilities[i].name) == 0) {
+                       if (g_ascii_strcasecmp (capa, capabilities[i].name) == 0) {
                                store->capabilities |= capabilities[i].flag;
                                break;
                        }
@@ -1452,7 +1452,7 @@ imap_connect_online (CamelService *service, CamelException *ex)
                for (i = 0; i < folders->len; i++) {
                        CamelFolderInfo *fi = folders->pdata[i];
                        
-                       haveinbox = haveinbox || !strcasecmp (fi->full_name, "INBOX");
+                       haveinbox = haveinbox || !g_ascii_strcasecmp (fi->full_name, "INBOX");
                        
                        if (fi->flags & (CAMEL_IMAP_FOLDER_MARKED | CAMEL_IMAP_FOLDER_UNMARKED))
                                store->capabilities |= IMAP_CAPABILITY_useful_lsub;
@@ -1472,7 +1472,7 @@ imap_connect_online (CamelService *service, CamelException *ex)
                                CamelFolderInfo *fi = folders->pdata[i];
                                
                                /* this should always be TRUE if folders->len > 0 */
-                               if (!strcasecmp (fi->full_name, "INBOX")) {
+                               if (!g_ascii_strcasecmp (fi->full_name, "INBOX")) {
                                        haveinbox = TRUE;
                                        
                                        /* if INBOX is marked as \NoSelect then it is probably
@@ -1817,7 +1817,7 @@ get_folder_online (CamelStore *store, const char *folder_name, guint32 flags, Ca
        if (!camel_imap_store_connected (imap_store, ex))
                return NULL;
        
-       if (!strcasecmp (folder_name, "INBOX"))
+       if (!g_ascii_strcasecmp (folder_name, "INBOX"))
                folder_name = "INBOX";
 
        /* Lock around the whole lot to check/create atomically */
@@ -2022,7 +2022,7 @@ get_folder_offline (CamelStore *store, const char *folder_name,
            !camel_service_connect (CAMEL_SERVICE (store), ex))
                return NULL;
        
-       if (!strcasecmp (folder_name, "INBOX"))
+       if (!g_ascii_strcasecmp (folder_name, "INBOX"))
                folder_name = "INBOX";
        
        storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
@@ -2461,7 +2461,7 @@ get_subscribed_folders (CamelImapStore *imap_store, const char *top, CamelExcept
                if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED
                    && imap_is_subfolder(camel_store_info_path(imap_store->summary, si), top)) {
                        g_ptr_array_add(names, (char *)camel_imap_store_info_full_name(imap_store->summary, si));
-                       haveinbox = haveinbox || strcasecmp(camel_imap_store_info_full_name(imap_store->summary, si), "INBOX") == 0;
+                       haveinbox = haveinbox || g_ascii_strcasecmp(camel_imap_store_info_full_name(imap_store->summary, si), "INBOX") == 0;
                }
                camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
        }
@@ -2728,7 +2728,7 @@ static guint folder_hash(const void *ap)
 {
        const char *a = ap;
 
-       if (strcasecmp(a, "INBOX") == 0)
+       if (g_ascii_strcasecmp(a, "INBOX") == 0)
                a = "INBOX";
 
        return g_str_hash(a);
@@ -2739,9 +2739,9 @@ static int folder_eq(const void *ap, const void *bp)
        const char *a = ap;
        const char *b = bp;
 
-       if (strcasecmp(a, "INBOX") == 0)
+       if (g_ascii_strcasecmp(a, "INBOX") == 0)
                a = "INBOX";
-       if (strcasecmp(b, "INBOX") == 0)
+       if (g_ascii_strcasecmp(b, "INBOX") == 0)
                b = "INBOX";
 
        return g_str_equal(a, b);
@@ -2851,7 +2851,7 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
                goto fail;
        for (i=0; i<folders->len && !haveinbox; i++) {
                fi = folders->pdata[i];
-               haveinbox = (strcasecmp(fi->full_name, "INBOX")) == 0;
+               haveinbox = (g_ascii_strcasecmp(fi->full_name, "INBOX")) == 0;
        }
 
        if (!haveinbox && top == imap_store->namespace) {
index 4e0a046..b9f07ec 100644 (file)
@@ -629,7 +629,7 @@ pop3_disconnect (CamelService *service, gboolean clean, CamelException *ex)
 static CamelFolder *
 get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
 {
-       if (strcasecmp (folder_name, "inbox") != 0) {
+       if (g_ascii_strcasecmp (folder_name, "inbox") != 0) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
                                      _("No such folder `%s'."), folder_name);
                return NULL;
index a670576..e93d8ca 100644 (file)
@@ -546,7 +546,7 @@ test_folder_message_ops(CamelSession *session, const char *name, int local, cons
                        check_unref(folder, 2);
                pull(); /* re-opening folder */
 
-               if (strcasecmp(mailbox, "INBOX") != 0) {
+               if (g_ascii_strcasecmp(mailbox, "INBOX") != 0) {
                        push("deleting test folder, with no messages in it");
                        camel_store_delete_folder(store, mailbox, ex);
                        check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));