diff options
author | Not Zed <NotZed@Ximian.com> | 2001-02-20 08:19:16 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-02-20 08:19:16 +0800 |
commit | 72bc2233d228d6313a52c6a43e6a22c63067b954 (patch) | |
tree | 383fb692e99459d7520ff575e897460fa3d24781 /camel/camel-mime-utils.c | |
parent | 269b6e0a439cf55772bc0092fe173d87091097cb (diff) | |
download | gsoc2013-evolution-72bc2233d228d6313a52c6a43e6a22c63067b954.tar.gz gsoc2013-evolution-72bc2233d228d6313a52c6a43e6a22c63067b954.tar.zst gsoc2013-evolution-72bc2233d228d6313a52c6a43e6a22c63067b954.zip |
Take the ^Header: part out of the expression, since we look that up
2001-02-20 Not Zed <NotZed@Ximian.com>
* camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
of the expression, since we look that up ourselves.
(header_raw_check_mailing_list): When getting the match, get match
1, not match 0, we dont want the full string match.
* camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
for summary change.
(message_info_new): Extract the mlist info from the headers.
(message_info_load): Load mlist from summary.
(message_info_save): Save mlist to summary.
(message_info_free): Save the mlist entry.
(camel_message_info_new_from_header): Extract mailing list header.
(camel_message_info_dup_to): Copy the mlist entry.
(camel_message_info_free): Free mlist.
(message_info_dump): Dump the mlist.
* camel-folder-summary.h: Add an mlist (mailing list) string to
the summary.
svn path=/trunk/; revision=8295
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r-- | camel/camel-mime-utils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index b9a8384f45..448c3dc077 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -2899,12 +2899,12 @@ static struct { char *name; char *pattern; } mail_list_magic[] = { - { "Sender", "^Sender: owner-([^@]+)" }, - { "X-BeenThere", "^X-BeenThere: ([^@]+)" }, - { "Delivered-To", "^Delivered-To: mailing list ([^@]+)" }, - { "X-Mailing-List", "^X-Mailing-List: ([^@]+)" }, - { "X-Loop", "^X-Loop: ([^@]+)" }, - { "List-Id", "^List-Id: ([^<]+)" }, + { "Sender", " *owner-([^@]+)" }, + { "X-BeenThere", " *([^@]+)" }, + { "Delivered-To", " *mailing list ([^@]+)" }, + { "X-Mailing-List", " *([^@]+)" }, + { "X-Loop", " *([^@]+)" }, + { "List-Id", " *([^<]+)" }, }; char * @@ -2912,7 +2912,7 @@ header_raw_check_mailing_list(struct _header_raw **list) { const char *v; regex_t pattern; - regmatch_t match[1]; + regmatch_t match[2]; int i; for (i=0;i<sizeof(mail_list_magic)/sizeof(mail_list_magic[0]);i++) { @@ -2922,9 +2922,9 @@ header_raw_check_mailing_list(struct _header_raw **list) } v = header_raw_find(list, mail_list_magic[i].name, NULL); - if (v != NULL && regexec(&pattern, v, 1, match, 0) == 0 && match[0].rm_so != -1) { + if (v != NULL && regexec(&pattern, v, 2, match, 0) == 0 && match[1].rm_so != -1) { regfree(&pattern); - return g_strndup(v+match[0].rm_so, match[0].rm_eo-match[0].rm_so); + return g_strndup(v+match[1].rm_so, match[1].rm_eo-match[1].rm_so); } regfree(&pattern); } |