1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _WCHAR_H 28*7c478bd9Sstevel@tonic-gate #define _WCHAR_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h> 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #include <iso/wchar_iso.h> 35*7c478bd9Sstevel@tonic-gate #include <iso/wchar_c99.h> 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate /* 38*7c478bd9Sstevel@tonic-gate * Allow global visibility for symbols defined in 39*7c478bd9Sstevel@tonic-gate * C++ "std" namespace in <iso/wchar_iso.h>. 40*7c478bd9Sstevel@tonic-gate */ 41*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 42*7c478bd9Sstevel@tonic-gate using std::FILE; 43*7c478bd9Sstevel@tonic-gate using std::wint_t; 44*7c478bd9Sstevel@tonic-gate using std::clock_t; 45*7c478bd9Sstevel@tonic-gate using std::size_t; 46*7c478bd9Sstevel@tonic-gate using std::time_t; 47*7c478bd9Sstevel@tonic-gate using std::tm; 48*7c478bd9Sstevel@tonic-gate using std::mbstate_t; 49*7c478bd9Sstevel@tonic-gate using std::fgetwc; 50*7c478bd9Sstevel@tonic-gate using std::fgetws; 51*7c478bd9Sstevel@tonic-gate using std::fputwc; 52*7c478bd9Sstevel@tonic-gate using std::fputws; 53*7c478bd9Sstevel@tonic-gate using std::ungetwc; 54*7c478bd9Sstevel@tonic-gate using std::getwc; 55*7c478bd9Sstevel@tonic-gate using std::getwchar; 56*7c478bd9Sstevel@tonic-gate using std::putwc; 57*7c478bd9Sstevel@tonic-gate using std::putwchar; 58*7c478bd9Sstevel@tonic-gate using std::wcstod; 59*7c478bd9Sstevel@tonic-gate using std::wcstol; 60*7c478bd9Sstevel@tonic-gate using std::wcstoul; 61*7c478bd9Sstevel@tonic-gate using std::wcscat; 62*7c478bd9Sstevel@tonic-gate using std::wcschr; 63*7c478bd9Sstevel@tonic-gate using std::wcscmp; 64*7c478bd9Sstevel@tonic-gate using std::wcscoll; 65*7c478bd9Sstevel@tonic-gate using std::wcscpy; 66*7c478bd9Sstevel@tonic-gate using std::wcscspn; 67*7c478bd9Sstevel@tonic-gate using std::wcslen; 68*7c478bd9Sstevel@tonic-gate using std::wcsncat; 69*7c478bd9Sstevel@tonic-gate using std::wcsncmp; 70*7c478bd9Sstevel@tonic-gate using std::wcsncpy; 71*7c478bd9Sstevel@tonic-gate using std::wcspbrk; 72*7c478bd9Sstevel@tonic-gate using std::wcsrchr; 73*7c478bd9Sstevel@tonic-gate using std::wcsspn; 74*7c478bd9Sstevel@tonic-gate using std::wcsxfrm; 75*7c478bd9Sstevel@tonic-gate using std::wcstok; 76*7c478bd9Sstevel@tonic-gate using std::wcsftime; 77*7c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 78*7c478bd9Sstevel@tonic-gate #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) 79*7c478bd9Sstevel@tonic-gate using std::btowc; 80*7c478bd9Sstevel@tonic-gate using std::fwprintf; 81*7c478bd9Sstevel@tonic-gate using std::fwscanf; 82*7c478bd9Sstevel@tonic-gate using std::fwide; 83*7c478bd9Sstevel@tonic-gate using std::mbsinit; 84*7c478bd9Sstevel@tonic-gate using std::mbrlen; 85*7c478bd9Sstevel@tonic-gate using std::mbrtowc; 86*7c478bd9Sstevel@tonic-gate using std::mbsrtowcs; 87*7c478bd9Sstevel@tonic-gate using std::swprintf; 88*7c478bd9Sstevel@tonic-gate using std::swscanf; 89*7c478bd9Sstevel@tonic-gate using std::vfwprintf; 90*7c478bd9Sstevel@tonic-gate using std::vwprintf; 91*7c478bd9Sstevel@tonic-gate using std::vswprintf; 92*7c478bd9Sstevel@tonic-gate using std::wcrtomb; 93*7c478bd9Sstevel@tonic-gate using std::wcsrtombs; 94*7c478bd9Sstevel@tonic-gate using std::wcsstr; 95*7c478bd9Sstevel@tonic-gate using std::wctob; 96*7c478bd9Sstevel@tonic-gate using std::wmemchr; 97*7c478bd9Sstevel@tonic-gate using std::wmemcmp; 98*7c478bd9Sstevel@tonic-gate using std::wmemcpy; 99*7c478bd9Sstevel@tonic-gate using std::wmemmove; 100*7c478bd9Sstevel@tonic-gate using std::wmemset; 101*7c478bd9Sstevel@tonic-gate using std::wprintf; 102*7c478bd9Sstevel@tonic-gate using std::wscanf; 103*7c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 104*7c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 107*7c478bd9Sstevel@tonic-gate extern "C" { 108*7c478bd9Sstevel@tonic-gate #endif 109*7c478bd9Sstevel@tonic-gate 110*7c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 111*7c478bd9Sstevel@tonic-gate #if !defined(_WCTYPE_T) || __cplusplus >= 199711L 112*7c478bd9Sstevel@tonic-gate #define _WCTYPE_T 113*7c478bd9Sstevel@tonic-gate typedef int wctype_t; 114*7c478bd9Sstevel@tonic-gate #endif 115*7c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate /* 118*7c478bd9Sstevel@tonic-gate * XPG6 requires that va_list be defined as defined in <stdarg.h>, 119*7c478bd9Sstevel@tonic-gate * however, inclusion of <stdarg.h> breaks Standard C namespace. 120*7c478bd9Sstevel@tonic-gate */ 121*7c478bd9Sstevel@tonic-gate #if defined(_XPG6) && !defined(_VA_LIST) 122*7c478bd9Sstevel@tonic-gate #define _VA_LIST 123*7c478bd9Sstevel@tonic-gate typedef __va_list va_list; 124*7c478bd9Sstevel@tonic-gate #endif /* defined(_XPG6) && !defined(_VA_LIST) */ 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 129*7c478bd9Sstevel@tonic-gate extern int iswalpha(wint_t); 130*7c478bd9Sstevel@tonic-gate extern int iswupper(wint_t); 131*7c478bd9Sstevel@tonic-gate extern int iswlower(wint_t); 132*7c478bd9Sstevel@tonic-gate extern int iswdigit(wint_t); 133*7c478bd9Sstevel@tonic-gate extern int iswxdigit(wint_t); 134*7c478bd9Sstevel@tonic-gate extern int iswalnum(wint_t); 135*7c478bd9Sstevel@tonic-gate extern int iswspace(wint_t); 136*7c478bd9Sstevel@tonic-gate extern int iswpunct(wint_t); 137*7c478bd9Sstevel@tonic-gate extern int iswprint(wint_t); 138*7c478bd9Sstevel@tonic-gate extern int iswgraph(wint_t); 139*7c478bd9Sstevel@tonic-gate extern int iswcntrl(wint_t); 140*7c478bd9Sstevel@tonic-gate extern int iswctype(wint_t, wctype_t); 141*7c478bd9Sstevel@tonic-gate extern wint_t towlower(wint_t); 142*7c478bd9Sstevel@tonic-gate extern wint_t towupper(wint_t); 143*7c478bd9Sstevel@tonic-gate extern wchar_t *wcswcs(const wchar_t *, const wchar_t *); 144*7c478bd9Sstevel@tonic-gate extern int wcswidth(const wchar_t *, size_t); 145*7c478bd9Sstevel@tonic-gate extern int wcwidth(const wchar_t); 146*7c478bd9Sstevel@tonic-gate extern wctype_t wctype(const char *); 147*7c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 148*7c478bd9Sstevel@tonic-gate 149*7c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 152*7c478bd9Sstevel@tonic-gate extern int iswalpha(); 153*7c478bd9Sstevel@tonic-gate extern int iswupper(); 154*7c478bd9Sstevel@tonic-gate extern int iswlower(); 155*7c478bd9Sstevel@tonic-gate extern int iswdigit(); 156*7c478bd9Sstevel@tonic-gate extern int iswxdigit(); 157*7c478bd9Sstevel@tonic-gate extern int iswalnum(); 158*7c478bd9Sstevel@tonic-gate extern int iswspace(); 159*7c478bd9Sstevel@tonic-gate extern int iswpunct(); 160*7c478bd9Sstevel@tonic-gate extern int iswprint(); 161*7c478bd9Sstevel@tonic-gate extern int iswgraph(); 162*7c478bd9Sstevel@tonic-gate extern int iswcntrl(); 163*7c478bd9Sstevel@tonic-gate extern int iswctype(); 164*7c478bd9Sstevel@tonic-gate extern wint_t towlower(); 165*7c478bd9Sstevel@tonic-gate extern wint_t towupper(); 166*7c478bd9Sstevel@tonic-gate extern wchar_t *wcswcs(); 167*7c478bd9Sstevel@tonic-gate extern int wcswidth(); 168*7c478bd9Sstevel@tonic-gate extern int wcwidth(); 169*7c478bd9Sstevel@tonic-gate extern wctype_t wctype(); 170*7c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 171*7c478bd9Sstevel@tonic-gate 172*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 173*7c478bd9Sstevel@tonic-gate 174*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 175*7c478bd9Sstevel@tonic-gate } 176*7c478bd9Sstevel@tonic-gate #endif 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate #endif /* _WCHAR_H */ 179