#include "tapeio.h"
FUNCTION c_tpwrit (unit, buffer, bufsz, mode)
long *unit; unsigned char *buffer; long *bufsz; long *mode;
Unit number to be used as a reference for the drive. This number is set by c_tpopen() and should not be altered.
The user's buffer which contains the data that is written to tape.
Number of bytes to be written to tape. The maximum number of bytes that can be written is 32K.
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.
The c_tpwrit() call is used to write bufsz bytes to a tape device.
c_tpwrit() returns
number of bytes actually written TAPE_EOT --> hardware end of tape TPWRIT_SIZE --> too many or too few bytes requested TPWRIT_WRIT --> device error