annotate src/mule-canna.c @ 838:bf645ed7cfe3

[xemacs-hg @ 2002-05-14 09:28:06 by ben] revert-buffer, others files.el: Andy's patch from 21.4. Fix evil nasty problems with revert-buffer. menubar-items.el: Add Append to Register to Rectangles/Register menu. config.h.in, font-lock.c: Reenable font-lock code since it's used by mouse.el. The flag for this exists in config.h.in but not currently controllable through configure.
author ben
date Tue, 14 May 2002 09:28:14 +0000
parents e38acbeb1cae
children 4f4c898836ab
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 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 unsigned char cbuf[4096];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 CHECK_STRING (str);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
502 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 ks.echoStr = XSTRING_DATA (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 ks.length = XSTRING_LENGTH (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 ks.echoStr = cbuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 ks.length = strlen (cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 len = jrKanjiControl (0, KC_DEFINEKANJI, (char *)&ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
514 return storeResults (key_buffer, ksv.val, ksv.ks);
428
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 DEFUN ("canna-set-width", Fcanna_set_width, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 Set status-line width information, which is used to display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 kanji candidates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 jrKanjiControl (0, KC_SETWIDTH, (char *) XINT (num));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 return Qnil;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 DEFUN ("canna-change-mode", Fcanna_change_mode, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 Change Japanese pre-edit mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 (num))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
540 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 jrKanjiControl (0, KC_CHANGEMODE, (char *)&ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
545 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
546 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
548 static Lisp_Object
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 CANNA_mode_keys (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 #define CANNAWORKBUFSIZE 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 char xxx[CANNAWORKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 int i, n;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 n = jrKanjiControl (0, KC_MODEKEYS, xxx);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 for (i = n ; i > 0 ;)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 --i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561 /* !!#### something fucked here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562 val = Fcons (make_char ((int)(0xFF & (unsigned char) xxx[i])), 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 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 DEFUN ("canna-store-yomi", Fcanna_store_yomi, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
568 Store yomi characters as a YOMI of kana-to-kanji conversion.
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 (yomi, roma))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
575 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
577 strncpy (key_buffer, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 ks.length = XSTRING_LENGTH (yomi);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
579 key_buffer[ks.length] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
581 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), key_buffer);
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
582 ks.length = strlen (key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583 #endif /* CANNA_MULE */
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 if (NILP (roma))
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 ks.mode = 0;
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 else
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 CHECK_STRING (roma);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
594 strncpy (key_buffer + XSTRING_LENGTH (yomi) + 1, XSTRING_DATA (roma),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 XSTRING_LENGTH (roma));
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
596 key_buffer[XSTRING_LENGTH (yomi) + 1 + XSTRING_LENGTH (roma)] = '\0';
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
597 ks.mode = (unsigned char *)(key_buffer + XSTRING_LENGTH (yomi) + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
599 ks.mode = (unsigned char *)(key_buffer + ks.length + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 m2c (XSTRING_DATA (roma), XSTRING_LENGTH (roma), ks.mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601 #endif /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
604 ks.echoStr = (unsigned char *) key_buffer;
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
605 ksv.buffer = (unsigned char *) key_buffer; /* ÊÖÃÍÍÑ (return value) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 jrKanjiControl (0, KC_STOREYOMI, (char *)&ksv);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
611 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 DEFUN ("canna-do-function", Fcanna_do_function, 1, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 Do specified function at current mode.
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 (num, ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 jrKanjiStatusWithValue ksv;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 jrKanjiStatus ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 CHECK_INT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 if (NILP (ch))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626 {
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
627 *key_buffer = '@';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629 else
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 CHECK_CHAR (ch);
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
632 *key_buffer = XCHAR (ch);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
635 ksv.buffer = (unsigned char *) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 ksv.bytes_buffer = KEYTOSTRSIZE;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
637 ksv.ks = &ks;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 ksv.val = XINT (num);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 jrKanjiControl (0, KC_DO, (char *) &ksv);
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 613
diff changeset
640 return storeResults (key_buffer, ksv.val, ksv.ks);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 }
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 DEFUN ("canna-parse", Fcanna_parse, 1, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 Parse customize string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 (str))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648 Lisp_Object val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649 unsigned char **p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 int n;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 CHECK_STRING (str);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654 #ifndef CANNA_MULE
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
655 strncpy (key_buffer, XSTRING_DATA (str), XSTRING_LENGTH (str));
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
656 key_buffer[XSTRING_LENGTH (str)] = '\0';
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657 #else /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
658 m2c (XSTRING_DATA (str), XSTRING_LENGTH (str), key_buffer);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
659 #endif /* CANNA_MULE */
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
660 p = (unsigned char**) key_buffer;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
661 n = jrKanjiControl (0, KC_PARSE, (char *) &p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662 val = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
663 while (n > 0)
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 n--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666 val = Fcons (make_string (p[n], strlen (p[n])), val);
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 return val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 }
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 DEFUN ("canna-query-mode", Fcanna_query_mode, 0, 0, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672 Get current mode string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 unsigned char buf[256];
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 jrKanjiControl (0, KC_QUERYMODE, buf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 return make_string (buf, strlen (buf));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681
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 * Functions following this line are for KKCP interface compatible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684 * library. These functions may be used by MILK system.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 #define RKBUFSIZE 1024
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 unsigned char yomibuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 static short kugiri[RKBUFSIZE / 2];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 confirmContext (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695 if (IRCP_context < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 int context;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 if ((context = jrKanjiControl (0, KC_GETCONTEXT, (char *) 0)) == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
700 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
701 return 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
702 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
703 IRCP_context = context;
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 return 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 }
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 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 byteLen (int bun, int len)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 int i = 0, offset = 0, ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 if (0 <= bun && bun < RKBUFSIZE)
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 offset = kugiri[bun];
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 while (len-- > 0 && (ch = (int) yomibuf[offset + i]))
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 if (ch & 0x80)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 i++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724 }
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 return i;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
728
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729 DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
730 Return the result of kana-to-kanji conversion.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
731 Clause separator is set.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
732 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
733 (yomi))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
734 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 int nbun;
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 CHECK_STRING (yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742 #ifndef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 strncpy (yomibuf, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 yomibuf[XSTRING_LENGTH (yomi)] = '\0';
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745 nbun = RkBgnBun (IRCP_context, XSTRING_DATA (yomi), XSTRING_LENGTH (yomi),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747 #else /* CANNA_MULE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 m2c (XSTRING_DATA (yomi), XSTRING_LENGTH (yomi), yomibuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749 nbun = RkBgnBun (IRCP_context, (char *) yomibuf, strlen (yomibuf),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750 (RK_XFER << RK_XFERBITS) | RK_KFER);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
751 #endif /* CANNA_MULE */
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 return kanjiYomiList (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
754 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
755
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
757 kanjiYomiList (int context, int nbun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
759 Lisp_Object val, res = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
760 unsigned char RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
761 int len, i, total;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
762
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
763 for (i = nbun ; i > 0 ; )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
764 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
765 i--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
766 RkGoTo (context, i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
767 len = RkGetKanji (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
768 val = make_string (RkBuf, len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
769 len = RkGetYomi (context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
770 res = Fcons (Fcons (val, make_string (RkBuf, len)), res);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
771 if (i < RKBUFSIZE / 2)
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 kugiri[i] = len;
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 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
776 for (i = 0, total = 0 ; i < nbun ; i++)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
777 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
778 int temp = kugiri[i];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
779 kugiri[i] = total;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
780 total += temp;
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 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
783 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
784
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
786 Return the list of candidates.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
787 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
788 (bunsetsu))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
789 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
790 int i, slen, len;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
791 unsigned char *p, RkBuf[RKBUFSIZE];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
792 Lisp_Object res = Qnil, endp;
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 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
795 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
796 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
797 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
798 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
799 RkGoTo (IRCP_context, XINT (bunsetsu));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
800 len = RkGetKanjiList (IRCP_context, RkBuf, RKBUFSIZE);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
801 p = RkBuf;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 for (i = 0 ; i < len ; i++)
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 slen = strlen (p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
805 if (NILP(res))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807 endp = res = Fcons (make_string (p, slen), Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
808 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
811 endp = XCDR (res) = Fcons (make_string (p, slen), Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
812 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
813 p += slen + 1;
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 return res;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
816 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
817
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
818 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
819 Specify the length of a clause.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
820 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
821 (bunsetsu, bunlen))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
822 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
823 int nbun, len;
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 CHECK_INT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 CHECK_INT (bunlen);
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 nbun = XINT (bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
829 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
830 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
831 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
832 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
833 RkGoTo (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
834 len = byteLen (nbun, XINT (bunlen));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
835 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
836 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
839 Select a candidate.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
841 (bun, kouho))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
842 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 int nbun, nkouho;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847 return Qnil;
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 nbun = XINT(bun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850 RkGoTo (IRCP_context, nbun);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
852 nkouho = XINT(kouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
853 RkXfer (IRCP_context, nkouho);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
854 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
855 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
858 End conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
860 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
861 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
863 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
864 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
865 }
448
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
866 RkEndBun (IRCP_context, 1); /* ³Ø½¬¤Ï¤¤¤Ä¤Ç¤â¹Ô¤Ã¤ÆÎɤ¤¤â¤Î¤Ê¤Î¤«¡©
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
867 (is it OK to invoke learning function
3078fd1074e8 Import from CVS: tag r21-2-39
cvs
parents: 442
diff changeset
868 at arbitrary times?) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
869 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
870 }
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 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
873 Quit conversion.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
875 ())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
876 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
877 if (confirmContext () == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
878 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
879 return Qnil;
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 RkEndBun (IRCP_context, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 return Qt;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
883 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
884
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
885 /* variables below this line is constants of Canna */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
886
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
887 static Fixnum canna_mode_AlphaMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
888 static Fixnum canna_mode_EmptyMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
889 static Fixnum canna_mode_KigoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
890 static Fixnum canna_mode_YomiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
891 static Fixnum canna_mode_JishuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
892 static Fixnum canna_mode_TankouhoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
893 static Fixnum canna_mode_IchiranMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
894 static Fixnum canna_mode_YesNoMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
895 static Fixnum canna_mode_OnOffMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
896 #ifdef CANNA_MODE_AdjustBunsetsuMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
897 static Fixnum canna_mode_AdjustBunsetsuMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
898 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
899 #ifdef CANNA_MODE_ChikujiYomiMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
900 static Fixnum canna_mode_ChikujiYomiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
901 static Fixnum canna_mode_ChikujiTanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
902 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
903
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
904 static Fixnum canna_mode_HenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905 #ifdef CANNA_MODE_HenkanNyuryokuMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
906 static Fixnum canna_mode_HenkanNyuryokuMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
907 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
908 #ifdef CANNA_MODE_ZenHiraHenkanMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
909 static Fixnum canna_mode_ZenHiraHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
910 #ifdef CANNA_MODE_HanHiraHenkanMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
911 static Fixnum canna_mode_HanHiraHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
912 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
913 static Fixnum canna_mode_ZenKataHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
914 static Fixnum canna_mode_HanKataHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
915 static Fixnum canna_mode_ZenAlphaHenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
916 static Fixnum canna_mode_HanAlphaHenkanMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
917 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
918 static Fixnum canna_mode_ZenHiraKakuteiMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
919 #ifdef CANNA_MODE_HanHiraKakuteiMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
920 static Fixnum canna_mode_HanHiraKakuteiMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
921 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
922 static Fixnum canna_mode_ZenKataKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
923 static Fixnum canna_mode_HanKataKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
924 static Fixnum canna_mode_ZenAlphaKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
925 static Fixnum canna_mode_HanAlphaKakuteiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
926 static Fixnum canna_mode_HexMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
927 static Fixnum canna_mode_BushuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
928 static Fixnum canna_mode_ExtendMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
929 static Fixnum canna_mode_RussianMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
930 static Fixnum canna_mode_GreekMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
931 static Fixnum canna_mode_LineMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
932 static Fixnum canna_mode_ChangingServerMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
933 static Fixnum canna_mode_HenkanMethodMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
934 static Fixnum canna_mode_DeleteDicMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
935 static Fixnum canna_mode_TourokuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
936 static Fixnum canna_mode_TourokuEmptyMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
937 static Fixnum canna_mode_TourokuHinshiMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
938 static Fixnum canna_mode_TourokuDicMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
939 static Fixnum canna_mode_QuotedInsertMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
940 static Fixnum canna_mode_BubunMuhenkanMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
941 static Fixnum canna_mode_MountDicMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
942
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
943 static Fixnum canna_fn_SelfInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
944 static Fixnum canna_fn_FunctionalInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
945 static Fixnum canna_fn_QuotedInsert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
946 static Fixnum canna_fn_JapaneseMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
947 static Fixnum canna_fn_AlphaMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
948 static Fixnum canna_fn_HenkanNyuryokuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
949 static Fixnum canna_fn_Forward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
950 static Fixnum canna_fn_Backward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
951 static Fixnum canna_fn_Next;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
952 static Fixnum canna_fn_Prev;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
953 static Fixnum canna_fn_BeginningOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
954 static Fixnum canna_fn_EndOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
955 static Fixnum canna_fn_DeleteNext;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
956 static Fixnum canna_fn_DeletePrevious;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
957 static Fixnum canna_fn_KillToEndOfLine;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
958 static Fixnum canna_fn_Henkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
959 static Fixnum canna_fn_Kakutei;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
960 static Fixnum canna_fn_Extend;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
961 static Fixnum canna_fn_Shrink;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
962 #ifdef CANNA_FN_AdjustBunsetsu
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
963 static Fixnum canna_fn_AdjustBunsetsu;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
964 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
965 static Fixnum canna_fn_Quit;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
966 static Fixnum canna_fn_ConvertAsHex;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
967 static Fixnum canna_fn_ConvertAsBushu;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
968 static Fixnum canna_fn_KouhoIchiran;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
969 static Fixnum canna_fn_BubunMuhenkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
970 static Fixnum canna_fn_Zenkaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
971 static Fixnum canna_fn_Hankaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
972 static Fixnum canna_fn_ToUpper;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
973 static Fixnum canna_fn_Capitalize;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
974 static Fixnum canna_fn_ToLower;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
975 static Fixnum canna_fn_Hiragana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
976 static Fixnum canna_fn_Katakana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
977 static Fixnum canna_fn_Romaji;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
978 #ifdef CANNA_FN_BaseHiragana
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
979 static Fixnum canna_fn_BaseHiragana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
980 static Fixnum canna_fn_BaseKatakana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
981 static Fixnum canna_fn_BaseEisu;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
982 static Fixnum canna_fn_BaseZenkaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
983 static Fixnum canna_fn_BaseHankaku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
984 static Fixnum canna_fn_BaseKana;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
985 static Fixnum canna_fn_BaseKakutei;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
986 static Fixnum canna_fn_BaseHenkan;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
987 static Fixnum canna_fn_BaseHiraKataToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
988 static Fixnum canna_fn_BaseZenHanToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
989 static Fixnum canna_fn_BaseKanaEisuToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
990 static Fixnum canna_fn_BaseKakuteiHenkanToggle;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
991 static Fixnum canna_fn_BaseRotateForward;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
992 static Fixnum canna_fn_BaseRotateBackward;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
993 #endif
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
994 static Fixnum canna_fn_ExtendMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
995 static Fixnum canna_fn_Touroku;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
996 static Fixnum canna_fn_HexMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
997 static Fixnum canna_fn_BushuMode;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
998 static Fixnum canna_fn_KigouMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
999 #ifdef CANNA_FN_Mark
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1000 static Fixnum canna_fn_Mark;
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 #ifdef CANNA_FN_TemporalMode
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1003 static Fixnum canna_fn_TemporalMode;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1004 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1005
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1006 static Fixnum canna_key_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1007 static Fixnum canna_key_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1008 static Fixnum canna_key_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1009 static Fixnum canna_key_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1010 static Fixnum canna_key_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1011 static Fixnum canna_key_Down;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1012 static Fixnum canna_key_Insert;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1013 static Fixnum canna_key_Rollup;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1014 static Fixnum canna_key_Rolldown;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1015 static Fixnum canna_key_Home;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1016 static Fixnum canna_key_Help;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1017 static Fixnum canna_key_KP_Key;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1018 static Fixnum canna_key_Shift_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1019 static Fixnum canna_key_Shift_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1020 static Fixnum canna_key_Shift_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1021 static Fixnum canna_key_Shift_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1022 static Fixnum canna_key_Shift_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1023 static Fixnum canna_key_Shift_Down;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1024 static Fixnum canna_key_Cntrl_Nfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1025 static Fixnum canna_key_Cntrl_Xfer;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1026 static Fixnum canna_key_Cntrl_Up;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1027 static Fixnum canna_key_Cntrl_Left;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1028 static Fixnum canna_key_Cntrl_Right;
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1029 static Fixnum canna_key_Cntrl_Down;
428
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 Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 1996/6/7 */
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 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 syms_of_mule_canna (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 DEFSUBR (Fcanna_key_proc);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 DEFSUBR (Fcanna_initialize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039 DEFSUBR (Fcanna_finalize);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 DEFSUBR (Fcanna_touroku_string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041 DEFSUBR (Fcanna_set_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 DEFSUBR (Fcanna_change_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1043 DEFSUBR (Fcanna_store_yomi);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 DEFSUBR (Fcanna_do_function);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045 DEFSUBR (Fcanna_parse);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046 DEFSUBR (Fcanna_query_mode);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047 DEFSUBR (Fcanna_set_bunsetsu);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1048
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1049 DEFSUBR (Fcanna_henkan_begin);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1050 DEFSUBR (Fcanna_henkan_next);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1051 DEFSUBR (Fcanna_bunsetu_henkou);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1052 DEFSUBR (Fcanna_henkan_kakutei);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1053 DEFSUBR (Fcanna_henkan_end);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1054 DEFSUBR (Fcanna_henkan_quit);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1055 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1056
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1057 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1058 vars_of_mule_canna (void)
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", &VCANNA); /* hir@nec, 1992.5.21 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1061 VCANNA = Qt; /* hir@nec, 1992.5.21 */
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 DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1066 Vcanna_kakutei_string = Qnil;
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 DEFVAR_LISP ("canna-kakutei-yomi", &Vcanna_kakutei_yomi /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1071 Vcanna_kakutei_yomi = Qnil;
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 DEFVAR_LISP ("canna-kakutei-romaji", &Vcanna_kakutei_romaji /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1076 Vcanna_kakutei_romaji = Qnil;
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 DEFVAR_LISP ("canna-henkan-string", &Vcanna_henkan_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1081 Vcanna_henkan_string = Qnil;
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 DEFVAR_INT ("canna-henkan-length", &canna_henkan_length /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1086 canna_henkan_length = 0;
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 DEFVAR_INT ("canna-henkan-revpos", &canna_henkan_revPos /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1091 canna_henkan_revPos = 0;
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 DEFVAR_INT ("canna-henkan-revlen", &canna_henkan_revLen /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1096 canna_henkan_revLen = 0;
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 DEFVAR_LISP ("canna-ichiran-string", &Vcanna_ichiran_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1101 Vcanna_ichiran_string = Qnil;
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 DEFVAR_INT ("canna-ichiran-length", &canna_ichiran_length /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1106 canna_ichiran_length = 0;
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 DEFVAR_INT ("canna-ichiran-revpos", &canna_ichiran_revPos /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1111 canna_ichiran_revPos = 0;
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 DEFVAR_INT ("canna-ichiran-revlen", &canna_ichiran_revLen /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1116 canna_ichiran_revLen = 0;
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 DEFVAR_LISP ("canna-mode-string", &Vcanna_mode_string /*
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1121 Vcanna_mode_string = Qnil;
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 DEFVAR_BOOL ("canna-empty-info", &canna_empty_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1124 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1125 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1126 canna_empty_info = 0;
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 DEFVAR_BOOL ("canna-through-info", &canna_through_info /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1129 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1130 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1131 canna_through_info = 0;
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 DEFVAR_BOOL ("canna-underline", &canna_underline /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1134 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1135 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1136 canna_underline = 0;
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 DEFVAR_BOOL ("canna-inhibit-hankakukana", &canna_inhibit_hankakukana /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1139 For canna
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1140 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1141 canna_inhibit_hankakukana = 0;
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 DEFVAR_INT ("canna-mode-alpha-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1146 canna_mode_AlphaMode = IROHA_MODE_AlphaMode;
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 DEFVAR_INT ("canna-mode-empty-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1151 canna_mode_EmptyMode = IROHA_MODE_EmptyMode;
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 DEFVAR_INT ("canna-mode-kigo-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1156 canna_mode_KigoMode = IROHA_MODE_KigoMode;
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 DEFVAR_INT ("canna-mode-yomi-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1161 canna_mode_YomiMode = IROHA_MODE_YomiMode;
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 DEFVAR_INT ("canna-mode-jishu-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1166 canna_mode_JishuMode = IROHA_MODE_JishuMode;
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 DEFVAR_INT ("canna-mode-tankouho-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1171 canna_mode_TankouhoMode = IROHA_MODE_TankouhoMode;
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 DEFVAR_INT ("canna-mode-ichiran-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1176 canna_mode_IchiranMode = IROHA_MODE_IchiranMode;
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 DEFVAR_INT ("canna-mode-yes-no-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1181 canna_mode_YesNoMode = IROHA_MODE_YesNoMode;
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 DEFVAR_INT ("canna-mode-on-off-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1186 canna_mode_OnOffMode = IROHA_MODE_OnOffMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1188 #ifdef CANNA_MODE_AdjustBunsetsuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1189 DEFVAR_INT ("canna-mode-adjust-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1190 &canna_mode_AdjustBunsetsuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1192 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1193 canna_mode_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1194 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1195 #ifdef CANNA_MODE_ChikujiYomiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1196 DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1199 canna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode;
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 DEFVAR_INT ("canna-mode-chikuji-bunsetsu-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1202 &canna_mode_ChikujiTanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1203
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 canna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1206 #endif
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 DEFVAR_INT ("canna-mode-henkan-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1211 canna_mode_HenkanMode = IROHA_MODE_HenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1212
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1213 #ifdef CANNA_MODE_HenkanNyuryokuMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1214 DEFVAR_INT ("canna-mode-henkan-nyuuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1215 &canna_mode_HenkanNyuryokuMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1216
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1217 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1218 canna_mode_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1219 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1220 #ifdef CANNA_MODE_ZenHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1221 DEFVAR_INT ("canna-mode-zen-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1222 &canna_mode_ZenHiraHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1224 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1225 canna_mode_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1226 #ifdef CANNA_MODE_HanHiraHenkanMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1227 DEFVAR_INT ("canna-mode-han-hira-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1228 &canna_mode_HanHiraHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1229
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1230 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1231 canna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1232 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1233 DEFVAR_INT ("canna-mode-zen-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1234 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1237 canna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1239 DEFVAR_INT ("canna-mode-han-kata-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1240 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1243 canna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode;
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 DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1246 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1249 canna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode;
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 DEFVAR_INT ("canna-mode-han-alpha-henkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1252 &canna_mode_HanAlphaHenkanMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1254 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1255 canna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1256 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1257 DEFVAR_INT ("canna-mode-zen-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1258 &canna_mode_ZenHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1260 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1261 canna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1262 #ifdef CANNA_MODE_HanHiraKakuteiMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1263 DEFVAR_INT ("canna-mode-han-hira-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1264 &canna_mode_HanHiraKakuteiMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1265
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1266 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1267 canna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1268 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1269 DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1270 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1273 canna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1275 DEFVAR_INT ("canna-mode-han-kata-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1276 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1279 canna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1281 DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1282 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1285 canna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode;
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 DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1288 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1291 canna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode;
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 DEFVAR_INT ("canna-mode-hex-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1296 canna_mode_HexMode = IROHA_MODE_HexMode;
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 DEFVAR_INT ("canna-mode-bushu-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1301 canna_mode_BushuMode = IROHA_MODE_BushuMode;
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 DEFVAR_INT ("canna-mode-extend-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1306 canna_mode_ExtendMode = IROHA_MODE_ExtendMode;
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 DEFVAR_INT ("canna-mode-russian-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1311 canna_mode_RussianMode = IROHA_MODE_RussianMode;
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 DEFVAR_INT ("canna-mode-greek-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1316 canna_mode_GreekMode = IROHA_MODE_GreekMode;
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 DEFVAR_INT ("canna-mode-line-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1321 canna_mode_LineMode = IROHA_MODE_LineMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1323 DEFVAR_INT ("canna-mode-changing-server-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1324 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1327 canna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode;
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 DEFVAR_INT ("canna-mode-henkan-method-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1330 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1333 canna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode;
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 DEFVAR_INT ("canna-mode-delete-dic-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1338 canna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode;
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 DEFVAR_INT ("canna-mode-touroku-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1343 canna_mode_TourokuMode = IROHA_MODE_TourokuMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1345 DEFVAR_INT ("canna-mode-touroku-empty-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1346 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1349 canna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode;
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 DEFVAR_INT ("canna-mode-touroku-hinshi-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1352 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1355 canna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode;
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 DEFVAR_INT ("canna-mode-touroku-dic-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1360 canna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1362 DEFVAR_INT ("canna-mode-quoted-insert-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1363 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1366 canna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode;
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 DEFVAR_INT ("canna-mode-bubun-muhenkan-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1369 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1372 canna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode;
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 DEFVAR_INT ("canna-mode-mount-dic-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1377 canna_mode_MountDicMode = IROHA_MODE_MountDicMode;
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 DEFVAR_INT ("canna-func-self-insert", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1382 canna_fn_SelfInsert = IROHA_FN_SelfInsert;
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 DEFVAR_INT ("canna-func-functional-insert", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1387 canna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert;
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 DEFVAR_INT ("canna-func-quoted-insert", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1392 canna_fn_QuotedInsert = IROHA_FN_QuotedInsert;
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 DEFVAR_INT ("canna-func-japanese-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1397 canna_fn_JapaneseMode = IROHA_FN_JapaneseMode;
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 DEFVAR_INT ("canna-func-alpha-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1402 canna_fn_AlphaMode = IROHA_FN_AlphaMode;
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 DEFVAR_INT ("canna-func-henkan-nyuryoku-mode",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1405 &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1408 canna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode;
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 DEFVAR_INT ("canna-func-forward", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1413 canna_fn_Forward = IROHA_FN_Forward;
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 DEFVAR_INT ("canna-func-backward", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1418 canna_fn_Backward = IROHA_FN_Backward;
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 DEFVAR_INT ("canna-func-next", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1423 canna_fn_Next = IROHA_FN_Next;
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 DEFVAR_INT ("canna-func-previous", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1428 canna_fn_Prev = IROHA_FN_Prev;
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 DEFVAR_INT ("canna-func-beginning-of-line", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1433 canna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine;
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 DEFVAR_INT ("canna-func-end-of-line", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1438 canna_fn_EndOfLine = IROHA_FN_EndOfLine;
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 DEFVAR_INT ("canna-func-delete-next", &canna_fn_DeleteNext /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1441
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1442 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1443 canna_fn_DeleteNext = IROHA_FN_DeleteNext;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1444
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 458
diff changeset
1445 DEFVAR_INT ("canna-func-delete-previous", &canna_fn_DeletePrevious /*
428
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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1448 canna_fn_DeletePrevious = IROHA_FN_DeletePrevious;
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 DEFVAR_INT ("canna-func-kill-to-end-of-line", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1453 canna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine;
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 DEFVAR_INT ("canna-func-henkan", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1458 canna_fn_Henkan = IROHA_FN_Henkan;
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 DEFVAR_INT ("canna-func-kakutei", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1463 canna_fn_Kakutei = IROHA_FN_Kakutei;
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 DEFVAR_INT ("canna-func-extend", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1468 canna_fn_Extend = IROHA_FN_Extend;
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 DEFVAR_INT ("canna-func-shrink", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1473 canna_fn_Shrink = IROHA_FN_Shrink;
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 #ifdef CANNA_FN_AdjustBunsetsu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1476 DEFVAR_INT ("canna-func-adjust-bunsetsu", &canna_fn_AdjustBunsetsu /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1477
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1478 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1479 canna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1480 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1481 DEFVAR_INT ("canna-func-quit", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1484 canna_fn_Quit = IROHA_FN_Quit;
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 DEFVAR_INT ("canna-func-convert-as-hex", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1489 canna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex;
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 DEFVAR_INT ("canna-func-convert-as-bushu", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1494 canna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu;
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 DEFVAR_INT ("canna-func-kouho-ichiran", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1499 canna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran;
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 DEFVAR_INT ("canna-func-bubun-muhenkan", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1504 canna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan;
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 DEFVAR_INT ("canna-func-zenkaku", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1509 canna_fn_Zenkaku = IROHA_FN_Zenkaku;
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 DEFVAR_INT ("canna-func-hankaku", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1514 canna_fn_Hankaku = IROHA_FN_Hankaku;
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 DEFVAR_INT ("canna-func-to-upper", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1519 canna_fn_ToUpper = IROHA_FN_ToUpper;
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 DEFVAR_INT ("canna-func-capitalize", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1524 canna_fn_Capitalize = IROHA_FN_Capitalize;
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 DEFVAR_INT ("canna-func-to-lower", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1529 canna_fn_ToLower = IROHA_FN_ToLower;
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 DEFVAR_INT ("canna-func-hiragana", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1534 canna_fn_Hiragana = IROHA_FN_Hiragana;
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 DEFVAR_INT ("canna-func-katakana", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1539 canna_fn_Katakana = IROHA_FN_Katakana;
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 DEFVAR_INT ("canna-func-romaji", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1544 canna_fn_Romaji = IROHA_FN_Romaji;
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 #ifdef CANNA_FN_BaseHiragana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1547 DEFVAR_INT ("canna-func-base-hiragana", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1550 canna_fn_BaseHiragana = CANNA_FN_BaseHiragana;
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 DEFVAR_INT ("canna-func-base-katakana", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1555 canna_fn_BaseKatakana = CANNA_FN_BaseKatakana;
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 DEFVAR_INT ("canna-func-base-eisu", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1560 canna_fn_BaseEisu = CANNA_FN_BaseEisu;
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 DEFVAR_INT ("canna-func-base-zenkaku", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1565 canna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku;
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 DEFVAR_INT ("canna-func-base-hankaku", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1570 canna_fn_BaseHankaku = CANNA_FN_BaseHankaku;
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 DEFVAR_INT ("canna-func-base-kana", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1575 canna_fn_BaseKana = CANNA_FN_BaseKana;
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 DEFVAR_INT ("canna-func-base-kakutei", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1580 canna_fn_BaseKakutei = CANNA_FN_BaseKakutei;
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 DEFVAR_INT ("canna-func-base-henkan", &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1585 canna_fn_BaseHenkan = CANNA_FN_BaseHenkan;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1587 DEFVAR_INT ("canna-func-base-hiragana-katakana-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1588 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1591 canna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1593 DEFVAR_INT ("canna-func-base-zenkaku-hankaku-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1594 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1597 canna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1598
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1599 DEFVAR_INT ("canna-func-base-kana-eisu-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1600 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1603 canna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1604
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1605 DEFVAR_INT ("canna-func-base-kakutei-henkan-toggle",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1606 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1609 canna_fn_BaseKakuteiHenkanToggle = CANNA_FN_BaseKakuteiHenkanToggle;
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 DEFVAR_INT ("canna-func-base-rotate-forward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1612 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1615 canna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1616
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1617 DEFVAR_INT ("canna-func-base-rotate-backward",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1618 &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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1621 canna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward;
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 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1624 DEFVAR_INT ("canna-func-extend-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1627 canna_fn_ExtendMode = IROHA_FN_ExtendMode;
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 DEFVAR_INT ("canna-func-touroku", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1632 canna_fn_Touroku = IROHA_FN_Touroku;
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 DEFVAR_INT ("canna-func-hex-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1637 canna_fn_HexMode = IROHA_FN_HexMode;
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 DEFVAR_INT ("canna-func-bushu-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1642 canna_fn_BushuMode = IROHA_FN_BushuMode;
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 DEFVAR_INT ("canna-func-kigo-mode", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1647 canna_fn_KigouMode = IROHA_FN_KigouMode;
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 #ifdef CANNA_FN_Mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1650 DEFVAR_INT ("canna-func-mark", &canna_fn_Mark /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1651
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1652 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1653 canna_fn_Mark = CANNA_FN_Mark;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1654 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1655 #ifdef CANNA_FN_TemporalMode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1656 DEFVAR_INT ("canna-func-temporal-mode", &canna_fn_TemporalMode /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1657
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1658 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1659 canna_fn_TemporalMode = CANNA_FN_TemporalMode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1660 #endif
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 DEFVAR_INT ("canna-key-nfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1665 canna_key_Nfer = IROHA_KEY_Nfer;
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 DEFVAR_INT ("canna-key-xfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1670 canna_key_Xfer = IROHA_KEY_Xfer;
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 DEFVAR_INT ("canna-key-up", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1675 canna_key_Up = IROHA_KEY_Up;
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 DEFVAR_INT ("canna-key-left", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1680 canna_key_Left = IROHA_KEY_Left;
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 DEFVAR_INT ("canna-key-right", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1685 canna_key_Right = IROHA_KEY_Right;
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 DEFVAR_INT ("canna-key-down", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1690 canna_key_Down = IROHA_KEY_Down;
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 DEFVAR_INT ("canna-key-insert", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1695 canna_key_Insert = IROHA_KEY_Insert;
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 DEFVAR_INT ("canna-key-rollup", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1700 canna_key_Rollup = IROHA_KEY_Rollup;
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 DEFVAR_INT ("canna-key-rolldown", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1705 canna_key_Rolldown = IROHA_KEY_Rolldown;
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 DEFVAR_INT ("canna-key-home", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1710 canna_key_Home = IROHA_KEY_Home;
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 DEFVAR_INT ("canna-key-help", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1715 canna_key_Help = IROHA_KEY_Help;
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 DEFVAR_INT ("canna-key-kp-key", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1720 canna_key_KP_Key = IROHA_KEY_KP_Key;
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 DEFVAR_INT ("canna-key-shift-nfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1725 canna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer;
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 DEFVAR_INT ("canna-key-shift-xfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1730 canna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer;
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 DEFVAR_INT ("canna-key-shift-up", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1735 canna_key_Shift_Up = IROHA_KEY_Shift_Up;
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 DEFVAR_INT ("canna-key-shift-left", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1740 canna_key_Shift_Left = IROHA_KEY_Shift_Left;
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 DEFVAR_INT ("canna-key-shift-right", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1745 canna_key_Shift_Right = IROHA_KEY_Shift_Right;
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 DEFVAR_INT ("canna-key-shift-down", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1750 canna_key_Shift_Down = IROHA_KEY_Shift_Down;
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 DEFVAR_INT ("canna-key-control-nfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1755 canna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer;
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 DEFVAR_INT ("canna-key-control-xfer", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1760 canna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer;
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 DEFVAR_INT ("canna-key-control-up", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1765 canna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up;
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 DEFVAR_INT ("canna-key-control-left", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1770 canna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left;
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 DEFVAR_INT ("canna-key-control-right", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1775 canna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right;
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 DEFVAR_INT ("canna-key-control-down", &canna_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 */ );
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1780 canna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down;
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 Fprovide(intern("CANNA"));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1783 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1784
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1785 #ifdef CANNA_MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1786 /* To handle MULE internal code and EUC.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1787 I assume CANNA can handle only Japanese EUC. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1788
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1789 /* EUC multibyte string to MULE internal string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1790
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1791 static void
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1792 c2mu (unsigned char *cp, int l, unsigned char *mp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1793 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1794 unsigned char ch, *ep = cp+l;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1795
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1796 while ((cp < ep) && (ch = *cp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1797 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1798 if ((unsigned char) ch == ISO_CODE_SS2)
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 *mp++ = LEADING_BYTE_KATAKANA_JISX0201;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1801 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1802 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1803 else if ((unsigned char) ch == ISO_CODE_SS3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1804 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1805 *mp++ = LEADING_BYTE_JAPANESE_JISX0212;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1806 cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1807 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1808 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1809 else if (ch & 0x80)
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++ = LEADING_BYTE_JAPANESE_JISX0208;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1812 *mp++ = *cp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1813 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1814 *mp++ = *cp++;
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 *mp = 0;
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1819 /* MULE internal string to EUC multibyte string */
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 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1822 m2c (unsigned char *mp, int l, unsigned char *cp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1823 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1824 unsigned char ch, *ep = mp + l;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1825
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1826 while ((mp < ep) && (ch = *mp++))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1827 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1828 switch (ch)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1829 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1830 case LEADING_BYTE_KATAKANA_JISX0201:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1831 *cp++ = ISO_CODE_SS2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1832 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1833 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1834 case LEADING_BYTE_JAPANESE_JISX0212:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1835 *cp++ = ISO_CODE_SS3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1836 case LEADING_BYTE_JAPANESE_JISX0208:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1837 *cp++ = *mp++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1838 *cp++ = *mp++;
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 default:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1841 *cp++ = ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1842 break;
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 *cp = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1846 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1847
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1848 #undef make_string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1849
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1850 /* make_string after converting EUC string to MULE internal string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1851 static Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1852 mule_make_string (unsigned char *p, int l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1853 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1854 unsigned char cbuf[4096];
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 c2mu (p,l,cbuf);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1857 return (make_string (cbuf,strlen (cbuf)));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1858 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1859
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1860 /* return the MULE internal string length of EUC string */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1861 /* Modified by sb to return a character count not byte count. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1862 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1863 mule_strlen (unsigned char *p, int l)
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 unsigned char ch, *cp = p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1866 int len = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1867
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1868 while ((cp < p + l) && (ch = *cp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1869 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1870 if ((unsigned char) ch == ISO_CODE_SS2)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1873 cp += 2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1874 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1875 else if ((unsigned char) ch == ISO_CODE_SS3)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1878 cp += 3;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1879 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1880 else if (ch & 0x80)
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1883 cp += 2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1884 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1885 else
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 len++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1888 cp++;
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 return (len);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1892 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1893
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1894 /* count number of characters */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1895 static void
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1896 count_char (unsigned char *p, int len, int pos, int rev,
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 448
diff changeset
1897 Fixnum *clen, Fixnum *cpos, Fixnum *crev)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1898 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1899 unsigned char *q = p;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1900
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1901 *clen = *cpos = *crev = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1902 if (len == 0) return;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1903 while (q < p + pos)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1904 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1905 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1906 (*cpos)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1907 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1908 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1909 while (q < p + pos + rev)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1910 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1911 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1912 (*crev)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1913 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1914 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1915 while (q < p + len)
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 (*clen)++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1918 if (*q++ & 0x80) q++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1919 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1920 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1921 #endif /* CANNA_MULE */