Files
oldlinux-files/Minix/2.0.0/wwwman/man3/ungetc.3.html
2024-02-19 00:21:39 -05:00

72 lines
1.3 KiB
HTML

<HTML>
<HEAD>
<TITLE>ungetc(3)</TITLE>
</HEAD>
<BODY>
<H1>ungetc(3)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
ungetc - push character back into input stream
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;stdio.h&gt;</STRONG>
<STRONG>int</STRONG> <STRONG>ungetc(int</STRONG> <EM>c</EM><STRONG>,</STRONG> <STRONG>FILE</STRONG> <STRONG>*</STRONG><EM>stream</EM><STRONG>)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>Ungetc</STRONG> pushes the character <EM>c</EM> back on an input stream. That character
will be returned by the next <STRONG>getc</STRONG> call on that stream. <STRONG>Ungetc</STRONG> returns <EM>c</EM>.
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.
<STRONG><A HREF="../man3/Fseek.3.html">Fseek(3)</A></STRONG> erases all memory of pushed back characters.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man3/getc.3.html">getc(3)</A></STRONG>, <STRONG><A HREF="../man3/setbuf.3.html">setbuf(3)</A></STRONG>, <STRONG><A HREF="../man3/fseek.3.html">fseek(3)</A></STRONG>.
</PRE>
<H2>DIAGNOSTICS</H2><PRE>
<STRONG>Ungetc</STRONG> returns <STRONG>EOF</STRONG> if it can't push a character back.
</PRE>
</BODY>
</HTML>