1N/Aiff
1N/Aset prototyped
1N/Aset stdio stdarg.h
1N/A
1N/Acat{
1N/A #ifndef _AST_WCHAR_H
1N/A #define _AST_WCHAR_H 1
1N/A}end
1N/A
1N/Alib mbstowcs,wctomb,wcrtomb,wcslen,wcstombs,wcwidth stdlib.h stdio.h wchar.h
1N/Alib towlower,towupper stdlib.h stdio.h wchar.h
1N/Atyp mbstate_t stdlib.h stdio.h wchar.h
1N/Anxt wchar
1N/A
1N/Acat{
1N/A #ifndef _SFSTDIO_H
1N/A #include <ast_common.h>
1N/A #include <stdio.h>
1N/A #endif
1N/A}end
1N/A
1N/Aif tst note{ <wchar.h> requires native <stdio.h> }end nocompile{
1N/A #define _STDIO_INCLUDED 1
1N/A #define FILE void
1N/A #include <wchar.h>
1N/A int tst;
1N/A }end
1N/A if tst note{ <stdio.h> defines __va_list for <wchar.h> }end compile{
1N/A #define _STDIO_INCLUDED 1
1N/A #define FILE void
1N/A #define __va_list va_list
1N/A #include <wchar.h>
1N/A int tst;
1N/A }end && {
1N/A #define __va_list va_list
1N/A }
1N/A endif
1N/Aendif
1N/A
1N/Aif hdr - wctype
1N/A if ! npt - iswalpha wchar.h {
1N/A #include <wctype.h> /* <wchar.h> includes <wctype.h> */
1N/A }
1N/A endif
1N/Aendif
1N/A
1N/Arun{
1N/Acat <<!
1N/A #if _hdr_wchar && defined(_nxt_wchar)
1N/A #include $_nxt_wchar /* the native wchar.h */
1N/A #endif
1N/A
1N/A #ifndef WEOF
1N/A #define WEOF (-1)
1N/A #endif
1N/A
1N/A #undef fgetwc
1N/A #undef fgetws
1N/A #undef fputwc
1N/A #undef fputws
1N/A #undef getwc
1N/A #undef getwchar
1N/A #undef getws
1N/A #undef putwc
1N/A #undef putwchar
1N/A #undef ungetwc
1N/A
1N/A #define fgetwc _ast_fgetwc
1N/A #define fgetws _ast_fgetws
1N/A #define fputwc _ast_fputwc
1N/A #define fputws _ast_fputws
1N/A #define fwide _ast_fwide
1N/A #define fwprintf _ast_fwprintf
1N/A #define fwscanf _ast_fwscanf
1N/A #define getwc _ast_getwc
1N/A #define getwchar _ast_getwchar
1N/A #define getws _ast_getws
1N/A #define putwc _ast_putwc
1N/A #define putwchar _ast_putwchar
1N/A #define swprintf _ast_swprintf
1N/A #define swscanf _ast_swscanf
1N/A #define ungetwc _ast_ungetwc
1N/A #define vfwprintf _ast_vfwprintf
1N/A #define vfwscanf _ast_vfwscanf
1N/A #define vswprintf _ast_vswprintf
1N/A #define vswscanf _ast_vswscanf
1N/A #define vwprintf _ast_vwprintf
1N/A #define vwscanf _ast_vwscanf
1N/A #define wprintf _ast_wprintf
1N/A #define wscanf _ast_wscanf
1N/A
1N/A #if !_typ_mbstate_t
1N/A #undef _typ_mbstate_t
1N/A #define _typ_mbstate_t 1
1N/A typedef char mbstate_t;
1N/A #endif
1N/A
1N/A #if _BLD_ast && defined(__EXPORT__)
1N/A #define extern __EXPORT__
1N/A #endif
1N/A
1N/A #if !_lib_mbstowcs
1N/A extern size_t mbstowcs(wchar_t*, const char*, size_t);
1N/A #endif
1N/A #if !_lib_wctomb
1N/A extern int wctomb(char*, wchar_t);
1N/A #endif
1N/A #if !_lib_wcrtomb
1N/A extern size_t wcrtomb(char*, wchar_t, mbstate_t*);
1N/A #endif
1N/A #if !_lib_wcslen
1N/A extern size_t wcslen(const wchar_t*);
1N/A #endif
1N/A #if !_lib_wcstombs
1N/A extern size_t wcstombs(char*, const wchar_t*, size_t);
1N/A #endif
1N/A
1N/A extern int fwprintf(FILE*, const wchar_t*, ...);
1N/A extern int fwscanf(FILE*, const wchar_t*, ...);
1N/A extern wint_t fgetwc(FILE*);
1N/A extern wchar_t* fgetws(wchar_t*, int, FILE*);
1N/A extern wint_t fputwc(wchar_t, FILE*);
1N/A extern int fputws(const wchar_t*, FILE*);
1N/A extern int fwide(FILE*, int);
1N/A extern wint_t getwc(FILE*);
1N/A extern wint_t getwchar(void);
1N/A extern wchar_t* getws(wchar_t*);
1N/A extern wint_t putwc(wchar_t, FILE*);
1N/A extern wint_t putwchar(wchar_t);
1N/A extern int swprintf(wchar_t*, size_t, const wchar_t*, ...);
1N/A extern int swscanf(const wchar_t*, const wchar_t*, ...);
1N/A extern wint_t ungetwc(wint_t, FILE*);
1N/A extern int vfwprintf(FILE*, const wchar_t*, va_list);
1N/A extern int vfwscanf(FILE*, const wchar_t*, va_list);
1N/A extern int vwprintf(const wchar_t*, va_list);
1N/A extern int vwscanf(const wchar_t*, va_list);
1N/A extern int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
1N/A extern int vswscanf(const wchar_t*, const wchar_t*, va_list);
1N/A extern int wprintf(const wchar_t*, ...);
1N/A extern int wscanf(const wchar_t*, ...);
1N/A
1N/A #undef extern
1N/A
1N/A #else
1N/A
1N/A /* on some systems <wchar.h> is included multiple times with multiple effects */
1N/A
1N/A #if _hdr_wchar && defined(_nxt_wchar)
1N/A #include $_nxt_wchar /* the native wchar.h */
1N/A #endif
1N/A
1N/A #endif
1N/A!
1N/A}end