Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | '\" t |
| 2 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 3 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 4 | .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 5 | .\" * |
| 6 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 7 | .\" copy of this software and associated documentation files (the * |
| 8 | .\" "Software"), to deal in the Software without restriction, including * |
| 9 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 10 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 11 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 12 | .\" furnished to do so, subject to the following conditions: * |
| 13 | .\" * |
| 14 | .\" The above copyright notice and this permission notice shall be included * |
| 15 | .\" in all copies or substantial portions of the Software. * |
| 16 | .\" * |
| 17 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 18 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 19 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 20 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 21 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 22 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 23 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 24 | .\" * |
| 25 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 26 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 27 | .\" sale, use or other dealings in this Software without prior written * |
| 28 | .\" authorization. * |
| 29 | .\"*************************************************************************** |
| 30 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 31 | .\" $Id: infocmp.1m,v 1.109 2024/03/16 15:35:01 tom Exp $ |
| 32 | .TH @INFOCMP@ 1M 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" |
| 33 | .ie \n(.g \{\ |
| 34 | .ds `` \(lq |
| 35 | .ds '' \(rq |
| 36 | .ds ' \(aq |
| 37 | .\} |
| 38 | .el \{\ |
| 39 | .ie t .ds `` `` |
| 40 | .el .ds `` "" |
| 41 | .ie t .ds '' '' |
| 42 | .el .ds '' "" |
| 43 | .ie t .ds ' \(aq |
| 44 | .el .ds ' ' |
| 45 | .\} |
| 46 | . |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 47 | .de bP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 48 | .ie n .IP \(bu 4 |
| 49 | .el .IP \(bu 2 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 50 | .. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 51 | . |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 52 | .ds d @TERMINFO@ |
| 53 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 54 | \fB@INFOCMP@\fP \- |
| 55 | compare or print out \fIterminfo\fP descriptions |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 56 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 57 | \fB@INFOCMP@\fP [\fB\-\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 58 | 1\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 59 | c\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 60 | C\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 61 | d\ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 62 | D\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 63 | e\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 64 | E\ |
| 65 | F\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 66 | g\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 67 | G\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 68 | i\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 69 | I\ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 70 | K\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 71 | l\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 72 | L\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 73 | n\ |
| 74 | p\ |
| 75 | q\ |
| 76 | r\ |
| 77 | t\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 78 | T\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 79 | u\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 80 | U\ |
| 81 | V\ |
| 82 | W\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 83 | x\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 84 | \fP] |
| 85 | [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-Q\fR \fIn\fR] [\fB\-R \fBsubset\fR] |
| 86 | [\fB\-w\fP\ \fIwidth\fP] [\fB\-A\fP\ \fIdirectory\fP] [\fB\-B\fP\ \fIdirectory\fP] |
| 87 | [\fIterminal-type\fP ...] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 88 | .SH DESCRIPTION |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 89 | \fB@INFOCMP@\fP can be used to compare a binary \fBterminfo\fP entry with other |
| 90 | terminfo entries, rewrite a \fBterminfo\fP description to take advantage of the |
| 91 | \fBuse=\fP terminfo field, or print out a \fBterminfo\fP description from the |
| 92 | binary file (\fBterm\fP) in a variety of formats. |
| 93 | In all cases, the Boolean |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 94 | fields will be printed first, followed by the numeric fields, followed by the |
| 95 | string fields. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 96 | .SS "Default Options" |
| 97 | If no options are specified and zero or one \fIterminal-types\fP are |
| 98 | specified, |
| 99 | the |
| 100 | \fB\-I\fP option will be assumed. |
| 101 | If more than one \fIterminal-type\fP is specified, |
| 102 | the \fB\-d\fP option will be assumed. |
| 103 | .SS "Comparison Options [\-d] [\-c] [\-n]" |
| 104 | \fB@INFOCMP@\fP compares the \fBterminfo\fP description of the first terminal |
| 105 | \fIterminal-type\fP with each of the descriptions given by the entries |
| 106 | for the other terminal's \fIterminal-types\fP. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 107 | If a capability is defined for only one of the |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 108 | terminals, the value returned depends on the type of the capability: |
| 109 | .bP |
| 110 | \fBF\fP for missing Boolean variables |
| 111 | .bP |
| 112 | \fBNULL\fP for missing integer or string variables |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 113 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 114 | Use the \fB\-q\fP option to show the distinction between |
| 115 | \fIabsent\fP and \fIcancelled\fP capabilities. |
| 116 | .PP |
| 117 | These options produce a list which you can use to compare two |
| 118 | or more terminal descriptions: |
| 119 | .TP 5 |
| 120 | \fB\-d\fP |
| 121 | produces a list of each capability that is \fIdifferent\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 122 | between two entries. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 123 | Each item in the list shows \*(``:\*('' after the capability name, |
| 124 | followed by the capability values, separated by a comma. |
| 125 | .TP |
| 126 | \fB\-c\fP |
| 127 | produces a list of each capability that is \fIcommon\fP between |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 128 | two or more entries. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 129 | Missing capabilities are ignored. |
| 130 | Each item in the list shows \*(``=\*('' after the capability name, |
| 131 | followed by the capability value. |
| 132 | .IP |
| 133 | The \fB\-u\fP option provides a related output, |
| 134 | showing the first terminal description rewritten to use the second |
| 135 | as a building block via the \*(``use=\*('' clause. |
| 136 | .TP |
| 137 | \fB\-n\fP |
| 138 | produces a list of each capability that is in \fInone\fP of the given entries. |
| 139 | Each item in the list shows \*(``!\*('' before the capability name. |
| 140 | .IP |
| 141 | Normally only the conventional capabilities are shown. |
| 142 | Use the \fB\-x\fP option to add the BSD-compatibility |
| 143 | capabilities (names prefixed with \*(``OT\*(''). |
| 144 | .IP |
| 145 | If no \fIterminal-types\fP are given, |
| 146 | \fB@INFOCMP@\fP uses the environment variable \fITERM\fP |
| 147 | for each of the \fIterminal-types\fP. |
| 148 | .SS "Source Listing Options [\-I] [\-L] [\-C] [\-r]" |
| 149 | The \fB\-I\fP, \fB\-L\fP, and \fB\-C\fP options will produce |
| 150 | a source listing for each terminal named. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 151 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 152 | .TS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 153 | center; |
| 154 | Lb L. |
| 155 | \-I use \fIterminfo\fP capability codes |
| 156 | \-L use \*(``long\*('' capability names |
| 157 | \-C use \fItermcap\fP capability codes |
| 158 | \-r with \fB\-C\fP, include nonstandard capabilities |
| 159 | \-K with \fB\-C\fP, improve BSD compatibility |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 160 | .TE |
| 161 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 162 | If no \fIterminal-types\fP are given, |
| 163 | the environment variable \fITERM\fP will be used for the terminal name. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 164 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 165 | The source produced by the \fB\-C\fP option may be used directly as a |
| 166 | \fBtermcap\fP entry, but not all parameterized strings can be changed to |
| 167 | the \fBtermcap\fP format. |
| 168 | \fB@INFOCMP@\fP will attempt to convert most of the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 169 | parameterized information, and anything not converted will be plainly marked in |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 170 | the output and commented out. |
| 171 | These should be edited by hand. |
| 172 | .PP |
| 173 | For best results when converting to \fBtermcap\fP format, |
| 174 | you should use both \fB\-C\fP and \fB\-r\fP. |
| 175 | Normally a termcap description is limited to 1023 bytes. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 176 | \fB@INFOCMP@\fP trims away less essential parts to make it fit. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 177 | If you are converting to one of the (rare) termcap implementations |
| 178 | which accept an unlimited size of termcap, |
| 179 | you may want to add the \fB\-T\fP option. |
| 180 | More often however, you must help the termcap implementation, |
| 181 | and trim excess whitespace (use the \fB\-0\fP option for that). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 182 | .PP |
| 183 | All padding information for strings will be collected together and placed |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 184 | at the beginning of the string where \fBtermcap\fP expects it. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 185 | Mandatory |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 186 | padding (padding information with a trailing \*(``/\*('') will become optional. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 187 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 188 | All \fBtermcap\fP variables no longer supported by \fBterminfo\fP, but which |
| 189 | are derivable from other \fBterminfo\fP variables, will be output. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 190 | Not all |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 191 | \fBterminfo\fP capabilities will be translated; only those variables which were |
| 192 | part of \fBtermcap\fP will normally be output. |
| 193 | Specifying the \fB\-r\fP option |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 194 | will take off this restriction, allowing all capabilities to be output in |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 195 | \fItermcap\fP form. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 196 | Normally you would use both the \fB\-C\fP and \fB\-r\fP options. |
| 197 | The actual format used incorporates some improvements for escaped characters |
| 198 | from terminfo format. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 199 | For a stricter BSD-compatible translation, use the \fB\-K\fP option |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 200 | rather than \fB\-C\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 201 | .PP |
| 202 | Note that because padding is collected to the beginning of the capability, not |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 203 | all capabilities are output. |
| 204 | Mandatory padding is not supported. |
| 205 | Because |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 206 | \fBtermcap\fP strings are not as flexible, it is not always possible to convert |
| 207 | a \fBterminfo\fP string capability into an equivalent \fBtermcap\fP format. |
| 208 | A subsequent conversion of the \fBtermcap\fP file |
| 209 | back into \fBterminfo\fP format |
| 210 | will not necessarily reproduce the original \fBterminfo\fP source. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 211 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 212 | Some common \fBterminfo\fP parameter sequences, their \fBtermcap\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 213 | equivalents, and some terminal types which commonly have such sequences, are: |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 214 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 215 | .TS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 216 | center; |
| 217 | Lf(BI) Lf(BI) L |
| 218 | Lb Lb L. |
| 219 | terminfo termcap Terminal Types |
| 220 | _ |
| 221 | .\" ansi-m cup (adm3a has other stuff in between, more like concept) |
| 222 | %p1%c %. ansi\-m |
| 223 | .\" ansi cub, vt100 cub |
| 224 | %p1%d %d ansi, vt100 |
| 225 | .\" vt52 cup (via vt52-basic) |
| 226 | %p1%\*' \*'%+%c %+x vt52 |
| 227 | .\" ansi cup, vt100 cup |
| 228 | %i %iq ansi, vt100 |
| 229 | .\" annarbor4080 cup |
| 230 | %p1%?%\*'x\*'%>%t%p1%\*'y\*'%+%; %>xy annarbor4080 |
| 231 | .\" hpgeneric cup |
| 232 | %p2\fR\|.\|.\|.\|\fP%p1 %r hpgeneric |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 233 | .TE |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 234 | .SS "Use= Option [\-u]" |
| 235 | The \fB\-u\fP option produces a \fBterminfo\fP source description of the first |
| 236 | terminal \fIterminal-type\fP which is relative to the sum of the |
| 237 | descriptions given by the entries for the other \fIterminal-types\fP. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 238 | It does this by |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 239 | analyzing the differences between the first \fIterminal-types\fP and the |
| 240 | other \fIterminal-types\fP and producing a description with \fBuse=\fP |
| 241 | fields for the other terminals. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 242 | In this manner, it is possible to retrofit generic terminfo |
| 243 | entries into a terminal's description. |
| 244 | Or, if two similar terminals exist, but |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 245 | were coded at different times or by different people so that each description |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 246 | is a full description, using \fB@INFOCMP@\fP |
| 247 | will show what can be done to change |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 248 | one description to be relative to the other. |
| 249 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 250 | A capability will be printed with an at-sign (@) if it no longer exists in the |
| 251 | first \fIterminal-type\fP, |
| 252 | but one of the other \fIterminal-type\fP entries contains a value for |
| 253 | it. |
| 254 | A capability's value will be printed if the value in the first |
| 255 | \fIterminal-type\fP is not found in any of the other \fIterminal-type\fP |
| 256 | entries, |
| 257 | or if the first of the other \fIterminal-type\fP entries that has this |
| 258 | capability gives a different value for the capability than that in the |
| 259 | first \fIterminal-type\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 260 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 261 | The order of the other \fIterminal-type\fP entries is significant. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 262 | Since the |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 263 | terminfo compiler \fB@TIC@\fP does a left-to-right scan of the capabilities, |
| 264 | specifying two \fBuse=\fP entries that contain differing entries for the same |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 265 | capabilities will produce different results depending on the order that the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 266 | entries are given in. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 267 | \fB@INFOCMP@\fP will flag any such inconsistencies between |
| 268 | the other \fIterminal-type\fP entries as they are found. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 269 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 270 | Alternatively, specifying a capability \fIafter\fP a \fBuse=\fP entry that |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 271 | contains that capability will cause the second specification to be ignored. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 272 | Using \fB@INFOCMP@\fP to recreate a description can be a useful check to make |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 273 | sure that everything was specified correctly in the original source |
| 274 | description. |
| 275 | .PP |
| 276 | Another error that does not cause incorrect compiled files, but will slow down |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 277 | the compilation time, is specifying extra \fBuse=\fP fields that are |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 278 | superfluous. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 279 | \fB@INFOCMP@\fP will flag any other \fIterminal-type use=\fP fields that |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 280 | were not needed. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 281 | .SS "Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]" |
| 282 | Like other \fI\%ncurses\fP utilities, |
| 283 | \fB@INFOCMP@\fP looks for the terminal descriptions in several places. |
| 284 | You can use the \fI\%TERMINFO\fP and \fI\%TERMINFO_DIRS\fP environment |
| 285 | variables to override the compiled-in default list of places to search. |
| 286 | See \fBcurses\fP(3X), as well as |
| 287 | the \fIFetching Compiled Descriptions\fP section in \fBterminfo\fR(5). |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 288 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 289 | You can also use the options \fB\-A\fP |
| 290 | and \fB\-B\fP to override the list of places to search |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 291 | when comparing terminal descriptions: |
| 292 | .bP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 293 | The \fB\-A\fP option sets the location for the first \fIterminal-type\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 294 | .bP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 295 | The \fB\-B\fP option sets the location for the other |
| 296 | \fIterminal-types\fP. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 297 | .PP |
| 298 | Using these options, it is possible to |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 299 | compare descriptions for a terminal with the same name located in two different |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 300 | databases. |
| 301 | For instance, |
| 302 | you can use this feature for comparing descriptions for the same terminal |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 303 | created by different people. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 304 | .SS "Other Options" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 305 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 306 | \fB\-0\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 307 | causes the fields to be printed on one line, without wrapping. |
| 308 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 309 | \fB\-1\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 310 | causes the fields to be printed out one to a line. |
| 311 | Otherwise, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 312 | the fields will be printed several to a line to a maximum width |
| 313 | of 60 characters. |
| 314 | .TP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 315 | \fB\-a\fP |
| 316 | tells \fB@INFOCMP@\fP to retain commented-out capabilities |
| 317 | rather than discarding them. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 318 | Capabilities are commented by prefixing them with a period. |
| 319 | .TP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 320 | \fB\-D\fP |
| 321 | tells \fB@INFOCMP@\fP to print the database locations that it knows about, |
| 322 | and exit. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 323 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 324 | \fB\-E\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 325 | Dump the capabilities of the given terminal as tables, needed in |
| 326 | the C initializer for a |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 327 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fP). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 328 | This option is useful for preparing versions of the curses library hardwired |
| 329 | for a given terminal type. |
| 330 | The tables are all declared static, and are named according to the type |
| 331 | and the name of the corresponding terminal entry. |
| 332 | .sp |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 333 | Before \fI\%ncurses\fP 5.0, |
| 334 | the split between the \fB\-e\fP and \fB\-E\fP options was not needed; |
| 335 | but support for extended names required making the arrays of terminal |
| 336 | capabilities separate from the TERMTYPE structure. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 337 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 338 | \fB\-e\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 339 | Dump the capabilities of the given terminal as a C initializer for a |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 340 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fP). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 341 | This option is useful for preparing versions of the curses library hardwired |
| 342 | for a given terminal type. |
| 343 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 344 | \fB\-F\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 345 | compare terminfo files. |
| 346 | This assumes that two following arguments are filenames. |
| 347 | The files are searched for pairwise matches between |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 348 | entries, with two entries considered to match if any of their names do. |
| 349 | The report printed to standard output lists entries with no matches in |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 350 | the other file, and entries with more than one match. |
| 351 | For entries |
| 352 | with exactly one match it includes a difference report. |
| 353 | Normally, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 354 | to reduce the volume of the report, use references are |
| 355 | not resolved before looking for differences, but resolution can be forced |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 356 | by also specifying \fB\-r\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 357 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 358 | \fB\-f\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 359 | Display complex terminfo strings which contain if/then/else/endif expressions |
| 360 | indented for readability. |
| 361 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 362 | \fB\-G\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 363 | Display constant literals in decimal form |
| 364 | rather than their character equivalents. |
| 365 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 366 | \fB\-g\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 367 | Display constant character literals in quoted form |
| 368 | rather than their decimal equivalents. |
| 369 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 370 | \fB\-i\fP |
| 371 | Analyze the initialization (\fBis1\fP, \fBis2\fP, \fBis3\fP), and reset |
| 372 | (\fBrs1\fP, \fBrs2\fP, \fBrs3\fP), strings in the entry, |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 373 | as well as those used for starting/stopping cursor-positioning mode |
| 374 | (\fBsmcup\fP, \fBrmcup\fP) as well as starting/stopping keymap mode |
| 375 | (\fBsmkx\fP, \fBrmkx\fP). |
| 376 | .IP |
| 377 | For each string, the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 378 | code tries to analyze it into actions in terms of the other capabilities in the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 379 | entry, certain X3.64/ISO 6429/ECMA\-48 capabilities, and certain DEC VT-series |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 380 | private modes (the set of recognized special sequences has been selected for |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 381 | completeness over the existing terminfo database). |
| 382 | Each report line consists |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 383 | of the capability name, followed by a colon and space, followed by a printable |
| 384 | expansion of the capability string with sections matching recognized actions |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 385 | translated into {}-bracketed descriptions. |
| 386 | .IP |
| 387 | Here is a list of the DEC/ANSI |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 388 | special sequences recognized: |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 389 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 390 | .TS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 391 | center; |
| 392 | L L. |
| 393 | Action Meaning |
| 394 | _ |
| 395 | RIS full reset |
| 396 | SC save cursor |
| 397 | RC restore cursor |
| 398 | LL home-down |
| 399 | RSR reset scroll region |
| 400 | _ |
| 401 | DECSTR soft reset (VT320) |
| 402 | S7C1T 7-bit controls (VT220) |
| 403 | _ |
| 404 | ISO DEC G0 enable DEC graphics for G0 |
| 405 | ISO UK G0 enable UK chars for G0 |
| 406 | ISO US G0 enable US chars for G0 |
| 407 | ISO DEC G1 enable DEC graphics for G1 |
| 408 | ISO UK G1 enable UK chars for G1 |
| 409 | ISO US G1 enable US chars for G1 |
| 410 | _ |
| 411 | DECPAM application keypad mode |
| 412 | DECPNM normal keypad mode |
| 413 | DECANSI enter ANSI mode |
| 414 | _ |
| 415 | ECMA[+\-]AM keyboard action mode |
| 416 | ECMA[+\-]IRM insert replace mode |
| 417 | ECMA[+\-]SRM send receive mode |
| 418 | ECMA[+\-]LNM linefeed mode |
| 419 | _ |
| 420 | DEC[+\-]CKM application cursor keys |
| 421 | DEC[+\-]ANM set VT52 mode |
| 422 | DEC[+\-]COLM 132-column mode |
| 423 | DEC[+\-]SCLM smooth scroll |
| 424 | DEC[+\-]SCNM reverse video mode |
| 425 | DEC[+\-]OM origin mode |
| 426 | DEC[+\-]AWM wraparound mode |
| 427 | DEC[+\-]ARM auto-repeat mode |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 428 | .TE |
| 429 | .sp |
| 430 | It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set |
| 431 | Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 432 | REVERSE. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 433 | All but NORMAL may be prefixed with |
| 434 | .RS |
| 435 | .bP |
| 436 | \*(``+\*('' (turn on) or |
| 437 | .bP |
| 438 | \*(``\-\*('' (turn off). |
| 439 | .RE |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 440 | .IP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 441 | An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}). |
| 442 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 443 | \fB\-l\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 444 | Set output format to terminfo. |
| 445 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 446 | \fB\-p\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 447 | Ignore padding specifications when comparing strings. |
| 448 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 449 | \fB\-Q\fP \fIn\fP |
| 450 | Rather than show source in terminfo (text) format, |
| 451 | print the compiled (binary) format in hexadecimal or base64 form, |
| 452 | depending on the option's value: |
| 453 | .RS 8 |
| 454 | .TP 3 |
| 455 | 1 |
| 456 | hexadecimal |
| 457 | .TP 3 |
| 458 | 2 |
| 459 | base64 |
| 460 | .TP 3 |
| 461 | 3 |
| 462 | hexadecimal and base64 |
| 463 | .RE |
| 464 | .IP |
| 465 | For example, this prints the compiled terminfo value as a string |
| 466 | which could be assigned to the \fI\%TERMINFO\fP environment variable: |
| 467 | .PP |
| 468 | .RS 9 |
| 469 | .EX |
| 470 | @INFOCMP@ \-0 \-q \-Q2 |
| 471 | .EE |
| 472 | .RE |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 473 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 474 | \fB\-q\fP |
| 475 | This makes the output a little shorter: |
| 476 | .RS |
| 477 | .bP |
| 478 | Make the comparison listing shorter by omitting subheadings, and using |
| 479 | \*(``\-\*('' for absent capabilities, \*(``@\*('' |
| 480 | for canceled rather than \*(``NULL\*(''. |
| 481 | .bP |
| 482 | However, show differences between absent and cancelled capabilities. |
| 483 | .bP |
| 484 | Omit the \*(``Reconstructed from\*('' comment for source listings. |
| 485 | .RE |
| 486 | .TP 5 |
| 487 | \fB\-R\fIsubset\fR |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 488 | Restrict output to a given subset. |
| 489 | This option is for use with archaic |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 490 | versions of terminfo like those on SVr1, Ultrix, or HP-UX that do not support |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 491 | the full set of SVR4/XSI Curses terminfo; and variants such as AIX |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 492 | that have their own extensions incompatible with SVr4/XSI. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 493 | .RS |
| 494 | .bP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 495 | Available terminfo |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 496 | subsets are \*(``SVr1\*('', \*(``Ultrix\*('', \*(``HP\*('', and \*(``AIX\*(''; |
| 497 | see \fBterminfo\fP(5) for details. |
| 498 | .bP |
| 499 | You can also choose the subset \*(``BSD\*('' which selects only capabilities |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 500 | with termcap equivalents recognized by 4.4BSD. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 501 | .bP |
| 502 | If you select any other value for \fB\-R\fP, |
| 503 | it is the same as no subset, i.e., all capabilities are used. |
| 504 | .RE |
| 505 | .IP |
| 506 | A few options override the subset selected with \fB\-R\fP, |
| 507 | if they are processed later in the command parameters: |
| 508 | .RS |
| 509 | .TP 5 |
| 510 | \fB\-C\fP |
| 511 | sets the \*(``BSD\*('' subset as a side-effect. |
| 512 | .TP 5 |
| 513 | \fB\-I\fP |
| 514 | sets the subset to all capabilities. |
| 515 | .TP 5 |
| 516 | \fB\-r\fP |
| 517 | sets the subset to all capabilities. |
| 518 | .RE |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 519 | .TP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 520 | \fB\-s \fI[d|i|l|c]\fR |
| 521 | The \fB\-s\fP option sorts the fields within each type according to the argument |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 522 | below: |
| 523 | .br |
| 524 | .RS 5 |
| 525 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 526 | \fBd\fP |
| 527 | leave fields in the order that they are stored in the \fIterminfo\fP database. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 528 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 529 | \fBi\fP |
| 530 | sort by \fIterminfo\fP name. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 531 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 532 | \fBl\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 533 | sort by the long C variable name. |
| 534 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 535 | \fBc\fP |
| 536 | sort by the \fItermcap\fP name. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 537 | .RE |
| 538 | .IP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 539 | If the \fB\-s\fP option is not given, the fields printed out will be |
| 540 | sorted alphabetically by the \fBterminfo\fP name within each type, |
| 541 | except in the case of the \fB\-C\fP or the \fB\-L\fP options, which cause the |
| 542 | sorting to be done by the \fBtermcap\fP name or the long C variable |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 543 | name, respectively. |
| 544 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 545 | \fB\-T\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 546 | eliminates size-restrictions on the generated text. |
| 547 | This is mainly useful for testing and analysis, since the compiled |
| 548 | descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). |
| 549 | .TP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 550 | \fB\-t\fP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 551 | tells \fB@TIC@\fP to discard commented-out capabilities. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 552 | Normally when translating from terminfo to termcap, |
| 553 | untranslatable capabilities are commented-out. |
| 554 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 555 | \fB\-U\fP |
| 556 | tells \fB@INFOCMP@\fP to not post-process the data |
| 557 | after parsing the source file. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 558 | This feature helps when comparing the actual contents of two source files, |
| 559 | since it excludes the inferences that \fB@INFOCMP@\fP makes to fill in missing |
| 560 | data. |
| 561 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 562 | \fB\-V\fP |
| 563 | reports the version of \fI\%ncurses\fP which was used in this program, |
| 564 | and exits. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 565 | .TP 5 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 566 | \fB\-v\fP \fIn\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 567 | prints out tracing information on standard error as the program runs. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 568 | .IP |
| 569 | The optional parameter \fIn\fP is a number from 1 to 10, inclusive, |
| 570 | indicating the desired level of detail of information. |
| 571 | If \fI\%ncurses\fP is built without tracing support, |
| 572 | the optional parameter is ignored. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 573 | .TP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 574 | \fB\-W\fP |
| 575 | By itself, the \fB\-w\fP option will not force long strings to be wrapped. |
| 576 | Use the \fB\-W\fP option to do this. |
| 577 | .TP 5 |
| 578 | \fB\-w\fP \fIwidth\fP |
| 579 | changes the output to \fIwidth\fP characters. |
| 580 | .TP |
| 581 | \fB\-x\fP |
| 582 | print information for user-defined capabilities (see \fBuser_caps\fP(5). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 583 | These are extensions to the terminfo repertoire which can be loaded |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 584 | using the \fB\-x\fP option of \fB@TIC@\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 585 | .SH FILES |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 586 | .TP |
| 587 | .I \*d |
| 588 | compiled terminal description database |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 589 | .SH EXTENSIONS |
| 590 | The |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 591 | \fB\-0\fP, |
| 592 | \fB\-1\fP, |
| 593 | \fB\-E\fP, |
| 594 | \fB\-F\fP, |
| 595 | \fB\-G\fP, |
| 596 | \fB\-Q\fP, |
| 597 | \fB\-R\fP, |
| 598 | \fB\-T\fP, |
| 599 | \fB\-V\fP, |
| 600 | \fB\-a\fP, |
| 601 | \fB\-e\fP, |
| 602 | \fB\-f\fP, |
| 603 | \fB\-g\fP, |
| 604 | \fB\-i\fP, |
| 605 | \fB\-l\fP, |
| 606 | \fB\-p\fP, |
| 607 | \fB\-q\fP and |
| 608 | \fB\-t\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 609 | options are not supported in SVr4 curses. |
| 610 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 611 | SVr4 infocmp does not distinguish between absent and cancelled capabilities. |
| 612 | Also, it shows missing integer capabilities as \fB\-1\fP |
| 613 | (the internal value used to represent missing integers). |
| 614 | This implementation shows those as \*(``NULL\*('', |
| 615 | for consistency with missing strings. |
| 616 | .PP |
| 617 | The \fB\-r\fP option's notion of \*(``termcap\*('' capabilities |
| 618 | is System V Release 4's. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 619 | Actual BSD curses versions will have a more restricted set. |
| 620 | To see only the |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 621 | 4.4BSD set, use \fB\-r\fP \fB\-RBSD\fP. |
| 622 | .SH PORTABILITY |
| 623 | X/Open Curses, Issue 7 (2009) provides a description of \fBinfocmp\fP. |
| 624 | It does not mention the options used for converting to termcap format. |
| 625 | .SH HISTORY |
| 626 | Although System V Release 2 provided a terminfo library, |
| 627 | it had no documented tool for decompiling the terminal descriptions. |
| 628 | Tony Hansen (AT&T) wrote the first \fBinfocmp\fP in early 1984, |
| 629 | for System V Release 3. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 630 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 631 | Eric Raymond used the AT&T documentation in 1995 to provide an equivalent |
| 632 | \fB@INFOCMP@\fP for \fI\%ncurses\fP. |
| 633 | In addition, he added a few new features such as: |
| 634 | .bP |
| 635 | the \fB\-e\fP option, to support \fIfallback\fP |
| 636 | (compiled-in) terminal descriptions |
| 637 | .bP |
| 638 | the \fB\-i\fP option, to help with analysis |
| 639 | .PP |
| 640 | Later, Thomas Dickey added the \fB\-x\fP (user-defined capabilities) |
| 641 | option, and the \fB\-E\fP option to support fallback entries with |
| 642 | user-defined capabilities. |
| 643 | .PP |
| 644 | For a complete list, see the \fIEXTENSIONS\fP section. |
| 645 | .PP |
| 646 | In 2010, Roy Marples provided an \fBinfocmp\fP program for NetBSD. |
| 647 | It is less capable than the SVr4 or \fI\%ncurses\fP versions |
| 648 | (e.g., it lacks the sorting options documented in X/Open), |
| 649 | but does include the \fB\-x\fP option adapted from \fI\%ncurses\fP. |
| 650 | .SH BUGS |
| 651 | The \fB\-F\fP option of \fB\%@INFOCMP@\fP(1M) should be a |
| 652 | \fB\%@TOE@\fP(1M) mode. |
| 653 | .SH AUTHORS |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 654 | Eric S. Raymond <esr@snark.thyrsus.com> |
| 655 | and |
| 656 | .br |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 657 | Thomas E. Dickey <dickey@invisible\-island.net> |
| 658 | .SH SEE ALSO |
| 659 | \fB\%@CAPTOINFO@\fP(1M), |
| 660 | \fB\%@INFOTOCAP@\fP(1M), |
| 661 | \fB\%@TIC@\fP(1M), |
| 662 | \fB\%@TOE@\fP(1M), |
| 663 | \fB\%curses\fP(3X), |
| 664 | \fB\%terminfo\fP(5), |
| 665 | \fB\%user_caps\fP(5) |
| 666 | .PP |
| 667 | https://invisible\-island.net/ncurses/tctest.html |