#include "tapeio.h"
FUNCTION c_tpreop (unit, skip, mode, opt1, dens, inout, drivename)
long *unit; long *skip; long *mode; long *opt1; char *dens; long *inout; char *drivename;
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 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 drive dependent. If inout equals TREAD, the density defaults to the density of the tape being read.
A value of TREAD (0) for reading. TWRITE (1) for writing. TUPDATE (2) for update.
Character string to be used as the drivename. Note the c_tpopen() call returns this in the message parameter.
The c_tpreop() call is used to reopen a tape drive or open a drive where operator assistance is not required. The caller is responsible for getting the tape mounted and entering the correct tape name.
c_tpreop() 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