-- OldSortDirDefs.mesa -- Last Edited by: Sweet, September 13, 1985 11:30:02 pm PDT DIRECTORY Basics, Containers, IO, Rope, ViewerClasses; OldSortDirDefs: DEFINITIONS = { ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; CallerNumber: TYPE = [0..200); CP: TYPE = RECORD [name, phone: ROPE, recruiter: CallerNumber]; Handle: TYPE = REF MyRec; -- a REF to the data for a particular instance of the sample tool; multiple instances can be created. MyRec: TYPE = RECORD [ -- the data for a particular tool instance outer: Containers.Container _ NIL, -- handle for the enclosing container height: CARDINAL _ 0, -- height measured from the top of the container cmd: CommandViewer, -- the commands in: IO.STREAM, eof: BOOLEAN _ FALSE, out: IO.STREAM, item: EntrySeq, tsIn, tsOut: STREAM, zip: REF BOOL, ts: ViewerClasses.Viewer ]; -- the typescript nLines: NAT = 5; SmallCount: TYPE = [0..nLines); Entry: TYPE = RECORD [ phone: ARRAY SmallCount OF ROPE _ ALL[NIL], name: ARRAY SmallCount OF ROPE _ ALL[NIL], addr: ARRAY SmallCount OF ROPE _ ALL[NIL], town: ROPE _ NIL, zip: ROPE _ NIL, <> cname: ROPE, -- cannonical form name zipNumber: LONG CARDINAL ]; EntrySeqBody: TYPE = RECORD [count: CARDINAL _ 0, e: SEQUENCE max: CARDINAL OF REF Entry]; EntrySeq: TYPE = REF EntrySeqBody; CommandViewer: TYPE = RECORD [ inputFile, outputFile, workingDir: ViewerClasses.Viewer ]; CompareProc: PROC [h: Handle, r1, r2: REF Entry] RETURNS [Basics.Comparison]; Quit: PROC [handle: Handle, reason: ROPE _ NIL]; Quit2: PROC [handle: Handle, st: IO.STREAM, reason: ROPE _ NIL]; }.