-- Source.mesa  last edit by: 
  -- Smokey  Sep 16, 1980 2:48 PM
  -- Bruce  September 19, 1980  4:06 PM
  
DIRECTORY
  DebugFormat USING [BreakType],
  MachineDefs USING [GFHandle, NullGF, SHandle],
  PrincOps USING [BytePC],
  Symbols USING [BTIndex],
  SymbolTable USING [Base],
  Window USING [Handle];
  
Source: DEFINITIONS =
  BEGIN
  
  Handle: TYPE = MachineDefs.SHandle;
  GFHandle: TYPE = MachineDefs.GFHandle;
  BytePC: TYPE = PrincOps.BytePC;
  
  -- from WiskOperations
  SC: TYPE = {set,clear};
  BreakRec: TYPE = RECORD [sc: SC, bt: DebugFormat.BreakType];
  
  LoadWindow: PROC [
    name: STRING, gf: GFHandle ← MachineDefs.NullGF,
    file: Handle ← NIL, position: LONG CARDINAL];
  Open: PROC [STRING] RETURNS [Handle];
  ResetFrames: PROC;
  SetSize: PROC;
  SetupSourceWindow: PROC;
   
  GetGF: PROC [Window.Handle] RETURNS [GFHandle];
  GetWindow: PROC [GFHandle] RETURNS [Window.Handle];
  IgnoreTimeStamp: PROC [Window.Handle] RETURNS [BOOLEAN];
  SetGF: PROC [Window.Handle, GFHandle];
    
  -- from StmtMap
  PCToSourceIndex: PROC [pc: BytePC, frame: GFHandle ← MachineDefs.NullGF]
    RETURNS [index: LONG CARDINAL];
  PcToSource: PROCEDURE [
    base: SymbolTable.Base, gf: GFHandle, pc: PrincOps.BytePC,
    bti: Symbols.BTIndex, start: PrincOps.BytePC]
    RETURNS [currentSource: CARDINAL];
    
  Display: PROC [gf: GFHandle, pc: BytePC, load: BOOLEAN];
  Validate: PROC [Source.Handle, GFHandle];
  
  FileMissing: SIGNAL [name: STRING];
  MappingFailure: SIGNAL;
  
  GetCreateDate: PROC [sh: Handle] RETURNS [LONG CARDINAL];
  PrintTextLine: PROC [sh: Handle, i: CARDINAL] RETURNS [index: CARDINAL];
  LittleParser: PROC [sh: Handle, module: STRING];
  
  END.