From 3dbe5210009c5328999362178544d143a8f7b992 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 16 Apr 2005 00:03:32 +0000 Subject: [PATCH] Include . --- src/word-thai.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/word-thai.c b/src/word-thai.c index bc11b71..83dde2e 100644 --- a/src/word-thai.c +++ b/src/word-thai.c @@ -20,6 +20,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#include + #include "config.h" #include "m17n-core.h" #include "m17n-misc.h" @@ -66,7 +68,7 @@ static MTextProperty * wordseg_propertize (MText *mt, int pos, int from, int to, unsigned char *tis) { gulong i, count; - MTextProperty *prop; + MTextProperty *prop = NULL; if (! word_vector) word_vector = wc_word_vector_new (); @@ -134,9 +136,9 @@ static MTextProperty * wordseg_propertize (MText *mt, int pos, int from, int to, unsigned char *tis) { int i, last; - MTextProperty *prop; + MTextProperty *prop = NULL; - wc_wordcut_cut (&wordcut, (char *) tis, &wordcut_result); + wordcut_cut (&wordcut, (char *) tis, &wordcut_result); wordcut_result_used = 1; for (i = 0, last = from; i < wordcut_result.count; i++) { @@ -154,7 +156,7 @@ wordseg_propertize (MText *mt, int pos, int from, int to, unsigned char *tis) M17N_OBJECT_UNREF (this); } - last = from + wordcut_result.start[i] + last = from + wordcut_result.start[i]; mtext_attach_property (mt, last, last + wordcut_result.offset[i], prop); if (pos >= last && pos < last + wordcut_result.offset[i]) prop = this; @@ -162,6 +164,7 @@ wordseg_propertize (MText *mt, int pos, int from, int to, unsigned char *tis) m17n_object_unref (prop); last += wordcut_result.offset[i]; } + return prop; } #else /* not HAVE_WORDCUT nor HAVE_WORDCUT_OLD */ -- 1.7.10.4