xref: /netbsd-src/usr.bin/infocmp/infocmp.1 (revision 7f21db1c0118155e0dd40b75182e30c589d9f63e)
1.\"	$NetBSD: infocmp.1,v 1.3 2010/02/05 16:43:46 roy Exp $
2.\"
3.\" Copyright (c) 2009 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Roy Marples.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 5, 2010
31.Dt INFOCMP 1
32.Os
33.Sh NAME
34.Nm infocmp
35.Nd compare or print compiled terminfo descriptions
36.Sh SYNOPSIS
37.Nm infocmp
38.Op Fl 1acnqux
39.Op Fl A Ar database
40.Op Fl B Ar database
41.Op Fl w Ar cols
42.Op Ar term ...
43.Sh DESCRIPTION
44The
45.Nm
46reconstructs the first available
47.Xr terminfo 5
48definiton found for
49.Ar term
50and prints the result in a
51.Xr terminfo 5
52format.
53Capabilty types are grouped together and new types start new lines,
54first flags, then numbers, then strings.
55Capabilities are sorted by their name.
56If a second
57.Ar term
58is given then the capabilies are compared against each other.
59.Pp
60The following options are available:
61.Bl -tag -width Ev
62.It Fl 1
63Print one capability per line.
64.It Fl A Ar database
65Use this database to load the first terminal definition.
66.It Fl B Ar database
67Use this database to load subsequent terminal definitions.
68.It Fl a
69Include commented out capabilities.
70This only works if the database was compiled with the
71.Fl a
72flag passed to
73.Xr tic 1 .
74This also sets the
75.Fl x
76flag as
77.Nm
78retains commented out capabilities as non standard.
79.It Fl c
80Print capabilites common to each definition.
81.It Fl n
82Print capabilites that do not exist in either definition.
83.It Fl q
84Make the comparison listing shorter by omitting subheadings and using
85- for absent capabilities, @ for cancelled capapbilites rather than NULL.
86.It Fl u
87Build a new terminal description for the first terminal description,
88using subsequent terminal descriptions.
89This also sets the
90.Fl a
91flag.
92.It Fl w Ar cols
93Limit the width to
94.Ar cols .
95.It Fl x
96Include non-standard capabilities.
97More
98.Fl x
99only handles non-standard capabilities.
100This only works if the database was compiled with the
101.Fl x
102flag passed to
103.Xr tic 1 .
104.El
105.Sh EXIT STATUS
106.Ex -std infocmp
107.Sh ENVIRONMENT
108.Bl -tag -width Ev
109.It Ev COLUMNS
110Override columns returned by the output terminal.
111.Fl w
112.Ar cols
113supercedes this.
114.It Ev TERM
115.Nm
116uses the contents of the
117.Ev TERM
118environment variable if no terminal name is given on the command line.
119.El
120.Sh SEE ALSO
121.Xr tic 1 ,
122.Xr terminfo 5
123.Sh STANDARDS
124The
125.Nm
126utility outputs information that conforms to the
127.St -xcurses4.2
128standard.
129.Sh AUTHORS
130.An Roy Marples Aq roy@NetBSD.org
131