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

RETURN VALUE

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

ATTRIBUTES

38       For   an   explanation   of   the  terms  used  in  this  section,  see
39       attributes(7).
40
41       ┌──────────┬───────────────┬─────────┐
42Interface Attribute     Value   
43       ├──────────┼───────────────┼─────────┤
44ungetwc() │ Thread safety │ MT-Safe │
45       └──────────┴───────────────┴─────────┘

CONFORMING TO

47       POSIX.1-2001, POSIX.1-2008, C99.
48

NOTES

50       The behavior of ungetwc() depends on the LC_CTYPE category of the  cur‐
51       rent locale.
52

SEE ALSO

54       fgetwc(3)
55

COLOPHON

57       This  page  is  part of release 5.04 of the Linux man-pages project.  A
58       description of the project, information about reporting bugs,  and  the
59       latest     version     of     this    page,    can    be    found    at
60       https://www.kernel.org/doc/man-pages/.
61
62
63
64GNU                               2015-08-08                        UNGETWC(3)
Impressum