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