Extended FCS routines for DECUS "C" These routines allow the "C" programmer on RSX to use some of the more advanced FCS functions including preallocation files, creating fixed record size files with record lengths other that 512, randomly reading and writing a disk block or more at a time, and reading and writing a random access, fixed record size file. FOPENX.C provides the extended file open command. It takes advantage of the existing DECUS "C" fopen() function, modified to leave out the actual file open call. This code is contained in FDBSET.MAC. Fopenx() calls FDBSET to setup the filename block, the "C" runtime system and the FDB. The FDB is modified to request the desired open options, and OPNFNB is called to complete to open. Fopenx() can be extended further, the entire FDB is at your disposal. FGETB, FPUTB, FGETR, FPUTR Fgetb() and Fputb() provide a simple way to read and write disk blocks. They use the qio routine internal to the DECUS "C" runtime library, so can be used in task that do not reference the CX library. These routines are much, much faster that the normal "C" fget and fput if you just need to manipulate disk blocks. Fgetr() and Fputr() are direct implementations of the getr$ and putr$ macros in the FCS library. I had a task written in macro that required extensive changes. Rather that fighting with macro, I rewrote the taks in "C", and needed these routines. Building Everything You should assemble or compile all the .MAC and .C file, then insert the object modules into a library. We added them to C.OLB, but you may want to keep them in a separate library if you want to keep a stock C.OLB. The documentation is embedded in the source modules. You can generate the .RNO files by using GETRNO from the DECUS "C" kit. See the README.1ST file in the other A.P. submission. Additional routines in [333,100]. ---------------------------------- Two useful routines, QWRAP and TMSG are also included. QWRAP fixes a bug (feature ?) in the DECUS "C" run time package that causes an extra line feed to be sent to STDERR even if the task does no output. This is irritating for tasks such as DECnet objects running from the console. Set the documentation on the wrapup() function in the CLIB manual. TMSG provides a simple way to put out an error message containing the task name and time of the message. Questions, complaints, praise (I rather like the last) can be addressed to: Hans J. Jung Assistant Manager of Research and Development The Associated Press 50 Rockerfeller Plaza New York, NY 10020 (212) 621-1568 I will take calls, but am notoriously hard to reach by phone. I also can't guarantee you much phone time.