[evolution-data-server/gnome-2-30] Coding style and whitespace cleanup.



commit d1c485cb5cbeebe2764837b36d962aa3a5533bd9
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jun 20 08:16:15 2010 -0400

    Coding style and whitespace cleanup.

 addressbook/libebook/e-book.c                      |    2 +-
 .../groupwise/e-cal-backend-groupwise-utils.c      |   12 ++--
 .../backends/groupwise/e-cal-backend-groupwise.c   |   18 ++---
 calendar/libecal/e-cal-system-timezone.c           |   14 ++--
 calendar/libedata-cal/e-data-cal-factory.c         |    2 +-
 camel/camel-db.c                                   |    4 +-
 camel/camel-db.h                                   |   48 +++++++-------
 camel/camel-stream-vfs.h                           |    6 +-
 camel/camel.c                                      |    7 +-
 camel/providers/imapx/camel-imapx-folder.c         |    8 +-
 camel/providers/imapx/camel-imapx-folder.h         |    4 +-
 camel/providers/imapx/camel-imapx-provider.c       |    4 +-
 camel/providers/imapx/camel-imapx-server.c         |   69 +++++++++----------
 camel/providers/imapx/camel-imapx-store.c          |   40 +++++------
 camel/providers/imapx/camel-imapx-store.h          |    4 +-
 camel/providers/imapx/camel-imapx-tokenise.h       |   16 ++--
 camel/providers/imapx/camel-imapx-utils.c          |    2 +-
 libedataserver/e-categories.c                      |    2 +-
 libedataserverui/e-name-selector-dialog.c          |    5 +-
 libedataserverui/e-passwords.c                     |    2 +-
 20 files changed, 129 insertions(+), 140 deletions(-)
