evolution-mapi r126 - in trunk/src: account-setup-eplugin addressbook calendar camel libexchangemapi



Author: mcrha
Date: Fri Feb 20 18:46:51 2009
New Revision: 126
URL: http://svn.gnome.org/viewvc/evolution-mapi?rev=126&view=rev

Log:
2009-02-20  Milan Crha  <mcrha redhat com>

	* src/addressbook/e-book-backend-mapi.c:
	* src/libexchangemapi/exchange-mapi-cal-utils.c:
	* src/libexchangemapi/exchange-mapi-connection.c:
	* src/libexchangemapi/exchange-mapi-utils.c:
	* src/libexchangemapi/exchange-mapi-cal-recur-utils.c:
	* src/libexchangemapi/exchange-mapi-folder.c:
	* src/camel/camel-private.h:
	* src/camel/camel-mapi-transport.c:
	* src/camel/camel-mapi-store.c:
	* src/camel/camel-mapi-folder.c:
	* src/calendar/e-cal-backend-mapi.c:
	* src/account-setup-eplugin/exchange-mapi-account-setup.c:
	Fix for compiler warnings.



Modified:
   trunk/src/account-setup-eplugin/ChangeLog
   trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c
   trunk/src/addressbook/ChangeLog
   trunk/src/addressbook/e-book-backend-mapi.c
   trunk/src/calendar/ChangeLog
   trunk/src/calendar/e-cal-backend-mapi.c
   trunk/src/camel/ChangeLog
   trunk/src/camel/camel-mapi-folder.c
   trunk/src/camel/camel-mapi-store.c
   trunk/src/camel/camel-mapi-transport.c
   trunk/src/camel/camel-private.h
   trunk/src/libexchangemapi/ChangeLog
   trunk/src/libexchangemapi/exchange-mapi-cal-recur-utils.c
   trunk/src/libexchangemapi/exchange-mapi-cal-utils.c
   trunk/src/libexchangemapi/exchange-mapi-connection.c
   trunk/src/libexchangemapi/exchange-mapi-folder.c
   trunk/src/libexchangemapi/exchange-mapi-utils.c

Modified: trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c
==============================================================================
--- trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c	(original)
+++ trunk/src/account-setup-eplugin/exchange-mapi-account-setup.c	Fri Feb 20 18:46:51 2009
@@ -456,7 +456,7 @@
 	exchange_mapi_util_mapi_id_from_string (sfid, &pfid);
 
 	fid = exchange_mapi_create_folder (olFolderContacts, pfid, e_source_peek_name (source));
-	g_print("Created %016llX\n", fid);
+	g_print("Created %016" G_GUINT64_FORMAT "X\n", fid);
 	grp = e_source_peek_group (source);
 	e_source_set_property (source, "auth", "plain/password");
 	e_source_set_property (source, "auth-domain", EXCHANGE_MAPI_PASSWORD_COMPONENT);

Modified: trunk/src/addressbook/e-book-backend-mapi.c
==============================================================================
--- trunk/src/addressbook/e-book-backend-mapi.c	(original)
+++ trunk/src/addressbook/e-book-backend-mapi.c	Fri Feb 20 18:46:51 2009
@@ -145,6 +145,7 @@
 
 static int maplen = G_N_ELEMENTS(mappings);
 
+#if 0
 static EDataBookView *
 find_book_view (EBookBackendMAPI *ebmapi)
 {
@@ -174,6 +175,7 @@
 	
 	return rv;
 }
+#endif
 
 static gboolean
 build_restriction_emails_contains (struct mapi_SRestriction *res, 
@@ -385,7 +387,7 @@
 	exchange_mapi_util_mapi_id_from_string (e_source_get_property (source, "folder-id"), &priv->fid);
 
 	tmp = e_source_get_property (source, "folder-id");
-	printf("Folder is %s %016llX\n", tmp, priv->fid);
+	printf("Folder is %s %016" G_GUINT64_FORMAT "X\n", tmp, priv->fid);
 
 	/* Once aunthentication in address book works this can be removed */
 	if (priv->mode == GNOME_Evolution_Addressbook_MODE_LOCAL) {
@@ -398,7 +400,7 @@
 
 
 	if (enable_debug)
-		printf("For profile %s and folder %s - %016llX\n", priv->profile, tmp, priv->fid);
+		printf("For profile %s and folder %s - %016" G_GUINT64_FORMAT "X\n", priv->profile, tmp, priv->fid);
 
 	return GNOME_Evolution_Addressbook_Success;
 }
@@ -1453,6 +1455,7 @@
 	return NULL;		
 }
 
