| /** | |
| * This file has no copyright assigned and is placed in the Public Domain. | |
| * This file is part of the mingw-w64 runtime package. | |
| * No warranty is given; refer to the file DISCLAIMER.PD within this package. | |
| */ | |
| #ifndef _INC_CORECRT_WSTDIO | |
| #define _INC_CORECRT_WSTDIO | |
| #include <corecrt.h> | |
| #include <corecrt_stdio_config.h> | |
| _CRT_BEGIN_C_HEADER | |
| #ifndef WEOF | |
| #define WEOF (wint_t)(0xFFFF) | |
| #endif | |
| #ifndef _FILE_DEFINED | |
| struct _iobuf { | |
| #ifdef _UCRT | |
| void *_Placeholder; | |
| #else | |
| char *_ptr; | |
| int _cnt; | |
| char *_base; | |
| int _flag; | |
| int _file; | |
| int _charbuf; | |
| int _bufsiz; | |
| char *_tmpfname; | |
| #endif | |
| }; | |
| typedef struct _iobuf FILE; | |
| #define _FILE_DEFINED | |
| #endif | |
| _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); | |
| _CRTIMP FILE *__cdecl __iob_func(void); | |
| #define _iob __iob_func() | |
| #define stdin (__acrt_iob_func(0)) | |
| #define stdout (__acrt_iob_func(1)) | |
| #define stderr (__acrt_iob_func(2)) | |
| #if __MINGW_FORTIFY_LEVEL > 0 | |
| __mingw_bos_declare; | |
| #endif | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp); | |
| /* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...); | |
| /* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp); | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp); | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| /* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...); | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| /* __attribute__((__format__ (gnu_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __mingw_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...); | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list); | |
| /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) | |
| __MINGW_UCRT_ASM_CALL(swscanf); | |
| /* __attribute__((__format__ (ms_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_vswscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,va_list) | |
| __MINGW_ASM_CALL(vswscanf); | |
| /* __attribute__((__format__ (ms_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __ms_wscanf(const wchar_t * __restrict__ _Format,...) | |
| __MINGW_UCRT_ASM_CALL(wscanf); | |
| /* __attribute__((__format__ (ms_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __ms_vwscanf(const wchar_t * __restrict__ _Format, va_list) | |
| __MINGW_ASM_CALL(vwscanf); | |
| /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) | |
| __MINGW_UCRT_ASM_CALL(fwscanf); | |
| /* __attribute__((__format__ (ms_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_vfwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list) | |
| __MINGW_ASM_CALL(vfwscanf); | |
| /* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| /* No __MINGW_UCRT_ASM_CALL for __ms_fwprintf; this is provided as an | |
| * actual function in the ucrt import libraries. */ | |
| /* __attribute__((__format__ (ms_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __ms_wprintf(const wchar_t * __restrict__ _Format,...) | |
| __MINGW_UCRT_ASM_CALL(wprintf); | |
| /* __attribute__((__format__ (ms_wprintf, 2, 0))) */__MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList) | |
| __MINGW_UCRT_ASM_CALL(vfwprintf); | |
| /*__attribute__((__format__ (ms_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList) | |
| __MINGW_UCRT_ASM_CALL(vwprintf); | |
| /* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __ms_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...) | |
| __MINGW_UCRT_ASM_CALL(swprintf); | |
| /* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __ms_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list) | |
| __MINGW_UCRT_ASM_CALL(vswprintf); | |
| /* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __ms_snwprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...) | |
| __MINGW_UCRT_ASM_CALL(snwprintf); | |
| /* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int __cdecl __ms_vsnwprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list) | |
| __MINGW_UCRT_ASM_CALL(vsnwprintf); | |
| #ifdef _UCRT | |
| int __cdecl __stdio_common_vswprintf(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist); | |
| int __cdecl __stdio_common_vfwprintf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist); | |
| 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); | |
| int __cdecl __stdio_common_vfwscanf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist); | |
| int __cdecl __stdio_common_vswprintf_p(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); | |
| int __cdecl __stdio_common_vfwprintf_p(unsigned __int64 _Options, FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); | |
| #endif | |
| #if __USE_MINGW_ANSI_STDIO && !defined(_CRTBLD) | |
| /* | |
| * User has expressed a preference for C99 conformance... | |
| */ | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int swscanf(const wchar_t *__source, const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_swscanf); | |
| /* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int wscanf(const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_wscanf); | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int fwscanf(FILE *__stream, const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_fwscanf); | |
| #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv) | |
| __MINGW_ASM_CALL(__mingw_vswscanf); | |
| /* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv) | |
| __MINGW_ASM_CALL(__mingw_vwscanf); | |
| /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) | |
| __MINGW_ASM_CALL(__mingw_vfwscanf); | |
| #endif /* __NO_ISOCEXT */ | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int fwprintf (FILE *__stream, const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_fwprintf); | |
| /* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int wprintf (const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_wprintf); | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) | |
| __MINGW_ASM_CALL(__mingw_vfwprintf); | |
| /* __attribute__((__format__ (gnu_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) | |
| int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) | |
| __MINGW_ASM_CALL(__mingw_vwprintf); | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_swprintf); | |
| #if __MINGW_FORTIFY_VA_ARG | |
| __mingw_bos_extern_ovr | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) | |
| { | |
| __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); | |
| return __mingw_swprintf( __stream, __n, __format, __builtin_va_arg_pack() ); | |
| } | |
| #endif /* __MINGW_FORTIFY_VA_ARG */ | |
| __mingw_bos_ovr | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) | |
| { | |
| #if __MINGW_FORTIFY_LEVEL > 0 | |
| __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); | |
| #endif | |
| return __mingw_vswprintf( __stream, __n, __format, __local_argv ); | |
| } | |
| #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) | |
| __MINGW_ASM_CALL(__mingw_snwprintf); | |
| #if __MINGW_FORTIFY_VA_ARG | |
| __mingw_bos_extern_ovr | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) | |
| { | |
| __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); | |
| return __mingw_snwprintf( __stream, __n, __format, __builtin_va_arg_pack() ); | |
| } | |
| #endif /* __MINGW_FORTIFY_VA_ARG */ | |
| __mingw_bos_ovr | |
| /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) | |
| int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) | |
| { | |
| #if __MINGW_FORTIFY_LEVEL > 0 | |
| __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); | |
| #endif | |
| return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); | |
| } | |
| #endif /* __NO_ISOCEXT */ | |
| #else /* !__USE_MINGW_ANSI_STDIO */ | |
| __MINGW_ATTRIB_DEPRECATED_SEC_WARN | |
| int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| __MINGW_ATTRIB_DEPRECATED_SEC_WARN | |
| int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); | |
| __MINGW_ATTRIB_DEPRECATED_SEC_WARN | |
| int __cdecl wscanf(const wchar_t * __restrict__ _Format,...); | |
| __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl vfwscanf(FILE *__stream, const wchar_t *__format, va_list __local_argv); | |
| __MINGW_ATTRIB_NONNULL(2) | |
| int __cdecl vswscanf(const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, va_list __local_argv); | |
| __MINGW_ATTRIB_NONNULL(1) | |
| int __cdecl vwscanf(const wchar_t *__format, va_list __local_argv); | |
| int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| int __cdecl wprintf(const wchar_t * __restrict__ _Format,...); | |
| int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...); | |
| int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args); | |
| #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| #pragma push_macro("snwprintf") | |
| #pragma push_macro("vsnwprintf") | |
| # undef snwprintf | |
| # undef vsnwprintf | |
| int __cdecl snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); | |
| int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg); | |
| #pragma pop_macro ("vsnwprintf") | |
| #pragma pop_macro ("snwprintf") | |
| #endif /* __NO_ISOCEXT */ | |
| #endif /* __USE_MINGW_ANSI_STDIO */ | |
| #ifdef _POSIX_ | |
| _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode); | |
| #else | |
| _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); | |
| #endif | |
| wint_t __cdecl fgetwc(FILE *_File); | |
| _CRTIMP wint_t __cdecl _fgetwchar(void); | |
| wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File); | |
| _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch); | |
| wint_t __cdecl getwc(FILE *_File); | |
| wint_t __cdecl getwchar(void); | |
| wint_t __cdecl putwc(wchar_t _Ch,FILE *_File); | |
| wint_t __cdecl putwchar(wchar_t _Ch); | |
| wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File); | |
| wchar_t *__cdecl fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File); | |
| int __cdecl fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File); | |
| _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _putws(const wchar_t *_Str); | |
| _CRTIMP int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...); | |
| #ifndef _UCRT | |
| _CRTIMP int __cdecl _swprintf_l(wchar_t * __restrict__ ,size_t _SizeInWords,const wchar_t * __restrict__ _Format,_locale_t _Locale,... ) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...); | |
| _CRTIMP int __cdecl _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| #endif | |
| _CRTIMP int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...); | |
| _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args); | |
| #ifdef _UCRT | |
| __mingw_ovr int __cdecl _vfwscanf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _File, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwscanf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vfwscanf_l(stdin, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _fwscanf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwscanf_l(_File, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wscanf_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwscanf_l(stdin, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vsnwscanf_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _Src, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _snwscanf_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vsnwscanf_l(_Src, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _snwscanf(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vsnwscanf_l(_Src, _MaxCount, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vswscanf_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _Src, (size_t)-1, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _swscanf_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswscanf_l(_Src, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vfwprintf_p_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vfwprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vfwprintf_p_l(stdout, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vfwprintf_p(FILE *_File, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwprintf_p_l(_File, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwprintf_p(const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwprintf_p_l(stdout, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _fwprintf_p_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_p_l(_File, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wprintf_p_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_p_l(stdout, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _fwprintf_p(FILE *_File, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwprintf_p_l(_File, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wprintf_p(const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwprintf_p_l(stdout, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vfwprintf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwprintf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vfwprintf_l(stdout, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _fwprintf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_l(_File, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wprintf_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_l(stdout, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vswprintf_p_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vswprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vswprintf_p_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _swprintf_p_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswprintf_p_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _swprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vswprintf_p_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vsnwprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _snwprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vsnwprintf_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vscwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vscwprintf_p(const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vscwprintf_p_l(_Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _scwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vscwprintf_p_l(_Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _scwprintf_p(const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vscwprintf_p_l(_Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vscwprintf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _scwprintf_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vscwprintf_l(_Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vswprintf_c_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl __vswprintf_l(wchar_t *_DstBuf, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vswprintf_c_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vswprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vswprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _swprintf_c_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl __swprintf_l(wchar_t *_DstBuf, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswprintf_c_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| #else /* _UCRT */ | |
| _CRTIMP int __cdecl _fwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); | |
| _CRTIMP int __cdecl _wprintf_p(const wchar_t * __restrict__ _Format,...); | |
| _CRTIMP int __cdecl _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _vwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); | |
| _SECIMP int __cdecl _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _scwprintf_p(const wchar_t * __restrict__ _Format,...); | |
| _SECIMP int __cdecl _vscwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _wprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _wprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _fwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _scwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _vswprintf_l(wchar_t * __restrict__ _Dest,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| #endif /* !_UCRT */ | |
| #ifndef RC_INVOKED | |
| #ifdef __cplusplus | |
| extern "C++" { | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) __MINGW_ASM_CALL(_vswprintf); | |
| /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) | |
| int swprintf (wchar_t *__stream, const wchar_t *__format, ...) __MINGW_ASM_CALL(_swprintf); | |
| } | |
| #elif defined(_CRT_NON_CONFORMING_SWPRINTFS) | |
| #define swprintf _swprintf | |
| #define vswprintf _vswprintf | |
| #endif /* __cplusplus */ | |
| #endif | |
| #ifdef _CRT_NON_CONFORMING_SWPRINTFS | |
| #ifndef __cplusplus | |
| #define _swprintf_l __swprintf_l | |
| #define _vswprintf_l __vswprintf_l | |
| #endif | |
| #endif | |
| #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) | |
| #pragma push_macro("_wtempnam") | |
| #undef _wtempnam | |
| #endif | |
| _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); | |
| #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) | |
| #pragma pop_macro("_wtempnam") | |
| #endif | |
| #ifndef _UCRT | |
| _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _fwscanf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _swscanf_l(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); | |
| _CRTIMP int __cdecl _snwscanf_l(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| #endif /* !_UCRT */ | |
| _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode); | |
| _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| _CRTIMP FILE *__cdecl _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | |
| #ifndef _CRT_WPERROR_DEFINED | |
| #define _CRT_WPERROR_DEFINED | |
| _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); | |
| #endif | |
| _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode); | |
| #if !defined(NO_OLDNAMES) && !defined(wpopen) | |
| #define wpopen _wpopen | |
| #endif | |
| _CRTIMP int __cdecl _wremove(const wchar_t *_Filename); | |
| _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer); | |
| #if __MSVCRT_VERSION__ >= 0x800 | |
| _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File); | |
| _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File); | |
| _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File); | |
| #endif | |
| #undef _CRT_GETPUTWCHAR_NOINLINE | |
| #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) || defined (__CRT__NO_INLINE) | |
| #define getwchar() fgetwc(stdin) | |
| #define putwchar(_c) fputwc((_c),stdout) | |
| #else | |
| __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); } | |
| __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); } | |
| #endif | |
| #define getwc(_stm) fgetwc(_stm) | |
| #define putwc(_c,_stm) fputwc(_c,_stm) | |
| #if __MSVCRT_VERSION__ >= 0x800 | |
| #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm) | |
| #define _getwc_nolock(_c) _fgetwc_nolock(_c) | |
| #endif | |
| /** | |
| * __mingw_str_wide_utf8 | |
| * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. | |
| * Caller is supposed to free allocated buffer with __mingw_str_free(). | |
| * @param[in] wptr Pointer to wide string. | |
| * @param[out] mbptr Pointer to multibyte string. | |
| * @param[out] buflen Optional parameter for length of allocated buffer. | |
| * @return bytes written by WideCharToMultiByte conversion, 0 for failure. | |
| * | |
| * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx | |
| */ | |
| int __cdecl __mingw_str_wide_utf8 (const wchar_t * const _Wptr, char ** _Mbptr, size_t * _Buflen); | |
| /** | |
| * __mingw_str_utf8_wide | |
| * Converts a null terminated UTF-8 string to a UCS-2 equivalent. | |
| * Caller is supposed to free allocated buffer with __mingw_str_free(). | |
| * @param[out] mbptr Pointer to multibyte string. | |
| * @param[in] wptr Pointer to wide string. | |
| * @param[out] buflen Optional parameter for length of allocated buffer. | |
| * @return bytes written by WideCharToMultiByte conversion, 0 for failure. | |
| * | |
| * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx | |
| */ | |
| int __cdecl __mingw_str_utf8_wide (const char *const _Mbptr, wchar_t ** _Wptr, size_t * _Buflen); | |
| /** | |
| * __mingw_str_free | |
| * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide. | |
| * @param[in] ptr memory block to free. | |
| * | |
| */ | |
| void __cdecl __mingw_str_free(void * _Ptr); | |
| _CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords); | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(wchar_t*,_getws_s,wchar_t,_DstBuf) | |
| #ifdef _UCRT | |
| int __cdecl __stdio_common_vswprintf_s(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); | |
| int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); | |
| int __cdecl __stdio_common_vfwprintf_s(unsigned __int64 _Options, FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); | |
| __mingw_ovr int __cdecl _vfwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _File, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vfwscanf_s(FILE* _File, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwscanf_s_l(_File, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwscanf_s_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vfwscanf_s_l(stdin, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vwscanf_s(const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwscanf_s_l(stdin, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _fwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwscanf_s_l(_File, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl fwscanf_s(FILE *_File, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwscanf_s_l(_File, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wscanf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwscanf_s_l(stdin, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl wscanf_s(const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwscanf_s_l(stdin, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vswscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _Src, (size_t)-1, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vswscanf_s(const wchar_t *_Src, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vswscanf_s_l(_Src, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _swscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswscanf_s_l(_Src, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl swscanf_s(const wchar_t *_Src, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vswscanf_s_l(_Src, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vsnwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _Src, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _snwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _snwscanf_s(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vfwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vfwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vwprintf_s_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return _vfwprintf_s_l(stdout, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vfwprintf_s(FILE *_File, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwprintf_s_l(_File, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vwprintf_s(const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vfwprintf_s_l(stdout, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _fwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_s_l(_File, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _wprintf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vfwprintf_s_l(stdout, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl fwprintf_s(FILE *_File, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwprintf_s_l(_File, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl wprintf_s(const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vfwprintf_s_l(stdout, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vswprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vswprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _DstSize, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl vswprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vswprintf_s_l(_DstBuf, _DstSize, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _swprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl swprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) | |
| { | |
| return __stdio_common_vsnwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _vsnwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList) | |
| { | |
| return _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); | |
| } | |
| __mingw_ovr int __cdecl _snwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Locale); | |
| _Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| __mingw_ovr int __cdecl _snwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, ...) | |
| { | |
| __builtin_va_list _ArgList; | |
| int _Ret; | |
| __builtin_va_start(_ArgList, _Format); | |
| _Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); | |
| __builtin_va_end(_ArgList); | |
| return _Ret; | |
| } | |
| #else /* _UCRT */ | |
| int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...); | |
| int __cdecl wprintf_s(const wchar_t *_Format,...); | |
| int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList); | |
| int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); | |
| int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); | |
| _CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); | |
| _CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); | |
| _CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| _CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl fwscanf_s(FILE *_File, const wchar_t *_Format, ...); | |
| _CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl swscanf_s(const wchar_t *_Src,const wchar_t *_Format,...); | |
| _CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); | |
| _CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| _CRTIMP int __cdecl wscanf_s(const wchar_t *_Format, ...); | |
| #endif /* !_UCRT */ | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vswprintf_s, wchar_t, _Dst, const wchar_t*, _Format, va_list, _ArgList) | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int,swprintf_s,vswprintf_s,wchar_t,_Dst,const wchar_t*,_Format) | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int,_vsnwprintf_s,wchar_t,_DstBuf,size_t,_MaxCount,const wchar_t*,_Format,va_list,_ArgList) | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(int,_snwprintf_s,_vsnwprintf_s,wchar_t,_DstBuf,size_t,_MaxCount,const wchar_t*,_Format) | |
| _CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); | |
| _CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); | |
| _CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); | |
| __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t,_wtmpnam_s,wchar_t,_DstBuf) | |
| _CRT_END_C_HEADER | |
| #endif /* _INC_CORECRT_WSTDIO */ |