Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
ungetwc(3) Guardian Native C Library Calls Reference Manual
NAME
ungetwc - Pushes a wide character back into the 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 ungetwc(
wint_t wchar,
FILE *stream);
PARAMETERS
c Specifies a byte to be inserted into the input stream.
stream Specifies the input stream.
DESCRIPTION
The ungetwc() function inserts the character corresponding to the wide character code specified
by wchar into the buffer associated with the input stream. The character may consist of one or
more bytes. This causes the next call to the getwc() function to return the value of the wchar
parameter.
If the ungetwc() wchar parameter is WEOF, the ungetwc( ) function does not place anything in
the buffer and the input stream is unchanged.
NOTES
The ungetwc() function does not have any effect on the external storage corresponding to the
stream.
RETURN VALUES
The ungetwc() function returns a value of wchar if it succeeds in inserting the character in the
stream. Otherwise, it returns a value of WEOF.
ERRORS
If the following condition occurs, the ungetwc( ) function sets errno to the corresponding value.
[EILSEQ] Indicates that the wide character code does not correspond to a valid character.
RELATED INFORMATION
Functions: fseek(3), getc(3), getwc(3), setbuf(3), ungetc(3).
7−54 Hewlett-Packard Company 527192-018