-- File: ViewersIOStream.mesa -- Teitelman on 14-Dec-81 12:10:22 DIRECTORY Rope, IOStream, TypeScript, ViewerClasses; ViewersIOStream: DEFINITIONS = BEGIN CreateViewerStreams: PROC [name: Rope.ROPE ← NIL, viewer: ViewerClasses.Viewer ← NIL] RETURNS [in: IOStream.Handle, out: IOStream.Handle]; -- If viewer is non-NIL, creats two IOStreams, one for input, one for output, -- and "connects" them to the indicated viewer. Viewer must be of viewerclass -- TypeScript or raises RTTypesBasic.NarrowRefFault. -- If viewer is NIL, creates a Viewer of class TypeScript with name name -- (default to whatever Viewer defaults to), and proceeds as above. -- N.B. It is perfectly permissible to have more than one output stream connected -- to the same viewer. However, if two input IOStreams are connected to the same -- viewer and a character is typed, only one of the streams will get the character. END.