Blame termcap.info-2

Packit c58733
This is Info file ./termcap.info, produced by Makeinfo-1.55 from the
Packit c58733
input file ./termcap.texi.
Packit c58733
Packit c58733
   This file documents the termcap library of the GNU system.
Packit c58733
Packit c58733
   Copyright (C) 1988 Free Software Foundation, Inc.
Packit c58733
Packit c58733
   Permission is granted to make and distribute verbatim copies of this
Packit c58733
manual provided the copyright notice and this permission notice are
Packit c58733
preserved on all copies.
Packit c58733
Packit c58733
   Permission is granted to copy and distribute modified versions of
Packit c58733
this manual under the conditions for verbatim copying, provided that
Packit c58733
the entire resulting derived work is distributed under the terms of a
Packit c58733
permission notice identical to this one.
Packit c58733
Packit c58733
   Permission is granted to copy and distribute translations of this
Packit c58733
manual into another language, under the above conditions for modified
Packit c58733
versions, except that this permission notice may be stated in a
Packit c58733
translation approved by the Foundation.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Naming,  Next: Inheriting,  Prev: Capability Format,  Up: Data Base
Packit c58733
Packit c58733
Terminal Type Name Conventions
Packit c58733
==============================
Packit c58733
Packit c58733
   There are conventions for choosing names of terminal types.  For one
Packit c58733
thing, all letters should be in lower case.  The terminal type for a
Packit c58733
terminal in its most usual or most fundamental mode of operation should
Packit c58733
not have a hyphen in it.
Packit c58733
Packit c58733
   If the same terminal has other modes of operation which require
Packit c58733
different terminal descriptions, these variant descriptions are given
Packit c58733
names made by adding suffixes with hyphens.  Such alternate descriptions
Packit c58733
are used for two reasons:
Packit c58733
Packit c58733
   * When the terminal has a switch that changes its behavior.  Since
Packit c58733
     the computer cannot tell how the switch is set, the user must tell
Packit c58733
     the computer by choosing the appropriate terminal type name.
Packit c58733
Packit c58733
     For example, the VT-100 has a setup flag that controls whether the
Packit c58733
     cursor wraps at the right margin.  If this flag is set to "wrap",
Packit c58733
     you must use the terminal type `vt100-am'.  Otherwise you must use
Packit c58733
     `vt100-nam'.  Plain `vt100' is defined as a synonym for either
Packit c58733
     `vt100-am' or `vt100-nam' depending on the preferences of the
Packit c58733
     local site.
Packit c58733
Packit c58733
     The standard suffix `-am' stands for "automatic margins".
Packit c58733
Packit c58733
   * To give the user a choice in how to use the terminal.  This is done
Packit c58733
     when the terminal has a switch that the computer normally controls.
Packit c58733
Packit c58733
     For example, the Ann Arbor Ambassador can be configured with many
Packit c58733
     screen sizes ranging from 20 to 60 lines.  Fewer lines make bigger
Packit c58733
     characters but more lines let you see more of what you are editing.
Packit c58733
     As a result, users have different preferences.  Therefore, termcap
Packit c58733
     provides terminal types for many screen sizes.  If you choose type
Packit c58733
     `aaa-30', the terminal will be configured to use 30 lines; if you
Packit c58733
     choose `aaa-48', 48 lines will be used, and so on.
Packit c58733
Packit c58733
   Here is a list of standard suffixes and their conventional meanings:
Packit c58733
Packit c58733
`-w'
Packit c58733
     Short for "wide".  This is a mode that gives the terminal more
Packit c58733
     columns than usual.  This is normally a user option.
Packit c58733
Packit c58733
`-am'
Packit c58733
     "Automatic margins".  This is an alternate description for use when
Packit c58733
     the terminal's margin-wrap switch is on; it contains the `am'
Packit c58733
     flag.  The implication is that normally the switch is off and the
Packit c58733
     usual description for the terminal says that the switch is off.
Packit c58733
Packit c58733
`-nam'
Packit c58733
     "No automatic margins".  The opposite of `-am', this names an
Packit c58733
     alternative description which lacks the `am' flag.  This implies
Packit c58733
     that the terminal is normally operated with the margin-wrap switch
Packit c58733
     turned on, and the normal description of the terminal says so.
Packit c58733
Packit c58733
`-na'
Packit c58733
     "No arrows".  This terminal description initializes the terminal to
Packit c58733
     keep its arrow keys in local mode.  This is a user option.
Packit c58733
Packit c58733
`-rv'
Packit c58733
     "Reverse video".  This terminal description causes text output for
Packit c58733
     normal video to appear as reverse, and text output for reverse
Packit c58733
     video to come out as normal.  Often this description differs from
Packit c58733
     the usual one by interchanging the two strings which turn reverse
Packit c58733
     video on and off.
Packit c58733
Packit c58733
     This is a user option; you can choose either the "reverse video"
Packit c58733
     variant terminal type or the normal terminal type, and termcap will
Packit c58733
     obey.
Packit c58733
Packit c58733
`-s'
Packit c58733
     "Status".  Says to enable use of a status line which ordinary
Packit c58733
     output does not touch (*note Status Line::.).
Packit c58733
Packit c58733
     Some terminals have a special line that is used only as a status
Packit c58733
     line.  For these terminals, there is no need for an `-s' variant;
Packit c58733
     the status line commands should be defined by default.  On other
Packit c58733
     terminals, enabling a status line means removing one screen line
Packit c58733
     from ordinary use and reducing the effective screen height.  For
Packit c58733
     these terminals, the user can choose the `-s' variant type to
Packit c58733
     request use of a status line.
Packit c58733
Packit c58733
`-NLINES'
Packit c58733
     Says to operate with NLINES lines on the screen, for terminals
Packit c58733
     such as the Ambassador which provide this as an option.  Normally
Packit c58733
     this is a user option; by choosing the terminal type, you control
Packit c58733
     how many lines termcap will use.
Packit c58733
Packit c58733
`-NPAGESp'
Packit c58733
     Says that the terminal has NPAGES pages worth of screen memory,
Packit c58733
     for terminals where this is a hardware option.
Packit c58733
Packit c58733
`-unk'
Packit c58733
     Says that description is not for direct use, but only for
Packit c58733
     reference in `tc' capabilities.  Such a description is a kind of
Packit c58733
     subroutine, because it describes the common characteristics of
