Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | '\" t |
| 2 | .\"*************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 3 | .\" Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 30 | .\" $Id: infocmp.1m,v 1.56 2015/05/23 20:50:00 tom Exp $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 31 | .TH @INFOCMP@ 1M "" |
| 32 | .ds n 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 33 | .de bP |
| 34 | .IP \(bu 4 |
| 35 | .. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 36 | .ds d @TERMINFO@ |
| 37 | .SH NAME |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 38 | \fB@INFOCMP@\fR \- compare or print out \fIterminfo\fR descriptions |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 39 | .SH SYNOPSIS |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 40 | \fB@INFOCMP@\fR [\fB\-\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 41 | 1\ |
| 42 | C\ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 43 | D\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 44 | E\ |
| 45 | F\ |
| 46 | G\ |
| 47 | I\ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 48 | K\ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 49 | L\ |
| 50 | T\ |
| 51 | U\ |
| 52 | V\ |
| 53 | c\ |
| 54 | d\ |
| 55 | e\ |
| 56 | g\ |
| 57 | i\ |
| 58 | l\ |
| 59 | n\ |
| 60 | p\ |
| 61 | q\ |
| 62 | r\ |
| 63 | t\ |
| 64 | u\ |
| 65 | x\ |
| 66 | \fR] |
| 67 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 68 | [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-R \fR\fBsubset\fR] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 69 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 70 | [\fB\-w\fR\ \fIwidth\fR] [\fB\-A\fR\ \fIdirectory\fR] [\fB\-B\fR\ \fIdirectory\fR] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 71 | .br |
| 72 | [\fItermname\fR...] |
| 73 | .SH DESCRIPTION |
| 74 | \fB@INFOCMP@\fR can be used to compare a binary \fBterminfo\fR entry with other |
| 75 | terminfo entries, rewrite a \fBterminfo\fR description to take advantage of the |
| 76 | \fBuse=\fR terminfo field, or print out a \fBterminfo\fR description from the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 77 | binary file (\fBterm\fR) in a variety of formats. |
| 78 | In all cases, the boolean |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 79 | fields will be printed first, followed by the numeric fields, followed by the |
| 80 | string fields. |
| 81 | .SS Default Options |
| 82 | If no options are specified and zero or one \fItermnames\fR are specified, the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 83 | \fB\-I\fR option will be assumed. |
| 84 | If more than one \fItermname\fR is specified, |
| 85 | the \fB\-d\fR option will be assumed. |
| 86 | .SS Comparison Options [\-d] [\-c] [\-n] |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 87 | \fB@INFOCMP@\fR compares the \fBterminfo\fR description of the first terminal |
| 88 | \fItermname\fR with each of the descriptions given by the entries for the other |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 89 | terminal's \fItermnames\fR. |
| 90 | If a capability is defined for only one of the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 91 | terminals, the value returned will depend on the type of the capability: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 92 | \fBF\fR for boolean variables, \fB\-1\fR for integer variables, and \fBNULL\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 93 | for string variables. |
| 94 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 95 | The \fB\-d\fR option produces a list of each capability that is different |
| 96 | between two entries. |
| 97 | This option is useful to show the difference between two |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 98 | entries, created by different people, for the same or similar terminals. |
| 99 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 100 | The \fB\-c\fR option produces a list of each capability that is common between |
| 101 | two or more entries. |
| 102 | Capabilities that are not set are ignored. |
| 103 | This option can be |
| 104 | used as a quick check to see if the \fB\-u\fR option is worth using. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 105 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 106 | The \fB\-n\fR option produces a list of each capability that is in none of |
| 107 | the given entries. |
| 108 | If no \fItermnames\fR are given, the environment variable \fBTERM\fR |
| 109 | will be used for both of the \fItermnames\fR. |
| 110 | This can be used as a quick |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 111 | check to see if anything was left out of a description. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 112 | .SS Source Listing Options [\-I] [\-L] [\-C] [\-r] |
| 113 | The \fB\-I\fR, \fB\-L\fR, and \fB\-C\fR options will produce a source listing for |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 114 | each terminal named. |
| 115 | . |
| 116 | .TS |
| 117 | center tab(/) ; |
| 118 | l l . |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 119 | \fB\-I\fR/use the \fBterminfo\fR names |
| 120 | \fB\-L\fR/use the long C variable name listed in <\fBterm.h\fR> |
| 121 | \fB\-C\fR/use the \fBtermcap\fR names |
| 122 | \fB\-r\fR/when using \fB\-C\fR, put out all capabilities in \fBtermcap\fR form |
| 123 | \fB\-K\fR/modifies the \fB\-C\fP option, improving BSD-compatibility. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 124 | .TE |
| 125 | .PP |
| 126 | If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be |
| 127 | used for the terminal name. |
| 128 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 129 | The source produced by the \fB\-C\fR option may be used directly as a |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 130 | \fBtermcap\fR entry, but not all parameterized strings can be changed to |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 131 | the \fBtermcap\fR format. |
| 132 | \fB@INFOCMP@\fR will attempt to convert most of the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 133 | parameterized information, and anything not converted will be plainly marked in |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 134 | the output and commented out. |
| 135 | These should be edited by hand. |
| 136 | .PP |
| 137 | For best results when converting to \fBtermcap\fP format, |
| 138 | you should use both \fB\-C\fP and \fB\-r\fP. |
| 139 | Normally a termcap description is limited to 1023 bytes. |
| 140 | @INFOCMP@ trims away less essential parts to make it fit. |
| 141 | If you are converting to one of the (rare) termcap implementations |
| 142 | which accept an unlimited size of termcap, |
| 143 | you may want to add the \fB\-T\fP option. |
| 144 | More often however, you must help the termcap implementation, |
| 145 | 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] | 146 | .PP |
| 147 | All padding information for strings will be collected together and placed |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 148 | at the beginning of the string where \fBtermcap\fR expects it. |
| 149 | Mandatory |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 150 | padding (padding information with a trailing '/') will become optional. |
| 151 | .PP |
| 152 | All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 153 | are derivable from other \fBterminfo\fR variables, will be output. |
| 154 | Not all |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 155 | \fBterminfo\fR capabilities will be translated; only those variables which were |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 156 | part of \fBtermcap\fR will normally be output. |
| 157 | Specifying the \fB\-r\fR option |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 158 | will take off this restriction, allowing all capabilities to be output in |
| 159 | \fItermcap\fR form. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 160 | Normally you would use both the \fB\-C\fP and \fB\-r\fP options. |
| 161 | The actual format used incorporates some improvements for escaped characters |
| 162 | from terminfo format. |
| 163 | For a stricter BSD-compatible translation, use the \fB\-K\fR option |
| 164 | rather than \fB\-C\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 165 | .PP |
| 166 | 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] | 167 | all capabilities are output. |
| 168 | Mandatory padding is not supported. |
| 169 | Because |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 170 | \fBtermcap\fR strings are not as flexible, it is not always possible to convert |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 171 | a \fBterminfo\fR string capability into an equivalent \fBtermcap\fR format. |
| 172 | A subsequent conversion of the \fBtermcap\fR file back into \fBterminfo\fR format |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 173 | will not necessarily reproduce the original \fBterminfo\fR |
| 174 | source. |
| 175 | .PP |
| 176 | Some common \fBterminfo\fR parameter sequences, their \fBtermcap\fR |
| 177 | equivalents, and some terminal types which commonly have such sequences, are: |
| 178 | . |
| 179 | .TS |
| 180 | center tab(/) ; |
| 181 | l c l |
| 182 | l l l. |
| 183 | \fBterminfo/termcap\fR/Representative Terminals |
| 184 | = |
| 185 | \fB%p1%c/%.\fR/adm |
| 186 | \fB%p1%d/%d\fR/hp, ANSI standard, vt100 |
| 187 | \fB%p1%'x'%+%c/%+x\fR/concept |
| 188 | \fB%i/%i\fRq/ANSI standard, vt100 |
| 189 | \fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept |
| 190 | \fB%p2\fR is printed before \fB%p1/%r\fR/hp |
| 191 | .TE |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 192 | .SS Use= Option [\-u] |
| 193 | The \fB\-u\fR option produces a \fBterminfo\fR source description of the first |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 194 | terminal \fItermname\fR which is relative to the sum of the descriptions given |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 195 | by the entries for the other terminals \fItermnames\fR. |
| 196 | It does this by |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 197 | analyzing the differences between the first \fItermname\fR and the other |
| 198 | \fItermnames\fR and producing a description with \fBuse=\fR fields for the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 199 | other terminals. |
| 200 | In this manner, it is possible to retrofit generic terminfo |
| 201 | entries into a terminal's description. |
| 202 | Or, if two similar terminals exist, but |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 203 | were coded at different times or by different people so that each description |
| 204 | is a full description, using \fB@INFOCMP@\fR will show what can be done to change |
| 205 | one description to be relative to the other. |
| 206 | .PP |
| 207 | A capability will get printed with an at-sign (@) if it no longer exists in the |
| 208 | first \fItermname\fR, but one of the other \fItermname\fR entries contains a |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 209 | value for it. |
| 210 | A capability's value gets printed if the value in the first |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 211 | \fItermname\fR is not found in any of the other \fItermname\fR entries, or if |
| 212 | the first of the other \fItermname\fR entries that has this capability gives a |
| 213 | different value for the capability than that in the first \fItermname\fR. |
| 214 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 215 | The order of the other \fItermname\fR entries is significant. |
| 216 | Since the |
| 217 | terminfo compiler \fB@TIC@\fR does a left-to-right scan of the capabilities, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 218 | specifying two \fBuse=\fR entries that contain differing entries for the same |
| 219 | capabilities will produce different results depending on the order that the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 220 | entries are given in. |
| 221 | \fB@INFOCMP@\fR will flag any such inconsistencies between |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 222 | the other \fItermname\fR entries as they are found. |
| 223 | .PP |
| 224 | Alternatively, specifying a capability \fIafter\fR a \fBuse=\fR entry that |
| 225 | contains that capability will cause the second specification to be ignored. |
| 226 | Using \fB@INFOCMP@\fR to recreate a description can be a useful check to make |
| 227 | sure that everything was specified correctly in the original source |
| 228 | description. |
| 229 | .PP |
| 230 | Another error that does not cause incorrect compiled files, but will slow down |
| 231 | the compilation time, is specifying extra \fBuse=\fR fields that are |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 232 | superfluous. |
| 233 | \fB@INFOCMP@\fR will flag any other \fItermname use=\fR fields that |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 234 | were not needed. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 235 | .SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR] |
| 236 | Like other \fBncurses\fP utilities, |
| 237 | @INFOCMP@ looks for the terminal descriptions in several places. |
| 238 | You can use the \fBTERMINFO\fP and \fBTERMINFO_DIRS\fP environment variables |
| 239 | to override the compiled-in default list of places to search |
| 240 | (see \fBcurses\fP(3X) for details). |
| 241 | .PP |
| 242 | You can also use the options \fB\-A\fR |
| 243 | and \fB\-B\fR to override the list of places to search |
| 244 | when comparing terminal descriptions: |
| 245 | .bP |
| 246 | The \fB\-A\fR option sets the location for the first \fItermname\fR |
| 247 | .bP |
| 248 | The \fB\-B\fR option sets the location for the other \fItermnames\fR. |
| 249 | .PP |
| 250 | Using these options, it is possible to |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 251 | 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] | 252 | databases. |
| 253 | For instance, |
| 254 | 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] | 255 | created by different people. |
| 256 | .SS Other Options |
| 257 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 258 | \fB\-0\fR |
| 259 | causes the fields to be printed on one line, without wrapping. |
| 260 | .TP 5 |
| 261 | \fB\-1\fR |
| 262 | causes the fields to be printed out one to a line. |
| 263 | Otherwise, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 264 | the fields will be printed several to a line to a maximum width |
| 265 | of 60 characters. |
| 266 | .TP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 267 | \fB\-a\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 268 | tells \fB@INFOCMP@\fP to retain commented-out capabilities rather than discarding |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 269 | them. |
| 270 | Capabilities are commented by prefixing them with a period. |
| 271 | .TP |
| 272 | \fB\-D\fR |
| 273 | tells \fB@INFOCMP@\fP to print the database locations that it knows about, and exit. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 274 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 275 | \fB\-E\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 276 | Dump the capabilities of the given terminal as tables, needed in |
| 277 | the C initializer for a |
| 278 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR). |
| 279 | This option is useful for preparing versions of the curses library hardwired |
| 280 | for a given terminal type. |
| 281 | The tables are all declared static, and are named according to the type |
| 282 | and the name of the corresponding terminal entry. |
| 283 | .sp |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 284 | Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 285 | options was not needed; but support for extended names required making |
| 286 | the arrays of terminal capabilities separate from the TERMTYPE structure. |
| 287 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 288 | \fB\-e\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 289 | Dump the capabilities of the given terminal as a C initializer for a |
| 290 | TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR). |
| 291 | This option is useful for preparing versions of the curses library hardwired |
| 292 | for a given terminal type. |
| 293 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 294 | \fB\-F\fR |
| 295 | compare terminfo files. |
| 296 | This assumes that two following arguments are filenames. |
| 297 | The files are searched for pairwise matches between |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 298 | entries, with two entries considered to match if any of their names do. |
| 299 | The report printed to standard output lists entries with no matches in |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 300 | the other file, and entries with more than one match. |
| 301 | For entries |
| 302 | with exactly one match it includes a difference report. |
| 303 | Normally, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 304 | to reduce the volume of the report, use references are |
| 305 | not resolved before looking for differences, but resolution can be forced |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 306 | by also specifying \fB\-r\fR. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 307 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 308 | \fB\-f\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 309 | Display complex terminfo strings which contain if/then/else/endif expressions |
| 310 | indented for readability. |
| 311 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 312 | \fB\-G\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 313 | Display constant literals in decimal form |
| 314 | rather than their character equivalents. |
| 315 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 316 | \fB\-g\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 317 | Display constant character literals in quoted form |
| 318 | rather than their decimal equivalents. |
| 319 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 320 | \fB\-i\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 321 | Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 322 | (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry, |
| 323 | as well as those used for starting/stopping cursor-positioning mode |
| 324 | (\fBsmcup\fP, \fBrmcup\fP) as well as starting/stopping keymap mode |
| 325 | (\fBsmkx\fP, \fBrmkx\fP). |
| 326 | .IP |
| 327 | For each string, the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 328 | 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] | 329 | 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] | 330 | private modes (the set of recognized special sequences has been selected for |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 331 | completeness over the existing terminfo database). |
| 332 | Each report line consists |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 333 | of the capability name, followed by a colon and space, followed by a printable |
| 334 | expansion of the capability string with sections matching recognized actions |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 335 | translated into {}-bracketed descriptions. |
| 336 | .IP |
| 337 | Here is a list of the DEC/ANSI |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 338 | special sequences recognized: |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 339 | .TS |
| 340 | center tab(/) ; |
| 341 | l l |
| 342 | l l. |
| 343 | Action/Meaning |
| 344 | = |
| 345 | RIS/full reset |
| 346 | SC/save cursor |
| 347 | RC/restore cursor |
| 348 | LL/home-down |
| 349 | RSR/reset scroll region |
| 350 | = |
| 351 | DECSTR/soft reset (VT320) |
| 352 | S7C1T/7-bit controls (VT220) |
| 353 | = |
| 354 | ISO DEC G0/enable DEC graphics for G0 |
| 355 | ISO UK G0/enable UK chars for G0 |
| 356 | ISO US G0/enable US chars for G0 |
| 357 | ISO DEC G1/enable DEC graphics for G1 |
| 358 | ISO UK G1/enable UK chars for G1 |
| 359 | ISO US G1/enable US chars for G1 |
| 360 | = |
| 361 | DECPAM/application keypad mode |
| 362 | DECPNM/normal keypad mode |
| 363 | DECANSI/enter ANSI mode |
| 364 | = |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 365 | ECMA[+\-]AM/keyboard action mode |
| 366 | ECMA[+\-]IRM/insert replace mode |
| 367 | ECMA[+\-]SRM/send receive mode |
| 368 | ECMA[+\-]LNM/linefeed mode |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 369 | = |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 370 | DEC[+\-]CKM/application cursor keys |
| 371 | DEC[+\-]ANM/set VT52 mode |
| 372 | DEC[+\-]COLM/132-column mode |
| 373 | DEC[+\-]SCLM/smooth scroll |
| 374 | DEC[+\-]SCNM/reverse video mode |
| 375 | DEC[+\-]OM/origin mode |
| 376 | DEC[+\-]AWM/wraparound mode |
| 377 | DEC[+\-]ARM/auto-repeat mode |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 378 | .TE |
| 379 | .sp |
| 380 | It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set |
| 381 | Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 382 | REVERSE. |
| 383 | All but NORMAL may be prefixed with `+' (turn on) or `\-' (turn off). |
| 384 | .IP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 385 | An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}). |
| 386 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 387 | \fB\-l\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 388 | Set output format to terminfo. |
| 389 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 390 | \fB\-p\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 391 | Ignore padding specifications when comparing strings. |
| 392 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 393 | \fB\-q\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 394 | Make the comparison listing shorter by omitting subheadings, and using |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 395 | "\-" for absent capabilities, "@" for canceled rather than "NULL". |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 396 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 397 | \fB\-R\fR\fIsubset\fR |
| 398 | Restrict output to a given subset. |
| 399 | This option is for use with archaic |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 400 | versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support |
| 401 | 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] | 402 | that have their own extensions incompatible with SVr4/XSI. |
| 403 | .IP |
| 404 | Available terminfo |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 405 | subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 406 | details. |
| 407 | You can also choose the subset "BSD" which selects only capabilities |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 408 | with termcap equivalents recognized by 4.4BSD. |
| 409 | .TP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 410 | \fB\-s \fR\fI[d|i|l|c]\fR |
| 411 | The \fB\-s\fR option sorts the fields within each type according to the argument |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 412 | below: |
| 413 | .br |
| 414 | .RS 5 |
| 415 | .TP 5 |
| 416 | \fBd\fR |
| 417 | leave fields in the order that they are stored in the \fIterminfo\fR database. |
| 418 | .TP 5 |
| 419 | \fBi\fR |
| 420 | sort by \fIterminfo\fR name. |
| 421 | .TP 5 |
| 422 | \fBl\fR |
| 423 | sort by the long C variable name. |
| 424 | .TP 5 |
| 425 | \fBc\fR |
| 426 | sort by the \fItermcap\fR name. |
| 427 | .RE |
| 428 | .IP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 429 | If the \fB\-s\fR option is not given, the fields printed out will be |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 430 | sorted alphabetically by the \fBterminfo\fR name within each type, |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 431 | except in the case of the \fB\-C\fR or the \fB\-L\fR options, which cause the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 432 | sorting to be done by the \fBtermcap\fR name or the long C variable |
| 433 | name, respectively. |
| 434 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 435 | \fB\-T\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 436 | eliminates size-restrictions on the generated text. |
| 437 | This is mainly useful for testing and analysis, since the compiled |
| 438 | descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). |
| 439 | .TP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 440 | \fB\-t\fR |
| 441 | tells \fB@TIC@\fP to discard commented-out capabilities. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 442 | Normally when translating from terminfo to termcap, |
| 443 | untranslatable capabilities are commented-out. |
| 444 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 445 | \fB\-U\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 446 | tells \fB@INFOCMP@\fP to not post-process the data after parsing the source file. |
| 447 | This feature helps when comparing the actual contents of two source files, |
| 448 | since it excludes the inferences that \fB@INFOCMP@\fP makes to fill in missing |
| 449 | data. |
| 450 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 451 | \fB\-V\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 452 | reports the version of ncurses which was used in this program, and exits. |
| 453 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 454 | \fB\-v\fR \fIn\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 455 | prints out tracing information on standard error as the program runs. |
| 456 | Higher values of n induce greater verbosity. |
| 457 | .TP 5 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 458 | \fB\-w\fR \fIwidth\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 459 | changes the output to \fIwidth\fR characters. |
| 460 | .TP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 461 | \fB\-x\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 462 | print information for user-defined capabilities. |
| 463 | These are extensions to the terminfo repertoire which can be loaded |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 464 | using the \fB\-x\fR option of \fB@TIC@\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 465 | .SH FILES |
| 466 | .TP 20 |
| 467 | \*d |
| 468 | Compiled terminal description database. |
| 469 | .SH EXTENSIONS |
| 470 | The |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 471 | \fB\-0\fR, |
| 472 | \fB\-1\fR, |
| 473 | \fB\-E\fR, |
| 474 | \fB\-F\fR, |
| 475 | \fB\-G\fR, |
| 476 | \fB\-R\fR, |
| 477 | \fB\-T\fR, |
| 478 | \fB\-V\fR, |
| 479 | \fB\-a\fR, |
| 480 | \fB\-e\fR, |
| 481 | \fB\-f\fR, |
| 482 | \fB\-g\fR, |
| 483 | \fB\-i\fR, |
| 484 | \fB\-l\fR, |
| 485 | \fB\-p\fR, |
| 486 | \fB\-q\fR and |
| 487 | \fB\-t\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 488 | options are not supported in SVr4 curses. |
| 489 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 490 | The \fB\-r\fR option's notion of `termcap' capabilities is System V Release 4's. |
| 491 | Actual BSD curses versions will have a more restricted set. |
| 492 | To see only the |
| 493 | 4.4BSD set, use \fB\-r\fR \fB\-RBSD\fR. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 494 | .SH BUGS |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 495 | The \fB\-F\fR option of \fB@INFOCMP@\fR(1M) should be a \fB@TOE@\fR(1M) mode. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 496 | .SH SEE ALSO |
| 497 | \fB@CAPTOINFO@\fR(1M), |
| 498 | \fB@INFOTOCAP@\fR(1M), |
| 499 | \fB@TIC@\fR(1M), |
| 500 | \fB@TOE@\fR(1M), |
| 501 | \fBcurses\fR(3X), |
| 502 | \fBterminfo\fR(\*n). |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 503 | .sp |
| 504 | http://invisible-island.net/ncurses/tctest.html |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 505 | .PP |
| 506 | This describes \fBncurses\fR |
| 507 | version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). |
| 508 | .SH AUTHOR |
| 509 | Eric S. Raymond <esr@snark.thyrsus.com> |
| 510 | and |
| 511 | .br |
| 512 | Thomas E. Dickey <dickey@invisible-island.net> |