-- 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: BOOLEANFALSE,
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 ROPEALL[NIL],
name: ARRAY SmallCount OF ROPEALL[NIL],
addr: ARRAY SmallCount OF ROPEALL[NIL],
town: ROPENIL,
zip: ROPENIL,
extracted for use by sort comparison
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: ROPENIL];
Quit2: PROC [handle: Handle, st: IO.STREAM, reason: ROPENIL];
}.