Reads formatted wide-character input using a variable argument list object
#include <stdarg.h>
#include <wchar.h>
int vswscanf ( const wchar_t * restrict s , const wchar_t * restrict format ,
va_list argptr );
int vwscanf ( const wchar_t * restrict format , va_list argptr );
#include <stdio.h> // (in addition to <stdarg.h> and <wchar.h>)
int vfwscanf ( FILE * restrict fp , const wchar_t * restrict format ,
va_list argptr );
The functions vfwscanf( ), vswscanf( ), and vwscanf( ) are like fwscanf( ), swscanf( ), and wscanf( ), respectively, except that their final argument, argptr, is a variable-argument list object with type va_list. The program must initialize this object by calling the va_start( ) macro before calling the vfwscanf( ), vswscanf( ), or vwscanf( ) function, and must call the va_end( ) macro after the function returns. Because these functions use the va_arg( ) macro internally to advance the pointer through the argument list, its value is indeterminate after the vfwprintf( ), vswprintf( ), or vwprintf( ) function call has returned. The vfwscanf( ), vswscanf( ), and vwscanf( ) functions return the number of input items assigned to variables, which may be 0; or EOF if an input failure occurs before any conversion takes place. ExampleSee the example for the corresponding byte-character function vfscanf( ) in this chapter. See Alsova_start( ), va_arg( ), va_copy( ) and va_end( ); fwscanf( ), swscanf( ), and wscanf( ); vfwprintf( ), vswprintf( ), and vwprintf( ) |