Packit c58733
     several variant descriptions that would use other suffixes in
Packit c58733
     place of `-unk'.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Inheriting,  Next: Changing,  Prev: Naming,  Up: Data Base
Packit c58733
Packit c58733
Inheriting from Related Descriptions
Packit c58733
====================================
Packit c58733
Packit c58733
   When two terminal descriptions are similar, their identical parts do
Packit c58733
not need to be given twice.  Instead, one of the two can be defined in
Packit c58733
terms of the other, using the `tc' capability.  We say that one
Packit c58733
description "refers to" the other, or "inherits from" the other.
Packit c58733
Packit c58733
   The `tc' capability must be the last one in the terminal description,
Packit c58733
and its value is a string which is the name of another terminal type
Packit c58733
which is referred to.  For example,
Packit c58733
Packit c58733
     N9|aaa|ambassador|aaa-30|ann arbor ambassador/30 lines:\
Packit c58733
             :ti=\E[2J\E[30;0;0;30p:\
Packit c58733
             :te=\E[60;0;0;30p\E[30;1H\E[J:\
Packit c58733
             :li#30:tc=aaa-unk:
Packit c58733
Packit c58733
defines the terminal type `aaa-30' (also known as plain `aaa') in terms
Packit c58733
of `aaa-unk', which defines everything about the Ambassador that is
Packit c58733
independent of screen height.  The types `aaa-36', `aaa-48' and so on
Packit c58733
for other screen heights are likewise defined to inherit from `aaa-unk'.
Packit c58733
Packit c58733
   The capabilities overridden by `aaa-30' include `li', which says how
Packit c58733
many lines there are, and `ti' and `te', which configure the terminal
Packit c58733
to use that many lines.
Packit c58733
Packit c58733
   The effective terminal description for type `aaa' consists of the
Packit c58733
text shown above followed by the text of the description of `aaa-unk'.
Packit c58733
The `tc' capability is handled automatically by `tgetent', which finds
Packit c58733
the description thus referenced and combines the two descriptions
Packit c58733
(*note Find::.).  Therefore, only the implementor of the terminal
Packit c58733
descriptions needs to think about using `tc'.  Users and application
Packit c58733
programmers do not need to be concerned with it.
Packit c58733
Packit c58733
   Since the reference terminal description is used last, capabilities
Packit c58733
specified in the referring description override any specifications of
Packit c58733
the same capabilities in the reference description.
Packit c58733
Packit c58733
   The referring description can cancel out a capability without
Packit c58733
specifying any new value for it by means of a special trick.  Write the
Packit c58733
capability in the referring description, with the character `@' after
Packit c58733
the capability name, as follows:
Packit c58733
Packit c58733
     NZ|aaa-30-nam|ann arbor ambassador/30 lines/no automatic-margins:\
Packit c58733
             :am@:tc=aaa-30:
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Changing,  Prev: Inheriting,  Up: Data Base
Packit c58733
Packit c58733
When Changes in the Data Base Take Effect
Packit c58733
=========================================
Packit c58733
Packit c58733
   Each application program must read the terminal description from the
Packit c58733
data base, so a change in the data base is effective for all jobs
Packit c58733
started after the change is made.
Packit c58733
Packit c58733
   The change will usually have no effect on a job that have been in
Packit c58733
existence since before the change. The program probably read the
Packit c58733
terminal description once, when it was started, and is continuing to
Packit c58733
use what it read then.  If the program does not have a feature for
Packit c58733
reexamining the data base, then you will need to run it again (probably
Packit c58733
killing the old job).
Packit c58733
Packit c58733
   If the description in use is coming from the `TERMCAP' environment
Packit c58733
variable, then the data base file is effectively overridden, and
Packit c58733
changes in it will have no effect until you change the `TERMCAP'
Packit c58733
variable as well.  For example, some users' `.login' files
Packit c58733
automatically copy the terminal description into `TERMCAP' to speed
Packit c58733
startup of applications.  If you have done this, you will need to
Packit c58733
change the `TERMCAP' variable to make the changed data base take effect.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Capabilities,  Next: Summary,  Prev: Data Base,  Up: Top
Packit c58733
Packit c58733
Definitions of the Terminal Capabilities
Packit c58733
****************************************
Packit c58733
Packit c58733
   This section is divided into many subsections, each for one aspect of
Packit c58733
use of display terminals.  For writing a display program, you usually
Packit c58733
need only check the subsections for the operations you want to use.
Packit c58733
For writing a terminal description, you must read each subsection and
Packit c58733
fill in the capabilities described there.
Packit c58733
Packit c58733
   String capabilities that are display commands may require numeric
Packit c58733
parameters (*note Parameters::.).  Most such capabilities do not use
Packit c58733
parameters.  When a capability requires parameters, this is explicitly
Packit c58733
stated at the beginning of its definition.  In simple cases, the first
Packit c58733
or second sentence of the definition mentions all the parameters, in
Packit c58733
the order they should be given, using a name in upper case for each
Packit c58733
one.  For example, the `rp' capability is a command that requires two
Packit c58733
parameters; its definition begins as follows:
Packit c58733
Packit c58733
     String of commands to output a graphic character C, repeated N
Packit c58733
     times.
Packit c58733
Packit c58733
   In complex cases or when there are many parameters, they are
Packit c58733
described explicitly.
Packit c58733
Packit c58733
   When a capability is described as obsolete, this means that programs
Packit c58733
should not be written to look for it, but terminal descriptions should
Packit c58733
still be written to provide it.
Packit c58733
Packit c58733
   When a capability is described as very obsolete, this means that it
Packit c58733
should be omitted from terminal descriptions as well.
Packit c58733
Packit c58733
* Menu:
Packit c58733
Packit c58733
* Basic::       Basic characteristics.
Packit c58733
* Screen Size::  Screen size, and what happens when it changes.
Packit c58733
* Cursor Motion::  Various ways to move the cursor.
Packit c58733
* Wrapping::    What happens if you write a character in the last column.
Packit c58733
* Scrolling::   Pushing text up and down on the screen.
Packit c58733
* Windows::     Limiting the part of the window that output affects.
Packit c58733
* Clearing::    Erasing one or many lines.
Packit c58733
* Insdel Line::  Making new blank lines in mid-screen; deleting lines.
Packit c58733
* Insdel Char::  Inserting and deleting characters within a line.
Packit c58733
* Standout::    Highlighting some of the text.
Packit c58733
* Underlining::  Underlining some of the text.
Packit c58733
* Cursor Visibility::  Making the cursor more or less easy to spot.
Packit c58733
* Bell::        Attracts user's attention; not localized on the screen.
Packit c58733
* Keypad::      Recognizing when function keys or arrows are typed.
Packit c58733
* Meta Key::    META acts like an extra shift key.
Packit c58733
* Initialization::  Commands used to initialize or reset the terminal.
Packit c58733
* Pad Specs::   Info for the kernel on how much padding is needed.
Packit c58733
* Status Line::  A status line displays "background" information.
Packit c58733
* Half-Line::   Moving by half-lines, for superscripts and subscripts.
Packit c58733
* Printer::     Controlling auxiliary printers of display terminals.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Basic,  Next: Screen Size,  Up: Capabilities
Packit c58733
Packit c58733
Basic Characteristics
Packit c58733
=====================
Packit c58733
Packit c58733
   This section documents the capabilities that describe the basic and
Packit c58733
nature of the terminal, and also those that are relevant to the output
Packit c58733
of graphic characters.
Packit c58733
Packit c58733
`os'
Packit c58733
     Flag whose presence means that the terminal can overstrike.  This
