Warning: This file is not a C or C++ file. It does not have highlighting.
1 | //===-----------------------------------------------------------------------===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_CHARACTERS_H |
10 | #define _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_CHARACTERS_H |
11 | |
12 | #include <__config> |
13 | #include <__cstddef/size_t.h> |
14 | #include <cctype> |
15 | #include <cstdlib> |
16 | #include <cstring> |
17 | #include <ctime> |
18 | #if _LIBCPP_HAS_WIDE_CHARACTERS |
19 | # include <cwctype> |
20 | #endif |
21 | |
22 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
23 | # pragma GCC system_header |
24 | #endif |
25 | |
26 | _LIBCPP_BEGIN_NAMESPACE_STD |
27 | namespace __locale { |
28 | |
29 | // |
30 | // Character manipulation functions |
31 | // |
32 | #if defined(_LIBCPP_BUILDING_LIBRARY) |
33 | inline _LIBCPP_HIDE_FROM_ABI int __islower(int __c, __locale_t) { return std::islower(__c); } |
34 | |
35 | inline _LIBCPP_HIDE_FROM_ABI int __isupper(int __c, __locale_t) { return std::isupper(__c); } |
36 | #endif |
37 | |
38 | inline _LIBCPP_HIDE_FROM_ABI int __isdigit(int __c, __locale_t) { return std::isdigit(__c); } |
39 | |
40 | inline _LIBCPP_HIDE_FROM_ABI int __isxdigit(int __c, __locale_t) { return std::isxdigit(__c); } |
41 | |
42 | #if defined(_LIBCPP_BUILDING_LIBRARY) |
43 | inline _LIBCPP_HIDE_FROM_ABI int __toupper(int __c, __locale_t) { return std::toupper(__c); } |
44 | |
45 | inline _LIBCPP_HIDE_FROM_ABI int __tolower(int __c, __locale_t) { return std::tolower(__c); } |
46 | |
47 | inline _LIBCPP_HIDE_FROM_ABI int __strcoll(const char* __s1, const char* __s2, __locale_t) { |
48 | return std::strcoll(__s1, __s2); |
49 | } |
50 | |
51 | inline _LIBCPP_HIDE_FROM_ABI size_t __strxfrm(char* __dest, const char* __src, size_t __n, __locale_t) { |
52 | return std::strxfrm(__dest, __src, __n); |
53 | } |
54 | |
55 | # if _LIBCPP_HAS_WIDE_CHARACTERS |
56 | inline _LIBCPP_HIDE_FROM_ABI int __iswctype(wint_t __c, wctype_t __type, __locale_t) { |
57 | return std::iswctype(__c, __type); |
58 | } |
59 | |
60 | inline _LIBCPP_HIDE_FROM_ABI int __iswspace(wint_t __c, __locale_t) { return std::iswspace(__c); } |
61 | |
62 | inline _LIBCPP_HIDE_FROM_ABI int __iswprint(wint_t __c, __locale_t) { return std::iswprint(__c); } |
63 | |
64 | inline _LIBCPP_HIDE_FROM_ABI int __iswcntrl(wint_t __c, __locale_t) { return std::iswcntrl(__c); } |
65 | |
66 | inline _LIBCPP_HIDE_FROM_ABI int __iswupper(wint_t __c, __locale_t) { return std::iswupper(__c); } |
67 | |
68 | inline _LIBCPP_HIDE_FROM_ABI int __iswlower(wint_t __c, __locale_t) { return std::iswlower(__c); } |
69 | |
70 | inline _LIBCPP_HIDE_FROM_ABI int __iswalpha(wint_t __c, __locale_t) { return std::iswalpha(__c); } |
71 | |
72 | inline _LIBCPP_HIDE_FROM_ABI int __iswblank(wint_t __c, __locale_t) { return std::iswblank(__c); } |
73 | |
74 | inline _LIBCPP_HIDE_FROM_ABI int __iswdigit(wint_t __c, __locale_t) { return std::iswdigit(__c); } |
75 | |
76 | inline _LIBCPP_HIDE_FROM_ABI int __iswpunct(wint_t __c, __locale_t) { return std::iswpunct(__c); } |
77 | |
78 | inline _LIBCPP_HIDE_FROM_ABI int __iswxdigit(wint_t __c, __locale_t) { return std::iswxdigit(__c); } |
79 | |
80 | inline _LIBCPP_HIDE_FROM_ABI wint_t __towupper(wint_t __c, __locale_t) { return std::towupper(__c); } |
81 | |
82 | inline _LIBCPP_HIDE_FROM_ABI wint_t __towlower(wint_t __c, __locale_t) { return std::towlower(__c); } |
83 | |
84 | inline _LIBCPP_HIDE_FROM_ABI int __wcscoll(const wchar_t* __ws1, const wchar_t* __ws2, __locale_t) { |
85 | return std::wcscoll(__ws1, __ws2); |
86 | } |
87 | |
88 | inline _LIBCPP_HIDE_FROM_ABI size_t __wcsxfrm(wchar_t* __dest, const wchar_t* __src, size_t __n, __locale_t) { |
89 | return std::wcsxfrm(__dest, __src, __n); |
90 | } |
91 | # endif // _LIBCPP_HAS_WIDE_CHARACTERS |
92 | |
93 | inline _LIBCPP_HIDE_FROM_ABI size_t |
94 | __strftime(char* __s, size_t __max, const char* __format, const struct tm* __tm, __locale_t) { |
95 | return std::strftime(__s, __max, __format, __tm); |
96 | } |
97 | #endif // _LIBCPP_BUILDING_LIBRARY |
98 | |
99 | } // namespace __locale |
100 | _LIBCPP_END_NAMESPACE_STD |
101 | |
102 | #endif // _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_CHARACTERS_H |
103 |
Warning: This file is not a C or C++ file. It does not have highlighting.