mem_addr = f.gsect( device, sector [, err_func ] );
F.GSECT reads in a catalog sector through the use of the FMS Get Specific Catalog Sector function. The obtained sector, along with the remainder of the llink containing it, is kept in memory so that future calls to F.GSECT with the same or adjacent sectors need not necessarily do disk I/O.
If the desired sector is not in memory, the first buffer which is not busy is used for the file system call. If no free buffers exist, a new buffer will be allocated from free memory.
If an error occurs in reading the disk, F.GSECT calls "err_func" with a PRINTF type argument list. Normally, the user does NOT supply this argument and it defaults to ERROR, so the program prints an error message and exits. However, the user can do his own error processing by supplying an "err_func". If the user's function does not cause the program to terminate, F.GSECT will return the negative of the FMS status code. The user can find the full FMS status in the external "f.stat" -- see "expl file system status".
Copyright © 1996, Thinkage Ltd.