+#if 0
 static gpointer
 update_cache (EBookBackendMAPI *ebmapi)
 {
@@ -1494,6 +1497,7 @@
 	
 	return NULL;
 }
+#endif
 
 static void
 e_book_backend_mapi_authenticate_user (EBookBackend *backend,

Modified: trunk/src/calendar/e-cal-backend-mapi.c
==============================================================================
--- trunk/src/calendar/e-cal-backend-mapi.c	(original)
+++ trunk/src/calendar/e-cal-backend-mapi.c	Fri Feb 20 18:46:51 2009
@@ -359,6 +359,7 @@
 	return GNOME_Evolution_Calendar_Success;
 }
 
+#if 0
 static const char *
 get_element_type (icalcomponent_kind kind)
 {
@@ -375,6 +376,7 @@
 	return type;
 
 }
+#endif
 
 static void 
 notify_progress (ECalBackendMAPI *cbmapi, guint64 index, guint64 total)

Modified: trunk/src/camel/camel-mapi-folder.c
==============================================================================
--- trunk/src/camel/camel-mapi-folder.c	(original)
+++ trunk/src/camel/camel-mapi-folder.c	Fri Feb 20 18:46:51 2009
@@ -291,7 +291,7 @@
 	/*Write summary to db in batches of SUMMARY_FETCH_BATCH_COUNT items.*/ 
 	if ( (item_data->index % SUMMARY_FETCH_BATCH_COUNT == 0) || item_data->index == item_data->total-1) {
 		mapi_update_cache (fi_data->folder, *slist, &fi_data->changes, NULL, false);
-		g_slist_foreach (*slist, mapi_item_free, NULL);
+		g_slist_foreach (*slist, (GFunc)mapi_item_free, NULL);
 		g_slist_free (*slist);
 		*slist = NULL;
 	}
@@ -534,7 +534,7 @@
 	}
 	/*Remove them from cache*/
 	while (deleted_items) {
-		char* deleted_msg_uid = g_strdup_printf ("%016llX%016llX", fid, *(mapi_id_t *)deleted_items->data);
+		char* deleted_msg_uid = g_strdup_printf ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, *(mapi_id_t *)deleted_items->data);
 
 		CAMEL_MAPI_FOLDER_REC_LOCK (folder, cache_lock);
 		camel_folder_summary_remove_uid (folder->summary, deleted_msg_uid);
