-- SakuraHelper.mesa
-- last edit by Russ Atkinson,  5-Jun-81  1:48:25
-- last edited by Suzuki,  27-Jul-81 13:40:40

DIRECTORY
  IOStream: TYPE USING [Handle], 
  SakuraTree: TYPE USING [Link], 
  Rope: TYPE USING [Ref];

SakuraHelper: DEFINITIONS
  = PUBLIC BEGIN OPEN Rope;

  Index: TYPE = LONG INTEGER; 
  InvalidIndex: Index = LAST[Index]; 
  
  Char: TYPE = CHARACTER; 
  
  -- this handle is used to hold on to the log stream
  handle: IOStream.Handle; 
  indent, position, line, page: Index; 
  sizing: BOOLEAN;
  lastChar: Char; 

  lateTrigger: Index; 
  earlyTrigger: Index; 

  Excess: ERROR; 

  Init: PROC;
    
  GetInfo: PROC [t: SakuraTree.Link] RETURNS [info: Index]; 
  
  GetAttrs: PROC [t: SakuraTree.Link] RETURNS [a1: BOOLEAN, a2: BOOLEAN, a3: BOOLEAN]; 
  
  WriteChar: PROC [c: CHARACTER]; 
  
  WriteId: PROC [r: Ref]; 
  
  WriteText: PROC [r: Ref]; 
  
  WriteQuotedText: PROC [r: Ref]; 
  
  Indent: PROC; 
  
  Break: PROC; 

  END.