#include "statio.h"
FUNCTION c_stopen (fd, hos, access, nclass)
long *fd; char *hos; long *access; long *nclass;
File descriptor to be used by other statistics I/O functions.
Host name of the statistics file to be opened.
Type of access to open file with. Valid values are:
= IREAD: = open file for read only = IUPDATE: = open existing file for read/write = IWRITE: = open new file for read/write = IUNKNOWN: = unknown (attempt to open existing file for read/write if that fails open new file for read/write)
Number of classes currently in file. If a new file is created, then nclass will be 0.
The c_stopen() routine is used to open a statistics file with the access specified. If a new file is opened, then a record is written to it which keeps track of all classes in the file. If an existing file is opened, then the first record is read in to get nclass. If there is an attempt to open a file which is already open, c_stopen() will return the error condition 2.
c_stopen() returns
E_OPOLD (7) --> for old file successfully opened (no message) E_OPNEW (8) --> for new file successfully created no old file (no message) E_GNLIO (1) --> general I/O error unable to open or create (no message)