@@ -915,14 +915,14 @@
 	}
 
 	if (g_str_has_prefix (msg_class, IPM_SCHEDULE_MEETING_PREFIX)) {
-		gchar *appointment_body_str = (gchar *) exchange_mapi_cal_util_camel_helper (item_data->properties, 
+		guint8 *appointment_body_str = (guint8 *) exchange_mapi_cal_util_camel_helper (item_data->properties, 
 											     item_data->streams, 
 											     item_data->recipients, item_data->attachments);
 
 		body = g_new0(ExchangeMAPIStream, 1);
 		body->proptag = PR_BODY;
 		body->value = g_byte_array_new ();
-		body->value = g_byte_array_append (body->value, appointment_body_str, g_utf8_strlen (appointment_body_str, -1));
+		body->value = g_byte_array_append (body->value, appointment_body_str, g_utf8_strlen ((const gchar *)appointment_body_str, -1));
 
 		item->msg.body_parts = g_slist_append (item->msg.body_parts, body);
 
@@ -1046,13 +1046,13 @@
 	
 	if (body) { 
 		if (item->is_cal)
-			camel_mime_part_set_content(part, body->value->data, body->value->len, "text/calendar");
+			camel_mime_part_set_content(part, (const char *) body->value->data, body->value->len, "text/calendar");
 		else {
 			type = (body->proptag == PR_BODY || body->proptag == PR_BODY_UNICODE) ? 
 				"text/plain" : "text/html";
 
 			/*NOTE : Last byte null mess up CRLF*. Probably needs a fix in e*fetch_items. */
-			camel_mime_part_set_content(part, body->value->data, body->value->len - 1, type );
+			camel_mime_part_set_content (part, (const char *) body->value->data, body->value->len - 1, type );
 		}
 	} else
 		camel_mime_part_set_content(part, " ", strlen(" "), "text/html");
@@ -1069,7 +1069,6 @@
 {
 	CamelMimeMessage *msg = NULL;
 	CamelMultipart *multipart = NULL;
-	CamelContentType *content_type = NULL;
 
 	GSList *attach_list = NULL;
 	int errno;
@@ -1134,7 +1133,7 @@
 			mime_type = (const char *) exchange_mapi_util_find_SPropVal_array_propval(attach->lpProps, 
 												  PR_ATTACH_MIME_TAG);
 
-			camel_mime_part_set_content(part, stream->value->data, stream->value->len, mime_type);
+			camel_mime_part_set_content (part, (const char *) stream->value->data, stream->value->len, mime_type);
 
 			/*Content-ID*/
 			content_id = (const char *) exchange_mapi_util_find_SPropVal_array_propval(attach->lpProps, 
@@ -1304,11 +1303,10 @@
 		camel_object_unref (mapi_folder->cache);
 }
 
-
+#if 0
 static CamelMessageInfo*
 mapi_get_message_info(CamelFolder *folder, const char *uid)
 { 
-#if 0
 	CamelMessageInfo	*msg_info = NULL;
 	CamelMessageInfoBase	*mi = (CamelMessageInfoBase *)msg ;
 	int			status = 0;
@@ -1345,9 +1343,8 @@
 	if (uid) mi->uid = g_strdup(uid);
 	oc_message_headers_release(&headers);
 	return (msg);
-#endif
-	return NULL;
 }
+#endif
 
 static void
 mapi_expunge (CamelFolder *folder, CamelException *ex)

Modified: trunk/src/camel/camel-mapi-store.c
==============================================================================
--- trunk/src/camel/camel-mapi-store.c	(original)
+++ trunk/src/camel/camel-mapi-store.c	Fri Feb 20 18:46:51 2009
@@ -375,7 +375,6 @@
 mapi_disconnect(CamelService *service, gboolean clean, CamelException *ex)
 {
 	CamelMapiStore *store = CAMEL_MAPI_STORE (service);
-	CamelMapiStorePrivate *priv = store->priv;
 
 	/* Close the mapi subsystem */
 	exchange_mapi_connection_close ();
@@ -472,9 +471,9 @@
 		si = camel_mapi_store_summary_add_from_full(mapi_store->summary, root->full_name, '/');
 		camel_store_summary_save((CamelStoreSummary *)mapi_store->summary);
 
-		g_hash_table_insert (priv->id_hash, g_strdup_printf ("%016llX", new_folder_id), g_strdup(folder_name));
-		g_hash_table_insert (priv->name_hash, g_strdup(root->full_name), g_strdup_printf ("%016llX", new_folder_id));
-		g_hash_table_insert (priv->parent_hash, g_strdup_printf ("%016llX", new_folder_id), g_strdup(parent_id));
+		g_hash_table_insert (priv->id_hash, g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id), g_strdup(folder_name));
+		g_hash_table_insert (priv->name_hash, g_strdup(root->full_name), g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id));
+		g_hash_table_insert (priv->parent_hash, g_strdup_printf ("%016" G_GUINT64_FORMAT "X", new_folder_id), g_strdup(parent_id));
 
 		camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
 	}
@@ -487,9 +486,8 @@
 static void
 mapi_forget_folder (CamelMapiStore *mapi_store, const char *folder_name, CamelException *ex)
 {
-	CamelFolderSummary *summary;
 	CamelMapiStorePrivate *priv = mapi_store->priv;
-	char *summary_file, *state_file;
+	char *state_file;
 	char *folder_dir, *storage_path;
 	CamelFolderInfo *fi;
 	const char *name;
@@ -738,7 +736,7 @@
 char *
 camel_mapi_store_summary_path_to_full(CamelMapiStoreSummary *s, const char *path, char dir_sep)
 {
-	unsigned char *full, *f;
+	char *full, *f;
 	guint32 c, v = 0;
 	const char *p;
 	int state=0;
@@ -778,7 +776,7 @@
 				else {
 					if (c == '/')
 						c = dir_sep;
-					camel_utf8_putc(&f, c);
+					camel_utf8_putc((unsigned char **)&f, c);
 				}
 				break;
 			case 1:
@@ -788,11 +786,11 @@
 			case 2:
 				state = 0;
 				v |= hexnib(c);
-				camel_utf8_putc(&f, v);
+				camel_utf8_putc((unsigned char **)&f, v);
 				break;
 		}
 	}
-	camel_utf8_putc(&f, c);
+	camel_utf8_putc((unsigned char **)&f, c);
 
 	/* merge old path part if required */
 	f = g_strdup (full);
@@ -996,7 +994,7 @@
 
 	name = exchange_mapi_folder_get_name (folder);
 
-	id = g_strdup_printf ("%016llX", exchange_mapi_folder_get_fid (folder));
+	id = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_fid (folder));
 		
 	fi = g_new0 (CamelFolderInfo, 1);
 
