xref: /netbsd-src/external/apache2/llvm/dist/libcxx/include/cwchar (revision 4d6fc14bc9b0c5bf3e30be318c143ee82cadd108)
1*4d6fc14bSjoerg// -*- C++ -*-
2*4d6fc14bSjoerg//===--------------------------- cwchar -----------------------------------===//
3*4d6fc14bSjoerg//
4*4d6fc14bSjoerg// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*4d6fc14bSjoerg// See https://llvm.org/LICENSE.txt for license information.
6*4d6fc14bSjoerg// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*4d6fc14bSjoerg//
8*4d6fc14bSjoerg//===----------------------------------------------------------------------===//
9*4d6fc14bSjoerg
10*4d6fc14bSjoerg#ifndef _LIBCPP_CWCHAR
11*4d6fc14bSjoerg#define _LIBCPP_CWCHAR
12*4d6fc14bSjoerg
13*4d6fc14bSjoerg/*
14*4d6fc14bSjoerg    cwchar synopsis
15*4d6fc14bSjoerg
16*4d6fc14bSjoergMacros:
17*4d6fc14bSjoerg
18*4d6fc14bSjoerg    NULL
19*4d6fc14bSjoerg    WCHAR_MAX
20*4d6fc14bSjoerg    WCHAR_MIN
21*4d6fc14bSjoerg    WEOF
22*4d6fc14bSjoerg
23*4d6fc14bSjoergnamespace std
24*4d6fc14bSjoerg{
25*4d6fc14bSjoerg
26*4d6fc14bSjoergTypes:
27*4d6fc14bSjoerg
28*4d6fc14bSjoerg    mbstate_t
29*4d6fc14bSjoerg    size_t
30*4d6fc14bSjoerg    tm
31*4d6fc14bSjoerg    wint_t
32*4d6fc14bSjoerg
33*4d6fc14bSjoergint fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
34*4d6fc14bSjoergint fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
35*4d6fc14bSjoergint swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...);
36*4d6fc14bSjoergint swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...);
37*4d6fc14bSjoergint vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);
38*4d6fc14bSjoergint vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);  // C99
39*4d6fc14bSjoergint vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg);
40*4d6fc14bSjoergint vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg);  // C99
41*4d6fc14bSjoergint vwprintf(const wchar_t* restrict format, va_list arg);
42*4d6fc14bSjoergint vwscanf(const wchar_t* restrict format, va_list arg);  // C99
43*4d6fc14bSjoergint wprintf(const wchar_t* restrict format, ...);
44*4d6fc14bSjoergint wscanf(const wchar_t* restrict format, ...);
45*4d6fc14bSjoergwint_t fgetwc(FILE* stream);
46*4d6fc14bSjoergwchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
47*4d6fc14bSjoergwint_t fputwc(wchar_t c, FILE* stream);
48*4d6fc14bSjoergint fputws(const wchar_t* restrict s, FILE* restrict stream);
49*4d6fc14bSjoergint fwide(FILE* stream, int mode);
50*4d6fc14bSjoergwint_t getwc(FILE* stream);
51*4d6fc14bSjoergwint_t getwchar();
52*4d6fc14bSjoergwint_t putwc(wchar_t c, FILE* stream);
53*4d6fc14bSjoergwint_t putwchar(wchar_t c);
54*4d6fc14bSjoergwint_t ungetwc(wint_t c, FILE* stream);
55*4d6fc14bSjoergdouble wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
56*4d6fc14bSjoergfloat wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr);         // C99
57*4d6fc14bSjoerglong double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr);  // C99
58*4d6fc14bSjoerglong wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
59*4d6fc14bSjoerglong long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
60*4d6fc14bSjoergunsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
61*4d6fc14bSjoergunsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
62*4d6fc14bSjoergwchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
63*4d6fc14bSjoergwchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
64*4d6fc14bSjoergwchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
65*4d6fc14bSjoergwchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
66*4d6fc14bSjoergint wcscmp(const wchar_t* s1, const wchar_t* s2);
67*4d6fc14bSjoergint wcscoll(const wchar_t* s1, const wchar_t* s2);
68*4d6fc14bSjoergint wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
69*4d6fc14bSjoergsize_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
70*4d6fc14bSjoergconst wchar_t* wcschr(const wchar_t* s, wchar_t c);
71*4d6fc14bSjoerg      wchar_t* wcschr(      wchar_t* s, wchar_t c);
72*4d6fc14bSjoergsize_t wcscspn(const wchar_t* s1, const wchar_t* s2);
73*4d6fc14bSjoergsize_t wcslen(const wchar_t* s);
74*4d6fc14bSjoergconst wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
75*4d6fc14bSjoerg      wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
76*4d6fc14bSjoergconst wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
77*4d6fc14bSjoerg      wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
78*4d6fc14bSjoergsize_t wcsspn(const wchar_t* s1, const wchar_t* s2);
79*4d6fc14bSjoergconst wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
80*4d6fc14bSjoerg      wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
81*4d6fc14bSjoergwchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr);
82*4d6fc14bSjoergconst wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
83*4d6fc14bSjoerg      wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
84*4d6fc14bSjoergint wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
85*4d6fc14bSjoergwchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
86*4d6fc14bSjoergwchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
87*4d6fc14bSjoergwchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
88*4d6fc14bSjoergsize_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format,
89*4d6fc14bSjoerg                const tm* restrict timeptr);
90*4d6fc14bSjoergwint_t btowc(int c);
91*4d6fc14bSjoergint wctob(wint_t c);
92*4d6fc14bSjoergint mbsinit(const mbstate_t* ps);
93*4d6fc14bSjoergsize_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
94*4d6fc14bSjoergsize_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
95*4d6fc14bSjoergsize_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
96*4d6fc14bSjoergsize_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
97*4d6fc14bSjoerg                 mbstate_t* restrict ps);
98*4d6fc14bSjoergsize_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
99*4d6fc14bSjoerg                 mbstate_t* restrict ps);
100*4d6fc14bSjoerg
101*4d6fc14bSjoerg}  // std
102*4d6fc14bSjoerg
103*4d6fc14bSjoerg*/
104*4d6fc14bSjoerg
105*4d6fc14bSjoerg#include <__config>
106*4d6fc14bSjoerg#include <cwctype>
107*4d6fc14bSjoerg#include <wchar.h>
108*4d6fc14bSjoerg
109*4d6fc14bSjoerg#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
110*4d6fc14bSjoerg#pragma GCC system_header
111*4d6fc14bSjoerg#endif
112*4d6fc14bSjoerg
113*4d6fc14bSjoerg_LIBCPP_BEGIN_NAMESPACE_STD
114*4d6fc14bSjoerg
115*4d6fc14bSjoergusing ::mbstate_t;
116*4d6fc14bSjoergusing ::size_t;
117*4d6fc14bSjoergusing ::tm;
118*4d6fc14bSjoergusing ::wint_t;
119*4d6fc14bSjoergusing ::FILE;
120*4d6fc14bSjoergusing ::fwprintf;
121*4d6fc14bSjoergusing ::fwscanf;
122*4d6fc14bSjoergusing ::swprintf;
123*4d6fc14bSjoergusing ::vfwprintf;
124*4d6fc14bSjoergusing ::vswprintf;
125*4d6fc14bSjoergusing ::swscanf;
126*4d6fc14bSjoergusing ::vfwscanf;
127*4d6fc14bSjoergusing ::vswscanf;
128*4d6fc14bSjoergusing ::fgetwc;
129*4d6fc14bSjoergusing ::fgetws;
130*4d6fc14bSjoergusing ::fputwc;
131*4d6fc14bSjoergusing ::fputws;
132*4d6fc14bSjoergusing ::fwide;
133*4d6fc14bSjoergusing ::getwc;
134*4d6fc14bSjoergusing ::putwc;
135*4d6fc14bSjoergusing ::ungetwc;
136*4d6fc14bSjoergusing ::wcstod;
137*4d6fc14bSjoergusing ::wcstof;
138*4d6fc14bSjoergusing ::wcstold;
139*4d6fc14bSjoergusing ::wcstol;
140*4d6fc14bSjoerg#ifndef _LIBCPP_HAS_NO_LONG_LONG
141*4d6fc14bSjoergusing ::wcstoll;
142*4d6fc14bSjoerg#endif // _LIBCPP_HAS_NO_LONG_LONG
143*4d6fc14bSjoergusing ::wcstoul;
144*4d6fc14bSjoerg#ifndef _LIBCPP_HAS_NO_LONG_LONG
145*4d6fc14bSjoergusing ::wcstoull;
146*4d6fc14bSjoerg#endif // _LIBCPP_HAS_NO_LONG_LONG
147*4d6fc14bSjoergusing ::wcscpy;
148*4d6fc14bSjoergusing ::wcsncpy;
149*4d6fc14bSjoergusing ::wcscat;
150*4d6fc14bSjoergusing ::wcsncat;
151*4d6fc14bSjoergusing ::wcscmp;
152*4d6fc14bSjoergusing ::wcscoll;
153*4d6fc14bSjoergusing ::wcsncmp;
154*4d6fc14bSjoergusing ::wcsxfrm;
155*4d6fc14bSjoergusing ::wcschr;
156*4d6fc14bSjoergusing ::wcspbrk;
157*4d6fc14bSjoergusing ::wcsrchr;
158*4d6fc14bSjoergusing ::wcsstr;
159*4d6fc14bSjoergusing ::wmemchr;
160*4d6fc14bSjoergusing ::wcscspn;
161*4d6fc14bSjoergusing ::wcslen;
162*4d6fc14bSjoergusing ::wcsspn;
163*4d6fc14bSjoergusing ::wcstok;
164*4d6fc14bSjoergusing ::wmemcmp;
165*4d6fc14bSjoergusing ::wmemcpy;
166*4d6fc14bSjoergusing ::wmemmove;
167*4d6fc14bSjoergusing ::wmemset;
168*4d6fc14bSjoergusing ::wcsftime;
169*4d6fc14bSjoergusing ::btowc;
170*4d6fc14bSjoergusing ::wctob;
171*4d6fc14bSjoergusing ::mbsinit;
172*4d6fc14bSjoergusing ::mbrlen;
173*4d6fc14bSjoergusing ::mbrtowc;
174*4d6fc14bSjoergusing ::wcrtomb;
175*4d6fc14bSjoergusing ::mbsrtowcs;
176*4d6fc14bSjoergusing ::wcsrtombs;
177*4d6fc14bSjoerg
178*4d6fc14bSjoerg#ifndef _LIBCPP_HAS_NO_STDIN
179*4d6fc14bSjoergusing ::getwchar;
180*4d6fc14bSjoergusing ::vwscanf;
181*4d6fc14bSjoergusing ::wscanf;
182*4d6fc14bSjoerg#endif
183*4d6fc14bSjoerg
184*4d6fc14bSjoerg#ifndef _LIBCPP_HAS_NO_STDOUT
185*4d6fc14bSjoergusing ::putwchar;
186*4d6fc14bSjoergusing ::vwprintf;
187*4d6fc14bSjoergusing ::wprintf;
188*4d6fc14bSjoerg#endif
189*4d6fc14bSjoerg
190*4d6fc14bSjoerg_LIBCPP_END_NAMESPACE_STD
191*4d6fc14bSjoerg
192*4d6fc14bSjoerg#endif // _LIBCPP_CWCHAR
193