Sync with trunk head (part 1 or 2)
[reactos.git] / include / crt / wchar.h
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _INC_WCHAR
7 #define _INC_WCHAR
8
9 #include <crtdefs.h>
10
11 #define __need___va_list
12 #include <stdarg.h>
13
14 #pragma pack(push,_CRT_PACKING)
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 #ifdef _MSC_VER
21 #pragma warning(push)
22 #pragma warning(disable:4820)
23 #endif
24
25 #ifndef WCHAR_MIN
26 #define WCHAR_MIN 0
27 #endif
28 #ifndef WCHAR_MAX
29 #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
30 #endif
31
32 #ifndef WEOF
33 #define WEOF (wint_t)(0xFFFF)
34 #endif
35
36 #ifndef _FILE_DEFINED
37 struct _iobuf {
38 char *_ptr;
39 int _cnt;
40 char *_base;
41 int _flag;
42 int _file;
43 int _charbuf;
44 int _bufsiz;
45 char *_tmpfname;
46 };
47 typedef struct _iobuf FILE;
48 #define _FILE_DEFINED
49 #endif
50
51 #ifndef _STDIO_DEFINED
52 _CRTIMP FILE *__cdecl __iob_func(void);
53 _CRTDATA(extern FILE _iob[];)
54 #ifdef _M_CEE_PURE
55 #define _iob __iob_func()
56 #endif
57 #endif
58
59 #ifndef _STDSTREAM_DEFINED
60 #define _STDSTREAM_DEFINED
61 #define stdin (&_iob[0])
62 #define stdout (&_iob[1])
63 #define stderr (&_iob[1])
64 #endif /* !_STDSTREAM_DEFINED */
65
66 #ifndef _FSIZE_T_DEFINED
67 typedef unsigned long _fsize_t;
68 #define _FSIZE_T_DEFINED
69 #endif
70
71 #ifndef _WFINDDATA_T_DEFINED
72 struct _wfinddata_t {
73 unsigned attrib;
74 time_t time_create;
75 time_t time_access;
76 time_t time_write;
77 _fsize_t size;
78 wchar_t name[260];
79 };
80
81 struct _wfinddata32_t {
82 unsigned attrib;
83 __time32_t time_create;
84 __time32_t time_access;
85 __time32_t time_write;
86 _fsize_t size;
87 wchar_t name[260];
88 };
89
90 #if _INTEGRAL_MAX_BITS >= 64
91 struct _wfinddatai64_t {
92 unsigned attrib;
93 time_t time_create;
94 time_t time_access;
95 time_t time_write;
96 __MINGW_EXTENSION __int64 size;
97 wchar_t name[260];
98 };
99
100 struct _wfinddata32i64_t {
101 unsigned attrib;
102 __time32_t time_create;
103 __time32_t time_access;
104 __time32_t time_write;
105 __MINGW_EXTENSION __int64 size;
106 wchar_t name[260];
107 };
108
109 struct _wfinddata64i32_t {
110 unsigned attrib;
111 __time64_t time_create;
112 __time64_t time_access;
113 __time64_t time_write;
114 _fsize_t size;
115 wchar_t name[260];
116 };
117
118 struct _wfinddata64_t {
119 unsigned attrib;
120 __time64_t time_create;
121 __time64_t time_access;
122 __time64_t time_write;
123 __MINGW_EXTENSION __int64 size;
124 wchar_t name[260];
125 };
126 #endif
127
128 #define _WFINDDATA_T_DEFINED
129 #endif /* !_WFINDDATA_T_DEFINED */
130
131 #ifndef NULL
132 #ifdef __cplusplus
133 #define NULL 0
134 #else
135 #define NULL ((void *)0)
136 #endif
137 #endif
138
139 #ifndef _CRT_CTYPEDATA_DEFINED
140 # define _CRT_CTYPEDATA_DEFINED
141 # ifndef _CTYPE_DISABLE_MACROS
142 # ifndef __PCTYPE_FUNC
143 # ifdef _DLL
144 # define __PCTYPE_FUNC __pctype_func()
145 # else
146 # define __PCTYPE_FUNC _pctype
147 # endif
148 # endif /* !__PCTYPE_FUNC */
149 _CRTIMP const unsigned short * __cdecl __pctype_func(void);
150 # ifndef _M_CEE_PURE
151 _CRTDATA(extern unsigned short *_pctype);
152 # else
153 # define _pctype (__pctype_func())
154 # endif /* !_M_CEE_PURE */
155 # endif /* !_CTYPE_DISABLE_MACROS */
156 #endif /* !_CRT_CTYPEDATA_DEFINED */
157
158 #ifndef _CRT_WCTYPEDATA_DEFINED
159 #define _CRT_WCTYPEDATA_DEFINED
160 # ifndef _CTYPE_DISABLE_MACROS
161 _CRTDATA(extern unsigned short *_wctype);
162 _CRTIMP const wctype_t * __cdecl __pwctype_func(void);
163 # ifndef _M_CEE_PURE
164 _CRTDATA(extern const wctype_t *_pwctype);
165 # else
166 # define _pwctype (__pwctype_func())
167 # endif /* !_M_CEE_PURE */
168 # endif /* !_CTYPE_DISABLE_MACROS */
169 #endif /* !_CRT_WCTYPEDATA_DEFINED */
170
171 #define _UPPER 0x1
172 #define _LOWER 0x2
173 #define _DIGIT 0x4
174 #define _SPACE 0x8
175
176 #define _PUNCT 0x10
177 #define _CONTROL 0x20
178 #define _BLANK 0x40
179 #define _HEX 0x80
180
181 #define _LEADBYTE 0x8000
182 #define _ALPHA (0x0100|_UPPER|_LOWER)
183
184 #ifndef _WCTYPE_DEFINED
185 #define _WCTYPE_DEFINED
186 _CRTIMP int __cdecl iswalpha(wint_t _C);
187 _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
188 _CRTIMP int __cdecl iswupper(wint_t _C);
189 _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
190 _CRTIMP int __cdecl iswlower(wint_t _C);
191 _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
192 _CRTIMP int __cdecl iswdigit(wint_t _C);
193 _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
194 _CRTIMP int __cdecl iswxdigit(wint_t _C);
195 _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
196 _CRTIMP int __cdecl iswspace(wint_t _C);
197 _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
198 _CRTIMP int __cdecl iswpunct(wint_t _C);
199 _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
200 _CRTIMP int __cdecl iswalnum(wint_t _C);
201 _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
202 _CRTIMP int __cdecl iswprint(wint_t _C);
203 _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
204 _CRTIMP int __cdecl iswgraph(wint_t _C);
205 _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
206 _CRTIMP int __cdecl iswcntrl(wint_t _C);
207 _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
208 _CRTIMP int __cdecl iswascii(wint_t _C);
209 _CRTIMP int __cdecl isleadbyte(int _C);
210 _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
211 _CRTIMP wint_t __cdecl towupper(wint_t _C);
212 _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
213 _CRTIMP wint_t __cdecl towlower(wint_t _C);
214 _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
215 _CRTIMP int __cdecl iswctype(wint_t _C,wctype_t _Type);
216 _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
217 _CRTIMP int __cdecl __iswcsymf(wint_t _C);
218 _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
219 _CRTIMP int __cdecl __iswcsym(wint_t _C);
220 _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
221 _CRTIMP int __cdecl is_wctype(wint_t _C,wctype_t _Type);
222 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
223 _CRTIMP int __cdecl iswblank(wint_t _C);
224 #endif
225 #endif
226
227 #ifndef _WDIRECT_DEFINED
228 #define _WDIRECT_DEFINED
229 _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
230 _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
231 wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
232 _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
233 _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
234 _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
235 #endif
236
237 #ifndef _WIO_DEFINED
238 #define _WIO_DEFINED
239 _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
240 _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
241 _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
242 _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
243 _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
244 _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
245 _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
246 _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
247 #if _INTEGRAL_MAX_BITS >= 64
248 _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
249 _CRTIMP intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
250 _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
251 _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
252 _CRTIMP int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
253 _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
254 #endif
255 _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
256 #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
257 _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
258 _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
259 #else
260 extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
261 extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
262 #endif
263 #endif /* !_WIO_DEFINED */
264
265 #ifndef _WLOCALE_DEFINED
266 #define _WLOCALE_DEFINED
267 _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
268 #endif
269
270 #ifndef _WPROCESS_DEFINED
271 #define _WPROCESS_DEFINED
272 _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
273 _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
274 _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
275 _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
276 _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
277 _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
278 _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
279 _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
280 _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
281 _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
282 _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
283 _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
284 _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
285 _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
286 _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
287 _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
288 #ifndef _CRT_WSYSTEM_DEFINED
289 #define _CRT_WSYSTEM_DEFINED
290 _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
291 #endif /* !_CRT_WSYSTEM_DEFINED */
292 #endif /* !_WPROCESS_DEFINED */
293
294 #ifndef _WCTYPE_INLINE_DEFINED
295 #undef _CRT_WCTYPE_NOINLINE
296 #if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
297 #define iswalpha(_c) (iswctype(_c,_ALPHA))
298 #define iswupper(_c) (iswctype(_c,_UPPER))
299 #define iswlower(_c) (iswctype(_c,_LOWER))
300 #define iswdigit(_c) (iswctype(_c,_DIGIT))
301 #define iswxdigit(_c) (iswctype(_c,_HEX))
302 #define iswspace(_c) (iswctype(_c,_SPACE))
303 #define iswpunct(_c) (iswctype(_c,_PUNCT))
304 #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
305 #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
306 #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
307 #define iswcntrl(_c) (iswctype(_c,_CONTROL))
308 #define iswascii(_c) ((unsigned)(_c) < 0x80)
309
310 #define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
311 #define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
312 #define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
313 #define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
314 #define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
315 #define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
316 #define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
317 #define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
318 #define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
319 #define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
320 #define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
321 #ifndef _CTYPE_DISABLE_MACROS
322 #define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
323 #endif
324 #endif
325 #define _WCTYPE_INLINE_DEFINED
326 #endif
327
328 #if !defined(_POSIX_) || defined(__GNUC__)
329 #ifndef _INO_T_DEFINED
330 #define _INO_T_DEFINED
331 typedef unsigned short _ino_t;
332 #ifndef NO_OLDNAMES
333 typedef unsigned short ino_t;
334 #endif
335 #endif
336
337 #ifndef _DEV_T_DEFINED
338 #define _DEV_T_DEFINED
339 typedef unsigned int _dev_t;
340 #ifndef NO_OLDNAMES
341 typedef unsigned int dev_t;
342 #endif
343 #endif
344
345 #ifndef _OFF_T_DEFINED
346 #define _OFF_T_DEFINED
347 typedef long _off_t;
348 #ifndef NO_OLDNAMES
349 typedef long off_t;
350 #endif
351 #endif
352
353 #ifndef _OFF64_T_DEFINED
354 #define _OFF64_T_DEFINED
355 __MINGW_EXTENSION typedef long long _off64_t;
356 #ifndef NO_OLDNAMES
357 __MINGW_EXTENSION typedef long long off64_t;
358 #endif
359 #endif
360
361 #ifndef _STAT_DEFINED
362 #define _STAT_DEFINED
363
364 struct _stat32 {
365 _dev_t st_dev;
366 _ino_t st_ino;
367 unsigned short st_mode;
368 short st_nlink;
369 short st_uid;
370 short st_gid;
371 _dev_t st_rdev;
372 _off_t st_size;
373 __time32_t st_atime;
374 __time32_t st_mtime;
375 __time32_t st_ctime;
376 };
377
378 struct _stat {
379 _dev_t st_dev;
380 _ino_t st_ino;
381 unsigned short st_mode;
382 short st_nlink;
383 short st_uid;
384 short st_gid;
385 _dev_t st_rdev;
386 _off_t st_size;
387 time_t st_atime;
388 time_t st_mtime;
389 time_t st_ctime;
390 };
391
392 #ifndef NO_OLDNAMES
393 struct stat {
394 _dev_t st_dev;
395 _ino_t st_ino;
396 unsigned short st_mode;
397 short st_nlink;
398 short st_uid;
399 short st_gid;
400 _dev_t st_rdev;
401 _off_t st_size;
402 time_t st_atime;
403 time_t st_mtime;
404 time_t st_ctime;
405 };
406 #endif
407
408 #if _INTEGRAL_MAX_BITS >= 64
409
410 struct _stat32i64 {
411 _dev_t st_dev;
412 _ino_t st_ino;
413 unsigned short st_mode;
414 short st_nlink;
415 short st_uid;
416 short st_gid;
417 _dev_t st_rdev;
418 __MINGW_EXTENSION __int64 st_size;
419 __time32_t st_atime;
420 __time32_t st_mtime;
421 __time32_t st_ctime;
422 };
423
424 struct _stat64i32 {
425 _dev_t st_dev;
426 _ino_t st_ino;
427 unsigned short st_mode;
428 short st_nlink;
429 short st_uid;
430 short st_gid;
431 _dev_t st_rdev;
432 _off_t st_size;
433 __time64_t st_atime;
434 __time64_t st_mtime;
435 __time64_t st_ctime;
436 };
437
438 struct _stat64 {
439 _dev_t st_dev;
440 _ino_t st_ino;
441 unsigned short st_mode;
442 short st_nlink;
443 short st_uid;
444 short st_gid;
445 _dev_t st_rdev;
446 __MINGW_EXTENSION __int64 st_size;
447 __time64_t st_atime;
448 __time64_t st_mtime;
449 __time64_t st_ctime;
450 };
451 #endif
452
453 #define __stat64 _stat64
454
455 #endif
456
457 #ifndef _WSTAT_DEFINED
458 #define _WSTAT_DEFINED
459 _CRTIMP int __cdecl _wstat(const wchar_t *_Name,struct _stat *_Stat);
460 _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
461 #if _INTEGRAL_MAX_BITS >= 64
462 _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
463 _CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
464 _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
465 #endif
466 #endif
467 #endif
468
469 #ifndef _WCONIO_DEFINED
470 #define _WCONIO_DEFINED
471 _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
472 _CRTIMP wint_t __cdecl _getwch(void);
473 _CRTIMP wint_t __cdecl _getwche(void);
474 _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
475 _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
476 _CRTIMP int __cdecl _cputws(const wchar_t *_String);
477 _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
478 _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
479 _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
480 _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
481 _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
482 _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
483
484 _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
485 _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
486 _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
487 _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
488 wint_t __cdecl _putwch_nolock(wchar_t _WCh);
489 wint_t __cdecl _getwch_nolock(void);
490 wint_t __cdecl _getwche_nolock(void);
491 wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
492 #endif
493
494 #ifndef _WSTDIO_DEFINED
495 #define _WSTDIO_DEFINED
496
497 #ifdef _POSIX_
498 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
499 #else
500 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
501 #endif
502
503 _CRTIMP_ALT wint_t __cdecl fgetwc(FILE *_File);
504 _CRTIMP wint_t __cdecl _fgetwchar(void);
505 _CRTIMP wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
506 _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
507 _CRTIMP wint_t __cdecl getwc(FILE *_File);
508 _CRTIMP wint_t __cdecl getwchar(void);
509 _CRTIMP wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
510 _CRTIMP wint_t __cdecl putwchar(wchar_t _Ch);
511 _CRTIMP_ALT wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
512 _CRTIMP wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
513 _CRTIMP int __cdecl fputws(const wchar_t *_Str,FILE *_File);
514 _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
515 _CRTIMP int __cdecl _putws(const wchar_t *_Str);
516 _CRTIMP int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
517 _CRTIMP int __cdecl wprintf(const wchar_t *_Format,...);
518 _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
519 _CRTIMP int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
520 _CRTIMP int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
521 _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
522 _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
523 _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
524 _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
525 _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
526 _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
527 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
528 _CRTIMP int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
529 __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
530 _CRTIMP int __cdecl vwscanf (const wchar_t *, va_list);
531 _CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
532 _CRTIMP int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
533 #endif
534 _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
535 _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
536 _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
537 _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
538 _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
539 _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
540 _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
541 _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
542 _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
543 _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
544 _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
545 _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
546 _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
547 _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
548 _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
549 _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
550 _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
551 _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
552 _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
553 _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
554 _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
555 _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
556 _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
557 _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
558 _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
559 _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
560 _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
561 _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
562 _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
563
564 #ifdef _CRT_NON_CONFORMING_SWPRINTFS
565 #ifndef __cplusplus
566 #define swprintf _swprintf
567 #define vswprintf _vswprintf
568 #define _swprintf_l __swprintf_l
569 #define _vswprintf_l __vswprintf_l
570 #endif
571 #endif
572
573 _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
574 _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
575 _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
576 int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
577 _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
578 int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
579 _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
580 _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
581 _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
582 int __cdecl wscanf(const wchar_t *_Format,...);
583 _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
584 _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
585 _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
586 _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
587
588 #ifndef _CRT_WPERROR_DEFINED
589 #define _CRT_WPERROR_DEFINED
590 _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
591 #endif
592 _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
593 #if !defined(NO_OLDNAMES) && !defined(wpopen)
594 #define wpopen _wpopen
595 #endif
596 _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
597 _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
598 _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
599 _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
600 _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
601
602 #undef _CRT_GETPUTWCHAR_NOINLINE
603
604 #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
605 #define getwchar() fgetwc(stdin)
606 #define putwchar(_c) fputwc((_c),stdout)
607 #else
608 __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
609 __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
610 #endif
611
612 #define getwc(_stm) fgetwc(_stm)
613 #define putwc(_c,_stm) fputwc(_c,_stm)
614 #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
615 #define _getwc_nolock(_c) _fgetwc_nolock(_c)
616 #endif
617
618 #ifndef _WSTDLIB_DEFINED
619 #define _WSTDLIB_DEFINED
620
621 _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
622 _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
623 _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
624 double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
625 _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
626 float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
627 #if !defined __NO_ISOCEXT /* in libmingwex.a */
628 float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
629 long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
630 #endif /* __NO_ISOCEXT */
631 long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
632 _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
633 unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
634 _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
635 _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
636 #ifndef _CRT_WSYSTEM_DEFINED
637 #define _CRT_WSYSTEM_DEFINED
638 _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
639 #endif
640 _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
641 _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
642 _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
643 _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
644 _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
645 _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
646
647 #if _INTEGRAL_MAX_BITS >= 64
648 __MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
649 __MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
650 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
651 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
652 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
653 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
654 __MINGW_EXTENSION _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
655 __MINGW_EXTENSION _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
656 #endif
657 #endif
658
659 #ifndef _POSIX_
660 #ifndef _WSTDLIBP_DEFINED
661 #define _WSTDLIBP_DEFINED
662 _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
663 _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
664 #ifndef _CRT_WPERROR_DEFINED
665 #define _CRT_WPERROR_DEFINED
666 _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
667 #endif
668 _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
669 _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
670 _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
671 #endif
672 #endif
673
674 #ifndef _WSTRING_DEFINED
675 #define _WSTRING_DEFINED
676 _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
677 wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
678 _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
679 int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
680 wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
681 size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
682 size_t __cdecl wcslen(const wchar_t *_Str);
683 size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
684 wchar_t *__cdecl wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
685 int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
686 wchar_t *__cdecl wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
687 _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
688 _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
689 size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
690 _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
691 wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
692 _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
693 _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
694 _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
695 _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
696 _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
697 _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
698 _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
699 _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
700 _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
701 _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
702 _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
703 _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
704 _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
705 size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
706 _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
707 int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
708 _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
709 _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
710 _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
711 _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
712 _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
713 _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
714 _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
715
716 #ifndef NO_OLDNAMES
717 _CRTIMP wchar_t *__cdecl wcsdup(const wchar_t *_Str);
718 #define wcswcs wcsstr
719 _CRTIMP int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
720 _CRTIMP int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
721 _CRTIMP wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
722 _CRTIMP wchar_t *__cdecl wcsrev(wchar_t *_Str);
723 _CRTIMP wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
724 _CRTIMP wchar_t *__cdecl wcslwr(wchar_t *_Str);
725 _CRTIMP wchar_t *__cdecl wcsupr(wchar_t *_Str);
726 _CRTIMP int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
727 #endif
728 #endif
729
730 #ifndef _TM_DEFINED
731 #define _TM_DEFINED
732 struct tm {
733 int tm_sec;
734 int tm_min;
735 int tm_hour;
736 int tm_mday;
737 int tm_mon;
738 int tm_year;
739 int tm_wday;
740 int tm_yday;
741 int tm_isdst;
742 };
743 #endif
744
745 #ifndef _WTIME_DEFINED
746 #define _WTIME_DEFINED
747
748 _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
749 _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
750 size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
751 _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
752 _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
753 _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
754 #if _INTEGRAL_MAX_BITS >= 64
755 _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
756 #endif
757
758 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
759 #define _INC_WTIME_INL
760 #ifdef _USE_32BIT_TIME_T
761 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
762 #else
763 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
764 #endif
765 #endif
766 #endif
767
768 typedef int mbstate_t;
769 typedef wchar_t _Wint_t;
770
771 wint_t __cdecl btowc(int);
772 size_t __cdecl mbrlen(const char *_Ch,size_t _SizeInBytes,mbstate_t *_State);
773 size_t __cdecl mbrtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SizeInBytes,mbstate_t *_State);
774 size_t __cdecl mbsrtowcs(wchar_t *_Dest,const char **_PSrc,size_t _Count,mbstate_t *_State);
775 size_t __cdecl wcrtomb(char *_Dest,wchar_t _Source,mbstate_t *_State);
776 size_t __cdecl wcsrtombs(char *_Dest,const wchar_t **_PSource,size_t _Count,mbstate_t *_State);
777 int __cdecl wctob(wint_t _WCh);
778
779 #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
780 wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n);
781 _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n);
782 int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);
783 wchar_t *__cdecl wmemcpy(wchar_t *s1,const wchar_t *s2,size_t n);
784 wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
785 __MINGW_EXTENSION long long __cdecl wcstoll(const wchar_t *nptr,wchar_t **endptr, int base);
786 __MINGW_EXTENSION unsigned long long __cdecl wcstoull(const wchar_t *nptr,wchar_t **endptr, int base);
787 #endif /* __NO_ISOCEXT */
788
789 void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount);
790 void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _MaxCount);
791 __CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); }
792 __CRT_INLINE int __cdecl mbsinit(const mbstate_t *_P) { return (!_P || *_P==0); }
793 __CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) { for (;0<_N;++_S,--_N) if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S); return (0); }
794 __CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) { for (; 0 < _N; ++_S1,++_S2,--_N) if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1); return (0); }
795 __CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t)); }
796 __CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); }
797 __CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) {
798 wchar_t *_Su = _S;
799 for (;0<_N;++_Su,--_N) {
800 *_Su = _C;
801 }
802 return (_S);
803 }
804
805 #ifdef _MSC_VER
806 #pragma warning(pop)
807 #endif
808
809 #ifdef __cplusplus
810 }
811 #endif
812
813 #pragma pack(pop)
814
815 //#include <sec_api/wchar_s.h>
816 #endif