annotate src/mule-canna.c @ 404:2f8bb876ab1d r21-2-32

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