1 /*
2  *  $Id: zy_table.c,v 1.4 2005/04/10 15:26:37 aonoto Exp $
3  */
4 
5 /*
6  * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7  * This file is part of FreeWnn.
8  *
9  * Copyright Kyoto University Research Institute for Mathematical Sciences
10  *                 1987, 1988, 1989, 1990, 1991, 1992
11  * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
12  * Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
13  * Copyright FreeWnn Project 1999, 2000
14  *
15  * Maintainer:  FreeWnn Project   <freewnn@tomo.gr.jp>
16  *
17  * This library is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the
29  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30  * Boston, MA 02111-1307, USA.
31  */
32 
33 /**  cWnn  Version 1.1   **/
34 
35 #include  <ctype.h>
36 #include "commonhd.h"
37 #ifdef CHINESE
38 #include "cplib.h"
39 
40 /* zy_shengmu_tbl: ShengMu table of Chinese ZhuYin  */
41 char *zy_shengmu_tbl[ZY_NUM_SHENGMU] = {
42 
43   "", "��", "��", "��", "��",   /*      "", "B", "C",  "Ch", "D",   */
44   "��", "��", "��", "��", "��", /*     "F", "G", "H",  "J",  "K", */
45   "��", "��", "��", "��", "��", /*     "L", "M", "N",  "P",  "Q",  */
46   "��", "��", "��", "��", "��", /*     "R", "S", "Sh", "T",  "W",  */
47   "��", "��", "��", "��"        /*      "X", "Y", "Z",  "Zh"   */
48 };
49 
50 
51 /* zy_yunmu_tbl: YunMu table of Chinese ZhuYin  */
52 char *zy_yunmu_tbl[ZY_NUM_YUNMU * 5] = {
53 /* 3.20
54         "",     "",     "",      "",      "",
55 */
56   "��", "��", "��", "��", "��", /* a    */
57   "�ڎ�", "�ڎ�", "�ڎ�", "�ڎ�", "�ڎ�",       /* a    */
58   "�ގ�", "�ގ�", "�ގ�", "�ގ�", "�ގ�",       /* ai   */
59   "���", "���", "���", "���", "���",       /* an   */
60   "���", "���", "���", "���", "���",       /* ang  */
61   "����", "����", "����", "����", "����",       /* ao   */
62   "�܎�", "�܎�", "�܎�", "�܎�", "�܎�",       /* e    */
63   "�ߎ�", "�ߎ�", "�ߎ�", "�ߎ�", "�ߎ�",       /* ei   */
64   "���", "���", "���", "���", "���",       /* en   */
65   "���", "���", "���", "���", "���",       /* eng  */
66   "���", "���", "���", "���", "���",       /* er   */
67   "���", "���", "���", "���", "���",       /* i    */
68   "��ڎ�", "��ڎ�", "��ڎ�", "��ڎ�", "��ڎ�",     /* ia   */
69   "����", "����", "����", "����", "����",     /* ian  */
70   "����", "����", "����", "����", "����",     /* iang */
71   "�����", "�����", "�����", "�����", "�����",     /* iao  */
72   "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�",     /* ie   */
73   "����", "����", "����", "����", "����",     /* in   */
74   "����", "����", "����", "����", "����",     /* ing  */
75   "����", "����", "����", "����", "����",     /* iong */
76   "����", "����", "����", "����", "����",     /* iu   */
77   "�ǎ�", "�ǎ�", "�ǎ�", "�ǎ�", "�ǎ�",       /* m    */
78   "�ˎ�", "�ˎ�", "�ˎ�", "�ˎ�", "�ˎ�",       /* n    */
79   "@��", "@��", "@��", "@��", "@��",    /* ng   */
80   "�ێ�", "�ێ�", "�ێ�", "�ێ�", "�ێ�",       /* o    */
81   "����", "����", "����", "����", "����",     /* ong  */
82   "���", "���", "���", "���", "���",       /* ou   */
83   "���", "���", "���", "���", "���",       /* u    */
84   "��ڎ�", "��ڎ�", "��ڎ�", "��ڎ�", "��ڎ�",     /* ua   */
85   "��ގ�", "��ގ�", "��ގ�", "��ގ�", "��ގ�",     /* uai  */
86   "����", "����", "����", "����", "����",     /* uan  */
87   "����", "����", "����", "����", "����",     /* uang */
88   "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�",     /* ue   */
89   "��ߎ�", "��ߎ�", "��ߎ�", "��ߎ�", "��ߎ�",     /* ui   */
90   "����", "����", "����", "����", "����",     /* un   */
91   "��ێ�", "��ێ�", "��ێ�", "��ێ�", "��ێ�",     /* uo   */
92   "���", "���", "���", "���", "���",       /* ��   */
93   "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�", "��ݎ�",     /* ��e  */
94   "0��", "1��", "2��", "3��", "4��",    /* undefinited YunMu */
95   "����", "����", "����", "����", "����",     /* ��an,        only ZhuYin */
96   "����", "����", "����", "����", "����",     /* ��n, only ZhuYin */
97 };
98 
99 
100 /* zhuyin_tbl:  size is ZY_NUM_SHENGMU*ZY_NUM_YUNMU, including empty ShengMu */
101 /*              empty YunMu and undefinited ShengMu '-' */
102 
103 int zhuyin_tbl[ZY_NUM_SHENGMU * ZY_NUM_YUNMU] = {
104 
105 /* empty ShengMu */
106   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
107   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X9586, 0X0000, 0X9592, 0X9599,
108   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X0000, 0X0000, 0X0000,
109   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X959B, 0X95A0, 0X0000, 0X959E,
110   0X95A2,
111 
112 /* SHengMu B */
113   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000,
114   0X0000, 0X8000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
115   0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000, 0X0000,
116   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
117   0X0000,
118 
119 /* ShengMu C */
120   0X828B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
121   0X0000, 0X0280, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
122   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
123   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
124   0X0000,
125 
126 /* ShengMu Ch */
127   0X838B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000,
128   0X0000, 0X0380, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
129   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
130   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
131   0X0000,
132 
133 /* ShengMu D */
134   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
135   0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X8000, 0X0000,
136   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
137   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
138   0X0000,
139 
140 /* ShengMu F */
141   0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000,
142   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
143   0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X0000,
144   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
145   0X0000,
146 
147 /* ShengMu G */
148   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
149   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
150   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
151   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
152   0X0000,
153 
154 /* ShengMu H */
155   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
156   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
157   0X0000, 0X8000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
158   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
159   0X0000,
160 
161 /* ShengMu J */
162   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
163   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
164   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X08A4, 0X0000, 0X0000,
165   0X08A7, 0X0000, 0X08A5, 0X0000, 0X08A8, 0X0000, 0X889B, 0X88A0, 0X8000, 0X889E,
166   0X88A2,
167 
168 /* ShengMu K */
169   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
170   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
171   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
172   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
173   0X0000,
174 
175 /* ShengMu L */
176   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000,
177   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
178   0X8000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
179   0X8000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
180   0X0000,
181 
182 /* ShengMu M */
183   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
184   0X0000, 0X8000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
185   0X8000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X0000,
186   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
187   0X0000,
188 
189 /* ShengMu N */
190   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
191   0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
192   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
193   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
194   0X0000,
195 
196 /* ShengMu P */
197   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000,
198   0X0000, 0X8000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
199   0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X0000,
200   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
201   0X0000,
202 
203 /* ShengMu Q */
204   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
205   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
206   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0EA4, 0X0000, 0X0000,
207   0X0EA7, 0X0000, 0X0EA5, 0X0000, 0X0EA8, 0X0000, 0X8E9B, 0X8EA0, 0X8000, 0X8E9E,
208   0X8EA2,
209 
210 /* ShengMu R */
211   0X8F8B, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000,
212   0X0000, 0X0F80, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
213   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000,
214   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
215   0X0000,
216 
217 /* ShengMu S */
218   0X908B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000, 0X8000,
219   0X0000, 0X1080, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
220   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
221   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
222   0X0000,
223 
224 /* ShengMu Sh */
225   0X918B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
226   0X0000, 0X1180, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
227   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000,
228   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
229   0X0000,
230 
231 /* ShengMu T */
232   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X8000,
233   0X0000, 0X8000, 0X0000, 0X8000, 0X0000, 0X8000, 0X8000, 0X0000, 0X8000, 0X0000,
234   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
235   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
236   0X0000,
237 
238 /* ShengMu W */
239   0X939B, 0X8000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000,
240   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
241   0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000, 0X0000, 0X1380, 0X0000, 0X0000,
242   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
243   0X0000,
244 
245 /* ShengMu X */
246   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
247   0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
248   0X8000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X14A4, 0X0000, 0X0000,
249   0X14A7, 0X0000, 0X14A5, 0X0000, 0X14A8, 0X0000, 0X949B, 0X94A0, 0X8000, 0X949E,
250   0X94A2,
251 
252 /* ShengMu Y */
253   0X958B, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0090, 0X0000, 0X9591, 0X9592,
254   0X0000, 0X1580, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X1588, 0X1589, 0X0000,
255   0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X0093, 0X8000, 0X00A4, 0X0000, 0X0000,
256   0X00A7, 0X0000, 0X00A5, 0X0000, 0X00A8, 0X0000, 0X0000, 0X0000, 0X8000, 0X0000,
257   0X0000,
258 
259 /* ShengMu Z */
260   0X968B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
261   0X0000, 0X1680, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
262   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000,
263   0X8000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
264   0X0000,
265 
266 /* ShengMu Zh  */
267   0X978B, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
268   0X0000, 0X1780, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000,
269   0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X8000, 0X8000, 0X8000, 0X8000, 0X8000,
270   0X8000, 0X8000, 0X0000, 0X8000, 0X8000, 0X8000, 0X0000, 0X0000, 0X8000, 0X0000,
271   0X0000,
272 
273 };
274 #endif /* CHINESE */
275