From 4a75c37b41a8dabbdd96b6b255a98b6eb814e323 Mon Sep 17 00:00:00 2001 From: Gijs Vermeulen Date: Tue, 19 Sep 2017 01:41:52 +0200 Subject: [PATCH] msvcrt: Add _vfprintf_l. Signed-off-by: Gijs Vermeulen Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/file.c | 20 ++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 2 +- 8 files changed, 27 insertions(+), 7 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index a8c7862ceb7..1c95da9981b 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1433,7 +1433,7 @@ @ stub _vcwprintf_p_l @ stub _vcwprintf_s @ stub _vcwprintf_s_l -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 5f4c497d715..86209ac3b67 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1790,7 +1790,7 @@ @ stub _vcwprintf_p_l @ stub _vcwprintf_s @ stub _vcwprintf_s_l -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 75f0428343f..c091bd152d4 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1808,7 +1808,7 @@ @ stub _vcwprintf_p_l @ stub _vcwprintf_s @ stub _vcwprintf_s_l -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index cd9c44dd91e..01932825b25 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1502,7 +1502,7 @@ @ cdecl _utime32(str ptr) msvcr120._utime32 @ cdecl _utime64(str ptr) msvcr120._utime64 @ cdecl _vacopy(ptr ptr) msvcr120._vacopy -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) msvcr120._vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 5cc86918504..a08748c351b 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1112,7 +1112,7 @@ @ stub _vcwprintf_p_l @ stub _vcwprintf_s @ stub _vcwprintf_s_l -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 57a4741c2eb..1604d623d83 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1088,7 +1088,7 @@ @ stub _vcwprintf_p_l @ stub _vcwprintf_s @ stub _vcwprintf_s_l -@ stub _vfprintf_l +@ cdecl _vfprintf_l(ptr str ptr ptr) MSVCRT__vfprintf_l @ stub _vfprintf_p @ stub _vfprintf_p_l @ stub _vfprintf_s_l diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index eb474c56b95..8af9bc2db48 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -5214,6 +5214,26 @@ int CDECL MSVCRT__stdio_common_vfwprintf_s(unsigned __int64 options, MSVCRT_FILE } /********************************************************************* + * _vfprintf_l (MSVCRT.@) + */ +int CDECL MSVCRT__vfprintf_l(MSVCRT_FILE* file, const char *format, + MSVCRT__locale_t locale, __ms_va_list valist) +{ + BOOL tmp_buf; + int ret; + + if(!MSVCRT_CHECK_PMT(file != NULL)) return -1; + + MSVCRT__lock_file(file); + tmp_buf = add_std_buffer(file); + ret = pf_printf_a(puts_clbk_file_a, file, format, locale, 0, arg_clbk_valist, NULL, &valist); + if(tmp_buf) remove_std_buffer(file); + MSVCRT__unlock_file(file); + + return ret; +} + +/********************************************************************* * _vfwprintf_l (MSVCRT.@) */ int CDECL MSVCRT__vfwprintf_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 1e2b0434a73..4e803086256 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1044,7 +1044,7 @@ # stub _vcwprintf_p_l(wstr ptr ptr) # stub _vcwprintf_s(wstr ptr) # stub _vcwprintf_s_l(wstr ptr ptr) -# stub _vfprintf_l(ptr str ptr ptr) +@ 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) -- 2.11.4.GIT