Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/getstat.refentry @ 2772:0a3f4d8ea6d5
Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected.
Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow.
author | drencor-xeen |
---|---|
date | Wed, 23 Jan 2013 12:36:55 -0600 |
parents | 94ff9d15614f |
children |
line wrap: on
line source
<refentry id="getstat"> <refnamediv> <refname>Getstat</refname> <refpurpose>get file status</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> #include <sgstat.h> </funcsynopsisinfo> <funcsynopsisinfo> /* code 0 */ </funcsynopsisinfo> <funcprototype> <funcdef><function>getstat</function></funcdef> <paramdef>int <parameter>code</parameter></paramdef> <paramdef>int <parameter>filenum</parameter></paramdef> <paramdef>char *<parameter>buffer</parameter></paramdef> </funcprototype> <funcsynopsisinfo> /* codes 1 and 6 */ </funcsynopsisinfo> <funcprototype> <funcdef><function>getstat</function></funcdef> <paramdef>int <parameter>code</parameter></paramdef> <paramdef>int <parameter>filenum</parameter></paramdef> </funcprototype> <funcsynopsisinfo> /* code 2 */ </funcsynopsisinfo> <funcprototype> <funcdef><function>getstat</function></funcdef> <paramdef>int <parameter>code</parameter></paramdef> <paramdef>int <parameter>filenum</parameter></paramdef> <paramdef>long *<parameter>size</parameter></paramdef> </funcprototype> <funcsynopsisinfo> /* code 5 */ </funcsynopsisinfo> <funcprototype> <funcdef><function>getstat</function></funcdef> <paramdef>int <parameter>code</parameter></paramdef> <paramdef>int <parameter>filenum</parameter></paramdef> <paramdef>long *<parameter>pos</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1><title>Assembler Equivalent</title> <para> os9 I$GETSTT </para> </refsect1> <refsect1><title>Description</title> <para> A full description of getstat can be found in the OS-9 System Programmer's Manual. </para> <para> "Code" must be the value of one of the standard codes for the getstat service request. "Filenum" must be the path number of an open file. </para> <para> The form of the call depends on the value of "code". </para> <informaltable frame="none"> <tgroup cols="2"> <colspec colwidth="1in"/> <colspec colwidth="3in"/> <tbody> <row> <entry>Code 0:</entry> <entry>"Buffer" must be the address of a 32 byte buffer into which the relevant status packet is copied. The header file has the definitions of the various file and device structures for use by the program.</entry> </row> <row> <entry>Code 1:</entry> <entry>Code 1 only applies to SCF devices and to test for data available. The return value is zero if there is data available. -1 is returned if there is no data.</entry> </row> <row> <entry>Code 2:</entry> <entry>"Size" should be the address of a long integer into which the current file size is placed. The return value of the function is -1 on error and 0 on success.</entry> </row> <row> <entry>Code 5:</entry> <entry>"Pos" should be the address of a long integer into which the current file position is placed. The return value of the function is -1 on error and 0 on success.</entry> </row> <row> <entry>Code 6:</entry> <entry>Returns -1 on EOF and error and 0 on success.</entry> </row> </tbody> </tgroup> </informaltable> <para> NOTE that when one of the previous calls returns -1, then actual error is returned in errno. </para> </refsect1> </refentry>