


The terminal database file, which is similar to the "termcap" file supplied with many UNIX systems, may be edited to add new terminals to the ones it currently supports.
Each line of this file is either blank, a comment (marked by a "#" in column 1) or the definition of a terminal. You can continue a "line" on following lines by ending the line to be continued with a "\" (see below for an example). The "\" character must be the last character on the line.
A terminal definition consists of several fields, each separated by colons. The end of the line marks the end of the definition. The first field is always the name of the terminal. Several names can be placed here, separated by a vertical bar ("|"). The rest of the fields consist of codes that describe various terminal functions. Most of these codes are followed by an equal sign and a coded string that describes how to operate that particular function.
Here is a generic representation of a terminal database file entry, where TNn is a terminal name, tf is a terminal function code, and cs is a coded string to accomplish the function:
TN1|TN2|TN3:\ :tf=cs:tf=cs:tf=cs:\ :tf=cs:tf=cs:
The coded string that describes a function is just a representation of the control-sequence (or sequences) that the terminal uses to activate that function. These strings consist of the literal characters used in the control-sequence. Several special forms are recognized to aid in describing the control-sequence. The following abbreviations are supported:
| \E | an escape character |
| \n | a new line (control-J) |
| \r | a carriage return (control-M) |
| \t | a tab (control-I) |
| \b | a backspace (control-H) |
| \f | a form-feed (control-L) |
| ^X | X is any character, treated as control-X |
| \nnn | three digits treated as an octal value |
| AC | Attributes used by clear screen |
| AT | Special color for IBM 3164 terminal |
| B1-B8 | Background color 1-8 |
| BL | Blink |
| C1-C8 | Foreground color 1-8 |
| DI | De-initialization string |
| DL | Default intensity is low |
| DP | Disable print mode |
| EP | Enable print mode |
| GA | Graphics are attributes |
| GE | Graphic escape |
| GF | Graphics off |
| GM | Graphics map |
| GO | Graphics on |
| GX | Graphics movement glitch |
| HI | High-intensity, normal video |
| LO | Low-intensity, normal video |
| NM | Normal video (only if "sg" set) |
| NS | Screen does not scroll when corner is used |
| OC | One color can be displayed at a time |
| RA | Reverse video, alternate intensity |
| RB | Reverse video, blink |
| RU | Reverse video, underline |
| RV | Reverse video |
| UL | Underline |
| VB | Visible background |
| W3 | Set terminal width to 132 columns |
| W8 | Set terminal width to 80 columns |
| al | Insert (add) line |
| bc | Backspace cursor (defaults to ^H) |
| cd | Clear to end-of-screen |
| ce | Clear to end-of-line |
| cl | Clear screen |
| cm | Cursor positioning |
| co | Number of screen columns (default 80) |
| dl | Delete line |
| do | Down one line (defaults to ^J) |
| is | Initialization string |
| is1 | Additional initialization string |
| is2 | Additional initialization string |
| li | Number of screen lines (default 24) |
| nd | Non-destructive space |
| sg | Standout-mode glitch (uses magic cookies) |
| tc | Continue description with another entry |
| up | Cursor up one line |
| ve | Set cursor to normal |
| vi | Set cursor to invisible |
| vs | Set cursor to bright |
All of the function codes described with lower-case characters are identical to ones found in the UNIX "termcap" file. These sequences can be taken verbatim from "termcap" and included in the ACUCOBOL-GT terminal database file when you are adding a new terminal entry.