This brings HEAD into line with SAMBA_2_2, they now both use bindir.
[kai/samba.git] / source3 / include / kanji.h
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    Kanji Extensions
5    Copyright (C) Andrew Tridgell 1992-1998
6    
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21    Adding for Japanese language by <fujita@ainix.isac.co.jp> 1994.9.5
22      and extend coding system to EUC/SJIS/JIS/HEX at 1994.10.11
23      and add all jis codes sequence at 1995.8.16
24      Notes: Hexadecimal code by <ohki@gssm.otuka.tsukuba.ac.jp>
25      and add upper/lower case conversion 1997.8.21
26 */
27 #ifndef _KANJI_H_
28 #define _KANJI_H_
29
30 /* FOR SHIFT JIS CODE */
31 #define is_shift_jis(c) \
32     ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \
33      || (0xe0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc))
34 #define is_shift_jis2(c) \
35     (0x40 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc \
36     && ((unsigned char) (c)) != 0x7f)
37 #define is_kana(c) ((0xa0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xdf))
38
39 /* case conversion */
40 #define is_sj_upper2(c) \
41   ((0x60 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x79))
42 #define is_sj_lower2(c) \
43   ((0x81 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x9A))
44 #define sjis_alph 0x82
45 #define is_sj_alph(c) (sjis_alph == (unsigned char) (c))
46 #define is_sj_upper(c1, c2) (is_sj_alph (c1) && is_sj_upper2 (c2))
47 #define is_sj_lower(c1, c2) (is_sj_alph (c1) && is_sj_lower2 (c2))
48 #define sj_toupper2(c) \
49     (is_sj_lower2 (c) ? ((int) ((unsigned char) (c) - 0x81 + 0x60)) : \
50      ((int) (unsigned char) (c)))
51 #define sj_tolower2(c) \
52     (is_sj_upper2 (c) ? ((int) ((unsigned char) (c) - 0x60 + 0x81)) : \
53      ((int) (unsigned char) (c)))
54
55 #define is_sj_ru_upper2(c) \
56   ((0x40 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x60))
57 #define is_sj_ru_lower2(c) \
58   (((0x70 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x7e)) || \
59    ((0x80 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x91)))
60 #define sjis_russian 0x84
61 #define is_sj_russian(c) (sjis_russian == (unsigned char) (c))
62 #define is_sj_ru_upper(c1, c2) (is_sj_russian (c1) && is_sj_ru_upper2 (c2))
63 #define is_sj_ru_lower(c1, c2) (is_sj_russian (c1) && is_sj_ru_lower2 (c2))
64 #define sj_ru_toupper2(c) \
65     (is_sj_ru_lower2 (c) ? ((int) ((unsigned char) (c) + \
66         (((unsigned char)(c) >= 0x4f) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
67         ((int) (unsigned char) (c)))
68 #define sj_ru_tolower2(c) \
69     (is_sj_ru_upper2 (c) ? ((int) ((unsigned char) (c) - \
70         (((unsigned char)(c) >= 0x80) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
71         ((int) (unsigned char) (c)))
72
73 #ifdef _KANJI_C_
74 /* FOR EUC CODE */
75 #define euc_kana (0x8e)
76 #define is_euc_kana(c) (((unsigned char) (c)) == euc_kana)
77 #define is_euc(c)  (0xa0 < ((unsigned char) (c)) && ((unsigned char) (c)) < 0xff)
78
79 #define euc_sup (0x8f)
80 #define is_euc_sup(c) (((unsigned char ) (c)) == euc_sup) 
81
82 /* FOR JIS CODE */
83 /* default jis third shift code, use for output */
84 #ifndef JIS_KSO
85 #define JIS_KSO 'B'
86 #endif
87 #ifndef JIS_KSI
88 #define JIS_KSI 'J'
89 #endif
90 /* in: \E$B or \E$@ */
91 /* out: \E(J or \E(B or \E(H */
92 #define jis_esc (0x1b)
93 #define jis_so (0x0e)
94 #define jis_so1 ('$')
95 #define jis_so2 ('B')
96 #define jis_si (0x0f)
97 #define jis_si1 ('(')
98 #define jis_si2 ('J')
99 #define is_esc(c) (((unsigned char) (c)) == jis_esc)
100 #define is_so1(c) (((unsigned char) (c)) == jis_so1)
101 #define is_so2(c) (((unsigned char) (c)) == jis_so2 || ((unsigned char) (c)) == '@')
102 #define is_si1(c) (((unsigned char) (c)) == jis_si1)
103 #define is_si2(c) (((unsigned char) (c)) == jis_si2 || ((unsigned char) (c)) == 'B' \
104     || ((unsigned char) (c)) == 'H')
105 #define is_so(c) (((unsigned char) (c)) == jis_so)
106 #define is_si(c) (((unsigned char) (c)) == jis_si)
107 #define junet_kana1 ('(')
108 #define junet_kana2 ('I')
109 #define is_juk1(c) (((unsigned char) (c)) == junet_kana1)
110 #define is_juk2(c) (((unsigned char) (c)) == junet_kana2)
111
112 #define _KJ_ROMAN (0)
113 #define _KJ_KANJI (1)
114 #define _KJ_KANA (2)
115
116 /* FOR HEX */
117 #define HEXTAG ':'
118 #define hex2bin(x)                                                    \
119     ( ((int) '0' <= ((int) (x)) && ((int) (x)) <= (int)'9')?          \
120         (((int) (x))-(int)'0'):                                       \
121       ((int) 'a'<= ((int) (x)) && ((int) (x))<= (int) 'f')?           \
122         (((int) (x)) - (int)'a'+10):                                  \
123       (((int) (x)) - (int)'A'+10) )
124 #define bin2hex(x)                                                    \
125     ( (((int) (x)) >= 10)? (((int) (x))-10 + (int) 'a'): (((int) (x)) + (int) '0') )
126
127 /* For Hangul (Korean - code page 949). */
128 #define is_hangul(c) ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfd))
129
130 /* For traditional Chinese (known as Big5 encoding - code page 950). */
131 #define is_big5_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf9)) 
132
133 /* For simplified Chinese (code page - 936). */
134 #define is_simpch_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf7))
135
136 #else /* not _KANJI_C_ */
137
138 /*
139  * The following is needed for AIX systems that have
140  * their own #defines for strchr, strrchr, strstr
141  * and strtok.
142  */
143
144 #ifdef strchr
145 #undef strchr
146 #endif /* strchr */
147
148 #ifdef strrchr
149 #undef strrchr
150 #endif /* strrchr */
151
152 #ifdef strstr
153 #undef strstr
154 #endif /* strstr */
155
156 #ifdef strtok
157 #undef strtok
158 #endif /* strtok */
159
160 /* Ensure we use our definitions in all other files than kanji.c. */
161
162 /* Function pointers we will replace. */
163 extern char *(*multibyte_strchr)(const char *s, int c);
164 extern char *(*multibyte_strrchr)(const char *s, int c);
165 extern char *(*multibyte_strstr)(const char *s1, const char *s2);
166 extern char *(*multibyte_strtok)(char *s1, const char *s2);
167 extern char *(*_dos_to_unix)(char *str, BOOL overwrite);
168 extern char *(*_unix_to_dos)(char *str, BOOL overwrite);
169 extern char *(*_dos_to_dos)(char *str, BOOL overwrite);
170 extern BOOL (*is_multibyte_char)(char c);
171 extern int (*_skip_multibyte_char)(char c);
172
173 #define strchr(s1, c) ((*multibyte_strchr)((s1), (c)))
174 #define strrchr(s1, c) ((*multibyte_strrchr)((s1), (c)))
175 #define strstr(s1, s2) ((*multibyte_strstr)((s1), (s2)))
176 #define strtok(s1, s2) ((*multibyte_strtok)((s1), (s2)))
177 #define dos_to_unix(x,y) ((*_dos_to_unix)((x), (y)))
178 #define unix_to_dos(x,y) ((*_unix_to_dos)((x), (y)))
179 #define dos_to_dos(x,y) ((*_dos_to_dos)((x), (y)))
180 #define skip_multibyte_char(c) ((*_skip_multibyte_char)((c)))
181
182 #endif /* _KANJI_C_ */
183
184 #define UNKNOWN_CODE (-1)
185 #define SJIS_CODE (0)
186 #define EUC_CODE (1)
187 #define JIS7_CODE (2)
188 #define JIS8_CODE (3)
189 #define JUNET_CODE (4)
190 #define HEX_CODE (5)
191 #define CAP_CODE (6)
192 #define DOSV_CODE SJIS_CODE
193 #define EUC3_CODE (7)
194 #define UTF8_CODE (8)
195
196 #ifdef _KANJI_C_
197
198 /* For conversion */
199
200 #define EXTSJISC(c)   (0xf0 <= ((unsigned char)(c)) \
201                        && ((unsigned char)(c) <= 0xfc)) 
202 #define GETAHI (0x81)
203 #define GETALO (0xac)
204
205 typedef struct _sjis_regur_t {
206         int start;
207         int end;
208         int rstart;
209 } sjis_regur_t;
210
211 /*  When Converting to EUC and JIS,  there is no room for 
212  *  these SJIS codes whose hi byte is larger than 0xf0.
213  *  
214  *  So we must drop or convert it to harmless code.
215  *  This is not standard way, so it is ad hoc but practical. 
216  *  It is also thought of backward and future compatibility.
217  * 
218  *      Miura.
219  */
220
221 static sjis_regur_t sjisconv[] = {
222 {0xfa40, 0xfa49, 0xeeef},
223 {0xfa4a, 0xfa53, 0x8754},
224 {0xfa54, 0xfa54, 0x81ca},
225 {0xfa55, 0xfa57, 0xeefa},
226 {0xfa58, 0xfa58, 0x878a},
227 {0xfa59, 0xfa59, 0x8782},
228 {0xfa5a, 0xfa5a, 0x8784},
229 {0xfa5b, 0xfa5b, 0x81e6},
230 {0xfa5c, 0xfa7e, 0xed40},
231 {0xfa80, 0xfa9b, 0xed63},
232 {0xfa9c, 0xfafc, 0xed80},
233 {0xfb40, 0xfb5b, 0xede1},
234 {0xfb5c, 0xfb7e, 0xee40},
235 {0xfb80, 0xfb9b, 0xee63},
236 {0xfb9c, 0xfbfc, 0xee80},
237 {0xfc40, 0xfc4b, 0xeee1}
238 };
239 #define SJISCONVTBLSIZ  (sizeof(sjisconv) / sizeof(sjis_regur_t))
240
241 static sjis_regur_t sjisrev[] = {
242 {0x81ca, 0x81ca, 0xfa54},
243 {0x81e6, 0x81e6, 0xfa5b},
244 {0x8754, 0x875d, 0xfa4a},
245 {0x8782, 0x8782, 0xfa59},
246 {0x8784, 0x8784, 0xfa5a},
247 {0x878a, 0x878a, 0xfa58},
248 {0xed40, 0xed62, 0xfa5c},
249 {0xed63, 0xed7e, 0xfa80},
250 {0xed80, 0xede0, 0xfa9c},
251 {0xede1, 0xedfc, 0xfb40},
252 {0xee40, 0xee62, 0xfb5c},
253 {0xee63, 0xee7e, 0xfb80},
254 {0xee80, 0xeee0, 0xfb9c},
255 {0xeee1, 0xeeec, 0xfc40},
256 {0xeeef, 0xeef8, 0xfa40},
257 {0xeefa, 0xeefc, 0xfa55}
258 };
259 #define SJISREVTBLSIZ   (sizeof(sjisrev) / sizeof(sjis_regur_t))
260
261 /* EUC3BYTE DEFINITIONS */
262
263 typedef struct _sjis_euc_map_t {
264   int  sjis;
265   int  euc;
266 } sjis_euc_map_t;
267  
268 static sjis_euc_map_t euc3conv2[] = {
269 {0x8754 , 0xf3fd},
270 {0x8755 , 0xf3fe},
271 {0x8756 , 0xf4a1},
272 {0x8757 , 0xf4a2},
273 {0x8758 , 0xf4a3},
274 {0x8759 , 0xf4a4},
275 {0x875a , 0xf4a5},
276 {0x875b , 0xf4a6},
277 {0x875c , 0xf4a7},
278 {0x875d , 0xf4a8},
279 {0x8782 , 0xf4ac},
280 {0x8784 , 0xf4ad},
281 {0x878a , 0xf4ab}
282 };
283 #define EUC3CONV2TBLSIZ (sizeof(euc3conv2) / sizeof(sjis_euc_map_t))
284
285
286 /* IBM Kanji to EUC 3byte */
287 static int euc3conv[] = {
288 /* 0xfa40 */ 
289 0xf3f3, 0xf3f4, 0xf3f5, 0xf3f6, 0xf3f7, 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc, 0xf3fd, 0xf3fe, 0xf4a1, 0xf4a2, 0xf4a3, 0xf4a4,
290 /* 0xfa50 */
291 0xf4a5, 0xf4a6, 0xf4a7, 0xf4a8, 0, 0xa2c3, 0xf4a9, 0xf4aa, 0xf4ab, 0xf4ac, 0xf4ad, 0, 0xd4e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  0xe9ed, 0xeacd, 0xf4fc, 0xeadb, 0xeae6, 0xeaea, 0xeba5, 0xebfb, 0xebfa, 0xf4fd, 0xecd6, 0xf4fe
338 };
339
340 #define EUC3CONVTBLSIZ  (sizeof(euc3conv) / sizeof(int))
341
342 /* EUC3byte to SJIS Code */
343
344 typedef struct _sjis_euc_revmap_t {
345   int  euc;
346   int  sjis;
347 } sjis_euc_revmap_t;
348
349 static sjis_euc_revmap_t euc3rev[] = {
350 {0xa2c3, 0xfa55},
351 {0xb0a9, 0xfa68},
352 {0xb0c8, 0xfa69},
353 {0xb0d2, 0xfa6b},
354 {0xb0d4, 0xfa6c},
355 {0xb0e3, 0xfa6d},
356 {0xb0ee, 0xfa6e},
357 {0xb1a3, 0xfa70},
358 {0xb1a7, 0xfa6f},
359 {0xb1a9, 0xfa72},
360 {0xb1ac, 0xfa71},
361 {0xb1bb, 0xfa61},
362 {0xb1be, 0xfa73},
363 {0xb1c8, 0xfa76},
364 {0xb1d7, 0xfa77},
365 {0xb1d8, 0xfa75},
366 {0xb1df, 0xfa74},
367 {0xb1e1, 0xfa7a},
368 {0xb1e3, 0xfa78},
369 {0xb1f4, 0xfa79},
370 {0xb2a3, 0xfa7b},
371 {0xb2bb, 0xfa7d},
372 {0xb2e6, 0xfa7e},
373 {0xb2ed, 0xfa80},
374 {0xb2f5, 0xfa81},
375 {0xb2fc, 0xfa82},
376 {0xb3b5, 0xfa84},
377 {0xb3d8, 0xfa85},
378 {0xb3db, 0xfa86},
379 {0xb3dd, 0xfb77},
380 {0xb3e5, 0xfa87},
381 {0xb3ee, 0xfa88},
382 {0xb3fb, 0xfa89},
383 {0xb4c0, 0xfa8c},
384 {0xb4c7, 0xfa8d},
385 {0xb4d0, 0xfa8e},
386 {0xb4de, 0xfa8f},
387 {0xb5aa, 0xfa91},
388 {0xb5af, 0xfa93},
389 {0xb5c4, 0xfa94},
390 {0xb5e8, 0xfa95},
391 {0xb7c2, 0xfa97},
392 {0xb7e4, 0xfa98},
393 {0xb7e7, 0xfa9a},
394 {0xb7e8, 0xfa99},
395 {0xb8ce, 0xfa9e},
396 {0xb8e1, 0xfa9f},
397 {0xb8f5, 0xfaa0},
398 {0xb8f7, 0xfaa1},
399 {0xb8f8, 0xfaa2},
400 {0xb8fc, 0xfaa3},
401 {0xb9af, 0xfaa4},
402 {0xb9b7, 0xfaa5},
403 {0xbabe, 0xfaa6},
404 {0xbadb, 0xfaa7},
405 {0xbae1, 0xfaa9},
406 {0xbaeb, 0xfaab},
407 {0xbbb3, 0xfaac},
408 {0xbbb8, 0xfaad},
409 {0xbbca, 0xfaaf},
410 {0xbbd0, 0xfab2},
411 {0xbbde, 0xfab3},
412 {0xbbf4, 0xfab4},
413 {0xbbf5, 0xfab5},
414 {0xbbf9, 0xfab6},
415 {0xbce4, 0xfab7},
416 {0xbced, 0xfab8},
417 {0xbcf4, 0xfa67},
418 {0xbcfe, 0xfab9},
419 {0xbdc2, 0xfabb},
420 {0xbde7, 0xfabc},
421 {0xbdf0, 0xfabe},
422 {0xbeac, 0xfac0},
423 {0xbeb0, 0xfabf},
424 {0xbeb3, 0xfac2},
425 {0xbebd, 0xfac3},
426 {0xbec9, 0xfac5},
427 {0xbecd, 0xfac4},
428 {0xbee4, 0xfac6},
429 {0xbfa8, 0xfac7},
430 {0xbfc9, 0xfac8},
431 {0xc0c4, 0xfac9},
432 {0xc0e4, 0xfaca},
433 {0xc0f4, 0xfacb},
434 {0xc1a6, 0xfacc},
435 {0xc1f5, 0xface},
436 {0xc1f8, 0xfad1},
437 {0xc1fc, 0xfacf},
438 {0xc2a1, 0xfad3},
439 {0xc2a5, 0xfad4},
440 {0xc2ab, 0xfad2},
441 {0xc2ad, 0xfa63},
442 {0xc2b8, 0xfad6},
443 {0xc2ba, 0xfad7},
444 {0xc2bf, 0xfa66},
445 {0xc2c4, 0xfad9},
446 {0xc2d2, 0xfada},
447 {0xc2d7, 0xfadb},
448 {0xc2db, 0xfadc},
449 {0xc2de, 0xfadd},
450 {0xc2ed, 0xfade},
451 {0xc2f0, 0xfadf},
452 {0xc3a1, 0xfae1},
453 {0xc3b5, 0xfae2},
454 {0xc3b9, 0xfae4},
455 {0xc3c9, 0xfae3},
456 {0xc3d8, 0xfae6},
457 {0xc3fc, 0xfa64},
458 {0xc3fe, 0xfae7},
459 {0xc4cc, 0xfae9},
460 {0xc4d9, 0xfaeb},
461 {0xc4ea, 0xfaec},
462 {0xc4fd, 0xfaed},
463 {0xc5a7, 0xfaef},
464 {0xc5b5, 0xfaf0},
465 {0xc5b6, 0xfaf1},
466 {0xc5d5, 0xfaf3},
467 {0xc6b8, 0xfaf4},
468 {0xc6d7, 0xfaf5},
469 {0xc6e0, 0xfaf6},
470 {0xc6e3, 0xfaf8},
471 {0xc6ea, 0xfaf7},
472 {0xc7a1, 0xfaf9},
473 {0xc7ab, 0xfafa},
474 {0xc7c3, 0xfafc},
475 {0xc7c7, 0xfafb},
476 {0xc7cb, 0xfb40},
477 {0xc7cf, 0xfb41},
478 {0xc7d9, 0xfb42},
479 {0xc7e6, 0xfb45},
480 {0xc7eb, 0xfb48},
481 {0xc7ee, 0xfb46},
482 {0xc7f0, 0xfb49},
483 {0xc7fc, 0xfb47},
484 {0xc8b1, 0xfb4a},
485 {0xc8e5, 0xfb4b},
486 {0xc8f8, 0xfb4c},
487 {0xc9a6, 0xfb4d},
488 {0xc9ab, 0xfb4e},
489 {0xc9ad, 0xfb4f},
490 {0xc9ca, 0xfb51},
491 {0xc9d3, 0xfb52},
492 {0xc9e3, 0xfb54},
493 {0xc9e9, 0xfb53},
494 {0xc9f4, 0xfb56},
495 {0xc9f5, 0xfb57},
496 {0xc9fc, 0xfb55},
497 {0xcab3, 0xfb59},
498 {0xcabd, 0xfb5a},
499 {0xcaef, 0xfb5b},
500 {0xcaf1, 0xfb5c},
501 {0xcbae, 0xfb5d},
502 {0xcbca, 0xfb5f},
503 {0xcbe6, 0xfb60},
504 {0xcbea, 0xfb61},
505 {0xcbee, 0xfb64},
506 {0xcbf0, 0xfb62},
507 {0xcbf4, 0xfb63},
508 {0xcbf9, 0xfb66},
509 {0xcca5, 0xfb65},
510 {0xccab, 0xfb67},
511 {0xccad, 0xfb69},
512 {0xccae, 0xfb68},
513 {0xccb2, 0xfb6a},
514 {0xccc2, 0xfb6b},
515 {0xccd0, 0xfb6c},
516 {0xccd9, 0xfb6d},
517 {0xcdaa, 0xfaa8},
518 {0xcdbb, 0xfb6f},
519 {0xceba, 0xfb73},
520 {0xcebb, 0xfb71},
521 {0xcec3, 0xfb74},
522 {0xcef2, 0xfb76},
523 {0xcfd5, 0xfb78},
524 {0xcfe2, 0xfb79},
525 {0xcfe9, 0xfb7a},
526 {0xcfed, 0xfb7b},
527 {0xd0e5, 0xfb81},
528 {0xd0e9, 0xfb83},
529 {0xd1e8, 0xfb84},
530 {0xd1ec, 0xfb87},
531 {0xd2bb, 0xfb88},
532 {0xd3e1, 0xfb8a},
533 {0xd3e8, 0xfb8b},
534 {0xd4a7, 0xfb8c},
535 {0xd4d4, 0xfb8f},
536 {0xd4e3, 0xfa5c},
537 {0xd4f2, 0xfb90},
538 {0xd5ae, 0xfb91},
539 {0xd7de, 0xfb93},
540 {0xd8a2, 0xfb95},
541 {0xd8b7, 0xfb96},
542 {0xd8c1, 0xfb97},
543 {0xd8d1, 0xfb98},
544 {0xd8f4, 0xfb99},
545 {0xd9a1, 0xfa60},
546 {0xd9c6, 0xfb9a},
547 {0xd9c8, 0xfb9b},
548 {0xd9d1, 0xfb9c},
549 {0xdcd3, 0xfba2},
550 {0xdcdf, 0xfa5d},
551 {0xddc8, 0xfba3},
552 {0xddd4, 0xfba4},
553 {0xddea, 0xfba5},
554 {0xddfa, 0xfba6},
555 {0xdea4, 0xfba7},
556 {0xdeb0, 0xfba8},
557 {0xdeb5, 0xfbaa},
558 {0xdecb, 0xfbab},
559 {0xdfb9, 0xfbad},
560 {0xdfc3, 0xfbaf},
561 {0xe0d9, 0xfbb2},
562 {0xe1e2, 0xfbb5},
563 {0xe2c7, 0xfbb9},
564 {0xe3a6, 0xfbbb},
565 {0xe3a8, 0xfbba},
566 {0xe3a9, 0xfbbc},
567 {0xe3aa, 0xfbbf},
568 {0xe3ab, 0xfbc0},
569 {0xe3af, 0xfbbd},
570 {0xe3b0, 0xfbbe},
571 {0xe3bc, 0xfbc1},
572 {0xe3bf, 0xfbc3},
573 {0xe3c1, 0xfbc2},
574 {0xe3d4, 0xfbca},
575 {0xe3d5, 0xfbc4},
576 {0xe3d6, 0xfbc6},
577 {0xe3d8, 0xfbc5},
578 {0xe3df, 0xfbc7},
579 {0xe3e1, 0xfbc9},
580 {0xe3e3, 0xfbc8},
581 {0xe3e9, 0xfbcb},
582 {0xe3f1, 0xfbcd},
583 {0xe3f2, 0xfbce},
584 {0xe3f8, 0xfa5f},
585 {0xe4a6, 0xfbcc},
586 {0xe4be, 0xfbd2},
587 {0xe4bf, 0xfbd6},
588 {0xe4c0, 0xfbd4},
589 {0xe4c1, 0xfbd0},
590 {0xe4c3, 0xfbd1},
591 {0xe4c7, 0xfbd5},
592 {0xe4cb, 0xfbcf},
593 {0xe4d0, 0xfa65},
594 {0xe4d1, 0xfbd9},
595 {0xe4d2, 0xfbdc},
596 {0xe4d4, 0xfbde},
597 {0xe4db, 0xfbdd},
598 {0xe4dc, 0xfbdb},
599 {0xe4de, 0xfbd8},
600 {0xe4e0, 0xfbd7},
601 {0xe4e9, 0xfa5e},
602 {0xe4ef, 0xfbe0},
603 {0xe4fa, 0xfbdf},
604 {0xe5b3, 0xfbe1},
605 {0xe5bf, 0xfbe2},
606 {0xe5c9, 0xfbe3},
607 {0xe5d0, 0xfbe4},
608 {0xe5e2, 0xfbe5},
609 {0xe5ea, 0xfbe6},
610 {0xe5eb, 0xfbe7},
611 {0xe6e8, 0xfbeb},
612 {0xe6ef, 0xfbec},
613 {0xe7ac, 0xfbed},
614 {0xe7ae, 0xfbef},
615 {0xe7b1, 0xfbf1},
616 {0xe7b2, 0xfbf3},
617 {0xe8b1, 0xfbf4},
618 {0xe8b6, 0xfbf5},
619 {0xe8dd, 0xfbf8},
620 {0xe9d1, 0xfbfb},
621 {0xe9ed, 0xfc40},
622 {0xeacd, 0xfc41},
623 {0xeadb, 0xfc43},
624 {0xeae6, 0xfc44},
625 {0xeaea, 0xfc45},
626 {0xeba5, 0xfc46},
627 {0xebfa, 0xfc48},
628 {0xebfb, 0xfc47},
629 {0xecd6, 0xfc4a},
630 {0xf3f3, 0xfa40},
631 {0xf3f4, 0xfa41},
632 {0xf3f5, 0xfa42},
633 {0xf3f6, 0xfa43},
634 {0xf3f7, 0xfa44},
635 {0xf3f8, 0xfa45},
636 {0xf3f9, 0xfa46},
637 {0xf3fa, 0xfa47},
638 {0xf3fb, 0xfa48},
639 {0xf3fc, 0xfa49},
640 {0xf3fd, 0xfa4a},
641 {0xf3fe, 0xfa4b},
642 {0xf4a1, 0xfa4c},
643 {0xf4a2, 0xfa4d},
644 {0xf4a3, 0xfa4e},
645 {0xf4a4, 0xfa4f},
646 {0xf4a5, 0xfa50},
647 {0xf4a6, 0xfa51},
648 {0xf4a7, 0xfa52},
649 {0xf4a8, 0xfa53},
650 {0xf4a9, 0xfa56},
651 {0xf4aa, 0xfa57},
652 {0xf4ab, 0xfa58},
653 {0xf4ac, 0xfa59},
654 {0xf4ad, 0xfa5a},
655 {0xf4ae, 0xfa62},
656 {0xf4af, 0xfa6a},
657 {0xf4b0, 0xfa7c},
658 {0xf4b1, 0xfa83},
659 {0xf4b2, 0xfa8a},
660 {0xf4b3, 0xfa8b},
661 {0xf4b4, 0xfa90},
662 {0xf4b5, 0xfa92},
663 {0xf4b6, 0xfa96},
664 {0xf4b7, 0xfa9b},
665 {0xf4b8, 0xfa9c},
666 {0xf4b9, 0xfa9d},
667 {0xf4ba, 0xfaaa},
668 {0xf4bb, 0xfaae},
669 {0xf4bc, 0xfab0},
670 {0xf4bd, 0xfab1},
671 {0xf4be, 0xfaba},
672 {0xf4bf, 0xfabd},
673 {0xf4c0, 0xfac1},
674 {0xf4c1, 0xfacd},
675 {0xf4c2, 0xfad0},
676 {0xf4c3, 0xfad5},
677 {0xf4c4, 0xfad8},
678 {0xf4c5, 0xfae0},
679 {0xf4c6, 0xfae5},
680 {0xf4c7, 0xfae8},
681 {0xf4c8, 0xfaea},
682 {0xf4c9, 0xfaee},
683 {0xf4ca, 0xfaf2},
684 {0xf4cb, 0xfb43},
685 {0xf4cc, 0xfb44},
686 {0xf4cd, 0xfb50},
687 {0xf4ce, 0xfb58},
688 {0xf4cf, 0xfb5e},
689 {0xf4d0, 0xfb6e},
690 {0xf4d1, 0xfb70},
691 {0xf4d2, 0xfb72},
692 {0xf4d3, 0xfb75},
693 {0xf4d4, 0xfb7c},
694 {0xf4d5, 0xfb7d},
695 {0xf4d6, 0xfb7e},
696 {0xf4d7, 0xfb80},
697 {0xf4d8, 0xfb82},
698 {0xf4d9, 0xfb85},
699 {0xf4da, 0xfb86},
700 {0xf4db, 0xfb89},
701 {0xf4dc, 0xfb8d},
702 {0xf4dd, 0xfb8e},
703 {0xf4de, 0xfb92},
704 {0xf4df, 0xfb94},
705 {0xf4e0, 0xfb9d},
706 {0xf4e1, 0xfb9e},
707 {0xf4e2, 0xfb9f},
708 {0xf4e3, 0xfba0},
709 {0xf4e4, 0xfba1},
710 {0xf4e5, 0xfba9},
711 {0xf4e6, 0xfbac},
712 {0xf4e7, 0xfbae},
713 {0xf4e8, 0xfbb0},
714 {0xf4e9, 0xfbb1},
715 {0xf4ea, 0xfbb3},
716 {0xf4eb, 0xfbb4},
717 {0xf4ec, 0xfbb6},
718 {0xf4ed, 0xfbb7},
719 {0xf4ee, 0xfbb8},
720 {0xf4ef, 0xfbd3},
721 {0xf4f0, 0xfbda},
722 {0xf4f1, 0xfbe8},
723 {0xf4f2, 0xfbe9},
724 {0xf4f3, 0xfbea},
725 {0xf4f4, 0xfbee},
726 {0xf4f5, 0xfbf0},
727 {0xf4f6, 0xfbf2},
728 {0xf4f7, 0xfbf6},
729 {0xf4f8, 0xfbf7},
730 {0xf4f9, 0xfbf9},
731 {0xf4fa, 0xfbfa},
732 {0xf4fb, 0xfbfc},
733 {0xf4fc, 0xfc42},
734 {0xf4fd, 0xfc49},
735 {0xf4fe, 0xfc4b},
736 };
737
738 #define EUC3REVTBLSIZ   (sizeof(euc3rev) / sizeof(sjis_euc_revmap_t))
739
740 #endif /* _KANJI_C_ */
741 #endif /* _KANJI_H_ */