diff options
author | Not Zed <NotZed@Ximian.com> | 2001-04-20 03:04:50 +0000 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-04-20 03:04:50 +0000 |
commit | 35597d7dff73ae62dde2d076be2551b14513d1d0 (patch) | |
tree | cad3a224ca4eb4dde1170ef6563fec7f9317eaea | |
parent | 085597d5d443ef5d624b7a141bdd405e8cb3c46e (diff) | |
download | evolution-data-server-evolution-0-10-branch.tar.gz |
Use unsigned ints.EVOLUTION_0_10evolution-0-10-branch
2001-04-20 Not Zed <NotZed@Ximian.com>
* providers/local/camel-mbox-summary.c (summary_rebuild): Use
unsigned ints.
* camel-mime-part.c (init_header_name_table): Setupt he
header_formatted table with a much more complete list of headers
we dont want to fold (addresses).
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/camel-mime-part.c | 18 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-summary.c | 7 |
3 files changed, 24 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7a5bb51a2..8b84b0937 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2001-04-20 Not Zed <NotZed@Ximian.com> + + * providers/local/camel-mbox-summary.c (summary_rebuild): Use + unsigned ints. + + * camel-mime-part.c (init_header_name_table): Setupt he + header_formatted table with a much more complete list of headers + we dont want to fold (addresses). + 2001-04-18 Dan Winship <danw@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_finalize): diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 4409ee5f7..28f48a195 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -81,6 +81,13 @@ static int construct_from_parser (CamelMimePart *, CamelMi /* forward references */ static void set_disposition (CamelMimePart *mime_part, const gchar *disposition); +static char *header_formatted[] = { + "Content-Type", "Content-Disposition", "Message-ID", "Resent-Message-ID", + "To", "Resent-To", "Cc", "Resent-cc", "Bcc", "Resent-bcc", + "From", "Resent-From", "Sender", "Resent-Sender", + "Reply-To", "Resent-Reply-To", +}; + /* loads in a hash table the set of header names we */ /* recognize and associate them with a unique enum */ @@ -88,6 +95,8 @@ static void set_disposition (CamelMimePart *mime_part, const gchar *disposition) static void init_header_name_table() { + int i; + header_name_table = g_hash_table_new (g_strcase_hash, g_strcase_equal); g_hash_table_insert (header_name_table, "Content-Description", (gpointer)HEADER_DESCRIPTION); g_hash_table_insert (header_name_table, "Content-Disposition", (gpointer)HEADER_DISPOSITION); @@ -97,13 +106,8 @@ init_header_name_table() g_hash_table_insert (header_name_table, "Content-Type", (gpointer)HEADER_CONTENT_TYPE); header_formatted_table = g_hash_table_new(g_strcase_hash, g_strcase_equal); - g_hash_table_insert(header_formatted_table, "Content-Type", (void *)1); - g_hash_table_insert(header_formatted_table, "Content-Disposition", (void *)1); - g_hash_table_insert(header_formatted_table, "To", (void *)1); - g_hash_table_insert(header_formatted_table, "From", (void *)1); - g_hash_table_insert(header_formatted_table, "Cc", (void *)1); - g_hash_table_insert(header_formatted_table, "Bcc", (void *)1); - g_hash_table_insert(header_formatted_table, "Message-ID", (void *)1); + for (i=0;i<sizeof(header_formatted)/sizeof(header_formatted[0]);i++) + g_hash_table_insert(header_formatted_table, header_formatted[i], (void *)1); } static void diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c index 8e4ce6cc0..c0de5173f 100644 --- a/camel/providers/local/camel-mbox-summary.c +++ b/camel/providers/local/camel-mbox-summary.c @@ -282,9 +282,10 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset, CamelException *ex) while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) { CamelMessageInfo *info; - off_t pc = camel_mime_parser_tell (mp) + 1; - - camel_operation_progress (NULL, (int) (((float) pc / size) * 100)); + unsigned int pc; + + pc = ((unsigned int)camel_mime_parser_tell(mp) + 1) * 100 / size; + camel_operation_progress(NULL, pc); info = camel_folder_summary_add_from_parser(s, mp); if (info == NULL) { |