vfwscanf, vswscanf, or vwscanf Subroutine

Purpose

Wide-character formatted input of the argument list.

Syntax

#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>

int vfwscanf (stream, format, arg)
FILE *restrict stream;
const wchar_t format;
va_list arg;

int vswscanf (ws, format, arg)
const wchar_t *restrict ws;
const wchar_t format;
va_list arg;

int vwscanf (format, arg)
const wchar_t format;
va_list arg;

Description

The vfwscanf, vswscanf, and vwscanf subroutines are equivalent to the fwscanf, swscanf, and wscanf subroutines, respectively, except that instead of being called with a variable number of arguments, they are called with an argument list as defined in the <stdarg.h> header file. These subroutines do not invoke the va_end macro. As these subroutines invoke the va_arg macro, the value of ap after the return is unspecified.

Return Values

Upon successful completion, the vfwscanf, vswscanf, and vwscanf subroutines return the number of successfully matched and assigned input items. This number can be zero in the event of an early matching failure. If the input ends before the first matching failure or conversion, EOF is returned. If a read error occurs, the error indicator for the stream is set, EOF is returned, and the errno global variable is set to indicate the error.