[evolution-patches] Yet more 64bit cleanups



Attached are patches to fix a number of places that aren't 64bit
clean.   It's not a small set of changes, but the vast majority of the
changes fall into one of a few categories:
*) Incorrectly just casting pointers and ints around like they're
equivalent.  Lots of changes to use the glib macros defined explicitly
for this purpose
*) A few places in camel were using ints for length when other parts of
the camel API were expecting a size_t.  So changes a few camel APIs to
use size_t when things that they call expect a size_t as size_t is more
likely to be what is really wanted.
*) Some added #include's to end the complaints about implicit function
declarations

Patch is broken up into one patch per directory which needed changes.  I
can try to split things up a bit more if anyone wants as requested.

With this applied, cvs as of earlier today was working nicely on AMD64
with spot testing across most things and the really ugly warnings when
building on a 64bit platform are cleaned up.

Jeremy
Index: addressbook//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1396
diff -u -r1.1396 ChangeLog
--- addressbook//ChangeLog	30 Apr 2003 04:10:20 -0000	1.1396
+++ addressbook//ChangeLog	5 May 2003 22:13:04 -0000
@@ -1,3 +1,14 @@
+2003-05-05  Jeremy Katz  <katzj redhat com>
+
+	* printing/e-contact-print.c (e_contact_print_response): Use glib
+	macro to case from pointer to int.
+
+	* printing/e-contact-print-envelope.c: Add missing #include.
+
+	* gui/component/select-names/e-select-names-completion.c 
+	(e_select_names_completion_start_query): Use
+	E_SELECT_NAMES_COMPLETION to avoid warning
+
 2003-04-29  Chris Toshok  <toshok ximian com>
 
 	[ fixes bug #41255 ]
Index: addressbook//gui/component/select-names/e-select-names-completion.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/select-names/e-select-names-completion.c,v
retrieving revision 1.62
diff -u -r1.62 e-select-names-completion.c
--- addressbook//gui/component/select-names/e-select-names-completion.c	23 Apr 2003 20:32:02 -0000	1.62
+++ addressbook//gui/component/select-names/e-select-names-completion.c	5 May 2003 22:13:04 -0000
@@ -995,7 +995,7 @@
 			   solely on our cached cards, signal
 			   that the search is over. */
 			if (!comp->priv->pending_completion_seq)
-				e_select_names_completion_done (E_COMPLETION (comp));
+				e_select_names_completion_done (E_SELECT_NAMES_COMPLETION (comp));
 		} else {
 			g_free (comp->priv->query_text);
 			comp->priv->query_text = NULL;
Index: addressbook//printing/e-contact-print-envelope.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/printing/e-contact-print-envelope.c,v
retrieving revision 1.14
diff -u -r1.14 e-contact-print-envelope.c
--- addressbook//printing/e-contact-print-envelope.c	21 Jan 2003 17:23:32 -0000	1.14
+++ addressbook//printing/e-contact-print-envelope.c	5 May 2003 22:13:04 -0000
@@ -28,6 +28,7 @@
 #include <libgnomeprintui/gnome-print-dialog.h>
 #include <libgnomeprint/gnome-print.h>
 #include <libgnomeprint/gnome-print-job.h>
+#include <libgnomeprintui/gnome-print-job-preview.h>
 #include "addressbook/backend/ebook/e-card.h"
 #include "addressbook/backend/ebook/e-card-simple.h"
 
Index: addressbook//printing/e-contact-print.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/printing/e-contact-print.c,v
retrieving revision 1.34
diff -u -r1.34 e-contact-print.c
--- addressbook//printing/e-contact-print.c	5 Feb 2003 23:47:12 -0000	1.34
+++ addressbook//printing/e-contact-print.c	5 May 2003 22:13:04 -0000
@@ -1014,7 +1014,7 @@
 	GnomePrintJob *master;
 	GnomePrintConfig *config;
 	GnomePrintContext *pc;
-	gboolean uses_book = (gint) g_object_get_data(G_OBJECT(dialog), "uses_book");
+	gboolean uses_book = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "uses_book"));
 	EBook *book = NULL;
 	char *query = NULL;
 	ECard *card = NULL;
Index: camel//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1809
diff -u -r1.1809 ChangeLog
--- camel//ChangeLog	4 May 2003 19:11:39 -0000	1.1809
+++ camel//ChangeLog	5 May 2003 22:13:13 -0000
@@ -1,3 +1,74 @@
+2003-05-05  Jeremy Katz  <katzj redhat com>
+
+	* providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf
+	is initialized to avoid compiler warning.
+
+	* providers/local/camel-mbox-summary.c (summary_header_load): Cast
+	folder_size to uint32 to fix warning.
+	(camel_mbox_summary_sync_mbox): Update for new API.
+
+	* providers/imap/camel-imap-utils.c (parse_params):
+	imap_parse_nstring expects size_t, not int
+	(imap_body_decode): Likewise.
+
+	* camel-stream-filter.c (do_read): presize needs to be size_t
+	instead of int.
+	(do_write): Likewise.
+
+	* camel-seekable-substream.c (stream_read): Return ssize_t instead
+	of int to match prototypes.
+	(stream_write): Likewise.
+
+	* camel-mime-part.c (construct_from_parser): len needs to be
+	size_t instead of int.
+
+	* camel-mime-parser.c (folder_scan_step): datalength needs to be a
+	size_t* instead of an int* to make dependent APIs safe.
+	(camel_mime_parser_step): Likewise.
+	(folder_scan_content): Likewise.
+	* camel-mime-parser.h: Likewise.
+
+	* camel-mime-message.c (camel_mime_message_class_init): Use glib
+	macro for pointer/int conversions.
+	(construct_from_parser): Update for new API.
+
+	* camel-folder-summary.c
+	(camel_folder_summary_info_new_from_parser): Update len to be
+	size_t for new API.
+	(summary_build_content_info): Likewise.
+	* camel-http-stream.c (http_get_headers): Likewise.
+	* camel-mime-part-utils.c
+	(simple_data_wrapper_construct_from_parser): Likewise.
+	* camel-multipart-signed.c (signed_construct_from_parser): Likewise.
+	* camel-multipart.c (construct_from_parser): Likewise.
+
+	* camel-folder-search.c (match_words_index): Use glib macros for
+	pointer/int conversions.
+	* camel-html-parser.c (tokenise_setup): Likewise.
+	(convert_entity): Likewise.
+	* camel-block-file.c (block_hash_func): Likewise.
+	(camel_block_file_get_block): Likewise.
+	(camel_block_file_get_block): Likewise.
+	(camel_block_file_detach_block): Likewise.
+	* camel-session.c (session_thread_msg_new): Likewise.
+	(session_thread_msg_free): Likewise.
+	(session_thread_wait): Likewise.
+	* camel-text-index.c (text_index_compress_nosync): Likewise.
+	(text_index_compress_nosync): Likewise.
+	(camel_text_index_validate): Likewise.
+	* camel-vee-folder.c (vee_folder_remove_folder): Likewise.
+	(unmatched_check_uid): Likewise.
+	(folder_added_uid): Likewise.
+	(vee_folder_build_folder): Likewise.
+	(folder_changed_add_uid): Likewise.
+	(folder_changed_remove_uid): Likewise.
+	* providers/imap/camel-imap-search.c (imap_body_contains): Likewise.
+	* providers/pop3/camel-pop3-folder.c (cmd_list): Likewise.
+	(cmd_uidl): Likewise.
+
+	* camel-data-cache.c (data_cache_init): Cast to CamelCopyFunc.
+	Fixes a warning.
+
 2003-05-02  Dan Winship  <danw ximian com>
 
 	* camel-mime-part-utils.c
