466
|
1 <refentry id="ungetc">
|
|
2 <refnamediv>
|
579
|
3 <refname>Ungetc</refname>
|
|
4 <refpurpose>put character back on input</refpurpose>
|
466
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <funcsynopsis>
|
468
|
9 <funcsynopsisinfo>
|
|
10 #include <stdio.h>
|
|
11 </funcsynopsisinfo>
|
466
|
12 <funcprototype>
|
|
13 <funcdef><function>ungetc</function></funcdef>
|
579
|
14 <paramdef>char <parameter>ch</parameter></paramdef>
|
|
15 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
466
|
16 </funcprototype>
|
|
17 </funcsynopsis>
|
|
18
|
|
19 </refsynopsisdiv>
|
|
20
|
|
21 <refsect1><title>Description</title>
|
|
22 <para>
|
546
|
23 This function alters the state of the input file buffer such
|
|
24 that the next call of "getc()" returns "ch".
|
|
25 </para>
|
|
26 <para>
|
|
27 Only one character may be pushed back, and at least on
|
|
28 character must have been read from the file before a call to
|
|
29 ungetc.
|
|
30 </para>
|
|
31 <para>
|
|
32 <quote>Fseek()</quote> erases any puchback.
|
466
|
33 </para>
|
|
34 </refsect1>
|
546
|
35
|
|
36 <refsect1><title>Diagnostics</title>
|
|
37 <para>
|
|
38 Ungetc returns its character argument unless no puchback could
|
|
39 occur, in which case EOF is returned.
|
|
40 </para>
|
|
41 </refsect1>
|
|
42
|
|
43 <refsect1><title>See Also</title>
|
|
44 <para>
|
|
45 <link linkend="getc">getc()</link>,
|
|
46 <link linkend="fseek">fseek()</link>
|
|
47 </para>
|
|
48 </refsect1>
|
|
49
|
466
|
50 </refentry>
|