Character Attributes

Character attributes affect the different ways a single character may appear on the display. Common character attributes include blinking, underlined, reverse video (black on white), high intensity, low intensity, and color selection.

Generally, character attributes are turned on or off and not sent for each character possessing the attribute. For example, to display several underlined characters, a sequence may be sent to turn on underline mode, followed by the characters to be underlined, followed by a sequence to turn off underline mode. However, differences in terminals affect how a character is displayed. For example, on some terminals, the attribute affects only the characters sent to the display until the "end underline" sequence is sent. It is possible for the cursor to be moved around, allowing underlined characters to be placed at any location on the screen before turning off underline mode. This is known as an attribute that "rides with the cursor."

Other terminals underline any text on the screen between the "begin underline" position and the "end underline" position. The "begin underline" and "end underline" codes can also occupy a character position on the display, usually appearing as a space. This is known as the "magic cookie" problem. On these terminals, it would be impossible to display a normal character immediately followed by an underlined character

Standard termcap defines few character attributes. Furthermore, these attributes are loosely defined so that the application can make only minimum assumptions about how these attributes may be used. PRO/5 uses some standard and non-standard enhancements to termcap to provide more precise control over character attributes.

Field

Description

so=

Turns on the "standout" attribute. This is a generic term whose meaning depends on the terminal. It is used by applications that wish to emphasize some text on the display. Usually, the :so=: field is defined to turn on reverse video or high intensity.

se=

Resets standout mode.

sg#

"Standout glitch." It should be set to the number of spaces left on the screen when :so=: or :se=: are used. This is described above as the "magic cookie" problem. If there is no magic cookie problem, leave this field out.

us=

Turns underline mode on.

ue=

Turns underline mode off.

ug#

Same as the sg# field and indicates problems when using :us=: and :ue=:.