Index: camel//camel-block-file.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-block-file.c,v
retrieving revision 1.11
diff -u -r1.11 camel-block-file.c
--- camel//camel-block-file.c	19 Apr 2003 03:15:49 -0000	1.11
+++ camel//camel-block-file.c	5 May 2003 22:13:13 -0000
@@ -162,7 +162,7 @@
 static guint
 block_hash_func(const void *v)
 {
-	return ((camel_block_t)v) >> CAMEL_BLOCK_SIZE_BITS;
+	return ((camel_block_t) GPOINTER_TO_UINT(v)) >> CAMEL_BLOCK_SIZE_BITS;
 }
 
 static void
@@ -560,7 +560,7 @@
 
 	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
 
-	bl = g_hash_table_lookup(bs->blocks, (void *)id);
+	bl = g_hash_table_lookup(bs->blocks, GUINT_TO_POINTER(id));
 
 	d(printf("Get  block %08x: %s\n", id, bl?"cached":"must read"));
 
@@ -582,7 +582,7 @@
 		}
 
 		bs->block_cache_count++;
-		g_hash_table_insert(bs->blocks, (void *)bl->id, bl);
+		g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
 
 		/* flush old blocks */
 		flush = (CamelBlock *)bs->block_cache.tailpred;
@@ -590,7 +590,7 @@
 		while (bs->block_cache_count > bs->block_cache_limit && prev) {
 			if (flush->refcount == 0) {
 				if (sync_block_nolock(bs, flush) != -1) {
-					g_hash_table_remove(bs->blocks, (void *)flush->id);
+					g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(flush->id));
 					e_dlist_remove((EDListNode *)flush);
 					g_free(flush);
 					bs->block_cache_count--;
@@ -629,7 +629,7 @@
 {
 	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
 
-	g_hash_table_remove(bs->blocks, (void *)bl->id);
+	g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(bl->id));
 	e_dlist_remove((EDListNode *)bl);
 	bl->flags |= CAMEL_BLOCK_DETACHED;
 
@@ -647,7 +647,7 @@
 {
 	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
 
-	g_hash_table_insert(bs->blocks, (void *)bl->id, bl);
+	g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
 	e_dlist_addtail(&bs->block_cache, (EDListNode *)bl);
 	bl->flags &= ~CAMEL_BLOCK_DETACHED;
 
Index: camel//camel-data-cache.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-data-cache.c,v
retrieving revision 1.12
diff -u -r1.12 camel-data-cache.c
--- camel//camel-data-cache.c	23 Apr 2003 01:34:02 -0000	1.12
+++ camel//camel-data-cache.c	5 May 2003 22:13:13 -0000
@@ -79,7 +79,7 @@
 	struct _CamelDataCachePrivate *p;
 
 	p = cdc->priv = g_malloc0(sizeof(*cdc->priv));
-	p->busy_bag = camel_object_bag_new(g_str_hash, g_str_equal, g_strdup, g_free);
+	p->busy_bag = camel_object_bag_new(g_str_hash, g_str_equal, (CamelCopyFunc)g_strdup, g_free);
 }
 
 static void data_cache_finalise(CamelDataCache *cdc)
Index: camel//camel-folder-search.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-search.c,v
retrieving revision 1.53
diff -u -r1.53 camel-folder-search.c
--- camel//camel-folder-search.c	24 Mar 2003 19:34:11 -0000	1.53
+++ camel//camel-folder-search.c	5 May 2003 22:13:14 -0000
@@ -811,8 +811,8 @@
 								int mask;
 								const char *uid = camel_message_info_uid(mi);
 
-								mask = ((int)g_hash_table_lookup(ht, uid)) | (1<<i);
-								g_hash_table_insert(ht, (char *)uid, (void *)mask);
+								mask = (GPOINTER_TO_INT(g_hash_table_lookup(ht, uid))) | (1<<i);
+								g_hash_table_insert(ht, (char *)uid, GINT_TO_POINTER(mask));
 							}
 						}
 						camel_object_unref((CamelObject *)nc);
