home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 498b.lha / BTNtape_v2.0 / tape.h < prev    next >
C/C++ Source or Header  |  1991-04-08  |  2KB  |  46 lines

  1. /* BTNtape include file, version 2.0 */
  2.  
  3. /* Operations supported by TapeIO */
  4. #define TSENSE  0    /* request sense */
  5. #define TREADY  1    /* test unit ready */
  6. #define TREAD   2    /* read blocks */
  7. #define TWRITE  3    /* write blocks */
  8. #define TREWIND 4    /* rewind tape */
  9. #define WFMARK  5    /* write file mark */
  10. #define TSKIP   6    /* skip over files */
  11. #define INQUIRY 7    /* read device info */
  12. #define MDSET   8    /* mode-set */
  13. #define MDSNS   9    /* mode-sense */
  14. #define USRMODE 10   /* user mode-set */
  15. #define RDCAP   11   /* read capacity */
  16. #define RAWCMD  12   /* send user scsi command to tape */
  17. #define TFINISH 13   /* wait for last operation to finish */
  18.  
  19. /* these control how fast TapeIO returns to the caller */
  20. #define CTLWAIT 0    /* return when operation is done */
  21. #define CTLIMM  1    /* return immediately */
  22.  
  23. /* Supported device types (from INQUIRY) */
  24. #define SEQ    (inq[0]==0x01) /* sequential */
  25. #define DAC    (inq[0]==0x10) /* direct-access */
  26. #define BADLUN (inq[0]==0x7f) /* oops */
  27.  
  28. /* inline message print functions */
  29. #define MPR0(XYZ)           sprintf(dbb,XYZ);           MonPrint()
  30. #define MPR1(XYZ,V1)        sprintf(dbb,XYZ,V1);        MonPrint()
  31. #define MPR2(XYZ,V1,V2)     sprintf(dbb,XYZ,V1,V2);     MonPrint()
  32. #define MPR3(XYZ,V1,V2,V3)  sprintf(dbb,XYZ,V1,V2,V3);  MonPrint()
  33.  
  34. /* function prototypes */
  35. void _main(void);
  36. long   TapeIO(int,int,int);
  37. int    DoSense(long);
  38. long   wrteot(int,int,long);
  39. void   freestuff(void);
  40. int    getstart(long *);
  41. void   MonPrint(void);
  42. void   toUPPER(char *);
  43. long   NewTape(void);
  44. void   returnpkt(struct DosPacket *, ULONG, ULONG);
  45. struct DosPacket *taskwait(void);
  46.