home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / BADCLU.ZIP / INC.ZIP / DS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-08  |  1.8 KB  |  93 lines

  1. /**********************************************************************
  2.  *  
  3.  *  ds.h
  4.  *  
  5.  *  structure for info on a DS error (int 24H)
  6.  *  
  7.  *  also, protos for functions to install, deinstall handler 
  8.  *  
  9.  *********************************************************************/
  10.  
  11. #ifndef __DS_H__
  12. #define __DS_H__
  13.  
  14. #ifdef  DEEPSHIT_HANDLER
  15. #define EXTERN
  16. #else
  17. #define EXTERN  extern
  18. #endif
  19.  
  20. EXTERN struct {
  21.     int     err;
  22.     int     drv;
  23.     int     act;
  24.     int     loc;
  25.     int     rsp;
  26.     char    *errmsg;
  27.     char    *actmsg;
  28.     char    *locmsg;
  29. } DS_Err_Info;
  30.  
  31. /* err */
  32.  
  33. #define DS_WR_PROT      0
  34. #define DS_UNK_UNIT     1
  35. #define DS_NOT_RDY      2
  36. #define DS_UNK_CMD      3
  37. #define DS_DATA_CRC     4
  38. #define DS_BAD_REQ      5
  39. #define DS_SEEK         6
  40. #define DS_UNK_MEDIA    7
  41. #define DS_SEC_NF       8
  42. #define DS_OUT_PAPER    9
  43. #define DS_WR_FAULT     10
  44. #define DS_RD_FAULT     11
  45. #define DS_GEN_FAIL     12
  46.  
  47. /* act */
  48.  
  49. #define DS_ACT_RD   0
  50. #define DS_ACT_WR   1
  51.  
  52. /* loc */
  53.  
  54. #define DS_LOC_DOS  0
  55. #define DS_LOC_FAT  1
  56. #define DS_LOC_DIR  2
  57. #define DS_LOC_DAT  3
  58.  
  59. /* for return values */
  60.  
  61. #define DS_IGNORE   0
  62. #define DS_RETRY    1
  63. #define DS_ABORT    2
  64. #define DS_FAIL     3
  65.  
  66. /* values for rsp */
  67.  
  68. #define DS_NOFAIL   1
  69. #define DS_NORETRY  2
  70. #define DS_NOIGNORE 4
  71.  
  72. #ifndef NO_PROTO
  73.  
  74. void DS_Install(int (*func)());
  75.  
  76. void DS_Uninstall(void);
  77.  
  78. #endif
  79.  
  80. #define DS_RESET()  memset(&DS_Err_Info,0,sizeof(DS_Err_Info))
  81. #define DS_ERR()    (DS_Err_Info.err)
  82. #define DS_LOC()    (DS_Err_Info.loc)
  83. #define DS_ACT()    (DS_Err_Info.act)
  84. #define DS_DRV()    (DS_Err_Info.drv)
  85. #define DS_RSP()    (DS_Err_Info.rsp)
  86.  
  87. #define DS_ERRMSG() (DS_Err_Info.errmsg)
  88. #define DS_ACTMSG() (DS_Err_Info.actmsg)
  89. #define DS_LOCMSG() (DS_Err_Info.locmsg)
  90.  
  91. #endif  /* __DS_H__ */ 
  92.  
  93.