File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man3 / ungetc.3s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

.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.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.