GO-V.ORG
As seen in

Terminal capabilities

In computing and telecommunications, the capabilities of a terminal are various terminal features, above and beyond what is available from a pure teletypewriter, that host systems (and the programs that run on them) can make use of. They are (mainly) control codes and escape codes that can be sent to or received from the terminal. The escape codes sent to the terminal perform various functions that a CRT terminal (and software terminal emulators) is capable of, but that a teletypewriter is not; such as moving the terminal's cursor to positions on the screen, clearing and scrolling all or parts of the screen, turning on and off attached printer devices, programming programmable function... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

In computing and telecommunications, the capabilities of a terminal are various terminal features, above and beyond what is available from a pure teletypewriter, that host systems (and the programs that run on them) can make use of. They are (mainly) control codes and escape codes that can be sent to or received from the terminal. The escape codes sent to the terminal perform various functions that a CRT terminal (and software terminal emulators) is capable of, but that a teletypewriter is not; such as moving the terminal's cursor to positions on the screen, clearing and scrolling all or parts of the screen, turning on and off attached printer devices, programming programmable function keys, changing display colours and attributes (such as reverse video), and setting display title strings. The escape codes received from the terminal signify things such as function key, arrow key, and other special key (home key, end key, help key, PgUp key, PgDn key, insert key, delete key, and so forth) keystrokes. Unlike the termcap database, the terminfo database is compiled, a machine-readable database that is constructed from a human-readable source file format by a utility program, . They can be decompiled from machine-readable form back to human-readable form by another utility program, . The command to output the human-readable form of the "vt100" terminal definition, for example, is: infocmp vt100 The use of a machine-readable format was to avoid the unnecessary overhead, in applications programs using systems such as the termcap library, of repeatedly parsing the database content to read the fields of a record. The use of multiple files was to avoid the similar overhead of parsing the database content to find the database record for the target terminal type. The terminal type name index is, effectively, the Unix/POSIX filesystem's ordinary directory structure. Originally, Unix had severe performance problems with large directories containing many files, and thus terminfo uses a two-level structure, dividing up the directory entries by first letter into a series of subdirectories. More recent filesystem formats used on Unix systems don't suffer as much from such problems (because their on-disc directory structures are no longer simple arrays of entries, but are organized into trees or hash tables) and so the necessity for this design element, that still exists in modern terminfo implementations, has since disappeared. On Unix systems, the command is used to look up a specific capability in the system's database, and output it to the command's standard output (which is, presumably, the terminal by which the function denoted by the capability is to be performed). One of the simplest operations is clearing the screen. The name of the database field that stores the output sequence for this is , so the command arguments to the program to clear the screen are tput clear Another operation is initializing or resetting the terminal to a known default state (of character attributes, fonts, colours, and so forth). The commands for this are: tput init and tput reset Normally the command uses the terminal type specified by the TERM environment variable, one of the controlling environment variables of the POSIX terminal interface. This can be overridden, however, to force to look up a different terminal type in the database, with a command-line option to the command. So, for example, to issue the reset sequence appropriate for the type of terminal named "vt100" in the database (usually a DEC VT100 terminal), irrespective of terminal type specified in environment variables, the command is: tput -T vt100 reset

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Terminal capabilities". 1790691271. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1377478550

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·