wchar revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesset prototyped
16b55a35cff91315d261d1baa776138af465c4e4fuankgset include .
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #ifndef _AST_WCHAR_H
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define _AST_WCHAR_H 1
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholeslib mbstowcs,wctomb,wcrtomb,wcslen,wcstombs,wcwidth stdlib.h stdio.h wchar.h
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #ifndef _SFSTDIO_H
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesif tst note{ <wchar.h> requires native <stdio.h> }end nocompile{
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes /*<NOSTDIO>*/
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define _STDIO_INCLUDED 1
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define FILE void
16b55a35cff91315d261d1baa776138af465c4e4fuankg if tst note{ <stdio.h> defines __va_list for <wchar.h> }end compile{
16b55a35cff91315d261d1baa776138af465c4e4fuankg /*<NOSTDIO>*/
16b55a35cff91315d261d1baa776138af465c4e4fuankg #define _STDIO_INCLUDED 1
16b55a35cff91315d261d1baa776138af465c4e4fuankg #define FILE void
16b55a35cff91315d261d1baa776138af465c4e4fuankg #define __va_list va_list
16b55a35cff91315d261d1baa776138af465c4e4fuankg #define __va_list va_list
16b55a35cff91315d261d1baa776138af465c4e4fuankgif hdr - wctype wchar.h
16b55a35cff91315d261d1baa776138af465c4e4fuankg if ! npt - iswalpha wchar.h {
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #include <wctype.h> /* <wchar.h> includes <wctype.h> */
16b55a35cff91315d261d1baa776138af465c4e4fuankg #if _hdr_wchar && defined(_nxt_wchar)
16b55a35cff91315d261d1baa776138af465c4e4fuankg #include ${_nxt_wchar-_nxt_wchar} /* the native wchar.h */
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg #ifndef WEOF
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg #define WEOF (-1)
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef fgetwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef fgetws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef fputwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef fputws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef getwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef getwchar
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef getws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef putwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef putwchar
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef ungetwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fgetwc _ast_fgetwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fgetws _ast_fgetws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fputwc _ast_fputwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fputws _ast_fputws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fwide _ast_fwide
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fwprintf _ast_fwprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define fwscanf _ast_fwscanf
16b55a35cff91315d261d1baa776138af465c4e4fuankg #define getwc _ast_getwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define getwchar _ast_getwchar
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define getws _ast_getws
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define putwc _ast_putwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define putwchar _ast_putwchar
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define swprintf _ast_swprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define swscanf _ast_swscanf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define ungetwc _ast_ungetwc
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vfwprintf _ast_vfwprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vfwscanf _ast_vfwscanf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vswprintf _ast_vswprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vswscanf _ast_vswscanf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vwprintf _ast_vwprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define vwscanf _ast_vwscanf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define wprintf _ast_wprintf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define wscanf _ast_wscanf
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_typ_mbstate_t
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef _typ_mbstate_t
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define _typ_mbstate_t 1
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes typedef char mbstate_t;
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if _BLD_ast && defined(__EXPORT__)
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #define extern __EXPORT__
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_lib_mbstowcs
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern size_t mbstowcs(wchar_t*, const char*, size_t);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_lib_wctomb
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int wctomb(char*, wchar_t);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_lib_wcrtomb
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern size_t wcrtomb(char*, wchar_t, mbstate_t*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_lib_wcslen
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern size_t wcslen(const wchar_t*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #if !_lib_wcstombs
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern size_t wcstombs(char*, const wchar_t*, size_t);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int fwprintf(FILE*, const wchar_t*, ...);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int fwscanf(FILE*, const wchar_t*, ...);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t fgetwc(FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wchar_t* fgetws(wchar_t*, int, FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t fputwc(wchar_t, FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int fputws(const wchar_t*, FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int fwide(FILE*, int);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t getwc(FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t getwchar(void);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wchar_t* getws(wchar_t*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t putwc(wchar_t, FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern wint_t putwchar(wchar_t);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int swprintf(wchar_t*, size_t, const wchar_t*, ...);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int swscanf(const wchar_t*, const wchar_t*, ...);
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg extern wint_t ungetwc(wint_t, FILE*);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int vfwprintf(FILE*, const wchar_t*, va_list);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int vfwscanf(FILE*, const wchar_t*, va_list);
16b55a35cff91315d261d1baa776138af465c4e4fuankg extern int vwprintf(const wchar_t*, va_list);
16b55a35cff91315d261d1baa776138af465c4e4fuankg extern int vwscanf(const wchar_t*, va_list);
16b55a35cff91315d261d1baa776138af465c4e4fuankg extern int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
b387b9d37fc71c534f4718777454a8f5a1169017fuankg extern int vswscanf(const wchar_t*, const wchar_t*, va_list);
16b55a35cff91315d261d1baa776138af465c4e4fuankg extern int wprintf(const wchar_t*, ...);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes extern int wscanf(const wchar_t*, ...);
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes #undef extern
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes /* on some systems <wchar.h> is included multiple times with multiple effects */
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg #if _hdr_wchar && defined(_nxt_wchar)
0662ed52e814f8f08ef0e09956413a792584eddffuankg #include ${_nxt_wchar-_nxt_wchar} /* the native wchar.h */