annotate docs/ccguide/fread.refentry @ 3076:d28d94edee79

Found SDFLAGS from level1/coco1/modules/makefile was missing. Added line.
author David Ladd <drencor-xeen@users.sf.net>
date Mon, 23 Feb 2015 15:00:06 -0600
parents a4a6b6315146
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="fread">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
570
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
3 <refname>Fread</refname>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
4 <refname>Fwrite</refname>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
5 <refpurpose>read/write binary data</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <funcsynopsis>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 <funcsynopsisinfo>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 #include &lt;stdio.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
12 </funcsynopsisinfo>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
14 <funcdef><function>fread</function></funcdef>
570
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
15 <paramdef>char *<parameter>ptr</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
16 <paramdef>int <parameter>size</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
17 <paramdef>int <parameter>number</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
18 <paramdef>FILE *<parameter>fp</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
19 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
20
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
21 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
22 <funcdef><function>fwrite</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
23 <paramdef>char *<parameter>ptr</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
24 <paramdef>int <parameter>size</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
25 <paramdef>int <parameter>number</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
26 <paramdef>FILE *<parameter>fp</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
27 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
28 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
29
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
30 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
31
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
32 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
33 <para>
595
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
34 Fread reads from the file pointed to by "fp". "Number" is the
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
35 number of items of size "size" that are to be read starting at
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
36 "ptr". The best way to pass the argument "size" to fread is by
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
37 using "sizeof". Fread returns the number of items actually
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
38 read.
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
39 </para>
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
40 <para>
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
41 Fwrite writes to the file pointed to by "fp". "Number" is the
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
42 number of items of size "size" reading the from memory
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
43 starting at "ptr".
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
44 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
45 </refsect1>
552
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
46 <refsect1><title>Diagnostics</title>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
47 <para>
655
a4a6b6315146 Completely finished
roug
parents: 595
diff changeset
48 Both functions return 0 (NULL) at the end of file or error.
552
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
49 </para>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
50 </refsect1>
542
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
51
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
52 <refsect1><title>See Also</title>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
53 <para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
54 System calls
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
55 <link linkend="read">read()</link>,
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
56 <link linkend="write">write()</link>.
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
57 <link linkend="fopen">Fopen()</link>,
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
58 <link linkend="getc">getc()</link>,
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
59 <link linkend="putc">putc()</link>,
595
e50380625be6 All refentries finished.
roug
parents: 570
diff changeset
60 <link linkend="printf">printf()</link>.
542
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
61 </para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
62 </refsect1>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
63
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
64 </refentry>