source: trunk/minix/man/man3/ungetc.3@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 782 bytes
Line 
1.\" @(#)ungetc.3s 6.1 (Berkeley) 5/15/85
2.\"
3.TH UNGETC 3 "May 15, 1985"
4.AT 3
5.SH NAME
6ungetc \- push character back into input stream
7.SH SYNOPSIS
8.nf
9.ft B
10#include <stdio.h>
11
12int ungetc(int \fIc\fP, FILE *\fIstream\fP)
13.ft R
14.fi
15.SH DESCRIPTION
16.B Ungetc
17pushes the character
18.I c
19back on an input stream. That character will be returned by the next
20.B getc
21call on that stream.
22.B Ungetc
23returns
24.IR c .
25.PP
26One character of pushback is guaranteed provided
27something has been read from the stream and the stream is actually buffered.
28Attempts to push EOF are rejected.
29.PP
30.BR Fseek (3)
31erases all memory of pushed back characters.
32.SH "SEE ALSO"
33.BR getc (3),
34.BR setbuf (3),
35.BR fseek (3).
36.SH DIAGNOSTICS
37.B Ungetc
38returns
39.SM
40.B EOF
41if it can't push a character back.
Note: See TracBrowser for help on using the repository browser.