|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 2274 (0x8e2) Types: TextFile Names: »screenio.def«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./DVIware/crt-viewers/others/dvitovdu/src/screenio.def« └─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/crt-viewers/others/dvitovdu/src/screenio.def«
DEFINITION MODULE screenio; (* Author: Andrew Trevorrow Implementation: Modula-2 under VAX/UNIX 4.2 BSD Date Started: June, 1986 Description: These terminal i/o routines are highly system-dependent and have been designed for DVItoVDU and its auxiliary modules. Notes: - The implementation block saves the current tty characteristics, then sets the mode to cbreak with no echo. Clients should therefore call RestoreTerminal before terminating. - WriteBuffer or WriteLn must be called to explicitly update the terminal (e.g., just before a read) or to synchronize output with writes from other modules that don't use ScreenIO. *) EXPORT QUALIFIED Read, ReadString, BusyRead, Write, WriteString, WriteInt, WriteCard, WriteLn, WriteBuffer, RestoreTerminal; PROCEDURE Read (VAR ch : CHAR); (* Read one character from terminal keyboard. *) PROCEDURE ReadString (VAR s : ARRAY OF CHAR); (* Read a string of characters from terminal keyboard. DEL can be used to erase the last character entered. The routine is terminated upon carriage return. s is terminated by first NULL (unless full). *) PROCEDURE BusyRead (VAR ch : CHAR) : BOOLEAN; (* Return TRUE if ch is read immediately (with no echo) from input buffer. If nothing in buffer then ch is undefined and we return FALSE. *) PROCEDURE Write (ch: CHAR); (* Write given character to output buffer. *) PROCEDURE WriteString (s: ARRAY OF CHAR); (* Write given string of characters to output buffer. s is terminated by first NULL (unless full). *) PROCEDURE WriteInt (i : INTEGER); (* Write a string of characters representing given integer to output buffer. *) PROCEDURE WriteCard (c : CARDINAL); (* Write a string of characters representing given cardinal to output buffer. *) PROCEDURE WriteLn; (* Write CR LF and then send output buffer to terminal. *) PROCEDURE WriteBuffer; (* Send output buffer to terminal; this is done automatically when it becomes full but an explicit call may be necessary to ensure the terminal screen is up-to-date. *) PROCEDURE RestoreTerminal; (* Restore terminal characteristics to their original settings and send output buffer. Should be called just before any client module terminates. *) END screenio.