From 0f4261688969299b82ee06d76c887d1cd209c588 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Mon, 11 Apr 2011 11:31:55 +0000 Subject: [PATCH] Ecore ecore_imf: Fixed formatting and removed trailing whitespaces. Patch by Jihoon Kim SVN revision: 58545 --- legacy/ecore/src/lib/ecore_imf/ecore_imf.c | 6 ++-- .../src/lib/ecore_imf/ecore_imf_context.c | 28 +++++++++---------- .../src/lib/ecore_imf/ecore_imf_module.c | 18 ++++++------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c index bf83d9575d..7cf8a4a9f6 100644 --- a/legacy/ecore/src/lib/ecore_imf/ecore_imf.c +++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c @@ -34,10 +34,10 @@ EAPI int ecore_imf_init(void) { if (++_ecore_imf_init_count != 1) return _ecore_imf_init_count; - + if (!ecore_init()) return --_ecore_imf_init_count; _ecore_imf_log_dom = eina_log_domain_register - ("ecore_imf", ECORE_IMF_DEFAULT_LOG_COLOR); + ("ecore_imf", ECORE_IMF_DEFAULT_LOG_COLOR); if (_ecore_imf_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module."); @@ -45,7 +45,7 @@ ecore_imf_init(void) return --_ecore_imf_init_count; } ecore_imf_module_init(); - + ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new(); ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new(); ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new(); diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c index 0bb2354285..53503be83d 100644 --- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c +++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c @@ -51,16 +51,16 @@ ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type) static int _ecore_imf_context_match_locale(const char *locale, const char *against, int against_len) { - if (strcmp(against, "*") == 0) - return 1; + if (strcmp(against, "*") == 0) + return 1; - if (strcasecmp(locale, against) == 0) - return 4; + if (strcasecmp(locale, against) == 0) + return 4; - if (strncasecmp(locale, against, 2) == 0) - return (against_len == 2) ? 3 : 2; + if (strncasecmp(locale, against, 2) == 0) + return (against_len == 2) ? 3 : 2; - return 0; + return 0; } /** @@ -122,13 +122,13 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type) const char *q = strchr(p, ':'); int goodness = _ecore_imf_context_match_locale(locale, p, q ? (size_t)(q - p) : strlen (p)); - if (goodness > best_goodness) - { - id = module->info->id; - best_goodness = goodness; - } + if (goodness > best_goodness) + { + id = module->info->id; + best_goodness = goodness; + } - p = q ? q + 1 : NULL; + p = q ? q + 1 : NULL; } } @@ -859,7 +859,7 @@ _ecore_imf_event_free_delete_surrounding(void *data __UNUSED__, void *event) /** * Adds ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue. * - * Asks the widget that the input context is attached to to delete characters around the cursor position + * Asks the widget that the input context is attached to to delete characters around the cursor position * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue. * Note that offset and n_chars are in characters not in bytes. * diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c index cdde8081bc..b6b59ee706 100644 --- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c +++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c @@ -18,8 +18,8 @@ static int _ecore_imf_modules_exists(const char *ctx_id); typedef struct _Ecore_IMF_Selector { - const char *toselect; - void *selected; + const char *toselect; + void *selected; } Ecore_IMF_Selector; static Eina_Hash *modules = NULL; @@ -58,8 +58,8 @@ ecore_imf_module_shutdown(void) static Eina_Bool _hash_module_available_get(const Eina_Hash *hash __UNUSED__, int *data, void *list) { - *(Eina_List**)list = eina_list_append(*(Eina_List**)list, data); - return EINA_TRUE; + *(Eina_List**)list = eina_list_append(*(Eina_List**)list, data); + return EINA_TRUE; } Eina_List * @@ -72,7 +72,7 @@ ecore_imf_module_available_get(void) it = eina_hash_iterator_data_new(modules); if (!it) - return NULL; + return NULL; eina_iterator_foreach(it, EINA_EACH_CB(_hash_module_available_get), &values); eina_iterator_free(it); @@ -112,8 +112,8 @@ ecore_imf_module_context_create(const char *ctx_id) static Eina_Bool _hash_ids_get(const Eina_Hash *hash __UNUSED__, const char *key, void *list) { - *(Eina_List**)list = eina_list_append(*(Eina_List**)list, key); - return EINA_TRUE; + *(Eina_List**)list = eina_list_append(*(Eina_List**)list, key); + return EINA_TRUE; } Eina_List * @@ -126,7 +126,7 @@ ecore_imf_module_context_ids_get(void) it = eina_hash_iterator_key_new(modules); if (!it) - return NULL; + return NULL; eina_iterator_foreach(it, EINA_EACH_CB(_hash_ids_get), &l); eina_iterator_free(it); @@ -160,7 +160,7 @@ ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type) it = eina_hash_iterator_data_new(modules); if (!it) - return NULL; + return NULL; selector.toselect = canvas_type; selector.selected = values;