From e71de4c02186efe577412709346154df96e35054 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 28 Sep 2000 11:31:29 +0000 Subject: New function to fold headers. 2000-09-28 Not Zed * camel-mime-utils.c (header_fold): New function to fold headers. 2000-09-27 Not Zed * camel-mime-parser.c (folder_scan_header): If we had an empty header, then it must be end of the headers too. (folder_scan_init): No we dont need to init the outbuf with a nul terminator. * camel-folder-summary.c (camel_folder_summary_set_uid): New function to reset the uid to a higher value. * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync): "something failed (yo!)" what sort of crap is this? Fixed all the indenting again, what wanker keeps running stuff through indent? (message_info_new): Check the uid we loaded off the disk, if it existed already, assign a new one. If it didn't then make sure the nextuid is higher. * camel-charset-map.c: New file, used to build a large unicode decoding mapping table, and use it to determine what is the lowest charset a given word can be encoded with. Uses tables from libunicode's source. * camel-internet-address.c (internet_encode): Use header_phrase_encode to properly encode the fullname, as required. refixed indenting. Who keeps doing that? (camel_internet_address_find_address): Changed fatal return/warnings into assertions. * camel-mime-utils.c (header_raw_append_parse): Check : explicitly (removed from is_fieldname() macro). (camel_mime_special_table): Changed to short, so we can represent more bit types. (quoted_encode): Take a mask of the safe chars for this encoding. (header_address_decode): Removed a #warning that makes no sense anymore. (header_decode_date): Fixed the 'broken date' parser code, if it ever decoded it it just threw away the result. (header_encode_string): Use better charset matching for encoding strings as well. 2000-08-31 Not Zed * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save the index if we do a sync. (camel_mh_summary_check): Save the index here too. Probably. svn path=/trunk/; revision=5615 --- camel/camel-folder-summary.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 888bdcfceb..bde3059ab3 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -251,10 +251,15 @@ guint32 camel_folder_summary_next_uid(CamelFolderSummary *s) return uid; } +void camel_folder_summary_set_uid(CamelFolderSummary *s, guint32 uid) +{ + s->nextuid = MAX(s->nextuid, uid); +} + char * -camel_folder_summary_next_uid_string (CamelFolderSummary *s) +camel_folder_summary_next_uid_string(CamelFolderSummary *s) { - return g_strdup_printf ("%u", camel_folder_summary_next_uid (s)); + return g_strdup_printf("%u", camel_folder_summary_next_uid(s)); } /* loads the content descriptions, recursively */ @@ -388,7 +393,7 @@ void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info) return; retry: if (info->uid == NULL) { - info->uid = camel_folder_summary_next_uid_string (s); + info->uid = camel_folder_summary_next_uid_string(s); } if (g_hash_table_lookup(s->messages_uid, info->uid)) { g_warning("Trying to insert message with clashing uid (%s). new uid re-assigned", info->uid); @@ -1206,7 +1211,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMimeParser *mp) if (p->index && header_content_type_is(ct, "text", "*")) { char *encoding; const char *charset; - + d(printf("generating index:\n")); encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL)); -- cgit v1.2.3