annotate docs/ccguide/ungetc.refentry @ 1331:0a3500c747de

Fixed ANOTHER bug
author boisy
date Sun, 07 Sep 2003 00:53:51 +0000
parents dc9fb26efbad
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="ungetc">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
579
dc9fb26efbad All function prototypes are added.
roug
parents: 546
diff changeset
3 <refname>Ungetc</refname>
dc9fb26efbad All function prototypes are added.
roug
parents: 546
diff changeset
4 <refpurpose>put character back on input</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <funcsynopsis>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
9 <funcsynopsisinfo>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 #include &lt;stdio.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 </funcsynopsisinfo>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
12 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 <funcdef><function>ungetc</function></funcdef>
579
dc9fb26efbad All function prototypes are added.
roug
parents: 546
diff changeset
14 <paramdef>char <parameter>ch</parameter></paramdef>
dc9fb26efbad All function prototypes are added.
roug
parents: 546
diff changeset
15 <paramdef>FILE *<parameter>fp</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
16 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
17 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
18
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
19 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
20
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
22 <para>
546
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
23 This function alters the state of the input file buffer such
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
24 that the next call of "getc()" returns "ch".
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
25 </para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
26 <para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
27 Only one character may be pushed back, and at least on
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
28 character must have been read from the file before a call to
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
29 ungetc.
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
30 </para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
31 <para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
32 <quote>Fseek()</quote> erases any puchback.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
33 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
34 </refsect1>
546
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
35
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
36 <refsect1><title>Diagnostics</title>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
37 <para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
38 Ungetc returns its character argument unless no puchback could
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
39 occur, in which case EOF is returned.
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
40 </para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
41 </refsect1>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
42
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
43 <refsect1><title>See Also</title>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
44 <para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
45 <link linkend="getc">getc()</link>,
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
46 <link linkend="fseek">fseek()</link>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
47 </para>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
48 </refsect1>
8b99a9882961 All "See Also" implemented
roug
parents: 468
diff changeset
49
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
50 </refentry>