--File IntUtilityDefs.mesa
--
March 27, 1981 2:15 PM

DIRECTORY


IntStorageDefs: FROM "IntStorageDefs" USING [ObjectName, Object],

ParserTypeDefs: FROM "ParserTypeDefs" USING [Path, Point];

IntUtilityDefs:
DEFINITIONS =

BEGIN

OpenCode: TYPE = {Defined, Undefined, Expanded};

InitUtilities: PROCEDURE RETURNS [BOOLEAN];
FinishUtilities: PROCEDURE RETURNS [BOOLEAN];

-- report an error
LogError: PROCEDURE [s: STRING];
-- whether or not it’s ok to continue
OKToContinue: PROCEDURE RETURNS [BOOLEAN];

-- reentrant minimum/maximum stuff for finding bounding boxes
InitMM: PROCEDURE [x,y: LONG INTEGER];
MinMax: PROCEDURE [x,y: LONG INTEGER];
DoneMM: PROCEDURE;
Extent: PROCEDURE RETURNS [l,r,b,t: LONG INTEGER];

-- bind a symbol (and all of its internals) now
BindSymbol: PROCEDURE [sym: LONG CARDINAL] RETURNS [IntStorageDefs.ObjectName];

FindCallBB: PROCEDURE [thing: IntStorageDefs.Object];

-- return the set name of all define symbols
DefinedSet: PROCEDURE RETURNS [IntStorageDefs.ObjectName];

-- find first undeleted version of symNumber, if none, make a blank STEntry, return the name
LookUp: PROCEDURE [symNumber: LONG CARDINAL] RETURNS [IntStorageDefs.ObjectName];

-- delete all symbols numbered n and above, return the updated defined set
DeleteSymbol: PROCEDURE [definedSet: IntStorageDefs.ObjectName, n: LONG CARDINAL] RETURNS [IntStorageDefs.ObjectName];

-- redefine a bound symbol, return a new name
RedefineSymbol: PROCEDURE [symNumber: LONG CARDINAL] RETURNS [IntStorageDefs.ObjectName];

-- free the guts of a symbol
FreeGuts: PROCEDURE [head: IntStorageDefs.ObjectName];

-- set this.next (or this.guts) to that
LinkObject: PROCEDURE [this,that: IntStorageDefs.ObjectName];

-- set up scale factors for DS
SetScale: PROCEDURE [a,b: LONG CARDINAL];

-- scale a long cardinal by factors set up by a call to SetScale
ScaleLong: PROCEDURE [LONG CARDINAL] RETURNS [LONG CARDINAL];

-- scale a long integer by factors set up by a call to SetScale
ScaleLongInt: PROCEDURE [LONG INTEGER] RETURNS [LONG INTEGER];

-- scale a path by factors set up by a call to SetScale
ScalePath: PROCEDURE [s,d: ParserTypeDefs.Path];

-- scale a point by factors set up by a call to SetScale
ScalePoint: PROCEDURE [ParserTypeDefs.Point] RETURNS [ParserTypeDefs.Point];

END.