home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
500-599
/
ff558.lzh
/
BTNtape
/
src
/
tape.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-28
|
2KB
|
52 lines
/* BTNtape include file, version 2.1 */
/* Operations supported by TapeIO */
#define TSENSE 0 /* request sense */
#define TREADY 1 /* test unit ready */
#define TREAD 2 /* read blocks */
#define TWRITE 3 /* write blocks */
#define TREWIND 4 /* rewind tape */
#define WFMARK 5 /* write file mark */
#define TSKIPF 6 /* skip over files */
#define TSKIPE 7 /* skip to end of data */
#define TRETEN 8 /* retension tape */
#define INQUIRY 9 /* read device info */
#define MDSET 10 /* mode-set */
#define MDSNS 11 /* mode-sense */
#define USRMODE 12 /* user mode-set */
#define RDCAP 13 /* read capacity */
#define RAWCMD 14 /* send user scsi command to tape */
#define TFINISH 15 /* wait for last operation to finish */
/* these control how fast TapeIO returns to the caller */
#define CTLWAIT 0 /* return when operation is done */
#define CTLIMM 1 /* return immediately */
#define FAKEOM 99 /* special return code for DAC EOM */
/* Supported device types (from INQUIRY) */
#define SEQ (inq[0]==0x01) /* sequential */
#define DAC (inq[0]==0x10) /* direct-access */
#define BADLUN (inq[0]==0x7f) /* oops */
/* inline message print functions */
#define MPR0(XYZ) sprintf(dbb,XYZ); MonPrint()
#define MPR1(XYZ,V1) sprintf(dbb,XYZ,V1); MonPrint()
#define MPR2(XYZ,V1,V2) sprintf(dbb,XYZ,V1,V2); MonPrint()
#define MPR3(XYZ,V1,V2,V3) sprintf(dbb,XYZ,V1,V2,V3); MonPrint()
/* function prototypes */
void _main(void);
long TapeIO(int,int,int);
int DoSense(long);
int postape(int,int,long);
long wrteot(int,int,long);
void freestuff(void);
int getstart(long *);
void MonPrint(void);
void toUPPER(char *);
long NewTape(void);
void thud(char *);
void returnpkt(struct DosPacket *, ULONG, ULONG);
struct DosPacket *taskwait(void);