-- VultureDefs.mesa
-- Maurice Herlihy August 12, 1982
-- Everything you need to know about Grapevine archive files.
-- Mostly taken from [indigo]<Grapevine>MS>Spiller.mesa

DIRECTORY
 BodyDefs,
 Space,
 VMDefs;

VultureDefs: DEFINITIONS = {

 DirEntry: TYPE = MACHINE DEPENDENT RECORD[
  bodyStart: LONG CARDINAL,   -- words from start of file; 0 for deleted --
  bodyLength: LONG CARDINAL,  -- words --
  textStart: LONG CARDINAL,   -- words from start of file, for MTP --
  textLength: BodyDefs.ItemLength  -- bytes, for MTP --
   ];

 Directory: PUBLIC TYPE = LONG POINTER TO DirEntry;

 DirHeader: TYPE = MACHINE DEPENDENT RECORD[spare: CARDINAL];

 entriesPerPage: INT = (VMDefs.pageSize-SIZE[DirHeader]) / SIZE[DirEntry];

 DirPageContents: TYPE = MACHINE DEPENDENT RECORD[
  header: DirHeader, entries: ARRAY [0..entriesPerPage) OF DirEntry ];

 DirPage: TYPE = LONG POINTER TO DirPageContents;

 DirArray: TYPE = ARRAY [0..LAST[CARDINAL]] OF DirPageContents;
 DirPages: TYPE = LONG POINTER TO DirArray;

 }.