Index: camel//camel-folder-summary.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-summary.c,v
retrieving revision 1.118
diff -u -r1.118 camel-folder-summary.c
--- camel//camel-folder-summary.c	8 Apr 2003 00:55:02 -0000	1.118
+++ camel//camel-folder-summary.c	5 May 2003 22:13:14 -0000
@@ -905,7 +905,7 @@
 {
 	CamelMessageInfo *info = NULL;
 	char *buffer;
-	int len;
+	size_t len;
 	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
 	off_t start;
 	CamelIndexName *name = NULL;
@@ -1952,7 +1952,8 @@
 static CamelMessageContentInfo *
 summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
 {
-	int state, len;
+	int state;
+	size_t len;
 	char *buffer;
 	CamelMessageContentInfo *info = NULL;
 	struct _header_content_type *ct;
Index: camel//camel-html-parser.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-html-parser.c,v
retrieving revision 1.3
diff -u -r1.3 camel-html-parser.c
--- camel//camel-html-parser.c	5 Nov 2002 09:05:22 -0000	1.3
+++ camel//camel-html-parser.c	5 May 2003 22:13:14 -0000
@@ -469,7 +469,7 @@
 	if (entities == NULL) {
 		entities = g_hash_table_new(g_str_hash, g_str_equal);
 		for (i=0;i<sizeof(entity_map)/sizeof(entity_map[0]);i++) {
-			g_hash_table_insert(entities, (char *)entity_map[i].name, (void *)entity_map[i].val);
+			g_hash_table_insert(entities, (char *)entity_map[i].name, GUINT_TO_POINTER(entity_map[i].val));
 		}
 	}
 }
@@ -518,7 +518,7 @@
 	if (e[0] == '#')
 		return g_unichar_to_utf8(atoi(e+1), ent);
 
-	val = (unsigned int)g_hash_table_lookup(entities, e);
+	val = GPOINTER_TO_UINT(g_hash_table_lookup(entities, e));
 	if (ent)
 		return g_unichar_to_utf8(val, ent);
 	else
Index: camel//camel-http-stream.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-http-stream.c,v
retrieving revision 1.8
diff -u -r1.8 camel-http-stream.c
--- camel//camel-http-stream.c	28 Feb 2003 21:55:03 -0000	1.8
+++ camel//camel-http-stream.c	5 May 2003 22:13:14 -0000
@@ -254,7 +254,8 @@
 	struct _header_raw *headers, *node, *tail;
 	const char *type;
 	char *buf;
-	int len, err;
+	size_t len;
+	int err;
 	
 	if (http->parser)
 		camel_object_unref (CAMEL_OBJECT (http->parser));
Index: camel//camel-mime-message.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-message.c,v
retrieving revision 1.112
diff -u -r1.112 camel-mime-message.c
--- camel//camel-mime-message.c	28 Mar 2003 00:13:42 -0000	1.112
+++ camel//camel-mime-message.c	5 May 2003 22:13:14 -0000
@@ -103,7 +103,7 @@
 
 	header_name_table = g_hash_table_new (g_strcase_hash, g_strcase_equal);
 	for (i=0;header_names[i];i++)
-		g_hash_table_insert (header_name_table, header_names[i], (gpointer)i+1);
+		g_hash_table_insert (header_name_table, header_names[i], GINT_TO_POINTER(i+1));
 
 	/* virtual method overload */
 	camel_data_wrapper_class->write_to_stream = write_to_stream;
@@ -449,7 +449,7 @@
 construct_from_parser (CamelMimePart *dw, CamelMimeParser *mp)
 {
 	char *buf;
-	int len;
+	size_t len;
 	int state;
 	int ret;
 	int err;
Index: camel//camel-mime-parser.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-parser.c,v
retrieving revision 1.51
diff -u -r1.51 camel-mime-parser.c
--- camel//camel-mime-parser.c	14 Jan 2003 07:15:27 -0000	1.51
+++ camel//camel-mime-parser.c	5 May 2003 22:13:14 -0000
@@ -275,13 +275,13 @@
 	CamelMimeFilter *filter;
 };
 
-static void folder_scan_step(struct _header_scan_state *s, char **databuffer, int *datalength);
+static void folder_scan_step(struct _header_scan_state *s, char **databuffer, size_t *datalength);
 static void folder_scan_drop_step(struct _header_scan_state *s);
 static int folder_scan_init_with_fd(struct _header_scan_state *s, int fd);
 static int folder_scan_init_with_stream(struct _header_scan_state *s, CamelStream *stream);
 static struct _header_scan_state *folder_scan_init(void);
 static void folder_scan_close(struct _header_scan_state *s);
-static struct _header_scan_stack *folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, int *length);
+static struct _header_scan_stack *folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, size_t *length);
 static struct _header_scan_stack *folder_scan_header(struct _header_scan_state *s, int *lastone);
 static int folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save);
 static off_t folder_seek(struct _header_scan_state *s, off_t offset, int whence);
@@ -728,7 +728,7 @@
  * is returned.
  **/
 enum _header_state
