1 /* $MirOS: src/include/wctype.h,v 1.8 2009/11/09 21:30:47 tg Exp $ */ 2 3 #ifndef _WCTYPE_H_ 4 #define _WCTYPE_H_ 5 6 #include <wchar.h> 7 8 typedef const uint16_t * const *wctrans_t; 9 10 __BEGIN_DECLS 11 int iswalnum(wint_t); 12 int iswalpha(wint_t); 13 int iswblank(wint_t); 14 int iswcntrl(wint_t); 15 int iswdigit(wint_t); 16 int iswgraph(wint_t); 17 int iswlower(wint_t); 18 int iswprint(wint_t); 19 int iswpunct(wint_t); 20 int iswspace(wint_t); 21 int iswtitle(wint_t); 22 int iswupper(wint_t); 23 int iswxdigit(wint_t); 24 int iswctype(wint_t, wctype_t); 25 wint_t towctrans(wint_t, wctrans_t); 26 wint_t towlower(wint_t); 27 wint_t towtitle(wint_t); 28 wint_t towupper(wint_t); 29 wctrans_t wctrans(const char *); 30 31 extern const uint16_t * const mir18n_caseconv_tolower[0x100]; 32 extern const uint16_t * const mir18n_caseconv_totitle[0x100]; 33 extern const uint16_t * const mir18n_caseconv_toupper[0x100]; 34 __END_DECLS 35 36 #define iswalnum(x) iswctype((x), _ctp_alnum) 37 #define iswalpha(x) iswctype((x), _ctp_alpha) 38 #define iswblank(x) iswctype((x), _ctp_blank) 39 #define iswcntrl(x) iswctype((x), _ctp_cntrl) 40 #define iswdigit(x) iswctype((x), _ctp_digit) 41 #define iswgraph(x) iswctype((x), _ctp_graph) 42 #define iswlower(x) iswctype((x), _ctp_lower) 43 #define iswprint(x) iswctype((x), _ctp_print) 44 #define iswpunct(x) iswctype((x), _ctp_punct) 45 #define iswspace(x) iswctype((x), _ctp_space) 46 #define iswtitle(x) iswctype((x), _ctp_title) 47 #define iswupper(x) iswctype((x), _ctp_upper) 48 #define iswxdigit(x) iswctype((x), _ctp_xdigit) 49 #define towlower(x) towctrans((x), mir18n_caseconv_tolower) 50 #define towtitle(x) towctrans(towctrans((x), mir18n_caseconv_toupper), mir18n_caseconv_totitle) 51 #define towupper(x) towctrans((x), mir18n_caseconv_toupper) 52 53 #endif 54