home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- *
- * ds.h
- *
- * structure for info on a DS error (int 24H)
- *
- * also, protos for functions to install, deinstall handler
- *
- *********************************************************************/
-
- #ifndef __DS_H__
- #define __DS_H__
-
- #ifdef DEEPSHIT_HANDLER
- #define EXTERN
- #else
- #define EXTERN extern
- #endif
-
- EXTERN struct {
- int err;
- int drv;
- int act;
- int loc;
- int rsp;
- char *errmsg;
- char *actmsg;
- char *locmsg;
- } DS_Err_Info;
-
- /* err */
-
- #define DS_WR_PROT 0
- #define DS_UNK_UNIT 1
- #define DS_NOT_RDY 2
- #define DS_UNK_CMD 3
- #define DS_DATA_CRC 4
- #define DS_BAD_REQ 5
- #define DS_SEEK 6
- #define DS_UNK_MEDIA 7
- #define DS_SEC_NF 8
- #define DS_OUT_PAPER 9
- #define DS_WR_FAULT 10
- #define DS_RD_FAULT 11
- #define DS_GEN_FAIL 12
-
- /* act */
-
- #define DS_ACT_RD 0
- #define DS_ACT_WR 1
-
- /* loc */
-
- #define DS_LOC_DOS 0
- #define DS_LOC_FAT 1
- #define DS_LOC_DIR 2
- #define DS_LOC_DAT 3
-
- /* for return values */
-
- #define DS_IGNORE 0
- #define DS_RETRY 1
- #define DS_ABORT 2
- #define DS_FAIL 3
-
- /* values for rsp */
-
- #define DS_NOFAIL 1
- #define DS_NORETRY 2
- #define DS_NOIGNORE 4
-
- #ifndef NO_PROTO
-
- void DS_Install(int (*func)());
-
- void DS_Uninstall(void);
-
- #endif
-
- #define DS_RESET() memset(&DS_Err_Info,0,sizeof(DS_Err_Info))
- #define DS_ERR() (DS_Err_Info.err)
- #define DS_LOC() (DS_Err_Info.loc)
- #define DS_ACT() (DS_Err_Info.act)
- #define DS_DRV() (DS_Err_Info.drv)
- #define DS_RSP() (DS_Err_Info.rsp)
-
- #define DS_ERRMSG() (DS_Err_Info.errmsg)
- #define DS_ACTMSG() (DS_Err_Info.actmsg)
- #define DS_LOCMSG() (DS_Err_Info.locmsg)
-
- #endif /* __DS_H__ */
-
-