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