ReactOS 0.4.16-dev-2104-gb84fa49
corecrt_wstdio.h
Go to the documentation of this file.
1
7#ifndef _WSTDIO_DEFINED
8#define _WSTDIO_DEFINED
9
10#include <corecrt.h>
12
13#ifndef RC_INVOKED
14#include <stdarg.h>
15#endif
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <pshpack8.h>
22
23#ifndef _FILE_DEFINED
24#define _FILE_DEFINED
25#include <pshpack8.h>
26typedef struct _iobuf
27{
28#ifdef _UCRT
29 void *_Placeholder;
30#else
31 char* _ptr;
32 int _cnt;
33 char* _base;
34 int _flag;
35 int _file;
38 char* _tmpfname;
39#endif
41#include <poppack.h>
42#endif /* _FILE_DEFINED */
43
44#ifndef WEOF
45#define WEOF (wint_t)(0xFFFF)
46#endif
47
49
50#define stdin (__acrt_iob_func(0))
51#define stdout (__acrt_iob_func(1))
52#define stderr (__acrt_iob_func(2))
53
59_ACRTIMP wchar_t* __cdecl _getws(wchar_t*);
61_ACRTIMP int __cdecl _putws(const wchar_t*);
63_ACRTIMP FILE* __cdecl _wfdopen(int,const wchar_t*);
64_ACRTIMP FILE* __cdecl _wfopen(const wchar_t*,const wchar_t*);
65_ACRTIMP errno_t __cdecl _wfopen_s(FILE**,const wchar_t*,const wchar_t*);
66_ACRTIMP FILE* __cdecl _wfreopen(const wchar_t*,const wchar_t*,FILE*);
67_ACRTIMP FILE* __cdecl _wfsopen(const wchar_t*,const wchar_t*,int);
68_ACRTIMP void __cdecl _wperror(const wchar_t*);
69_ACRTIMP FILE* __cdecl _wpopen(const wchar_t*,const wchar_t*);
70_ACRTIMP int __cdecl _wremove(const wchar_t*);
71_ACRTIMP wchar_t* __cdecl _wtempnam(const wchar_t*,const wchar_t*);
72_ACRTIMP wchar_t* __cdecl _wtmpnam(wchar_t*);
73
75_ACRTIMP wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
77_ACRTIMP int __cdecl fputws(const wchar_t*,FILE*);
78_ACRTIMP int __cdecl fputws(const wchar_t*,FILE*);
81_ACRTIMP wchar_t* __cdecl getws(wchar_t*);
84_ACRTIMP int __cdecl putws(const wchar_t*);
86
87#ifdef _UCRT
88
91_ACRTIMP int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64,wchar_t*,size_t,size_t,const wchar_t*,_locale_t,va_list);
92_ACRTIMP int __cdecl __stdio_common_vswprintf(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,va_list);
93_ACRTIMP int __cdecl __stdio_common_vswprintf_p(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,va_list);
94_ACRTIMP int __cdecl __stdio_common_vswprintf_s(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,va_list);
95
97_ACRTIMP int __cdecl __stdio_common_vswscanf(unsigned __int64,const wchar_t*,size_t,const wchar_t*,_locale_t,va_list);
98
99#endif /* _UCRT */
100
101#if defined(_UCRT) && !defined(_NO_CRT_STDIO_INLINE)
102
103static inline int __cdecl _vsnwprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list args)
104{
106 return ret < 0 ? -1 : ret;
107}
108
109static inline int __cdecl _snwprintf(wchar_t *buffer, size_t size, const wchar_t* format, ...)
110{
111 int ret;
113
116 va_end(args);
117 return ret;
118}
119
120static inline int __cdecl _vsnwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, va_list args)
121{
123 return ret < 0 ? -1 : ret;
124}
125
126static inline int __cdecl _snwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, ...)
127{
128 int ret;
130
133 va_end(args);
134 return ret;
135}
136
137static inline int __cdecl vswprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list args)
138{
140 return ret < 0 ? -1 : ret;
141}
142
143static inline int __cdecl swprintf(wchar_t *buffer, size_t size, const wchar_t *format, ...)
144{
145 int ret;
147
150 va_end(args);
151 return ret;
152}
153
154static inline int __cdecl _vswprintf(wchar_t *buffer, const wchar_t *format, va_list args)
155{
157 return ret < 0 ? -1 : ret;
158}
159
160static inline int __cdecl _swprintf(wchar_t *buffer, const wchar_t *format, ...)
161{
162 int ret;
164
167 va_end(args);
168 return ret < 0 ? -1 : ret;
169}
170
171static inline int __cdecl vswprintf_s(wchar_t *buffer, size_t size, const wchar_t *format, va_list args)
172{
174 return ret < 0 ? -1 : ret;
175}
176
177static inline int __cdecl swprintf_s(wchar_t *buffer, size_t size, const wchar_t* format, ...)
178{
179 int ret;
181
184 va_end(args);
185 return ret;
186}
187
188static inline int __cdecl _swprintf_l(wchar_t *buffer, size_t size, const wchar_t* format, _locale_t locale, ...)
189{
190 int ret;
192
195 va_end(args);
196 return ret;
197}
198
199static inline int __cdecl _vscwprintf(const wchar_t *format, va_list args)
200{
202 NULL, 0, format, NULL, args);
203 return ret < 0 ? -1 : ret;
204}
205
206static inline int __cdecl _vswprintf_p_l(wchar_t *buffer, size_t size, const wchar_t *format, _locale_t locale, va_list args)
207{
209 return ret < 0 ? -1 : ret;
210}
211
212static inline int __cdecl _vscwprintf_p_l(const wchar_t *format, _locale_t locale, va_list args)
213{
215 NULL, 0, format, locale, args);
216 return ret < 0 ? -1 : ret;
217}
218
219static inline int __cdecl _scwprintf(const wchar_t *format, ...)
220{
221 int ret;
223
226 NULL, 0, format, NULL, args);
227 va_end(args);
228 return ret;
229}
230
231static inline int __cdecl vfwprintf(FILE *file, const wchar_t *format, va_list args)
232{
234}
235
236static inline int __cdecl fwprintf(FILE *file, const wchar_t *format, ...)
237{
238 int ret;
240
243 va_end(args);
244 return ret;
245}
246
247static inline int __cdecl vfwprintf_s(FILE *file, const wchar_t *format, va_list args)
248{
250}
251
252static inline int __cdecl fwprintf_s(FILE *file, const wchar_t *format, ...)
253{
254 int ret;
256
259 va_end(args);
260 return ret;
261}
262
263static inline int __cdecl vwprintf(const wchar_t *format, va_list args)
264{
266}
267
268static inline int __cdecl wprintf(const wchar_t *format, ...)
269{
270 int ret;
272
275 va_end(args);
276 return ret;
277}
278
279static inline int __cdecl vwprintf_s(const wchar_t *format, va_list args)
280{
282}
283
284static inline int __cdecl wprintf_s(const wchar_t *format, ...)
285{
286 int ret;
288
291 va_end(args);
292 return ret;
293}
294
295static inline int __cdecl swscanf(const wchar_t *buffer, const wchar_t *format, ...)
296{
297 int ret;
299
302 va_end(args);
303 return ret;
304}
305
306static inline int __cdecl swscanf_s(const wchar_t *buffer, const wchar_t *format, ...)
307{
308 int ret;
310
313 va_end(args);
314 return ret;
315}
316
317static inline int __cdecl fwscanf(FILE *file, const wchar_t *format, ...)
318{
319 int ret;
321
324 va_end(args);
325 return ret;
326}
327
328static inline int __cdecl fwscanf_s(FILE *file, const wchar_t *format, ...)
329{
330 int ret;
332
335 va_end(args);
336 return ret;
337}
338
339static inline int __cdecl wscanf(FILE *file, const wchar_t *format, ...)
340{
341 int ret;
343
346 va_end(args);
347 return ret;
348}
349
350static inline int __cdecl wscanf_s(FILE *file, const wchar_t *format, ...)
351{
352 int ret;
354
357 va_end(args);
358 return ret;
359}
360
361#else /* _UCRT && !_NO_CRT_STDIO_INLINE */
362
363_ACRTIMP int __cdecl _scwprintf(const wchar_t*,...);
364_ACRTIMP int __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...);
365_ACRTIMP int __cdecl _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...);
366_ACRTIMP int __cdecl _vscwprintf(const wchar_t*,va_list);
368_ACRTIMP int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list);
369_ACRTIMP int __cdecl _vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,va_list);
370_ACRTIMP int __cdecl _vswprintf_p_l(wchar_t*,size_t,const wchar_t*,_locale_t,va_list);
371_ACRTIMP int __cdecl fwprintf(FILE*,const wchar_t*,...);
372_ACRTIMP int __cdecl fwprintf_s(FILE*,const wchar_t*,...);
373_ACRTIMP int __cdecl swprintf_s(wchar_t*,size_t,const wchar_t*,...);
374_ACRTIMP int __cdecl vfwprintf(FILE*,const wchar_t*,va_list);
375_ACRTIMP int __cdecl vfwprintf_s(FILE*,const wchar_t*,va_list);
376_ACRTIMP int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,va_list);
377_ACRTIMP int __cdecl vwprintf(const wchar_t*,va_list);
378_ACRTIMP int __cdecl vwprintf_s(const wchar_t*,va_list);
379_ACRTIMP int __cdecl wprintf(const wchar_t*,...);
380_ACRTIMP int __cdecl wprintf_s(const wchar_t*,...);
381
382#ifdef _CRT_NON_CONFORMING_SWPRINTFS
383_ACRTIMP int __cdecl swprintf(wchar_t*,const wchar_t*,...);
384_ACRTIMP int __cdecl vswprintf(wchar_t*,const wchar_t*,va_list);
385#elif !defined(_NO_CRT_STDIO_INLINE)
386static inline int __cdecl vswprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list args) { return _vsnwprintf(buffer,size,format,args); }
387static inline int __cdecl swprintf(wchar_t *buffer, size_t size, const wchar_t *format, ...)
388{
389 int ret;
391
394 va_end(args);
395 return ret;
396}
397#else
398_ACRTIMP int __cdecl vswprintf(wchar_t*,size_t,const wchar_t*,va_list);
399_ACRTIMP int __cdecl swprintf(wchar_t*,size_t,const wchar_t*,...);
400#endif /* _CRT_NON_CONFORMING_SWPRINTFS */
401
402_ACRTIMP int __cdecl fwscanf(FILE*,const wchar_t*,...);
403_ACRTIMP int __cdecl fwscanf_s(FILE*,const wchar_t*,...);
404_ACRTIMP int __cdecl swscanf(const wchar_t*,const wchar_t*,...);
405_ACRTIMP int __cdecl swscanf_s(const wchar_t*,const wchar_t*,...);
406_ACRTIMP int __cdecl wscanf(const wchar_t*,...);
407_ACRTIMP int __cdecl wscanf_s(const wchar_t*,...);
408
409#endif /* _UCRT && !_NO_CRT_STDIO_INLINE */
410
411#ifdef __cplusplus
412}
413#endif
414
415#include <poppack.h>
416
417#endif /* _WSTDIO_DEFINED */
Definition: _locale.h:75
#define NULL
Definition: types.h:112
int errno_t
Definition: corecrt.h:249
#define __cdecl
Definition: corecrt.h:121
#define _ACRTIMP
Definition: corecrt.h:153
unsigned short wint_t
Definition: corecrt.h:243
#define __int64
Definition: corecrt.h:72
#define _CRT_INTERNAL_SCANF_SECURECRT
#define _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR
#define _CRT_INTERNAL_LOCAL_SCANF_OPTIONS
#define _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS
_ACRTIMP wint_t __cdecl ungetwc(wint_t, FILE *)
Definition: file.c:5783
#define stdout
_ACRTIMP FILE *__cdecl _wpopen(const wchar_t *, const wchar_t *)
Definition: process.c:1044
_ACRTIMP int __cdecl swscanf_s(const wchar_t *, const wchar_t *,...)
Definition: scanf.c:467
_ACRTIMP wint_t __cdecl fgetwc(FILE *)
Definition: file.c:3935
_ACRTIMP int __cdecl vwprintf(const wchar_t *, va_list)
Definition: file.c:5533
_ACRTIMP int __cdecl _putws(const wchar_t *)
Definition: file.c:4942
_ACRTIMP int __cdecl swprintf_s(wchar_t *, size_t, const wchar_t *,...)
Definition: wcs.c:1701
_ACRTIMP int __cdecl _vsnwprintf_s(wchar_t *, size_t, size_t, const wchar_t *, va_list)
Definition: wcs.c:1483
_ACRTIMP int __cdecl _wremove(const wchar_t *)
Definition: file.c:4965
_ACRTIMP int __cdecl vswprintf_s(wchar_t *, size_t, const wchar_t *, va_list)
Definition: wcs.c:1816
_ACRTIMP FILE *__cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *)
Definition: file.c:4578
_ACRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *, const wchar_t *)
Definition: file.c:3464
_ACRTIMP int __cdecl vfwprintf_s(FILE *, const wchar_t *, va_list)
Definition: file.c:5373
_ACRTIMP FILE *__cdecl _wfsopen(const wchar_t *, const wchar_t *, int)
Definition: file.c:4254
_ACRTIMP wchar_t *__cdecl _getws(wchar_t *)
Definition: file.c:4879
_ACRTIMP int __cdecl _snwprintf_s(wchar_t *, size_t, size_t, const wchar_t *,...)
Definition: wcs.c:1520
_ACRTIMP int __cdecl _vscwprintf(const wchar_t *, va_list)
Definition: wcs.c:1782
_ACRTIMP int __cdecl putws(const wchar_t *)
_ACRTIMP int __cdecl fputws(const wchar_t *, FILE *)
Definition: file.c:4783
_ACRTIMP wint_t __cdecl _fgetwc_nolock(FILE *)
Definition: file.c:3949
_ACRTIMP FILE *__cdecl _wfdopen(int, const wchar_t *)
Definition: file.c:1863
_ACRTIMP int __cdecl fwscanf(FILE *, const wchar_t *,...)
Definition: scanf.c:264
_ACRTIMP wint_t __cdecl _fgetwchar(void)
Definition: file.c:4027
struct _iobuf FILE
_ACRTIMP wint_t __cdecl _ungetwc_nolock(wint_t, FILE *)
Definition: file.c:5799
_ACRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *)
Definition: file.c:5182
_ACRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *, _locale_t, va_list)
Definition: wcs.c:1798
_ACRTIMP FILE *__cdecl _wfopen(const wchar_t *, const wchar_t *)
Definition: file.c:4335
static int __cdecl vswprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list args)
_ACRTIMP void __cdecl _wperror(const wchar_t *)
Definition: errno.c:354
_ACRTIMP wint_t __cdecl _fputwchar(wint_t)
Definition: file.c:4246
_ACRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *,...)
Definition: scanf.c:438
_ACRTIMP int __cdecl fwprintf(FILE *, const wchar_t *,...)
Definition: file.c:5628
_ACRTIMP int __cdecl fwprintf_s(FILE *, const wchar_t *,...)
Definition: file.c:5641
_ACRTIMP int __cdecl fwscanf_s(FILE *, const wchar_t *,...)
Definition: scanf.c:293
_ACRTIMP errno_t __cdecl _wfopen_s(FILE **, const wchar_t *, const wchar_t *)
Definition: file.c:4343
_ACRTIMP int __cdecl vfwprintf(FILE *, const wchar_t *, va_list)
Definition: file.c:5365
_ACRTIMP int __cdecl _scwprintf(const wchar_t *,...)
Definition: wcs.c:1673
#define stdin
_ACRTIMP int __cdecl wscanf_s(const wchar_t *,...)
Definition: scanf.c:351
_ACRTIMP wint_t __cdecl _fputwc_nolock(wint_t, FILE *)
Definition: file.c:4217
_ACRTIMP int __cdecl wprintf_s(const wchar_t *,...)
Definition: file.c:5849
_ACRTIMP int __cdecl vwprintf_s(const wchar_t *, va_list)
Definition: file.c:5541
_ACRTIMP int __cdecl wscanf(const wchar_t *,...)
Definition: scanf.c:322
_ACRTIMP int __cdecl _vswprintf_p_l(wchar_t *, size_t, const wchar_t *, _locale_t, va_list)
Definition: wcs.c:1439
_ACRTIMP wint_t __cdecl fputwc(wint_t, FILE *)
Definition: file.c:4203
_ACRTIMP wchar_t *__cdecl getws(wchar_t *)
_ACRTIMP wchar_t *__cdecl fgetws(wchar_t *, int, FILE *)
Definition: file.c:4043
_ACRTIMP wint_t __cdecl getwchar(void)
Definition: file.c:4035
_ACRTIMP int __cdecl _snwprintf(wchar_t *, size_t, const wchar_t *,...)
Definition: wcs.c:1493
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
#define __acrt_iob_func(idx)
Definition: msvcrt.h:332
int CDECL __stdio_common_vswscanf(unsigned __int64 options, const wchar_t *input, size_t length, const wchar_t *format, _locale_t locale, va_list valist)
Definition: scanf.c:687
int CDECL __stdio_common_vfwscanf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist)
Definition: scanf.c:724
int CDECL _vswprintf(wchar_t *str, const wchar_t *format, va_list args)
Definition: wcs.c:1765
int WINAPIV _swprintf(wchar_t *str, const wchar_t *format,...)
Definition: wcs.c:1687
#define swprintf
Definition: precomp.h:40
return ret
Definition: mutex.c:146
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
#define _vsnwprintf
Definition: _vsnwprintf.c:28
int __cdecl __stdio_common_vswprintf(unsigned __int64 const options, wchar_t *const buffer, size_t const buffer_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:246
int __cdecl __stdio_common_vfwprintf_s(unsigned __int64 const options, FILE *const stream, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:88
int __cdecl __stdio_common_vfwprintf(unsigned __int64 const options, FILE *const stream, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:64
int __cdecl __stdio_common_vswprintf_s(unsigned __int64 const options, wchar_t *const buffer, size_t const buffer_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:305
int __cdecl __stdio_common_vswprintf_p(unsigned __int64 const options, wchar_t *const buffer, size_t const buffer_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:434
int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64 const options, wchar_t *const buffer, size_t const buffer_count, size_t const max_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:407
#define _getwc_nolock(_stm)
Definition: stdio.h:1134
#define putwc(_c, _stm)
Definition: stdio.h:1132
#define _putwc_nolock(_c, _stm)
Definition: stdio.h:1133
#define putwchar(_c)
Definition: stdio.h:1125
#define getwc(_stm)
Definition: stdio.h:1131
#define args
Definition: format.c:66
void * _Placeholder
char * _ptr
int _charbuf
char * _base
char * _tmpfname
int _bufsiz
Definition: match.c:390
Definition: fci.c:127
Definition: format.c:58
#define wprintf(...)
Definition: whoami.c:18