corecrt_wstdio.h: Add ucrt _snwprintf_s and _vsnwprintf_s declarations.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-02-24 15:33:35 +01:00 committed by Alexandre Julliard
parent eec622931f
commit ee02f93cc9
1 changed files with 20 additions and 2 deletions

View File

@ -55,12 +55,10 @@ wint_t __cdecl _getwc_nolock(FILE*);
wchar_t* __cdecl _getws(wchar_t*);
wint_t __cdecl _putwc_nolock(wint_t,FILE*);
int __cdecl _putws(const wchar_t*);
int WINAPIV _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...);
int WINAPIV _scwprintf(const wchar_t*,...);
wint_t __cdecl _ungetwc_nolock(wint_t,FILE*);
int __cdecl _vscwprintf(const wchar_t*,__ms_va_list);
int __cdecl _vscwprintf_p_l(const wchar_t*,_locale_t,__ms_va_list);
int __cdecl _vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,__ms_va_list);
int __cdecl _vswprintf_p_l(wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
FILE* __cdecl _wfdopen(int,const wchar_t*);
FILE* __cdecl _wfopen(const wchar_t*,const wchar_t*);
@ -104,6 +102,7 @@ int WINAPIV wscanf_s(const wchar_t*,...);
#ifdef _UCRT
_ACRTIMP int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64,wchar_t*,size_t,size_t,const wchar_t*,_locale_t,__ms_va_list);
_ACRTIMP int __cdecl __stdio_common_vswprintf(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
static inline int __cdecl _vsnwprintf(wchar_t *buffer, size_t size, const wchar_t *format, __ms_va_list args)
@ -123,6 +122,23 @@ static inline int WINAPIV _snwprintf(wchar_t *buffer, size_t size, const wchar_t
return ret;
}
static inline int __cdecl _vsnwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, __ms_va_list args)
{
int ret = __stdio_common_vsnwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, count, format, NULL, args);
return ret < 0 ? -1 : ret;
}
static inline int __cdecl _snwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, ...)
{
int ret;
__ms_va_list args;
__ms_va_start(args, format);
ret = __stdio_common_vsnwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, count, format, NULL, args);
__ms_va_end(args);
return ret;
}
static inline int WINAPIV vswprintf(wchar_t *buffer, size_t size, const wchar_t *format, __ms_va_list args)
{
int ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args);
@ -160,7 +176,9 @@ static inline int WINAPIV _swprintf(wchar_t *buffer, const wchar_t *format, ...)
#else /* _UCRT */
_ACRTIMP int WINAPIV _snwprintf(wchar_t*,size_t,const wchar_t*,...);
_ACRTIMP int WINAPIV _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...);
_ACRTIMP int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
_ACRTIMP int __cdecl _vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,__ms_va_list);
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
int WINAPIV swprintf(wchar_t*,const wchar_t*,...);