diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 29cbe7fb5fc..c1eb5949eb0 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1446,8 +1446,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) MSVCRT__vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) MSVCRT__vscwprintf_p diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 9017921b163..c0bc9e1c6b9 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1804,8 +1804,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) MSVCRT__vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) MSVCRT__vscwprintf_p diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index c675436827d..0faf1f03dda 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1819,8 +1819,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) MSVCRT__vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) MSVCRT__vscwprintf_p diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 760f8f9179b..eddb27d48f3 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1516,8 +1516,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) msvcr120._vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) msvcr120._vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) msvcr120._vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) msvcr120._vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) msvcr120._vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) msvcr120._vscwprintf_p diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index fbe42f3b231..13a22701894 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1126,8 +1126,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) MSVCRT__vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) MSVCRT__vscwprintf_p diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 9623aa5b4cb..e53f622fb31 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1101,8 +1101,8 @@ @ stub _vprintf_s_l @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf @ stub _vscprintf_l -@ stub _vscprintf_p -@ stub _vscprintf_p_l +@ cdecl _vscprintf_p(str ptr) MSVCRT__vscprintf_p +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p(wstr ptr) MSVCRT__vscwprintf_p diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 141cd9e1b3c..7156a5035fb 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1059,7 +1059,7 @@ @ cdecl _utime(str ptr) @ cdecl _vscprintf(str ptr) MSVCRT__vscprintf # stub _vscprintf_l(str ptr ptr) -# stub _vscprintf_p_l(str ptr ptr) +@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l @ cdecl _vscwprintf_p_l(wstr ptr ptr) MSVCRT__vscwprintf_p_l diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 935c2649e60..771f6f6f319 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -824,6 +824,42 @@ int CDECL MSVCRT__vscprintf( const char *format, __ms_va_list valist ) return MSVCRT_vsnprintf( NULL, INT_MAX, format, valist ); } +/********************************************************************* + * _vscprintf_p_l (MSVCRT.@) + */ +int CDECL MSVCRT__vscprintf_p_l(const char *format, + MSVCRT__locale_t locale, __ms_va_list args) +{ + printf_arg args_ctx[MSVCRT__ARGMAX+1]; + struct _str_ctx_a puts_ctx = {INT_MAX, NULL}; + int ret; + + memset(args_ctx, 0, sizeof(args_ctx)); + + ret = create_positional_ctx_a(args_ctx, format, args); + if(ret < 0) { + MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); + *MSVCRT__errno() = MSVCRT_EINVAL; + return ret; + } else if(ret == 0) { + ret = pf_printf_a(puts_clbk_str_a, &puts_ctx, format, locale, FALSE, TRUE, + arg_clbk_valist, NULL, &args); + } else { + ret = pf_printf_a(puts_clbk_str_a, &puts_ctx, format, locale, TRUE, TRUE, + arg_clbk_positional, args_ctx, NULL); + } + + return ret; +} + +/********************************************************************* + * _vscprintf_p (MSVCR80.@) + */ +int CDECL MSVCRT__vscprintf_p(const char *format, __ms_va_list argptr) +{ + return MSVCRT__vscprintf_p_l(format, NULL, argptr); +} + /********************************************************************* * _snprintf (MSVCRT.@) */