annotate src/mule-canna.c @ 2581:945d0d212fc8

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