Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (e - f) fwide(3)
NAME
fwide - Converts formatted input read from an input stream
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <wchar.h>
#include <stdio.h> /* optional except for POSIX.1 */
int fwide(
FILE *stream,
int *mode
);
PARAMETERS
stream Specifies the input stream.
mode Specifies the orientation of the stream. If mode is greater than 0 (zero), the func-
tion first attempts to make the stream wide-oriented. If mode is less than 0
(zero), the function first attempts to make the stream byte-oriented. If mode is 0
(zero), the function does not alter the orientation of the stream.
DESCRIPTION
The fwide( ) function determines the orientation of the stream pointed to by the stream parame-
ter. You can use the fwide( ) function with the mode parameter set to 0 (zero) to determine the
current orientation of the stream.
If the orientation of the stream has already been determined, the fwide( ) funtion does not change
the orientation. Because no return value is reserved to indicate an error for this condition, to
check for errors, you must set errno to 0 (zero), then call fwide( ), then check errno.Iferrno is
non-zero, an error has occurred.
RETURN VALUES
The fwide( ) function returns one of these values:
greater than 0 (zero)
The stream has a wide-orientation after the call to fwide( ) is complete.
less than 0 (zero)
The stream has a byte-orientation after the call to fwide( ) is complete.
0 (zero) The stream has no orientation.
ERRORS
This function does not return errors.
RELATED INFORMATION
Functions: fprintf(3), fwprintf(3).
STANDARDS CONFORMANCE
The behavior of this function conforms to the ISO/IEC 9899:1999 standard.
527187-017 Hewlett-Packard Company 2−209