-camel_mime_parser_step(CamelMimeParser *m, char **databuffer, int *datalength)
+camel_mime_parser_step(CamelMimeParser *m, char **databuffer, size_t *datalength)
 {
 	struct _header_scan_state *s = _PRIVATE(m);
 
@@ -736,7 +736,7 @@
 
 	if (s->unstep <= 0) {
 		char *dummy;
-		int dummylength;
+		size_t dummylength;
 
 		if (databuffer == NULL) {
 			databuffer = &dummy;
@@ -1358,7 +1358,7 @@
 }
 
 static struct _header_scan_stack *
-folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, int *length)
+folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, size_t *length)
 {
 	int atleast = s->atleast, newatleast;
 	register char *inptr;
@@ -1570,7 +1570,7 @@
 #define USE_FROM
 
 static void
-folder_scan_step(struct _header_scan_state *s, char **databuffer, int *datalength)
+folder_scan_step(struct _header_scan_state *s, char **databuffer, size_t *datalength)
 {
 	struct _header_scan_stack *h, *hb;
 	const char *content;
@@ -1853,7 +1853,7 @@
 	int fd;
 	struct _header_scan_state *s;
 	char *data;
-	int len;
+	size_t len;
 	int state;
 	char *name = "/tmp/evmail/Inbox";
 	struct _header_scan_stack *h;
Index: camel//camel-mime-parser.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-parser.h,v
retrieving revision 1.16
diff -u -r1.16 camel-mime-parser.h
--- camel//camel-mime-parser.h	7 May 2002 07:31:21 -0000	1.16
+++ camel//camel-mime-parser.h	5 May 2003 22:13:14 -0000
@@ -103,7 +103,7 @@
 int camel_mime_parser_set_header_regex(CamelMimeParser *m, char *matchstr);
 
 /* normal interface */
-enum _header_state camel_mime_parser_step(CamelMimeParser *, char **, int *);
+enum _header_state camel_mime_parser_step(CamelMimeParser *, char **, size_t *);
 void camel_mime_parser_unstep(CamelMimeParser *);
 void camel_mime_parser_drop_step(CamelMimeParser *m);
 enum _header_state camel_mime_parser_state(CamelMimeParser *);
Index: camel//camel-mime-part-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-part-utils.c,v
retrieving revision 1.88
diff -u -r1.88 camel-mime-part-utils.c
--- camel//camel-mime-part-utils.c	4 May 2003 19:11:39 -0000	1.88
+++ camel//camel-mime-part-utils.c	5 May 2003 22:13:14 -0000
@@ -282,7 +282,8 @@
 {
 	CamelMimeFilter *fdec = NULL, *fcrlf = NULL;
 	CamelMimeFilterBasicType enctype = 0;
-	int len, decid = -1, crlfid = -1;
+	size_t len;
+	int decid = -1, crlfid = -1;
 	struct _header_content_type *ct;
 	const char *charset = NULL;
 	char *encoding, *buf;
Index: camel//camel-mime-part.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-part.c,v
retrieving revision 1.148
diff -u -r1.148 camel-mime-part.c
--- camel//camel-mime-part.c	28 Mar 2003 00:13:42 -0000	1.148
+++ camel//camel-mime-part.c	5 May 2003 22:13:14 -0000
@@ -760,7 +760,7 @@
 	struct _header_raw *headers;
 	const char *content;
 	char *buf;
-	int len;
+	size_t len;
 	int err;
 
 	d(printf("mime_part::construct_from_parser()\n"));
Index: camel//camel-multipart-signed.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-multipart-signed.c,v
retrieving revision 1.8
diff -u -r1.8 camel-multipart-signed.c
--- camel//camel-multipart-signed.c	17 Apr 2003 03:09:37 -0000	1.8
+++ camel//camel-multipart-signed.c	5 May 2003 22:13:14 -0000
@@ -431,7 +431,7 @@
 	struct _header_content_type *content_type;
 	CamelMultipartSigned *mps = (CamelMultipartSigned *)multipart;
 	char *buf;
-	unsigned int len;
+	size_t len;
 	CamelStream *mem;
 
 	/* we *must not* be in multipart state, otherwise the mime parser will
Index: camel//camel-multipart.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-multipart.c,v
retrieving revision 1.49
diff -u -r1.49 camel-multipart.c
--- camel//camel-multipart.c	12 Jul 2002 07:12:24 -0000	1.49
+++ camel//camel-multipart.c	5 May 2003 22:13:14 -0000
@@ -548,7 +548,7 @@
 	struct _header_content_type *content_type;
 	CamelMimePart *bodypart;
 	char *buf;
-	unsigned int len;
+	size_t len;
 
 	g_assert(camel_mime_parser_state(mp) == HSCAN_MULTIPART);
 		
Index: camel//camel-seekable-substream.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-seekable-substream.c,v
retrieving revision 1.26
diff -u -r1.26 camel-seekable-substream.c
--- camel//camel-seekable-substream.c	31 May 2002 01:05:35 -0000	1.26
+++ camel//camel-seekable-substream.c	5 May 2003 22:13:14 -0000
@@ -32,8 +32,8 @@
 /* Returns the class for a CamelSeekableSubStream */
 #define CSS_CLASS(so) CAMEL_SEEKABLE_SUBSTREAM_CLASS (CAMEL_OBJECT(so)->klass)
 
-static	int	 stream_read  (CamelStream *stream, char *buffer, unsigned int n);
-static	int	 stream_write (CamelStream *stream, const char *buffer, unsigned int n);
+static	ssize_t	 stream_read  (CamelStream *stream, char *buffer, size_t n);
+static	ssize_t	 stream_write (CamelStream *stream, const char *buffer, size_t n);
 static	int	 stream_flush (CamelStream *stream);
 static	int	 stream_close (CamelStream *stream);
 static	gboolean eos	      (CamelStream *stream);
@@ -142,13 +142,13 @@
 	return camel_seekable_stream_seek (parent, seekable_stream->position, CAMEL_STREAM_SET)	== seekable_stream->position;
 }
 
-static int
-stream_read (CamelStream *stream, char *buffer, unsigned int n)
+static ssize_t
+stream_read (CamelStream *stream, char *buffer, size_t n)
 {
 	CamelSeekableStream *parent;
 	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
 	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (stream);
-	int v;
+	ssize_t v;
 
 	if (n == 0)
 		return 0;
@@ -179,13 +179,13 @@
 	return v;
 }
 
-static int
-stream_write (CamelStream *stream, const char *buffer, unsigned int n)
+static ssize_t
+stream_write (CamelStream *stream, const char *buffer, size_t n)
 {
 	CamelSeekableStream *parent;
 	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM(stream);
 	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM(stream);
-	int v;
+	ssize_t v;
 
 	if (n == 0)
 		return 0;
Index: camel//camel-session.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-session.c,v
retrieving revision 1.90
diff -u -r1.90 camel-session.c
--- camel//camel-session.c	23 Apr 2003 04:44:58 -0000	1.90
+++ camel//camel-session.c	5 May 2003 22:13:14 -0000
@@ -708,7 +708,7 @@
 
 	CAMEL_SESSION_LOCK(session, thread_lock);
 	m->id = session->priv->thread_id++;
-	g_hash_table_insert(session->priv->thread_active, (void *)m->id, m);
+	g_hash_table_insert(session->priv->thread_active, GINT_TO_POINTER(m->id), m);
 	CAMEL_SESSION_UNLOCK(session, thread_lock);
 
 	return m;
@@ -721,7 +721,7 @@
 	d(printf("free message %p session %p\n", msg, session));
 
 	CAMEL_SESSION_LOCK(session, thread_lock);
-	g_hash_table_remove(session->priv->thread_active, (void *)msg->id);
+	g_hash_table_remove(session->priv->thread_active, GINT_TO_POINTER(msg->id));
 	CAMEL_SESSION_UNLOCK(session, thread_lock);
 
 	d(printf("free msg, ops->free = %p\n", msg->ops->free));
@@ -769,7 +769,7 @@
 	/* we just busy wait, only other alternative is to setup a reply port? */
 	do {
 		CAMEL_SESSION_LOCK(session, thread_lock);
-		wait = g_hash_table_lookup(session->priv->thread_active, (void *)id) != NULL;
+		wait = g_hash_table_lookup(session->priv->thread_active, GINT_TO_POINTER(id)) != NULL;
 		CAMEL_SESSION_UNLOCK(session, thread_lock);
 		if (wait) {
 			usleep(20000);
Index: camel//camel-stream-filter.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-stream-filter.c,v
retrieving revision 1.26
diff -u -r1.26 camel-stream-filter.c
--- camel//camel-stream-filter.c	28 Mar 2003 00:13:43 -0000	1.26
+++ camel//camel-stream-filter.c	5 May 2003 22:13:14 -0000
@@ -225,7 +225,7 @@
 	g_check(p->realbuffer);
 
 	if (p->filteredlen<=0) {
-		int presize = READ_PAD;
+		size_t presize = READ_PAD;
 
 		size = camel_stream_read(filter->source, p->buffer, READ_SIZE);
 		if (size <= 0) {
@@ -287,7 +287,7 @@
 	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
 	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
 	struct _filter *f;
-	int presize;
+	size_t presize;
 	char *buffer = (char *)buf;
 	size_t len = n;
 
@@ -328,7 +328,7 @@
 	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
 	struct _filter *f;
 	char *buffer;
-	int presize;
+	size_t presize;
 	size_t len;
 	
 	if (p->last_was_read) {
Index: camel//camel-text-index.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-text-index.c,v
retrieving revision 1.14
diff -u -r1.14 camel-text-index.c
--- camel//camel-text-index.c	19 Apr 2003 03:15:49 -0000	1.14
+++ camel//camel-text-index.c	5 May 2003 22:13:14 -0000
@@ -427,7 +427,7 @@
 				goto fail;
 			rb->names++;
 			camel_partition_table_add(newp->name_hash, name, newkeyid);
-			g_hash_table_insert(remap, (void *)oldkeyid, (void *)newkeyid);
+			g_hash_table_insert(remap, GINT_TO_POINTER(oldkeyid), GINT_TO_POINTER(newkeyid));
 		} else
 			io(printf("deleted name '%s'\n", name));
 		g_free(name);
@@ -453,7 +453,7 @@
 				goto fail;
 			}
 			for (i=0;i<count;i++) {
-				newkeyid = (camel_key_t)g_hash_table_lookup(remap, (void *)records[i]);
+				newkeyid = (camel_key_t)GPOINTER_TO_INT(g_hash_table_lookup(remap, GINT_TO_POINTER(records[i])));
 				if (newkeyid) {
 					newrecords[newcount++] = newkeyid;
 					if (newcount == sizeof(newrecords)/sizeof(newrecords[0])) {
@@ -1275,16 +1275,16 @@
 
 	keyid = 0;
 	while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
-		if ((oldword = g_hash_table_lookup(names, (void *)keyid)) != NULL
-		    || (oldword = g_hash_table_lookup(deleted, (void *)keyid)) != NULL) {
+		if ((oldword = g_hash_table_lookup(names, GINT_TO_POINTER(keyid))) != NULL
+		    || (oldword = g_hash_table_lookup(deleted, GINT_TO_POINTER(keyid))) != NULL) {
 			printf("Warning, name '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
 			g_free(word);
 		} else {
 			g_hash_table_insert(name_word, word, (void *)1);
 			if ((flags & 1) == 0) {
-				g_hash_table_insert(names, (void *)keyid, word);
+				g_hash_table_insert(names, GINT_TO_POINTER(keyid), word);
 			} else {
-				g_hash_table_insert(deleted, (void *)keyid, word);
+				g_hash_table_insert(deleted, GINT_TO_POINTER(keyid), word);
 			}
 		}
 	}
@@ -1297,12 +1297,12 @@
 		GHashTable *used;
 
 		/* first, check for duplicates of keyid, and data */
-		if ((oldword = g_hash_table_lookup(words, (void *)keyid)) != NULL) {
+		if ((oldword = g_hash_table_lookup(words, GINT_TO_POINTER(keyid))) != NULL) {
 			printf("Warning, word '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
 			g_free(word);
 			word = oldword;
 		} else {
-			g_hash_table_insert(words, (void *)keyid, word);
+			g_hash_table_insert(words, GINT_TO_POINTER(keyid), word);
 		}
 
 		if (data == 0) {
@@ -1310,10 +1310,10 @@
 			   though it is a problem if its a fresh index */
 			printf("Word '%s' has no data associated with it\n", word);
 		} else {
-			if ((oldword = g_hash_table_lookup(keys, (void *)data)) != NULL) {
+			if ((oldword = g_hash_table_lookup(keys, GUINT_TO_POINTER(data))) != NULL) {
 				printf("Warning, word '%s' duplicates data (%x) with name '%s'\n", word, data, oldword);
 			} else {
-				g_hash_table_insert(keys, (void *)data, word);
+				g_hash_table_insert(keys, GUINT_TO_POINTER(data), word);
 			}
 		}
 
Index: camel//camel-vee-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-vee-folder.c,v
retrieving revision 1.55
diff -u -r1.55 camel-vee-folder.c
--- camel//camel-vee-folder.c	7 Mar 2003 03:38:45 -0000	1.55
+++ camel//camel-vee-folder.c	5 May 2003 22:13:14 -0000
@@ -955,7 +955,7 @@
 									camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
 								g_free(oldkey);
 							} else {
-								g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1));
+								g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1));
 							}
 						}
 					} else {
@@ -1009,7 +1009,7 @@
 	uid = alloca(strlen(uidin)+9);
 	memcpy(uid, u->hash, 8);
 	strcpy(uid+8, uidin);
-	n = (int)g_hash_table_lookup(unmatched_uids, uid);
+	n = GPOINTER_TO_INT(g_hash_table_lookup(unmatched_uids, uid));
 	if (n == 0) {
 		if (vee_folder_add_uid(folder_unmatched, u->source, uidin, u->hash))
 			camel_folder_change_info_add_uid(folder_unmatched->changes, uid);
@@ -1035,9 +1035,9 @@
 
 		if (!CAMEL_IS_VEE_FOLDER(u->source)) {
 			if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
-				g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1));
+				g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
 			} else {
-				g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), (void *)1);
+				g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), GINT_TO_POINTER(1));
 			}
 		}
 	}
