Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | '\" t |
| 2 | .\"*************************************************************************** |
| 3 | .\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * |
| 4 | .\" * |
| 5 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 6 | .\" copy of this software and associated documentation files (the * |
| 7 | .\" "Software"), to deal in the Software without restriction, including * |
| 8 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 9 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 10 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 11 | .\" furnished to do so, subject to the following conditions: * |
| 12 | .\" * |
| 13 | .\" The above copyright notice and this permission notice shall be included * |
| 14 | .\" in all copies or substantial portions of the Software. * |
| 15 | .\" * |
| 16 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 17 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 18 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 19 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 20 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 21 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 22 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 23 | .\" * |
| 24 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 25 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 26 | .\" sale, use or other dealings in this Software without prior written * |
| 27 | .\" authorization. * |
| 28 | .\"*************************************************************************** |
| 29 | .\" |
| 30 | .\" $Id: infocmp.1m,v 1.44 2006/12/24 18:16:31 tom Exp $ |
| 31 | .TH @INFOCMP@ 1M "" |
| 32 | .ds n 5 |
| 33 | .ds d @TERMINFO@ |
| 34 | .SH NAME |
| 35 | \fB@INFOCMP@\fR - compare or print out \fIterminfo\fR descriptions |
| 36 | .SH SYNOPSIS |
| 37 | \fB@INFOCMP@\fR [\fB-\ |
| 38 | 1\ |
| 39 | C\ |
| 40 | E\ |
| 41 | F\ |
| 42 | G\ |
| 43 | I\ |
| 44 | L\ |
| 45 | T\ |
| 46 | U\ |
| 47 | V\ |
| 48 | c\ |
| 49 | d\ |
| 50 | e\ |
| 51 | g\ |
| 52 | i\ |
| 53 | l\ |
| 54 | n\ |
| 55 | p\ |
| 56 | q\ |
| 57 | r\ |
| 58 | t\ |
| 59 | u\ |
| 60 | x\ |
| 61 | \fR] |
| 62 | .br |
| 63 | [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB-R \fR\fBsubset\fR] |
| 64 | .br |
| 65 | [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR] |
| 66 | .br |
| 67 | [\fItermname\fR...] |
| 68 | .SH DESCRIPTION |
| 69 | \fB@INFOCMP@\fR can be used to compare a binary \fBterminfo\fR entry with other |
| 70 | terminfo entries, rewrite a \fBterminfo\fR description to take advantage of the |
| 71 | \fBuse=\fR terminfo field, or print out a \fBterminfo\fR description from the |
| 72 | binary file (\fBterm\fR) in a variety of formats. In all cases, the boolean |
| 73 | fields will be printed first, followed by the numeric fields, followed by the |
| 74 | string fields. |
| 75 | .SS Default Options |
| 76 | If no options are specified and zero or one \fItermnames\fR are specified, the |
| 77 | \fB-I\fR option will be assumed. If more than one \fItermname\fR is specified, |
| 78 | the \fB-d\fR option will be assumed. |
| 79 | .SS Comparison Options [-d] [-c] [-n] |
| 80 | \fB@INFOCMP@\fR compares the \fBterminfo\fR description of the first terminal |
| 81 | \fItermname\fR with each of the descriptions given by the entries for the other |
| 82 | terminal's \fItermnames\fR. If a capability is defined for only one of the |
| 83 | terminals, the value returned will depend on the type of the capability: |
| 84 | \fBF\fR for boolean variables, \fB-1\fR for integer variables, and \fBNULL\fR |
| 85 | for string variables. |
| 86 | .PP |
| 87 | The \fB-d\fR option produces a list of each capability that is different |
| 88 | between two entries. This option is useful to show the difference between two |
| 89 | entries, created by different people, for the same or similar terminals. |
| 90 | .PP |
| 91 | The \fB-c\fR option produces a list of each capability that is common between |
| 92 | two entries. Capabilities that are not set are ignored. This option can be |
| 93 | used as a quick check to see if the \fB-u\fR option is worth using. |
| 94 | .PP |
| 95 | The \fB-n\fR option produces a list of each capability that is in neither |
| 96 | entry. If no \fItermnames\fR are given, the environment variable \fBTERM\fR |
| 97 | will be used for both of the \fItermnames\fR. This can be used as a quick |
| 98 | check to see if anything was left out of a description. |
| 99 | .SS Source Listing Options [-I] [-L] [-C] [-r] |
| 100 | The \fB-I\fR, \fB-L\fR, and \fB-C\fR options will produce a source listing for |
| 101 | each terminal named. |
| 102 | . |
| 103 | .TS |
| 104 | center tab(/) ; |
| 105 | l l . |
| 106 | \fB-I\fR/use the \fBterminfo\fR names |
| 107 | \fB-L\fR/use the long C variable name listed in <\fBterm.h\fR> |
| 108 | \fB-C\fR/use the \fBtermcap\fR names |
| 109 | \fB-r\fR/when using \fB-C\fR, put out all capabilities in \fBtermcap\fR form |
| 110 | .TE |
| 111 | .PP |
| 112 | If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be |
| 113 | used for the terminal name. |
| 114 | .PP |
| 115 | The source produced by the \fB-C\fR option may be used directly as a |
| 116 | \fBtermcap\fR entry, but not all parameterized strings can be changed to |
| 117 | the \fBtermcap\fR format. \fB@INFOCMP@\fR will attempt to convert most of the |
| 118 | parameterized information, and anything not converted will be plainly marked in |
| 119 | the output and commented out. These should be edited by hand. |
| 120 | .PP |
| 121 | All padding information for strings will be collected together and placed |
| 122 | at the beginning of the string where \fBtermcap\fR expects it. Mandatory |
| 123 | padding (padding information with a trailing '/') will become optional. |
| 124 | .PP |
| 125 | All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which |
| 126 | are derivable from other \fBterminfo\fR variables, will be output. Not all |
| 127 | \fBterminfo\fR capabilities will be translated; only those variables which were |
| 128 | part of \fBtermcap\fR will normally be output. Specifying the \fB-r\fR option |
| 129 | will take off this restriction, allowing all capabilities to be output in |
| 130 | \fItermcap\fR form. |
| 131 | .PP |
| 132 | Note that because padding is collected to the beginning of the capability, not |
| 133 | all capabilities are output. Mandatory padding is not supported. Because |
| 134 | \fBtermcap\fR strings are not as flexible, it is not always possible to convert |
| 135 | a \fBterminfo\fR string capability into an equivalent \fBtermcap\fR format. A |
| 136 | subsequent conversion of the \fBtermcap\fR file back into \fBterminfo\fR format |
| 137 | will not necessarily reproduce the original \fBterminfo\fR |
| 138 | source. |
| 139 | .PP |
| 140 | Some common \fBterminfo\fR parameter sequences, their \fBtermcap\fR |
| 141 | equivalents, and some terminal types which commonly have such sequences, are: |
| 142 | . |
| 143 | .TS |
| 144 | center tab(/) ; |
| 145 | l c l |
| 146 | l l l. |
| 147 | \fBterminfo/termcap\fR/Representative Terminals |
| 148 | = |
| 149 | \fB%p1%c/%.\fR/adm |
| 150 | \fB%p1%d/%d\fR/hp, ANSI standard, vt100 |
| 151 | \fB%p1%'x'%+%c/%+x\fR/concept |
| 152 | \fB%i/%i\fRq/ANSI standard, vt100 |
| 153 | \fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept |
| 154 | \fB%p2\fR is printed before \fB%p1/%r\fR/hp |
| 155 | .TE |
| 156 | .SS Use= Option [-u] |
| 157 | The \fB-u\fR option produces a \fBterminfo\fR source description of the first |
| 158 | terminal \fItermname\fR which is relative to the sum of the descriptions given |
| 159 | by the entries for the other terminals \fItermnames\fR. It does this by |
| 160 | analyzing the differences between the first \fItermname\fR and the other |
| 161 | \fItermnames\fR and producing a description with \fBuse=\fR fields for the |
| 162 | other terminals. In this manner, it is possible to retrofit generic terminfo |
| 163 | entries into a terminal's description. Or, if two similar terminals exist, but |
| 164 | were coded at different times or by different people so that each description |
| 165 | is a full description, using \fB@INFOCMP@\fR will show what can be done to change |
| 166 | one description to be relative to the other. |
| 167 | .PP |
| 168 | A capability will get printed with an at-sign (@) if it no longer exists in the |
| 169 | first \fItermname\fR, but one of the other \fItermname\fR entries contains a |
| 170 | value for it. A capability's value gets printed if the value in the first |
| 171 | \fItermname\fR is not found in any of the other \fItermname\fR entries, or if |
| 172 | the first of the other \fItermname\fR entries that has this capability gives a |
| 173 | different value for the capability than that in the first \fItermname\fR. |
| 174 | .PP |
| 175 | The order of the other \fItermname\fR entries is significant. Since the |
| 176 | terminfo compiler \fBtic\fR does a left-to-right scan of the capabilities, |
| 177 | specifying two \fBuse=\fR entries that contain differing entries for the same |
| 178 | capabilities will produce different results depending on the order that the |
| 179 | entries are given in. \fB@INFOCMP@\fR will flag any such inconsistencies between |
| 180 | the other \fItermname\fR entries as they are found. |
| 181 | .PP |
| 182 | Alternatively, specifying a capability \fIafter\fR a \fBuse=\fR entry that |
| 183 | contains that capability will cause the second specification to be ignored. |
| 184 | Using \fB@INFOCMP@\fR to recreate a description can be a useful check to make |
| 185 | sure that everything was specified correctly in the original source |
| 186 | description. |
| 187 | .PP |
| 188 | Another error that does not cause incorrect compiled files, but will slow down |
| 189 | the compilation time, is specifying extra \fBuse=\fR fields that are |
| 190 | superfluous. \fB@INFOCMP@\fR will flag any other \fItermname use=\fR fields that |
| 191 | were not needed. |
| 192 | .SS Changing Databases [-A \fIdirectory\fR] [-B \fIdirectory\fR] |
| 193 | The location of the compiled \fBterminfo\fR database is taken from the |
| 194 | environment variable \fBTERMINFO\fR . If the variable is not defined, or the |
| 195 | terminal is not found in that location, the system \fBterminfo\fR database, |
| 196 | in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR |
| 197 | and \fB-B\fR may be used to override this location. The \fB-A\fR option will |
| 198 | set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will |
| 199 | set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to |
| 200 | compare descriptions for a terminal with the same name located in two different |
| 201 | databases. This is useful for comparing descriptions for the same terminal |
| 202 | created by different people. |
| 203 | .SS Other Options |
| 204 | .TP 5 |
| 205 | \fB-1\fR |
| 206 | causes the fields to be printed out one to a line. Otherwise, |
| 207 | the fields will be printed several to a line to a maximum width |
| 208 | of 60 characters. |
| 209 | .TP |
| 210 | \fB-a\fR |
| 211 | tells \fB@INFOCMP@\fP to retain commented-out capabilities rather than discarding |
| 212 | them. Capabilities are commented by prefixing them with a period. |
| 213 | .TP 5 |
| 214 | \fB-E\fR |
| 215 | Dump the capabilities of the given terminal as tables, needed in |
| 216 | the C initializer for a |
| 217 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR). |
| 218 | This option is useful for preparing versions of the curses library hardwired |
| 219 | for a given terminal type. |
| 220 | The tables are all declared static, and are named according to the type |
| 221 | and the name of the corresponding terminal entry. |
| 222 | .sp |
| 223 | Before ncurses 5.0, the split between the \fB-e\fP and \fB-E\fP |
| 224 | options was not needed; but support for extended names required making |
| 225 | the arrays of terminal capabilities separate from the TERMTYPE structure. |
| 226 | .TP 5 |
| 227 | \fB-e\fR |
| 228 | Dump the capabilities of the given terminal as a C initializer for a |
| 229 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR). |
| 230 | This option is useful for preparing versions of the curses library hardwired |
| 231 | for a given terminal type. |
| 232 | .TP 5 |
| 233 | \fB-F\fR |
| 234 | compare terminfo files. This assumes that two following arguments are |
| 235 | filenames. The files are searched for pairwise matches between |
| 236 | entries, with two entries considered to match if any of their names do. |
| 237 | The report printed to standard output lists entries with no matches in |
| 238 | the other file, and entries with more than one match. For entries |
| 239 | with exactly one match it includes a difference report. Normally, |
| 240 | to reduce the volume of the report, use references are |
| 241 | not resolved before looking for differences, but resolution can be forced |
| 242 | by also specifying \fB-r\fR. |
| 243 | .TP 5 |
| 244 | \fB-f\fR |
| 245 | Display complex terminfo strings which contain if/then/else/endif expressions |
| 246 | indented for readability. |
| 247 | .TP 5 |
| 248 | \fB-G\fR |
| 249 | Display constant literals in decimal form |
| 250 | rather than their character equivalents. |
| 251 | .TP 5 |
| 252 | \fB-g\fR |
| 253 | Display constant character literals in quoted form |
| 254 | rather than their decimal equivalents. |
| 255 | .TP 5 |
| 256 | \fB-i\fR |
| 257 | Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset |
| 258 | (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry. For each string, the |
| 259 | code tries to analyze it into actions in terms of the other capabilities in the |
| 260 | entry, certain X3.64/ISO 6429/ECMA-48 capabilities, and certain DEC VT-series |
| 261 | private modes (the set of recognized special sequences has been selected for |
| 262 | completeness over the existing terminfo database). Each report line consists |
| 263 | of the capability name, followed by a colon and space, followed by a printable |
| 264 | expansion of the capability string with sections matching recognized actions |
| 265 | translated into {}-bracketed descriptions. Here is a list of the DEC/ANSI |
| 266 | special sequences recognized: |
| 267 | i. |
| 268 | .TS |
| 269 | center tab(/) ; |
| 270 | l l |
| 271 | l l. |
| 272 | Action/Meaning |
| 273 | = |
| 274 | RIS/full reset |
| 275 | SC/save cursor |
| 276 | RC/restore cursor |
| 277 | LL/home-down |
| 278 | RSR/reset scroll region |
| 279 | = |
| 280 | DECSTR/soft reset (VT320) |
| 281 | S7C1T/7-bit controls (VT220) |
| 282 | = |
| 283 | ISO DEC G0/enable DEC graphics for G0 |
| 284 | ISO UK G0/enable UK chars for G0 |
| 285 | ISO US G0/enable US chars for G0 |
| 286 | ISO DEC G1/enable DEC graphics for G1 |
| 287 | ISO UK G1/enable UK chars for G1 |
| 288 | ISO US G1/enable US chars for G1 |
| 289 | = |
| 290 | DECPAM/application keypad mode |
| 291 | DECPNM/normal keypad mode |
| 292 | DECANSI/enter ANSI mode |
| 293 | = |
| 294 | ECMA[+-]AM/keyboard action mode |
| 295 | ECMA[+-]IRM/insert replace mode |
| 296 | ECMA[+-]SRM/send receive mode |
| 297 | ECMA[+-]LNM/linefeed 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 | .TE |
| 308 | .sp |
| 309 | It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set |
| 310 | Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and |
| 311 | REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `-' (turn off). |
| 312 | .PP |
| 313 | An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}). |
| 314 | .TP 5 |
| 315 | \fB-l\fR |
| 316 | Set output format to terminfo. |
| 317 | .TP 5 |
| 318 | \fB-p\fR |
| 319 | Ignore padding specifications when comparing strings. |
| 320 | .TP 5 |
| 321 | \fB-q\fR |
| 322 | Make the comparison listing shorter by omitting subheadings, and using |
| 323 | "-" for absent capabilities, "@" for canceled rather than "NULL". |
| 324 | .TP 5 |
| 325 | \fB-R\fR\fIsubset\fR |
| 326 | Restrict output to a given subset. This option is for use with archaic |
| 327 | versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support |
| 328 | the full set of SVR4/XSI Curses terminfo; and variants such as AIX |
| 329 | that have their own extensions incompatible with SVr4/XSI. Available terminfo |
| 330 | subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for |
| 331 | details. You can also choose the subset "BSD" which selects only capabilities |
| 332 | with termcap equivalents recognized by 4.4BSD. |
| 333 | .TP |
| 334 | \fB-s \fR\fI[d|i|l|c]\fR |
| 335 | The \fB-s\fR option sorts the fields within each type according to the argument |
| 336 | below: |
| 337 | .br |
| 338 | .RS 5 |
| 339 | .TP 5 |
| 340 | \fBd\fR |
| 341 | leave fields in the order that they are stored in the \fIterminfo\fR database. |
| 342 | .TP 5 |
| 343 | \fBi\fR |
| 344 | sort by \fIterminfo\fR name. |
| 345 | .TP 5 |
| 346 | \fBl\fR |
| 347 | sort by the long C variable name. |
| 348 | .TP 5 |
| 349 | \fBc\fR |
| 350 | sort by the \fItermcap\fR name. |
| 351 | .RE |
| 352 | .IP |
| 353 | If the \fB-s\fR option is not given, the fields printed out will be |
| 354 | sorted alphabetically by the \fBterminfo\fR name within each type, |
| 355 | except in the case of the \fB-C\fR or the \fB-L\fR options, which cause the |
| 356 | sorting to be done by the \fBtermcap\fR name or the long C variable |
| 357 | name, respectively. |
| 358 | .TP 5 |
| 359 | \fB-T\fR |
| 360 | eliminates size-restrictions on the generated text. |
| 361 | This is mainly useful for testing and analysis, since the compiled |
| 362 | descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). |
| 363 | .TP |
| 364 | \fB-t\fR |
| 365 | tells \fBtic\fP to discard commented-out capabilities. |
| 366 | Normally when translating from terminfo to termcap, |
| 367 | untranslatable capabilities are commented-out. |
| 368 | .TP 5 |
| 369 | \fB-U\fR |
| 370 | tells \fB@INFOCMP@\fP to not post-process the data after parsing the source file. |
| 371 | This feature helps when comparing the actual contents of two source files, |
| 372 | since it excludes the inferences that \fB@INFOCMP@\fP makes to fill in missing |
| 373 | data. |
| 374 | .TP 5 |
| 375 | \fB-V\fR |
| 376 | reports the version of ncurses which was used in this program, and exits. |
| 377 | .TP 5 |
| 378 | \fB-v\fR \fIn\fR |
| 379 | prints out tracing information on standard error as the program runs. |
| 380 | Higher values of n induce greater verbosity. |
| 381 | .TP 5 |
| 382 | \fB-w\fR \fIwidth\fR |
| 383 | changes the output to \fIwidth\fR characters. |
| 384 | .TP |
| 385 | \fB-x\fR |
| 386 | print information for user-defined capabilities. |
| 387 | These are extensions to the terminfo repertoire which can be loaded |
| 388 | using the \fB-x\fR option of \fBtic\fP. |
| 389 | .SH FILES |
| 390 | .TP 20 |
| 391 | \*d |
| 392 | Compiled terminal description database. |
| 393 | .SH EXTENSIONS |
| 394 | The |
| 395 | \fB-E\fR, |
| 396 | \fB-F\fR, |
| 397 | \fB-G\fR, |
| 398 | \fB-R\fR, |
| 399 | \fB-T\fR, |
| 400 | \fB-V\fR, |
| 401 | \fB-a\fR, |
| 402 | \fB-e\fR, |
| 403 | \fB-f\fR, |
| 404 | \fB-g\fR, |
| 405 | \fB-i\fR, |
| 406 | \fB-l\fR, |
| 407 | \fB-p\fR, |
| 408 | \fB-q\fR and |
| 409 | \fB-t\fR |
| 410 | options are not supported in SVr4 curses. |
| 411 | .PP |
| 412 | The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's. |
| 413 | Actual BSD curses versions will have a more restricted set. To see only the |
| 414 | 4.4BSD set, use \fB-r\fR \fB-RBSD\fR. |
| 415 | .SH BUGS |
| 416 | The \fB-F\fR option of \fB@INFOCMP@\fR(1M) should be a \fB@TOE@\fR(1M) mode. |
| 417 | .SH SEE ALSO |
| 418 | \fB@CAPTOINFO@\fR(1M), |
| 419 | \fB@INFOTOCAP@\fR(1M), |
| 420 | \fB@TIC@\fR(1M), |
| 421 | \fB@TOE@\fR(1M), |
| 422 | \fBcurses\fR(3X), |
| 423 | \fBterminfo\fR(\*n). |
| 424 | .PP |
| 425 | This describes \fBncurses\fR |
| 426 | version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). |
| 427 | .SH AUTHOR |
| 428 | Eric S. Raymond <esr@snark.thyrsus.com> |
| 429 | and |
| 430 | .br |
| 431 | Thomas E. Dickey <dickey@invisible-island.net> |
| 432 | .\"# |
| 433 | .\"# The following sets edit modes for GNU EMACS |
| 434 | .\"# Local Variables: |
| 435 | .\"# mode:nroff |
| 436 | .\"# fill-column:79 |
| 437 | .\"# End: |