[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

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.

Related Information

fwscanf, wscanf, swscanf Subroutines in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]