@@ -1106,7 +1106,7 @@
 							g_hash_table_remove(unmatched_uids, oldkey);
 							g_free(oldkey);
 						} else {
-							g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1));
+							g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1));
 						}
 					}
 				} else {
@@ -1207,7 +1207,7 @@
 
 	if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) {
 		if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
-			g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1));
+			g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
 		} else {
 			g_hash_table_insert(unmatched_uids, g_strdup(vuid), (void *)1);
 		}
@@ -1248,7 +1248,7 @@
 						camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
 					g_free(oldkey);
 				} else {
-					g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1));
+					g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1));
 				}
 			} else {
 				if (vee_folder_add_uid(folder_unmatched, sub, uid, hash))
Index: camel//providers/imap/camel-imap-search.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-search.c,v
retrieving revision 1.15
diff -u -r1.15 camel-imap-search.c
--- camel//providers/imap/camel-imap-search.c	17 Dec 2002 21:46:39 -0000	1.15
+++ camel//providers/imap/camel-imap-search.c	5 May 2003 22:13:14 -0000
@@ -480,13 +480,13 @@
 				info = s->summary->pdata[i];
 				uid = (char *)camel_message_info_uid(info);
 				uidn = strtoul(uid, NULL, 10);
-				g_hash_table_insert(uid_hash, (void *)uidn, uid);
+				g_hash_table_insert(uid_hash, GUINT_TO_POINTER(uidn), uid);
 			}
 
 			uidp = (guint32 *)mr->matches->data;
 			j = mr->matches->len;
 			for (i=0;i<j && !truth;i++) {
-				uid = g_hash_table_lookup(uid_hash, (void *)*uidp++);
+				uid = g_hash_table_lookup(uid_hash, GUINT_TO_POINTER(*uidp++));
 				if (uid)
 					g_ptr_array_add(array, uid);
 			}