@@ -1040,7 +1038,7 @@
 	 */
 
 	mapi_id_folder = exchange_mapi_folder_get_parent_id (folder);
-	parent = g_strdup_printf ("%016llX", mapi_id_folder);
+	parent = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", mapi_id_folder);
 	par_name = g_hash_table_lookup (priv->id_hash, parent);
 
 	if (par_name != NULL) {
@@ -1146,8 +1144,8 @@
 		gchar *fid = NULL, *parent_id = NULL;
 
 		name = exchange_mapi_folder_get_name ((ExchangeMAPIFolder *)(temp_list->data));
-		fid = g_strdup_printf ("%016llX", exchange_mapi_folder_get_fid((ExchangeMAPIFolder *)(temp_list->data)));
-		parent_id = g_strdup_printf ("%016llX", exchange_mapi_folder_get_parent_id ((ExchangeMAPIFolder *)(temp_list->data)));
+		fid = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_fid((ExchangeMAPIFolder *)(temp_list->data)));
+		parent_id = g_strdup_printf ("%016" G_GUINT64_FORMAT "X", exchange_mapi_folder_get_parent_id ((ExchangeMAPIFolder *)(temp_list->data)));
 
 		/*id_hash returns the name for a given container id*/
 		g_hash_table_insert (priv->id_hash, g_strdup (fid), g_strdup(name)); 
@@ -1228,7 +1226,7 @@
 	} 
 
 	/*camel_exception_clear (ex);*/
-end_r:
+
 	s_count = camel_store_summary_count((CamelStoreSummary *)mapi_store->summary);
 	info = mapi_get_folder_info_offline (store, top, flags, ex);
 	return info;

Modified: trunk/src/camel/camel-mapi-transport.c
==============================================================================
--- trunk/src/camel/camel-mapi-transport.c	(original)
+++ trunk/src/camel/camel-mapi-transport.c	Fri Feb 20 18:46:51 2009
@@ -80,6 +80,7 @@
 static mapi_id_t
 mapi_message_item_send (MapiItem *item, GSList *attachments, GSList *recipients);
 
+#if 0
 static void
 mapi_item_debug_dump (MapiItem *item)
 {
@@ -91,6 +92,7 @@
 	//printf("item->msg.body_stream : %s\n",item->msg.body_stream);
 	printf("-----------------\n\n");
 }
+#endif
 
 static void
 mapi_item_set_from(MapiItem *item, const char *from)
@@ -127,7 +129,7 @@
 		if (read_size == -1) 
 			return;
 
