diff -u anthy-9100e/debian/changelog anthy-9100e/debian/changelog --- anthy-9100e/debian/changelog +++ anthy-9100e/debian/changelog @@ -1,3 +1,11 @@ +anthy (9100e-3.1ubuntu1) intrepid; urgency=low + + [Ikuya Awashiro] + * debian/patches/debian: no necessity. removed. + * debian/patches/06_fix_vu_dpatch.dpatch: added (LP: #242667). + + -- Arne Goetje Wed, 25 Jun 2008 22:14:30 +0800 + anthy (9100e-3.1) unstable; urgency=low * Non-maintainer upload to fix pending l10n issues. diff -u anthy-9100e/debian/patches/00list anthy-9100e/debian/patches/00list --- anthy-9100e/debian/patches/00list +++ anthy-9100e/debian/patches/00list @@ -2,0 +3 @@ +06_fix_vu_dpatch reverted: --- anthy-9100e/debian/patches/debian/patches/03_change_anthy_dic_path.dpatch +++ anthy-9100e.orig/debian/patches/debian/patches/03_change_anthy_dic_path.dpatch @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 03_change_anthy_dic_path.dpatch by Masahito Omote -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad anthy-9100~/anthy-conf.in anthy-9100/anthy-conf.in ---- anthy-9100~/anthy-conf.in 2007-05-12 10:14:14.000000000 +0900 -+++ anthy-9100/anthy-conf.in 2007-07-08 03:01:11.546305624 +0900 -@@ -2,7 +2,7 @@ - prefix @prefix@ - datadir @datadir@ - ANTHYDIR @datadir@/anthy/ --DIC_FILE @datadir@/anthy/anthy.dic -+DIC_FILE /var/lib/anthy/anthy.dic - ZIPDICT_EUC @datadir@/anthy/zipcode.t - WORDS_FILE /usr/share/dict/words - # for compilation and testing only in patch2: unchanged: --- anthy-9100e.orig/debian/patches/06_fix_vu_dpatch.dpatch +++ anthy-9100e/debian/patches/06_fix_vu_dpatch.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_fix_vu_dpatch.dpatch by Ikuya Awashiro +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad anthy-9100e~/src-splitter/metaword.c anthy-9100e/src-splitter/metaword.c +--- anthy-9100e~/src-splitter/metaword.c 2007-06-17 23:27:38.000000000 +0000 ++++ anthy-9100e/src-splitter/metaword.c 2008-06-24 13:15:38.000000000 +0000 +@@ -17,6 +17,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -158,6 +159,17 @@ + xs_post->len = post_len; + } + ++static int ++count_vu(xstr *xs) { ++ int i, r = 0; ++ for (i = 0; i < xs->len; i++) { ++ if (xs->str[i] == KK_VU) { ++ r++; ++ } ++ } ++ return r; ++} ++ + /* + * 複合語であるwlからn番めの部分を取り出してmwにする + */ +@@ -177,8 +189,12 @@ + get_surrounding_text(sc, wl, &xs_pre, &xs_post); + + for (i = 0; i <= nth; ++i) { ++ xstr part; + from += len; + len = anthy_compound_get_nth_segment_len(ce, i); ++ part.str = sc->ce[from].c; ++ part.len = len; ++ len -= count_vu(&part); + if (i == 0) { + len += xs_pre.len; + } +@@ -742,7 +758,11 @@ + int len = mw ? mw->len : 0; + + /* metawordの直後の文字の種類を調べる */ +- int type = anthy_get_xchar_type(*sc->ce[from + len].c); ++ int type; ++ if (sc->char_count <= from + len) { ++ return ; ++ } ++ type = anthy_get_xchar_type(*sc->ce[from + len].c); + if (!(type & XCT_SYMBOL) && + !(type & XCT_PART)) { + return;