Getstat get file status #include <sgstat.h> /* code 0 */ getstat int code int filenum char *buffer /* codes 1 and 6 */ getstat int code int filenum /* code 2 */ getstat int code int filenum long *size /* code 5 */ getstat int code int filenum long *pos Assembler Equivalent os9 I$GETSTT Description A full description of getstat can be found in the OS-9 System Programmer's Manual. "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. The form of the call depends on the value of "code". Code 0: "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. Code 1: 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. Code 2: "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. Code 5: "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. Code 6: Returns -1 on EOF and error and 0 on success. NOTE that when one of the previous calls returns -1, then actual error is returned in errno.