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 $
30 .Dd September 14, 2013
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 column
86 to retain commented-out capabilities rather than discarding them.
87 Capabilities are commented by prefixing them with a period.
90 option, because it treats the commented-out entries as user-defined names.
91 If the source is termcap, accept the 2-character names required by version 6.
92 Otherwise these are ignored.
94 Force source translation to termcap format.
95 Capabilities that are not translatable are left in the entry under
96 their terminfo names but commented out with two preceding dots.
102 for errors, including syntax problems and bad use links.
106 with this option, the code will print warnings about entries which,
107 after use resolution, are more than 1023 (4096) bytes long.
108 Due to a fixed buffer length in older termcap libraries
109 (and a documented limit in terminfo),
110 these entries may cause core dumps.
112 Limit writes and translations to the following comma-separated list of
114 If any name or alias of a terminal matches one of the names in
115 the list, the entry will be written or translated as normal.
116 Otherwise no output will be generated for it.
117 The option value is interpreted as a file containing the list if it
120 Note: depending on how
122 was compiled, this option may require
127 Display complex terminfo strings which contain if/then/else/endif expressions
128 indented for readability.
130 Display constant literals in decimal form
131 rather than their character equivalents.
133 Display constant character literals in quoted form
134 rather than their decimal equivalents.
136 Force source translation to terminfo format.
138 Force source translation to terminfo format
139 using the long C variable names listed in
142 Disable smart defaults.
143 Normally, when translating from termcap to terminfo, the compiler makes
144 a number of assumptions about the defaults of string capabilities
146 .Cm carriage_return ,
156 then attempts to use obsolete termcap capabilities to deduce correct values.
157 It also normally suppresses output of obsolete termcap capabilities such as
159 This option forces a more literal translation that also preserves the
160 obsolete capabilities.
162 Write compiled entries to given directory.
165 environment variable.
167 Restrict output to a given subset.
168 This option is for use with archaic versions of terminfo like those on
169 SVr1, Ultrix, or HP/UX that do not support the full set of
170 SVR4/XSI Curses terminfo;
171 and outright broken ports like AIX 3.x
172 that have their own extensions incompatible with SVr4/XSI.
173 Available subsets are
184 Force entry resolution (so there are no remaining tc capabilities) even
185 when doing translation to termcap format.
186 This may be needed if you are
187 preparing a termcap file for a termcap library (such as GNU termcap through
188 version 1.3 or BSD termcap through
190 that does not handle multiple tc capabilities per entry.
192 Summarize the compile by showing the directory into which entries
193 are written, and the number of entries which are compiled.
195 eliminates size-restrictions on the generated text.
196 This is mainly useful for testing and analysis, since the compiled
197 descriptions are limited (e.g. 1023 for termcap, 4096 for terminfo).
201 to discard commented-out capabilities.
202 Normally when translating from terminfo to termcap,
203 untranslatable capabilities are commented-out.
207 to not post-process the data after parsing the source file.
208 Normally, it infers data which is commonly missing in older terminfo data,
211 reports the version of
213 which was used in this program, and exits.
215 specifies that (verbose) output be written to standard error trace
219 The optional parameter
221 is a number from 1 to 10, inclusive,
222 indicating the desired level of detail of information.
225 is omitted, the default level is 1.
228 is specified and greater than 1, the level of
231 specifies the width of the output.
232 The parameter is optional.
233 If it is omitted, it defaults to 60.
235 Treat unknown capabilities as user-defined.
236 That is, if you supply a capability name which
238 does not recognize, it will infer its type (boolean, number or string)
239 from the syntax and make an extended table entry for that.
240 User-defined capability strings
241 whose name begins with
243 are treated as function keys.
247 terminal descriptions in source format.
248 Each description in the file
249 describes the capabilities of a particular terminal.
252 The debug flag levels are as follows:
253 .Bl -tag -width "1xxx"
255 Names of files created and linked
257 Information related to the
261 Statistics from the hashing algorithm
263 String-table memory allocations
265 Entries into the string-table
267 List of tokens encountered by scanner
269 All values computed in construction of the hash table
274 is not given, it is taken to be one.
276 All but one of the capabilities recognized by
285 .Cm use Ns Li = Ns Ar entry-name
286 field is discovered in a terminal entry currently being compiled,
288 reads in the binary from
289 .Pa /usr/share/terminfo
290 to complete the entry.
291 (Entries created from
294 If the environment variable
296 is set, that directory is searched instead of
297 .Pa /usr/share/terminfo . )
299 duplicates the capabilities in
301 for the current entry, with the exception of
302 those capabilities that explicitly are defined in the current entry.
304 When an entry, e.g.\&
307 .Cm use Ns Li = Ns Li entry_name_2
308 field, any canceled capabilities in
314 for these capabilities to be canceled in
317 If the environment variable
319 is set, the compiled results are placed there instead of
320 .Pa /usr/share/terminfo .
322 Total compiled entries cannot exceed 4096 bytes.
323 The name field cannot exceed 512 bytes.
324 Terminal names exceeding the maximum alias length
325 (32 characters on systems with long filenames, 14 characters otherwise)
326 will be truncated to the maximum alias length and a warning message
329 There is some evidence that historic
331 implementations treated description fields with no whitespace
332 in them as additional aliases or short names.
335 does not do that, but it does warn when description fields may be
336 treated that way and check them for dangerous characters.
338 Unlike the stock SVr4
340 command, this implementation can actually compile termcap sources.
341 In fact, entries in terminfo and termcap syntax can
342 be mixed in a single source file.
345 for the list of termcap names taken to be equivalent to terminfo names.
347 The SVr4 manual pages are not clear on the resolution rules for
350 This implementation of
354 targets anywhere in the source file,
355 or anywhere in the file tree rooted at
357 (if it is defined), or in the user's
359 directory (if it exists), or (finally) anywhere in the system's
360 file tree of compiled entries.
362 The error messages from this
364 have the same format as GNU C error messages,
365 and can be parsed by GNU Emacs's compile facility.
385 options are not supported under SVr4.
388 mode does not report bad use links.
390 System V does not compile entries to or read entries from your
394 is explicitly set to it.
396 .Bl -tag -width "Pa /usr/share/terminfo/?/*"
397 .It Pa /usr/share/terminfo/?/*
398 Compiled terminal description database.
404 .An Eric S. Raymond Aq Mt esr@snark.thyrsus.com
405 .An Thomas E. Dickey Aq Mt dickey@invisible-island.net