BSD 4_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1983 07:57:29 +0000 (23:57 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1983 07:57:29 +0000 (23:57 -0800)
Work on file usr/man/man3/ungetc.3s

Synthesized-from: CSRG/cd1/4.2

usr/man/man3/ungetc.3s [new file with mode: 0644]

diff --git a/usr/man/man3/ungetc.3s b/usr/man/man3/ungetc.3s
new file mode 100644 (file)
index 0000000..b751cfe
--- /dev/null
@@ -0,0 +1,38 @@
+.TH UNGETC 3S  "19 January 1983"
+.SH NAME
+ungetc \- push character back into input stream
+.SH SYNOPSIS
+.B #include <stdio.h>
+.PP
+.B ungetc(c, stream)
+.br
+.SM
+.B FILE
+.B *stream;
+.SH DESCRIPTION
+.I Ungetc
+pushes the character
+.I c
+back on an input stream.  That character will be returned by the next
+.I getc
+call on that stream.
+.I Ungetc 
+returns 
+.IR c .
+.PP
+One character of pushback is guaranteed provided
+something has been read from the stream and the stream is actually buffered.
+Attempts to push EOF are rejected.
+.PP
+.IR  Fseek (3S)
+erases all memory of pushed back characters.
+.SH "SEE ALSO"
+getc(3S),
+setbuf(3S),
+fseek(3S)
+.SH DIAGNOSTICS
+.I Ungetc
+returns
+.SM
+.B EOF
+if it can't push a character back.