Jacek Caban : corecrt_wstdio.h: Add ucrt fwprintf_s and vfwprintf_s declarations.

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


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

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

corecrt_wstdio.h: Add ucrt fwprintf_s and vfwprintf_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 | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/corecrt_wstdio.h b/include/msvcrt/corecrt_wstdio.h
index 05f1d7f63f..fa2580567f 100644
--- a/include/msvcrt/corecrt_wstdio.h
+++ b/include/msvcrt/corecrt_wstdio.h
@@ -71,7 +71,6 @@ wint_t   __cdecl fgetwc(FILE*);
 wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
 wint_t   __cdecl fputwc(wint_t,FILE*);
 int      __cdecl fputws(const wchar_t*,FILE*);
-int      WINAPIV fwprintf_s(FILE*,const wchar_t*,...);
 int      __cdecl fputws(const wchar_t*,FILE*);
 int      WINAPIV fwscanf(FILE*,const wchar_t*,...);
 int      WINAPIV fwscanf_s(FILE*,const wchar_t*,...);
@@ -85,7 +84,6 @@ int      WINAPIV swprintf_s(wchar_t*,size_t,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 vfwprintf_s(FILE*,const wchar_t*,__ms_va_list);
 int      __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
 int      __cdecl vwprintf(const wchar_t*,__ms_va_list);
 int      __cdecl vwprintf_s(const wchar_t*,__ms_va_list);
@@ -97,6 +95,7 @@ int      WINAPIV wscanf_s(const wchar_t*,...);
 #ifdef _UCRT
 
 _ACRTIMP int __cdecl __stdio_common_vfwprintf(unsigned __int64,FILE*,const wchar_t*,_locale_t,__ms_va_list);
+_ACRTIMP int __cdecl __stdio_common_vfwprintf_s(unsigned __int64,FILE*,const wchar_t*,_locale_t,__ms_va_list);
 _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);
 _ACRTIMP int __cdecl __stdio_common_vswprintf_p(unsigned __int64,wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
@@ -217,6 +216,22 @@ static inline int WINAPIV fwprintf(FILE *file, const wchar_t *format, ...)
     return ret;
 }
 
+static inline int vfwprintf_s(FILE *file, const wchar_t *format, __ms_va_list args)
+{
+    return __stdio_common_vfwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, args);
+}
+
+static inline int WINAPIV fwprintf_s(FILE *file, const wchar_t *format, ...)
+{
+    int ret;
+    __ms_va_list args;
+
+    __ms_va_start(args, format);
+    ret = vfwprintf_s(file, format, args);
+    __ms_va_end(args);
+    return ret;
+}
+
 #else /* _UCRT */
 
 _ACRTIMP int WINAPIV _scwprintf(const wchar_t*,...);
@@ -228,7 +243,9 @@ _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);
 _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 __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
+_ACRTIMP int __cdecl vfwprintf_s(FILE*,const wchar_t*,__ms_va_list);
 
 #ifdef _CRT_NON_CONFORMING_SWPRINTFS
 int WINAPIV swprintf(wchar_t*,const wchar_t*,...);




More information about the wine-cvs mailing list