-- SpecialTerminal.mesa -- last edited by Levin on October 29, 1982 4:08 pm DIRECTORY Process USING [Ticks], TTY USING [Handle]; SpecialTerminal: DEFINITIONS = BEGIN GetProc: TYPE = PROC RETURNS [CHAR]; PutProc: TYPE = PROC [CHAR]; TurnOn: PROC RETURNS [get: GetProc, put: PutProc]; -- This procedure sets up the "special" virtual terminal (see TerminalMultiplex) and initializes it for teletype-style I/O. The two procedures returned are used for primitive I/O (they are in all ways analagous to TTY.GetChar and TTY.PutChar). TurnOff: PROC; -- This procedure undoes the effect of TurnOn. Once TurnOff is invoked, the procedures returned by TurnOn should no longer be used. SetInputTimeout: PROC [ticks: Process.Ticks]; -- This procedure alters the semantics of the "get" procedure returned by TurnOn. If the "get" procedure waits for the specified interval without receiving input, it will raise InputTimeout. Resuming this signal is equivalent to calling the "get" procedure anew. If the parameter is 0, the get procedure will wait indefinitely (this is the initial state). InputTimeout: SIGNAL; EnableCursorTracking: PROC; DisableCursorTracking: PROC; EnableTypescriptFile: PROC; DisableTypescriptFile: PROC; -- For special purposes only -- TurnOnInternal: PRIVATE PROC [nameStripe: LONG STRING]; TurnOffInternal: PRIVATE PROC; TerminalOn: PRIVATE PROC RETURNS [BOOLEAN]; tty: PRIVATE READONLY TTY.Handle; -- usable only when TerminalOn[]. END.