-- BBBugOut.mesa
-- Russ Atkinson, August 17, 1982 5:47 pm
-- some formatted output routines that are useful to BugBane
-- note that if any put routine defaults, then the default put is used
DIRECTORY
PrintTV USING [NullPutClosure, PutClosure],
Rope USING [ROPE],
RTBasic USING [TV, Type];
BBBugOut: CEDAR DEFINITIONS = BEGIN OPEN PrintTV, Rope, RTBasic;
ShowCR: PROC [put: PutClosure ← NullPutClosure];
ShowDecimal: PROC [x: INT, put: PutClosure ← NullPutClosure];
ShowOctal: PROC [x: INT, put: PutClosure ← NullPutClosure];
ShowRope: PROC [r: ROPE ← NIL, put: PutClosure ← NullPutClosure];
ShowRopes: PROC [r1,r2,r3,r4: ROPE ← NIL, put: PutClosure ← NullPutClosure];
ShowLine: PROC [r: ROPE ← NIL, put: PutClosure ← NullPutClosure];
ShowAtom: PROC [atom: ATOM, put: PutClosure ← NullPutClosure];
ShowChar: PROC [c: CHAR, put: PutClosure ← NullPutClosure];
ShowTV: PROC [tv: TV, deltaDepth: INTEGER ← 0, put: PutClosure ← NullPutClosure];
ShowType: PROC [type: Type, put: PutClosure ← NullPutClosure];
ParseAndPrint: PROC [program: ROPE, put: PutClosure ← NullPutClosure];
GetDefaultDepthAndWidth: PROC RETURNS [depth: NAT, width: NAT];
-- return default depth and width for printing
SetDefaultDepthAndWidth: PROC [depth: NAT ← 2, width: NAT ← 32];
-- set default depth and width for printing
-- output interceptor
GetDefaultPut: PROC RETURNS [put: PutClosure];
SetDefaultPut: PROC [put: PutClosure ← NullPutClosure] RETURNS [oldPut: PutClosure];
END.