From e070cf048f8407ea18d6e6037010254ae479367c Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 13 Jan 2012 23:50:01 +0000 Subject: [PATCH] From: Jihoon Kim Subject: [E-devel] [PATCH] fix build error of ecore_imf_xim when using --disable-xim option Date: Mon, 9 Jan 2012 19:53:17 +0900 Hello, EFL developers. When building ecore with --disable-xim option, build error occurs. This patch will solve this build error problem. Would you please review and apply in svn? SVN revision: 67191 --- .../ecore/src/modules/immodules/xim/ecore_imf_xim.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/legacy/ecore/src/modules/immodules/xim/ecore_imf_xim.c b/legacy/ecore/src/modules/immodules/xim/ecore_imf_xim.c index f2fd6a44ec..604e7950a6 100644 --- a/legacy/ecore/src/modules/immodules/xim/ecore_imf_xim.c +++ b/legacy/ecore/src/modules/immodules/xim/ecore_imf_xim.c @@ -108,6 +108,7 @@ static void xim_destroy_callback(XIM xim, XPointer call_data); #endif +#ifdef ENABLE_XIM static unsigned int utf8_offset_to_index(const char *str, int offset) { @@ -120,6 +121,7 @@ utf8_offset_to_index(const char *str, int offset) return index; } +#endif static void _ecore_imf_context_xim_add(Ecore_IMF_Context *ctx) @@ -233,6 +235,7 @@ _ecore_imf_context_xim_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx { EINA_LOG_DBG("in"); +#ifdef ENABLE_XIM Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx); _ecore_imf_context_xim_preedit_string_get(ctx, str, cursor_pos); @@ -260,6 +263,14 @@ _ecore_imf_context_xim_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx if (start >= 0) add_feedback_attr (attrs, *str, last_feedback, start, i); +#else + if(str) + *str = NULL; + if(attrs) + *attrs = NULL; + if(cursor_pos) + *cursor_pos = 0; +#endif } static void @@ -398,6 +409,7 @@ _ecore_imf_context_xim_use_preedit_set(Ecore_IMF_Context *ctx, #endif } +#ifdef ENABLE_XIM static void add_feedback_attr (Eina_List **attrs, const char *str, @@ -427,6 +439,7 @@ add_feedback_attr (Eina_List **attrs, if (feedback & XIMHighlight) attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB3; } +#endif static void _ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context *ctx,