home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / formatter_377.lzh / Formatter / PreInclude.c < prev    next >
C/C++ Source or Header  |  1990-10-10  |  3KB  |  109 lines

  1. /* $Revision Header * Header built automatically - do not edit! *************
  2.  *
  3.  *    (C) Copyright 1990 by MXM
  4.  *
  5.  *    Name .....: PreInclude.c
  6.  *    Created ..: Thursday 31-May-90 19:49
  7.  *    Revision .: 1
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    24-Jul-90       Olsen           Added __NO_PRAGMAS and FormatterPort
  12.  *    31-May-90       Olsen           Created this file!
  13.  *
  14.  ****************************************************************************
  15.  *
  16.  *    This file contains various includes/definitions used by Formatter.c
  17.  *
  18.  * $Revision Header ********************************************************/
  19.  
  20.     /* Note: I discovered that inline-library calls actually
  21.      *       slowed down the program and caused it to become
  22.      *       larger than necessary.
  23.      */
  24.  
  25. #define __NO_PRAGMAS 1
  26.  
  27. #include <intuition/intuitionbase.h>
  28. #include <libraries/filehandler.h>
  29. #include <libraries/dosextens.h>
  30. #include <devices/trackdisk.h>
  31. #include <libraries/arpbase.h>
  32. #include <graphics/gfxbase.h>
  33. #include <devices/timer.h>
  34. #include <exec/devices.h>
  35. #include <exec/memory.h>
  36. #include <functions.h>
  37.  
  38.     /* This is the typical form of a disk bitmap (well, this
  39.      * is how it would look like in 'C').
  40.      */
  41.  
  42. struct DosBitmap
  43. {
  44.     ULONG    CheckSum;    /* Block checksum. */
  45.  
  46.     ULONG    BitmapData[55];    /* 55 × 32 Bits = 1760 blocks. */
  47.  
  48.     ULONG    WhoKnows0[72];    /* 72 unused bytes (to fit into 512 bytes). */
  49. };
  50.  
  51.     /* This structure describes the root directory of a disk. */
  52.  
  53. struct DosDirectory
  54. {
  55.     ULONG            PrimaryType;        /* Primary type. */
  56.     ULONG            HeaderKey;        /* Header key, always null. */
  57.  
  58.     ULONG            WhoKnows0;
  59.     ULONG            HashTableSize;        /* Size of hash table (128 - 56 = 72). */
  60.     ULONG            WhoKnows1;
  61.  
  62.     ULONG            CheckSum;        /* Block checksum. */
  63.  
  64.     ULONG            HashTable[72];        /* Hash table (filled in later). */
  65.  
  66.     ULONG            BitmapFlag;        /* DOSTRUE if bitmap is valid. */
  67.  
  68.     ULONG            BitmapPointers[25];    /* Pointers to bitmap blocks. */
  69.     ULONG            BitmapExtension;    /* Pointer to bitmap extra information. */
  70.  
  71.     struct DateStamp    LastRootChange;        /* Time and date of last change in root directory. */
  72.  
  73.     char            DiskName[32];        /* Disk name as a BCPL string (max. 31 characters). */
  74.  
  75.     ULONG            WhoKnows2[2];
  76.  
  77.     struct DateStamp    LastDiskChange;        /* Time and date of last change on disk. */
  78.     struct DateStamp    CreationDate;        /* Time and date of disk creation. */
  79.  
  80.     ULONG            NextHash;        /* Next entry in hash chain (userdir only). */
  81.     ULONG            ParentDir;        /* Pointer to block with parent dir (userdir only). */
  82.  
  83.     ULONG            WhoKnows3;
  84.  
  85.     ULONG            SecondaryType;        /* Secondary type (huh?). */
  86. };
  87.  
  88.     /* Global shared MsgPort. */
  89.  
  90. struct FormatterPort
  91. {
  92.     struct MsgPort    Port;            /* Standard exec link field. */
  93.  
  94.     BYTE        DriveInUse[4];        /* Occupied drives. */
  95.  
  96.     BYTE        NumPrgs;        /* Number of Formatters currently running. */
  97. };
  98.  
  99.     /* Hard coded disk data. */
  100.  
  101. #define NUMCYLS        80            /* Number of cylinders. */
  102. #define NUMHEADS    2            /* Number of heads. */
  103. #define NUMTRACKS    (NUMCYLS * NUMHEADS)    /* Number of tracks. */
  104.  
  105. #define T_SHORT        2            /* Primary type. */
  106. #define ST_ROOT        1            /* Secondary type. */
  107.  
  108. #define MILLION        1000000            /* Yes, this is a million. */
  109.