-- Exec.mesa; edited by Johnsson,  2-Dec-80  8:04:03
--  edited by Loretta,  6-Feb-81 11:33:42

DIRECTORY
  TTY USING [Handle];

Exec: DEFINITIONS =
  BEGIN

  AddCommand: PROCEDURE [name: LONG STRING, proc: PROCEDURE];
  
  AppendCommands: PROCEDURE [LONG STRING];  -- Add text to end of remaining commands
  
  CheckForAbort: PROCEDURE RETURNS [BOOLEAN];

  GetNameandPassword: PROCEDURE [name, password: STRING];
  
  GetChar: PROCEDURE RETURNS [char: CHARACTER];
  
  GetToken: PROCEDURE [get: PROC RETURNS [CHARACTER], token, switches: STRING]; 

  MatchPattern: PROCEDURE [string, pattern: STRING] RETURNS [BOOLEAN];
  
  PrependCommands: PROCEDURE [LONG STRING];  -- Add text to beginning of remaining commands

  RemoveCommand: PROCEDURE [name: LONG STRING];

  CommandLine: TYPE = RECORD [
    s: LONG POINTER TO READONLY StringBody,
    i: CARDINAL];

  commandLine: CommandLine;
  
  status: TYPE = MACHINE DEPENDENT{normal(0), warning, error, abort, spare1, spare2, spare3,last(65535)};
  
  returnStatus: status;

  w: READONLY TTY.Handle;

  END...