-- 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.