|
|
1.1 root 1: .TH UNGETC 3S "19 January 1983"
2: .SH NAME
3: ungetc \- push character back into input stream
4: .SH SYNOPSIS
5: .B #include <stdio.h>
6: .PP
7: .B ungetc(c, stream)
8: .br
9: .SM
10: .B FILE
11: .B *stream;
12: .SH DESCRIPTION
13: .I Ungetc
14: pushes the character
15: .I c
16: back on an input stream. That character will be returned by the next
17: .I getc
18: call on that stream.
19: .I Ungetc
20: returns
21: .IR c .
22: .PP
23: One character of pushback is guaranteed provided
24: something has been read from the stream and the stream is actually buffered.
25: Attempts to push EOF are rejected.
26: .PP
27: .IR Fseek (3S)
28: erases all memory of pushed back characters.
29: .SH "SEE ALSO"
30: getc(3S),
31: setbuf(3S),
32: fseek(3S)
33: .SH DIAGNOSTICS
34: .I Ungetc
35: returns
36: .SM
37: .B EOF
38: if it can't push a character back.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.