[evolution-data-server] Coding style and whitespace cleanup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Coding style and whitespace cleanup.
- Date: Sat, 28 Nov 2009 20:52:46 +0000 (UTC)
commit a5864b8763fada35c3d6527c9989b8097e5a5019
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Nov 28 15:52:33 2009 -0500
Coding style and whitespace cleanup.
camel/camel-folder-summary.c | 6 ++--
camel/camel-tcp-stream-ssl.c | 2 +-
camel/providers/groupwise/camel-groupwise-folder.c | 17 ++++-----
camel/providers/imapx/camel-imapx-server.c | 34 +++++++++---------
camel/providers/imapx/camel-imapx-store.c | 35 +++++++++----------
camel/providers/imapx/camel-imapx-utils.c | 2 +-
6 files changed, 47 insertions(+), 49 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 3e22be1..47fc5e6 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -5081,14 +5081,14 @@ camel_folder_summary_guess_content_info (CamelMessageInfo *mi, CamelContentType
{
CamelMessageInfoBase *bmi = (CamelMessageInfoBase *) mi;
CamelMessageContentInfo *ci = bmi->content;
-
+
while (ci) {
CamelMessageContentInfo *child = ci;
-
+
do {
if (match_content_type (child->type, ctype))
return child;
-
+
child = child->next;
} while (child != NULL);
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index dfe126d..b1af151 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1315,7 +1315,7 @@ stream_get_remote_address (CamelTcpStream *stream, socklen_t *len)
PRFileDesc *
camel_tcp_stream_ssl_sockfd (CamelTcpStreamSSL *stream)
{
- return stream->priv->sockfd;
+ return stream->priv->sockfd;
}
#endif /* HAVE_NSS */
diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c
index 198f7c3..61d6dff 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@ -689,16 +689,15 @@ sync_flags (CamelFolder *folder, GList *uids)
}
}
-
static gboolean
groupwise_set_message_flags (CamelFolder *folder, const gchar *uid, guint32 flags, guint32 set)
{
CamelMessageInfo *info;
gint res;
const gchar *sync_immediately;
-
+
g_return_val_if_fail (folder->summary != NULL, FALSE);
-
+
info = camel_folder_summary_uid (folder->summary, uid);
if (info == NULL)
return FALSE;
@@ -706,12 +705,12 @@ groupwise_set_message_flags (CamelFolder *folder, const gchar *uid, guint32 flag
res = camel_message_info_set_flags (info, flags, set);
sync_immediately = g_getenv ("GW_SYNC_IMMEDIATE");
-
+
if (sync_immediately) {
CamelException ex;
-
+
camel_exception_init (&ex);
- groupwise_sync (folder, FALSE, info, &ex);
+ groupwise_sync (folder, FALSE, info, &ex);
camel_exception_clear (&ex);
}
@@ -722,7 +721,7 @@ groupwise_set_message_flags (CamelFolder *folder, const gchar *uid, guint32 flag
static void
groupwise_sync_all (CamelFolder *folder, gboolean expunge, CamelException *ex)
{
- groupwise_sync (folder, expunge, NULL, ex);
+ groupwise_sync (folder, expunge, NULL, ex);
}
/* This may need to be reorganized. */
@@ -769,7 +768,7 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_
CAMEL_GROUPWISE_FOLDER_REC_LOCK (folder, cache_lock);
for (i=0; i < count; i++) {
guint32 flags = 0;
-
+
if (update_single != NULL) {
info = update_single;
camel_message_info_ref (info);
@@ -881,7 +880,7 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_
}
}
}
-
+
camel_message_info_free (info);
}
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 1ef16e5..0407c8a 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1095,7 +1095,7 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
imap_free_fetch(finfo);
break;
}
- case IMAP_LSUB:
+ case IMAP_LSUB:
lsub = TRUE;
case IMAP_LIST: {
struct _list_info *linfo = imap_parse_list(imap->stream, ex);
@@ -1625,8 +1625,8 @@ retry:
CamelIMAPXNamespaceList *nsl = NULL;
CamelIMAPXStoreNamespace *ns = NULL;
CamelIMAPXStore *imapx_store = (CamelIMAPXStore *) is->store;
-
- /* set a default namespace */
+
+ /* set a default namespace */
nsl = g_malloc0(sizeof(CamelIMAPXNamespaceList));
ns = g_new0 (CamelIMAPXStoreNamespace, 1);
ns->next = NULL;
@@ -1830,7 +1830,7 @@ imapx_refresh_info_cmp(gconstpointer ap, gconstpointer bp)
}
/* skips over non-server uids (pending appends) */
-static guint
+static guint
imapx_index_next (CamelFolderSummary *s, guint index)
{
guint count = 0;
@@ -1839,17 +1839,17 @@ imapx_index_next (CamelFolderSummary *s, guint index)
while (index < count) {
const CamelMessageInfo *info;
-
+
index++;
info = camel_folder_summary_index (s, index);
if (!info)
continue;
-
+
if (info && (strchr(camel_message_info_uid(info), '-') != NULL)) {
printf("Ignoring offline uid '%s'\n", camel_message_info_uid(info));
} else
break;
- }
+ }
return index;
}
@@ -1863,7 +1863,7 @@ imapx_job_refresh_info_step_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
if (camel_folder_change_info_changed(job->u.refresh_info.changes))
camel_object_trigger_event(job->folder, "folder_changed", job->u.refresh_info.changes);
- camel_folder_change_info_clear(job->u.refresh_info.changes);
+ camel_folder_change_info_clear(job->u.refresh_info.changes);
if (i<infos->len) {
ic = camel_imapx_command_new("FETCH", job->folder->full_name, "UID FETCH ");
@@ -1957,12 +1957,12 @@ imapx_job_refresh_info_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
qsort(infos->data, infos->len, sizeof(struct _refresh_info), imapx_refresh_info_cmp);
total = camel_folder_summary_count (s);
s_minfo = camel_folder_summary_index (s, 0);
-
- for (i=0; i<infos->len ; i++) {
+
+ for (i=0; i<infos->len; i++) {
struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
while (s_minfo && uid_cmp(camel_message_info_uid(s_minfo), r->uid, s) < 0) {
- const char *uid = camel_message_info_uid (s_minfo);
+ const gchar *uid = camel_message_info_uid (s_minfo);
camel_folder_change_info_remove_uid (job->u.refresh_info.changes, uid);
removed = g_slist_prepend (removed, (gpointer )uid);
@@ -1980,9 +1980,9 @@ imapx_job_refresh_info_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
camel_folder_change_info_change_uid (job->u.refresh_info.changes, camel_message_info_uid (s_minfo));
g_free(r->uid);
r->uid = NULL;
- } else
+ } else
fetch_new = TRUE;
-
+
j = imapx_index_next (s, j);
s_minfo = camel_folder_summary_index (s, j);
@@ -1994,16 +1994,16 @@ imapx_job_refresh_info_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
s_minfo = camel_folder_summary_index (s, j);
if (!s_minfo) {
- j++;
+ j++;
continue;
}
-
+
printf("Message %s vanished\n", s_minfo->uid);
camel_folder_change_info_remove_uid (job->u.refresh_info.changes, s_minfo->uid);
camel_folder_summary_remove_uid_fast (s, s_minfo->uid);
removed = g_slist_prepend (removed, s_minfo->uid);
j++;
- }
+ }
camel_db_delete_uids (is->store, s->folder->full_name, removed, NULL);
@@ -2645,7 +2645,7 @@ getmsgs(gpointer d)
const CamelMessageInfo *info;
CamelException ex = { 0 };
- /* FIXME: detach?
+ /* FIXME: detach?
printf("Checking thread, downloading messages in the background ...\n");
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index d5a4cd1..84efbb2 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -508,7 +508,7 @@ static gint folder_eq(gconstpointer ap, gconstpointer bp)
return g_str_equal(a, b);
}
-static gboolean
+static gboolean
imap_match_pattern(CamelIMAPXStoreNamespace *ns, const gchar *pattern, const gchar *name)
{
gchar p, n, dir_sep;
@@ -584,7 +584,6 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
CamelStoreInfo *si = camel_store_summary_index((CamelStoreSummary *)imapx_store->summary, i);
const gchar *full_name;
CamelIMAPXStoreNamespace *ns;
-
if (si == NULL)
continue;
@@ -604,7 +603,7 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
&& ( TRUE
|| (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)
|| (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST) != 0)) {
-
+
fi = imapx_build_folder_info(imapx_store, camel_store_info_path((CamelStoreSummary *)imapx_store->summary, si));
fi->unread = si->unread;
fi->total = si->total;
@@ -661,14 +660,14 @@ add_folders_to_summary (CamelIMAPXStore *istore, GPtrArray *folders, GHashTable
if (!si)
continue;
- new_flags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) |
+ new_flags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) |
(li->flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
if (si->info.flags != new_flags) {
si->info.flags = new_flags;
camel_store_summary_touch ((CamelStoreSummary *) istore->summary);
}
-
+
if (!table)
continue;
@@ -719,10 +718,10 @@ static void
fetch_folders_for_pattern (CamelIMAPXStore *istore, const gchar *pattern, guint32 flags, GHashTable **table, CamelException *ex)
{
GPtrArray *folders = NULL;
-
+
folders = camel_imapx_server_list (istore->server, pattern, flags, ex);
add_folders_to_summary (istore, folders, table);
-
+
g_ptr_array_foreach (folders, free_list, folders);
g_ptr_array_free (folders, TRUE);
}
@@ -750,18 +749,18 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore, const gchar *pattern, Cam
{
GHashTable *folders = NULL;
GSList *namespaces = NULL, *l;
-
+
folders = g_hash_table_new (folder_hash, folder_eq);
namespaces = get_namespaces (istore);
for (l = namespaces; l != NULL; l = g_slist_next (l))
{
- CamelIMAPXStoreNamespace *ns = l->data;
+ CamelIMAPXStoreNamespace *ns = l->data;
while (ns) {
guint32 flags = 0;
gchar *pat = NULL;
-
+
if (!pattern) {
if (!*ns->path)
pat = g_strdup ("");
@@ -776,8 +775,8 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore, const gchar *pattern, Cam
fetch_folders_for_pattern (istore, pat, flags, &folders, ex);
g_free (pat);
-
- if (pattern)
+
+ if (pattern)
return folders;
ns = ns->next;
@@ -802,11 +801,11 @@ sync_folders (CamelIMAPXStore *istore, const gchar *pattern, CamelException *ex)
CamelStoreInfo *si;
const gchar *full_name;
CamelFolderInfo *fi;
-
+
si = camel_store_summary_index ((CamelStoreSummary *) istore->summary, i);
if (!si)
continue;
-
+
full_name = camel_imapx_store_info_full_name (istore->summary, si);
if (!full_name || !*full_name) {
camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
@@ -829,7 +828,7 @@ sync_folders (CamelIMAPXStore *istore, const gchar *pattern, CamelException *ex)
CamelException eex;
camel_exception_init (&eex);
-
+
/* Delete the folder from cache */
g_free (dup_folder_name);
@@ -863,18 +862,18 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
fi = get_folder_info_offline (store, top, flags, ex);
return fi;
}
-
+
if (istore->server == NULL) {
camel_service_connect((CamelService *)store, ex);
if (camel_exception_is_set(ex))
return NULL;
}
-
+
if (camel_store_summary_count (istore->summary) == 0) {
sync_folders (istore, top, ex);
camel_store_summary_save((CamelStoreSummary *)istore->summary);
}
-
+
fi = get_folder_info_offline (store, top, flags, ex);
return fi;
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index 0868530..e471f00 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -1585,7 +1585,7 @@ camel_imapx_namespace_list_clear (struct _CamelIMAPXNamespaceList *nsl)
{
if (!nsl)
return;
-
+
imapx_namespace_clear (&nsl->personal);
imapx_namespace_clear (&nsl->shared);
imapx_namespace_clear (&nsl->other);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]