-- BTreeSupportDefs.mesa
-- last edited by Levin: 29-Jan-82 13:16:32

BTreeSupportDefs: DEFINITIONS =

  BEGIN

  FileHandle: TYPE[2];
  PageHandle: TYPE = LONG POINTER TO ARRAY OF WORD;
  PageNumber: TYPE = CARDINAL;

  ReadPage: PROCEDURE [fileH: FileHandle, pageN: PageNumber]
    RETURNS [pageH: PageHandle];
    -- does allocation of main memory.

  UsePage: PROCEDURE [fileH: FileHandle, pageN: PageNumber]
    RETURNS [pageH: PageHandle];
    -- for when the page has no valid data.  Avoids unnecessary disk
    -- read if < eof, works for 1 page > eof.  Does not zero the page.

  WritePage: PROCEDURE [fileH: FileHandle, pageN: PageNumber, pageH: PageHandle];
  -- deallocates main memory.

  ReleasePage: PROCEDURE [pageH: PageHandle];
  -- for when page has not been dirtied.

  SetLength: PROCEDURE [fileH: FileHandle, pageN: PageNumber];
  -- will be used by PruneBTree.

  PageSize: PROCEDURE RETURNS [nWords: CARDINAL];

  AllocateWords: PROCEDURE [nWords: CARDINAL] RETURNS [LONG POINTER];
  FreeWords: PROCEDURE [LONG POINTER];

  END.
					Edit Log

Change: May 13, 1980  1:04 PM: KK: interface changes so the message system and Juniper can both use the btree package.