<> <> <> <<>> DIRECTORY IO, MessageWindow, Rope, GGError; GGErrorImpl: CEDAR PROGRAM IMPORTS IO, MessageWindow EXPORTS GGError = BEGIN MsgType: TYPE = GGError.MsgType; <<>> <> <<>> gErrorStream: IO.STREAM; SetErrorStream: PUBLIC PROC [errorStream: IO.STREAM] = CHECKED { gErrorStream _ errorStream; }; GetErrorStream: PUBLIC PROC [] RETURNS [errorStream: IO.STREAM] = CHECKED { RETURN[gErrorStream]; }; Append: PUBLIC PROC [msg: Rope.ROPE, msgType: MsgType] = CHECKED { clearHerald, addCR: BOOL; clearHerald _ msgType = oneLiner OR msgType = begin; addCR _ msgType = oneLiner OR msgType = end; MessageWindow.Append[msg, clearHerald]; IF gErrorStream # NIL THEN { gErrorStream.PutF[msg]; IF addCR THEN gErrorStream.PutChar[IO.CR]; }; }; AppendHerald: PUBLIC PROC [msg: Rope.ROPE, clearHerald: BOOL] = CHECKED { MessageWindow.Append[msg, clearHerald]; }; AppendTypescript: PUBLIC PROC [msg: Rope.ROPE] = CHECKED { IF gErrorStream # NIL THEN { gErrorStream.PutF[msg]; gErrorStream.PutChar[IO.CR]; }; }; Blink: PUBLIC PROC [] = CHECKED { MessageWindow.Blink[]; }; NotYetImplemented: PUBLIC SIGNAL = CODE; END.