1 /* Copyright 1992 NEC Corporation, Tokyo, Japan.
2  *
3  * Permission to use, copy, modify, distribute and sell this software
4  * and its documentation for any purpose is hereby granted without
5  * fee, provided that the above copyright notice appear in all copies
6  * and that both that copyright notice and this permission notice
7  * appear in supporting documentation, and that the name of NEC
8  * Corporation not be used in advertising or publicity pertaining to
9  * distribution of the software without specific, written prior
10  * permission.  NEC Corporation makes no representations about the
11  * suitability of this software for any purpose.  It is provided "as
12  * is" without express or implied warranty.
13  *
14  * NEC CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
16  * NO EVENT SHALL NEC CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
18  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19  * OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20  * PERFORMANCE OF THIS SOFTWARE.
21  */
22 
23 /*
24  * @(#) 102.1 $Id: canna.h,v 1.2 2002/10/20 14:29:56 aida_s Exp $
25  * $Revision: 1.2 $
26  * $Author: aida_s $
27  */
28 
29 #ifndef _CANNA_H_
30 #define _CANNA_H_
31 
32 #include "widedef.h"
33 
34 #include <stdio.h>
35 #include "ccompat.h"
36 
37 #define	WCHARSIZE	sizeof(wchar_t)
38 
39 /* #include "sglobal.h" ����ϥ�꡼�����ˤϥ����Ȥ�Ϥ������� */
40 #define necKanjiError jrKanjiError
41 
42 /*#include "jrkanji.h"*/
43 
44 typedef unsigned char BYTE;
45 
46 /*
47  * LIBDIR  -- �����ƥ�Υ������ޥ����ե��������޻������Ѵ��ơ��֥뤬
48  *            �֤����ǥ��쥯�ȥꡣ
49  */
50 
51 #ifndef CANNALIBDIR
52 #define CANNALIBDIR "/usr/lib/canna"
53 #endif
54 
55 #define XKanjiStatus          jrKanjiStatus
56 #define XKanjiStatusWithValue jrKanjiStatusWithValue
57 
58 /*
59  * ���ʴ����Ѵ��Τ�����͡��ʥ����ޥåץơ��֥�
60  * �����ޥåץơ��֥�Ͻ����ؿ��ؤΥݥ���������ȤʤäƤ��롣
61  */
62 
63 typedef struct {
64   int (*func)();
65   unsigned char *keytbl;
66   int flags;			/* ������ */
67   int (**ftbl)();
68 } *KanjiMode, KanjiModeRec;
69 
70 struct funccfunc {
71   unsigned char funcid;
72   int (*cfunc)();
73 };
74 
75 /* flags �ξ��� */
76 #define CANNA_KANJIMODE_TABLE_SHARED	01
77 #define CANNA_KANJIMODE_EMPTY_MODE	02
78 
79 /* func ���軰���� */
80 #define KEY_CALL  0
81 #define KEY_CHECK 1
82 #define KEY_SET   2
83 
84 extern BYTE default_kmap[];
85 
86 #define CANNA_FULL_VERBOSE 2
87 
88 /* menuitem -- ��˥塼ɽ���ι��ܤ��������ơ��֥� */
89 
90 typedef struct _menuitem {
91   wchar_t *title;
92   int (*func)();
93   struct _menuitem *menu_next;
94   int *prev_kouho;
95   int minorMode;
96 } menuitem;
97 
98 #define NEXT_MENU (int (*)())0 /* menuitem �� func �ե�����ɤ����� */
99 
100 /*
101  * glineinfo -- �������ɽ���Τ��������������Ǽ���Ƥ�������ι�¤�Ρ�
102  * ���줾��Υ��Фϰʲ��ΰ�̣����ġ�
103  *
104  * glkosu -- ���ιԤˤ������ο�
105  * glhead -- ���ιԤ���Ƭ���䤬��kouhoinfo�β����ܤ�(0���������)
106  * gllen  -- ���ιԤ�ɽ�����뤿���ʸ�����Ĺ��
107  * gldata -- ���ιԤ�ɽ�����뤿���ʸ����ؤΥݥ���
108  */
109 
110 typedef struct {
111   int glkosu;
112   int glhead;
113   int gllen;
114   wchar_t *gldata;
115 } glineinfo;
116 
117 /*
118  * kouhoinfo -- ��������Τ��������������Ǽ���Ƥ�������ι�¤��
119  * ���줾��Υ��Фϰʲ��ΰ�̣����ġ�
120  *
121  * khretsu -- ���θ��䤬�����
122  * khpoint -- ���θ���ιԤΤʤ��Ǥΰ���
123  * khdata -- ���θ����ʸ����ؤΥݥ���
124  */
125 
126 typedef struct {
127   int khretsu;
128   int khpoint;
129   wchar_t *khdata;
130 } kouhoinfo;
131 
132 #define ROMEBUFSIZE 	1024
133 #define	BANGOSIZE	2	/* �������γƸ�����ֹ�ΥХ��ȿ� */
134 #define	REVSIZE		2	/* ���������ֹ�Υ�С����ΥХ��ȿ� */
135 #define	BANGOMAX   	9	/* ���������κ������� */
136 #define KIGOSIZE	1	/* �������ΥХ��ȿ� */
137 #define GL_KUHAKUSIZE	1	/* �����ֹ�ζ���ʸ���ΥХ��ȿ� */
138 #define KG_KUHAKUSIZE	1	/* ����δ֤ζ���ʸ���ΥХ��ȿ� */
139 #define KIGOCOL		(KIGOSIZE + KG_KUHAKUSIZE)
140 					/* bangomax��׻����뤿��ο� */
141 #define	KIGOBANGOMAX   	16	/* ���������κ������� */
142 #define HINSHISUU	14
143 #define HINSHIBUF	256
144 #define GOBISUU		9
145 
146 #define	ON		1
147 #define	OFF		-1
148 
149 #define	NG		-1
150 
151 #define NO_CALLBACK	0
152 #define NCALLBACK	4
153 
154 #define	JISHU_HIRA	0
155 #define JISHU_ZEN_KATA	1
156 #define JISHU_HAN_KATA	2
157 #define JISHU_ZEN_ALPHA	3
158 #define JISHU_HAN_ALPHA	4
159 #define MAX_JISHU	5
160 
161 #define  SENTOU        1
162 #define  HENKANSUMI    2
163 #define  SUPKEY        4
164 #define  WARIKOMIMOJI  8
165 #define  SHIRIKIRE    16
166 #define  ATAMAKIRE    32
167 
168 typedef char *mode_context;
169 
170 struct callback {
171   int (*func[NCALLBACK])();
172   mode_context    env;
173   struct callback *next;
174 };
175 
176 /* identifier for each context structures */
177 #define CORE_CONTEXT       (char)0
178 #define YOMI_CONTEXT       (char)1
179 #define JISHU_CONTEXT      (char)2
180 #define HENKAN_CONTEXT     (char)3
181 #define ICHIRAN_CONTEXT    (char)4
182 #define FORICHIRAN_CONTEXT (char)5
183 #define MOUNT_CONTEXT      (char)6
184 #define TOUROKU_CONTEXT    (char)7
185 #define ADJUST_CONTEXT     (char)8
186 #define CHIKUJI_CONTEXT    (char)9
187 
188 typedef struct _coreContextRec {
189   char id;
190   char majorMode, minorMode;
191   struct callback c;
192   KanjiMode	  prevMode; /* �������Υ⡼�� */
193   mode_context    next;
194 } coreContextRec, *coreContext;
195 
196 typedef struct  _yomiContextRec {
197   /* core �����Ʊ������ */
198   char id;
199   char majorMode, minorMode;
200   struct callback c;
201   KanjiMode	  prevMode;	/* �������Υ⡼�� */
202   mode_context    next;
203 
204   /* ���޻������Ѵ��ط� */
205   struct RkwRxDic *romdic;	/* ���޻������Ѵ����� */
206   wchar_t   romaji_buffer[ROMEBUFSIZE];
207   /* ���޻��Хåե��� rStartp, rEndp �Σ��ĤΥ���ǥå����ˤ�äƴ�������
208    * �롣rStartp �ϥ��ʤ��Ѵ��Ǥ��ʤ��ä����޻��κǽ��ʸ���ؤΥ���ǥ�
209    * �����Ǥ��ꡢrEndp �Ͽ����˥��޻������Ϥ�����ˡ���Ǽ���٤�
210    * romaji_buffer ��Υ���ǥå����Ǥ��롣���������Ϥ������޻��ϡ�
211    * romaji_buffer + rEndp �����˳�Ǽ���졢���Υ��޻����ʤ��Ѵ���
212    * ����ϡ�romaji_buffer + rStartp ���� rEndp - rStartp �Х��Ȥ�ʸ����
213    * �оݤȤʤ롣 */
214   int		  rEndp, rStartp, rCurs; /* ���޻��Хåե��Υݥ��� */
215   wchar_t         kana_buffer[ROMEBUFSIZE];
216   BYTE            rAttr[ROMEBUFSIZE], kAttr[ROMEBUFSIZE];
217   int		  kEndp; /* ���ʥХåե��κǸ������ݥ��� */
218   int             kRStartp, kCurs;
219 
220   /* ����¾�Υ��ץ���� */
221   KanjiMode       myEmptyMode;		/* empty �⡼�ɤϤɤ줫 */
222   long		  generalFlags;		/* see below */
223   char		  allowedChars;		/* see jrkanji.h */
224   char		  henkanInhibition;	/* see below */
225   int		  (*henkanCallback)();	/* �Ѵ���Ԥ����ˤ����ѿ��˥��ɥ쥹
226              �����ꤵ��Ƥ���ʤ�Ф��Υ��ɥ쥹�δؿ����̾�δؿ��������
227              �Ƥ֡����ꤵ��Ƥ��ʤ������̾�δؿ���Ƥ֡�
228                �����Ѵ��ʤɤ��Ѵ������������줿�����ü�ʽ������Ԥ���Τ�
229              �б����뤿����դ�����
230 	       �Ѵ�������Хå��ϰ����Ȥ��Ƥɤ��Ѵ��ؿ����ƤФ줿�Τ�����
231 	     �ֹ��ȼ����*/
232   int             cursup;		/* ���ʤ����ɤλ��˻Ȥ� */
233 #define SUSPCHARBIAS 100
234   int             n_susp_chars;
235 
236   /* ������ѿ� */
237   wchar_t	  *retbuf, *retbufp;
238   int		  retbufsize;
239 } yomiContextRec, *yomiContext;
240 
241 /* for generalFlags */
242 #define CANNA_YOMI_BREAK_ROMAN		0x1L
243 #define CANNA_YOMI_CHGMODE_INHIBITTED	0x2L
244 #define CANNA_YOMI_END_IF_KAKUTEI	0x4L
245 #define CANNA_YOMI_DELETE_DONT_QUIT	0x8L
246 
247 #define CANNA_YOMI_KAKUTEI		0x10L
248 #define CANNA_YOMI_HENKAN		0x20L
249 #define CANNA_YOMI_ZENKAKU		0x40L
250 #define CANNA_YOMI_HANKAKU		0x80L
251 #define CANNA_YOMI_HIRAGANA		0x100L
252 #define CANNA_YOMI_KATAKANA		0x200L
253 #define CANNA_YOMI_ROMAJI		0x400L
254 #define CANNA_YOMI_ATTRFUNCS		0x7f0L
255 
256 #define CANNA_YOMI_BASE_HANKAKU		0x800L
257 
258 #define CANNA_YOMI_IGNORE_USERSYMBOLS	0x1000L
259 
260 /* kind of allowed input keys */
261 #define CANNA_YOMI_INHIBIT_NONE		0
262 #define CANNA_YOMI_INHIBIT_HENKAN	1
263 #define CANNA_YOMI_INHIBIT_JISHU	2
264 #define CANNA_YOMI_INHIBIT_ASHEX	4
265 #define CANNA_YOMI_INHIBIT_ASBUSHU	8
266 #define CANNA_YOMI_INHIBIT_ALL		15
267 
268 /* ��������Τ���Υե饰 */
269 #define NUMBERING 			1
270 #define CHARINSERT			2
271 
272 #define CANNA_JISHU_UPPER		1
273 #define CANNA_JISHU_CAPITALIZE		2
274 
275 typedef struct _henkanContextRec {
276   char id;
277   char majorMode, minorMode;
278   struct callback c;
279   KanjiMode	  prevMode;	/* �������Υ⡼�� */
280   mode_context    next;
281 
282   /* ���ʴ����Ѵ��ط� */
283   int            context;
284   int            check;
285   int		 kouhoCount;	/* ���� henkanNext ��Ϣ³���Ʋ����줿�� */
286   wchar_t        yomi_buffer[ROMEBUFSIZE];
287   wchar_t        echo_buffer[ROMEBUFSIZE];
288   wchar_t        **allkouho; /* RkGetKanjiList��������ʸ���������ˤ���
289 				�ȤäƤ����Ȥ��� */
290   int            yomilen;    /* �ɤߤ�Ĺ�����ɤ߼��Ȥ� kana_buffer ������
291 			        ���� */
292   int            curbun;     /* ������ʸ�� */
293   int		 curIkouho;  /* �����ȸ��� */
294   int            nbunsetsu;  /* ʸ��ο� */
295 #define MAXNBUNSETSU	256
296   int            kugiri[MAXNBUNSETSU]; /* ʸ��ʬ����Ԥ�����ʸ�᤯��
297 					  ��ξ��� */
298   int		 *kanaKugiri, *romajiKugiri, *jishubun;
299   yomiContext    ycx;
300 /* ifdef MEASURE_TIME */
301   long		 proctime;   /* ��������(�Ѵ��Ƿ�¬����) */
302   long		 rktime;     /* ��������(RK�ˤ��������) */
303 /* endif MEASURE_TIME */
304 } henkanContextRec, *henkanContext;
305 
306 typedef struct _jishuContextRec {
307   char id;
308   char majorMode, minorMode;
309   struct callback c;
310   KanjiMode	  prevMode;	/* ���Υ⡼�� */
311   mode_context    next;
312 
313   unsigned char	 inhibition;
314   wchar_t        jishu_buffer[ROMEBUFSIZE];
315   int            jishu_len, jishu_kEndp, jishu_rEndp;
316   unsigned char  kc, jishu_case;
317   yomiContext    ycx;
318   henkanContext    hcx;
319 } jishuContextRec, *jishuContext;
320 
321 typedef struct _ichiranContextRec {
322   char id;
323   char majorMode, minorMode;
324   struct callback c;
325   KanjiMode	  prevMode;	/* �������Υ⡼�� */
326   mode_context    next;
327 
328   int            svIkouho;   /* �����ȸ�������ȤäƤ���(����ɽ����) */
329   int            *curIkouho; /* �����ȸ��� */
330   int            nIkouho;    /* ����ο�(����ɽ����) */
331   int		 tooSmall;   /* �������������Ƹ���������Ф��ʤ���ե饰 */
332   int            curIchar;   /* ̤����ʸ�������ñ����Ͽ��ñ�����Ϥ�
333     							��Ƭʸ���ΰ��� */
334   unsigned char  inhibit;
335   unsigned char  flags;	     /* �����Ƥ� */
336   wchar_t        **allkouho; /* RkGetKanjiList��������ʸ���������ˤ���
337 				�ȤäƤ����Ȥ��� */
338   wchar_t        *glinebufp; /* ��������Τ����Ԥ�ɽ�����뤿���ʸ��
339 				��ؤΥݥ��� */
340   kouhoinfo      *kouhoifp;  /* ��������ط��ξ�����Ǽ���Ƥ�����¤��
341 				�ؤΥݥ��� */
342   glineinfo      *glineifp;  /* ��������ط��ξ�����Ǽ���Ƥ�����¤��
343 				�ؤΥݥ��� */
344 } ichiranContextRec, *ichiranContext;
345 
346 /* �ե饰�ΰ�̣ */
347 #define ICHIRAN_ALLOW_CALLBACK 1 /* ������Хå����Ƥ��ɤ� */
348 
349 
350 typedef struct _foirchiranContextRec {
351   char id;
352   char majorMode, minorMode;
353   struct callback c;
354   KanjiMode	  prevMode;	/* �������Υ⡼�� */
355   mode_context    next;
356 
357   int            curIkouho;  /* �����ȸ��� */
358   wchar_t        **allkouho; /* RkGetKanjiList��������ʸ���������ˤ���
359 				�ȤäƤ����Ȥ��� */
360   menuitem       *table;  /* ʸ����ȴؿ��Υơ��֥� */
361   int            *prevcurp;  /* ���Υ����ȸ��� */
362   int            (*prevfunc)();  /* ���δؿ� */
363   int            (*curfunc)();  /* �����ȴؿ� */
364 } forichiranContextRec, *forichiranContext;
365 
366 typedef struct _mountContextRec {
367   char id;
368   char majorMode, minorMode;
369   struct callback c;
370   KanjiMode	  prevMode;	/* �������Υ⡼�� */
371   mode_context    next;
372 
373   unsigned char        *mountOldStatus; /* �ޥ���Ȥ���Ƥ��뤫���ʤ��� */
374   unsigned char        *mountNewStatus; /* �ޥ���Ȥ���Ƥ��뤫���ʤ��� */
375   unsigned char        **mountList;   /* �ޥ���Ȳ�ǽ�ʼ���ΰ��� */
376   int            curIkouho;     /* �����ȸ��� */
377 } mountContextRec, *mountContext;
378 
379 typedef struct _tourokuContextRec {
380   char id;
381   char majorMode, minorMode;
382   struct callback c;
383   KanjiMode	  prevMode;	/* �������Υ⡼�� */
384   mode_context    next;
385 
386   wchar_t        genbuf[ROMEBUFSIZE];
387   wchar_t        qbuf[ROMEBUFSIZE];
388   wchar_t        tango_buffer[ROMEBUFSIZE];
389   int            tango_len;  /* ñ����Ͽ��ñ���ʸ�����Ĺ�� */
390   wchar_t        yomi_buffer[ROMEBUFSIZE];
391   int            yomi_len;   /* ñ����Ͽ���ɤߤ�ʸ�����Ĺ�� */
392   int            curHinshi;  /* �ʻ������ */
393   wchar_t	 hcode[16];   /* ñ����Ͽ���ʻ� */
394   int		 katsuyou;   /* ñ����Ͽ��ư��γ��ѷ� */
395   wchar_t        **udic;     /* ñ����Ͽ�Ǥ��뼭�� (����̾) */
396   int            delContext; /* ñ�����ǣ��Ĥμ����ޥ���Ȥ��� */
397 } tourokuContextRec, *tourokuContext;
398 
399 typedef struct _adjustContextRec {
400   char id;
401   char majorMode, minorMode;
402   struct callback c;
403   KanjiMode	  prevMode;	/* �������Υ⡼�� */
404   mode_context    next;
405 
406   yomiContext    ycx;
407   henkanContext  hcx;
408 
409   wchar_t        genbuf[ROMEBUFSIZE];
410   int            kanjilen, strlen, bunlen; /* ������ʬ�����Ρ�ʸ���Ĺ�� */
411 } adjustContextRec, *adjustContext;
412 
413 typedef struct _chikujiContextRec {
414   char id;
415   char majorMode, minorMode;
416   struct callback c;
417   KanjiMode	  prevMode;
418   mode_context    next;
419 
420   yomiContext    yc;
421   henkanContext  hc;
422   wchar_t        echo_buffer[ROMEBUFSIZE];
423   int		 ye, ys;
424   int		 status;
425 } chikujiContextRec, *chikujiContext;
426 
427 #define	CHIKUJI_ON_BUNSETSU		0x0001
428 #define	CHIKUJI_YOMI_CHANGED		0x0002
429 #define	CHIKUJI_RENBUNSETSU		0x0004
430 #define	CHIKUJI_DOING_HENKAN		0x0008
431 #define	CHIKUJI_OVERWRAP		0x0010
432 #define	CHIKUJI_HENKAN_INHIBIT		0x0020
433 #define CHIKUJI_HENKAN_FAILED		0x0040
434 #define	CHIKUJI_NULL_STATUS		0x0000
435 
436 struct moreTodo {
437   char          todo; /* ��äȤ���Ρ����� */
438   char          fnum; /* �ؿ��ֹ档���ʤ鼡��ʸ���Ǽ�����뤳�Ȥ��� */
439   unsigned char ch;   /* ʸ�� */
440 };
441 
442 /* �⡼��̾���Ǽ����ǡ����η���� */
443 
444 struct ModeNameRecs {
445   int           alloc;
446   wchar_t       *name;
447 };
448 
449 
450 /*
451  * ���޻������Ѵ��ơ��֥�ϣ��Ĥ�����ɤ��Ǥ��礦��ʣ����ɬ�פʤΤ�
452  * ����� RomeStruct �Υ��ФȤ�������Ƥ���ɬ�פ⤢��ޤ��礦��...��
453  * �λ��Ϥ��λ��ǹͤ��ޤ��礦��
454  */
455 
456 extern struct RkwRxDic *romajidic, *RkwOpenRoma();
457 
458 /*
459  * �����̾��������Ƥ����ѿ�
460  */
461 
462 #define MAX_DICS 16
463 
464 extern char *kanjidicname[];
465 extern int  nkanjidics;
466 
467 extern char *userdicname[];
468 extern int  nuserdics;
469 extern char userdicstatus[];
470 
471 extern char *bushudicname[];
472 extern int nbushudics;
473 
474 extern char *localdicname[];
475 extern int nlocaldics;
476 
477 /*
478  * ���顼�Υ�å�����������Ƥ����ѿ�
479  */
480 
481 extern char *necKanjiError;
482 
483 /*
484  * �ǥХ�ʸ��ɽ�����뤫�ɤ����Υե饰
485  */
486 
487 extern iroha_debug;
488 
489 /*
490  * 16�ʥ��������Ϥ�����Ԥ�ɽ�����뤫�ɤ�����Ĵ�٤��
491  */
492 
493 #define hexGLine(plen) (d->ncolumns /2 >= plen + 4)
494 
495 /*
496  * ��������������ȯ������褦�ʥ���
497  */
498 
499 #define IrohaFunctionKey(key) \
500   ((0x80 <= (int)(unsigned char)(key) &&  \
501     (int)(unsigned char)(key) <= 0x8b) || \
502    (0x90 <= (int)(unsigned char)(key) &&  \
503     (int)(unsigned char)(key) <= 0x9b) || \
504    (0xe0 <= (int)(unsigned char)(key) &&  \
505     (int)(unsigned char)(key) <= 0xff) )
506 
507 /* selectOne �ǥ�����Хå���ȼ�����ɤ�����ɽ���ޥ��� */
508 
509 #define WITHOUT_LIST_CALLBACK 0
510 #define WITH_LIST_CALLBACK    1
511 
512 /*
513  * Rk �ؿ���ȥ졼�����뤿���̾���ν�������
514  */
515 
516 #ifdef DEBUG
517 #include "traceRK.h"
518 #endif /* DEBUG */
519 
520 /*
521  * �ǥХ���å����������ѤΥޥ���
522  */
523 
524 #ifdef DEBUG
525 #define debug_message(fmt, x, y, z)	dbg_msg(fmt, x, y, z)
526 #else /* !DEBUG */
527 #define debug_message(fmt, x, y, z)
528 #endif /* !DEBUG */
529 
530 /*
531  * malloc �ΥǥХ�
532  */
533 
534 #ifdef DEBUG_ALLOC
535 extern int fail_malloc;
536 #define malloc(n) debug_malloc(n)
537 #endif /* DEBUG_MALLOC */
538 
539 #ifndef	_UTIL_FUNCTIONS_DEF_
540 
541 #define	_UTIL_FUNCTIONS_DEF_
542 
543 extern makeGLineMessage();
544 extern makeGLineMessageFromStrings();
545 extern setWStrings();
546 extern WStrlen();
547 extern wchar_t *WStrcat();
548 extern wchar_t *WStrcpy();
549 extern wchar_t *WStrncpy();
550 extern WStrncmp();
551 extern MBstowcs();
552 extern wchar_t *WString();
553 
554 #endif	/* _UTIL_FUNCTIONS_DEF_ */
555 
556 /*
557  * �������⡼�ɤ�������빽¤��
558  */
559 
560 typedef struct {
561   wchar_t         *display_name; /* �⡼��ɽ��̾ */
562   unsigned char   *romaji_table; /* ���޻������Ѵ��ơ��֥�(EUC) */
563   struct RkwRxDic *romdic;	 /* ���޻�����¤�� */
564   long            romdic_owner;  /* ���޻������ʬ��Open������ */
565   long            flags;	 /* flags for yomiContext->generalFlags */
566   KanjiMode       emode;	 /* current_mode �����빽¤�� */
567 } newmode;
568 
569 #define MAX_OTHER_MODES 16
570 
571 /* ���޻������Ѵ�����­���륭����ʸ�����Ѵ��ơ��֥� */
572 
573 typedef struct {
574   wchar_t	key;		/* ���� */
575   int		groupid;	/* ���롼��id */
576   int           ncand;          /* ����ο� */
577   wchar_t       **cand;         /* ��������� */
578   wchar_t	*fullword;	/* ������ (����1@����2@...����n@@) */
579 } keySupplement;
580 
581 #define MAX_KEY_SUP 64
582 
583 #ifndef	DEBUG_CHIKUJI
584 #define	debugging(a)
585 #define debuggingf(a, b)
586 #define debuggingw(a, b, c)
587 #endif	/* DEBUG_CHIKUJI */
588 
589 #define HEX_USUAL     0
590 #define HEX_IMMEDIATE 1
591 
592 #define CANNA_HALF_VERBOSE 1
593 
594 #endif /* !_CANNA_H_ */
595