]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/terminfo.head
ncurses 6.0 - patch 20170603
[ncurses.git] / man / terminfo.head
1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: terminfo.head,v 1.32 2017/04/22 13:52:49 tom Exp $
30 .TH terminfo 5 "" "" "File Formats"
31 .ds n 5
32 .ds d @TERMINFO@
33 .ie \n(.g .ds `` \(lq
34 .el       .ds `` ``
35 .ie \n(.g .ds '' \(rq
36 .el       .ds '' ''
37 .de bP
38 .IP \(bu 4
39 ..
40 .de NS
41 .ie \n(.sp
42 .el    .sp .5
43 .ie \n(.in +4
44 .el    .in +2
45 .nf
46 .ft C                   \" Courier
47 ..
48 .de NE
49 .fi
50 .ft R
51 .in -4
52 ..
53 .SH NAME
54 terminfo \- terminal capability data base
55 .SH SYNOPSIS
56 \*d/*/*
57 .SH DESCRIPTION
58 .I Terminfo
59 is a data base describing terminals, used by screen-oriented programs such as
60 \fBnvi\fR(1),
61 \fBrogue\fR(1)
62 and libraries such as
63 \fBcurses\fR(3X).
64 .I Terminfo
65 describes terminals by giving a set of capabilities which they
66 have, by specifying how to perform screen operations, and by
67 specifying padding requirements and initialization sequences.
68 This describes \fBncurses\fR
69 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
70 .SS Terminfo Entry Syntax
71 .PP
72 Entries in
73 .I terminfo
74 consist of a sequence of fields:
75 .bP
76 Each field ends with a comma \*(``,\*('' 
77 (embedded commas may be
78 escaped with a backslash or written as \*(``\\054\*('').
79 .bP
80 White space between fields is ignored.
81 .bP
82 The first field in a \fIterminfo\fP entry begins in the first column.
83 .bP
84 Newlines and leading whitespace (spaces or tabs)
85 may be used for formatting entries for readability.
86 These are removed from parsed entries.
87 .IP
88 The \fB@INFOCMP@\fP \fB\-f\fP and \fB\-W\fP options rely on this to
89 format if-then-else expressions,
90 or to enforce maximum line-width.
91 The resulting formatted terminal description can be read by \fB@TIC@\fP.
92 .bP
93 The first field for each terminal gives the names which are known for the
94 terminal, separated by \*(``|\*('' characters.
95 .IP
96 The first name given is the most common abbreviation for the terminal
97 (its primary name),
98 the last name given should be a long name fully identifying the terminal
99 (see \fBlongname\fP(3X)),
100 and all others are treated as synonyms (aliases) for the primary terminal name.
101 .IP
102 X/Open Curses advises that all names but the last should be in lower case
103 and contain no blanks;
104 the last name may well contain upper case and blanks for readability.
105 .IP
106 This implementation is not so strict;
107 it allows mixed case in the primary name and aliases.
108 If the last name has no embedded blanks,
109 it allows that to be both an alias and a verbose name
110 (but will warn about this ambiguity).
111 .bP
112 Lines beginning with a \*(``#\*('' in the first column are treated as comments.
113 .IP
114 While comment lines are legal at any point, the output of \fB@CAPTOINFO@\fP
115 and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP)
116 will move comments so they occur only between entries.
117 .PP
118 Terminal names (except for the last, verbose entry) should
119 be chosen using the following conventions.
120 The particular piece of hardware making up the terminal should
121 have a root name, thus \*(``hp2621\*(''.
122 This name should not contain hyphens.
123 Modes that the hardware can be in, or user preferences, should
124 be indicated by appending a hyphen and a mode suffix.
125 Thus, a vt100 in 132 column mode would be vt100\-w.
126 The following suffixes should be used where possible:
127 .PP
128 .TS
129 center ;
130 l c l
131 l l l.
132 \fBSuffix       Meaning Example\fP
133 \-\fInn\fP      Number of lines on the screen   aaa\-60
134 \-\fIn\fPp      Number of pages of memory       c100\-4p
135 \-am    With automargins (usually the default)  vt100\-am
136 \-m     Mono mode; suppress color               ansi\-m
137 \-mc    Magic cookie; spaces when highlighting  wy30\-mc
138 \-na    No arrow keys (leave them in local)     c100\-na
139 \-nam   Without automatic margins               vt100\-nam
140 \-nl    No status line                          att4415\-nl
141 \-ns    No status line                          hp2626\-ns
142 \-rv    Reverse video                           c100\-rv
143 \-s     Enable status line                      vt100\-s
144 \-vb    Use visible bell instead of beep        wy370\-vb
145 \-w     Wide mode (> 80 columns, usually 132)   vt100\-w
146 .TE
147 .PP
148 For more on terminal naming conventions, see the \fBterm(7)\fR manual page.
149 .SS Terminfo Capabilities Syntax
150 .PP
151 The terminfo entry consists of several \fIcapabilities\fP,
152 i.e., features that the terminal has,
153 or methods for exercising the terminal's features.
154 .PP
155 After the first field (giving the name(s) of the terminal entry),
156 there should be one or more \fIcapability\fP fields.
157 These are boolean, numeric or string names with corresponding values:
158 .bP
159 Boolean capabilities are true when present, false when absent.
160 There is no explicit value for boolean capabilities.
161 .bP
162 Numeric capabilities have a \*(``#\*('' following the name,
163 then an unsigned decimal integer value.
164 .bP
165 String capabilities have a \*(``=\*('' following the name,
166 then an string of characters making up the capability value.
167 .IP
168 String capabilities can be split into multiple lines,
169 just as the fields comprising a terminal entry can be
170 split into multiple lines.
171 While blanks between fields are ignored,
172 blanks embedded within a string value are retained,
173 except for leading blanks on a line.
174 .PP
175 Any capability can be \fIcanceled\fP,
176 i.e., suppressed from the terminal entry,
177 by following its name with \*(``@\*(''
178 rather than a capability value.
179 .SS Similar Terminals
180 .PP
181 If there are two very similar terminals, one (the variant) can be defined as
182 being just like the other (the base) with certain exceptions.
183 In the
184 definition of the variant, the string capability \fBuse\fR can be given with
185 the name of the base terminal:
186 .bP
187 The capabilities given before
188 .B use
189 override those in the base type named by
190 .BR use .
191 .bP
192 If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
193 That is, the rightmost \fBuse\fR reference is processed first, then the one to
194 its left, and so forth.
195 .bP
196 Capabilities given explicitly in the entry override
197 those brought in by \fBuse\fR references.
198 .PP
199 A capability can be canceled by placing \fBxx@\fR to the left of the
200 use reference that imports it, where \fIxx\fP is the capability.
201 For example, the entry
202 .RS
203 .PP
204 2621\-nl, smkx@, rmkx@, use=2621,
205 .RE
206 .PP
207 defines a 2621\-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
208 and hence does not turn on the function key labels when in visual mode.
209 This is useful for different modes for a terminal, or for different
210 user preferences.
211 .PP
212 An entry included via \fBuse\fP can contain canceled capabilities,
213 which have the same effect as if those cancels were inline in the
214 using terminal entry.
215 .SS Predefined Capabilities
216 .\" Head of terminfo man page ends here
217 .ps -1