]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) Bruno Haible <haible@clisp.cons.org> |
2 | .\" | |
89e3ffe9 | 3 | .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) |
fea681da MK |
4 | .\" This is free documentation; you can redistribute it and/or |
5 | .\" modify it under the terms of the GNU General Public License as | |
6 | .\" published by the Free Software Foundation; either version 2 of | |
7 | .\" the License, or (at your option) any later version. | |
fe382ebf | 8 | .\" %%%LICENSE_END |
fea681da MK |
9 | .\" |
10 | .\" References consulted: | |
11 | .\" GNU glibc-2 source code and manual | |
12 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 13 | .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html |
fea681da MK |
14 | .\" ISO/IEC 9899:1999 |
15 | .\" | |
16 | .TH UNGETWC 3 1999-09-19 "GNU" "Linux Programmer's Manual" | |
17 | .SH NAME | |
18 | ungetwc \- push back a wide character onto a FILE stream | |
19 | .SH SYNOPSIS | |
20 | .nf | |
21 | .B #include <wchar.h> | |
22 | .sp | |
23 | .BI "wint_t ungetwc(wint_t " wc ", FILE *" stream ); | |
24 | .fi | |
25 | .SH DESCRIPTION | |
60a90ecd MK |
26 | The |
27 | .BR ungetwc () | |
28 | function is the wide-character equivalent of the | |
9daa4fb9 | 29 | .BR ungetc (3) |
c13182ef MK |
30 | function. |
31 | It pushes back a wide character onto \fIstream\fP and returns it. | |
fea681da | 32 | .PP |
f3fef736 | 33 | If \fIwc\fP is \fBWEOF\fP, it returns \fBWEOF\fP. |
c13182ef | 34 | If \fIwc\fP is an invalid wide character, |
f3fef736 | 35 | it sets \fIerrno\fP to \fBEILSEQ\fP and returns \fBWEOF\fP. |
fea681da MK |
36 | .PP |
37 | If \fIwc\fP is a valid wide character, it is pushed back onto the stream | |
d0f17b57 | 38 | and thus becomes available for future wide-character read operations. |
c13182ef MK |
39 | The file-position indicator is decremented by one or more. |
40 | The end-of-file | |
41 | indicator is cleared. | |
42 | The backing storage of the file is not affected. | |
fea681da | 43 | .PP |
d0f17b57 | 44 | Note: \fIwc\fP need not be the last wide-character read from the stream; |
fea681da MK |
45 | it can be any other valid wide character. |
46 | .PP | |
47 | If the implementation supports multiple push-back operations in a row, the | |
48 | pushed-back wide characters will be read in reverse order; however, only one | |
49 | level of push-back is guaranteed. | |
47297adb | 50 | .SH RETURN VALUE |
60a90ecd MK |
51 | The |
52 | .BR ungetwc () | |
f3fef736 | 53 | function returns \fIwc\fP when successful, or \fBWEOF\fP upon |
fea681da | 54 | failure. |
47297adb | 55 | .SH CONFORMING TO |
1eb85d14 | 56 | C99. |
fea681da | 57 | .SH NOTES |
d9bfdb9c | 58 | The behavior of |
60a90ecd | 59 | .BR ungetwc () |
1274071a MK |
60 | depends on the |
61 | .B LC_CTYPE | |
62 | category of the | |
fea681da | 63 | current locale. |
47297adb | 64 | .SH SEE ALSO |
e37e3282 | 65 | .BR fgetwc (3) |