diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-07 05:42:11 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-07 05:42:11 +0800 |
commit | 414157e5440f32a8469c692822fb818c9fa92dfe (patch) | |
tree | a2dd20b1750cbcd7b34693c5e8b377d71425e922 /camel/providers/imap | |
parent | 0fc34dcc90c6ddeb276d2fd98ff80f77bce0d66b (diff) | |
download | gsoc2013-evolution-414157e5440f32a8469c692822fb818c9fa92dfe.tar.gz gsoc2013-evolution-414157e5440f32a8469c692822fb818c9fa92dfe.tar.zst gsoc2013-evolution-414157e5440f32a8469c692822fb818c9fa92dfe.zip |
s/g_strncasecmp/strncasecmp/g
2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c (imap_next_word):
s/g_strncasecmp/strncasecmp/g
* camel-iconv.c: Updated to be an exact copy of e-iconv (except
names changed). We don't use this yet, but we may in the future.
* camel-url.c (camel_url_new_with_base): Here too.
* camel-sasl-kerberos4.c (krb4_challenge): Use camel_strdown()
here instead of g_strdown() since the latter has been deprecated.
* providers/imap/camel-imap-utils.c (imap_parse_body): Use
camel_strdown() since g_ascii_strdown() does not do what we
thought.
* providers/imap/camel-imap-store.c:
s/strstrcase/camel_strstrcase/g
* providers/imap/camel-imap-folder.c (do_append):
s/strstrcase/camel_strstrcase/
(handle_copyuid): Same.
* string-utils.c (camel_strdown): New function because the
g_ascii_strdown interface sucks.
(camel_strstrcase): Renamed from strstrcase.
svn path=/trunk/; revision=20213
Diffstat (limited to 'camel/providers/imap')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 4 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 4 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-utils.c | 40 |
3 files changed, 25 insertions, 23 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index a97cc8fd79..e7c51bf336 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1179,7 +1179,7 @@ do_append (CamelFolder *folder, CamelMimeMessage *message, return response; if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) { - *uid = strstrcase (response->status, "[APPENDUID "); + *uid = camel_strstrcase (response->status, "[APPENDUID "); if (*uid) *uid = strchr (*uid + 11, ' '); if (*uid) { @@ -1351,7 +1351,7 @@ handle_copyuid (CamelImapResponse *response, CamelFolder *source, GPtrArray *src, *dest; int i; - validity = strstrcase (response->status, "[COPYUID "); + validity = camel_strstrcase (response->status, "[COPYUID "); if (!validity) return; validity += 9; diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index b94751625d..9b7ddaf180 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1202,7 +1202,7 @@ imap_connect_online (CamelService *service, CamelException *ex) imap_namespaces_destroy (namespaces); /* end new code */ - name = strstrcase (result, "NAMESPACE (("); + name = camel_strstrcase (result, "NAMESPACE (("); if (name) { char *sep; @@ -1528,7 +1528,7 @@ get_folder_status (CamelImapStore *imap_store, const char *folder_name, const ch if (!status) return -1; - p = strstrcase (status, type); + p = camel_strstrcase (status, type); if (p) out = strtoul (p + strlen (type), NULL, 10); else diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c index 181ca3e1a4..7ec152afa7 100644 --- a/camel/providers/imap/camel-imap-utils.c +++ b/camel/providers/imap/camel-imap-utils.c @@ -35,6 +35,7 @@ #include "camel-imap-summary.h" #include "camel-imap-store.h" #include "camel-folder.h" +#include "string-utils.h" #include "camel-utf8.h" #define d(x) x @@ -240,7 +241,7 @@ imap_parse_namespace_response (const char *response) return NULL; inptr = imap_next_word (response); - if (g_strncasecmp (inptr, "NAMESPACE", 9) != 0) + if (strncasecmp (inptr, "NAMESPACE", 9) != 0) return NULL; inptr = imap_next_word (inptr); @@ -306,7 +307,7 @@ imap_parse_list_response (CamelImapStore *store, const char *buf, int *flags, ch return FALSE; word = imap_next_word (buf); - if (g_strncasecmp (word, "LIST", 4) && g_strncasecmp (word, "LSUB", 4)) + if (strncasecmp (word, "LIST", 4) && strncasecmp (word, "LSUB", 4)) return FALSE; /* check if we are looking at an LSUB response */ @@ -325,17 +326,17 @@ imap_parse_list_response (CamelImapStore *store, const char *buf, int *flags, ch while (*word != ')') { len = strcspn (word, " )"); if (flags) { - if (!g_strncasecmp (word, "\\NoInferiors", len)) + if (!strncasecmp (word, "\\NoInferiors", len)) *flags |= CAMEL_FOLDER_NOINFERIORS; - else if (!g_strncasecmp (word, "\\NoSelect", len)) + else if (!strncasecmp (word, "\\NoSelect", len)) *flags |= CAMEL_FOLDER_NOSELECT; - else if (!g_strncasecmp (word, "\\Marked", len)) + else if (!strncasecmp (word, "\\Marked", len)) *flags |= CAMEL_IMAP_FOLDER_MARKED; - else if (!g_strncasecmp (word, "\\Unmarked", len)) + else if (!strncasecmp (word, "\\Unmarked", len)) *flags |= CAMEL_IMAP_FOLDER_UNMARKED; - else if (!g_strncasecmp (word, "\\HasChildren", len)) + else if (!strncasecmp (word, "\\HasChildren", len)) *flags |= CAMEL_FOLDER_CHILDREN; - else if (!g_strncasecmp (word, "\\HasNoChildren", len)) + else if (!strncasecmp (word, "\\HasNoChildren", len)) *flags |= CAMEL_IMAP_FOLDER_NOCHILDREN; } @@ -491,17 +492,17 @@ imap_parse_flag_list (char **flag_list_p) while (*flag_list && *flag_list != ')') { len = strcspn (flag_list, " )"); - if (!g_strncasecmp (flag_list, "\\Answered", len)) + if (!strncasecmp (flag_list, "\\Answered", len)) flags |= CAMEL_MESSAGE_ANSWERED; - else if (!g_strncasecmp (flag_list, "\\Deleted", len)) + else if (!strncasecmp (flag_list, "\\Deleted", len)) flags |= CAMEL_MESSAGE_DELETED; - else if (!g_strncasecmp (flag_list, "\\Draft", len)) + else if (!strncasecmp (flag_list, "\\Draft", len)) flags |= CAMEL_MESSAGE_DRAFT; - else if (!g_strncasecmp (flag_list, "\\Flagged", len)) + else if (!strncasecmp (flag_list, "\\Flagged", len)) flags |= CAMEL_MESSAGE_FLAGGED; - else if (!g_strncasecmp (flag_list, "\\Seen", len)) + else if (!strncasecmp (flag_list, "\\Seen", len)) flags |= CAMEL_MESSAGE_SEEN; - else if (!g_strncasecmp (flag_list, "\\Recent", len)) + else if (!strncasecmp (flag_list, "\\Recent", len)) flags |= CAMEL_IMAP_MESSAGE_RECENT; flag_list += len; @@ -643,7 +644,7 @@ imap_parse_string_generic (const char **str_p, size_t *len, int type) out = g_strndup (str, *len); *str_p = str + *len; return out; - } else if (type == IMAP_NSTRING && !g_strncasecmp (str, "nil", 3)) { + } else if (type == IMAP_NSTRING && !strncasecmp (str, "nil", 3)) { *str_p += 3; *len = 0; return NULL; @@ -732,7 +733,7 @@ parse_params (const char **parms_p, CamelContentType *type) char *name, *value; int len; - if (!g_strncasecmp (parms, "nil", 3)) { + if (!strncasecmp (parms, "nil", 3)) { *parms_p += 3; return; } @@ -819,7 +820,7 @@ imap_parse_body (const char **body_p, CamelFolder *folder, return; } - g_ascii_strdown (subtype, -1); + camel_strdown (subtype); ci->type = header_content_type_new ("multipart", subtype); g_free (subtype); @@ -848,8 +849,9 @@ imap_parse_body (const char **body_p, CamelFolder *folder, *body_p = NULL; return; } - g_ascii_strdown (main_type, -1); - g_ascii_strdown (subtype, -1); + + camel_strdown (main_type); + camel_strdown (subtype); type = header_content_type_new (main_type, subtype); g_free (main_type); g_free (subtype); |