diff options
author | NotZed <NotZed@HelixCode.com> | 2000-05-05 16:47:02 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-05-05 16:47:02 +0800 |
commit | aa7851f1f03b4dbcf5b464b535ae71c50536f430 (patch) | |
tree | cc463f8ae82075b753c4ac93f246c3b7db372771 /camel/camel-folder-summary.c | |
parent | 022c7ab1f28ac677a60cbffa54be28e3272f1c2d (diff) | |
download | gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar.gz gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar.bz2 gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar.lz gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar.xz gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.tar.zst gsoc2013-evolution-aa7851f1f03b4dbcf5b464b535ae71c50536f430.zip |
And same here ...
2000-05-05 NotZed <NotZed@HelixCode.com>
* camel-folder-summary.c: And same here ...
* camel-mime-utils.c: Defined out some memory profiling stuff I
left there by mistake.
* camel-mime-parser.c (folder_scan_content): Apply the fix from
the header scanner to here too.
(folder_scan_header): Only check for end of header if we have
space for it (didn't end the read with a newline)
(folder_scan_header): inptr is the only real thing we need
registerised for performance. Try to help the compiler be smart
about it ..
(folder_scan_header): Simplified the save header case a tad.
Commented out some memory profiling stuff.
svn path=/trunk/; revision=2811
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r-- | camel/camel-folder-summary.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 6d8946ce12..0879d0fc37 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -35,7 +35,7 @@ #define d(x) -#if 1 +#if 0 extern int strdup_count, malloc_count, free_count; #endif @@ -862,10 +862,6 @@ content_info_load(CamelFolderSummary *s, FILE *in) ci = g_malloc0(s->content_info_size); -/* bs->pos = decode_int(in); - bs->bodypos = bs->pos + decode_int(in); - bs->endpos = bs->pos + decode_int(in);*/ - camel_folder_summary_decode_token(in, &type); camel_folder_summary_decode_token(in, &subtype); ct = header_content_type_new(type, subtype); @@ -897,10 +893,6 @@ content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci) struct _header_content_type *ct; struct _header_param *hp; -/* camel_folder_summary_encode_uint32(out, bs->pos); - camel_folder_summary_encode_uint32(out, bs->bodypos - bs->pos); - camel_folder_summary_encode_uint32(out, bs->endpos - bs->pos);*/ - ct = ci->type; if (ct) { camel_folder_summary_encode_token(out, ct->type); @@ -1053,6 +1045,8 @@ int main(int argc, char **argv) CamelFolderSummary *s; char *buffer; int len; + extern int strdup_count, malloc_count, free_count; + ibex *index; gtk_init(&argc, &argv); @@ -1081,6 +1075,8 @@ int main(int argc, char **argv) fd = open(argv[1], O_RDONLY); + index = ibex_open("index.ibex", O_CREAT|O_RDWR, 0600); + mp = camel_mime_parser_new(); camel_mime_parser_scan_from(mp, TRUE); /* camel_mime_parser_set_header_regex(mp, "^(content-[^:]*|subject|from|to|date):");*/ @@ -1088,6 +1084,7 @@ int main(int argc, char **argv) s = camel_folder_summary_new(); camel_folder_summary_set_build_content(s, TRUE); +/* camel_folder_summary_set_index(s, index);*/ while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM) { /*printf("Parsing message ...\n");*/ @@ -1097,6 +1094,10 @@ int main(int argc, char **argv) break; } } + + gtk_object_unref(mp); + gtk_object_unref(s); + printf("summarised %d messages\n", camel_folder_summary_count(s)); #if 0 printf("g_strdup count = %d\n", strdup_count); |