home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
gnu
/
info
/
termcap.info-1
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-02-24
|
48KB
|
853 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: Top, Next: Introduction, Prev: (dir), Up: (dir)
* Menu:
* Introduction:: What is termcap? Why this manual?
* Library:: The termcap library functions.
* Data Base:: What terminal descriptions in `/etc/termcap' look like.
* Capabilities:: Definitions of the individual terminal capabilities:
how to write them in descriptions, and how to use
their values to do display updating.
* Summary:: Brief table of capability names and their meanings.
* Var Index:: Index of C functions and variables.
* Cap Index:: Index of termcap capabilities.
* Index:: Concept index.
-- The Detailed Node Listing --
The Termcap Library
* Preparation:: Preparing to use the termcap library.
* Find:: Finding the description of the terminal being used.
* Interrogate:: Interrogating the description for particular capabilities.
* Initialize:: Initialization for output using termcap.
* Padding:: Outputting padding.
* Parameters:: Encoding parameters such as cursor positions.
Padding
* Why Pad:: Explanation of padding.
* Not Enough:: When there is not enough padding.
* Describe Padding:: The data base says how much padding a terminal needs.
* Output Padding:: Using `tputs' to output the needed padding.
Filling In Parameters
* Encode Parameters:: The language for encoding parameters.
* Using Parameters:: Outputting a string command with parameters.
Sending Display Commands with Parameters
* tparam:: The general case, for GNU termcap only.
* tgoto:: The special case of cursor motion.
The Format of the Data Base
* Format:: Overall format of a terminal description.
* Capability Format:: Format of capabilities within a description.
* Naming:: Naming conventions for terminal types.
* Inheriting:: Inheriting part of a description from
a related terminal type.
* Changing:: When changes in the data base take effect.
Definitions of the Terminal Capabilities
* Basic:: Basic characteristics.
* Screen Size:: Screen size, and what happens when it changes.
* Cursor Motion:: Various ways to move the cursor.
* Wrapping:: What happens if you write a character in the last column.
* Scrolling:: Pushing text up and down on the screen.
* Windows:: Limiting the part of the window that output affects.
* Clearing:: Erasing one or many lines.
* Insdel Line:: Making new blank lines in mid-screen; deleting lines.
* Insdel Char:: Inserting and deleting characters within a line.
* Standout:: Highlighting some of the text.
* Underlining:: Underlining some of the text.
* Cursor Visibility:: Making the cursor more or less easy to spot.
* Bell:: Attracts user's attention; not localized on the screen.
* Keypad:: Recognizing when function keys or arrows are typed.
* Meta Key:: META acts like an extra shift key.
* Initialization:: Commands used to initialize or reset the terminal.
* Pad Specs:: Info for the kernel on how much padding is needed.
* Status Line:: A status line displays "background" information.
* Half-Line:: Moving by half-lines, for superscripts and subscripts.
* Printer:: Controlling auxiliary printers of display terminals.
File: termcap.info, Node: Introduction, Next: Library, Prev: Top, Up: Top
Introduction
************
"Termcap" is a library and data base that enables programs to use
display terminals in a terminal-independent manner. It originated in
Berkeley Unix.
The termcap data base describes the capabilities of hundreds of
different display terminals in great detail. Some examples of the
information recorded for a terminal could include how many columns wide
it is, what string to send to move the cursor to an arbitrary position
(including how to encode the row and column numbers), how to scroll the
screen up one or several lines, and how much padding is needed for such
a scrolling operation.
The termcap library is provided for easy access this data base in
programs that want to do terminal-independent character-based display
output.
This manual describes the GNU version of the termcap library, which
has some extensions over the Unix version. All the extensions are
identified as such, so this manual also tells you how to use the Unix
termcap.
The GNU version of the termcap library is available free as source
code, for use in free programs, and runs on Unix and VMS systems (at
least). You can find it in the GNU Emacs distribution in the files
`termcap.c' and `tparam.c'.
This manual was written for the GNU project, whose goal is to
develop a complete free operating system upward-compatible with Unix
for user programs. The project is approximately two thirds complete.
For more information on the GNU project, including the GNU Emacs editor
and the mostly-portable optimizing C compiler, send one dollar to
Free Software Foundation
675 Mass Ave
Cambridge, MA 02139
File: termcap.info, Node: Library, Next: Data Base, Prev: Introduction, Up: Top
The Termcap Library
*******************
The termcap library is the application programmer's interface to the
termcap data base. It contains functions for the following purposes:
* Finding the description of the user's terminal type (`tgetent').
* Interrogating the description for information on various topics
(`tgetnum', `tgetflag', `tgetstr').
* Computing and performing padding (`tputs').
* Encoding numeric parameters such as cursor positions into the
terminal-specific form required for display commands (`tparam',
`tgoto').
* Menu:
* Preparation:: Preparing to use the termcap library.
* Find:: Finding the description of the terminal being used.
* Interrogate:: Interrogating the description for particular capabilities.
* Initialize:: Initialization for output using termcap.
* Padding:: Outputting padding.
* Parameters:: Encoding parameters such as cursor positions.
File: termcap.info, Node: Preparation, Next: Find, Up: Library
Preparing to Use the Termcap Library
====================================
To use the termcap library in a program, you need two kinds of
preparation:
* The compiler needs declarations of the functions and variables in
the library.
On GNU systems, it suffices to include the header file `termcap.h'
in each source file that uses these functions and variables.
On Unix systems, there is often no such header file. Then you must
explictly declare the variables as external. You can do likewise
for the functions, or let them be implicitly declared and cast
their values from type `int' to the appropriate type.
We illustrate the declarations of the individual termcap library
functions with ANSI C prototypes because they show how to pass the
arguments. If you are not using the GNU C compiler, you probably
cannot use function prototypes, so omit the argument types and
names from your declarations.
* The linker needs to search the library. Usually either
`-ltermcap' or `-ltermlib' as an argument when linking will do
this.
File: termcap.info, Node: Find, Next: Interrogate, Prev: Preparation, Up: Library
Finding a Terminal Description: `tgetent'
=========================================
An