wint_t ungetwc(wchar_t wc,
The ungetwc() function pushes the wide character
wc back onto the input stream pointed to by
stream. If stream is open in text mode, then the
multibyte form of wc is pushed. The end-of-file indicator
for stream is cleared, and subsequent reads will get any
pushed back bytes in the reverse order that they were pushed. No
actual writes, however, are performed to the file or other
underlying storage of stream.
A successful call to a file-positioning
function for stream, such as fsetpos()
or rewind(), discards all pushed back characters of
The pushback buffer is limited.
Repeated calls to ungetwc() with no intervening read or
file positioning operations fail.
Is the wide character to push back onto stream.
Points to the input stream.
If successful, the ungetwc()
function returns the wide character that it pushed back. On
failure, ungetwc() returns WEOF;
if the failure is the result of an
inability to translate wc into multibyte form,
errno is set to EILSEQ.
ANSI/ISO 9899-1990/AM 1-1995.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- fputwc(), fsetpos(), rewind(), ungetc()
PTC MKS Toolkit 10.2 Documentation Build 28.