Index: camel//providers/imap/camel-imap-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-utils.c,v
retrieving revision 1.63
diff -u -r1.63 camel-imap-utils.c
--- camel//providers/imap/camel-imap-utils.c	24 Apr 2003 17:41:28 -0000	1.63
+++ camel//providers/imap/camel-imap-utils.c	5 May 2003 22:13:14 -0000
@@ -735,7 +735,7 @@
 {
 	const char *parms = *parms_p;
 	char *name, *value;
-	int len;
+	size_t len;
 	
 	if (!strncasecmp (parms, "nil", 3)) {
 		*parms_p += 3;
@@ -777,7 +777,7 @@
 	CamelContentType *ctype = NULL;
 	char *description = NULL;
 	char *encoding = NULL;
-	unsigned int len;
+	size_t len;
 	size_t size;
 	char *p;
 	
Index: camel//providers/local/camel-mbox-summary.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/local/camel-mbox-summary.c,v
retrieving revision 1.40
diff -u -r1.40 camel-mbox-summary.c
--- camel//providers/local/camel-mbox-summary.c	20 Mar 2003 16:43:29 -0000	1.40
+++ camel//providers/local/camel-mbox-summary.c	5 May 2003 22:13:14 -0000
@@ -172,7 +172,7 @@
 	if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_load(s, in) == -1)
 		return -1;
 
-	return camel_file_util_decode_uint32(in, &mbs->folder_size);
+	return camel_file_util_decode_uint32(in, (guint32 *) &mbs->folder_size);
 }
 
 static int
@@ -796,7 +796,7 @@
 	int i, count;
 	CamelMboxMessageInfo *info = NULL;
 	char *buffer, *xevnew = NULL;
-	int len;
+	size_t len;
 	const char *fromline;
 	int lastdel = FALSE;
 #ifdef STATUS_PINE
Index: camel//providers/pop3/camel-pop3-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/pop3/camel-pop3-folder.c,v
retrieving revision 1.57
diff -u -r1.57 camel-pop3-folder.c
--- camel//providers/pop3/camel-pop3-folder.c	11 Nov 2002 06:40:28 -0000	1.57
+++ camel//providers/pop3/camel-pop3-folder.c	5 May 2003 22:13:14 -0000
@@ -199,7 +199,7 @@
 				if ((pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) == 0)
 					fi->cmd = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_builduid, fi, "TOP %u 0\r\n", id);
 				g_ptr_array_add(((CamelPOP3Folder *)folder)->uids, fi);
-				g_hash_table_insert(((CamelPOP3Folder *)folder)->uids_id, (void *)id, fi);
+				g_hash_table_insert(((CamelPOP3Folder *)folder)->uids_id, GINT_TO_POINTER(id), fi);
 			}
 		}
 	} while (ret>0);
