annotate docs/ccguide/fseek.refentry @ 1075:1e3b13dfb976

Updated version to 3.01.01
author boisy
date Mon, 31 Mar 2003 19:19:45 +0000
parents fe8e46eca1ed
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="fseek">
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>Fseek</refname>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
4 <refname>Rewind</refname>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
5 <refname>Ftell</refname>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
6 <refpurpose>position in a file or report current position</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
10 <funcsynopsis>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 <funcsynopsisinfo>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
12 #include &lt;stdio.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
13 </funcsynopsisinfo>
570
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
14
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
15 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
16 <funcdef><function>fseek</function></funcdef>
570
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
17 <paramdef>FILE *<parameter>fp</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
18 <paramdef>long <parameter>offset</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
19 <paramdef>int <parameter>place</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
20 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
21
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
22 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
23 <funcdef><function>rewind</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
24 <paramdef>FILE *<parameter>fp</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
25 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
26
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
27 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
28 <funcdef>long <function>ftell</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 552
diff changeset
29 <paramdef>FILE *<parameter>fp</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
30 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
31 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
32
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
33 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
34
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
35 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
36 <para>
596
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
37 Fseek repositions the next character position of a file for
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
38 either read or write. The new position is a "offset" bytes
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
39 from the beginning of the file if "place" is 0, the current
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
40 position is 1, or the end if 2. Fseek sorts out the special
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
41 problems of buffering.
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
42 </para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
43 <para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
44 NOTE that using "lseek()" on a buffered file will produce
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
45 unpredictable results.
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
46 </para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
47 <para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
48 Rewind is equivalent to "fseek(fp,0L,0)".
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
49 </para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
50 <para>
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
51 Ftell returns the current position, measured in bytes, from the
fe8e46eca1ed All refentries finished.
roug
parents: 570
diff changeset
52 beginning of the file pointed to by "fp".
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
53 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
54 </refsect1>
542
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
55
552
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
56 <refsect1><title>Diagnostics</title>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
57 <para>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
58 Fseek returns -1 if the call is invalid.
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
59 </para>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
60 </refsect1>
fcb97f0ba24b All diagnostics added.
roug
parents: 542
diff changeset
61
542
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
62 <refsect1><title>See Also</title>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
63 <para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
64 System call
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
65 <link linkend="lseek">lseek()</link>.
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
66 </para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
67 </refsect1>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
68
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
69 </refentry>