-		stream->value = g_byte_array_append (stream->value, (char *) buf, read_size);
+		stream->value = g_byte_array_append (stream->value, buf, read_size);
 	}
 
 	switch (part_type) {

Modified: trunk/src/camel/camel-private.h
==============================================================================
--- trunk/src/camel/camel-private.h	(original)
+++ trunk/src/camel/camel-private.h	Fri Feb 20 18:46:51 2009
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public

Modified: trunk/src/libexchangemapi/exchange-mapi-cal-recur-utils.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-cal-recur-utils.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-cal-recur-utils.c	Fri Feb 20 18:46:51 2009
@@ -149,6 +149,7 @@
 
 #define cFileTimeUnitsPerSecond 10000000
 
+#if 0
 static void
 convert_recurrence_minutes_to_date (uint32_t minutes, struct FILETIME *ft)
 {
@@ -196,6 +197,7 @@
 	ft->dwLowDateTime = (uint32_t)((nt << 32) >> 32); 
 	ft->dwHighDateTime = (uint32_t)(nt >> 32); 
 }
+#endif
 
 static time_t
 convert_recurrence_minutes_to_timet (uint32_t minutes)

Modified: trunk/src/libexchangemapi/exchange-mapi-cal-utils.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-cal-utils.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-cal-utils.c	Fri Feb 20 18:46:51 2009
@@ -219,7 +219,7 @@
 		if (mapped_file && g_str_has_prefix (filename, uid)) {
 			ExchangeMAPIAttachment *attach_item;
 			ExchangeMAPIStream *stream; 
-			gchar *attach = g_mapped_file_get_contents (mapped_file);
+			guint8 *attach = (guint8 *) g_mapped_file_get_contents (mapped_file);
 			guint filelength = g_mapped_file_get_length (mapped_file);
 			const gchar *split_name = (filename + strlen (uid) + strlen ("-"));
 			uint32_t flag; 

Modified: trunk/src/libexchangemapi/exchange-mapi-connection.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-connection.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-connection.c	Fri Feb 20 18:46:51 2009
@@ -892,7 +892,7 @@
 	uint32_t count, i;
 	GSList *mids = NULL;
 
-	d(g_print("\n%s: Entering %s: folder-id %016llX ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
 
 	LOCK();
 	LOGALL();
@@ -1007,7 +1007,7 @@
 	uint32_t count, i, cursor_pos = 0;
 	gboolean result = FALSE;
 
-	d(g_print("\n%s: Entering %s: folder-id %016llX ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
 
 	LOCK();
 	LOGALL();
@@ -1230,7 +1230,7 @@
 	LOGNONE();
 	UNLOCK();
 
-	d(g_print("\n%s: Leaving %s: folder-id %016llX ", G_STRLOC, G_STRFUNC, fid));
+	d(g_print("\n%s: Leaving %s: folder-id %016" G_GUINT64_FORMAT "X ", G_STRLOC, G_STRFUNC, fid));
 
 	return result;
 }
@@ -1254,7 +1254,7 @@
 	GSList *stream_list = NULL;
 	gboolean result = FALSE;
 
-	d(g_print("\n%s: Entering %s: folder-id %016llX message-id %016llX",
+	d(g_print("\n%s: Entering %s: folder-id %016" G_GUINT64_FORMAT "X message-id %016" G_GUINT64_FORMAT "X",
 				G_STRLOC, G_STRFUNC, fid, mid));
 
 	LOCK();
@@ -1476,7 +1476,7 @@
 	}
 
 	fid = mapi_object_get_id (&obj_folder);
-	g_print("\nFolder %s created with id %016llX ", name, fid);
+	g_print("\nFolder %s created with id %016" G_GUINT64_FORMAT "X ", name, fid);
 
 cleanup:
 	mapi_object_release(&obj_folder);
@@ -1526,7 +1526,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016llX was emptied ", fid);
+	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was emptied ", fid);
 
 	result = TRUE;
 
@@ -1587,7 +1587,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016llX was emptied ", fid);
+	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was emptied ", fid);
 
 	/* Attempt to open the top/parent folder */
 	retval = OpenFolder(&obj_store, folder->parent_folder_id, &obj_top);
@@ -1603,7 +1603,7 @@
 		goto cleanup;
 	}
 
-	g_print("\nFolder with id %016llX was deleted ", fid);
+	g_print("\nFolder with id %016" G_GUINT64_FORMAT "X was deleted ", fid);
 
 	result = TRUE;
 
@@ -2494,7 +2494,7 @@
 			class = IPF_NOTE;
 
 		newname = utf8tolinux (name);
-		g_print("\n|---+ %-15s : (Container class: %s %016llX) UnRead : %d Total : %d ", newname, class, *fid, unread ? *unread : 0, total ? *total : 0);
+		g_print("\n|---+ %-15s : (Container class: %s %016" G_GUINT64_FORMAT "X) UnRead : %d Total : %d ", newname, class, *fid, unread ? *unread : 0, total ? *total : 0);
 
 		folder = exchange_mapi_folder_new (newname, class, folder_hier, *fid, folder_id, child ? *child : 0, unread ? *unread : 0, total ? *total : 0);
 		*mapi_folders = g_slist_prepend (*mapi_folders, folder);
@@ -2520,14 +2520,14 @@
 /*NOTE : IsMailboxFolder doesn't support this yet. */
 /* Ticket : http://trac.openchange.org/ticket/134  */
 static void
-mapi_get_ren_additional_fids (const mapi_object_t *obj_store, GHashTable **folder_list)
+mapi_get_ren_additional_fids (mapi_object_t *obj_store, GHashTable **folder_list)
 {
-	mapi_id_t inbox_id, fid, *default_fid;
+	mapi_id_t inbox_id, fid;
 	mapi_object_t obj_folder_inbox;
 	struct SPropTagArray *SPropTagArray;
 	struct SPropValue *lpProps;
 	struct SRow aRow;
-	struct BinaryArray_r *entryids;
+	const struct BinaryArray_r *entryids;
 	struct Binary_r entryid;
 	enum MAPISTATUS retval;
 
@@ -2616,7 +2616,7 @@
 		folder = folder_list->data;
 		key_fid = exchange_mapi_util_mapi_id_to_string (folder->folder_id);
 
-		if (value = g_hash_table_lookup (default_folders, key_fid))
+		if ((value = g_hash_table_lookup (default_folders, key_fid)) != NULL)
 			default_type = *(guint32 *)value;
 		g_free (key_fid);
 

Modified: trunk/src/libexchangemapi/exchange-mapi-folder.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-folder.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-folder.c	Fri Feb 20 18:46:51 2009
@@ -152,7 +152,7 @@
 	tmp = folder_list;
 	while (tmp) {
 		ExchangeMAPIFolder * folder = tmp->data;
-		g_print ("%016llX %016llX\n", folder->folder_id, fid);
+		g_print ("%016" G_GUINT64_FORMAT "X %016" G_GUINT64_FORMAT "X\n", folder->folder_id, fid);
 		if (folder->folder_id == fid)
 			return folder;
 		tmp=tmp->next;

Modified: trunk/src/libexchangemapi/exchange-mapi-utils.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-utils.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-utils.c	Fri Feb 20 18:46:51 2009
@@ -64,7 +64,7 @@
 inline gchar *
 exchange_mapi_util_mapi_id_to_string (mapi_id_t id)
 {
-	return g_strdup_printf ("%016llX", id);
+	return g_strdup_printf ("%016" G_GUINT64_FORMAT "X", id);
 }
 
 inline gboolean 
@@ -73,18 +73,18 @@
 	gint n = 0;
 
 	if (str && *str)
-		n = sscanf (str, "%016llX", id);
+		n = sscanf (str, "%016" G_GUINT64_FORMAT "X", id);
 
 	return (n == 1);
 }
 
 /* NOTE: We use the UID as a combination of the folder-id and the message-id. 
- * Specifically, it is in this format: ("%016llX%016llX", fid, mid).
+ * Specifically, it is in this format: ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid).
  */
 inline gchar *
 exchange_mapi_util_mapi_ids_to_uid (mapi_id_t fid, mapi_id_t mid)
 {
-	return g_strdup_printf ("%016llX%016llX", fid, mid);
+	return g_strdup_printf ("%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid);
 }
 
 inline gboolean 
@@ -93,7 +93,7 @@
 	gint n = 0;
 
 	if (str && *str)
-		n = sscanf (str, "%016llX%016llX", fid, mid);
+		n = sscanf (str, "%016" G_GUINT64_FORMAT "X%016" G_GUINT64_FORMAT "X", fid, mid);
 
 	return (n == 2);
 }
@@ -323,7 +323,7 @@
 				g_print (" (double) -  %lf", (double)lpProp->value.dbl);
 				break;
 			case PT_I8:
-				g_print (" (int) - 0x%016llX", lpProp->value.d);
+				g_print (" (int) - 0x%016" G_GUINT64_FORMAT "X", lpProp->value.d);
 				break;
 			case PT_SYSTIME: {
 					struct timeval t;



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