brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · d260740 Raw
95 lines · c
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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_WCTYPE_H11#define _LIBCPP_WCTYPE_H12 13/*14    wctype.h synopsis15 16Macros:17 18    WEOF19 20Types:21 22    wint_t23    wctrans_t24    wctype_t25 26int iswalnum(wint_t wc);27int iswalpha(wint_t wc);28int iswblank(wint_t wc);  // C9929int 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#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)48#  include <__cxx03/__config>49#else50#  include <__config>51#endif52 53#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)54#  pragma GCC system_header55#endif56 57// TODO:58// In the future, we should unconditionally include_next <wctype.h> here and instead59// have a mode under which the library does not need libc++'s <wctype.h> or <cwctype>60// at all (i.e. a mode without wchar_t). As it stands, we need to do that to completely61// bypass the using declarations in <cwctype> when we did not include <wctype.h>.62// Otherwise, a using declaration like `using ::wint_t` in <cwctype> will refer to63// nothing (with using_if_exists), and if we include another header that defines one64// of these declarations (e.g. <wchar.h>), the second `using ::wint_t` with using_if_exists65// will fail because it does not refer to the same declaration.66#if __has_include_next(<wctype.h>)67#  include_next <wctype.h>68#  define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H69#endif70 71#ifdef __cplusplus72 73#  undef iswalnum74#  undef iswalpha75#  undef iswblank76#  undef iswcntrl77#  undef iswdigit78#  undef iswgraph79#  undef iswlower80#  undef iswprint81#  undef iswpunct82#  undef iswspace83#  undef iswupper84#  undef iswxdigit85#  undef iswctype86#  undef wctype87#  undef towlower88#  undef towupper89#  undef towctrans90#  undef wctrans91 92#endif // __cplusplus93 94#endif // _LIBCPP_WCTYPE_H95