---
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 742aa0c..2dfbab5 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -2526,7 +2526,7 @@ unwrap_gerror (GError *error, GError **client_error)
 static gboolean
 strcaseequal_no_underscore (const gchar *str1, const gchar *str2)
 {
-	int i, j;
+	gint i, j;
 
 	if (!str1 || !str2)
 		return FALSE;
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 6a92f44..4e68aec 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -826,7 +826,7 @@ e_gw_item_new_from_cal_component (const gchar *container, ECalBackendGroupwise *
 	g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
 
 	e_cal_backend_groupwise_priv_lock (cbgw);
-	
+
 	item = e_gw_item_new_empty ();
 	e_gw_item_set_container_id (item, container);
 	item = set_properties_from_cal_component (item, comp, cbgw);
@@ -1021,7 +1021,7 @@ get_cn_from_display_name (gchar *display_name)
 }
 
 static void
-sanitize_component (ECalComponent *comp, const gchar *server_uid, const char *container_id)
+sanitize_component (ECalComponent *comp, const gchar *server_uid, const gchar *container_id)
 {
 	icalproperty *icalprop;
 	gint i;
@@ -1072,9 +1072,9 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
 	EGwItemType item_type;
 
 	g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
-	
+
 	e_cal_backend_groupwise_priv_lock (cbgw);
-	
+
 	default_zone = e_cal_backend_groupwise_get_default_zone (cbgw);
 	categories_by_id = e_cal_backend_groupwise_get_categories_by_id (cbgw);
 
@@ -1782,7 +1782,7 @@ e_gw_connection_get_freebusy_info (ECalBackendGroupwise *cbgw, GList *users, tim
 
 	default_zone = e_cal_backend_groupwise_get_default_zone (cbgw);
 	cnc = e_cal_backend_groupwise_get_connection (cbgw);
-	
+
 	g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION);
 
 	/* Perform startFreeBusySession */
@@ -1861,7 +1861,7 @@ e_gw_connection_get_freebusy_info (ECalBackendGroupwise *cbgw, GList *users, tim
 		GSList *attendee_list = NULL;
 		icalcomponent *icalcomp = NULL;
 		icaltimetype start_time, end_time;
-	
+
 		e_cal_backend_groupwise_priv_lock (cbgw);
 
 		tmp = soup_soap_parameter_get_first_child_by_name (subparam, "email");
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index 32977e3..14667be 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -154,8 +154,8 @@ e_cal_backend_groupwise_get_default_zone (ECalBackendGroupwise *cbgw) {
 	return cbgw->priv->default_zone;
 }
 
-const char *
-e_cal_backend_groupwise_get_container_id (ECalBackendGroupwise *cbgw) 
+const gchar *
+e_cal_backend_groupwise_get_container_id (ECalBackendGroupwise *cbgw)
 {
 	return cbgw->priv->container_id;
 }
@@ -215,7 +215,6 @@ populate_cache (ECalBackendGroupwise *cbgw)
 	kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw));
 	total = priv->total_count;
 
-
 	type = get_element_type (kind);
 
 	/* Fetch the data with a bias to present, near past/future */
@@ -324,7 +323,7 @@ populate_cache (ECalBackendGroupwise *cbgw)
 typedef struct
 {
 	EGwItemCalId *calid;
-	ECalBackendStore *store;	
+	ECalBackendStore *store;
 } CompareIdData;
 
 static gint
@@ -334,14 +333,14 @@ compare_ids (gconstpointer a, gconstpointer b)
 	CompareIdData *data = (CompareIdData *) b;
 	EGwItemCalId *calid = data->calid;
 	ECalBackendStore *store = data->store;
-	
+
 	if (!calid->recur_key)
 		return g_strcmp0 (cache_id->uid, calid->ical_id);
 	else {
 		ECalComponent *comp;
 		gint ret = 1;
-		const char *cache_item_id;
-	       
+		const gchar *cache_item_id;
+
 		if (strcmp (cache_id->uid, calid->recur_key))
 			return 1;
 
@@ -433,7 +432,6 @@ get_deltas (gpointer handle)
 	if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
 		status = e_gw_connection_get_items (cnc, priv->container_id, "attachments recipients message recipientStatus default peek", filter, &item_list);
 
-
 	g_object_unref (filter);
 
 	if (status != E_GW_CONNECTION_STATUS_OK) {
@@ -603,7 +601,7 @@ get_deltas (gpointer handle)
 
 		data.calid = calid;
 		data.store = store;
-		
+
 		if (!(remove = g_slist_find_custom (cache_ids, &data,  (GCompareFunc) compare_ids))) {
 			g_ptr_array_add (uid_array, g_strdup (calid->item_id));
 			needs_to_get = TRUE;
@@ -1639,7 +1637,7 @@ e_cal_backend_groupwise_set_default_zone (ECalBackendSync *backend, EDataCal *ca
 	icaltimezone_set_component (zone, tz_comp);
 
 	PRIV_LOCK (priv);
-	
+
 	if (priv->default_zone)
 		icaltimezone_free (priv->default_zone, 1);
 
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index a4c2b8f..6b838c4 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -433,8 +433,8 @@ struct timezone_map_entry
 	const gchar *olson_string;
 };
 
-static gchar* 
-windows_timezone_string_to_olson(const gchar* windows_tz)
+static gchar *
+windows_timezone_string_to_olson(const gchar * windows_tz)
 {
 	/* source: http://www.chronos-st.org/Windows-to-Olson.txt */
 	static const struct timezone_map_entry timezone_map[] = {
@@ -588,7 +588,7 @@ windows_timezone_string_to_olson(const gchar* windows_tz)
 		{ "W. Australia", "Australia/Perth" },
 		{ "W. Australia Standard Time", "Australia/Perth" },
 		{ "W. Central Africa Standard Time", "Africa/Luanda" },
-	   	{ "W. Europe", "Europe/Berlin" },
+		{ "W. Europe", "Europe/Berlin" },
 		{ "W. Europe Standard Time", "Europe/Berlin" },
 		{ "Warsaw", "Europe/Warsaw" },
 		{ "West Asia", "Asia/Karachi" },
@@ -601,17 +601,17 @@ windows_timezone_string_to_olson(const gchar* windows_tz)
 		{ 0, 0 } // end marker
 	};
 
-	int i;
+	gint i;
 
 	for (i=0; timezone_map[i].windows_string && windows_tz; i++) {
-		int res = strcmp( timezone_map[i].windows_string, windows_tz);
+		gint res = strcmp( timezone_map[i].windows_string, windows_tz);
 		if (res > 0)
 			return NULL;
 		if (res == 0) {
 			return g_strdup(timezone_map[i].olson_string);
 		}
 	}
-	
+
 	return NULL;
 }
 
@@ -715,7 +715,7 @@ e_cal_system_timezone_get_location (void)
 #else
 	gchar *windows_timezone_string = NULL;
 	gchar *olson_timezone_string = NULL;
-	
+
 	if (!(windows_timezone_string = system_timezone_win32_query_registry ()))
 		return NULL;
 	olson_timezone_string = windows_timezone_string_to_olson (windows_timezone_string);
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 1a9df5f..a26d84f 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -706,7 +706,7 @@ main (gint argc, gchar **argv)
 	DBusGProxy *bus_proxy;
 	guint32 request_name_ret;
 	EOfflineListener *eol;
-	
+
 	setlocale (LC_ALL, "");
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 8aa64a3..f3656a3 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -398,7 +398,7 @@ cdb_sql_exec (sqlite3 *db, const gchar * stmt, CamelException *ex)
    case insensitively (ascii, not utf8, same as 'LIKE' in SQLite3)
 */
 static void
-cdb_match_func (sqlite3_context *ctx, int nArgs, sqlite3_value **values)
+cdb_match_func (sqlite3_context *ctx, gint nArgs, sqlite3_value **values)
 {
 	gboolean matches = FALSE;
 	const gchar *what, *where;
@@ -417,7 +417,7 @@ cdb_match_func (sqlite3_context *ctx, int nArgs, sqlite3_value **values)
 		gint i, j;
 
 		for (i = 0, j = 0; where[i] && !matches; i++) {
-			char c = where[i];
+			gchar c = where[i];
 
 			if (c == ' ') {
 				word = TRUE;
diff --git a/camel/camel-db.h b/camel/camel-db.h
index 27a59f8..1c86e3a 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -88,55 +88,55 @@ struct _CamelDB {
 /**
  * CamelMIRecord:
  * @uid:
- * 	Message UID
+ *	Message UID
  * @flags:
- * 	Camel Message info flags
+ *	Camel Message info flags
  * @msg_type:
  * @dirty:
  * @read:
- * 	boolean read status
+ *	boolean read status
  * @deleted:
- * 	boolean deleted status
+ *	boolean deleted status
  * @replied:
- * 	boolean replied status
+ *	boolean replied status
  * @important:
- * 	boolean important status
+ *	boolean important status
  * @junk:
- * 	boolean junk status
+ *	boolean junk status
  * @attachment:
- * 	boolean attachment status
+ *	boolean attachment status
  * @size:
- * 	size of the mail
+ *	size of the mail
  * @dsent:
- * 	date sent
+ *	date sent
  * @dreceived:
- * 	date received
+ *	date received
  * @subject:
- * 	subject of the mail
+ *	subject of the mail
  * @from:
- * 	sender
+ *	sender
  * @to:
- * 	recipient
+ *	recipient
  * @cc:
- * 	CC members
+ *	CC members
  * @mlist:
- * 	message list headers
+ *	message list headers
  * @followup_flag:
- * 	followup flag / also can be queried to see for followup or not
+ *	followup flag / also can be queried to see for followup or not
  * @followup_completed_on:
- * 	completed date, can be used to see if completed
+ *	completed date, can be used to see if completed
  * @followup_due_by:
- * 	to see the due by date
+ *	to see the due by date
  * @part:
- * 	part / references / thread id
+ *	part / references / thread id
  * @labels:
- * 	labels of mails also called as userflags
+ *	labels of mails also called as userflags
  * @usertags:
- * 	composite string of user tags
+ *	composite string of user tags
  * @cinfo:
- * 	content info string - composite string
+ *	content info string - composite string
  * @bdata:
- * 	provider specific data
+ *	provider specific data
  * @bodystructure:
  *
  * The extensive DB format, supporting basic searching and sorting.
diff --git a/camel/camel-stream-vfs.h b/camel/camel-stream-vfs.h
index 822fefe..ed23a97 100644
--- a/camel/camel-stream-vfs.h
+++ b/camel/camel-stream-vfs.h
@@ -56,11 +56,11 @@ CamelType camel_stream_vfs_get_type (void);
 /**
  * CamelStreamVFSOpenMethod:
  * CAMEL_STREAM_VFS_CREATE:
- * 	Writable, creates new file or replaces old file.
+ *	Writable, creates new file or replaces old file.
  * CAMEL_STREAM_VFS_APPEND:
- * 	Writable, creates new file or appends at the end of the old file.
+ *	Writable, creates new file or appends at the end of the old file.
  * CAMEL_STREAM_VFS_READ:
- * 	Readable, opens existing file for reading.
+ *	Readable, opens existing file for reading.
  *
  * Since: 2.24
  **/
diff --git a/camel/camel.c b/camel/camel.c
index e01f71b..de3885f 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -64,15 +64,15 @@ gint camel_application_is_exiting = FALSE;
 static gint
 nss_has_system_db(void)
 {
-	int found = FALSE;
+	gint found = FALSE;
 #ifndef G_OS_WIN32
 	FILE *f;
-	char buf[80];
+	gchar buf[80];
 
 	f = fopen(NSS_SYSTEM_DB "/pkcs11.txt", "r");
 	if (!f)
 		return FALSE;
-		
+
 	/* Check whether the system NSS db is actually enabled */
 	while (fgets(buf, 80, f) && !found) {
 		if (!strcmp(buf, "library=libnsssysinit.so\n"))
@@ -145,7 +145,6 @@ camel_init (const gchar *configdir, gboolean nss_init)
 #endif
 		}
 
-
 #if NSS_VMAJOR > 3 || (NSS_VMAJOR == 3 && NSS_VMINOR >= 12)
 		/* See: https://wiki.mozilla.org/NSS_Shared_DB,
 		 * particularly "Mode 3A".  Note that the target
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index 38fdce7..3a102e0 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -104,7 +104,7 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
 	ifolder->search = camel_folder_search_new ();
 	ifolder->search_lock = g_mutex_new ();
 	ifolder->stream_lock = g_mutex_new ();
-	ifolder->ignore_recent = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL); 
+	ifolder->ignore_recent = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
 	ifolder->exists_on_server = 0;
 	ifolder->unread_on_server = 0;
 
@@ -115,7 +115,7 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
 		if ((istore->rec_options & IMAPX_FILTER_INBOX))
 			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
 	} else if ((istore->rec_options & (IMAPX_FILTER_JUNK | IMAPX_FILTER_JUNK_INBOX)) == IMAPX_FILTER_JUNK)
-			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;	
+			folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
 
 	g_free (summary_file);
 
@@ -210,7 +210,7 @@ imapx_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
 
 	if (!camel_exception_is_set (ex) && stream) {
 		msg = camel_mime_message_new();
-	
+
 		g_mutex_lock (ifolder->stream_lock);
 		if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) == -1) {
 			camel_object_unref(msg);
@@ -436,7 +436,7 @@ imapx_finalize (CamelObject *object)
 	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) object;
 
 	camel_object_unref (CAMEL_OBJECT (ifolder->cache));
-	
+
 	if (ifolder->ignore_recent)
 		g_hash_table_unref (ifolder->ignore_recent);
 
diff --git a/camel/providers/imapx/camel-imapx-folder.h b/camel/providers/imapx/camel-imapx-folder.h
index f01932f..11979a7 100644
--- a/camel/providers/imapx/camel-imapx-folder.h
+++ b/camel/providers/imapx/camel-imapx-folder.h
@@ -47,10 +47,10 @@ typedef struct _CamelIMAPXFolder {
 
 	guint32 exists_on_server;
 	guint32 unread_on_server;
-	
+
 	/* hash table of UIDs to ignore as recent when updating folder */
 	GHashTable *ignore_recent;
-	
+
 	GMutex *search_lock;
 	GMutex *stream_lock;
 } CamelIMAPXFolder;
diff --git a/camel/providers/imapx/camel-imapx-provider.c b/camel/providers/imapx/camel-imapx-provider.c
index b6b927d..01f547d 100644
--- a/camel/providers/imapx/camel-imapx-provider.c
+++ b/camel/providers/imapx/camel-imapx-provider.c
@@ -66,12 +66,12 @@ CamelProviderConfEntry imapx_conf_entries[] = {
 	  N_("Folders") },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "use_lsub", NULL,
 	  N_("_Show only subscribed folders"), "1" },
-#if 0	
+#if 0
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "override_namespace", NULL,
 	  N_("O_verride server-supplied folder namespace"), "0" },
 	{ CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
 	  N_("Namespace:") },
-#endif	
+#endif
 	{ CAMEL_PROVIDER_CONF_SECTION_END },
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 20dd258..9d2f93f 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -292,7 +292,7 @@ struct _CamelIMAPXJob {
 			const gchar *ofolder_name;
 			const gchar *nfolder_name;
 		} rename_folder;
-		
+
 		const gchar *folder_name;
 	} u;
 };
@@ -865,7 +865,7 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
 				return;
 			}
 		}
-		
+
 		c(printf("-- Checking job queue\n"));
 		count = 0;
 		ic = (CamelIMAPXCommand *)is->queue.head;
@@ -878,7 +878,7 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
 				camel_dlist_remove((CamelDListNode *)ic);
 				imapx_command_start(is, ic);
 				count++;
-			} else 
+			} else
 				break;
 			ic = nc;
 			nc = nc->next;
