From 9fcbc8f335c4322c6e4167e0356bfb9802e5edb6 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 24 Jul 2002 15:13:43 +0000 Subject: When writing the summary, use TRUNC flag, duh. Also, write to a temp file 2002-07-25 Not Zed * camel-folder-summary.c (camel_folder_summary_save): When writing the summary, use TRUNC flag, duh. Also, write to a temp file first, and rename when closed successfully, and check ferror() and fclose() against 0 rather than -1. * providers/local/camel-mbox-summary.c (summary_update): Decrement i if we remove the summary item so we dont skip every 2nd one. * camel-mime-utils.c (header_decode_mailbox): Use rfc2047_decode_word explicitly incase we just found an encoded word. Stops us re-decoding the string twice, which fixes memory corruption in #26330 when the HUGE string is used later. 2002-07-24 Not Zed * camel-partition-table.c (camel_key_table_next): Didn't unlock if we exited on an empty key list. svn path=/trunk/; revision=17570 --- camel/camel-mime-parser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'camel/camel-mime-parser.c') diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c index 1cf38e7f1a..4ecc945542 100644 --- a/camel/camel-mime-parser.c +++ b/camel/camel-mime-parser.c @@ -47,7 +47,7 @@ #define r(x) #define h(x) -#define c(x) +#define c(x) #define d(x) /*#define PURIFY*/ @@ -1323,7 +1323,7 @@ folder_scan_header(struct _header_scan_state *s, int *lastone) /* otherwise, complete header, add it */ s->outptr[0] = 0; - h(printf("header '%.20s' at %d\n", s->outbuf, s->header_start)); + h(printf("header '%.20s' at %d\n", s->outbuf, (int)s->header_start)); header_raw_append_parse(&h->headers, s->outbuf, s->header_start); s->outptr = s->outbuf; @@ -1739,8 +1739,7 @@ tail_recurse: while (f) { camel_mime_filter_filter(f->filter, *databuffer, *datalength, presize, databuffer, datalength, &presize); - d(printf ("Filtered content (%s): '", - camel_type_to_name(((CamelObject *)f->filter)->s.type))); + d(printf("Filtered content (%s): '", ((CamelObject *)f->filter)->klass->name)); d(fwrite(*databuffer, sizeof(char), *datalength, stdout)); d(printf("'\n")); f = f->next; -- cgit