aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-11 23:31:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 10:25:06 +0800
commiteb29179da623f9cf4abd663577395a085452ca18 (patch)
treea7eec4690f254d4cb9048ca87a5e7f401a2e74ae /e-util
parentbeb8e74577f695d0d3c2efea52dc10c2136f0135 (diff)
downloadgsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-bit-array.c14
-rw-r--r--e-util/e-sorter-array.c2
-rw-r--r--e-util/e-text-event-processor-emacs-like.c21
-rw-r--r--e-util/e-unicode.c2
-rw-r--r--e-util/e-util.c10
5 files changed, 28 insertions, 21 deletions
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index 0a5ca37a0c..1e2635a9e3 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -61,7 +61,7 @@ e_bit_array_insert_real(EBitArray *eba, gint row)
eba->data[box] =
(eba->data[box] & BITMASK_LEFT(row)) |
((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
- eba->bit_count ++;
+ eba->bit_count++;
}
}
@@ -96,7 +96,7 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
/* this over-runs our memory! */
/*eba->data[i] = eba->data[i] << 1; */
}
- eba->bit_count --;
+ eba->bit_count--;
/* Remove the last word if not needed. */
if ((eba->bit_count & 0x1f) == 0) {
eba->data = g_renew(guint32, eba->data, eba->bit_count >> 5);
@@ -258,7 +258,7 @@ e_bit_array_select_all (EBitArray *eba)
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
+ for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
eba->data[i] = ONES;
}
@@ -268,7 +268,7 @@ e_bit_array_select_all (EBitArray *eba)
gint unselected_mask = 0;
gint num_unselected_in_last_byte = 32 - eba->bit_count % 32;
- for (i = 0; i < num_unselected_in_last_byte; i ++)
+ for (i = 0; i < num_unselected_in_last_byte; i++)
unselected_mask |= 1 << i;
eba->data[(eba->bit_count + 31) / 32 - 1] &= ~unselected_mask;
@@ -290,7 +290,7 @@ e_bit_array_invert_selection (EBitArray *eba)
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
+ for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
eba->data[i] = ~eba->data[i];
}
}
@@ -327,10 +327,10 @@ e_bit_array_change_range(EBitArray *eba, gint start, gint end, gboolean grow)
} else {
OPERATE(eba, i, BITMASK_LEFT(start), grow);
if (grow)
- for (i ++; i < last; i++)
+ for (i++; i < last; i++)
eba->data[i] = ONES;
else
- for (i ++; i < last; i++)
+ for (i++; i < last; i++)
eba->data[i] = 0;
OPERATE(eba, i, BITMASK_RIGHT(end), grow);
}
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 71cd1d83b2..c427df65dd 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -213,7 +213,7 @@ e_sorter_array_append (ESorterArray *esa, gint count)
esa->sorted + pos,
sizeof (gint) * (esa->rows - pos));
esa->sorted[pos] = value;
- esa->rows ++;
+ esa->rows++;
}
} else {
esa->rows += count;
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index 7e70d1b731..c69b79c6a3 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -29,9 +29,13 @@
#include "e-text-event-processor-emacs-like.h"
#include "e-util.h"
-static gint e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
+static gint e_text_event_processor_emacs_like_event
+ (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event);
-G_DEFINE_TYPE (ETextEventProcessorEmacsLike, e_text_event_processor_emacs_like, E_TEXT_EVENT_PROCESSOR_TYPE)
+G_DEFINE_TYPE (
+ ETextEventProcessorEmacsLike,
+ e_text_event_processor_emacs_like, E_TEXT_EVENT_PROCESSOR_TYPE)
/* The arguments we take */
enum {
@@ -115,13 +119,15 @@ e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *tep)
}
static gint
-e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
+e_text_event_processor_emacs_like_event (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event)
{
ETextEventProcessorCommand command;
ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(tep);
command.action = E_TEP_NOP;
/* Warning from the Intel compiler here:
- * e-text-event-processor-emacs-like.c(136): warning #589: transfer of control bypasses initialization of:
+ * e-text-event-processor-emacs-like.c(136): warning #589:
+ * transfer of control bypasses initialization of:
* variable "key" (declared at line 194)
* switch (event->type) {
* ^
@@ -467,7 +473,9 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.value = alt_keys[(gint) (key.keyval - 'a')].value;
command.string = alt_keys[(gint) (key.keyval - 'a')].string;
}
- } else if (!(key.state & GDK_MOD1_MASK) && !(key.state & GDK_CONTROL_MASK) && key.length > 0) {
+ } else if (!(key.state & GDK_MOD1_MASK) &&
+ !(key.state & GDK_CONTROL_MASK) &&
+ key.length > 0) {
if (key.keyval >= GDK_KP_0 && key.keyval <= GDK_KP_9) {
key.keyval = '0';
key.string = "0";
@@ -502,7 +510,6 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
ETextEventProcessor *
e_text_event_processor_emacs_like_new (void)
{
- ETextEventProcessorEmacsLike *retval = g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
- return E_TEXT_EVENT_PROCESSOR (retval);
+ return g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
}
diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c
index 7a8fe696a8..1d792f15ad 100644
--- a/e-util/e-unicode.c
+++ b/e-util/e-unicode.c
@@ -84,7 +84,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
/* iso-8859-1 */
ib = (gchar *) string;
new = ob = (gchar *)g_new (unsigned char, bytes * 2 + 1);
- for (i = 0; i < (bytes); i ++) {
+ for (i = 0; i < (bytes); i++) {
ob += e_unichar_to_utf8 (ib[i], ob);
}
*ob = '\0';
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 4b73fd7865..7d45709d2d 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -540,15 +540,15 @@ e_str_without_underscores (const gchar *string)
new_string = g_malloc (strlen (string) + 1);
dp = new_string;
- for (sp = string; *sp != '\0'; sp ++) {
+ for (sp = string; *sp != '\0'; sp++) {
if (*sp != '_') {
*dp = *sp;
- dp ++;
+ dp++;
} else if (sp[1] == '_') {
/* Translate "__" in "_". */
*dp = '_';
- dp ++;
- sp ++;
+ dp++;
+ sp++;
}
}
*dp = 0;
@@ -687,7 +687,7 @@ e_format_number (gint number)
}
char_length += strlen(group);
list = g_list_prepend(list, group);
- group_count ++;
+ group_count++;
}
if (list) {