[CLASSPNP] Fix MSVC build. Brought to you by Timo.
[reactos.git] / reactos / sdk / 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 _Check_return_ _CRTIMP int __cdecl iswalpha(_In_ wint_t _C);
187 _Check_return_ _CRTIMP int __cdecl _iswalpha_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
188 _Check_return_ _CRTIMP int __cdecl iswupper(_In_ wint_t _C);
189 _Check_return_ _CRTIMP int __cdecl _iswupper_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
190 _Check_return_ _CRTIMP int __cdecl iswlower(_In_ wint_t _C);
191 _Check_return_ _CRTIMP int __cdecl _iswlower_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
192 _Check_return_ _CRTIMP int __cdecl iswdigit(_In_ wint_t _C);
193 _Check_return_ _CRTIMP int __cdecl _iswdigit_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
194 _Check_return_ _CRTIMP int __cdecl iswxdigit(_In_ wint_t _C);
195 _Check_return_ _CRTIMP int __cdecl _iswxdigit_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
196 _Check_return_ _CRTIMP int __cdecl iswspace(_In_ wint_t _C);
197 _Check_return_ _CRTIMP int __cdecl _iswspace_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
198 _Check_return_ _CRTIMP int __cdecl iswpunct(_In_ wint_t _C);
199 _Check_return_ _CRTIMP int __cdecl _iswpunct_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
200 _Check_return_ _CRTIMP int __cdecl iswalnum(_In_ wint_t _C);
201 _Check_return_ _CRTIMP int __cdecl _iswalnum_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
202 _Check_return_ _CRTIMP int __cdecl iswprint(_In_ wint_t _C);
203 _Check_return_ _CRTIMP int __cdecl _iswprint_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
204 _Check_return_ _CRTIMP int __cdecl iswgraph(_In_ wint_t _C);
205 _Check_return_ _CRTIMP int __cdecl _iswgraph_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
206 _Check_return_ _CRTIMP int __cdecl iswcntrl(_In_ wint_t _C);
207 _Check_return_ _CRTIMP int __cdecl _iswcntrl_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
208 _Check_return_ _CRTIMP int __cdecl iswascii(_In_ wint_t _C);
209 _Check_return_ _CRTIMP int __cdecl isleadbyte(_In_ int _C);
210 _Check_return_ _CRTIMP int __cdecl _isleadbyte_l(_In_ int _C, _In_opt_ _locale_t _Locale);
211 _Check_return_ _CRTIMP wint_t __cdecl towupper(_In_ wint_t _C);
212 _Check_return_ _CRTIMP wint_t __cdecl _towupper_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
213 _Check_return_ _CRTIMP wint_t __cdecl towlower(_In_ wint_t _C);
214 _Check_return_ _CRTIMP wint_t __cdecl _towlower_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
215 _Check_return_ _CRTIMP int __cdecl iswctype(_In_ wint_t _C, _In_ wctype_t _Type);
216 _Check_return_ _CRTIMP int __cdecl _iswctype_l(_In_ wint_t _C, _In_ wctype_t _Type, _In_opt_ _locale_t _Locale);
217 _Check_return_ _CRTIMP int __cdecl __iswcsymf(_In_ wint_t _C);
218 _Check_return_ _CRTIMP int __cdecl _iswcsymf_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
219 _Check_return_ _CRTIMP int __cdecl __iswcsym(_In_ wint_t _C);
220 _Check_return_ _CRTIMP int __cdecl _iswcsym_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
221 _CRTIMP int __cdecl is_wctype(_In_ wint_t _C, _In_ wctype_t _Type);
222
223 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
224 _CRTIMP int __cdecl iswblank(wint_t _C);
225 #endif
226 #endif
227
228 #ifndef _WDIRECT_DEFINED
229 #define _WDIRECT_DEFINED
230
231 _Check_return_
232 _Ret_opt_z_
233 _CRTIMP
234 wchar_t*
235 __cdecl
236 _wgetcwd(
237 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
238 _In_ int _SizeInWords);
239
240 _Check_return_
241 _Ret_opt_z_
242 _CRTIMP
243 wchar_t*
244 __cdecl
245 _wgetdcwd(
246 _In_ int _Drive,
247 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
248 _In_ int _SizeInWords);
249
250 _Check_return_
251 _Ret_opt_z_
252 wchar_t*
253 __cdecl
254 _wgetdcwd_nolock(
255 _In_ int _Drive,
256 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
257 _In_ int _SizeInWords);
258
259 _Check_return_
260 _CRTIMP
261 int
262 __cdecl
263 _wchdir(
264 _In_z_ const wchar_t *_Path);
265
266 _Check_return_
267 _CRTIMP
268 int
269 __cdecl
270 _wmkdir(
271 _In_z_ const wchar_t *_Path);
272
273 _Check_return_
274 _CRTIMP
275 int
276 __cdecl
277 _wrmdir(
278 _In_z_ const wchar_t *_Path);
279
280 #endif /* _WDIRECT_DEFINED */
281
282 #ifndef _WIO_DEFINED
283 #define _WIO_DEFINED
284
285 _Check_return_
286 _CRTIMP
287 int
288 __cdecl
289 _waccess(
290 _In_z_ const wchar_t *_Filename,
291 _In_ int _AccessMode);
292
293 _Check_return_
294 _CRTIMP
295 int
296 __cdecl
297 _wchmod(
298 _In_z_ const wchar_t *_Filename,
299 _In_ int _Mode);
300
301 _Check_return_
302 _CRTIMP
303 int
304 __cdecl
305 _wcreat(
306 _In_z_ const wchar_t *_Filename,
307 _In_ int _PermissionMode);
308
309 _Check_return_
310 _CRTIMP
311 intptr_t
312 __cdecl
313 _wfindfirst32(
314 _In_z_ const wchar_t *_Filename,
315 _Out_ struct _wfinddata32_t *_FindData);
316
317 _Check_return_
318 _CRTIMP
319 int
320 __cdecl
321 _wfindnext32(
322 _In_ intptr_t _FindHandle,
323 _Out_ struct _wfinddata32_t *_FindData);
324
325 _Check_return_
326 _CRTIMP
327 int
328 __cdecl
329 _wunlink(
330 _In_z_ const wchar_t *_Filename);
331
332 _Check_return_
333 _CRTIMP
334 int
335 __cdecl
336 _wrename(
337 _In_z_ const wchar_t *_OldFilename,
338 _In_z_ const wchar_t *_NewFilename);
339
340 _CRTIMP
341 wchar_t*
342 __cdecl
343 _wmktemp(
344 _Inout_z_ wchar_t *_TemplateName);
345
346 #if _INTEGRAL_MAX_BITS >= 64
347
348 _Check_return_
349 _CRTIMP
350 intptr_t
351 __cdecl
352 _wfindfirst32i64(
353 _In_z_ const wchar_t *_Filename,
354 _Out_ struct _wfinddata32i64_t *_FindData);
355
356 _Check_return_
357 _CRTIMP
358 intptr_t
359 __cdecl
360 _wfindfirst64i32(
361 _In_z_ const wchar_t *_Filename,
362 _Out_ struct _wfinddata64i32_t *_FindData);
363
364 _Check_return_
365 _CRTIMP
366 intptr_t
367 __cdecl
368 _wfindfirst64(
369 _In_z_ const wchar_t *_Filename,
370 _Out_ struct _wfinddata64_t *_FindData);
371
372 _Check_return_
373 _CRTIMP
374 int
375 __cdecl
376 _wfindnext32i64(
377 _In_ intptr_t _FindHandle,
378 _Out_ struct _wfinddata32i64_t *_FindData);
379
380 _Check_return_
381 _CRTIMP
382 int
383 __cdecl
384 _wfindnext64i32(
385 _In_ intptr_t _FindHandle,
386 _Out_ struct _wfinddata64i32_t *_FindData);
387
388 _Check_return_
389 _CRTIMP
390 int
391 __cdecl
392 _wfindnext64(
393 _In_ intptr_t _FindHandle,
394 _Out_ struct _wfinddata64_t *_FindData);
395
396 #endif /* _INTEGRAL_MAX_BITS >= 64 */
397
398 _Check_return_wat_
399 _CRTIMP
400 errno_t
401 __cdecl
402 _wsopen_s(
403 _Out_ int *_FileHandle,
404 _In_z_ const wchar_t *_Filename,
405 _In_ int _OpenFlag,
406 _In_ int _ShareFlag,
407 _In_ int _PermissionFlag);
408
409 #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
410 _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
411 _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
412 #else
413 extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
414 extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
415 #endif
416
417 #endif /* !_WIO_DEFINED */
418
419 #ifndef _WLOCALE_DEFINED
420 #define _WLOCALE_DEFINED
421 _Check_return_opt_
422 _CRTIMP
423 wchar_t*
424 __cdecl
425 _wsetlocale(
426 _In_ int _Category,
427 _In_opt_z_ const wchar_t *_Locale);
428 #endif
429
430 #ifndef _WPROCESS_DEFINED
431 #define _WPROCESS_DEFINED
432
433 _CRTIMP
434 intptr_t
435 __cdecl
436 _wexecl(
437 _In_z_ const wchar_t *_Filename,
438 _In_z_ const wchar_t *_ArgList,
439 ...);
440
441 _CRTIMP
442 intptr_t
443 __cdecl
444 _wexecle(
445 _In_z_ const wchar_t *_Filename,
446 _In_z_ const wchar_t *_ArgList,
447 ...);
448
449 _CRTIMP
450 intptr_t
451 __cdecl
452 _wexeclp(
453 _In_z_ const wchar_t *_Filename,
454 _In_z_ const wchar_t *_ArgList,
455 ...);
456
457 _CRTIMP
458 intptr_t
459 __cdecl
460 _wexeclpe(
461 _In_z_ const wchar_t *_Filename,
462 _In_z_ const wchar_t *_ArgList,
463 ...);
464
465 _CRTIMP
466 intptr_t
467 __cdecl
468 _wexecv(
469 _In_z_ const wchar_t *_Filename,
470 _In_z_ const wchar_t *const *_ArgList);
471
472 _CRTIMP
473 intptr_t
474 __cdecl
475 _wexecve(
476 _In_z_ const wchar_t *_Filename,
477 _In_z_ const wchar_t *const *_ArgList,
478 _In_opt_z_ const wchar_t *const *_Env);
479
480 _CRTIMP
481 intptr_t
482 __cdecl
483 _wexecvp(
484 _In_z_ const wchar_t *_Filename,
485 _In_z_ const wchar_t *const *_ArgList);
486
487 _CRTIMP
488 intptr_t
489 __cdecl
490 _wexecvpe(
491 _In_z_ const wchar_t *_Filename,
492 _In_z_ const wchar_t *const *_ArgList,
493 _In_opt_z_ const wchar_t *const *_Env);
494
495 _CRTIMP
496 intptr_t
497 __cdecl
498 _wspawnl(
499 _In_ int _Mode,
500 _In_z_ const wchar_t *_Filename,
501 _In_z_ const wchar_t *_ArgList,
502 ...);
503
504 _CRTIMP
505 intptr_t
506 __cdecl
507 _wspawnle(
508 _In_ int _Mode,
509 _In_z_ const wchar_t *_Filename,
510 _In_z_ const wchar_t *_ArgList,
511 ...);
512
513 _CRTIMP
514 intptr_t
515 __cdecl
516 _wspawnlp(
517 _In_ int _Mode,
518 _In_z_ const wchar_t *_Filename,
519 _In_z_ const wchar_t *_ArgList,
520 ...);
521
522 _CRTIMP
523 intptr_t
524 __cdecl
525 _wspawnlpe(
526 _In_ int _Mode,
527 _In_z_ const wchar_t *_Filename,
528 _In_z_ const wchar_t *_ArgList,
529 ...);
530
531 _CRTIMP
532 intptr_t
533 __cdecl
534 _wspawnv(
535 _In_ int _Mode,
536 _In_z_ const wchar_t *_Filename,
537 _In_z_ const wchar_t *const *_ArgList);
538
539 _CRTIMP
540 intptr_t
541 __cdecl
542 _wspawnve(
543 _In_ int _Mode,
544 _In_z_ const wchar_t *_Filename,
545 _In_z_ const wchar_t *const *_ArgList,
546 _In_opt_z_ const wchar_t *const *_Env);
547
548 _CRTIMP
549 intptr_t
550 __cdecl
551 _wspawnvp(
552 _In_ int _Mode,
553 _In_z_ const wchar_t *_Filename,
554 _In_z_ const wchar_t *const *_ArgList);
555
556 _CRTIMP
557 intptr_t
558 __cdecl
559 _wspawnvpe(
560 _In_ int _Mode,
561 _In_z_ const wchar_t *_Filename,
562 _In_z_ const wchar_t *const *_ArgList,
563 _In_opt_z_ const wchar_t *const *_Env);
564
565 #ifndef _CRT_WSYSTEM_DEFINED
566 #define _CRT_WSYSTEM_DEFINED
567 _CRTIMP
568 int
569 __cdecl
570 _wsystem(
571 _In_opt_z_ const wchar_t *_Command);
572 #endif /* !_CRT_WSYSTEM_DEFINED */
573
574 #endif /* !_WPROCESS_DEFINED */
575
576 #ifndef _WCTYPE_INLINE_DEFINED
577 #undef _CRT_WCTYPE_NOINLINE
578 #if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
579 #define iswalpha(_c) (iswctype(_c,_ALPHA))
580 #define iswupper(_c) (iswctype(_c,_UPPER))
581 #define iswlower(_c) (iswctype(_c,_LOWER))
582 #define iswdigit(_c) (iswctype(_c,_DIGIT))
583 #define iswxdigit(_c) (iswctype(_c,_HEX))
584 #define iswspace(_c) (iswctype(_c,_SPACE))
585 #define iswpunct(_c) (iswctype(_c,_PUNCT))
586 #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
587 #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
588 #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
589 #define iswcntrl(_c) (iswctype(_c,_CONTROL))
590 #define iswascii(_c) ((unsigned)(_c) < 0x80)
591
592 #define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
593 #define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
594 #define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
595 #define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
596 #define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
597 #define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
598 #define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
599 #define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
600 #define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
601 #define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
602 #define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
603 #ifndef _CTYPE_DISABLE_MACROS
604 #define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
605 #endif
606 #endif
607 #define _WCTYPE_INLINE_DEFINED
608 #endif
609
610 #if !defined(_POSIX_) || defined(__GNUC__)
611 #ifndef _INO_T_DEFINED
612 #define _INO_T_DEFINED
613 typedef unsigned short _ino_t;
614 #ifndef NO_OLDNAMES
615 typedef unsigned short ino_t;
616 #endif
617 #endif
618
619 #ifndef _DEV_T_DEFINED
620 #define _DEV_T_DEFINED
621 typedef unsigned int _dev_t;
622 #ifndef NO_OLDNAMES
623 typedef unsigned int dev_t;
624 #endif
625 #endif
626
627 #ifndef _OFF_T_DEFINED
628 #define _OFF_T_DEFINED
629 typedef long _off_t;
630 #ifndef NO_OLDNAMES
631 typedef long off_t;
632 #endif
633 #endif
634
635 #ifndef _OFF64_T_DEFINED
636 #define _OFF64_T_DEFINED
637 __MINGW_EXTENSION typedef long long _off64_t;
638 #ifndef NO_OLDNAMES
639 __MINGW_EXTENSION typedef long long off64_t;
640 #endif
641 #endif
642
643 #ifndef _STAT_DEFINED
644 #define _STAT_DEFINED
645
646 struct _stat32 {
647 _dev_t st_dev;
648 _ino_t st_ino;
649 unsigned short st_mode;
650 short st_nlink;
651 short st_uid;
652 short st_gid;
653 _dev_t st_rdev;
654 _off_t st_size;
655 __time32_t st_atime;
656 __time32_t st_mtime;
657 __time32_t st_ctime;
658 };
659
660 struct _stat {
661 _dev_t st_dev;
662 _ino_t st_ino;
663 unsigned short st_mode;
664 short st_nlink;
665 short st_uid;
666 short st_gid;
667 _dev_t st_rdev;
668 _off_t st_size;
669 time_t st_atime;
670 time_t st_mtime;
671 time_t st_ctime;
672 };
673
674 #ifndef NO_OLDNAMES
675 struct stat {
676 _dev_t st_dev;
677 _ino_t st_ino;
678 unsigned short st_mode;
679 short st_nlink;
680 short st_uid;
681 short st_gid;
682 _dev_t st_rdev;
683 _off_t st_size;
684 time_t st_atime;
685 time_t st_mtime;
686 time_t st_ctime;
687 };
688 #endif
689
690 #if _INTEGRAL_MAX_BITS >= 64
691
692 struct _stat32i64 {
693 _dev_t st_dev;
694 _ino_t st_ino;
695 unsigned short st_mode;
696 short st_nlink;
697 short st_uid;
698 short st_gid;
699 _dev_t st_rdev;
700 __MINGW_EXTENSION __int64 st_size;
701 __time32_t st_atime;
702 __time32_t st_mtime;
703 __time32_t st_ctime;
704 };
705
706 struct _stat64i32 {
707 _dev_t st_dev;
708 _ino_t st_ino;
709 unsigned short st_mode;
710 short st_nlink;
711 short st_uid;
712 short st_gid;
713 _dev_t st_rdev;
714 _off_t st_size;
715 __time64_t st_atime;
716 __time64_t st_mtime;
717 __time64_t st_ctime;
718 };
719
720 struct _stat64 {
721 _dev_t st_dev;
722 _ino_t st_ino;
723 unsigned short st_mode;
724 short st_nlink;
725 short st_uid;
726 short st_gid;
727 _dev_t st_rdev;
728 __MINGW_EXTENSION __int64 st_size;
729 __time64_t st_atime;
730 __time64_t st_mtime;
731 __time64_t st_ctime;
732 };
733 #endif
734
735 #define __stat64 _stat64
736
737 #endif
738
739 #ifndef _WSTAT_DEFINED
740 #define _WSTAT_DEFINED
741
742 _CRTIMP
743 int
744 __cdecl
745 _wstat(
746 _In_z_ const wchar_t *_Name,
747 _Out_ struct _stat *_Stat);
748
749 _CRTIMP
750 int
751 __cdecl
752 _wstat32(
753 _In_z_ const wchar_t *_Name,
754 _Out_ struct _stat32 *_Stat);
755
756 #if _INTEGRAL_MAX_BITS >= 64
757
758 _CRTIMP
759 int
760 __cdecl
761 _wstat32i64(
762 _In_z_ const wchar_t *_Name,
763 _Out_ struct _stat32i64 *_Stat);
764
765 _CRTIMP
766 int
767 __cdecl
768 _wstat64i32(
769 _In_z_ const wchar_t *_Name,
770 _Out_ struct _stat64i32 *_Stat);
771
772 _CRTIMP
773 int
774 __cdecl
775 _wstat64(
776 _In_z_ const wchar_t *_Name,
777 _Out_ struct _stat64 *_Stat);
778
779 #endif /* _INTEGRAL_MAX_BITS >= 64 */
780
781 #endif /* _WSTAT_DEFINED */
782
783 #endif /* !defined(_POSIX_) || defined(__GNUC__) */
784
785 #ifndef _WCONIO_DEFINED
786 #define _WCONIO_DEFINED
787
788 _CRTIMP
789 wchar_t*
790 _cgetws(
791 _Inout_z_ wchar_t *_Buffer);
792
793 _Check_return_
794 _CRTIMP
795 wint_t
796 __cdecl
797 _getwch(void);
798
799 _Check_return_
800 _CRTIMP
801 wint_t
802 __cdecl
803 _getwche(void);
804
805 _Check_return_
806 _CRTIMP
807 wint_t
808 __cdecl
809 _putwch(
810 wchar_t _WCh);
811
812 _Check_return_
813 _CRTIMP
814 wint_t
815 __cdecl
816 _ungetwch(
817 wint_t _WCh);
818
819 _Check_return_opt_
820 _CRTIMP
821 int
822 __cdecl
823 _cputws(
824 _In_z_ const wchar_t *_String);
825
826 _Check_return_opt_
827 _CRTIMP
828 int
829 __cdecl
830 _cwprintf(
831 _In_z_ _Printf_format_string_ const wchar_t *_Format,
832 ...);
833
834 _Check_return_opt_
835 _CRTIMP
836 int
837 __cdecl
838 _cwscanf(
839 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
840 ...);
841
842 _Check_return_opt_
843 _CRTIMP
844 int
845 __cdecl
846 _cwscanf_l(
847 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
848 _In_opt_ _locale_t _Locale,
849 ...);
850
851 _Check_return_opt_
852 _CRTIMP
853 int
854 __cdecl
855 _vcwprintf(
856 _In_z_ _Printf_format_string_ const wchar_t *_Format,
857 va_list _ArgList);
858
859 _Check_return_opt_
860 _CRTIMP
861 int
862 __cdecl
863 _cwprintf_p(
864 _In_z_ _Printf_format_string_ const wchar_t *_Format,
865 ...);
866
867 _Check_return_opt_
868 _CRTIMP
869 int
870 __cdecl
871 _vcwprintf_p(
872 _In_z_ _Printf_format_string_ const wchar_t *_Format,
873 va_list _ArgList);
874
875 _CRTIMP
876 int
877 __cdecl
878 _cwprintf_l(
879 _In_z_ _Printf_format_string_ const wchar_t *_Format,
880 _In_opt_ _locale_t _Locale,
881 ...);
882
883 _CRTIMP
884 int
885 __cdecl
886 _vcwprintf_l(
887 _In_z_ _Printf_format_string_ const wchar_t *_Format,
888 _In_opt_ _locale_t _Locale,
889 va_list _ArgList);
890
891 _CRTIMP
892 int
893 __cdecl
894 _cwprintf_p_l(
895 _In_z_ _Printf_format_string_ const wchar_t *_Format,
896 _In_opt_ _locale_t _Locale,
897 ...);
898
899 _CRTIMP
900 int
901 __cdecl
902 _vcwprintf_p_l(
903 _In_z_ _Printf_format_string_ const wchar_t *_Format,
904 _In_opt_ _locale_t _Locale,
905 va_list _ArgList);
906
907 _Check_return_opt_
908 wint_t
909 __cdecl
910 _putwch_nolock(
911 wchar_t _WCh);
912
913 _Check_return_
914 wint_t
915 __cdecl
916 _getwch_nolock(void);
917
918 _Check_return_
919 wint_t
920 __cdecl
921 _getwche_nolock(void);
922
923 _Check_return_opt_
924 wint_t
925 __cdecl
926 _ungetwch_nolock(
927 wint_t _WCh);
928
929 #endif /* _WCONIO_DEFINED */
930
931 #ifndef _WSTDIO_DEFINED
932 #define _WSTDIO_DEFINED
933
934 #ifdef _POSIX_
935 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
936 #else
937 _Check_return_
938 _CRTIMP
939 FILE*
940 __cdecl
941 _wfsopen(
942 _In_z_ const wchar_t *_Filename,
943 _In_z_ const wchar_t *_Mode,
944 _In_ int _ShFlag);
945 #endif
946
947 _Check_return_opt_
948 _CRTIMP_ALT
949 wint_t
950 __cdecl
951 fgetwc(
952 _Inout_ FILE *_File);
953
954 _Check_return_opt_
955 _CRTIMP
956 wint_t
957 __cdecl
958 _fgetwchar(void);
959
960 _Check_return_opt_
961 _CRTIMP
962 wint_t
963 __cdecl
964 fputwc(
965 _In_ wchar_t _Ch,
966 _Inout_ FILE *_File);
967
968 _Check_return_opt_
969 _CRTIMP
970 wint_t
971 __cdecl
972 _fputwchar(
973 _In_ wchar_t _Ch);
974
975 _Check_return_
976 _CRTIMP
977 wint_t
978 __cdecl
979 getwc(
980 _Inout_ FILE *_File);
981
982 _Check_return_
983 _CRTIMP
984 wint_t
985 __cdecl
986 getwchar(void);
987
988 _Check_return_opt_
989 _CRTIMP
990 wint_t
991 __cdecl
992 putwc(
993 _In_ wchar_t _Ch,
994 _Inout_ FILE *_File);
995
996 _Check_return_opt_
997 _CRTIMP
998 wint_t
999 __cdecl
1000 putwchar(
1001 _In_ wchar_t _Ch);
1002
1003 _Check_return_opt_
1004 _CRTIMP_ALT
1005 wint_t
1006 __cdecl
1007 ungetwc(
1008 _In_ wint_t _Ch,
1009 _Inout_ FILE *_File);
1010
1011 _Check_return_opt_
1012 _CRTIMP
1013 wchar_t*
1014 __cdecl
1015 fgetws(
1016 _Out_writes_z_(_SizeInWords) wchar_t *_Dst,
1017 _In_ int _SizeInWords,
1018 _Inout_ FILE *_File);
1019
1020 _Check_return_opt_
1021 _CRTIMP
1022 int
1023 __cdecl
1024 fputws(
1025 _In_z_ const wchar_t *_Str,
1026 _Inout_ FILE *_File);
1027
1028 _CRTIMP
1029 wchar_t*
1030 __cdecl
1031 _getws(
1032 _Pre_notnull_ _Post_z_ wchar_t *_String);
1033
1034 _Check_return_opt_
1035 _CRTIMP
1036 int
1037 __cdecl
1038 _putws(
1039 _In_z_ const wchar_t *_Str);
1040
1041 _Check_return_opt_
1042 _CRTIMP
1043 int
1044 __cdecl
1045 fwprintf(
1046 _Inout_ FILE *_File,
1047 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1048 ...);
1049
1050 _Check_return_opt_
1051 _CRTIMP
1052 int
1053 __cdecl
1054 wprintf(
1055 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1056 ...);
1057
1058 _Check_return_
1059 _CRTIMP
1060 int
1061 __cdecl
1062 _scwprintf(
1063 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1064 ...);
1065
1066 _Check_return_opt_
1067 _CRTIMP
1068 int
1069 __cdecl
1070 vfwprintf(
1071 _Inout_ FILE *_File,
1072 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1073 va_list _ArgList);
1074
1075 _Check_return_opt_
1076 _CRTIMP
1077 int
1078 __cdecl
1079 vwprintf(
1080 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1081 va_list _ArgList);
1082
1083 _CRTIMP
1084 int
1085 __cdecl
1086 swprintf(
1087 _Out_ wchar_t*,
1088 const wchar_t*,
1089 ...);
1090
1091 _CRTIMP
1092 int
1093 __cdecl
1094 vswprintf(
1095 _Out_ wchar_t*,
1096 const wchar_t*,
1097 va_list);
1098
1099 _Check_return_opt_
1100 _CRTIMP
1101 int
1102 __cdecl
1103 _swprintf_c(
1104 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
1105 _In_ size_t _SizeInWords,
1106 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1107 ...);
1108
1109 _Check_return_opt_
1110 _CRTIMP
1111 int
1112 __cdecl
1113 _vswprintf_c(
1114 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
1115 _In_ size_t _SizeInWords,
1116 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1117 va_list _ArgList);
1118
1119 _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
1120 _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
1121
1122 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
1123 _CRTIMP int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
1124 __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
1125 _CRTIMP int __cdecl vwscanf (const wchar_t *, va_list);
1126 _CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
1127 _CRTIMP int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
1128 #endif
1129
1130 _Check_return_opt_
1131 _CRTIMP
1132 int
1133 __cdecl
1134 _fwprintf_p(
1135 _Inout_ FILE *_File,
1136 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1137 ...);
1138
1139 _Check_return_opt_
1140 _CRTIMP
1141 int
1142 __cdecl
1143 _wprintf_p(
1144 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1145 ...);
1146
1147 _Check_return_opt_
1148 _CRTIMP
1149 int
1150 __cdecl
1151 _vfwprintf_p(
1152 _Inout_ FILE *_File,
1153 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1154 va_list _ArgList);
1155
1156 _Check_return_opt_
1157 _CRTIMP
1158 int
1159 __cdecl
1160 _vwprintf_p(
1161 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1162 va_list _ArgList);
1163
1164 _Check_return_opt_
1165 _CRTIMP
1166 int
1167 __cdecl
1168 _swprintf_p(
1169 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1170 _In_ size_t _MaxCount,
1171 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1172 ...);
1173
1174 _Check_return_opt_
1175 _CRTIMP
1176 int
1177 __cdecl
1178 _vswprintf_p(
1179 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1180 _In_ size_t _MaxCount,
1181 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1182 va_list _ArgList);
1183
1184 _Check_return_
1185 _CRTIMP
1186 int
1187 __cdecl
1188 _scwprintf_p(
1189 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1190 ...);
1191
1192 _Check_return_
1193 _CRTIMP
1194 int
1195 __cdecl
1196 _vscwprintf_p(
1197 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1198 va_list _ArgList);
1199
1200 _Check_return_opt_
1201 _CRTIMP
1202 int
1203 __cdecl
1204 _wprintf_l(
1205 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1206 _In_opt_ _locale_t _Locale,
1207 ...);
1208
1209 _Check_return_opt_
1210 _CRTIMP
1211 int
1212 __cdecl
1213 _wprintf_p_l(
1214 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1215 _In_opt_ _locale_t _Locale,
1216 ...);
1217
1218 _Check_return_opt_
1219 _CRTIMP
1220 int
1221 __cdecl
1222 _vwprintf_l(
1223 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1224 _In_opt_ _locale_t _Locale,
1225 va_list _ArgList);
1226
1227 _Check_return_opt_
1228 _CRTIMP
1229 int
1230 __cdecl
1231 _vwprintf_p_l(
1232 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1233 _In_opt_ _locale_t _Locale,
1234 va_list _ArgList);
1235
1236 _Check_return_opt_
1237 _CRTIMP
1238 int
1239 __cdecl
1240 _fwprintf_l(
1241 _Inout_ FILE *_File,
1242 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1243 _In_opt_ _locale_t _Locale,
1244 ...);
1245
1246 _Check_return_opt_
1247 _CRTIMP
1248 int
1249 __cdecl
1250 _fwprintf_p_l(
1251 _Inout_ FILE *_File,
1252 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1253 _In_opt_ _locale_t _Locale,
1254 ...);
1255
1256 _Check_return_opt_
1257 _CRTIMP
1258 int
1259 __cdecl
1260 _vfwprintf_l(
1261 _Inout_ FILE *_File,
1262 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1263 _In_opt_ _locale_t _Locale,
1264 va_list _ArgList);
1265
1266 _Check_return_opt_
1267 _CRTIMP
1268 int
1269 __cdecl
1270 _vfwprintf_p_l(
1271 _Inout_ FILE *_File,
1272 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1273 _In_opt_ _locale_t _Locale,
1274 va_list _ArgList);
1275
1276 _Check_return_opt_
1277 _CRTIMP
1278 int
1279 __cdecl
1280 _swprintf_c_l(
1281 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1282 _In_ size_t _MaxCount,
1283 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1284 _In_opt_ _locale_t _Locale,
1285 ...);
1286
1287 _Check_return_opt_
1288 _CRTIMP
1289 int
1290 __cdecl
1291 _swprintf_p_l(
1292 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1293 _In_ size_t _MaxCount,
1294 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1295 _In_opt_ _locale_t _Locale,
1296 ...);
1297
1298 _Check_return_opt_
1299 _CRTIMP
1300 int
1301 __cdecl
1302 _vswprintf_c_l(
1303 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1304 _In_ size_t _MaxCount,
1305 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1306 _In_opt_ _locale_t _Locale,
1307 va_list _ArgList);
1308
1309 _Check_return_opt_
1310 _CRTIMP
1311 int
1312 __cdecl
1313 _vswprintf_p_l(
1314 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1315 _In_ size_t _MaxCount,
1316 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1317 _In_opt_ _locale_t _Locale,
1318 va_list _ArgList);
1319
1320 _Check_return_
1321 _CRTIMP
1322 int
1323 __cdecl
1324 _scwprintf_l(
1325 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1326 _In_opt_ _locale_t _Locale,
1327 ...);
1328
1329 _Check_return_
1330 _CRTIMP
1331 int
1332 __cdecl
1333 _scwprintf_p_l(
1334 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1335 _In_opt_ _locale_t _Locale,
1336 ...);
1337
1338 _Check_return_
1339 _CRTIMP
1340 int
1341 __cdecl
1342 _vscwprintf_p_l(
1343 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1344 _In_opt_ _locale_t _Locale,
1345 va_list _ArgList);
1346
1347 _Check_return_opt_
1348 _CRTIMP
1349 int
1350 __cdecl
1351 _snwprintf_l(
1352 _Out_writes_(_MaxCount) wchar_t *_DstBuf,
1353 _In_ size_t _MaxCount,
1354 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1355 _In_opt_ _locale_t _Locale,
1356 ...);
1357
1358 _Check_return_opt_
1359 _CRTIMP
1360 int
1361 __cdecl
1362 _vsnwprintf_l(
1363 _Out_writes_(_MaxCount) wchar_t *_DstBuf,
1364 _In_ size_t _MaxCount,
1365 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1366 _In_opt_ _locale_t _Locale,
1367 va_list _ArgList);
1368
1369 _CRTIMP
1370 int
1371 __cdecl
1372 _swprintf(
1373 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1374 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1375 ...);
1376
1377 _CRTIMP
1378 int
1379 __cdecl
1380 _vswprintf(
1381 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1382 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1383 va_list _Args);
1384
1385
1386 _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
1387 _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
1388
1389 #if 0 //this is for MSVCRT80 and higher, which we don't use nor implement
1390 #ifdef _CRT_NON_CONFORMING_SWPRINTFS
1391 #ifndef __cplusplus
1392 #define swprintf _swprintf
1393 #define vswprintf _vswprintf
1394 #define _swprintf_l __swprintf_l
1395 #define _vswprintf_l __vswprintf_l
1396 #endif
1397 #endif
1398 #endif
1399
1400 _Check_return_
1401 _CRTIMP
1402 wchar_t*
1403 __cdecl
1404 _wtempnam(
1405 _In_opt_z_ const wchar_t *_Directory,
1406 _In_opt_z_ const wchar_t *_FilePrefix);
1407
1408 _Check_return_
1409 _CRTIMP
1410 int
1411 __cdecl
1412 _vscwprintf(
1413 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1414 va_list _ArgList);
1415
1416 _Check_return_
1417 _CRTIMP
1418 int
1419 __cdecl
1420 _vscwprintf_l(
1421 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1422 _In_opt_ _locale_t _Locale,
1423 va_list _ArgList);
1424
1425 _Check_return_
1426 int
1427 __cdecl
1428 fwscanf(
1429 _Inout_ FILE *_File,
1430 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1431 ...);
1432
1433 _Check_return_opt_
1434 _CRTIMP
1435 int
1436 __cdecl
1437 _fwscanf_l(
1438 _Inout_ FILE *_File,
1439 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1440 _In_opt_ _locale_t _Locale,
1441 ...);
1442
1443 _Check_return_
1444 int
1445 __cdecl
1446 swscanf(
1447 _In_z_ const wchar_t *_Src,
1448 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1449 ...);
1450
1451 _Check_return_opt_
1452 _CRTIMP
1453 int
1454 __cdecl
1455 _swscanf_l(
1456 _In_z_ const wchar_t *_Src,
1457 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1458 _In_opt_ _locale_t _Locale,
1459 ...);
1460
1461 _Check_return_opt_
1462 _CRTIMP
1463 int
1464 __cdecl
1465 _snwscanf(
1466 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
1467 _In_ size_t _MaxCount,
1468 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1469 ...);
1470
1471 _Check_return_opt_
1472 _CRTIMP
1473 int
1474 __cdecl
1475 _snwscanf_l(
1476 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
1477 _In_ size_t _MaxCount,
1478 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1479 _In_opt_ _locale_t _Locale,
1480 ...);
1481
1482 _Check_return_
1483 int
1484 __cdecl
1485 wscanf(
1486 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1487 ...);
1488
1489 _Check_return_opt_
1490 _CRTIMP
1491 int
1492 __cdecl
1493 _wscanf_l(
1494 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1495 _In_opt_ _locale_t _Locale,
1496 ...);
1497
1498 _Check_return_
1499 _CRTIMP
1500 FILE*
1501 __cdecl
1502 _wfdopen(
1503 _In_ int _FileHandle,
1504 _In_z_ const wchar_t *_Mode);
1505
1506 _Check_return_
1507 _CRTIMP
1508 FILE*
1509 __cdecl
1510 _wfopen(
1511 _In_z_ const wchar_t *_Filename,
1512 _In_z_ const wchar_t *_Mode);
1513
1514 _Check_return_
1515 _CRTIMP
1516 FILE*
1517 __cdecl
1518 _wfreopen(
1519 _In_z_ const wchar_t *_Filename,
1520 _In_z_ const wchar_t *_Mode,
1521 _Inout_ FILE *_OldFile);
1522
1523 #ifndef _CRT_WPERROR_DEFINED
1524 #define _CRT_WPERROR_DEFINED
1525 _CRTIMP
1526 void
1527 __cdecl
1528 _wperror(
1529 _In_opt_z_ const wchar_t *_ErrMsg);
1530 #endif
1531
1532 _Check_return_
1533 _CRTIMP
1534 FILE*
1535 __cdecl
1536 _wpopen(
1537 _In_z_ const wchar_t *_Command,
1538 _In_z_ const wchar_t *_Mode);
1539
1540 #if !defined(NO_OLDNAMES) && !defined(wpopen)
1541 #define wpopen _wpopen
1542 #endif
1543
1544 _Check_return_
1545 _CRTIMP
1546 int
1547 __cdecl
1548 _wremove(
1549 _In_z_ const wchar_t *_Filename);
1550
1551 _CRTIMP
1552 wchar_t*
1553 __cdecl
1554 _wtmpnam(
1555 _Pre_maybenull_ _Post_z_ wchar_t *_Buffer);
1556
1557 _Check_return_opt_
1558 _CRTIMP
1559 wint_t
1560 __cdecl
1561 _fgetwc_nolock(
1562 _Inout_ FILE *_File);
1563
1564 _Check_return_opt_
1565 _CRTIMP
1566 wint_t
1567 __cdecl
1568 _fputwc_nolock(
1569 _In_ wchar_t _Ch,
1570 _Inout_ FILE *_File);
1571
1572 _Check_return_opt_
1573 _CRTIMP
1574 wint_t
1575 __cdecl
1576 _ungetwc_nolock(
1577 _In_ wint_t _Ch,
1578 _Inout_ FILE *_File);
1579
1580 #undef _CRT_GETPUTWCHAR_NOINLINE
1581
1582 #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
1583 #define getwchar() fgetwc(stdin)
1584 #define putwchar(_c) fputwc((_c),stdout)
1585 #else
1586 _Check_return_ __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
1587 _Check_return_opt_ __CRT_INLINE wint_t __cdecl putwchar(_In_ wchar_t _C) {return (fputwc(_C,stdout)); }
1588 #endif
1589
1590 #define getwc(_stm) fgetwc(_stm)
1591 #define putwc(_c,_stm) fputwc(_c,_stm)
1592 #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
1593 #define _getwc_nolock(_c) _fgetwc_nolock(_c)
1594
1595 #endif /* _WSTDIO_DEFINED */
1596
1597 #ifndef _WSTDLIB_DEFINED
1598 #define _WSTDLIB_DEFINED
1599
1600 _CRTIMP
1601 wchar_t*
1602 __cdecl
1603 _itow(
1604 _In_ int _Value,
1605 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1606 _In_ int _Radix);
1607
1608 _CRTIMP
1609 wchar_t*
1610 __cdecl
1611 _ltow(
1612 _In_ long _Value,
1613 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1614 _In_ int _Radix);
1615
1616 _CRTIMP
1617 wchar_t*
1618 __cdecl
1619 _ultow(
1620 _In_ unsigned long _Value,
1621 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1622 _In_ int _Radix);
1623
1624 _Check_return_
1625 double
1626 __cdecl
1627 wcstod(
1628 _In_z_ const wchar_t *_Str,
1629 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr);
1630
1631 _Check_return_
1632 _CRTIMP
1633 double
1634 __cdecl
1635 _wcstod_l(
1636 _In_z_ const wchar_t *_Str,
1637 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1638 _In_opt_ _locale_t _Locale);
1639
1640 float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
1641
1642 #if !defined __NO_ISOCEXT /* in libmingwex.a */
1643 float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
1644 long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
1645 #endif /* __NO_ISOCEXT */
1646
1647 _Check_return_
1648 long
1649 __cdecl
1650 wcstol(
1651 _In_z_ const wchar_t *_Str,
1652 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1653 _In_ int _Radix);
1654
1655 _Check_return_
1656 _CRTIMP
1657 long
1658 __cdecl
1659 _wcstol_l(
1660 _In_z_ const wchar_t *_Str,
1661 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1662 _In_ int _Radix,
1663 _In_opt_ _locale_t _Locale);
1664
1665 _Check_return_
1666 unsigned long
1667 __cdecl
1668 wcstoul(
1669 _In_z_ const wchar_t *_Str,
1670 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1671 _In_ int _Radix);
1672
1673 _Check_return_
1674 _CRTIMP
1675 unsigned long
1676 __cdecl
1677 _wcstoul_l(
1678 _In_z_ const wchar_t *_Str,
1679 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1680 _In_ int _Radix,
1681 _In_opt_ _locale_t _Locale);
1682
1683 _Check_return_
1684 _CRTIMP
1685 wchar_t*
1686 __cdecl
1687 _wgetenv(
1688 _In_z_ const wchar_t *_VarName);
1689
1690 #ifndef _CRT_WSYSTEM_DEFINED
1691 #define _CRT_WSYSTEM_DEFINED
1692 _CRTIMP
1693 int
1694 __cdecl
1695 _wsystem(
1696 _In_opt_z_ const wchar_t *_Command);
1697 #endif
1698
1699 _Check_return_
1700 _CRTIMP
1701 double
1702 __cdecl
1703 _wtof(
1704 _In_z_ const wchar_t *_Str);
1705
1706 _Check_return_
1707 _CRTIMP
1708 double
1709 __cdecl
1710 _wtof_l(
1711 _In_z_ const wchar_t *_Str,
1712 _In_opt_ _locale_t _Locale);
1713
1714 _Check_return_
1715 _CRTIMP
1716 int
1717 __cdecl
1718 _wtoi(
1719 _In_z_ const wchar_t *_Str);
1720
1721 _Check_return_
1722 _CRTIMP
1723 int
1724 __cdecl
1725 _wtoi_l(
1726 _In_z_ const wchar_t *_Str,
1727 _In_opt_ _locale_t _Locale);
1728
1729 _Check_return_
1730 _CRTIMP
1731 long
1732 __cdecl
1733 _wtol(
1734 _In_z_ const wchar_t *_Str);
1735
1736 _Check_return_
1737 _CRTIMP
1738 long
1739 __cdecl
1740 _wtol_l(
1741 _In_z_ const wchar_t *_Str,
1742 _In_opt_ _locale_t _Locale);
1743
1744 #if _INTEGRAL_MAX_BITS >= 64
1745
1746 __MINGW_EXTENSION
1747 _CRTIMP
1748 wchar_t*
1749 __cdecl
1750 _i64tow(
1751 _In_ __int64 _Val,
1752 _Pre_notnull_ _Post_z_ wchar_t *_DstBuf,
1753 _In_ int _Radix);
1754
1755 __MINGW_EXTENSION
1756 _CRTIMP
1757 wchar_t*
1758 __cdecl
1759 _ui64tow(
1760 _In_ unsigned __int64 _Val,
1761 _Pre_notnull_ _Post_z_ wchar_t *_DstBuf,
1762 _In_ int _Radix);
1763
1764 _Check_return_
1765 __MINGW_EXTENSION
1766 _CRTIMP
1767 __int64
1768 __cdecl
1769 _wtoi64(
1770 _In_z_ const wchar_t *_Str);
1771
1772 _Check_return_
1773 __MINGW_EXTENSION
1774 _CRTIMP
1775 __int64
1776 __cdecl
1777 _wtoi64_l(
1778 _In_z_ const wchar_t *_Str,
1779 _In_opt_ _locale_t _Locale);
1780
1781 _Check_return_
1782 __MINGW_EXTENSION
1783 _CRTIMP
1784 __int64
1785 __cdecl
1786 _wcstoi64(
1787 _In_z_ const wchar_t *_Str,
1788 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1789 _In_ int _Radix);
1790
1791 _Check_return_
1792 __MINGW_EXTENSION
1793 _CRTIMP
1794 __int64
1795 __cdecl
1796 _wcstoi64_l(
1797 _In_z_ const wchar_t *_Str,
1798 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1799 _In_ int _Radix,
1800 _In_opt_ _locale_t _Locale);
1801
1802 _Check_return_
1803 __MINGW_EXTENSION
1804 _CRTIMP
1805 unsigned __int64
1806 __cdecl
1807 _wcstoui64(
1808 _In_z_ const wchar_t *_Str,
1809 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1810 _In_ int _Radix);
1811
1812 _Check_return_
1813 __MINGW_EXTENSION
1814 _CRTIMP
1815 unsigned __int64
1816 __cdecl
1817 _wcstoui64_l(
1818 _In_z_ const wchar_t *_Str,
1819 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1820 _In_ int _Radix,
1821 _In_opt_ _locale_t _Locale);
1822
1823 #endif /* _INTEGRAL_MAX_BITS >= 64 */
1824
1825 #endif /* _WSTDLIB_DEFINED */
1826
1827 #ifndef _POSIX_
1828
1829 #ifndef _WSTDLIBP_DEFINED
1830 #define _WSTDLIBP_DEFINED
1831
1832 _Check_return_
1833 _CRTIMP
1834 wchar_t*
1835 __cdecl
1836 _wfullpath(
1837 _Out_writes_opt_z_(_SizeInWords) wchar_t *_FullPath,
1838 _In_z_ const wchar_t *_Path,
1839 _In_ size_t _SizeInWords);
1840
1841 _CRTIMP
1842 void
1843 __cdecl
1844 _wmakepath(
1845 _Pre_notnull_ _Post_z_ wchar_t *_ResultPath,
1846 _In_opt_z_ const wchar_t *_Drive,
1847 _In_opt_z_ const wchar_t *_Dir,
1848 _In_opt_z_ const wchar_t *_Filename,
1849 _In_opt_z_ const wchar_t *_Ext);
1850
1851 #ifndef _CRT_WPERROR_DEFINED
1852 #define _CRT_WPERROR_DEFINED
1853 _CRTIMP
1854 void
1855 __cdecl
1856 _wperror(
1857 _In_opt_z_ const wchar_t *_ErrMsg);
1858 #endif
1859
1860 _Check_return_
1861 _CRTIMP
1862 int
1863 __cdecl
1864 _wputenv(
1865 _In_z_ const wchar_t *_EnvString);
1866
1867 _CRTIMP
1868 void
1869 __cdecl
1870 _wsearchenv(
1871 _In_z_ const wchar_t *_Filename,
1872 _In_z_ const wchar_t *_EnvVar,
1873 _Pre_notnull_ _Post_z_ wchar_t *_ResultPath);
1874
1875 _CRTIMP
1876 void
1877 __cdecl
1878 _wsplitpath(
1879 _In_z_ const wchar_t *_FullPath,
1880 _Pre_maybenull_ _Post_z_ wchar_t *_Drive,
1881 _Pre_maybenull_ _Post_z_ wchar_t *_Dir,
1882 _Pre_maybenull_ _Post_z_ wchar_t *_Filename,
1883 _Pre_maybenull_ _Post_z_ wchar_t *_Ext);
1884
1885 #endif /* _WSTDLIBP_DEFINED */
1886
1887 #endif /* _POSIX_ */
1888
1889 #ifndef _WSTRING_DEFINED
1890 #define _WSTRING_DEFINED
1891
1892 _Check_return_
1893 _CRTIMP
1894 wchar_t*
1895 __cdecl
1896 _wcsdup(
1897 _In_z_ const wchar_t *_Str);
1898
1899 wchar_t*
1900 __cdecl
1901 wcscat(
1902 _Inout_updates_z_(_String_length_(_Dest) + _String_length_(_Source) + 1) wchar_t *_Dest,
1903 _In_z_ const wchar_t *_Source);
1904
1905 _CONST_RETURN
1906 wchar_t*
1907 __cdecl
1908 wcschr(
1909 _In_z_ const wchar_t *_Str,
1910 wchar_t _Ch);
1911
1912 _Check_return_
1913 int
1914 __cdecl
1915 wcscmp(
1916 _In_z_ const wchar_t *_Str1,
1917 _In_z_ const wchar_t *_Str2);
1918
1919 wchar_t*
1920 __cdecl
1921 wcscpy(
1922 _Out_writes_z_(_String_length_(_Source) + 1) wchar_t *_Dest,
1923 _In_z_ const wchar_t *_Source);
1924
1925 _Check_return_
1926 size_t
1927 __cdecl
1928 wcscspn(
1929 _In_z_ const wchar_t *_Str,
1930 _In_z_ const wchar_t *_Control);
1931
1932 size_t
1933 __cdecl
1934 wcslen(
1935 _In_z_ const wchar_t *_Str);
1936
1937 _When_(_MaxCount > _String_length_(_Src),
1938 _Post_satisfies_(return == _String_length_(_Src)))
1939 _When_(_MaxCount <= _String_length_(_Src),
1940 _Post_satisfies_(return == _MaxCount))
1941 size_t
1942 __cdecl
1943 wcsnlen(
1944 _In_reads_or_z_(_MaxCount) const wchar_t *_Src,
1945 _In_ size_t _MaxCount);
1946
1947 wchar_t*
1948 __cdecl
1949 wcsncat(
1950 wchar_t *_Dest,
1951 const wchar_t *_Source,
1952 size_t _Count);
1953
1954 _Check_return_
1955 int
1956 __cdecl
1957 wcsncmp(
1958 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
1959 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
1960 _In_ size_t _MaxCount);
1961
1962 wchar_t*
1963 __cdecl
1964 wcsncpy(
1965 wchar_t *_Dest,
1966 const wchar_t *_Source,
1967 size_t _Count);
1968
1969 _Check_return_
1970 _CONST_RETURN
1971 wchar_t*
1972 __cdecl
1973 wcspbrk(
1974 _In_z_ const wchar_t *_Str,
1975 _In_z_ const wchar_t *_Control);
1976
1977 _Check_return_
1978 _CONST_RETURN
1979 wchar_t*
1980 __cdecl
1981 wcsrchr(
1982 _In_z_ const wchar_t *_Str,
1983 _In_ wchar_t _Ch);
1984
1985 _Check_return_
1986 size_t
1987 __cdecl
1988 wcsspn(
1989 _In_z_ const wchar_t *_Str,
1990 _In_z_ const wchar_t *_Control);
1991
1992 _CONST_RETURN
1993 wchar_t*
1994 __cdecl
1995 wcsstr(
1996 _In_z_ const wchar_t *_Str,
1997 _In_z_ const wchar_t *_SubStr);
1998
1999 _Check_return_
2000 wchar_t*
2001 __cdecl
2002 wcstok(
2003 _Inout_opt_z_ wchar_t *_Str,
2004 _In_z_ const wchar_t *_Delim);
2005
2006 _Check_return_
2007 _CRTIMP
2008 wchar_t*
2009 __cdecl
2010 _wcserror(
2011 _In_ int _ErrNum);
2012
2013 _Check_return_
2014 _CRTIMP
2015 wchar_t*
2016 __cdecl
2017 __wcserror(
2018 _In_opt_z_ const wchar_t *_Str);
2019
2020 _Check_return_
2021 _CRTIMP
2022 int
2023 __cdecl
2024 _wcsicmp(
2025 _In_z_ const wchar_t *_Str1,
2026 _In_z_ const wchar_t *_Str2);
2027
2028 _Check_return_
2029 _CRTIMP
2030 int
2031 __cdecl
2032 _wcsicmp_l(
2033 _In_z_ const wchar_t *_Str1,
2034 _In_z_ const wchar_t *_Str2,
2035 _In_opt_ _locale_t _Locale);
2036
2037 _Check_return_
2038 _CRTIMP
2039 int
2040 __cdecl
2041 _wcsnicmp(
2042 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2043 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2044 _In_ size_t _MaxCount);
2045
2046 _Check_return_
2047 _CRTIMP
2048 int
2049 __cdecl
2050 _wcsnicmp_l(
2051 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2052 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2053 _In_ size_t _MaxCount,
2054 _In_opt_ _locale_t _Locale);
2055
2056 _CRTIMP
2057 wchar_t*
2058 __cdecl
2059 _wcsnset(
2060 wchar_t *_Str,
2061 wchar_t _Val,
2062 size_t _MaxCount);
2063
2064 _CRTIMP
2065 wchar_t*
2066 __cdecl
2067 _wcsrev(
2068 _Inout_z_ wchar_t *_Str);
2069
2070 _CRTIMP
2071 wchar_t*
2072 __cdecl
2073 _wcsset(
2074 wchar_t *_Str,
2075 wchar_t _Val);
2076
2077 _CRTIMP
2078 wchar_t*
2079 __cdecl
2080 _wcslwr(
2081 _Inout_z_ wchar_t *_String);
2082
2083 _CRTIMP
2084 wchar_t*
2085 _wcslwr_l(
2086 wchar_t *_String,
2087 _locale_t _Locale);
2088
2089 _CRTIMP
2090 wchar_t*
2091 __cdecl
2092 _wcsupr(
2093 _Inout_z_ wchar_t *_String);
2094
2095 _CRTIMP
2096 wchar_t*
2097 _wcsupr_l(
2098 wchar_t *_String,
2099 _locale_t _Locale);
2100
2101 _Check_return_opt_
2102 size_t
2103 __cdecl
2104 wcsxfrm(
2105 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst,
2106 _In_z_ const wchar_t *_Src,
2107 _In_ size_t _MaxCount);
2108
2109 _Check_return_opt_
2110 _CRTIMP
2111 size_t
2112 __cdecl
2113 _wcsxfrm_l(
2114 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst,
2115 _In_z_ const wchar_t *_Src,
2116 _In_ size_t _MaxCount,
2117 _In_opt_ _locale_t _Locale);
2118
2119 _Check_return_
2120 int
2121 __cdecl
2122 wcscoll(
2123 _In_z_ const wchar_t *_Str1,
2124 _In_z_ const wchar_t *_Str2);
2125
2126 _Check_return_
2127 _CRTIMP
2128 int
2129 __cdecl
2130 _wcscoll_l(
2131 _In_z_ const wchar_t *_Str1,
2132 _In_z_ const wchar_t *_Str2,
2133 _In_opt_ _locale_t _Locale);
2134
2135 _Check_return_
2136 _CRTIMP
2137 int
2138 __cdecl
2139 _wcsicoll(
2140 _In_z_ const wchar_t *_Str1,
2141 _In_z_ const wchar_t *_Str2);
2142
2143 _Check_return_
2144 _CRTIMP
2145 int
2146 __cdecl
2147 _wcsicoll_l(
2148 _In_z_ const wchar_t *_Str1,
2149 _In_z_ const wchar_t *_Str2,
2150 _In_opt_ _locale_t _Locale);
2151
2152 _Check_return_
2153 _CRTIMP
2154 int
2155 __cdecl
2156 _wcsncoll(
2157 _In_z_ const wchar_t *_Str1,
2158 _In_z_ const wchar_t *_Str2,
2159 _In_ size_t _MaxCount);
2160
2161 _Check_return_
2162 _CRTIMP
2163 int
2164 __cdecl
2165 _wcsncoll_l(
2166 _In_z_ const wchar_t *_Str1,
2167 _In_z_ const wchar_t *_Str2,
2168 _In_ size_t _MaxCount,
2169 _In_opt_ _locale_t _Locale);
2170
2171 _Check_return_
2172 _CRTIMP
2173 int
2174 __cdecl
2175 _wcsnicoll(
2176 _In_z_ const wchar_t *_Str1,
2177 _In_z_ const wchar_t *_Str2,
2178 _In_ size_t _MaxCount);
2179
2180 _Check_return_
2181 _CRTIMP
2182 int
2183 __cdecl
2184 _wcsnicoll_l(
2185 _In_z_ const wchar_t *_Str1,
2186 _In_z_ const wchar_t *_Str2,
2187 _In_ size_t _MaxCount,
2188 _In_opt_ _locale_t _Locale);
2189
2190 #ifndef NO_OLDNAMES
2191
2192 _Check_return_
2193 _CRTIMP
2194 wchar_t*
2195 __cdecl
2196 wcsdup(
2197 _In_z_ const wchar_t *_Str);
2198
2199 #define wcswcs wcsstr
2200
2201 _Check_return_
2202 _CRTIMP
2203 int
2204 __cdecl
2205 wcsicmp(
2206 _In_z_ const wchar_t *_Str1,
2207 _In_z_ const wchar_t *_Str2);
2208
2209 _Check_return_
2210 _CRTIMP
2211 int
2212 __cdecl
2213 wcsnicmp(
2214 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2215 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2216 _In_ size_t _MaxCount);
2217
2218 _CRTIMP
2219 wchar_t*
2220 __cdecl
2221 wcsnset(
2222 _Inout_updates_z_(_MaxCount) wchar_t *_Str,
2223 _In_ wchar_t _Val,
2224 _In_ size_t _MaxCount);
2225
2226 _CRTIMP
2227 wchar_t*
2228 __cdecl
2229 wcsrev(
2230 _Inout_z_ wchar_t *_Str);
2231
2232 _CRTIMP
2233 wchar_t*
2234 __cdecl
2235 wcsset(
2236 _Inout_z_ wchar_t *_Str,
2237 wchar_t _Val);
2238
2239 _CRTIMP
2240 wchar_t*
2241 __cdecl
2242 wcslwr(
2243 _Inout_z_ wchar_t *_Str);
2244
2245 _CRTIMP
2246 wchar_t*
2247 __cdecl
2248 wcsupr(
2249 _Inout_z_ wchar_t *_Str);
2250
2251 _Check_return_
2252 _CRTIMP
2253 int
2254 __cdecl
2255 wcsicoll(
2256 _In_z_ const wchar_t *_Str1,
2257 _In_z_ const wchar_t *_Str2);
2258
2259 #endif /* NO_OLDNAMES */
2260
2261 #endif /* _WSTRING_DEFINED */
2262
2263 #ifndef _TM_DEFINED
2264 #define _TM_DEFINED
2265 struct tm {
2266 int tm_sec;
2267 int tm_min;
2268 int tm_hour;
2269 int tm_mday;
2270 int tm_mon;
2271 int tm_year;
2272 int tm_wday;
2273 int tm_yday;
2274 int tm_isdst;
2275 };
2276 #endif
2277
2278 #ifndef _WTIME_DEFINED
2279 #define _WTIME_DEFINED
2280
2281 _CRTIMP
2282 wchar_t*
2283 __cdecl
2284 _wasctime(
2285 _In_ const struct tm *_Tm);
2286
2287 _CRTIMP
2288 wchar_t*
2289 __cdecl
2290 _wctime32(
2291 _In_ const __time32_t *_Time);
2292
2293 _Success_(return > 0)
2294 size_t
2295 __cdecl
2296 wcsftime(
2297 _Out_writes_z_(_SizeInWords) wchar_t *_Buf,
2298 _In_ size_t _SizeInWords,
2299 _In_z_ _Printf_format_string_ const wchar_t *_Format,
2300 _In_ const struct tm *_Tm);
2301
2302 _Success_(return > 0)
2303 _CRTIMP
2304 size_t
2305 __cdecl
2306 _wcsftime_l(
2307 _Out_writes_z_(_SizeInWords) wchar_t *_Buf,
2308 _In_ size_t _SizeInWords,
2309 _In_z_ _Printf_format_string_ const wchar_t *_Format,
2310 _In_ const struct tm *_Tm,
2311 _In_opt_ _locale_t _Locale);
2312
2313 _CRTIMP
2314 wchar_t*
2315 __cdecl
2316 _wstrdate(
2317 _Out_writes_z_(9) wchar_t *_Buffer);
2318
2319 _CRTIMP
2320 wchar_t*
2321 __cdecl
2322 _wstrtime(
2323 _Out_writes_z_(9) wchar_t *_Buffer);
2324
2325 _CRTIMP
2326 errno_t
2327 __cdecl
2328 _wasctime_s(
2329 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2330 _In_ size_t _SizeInWords,
2331 _In_ const struct tm *_Tm);
2332
2333 _CRTIMP
2334 errno_t
2335 __cdecl
2336 _wctime32_s(
2337 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2338 _In_ size_t _SizeInWords,
2339 _In_ const __time32_t *_Time);
2340
2341 _CRTIMP
2342 errno_t
2343 __cdecl
2344 _wstrdate_s(
2345 _Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf,
2346 _In_range_(>=, 9) size_t _SizeInWords);
2347
2348 _CRTIMP
2349 errno_t
2350 __cdecl
2351 _wstrtime_s(
2352 _Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf,
2353 _In_ size_t _SizeInWords);
2354
2355 #if _INTEGRAL_MAX_BITS >= 64
2356
2357 _CRTIMP
2358 wchar_t*
2359 __cdecl
2360 _wctime64(
2361 _In_ const __time64_t *_Time);
2362
2363 _CRTIMP
2364 errno_t
2365 __cdecl
2366 _wctime64_s(
2367 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2368 _In_ size_t _SizeInWords,
2369 _In_ const __time64_t *_Time);
2370
2371 #endif /* _INTEGRAL_MAX_BITS >= 64 */
2372
2373 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
2374 #define _INC_WTIME_INL
2375 #ifdef _USE_32BIT_TIME_T
2376 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
2377 #else /* !_USE_32BIT_TIME_T */
2378 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
2379 #endif /* !_USE_32BIT_TIME_T */
2380 #endif /* !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) */
2381
2382 #endif /* _WTIME_DEFINED */
2383
2384 typedef int mbstate_t;
2385 typedef wchar_t _Wint_t;
2386
2387 wint_t
2388 __cdecl
2389 btowc(
2390 int);
2391
2392 size_t
2393 __cdecl
2394 mbrlen(
2395 _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_Ch,
2396 _In_ size_t _SizeInBytes,
2397 _Out_opt_ mbstate_t *_State);
2398
2399 size_t
2400 __cdecl
2401 mbrtowc(
2402 _Pre_maybenull_ _Post_z_ wchar_t *_DstCh,
2403 _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_SrcCh,
2404 _In_ size_t _SizeInBytes,
2405 _Out_opt_ mbstate_t *_State);
2406
2407 size_t
2408 __cdecl
2409 mbsrtowcs(
2410 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
2411 _Inout_ _Deref_prepost_opt_valid_ const char **_PSrc,
2412 _In_ size_t _Count,
2413 _Inout_opt_ mbstate_t *_State);
2414
2415 size_t
2416 __cdecl
2417 wcrtomb(
2418 _Pre_maybenull_ _Post_z_ char *_Dest,
2419 _In_ wchar_t _Source,
2420 _Out_opt_ mbstate_t *_State);
2421
2422 size_t
2423 __cdecl
2424 wcsrtombs(
2425 _Pre_maybenull_ _Post_z_ char *_Dest,
2426 _Inout_ _Deref_prepost_z_ const wchar_t **_PSource,
2427 _In_ size_t _Count,
2428 _Out_opt_ mbstate_t *_State);
2429
2430 int
2431 __cdecl
2432 wctob(
2433 _In_ wint_t _WCh);
2434
2435 #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
2436
2437 wchar_t*
2438 __cdecl
2439 wmemset(
2440 _Out_writes_all_(_N) wchar_t *_S,
2441 _In_ wchar_t _C,
2442 _In_ size_t _N);
2443
2444 _CONST_RETURN
2445 wchar_t*
2446 __cdecl
2447 wmemchr(
2448 _In_reads_(_N) const wchar_t *_S,
2449 _In_ wchar_t _C,
2450 _In_ size_t _N);
2451
2452 int
2453 __cdecl
2454 wmemcmp(
2455 _In_reads_(_N) const wchar_t *_S1,
2456 _In_reads_(_N) const wchar_t *_S2,
2457 _In_ size_t _N);
2458
2459 _Post_equal_to_(_S1)
2460 _At_buffer_(_S1, _Iter_, _N, _Post_satisfies_(_S1[_Iter_] == _S2[_Iter_]))
2461 wchar_t*
2462 __cdecl
2463 wmemcpy(
2464 _Out_writes_all_(_N) wchar_t *_S1,
2465 _In_reads_(_N) const wchar_t *_S2,
2466 _In_ size_t _N);
2467
2468 wchar_t*
2469 __cdecl
2470 wmemmove(
2471 _Out_writes_all_opt_(_N) wchar_t *_S1,
2472 _In_reads_opt_(_N) const wchar_t *_S2,
2473 _In_ size_t _N);
2474
2475 __MINGW_EXTENSION
2476 long long
2477 __cdecl
2478 wcstoll(
2479 const wchar_t *nptr,
2480 wchar_t **endptr,
2481 int base);
2482
2483 __MINGW_EXTENSION
2484 unsigned long long
2485 __cdecl
2486 wcstoull(
2487 const wchar_t *nptr,
2488 wchar_t **endptr,
2489 int base);
2490
2491 #endif /* __NO_ISOCEXT */
2492
2493 void*
2494 __cdecl
2495 memmove(
2496 _Out_writes_bytes_all_opt_(_MaxCount) void *_Dst,
2497 _In_reads_bytes_opt_(_MaxCount) const void *_Src,
2498 _In_ size_t _MaxCount);
2499
2500 _Post_equal_to_(_Dst)
2501 _At_buffer_((unsigned char*)_Dst,
2502 _Iter_,
2503 _MaxCount,
2504 _Post_satisfies_(((unsigned char*)_Dst)[_Iter_] == ((unsigned char*)_Src)[_Iter_]))
2505 void*
2506 __cdecl
2507 memcpy(
2508 _Out_writes_bytes_all_(_MaxCount) void *_Dst,
2509 _In_reads_bytes_(_MaxCount) const void *_Src,
2510 _In_ size_t _MaxCount);
2511
2512 __CRT_INLINE
2513 int
2514 __cdecl
2515 fwide(
2516 _In_opt_ FILE *_F,
2517 int _M)
2518 {
2519 (void)_F;
2520 return (_M);
2521 }
2522
2523 __CRT_INLINE
2524 int
2525 __cdecl
2526 mbsinit(
2527 _In_opt_ const mbstate_t *_P)
2528 {
2529 return (!_P || *_P==0);
2530 }
2531
2532 __CRT_INLINE
2533 _CONST_RETURN
2534 wchar_t*
2535 __cdecl
2536 wmemchr(
2537 _In_reads_(_N) const wchar_t *_S,
2538 _In_ wchar_t _C,
2539 _In_ size_t _N)
2540 {
2541 for (;0<_N;++_S,--_N)
2542 {
2543 if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S);
2544 }
2545 return (0);
2546 }
2547
2548 __CRT_INLINE
2549 int
2550 __cdecl
2551 wmemcmp(
2552 _In_reads_(_N) const wchar_t *_S1,
2553 _In_reads_(_N) const wchar_t *_S2,
2554 _In_ size_t _N)
2555 {
2556 for (; 0 < _N; ++_S1,++_S2,--_N)
2557 {
2558 if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1);
2559 }
2560 return (0);
2561 }
2562
2563 _Post_equal_to_(_S1)
2564 _At_buffer_(_S1,
2565 _Iter_,
2566 _N,
2567 _Post_satisfies_(_S1[_Iter_] == _S2[_Iter_]))
2568 __CRT_INLINE
2569 wchar_t*
2570 __cdecl
2571 wmemcpy(
2572 _Out_writes_all_(_N) wchar_t *_S1,
2573 _In_reads_(_N) const wchar_t *_S2,
2574 _In_ size_t _N)
2575 {
2576 return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t));
2577 }
2578
2579 __CRT_INLINE
2580 wchar_t*
2581 __cdecl
2582 wmemmove(
2583 _Out_writes_all_opt_(_N) wchar_t *_S1,
2584 _In_reads_opt_(_N) const wchar_t *_S2,
2585 _In_ size_t _N)
2586 {
2587 return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t));
2588 }
2589
2590 __CRT_INLINE
2591 wchar_t*
2592 __cdecl
2593 wmemset(
2594 _Out_writes_all_(_N) wchar_t *_S,
2595 _In_ wchar_t _C,
2596 _In_ size_t _N)
2597 {
2598 wchar_t *_Su = _S;
2599 for (;0<_N;++_Su,--_N) {
2600 *_Su = _C;
2601 }
2602 return (_S);
2603 }
2604
2605 #ifdef _MSC_VER
2606 #pragma warning(pop)
2607 #endif
2608
2609 #ifdef __cplusplus
2610 }
2611 #endif
2612
2613 #pragma pack(pop)
2614
2615 #include <sec_api/wchar_s.h>
2616 #endif