2.5 Termparm

Termparm returns terminal characteristics. It returns a pointer to a structure that contains various terminal values from the terminal definition. The characteristics defined here are available in a structure defined in the include file <cbase\escape.h>. A pointer to this structure is returned by the termparm function. The structure contains the number of lines and columns on the terminal screen and other useful bits of information about the terminal.

Included in this structure is the fill character for WHITE (entry) fields and for underline (other) fields. For terminals that have both reverse video and underline display attributes, these two fill characters should be blanks. For terminals that do not have display attributes, the fill characters will be two distinct characters that will demarcate data fields. The characters should normally be the underline character ( _ ) for WHITE fields and the dot character ( . ) for UNDERLINE fields.

As an example, the VT52 terminal does not have any display attributes, so that the escape sequences for WHITE, BLACK, UNDERLINE, and BLINK are undefined. The fill characters are defined as the underline character for WHITE entry fields and as a period for UNDERLINE fields. To draw a field on a terminal without display attributes, form writes on the screen the appropriate number of fill characters to represent the field. As each field is entered, the field fill characters are replaced by what is typed. In this way, it is possible to use programs such as form on terminals that do not have reverse video and underlining display enhancements.