diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 4 | ||||
-rw-r--r-- | camel/camel-folder-search.c | 2 | ||||
-rw-r--r-- | camel/camel-folder-search.h | 1 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 9 | ||||
-rw-r--r-- | camel/string-utils.c | 22 | ||||
-rw-r--r-- | camel/string-utils.h | 2 |
6 files changed, 8 insertions, 32 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 388d95010f..3086a3410e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,8 +1,6 @@ 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com> - Undid clahey's e_strstrcase because e_strstrcase DOES NOT EXIST - in e-utils/e-utils.c nor anywhere else in Evolution - besides, - Camel should remain independant of Evolution. + Chris forgot to add #include <e-util/e-util.h> to the source files * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's fix, we don't want to send a string to a %d. diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c index 714725ea83..4c5bd070d6 100644 --- a/camel/camel-folder-search.c +++ b/camel/camel-folder-search.c @@ -381,7 +381,7 @@ search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, C /* performs an OR of all words */ for (i=1;i<argc && !truth;i++) { if (argv[i]->type == ESEXP_RES_STRING - && strstrcase (header, argv[i]->value.string)) { + && e_strstrcase (header, argv[i]->value.string)) { r(printf("%s got a match with %s of %s\n", search->current->uid, header, argv[i]->value.string)); truth = TRUE; break; diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h index e601eba4ce..eb06af946c 100644 --- a/camel/camel-folder-search.h +++ b/camel/camel-folder-search.h @@ -24,6 +24,7 @@ #include <camel/camel-object.h> #include <e-util/e-sexp.h> +#include <e-util/e-util.h> #include <libibex/ibex.h> #include <camel/camel-folder.h> diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index bec33edf8a..fc852bd659 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -35,6 +35,7 @@ #include <unistd.h> #include <errno.h> +#include <e-util/e-util.h> #include "camel-imap-store.h" #include "camel-imap-folder.h" @@ -333,7 +334,7 @@ imap_connect (CamelService *service, CamelException *ex) "Unknown error"); } - if (strstrcase (result, "SEARCH")) + if (e_strstrcase (result, "SEARCH")) store->has_search_capability = TRUE; else store->has_search_capability = FALSE; @@ -559,13 +560,13 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char } if (p) { - if (strstrcase (p, "READ-WRITE")) + if (e_strstrcase (p, "READ-WRITE")) mode = } #endif } #if 0 - if ((recent = strstrcase (r, "RECENT"))) { + if ((recent = e_strstrcase (r, "RECENT"))) { char *p; for (p = recent; p > r && *p != '*'; p--); @@ -678,7 +679,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char ** return s; } #if 0 - if ((recent = strstrcase (r, "RECENT"))) { + if ((recent = e_strstrcase (r, "RECENT"))) { char *p; for (p = recent; p > r && *p != '*'; p--); diff --git a/camel/string-utils.c b/camel/string-utils.c index 5291b12b45..cdeebe8322 100644 --- a/camel/string-utils.c +++ b/camel/string-utils.c @@ -174,25 +174,3 @@ string_prefix (const gchar *s, const gchar *suffix, gboolean *suffix_found) return result_string; } - -gchar * -strstrcase (const gchar *haystack, const gchar *needle) -{ - /* find the needle in the haystack neglecting case */ - gchar *ptr; - guint len; - - g_return_val_if_fail (haystack != NULL, NULL); - g_return_val_if_fail (needle != NULL, NULL); - - len = strlen (needle); - if (len > strlen (haystack)) - return NULL; - - for (ptr = (gchar *) haystack; *(ptr + len - 1) != '\0'; ptr++) - if (!g_strncasecmp (ptr, needle, len)) - return ptr; - - return NULL; -} - diff --git a/camel/string-utils.h b/camel/string-utils.h index 1e4743feea..5595ad3247 100644 --- a/camel/string-utils.h +++ b/camel/string-utils.h @@ -56,8 +56,6 @@ void string_trim (gchar *string, const gchar *chars, gchar *string_prefix (const gchar *s, const gchar *suffix, gboolean *suffix_found); -gchar *strstrcase (const gchar *haystack, const gchar *needle); - #ifdef __cplusplus } #endif /* __cplusplus */ |