@@ -1334,7 +1334,7 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
 
 					if (!camel_folder_summary_check_uid (job->folder->summary, mi->uid)) {
 						CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)job->folder;
-						
+
 						camel_folder_summary_add(job->folder->summary, mi);
 						imapx_set_message_info_flags_for_new_message (mi, server_flags, server_user_flags, job->folder);
 						camel_folder_change_info_add_uid (job->u.refresh_info.changes, mi->uid);
@@ -1490,7 +1490,7 @@ imapx_continuation(CamelIMAPXServer *imap, CamelException *ex)
 		camel_imapx_stream_text (imap->stream, &token, ex);
 		if (camel_exception_is_set(ex))
 			return -1;
-		    
+
 		resp = camel_sasl_challenge_base64((CamelSasl *)cp->ob, (const gchar *) token, ex);
 		g_free(token);
 		if (camel_exception_is_set(ex))
@@ -2246,7 +2246,7 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, CamelExceptio
 
 	return TRUE;
 }
-#endif /* !G_OS_WIN32 */
+#endif /* G_OS_WIN32 */
 
 gboolean
 imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
@@ -2273,7 +2273,7 @@ imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
 		connect_to_server_process(is, command, ex);
 		goto exit;
 	}
-#endif		
+#endif
 	if (is->url->port) {
 		serv = g_alloca(16);
 		sprintf((gchar *) serv, "%d", is->url->port);
@@ -2373,14 +2373,13 @@ imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
 
 		ic = camel_imapx_command_new ("STARTTLS", NULL, "STARTTLS");
 		imapx_command_run (is, ic);
-		
+
 		if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
 			if (!camel_exception_is_set (ic->ex))
 				camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s", ic->status->text);
 			else
 				camel_exception_xfer (ex, ic->ex);
 
-
 			camel_imapx_command_free(ic);
 			goto exit;
 		}
