diff options
author | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:18:09 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:18:09 +0000 |
commit | 5f8e0f8ef9a422691dd72e8a953a42a41478fcb4 (patch) | |
tree | 4b2df4796a534793648b3c4fc532fc36bd0cd525 /libwc/sjis.h | |
parent | Releasing debian version 0.3-2.4 (diff) | |
download | w3m-5f8e0f8ef9a422691dd72e8a953a42a41478fcb4.tar.gz w3m-5f8e0f8ef9a422691dd72e8a953a42a41478fcb4.zip |
Releasing debian version 0.5.1-1debian/0.5.1-1
Diffstat (limited to '')
-rw-r--r-- | libwc/sjis.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libwc/sjis.h b/libwc/sjis.h new file mode 100644 index 0000000..c48838f --- /dev/null +++ b/libwc/sjis.h @@ -0,0 +1,40 @@ + +#ifndef _WC_SJIS_H +#define _WC_SJIS_H + +#define WC_C_SJIS_ERROR 0xFFFFFFFFU + +#define WC_SJIS_NOSTATE 0 +#define WC_SJIS_SHIFT_L 1 /* 0xA1 - 0xBF */ +#define WC_SJIS_SHIFT_H 2 /* 0xE0 - 0xEF */ +#define WC_SJIS_SHIFT_X 3 /* 0xF0 - 0xFC (JIS X 0213-2) */ + +#define WC_SJIS_MAP_C0 0x0 +#define WC_SJIS_MAP_GL 0x1 +#define WC_SJIS_MAP_LB 0x10 +#define WC_SJIS_MAP_UB 0x20 +#define WC_SJIS_MAP_80 (0x2 | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_SK (0x3 | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_SL (0x4 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_SH (0x5 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_SX (0x6 | WC_SJIS_MAP_UB | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_A0 (0x7 | WC_SJIS_MAP_LB) +#define WC_SJIS_MAP_C1 0x40 + +extern wc_uint8 WC_SJIS_MAP[]; + +extern wc_wchar_t wc_sjis_to_jis(wc_wchar_t cc); +extern wc_wchar_t wc_jis_to_sjis(wc_wchar_t cc); +extern wc_wchar_t wc_sjis_ext_to_cs94w(wc_wchar_t cc); +extern wc_wchar_t wc_cs94w_to_sjis_ext(wc_wchar_t cc); +extern wc_uint32 wc_sjis_ext1_to_N(wc_uint32 cc); +extern wc_uint32 wc_sjis_ext2_to_N(wc_uint32 cc); +extern Str wc_conv_from_sjis(Str is, wc_ces ces); +extern Str wc_conv_from_sjisx0213(Str is, wc_ces ces); +extern void wc_push_to_sjis(Str os, wc_wchar_t cc, wc_status *st); +extern void wc_push_to_sjisx0213(Str os, wc_wchar_t cc, wc_status *st); +extern Str wc_char_conv_from_sjis(wc_uchar c, wc_status *st); +extern Str wc_char_conv_from_sjisx0213(wc_uchar c, wc_status *st); + + +#endif |