aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/camel-folder-search.c9
-rw-r--r--camel/camel-mime-parser.c11
-rw-r--r--camel/camel-mime-part-utils.c9
-rw-r--r--camel/camel-mime-part.c9
-rw-r--r--camel/camel-mime-utils.c36
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c10
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c10
-rw-r--r--camel/providers/pop3/camel-pop3-store.c2
8 files changed, 50 insertions, 46 deletions
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index aa3da63f3a..9d6f80d256 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
+#include <glib.h>
#include "camel-folder-search.h"
@@ -357,15 +358,15 @@ search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, C
/* only a subset of headers are supported .. */
headername = argv[0]->value.string;
- if (!strcasecmp(headername, "subject")) {
+ if (!g_strcasecmp(headername, "subject")) {
header = search->current->subject;
- } else if (!strcasecmp(headername, "date")) {
+ } else if (!g_strcasecmp(headername, "date")) {
/* FIXME: not a very useful form of the date */
sprintf(strbuf, "%d", (int)search->current->date_sent);
header = strbuf;
- } else if (!strcasecmp(headername, "from")) {
+ } else if (!g_strcasecmp(headername, "from")) {
header = search->current->from;
- } else if (!strcasecmp(headername, "to")) {
+ } else if (!g_strcasecmp(headername, "to")) {
header = search->current->from;
} else {
g_warning("Performing query on unknown header: %s", headername);
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index a8910f3984..5417fffa3a 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -32,6 +32,7 @@
#include <unicode.h>
+#include <glib.h>
#include "camel-mime-parser.h"
#include "camel-mime-utils.h"
#include "camel-mime-filter.h"
@@ -1021,7 +1022,7 @@ tail_recurse:
type = HSCAN_HEADER;
if ( (content = header_raw_find(&h->headers, "Content-Type", NULL))
&& (ct = header_content_type_decode(content))) {
- if (!strcasecmp(ct->type, "multipart")) {
+ if (!g_strcasecmp(ct->type, "multipart")) {
bound = header_content_type_param(ct, "boundary");
if (bound) {
d(printf("multipart, boundary = %s\n", bound));
@@ -1036,9 +1037,9 @@ tail_recurse:
/* header_raw_replace(&h->headers, "Content-Type", "text/plain", offset);*/
g_warning("Multipart with no boundary, treating as text/plain");
}
- } else if (!strcasecmp(ct->type, "message")) {
- if (!strcasecmp(ct->subtype, "rfc822")
- /*|| !strcasecmp(ct->subtype, "partial")*/) {
+ } else if (!g_strcasecmp(ct->type, "message")) {
+ if (!g_strcasecmp(ct->subtype, "rfc822")
+ /*|| !g_strcasecmp(ct->subtype, "partial")*/) {
type = HSCAN_MESSAGE;
}
}
@@ -1181,7 +1182,7 @@ int main(int argc, char **argv)
case HSCAN_HEADER:
if (s->parts->content_type
&& (charset = header_content_type_param(s->parts->content_type, "charset"))) {
- if (strcasecmp(charset, "us-ascii")) {
+ if (g_strcasecmp(charset, "us-ascii")) {
folder_push_filter_charset(s, "UTF-8", charset);
} else {
charset = NULL;
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index adbc62d305..ac2c81ad0a 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -23,6 +23,7 @@
*/
#include <config.h>
#include <string.h>
+#include <glib.h>
#include "gmime-content-field.h"
#include "string-utils.h"
#include "camel-mime-part-utils.h"
@@ -70,11 +71,11 @@ simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser
/* first, work out conversion, if any, required, we dont care about what we dont know about */
encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
if (encoding) {
- if (!strcasecmp(encoding, "base64")) {
+ if (!g_strcasecmp(encoding, "base64")) {
d(printf("Adding base64 decoder ...\n"));
fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
decid = camel_mime_parser_filter_add(mp, fdec);
- } else if (!strcasecmp(encoding, "quoted-printable")) {
+ } else if (!g_strcasecmp(encoding, "quoted-printable")) {
d(printf("Adding quoted-printable decoder ...\n"));
fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
decid = camel_mime_parser_filter_add(mp, fdec);
@@ -87,8 +88,8 @@ simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser
if (header_content_type_is(ct, "text", "*")) {
const char *charset = header_content_type_param(ct, "charset");
if (charset!=NULL
- && !(strcasecmp(charset, "us-ascii")==0
- || strcasecmp(charset, "utf-8")==0)) {
+ && !(g_strcasecmp(charset, "us-ascii")==0
+ || g_strcasecmp(charset, "utf-8")==0)) {
d(printf("Adding conversion filter from %s to utf-8\n", charset));
fch = (CamelMimeFilter *)camel_mime_filter_charset_new_convert(charset, "utf-8");
if (fch) {
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index fa22cf9dcb..744f2a7247 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -25,6 +25,7 @@
#include <config.h>
#include <string.h>
+#include <glib.h>
#include "camel-mime-part.h"
#include <stdio.h>
#include "gmime-content-field.h"
@@ -605,13 +606,13 @@ camel_mime_part_encoding_from_string (const gchar *string)
{
if (string == NULL)
return CAMEL_MIME_PART_ENCODING_DEFAULT;
- else if (strcasecmp (string, "7bit") == 0)
+ else if (g_strcasecmp (string, "7bit") == 0)
return CAMEL_MIME_PART_ENCODING_7BIT;
- else if (strcasecmp (string, "8bit") == 0)
+ else if (g_strcasecmp (string, "8bit") == 0)
return CAMEL_MIME_PART_ENCODING_8BIT;
- else if (strcasecmp (string, "base64") == 0)
+ else if (g_strcasecmp (string, "base64") == 0)
return CAMEL_MIME_PART_ENCODING_BASE64;
- else if (strcasecmp (string, "quoted-printable") == 0)
+ else if (g_strcasecmp (string, "quoted-printable") == 0)
return CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
else
/* FIXME? Spit a warning? */
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 3f4c4d99d3..f53531feb7 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -808,7 +808,7 @@ char *rfc2047_encode_word(const char *in, int len, char *type)
out = buffer;
/* if we can't convert from utf-8, just encode as utf-8 */
- if (!strcasecmp(type, "UTF-8")
+ if (!g_strcasecmp(type, "UTF-8")
|| (ic = unicode_iconv_open(type, "UTF-8")) == (unicode_iconv_t)-1) {
memcpy(buffer, in, len);
out = buffer+len;
@@ -1065,7 +1065,7 @@ header_decode_param(const char **in, char **paramp, char **valuep)
char *
header_param(struct _header_param *p, const char *name)
{
- while (p && strcasecmp(p->name, name) != 0)
+ while (p && g_strcasecmp(p->name, name) != 0)
p = p->next;
if (p)
return p->value;
@@ -1079,7 +1079,7 @@ header_set_param(struct _header_param **l, const char *name, const char *value)
while (p->next) {
pn = p->next;
- if (!strcasecmp(pn->name, name)) {
+ if (!g_strcasecmp(pn->name, name)) {
g_free(pn->value);
if (value) {
pn->value = g_strdup(value);
@@ -1135,16 +1135,16 @@ header_content_type_is(struct _header_content_type *ct, const char *type, const
{
/* no type == text/plain or text/"*" */
if (ct==NULL) {
- return (!strcasecmp(type, "text")
- && (!strcasecmp(subtype, "plain")
- || !strcasecmp(subtype, "*")));
+ return (!g_strcasecmp(type, "text")
+ && (!g_strcasecmp(subtype, "plain")
+ || !g_strcasecmp(subtype, "*")));
}
return (ct->type != NULL
- && (!strcasecmp(ct->type, type)
+ && (!g_strcasecmp(ct->type, type)
&& ((ct->subtype != NULL
- && !strcasecmp(ct->subtype, subtype))
- || !strcasecmp("*", subtype))));
+ && !g_strcasecmp(ct->subtype, subtype))
+ || !g_strcasecmp("*", subtype))));
}
void
@@ -1660,7 +1660,7 @@ header_content_type_decode(const char *in)
inptr++;
subtype = decode_token(&inptr);
}
- if (subtype == NULL && (!strcasecmp(type, "text"))) {
+ if (subtype == NULL && (!g_strcasecmp(type, "text"))) {
g_warning("text type with no subtype, resorting to text/plain: %s", in);
subtype = g_strdup("plain");
}
@@ -1713,7 +1713,7 @@ header_content_type_format(struct _header_content_type *ct)
g_warning("Content-Type with no main type");
} else if (ct->subtype == NULL) {
g_warning("Content-Type with no sub type: %s", ct->type);
- if (!strcasecmp(ct->type, "multipart"))
+ if (!g_strcasecmp(ct->type, "multipart"))
g_string_sprintfa(out, "%s/mixed", ct->type);
else
g_string_sprintfa(out, "%s", ct->type);
@@ -1879,7 +1879,7 @@ header_decode_date(const char *in, int *saveoffset)
monthname = decode_token(&inptr);
if (monthname) {
for (i=0;i<sizeof(tz_months)/sizeof(tz_months[0]);i++) {
- if (!strcasecmp(tz_months[i], monthname)) {
+ if (!g_strcasecmp(tz_months[i], monthname)) {
tm.tm_mon = i;
break;
}
@@ -1916,7 +1916,7 @@ 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_strcasecmp(tz_offsets[i].name, tz)) {
offset = tz_offsets[i].offset;
break;
}
@@ -2031,13 +2031,13 @@ header_raw_append(struct _header_raw **list, const char *name, const char *value
/* debug */
#if 0
- if (!strcasecmp(name, "To")) {
+ if (!g_strcasecmp(name, "To")) {
printf("- Decoding To\n");
header_to_decode(value);
- } else if (!strcasecmp(name, "Content-type")) {
+ } else if (!g_strcasecmp(name, "Content-type")) {
printf("- Decoding content-type\n");
header_content_type_dump(header_content_type_decode(value));
- } else if (!strcasecmp(name, "MIME-Version")) {
+ } else if (!g_strcasecmp(name, "MIME-Version")) {
printf("- Decoding mime version\n");
header_mime_decode(value);
}
@@ -2051,7 +2051,7 @@ header_raw_find_node(struct _header_raw **list, const char *name)
l = *list;
while (l) {
- if (!strcasecmp(l->name, name))
+ if (!g_strcasecmp(l->name, name))
break;
l = l->next;
}
@@ -2103,7 +2103,7 @@ header_raw_remove(struct _header_raw **list, const char *name)
p = (struct _header_raw *)list;
l = *list;
while (l) {
- if (!strcasecmp(l->name, name)) {
+ if (!g_strcasecmp(l->name, name)) {
p->next = l->next;
header_raw_free(l);
l = p->next;
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index 35b7945e49..01deaef19a 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -595,7 +595,7 @@ header_write(int fd, struct _header_raw *header, unsigned int uid, unsigned int
iv[3].iov_len = 1;
while (header) {
- if (strcasecmp(header->name, "x-evolution")) {
+ if (g_strcasecmp(header->name, "x-evolution")) {
int len;
iv[0].iov_base = header->name;
@@ -876,12 +876,12 @@ static int index_folder(CamelMboxSummary *s, int startoffset)
messages/message parts */
encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
if (encoding) {
- if (!strcasecmp(encoding, "base64")) {
+ if (!g_strcasecmp(encoding, "base64")) {
d(printf("Adding decoding filter for base64\n"));
if (mf64 == NULL)
mf64 = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)mf64);
- } else if (!strcasecmp(encoding, "quoted-printable")) {
+ } else if (!g_strcasecmp(encoding, "quoted-printable")) {
d(printf("Adding decoding filter for quoted-printable\n"));
if (mfqp == NULL)
mfqp = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
@@ -892,8 +892,8 @@ static int index_folder(CamelMboxSummary *s, int startoffset)
charset = header_content_type_param(ct, "charset");
if (charset!=NULL
- && !(strcasecmp(charset, "us-ascii")==0
- || strcasecmp(charset, "utf-8")==0)) {
+ && !(g_strcasecmp(charset, "us-ascii")==0
+ || g_strcasecmp(charset, "utf-8")==0)) {
d(printf("Adding conversion filter from %s to utf-8\n", charset));
if (mfc == NULL)
mfc = camel_mime_filter_charset_new_convert(charset, "utf-8");
diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c
index 4ee93fc572..b89ae120da 100644
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ b/camel/providers/nntp/camel-nntp-utils.c
@@ -155,15 +155,15 @@ get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
for (h = 0; h < header_array->len; h ++) {
Rfc822Header *header = &((Rfc822Header*)header_array->data)[h];
- if (!strcasecmp(header->name, "From"))
+ if (!g_strcasecmp(header->name, "From"))
info.headers.sender = g_strdup(header->value);
- else if (!strcasecmp(header->name, "To"))
+ else if (!g_strcasecmp(header->name, "To"))
info.headers.to = g_strdup(header->value);
- else if (!strcasecmp(header->name, "Subject"))
+ else if (!g_strcasecmp(header->name, "Subject"))
info.headers.subject = g_strdup(header->value);
- else if (!strcasecmp(header->name, "Message-ID"))
+ else if (!g_strcasecmp(header->name, "Message-ID"))
info.headers.uid = g_strdup(header->value);
- else if (!strcasecmp(header->name, "Date")) {
+ else if (!g_strcasecmp(header->name, "Date")) {
info.headers.sent_date = g_strdup(header->value);
info.headers.received_date = g_strdup(header->value);
}
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 3713c086a6..4f4410234d 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -353,7 +353,7 @@ static char *
get_folder_name (CamelStore *store, const char *folder_name,
CamelException *ex)
{
- if (!strcasecmp (folder_name, "inbox"))
+ if (!g_strcasecmp (folder_name, "inbox"))
return g_strdup ("inbox");
else {
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,