#include "tapeio.h"
FUNCTION c_tpclos (unit, mode, rewopt, eofopt)
long *unit; long *mode; long *rewopt; long *eofopt;
Unit number to be used as a reference for the drive. This number is set by c_tpopen() and should not be altered.
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 NOREW (0) specifies norewind; REWIND (1) specifies to rewind the tape before closing it. REWOFFL (2) specifies that the tape drive is to be rewound and taken off-line after closing.
Number of tape EOF marks to be written on close of a write to the device. The values 0, 1, 2 or 3 are valid for this parameter. This parameter is ignored when reading.
The c_tpclos() call is used to close a tape device.
c_tpclos() returns
TAPE_SUCC (0) --> successful completion TPCLOS_OPT --> no such option TPCLOS_WEOF --> error writing eof TPCLOS_CLOS --> device error TPCLOS_REW --> rewind error