annotate src/mule-canna.c @ 131:869e1851236b xemacs-20-1p4

Import from CVS: tag xemacs-20-1p4
author cvs
date Mon, 13 Aug 2007 09:29:07 +0200
parents 9f59509498e1
children e121b013d1f0
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);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
197 static mule_strlen (unsigned char *, int);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
198 static count_char (unsigned char *,int, int, int, int *, int *, int *);
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);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
324 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
325
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
326 /* For whatever reason, calling Fding directly from libCanna loses */
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
327 static void call_Fding()
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
328 {
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
329 extern Lisp_Object 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 (void)Fding(Qnil, Qnil, Qnil);
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
332 }
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
333
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
334 DEFUN ("canna-initialize", Fcanna_initialize, 0, 3, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
335 Initialize ``canna'', which is a kana-to-kanji converter for GNU Emacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
336 The first arg specifies if inserting space character between BUNSETSU when
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
337 candidates are displayed.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
338 The second arg specifies server.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
339 The third arg specifies a file which will be used as a customization
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
340 description.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
341 If nil is specified for each arg, the default value will be used.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
342 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
343 (num, server, rcfile))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
344 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
345 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
346 int res;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
347 unsigned char **p, **q;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
348
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
349 int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
350
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
351 IRCP_context = -1;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
352
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
353 if (NILP (num))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
354 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
355 kugiri = 1;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
356 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
357 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
358 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
359 CHECK_INT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
360 kugiri = XINT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
361 kugiri = (kugiri == 1) ? 1 : 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
362 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
363
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
364 if (NILP (server))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
365 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
366 jrKanjiControl (0, KC_SETSERVERNAME, (char *) 0);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
367 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
368 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
369 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
370 char servername[256];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
371
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
372 CHECK_STRING (server);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
373 strncpy (servername, XSTRING (server)->_data, XSTRING (server)->_size);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
374 servername[XSTRING (server)->_size] = '\0';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
375 jrKanjiControl (0, KC_SETSERVERNAME, servername);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
376 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
377
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
378 if (NILP (rcfile))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
379 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
380 jrKanjiControl (0, KC_SETINITFILENAME, (char *) 0);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
381 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
382 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
383 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
384 char rcname[256];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
385
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
386 CHECK_STRING (rcfile);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
387 strncpy (rcname, XSTRING (rcfile)->_data, XSTRING (rcfile)->_size);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
388 rcname[XSTRING (rcfile)->_size] = '\0';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
389 jrKanjiControl (0, KC_SETINITFILENAME, rcname);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
390 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
391
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
392 warning = (char **) 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
393 #ifdef nec_ews_svr4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
394 stop_polling ();
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
395 #endif /* nec_ews_svr4 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
396 res = jrKanjiControl (0, KC_INITIALIZE, (char *)&warning);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
397 #ifdef nec_ews_svr4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
398 start_polling ();
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
399 #endif /* nec_ews_svr4 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
400 val = Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
401 if (warning)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
402 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
403 for (p = q = (unsigned char **) warning ; *q ; q++)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
404 ;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
405 while (p < 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 q--;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
408 val = Fcons (make_string (*q, strlen (*q)), val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
409 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
410 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
411 val = Fcons (val, Qnil);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
412
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
413 if (res == -1)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
414 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
415 val = Fcons (make_string ((unsigned char*) jrKanjiError,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
416 strlen (jrKanjiError)), val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
417 /* ¥¤¥Ë¥·¥ã¥é¥¤¥º¤Ç¼ºÇÔ¤·¤¿¾ì¹ç¡£ */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
418 return Fcons (Qnil, 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 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
421 {
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
422 extern void (*jrBeepFunc)();
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
423 Lisp_Object CANNA_mode_keys ();
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
424
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
425 jrBeepFunc = call_Fding;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
426
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
427 #ifdef KC_SETAPPNAME
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
428 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
429 wcKanjiControl (0, KC_SETAPPNAME, "nemacs");
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
430 #else /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
431 wcKanjiControl (0, KC_SETAPPNAME, "mule");
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
432 #endif /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
433 #endif /* KC_SETAPPNAME */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
434
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
435 jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
436 jrKanjiControl (0, KC_SETWIDTH, (char *) 78);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
437 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
438 jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
439 #else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
440 /* mule ¤À¤Ã¤¿¤éȾ³Ñ¥«¥¿¥«¥Ê¤â»È¤¨¤ë */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
441 if (Vcanna_inhibit_hankakukana)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
442 jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
443 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
444 jrKanjiControl (0, KC_YOMIINFO, (char *) 2); /* ¢¨£²: ¥í¡¼¥Þ»ú¤Þ¤ÇÊÖ¤¹ */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
445 val = Fcons (Qnil, val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
446 return Fcons (CANNA_mode_keys (), val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
447 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
448 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
449
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
450 DEFUN ("canna-finalize", Fcanna_finalize, 0, 0, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
451 finalize ``canna'', which is a kana-to-kanji converter for GNU Emacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
452 This cause to write miscellaneous informations to kana-to-kanji dictionary.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
453 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
454 ())
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
455 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
456 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
457 unsigned char **p;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
458
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
459 jrKanjiControl (0, KC_FINALIZE, (char *)&warning);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
460
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
461 val = Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
462 if (warning)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
463 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
464 for (p = (unsigned char**) warning ; *p ; p++)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
465 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
466 val = Fcons (make_string (*p, strlen (*p)), val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
467 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
468 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
469 val = Fcons (val, Qnil);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
470 IRCP_context = -1;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
471 return val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
472 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
473
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
474 DEFUN ("canna-touroku-string", Fcanna_touroku_string, 1, 1, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
475 Register Kanji words into kana-to-kanji conversion dictionary.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
476 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
477 (str))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
478 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
479 jrKanjiStatusWithValue ksv;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
480 jrKanjiStatus ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
481 int len;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
482 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
483 #ifdef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
484 unsigned char cbuf[4096];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
485 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
486
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
487 CHECK_STRING (str);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
488 ksv.buffer = (unsigned char *) buf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
489 ksv.bytes_buffer = KEYTOSTRSIZE;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
490 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
491 ks.echoStr = XSTRING (str)->_data;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
492 ks.length = XSTRING (str)->_size;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
493 #else /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
494 m2c (XSTRING (str)->_data, XSTRING (str)->_size, cbuf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
495 ks.echoStr = cbuf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
496 ks.length = strlen (cbuf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
497 #endif /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
498 ksv.ks = &ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
499 len = jrKanjiControl (0, KC_DEFINEKANJI, (char *)&ksv);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
500 val = storeResults (buf, ksv.val, ksv.ks);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
501 return val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
502 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
503
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
504 DEFUN ("canna-set-width", Fcanna_set_width, 1, 1, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
505 Set status-line width information, which is used to display
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
506 kanji candidates.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
507 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
508 (num))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
509 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
510 CHECK_INT (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 jrKanjiControl (0, KC_SETWIDTH, (char *) XINT (num));
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
513 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
514 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
515
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
516 DEFUN ("canna-change-mode", Fcanna_change_mode, 1, 1, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
517 Change Japanese pre-edit mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
518 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
519 (num))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
520 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
521 jrKanjiStatusWithValue ksv;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
522 jrKanjiStatus ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
523 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
524
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
525 CHECK_INT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
526
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
527 ksv.buffer = (unsigned char *) buf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
528 ksv.bytes_buffer = KEYTOSTRSIZE;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
529 ksv.ks = &ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
530 ksv.val = XINT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
531 jrKanjiControl (0, KC_CHANGEMODE, (char *)&ksv);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
532 val = storeResults (buf, ksv.val, ksv.ks);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
533 return val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
534 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
535
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
536 Lisp_Object
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
537 CANNA_mode_keys (void)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
538 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
539 #define CANNAWORKBUFSIZE 32
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
540 char xxx[CANNAWORKBUFSIZE];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
541 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
542 int i, n;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
543
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
544 n = jrKanjiControl (0, KC_MODEKEYS, xxx);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
545 val = Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
546 for (i = n ; i > 0 ;)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
547 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
548 --i;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
549 /* !!#### something fucked here */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
550 val = Fcons (make_char ((int)(0xFF & (unsigned char) xxx[i])), val);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
551 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
552 return 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
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
555 DEFUN ("canna-store-yomi", Fcanna_store_yomi, 1, 2, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
556 Store yomi characters as a YOMI of kana-to-kanji conversion.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
557 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
558 (yomi, roma))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
559 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
560 jrKanjiStatusWithValue ksv;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
561 jrKanjiStatus ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
562
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
563 CHECK_STRING (yomi);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
564 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
565 strncpy (buf, XSTRING (yomi)->_data, XSTRING (yomi)->_size);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
566 ks.length = XSTRING (yomi)->_size;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
567 buf[ks.length] = '\0';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
568 #else /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
569 m2c (XSTRING (yomi)->_data, XSTRING (yomi)->_size, buf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
570 ks.length = strlen (buf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
571 #endif /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
572
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
573 if (NILP (roma))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
574 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
575 ks.mode = 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
576 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
577 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
578 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
579 CHECK_STRING (roma);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
580
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
581 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
582 strncpy (buf + XSTRING (yomi)->_size + 1, XSTRING (roma)->_data,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
583 XSTRING (roma)->_size);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
584 buf[XSTRING (yomi)->_size + 1 + XSTRING (roma)->_size] = '\0';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
585 ks.mode = (unsigned char *)(buf + XSTRING (yomi)->_size + 1);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
586 #else /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
587 ks.mode = (unsigned char *)(buf + ks.length + 1);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
588 m2c (XSTRING (roma)->_data, XSTRING (roma)->_size, ks.mode);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
589 #endif /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
590 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
591
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
592 ks.echoStr = (unsigned char *) buf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
593 ksv.buffer = (unsigned char *) buf; /* ÊÖÃÍÍÑ */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
594 ksv.bytes_buffer = KEYTOSTRSIZE;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
595 ksv.ks = &ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
596
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
597 jrKanjiControl (0, KC_STOREYOMI, (char *)&ksv);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
598
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
599 return storeResults (buf, ksv.val, ksv.ks);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
600 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
601
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
602 DEFUN ("canna-do-function", Fcanna_do_function, 1, 2, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
603 Do specified function at current mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
604 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
605 (num, ch))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
606 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
607 jrKanjiStatusWithValue ksv;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
608 jrKanjiStatus ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
609 Lisp_Object val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
610
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
611 CHECK_INT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
612
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
613 if (NILP (ch))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
614 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
615 *buf = '@';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
616 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
617 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
618 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
619 CHECK_CHAR (ch);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
620 *buf = XCHAR (ch);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
621 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
622
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
623 ksv.buffer = (unsigned char *) buf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
624 ksv.bytes_buffer = KEYTOSTRSIZE;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
625 ksv.ks = &ks;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
626 ksv.val = XINT (num);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
627 jrKanjiControl (0, KC_DO, (char *) &ksv);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
628 val = storeResults (buf, ksv.val, ksv.ks);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
629 return val;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
630 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
631
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
632 DEFUN ("canna-parse", Fcanna_parse, 1, 1, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
633 Parse customize string.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
634 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
635 (str))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
636 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
637 jrKanjiStatusWithValue ksv;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
638 jrKanjiStatus ks;
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 Lisp_Object res;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
727
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
728 CHECK_STRING (yomi);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
729 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
730 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
731 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
732 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
733 #ifndef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
734 strncpy (yomibuf, XSTRING (yomi)->_data, XSTRING (yomi)->_size);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
735 yomibuf[XSTRING (yomi)->_size] = '\0';
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
736 nbun = RkBgnBun (IRCP_context, XSTRING (yomi)->_data, XSTRING (yomi)->_size,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
737 (RK_XFER << RK_XFERBITS) | RK_KFER);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
738 #else /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
739 m2c (XSTRING (yomi)->_data, XSTRING (yomi)->_size, yomibuf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
740 nbun = RkBgnBun (IRCP_context, (char *) yomibuf, strlen (yomibuf),
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
741 (RK_XFER << RK_XFERBITS) | RK_KFER);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
742 #endif /* CANNA_MULE */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
743
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
744 return kanjiYomiList (IRCP_context, nbun);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
745 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
746
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
747 static Lisp_Object
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
748 kanjiYomiList (int context, int nbun)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
749 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
750 Lisp_Object val, res = Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
751 unsigned char RkBuf[RKBUFSIZE];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
752 int len, i, total;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
753
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
754 for (i = nbun ; i > 0 ; )
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
755 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
756 i--;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
757 RkGoTo (context, i);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
758 len = RkGetKanji (context, RkBuf, RKBUFSIZE);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
759 val = make_string (RkBuf, len);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
760 len = RkGetYomi (context, RkBuf, RKBUFSIZE);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
761 res = Fcons (Fcons (val, make_string (RkBuf, len)), res);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
762 if (i < RKBUFSIZE / 2)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
763 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
764 kugiri[i] = len;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
765 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
766 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
767 for (i = 0, total = 0 ; i < nbun ; i++)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
768 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
769 int temp = kugiri[i];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
770 kugiri[i] = total;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
771 total += temp;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
772 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
773 return res;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
774 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
775
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
776 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
777 ¸õÊä°ìÍ÷¤òµá¤á¤ë¡£
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
778 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
779 (bunsetsu))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
780 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
781 int i, nbun, slen, len;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
782 unsigned char *p, RkBuf[RKBUFSIZE];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
783 Lisp_Object res = Qnil, endp;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
784
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
785 CHECK_INT (bunsetsu);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
786 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
787 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
788 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
789 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
790 RkGoTo (IRCP_context, XINT (bunsetsu));
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
791 len = RkGetKanjiList (IRCP_context, RkBuf, RKBUFSIZE);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
792 p = RkBuf;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
793 for (i = 0 ; i < len ; i++)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
794 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
795 slen = strlen (p);
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 74
diff changeset
796 if (NILP(res))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
797 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
798 endp = res = Fcons (make_string (p, slen), Qnil);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
799 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
800 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
801 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
802 endp = XCONS (endp)->cdr = Fcons (make_string (p, slen), Qnil);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
803 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
804 p += slen + 1;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
805 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
806 return res;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
807 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
808
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
809 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
810 ʸÀá¤ÎŤµ¤ò»ØÄꤹ¤ë¡£
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
811 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
812 (bunsetsu, bunlen))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
813 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
814 int nbun, len;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
815
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
816 CHECK_INT (bunsetsu);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
817 CHECK_INT (bunlen);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
818
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
819 nbun = XINT (bunsetsu);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
820 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
821 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
822 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
823 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
824 RkGoTo (IRCP_context, nbun);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
825 len = byteLen (nbun, XINT (bunlen));
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
826 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len));
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
827 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
828
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
829 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
830 ¸õÊäÁªÂò¡£
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
831 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
832 (bun, kouho))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
833 {
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
834 int nbun, nkouho;
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
835
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
836 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
837 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
838 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
839 }
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
840 nbun = XINT(bun);
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
841 RkGoTo (IRCP_context, nbun);
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
842
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
843 nkouho = XINT(kouho);
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 80
diff changeset
844 RkXfer (IRCP_context, nkouho);
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
845 return Qt;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
846 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
847
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
848 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /*
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 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
853 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
854 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
855 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
856 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
857 RkEndBun (IRCP_context, 1); /* ³Ø½¬¤Ï¤¤¤Ä¤Ç¤â¹Ô¤Ã¤ÆÎɤ¤¤â¤Î¤Ê¤Î¤«¡© */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
858 return Qt;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
859 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
860
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
861 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /*
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 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
866 if (confirmContext () == 0)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
867 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
868 return Qnil;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
869 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
870 RkEndBun (IRCP_context, 0);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
871 return Qt;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
872 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
873
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
874 /* variables below this line is constants of Canna */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
875
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
876 static int Vcanna_mode_AlphaMode = IROHA_MODE_AlphaMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
877 static int Vcanna_mode_EmptyMode = IROHA_MODE_EmptyMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
878 static int Vcanna_mode_KigoMode = IROHA_MODE_KigoMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
879 static int Vcanna_mode_YomiMode = IROHA_MODE_YomiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
880 static int Vcanna_mode_JishuMode = IROHA_MODE_JishuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
881 static int Vcanna_mode_TankouhoMode = IROHA_MODE_TankouhoMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
882 static int Vcanna_mode_IchiranMode = IROHA_MODE_IchiranMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
883 static int Vcanna_mode_YesNoMode = IROHA_MODE_YesNoMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
884 static int Vcanna_mode_OnOffMode = IROHA_MODE_OnOffMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
885 #ifdef CANNA_MODE_AdjustBunsetsuMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
886 static int Vcanna_mode_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
887 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
888 #ifdef CANNA_MODE_ChikujiYomiMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
889 static int Vcanna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
890 static int Vcanna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
891 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
892
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
893 static int Vcanna_mode_HenkanMode = IROHA_MODE_HenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
894 #ifdef CANNA_MODE_HenkanNyuryokuMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
895 static int Vcanna_mode_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
896 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
897 #ifdef CANNA_MODE_ZenHiraHenkanMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
898 static int Vcanna_mode_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
899 #ifdef CANNA_MODE_HanHiraHenkanMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
900 static int Vcanna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
901 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
902 static int Vcanna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
903 static int Vcanna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
904 static int Vcanna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
905 static int Vcanna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
906 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
907 static int Vcanna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
908 #ifdef CANNA_MODE_HanHiraKakuteiMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
909 static int Vcanna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
910 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
911 static int Vcanna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
912 static int Vcanna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
913 static int Vcanna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
914 static int Vcanna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
915 static int Vcanna_mode_HexMode = IROHA_MODE_HexMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
916 static int Vcanna_mode_BushuMode = IROHA_MODE_BushuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
917 static int Vcanna_mode_ExtendMode = IROHA_MODE_ExtendMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
918 static int Vcanna_mode_RussianMode = IROHA_MODE_RussianMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
919 static int Vcanna_mode_GreekMode = IROHA_MODE_GreekMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
920 static int Vcanna_mode_LineMode = IROHA_MODE_LineMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
921 static int Vcanna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
922 static int Vcanna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
923 static int Vcanna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
924 static int Vcanna_mode_TourokuMode = IROHA_MODE_TourokuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
925 static int Vcanna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
926 static int Vcanna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
927 static int Vcanna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
928 static int Vcanna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
929 static int Vcanna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
930 static int Vcanna_mode_MountDicMode = IROHA_MODE_MountDicMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
931
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
932 static int Vcanna_fn_SelfInsert = IROHA_FN_SelfInsert;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
933 static int Vcanna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
934 static int Vcanna_fn_QuotedInsert = IROHA_FN_QuotedInsert;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
935 static int Vcanna_fn_JapaneseMode = IROHA_FN_JapaneseMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
936 static int Vcanna_fn_AlphaMode = IROHA_FN_AlphaMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
937 static int Vcanna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
938 static int Vcanna_fn_Forward = IROHA_FN_Forward;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
939 static int Vcanna_fn_Backward = IROHA_FN_Backward;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
940 static int Vcanna_fn_Next = IROHA_FN_Next;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
941 static int Vcanna_fn_Prev = IROHA_FN_Prev;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
942 static int Vcanna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
943 static int Vcanna_fn_EndOfLine = IROHA_FN_EndOfLine;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
944 static int Vcanna_fn_DeleteNext = IROHA_FN_DeleteNext;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
945 static int Vcanna_fn_DeletePrevious = IROHA_FN_DeletePrevious;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
946 static int Vcanna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
947 static int Vcanna_fn_Henkan = IROHA_FN_Henkan;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
948 static int Vcanna_fn_Kakutei = IROHA_FN_Kakutei;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
949 static int Vcanna_fn_Extend = IROHA_FN_Extend;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
950 static int Vcanna_fn_Shrink = IROHA_FN_Shrink;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
951 #ifdef CANNA_FN_AdjustBunsetsu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
952 static int Vcanna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
953 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
954 static int Vcanna_fn_Quit = IROHA_FN_Quit;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
955 static int Vcanna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
956 static int Vcanna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
957 static int Vcanna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
958 static int Vcanna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
959 static int Vcanna_fn_Zenkaku = IROHA_FN_Zenkaku;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
960 static int Vcanna_fn_Hankaku = IROHA_FN_Hankaku;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
961 static int Vcanna_fn_ToUpper = IROHA_FN_ToUpper;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
962 static int Vcanna_fn_Capitalize = IROHA_FN_Capitalize;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
963 static int Vcanna_fn_ToLower = IROHA_FN_ToLower;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
964 static int Vcanna_fn_Hiragana = IROHA_FN_Hiragana;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
965 static int Vcanna_fn_Katakana = IROHA_FN_Katakana;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
966 static int Vcanna_fn_Romaji = IROHA_FN_Romaji;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
967 #ifdef CANNA_FN_BaseHiragana
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
968 static int Vcanna_fn_BaseHiragana = CANNA_FN_BaseHiragana;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
969 static int Vcanna_fn_BaseKatakana = CANNA_FN_BaseKatakana;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
970 static int Vcanna_fn_BaseEisu = CANNA_FN_BaseEisu;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
971 static int Vcanna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
972 static int Vcanna_fn_BaseHankaku = CANNA_FN_BaseHankaku;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
973 static int Vcanna_fn_BaseKana = CANNA_FN_BaseKana;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
974 static int Vcanna_fn_BaseKakutei = CANNA_FN_BaseKakutei;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
975 static int Vcanna_fn_BaseHenkan = CANNA_FN_BaseHenkan;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
976 static int Vcanna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
977 static int Vcanna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
978 static int Vcanna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
979 static int Vcanna_fn_BaseKakuteiHenkanToggle =
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
980 CANNA_FN_BaseKakuteiHenkanToggle;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
981 static int Vcanna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
982 static int Vcanna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
983 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
984 static int Vcanna_fn_ExtendMode = IROHA_FN_ExtendMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
985 static int Vcanna_fn_Touroku = IROHA_FN_Touroku;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
986 static int Vcanna_fn_HexMode = IROHA_FN_HexMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
987 static int Vcanna_fn_BushuMode = IROHA_FN_BushuMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
988 static int Vcanna_fn_KigouMode = IROHA_FN_KigouMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
989 #ifdef CANNA_FN_Mark
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
990 static int Vcanna_fn_Mark = CANNA_FN_Mark;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
991 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
992 #ifdef CANNA_FN_TemporalMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
993 static int Vcanna_fn_TemporalMode = CANNA_FN_TemporalMode;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
994 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
995
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
996 static int Vcanna_key_Nfer = IROHA_KEY_Nfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
997 static int Vcanna_key_Xfer = IROHA_KEY_Xfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
998 static int Vcanna_key_Up = IROHA_KEY_Up;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
999 static int Vcanna_key_Left = IROHA_KEY_Left;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1000 static int Vcanna_key_Right = IROHA_KEY_Right;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1001 static int Vcanna_key_Down = IROHA_KEY_Down;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1002 static int Vcanna_key_Insert = IROHA_KEY_Insert;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1003 static int Vcanna_key_Rollup = IROHA_KEY_Rollup;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1004 static int Vcanna_key_Rolldown = IROHA_KEY_Rolldown;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1005 static int Vcanna_key_Home = IROHA_KEY_Home;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1006 static int Vcanna_key_Help = IROHA_KEY_Help;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1007 static int Vcanna_key_KP_Key = IROHA_KEY_KP_Key;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1008 static int Vcanna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1009 static int Vcanna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1010 static int Vcanna_key_Shift_Up = IROHA_KEY_Shift_Up;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1011 static int Vcanna_key_Shift_Left = IROHA_KEY_Shift_Left;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1012 static int Vcanna_key_Shift_Right = IROHA_KEY_Shift_Right;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1013 static int Vcanna_key_Shift_Down = IROHA_KEY_Shift_Down;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1014 static int Vcanna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1015 static int Vcanna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1016 static int Vcanna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1017 static int Vcanna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1018 static int Vcanna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1019 static int Vcanna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1020
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1021 Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp>
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1022 1996/6/7 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1023
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1024 void
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1025 syms_of_mule_canna (void)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1026 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1027 DEFVAR_LISP ("CANNA", &VCANNA); /* hir@nec, 1992.5.21 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1028 VCANNA = Qt; /* hir@nec, 1992.5.21 */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1029
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1030 DEFSUBR (Fcanna_key_proc);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1031 DEFSUBR (Fcanna_initialize);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1032 DEFSUBR (Fcanna_finalize);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1033 DEFSUBR (Fcanna_touroku_string);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1034 DEFSUBR (Fcanna_set_width);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1035 DEFSUBR (Fcanna_change_mode);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1036 DEFSUBR (Fcanna_store_yomi);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1037 DEFSUBR (Fcanna_do_function);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1038 DEFSUBR (Fcanna_parse);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1039 DEFSUBR (Fcanna_query_mode);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1040 DEFSUBR (Fcanna_set_bunsetsu);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1041
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1042 DEFSUBR (Fcanna_henkan_begin);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1043 DEFSUBR (Fcanna_henkan_next);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1044 DEFSUBR (Fcanna_bunsetu_henkou);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1045 DEFSUBR (Fcanna_henkan_kakutei);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1046 DEFSUBR (Fcanna_henkan_end);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1047 DEFSUBR (Fcanna_henkan_quit);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1048 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1049
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1050 void
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1051 vars_of_mule_canna (void)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1052 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1053 DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1054
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1055 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1056 DEFVAR_LISP ("canna-kakutei-yomi", &Vcanna_kakutei_yomi /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1057
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1058 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1059 DEFVAR_LISP ("canna-kakutei-romaji", &Vcanna_kakutei_romaji /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1060
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1061 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1062 DEFVAR_LISP ("canna-henkan-string", &Vcanna_henkan_string /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1063
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1064 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1065 DEFVAR_INT ("canna-henkan-length", &Vcanna_henkan_length /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1066
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1067 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1068 DEFVAR_INT ("canna-henkan-revpos", &Vcanna_henkan_revPos /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1069
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1070 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1071 DEFVAR_INT ("canna-henkan-revlen", &Vcanna_henkan_revLen /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1072
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1073 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1074 DEFVAR_LISP ("canna-ichiran-string", &Vcanna_ichiran_string /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1075
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1076 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1077 DEFVAR_INT ("canna-ichiran-length", &Vcanna_ichiran_length /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1078
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1079 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1080 DEFVAR_INT ("canna-ichiran-revpos", &Vcanna_ichiran_revPos /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1081
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1082 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1083 DEFVAR_INT ("canna-ichiran-revlen", &Vcanna_ichiran_revLen /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1084
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1085 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1086 DEFVAR_LISP ("canna-mode-string", &Vcanna_mode_string /*
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
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1090 DEFVAR_BOOL ("canna-empty-info", &Vcanna_empty_info /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1091 For canna
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1092 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1093 DEFVAR_BOOL ("canna-through-info", &Vcanna_through_info /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1094 For canna
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1095 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1096 DEFVAR_BOOL ("canna-underline", &Vcanna_underline /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1097 For canna
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1098 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1099 DEFVAR_BOOL ("canna-inhibit-hankakukana", &Vcanna_inhibit_hankakukana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1100 For canna
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1101 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1102
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1103 DEFVAR_INT ("canna-mode-alpha-mode", &Vcanna_mode_AlphaMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1104
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1105 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1106 DEFVAR_INT ("canna-mode-empty-mode", &Vcanna_mode_EmptyMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1107
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1108 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1109 DEFVAR_INT ("canna-mode-kigo-mode", &Vcanna_mode_KigoMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1110
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1111 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1112 DEFVAR_INT ("canna-mode-yomi-mode", &Vcanna_mode_YomiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1113
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1114 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1115 DEFVAR_INT ("canna-mode-jishu-mode", &Vcanna_mode_JishuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1116
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1117 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1118 DEFVAR_INT ("canna-mode-tankouho-mode", &Vcanna_mode_TankouhoMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1119
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1120 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1121 DEFVAR_INT ("canna-mode-ichiran-mode", &Vcanna_mode_IchiranMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1122
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1123 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1124 DEFVAR_INT ("canna-mode-yes-no-mode", &Vcanna_mode_YesNoMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1125
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1126 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1127 DEFVAR_INT ("canna-mode-on-off-mode", &Vcanna_mode_OnOffMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1128
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1129 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1130 #ifdef CANNA_MODE_AdjustBunsetsuMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1131 DEFVAR_INT ("canna-mode-adjust-bunsetsu-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1132 &Vcanna_mode_AdjustBunsetsuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1133
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1134 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1135 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1136 #ifdef CANNA_MODE_ChikujiYomiMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1137 DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &Vcanna_mode_ChikujiYomiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1138
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1139 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1140 DEFVAR_INT ("canna-mode-chikuji-bunsetsu-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1141 &Vcanna_mode_ChikujiTanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1142
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1143 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1144 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1145
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1146 DEFVAR_INT ("canna-mode-henkan-mode", &Vcanna_mode_HenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1147
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1148 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1149 #ifdef CANNA_MODE_HenkanNyuryokuMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1150 DEFVAR_INT ("canna-mode-henkan-nyuuryoku-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1151 &Vcanna_mode_HenkanNyuryokuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1152
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1153 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1154 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1155 #ifdef CANNA_MODE_ZenHiraHenkanMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1156 DEFVAR_INT ("canna-mode-zen-hira-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1157 &Vcanna_mode_ZenHiraHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1158
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1159 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1160 #ifdef CANNA_MODE_HanHiraHenkanMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1161 DEFVAR_INT ("canna-mode-han-hira-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1162 &Vcanna_mode_HanHiraHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1163
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1164 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1165 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1166 DEFVAR_INT ("canna-mode-zen-kata-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1167 &Vcanna_mode_ZenKataHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1168
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1169 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1170 DEFVAR_INT ("canna-mode-han-kata-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1171 &Vcanna_mode_HanKataHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1172
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1173 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1174 DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1175 &Vcanna_mode_ZenAlphaHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1176
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1177 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1178 DEFVAR_INT ("canna-mode-han-alpha-henkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1179 &Vcanna_mode_HanAlphaHenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1180
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1181 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1182 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1183 DEFVAR_INT ("canna-mode-zen-hira-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1184 &Vcanna_mode_ZenHiraKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1185
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1186 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1187 #ifdef CANNA_MODE_HanHiraKakuteiMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1188 DEFVAR_INT ("canna-mode-han-hira-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1189 &Vcanna_mode_HanHiraKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1190
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1191 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1192 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1193 DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1194 &Vcanna_mode_ZenKataKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1195
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1196 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1197 DEFVAR_INT ("canna-mode-han-kata-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1198 &Vcanna_mode_HanKataKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1199
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1200 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1201 DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1202 &Vcanna_mode_ZenAlphaKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1203
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1204 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1205 DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1206 &Vcanna_mode_HanAlphaKakuteiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1207
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1208 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1209 DEFVAR_INT ("canna-mode-hex-mode", &Vcanna_mode_HexMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1210
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1211 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1212 DEFVAR_INT ("canna-mode-bushu-mode", &Vcanna_mode_BushuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1213
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1214 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1215 DEFVAR_INT ("canna-mode-extend-mode", &Vcanna_mode_ExtendMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1216
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1217 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1218 DEFVAR_INT ("canna-mode-russian-mode", &Vcanna_mode_RussianMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1219
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1220 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1221 DEFVAR_INT ("canna-mode-greek-mode", &Vcanna_mode_GreekMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1222
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1223 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1224 DEFVAR_INT ("canna-mode-line-mode", &Vcanna_mode_LineMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1225
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1226 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1227 DEFVAR_INT ("canna-mode-changing-server-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1228 &Vcanna_mode_ChangingServerMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1229
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1230 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1231 DEFVAR_INT ("canna-mode-henkan-method-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1232 &Vcanna_mode_HenkanMethodMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1233
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1234 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1235 DEFVAR_INT ("canna-mode-delete-dic-mode", &Vcanna_mode_DeleteDicMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1236
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1237 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1238 DEFVAR_INT ("canna-mode-touroku-mode", &Vcanna_mode_TourokuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1239
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1240 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1241 DEFVAR_INT ("canna-mode-touroku-empty-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1242 &Vcanna_mode_TourokuEmptyMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1243
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1244 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1245 DEFVAR_INT ("canna-mode-touroku-hinshi-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1246 &Vcanna_mode_TourokuHinshiMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1247
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1248 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1249 DEFVAR_INT ("canna-mode-touroku-dic-mode", &Vcanna_mode_TourokuDicMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1250
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1251 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1252 DEFVAR_INT ("canna-mode-quoted-insert-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1253 &Vcanna_mode_QuotedInsertMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1254
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1255 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1256 DEFVAR_INT ("canna-mode-bubun-muhenkan-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1257 &Vcanna_mode_BubunMuhenkanMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1258
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1259 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1260 DEFVAR_INT ("canna-mode-mount-dic-mode", &Vcanna_mode_MountDicMode /*
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
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1264 DEFVAR_INT ("canna-func-self-insert", &Vcanna_fn_SelfInsert /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1265
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1266 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1267 DEFVAR_INT ("canna-func-functional-insert", &Vcanna_fn_FunctionalInsert /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1268
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1269 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1270 DEFVAR_INT ("canna-func-quoted-insert", &Vcanna_fn_QuotedInsert /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1271
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1272 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1273 DEFVAR_INT ("canna-func-japanese-mode", &Vcanna_fn_JapaneseMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1274
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1275 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1276 DEFVAR_INT ("canna-func-alpha-mode", &Vcanna_fn_AlphaMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1277
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1278 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1279 DEFVAR_INT ("canna-func-henkan-nyuryoku-mode",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1280 &Vcanna_fn_HenkanNyuryokuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1281
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1282 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1283 DEFVAR_INT ("canna-func-forward", &Vcanna_fn_Forward /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1284
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1285 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1286 DEFVAR_INT ("canna-func-backward", &Vcanna_fn_Backward /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1287
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1288 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1289 DEFVAR_INT ("canna-func-next", &Vcanna_fn_Next /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1290
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1291 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1292 DEFVAR_INT ("canna-func-previous", &Vcanna_fn_Prev /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1293
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1294 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1295 DEFVAR_INT ("canna-func-beginning-of-line", &Vcanna_fn_BeginningOfLine /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1296
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1297 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1298 DEFVAR_INT ("canna-func-end-of-line", &Vcanna_fn_EndOfLine /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1299
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1300 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1301 DEFVAR_INT ("canna-func-delete-next", &Vcanna_fn_DeleteNext /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1302
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1303 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1304 DEFVAR_INT ("canna-func-delete_previous", &Vcanna_fn_DeletePrevious /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1305
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1306 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1307 DEFVAR_INT ("canna-func-kill-to-end-of-line", &Vcanna_fn_KillToEndOfLine /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1308
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1309 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1310 DEFVAR_INT ("canna-func-henkan", &Vcanna_fn_Henkan /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1311
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1312 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1313 DEFVAR_INT ("canna-func-kakutei", &Vcanna_fn_Kakutei /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1314
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1315 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1316 DEFVAR_INT ("canna-func-extend", &Vcanna_fn_Extend /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1317
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1318 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1319 DEFVAR_INT ("canna-func-shrink", &Vcanna_fn_Shrink /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1320
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1321 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1322 #ifdef CANNA_FN_AdjustBunsetsu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1323 DEFVAR_INT ("canna-func-adjust-bunsetsu", &Vcanna_fn_AdjustBunsetsu /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1324
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1325 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1326 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1327 DEFVAR_INT ("canna-func-quit", &Vcanna_fn_Quit /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1328
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1329 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1330 DEFVAR_INT ("canna-func-convert-as-hex", &Vcanna_fn_ConvertAsHex /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1331
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1332 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1333 DEFVAR_INT ("canna-func-convert-as-bushu", &Vcanna_fn_ConvertAsBushu /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1334
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1335 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1336 DEFVAR_INT ("canna-func-kouho-ichiran", &Vcanna_fn_KouhoIchiran /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1337
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1338 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1339 DEFVAR_INT ("canna-func-bubun-muhenkan", &Vcanna_fn_BubunMuhenkan /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1340
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1341 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1342 DEFVAR_INT ("canna-func-zenkaku", &Vcanna_fn_Zenkaku /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1343
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1344 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1345 DEFVAR_INT ("canna-func-hankaku", &Vcanna_fn_Hankaku /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1346
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1347 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1348 DEFVAR_INT ("canna-func-to-upper", &Vcanna_fn_ToUpper /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1349
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1350 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1351 DEFVAR_INT ("canna-func-capitalize", &Vcanna_fn_Capitalize /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1352
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1353 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1354 DEFVAR_INT ("canna-func-to-lower", &Vcanna_fn_ToLower /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1355
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1356 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1357 DEFVAR_INT ("canna-func-hiragana", &Vcanna_fn_Hiragana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1358
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1359 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1360 DEFVAR_INT ("canna-func-katakana", &Vcanna_fn_Katakana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1361
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1362 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1363 DEFVAR_INT ("canna-func-romaji", &Vcanna_fn_Romaji /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1364
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1365 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1366 #ifdef CANNA_FN_BaseHiragana
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1367 DEFVAR_INT ("canna-func-base-hiragana", &Vcanna_fn_BaseHiragana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1368
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1369 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1370 DEFVAR_INT ("canna-func-base-katakana", &Vcanna_fn_BaseKatakana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1371
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1372 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1373 DEFVAR_INT ("canna-func-base-eisu", &Vcanna_fn_BaseEisu /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1374
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1375 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1376 DEFVAR_INT ("canna-func-base-zenkaku", &Vcanna_fn_BaseZenkaku /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1377
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1378 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1379 DEFVAR_INT ("canna-func-base-hankaku", &Vcanna_fn_BaseHankaku /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1380
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1381 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1382 DEFVAR_INT ("canna-func-base-kana", &Vcanna_fn_BaseKana /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1383
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1384 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1385 DEFVAR_INT ("canna-func-base-kakutei", &Vcanna_fn_BaseKakutei /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1386
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1387 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1388 DEFVAR_INT ("canna-func-base-henkan", &Vcanna_fn_BaseHenkan /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1389
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1390 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1391 DEFVAR_INT ("canna-func-base-hiragana-katakana-toggle",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1392 &Vcanna_fn_BaseHiraKataToggle /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1393
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1394 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1395 DEFVAR_INT ("canna-func-base-zenkaku-hankaku-toggle",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1396 &Vcanna_fn_BaseZenHanToggle /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1397
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1398 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1399 DEFVAR_INT ("canna-func-base-kana-eisu-toggle",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1400 &Vcanna_fn_BaseKanaEisuToggle /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1401
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1402 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1403 DEFVAR_INT ("canna-func-base-kakutei-henkan-toggle",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1404 &Vcanna_fn_BaseKakuteiHenkanToggle /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1405
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1406 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1407 DEFVAR_INT ("canna-func-base-rotate-forward",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1408 &Vcanna_fn_BaseRotateForward /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1409
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1410 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1411 DEFVAR_INT ("canna-func-base-rotate-backward",
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1412 &Vcanna_fn_BaseRotateBackward /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1413
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1414 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1415 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1416 DEFVAR_INT ("canna-func-extend-mode", &Vcanna_fn_ExtendMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1417
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1418 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1419 DEFVAR_INT ("canna-func-touroku", &Vcanna_fn_Touroku /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1420
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1421 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1422 DEFVAR_INT ("canna-func-hex-mode", &Vcanna_fn_HexMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1423
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1424 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1425 DEFVAR_INT ("canna-func-bushu-mode", &Vcanna_fn_BushuMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1426
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1427 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1428 DEFVAR_INT ("canna-func-kigo-mode", &Vcanna_fn_KigouMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1429
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1430 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1431 #ifdef CANNA_FN_Mark
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1432 DEFVAR_INT ("canna-func-mark", &Vcanna_fn_Mark /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1433
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1434 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1435 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1436 #ifdef CANNA_FN_TemporalMode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1437 DEFVAR_INT ("canna-func-temporal-mode", &Vcanna_fn_TemporalMode /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1438
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1439 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1440 #endif
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1441
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1442 DEFVAR_INT ("canna-key-nfer", &Vcanna_key_Nfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1443
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1444 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1445 DEFVAR_INT ("canna-key-xfer", &Vcanna_key_Xfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1446
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1447 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1448 DEFVAR_INT ("canna-key-up", &Vcanna_key_Up /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1449
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1450 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1451 DEFVAR_INT ("canna-key-left", &Vcanna_key_Left /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1452
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1453 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1454 DEFVAR_INT ("canna-key-right", &Vcanna_key_Right /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1455
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1456 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1457 DEFVAR_INT ("canna-key-down", &Vcanna_key_Down /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1458
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1459 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1460 DEFVAR_INT ("canna-key-insert", &Vcanna_key_Insert /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1461
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1462 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1463 DEFVAR_INT ("canna-key-rollup", &Vcanna_key_Rollup /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1464
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1465 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1466 DEFVAR_INT ("canna-key-rolldown", &Vcanna_key_Rolldown /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1467
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1468 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1469 DEFVAR_INT ("canna-key-home", &Vcanna_key_Home /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1470
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1471 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1472 DEFVAR_INT ("canna-key-help", &Vcanna_key_Help /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1473
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1474 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1475 DEFVAR_INT ("canna-key-kp-key", &Vcanna_key_KP_Key /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1476
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1477 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1478 DEFVAR_INT ("canna-key-shift-nfer", &Vcanna_key_Shift_Nfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1479
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1480 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1481 DEFVAR_INT ("canna-key-shift-xfer", &Vcanna_key_Shift_Xfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1482
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1483 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1484 DEFVAR_INT ("canna-key-shift-up", &Vcanna_key_Shift_Up /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1485
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1486 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1487 DEFVAR_INT ("canna-key-shift-left", &Vcanna_key_Shift_Left /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1488
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1489 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1490 DEFVAR_INT ("canna-key-shift-right", &Vcanna_key_Shift_Right /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1491
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1492 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1493 DEFVAR_INT ("canna-key-shift-down", &Vcanna_key_Shift_Down /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1494
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1495 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1496 DEFVAR_INT ("canna-key-control-nfer", &Vcanna_key_Cntrl_Nfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1497
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1498 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1499 DEFVAR_INT ("canna-key-control-xfer", &Vcanna_key_Cntrl_Xfer /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1500
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1501 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1502 DEFVAR_INT ("canna-key-control-up", &Vcanna_key_Cntrl_Up /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1503
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1504 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1505 DEFVAR_INT ("canna-key-control-left", &Vcanna_key_Cntrl_Left /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1506
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1507 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1508 DEFVAR_INT ("canna-key-control-right", &Vcanna_key_Cntrl_Right /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1509
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1510 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1511 DEFVAR_INT ("canna-key-control-down", &Vcanna_key_Cntrl_Down /*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1512
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1513 */ );
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1514 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1515
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1516 #ifdef CANNA_MULE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1517 /* To handle MULE internal code and EUC.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1518 I assume CANNA can handle only Japanese EUC. */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1519
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1520 /* EUC multibyte string to MULE internal string */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1521
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1522 static void
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1523 c2mu (char *cp, int l, char *mp)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1524 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1525 char ch, *ep = cp+l;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1526
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1527 while ((cp < ep) && (ch = *cp))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1528 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1529 if ((unsigned char) ch == ISO_CODE_SS2)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1530 {
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
1531 *mp++ = LEADING_BYTE_KATAKANA_JISX0201;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1532 cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1533 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1534 else if ((unsigned char) ch == ISO_CODE_SS3)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1535 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1536 *mp++ = LEADING_BYTE_JAPANESE_JISX0212;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1537 cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1538 *mp++ = *cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1539 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1540 else if (ch & 0x80)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1541 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1542 *mp++ = LEADING_BYTE_JAPANESE_JISX0208;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1543 *mp++ = *cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1544 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1545 *mp++ = *cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1546 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1547 *mp = 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1548 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1549
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1550 /* MULE internal string to EUC multibyte string */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1551
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1552 static void
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1553 m2c (unsigned char *mp, int l, unsigned char *cp)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1554 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1555 unsigned char ch, *ep = mp + l;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1556
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1557 while ((mp < ep) && (ch = *mp++))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1558 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1559 switch (ch)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1560 {
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
1561 case LEADING_BYTE_KATAKANA_JISX0201:
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1562 *cp++ = ISO_CODE_SS2;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1563 *cp++ = *mp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1564 break;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1565 case LEADING_BYTE_JAPANESE_JISX0212:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1566 *cp++ = ISO_CODE_SS3;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1567 case LEADING_BYTE_JAPANESE_JISX0208:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1568 *cp++ = *mp++;
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 break;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1571 default:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1572 *cp++ = ch;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1573 break;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1574 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1575 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1576 *cp = 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1577 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1578
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1579 #undef make_string
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1580
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1581 /* make_string after converting EUC string to MULE internal string */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1582 static Lisp_Object
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1583 mule_make_string (unsigned char *p, int l)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1584 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1585 unsigned char cbuf[4096];
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1586
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1587 c2mu (p,l,cbuf);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1588 return (make_string (cbuf,strlen (cbuf)));
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1589 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1590
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1591 /* return the MULE internal string length of EUC string */
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 114
diff changeset
1592 /* Modified by sb to return a character count not byte count. */
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1593 static int
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1594 mule_strlen (unsigned char *p, int l)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1595 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1596 unsigned char ch, *cp = p;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1597 int len = 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1598
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1599 while ((cp < p + l) && (ch = *cp))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1600 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1601 if ((unsigned char) ch == ISO_CODE_SS2)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1602 {
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 114
diff changeset
1603 len++;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1604 cp += 2;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1605 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1606 else if ((unsigned char) ch == ISO_CODE_SS3)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1607 {
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 114
diff changeset
1608 len++;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1609 cp += 3;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1610 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1611 else if (ch & 0x80)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1612 {
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 114
diff changeset
1613 len++;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1614 cp += 2;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1615 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1616 else
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1617 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1618 len++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1619 cp++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1620 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1621 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1622 return (len);
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1623 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1624
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1625 /* count number of characters */
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1626 static
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1627 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
1628 int *crev)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1629 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1630 unsigned char *q = p;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1631
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1632 *clen = *cpos = *crev = 0;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1633 if (len == 0) return;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1634 while (q < p + pos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1635 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1636 (*clen)++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1637 (*cpos)++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1638 if (*q++ & 0x80) q++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1639 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1640 while (q < p + pos + rev)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1641 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1642 (*clen)++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1643 (*crev)++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1644 if (*q++ & 0x80) q++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1645 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1646 while (q < p + len)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1647 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1648 (*clen)++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1649 if (*q++ & 0x80) q++;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1650 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1651 }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1652 #endif /* CANNA_MULE */