TP.FND - find a named file on a tape.

Usage:

B:
   stat = tp.fnd(namestr);
C:
   #equate tp_fnd tp.fnd
   int tp_fnd(const char *namestr);

Where:

namestr
is a string of the form "fc*XX/FFFFFF". This is the same as the string you pass to OPEN to open the file.
stat
will be zero if TP.FND finds the file and -1 if it fails.

Description:

TP.FND searchs the GFRC labelled tape mounted on file code "XX" for a file with the name "FFFFFF". If it finds the file, the tape is left positioned just before the tape label so that it may be opened by calling OPEN with the "h" action. If it cannot find the file, it will return -1. All other error conditions will cause the program to terminate.

TP.FND expects the tape to be positioned at a header label when called. This will be true if the tape was just mounted, if it was just rewound, or if the previous file was just read to end of file.

TP.FND starts searching at the current file. If it reaches the end of the tape, it will rewind the tape and scan the whole tape. It will also search continuation reels.

Copyright © 1996, Thinkage Ltd.