aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorS.Çağlar Onur <caglar@uludag.org.tr>2004-12-01 11:03:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-12-01 11:03:09 +0800
commitb53f63d528ae0b1f4567b997d7a74552c370640f (patch)
tree861c3caf4afc0fc5f144e7cdb70529323a7a7a01
parent218b3bf88cfa2576e79b1a3a548d6d46493d982f (diff)
downloadgsoc2013-evolution-b53f63d528ae0b1f4567b997d7a74552c370640f.tar.gz
gsoc2013-evolution-b53f63d528ae0b1f4567b997d7a74552c370640f.tar.zst
gsoc2013-evolution-b53f63d528ae0b1f4567b997d7a74552c370640f.zip
** See bug #69446.
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 ] svn path=/trunk/; revision=28019
-rw-r--r--camel/ChangeLog21
-rw-r--r--camel/camel-charset-map.c18
-rw-r--r--camel/camel-filter-search.c4
-rw-r--r--camel/camel-folder-search.c2
-rw-r--r--camel/camel-folder-summary.c12
-rw-r--r--camel/camel-html-parser.c2
-rw-r--r--camel/camel-mime-filter-enriched.c4
-rw-r--r--camel/camel-mime-parser.c6
-rw-r--r--camel/camel-mime-utils.c26
-rw-r--r--camel/camel-sasl-digest-md5.c4
-rw-r--r--camel/providers/imap/camel-imap-command.c2
-rw-r--r--camel/providers/imap/camel-imap-folder.c6
-rw-r--r--camel/providers/imap/camel-imap-store.c20
-rw-r--r--camel/providers/pop3/camel-pop3-store.c2
-rw-r--r--camel/tests/lib/folders.c2
15 files changed, 76 insertions, 55 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a9b3daf8aa..837a3dcfe1 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -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
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index 318f691dc3..59f916c700 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -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;
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 24578e4ec0..5f0255b30f 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -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));
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index ff5dee6c82..353f85649c 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -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 {
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 57bf2712dd..2a165a7b6f 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -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;
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
index 31c0aee15b..17bf52f04c 100644
--- a/camel/camel-html-parser.c
+++ b/camel/camel-html-parser.c
@@ -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;
}
}
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
index 18c9a41746..4a679e3ced 100644
--- a/camel/camel-mime-filter-enriched.c
+++ b/camel/camel-mime-filter-enriched.c
@@ -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);
}
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index 2748b32502..7afd0cefbe 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -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
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 4a7b867b52..8fe1cc240f 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -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;
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
index b526ff47e7..8f444250f2 100644
--- a/camel/camel-sasl-digest-md5.c
+++ b/camel/camel-sasl-digest-md5.c
@@ -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;
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 0e8db51896..eeb3ecd302 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -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) {
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 189844dfec..229fbbb82b 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -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);
}
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index eb66f48725..52e0dfba89 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -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) {
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 4e0a046f00..b9f07ec0e8 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -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;
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c
index a670576564..e93d8caf2e 100644
--- a/camel/tests/lib/folders.c
+++ b/camel/tests/lib/folders.c
@@ -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));