<> <> <> DIRECTORY AMBridge USING [TVToLC], BasicTime USING [GMT, nullGMT], Convert USING [RopeFromTime], IO USING [PutRope], PrintTV USING [RegisterRefPrintProc, RegisterTVPrintProc, RefPrintProc, TVPrintProc], Rope USING []; GmtDebug: CEDAR PROGRAM IMPORTS AMBridge, Convert, IO, PrintTV= { GMT: TYPE = BasicTime.GMT; PrintRefGMT: PrintTV.RefPrintProc = { <<[ref: REF READONLY ANY, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE]>> gmt: REF READONLY GMT; TRUSTED { gmt _ LOOPHOLE[ref]; }; IF gmt^ = BasicTime.nullGMT THEN IO.PutRope[stream, "nullGMT"] ELSE IO.PutRope[stream, Convert.RopeFromTime[ from: gmt^, end: seconds, useAMPM: FALSE, includeZone: FALSE] ]; }; PrintTVGMT: PrintTV.TVPrintProc = TRUSTED { <<[tv: TV, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE]>> gmt: GMT; TRUSTED { gmt _ LOOPHOLE[AMBridge.TVToLC[tv]]; }; IF gmt = BasicTime.nullGMT THEN IO.PutRope[stream, "nullGMT"] ELSE IO.PutRope[stream, Convert.RopeFromTime[ from: gmt, end: seconds, useAMPM: FALSE, includeZone: FALSE] ]; }; PrintTV.RegisterRefPrintProc[CODE[GMT], PrintRefGMT]; PrintTV.RegisterTVPrintProc[CODE[GMT], PrintTVGMT]; }.