@@ -222,7 +222,7 @@
 			if (strlen(line) > 1024)
 				line[1024] = 0;
 			if (sscanf(line, "%u %s", &id, uid) == 2) {
-				fi = g_hash_table_lookup(folder->uids_id, (void *)id);
+				fi = g_hash_table_lookup(folder->uids_id, GINT_TO_POINTER(id));
 				if (fi) {
 					camel_operation_progress(NULL, (fi->index+1) * 100 / folder->uids->len);
 					fi->uid = g_strdup(uid);
Index: camel//providers/smtp/camel-smtp-transport.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/smtp/camel-smtp-transport.c,v
retrieving revision 1.136
diff -u -r1.136 camel-smtp-transport.c
--- camel//providers/smtp/camel-smtp-transport.c	24 Apr 2003 01:51:20 -0000	1.136
+++ camel//providers/smtp/camel-smtp-transport.c	5 May 2003 22:13:14 -0000
@@ -859,7 +859,7 @@
 smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
 {
 	/* say hello to the server */
-	char *name, *cmdbuf, *respbuf = NULL;
+	char *name = NULL, *cmdbuf = NULL, *respbuf = NULL;
 	struct hostent *host;
 	CamelException err;
 	const char *token;
Index: mail//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2714
diff -u -r1.2714 ChangeLog
--- mail//ChangeLog	5 May 2003 18:08:49 -0000	1.2714
+++ mail//ChangeLog	5 May 2003 22:13:26 -0000
@@ -1,3 +1,26 @@
+2003-05-05  Jeremy Katz  <katzj redhat com>
+
+	* mail-offline-handler.c: Add #include to fix warning.
+
+	* mail-mt.c (mail_msg_new): Use glib macros for pointer/int
+	conversions.
+	(mail_msg_free): Likewise.
+	(mail_msg_cancel): Likewise.
+	(mail_msg_wait): Likewise.
+	(mail_msg_active): Likewise.
+	* mail-session.c (main_register_timeout): Likewise.
+	(register_timeout): Likewise.
+	(main_remove_timeout): Likewise.
+	(remove_timeout): Likewise.
+	* message-list.c (ml_value_to_string): Likewise.
+
+	* mail-identify.c: Add #include to fix warning.
+
+	* mail-config.c (config_write_fonts): Don't pass extra arguments
+	to g_warning.
+
+	* mail-callbacks.c: Add #include to fix warning.
+
 2003-05-05  Ettore Perazzoli  <ettore ximian com>
 
 	* mail-session.c (request_password): Set OK as the default
Index: mail//mail-callbacks.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-callbacks.c,v
retrieving revision 1.440
diff -u -r1.440 mail-callbacks.c
--- mail//mail-callbacks.c	2 May 2003 16:07:17 -0000	1.440
+++ mail//mail-callbacks.c	5 May 2003 22:13:26 -0000
@@ -41,6 +41,7 @@
 
 #include <libgnomeprint/gnome-print-job.h>
 #include <libgnomeprintui/gnome-print-dialog.h>
+#include <libgnomeprintui/gnome-print-job-preview.h>
 
 #include <bonobo/bonobo-widget.h>
 #include <bonobo/bonobo-socket.h>
Index: mail//mail-config.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.c,v
retrieving revision 1.274
diff -u -r1.274 mail-config.c
--- mail//mail-config.c	29 Apr 2003 18:18:36 -0000	1.274
+++ mail//mail-config.c	5 May 2003 22:13:27 -0000
@@ -438,7 +438,7 @@
 	char *var_font;
 	
 	if (!evolution_dir) {
-		g_warning ("evolution_dir empty", filename);
+		g_warning ("evolution_dir empty");
 		return;
 	}
 
Index: mail//mail-identify.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-identify.c,v
retrieving revision 1.24
diff -u -r1.24 mail-identify.c
--- mail//mail-identify.c	10 Feb 2003 19:50:55 -0000	1.24
+++ mail//mail-identify.c	5 May 2003 22:13:27 -0000
@@ -31,6 +31,7 @@
 
 #include <glib.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
+#include <libgnomevfs/gnome-vfs-mime.h>
 #include <libgnomevfs/gnome-vfs-mime-utils.h>
 #include "mail.h"
 
Index: mail//mail-mt.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-mt.c,v
retrieving revision 1.68
diff -u -r1.68 mail-mt.c
--- mail//mail-mt.c	15 Apr 2003 21:29:21 -0000	1.68
+++ mail//mail-mt.c	5 May 2003 22:13:27 -0000
@@ -114,11 +114,11 @@
 	msg->ops = ops;
 	msg->seq = mail_msg_seq++;
 	msg->msg.reply_port = reply_port;
-	msg->cancel = camel_operation_new(mail_operation_status, (void *)msg->seq);
+	msg->cancel = camel_operation_new(mail_operation_status, GINT_TO_POINTER(msg->seq));
 	camel_exception_init(&msg->ex);
 	msg->priv = g_malloc0(sizeof(*msg->priv));
 
-	g_hash_table_insert(mail_msg_active_table, (void *)msg->seq, msg);
+	g_hash_table_insert(mail_msg_active_table, GINT_TO_POINTER(msg->seq), msg);
 
 	d(printf("New message %p\n", msg));
 
@@ -184,7 +184,7 @@
 		fprintf(log, "%p: Free  (exception `%s')\n", msg,
 			camel_exception_get_description(&m->ex)?camel_exception_get_description(&m->ex):"None");
 #endif
-	g_hash_table_remove(mail_msg_active_table, (void *)m->seq);
+	g_hash_table_remove(mail_msg_active_table, GINT_TO_POINTER(m->seq));
 	pthread_cond_broadcast(&mail_msg_cond);
 
 	/* We need to make sure we dont lose a reference here YUCK YUCK */
@@ -281,7 +281,7 @@
 	struct _mail_msg *m;
 
 	MAIL_MT_LOCK(mail_msg_lock);
-	m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid);
+	m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
 
 	if (m && m->cancel)
 		camel_operation_cancel(m->cancel);
@@ -299,20 +299,20 @@
 
 	if (ismain) {
 		MAIL_MT_LOCK(mail_msg_lock);
-		m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid);
+		m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
 		while (m) {
 			MAIL_MT_UNLOCK(mail_msg_lock);
 			gtk_main_iteration();
 			MAIL_MT_LOCK(mail_msg_lock);
-			m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid);
+			m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
 		}
 		MAIL_MT_UNLOCK(mail_msg_lock);
 	} else {
 		MAIL_MT_LOCK(mail_msg_lock);
-		m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid);
+		m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
 		while (m) {
 			pthread_cond_wait(&mail_msg_cond, &mail_msg_lock);
-			m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid);
+			m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
 		}
 		MAIL_MT_UNLOCK(mail_msg_lock);
 	}
@@ -326,7 +326,7 @@
 	if (msgid == (unsigned int)-1) 
 		active = g_hash_table_size(mail_msg_active_table) > 0;
 	else
-		active = g_hash_table_lookup(mail_msg_active_table, (void *)msgid) != NULL;
+		active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL;
 	MAIL_MT_UNLOCK(mail_msg_lock);
 
 	return active;
Index: mail//mail-offline-handler.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-offline-handler.c,v
retrieving revision 1.11
diff -u -r1.11 mail-offline-handler.c
--- mail//mail-offline-handler.c	13 Jan 2003 18:41:39 -0000	1.11
+++ mail//mail-offline-handler.c	5 May 2003 22:13:27 -0000
@@ -29,6 +29,7 @@
 #include "mail-offline-handler.h"
 #include "mail.h"
 #include "mail-ops.h"
+#include "mail-folder-cache.h"
 
 #include <gtk/gtkmain.h>
 
Index: mail//mail-session.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-session.c,v
retrieving revision 1.65
diff -u -r1.65 mail-session.c
--- mail//mail-session.c	5 May 2003 18:08:49 -0000	1.65
+++ mail//mail-session.c	5 May 2003 22:13:27 -0000
@@ -657,7 +657,7 @@
 main_register_timeout (CamelSession *session, void *event_data, void *data)
 {
 	MailSession *ms = (MailSession *)session;
-	unsigned int handle = (unsigned int)event_data;
+	unsigned int handle = GPOINTER_TO_UINT(event_data);
 	struct _timeout_data *td;
 	
 	MAIL_SESSION_LOCK(session, lock);
@@ -707,7 +707,7 @@
 	
 	camel_object_ref (ms);
 	mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_register_timeout,
-			       (CamelObject *) session, (void *) ret, NULL);
+			       (CamelObject *) session, GUINT_TO_POINTER(ret), NULL);
 
 	return ret;
 }
