Jacek Caban : corecrt_wstdio.h: Add ucrt fwscanf and fwscanf_s declarations.

Alexandre Julliard julliard at winehq.org
Mon Feb 24 15:23:54 CST 2020


Module: wine
Branch: master
Commit: f152ff91503efe125ea1a5bb068b85add833235c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f152ff91503efe125ea1a5bb068b85add833235c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 24 15:34:26 2020 +0100

corecrt_wstdio.h: Add ucrt fwscanf and fwscanf_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 | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/corecrt_wstdio.h b/include/msvcrt/corecrt_wstdio.h
index fa2580567f..d0d8ed952c 100644
--- a/include/msvcrt/corecrt_wstdio.h
+++ b/include/msvcrt/corecrt_wstdio.h
@@ -72,8 +72,6 @@ wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
 wint_t   __cdecl fputwc(wint_t,FILE*);
 int      __cdecl fputws(const wchar_t*,FILE*);
 int      __cdecl fputws(const wchar_t*,FILE*);
-int      WINAPIV fwscanf(FILE*,const wchar_t*,...);
-int      WINAPIV fwscanf_s(FILE*,const wchar_t*,...);
 wint_t   __cdecl getwc(FILE*);
 wint_t   __cdecl getwchar(void);
 wchar_t* __cdecl getws(wchar_t*);
@@ -100,6 +98,8 @@ _ACRTIMP int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64,wchar_t*,size_
 _ACRTIMP int __cdecl __stdio_common_vswprintf(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
 _ACRTIMP int __cdecl __stdio_common_vswprintf_p(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);
+
 static inline int __cdecl _vsnwprintf(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);
@@ -232,6 +232,28 @@ static inline int WINAPIV fwprintf_s(FILE *file, const wchar_t *format, ...)
     return ret;
 }
 
+static inline int WINAPIV fwscanf(FILE *file, const wchar_t *format, ...)
+{
+    int ret;
+    __ms_va_list args;
+
+    __ms_va_start(args, format);
+    ret = __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, file, format, NULL, args);
+    __ms_va_end(args);
+    return ret;
+}
+
+static inline int WINAPIV fwscanf_s(FILE *file, const wchar_t *format, ...)
+{
+    int ret;
+    __ms_va_list args;
+
+    __ms_va_start(args, format);
+    ret = __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, file, format, NULL, args);
+    __ms_va_end(args);
+    return ret;
+}
+
 #else /* _UCRT */
 
 _ACRTIMP int WINAPIV _scwprintf(const wchar_t*,...);
@@ -264,6 +286,9 @@ static inline int WINAPIV swprintf(wchar_t *buffer, size_t size, const wchar_t *
 }
 #endif  /*  _CRT_NON_CONFORMING_SWPRINTFS */
 
+_ACRTIMP int WINAPIV fwscanf(FILE*,const wchar_t*,...);
+_ACRTIMP int WINAPIV fwscanf_s(FILE*,const wchar_t*,...);
+
 #endif /* _UCRT */
 
 #ifdef __cplusplus




More information about the wine-cvs mailing list