PrintDirDefs.mesa
Last Edited by: Sweet, October 8, 1984 11:12:53 am PDT
DIRECTORY
Containers USING [Container],
IO,
Rope,
SirPress,
TSFont,
ViewerClasses USING [Viewer];
PrintDirDefs: DEFINITIONS = {
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
FontClass: TYPE = {body, bodyBold, bodyItalic, bodyBoldItalic, headingLarge, headingSmall, pageNum, date, tabs, display, symbols, campaign, comment};
CallerNumber: TYPE = [0..200);
CP: TYPE = RECORD [name, phone: ROPE, recruiter: CallerNumber];
CallerNameRec: TYPE = ARRAY CallerNumber OF CP;
Entry: TYPE = RECORD [
caller: CallerNumber ← 0,
activity, level, dinner, age: CHAR ← ' ,
phone: ARRAY [0..4) OF ROPEALL[NIL],
name: ARRAY [0..4) OF ROPEALL[NIL],
addr: ARRAY [0..4) OF ROPEALL[NIL],
town: ROPENIL,
zip: ROPENIL,
mailing: ROPENIL,
comment: ROPENIL];
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
dim: DimRecord ← TRASH,
in: STREAM, eof: BOOLEANFALSE,
out: STREAM, -- for press file
press: SirPress.PressHandle ← NIL,
fontCode: ARRAY FontClass OF SirPress.FontCode,
fontInfo: ARRAY FontClass OF TSFont.Ref,
callerName: REF CallerNameRec,
yTop: INT, firstOnPage, lastOnPage, heading, date: ROPE,
pageNumber: INT ← 1,
phoneX, phoneX2, indent, nameX, addrX, townX, zipX, addrPWidth, callerRight: INT,
prevInitial: CHAR ← 0C,
prevZip: ROPENIL,
duplex, alphaSort: REF BOOL, -- ← TRUE
separatePages, zipSort, actualLevel, callersOnly, mailingOnly: REF BOOL, -- ← FALSE
flagCallers, ageSort, dinnerSort, showCallers: REF BOOL, -- ← FALSE
affiliateThisPage: BOOLFALSE,
fumcX, dateX: INT,
callerX, recruiterX: INT,
tsIn, tsOut: STREAM,
ts: ViewerClasses.Viewer ];  -- the typescript
CommandViewer: TYPE = RECORD [
inputFile, pressFile, heading, callers, yLead, fontSize, lineHeight, firstRecruiter, lastRecruiter, topMargin, bottomMargin, leftMargin, rightMargin, displayHeight, tabHeight, nameIndent: ViewerClasses.Viewer
];
DimRecord: TYPE = RECORD [
yLead, fontSize, lineHeight, firstRecruiter, lastRecruiter, topMargin, bottomMargin, leftMargin, rightMargin, displayHeight, tabHeight, nameIndent: INT];
PromptRec: TYPE = RECORD [
handle: Handle, viewer: ViewerClasses.Viewer ← NIL];
PromptHandle: TYPE = REF PromptRec;
pageWidth: INT = 612;
pageHeight: INT = 792;
Problem: ERROR;
}.