File information: | |
File name: | KeyStreams.mesa_Oct77.pdf [preview KeyStreams.mesa Oct77] |
Size: | 204 kB |
Extension: | |
Mfg: | xerox |
Model: | KeyStreams.mesa Oct77 🔎 |
Original: | KeyStreams.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing KeyStreams.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 03-02-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name KeyStreams.mesa_Oct77.pdf keysTREAMS.mESA 24-0CT-77 18:30:50 Page 1 -- KeyStreams.Mesa Edited by Johnsson on September 22, 1977 8:23 AM DIRECTORY Keyboard: FROM "keyboard", KeyOefs: FROM "keydefs", Mopcodes: FROM "mopcodes", StreamOefs: FROM "streamdefs", Sys temOefs: FROM "systemdefs", InlineOefs: FROM "inlinedefs", ControlOefs: FROM "controldefs", ProcessDefs: FROM "processdefs"; DEFINITIONS FROM ProcessOefs, InlineOefs, KeyOefs, StreamOefs; KeyStreams: PROGRAM IMPORTS Keyboard, ProcessOefs. StreamDefs. SystemDefs EXPORTS KeyDefs. StreamOefs SHARES ProcessDefs. StreamDefs = BEGIN -- The Stream part: KS: PUBLIC Keyboard StreamObject ~ StreamObject [ ClearInputBuffer. Keyboard.ReadChar. PutBackChar, WriteChar, Keyboard.InputBufferEmpty, DestroyKey. Keyboard[a,a. ,]]; GetDefaultKey: PUBLIC PROCEDURE RETURNS [KeyboardHandle) BEGIN RETURN[@KS); END; GetCurrentKey: PUBLIC PROCEDURE RETURNS [KeyboardHandle] BEGIN RETURN[Keyboard.ks]; END; CreateKeyStream: P'JBLIC PROCEDURE RETURNS [KeyboardHandle] = BEGIN OPEN SystemDefs; s: KeyboardHandle ~ SystemDefs.AllocateHeapNode[SIZE[Keyboard StreamObject]]; S1' ~ KS; s.buffer ~ LOOPHOLE[BASE[s.bstring],STRING); s.in ~ s.out ~ a; RETURN[s]; END; ControlDELtyped: PUBLIC PROCEDURE RETURNS [BOOLEAN] BEGIN RETURN[Keyboard.COT] END; ResetControlDEL: PUBLIC PROCEDURE BEGIN Keyboard.CDT ~ FALSE END; OpenKeyStream: PUBLIC PROCEDURE [stream:StreamHandle] BEGIN WITH s:stream SELECT FROM Keyboard => Keyboard.ks ~ @s; ENDCASE =) SIGNAL StreamError[stream.StreamType]; RETURN; END; ClearlnputBuffer: PROCEDURE [stream:StreamHandle) BEGIN WITH s: stream SELECT FROM Keyboard =) s. in ~ S.out ~ 0; ENOCASf => SIGNAL SLreamError[stream.StreamType]; RrTURN; END; SeLIclleProc: PUB I IC PROCEDURE [p: PROCroURE] BfGIN Keyboard.IdleProc ~ pEND; ResetIl1l8Proc: PUB I IC PROcrDURf = BrGIN Keyboard, IdlePr'oc .. I OOPHOI f[O] [NO; PutBackCIHlr: PROcrOUR[ [sLrearn:SLr'ellmHandle. cllar:LJNSPfCIrIfD] BfGIN newoul: CARDINAl; keysTREAMS.mESA 24-0CT-77 18:30:50 Page 2 WITH s:stream SELECT FROM Keyboard =) BEGIN newout .. s.out; newout .. IF newout = 0 THEN KeyBufChars-l ELSE newout-l; IF newout # s.ln THEN BEGIN s.out .. newout: s.buffer[s.out] .. char; END; END; ENDCASE =) SIGNAL StreamError[stream,StreamType]; RETURN; END; WriteChar: PROCEDURE [stream:StreamHandle, char:UNSPECIFIED] BEGIN SIGNAL StreamError[stream,StreamAccess]; RETURN END; CloseKeyStream: PUBLIC PROCEDURE [stream:StreamHandle] BEGIN WITH s:stream SELECT FROM Keyboard =) Keyboard.ks .. @KS; ENDCASE =) SIGNAL StreamError[stream,StreamType]; RETURN; END; DestroyKey: PROCEDURE [stream:StreamHandle] = BEGIN OPEN SystemDefs; WITH s:stream SELECT FROM Keyboard =) FreeHeapNode[@s] |
Date | User | Rating | Comment |