next up previous contents
Next: Using libpsio.a Up: The Binary Input/Output System Previous: The user interface   Contents

Manipulating the table of contents

In addition, to the basic open/close/read/write functions described above, the programmer also has a limited ability to directly manipulate or examine the data in the TOC itself.

int psio_tocprint(ULI unit, FILE *outfile): Prints the TOC of unit in a readable form to outfile, including entry keywords and global starting/ending addresses. (tocprint is also the name of a PSI3 utility module which prints a file's TOC to stdout.)

int psio_toclen(ULI unit, FILE *outfile): Returns the number of entries in the TOC of unit.

int psio_tocdel(ULI unit, char *key): Deletes the TOC entry corresponding to key. NB that this function only deletes the entry's reference from the TOC itself and does not remove the corresponding data from the file. Hence, it is possible to introduce data "holes" into the file.

int psio_tocclean(ULI unit, char *key): Deletes the TOC entry corresponding to key and all subsequent entries. As with psio_tocdel(), this function only deletes the entry references from the TOC itself and does not remove the corresponding data from the file. This function is still under construction.


next up previous contents
Next: Using libpsio.a Up: The Binary Input/Output System Previous: The user interface   Contents
psi 2003-01-07