6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / infocmp.1m
blob2e0b81abc05f57c7fecbccd6fccac45f12811aac
1 '\" te
2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH INFOCMP 1M "Jul 5, 1990"
8 .SH NAME
9 infocmp \- compare or print out terminfo descriptions
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/bin/infocmp\fR [\fB-d\fR] [\fB-c\fR] [\fB-n\fR] [\fB-I\fR] [\fB-L\fR] [\fB-C\fR] [\fB-r\fR] [\fB-u\fR]
14      [\fB-s\fR | d | i | l | c] [\fB-v\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR]
15      [\fB-A\fR \fI directory\fR] [\fB-B\fR \fIdirectory\fR] [\fItermname\fR]...
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 \fBinfocmp\fR compares a binary \fBterminfo\fR entry with other terminfo
22 entries, rewrites a \fBterminfo\fR description to take advantage of the
23 \fBuse=\fR terminfo field, or prints out a \fBterminfo\fR description from the
24 binary file ( \fBterm\fR ) in a variety of formats. It displays boolean fields
25 first, then numeric fields, followed by the string fields. If no options are
26 specified and zero, or one \fItermname\fR is specified, the \fB-I\fR option is
27 assumed. If more than one \fItermname\fR is specified, the \fB-d\fR option is
28 assumed.
29 .SH OPTIONS
30 .sp
31 .LP
32 The \fB-d\fR \fB,\fR \fB-c\fR \fB,\fR and \fB-n\fR options can be used for
33 comparisons. \fBinfocmp\fR compares the \fBterminfo\fR description of the first
34 terminal \fItermname\fR with each of the descriptions given by the entries for
35 the other terminal's \fItermname\fR. If a capability is defined for only one of
36 the terminals, the value returned will depend on the type of the capability:
37 \fBF\fR for boolean variables, \fB\(mi1\fR for integer variables, and
38 \fINULL\fR for string variables.
39 .sp
40 .ne 2
41 .na
42 \fB\fB-d\fR\fR
43 .ad
44 .RS 6n
45 Produce a list of each capability that is different between two entries. This
46 option is useful to show the difference between two entries, created by
47 different people, for the same or similar terminals.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-c\fR\fR
54 .ad
55 .RS 6n
56 Produce a list of each capability that is common between two entries.
57 Capabilities that are not set are ignored. This option can be used as a quick
58 check to see if the \fB-u\fR option is worth using.
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fB-n\fR\fR
65 .ad
66 .RS 6n
67 Produce a list of each capability that is in neither entry. If no
68 \fItermname\fR is given, the environment variable \fBTERM\fR will be used for
69 both of the \fItermname\fRs. This can be used as a quick check to see if
70 anything was left out of a description.
71 .RE
73 .sp
74 .LP
75 The \fB-I\fR \fB,\fR \fB-L\fR \fB,\fR and \fB-C\fR options will produce a
76 source listing for each terminal named.
77 .sp
78 .ne 2
79 .na
80 \fB\fB-I\fR\fR
81 .ad
82 .RS 6n
83 Use the \fBterminfo\fR names.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB-L\fR\fR
90 .ad
91 .RS 6n
92 Use the long C variable name listed in < \fBterm.h\fR >.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB-C\fR\fR
99 .ad
100 .RS 6n
101 Use the \fBtermcap\fR names. The source produced by the \fB-C\fR option may be
102 used directly as a \fBtermcap\fR entry, but not all of the parameterized
103 strings may be changed to the \fBtermcap\fR format. \fBinfocmp\fR will attempt
104 to convert most of the parameterized information, but anything not converted
105 will be plainly marked in the output and commented out. These should be edited
106 by hand.
110 .ne 2
112 \fB\fB-r\fR\fR
114 .RS 6n
115 When using \fB-C\fR \fB,\fR put out all capabilities in \fBtermcap\fR form.
120 If no \fItermname\fR is given, the environment variable \fBTERM\fR will be used
121 for the terminal name.
124 All padding information for strings will be collected together and placed at
125 the beginning of the string where \fBtermcap\fR expects it. Mandatory padding
126 (padding information with a trailing '/') will become optional.
129 All \fBtermcap\fR variables no longer supported by \fBterminfo ,\fR but are
130 derivable from other \fBterminfo\fR variables, will be displayed.  Not all
131 \fBterminfo\fR capabilities will be translated; only those variables which were
132 part of \fBtermcap\fR will normally be displayed. Specifying the \fB-r\fR
133 option will take off this restriction, allowing all capabilities to be
134 displayed in \fBtermcap\fR form.
137 Note that because padding is collected to the beginning of the capability, not
138 all capabilities are displayed. Mandatory padding is not supported. Because
139 \fBtermcap\fR strings are not as flexible, it is not always possible to convert
140 a \fBterminfo\fR string capability into an equivalent \fBtermcap\fR format. A
141 subsequent conversion of the \fBtermcap\fR file back into \fBterminfo\fR format
142 will not necessarily reproduce the original \fBterminfo\fR source.
145 Some common \fBterminfo\fR parameter sequences, their \fBtermcap\fR
146 equivalents, and some terminal types which commonly have such sequences, are:
148 .in +2
150 \fBterminfo     termcap\fR      Representative Terminals
151 \fB%p1%c        %.\fR   adm
152 \fB%p1%d        %d\fR   hp, ANSI standard, vt100
153 \fB%p1%'x'%+%c  %+x\fR  concept
154 \fB%i   %i\fR   ANSI standard, vt100
155 \fB%p1%?%'x'%>%t%p1%'y'%+%;     %>xy\fR concept
156 \fB%p2\fR is printed before \fB%p1      %r\fR   hp
158 .in -2
162 .ne 2
164 \fB\fB-u\fR\fR
166 .RS 6n
167 Produce a \fBterminfo\fR source description of the first terminal
168 \fItermname\fR which is relative to the sum of the descriptions given by the
169 entries for the other terminals' \fItermname\fRs. It does this by analyzing the
170 differences between the first \fItermname\fR and the other \fItermnames\fR and
171 producing a description with \fBuse=\fR fields for the other terminals. In this
172 manner, it is possible to retrofit generic \fBterminfo\fR entries into a
173 terminal's description. Or, if two similar terminals exist, but were coded at
174 different times, or by different people so that each description is a full
175 description, using \fBinfocmp\fR will show what can be done to change one
176 description to be relative to the other.
181 A capability is displayed with an at-sign (@) if it no longer exists in the
182 first \fItermname\fR, but one of the other \fItermname\fR entries contains a
183 value for it. A capability's value is displayed if the value in the first
184 \fItermname\fR is not found in any of the other \fItermname\fR entries, or if
185 the first of the other \fItermname\fR entries that has this capability gives a
186 different value for that capability.
189 The order of the other \fItermname\fR entries is significant. Since the
190 \fBterminfo\fR compiler \fBtic\fR does a left-to-right scan of the
191 capabilities, specifying two \fBuse=\fR entries that contain differing entries
192 for the same capabilities will produce different results, depending on the
193 order in which the entries are given. \fBinfocmp\fR will flag any such
194 inconsistencies between the other \fItermname\fR entries as they are found.
197 Alternatively, specifying a capability \fIafter\fR a \fBuse=\fR entry that
198 contains, it will cause the second specification to be ignored. Using
199 \fBinfocmp\fR to recreate a description can be a useful check to make sure that
200 everything was specified correctly in the original source description.
203 Another error that does not cause incorrect compiled files, but will slow down
204 the compilation time, is specifying superfluous  \fBuse=\fR fields.
205 \fBinfocmp\fR will flag any superfluous  \fBuse=\fR fields.
207 .ne 2
209 \fB\fB-s\fR\fR
211 .RS 11n
212 Sorts the fields within each type according to the argument below:
214 .ne 2
216 \fB\fBd\fR\fR
218 .RS 5n
219 Leave fields in the order that they are stored in the \fBterminfo\fR database.
223 .ne 2
225 \fB\fBi\fR\fR
227 .RS 5n
228 Sort by \fBterminfo\fR name.
232 .ne 2
234 \fB\fBl\fR\fR
236 .RS 5n
237 Sort by the long C variable name.
241 .ne 2
243 \fB\fBc\fR\fR
245 .RS 5n
246 Sort by the \fBtermcap\fR name.
249 If the \fB-s\fR option is not given, the fields are sorted alphabetically by
250 the \fBterminfo\fR name within each type, except in the case of the \fB-C\fR or
251 the \fB-L\fR options, which cause the sorting to be done by the \fBtermcap\fR
252 name or the long C variable name, respectively.
256 .ne 2
258 \fB\fB-v\fR\fR
260 .RS 11n
261 Print out tracing information on standard error as the program runs.
265 .ne 2
267 \fB\fB-V\fR\fR
269 .RS 11n
270 Print out the version of the program in use on standard error and exit.
274 .ne 2
276 \fB\fB\(mi1\fR\fR
278 .RS 11n
279 Print the fields one to a line. Otherwise, the fields are printed several to a
280 line to a maximum width of 60 characters.
284 .ne 2
286 \fB\fB-w\fR\fIwidth\fR\fR
288 .RS 11n
289 Changes the output to \fIwidth\fR characters.
294 The location of the compiled \fBterminfo\fR database is taken from the
295 environment variable \fB\fR\fBTERM\fR\fBINFO \fR. If the variable is not
296 defined, or the terminal is not found in that location, the system
297 \fBterminfo\fR database, usually in \fB/usr/share/lib/terminfo\fR, is used. The
298 options \fB-A\fR and \fB-B\fR may be used to override this location.
300 .ne 2
302 \fB\fB-A\fR \fIdirectory\fR\fR
304 .RS 16n
305 Set \fB\fR\fBTERM\fR\fBINFO \fR for the first \fItermname\fR.
309 .ne 2
311 \fB\fB-B\fR \fIdirectory\fR\fR
313 .RS 16n
314 Set \fB\fR\fBTERM\fR\fBINFO \fR for the other \fItermname\fRs. With this, it is
315 possible to compare descriptions for a terminal with the same name located in
316 two different databases. This is useful for comparing descriptions for the same
317 terminal created by different people.
320 .SH FILES
322 .ne 2
324 \fB\fB/usr/share/lib/terminfo/?/*\fR\fR
326 .sp .6
327 .RS 4n
328 Compiled terminal description database.
331 .SH SEE ALSO
334 \fBcaptoinfo\fR(1M), \fBtic\fR(1M), \fBcurses\fR(3CURSES), \fBterminfo\fR(4),
335 \fBattributes\fR(5)