annotate src/mule-canna.c @ 1324:70841e88fbee

[xemacs-hg @ 2003-02-24 12:42:34 by michaels] 2003-02-20 Mike Sperber <mike@xemacs.org> * Makefile.in.in (update-elc-2): Sequentialize dependencies even more.
author michaels
date Mon, 24 Feb 2003 12:42:39 +0000
parents 4f4c898836ab
children 34abfb24e891
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #include "canna/jrkanji.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #include "canna/RK.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 #else /* !CANNA2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #include "iroha/jrkanji.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 #include "iroha/RK.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 #endif /* !CANNA2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 extern char *jrKanjiError;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
170 /* #### is this global really necessary? */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 #define KEYTOSTRSIZE 2048
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
172 static unsigned char key_buffer[KEYTOSTRSIZE];
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 static char **warning;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 static int canna_empty_info, canna_through_info;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 static int canna_underline;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 static int canna_inhibit_hankakukana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 static Lisp_Object Vcanna_kakutei_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 static Lisp_Object Vcanna_kakutei_yomi;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 static Lisp_Object Vcanna_kakutei_romaji;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 static Lisp_Object Vcanna_henkan_string;
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
183 static Fixnum canna_henkan_length;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
184 static Fixnum canna_henkan_revPos;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
185 static Fixnum canna_henkan_revLen;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 static Lisp_Object Vcanna_ichiran_string;
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
187 static Fixnum canna_ichiran_length;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
188 static Fixnum canna_ichiran_revPos;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
189 static Fixnum canna_ichiran_revLen;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 static Lisp_Object Vcanna_mode_string;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 static int IRCP_context;
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 Lisp_Object storeResults (unsigned char *, int, jrKanjiStatus *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 static Lisp_Object kanjiYomiList (int, int);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
196 static Lisp_Object CANNA_mode_keys (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 static void m2c (unsigned char *, int, unsigned char *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 static Lisp_Object mule_make_string (unsigned char *, int);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 static int mule_strlen (unsigned char *, int);
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
202 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
203 #define make_string mule_make_string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 /* Lisp functions definition */
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 DEFUN ("canna-key-proc", Fcanna_key_proc, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 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
210 well-formed string and intermediate result to show the translation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 information to a user. Converted strings are stored in specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 (ch))
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 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 int len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 CHECK_CHAR_COERCE_INT (ch);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
220 len = jrKanjiString (0, XCHAR (ch), key_buffer, KEYTOSTRSIZE, &ks);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
221 return storeResults (key_buffer, len, &ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 storeResults (unsigned char *buf, int len, jrKanjiStatus *ks)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 Lisp_Object val = Qnil;
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 if (len < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 { /* Error detected */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 val = make_string ((unsigned char*) jrKanjiError, strlen (jrKanjiError));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
235 /* ³ÎÄꤷ¤¿Ê¸»úÎó (the confirmed string) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 Vcanna_kakutei_string = make_string (buf, len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 val = make_int (len);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
238 /* ³ÎÄꤷ¤¿Ê¸»úÎó¤ÎÆɤߤξðÊó...
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
239 (info about the reading of the confirmed string) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 Vcanna_kakutei_yomi = Vcanna_kakutei_romaji = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 if (ks->info & KanjiYomiInfo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 unsigned char *p = buf + len + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 int yomilen = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 if (len + yomilen + 1 < KEYTOSTRSIZE)
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 int yomilen2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
250 Vcanna_kakutei_yomi = make_string (p, yomilen); /* Æɤß
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
251 (reading) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 p += yomilen + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 yomilen2 = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 if (len + yomilen + yomilen2 + 2 < KEYTOSTRSIZE)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
256 Vcanna_kakutei_romaji = make_string (p, yomilen2);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
257 /* ¥í¡¼¥Þ»ú (romanization) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 }
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
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
263 /* ¸õÊäɽ¼¨¤Îʸ»úÎó¤Ç¤¹¡£
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
264 (string for displaying candidate translations) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 Vcanna_henkan_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 if (ks->length >= 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 Vcanna_henkan_string = make_string (ks->echoStr, ks->length);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 canna_henkan_length = ks->length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 canna_henkan_revPos = ks->revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 canna_henkan_revLen = ks->revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 if (canna_underline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 canna_henkan_length = mule_strlen (ks->echoStr,ks->length);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 canna_henkan_revPos = mule_strlen (ks->echoStr,ks->revPos);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
278 canna_henkan_revLen = mule_strlen (ks->echoStr+ks->revPos,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
279 ks->revLen);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 count_char (ks->echoStr, ks->length, ks->revPos, ks->revLen,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 &canna_henkan_length, &canna_henkan_revPos,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 &canna_henkan_revLen);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
290 /* °ìÍ÷¤Î¾ðÊó (information about the echo area menu) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 Vcanna_ichiran_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 if (ks->info & KanjiGLineInfo && ks->gline.length >= 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
294 Vcanna_ichiran_string = make_string (ks->gline.line,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
295 ks->gline.length);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 canna_ichiran_length = ks->gline.length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 canna_ichiran_revPos = ks->gline.revPos;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 canna_ichiran_revLen = ks->gline.revLen;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 count_char (ks->gline.line, ks->gline.length,
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
302 ks->gline.revPos, ks->gline.revLen,
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
303 &canna_ichiran_length,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 &canna_ichiran_revPos, &canna_ichiran_revLen);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
308 /* ¥â¡¼¥É¤Î¾ðÊó (mode information) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 Vcanna_mode_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 if (ks->info & KanjiModeInfo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 Vcanna_mode_string = make_string (ks->mode, strlen (ks->mode));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
315 /* ¤½¤Î¾¤Î¾ðÊó (other information) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 canna_empty_info = (ks->info & KanjiEmptyInfo) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 canna_through_info = (ks->info & KanjiThroughInfo) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 }
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 DEFUN ("canna-set-bunsetsu-kugiri", Fcanna_set_bunsetsu, 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 This function sets the clause separator.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 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
326 No separator will be used otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
330 int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */
428
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 kugiri = NILP (num) ? 0 : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri);
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 return Qnil;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 /* For whatever reason, calling Fding directly from libCanna loses */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
340 static void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
341 call_Fding (void)
428
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 Fding (Qnil, Qnil, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 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
347 Initialize ``canna'', which is a kana-to-kanji converter for XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 The first arg specifies if inserting space character between BUNSETSU when
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 candidates are displayed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 The second arg specifies server.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 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
352 description.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 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
354 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 (num, server, rcfile))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 int res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 unsigned char **p, **q;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
361 int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 IRCP_context = -1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 if (NILP (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 kugiri = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 kugiri = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 kugiri = (kugiri == 1) ? 1 : 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 }
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 if (NILP (server))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 jrKanjiControl (0, KC_SETSERVERNAME, (char *) 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 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 char servername[256];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 CHECK_STRING (server);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 strncpy (servername, XSTRING_DATA (server), XSTRING_LENGTH (server));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 servername[XSTRING_LENGTH (server)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 jrKanjiControl (0, KC_SETSERVERNAME, servername);
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 if (NILP (rcfile))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 jrKanjiControl (0, KC_SETINITFILENAME, (char *) 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 else
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 char rcname[256];
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 CHECK_STRING (rcfile);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 strncpy (rcname, XSTRING_DATA (rcfile), XSTRING_LENGTH (rcfile));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 rcname[XSTRING_LENGTH (rcfile)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 jrKanjiControl (0, KC_SETINITFILENAME, rcname);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 }
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 warning = (char **) 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 #ifdef nec_ews_svr4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 stop_polling ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 #endif /* nec_ews_svr4 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 res = jrKanjiControl (0, KC_INITIALIZE, (char *)&warning);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 #ifdef nec_ews_svr4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 start_polling ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 #endif /* nec_ews_svr4 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 if (warning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 for (p = q = (unsigned char **) warning ; *q ; q++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 ;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 while (p < q)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 q--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 val = Fcons (make_string (*q, strlen (*q)), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 val = Fcons (val, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 if (res == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 val = Fcons (make_string ((unsigned char*) jrKanjiError,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 strlen (jrKanjiError)), val);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
429 /* ¥¤¥Ë¥·¥ã¥é¥¤¥º¤Ç¼ºÇÔ¤·¤¿¾ì¹ç¡£ (on initialization failure) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 return Fcons (Qnil, val);
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 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
434 extern void (*jrBeepFunc) (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 jrBeepFunc = call_Fding;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 #ifdef KC_SETAPPNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 wcKanjiControl (0, KC_SETAPPNAME, "nemacs");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 wcKanjiControl (0, KC_SETAPPNAME, "mule");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 #endif /* KC_SETAPPNAME */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 jrKanjiControl (0, KC_SETWIDTH, (char *) 78);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 #else
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
451 /* mule ¤À¤Ã¤¿¤éȾ³Ñ¥«¥¿¥«¥Ê¤â»È¤¨¤ë
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
452 (Mule can use half-width katakana) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 if (canna_inhibit_hankakukana)
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 #endif
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
456 jrKanjiControl (0, KC_YOMIINFO, (char *) 2); /* ¢¨£²: ¥í¡¼¥Þ»ú¤Þ¤ÇÊÖ¤¹
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
457 (*2: return to
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
458 romanized form) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 val = Fcons (Qnil, val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 return Fcons (CANNA_mode_keys (), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 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
465 finalize ``canna'', which is a kana-to-kanji converter for XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 This cause to write miscellaneous informations to kana-to-kanji dictionary.
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 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 unsigned char **p;
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 jrKanjiControl (0, KC_FINALIZE, (char *)&warning);
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 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 if (warning)
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 for (p = (unsigned char**) warning ; *p ; p++)
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 = Fcons (make_string (*p, strlen (*p)), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 }
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 val = Fcons (val, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 IRCP_context = -1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 return val;
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 DEFUN ("canna-touroku-string", Fcanna_touroku_string, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 Register Kanji words into kana-to-kanji conversion dictionary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 (str))
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 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 int len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 unsigned char cbuf[4096];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500 CHECK_STRING (str);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
501 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 ks.echoStr = XSTRING_DATA (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 ks.length = XSTRING_LENGTH (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 ks.echoStr = cbuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 ks.length = strlen (cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 len = jrKanjiControl (0, KC_DEFINEKANJI, (char *)&ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
513 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 DEFUN ("canna-set-width", Fcanna_set_width, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 Set status-line width information, which is used to display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 kanji candidates.
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 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 CHECK_INT (num);
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 jrKanjiControl (0, KC_SETWIDTH, (char *) XINT (num));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 DEFUN ("canna-change-mode", Fcanna_change_mode, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 Change Japanese pre-edit mode.
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 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
538 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 jrKanjiControl (0, KC_CHANGEMODE, (char *)&ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
543 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
546 static Lisp_Object
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547 CANNA_mode_keys (void)
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 #define CANNAWORKBUFSIZE 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 char xxx[CANNAWORKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 int i, n;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 n = jrKanjiControl (0, KC_MODEKEYS, xxx);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 for (i = n ; i > 0 ;)
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 --i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 /* !!#### something fucked here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 val = Fcons (make_char ((int)(0xFF & (unsigned char) xxx[i])), val);
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 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 DEFUN ("canna-store-yomi", Fcanna_store_yomi, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566 Store yomi characters as a YOMI of kana-to-kanji conversion.
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 (yomi, roma))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
575 strncpy (key_buffer, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576 ks.length = XSTRING_LENGTH (yomi);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
577 key_buffer[ks.length] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
579 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), key_buffer);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
580 ks.length = strlen (key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583 if (NILP (roma))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 ks.mode = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589 CHECK_STRING (roma);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
592 strncpy (key_buffer + XSTRING_LENGTH (yomi) + 1, XSTRING_DATA (roma),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 XSTRING_LENGTH (roma));
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
594 key_buffer[XSTRING_LENGTH (yomi) + 1 + XSTRING_LENGTH (roma)] = '\0';
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
595 ks.mode = (unsigned char *)(key_buffer + XSTRING_LENGTH (yomi) + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
597 ks.mode = (unsigned char *)(key_buffer + ks.length + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 m2c (XSTRING_DATA (roma), XSTRING_LENGTH (roma), ks.mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
602 ks.echoStr = (unsigned char *) key_buffer;
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
603 ksv.buffer = (unsigned char *) key_buffer; /* ÊÖÃÍÍÑ (return value) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605 ksv.ks = &ks;
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 jrKanjiControl (0, KC_STOREYOMI, (char *)&ksv);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
609 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 DEFUN ("canna-do-function", Fcanna_do_function, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613 Do specified function at current mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 (num, ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 if (NILP (ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
624 *key_buffer = '@';
428
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 else
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 CHECK_CHAR (ch);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
629 *key_buffer = XCHAR (ch);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
632 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 jrKanjiControl (0, KC_DO, (char *) &ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
637 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640 DEFUN ("canna-parse", Fcanna_parse, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 Parse customize string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
642 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643 (str))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 unsigned char **p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 int n;
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 CHECK_STRING (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 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
652 strncpy (key_buffer, XSTRING_DATA (str), XSTRING_LENGTH (str));
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
653 key_buffer[XSTRING_LENGTH (str)] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
655 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656 #endif /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
657 p = (unsigned char**) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
658 n = jrKanjiControl (0, KC_PARSE, (char *) &p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
659 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
660 while (n > 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
661 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662 n--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
663 val = Fcons (make_string (p[n], strlen (p[n])), val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
664 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
665 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 DEFUN ("canna-query-mode", Fcanna_query_mode, 0, 0, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 Get current mode string.
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 ())
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 unsigned char buf[256];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 jrKanjiControl (0, KC_QUERYMODE, buf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 return make_string (buf, strlen (buf));
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 * Functions following this line are for KKCP interface compatible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 * library. These functions may be used by MILK system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684 #define RKBUFSIZE 1024
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 static unsigned char yomibuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 static short kugiri[RKBUFSIZE / 2];
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 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 confirmContext (void)
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 if (IRCP_context < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 int context;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 if ((context = jrKanjiControl (0, KC_GETCONTEXT, (char *) 0)) == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698 return 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 IRCP_context = 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 return 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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 byteLen (int bun, int len)
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 int i = 0, offset = 0, ch;
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 if (0 <= bun && bun < RKBUFSIZE)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 offset = kugiri[bun];
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715 while (len-- > 0 && (ch = (int) yomibuf[offset + i]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
717 i++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 if (ch & 0x80)
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 i++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
721 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 return i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
725
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
727 Return the result of kana-to-kanji conversion.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
728 Clause separator is set.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
730 (yomi))
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 int nbun;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
733
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
734 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
736 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
737 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 strncpy (yomibuf, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 yomibuf[XSTRING_LENGTH (yomi)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742 nbun = RkBgnBun (IRCP_context, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), yomibuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746 nbun = RkBgnBun (IRCP_context, (char *) yomibuf, strlen (yomibuf),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750 return kanjiYomiList (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
751 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
752
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
753 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
754 kanjiYomiList (int context, int nbun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
755 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756 Lisp_Object val, res = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
757 unsigned char RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758 int len, i, total;
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 for (i = nbun ; i > 0 ; )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
761 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
762 i--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
763 RkGoTo (context, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
764 len = RkGetKanji (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
765 val = make_string (RkBuf, len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
766 len = RkGetYomi (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
767 res = Fcons (Fcons (val, make_string (RkBuf, len)), res);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
768 if (i < RKBUFSIZE / 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
769 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
770 kugiri[i] = len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
771 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
772 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
773 for (i = 0, total = 0 ; i < nbun ; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
774 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
775 int temp = kugiri[i];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
776 kugiri[i] = total;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
777 total += temp;
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 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
780 }
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 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
783 Return the list of candidates.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
784 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785 (bunsetsu))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
786 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
787 int i, slen, len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
788 unsigned char *p, RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
789 Lisp_Object res = Qnil, endp;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
790
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
791 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
792 if (confirmContext () == 0)
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 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
795 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
796 RkGoTo (IRCP_context, XINT (bunsetsu));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
797 len = RkGetKanjiList (IRCP_context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
798 p = RkBuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
799 for (i = 0 ; i < len ; i++)
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 slen = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 if (NILP(res))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
803 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
804 endp = res = Fcons (make_string (p, slen), Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
805 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
808 endp = XCDR (res) = Fcons (make_string (p, slen), Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810 p += slen + 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
811 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
812 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
813 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
814
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
815 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
816 Specify the length of a clause.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
817 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
818 (bunsetsu, bunlen))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
819 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
820 int nbun, len;
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 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
823 CHECK_INT (bunlen);
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 nbun = XINT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
827 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
828 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
829 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
830 RkGoTo (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
831 len = byteLen (nbun, XINT (bunlen));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
832 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
833 }
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 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
836 Select a candidate.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 (bun, kouho))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
839 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840 int nbun, nkouho;
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 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846 nbun = XINT(bun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847 RkGoTo (IRCP_context, nbun);
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 nkouho = XINT(kouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850 RkXfer (IRCP_context, nkouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851 return Qt;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
854 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
855 End conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
858 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859 if (confirmContext () == 0)
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 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862 }
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
863 RkEndBun (IRCP_context, 1); /* ³Ø½¬¤Ï¤¤¤Ä¤Ç¤â¹Ô¤Ã¤ÆÎɤ¤¤â¤Î¤Ê¤Î¤«¡©
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
864 (is it OK to invoke learning function
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
865 at arbitrary times?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
866 return Qt;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
869 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
870 Quit conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
871 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
872 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
873 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874 if (confirmContext () == 0)
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 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
877 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
878 RkEndBun (IRCP_context, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
879 return Qt;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 /* variables below this line is constants of Canna */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
883
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
884 static Fixnum canna_mode_AlphaMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
885 static Fixnum canna_mode_EmptyMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
886 static Fixnum canna_mode_KigoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
887 static Fixnum canna_mode_YomiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
888 static Fixnum canna_mode_JishuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
889 static Fixnum canna_mode_TankouhoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
890 static Fixnum canna_mode_IchiranMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
891 static Fixnum canna_mode_YesNoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
892 static Fixnum canna_mode_OnOffMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
893 #ifdef CANNA_MODE_AdjustBunsetsuMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
894 static Fixnum canna_mode_AdjustBunsetsuMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
895 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
896 #ifdef CANNA_MODE_ChikujiYomiMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
897 static Fixnum canna_mode_ChikujiYomiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
898 static Fixnum canna_mode_ChikujiTanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
899 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
900
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
901 static Fixnum canna_mode_HenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
902 #ifdef CANNA_MODE_HenkanNyuryokuMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
903 static Fixnum canna_mode_HenkanNyuryokuMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
904 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905 #ifdef CANNA_MODE_ZenHiraHenkanMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
906 static Fixnum canna_mode_ZenHiraHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
907 #ifdef CANNA_MODE_HanHiraHenkanMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
908 static Fixnum canna_mode_HanHiraHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
909 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
910 static Fixnum canna_mode_ZenKataHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
911 static Fixnum canna_mode_HanKataHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
912 static Fixnum canna_mode_ZenAlphaHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
913 static Fixnum canna_mode_HanAlphaHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
914 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
915 static Fixnum canna_mode_ZenHiraKakuteiMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
916 #ifdef CANNA_MODE_HanHiraKakuteiMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
917 static Fixnum canna_mode_HanHiraKakuteiMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
918 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
919 static Fixnum canna_mode_ZenKataKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
920 static Fixnum canna_mode_HanKataKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
921 static Fixnum canna_mode_ZenAlphaKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
922 static Fixnum canna_mode_HanAlphaKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
923 static Fixnum canna_mode_HexMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
924 static Fixnum canna_mode_BushuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
925 static Fixnum canna_mode_ExtendMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
926 static Fixnum canna_mode_RussianMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
927 static Fixnum canna_mode_GreekMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
928 static Fixnum canna_mode_LineMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
929 static Fixnum canna_mode_ChangingServerMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
930 static Fixnum canna_mode_HenkanMethodMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
931 static Fixnum canna_mode_DeleteDicMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
932 static Fixnum canna_mode_TourokuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
933 static Fixnum canna_mode_TourokuEmptyMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
934 static Fixnum canna_mode_TourokuHinshiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
935 static Fixnum canna_mode_TourokuDicMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
936 static Fixnum canna_mode_QuotedInsertMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
937 static Fixnum canna_mode_BubunMuhenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
938 static Fixnum canna_mode_MountDicMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
939
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
940 static Fixnum canna_fn_SelfInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
941 static Fixnum canna_fn_FunctionalInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
942 static Fixnum canna_fn_QuotedInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
943 static Fixnum canna_fn_JapaneseMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
944 static Fixnum canna_fn_AlphaMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
945 static Fixnum canna_fn_HenkanNyuryokuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
946 static Fixnum canna_fn_Forward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
947 static Fixnum canna_fn_Backward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
948 static Fixnum canna_fn_Next;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
949 static Fixnum canna_fn_Prev;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
950 static Fixnum canna_fn_BeginningOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
951 static Fixnum canna_fn_EndOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
952 static Fixnum canna_fn_DeleteNext;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
953 static Fixnum canna_fn_DeletePrevious;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
954 static Fixnum canna_fn_KillToEndOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
955 static Fixnum canna_fn_Henkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
956 static Fixnum canna_fn_Kakutei;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
957 static Fixnum canna_fn_Extend;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
958 static Fixnum canna_fn_Shrink;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
959 #ifdef CANNA_FN_AdjustBunsetsu
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
960 static Fixnum canna_fn_AdjustBunsetsu;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
961 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
962 static Fixnum canna_fn_Quit;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
963 static Fixnum canna_fn_ConvertAsHex;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
964 static Fixnum canna_fn_ConvertAsBushu;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
965 static Fixnum canna_fn_KouhoIchiran;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
966 static Fixnum canna_fn_BubunMuhenkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
967 static Fixnum canna_fn_Zenkaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
968 static Fixnum canna_fn_Hankaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
969 static Fixnum canna_fn_ToUpper;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
970 static Fixnum canna_fn_Capitalize;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
971 static Fixnum canna_fn_ToLower;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
972 static Fixnum canna_fn_Hiragana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
973 static Fixnum canna_fn_Katakana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
974 static Fixnum canna_fn_Romaji;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
975 #ifdef CANNA_FN_BaseHiragana
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
976 static Fixnum canna_fn_BaseHiragana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
977 static Fixnum canna_fn_BaseKatakana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
978 static Fixnum canna_fn_BaseEisu;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
979 static Fixnum canna_fn_BaseZenkaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
980 static Fixnum canna_fn_BaseHankaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
981 static Fixnum canna_fn_BaseKana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
982 static Fixnum canna_fn_BaseKakutei;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
983 static Fixnum canna_fn_BaseHenkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
984 static Fixnum canna_fn_BaseHiraKataToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
985 static Fixnum canna_fn_BaseZenHanToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
986 static Fixnum canna_fn_BaseKanaEisuToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
987 static Fixnum canna_fn_BaseKakuteiHenkanToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
988 static Fixnum canna_fn_BaseRotateForward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
989 static Fixnum canna_fn_BaseRotateBackward;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
990 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
991 static Fixnum canna_fn_ExtendMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
992 static Fixnum canna_fn_Touroku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
993 static Fixnum canna_fn_HexMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
994 static Fixnum canna_fn_BushuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
995 static Fixnum canna_fn_KigouMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
996 #ifdef CANNA_FN_Mark
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
997 static Fixnum canna_fn_Mark;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
998 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
999 #ifdef CANNA_FN_TemporalMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1000 static Fixnum canna_fn_TemporalMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1001 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1002
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1003 static Fixnum canna_key_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1004 static Fixnum canna_key_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1005 static Fixnum canna_key_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1006 static Fixnum canna_key_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1007 static Fixnum canna_key_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1008 static Fixnum canna_key_Down;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1009 static Fixnum canna_key_Insert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1010 static Fixnum canna_key_Rollup;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1011 static Fixnum canna_key_Rolldown;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1012 static Fixnum canna_key_Home;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1013 static Fixnum canna_key_Help;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1014 static Fixnum canna_key_KP_Key;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1015 static Fixnum canna_key_Shift_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1016 static Fixnum canna_key_Shift_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1017 static Fixnum canna_key_Shift_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1018 static Fixnum canna_key_Shift_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1019 static Fixnum canna_key_Shift_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1020 static Fixnum canna_key_Shift_Down;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1021 static Fixnum canna_key_Cntrl_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1022 static Fixnum canna_key_Cntrl_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1023 static Fixnum canna_key_Cntrl_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1024 static Fixnum canna_key_Cntrl_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1025 static Fixnum canna_key_Cntrl_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1026 static Fixnum canna_key_Cntrl_Down;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1027
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1028 Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1029 1996/6/7 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1030
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1031 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 syms_of_mule_canna (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1033 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1034 DEFSUBR (Fcanna_key_proc);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 DEFSUBR (Fcanna_initialize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036 DEFSUBR (Fcanna_finalize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 DEFSUBR (Fcanna_touroku_string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 DEFSUBR (Fcanna_set_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039 DEFSUBR (Fcanna_change_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 DEFSUBR (Fcanna_store_yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041 DEFSUBR (Fcanna_do_function);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 DEFSUBR (Fcanna_parse);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1043 DEFSUBR (Fcanna_query_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 DEFSUBR (Fcanna_set_bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046 DEFSUBR (Fcanna_henkan_begin);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047 DEFSUBR (Fcanna_henkan_next);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1048 DEFSUBR (Fcanna_bunsetu_henkou);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1049 DEFSUBR (Fcanna_henkan_kakutei);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1050 DEFSUBR (Fcanna_henkan_end);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1051 DEFSUBR (Fcanna_henkan_quit);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1052 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1053
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1054 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1055 vars_of_mule_canna (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1056 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1057 DEFVAR_LISP ("CANNA", &VCANNA); /* hir@nec, 1992.5.21 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1058 VCANNA = Qt; /* hir@nec, 1992.5.21 */
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 DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1061
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1062 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1063 Vcanna_kakutei_string = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1064
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1065 DEFVAR_LISP ("canna-kakutei-yomi", &Vcanna_kakutei_yomi /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1068 Vcanna_kakutei_yomi = Qnil;
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 DEFVAR_LISP ("canna-kakutei-romaji", &Vcanna_kakutei_romaji /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1073 Vcanna_kakutei_romaji = Qnil;
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 DEFVAR_LISP ("canna-henkan-string", &Vcanna_henkan_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1078 Vcanna_henkan_string = Qnil;
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 DEFVAR_INT ("canna-henkan-length", &canna_henkan_length /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1083 canna_henkan_length = 0;
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 DEFVAR_INT ("canna-henkan-revpos", &canna_henkan_revPos /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1088 canna_henkan_revPos = 0;
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 DEFVAR_INT ("canna-henkan-revlen", &canna_henkan_revLen /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1093 canna_henkan_revLen = 0;
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 DEFVAR_LISP ("canna-ichiran-string", &Vcanna_ichiran_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1098 Vcanna_ichiran_string = Qnil;
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 DEFVAR_INT ("canna-ichiran-length", &canna_ichiran_length /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1103 canna_ichiran_length = 0;
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 DEFVAR_INT ("canna-ichiran-revpos", &canna_ichiran_revPos /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1108 canna_ichiran_revPos = 0;
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 DEFVAR_INT ("canna-ichiran-revlen", &canna_ichiran_revLen /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1113 canna_ichiran_revLen = 0;
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 DEFVAR_LISP ("canna-mode-string", &Vcanna_mode_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1118 Vcanna_mode_string = Qnil;
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 DEFVAR_BOOL ("canna-empty-info", &canna_empty_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1121 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1122 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1123 canna_empty_info = 0;
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 DEFVAR_BOOL ("canna-through-info", &canna_through_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1126 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1127 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1128 canna_through_info = 0;
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 DEFVAR_BOOL ("canna-underline", &canna_underline /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1131 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1132 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1133 canna_underline = 0;
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 DEFVAR_BOOL ("canna-inhibit-hankakukana", &canna_inhibit_hankakukana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1136 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1137 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1138 canna_inhibit_hankakukana = 0;
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 DEFVAR_INT ("canna-mode-alpha-mode", &canna_mode_AlphaMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1143 canna_mode_AlphaMode = IROHA_MODE_AlphaMode;
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 DEFVAR_INT ("canna-mode-empty-mode", &canna_mode_EmptyMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1148 canna_mode_EmptyMode = IROHA_MODE_EmptyMode;
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 DEFVAR_INT ("canna-mode-kigo-mode", &canna_mode_KigoMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1153 canna_mode_KigoMode = IROHA_MODE_KigoMode;
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 DEFVAR_INT ("canna-mode-yomi-mode", &canna_mode_YomiMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1158 canna_mode_YomiMode = IROHA_MODE_YomiMode;
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 DEFVAR_INT ("canna-mode-jishu-mode", &canna_mode_JishuMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1163 canna_mode_JishuMode = IROHA_MODE_JishuMode;
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 DEFVAR_INT ("canna-mode-tankouho-mode", &canna_mode_TankouhoMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1168 canna_mode_TankouhoMode = IROHA_MODE_TankouhoMode;
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 DEFVAR_INT ("canna-mode-ichiran-mode", &canna_mode_IchiranMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1173 canna_mode_IchiranMode = IROHA_MODE_IchiranMode;
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 DEFVAR_INT ("canna-mode-yes-no-mode", &canna_mode_YesNoMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1178 canna_mode_YesNoMode = IROHA_MODE_YesNoMode;
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 DEFVAR_INT ("canna-mode-on-off-mode", &canna_mode_OnOffMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1183 canna_mode_OnOffMode = IROHA_MODE_OnOffMode;
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 #ifdef CANNA_MODE_AdjustBunsetsuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1186 DEFVAR_INT ("canna-mode-adjust-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1187 &canna_mode_AdjustBunsetsuMode /*
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_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1191 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1192 #ifdef CANNA_MODE_ChikujiYomiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1193 DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &canna_mode_ChikujiYomiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1194
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 canna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1198 DEFVAR_INT ("canna-mode-chikuji-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1199 &canna_mode_ChikujiTanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1201 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1202 canna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1203 #endif
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-henkan-mode", &canna_mode_HenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1206
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 canna_mode_HenkanMode = IROHA_MODE_HenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1210 #ifdef CANNA_MODE_HenkanNyuryokuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1211 DEFVAR_INT ("canna-mode-henkan-nyuuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1212 &canna_mode_HenkanNyuryokuMode /*
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_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1216 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1217 #ifdef CANNA_MODE_ZenHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1218 DEFVAR_INT ("canna-mode-zen-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1219 &canna_mode_ZenHiraHenkanMode /*
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_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1223 #ifdef CANNA_MODE_HanHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1224 DEFVAR_INT ("canna-mode-han-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1225 &canna_mode_HanHiraHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1226
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1227 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1228 canna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1229 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1230 DEFVAR_INT ("canna-mode-zen-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1231 &canna_mode_ZenKataHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1233 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1234 canna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1236 DEFVAR_INT ("canna-mode-han-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1237 &canna_mode_HanKataHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1239 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1240 canna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1242 DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1243 &canna_mode_ZenAlphaHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1244
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 canna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1247
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1248 DEFVAR_INT ("canna-mode-han-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1249 &canna_mode_HanAlphaHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1250
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 canna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1253 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1254 DEFVAR_INT ("canna-mode-zen-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1255 &canna_mode_ZenHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1256
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 canna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1259 #ifdef CANNA_MODE_HanHiraKakuteiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1260 DEFVAR_INT ("canna-mode-han-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1261 &canna_mode_HanHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1262
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1263 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1264 canna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1265 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1266 DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1267 &canna_mode_ZenKataKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1269 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1270 canna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1271
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1272 DEFVAR_INT ("canna-mode-han-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1273 &canna_mode_HanKataKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1275 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1276 canna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1278 DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1279 &canna_mode_ZenAlphaKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1281 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1282 canna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1284 DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1285 &canna_mode_HanAlphaKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1286
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 canna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1290 DEFVAR_INT ("canna-mode-hex-mode", &canna_mode_HexMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1291
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1292 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1293 canna_mode_HexMode = IROHA_MODE_HexMode;
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 DEFVAR_INT ("canna-mode-bushu-mode", &canna_mode_BushuMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1298 canna_mode_BushuMode = IROHA_MODE_BushuMode;
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 DEFVAR_INT ("canna-mode-extend-mode", &canna_mode_ExtendMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1303 canna_mode_ExtendMode = IROHA_MODE_ExtendMode;
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 DEFVAR_INT ("canna-mode-russian-mode", &canna_mode_RussianMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1308 canna_mode_RussianMode = IROHA_MODE_RussianMode;
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 DEFVAR_INT ("canna-mode-greek-mode", &canna_mode_GreekMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1313 canna_mode_GreekMode = IROHA_MODE_GreekMode;
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 DEFVAR_INT ("canna-mode-line-mode", &canna_mode_LineMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1318 canna_mode_LineMode = IROHA_MODE_LineMode;
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 DEFVAR_INT ("canna-mode-changing-server-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1321 &canna_mode_ChangingServerMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1323 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1324 canna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1326 DEFVAR_INT ("canna-mode-henkan-method-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1327 &canna_mode_HenkanMethodMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1328
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 canna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1331
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1332 DEFVAR_INT ("canna-mode-delete-dic-mode", &canna_mode_DeleteDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1333
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1334 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1335 canna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode;
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 DEFVAR_INT ("canna-mode-touroku-mode", &canna_mode_TourokuMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1340 canna_mode_TourokuMode = IROHA_MODE_TourokuMode;
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 DEFVAR_INT ("canna-mode-touroku-empty-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1343 &canna_mode_TourokuEmptyMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1345 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1346 canna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1348 DEFVAR_INT ("canna-mode-touroku-hinshi-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1349 &canna_mode_TourokuHinshiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1350
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 canna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1353
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1354 DEFVAR_INT ("canna-mode-touroku-dic-mode", &canna_mode_TourokuDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1355
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1356 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1357 canna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode;
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 DEFVAR_INT ("canna-mode-quoted-insert-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1360 &canna_mode_QuotedInsertMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1362 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1363 canna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1364
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1365 DEFVAR_INT ("canna-mode-bubun-muhenkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1366 &canna_mode_BubunMuhenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1367
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 canna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1370
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1371 DEFVAR_INT ("canna-mode-mount-dic-mode", &canna_mode_MountDicMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1372
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1373 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1374 canna_mode_MountDicMode = IROHA_MODE_MountDicMode;
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 DEFVAR_INT ("canna-func-self-insert", &canna_fn_SelfInsert /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1379 canna_fn_SelfInsert = IROHA_FN_SelfInsert;
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 DEFVAR_INT ("canna-func-functional-insert", &canna_fn_FunctionalInsert /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1384 canna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert;
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 DEFVAR_INT ("canna-func-quoted-insert", &canna_fn_QuotedInsert /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1389 canna_fn_QuotedInsert = IROHA_FN_QuotedInsert;
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 DEFVAR_INT ("canna-func-japanese-mode", &canna_fn_JapaneseMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1394 canna_fn_JapaneseMode = IROHA_FN_JapaneseMode;
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 DEFVAR_INT ("canna-func-alpha-mode", &canna_fn_AlphaMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1399 canna_fn_AlphaMode = IROHA_FN_AlphaMode;
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 DEFVAR_INT ("canna-func-henkan-nyuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1402 &canna_fn_HenkanNyuryokuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1403
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 canna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1406
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1407 DEFVAR_INT ("canna-func-forward", &canna_fn_Forward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1408
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1409 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1410 canna_fn_Forward = IROHA_FN_Forward;
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 DEFVAR_INT ("canna-func-backward", &canna_fn_Backward /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1415 canna_fn_Backward = IROHA_FN_Backward;
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 DEFVAR_INT ("canna-func-next", &canna_fn_Next /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1420 canna_fn_Next = IROHA_FN_Next;
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 DEFVAR_INT ("canna-func-previous", &canna_fn_Prev /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1425 canna_fn_Prev = IROHA_FN_Prev;
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 DEFVAR_INT ("canna-func-beginning-of-line", &canna_fn_BeginningOfLine /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1430 canna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine;
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 DEFVAR_INT ("canna-func-end-of-line", &canna_fn_EndOfLine /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1435 canna_fn_EndOfLine = IROHA_FN_EndOfLine;
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 DEFVAR_INT ("canna-func-delete-next", &canna_fn_DeleteNext /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1440 canna_fn_DeleteNext = IROHA_FN_DeleteNext;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1441
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 458
diff changeset
1442 DEFVAR_INT ("canna-func-delete-previous", &canna_fn_DeletePrevious /*
428
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1445 canna_fn_DeletePrevious = IROHA_FN_DeletePrevious;
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 DEFVAR_INT ("canna-func-kill-to-end-of-line", &canna_fn_KillToEndOfLine /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1448
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1449 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1450 canna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine;
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 DEFVAR_INT ("canna-func-henkan", &canna_fn_Henkan /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1455 canna_fn_Henkan = IROHA_FN_Henkan;
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 DEFVAR_INT ("canna-func-kakutei", &canna_fn_Kakutei /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1460 canna_fn_Kakutei = IROHA_FN_Kakutei;
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 DEFVAR_INT ("canna-func-extend", &canna_fn_Extend /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1465 canna_fn_Extend = IROHA_FN_Extend;
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 DEFVAR_INT ("canna-func-shrink", &canna_fn_Shrink /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1470 canna_fn_Shrink = IROHA_FN_Shrink;
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 #ifdef CANNA_FN_AdjustBunsetsu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1473 DEFVAR_INT ("canna-func-adjust-bunsetsu", &canna_fn_AdjustBunsetsu /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1474
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 canna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1477 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1478 DEFVAR_INT ("canna-func-quit", &canna_fn_Quit /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1479
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1480 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1481 canna_fn_Quit = IROHA_FN_Quit;
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 DEFVAR_INT ("canna-func-convert-as-hex", &canna_fn_ConvertAsHex /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1484
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1485 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1486 canna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex;
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 DEFVAR_INT ("canna-func-convert-as-bushu", &canna_fn_ConvertAsBushu /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1491 canna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu;
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 DEFVAR_INT ("canna-func-kouho-ichiran", &canna_fn_KouhoIchiran /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1496 canna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran;
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 DEFVAR_INT ("canna-func-bubun-muhenkan", &canna_fn_BubunMuhenkan /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1501 canna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan;
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 DEFVAR_INT ("canna-func-zenkaku", &canna_fn_Zenkaku /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1506 canna_fn_Zenkaku = IROHA_FN_Zenkaku;
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 DEFVAR_INT ("canna-func-hankaku", &canna_fn_Hankaku /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1511 canna_fn_Hankaku = IROHA_FN_Hankaku;
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 DEFVAR_INT ("canna-func-to-upper", &canna_fn_ToUpper /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1516 canna_fn_ToUpper = IROHA_FN_ToUpper;
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 DEFVAR_INT ("canna-func-capitalize", &canna_fn_Capitalize /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1521 canna_fn_Capitalize = IROHA_FN_Capitalize;
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 DEFVAR_INT ("canna-func-to-lower", &canna_fn_ToLower /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1526 canna_fn_ToLower = IROHA_FN_ToLower;
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 DEFVAR_INT ("canna-func-hiragana", &canna_fn_Hiragana /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1531 canna_fn_Hiragana = IROHA_FN_Hiragana;
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 DEFVAR_INT ("canna-func-katakana", &canna_fn_Katakana /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1536 canna_fn_Katakana = IROHA_FN_Katakana;
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 DEFVAR_INT ("canna-func-romaji", &canna_fn_Romaji /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1541 canna_fn_Romaji = IROHA_FN_Romaji;
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 #ifdef CANNA_FN_BaseHiragana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1544 DEFVAR_INT ("canna-func-base-hiragana", &canna_fn_BaseHiragana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1545
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 canna_fn_BaseHiragana = CANNA_FN_BaseHiragana;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1549 DEFVAR_INT ("canna-func-base-katakana", &canna_fn_BaseKatakana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1550
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1551 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1552 canna_fn_BaseKatakana = CANNA_FN_BaseKatakana;
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 DEFVAR_INT ("canna-func-base-eisu", &canna_fn_BaseEisu /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1557 canna_fn_BaseEisu = CANNA_FN_BaseEisu;
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 DEFVAR_INT ("canna-func-base-zenkaku", &canna_fn_BaseZenkaku /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1562 canna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku;
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 DEFVAR_INT ("canna-func-base-hankaku", &canna_fn_BaseHankaku /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1567 canna_fn_BaseHankaku = CANNA_FN_BaseHankaku;
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 DEFVAR_INT ("canna-func-base-kana", &canna_fn_BaseKana /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1572 canna_fn_BaseKana = CANNA_FN_BaseKana;
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 DEFVAR_INT ("canna-func-base-kakutei", &canna_fn_BaseKakutei /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1577 canna_fn_BaseKakutei = CANNA_FN_BaseKakutei;
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 DEFVAR_INT ("canna-func-base-henkan", &canna_fn_BaseHenkan /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1582 canna_fn_BaseHenkan = CANNA_FN_BaseHenkan;
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 DEFVAR_INT ("canna-func-base-hiragana-katakana-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1585 &canna_fn_BaseHiraKataToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1587 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1588 canna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1589
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1590 DEFVAR_INT ("canna-func-base-zenkaku-hankaku-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1591 &canna_fn_BaseZenHanToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1593 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1594 canna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1595
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1596 DEFVAR_INT ("canna-func-base-kana-eisu-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1597 &canna_fn_BaseKanaEisuToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1598
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1599 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1600 canna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1601
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1602 DEFVAR_INT ("canna-func-base-kakutei-henkan-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1603 &canna_fn_BaseKakuteiHenkanToggle /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1604
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1605 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1606 canna_fn_BaseKakuteiHenkanToggle = CANNA_FN_BaseKakuteiHenkanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1607
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1608 DEFVAR_INT ("canna-func-base-rotate-forward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1609 &canna_fn_BaseRotateForward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1610
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1611 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1612 canna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1613
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1614 DEFVAR_INT ("canna-func-base-rotate-backward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1615 &canna_fn_BaseRotateBackward /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1616
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1617 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1618 canna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1619
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1620 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1621 DEFVAR_INT ("canna-func-extend-mode", &canna_fn_ExtendMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1622
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 canna_fn_ExtendMode = IROHA_FN_ExtendMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1625
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1626 DEFVAR_INT ("canna-func-touroku", &canna_fn_Touroku /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1627
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1628 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1629 canna_fn_Touroku = IROHA_FN_Touroku;
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 DEFVAR_INT ("canna-func-hex-mode", &canna_fn_HexMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1634 canna_fn_HexMode = IROHA_FN_HexMode;
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 DEFVAR_INT ("canna-func-bushu-mode", &canna_fn_BushuMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1639 canna_fn_BushuMode = IROHA_FN_BushuMode;
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 DEFVAR_INT ("canna-func-kigo-mode", &canna_fn_KigouMode /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1644 canna_fn_KigouMode = IROHA_FN_KigouMode;
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 #ifdef CANNA_FN_Mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1647 DEFVAR_INT ("canna-func-mark", &canna_fn_Mark /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1648
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 canna_fn_Mark = CANNA_FN_Mark;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1651 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1652 #ifdef CANNA_FN_TemporalMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1653 DEFVAR_INT ("canna-func-temporal-mode", &canna_fn_TemporalMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1654
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1655 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1656 canna_fn_TemporalMode = CANNA_FN_TemporalMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1657 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1658
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1659 DEFVAR_INT ("canna-key-nfer", &canna_key_Nfer /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1660
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 canna_key_Nfer = IROHA_KEY_Nfer;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1663
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1664 DEFVAR_INT ("canna-key-xfer", &canna_key_Xfer /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1667 canna_key_Xfer = IROHA_KEY_Xfer;
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 DEFVAR_INT ("canna-key-up", &canna_key_Up /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1672 canna_key_Up = IROHA_KEY_Up;
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 DEFVAR_INT ("canna-key-left", &canna_key_Left /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1677 canna_key_Left = IROHA_KEY_Left;
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 DEFVAR_INT ("canna-key-right", &canna_key_Right /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1682 canna_key_Right = IROHA_KEY_Right;
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 DEFVAR_INT ("canna-key-down", &canna_key_Down /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1687 canna_key_Down = IROHA_KEY_Down;
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 DEFVAR_INT ("canna-key-insert", &canna_key_Insert /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1692 canna_key_Insert = IROHA_KEY_Insert;
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 DEFVAR_INT ("canna-key-rollup", &canna_key_Rollup /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1697 canna_key_Rollup = IROHA_KEY_Rollup;
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 DEFVAR_INT ("canna-key-rolldown", &canna_key_Rolldown /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1702 canna_key_Rolldown = IROHA_KEY_Rolldown;
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 DEFVAR_INT ("canna-key-home", &canna_key_Home /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1707 canna_key_Home = IROHA_KEY_Home;
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 DEFVAR_INT ("canna-key-help", &canna_key_Help /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1712 canna_key_Help = IROHA_KEY_Help;
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 DEFVAR_INT ("canna-key-kp-key", &canna_key_KP_Key /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1717 canna_key_KP_Key = IROHA_KEY_KP_Key;
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 DEFVAR_INT ("canna-key-shift-nfer", &canna_key_Shift_Nfer /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1722 canna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer;
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 DEFVAR_INT ("canna-key-shift-xfer", &canna_key_Shift_Xfer /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1727 canna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer;
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 DEFVAR_INT ("canna-key-shift-up", &canna_key_Shift_Up /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1732 canna_key_Shift_Up = IROHA_KEY_Shift_Up;
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 DEFVAR_INT ("canna-key-shift-left", &canna_key_Shift_Left /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1737 canna_key_Shift_Left = IROHA_KEY_Shift_Left;
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 DEFVAR_INT ("canna-key-shift-right", &canna_key_Shift_Right /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1742 canna_key_Shift_Right = IROHA_KEY_Shift_Right;
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 DEFVAR_INT ("canna-key-shift-down", &canna_key_Shift_Down /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1747 canna_key_Shift_Down = IROHA_KEY_Shift_Down;
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 DEFVAR_INT ("canna-key-control-nfer", &canna_key_Cntrl_Nfer /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1752 canna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer;
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 DEFVAR_INT ("canna-key-control-xfer", &canna_key_Cntrl_Xfer /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1757 canna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer;
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 DEFVAR_INT ("canna-key-control-up", &canna_key_Cntrl_Up /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1762 canna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up;
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 DEFVAR_INT ("canna-key-control-left", &canna_key_Cntrl_Left /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1767 canna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left;
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 DEFVAR_INT ("canna-key-control-right", &canna_key_Cntrl_Right /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1772 canna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right;
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 DEFVAR_INT ("canna-key-control-down", &canna_key_Cntrl_Down /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1777 canna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down;
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 Fprovide(intern("CANNA"));
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1782 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1783 /* To handle MULE internal code and EUC.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1784 I assume CANNA can handle only Japanese EUC. */
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 /* EUC multibyte string to MULE internal string */
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 static void
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1789 c2mu (unsigned char *cp, int l, unsigned char *mp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1790 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1791 unsigned char ch, *ep = cp+l;
428
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 while ((cp < ep) && (ch = *cp))
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 if ((unsigned char) ch == ISO_CODE_SS2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1796 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1797 *mp++ = LEADING_BYTE_KATAKANA_JISX0201;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1798 cp++;
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 else if ((unsigned char) ch == ISO_CODE_SS3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1801 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1802 *mp++ = LEADING_BYTE_JAPANESE_JISX0212;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1803 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1804 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1805 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1806 else if (ch & 0x80)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1807 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1808 *mp++ = LEADING_BYTE_JAPANESE_JISX0208;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1809 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1810 }
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 *mp = 0;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1816 /* MULE internal string to EUC multibyte string */
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 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1819 m2c (unsigned char *mp, int l, unsigned char *cp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1820 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1821 unsigned char ch, *ep = mp + l;
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 while ((mp < ep) && (ch = *mp++))
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 switch (ch)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1826 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1827 case LEADING_BYTE_KATAKANA_JISX0201:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1828 *cp++ = ISO_CODE_SS2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1829 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1830 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1831 case LEADING_BYTE_JAPANESE_JISX0212:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1832 *cp++ = ISO_CODE_SS3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1833 case LEADING_BYTE_JAPANESE_JISX0208:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1834 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1835 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1836 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1837 default:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1838 *cp++ = ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1839 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1840 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1841 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1842 *cp = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1843 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1844
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1845 #undef make_string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1846
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1847 /* make_string after converting EUC string to MULE internal string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1848 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1849 mule_make_string (unsigned char *p, int l)
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 unsigned char cbuf[4096];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1852
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1853 c2mu (p,l,cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1854 return (make_string (cbuf,strlen (cbuf)));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1855 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1856
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1857 /* return the MULE internal string length of EUC string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1858 /* Modified by sb to return a character count not byte count. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1859 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1860 mule_strlen (unsigned char *p, int l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1861 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1862 unsigned char ch, *cp = p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1863 int len = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1864
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1865 while ((cp < p + l) && (ch = *cp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1866 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1867 if ((unsigned char) ch == ISO_CODE_SS2)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1870 cp += 2;
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 else if ((unsigned char) ch == ISO_CODE_SS3)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1875 cp += 3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1876 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1877 else if (ch & 0x80)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1880 cp += 2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1881 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1882 else
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1885 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1886 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1887 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1888 return (len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1889 }
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 /* count number of characters */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1892 static void
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1893 count_char (unsigned char *p, int len, int pos, int rev,
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1894 Fixnum *clen, Fixnum *cpos, Fixnum *crev)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1895 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1896 unsigned char *q = p;
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 *clen = *cpos = *crev = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1899 if (len == 0) return;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1900 while (q < p + pos)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1901 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1902 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1903 (*cpos)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1904 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1905 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1906 while (q < p + pos + rev)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1907 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1908 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1909 (*crev)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1910 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1911 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1912 while (q < p + len)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1913 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1914 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1915 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1916 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1917 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1918 #endif /* CANNA_MULE */