From 0986cd681b57022765cc25ff02a4303470c8e0e9 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 30 Sep 2009 22:30:12 +0000 Subject: [PATCH] init some ptrs to null. SVN revision: 42823 --- .../src/lib/engines/common/evas_font_query.c | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/legacy/evas/src/lib/engines/common/evas_font_query.c b/legacy/evas/src/lib/engines/common/evas_font_query.c index 157f151129..c8ec397562 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -246,9 +246,8 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const char *in_text, int pos, #ifdef INTERNATIONAL_SUPPORT int len = 0; EvasIntlParType direction = FRIBIDI_TYPE_ON; - EvasIntlLevel *level_list; - EvasIntlStrIndex *logical_to_visual; - + EvasIntlLevel *level_list = NULL; + EvasIntlStrIndex *logical_to_visual = NULL; char *visual_text = evas_intl_utf8_to_visual(in_text, &len, &direction, &logical_to_visual, NULL, &level_list); text = (visual_text) ? visual_text : in_text; #endif @@ -385,9 +384,8 @@ evas_common_font_query_text_at_pos(RGBA_Font *fn, const char *in_text, int x, in #ifdef INTERNATIONAL_SUPPORT int len = 0; EvasIntlParType direction = FRIBIDI_TYPE_ON; - EvasIntlLevel *level_list; - EvasIntlStrIndex *visual_to_logical; - + EvasIntlLevel *level_list = NULL; + EvasIntlStrIndex *visual_to_logical = NULL; char *visual_text = evas_intl_utf8_to_visual(in_text, &len, &direction, NULL, &visual_to_logical, &level_list); text = (visual_text) ? visual_text : in_text; #endif @@ -472,14 +470,14 @@ evas_common_font_query_text_at_pos(RGBA_Font *fn, const char *in_text, int x, in int i; int logical_chr; int position = evas_intl_position_visual_to_logical(visual_to_logical, char_index); - /* ensure even if the list won't run */ pchr = 0; - for (logical_chr = 0, i = 0; i <= position; i++) { - pchr = logical_chr; - evas_common_font_utf8_get_next((unsigned char *)in_text, &logical_chr); - } + for (logical_chr = 0, i = 0; i <= position; i++) + { + pchr = logical_chr; + evas_common_font_utf8_get_next((unsigned char *)in_text, &logical_chr); + } } #endif ret_val = pchr; @@ -578,6 +576,7 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const char *text, int x, in } return -1; } + #if 0 /* last char pos of text at xy pos */ EAPI int @@ -598,9 +597,8 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const char *in_text, int x, #ifdef INTERNATIONAL_SUPPORT int len = 0; EvasIntlParType direction = FRIBIDI_TYPE_ON; - EvasIntlLevel *level_list; - EvasIntlStrIndex *visual_to_logical; - + EvasIntlLevel *level_list = NULL; + EvasIntlStrIndex *visual_to_logical = NULL; char *visual_text = evas_intl_utf8_to_visual(in_text, &len, &direction, NULL, &visual_to_logical, &level_list); text = (visual_text) ? visual_text : in_text; #endif @@ -683,7 +681,7 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const char *in_text, int x, */ int i; int logical_chr; - + /* ensure even if the list won't run */ pchr = 0; for (logical_chr = 0, i = 0; i <= char_index; i++) { @@ -711,4 +709,4 @@ end: return ret_val; } -#endif \ No newline at end of file +#endif