vsscanf() — Format Input of a STDARG Argument List

Format

#define _ISOC99_SOURCE
#include <stdarg.h>
#include <stdio.h>

int vsscanf(const char *__restrict__ s, 
            const char *__restrict__ format, va_list arg);

General Description

The vsscanf() function is equivalent to the sscanf() function, except that instead of being called with a variable number of arguments, it is called with an argument list as defined in stdarg.h.

Initialize the argument list by 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.

Notes:
  1. Use of vsscanf() requires that an environment has been set up by using the __cinit() function. When the function is called, GPR 12 must contain the environment token created by the __cinit() call.
  2. In contrast to some UNIX-based implementations of the C language, the z/OS® XL C/C++ implementation of the vscanf() family increments the pointer to the variable arguments list. To control whether the pointer is incremented, call the va_end macro after each function call.

Returned Value

See sscanf() — Read and Format Data.

Related Information