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