2 * Copyright (C) 1999-2010, 2012, 2016 Free Software Foundation, Inc.
3 * This file is part of the GNU LIBICONV Library.
5 * The GNU LIBICONV Library is free software; you can redistribute it
6 * and/or modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
10 * The GNU LIBICONV Library is distributed in the hope that it will be
11 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with the GNU LIBICONV Library; see the file COPYING.LIB.
17 * If not, see <https://www.gnu.org/licenses/>.
24 static const unsigned short hkscs2008_2uni_page87
[126] = {
26 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
27 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
28 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
29 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
30 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
31 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
32 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd, 0x22fd,
33 0x22fd, 0x22fd, 0x0175, 0x2453, 0x299e, 0x2d21, 0x03ec, 0x2bde,
34 0x02f5, 0x16fc, 0x2197, 0x2a61, 0x300d, 0x26ea, 0x238a, 0x275e,
35 0x060a, 0x1884, 0x2196, 0x1f2f, 0x0930, 0x1a13, 0x0d96, 0x204a,
36 0x1e18, 0x15d0, 0x1632, 0x0f60, 0x1129, 0x1b9d, 0x144c, 0x17c5,
37 0x1082, 0x162c, 0x0a4f, 0x1d46, 0x00e6, 0x13c4, 0x2cb9, 0x14c6,
38 0x21c7, 0x0cb3, 0x092f, 0x0b4c, 0x0531, 0x298e, 0x0d18, 0x1672,
39 0x2f65, 0x1c8f, 0x08ae, 0x2e88, 0x0581, 0x2c99, 0x17ae, 0x25bc,
40 0x21c8, 0x25c1, 0x25c9, 0x25cc, 0x21c9, 0x1904, 0x28bb, 0x04b4,
41 0x21ca, 0x07e1, 0x31ff, 0x0ec1, 0x126e, 0x21cb,
44 static const ucs4_t hkscs2008_2uni_upages
[50] = {
45 0x03400, 0x03800, 0x03a00, 0x03e00, 0x04000, 0x04100, 0x04300, 0x04400,
46 0x04600, 0x04900, 0x05200, 0x05400, 0x05700, 0x05800, 0x06200, 0x06600,
47 0x06700, 0x06a00, 0x07000, 0x07300, 0x07400, 0x07900, 0x07a00, 0x07b00,
48 0x08400, 0x08500, 0x08600, 0x08800, 0x08b00, 0x09000, 0x09200, 0x09400,
49 0x09700, 0x09f00, 0x0ff00, 0x20a00, 0x21d00, 0x22400, 0x23100, 0x23200,
50 0x23500, 0x23600, 0x24100, 0x25800, 0x25d00, 0x26000, 0x26e00, 0x27b00,
55 hkscs2008_mbtowc (conv_t conv
, ucs4_t
*pwc
, const unsigned char *s
, size_t n
)
57 unsigned char c1
= s
[0];
60 unsigned char c2
= s
[1];
61 if ((c2
>= 0x40 && c2
< 0x7f) || (c2
>= 0xa1 && c2
< 0xff)) {
62 unsigned int i
= 157 * (c1
- 0x80) + (c2
- (c2
>= 0xa1 ? 0x62 : 0x40));
67 swc
= hkscs2008_2uni_page87
[i
-1099],
68 wc
= hkscs2008_2uni_upages
[swc
>>8] | (swc
& 0xff);
82 static const unsigned short hkscs2008_2charset
[68] = {
83 0x87be, 0x877a, 0x87a2, 0x877e, 0x87d9, 0x87c6, 0x87ce, 0x87aa,
84 0x87db, 0x87cc, 0x87c4, 0x87ae, 0x87bc, 0x87c5, 0x87c3, 0x87c8,
85 0x87b0, 0x87dd, 0x87b5, 0x87ba, 0x87b6, 0x87de, 0x87bf, 0x87b8,
86 0x87c1, 0x87b3, 0x87bb, 0x87b4, 0x87c9, 0x87a3, 0x87d0, 0x87b9,
87 0x87ab, 0x87d7, 0x87af, 0x87b7, 0x87cb, 0x87bd, 0x87b2, 0x87ad,
88 0x87b1, 0x87ac, 0x87a4, 0x87c2, 0x87d2, 0x87d6, 0x87da, 0x87df,
89 0x87a8, 0x877b, 0x87d1, 0x87d3, 0x87d4, 0x87d5, 0x87a7, 0x87a9,
90 0x87d8, 0x87c7, 0x877c, 0x87a5, 0x87a1, 0x87cf, 0x87c0, 0x877d,
91 0x87cd, 0x87ca, 0x87a6, 0x87dc,
94 static const Summary16 hkscs2008_uni2indx_page34
[15] = {
96 { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
97 { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
98 { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
99 { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0040 },
101 static const Summary16 hkscs2008_uni2indx_page38
[8] = {
103 { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 },
104 { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0020 },
106 static const Summary16 hkscs2008_uni2indx_page3a
[16] = {
108 { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
109 { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
110 { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
111 { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0020 },
113 static const Summary16 hkscs2008_uni2indx_page3e
[15] = {
115 { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
116 { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
117 { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
118 { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x1000 },
120 static const Summary16 hkscs2008_uni2indx_page40
[25] = {
122 { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0000 },
123 { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0000 },
124 { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0000 }, { 4, 0x0010 },
125 { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0000 },
127 { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0002 },
128 { 6, 0x0000 }, { 6, 0x0000 }, { 6, 0x0000 }, { 6, 0x0000 },
131 static const Summary16 hkscs2008_uni2indx_page43
[31] = {
133 { 7, 0x0400 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
134 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
135 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
136 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
138 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
139 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
140 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0000 },
141 { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0002 },
143 static const Summary16 hkscs2008_uni2indx_page46
[11] = {
145 { 9, 0x0000 }, { 9, 0x0000 }, { 9, 0x0000 }, { 9, 0x0000 },
146 { 9, 0x0000 }, { 9, 0x0000 }, { 9, 0x0000 }, { 9, 0x0000 },
147 { 9, 0x0000 }, { 9, 0x0000 }, { 9, 0x4000 },
149 static const Summary16 hkscs2008_uni2indx_page49
[4] = {
151 { 10, 0x0000 }, { 10, 0x0000 }, { 10, 0x8000 }, { 11, 0x0001 },
153 static const Summary16 hkscs2008_uni2indx_page52
[5] = {
155 { 12, 0x0000 }, { 12, 0x0000 }, { 12, 0x0000 }, { 12, 0x0000 },
158 static const Summary16 hkscs2008_uni2indx_page54
[5] = {
160 { 13, 0x0000 }, { 13, 0x0000 }, { 13, 0x0000 }, { 13, 0x0000 },
163 static const Summary16 hkscs2008_uni2indx_page57
[26] = {
165 { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 },
166 { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 },
167 { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0008 },
168 { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 },
170 { 15, 0x0000 }, { 15, 0x0100 }, { 16, 0x0000 }, { 16, 0x0000 },
171 { 16, 0x0000 }, { 16, 0x0000 }, { 16, 0x0000 }, { 16, 0x0000 },
172 { 16, 0x0000 }, { 16, 0x0040 },
174 static const Summary16 hkscs2008_uni2indx_page62
[13] = {
176 { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 },
177 { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 },
178 { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 },
181 static const Summary16 hkscs2008_uni2indx_page66
[25] = {
183 { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 },
184 { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0001 }, { 19, 0x0000 },
185 { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 },
186 { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 },
188 { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 },
189 { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0000 },
192 static const Summary16 hkscs2008_uni2indx_page6a
[3] = {
194 { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0200 },
196 static const Summary16 hkscs2008_uni2indx_page70
[7] = {
198 { 21, 0x0000 }, { 21, 0x0000 }, { 21, 0x0000 }, { 21, 0x0000 },
199 { 21, 0x0000 }, { 21, 0x0000 }, { 21, 0x4000 },
201 static const Summary16 hkscs2008_uni2indx_page73
[29] = {
203 { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
204 { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
205 { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
206 { 22, 0x0010 }, { 23, 0x0000 }, { 23, 0x0000 }, { 23, 0x0000 },
208 { 23, 0x0000 }, { 23, 0x0000 }, { 23, 0x0000 }, { 23, 0x0000 },
209 { 23, 0x1000 }, { 24, 0x0000 }, { 24, 0x0000 }, { 24, 0x0000 },
210 { 24, 0x0000 }, { 24, 0x0000 }, { 24, 0x0000 }, { 24, 0x0000 },
213 static const Summary16 hkscs2008_uni2indx_page79
[45] = {
215 { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
216 { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
217 { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
218 { 25, 0x0000 }, { 25, 0x0001 }, { 26, 0x0000 }, { 26, 0x0000 },
220 { 26, 0x0000 }, { 26, 0x0000 }, { 26, 0x1000 }, { 27, 0x0004 },
221 { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0004 },
222 { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 },
223 { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x1000 },
225 { 30, 0x0000 }, { 30, 0x0000 }, { 30, 0x0000 }, { 30, 0x0000 },
226 { 30, 0x0000 }, { 30, 0x0000 }, { 30, 0x0000 }, { 30, 0x0000 },
227 { 30, 0x0000 }, { 30, 0x0000 }, { 30, 0x4000 }, { 31, 0x0000 },
230 static const Summary16 hkscs2008_uni2indx_page84
[34] = {
232 { 32, 0x0000 }, { 32, 0x0000 }, { 32, 0x0000 }, { 32, 0x0000 },
233 { 32, 0x0000 }, { 32, 0x0000 }, { 32, 0x0000 }, { 32, 0x0000 },
234 { 32, 0x0010 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
235 { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
237 { 33, 0x0010 }, { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 },
238 { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 },
239 { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 },
240 { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 }, { 34, 0x0000 },
242 { 34, 0x0000 }, { 34, 0x0008 },
244 static const Summary16 hkscs2008_uni2indx_page88
[10] = {
246 { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 },
247 { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 },
248 { 35, 0x0000 }, { 35, 0x2000 },
250 static const Summary16 hkscs2008_uni2indx_page8b
[9] = {
252 { 36, 0x0000 }, { 36, 0x0000 }, { 36, 0x0000 }, { 36, 0x0000 },
253 { 36, 0x0000 }, { 36, 0x0000 }, { 36, 0x0000 }, { 36, 0x0000 },
256 static const Summary16 hkscs2008_uni2indx_page90
[5] = {
258 { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 },
261 static const Summary16 hkscs2008_uni2indx_page92
[2] = {
263 { 38, 0x0000 }, { 38, 0x0100 },
265 static const Summary16 hkscs2008_uni2indx_page94
[3] = {
267 { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x8000 },
269 static const Summary16 hkscs2008_uni2indx_page97
[5] = {
271 { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 },
274 static const Summary16 hkscs2008_uni2indx_page9f
[13] = {
276 { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 },
277 { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 },
278 { 41, 0x0000 }, { 41, 0x00c0 }, { 43, 0x0000 }, { 43, 0x0000 },
281 static const Summary16 hkscs2008_uni2indx_page20a
[9] = {
283 { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 },
284 { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 },
287 static const Summary16 hkscs2008_uni2indx_page21d
[6] = {
289 { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 },
290 { 49, 0x0000 }, { 49, 0x0008 },
292 static const Summary16 hkscs2008_uni2indx_page224
[13] = {
294 { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 },
295 { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 },
296 { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x1000 },
299 static const Summary16 hkscs2008_uni2indx_page231
[22] = {
301 { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
302 { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
303 { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
304 { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0400 }, { 55, 0x0000 },
306 { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 },
307 { 55, 0x0000 }, { 55, 0x4000 },
309 static const Summary16 hkscs2008_uni2indx_page235
[26] = {
311 { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 },
312 { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 },
313 { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0800 },
314 { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
316 { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
317 { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
318 { 57, 0x4000 }, { 58, 0x4000 },
320 static const Summary16 hkscs2008_uni2indx_page241
[7] = {
322 { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 },
323 { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0002 },
325 static const Summary16 hkscs2008_uni2indx_page258
[14] = {
327 { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 },
328 { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 },
329 { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 },
330 { 60, 0x0000 }, { 60, 0x4000 },
332 static const Summary16 hkscs2008_uni2indx_page25d
[12] = {
334 { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 },
335 { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 },
336 { 61, 0x0000 }, { 61, 0x0200 }, { 62, 0x0000 }, { 62, 0x0200 },
338 static const Summary16 hkscs2008_uni2indx_page260
[3] = {
340 { 63, 0x0000 }, { 63, 0x0000 }, { 63, 0x0002 },
342 static const Summary16 hkscs2008_uni2indx_page26e
[9] = {
344 { 64, 0x0000 }, { 64, 0x0000 }, { 64, 0x0000 }, { 64, 0x0000 },
345 { 64, 0x0000 }, { 64, 0x0000 }, { 64, 0x0000 }, { 64, 0x0000 },
348 static const Summary16 hkscs2008_uni2indx_page27b
[7] = {
350 { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 },
351 { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0020 },
353 static const Summary16 hkscs2008_uni2indx_page289
[1] = {
357 static const Summary16 hkscs2008_uni2indx_page2ad
[16] = {
359 { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 },
360 { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 },
361 { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 },
362 { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x8000 },
366 hkscs2008_wctomb (conv_t conv
, unsigned char *r
, ucs4_t wc
, size_t n
)
369 const Summary16
*summary
= NULL
;
370 if (wc
>= 0x3400 && wc
< 0x34f0)
371 summary
= &hkscs2008_uni2indx_page34
[(wc
>>4)-0x340];
372 else if (wc
>= 0x3800 && wc
< 0x3880)
373 summary
= &hkscs2008_uni2indx_page38
[(wc
>>4)-0x380];
374 else if (wc
>= 0x3a00 && wc
< 0x3b00)
375 summary
= &hkscs2008_uni2indx_page3a
[(wc
>>4)-0x3a0];
376 else if (wc
>= 0x3e00 && wc
< 0x3ef0)
377 summary
= &hkscs2008_uni2indx_page3e
[(wc
>>4)-0x3e0];
378 else if (wc
>= 0x4000 && wc
< 0x4190)
379 summary
= &hkscs2008_uni2indx_page40
[(wc
>>4)-0x400];
380 else if (wc
>= 0x4300 && wc
< 0x44f0)
381 summary
= &hkscs2008_uni2indx_page43
[(wc
>>4)-0x430];
382 else if (wc
>= 0x4600 && wc
< 0x46b0)
383 summary
= &hkscs2008_uni2indx_page46
[(wc
>>4)-0x460];
384 else if (wc
>= 0x4900 && wc
< 0x4940)
385 summary
= &hkscs2008_uni2indx_page49
[(wc
>>4)-0x490];
386 else if (wc
>= 0x5200 && wc
< 0x5250)
387 summary
= &hkscs2008_uni2indx_page52
[(wc
>>4)-0x520];
388 else if (wc
>= 0x5400 && wc
< 0x5450)
389 summary
= &hkscs2008_uni2indx_page54
[(wc
>>4)-0x540];
390 else if (wc
>= 0x5700 && wc
< 0x58a0)
391 summary
= &hkscs2008_uni2indx_page57
[(wc
>>4)-0x570];
392 else if (wc
>= 0x6200 && wc
< 0x62d0)
393 summary
= &hkscs2008_uni2indx_page62
[(wc
>>4)-0x620];
394 else if (wc
>= 0x6600 && wc
< 0x6790)
395 summary
= &hkscs2008_uni2indx_page66
[(wc
>>4)-0x660];
396 else if (wc
>= 0x6a00 && wc
< 0x6a30)
397 summary
= &hkscs2008_uni2indx_page6a
[(wc
>>4)-0x6a0];
398 else if (wc
>= 0x7000 && wc
< 0x7070)
399 summary
= &hkscs2008_uni2indx_page70
[(wc
>>4)-0x700];
400 else if (wc
>= 0x7300 && wc
< 0x74d0)
401 summary
= &hkscs2008_uni2indx_page73
[(wc
>>4)-0x730];
402 else if (wc
>= 0x7900 && wc
< 0x7bd0)
403 summary
= &hkscs2008_uni2indx_page79
[(wc
>>4)-0x790];
404 else if (wc
>= 0x8400 && wc
< 0x8620)
405 summary
= &hkscs2008_uni2indx_page84
[(wc
>>4)-0x840];
406 else if (wc
>= 0x8800 && wc
< 0x88a0)
407 summary
= &hkscs2008_uni2indx_page88
[(wc
>>4)-0x880];
408 else if (wc
>= 0x8b00 && wc
< 0x8b90)
409 summary
= &hkscs2008_uni2indx_page8b
[(wc
>>4)-0x8b0];
410 else if (wc
>= 0x9000 && wc
< 0x9050)
411 summary
= &hkscs2008_uni2indx_page90
[(wc
>>4)-0x900];
412 else if (wc
>= 0x9200 && wc
< 0x9220)
413 summary
= &hkscs2008_uni2indx_page92
[(wc
>>4)-0x920];
414 else if (wc
>= 0x9400 && wc
< 0x9430)
415 summary
= &hkscs2008_uni2indx_page94
[(wc
>>4)-0x940];
416 else if (wc
>= 0x9700 && wc
< 0x9750)
417 summary
= &hkscs2008_uni2indx_page97
[(wc
>>4)-0x970];
418 else if (wc
>= 0x9f00 && wc
< 0x9fd0)
419 summary
= &hkscs2008_uni2indx_page9f
[(wc
>>4)-0x9f0];
420 else if (wc
>= 0x20a00 && wc
< 0x20a90)
421 summary
= &hkscs2008_uni2indx_page20a
[(wc
>>4)-0x20a0];
422 else if (wc
>= 0x21d00 && wc
< 0x21d60)
423 summary
= &hkscs2008_uni2indx_page21d
[(wc
>>4)-0x21d0];
424 else if (wc
>= 0x22400 && wc
< 0x224d0)
425 summary
= &hkscs2008_uni2indx_page224
[(wc
>>4)-0x2240];
426 else if (wc
>= 0x23100 && wc
< 0x23260)
427 summary
= &hkscs2008_uni2indx_page231
[(wc
>>4)-0x2310];
428 else if (wc
>= 0x23500 && wc
< 0x236a0)
429 summary
= &hkscs2008_uni2indx_page235
[(wc
>>4)-0x2350];
430 else if (wc
>= 0x24100 && wc
< 0x24170)
431 summary
= &hkscs2008_uni2indx_page241
[(wc
>>4)-0x2410];
432 else if (wc
>= 0x25800 && wc
< 0x258e0)
433 summary
= &hkscs2008_uni2indx_page258
[(wc
>>4)-0x2580];
434 else if (wc
>= 0x25d00 && wc
< 0x25dc0)
435 summary
= &hkscs2008_uni2indx_page25d
[(wc
>>4)-0x25d0];
436 else if (wc
>= 0x26000 && wc
< 0x26030)
437 summary
= &hkscs2008_uni2indx_page260
[(wc
>>4)-0x2600];
438 else if (wc
>= 0x26e00 && wc
< 0x26e90)
439 summary
= &hkscs2008_uni2indx_page26e
[(wc
>>4)-0x26e0];
440 else if (wc
>= 0x27b00 && wc
< 0x27b70)
441 summary
= &hkscs2008_uni2indx_page27b
[(wc
>>4)-0x27b0];
442 else if (wc
>= 0x28900 && wc
< 0x28910)
443 summary
= &hkscs2008_uni2indx_page289
[(wc
>>4)-0x2890];
444 else if (wc
>= 0x2ad00 && wc
< 0x2ae00)
445 summary
= &hkscs2008_uni2indx_page2ad
[(wc
>>4)-0x2ad0];
447 unsigned short used
= summary
->used
;
448 unsigned int i
= wc
& 0x0f;
449 if (used
& ((unsigned short) 1 << i
)) {
451 /* Keep in 'used' only the bits 0..i-1. */
452 used
&= ((unsigned short) 1 << i
) - 1;
453 /* Add 'summary->indx' and the number of bits set in 'used'. */
454 used
= (used
& 0x5555) + ((used
& 0xaaaa) >> 1);
455 used
= (used
& 0x3333) + ((used
& 0xcccc) >> 2);
456 used
= (used
& 0x0f0f) + ((used
& 0xf0f0) >> 4);
457 used
= (used
& 0x00ff) + (used
>> 8);
458 c
= hkscs2008_2charset
[summary
->indx
+ used
];
459 r
[0] = (c
>> 8); r
[1] = (c
& 0xff);