annotate src/mule-canna.c @ 448:3078fd1074e8 r21-2-39

Import from CVS: tag r21-2-39
author cvs
date Mon, 13 Aug 2007 11:38:25 +0200
parents abe6d1db359e
children c33ae14dd6d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1 /* CANNA interface -*- coding: euc-jp -*-
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 Copyright (C) 1995 Sun Microsystems, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 /* Synched up with: Mule 2.3. Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
25 /* Japanese comments were translated 2000-12-06 by Stephen Turnbull
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
26 <stephen@xemacs.org>. I haven't verified that the Japanese comments
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
27 were correct. YMMV, NO WARRANTY, not even the implied warranty of
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (^^;;; as the
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
29 Japanese say. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 Authors: Akira Kon (kon@uxd.fc.nec.co.jp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 Ichiro Hirakura (hirakura@uxd.fc.nec.co.jp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 Functions defined in this file are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 (canna-key-proc key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 key: single STRING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 Length of converted string if no error occurs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 Error string if error occurs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 Convert a key input to a set of strings. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 strings contain both well-formed string and a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 intermediate result to show the translation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 information to a user. converted strings are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 stored in specific variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (canna-initialize)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 List of the following things:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 - list of keys to toggle Japanese-mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 - error message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 - list of warning messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 Initialize ``canna'', which is a kana-to-kanji
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 converter for GNU Emacs. The first arg
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 specifies if inserting space character between
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 BUNSETSU when candidates are displayed. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 second arg specifies server. The third arg
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 specifies a file which will be used as a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 customization description. If nil is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 specified for each arg, the default value will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (canna-finalize)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 list of warning messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 finalize ``canna'', which is a kana-to-kanji
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 converter for GNU Emacs. This cause to write
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 miscellaneous informations to kana-to-kanji
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (canna-touroku-string string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 string:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 String to register to a dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 The same thing returns as canna-key-proc does.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 Register Kanji words into kana-to-kanji
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 conversion dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (canna-set-width width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 width:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 Column width of the place where the candidates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 of kana-to-kanji conversion will be shown.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Set status-line width information, which is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 used to display kanji candidates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (canna-change-mode num)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 num:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 The mode number of Canna.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 The same thing returns as canna-key-proc does.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 Change Japanese pre-edit mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (canna-store-yomi yomi roma)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 yomi:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 ``Yomi'' to be stored.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 roma:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 ``Romaji'' which corresponds to the ``Yomi''.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 The same thing returns as canna-key-proc does.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 Store yomi characters as a YOMI of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 kana-to-kanji conversion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (canna-do-function num ch)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 num:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 A function number to be called.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 ch:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 A character will be specified in order to feed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 the character to the function if the function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 needs a input character.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 The same thing returns as canna-key-proc does.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 Do specified function at current mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 (canna-parse string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 string:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 To be parsed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 List of warning messages.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 Parse customize string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 (canna-query-mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 RETURNS:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 A string which indicate the current mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 DESCRIPTION:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 Get current mode string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 Functions below are used for KKCP compatible library. These
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 functions provides a base kana-to-kanji conversion system for EGG.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 These functions may be used when users want to change the engine
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 from Wnn to Canna without changing user interface of Japanese input.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (canna-henkan-begin)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 (canna-henkan-next)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (canna-bunsetu-henkou)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (canna-henkan-kakutei)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 (canna-henkan-end)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (canna-henkan-quit)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 #include <config.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 #include "lisp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 #include "buffer.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 #include "file-coding.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 #ifdef CANNA2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 #define IROHA_BC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #include "canna/jrkanji.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #include "canna/RK.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 #else /* !CANNA2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #include "iroha/jrkanji.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 #include "iroha/RK.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 #endif /* !CANNA2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 extern char *jrKanjiError;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
170 /* #### is this global really necessary? */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 #define KEYTOSTRSIZE 2048
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
172 static unsigned char key_buffer[KEYTOSTRSIZE];
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 static char **warning;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 static int canna_empty_info, canna_through_info;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 static int canna_underline;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 static int canna_inhibit_hankakukana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 static Lisp_Object Vcanna_kakutei_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 static Lisp_Object Vcanna_kakutei_yomi;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 static Lisp_Object Vcanna_kakutei_romaji;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 static Lisp_Object Vcanna_henkan_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 static int canna_henkan_length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 static int canna_henkan_revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 static int canna_henkan_revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 static Lisp_Object Vcanna_ichiran_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 static int canna_ichiran_length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 static int canna_ichiran_revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 static int canna_ichiran_revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 static Lisp_Object Vcanna_mode_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 static int IRCP_context;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 static Lisp_Object storeResults (unsigned char *, int, jrKanjiStatus *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 static Lisp_Object kanjiYomiList (int, int);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
196 static Lisp_Object CANNA_mode_keys (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 static void m2c (unsigned char *, int, unsigned char *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 static Lisp_Object mule_make_string (unsigned char *, int);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 static int mule_strlen (unsigned char *, int);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 static void count_char (unsigned char *,int, int, int, int *, int *, int *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 #define make_string mule_make_string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 /* Lisp functions definition */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 DEFUN ("canna-key-proc", Fcanna_key_proc, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 Translate a key input to a set of strings. The strings contain both
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 well-formed string and intermediate result to show the translation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 information to a user. Converted strings are stored in specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 (ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 int len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 CHECK_CHAR_COERCE_INT (ch);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
220 len = jrKanjiString (0, XCHAR (ch), key_buffer, KEYTOSTRSIZE, &ks);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
221 return storeResults (key_buffer, len, &ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 storeResults (unsigned char *buf, int len, jrKanjiStatus *ks)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 Lisp_Object val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 if (len < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 { /* Error detected */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 val = make_string ((unsigned char*) jrKanjiError, strlen (jrKanjiError));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
235 /* ³ÎÄꤷ¤¿Ê¸»úÎó (the confirmed string) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 Vcanna_kakutei_string = make_string (buf, len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 val = make_int (len);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
238 /* ³ÎÄꤷ¤¿Ê¸»úÎó¤ÎÆɤߤξðÊó...
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
239 (info about the reading of the confirmed string) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 Vcanna_kakutei_yomi = Vcanna_kakutei_romaji = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 if (ks->info & KanjiYomiInfo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 unsigned char *p = buf + len + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 int yomilen = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 if (len + yomilen + 1 < KEYTOSTRSIZE)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 int yomilen2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
250 Vcanna_kakutei_yomi = make_string (p, yomilen); /* Æɤß
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
251 (reading) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 p += yomilen + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 yomilen2 = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 if (len + yomilen + yomilen2 + 2 < KEYTOSTRSIZE)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
256 Vcanna_kakutei_romaji = make_string (p, yomilen2);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
257 /* ¥í¡¼¥Þ»ú (romanization) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
263 /* ¸õÊäɽ¼¨¤Îʸ»úÎó¤Ç¤¹¡£
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
264 (string for displaying candidate translations) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 Vcanna_henkan_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 if (ks->length >= 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 Vcanna_henkan_string = make_string (ks->echoStr, ks->length);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 canna_henkan_length = ks->length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 canna_henkan_revPos = ks->revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 canna_henkan_revLen = ks->revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 if (canna_underline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 canna_henkan_length = mule_strlen (ks->echoStr,ks->length);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 canna_henkan_revPos = mule_strlen (ks->echoStr,ks->revPos);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
278 canna_henkan_revLen = mule_strlen (ks->echoStr+ks->revPos,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
279 ks->revLen);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 count_char (ks->echoStr, ks->length, ks->revPos, ks->revLen,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 &canna_henkan_length, &canna_henkan_revPos,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 &canna_henkan_revLen);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
290 /* °ìÍ÷¤Î¾ðÊó (information about the echo area menu) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 Vcanna_ichiran_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 if (ks->info & KanjiGLineInfo && ks->gline.length >= 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
294 Vcanna_ichiran_string = make_string (ks->gline.line,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
295 ks->gline.length);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 canna_ichiran_length = ks->gline.length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 canna_ichiran_revPos = ks->gline.revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 canna_ichiran_revLen = ks->gline.revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 count_char (ks->gline.line, ks->gline.length,
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
302 ks->gline.revPos, ks->gline.revLen,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
303 &canna_ichiran_length,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 &canna_ichiran_revPos, &canna_ichiran_revLen);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
308 /* ¥â¡¼¥É¤Î¾ðÊó (mode information) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 Vcanna_mode_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 if (ks->info & KanjiModeInfo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 Vcanna_mode_string = make_string (ks->mode, strlen (ks->mode));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
315 /* ¤½¤Î¾¤Î¾ðÊó (other information) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 canna_empty_info = (ks->info & KanjiEmptyInfo) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 canna_through_info = (ks->info & KanjiThroughInfo) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 DEFUN ("canna-set-bunsetsu-kugiri", Fcanna_set_bunsetsu, 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 This function sets the clause separator.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 If non-nil value is specified, the white space separator will be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 No separator will be used otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
330 int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 kugiri = NILP (num) ? 0 : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 /* For whatever reason, calling Fding directly from libCanna loses */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
340 static void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
341 call_Fding (void)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 Fding (Qnil, Qnil, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 DEFUN ("canna-initialize", Fcanna_initialize, 0, 3, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 Initialize ``canna'', which is a kana-to-kanji converter for GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 The first arg specifies if inserting space character between BUNSETSU when
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 candidates are displayed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 The second arg specifies server.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 The third arg specifies a file which will be used as a customization
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 description.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 If nil is specified for each arg, the default value will be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 (num, server, rcfile))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 int res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 unsigned char **p, **q;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
361 int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 IRCP_context = -1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 if (NILP (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 kugiri = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 kugiri = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 kugiri = (kugiri == 1) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 if (NILP (server))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 jrKanjiControl (0, KC_SETSERVERNAME, (char *) 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 char servername[256];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 CHECK_STRING (server);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 strncpy (servername, XSTRING_DATA (server), XSTRING_LENGTH (server));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 servername[XSTRING_LENGTH (server)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 jrKanjiControl (0, KC_SETSERVERNAME, servername);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 if (NILP (rcfile))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 jrKanjiControl (0, KC_SETINITFILENAME, (char *) 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 char rcname[256];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 CHECK_STRING (rcfile);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 strncpy (rcname, XSTRING_DATA (rcfile), XSTRING_LENGTH (rcfile));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 rcname[XSTRING_LENGTH (rcfile)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 jrKanjiControl (0, KC_SETINITFILENAME, rcname);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 warning = (char **) 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 #ifdef nec_ews_svr4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 stop_polling ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 #endif /* nec_ews_svr4 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 res = jrKanjiControl (0, KC_INITIALIZE, (char *)&warning);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 #ifdef nec_ews_svr4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 start_polling ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 #endif /* nec_ews_svr4 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 if (warning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 for (p = q = (unsigned char **) warning ; *q ; q++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 ;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 while (p < q)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 q--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 val = Fcons (make_string (*q, strlen (*q)), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 val = Fcons (val, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 if (res == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 val = Fcons (make_string ((unsigned char*) jrKanjiError,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 strlen (jrKanjiError)), val);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
429 /* ¥¤¥Ë¥·¥ã¥é¥¤¥º¤Ç¼ºÇÔ¤·¤¿¾ì¹ç¡£ (on initialization failure) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 return Fcons (Qnil, val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
434 extern void (*jrBeepFunc) (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 jrBeepFunc = call_Fding;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 #ifdef KC_SETAPPNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 wcKanjiControl (0, KC_SETAPPNAME, "nemacs");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 wcKanjiControl (0, KC_SETAPPNAME, "mule");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 #endif /* KC_SETAPPNAME */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 jrKanjiControl (0, KC_SETWIDTH, (char *) 78);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 #else
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
451 /* mule ¤À¤Ã¤¿¤éȾ³Ñ¥«¥¿¥«¥Ê¤â»È¤¨¤ë
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
452 (Mule can use half-width katakana) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 if (canna_inhibit_hankakukana)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 #endif
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
456 jrKanjiControl (0, KC_YOMIINFO, (char *) 2); /* ¢¨£²: ¥í¡¼¥Þ»ú¤Þ¤ÇÊÖ¤¹
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
457 (*2: return to
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
458 romanized form) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 val = Fcons (Qnil, val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 return Fcons (CANNA_mode_keys (), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 DEFUN ("canna-finalize", Fcanna_finalize, 0, 0, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 finalize ``canna'', which is a kana-to-kanji converter for GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 This cause to write miscellaneous informations to kana-to-kanji dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 unsigned char **p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 jrKanjiControl (0, KC_FINALIZE, (char *)&warning);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 if (warning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 for (p = (unsigned char**) warning ; *p ; p++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 val = Fcons (make_string (*p, strlen (*p)), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 val = Fcons (val, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 IRCP_context = -1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 DEFUN ("canna-touroku-string", Fcanna_touroku_string, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 Register Kanji words into kana-to-kanji conversion dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 (str))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 int len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 unsigned char cbuf[4096];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 CHECK_STRING (str);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
502 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 ks.echoStr = XSTRING_DATA (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 ks.length = XSTRING_LENGTH (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 ks.echoStr = cbuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 ks.length = strlen (cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 len = jrKanjiControl (0, KC_DEFINEKANJI, (char *)&ksv);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
514 val = storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 DEFUN ("canna-set-width", Fcanna_set_width, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 Set status-line width information, which is used to display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 kanji candidates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 jrKanjiControl (0, KC_SETWIDTH, (char *) XINT (num));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 DEFUN ("canna-change-mode", Fcanna_change_mode, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 Change Japanese pre-edit mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
541 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 jrKanjiControl (0, KC_CHANGEMODE, (char *)&ksv);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
546 val = storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
550 static Lisp_Object
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 CANNA_mode_keys (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553 #define CANNAWORKBUFSIZE 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 char xxx[CANNAWORKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 int i, n;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 n = jrKanjiControl (0, KC_MODEKEYS, xxx);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 for (i = n ; i > 0 ;)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562 --i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563 /* !!#### something fucked here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 val = Fcons (make_char ((int)(0xFF & (unsigned char) xxx[i])), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
568
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569 DEFUN ("canna-store-yomi", Fcanna_store_yomi, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 Store yomi characters as a YOMI of kana-to-kanji conversion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 (yomi, roma))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
575 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
577 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
579 strncpy (key_buffer, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 ks.length = XSTRING_LENGTH (yomi);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
581 key_buffer[ks.length] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
583 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), key_buffer);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
584 ks.length = strlen (key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 if (NILP (roma))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589 ks.mode = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 CHECK_STRING (roma);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
596 strncpy (key_buffer + XSTRING_LENGTH (yomi) + 1, XSTRING_DATA (roma),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 XSTRING_LENGTH (roma));
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
598 key_buffer[XSTRING_LENGTH (yomi) + 1 + XSTRING_LENGTH (roma)] = '\0';
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
599 ks.mode = (unsigned char *)(key_buffer + XSTRING_LENGTH (yomi) + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
601 ks.mode = (unsigned char *)(key_buffer + ks.length + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 m2c (XSTRING_DATA (roma), XSTRING_LENGTH (roma), ks.mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
606 ks.echoStr = (unsigned char *) key_buffer;
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
607 ksv.buffer = (unsigned char *) key_buffer; /* ÊÖÃÍÍÑ (return value) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611 jrKanjiControl (0, KC_STOREYOMI, (char *)&ksv);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
613 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 DEFUN ("canna-do-function", Fcanna_do_function, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 Do specified function at current mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 (num, ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
627 if (NILP (ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
629 *key_buffer = '@';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 CHECK_CHAR (ch);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
634 *key_buffer = XCHAR (ch);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
637 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 jrKanjiControl (0, KC_DO, (char *) &ksv);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
642 val = storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 DEFUN ("canna-parse", Fcanna_parse, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 Parse customize string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649 (str))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 unsigned char **p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653 int n;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
655 CHECK_STRING (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
658 strncpy (key_buffer, XSTRING_DATA (str), XSTRING_LENGTH (str));
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
659 key_buffer[XSTRING_LENGTH (str)] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
660 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
661 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662 #endif /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
663 p = (unsigned char**) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
664 n = jrKanjiControl (0, KC_PARSE, (char *) &p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
665 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666 while (n > 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 n--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 val = Fcons (make_string (p[n], strlen (p[n])), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
670 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
671 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 DEFUN ("canna-query-mode", Fcanna_query_mode, 0, 0, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 Get current mode string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
677 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
678 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 unsigned char buf[256];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 jrKanjiControl (0, KC_QUERYMODE, buf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 return make_string (buf, strlen (buf));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
685 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
686 * Functions following this line are for KKCP interface compatible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 * library. These functions may be used by MILK system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 #define RKBUFSIZE 1024
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692 static unsigned char yomibuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 static short kugiri[RKBUFSIZE / 2];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 confirmContext (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698 if (IRCP_context < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
700 int context;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
701
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
702 if ((context = jrKanjiControl (0, KC_GETCONTEXT, (char *) 0)) == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
703 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
704 return 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 IRCP_context = context;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
707 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
708 return 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 byteLen (int bun, int len)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
714 int i = 0, offset = 0, ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716 if (0 <= bun && bun < RKBUFSIZE)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
717 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 offset = kugiri[bun];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
719 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
720
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
721 while (len-- > 0 && (ch = (int) yomibuf[offset + i]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 i++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724 if (ch & 0x80)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
725 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 i++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
728 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729 return i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
730 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
731
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
732 DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
733 Return the result of kana-to-kanji conversion.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
734 Clause separator is set.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
736 (yomi))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
737 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 int nbun;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746 strncpy (yomibuf, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747 yomibuf[XSTRING_LENGTH (yomi)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 nbun = RkBgnBun (IRCP_context, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
751 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), yomibuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
752 nbun = RkBgnBun (IRCP_context, (char *) yomibuf, strlen (yomibuf),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
753 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
754 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
755
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756 return kanjiYomiList (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
757 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
759 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
760 kanjiYomiList (int context, int nbun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
761 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
762 Lisp_Object val, res = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
763 unsigned char RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
764 int len, i, total;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
765
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
766 for (i = nbun ; i > 0 ; )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
767 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
768 i--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
769 RkGoTo (context, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
770 len = RkGetKanji (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
771 val = make_string (RkBuf, len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
772 len = RkGetYomi (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
773 res = Fcons (Fcons (val, make_string (RkBuf, len)), res);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
774 if (i < RKBUFSIZE / 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
775 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
776 kugiri[i] = len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
777 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
778 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
779 for (i = 0, total = 0 ; i < nbun ; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
780 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
781 int temp = kugiri[i];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
782 kugiri[i] = total;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
783 total += temp;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
784 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
786 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
787
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
788 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
789 Return the list of candidates.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
790 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
791 (bunsetsu))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
792 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
793 int i, slen, len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
794 unsigned char *p, RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
795 Lisp_Object res = Qnil, endp;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
796
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
797 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
798 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
799 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
800 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
801 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 RkGoTo (IRCP_context, XINT (bunsetsu));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
803 len = RkGetKanjiList (IRCP_context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
804 p = RkBuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
805 for (i = 0 ; i < len ; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807 slen = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
808 if (NILP(res))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810 endp = res = Fcons (make_string (p, slen), Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
811 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
812 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
813 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
814 endp = XCDR (res) = Fcons (make_string (p, slen), Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
815 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
816 p += slen + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
817 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
818 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
819 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
820
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
821 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
822 Specify the length of a clause.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
823 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
824 (bunsetsu, bunlen))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
825 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 int nbun, len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
827
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
828 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
829 CHECK_INT (bunlen);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
830
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
831 nbun = XINT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
832 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
833 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
834 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
835 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
836 RkGoTo (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837 len = byteLen (nbun, XINT (bunlen));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
839 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
841 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
842 Select a candidate.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844 (bun, kouho))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846 int nbun, nkouho;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
848 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
849 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
852 nbun = XINT(bun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
853 RkGoTo (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
854
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
855 nkouho = XINT(kouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856 RkXfer (IRCP_context, nkouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
858 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
860 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
861 End conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
863 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
864 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
865 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
866 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
867 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
868 }
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
869 RkEndBun (IRCP_context, 1); /* ³Ø½¬¤Ï¤¤¤Ä¤Ç¤â¹Ô¤Ã¤ÆÎɤ¤¤â¤Î¤Ê¤Î¤«¡©
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
870 (is it OK to invoke learning function
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
871 at arbitrary times?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
872 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
873 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
875 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
876 Quit conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
877 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
878 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
879 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
880 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
881 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
883 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
884 RkEndBun (IRCP_context, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
885 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
886 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
887
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
888 /* variables below this line is constants of Canna */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
889
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
890 static int canna_mode_AlphaMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
891 static int canna_mode_EmptyMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
892 static int canna_mode_KigoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
893 static int canna_mode_YomiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
894 static int canna_mode_JishuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
895 static int canna_mode_TankouhoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
896 static int canna_mode_IchiranMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
897 static int canna_mode_YesNoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
898 static int canna_mode_OnOffMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
899 #ifdef CANNA_MODE_AdjustBunsetsuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
900 static int canna_mode_AdjustBunsetsuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
901 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
902 #ifdef CANNA_MODE_ChikujiYomiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
903 static int canna_mode_ChikujiYomiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
904 static int canna_mode_ChikujiTanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
906
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
907 static int canna_mode_HenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
908 #ifdef CANNA_MODE_HenkanNyuryokuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
909 static int canna_mode_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
910 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
911 #ifdef CANNA_MODE_ZenHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
912 static int canna_mode_ZenHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
913 #ifdef CANNA_MODE_HanHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
914 static int canna_mode_HanHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
915 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
916 static int canna_mode_ZenKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
917 static int canna_mode_HanKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
918 static int canna_mode_ZenAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
919 static int canna_mode_HanAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
920 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
921 static int canna_mode_ZenHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
922 #ifdef CANNA_MODE_HanHiraKakuteiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
923 static int canna_mode_HanHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
924 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
925 static int canna_mode_ZenKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
926 static int canna_mode_HanKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
927 static int canna_mode_ZenAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
928 static int canna_mode_HanAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
929 static int canna_mode_HexMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
930 static int canna_mode_BushuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
931 static int canna_mode_ExtendMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
932 static int canna_mode_RussianMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
933 static int canna_mode_GreekMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
934 static int canna_mode_LineMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
935 static int canna_mode_ChangingServerMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
936 static int canna_mode_HenkanMethodMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
937 static int canna_mode_DeleteDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
938 static int canna_mode_TourokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
939 static int canna_mode_TourokuEmptyMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
940 static int canna_mode_TourokuHinshiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
941 static int canna_mode_TourokuDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
942 static int canna_mode_QuotedInsertMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
943 static int canna_mode_BubunMuhenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
944 static int canna_mode_MountDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
945
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
946 static int canna_fn_SelfInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
947 static int canna_fn_FunctionalInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
948 static int canna_fn_QuotedInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
949 static int canna_fn_JapaneseMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
950 static int canna_fn_AlphaMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
951 static int canna_fn_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
952 static int canna_fn_Forward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
953 static int canna_fn_Backward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
954 static int canna_fn_Next;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
955 static int canna_fn_Prev;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
956 static int canna_fn_BeginningOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
957 static int canna_fn_EndOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
958 static int canna_fn_DeleteNext;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
959 static int canna_fn_DeletePrevious;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
960 static int canna_fn_KillToEndOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
961 static int canna_fn_Henkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
962 static int canna_fn_Kakutei;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
963 static int canna_fn_Extend;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
964 static int canna_fn_Shrink;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
965 #ifdef CANNA_FN_AdjustBunsetsu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
966 static int canna_fn_AdjustBunsetsu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
967 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
968 static int canna_fn_Quit;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
969 static int canna_fn_ConvertAsHex;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
970 static int canna_fn_ConvertAsBushu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
971 static int canna_fn_KouhoIchiran;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
972 static int canna_fn_BubunMuhenkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
973 static int canna_fn_Zenkaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
974 static int canna_fn_Hankaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
975 static int canna_fn_ToUpper;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
976 static int canna_fn_Capitalize;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
977 static int canna_fn_ToLower;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
978 static int canna_fn_Hiragana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
979 static int canna_fn_Katakana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
980 static int canna_fn_Romaji;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
981 #ifdef CANNA_FN_BaseHiragana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
982 static int canna_fn_BaseHiragana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
983 static int canna_fn_BaseKatakana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
984 static int canna_fn_BaseEisu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
985 static int canna_fn_BaseZenkaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
986 static int canna_fn_BaseHankaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
987 static int canna_fn_BaseKana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
988 static int canna_fn_BaseKakutei;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
989 static int canna_fn_BaseHenkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
990 static int canna_fn_BaseHiraKataToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
991 static int canna_fn_BaseZenHanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
992 static int canna_fn_BaseKanaEisuToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
993 static int canna_fn_BaseKakuteiHenkanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
994 static int canna_fn_BaseRotateForward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
995 static int canna_fn_BaseRotateBackward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
996 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
997 static int canna_fn_ExtendMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
998 static int canna_fn_Touroku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
999 static int canna_fn_HexMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1000 static int canna_fn_BushuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1001 static int canna_fn_KigouMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1002 #ifdef CANNA_FN_Mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1003 static int canna_fn_Mark;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1004 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1005 #ifdef CANNA_FN_TemporalMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1006 static int canna_fn_TemporalMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1007 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1008
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1009 static int canna_key_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1010 static int canna_key_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1011 static int canna_key_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1012 static int canna_key_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1013 static int canna_key_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1014 static int canna_key_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1015 static int canna_key_Insert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1016 static int canna_key_Rollup;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1017 static int canna_key_Rolldown;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1018 static int canna_key_Home;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1019 static int canna_key_Help;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1020 static int canna_key_KP_Key;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1021 static int canna_key_Shift_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1022 static int canna_key_Shift_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1023 static int canna_key_Shift_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1024 static int canna_key_Shift_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1025 static int canna_key_Shift_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1026 static int canna_key_Shift_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1027 static int canna_key_Cntrl_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1028 static int canna_key_Cntrl_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1029 static int canna_key_Cntrl_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1030 static int canna_key_Cntrl_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1031 static int canna_key_Cntrl_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 static int canna_key_Cntrl_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1033
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1034 Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 1996/6/7 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 syms_of_mule_canna (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 DEFSUBR (Fcanna_key_proc);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041 DEFSUBR (Fcanna_initialize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 DEFSUBR (Fcanna_finalize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1043 DEFSUBR (Fcanna_touroku_string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 DEFSUBR (Fcanna_set_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045 DEFSUBR (Fcanna_change_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046 DEFSUBR (Fcanna_store_yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047 DEFSUBR (Fcanna_do_function);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1048 DEFSUBR (Fcanna_parse);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1049 DEFSUBR (Fcanna_query_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1050 DEFSUBR (Fcanna_set_bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1051
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1052 DEFSUBR (Fcanna_henkan_begin);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1053 DEFSUBR (Fcanna_henkan_next);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1054 DEFSUBR (Fcanna_bunsetu_henkou);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1055 DEFSUBR (Fcanna_henkan_kakutei);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1056 DEFSUBR (Fcanna_henkan_end);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1057 DEFSUBR (Fcanna_henkan_quit);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1058 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1059
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1060 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1061 vars_of_mule_canna (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1062 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1063 DEFVAR_LISP ("CANNA", &VCANNA); /* hir@nec, 1992.5.21 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1064 VCANNA = Qt; /* hir@nec, 1992.5.21 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1065
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1066 DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1067
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1068 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1069 Vcanna_kakutei_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1070
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1071 DEFVAR_LISP ("canna-kakutei-yomi", &Vcanna_kakutei_yomi /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1072
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1073 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1074 Vcanna_kakutei_yomi = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1075
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1076 DEFVAR_LISP ("canna-kakutei-romaji", &Vcanna_kakutei_romaji /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1077
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1078 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1079 Vcanna_kakutei_romaji = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1080
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1081 DEFVAR_LISP ("canna-henkan-string", &Vcanna_henkan_string /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1082
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1083 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1084 Vcanna_henkan_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1085
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1086 DEFVAR_INT ("canna-henkan-length", &canna_henkan_length /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1087
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1088 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1089 canna_henkan_length = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1090
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1091 DEFVAR_INT ("canna-henkan-revpos", &canna_henkan_revPos /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1092
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1093 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1094 canna_henkan_revPos = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1095
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1096 DEFVAR_INT ("canna-henkan-revlen", &canna_henkan_revLen /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1097
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1098 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1099 canna_henkan_revLen = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1101 DEFVAR_LISP ("canna-ichiran-string", &Vcanna_ichiran_string /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1103 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1104 Vcanna_ichiran_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1106 DEFVAR_INT ("canna-ichiran-length", &canna_ichiran_length /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1108 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1109 canna_ichiran_length = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1111 DEFVAR_INT ("canna-ichiran-revpos", &canna_ichiran_revPos /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1113 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1114 canna_ichiran_revPos = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1116 DEFVAR_INT ("canna-ichiran-revlen", &canna_ichiran_revLen /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1118 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1119 canna_ichiran_revLen = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1121 DEFVAR_LISP ("canna-mode-string", &Vcanna_mode_string /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1123 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1124 Vcanna_mode_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1126 DEFVAR_BOOL ("canna-empty-info", &canna_empty_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1127 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1128 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1129 canna_empty_info = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1131 DEFVAR_BOOL ("canna-through-info", &canna_through_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1132 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1133 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1134 canna_through_info = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1136 DEFVAR_BOOL ("canna-underline", &canna_underline /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1137 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1138 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1139 canna_underline = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1141 DEFVAR_BOOL ("canna-inhibit-hankakukana", &canna_inhibit_hankakukana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1142 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1143 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1144 canna_inhibit_hankakukana = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1145
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1146 DEFVAR_INT ("canna-mode-alpha-mode", &canna_mode_AlphaMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1148 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1149 canna_mode_AlphaMode = IROHA_MODE_AlphaMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1151 DEFVAR_INT ("canna-mode-empty-mode", &canna_mode_EmptyMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1153 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1154 canna_mode_EmptyMode = IROHA_MODE_EmptyMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1156 DEFVAR_INT ("canna-mode-kigo-mode", &canna_mode_KigoMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1158 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1159 canna_mode_KigoMode = IROHA_MODE_KigoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1161 DEFVAR_INT ("canna-mode-yomi-mode", &canna_mode_YomiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1163 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1164 canna_mode_YomiMode = IROHA_MODE_YomiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1166 DEFVAR_INT ("canna-mode-jishu-mode", &canna_mode_JishuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1168 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1169 canna_mode_JishuMode = IROHA_MODE_JishuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1171 DEFVAR_INT ("canna-mode-tankouho-mode", &canna_mode_TankouhoMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1173 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1174 canna_mode_TankouhoMode = IROHA_MODE_TankouhoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1176 DEFVAR_INT ("canna-mode-ichiran-mode", &canna_mode_IchiranMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1178 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1179 canna_mode_IchiranMode = IROHA_MODE_IchiranMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1181 DEFVAR_INT ("canna-mode-yes-no-mode", &canna_mode_YesNoMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1183 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1184 canna_mode_YesNoMode = IROHA_MODE_YesNoMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1185
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1186 DEFVAR_INT ("canna-mode-on-off-mode", &canna_mode_OnOffMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1188 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1189 canna_mode_OnOffMode = IROHA_MODE_OnOffMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1191 #ifdef CANNA_MODE_AdjustBunsetsuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1192 DEFVAR_INT ("canna-mode-adjust-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1193 &canna_mode_AdjustBunsetsuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1195 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1196 canna_mode_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1197 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1198 #ifdef CANNA_MODE_ChikujiYomiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1199 DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &canna_mode_ChikujiYomiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1201 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1202 canna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1204 DEFVAR_INT ("canna-mode-chikuji-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1205 &canna_mode_ChikujiTanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1207 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1208 canna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1209 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1210
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1211 DEFVAR_INT ("canna-mode-henkan-mode", &canna_mode_HenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1212
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1213 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1214 canna_mode_HenkanMode = IROHA_MODE_HenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1215
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1216 #ifdef CANNA_MODE_HenkanNyuryokuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1217 DEFVAR_INT ("canna-mode-henkan-nyuuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1218 &canna_mode_HenkanNyuryokuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1219
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1220 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1221 canna_mode_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1222 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1223 #ifdef CANNA_MODE_ZenHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1224 DEFVAR_INT ("canna-mode-zen-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1225 &canna_mode_ZenHiraHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1226
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1227 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1228 canna_mode_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1229 #ifdef CANNA_MODE_HanHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1230 DEFVAR_INT ("canna-mode-han-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1231 &canna_mode_HanHiraHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1233 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1234 canna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1235 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1236 DEFVAR_INT ("canna-mode-zen-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1237 &canna_mode_ZenKataHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1239 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1240 canna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1242 DEFVAR_INT ("canna-mode-han-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1243 &canna_mode_HanKataHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1245 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1246 canna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1247
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1248 DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1249 &canna_mode_ZenAlphaHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1251 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1252 canna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1254 DEFVAR_INT ("canna-mode-han-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1255 &canna_mode_HanAlphaHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1256
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1257 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1258 canna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1259 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1260 DEFVAR_INT ("canna-mode-zen-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1261 &canna_mode_ZenHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1262
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1263 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1264 canna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1265 #ifdef CANNA_MODE_HanHiraKakuteiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1266 DEFVAR_INT ("canna-mode-han-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1267 &canna_mode_HanHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1269 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1270 canna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1271 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1272 DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1273 &canna_mode_ZenKataKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1275 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1276 canna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1278 DEFVAR_INT ("canna-mode-han-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1279 &canna_mode_HanKataKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1281 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1282 canna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1284 DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1285 &canna_mode_ZenAlphaKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1286
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1287 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1288 canna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1290 DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1291 &canna_mode_HanAlphaKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1292
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1293 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1294 canna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1295
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1296 DEFVAR_INT ("canna-mode-hex-mode", &canna_mode_HexMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1297
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1298 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1299 canna_mode_HexMode = IROHA_MODE_HexMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1301 DEFVAR_INT ("canna-mode-bushu-mode", &canna_mode_BushuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1303 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1304 canna_mode_BushuMode = IROHA_MODE_BushuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1305
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1306 DEFVAR_INT ("canna-mode-extend-mode", &canna_mode_ExtendMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1308 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1309 canna_mode_ExtendMode = IROHA_MODE_ExtendMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1310
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1311 DEFVAR_INT ("canna-mode-russian-mode", &canna_mode_RussianMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1312
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1313 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1314 canna_mode_RussianMode = IROHA_MODE_RussianMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1316 DEFVAR_INT ("canna-mode-greek-mode", &canna_mode_GreekMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1317
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1318 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1319 canna_mode_GreekMode = IROHA_MODE_GreekMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1320
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1321 DEFVAR_INT ("canna-mode-line-mode", &canna_mode_LineMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1323 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1324 canna_mode_LineMode = IROHA_MODE_LineMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1326 DEFVAR_INT ("canna-mode-changing-server-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1327 &canna_mode_ChangingServerMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1329 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1330 canna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1331
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1332 DEFVAR_INT ("canna-mode-henkan-method-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1333 &canna_mode_HenkanMethodMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1334
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1335 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1336 canna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1337
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1338 DEFVAR_INT ("canna-mode-delete-dic-mode", &canna_mode_DeleteDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1339
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1340 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1341 canna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1342
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1343 DEFVAR_INT ("canna-mode-touroku-mode", &canna_mode_TourokuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1345 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1346 canna_mode_TourokuMode = IROHA_MODE_TourokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1348 DEFVAR_INT ("canna-mode-touroku-empty-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1349 &canna_mode_TourokuEmptyMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1350
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1351 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1352 canna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1353
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1354 DEFVAR_INT ("canna-mode-touroku-hinshi-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1355 &canna_mode_TourokuHinshiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1356
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1357 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1358 canna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1359
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1360 DEFVAR_INT ("canna-mode-touroku-dic-mode", &canna_mode_TourokuDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1362 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1363 canna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1364
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1365 DEFVAR_INT ("canna-mode-quoted-insert-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1366 &canna_mode_QuotedInsertMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1367
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1368 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1369 canna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1370
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1371 DEFVAR_INT ("canna-mode-bubun-muhenkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1372 &canna_mode_BubunMuhenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1373
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1374 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1375 canna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1376
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1377 DEFVAR_INT ("canna-mode-mount-dic-mode", &canna_mode_MountDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1378
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1379 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1380 canna_mode_MountDicMode = IROHA_MODE_MountDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1381
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1382 DEFVAR_INT ("canna-func-self-insert", &canna_fn_SelfInsert /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1384 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1385 canna_fn_SelfInsert = IROHA_FN_SelfInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1386
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1387 DEFVAR_INT ("canna-func-functional-insert", &canna_fn_FunctionalInsert /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1388
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1389 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1390 canna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1391
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1392 DEFVAR_INT ("canna-func-quoted-insert", &canna_fn_QuotedInsert /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1393
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1394 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1395 canna_fn_QuotedInsert = IROHA_FN_QuotedInsert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1396
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1397 DEFVAR_INT ("canna-func-japanese-mode", &canna_fn_JapaneseMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1398
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1399 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1400 canna_fn_JapaneseMode = IROHA_FN_JapaneseMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1401
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1402 DEFVAR_INT ("canna-func-alpha-mode", &canna_fn_AlphaMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1403
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1404 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1405 canna_fn_AlphaMode = IROHA_FN_AlphaMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1406
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1407 DEFVAR_INT ("canna-func-henkan-nyuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1408 &canna_fn_HenkanNyuryokuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1409
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1410 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1411 canna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1412
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1413 DEFVAR_INT ("canna-func-forward", &canna_fn_Forward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1414
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1415 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1416 canna_fn_Forward = IROHA_FN_Forward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1417
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1418 DEFVAR_INT ("canna-func-backward", &canna_fn_Backward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1419
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1420 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1421 canna_fn_Backward = IROHA_FN_Backward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1422
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1423 DEFVAR_INT ("canna-func-next", &canna_fn_Next /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1424
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1425 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1426 canna_fn_Next = IROHA_FN_Next;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1427
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1428 DEFVAR_INT ("canna-func-previous", &canna_fn_Prev /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1429
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1430 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1431 canna_fn_Prev = IROHA_FN_Prev;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1432
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1433 DEFVAR_INT ("canna-func-beginning-of-line", &canna_fn_BeginningOfLine /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1434
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1435 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1436 canna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1437
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1438 DEFVAR_INT ("canna-func-end-of-line", &canna_fn_EndOfLine /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1439
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1440 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1441 canna_fn_EndOfLine = IROHA_FN_EndOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1442
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1443 DEFVAR_INT ("canna-func-delete-next", &canna_fn_DeleteNext /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1444
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1445 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1446 canna_fn_DeleteNext = IROHA_FN_DeleteNext;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1447
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1448 DEFVAR_INT ("canna-func-delete_previous", &canna_fn_DeletePrevious /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1449
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1450 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1451 canna_fn_DeletePrevious = IROHA_FN_DeletePrevious;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1452
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1453 DEFVAR_INT ("canna-func-kill-to-end-of-line", &canna_fn_KillToEndOfLine /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1454
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1455 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1456 canna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1457
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1458 DEFVAR_INT ("canna-func-henkan", &canna_fn_Henkan /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1459
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1460 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1461 canna_fn_Henkan = IROHA_FN_Henkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1462
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1463 DEFVAR_INT ("canna-func-kakutei", &canna_fn_Kakutei /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1464
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1465 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1466 canna_fn_Kakutei = IROHA_FN_Kakutei;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1467
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1468 DEFVAR_INT ("canna-func-extend", &canna_fn_Extend /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1469
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1470 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1471 canna_fn_Extend = IROHA_FN_Extend;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1472
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1473 DEFVAR_INT ("canna-func-shrink", &canna_fn_Shrink /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1474
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1475 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1476 canna_fn_Shrink = IROHA_FN_Shrink;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1477
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1478 #ifdef CANNA_FN_AdjustBunsetsu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1479 DEFVAR_INT ("canna-func-adjust-bunsetsu", &canna_fn_AdjustBunsetsu /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1480
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1481 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1482 canna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1483 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1484 DEFVAR_INT ("canna-func-quit", &canna_fn_Quit /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1485
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1486 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1487 canna_fn_Quit = IROHA_FN_Quit;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1488
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1489 DEFVAR_INT ("canna-func-convert-as-hex", &canna_fn_ConvertAsHex /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1490
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1491 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1492 canna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1493
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1494 DEFVAR_INT ("canna-func-convert-as-bushu", &canna_fn_ConvertAsBushu /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1495
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1496 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1497 canna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1498
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1499 DEFVAR_INT ("canna-func-kouho-ichiran", &canna_fn_KouhoIchiran /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1500
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1501 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1502 canna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1503
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1504 DEFVAR_INT ("canna-func-bubun-muhenkan", &canna_fn_BubunMuhenkan /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1505
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1506 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1507 canna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1508
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1509 DEFVAR_INT ("canna-func-zenkaku", &canna_fn_Zenkaku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1510
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1511 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1512 canna_fn_Zenkaku = IROHA_FN_Zenkaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1513
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1514 DEFVAR_INT ("canna-func-hankaku", &canna_fn_Hankaku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1515
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1516 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1517 canna_fn_Hankaku = IROHA_FN_Hankaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1518
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1519 DEFVAR_INT ("canna-func-to-upper", &canna_fn_ToUpper /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1520
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1521 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1522 canna_fn_ToUpper = IROHA_FN_ToUpper;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1523
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1524 DEFVAR_INT ("canna-func-capitalize", &canna_fn_Capitalize /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1525
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1526 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1527 canna_fn_Capitalize = IROHA_FN_Capitalize;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1528
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1529 DEFVAR_INT ("canna-func-to-lower", &canna_fn_ToLower /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1530
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1531 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1532 canna_fn_ToLower = IROHA_FN_ToLower;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1533
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1534 DEFVAR_INT ("canna-func-hiragana", &canna_fn_Hiragana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1535
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1536 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1537 canna_fn_Hiragana = IROHA_FN_Hiragana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1538
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1539 DEFVAR_INT ("canna-func-katakana", &canna_fn_Katakana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1540
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1541 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1542 canna_fn_Katakana = IROHA_FN_Katakana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1543
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1544 DEFVAR_INT ("canna-func-romaji", &canna_fn_Romaji /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1545
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1546 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1547 canna_fn_Romaji = IROHA_FN_Romaji;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1549 #ifdef CANNA_FN_BaseHiragana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1550 DEFVAR_INT ("canna-func-base-hiragana", &canna_fn_BaseHiragana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1551
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1552 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1553 canna_fn_BaseHiragana = CANNA_FN_BaseHiragana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1554
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1555 DEFVAR_INT ("canna-func-base-katakana", &canna_fn_BaseKatakana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1556
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1557 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1558 canna_fn_BaseKatakana = CANNA_FN_BaseKatakana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1559
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1560 DEFVAR_INT ("canna-func-base-eisu", &canna_fn_BaseEisu /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1561
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1562 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1563 canna_fn_BaseEisu = CANNA_FN_BaseEisu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1564
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1565 DEFVAR_INT ("canna-func-base-zenkaku", &canna_fn_BaseZenkaku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1566
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1567 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1568 canna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1569
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1570 DEFVAR_INT ("canna-func-base-hankaku", &canna_fn_BaseHankaku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1571
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1572 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1573 canna_fn_BaseHankaku = CANNA_FN_BaseHankaku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1574
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1575 DEFVAR_INT ("canna-func-base-kana", &canna_fn_BaseKana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1576
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1577 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1578 canna_fn_BaseKana = CANNA_FN_BaseKana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1579
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1580 DEFVAR_INT ("canna-func-base-kakutei", &canna_fn_BaseKakutei /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1581
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1582 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1583 canna_fn_BaseKakutei = CANNA_FN_BaseKakutei;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1584
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1585 DEFVAR_INT ("canna-func-base-henkan", &canna_fn_BaseHenkan /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1587 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1588 canna_fn_BaseHenkan = CANNA_FN_BaseHenkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1589
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1590 DEFVAR_INT ("canna-func-base-hiragana-katakana-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1591 &canna_fn_BaseHiraKataToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1593 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1594 canna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1595
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1596 DEFVAR_INT ("canna-func-base-zenkaku-hankaku-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1597 &canna_fn_BaseZenHanToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1598
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1599 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1600 canna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1601
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1602 DEFVAR_INT ("canna-func-base-kana-eisu-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1603 &canna_fn_BaseKanaEisuToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1604
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1605 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1606 canna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1607
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1608 DEFVAR_INT ("canna-func-base-kakutei-henkan-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1609 &canna_fn_BaseKakuteiHenkanToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1610
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1611 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1612 canna_fn_BaseKakuteiHenkanToggle = CANNA_FN_BaseKakuteiHenkanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1613
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1614 DEFVAR_INT ("canna-func-base-rotate-forward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1615 &canna_fn_BaseRotateForward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1616
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1617 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1618 canna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1619
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1620 DEFVAR_INT ("canna-func-base-rotate-backward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1621 &canna_fn_BaseRotateBackward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1622
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1623 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1624 canna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1625
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1626 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1627 DEFVAR_INT ("canna-func-extend-mode", &canna_fn_ExtendMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1628
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1629 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1630 canna_fn_ExtendMode = IROHA_FN_ExtendMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1631
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1632 DEFVAR_INT ("canna-func-touroku", &canna_fn_Touroku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1633
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1634 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1635 canna_fn_Touroku = IROHA_FN_Touroku;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1636
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1637 DEFVAR_INT ("canna-func-hex-mode", &canna_fn_HexMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1638
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1639 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1640 canna_fn_HexMode = IROHA_FN_HexMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1641
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1642 DEFVAR_INT ("canna-func-bushu-mode", &canna_fn_BushuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1643
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1644 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1645 canna_fn_BushuMode = IROHA_FN_BushuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1646
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1647 DEFVAR_INT ("canna-func-kigo-mode", &canna_fn_KigouMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1648
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1649 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1650 canna_fn_KigouMode = IROHA_FN_KigouMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1651
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1652 #ifdef CANNA_FN_Mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1653 DEFVAR_INT ("canna-func-mark", &canna_fn_Mark /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1654
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1655 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1656 canna_fn_Mark = CANNA_FN_Mark;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1657 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1658 #ifdef CANNA_FN_TemporalMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1659 DEFVAR_INT ("canna-func-temporal-mode", &canna_fn_TemporalMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1660
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1661 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1662 canna_fn_TemporalMode = CANNA_FN_TemporalMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1663 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1664
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1665 DEFVAR_INT ("canna-key-nfer", &canna_key_Nfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1666
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1667 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1668 canna_key_Nfer = IROHA_KEY_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1669
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1670 DEFVAR_INT ("canna-key-xfer", &canna_key_Xfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1671
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1672 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1673 canna_key_Xfer = IROHA_KEY_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1674
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1675 DEFVAR_INT ("canna-key-up", &canna_key_Up /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1676
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1677 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1678 canna_key_Up = IROHA_KEY_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1679
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1680 DEFVAR_INT ("canna-key-left", &canna_key_Left /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1681
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1682 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1683 canna_key_Left = IROHA_KEY_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1684
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1685 DEFVAR_INT ("canna-key-right", &canna_key_Right /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1686
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1687 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1688 canna_key_Right = IROHA_KEY_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1689
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1690 DEFVAR_INT ("canna-key-down", &canna_key_Down /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1691
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1692 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1693 canna_key_Down = IROHA_KEY_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1694
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1695 DEFVAR_INT ("canna-key-insert", &canna_key_Insert /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1696
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1697 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1698 canna_key_Insert = IROHA_KEY_Insert;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1699
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1700 DEFVAR_INT ("canna-key-rollup", &canna_key_Rollup /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1701
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1702 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1703 canna_key_Rollup = IROHA_KEY_Rollup;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1704
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1705 DEFVAR_INT ("canna-key-rolldown", &canna_key_Rolldown /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1706
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1707 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1708 canna_key_Rolldown = IROHA_KEY_Rolldown;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1709
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1710 DEFVAR_INT ("canna-key-home", &canna_key_Home /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1711
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1712 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1713 canna_key_Home = IROHA_KEY_Home;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1714
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1715 DEFVAR_INT ("canna-key-help", &canna_key_Help /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1716
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1717 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1718 canna_key_Help = IROHA_KEY_Help;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1719
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1720 DEFVAR_INT ("canna-key-kp-key", &canna_key_KP_Key /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1721
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1722 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1723 canna_key_KP_Key = IROHA_KEY_KP_Key;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1724
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1725 DEFVAR_INT ("canna-key-shift-nfer", &canna_key_Shift_Nfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1726
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1727 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1728 canna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1729
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1730 DEFVAR_INT ("canna-key-shift-xfer", &canna_key_Shift_Xfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1731
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1732 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1733 canna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1734
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1735 DEFVAR_INT ("canna-key-shift-up", &canna_key_Shift_Up /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1736
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1737 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1738 canna_key_Shift_Up = IROHA_KEY_Shift_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1739
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1740 DEFVAR_INT ("canna-key-shift-left", &canna_key_Shift_Left /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1741
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1742 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1743 canna_key_Shift_Left = IROHA_KEY_Shift_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1744
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1745 DEFVAR_INT ("canna-key-shift-right", &canna_key_Shift_Right /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1746
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1747 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1748 canna_key_Shift_Right = IROHA_KEY_Shift_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1749
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1750 DEFVAR_INT ("canna-key-shift-down", &canna_key_Shift_Down /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1751
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1752 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1753 canna_key_Shift_Down = IROHA_KEY_Shift_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1754
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1755 DEFVAR_INT ("canna-key-control-nfer", &canna_key_Cntrl_Nfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1756
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1757 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1758 canna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1759
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1760 DEFVAR_INT ("canna-key-control-xfer", &canna_key_Cntrl_Xfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1761
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1762 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1763 canna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1764
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1765 DEFVAR_INT ("canna-key-control-up", &canna_key_Cntrl_Up /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1766
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1767 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1768 canna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1769
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1770 DEFVAR_INT ("canna-key-control-left", &canna_key_Cntrl_Left /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1771
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1772 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1773 canna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1774
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1775 DEFVAR_INT ("canna-key-control-right", &canna_key_Cntrl_Right /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1776
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1777 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1778 canna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1779
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1780 DEFVAR_INT ("canna-key-control-down", &canna_key_Cntrl_Down /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1781
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1782 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1783 canna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1784
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1785 Fprovide(intern("CANNA"));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1786 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1787
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1788 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1789 /* To handle MULE internal code and EUC.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1790 I assume CANNA can handle only Japanese EUC. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1791
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1792 /* EUC multibyte string to MULE internal string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1793
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1794 static void
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1795 c2mu (unsigned char *cp, int l, unsigned char *mp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1796 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1797 unsigned char ch, *ep = cp+l;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1798
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1799 while ((cp < ep) && (ch = *cp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1800 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1801 if ((unsigned char) ch == ISO_CODE_SS2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1802 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1803 *mp++ = LEADING_BYTE_KATAKANA_JISX0201;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1804 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1805 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1806 else if ((unsigned char) ch == ISO_CODE_SS3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1807 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1808 *mp++ = LEADING_BYTE_JAPANESE_JISX0212;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1809 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1810 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1811 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1812 else if (ch & 0x80)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1813 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1814 *mp++ = LEADING_BYTE_JAPANESE_JISX0208;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1815 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1816 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1817 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1818 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1819 *mp = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1820 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1821
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1822 /* MULE internal string to EUC multibyte string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1823
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1824 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1825 m2c (unsigned char *mp, int l, unsigned char *cp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1826 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1827 unsigned char ch, *ep = mp + l;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1828
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1829 while ((mp < ep) && (ch = *mp++))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1830 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1831 switch (ch)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1832 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1833 case LEADING_BYTE_KATAKANA_JISX0201:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1834 *cp++ = ISO_CODE_SS2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1835 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1836 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1837 case LEADING_BYTE_JAPANESE_JISX0212:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1838 *cp++ = ISO_CODE_SS3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1839 case LEADING_BYTE_JAPANESE_JISX0208:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1840 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1841 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1842 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1843 default:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1844 *cp++ = ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1845 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1846 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1847 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1848 *cp = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1849 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1850
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1851 #undef make_string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1852
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1853 /* make_string after converting EUC string to MULE internal string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1854 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1855 mule_make_string (unsigned char *p, int l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1856 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1857 unsigned char cbuf[4096];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1858
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1859 c2mu (p,l,cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1860 return (make_string (cbuf,strlen (cbuf)));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1861 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1862
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1863 /* return the MULE internal string length of EUC string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1864 /* Modified by sb to return a character count not byte count. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1865 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1866 mule_strlen (unsigned char *p, int l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1867 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1868 unsigned char ch, *cp = p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1869 int len = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1870
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1871 while ((cp < p + l) && (ch = *cp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1872 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1873 if ((unsigned char) ch == ISO_CODE_SS2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1874 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1875 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1876 cp += 2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1877 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1878 else if ((unsigned char) ch == ISO_CODE_SS3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1879 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1880 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1881 cp += 3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1882 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1883 else if (ch & 0x80)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1884 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1885 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1886 cp += 2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1887 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1888 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1889 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1890 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1891 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1892 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1893 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1894 return (len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1895 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1896
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1897 /* count number of characters */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1898 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1899 count_char (unsigned char *p, int len, int pos, int rev, int *clen, int *cpos,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1900 int *crev)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1901 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1902 unsigned char *q = p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1903
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1904 *clen = *cpos = *crev = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1905 if (len == 0) return;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1906 while (q < p + pos)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1907 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1908 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1909 (*cpos)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1910 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1911 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1912 while (q < p + pos + rev)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1913 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1914 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1915 (*crev)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1916 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1917 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1918 while (q < p + len)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1919 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1920 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1921 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1922 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1923 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1924 #endif /* CANNA_MULE */