termu command

The termu BASIC program automatically updates the term width and depth. This is done by reading the values from the Unix stty command. termu is the default value for the sigwinch signal of the trap command.

Syntax

termu tw,td,ls,ld,fd,bs,pw,pd,tt {(options)}
termu tt {(options)}

Parameter(s)

tw Terminal width or the number of print positions per line on the terminal. It must be between 10 and 140. Although most terminals are capable of printing 80 characters per line, the typical setting is 79 to avoid problems with carriage return/line feeds when displaying at the 80th position.
td Terminal depth, in lines.
ls Line skip is the number of blank lines at the bottom of the screen. The value in td is added to the value in ls and must equal the actual number of lines on the terminal.
ld Linefeed delays is the number of null characters to output after each line feed. This is typically set to 0.
fd Form feed delays is the number of null characters to output after a top-of-form is executed. The fd parameter also determines when to eject a page (or clear the screen) between output pages. These settings are valid:
0 Suppresses page ejects between output pages on both the terminal and the printer. If set to 0, pads with an LF.
1 Suppresses page ejects on the terminal only. If set to 1, pads with a CRLF.
2 (Normal mode) Any value of two or more clears the screen (or ejects a page on the printer), and sends the corresponding number of nulls.
bs BACKSPACE key value is the decimal value of the ASCII character to echo to the terminal when the BACKSPACE key is pressed. This is typically set to 8 or 21.
pw Current printer width or the number of print positions per line on printer output.
pd Printer depth or the number of lines per page on printer output.
tt Terminal type code designates the terminal driver to use and is vital to set prior to invoking any process, which attempts to perform any kind of cursor control, such as the Update processor, FlashBASIC, or PROC.
options c Recompiles the terminal definition from the source.
h Sets high-intensity.
k Sets the input/output terminal translation table. The name of table is defined in the fourth value of the attribute 1 of the devices item. The name of the translation table is the item-ID of an item in the keyboards file.
r Redisplays resulting term parameters after changing.

Any parameter can be left intact by entering a null (two consecutive commas). The only exception to this rule is the tt (terminal type) parameter, which defines the terminal name. The system recognizes terminal names, so the name may be entered first or last.

The terminal type parameter can be specified without any other arguments, or in any position of the argument list, since it is the only nonnumeric argument.

The terminal driver definitions are located in the dm,devices, file. To obtain a listing of the available types, type:

sort only dm,devices,

Terminal types in D3 use descriptive names, rather than just a single alphabetical character.

Note: To flash compile the term command, the C-compiler is required.

Example(s)

The example below illustrates using termu to read and apply the term width and depth from the Unix stty command.

:term 80,24
terminal name: vt100
product name: VT100
terminal width: 80   printer width: 80
         depth: 24           depth: 59
lineskip:    0
lf delay:    1
ff delay:    1
back space:  8
:stty -a
speed 9600 baud; 25 rows; 119 columns;
eucw 1:1:0:0, scrw 1:1:0:0:
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^@
eol2 = ^@; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; reprint = ^R
discard = ^O; werase = ^W; lnext = ^V
-parenb -parodd cs8 -cstopb -hupcl cread clocal -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
-ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -flusho -pending iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
:termu
:term
terminal name: vt100
product name: VT100
terminal width: 119    printer width: 80
         depth: 25             depth: 59
lineskip:    0
lf delay:    1
ff delay:    1
back space:  8