InterminalExtraExtra.mesa
Created Wednesday, June 6, 1984 1:39 pm PDT
Lasted edited by Eric Nickell, April 1, 1985 3:43:48 am PST
DIRECTORY
InterminalImpl USING [DisplayRec, left, right];
InterminalExtraExtra: CEDAR PROGRAM
IMPORTS InterminalImpl
SHARES InterminalImpl
~ {
Side: PUBLIC TYPE ~ {left, right};
SetColorDisplaySide: PUBLIC SAFE PROC[side: Side] ~ CHECKED {
OPEN InterminalImpl;
IF GetColorDisplaySide[]#side THEN { -- swap
temp: POINTER TO DisplayRec ~ right;
right ← left; left ← temp;
};
};
GetColorDisplaySide: PUBLIC SAFE PROC RETURNS[Side] ~ TRUSTED {
OPEN InterminalImpl;
RETURN[IF left.color THEN left ELSE right];
};
}.