Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/getstat.refentry @ 2763:c03464c24b14
Fixed a minor typo in the arcadepak's makefile related to DriveWire3 and Becker.
Updated makefile with new option nightlytest. Run option is "make nightlytest".
You also need to test environment variable TESTSSHDIR and TESTSSHSERVER before using it.
Also updated the nightly option so if the SOURCEUSER environment variable is not set it will report it.
author | drencor-xeen |
---|---|
date | Wed, 16 Jan 2013 17:33:46 -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>