-- File: IntervalsDefs.mesa
-- Written by MN/DF March 1981
-- Last edited: March 24, 1981 12:33 PM
IntervalsDefs: DEFINITIONS =
BEGIN
BranchingFactor: CARDINAL = 4;
Node: TYPE = LONG POINTER TO NodeRecord;
NodeRecord: TYPE = RECORD [
sons: ARRAY [0..BranchingFactor) OF Node,
father: Node,
index: CARDINAL,--of self in father’s .sons
residue: Interval,
left: LONG INTEGER,
right: LONG INTEGER,
sonWidth: LONG INTEGER
];
Interval: TYPE = LONG POINTER TO IntervalRecord;
IntervalRecord: TYPE = RECORD [
next: Interval,
left:LONG INTEGER,
right: LONG INTEGER,
hook:LONG POINTER TO UNSPECIFIED
];
GetHandle: TYPE = POINTER TO GetHandleRecord;
GetHandleRecord: TYPE = RECORD [
left: LONG INTEGER,
right: LONG INTEGER,
node: Node,
interval: Interval
];
InitIntervals: PROCEDURE[left,right: LONG INTEGER] RETURNS[Node];
FreeIntervals: PROCEDURE[root: Node,
freeData: PROCEDURE[LONG UNSPECIFIED]];
NullFreeData: PUBLIC PROCEDURE[data: LONG UNSPECIFIED];
Insert: PROCEDURE[root: Node, left,right: LONG INTEGER,
data: LONG UNSPECIFIED];
GetFirst: PROCEDURE[root: Node, left,right: LONG INTEGER,
getHandle: GetHandle]
RETURNS[LONG POINTER TO UNSPECIFIED];
GetNext: PROCEDURE[getHandle: GetHandle]
RETURNS[LONG POINTER TO UNSPECIFIED];
END.