-- File DBFileAlpine.mesa
-- Last edited by:
--   MBrown on February 22, 1983 11:30 am
--   Willie-sue on February 3, 1983 10:41 am
--   Cattell on July 11, 1983 11:04 am
-- Last Edited by: Wert, July 26, 1984 4:34:44 pm PDT

  DIRECTORY
    --DBEnvironment,
    DBCommon,
    Rope USING [ROPE, Text];

DBFileAlpine: DEFINITIONS = BEGIN
  ROPE: TYPE = Rope.ROPE;
  VersionOptions: TYPE = DBCommon.VersionOptions;

  AlpineTrans: TYPE = REF; --DBEnvironment.AlpineTrans;
  --AlpineTransRecord: TYPE = DBEnvironment.AlpineTransRecord;
  AlpineOpenFileHandle: TYPE = REF; --DBEnvironment.AlpineOpenFileHandle;
  --AlpineOpenFileRecord: TYPE = DBEnvironment.AlpineOpenFileRecord;

  --    Transactions

  CreateTransaction: PROC [server: ROPE] RETURNS [t: AlpineTrans];      

  FinishTransaction: PROC [t: AlpineTrans, abort: BOOL, continue: BOOL];

  --    Version numbers
  
  VersionNumberFromOpenFile: PROC [f: AlpineOpenFileHandle]
  RETURNS [versionNumber: INT];
  
  --    Files

  OpenFile: PROC [t: AlpineTrans, file: Rope.Text,
    version: VersionOptions, discardFileContents: BOOL, nPagesInitial: INT,
    readOnly: BOOL, noLog: BOOL]
    RETURNS [f: AlpineOpenFileHandle, createdFile: BOOL, versionNumber: INT];

  ReadFilePage: PROC [
    f: AlpineOpenFileHandle, p: CARDINAL, corePage: LONG POINTER];

  WriteFilePage: PROC [
    f: AlpineOpenFileHandle, p: CARDINAL, corePage: LONG POINTER];

  GetSize: PROC [f: AlpineOpenFileHandle] RETURNS [nPages: CARDINAL];

  SetSize: PROC [f: AlpineOpenFileHandle, nPages: CARDINAL];

  END.

Changed by Willie-Sue on February 3, 1983
--  added noLog arg to OpenFile

Changed by MBrown on February 7, 1983 12:24 pm
--  added discardFileContents parm to OpenFile, flushed Initialize

Changed by MBrown on February 22, 1983 11:29 am
--  make AlpineTrans, AlpineOpenFileHandle = REF, to break compilation dependency on
--AlpineEnvironment.

Changed by Cattell on May 10, 1984 6:22:32 pm PDT
-- added version to OpenFile

Changed by wert on July 26, 1984 4:34:20 pm PDT
-- added VersionNumberFromOpenFile[]