]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/infocmp.1m.html
ncurses 5.3
[ncurses.git] / doc / html / man / infocmp.1m.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!-- 
3   * t
4   ****************************************************************************
5   * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc.              *
6   *                                                                          *
7   * Permission is hereby granted, free of charge, to any person obtaining a  *
8   * copy of this software and associated documentation files (the            *
9   * "Software"), to deal in the Software without restriction, including      *
10   * without limitation the rights to use, copy, modify, merge, publish,      *
11   * distribute, distribute with modifications, sublicense, and/or sell       *
12   * copies of the Software, and to permit persons to whom the Software is    *
13   * furnished to do so, subject to the following conditions:                 *
14   *                                                                          *
15   * The above copyright notice and this permission notice shall be included  *
16   * in all copies or substantial portions of the Software.                   *
17   *                                                                          *
18   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
19   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
20   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
21   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
22   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
23   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
24   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
25   *                                                                          *
26   * Except as contained in this notice, the name(s) of the above copyright   *
27   * holders shall not be used in advertising or otherwise to promote the     *
28   * sale, use or other dealings in this Software without prior written       *
29   * authorization.                                                           *
30   ****************************************************************************
31   * @Id: infocmp.1m,v 1.30 2002/10/05 21:22:21 tom Exp @
32 -->
33 <HTML>
34 <HEAD>
35 <TITLE>infocmp 1m</TITLE>
36 <link rev=made href="mailto:bug-ncurses@gnu.org">
37 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
38 </HEAD>
39 <BODY>
40 <H1>infocmp 1m</H1>
41 <HR>
42 <PRE>
43 <!-- Manpage converted by man2html 3.0.1 -->
44
45 </PRE>
46 <H2>NAME</H2><PRE>
47        <STRONG>infocmp</STRONG> - compare or print out <EM>terminfo</EM> descriptions
48
49
50 </PRE>
51 <H2>SYNOPSIS</H2><PRE>
52        <STRONG>infocmp</STRONG> [<STRONG>-1CEFGILTVcdegilnpqrtu</STRONG>]
53              [<STRONG>-v</STRONG> <EM>n</EM>] [<STRONG>-s</STRONG> <STRONG>d</STRONG>| <STRONG>i</STRONG>| <STRONG>l</STRONG>| <STRONG>c</STRONG>] [<STRONG>-R</STRONG> <STRONG>subset</STRONG>]
54              [<STRONG>-w</STRONG> <EM>width</EM>] [<STRONG>-A</STRONG> <EM>directory</EM>] [<STRONG>-B</STRONG> <EM>directory</EM>]
55              [<EM>termname</EM>...]
56
57
58 </PRE>
59 <H2>DESCRIPTION</H2><PRE>
60        <STRONG>infocmp</STRONG>  can  be  used  to compare a binary <STRONG>terminfo</STRONG> entry
61        with other terminfo entries, rewrite a  <STRONG>terminfo</STRONG>  descrip-
62        tion  to  take  advantage  of  the <STRONG>use=</STRONG> terminfo field, or
63        print out a <STRONG>terminfo</STRONG>  description  from  the  binary  file
64        (<STRONG>term</STRONG>) in a variety of formats.  In all cases, the boolean
65        fields will be printed  first,  followed  by  the  numeric
66        fields, followed by the string fields.
67
68    <STRONG>Default</STRONG> <STRONG>Options</STRONG>
69        If  no options are specified and zero or one <EM>termnames</EM> are
70        specified, the <STRONG>-I</STRONG> option will be assumed.   If  more  than
71        one  <EM>termname</EM> is specified, the <STRONG>-d</STRONG> option will be assumed.
72
73    <STRONG>Comparison</STRONG> <STRONG>Options</STRONG> <STRONG>[-d]</STRONG> <STRONG>[-c]</STRONG> <STRONG>[-n]</STRONG>
74        <STRONG>infocmp</STRONG> compares the <STRONG>terminfo</STRONG>  description  of  the  first
75        terminal  <EM>termname</EM>  with each of the descriptions given by
76        the entries for the  other  terminal's  <EM>termnames</EM>.   If  a
77        capability  is  defined for only one of the terminals, the
78        value returned will depend on the type of the  capability:
79        <STRONG>F</STRONG>  for  boolean  variables,  <STRONG>-1</STRONG> for integer variables, and
80        <STRONG>NULL</STRONG> for string variables.
81
82        The <STRONG>-d</STRONG> option produces a list of each capability  that  is
83        different  between  two entries.  This option is useful to
84        show the difference between two entries, created  by  dif-
85        ferent people, for the same or similar terminals.
86
87        The  <STRONG>-c</STRONG>  option produces a list of each capability that is
88        common between two entries.  Capabilities that are not set
89        are  ignored.  This option can be used as a quick check to
90        see if the <STRONG>-u</STRONG> option is worth using.
91
92        The <STRONG>-n</STRONG> option produces a list of each capability  that  is
93        in neither entry.  If no <EM>termnames</EM> are given, the environ-
94        ment variable <STRONG>TERM</STRONG> will be used for both of the <EM>termnames</EM>.
95        This  can  be used as a quick check to see if anything was
96        left out of a description.
97
98    <STRONG>Source</STRONG> <STRONG>Listing</STRONG> <STRONG>Options</STRONG> <STRONG>[-I]</STRONG> <STRONG>[-L]</STRONG> <STRONG>[-C]</STRONG> <STRONG>[-r]</STRONG>
99        The <STRONG>-I</STRONG>, <STRONG>-L</STRONG>, and <STRONG>-C</STRONG> options will produce a  source  listing
100        for each terminal named.
101
102       <STRONG>-I</STRONG>   use the <STRONG>terminfo</STRONG> names
103
104       <STRONG>-L</STRONG>   use the long C variable name listed in &lt;<STRONG>term.h</STRONG>&gt;
105       <STRONG>-C</STRONG>   use the <STRONG>termcap</STRONG> names
106       <STRONG>-r</STRONG>   when using <STRONG>-C</STRONG>, put out all capabilities in <STRONG>termcap</STRONG> form
107
108        If  no  <EM>termnames</EM> are given, the environment variable <STRONG>TERM</STRONG>
109        will be used for the terminal name.
110
111        The source produced by the <STRONG>-C</STRONG> option may be used  directly
112        as  a <STRONG>termcap</STRONG> entry, but not all parameterized strings can
113        be changed to the <STRONG>termcap</STRONG> format.  <STRONG>infocmp</STRONG> will attempt to
114        convert  most  of  the parameterized information, and any-
115        thing not converted will be plainly marked in  the  output
116        and commented out.  These should be edited by hand.
117
118        All  padding  information  for  strings  will be collected
119        together and placed at the beginning of the  string  where
120        <STRONG>termcap</STRONG>  expects  it.  Mandatory padding (padding informa-
121        tion with a trailing '/') will become optional.
122
123        All <STRONG>termcap</STRONG> variables no longer supported by <STRONG>terminfo</STRONG>, but
124        which are derivable from other <STRONG>terminfo</STRONG> variables, will be
125        output.  Not all <STRONG>terminfo</STRONG> capabilities will be translated;
126        only  those variables which were part of <STRONG>termcap</STRONG> will nor-
127        mally be output.  Specifying the <STRONG>-r</STRONG> option will  take  off
128        this  restriction,  allowing all capabilities to be output
129        in <EM>termcap</EM> form.
130
131        Note that because padding is collected to the beginning of
132        the  capability,  not all capabilities are output.  Manda-
133        tory padding is not supported.   Because  <STRONG>termcap</STRONG>  strings
134        are  not as flexible, it is not always possible to convert
135        a <STRONG>terminfo</STRONG> string capability into  an  equivalent  <STRONG>termcap</STRONG>
136        format.   A subsequent conversion of the <STRONG>termcap</STRONG> file back
137        into <STRONG>terminfo</STRONG> format will not  necessarily  reproduce  the
138        original <STRONG>terminfo</STRONG> source.
139
140        Some  common  <STRONG>terminfo</STRONG>  parameter sequences, their <STRONG>termcap</STRONG>
141        equivalents, and some terminal types which  commonly  have
142        such sequences, are:
143
144      <STRONG>terminfo</STRONG>                    <STRONG>termcap</STRONG>   Representative Terminals
145      ---------------------------------------------------------------
146      <STRONG>%p1%c</STRONG>                       <STRONG>%.</STRONG>        adm
147      <STRONG>%p1%d</STRONG>                       <STRONG>%d</STRONG>        hp, ANSI standard, vt100
148      <STRONG>%p1%'x'%+%c</STRONG>                 <STRONG>%+x</STRONG>       concept
149      <STRONG>%i</STRONG>                          <STRONG>%i</STRONG>q       ANSI standard, vt100
150      <STRONG>%p1%?%'x'%&gt;%t%p1%'y'%+%;</STRONG>    <STRONG>%&gt;xy</STRONG>      concept
151      <STRONG>%p2</STRONG> is printed before <STRONG>%p1</STRONG>   <STRONG>%r</STRONG>        hp
152
153    <STRONG>Use=</STRONG> <STRONG>Option</STRONG> <STRONG>[-u]</STRONG>
154        The  <STRONG>-u</STRONG>  option  produces a <STRONG>terminfo</STRONG> source description of
155        the first terminal <EM>termname</EM> which is relative to  the  sum
156        of  the  descriptions  given  by the entries for the other
157        terminals  <EM>termnames</EM>.   It  does  this  by  analyzing  the
158        differences  between  the  first  <EM>termname</EM>  and  the other
159        <EM>termnames</EM> and producing a description with <STRONG>use=</STRONG> fields for
160        the  other  terminals.   In this manner, it is possible to
161        retrofit  generic  terminfo  entries  into  a   terminal's
162        description.  Or, if two similar terminals exist, but were
163        coded at different times or by different  people  so  that
164        each description is a full description, using <STRONG>infocmp</STRONG> will
165        show what can be done to change one description to be rel-
166        ative to the other.
167
168        A capability will get printed with an at-sign (@) if it no
169        longer exists in the first <EM>termname</EM>, but one of the  other
170        <EM>termname</EM>  entries contains a value for it.  A capability's
171        value gets printed if the value in the first  <EM>termname</EM>  is
172        not  found in any of the other <EM>termname</EM> entries, or if the
173        first of the other <EM>termname</EM> entries that has this capabil-
174        ity  gives  a different value for the capability than that
175        in the first <EM>termname</EM>.
176
177        The order of the other <EM>termname</EM>  entries  is  significant.
178        Since  the terminfo compiler <STRONG>tic</STRONG> does a left-to-right scan
179        of the capabilities, specifying two <STRONG>use=</STRONG> entries that con-
180        tain differing entries for the same capabilities will pro-
181        duce different results depending on  the  order  that  the
182        entries  are  given in.  <STRONG>infocmp</STRONG> will flag any such incon-
183        sistencies between the other <EM>termname</EM> entries as they  are
184        found.
185
186        Alternatively,  specifying a capability <EM>after</EM> a <STRONG>use=</STRONG> entry
187        that contains that capability will cause the second speci-
188        fication  to  be  ignored.   Using  <STRONG>infocmp</STRONG>  to recreate a
189        description can be a useful check to make sure that every-
190        thing  was  specified  correctly  in  the  original source
191        description.
192
193        Another error  that  does  not  cause  incorrect  compiled
194        files,  but will slow down the compilation time, is speci-
195        fying extra <STRONG>use=</STRONG> fields  that  are  superfluous.   <STRONG>infocmp</STRONG>
196        will  flag  any  other  <EM>termname</EM> <EM>use=</EM> fields that were not
197        needed.
198
199    <STRONG>Changing</STRONG> <STRONG>Databases</STRONG> <STRONG>[-A</STRONG> <EM>directory</EM>] [-B <EM>directory</EM>]
200        The location of the compiled <STRONG>terminfo</STRONG>  database  is  taken
201        from  the environment variable <STRONG>TERMINFO</STRONG> .  If the variable
202        is not defined, or the terminal is not found in that loca-
203        tion,  the  system  <STRONG>terminfo</STRONG>  database, in <STRONG>/usr/share/ter-</STRONG>
204        <STRONG>minfo</STRONG>, will be used.  The options <STRONG>-A</STRONG> and <STRONG>-B</STRONG> may be used to
205        override  this  location.  The <STRONG>-A</STRONG> option will set <STRONG>TERMINFO</STRONG>
206        for the first <EM>termname</EM> and the <STRONG>-B</STRONG> option will set <STRONG>TERMINFO</STRONG>
207        for  the  other  <EM>termnames</EM>.   With this, it is possible to
208        compare descriptions for a terminal  with  the  same  name
209        located  in  two  different databases.  This is useful for
210        comparing descriptions for the same  terminal  created  by
211        different people.
212
213    <STRONG>Other</STRONG> <STRONG>Options</STRONG>
214        <STRONG>-1</STRONG>   causes  the  fields  to be printed out one to a line.
215             Otherwise, the fields will be printed  several  to  a
216             line to a maximum width of 60 characters.
217
218        <STRONG>-a</STRONG>   tells  <STRONG>infocmp</STRONG>  to  retain commented-out capabilities
219             rather than discarding them.  Capabilities  are  com-
220             mented by prefixing them with a period.
221
222        <STRONG>-E</STRONG>   Dump  the  capabilities  of  the  given  terminal  as
223             tables, needed in the C initializer  for  a  TERMTYPE
224             structure  (the  terminal capability structure in the
225             <STRONG>&lt;term.h&gt;</STRONG>).  This option is useful for preparing  ver-
226             sions  of  the  curses  library hardwired for a given
227             terminal type.  The tables are all  declared  static,
228             and  are  named according to the type and the name of
229             the corresponding terminal entry.
230
231             Before ncurses 5.0, the split between the <STRONG>-e</STRONG>  and  <STRONG>-E</STRONG>
232             options  was  not  needed;  but  support for extended
233             names required making the arrays of terminal capabil-
234             ities separate from the TERMTYPE structure.
235
236        <STRONG>-e</STRONG>   Dump  the  capabilities  of the given terminal as a C
237             initializer for a TERMTYPE  structure  (the  terminal
238             capability  structure  in the <STRONG>&lt;term.h&gt;</STRONG>).  This option
239             is  useful  for  preparing  versions  of  the  curses
240             library hardwired for a given terminal type.
241
242        <STRONG>-F</STRONG>   compare  terminfo  files.  This assumes that two fol-
243             lowing  arguments  are  filenames.   The  files   are
244             searched  for  pairwise matches between entries, with
245             two entries considered to match if any of their names
246             do.   The  report  printed  to  standard output lists
247             entries with  no  matches  in  the  other  file,  and
248             entries  with  more than one match.  For entries with
249             exactly one match it includes  a  difference  report.
250             Normally,  to  reduce  the  volume of the report, use
251             references are not resolved before looking  for  dif-
252             ferences, but resolution can be forced by also speci-
253             fying <STRONG>-r</STRONG>.
254
255        <STRONG>-f</STRONG>   Display  complex  terminfo  strings   which   contain
256             if/then/else/endif expressions indented for readabil-
257             ity.
258
259        <STRONG>-G</STRONG>   Display constant literals in decimal form rather than
260             their character equivalents.
261
262        <STRONG>-g</STRONG>   Display  constant  character  literals in quoted form
263             rather than their decimal equivalents.
264
265        <STRONG>-i</STRONG>   Analyze the initialization (<STRONG>is1</STRONG>, <STRONG>is2</STRONG>, <STRONG>is3</STRONG>), and reset
266             (<STRONG>rs1</STRONG>,  <STRONG>rs2</STRONG>,  <STRONG>rs3</STRONG>),  strings  in  the entry.  For each
267             string, the code tries to analyze it into actions  in
268             terms of the other capabilities in the entry, certain
269             X3.64/ISO 6429/ECMA-48 capabilities, and certain  DEC
270             VT-series  private  modes (the set of recognized spe-
271             cial sequences has  been  selected  for  completeness
272             over  the  existing  terminfo database).  Each report
273             line consists of the capability name, followed  by  a
274             colon and space, followed by a printable expansion of
275             the capability string with sections  matching  recog-
276             nized  actions  translated into {}-bracketed descrip-
277             tions.  Here  is  a  list  of  the  DEC/ANSI  special
278             sequences recognized:
279
280                   Action        Meaning
281                   -----------------------------------------
282                   RIS           full reset
283                   SC            save cursor
284                   RC            restore cursor
285                   LL            home-down
286                   RSR           reset scroll region
287
288                   ISO DEC G0    enable DEC graphics for G0
289                   ISO UK G0     enable UK chars for G0
290                   ISO US G0     enable US chars for G0
291                   ISO DEC G1    enable DEC graphics for G1
292                   ISO UK G1     enable UK chars for G1
293                   ISO US G1     enable US chars for G1
294
295                   DECPAM        application keypad mode
296                   DECPNM        normal keypad mode
297                   DECANSI       enter ANSI mode
298
299                   DEC[+-]CKM    application cursor keys
300                   DEC[+-]ANM    set VT52 mode
301                   DEC[+-]COLM   132-column mode
302                   DEC[+-]SCLM   smooth scroll
303                   DEC[+-]SCNM   reverse video mode
304                   DEC[+-]OM     origin mode
305                   DEC[+-]AWM    wraparound mode
306                   DEC[+-]ARM    auto-repeat mode
307
308             It  also  recognizes  a  SGR  action corresponding to
309             ANSI/ISO 6429/ECMA Set Graphics Rendition,  with  the
310             values  NORMAL,  BOLD, UNDERLINE, BLINK, and REVERSE.
311             All but NORMAL may be prefixed with `+' (turn on)  or
312             `-' (turn off).
313
314             An   SGR0  designates  an  empty  highlight  sequence
315             (equivalent to {SGR:NORMAL}).
316        -
317        l    Set output format to terminfo.
318
319        <STRONG>-p</STRONG>   Ignore padding specifications when comparing strings.
320
321        <STRONG>-q</STRONG>   Make  the comparison listing shorter by omitting sub-
322             headings, and using "-" for absent capabilities,  "@"
323             for canceled rather than "NULL".
324
325        <STRONG>-R</STRONG><EM>subset</EM>
326             Restrict  output  to  a given subset.  This option is
327             for use with archaic versions of terminfo like  those
328             on  SVr1,  Ultrix,  or  HP/UX that do not support the
329             full set of SVR4/XSI Curses  terminfo;  and  variants
330             such as AIX that have their own extensions incompati-
331             ble with SVr4/XSI.  Available  terminfo  subsets  are
332             "SVr1",  "Ultrix",  "HP",  and "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
333             for details.  You can also choose  the  subset  "BSD"
334             which  selects only capabilities with termcap equiva-
335             lents recognized by 4.4BSD.
336
337        <STRONG>-s</STRONG> <EM>[d|i|l|c]</EM>
338             The <STRONG>-s</STRONG> option  sorts  the  fields  within  each  type
339             according to the argument below:
340
341             <STRONG>d</STRONG>    leave  fields  in the order that they are stored
342                  in the <EM>terminfo</EM> database.
343
344             <STRONG>i</STRONG>    sort by <EM>terminfo</EM> name.
345
346             <STRONG>l</STRONG>    sort by the long C variable name.
347
348             <STRONG>c</STRONG>    sort by the <EM>termcap</EM> name.
349
350             If the <STRONG>-s</STRONG> option is not given, the fields printed out
351             will  be  sorted  alphabetically by the <STRONG>terminfo</STRONG> name
352             within each type, except in the case of the <STRONG>-C</STRONG> or the
353             <STRONG>-L</STRONG> options, which cause the sorting to be done by the
354             <STRONG>termcap</STRONG> name or the long  C  variable  name,  respec-
355             tively.
356
357        <STRONG>-T</STRONG>   eliminates  size-restrictions  on the generated text.
358             This is mainly useful for testing and analysis, since
359             the compiled descriptions are limited (e.g., 1023 for
360             termcap, 4096 for terminfo).
361
362        <STRONG>-t</STRONG>   tells  <STRONG>tic</STRONG>  to  discard  commented-out  capabilities.
363             Normally  when  translating from terminfo to termcap,
364             untranslatable capabilities are commented-out.
365
366        <STRONG>-V</STRONG>   reports the version of ncurses which was used in this
367             program, and exits.
368
369        <STRONG>-v</STRONG> <EM>n</EM> prints  out  tracing information on standard error as
370             the program runs.  Higher values of n induce  greater
371             verbosity.
372
373        <STRONG>-w</STRONG> <EM>width</EM>
374             changes the output to <EM>width</EM> characters.
375
376
377 </PRE>
378 <H2>FILES</H2><PRE>
379        /usr/share/terminfo Compiled      terminal     description
380                            database.
381
382
383 </PRE>
384 <H2>EXTENSIONS</H2><PRE>
385        The <STRONG>-E</STRONG>, <STRONG>-F</STRONG>, <STRONG>-G</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-i</STRONG>, <STRONG>-l</STRONG>, <STRONG>-p</STRONG>, <STRONG>-q</STRONG>
386        and <STRONG>-t</STRONG> options are not supported in SVr4 curses.
387
388        The <STRONG>-r</STRONG> option's notion of `termcap' capabilities is System
389        V Release 4's.  Actual BSD curses  versions  will  have  a
390        more  restricted  set.  To see only the 4.4BSD set, use -r
391        -RBSD.
392
393
394 </PRE>
395 <H2>BUGS</H2><PRE>
396        The -F option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> should be a <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG> mode.
397
398
399 </PRE>
400 <H2>SEE ALSO</H2><PRE>
401        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,    <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,
402        <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
403
404
405 </PRE>
406 <H2>AUTHOR</H2><PRE>
407        Eric S. Raymond &lt;esr@snark.thyrsus.com&gt; and
408        Thomas E. Dickey &lt;dickey@herndon4.his.com&gt;
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440 </PRE>
441 <HR>
442 <ADDRESS>
443 Man(1) output converted with
444 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
445 </ADDRESS>
446 </BODY>
447 </HTML>