Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C99 |
both | z/OS® V1R7 |
#define _ISOC99_SOURCE
#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>
int vfwscanf(FILE *__restrict__ stream,
const wchar_t *__restrict__ format, va_list arg);
int vwscanf(const wchar_t *__restrict__ format, va_list arg);
int vswscanf(const wchar_t *__restrict__ ws,
const wchar_t *__restrict__ format, va_list arg);
#define _OPEN_SYS_UNLOCKED_EXT 1
#include <wchar.h>
int vfwscanf_unlocked(FILE *__restrict__ stream,
const wchar_t *__restrict__ format, va_list arg);
int vwscanf_unlocked(const wchar_t *__restrict__ ws,
const wchar_t *__restrict__ format, va_list arg);
The vfwscanf(), vswscanf(), and vwscanf() functions are equivalent to the fwscanf(), swscanf(), and wscanf() functions, respectively, except that instead of being called with a variable number of arguments, they are called with an argument list as defined in stdarg.h.
The argument list should be initialized using the va_start macro before each call. These functions do not invoke the va_end macro, but instead invoke the va_arg macro causing the value of arg after the return to be unspecified.
vfwscanf() and vwscanf() are not supported for files opened with a record type. They also have the same restrictions as a write immediately following a read or a read immediately following a write. This is because, between a write and a subsequent read, there must be an intervening flush or reposition and between a read and a subsequent write, there must also be an intervening flush or reposition unless EOF has been reached.
vfwscanf_unlocked() and vwscanf_unlocked() are functionally equivalent to vfwscanf() and vwscanf() with the exception that they are not thread-safe. These functions may safely be used in a multithreaded application if and only if they are called while the invoking thread owns the (FILE*) object, as is the case after a successful call to either the flockfile() or ftrylockfile() function.
Refer to fwscanf().