### 4.67 `vfwprintf`, `vwprintf`, `vswprintf`—wide character format argument list

Synopsis

    #include <stdio.h>
    #include <stdarg.h>
    #include <wchar.h>
    int vwprintf(const wchar_t *__restrict fmt, va_list list);
    int vfwprintf(FILE *__restrict fp,
        const wchar_t *__restrict fmt, va_list list);
    int vswprintf(wchar_t * __restrict str, size_t size,
        const wchar_t *__ restrict fmt, va_list list);

    int _vwprintf_r(struct _reent *reent, const wchar_t *fmt,
        va_list list);
    int _vfwprintf_r(struct _reent *reent, FILE *fp,
        const wchar_t *fmt, va_list list);
    int _vswprintf_r(struct _reent *reent, wchar_t *str,
        size_t size, const wchar_t *fmt, va_list list);

Description
`vwprintf`, `vfwprintf` and `vswprintf` are (respectively) variants of `wprintf`, `fwprintf` and `swprintf`. They differ only in allowing their caller to pass the variable argument list as a `va_list` object (initialized by `va_start`) rather than directly accepting a variable number of arguments. The caller is responsible for calling `va_end`.

`_vwprintf_r`, `_vfwprintf_r` and `_vswprintf_r` are reentrant versions of the above.

Returns
The return values are consistent with the corresponding functions.

Portability
POSIX-1.2008 with extensions; C99 (compliant except for POSIX extensions).

Supporting OS subroutines required: `close`, `fstat`, `isatty`, `lseek`, `read`, `sbrk`, `write`.

See Also
`wprintf`, `fwprintf` and `swprintf`.