| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
#ifndef _MBLOCAL_H_ |
| 41 |
#define _MBLOCAL_H_ |
| 42 |
|
| 43 |
#include <runetype.h> |
| 44 |
#include "xlocale_private.h" |
| 45 |
|
| 46 |
#define SS2 0x008e |
| 47 |
#define SS3 0x008f |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
struct xlocale_ctype { |
| 53 |
struct xlocale_component header; |
| 54 |
_RuneLocale *runes; |
| 55 |
size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, |
| 56 |
size_t, mbstate_t * __restrict); |
| 57 |
int (*__mbsinit)(const mbstate_t *); |
| 58 |
size_t (*__mbsnrtowcs)(wchar_t * __restrict, const char ** __restrict, |
| 59 |
size_t, size_t, mbstate_t * __restrict); |
| 60 |
size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict); |
| 61 |
size_t (*__wcsnrtombs)(char * __restrict, const wchar_t ** __restrict, |
| 62 |
size_t, size_t, mbstate_t * __restrict); |
| 63 |
int __mb_cur_max; |
| 64 |
int __mb_sb_limit; |
| 65 |
|
| 66 |
__mbstate_t mblen; |
| 67 |
|
| 68 |
__mbstate_t mbrlen; |
| 69 |
|
| 70 |
__mbstate_t mbrtoc16; |
| 71 |
|
| 72 |
__mbstate_t mbrtoc32; |
| 73 |
|
| 74 |
__mbstate_t mbrtowc; |
| 75 |
|
| 76 |
__mbstate_t mbsnrtowcs; |
| 77 |
|
| 78 |
__mbstate_t mbsrtowcs; |
| 79 |
|
| 80 |
__mbstate_t mbtowc; |
| 81 |
|
| 82 |
__mbstate_t c16rtomb; |
| 83 |
|
| 84 |
__mbstate_t c32rtomb; |
| 85 |
|
| 86 |
__mbstate_t wcrtomb; |
| 87 |
|
| 88 |
__mbstate_t wcsnrtombs; |
| 89 |
|
| 90 |
__mbstate_t wcsrtombs; |
| 91 |
|
| 92 |
__mbstate_t wctomb; |
| 93 |
}; |
| 94 |
#define XLOCALE_CTYPE(x) ((struct xlocale_ctype*)(x)->components[XLC_CTYPE]) |
| 95 |
extern struct xlocale_ctype __xlocale_global_ctype; |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
int _none_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 101 |
int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 102 |
int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 103 |
int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 104 |
int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 105 |
int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 106 |
int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 107 |
int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 108 |
int _GBK_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 109 |
int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 110 |
int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 111 |
int _ascii_init(struct xlocale_ctype *, _RuneLocale *) __hidden; |
| 112 |
|
| 113 |
typedef size_t (*mbrtowc_pfn_t)(wchar_t * __restrict, |
| 114 |
const char * __restrict, size_t, mbstate_t * __restrict); |
| 115 |
typedef size_t (*wcrtomb_pfn_t)(char * __restrict, wchar_t, |
| 116 |
mbstate_t * __restrict); |
| 117 |
size_t __mbsnrtowcs_std(wchar_t * __restrict, const char ** __restrict, |
| 118 |
size_t, size_t, mbstate_t * __restrict, mbrtowc_pfn_t); |
| 119 |
size_t __wcsnrtombs_std(char * __restrict, const wchar_t ** __restrict, |
| 120 |
size_t, size_t, mbstate_t * __restrict, wcrtomb_pfn_t); |
| 121 |
|
| 122 |
#endif |