annotate docs/ccguide/getstat.refentry @ 3220:9ccec98c9897

Updated IDE Driver makefile so it will have place holders for dsk, dskclean, and dskcopy so that make does not error out when chaining into the driver tree to build disk images where applicable.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Wed, 20 Dec 2017 16:10:50 -0600
parents 94ff9d15614f
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="getstat">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
3 <refname>Getstat</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refpurpose>get file status</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;sgstat.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 </funcsynopsisinfo>
570
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
12
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
13 <funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
14 /* code 0 */
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
15 </funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
16 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
17 <funcdef><function>getstat</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
18 <paramdef>int <parameter>code</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
19 <paramdef>int <parameter>filenum</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
20 <paramdef>char *<parameter>buffer</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
21 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
22
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
23 <funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
24 /* codes 1 and 6 */
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
25 </funcsynopsisinfo>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
26 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
27 <funcdef><function>getstat</function></funcdef>
570
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
28 <paramdef>int <parameter>code</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
29 <paramdef>int <parameter>filenum</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
30 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
31
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
32 <funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
33 /* code 2 */
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
34 </funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
35 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
36 <funcdef><function>getstat</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
37 <paramdef>int <parameter>code</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
38 <paramdef>int <parameter>filenum</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
39 <paramdef>long *<parameter>size</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
40 </funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
41
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
42 <funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
43 /* code 5 */
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
44 </funcsynopsisinfo>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
45 <funcprototype>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
46 <funcdef><function>getstat</function></funcdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
47 <paramdef>int <parameter>code</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
48 <paramdef>int <parameter>filenum</parameter></paramdef>
253b6096ee01 All function prototypes are added.
roug
parents: 542
diff changeset
49 <paramdef>long *<parameter>pos</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
50 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
51 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
52
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
53 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
54
542
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
55 <refsect1><title>Assembler Equivalent</title>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
56 <para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
57 os9 I$GETSTT
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
58 </para>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
59 </refsect1>
73319ee6a57e All "See Also" implemented
roug
parents: 468
diff changeset
60
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
62 <para>
599
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
63 A full description of getstat can be found in the OS-9 System
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
64 Programmer's Manual.
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
65 </para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
66 <para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
67 "Code" must be the value of one of the standard codes for the
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
68 getstat service request. "Filenum" must be the path number of
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
69 an open file.
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
70 </para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
71 <para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
72 The form of the call depends on the value of "code".
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
73 </para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
74 <informaltable frame="none">
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
75 <tgroup cols="2">
636
94ff9d15614f Convert to Docbook XML format
roug
parents: 599
diff changeset
76 <colspec colwidth="1in"/>
94ff9d15614f Convert to Docbook XML format
roug
parents: 599
diff changeset
77 <colspec colwidth="3in"/>
599
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
78 <tbody>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
79 <row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
80 <entry>Code 0:</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
81 <entry>"Buffer" must be the address of a 32 byte
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
82 buffer into which the relevant status packet
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
83 is copied. The header file has the
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
84 definitions of the various file and device
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
85 structures for use by the program.</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
86 </row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
87 <row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
88 <entry>Code 1:</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
89 <entry>Code 1 only applies to SCF devices and to
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
90 test for data available. The return value is
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
91 zero if there is data available. -1 is
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
92 returned if there is no data.</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
93 </row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
94 <row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
95 <entry>Code 2:</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
96 <entry>"Size" should be the address of a long
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
97 integer into which the current file size is
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
98 placed. The return value of the function is
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
99 -1 on error and 0 on success.</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
100 </row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
101 <row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
102 <entry>Code 5:</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
103 <entry>"Pos" should be the address of a long integer
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
104 into which the current file position is
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
105 placed. The return value of the function is -1 on
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
106 error and 0 on success.</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
107 </row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
108 <row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
109 <entry>Code 6:</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
110 <entry>Returns -1 on EOF and error and 0 on success.</entry>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
111 </row>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
112 </tbody>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
113 </tgroup>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
114 </informaltable>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
115 <para>
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
116 NOTE that when one of the previous calls returns -1, then
7a260a55c5ee All refentries finished.
roug
parents: 570
diff changeset
117 actual error is returned in errno.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
118 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
119 </refsect1>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
120 </refentry>