Packit c58733
     means that outputting a graphic character does not erase whatever
Packit c58733
     was present in the same character position before.  The terminals
Packit c58733
     that can overstrike include printing terminals, storage tubes (all
Packit c58733
     obsolete nowadays), and many bit-map displays.
Packit c58733
Packit c58733
`eo'
Packit c58733
     Flag whose presence means that outputting a space erases a
Packit c58733
     character position even if the terminal supports overstriking.  If
Packit c58733
     this flag is not present and overstriking is supported, output of
Packit c58733
     a space has no effect except to move the cursor.
Packit c58733
Packit c58733
     (On terminals that do not support overstriking, you can always
Packit c58733
     assume that outputting a space at a position erases whatever
Packit c58733
     character was previously displayed there.)
Packit c58733
Packit c58733
`gn'
Packit c58733
     Flag whose presence means that this terminal type is a generic type
Packit c58733
     which does not really describe any particular terminal.  Generic
Packit c58733
     types are intended for use as the default type assigned when the
Packit c58733
     user connects to the system, with the intention that the user
Packit c58733
     should specify what type he really has.  One example of a generic
Packit c58733
     type is the type `network'.
Packit c58733
Packit c58733
     Since the generic type cannot say how to do anything interesting
Packit c58733
     with the terminal, termcap-using programs will always find that the
Packit c58733
     terminal is too weak to be supported if the user has failed to
Packit c58733
     specify a real terminal type in place of the generic one.  The
Packit c58733
     `gn' flag directs these programs to use a different error message:
Packit c58733
     "You have not specified your real terminal type", rather than
Packit c58733
     "Your terminal is not powerful enough to be used".
Packit c58733
Packit c58733
`hc'
Packit c58733
     Flag whose presence means this is a hardcopy terminal.
Packit c58733
Packit c58733
`rp'
Packit c58733
     String of commands to output a graphic character C, repeated N
Packit c58733
     times.  The first parameter value is the ASCII code for the desired
Packit c58733
     character, and the second parameter is the number of times to
Packit c58733
     repeat the character.  Often this command requires padding
Packit c58733
     proportional to the number of times the character is repeated.
Packit c58733
     This effect can be had by using parameter arithmetic with
Packit c58733
     `%'-sequences to compute the amount of padding, then generating
Packit c58733
     the result as a number at the front of the string so that `tputs'
Packit c58733
     will treat it as padding.
Packit c58733
Packit c58733
`hz'
Packit c58733
     Flag whose presence means that the ASCII character `~' cannot be
Packit c58733
     output on this terminal because it is used for display commands.
Packit c58733
Packit c58733
     Programs handle this flag by checking all text to be output and
Packit c58733
     replacing each `~' with some other character(s).  If this is not
Packit c58733
     done, the screen will be thoroughly garbled.
Packit c58733
Packit c58733
     The old Hazeltine terminals that required such treatment are
Packit c58733
     probably very rare today, so you might as well not bother to
Packit c58733
     support this flag.
Packit c58733
Packit c58733
`CC'
Packit c58733
     String whose presence means the terminal has a settable command
Packit c58733
     character.  The value of the string is the default command
Packit c58733
     character (which is usually ESC).
Packit c58733
Packit c58733
     All the strings of commands in the terminal description should be
Packit c58733
     written to use the default command character.  If you are writing
Packit c58733
     an application program that changes the command character, use the
Packit c58733
     `CC' capability to figure out how to translate all the display
Packit c58733
     commands to work with the new command character.
Packit c58733
Packit c58733
     Most programs have no reason to look at the `CC' capability.
Packit c58733
Packit c58733
`xb'
Packit c58733
     Flag whose presence identifies Superbee terminals which are unable
Packit c58733
     to transmit the characters ESC and `Control-C'.  Programs which
Packit c58733
     support this flag are supposed to check the input for the code
Packit c58733
     sequences sent by the F1 and F2 keys, and pretend that ESC or
Packit c58733
     `Control-C' (respectively) had been read.  But this flag is
Packit c58733
     obsolete, and not worth supporting.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Screen Size,  Next: Cursor Motion,  Prev: Basic,  Up: Capabilities
Packit c58733
Packit c58733
Screen Size
Packit c58733
===========
Packit c58733
Packit c58733
   A terminal description has two capabilities, `co' and `li', that
Packit c58733
describe the screen size in columns and lines.  But there is more to
Packit c58733
the question of screen size than this.
Packit c58733
Packit c58733
   On some operating systems the "screen" is really a window and the
Packit c58733
effective width can vary.  On some of these systems, `tgetnum' uses the
Packit c58733
actual width of the window to decide what value to return for the `co'
Packit c58733
capability, overriding what is actually written in the terminal
Packit c58733
description.  On other systems, it is up to the application program to
Packit c58733
check the actual window width using a system call.  For example, on BSD
Packit c58733
4.3 systems, the system call `ioctl' with code `TIOCGWINSZ' will tell
Packit c58733
you the current screen size.
Packit c58733
Packit c58733
   On all window systems, termcap is powerless to advise the application
