app-i18n/skkfep: add support for annotation
authorAkinori Hattori <hattya@gentoo.org>
Sun, 25 Jun 2017 05:21:20 +0000 (14:21 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Sun, 25 Jun 2017 05:21:20 +0000 (14:21 +0900)
Package-Manager: Portage-2.3.6, Repoman-2.3.1

app-i18n/skkfep/files/skkfep-annotation.patch [new file with mode: 0644]
app-i18n/skkfep/skkfep-0.87-r1.ebuild

diff --git a/app-i18n/skkfep/files/skkfep-annotation.patch b/app-i18n/skkfep/files/skkfep-annotation.patch
new file mode 100644 (file)
index 0000000..8145c2b
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/kkconv.c
++++ b/kkconv.c
+@@ -645,6 +645,7 @@
+ char c;
+ {
+       int l;
++      char *p;
+       DicList dlist;
+ 
+       kanjiSelectionEffect(0);
+@@ -653,7 +654,17 @@
+               if (OkuriInput)
+                       l += strlen(OkuriBuf);
+               csrLeft(l);
+-              writeShells(CurrentCand->candword);
++              p= strrchr(CurrentCand->candword,';');
++              if (p != NULL) {
++                      erase(l);
++                      csrLeft(l);
++                      l -= strlen(p);
++                      *p = '\0';
++                      writeShells(CurrentCand->candword);
++                      *p = ';';
++              } else {
++                      writeShells(CurrentCand->candword);
++              }
+               if (OkuriInput) {
+                       writeShells(OkuriBuf);
+               }
index a3e53f72d619e2133283f4374421d4e45052064f..a74c53e6af37c2addf59991514bc905660df495a 100644 (file)
@@ -23,6 +23,7 @@ RDEPEND="sys-libs/ncurses:=
 PATCHES=(
        "${FILESDIR}"/${PN}-gentoo.patch
        "${FILESDIR}"/${PN}-system-dic.patch
+       "${FILESDIR}"/${PN}-annotation.patch
 )
 DOCS=( README HISTORY TODO )