Text preview for : Display.mesa_Oct77.pdf part of xerox Display.mesa Oct77 xerox mesa 3.0_1977 listing Display.mesa_Oct77.pdf



Back to : Display.mesa_Oct77.pdf | Home

display.mESA 24-0CT-77 18:23:01 Page 1


-- File: display.mesa Edited by: Johnsson, September 27, 1977 11:23 AM
DIRECTORY
SystemDefs: FROM "systemdefs",
StreamDefs: FRO~I "streamdefs",
RectangleDefs: FROM "rectangledefs";
DEFINITIONS FROM StreamDefs, RectangleDefs;
Display: PROGRAM
IMPORTS Rectang1eOefs, StreamDefs, SystemDefs EXPORTS StreamDefs SHARES StreamDefs =
BEGIN
-- CHARACTER constants
NUL: CIIARACTER = OC;
TAB: CHARACTER = l1C;
CR: CHARACTER = 15C;
BackSpace: CHARACTER = 10C;
Contl'olA: CHARACTrR = lC;
Space: CHARACTER = 40C;
MaxCharCode: CHARACTER = 377C;
-- GLOBAL PUBLIC Data
defau1tdisp1aystream: PUBLIC DisplayHandle ~ NIL;
disp1aystreams: Disp1ayHandle ~ NIL;
-- Mesa Display Stream Routines
CreateOisp1ayStream: PUBLIC PROCEDURE [rectangle: Rptr] RETURNS[DisplayHandle]
BEGIN
-- declare locals
ds: DisplayHandle;
-- now create stream structure and init it
ds ~ SystemDefs.AllocateHeapNode[SIZE[Display StreamObject]];
ds~ ~ StreamObject[ResetDisplayStream. GetNOP. PutbackNOP. WriteDisp1ayChar.
EndoFNOP. ')estroyDisplayStream. Display[ ...