Packit c58733
program if the user resizes the window.  Application programs must deal
Packit c58733
with this possibility in a system-dependent fashion.  On some systems
Packit c58733
the C shell handles part of the problem by detecting changes in window
Packit c58733
size and setting the `TERMCAP' environment variable appropriately.
Packit c58733
This takes care of application programs that are started subsequently.
Packit c58733
It does not help application programs already running.
Packit c58733
Packit c58733
   On some systems, including BSD 4.3, all programs using a terminal get
Packit c58733
a signal named `SIGWINCH' whenever the screen size changes.  Programs
Packit c58733
that use termcap should handle this signal by using `ioctl TIOCGWINSZ'
Packit c58733
to learn the new screen size.
Packit c58733
Packit c58733
`co'
Packit c58733
     Numeric value, the width of the screen in character positions.
Packit c58733
     Even hardcopy terminals normally have a `co' capability.
Packit c58733
Packit c58733
`li'
Packit c58733
     Numeric value, the height of the screen in lines.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Cursor Motion,  Next: Wrapping,  Prev: Screen Size,  Up: Capabilities
Packit c58733
Packit c58733
Cursor Motion
Packit c58733
=============
Packit c58733
Packit c58733
   Termcap assumes that the terminal has a "cursor", a spot on the
Packit c58733
screen where a visible mark is displayed, and that most display
Packit c58733
commands take effect at the position of the cursor.  It follows that
Packit c58733
moving the cursor to a specified location is very important.
Packit c58733
Packit c58733
   There are many terminal capabilities for different cursor motion
Packit c58733
operations.  A terminal description should define as many as possible,
Packit c58733
but most programs do not need to use most of them.  One capability,
Packit c58733
`cm', moves the cursor to an arbitrary place on the screen; this by
Packit c58733
itself is sufficient for any application as long as there is no need to
Packit c58733
support hardcopy terminals or certain old, weak displays that have only
Packit c58733
relative motion commands.  Use of other cursor motion capabilities is an
Packit c58733
optimization, enabling the program to output fewer characters in some
Packit c58733
common cases.
Packit c58733
Packit c58733
   If you plan to use the relative cursor motion commands in an
Packit c58733
application program, you must know what the starting cursor position
Packit c58733
is.  To do this, you must keep track of the cursor position and update
Packit c58733
the records each time anything is output to the terminal, including
Packit c58733
graphic characters.  In addition, it is necessary to know whether the
Packit c58733
terminal wraps after writing in the rightmost column.  *Note Wrapping::.
Packit c58733
Packit c58733
   One other motion capability needs special mention: `nw' moves the
Packit c58733
cursor to the beginning of the following line, perhaps clearing all the
Packit c58733
starting line after the cursor, or perhaps not clearing at all.  This
Packit c58733
capability is a least common denominator that is probably supported
Packit c58733
even by terminals that cannot do most other things such as `cm' or `do'.
Packit c58733
Even hardcopy terminals can support `nw'.
Packit c58733
Packit c58733
`cm'
Packit c58733
     String of commands to position the cursor at line L, column C.
Packit c58733
     Both parameters are origin-zero, and are defined relative to the
Packit c58733
     screen, not relative to display memory.
Packit c58733
Packit c58733
     All display terminals except a few very obsolete ones support `cm',
Packit c58733
     so it is acceptable for an application program to refuse to
Packit c58733
     operate on terminals lacking `cm'.
Packit c58733
Packit c58733
`ho'
Packit c58733
     String of commands to move the cursor to the upper left corner of
Packit c58733
     the screen (this position is called the "home position").  In
Packit c58733
     terminals where the upper left corner of the screen is not the
Packit c58733
     same as the beginning of display memory, this command must go to
Packit c58733
     the upper left corner of the screen, not the beginning of display
Packit c58733
     memory.
Packit c58733
Packit c58733
     Every display terminal supports this capability, and many
Packit c58733
     application programs refuse to operate if the `ho' capability is
Packit c58733
     missing.
Packit c58733
Packit c58733
`ll'
Packit c58733
     String of commands to move the cursor to the lower left corner of
Packit c58733
     the screen.  On some terminals, moving up from home position does
Packit c58733
     this, but programs should never assume that will work.  Just
Packit c58733
     output the `ll' string (if it is provided); if moving to home
Packit c58733
     position and then moving up is the best way to get there, the `ll'
Packit c58733
     command will do that.
Packit c58733
Packit c58733
`cr'
Packit c58733
     String of commands to move the cursor to the beginning of the line
Packit c58733
     it is on.  If this capability is not specified, many programs
Packit c58733
     assume they can use the ASCII carriage return character for this.
Packit c58733
Packit c58733
`le'
Packit c58733
     String of commands to move the cursor left one column.  Unless the
Packit c58733
     `bw' flag capability is specified, the effect is undefined if the
Packit c58733
     cursor is at the left margin; do not use this command there.  If
Packit c58733
     `bw' is present, this command may be used at the left margin, and
Packit c58733
     it wraps the cursor to the last column of the preceding line.
Packit c58733
Packit c58733
`nd'
Packit c58733
     String of commands to move the cursor right one column.  The
Packit c58733
     effect is undefined if the cursor is at the right margin; do not
Packit c58733
     use this command there, not even if `am' is present.
Packit c58733
Packit c58733
`up'
Packit c58733
     String of commands to move the cursor vertically up one line.  The
Packit c58733
     effect of sending this string when on the top line is undefined;
Packit c58733
     programs should never use it that way.
Packit c58733
Packit c58733
`do'
Packit c58733
     String of commands to move the cursor vertically down one line.
Packit c58733
     The effect of sending this string when on the bottom line is
Packit c58733
     undefined; programs should never use it that way.
Packit c58733
Packit c58733
     Some programs do use `do' to scroll up one line if used at the
Packit c58733
     bottom line, if `sf' is not defined but `sr' is.  This is only to
Packit c58733
     compensate for certain old, incorrect terminal descriptions.  (In
Packit c58733
     principle this might actually lead to incorrect behavior on other
Packit c58733
     terminals, but that seems to happen rarely if ever.)  But the
Packit c58733
     proper solution is that the terminal description should define
Packit c58733
     `sf' as well as `do' if the command is suitable for scrolling.
Packit c58733
Packit c58733
     The original idea was that this string would not contain a newline
Packit c58733
     character and therefore could be used without disabling the
Packit c58733
     kernel's usual habit of converting of newline into a
Packit c58733
     carriage-return newline sequence.  But many terminal descriptions
