1227825Stheraven// -*- C++ -*-
2227825Stheraven//===--------------------------- cwctype ----------------------------------===//
3227825Stheraven//
4227825Stheraven//                     The LLVM Compiler Infrastructure
5227825Stheraven//
6227825Stheraven// This file is dual licensed under the MIT and the University of Illinois Open
7227825Stheraven// Source Licenses. See LICENSE.TXT for details.
8227825Stheraven//
9227825Stheraven//===----------------------------------------------------------------------===//
10227825Stheraven
11227825Stheraven#ifndef _LIBCPP_CWCTYPE
12227825Stheraven#define _LIBCPP_CWCTYPE
13227825Stheraven
14227825Stheraven/*
15227825Stheraven    cwctype synopsis
16227825Stheraven
17227825StheravenMacros:
18227825Stheraven
19227825Stheraven    WEOF
20227825Stheraven
21227825Stheravennamespace std
22227825Stheraven{
23227825Stheraven
24227825StheravenTypes:
25227825Stheraven
26227825Stheraven    wint_t
27227825Stheraven    wctrans_t
28227825Stheraven    wctype_t
29227825Stheraven
30227825Stheravenint iswalnum(wint_t wc);
31227825Stheravenint iswalpha(wint_t wc);
32227825Stheravenint iswblank(wint_t wc);  // C99
33227825Stheravenint iswcntrl(wint_t wc);
34227825Stheravenint iswdigit(wint_t wc);
35227825Stheravenint iswgraph(wint_t wc);
36227825Stheravenint iswlower(wint_t wc);
37227825Stheravenint iswprint(wint_t wc);
38227825Stheravenint iswpunct(wint_t wc);
39227825Stheravenint iswspace(wint_t wc);
40227825Stheravenint iswupper(wint_t wc);
41227825Stheravenint iswxdigit(wint_t wc);
42227825Stheravenint iswctype(wint_t wc, wctype_t desc);
43227825Stheravenwctype_t wctype(const char* property);
44227825Stheravenwint_t towlower(wint_t wc);
45227825Stheravenwint_t towupper(wint_t wc);
46227825Stheravenwint_t towctrans(wint_t wc, wctrans_t desc);
47227825Stheravenwctrans_t wctrans(const char* property);
48227825Stheraven
49227825Stheraven}  // std
50227825Stheraven
51227825Stheraven*/
52227825Stheraven
53227825Stheraven#include <__config>
54227825Stheraven#include <cctype>
55227825Stheraven#include <wctype.h>
56227825Stheraven
57227825Stheraven#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
58227825Stheraven#pragma GCC system_header
59227825Stheraven#endif
60227825Stheraven
61227825Stheraven_LIBCPP_BEGIN_NAMESPACE_STD
62227825Stheraven
63227825Stheravenusing ::wint_t;
64227825Stheravenusing ::wctrans_t;
65227825Stheravenusing ::wctype_t;
66227825Stheraven
67227825Stheraven#ifdef iswalnum
68227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalnum(wint_t __wc) {return iswalnum(__wc);}
69227825Stheraven#undef iswalnum
70227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswalnum(wint_t __wc) {return __libcpp_iswalnum(__wc);}
71227825Stheraven#else  // iswalnum
72227825Stheravenusing ::iswalnum;
73227825Stheraven#endif
74227825Stheraven
75227825Stheraven#ifdef iswalpha
76227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalpha(wint_t __wc) {return iswalpha(__wc);}
77227825Stheraven#undef iswalpha
78227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswalpha(wint_t __wc) {return __libcpp_iswalpha(__wc);}
79227825Stheraven#else  // iswalpha
80227825Stheravenusing ::iswalpha;
81227825Stheraven#endif
82227825Stheraven
83227825Stheraven#ifdef iswblank
84227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswblank(wint_t __wc) {return iswblank(__wc);}
85227825Stheraven#undef iswblank
86227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswblank(wint_t __wc) {return __libcpp_iswblank(__wc);}
87227825Stheraven#else  // iswblank
88227825Stheravenusing ::iswblank;
89227825Stheraven#endif
90227825Stheraven
91227825Stheraven#ifdef iswcntrl
92227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswcntrl(wint_t __wc) {return iswcntrl(__wc);}
93227825Stheraven#undef iswcntrl
94227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswcntrl(wint_t __wc) {return __libcpp_iswcntrl(__wc);}
95227825Stheraven#else  // iswcntrl
96227825Stheravenusing ::iswcntrl;
97227825Stheraven#endif
98227825Stheraven
99227825Stheraven#ifdef iswdigit
100227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswdigit(wint_t __wc) {return iswdigit(__wc);}
101227825Stheraven#undef iswdigit
102227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswdigit(wint_t __wc) {return __libcpp_iswdigit(__wc);}
103227825Stheraven#else  // iswdigit
104227825Stheravenusing ::iswdigit;
105227825Stheraven#endif
106227825Stheraven
107227825Stheraven#ifdef iswgraph
108227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswgraph(wint_t __wc) {return iswgraph(__wc);}
109227825Stheraven#undef iswgraph
110227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswgraph(wint_t __wc) {return __libcpp_iswgraph(__wc);}
111227825Stheraven#else  // iswgraph
112227825Stheravenusing ::iswgraph;
113227825Stheraven#endif
114227825Stheraven
115227825Stheraven#ifdef iswlower
116227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswlower(wint_t __wc) {return iswlower(__wc);}
117227825Stheraven#undef iswlower
118227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswlower(wint_t __wc) {return __libcpp_iswlower(__wc);}
119227825Stheraven#else  // iswlower
120227825Stheravenusing ::iswlower;
121227825Stheraven#endif
122227825Stheraven
123227825Stheraven#ifdef iswprint
124227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswprint(wint_t __wc) {return iswprint(__wc);}
125227825Stheraven#undef iswprint
126227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswprint(wint_t __wc) {return __libcpp_iswprint(__wc);}
127227825Stheraven#else  // iswprint
128227825Stheravenusing ::iswprint;
129227825Stheraven#endif
130227825Stheraven
131227825Stheraven#ifdef iswpunct
132227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswpunct(wint_t __wc) {return iswpunct(__wc);}
133227825Stheraven#undef iswpunct
134227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswpunct(wint_t __wc) {return __libcpp_iswpunct(__wc);}
135227825Stheraven#else  // iswpunct
136227825Stheravenusing ::iswpunct;
137227825Stheraven#endif
138227825Stheraven
139227825Stheraven#ifdef iswspace
140227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswspace(wint_t __wc) {return iswspace(__wc);}
141227825Stheraven#undef iswspace
142227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswspace(wint_t __wc) {return __libcpp_iswspace(__wc);}
143227825Stheraven#else  // iswspace
144227825Stheravenusing ::iswspace;
145227825Stheraven#endif
146227825Stheraven
147227825Stheraven#ifdef iswupper
148227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswupper(wint_t __wc) {return iswupper(__wc);}
149227825Stheraven#undef iswupper
150227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswupper(wint_t __wc) {return __libcpp_iswupper(__wc);}
151227825Stheraven#else  // iswupper
152227825Stheravenusing ::iswupper;
153227825Stheraven#endif
154227825Stheraven
155227825Stheraven#ifdef iswxdigit
156227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswxdigit(wint_t __wc) {return iswxdigit(__wc);}
157227825Stheraven#undef iswxdigit
158227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswxdigit(wint_t __wc) {return __libcpp_iswxdigit(__wc);}
159227825Stheraven#else  // iswxdigit
160227825Stheravenusing ::iswxdigit;
161227825Stheraven#endif
162227825Stheraven
163227825Stheraven#ifdef iswctype
164227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswctype(wint_t __w, wctype_t __d) {return iswctype(__w, __d);}
165227825Stheraven#undef iswctype
166227825Stheraveninline _LIBCPP_INLINE_VISIBILITY int iswctype(wint_t __w, wctype_t __d) {return __libcpp_iswctype(__w, __d);}
167227825Stheraven#else  // iswctype
168227825Stheravenusing ::iswctype;
169227825Stheraven#endif
170227825Stheraven
171227825Stheraven#ifdef wctype
172227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wctype_t __libcpp_wctype(const char* __p) {return wctype(__p);}
173227825Stheraven#undef wctype
174227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wctype_t wctype(const char* __p) {return __libcpp_wctype(__p);}
175227825Stheraven#else  // wctype
176227825Stheravenusing ::wctype;
177227825Stheraven#endif
178227825Stheraven
179227825Stheraven#ifdef towlower
180227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towlower(wint_t __wc) {return towlower(__wc);}
181227825Stheraven#undef towlower
182227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t towlower(wint_t __wc) {return __libcpp_towlower(__wc);}
183227825Stheraven#else  // towlower
184227825Stheravenusing ::towlower;
185227825Stheraven#endif
186227825Stheraven
187227825Stheraven#ifdef towupper
188227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towupper(wint_t __wc) {return towupper(__wc);}
189227825Stheraven#undef towupper
190227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t towupper(wint_t __wc) {return __libcpp_towupper(__wc);}
191227825Stheraven#else  // towupper
192227825Stheravenusing ::towupper;
193227825Stheraven#endif
194227825Stheraven
195227825Stheraven#ifdef towctrans
196227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towctrans(wint_t __wc, wctype_t __d) {return towctrans(__wc, __d);}
197227825Stheraven#undef towctrans
198227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wint_t towctrans(wint_t __wc, wctype_t __d) {return __libcpp_towctrans(__wc, __d);}
199227825Stheraven#else  // towctrans
200227825Stheravenusing ::towctrans;
201227825Stheraven#endif
202227825Stheraven
203227825Stheraven#ifdef wctrans
204227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wctrans_t __libcpp_wctrans(const char* __p) {return wctrans(__p);}
205227825Stheraven#undef wctrans
206227825Stheraveninline _LIBCPP_INLINE_VISIBILITY wctrans_t wctrans(const char* __p) {return __libcpp_wctrans(__p);}
207227825Stheraven#else  // wctrans
208227825Stheravenusing ::wctrans;
209227825Stheraven#endif
210227825Stheraven
211227825Stheraven_LIBCPP_END_NAMESPACE_STD
212227825Stheraven
213227825Stheraven#endif  // _LIBCPP_CWCTYPE
214