#include "tapeio.h"
FUNCTION c_tpopen (unit, skip, mode, opt1, dens, inout, message, tapeid)
long *unit; long *skip; long *mode; long *opt1; char *dens; long *inout; char *message; char *tapeid
Unit number to be used as a reference for later tape I/O calls.
Number of files to be skipped. Skip should be zero if no files are to be skipped.
A value of NO_HANDLE (0) specifies that errors are to be returned to the calling program. A value of HANDLE (1) specifies that when an error occurs the routine is to return an error to the calling program and display a message to the terminal.
A value of REWIND (1) specifies to rewind the tape before opening it. A value of NOREW (0) specifies not to rewind the tape.
Density of the tape (0, 800, 1600, 6250, LO or HI). The density is tape drive dependent. If inout equals TREAD, the density defaults to the density on the tape being read. Dens should be set to 0 or a valid density when inout equals TWRITE.
A value of TREAD (0) for reading. TWRITE (1) for writing. TUPDATE (2) for update. NOTE: TWRITE (1) is opened for read as well as write access.
Character string to be passed as the mount message to the operator. The drive name is returned in this string, destroying the original message. This is useful for calls to c_tpreop().
Tape ID of the tape mounted. The tape ID is received from the operator replying to the tape mount request.
The c_tpopen() call is used to obtain and open a tape device. The message is sent to the operator requesting a tape drive, and the operator responds with a tape drive number or responds that no tape drives are available.
c_tpopen() returns
TAPE_SUCC (0) --> successful completion TPOPEN_NOAVAIL --> no tape drive available at this time TPOPEN_REW --> error rewinding tape TPOPEN_OPEN --> device error TPOPEN_SKIP --> error skipping files