5 #define WC_C_SJIS_ERROR 0xFFFFFFFFU
7 #define WC_SJIS_NOSTATE 0
8 #define WC_SJIS_SHIFT_L 1 /* 0xA1 - 0xBF */
9 #define WC_SJIS_SHIFT_H 2 /* 0xE0 - 0xEF */
10 #define WC_SJIS_SHIFT_X 3 /* 0xF0 - 0xFC (JIS X 0213-2) */
12 #define WC_SJIS_MAP_C0 0x0
13 #define WC_SJIS_MAP_GL 0x1
14 #define WC_SJIS_MAP_LB 0x10
15 #define WC_SJIS_MAP_UB 0x20
16 #define WC_SJIS_MAP_80 (0x2 | WC_SJIS_MAP_LB)
17 #define WC_SJIS_MAP_SK (0x3 | WC_SJIS_MAP_LB)
18 #define WC_SJIS_MAP_SL (0x4 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB)
19 #define WC_SJIS_MAP_SH (0x5 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB)
20 #define WC_SJIS_MAP_SX (0x6 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB)
21 #define WC_SJIS_MAP_A0 (0x7 | WC_SJIS_MAP_LB)
22 #define WC_SJIS_MAP_C1 0x40
24 extern wc_uint8 WC_SJIS_MAP[];
26 extern wc_wchar_t wc_sjis_to_jis(wc_wchar_t cc);
27 extern wc_wchar_t wc_jis_to_sjis(wc_wchar_t cc);
28 extern wc_wchar_t wc_sjis_ext_to_cs94w(wc_wchar_t cc);
29 extern wc_wchar_t wc_cs94w_to_sjis_ext(wc_wchar_t cc);
30 extern wc_uint32 wc_sjis_ext1_to_N(wc_uint32 cc);
31 extern wc_uint32 wc_sjis_ext2_to_N(wc_uint32 cc);
32 extern Str wc_conv_from_sjis(Str is, wc_ces ces);
33 extern Str wc_conv_from_sjisx0213(Str is, wc_ces ces);
34 extern void wc_push_to_sjis(Str os, wc_wchar_t cc, wc_status *st);
35 extern void wc_push_to_sjisx0213(Str os, wc_wchar_t cc, wc_status *st);
36 extern Str wc_char_conv_from_sjis(wc_uchar c, wc_status *st);
37 extern Str wc_char_conv_from_sjisx0213(wc_uchar c, wc_status *st);