home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d828 / disktest.lha / DiskTest / Source / dt.h < prev    next >
Text File  |  2001-02-25  |  2KB  |  71 lines

  1. /*------------------------------------*
  2.  | File: DT.h - Include file for DT.c |
  3.  *------------------------------------*/
  4.  
  5. /**
  6.  | Parameters (#define):
  7.  | - length of various buffers (track check, file check)
  8.  | - arguments for Motor()
  9.  | - break flag bits
  10.  | - "break window" parameters
  11.  | - AppWindow ID
  12. **/
  13.  
  14. #define SLATE_DIM     128
  15. #define FILBUF_DIM    (512 * 11)
  16.  
  17. #define ON            1
  18. #define OFF           0
  19.  
  20. #define BRK_DETECTED  0x1
  21. #define WARN_PRINTED  0x10
  22. #define INTERNAL_ERR  (BRK_DETECTED | WARN_PRINTED)
  23.  
  24. #define BKW_LEFT      390
  25. #define BKW_TOP       110
  26. #define BKW_WIDTH     210
  27. #define BKW_HEIGHT     55
  28. #define BKW_IDCMP     BUTTONIDCMP
  29.  
  30. #define AW_ID   17
  31.  
  32. /**
  33.  | A structure to store directory entries, when checking
  34.  | file integrity.
  35. **/
  36.  
  37. typedef struct sdirEntry {
  38.   struct sdirEntry *next;
  39.   char name[1];
  40. } dirEntry;
  41.  
  42. /**
  43.  | Local global variables
  44. **/
  45.  
  46. static char slate[SLATE_DIM];         /* All-purpose buffer */
  47. static ULONG diskChangeCount;         /* Disk change count */
  48. static int nErFil;                    /* Total number of errors */
  49. static int nDirs;                     /* Nr. of checked directories */
  50. static int nFiles;                    /* Nr. of checked files */
  51. static BOOL listFileNames = TRUE;     /* "List file names" flag */
  52. static unsigned abortDT = 0;          /* True when CTRL-C hit */
  53. static struct DriveGeometry drGeom;   /* Floppy drive characteristics */
  54. static ULONG cylSize;                 /* Bytes per cylinder */
  55.  
  56. /**
  57.  | Local procedures
  58. **/
  59.  
  60. static unsigned CheckBreak(void);
  61. static void     CheckDir(char *path, const BOOL root);
  62. static void     CheckFile(char *name);
  63. static void     DiskCheck(const int drive);
  64. static void     EndTest(void);
  65. static void     GetBuffer(const ULONG size);
  66. static void     Motor(const ULONG action);
  67. static void     OutLine(const BOOL last, char *fmt, ...);
  68. static void     ReadCyl(const int cyl, const int hd);
  69. static void     SeekFullRange(const SHORT howmany);
  70. static void     StartTest(void);
  71.