1 |
207 |
jeremybenn |
#ifndef _WCHAR_H_
|
2 |
|
|
#define _WCHAR_H_
|
3 |
|
|
|
4 |
|
|
#include <_ansi.h>
|
5 |
|
|
|
6 |
|
|
#include <sys/reent.h>
|
7 |
|
|
|
8 |
|
|
#define __need_size_t
|
9 |
|
|
#define __need_wchar_t
|
10 |
|
|
#define __need_wint_t
|
11 |
|
|
#include <stddef.h>
|
12 |
|
|
|
13 |
|
|
#define __need___va_list
|
14 |
|
|
#include <stdarg.h>
|
15 |
|
|
|
16 |
|
|
/* For _mbstate_t definition. */
|
17 |
|
|
#include <sys/_types.h>
|
18 |
|
|
|
19 |
|
|
#ifndef NULL
|
20 |
|
|
#define NULL 0
|
21 |
|
|
#endif
|
22 |
|
|
|
23 |
|
|
#ifndef WEOF
|
24 |
|
|
# define WEOF ((wint_t)-1)
|
25 |
|
|
#endif
|
26 |
|
|
|
27 |
|
|
#ifndef WCHAR_MIN
|
28 |
|
|
#define WCHAR_MIN 0
|
29 |
|
|
#endif
|
30 |
|
|
|
31 |
|
|
#ifndef WCHAR_MAX
|
32 |
|
|
#ifdef __WCHAR_MAX__
|
33 |
|
|
#define WCHAR_MAX __WCHAR_MAX__
|
34 |
|
|
#else
|
35 |
|
|
#define WCHAR_MAX 0x7fffffffu
|
36 |
|
|
#endif
|
37 |
|
|
#endif
|
38 |
|
|
|
39 |
|
|
_BEGIN_STD_C
|
40 |
|
|
|
41 |
|
|
/* As required by POSIX.1-2008, declare tm as incomplete type.
|
42 |
|
|
The actual definition is in time.h. */
|
43 |
|
|
struct tm;
|
44 |
|
|
|
45 |
|
|
#ifndef _MBSTATE_T
|
46 |
|
|
#define _MBSTATE_T
|
47 |
|
|
typedef _mbstate_t mbstate_t;
|
48 |
|
|
#endif /* _MBSTATE_T */
|
49 |
|
|
|
50 |
|
|
wint_t _EXFUN(btowc, (int));
|
51 |
|
|
int _EXFUN(wctob, (wint_t));
|
52 |
|
|
size_t _EXFUN(mbrlen, (const char * , size_t, mbstate_t *));
|
53 |
|
|
size_t _EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *));
|
54 |
|
|
size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * ,
|
55 |
|
|
size_t, mbstate_t *));
|
56 |
|
|
int _EXFUN(mbsinit, (const mbstate_t *));
|
57 |
|
|
size_t _EXFUN(mbsnrtowcs, (wchar_t * , const char ** , size_t, size_t,
|
58 |
|
|
mbstate_t *));
|
59 |
|
|
size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** ,
|
60 |
|
|
size_t, size_t, mbstate_t *));
|
61 |
|
|
size_t _EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *));
|
62 |
|
|
size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *));
|
63 |
|
|
size_t _EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *));
|
64 |
|
|
size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *));
|
65 |
|
|
size_t _EXFUN(wcsnrtombs, (char * , const wchar_t ** , size_t, size_t,
|
66 |
|
|
mbstate_t *));
|
67 |
|
|
size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** ,
|
68 |
|
|
size_t, size_t, mbstate_t *));
|
69 |
|
|
size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
|
70 |
|
|
size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** ,
|
71 |
|
|
size_t, mbstate_t *));
|
72 |
|
|
int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *));
|
73 |
|
|
wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *));
|
74 |
|
|
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
|
75 |
|
|
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
|
76 |
|
|
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
|
77 |
|
|
wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
|
78 |
|
|
wchar_t *_EXFUN(wcpcpy, (wchar_t * , const wchar_t *));
|
79 |
|
|
wchar_t *_EXFUN(wcsdup, (const wchar_t *));
|
80 |
|
|
wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * ));
|
81 |
|
|
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
|
82 |
|
|
size_t _EXFUN(wcsftime, (wchar_t *, size_t, const wchar_t *, const struct tm *));
|
83 |
|
|
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
|
84 |
|
|
size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
|
85 |
|
|
size_t _EXFUN(wcslen, (const wchar_t *));
|
86 |
|
|
int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t));
|
87 |
|
|
wchar_t *_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t));
|
88 |
|
|
int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
|
89 |
|
|
wchar_t *_EXFUN(wcsncpy, (wchar_t * , const wchar_t * , size_t));
|
90 |
|
|
wchar_t *_EXFUN(wcpncpy, (wchar_t * , const wchar_t * , size_t));
|
91 |
|
|
size_t _EXFUN(wcsnlen, (const wchar_t *, size_t));
|
92 |
|
|
wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
|
93 |
|
|
wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
|
94 |
|
|
size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
|
95 |
|
|
wchar_t *_EXFUN(wcsstr, (const wchar_t *, const wchar_t *));
|
96 |
|
|
wchar_t *_EXFUN(wcstok, (wchar_t *, const wchar_t *, wchar_t **));
|
97 |
|
|
double _EXFUN(wcstod, (const wchar_t *, wchar_t **));
|
98 |
|
|
double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **));
|
99 |
|
|
float _EXFUN(wcstof, (const wchar_t *, wchar_t **));
|
100 |
|
|
float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **));
|
101 |
|
|
int _EXFUN(wcswidth, (const wchar_t *, size_t));
|
102 |
|
|
size_t _EXFUN(wcsxfrm, (wchar_t *, const wchar_t *, size_t));
|
103 |
|
|
int _EXFUN(wcwidth, (const wchar_t));
|
104 |
|
|
wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
|
105 |
|
|
int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
|
106 |
|
|
wchar_t *_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t));
|
107 |
|
|
wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
|
108 |
|
|
wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
|
109 |
|
|
|
110 |
|
|
long _EXFUN(wcstol, (const wchar_t *, wchar_t **, int));
|
111 |
|
|
long long _EXFUN(wcstoll, (const wchar_t *, wchar_t **, int));
|
112 |
|
|
unsigned long _EXFUN(wcstoul, (const wchar_t *, wchar_t **, int));
|
113 |
|
|
unsigned long long _EXFUN(wcstoull, (const wchar_t *, wchar_t **, int));
|
114 |
|
|
long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
115 |
|
|
long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
116 |
|
|
unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
117 |
|
|
unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
118 |
|
|
|
119 |
|
|
wint_t _EXFUN(fgetwc, (__FILE *));
|
120 |
|
|
wchar_t *_EXFUN(fgetws, (wchar_t *, int, __FILE *));
|
121 |
|
|
wint_t _EXFUN(fputwc, (wchar_t, __FILE *));
|
122 |
|
|
int _EXFUN(fputws, (const wchar_t *, __FILE *));
|
123 |
|
|
int _EXFUN (fwide, (__FILE *, int));
|
124 |
|
|
wint_t _EXFUN (getwc, (__FILE *));
|
125 |
|
|
wint_t _EXFUN (getwchar, (void));
|
126 |
|
|
wint_t _EXFUN(putwc, (wchar_t, __FILE *));
|
127 |
|
|
wint_t _EXFUN(putwchar, (wchar_t));
|
128 |
|
|
wint_t _EXFUN (ungetwc, (wint_t wc, __FILE *));
|
129 |
|
|
|
130 |
|
|
wint_t _EXFUN(_fgetwc_r, (struct _reent *, __FILE *));
|
131 |
|
|
wchar_t *_EXFUN(_fgetws_r, (struct _reent *, wchar_t *, int, __FILE *));
|
132 |
|
|
wint_t _EXFUN(_fputwc_r, (struct _reent *, wchar_t, __FILE *));
|
133 |
|
|
int _EXFUN(_fputws_r, (struct _reent *, const wchar_t *, __FILE *));
|
134 |
|
|
int _EXFUN (_fwide_r, (struct _reent *, __FILE *, int));
|
135 |
|
|
wint_t _EXFUN (_getwc_r, (struct _reent *, __FILE *));
|
136 |
|
|
wint_t _EXFUN (_getwchar_r, (struct _reent *ptr));
|
137 |
|
|
wint_t _EXFUN(_putwc_r, (struct _reent *, wchar_t, __FILE *));
|
138 |
|
|
wint_t _EXFUN(_putwchar_r, (struct _reent *, wchar_t));
|
139 |
|
|
wint_t _EXFUN (_ungetwc_r, (struct _reent *, wint_t wc, __FILE *));
|
140 |
|
|
|
141 |
|
|
__FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *));
|
142 |
|
|
__FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *));
|
143 |
|
|
|
144 |
|
|
#ifndef __VALIST
|
145 |
|
|
#ifdef __GNUC__
|
146 |
|
|
#define __VALIST __gnuc_va_list
|
147 |
|
|
#else
|
148 |
|
|
#define __VALIST char*
|
149 |
|
|
#endif
|
150 |
|
|
#endif
|
151 |
|
|
|
152 |
|
|
int _EXFUN(fwprintf, (__FILE *, const wchar_t *, ...));
|
153 |
|
|
int _EXFUN(swprintf, (wchar_t *, size_t, const wchar_t *, ...));
|
154 |
|
|
int _EXFUN(vfwprintf, (__FILE *, const wchar_t *, __VALIST));
|
155 |
|
|
int _EXFUN(vswprintf, (wchar_t *, size_t, const wchar_t *, __VALIST));
|
156 |
|
|
int _EXFUN(vwprintf, (const wchar_t *, __VALIST));
|
157 |
|
|
int _EXFUN(wprintf, (const wchar_t *, ...));
|
158 |
|
|
|
159 |
|
|
int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
|
160 |
|
|
int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...));
|
161 |
|
|
int _EXFUN(_vfwprintf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST));
|
162 |
|
|
int _EXFUN(_vswprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, __VALIST));
|
163 |
|
|
int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST));
|
164 |
|
|
int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...));
|
165 |
|
|
|
166 |
|
|
int _EXFUN(fwscanf, (__FILE *, const wchar_t *, ...));
|
167 |
|
|
int _EXFUN(swscanf, (const wchar_t *, const wchar_t *, ...));
|
168 |
|
|
int _EXFUN(vfwscanf, (__FILE *, const wchar_t *, __VALIST));
|
169 |
|
|
int _EXFUN(vswscanf, (const wchar_t *, const wchar_t *, __VALIST));
|
170 |
|
|
int _EXFUN(vwscanf, (const wchar_t *, __VALIST));
|
171 |
|
|
int _EXFUN(wscanf, (const wchar_t *, ...));
|
172 |
|
|
|
173 |
|
|
int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
|
174 |
|
|
int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...));
|
175 |
|
|
int _EXFUN(_vfwscanf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST));
|
176 |
|
|
int _EXFUN(_vswscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, __VALIST));
|
177 |
|
|
int _EXFUN(_vwscanf_r, (struct _reent *, const wchar_t *, __VALIST));
|
178 |
|
|
int _EXFUN(_wscanf_r, (struct _reent *, const wchar_t *, ...));
|
179 |
|
|
|
180 |
|
|
#define getwc(fp) fgetwc(fp)
|
181 |
|
|
#define putwc(wc,fp) fputwc((wc), (fp))
|
182 |
|
|
#ifndef _REENT_ONLY
|
183 |
|
|
#define getwchar() fgetwc(_REENT->_stdin)
|
184 |
|
|
#define putwchar(wc) fputwc((wc), _REENT->_stdout)
|
185 |
|
|
#else
|
186 |
|
|
#define getwchar() fgetwc(_impure_ptr->_stdin)
|
187 |
|
|
#define putwchar(wc) fputwc((wc), _impure_ptr->_stdout)
|
188 |
|
|
#endif
|
189 |
|
|
|
190 |
|
|
_END_STD_C
|
191 |
|
|
|
192 |
|
|
#endif /* _WCHAR_H_ */
|