[PATCH v3] ucrtbase: Implement some printf functions

Piotr Caban piotr.caban at gmail.com
Tue Oct 27 14:32:59 CDT 2015


Hi,

On 10/26/15 16:53, Martin Storsjo wrote:
> --- a/dlls/msvcrt/printf.h
> +++ b/dlls/msvcrt/printf.h
> +static int FUNC_NAME(puts_clbk_str_c99)(void *ctx, int len, const APICHAR *str)
I think that it would be nicer if this function is added in wcs.c. Other 
callback functions are already added to files that uses them (e.g. 
file.c defines callbacks for functions printing to files).

>   /*********************************************************************
> + *		__stdio_common_vsprintf (MSVCRT.@)
> + */
> +int CDECL MSVCRT__stdio_common_vsprintf( unsigned __int64 options, char *str, MSVCRT_size_t len, const char *format,
> +                                         MSVCRT__locale_t locale, __ms_va_list valist )
> +{
> +    static const char nullbyte = '\0';
> +    struct _str_ctx_a ctx = {len, str};
> +    int ret;
> +
> +    ret = pf_printf_a(options & 2 ? puts_clbk_str_c99_a : puts_clbk_str_a,
> +            &ctx, format, locale, FALSE, FALSE, arg_clbk_valist, NULL, &valist);
Is there any guarantee that options can only equal 1 or 2? If not please 
add a FIXME for other values.

Thanks,
Piotr



More information about the wine-devel mailing list