diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-07-12 20:02:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-20 02:17:55 +0800 |
commit | c85109fc322137596bf34cffc5445d568223c60d (patch) | |
tree | 711e6d5b2eb3d6c7780d1d01e20d980c67a77f9e /libevolution-utils | |
parent | 7d1751cc26a75166019917ec8c3b35e1083d27d6 (diff) | |
download | gsoc2013-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 'libevolution-utils')
-rw-r--r-- | libevolution-utils/e-alert.c | 26 | ||||
-rw-r--r-- | libevolution-utils/e-xml-utils.c | 15 | ||||
-rw-r--r-- | libevolution-utils/evolution-util.c | 5 |
3 files changed, 23 insertions, 23 deletions
diff --git a/libevolution-utils/e-alert.c b/libevolution-utils/e-alert.c index 7d3b5e717f..5a08e07122 100644 --- a/libevolution-utils/e-alert.c +++ b/libevolution-utils/e-alert.c @@ -172,19 +172,19 @@ e_alert_load (const gchar *path) struct _e_alert_table *table; gchar *tmp; - d(printf("loading error file %s\n", path)); + d (printf ("loading error file %s\n", path)); doc = e_xml_parse_file (path); if (doc == NULL) { - g_warning("Error file '%s' not found", path); + g_warning ("Error file '%s' not found", path); return; } root = xmlDocGetRootElement (doc); if (root == NULL - || strcmp((gchar *)root->name, "error-list") != 0 - || (tmp = (gchar *)xmlGetProp(root, (const guchar *)"domain")) == NULL) { - g_warning("Error file '%s' invalid format", path); + || strcmp ((gchar *) root->name, "error-list") != 0 + || (tmp = (gchar *) xmlGetProp (root, (const guchar *)"domain")) == NULL) { + g_warning ("Error file '%s' invalid format", path); xmlFreeDoc (doc); return; } @@ -218,8 +218,8 @@ e_alert_load (const gchar *path) xmlFree (tmp); for (error = root->children; error; error = error->next) { - if (!strcmp((gchar *)error->name, "error")) { - tmp = (gchar *)xmlGetProp(error, (const guchar *)"id"); + if (!strcmp ((gchar *) error->name, "error")) { + tmp = (gchar *) xmlGetProp (error, (const guchar *)"id"); if (tmp == NULL) continue; @@ -229,39 +229,39 @@ e_alert_load (const gchar *path) xmlFree (tmp); lastbutton = (EAlertButton *) &e->buttons; - tmp = (gchar *)xmlGetProp(error, (const guchar *)"type"); + tmp = (gchar *) xmlGetProp (error, (const guchar *)"type"); e->message_type = map_type (tmp); if (tmp) xmlFree (tmp); - tmp = (gchar *)xmlGetProp(error, (const guchar *)"default"); + tmp = (gchar *) xmlGetProp (error, (const guchar *)"default"); if (tmp) { e->default_response = map_response (tmp); xmlFree (tmp); } for (scan = error->children; scan; scan = scan->next) { - if (!strcmp((gchar *)scan->name, "primary")) { + if (!strcmp ((gchar *) scan->name, "primary")) { if ((tmp = (gchar *) xmlNodeGetContent (scan))) { e->primary_text = g_strdup ( dgettext (table-> translation_domain, tmp)); xmlFree (tmp); } - } else if (!strcmp((gchar *)scan->name, "secondary")) { + } else if (!strcmp ((gchar *) scan->name, "secondary")) { if ((tmp = (gchar *) xmlNodeGetContent (scan))) { e->secondary_text = g_strdup ( dgettext (table-> translation_domain, tmp)); xmlFree (tmp); } - } else if (!strcmp((gchar *)scan->name, "button")) { + } else if (!strcmp ((gchar *) scan->name, "button")) { EAlertButton *button; gchar *label = NULL; gchar *stock_id = NULL; button = g_new0 (EAlertButton, 1); - tmp = (gchar *)xmlGetProp(scan, (const guchar *)"stock"); + tmp = (gchar *) xmlGetProp (scan, (const guchar *)"stock"); if (tmp) { stock_id = g_strdup (tmp); button->stock_id = stock_id; diff --git a/libevolution-utils/e-xml-utils.c b/libevolution-utils/e-xml-utils.c index 21c39aa514..23113235e8 100644 --- a/libevolution-utils/e-xml-utils.c +++ b/libevolution-utils/e-xml-utils.c @@ -207,7 +207,7 @@ e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - (void) sscanf ((gchar *)prop, "%d", &ret_val); + (void) sscanf ((gchar *) prop, "%d", &ret_val); xmlFree (prop); } return ret_val; @@ -251,7 +251,7 @@ e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - (void) sscanf ((gchar *)prop, "%u", &ret_val); + (void) sscanf ((gchar *) prop, "%u", &ret_val); xmlFree (prop); } return ret_val; @@ -279,9 +279,8 @@ e_xml_get_bool_prop_by_name (const xmlNode *parent, g_return_val_if_fail (parent != NULL, 0); g_return_val_if_fail (prop_name != NULL, 0); - return e_xml_get_bool_prop_by_name_with_default (parent, - prop_name, - FALSE); + return e_xml_get_bool_prop_by_name_with_default ( + parent, prop_name, FALSE); } gboolean @@ -297,9 +296,9 @@ e_xml_get_bool_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - if (g_ascii_strcasecmp ((gchar *)prop, "true") == 0) { + if (g_ascii_strcasecmp ((gchar *) prop, "true") == 0) { ret_val = TRUE; - } else if (g_ascii_strcasecmp ((gchar *)prop, "false") == 0) { + } else if (g_ascii_strcasecmp ((gchar *) prop, "false") == 0) { ret_val = FALSE; } xmlFree (prop); @@ -435,7 +434,7 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, return ret_val; } - combined_name = g_strdup_printf("_%s", prop_name); + combined_name = g_strdup_printf ("_%s", prop_name); prop = xmlGetProp ((xmlNode *) parent, (guchar *) combined_name); if (prop != NULL) { ret_val = g_strdup (gettext ((gchar *) prop)); diff --git a/libevolution-utils/evolution-util.c b/libevolution-utils/evolution-util.c index 97f21607c7..3bba779a09 100644 --- a/libevolution-utils/evolution-util.c +++ b/libevolution-utils/evolution-util.c @@ -248,8 +248,9 @@ e_ascii_dtostr (gchar *buffer, p++; if (decimal_point_len > 1) { rest_len = strlen (p + (decimal_point_len - 1)); - memmove (p, p + (decimal_point_len - 1), - rest_len); + memmove ( + p, p + (decimal_point_len - 1), + rest_len); p[rest_len] = 0; } } |