@@ -2400,7 +2399,7 @@ exit:
 		e(printf("Unable to connect %d %s \n", ex->id, ex->desc));
 		camel_object_unref (is->stream);
 		is->stream = NULL;
-		
+
 		if (is->cinfo) {
 			imapx_free_capability(is->cinfo);
 			is->cinfo = NULL;
@@ -2501,7 +2500,7 @@ imapx_reconnect (CamelIMAPXServer *is, CamelException *ex)
 		if (!(camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK))
 			authenticated = TRUE;
 		else {
-			/* If exception is set, it might be mostly due to cancellation and we would get an 
+			/* If exception is set, it might be mostly due to cancellation and we would get an
 			   io error, else re-prompt. If authentication fails for other reasons ic->status would be
 			    set with the error message */
 			if (camel_exception_is_set (ic->ex)) {
@@ -2516,10 +2515,10 @@ imapx_reconnect (CamelIMAPXServer *is, CamelException *ex)
 			camel_exception_clear (ex);
 
 		}
-		
+
 		camel_imapx_command_free(ic);
 	}
-	
+
 	/* After login we re-capa */
 	if (is->cinfo) {
 		imapx_free_capability(is->cinfo);
@@ -2540,7 +2539,7 @@ imapx_reconnect (CamelIMAPXServer *is, CamelException *ex)
 		is->use_idle = TRUE;
 	else
 		is->use_idle = FALSE;
-	
+
 	if (imapx_idle_supported (is))
 		imapx_init_idle (is);
 
@@ -2578,7 +2577,7 @@ imapx_reconnect (CamelIMAPXServer *is, CamelException *ex)
 
 exception:
 	imapx_disconnect (is);
-	
+
 	if (is->cinfo) {
 		imapx_free_capability(is->cinfo);
 		is->cinfo = NULL;
@@ -2606,7 +2605,7 @@ imapx_command_fetch_message_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		gsize really_fetched = CAMEL_SEEKABLE_STREAM(job->u.get_message.stream)->position;
 		/* Don't automatically stop when we reach the reported message
 		   size -- some crappy servers (like Microsoft Exchange) have
-		   a tendency to lie about it. Keep going (one request at a 
+		   a tendency to lie about it. Keep going (one request at a
 		   time) until the data actually stop coming. */
 		if (job->u.get_message.fetch_offset < job->u.get_message.size ||
 		    job->u.get_message.fetch_offset == really_fetched) {
@@ -2764,15 +2763,15 @@ imapx_command_copy_messages_step_done (CamelIMAPXServer *is, CamelIMAPXCommand *
 	/* TODO copy the summary and cached messages to the new folder. We might need a sorted insert to avoid refreshing the dest folder */
 	if (ic->status->condition == IMAPX_COPYUID) {
 		gint i;
-		
+
 		for (i = 0; i < ic->status->u.copyuid.copied_uids->len; i++) {
 			guint32 uid = GPOINTER_TO_UINT(g_ptr_array_index (ic->status->u.copyuid.copied_uids, i));
 			gchar *str = g_strdup_printf ("%d",uid);
 			CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) job->u.copy_messages.dest;
-			
+
 			g_hash_table_insert (ifolder->ignore_recent, str, GINT_TO_POINTER (1));
 		}
-				
+
 	}
 
 	if (i < uids->len) {
@@ -3430,7 +3429,6 @@ imapx_job_list_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 }
 /* ********************************************************************** */
 
-
 static gchar *
 imapx_encode_folder_name (CamelIMAPXStore *istore, const gchar *folder_name)
 {
@@ -3442,7 +3440,7 @@ imapx_encode_folder_name (CamelIMAPXStore *istore, const gchar *folder_name)
 		g_free (fname);
 	} else
 		encoded = camel_utf8_utf7 (folder_name);
-	
+
 	return encoded;
 }
 
@@ -3466,8 +3464,7 @@ imapx_job_manage_subscription_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	CamelIMAPXCommand *ic;
 	const gchar *str = NULL;
 	gchar *encoded_fname = NULL;
-	
-	
+
 	if (job->u.manage_subscriptions.subscribe)
 		str = "SUBSCRIBE";
 	else
@@ -3475,7 +3472,7 @@ imapx_job_manage_subscription_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 
 	encoded_fname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.manage_subscriptions.folder_name);
 	ic = camel_imapx_command_new (str, NULL, "%s %s", str, encoded_fname);
-	
+
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_subscription_done;
@@ -3574,7 +3571,7 @@ imapx_job_rename_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 
 	en_ofname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.ofolder_name);
 	en_nfname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.nfolder_name);
