Pushes a character back onto the stream.
int _ungetc_nolock( int c, FILE *stream ); wint_t _ungetwc_nolock( wint_t c, FILE *stream );
Character to be pushed.
If successful, each of these functions returns the character argument
c can't be pushed back or if no character has been read, the input stream is unchanged and
WEOF is returned, and
errno is set to
For information on these and other error codes, see
These functions are non-locking versions of
ungetwc. The versions with the
_nolock suffix are identical except that they aren't protected from interference by other threads. They may be faster since they don't incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.
Generic-text routine mappings
||<stdio.h> or <wchar.h>|
For more compatibility information, see Compatibility.