-- DContext.mesa  last edit, Bruce  July 16, 1980  12:09 PM

DIRECTORY
  BcdDefs USING [BCD, CTIndex],
  BcdOps USING [BcdBase],
  MachineDefs USING [ConfigIndex, FHandle, GFHandle, GFTIndex, PHandle];

DContext: DEFINITIONS =
  BEGIN

  BcdBase: TYPE = BcdOps.BcdBase;

  -- setting

  Reset: PROCEDURE;
  SetOctal: PROCEDURE [p: POINTER];
  SetGlobal: PROCEDURE [gf: MachineDefs.GFHandle];
  SetLocal: PROCEDURE [lf: MachineDefs.FHandle];
  SetProcess: PROCEDURE [p: MachineDefs.PHandle];
  SetRootConfig: PROCEDURE [config: STRING];
  SetConfig: PROCEDURE [config: STRING];
  SetModule: PROCEDURE [mod: STRING];

  -- retrieving

  GetOctal: PROCEDURE RETURNS [p: POINTER];
  GetGlobal: PROCEDURE RETURNS [gf: MachineDefs.GFHandle];
  GetLocal: PROCEDURE RETURNS [lf: MachineDefs.FHandle];
  GetProcess: PROCEDURE RETURNS [p: MachineDefs.PHandle];
  GetRootConfig: PROCEDURE RETURNS [config: STRING];
  GetRootConfigIndex: PROCEDURE RETURNS [config: MachineDefs.ConfigIndex];
  GetConfig: PROCEDURE RETURNS [config: STRING];
  GetConfigIndex: PROCEDURE RETURNS [cti: BcdDefs.CTIndex];
  GetModule: PROCEDURE RETURNS [mod: STRING];

  -- displaying

  ListConfigs: PROCEDURE;
  DisplayConfig: PROCEDURE;
  DisplayCurrent: PROCEDURE;

  -- utilities

  MapRC: PROCEDURE [f: MachineDefs.GFHandle]
    RETURNS [cgfi: MachineDefs.GFTIndex, config: MachineDefs.ConfigIndex];
  Enumerate: PROC [proc: PROC [MachineDefs.GFHandle] RETURNS [BOOLEAN]];
  SameConfig: PROC [bcd: BcdBase, child, parent: BcdDefs.CTIndex]
    RETURNS [BOOLEAN];

  END.