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 ROPE ← ALL[NIL],
name: ARRAY [0..4) OF ROPE ← ALL[NIL],
addr: ARRAY [0..4) OF ROPE ← ALL[NIL],
town: ROPE ← NIL,
zip: ROPE ← NIL,
mailing: ROPE ← NIL,
comment: ROPE ← NIL];
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: BOOLEAN ← FALSE,
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: BOOL ← FALSE,
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];
}.