home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 1
/
FFMCD01.bin
/
useful
/
info
/
termcap.info-2
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1993-09-26
|
44KB
|
707 lines
This is Info file /home/gd/gnu/termcap/termcap.info, produced by
Makeinfo-1.52 from the input file /home/gd/gnu/termcap/termcap.texi.
This file documents the termcap library of the GNU system.
Copyright (C) 1988 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
File: termcap.info, Node: Naming, Next: Inheriting, Prev: Capability Format, Up: Data Base
Terminal Type Name Conventions
==============================
There are conventions for choosing names of terminal types. For one
thing, all letters should be in lower case. The terminal type for a
terminal in its most usual or most fundamental mode of operation should
not have a hyphen in it.
If the same terminal has other modes of operation which require
different terminal descriptions, these variant descriptions are given
names made by adding suffixes with hyphens. Such alternate descriptions
are used for two reasons:
* When the terminal has a switch that changes its behavior. Since
the computer cannot tell how the switch is set, the user must tell
the computer by choosing the appropriate terminal type name.
For example, the VT-100 has a setup flag that controls whether the
cursor wraps at the right margin. If this flag is set to "wrap",
you must use the terminal type `vt100-am'. Otherwise you must use
`vt100-nam'. Plain `vt100' is defined as a synonym for either
`vt100-am' or `vt100-nam' depending on the preferences of the
local site.
The standard suffix `-am' stands for "automatic margins".
* To give the user a choice in how to use the terminal. This is done
when the terminal has a switch that the computer normally controls.
For example, the Ann Arbor Ambassador can be configured with many
screen sizes ranging from 20 to 60 lines. Fewer lines make bigger
characters but more lines let you see more of what you are editing.
As a result, users have different preferences. Therefore, termcap
provides terminal types for many screen sizes. If you choose type
`aaa-30', the terminal will be configured to use 30 lines; if you
choose `aaa-48', 48 lines will be used, and so on.
Here is a list of standard suffixes and their conventional meanings:
Short for "wide". This is a mode that gives the terminal more
columns than usual. This is normally a user option.
`-am'
"Automatic margins". This is an alternate description for use when
the terminal's margin-wrap switch is on; it contains the `am'
flag. The implication is that normally the switch is off and the
usual description for the terminal says that the switch is off.
`-nam'
"No automatic margins". The opposite of `-am', this names an
alternative description which lacks the `am' flag. This implies
that the terminal is normally operated with the margin-wrap switch
turned on, and the normal description of the terminal says so.
`-na'
"No arrows". This terminal description initializes the terminal to
keep its arrow keys in local mode. This is a user option.
`-rv'
"Reverse video". This terminal description causes text output for
normal video to appear as reverse, and text output for reverse
video to come out as normal. Often this description differs from
the usual one by interchanging the two strings which turn reverse
video on and off.
This is a user option; you can choose either the "reverse video"
variant terminal type or the normal terminal type, and termcap will
obey.
"Status". Says to enable use of a status line which ordinary
output does not touch (*note Status Line::.).
Some terminals have a special line that is used only as a status
line. For these terminals, there is no need for an `-s' variant;
the status line commands should be defined by default. On other
terminals, enabling a status line means removing one screen line
from ordinary use and reducing the effective screen height. For
these terminals, the user can choose the `-s' variant type to
request use of a status line.
`-NLINES'
Says to operate with NLINES lines on the screen, for terminals
such as the Ambassador which provide this as an option. Normally
this is a user option; by choosing the terminal type, you control
how many lines termcap will use.
`-NPAGESp'
Says that the terminal has NPAGES pages worth of screen memory,
for terminals where this is a hardware option.
`-unk'
Says that description is not for direct use, but only for
reference in `tc' capabilities. Such a description is a kind of
subroutine, because it describes the common characteristics of
several variant descriptions that would use other suffixes in
place of `-unk'.
File: termcap.info, Node: Inheriting, Next: Changing, Prev: Naming, Up: Data Base
Inheriting from Related Descriptions
====================================
When two terminal descriptions are similar, their identical parts do
not need to be given twice. Instead, one of the two can be defined in
terms of the other, using the `tc' capability. We say that one
description "refers to" the other, or "inherits from" the other.
The `tc' capability must be the last one in the terminal description,
and its value is a string which is the name of another terminal type
which is referred to. For example,
N9|aaa|ambassador|aaa-30|ann arbor ambassador/30 lines:\
:ti=\E[2J\E[30;0;0;30p:\
:te=\E[60;0;0;30p\E[30;1H\E[J:\
:li#30:tc=aaa-unk:
defines the terminal type `aaa-30' (also known as plain `aaa') in terms
of `aaa-unk', which defines everything about the Ambassador that is
independent of screen height. The types `aaa-36', `aaa-48' and so on
for other screen heights are likewise defined to inherit from `aaa-unk'.
The capabilities overridden by `aaa-30' include `li', which says how
many lines there are, and `ti' and `te', which configure the terminal
to use that many lines.
The effective terminal description for type `aaa' consists of the
text shown above followed by the text of the description of `aaa-unk'.
The `tc' capability is handled automatically by `tgetent', which finds
the description thus referenced and combines the two descriptions
(*note Find::.). Therefore, only the implementor of the terminal
descriptions needs to think about using `tc'. Users and application
programmers do not need to be concerned with it.
Since the reference terminal description is used last, capabilities
specified in the referring description override any specifications of
the same capabilities in the reference description.
The referring description can cancel out a capability without
specifying any new value for it by means of a special trick. Write the
capability in the referring description, with the character `@' after
the capability name, as follows:
NZ|aaa-30-nam|ann arbor ambassador/30 lines/no automatic-margins:\
:am@:tc=aaa-30:
File: termcap.info, Node: Changing, Prev: Inheriting, Up: Data Base
When Changes in the Data Base Take Effect
=========================================
Each application program must read the terminal description from the
data base, so a change in the data base is effective for all jobs
started after the change is made.
The change will usually have no effect on a job that have been in
existence since before the change. The program probably read the
terminal description once, when it was started, and is con