1 /* 2 Copyright (C) 2005-2012 Rich Felker 3 4 Permission is hereby granted, free of charge, to any person obtaining 5 a copy of this software and associated documentation files (the 6 "Software"), to deal in the Software without restriction, including 7 without limitation the rights to use, copy, modify, merge, publish, 8 distribute, sublicense, and/or sell copies of the Software, and to 9 permit persons to whom the Software is furnished to do so, subject to 10 the following conditions: 11 12 The above copyright notice and this permission notice shall be 13 included in all copies or substantial portions of the Software. 14 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23 Modified in 2013 for the Android Open Source Project. 24 */ 25 #ifndef NDK_ANDROID_SUPPORT_WCTYPE_H 26 #define NDK_ANDROID_SUPPORT_WCTYPE_H 27 28 /* Please read note in wchar.h to see why the C library version of this 29 * file is not included through #include_next here. 30 */ 31 #if defined(__LP64__) 32 33 # include_next <wctype.h> 34 35 #else 36 37 # include <xlocale.h> 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 43 typedef int wint_t; 44 typedef int wctrans_t; 45 typedef int wctype_t; 46 47 #define WEOF ((wint_t)(-1)) 48 49 int iswalnum(wint_t); 50 int iswalpha(wint_t); 51 int iswblank(wint_t); 52 int iswcntrl(wint_t); 53 int iswdigit(wint_t); 54 int iswgraph(wint_t); 55 int iswlower(wint_t); 56 int iswprint(wint_t); 57 int iswpunct(wint_t); 58 int iswspace(wint_t); 59 int iswupper(wint_t); 60 int iswxdigit(wint_t); 61 int iswctype(wint_t, wctype_t); 62 wint_t towctrans(wint_t, wctrans_t); 63 wint_t towlower(wint_t); 64 wint_t towupper(wint_t); 65 wctrans_t wctrans(const char *); 66 wctype_t wctype(const char *); 67 68 int iswalnum_l(wint_t, locale_t); 69 int iswgraph_l(wint_t, locale_t); 70 int iswctype_l(wint_t, wctype_t, locale_t); 71 72 wint_t towctrans_l(wint_t, wctrans_t, locale_t); 73 wctrans_t wctrans_l(const char *, locale_t); 74 wctype_t wctype_l(const char *, locale_t); 75 76 int iswalpha_l(wint_t, locale_t); 77 int iswblank_l(wint_t, locale_t); 78 int iswcntrl_l(wint_t, locale_t); 79 int iswdigit_l(wint_t, locale_t); 80 int iswlower_l(wint_t, locale_t); 81 int iswprint_l(wint_t, locale_t); 82 int iswpunct_l(wint_t, locale_t); 83 int iswspace_l(wint_t, locale_t); 84 int iswupper_l(wint_t, locale_t); 85 int iswxdigit_l(wint_t, locale_t); 86 87 int towlower_l(int, locale_t); 88 int towupper_l(int, locale_t); 89 90 #ifdef __cplusplus 91 } // extern "C" 92 #endif 93 94 #endif // !__LP64__ 95 96 #endif // NDK_ANDROID_SUPPORT_WCTYPE_H 97