fwscanf

Reads input from the stream under control of the wide-character format string.

Format

#include  <wchar.h>

int fwscanf  (FILE *stream, const wchar_t
             *format, . . . );

Arguments

stream
A file pointer.
format
A pointer to a wide-character string containing the format specification. For more information about format and conversion specifications and their corresponding arguments, see Chapter 2.
. . .
Optional expressions whose results correspond to conversion specifications given in the format specification. For more information about format and conversion specifications and their corresponding arguments, see Chapter 2.

If no conversion specifications are given, you can omit the input pointers. Otherwise, the function calls must have exactly as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers.

Conversion specifications are matched to input sources in left-to- right order. Excess input pointers, if any, are ignored.

Description

This function reads input from the stream pointed to by stream under the control of the wide-character string pointed to by format. If there are insufficient arguments for the format, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are evaluated, but otherwise ignored.

The format is composed of zero or more directives that include:

Each conversion specification is introduced by the wide character %.

If the stream pointed to by the stream argument has no orientation, fwscanf makes the stream wide-oriented.

Return Values
The number of input items assigned, sometimes fewer than provided for, or even zero, in the event of an early matching failure. 
EOF  Indicates an error; input failure occurs before any conversion. 


Previous Page | Next Page | Table of Contents | Index