Text preview for : RectanglesB.mesa_Sep78.pdf part of xerox RectanglesB.mesa Sep78 xerox mesa 4.0_1978 listing Mesa_4_System RectanglesB.mesa_Sep78.pdf
Back to : RectanglesB.mesa_Sep78.pd | Home
RectanglesB.mesa 2-Sep-78 13:58:17 Page 1
-- RectanglesB.Mesa Edited by Sandman on May 12, 1978 2:51 PM
DIRECTORY
AltoDefs: FROM "altodefs" USING [PageSize],
ImageDefs: FROM "imagedefs" USING [
AddCleanupProcedure, AddFileRequest, AllReasons, CleanupItem, CleanupMask,
CleanupProcedure, FileRequest],
InlineDefs: FROM "inlinedefs" USING [BITAND],
IODefs: FROM "iodefs" USING [CR, DEL, SP],
MiscDefs: FROM "miscdefs" USING [Zero],
RectangleDefs: FROM "rectangledefs" USING [
backgtype, BitmapErrorCode, BitmapObject, blonklines, BMHandle, BMptr,
DCB, DCBchainHead, DCBnil, DCBptr, FAptr, Fptr, leftmargin, Rectangle,
ROptions, Rptr, xCoord, yCoord].
RectanglesA: FROM "rectanglesa" USING [
ComputeCharWidth. defaultcharwidths. defaultlineheight. defaultmapdata.
defaultpfont. FixupRectangle].
SDDefs: FROM "sddefs" USING [sAddFileRequest. SO].
SegmentDefs: FROM "segmentdefs" USING [
DefaultBase, DefaultPages, DefaultVersion. DeleteFileSegment. FileError.
FileNameError. FileSegmentAddress. FileSegmentHandle. Newfile.
NewFileSegment. OldFileOnly, Read. ReleaseFile. SwapIn. Unlock].
StreamDefs: FROM "streamdefs" USING [
DisplayHandle. GetDisplayStreamList. SetDisplayLine].
SystemDefs: FROM "systemdefs" USING [
AllocateHeapNode, AllocateResidentPages. FreeHeapNode. FreePages];
DEFINITIONS FROM RectangleDefs;
RectanglesB: PROGRAM [pagesformap. mapwordsperline: CARDINAL]
IMPORTS ImageDefs. MiscDefs, RectanglesA. SystemDefs. SegmentDefs,
StreamDefs
EXPORTS RectangleDefs SHARES RectangleDefs, RectanglesA =
BEGIN OPEN RectanglesA;
-- CHARACTER constants
CR: CHARACTER = IODefs.CR;
Space: CHARACTER = IODefs.SP;
DEL: CHARACTER = IODefs.DEL;
-- GLOBAL PUBLIC Data (all PUBLIC for initialization guy 11)
savedfirstDCB: DCBptr ~ NIL;
tempDCB: UNSPECIFIED;
bitmaps: PUBLIC BMHandle ~ NIL;
defaultfont: PUBLIC Fptr ~ NIL; -- points to start of font
defaultfontsegment: FileSegmentHandle ~ NIL;
SevenBitCharacter: TYPE CHARACTER[OC .. 177C];
FileSegmentHandle: TYPE = SegmentDefs.FileSegmentHandle;
-- GLOBAL Data
wordsinpage: CARDINAL = AltoDefs.PageSize;
-- Bitmap Rectangle Routines
CreateRectangle: PUBLIC PROCEDURE [
bitmap: BMHandle. xO, width: xCoord. yO. height: yCool'd] RETURNS[Rptr] =
BEGIN
rectangle: Rptr;
rectangle ~ SystemDefs.AllocateHeapNode[SIZE[Rectangle]];
rectanglet ~ Rectangle[NIL. FALSE,. bitmap. xO. width. O. yO. height, 0];
rectangle.options ~ ROptions[FALSE.FALSE];
rectangle. link ~ bitmap. rectangles;
bitmap.rectangles ~ rectangle;
FixupRectangle[rectangle];
RETURN[rectangle];
END;
DestroyRectangle: PUBLIC PROCEDURE [rectangle: Rptr]