Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===---------------------------- cctype ----------------------------------===// |
| 3 | // |
Howard Hinnant | f5256e1 | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 4 | // The LLVM Compiler Infrastructure |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 5 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | #ifndef _LIBCPP_CCTYPE |
| 12 | #define _LIBCPP_CCTYPE |
| 13 | |
| 14 | /* |
| 15 | cctype synopsis |
| 16 | |
| 17 | namespace std |
| 18 | { |
| 19 | |
| 20 | int isalnum(int c); |
| 21 | int isalpha(int c); |
| 22 | int isblank(int c); // C99 |
| 23 | int iscntrl(int c); |
| 24 | int isdigit(int c); |
| 25 | int isgraph(int c); |
| 26 | int islower(int c); |
| 27 | int isprint(int c); |
| 28 | int ispunct(int c); |
| 29 | int isspace(int c); |
| 30 | int isupper(int c); |
| 31 | int isxdigit(int c); |
| 32 | int tolower(int c); |
| 33 | int toupper(int c); |
| 34 | |
| 35 | } // std |
| 36 | */ |
| 37 | |
| 38 | #include <__config> |
| 39 | #include <ctype.h> |
| 40 | |
| 41 | #pragma GCC system_header |
| 42 | |
| 43 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 44 | |
| 45 | #ifdef isalnum |
| 46 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);} |
| 47 | #undef isalnum |
| 48 | inline _LIBCPP_INLINE_VISIBILITY int isalnum(int __c) {return __libcpp_isalnum(__c);} |
| 49 | #else // isalnum |
| 50 | using ::isalnum; |
| 51 | #endif // isalnum |
| 52 | |
| 53 | #ifdef isalpha |
| 54 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalpha(int __c) {return isalpha(__c);} |
| 55 | #undef isalpha |
| 56 | inline _LIBCPP_INLINE_VISIBILITY int isalpha(int __c) {return __libcpp_isalpha(__c);} |
| 57 | #else // isalpha |
| 58 | using ::isalpha; |
| 59 | #endif // isalpha |
| 60 | |
| 61 | #ifdef isblank |
| 62 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isblank(int __c) {return isblank(__c);} |
| 63 | #undef isblank |
| 64 | inline _LIBCPP_INLINE_VISIBILITY int isblank(int __c) {return __libcpp_isblank(__c);} |
| 65 | #else // isblank |
| 66 | using ::isblank; |
| 67 | #endif // isblank |
| 68 | |
| 69 | #ifdef iscntrl |
| 70 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iscntrl(int __c) {return iscntrl(__c);} |
| 71 | #undef iscntrl |
| 72 | inline _LIBCPP_INLINE_VISIBILITY int iscntrl(int __c) {return __libcpp_iscntrl(__c);} |
| 73 | #else // iscntrl |
| 74 | using ::iscntrl; |
| 75 | #endif // iscntrl |
| 76 | |
| 77 | #ifdef isdigit |
| 78 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isdigit(int __c) {return isdigit(__c);} |
| 79 | #undef isdigit |
| 80 | inline _LIBCPP_INLINE_VISIBILITY int isdigit(int __c) {return __libcpp_isdigit(__c);} |
| 81 | #else // isdigit |
| 82 | using ::isdigit; |
| 83 | #endif // isdigit |
| 84 | |
| 85 | #ifdef isgraph |
| 86 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isgraph(int __c) {return isgraph(__c);} |
| 87 | #undef isgraph |
| 88 | inline _LIBCPP_INLINE_VISIBILITY int isgraph(int __c) {return __libcpp_isgraph(__c);} |
| 89 | #else // isgraph |
| 90 | using ::isgraph; |
| 91 | #endif // isgraph |
| 92 | |
| 93 | #ifdef islower |
| 94 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_islower(int __c) {return islower(__c);} |
| 95 | #undef islower |
| 96 | inline _LIBCPP_INLINE_VISIBILITY int islower(int __c) {return __libcpp_islower(__c);} |
| 97 | #else // islower |
| 98 | using ::islower; |
| 99 | #endif // islower |
| 100 | |
| 101 | #ifdef isprint |
| 102 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isprint(int __c) {return isprint(__c);} |
| 103 | #undef isprint |
| 104 | inline _LIBCPP_INLINE_VISIBILITY int isprint(int __c) {return __libcpp_isprint(__c);} |
| 105 | #else // isprint |
| 106 | using ::isprint; |
| 107 | #endif // isprint |
| 108 | |
| 109 | #ifdef ispunct |
| 110 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ispunct(int __c) {return ispunct(__c);} |
| 111 | #undef ispunct |
| 112 | inline _LIBCPP_INLINE_VISIBILITY int ispunct(int __c) {return __libcpp_ispunct(__c);} |
| 113 | #else // ispunct |
| 114 | using ::ispunct; |
| 115 | #endif // ispunct |
| 116 | |
| 117 | #ifdef isspace |
| 118 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isspace(int __c) {return isspace(__c);} |
| 119 | #undef isspace |
| 120 | inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_isspace(__c);} |
| 121 | #else // isspace |
| 122 | using ::isspace; |
| 123 | #endif // isspace |
| 124 | |
| 125 | #ifdef isupper |
| 126 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isupper(int __c) {return isupper(__c);} |
| 127 | #undef isupper |
| 128 | inline _LIBCPP_INLINE_VISIBILITY int isupper(int __c) {return __libcpp_isupper(__c);} |
| 129 | #else // isupper |
| 130 | using ::isupper; |
| 131 | #endif // isupper |
| 132 | |
| 133 | #ifdef isxdigit |
| 134 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isxdigit(int __c) {return isxdigit(__c);} |
| 135 | #undef isxdigit |
| 136 | inline _LIBCPP_INLINE_VISIBILITY int isxdigit(int __c) {return __libcpp_isxdigit(__c);} |
| 137 | #else // isxdigit |
| 138 | using ::isxdigit; |
| 139 | #endif // isxdigit |
| 140 | |
| 141 | #ifdef tolower |
| 142 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_tolower(int __c) {return tolower(__c);} |
| 143 | #undef tolower |
| 144 | inline _LIBCPP_INLINE_VISIBILITY int tolower(int __c) {return __libcpp_tolower(__c);} |
| 145 | #else // tolower |
| 146 | using ::tolower; |
| 147 | #endif // tolower |
| 148 | |
| 149 | #ifdef toupper |
| 150 | inline _LIBCPP_INLINE_VISIBILITY int __libcpp_toupper(int __c) {return toupper(__c);} |
| 151 | #undef toupper |
| 152 | inline _LIBCPP_INLINE_VISIBILITY int toupper(int __c) {return __libcpp_toupper(__c);} |
| 153 | #else // toupper |
| 154 | using ::toupper; |
| 155 | #endif // toupper |
| 156 | |
| 157 | _LIBCPP_END_NAMESPACE_STD |
| 158 | |
| 159 | #endif // _LIBCPP_CCTYPE |