From 8fbfb0ae4829f216501380e2f63ed6b4cc1a3306 Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 21 Jan 2000 22:46:46 +0000 Subject: added camel-mbox-provider.c to the mbox provider sources. 2000-01-21 bertrand * camel/providers/mbox/Makefile.am (libcamelmbox_la_SOURCES): added camel-mbox-provider.c to the mbox provider sources. * camel/providers/mbox/camel-mbox-provider.c: provider registration code. * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): implemented (_append_message): implemented * camel/providers/mbox/camel-mbox-parser.c (initialize_buffer): use \0 to mark the end of the buffer. (read_next_buffer_chunk): ditto. (read_header): test the presence of a \0 instead of reading the eof field (read_message_begining): idem. (camel_mbox_parse_file): idem. Remove the eof field from the parser structure. (read_next_buffer_chunk): removed some nasty bugs again. svn path=/trunk/; revision=1604 --- tests/test9.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test9.c b/tests/test9.c index 36cf45ad2a..6776b0cc05 100644 --- a/tests/test9.c +++ b/tests/test9.c @@ -27,9 +27,11 @@ main (int argc, char**argv) CamelMboxSummaryInformation *msg_info; int i; guint32 next_uid; + guint32 mbox_file_size; - camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG; - + //camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG; + camel_debug_level = 0; + gtk_init (&argc, &argv); camel_init (); @@ -38,14 +40,15 @@ main (int argc, char**argv) message_info_array = camel_mbox_parse_file (test_file_fd, "From ", 0, - &next_uid + &mbox_file_size, + &next_uid, TRUE, NULL, 0, ex); close (test_file_fd); - camel_mbox_write_xev (argv[1], message_info_array, 1, ex); + camel_mbox_write_xev (argv[1], message_info_array, &mbox_file_size, 1, ex); if (camel_exception_get_id (ex)) { printf ("Exception caught in camel_mbox_write_xev : %s\n", camel_exception_get_description (ex)); } @@ -71,6 +74,9 @@ main (int argc, char**argv) " From : %s\n", i, msg_info->sender); } + printf ("Taille du fichier mbox : %ld\n", mbox_file_size); + printf ("\t in the summary : %ld\n", sum1->mbox_file_size ); + return 1; } -- cgit v1.2.3