aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-filter-search.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2001-10-23 05:08:05 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-23 05:08:05 +0800
commit74291416825aaa4e571c22087818a932307aa301 (patch)
treed0a1a0094831c49f80998ad2c86ba5c8c2f3a1e9 /camel/camel-filter-search.c
parent746bfdb6c34da2c53de84e0b8780c39920375ad2 (diff)
downloadgsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar.gz
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar.bz2
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar.lz
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar.xz
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.tar.zst
gsoc2013-evolution-74291416825aaa4e571c22087818a932307aa301.zip
Use search_type_mlist for mailing list searches.
* camel-filter-search.c, camel-folder-search.c (check_header): Use search_type_mlist for mailing list searches. * camel.c (camel_init): call camel-mime-utils-init func. * camel-mime-utils.c: Changed mail mail_list_magic to include a domain part, also pre-compile all the patterns. They are all backward compatible except List-Id: which now uses the mail-address-like <list-name.host.name> part rather than the plain-text part (which might've been blank anyway). (camel_mime_utils_init): Initialisation function to setup any static data required by camel-mime-utils at run-time. We now setup the base64/charset class tables here, so it doesn't need to be done statically. (camel_mime_special_table, camel_mime_base64_rank): No longer statically initialise these. (main): Removed + the tests at the end of the file. (header_raw_check_mailing_list): Dont compile regex's here, already compiled in utils_init. Use the regex patterns to remove leading <'s from addresses. Also, if there is a domain part matched, add that after a '@' is added. camel-search-private.c: (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist search types. It ignores the domain part if either (but not both) of the values dont have it. svn path=/trunk/; revision=13894
Diffstat (limited to 'camel/camel-filter-search.c')
-rw-r--r--camel/camel-filter-search.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 9366a2f610..7b59622788 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -34,6 +34,10 @@
#include <string.h>
#include <ctype.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
#include <gal/util/e-iconv.h>
#include "e-util/e-sexp.h"
@@ -123,7 +127,7 @@ check_header (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess
if (strcasecmp(name, "x-camel-mlist") == 0) {
header = camel_message_info_mlist(fms->info);
- type = CAMEL_SEARCH_TYPE_ASIS;
+ type = CAMEL_SEARCH_TYPE_MLIST;
} else {
header = camel_medium_get_header(CAMEL_MEDIUM(fms->message), argv[0]->value.string);
if (strcasecmp("to", name) == 0 || strcasecmp("cc", name) == 0 || strcasecmp("from", name) == 0)
@@ -138,8 +142,7 @@ check_header (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess
if (header) {
for (i=1; i<argc && !matched; i++) {
if (argv[i]->type == ESEXP_RES_STRING)
- matched = camel_search_header_match(header, argv[i]->value.string,
- how, type, charset);
+ matched = camel_search_header_match(header, argv[i]->value.string, how, type, charset);
}
}
}