blob: dbdc3e765e533529e0ec57fde9820d96c6a5addf [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001// -*- C++ -*-
2//===---------------------------- cctype ----------------------------------===//
3//
Howard Hinnantf5256e12010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00005//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00006// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00008//
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
41#pragma GCC system_header
42
43_LIBCPP_BEGIN_NAMESPACE_STD
44
45#ifdef isalnum
46inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}
47#undef isalnum
48inline _LIBCPP_INLINE_VISIBILITY int isalnum(int __c) {return __libcpp_isalnum(__c);}
49#else // isalnum
50using ::isalnum;
51#endif // isalnum
52
53#ifdef isalpha
54inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalpha(int __c) {return isalpha(__c);}
55#undef isalpha
56inline _LIBCPP_INLINE_VISIBILITY int isalpha(int __c) {return __libcpp_isalpha(__c);}
57#else // isalpha
58using ::isalpha;
59#endif // isalpha
60
61#ifdef isblank
62inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isblank(int __c) {return isblank(__c);}
63#undef isblank
64inline _LIBCPP_INLINE_VISIBILITY int isblank(int __c) {return __libcpp_isblank(__c);}
65#else // isblank
66using ::isblank;
67#endif // isblank
68
69#ifdef iscntrl
70inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iscntrl(int __c) {return iscntrl(__c);}
71#undef iscntrl
72inline _LIBCPP_INLINE_VISIBILITY int iscntrl(int __c) {return __libcpp_iscntrl(__c);}
73#else // iscntrl
74using ::iscntrl;
75#endif // iscntrl
76
77#ifdef isdigit
78inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isdigit(int __c) {return isdigit(__c);}
79#undef isdigit
80inline _LIBCPP_INLINE_VISIBILITY int isdigit(int __c) {return __libcpp_isdigit(__c);}
81#else // isdigit
82using ::isdigit;
83#endif // isdigit
84
85#ifdef isgraph
86inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isgraph(int __c) {return isgraph(__c);}
87#undef isgraph
88inline _LIBCPP_INLINE_VISIBILITY int isgraph(int __c) {return __libcpp_isgraph(__c);}
89#else // isgraph
90using ::isgraph;
91#endif // isgraph
92
93#ifdef islower
94inline _LIBCPP_INLINE_VISIBILITY int __libcpp_islower(int __c) {return islower(__c);}
95#undef islower
96inline _LIBCPP_INLINE_VISIBILITY int islower(int __c) {return __libcpp_islower(__c);}
97#else // islower
98using ::islower;
99#endif // islower
100
101#ifdef isprint
102inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isprint(int __c) {return isprint(__c);}
103#undef isprint
104inline _LIBCPP_INLINE_VISIBILITY int isprint(int __c) {return __libcpp_isprint(__c);}
105#else // isprint
106using ::isprint;
107#endif // isprint
108
109#ifdef ispunct
110inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ispunct(int __c) {return ispunct(__c);}
111#undef ispunct
112inline _LIBCPP_INLINE_VISIBILITY int ispunct(int __c) {return __libcpp_ispunct(__c);}
113#else // ispunct
114using ::ispunct;
115#endif // ispunct
116
117#ifdef isspace
118inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isspace(int __c) {return isspace(__c);}
119#undef isspace
120inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_isspace(__c);}
121#else // isspace
122using ::isspace;
123#endif // isspace
124
125#ifdef isupper
126inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isupper(int __c) {return isupper(__c);}
127#undef isupper
128inline _LIBCPP_INLINE_VISIBILITY int isupper(int __c) {return __libcpp_isupper(__c);}
129#else // isupper
130using ::isupper;
131#endif // isupper
132
133#ifdef isxdigit
134inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isxdigit(int __c) {return isxdigit(__c);}
135#undef isxdigit
136inline _LIBCPP_INLINE_VISIBILITY int isxdigit(int __c) {return __libcpp_isxdigit(__c);}
137#else // isxdigit
138using ::isxdigit;
139#endif // isxdigit
140
141#ifdef tolower
142inline _LIBCPP_INLINE_VISIBILITY int __libcpp_tolower(int __c) {return tolower(__c);}
143#undef tolower
144inline _LIBCPP_INLINE_VISIBILITY int tolower(int __c) {return __libcpp_tolower(__c);}
145#else // tolower
146using ::tolower;
147#endif // tolower
148
149#ifdef toupper
150inline _LIBCPP_INLINE_VISIBILITY int __libcpp_toupper(int __c) {return toupper(__c);}
151#undef toupper
152inline _LIBCPP_INLINE_VISIBILITY int toupper(int __c) {return __libcpp_toupper(__c);}
153#else // toupper
154using ::toupper;
155#endif // toupper
156
157_LIBCPP_END_NAMESPACE_STD
158
159#endif // _LIBCPP_CCTYPE