Modula-2 || Compiler & Tools || Library || Search Engine
TYPE Attribute = (standout, underline, reverse, blink, dim, bold, blank, protect, alternate); TYPE AttributeSet = SET OF Attribute; TYPE AttrInfo;
VAR Done: BOOLEAN;
PROCEDURE OpenAttrInfo(VAR atinfo: AttrInfo; VAR tinfo: Term; baudrate: CARDINAL; out: FILE); PROCEDURE CloseAttrInfo(VAR atinfo: AttrInfo); PROCEDURE AvailableAttributes(atinfo: AttrInfo; VAR atset: AttributeSet); PROCEDURE SetAttribute(atinfo: AttrInfo; at: Attribute); PROCEDURE SetAttributes(atinfo: AttrInfo; atset: AttributeSet); PROCEDURE ResetAttribute(atinfo: AttrInfo; at: Attribute); PROCEDURE ResetAttributes(atinfo: AttrInfo);
SetAttribute enters the given display mode. Characters written in the following are printed in this mode. This mode is potentially left in case of cursor movements or even on going to the next line. Multiple calls of SetAttribute can affect modes set earlier. SetAttributes should be used instead. ResetAttribute exits the display mode previously entered by SetAttribute. SetAttributes allows to set several modes simultaneously. But this does not work well on every terminal. ResetAttributes restores the terminal to a normal state without any display attributes set.
TermInfo | interface to the terminfo(4) database |
terminfo(4) | terminfo database |
Windows | high-level interface to attributes |
Modula-2 || Compiler & Tools || Library || Search Engine