Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

fgetwc(3) OSS Library Calls Reference Manual
NAME
fgetwc - Gets a wide character from a a specified input stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
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>
wint_t fgetwc(
FILE *stream);
PARAMETERS
stream Specifies the input data.
DESCRIPTION
The fgetwc( ) function gets the next wide character from the input stream specified by the stream
parameter.
RETURN VALUES
This function returns the wide character read or the constant WEOF (wide character End-Of-
File) at the end of the file or upon an error. The function sets errno when an error is encoun-
tered.
ERRORS
If any of the following conditions occur, the fgetwc( ) function sets errno to the corresponding
value:
[EAGAIN] The O_NONBLOCK flag is set for the underlying input stream and the process
would be delayed by the read operation.
[EBADF] The file descriptor underlying the input stream is not a valid file descriptor or is
not open for reading.
[EINTR] The read operation was interrupted by a signal which was caught and no data
was transferred.
[ENXIO] A request was made on a nonexistent device, or the request was outside the
capabilities of the device.
[EIO] The call is attempting to read from the process’s controlling terminal and either
the process is ignoring or blocking the SIGTTIN signal or the process group is
orphaned.
[ENOMEM] Insufficient memory is available for the operation.
[EOVERFLOW]
The call is attempting to read a file at or beyond the maximum file offset.
Any error encountered during the underlying call to the read( ) function can cause this function
to return the corresponding errno value reported by the read( ) function. If your application pro-
gram encounters an errno value not listed above, refer to the read(2) reference page either
online or in the Open System Services System Calls Reference Manual for information about the
cause of that error.
270 Hewlett-Packard Company 527187-017