1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
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: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
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. *
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 *
27 .\"***************************************************************************
29 .\" $Id: tic.1m,v 1.47 2010/12/04 18:38:55 tom Exp $
35 .Nd the terminfo entry-description compiler
38 .Op Fl 1CGILNTUVacfgrstx
50 file from source format into compiled format.
51 The compiled format is necessary for use with the library routines in
54 The results are normally placed in the system terminfo directory
55 .Pa /usr/share/terminfo .
56 There are two ways to change this behavior.
58 First, you may override the system default by setting the variable
60 in your shell environment to a valid (existing) directory name.
65 .Pa /usr/share/terminfo
68 directory, it looks for the directory
70 if that directory exists, the entry is placed there.
72 Libraries that read terminfo entries are expected to check for a
74 directory first, look at
78 is not set, and finally look in
79 .Pa /usr/share/terminfo .
80 .Bl -tag -width ".Fl R subset"
82 restricts the output to a single line
84 restricts the output to a single column
88 to retain commented-out capabilities rather than discarding them.
89 Capabilities are commented by prefixing them with a period.
92 option, because it treats the commented-out entries as user-defined names.
93 If the source is termcap, accept the 2-character names required by version 6.
94 Otherwise these are ignored.
96 Force source translation to termcap format.
97 Capabilities that are not translatable are left in the entry under
98 their terminfo names but commented out with two preceding dots.
99 The actual format used incorporates some improvements for escaped characters
100 from terminfo format.
101 For a stricter BSD-compatible translation, add the
105 If this is combined with
108 makes additional checks to report cases
109 where the terminfo values do not have an exact equivalent in termcap form.
113 sgr usually will not convert, because termcap lacks the ability to work
114 with more than two parameters, and because termcap lacks many of the
115 arithmetic/logical operators used in terminfo.
117 capabilities with more than one delay or with delays before the end of
118 the string will not convert completely.
125 for errors, including syntax problems and bad use links.
129 with this option, the code will print warnings about entries which,
130 after use resolution, are more than 1023 (4096) bytes long.
131 Due to a fixed buffer length in older termcap libraries
132 (and a documented limit in terminfo),
133 these entries may cause core dumps with other implementations.
136 checks string capabilities to ensure that those with parameters will be
138 It does this check only for the predefined string
139 capabilities; those which are defined with the
145 to print the database locations that it knows about, and exit.
146 The first location shown is the one to which it would write compiled
147 terminal descriptions.
150 is not able to find a writable database location according to the rules
151 summarized above, it will print a diagnostic and exit with an
152 error rather than printing a list of database locations.
154 Limit writes and translations to the following comma-separated list of
156 If any name or alias of a terminal matches one of the names in
157 the list, the entry will be written or translated as normal.
158 Otherwise no output will be generated for it.
159 The option value is interpreted as a file containing the list if it
162 Note: depending on how
164 was compiled, this option may require
169 Display complex terminfo strings which contain if/then/else/endif expressions
170 indented for readability.
172 Display constant literals in decimal form
173 rather than their character equivalents.
175 Display constant character literals in quoted form
176 rather than their decimal equivalents.
178 Force source translation to terminfo format.
180 Suppress some longstanding ncurses extensions to termcap format,
187 Force source translation to terminfo format
188 using the long C variable names listed in
191 Disable smart defaults.
192 Normally, when translating from termcap to terminfo, the compiler makes
193 a number of assumptions about the defaults of string capabilities
195 .Cm carriage_return ,
205 then attempts to use obsolete termcap capabilities to deduce correct values.
206 It also normally suppresses output of obsolete termcap capabilities such as
208 This option forces a more literal translation that also preserves the
209 obsolete capabilities.
211 Write compiled entries to given directory.
214 environment variable.
216 Restrict output to a given subset.
217 This option is for use with archaic versions of terminfo like those on
218 SVr1, Ultrix, or HP/UX that do not support the full set of
219 SVR4/XSI Curses terminfo;
220 and outright broken ports like AIX 3.x
221 that have their own extensions incompatible with SVr4/XSI.
222 Available subsets are
233 Force entry resolution (so there are no remaining tc capabilities) even
234 when doing translation to termcap format.
235 This may be needed if you are
236 preparing a termcap file for a termcap library (such as GNU termcap through
237 version 1.3 or BSD termcap through
239 that does not handle multiple tc capabilities per entry.
241 Summarize the compile by showing the directory into which entries
242 are written, and the number of entries which are compiled.
244 eliminates size-restrictions on the generated text.
245 This is mainly useful for testing and analysis, since the compiled
246 descriptions are limited (e.g.\& 1023 for termcap, 4096 for terminfo).
250 to discard commented-out capabilities.
251 Normally when translating from terminfo to termcap,
252 untranslatable capabilities are commented-out.
256 to not post-process the data after parsing the source file.
257 Normally, it infers data which is commonly missing in older terminfo data,
260 reports the version of
262 which was used in this program, and exits.
264 specifies that (verbose) output be written to standard error trace
268 The optional parameter
270 is a number from 1 to 10, inclusive,
271 indicating the desired level of detail of information.
274 is omitted, the default level is 1.
277 is specified and greater than 1, the level of
280 The debug flag levels are as follows:
281 .Bl -tag -width "1xxx" -compact
283 Names of files created and linked
285 Information related to the
289 Statistics from the hashing algorithm
291 String-table memory allocations
293 Entries into the string-table
295 List of tokens encountered by scanner
297 All values computed in construction of the hash table
302 is not given, it is taken to be one.
304 specifies the width of the output.
305 The parameter is optional.
306 If it is omitted, it defaults to 60.
308 Treat unknown capabilities as user-defined.
309 That is, if you supply a capability name which
311 does not recognize, it will infer its type (boolean, number or string)
312 from the syntax and make an extended table entry for that.
313 User-defined capability strings
314 whose name begins with
316 are treated as function keys.
319 .Bl -tag -width "file"
323 terminal descriptions in source format.
324 Each description in the file
325 describes the capabilities of a particular terminal.
327 If file is "-", then the data is read from the standard input.
328 The file parameter may also be the path of a character-device.
331 All but one of the capabilities recognized by
340 .Cm use Ns Li = Ns Ar entry-name
341 field is discovered in a terminal entry currently being compiled,
343 reads in the binary from
344 .Pa /usr/share/terminfo
345 to complete the entry.
346 (Entries created from
349 If the environment variable
351 is set, that directory is searched instead of
352 .Pa /usr/share/terminfo . )
354 duplicates the capabilities in
356 for the current entry, with the exception of
357 those capabilities that explicitly are defined in the current entry.
359 When an entry, e.g.\&
362 .Cm use Ns Li = Ns Li entry_name_2
363 field, any canceled capabilities in
369 for these capabilities to be canceled in
372 If the environment variable
374 is set, the compiled results are placed there instead of
375 .Pa /usr/share/terminfo .
377 Total compiled entries cannot exceed 4096 bytes.
378 The name field cannot exceed 512 bytes.
379 Terminal names exceeding the maximum alias length
380 (32 characters on systems with long filenames, 14 characters otherwise)
381 will be truncated to the maximum alias length and a warning message
384 There is some evidence that historic
386 implementations treated description fields with no whitespace
387 in them as additional aliases or short names.
390 does not do that, but it does warn when description fields may be
391 treated that way and check them for dangerous characters.
393 Unlike the stock SVr4
395 command, this implementation can actually compile termcap sources.
396 In fact, entries in terminfo and termcap syntax can
397 be mixed in a single source file.
400 for the list of termcap names taken to be equivalent to terminfo names.
402 The SVr4 manual pages are not clear on the resolution rules for
405 This implementation of
409 targets anywhere in the source file,
410 or anywhere in the file tree rooted at
412 (if it is defined), or in the user's
414 directory (if it exists), or (finally) anywhere in the system's
415 file tree of compiled entries.
417 The error messages from this
419 have the same format as GNU C error messages,
420 and can be parsed by GNU Emacs's compile facility.
440 options are not supported under SVr4.
443 mode does not report bad use links.
445 System V does not compile entries to or read entries from your
449 is explicitly set to it.
451 .Bl -tag -width "Pa /usr/share/terminfo/?/*"
452 .It Pa /usr/share/terminfo/?/*
453 Compiled terminal description database.
459 .An Eric S. Raymond Aq Mt esr@snark.thyrsus.com
460 .An Thomas E. Dickey Aq Mt dickey@invisible-island.net