Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
| 2 | .\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * |
| 3 | .\" * |
| 4 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 5 | .\" copy of this software and associated documentation files (the * |
| 6 | .\" "Software"), to deal in the Software without restriction, including * |
| 7 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 8 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 9 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 10 | .\" furnished to do so, subject to the following conditions: * |
| 11 | .\" * |
| 12 | .\" The above copyright notice and this permission notice shall be included * |
| 13 | .\" in all copies or substantial portions of the Software. * |
| 14 | .\" * |
| 15 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 16 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 17 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 18 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 19 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 20 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 21 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 22 | .\" * |
| 23 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 24 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 25 | .\" sale, use or other dealings in this Software without prior written * |
| 26 | .\" authorization. * |
| 27 | .\"*************************************************************************** |
| 28 | .\" |
| 29 | .\" $Id: tic.1m,v 1.44 2006/12/24 17:59:11 tom Exp $ |
| 30 | .TH @TIC@ 1M "" |
| 31 | .ds n 5 |
| 32 | .ds d @TERMINFO@ |
| 33 | .SH NAME |
| 34 | \fBtic\fR - the \fIterminfo\fR entry-description compiler |
| 35 | .SH SYNOPSIS |
| 36 | \fBtic\fR |
| 37 | [\fB-\ |
| 38 | 1\ |
| 39 | C\ |
| 40 | G\ |
| 41 | I\ |
| 42 | L\ |
| 43 | N\ |
| 44 | T\ |
| 45 | U\ |
| 46 | V\ |
| 47 | a\ |
| 48 | c\ |
| 49 | f\ |
| 50 | g\ |
| 51 | r\ |
| 52 | s\ |
| 53 | t\ |
| 54 | x\ |
| 55 | \fR] |
| 56 | [\fB-e\fR \fInames\fR] |
| 57 | [\fB-o\fR \fIdir\fR] |
| 58 | [\fB-R\fR \fIsubset\fR] |
| 59 | [\fB-v\fR[\fIn\fR]] |
| 60 | [\fB-w\fR[\fIn\fR]] |
| 61 | \fIfile\fR |
| 62 | .br |
| 63 | .SH DESCRIPTION |
| 64 | The command \fBtic\fR translates a \fBterminfo\fR file from source |
| 65 | format into compiled format. The compiled format is necessary for use with |
| 66 | the library routines in \fBncurses\fR(3X). |
| 67 | .PP |
| 68 | The results are normally placed in the system terminfo |
| 69 | directory \fB\*d\fR. There are two ways to change this behavior. |
| 70 | .PP |
| 71 | First, you may override the system default by setting the variable |
| 72 | \fBTERMINFO\fR in your shell environment to a valid (existing) directory name. |
| 73 | .PP |
| 74 | Secondly, if \fBtic\fR cannot get access to \fI\*d\fR or your TERMINFO |
| 75 | directory, it looks for the directory \fI$HOME/.terminfo\fR; if that directory |
| 76 | exists, the entry is placed there. |
| 77 | .PP |
| 78 | Libraries that read terminfo entries are expected to check for a TERMINFO |
| 79 | directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and |
| 80 | finally look in \fI\*d\fR. |
| 81 | .TP |
| 82 | \fB-1\fR |
| 83 | restricts the output to a single column |
| 84 | .TP |
| 85 | \fB-a\fR |
| 86 | tells \fBtic\fP to retain commented-out capabilities rather than discarding |
| 87 | them. Capabilities are commented by prefixing them with a period. |
| 88 | This sets the \fB-x\fR option, because it treats the commented-out |
| 89 | entries as user-defined names. |
| 90 | If the source is termcap, accept the 2-character names required by version 6. |
| 91 | Otherwise these are ignored. |
| 92 | .TP |
| 93 | \fB-C\fR |
| 94 | Force source translation to termcap format. Note: this differs from the \fB-C\fR |
| 95 | option of \fB@INFOCMP@\fR(1M) in that it does not merely translate capability |
| 96 | names, but also translates terminfo strings to termcap format. Capabilities |
| 97 | that are not translatable are left in the entry under their terminfo names |
| 98 | but commented out with two preceding dots. |
| 99 | .TP |
| 100 | \fB-c\fR |
| 101 | tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and |
| 102 | bad use links. If you specify \fB-C\fR (\fB-I\fR) with this option, the code |
| 103 | will print warnings about entries which, after use resolution, are more than |
| 104 | 1023 (4096) bytes long. Due to a fixed buffer length in older termcap |
| 105 | libraries (and a documented limit in terminfo), these entries may cause core |
| 106 | dumps. |
| 107 | .TP |
| 108 | \fB-e \fR\fInames\fR |
| 109 | Limit writes and translations to the following comma-separated list of |
| 110 | terminals. |
| 111 | If any name or alias of a terminal matches one of the names in |
| 112 | the list, the entry will be written or translated as normal. |
| 113 | Otherwise no output will be generated for it. |
| 114 | The option value is interpreted as a file containing the list if it |
| 115 | contains a '/'. |
| 116 | (Note: depending on how tic was compiled, this option may require \fB-I\fR or \fB-C\fR.) |
| 117 | .TP |
| 118 | \fB-f\fR |
| 119 | Display complex terminfo strings which contain if/then/else/endif expressions |
| 120 | indented for readability. |
| 121 | .TP |
| 122 | \fB-G\fR |
| 123 | Display constant literals in decimal form |
| 124 | rather than their character equivalents. |
| 125 | .TP |
| 126 | \fB-g\fR |
| 127 | Display constant character literals in quoted form |
| 128 | rather than their decimal equivalents. |
| 129 | .TP |
| 130 | \fB-I\fR |
| 131 | Force source translation to terminfo format. |
| 132 | .TP |
| 133 | \fB-L\fR |
| 134 | Force source translation to terminfo format |
| 135 | using the long C variable names listed in <\fBterm.h\fR> |
| 136 | .TP |
| 137 | \fB-N\fR |
| 138 | Disable smart defaults. |
| 139 | Normally, when translating from termcap to terminfo, the compiler makes |
| 140 | a number of assumptions about the defaults of string capabilities |
| 141 | \fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR, |
| 142 | \fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR, |
| 143 | \fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts |
| 144 | to use obsolete termcap capabilities to deduce correct values. It also |
| 145 | normally suppresses output of obsolete termcap capabilities such as \fBbs\fR. |
| 146 | This option forces a more literal translation that also preserves the |
| 147 | obsolete capabilities. |
| 148 | .TP |
| 149 | \fB-o\fR\fIdir\fR |
| 150 | Write compiled entries to given directory. Overrides the TERMINFO environment |
| 151 | variable. |
| 152 | .TP |
| 153 | \fB-R\fR\fIsubset\fR |
| 154 | Restrict output to a given subset. This option is for use with archaic |
| 155 | versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support |
| 156 | the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x |
| 157 | that have their own extensions incompatible with SVr4/XSI. Available subsets |
| 158 | are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details. |
| 159 | .TP |
| 160 | \fB-r\fR |
| 161 | Force entry resolution (so there are no remaining tc capabilities) even |
| 162 | when doing translation to termcap format. This may be needed if you are |
| 163 | preparing a termcap file for a termcap library (such as GNU termcap through |
| 164 | version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple |
| 165 | tc capabilities per entry. |
| 166 | .TP |
| 167 | \fB-s\fR |
| 168 | Summarize the compile by showing the directory into which entries |
| 169 | are written, and the number of entries which are compiled. |
| 170 | .TP |
| 171 | \fB-T\fR |
| 172 | eliminates size-restrictions on the generated text. |
| 173 | This is mainly useful for testing and analysis, since the compiled |
| 174 | descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). |
| 175 | .TP |
| 176 | \fB-t\fR |
| 177 | tells \fBtic\fP to discard commented-out capabilities. |
| 178 | Normally when translating from terminfo to termcap, |
| 179 | untranslatable capabilities are commented-out. |
| 180 | .TP 5 |
| 181 | \fB-U\fR |
| 182 | tells \fBtic\fP to not post-process the data after parsing the source file. |
| 183 | Normally, it infers data which is commonly missing in older terminfo data, |
| 184 | or in termcaps. |
| 185 | .TP |
| 186 | \fB-V\fR |
| 187 | reports the version of ncurses which was used in this program, and exits. |
| 188 | .TP |
| 189 | \fB-v\fR\fIn\fR |
| 190 | specifies that (verbose) output be written to standard error trace |
| 191 | information showing \fBtic\fR's progress. |
| 192 | The optional parameter \fIn\fR is a number from 1 to 10, inclusive, |
| 193 | indicating the desired level of detail of information. |
| 194 | If \fIn\fR is omitted, the default level is 1. |
| 195 | If \fIn\fR is specified and greater than 1, the level of |
| 196 | detail is increased. |
| 197 | .TP |
| 198 | \fB-w\fR\fIn\fR |
| 199 | specifies the width of the output. |
| 200 | The parameter is optional. |
| 201 | If it is omitted, it defaults to 60. |
| 202 | .TP |
| 203 | \fB-x\fR |
| 204 | Treat unknown capabilities as user-defined. |
| 205 | That is, if you supply a capability name which \fBtic\fP does not recognize, |
| 206 | it will infer its type (boolean, number or string) from the syntax and |
| 207 | make an extended table entry for that. |
| 208 | User-defined capability strings |
| 209 | whose name begins with ``k'' are treated as function keys. |
| 210 | .TP |
| 211 | \fIfile\fR |
| 212 | contains one or more \fBterminfo\fR terminal descriptions in source |
| 213 | format [see \fBterminfo\fR(\*n)]. Each description in the file |
| 214 | describes the capabilities of a particular terminal. |
| 215 | .PP |
| 216 | The debug flag levels are as follows: |
| 217 | .TP |
| 218 | 1 |
| 219 | Names of files created and linked |
| 220 | .TP |
| 221 | 2 |
| 222 | Information related to the ``use'' facility |
| 223 | .TP |
| 224 | 3 |
| 225 | Statistics from the hashing algorithm |
| 226 | .TP |
| 227 | 5 |
| 228 | String-table memory allocations |
| 229 | .TP |
| 230 | 7 |
| 231 | Entries into the string-table |
| 232 | .TP |
| 233 | 8 |
| 234 | List of tokens encountered by scanner |
| 235 | .TP |
| 236 | 9 |
| 237 | All values computed in construction of the hash table |
| 238 | .LP |
| 239 | If the debug level \fIn\fR is not given, it is taken to be one. |
| 240 | .PP |
| 241 | All but one of the capabilities recognized by \fBtic\fR are documented |
| 242 | in \fBterminfo\fR(\*n). The exception is the \fBuse\fR capability. |
| 243 | .PP |
| 244 | When a \fBuse\fR=\fIentry\fR-\fIname\fR field is discovered in a |
| 245 | terminal entry currently being compiled, \fBtic\fR reads in the binary |
| 246 | from \fB\*d\fR to complete the entry. (Entries created from |
| 247 | \fIfile\fR will be used first. If the environment variable |
| 248 | \fBTERMINFO\fR is set, that directory is searched instead of |
| 249 | \fB\*d\fR.) \fBtic\fR duplicates the capabilities in |
| 250 | \fIentry\fR-\fIname\fR for the current entry, with the exception of |
| 251 | those capabilities that explicitly are defined in the current entry. |
| 252 | .PP |
| 253 | When an entry, e.g., \fBentry_name_1\fR, contains a |
| 254 | \fBuse=\fR\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled |
| 255 | capabilities in \fIentry\fR_\fIname\fR_\fI2\fR must also appear in |
| 256 | \fBentry_name_1\fR before \fBuse=\fR for these capabilities to be |
| 257 | canceled in \fBentry_name_1\fR. |
| 258 | .PP |
| 259 | If the environment variable \fBTERMINFO\fR is set, the compiled |
| 260 | results are placed there instead of \fB\*d\fR. |
| 261 | .PP |
| 262 | Total compiled entries cannot exceed 4096 bytes. The name field cannot |
| 263 | exceed 512 bytes. Terminal names exceeding the maximum alias length |
| 264 | (32 characters on systems with long filenames, 14 characters otherwise) |
| 265 | will be truncated to the maximum alias length and a warning message will be printed. |
| 266 | .SH COMPATIBILITY |
| 267 | There is some evidence that historic \fBtic\fR implementations treated |
| 268 | description fields with no whitespace in them as additional aliases or |
| 269 | short names. This \fBtic\fR does not do that, but it does warn when |
| 270 | description fields may be treated that way and check them for dangerous |
| 271 | characters. |
| 272 | .SH EXTENSIONS |
| 273 | Unlike the stock SVr4 \fBtic\fR command, this implementation can actually |
| 274 | compile termcap sources. In fact, entries in terminfo and termcap syntax can |
| 275 | be mixed in a single source file. See \fBterminfo\fR(\*n) for the list of |
| 276 | termcap names taken to be equivalent to terminfo names. |
| 277 | .PP |
| 278 | The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR |
| 279 | capabilities. |
| 280 | This implementation of \fBtic\fR will find \fBuse\fR targets anywhere |
| 281 | in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fR (if |
| 282 | \fBTERMINFO\fR is defined), or in the user's \fI$HOME/.terminfo\fR directory |
| 283 | (if it exists), or (finally) anywhere in the system's file tree of |
| 284 | compiled entries. |
| 285 | .PP |
| 286 | The error messages from this \fBtic\fR have the same format as GNU C |
| 287 | error messages, and can be parsed by GNU Emacs's compile facility. |
| 288 | .PP |
| 289 | The |
| 290 | \fB-C\fR, |
| 291 | \fB-G\fR, |
| 292 | \fB-I\fR, |
| 293 | \fB-N\fR, |
| 294 | \fB-R\fR, |
| 295 | \fB-T\fR, |
| 296 | \fB-V\fR, |
| 297 | \fB-a\fR, |
| 298 | \fB-e\fR, |
| 299 | \fB-f\fR, |
| 300 | \fB-g\fR, |
| 301 | \fB-o\fR, |
| 302 | \fB-r\fR, |
| 303 | \fB-s\fR, |
| 304 | \fB-t\fR and |
| 305 | \fB-x\fR |
| 306 | options |
| 307 | are not supported under SVr4. |
| 308 | The SVr4 \fB-c\fR mode does not report bad use links. |
| 309 | .PP |
| 310 | System V does not compile entries to or read entries from your |
| 311 | \fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it. |
| 312 | .SH FILES |
| 313 | .TP 5 |
| 314 | \fB\*d/?/*\fR |
| 315 | Compiled terminal description database. |
| 316 | .SH SEE ALSO |
| 317 | \fB@INFOCMP@\fR(1M), |
| 318 | \fB@CAPTOINFO@\fR(1M), |
| 319 | \fB@INFOTOCAP@\fR(1M), |
| 320 | \fB@TOE@\fR(1M), |
| 321 | \fBcurses\fR(3X), |
| 322 | \fBterminfo\fR(\*n). |
| 323 | .PP |
| 324 | This describes \fBncurses\fR |
| 325 | version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). |
| 326 | .\"# |
| 327 | .\"# The following sets edit modes for GNU EMACS |
| 328 | .\"# Local Variables: |
| 329 | .\"# mode:nroff |
| 330 | .\"# fill-column:79 |
| 331 | .\"# End: |