Packit c58733
     do use newline in the `do' string, so this is not possible; a
Packit c58733
     program which sends the `do' string must disable output conversion
Packit c58733
     in the kernel (*note Initialize::.).
Packit c58733
Packit c58733
`bw'
Packit c58733
     Flag whose presence says that `le' may be used in column zero to
Packit c58733
     move to the last column of the preceding line.  If this flag is
Packit c58733
     not present, `le' should not be used in column zero.
Packit c58733
Packit c58733
`nw'
Packit c58733
     String of commands to move the cursor to start of next line,
Packit c58733
     possibly clearing rest of line (following the cursor) before
Packit c58733
     moving.
Packit c58733
Packit c58733
`DO', `UP', `LE', `RI'
Packit c58733
     Strings of commands to move the cursor N lines down vertically, up
Packit c58733
     vertically, or N columns left or right.  Do not attempt to move
Packit c58733
     past any edge of the screen with these commands; the effect of
Packit c58733
     trying that is undefined.  Only a few terminal descriptions provide
Packit c58733
     these commands, and most programs do not use them.
Packit c58733
Packit c58733
`CM'
Packit c58733
     String of commands to position the cursor at line L, column C,
Packit c58733
     relative to display memory.  Both parameters are origin-zero.
Packit c58733
     This capability is present only in terminals where there is a
Packit c58733
     difference between screen-relative and memory-relative addressing,
Packit c58733
     and not even in all such terminals.
Packit c58733
Packit c58733
`ch'
Packit c58733
     String of commands to position the cursor at column C in the same
Packit c58733
     line it is on.  This is a special case of `cm' in which the
Packit c58733
     vertical position is not changed.  The `ch' capability is provided
Packit c58733
     only when it is faster to output than `cm' would be in this
Packit c58733
     special case.  Programs should not assume most display terminals
Packit c58733
     have `ch'.
Packit c58733
Packit c58733
`cv'
Packit c58733
     String of commands to position the cursor at line L in the same
Packit c58733
     column.  This is a special case of `cm' in which the horizontal
Packit c58733
     position is not changed.  The `cv' capability is provided only
Packit c58733
     when it is faster to output than `cm' would be in this special
Packit c58733
     case.  Programs should not assume most display terminals have `cv'.
Packit c58733
Packit c58733
`sc'
Packit c58733
     String of commands to make the terminal save the current cursor
Packit c58733
     position.  Only the last saved position can be used.  If this
Packit c58733
     capability is present, `rc' should be provided also.  Most
Packit c58733
     terminals have neither.
Packit c58733
Packit c58733
`rc'
Packit c58733
     String of commands to make the terminal restore the last saved
Packit c58733
     cursor position.  If this capability is present, `sc' should be
Packit c58733
     provided also.  Most terminals have neither.
Packit c58733
Packit c58733
`ff'
Packit c58733
     String of commands to advance to the next page, for a hardcopy
Packit c58733
     terminal.
Packit c58733
Packit c58733
`ta'
Packit c58733
     String of commands to move the cursor right to the next hardware
Packit c58733
     tab stop column.  Missing if the terminal does not have any kind of
Packit c58733
     hardware tabs.  Do not send this command if the kernel's terminal
Packit c58733
     modes say that the kernel is expanding tabs into spaces.
Packit c58733
Packit c58733
`bt'
Packit c58733
     String of commands to move the cursor left to the previous hardware
Packit c58733
     tab stop column.  Missing if the terminal has no such ability; many
Packit c58733
     terminals do not.  Do not send this command if the kernel's
Packit c58733
     terminal modes say that the kernel is expanding tabs into spaces.
Packit c58733
Packit c58733
   The following obsolete capabilities should be included in terminal
Packit c58733
descriptions when appropriate, but should not be looked at by new
Packit c58733
programs.
Packit c58733
Packit c58733
`nc'
Packit c58733
     Flag whose presence means the terminal does not support the ASCII
Packit c58733
     carriage return character as `cr'.  This flag is needed because
Packit c58733
     old programs assume, when the `cr' capability is missing, that
Packit c58733
     ASCII carriage return can be used for the purpose.  We use `nc' to
Packit c58733
     tell the old programs that carriage return may not be used.
Packit c58733
Packit c58733
     New programs should not assume any default for `cr', so they need
Packit c58733
     not look at `nc'.  However, descriptions should contain `nc'
Packit c58733
     whenever they do not contain `cr'.
Packit c58733
Packit c58733
`xt'
Packit c58733
     Flag whose presence means that the ASCII tab character may not be
Packit c58733
     used for cursor motion.  This flag exists because old programs
Packit c58733
     assume, when the `ta' capability is missing, that ASCII tab can be
Packit c58733
     used for the purpose.  We use `xt' to tell the old programs not to
Packit c58733
     use tab.
Packit c58733
Packit c58733
     New programs should not assume any default for `ta', so they need
Packit c58733
     not look at `xt' in connection with cursor motion.  Note that `xt'
Packit c58733
     also has implications for standout mode (*note Standout::.).  It
Packit c58733
     is obsolete in regard to cursor motion but not in regard to
Packit c58733
     standout.
Packit c58733
Packit c58733
     In fact, `xt' means that the terminal is a Teleray 1061.
Packit c58733
Packit c58733
`bc'
Packit c58733
     Very obsolete alternative name for the `le' capability.
Packit c58733
Packit c58733
`bs'
Packit c58733
     Flag whose presence means that the ASCII character backspace may be
Packit c58733
     used to move the cursor left.  Obsolete; look at `le' instead.
Packit c58733
Packit c58733
`nl'
Packit c58733
     Obsolete capability which is a string that can either be used to
Packit c58733
     move the cursor down or to scroll.  The same string must scroll
Packit c58733
     when used on the bottom line and move the cursor when used on any
Packit c58733
     other line.  New programs should use `do' or `sf', and ignore `nl'.
Packit c58733
Packit c58733
     If there is no `nl' capability, some old programs assume they can
Packit c58733
     use the newline character for this purpose.  These programs follow
Packit c58733
     a bad practice, but because they exist, it is still desirable to
Packit c58733
     define the `nl' capability in a terminal description if the best
Packit c58733
     way to move down is *not* a newline.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Wrapping,  Next: Scrolling,  Prev: Cursor Motion,  Up: Capabilities