@@ -716,7 +716,7 @@
 main_remove_timeout (CamelSession *session, void *event_data, void *data)
 {
 	MailSession *ms = (MailSession *) session;
-	unsigned int handle = (unsigned int) event_data;
+	unsigned int handle = GPOINTER_TO_UINT(event_data);
 	struct _timeout_data *td;
 	
 	MAIL_SESSION_LOCK(session, lock);
@@ -750,7 +750,7 @@
 	if (remove) {
 		camel_object_ref (ms);
 		mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_remove_timeout,
-				       (CamelObject *) session, (void *) handle, NULL);
+				       (CamelObject *) session, GUINT_TO_POINTER(handle), NULL);
 	} else
 		g_warning ("Removing a timeout i dont know about (or twice): %d", handle);
 
Index: mail//message-list.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-list.c,v
retrieving revision 1.339
diff -u -r1.339 message-list.c
--- mail//message-list.c	2 May 2003 16:07:18 -0000	1.339
+++ mail//message-list.c	5 May 2003 22:13:27 -0000
@@ -762,13 +762,13 @@
 	
 	switch (col){
 	case COL_MESSAGE_STATUS:
-		i = (unsigned int)value;
+		i = GPOINTER_TO_UINT(value);
 		if (i > 4)
 			return g_strdup ("");
 		return g_strdup (_(status_map[i]));
 		
 	case COL_SCORE:
-		i = (unsigned int) value + 3;
+		i = GPOINTER_TO_UINT(value) + 3;
 		if (i > 6)
 			i = 3;
 		return g_strdup (_(score_map[i]));
@@ -778,7 +778,7 @@
 	case COL_DELETED:
 	case COL_UNREAD:
 	case COL_FOLLOWUP_FLAG_STATUS:
-		return g_strdup_printf ("%d", (int) value);
+		return g_strdup_printf ("%d", GPOINTER_TO_UINT(value));
 		
 	case COL_SENT:
 	case COL_RECEIVED:
Index: shell//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1266
diff -u -r1.1266 ChangeLog
--- shell//ChangeLog	5 May 2003 01:12:39 -0000	1.1266
+++ shell//ChangeLog	5 May 2003 22:13:21 -0000
@@ -1,3 +1,10 @@
+2003-05-05  Jeremy Katz  <katzj redhat com>
+
+	* main.c: Add a #include to fix a warning.
+
+	* e-shell-offline-handler.c (update_dialog_clist): Use a tree
+	store instead of a list store for a tree view.
+
 2003-05-02  Not Zed  <NotZed Ximian com>
 
 	* e-shell-about-box.c (text[]): grepped changelogs and added all
Index: shell//e-shell-offline-handler.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-offline-handler.c,v
retrieving revision 1.31
diff -u -r1.31 e-shell-offline-handler.c
--- shell//e-shell-offline-handler.c	27 Mar 2003 21:01:41 -0000	1.31
+++ shell//e-shell-offline-handler.c	5 May 2003 22:13:21 -0000
@@ -33,11 +33,13 @@
 
 #include "e-shell-marshal.h"
 
+#include <gtk/gtkcellrenderertext.h>
 #include <gtk/gtkclist.h>
 #include <gtk/gtkdialog.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtksignal.h>
 #include <gtk/gtkliststore.h>
+#include <gtk/gtktreestore.h>
 #include <gtk/gtktreeview.h>
 #include <gtk/gtktypeutils.h>
 #include <gtk/gtkwidget.h>
@@ -548,8 +550,7 @@
 {
 	EShellOfflineHandlerPrivate *priv;
 	GtkWidget *tree_view;
-	GtkTreeModel *model;
-	GtkTreeModel *model_sort;
+	GtkTreeStore *model;
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 
@@ -566,10 +567,10 @@
 	column = gtk_tree_view_column_new_with_attributes ("Host", renderer, "text", 0, NULL);
 	gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
 
-	model = gtk_list_store_new (1, G_TYPE_STRING);
+	model = gtk_tree_store_new (1, G_TYPE_STRING);
 	g_hash_table_foreach (priv->id_to_component_info, update_dialog_tree_view_hash_foreach, model);
 
-	gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model);
+	gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL(model));
 }
 
 static void
Index: shell//main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.120
diff -u -r1.120 main.c
--- shell//main.c	28 Apr 2003 18:17:21 -0000	1.120
+++ shell//main.c	5 May 2003 22:13:21 -0000
@@ -24,6 +24,7 @@
 
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-gtk-utils.h"
+#include "e-util/e-proxy.h"
 
 #include "e-icon-factory.h"
 #include "e-shell-constants.h"
Index: e-util//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.387
diff -u -r1.387 ChangeLog
--- e-util//ChangeLog	5 May 2003 00:56:34 -0000	1.387
+++ e-util//ChangeLog	5 May 2003 22:13:36 -0000
@@ -1,3 +1,8 @@
+2003-05-05  Jeremy Katz  <katzj redhat com>
+
+	* e-sexp.c (term_eval_and): Use glib macros for pointer/int
+	conversion.
+
 2003-05-02  Not Zed  <NotZed Ximian com>
 
 	* e-request.c (e_request_string): remove the assert, if we dont
Index: e-util//e-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-sexp.c,v
retrieving revision 1.33
diff -u -r1.33 e-sexp.c
--- e-util//e-sexp.c	16 Apr 2003 17:01:24 -0000	1.33
+++ e-util//e-sexp.c	5 May 2003 22:13:36 -0000
@@ -267,9 +267,11 @@
 			a1 = (char **)r1->value.ptrarray->pdata;
 			l1 = r1->value.ptrarray->len;
 			for (j=0;j<l1;j++) {
+			        gpointer ptr;
 				int n;
-				n = (int)g_hash_table_lookup(ht, a1[j]);
-				g_hash_table_insert(ht, a1[j], (void *)n+1);
+				ptr = g_hash_table_lookup(ht, a1[j]);
+				n = GPOINTER_TO_INT(ptr);
+				g_hash_table_insert(ht, a1[j], GINT_TO_POINTER(n+1));
 			}
 		} else if (r1->type == ESEXP_RES_BOOL) {
 			bool = bool && r1->value.bool;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]