-- CVExecutive.mesa; Edited by McGregor on 7-Dec-81 10:53:03

DIRECTORY
  Rope USING [Ref],
  TypeScript USING [ResetUserAbort, TS, UserAbort];

CVExecutive: DEFINITIONS IMPORTS TypeScript = BEGIN

CommandProc: TYPE = PROC [ts: TypeScript.TS, param: Rope.Ref] ;

AddCommand: PROC [key: Rope.Ref, proc: CommandProc, doc: Rope.Ref] ;
    -- Creates a new primive command for the Simple Executive.  doc is a brief
    -- description of the command.

GetToken: PROC [rope: Rope.Ref, offset: LONG INTEGER ← 0, thruEnd: BOOLEAN ← FALSE]
    RETURNS [token: Rope.Ref, newOffset: LONG INTEGER] ;
    -- A utility routine included here for use of clients who want to parse tokens
    -- out of a rope.  A "token" is a series of alphanumerics, separated by blanks.


anExecTS: TypeScript.TS;	-- a handle to last created Exec (could be >1)

currentParams: Rope.Ref;	-- args to current command

UserAbort: PROC RETURNS [BOOLEAN] = INLINE
	{RETURN[TypeScript.UserAbort[anExecTS]]} ;

ResetUserAbort: PROC = INLINE
	{TypeScript.ResetUserAbort[anExecTS]} ;

UserName: Rope.Ref ;		-- login cmd writes these (you can too)
UserPassword: Rope.Ref ;

END.