F.GSECT - get an FMS catalog sector.

Usage:

mem_addr = f.gsect( device, sector [, err_func ] );

Where:

device
is the right-justified, zero-filled, three character BCD device name from which the sector is to be obtained.
sector
is the disk address from which the sector is to be read.
err_func
is an optional routine which is called in case of error. It is called with a PRINTF type argument list. The default error function is ERROR.
mem_addr
is the memory address of the obtained sector.

Description:

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.