Packit c58733
Packit c58733
Wrapping
Packit c58733
========
Packit c58733
Packit c58733
   "Wrapping" means moving the cursor from the right margin to the left
Packit c58733
margin of the following line.  Some terminals wrap automatically when a
Packit c58733
graphic character is output in the last column, while others do not.
Packit c58733
Most application programs that use termcap need to know whether the
Packit c58733
terminal wraps.  There are two special flag capabilities to describe
Packit c58733
what the terminal does when a graphic character is output in the last
Packit c58733
column.
Packit c58733
Packit c58733
`am'
Packit c58733
     Flag whose presence means that writing a character in the last
Packit c58733
     column causes the cursor to wrap to the beginning of the next line.
Packit c58733
Packit c58733
     If `am' is not present, writing in the last column leaves the
Packit c58733
     cursor at the place where the character was written.
Packit c58733
Packit c58733
     Writing in the last column of the last line should be avoided on
Packit c58733
     terminals with `am', as it may or may not cause scrolling to occur
Packit c58733
     (*note Scrolling::.).  Scrolling is surely not what you would
Packit c58733
     intend.
Packit c58733
Packit c58733
     If your program needs to check the `am' flag, then it also needs
Packit c58733
     to check the `xn' flag which indicates that wrapping happens in a
Packit c58733
     strange way.  Many common terminals have the `xn' flag.
Packit c58733
Packit c58733
`xn'
Packit c58733
     Flag whose presence means that the cursor wraps in a strange way.
Packit c58733
     At least two distinct kinds of strange behavior are known; the
Packit c58733
     termcap data base does not contain anything to distinguish the two.
Packit c58733
Packit c58733
     On Concept-100 terminals, output in the last column wraps the
Packit c58733
     cursor almost like an ordinary `am' terminal.  But if the next
Packit c58733
     thing output is a newline, it is ignored.
Packit c58733
Packit c58733
     DEC VT-100 terminals (when the wrap switch is on) do a different
Packit c58733
     strange thing: the cursor wraps only if the next thing output is
Packit c58733
     another graphic character.  In fact, the wrap occurs when the
Packit c58733
     following graphic character is received by the terminal, before the
Packit c58733
     character is placed on the screen.
Packit c58733
Packit c58733
     On both of these terminals, after writing in the last column a
Packit c58733
     following graphic character will be displayed in the first column
Packit c58733
     of the following line.  But the effect of relative cursor motion
Packit c58733
     characters such as newline or backspace at such a time depends on
Packit c58733
     the terminal.  The effect of erase or scrolling commands also
Packit c58733
     depends on the terminal.  You can't assume anything about what
Packit c58733
     they will do on a terminal that has `xn'.  So, to be safe, you
Packit c58733
     should never do these things at such a time on such a terminal.
Packit c58733
Packit c58733
     To be sure of reliable results on a terminal which has the `xn'
Packit c58733
     flag, output a `cm' absolute positioning command after writing in
Packit c58733
     the last column.  Another safe thing to do is to output
Packit c58733
     carriage-return newline, which will leave the cursor at the
Packit c58733
     beginning of the following line.
Packit c58733
Packit c58733
`LP'
Packit c58733
     Flag whose presence means that it is safe to write in the last
Packit c58733
     column of the last line without worrying about undesired
Packit c58733
     scrolling.  `LP' indicates the DEC flavor of `xn' strangeness.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Scrolling,  Next: Windows,  Prev: Wrapping,  Up: Capabilities
Packit c58733
Packit c58733
Scrolling
Packit c58733
=========
Packit c58733
Packit c58733
   "Scrolling" means moving the contents of the screen up or down one or
Packit c58733
more lines.  Moving the contents up is "forward scrolling"; moving them
Packit c58733
down is "reverse scrolling".
Packit c58733
Packit c58733
   Scrolling happens after each line of output during ordinary output
Packit c58733
on most display terminals.  But in an application program that uses
Packit c58733
termcap for random-access output, scrolling happens only when
Packit c58733
explicitly requested with the commands in this section.
Packit c58733
Packit c58733
   Some terminals have a "scroll region" feature.  This lets you limit
Packit c58733
the effect of scrolling to a specified range of lines.  Lines outside
Packit c58733
the range are unaffected when scrolling happens.  The scroll region
Packit c58733
feature is available if either `cs' or `cS' is present.
Packit c58733
Packit c58733
`sf'
Packit c58733
     String of commands to scroll the screen one line up, assuming it is
Packit c58733
     output with the cursor at the beginning of the bottom line.
Packit c58733
Packit c58733
`sr'
Packit c58733
     String of commands to scroll the screen one line down, assuming it
Packit c58733
     is output with the cursor at the beginning of the top line.
Packit c58733
Packit c58733
`do'
Packit c58733
     A few programs will try to use `do' to do the work of `sf'.  This
Packit c58733
     is not really correct--it is an attempt to compensate for the
Packit c58733
     absence of a `sf' command in some old terminal descriptions.
Packit c58733
Packit c58733
     Since these terminal descriptions do define `sr', perhaps at one
Packit c58733
     time the definition of `do' was different and it could be used for
Packit c58733
     scrolling as well.  But it isn't desirable to combine these two
Packit c58733
     functions in one capability, since scrolling often requires more
Packit c58733
     padding than simply moving the cursor down.  Defining `sf' and
Packit c58733
     `do' separately allows you to specify the padding properly.  Also,
Packit c58733
     all sources agree that `do' should not be relied on to do
Packit c58733
     scrolling.
Packit c58733
Packit c58733
     So the best approach is to add `sf' capabilities to the
Packit c58733
     descriptions of these terminals, copying the definition of `do' if
Packit c58733
     that does scroll.
Packit c58733
Packit c58733
`SF'
Packit c58733
     String of commands to scroll the screen N lines up, assuming it is
Packit c58733
     output with the cursor at the beginning of the bottom line.
Packit c58733
Packit c58733
`SR'
Packit c58733
     String of commands to scroll the screen N lines down, assuming it
Packit c58733
     is output with the cursor at the beginning of the top line.
Packit c58733
Packit c58733
`cs'
Packit c58733
     String of commands to set the scroll region.  This command takes
Packit c58733
     two parameters, START and END, which are the line numbers
Packit c58733
     (origin-zero) of the first line to include in the scroll region
Packit c58733
     and of the last line to include in it.  When a scroll region is
Packit c58733
     set, scrolling is limited to the specified range of lines; lines
Packit c58733
     outside the range are not affected by scroll commands.
Packit c58733
Packit c58733
     Do not try to move the cursor outside the scroll region.  The
Packit c58733
     region remains set until explicitly removed.  To remove the scroll
Packit c58733
     region, use another `cs' command specifying the full height of the
