]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/ungetwc.3
Automated addition of parentheses by add_parens_for_own_funcs.sh
[thirdparty/man-pages.git] / man3 / ungetwc.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
12 .\" ISO/IEC 9899:1999
13 .\"
14 .TH UNGETWC 3 1999-09-19 "GNU" "Linux Programmer's Manual"
15 .SH NAME
16 ungetwc \- push back a wide character onto a FILE stream
17 .SH SYNOPSIS
18 .nf
19 .B #include <wchar.h>
20 .sp
21 .BI "wint_t ungetwc(wint_t " wc ", FILE *" stream );
22 .fi
23 .SH DESCRIPTION
24 The \fBungetwc\fP() function is the wide-character equivalent of the \fBungetc\fP
25 function. It pushes back a wide character onto \fIstream\fP and returns it.
26 .PP
27 If \fIwc\fP is WEOF, it returns WEOF. If \fIwc\fP is an invalid wide character,
28 it sets \fBerrno\fP to \fBEILSEQ\fP and returns WEOF.
29 .PP
30 If \fIwc\fP is a valid wide character, it is pushed back onto the stream
31 and thus becomes available for future wide character read operations.
32 The file-position indicator is decremented by one or more. The end-of-file
33 indicator is cleared. The backing storage of the file is not affected.
34 .PP
35 Note: \fIwc\fP need not be the last wide character read from the stream;
36 it can be any other valid wide character.
37 .PP
38 If the implementation supports multiple push-back operations in a row, the
39 pushed-back wide characters will be read in reverse order; however, only one
40 level of push-back is guaranteed.
41 .SH "RETURN VALUE"
42 The \fBungetwc\fP() function returns \fIwc\fP when successful, or WEOF upon
43 failure.
44 .SH "CONFORMING TO"
45 ISO/ANSI C, UNIX98
46 .SH "SEE ALSO"
47 .BR fgetwc (3)
48 .SH NOTES
49 The behaviour of \fBungetwc\fP() depends on the LC_CTYPE category of the
50 current locale.