DIRECTORY IO USING [STREAM], Rope USING [ROPE]; SimpleStreams: CEDAR DEFINITIONS ~ BEGIN Create: PROC [header: Rope.ROPE ¬ NIL, echo: BOOL ¬ TRUE, windowSystem: REF ¬ NIL] RETURNS [in, out, err: IO.STREAM, hasEcho: BOOL]; CreateProcType: TYPE = PROC [header: Rope.ROPE ¬ NIL, echo: BOOL ¬ TRUE, windowSystem: REF ¬ NIL] RETURNS [in, out, err: IO.STREAM ¬ NIL, hasEcho: BOOL ¬ FALSE]; ImplementCreate: PROC [windowSystem: REF, create: CreateProcType, setCurrent: BOOL ¬ TRUE]; SetCurrentCreate: PROC [windowSystem: REF, scope: REF ¬ NIL]; END. | SimpleStreams.mesa Copyright Σ 1988, 1992 by Xerox Corporation. All rights reserved. Christian Jacobi, August 26, 1988 11:12:22 am PDT Christian Jacobi, October 6, 1988 12:50:03 pm PDT Simple, window system independent stream IO facility. --Creates top level window with input, output and error stream for typescript-style I/O. --header: may be header line or simply first output, depending on window system. --windowSystem: preferred window system. Use this windowSystem if it is implemented, -- but otherwise use the "current" window system. Usually NIL or an atom. --echo: Whether input echos to the output stream. If no echo, streams returned are -- extremely simple, the input stream offers no editing, comment filtering, -- or echoing to the output stream. The client is free to layer these features -- anyway on top using the IO or EditedStream interface. -- Restriction: there might be "windowSystem" implementors which fail to -- implement the non echoed input stream; Clients can test for this using -- the returned hasEcho boolean. --Returns in, out, err: streams; out and err might be identical; err is useful for -- simulating unix, but is mostly ignored by more Cedarish clients. --The streams will raise IO.EndOfStream if the window is interactively destroyed (using -- a "windowSystem" dependent action). --Closing a stream might or might not remove the window. Backdoor features --Type used for implementations of Create --Provides procedure called on client requests for Create. --It is ok to return NIL for err. --It is ok to implement only non-echoed streams. --It is tolerated but not liked to implement only echoed streams. --See doc for restrictions on certain TYPE's of the windowSystem REF. --Defines windowSystem to be used if windowSystem parameter in Create is defaulted --No-op in case of non-implemented windowSystem --scope: validity range for call; see doc Κ;•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ7™BKšœ1™1Kšœ1™1K™—šΟk œ˜ Kšžœžœžœ˜Kšœžœžœ˜K˜—KšΟn œžœž œžœ˜)K™K™5K™šŸœžœžœžœžœžœžœžœžœžœžœ žœ˜„KšΟcX™XKš P™PKš W™WKš J™JKš T™TKš L™LKš Q™QKš 8™8Kš H™HKš I™IKš  ™ Kš S™SKš C™CKš W™WKš &™&Kš 8™8K˜—K˜šΟb™K˜šœžœžœžœžœžœžœžœžœžœžœžœžœ žœžœ˜‘K™)—K˜š Ÿœžœžœ&žœžœ˜[Kš :™:Kš !™!Kš 0™0Kš A™AKš E™E—K™š Ÿœžœžœ žœžœ˜=Kš R™RKš 1™1Kšœ "œ™*—K™—Kšžœ˜K˜—…—( ί