]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libc++/include/cctype
Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
[FreeBSD/FreeBSD.git] / contrib / libc++ / include / cctype
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
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 #if defined(_LIBCPP_MSVCRT)
41 #include "support/win32/support.h"
42 #include "support/win32/locale_win32.h"
43 #endif // _LIBCPP_MSVCRT
44
45 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
46 #pragma GCC system_header
47 #endif
48
49 _LIBCPP_BEGIN_NAMESPACE_STD
50
51 #ifdef isalnum
52 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}
53 #undef isalnum
54 inline _LIBCPP_INLINE_VISIBILITY int isalnum(int __c) {return __libcpp_isalnum(__c);}
55 #else  // isalnum
56 using ::isalnum;
57 #endif  // isalnum
58
59 #ifdef isalpha
60 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalpha(int __c) {return isalpha(__c);}
61 #undef isalpha
62 inline _LIBCPP_INLINE_VISIBILITY int isalpha(int __c) {return __libcpp_isalpha(__c);}
63 #else  // isalpha
64 using ::isalpha;
65 #endif  // isalpha
66
67 #ifdef isblank
68 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isblank(int __c) {return isblank(__c);}
69 #undef isblank
70 inline _LIBCPP_INLINE_VISIBILITY int isblank(int __c) {return __libcpp_isblank(__c);}
71 #else  // isblank
72 using ::isblank;
73 #endif  // isblank
74
75 #ifdef iscntrl
76 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iscntrl(int __c) {return iscntrl(__c);}
77 #undef iscntrl
78 inline _LIBCPP_INLINE_VISIBILITY int iscntrl(int __c) {return __libcpp_iscntrl(__c);}
79 #else  // iscntrl
80 using ::iscntrl;
81 #endif  // iscntrl
82
83 #ifdef isdigit
84 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isdigit(int __c) {return isdigit(__c);}
85 #undef isdigit
86 inline _LIBCPP_INLINE_VISIBILITY int isdigit(int __c) {return __libcpp_isdigit(__c);}
87 #else  // isdigit
88 using ::isdigit;
89 #endif  // isdigit
90
91 #ifdef isgraph
92 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isgraph(int __c) {return isgraph(__c);}
93 #undef isgraph
94 inline _LIBCPP_INLINE_VISIBILITY int isgraph(int __c) {return __libcpp_isgraph(__c);}
95 #else  // isgraph
96 using ::isgraph;
97 #endif  // isgraph
98
99 #ifdef islower
100 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_islower(int __c) {return islower(__c);}
101 #undef islower
102 inline _LIBCPP_INLINE_VISIBILITY int islower(int __c) {return __libcpp_islower(__c);}
103 #else  // islower
104 using ::islower;
105 #endif  // islower
106
107 #ifdef isprint
108 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isprint(int __c) {return isprint(__c);}
109 #undef isprint
110 inline _LIBCPP_INLINE_VISIBILITY int isprint(int __c) {return __libcpp_isprint(__c);}
111 #else  // isprint
112 using ::isprint;
113 #endif  // isprint
114
115 #ifdef ispunct
116 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ispunct(int __c) {return ispunct(__c);}
117 #undef ispunct
118 inline _LIBCPP_INLINE_VISIBILITY int ispunct(int __c) {return __libcpp_ispunct(__c);}
119 #else  // ispunct
120 using ::ispunct;
121 #endif  // ispunct
122
123 #ifdef isspace
124 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isspace(int __c) {return isspace(__c);}
125 #undef isspace
126 inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_isspace(__c);}
127 #else  // isspace
128 using ::isspace;
129 #endif  // isspace
130
131 #ifdef isupper
132 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isupper(int __c) {return isupper(__c);}
133 #undef isupper
134 inline _LIBCPP_INLINE_VISIBILITY int isupper(int __c) {return __libcpp_isupper(__c);}
135 #else  // isupper
136 using ::isupper;
137 #endif  // isupper
138
139 #ifdef isxdigit
140 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isxdigit(int __c) {return isxdigit(__c);}
141 #undef isxdigit
142 inline _LIBCPP_INLINE_VISIBILITY int isxdigit(int __c) {return __libcpp_isxdigit(__c);}
143 #else  // isxdigit
144 using ::isxdigit;
145 #endif  // isxdigit
146
147 #ifdef tolower
148 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_tolower(int __c) {return tolower(__c);}
149 #undef tolower
150 inline _LIBCPP_INLINE_VISIBILITY int tolower(int __c) {return __libcpp_tolower(__c);}
151 #else  // tolower
152 using ::tolower;
153 #endif  // tolower
154
155 #ifdef toupper
156 inline _LIBCPP_INLINE_VISIBILITY int __libcpp_toupper(int __c) {return toupper(__c);}
157 #undef toupper
158 inline _LIBCPP_INLINE_VISIBILITY int toupper(int __c) {return __libcpp_toupper(__c);}
159 #else  // toupper
160 using ::toupper;
161 #endif  // toupper
162
163 _LIBCPP_END_NAMESPACE_STD
164
165 #endif  // _LIBCPP_CCTYPE