1UNGETWC(3)                 Linux Programmer's Manual                UNGETWC(3)
2
3
4

NAME

6       ungetwc - push back a wide character onto a FILE stream
7

SYNOPSIS

9       #include <wchar.h>
10
11       wint_t ungetwc(wint_t wc, FILE *stream);
12

DESCRIPTION

14       The ungetwc() function is the wide-character equivalent of the ungetc()
15       function. It pushes back a wide character onto stream and returns it.
16
17       If wc is WEOF, it returns WEOF. If wc is an invalid wide character,  it
18       sets errno to EILSEQ and returns WEOF.
19
20       If  wc is a valid wide character, it is pushed back onto the stream and
21       thus becomes available for future wide character read operations.   The
22       file-position  indicator is decremented by one or more. The end-of-file
23       indicator is cleared. The backing storage of the file is not affected.
24
25       Note: wc need not be the last wide character read from the  stream;  it
26       can be any other valid wide character.
27
28       If  the implementation supports multiple push-back operations in a row,
29       the pushed-back wide characters will be read in reverse order; however,
30       only one level of push-back is guaranteed.
31

RETURN VALUE

33       The  ungetwc()  function returns wc when successful, or WEOF upon fail‐
34       ure.
35

CONFORMING TO

37       C99.
38

SEE ALSO

40       fgetwc(3)
41

NOTES

43       The behaviour of ungetwc() depends on the LC_CTYPE category of the cur‐
44       rent locale.
45
46
47
48GNU                               1999-09-19                        UNGETWC(3)
Impressum