stdio.h: Add ucrt _scprintf declaration.

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-21 16:40:38 +01:00 committed by Alexandre Julliard
parent 2f25af095d
commit 9bfd465236
2 changed files with 13 additions and 12 deletions

View File

@ -114,16 +114,6 @@ void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func, const
{
_invalid_parameter_noinfo();
}
int WINAPIV _scprintf(const char* fmt, ...)
{
int ret;
__ms_va_list valist;
__ms_va_start(valist, fmt);
ret = _vsnprintf(NULL, 0, fmt, valist);
__ms_va_end(valist);
return ret;
}
#endif
static void init_cxx_funcs(void)

View File

@ -87,7 +87,6 @@ int __cdecl _setmaxstdio(int);
int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...);
char* __cdecl _tempnam(const char*,const char*);
int __cdecl _unlink(const char*);
int WINAPIV _scprintf(const char*,...);
size_t __cdecl _fread_nolock(void*,size_t,size_t,FILE*);
size_t __cdecl _fread_nolock_s(void*,size_t,size_t,size_t,FILE*);
@ -147,7 +146,6 @@ int WINAPIV scanf_s(const char*,...);
void __cdecl setbuf(FILE*,char*);
int __cdecl setvbuf(FILE*,char*,int,size_t);
int WINAPIV sprintf_s(char*,size_t,const char*,...);
int WINAPIV _scprintf(const char *, ...);
int WINAPIV sscanf(const char*,const char*,...);
int WINAPIV sscanf_s(const char*,const char*,...);
int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...);
@ -195,6 +193,18 @@ static inline int __cdecl _vscprintf(const char *format, __ms_va_list args)
return ret < 0 ? -1 : ret;
}
static inline int WINAPIV _scprintf(const char *format, ...)
{
int ret;
__ms_va_list args;
__ms_va_start(args, format);
ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
NULL, 0, format, NULL, args);
__ms_va_end(args);
return ret;
}
static inline int __cdecl vsprintf(char *buffer, const char *format, __ms_va_list args)
{
int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION,
@ -226,6 +236,7 @@ static inline int __cdecl vfprintf_s(FILE *file, const char *format, __ms_va_lis
#else /* _UCRT */
_ACRTIMP int WINAPIV _scprintf(const char *,...);
_ACRTIMP int __cdecl _vscprintf(const char*,__ms_va_list);
_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,__ms_va_list);
_ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,__ms_va_list);