diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-02-05 07:36:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-02-05 07:36:01 +0800 |
commit | fb9018a61e7e52de12b525ecece617315611ff44 (patch) | |
tree | 7509ab7d56e6ea34c935d0852ee26f1890a57c3f /camel/providers/imap | |
parent | bb0bada2315a9ca85c6669350ba0c7d911eaf64e (diff) | |
download | gsoc2013-evolution-fb9018a61e7e52de12b525ecece617315611ff44.tar.gz gsoc2013-evolution-fb9018a61e7e52de12b525ecece617315611ff44.tar.zst gsoc2013-evolution-fb9018a61e7e52de12b525ecece617315611ff44.zip |
Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated.
2003-02-04 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c (imap_parse_body): Use
g_ascii_strdown() instead of g_strdown, since g_strdown is
deprecated.
(imap_parse_body): Same.
* providers/imap/camel-imap-folder.c (decode_internaldate): Use
strncasecmp() here too.
(parse_fetch_response): And here.
(camel_imap_folder_selected): Here too.
* providers/imap/camel-imap-utils.c (imap_namespace_decode): Use
strncasecmp() instead of g_strncasecmp() because the latter is
deprecated.
* providers/imap/camel-imap-store.c (imap_get_capability): Again here.
(hash_folder_name): Here too.
(compare_folder_name): And here.
(get_folder_online): Again.
(get_folder_offline): And again.
* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
Same as below again.
* providers/imap/camel-imap-command.c (camel_imap_response_free):
Same as below.
* providers/smtp/camel-smtp-transport.c (smtp_data): Use
strcasecmp() because g_strcasecmp() is deprecated.
* camel-url.c (camel_url_new_with_base): Use g_ascii_strdown()
instead of g_strdown, since g_strdown is deprecated.
2003-01-28 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-gssapi.c (gssapi_challenge): Pass in some default
flags to gss_init_sec_context() (these default flags are defined
as a MUST in rfc1964).
svn path=/trunk/; revision=19748
Diffstat (limited to 'camel/providers/imap')
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 14 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 42 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 12 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-utils.c | 10 |
4 files changed, 39 insertions, 39 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 25d7bbd022..550bd8ba53 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -301,7 +301,7 @@ camel_imap_command_response (CamelImapStore *store, char **response, switch (*respbuf) { case '*': - if (!g_strncasecmp (respbuf, "* BYE", 5)) { + if (!strncasecmp (respbuf, "* BYE", 5)) { /* Connection was lost, no more data to fetch */ camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, @@ -319,7 +319,7 @@ camel_imap_command_response (CamelImapStore *store, char **response, respbuf = imap_read_untagged (store, respbuf, ex); if (!respbuf) type = CAMEL_IMAP_RESPONSE_ERROR; - else if (!g_strncasecmp(respbuf, "* OK [ALERT]", 12)) { + else if (!strncasecmp (respbuf, "* OK [ALERT]", 12)) { char *msg; /* for imap ALERT codes, account user@host */ @@ -382,13 +382,13 @@ imap_read_response (CamelImapStore *store, CamelException *ex) if (*respbuf == '+') return response; p = strchr (respbuf, ' '); - if (p && !g_strncasecmp (p, " OK", 3)) + if (p && !strncasecmp (p, " OK", 3)) return response; /* We should never get BAD, or anything else but +, OK, or NO * for that matter. */ - if (!p || g_strncasecmp (p, " NO", 3) != 0) { + if (!p || strncasecmp (p, " NO", 3) != 0) { g_warning ("Unexpected response from IMAP server: %s", respbuf); camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, @@ -554,9 +554,9 @@ 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 (!g_strcasecmp (p, " EXISTS")) { + if (!strcasecmp (p, " EXISTS")) { exists = number; - } else if (!g_strcasecmp (p, " EXPUNGE")) { + } else if (!strcasecmp (p, " EXPUNGE")) { if (!expunged) { expunged = g_array_new (FALSE, FALSE, sizeof (int)); @@ -641,7 +641,7 @@ camel_imap_response_extract (CamelImapStore *store, if (*resp == ' ') resp = (char *) imap_next_word (resp); - if (!g_strncasecmp (resp, type, len)) + if (!strncasecmp (resp, type, len)) break; } diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index e63dc73726..a97cc8fd79 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -251,7 +251,7 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name, } if ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX) && - !g_strcasecmp (folder_name, "INBOX")) + !strcasecmp (folder_name, "INBOX")) folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT; imap_folder->search = camel_imap_search_new(folder_dir); @@ -278,19 +278,19 @@ camel_imap_folder_selected (CamelFolder *folder, CamelImapResponse *response, for (i = 0; i < response->untagged->len; i++) { resp = response->untagged->pdata[i] + 2; - if (!g_strncasecmp (resp, "FLAGS ", 6) && + if (!strncasecmp (resp, "FLAGS ", 6) && !folder->permanent_flags) { resp += 6; folder->permanent_flags = imap_parse_flag_list (&resp); - } else if (!g_strncasecmp (resp, "OK [PERMANENTFLAGS ", 19)) { + } else if (!strncasecmp (resp, "OK [PERMANENTFLAGS ", 19)) { resp += 19; folder->permanent_flags = imap_parse_flag_list (&resp); - } else if (!g_strncasecmp (resp, "OK [UIDVALIDITY ", 16)) { + } else if (!strncasecmp (resp, "OK [UIDVALIDITY ", 16)) { validity = strtoul (resp + 16, NULL, 10); } else if (isdigit ((unsigned char)*resp)) { unsigned long num = strtoul (resp, &resp, 10); - if (!g_strncasecmp (resp, " EXISTS", 7)) { + if (!strncasecmp (resp, " EXISTS", 7)) { exists = num; /* Remove from the response so nothing * else tries to interpret it. @@ -348,12 +348,12 @@ camel_imap_folder_selected (CamelFolder *folder, CamelImapResponse *response, val = strtoul (resp + 2, &resp, 10); if (val == 0) continue; - if (!g_strcasecmp (resp, " EXISTS")) { + if (!strcasecmp (resp, " EXISTS")) { /* Another one?? */ exists = val; continue; } - if (uid != 0 || val != count || g_strncasecmp (resp, " FETCH (", 8) != 0) + if (uid != 0 || val != count || strncasecmp (resp, " FETCH (", 8) != 0) continue; fetch_data = parse_fetch_response (imap_folder, resp + 7); @@ -2064,7 +2064,7 @@ decode_internaldate (const unsigned char *in) return (time_t) -1; for (n = 0; n < 12; n++) { - if (!g_strncasecmp (inptr, tm_months[n], 3)) + if (!strncasecmp (inptr, tm_months[n], 3)) break; } @@ -2589,7 +2589,7 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) seq = strtol (response + 2, &response, 10); if (seq == 0) return NULL; - if (g_strncasecmp (response, " FETCH (", 8) != 0) + if (strncasecmp (response, " FETCH (", 8) != 0) return NULL; response += 7; @@ -2600,7 +2600,7 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) /* Skip the initial '(' or the ' ' between elements */ response++; - if (!g_strncasecmp (response, "FLAGS ", 6)) { + if (!strncasecmp (response, "FLAGS ", 6)) { guint32 flags; response += 6; @@ -2608,25 +2608,25 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) flags = imap_parse_flag_list (&response); g_datalist_set_data (&data, "FLAGS", GUINT_TO_POINTER (flags)); - } else if (!g_strncasecmp (response, "RFC822.SIZE ", 12)) { + } else if (!strncasecmp (response, "RFC822.SIZE ", 12)) { unsigned long size; response += 12; size = strtoul (response, &response, 10); g_datalist_set_data (&data, "RFC822.SIZE", GUINT_TO_POINTER (size)); - } else if (!g_strncasecmp (response, "BODY[", 5) || - !g_strncasecmp (response, "RFC822 ", 7)) { + } else if (!strncasecmp (response, "BODY[", 5) || + !strncasecmp (response, "RFC822 ", 7)) { char *p; if (*response == 'B') { response += 5; /* HEADER], HEADER.FIELDS (...)], or 0] */ - if (!g_strncasecmp (response, "HEADER", 6)) { + if (!strncasecmp (response, "HEADER", 6)) { header = TRUE; - if (!g_strncasecmp (response + 6, ".FIELDS", 7)) + if (!strncasecmp (response + 6, ".FIELDS", 7)) cache_header = FALSE; - } else if (!g_strncasecmp (response, "0]", 2)) + } else if (!strncasecmp (response, "0]", 2)) header = TRUE; p = strchr (response, ']'); @@ -2643,7 +2643,7 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) part_spec = g_strdup (""); response += 7; - if (!g_strncasecmp (response, "HEADER", 6)) + if (!strncasecmp (response, "HEADER", 6)) header = TRUE; } @@ -2658,20 +2658,20 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) g_datalist_set_data_full (&data, "BODY_PART_SPEC", part_spec, g_free); g_datalist_set_data_full (&data, "BODY_PART_DATA", body, g_free); g_datalist_set_data (&data, "BODY_PART_LEN", GINT_TO_POINTER (body_len)); - } else if (!g_strncasecmp (response, "BODY ", 5) || - !g_strncasecmp (response, "BODYSTRUCTURE ", 14)) { + } else if (!strncasecmp (response, "BODY ", 5) || + !strncasecmp (response, "BODYSTRUCTURE ", 14)) { response = strchr (response, ' ') + 1; start = response; imap_skip_list ((const char **) &response); g_datalist_set_data_full (&data, "BODY", g_strndup (start, response - start), g_free); - } else if (!g_strncasecmp (response, "UID ", 4)) { + } else if (!strncasecmp (response, "UID ", 4)) { int len; len = strcspn (response + 4, " )"); uid = g_strndup (response + 4, len); g_datalist_set_data_full (&data, "UID", uid, g_free); response += 4 + len; - } else if (!g_strncasecmp (response, "INTERNALDATE ", 13)) { + } else if (!strncasecmp (response, "INTERNALDATE ", 13)) { int len; response += 13; diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 01a9dcc79f..0107356427 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -519,7 +519,7 @@ imap_get_capability (CamelService *service, CamelException *ex) continue; } for (i = 0; capabilities[i].name; i++) { - if (g_strcasecmp (capa, capabilities[i].name) == 0) { + if (strcasecmp (capa, capabilities[i].name) == 0) { store->capabilities |= capabilities[i].flag; break; } @@ -1470,7 +1470,7 @@ imap_noop (CamelStore *store, CamelException *ex) static guint hash_folder_name (gconstpointer key) { - if (g_strcasecmp (key, "INBOX") == 0) + if (strcasecmp (key, "INBOX") == 0) return g_str_hash ("INBOX"); else return g_str_hash (key); @@ -1481,9 +1481,9 @@ compare_folder_name (gconstpointer a, gconstpointer b) { gconstpointer aname = a, bname = b; - if (g_strcasecmp (a, "INBOX") == 0) + if (strcasecmp (a, "INBOX") == 0) aname = "INBOX"; - if (g_strcasecmp (b, "INBOX") == 0) + if (strcasecmp (b, "INBOX") == 0) bname = "INBOX"; return g_str_equal (aname, bname); } @@ -1549,7 +1549,7 @@ get_folder_online (CamelStore *store, const char *folder_name, if (!camel_imap_store_connected (imap_store, ex)) return NULL; - if (!g_strcasecmp (folder_name, "INBOX")) + if (!strcasecmp (folder_name, "INBOX")) folder_name = "INBOX"; /* Lock around the whole lot to check/create atomically */ @@ -1625,7 +1625,7 @@ get_folder_offline (CamelStore *store, const char *folder_name, !camel_service_connect (CAMEL_SERVICE (store), ex)) return NULL; - if (!g_strcasecmp (folder_name, "INBOX")) + if (!strcasecmp (folder_name, "INBOX")) folder_name = "INBOX"; storage_path = g_strdup_printf("%s/folders", imap_store->storage_path); diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c index bb8fdef00a..181ca3e1a4 100644 --- a/camel/providers/imap/camel-imap-utils.c +++ b/camel/providers/imap/camel-imap-utils.c @@ -95,7 +95,7 @@ imap_namespace_decode (const char **in, struct _namespace **namespace) list = NULL; tail = (struct _namespace *) &list; - if (g_strncasecmp (inptr, "NIL", 3) != 0) { + if (strncasecmp (inptr, "NIL", 3) != 0) { if (*inptr++ != '(') goto exception; @@ -127,7 +127,7 @@ imap_namespace_decode (const char **in, struct _namespace **namespace) /* get the namespace directory delimiter */ inptr = imap_next_word (inptr); - if (!g_strncasecmp (inptr, "NIL", 3)) { + if (!strncasecmp (inptr, "NIL", 3)) { inptr = imap_next_word (inptr); node->delim = '\0'; } else if (*inptr++ == '"') { @@ -819,7 +819,7 @@ imap_parse_body (const char **body_p, CamelFolder *folder, return; } - g_strdown (subtype); + g_ascii_strdown (subtype, -1); ci->type = header_content_type_new ("multipart", subtype); g_free (subtype); @@ -848,8 +848,8 @@ imap_parse_body (const char **body_p, CamelFolder *folder, *body_p = NULL; return; } - g_strdown (main_type); - g_strdown (subtype); + g_ascii_strdown (main_type, -1); + g_ascii_strdown (subtype, -1); type = header_content_type_new (main_type, subtype); g_free (main_type); g_free (subtype); |