annotate src/mule-canna.c @ 434:9d177e8d4150 r21-2-25

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