CommanderBackdoor.mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, November 21, 1989 9:18:24 am PST
This interface has things that are used by few clients, and that are most likely to evolve.
DIRECTORY
BasicTime USING [GMT],
Commander USING [Handle],
Rope USING [ROPE];
CommanderBackdoor: CEDAR DEFINITIONS = BEGIN
Types
ROPE: PRIVATE TYPE = Rope.ROPE;
Creation
CommandToolData: TYPE ~ REF CommandToolDataRep;
CommandToolDataRep: TYPE ~ PACKED RECORD [
Prompt: PROC [cmd: Commander.Handle] ¬ NIL,
Called to prompt for the next command, maintain window heralds, and so forth.
Lookup: PROC [cmd: Commander.Handle] ¬ NIL,
Called to look up commands, prior to standard lookup; succeeds by supplying cmd.procData
Before: PROC [cmd: Commander.Handle] ¬ NIL,
Called before each command is executed
After: PROC [cmd: Commander.Handle] ¬ NIL,
Called after each command is executed
InitChild: PROC [cmd: Commander.Handle] ¬ NIL,
Called to initialize a new child Commander.Handle
process: REF PROCESS ¬ NIL,
verbose: BOOL ¬ FALSE,
statistics: BOOL ¬ FALSE,
keepHistory: BOOL ¬ FALSE,
stopOnFailure: BOOL ¬ FALSE,
parentCommander: Commander.Handle ¬ NIL,
recent: REF CommandHistoryElement,
history: CommandHistoryList,
childHistory: CommandHistoryList,
private: REF PrivateDataRep
];
CommandHistoryList: TYPE ~ LIST OF CommandHistoryElement;
CommandHistoryElement: TYPE ~ RECORD [
commandNumber: CARD,
wholeCommandLine: ROPE,
result: REF,
msg: ROPE,
startTime: BasicTime.GMT,
seconds: REAL,
allocations: CARD,
pageFaults: CARD,
subHistory: CommandHistoryList
];
PrivateDataRep: TYPE;
GetCommandToolData: PROC [cmd: Commander.Handle] RETURNS [CommandToolData];
AdamOrEve: PROC [cmd: Commander.Handle] RETURNS [Commander.Handle];
Chases parent links to get to the handle with no parent.
AbortCommander: PROC [cmd: Commander.Handle];
Raises ABORTED in the process that currently owns the handle.
SetProcess: PROC [cmd: Commander.Handle, process: PROCESS];
Sets the ownership of the handle; normally only done by ReadEvalPrintLoop.
END.