home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 177.lha / DRes_v1.3 / src / ires.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-28  |  2.1 KB  |  93 lines

  1.  
  2. /*
  3.  *  Internal Resource Header Files
  4.  */
  5.  
  6. #define TML    struct _TML
  7. #define TREN    struct _TREN
  8. #define SVS    struct _SVS
  9. #define RFILE    struct _RFILE
  10. #define FTABLE    struct _FTABLE
  11. #define HTABLE    struct _HTABLE
  12.  
  13. /*
  14.  *  Task Mem-List Resource structure
  15.  */
  16.  
  17. TML {
  18.     long    XLock[2];
  19.     MLIST   RENList;    /*  List of resources            */
  20.     MLIST   RFList;    /*  List of private resource Files  */
  21. };
  22.  
  23. /*
  24.  *  Task Resource Entry
  25.  */
  26.  
  27. TREN {
  28.     MNODE   Node;
  29.     APTR    Ptr;
  30.     long    (*Func)();
  31. };
  32.  
  33. /*
  34.  *  Swap Volume Structure
  35.  */
  36.  
  37. SVS {
  38.     MNODE   Node;
  39.     long    XLock[2];
  40.     long    Fh;     /*  associated fh or lock    */
  41.     uword   Flags;    /*  HAVHANDLE, HAVLOCK        */
  42.     long    Swapped;    /*  bytes swapped        */
  43.     long    FileSize;    /*  current file size        */
  44.     long    Free;    /*  bytes free            */
  45.     long    Link[32];    /*  swap area free lists    */
  46.     char    *Name;    /*  swap volume name        */
  47. };
  48.  
  49. /*
  50.  *  Resource File Structure
  51.  */
  52.  
  53. RFILE {
  54.     MNODE   Node;
  55.     long    XLock[2];
  56.     long    Fh;     /*  associated fh or lock    */
  57.     long    HTsize;    /*  hash table size in file    */
  58.     long    Loaded;    /*  bytes loaded        */
  59.     long    Swapped;    /*  bytes swapped        */
  60.     uword   Flags;    /*  HAVHANDLE, HAVLOCK        */
  61.     uword   HTSize;    /*  pwr of 2, # of entries    */
  62.     FTABLE  **HTab;    /*  [n]&3:0-mem 1-seek.  file access dict.  */
  63.     HTABLE  **LTab;    /*  active resource access table (by name)  */
  64.     char    *Name;    /*  resource file name        */
  65. };
  66.  
  67. /*
  68.  *  Hash table entry for dictionary
  69.  */
  70.  
  71. FTABLE {
  72.     long    Next;    /*  Next entry 0-end, &3:0-mem 1-seek        */
  73.     uword   Flags;    /*  all applicable flags, inc load state    */
  74.     ubyte   NLen;    /*  name length                 */
  75.     ubyte   TLen;    /*  type length                 */
  76.     long    Seek;    /*  seek position in file            */
  77.     long    Len;    /*  size of resource in file / htable ptr   */
  78.     ubyte   Name[2];    /*  extend structure to [n]            */
  79. };
  80.  
  81. /*
  82.  *  Hash table entry for active resource
  83.  */
  84.  
  85. HTABLE {
  86.     long    Next;    /*  Next entry 0-end, &3:0-mem 1-swapped    */
  87.     uword   Flags;    /*  all applicable flags, inc load state    */
  88.     uword   Refs;
  89.     long    Ptr;    /*  data ptr, swap ptr                */
  90.     long    Func;    /*  control function                */
  91. };
  92.  
  93.