1*906afcb8SAndy Fiddaman 2*906afcb8SAndy Fiddaman/* : : generated by proto : : */ 3*906afcb8SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */ 4*906afcb8SAndy Fiddaman 5*906afcb8SAndy Fiddaman 6*906afcb8SAndy Fiddaman#if !defined(__PROTO__) 7*906afcb8SAndy Fiddaman# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus) 8*906afcb8SAndy Fiddaman# if defined(__cplusplus) 9*906afcb8SAndy Fiddaman# define __LINKAGE__ "C" 10*906afcb8SAndy Fiddaman# else 11*906afcb8SAndy Fiddaman# define __LINKAGE__ 12*906afcb8SAndy Fiddaman# endif 13*906afcb8SAndy Fiddaman# define __STDARG__ 14*906afcb8SAndy Fiddaman# define __PROTO__(x) x 15*906afcb8SAndy Fiddaman# define __OTORP__(x) 16*906afcb8SAndy Fiddaman# define __PARAM__(n,o) n 17*906afcb8SAndy Fiddaman# if !defined(__STDC__) && !defined(__cplusplus) 18*906afcb8SAndy Fiddaman# if !defined(c_plusplus) 19*906afcb8SAndy Fiddaman# define const 20*906afcb8SAndy Fiddaman# endif 21*906afcb8SAndy Fiddaman# define signed 22*906afcb8SAndy Fiddaman# define void int 23*906afcb8SAndy Fiddaman# define volatile 24*906afcb8SAndy Fiddaman# define __V_ char 25*906afcb8SAndy Fiddaman# else 26*906afcb8SAndy Fiddaman# define __V_ void 27*906afcb8SAndy Fiddaman# endif 28*906afcb8SAndy Fiddaman# else 29*906afcb8SAndy Fiddaman# define __PROTO__(x) () 30*906afcb8SAndy Fiddaman# define __OTORP__(x) x 31*906afcb8SAndy Fiddaman# define __PARAM__(n,o) o 32*906afcb8SAndy Fiddaman# define __LINKAGE__ 33*906afcb8SAndy Fiddaman# define __V_ char 34*906afcb8SAndy Fiddaman# define const 35*906afcb8SAndy Fiddaman# define signed 36*906afcb8SAndy Fiddaman# define void int 37*906afcb8SAndy Fiddaman# define volatile 38*906afcb8SAndy Fiddaman# endif 39*906afcb8SAndy Fiddaman# define __MANGLE__ __LINKAGE__ 40*906afcb8SAndy Fiddaman# if defined(__cplusplus) || defined(c_plusplus) 41*906afcb8SAndy Fiddaman# define __VARARG__ ... 42*906afcb8SAndy Fiddaman# else 43*906afcb8SAndy Fiddaman# define __VARARG__ 44*906afcb8SAndy Fiddaman# endif 45*906afcb8SAndy Fiddaman# if defined(__STDARG__) 46*906afcb8SAndy Fiddaman# define __VA_START__(p,a) va_start(p,a) 47*906afcb8SAndy Fiddaman# else 48*906afcb8SAndy Fiddaman# define __VA_START__(p,a) va_start(p) 49*906afcb8SAndy Fiddaman# endif 50*906afcb8SAndy Fiddaman# if !defined(__INLINE__) 51*906afcb8SAndy Fiddaman# if defined(__cplusplus) 52*906afcb8SAndy Fiddaman# define __INLINE__ extern __MANGLE__ inline 53*906afcb8SAndy Fiddaman# else 54*906afcb8SAndy Fiddaman# if defined(_WIN32) && !defined(__GNUC__) 55*906afcb8SAndy Fiddaman# define __INLINE__ __inline 56*906afcb8SAndy Fiddaman# endif 57*906afcb8SAndy Fiddaman# endif 58*906afcb8SAndy Fiddaman# endif 59*906afcb8SAndy Fiddaman#endif 60*906afcb8SAndy Fiddaman#if !defined(__LINKAGE__) 61*906afcb8SAndy Fiddaman#define __LINKAGE__ /* 2004-08-11 transition */ 62*906afcb8SAndy Fiddaman#endif 63*906afcb8SAndy Fiddaman#define _sys_types 1 /* #include <sys/types.h> ok */ 64*906afcb8SAndy Fiddaman#ifndef _AST_WCHAR_H 65*906afcb8SAndy Fiddaman#define _AST_WCHAR_H 1 66*906afcb8SAndy Fiddaman 67*906afcb8SAndy Fiddaman#define _hdr_stdlib 1 /* #include <stdlib.h> ok */ 68*906afcb8SAndy Fiddaman#define _hdr_stdio 1 /* #include <stdio.h> ok */ 69*906afcb8SAndy Fiddaman#define _hdr_wchar 1 /* #include <wchar.h> ok */ 70*906afcb8SAndy Fiddaman#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */ 71*906afcb8SAndy Fiddaman#define _lib_wctomb 1 /* wctomb() in default lib(s) */ 72*906afcb8SAndy Fiddaman#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */ 73*906afcb8SAndy Fiddaman#define _lib_wcslen 1 /* wcslen() in default lib(s) */ 74*906afcb8SAndy Fiddaman#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */ 75*906afcb8SAndy Fiddaman#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */ 76*906afcb8SAndy Fiddaman#define _lib_towlower 1 /* towlower() in default lib(s) */ 77*906afcb8SAndy Fiddaman#define _lib_towupper 1 /* towupper() in default lib(s) */ 78*906afcb8SAndy Fiddaman#define _hdr_time 1 /* #include <time.h> ok */ 79*906afcb8SAndy Fiddaman#define _sys_time 1 /* #include <sys/time.h> ok */ 80*906afcb8SAndy Fiddaman#define _sys_times 1 /* #include <sys/times.h> ok */ 81*906afcb8SAndy Fiddaman#define _hdr_stddef 1 /* #include <stddef.h> ok */ 82*906afcb8SAndy Fiddaman#define _typ_mbstate_t 1 /* mbstate_t is a type */ 83*906afcb8SAndy Fiddaman#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */ 84*906afcb8SAndy Fiddaman#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */ 85*906afcb8SAndy Fiddaman#ifndef _SFSTDIO_H 86*906afcb8SAndy Fiddaman#include <ast_common.h> 87*906afcb8SAndy Fiddaman#include <stdio.h> 88*906afcb8SAndy Fiddaman#endif 89*906afcb8SAndy Fiddaman 90*906afcb8SAndy Fiddaman#define _hdr_unistd 1 /* #include <unistd.h> ok */ 91*906afcb8SAndy Fiddaman#include <wctype.h> /* <wchar.h> includes <wctype.h> */ 92*906afcb8SAndy Fiddaman 93*906afcb8SAndy Fiddaman#if _hdr_wchar && defined(_nxt_wchar) 94*906afcb8SAndy Fiddaman#include <../include/wchar.h> /* the native wchar.h */ 95*906afcb8SAndy Fiddaman#endif 96*906afcb8SAndy Fiddaman 97*906afcb8SAndy Fiddaman#ifndef WEOF 98*906afcb8SAndy Fiddaman#define WEOF (-1) 99*906afcb8SAndy Fiddaman#endif 100*906afcb8SAndy Fiddaman 101*906afcb8SAndy Fiddaman#undef fgetwc 102*906afcb8SAndy Fiddaman#undef fgetws 103*906afcb8SAndy Fiddaman#undef fputwc 104*906afcb8SAndy Fiddaman#undef fputws 105*906afcb8SAndy Fiddaman#undef getwc 106*906afcb8SAndy Fiddaman#undef getwchar 107*906afcb8SAndy Fiddaman#undef getws 108*906afcb8SAndy Fiddaman#undef putwc 109*906afcb8SAndy Fiddaman#undef putwchar 110*906afcb8SAndy Fiddaman#undef ungetwc 111*906afcb8SAndy Fiddaman 112*906afcb8SAndy Fiddaman#define fgetwc _ast_fgetwc 113*906afcb8SAndy Fiddaman#define fgetws _ast_fgetws 114*906afcb8SAndy Fiddaman#define fputwc _ast_fputwc 115*906afcb8SAndy Fiddaman#define fputws _ast_fputws 116*906afcb8SAndy Fiddaman#define fwide _ast_fwide 117*906afcb8SAndy Fiddaman#define fwprintf _ast_fwprintf 118*906afcb8SAndy Fiddaman#define fwscanf _ast_fwscanf 119*906afcb8SAndy Fiddaman#define getwc _ast_getwc 120*906afcb8SAndy Fiddaman#define getwchar _ast_getwchar 121*906afcb8SAndy Fiddaman#define getws _ast_getws 122*906afcb8SAndy Fiddaman#define putwc _ast_putwc 123*906afcb8SAndy Fiddaman#define putwchar _ast_putwchar 124*906afcb8SAndy Fiddaman#define swprintf _ast_swprintf 125*906afcb8SAndy Fiddaman#define swscanf _ast_swscanf 126*906afcb8SAndy Fiddaman#define ungetwc _ast_ungetwc 127*906afcb8SAndy Fiddaman#define vfwprintf _ast_vfwprintf 128*906afcb8SAndy Fiddaman#define vfwscanf _ast_vfwscanf 129*906afcb8SAndy Fiddaman#define vswprintf _ast_vswprintf 130*906afcb8SAndy Fiddaman#define vswscanf _ast_vswscanf 131*906afcb8SAndy Fiddaman#define vwprintf _ast_vwprintf 132*906afcb8SAndy Fiddaman#define vwscanf _ast_vwscanf 133*906afcb8SAndy Fiddaman#define wprintf _ast_wprintf 134*906afcb8SAndy Fiddaman#define wscanf _ast_wscanf 135*906afcb8SAndy Fiddaman 136*906afcb8SAndy Fiddaman#if !_typ_mbstate_t 137*906afcb8SAndy Fiddaman#undef _typ_mbstate_t 138*906afcb8SAndy Fiddaman#define _typ_mbstate_t 1 139*906afcb8SAndy Fiddamantypedef char mbstate_t; 140*906afcb8SAndy Fiddaman#endif 141*906afcb8SAndy Fiddaman 142*906afcb8SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__) 143*906afcb8SAndy Fiddaman#undef __MANGLE__ 144*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __EXPORT__ 145*906afcb8SAndy Fiddaman#endif 146*906afcb8SAndy Fiddaman 147*906afcb8SAndy Fiddaman#if !_lib_mbstowcs 148*906afcb8SAndy Fiddamanextern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t)); 149*906afcb8SAndy Fiddaman#endif 150*906afcb8SAndy Fiddaman#if !_lib_wctomb 151*906afcb8SAndy Fiddamanextern __MANGLE__ int wctomb __PROTO__((char*, wchar_t)); 152*906afcb8SAndy Fiddaman#endif 153*906afcb8SAndy Fiddaman#if !_lib_wcrtomb 154*906afcb8SAndy Fiddamanextern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*)); 155*906afcb8SAndy Fiddaman#endif 156*906afcb8SAndy Fiddaman#if !_lib_wcslen 157*906afcb8SAndy Fiddamanextern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*)); 158*906afcb8SAndy Fiddaman#endif 159*906afcb8SAndy Fiddaman#if !_lib_wcstombs 160*906afcb8SAndy Fiddamanextern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t)); 161*906afcb8SAndy Fiddaman#endif 162*906afcb8SAndy Fiddaman 163*906afcb8SAndy Fiddamanextern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...)); 164*906afcb8SAndy Fiddamanextern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...)); 165*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t fgetwc __PROTO__((FILE*)); 166*906afcb8SAndy Fiddamanextern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*)); 167*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*)); 168*906afcb8SAndy Fiddamanextern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*)); 169*906afcb8SAndy Fiddamanextern __MANGLE__ int fwide __PROTO__((FILE*, int)); 170*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t getwc __PROTO__((FILE*)); 171*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t getwchar __PROTO__((void)); 172*906afcb8SAndy Fiddamanextern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*)); 173*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*)); 174*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t putwchar __PROTO__((wchar_t)); 175*906afcb8SAndy Fiddamanextern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...)); 176*906afcb8SAndy Fiddamanextern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...)); 177*906afcb8SAndy Fiddamanextern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*)); 178*906afcb8SAndy Fiddamanextern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list)); 179*906afcb8SAndy Fiddamanextern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list)); 180*906afcb8SAndy Fiddamanextern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list)); 181*906afcb8SAndy Fiddamanextern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list)); 182*906afcb8SAndy Fiddamanextern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list)); 183*906afcb8SAndy Fiddamanextern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list)); 184*906afcb8SAndy Fiddamanextern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...)); 185*906afcb8SAndy Fiddamanextern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...)); 186*906afcb8SAndy Fiddaman 187*906afcb8SAndy Fiddaman#undef __MANGLE__ 188*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ 189*906afcb8SAndy Fiddaman 190*906afcb8SAndy Fiddaman#else 191*906afcb8SAndy Fiddaman 192*906afcb8SAndy Fiddaman/* on some systems <wchar.h> is included multiple times with multiple effects */ 193*906afcb8SAndy Fiddaman 194*906afcb8SAndy Fiddaman#if _hdr_wchar && defined(_nxt_wchar) 195*906afcb8SAndy Fiddaman#include <../include/wchar.h> /* the native wchar.h */ 196*906afcb8SAndy Fiddaman#endif 197*906afcb8SAndy Fiddaman 198*906afcb8SAndy Fiddaman#endif 199