PrintFormsDefs.mesa
Last Edited by: Sweet, October 8, 1984 1:38:26 pm PDT
DIRECTORY
Ascii,
Containers USING [Container],
IO,
Rope,
SirPress,
TSFont,
ViewerClasses USING [Viewer];
PrintFormsDefs: DEFINITIONS = {
entryHeight: CARDINAL = 15; -- how tall to make each line of items
entryVSpace: CARDINAL = 8;  -- vertical leading space between lines
entryHSpace: CARDINAL = 10;  -- horizontal space between items in a line
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
dash: CHAR = Ascii.ControlV;
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];
Problem: ERROR;
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: 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,
affiliateThisPage: BOOLFALSE,
firstCaller: CallerNumber,
prevCaller: CallerNumber ← 0,
entriesOnPage: INT,
date: ROPE,
entryY: INT,
tsIn, tsOut: STREAM,
ts: ViewerClasses.Viewer ];  -- the typescript
FontClass: TYPE = {f0, f1, f2, f3, f4, f5, f6, bodyItalic, symbols};
nameFont: FontClass = f2;
bodyFont: FontClass = f3;
PromptRec: TYPE = RECORD [
handle: Handle, viewer: ViewerClasses.Viewer ← NIL];
PromptHandle: TYPE = REF PromptRec;
pageWidth: INT = 8*2540 + 2540/2;
pageHeight: INT = 11*2540;
CommandViewer: TYPE = RECORD [
inputFile, pressFile, callers, firstCaller: ViewerClasses.Viewer
];
SplatRope: PROCEDURE [h: Handle, x, y: INT, f: FontClass, s: ROPE];
DrawBox: PROCEDURE [h: Handle, x, y, width, height: INT];
PrintBoilerplate: PROC [h: Handle];
}.