aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-utils
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-12 20:02:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-20 02:17:55 +0800
commitc85109fc322137596bf34cffc5445d568223c60d (patch)
tree711e6d5b2eb3d6c7780d1d01e20d980c67a77f9e /libemail-utils
parent7d1751cc26a75166019917ec8c3b35e1083d27d6 (diff)
downloadgsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.gz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.bz2
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.lz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.xz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.zst
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'libemail-utils')
-rw-r--r--libemail-utils/em-filter-folder-element.c6
-rw-r--r--libemail-utils/em-vfolder-context.c2
-rw-r--r--libemail-utils/em-vfolder-rule.c46
-rw-r--r--libemail-utils/mail-mt.c13
4 files changed, 35 insertions, 32 deletions
diff --git a/libemail-utils/em-filter-folder-element.c b/libemail-utils/em-filter-folder-element.c
index 8c4b62585f..6c3033fe83 100644
--- a/libemail-utils/em-filter-folder-element.c
+++ b/libemail-utils/em-filter-folder-element.c
@@ -112,14 +112,14 @@ filter_folder_element_xml_decode (EFilterElement *fe,
xmlNodePtr n;
xmlFree (fe->name);
- fe->name = (gchar *) xmlGetProp(node, (xmlChar *) "name");
+ fe->name = (gchar *) xmlGetProp (node, (xmlChar *) "name");
n = node->children;
while (n) {
- if (!strcmp((gchar *) n->name, "folder")) {
+ if (!strcmp ((gchar *) n->name, "folder")) {
gchar *uri;
- uri = (gchar *) xmlGetProp(n, (xmlChar *) "uri");
+ uri = (gchar *) xmlGetProp (n, (xmlChar *) "uri");
g_free (ff->priv->uri);
ff->priv->uri = g_strdup (uri);
xmlFree (uri);
diff --git a/libemail-utils/em-vfolder-context.c b/libemail-utils/em-vfolder-context.c
index 736d398e13..b908f82928 100644
--- a/libemail-utils/em-vfolder-context.c
+++ b/libemail-utils/em-vfolder-context.c
@@ -61,7 +61,7 @@ vfolder_context_new_element (ERuleContext *context,
return e_filter_option_new ();
if (strcmp (type, "score") == 0)
- return e_filter_int_new_type("score", -3, 3);
+ return e_filter_int_new_type ("score", -3, 3);
if (strcmp (type, "folder") == 0)
return em_filter_folder_element_new ();
diff --git a/libemail-utils/em-vfolder-rule.c b/libemail-utils/em-vfolder-rule.c
index ac77e75ce5..30a94af014 100644
--- a/libemail-utils/em-vfolder-rule.c
+++ b/libemail-utils/em-vfolder-rule.c
@@ -114,7 +114,7 @@ em_vfolder_rule_init (EMVFolderRule *rule)
rule->priv->with = EM_VFOLDER_RULE_WITH_SPECIFIC;
rule->priv->autoupdate = TRUE;
/* it's using pointers from priv::sources, and those
- included has include_subfolders set to true */
+ * included has include_subfolders set to true */
rule->priv->include_subfolders = g_hash_table_new (g_direct_hash, g_direct_equal);
rule->rule.source = g_strdup ("incoming");
@@ -195,14 +195,14 @@ GQueue *
em_vfolder_rule_get_sources (EMVFolderRule *rule)
{
g_return_val_if_fail (rule != NULL, NULL);
-
+
return &rule->priv->sources;
}
static gboolean
check_queue_has_key (gpointer key,
- gpointer value,
- gpointer user_data)
+ gpointer value,
+ gpointer user_data)
{
EMVFolderRule *rule = user_data;
@@ -222,7 +222,7 @@ em_vfolder_rule_sources_changed (EMVFolderRule *rule)
gboolean
em_vfolder_rule_source_get_include_subfolders (EMVFolderRule *rule,
- const gchar *source)
+ const gchar *source)
{
g_return_val_if_fail (rule != NULL, FALSE);
g_return_val_if_fail (source != NULL, FALSE);
@@ -234,8 +234,8 @@ em_vfolder_rule_source_get_include_subfolders (EMVFolderRule *rule,
void
em_vfolder_rule_source_set_include_subfolders (EMVFolderRule *rule,
- const gchar *source,
- gboolean include_subfolders)
+ const gchar *source,
+ gboolean include_subfolders)
{
g_return_if_fail (rule != NULL);
g_return_if_fail (source != NULL);
@@ -251,7 +251,7 @@ em_vfolder_rule_source_set_include_subfolders (EMVFolderRule *rule,
void
em_vfolder_rule_set_with (EMVFolderRule *rule,
- em_vfolder_rule_with_t with)
+ em_vfolder_rule_with_t with)
{
g_return_if_fail (rule != NULL);
@@ -267,8 +267,8 @@ em_vfolder_rule_get_with (EMVFolderRule *rule)
}
void
-em_vfolder_rule_set_autoupdate (EMVFolderRule *rule,
- gboolean autoupdate)
+em_vfolder_rule_set_autoupdate (EMVFolderRule *rule,
+ gboolean autoupdate)
{
g_return_if_fail (rule != NULL);
@@ -353,10 +353,10 @@ xml_encode (EFilterRule *fr)
g_return_val_if_fail (node != NULL, NULL);
g_return_val_if_fail (vr->priv->with < G_N_ELEMENTS (with_names), NULL);
- set = xmlNewNode(NULL, (const guchar *)"sources");
+ set = xmlNewNode (NULL, (const guchar *)"sources");
xmlAddChild (node, set);
- xmlSetProp(set, (const guchar *)"with", (guchar *)with_names[vr->priv->with]);
- xmlSetProp(set, (const guchar *)"autoupdate", (guchar *) (vr->priv->autoupdate ? "true" : "false"));
+ xmlSetProp (set, (const guchar *)"with", (guchar *) with_names[vr->priv->with]);
+ xmlSetProp (set, (const guchar *)"autoupdate", (guchar *) (vr->priv->autoupdate ? "true" : "false"));
head = g_queue_peek_head_link (&vr->priv->sources);
for (link = head; link != NULL; link = g_list_next (link)) {
@@ -404,16 +404,16 @@ xml_decode (EFilterRule *fr,
return result;
/* handle old format file, vfolder source is in filterrule */
- if (strcmp(fr->source, "incoming")!= 0) {
+ if (strcmp (fr->source, "incoming")!= 0) {
set_with (vr, fr->source);
g_free (fr->source);
- fr->source = g_strdup("incoming");
+ fr->source = g_strdup ("incoming");
}
set = node->children;
while (set) {
- if (!strcmp((gchar *)set->name, "sources")) {
- tmp = (gchar *)xmlGetProp(set, (const guchar *)"with");
+ if (!strcmp ((gchar *) set->name, "sources")) {
+ tmp = (gchar *) xmlGetProp (set, (const guchar *)"with");
if (tmp) {
set_with (vr, tmp);
xmlFree (tmp);
@@ -425,8 +425,8 @@ xml_decode (EFilterRule *fr,
}
work = set->children;
while (work) {
- if (!strcmp((gchar *)work->name, "folder")) {
- tmp = (gchar *)xmlGetProp(work, (const guchar *)"uri");
+ if (!strcmp ((gchar *) work->name, "folder")) {
+ tmp = (gchar *) xmlGetProp (work, (const guchar *)"uri");
if (tmp) {
gchar *include_subfolders;
@@ -434,7 +434,8 @@ xml_decode (EFilterRule *fr,
include_subfolders = (gchar *) xmlGetProp (work, (const guchar *) "include-subfolders");
if (include_subfolders) {
- em_vfolder_rule_source_set_include_subfolders (vr,
+ em_vfolder_rule_source_set_include_subfolders (
+ vr,
tmp, g_str_equal (include_subfolders, "true"));
xmlFree (include_subfolders);
}
@@ -464,14 +465,15 @@ rule_copy (EFilterRule *dest,
while ((uri = g_queue_pop_head (&vdest->priv->sources)) != NULL)
g_free (uri);
- em_vfolder_rule_sources_changed (vdest);
+ em_vfolder_rule_sources_changed (vdest);
head = g_queue_peek_head_link (&vsrc->priv->sources);
for (link = head; link != NULL; link = g_list_next (link)) {
const gchar *uri = link->data;
g_queue_push_tail (&vdest->priv->sources, g_strdup (uri));
- em_vfolder_rule_source_set_include_subfolders (vdest, uri,
+ em_vfolder_rule_source_set_include_subfolders (
+ vdest, uri,
em_vfolder_rule_source_get_include_subfolders (vsrc, uri));
}
diff --git a/libemail-utils/mail-mt.c b/libemail-utils/mail-mt.c
index 25b33689b7..fedfd5b400 100644
--- a/libemail-utils/mail-mt.c
+++ b/libemail-utils/mail-mt.c
@@ -122,7 +122,7 @@ mail_msg_new (MailMsgInfo *info)
g_hash_table_insert (
mail_msg_active_table, GINT_TO_POINTER (msg->seq), msg);
- d(printf("New message %p\n", msg));
+ d (printf ("New message %p\n", msg));
g_mutex_unlock (mail_msg_lock);
@@ -140,13 +140,13 @@ checkmem (gpointer p)
switch (status) {
case MCHECK_HEAD:
- printf("Memory underrun at %p\n", p);
+ printf ("Memory underrun at %p\n", p);
abort ();
case MCHECK_TAIL:
- printf("Memory overrun at %p\n", p);
+ printf ("Memory overrun at %p\n", p);
abort ();
case MCHECK_FREE:
- printf("Double free %p\n", p);
+ printf ("Double free %p\n", p);
abort ();
}
}
@@ -200,7 +200,7 @@ mail_msg_unref (gpointer msg)
checkmem (mail_msg->cancel);
checkmem (mail_msg->priv);
#endif
- d(printf("Free message %p\n", msg));
+ d (printf ("Free message %p\n", msg));
if (mail_msg->info->free)
mail_msg->info->free (mail_msg);
@@ -478,7 +478,8 @@ create_thread_pool (gpointer data)
void
mail_msg_main_loop_push (gpointer msg)
{
- g_async_queue_push_sorted (main_loop_queue, msg,
+ g_async_queue_push_sorted (
+ main_loop_queue, msg,
(GCompareDataFunc) mail_msg_compare, NULL);
G_LOCK (idle_source_id);