NSTTYCImpl.mesa
Copyright (C) 1984, 1986 by Xerox Corporation. All rights reserved.
Last edited by Alfvin on 24-Apr-84 13:18:49
Overview: Implements NSTTY based on TTYExtras
Tim Diebert: December 9, 1986 2:05:34 pm PST
DIRECTORY
NSString USING [Character, String],
NSTTY USING [],
TTY USING [CharStatus, Object],
TTYExtras USING [NSGetChar, NSGetEditedString, NSGetString, NSPutChar, NSPutLine, NSPutString];
NSTTYCImpl: PROGRAM
IMPORTS TTYExtras
EXPORTS NSTTY = BEGIN
Handle: TYPE = REF TTY.Object;
GetChar: PUBLIC SAFE PROCEDURE [h: Handle] RETURNS [c: NSString.Character] = TRUSTED {
RETURN[TTYExtras.NSGetChar[h]]};
GetString: PUBLIC SAFE PROCEDURE [h: Handle, s: NSString.String,
t: SAFE PROCEDURE [c: NSString.Character] RETURNS [status: TTY.CharStatus]] = TRUSTED {
TTYExtras.NSGetString[h, s, t]};
GetEditedString: PUBLIC SAFE PROCEDURE [h: Handle, s: NSString.String,
t: SAFE PROCEDURE [c: NSString.Character] RETURNS [status: TTY.CharStatus]]
RETURNS [c: NSString.Character] = TRUSTED {
RETURN[TTYExtras.NSGetEditedString[h, s, t]]};
PutString: PUBLIC SAFE PROCEDURE [h: Handle, s: NSString.String] = TRUSTED {
TTYExtras.NSPutString[h, s]};
PutLine: PUBLIC SAFE PROCEDURE [h: Handle, s: NSString.String] = TRUSTED {
TTYExtras.NSPutLine[h, s]};
PutChar: PUBLIC SAFE PROCEDURE [h: Handle, c: NSString.Character] = TRUSTED {
TTYExtras.NSPutChar[h, c]};
END.
LOG
24-Apr-84 13:18:58 - Alfvin - Created