Jacek Caban : corecrt_wstdio.h: Add ucrt swscanf and swscanf_s declarations.
Alexandre Julliard
julliard at winehq.org
Tue Feb 25 17:23:07 CST 2020
Module: wine
Branch: master
Commit: 77be811dee24300021af89d43c0dea131923fd9c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=77be811dee24300021af89d43c0dea131923fd9c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Feb 25 08:27:58 2020 +0100
corecrt_wstdio.h: Add ucrt swscanf and swscanf_s declarations.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/msvcrt/corecrt_wstdio.h | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/include/msvcrt/corecrt_wstdio.h b/include/msvcrt/corecrt_wstdio.h
index 5b751b47f9..0a574ad8e0 100644
--- a/include/msvcrt/corecrt_wstdio.h
+++ b/include/msvcrt/corecrt_wstdio.h
@@ -78,8 +78,6 @@ wchar_t* __cdecl getws(wchar_t*);
wint_t __cdecl putwc(wint_t,FILE*);
wint_t __cdecl putwchar(wint_t);
int __cdecl putws(const wchar_t*);
-int WINAPIV swscanf(const wchar_t*,const wchar_t*,...);
-int WINAPIV swscanf_s(const wchar_t*,const wchar_t*,...);
wint_t __cdecl ungetwc(wint_t,FILE*);
int __cdecl vwprintf(const wchar_t*,__ms_va_list);
int __cdecl vwprintf_s(const wchar_t*,__ms_va_list);
@@ -98,6 +96,7 @@ _ACRTIMP int __cdecl __stdio_common_vswprintf_p(unsigned __int64,wchar_t*,size_t
_ACRTIMP int __cdecl __stdio_common_vswprintf_s(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
_ACRTIMP int __cdecl __stdio_common_vfwscanf(unsigned __int64,FILE*,const wchar_t*,_locale_t,__ms_va_list);
+_ACRTIMP int __cdecl __stdio_common_vswscanf(unsigned __int64,const 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)
{
@@ -248,6 +247,28 @@ static inline int WINAPIV fwprintf_s(FILE *file, const wchar_t *format, ...)
return ret;
}
+static inline int WINAPIV swscanf(const wchar_t *buffer, const wchar_t *format, ...)
+{
+ int ret;
+ __ms_va_list args;
+
+ __ms_va_start(args, format);
+ ret = __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, buffer, -1, format, NULL, args);
+ __ms_va_end(args);
+ return ret;
+}
+
+static inline int WINAPIV swscanf_s(const wchar_t *buffer, const wchar_t *format, ...)
+{
+ int ret;
+ __ms_va_list args;
+
+ __ms_va_start(args, format);
+ ret = __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, buffer, -1, format, NULL, args);
+ __ms_va_end(args);
+ return ret;
+}
+
static inline int WINAPIV fwscanf(FILE *file, const wchar_t *format, ...)
{
int ret;
@@ -282,8 +303,10 @@ _ACRTIMP int __cdecl _vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,__ms_va
_ACRTIMP int __cdecl _vswprintf_p_l(wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
_ACRTIMP int WINAPIV fwprintf(FILE*,const wchar_t*,...);
_ACRTIMP int WINAPIV fwprintf_s(FILE*,const wchar_t*,...);
+_ACRTIMP int WINAPIV swprintf_s(wchar_t*,size_t,const wchar_t*,...);
_ACRTIMP int __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
_ACRTIMP int __cdecl vfwprintf_s(FILE*,const wchar_t*,__ms_va_list);
+_ACRTIMP int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
int WINAPIV swprintf(wchar_t*,const wchar_t*,...);
@@ -304,8 +327,8 @@ static inline int WINAPIV swprintf(wchar_t *buffer, size_t size, const wchar_t *
_ACRTIMP int WINAPIV fwscanf(FILE*,const wchar_t*,...);
_ACRTIMP int WINAPIV fwscanf_s(FILE*,const wchar_t*,...);
-_ACRTIMP int WINAPIV swprintf_s(wchar_t*,size_t,const wchar_t*,...);
-_ACRTIMP int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
+_ACRTIMP int WINAPIV swscanf(const wchar_t*,const wchar_t*,...);
+_ACRTIMP int WINAPIV swscanf_s(const wchar_t*,const wchar_t*,...);
#endif /* _UCRT */
More information about the wine-cvs
mailing list