From 1ae09d5fb29260b4de72add7a2cdd0244912d00a Mon Sep 17 00:00:00 2001 From: Gijs Vermeulen Date: Tue, 10 Oct 2017 16:14:03 +0200 Subject: [PATCH] msvcrt: Add vf[w]printf_s_l. Signed-off-by: Gijs Vermeulen Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/file.c | 22 ++++++++++++++++++++-- dlls/msvcrt/msvcrt.spec | 4 ++-- 8 files changed, 34 insertions(+), 16 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index ef49177f543..f963c3bb64c 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1436,11 +1436,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index be4d8c18f19..721886e96c4 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1793,11 +1793,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 60e0a32ddda..24161447c20 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1811,11 +1811,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 38c2707a30f..fc7f72ca141 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1505,11 +1505,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) msvcr120._vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) msvcr120._vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) msvcr120._vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) msvcr120._vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 4d97db097c8..1f87e2a2151 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1115,11 +1115,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index eccbf3ceb65..f63f9796758 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1091,11 +1091,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l -@ stub _vfprintf_s_l +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l @ stub _vfwprintf_p @ stub _vfwprintf_p_l -@ stub _vfwprintf_s_l +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l @ stub _vprintf_l @ stub _vprintf_p @ stub _vprintf_p_l diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index db8cd5cb1ac..0746cf2772b 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -5084,6 +5084,24 @@ static int vfwprintf_helper(DWORD options, MSVCRT_FILE* file, const MSVCRT_wchar return ret; } +/********************************************************************* + * _vfprintf_s_l (MSVCRT.@) + */ +int CDECL MSVCRT__vfprintf_s_l(MSVCRT_FILE* file, const char *format, + MSVCRT__locale_t locale, __ms_va_list valist) +{ + return vfprintf_helper(MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist); +} + +/********************************************************************* + * _vfwprintf_s_l (MSVCRT.@) + */ +int CDECL MSVCRT__vfwprintf_s_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, + MSVCRT__locale_t locale, __ms_va_list valist) +{ + return vfwprintf_helper(MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist); +} + /********************************************************************* * vfprintf (MSVCRT.@) */ @@ -5097,7 +5115,7 @@ int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, __ms_va_list va */ int CDECL MSVCRT_vfprintf_s(MSVCRT_FILE* file, const char *format, __ms_va_list valist) { - return vfprintf_helper(MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, NULL, valist); + return MSVCRT__vfprintf_s_l(file, format, NULL, valist); } /********************************************************************* @@ -5113,7 +5131,7 @@ int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms */ int CDECL MSVCRT_vfwprintf_s(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list valist) { - return vfwprintf_helper(MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, NULL, valist); + return MSVCRT__vfwprintf_s_l(file, format, NULL, valist); } /********************************************************************* diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 50d051d537f..fcfa8fcca42 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1047,11 +1047,11 @@ @ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l # stub _vfprintf_p(ptr str ptr) # stub _vfprintf_p_l(ptr str ptr ptr) -# stub _vfprintf_s_l(ptr str ptr ptr) +@ cdecl _vfprintf_s_l(ptr str ptr ptr) MSVCRT__vfprintf_s_l @ cdecl _vfwprintf_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_l # stub _vfwprintf_p(ptr wstr ptr) # stub _vfwprintf_p_l(ptr wstr ptr ptr) -# stub _vfwprintf_s_l(ptr wstr ptr ptr) +@ cdecl _vfwprintf_s_l(ptr wstr ptr ptr) MSVCRT__vfwprintf_s_l # stub _vprintf_l(str ptr ptr) # stub _vprintf_p(str ptr) # stub _vprintf_p_l(str ptr ptr)