Packit c58733
     screen.
Packit c58733
Packit c58733
     The cursor position is undefined after the `cs' command is set, so
Packit c58733
     position the cursor with `cm' immediately afterward.
Packit c58733
Packit c58733
`cS'
Packit c58733
     String of commands to set the scroll region using parameters in
Packit c58733
     different form.  The effect is the same as if `cs' were used.
Packit c58733
     Four parameters are required:
Packit c58733
Packit c58733
       1. Total number of lines on the screen.
Packit c58733
Packit c58733
       2. Number of lines above desired scroll region.
Packit c58733
Packit c58733
       3. Number of lines below (outside of) desired scroll region.
Packit c58733
Packit c58733
       4. Total number of lines on the screen, the same as the first
Packit c58733
          parameter.
Packit c58733
Packit c58733
     This capability is a GNU extension that was invented to allow the
Packit c58733
     Ann Arbor Ambassador's scroll-region command to be described; it
Packit c58733
     could also be done by putting non-Unix `%'-sequences into a `cs'
Packit c58733
     string, but that would have confused Unix programs that used the
Packit c58733
     `cs' capability with the Unix termcap.  Currently only GNU Emacs
Packit c58733
     uses the `cS' capability.
Packit c58733
Packit c58733
`ns'
Packit c58733
     Flag which means that the terminal does not normally scroll for
Packit c58733
     ordinary sequential output.  For modern terminals, this means that
Packit c58733
     outputting a newline in ordinary sequential output with the cursor
Packit c58733
     on the bottom line wraps to the top line.  For some obsolete
Packit c58733
     terminals, other things may happen.
Packit c58733
Packit c58733
     The terminal may be able to scroll even if it does not normally do
Packit c58733
     so.  If the `sf' capability is provided, it can be used for
Packit c58733
     scrolling regardless of `ns'.
Packit c58733
Packit c58733
`da'
Packit c58733
     Flag whose presence means that lines scrolled up off the top of the
Packit c58733
     screen may come back if scrolling down is done subsequently.
Packit c58733
Packit c58733
     The `da' and `db' flags do not, strictly speaking, affect how to
Packit c58733
     scroll.  But programs that scroll usually need to clear the lines
Packit c58733
     scrolled onto the screen, if these flags are present.
Packit c58733
Packit c58733
`db'
Packit c58733
     Flag whose presence means that lines scrolled down off the bottom
Packit c58733
     of the screen may come back if scrolling up is done subsequently.
Packit c58733
Packit c58733
`lm'
Packit c58733
     Numeric value, the number of lines of display memory that the
Packit c58733
     terminal has.  A value of zero means that the terminal has more
Packit c58733
     display memory than can fit on the screen, but no fixed number of
Packit c58733
     lines.  (The number of lines may depend on the amount of text in
Packit c58733
     each line.)
Packit c58733
Packit c58733
   Any terminal description that defines `SF' should also define `sf';
Packit c58733
likewise for `SR' and `sr'.  However, many terminals can only scroll by
Packit c58733
one line at a time, so it is common to find `sf' and not `SF', or `sr'
Packit c58733
without `SR'.
Packit c58733
Packit c58733
   Therefore, all programs that use the scrolling facilities should be
Packit c58733
prepared to work with `sf' in the case that `SF' is absent, and
Packit c58733
likewise with `sr'.  On the other hand, an application program that
Packit c58733
uses only `sf' and not `SF' is acceptable, though slow on some
Packit c58733
terminals.
Packit c58733
Packit c58733
   When outputting a scroll command with `tputs', the NLINES argument
Packit c58733
should be the total number of lines in the portion of the screen being
Packit c58733
scrolled.  Very often these commands require padding proportional to
Packit c58733
this number of lines.  *Note Padding::.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Windows,  Next: Clearing,  Prev: Scrolling,  Up: Capabilities
Packit c58733
Packit c58733
Windows
Packit c58733
=======
Packit c58733
Packit c58733
   A "window", in termcap, is a rectangular portion of the screen to
Packit c58733
which all display operations are restricted.  Wrapping, clearing,
Packit c58733
scrolling, insertion and deletion all operate as if the specified
Packit c58733
window were all the screen there was.
Packit c58733
Packit c58733
`wi'
Packit c58733
     String of commands to set the terminal output screen window.  This
Packit c58733
     string requires four parameters, all origin-zero:
Packit c58733
       1. The first line to include in the window.
Packit c58733
Packit c58733
       2. The last line to include in the window.
Packit c58733
Packit c58733
       3. The first column to include in the window.
Packit c58733
Packit c58733
       4. The last column to include in the window.
Packit c58733
Packit c58733
   Most terminals do not support windows.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Clearing,  Next: Insdel Line,  Prev: Windows,  Up: Capabilities
Packit c58733
Packit c58733
Clearing Parts of the Screen
Packit c58733
============================
Packit c58733
Packit c58733
   There are several terminal capabilities for clearing parts of the
Packit c58733
screen to blank.  All display terminals support the `cl' string, and
Packit c58733
most display terminals support all of these capabilities.
Packit c58733
Packit c58733
`cl'
Packit c58733
     String of commands to clear the entire screen and position the
Packit c58733
     cursor at the upper left corner.
Packit c58733
Packit c58733
`cd'
Packit c58733
     String of commands to clear the line the cursor is on, and all the
Packit c58733
     lines below it, down to the bottom of the screen.  This command
Packit c58733
     string should be used only with the cursor in column zero; their
Packit c58733
     effect is undefined if the cursor is elsewhere.
Packit c58733
Packit c58733
`ce'
Packit c58733
     String of commands to clear from the cursor to the end of the
Packit c58733
     current line.
Packit c58733
Packit c58733
`ec'
Packit c58733
     String of commands to clear N characters, starting with the
Packit c58733
     character that the cursor is on.  This command string is expected
Packit c58733
     to leave the cursor position unchanged.  The parameter N should
Packit c58733
     never be large enough to reach past the right margin; the effect
Packit c58733
     of such a large parameter would be undefined.
Packit c58733
Packit c58733
   Clear to end of line (`ce') is extremely important in programs that
