Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307, USA. */
+#include <stdio.h>
+
#include "config.h"
#include "m17n-core.h"
#include "m17n-misc.h"
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 ();
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++)
{
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;
m17n_object_unref (prop);
last += wordcut_result.offset[i];
}
+ return prop;
}
#else /* not HAVE_WORDCUT nor HAVE_WORDCUT_OLD */