MessagesOutImpl.mesa
Copyright Ó 1985, 1990, 1991, 1992 by Xerox Corporation. All rights reserved.
Russ Atkinson, March 7, 1985 2:31:57 pm PST
Laurie Horton, October 26, 1990 2:13 pm PDT
Willie-s, February 21, 1991 1:00 pm PST
DIRECTORY
MessagesOut USING [],
IO USING [PutRope, STREAM],
Process USING [CheckForAbort],
Rope USING [ROPE],
SimpleFeedback USING [Append];
MessagesOutImpl:
CEDAR
MONITOR
IMPORTS IO, Process, SimpleFeedback
EXPORTS MessagesOut
= BEGIN
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
PutRopes:
PUBLIC
ENTRY
PROC [stream:
STREAM, r1,r2,r3,r4:
ROPE ¬
NIL] = {
ENABLE UNWIND => NULL;
IF stream #
NIL
THEN {
IO.PutRope[stream, "\n"];
IF r1 # NIL THEN IO.PutRope[stream, r1];
IF r2 # NIL THEN IO.PutRope[stream, r2];
IF r3 # NIL THEN IO.PutRope[stream, r3];
IF r4 # NIL THEN IO.PutRope[stream, r4];
};
Process.CheckForAbort[];
};
PutMsg:
PUBLIC
ENTRY
PROC [r1,r2,r3,r4:
ROPE ¬
NIL] = {
ENABLE UNWIND => NULL;
Put: PROC[r: ROPE] ~ { SimpleFeedback.Append[$VersionMapBuilder, oneLiner, $Info, r] };
Put[r1];
IF r2 # NIL THEN Put[r2];
IF r3 # NIL THEN Put[r3];
IF r4 # NIL THEN Put[r4];
Process.CheckForAbort[];
};
END.