Packit c58733
maintain an updating display.  Nearly all display terminals support this
Packit c58733
operation, so it is acceptable for a an application program to refuse to
Packit c58733
work if `ce' is not present.  However, if you do not want this
Packit c58733
limitation, you can accomplish clearing to end of line by outputting
Packit c58733
spaces until you reach the right margin.  In order to do this, you must
Packit c58733
know the current horizontal position.  Also, this technique assumes
Packit c58733
that writing a space will erase.  But this happens to be true on all
Packit c58733
the display terminals that fail to support `ce'.
Packit c58733
Packit c58733
?
Packit c58733
File: termcap.info,  Node: Insdel Line,  Next: Insdel Char,  Prev: Clearing,  Up: Capabilities
Packit c58733
Packit c58733
Insert/Delete Line
Packit c58733
==================
Packit c58733
Packit c58733
   "Inserting a line" means creating a blank line in the middle of the
Packit c58733
screen, and pushing the existing lines of text apart.  In fact, the
Packit c58733
lines above the insertion point do not change, while the lines below
Packit c58733
move down, and one is normally lost at the bottom of the screen.
Packit c58733
Packit c58733
   "Deleting a line" means causing the line to disappear from the
Packit c58733
screen, closing up the gap by moving the lines below it upward.  A new
Packit c58733
line appears at the bottom of the screen.  Usually this line is blank,
Packit c58733
but on terminals with the `db' flag it may be a line previously moved
Packit c58733
off the screen bottom by scrolling or line insertion.
Packit c58733
Packit c58733
   Insertion and deletion of lines is useful in programs that maintain
Packit c58733
an updating display some parts of which may get longer or shorter.
Packit c58733
They are also useful in editors for scrolling parts of the screen, and
Packit c58733
for redisplaying after lines of text are killed or inserted.
Packit c58733
Packit c58733
   Many terminals provide commands to insert or delete a single line at
Packit c58733
the cursor position.  Some provide the ability to insert or delete
Packit c58733
several lines with one command, using the number of lines to insert or
Packit c58733
delete as a parameter.  Always move the cursor to column zero before
Packit c58733
using any of these commands.
Packit c58733
Packit c58733
`al'
Packit c58733
     String of commands to insert a blank line before the line the
Packit c58733
     cursor is on.  The existing line, and all lines below it, are
Packit c58733
     moved down.  The last line in the screen (or in the scroll region,
Packit c58733
     if one is set) disappears and in most circumstances is discarded.
Packit c58733
     It may not be discarded if the `db' is present (*note
Packit c58733
     Scrolling::.).
Packit c58733
Packit c58733
     The cursor must be at the left margin before this command is used.
Packit c58733
     This command does not move the cursor.
Packit c58733
Packit c58733
`dl'
Packit c58733
     String of commands to delete the line the cursor is on.  The
Packit c58733
     following lines move up, and a blank line appears at the bottom of
Packit c58733
     the screen (or bottom of the scroll region).  If the terminal has
Packit c58733
     the `db' flag, a nonblank line previously pushed off the screen
Packit c58733
     bottom may reappear at the bottom.
Packit c58733
Packit c58733
     The cursor must be at the left margin before this command is used.
Packit c58733
     This command does not move the cursor.
Packit c58733
Packit c58733
`AL'
Packit c58733
     String of commands to insert N blank lines before the line that
Packit c58733
     the cursor is on.  It is like `al' repeated N times, except that
Packit c58733
     it is as fast as one `al'.
Packit c58733
Packit c58733
`DL'
Packit c58733
     String of commands to delete N lines starting with the line that
Packit c58733
     the cursor is on.  It is like `dl' repeated N times, except that
Packit c58733
     it is as fast as one `dl'.
Packit c58733
Packit c58733
   Any terminal description that defines `AL' should also define `al';
Packit c58733
likewise for `DL' and `dl'.  However, many terminals can only insert or
Packit c58733
delete one line at a time, so it is common to find `al' and not `AL',
Packit c58733
or `dl' without `DL'.
Packit c58733
Packit c58733
   Therefore, all programs that use the insert and delete facilities
Packit c58733
should be prepared to work with `al' in the case that `AL' is absent,
Packit c58733
and likewise with `dl'.  On the other hand, it is acceptable to write
Packit c58733
an application that uses only `al' and `dl' and does not look for `AL'
Packit c58733
or `DL' at all.
Packit c58733
Packit c58733
   If a terminal does not support line insertion and deletion directly,
Packit c58733
but does support a scroll region, the effect of insertion and deletion
Packit c58733
can be obtained with scrolling.  However, it is up to the individual
Packit c58733
user program to check for this possibility and use the scrolling
Packit c58733
commands to get the desired result.  It is fairly important to implement
Packit c58733
this alternate strategy, since it is the only way to get the effect of
Packit c58733
line insertion and deletion on the popular VT100 terminal.
Packit c58733
Packit c58733
   Insertion and deletion of lines is affected by the scroll region on
Packit c58733
terminals that have a settable scroll region.  This is useful when it is
Packit c58733
desirable to move any few consecutive lines up or down by a few lines.
Packit c58733
*Note Scrolling::.
Packit c58733
Packit c58733
   The line pushed off the bottom of the screen is not lost if the
Packit c58733
terminal has the `db' flag capability; instead, it is pushed into
Packit c58733
display memory that does not appear on the screen.  This is the same
Packit c58733
thing that happens when scrolling pushes a line off the bottom of the
Packit c58733
screen.  Either reverse scrolling or deletion of a line can bring the
Packit c58733
apparently lost line back onto the bottom of the screen.  If the
Packit c58733
terminal has the scroll region feature as well as `db', the pushed-out
Packit c58733
line really is lost if a scroll region is in effect.
Packit c58733
Packit c58733
   When outputting an insert or delete command with `tputs', the NLINES
Packit c58733
argument should be the total number of lines from the cursor to the
Packit c58733
bottom of the screen (or scroll region).  Very often these commands
Packit c58733
require padding proportional to this number of lines.  *Note Padding::.
Packit c58733
Packit c58733
   For `AL' and `DL' the NLINES argument should *not* depend on the
Packit c58733
number of lines inserted or deleted; only the total number of lines
Packit c58733
affected.  This is because it is just as fast to insert two or N lines
Packit c58733
with `AL' as to insert one line with `al'.
Packit c58733