From 90d51074c9c7c5284e3ff3e0a0eb4b5f5d96761f Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 9 Jul 2000 22:40:49 +0000 Subject: New function to copy a header_references structure. * camel-mime-utils.c (header_references_dup): New function to copy a header_references structure. * camel-folder-summary.c (camel_message_info_dup_to): New function to (deep) copy the data from one CamelMessageInfo into another. (camel_message_info_free): And free the data. * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty). (vee_search_by_expression): belatedly update for camel_folder_search change. (vee_folder_build): belatedly update for camel_folder_search change. Use camel_message_info_dup_to and camel_message_info_free (in particular, so that we get message_id and references info so vfolders can be threaded). (vee_folder_build_folder): Ditto. svn path=/trunk/; revision=4024 --- camel/camel-mime-utils.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'camel/camel-mime-utils.c') diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index af9c9a7972..dbf4e4bfc3 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -1692,7 +1692,7 @@ header_references_list_clear(struct _header_references **list) struct _header_references * header_references_decode(const char *in) { - const char *inptr = in, *intmp; + const char *inptr = in; struct _header_references *head = NULL, *node; char *id, *word; @@ -1721,6 +1721,21 @@ header_references_decode(const char *in) return head; } +struct _header_references * +header_references_dup(const struct _header_references *list) +{ + struct _header_references *new = NULL, *tmp; + + while (list) { + tmp = g_new(struct _header_references, 1); + tmp->next = new; + tmp->id = g_strdup(list->id); + new = tmp; + list = list->next; + } + return new; +} + struct _header_address * header_mailbox_decode(const char *in) { -- cgit