1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
3 ****************************************************************************
4 * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
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: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
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. *
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 *
29 ****************************************************************************
30 * @Id: tic.1m,v 1.60 2014/05/24 22:00:11 tom Exp @
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
50 <STRONG>tic</STRONG> - the <EM>terminfo</EM> entry-description compiler
54 <H2>SYNOPSIS</H2><PRE>
55 <STRONG>tic</STRONG> [<STRONG>-01CDGIKLNTUVacfgrstx</STRONG>] [<STRONG>-e</STRONG> <EM>names</EM>] [<STRONG>-o</STRONG> <EM>dir</EM>] [<STRONG>-R</STRONG> <EM>sub-</EM>
56 <EM>set</EM>] [<STRONG>-v</STRONG>[<EM>n</EM>]] [<STRONG>-w</STRONG>[<EM>n</EM>]] <EM>file</EM>
60 <H2>DESCRIPTION</H2><PRE>
61 The <STRONG>tic</STRONG> command translates a <STRONG>terminfo</STRONG> file from source
62 format into compiled format. The compiled format is nec-
63 essary for use with the library routines in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
65 As described in <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, the database may be either a
66 directory tree (one file per terminal entry) or a hashed
67 database (one record per entry). The <STRONG>tic</STRONG> command writes
68 only one type of entry, depending on how it was built:
70 <STRONG>o</STRONG> For directory trees, the top-level directory, e.g.,
71 /usr/share/terminfo, specifies the location of the
74 <STRONG>o</STRONG> For hashed databases, a filename is needed. If the
75 given file is not found by that name, but can be found
76 by adding the suffix ".db", then that is used.
78 The default name for the hashed database is the same
79 as the default directory name (only adding a ".db"
82 In either case (directory or hashed database), <STRONG>tic</STRONG> will
83 create the container if it does not exist. For a direc-
84 tory, this would be the "terminfo" leaf, versus a "ter-
87 The results are normally placed in the system terminfo
88 database <STRONG>/usr/share/terminfo</STRONG>. The compiled terminal
89 description can be placed in a different terminfo data-
90 base. There are two ways to achieve this:
92 <STRONG>o</STRONG> First, you may override the system default either by
93 using the <STRONG>-o</STRONG> option, or by setting the variable <STRONG>TER-</STRONG>
94 <STRONG>MINFO</STRONG> in your shell environment to a valid database
97 <STRONG>o</STRONG> Secondly, if <STRONG>tic</STRONG> cannot write in <EM>/usr/share/terminfo</EM>
98 or the location specified using your TERMINFO vari-
99 able, it looks for the directory <EM>$HOME/.terminfo</EM> (or
100 hashed database <EM>$HOME/.terminfo.db)</EM>; if that location
101 exists, the entry is placed there.
103 Libraries that read terminfo entries are expected to check
106 <STRONG>o</STRONG> a location specified with the TERMINFO environment
109 <STRONG>o</STRONG> <EM>$HOME/.terminfo</EM>,
111 <STRONG>o</STRONG> directories listed in the TERMINFO_DIRS environment
114 <STRONG>o</STRONG> a compiled-in list of directories
115 (/usr/local/ncurses/share/terminfo:/usr/share/ter-
118 <STRONG>o</STRONG> the system terminfo database (<EM>/usr/share/terminfo</EM>).
120 <STRONG>OPTIONS</STRONG>
121 <STRONG>-0</STRONG> restricts the output to a single line
123 <STRONG>-1</STRONG> restricts the output to a single column
125 <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities
126 rather than discarding them. Capabilities are com-
127 mented by prefixing them with a period. This sets
128 the <STRONG>-x</STRONG> option, because it treats the commented-out
129 entries as user-defined names. If the source is
130 termcap, accept the 2-character names required by
131 version 6. Otherwise these are ignored.
133 <STRONG>-C</STRONG> Force source translation to termcap format. Note:
134 this differs from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in
135 that it does not merely translate capability names,
136 but also translates terminfo strings to termcap
137 format. Capabilities that are not translatable are
138 left in the entry under their terminfo names but
139 commented out with two preceding dots. The actual
140 format used incorporates some improvements for
141 escaped characters from terminfo format. For a
142 stricter BSD-compatible translation, add the <STRONG>-K</STRONG>
145 If this is combined with <STRONG>-c</STRONG>, <STRONG>tic</STRONG> makes additional
146 checks to report cases where the terminfo values do
147 not have an exact equivalent in termcap form. For
150 <STRONG>o</STRONG> <STRONG>sgr</STRONG> usually will not convert, because termcap
151 lacks the ability to work with more than two
152 parameters, and because termcap lacks many of
153 the arithmetic/logical operators used in ter-
156 <STRONG>o</STRONG> capabilities with more than one delay or with
157 delays before the end of the string will not
160 <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including
161 syntax problems and bad use links. If you specify
162 <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this option, the code will print warn-
163 ings about entries which, after use resolution, are
164 more than 1023 (4096) bytes long. Due to a fixed
165 buffer length in older termcap libraries, as well
166 as buggy checking for the buffer length (and a doc-
167 umented limit in terminfo), these entries may cause
168 core dumps with other implementations.
170 <STRONG>tic</STRONG> checks string capabilities to ensure that those
171 with parameters will be valid expressions. It does
172 this check only for the predefined string capabili-
173 ties; those which are defined with the <STRONG>-x</STRONG> option
176 <STRONG>-D</STRONG> tells <STRONG>tic</STRONG> to print the database locations that it
177 knows about, and exit. The first location shown is
178 the one to which it would write compiled terminal
179 descriptions. If <STRONG>tic</STRONG> is not able to find a
180 writable database location according to the rules
181 summarized above, it will print a diagnostic and
182 exit with an error rather than printing a list of
185 <STRONG>-e</STRONG> <EM>names</EM>
186 Limit writes and translations to the following
187 comma-separated list of terminals. If any name or
188 alias of a terminal matches one of the names in the
189 list, the entry will be written or translated as
190 normal. Otherwise no output will be generated for
191 it. The option value is interpreted as a file con-
192 taining the list if it contains a '/'. (Note:
193 depending on how tic was compiled, this option may
194 require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
196 <STRONG>-f</STRONG> Display complex terminfo strings which contain
197 if/then/else/endif expressions indented for read-
200 <STRONG>-G</STRONG> Display constant literals in decimal form rather
201 than their character equivalents.
203 <STRONG>-g</STRONG> Display constant character literals in quoted form
204 rather than their decimal equivalents.
206 <STRONG>-I</STRONG> Force source translation to terminfo format.
208 <STRONG>-K</STRONG> Suppress some longstanding ncurses extensions to
209 termcap format, e.g., "\s" for space.
211 <STRONG>-L</STRONG> Force source translation to terminfo format using
212 the long C variable names listed in <<STRONG>term.h</STRONG>>
214 <STRONG>-N</STRONG> Disable smart defaults. Normally, when translating
215 from termcap to terminfo, the compiler makes a num-
216 ber of assumptions about the defaults of string
217 capabilities <STRONG>reset1_string</STRONG>, <STRONG>carriage_return</STRONG>, <STRONG>cur-</STRONG>
218 <STRONG>sor_left</STRONG>, <STRONG>cursor_down</STRONG>, <STRONG>scroll_forward</STRONG>, <STRONG>tab</STRONG>, <STRONG>new-</STRONG>
219 <STRONG>line</STRONG>, <STRONG>key_backspace</STRONG>, <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then
220 attempts to use obsolete termcap capabilities to
221 deduce correct values. It also normally suppresses
222 output of obsolete termcap capabilities such as <STRONG>bs</STRONG>.
223 This option forces a more literal translation that
224 also preserves the obsolete capabilities.
226 <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given database location.
227 Overrides the TERMINFO environment variable.
229 <STRONG>-R</STRONG><EM>subset</EM>
230 Restrict output to a given subset. This option is
231 for use with archaic versions of terminfo like
232 those on SVr1, Ultrix, or HP/UX that do not support
233 the full set of SVR4/XSI Curses terminfo; and out-
234 right broken ports like AIX 3.x that have their own
235 extensions incompatible with SVr4/XSI. Available
236 subsets are "SVr1", "Ultrix", "HP", "BSD" and
237 "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details.
239 <STRONG>-r</STRONG> Force entry resolution (so there are no remaining
240 tc capabilities) even when doing translation to
241 termcap format. This may be needed if you are pre-
242 paring a termcap file for a termcap library (such
243 as GNU termcap through version 1.3 or BSD termcap
244 through 4.3BSD) that does not handle multiple tc
245 capabilities per entry.
247 <STRONG>-s</STRONG> Summarize the compile by showing the database loca-
248 tion into which entries are written, and the number
249 of entries which are compiled.
251 <STRONG>-T</STRONG> eliminates size-restrictions on the generated text.
252 This is mainly useful for testing and analysis,
253 since the compiled descriptions are limited (e.g.,
254 1023 for termcap, 4096 for terminfo).
256 <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities.
257 Normally when translating from terminfo to termcap,
258 untranslatable capabilities are commented-out.
260 <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing
261 the source file. Normally, it infers data which is
262 commonly missing in older terminfo data, or in term-
265 <STRONG>-V</STRONG> reports the version of ncurses which was used in this
268 <STRONG>-v</STRONG><EM>n</EM> specifies that (verbose) output be written to stan-
269 dard error trace information showing <STRONG>tic</STRONG>'s progress.
270 The optional parameter <EM>n</EM> is a number from 1 to 10,
271 inclusive, indicating the desired level of detail of
272 information. If <EM>n</EM> is omitted, the default level is
273 1. If <EM>n</EM> is specified and greater than 1, the level
274 of detail is increased.
276 The debug flag levels are as follows:
278 1 Names of files created and linked
280 2 Information related to the "use" facility
282 3 Statistics from the hashing algorithm
284 5 String-table memory allocations
286 7 Entries into the string-table
288 8 List of tokens encountered by scanner
290 9 All values computed in construction of the
293 If the debug level <EM>n</EM> is not given, it is taken to be
296 <STRONG>-w</STRONG><EM>n</EM> specifies the width of the output. The parameter is
297 optional. If it is omitted, it defaults to 60.
299 <STRONG>-x</STRONG> Treat unknown capabilities as user-defined. That is,
300 if you supply a capability name which <STRONG>tic</STRONG> does not
301 recognize, it will infer its type (boolean, number or
302 string) from the syntax and make an extended table
303 entry for that. User-defined capability strings
304 whose name begins with "k" are treated as function
307 <STRONG>PARAMETERS</STRONG>
308 <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions
309 in source format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each descrip-
310 tion in the file describes the capabilities of a
313 If <EM>file</EM> is "-", then the data is read from the
314 standard input. The <EM>file</EM> parameter may also be the
315 path of a character-device.
317 <STRONG>PROCESSING</STRONG>
318 All but one of the capabilities recognized by <STRONG>tic</STRONG> are doc-
319 umented in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. The exception is the <STRONG>use</STRONG> capabil-
322 When a <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM> field is discovered in a terminal
323 entry currently being compiled, <STRONG>tic</STRONG> reads in the binary
324 from <STRONG>/usr/share/terminfo</STRONG> to complete the entry. (Entries
325 created from <EM>file</EM> will be used first. <STRONG>tic</STRONG> duplicates the
326 capabilities in <EM>entry</EM>-<EM>name</EM> for the current entry, with the
327 exception of those capabilities that explicitly are
328 defined in the current entry.
330 When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a
331 <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field, any canceled capabilities in
332 <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG>
333 for these capabilities to be canceled in <STRONG>entry_name_1</STRONG>.
335 Total compiled entries cannot exceed 4096 bytes. The name
336 field cannot exceed 512 bytes. Terminal names exceeding
337 the maximum alias length (32 characters on systems with
338 long filenames, 14 characters otherwise) will be truncated
339 to the maximum alias length and a warning message will be
344 <H2>COMPATIBILITY</H2><PRE>
345 There is some evidence that historic <STRONG>tic</STRONG> implementations
346 treated description fields with no whitespace in them as
347 additional aliases or short names. This <STRONG>tic</STRONG> does not do
348 that, but it does warn when description fields may be
349 treated that way and check them for dangerous characters.
353 <H2>EXTENSIONS</H2><PRE>
354 Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actu-
355 ally compile termcap sources. In fact, entries in ter-
356 minfo and termcap syntax can be mixed in a single source
357 file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of termcap names taken
358 to be equivalent to terminfo names.
360 The SVr4 manual pages are not clear on the resolution
361 rules for <STRONG>use</STRONG> capabilities. This implementation of <STRONG>tic</STRONG>
362 will find <STRONG>use</STRONG> targets anywhere in the source file, or any-
363 where in the file tree rooted at <STRONG>TERMINFO</STRONG> (if <STRONG>TERMINFO</STRONG> is
364 defined), or in the user's <EM>$HOME/.terminfo</EM> database (if it
365 exists), or (finally) anywhere in the system's file tree
368 The error messages from this <STRONG>tic</STRONG> have the same format as
369 GNU C error messages, and can be parsed by GNU Emacs's
372 The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-C</STRONG>, <STRONG>-G</STRONG>, <STRONG>-I</STRONG>, <STRONG>-N</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>,
373 <STRONG>-o</STRONG>, <STRONG>-r</STRONG>, <STRONG>-s</STRONG>, <STRONG>-t</STRONG> and <STRONG>-x</STRONG> options are not supported under
374 SVr4. The SVr4 <STRONG>-c</STRONG> mode does not report bad use links.
376 System V does not compile entries to or read entries from
377 your <EM>$HOME/.terminfo</EM> database unless TERMINFO is explic-
383 <STRONG>/usr/share/terminfo/?/*</STRONG>
384 Compiled terminal description database.
388 <H2>SEE ALSO</H2><PRE>
389 <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
390 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
392 This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20141220).
397 Eric S. Raymond <esr@snark.thyrsus.com> and
398 Thomas E. Dickey <dickey@invisible-island.net>
402 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
405 Man(1) output converted with <a href="http://invisible-island.net/scripts/readme.html#others_scripts">man2html</a>