DFDWIM>DFUTest.Mesa
Last Edited by: Spreitzer, March 16, 1984 2:48:16 pm PST
DIRECTORY AMBridge, AMTypes, DFUtilities, FS, IO, PrintTV, Rope, StructuredStreams, ViewerIO;
DFUTest: CEDAR PROGRAM
IMPORTS AMBridge, DFUtilities, FS, IO, PrintTV, StructuredStreams, ViewerIO =
BEGIN
ROPE: TYPE = Rope.ROPE;
log: IO.STREAM ← StructuredStreams.Create[ViewerIO.CreateViewerStreams["DFU Test"].out];
Doit: PROC [fileName: ROPE] =
BEGIN
from: IO.STREAMFS.StreamOpen[fileName];
log.PutRope["\n"];
DFUtilities.ParseFromStream[in: from, proc: PerItem];
from.Close[];
END;
PerItem: DFUtilities.ProcessItemProc --PROC [item: REF ANY] RETURNS [stop: BOOL ← FALSE]-- =
BEGIN
i: AMTypes.TV;
TRUSTED {i ← AMBridge.TVForReferent[item]};
PrintTV.Print[tv: i, put: log, depth: 6];
log.PutRope["\n"];
END;
END.