summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authortaca <taca>2002-11-23 16:56:02 +0000
committertaca <taca>2002-11-23 16:56:02 +0000
commit2bde2ce4a3081f83c99b4b2692597e8288b46e78 (patch)
tree743847d261239747a2a056e3889b9e891aabfe12 /editors
parentf70c98b4cd318230a7dd3bfdb6a73bc927688934 (diff)
downloadpkgsrc-2bde2ce4a3081f83c99b4b2692597e8288b46e78.tar.gz
Update tamago to 2002/9/9 version from CVS.
- Use last updated date for pacakge version. - Utilize emacs.mk. Now build problem on emacs 20.X was fixed. 2002-09-09 NIIBE Yutaka <gniibe@m17n.org> Check JIS x0213 support at compile time. * check-jisx0213.el: New file. * configure.in: Check if JIS X0213 is supported or not. * Makefile.in (TOPSRCS): Remove egg-x0213.el. (DEPS): Don't load jisx0213.el. (ITSSRCS): Removed its/aynu.el. (AYNU): New variable. Bug fix. * its/thai.el (its-thai-add-vowel, its-thai-add-tone): Bug fixes. Just call compose-string.
Diffstat (limited to 'editors')
-rw-r--r--editors/tamago/Makefile12
-rw-r--r--editors/tamago/PLIST142
-rw-r--r--editors/tamago/distinfo4
-rw-r--r--editors/tamago/patches/patch-aa7687
4 files changed, 4043 insertions, 3802 deletions
diff --git a/editors/tamago/Makefile b/editors/tamago/Makefile
index 3b1c4e1dee8..35f946fc360 100644
--- a/editors/tamago/Makefile
+++ b/editors/tamago/Makefile
@@ -1,17 +1,17 @@
-# $NetBSD: Makefile,v 1.5 2002/09/04 14:42:41 taca Exp $
+# $NetBSD: Makefile,v 1.6 2002/11/23 16:56:02 taca Exp $
DISTNAME= tamago-4.0.6
-PKGREVISION= 1
+PKGNAME= tamago-20020909
CATEGORIES= editors
MASTER_SITES= ftp://www.m17n.org/pub/tamago/
MAINTAINER= tech-pkg-ja@jp.netbsd.org
HOMEPAGE= http://www.m17n.org/tamago/
-COMMENT= CJK characters inputting system for emacs-20+leim
-
-DEPENDS+= emacs>=20.2:../../editors/emacs
-DEPENDS+= leim>=20.2:../../editors/leim
+COMMENT= CJK characters inputting system for emacs + leim
GNU_CONFIGURE= yes
+# XXX please someone adjust paths and PLIST for XEmacs...
+EMACS_VERSIONS_ACCEPTED= emacs21 emacs20
+.include "../../mk/emacs.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/editors/tamago/PLIST b/editors/tamago/PLIST
index 542502dafcf..f1ee6a27797 100644
--- a/editors/tamago/PLIST
+++ b/editors/tamago/PLIST
@@ -1,72 +1,70 @@
-@comment $NetBSD: PLIST,v 1.2 2002/09/04 14:42:41 taca Exp $
-share/emacs/site-lisp/egg/egg-cnv.el
-share/emacs/site-lisp/egg/egg-cnv.elc
-share/emacs/site-lisp/egg/egg-com.el
-share/emacs/site-lisp/egg/egg-com.elc
-share/emacs/site-lisp/egg/egg-edep.el
-share/emacs/site-lisp/egg/egg-edep.elc
-share/emacs/site-lisp/egg/egg-mlh.el
-share/emacs/site-lisp/egg/egg-mlh.elc
-share/emacs/site-lisp/egg/egg-sim.el
-share/emacs/site-lisp/egg/egg-sim.elc
-share/emacs/site-lisp/egg/egg-x0213.el
-share/emacs/site-lisp/egg/egg-x0213.elc
-share/emacs/site-lisp/egg/egg.el
-share/emacs/site-lisp/egg/egg.elc
-share/emacs/site-lisp/egg/egg/anthy.el
-share/emacs/site-lisp/egg/egg/anthy.elc
-share/emacs/site-lisp/egg/egg/anthyipc.el
-share/emacs/site-lisp/egg/egg/anthyipc.elc
-share/emacs/site-lisp/egg/egg/canna.el
-share/emacs/site-lisp/egg/egg/canna.elc
-share/emacs/site-lisp/egg/egg/cannarpc.el
-share/emacs/site-lisp/egg/egg/cannarpc.elc
-share/emacs/site-lisp/egg/egg/sj3.el
-share/emacs/site-lisp/egg/egg/sj3.elc
-share/emacs/site-lisp/egg/egg/sj3rpc.el
-share/emacs/site-lisp/egg/egg/sj3rpc.elc
-share/emacs/site-lisp/egg/egg/wnn.el
-share/emacs/site-lisp/egg/egg/wnn.elc
-share/emacs/site-lisp/egg/egg/wnnrpc.el
-share/emacs/site-lisp/egg/egg/wnnrpc.elc
-share/emacs/site-lisp/egg/eggrc
-share/emacs/site-lisp/egg/its-keydef.el
-share/emacs/site-lisp/egg/its-keydef.elc
-share/emacs/site-lisp/egg/its.el
-share/emacs/site-lisp/egg/its.elc
-share/emacs/site-lisp/egg/its/ascii.el
-share/emacs/site-lisp/egg/its/ascii.elc
-share/emacs/site-lisp/egg/its/aynu.el
-share/emacs/site-lisp/egg/its/aynu.elc
-share/emacs/site-lisp/egg/its/bixing.el
-share/emacs/site-lisp/egg/its/bixing.elc
-share/emacs/site-lisp/egg/its/erpin.el
-share/emacs/site-lisp/egg/its/erpin.elc
-share/emacs/site-lisp/egg/its/greek.el
-share/emacs/site-lisp/egg/its/greek.elc
-share/emacs/site-lisp/egg/its/hangul.el
-share/emacs/site-lisp/egg/its/hangul.elc
-share/emacs/site-lisp/egg/its/hankata.el
-share/emacs/site-lisp/egg/its/hankata.elc
-share/emacs/site-lisp/egg/its/hira.el
-share/emacs/site-lisp/egg/its/hira.elc
-share/emacs/site-lisp/egg/its/jeonkak.el
-share/emacs/site-lisp/egg/its/jeonkak.elc
-share/emacs/site-lisp/egg/its/kata.el
-share/emacs/site-lisp/egg/its/kata.elc
-share/emacs/site-lisp/egg/its/pinyin.el
-share/emacs/site-lisp/egg/its/pinyin.elc
-share/emacs/site-lisp/egg/its/quanjiao.el
-share/emacs/site-lisp/egg/its/quanjiao.elc
-share/emacs/site-lisp/egg/its/thai.el
-share/emacs/site-lisp/egg/its/thai.elc
-share/emacs/site-lisp/egg/its/zenkaku.el
-share/emacs/site-lisp/egg/its/zenkaku.elc
-share/emacs/site-lisp/egg/its/zhuyin.el
-share/emacs/site-lisp/egg/its/zhuyin.elc
-share/emacs/site-lisp/egg/leim-list.el
-share/emacs/site-lisp/egg/menudiag.el
-share/emacs/site-lisp/egg/menudiag.elc
-@dirrm share/emacs/site-lisp/egg/egg
-@dirrm share/emacs/site-lisp/egg/its
-@dirrm share/emacs/site-lisp/egg
+@comment $NetBSD: PLIST,v 1.3 2002/11/23 16:56:02 taca Exp $
+${EMACS_LISPPREFIX}/egg/egg-cnv.el
+${EMACS_LISPPREFIX}/egg/egg-cnv.elc
+${EMACS_LISPPREFIX}/egg/egg-com.el
+${EMACS_LISPPREFIX}/egg/egg-com.elc
+${EMACS_LISPPREFIX}/egg/egg-edep.el
+${EMACS_LISPPREFIX}/egg/egg-edep.elc
+${EMACS_LISPPREFIX}/egg/egg-mlh.el
+${EMACS_LISPPREFIX}/egg/egg-mlh.elc
+${EMACS_LISPPREFIX}/egg/egg-sim.el
+${EMACS_LISPPREFIX}/egg/egg-sim.elc
+${EMACS_LISPPREFIX}/egg/egg.el
+${EMACS_LISPPREFIX}/egg/egg.elc
+${EMACS_LISPPREFIX}/egg/egg/anthy.el
+${EMACS_LISPPREFIX}/egg/egg/anthy.elc
+${EMACS_LISPPREFIX}/egg/egg/anthyipc.el
+${EMACS_LISPPREFIX}/egg/egg/anthyipc.elc
+${EMACS_LISPPREFIX}/egg/egg/canna.el
+${EMACS_LISPPREFIX}/egg/egg/canna.elc
+${EMACS_LISPPREFIX}/egg/egg/cannarpc.el
+${EMACS_LISPPREFIX}/egg/egg/cannarpc.elc
+${EMACS_LISPPREFIX}/egg/egg/sj3.el
+${EMACS_LISPPREFIX}/egg/egg/sj3.elc
+${EMACS_LISPPREFIX}/egg/egg/sj3rpc.el
+${EMACS_LISPPREFIX}/egg/egg/sj3rpc.elc
+${EMACS_LISPPREFIX}/egg/egg/wnn.el
+${EMACS_LISPPREFIX}/egg/egg/wnn.elc
+${EMACS_LISPPREFIX}/egg/egg/wnnrpc.el
+${EMACS_LISPPREFIX}/egg/egg/wnnrpc.elc
+${EMACS_LISPPREFIX}/egg/eggrc
+${EMACS_LISPPREFIX}/egg/its-keydef.el
+${EMACS_LISPPREFIX}/egg/its-keydef.elc
+${EMACS_LISPPREFIX}/egg/its.el
+${EMACS_LISPPREFIX}/egg/its.elc
+${EMACS_LISPPREFIX}/egg/its/ascii.el
+${EMACS_LISPPREFIX}/egg/its/ascii.elc
+${FOR_emacs21}${EMACS_LISPPREFIX}/egg/its/aynu.el
+${FOR_emacs21}${EMACS_LISPPREFIX}/egg/its/aynu.elc
+${EMACS_LISPPREFIX}/egg/its/bixing.el
+${EMACS_LISPPREFIX}/egg/its/bixing.elc
+${EMACS_LISPPREFIX}/egg/its/erpin.el
+${EMACS_LISPPREFIX}/egg/its/erpin.elc
+${EMACS_LISPPREFIX}/egg/its/greek.el
+${EMACS_LISPPREFIX}/egg/its/greek.elc
+${EMACS_LISPPREFIX}/egg/its/hangul.el
+${EMACS_LISPPREFIX}/egg/its/hangul.elc
+${EMACS_LISPPREFIX}/egg/its/hankata.el
+${EMACS_LISPPREFIX}/egg/its/hankata.elc
+${EMACS_LISPPREFIX}/egg/its/hira.el
+${EMACS_LISPPREFIX}/egg/its/hira.elc
+${EMACS_LISPPREFIX}/egg/its/jeonkak.el
+${EMACS_LISPPREFIX}/egg/its/jeonkak.elc
+${EMACS_LISPPREFIX}/egg/its/kata.el
+${EMACS_LISPPREFIX}/egg/its/kata.elc
+${EMACS_LISPPREFIX}/egg/its/pinyin.el
+${EMACS_LISPPREFIX}/egg/its/pinyin.elc
+${EMACS_LISPPREFIX}/egg/its/quanjiao.el
+${EMACS_LISPPREFIX}/egg/its/quanjiao.elc
+${EMACS_LISPPREFIX}/egg/its/thai.el
+${EMACS_LISPPREFIX}/egg/its/thai.elc
+${EMACS_LISPPREFIX}/egg/its/zenkaku.el
+${EMACS_LISPPREFIX}/egg/its/zenkaku.elc
+${EMACS_LISPPREFIX}/egg/its/zhuyin.el
+${EMACS_LISPPREFIX}/egg/its/zhuyin.elc
+${EMACS_LISPPREFIX}/egg/leim-list.el
+${EMACS_LISPPREFIX}/egg/menudiag.el
+${EMACS_LISPPREFIX}/egg/menudiag.elc
+@dirrm ${EMACS_LISPPREFIX}/egg/egg
+@dirrm ${EMACS_LISPPREFIX}/egg/its
+@dirrm ${EMACS_LISPPREFIX}/egg
diff --git a/editors/tamago/distinfo b/editors/tamago/distinfo
index e554fa38690..3aca3686c28 100644
--- a/editors/tamago/distinfo
+++ b/editors/tamago/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.3 2002/09/04 14:42:41 taca Exp $
+$NetBSD: distinfo,v 1.4 2002/11/23 16:56:02 taca Exp $
SHA1 (tamago-4.0.6.tar.gz) = f1ae53cbcdeb5f2aad9d90d75742efe2fcd83d39
Size (tamago-4.0.6.tar.gz) = 260021 bytes
-SHA1 (patch-aa) = 07aa6095dca4edacc615206ffd76482485d61616
+SHA1 (patch-aa) = 21d8bfed2478c8c49f366f49a7409c704799c5b2
diff --git a/editors/tamago/patches/patch-aa b/editors/tamago/patches/patch-aa
index e5f4bcde0e5..36ab651b25e 100644
--- a/editors/tamago/patches/patch-aa
+++ b/editors/tamago/patches/patch-aa
@@ -1,8 +1,13 @@
-$NetBSD: patch-aa,v 1.4 2002/09/04 14:42:42 taca Exp $
+$NetBSD: patch-aa,v 1.5 2002/11/23 16:56:02 taca Exp $
-diff -duNrp ../tamago-4.0.6/AUTHORS ./AUTHORS
---- ../tamago-4.0.6/AUTHORS Tue Jan 4 15:25:54 2000
-+++ ./AUTHORS Wed Sep 4 22:59:10 2002
+Index: AUTHORS
+===================================================================
+RCS file: /cvs/tamago/tamago/AUTHORS,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- AUTHORS 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ AUTHORS 23 Aug 2002 07:46:38 -0000 1.2
@@ -4,16 +4,17 @@ KAWABATA, Taichi <kawabata@exa.onlab.nt
MORIOKA Tomohiko <tomo@etl.go.jp>
Use of custom.
@@ -26,10 +31,15 @@ diff -duNrp ../tamago-4.0.6/AUTHORS ./AUTHORS
KATAYAMA Yoshio <kate@pfu.co.jp>
Design ITS programming.
-diff -duNrp ../tamago-4.0.6/ChangeLog ./ChangeLog
---- ../tamago-4.0.6/ChangeLog Mon Jan 17 09:48:50 2000
-+++ ./ChangeLog Wed Sep 4 22:59:10 2002
-@@ -1,156 +1,46 @@
+Index: ChangeLog
+===================================================================
+RCS file: /cvs/tamago/tamago/ChangeLog,v
+retrieving revision 1.1.1.5
+retrieving revision 1.14
+diff -d -u -p -r1.1.1.5 -r1.14
+--- ChangeLog 27 Jan 2001 18:46:59 -0000 1.1.1.5
++++ ChangeLog 9 Sep 2002 08:50:42 -0000 1.14
+@@ -1,156 +1,60 @@
-2000-01-17 TOMURA Satoru <tomura@etl.go.jp>
-
- * Version 4.0.6 released
@@ -106,12 +116,23 @@ diff -duNrp ../tamago-4.0.6/ChangeLog ./ChangeLog
-
- * egg/sj3.el (sj3-server-coding-system-list): New user option.
- (sj3-server-version): Ditto.
--
++2002-09-09 NIIBE Yutaka <gniibe@m17n.org>
+
-2000-01-13 SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
--
++ Check JIS x0213 support at compile time.
++ * check-jisx0213.el: New file.
++ * configure.in: Check if JIS X0213 is supported or not.
++ * Makefile.in (TOPSRCS): Remove egg-x0213.el.
++ (DEPS): Don't load jisx0213.el.
++ (ITSSRCS): Removed its/aynu.el.
++ (AYNU): New variable.
+
- * its.el: typo
- * egg.el: typo
--
++ Bug fix.
++ * its/thai.el (its-thai-add-vowel, its-thai-add-tone): Bug fixes.
++ Just call compose-string.
+
-2000-01-13 KATAYAMA Yoshio <kate@pfu.co.jp>
+2002-08-26 ISHIKAWA Mutsumi <ishikawa@linux.or.jp>,
+ Takahiro Kambe <taca@sky.yamashina.kyoto.jp>,
@@ -216,9 +237,12 @@ diff -duNrp ../tamago-4.0.6/ChangeLog ./ChangeLog
+ substitute key definitions for `next-line' and `previous-line'
+ with them in `its-mode-map'.
-diff -duNrp ../tamago-4.0.6/ChangeLog.0 ./ChangeLog.0
---- ../tamago-4.0.6/ChangeLog.0 Tue Jan 4 15:27:16 2000
-+++ ./ChangeLog.0 Thu Jan 1 09:00:00 1970
+Index: ChangeLog.0
+===================================================================
+RCS file: ChangeLog.0
+diff -N ChangeLog.0
+--- ChangeLog.0 27 Jan 2001 18:46:16 -0000 1.1.1.1
++++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,2311 +0,0 @@
-1998-07-12 NIIBE Yutaka <gniibe@chroot.org>
-
@@ -2531,9 +2555,12 @@ diff -duNrp ../tamago-4.0.6/ChangeLog.0 ./ChangeLog.0
-1997-02-13 NIIBE Yutaka <gniibe@akebono.etl.go.jp>
-
- * menu.el (menu:select-from-menu): Rewritten.
-diff -duNrp ../tamago-4.0.6/ChangeLog.1997-1998 ./ChangeLog.1997-1998
---- ../tamago-4.0.6/ChangeLog.1997-1998 Thu Jan 1 09:00:00 1970
-+++ ./ChangeLog.1997-1998 Mon Aug 26 08:53:10 2002
+Index: ChangeLog.1997-1998
+===================================================================
+RCS file: ChangeLog.1997-1998
+diff -N ChangeLog.1997-1998
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ChangeLog.1997-1998 25 Aug 2002 23:53:10 -0000 1.1
@@ -0,0 +1,2311 @@
+1998-07-12 NIIBE Yutaka <gniibe@chroot.org>
+
@@ -4846,9 +4873,12 @@ diff -duNrp ../tamago-4.0.6/ChangeLog.1997-1998 ./ChangeLog.1997-1998
+1997-02-13 NIIBE Yutaka <gniibe@akebono.etl.go.jp>
+
+ * menu.el (menu:select-from-menu): Rewritten.
-diff -duNrp ../tamago-4.0.6/ChangeLog.2000-2001 ./ChangeLog.2000-2001
---- ../tamago-4.0.6/ChangeLog.2000-2001 Thu Jan 1 09:00:00 1970
-+++ ./ChangeLog.2000-2001 Mon Aug 26 08:55:41 2002
+Index: ChangeLog.2000-2001
+===================================================================
+RCS file: ChangeLog.2000-2001
+diff -N ChangeLog.2000-2001
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ChangeLog.2000-2001 25 Aug 2002 23:55:41 -0000 1.2
@@ -0,0 +1,371 @@
+2001-12-01 ?
+
@@ -5221,9 +5251,14 @@ diff -duNrp ../tamago-4.0.6/ChangeLog.2000-2001 ./ChangeLog.2000-2001
+ * Version 4.0.0 released.
+
+
-diff -duNrp ../tamago-4.0.6/Makefile.in ./Makefile.in
---- ../tamago-4.0.6/Makefile.in Sun Jan 16 00:39:09 2000
-+++ ./Makefile.in Wed Sep 4 22:59:10 2002
+Index: Makefile.in
+===================================================================
+RCS file: /cvs/tamago/tamago/Makefile.in,v
+retrieving revision 1.1.1.4
+retrieving revision 1.6
+diff -d -u -p -r1.1.1.4 -r1.6
+--- Makefile.in 27 Jan 2001 18:46:59 -0000 1.1.1.4
++++ Makefile.in 9 Sep 2002 08:50:42 -0000 1.6
@@ -8,6 +8,10 @@
.SUFFIXES:
SHELL = @SHELL@
@@ -5240,38 +5275,52 @@ diff -duNrp ../tamago-4.0.6/Makefile.in ./Makefile.in
# ;; ex. /usr/local/share/emacs/site-lisp/egg
-DEPS = -l ./docomp.el
-+DEPS = -l $(top_srcdir)/docomp.el -l $(top_srcdir)/jisx0213.el
++DEPS = -l $(top_srcdir)/docomp.el
BATCHFLAGS = -batch -q -no-site-file -no-init-file
ETCS = Makefile docomp.el \
-@@ -46,9 +50,9 @@ TOPSRCS = \
+@@ -46,7 +50,6 @@ TOPSRCS = \
egg-edep.el \
egg-com.el \
egg-cnv.el \
- egg-util.el \
egg-mlh.el \
egg-sim.el \
-+ egg-x0213.el \
menudiag.el \
- its.el \
- its-keydef.el \
-@@ -58,12 +62,15 @@ EGGSRCS = \
+@@ -58,12 +61,16 @@ EGGSRCS = \
egg/cannarpc.el egg/canna.el \
egg/sj3rpc.el egg/sj3.el \
egg/wnnrpc.el egg/wnn.el \
+ egg/anthyipc.el egg/anthy.el
#
++AYNU = @HAVE_JISX0213@ its/aynu.el
++
ITSSRCS = \
its/ascii.el \
-+ its/aynu.el \
its/bixing.el \
its/erpin.el \
+ its/greek.el \
its/hankata.el \
its/hira.el \
its/jeonkak.el \
-@@ -138,9 +145,7 @@ uninstall-site:
+@@ -74,6 +81,7 @@ ITSSRCS = \
+ its/quanjiao.el \
+ its/zenkaku.el \
+ its/zhuyin.el \
++ ${AYNU}
+
+ #
+ ELCS = ${SRCS:.el=.elc}
+@@ -86,6 +94,7 @@ ITSELCS = ${ITSSRCS:.el=.elc}
+
+ DIST = ${ETCS} ${SRCS} ${INITELS}
+
++
+ all: ${ELCS}
+
+ .SUFFIXES: .el .elc
+@@ -138,9 +147,7 @@ uninstall-site:
egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
@@ -5283,2960 +5332,80 @@ diff -duNrp ../tamago-4.0.6/Makefile.in ./Makefile.in
its/zenkaku.elc its/zhuyin.elc: its-keydef.elc
-
-
-diff -duNrp ../tamago-4.0.6/egg/anthy.el ./egg/anthy.el
---- ../tamago-4.0.6/egg/anthy.el Thu Jan 1 09:00:00 1970
-+++ ./egg/anthy.el Thu Aug 8 17:11:22 2002
-@@ -0,0 +1,220 @@
-+;;; egg/anthy.el --- ANTHY Support (high level interface) in Egg
-+;;; Input Method Architecture
-+
-+;; Copyright (C) 2002 The Free Software Initiative of Japan
-+
-+;; Author: NIIBE Yutaka <gniibe@m17n.org>
-+
-+;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
-+
-+;; Keywords: mule, multilingual, input method
-+
-+;; This file is part of EGG.
-+
-+;; EGG is free software; you can redistribute it and/or modify
-+;; it under the terms of the GNU General Public License as published by
-+;; the Free Software Foundation; either version 2, or (at your option)
-+;; any later version.
-+
-+;; EGG is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with GNU Emacs; see the file COPYING. If not, write to the
-+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+;; Boston, MA 02111-1307, USA.
-+
-+;;; Commentary:
-+
-+
-+;;; Code:
-+
-+(require 'egg)
-+(require 'egg-edep)
-+
-+(defgroup anthy nil
-+ "Anthy interface for Tamago 4."
-+ :group 'egg)
-+
-+(setplist 'anthy-conversion-backend
-+ '(egg-start-conversion anthy-convert
-+ egg-get-bunsetsu-source anthy-get-bunsetsu-source
-+ egg-get-bunsetsu-converted anthy-get-bunsetsu-converted
-+ egg-list-candidates anthy-get-candidates
-+ egg-decide-candidate anthy-select-candidate
-+ egg-change-bunsetsu-length anthy-resize-segment
-+ egg-end-conversion anthy-commit
-+ ;;
-+ egg-get-source-language anthy-get-source-language
-+ egg-get-converted-language anthy-get-converted-language))
-+
-+(defconst anthy-backend-alist '((Japanese ((anthy-conversion-backend)))))
-+
-+(egg-set-finalize-backend '(anthy-finalize-backend))
-+
-+(defvar anthy-proc nil
-+ "Process of ANTHY helper agent.")
-+
-+;; <environments> ::= ( <env> ... <env> )
-+;;
-+;; <env> ::= <context-descriptor>
-+;; <context-descriptor> ::= <integer>
-+(defvar anthy-environment-pool nil
-+ "Environments for ANTHY kana-kanji conversion, to be used.")
-+
-+(defvar anthy-environments-in-use nil
-+ "Environments for ANTHY kana-kanji conversion, in use.")
-+
-+;;
-+;; <anthy-bunsetsu> ::=
-+;; [ <env> <source> <converted> <candidates> <candidate-pos> <seg-no> ]
-+(defsubst anthy-make-bunsetsu (env source converted seg-no)
-+ (egg-bunsetsu-create
-+ 'anthy-conversion-backend
-+ (vector env source converted nil 0 seg-no)))
-+
-+(defsubst anthybunsetsu-get-env (b)
-+ (aref (egg-bunsetsu-get-info b) 0))
-+(defsubst anthybunsetsu-get-source (b)
-+ (aref (egg-bunsetsu-get-info b) 1))
-+(defsubst anthybunsetsu-get-converted (b)
-+ (aref (egg-bunsetsu-get-info b) 2))
-+(defsubst anthybunsetsu-get-candidates (b)
-+ (aref (egg-bunsetsu-get-info b) 3))
-+(defsubst anthybunsetsu-set-candidates (b z)
-+ (aset (egg-bunsetsu-get-info b) 3 z))
-+(defsubst anthybunsetsu-get-candidate-pos (b)
-+ (aref (egg-bunsetsu-get-info b) 4))
-+(defsubst anthybunsetsu-set-candidate-pos (b zp)
-+ (aset (egg-bunsetsu-get-info b) 4 zp))
-+(defsubst anthybunsetsu-get-seg-no (b)
-+ (aref (egg-bunsetsu-get-info b) 5))
-+
-+(defun anthy-get-bunsetsu-source (b)
-+ (anthybunsetsu-get-source b))
-+
-+(defun anthy-get-bunsetsu-converted (b)
-+ (let ((cands (anthybunsetsu-get-candidates b)))
-+ (if cands
-+ (nth (anthybunsetsu-get-candidate-pos b) cands)
-+ (anthybunsetsu-get-converted b))))
-+
-+(defun anthy-get-source-language (b) 'Japanese)
-+(defun anthy-get-converted-language (b) 'Japanese)
-+
-+;; Getting new context-descriptor, and returns environment with 'inuse' bit
-+(defun anthy-new-environment ()
-+ (if (null anthy-proc)
-+ (let ((buf (generate-new-buffer " *ANTHY*"))
-+ (process-connection-type nil)) ; avoid using pty
-+ (setq anthy-proc
-+ (start-process "anthy-agent" buf "anthy-agent" "--egg"))
-+ (process-kill-without-query anthy-proc)
-+ (set-process-coding-system anthy-proc 'euc-jp-dos 'euc-jp-dos)
-+ (set-process-sentinel anthy-proc 'anthy-proc-sentinel)
-+ (set-marker-insertion-type (process-mark anthy-proc) t)
-+ (save-excursion
-+ (set-buffer buf)
-+ (erase-buffer)
-+ (buffer-disable-undo))))
-+ (anthyipc-get-greeting anthy-proc)
-+ (anthyipc-new-context anthy-proc))
-+
-+;;; XXX: Don't kill buffer (for now) so that I can debug this program
-+(defun anthy-proc-sentinel (proc reason)
-+; (kill-buffer (process-buffer proc))
-+ (setq anthy-proc nil
-+ anthy-environments-in-use nil
-+ anthy-environment-pool nil))
-+
-+;;; anthyipc-release-context
-+
-+
-+(defun anthy-get-environment ()
-+ "Return the ANTHY environment."
-+ (if anthy-environment-pool
-+ (let ((env (car anthy-environment-pool)))
-+ (setq anthy-environment-pool (cdr anthy-environment-pool))
-+ (setq anthy-environments-in-use (cons env anthy-environments-in-use))
-+ env)
-+ (let ((env (anthy-new-environment)))
-+ (setq anthy-environments-in-use (cons env anthy-environments-in-use))
-+ env)))
-+
-+;;
-+;; Returns list of bunsetsu
-+;;
-+(defun anthy-convert (backend yomi &optional context)
-+ "Convert YOMI string to kanji, and enter conversion mode.
-+Return the list of bunsetsu."
-+ (let ((env (anthy-get-environment)))
-+ (anthyipc-convert anthy-proc env yomi)))
-+
-+;;
-+;;
-+;;
-+(defun anthy-commit (bunsetsu-list abort)
-+ (let ((env (anthybunsetsu-get-env (car bunsetsu-list))))
-+ (anthyipc-commit anthy-proc env (if abort 1 0))
-+ (setq anthy-environment-pool (cons env anthy-environment-pool))
-+ (setq anthy-environments-in-use (delq env anthy-environments-in-use))))
-+
-+;;
-+;; Returns ( <pos> <candidates> )
-+;;
-+(defun anthy-get-candidates (bunsetsu-list prev-bunsetsu next-bunsetsu major)
-+ (let ((bunsetsu (car bunsetsu-list)))
-+ (if (anthybunsetsu-get-candidates bunsetsu)
-+ (cons (anthybunsetsu-get-candidate-pos bunsetsu)
-+ (anthybunsetsu-get-candidates bunsetsu))
-+ (let* ((env (anthybunsetsu-get-env bunsetsu))
-+ (seg-no (anthybunsetsu-get-seg-no bunsetsu))
-+ (cands (anthyipc-get-candidates anthy-proc env seg-no)))
-+ (cons (anthybunsetsu-set-candidate-pos bunsetsu 0)
-+ (anthybunsetsu-set-candidates bunsetsu cands))))))
-+
-+;; Returns list of list of bunsetsu
-+(defun anthy-select-candidate (bunsetsu-list candidate-pos prev-b next-b)
-+ (let* ((bunsetsu (car bunsetsu-list))
-+ (candidate-list (anthybunsetsu-get-candidates bunsetsu))
-+ (candidate (nth candidate-pos candidate-list))
-+ (env (anthybunsetsu-get-env bunsetsu))
-+ (seg-no (anthybunsetsu-get-seg-no bunsetsu)))
-+ (anthybunsetsu-set-candidate-pos bunsetsu candidate-pos)
-+ ;; Anthy doesn't have capability of changing another segment
-+ ;; at the selection of a segment.
-+ ;; So, just ignore the result of "SELECT-CANDIDATE"
-+ (anthyipc-select-candidate anthy-proc env seg-no candidate-pos)
-+ (list (list bunsetsu))))
-+
-+;; Returns list of list of bunsetsu
-+(defun anthy-resize-segment (bunsetsu-list prev-b next-b len major)
-+ (let ((bunsetsu (car bunsetsu-list)))
-+ (let ((env (anthybunsetsu-get-env bunsetsu))
-+ (seg-no (anthybunsetsu-get-seg-no bunsetsu))
-+ (prevlen (length (anthybunsetsu-get-source bunsetsu))))
-+ (let ((r (anthyipc-resize-segment anthy-proc env seg-no
-+ (if (< prevlen len) 0 1))))
-+ ;; XXX: I don't know what this means,
-+ ;; but this works. Blame EGG.
-+ (list (list (car r)) nil (cdr r))))))
-+
-+(defun anthy-finalize-backend ()
-+ (if anthy-proc
-+ (progn
-+ (delete-process anthy-proc)
-+ (setq anthy-proc nil))))
-+
-+;;; setup
-+
-+(load "egg/anthyipc")
-+(run-hooks 'anthy-load-hook)
-+
-+;;;###autoload
-+(defun egg-activate-anthy (&rest arg)
-+ "Activate ANTHY backend of Tamago 4."
-+ (apply 'egg-mode (append arg anthy-backend-alist)))
-+
-+;;; egg/anthy.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/anthyipc.el ./egg/anthyipc.el
---- ../tamago-4.0.6/egg/anthyipc.el Thu Jan 1 09:00:00 1970
-+++ ./egg/anthyipc.el Thu Aug 8 16:28:41 2002
-@@ -0,0 +1,195 @@
-+;;; egg/anthyipc.el --- ANTHY IPC Support (low level interface) in Egg
-+;;; Input Method Architecture
-+
-+;; Copyright (C) 2002 The Free Software Initiative of Japan
-+
-+;; Author: NIIBE Yutaka <gniibe@m17n.org>
-+
-+;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
-+
-+;; Keywords: mule, multilingual, input method
-+
-+;; This file is part of EGG.
-+
-+;; EGG is free software; you can redistribute it and/or modify
-+;; it under the terms of the GNU General Public License as published by
-+;; the Free Software Foundation; either version 2, or (at your option)
-+;; any later version.
-+
-+;; EGG is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with GNU Emacs; see the file COPYING. If not, write to the
-+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+;; Boston, MA 02111-1307, USA.
-+
-+;;; Commentary:
-+
-+
-+;;; Code:
-+
-+(defmacro anthyipc-call-with-proc (proc vlist send-expr &rest receive-exprs)
-+ `(let* ((proc ,proc)
-+ (buffer (process-buffer proc))
-+ ,@vlist)
-+ (if (and (eq (process-status proc) 'run)
-+ (buffer-live-p buffer))
-+ (save-excursion
-+ (set-buffer buffer)
-+ (erase-buffer)
-+ ,send-expr
-+ (goto-char (point-max))
-+ (process-send-region proc (point-min) (point-max))
-+ ,@receive-exprs)
-+ (egg-error "process %s was killed" proc))))
-+
-+(defun anthyipc-wait-line ()
-+ (let ((start (point)))
-+ (while (not (search-forward "\n" nil 1))
-+ (accept-process-output proc 1000)
-+ (goto-char start))
-+ (goto-char start)))
-+
-+(defun anthyipc-accept-ok ()
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?+)
-+ ;; "+OK"
-+ (goto-char (point-max))
-+ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
-+
-+(defun anthyipc-accept-number ()
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?+)
-+ ;; "+OK <number>"
-+ (progn
-+ (forward-char 4)
-+ (prog1
-+ (read (current-buffer))
-+ (goto-char (point-max))))
-+ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
-+
-+(defun anthyipc-read-string ()
-+ (if (eq (char-after) ?\ )
-+ (forward-char 1))
-+ (let ((start (point)))
-+ (while (and (char-after)
-+ (not (eq (char-after) ?\ ))
-+ (not (eq (char-after) ?\n)))
-+ (forward-char 1))
-+ (buffer-substring start (point))))
-+
-+(defun anthyipc-accept-segments (env seg-no-orig)
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?+)
-+ (progn
-+ (forward-char 1)
-+ (if (eq (char-after) ?O)
-+ ;; "+OK"
-+ (progn
-+ (goto-char (point-max))
-+ t)
-+ ;; "+DATA <seg-no> <num-segments-removed> <num-segments-inserted>"
-+ ;; "<num-candidates> <converted> <yomi>"*N
-+ ;; ""
-+ ;;
-+ (forward-char 5)
-+ (let* ((seg-no (read (current-buffer)))
-+ (num-segments-removed (read (current-buffer)))
-+ (num-segments-inserted (read (current-buffer)))
-+ (segment-list nil)
-+ (in-loop t)
-+ (i seg-no))
-+ (while in-loop
-+ (forward-char 1)
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?\n)
-+ (setq in-loop nil)
-+ (let* ((num-candidates (read (current-buffer)))
-+ (converted (anthyipc-read-string))
-+ (source (anthyipc-read-string))
-+ (segment (anthy-make-bunsetsu env source converted i)))
-+ (setq i (1+ i))
-+ (setq segment-list (cons segment segment-list)))))
-+ ;; XXX check if seg-no == seg-no-orig
-+ ;; XXX check inserted and length of segment-list???
-+ (forward-char 1)
-+ (cons seg-no (cons num-segments-removed (reverse segment-list))))))
-+ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
-+
-+(defun anthyipc-accept-candidates ()
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?+)
-+ (progn
-+ ;; "+DATA <offset> <num-candidates>"
-+ ;; "<converted>"*N
-+ ;; ""
-+ (forward-char 6)
-+ (let* ((offset (read (current-buffer)))
-+ (num-candidates (read (current-buffer)))
-+ (candidate-list nil)
-+ (in-loop t))
-+ (while in-loop
-+ (forward-char 1)
-+ (anthyipc-wait-line)
-+ (if (eq (char-after) ?\n)
-+ (setq in-loop nil)
-+ (let ((candidate (anthyipc-read-string)))
-+ (setq candidate-list (cons candidate candidate-list)))))
-+ ;; XXX check num-candidates and length of candidate-list???
-+ (forward-char 1)
-+ (cons offset (reverse candidate-list))))
-+ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
-+
-+(defun anthyipc-get-greeting (proc)
-+ (anthyipc-call-with-proc proc ()
-+ nil
-+ (anthyipc-wait-line)
-+ (message (buffer-substring (point-min) (1- (point-max))))))
-+
-+(defun anthyipc-new-context (proc)
-+ (anthyipc-call-with-proc proc ()
-+ (insert "NEW-CONTEXT INPUT=#18 OUTPUT=#18\n")
-+ (anthyipc-accept-number)))
-+
-+(defun anthyipc-release-context (proc cont)
-+ (anthyipc-call-with-proc proc ()
-+ (insert (format "RELEASE-CONTEXT %d\n" cont))
-+ (anthyipc-accept-ok)))
-+
-+;; Returns list of bunsetsu
-+(defun anthyipc-convert (proc cont yomi)
-+ (anthyipc-call-with-proc proc ()
-+ (insert (format "CONVERT %d %s\n" cont yomi))
-+ (let ((r (anthyipc-accept-segments cont 0)))
-+ (cdr (cdr r)))))
-+
-+(defun anthyipc-commit (proc cont cancel)
-+ (anthyipc-call-with-proc proc ()
-+ (insert (format "COMMIT %d %d\n" cont cancel))
-+ (anthyipc-accept-ok)))
-+
-+;;; Returns list of candidate
-+(defconst anthy-max-candidates 9999)
-+(defun anthyipc-get-candidates (proc cont seg-no)
-+ (anthyipc-call-with-proc proc ()
-+ (insert
-+ (format "GET-CANDIDATES %d %d %d %d\n" cont seg-no 0 anthy-max-candidates))
-+ (let ((r (anthyipc-accept-candidates)))
-+ (cdr r))))
-+
-+;;; Returns segments
-+(defun anthyipc-select-candidate (proc cont seg-no candidate-no)
-+ (anthyipc-call-with-proc proc ()
-+ (insert (format "SELECT-CANDIDATE %d %d %d\n" cont seg-no candidate-no))
-+ (anthyipc-accept-segments cont seg-no)))
-+
-+;;; Returns segments
-+(defun anthyipc-resize-segment (proc cont seg-no inc-dec)
-+ (anthyipc-call-with-proc proc ()
-+ (insert (format "RESIZE-SEGMENT %d %d %d\n" cont seg-no inc-dec))
-+ (cddr (anthyipc-accept-segments cont seg-no))))
-+
-+;;; egg/anthyipc.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/canna.el ./egg/canna.el
---- ../tamago-4.0.6/egg/canna.el Tue Jan 4 15:56:14 2000
-+++ ./egg/canna.el Mon Jul 22 22:18:56 2002
-@@ -30,257 +30,878 @@
-
- ;;; Code:
-
--
-+(require 'egg)
- (require 'egg-edep)
-
--(eval-when-compile
-- (defmacro CANNA-const (c)
-- (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
-- )))
-+(defgroup canna nil
-+ "CANNA interface for Tamago 4."
-+ :group 'egg)
-
--(defconst canna-conversion-backend
-- [ canna-init
-+(defcustom canna-hostname "localhost"
-+ "Hostname of CANNA server"
-+ :group 'canna :type 'string)
-
-- canna-start-conversion
-- canna-get-bunsetsu-converted
-- canna-get-bunsetsu-source
-- canna-list-candidates
-- canna-get-number-of-candidates
-- canna-get-current-candidate-number
-- canna-get-all-candidates
-- canna-decide-candidate
-- canna-change-bunsetsu-length
-- canna-end-conversion
-- nil
-+(defcustom canna-server-port "canna"
-+ "A service name or a port number (should be a string) of CANNA server"
-+ :group 'canna :type 'string)
-
-- canna-fini
-- ])
-+(defcustom canna-user-name nil
-+ "User Name on CANNA server"
-+ :group 'canna :type 'string)
-
--(defconst canna-server-port 5680 "Port number of Canna server")
--(defvar canna-hostname "localhost"
-- "Hostname of Canna server")
-+(defcustom canna-group-name nil
-+ "Group Name on CANNA server"
-+ :group 'canna :type 'string)
-
--(defun canna-open (hostname)
-- "Establish the connection to CANNA server. Return environment object."
-- (let* ((buf (generate-new-buffer " *CANNA*"))
-- (proc (open-network-stream "CANNA" buf hostname canna-server-port))
-- result)
-- (process-kill-without-query proc)
-- (set-process-coding-system proc 'no-conversion 'no-conversion)
-- (set-marker-insertion-type (process-mark proc) t)
-- (save-excursion
-- (set-buffer buf)
-- (erase-buffer)
-- (buffer-disable-undo)
-- (set-buffer-multibyte nil))
-- (setq result (cannarpc-open proc (user-login-name)))
-- (if (< result 0)
-- (let ((msg (cannarpc-get-error-message (- result))))
-- (delete-process proc)
-- (kill-buffer buf)
-- (error "Can't open CANNA session (%s): %s" hostname msg)))
-- (vector proc result)))
-+; (eval-when-compile
-+; (defmacro CANNA-const (c)
-+; (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
-+; )))
-
--;; XXX: Should support multiple outstanding context
--;; <env> ::= [ <proc> <context> ]
--(defvar canna-environment nil
-+(egg-add-message
-+ '((Japanese
-+ (canna-connect-error "$B%5!<%P$H@\B3$G$-$^$;$s$G$7$?(B")
-+ (canna-fail-make-env "$B4D6-$r:n$k$3$H$O$G$-$^$;$s$G$7$?(B")
-+ (canna-dict-missing-1 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#(B")
-+ (canna-dict-missing-2 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#:n$j$^$9$+(B? ")
-+ (canna-dict-created "$B<-=q%U%!%$%k(B %s $B$r:n$j$^$7$?(B")
-+ (canna-dict-saving "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$F$$$^$9(B")
-+ (canna-dict-saved "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$^$7$?(B")
-+ (canna-register-1 "$BEPO?<-=qL>(B:")
-+ (canna-register-2 "$BIJ;lL>(B"))))
-+
-+(defvar canna-hinshi-alist
-+ '(("$B?ML>(B" . "#JN") ("$BCOL>(B" . "#CN") ("$B8GM-L>;l(B" . "#KK")
-+ ("$B0lHLL>;l(B" . "#T35") ("$BL>;l(B($BNc(B)$B6/NO$J(B" . "#T15")
-+ ("$B%5JQL>;l(B" . "#T30") ("$B%5JQL>;l(B($BNc(B)$B0B?4$J(B" . "#T10") ("$BC14A;z(B" . "#KJ")
-+ ("$BF0;l%+9TJQ3J3hMQ(B" . "#KX") ("$BF0;l%s%69TJQ3J3hMQ(B" . "#NZX")
-+ ("$BF0;l%69TJQ3J3hMQ(B" . "#ZX") ("$BF0;l%59TJQ3J3hMQ(B" . "#SX")
-+ ("$BF0;l%+9T8^CJ3hMQ(B" . "#K5") ("$BF0;l%,9T8^CJ3hMQ(B" . "#G5")
-+ ("$BF0;l%59T8^CJ3hMQ(B" . "#S5") ("$BF0;l%?9T8^CJ3hMQ(B" . "#T5")
-+ ("$BF0;l%J9T8^CJ3hMQ(B" . "#N5") ("$BF0;l%P9T8^CJ3hMQ(B" . "#B5")
-+ ("$BF0;l%^9T8^CJ3hMQ(B" . "#M5") ("$BF0;l%i9T8^CJ3hMQ(B" . "#R5")
-+ ("$BF0;l%o9T8^CJ3hMQ(B" . "#W5") ("$BF0;l>e2<0lCJ3hMQ(B" . "#KS")
-+ ("$BF0;l%+9T8^CJO"MQL>;l(B" . "#K5r") ("$BF0;l%,9T8^CJO"MQL>;l(B" . "#G5r")
-+ ("$BF0;l%59T8^CJO"MQL>;l(B" . "#S5r") ("$BF0;l%?9T8^CJO"MQL>;l(B" . "#T5r")
-+ ("$BF0;l%J9T8^CJO"MQL>;l(B" . "#N5r") ("$BF0;l%P9T8^CJO"MQL>;l(B" . "#B5r")
-+ ("$BF0;l%^9T8^CJO"MQL>;l(B" . "#M5r") ("$BF0;l%i9T8^CJO"MQL>;l(B" . "#R5r")
-+ ("$BF0;l%o9T8^CJO"MQL>;l(B" . "#W5r") ("$BF0;l>e2<0lCJ8l44L>;l(B" . "#KSr")
-+ ("$B7AMF;l(B" . "#KY") ("$B7AMF;l(B($BNc(B)$B$-$$$m$$(B" . "#KYT")
-+ ("$B7AMFF0;l(B" . "#T05")
-+ ("$B7AMFF0;l(B($BNc(B)$B4X?4$@(B" . "#T10") ("$B7AMFF0;l(B($BNc(B)$BB?92$F$@(B" . "#T13")
-+ ("$B7AMFF0;l(B($BNc(B)$B0U30$@(B" . "#T15") ("$B7AMFF0;l(B($BNc(B)$BJXMx$@(B" . "#T18")
-+ ("$BI{;l(B" . "#F14") ("$BI{;l(B($BNc(B)$B$U$C$/$i(B" . "#F04")
-+ ("$BI{;l(B($BNc(B)$B$=$C$H(B" . "#F12") ("$BI{;l(B($BNc(B)$BFMA3(B" . "#F06")
-+ ("$B?t;l(B" . "#NN") ("$B@\B3;l!&46F0;l(B" . "#CJ") ("$BO"BN;l(B" . "#RT")))
-+
-+(defvar canna-hinshi-menu
-+ '("$B?ML>(B" "$BCOL>(B" ("$BCDBN!&2q<RL>(B" . "$B8GM-L>;l(B") ("$BL>;l(B" . MEISHI)
-+ ("$B%5JQL>;l(B" . SAHEN-MEISHI) "$BC14A;z(B" ("$BF0;l(B" . DOUSHI)
-+ ("$B7AMF;l(B" . KEIYOUSHI) ("$B7AMFF0;l(B" . KEIYOUDOUSHI) ("$BI{;l(B" . FUKUSHI)
-+ "$B?t;l(B" "$B@\B3;l!&46F0;l(B" "$BO"BN;l(B" ("$B$=$NB>$N8GM-L>;l(B" . "$B8GM-L>;l(B"))
-+ "Menu data for a hinshi (a part of speech) selection.")
-+
-+(defun canna-hinshi-name (id &optional reverse)
-+ (if reverse
-+ (cdr (assoc id canna-hinshi-alist))
-+ (car (rassoc id canna-hinshi-alist))))
-+
-+(defmacro canna-backend-plist ()
-+ ''(egg-start-conversion canna-start-conversion
-+ egg-get-bunsetsu-source canna-get-bunsetsu-source
-+ egg-get-bunsetsu-converted canna-get-bunsetsu-converted
-+ egg-get-source-language canna-get-source-language
-+ egg-get-converted-language canna-get-converted-language
-+ egg-list-candidates canna-list-candidates
-+ egg-decide-candidate canna-decide-candidate
-+ egg-special-candidate canna-special-candidate
-+ egg-change-bunsetsu-length canna-change-bunsetsu-length
-+ egg-end-conversion canna-end-conversion
-+ egg-word-registration canna-word-registration))
-+
-+(defconst canna-backend-language-alist nil)
-+
-+(defvar canna-backend-alist nil)
-+
-+(defun canna-backend-func-name (name lang &optional env)
-+ (intern (concat name "-" (symbol-name lang)
-+ (and env "-") (and env (symbol-name env)))))
-+
-+(defun canna-make-backend (lang env &optional source-lang converted-lang)
-+ (let ((finalize (canna-backend-func-name "canna-finalize-backend" lang))
-+ (backend (canna-backend-func-name "canna-backend" lang env)))
-+ (if (null (fboundp finalize))
-+ (progn
-+ (fset finalize (function (lambda () (canna-finalize-backend))))
-+ (egg-set-finalize-backend (list finalize))))
-+ (if (null (get backend 'egg-start-conversion))
-+ (setplist backend (apply 'list
-+ 'language lang
-+ 'source-language (or source-lang lang)
-+ 'converted-language (or converted-lang lang)
-+ (canna-backend-plist))))
-+ backend))
-+
-+(defun canna-define-backend (lang env-name-list)
-+ (mapcar (lambda (env)
-+ (if (consp env)
-+ (canna-define-backend lang env)
-+ (canna-make-backend lang env)))
-+ env-name-list))
-+
-+(defun canna-define-backend-alist (deflist)
-+ (setq canna-backend-alist
-+ (mapcar (lambda (slot)
-+ (let* ((lang (car slot))
-+ (alt (cdr (assq lang canna-backend-language-alist))))
-+ (cons lang (canna-define-backend (or alt lang) (cdr slot)))))
-+ deflist)))
-+
-+(defcustom canna-backend-define-list
-+ '((Japanese ((nil nil nil))
-+ ((Bushu Bushu Bushu))))
-+ "Alist of Japanese language and lists of the Canna backend suffixes."
-+ :group 'canna
-+ :set (lambda (sym value)
-+ (set-default sym value)
-+ (canna-define-backend-alist value))
-+ :type '(repeat
-+ (cons
-+ :tag "Language - Backend"
-+ (choice :tag "Language"
-+ (const Japanese)
-+ (symbol :tag "Other"))
-+ (repeat
-+ (cons
-+ :tag "Backend Sequece"
-+ (cons :tag "First Conversion Stage"
-+ (symbol :tag "Backend for Start Conversion")
-+ (repeat :tag "Backends for Reconvert"
-+ (symbol :tag "Backend")))
-+ (repeat
-+ :tag "Following Conversion Stages"
-+ (cons
-+ :tag "N-th Stage"
-+ (symbol :tag "Backend for This Stage")
-+ (repeat :tag "Backends for Reconvert"
-+ (symbol :tag "Backend")))))))))
-+
-+(defsubst canna-backend-get-language (backend)
-+ (get backend 'language))
-+
-+(defsubst canna-backend-get-source-language (backend)
-+ (get backend 'source-language))
-+
-+(defsubst canna-backend-get-converted-language (backend)
-+ (get backend 'converted-language))
-+
-+(defvar canna-envspec-list nil)
-+(defvar canna-current-envspec nil)
-+
-+;; Should support multiple outstanding context
-+;; <env> ::= [ <proc> <context> <backend> <convert-mode> <nostudy> <dic-list> ]
-+(defvar canna-environments nil
- "Environment for CANNA kana-kanji conversion")
-
--(defsubst cannaenv-get-proc (env)
-- (aref env 0))
--(defsubst cannaenv-get-context (env)
-- (aref env 1))
-+(defun cannaenv-create (proc context &optional backend mode nostudy)
-+ (vector proc context backend mode nostudy (list nil)))
-
--;; <bunsetsu> ::=
--;; [ <env> <converted> <bunsetsu-pos>
--;; <source> <zenkouho-pos> <zenkouho> ]
--(defsubst canna-make-bunsetsu (env converted bunsetsu-pos)
-- (vector env converted bunsetsu-pos nil nil nil))
-+(defsubst cannaenv-get-proc (env) (aref env 0))
-+(defsubst cannaenv-get-context (env) (aref env 1))
-+(defsubst cannaenv-get-backend (env) (aref env 2))
-+(defsubst cannaenv-get-mode (env) (aref env 3))
-+(defsubst cannaenv-get-nostudy (env) (aref env 4))
-+(defsubst cannaenv-get-dic-list (env) (cdr (aref env 5)))
-
--(defsubst cannabunsetsu-get-env (b)
-- (aref b 0))
--(defsubst cannabunsetsu-get-converted (b)
-- (aref b 1))
--(defsubst cannabunsetsu-get-bunsetsu-pos (b)
-- (aref b 2))
--(defsubst cannabunsetsu-get-source (b)
-- (aref b 3))
--(defsubst cannabunsetsu-set-source (b s)
-- (aset b 3 s))
--(defsubst cannabunsetsu-get-zenkouho-pos (b)
-- (aref b 4))
--(defsubst cannabunsetsu-set-zenkouho-pos (b p)
-- (aset b 4 p))
--(defsubst cannabunsetsu-get-zenkouho (b)
-- (aref b 5))
--(defsubst cannabunsetsu-set-zenkouho (b z)
-- (aset b 5 z))
-+(defsubst cannaenv-add-dic-list (env &rest dic)
-+ (nconc (aref env 5) (list (apply 'vector dic))))
-+
-+;; <canna-bunsetsu> ::=
-+;; [ <env> <converted> <bunsetsu-pos> <source>
-+;; <zenkouho-pos> <zenkouho> <zenkouho-converted> ]
-+(defsubst canna-make-bunsetsu (env converted bunsetsu-pos source)
-+ (egg-bunsetsu-create
-+ (cannaenv-get-backend env)
-+ (vector env converted bunsetsu-pos source nil nil nil)))
-+
-+(defsubst canna-bunsetsu-get-env (b)
-+ (aref (egg-bunsetsu-get-info b) 0))
-+(defsubst canna-bunsetsu-get-converted (b)
-+ (aref (egg-bunsetsu-get-info b) 1))
-+(defsubst canna-bunsetsu-get-bunsetsu-pos (b)
-+ (aref (egg-bunsetsu-get-info b) 2))
-+(defsubst canna-bunsetsu-get-source (b)
-+ (aref (egg-bunsetsu-get-info b) 3))
-+(defsubst canna-bunsetsu-set-source (b s)
-+ (aset (egg-bunsetsu-get-info b) 3 s))
-+(defsubst canna-bunsetsu-get-zenkouho-pos (b)
-+ (aref (egg-bunsetsu-get-info b) 4))
-+(defsubst canna-bunsetsu-set-zenkouho-pos (b p)
-+ (aset (egg-bunsetsu-get-info b) 4 p))
-+(defsubst canna-bunsetsu-get-zenkouho (b)
-+ (aref (egg-bunsetsu-get-info b) 5))
-+(defsubst canna-bunsetsu-set-zenkouho (b z)
-+ (aset (egg-bunsetsu-get-info b) 5 z))
-+(defsubst canna-bunsetsu-get-zenkouho-converted (b)
-+ (aref (egg-bunsetsu-get-info b) 6))
-+(defsubst canna-bunsetsu-set-zenkouho-converted (b zc)
-+ (aset (egg-bunsetsu-get-info b) 6 zc))
-
- (defun canna-get-bunsetsu-source (b)
-- (let ((s (cannabunsetsu-get-source b)))
-+ (let ((s (canna-bunsetsu-get-source b)))
- (or s
-- (let* ((env (cannabunsetsu-get-env b))
-- (bp (cannabunsetsu-get-bunsetsu-pos b))
-+ (let* ((env (canna-bunsetsu-get-env b))
-+ (bp (canna-bunsetsu-get-bunsetsu-pos b))
- (s (cannarpc-get-bunsetsu-source env bp)))
-- (cannabunsetsu-set-source b s)))))
-+ (canna-bunsetsu-set-source b s)))))
-+(defun canna-get-bunsetsu-converted (b) (canna-bunsetsu-get-converted b))
-+(defun canna-get-source-language (b) 'Japanese)
-+(defun canna-get-converted-language (b) 'Japanese)
-
--(defun canna-get-bunsetsu-converted (b)
-- (cannabunsetsu-get-converted b))
-+(defun canna-envspec-create (env-name convert-mode nostudy)
-+ (vector (and env-name (setq env-name (intern env-name)))
-+ (canna-make-backend egg-language env-name)
-+ convert-mode nostudy (list nil)))
-
--(defconst canna-dictionary-specification
-- '("iroha"
-- "fuzokugo"
-- "hojomwd"
-- "hojoswd"
-- "bushu"
-- "user"
-- )
-- "Dictionary specification of CANNA.")
-+(defsubst canna-envspec-env-type (spec) (aref spec 0))
-+(defsubst canna-envspec-backend (spec) (aref spec 1))
-+(defsubst canna-envspec-mode (spec) (aref spec 2))
-+(defsubst canna-envspec-nostudy (spec) (aref spec 3))
-+(defsubst canna-envspec-dic-list (spec) (cdr (aref spec 4)))
-+
-+(defsubst canna-envspec-add-dic-list (spec &rest dic)
-+ (nconc (aref spec 4) (list (apply 'vector dic))))
-+
-+(defmacro canna-arg-type-error (func)
-+ `(egg-error ,(format "%s: Wrong type argument" func)))
-+
-+(defun canna-define-environment (&optional env-name convert-mode nostudy)
-+ "Define a Canna environment. ENV-NAME specifies suffix of the Canna
-+environment name. CONVERT-MODE specifies including hiragana or
-+katakana to candidates list. NOSTUDY specifies not study."
-+ (if (and env-name (null (stringp env-name)))
-+ (canna-arg-type-error canna-define-environment))
-+ (setq canna-current-envspec (canna-envspec-create env-name
-+ convert-mode nostudy)
-+ canna-envspec-list (nconc canna-envspec-list
-+ (list canna-current-envspec))))
-+
-+(defun canna-add-dict (dict dict-rw)
-+ (canna-envspec-add-dic-list canna-current-envspec dict dict-rw))
-+
-+(defun canna-comm-sentinel (proc reason) ; assume it is close
-+ (let ((inhibit-quit t))
-+ (kill-buffer (process-buffer proc))
-+ ;; delete env from the list.
-+ (setq canna-environments
-+ (delq nil (mapcar (lambda (env)
-+ (if (null (eq (cannaenv-get-proc env) proc))
-+ env))
-+ canna-environments)))))
-+
-+(defun canna-open (hostname-list)
-+ "Establish the connection to CANNA server. Return environment object."
-+ (let* ((save-inhibit-quit inhibit-quit)
-+ (inhibit-quit t)
-+ (proc-name "CANNA")
-+ (msg-form "Canna: connecting to %S at %s...")
-+ (user-name (or canna-user-name (user-login-name)))
-+ (id (shell-command-to-string "id"))
-+ (group (or canna-group-name
-+ (if (string-match "gid=[0-9]+(\\([^)]+\\))" id)
-+ (match-string 1 id)
-+ "user")))
-+ buf hostname port proc result msg)
-+ (unwind-protect
-+ (progn
-+ (setq buf (generate-new-buffer " *CANNA*"))
-+ (save-excursion
-+ (set-buffer buf)
-+ (erase-buffer)
-+ (buffer-disable-undo)
-+ (set-buffer-multibyte nil)
-+ (setq egg-fixed-euc 'fixed-euc-jp))
-+ (or (consp hostname-list)
-+ (setq hostname-list (list hostname-list)))
-+ (while (and hostname-list (null proc))
-+ (setq hostname (or (car hostname-list) "")
-+ hostname-list (cdr hostname-list))
-+ (if (null (string-match ":" hostname))
-+ (setq port canna-server-port)
-+ (setq port (substring hostname (match-end 0))
-+ hostname (substring hostname 0 (match-beginning 0))))
-+ (if (and (stringp port) (string-match "^[0-9]+$" port))
-+ (setq port (string-to-int port)))
-+ (and (equal hostname "")
-+ (setq hostname (or (getenv "CANNAHOST") "localhost")))
-+ (let ((inhibit-quit save-inhibit-quit))
-+ (if (and msg
-+ (null (y-or-n-p (format "%s failed. Try to %s? "
-+ msg hostname))))
-+ (egg-error "abort connect")))
-+ (setq msg (format "Canna: connecting to %s..." hostname))
-+ (message "%s" msg)
-+ (let ((inhibit-quit save-inhibit-quit))
-+ (condition-case nil
-+ (setq proc (open-network-stream proc-name buf hostname port))
-+ ((error quit))))
-+ (when proc
-+ (process-kill-without-query proc)
-+ (set-process-coding-system proc 'binary 'binary)
-+ (set-process-sentinel proc 'canna-comm-sentinel)
-+ (set-marker-insertion-type (process-mark proc) t)
-+ (setq result (cannarpc-open proc user-name)) ;; result is context
-+ (if (= result -1)
-+ (progn
-+ (delete-process proc)
-+ (setq proc nil))
-+ (cannarpc-notice-group-name proc result group)
-+ (cannarpc-set-app-name proc result "EGG4"))))
-+ (cons proc result))
-+ (if proc
-+ (message (concat msg "done"))
-+ (if buf (kill-buffer buf))
-+ (egg-error 'canna-connect-error)))))
-
- (defun canna-filename (p)
- ""
- (cond ((consp p) (concat (car p) "/" (user-login-name)))
- (t p)))
-
--(defun canna-get-environment ()
-+(defun canna-search-environment (backend)
-+ (let ((env-list canna-environments)
-+ env)
-+ (while (and (null env) env-list)
-+ (setq env (and (eq (cannaenv-get-backend (car env-list)) backend)
-+ (car env-list))
-+ env-list (cdr env-list)))
-+ env))
-+
-+(defun canna-get-environment (backend)
- "Return the backend of CANNA environment."
-- (if canna-environment
-- canna-environment
-- (let* ((env (canna-open canna-hostname))
-- (l canna-dictionary-specification)
-- dict-list)
-- (while l
-- (let ((dic (car l))
-- result)
-- (setq result
-- (canna-open-dictionary env (canna-filename dic)))
-- (if (= result 255)
-- (error "Damedamedame") ; XXX
-- (setq l (cdr l)))))
-- (setq canna-environment env))))
-+ (let ((env (canna-search-environment backend))
-+ proc context error)
-+ (or env
-+ (unwind-protect
-+ (let* ((language (canna-backend-get-language backend))
-+ specs)
-+ (setq proc (canna-open canna-hostname)
-+ context (cdr proc)
-+ proc (car proc)
-+ canna-envspec-list nil)
-+ (condition-case err
-+ (egg-load-startup-file 'canna language)
-+ (egg-error
-+ (setq error err)
-+ (signal (car error) (cdr error))))
-+ (setq specs canna-envspec-list)
-+ (while specs
-+ (canna-create-environment proc context (car specs))
-+ (setq context nil)
-+ (setq specs (cdr specs)))
-+ (setq env (canna-search-environment backend)))
-+ (when (and proc (null env))
-+ (cannarpc-close proc)
-+ (if error
-+ (signal (car error) (cdr error))
-+ (egg-error 'canna-fail-make-env)))
-+ ))))
-
--(defun canna-open-dictionary (env name)
-+(defun canna-create-environment (proc context spec)
-+ (let* ((save-inhibit-quit inhibit-quit)
-+ (inhibit-quit t)
-+ (backend (canna-envspec-backend spec))
-+ (convert-mode (canna-envspec-mode spec))
-+ (nostudy (canna-envspec-nostudy spec))
-+ (dic-list (canna-envspec-dic-list spec))
-+ env)
-+ (condition-case err
-+ (progn
-+ (if (not context)
-+ (setq context (cannarpc-create-context proc)))
-+ (if (< context 0)
-+ (egg-error "%s" (cannarpc-get-error-message (- context))))
-+ (setq env (cannaenv-create proc context backend convert-mode nostudy))
-+ (let ((inhibit-quit save-inhibit-quit))
-+ (while dic-list
-+ (canna-set-dictionary env (car dic-list))
-+ (setq dic-list (cdr dic-list))))
-+ (setq canna-environments (nconc canna-environments (list env))))
-+ ((egg-error quit)
-+ (if (eq (car err) 'egg-error)
-+ (message "%s" (nth 1 err)))
-+ (if env
-+ (progn
-+ (cannarpc-close-context env)
-+ (setq canna-environments (delq env canna-environments))))
-+ (if (eq (car err) 'quit)
-+ (signal 'quit (cdr err)))))))
-+
-+(defun canna-set-dictionary (env dic-spec)
-+ (let ((dname (aref dic-spec 0))
-+ (drw (aref dic-spec 1))
-+ did result)
-+ (if (= 0 (canna-open-dictionary env dname drw))
-+ (cannaenv-add-dic-list env dname drw))))
-+
-+(defun canna-open-dictionary (env name rw)
- (let ((trying t)
- ret)
- (while trying
- (setq ret (cannarpc-open-dictionary env name 0)) ; XXX MODE=0
- (if (= ret 0)
- (setq trying nil)
-- (message "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s(B" name)
-- (setq ret (- ret)) ; Get error code.
-+ (message (egg-get-message 'canna-dict-missing-1) name)
-+ (if rw
- (if (and (y-or-n-p
-- (format "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s!#:n$j$^$9$+(B? "
-- name))
-+ (format (egg-get-message 'canna-dict-missing-2) name))
- (= (cannarpc-make-dictionary env name) 0))
-- (message "$B<-=q%U%!%$%k(B(%s)$B$r:n$j$^$7$?(B" name)
-- (error "Fatal"))))
-+ (message (egg-get-message 'canna-dict-created) name)
-+ (message "%s" (cannarpc-get-error-message (- ret))))
-+ (setq trying nil))))
- ret))
-
-+(defun canna-save-dictionaries (env)
-+ (let ((dic-list (canna-list-writable-dictionaries-byname env))
-+ dic)
-+ (while dic-list
-+ (setq dic (car dic-list)
-+ dic-list (cdr dic-list))
-+ (cannarpc-save-dictionary env dic))))
-+
- (defun canna-init ()
- )
-
--(defun canna-start-conversion (yomi lang)
-+(defun canna-set-converted-yomi (bunsetsu-pos bunsetsu-list)
-+ (let ((bl bunsetsu-list)
-+ (i bunsetsu-pos)
-+ b)
-+ (while bl
-+ (setq b (car bl))
-+ (canna-bunsetsu-set-source b (cannarpc-get-bunsetsu-source env i))
-+ (setq i (1+ i)
-+ bl (cdr bl)))
-+ bunsetsu-list))
-+
-+(defun canna-start-conversion (backend yomi &optional context)
- "Convert YOMI string to kanji, and enter conversion mode.
- Return the list of bunsetsu."
-- (if (eq lang 'Japanese)
-- (let ((env (canna-get-environment)))
-- (cannarpc-begin-conversion env yomi))
-- (signal 'lang-not-supported)))
-+ (let* ((env (canna-get-environment backend))
-+ (bunsetsu-list (cannarpc-begin-conversion env yomi)))
-+ (if (numberp bunsetsu-list) ; XXX error $B$N=hM}E,Ev(B
-+ (progn
-+ (if (= -1 (cannarpc-cancel-conversion env))
-+ (progn
-+ (setq env (canna-get-environment backend))
-+ (canna-finalize-backend)))
-+ (setq bunsetsu-list (cannarpc-begin-conversion env yomi))))
-+ (canna-set-converted-yomi 0 bunsetsu-list)))
-
- (defun canna-end-conversion (bunsetsu-list abort)
-- (let* ((env (cannabunsetsu-get-env (car bunsetsu-list)))
-+ (let* ((env (canna-bunsetsu-get-env (car bunsetsu-list)))
- (l bunsetsu-list)
- (len (length bunsetsu-list))
- (zenkouho-pos-vector (make-vector (* 2 len) 0))
- (i 0)
-- (mode 1) ;XXX MODE=1 attru?
-+ (mode (if (cannaenv-get-nostudy env) 0 1)) ; MODE=1 $B3X=,(B 0 $B$7$J$$(B
- bunsetsu zenkouho-pos)
- (if abort
- (setq mode 0))
- (while l
- (setq bunsetsu (car l))
- (setq l (cdr l))
-- (setq zenkouho-pos (cannabunsetsu-get-zenkouho-pos bunsetsu))
-+ (setq zenkouho-pos (canna-bunsetsu-get-zenkouho-pos bunsetsu))
- (if (null zenkouho-pos)
- () ; XXX: NIL--> 0 atteru???
- (aset zenkouho-pos-vector i 0) ; XXX Don't support >=256
- (aset zenkouho-pos-vector (1+ i) zenkouho-pos))
- (setq i (+ i 2)))
-- (cannarpc-end-conversion env len zenkouho-pos-vector 0)))
-+ (cannarpc-end-conversion env len zenkouho-pos-vector mode)))
-
--(defun canna-list-candidates (bunsetsu prev-bunsetsu)
-- (let* ((env (cannabunsetsu-get-env bunsetsu))
-- (bunsetsu-pos (cannabunsetsu-get-bunsetsu-pos bunsetsu))
-- (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos)))
-- (cannabunsetsu-set-zenkouho bunsetsu z)
-- (cannabunsetsu-set-zenkouho-pos bunsetsu 0)
-- 0))
-+(defun canna-list-candidates (bunsetsu prev-b next-b major)
-+ (setq bunsetsu (car bunsetsu))
-+ (if (canna-bunsetsu-get-zenkouho bunsetsu)
-+ (cons (canna-bunsetsu-get-zenkouho-pos bunsetsu)
-+ (canna-bunsetsu-get-zenkouho-converted bunsetsu))
-+ (let* ((env (canna-bunsetsu-get-env bunsetsu))
-+ (yomi (canna-get-bunsetsu-source bunsetsu))
-+ (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
-+ (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos yomi)))
-+ (canna-bunsetsu-set-zenkouho bunsetsu z)
-+ (cons (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
-+ (canna-bunsetsu-set-zenkouho-converted
-+ bunsetsu
-+ (mapcar 'canna-bunsetsu-get-converted z))))))
-
-+;;; XXX not use ?
- (defun canna-get-number-of-candidates (bunsetsu)
-- (let ((l (cannabunsetsu-get-zenkouho bunsetsu)))
-+ (let ((l (canna-bunsetsu-get-zenkouho bunsetsu)))
- (if l
- (length l)
- nil)))
-
--(defun canna-decide-candidate (bunsetsu candidate-pos)
-- (let* ((candidate-list (cannabunsetsu-get-zenkouho bunsetsu))
-- (candidate (nth candidate-pos candidate-list)))
-- (cannabunsetsu-set-zenkouho candidate candidate-list)
-- (cannabunsetsu-set-zenkouho-pos candidate candidate-pos)
-- candidate))
-+(defun canna-decide-candidate (bunsetsu pos prev-b next-b)
-+ (let* ((head (car bunsetsu))
-+ (candidate-list (canna-bunsetsu-get-zenkouho head))
-+ (candidate (nth pos candidate-list)))
-+ (canna-bunsetsu-set-zenkouho candidate candidate-list)
-+ (canna-bunsetsu-set-zenkouho-pos candidate pos)
-+ (canna-bunsetsu-set-zenkouho-converted
-+ candidate (canna-bunsetsu-get-zenkouho-converted head))
-+ (list (list candidate))))
-
-+(defun canna-special-candidate (bunsetsu prev-b next-b major type)
-+ (let* ((head (car bunsetsu))
-+ (env (canna-bunsetsu-get-env head))
-+ (backend (egg-bunsetsu-get-backend head))
-+ (lang (get backend 'language))
-+ source converted zenkouho-list kouho-list pos)
-+ (when (and (eq lang (get backend 'source-language))
-+ (eq lang (get backend 'converted-language)))
-+ (cond ((eq lang 'Japanese)
-+ (setq source (canna-get-bunsetsu-source head))
-+ (cond ((eq type 'egg-hiragana)
-+ (setq converted source))
-+ ((eq type 'egg-katakana)
-+ (setq converted (japanese-katakana source))))
-+ (setq zenkouho-list
-+ (cdr (canna-list-candidates bunsetsu prev-b next-b major)))
-+ (setq pos
-+ (when (setq kouho-list (member converted zenkouho-list))
-+ (- (length zenkouho-list) (length kouho-list))))))
-+ (when pos
-+ (canna-decide-candidate bunsetsu pos prev-b next-b)))))
-+
-+;;; XXX not used ?
- (defun canna-get-current-candidate-number (bunsetsu)
-- (cannabunsetsu-get-zenkouho-pos bunsetsu))
-+ (canna-bunsetsu-get-zenkouho-pos bunsetsu))
-
-+;;; XXX not used ?
- (defun canna-get-all-candidates (bunsetsu)
-- (let* ((l (cannabunsetsu-get-zenkouho bunsetsu))
-+ (let* ((l (canna-bunsetsu-get-zenkouho bunsetsu))
- (result (cons nil nil))
- (r result))
- (catch 'break
- (while t
- (let ((candidate (car l)))
-- (setcar r (cannabunsetsu-get-converted candidate))
-+ (setcar r (canna-bunsetsu-get-converted candidate))
- (if (null (setq l (cdr l)))
- (throw 'break nil)
- (setq r (setcdr r (cons nil nil)))))))
- result))
-
--;;;;;;;;;;;;;;;;;;;;;;; MADAMADA zenzendame, just copy from SJ3
--(defun canna-change-bunsetsu-length (b0 b1 b2 len)
-- (let ((yomi (concat
-- (cannabunsetsu-get-source b1)
-- (if b2 (cannabunsetsu-get-source b2))))
-- (env (cannabunsetsu-get-env b1))
-- yomi1 yomi2
-- bunsetsu1 bunsetsu2)
-- (setq yomi1 (substring yomi 0 len)
-- yomi2 (substring yomi len))
-- (setq bunsetsu1
-- (cannarpc-tanbunsetsu-conversion env yomi1))
-- ;; Only set once (memory original length of the bunsetsu).
-- (cannabunsetsu-set-kugiri-changed bunsetsu1
-- (or (cannabunsetsu-get-kugiri-changed b1)
-- (length (cannabunsetsu-get-source b1))))
-- (if (< 0 (length yomi2))
-- (setq bunsetsu2 (cannarpc-tanbunsetsu-conversion env yomi2))
-- (setq bunsetsu2 nil))
-- (if bunsetsu2
-- (list bunsetsu1 bunsetsu2)
-- (list bunsetsu1))))
-+(defun canna-change-bunsetsu-length (bunsetsu prev-b next-b len major)
-+ (let* ((env (canna-bunsetsu-get-env (car bunsetsu)))
-+ (yomi (canna-get-bunsetsu-source (car bunsetsu)))
-+ (yomi-length (cond ((< (length yomi) len) -1)
-+ ((> (length yomi) len) -2)
-+ (t nil)))
-+ (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos (car bunsetsu)))
-+ new)
-+ (if yomi-length
-+ (setq new (canna-set-converted-yomi
-+ bunsetsu-pos
-+ (cannarpc-set-kugiri-changed env yomi-length bunsetsu-pos)))
-+ (setq new bunsetsu))
-+ (list (list (car new)) prev-b (cdr new))))
-
--;;;;;;;;;;;;;; MADAMADA
--(defun canna-fini ()
--)
-+(defun canna-finalize-backend (&optional action)
-+ (let* ((save-inhibit-quit inhibit-quit)
-+ (inhibit-quit t)
-+ (env-list canna-environments)
-+ env proc-list saved)
-+ (while env-list
-+ (setq env (car env-list)
-+ env-list (cdr env-list))
-+ (condition-case err
-+ (progn
-+ (unless (memq (cannaenv-get-proc env) proc-list)
-+ (setq proc-list (cons (cannaenv-get-proc env) proc-list)))
-+ (unless (eq action 'disconnect-only)
-+ (unless saved
-+ (setq saved t)
-+ (message (egg-get-message 'canna-dict-saving) "Canna"))
-+ (let ((inhibit-quit save-inhibit-quit))
-+ (canna-save-dictionaries env)))
-+ (unless (eq action 'save-only)
-+ (cannarpc-close-context env)))
-+ ((error quit)
-+ (message "signal %S occured when dictionary saving" err))))
-+ (if saved
-+ (message (egg-get-message 'canna-dict-saved) "Canna"))
-+ (unless (eq action 'save-only)
-+ (while proc-list
-+ (if (and (car proc-list)
-+ (eq (process-status (car proc-list)) 'open))
-+ (cannarpc-close (car proc-list)))
-+ (setq proc-list (cdr proc-list)))))
-+ (setq canna-environments nil))
-+
-+;;; word registration
-+
-+(defun canna-list-writable-dictionaries-byname (env)
-+ (let ((dic-list (cannaenv-get-dic-list env)))
-+ (delq nil
-+ (mapcar (lambda (dic)
-+ (let ((dname (aref dic 0))
-+ (drw (aref dic 1)))
-+ (and drw dname)))
-+ dic-list))))
-+
-+(defun canna-dictionary-select (env)
-+ (let ((dic-list (canna-list-writable-dictionaries-byname env)))
-+ (if (= 1 (length dic-list))
-+ (car dic-list)
-+ (menudiag-select (list 'menu
-+ (egg-get-message 'canna-register-1)
-+ dic-list)))))
-+
-+(defun canna-hinshi-MEISHI (kanji yomi)
-+ (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T15" "#T35"))
-+
-+(defun canna-hinshi-SAHEN-MEISHI (kanji yomi)
-+ (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T10" "#T30"))
-+
-+(defmacro canna-hinshi-DOUSHI-check-gobi ()
-+ '(progn
-+ (setq i 0)
-+ (while (> 9 i)
-+ (if (string-match (concat (substring gobi i (1+ i)) "$") kanji)
-+ (progn
-+ (setq renyou (substring re-gobi i (1+ i)))
-+ (setq mizen (substring mi-gobi i (1+ i)))
-+ (setq kanji-gobi (substring kanji (match-beginning 0)))
-+ (setq kanji-gokan (substring kanji 0 (match-beginning 0)))
-+ (setq ret (nth i hinshi))
-+ (setq i 9)))
-+ (setq i (1+ i)))
-+ (setq i 0)
-+ (while (> 9 i)
-+ (if (string-match (concat (substring gobi i (1+ i)) "$") yomi)
-+ (progn
-+ (setq yomi-gobi (substring yomi (match-beginning 0)))
-+ (setq yomi-gokan (substring yomi 0 (match-beginning 0)))
-+ (setq i 9)))
-+ (setq i (1+ i)))))
-+
-+(defun canna-hinshi-DOUSHI (kanji yomi)
-+ (let ((gobi "$B$/$0$9$D$L$V$`$k$&(B")
-+ (re-gobi "$B$-$.$7$A$K$S$_$j$$(B")
-+ (mi-gobi "$B$+$,$5$?$J$P$^$i$o(B")
-+ (hinshi (list "#K5" "#G5" "#S5" "#T5" "#N5" "#B5" "#M5" "#R5" "#W5"))
-+ kanji-gokan yomi-gokan kanji-gobi yomi-gobi mizen renyou
-+ i ret1 ret2 ret)
-+ (canna-hinshi-DOUSHI-check-gobi)
-+ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
-+ (and kanji-gobi yomi-gobi (equal kanji-gobi yomi-gobi))))
-+ (if (and kanji-gobi yomi-gobi)
-+ (egg-error "$BFI$_$H8uJd$N3hMQ$,0c$$$^$9!#F~NO$7$J$*$7$F$/$@$5$$!#(B")
-+ (egg-error "$BFI$_$H8uJd$r=*;_7A$GF~NO$7$F$/$@$5$$!#(B")))
-+ (cond ((and (> (length kanji) 2) (> (length yomi) 2)
-+ (string-match "$B$/$k(B$" kanji) (string-match "$B$/$k(B$" yomi))
-+ (setq ret "#KX")
-+ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
-+ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2))))
-+ ((and (> (length kanji) 3) (> (length yomi) 3)
-+ (string-match "$B$s$:$k(B$" kanji) (string-match "$B$s$:$k(B$" yomi))
-+ (setq ret "#NZX")
-+ (setq kanji-gokan (substring kanji 0 (- (length kanji) 3)))
-+ (setq yomi-gokan (substring yomi 0 (- (length yomi) 3))))
-+ ((and (> (length kanji) 2) (> (length yomi) 2)
-+ (string-match "$B$:$k(B$" kanji) (string-match "$B$:$k(B$" yomi))
-+ (setq ret "#ZX")
-+ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
-+ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2))))
-+ ((and (> (length kanji) 2) (> (length yomi) 2)
-+ (string-match "$B$9$k(B$" kanji) (string-match "$B$9$k(B$" yomi))
-+ (setq ret "#SX")
-+ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
-+ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2)))))
-+ (if (not (string-match "5$" ret))
-+ (if (y-or-n-p (concat "$B!X(B" kanji "$B!Y$r(B (" (canna-hinshi-name ret)
-+ ") $B$H$7$FEPO?$7$^$9$+(B? "))
-+ (setq ret (list kanji-gokan yomi-gokan ret))
-+ (setq ret "#R5")
-+ (setq kanji-gokan (substring kanji 0 (- (length kanji) 1)))
-+ (setq yomi-gokan (substring yomi 0 (- (length yomi) 1)))))
-+ (if (listp ret)
-+ ret
-+ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
-+ (progn
-+ (setq ret1 (y-or-n-p (concat "$B!V(B" kanji-gokan mizen
-+ "$B$J$$!W$O@5$7$$$G$9$+!#(B")))
-+ (setq i 0)
-+ (if (eq "#R5" ret)
-+ (while (> 9 i)
-+ (if (string-match (concat (substring re-gobi i (1+ i)) "$")
-+ kanji-gokan)
-+ (progn (setq renyou nil)
-+ (setq i 9)))
-+ (setq i (1+ i))))
-+ (setq ret2 (y-or-n-p (concat "$B!V(B" kanji-gokan renyou
-+ "$B$,$$$$!W$O@5$7$$$G$9$+!#(B")))
-+ (setq ret (if ret1 (if ret2 (concat ret "r") ret)
-+ (if ret2 "#KSr" "#KS")))))
-+ (list kanji-gokan yomi-gokan ret))))
-+
-+(defun canna-hinshi-KEIYOUSHI (kanji yomi)
-+ (let (ret)
-+ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
-+ (string-match "$B$$(B$" yomi) (string-match "$B$$(B$" kanji)))
-+ (egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $BAa$$(B"))
-+ (setq kanji (substring kanji 0 (1- (length kanji))))
-+ (setq yomi (substring yomi 0 (1- (length yomi))))
-+ (setq ret
-+ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
-+ (if (y-or-n-p (concat "$B!V(B" kanji "$B!W$O@5$7$$$G$9$+!#(B"))
-+ "#KYT" "#KY")
-+ "#KY"))
-+ (list kanji yomi ret)))
-+
-+(defun canna-hinshi-KEIYOUDOUSHI (kanji yomi)
-+ (let (ret1 ret2 ret)
-+ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
-+ (string-match "$B$@(B$" yomi) (string-match "$B$@(B$" kanji)))
-+ (egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $B@E$+$@(B"))
-+ (setq kanji (substring kanji 0 (1- (length kanji))))
-+ (setq yomi (substring yomi 0 (1- (length yomi))))
-+ (setq ret
-+ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
-+ (progn
-+ (setq ret1 (y-or-n-p
-+ (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
-+ (setq ret2 (y-or-n-p
-+ (concat "$B!V(B" kanji "$B$,$"$k!W$O@5$7$$$G$9$+!#(B")))
-+ (if ret1 (if ret2 "#T10" "#T13") (if ret2 "#T15" "#T18")))
-+ "#T05"))
-+ (list kanji yomi ret)))
-+
-+(defun canna-hinshi-FUKUSHI (kanji yomi)
-+ (let (ret1 ret2)
-+ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
-+ (progn
-+ (setq ret1 (y-or-n-p (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
-+ (setq ret2 (y-or-n-p (concat "$B!V(B" kanji "$B$H!W$O@5$7$$$G$9$+!#(B")))
-+ (if ret1 (if ret2 "#F04" "#F12") (if ret2 "#F06" "#F14")))
-+ "#F14")))
-+
-+(defun canna-hinshi-select (kanji yomi)
-+ (let ((key (menudiag-select (list 'menu
-+ (egg-get-message 'canna-register-2)
-+ canna-hinshi-menu))))
-+ (cond ((symbolp key) (funcall
-+ (intern (concat "canna-hinshi-" (symbol-name key)))
-+ kanji yomi))
-+ ((stringp key) (cdr (assoc key canna-hinshi-alist))))))
-+
-+(defun canna-word-registration (backend kanji yomi)
-+ "Register a word KANJI with a pronunciation YOMI."
-+ (if (or (null (eq (egg-get-language 0 kanji)
-+ (canna-get-converted-language backend)))
-+ (next-single-property-change 0 'egg-lang kanji)
-+ (null (eq (egg-get-language 0 yomi)
-+ (canna-get-source-language backend)))
-+ (next-single-property-change 0 'egg-lang yomi))
-+ (egg-error "word registration: invalid character")
-+ (let* ((env (canna-get-environment backend))
-+ (dic (canna-dictionary-select env))
-+ (hinshi-id (canna-hinshi-select kanji yomi))
-+ result)
-+ (if (listp hinshi-id)
-+ (progn (setq kanji (car hinshi-id))
-+ (setq yomi (nth 1 hinshi-id))
-+ (setq hinshi-id (nth 2 hinshi-id))))
-+ (setq result (cannarpc-add-word env dic yomi kanji hinshi-id))
-+ (if (>= result 0)
-+ (progn
-+ (cannarpc-save-dictionary env dic)
-+ (list (canna-hinshi-name hinshi-id) dic))
-+ (egg-error (cannarpc-get-error-message (- result)))))))
-+
-+;;; word delete registration
-+
-+(defun canna-word-delete-regist (backend yomi)
-+ "Delete a word KANJI from dictionary."
-+ (if (= (length yomi) 0)
-+ (egg-error "Canna word delete registration: null string"))
-+ (let* ((env (canna-get-environment backend))
-+ (dic (canna-dictionary-select env))
-+ proc context envd bunsetsu bunsetsu-pos z zpos kouho-list hinshi i
-+ kanji lex result)
-+ (setq proc (cannaenv-get-proc env))
-+ (setq context (cannarpc-create-context proc))
-+ (setq envd (cannaenv-create proc context
-+ 'canna-backend-Japanese-tmp-delete-regist
-+ 1 t))
-+ (canna-set-dictionary envd (vector dic t))
-+ (canna-set-dictionary envd (vector "fuzokugo" nil))
-+ (setq bunsetsu (car (cannarpc-begin-conversion envd yomi)))
-+ (setq bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
-+ (setq z (cannarpc-get-bunsetsu-candidates envd bunsetsu-pos yomi))
-+ (canna-bunsetsu-set-zenkouho bunsetsu z)
-+ (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
-+ (setq kouho-list
-+ (canna-bunsetsu-set-zenkouho-converted
-+ bunsetsu
-+ (mapcar 'canna-bunsetsu-get-converted z)))
-+ (setq yomi (car (last kouho-list)))
-+ (setq kouho-list (cdr (reverse kouho-list)))
-+ (setq kouho-list (reverse kouho-list))
-+ (setq i 0)
-+ (setq kouho-list (mapcar '(lambda (k)
-+ (prog1
-+ (cons k i)
-+ (setq i (1+ i))))
-+ kouho-list))
-+ (let ((hiragana (assoc yomi kouho-list))
-+ hinshi)
-+ (if hiragana
-+ (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos (cdr hiragana))))
-+ (if (stringp hinshi)
-+ (if (equal "#T35" hinshi)
-+ (setq kouho-list (delete hiragana kouho-list)))
-+ (setq kouho-list (delete hiragana kouho-list))))
-+ (cond
-+ ((null kouho-list)
-+ (cannarpc-close-context envd)
-+ (egg-error "$BEPO?$5$l$F$$$^$;$s!#(B"))
-+ ((eq 1 (length kouho-list))
-+ (setq zpos 0)
-+ (setq kanji (car (car kouho-list))))
-+ (t
-+ (setq kanji (menudiag-select (list 'menu "$B:o=|(B:" kouho-list) nil nil t))
-+ (setq zpos (cdr (car kanji)))
-+ (setq kanji (car (car kanji)))))
-+ (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos zpos))
-+ (setq lex (cannarpc-get-lex envd bunsetsu-pos zpos))
-+ (cannarpc-cancel-conversion envd)
-+ (if (string-match "#[^#]+" hinshi)
-+ (setq hinshi (substring hinshi 0 (match-end 0)))
-+ (egg-error "$BIJ;l>pJs$,<hF@$G$-$^$;$s!#(B"))
-+ (setq kanji (substring kanji 0 (nth 1 (car lex))))
-+ (setq yomi (substring yomi 0 (car (car lex))))
-+ (if (y-or-n-p (concat "$B!X(B" kanji "$B!Y(B(" yomi ": "
-+ (canna-hinshi-name hinshi) ")$B$r(B "
-+ dic " $B$+$i:o=|$7$^$9$+(B? "))
-+ (setq result
-+ (cannarpc-delete-word envd dic yomi kanji hinshi))
-+ (setq result -1))
-+ (if (>= result 0)
-+ (progn
-+ (cannarpc-save-dictionary envd dic)
-+ (cannarpc-close-context envd)
-+ (list kanji yomi (canna-hinshi-name hinshi) dic))
-+ (cannarpc-close-context envd)
-+ (egg-error "$B:o=|$5$l$^$;$s$G$7$?!#(B"))
-+ ))
-
- ;;; setup
--(require 'egg)
-+(load "egg/cannarpc")
-+(run-hooks 'canna-load-hook)
-
- ;;;###autoload
- (defun egg-activate-canna (&rest arg)
-- "Activate CANNA backend of Tamagotchy."
-- (setq egg-conversion-backend canna-conversion-backend)
-- (if (not (fboundp 'cannarpc-open))
-- (load-library "egg/canna"))
-- (apply 'egg-mode arg))
-+ "Activate CANNA backend of Tamago 4."
-+ (apply 'egg-mode (append arg canna-backend-alist)))
-
- ;;; egg/canna.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/cannarpc.el ./egg/cannarpc.el
---- ../tamago-4.0.6/egg/cannarpc.el Tue Jan 4 15:48:42 2000
-+++ ./egg/cannarpc.el Sun Jan 28 03:53:13 2001
-@@ -45,17 +45,31 @@
- ((eq c 'GetDirectoryList) 7)
- ((eq c 'MountDictionary) 8)
- ((eq c 'UnmountDictionary) 9)
-+ ((eq c 'GetMountDictionaryList) 11)
-+ ((eq c 'DefineWord) 13)
-+ ((eq c 'DeleteWord) 14)
- ((eq c 'BeginConvert) 15)
- ((eq c 'EndConvert) 16)
- ((eq c 'GetCandidacyList) 17)
- ((eq c 'GetYomi) 18)
- ((eq c 'ResizePause) 26)
-+ ((eq c 'GetHinshi) 27)
-+ ((eq c 'GetLex) 28)
-+ ((eq c 'SetApplicationName) 33)
-+ ((eq c 'NoticeGroupName) 34)
-
- ((eq c 'CreateDictionary) 3)
-+ ((eq c 'Sync) 8)
- (t (error "No such constant")))))
-
-+;; XXX
-+(defconst cannarpc-error-message (vector ))
-+
- (defun cannarpc-get-error-message (errno)
-- (or (aref cannarpc-error-message errno) (format "#%d" errno)))
-+ (or (and (>= errno 0)
-+ (< errno (length cannarpc-error-message))
-+ (aref cannarpc-error-message errno))
-+ (format "#%d" errno)))
-
- (defmacro cannarpc-call-with-environment (e vlist send-expr &rest receive-exprs)
- (let ((v (append
-@@ -73,54 +87,101 @@
- (goto-char (prog1 (point) (accept-process-output proc))))
- receive-exprs))))
-
--(defconst canna-version-fmt "2.0:%s")
-+(defconst canna-version-fmt "3.3:%s")
-
- (defun cannarpc-open (proc username)
- "Open the session. Return 0 on success, error code on failure."
- (let ((verusr (format canna-version-fmt username)))
-- (comm-call-with-proc proc (result)
-- (comm-format (u u v) (canna-const Initialize) (length verusr) verusr)
-- (comm-unpack (u) result)
-- result)))
-+ (comm-call-with-proc proc (minor context)
-+ (comm-format (u u s) (canna-const Initialize) (+ (length verusr) 1)
-+ verusr)
-+ (comm-unpack (w w) minor context)
-+ (cond ((and (= minor 65535) (= context 65535))
-+ -1) ; failure
-+ ((and (= minor 65535) (= context 65534))
-+ -1) ; version miss match
-+ (t context)))))
-
- (defun cannarpc-close (proc)
- (comm-call-with-proc proc (dummy result)
- (comm-format (b b w) (canna-const Finalize) 0 0)
-- (comm-unpack (b b w b) dummy dummy dummy result)
-- result))
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1 ; failure
-+ result)))
-
- (defun cannarpc-create-context (proc)
- (comm-call-with-proc proc (dummy result)
- (comm-format (b b w) (canna-const CreateContext) 0 0)
-- (comm-unpack (b b w w) dummy dummy dummy result)
-- result))
-+ (comm-unpack (u w) dummy result)
-+ (if (= result 65535)
-+ -1 ; failure
-+ result)))
-
--(defun cannarpc-close-context (proc context)
-- (comm-call-with-proc proc (dummy result)
-+(defun cannarpc-close-context (env)
-+ (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w) (canna-const CloseContext) 0 2 context)
-- (comm-unpack (b b w b) dummy dummy dummy result)
-- result))
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1 ; failure
-+ result)))
-
--;; XXX: Not implemented fully
- (defun cannarpc-get-dictionary-list (env)
-- (cannarpc-call-with-environment env (dymmy result)
-+ (let ((i 0)
-+ dic dl dic-list)
-+ (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w w) (canna-const GetDictionaryList) 0 4
- context 1024)
- (comm-unpack (u w) dummy result)
- ;; follow list of dictionaries
-- result))
-+ (if (= result 65535)
-+ -1 ; failure
-+ (while (< i result)
-+ (comm-unpack (s) dic)
-+ (if dl
-+ (setq dl (setcdr dl (cons dic nil)))
-+ (setq dic-list (setq dl (cons dic nil))))
-+ (setq i (1+ i)))
-+ dic-list))))
-
--;; XXX: Not implemented fully
- (defun cannarpc-get-directory-list (env)
-- (cannarpc-call-with-environment env (dymmy result)
-+ (let ((i 0)
-+ dir dl dir-list)
-+ (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w w) (canna-const GetDirectoryList) 0 4
- context 1024)
- (comm-unpack (u w) dummy result)
- ;; follow list of directories
-- result))
-+ (if (= result 65535)
-+ -1 ; failure
-+ (while (< i result)
-+ (comm-unpack (s) dir)
-+ (if dl
-+ (setq dl (setcdr dl (cons dir nil)))
-+ (setq dir-list (setq dl (cons dir nil))))
-+ (setq i (1+ i)))
-+ dir-list))))
-+
-+(defun cannarpc-get-mount-dictionary-list (env)
-+ (let ((i 0)
-+ dic dl dic-list)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w w) (canna-const GetMountDictionaryList) 0 4
-+ context 1024)
-+ (comm-unpack (u w) dummy result)
-+ ;; follow list of dictionaries
-+ (if (= result 65535)
-+ -1 ; failure
-+ (while (< i result)
-+ (comm-unpack (s) dic)
-+ (if dl
-+ (setq dl (setcdr dl (cons dic nil)))
-+ (setq dic-list (setq dl (cons dic nil))))
-+ (setq i (1+ i)))
-+ dic-list))))
-
- (defun cannarpc-open-dictionary (env dict-file-name mode)
-- (cannarpc-call-with-environment env (dymmy result)
-+ (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w u w s) (canna-const MountDictionary) 0
- (+ (length dict-file-name) 7)
- mode context dict-file-name)
-@@ -128,27 +189,28 @@
- result))
-
- (defun cannarpc-close-dictionary (env dict-file-name mode)
-- (cannarpc-call-with-environment env (dymmy result)
-+ (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w u w s) (canna-const UnmountDictionary) 0
-- (+ (length dict-file-name) 6)
-+ (+ (length dict-file-name) 7)
- mode context dict-file-name)
- (comm-unpack (u b) dummy result)
- result))
-
- (defun cannarpc-begin-conversion (env yomi)
- "Begin conversion."
-- (let ((yomi-ext (encode-coding-string yomi 'euc-japan))
-+ (let ((yomi-ext (encode-coding-string yomi 'fixed-euc-jp))
-+ (mode (or (cannaenv-get-mode env) 19)) ; 19 kana hiragana
- (i 0)
- converted bunsetsu-list bl)
- (cannarpc-call-with-environment env (dummy result)
-- (comm-format (b b w u w S) (canna-const BeginConvert) 0
-- (+ (length yomi-ext) 8) 0 context yomi)
-+ (comm-format (b b w i w S) (canna-const BeginConvert) 0
-+ (+ (length yomi-ext) 8) mode context yomi)
- (comm-unpack (u w) dummy result)
- (if (= result 65535)
- -1 ; failure
- (while (< i result)
- (comm-unpack (S) converted)
-- (let ((bl1 (cons (canna-make-bunsetsu env converted i)
-+ (let ((bl1 (cons (canna-make-bunsetsu env converted i nil)
- nil)))
- (if bl
- (setq bl (setcdr bl bl1))
-@@ -156,11 +218,21 @@
- (setq i (1+ i)))
- bunsetsu-list))))
-
-+(defun cannarpc-cancel-conversion (env)
-+ "Cancel conversion."
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w w u) (canna-const EndConvert) 0 8 context 0 0)
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1 ; failure
-+ result)))
-+
- (defun cannarpc-end-conversion (env len zenkouho-pos-vector mode)
- "End conversion."
- (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w w u v) (canna-const EndConvert) 0
-- (+ (* len 2) 8) context len mode zenkouho-pos-vector)
-+ (+ (* len 2) 8) context len mode zenkouho-pos-vector
-+ (length zenkouho-pos-vector))
- (comm-unpack (u b) dummy result)
- (if (= result 255)
- -1 ; failure
-@@ -173,6 +245,24 @@
- (comm-unpack (u b) dummy result)
- result))
-
-+(defun cannarpc-save-dictionary (env dict-name)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w u w s) (canna-const Sync) 1
-+ (+ (length dict-name) 7) 0 context dict-name)
-+ (comm-unpack (u b) dummy result)
-+ result))
-+
-+;;; XXX not used
-+(defun cannarpc-get-dictionary-data (env dir dic)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w s s w) 6 1
-+ (+ (length dir) (length dic) 6) context dir dic 4096)
-+ (comm-unpack (u w) dummy result)
-+ (if (= result 65535)
-+ -1
-+;; (comm-unpack (S) result)
-+ result)))
-+
- (defun cannarpc-get-bunsetsu-source (env bunsetsu-pos)
- (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w w w) (canna-const GetYomi) 0 6 context
-@@ -183,23 +273,123 @@
- (comm-unpack (S) result)
- result)))
-
--(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos)
-+(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos yomi)
- (let ((i 0)
- converted bunsetsu-list bl)
- (cannarpc-call-with-environment env (dummy result)
- (comm-format (b b w w w w) (canna-const GetCandidacyList) 0 6 context
- bunsetsu-pos 1024)
-- (comm-unpack (u w) dymmy result)
-+ (comm-unpack (u w) dummy result)
- (if (= result 65535)
- -1 ; failure
- (while (< i result)
- (comm-unpack (S) converted)
-- (let ((bl1 (cons (canna-make-bunsetsu env converted bunsetsu-pos)
-+ (let ((bl1 (cons (canna-make-bunsetsu env converted
-+ bunsetsu-pos yomi)
- nil)))
- (if bl
- (setq bl (setcdr bl bl1))
- (setq bunsetsu-list (setq bl bl1))))
- (setq i (1+ i)))
- bunsetsu-list))))
-+
-+(defun cannarpc-set-kugiri-changed (env yomi-length bunsetsu-pos)
-+ ;; yomi-length -2$B!DJ8@a=L$a(B -1$B!DJ8@a?-$P$7(B
-+ (let* ((i bunsetsu-pos)
-+ converted bunsetsu-list bl)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w w w) (canna-const ResizePause) 0 6 context
-+ bunsetsu-pos yomi-length)
-+ (comm-unpack (u w) dummy result)
-+ (if (= result 65535)
-+ -1 ; failure
-+ (while (< i result)
-+ (comm-unpack (S) converted)
-+ (let ((bl1 (cons (canna-make-bunsetsu env converted i nil) nil)))
-+ (if bl
-+ (setq bl (setcdr bl bl1))
-+ (setq bunsetsu-list (setq bl bl1))))
-+ (setq i (1+ i)))
-+ bunsetsu-list))))
-+
-+(defun cannarpc-get-hinshi (env bunsetsu-pos kouho-pos)
-+ (let (b hinshi)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w w w w) (canna-const GetHinshi) 0 8 context
-+ bunsetsu-pos kouho-pos 1024)
-+ (comm-unpack (u w) dummy result)
-+ (if (= result 65535)
-+ -1
-+ (while (> result 0)
-+ (comm-unpack (w) b)
-+ (setq hinshi (concat hinshi (char-to-string b)))
-+ (setq result (1- result)))
-+ hinshi))))
-+
-+(defun cannarpc-get-lex (env bunsetsu-pos kouho-pos)
-+ (let ((i 0)
-+ ylen klen rownum coldnum dicnum lex-list ll)
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w w w w) (canna-const GetLex) 0 8 context
-+ bunsetsu-pos kouho-pos 1024)
-+ (comm-unpack (u w) dummy result)
-+ (if (= result 65535)
-+ -1
-+ (while (< i result)
-+ (comm-unpack (i i i i i) ylen klen rownum coldnum dicnum)
-+ (let ((ll1 (cons (list ylen klen rownum coldnum dicnum) nil)))
-+ (if ll
-+ (setq ll (setcdr ll ll1))
-+ (setq lex-list (setq ll ll1))))
-+ (setq i (1+ i)))
-+ lex-list))))
-+
-+(defun cannarpc-add-word (env dictionary yomi kanji hinshi)
-+ "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
-+a part of speech HINSHI. Where DICTIONARY should be an integer."
-+ (let* ((word-info (concat yomi " " hinshi " " kanji))
-+ (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
-+ (length (+ (length word-info-ext) (length dictionary) 5)))
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w S s) (canna-const DefineWord) 0 length context
-+ word-info dictionary)
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1 ; failure
-+ result))))
-+
-+(defun cannarpc-delete-word (env dictionary yomi kanji hinshi)
-+ "Delete the registered word KANJI from DICTIONARY with a
-+pronunciation YOMI and a part of speech HINSHI. Where DICTIONARY
-+should be an integer."
-+ (let* ((word-info (concat yomi " " hinshi " " kanji))
-+ (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
-+ (length (+ (length word-info-ext) (length dictionary) 5)))
-+ (cannarpc-call-with-environment env (dummy result)
-+ (comm-format (b b w w S s) (canna-const DeleteWord) 0 length context
-+ word-info dictionary)
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1 ; failure
-+ result))))
-+
-+(defun cannarpc-notice-group-name (proc context group)
-+ (comm-call-with-proc proc (dummy result)
-+ (comm-format (b b w u w s) (canna-const NoticeGroupName) 0
-+ (+ (length group) 7) 0 ;; mode = 0
-+ context group)
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1
-+ result)))
-+
-+(defun cannarpc-set-app-name (proc context name)
-+ (comm-call-with-proc proc (dummy result)
-+ (comm-format (b b w u w s) (canna-const SetApplicationName) 0
-+ (+ (length name) 7) 0 context name)
-+ (comm-unpack (u b) dummy result)
-+ (if (= result 255)
-+ -1
-+ result)))
-
- ;;; egg/cannarpc.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/sj3.el ./egg/sj3.el
---- ../tamago-4.0.6/egg/sj3.el Thu Jan 13 16:09:50 2000
-+++ ./egg/sj3.el Mon Jul 22 22:18:56 2002
-@@ -35,33 +35,89 @@
- (require 'egg-edep)
-
- (defgroup sj3 nil
-- "SJ3 interface for Tamago 4"
-+ "SJ3 interface for Tamago 4."
- :group 'egg)
-
--(defcustom sj3-hostname "localhost"
-- "*Hostname of SJ3 server"
-+(defcustom sj3-hostname "localhost"
-+ "Hostname of SJ3 server"
- :group 'sj3 :type 'string)
-
--(defcustom sj3-server-port 3086
-- "*Port number of SJ3 server"
-+(defcustom sj3-server-port 3086
-+ "Port number of SJ3 server"
- :group 'sj3 :type 'integer)
-
--(defcustom sj3-server-version 2
-- "Major version number of SJ3 server."
-- :group 'sj3
-- :type '(choice (const 1) (const 2)))
--
--(defcustom sj3-server-coding-system-list '(shift_jis euc-japan)
-- "List of coding systems for SJ3 server v1 and v2."
-- :group 'sj3
-- :type '(list (symbol :tag "v1") (symbol :tag "v2")))
--
-
- (eval-when-compile
- (defmacro SJ3-const (c)
- (cond ((eq c 'FileNotExist) 35)
- )))
-
-+(egg-add-message
-+ '((Japanese
-+ (sj3-register-1 "$BEPO?<-=qL>(B:")
-+ (sj3-register-2 "$BIJ;lL>(B"))))
-+
-+(defvar sj3-hinshi-menu
-+ '(("$BL>;l(B" .
-+ (menu "$BIJ;l(B:$BL>;l(B:"
-+ (("$BL>;l(B" . 1)
-+ ("$BL>;l(B($B$*!D(B)" . 2)
-+ ("$BL>;l(B($B$4!D(B)" . 3)
-+ ("$BL>;l(B($B!DE*(B/$B2=(B)" . 4)
-+ ("$BL>;l(B($B$*!D$9$k(B)" . 5)
-+ ("$BL>;l(B($B!D$9$k(B)" . 6)
-+ ("$BL>;l(B($B$4!D$9$k(B)" . 7)
-+ ("$BL>;l(B($B!D$J(B/$B$K(B)" . 8)
-+ ("$BL>;l(B($B$*!D$J(B/$B$K(B)" . 9)
-+ ("$BL>;l(B($B$4!D$J(B/$B$K(B)" . 10)
-+ ("$BL>;l(B($BI{;l(B)" . 11))))
-+ ("$BBeL>;l(B" . 12)
-+ ("$BID;z(B" . 21)
-+ ("$BL>A0(B" . 22)
-+ ("$BCOL>(B" . 24)
-+ ("$B8)(B/$B6hL>(B" . 25)
-+ ("$BF0;l(B" .
-+ (menu "$BIJ;l(B:$BF0;l(B:"
-+ (("$B%5JQ8l44(B" . 80)
-+ ("$B%6JQ8l44(B" . 81)
-+ ("$B0lCJITJQ2=It(B" . 90)
-+ ("$B%+9T8^CJ8l44(B" . 91)
-+ ("$B%,9T8^CJ8l44(B" . 92)
-+ ("$B%59T8^CJ8l44(B" . 93)
-+ ("$B%?9T8^CJ8l44(B" . 94)
-+ ("$B%J9T8^CJ8l44(B" . 95)
-+ ("$B%P9T8^CJ8l44(B" . 96)
-+ ("$B%^9T8^CJ8l44(B" . 97)
-+ ("$B%i9T8^CJ8l44(B" . 98)
-+ ("$B%o9T8^CJ8l44(B" . 99))))
-+ ("$BO"BN;l(B" . 26)
-+ ("$B@\B3;l(B" . 27)
-+ ("$B=u?t;l(B" . 29)
-+ ("$B?t;l(B" . 30)
-+ ("$B@\F,8l(B" . 31)
-+ ("$B@\Hx8l(B" . 36)
-+ ("$BI{;l(B" . 45)
-+ ("$BI{;l(B2" . 46)
-+ ("$B7AMF;l8l44(B" . 60)
-+ ("$B7AMFF0;l8l44(B" . 71)
-+ ("$BC14A;z(B" . 189))
-+ "Menu data for a hinshi (a part of speech) selection.")
-+
-+(defun sj3-hinshi-name (id &optional menu alist)
-+ "Return a hinshi (a part of speech) name corresponding to ID.
-+If ID is nil, return a flattened alist from `sj3-hinshi-menu'.
-+Don't specify the optional arguments in normal use."
-+ (let ((menu (or menu sj3-hinshi-menu)))
-+ (if (consp menu)
-+ (if (consp (cdr menu))
-+ (mapcar (lambda (elem)
-+ (setq alist (sj3-hinshi-name nil elem alist)))
-+ menu)
-+ (setq alist (nconc alist (list (cons (cdr menu) (car menu)))))))
-+ (if id
-+ (cdr (assq id alist))
-+ alist)))
-+
- (setplist 'sj3-conversion-backend
- '(egg-start-conversion sj3-start-conversion
- egg-get-bunsetsu-source sj3-get-bunsetsu-source
-@@ -71,7 +127,8 @@
- egg-list-candidates sj3-list-candidates
- egg-decide-candidate sj3-decide-candidate
- egg-change-bunsetsu-length sj3-change-bunsetsu-length
-- egg-end-conversion sj3-end-conversion))
-+ egg-end-conversion sj3-end-conversion
-+ egg-word-registration sj3-word-registration))
-
- (defconst sj3-backend-alist '((Japanese ((sj3-conversion-backend)))))
-
-@@ -90,7 +147,7 @@
- ((error quit)
- (egg-error "failed to connect sj3 server")))
- (process-kill-without-query proc)
-- (set-process-coding-system proc 'no-conversion 'no-conversion)
-+ (set-process-coding-system proc 'binary 'binary)
- (set-marker-insertion-type (process-mark proc) t)
- (save-excursion
- (set-buffer buf)
-@@ -141,7 +198,7 @@
- ;; (if proc
- ;; (progn
- ;; (process-kill-without-query proc)
--;; (set-process-coding-system proc 'no-conversion 'no-conversion)
-+;; (set-process-coding-system proc 'binary 'binary)
- ;; (set-marker-insertion-type (process-mark proc) t)
- ;; ;; Initialize dictionaries
- ;; (setq sj3-sys-dict-list nil)
-@@ -353,7 +410,7 @@ Return the list of bunsetsu."
- (list (list candidate))))
-
- (defun sj3-change-bunsetsu-length (bunsetsu prev-b next-b len major)
-- (let ((yomi (apply 'concat (mapcar 'sj3bunsetsu-get-source bunsetsu)))
-+ (let ((yomi (mapconcat 'sj3bunsetsu-get-source bunsetsu nil))
- (env (sj3bunsetsu-get-env (car bunsetsu)))
- (old (car bunsetsu))
- new yomi1 yomi2)
-@@ -361,7 +418,7 @@ Return the list of bunsetsu."
- yomi2 (substring yomi len))
- (setq new (sj3rpc-tanbunsetsu-conversion env yomi1))
- ;; Only set once (memory original length of the bunsetsu).
-- (sj3bunsetsu-set-kugiri-changed new
-+ (sj3bunsetsu-set-kugiri-changed new
- (or (sj3bunsetsu-get-kugiri-changed old)
- (length (sj3bunsetsu-get-source old))))
- (if (> (length yomi2) 0)
-@@ -381,6 +438,37 @@ Return the list of bunsetsu."
- (sj3rpc-close proc)
- (setq sj3-environment nil))))
-
-+;;; word registration
-+
-+(defun sj3-dictionary-select ()
-+ (menudiag-select (list 'menu
-+ (egg-get-message 'sj3-register-1)
-+ (aref (nth 2 sj3-dictionary-specification) 0))))
-+
-+(defun sj3-hinshi-select ()
-+ (menudiag-select (list 'menu
-+ (egg-get-message 'sj3-register-2)
-+ sj3-hinshi-menu)))
-+
-+(defun sj3-word-registration (backend kanji yomi)
-+ "Register a word KANJI with a pronunciation YOMI."
-+ (if (or (null (eq (egg-get-language 0 kanji)
-+ (sj3-get-converted-language backend)))
-+ (next-single-property-change 0 'egg-lang kanji)
-+ (null (eq (egg-get-language 0 yomi)
-+ (sj3-get-source-language backend)))
-+ (next-single-property-change 0 'egg-lang yomi))
-+ (egg-error "word registration: invalid character")
-+ (let* ((env (sj3-get-environment))
-+ (dic (sj3-dictionary-select))
-+ (hinshi-id (sj3-hinshi-select))
-+ (result (sj3rpc-add-word env
-+ (car (aref env 1))
-+ yomi kanji hinshi-id)))
-+ (if (>= result 0)
-+ (list (sj3-hinshi-name hinshi-id) dic)
-+ (egg-error (sj3rpc-get-error-message (- result)))))))
-+
- ;;; setup
-
- (load "egg/sj3rpc")
-@@ -388,7 +476,7 @@ Return the list of bunsetsu."
-
- ;;;###autoload
- (defun egg-activate-sj3 (&rest arg)
-- "Activate SJ3 backend of Tamagotchy."
-+ "Activate SJ3 backend of Tamago 4."
- (apply 'egg-mode (append arg sj3-backend-alist)))
-
- ;;; egg/sj3.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/sj3rpc.el ./egg/sj3rpc.el
---- ../tamago-4.0.6/egg/sj3rpc.el Thu Jan 13 12:36:08 2000
-+++ ./egg/sj3rpc.el Sun Jan 28 03:53:13 2001
-@@ -31,9 +31,18 @@
-
- ;;; Code:
-
-+(defvar sj3-server-version 2
-+ "*Major version number of SJ3 server.")
-+
-+(defvar sj3-server-coding-system 'shift_jis
-+ "*Coding system used when decoding and encoding of I/O operation with
-+SJ3 server. Valid coding systems are depend on the server spec.")
-+
- (eval-when-compile
- (require 'egg-com)
--;; (load-library "egg/sj3")
-+ (defmacro sj3-sjis-p ()
-+ '(eq 'coding-category-sjis (coding-system-category
-+ sj3-server-coding-system)))
- (defmacro sj3-const (c)
- (cond ((eq c 'OPEN) 1)
- ((eq c 'CLOSE) 2)
-@@ -44,20 +53,20 @@
- ((eq c 'STDYSIZE) 23)
- ((eq c 'LOCK) 31)
- ((eq c 'UNLOCK) 32)
-- ((eq c 'BEGIN) '(if (eq 1 sj3-server-version) 41 111))
-- ((eq c 'TANCONV) '(if (eq 1 sj3-server-version) 51 112))
-- ((eq c 'KOUHO) '(if (eq 1 sj3-server-version) 54 115))
-- ((eq c 'KOUHOSU) '(if (eq 1 sj3-server-version) 55 116))
-+ ((eq c 'BEGIN) '(if (sj3-sjis-p) 41 111))
-+ ((eq c 'TANCONV) '(if (sj3-sjis-p) 51 112))
-+ ((eq c 'KOUHO) '(if (sj3-sjis-p) 54 115))
-+ ((eq c 'KOUHOSU) '(if (sj3-sjis-p) 55 116))
- ((eq c 'STDY) 61)
-- ((eq c 'CLSTDY) '(if (eq 1 sj3-server-version) 62 117))
-- ((eq c 'WREG) '(if (eq 1 sj3-server-version) 71 118))
-- ((eq c 'WDEL) '(if (eq 1 sj3-server-version) 72 119))
-+ ((eq c 'CLSTDY) '(if (sj3-sjis-p) 62 117))
-+ ((eq c 'WREG) '(if (sj3-sjis-p) 71 118))
-+ ((eq c 'WDEL) '(if (sj3-sjis-p) 72 119))
- ((eq c 'MKDIC) 81)
- ((eq c 'MKSTDY) 82)
- ((eq c 'MKDIR) 83)
- ((eq c 'ACCESS) 84)
-- ((eq c 'WSCH) '(if (eq 1 sj3-server-version) 91 120))
-- ((eq c 'WNSCH) '(if (eq 1 sj3-server-version) 92 121))
-+ ((eq c 'WSCH) '(if (sj3-sjis-p) 91 120))
-+ ((eq c 'WNSCH) '(if (sj3-sjis-p) 92 121))
- ((eq c 'VERSION) 103)
- (t (error "No such constant")))))
-
-@@ -85,15 +94,12 @@
- (goto-char (prog1 (point) (accept-process-output proc))))
- receive-exprs))))
-
--(defmacro sj3rpc-server-coding-system ()
-- '(nth (1- sj3-server-version) sj3-server-coding-system-list))
--
--(defmacro sj3rpc-unpack-mb-string (coding-system)
-- `(let ((start (point)))
-+(defmacro sj3rpc-unpack-mb-string ()
-+ '(let ((start (point)))
- (while (not (search-forward "\0" nil t))
- (comm-accept-process-output))
- (decode-coding-string (buffer-substring start (1- (point)))
-- ,coding-system)))
-+ sj3-server-coding-system)))
-
- (defun sj3rpc-open (proc myhostname username)
- "Open the session. Return 0 on success, error code on failure."
-@@ -102,7 +108,7 @@
- myhostname username
- ;; program name
- (format "%d.emacs-egg" (emacs-pid)))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- (if (= result -2)
- 0
- result)))
-@@ -110,7 +116,7 @@
- (defun sj3rpc-close (proc)
- (comm-call-with-proc proc (result)
- (comm-format (u) (sj3-const CLOSE))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-get-stdy-size (proc)
-@@ -134,10 +140,9 @@
-
- (defun sj3rpc-begin (env yomi)
- "Begin conversion."
-- (let* ((codesys (sj3rpc-server-coding-system))
-- (yomi-ext (encode-coding-string yomi codesys))
-- (p 0)
-- len source converted stdy bunsetsu-list bl)
-+ (let ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
-+ (p 0)
-+ len source converted stdy bunsetsu-list bl)
- (sj3rpc-call-with-environment env (result)
- (comm-format (u s) (sj3-const BEGIN) yomi-ext)
- (comm-unpack (u) result)
-@@ -148,9 +153,9 @@
- (comm-unpack (b) len)
- (> len 0))
- (setq stdy (sj3rpc-get-stdy proc))
-- (setq converted (sj3rpc-unpack-mb-string codesys))
-+ (setq converted (sj3rpc-unpack-mb-string))
- (setq source (decode-coding-string (substring yomi-ext p (+ p len))
-- codesys)
-+ sj3-server-coding-system)
- p (+ p len))
- (let ((bl1 (cons (sj3-make-bunsetsu env
- source converted nil stdy) nil)))
-@@ -171,7 +176,7 @@
- (defun sj3rpc-close-dictionary (proc dict-no)
- (comm-call-with-proc proc (result)
- (comm-format (u u) (sj3-const DICDEL) dict-no)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-make-dictionary (proc dict-name)
-@@ -181,19 +186,19 @@
- 2048 ; Length
- 256 ; Number
- )
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-open-stdy (proc stdy-name)
- (comm-call-with-proc proc (result)
- (comm-format (u s s) (sj3-const OPENSTDY) stdy-name "")
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-close-stdy (proc)
- (comm-call-with-proc proc (result)
- (comm-format (u) (sj3-const CLOSESTDY))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-make-stdy (proc stdy-name)
-@@ -203,18 +208,17 @@
- 1 ; Step
- 2048 ; Length
- )
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-make-directory (proc name)
- (comm-call-with-proc proc (result)
- (comm-format (u s) (sj3-const MKDIR) name)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun sj3rpc-get-bunsetsu-candidates-sub (proc env yomi yomi-ext len n)
-- (let ((codesys (sj3rpc-server-coding-system))
-- (i 0)
-+ (let ((i 0)
- stdy converted bunsetsu bl bunsetsu-list cylen rest)
- (comm-call-with-proc-1 proc (result)
- (comm-format (u u s) (sj3-const KOUHO) len yomi-ext)
-@@ -224,9 +228,9 @@
- (while (< i n)
- (comm-unpack (u) cylen)
- (setq stdy (sj3rpc-get-stdy proc))
-- (setq converted (sj3rpc-unpack-mb-string codesys))
-+ (setq converted (sj3rpc-unpack-mb-string))
- (setq rest (decode-coding-string (substring yomi-ext cylen)
-- codesys))
-+ sj3-server-coding-system))
- (setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))
- (if bl
- (setq bl (setcdr bl (cons bunsetsu nil)))
-@@ -240,7 +244,7 @@
- bunsetsu-list))))
-
- (defun sj3rpc-get-bunsetsu-candidates (env yomi)
-- (let* ((yomi-ext (encode-coding-string yomi (sj3rpc-server-coding-system)))
-+ (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
- (len (length yomi-ext)))
- (sj3rpc-call-with-environment env (result)
- (comm-format (u u s) (sj3-const KOUHOSU) len yomi-ext)
-@@ -254,9 +258,8 @@
- yomi yomi-ext len result))))))
-
- (defun sj3rpc-tanbunsetsu-conversion (env yomi)
-- (let* ((codesys (sj3rpc-server-coding-system))
-- (yomi-ext (encode-coding-string yomi codesys))
-- (len (length yomi-ext)) cylen stdy converted rest)
-+ (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
-+ (len (length yomi-ext)) cylen stdy converted rest)
- (sj3rpc-call-with-environment env (result)
- (comm-format (u u s) (sj3-const TANCONV) len yomi-ext)
- (comm-unpack (u) result)
-@@ -264,28 +267,35 @@
- (- result)
- (comm-unpack (u) cylen)
- (setq stdy (sj3rpc-get-stdy proc))
-- (setq converted (sj3rpc-unpack-mb-string codesys))
-- (setq rest (decode-coding-string (substring yomi-ext cylen) codesys))
-+ (setq converted (sj3rpc-unpack-mb-string))
-+ (setq rest (decode-coding-string (substring yomi-ext cylen)
-+ sj3-server-coding-system))
- (setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))))))
-
- (defun sj3rpc-bunsetsu-stdy (env stdy)
- (sj3rpc-call-with-environment env (result)
- (comm-format (u v) (sj3-const STDY) stdy (length stdy))
- (comm-unpack (u) result)
-- (if (/= result 0)
-- (- result)
-- 0)))
-+ (- result)))
-
- (defun sj3rpc-kugiri-stdy (env yomi1 yomi2 stdy)
-- (let* ((codesys (sj3rpc-server-coding-system))
-- (yomi1-ext (encode-coding-string yomi1 codesys))
-- (yomi2-ext (encode-coding-string yomi2 codesys)))
-- (sj3rpc-call-with-environment env (result)
-- (comm-format (u s s v) (sj3-const CLSTDY)
-- yomi1-ext yomi2-ext stdy (length stdy))
-- (comm-unpack (u) result)
-- (if (/= result 0)
-- (- result)
-- 0))))
-+ (sj3rpc-call-with-environment env (result)
-+ (comm-format (u s s v) (sj3-const CLSTDY)
-+ (encode-coding-string yomi1 sj3-server-coding-system)
-+ (encode-coding-string yomi2 sj3-server-coding-system)
-+ stdy (length stdy))
-+ (comm-unpack (u) result)
-+ (- result)))
-+
-+(defun sj3rpc-add-word (env dictionary yomi kanji hinshi)
-+ "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
-+a part of speech HINSHI. Where DICTIONARY should be an integer."
-+ (sj3rpc-call-with-environment env ()
-+ (comm-format (u u s s u) (sj3-const WREG) dictionary
-+ (encode-coding-string yomi sj3-server-coding-system)
-+ (encode-coding-string kanji sj3-server-coding-system)
-+ hinshi)
-+ (comm-unpack (u) result)
-+ (- result)))
-
- ;;; egg/sj3rpc.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/wnn.el ./egg/wnn.el
---- ../tamago-4.0.6/egg/wnn.el Tue Jan 4 16:08:04 2000
-+++ ./egg/wnn.el Mon Jul 22 22:18:56 2002
-@@ -36,7 +36,7 @@
- (require 'egg-edep)
-
- (defgroup wnn nil
-- "Wnn interface for Tamagotchy"
-+ "Wnn interface for Tamago 4."
- :group 'egg)
-
- (defcustom wnn-auto-save-dictionaries 0
-@@ -114,6 +114,7 @@ by ':' and digit N."
- egg-major-bunsetsu-continue-p wnn-major-bunsetsu-continue-p
- egg-list-candidates wnn-list-candidates
- egg-decide-candidate wnn-decide-candidate
-+ egg-special-candidate wnn-special-candidate
- egg-change-bunsetsu-length wnn-change-bunsetsu-length
- egg-bunsetsu-combinable-p wnn-bunsetsu-combinable-p
- egg-end-conversion wnn-end-conversion
-@@ -389,13 +390,12 @@ by ':' and digit N."
-
- ;; <wnn-bunsetsu> ::= [ <env>
- ;; <jirilen> <dic-no> <entry> <freq> <right-now> <hinshi>
--;; <status> <status-backward> <kangovect> <evaluation>
--;; <converted> <yomi> <fuzokugo>
--;; <dai-evaluation> <dai-continue> <change-top>
--;; <zenkouho-info> <freq-down> <fi-rel> <context> ]
-+;; <status> <status-backward> <kangovect> <evaluation>
-+;; <converted> <yomi> <fuzokugo>
-+;; <dai-evaluation> <dai-continue> <change-top>
-+;; <zenkouho-info> <freq-down> <fi-rel> <context> ]
- ;;
- ;; <zenkouho-info> ::= [ <pos> <list> <converted> <dai> <prev-b> <nxet-b> ]
--;;
-
- (defsubst wnn-bunsetsu-create (env jirilen dic-no entry freq right-now hinshi
- status status-backward kangovect evaluation)
-@@ -556,7 +556,7 @@ by ':' and digit N."
- (copy-sequence (egg-bunsetsu-get-info b))))
- bunsetsu))
-
--(defconst wnn-server-info-list
-+(defvar wnn-server-info-list
- ;; language server port hostname proc coding-system
- '((Japanese jserver wnn-jport wnn-jserver "Wnn" (fixed-euc-jp fixed-euc-jp))
- (Chinese-GB cserver wnn-cport wnn-cserver "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn))
-@@ -657,20 +657,28 @@ Return the list of bunsetsu."
- (defun wnn-major-bunsetsu-continue-p (bunsetsu)
- (wnn-bunsetsu-get-dai-continue bunsetsu))
-
-+(defmacro wnn-uniq-hash-string (uniq-level)
-+ `(mapconcat
-+ (lambda (b)
-+ (concat ,@(cond ((eq uniq-level 'wnn-uniq)
-+ '((number-to-string (wnn-bunsetsu-get-hinshi b))))
-+ ((eq uniq-level 'wnn-uniq-entry)
-+ '((number-to-string (wnn-bunsetsu-get-dic-no b))
-+ "+"
-+ (number-to-string (wnn-bunsetsu-get-entry b)))))
-+ "\0"
-+ (wnn-bunsetsu-get-converted b)
-+ "\0"
-+ (wnn-bunsetsu-get-fuzokugo b)))
-+ bunsetsu "\0"))
-+
- (defun wnn-uniq-hash (bunsetsu hash-table)
-- (intern (mapconcat (lambda (b)
-- (concat (cond
-- ((eq wnn-uniq-level 'wnn-uniq)
-- (wnn-bunsetsu-get-hinshi b))
-- ((eq wnn-uniq-level 'wnn-uniq-entry)
-- (concat (wnn-bunsetsu-get-dic-no b)
-- "+"
-- (wnn-bunsetsu-get-entry b))))
-- (concat "\0"
-- (wnn-bunsetsu-get-converted b)
-- "\0"
-- (wnn-bunsetsu-get-fuzokugo b))))
-- bunsetsu "\0")
-+ (intern (cond ((eq wnn-uniq-level 'wnn-uniq)
-+ (wnn-uniq-hash-string wnn-uniq))
-+ ((eq wnn-uniq-level 'wnn-uniq-entry)
-+ (wnn-uniq-hash-string wnn-uniq-entry))
-+ (t
-+ (wnn-uniq-hash-string nil)))
- hash-table))
-
- (defun wnn-uniq-candidates (candidates)
-@@ -786,6 +794,68 @@ Return the list of bunsetsu."
- (setq next-b (list (car next-b))))
- (list cand prev-b next-b)))
-
-+(defun wnn-special-candidate (bunsetsu prev-b next-b major type)
-+ (let* ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
-+ (lang (get backend 'language))
-+ pos cand)
-+ (when (and (eq lang (get backend 'source-language))
-+ (eq lang (get backend 'converted-language)))
-+ (setq pos (and (eq lang (get backend 'source-language))
-+ (eq lang (get backend 'converted-language))
-+ (cond ((eq lang 'Japanese)
-+ (cond ((eq type 'egg-hiragana) -1)
-+ ((eq type 'egg-katakana) -2)))
-+ ((or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS))
-+ (cond ((eq type 'egg-pinyin) -1)
-+ ((eq type 'egg-zhuyin) -1)))
-+ ((eq lang 'Korean)
-+ (cond ((eq type 'egg-hangul) -1))))))
-+ (when pos
-+ (setq cand (cdr (wnn-list-candidates bunsetsu prev-b next-b major))
-+ pos (+ pos (length cand)))
-+ (when (and (or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS)))
-+ (let ((converted (nth pos cand)))
-+ (cond ((egg-pinyin-syllable converted)
-+ (cond ((eq type 'egg-pinyin)) ; OK
-+ ((eq type 'egg-zhuyin)
-+ (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
-+ (t (setq pos nil))))
-+ ((egg-zhuyin-syllable converted)
-+ (cond ((eq type 'egg-pinyin)
-+ (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
-+ ((eq type 'egg-zhuyin)) ; OK
-+ (t (setq pos nil))))
-+ (t (setq pos nil))))))
-+ (when pos
-+ (wnn-decide-candidate bunsetsu pos prev-b next-b)))))
-+
-+(defun wnn-pinyin-zhuyin-bunsetsu (bunsetsu pos lang type)
-+ (let ((b (nth pos (wnn-bunsetsu-get-zenkouho-list (car bunsetsu))))
-+ (encoding (if (eq lang 'Chinese-GB)
-+ (if (eq type 'egg-pinyin)
-+ 'fixed-euc-py-cn 'fixed-euc-zy-cn)
-+ (if (eq type 'egg-pinyin)
-+ 'fixed-euc-py-tw 'fixed-euc-zy-tw)))
-+ (converted (wnn-bunsetsu-get-zenkouho-converted (car bunsetsu)))
-+ str)
-+ (setcar (nthcdr pos converted)
-+ (wnn-pinyin-zhuyin-string (nth pos converted) encoding))
-+ (while b
-+ (setq str (wnn-bunsetsu-get-converted (car b)))
-+ (when str
-+ (wnn-bunsetsu-set-converted
-+ (car b)
-+ (wnn-pinyin-zhuyin-string str encoding)))
-+ (setq str (wnn-bunsetsu-get-fuzokugo (car b)))
-+ (when str
-+ (wnn-bunsetsu-set-fuzokugo
-+ (car b)
-+ (wnn-pinyin-zhuyin-string str encoding)))
-+ (setq b (cdr b)))))
-+
-+(defun wnn-pinyin-zhuyin-string (str encoding)
-+ (decode-coding-string (encode-coding-string str encoding) encoding))
-+
- (defun wnn-change-bunsetsu-length (bunsetsu prev-b next-b len major)
- (let ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
- (env (wnn-bunsetsu-get-env (car bunsetsu)))
-@@ -918,7 +988,7 @@ Return the list of bunsetsu."
- (wnn-bunsetsu-get-right-now b)
- (wnn-bunsetsu-get-freq b))
- context))
-- (wnnrpc-set-frequency env dic-no entry
-+ (wnnrpc-set-frequency env dic-no entry
- (WNN-const IMA_ON) (WNN-const HINDO_INC)))
- (list (car context) (nth 1 context))))
-
-@@ -1139,7 +1209,7 @@ Return the list of bunsetsu."
- (proc-name (wnn-server-proc-name server-info))
- (msg-form "Wnn: connecting to %S at %s...")
- (user-name (user-login-name))
-- buf hostname myname port-off proc result msg)
-+ buf hostname myname port-off proc result msg)
- (unwind-protect
- (progn
- (setq buf (generate-new-buffer (wnn-server-buffer-name server-info)))
-@@ -1175,7 +1245,7 @@ Return the list of bunsetsu."
- ((error quit))))
- (when proc
- (process-kill-without-query proc)
-- (set-process-coding-system proc 'no-conversion 'no-conversion)
-+ (set-process-coding-system proc 'binary 'binary)
- (set-process-sentinel proc 'wnn-comm-sentinel)
- (set-marker-insertion-type (process-mark proc) t)
- (setq result (wnnrpc-open proc myname user-name))
-@@ -1276,7 +1346,7 @@ is non-NIL."
- (setq env-name (if reverse (concat env-name "R") env-name)
- wnn-current-envspec (wnn-envspec-create env-name tankan stickey)
- wnn-current-envspec-reverse reverse
-- wnn-envspec-list (nconc wnn-envspec-list
-+ wnn-envspec-list (nconc wnn-envspec-list
- (list wnn-current-envspec))))
-
- (defun wnn-set-fuzokugo (filename)
-@@ -1359,7 +1429,7 @@ is non-NIL."
- dict freq nil dict-rw freq-rw
- dict-passwd freq-passwd nil))
-
--(defun wnn-add-notrans-dict (dict priority dict-rw
-+(defun wnn-add-notrans-dict (dict priority dict-rw
- &optional dict-passwd &rest reverse)
- (wnn-wnn6-env-func wnn-add-notrans-dict)
- (wnn-add-dict-param-check wnn-add-notrans-dict
-@@ -1705,7 +1775,7 @@ On failure, return negative error code."
- (wnn-create-frequency env fi did fname "" fpass))
- (message (egg-get-message 'wnn-re-create-freq) fname)
- (and (>= (setq fid (wnn-open-file env fname)) 0)
-- (>= (wnnrpc-set-dictionary env
-+ (>= (wnnrpc-set-dictionary env
- did fid prior drw frw
- dpass fpass rev)
- 0))))))))
-@@ -2090,7 +2160,7 @@ environment."
-
- ;;;###autoload
- (defun egg-activate-wnn (&rest arg)
-- "Activate Wnn backend of Tamagotchy."
-+ "Activate Wnn backend of Tamago 4."
- (apply 'egg-mode (append arg wnn-backend-alist)))
-
- ;;; egg/wnn.el ends here.
-diff -duNrp ../tamago-4.0.6/egg/wnnrpc.el ./egg/wnnrpc.el
---- ../tamago-4.0.6/egg/wnnrpc.el Tue Jan 4 15:49:24 2000
-+++ ./egg/wnnrpc.el Mon Jul 22 22:18:56 2002
-@@ -162,8 +162,8 @@
- ((eq c 'WNN_NOT_A_FILE) 98)
- ((eq c 'WNN_INODE_CHECK_ERROR) 99)
-
-- ((eq c 'WNN_UD_DICT) 2)
-- ((eq c 'WNN_REV_DICT) 3)
-+ ((eq c 'WNN_UD_DICT) 2)
-+ ((eq c 'WNN_REV_DICT) 3)
- ((eq c 'CWNN_REV_DICT) ?\x103)
- ((eq c 'BWNN_REV_DICT) ?\x203)
- ((eq c 'WNN_COMPACT_DICT) 5)
-@@ -693,10 +693,10 @@
-
- (defmacro wnnrpc-get-result (&rest body)
- `(let (result)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- (if (< result 0)
- (progn
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- (- result))
- ,@(or body '(result)))))
-
-@@ -725,7 +725,7 @@
-
- (defun wnnrpc-connect (proc envname)
- "Establish new `connection' and make an environment.
--Return the identitifation of the environment on success,
-+Return the identitifation of the environment on success,
- or negative error code on failure."
- (comm-call-with-proc proc ()
- (comm-format (u s) (wnn-const JS_CONNECT) envname)
-@@ -739,7 +739,7 @@ Return non-negative file ID on success,
- (wnnrpc-get-result)))
-
- (defun wnnrpc-set-fuzokugo-file (env fid)
-- "For PROC, on environment ENV-ID,
-+ "For PROC, on environment ENV-ID,
- Set Fuzokugo file specified by FID.
- Return 0 on success, negate-encoded error code on failure."
- (wnnrpc-call-with-environment env ()
-@@ -783,7 +783,7 @@ error code on faiulure."
- (comm-format (u u u) (wnn-const JS_GET_AUTOLEARNING_DIC)
- env-id type)
- (wnnrpc-get-result
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- (1+ result))))
-
- (defun wnnrpc-set-autolearning-dic (env type dic-id)
-@@ -798,16 +798,16 @@ Return 0 on success, negate-encoded erro
- "Return the version number of WNN server."
- (comm-call-with-proc proc (result)
- (comm-format (u) (wnn-const JS_VERSION))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
--(defun wnnrpc-access (env path mode)
-+(defun wnnrpc-access (env path mode)
- "Check the accessibility of file in the environment ENV.
- Return 0 when the remote file (dictionary/frequency) of PATH on server
- can be accessed in mode MODE. Return Non-zero otherwise."
- (wnnrpc-call-with-environment env (result)
- (comm-format (u u u s) (wnn-const JS_ACCESS) env-id mode path)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun wnnrpc-mkdir (env path)
-@@ -904,7 +904,7 @@ Return positive if loaded, zero if not,
- hinshi status status-backward kangovect evaluation
- result source fuzokugo)
- (while (> n-bunsetsu 0)
-- (comm-unpack (u u u u u u u u u u u u)
-+ (comm-unpack (i i i i i i i i i i i i)
- end start jiritsugo-end
- dic-no entry freq right-now hinshi
- status status-backward kangovect evaluation)
-@@ -929,9 +929,9 @@ Return positive if loaded, zero if not,
- n-bunstsu kanji-length dlist slist
- end start n-sho evaluation
- n retval)
-- (comm-unpack (u u) n-bunstsu kanji-length)
-+ (comm-unpack (i i) n-bunstsu kanji-length)
- (while (> n-dai 0)
-- (comm-unpack (u u u u) end start n-sho evaluation)
-+ (comm-unpack (i i i i) end start n-sho evaluation)
- (setq dlist (cons (cons n-sho evaluation) dlist)
- n-dai (1- n-dai)))
- (setq dlist (nreverse dlist)
-@@ -1010,7 +1010,7 @@ HINSHI and FUZOKUGO are information of p
- fi-dic dic entry offset num result)
- (comm-unpack (i) num)
- (while (> num 0)
-- (comm-unpack (u u u u) fi-dic dic entry offset)
-+ (comm-unpack (i i i i) fi-dic dic entry offset)
- (setq result (cons (vector fi-dic dic entry offset -2 -4) result)
- num (1- num)))
- (nreverse result)))
-@@ -1110,7 +1110,7 @@ HINSHI and FUZOKUGO are information of p
- ""
- (comm-call-with-proc proc (result)
- (comm-format (u s) (wnn-const JS_ENV_EXIST) envname)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun wnnrpc-make-env-sticky (env)
-@@ -1156,14 +1156,14 @@ HINSHI and FUZOKUGO are information of p
- ""
- (wnnrpc-call-with-environment env (n-dic)
- (comm-format (u u) (wnn-const JS_DIC_LIST) env-id)
-- (comm-unpack (u) n-dic)
-+ (comm-unpack (i) n-dic)
- (wnnrpc-receive-dictionary-list proc n-dic)))
-
- (defun wnnrpc-get-fi-dictionary-list-with-environment (env mask)
- ""
- (wnnrpc-call-with-environment env (n-dic)
- (comm-format (u u u) (wnn-const JS_FI_DIC_LIST) env-id mask)
-- (comm-unpack (u) n-dic)
-+ (comm-unpack (i) n-dic)
- (wnnrpc-receive-dictionary-list proc n-dic)))
-
- (defun wnnrpc-receive-dictionary-list (proc n-dic)
-@@ -1171,7 +1171,7 @@ HINSHI and FUZOKUGO are information of p
- rev comment dicname freqname dic-passwd freq-passwd
- type gosuu dic-local-flag freq-local-flag retval)
- (while (> n-dic 0)
-- (comm-unpack (u u u u u u u u S s s s s u u u u)
-+ (comm-unpack (i i i i i i i i S s s s s i i i i)
- entry dic freq dic-mode freq-mode enable-flag nice
- rev comment dicname freqname dic-passwd freq-passwd
- type gosuu dic-local-flag freq-local-flag)
-@@ -1193,7 +1193,7 @@ HINSHI and FUZOKUGO are information of p
- (comm-format (u u i) (wnn-const JS_HINSI_DICTS) env-id -1)
- (wnnrpc-get-result
- (while (> result 0)
-- (comm-unpack (u) dic)
-+ (comm-unpack (i) dic)
- (setq dic-list (nconc dic-list (list dic))
- result (1- result)))
- dic-list)))
-@@ -1222,7 +1222,7 @@ HINSHI and FUZOKUGO are information of p
- p10 p11 p12 p13 p14 p15)
- (comm-format (u u) (wnn-const JS_PARAM_GET) env-id)
- (wnnrpc-get-result
-- (comm-unpack (u u u u u u u u u u u u u u u u u)
-+ (comm-unpack (i i i i i i i i i i i i i i i i i)
- n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
- p10 p11 p12 p13 p14 p15)
- (vector n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15))))
-@@ -1243,7 +1243,7 @@ HINSHI and FUZOKUGO are information of p
- ""
- (comm-call-with-proc proc (result)
- (comm-format (u s) (wnn-const JS_FILE_LOADED) path)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun wnnrpc-write-file (env fid filename)
-@@ -1261,9 +1261,9 @@ HINSHI and FUZOKUGO are information of p
- (let ((i 0)
- flist
- nfiles fid local ref-count type name)
-- (comm-unpack (u) nfiles)
-+ (comm-unpack (i) nfiles)
- (while (> nfiles 0)
-- (comm-unpack (u u u u s) fid local ref-count type name)
-+ (comm-unpack (i i i i s) fid local ref-count type name)
- (setq flist (nconc flist (list (vector fid local ref-count type name)))
- nfiles (1- nfiles)))
- flist))
-@@ -1284,7 +1284,7 @@ HINSHI and FUZOKUGO are information of p
- "3: dictionary, 4: hindo file, 5: fuzokugo-file"
- (wnnrpc-call-with-environment env (result)
- (comm-format (u u s) (wnn-const JS_FILE_STAT) env-id path)
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun wnnrpc-get-file-info (env fid)
-@@ -1292,7 +1292,7 @@ HINSHI and FUZOKUGO are information of p
- (wnnrpc-call-with-environment env (name local ref-count type)
- (comm-format (u u u) (wnn-const JS_FILE_INFO) env-id fid)
- (wnnrpc-get-result
-- (comm-unpack (s u u u) name local ref-count type)
-+ (comm-unpack (s i i i) name local ref-count type)
- (vector name local ref-count type))))
-
- (defmacro wnnrpc-receive-vector (n)
-@@ -1300,7 +1300,7 @@ HINSHI and FUZOKUGO are information of p
- (i 0)
- j)
- (while (< i ,n)
-- (comm-unpack (u) j)
-+ (comm-unpack (i) j)
- (aset v i j)
- (setq i (1+ i)))
- v))
-@@ -1311,7 +1311,7 @@ HINSHI and FUZOKUGO are information of p
- (comm-format (u) (wnn-const JS_WHO))
- (wnnrpc-get-result
- (while (> result 0)
-- (comm-unpack (u s s) socket username hostname)
-+ (comm-unpack (i s s) socket username hostname)
- (setq who (nconc who
- (list (vector socket username hostname
- (wnnrpc-receive-vector
-@@ -1324,7 +1324,7 @@ HINSHI and FUZOKUGO are information of p
- (comm-format (u) (wnn-const JS_ENV_LIST))
- (wnnrpc-get-result
- (while (> result 0)
-- (comm-unpack (u s u u u) id name count fuzokugo dic-max)
-+ (comm-unpack (i s i i i) id name count fuzokugo dic-max)
- (setq envs (nconc envs
- (list (vector id name count fuzokugo dic-max
- (wnnrpc-receive-vector
-@@ -1338,7 +1338,7 @@ HINSHI and FUZOKUGO are information of p
- ""
- (comm-call-with-proc proc (result)
- (comm-format (u) (wnn-const JS_KILL))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))
-
- (defun wnnrpc-delete-dictionary (env dic)
-@@ -1357,7 +1357,7 @@ HINSHI and FUZOKUGO are information of p
- ""
- (wnnrpc-call-with-proc proc (n-dic)
- (comm-format (u) (wnn-const JS_DIC_LIST_ALL))
-- (comm-unpack (u) n-dic)
-+ (comm-unpack (i) n-dic)
- (wnnrpc-receive-dictionary-list proc n-dic)))
-
- (defun wnnrpc-delete-word (env dic entry)
-@@ -1369,15 +1369,15 @@ HINSHI and FUZOKUGO are information of p
- (defun wnnrpc-receive-word (proc yomi)
- (let (dic serial hinshi hindo right-now internal-hindo internal-right-now
- kanji comment l l1)
-- (comm-unpack (u) dic)
-+ (comm-unpack (i) dic)
- (while (>= dic 0)
-- (comm-unpack (u u u u u u) serial hinshi hindo right-now
-+ (comm-unpack (i i i i i i) serial hinshi hindo right-now
- internal-hindo internal-right-now)
- (setq l (cons (vector dic serial hinshi hindo right-now
- internal-hindo internal-right-now
- yomi nil nil)
- l))
-- (comm-unpack (u) dic))
-+ (comm-unpack (i) dic))
- (setq l (nreverse l)
- l1 l)
- (while l1
-@@ -1454,16 +1454,16 @@ HINSHI and FUZOKUGO are information of p
-
- (defmacro wnnrpc-with-temp-buffer (&rest body)
- `(with-temp-buffer
-- (let ((coding-system-for-read 'no-conversion)
-- (coding-system-for-write 'no-conversion))
-+ (let ((coding-system-for-read 'binary)
-+ (coding-system-for-write 'binary))
- (set-buffer-multibyte nil)
- ,@body)))
-
- (defmacro wnnrpc-with-write-file (filename error-handler &rest body)
- `(condition-case error
- (with-temp-file ,filename
-- (let ((coding-system-for-read 'no-conversion)
-- (coding-system-for-write 'no-conversion))
-+ (let ((coding-system-for-read 'binary)
-+ (coding-system-for-write 'binary))
- (set-buffer-multibyte nil)
- ,@body))
- (file-error ,error-handler)))
-@@ -1492,7 +1492,7 @@ HINSHI and FUZOKUGO are information of p
- (wnn-const WNN_FILE_STRING)))
- (progn
- (goto-char (1+ (wnn-const WNN_FILE_STRING_LEN)))
-- (comm-unpack (u v v v)
-+ (comm-unpack (i v v v)
- type
- uniq1 (wnn-const WNN_UNIQ_LEN)
- uniq2 (wnn-const WNN_UNIQ_LEN)
-@@ -1511,7 +1511,7 @@ HINSHI and FUZOKUGO are information of p
- (cond ((null header)
- (- (wnn-const WNN_NOT_A_FILE)))
- ((null (car header))
-- (if (file-exists-p path)
-+ (if (file-exists-p path)
- (- (wnn-const WNN_OPENF_ERR))
- (- (wnn-const WNN_NO_EXIST))))
- (t
-@@ -1534,10 +1534,18 @@ HINSHI and FUZOKUGO are information of p
-
- (defun wnnrpc-make-uniq (attributes)
- (wnnrpc-with-temp-buffer
-- (comm-format (U i u V)
-- (nth 6 attributes) (nth 11 attributes) (nth 10 attributes)
-- wnn-system-name (wnn-const WNN_HOST_LEN))
-- (buffer-string)))
-+ (let ((ctime (nth 6 attributes))
-+ (ino (nth 10 attributes))
-+ (devno (nth 11 attributes)))
-+ (if (numberp devno)
-+ (comm-format (U i u V)
-+ ctime devno ino
-+ wnn-system-name (wnn-const WNN_HOST_LEN))
-+ ;; Emacs 21 returns returns negative devno as 16 bits uint pair
-+ (comm-format (U U u V)
-+ ctime (list (car devno) (cdr devno)) ino
-+ wnn-system-name (wnn-const WNN_HOST_LEN)))
-+ (buffer-string))))
-
- (defun wnnrpc-change-file-uniq (header path &optional new)
- (wnnrpc-with-write-file path
-@@ -1558,27 +1566,28 @@ HINSHI and FUZOKUGO are information of p
- (defun wnnrpc-check-passwd (proc passwd header)
- (let ((env-id -1))
- (unwind-protect
-- (if (>= (setq env-id (wnnrpc-connect proc "")) 0)
-- (wnnrpc-call-with-environment (wnnenv-create proc env-id)
-- (file-id)
-- (comm-format (u u v) (wnn-const JS_FILE_SEND)
-- env-id
-- (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-- (comm-unpack (u) file-id)
-- (if (>= file-id 0)
-- (progn
-- (wnnrpc-get-result) ; ignore result code
-- (- (wnn-const WNN_FILE_IN_USE)))
-- (wnnrpc-get-result
-- (comm-call-with-proc-1 proc ()
-- (comm-format (s B)
-- (concat wnn-system-name "!TEMPFILE")
-- (wnnrpc-make-dummy-dictionary header))
-- (wnnrpc-get-result
-- (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
-- (wnnrpc-set-dictionary (wnnenv-create proc env-id)
-- result -1 1 t t
-- passwd "" nil))))))))
-+ (if (< (setq env-id (wnnrpc-connect proc "")) 0)
-+ -1
-+ (wnnrpc-call-with-environment (wnnenv-create proc env-id)
-+ (file-id)
-+ (comm-format (u u v) (wnn-const JS_FILE_SEND)
-+ env-id
-+ (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-+ (comm-unpack (i) file-id)
-+ (if (>= file-id 0)
-+ (progn
-+ (wnnrpc-get-result) ; ignore result code
-+ (- (wnn-const WNN_FILE_IN_USE)))
-+ (wnnrpc-get-result
-+ (comm-call-with-proc-1 proc ()
-+ (comm-format (s B)
-+ (concat wnn-system-name "!TEMPFILE")
-+ (wnnrpc-make-dummy-dictionary header))
-+ (wnnrpc-get-result
-+ (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
-+ (wnnrpc-set-dictionary (wnnenv-create proc env-id)
-+ result -1 1 t t
-+ passwd "" nil))))))))
- (if (>= env-id 0)
- (wnnrpc-disconnect (wnnenv-create proc env-id))))))
-
-@@ -1603,7 +1612,7 @@ HINSHI and FUZOKUGO are information of p
- (comm-call-with-proc proc (result)
- (comm-format (u v) (wnn-const JS_FILE_LOADED_LOCAL)
- (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-- (comm-unpack (u) result)
-+ (comm-unpack (i) result)
- result))))
-
- (defun wnnrpc-file-receive (env fid local-filename)
-@@ -1629,7 +1638,7 @@ HINSHI and FUZOKUGO are information of p
- (wnnrpc-terminate-current-command WNN_FILE_WRITE_ERROR))
- (t
- (wnnrpc-with-write-file local-filename
-- (- (wnn-const WNN_FILE_WRITE_ERROR))
-+ (- (wnn-const WNN_FILE_WRITE_ERROR))
- (comm-call-with-proc proc ()
- (comm-format (u) (wnn-const WNN_ACK))
- (comm-unpack (B) contents))
-@@ -1654,7 +1663,7 @@ HINSHI and FUZOKUGO are information of p
- (comm-format (u u v) (wnn-const JS_FILE_SEND)
- env-id
- (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-- (comm-unpack (u) file-id)
-+ (comm-unpack (i) file-id)
- (if (>= file-id 0)
- (wnnrpc-get-result
- (wnnenv-set-client-file env filename)
-@@ -1705,7 +1714,7 @@ HINSHI and FUZOKUGO are information of p
- comment passwd hpasswd))
- 0
- (- (wnn-const WNN_FILE_CREATE_ERROR))))
--
-+
-
- (defun wnnrpc-hindo-file-create-client (env fi dic-id freqname comment passwd)
- (if (and (null (file-exists-p freqname))
-@@ -1718,9 +1727,9 @@ HINSHI and FUZOKUGO are information of p
- (defun wnnrpc-make-temp-name (env)
- (let ((n 0)
- (temp-form "usr/temp"))
-- (while (= (wnnrpc-access env (concat temp-form n) 0) 0)
-+ (while (= (wnnrpc-access env (concat temp-form (number-to-string n)) 0) 0)
- (setq n (1+ n)))
-- (concat temp-form n)))
-+ (concat temp-form (number-to-string n))))
-
- (defun wnnrpc-create-and-move-to-client (env dic-id filename type
- comment passwd hpasswd)
-@@ -1750,7 +1759,7 @@ HINSHI and FUZOKUGO are information of p
- (cond
- ((null filename) "")
- ((null (file-readable-p filename)) (- (wnn-const WNN_FILE_READ_ERROR)))
-- (t
-+ (t
- (wnnrpc-with-temp-buffer
- (insert-file-contents filename nil 0 (1- (wnn-const WNN_PASSWD_LEN)))
- (goto-char 1)
-@@ -1759,4 +1768,4 @@ HINSHI and FUZOKUGO are information of p
- (backward-char))
- (buffer-substring 1 (point))))))
-
--;;; egg/wnnrpc.el ends here.
-+;;; egg/wnnrpc.el ends here
-diff -duNrp ../tamago-4.0.6/egg-cnv.el ./egg-cnv.el
---- ../tamago-4.0.6/egg-cnv.el Tue Jan 11 20:59:10 2000
-+++ ./egg-cnv.el Mon Jul 22 22:18:56 2002
+Index: check-jisx0213.el
+===================================================================
+RCS file: check-jisx0213.el
+diff -N check-jisx0213.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ check-jisx0213.el 9 Sep 2002 08:50:42 -0000 1.1
+@@ -0,0 +1,3 @@
++(if (charsetp 'japanese-jisx0213-1)
++ (kill-emacs 0)
++ (kill-emacs 1))
+Index: configure
+===================================================================
+RCS file: /cvs/tamago/tamago/configure,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- configure 27 Jan 2001 18:46:16 -0000 1.1.1.1
++++ configure 9 Sep 2002 08:50:42 -0000 1.2
+@@ -637,6 +637,15 @@ fi
+
+
+
++echo $ac_n "checking jisx0213""... $ac_c" 1>&6
++echo "configure:642: checking jisx0213" >&5
++if emacs -batch -q -no-site-file -no-init-file -l ${srcdir}/check-jisx0213.el; then
++ echo "yes"; HAVE_JISX0213=""
++else
++ echo "no"; HAVE_JISX0213="# "
++fi
++
++
+ lispdir=${datadir}/emacs/site-lisp
+
+ trap '' 1 2 15
+@@ -788,6 +797,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+ s%@INSTALL_DATA@%$INSTALL_DATA%g
+ s%@SET_MAKE@%$SET_MAKE%g
++s%@HAVE_JISX0213@%$HAVE_JISX0213%g
+ s%@lispdir@%$lispdir%g
+
+ CEOF
+Index: configure.in
+===================================================================
+RCS file: /cvs/tamago/tamago/configure.in,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- configure.in 27 Jan 2001 18:46:16 -0000 1.1.1.1
++++ configure.in 9 Sep 2002 08:50:42 -0000 1.2
+@@ -13,6 +13,15 @@ dnl Checks for typedefs, structures, and
+
+ dnl Checks for library functions.
+
++dnl check if jisx0213 is supported or not
++AC_MSG_CHECKING(jisx0213)
++if emacs -batch -q -no-site-file -no-init-file -l ${srcdir}/check-jisx0213.el; then
++ echo "yes"; HAVE_JISX0213=""
++else
++ echo "no"; HAVE_JISX0213="# "
++fi
++AC_SUBST(HAVE_JISX0213)
++
+ lispdir=${datadir}/emacs/site-lisp
+ AC_SUBST(lispdir)
+ AC_OUTPUT(Makefile)
+Index: egg-cnv.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg-cnv.el,v
+retrieving revision 1.1.1.2
+retrieving revision 1.4
+diff -d -u -p -r1.1.1.2 -r1.4
+--- egg-cnv.el 27 Jan 2001 18:46:16 -0000 1.1.1.2
++++ egg-cnv.el 22 Jul 2002 13:18:56 -0000 1.4
@@ -34,19 +34,29 @@
(require 'egg-edep)
@@ -8922,9 +6091,14 @@ diff -duNrp ../tamago-4.0.6/egg-cnv.el ./egg-cnv.el
-;;; egg-cnv.el ends here.
+
+;;; egg-cnv.el ends here
-diff -duNrp ../tamago-4.0.6/egg-com.el ./egg-com.el
---- ../tamago-4.0.6/egg-com.el Tue Jan 4 15:49:56 2000
-+++ ./egg-com.el Sun Jan 28 03:53:13 2001
+Index: egg-com.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg-com.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- egg-com.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg-com.el 27 Jan 2001 18:53:13 -0000 1.2
@@ -136,6 +136,7 @@
(cons ccl-decode-fixed-euc-kr ccl-encode-fixed-euc-kr))
@@ -9091,9 +6265,14 @@ diff -duNrp ../tamago-4.0.6/egg-com.el ./egg-com.el
((eq f 'w) `(setq ,arg (comm-unpack-u16)))
((eq f 'b) `(setq ,arg (comm-unpack-u8)))
((eq f 'S) `(setq ,arg (comm-unpack-u16-string)))
-diff -duNrp ../tamago-4.0.6/egg-mlh.el ./egg-mlh.el
---- ../tamago-4.0.6/egg-mlh.el Tue Jan 4 15:50:12 2000
-+++ ./egg-mlh.el Wed Sep 4 22:59:10 2002
+Index: egg-mlh.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg-mlh.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- egg-mlh.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg-mlh.el 23 Aug 2002 07:46:38 -0000 1.2
@@ -3,10 +3,10 @@
;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
@@ -9107,9 +6286,12 @@ diff -duNrp ../tamago-4.0.6/egg-mlh.el ./egg-mlh.el
;; Keywords: mule, multilingual, input method
-diff -duNrp ../tamago-4.0.6/egg-sim-old.el ./egg-sim-old.el
---- ../tamago-4.0.6/egg-sim-old.el Mon Jan 17 01:43:15 2000
-+++ ./egg-sim-old.el Thu Jan 1 09:00:00 1970
+Index: egg-sim-old.el
+===================================================================
+RCS file: egg-sim-old.el
+diff -N egg-sim-old.el
+--- egg-sim-old.el 27 Jan 2001 18:46:59 -0000 1.1.1.1
++++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,514 +0,0 @@
-;;; egg-sim.el --- EGG Simple Input Method
-
@@ -9625,9 +6807,15 @@ diff -duNrp ../tamago-4.0.6/egg-sim-old.el ./egg-sim-old.el
- (setq j (1+ j)))
- (insert (format "\n")))
- (setq i (1+ i))))))
-diff -duNrp ../tamago-4.0.6/egg-sim.el ./egg-sim.el
---- ../tamago-4.0.6/egg-sim.el Mon Jan 17 01:51:34 2000
-+++ ./egg-sim.el Sun Jan 28 03:53:13 2001
+\ No newline at end of file
+Index: egg-sim.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg-sim.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- egg-sim.el 27 Jan 2001 18:46:59 -0000 1.1.1.1
++++ egg-sim.el 27 Jan 2001 18:53:13 -0000 1.2
@@ -73,7 +73,7 @@
result)))))
@@ -9646,9 +6834,19 @@ diff -duNrp ../tamago-4.0.6/egg-sim.el ./egg-sim.el
(interactive)
(let ((result (egg-simple-input-menu)))
(cond((stringp result)
-diff -duNrp ../tamago-4.0.6/egg-simv.el ./egg-simv.el
---- ../tamago-4.0.6/egg-simv.el Mon Jan 17 01:42:21 2000
-+++ ./egg-simv.el Thu Jan 1 09:00:00 1970
+@@ -545,4 +545,4 @@
+ (+ j 32 128)))
+ (setq j (1+ j)))
+ (insert (format "\n")))
+- (setq i (1+ i))))))
+\ No newline at end of file
++ (setq i (1+ i))))))
+Index: egg-simv.el
+===================================================================
+RCS file: egg-simv.el
+diff -N egg-simv.el
+--- egg-simv.el 27 Jan 2001 18:46:59 -0000 1.1.1.1
++++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
-
- | 0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -9697,9 +6895,13 @@ diff -duNrp ../tamago-4.0.6/egg-simv.el ./egg-simv.el
-"Y" ",2O(B" ",2V(B" ",2[(B" ",2}(B" ",2\(B"
-
-",2p(B" ",1p(B"
-diff -duNrp ../tamago-4.0.6/egg-util.el ./egg-util.el
---- ../tamago-4.0.6/egg-util.el Thu Jan 6 20:49:06 2000
-+++ ./egg-util.el Thu Jan 1 09:00:00 1970
+\ No newline at end of file
+Index: egg-util.el
+===================================================================
+RCS file: egg-util.el
+diff -N egg-util.el
+--- egg-util.el 27 Jan 2001 18:46:05 -0000 1.1.1.2
++++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-;;; egg-util.el --- Utilities with Egg
-
@@ -9763,9 +6965,12 @@ diff -duNrp ../tamago-4.0.6/egg-util.el ./egg-util.el
- (load-file (car files))
- (setq files (cdr files)))))
-
-diff -duNrp ../tamago-4.0.6/egg-x0213.el ./egg-x0213.el
---- ../tamago-4.0.6/egg-x0213.el Thu Jan 1 09:00:00 1970
-+++ ./egg-x0213.el Sat Dec 1 18:42:24 2001
+Index: egg-x0213.el
+===================================================================
+RCS file: egg-x0213.el
+diff -N egg-x0213.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ egg-x0213.el 1 Dec 2001 09:42:24 -0000 1.1
@@ -0,0 +1,111 @@
+;;; jisx0213.el --- Charset Definition for JIS X 0213
+
@@ -9878,9 +7083,14 @@ diff -duNrp ../tamago-4.0.6/egg-x0213.el ./egg-x0213.el
+ (cons ccl-decode-fixed-euc-jisx0213 ccl-encode-fixed-euc-jisx0213))))
+
+(provide 'egg-x0213)
-diff -duNrp ../tamago-4.0.6/egg.el ./egg.el
---- ../tamago-4.0.6/egg.el Mon Jan 17 09:36:17 2000
-+++ ./egg.el Mon Jul 22 22:18:56 2002
+Index: egg.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg.el,v
+retrieving revision 1.1.1.3
+retrieving revision 1.5
+diff -d -u -p -r1.1.1.3 -r1.5
+--- egg.el 27 Jan 2001 18:46:59 -0000 1.1.1.3
++++ egg.el 22 Jul 2002 13:18:56 -0000 1.5
@@ -30,13 +30,19 @@
;;; Code:
@@ -10111,9 +7321,14 @@ diff -duNrp ../tamago-4.0.6/egg.el ./egg.el
(funcall auto-fill-function)))))
(eval-when (eval load)
-diff -duNrp ../tamago-4.0.6/eggrc ./eggrc
---- ../tamago-4.0.6/eggrc Tue Jan 4 15:50:44 2000
-+++ ./eggrc Mon Jul 22 22:18:56 2002
+Index: eggrc
+===================================================================
+RCS file: /cvs/tamago/tamago/eggrc,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.1 -r1.3
+--- eggrc 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ eggrc 22 Jul 2002 13:18:56 -0000 1.3
@@ -1,4 +1,4 @@
-;;; eggrc --- EGG Input Method Startup File
+;;; eggrc --- EGG Input Method Startup File -*- emacs-lisp -*-
@@ -10236,704 +7451,14 @@ diff -duNrp ../tamago-4.0.6/eggrc ./eggrc
+ (canna-define-environment "Bushu" 0 t)
+ (canna-add-dict "bushu" nil))
+ )
-diff -duNrp ../tamago-4.0.6/its/ascii.el ./its/ascii.el
---- ../tamago-4.0.6/its/ascii.el Tue Jan 4 16:08:35 2000
-+++ ./its/ascii.el Sun Jan 28 03:53:13 2001
-@@ -26,10 +26,7 @@
- ;; Boston, MA 02111-1307, USA.
-
- ;;; Commentary:
--;;
--;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
--;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
--;;
-+
-
- ;;; Code:
-
-diff -duNrp ../tamago-4.0.6/its/aynu.el ./its/aynu.el
---- ../tamago-4.0.6/its/aynu.el Thu Jan 1 09:00:00 1970
-+++ ./its/aynu.el Mon Jul 22 22:18:56 2002
-@@ -0,0 +1,285 @@
-+;;; its/aynu.el --- Aynu Katakana Input in Egg Input Method Architecture
-+
-+;; Copyright (C) 1999,2000 PFU LIMITED
-+
-+;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
-+
-+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
-+
-+;; Keywords: mule, multilingual, input method
-+
-+;; This file is part of EGG.
-+
-+;; EGG is free software; you can redistribute it and/or modify
-+;; it under the terms of the GNU General Public License as published by
-+;; the Free Software Foundation; either version 2, or (at your option)
-+;; any later version.
-+
-+;; EGG is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with GNU Emacs; see the file COPYING. If not, write to the
-+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+;; Boston, MA 02111-1307, USA.
-+
-+;;; Commentary:
-+
-+
-+;;; Code:
-+
-+(eval-when-compile
-+ (require 'its)
-+ (require 'cl))
-+
-+(eval-when (compile)
-+ (defconst its-compaction-enable t))
-+
-+(defvar its-aynu-enable-zenkaku-alphabet
-+ (if (boundp 'its-enable-fullwidth-alphabet)
-+ its-enable-fullwidth-alphabet
-+ t)
-+ "*Enable Zenkaku alphabet")
-+
-+(defvar its-aynu-horizontal "$(O!<(B" "*-") ; "-" "$(O!=(B"
-+(defvar its-aynu-period "$(O!#(B " "*.") ; "." "$(O!#(B"
-+(defvar its-aynu-comma "$(O!$(B " "*,") ; "," "$(O!$(B"
-+(defvar its-aynu-open-bracket "$(O!V(B" "*[") ; "$(O!N(B"
-+(defvar its-aynu-close-bracket "$(O!W(B" "*]") ; "$(O!O(B"
-+
-+(defvar its-aynu-enable-double-n nil "*Enable \"nn\" input for \"$(O%s(B\"")
-+
-+(defvar its-aynu-kick-conversion-on-space nil "*Start conversion on SPACE")
-+
-+(eval-when-compile
-+ (defun its-define-state-aynu (input i-tail output o-tail otherwise)
-+ "Define following rules:
-+INPUT + I-TAIL --> OUTPUT + O-TAIL
-+INPUT + I-TAIL + ' --> OUTPUT + O-TAIL
-+INPUT + I-TAIL + vowel --> (translate INPUT) + I-tail + vowel
-+INPUT + I-TAIL + OTHERWISE (see `its-defrule-otherwise')."
-+ (let ((out (concat output o-tail))
-+ state)
-+ (setq state (its-defrule (concat input i-tail) out))
-+ (its-defrule (concat input i-tail "'") out)
-+ (its-defrule-otherwise state nil "[aiueo]" -2)
-+ (while otherwise
-+ (its-defrule-otherwise state (concat output (caar otherwise))
-+ (nth 1 (car otherwise)) (nth 2 (car otherwise)))
-+ (setq otherwise (cdr otherwise)))
-+ (setq state (its-defrule (concat input i-tail "y") (concat out "$(O%#(B")))
-+ (its-make-next-state state -1 out -1)
-+ (its-defrule-otherwise state out nil -2)
-+ (its-defrule-otherwise state nil "[u]" -3)
-+))
-+
-+ (defconst its-aynu-tail-alist
-+ (let ((common '(("k" "$(O&n(B" (("$(O%C(B" "[k]" -1)))
-+ ("s" "$(O&o(B" (("$(O%C(B" "[s]" -1) (nil "[h]" -2)))
-+ ("p" "$(O&x(B" (("$(O%C(B" "[p]" -1)))
-+ ("m" "$(O&y(B" (("$(O%s(B" "[mp]" -1)))
-+ ("t" "$(O%C(B") ("y" "$(O%#(B") ("w" "$(O%%(B"))))
-+ `((?a ("h" "$(O&s(B") ("x" "$(O&s(B") ("r" "$(O&z(B") ,@common)
-+ (?i ("h" "$(O&t(B") ("x" "$(O&t(B") ("r" "$(O&{(B") ,@common)
-+ (?u ("h" "$(O&u(B") ("x" "$(O&u(B") ("r" "$(O&|(B") ,@common)
-+ (?e ("h" "$(O&v(B") ("x" "$(O&v(B") ("r" "$(O&}(B") ,@common)
-+ (?o ("h" "$(O&w(B") ("x" "$(O&w(B") ("r" "$(O&~(B") ,@common))))
-+
-+ (defun its-defrule-aynu (conso vowel output)
-+ (let ((input (concat conso vowel))
-+ (tails (and vowel (cdr (assq (aref vowel 0) its-aynu-tail-alist)))))
-+ (its-defrule input output)
-+ (while tails
-+ (its-define-state-aynu input (caar tails) output (nth 1 (car tails))
-+ (nth 2 (car tails)))
-+ (setq tails (cdr tails)))))
-+
-+ (defmacro its-define-aynu (&rest rules)
-+ (let ((defs (list 'progn))
-+ conso vowels output)
-+ (while rules
-+ (setq vowels '(nil "a" "i" "u" "e" "o")
-+ conso (caar rules)
-+ output (cdar rules)
-+ rules (cdr rules))
-+ (while output
-+ (when (car output)
-+ (setq defs (cons `(its-defrule-aynu ,conso ,(car vowels)
-+ ,(car output))
-+ defs)))
-+ (setq output (cdr output)
-+ vowels (cdr vowels))))
-+ (nreverse defs)))
-+
-+ (defun its-defrule-aynu-override-yu (conso)
-+ (let ((output (its-get-output (its-goto-state conso)))
-+ state)
-+ (its-defrule (concat conso "yu")
-+ (concat (its-get-output (its-goto-state (concat conso "i")))
-+ "$(O%e!<(B"))
-+ (setq state (its-goto-state (concat conso "y")))
-+ (its-set-output state (concat output "$(O%#(B"))
-+ (its-make-next-state state -1 output -1)
-+ (its-defrule-otherwise state output nil -2))))
-+
-+(define-its-state-machine its-aynu-map
-+ "roma-aynu-kata" "$(O%"(B" Aynu
-+ "Map for Romaji-Aynu-Katakana translation. (Japanese)"
-+
-+ (defconst its-zenkaku-escape "Z") ;; Escape character to Zenkaku inputs
-+ (defconst its-hankaku-escape "~") ;; Escape character to Hankaku inputs
-+
-+ (its-defrule-select-mode-temporally "q" downcase)
-+ (its-defrule-select-mode-temporally "Q" zenkaku-downcase)
-+
-+ (dolist (small '(("a" "$(O%!(B") ("i" "$(O%#(B") ("u" "$(O%%(B") ("e" "$(O%'(B") ("o" "$(O%)(B")
-+ ("ka" "$(O%u(B") ("ku" "$(O&n(B") ("ke" "$(O%v(B")
-+ ("si" "$(O&o(B") ("su" "$(O&p(B")
-+ ("tu" "$(O%C(B") ("to" "$(O&q(B")
-+ ("nu" "$(O&r(B")
-+ ("ha" "$(O&s(B") ("hi" "$(O&t(B") ("hu" "$(O&u(B") ("he" "$(O&v(B") ("ho" "$(O&w(B")
-+ ("pu" "$(O&x(B")
-+ ("mu" "$(O&y(B")
-+ ("ya" "$(O%c(B") ("yu" "$(O%e(B") ("yo" "$(O%g(B")
-+ ("ra" "$(O&z(B") ("ri" "$(O&{(B") ("ru" "$(O&|(B") ("re" "$(O&}(B") ("ro" "$(O&~(B")
-+ ("wa" "$(O%n(B")))
-+ (its-defrule (concat "x" (car small)) (cadr small)))
-+
-+ (its-define-aynu
-+ ("" nil "$(O%"(B" "$(O%$(B" "$(O%&(B" "$(O%((B" "$(O%*(B")
-+ ("k" "$(O&n(B" "$(O%+(B" "$(O%-(B" "$(O%/(B" "$(O%1(B" "$(O%3(B")
-+ ("g" "$(O%0(B" "$(O%,(B" "$(O%.(B" "$(O%0(B" "$(O%2(B" "$(O%4(B")
-+ ("s" "$(O&p(B" "$(O%5(B" "$(O%7(B" "$(O%9(B" "$(O%;(B" "$(O%=(B")
-+ ("z" nil "$(O%6(B" "$(O%8(B" "$(O%:(B" "$(O%<(B" "$(O%>(B")
-+ ("vs" nil nil nil nil "$(O%|(B" nil)
-+ ("sh" "$(O%7%c(B" "$(O%7%c(B" "$(O%7(B" "$(O%7%e(B" "$(O%7%'(B" "$(O%7%g(B")
-+ ("j" nil "$(O%8%c(B" "$(O%8(B" "$(O%8%e(B" "$(O%8%'(B" "$(O%8%g(B")
-+ ("t" "$(O%C(B" "$(O%?(B" "$(O%A(B" "$(O%H%%(B" "$(O%F(B" "$(O%H(B")
-+ ("vt" nil nil nil "$(O%}(B" nil "$(O%~(B")
-+ ("d" nil "$(O%@(B" "$(O%B(B" "$(O%E(B" "$(O%G(B" "$(O%I(B")
-+ ("c" "$(O%C(B" "$(O%A%c(B" "$(O%A(B" "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
-+ ("ch" "$(O%C(B" "$(O%A%c(B" "$(O%A(B" "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
-+ ("n" "$(O%s(B" "$(O%J(B" "$(O%K(B" "$(O%L(B" "$(O%M(B" "$(O%N(B")
-+ ("h" "$(O&s(B" "$(O%O(B" "$(O%R(B" "$(O%U(B" "$(O%X(B" "$(O%[(B")
-+ ("b" nil "$(O%P(B" "$(O%S(B" "$(O%V(B" "$(O%Y(B" "$(O%\(B")
-+ ("p" "$(O&x(B" "$(O%Q(B" "$(O%T(B" "$(O%W(B" "$(O%Z(B" "$(O%](B")
-+ ("m" "$(O&y(B" "$(O%^(B" "$(O%_(B" "$(O%`(B" "$(O%a(B" "$(O%b(B")
-+ ("y" "$(O%#(B" "$(O%d(B" "$(O%#(B" "$(O%f(B" "$(O%$%'(B" "$(O%h(B")
-+ ("r" "$(O&|(B" "$(O%i(B" "$(O%j(B" "$(O%k(B" "$(O%l(B" "$(O%m(B")
-+ ("w" "$(O%%(B" "$(O%o(B" "$(O%&%#(B" "$(O%%(B" "$(O%&%'(B" "$(O%&%)(B"))
-+
-+ (dolist (yu '("k" "g" "s" "z" "sh" "j" "t" "d"
-+ "c" "ch" "n" "h" "b" "p" "m" "r"))
-+ (its-defrule-aynu-override-yu yu))
-+
-+ (its-defrule "kk" "$(O%C(B" -1)
-+ (its-defrule "ss" "$(O%C(B" -1)
-+ (its-defrule "pp" "$(O%C(B" -1)
-+ (its-defrule "vv" "$(O%C(B" -1)
-+
-+;; SYMBOL Input
-+ (its-defrule "z1" "$(O!{(B") (its-defrule "z!" "$(O!|(B")
-+ (its-defrule "z2" "$(O"&(B") (its-defrule "z@" "$(O"'(B")
-+ (its-defrule "z3" "$(O"$(B") (its-defrule "z#" "$(O"%(B")
-+ (its-defrule "z4" "$(O""(B") (its-defrule "z$" "$(O"#(B")
-+ (its-defrule "z5" "$(O!~(B") (its-defrule "z%" "$(O"!(B")
-+ (its-defrule "z6" "$(O!y(B") (its-defrule "z^" "$(O!z(B")
-+ (its-defrule "z7" "$(O!}(B") (its-defrule "z&" "$(O!r(B")
-+ (its-defrule "z8" "$(O!q(B") (its-defrule "z*" "$(O!_(B")
-+ (its-defrule "z9" "$(O!i(B") (its-defrule "z(" "$(O!Z(B")
-+ (its-defrule "z0" "$(O!j(B") (its-defrule "z)" "$(O![(B")
-+ (its-defrule "z-" "$(O!A(B") (its-defrule "z_" "$(O!h(B")
-+ (its-defrule "z=" "$(O!b(B") (its-defrule "z+" "$(O!^(B")
-+ (its-defrule "z\\" "$(O!@(B") (its-defrule "z|" "$(O!B(B")
-+ (its-defrule "z`" "$(O!-(B") (its-defrule "z~" "$(O!/(B")
-+
-+ (its-defrule "zq" "$(O!T(B") (its-defrule "zQ" "$(O!R(B")
-+ (its-defrule "zw" "$(O!U(B") (its-defrule "zW" "$(O!S(B")
-+ ; e
-+ (its-defrule "zr" "$(O!9(B") (its-defrule "zR" "$(O!8(B")
-+ (its-defrule "zt" "$(O!:(B") (its-defrule "zT" "$(O!x(B")
-+ ; y u i o
-+ (its-defrule "zp" "$(O")(B") (its-defrule "zP" "$(O",(B")
-+ (its-defrule "z[" "$(O!X(B") (its-defrule "z{" "$(O!L(B")
-+ (its-defrule "z]" "$(O!Y(B") (its-defrule "z}" "$(O!M(B")
-+ ; a
-+ (its-defrule "zs" "$(O!3(B") (its-defrule "zS" "$(O!4(B")
-+ (its-defrule "zd" "$(O!5(B") (its-defrule "zD" "$(O!6(B")
-+ (its-defrule "zf" "$(O!7(B") (its-defrule "zF" "$(O"*(B")
-+ (its-defrule "zg" "$(O!>(B") (its-defrule "zG" "$(O!=(B")
-+ (its-defrule "zh" "$(O"+(B")
-+ (its-defrule "zj" "$(O"-(B")
-+ (its-defrule "zk" "$(O",(B")
-+ (its-defrule "zl" "$(O"*(B")
-+ (its-defrule "z;" "$(O!+(B") (its-defrule "z:" "$(O!,(B")
-+ (its-defrule "z\'" "$(O!F(B") (its-defrule "z\"" "$(O!H(B")
-+ ; z
-+ (its-defrule "zx" ":-") (its-defrule "zX" ":-)")
-+ (its-defrule "zc" "$(O!;(B") (its-defrule "zC" "$(O!n(B")
-+ (its-defrule "zv" "$(O"((B") (its-defrule "zV" "$(O!`(B")
-+ (its-defrule "zb" "$(O!k(B") (its-defrule "zB" "$(O"+(B")
-+ (its-defrule "zn" "$(O!l(B") (its-defrule "zN" "$(O"-(B")
-+ (its-defrule "zm" "$(O!m(B") (its-defrule "zM" "$(O".(B")
-+ (its-defrule "z," "$(O!E(B") (its-defrule "z<" "$(O!e(B")
-+ (its-defrule "z." "$(O!D(B") (its-defrule "z>" "$(O!f(B")
-+ (its-defrule "z/" "$(O!&(B") (its-defrule "z?" "$(O!g(B")
-+ )
-+
-+(define-its-state-machine-append its-aynu-map
-+ (if its-aynu-enable-double-n
-+ (its-defrule "nn" "$(O%s(B"))
-+
-+ (its-defrule "-" its-aynu-horizontal)
-+ (its-defrule "." its-aynu-period)
-+ (its-defrule "," its-aynu-comma)
-+ (its-defrule "[" its-aynu-open-bracket)
-+ (its-defrule "]" its-aynu-close-bracket)
-+
-+ (unless its-aynu-kick-conversion-on-space
-+ (its-defrule " " " "))
-+
-+ (if its-aynu-enable-zenkaku-alphabet
-+ (progn
-+ (its-defrule "1" "$(O#1(B") (its-defrule "2" "$(O#2(B")
-+ (its-defrule "3" "$(O#3(B") (its-defrule "4" "$(O#4(B")
-+ (its-defrule "5" "$(O#5(B") (its-defrule "6" "$(O#6(B")
-+ (its-defrule "7" "$(O#7(B") (its-defrule "8" "$(O#8(B")
-+ (its-defrule "9" "$(O#9(B") (its-defrule "0" "$(O#0(B")
-+ (its-defrule "!" "$(O!*(B") (its-defrule "@" "$(O!w(B")
-+ (its-defrule "#" "$(O!t(B") (its-defrule "$" "$(O!p(B")
-+ (its-defrule "%" "$(O!s(B") (its-defrule "^" "$(O!0(B")
-+ (its-defrule "&" "$(O!u(B") (its-defrule "*" "$(O!v(B")
-+ (its-defrule "(" "$(O!J(B") (its-defrule ")" "$(O!K(B")
-+ (its-defrule "=" "$(O!a(B") (its-defrule "`" "$(O!.(B")
-+ (its-defrule "\\" "$(O!o(B") (its-defrule "|" "$(O!C(B")
-+ (its-defrule "_" "$(O!2(B") (its-defrule "+" "$(O!\(B")
-+ (its-defrule "{" "$(O!P(B") (its-defrule "}" "$(O!Q(B")
-+ (its-defrule ":" "$(O!'(B") (its-defrule ";" "$(O!((B")
-+ (its-defrule "\"" "$(O!I(B") (its-defrule "'" "$(O!G(B")
-+ (its-defrule "<" "$(O!c(B") (its-defrule ">" "$(O!d(B")
-+ (its-defrule "?" "$(O!)(B") (its-defrule "/" "$(O!?(B"))
-+ (progn
-+ (its-defrule "1" "1") (its-defrule "2" "2")
-+ (its-defrule "3" "3") (its-defrule "4" "4")
-+ (its-defrule "5" "5") (its-defrule "6" "6")
-+ (its-defrule "7" "7") (its-defrule "8" "8")
-+ (its-defrule "9" "9") (its-defrule "0" "0")
-+ (its-defrule "!" "!") (its-defrule "@" "@")
-+ (its-defrule "#" "#") (its-defrule "$" "$")
-+ (its-defrule "%" "%") (its-defrule "^" "^")
-+ (its-defrule "&" "&") (its-defrule "*" "*")
-+ (its-defrule "(" "(") (its-defrule ")" ")")
-+ (its-defrule "=" "=") (its-defrule "`" "`")
-+ (its-defrule "\\" "\\") (its-defrule "|" "|")
-+ (its-defrule "_" "_") (its-defrule "+" "+")
-+ (its-defrule "{" "{") (its-defrule "}" "}")
-+ (its-defrule ":" ":") (its-defrule ";" ";")
-+ (its-defrule "\"" "\"") (its-defrule "'" "'")
-+ (its-defrule "<" "<") (its-defrule ">" ">")
-+ (its-defrule "?" "?") (its-defrule "/" "/"))))
-+
-+(provide 'its/aynu)
-+
-+;;; its/aynu.el ends here
-diff -duNrp ../tamago-4.0.6/its/greek.el ./its/greek.el
---- ../tamago-4.0.6/its/greek.el Thu Jan 1 09:00:00 1970
-+++ ./its/greek.el Mon Aug 20 19:09:07 2001
-@@ -0,0 +1,251 @@
-+(eval-when-compile
-+ (require 'its)
-+ (require 'cl))
-+
-+(eval-when (compile)
-+ (defconst its-compaction-enable t))
-+
-+(defgroup greek nil
-+ "Greek Input Method"
-+ :group 'its)
-+
-+(define-its-state-machine its-greek-jis-map
-+ "greek-jis" "$B&8(B" Greek
-+ "$B&%&K&K&G&M&I&J&A(B: Greek keyboard layout (JIS X0208.1983)
-+
-+The layout is same as greek, but uses JIS characters.
-+Sorry, accents and terminal sigma are not supported in JIS."
-+
-+ (its-defrule "1" "$B#1(B")
-+ (its-defrule "2" "$B#2(B")
-+ (its-defrule "3" "$B#3(B")
-+ (its-defrule "4" "$B#4(B")
-+ (its-defrule "5" "$B#5(B")
-+ (its-defrule "6" "$B#6(B")
-+ (its-defrule "7" "$B#7(B")
-+ (its-defrule "8" "$B#8(B")
-+ (its-defrule "9" "$B#9(B")
-+ (its-defrule "0" "$B#0(B")
-+ (its-defrule "-" "$B!](B")
-+ (its-defrule "=" "$B!a(B")
-+ (its-defrule "`" "$B!F(B")
-+ (its-defrule "q" "$B!&(B")
-+ (its-defrule "w" "$B&R(B")
-+ (its-defrule "e" "$B&E(B")
-+ (its-defrule "r" "$B&Q(B")
-+ (its-defrule "t" "$B&S(B")
-+ (its-defrule "y" "$B&T(B")
-+ (its-defrule "u" "$B&H(B")
-+ (its-defrule "i" "$B&I(B")
-+ (its-defrule "o" "$B&O(B")
-+ (its-defrule "p" "$B&P(B")
-+ (its-defrule "[" "$B!N(B")
-+ (its-defrule "]" "$B!O(B")
-+ (its-defrule "a" "$B&A(B")
-+ (its-defrule "s" "$B&R(B")
-+ (its-defrule "d" "$B&D(B")
-+ (its-defrule "f" "$B&U(B")
-+ (its-defrule "g" "$B&C(B")
-+ (its-defrule "h" "$B&G(B")
-+ (its-defrule "j" "$B&N(B")
-+ (its-defrule "k" "$B&J(B")
-+ (its-defrule "l" "$B&K(B")
-+ (its-defrule ";" "$B!G(B")
-+ (its-defrule "'" "$B!G(B")
-+ (its-defrule "\\" "$B!@(B")
-+ (its-defrule "z" "$B&F(B")
-+ (its-defrule "x" "$B&V(B")
-+ (its-defrule "c" "$B&W(B")
-+ (its-defrule "v" "$B&X(B")
-+ (its-defrule "b" "$B&B(B")
-+ (its-defrule "n" "$B&M(B")
-+ (its-defrule "m" "$B&L(B")
-+ (its-defrule "," ", ")
-+ (its-defrule "." ". ")
-+ (its-defrule "/" "$B!?(B")
-+
-+ (its-defrule "!" "$B!*(B")
-+ (its-defrule "@" "$B!w(B")
-+ (its-defrule "#" "$B!t(B")
-+ (its-defrule "$" "$B!t(B")
-+ (its-defrule "%" "$B!s(B")
-+ (its-defrule "^" "$B!0(B")
-+ (its-defrule "&" "$B!u(B")
-+ (its-defrule "*" "$B!v(B")
-+ (its-defrule "(" "$B!J(B")
-+ (its-defrule ")" "$B!K(B")
-+ (its-defrule "_" "$B!2(B")
-+ (its-defrule "+" "$B!\(B")
-+ (its-defrule "~" "$B!1(B")
-+ (its-defrule "Q" "$B!](B")
-+ (its-defrule "W" "$B&2(B")
-+ (its-defrule "E" "$B&%(B")
-+ (its-defrule "R" "$B&1(B")
-+ (its-defrule "T" "$B&3(B")
-+ (its-defrule "Y" "$B&4(B")
-+ (its-defrule "U" "$B&((B")
-+ (its-defrule "I" "$B&)(B")
-+ (its-defrule "O" "$B&/(B")
-+ (its-defrule "P" "$B&1(B")
-+ (its-defrule "{" "$B!P(B")
-+ (its-defrule "}" "$B!Q(B")
-+ (its-defrule "A" "$B&!(B")
-+ (its-defrule "S" "$B&2(B")
-+ (its-defrule "D" "$B&$(B")
-+ (its-defrule "F" "$B&5(B")
-+ (its-defrule "G" "$B&#(B")
-+ (its-defrule "H" "$B&'(B")
-+ (its-defrule "J" "$B&.(B")
-+ (its-defrule "K" "$B&*(B")
-+ (its-defrule "L" "$B&+(B")
-+ (its-defrule ":" "$B!I(B")
-+ (its-defrule "\"" "$B!I(B")
-+ (its-defrule "|" "$B!C(B")
-+ (its-defrule "Z" "$B&&(B")
-+ (its-defrule "X" "$B&6(B")
-+ (its-defrule "C" "$B&7(B")
-+ (its-defrule "V" "$B&8(B")
-+ (its-defrule "B" "$B&"(B")
-+ (its-defrule "N" "$B&-(B")
-+ (its-defrule "M" "$B&,(B")
-+ (its-defrule "<" "$B!((B")
-+ (its-defrule ">" "$B!'(B")
-+ (its-defrule "?" "$B!)(B"))
-+
-+(define-its-state-machine its-greek-map
-+ "greek" ",FY(B" Greek
-+ ",FEkkgmij\(B: Greek keyboard layout (ISO 8859-7)
-+--------------
-+
-+In the right of ,Fk(B key is a combination key, where
-+ ,F4(B acute
-+ ,F((B diaresis
-+
-+e.g.
-+ ,Fa(B + ,F4(B -> ,F\(B
-+ ,Fi(B + ,F((B -> ,Fz(B
-+ ,Fi(B + ,F((B + ,F4(B -> ,F@(B"
-+
-+;; 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ `~
-+;; ,F7/(B ,FrS(B ,FeE(B ,FqQ(B ,FtT(B ,FuU(B ,FhH(B ,FiI(B ,FoO(B ,FpP(B [{ ]}
-+;; ,FaA(B ,FsS(B ,FdD(B ,FvV(B ,FcC(B ,FgG(B ,FnN(B ,FjJ(B ,FkK(B ,F4((B '" \|
-+;; ,FfF(B ,FwW(B ,FxX(B ,FyY(B ,FbB(B ,FmM(B ,FlL(B ,; .: /?
-+
-+ (its-defrule "1" "1")
-+ (its-defrule "2" "2")
-+ (its-defrule "3" "3")
-+ (its-defrule "4" "4")
-+ (its-defrule "5" "5")
-+ (its-defrule "6" "6")
-+ (its-defrule "7" "7")
-+ (its-defrule "8" "8")
-+ (its-defrule "9" "9")
-+ (its-defrule "0" "0")
-+ (its-defrule "-" "-")
-+ (its-defrule "=" "=")
-+ (its-defrule "`" "`")
-+ (its-defrule "q" ",F7(B")
-+ (its-defrule "w" ",Fr(B")
-+ (its-defrule "e" ",Fe(B")
-+ (its-defrule "r" ",Fq(B")
-+ (its-defrule "t" ",Ft(B")
-+ (its-defrule "y" ",Fu(B")
-+ (its-defrule "u" ",Fh(B")
-+ (its-defrule "i" ",Fi(B")
-+ (its-defrule "o" ",Fo(B")
-+ (its-defrule "p" ",Fp(B")
-+ (its-defrule "[" "[")
-+ (its-defrule "]" "]")
-+ (its-defrule "a" ",Fa(B")
-+ (its-defrule "s" ",Fs(B")
-+ (its-defrule "d" ",Fd(B")
-+ (its-defrule "f" ",Fv(B")
-+ (its-defrule "g" ",Fc(B")
-+ (its-defrule "h" ",Fg(B")
-+ (its-defrule "j" ",Fn(B")
-+ (its-defrule "k" ",Fj(B")
-+ (its-defrule "l" ",Fk(B")
-+ (its-defrule ";" ",F4(B")
-+ (its-defrule "'" "'")
-+ (its-defrule "\\" "\\")
-+ (its-defrule "z" ",Ff(B")
-+ (its-defrule "x" ",Fw(B")
-+ (its-defrule "c" ",Fx(B")
-+ (its-defrule "v" ",Fy(B")
-+ (its-defrule "b" ",Fb(B")
-+ (its-defrule "n" ",Fm(B")
-+ (its-defrule "m" ",Fl(B")
-+ (its-defrule "," ",")
-+ (its-defrule "." ".")
-+ (its-defrule "/" "/")
-+
-+ (its-defrule "!" "!")
-+ (its-defrule "@" "@")
-+ (its-defrule "#" "#")
-+ (its-defrule "$" "$")
-+ (its-defrule "%" "%")
-+ (its-defrule "^" "^")
-+ (its-defrule "&" "&")
-+ (its-defrule "*" "*")
-+ (its-defrule "(" "(")
-+ (its-defrule ")" ")")
-+ (its-defrule "_" "_")
-+ (its-defrule "+" "+")
-+ (its-defrule "~" "~")
-+ (its-defrule "Q" ",F/(B")
-+ (its-defrule "W" ",FS(B")
-+ (its-defrule "E" ",FE(B")
-+ (its-defrule "R" ",FQ(B")
-+ (its-defrule "T" ",FT(B")
-+ (its-defrule "Y" ",FU(B")
-+ (its-defrule "U" ",FH(B")
-+ (its-defrule "I" ",FI(B")
-+ (its-defrule "O" ",FO(B")
-+ (its-defrule "P" ",FP(B")
-+ (its-defrule "{" "{")
-+ (its-defrule "}" "}")
-+ (its-defrule "A" ",FA(B")
-+ (its-defrule "S" ",FS(B")
-+ (its-defrule "D" ",FD(B")
-+ (its-defrule "F" ",FV(B")
-+ (its-defrule "G" ",FC(B")
-+ (its-defrule "H" ",FG(B")
-+ (its-defrule "J" ",FN(B")
-+ (its-defrule "K" ",FJ(B")
-+ (its-defrule "L" ",FK(B")
-+ (its-defrule ":" ",F((B")
-+ (its-defrule "\"" "\"")
-+ (its-defrule "|" "|")
-+ (its-defrule "Z" ",FF(B")
-+ (its-defrule "X" ",FW(B")
-+ (its-defrule "C" ",FX(B")
-+ (its-defrule "V" ",FY(B")
-+ (its-defrule "B" ",FB(B")
-+ (its-defrule "N" ",FM(B")
-+ (its-defrule "M" ",FL(B")
-+ (its-defrule "<" ";")
-+ (its-defrule ">" ":")
-+ (its-defrule "?" "?")
-+
-+ (its-defrule "a;" ",F\(B")
-+ (its-defrule "e;" ",F](B")
-+ (its-defrule "h;" ",F^(B")
-+ (its-defrule "i;" ",F_(B")
-+ (its-defrule "o;" ",F|(B")
-+ (its-defrule "y;" ",F}(B")
-+ (its-defrule "v;" ",F~(B")
-+ (its-defrule "A;" ",F6(B")
-+ (its-defrule "E;" ",F8(B")
-+ (its-defrule "H;" ",F9(B")
-+ (its-defrule "I;" ",F:(B")
-+ (its-defrule "O;" ",F<(B")
-+ (its-defrule "Y;" ",F>(B")
-+ (its-defrule "V;" ",F?(B")
-+ (its-defrule "i:" ",Fz(B")
-+ (its-defrule "y:" ",F{(B")
-+ (its-defrule "I:" ",FZ(B")
-+ (its-defrule "Y:" ",F[(B")
-+ (its-defrule "i:;" ",F@(B")
-+ (its-defrule "y:;" ",F`(B"))
-+
-+(provide 'its/greek)
-diff -duNrp ../tamago-4.0.6/its/hankata.el ./its/hankata.el
---- ../tamago-4.0.6/its/hankata.el Wed Jan 5 13:45:22 2000
-+++ ./its/hankata.el Sun Jan 28 03:53:13 2001
-@@ -24,10 +24,7 @@
- ;; Boston, MA 02111-1307, USA.
-
- ;;; Commentary:
--;;
--;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
--;; This file is based on the rules of its/kata.el in Mule-2.3 distribution.
--;;
-+
-
- ;;; Code:
-
-diff -duNrp ../tamago-4.0.6/its/jeonkak.el ./its/jeonkak.el
---- ../tamago-4.0.6/its/jeonkak.el Tue Jan 4 16:09:13 2000
-+++ ./its/jeonkak.el Sun Jan 28 03:53:13 2001
-@@ -26,10 +26,7 @@
- ;; Boston, MA 02111-1307, USA.
-
- ;;; Commentary:
--;;
--;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
--;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
--;;
-+
-
- ;;; Code:
-
-diff -duNrp ../tamago-4.0.6/its/pinyin.el ./its/pinyin.el
---- ../tamago-4.0.6/its/pinyin.el Tue Jan 4 16:09:25 2000
-+++ ./its/pinyin.el Mon Jul 22 22:18:56 2002
-@@ -4,7 +4,7 @@
-
- ;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
-
--;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
-+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
-
- ;; Keywords: mule, multilingual, input method
-
-@@ -237,7 +237,7 @@
-
- (dolist (ascii '(("0" . "$A#0(B") ("1" . "$A#1(B") ("2" . "$A#2(B") ("3" . "$A#3(B")
- ("4" . "$A#4(B") ("5" . "$A#5(B") ("6" . "$A#6(B") ("7" . "$A#7(B")
-- ("8" . "$A#8(B") ("9" . "$A#9(B")
-+ ("8" . "$A#8(B") ("9" . "$A#9(B")
- (" " . "$A!!(B") ("!" . "$A#!(B") ("@" . "$A#@(B") ("#" . "$A##(B")
- ("$" . "$A!g(B") ("%" . "$A#%(B") ("^" . "$A#^(B") ("&" . "$A#&(B")
- ("*" . "$A#*(B") ("(" . "$A#((B") (")" . "$A#)(B")
-@@ -311,7 +311,7 @@
-
- (dolist (ascii '(("0" . "$(G$!(B") ("1" . "$(G$"(B") ("2" . "$(G$#(B") ("3" . "$(G$$(B")
- ("4" . "$(G$%(B") ("5" . "$(G$&(B") ("6" . "$(G$'(B") ("7" . "$(G$((B")
-- ("8" . "$(G$)(B") ("9" . "$(G$*(B")
-+ ("8" . "$(G$)(B") ("9" . "$(G$*(B")
- (" " . "$(G!!(B") ("!" . "$(G!*(B") ("@" . "$(G"i(B") ("#" . "$(G!l(B")
- ("$" . "$(G"c(B") ("%" . "$(G"h(B") ("^" . "$(G!T(B") ("&" . "$(G!m(B")
- ("*" . "$(G!n(B") ("(" . "$(G!>(B") (")" . "$(G!?(B")
-diff -duNrp ../tamago-4.0.6/its/quanjiao.el ./its/quanjiao.el
---- ../tamago-4.0.6/its/quanjiao.el Tue Jan 4 16:09:32 2000
-+++ ./its/quanjiao.el Sun Jan 28 03:53:13 2001
-@@ -26,10 +26,7 @@
- ;; Boston, MA 02111-1307, USA.
-
- ;;; Commentary:
--;;
--;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
--;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
--;;
-+
-
- ;;; Code:
-
-diff -duNrp ../tamago-4.0.6/its/thai.el ./its/thai.el
---- ../tamago-4.0.6/its/thai.el Tue Jan 4 16:09:40 2000
-+++ ./its/thai.el Sun Jan 28 03:53:13 2001
-@@ -69,7 +69,7 @@
- (setq next-keyseq (concat keyseq (car (car vowel)))
- next-output (concat output (cdr (car vowel)))
- vowel (cdr vowel))
-- (its-defrule next-keyseq (compose-string next-output))
-+ (its-defrule next-keyseq `(eval compose-string ,next-output))
- (its-thai-add-tone next-keyseq next-output tone))))
-
- (defun its-thai-add-tone (keyseq output tone)
-@@ -78,7 +78,7 @@
- (setq next-keyseq (concat keyseq (car (car tone)))
- next-output (concat output (cdr (car tone)))
- tone (cdr tone))
-- (its-defrule next-keyseq (compose-string next-output))))))
-+ (its-defrule next-keyseq `(eval compose-string ,next-output))))))
-
- ;; Thai Kesmanee keyboard support.
-
-@@ -93,7 +93,7 @@
- ("4" ",T@(B" consonant) ("$" ",Ts(B")
- ("5" ",T6(B" consonant) ("%" ",Tt(B")
- ("6" ",TX(B" vowel) ("^" ",TY(B" vowel)
-- ("7" ",TV(B" vowel) ("&" "0,TQi(B1" vowel)
-+ ("7" ",TV(B" vowel) ("&" "0,TQi1(B" vowel)
- ("8" ",T$(B" consonant) ("*" ",Tu(B")
- ("9" ",T5(B" consonant) ("(" ",Tv(B")
- ("0" ",T((B" consonant) (")" ",Tw(B")
-diff -duNrp ../tamago-4.0.6/its/zenkaku.el ./its/zenkaku.el
---- ../tamago-4.0.6/its/zenkaku.el Tue Jan 4 16:09:48 2000
-+++ ./its/zenkaku.el Sun Jan 28 03:53:13 2001
-@@ -26,10 +26,7 @@
- ;; Boston, MA 02111-1307, USA.
-
- ;;; Commentary:
--;;
--;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
--;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
--;;
-+
-
- ;;; Code:
-
-diff -duNrp ../tamago-4.0.6/its/zhuyin.el ./its/zhuyin.el
---- ../tamago-4.0.6/its/zhuyin.el Tue Jan 4 16:09:56 2000
-+++ ./its/zhuyin.el Sun Jan 28 03:53:13 2001
-@@ -142,9 +142,9 @@
- (mapcar (lambda (s) (its-defoutput (car s) (nth 1 s)))
- (list B P M F D T N L G K H J Q X))
-
-- (its-defrule (concat (car N) 2) (concat (nth 1 N) "(0B(B"))
-- (its-defrule (concat (car N) 3) (concat (nth 1 N) "(0C(B"))
-- (its-defrule (concat (car N) 4) (concat (nth 1 N) "(0D(B")))))
-+ (its-defrule (concat (car N) "2") (concat (nth 1 N) "(0B(B"))
-+ (its-defrule (concat (car N) "3") (concat (nth 1 N) "(0C(B"))
-+ (its-defrule (concat (car N) "4") (concat (nth 1 N) "(0D(B")))))
-
- (define-its-state-machine its-zhuyin-cn-map
- "zhuyin-cn" "$AW"(BG" Chinese-GB
-diff -duNrp ../tamago-4.0.6/its-keydef.el ./its-keydef.el
---- ../tamago-4.0.6/its-keydef.el Wed Jan 5 13:43:30 2000
-+++ ./its-keydef.el Mon Jul 22 22:18:56 2002
+Index: its-keydef.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its-keydef.el,v
+retrieving revision 1.1.1.2
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.2 -r1.3
+--- its-keydef.el 27 Jan 2001 18:45:56 -0000 1.1.1.2
++++ its-keydef.el 22 Jul 2002 13:18:56 -0000 1.3
@@ -43,6 +43,7 @@
(defvar its-select-alist nil)
@@ -10951,9 +7476,14 @@ diff -duNrp ../tamago-4.0.6/its-keydef.el ./its-keydef.el
(egg-exit-conversion)))
(setq its-current-select-func func
its-current-map ',map
-diff -duNrp ../tamago-4.0.6/its.el ./its.el
---- ../tamago-4.0.6/its.el Mon Jan 17 09:36:17 2000
-+++ ./its.el Fri Aug 2 11:36:28 2002
+Index: its.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its.el,v
+retrieving revision 1.1.1.4
+retrieving revision 1.5
+diff -d -u -p -r1.1.1.4 -r1.5
+--- its.el 27 Jan 2001 18:46:58 -0000 1.1.1.4
++++ its.el 2 Aug 2002 02:36:28 -0000 1.5
@@ -31,11 +31,13 @@
;;; Code:
@@ -11570,9 +8100,12 @@ diff -duNrp ../tamago-4.0.6/its.el ./its.el
-;;; its.el ends here.
+
+;;; its.el ends here
-diff -duNrp ../tamago-4.0.6/jisx0213.el ./jisx0213.el
---- ../tamago-4.0.6/jisx0213.el Thu Jan 1 09:00:00 1970
-+++ ./jisx0213.el Mon Jul 9 23:46:38 2001
+Index: jisx0213.el
+===================================================================
+RCS file: jisx0213.el
+diff -N jisx0213.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ jisx0213.el 9 Jul 2001 14:46:38 -0000 1.2
@@ -0,0 +1,39 @@
+;;; jisx0213.el --- Charset Definition for JIS X 0213
+
@@ -11613,9 +8146,14 @@ diff -duNrp ../tamago-4.0.6/jisx0213.el ./jisx0213.el
+(unless (charsetp 'japanese-jisx0213-2)
+ (define-charset 254 'japanese-jisx0213-2
+ [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2" "JISX0213-2 (Japanese)"]))
-diff -duNrp ../tamago-4.0.6/leim-list.el ./leim-list.el
---- ../tamago-4.0.6/leim-list.el Tue Jan 11 22:47:31 2000
-+++ ./leim-list.el Wed Sep 4 22:59:10 2002
+Index: leim-list.el
+===================================================================
+RCS file: /cvs/tamago/tamago/leim-list.el,v
+retrieving revision 1.1.1.3
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.3 -r1.3
+--- leim-list.el 27 Jan 2001 18:46:16 -0000 1.1.1.3
++++ leim-list.el 23 Aug 2002 07:46:38 -0000 1.3
@@ -1,8 +1,8 @@
;;; leim-list.el --- Egg setup for leim API
@@ -11782,10 +8320,16 @@ diff -duNrp ../tamago-4.0.6/leim-list.el ./leim-list.el
- (load-leim-list-except-this)
-
- )
+\ No newline at end of file
+;;; leim-list.el ends here.
-diff -duNrp ../tamago-4.0.6/menudiag.el ./menudiag.el
---- ../tamago-4.0.6/menudiag.el Tue Jan 4 15:53:49 2000
-+++ ./menudiag.el Sun Jan 28 03:53:13 2001
+Index: menudiag.el
+===================================================================
+RCS file: /cvs/tamago/tamago/menudiag.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- menudiag.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ menudiag.el 27 Jan 2001 18:53:13 -0000 1.2
@@ -50,7 +50,7 @@
;;
@@ -12541,3 +9085,3702 @@ diff -duNrp ../tamago-4.0.6/menudiag.el ./menudiag.el
(provide 'menudiag)
;;; menudiag.el ends here.
+Index: egg/anthy.el
+===================================================================
+RCS file: egg/anthy.el
+diff -N egg/anthy.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ egg/anthy.el 8 Aug 2002 08:11:22 -0000 1.2
+@@ -0,0 +1,220 @@
++;;; egg/anthy.el --- ANTHY Support (high level interface) in Egg
++;;; Input Method Architecture
++
++;; Copyright (C) 2002 The Free Software Initiative of Japan
++
++;; Author: NIIBE Yutaka <gniibe@m17n.org>
++
++;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
++
++;; Keywords: mule, multilingual, input method
++
++;; This file is part of EGG.
++
++;; EGG is free software; you can redistribute it and/or modify
++;; it under the terms of the GNU General Public License as published by
++;; the Free Software Foundation; either version 2, or (at your option)
++;; any later version.
++
++;; EGG is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with GNU Emacs; see the file COPYING. If not, write to the
++;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA.
++
++;;; Commentary:
++
++
++;;; Code:
++
++(require 'egg)
++(require 'egg-edep)
++
++(defgroup anthy nil
++ "Anthy interface for Tamago 4."
++ :group 'egg)
++
++(setplist 'anthy-conversion-backend
++ '(egg-start-conversion anthy-convert
++ egg-get-bunsetsu-source anthy-get-bunsetsu-source
++ egg-get-bunsetsu-converted anthy-get-bunsetsu-converted
++ egg-list-candidates anthy-get-candidates
++ egg-decide-candidate anthy-select-candidate
++ egg-change-bunsetsu-length anthy-resize-segment
++ egg-end-conversion anthy-commit
++ ;;
++ egg-get-source-language anthy-get-source-language
++ egg-get-converted-language anthy-get-converted-language))
++
++(defconst anthy-backend-alist '((Japanese ((anthy-conversion-backend)))))
++
++(egg-set-finalize-backend '(anthy-finalize-backend))
++
++(defvar anthy-proc nil
++ "Process of ANTHY helper agent.")
++
++;; <environments> ::= ( <env> ... <env> )
++;;
++;; <env> ::= <context-descriptor>
++;; <context-descriptor> ::= <integer>
++(defvar anthy-environment-pool nil
++ "Environments for ANTHY kana-kanji conversion, to be used.")
++
++(defvar anthy-environments-in-use nil
++ "Environments for ANTHY kana-kanji conversion, in use.")
++
++;;
++;; <anthy-bunsetsu> ::=
++;; [ <env> <source> <converted> <candidates> <candidate-pos> <seg-no> ]
++(defsubst anthy-make-bunsetsu (env source converted seg-no)
++ (egg-bunsetsu-create
++ 'anthy-conversion-backend
++ (vector env source converted nil 0 seg-no)))
++
++(defsubst anthybunsetsu-get-env (b)
++ (aref (egg-bunsetsu-get-info b) 0))
++(defsubst anthybunsetsu-get-source (b)
++ (aref (egg-bunsetsu-get-info b) 1))
++(defsubst anthybunsetsu-get-converted (b)
++ (aref (egg-bunsetsu-get-info b) 2))
++(defsubst anthybunsetsu-get-candidates (b)
++ (aref (egg-bunsetsu-get-info b) 3))
++(defsubst anthybunsetsu-set-candidates (b z)
++ (aset (egg-bunsetsu-get-info b) 3 z))
++(defsubst anthybunsetsu-get-candidate-pos (b)
++ (aref (egg-bunsetsu-get-info b) 4))
++(defsubst anthybunsetsu-set-candidate-pos (b zp)
++ (aset (egg-bunsetsu-get-info b) 4 zp))
++(defsubst anthybunsetsu-get-seg-no (b)
++ (aref (egg-bunsetsu-get-info b) 5))
++
++(defun anthy-get-bunsetsu-source (b)
++ (anthybunsetsu-get-source b))
++
++(defun anthy-get-bunsetsu-converted (b)
++ (let ((cands (anthybunsetsu-get-candidates b)))
++ (if cands
++ (nth (anthybunsetsu-get-candidate-pos b) cands)
++ (anthybunsetsu-get-converted b))))
++
++(defun anthy-get-source-language (b) 'Japanese)
++(defun anthy-get-converted-language (b) 'Japanese)
++
++;; Getting new context-descriptor, and returns environment with 'inuse' bit
++(defun anthy-new-environment ()
++ (if (null anthy-proc)
++ (let ((buf (generate-new-buffer " *ANTHY*"))
++ (process-connection-type nil)) ; avoid using pty
++ (setq anthy-proc
++ (start-process "anthy-agent" buf "anthy-agent" "--egg"))
++ (process-kill-without-query anthy-proc)
++ (set-process-coding-system anthy-proc 'euc-jp-dos 'euc-jp-dos)
++ (set-process-sentinel anthy-proc 'anthy-proc-sentinel)
++ (set-marker-insertion-type (process-mark anthy-proc) t)
++ (save-excursion
++ (set-buffer buf)
++ (erase-buffer)
++ (buffer-disable-undo))))
++ (anthyipc-get-greeting anthy-proc)
++ (anthyipc-new-context anthy-proc))
++
++;;; XXX: Don't kill buffer (for now) so that I can debug this program
++(defun anthy-proc-sentinel (proc reason)
++; (kill-buffer (process-buffer proc))
++ (setq anthy-proc nil
++ anthy-environments-in-use nil
++ anthy-environment-pool nil))
++
++;;; anthyipc-release-context
++
++
++(defun anthy-get-environment ()
++ "Return the ANTHY environment."
++ (if anthy-environment-pool
++ (let ((env (car anthy-environment-pool)))
++ (setq anthy-environment-pool (cdr anthy-environment-pool))
++ (setq anthy-environments-in-use (cons env anthy-environments-in-use))
++ env)
++ (let ((env (anthy-new-environment)))
++ (setq anthy-environments-in-use (cons env anthy-environments-in-use))
++ env)))
++
++;;
++;; Returns list of bunsetsu
++;;
++(defun anthy-convert (backend yomi &optional context)
++ "Convert YOMI string to kanji, and enter conversion mode.
++Return the list of bunsetsu."
++ (let ((env (anthy-get-environment)))
++ (anthyipc-convert anthy-proc env yomi)))
++
++;;
++;;
++;;
++(defun anthy-commit (bunsetsu-list abort)
++ (let ((env (anthybunsetsu-get-env (car bunsetsu-list))))
++ (anthyipc-commit anthy-proc env (if abort 1 0))
++ (setq anthy-environment-pool (cons env anthy-environment-pool))
++ (setq anthy-environments-in-use (delq env anthy-environments-in-use))))
++
++;;
++;; Returns ( <pos> <candidates> )
++;;
++(defun anthy-get-candidates (bunsetsu-list prev-bunsetsu next-bunsetsu major)
++ (let ((bunsetsu (car bunsetsu-list)))
++ (if (anthybunsetsu-get-candidates bunsetsu)
++ (cons (anthybunsetsu-get-candidate-pos bunsetsu)
++ (anthybunsetsu-get-candidates bunsetsu))
++ (let* ((env (anthybunsetsu-get-env bunsetsu))
++ (seg-no (anthybunsetsu-get-seg-no bunsetsu))
++ (cands (anthyipc-get-candidates anthy-proc env seg-no)))
++ (cons (anthybunsetsu-set-candidate-pos bunsetsu 0)
++ (anthybunsetsu-set-candidates bunsetsu cands))))))
++
++;; Returns list of list of bunsetsu
++(defun anthy-select-candidate (bunsetsu-list candidate-pos prev-b next-b)
++ (let* ((bunsetsu (car bunsetsu-list))
++ (candidate-list (anthybunsetsu-get-candidates bunsetsu))
++ (candidate (nth candidate-pos candidate-list))
++ (env (anthybunsetsu-get-env bunsetsu))
++ (seg-no (anthybunsetsu-get-seg-no bunsetsu)))
++ (anthybunsetsu-set-candidate-pos bunsetsu candidate-pos)
++ ;; Anthy doesn't have capability of changing another segment
++ ;; at the selection of a segment.
++ ;; So, just ignore the result of "SELECT-CANDIDATE"
++ (anthyipc-select-candidate anthy-proc env seg-no candidate-pos)
++ (list (list bunsetsu))))
++
++;; Returns list of list of bunsetsu
++(defun anthy-resize-segment (bunsetsu-list prev-b next-b len major)
++ (let ((bunsetsu (car bunsetsu-list)))
++ (let ((env (anthybunsetsu-get-env bunsetsu))
++ (seg-no (anthybunsetsu-get-seg-no bunsetsu))
++ (prevlen (length (anthybunsetsu-get-source bunsetsu))))
++ (let ((r (anthyipc-resize-segment anthy-proc env seg-no
++ (if (< prevlen len) 0 1))))
++ ;; XXX: I don't know what this means,
++ ;; but this works. Blame EGG.
++ (list (list (car r)) nil (cdr r))))))
++
++(defun anthy-finalize-backend ()
++ (if anthy-proc
++ (progn
++ (delete-process anthy-proc)
++ (setq anthy-proc nil))))
++
++;;; setup
++
++(load "egg/anthyipc")
++(run-hooks 'anthy-load-hook)
++
++;;;###autoload
++(defun egg-activate-anthy (&rest arg)
++ "Activate ANTHY backend of Tamago 4."
++ (apply 'egg-mode (append arg anthy-backend-alist)))
++
++;;; egg/anthy.el ends here.
+Index: egg/anthyipc.el
+===================================================================
+RCS file: egg/anthyipc.el
+diff -N egg/anthyipc.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ egg/anthyipc.el 8 Aug 2002 07:28:41 -0000 1.1
+@@ -0,0 +1,195 @@
++;;; egg/anthyipc.el --- ANTHY IPC Support (low level interface) in Egg
++;;; Input Method Architecture
++
++;; Copyright (C) 2002 The Free Software Initiative of Japan
++
++;; Author: NIIBE Yutaka <gniibe@m17n.org>
++
++;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
++
++;; Keywords: mule, multilingual, input method
++
++;; This file is part of EGG.
++
++;; EGG is free software; you can redistribute it and/or modify
++;; it under the terms of the GNU General Public License as published by
++;; the Free Software Foundation; either version 2, or (at your option)
++;; any later version.
++
++;; EGG is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with GNU Emacs; see the file COPYING. If not, write to the
++;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA.
++
++;;; Commentary:
++
++
++;;; Code:
++
++(defmacro anthyipc-call-with-proc (proc vlist send-expr &rest receive-exprs)
++ `(let* ((proc ,proc)
++ (buffer (process-buffer proc))
++ ,@vlist)
++ (if (and (eq (process-status proc) 'run)
++ (buffer-live-p buffer))
++ (save-excursion
++ (set-buffer buffer)
++ (erase-buffer)
++ ,send-expr
++ (goto-char (point-max))
++ (process-send-region proc (point-min) (point-max))
++ ,@receive-exprs)
++ (egg-error "process %s was killed" proc))))
++
++(defun anthyipc-wait-line ()
++ (let ((start (point)))
++ (while (not (search-forward "\n" nil 1))
++ (accept-process-output proc 1000)
++ (goto-char start))
++ (goto-char start)))
++
++(defun anthyipc-accept-ok ()
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?+)
++ ;; "+OK"
++ (goto-char (point-max))
++ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
++
++(defun anthyipc-accept-number ()
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?+)
++ ;; "+OK <number>"
++ (progn
++ (forward-char 4)
++ (prog1
++ (read (current-buffer))
++ (goto-char (point-max))))
++ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
++
++(defun anthyipc-read-string ()
++ (if (eq (char-after) ?\ )
++ (forward-char 1))
++ (let ((start (point)))
++ (while (and (char-after)
++ (not (eq (char-after) ?\ ))
++ (not (eq (char-after) ?\n)))
++ (forward-char 1))
++ (buffer-substring start (point))))
++
++(defun anthyipc-accept-segments (env seg-no-orig)
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?+)
++ (progn
++ (forward-char 1)
++ (if (eq (char-after) ?O)
++ ;; "+OK"
++ (progn
++ (goto-char (point-max))
++ t)
++ ;; "+DATA <seg-no> <num-segments-removed> <num-segments-inserted>"
++ ;; "<num-candidates> <converted> <yomi>"*N
++ ;; ""
++ ;;
++ (forward-char 5)
++ (let* ((seg-no (read (current-buffer)))
++ (num-segments-removed (read (current-buffer)))
++ (num-segments-inserted (read (current-buffer)))
++ (segment-list nil)
++ (in-loop t)
++ (i seg-no))
++ (while in-loop
++ (forward-char 1)
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?\n)
++ (setq in-loop nil)
++ (let* ((num-candidates (read (current-buffer)))
++ (converted (anthyipc-read-string))
++ (source (anthyipc-read-string))
++ (segment (anthy-make-bunsetsu env source converted i)))
++ (setq i (1+ i))
++ (setq segment-list (cons segment segment-list)))))
++ ;; XXX check if seg-no == seg-no-orig
++ ;; XXX check inserted and length of segment-list???
++ (forward-char 1)
++ (cons seg-no (cons num-segments-removed (reverse segment-list))))))
++ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
++
++(defun anthyipc-accept-candidates ()
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?+)
++ (progn
++ ;; "+DATA <offset> <num-candidates>"
++ ;; "<converted>"*N
++ ;; ""
++ (forward-char 6)
++ (let* ((offset (read (current-buffer)))
++ (num-candidates (read (current-buffer)))
++ (candidate-list nil)
++ (in-loop t))
++ (while in-loop
++ (forward-char 1)
++ (anthyipc-wait-line)
++ (if (eq (char-after) ?\n)
++ (setq in-loop nil)
++ (let ((candidate (anthyipc-read-string)))
++ (setq candidate-list (cons candidate candidate-list)))))
++ ;; XXX check num-candidates and length of candidate-list???
++ (forward-char 1)
++ (cons offset (reverse candidate-list))))
++ (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
++
++(defun anthyipc-get-greeting (proc)
++ (anthyipc-call-with-proc proc ()
++ nil
++ (anthyipc-wait-line)
++ (message (buffer-substring (point-min) (1- (point-max))))))
++
++(defun anthyipc-new-context (proc)
++ (anthyipc-call-with-proc proc ()
++ (insert "NEW-CONTEXT INPUT=#18 OUTPUT=#18\n")
++ (anthyipc-accept-number)))
++
++(defun anthyipc-release-context (proc cont)
++ (anthyipc-call-with-proc proc ()
++ (insert (format "RELEASE-CONTEXT %d\n" cont))
++ (anthyipc-accept-ok)))
++
++;; Returns list of bunsetsu
++(defun anthyipc-convert (proc cont yomi)
++ (anthyipc-call-with-proc proc ()
++ (insert (format "CONVERT %d %s\n" cont yomi))
++ (let ((r (anthyipc-accept-segments cont 0)))
++ (cdr (cdr r)))))
++
++(defun anthyipc-commit (proc cont cancel)
++ (anthyipc-call-with-proc proc ()
++ (insert (format "COMMIT %d %d\n" cont cancel))
++ (anthyipc-accept-ok)))
++
++;;; Returns list of candidate
++(defconst anthy-max-candidates 9999)
++(defun anthyipc-get-candidates (proc cont seg-no)
++ (anthyipc-call-with-proc proc ()
++ (insert
++ (format "GET-CANDIDATES %d %d %d %d\n" cont seg-no 0 anthy-max-candidates))
++ (let ((r (anthyipc-accept-candidates)))
++ (cdr r))))
++
++;;; Returns segments
++(defun anthyipc-select-candidate (proc cont seg-no candidate-no)
++ (anthyipc-call-with-proc proc ()
++ (insert (format "SELECT-CANDIDATE %d %d %d\n" cont seg-no candidate-no))
++ (anthyipc-accept-segments cont seg-no)))
++
++;;; Returns segments
++(defun anthyipc-resize-segment (proc cont seg-no inc-dec)
++ (anthyipc-call-with-proc proc ()
++ (insert (format "RESIZE-SEGMENT %d %d %d\n" cont seg-no inc-dec))
++ (cddr (anthyipc-accept-segments cont seg-no))))
++
++;;; egg/anthyipc.el ends here.
+Index: egg/canna.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/canna.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.4
+diff -d -u -p -r1.1.1.1 -r1.4
+--- egg/canna.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg/canna.el 22 Jul 2002 13:18:56 -0000 1.4
+@@ -30,257 +30,878 @@
+
+ ;;; Code:
+
+-
++(require 'egg)
+ (require 'egg-edep)
+
+-(eval-when-compile
+- (defmacro CANNA-const (c)
+- (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
+- )))
++(defgroup canna nil
++ "CANNA interface for Tamago 4."
++ :group 'egg)
+
+-(defconst canna-conversion-backend
+- [ canna-init
++(defcustom canna-hostname "localhost"
++ "Hostname of CANNA server"
++ :group 'canna :type 'string)
+
+- canna-start-conversion
+- canna-get-bunsetsu-converted
+- canna-get-bunsetsu-source
+- canna-list-candidates
+- canna-get-number-of-candidates
+- canna-get-current-candidate-number
+- canna-get-all-candidates
+- canna-decide-candidate
+- canna-change-bunsetsu-length
+- canna-end-conversion
+- nil
++(defcustom canna-server-port "canna"
++ "A service name or a port number (should be a string) of CANNA server"
++ :group 'canna :type 'string)
+
+- canna-fini
+- ])
++(defcustom canna-user-name nil
++ "User Name on CANNA server"
++ :group 'canna :type 'string)
+
+-(defconst canna-server-port 5680 "Port number of Canna server")
+-(defvar canna-hostname "localhost"
+- "Hostname of Canna server")
++(defcustom canna-group-name nil
++ "Group Name on CANNA server"
++ :group 'canna :type 'string)
+
+-(defun canna-open (hostname)
+- "Establish the connection to CANNA server. Return environment object."
+- (let* ((buf (generate-new-buffer " *CANNA*"))
+- (proc (open-network-stream "CANNA" buf hostname canna-server-port))
+- result)
+- (process-kill-without-query proc)
+- (set-process-coding-system proc 'no-conversion 'no-conversion)
+- (set-marker-insertion-type (process-mark proc) t)
+- (save-excursion
+- (set-buffer buf)
+- (erase-buffer)
+- (buffer-disable-undo)
+- (set-buffer-multibyte nil))
+- (setq result (cannarpc-open proc (user-login-name)))
+- (if (< result 0)
+- (let ((msg (cannarpc-get-error-message (- result))))
+- (delete-process proc)
+- (kill-buffer buf)
+- (error "Can't open CANNA session (%s): %s" hostname msg)))
+- (vector proc result)))
++; (eval-when-compile
++; (defmacro CANNA-const (c)
++; (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
++; )))
+
+-;; XXX: Should support multiple outstanding context
+-;; <env> ::= [ <proc> <context> ]
+-(defvar canna-environment nil
++(egg-add-message
++ '((Japanese
++ (canna-connect-error "$B%5!<%P$H@\B3$G$-$^$;$s$G$7$?(B")
++ (canna-fail-make-env "$B4D6-$r:n$k$3$H$O$G$-$^$;$s$G$7$?(B")
++ (canna-dict-missing-1 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#(B")
++ (canna-dict-missing-2 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#:n$j$^$9$+(B? ")
++ (canna-dict-created "$B<-=q%U%!%$%k(B %s $B$r:n$j$^$7$?(B")
++ (canna-dict-saving "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$F$$$^$9(B")
++ (canna-dict-saved "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$^$7$?(B")
++ (canna-register-1 "$BEPO?<-=qL>(B:")
++ (canna-register-2 "$BIJ;lL>(B"))))
++
++(defvar canna-hinshi-alist
++ '(("$B?ML>(B" . "#JN") ("$BCOL>(B" . "#CN") ("$B8GM-L>;l(B" . "#KK")
++ ("$B0lHLL>;l(B" . "#T35") ("$BL>;l(B($BNc(B)$B6/NO$J(B" . "#T15")
++ ("$B%5JQL>;l(B" . "#T30") ("$B%5JQL>;l(B($BNc(B)$B0B?4$J(B" . "#T10") ("$BC14A;z(B" . "#KJ")
++ ("$BF0;l%+9TJQ3J3hMQ(B" . "#KX") ("$BF0;l%s%69TJQ3J3hMQ(B" . "#NZX")
++ ("$BF0;l%69TJQ3J3hMQ(B" . "#ZX") ("$BF0;l%59TJQ3J3hMQ(B" . "#SX")
++ ("$BF0;l%+9T8^CJ3hMQ(B" . "#K5") ("$BF0;l%,9T8^CJ3hMQ(B" . "#G5")
++ ("$BF0;l%59T8^CJ3hMQ(B" . "#S5") ("$BF0;l%?9T8^CJ3hMQ(B" . "#T5")
++ ("$BF0;l%J9T8^CJ3hMQ(B" . "#N5") ("$BF0;l%P9T8^CJ3hMQ(B" . "#B5")
++ ("$BF0;l%^9T8^CJ3hMQ(B" . "#M5") ("$BF0;l%i9T8^CJ3hMQ(B" . "#R5")
++ ("$BF0;l%o9T8^CJ3hMQ(B" . "#W5") ("$BF0;l>e2<0lCJ3hMQ(B" . "#KS")
++ ("$BF0;l%+9T8^CJO"MQL>;l(B" . "#K5r") ("$BF0;l%,9T8^CJO"MQL>;l(B" . "#G5r")
++ ("$BF0;l%59T8^CJO"MQL>;l(B" . "#S5r") ("$BF0;l%?9T8^CJO"MQL>;l(B" . "#T5r")
++ ("$BF0;l%J9T8^CJO"MQL>;l(B" . "#N5r") ("$BF0;l%P9T8^CJO"MQL>;l(B" . "#B5r")
++ ("$BF0;l%^9T8^CJO"MQL>;l(B" . "#M5r") ("$BF0;l%i9T8^CJO"MQL>;l(B" . "#R5r")
++ ("$BF0;l%o9T8^CJO"MQL>;l(B" . "#W5r") ("$BF0;l>e2<0lCJ8l44L>;l(B" . "#KSr")
++ ("$B7AMF;l(B" . "#KY") ("$B7AMF;l(B($BNc(B)$B$-$$$m$$(B" . "#KYT")
++ ("$B7AMFF0;l(B" . "#T05")
++ ("$B7AMFF0;l(B($BNc(B)$B4X?4$@(B" . "#T10") ("$B7AMFF0;l(B($BNc(B)$BB?92$F$@(B" . "#T13")
++ ("$B7AMFF0;l(B($BNc(B)$B0U30$@(B" . "#T15") ("$B7AMFF0;l(B($BNc(B)$BJXMx$@(B" . "#T18")
++ ("$BI{;l(B" . "#F14") ("$BI{;l(B($BNc(B)$B$U$C$/$i(B" . "#F04")
++ ("$BI{;l(B($BNc(B)$B$=$C$H(B" . "#F12") ("$BI{;l(B($BNc(B)$BFMA3(B" . "#F06")
++ ("$B?t;l(B" . "#NN") ("$B@\B3;l!&46F0;l(B" . "#CJ") ("$BO"BN;l(B" . "#RT")))
++
++(defvar canna-hinshi-menu
++ '("$B?ML>(B" "$BCOL>(B" ("$BCDBN!&2q<RL>(B" . "$B8GM-L>;l(B") ("$BL>;l(B" . MEISHI)
++ ("$B%5JQL>;l(B" . SAHEN-MEISHI) "$BC14A;z(B" ("$BF0;l(B" . DOUSHI)
++ ("$B7AMF;l(B" . KEIYOUSHI) ("$B7AMFF0;l(B" . KEIYOUDOUSHI) ("$BI{;l(B" . FUKUSHI)
++ "$B?t;l(B" "$B@\B3;l!&46F0;l(B" "$BO"BN;l(B" ("$B$=$NB>$N8GM-L>;l(B" . "$B8GM-L>;l(B"))
++ "Menu data for a hinshi (a part of speech) selection.")
++
++(defun canna-hinshi-name (id &optional reverse)
++ (if reverse
++ (cdr (assoc id canna-hinshi-alist))
++ (car (rassoc id canna-hinshi-alist))))
++
++(defmacro canna-backend-plist ()
++ ''(egg-start-conversion canna-start-conversion
++ egg-get-bunsetsu-source canna-get-bunsetsu-source
++ egg-get-bunsetsu-converted canna-get-bunsetsu-converted
++ egg-get-source-language canna-get-source-language
++ egg-get-converted-language canna-get-converted-language
++ egg-list-candidates canna-list-candidates
++ egg-decide-candidate canna-decide-candidate
++ egg-special-candidate canna-special-candidate
++ egg-change-bunsetsu-length canna-change-bunsetsu-length
++ egg-end-conversion canna-end-conversion
++ egg-word-registration canna-word-registration))
++
++(defconst canna-backend-language-alist nil)
++
++(defvar canna-backend-alist nil)
++
++(defun canna-backend-func-name (name lang &optional env)
++ (intern (concat name "-" (symbol-name lang)
++ (and env "-") (and env (symbol-name env)))))
++
++(defun canna-make-backend (lang env &optional source-lang converted-lang)
++ (let ((finalize (canna-backend-func-name "canna-finalize-backend" lang))
++ (backend (canna-backend-func-name "canna-backend" lang env)))
++ (if (null (fboundp finalize))
++ (progn
++ (fset finalize (function (lambda () (canna-finalize-backend))))
++ (egg-set-finalize-backend (list finalize))))
++ (if (null (get backend 'egg-start-conversion))
++ (setplist backend (apply 'list
++ 'language lang
++ 'source-language (or source-lang lang)
++ 'converted-language (or converted-lang lang)
++ (canna-backend-plist))))
++ backend))
++
++(defun canna-define-backend (lang env-name-list)
++ (mapcar (lambda (env)
++ (if (consp env)
++ (canna-define-backend lang env)
++ (canna-make-backend lang env)))
++ env-name-list))
++
++(defun canna-define-backend-alist (deflist)
++ (setq canna-backend-alist
++ (mapcar (lambda (slot)
++ (let* ((lang (car slot))
++ (alt (cdr (assq lang canna-backend-language-alist))))
++ (cons lang (canna-define-backend (or alt lang) (cdr slot)))))
++ deflist)))
++
++(defcustom canna-backend-define-list
++ '((Japanese ((nil nil nil))
++ ((Bushu Bushu Bushu))))
++ "Alist of Japanese language and lists of the Canna backend suffixes."
++ :group 'canna
++ :set (lambda (sym value)
++ (set-default sym value)
++ (canna-define-backend-alist value))
++ :type '(repeat
++ (cons
++ :tag "Language - Backend"
++ (choice :tag "Language"
++ (const Japanese)
++ (symbol :tag "Other"))
++ (repeat
++ (cons
++ :tag "Backend Sequece"
++ (cons :tag "First Conversion Stage"
++ (symbol :tag "Backend for Start Conversion")
++ (repeat :tag "Backends for Reconvert"
++ (symbol :tag "Backend")))
++ (repeat
++ :tag "Following Conversion Stages"
++ (cons
++ :tag "N-th Stage"
++ (symbol :tag "Backend for This Stage")
++ (repeat :tag "Backends for Reconvert"
++ (symbol :tag "Backend")))))))))
++
++(defsubst canna-backend-get-language (backend)
++ (get backend 'language))
++
++(defsubst canna-backend-get-source-language (backend)
++ (get backend 'source-language))
++
++(defsubst canna-backend-get-converted-language (backend)
++ (get backend 'converted-language))
++
++(defvar canna-envspec-list nil)
++(defvar canna-current-envspec nil)
++
++;; Should support multiple outstanding context
++;; <env> ::= [ <proc> <context> <backend> <convert-mode> <nostudy> <dic-list> ]
++(defvar canna-environments nil
+ "Environment for CANNA kana-kanji conversion")
+
+-(defsubst cannaenv-get-proc (env)
+- (aref env 0))
+-(defsubst cannaenv-get-context (env)
+- (aref env 1))
++(defun cannaenv-create (proc context &optional backend mode nostudy)
++ (vector proc context backend mode nostudy (list nil)))
+
+-;; <bunsetsu> ::=
+-;; [ <env> <converted> <bunsetsu-pos>
+-;; <source> <zenkouho-pos> <zenkouho> ]
+-(defsubst canna-make-bunsetsu (env converted bunsetsu-pos)
+- (vector env converted bunsetsu-pos nil nil nil))
++(defsubst cannaenv-get-proc (env) (aref env 0))
++(defsubst cannaenv-get-context (env) (aref env 1))
++(defsubst cannaenv-get-backend (env) (aref env 2))
++(defsubst cannaenv-get-mode (env) (aref env 3))
++(defsubst cannaenv-get-nostudy (env) (aref env 4))
++(defsubst cannaenv-get-dic-list (env) (cdr (aref env 5)))
+
+-(defsubst cannabunsetsu-get-env (b)
+- (aref b 0))
+-(defsubst cannabunsetsu-get-converted (b)
+- (aref b 1))
+-(defsubst cannabunsetsu-get-bunsetsu-pos (b)
+- (aref b 2))
+-(defsubst cannabunsetsu-get-source (b)
+- (aref b 3))
+-(defsubst cannabunsetsu-set-source (b s)
+- (aset b 3 s))
+-(defsubst cannabunsetsu-get-zenkouho-pos (b)
+- (aref b 4))
+-(defsubst cannabunsetsu-set-zenkouho-pos (b p)
+- (aset b 4 p))
+-(defsubst cannabunsetsu-get-zenkouho (b)
+- (aref b 5))
+-(defsubst cannabunsetsu-set-zenkouho (b z)
+- (aset b 5 z))
++(defsubst cannaenv-add-dic-list (env &rest dic)
++ (nconc (aref env 5) (list (apply 'vector dic))))
++
++;; <canna-bunsetsu> ::=
++;; [ <env> <converted> <bunsetsu-pos> <source>
++;; <zenkouho-pos> <zenkouho> <zenkouho-converted> ]
++(defsubst canna-make-bunsetsu (env converted bunsetsu-pos source)
++ (egg-bunsetsu-create
++ (cannaenv-get-backend env)
++ (vector env converted bunsetsu-pos source nil nil nil)))
++
++(defsubst canna-bunsetsu-get-env (b)
++ (aref (egg-bunsetsu-get-info b) 0))
++(defsubst canna-bunsetsu-get-converted (b)
++ (aref (egg-bunsetsu-get-info b) 1))
++(defsubst canna-bunsetsu-get-bunsetsu-pos (b)
++ (aref (egg-bunsetsu-get-info b) 2))
++(defsubst canna-bunsetsu-get-source (b)
++ (aref (egg-bunsetsu-get-info b) 3))
++(defsubst canna-bunsetsu-set-source (b s)
++ (aset (egg-bunsetsu-get-info b) 3 s))
++(defsubst canna-bunsetsu-get-zenkouho-pos (b)
++ (aref (egg-bunsetsu-get-info b) 4))
++(defsubst canna-bunsetsu-set-zenkouho-pos (b p)
++ (aset (egg-bunsetsu-get-info b) 4 p))
++(defsubst canna-bunsetsu-get-zenkouho (b)
++ (aref (egg-bunsetsu-get-info b) 5))
++(defsubst canna-bunsetsu-set-zenkouho (b z)
++ (aset (egg-bunsetsu-get-info b) 5 z))
++(defsubst canna-bunsetsu-get-zenkouho-converted (b)
++ (aref (egg-bunsetsu-get-info b) 6))
++(defsubst canna-bunsetsu-set-zenkouho-converted (b zc)
++ (aset (egg-bunsetsu-get-info b) 6 zc))
+
+ (defun canna-get-bunsetsu-source (b)
+- (let ((s (cannabunsetsu-get-source b)))
++ (let ((s (canna-bunsetsu-get-source b)))
+ (or s
+- (let* ((env (cannabunsetsu-get-env b))
+- (bp (cannabunsetsu-get-bunsetsu-pos b))
++ (let* ((env (canna-bunsetsu-get-env b))
++ (bp (canna-bunsetsu-get-bunsetsu-pos b))
+ (s (cannarpc-get-bunsetsu-source env bp)))
+- (cannabunsetsu-set-source b s)))))
++ (canna-bunsetsu-set-source b s)))))
++(defun canna-get-bunsetsu-converted (b) (canna-bunsetsu-get-converted b))
++(defun canna-get-source-language (b) 'Japanese)
++(defun canna-get-converted-language (b) 'Japanese)
+
+-(defun canna-get-bunsetsu-converted (b)
+- (cannabunsetsu-get-converted b))
++(defun canna-envspec-create (env-name convert-mode nostudy)
++ (vector (and env-name (setq env-name (intern env-name)))
++ (canna-make-backend egg-language env-name)
++ convert-mode nostudy (list nil)))
+
+-(defconst canna-dictionary-specification
+- '("iroha"
+- "fuzokugo"
+- "hojomwd"
+- "hojoswd"
+- "bushu"
+- "user"
+- )
+- "Dictionary specification of CANNA.")
++(defsubst canna-envspec-env-type (spec) (aref spec 0))
++(defsubst canna-envspec-backend (spec) (aref spec 1))
++(defsubst canna-envspec-mode (spec) (aref spec 2))
++(defsubst canna-envspec-nostudy (spec) (aref spec 3))
++(defsubst canna-envspec-dic-list (spec) (cdr (aref spec 4)))
++
++(defsubst canna-envspec-add-dic-list (spec &rest dic)
++ (nconc (aref spec 4) (list (apply 'vector dic))))
++
++(defmacro canna-arg-type-error (func)
++ `(egg-error ,(format "%s: Wrong type argument" func)))
++
++(defun canna-define-environment (&optional env-name convert-mode nostudy)
++ "Define a Canna environment. ENV-NAME specifies suffix of the Canna
++environment name. CONVERT-MODE specifies including hiragana or
++katakana to candidates list. NOSTUDY specifies not study."
++ (if (and env-name (null (stringp env-name)))
++ (canna-arg-type-error canna-define-environment))
++ (setq canna-current-envspec (canna-envspec-create env-name
++ convert-mode nostudy)
++ canna-envspec-list (nconc canna-envspec-list
++ (list canna-current-envspec))))
++
++(defun canna-add-dict (dict dict-rw)
++ (canna-envspec-add-dic-list canna-current-envspec dict dict-rw))
++
++(defun canna-comm-sentinel (proc reason) ; assume it is close
++ (let ((inhibit-quit t))
++ (kill-buffer (process-buffer proc))
++ ;; delete env from the list.
++ (setq canna-environments
++ (delq nil (mapcar (lambda (env)
++ (if (null (eq (cannaenv-get-proc env) proc))
++ env))
++ canna-environments)))))
++
++(defun canna-open (hostname-list)
++ "Establish the connection to CANNA server. Return environment object."
++ (let* ((save-inhibit-quit inhibit-quit)
++ (inhibit-quit t)
++ (proc-name "CANNA")
++ (msg-form "Canna: connecting to %S at %s...")
++ (user-name (or canna-user-name (user-login-name)))
++ (id (shell-command-to-string "id"))
++ (group (or canna-group-name
++ (if (string-match "gid=[0-9]+(\\([^)]+\\))" id)
++ (match-string 1 id)
++ "user")))
++ buf hostname port proc result msg)
++ (unwind-protect
++ (progn
++ (setq buf (generate-new-buffer " *CANNA*"))
++ (save-excursion
++ (set-buffer buf)
++ (erase-buffer)
++ (buffer-disable-undo)
++ (set-buffer-multibyte nil)
++ (setq egg-fixed-euc 'fixed-euc-jp))
++ (or (consp hostname-list)
++ (setq hostname-list (list hostname-list)))
++ (while (and hostname-list (null proc))
++ (setq hostname (or (car hostname-list) "")
++ hostname-list (cdr hostname-list))
++ (if (null (string-match ":" hostname))
++ (setq port canna-server-port)
++ (setq port (substring hostname (match-end 0))
++ hostname (substring hostname 0 (match-beginning 0))))
++ (if (and (stringp port) (string-match "^[0-9]+$" port))
++ (setq port (string-to-int port)))
++ (and (equal hostname "")
++ (setq hostname (or (getenv "CANNAHOST") "localhost")))
++ (let ((inhibit-quit save-inhibit-quit))
++ (if (and msg
++ (null (y-or-n-p (format "%s failed. Try to %s? "
++ msg hostname))))
++ (egg-error "abort connect")))
++ (setq msg (format "Canna: connecting to %s..." hostname))
++ (message "%s" msg)
++ (let ((inhibit-quit save-inhibit-quit))
++ (condition-case nil
++ (setq proc (open-network-stream proc-name buf hostname port))
++ ((error quit))))
++ (when proc
++ (process-kill-without-query proc)
++ (set-process-coding-system proc 'binary 'binary)
++ (set-process-sentinel proc 'canna-comm-sentinel)
++ (set-marker-insertion-type (process-mark proc) t)
++ (setq result (cannarpc-open proc user-name)) ;; result is context
++ (if (= result -1)
++ (progn
++ (delete-process proc)
++ (setq proc nil))
++ (cannarpc-notice-group-name proc result group)
++ (cannarpc-set-app-name proc result "EGG4"))))
++ (cons proc result))
++ (if proc
++ (message (concat msg "done"))
++ (if buf (kill-buffer buf))
++ (egg-error 'canna-connect-error)))))
+
+ (defun canna-filename (p)
+ ""
+ (cond ((consp p) (concat (car p) "/" (user-login-name)))
+ (t p)))
+
+-(defun canna-get-environment ()
++(defun canna-search-environment (backend)
++ (let ((env-list canna-environments)
++ env)
++ (while (and (null env) env-list)
++ (setq env (and (eq (cannaenv-get-backend (car env-list)) backend)
++ (car env-list))
++ env-list (cdr env-list)))
++ env))
++
++(defun canna-get-environment (backend)
+ "Return the backend of CANNA environment."
+- (if canna-environment
+- canna-environment
+- (let* ((env (canna-open canna-hostname))
+- (l canna-dictionary-specification)
+- dict-list)
+- (while l
+- (let ((dic (car l))
+- result)
+- (setq result
+- (canna-open-dictionary env (canna-filename dic)))
+- (if (= result 255)
+- (error "Damedamedame") ; XXX
+- (setq l (cdr l)))))
+- (setq canna-environment env))))
++ (let ((env (canna-search-environment backend))
++ proc context error)
++ (or env
++ (unwind-protect
++ (let* ((language (canna-backend-get-language backend))
++ specs)
++ (setq proc (canna-open canna-hostname)
++ context (cdr proc)
++ proc (car proc)
++ canna-envspec-list nil)
++ (condition-case err
++ (egg-load-startup-file 'canna language)
++ (egg-error
++ (setq error err)
++ (signal (car error) (cdr error))))
++ (setq specs canna-envspec-list)
++ (while specs
++ (canna-create-environment proc context (car specs))
++ (setq context nil)
++ (setq specs (cdr specs)))
++ (setq env (canna-search-environment backend)))
++ (when (and proc (null env))
++ (cannarpc-close proc)
++ (if error
++ (signal (car error) (cdr error))
++ (egg-error 'canna-fail-make-env)))
++ ))))
+
+-(defun canna-open-dictionary (env name)
++(defun canna-create-environment (proc context spec)
++ (let* ((save-inhibit-quit inhibit-quit)
++ (inhibit-quit t)
++ (backend (canna-envspec-backend spec))
++ (convert-mode (canna-envspec-mode spec))
++ (nostudy (canna-envspec-nostudy spec))
++ (dic-list (canna-envspec-dic-list spec))
++ env)
++ (condition-case err
++ (progn
++ (if (not context)
++ (setq context (cannarpc-create-context proc)))
++ (if (< context 0)
++ (egg-error "%s" (cannarpc-get-error-message (- context))))
++ (setq env (cannaenv-create proc context backend convert-mode nostudy))
++ (let ((inhibit-quit save-inhibit-quit))
++ (while dic-list
++ (canna-set-dictionary env (car dic-list))
++ (setq dic-list (cdr dic-list))))
++ (setq canna-environments (nconc canna-environments (list env))))
++ ((egg-error quit)
++ (if (eq (car err) 'egg-error)
++ (message "%s" (nth 1 err)))
++ (if env
++ (progn
++ (cannarpc-close-context env)
++ (setq canna-environments (delq env canna-environments))))
++ (if (eq (car err) 'quit)
++ (signal 'quit (cdr err)))))))
++
++(defun canna-set-dictionary (env dic-spec)
++ (let ((dname (aref dic-spec 0))
++ (drw (aref dic-spec 1))
++ did result)
++ (if (= 0 (canna-open-dictionary env dname drw))
++ (cannaenv-add-dic-list env dname drw))))
++
++(defun canna-open-dictionary (env name rw)
+ (let ((trying t)
+ ret)
+ (while trying
+ (setq ret (cannarpc-open-dictionary env name 0)) ; XXX MODE=0
+ (if (= ret 0)
+ (setq trying nil)
+- (message "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s(B" name)
+- (setq ret (- ret)) ; Get error code.
++ (message (egg-get-message 'canna-dict-missing-1) name)
++ (if rw
+ (if (and (y-or-n-p
+- (format "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s!#:n$j$^$9$+(B? "
+- name))
++ (format (egg-get-message 'canna-dict-missing-2) name))
+ (= (cannarpc-make-dictionary env name) 0))
+- (message "$B<-=q%U%!%$%k(B(%s)$B$r:n$j$^$7$?(B" name)
+- (error "Fatal"))))
++ (message (egg-get-message 'canna-dict-created) name)
++ (message "%s" (cannarpc-get-error-message (- ret))))
++ (setq trying nil))))
+ ret))
+
++(defun canna-save-dictionaries (env)
++ (let ((dic-list (canna-list-writable-dictionaries-byname env))
++ dic)
++ (while dic-list
++ (setq dic (car dic-list)
++ dic-list (cdr dic-list))
++ (cannarpc-save-dictionary env dic))))
++
+ (defun canna-init ()
+ )
+
+-(defun canna-start-conversion (yomi lang)
++(defun canna-set-converted-yomi (bunsetsu-pos bunsetsu-list)
++ (let ((bl bunsetsu-list)
++ (i bunsetsu-pos)
++ b)
++ (while bl
++ (setq b (car bl))
++ (canna-bunsetsu-set-source b (cannarpc-get-bunsetsu-source env i))
++ (setq i (1+ i)
++ bl (cdr bl)))
++ bunsetsu-list))
++
++(defun canna-start-conversion (backend yomi &optional context)
+ "Convert YOMI string to kanji, and enter conversion mode.
+ Return the list of bunsetsu."
+- (if (eq lang 'Japanese)
+- (let ((env (canna-get-environment)))
+- (cannarpc-begin-conversion env yomi))
+- (signal 'lang-not-supported)))
++ (let* ((env (canna-get-environment backend))
++ (bunsetsu-list (cannarpc-begin-conversion env yomi)))
++ (if (numberp bunsetsu-list) ; XXX error $B$N=hM}E,Ev(B
++ (progn
++ (if (= -1 (cannarpc-cancel-conversion env))
++ (progn
++ (setq env (canna-get-environment backend))
++ (canna-finalize-backend)))
++ (setq bunsetsu-list (cannarpc-begin-conversion env yomi))))
++ (canna-set-converted-yomi 0 bunsetsu-list)))
+
+ (defun canna-end-conversion (bunsetsu-list abort)
+- (let* ((env (cannabunsetsu-get-env (car bunsetsu-list)))
++ (let* ((env (canna-bunsetsu-get-env (car bunsetsu-list)))
+ (l bunsetsu-list)
+ (len (length bunsetsu-list))
+ (zenkouho-pos-vector (make-vector (* 2 len) 0))
+ (i 0)
+- (mode 1) ;XXX MODE=1 attru?
++ (mode (if (cannaenv-get-nostudy env) 0 1)) ; MODE=1 $B3X=,(B 0 $B$7$J$$(B
+ bunsetsu zenkouho-pos)
+ (if abort
+ (setq mode 0))
+ (while l
+ (setq bunsetsu (car l))
+ (setq l (cdr l))
+- (setq zenkouho-pos (cannabunsetsu-get-zenkouho-pos bunsetsu))
++ (setq zenkouho-pos (canna-bunsetsu-get-zenkouho-pos bunsetsu))
+ (if (null zenkouho-pos)
+ () ; XXX: NIL--> 0 atteru???
+ (aset zenkouho-pos-vector i 0) ; XXX Don't support >=256
+ (aset zenkouho-pos-vector (1+ i) zenkouho-pos))
+ (setq i (+ i 2)))
+- (cannarpc-end-conversion env len zenkouho-pos-vector 0)))
++ (cannarpc-end-conversion env len zenkouho-pos-vector mode)))
+
+-(defun canna-list-candidates (bunsetsu prev-bunsetsu)
+- (let* ((env (cannabunsetsu-get-env bunsetsu))
+- (bunsetsu-pos (cannabunsetsu-get-bunsetsu-pos bunsetsu))
+- (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos)))
+- (cannabunsetsu-set-zenkouho bunsetsu z)
+- (cannabunsetsu-set-zenkouho-pos bunsetsu 0)
+- 0))
++(defun canna-list-candidates (bunsetsu prev-b next-b major)
++ (setq bunsetsu (car bunsetsu))
++ (if (canna-bunsetsu-get-zenkouho bunsetsu)
++ (cons (canna-bunsetsu-get-zenkouho-pos bunsetsu)
++ (canna-bunsetsu-get-zenkouho-converted bunsetsu))
++ (let* ((env (canna-bunsetsu-get-env bunsetsu))
++ (yomi (canna-get-bunsetsu-source bunsetsu))
++ (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
++ (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos yomi)))
++ (canna-bunsetsu-set-zenkouho bunsetsu z)
++ (cons (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
++ (canna-bunsetsu-set-zenkouho-converted
++ bunsetsu
++ (mapcar 'canna-bunsetsu-get-converted z))))))
+
++;;; XXX not use ?
+ (defun canna-get-number-of-candidates (bunsetsu)
+- (let ((l (cannabunsetsu-get-zenkouho bunsetsu)))
++ (let ((l (canna-bunsetsu-get-zenkouho bunsetsu)))
+ (if l
+ (length l)
+ nil)))
+
+-(defun canna-decide-candidate (bunsetsu candidate-pos)
+- (let* ((candidate-list (cannabunsetsu-get-zenkouho bunsetsu))
+- (candidate (nth candidate-pos candidate-list)))
+- (cannabunsetsu-set-zenkouho candidate candidate-list)
+- (cannabunsetsu-set-zenkouho-pos candidate candidate-pos)
+- candidate))
++(defun canna-decide-candidate (bunsetsu pos prev-b next-b)
++ (let* ((head (car bunsetsu))
++ (candidate-list (canna-bunsetsu-get-zenkouho head))
++ (candidate (nth pos candidate-list)))
++ (canna-bunsetsu-set-zenkouho candidate candidate-list)
++ (canna-bunsetsu-set-zenkouho-pos candidate pos)
++ (canna-bunsetsu-set-zenkouho-converted
++ candidate (canna-bunsetsu-get-zenkouho-converted head))
++ (list (list candidate))))
+
++(defun canna-special-candidate (bunsetsu prev-b next-b major type)
++ (let* ((head (car bunsetsu))
++ (env (canna-bunsetsu-get-env head))
++ (backend (egg-bunsetsu-get-backend head))
++ (lang (get backend 'language))
++ source converted zenkouho-list kouho-list pos)
++ (when (and (eq lang (get backend 'source-language))
++ (eq lang (get backend 'converted-language)))
++ (cond ((eq lang 'Japanese)
++ (setq source (canna-get-bunsetsu-source head))
++ (cond ((eq type 'egg-hiragana)
++ (setq converted source))
++ ((eq type 'egg-katakana)
++ (setq converted (japanese-katakana source))))
++ (setq zenkouho-list
++ (cdr (canna-list-candidates bunsetsu prev-b next-b major)))
++ (setq pos
++ (when (setq kouho-list (member converted zenkouho-list))
++ (- (length zenkouho-list) (length kouho-list))))))
++ (when pos
++ (canna-decide-candidate bunsetsu pos prev-b next-b)))))
++
++;;; XXX not used ?
+ (defun canna-get-current-candidate-number (bunsetsu)
+- (cannabunsetsu-get-zenkouho-pos bunsetsu))
++ (canna-bunsetsu-get-zenkouho-pos bunsetsu))
+
++;;; XXX not used ?
+ (defun canna-get-all-candidates (bunsetsu)
+- (let* ((l (cannabunsetsu-get-zenkouho bunsetsu))
++ (let* ((l (canna-bunsetsu-get-zenkouho bunsetsu))
+ (result (cons nil nil))
+ (r result))
+ (catch 'break
+ (while t
+ (let ((candidate (car l)))
+- (setcar r (cannabunsetsu-get-converted candidate))
++ (setcar r (canna-bunsetsu-get-converted candidate))
+ (if (null (setq l (cdr l)))
+ (throw 'break nil)
+ (setq r (setcdr r (cons nil nil)))))))
+ result))
+
+-;;;;;;;;;;;;;;;;;;;;;;; MADAMADA zenzendame, just copy from SJ3
+-(defun canna-change-bunsetsu-length (b0 b1 b2 len)
+- (let ((yomi (concat
+- (cannabunsetsu-get-source b1)
+- (if b2 (cannabunsetsu-get-source b2))))
+- (env (cannabunsetsu-get-env b1))
+- yomi1 yomi2
+- bunsetsu1 bunsetsu2)
+- (setq yomi1 (substring yomi 0 len)
+- yomi2 (substring yomi len))
+- (setq bunsetsu1
+- (cannarpc-tanbunsetsu-conversion env yomi1))
+- ;; Only set once (memory original length of the bunsetsu).
+- (cannabunsetsu-set-kugiri-changed bunsetsu1
+- (or (cannabunsetsu-get-kugiri-changed b1)
+- (length (cannabunsetsu-get-source b1))))
+- (if (< 0 (length yomi2))
+- (setq bunsetsu2 (cannarpc-tanbunsetsu-conversion env yomi2))
+- (setq bunsetsu2 nil))
+- (if bunsetsu2
+- (list bunsetsu1 bunsetsu2)
+- (list bunsetsu1))))
++(defun canna-change-bunsetsu-length (bunsetsu prev-b next-b len major)
++ (let* ((env (canna-bunsetsu-get-env (car bunsetsu)))
++ (yomi (canna-get-bunsetsu-source (car bunsetsu)))
++ (yomi-length (cond ((< (length yomi) len) -1)
++ ((> (length yomi) len) -2)
++ (t nil)))
++ (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos (car bunsetsu)))
++ new)
++ (if yomi-length
++ (setq new (canna-set-converted-yomi
++ bunsetsu-pos
++ (cannarpc-set-kugiri-changed env yomi-length bunsetsu-pos)))
++ (setq new bunsetsu))
++ (list (list (car new)) prev-b (cdr new))))
+
+-;;;;;;;;;;;;;; MADAMADA
+-(defun canna-fini ()
+-)
++(defun canna-finalize-backend (&optional action)
++ (let* ((save-inhibit-quit inhibit-quit)
++ (inhibit-quit t)
++ (env-list canna-environments)
++ env proc-list saved)
++ (while env-list
++ (setq env (car env-list)
++ env-list (cdr env-list))
++ (condition-case err
++ (progn
++ (unless (memq (cannaenv-get-proc env) proc-list)
++ (setq proc-list (cons (cannaenv-get-proc env) proc-list)))
++ (unless (eq action 'disconnect-only)
++ (unless saved
++ (setq saved t)
++ (message (egg-get-message 'canna-dict-saving) "Canna"))
++ (let ((inhibit-quit save-inhibit-quit))
++ (canna-save-dictionaries env)))
++ (unless (eq action 'save-only)
++ (cannarpc-close-context env)))
++ ((error quit)
++ (message "signal %S occured when dictionary saving" err))))
++ (if saved
++ (message (egg-get-message 'canna-dict-saved) "Canna"))
++ (unless (eq action 'save-only)
++ (while proc-list
++ (if (and (car proc-list)
++ (eq (process-status (car proc-list)) 'open))
++ (cannarpc-close (car proc-list)))
++ (setq proc-list (cdr proc-list)))))
++ (setq canna-environments nil))
++
++;;; word registration
++
++(defun canna-list-writable-dictionaries-byname (env)
++ (let ((dic-list (cannaenv-get-dic-list env)))
++ (delq nil
++ (mapcar (lambda (dic)
++ (let ((dname (aref dic 0))
++ (drw (aref dic 1)))
++ (and drw dname)))
++ dic-list))))
++
++(defun canna-dictionary-select (env)
++ (let ((dic-list (canna-list-writable-dictionaries-byname env)))
++ (if (= 1 (length dic-list))
++ (car dic-list)
++ (menudiag-select (list 'menu
++ (egg-get-message 'canna-register-1)
++ dic-list)))))
++
++(defun canna-hinshi-MEISHI (kanji yomi)
++ (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T15" "#T35"))
++
++(defun canna-hinshi-SAHEN-MEISHI (kanji yomi)
++ (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T10" "#T30"))
++
++(defmacro canna-hinshi-DOUSHI-check-gobi ()
++ '(progn
++ (setq i 0)
++ (while (> 9 i)
++ (if (string-match (concat (substring gobi i (1+ i)) "$") kanji)
++ (progn
++ (setq renyou (substring re-gobi i (1+ i)))
++ (setq mizen (substring mi-gobi i (1+ i)))
++ (setq kanji-gobi (substring kanji (match-beginning 0)))
++ (setq kanji-gokan (substring kanji 0 (match-beginning 0)))
++ (setq ret (nth i hinshi))
++ (setq i 9)))
++ (setq i (1+ i)))
++ (setq i 0)
++ (while (> 9 i)
++ (if (string-match (concat (substring gobi i (1+ i)) "$") yomi)
++ (progn
++ (setq yomi-gobi (substring yomi (match-beginning 0)))
++ (setq yomi-gokan (substring yomi 0 (match-beginning 0)))
++ (setq i 9)))
++ (setq i (1+ i)))))
++
++(defun canna-hinshi-DOUSHI (kanji yomi)
++ (let ((gobi "$B$/$0$9$D$L$V$`$k$&(B")
++ (re-gobi "$B$-$.$7$A$K$S$_$j$$(B")
++ (mi-gobi "$B$+$,$5$?$J$P$^$i$o(B")
++ (hinshi (list "#K5" "#G5" "#S5" "#T5" "#N5" "#B5" "#M5" "#R5" "#W5"))
++ kanji-gokan yomi-gokan kanji-gobi yomi-gobi mizen renyou
++ i ret1 ret2 ret)
++ (canna-hinshi-DOUSHI-check-gobi)
++ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
++ (and kanji-gobi yomi-gobi (equal kanji-gobi yomi-gobi))))
++ (if (and kanji-gobi yomi-gobi)
++ (egg-error "$BFI$_$H8uJd$N3hMQ$,0c$$$^$9!#F~NO$7$J$*$7$F$/$@$5$$!#(B")
++ (egg-error "$BFI$_$H8uJd$r=*;_7A$GF~NO$7$F$/$@$5$$!#(B")))
++ (cond ((and (> (length kanji) 2) (> (length yomi) 2)
++ (string-match "$B$/$k(B$" kanji) (string-match "$B$/$k(B$" yomi))
++ (setq ret "#KX")
++ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
++ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2))))
++ ((and (> (length kanji) 3) (> (length yomi) 3)
++ (string-match "$B$s$:$k(B$" kanji) (string-match "$B$s$:$k(B$" yomi))
++ (setq ret "#NZX")
++ (setq kanji-gokan (substring kanji 0 (- (length kanji) 3)))
++ (setq yomi-gokan (substring yomi 0 (- (length yomi) 3))))
++ ((and (> (length kanji) 2) (> (length yomi) 2)
++ (string-match "$B$:$k(B$" kanji) (string-match "$B$:$k(B$" yomi))
++ (setq ret "#ZX")
++ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
++ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2))))
++ ((and (> (length kanji) 2) (> (length yomi) 2)
++ (string-match "$B$9$k(B$" kanji) (string-match "$B$9$k(B$" yomi))
++ (setq ret "#SX")
++ (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
++ (setq yomi-gokan (substring yomi 0 (- (length yomi) 2)))))
++ (if (not (string-match "5$" ret))
++ (if (y-or-n-p (concat "$B!X(B" kanji "$B!Y$r(B (" (canna-hinshi-name ret)
++ ") $B$H$7$FEPO?$7$^$9$+(B? "))
++ (setq ret (list kanji-gokan yomi-gokan ret))
++ (setq ret "#R5")
++ (setq kanji-gokan (substring kanji 0 (- (length kanji) 1)))
++ (setq yomi-gokan (substring yomi 0 (- (length yomi) 1)))))
++ (if (listp ret)
++ ret
++ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
++ (progn
++ (setq ret1 (y-or-n-p (concat "$B!V(B" kanji-gokan mizen
++ "$B$J$$!W$O@5$7$$$G$9$+!#(B")))
++ (setq i 0)
++ (if (eq "#R5" ret)
++ (while (> 9 i)
++ (if (string-match (concat (substring re-gobi i (1+ i)) "$")
++ kanji-gokan)
++ (progn (setq renyou nil)
++ (setq i 9)))
++ (setq i (1+ i))))
++ (setq ret2 (y-or-n-p (concat "$B!V(B" kanji-gokan renyou
++ "$B$,$$$$!W$O@5$7$$$G$9$+!#(B")))
++ (setq ret (if ret1 (if ret2 (concat ret "r") ret)
++ (if ret2 "#KSr" "#KS")))))
++ (list kanji-gokan yomi-gokan ret))))
++
++(defun canna-hinshi-KEIYOUSHI (kanji yomi)
++ (let (ret)
++ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
++ (string-match "$B$$(B$" yomi) (string-match "$B$$(B$" kanji)))
++ (egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $BAa$$(B"))
++ (setq kanji (substring kanji 0 (1- (length kanji))))
++ (setq yomi (substring yomi 0 (1- (length yomi))))
++ (setq ret
++ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
++ (if (y-or-n-p (concat "$B!V(B" kanji "$B!W$O@5$7$$$G$9$+!#(B"))
++ "#KYT" "#KY")
++ "#KY"))
++ (list kanji yomi ret)))
++
++(defun canna-hinshi-KEIYOUDOUSHI (kanji yomi)
++ (let (ret1 ret2 ret)
++ (if (not (and (> (length kanji) 1) (> (length yomi) 1)
++ (string-match "$B$@(B$" yomi) (string-match "$B$@(B$" kanji)))
++ (egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $B@E$+$@(B"))
++ (setq kanji (substring kanji 0 (1- (length kanji))))
++ (setq yomi (substring yomi 0 (1- (length yomi))))
++ (setq ret
++ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
++ (progn
++ (setq ret1 (y-or-n-p
++ (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
++ (setq ret2 (y-or-n-p
++ (concat "$B!V(B" kanji "$B$,$"$k!W$O@5$7$$$G$9$+!#(B")))
++ (if ret1 (if ret2 "#T10" "#T13") (if ret2 "#T15" "#T18")))
++ "#T05"))
++ (list kanji yomi ret)))
++
++(defun canna-hinshi-FUKUSHI (kanji yomi)
++ (let (ret1 ret2)
++ (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
++ (progn
++ (setq ret1 (y-or-n-p (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
++ (setq ret2 (y-or-n-p (concat "$B!V(B" kanji "$B$H!W$O@5$7$$$G$9$+!#(B")))
++ (if ret1 (if ret2 "#F04" "#F12") (if ret2 "#F06" "#F14")))
++ "#F14")))
++
++(defun canna-hinshi-select (kanji yomi)
++ (let ((key (menudiag-select (list 'menu
++ (egg-get-message 'canna-register-2)
++ canna-hinshi-menu))))
++ (cond ((symbolp key) (funcall
++ (intern (concat "canna-hinshi-" (symbol-name key)))
++ kanji yomi))
++ ((stringp key) (cdr (assoc key canna-hinshi-alist))))))
++
++(defun canna-word-registration (backend kanji yomi)
++ "Register a word KANJI with a pronunciation YOMI."
++ (if (or (null (eq (egg-get-language 0 kanji)
++ (canna-get-converted-language backend)))
++ (next-single-property-change 0 'egg-lang kanji)
++ (null (eq (egg-get-language 0 yomi)
++ (canna-get-source-language backend)))
++ (next-single-property-change 0 'egg-lang yomi))
++ (egg-error "word registration: invalid character")
++ (let* ((env (canna-get-environment backend))
++ (dic (canna-dictionary-select env))
++ (hinshi-id (canna-hinshi-select kanji yomi))
++ result)
++ (if (listp hinshi-id)
++ (progn (setq kanji (car hinshi-id))
++ (setq yomi (nth 1 hinshi-id))
++ (setq hinshi-id (nth 2 hinshi-id))))
++ (setq result (cannarpc-add-word env dic yomi kanji hinshi-id))
++ (if (>= result 0)
++ (progn
++ (cannarpc-save-dictionary env dic)
++ (list (canna-hinshi-name hinshi-id) dic))
++ (egg-error (cannarpc-get-error-message (- result)))))))
++
++;;; word delete registration
++
++(defun canna-word-delete-regist (backend yomi)
++ "Delete a word KANJI from dictionary."
++ (if (= (length yomi) 0)
++ (egg-error "Canna word delete registration: null string"))
++ (let* ((env (canna-get-environment backend))
++ (dic (canna-dictionary-select env))
++ proc context envd bunsetsu bunsetsu-pos z zpos kouho-list hinshi i
++ kanji lex result)
++ (setq proc (cannaenv-get-proc env))
++ (setq context (cannarpc-create-context proc))
++ (setq envd (cannaenv-create proc context
++ 'canna-backend-Japanese-tmp-delete-regist
++ 1 t))
++ (canna-set-dictionary envd (vector dic t))
++ (canna-set-dictionary envd (vector "fuzokugo" nil))
++ (setq bunsetsu (car (cannarpc-begin-conversion envd yomi)))
++ (setq bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
++ (setq z (cannarpc-get-bunsetsu-candidates envd bunsetsu-pos yomi))
++ (canna-bunsetsu-set-zenkouho bunsetsu z)
++ (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
++ (setq kouho-list
++ (canna-bunsetsu-set-zenkouho-converted
++ bunsetsu
++ (mapcar 'canna-bunsetsu-get-converted z)))
++ (setq yomi (car (last kouho-list)))
++ (setq kouho-list (cdr (reverse kouho-list)))
++ (setq kouho-list (reverse kouho-list))
++ (setq i 0)
++ (setq kouho-list (mapcar '(lambda (k)
++ (prog1
++ (cons k i)
++ (setq i (1+ i))))
++ kouho-list))
++ (let ((hiragana (assoc yomi kouho-list))
++ hinshi)
++ (if hiragana
++ (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos (cdr hiragana))))
++ (if (stringp hinshi)
++ (if (equal "#T35" hinshi)
++ (setq kouho-list (delete hiragana kouho-list)))
++ (setq kouho-list (delete hiragana kouho-list))))
++ (cond
++ ((null kouho-list)
++ (cannarpc-close-context envd)
++ (egg-error "$BEPO?$5$l$F$$$^$;$s!#(B"))
++ ((eq 1 (length kouho-list))
++ (setq zpos 0)
++ (setq kanji (car (car kouho-list))))
++ (t
++ (setq kanji (menudiag-select (list 'menu "$B:o=|(B:" kouho-list) nil nil t))
++ (setq zpos (cdr (car kanji)))
++ (setq kanji (car (car kanji)))))
++ (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos zpos))
++ (setq lex (cannarpc-get-lex envd bunsetsu-pos zpos))
++ (cannarpc-cancel-conversion envd)
++ (if (string-match "#[^#]+" hinshi)
++ (setq hinshi (substring hinshi 0 (match-end 0)))
++ (egg-error "$BIJ;l>pJs$,<hF@$G$-$^$;$s!#(B"))
++ (setq kanji (substring kanji 0 (nth 1 (car lex))))
++ (setq yomi (substring yomi 0 (car (car lex))))
++ (if (y-or-n-p (concat "$B!X(B" kanji "$B!Y(B(" yomi ": "
++ (canna-hinshi-name hinshi) ")$B$r(B "
++ dic " $B$+$i:o=|$7$^$9$+(B? "))
++ (setq result
++ (cannarpc-delete-word envd dic yomi kanji hinshi))
++ (setq result -1))
++ (if (>= result 0)
++ (progn
++ (cannarpc-save-dictionary envd dic)
++ (cannarpc-close-context envd)
++ (list kanji yomi (canna-hinshi-name hinshi) dic))
++ (cannarpc-close-context envd)
++ (egg-error "$B:o=|$5$l$^$;$s$G$7$?!#(B"))
++ ))
+
+ ;;; setup
+-(require 'egg)
++(load "egg/cannarpc")
++(run-hooks 'canna-load-hook)
+
+ ;;;###autoload
+ (defun egg-activate-canna (&rest arg)
+- "Activate CANNA backend of Tamagotchy."
+- (setq egg-conversion-backend canna-conversion-backend)
+- (if (not (fboundp 'cannarpc-open))
+- (load-library "egg/canna"))
+- (apply 'egg-mode arg))
++ "Activate CANNA backend of Tamago 4."
++ (apply 'egg-mode (append arg canna-backend-alist)))
+
+ ;;; egg/canna.el ends here.
+Index: egg/cannarpc.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/cannarpc.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- egg/cannarpc.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg/cannarpc.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -45,17 +45,31 @@
+ ((eq c 'GetDirectoryList) 7)
+ ((eq c 'MountDictionary) 8)
+ ((eq c 'UnmountDictionary) 9)
++ ((eq c 'GetMountDictionaryList) 11)
++ ((eq c 'DefineWord) 13)
++ ((eq c 'DeleteWord) 14)
+ ((eq c 'BeginConvert) 15)
+ ((eq c 'EndConvert) 16)
+ ((eq c 'GetCandidacyList) 17)
+ ((eq c 'GetYomi) 18)
+ ((eq c 'ResizePause) 26)
++ ((eq c 'GetHinshi) 27)
++ ((eq c 'GetLex) 28)
++ ((eq c 'SetApplicationName) 33)
++ ((eq c 'NoticeGroupName) 34)
+
+ ((eq c 'CreateDictionary) 3)
++ ((eq c 'Sync) 8)
+ (t (error "No such constant")))))
+
++;; XXX
++(defconst cannarpc-error-message (vector ))
++
+ (defun cannarpc-get-error-message (errno)
+- (or (aref cannarpc-error-message errno) (format "#%d" errno)))
++ (or (and (>= errno 0)
++ (< errno (length cannarpc-error-message))
++ (aref cannarpc-error-message errno))
++ (format "#%d" errno)))
+
+ (defmacro cannarpc-call-with-environment (e vlist send-expr &rest receive-exprs)
+ (let ((v (append
+@@ -73,54 +87,101 @@
+ (goto-char (prog1 (point) (accept-process-output proc))))
+ receive-exprs))))
+
+-(defconst canna-version-fmt "2.0:%s")
++(defconst canna-version-fmt "3.3:%s")
+
+ (defun cannarpc-open (proc username)
+ "Open the session. Return 0 on success, error code on failure."
+ (let ((verusr (format canna-version-fmt username)))
+- (comm-call-with-proc proc (result)
+- (comm-format (u u v) (canna-const Initialize) (length verusr) verusr)
+- (comm-unpack (u) result)
+- result)))
++ (comm-call-with-proc proc (minor context)
++ (comm-format (u u s) (canna-const Initialize) (+ (length verusr) 1)
++ verusr)
++ (comm-unpack (w w) minor context)
++ (cond ((and (= minor 65535) (= context 65535))
++ -1) ; failure
++ ((and (= minor 65535) (= context 65534))
++ -1) ; version miss match
++ (t context)))))
+
+ (defun cannarpc-close (proc)
+ (comm-call-with-proc proc (dummy result)
+ (comm-format (b b w) (canna-const Finalize) 0 0)
+- (comm-unpack (b b w b) dummy dummy dummy result)
+- result))
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1 ; failure
++ result)))
+
+ (defun cannarpc-create-context (proc)
+ (comm-call-with-proc proc (dummy result)
+ (comm-format (b b w) (canna-const CreateContext) 0 0)
+- (comm-unpack (b b w w) dummy dummy dummy result)
+- result))
++ (comm-unpack (u w) dummy result)
++ (if (= result 65535)
++ -1 ; failure
++ result)))
+
+-(defun cannarpc-close-context (proc context)
+- (comm-call-with-proc proc (dummy result)
++(defun cannarpc-close-context (env)
++ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w) (canna-const CloseContext) 0 2 context)
+- (comm-unpack (b b w b) dummy dummy dummy result)
+- result))
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1 ; failure
++ result)))
+
+-;; XXX: Not implemented fully
+ (defun cannarpc-get-dictionary-list (env)
+- (cannarpc-call-with-environment env (dymmy result)
++ (let ((i 0)
++ dic dl dic-list)
++ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w w) (canna-const GetDictionaryList) 0 4
+ context 1024)
+ (comm-unpack (u w) dummy result)
+ ;; follow list of dictionaries
+- result))
++ (if (= result 65535)
++ -1 ; failure
++ (while (< i result)
++ (comm-unpack (s) dic)
++ (if dl
++ (setq dl (setcdr dl (cons dic nil)))
++ (setq dic-list (setq dl (cons dic nil))))
++ (setq i (1+ i)))
++ dic-list))))
+
+-;; XXX: Not implemented fully
+ (defun cannarpc-get-directory-list (env)
+- (cannarpc-call-with-environment env (dymmy result)
++ (let ((i 0)
++ dir dl dir-list)
++ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w w) (canna-const GetDirectoryList) 0 4
+ context 1024)
+ (comm-unpack (u w) dummy result)
+ ;; follow list of directories
+- result))
++ (if (= result 65535)
++ -1 ; failure
++ (while (< i result)
++ (comm-unpack (s) dir)
++ (if dl
++ (setq dl (setcdr dl (cons dir nil)))
++ (setq dir-list (setq dl (cons dir nil))))
++ (setq i (1+ i)))
++ dir-list))))
++
++(defun cannarpc-get-mount-dictionary-list (env)
++ (let ((i 0)
++ dic dl dic-list)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w w) (canna-const GetMountDictionaryList) 0 4
++ context 1024)
++ (comm-unpack (u w) dummy result)
++ ;; follow list of dictionaries
++ (if (= result 65535)
++ -1 ; failure
++ (while (< i result)
++ (comm-unpack (s) dic)
++ (if dl
++ (setq dl (setcdr dl (cons dic nil)))
++ (setq dic-list (setq dl (cons dic nil))))
++ (setq i (1+ i)))
++ dic-list))))
+
+ (defun cannarpc-open-dictionary (env dict-file-name mode)
+- (cannarpc-call-with-environment env (dymmy result)
++ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w u w s) (canna-const MountDictionary) 0
+ (+ (length dict-file-name) 7)
+ mode context dict-file-name)
+@@ -128,27 +189,28 @@
+ result))
+
+ (defun cannarpc-close-dictionary (env dict-file-name mode)
+- (cannarpc-call-with-environment env (dymmy result)
++ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w u w s) (canna-const UnmountDictionary) 0
+- (+ (length dict-file-name) 6)
++ (+ (length dict-file-name) 7)
+ mode context dict-file-name)
+ (comm-unpack (u b) dummy result)
+ result))
+
+ (defun cannarpc-begin-conversion (env yomi)
+ "Begin conversion."
+- (let ((yomi-ext (encode-coding-string yomi 'euc-japan))
++ (let ((yomi-ext (encode-coding-string yomi 'fixed-euc-jp))
++ (mode (or (cannaenv-get-mode env) 19)) ; 19 kana hiragana
+ (i 0)
+ converted bunsetsu-list bl)
+ (cannarpc-call-with-environment env (dummy result)
+- (comm-format (b b w u w S) (canna-const BeginConvert) 0
+- (+ (length yomi-ext) 8) 0 context yomi)
++ (comm-format (b b w i w S) (canna-const BeginConvert) 0
++ (+ (length yomi-ext) 8) mode context yomi)
+ (comm-unpack (u w) dummy result)
+ (if (= result 65535)
+ -1 ; failure
+ (while (< i result)
+ (comm-unpack (S) converted)
+- (let ((bl1 (cons (canna-make-bunsetsu env converted i)
++ (let ((bl1 (cons (canna-make-bunsetsu env converted i nil)
+ nil)))
+ (if bl
+ (setq bl (setcdr bl bl1))
+@@ -156,11 +218,21 @@
+ (setq i (1+ i)))
+ bunsetsu-list))))
+
++(defun cannarpc-cancel-conversion (env)
++ "Cancel conversion."
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w w u) (canna-const EndConvert) 0 8 context 0 0)
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1 ; failure
++ result)))
++
+ (defun cannarpc-end-conversion (env len zenkouho-pos-vector mode)
+ "End conversion."
+ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w w u v) (canna-const EndConvert) 0
+- (+ (* len 2) 8) context len mode zenkouho-pos-vector)
++ (+ (* len 2) 8) context len mode zenkouho-pos-vector
++ (length zenkouho-pos-vector))
+ (comm-unpack (u b) dummy result)
+ (if (= result 255)
+ -1 ; failure
+@@ -173,6 +245,24 @@
+ (comm-unpack (u b) dummy result)
+ result))
+
++(defun cannarpc-save-dictionary (env dict-name)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w u w s) (canna-const Sync) 1
++ (+ (length dict-name) 7) 0 context dict-name)
++ (comm-unpack (u b) dummy result)
++ result))
++
++;;; XXX not used
++(defun cannarpc-get-dictionary-data (env dir dic)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w s s w) 6 1
++ (+ (length dir) (length dic) 6) context dir dic 4096)
++ (comm-unpack (u w) dummy result)
++ (if (= result 65535)
++ -1
++;; (comm-unpack (S) result)
++ result)))
++
+ (defun cannarpc-get-bunsetsu-source (env bunsetsu-pos)
+ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w w w) (canna-const GetYomi) 0 6 context
+@@ -183,23 +273,123 @@
+ (comm-unpack (S) result)
+ result)))
+
+-(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos)
++(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos yomi)
+ (let ((i 0)
+ converted bunsetsu-list bl)
+ (cannarpc-call-with-environment env (dummy result)
+ (comm-format (b b w w w w) (canna-const GetCandidacyList) 0 6 context
+ bunsetsu-pos 1024)
+- (comm-unpack (u w) dymmy result)
++ (comm-unpack (u w) dummy result)
+ (if (= result 65535)
+ -1 ; failure
+ (while (< i result)
+ (comm-unpack (S) converted)
+- (let ((bl1 (cons (canna-make-bunsetsu env converted bunsetsu-pos)
++ (let ((bl1 (cons (canna-make-bunsetsu env converted
++ bunsetsu-pos yomi)
+ nil)))
+ (if bl
+ (setq bl (setcdr bl bl1))
+ (setq bunsetsu-list (setq bl bl1))))
+ (setq i (1+ i)))
+ bunsetsu-list))))
++
++(defun cannarpc-set-kugiri-changed (env yomi-length bunsetsu-pos)
++ ;; yomi-length -2$B!DJ8@a=L$a(B -1$B!DJ8@a?-$P$7(B
++ (let* ((i bunsetsu-pos)
++ converted bunsetsu-list bl)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w w w) (canna-const ResizePause) 0 6 context
++ bunsetsu-pos yomi-length)
++ (comm-unpack (u w) dummy result)
++ (if (= result 65535)
++ -1 ; failure
++ (while (< i result)
++ (comm-unpack (S) converted)
++ (let ((bl1 (cons (canna-make-bunsetsu env converted i nil) nil)))
++ (if bl
++ (setq bl (setcdr bl bl1))
++ (setq bunsetsu-list (setq bl bl1))))
++ (setq i (1+ i)))
++ bunsetsu-list))))
++
++(defun cannarpc-get-hinshi (env bunsetsu-pos kouho-pos)
++ (let (b hinshi)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w w w w) (canna-const GetHinshi) 0 8 context
++ bunsetsu-pos kouho-pos 1024)
++ (comm-unpack (u w) dummy result)
++ (if (= result 65535)
++ -1
++ (while (> result 0)
++ (comm-unpack (w) b)
++ (setq hinshi (concat hinshi (char-to-string b)))
++ (setq result (1- result)))
++ hinshi))))
++
++(defun cannarpc-get-lex (env bunsetsu-pos kouho-pos)
++ (let ((i 0)
++ ylen klen rownum coldnum dicnum lex-list ll)
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w w w w) (canna-const GetLex) 0 8 context
++ bunsetsu-pos kouho-pos 1024)
++ (comm-unpack (u w) dummy result)
++ (if (= result 65535)
++ -1
++ (while (< i result)
++ (comm-unpack (i i i i i) ylen klen rownum coldnum dicnum)
++ (let ((ll1 (cons (list ylen klen rownum coldnum dicnum) nil)))
++ (if ll
++ (setq ll (setcdr ll ll1))
++ (setq lex-list (setq ll ll1))))
++ (setq i (1+ i)))
++ lex-list))))
++
++(defun cannarpc-add-word (env dictionary yomi kanji hinshi)
++ "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
++a part of speech HINSHI. Where DICTIONARY should be an integer."
++ (let* ((word-info (concat yomi " " hinshi " " kanji))
++ (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
++ (length (+ (length word-info-ext) (length dictionary) 5)))
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w S s) (canna-const DefineWord) 0 length context
++ word-info dictionary)
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1 ; failure
++ result))))
++
++(defun cannarpc-delete-word (env dictionary yomi kanji hinshi)
++ "Delete the registered word KANJI from DICTIONARY with a
++pronunciation YOMI and a part of speech HINSHI. Where DICTIONARY
++should be an integer."
++ (let* ((word-info (concat yomi " " hinshi " " kanji))
++ (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
++ (length (+ (length word-info-ext) (length dictionary) 5)))
++ (cannarpc-call-with-environment env (dummy result)
++ (comm-format (b b w w S s) (canna-const DeleteWord) 0 length context
++ word-info dictionary)
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1 ; failure
++ result))))
++
++(defun cannarpc-notice-group-name (proc context group)
++ (comm-call-with-proc proc (dummy result)
++ (comm-format (b b w u w s) (canna-const NoticeGroupName) 0
++ (+ (length group) 7) 0 ;; mode = 0
++ context group)
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1
++ result)))
++
++(defun cannarpc-set-app-name (proc context name)
++ (comm-call-with-proc proc (dummy result)
++ (comm-format (b b w u w s) (canna-const SetApplicationName) 0
++ (+ (length name) 7) 0 context name)
++ (comm-unpack (u b) dummy result)
++ (if (= result 255)
++ -1
++ result)))
+
+ ;;; egg/cannarpc.el ends here.
+Index: egg/sj3.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/sj3.el,v
+retrieving revision 1.1.1.3
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.3 -r1.3
+--- egg/sj3.el 27 Jan 2001 18:46:48 -0000 1.1.1.3
++++ egg/sj3.el 22 Jul 2002 13:18:56 -0000 1.3
+@@ -35,33 +35,89 @@
+ (require 'egg-edep)
+
+ (defgroup sj3 nil
+- "SJ3 interface for Tamago 4"
++ "SJ3 interface for Tamago 4."
+ :group 'egg)
+
+-(defcustom sj3-hostname "localhost"
+- "*Hostname of SJ3 server"
++(defcustom sj3-hostname "localhost"
++ "Hostname of SJ3 server"
+ :group 'sj3 :type 'string)
+
+-(defcustom sj3-server-port 3086
+- "*Port number of SJ3 server"
++(defcustom sj3-server-port 3086
++ "Port number of SJ3 server"
+ :group 'sj3 :type 'integer)
+
+-(defcustom sj3-server-version 2
+- "Major version number of SJ3 server."
+- :group 'sj3
+- :type '(choice (const 1) (const 2)))
+-
+-(defcustom sj3-server-coding-system-list '(shift_jis euc-japan)
+- "List of coding systems for SJ3 server v1 and v2."
+- :group 'sj3
+- :type '(list (symbol :tag "v1") (symbol :tag "v2")))
+-
+
+ (eval-when-compile
+ (defmacro SJ3-const (c)
+ (cond ((eq c 'FileNotExist) 35)
+ )))
+
++(egg-add-message
++ '((Japanese
++ (sj3-register-1 "$BEPO?<-=qL>(B:")
++ (sj3-register-2 "$BIJ;lL>(B"))))
++
++(defvar sj3-hinshi-menu
++ '(("$BL>;l(B" .
++ (menu "$BIJ;l(B:$BL>;l(B:"
++ (("$BL>;l(B" . 1)
++ ("$BL>;l(B($B$*!D(B)" . 2)
++ ("$BL>;l(B($B$4!D(B)" . 3)
++ ("$BL>;l(B($B!DE*(B/$B2=(B)" . 4)
++ ("$BL>;l(B($B$*!D$9$k(B)" . 5)
++ ("$BL>;l(B($B!D$9$k(B)" . 6)
++ ("$BL>;l(B($B$4!D$9$k(B)" . 7)
++ ("$BL>;l(B($B!D$J(B/$B$K(B)" . 8)
++ ("$BL>;l(B($B$*!D$J(B/$B$K(B)" . 9)
++ ("$BL>;l(B($B$4!D$J(B/$B$K(B)" . 10)
++ ("$BL>;l(B($BI{;l(B)" . 11))))
++ ("$BBeL>;l(B" . 12)
++ ("$BID;z(B" . 21)
++ ("$BL>A0(B" . 22)
++ ("$BCOL>(B" . 24)
++ ("$B8)(B/$B6hL>(B" . 25)
++ ("$BF0;l(B" .
++ (menu "$BIJ;l(B:$BF0;l(B:"
++ (("$B%5JQ8l44(B" . 80)
++ ("$B%6JQ8l44(B" . 81)
++ ("$B0lCJITJQ2=It(B" . 90)
++ ("$B%+9T8^CJ8l44(B" . 91)
++ ("$B%,9T8^CJ8l44(B" . 92)
++ ("$B%59T8^CJ8l44(B" . 93)
++ ("$B%?9T8^CJ8l44(B" . 94)
++ ("$B%J9T8^CJ8l44(B" . 95)
++ ("$B%P9T8^CJ8l44(B" . 96)
++ ("$B%^9T8^CJ8l44(B" . 97)
++ ("$B%i9T8^CJ8l44(B" . 98)
++ ("$B%o9T8^CJ8l44(B" . 99))))
++ ("$BO"BN;l(B" . 26)
++ ("$B@\B3;l(B" . 27)
++ ("$B=u?t;l(B" . 29)
++ ("$B?t;l(B" . 30)
++ ("$B@\F,8l(B" . 31)
++ ("$B@\Hx8l(B" . 36)
++ ("$BI{;l(B" . 45)
++ ("$BI{;l(B2" . 46)
++ ("$B7AMF;l8l44(B" . 60)
++ ("$B7AMFF0;l8l44(B" . 71)
++ ("$BC14A;z(B" . 189))
++ "Menu data for a hinshi (a part of speech) selection.")
++
++(defun sj3-hinshi-name (id &optional menu alist)
++ "Return a hinshi (a part of speech) name corresponding to ID.
++If ID is nil, return a flattened alist from `sj3-hinshi-menu'.
++Don't specify the optional arguments in normal use."
++ (let ((menu (or menu sj3-hinshi-menu)))
++ (if (consp menu)
++ (if (consp (cdr menu))
++ (mapcar (lambda (elem)
++ (setq alist (sj3-hinshi-name nil elem alist)))
++ menu)
++ (setq alist (nconc alist (list (cons (cdr menu) (car menu)))))))
++ (if id
++ (cdr (assq id alist))
++ alist)))
++
+ (setplist 'sj3-conversion-backend
+ '(egg-start-conversion sj3-start-conversion
+ egg-get-bunsetsu-source sj3-get-bunsetsu-source
+@@ -71,7 +127,8 @@
+ egg-list-candidates sj3-list-candidates
+ egg-decide-candidate sj3-decide-candidate
+ egg-change-bunsetsu-length sj3-change-bunsetsu-length
+- egg-end-conversion sj3-end-conversion))
++ egg-end-conversion sj3-end-conversion
++ egg-word-registration sj3-word-registration))
+
+ (defconst sj3-backend-alist '((Japanese ((sj3-conversion-backend)))))
+
+@@ -90,7 +147,7 @@
+ ((error quit)
+ (egg-error "failed to connect sj3 server")))
+ (process-kill-without-query proc)
+- (set-process-coding-system proc 'no-conversion 'no-conversion)
++ (set-process-coding-system proc 'binary 'binary)
+ (set-marker-insertion-type (process-mark proc) t)
+ (save-excursion
+ (set-buffer buf)
+@@ -141,7 +198,7 @@
+ ;; (if proc
+ ;; (progn
+ ;; (process-kill-without-query proc)
+-;; (set-process-coding-system proc 'no-conversion 'no-conversion)
++;; (set-process-coding-system proc 'binary 'binary)
+ ;; (set-marker-insertion-type (process-mark proc) t)
+ ;; ;; Initialize dictionaries
+ ;; (setq sj3-sys-dict-list nil)
+@@ -353,7 +410,7 @@ Return the list of bunsetsu."
+ (list (list candidate))))
+
+ (defun sj3-change-bunsetsu-length (bunsetsu prev-b next-b len major)
+- (let ((yomi (apply 'concat (mapcar 'sj3bunsetsu-get-source bunsetsu)))
++ (let ((yomi (mapconcat 'sj3bunsetsu-get-source bunsetsu nil))
+ (env (sj3bunsetsu-get-env (car bunsetsu)))
+ (old (car bunsetsu))
+ new yomi1 yomi2)
+@@ -361,7 +418,7 @@ Return the list of bunsetsu."
+ yomi2 (substring yomi len))
+ (setq new (sj3rpc-tanbunsetsu-conversion env yomi1))
+ ;; Only set once (memory original length of the bunsetsu).
+- (sj3bunsetsu-set-kugiri-changed new
++ (sj3bunsetsu-set-kugiri-changed new
+ (or (sj3bunsetsu-get-kugiri-changed old)
+ (length (sj3bunsetsu-get-source old))))
+ (if (> (length yomi2) 0)
+@@ -381,6 +438,37 @@ Return the list of bunsetsu."
+ (sj3rpc-close proc)
+ (setq sj3-environment nil))))
+
++;;; word registration
++
++(defun sj3-dictionary-select ()
++ (menudiag-select (list 'menu
++ (egg-get-message 'sj3-register-1)
++ (aref (nth 2 sj3-dictionary-specification) 0))))
++
++(defun sj3-hinshi-select ()
++ (menudiag-select (list 'menu
++ (egg-get-message 'sj3-register-2)
++ sj3-hinshi-menu)))
++
++(defun sj3-word-registration (backend kanji yomi)
++ "Register a word KANJI with a pronunciation YOMI."
++ (if (or (null (eq (egg-get-language 0 kanji)
++ (sj3-get-converted-language backend)))
++ (next-single-property-change 0 'egg-lang kanji)
++ (null (eq (egg-get-language 0 yomi)
++ (sj3-get-source-language backend)))
++ (next-single-property-change 0 'egg-lang yomi))
++ (egg-error "word registration: invalid character")
++ (let* ((env (sj3-get-environment))
++ (dic (sj3-dictionary-select))
++ (hinshi-id (sj3-hinshi-select))
++ (result (sj3rpc-add-word env
++ (car (aref env 1))
++ yomi kanji hinshi-id)))
++ (if (>= result 0)
++ (list (sj3-hinshi-name hinshi-id) dic)
++ (egg-error (sj3rpc-get-error-message (- result)))))))
++
+ ;;; setup
+
+ (load "egg/sj3rpc")
+@@ -388,7 +476,7 @@ Return the list of bunsetsu."
+
+ ;;;###autoload
+ (defun egg-activate-sj3 (&rest arg)
+- "Activate SJ3 backend of Tamagotchy."
++ "Activate SJ3 backend of Tamago 4."
+ (apply 'egg-mode (append arg sj3-backend-alist)))
+
+ ;;; egg/sj3.el ends here.
+Index: egg/sj3rpc.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/sj3rpc.el,v
+retrieving revision 1.1.1.2
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.2 -r1.2
+--- egg/sj3rpc.el 27 Jan 2001 18:46:48 -0000 1.1.1.2
++++ egg/sj3rpc.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -31,9 +31,18 @@
+
+ ;;; Code:
+
++(defvar sj3-server-version 2
++ "*Major version number of SJ3 server.")
++
++(defvar sj3-server-coding-system 'shift_jis
++ "*Coding system used when decoding and encoding of I/O operation with
++SJ3 server. Valid coding systems are depend on the server spec.")
++
+ (eval-when-compile
+ (require 'egg-com)
+-;; (load-library "egg/sj3")
++ (defmacro sj3-sjis-p ()
++ '(eq 'coding-category-sjis (coding-system-category
++ sj3-server-coding-system)))
+ (defmacro sj3-const (c)
+ (cond ((eq c 'OPEN) 1)
+ ((eq c 'CLOSE) 2)
+@@ -44,20 +53,20 @@
+ ((eq c 'STDYSIZE) 23)
+ ((eq c 'LOCK) 31)
+ ((eq c 'UNLOCK) 32)
+- ((eq c 'BEGIN) '(if (eq 1 sj3-server-version) 41 111))
+- ((eq c 'TANCONV) '(if (eq 1 sj3-server-version) 51 112))
+- ((eq c 'KOUHO) '(if (eq 1 sj3-server-version) 54 115))
+- ((eq c 'KOUHOSU) '(if (eq 1 sj3-server-version) 55 116))
++ ((eq c 'BEGIN) '(if (sj3-sjis-p) 41 111))
++ ((eq c 'TANCONV) '(if (sj3-sjis-p) 51 112))
++ ((eq c 'KOUHO) '(if (sj3-sjis-p) 54 115))
++ ((eq c 'KOUHOSU) '(if (sj3-sjis-p) 55 116))
+ ((eq c 'STDY) 61)
+- ((eq c 'CLSTDY) '(if (eq 1 sj3-server-version) 62 117))
+- ((eq c 'WREG) '(if (eq 1 sj3-server-version) 71 118))
+- ((eq c 'WDEL) '(if (eq 1 sj3-server-version) 72 119))
++ ((eq c 'CLSTDY) '(if (sj3-sjis-p) 62 117))
++ ((eq c 'WREG) '(if (sj3-sjis-p) 71 118))
++ ((eq c 'WDEL) '(if (sj3-sjis-p) 72 119))
+ ((eq c 'MKDIC) 81)
+ ((eq c 'MKSTDY) 82)
+ ((eq c 'MKDIR) 83)
+ ((eq c 'ACCESS) 84)
+- ((eq c 'WSCH) '(if (eq 1 sj3-server-version) 91 120))
+- ((eq c 'WNSCH) '(if (eq 1 sj3-server-version) 92 121))
++ ((eq c 'WSCH) '(if (sj3-sjis-p) 91 120))
++ ((eq c 'WNSCH) '(if (sj3-sjis-p) 92 121))
+ ((eq c 'VERSION) 103)
+ (t (error "No such constant")))))
+
+@@ -85,15 +94,12 @@
+ (goto-char (prog1 (point) (accept-process-output proc))))
+ receive-exprs))))
+
+-(defmacro sj3rpc-server-coding-system ()
+- '(nth (1- sj3-server-version) sj3-server-coding-system-list))
+-
+-(defmacro sj3rpc-unpack-mb-string (coding-system)
+- `(let ((start (point)))
++(defmacro sj3rpc-unpack-mb-string ()
++ '(let ((start (point)))
+ (while (not (search-forward "\0" nil t))
+ (comm-accept-process-output))
+ (decode-coding-string (buffer-substring start (1- (point)))
+- ,coding-system)))
++ sj3-server-coding-system)))
+
+ (defun sj3rpc-open (proc myhostname username)
+ "Open the session. Return 0 on success, error code on failure."
+@@ -102,7 +108,7 @@
+ myhostname username
+ ;; program name
+ (format "%d.emacs-egg" (emacs-pid)))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ (if (= result -2)
+ 0
+ result)))
+@@ -110,7 +116,7 @@
+ (defun sj3rpc-close (proc)
+ (comm-call-with-proc proc (result)
+ (comm-format (u) (sj3-const CLOSE))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-get-stdy-size (proc)
+@@ -134,10 +140,9 @@
+
+ (defun sj3rpc-begin (env yomi)
+ "Begin conversion."
+- (let* ((codesys (sj3rpc-server-coding-system))
+- (yomi-ext (encode-coding-string yomi codesys))
+- (p 0)
+- len source converted stdy bunsetsu-list bl)
++ (let ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
++ (p 0)
++ len source converted stdy bunsetsu-list bl)
+ (sj3rpc-call-with-environment env (result)
+ (comm-format (u s) (sj3-const BEGIN) yomi-ext)
+ (comm-unpack (u) result)
+@@ -148,9 +153,9 @@
+ (comm-unpack (b) len)
+ (> len 0))
+ (setq stdy (sj3rpc-get-stdy proc))
+- (setq converted (sj3rpc-unpack-mb-string codesys))
++ (setq converted (sj3rpc-unpack-mb-string))
+ (setq source (decode-coding-string (substring yomi-ext p (+ p len))
+- codesys)
++ sj3-server-coding-system)
+ p (+ p len))
+ (let ((bl1 (cons (sj3-make-bunsetsu env
+ source converted nil stdy) nil)))
+@@ -171,7 +176,7 @@
+ (defun sj3rpc-close-dictionary (proc dict-no)
+ (comm-call-with-proc proc (result)
+ (comm-format (u u) (sj3-const DICDEL) dict-no)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-make-dictionary (proc dict-name)
+@@ -181,19 +186,19 @@
+ 2048 ; Length
+ 256 ; Number
+ )
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-open-stdy (proc stdy-name)
+ (comm-call-with-proc proc (result)
+ (comm-format (u s s) (sj3-const OPENSTDY) stdy-name "")
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-close-stdy (proc)
+ (comm-call-with-proc proc (result)
+ (comm-format (u) (sj3-const CLOSESTDY))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-make-stdy (proc stdy-name)
+@@ -203,18 +208,17 @@
+ 1 ; Step
+ 2048 ; Length
+ )
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-make-directory (proc name)
+ (comm-call-with-proc proc (result)
+ (comm-format (u s) (sj3-const MKDIR) name)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun sj3rpc-get-bunsetsu-candidates-sub (proc env yomi yomi-ext len n)
+- (let ((codesys (sj3rpc-server-coding-system))
+- (i 0)
++ (let ((i 0)
+ stdy converted bunsetsu bl bunsetsu-list cylen rest)
+ (comm-call-with-proc-1 proc (result)
+ (comm-format (u u s) (sj3-const KOUHO) len yomi-ext)
+@@ -224,9 +228,9 @@
+ (while (< i n)
+ (comm-unpack (u) cylen)
+ (setq stdy (sj3rpc-get-stdy proc))
+- (setq converted (sj3rpc-unpack-mb-string codesys))
++ (setq converted (sj3rpc-unpack-mb-string))
+ (setq rest (decode-coding-string (substring yomi-ext cylen)
+- codesys))
++ sj3-server-coding-system))
+ (setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))
+ (if bl
+ (setq bl (setcdr bl (cons bunsetsu nil)))
+@@ -240,7 +244,7 @@
+ bunsetsu-list))))
+
+ (defun sj3rpc-get-bunsetsu-candidates (env yomi)
+- (let* ((yomi-ext (encode-coding-string yomi (sj3rpc-server-coding-system)))
++ (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
+ (len (length yomi-ext)))
+ (sj3rpc-call-with-environment env (result)
+ (comm-format (u u s) (sj3-const KOUHOSU) len yomi-ext)
+@@ -254,9 +258,8 @@
+ yomi yomi-ext len result))))))
+
+ (defun sj3rpc-tanbunsetsu-conversion (env yomi)
+- (let* ((codesys (sj3rpc-server-coding-system))
+- (yomi-ext (encode-coding-string yomi codesys))
+- (len (length yomi-ext)) cylen stdy converted rest)
++ (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
++ (len (length yomi-ext)) cylen stdy converted rest)
+ (sj3rpc-call-with-environment env (result)
+ (comm-format (u u s) (sj3-const TANCONV) len yomi-ext)
+ (comm-unpack (u) result)
+@@ -264,28 +267,35 @@
+ (- result)
+ (comm-unpack (u) cylen)
+ (setq stdy (sj3rpc-get-stdy proc))
+- (setq converted (sj3rpc-unpack-mb-string codesys))
+- (setq rest (decode-coding-string (substring yomi-ext cylen) codesys))
++ (setq converted (sj3rpc-unpack-mb-string))
++ (setq rest (decode-coding-string (substring yomi-ext cylen)
++ sj3-server-coding-system))
+ (setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))))))
+
+ (defun sj3rpc-bunsetsu-stdy (env stdy)
+ (sj3rpc-call-with-environment env (result)
+ (comm-format (u v) (sj3-const STDY) stdy (length stdy))
+ (comm-unpack (u) result)
+- (if (/= result 0)
+- (- result)
+- 0)))
++ (- result)))
+
+ (defun sj3rpc-kugiri-stdy (env yomi1 yomi2 stdy)
+- (let* ((codesys (sj3rpc-server-coding-system))
+- (yomi1-ext (encode-coding-string yomi1 codesys))
+- (yomi2-ext (encode-coding-string yomi2 codesys)))
+- (sj3rpc-call-with-environment env (result)
+- (comm-format (u s s v) (sj3-const CLSTDY)
+- yomi1-ext yomi2-ext stdy (length stdy))
+- (comm-unpack (u) result)
+- (if (/= result 0)
+- (- result)
+- 0))))
++ (sj3rpc-call-with-environment env (result)
++ (comm-format (u s s v) (sj3-const CLSTDY)
++ (encode-coding-string yomi1 sj3-server-coding-system)
++ (encode-coding-string yomi2 sj3-server-coding-system)
++ stdy (length stdy))
++ (comm-unpack (u) result)
++ (- result)))
++
++(defun sj3rpc-add-word (env dictionary yomi kanji hinshi)
++ "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
++a part of speech HINSHI. Where DICTIONARY should be an integer."
++ (sj3rpc-call-with-environment env ()
++ (comm-format (u u s s u) (sj3-const WREG) dictionary
++ (encode-coding-string yomi sj3-server-coding-system)
++ (encode-coding-string kanji sj3-server-coding-system)
++ hinshi)
++ (comm-unpack (u) result)
++ (- result)))
+
+ ;;; egg/sj3rpc.el ends here.
+Index: egg/wnn.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/wnn.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.4
+diff -d -u -p -r1.1.1.1 -r1.4
+--- egg/wnn.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg/wnn.el 22 Jul 2002 13:18:56 -0000 1.4
+@@ -36,7 +36,7 @@
+ (require 'egg-edep)
+
+ (defgroup wnn nil
+- "Wnn interface for Tamagotchy"
++ "Wnn interface for Tamago 4."
+ :group 'egg)
+
+ (defcustom wnn-auto-save-dictionaries 0
+@@ -114,6 +114,7 @@ by ':' and digit N."
+ egg-major-bunsetsu-continue-p wnn-major-bunsetsu-continue-p
+ egg-list-candidates wnn-list-candidates
+ egg-decide-candidate wnn-decide-candidate
++ egg-special-candidate wnn-special-candidate
+ egg-change-bunsetsu-length wnn-change-bunsetsu-length
+ egg-bunsetsu-combinable-p wnn-bunsetsu-combinable-p
+ egg-end-conversion wnn-end-conversion
+@@ -389,13 +390,12 @@ by ':' and digit N."
+
+ ;; <wnn-bunsetsu> ::= [ <env>
+ ;; <jirilen> <dic-no> <entry> <freq> <right-now> <hinshi>
+-;; <status> <status-backward> <kangovect> <evaluation>
+-;; <converted> <yomi> <fuzokugo>
+-;; <dai-evaluation> <dai-continue> <change-top>
+-;; <zenkouho-info> <freq-down> <fi-rel> <context> ]
++;; <status> <status-backward> <kangovect> <evaluation>
++;; <converted> <yomi> <fuzokugo>
++;; <dai-evaluation> <dai-continue> <change-top>
++;; <zenkouho-info> <freq-down> <fi-rel> <context> ]
+ ;;
+ ;; <zenkouho-info> ::= [ <pos> <list> <converted> <dai> <prev-b> <nxet-b> ]
+-;;
+
+ (defsubst wnn-bunsetsu-create (env jirilen dic-no entry freq right-now hinshi
+ status status-backward kangovect evaluation)
+@@ -556,7 +556,7 @@ by ':' and digit N."
+ (copy-sequence (egg-bunsetsu-get-info b))))
+ bunsetsu))
+
+-(defconst wnn-server-info-list
++(defvar wnn-server-info-list
+ ;; language server port hostname proc coding-system
+ '((Japanese jserver wnn-jport wnn-jserver "Wnn" (fixed-euc-jp fixed-euc-jp))
+ (Chinese-GB cserver wnn-cport wnn-cserver "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn))
+@@ -657,20 +657,28 @@ Return the list of bunsetsu."
+ (defun wnn-major-bunsetsu-continue-p (bunsetsu)
+ (wnn-bunsetsu-get-dai-continue bunsetsu))
+
++(defmacro wnn-uniq-hash-string (uniq-level)
++ `(mapconcat
++ (lambda (b)
++ (concat ,@(cond ((eq uniq-level 'wnn-uniq)
++ '((number-to-string (wnn-bunsetsu-get-hinshi b))))
++ ((eq uniq-level 'wnn-uniq-entry)
++ '((number-to-string (wnn-bunsetsu-get-dic-no b))
++ "+"
++ (number-to-string (wnn-bunsetsu-get-entry b)))))
++ "\0"
++ (wnn-bunsetsu-get-converted b)
++ "\0"
++ (wnn-bunsetsu-get-fuzokugo b)))
++ bunsetsu "\0"))
++
+ (defun wnn-uniq-hash (bunsetsu hash-table)
+- (intern (mapconcat (lambda (b)
+- (concat (cond
+- ((eq wnn-uniq-level 'wnn-uniq)
+- (wnn-bunsetsu-get-hinshi b))
+- ((eq wnn-uniq-level 'wnn-uniq-entry)
+- (concat (wnn-bunsetsu-get-dic-no b)
+- "+"
+- (wnn-bunsetsu-get-entry b))))
+- (concat "\0"
+- (wnn-bunsetsu-get-converted b)
+- "\0"
+- (wnn-bunsetsu-get-fuzokugo b))))
+- bunsetsu "\0")
++ (intern (cond ((eq wnn-uniq-level 'wnn-uniq)
++ (wnn-uniq-hash-string wnn-uniq))
++ ((eq wnn-uniq-level 'wnn-uniq-entry)
++ (wnn-uniq-hash-string wnn-uniq-entry))
++ (t
++ (wnn-uniq-hash-string nil)))
+ hash-table))
+
+ (defun wnn-uniq-candidates (candidates)
+@@ -786,6 +794,68 @@ Return the list of bunsetsu."
+ (setq next-b (list (car next-b))))
+ (list cand prev-b next-b)))
+
++(defun wnn-special-candidate (bunsetsu prev-b next-b major type)
++ (let* ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
++ (lang (get backend 'language))
++ pos cand)
++ (when (and (eq lang (get backend 'source-language))
++ (eq lang (get backend 'converted-language)))
++ (setq pos (and (eq lang (get backend 'source-language))
++ (eq lang (get backend 'converted-language))
++ (cond ((eq lang 'Japanese)
++ (cond ((eq type 'egg-hiragana) -1)
++ ((eq type 'egg-katakana) -2)))
++ ((or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS))
++ (cond ((eq type 'egg-pinyin) -1)
++ ((eq type 'egg-zhuyin) -1)))
++ ((eq lang 'Korean)
++ (cond ((eq type 'egg-hangul) -1))))))
++ (when pos
++ (setq cand (cdr (wnn-list-candidates bunsetsu prev-b next-b major))
++ pos (+ pos (length cand)))
++ (when (and (or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS)))
++ (let ((converted (nth pos cand)))
++ (cond ((egg-pinyin-syllable converted)
++ (cond ((eq type 'egg-pinyin)) ; OK
++ ((eq type 'egg-zhuyin)
++ (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
++ (t (setq pos nil))))
++ ((egg-zhuyin-syllable converted)
++ (cond ((eq type 'egg-pinyin)
++ (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
++ ((eq type 'egg-zhuyin)) ; OK
++ (t (setq pos nil))))
++ (t (setq pos nil))))))
++ (when pos
++ (wnn-decide-candidate bunsetsu pos prev-b next-b)))))
++
++(defun wnn-pinyin-zhuyin-bunsetsu (bunsetsu pos lang type)
++ (let ((b (nth pos (wnn-bunsetsu-get-zenkouho-list (car bunsetsu))))
++ (encoding (if (eq lang 'Chinese-GB)
++ (if (eq type 'egg-pinyin)
++ 'fixed-euc-py-cn 'fixed-euc-zy-cn)
++ (if (eq type 'egg-pinyin)
++ 'fixed-euc-py-tw 'fixed-euc-zy-tw)))
++ (converted (wnn-bunsetsu-get-zenkouho-converted (car bunsetsu)))
++ str)
++ (setcar (nthcdr pos converted)
++ (wnn-pinyin-zhuyin-string (nth pos converted) encoding))
++ (while b
++ (setq str (wnn-bunsetsu-get-converted (car b)))
++ (when str
++ (wnn-bunsetsu-set-converted
++ (car b)
++ (wnn-pinyin-zhuyin-string str encoding)))
++ (setq str (wnn-bunsetsu-get-fuzokugo (car b)))
++ (when str
++ (wnn-bunsetsu-set-fuzokugo
++ (car b)
++ (wnn-pinyin-zhuyin-string str encoding)))
++ (setq b (cdr b)))))
++
++(defun wnn-pinyin-zhuyin-string (str encoding)
++ (decode-coding-string (encode-coding-string str encoding) encoding))
++
+ (defun wnn-change-bunsetsu-length (bunsetsu prev-b next-b len major)
+ (let ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
+ (env (wnn-bunsetsu-get-env (car bunsetsu)))
+@@ -918,7 +988,7 @@ Return the list of bunsetsu."
+ (wnn-bunsetsu-get-right-now b)
+ (wnn-bunsetsu-get-freq b))
+ context))
+- (wnnrpc-set-frequency env dic-no entry
++ (wnnrpc-set-frequency env dic-no entry
+ (WNN-const IMA_ON) (WNN-const HINDO_INC)))
+ (list (car context) (nth 1 context))))
+
+@@ -1139,7 +1209,7 @@ Return the list of bunsetsu."
+ (proc-name (wnn-server-proc-name server-info))
+ (msg-form "Wnn: connecting to %S at %s...")
+ (user-name (user-login-name))
+- buf hostname myname port-off proc result msg)
++ buf hostname myname port-off proc result msg)
+ (unwind-protect
+ (progn
+ (setq buf (generate-new-buffer (wnn-server-buffer-name server-info)))
+@@ -1175,7 +1245,7 @@ Return the list of bunsetsu."
+ ((error quit))))
+ (when proc
+ (process-kill-without-query proc)
+- (set-process-coding-system proc 'no-conversion 'no-conversion)
++ (set-process-coding-system proc 'binary 'binary)
+ (set-process-sentinel proc 'wnn-comm-sentinel)
+ (set-marker-insertion-type (process-mark proc) t)
+ (setq result (wnnrpc-open proc myname user-name))
+@@ -1276,7 +1346,7 @@ is non-NIL."
+ (setq env-name (if reverse (concat env-name "R") env-name)
+ wnn-current-envspec (wnn-envspec-create env-name tankan stickey)
+ wnn-current-envspec-reverse reverse
+- wnn-envspec-list (nconc wnn-envspec-list
++ wnn-envspec-list (nconc wnn-envspec-list
+ (list wnn-current-envspec))))
+
+ (defun wnn-set-fuzokugo (filename)
+@@ -1359,7 +1429,7 @@ is non-NIL."
+ dict freq nil dict-rw freq-rw
+ dict-passwd freq-passwd nil))
+
+-(defun wnn-add-notrans-dict (dict priority dict-rw
++(defun wnn-add-notrans-dict (dict priority dict-rw
+ &optional dict-passwd &rest reverse)
+ (wnn-wnn6-env-func wnn-add-notrans-dict)
+ (wnn-add-dict-param-check wnn-add-notrans-dict
+@@ -1705,7 +1775,7 @@ On failure, return negative error code."
+ (wnn-create-frequency env fi did fname "" fpass))
+ (message (egg-get-message 'wnn-re-create-freq) fname)
+ (and (>= (setq fid (wnn-open-file env fname)) 0)
+- (>= (wnnrpc-set-dictionary env
++ (>= (wnnrpc-set-dictionary env
+ did fid prior drw frw
+ dpass fpass rev)
+ 0))))))))
+@@ -2090,7 +2160,7 @@ environment."
+
+ ;;;###autoload
+ (defun egg-activate-wnn (&rest arg)
+- "Activate Wnn backend of Tamagotchy."
++ "Activate Wnn backend of Tamago 4."
+ (apply 'egg-mode (append arg wnn-backend-alist)))
+
+ ;;; egg/wnn.el ends here.
+Index: egg/wnnrpc.el
+===================================================================
+RCS file: /cvs/tamago/tamago/egg/wnnrpc.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.1 -r1.3
+--- egg/wnnrpc.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ egg/wnnrpc.el 22 Jul 2002 13:18:56 -0000 1.3
+@@ -162,8 +162,8 @@
+ ((eq c 'WNN_NOT_A_FILE) 98)
+ ((eq c 'WNN_INODE_CHECK_ERROR) 99)
+
+- ((eq c 'WNN_UD_DICT) 2)
+- ((eq c 'WNN_REV_DICT) 3)
++ ((eq c 'WNN_UD_DICT) 2)
++ ((eq c 'WNN_REV_DICT) 3)
+ ((eq c 'CWNN_REV_DICT) ?\x103)
+ ((eq c 'BWNN_REV_DICT) ?\x203)
+ ((eq c 'WNN_COMPACT_DICT) 5)
+@@ -693,10 +693,10 @@
+
+ (defmacro wnnrpc-get-result (&rest body)
+ `(let (result)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ (if (< result 0)
+ (progn
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ (- result))
+ ,@(or body '(result)))))
+
+@@ -725,7 +725,7 @@
+
+ (defun wnnrpc-connect (proc envname)
+ "Establish new `connection' and make an environment.
+-Return the identitifation of the environment on success,
++Return the identitifation of the environment on success,
+ or negative error code on failure."
+ (comm-call-with-proc proc ()
+ (comm-format (u s) (wnn-const JS_CONNECT) envname)
+@@ -739,7 +739,7 @@ Return non-negative file ID on success,
+ (wnnrpc-get-result)))
+
+ (defun wnnrpc-set-fuzokugo-file (env fid)
+- "For PROC, on environment ENV-ID,
++ "For PROC, on environment ENV-ID,
+ Set Fuzokugo file specified by FID.
+ Return 0 on success, negate-encoded error code on failure."
+ (wnnrpc-call-with-environment env ()
+@@ -783,7 +783,7 @@ error code on faiulure."
+ (comm-format (u u u) (wnn-const JS_GET_AUTOLEARNING_DIC)
+ env-id type)
+ (wnnrpc-get-result
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ (1+ result))))
+
+ (defun wnnrpc-set-autolearning-dic (env type dic-id)
+@@ -798,16 +798,16 @@ Return 0 on success, negate-encoded erro
+ "Return the version number of WNN server."
+ (comm-call-with-proc proc (result)
+ (comm-format (u) (wnn-const JS_VERSION))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+-(defun wnnrpc-access (env path mode)
++(defun wnnrpc-access (env path mode)
+ "Check the accessibility of file in the environment ENV.
+ Return 0 when the remote file (dictionary/frequency) of PATH on server
+ can be accessed in mode MODE. Return Non-zero otherwise."
+ (wnnrpc-call-with-environment env (result)
+ (comm-format (u u u s) (wnn-const JS_ACCESS) env-id mode path)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun wnnrpc-mkdir (env path)
+@@ -904,7 +904,7 @@ Return positive if loaded, zero if not,
+ hinshi status status-backward kangovect evaluation
+ result source fuzokugo)
+ (while (> n-bunsetsu 0)
+- (comm-unpack (u u u u u u u u u u u u)
++ (comm-unpack (i i i i i i i i i i i i)
+ end start jiritsugo-end
+ dic-no entry freq right-now hinshi
+ status status-backward kangovect evaluation)
+@@ -929,9 +929,9 @@ Return positive if loaded, zero if not,
+ n-bunstsu kanji-length dlist slist
+ end start n-sho evaluation
+ n retval)
+- (comm-unpack (u u) n-bunstsu kanji-length)
++ (comm-unpack (i i) n-bunstsu kanji-length)
+ (while (> n-dai 0)
+- (comm-unpack (u u u u) end start n-sho evaluation)
++ (comm-unpack (i i i i) end start n-sho evaluation)
+ (setq dlist (cons (cons n-sho evaluation) dlist)
+ n-dai (1- n-dai)))
+ (setq dlist (nreverse dlist)
+@@ -1010,7 +1010,7 @@ HINSHI and FUZOKUGO are information of p
+ fi-dic dic entry offset num result)
+ (comm-unpack (i) num)
+ (while (> num 0)
+- (comm-unpack (u u u u) fi-dic dic entry offset)
++ (comm-unpack (i i i i) fi-dic dic entry offset)
+ (setq result (cons (vector fi-dic dic entry offset -2 -4) result)
+ num (1- num)))
+ (nreverse result)))
+@@ -1110,7 +1110,7 @@ HINSHI and FUZOKUGO are information of p
+ ""
+ (comm-call-with-proc proc (result)
+ (comm-format (u s) (wnn-const JS_ENV_EXIST) envname)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun wnnrpc-make-env-sticky (env)
+@@ -1156,14 +1156,14 @@ HINSHI and FUZOKUGO are information of p
+ ""
+ (wnnrpc-call-with-environment env (n-dic)
+ (comm-format (u u) (wnn-const JS_DIC_LIST) env-id)
+- (comm-unpack (u) n-dic)
++ (comm-unpack (i) n-dic)
+ (wnnrpc-receive-dictionary-list proc n-dic)))
+
+ (defun wnnrpc-get-fi-dictionary-list-with-environment (env mask)
+ ""
+ (wnnrpc-call-with-environment env (n-dic)
+ (comm-format (u u u) (wnn-const JS_FI_DIC_LIST) env-id mask)
+- (comm-unpack (u) n-dic)
++ (comm-unpack (i) n-dic)
+ (wnnrpc-receive-dictionary-list proc n-dic)))
+
+ (defun wnnrpc-receive-dictionary-list (proc n-dic)
+@@ -1171,7 +1171,7 @@ HINSHI and FUZOKUGO are information of p
+ rev comment dicname freqname dic-passwd freq-passwd
+ type gosuu dic-local-flag freq-local-flag retval)
+ (while (> n-dic 0)
+- (comm-unpack (u u u u u u u u S s s s s u u u u)
++ (comm-unpack (i i i i i i i i S s s s s i i i i)
+ entry dic freq dic-mode freq-mode enable-flag nice
+ rev comment dicname freqname dic-passwd freq-passwd
+ type gosuu dic-local-flag freq-local-flag)
+@@ -1193,7 +1193,7 @@ HINSHI and FUZOKUGO are information of p
+ (comm-format (u u i) (wnn-const JS_HINSI_DICTS) env-id -1)
+ (wnnrpc-get-result
+ (while (> result 0)
+- (comm-unpack (u) dic)
++ (comm-unpack (i) dic)
+ (setq dic-list (nconc dic-list (list dic))
+ result (1- result)))
+ dic-list)))
+@@ -1222,7 +1222,7 @@ HINSHI and FUZOKUGO are information of p
+ p10 p11 p12 p13 p14 p15)
+ (comm-format (u u) (wnn-const JS_PARAM_GET) env-id)
+ (wnnrpc-get-result
+- (comm-unpack (u u u u u u u u u u u u u u u u u)
++ (comm-unpack (i i i i i i i i i i i i i i i i i)
+ n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
+ p10 p11 p12 p13 p14 p15)
+ (vector n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15))))
+@@ -1243,7 +1243,7 @@ HINSHI and FUZOKUGO are information of p
+ ""
+ (comm-call-with-proc proc (result)
+ (comm-format (u s) (wnn-const JS_FILE_LOADED) path)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun wnnrpc-write-file (env fid filename)
+@@ -1261,9 +1261,9 @@ HINSHI and FUZOKUGO are information of p
+ (let ((i 0)
+ flist
+ nfiles fid local ref-count type name)
+- (comm-unpack (u) nfiles)
++ (comm-unpack (i) nfiles)
+ (while (> nfiles 0)
+- (comm-unpack (u u u u s) fid local ref-count type name)
++ (comm-unpack (i i i i s) fid local ref-count type name)
+ (setq flist (nconc flist (list (vector fid local ref-count type name)))
+ nfiles (1- nfiles)))
+ flist))
+@@ -1284,7 +1284,7 @@ HINSHI and FUZOKUGO are information of p
+ "3: dictionary, 4: hindo file, 5: fuzokugo-file"
+ (wnnrpc-call-with-environment env (result)
+ (comm-format (u u s) (wnn-const JS_FILE_STAT) env-id path)
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun wnnrpc-get-file-info (env fid)
+@@ -1292,7 +1292,7 @@ HINSHI and FUZOKUGO are information of p
+ (wnnrpc-call-with-environment env (name local ref-count type)
+ (comm-format (u u u) (wnn-const JS_FILE_INFO) env-id fid)
+ (wnnrpc-get-result
+- (comm-unpack (s u u u) name local ref-count type)
++ (comm-unpack (s i i i) name local ref-count type)
+ (vector name local ref-count type))))
+
+ (defmacro wnnrpc-receive-vector (n)
+@@ -1300,7 +1300,7 @@ HINSHI and FUZOKUGO are information of p
+ (i 0)
+ j)
+ (while (< i ,n)
+- (comm-unpack (u) j)
++ (comm-unpack (i) j)
+ (aset v i j)
+ (setq i (1+ i)))
+ v))
+@@ -1311,7 +1311,7 @@ HINSHI and FUZOKUGO are information of p
+ (comm-format (u) (wnn-const JS_WHO))
+ (wnnrpc-get-result
+ (while (> result 0)
+- (comm-unpack (u s s) socket username hostname)
++ (comm-unpack (i s s) socket username hostname)
+ (setq who (nconc who
+ (list (vector socket username hostname
+ (wnnrpc-receive-vector
+@@ -1324,7 +1324,7 @@ HINSHI and FUZOKUGO are information of p
+ (comm-format (u) (wnn-const JS_ENV_LIST))
+ (wnnrpc-get-result
+ (while (> result 0)
+- (comm-unpack (u s u u u) id name count fuzokugo dic-max)
++ (comm-unpack (i s i i i) id name count fuzokugo dic-max)
+ (setq envs (nconc envs
+ (list (vector id name count fuzokugo dic-max
+ (wnnrpc-receive-vector
+@@ -1338,7 +1338,7 @@ HINSHI and FUZOKUGO are information of p
+ ""
+ (comm-call-with-proc proc (result)
+ (comm-format (u) (wnn-const JS_KILL))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))
+
+ (defun wnnrpc-delete-dictionary (env dic)
+@@ -1357,7 +1357,7 @@ HINSHI and FUZOKUGO are information of p
+ ""
+ (wnnrpc-call-with-proc proc (n-dic)
+ (comm-format (u) (wnn-const JS_DIC_LIST_ALL))
+- (comm-unpack (u) n-dic)
++ (comm-unpack (i) n-dic)
+ (wnnrpc-receive-dictionary-list proc n-dic)))
+
+ (defun wnnrpc-delete-word (env dic entry)
+@@ -1369,15 +1369,15 @@ HINSHI and FUZOKUGO are information of p
+ (defun wnnrpc-receive-word (proc yomi)
+ (let (dic serial hinshi hindo right-now internal-hindo internal-right-now
+ kanji comment l l1)
+- (comm-unpack (u) dic)
++ (comm-unpack (i) dic)
+ (while (>= dic 0)
+- (comm-unpack (u u u u u u) serial hinshi hindo right-now
++ (comm-unpack (i i i i i i) serial hinshi hindo right-now
+ internal-hindo internal-right-now)
+ (setq l (cons (vector dic serial hinshi hindo right-now
+ internal-hindo internal-right-now
+ yomi nil nil)
+ l))
+- (comm-unpack (u) dic))
++ (comm-unpack (i) dic))
+ (setq l (nreverse l)
+ l1 l)
+ (while l1
+@@ -1454,16 +1454,16 @@ HINSHI and FUZOKUGO are information of p
+
+ (defmacro wnnrpc-with-temp-buffer (&rest body)
+ `(with-temp-buffer
+- (let ((coding-system-for-read 'no-conversion)
+- (coding-system-for-write 'no-conversion))
++ (let ((coding-system-for-read 'binary)
++ (coding-system-for-write 'binary))
+ (set-buffer-multibyte nil)
+ ,@body)))
+
+ (defmacro wnnrpc-with-write-file (filename error-handler &rest body)
+ `(condition-case error
+ (with-temp-file ,filename
+- (let ((coding-system-for-read 'no-conversion)
+- (coding-system-for-write 'no-conversion))
++ (let ((coding-system-for-read 'binary)
++ (coding-system-for-write 'binary))
+ (set-buffer-multibyte nil)
+ ,@body))
+ (file-error ,error-handler)))
+@@ -1492,7 +1492,7 @@ HINSHI and FUZOKUGO are information of p
+ (wnn-const WNN_FILE_STRING)))
+ (progn
+ (goto-char (1+ (wnn-const WNN_FILE_STRING_LEN)))
+- (comm-unpack (u v v v)
++ (comm-unpack (i v v v)
+ type
+ uniq1 (wnn-const WNN_UNIQ_LEN)
+ uniq2 (wnn-const WNN_UNIQ_LEN)
+@@ -1511,7 +1511,7 @@ HINSHI and FUZOKUGO are information of p
+ (cond ((null header)
+ (- (wnn-const WNN_NOT_A_FILE)))
+ ((null (car header))
+- (if (file-exists-p path)
++ (if (file-exists-p path)
+ (- (wnn-const WNN_OPENF_ERR))
+ (- (wnn-const WNN_NO_EXIST))))
+ (t
+@@ -1534,10 +1534,18 @@ HINSHI and FUZOKUGO are information of p
+
+ (defun wnnrpc-make-uniq (attributes)
+ (wnnrpc-with-temp-buffer
+- (comm-format (U i u V)
+- (nth 6 attributes) (nth 11 attributes) (nth 10 attributes)
+- wnn-system-name (wnn-const WNN_HOST_LEN))
+- (buffer-string)))
++ (let ((ctime (nth 6 attributes))
++ (ino (nth 10 attributes))
++ (devno (nth 11 attributes)))
++ (if (numberp devno)
++ (comm-format (U i u V)
++ ctime devno ino
++ wnn-system-name (wnn-const WNN_HOST_LEN))
++ ;; Emacs 21 returns returns negative devno as 16 bits uint pair
++ (comm-format (U U u V)
++ ctime (list (car devno) (cdr devno)) ino
++ wnn-system-name (wnn-const WNN_HOST_LEN)))
++ (buffer-string))))
+
+ (defun wnnrpc-change-file-uniq (header path &optional new)
+ (wnnrpc-with-write-file path
+@@ -1558,27 +1566,28 @@ HINSHI and FUZOKUGO are information of p
+ (defun wnnrpc-check-passwd (proc passwd header)
+ (let ((env-id -1))
+ (unwind-protect
+- (if (>= (setq env-id (wnnrpc-connect proc "")) 0)
+- (wnnrpc-call-with-environment (wnnenv-create proc env-id)
+- (file-id)
+- (comm-format (u u v) (wnn-const JS_FILE_SEND)
+- env-id
+- (nth 1 header) (wnn-const WNN_UNIQ_LEN))
+- (comm-unpack (u) file-id)
+- (if (>= file-id 0)
+- (progn
+- (wnnrpc-get-result) ; ignore result code
+- (- (wnn-const WNN_FILE_IN_USE)))
+- (wnnrpc-get-result
+- (comm-call-with-proc-1 proc ()
+- (comm-format (s B)
+- (concat wnn-system-name "!TEMPFILE")
+- (wnnrpc-make-dummy-dictionary header))
+- (wnnrpc-get-result
+- (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
+- (wnnrpc-set-dictionary (wnnenv-create proc env-id)
+- result -1 1 t t
+- passwd "" nil))))))))
++ (if (< (setq env-id (wnnrpc-connect proc "")) 0)
++ -1
++ (wnnrpc-call-with-environment (wnnenv-create proc env-id)
++ (file-id)
++ (comm-format (u u v) (wnn-const JS_FILE_SEND)
++ env-id
++ (nth 1 header) (wnn-const WNN_UNIQ_LEN))
++ (comm-unpack (i) file-id)
++ (if (>= file-id 0)
++ (progn
++ (wnnrpc-get-result) ; ignore result code
++ (- (wnn-const WNN_FILE_IN_USE)))
++ (wnnrpc-get-result
++ (comm-call-with-proc-1 proc ()
++ (comm-format (s B)
++ (concat wnn-system-name "!TEMPFILE")
++ (wnnrpc-make-dummy-dictionary header))
++ (wnnrpc-get-result
++ (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
++ (wnnrpc-set-dictionary (wnnenv-create proc env-id)
++ result -1 1 t t
++ passwd "" nil))))))))
+ (if (>= env-id 0)
+ (wnnrpc-disconnect (wnnenv-create proc env-id))))))
+
+@@ -1603,7 +1612,7 @@ HINSHI and FUZOKUGO are information of p
+ (comm-call-with-proc proc (result)
+ (comm-format (u v) (wnn-const JS_FILE_LOADED_LOCAL)
+ (nth 1 header) (wnn-const WNN_UNIQ_LEN))
+- (comm-unpack (u) result)
++ (comm-unpack (i) result)
+ result))))
+
+ (defun wnnrpc-file-receive (env fid local-filename)
+@@ -1629,7 +1638,7 @@ HINSHI and FUZOKUGO are information of p
+ (wnnrpc-terminate-current-command WNN_FILE_WRITE_ERROR))
+ (t
+ (wnnrpc-with-write-file local-filename
+- (- (wnn-const WNN_FILE_WRITE_ERROR))
++ (- (wnn-const WNN_FILE_WRITE_ERROR))
+ (comm-call-with-proc proc ()
+ (comm-format (u) (wnn-const WNN_ACK))
+ (comm-unpack (B) contents))
+@@ -1654,7 +1663,7 @@ HINSHI and FUZOKUGO are information of p
+ (comm-format (u u v) (wnn-const JS_FILE_SEND)
+ env-id
+ (nth 1 header) (wnn-const WNN_UNIQ_LEN))
+- (comm-unpack (u) file-id)
++ (comm-unpack (i) file-id)
+ (if (>= file-id 0)
+ (wnnrpc-get-result
+ (wnnenv-set-client-file env filename)
+@@ -1705,7 +1714,7 @@ HINSHI and FUZOKUGO are information of p
+ comment passwd hpasswd))
+ 0
+ (- (wnn-const WNN_FILE_CREATE_ERROR))))
+-
++
+
+ (defun wnnrpc-hindo-file-create-client (env fi dic-id freqname comment passwd)
+ (if (and (null (file-exists-p freqname))
+@@ -1718,9 +1727,9 @@ HINSHI and FUZOKUGO are information of p
+ (defun wnnrpc-make-temp-name (env)
+ (let ((n 0)
+ (temp-form "usr/temp"))
+- (while (= (wnnrpc-access env (concat temp-form n) 0) 0)
++ (while (= (wnnrpc-access env (concat temp-form (number-to-string n)) 0) 0)
+ (setq n (1+ n)))
+- (concat temp-form n)))
++ (concat temp-form (number-to-string n))))
+
+ (defun wnnrpc-create-and-move-to-client (env dic-id filename type
+ comment passwd hpasswd)
+@@ -1750,7 +1759,7 @@ HINSHI and FUZOKUGO are information of p
+ (cond
+ ((null filename) "")
+ ((null (file-readable-p filename)) (- (wnn-const WNN_FILE_READ_ERROR)))
+- (t
++ (t
+ (wnnrpc-with-temp-buffer
+ (insert-file-contents filename nil 0 (1- (wnn-const WNN_PASSWD_LEN)))
+ (goto-char 1)
+@@ -1759,4 +1768,4 @@ HINSHI and FUZOKUGO are information of p
+ (backward-char))
+ (buffer-substring 1 (point))))))
+
+-;;; egg/wnnrpc.el ends here.
++;;; egg/wnnrpc.el ends here
+Index: its/ascii.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/ascii.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- its/ascii.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/ascii.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -26,10 +26,7 @@
+ ;; Boston, MA 02111-1307, USA.
+
+ ;;; Commentary:
+-;;
+-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
+-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
+-;;
++
+
+ ;;; Code:
+
+Index: its/aynu.el
+===================================================================
+RCS file: its/aynu.el
+diff -N its/aynu.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ its/aynu.el 22 Jul 2002 13:18:56 -0000 1.3
+@@ -0,0 +1,285 @@
++;;; its/aynu.el --- Aynu Katakana Input in Egg Input Method Architecture
++
++;; Copyright (C) 1999,2000 PFU LIMITED
++
++;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
++
++;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
++
++;; Keywords: mule, multilingual, input method
++
++;; This file is part of EGG.
++
++;; EGG is free software; you can redistribute it and/or modify
++;; it under the terms of the GNU General Public License as published by
++;; the Free Software Foundation; either version 2, or (at your option)
++;; any later version.
++
++;; EGG is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with GNU Emacs; see the file COPYING. If not, write to the
++;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA.
++
++;;; Commentary:
++
++
++;;; Code:
++
++(eval-when-compile
++ (require 'its)
++ (require 'cl))
++
++(eval-when (compile)
++ (defconst its-compaction-enable t))
++
++(defvar its-aynu-enable-zenkaku-alphabet
++ (if (boundp 'its-enable-fullwidth-alphabet)
++ its-enable-fullwidth-alphabet
++ t)
++ "*Enable Zenkaku alphabet")
++
++(defvar its-aynu-horizontal "$(O!<(B" "*-") ; "-" "$(O!=(B"
++(defvar its-aynu-period "$(O!#(B " "*.") ; "." "$(O!#(B"
++(defvar its-aynu-comma "$(O!$(B " "*,") ; "," "$(O!$(B"
++(defvar its-aynu-open-bracket "$(O!V(B" "*[") ; "$(O!N(B"
++(defvar its-aynu-close-bracket "$(O!W(B" "*]") ; "$(O!O(B"
++
++(defvar its-aynu-enable-double-n nil "*Enable \"nn\" input for \"$(O%s(B\"")
++
++(defvar its-aynu-kick-conversion-on-space nil "*Start conversion on SPACE")
++
++(eval-when-compile
++ (defun its-define-state-aynu (input i-tail output o-tail otherwise)
++ "Define following rules:
++INPUT + I-TAIL --> OUTPUT + O-TAIL
++INPUT + I-TAIL + ' --> OUTPUT + O-TAIL
++INPUT + I-TAIL + vowel --> (translate INPUT) + I-tail + vowel
++INPUT + I-TAIL + OTHERWISE (see `its-defrule-otherwise')."
++ (let ((out (concat output o-tail))
++ state)
++ (setq state (its-defrule (concat input i-tail) out))
++ (its-defrule (concat input i-tail "'") out)
++ (its-defrule-otherwise state nil "[aiueo]" -2)
++ (while otherwise
++ (its-defrule-otherwise state (concat output (caar otherwise))
++ (nth 1 (car otherwise)) (nth 2 (car otherwise)))
++ (setq otherwise (cdr otherwise)))
++ (setq state (its-defrule (concat input i-tail "y") (concat out "$(O%#(B")))
++ (its-make-next-state state -1 out -1)
++ (its-defrule-otherwise state out nil -2)
++ (its-defrule-otherwise state nil "[u]" -3)
++))
++
++ (defconst its-aynu-tail-alist
++ (let ((common '(("k" "$(O&n(B" (("$(O%C(B" "[k]" -1)))
++ ("s" "$(O&o(B" (("$(O%C(B" "[s]" -1) (nil "[h]" -2)))
++ ("p" "$(O&x(B" (("$(O%C(B" "[p]" -1)))
++ ("m" "$(O&y(B" (("$(O%s(B" "[mp]" -1)))
++ ("t" "$(O%C(B") ("y" "$(O%#(B") ("w" "$(O%%(B"))))
++ `((?a ("h" "$(O&s(B") ("x" "$(O&s(B") ("r" "$(O&z(B") ,@common)
++ (?i ("h" "$(O&t(B") ("x" "$(O&t(B") ("r" "$(O&{(B") ,@common)
++ (?u ("h" "$(O&u(B") ("x" "$(O&u(B") ("r" "$(O&|(B") ,@common)
++ (?e ("h" "$(O&v(B") ("x" "$(O&v(B") ("r" "$(O&}(B") ,@common)
++ (?o ("h" "$(O&w(B") ("x" "$(O&w(B") ("r" "$(O&~(B") ,@common))))
++
++ (defun its-defrule-aynu (conso vowel output)
++ (let ((input (concat conso vowel))
++ (tails (and vowel (cdr (assq (aref vowel 0) its-aynu-tail-alist)))))
++ (its-defrule input output)
++ (while tails
++ (its-define-state-aynu input (caar tails) output (nth 1 (car tails))
++ (nth 2 (car tails)))
++ (setq tails (cdr tails)))))
++
++ (defmacro its-define-aynu (&rest rules)
++ (let ((defs (list 'progn))
++ conso vowels output)
++ (while rules
++ (setq vowels '(nil "a" "i" "u" "e" "o")
++ conso (caar rules)
++ output (cdar rules)
++ rules (cdr rules))
++ (while output
++ (when (car output)
++ (setq defs (cons `(its-defrule-aynu ,conso ,(car vowels)
++ ,(car output))
++ defs)))
++ (setq output (cdr output)
++ vowels (cdr vowels))))
++ (nreverse defs)))
++
++ (defun its-defrule-aynu-override-yu (conso)
++ (let ((output (its-get-output (its-goto-state conso)))
++ state)
++ (its-defrule (concat conso "yu")
++ (concat (its-get-output (its-goto-state (concat conso "i")))
++ "$(O%e!<(B"))
++ (setq state (its-goto-state (concat conso "y")))
++ (its-set-output state (concat output "$(O%#(B"))
++ (its-make-next-state state -1 output -1)
++ (its-defrule-otherwise state output nil -2))))
++
++(define-its-state-machine its-aynu-map
++ "roma-aynu-kata" "$(O%"(B" Aynu
++ "Map for Romaji-Aynu-Katakana translation. (Japanese)"
++
++ (defconst its-zenkaku-escape "Z") ;; Escape character to Zenkaku inputs
++ (defconst its-hankaku-escape "~") ;; Escape character to Hankaku inputs
++
++ (its-defrule-select-mode-temporally "q" downcase)
++ (its-defrule-select-mode-temporally "Q" zenkaku-downcase)
++
++ (dolist (small '(("a" "$(O%!(B") ("i" "$(O%#(B") ("u" "$(O%%(B") ("e" "$(O%'(B") ("o" "$(O%)(B")
++ ("ka" "$(O%u(B") ("ku" "$(O&n(B") ("ke" "$(O%v(B")
++ ("si" "$(O&o(B") ("su" "$(O&p(B")
++ ("tu" "$(O%C(B") ("to" "$(O&q(B")
++ ("nu" "$(O&r(B")
++ ("ha" "$(O&s(B") ("hi" "$(O&t(B") ("hu" "$(O&u(B") ("he" "$(O&v(B") ("ho" "$(O&w(B")
++ ("pu" "$(O&x(B")
++ ("mu" "$(O&y(B")
++ ("ya" "$(O%c(B") ("yu" "$(O%e(B") ("yo" "$(O%g(B")
++ ("ra" "$(O&z(B") ("ri" "$(O&{(B") ("ru" "$(O&|(B") ("re" "$(O&}(B") ("ro" "$(O&~(B")
++ ("wa" "$(O%n(B")))
++ (its-defrule (concat "x" (car small)) (cadr small)))
++
++ (its-define-aynu
++ ("" nil "$(O%"(B" "$(O%$(B" "$(O%&(B" "$(O%((B" "$(O%*(B")
++ ("k" "$(O&n(B" "$(O%+(B" "$(O%-(B" "$(O%/(B" "$(O%1(B" "$(O%3(B")
++ ("g" "$(O%0(B" "$(O%,(B" "$(O%.(B" "$(O%0(B" "$(O%2(B" "$(O%4(B")
++ ("s" "$(O&p(B" "$(O%5(B" "$(O%7(B" "$(O%9(B" "$(O%;(B" "$(O%=(B")
++ ("z" nil "$(O%6(B" "$(O%8(B" "$(O%:(B" "$(O%<(B" "$(O%>(B")
++ ("vs" nil nil nil nil "$(O%|(B" nil)
++ ("sh" "$(O%7%c(B" "$(O%7%c(B" "$(O%7(B" "$(O%7%e(B" "$(O%7%'(B" "$(O%7%g(B")
++ ("j" nil "$(O%8%c(B" "$(O%8(B" "$(O%8%e(B" "$(O%8%'(B" "$(O%8%g(B")
++ ("t" "$(O%C(B" "$(O%?(B" "$(O%A(B" "$(O%H%%(B" "$(O%F(B" "$(O%H(B")
++ ("vt" nil nil nil "$(O%}(B" nil "$(O%~(B")
++ ("d" nil "$(O%@(B" "$(O%B(B" "$(O%E(B" "$(O%G(B" "$(O%I(B")
++ ("c" "$(O%C(B" "$(O%A%c(B" "$(O%A(B" "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
++ ("ch" "$(O%C(B" "$(O%A%c(B" "$(O%A(B" "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
++ ("n" "$(O%s(B" "$(O%J(B" "$(O%K(B" "$(O%L(B" "$(O%M(B" "$(O%N(B")
++ ("h" "$(O&s(B" "$(O%O(B" "$(O%R(B" "$(O%U(B" "$(O%X(B" "$(O%[(B")
++ ("b" nil "$(O%P(B" "$(O%S(B" "$(O%V(B" "$(O%Y(B" "$(O%\(B")
++ ("p" "$(O&x(B" "$(O%Q(B" "$(O%T(B" "$(O%W(B" "$(O%Z(B" "$(O%](B")
++ ("m" "$(O&y(B" "$(O%^(B" "$(O%_(B" "$(O%`(B" "$(O%a(B" "$(O%b(B")
++ ("y" "$(O%#(B" "$(O%d(B" "$(O%#(B" "$(O%f(B" "$(O%$%'(B" "$(O%h(B")
++ ("r" "$(O&|(B" "$(O%i(B" "$(O%j(B" "$(O%k(B" "$(O%l(B" "$(O%m(B")
++ ("w" "$(O%%(B" "$(O%o(B" "$(O%&%#(B" "$(O%%(B" "$(O%&%'(B" "$(O%&%)(B"))
++
++ (dolist (yu '("k" "g" "s" "z" "sh" "j" "t" "d"
++ "c" "ch" "n" "h" "b" "p" "m" "r"))
++ (its-defrule-aynu-override-yu yu))
++
++ (its-defrule "kk" "$(O%C(B" -1)
++ (its-defrule "ss" "$(O%C(B" -1)
++ (its-defrule "pp" "$(O%C(B" -1)
++ (its-defrule "vv" "$(O%C(B" -1)
++
++;; SYMBOL Input
++ (its-defrule "z1" "$(O!{(B") (its-defrule "z!" "$(O!|(B")
++ (its-defrule "z2" "$(O"&(B") (its-defrule "z@" "$(O"'(B")
++ (its-defrule "z3" "$(O"$(B") (its-defrule "z#" "$(O"%(B")
++ (its-defrule "z4" "$(O""(B") (its-defrule "z$" "$(O"#(B")
++ (its-defrule "z5" "$(O!~(B") (its-defrule "z%" "$(O"!(B")
++ (its-defrule "z6" "$(O!y(B") (its-defrule "z^" "$(O!z(B")
++ (its-defrule "z7" "$(O!}(B") (its-defrule "z&" "$(O!r(B")
++ (its-defrule "z8" "$(O!q(B") (its-defrule "z*" "$(O!_(B")
++ (its-defrule "z9" "$(O!i(B") (its-defrule "z(" "$(O!Z(B")
++ (its-defrule "z0" "$(O!j(B") (its-defrule "z)" "$(O![(B")
++ (its-defrule "z-" "$(O!A(B") (its-defrule "z_" "$(O!h(B")
++ (its-defrule "z=" "$(O!b(B") (its-defrule "z+" "$(O!^(B")
++ (its-defrule "z\\" "$(O!@(B") (its-defrule "z|" "$(O!B(B")
++ (its-defrule "z`" "$(O!-(B") (its-defrule "z~" "$(O!/(B")
++
++ (its-defrule "zq" "$(O!T(B") (its-defrule "zQ" "$(O!R(B")
++ (its-defrule "zw" "$(O!U(B") (its-defrule "zW" "$(O!S(B")
++ ; e
++ (its-defrule "zr" "$(O!9(B") (its-defrule "zR" "$(O!8(B")
++ (its-defrule "zt" "$(O!:(B") (its-defrule "zT" "$(O!x(B")
++ ; y u i o
++ (its-defrule "zp" "$(O")(B") (its-defrule "zP" "$(O",(B")
++ (its-defrule "z[" "$(O!X(B") (its-defrule "z{" "$(O!L(B")
++ (its-defrule "z]" "$(O!Y(B") (its-defrule "z}" "$(O!M(B")
++ ; a
++ (its-defrule "zs" "$(O!3(B") (its-defrule "zS" "$(O!4(B")
++ (its-defrule "zd" "$(O!5(B") (its-defrule "zD" "$(O!6(B")
++ (its-defrule "zf" "$(O!7(B") (its-defrule "zF" "$(O"*(B")
++ (its-defrule "zg" "$(O!>(B") (its-defrule "zG" "$(O!=(B")
++ (its-defrule "zh" "$(O"+(B")
++ (its-defrule "zj" "$(O"-(B")
++ (its-defrule "zk" "$(O",(B")
++ (its-defrule "zl" "$(O"*(B")
++ (its-defrule "z;" "$(O!+(B") (its-defrule "z:" "$(O!,(B")
++ (its-defrule "z\'" "$(O!F(B") (its-defrule "z\"" "$(O!H(B")
++ ; z
++ (its-defrule "zx" ":-") (its-defrule "zX" ":-)")
++ (its-defrule "zc" "$(O!;(B") (its-defrule "zC" "$(O!n(B")
++ (its-defrule "zv" "$(O"((B") (its-defrule "zV" "$(O!`(B")
++ (its-defrule "zb" "$(O!k(B") (its-defrule "zB" "$(O"+(B")
++ (its-defrule "zn" "$(O!l(B") (its-defrule "zN" "$(O"-(B")
++ (its-defrule "zm" "$(O!m(B") (its-defrule "zM" "$(O".(B")
++ (its-defrule "z," "$(O!E(B") (its-defrule "z<" "$(O!e(B")
++ (its-defrule "z." "$(O!D(B") (its-defrule "z>" "$(O!f(B")
++ (its-defrule "z/" "$(O!&(B") (its-defrule "z?" "$(O!g(B")
++ )
++
++(define-its-state-machine-append its-aynu-map
++ (if its-aynu-enable-double-n
++ (its-defrule "nn" "$(O%s(B"))
++
++ (its-defrule "-" its-aynu-horizontal)
++ (its-defrule "." its-aynu-period)
++ (its-defrule "," its-aynu-comma)
++ (its-defrule "[" its-aynu-open-bracket)
++ (its-defrule "]" its-aynu-close-bracket)
++
++ (unless its-aynu-kick-conversion-on-space
++ (its-defrule " " " "))
++
++ (if its-aynu-enable-zenkaku-alphabet
++ (progn
++ (its-defrule "1" "$(O#1(B") (its-defrule "2" "$(O#2(B")
++ (its-defrule "3" "$(O#3(B") (its-defrule "4" "$(O#4(B")
++ (its-defrule "5" "$(O#5(B") (its-defrule "6" "$(O#6(B")
++ (its-defrule "7" "$(O#7(B") (its-defrule "8" "$(O#8(B")
++ (its-defrule "9" "$(O#9(B") (its-defrule "0" "$(O#0(B")
++ (its-defrule "!" "$(O!*(B") (its-defrule "@" "$(O!w(B")
++ (its-defrule "#" "$(O!t(B") (its-defrule "$" "$(O!p(B")
++ (its-defrule "%" "$(O!s(B") (its-defrule "^" "$(O!0(B")
++ (its-defrule "&" "$(O!u(B") (its-defrule "*" "$(O!v(B")
++ (its-defrule "(" "$(O!J(B") (its-defrule ")" "$(O!K(B")
++ (its-defrule "=" "$(O!a(B") (its-defrule "`" "$(O!.(B")
++ (its-defrule "\\" "$(O!o(B") (its-defrule "|" "$(O!C(B")
++ (its-defrule "_" "$(O!2(B") (its-defrule "+" "$(O!\(B")
++ (its-defrule "{" "$(O!P(B") (its-defrule "}" "$(O!Q(B")
++ (its-defrule ":" "$(O!'(B") (its-defrule ";" "$(O!((B")
++ (its-defrule "\"" "$(O!I(B") (its-defrule "'" "$(O!G(B")
++ (its-defrule "<" "$(O!c(B") (its-defrule ">" "$(O!d(B")
++ (its-defrule "?" "$(O!)(B") (its-defrule "/" "$(O!?(B"))
++ (progn
++ (its-defrule "1" "1") (its-defrule "2" "2")
++ (its-defrule "3" "3") (its-defrule "4" "4")
++ (its-defrule "5" "5") (its-defrule "6" "6")
++ (its-defrule "7" "7") (its-defrule "8" "8")
++ (its-defrule "9" "9") (its-defrule "0" "0")
++ (its-defrule "!" "!") (its-defrule "@" "@")
++ (its-defrule "#" "#") (its-defrule "$" "$")
++ (its-defrule "%" "%") (its-defrule "^" "^")
++ (its-defrule "&" "&") (its-defrule "*" "*")
++ (its-defrule "(" "(") (its-defrule ")" ")")
++ (its-defrule "=" "=") (its-defrule "`" "`")
++ (its-defrule "\\" "\\") (its-defrule "|" "|")
++ (its-defrule "_" "_") (its-defrule "+" "+")
++ (its-defrule "{" "{") (its-defrule "}" "}")
++ (its-defrule ":" ":") (its-defrule ";" ";")
++ (its-defrule "\"" "\"") (its-defrule "'" "'")
++ (its-defrule "<" "<") (its-defrule ">" ">")
++ (its-defrule "?" "?") (its-defrule "/" "/"))))
++
++(provide 'its/aynu)
++
++;;; its/aynu.el ends here
+Index: its/greek.el
+===================================================================
+RCS file: its/greek.el
+diff -N its/greek.el
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ its/greek.el 20 Aug 2001 10:09:07 -0000 1.1
+@@ -0,0 +1,251 @@
++(eval-when-compile
++ (require 'its)
++ (require 'cl))
++
++(eval-when (compile)
++ (defconst its-compaction-enable t))
++
++(defgroup greek nil
++ "Greek Input Method"
++ :group 'its)
++
++(define-its-state-machine its-greek-jis-map
++ "greek-jis" "$B&8(B" Greek
++ "$B&%&K&K&G&M&I&J&A(B: Greek keyboard layout (JIS X0208.1983)
++
++The layout is same as greek, but uses JIS characters.
++Sorry, accents and terminal sigma are not supported in JIS."
++
++ (its-defrule "1" "$B#1(B")
++ (its-defrule "2" "$B#2(B")
++ (its-defrule "3" "$B#3(B")
++ (its-defrule "4" "$B#4(B")
++ (its-defrule "5" "$B#5(B")
++ (its-defrule "6" "$B#6(B")
++ (its-defrule "7" "$B#7(B")
++ (its-defrule "8" "$B#8(B")
++ (its-defrule "9" "$B#9(B")
++ (its-defrule "0" "$B#0(B")
++ (its-defrule "-" "$B!](B")
++ (its-defrule "=" "$B!a(B")
++ (its-defrule "`" "$B!F(B")
++ (its-defrule "q" "$B!&(B")
++ (its-defrule "w" "$B&R(B")
++ (its-defrule "e" "$B&E(B")
++ (its-defrule "r" "$B&Q(B")
++ (its-defrule "t" "$B&S(B")
++ (its-defrule "y" "$B&T(B")
++ (its-defrule "u" "$B&H(B")
++ (its-defrule "i" "$B&I(B")
++ (its-defrule "o" "$B&O(B")
++ (its-defrule "p" "$B&P(B")
++ (its-defrule "[" "$B!N(B")
++ (its-defrule "]" "$B!O(B")
++ (its-defrule "a" "$B&A(B")
++ (its-defrule "s" "$B&R(B")
++ (its-defrule "d" "$B&D(B")
++ (its-defrule "f" "$B&U(B")
++ (its-defrule "g" "$B&C(B")
++ (its-defrule "h" "$B&G(B")
++ (its-defrule "j" "$B&N(B")
++ (its-defrule "k" "$B&J(B")
++ (its-defrule "l" "$B&K(B")
++ (its-defrule ";" "$B!G(B")
++ (its-defrule "'" "$B!G(B")
++ (its-defrule "\\" "$B!@(B")
++ (its-defrule "z" "$B&F(B")
++ (its-defrule "x" "$B&V(B")
++ (its-defrule "c" "$B&W(B")
++ (its-defrule "v" "$B&X(B")
++ (its-defrule "b" "$B&B(B")
++ (its-defrule "n" "$B&M(B")
++ (its-defrule "m" "$B&L(B")
++ (its-defrule "," ", ")
++ (its-defrule "." ". ")
++ (its-defrule "/" "$B!?(B")
++
++ (its-defrule "!" "$B!*(B")
++ (its-defrule "@" "$B!w(B")
++ (its-defrule "#" "$B!t(B")
++ (its-defrule "$" "$B!t(B")
++ (its-defrule "%" "$B!s(B")
++ (its-defrule "^" "$B!0(B")
++ (its-defrule "&" "$B!u(B")
++ (its-defrule "*" "$B!v(B")
++ (its-defrule "(" "$B!J(B")
++ (its-defrule ")" "$B!K(B")
++ (its-defrule "_" "$B!2(B")
++ (its-defrule "+" "$B!\(B")
++ (its-defrule "~" "$B!1(B")
++ (its-defrule "Q" "$B!](B")
++ (its-defrule "W" "$B&2(B")
++ (its-defrule "E" "$B&%(B")
++ (its-defrule "R" "$B&1(B")
++ (its-defrule "T" "$B&3(B")
++ (its-defrule "Y" "$B&4(B")
++ (its-defrule "U" "$B&((B")
++ (its-defrule "I" "$B&)(B")
++ (its-defrule "O" "$B&/(B")
++ (its-defrule "P" "$B&1(B")
++ (its-defrule "{" "$B!P(B")
++ (its-defrule "}" "$B!Q(B")
++ (its-defrule "A" "$B&!(B")
++ (its-defrule "S" "$B&2(B")
++ (its-defrule "D" "$B&$(B")
++ (its-defrule "F" "$B&5(B")
++ (its-defrule "G" "$B&#(B")
++ (its-defrule "H" "$B&'(B")
++ (its-defrule "J" "$B&.(B")
++ (its-defrule "K" "$B&*(B")
++ (its-defrule "L" "$B&+(B")
++ (its-defrule ":" "$B!I(B")
++ (its-defrule "\"" "$B!I(B")
++ (its-defrule "|" "$B!C(B")
++ (its-defrule "Z" "$B&&(B")
++ (its-defrule "X" "$B&6(B")
++ (its-defrule "C" "$B&7(B")
++ (its-defrule "V" "$B&8(B")
++ (its-defrule "B" "$B&"(B")
++ (its-defrule "N" "$B&-(B")
++ (its-defrule "M" "$B&,(B")
++ (its-defrule "<" "$B!((B")
++ (its-defrule ">" "$B!'(B")
++ (its-defrule "?" "$B!)(B"))
++
++(define-its-state-machine its-greek-map
++ "greek" ",FY(B" Greek
++ ",FEkkgmij\(B: Greek keyboard layout (ISO 8859-7)
++--------------
++
++In the right of ,Fk(B key is a combination key, where
++ ,F4(B acute
++ ,F((B diaresis
++
++e.g.
++ ,Fa(B + ,F4(B -> ,F\(B
++ ,Fi(B + ,F((B -> ,Fz(B
++ ,Fi(B + ,F((B + ,F4(B -> ,F@(B"
++
++;; 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ `~
++;; ,F7/(B ,FrS(B ,FeE(B ,FqQ(B ,FtT(B ,FuU(B ,FhH(B ,FiI(B ,FoO(B ,FpP(B [{ ]}
++;; ,FaA(B ,FsS(B ,FdD(B ,FvV(B ,FcC(B ,FgG(B ,FnN(B ,FjJ(B ,FkK(B ,F4((B '" \|
++;; ,FfF(B ,FwW(B ,FxX(B ,FyY(B ,FbB(B ,FmM(B ,FlL(B ,; .: /?
++
++ (its-defrule "1" "1")
++ (its-defrule "2" "2")
++ (its-defrule "3" "3")
++ (its-defrule "4" "4")
++ (its-defrule "5" "5")
++ (its-defrule "6" "6")
++ (its-defrule "7" "7")
++ (its-defrule "8" "8")
++ (its-defrule "9" "9")
++ (its-defrule "0" "0")
++ (its-defrule "-" "-")
++ (its-defrule "=" "=")
++ (its-defrule "`" "`")
++ (its-defrule "q" ",F7(B")
++ (its-defrule "w" ",Fr(B")
++ (its-defrule "e" ",Fe(B")
++ (its-defrule "r" ",Fq(B")
++ (its-defrule "t" ",Ft(B")
++ (its-defrule "y" ",Fu(B")
++ (its-defrule "u" ",Fh(B")
++ (its-defrule "i" ",Fi(B")
++ (its-defrule "o" ",Fo(B")
++ (its-defrule "p" ",Fp(B")
++ (its-defrule "[" "[")
++ (its-defrule "]" "]")
++ (its-defrule "a" ",Fa(B")
++ (its-defrule "s" ",Fs(B")
++ (its-defrule "d" ",Fd(B")
++ (its-defrule "f" ",Fv(B")
++ (its-defrule "g" ",Fc(B")
++ (its-defrule "h" ",Fg(B")
++ (its-defrule "j" ",Fn(B")
++ (its-defrule "k" ",Fj(B")
++ (its-defrule "l" ",Fk(B")
++ (its-defrule ";" ",F4(B")
++ (its-defrule "'" "'")
++ (its-defrule "\\" "\\")
++ (its-defrule "z" ",Ff(B")
++ (its-defrule "x" ",Fw(B")
++ (its-defrule "c" ",Fx(B")
++ (its-defrule "v" ",Fy(B")
++ (its-defrule "b" ",Fb(B")
++ (its-defrule "n" ",Fm(B")
++ (its-defrule "m" ",Fl(B")
++ (its-defrule "," ",")
++ (its-defrule "." ".")
++ (its-defrule "/" "/")
++
++ (its-defrule "!" "!")
++ (its-defrule "@" "@")
++ (its-defrule "#" "#")
++ (its-defrule "$" "$")
++ (its-defrule "%" "%")
++ (its-defrule "^" "^")
++ (its-defrule "&" "&")
++ (its-defrule "*" "*")
++ (its-defrule "(" "(")
++ (its-defrule ")" ")")
++ (its-defrule "_" "_")
++ (its-defrule "+" "+")
++ (its-defrule "~" "~")
++ (its-defrule "Q" ",F/(B")
++ (its-defrule "W" ",FS(B")
++ (its-defrule "E" ",FE(B")
++ (its-defrule "R" ",FQ(B")
++ (its-defrule "T" ",FT(B")
++ (its-defrule "Y" ",FU(B")
++ (its-defrule "U" ",FH(B")
++ (its-defrule "I" ",FI(B")
++ (its-defrule "O" ",FO(B")
++ (its-defrule "P" ",FP(B")
++ (its-defrule "{" "{")
++ (its-defrule "}" "}")
++ (its-defrule "A" ",FA(B")
++ (its-defrule "S" ",FS(B")
++ (its-defrule "D" ",FD(B")
++ (its-defrule "F" ",FV(B")
++ (its-defrule "G" ",FC(B")
++ (its-defrule "H" ",FG(B")
++ (its-defrule "J" ",FN(B")
++ (its-defrule "K" ",FJ(B")
++ (its-defrule "L" ",FK(B")
++ (its-defrule ":" ",F((B")
++ (its-defrule "\"" "\"")
++ (its-defrule "|" "|")
++ (its-defrule "Z" ",FF(B")
++ (its-defrule "X" ",FW(B")
++ (its-defrule "C" ",FX(B")
++ (its-defrule "V" ",FY(B")
++ (its-defrule "B" ",FB(B")
++ (its-defrule "N" ",FM(B")
++ (its-defrule "M" ",FL(B")
++ (its-defrule "<" ";")
++ (its-defrule ">" ":")
++ (its-defrule "?" "?")
++
++ (its-defrule "a;" ",F\(B")
++ (its-defrule "e;" ",F](B")
++ (its-defrule "h;" ",F^(B")
++ (its-defrule "i;" ",F_(B")
++ (its-defrule "o;" ",F|(B")
++ (its-defrule "y;" ",F}(B")
++ (its-defrule "v;" ",F~(B")
++ (its-defrule "A;" ",F6(B")
++ (its-defrule "E;" ",F8(B")
++ (its-defrule "H;" ",F9(B")
++ (its-defrule "I;" ",F:(B")
++ (its-defrule "O;" ",F<(B")
++ (its-defrule "Y;" ",F>(B")
++ (its-defrule "V;" ",F?(B")
++ (its-defrule "i:" ",Fz(B")
++ (its-defrule "y:" ",F{(B")
++ (its-defrule "I:" ",FZ(B")
++ (its-defrule "Y:" ",F[(B")
++ (its-defrule "i:;" ",F@(B")
++ (its-defrule "y:;" ",F`(B"))
++
++(provide 'its/greek)
+Index: its/hankata.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/hankata.el,v
+retrieving revision 1.1.1.2
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.2 -r1.2
+--- its/hankata.el 27 Jan 2001 18:45:56 -0000 1.1.1.2
++++ its/hankata.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -24,10 +24,7 @@
+ ;; Boston, MA 02111-1307, USA.
+
+ ;;; Commentary:
+-;;
+-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
+-;; This file is based on the rules of its/kata.el in Mule-2.3 distribution.
+-;;
++
+
+ ;;; Code:
+
+Index: its/jeonkak.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/jeonkak.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- its/jeonkak.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/jeonkak.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -26,10 +26,7 @@
+ ;; Boston, MA 02111-1307, USA.
+
+ ;;; Commentary:
+-;;
+-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
+-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
+-;;
++
+
+ ;;; Code:
+
+Index: its/pinyin.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/pinyin.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.1 -r1.3
+--- its/pinyin.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/pinyin.el 22 Jul 2002 13:18:56 -0000 1.3
+@@ -4,7 +4,7 @@
+
+ ;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
+
+-;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
++;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+
+ ;; Keywords: mule, multilingual, input method
+
+@@ -237,7 +237,7 @@
+
+ (dolist (ascii '(("0" . "$A#0(B") ("1" . "$A#1(B") ("2" . "$A#2(B") ("3" . "$A#3(B")
+ ("4" . "$A#4(B") ("5" . "$A#5(B") ("6" . "$A#6(B") ("7" . "$A#7(B")
+- ("8" . "$A#8(B") ("9" . "$A#9(B")
++ ("8" . "$A#8(B") ("9" . "$A#9(B")
+ (" " . "$A!!(B") ("!" . "$A#!(B") ("@" . "$A#@(B") ("#" . "$A##(B")
+ ("$" . "$A!g(B") ("%" . "$A#%(B") ("^" . "$A#^(B") ("&" . "$A#&(B")
+ ("*" . "$A#*(B") ("(" . "$A#((B") (")" . "$A#)(B")
+@@ -311,7 +311,7 @@
+
+ (dolist (ascii '(("0" . "$(G$!(B") ("1" . "$(G$"(B") ("2" . "$(G$#(B") ("3" . "$(G$$(B")
+ ("4" . "$(G$%(B") ("5" . "$(G$&(B") ("6" . "$(G$'(B") ("7" . "$(G$((B")
+- ("8" . "$(G$)(B") ("9" . "$(G$*(B")
++ ("8" . "$(G$)(B") ("9" . "$(G$*(B")
+ (" " . "$(G!!(B") ("!" . "$(G!*(B") ("@" . "$(G"i(B") ("#" . "$(G!l(B")
+ ("$" . "$(G"c(B") ("%" . "$(G"h(B") ("^" . "$(G!T(B") ("&" . "$(G!m(B")
+ ("*" . "$(G!n(B") ("(" . "$(G!>(B") (")" . "$(G!?(B")
+Index: its/quanjiao.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/quanjiao.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- its/quanjiao.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/quanjiao.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -26,10 +26,7 @@
+ ;; Boston, MA 02111-1307, USA.
+
+ ;;; Commentary:
+-;;
+-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
+-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
+-;;
++
+
+ ;;; Code:
+
+Index: its/thai.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/thai.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+diff -d -u -p -r1.1.1.1 -r1.3
+Index: its/zenkaku.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/zenkaku.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- its/zenkaku.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/zenkaku.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -26,10 +26,7 @@
+ ;; Boston, MA 02111-1307, USA.
+
+ ;;; Commentary:
+-;;
+-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
+-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
+-;;
++
+
+ ;;; Code:
+
+Index: its/zhuyin.el
+===================================================================
+RCS file: /cvs/tamago/tamago/its/zhuyin.el,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -d -u -p -r1.1.1.1 -r1.2
+--- its/zhuyin.el 27 Jan 2001 18:45:24 -0000 1.1.1.1
++++ its/zhuyin.el 27 Jan 2001 18:53:13 -0000 1.2
+@@ -142,9 +142,9 @@
+ (mapcar (lambda (s) (its-defoutput (car s) (nth 1 s)))
+ (list B P M F D T N L G K H J Q X))
+
+- (its-defrule (concat (car N) 2) (concat (nth 1 N) "(0B(B"))
+- (its-defrule (concat (car N) 3) (concat (nth 1 N) "(0C(B"))
+- (its-defrule (concat (car N) 4) (concat (nth 1 N) "(0D(B")))))
++ (its-defrule (concat (car N) "2") (concat (nth 1 N) "(0B(B"))
++ (its-defrule (concat (car N) "3") (concat (nth 1 N) "(0C(B"))
++ (its-defrule (concat (car N) "4") (concat (nth 1 N) "(0D(B")))))
+
+ (define-its-state-machine its-zhuyin-cn-map
+ "zhuyin-cn" "$AW"(BG" Chinese-GB