-	
+
 	ic = camel_imapx_command_new ("RENAME", "INBOX", "RENAME %s %s", en_ofname, en_nfname);
 	ic->pri = job->pri;
 	ic->job = job;
@@ -4088,7 +4085,7 @@ imapx_disconnect (CamelIMAPXServer *is)
 
 	if (is->cinfo) {
 		imapx_free_capability(is->cinfo);
-		is->cinfo = NULL;	
+		is->cinfo = NULL;
 	}
 
 	is->state = IMAPX_DISCONNECTED;
@@ -4157,14 +4154,14 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, CamelOperat
 
 	if ((job = imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_GET_MESSAGE, uid))) {
 		flag = g_hash_table_lookup (is->uid_eflags, uid);
-	
+
 		if (pri > job->pri)
 			job->pri = pri;
-	
+
 		QUEUE_UNLOCK (is);
 
 		e_flag_wait (flag);
-		
+
 		stream = camel_data_cache_get (ifolder->cache, "cur", uid, NULL);
 		if (!stream)
 			camel_exception_set (ex, 1, "Could not retrieve the message");
@@ -4206,11 +4203,11 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, CamelOperat
 
 	if (registered)
 		imapx_run_job(is, job);
-	
+
 	e_flag_set (flag);
 	if (!camel_exception_is_set (job->ex))
 		stream = job->u.get_message.stream;
-	
+
 	g_free(job);
 
 	/* HACK FIXME just sleep for sometime so that the other waiting locks gets released by that time. Think of a
@@ -4693,7 +4690,7 @@ void
 camel_imapx_server_manage_subscription (CamelIMAPXServer *is, const gchar *folder_name, gboolean subscribe, CamelException *ex)
 {
 	CamelIMAPXJob *job;
-	
+
 	job = g_malloc0(sizeof(*job));
 	job->type = IMAPX_JOB_MANAGE_SUBSCRIPTION;
 	job->start = imapx_job_manage_subscription_start;
@@ -4701,7 +4698,7 @@ camel_imapx_server_manage_subscription (CamelIMAPXServer *is, const gchar *folde
 	job->ex = ex;
 	job->u.manage_subscriptions.subscribe = subscribe;
 	job->u.manage_subscriptions.folder_name = folder_name;
-	
+
 	if (imapx_register_job (is, job))
 		imapx_run_job (is, job);
 
@@ -4712,7 +4709,7 @@ void
 camel_imapx_server_create_folder (CamelIMAPXServer *is, const gchar *folder_name, CamelException *ex)
 {
 	CamelIMAPXJob *job;
-	
+
 	job = g_malloc0(sizeof(*job));
 	job->type = IMAPX_JOB_CREATE_FOLDER;
 	job->start = imapx_job_create_folder_start;
@@ -4730,7 +4727,7 @@ void
 camel_imapx_server_delete_folder (CamelIMAPXServer *is, const gchar *folder_name, CamelException *ex)
 {
 	CamelIMAPXJob *job;
-	
+
 	job = g_malloc0(sizeof(*job));
 	job->type = IMAPX_JOB_DELETE_FOLDER;
 	job->start = imapx_job_delete_folder_start;
@@ -4748,7 +4745,7 @@ void
 camel_imapx_server_rename_folder (CamelIMAPXServer *is, const gchar *old_name, const gchar *new_name, CamelException *ex)
 {
 	CamelIMAPXJob *job;
-	
+
 	job = g_malloc0(sizeof(*job));
 	job->type = IMAPX_JOB_RENAME_FOLDER;
 	job->start = imapx_job_rename_folder_start;
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 9d082cb..ae7aebc 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -161,7 +161,7 @@ imapx_query_auth_types (CamelService *service, CamelException *ex)
 	CamelServiceAuthType *authtype;
 	GList *sasl_types, *t, *next;
 	gboolean connected;
-	
+
 	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 				     _("You must be working online to complete this operation"));
@@ -169,10 +169,10 @@ imapx_query_auth_types (CamelService *service, CamelException *ex)
 	}
 
 	CAMEL_SERVICE_REC_LOCK (istore, connect_lock);
-	
+
 	if (istore->server == NULL)
 		istore->server = camel_imapx_server_new((CamelStore *)istore, service->url);
-	
+
 	connected = istore->server->stream != NULL;
 	if (!connected)
 		connected = imapx_connect_to_server (istore->server, ex);
@@ -514,7 +514,7 @@ imapx_mark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name,
 		}
 		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
 	}
-	
+
 	if (emit_signal) {
 		CamelFolderInfo *fi;
 
@@ -549,7 +549,7 @@ imapx_unsubscribe_folder (CamelStore *store, const gchar *folder_name, gboolean
 
 	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
 		camel_imapx_server_manage_subscription (istore->server, folder_name, FALSE, ex);
-	
+
 	if (!camel_exception_is_set (ex))
 		imapx_unmark_folder_subscribed (istore, folder_name, emit_signal, ex);
 }
@@ -564,7 +564,7 @@ static void
 imapx_store_unsubscribe_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
 {
 	CamelException eex = CAMEL_EXCEPTION_INITIALISER;
-	
+
 	if (!ex)
 		ex = &eex;
 
@@ -628,7 +628,6 @@ imapx_delete_folder (CamelStore *store, const gchar *folder_name, CamelException
 		imapx_delete_folder_from_cache (istore, folder_name, ex);
 }
 
-
 static void
 rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar *new_name, CamelException *ex)
 {
@@ -674,7 +673,6 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, Came
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
 	gchar *oldpath, *newpath, *storage_path;
 
-
 	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 				     _("You must be working online to complete this operation"));
@@ -715,7 +713,7 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, Came
 
 static CamelFolderInfo *
 imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, CamelException *ex)
-{	
+{
 	const gchar *c;
 	CamelStoreInfo *si;
 	CamelIMAPXStoreNamespace *ns;
@@ -723,13 +721,13 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 	gchar *real_name, *full_name, *parent_real;
 	CamelFolderInfo *fi = NULL;
 	gchar dir_sep;
-	
+
 	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 				     _("You must be working online to complete this operation"));
 		return NULL;
 	}
-	
+
 	if (!(istore->server && camel_imapx_server_connect (istore->server, TRUE, ex)))
 		return NULL;
 
@@ -752,7 +750,7 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 				      folder_name, *c);
 		return NULL;
 	}
-	
+
 	parent_real = camel_imapx_store_summary_full_from_path(istore->summary, parent_name);
 	if (parent_real == NULL) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
@@ -786,14 +784,12 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 		camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", fi);
 	}
 
-
 	g_free (full_name);
 	g_free(parent_real);
 
 	return fi;
 }
 
-
 static CamelFolderInfo *
 get_folder_info_offline (CamelStore *store, const gchar *top,
 			 guint32 flags, CamelException *ex)
@@ -1120,7 +1116,7 @@ sync_folders (CamelIMAPXStore *istore, const gchar *pattern, gboolean sync, Came
 					camel_exception_init (&eex);
 					imapx_unmark_folder_subscribed (istore,dup_folder_name, TRUE, &eex);
 					imapx_delete_folder_from_cache (istore, dup_folder_name, &eex);
-					
+
 					g_free (dup_folder_name);
 					camel_exception_clear (&eex);
 				} else {
@@ -1181,14 +1177,14 @@ discover_inbox (CamelStore *store, CamelException *ex)
 {
 	CamelStoreInfo *si;
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)store;
-	
+
 	si = camel_store_summary_path((CamelStoreSummary *) istore->summary, "INBOX");
 	if (si == NULL || (si->flags & CAMEL_FOLDER_SUBSCRIBED) == 0) {
 		imapx_subscribe_folder (store, "INBOX", FALSE, ex);
-		
+
 		if (!camel_exception_is_set(ex) && !si)
 			sync_folders (istore, "INBOX", TRUE, ex);
-	
+
 		if (si)
 			camel_store_summary_info_free((CamelStoreSummary *) istore->summary, si);
 	}
@@ -1209,7 +1205,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
 
 	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		fi = get_folder_info_offline (store, top, flags, ex);
-	
+
 		g_mutex_unlock (istore->get_finfo_lock);
 		return fi;
 	}
@@ -1222,7 +1218,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
 
 		if (now - istore->last_refresh_time > FINFO_REFRESH_INTERVAL) {
 			struct _imapx_refresh_msg *m;
-			
+
 			istore->last_refresh_time = time (NULL);
 			m = camel_session_thread_msg_new(((CamelService *)store)->session, &imapx_refresh_ops, sizeof(*m));
 			m->store = store;
@@ -1230,12 +1226,12 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
 			camel_exception_init(&m->ex);
 			camel_session_thread_queue(((CamelService *)store)->session, &m->msg, 0);
 		}
-		
+
 		fi = get_folder_info_offline (store, top, flags, ex);
 		g_mutex_unlock (istore->get_finfo_lock);
 		return fi;
 	}
-	
+
 	if (!camel_service_connect((CamelService *)store, ex)) {
 		g_mutex_unlock (istore->get_finfo_lock);
 		return NULL;
diff --git a/camel/providers/imapx/camel-imapx-store.h b/camel/providers/imapx/camel-imapx-store.h
index 652a795..fa08ab9 100644
--- a/camel/providers/imapx/camel-imapx-store.h
+++ b/camel/providers/imapx/camel-imapx-store.h
@@ -58,11 +58,11 @@ typedef struct {
 
 	guint32 rec_options;
 
-	/* Used for syncronizing get_folder_info. Check for re-use of any other lock. At the 
+	/* Used for syncronizing get_folder_info. Check for re-use of any other lock. At the
 	   moment, could not find anything suitable for this */
 	GMutex *get_finfo_lock;
 	time_t last_refresh_time;
-	
+
 	/* hash table of UIDs to ignore as recent when updating folder */
 	GHashTable *ignore_recent;
 
diff --git a/camel/providers/imapx/camel-imapx-tokenise.h b/camel/providers/imapx/camel-imapx-tokenise.h
index 60dea68..4a35299 100644
--- a/camel/providers/imapx/camel-imapx-tokenise.h
+++ b/camel/providers/imapx/camel-imapx-tokenise.h
@@ -30,7 +30,7 @@
 
 #line 3 "camel-imapx-tokens.txt"
 struct _imapx_keyword {const gchar *name; camel_imapx_id_t id; };
-struct _imapx_keyword *imapx_tokenise_struct (register const char *str, register unsigned int len);
+struct _imapx_keyword *imapx_tokenise_struct (register const gchar *str, register guint len);
 
 #define TOTAL_KEYWORDS 36
 #define MIN_WORD_LENGTH 2
@@ -46,10 +46,10 @@ __inline
 inline
 #endif
 #endif
-static unsigned int
-imapx_hash (register const char *str, register unsigned int len)
+static guint
+imapx_hash (register const gchar *str, register guint len)
 {
-  static unsigned char asso_values[] =
+  static guchar asso_values[] =
     {
       57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
       57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
@@ -78,14 +78,14 @@ imapx_hash (register const char *str, register unsigned int len)
       57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
       57, 57, 57, 57, 57, 57
     };
-  return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
+  return len + asso_values[(guchar)str[len - 1]] + asso_values[(guchar)str[0]];
 }
 
 #ifdef __GNUC__
 __inline
 #endif
 struct _imapx_keyword *
-imapx_tokenise_struct (register const char *str, register unsigned int len)
+imapx_tokenise_struct (register const gchar *str, register guint len)
 {
   static struct _imapx_keyword wordlist[] =
     {
@@ -175,11 +175,11 @@ imapx_tokenise_struct (register const char *str, register unsigned int len)
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      register int key = imapx_hash (str, len);
+      register gint key = imapx_hash (str, len);
 
       if (key <= MAX_HASH_VALUE && key >= 0)
         {
-          register const char *s = wordlist[key].name;
+          register const gchar *s = wordlist[key].name;
 
           if (*str == *s && !strcmp (str + 1, s + 1))
             return &wordlist[key];
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index ce0e2a6..96e30e0 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -515,7 +515,7 @@ imapx_parse_namespace_list (CamelIMAPXStream *stream, CamelException *ex)
 				if (!g_ascii_strncasecmp (node->path, "INBOX", 5) &&
 						(node->path [6] == '\0' || node->path [6] == node->sep ))
 					memcpy (node->path, "INBOX", 5);
-				
+
 				/* TODO remove full_name later. not required */
 				node->full_name = g_strdup (node->path);
 
diff --git a/libedataserver/e-categories.c b/libedataserver/e-categories.c
index a1b9245..c581efd 100644
--- a/libedataserver/e-categories.c
+++ b/libedataserver/e-categories.c
@@ -203,7 +203,7 @@ idle_saver_cb (gpointer user_data)
 		goto exit;
 
 	filename = build_categories_filename ();
-	
+
 	g_debug ("Saving categories to \"%s\"", filename);
 
 	/* Build the file contents. */
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index 81e8793..6e2c6f6 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -533,7 +533,6 @@ make_tree_view_for_section (ENameSelectorDialog *name_selector_dialog, EDestinat
 	gtk_tree_view_set_headers_visible (tree_view, FALSE);
 	gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (destination_store));
 
-
 	return tree_view;
 }
 
@@ -541,8 +540,8 @@ static void
 setup_section_button (ENameSelectorDialog *name_selector_dialog,
 		      GtkButton *button,
 		      double halign,
-		      const char *label_text,
-		      const char *icon_name,
+		      const gchar *label_text,
+		      const gchar *icon_name,
 		      gboolean icon_before_label)
 {
 	GtkWidget *alignment;
diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c
index 8d7a1b0..5c68da6 100644
--- a/libedataserverui/e-passwords.c
+++ b/libedataserverui/e-passwords.c
@@ -190,7 +190,7 @@ ep_key_file_save (void)
 		g_mkdir_with_parents (pathname, 0700);
 		g_file_set_contents (filename, contents, length, &error);
 	}
-	
+
 	g_free (pathname);
 
 	if (error != NULL) {



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