annotate src/mule-canna.c @ 245:51092a27c943 r20-5b21

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