Commit 0c14dc53 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added vscwprintf_{l,p_l} functions implementation.

parent 9b29faae
...@@ -1246,9 +1246,9 @@ ...@@ -1246,9 +1246,9 @@
@ stub _vscprintf_p @ stub _vscprintf_p
@ stub _vscprintf_p_l @ stub _vscprintf_p_l
@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf @ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf
@ stub _vscwprintf_l @ cdecl _vscwprintf_l(wstr ptr ptr) msvcrt._vscwprintf_l
@ stub _vscwprintf_p @ stub _vscwprintf_p
@ stub _vscwprintf_p_l @ cdecl _vscwprintf_p_l(wstr ptr ptr) msvcrt._vscwprintf_p_l
@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf @ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf
@ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c @ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c
@ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l
......
...@@ -1099,9 +1099,9 @@ ...@@ -1099,9 +1099,9 @@
@ stub _vscprintf_p @ stub _vscprintf_p
@ stub _vscprintf_p_l @ stub _vscprintf_p_l
@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf @ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf
@ stub _vscwprintf_l @ cdecl _vscwprintf_l(wstr ptr ptr) msvcrt._vscwprintf_l
@ stub _vscwprintf_p @ stub _vscwprintf_p
@ stub _vscwprintf_p_l @ cdecl _vscwprintf_p_l(wstr ptr ptr) msvcrt._vscwprintf_p_l
@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf @ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf
@ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c @ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c
@ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l
......
...@@ -1086,9 +1086,9 @@ ...@@ -1086,9 +1086,9 @@
@ stub _vscprintf_p @ stub _vscprintf_p
@ stub _vscprintf_p_l @ stub _vscprintf_p_l
@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf @ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf
@ stub _vscwprintf_l @ cdecl _vscwprintf_l(wstr ptr ptr) msvcrt._vscwprintf_l
@ stub _vscwprintf_p @ stub _vscwprintf_p
@ stub _vscwprintf_p_l @ cdecl _vscwprintf_p_l(wstr ptr ptr) msvcrt._vscwprintf_p_l
@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf @ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf
@ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c @ cdecl _vsnprintf_c(ptr long str ptr) msvcrt._vsnprintf_c
@ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) msvcrt._vsnprintf_c_l
......
...@@ -1031,8 +1031,8 @@ ...@@ -1031,8 +1031,8 @@
# stub _vscprintf_l(str ptr ptr) # stub _vscprintf_l(str ptr ptr)
# stub _vscprintf_p_l(str ptr ptr) # stub _vscprintf_p_l(str ptr ptr)
@ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf @ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf
# stub _vscwprintf_l(wstr ptr ptr) @ cdecl _vscwprintf_l(wstr ptr ptr) MSVCRT__vscwprintf_l
# stub _vscwprintf_p_l(wstr ptr ptr) @ cdecl _vscwprintf_p_l(wstr ptr ptr) MSVCRT__vscwprintf_p_l
@ cdecl _vsnprintf(ptr long str ptr) MSVCRT_vsnprintf @ cdecl _vsnprintf(ptr long str ptr) MSVCRT_vsnprintf
@ cdecl _vsnprintf_c(ptr long str ptr) MSVCRT_vsnprintf @ cdecl _vsnprintf_c(ptr long str ptr) MSVCRT_vsnprintf
@ cdecl _vsnprintf_c_l(ptr long str ptr ptr) MSVCRT_vsnprintf_l @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) MSVCRT_vsnprintf_l
......
...@@ -691,6 +691,35 @@ int CDECL MSVCRT_vsnwprintf_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, ...@@ -691,6 +691,35 @@ int CDECL MSVCRT_vsnwprintf_l(MSVCRT_wchar_t *str, MSVCRT_size_t len,
} }
/********************************************************************* /*********************************************************************
* _vswprintf_p_l (MSVCRT.@)
*/
int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args)
{
static const MSVCRT_wchar_t nullbyte = '\0';
printf_arg args_ctx[MSVCRT__ARGMAX+1];
struct _str_ctx_w puts_ctx = {length, buffer};
int ret;
memset(args_ctx, 0, sizeof(args_ctx));
ret = create_positional_ctx_w(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_w(puts_clbk_str_w, &puts_ctx, format, locale, TRUE, TRUE,
arg_clbk_valist, NULL, &args);
else
ret = pf_printf_w(puts_clbk_str_w, &puts_ctx, format, locale, TRUE, TRUE,
arg_clbk_positional, args_ctx, NULL);
puts_clbk_str_w(&puts_ctx, 1, &nullbyte);
return ret;
}
/*********************************************************************
* _vsnwprintf_s_l (MSVCRT.@) * _vsnwprintf_s_l (MSVCRT.@)
*/ */
int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer,
...@@ -860,6 +889,22 @@ int CDECL MSVCRT__vscwprintf( const MSVCRT_wchar_t *format, __ms_va_list args ) ...@@ -860,6 +889,22 @@ int CDECL MSVCRT__vscwprintf( const MSVCRT_wchar_t *format, __ms_va_list args )
} }
/********************************************************************* /*********************************************************************
* _vscwprintf_l (MSVCRT.@)
*/
int CDECL MSVCRT__vscwprintf_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args )
{
return MSVCRT_vsnwprintf_l( NULL, INT_MAX, format, locale, args );
}
/*********************************************************************
* _vscwprintf_p_l (MSVCRT.@)
*/
int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args )
{
return MSVCRT_vswprintf_p_l( NULL, INT_MAX, format, locale, args );
}
/*********************************************************************
* vswprintf_s (MSVCRT.@) * vswprintf_s (MSVCRT.@)
*/ */
int CDECL MSVCRT_vswprintf_s(MSVCRT_wchar_t* str, MSVCRT_size_t numberOfElements, int CDECL MSVCRT_vswprintf_s(MSVCRT_wchar_t* str, MSVCRT_size_t numberOfElements,
...@@ -933,35 +978,6 @@ int CDECL MSVCRT_sprintf_p_l(char *buffer, MSVCRT_size_t length, ...@@ -933,35 +978,6 @@ int CDECL MSVCRT_sprintf_p_l(char *buffer, MSVCRT_size_t length,
} }
/********************************************************************* /*********************************************************************
* _vswprintf_p_l (MSVCRT.@)
*/
int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args)
{
static const MSVCRT_wchar_t nullbyte = '\0';
printf_arg args_ctx[MSVCRT__ARGMAX+1];
struct _str_ctx_w puts_ctx = {length, buffer};
int ret;
memset(args_ctx, 0, sizeof(args_ctx));
ret = create_positional_ctx_w(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_w(puts_clbk_str_w, &puts_ctx, format, locale, TRUE, TRUE,
arg_clbk_valist, NULL, &args);
else
ret = pf_printf_w(puts_clbk_str_w, &puts_ctx, format, locale, TRUE, TRUE,
arg_clbk_positional, args_ctx, NULL);
puts_clbk_str_w(&puts_ctx, 1, &nullbyte);
return ret;
}
/*********************************************************************
* _swprintf_p_l (MSVCRT.@) * _swprintf_p_l (MSVCRT.@)
*/ */
int CDECL MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, int CDECL MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment