xref: /netbsd/usr.bin/infocmp/infocmp.1 (revision 6550d01e)
1.\"	$NetBSD: infocmp.1,v 1.5 2011/01/14 14:21:36 wiz 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
48definition found for
49.Ar term
50and prints the result in a
51.Xr terminfo 5
52format.
53Capability 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 capabilities 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 capabilities common to each definition.
81.It Fl n
82Print capabilities 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 canceled capabilities rather than
86.Dv NULL .
87.It Fl u
88Build a new terminal description for the first terminal description,
89using subsequent terminal descriptions.
90This also sets the
91.Fl a
92flag.
93.It Fl w Ar cols
94Limit the width to
95.Ar cols .
96.It Fl x
97Include non-standard capabilities.
98More
99.Fl x
100only handles non-standard capabilities.
101This only works if the database was compiled with the
102.Fl x
103flag passed to
104.Xr tic 1 .
105.El
106.Sh ENVIRONMENT
107.Bl -tag -width Ev
108.It Ev COLUMNS
109Override columns returned by the output terminal.
110.Fl w
111.Ar cols
112supersedes this.
113.It Ev TERM
114.Nm
115uses the contents of the
116.Ev TERM
117environment variable if no terminal name is given on the command line.
118.El
119.Sh EXIT STATUS
120.Ex -std infocmp
121.Sh SEE ALSO
122.Xr tic 1 ,
123.Xr terminfo 5
124.Sh STANDARDS
125The
126.Nm
127utility outputs information that conforms to the
128.St -xcurses4.2
129standard.
130.Sh AUTHORS
131.An Roy Marples Aq roy@NetBSD.org
132