<<>> <> <> <> <> <> <> <> DIRECTORY EditedStream USING [DeliverWhenProc], IO USING [STREAM], List USING [AList], MBQueue USING [Queue], Rope USING [ROPE]; ReadEvalPrint: CEDAR DEFINITIONS = BEGIN OPEN IO, Rope; <> Handle: TYPE = REF RObject; ViewerREF: TYPE = REF ANY; -- NARROW to ViewerClasses.Viewer; avoids interface dependency RObject: TYPE = MONITORED RECORD [ viewer: ViewerREF ¬ NIL, in: STREAM ¬ NIL, out: STREAM ¬ NIL, menuHitQueue: MBQueue.Queue, terminateRequested: BOOL ¬ FALSE, mainLoopProcess: PROCESS ¬ NIL, clientProc: ClientProc ¬ NIL, deliverWhenProc: EditedStream.DeliverWhenProc ¬ NIL, prompt: ROPE ¬ NIL, promptProc: PROC [Handle] ¬ NIL, topLevel: BOOL ¬ TRUE, clientData: REF ANY ¬ NIL, ruboutProc: PROC [Handle] ¬ NIL, readABORTEDRope: ROPE ¬ NIL, -- " aborted\n" readIOSignalRope: ROPE ¬ NIL, -- " XXX\n" evalABORTEDRope: ROPE ¬ NIL, -- " ...Aborted\n" evalUNWINDRope: ROPE ¬ NIL -- " ...Unwound\n" ]; <<>> <> <> <> <> <> <> ClientProc: TYPE = PROC [h: Handle, command: ROPE] RETURNS [result: ROPE ¬ NIL]; <> ViewerInfoRec: TYPE = RECORD [ <> name: ROPE ¬ NIL, label: ROPE ¬ NIL, column: ATOM ¬ NIL, iconic: BOOL ¬ TRUE ]; CreateViewerEvaluator: PROC [clientProc: ClientProc, prompt: ROPE ¬ NIL, info: ViewerInfoRec ¬ [], edited: BOOL ¬ TRUE, deliverWhen: EditedStream.DeliverWhenProc ¬ NIL, clientData: REF ANY ¬ NIL, topLevel: BOOL ¬ TRUE] RETURNS [Handle]; <> <<>> <<>> CreateStreamEvaluator: PROC [clientProc: ClientProc, prompt: ROPE ¬ NIL, in, out: STREAM, deliverWhen: EditedStream.DeliverWhenProc ¬ NIL, clientData: REF ANY ¬ NIL, topLevel: BOOL ¬ FALSE] RETURNS [Handle]; <> MainLoop: PROC [h: Handle, forkAndDetach: BOOL ¬ TRUE, properties: List.AList]; <> Stop: PROC [h: Handle]; <> END.