Warning: This file is not a C or C++ file. It does not have highlighting.

1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP___CXX03_WCTYPE_H
11#define _LIBCPP___CXX03_WCTYPE_H
12
13/*
14 wctype.h synopsis
15
16Macros:
17
18 WEOF
19
20Types:
21
22 wint_t
23 wctrans_t
24 wctype_t
25
26int iswalnum(wint_t wc);
27int iswalpha(wint_t wc);
28int iswblank(wint_t wc); // C99
29int iswcntrl(wint_t wc);
30int iswdigit(wint_t wc);
31int iswgraph(wint_t wc);
32int iswlower(wint_t wc);
33int iswprint(wint_t wc);
34int iswpunct(wint_t wc);
35int iswspace(wint_t wc);
36int iswupper(wint_t wc);
37int iswxdigit(wint_t wc);
38int iswctype(wint_t wc, wctype_t desc);
39wctype_t wctype(const char* property);
40wint_t towlower(wint_t wc);
41wint_t towupper(wint_t wc);
42wint_t towctrans(wint_t wc, wctrans_t desc);
43wctrans_t wctrans(const char* property);
44
45*/
46
47#include <__cxx03/__config>
48
49#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
50# error \
51 "The <wctype.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
52#endif
53
54#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
55# pragma GCC system_header
56#endif
57
58// TODO:
59// In the future, we should unconditionally include_next <wctype.h> here and instead
60// have a mode under which the library does not need libc++'s <wctype.h> or <cwctype>
61// at all (i.e. a mode without wchar_t). As it stands, we need to do that to completely
62// bypass the using declarations in <cwctype> when we did not include <__cxx03/wctype.h>.
63// Otherwise, a using declaration like `using ::wint_t` in <cwctype> will refer to
64// nothing (with using_if_exists), and if we include another header that defines one
65// of these declarations (e.g. <wchar.h>), the second `using ::wint_t` with using_if_exists
66// will fail because it does not refer to the same declaration.
67#if __has_include_next(<wctype.h>)
68# include_next <wctype.h>
69# define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
70#endif
71
72#ifdef __cplusplus
73
74# undef iswalnum
75# undef iswalpha
76# undef iswblank
77# undef iswcntrl
78# undef iswdigit
79# undef iswgraph
80# undef iswlower
81# undef iswprint
82# undef iswpunct
83# undef iswspace
84# undef iswupper
85# undef iswxdigit
86# undef iswctype
87# undef wctype
88# undef towlower
89# undef towupper
90# undef towctrans
91# undef wctrans
92
93#endif // __cplusplus
94
95#endif // _LIBCPP___CXX03_WCTYPE_H
96

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of libcxx/include/__cxx03/wctype.h