(* (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands. See the copyright notice in the ACK home directory, in the file "Copyright". *) (* Module: Interface to termcap database From: Unix manual chapter 3 Version: $Header$ *) (* Use this like the C-version. In this Modula-2 version, some of the buffers, that are explicit in the C-version, are hidden. These buffers are initialized by a call to Tgetent. The "ARRAY OF CHAR" parameters must be null-terminated. You can call them with a constant string argument, as these are always null-terminated in our Modula-2 implementation. Unlike the C version, this version takes care of UP, BC, and PC automatically. Only ospeed must still be set by the user. *) DEFINITION MODULE Termcap; TYPE STRCAP; PUTPROC = PROCEDURE(CHAR); VAR ospeed: INTEGER; (* see termcap(3), tty(4) *) PROCEDURE Tgetent(name: ARRAY OF CHAR) : INTEGER; PROCEDURE Tgetnum(id: ARRAY OF CHAR): INTEGER; PROCEDURE Tgetflag(id: ARRAY OF CHAR): BOOLEAN; PROCEDURE Tgoto(cm: STRCAP; col, line: INTEGER): STRCAP; (* Result exists until next call to Tgoto *) PROCEDURE Tgetstr(id: ARRAY OF CHAR): STRCAP; (* Result exists until next call to Tgetent *) PROCEDURE Tputs(cp: STRCAP; affcnt: INTEGER; p: PUTPROC); END Termcap.