2 ****************************************************************************
3 * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
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: *
13 * The above copyright notice and this permission notice shall be included *
14 * in all copies or substantial portions of the Software. *
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. *
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 *
28 ****************************************************************************
29 * @Id: tic.1m,v 1.63 2017/01/14 19:50:09 tom Exp @
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
34 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
35 <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
37 <link rev=made href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
41 <H1 class="no-header">tic 1m</H1>
43 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
48 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
49 <STRONG>tic</STRONG> - the <EM>terminfo</EM> entry-description compiler
52 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
53 <STRONG>tic</STRONG> [<STRONG>-01CDGIKLNTUVWacfgqrstx</STRONG>] [<STRONG>-e</STRONG> <EM>names</EM>] [<STRONG>-o</STRONG> <EM>dir</EM>] [<STRONG>-Q</STRONG>[<EM>n</EM>]]
54 [<STRONG>-R</STRONG> <EM>subset</EM>] [<STRONG>-v</STRONG>[<EM>n</EM>]] [<STRONG>-w</STRONG>[<EM>n</EM>]] <EM>file</EM>
57 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
58 The <STRONG>tic</STRONG> command translates a <STRONG>terminfo</STRONG> file from source
59 format into compiled format. The compiled format is nec-
60 essary for use with the library routines in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
62 As described in <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, the database may be either a
63 directory tree (one file per terminal entry) or a hashed
64 database (one record per entry). The <STRONG>tic</STRONG> command writes
65 only one type of entry, depending on how it was built:
67 <STRONG>o</STRONG> For directory trees, the top-level directory, e.g.,
68 /usr/share/terminfo, specifies the location of the
71 <STRONG>o</STRONG> For hashed databases, a filename is needed. If the
72 given file is not found by that name, but can be found
73 by adding the suffix ".db", then that is used.
75 The default name for the hashed database is the same
76 as the default directory name (only adding a ".db"
79 In either case (directory or hashed database), <STRONG>tic</STRONG> will
80 create the container if it does not exist. For a direc-
81 tory, this would be the "terminfo" leaf, versus a "ter-
84 The results are normally placed in the system terminfo
85 database <STRONG>/usr/share/terminfo</STRONG>. The compiled terminal
86 description can be placed in a different terminfo data-
87 base. There are two ways to achieve this:
89 <STRONG>o</STRONG> First, you may override the system default either by
90 using the <STRONG>-o</STRONG> option, or by setting the variable <STRONG>TER-</STRONG>
91 <STRONG>MINFO</STRONG> in your shell environment to a valid database
94 <STRONG>o</STRONG> Secondly, if <STRONG>tic</STRONG> cannot write in <EM>/usr/share/terminfo</EM>
95 or the location specified using your TERMINFO vari-
96 able, it looks for the directory <EM>$HOME/.terminfo</EM> (or
97 hashed database <EM>$HOME/.terminfo.db)</EM>; if that location
98 exists, the entry is placed there.
100 Libraries that read terminfo entries are expected to check
103 <STRONG>o</STRONG> a location specified with the TERMINFO environment
106 <STRONG>o</STRONG> <EM>$HOME/.terminfo</EM>,
108 <STRONG>o</STRONG> directories listed in the TERMINFO_DIRS environment
111 <STRONG>o</STRONG> a compiled-in list of directories
112 (/usr/local/ncurses/share/terminfo:/usr/share/ter-
115 <STRONG>o</STRONG> the system terminfo database (<EM>/usr/share/terminfo</EM>).
118 </PRE><H3><a name="h3-OPTIONS">OPTIONS</a></H3><PRE>
119 <STRONG>-0</STRONG> restricts the output to a single line
121 <STRONG>-1</STRONG> restricts the output to a single column
123 <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities
124 rather than discarding them. Capabilities are com-
125 mented by prefixing them with a period. This sets
126 the <STRONG>-x</STRONG> option, because it treats the commented-out
127 entries as user-defined names. If the source is
128 termcap, accept the 2-character names required by
129 version 6. Otherwise these are ignored.
131 <STRONG>-C</STRONG> Force source translation to termcap format. Note:
132 this differs from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in
133 that it does not merely translate capability names,
134 but also translates terminfo strings to termcap
135 format. Capabilities that are not translatable are
136 left in the entry under their terminfo names but
137 commented out with two preceding dots. The actual
138 format used incorporates some improvements for
139 escaped characters from terminfo format. For a
140 stricter BSD-compatible translation, add the <STRONG>-K</STRONG>
143 If this is combined with <STRONG>-c</STRONG>, <STRONG>tic</STRONG> makes additional
144 checks to report cases where the terminfo values do
145 not have an exact equivalent in termcap form. For
148 <STRONG>o</STRONG> <STRONG>sgr</STRONG> usually will not convert, because termcap
149 lacks the ability to work with more than two
150 parameters, and because termcap lacks many of
151 the arithmetic/logical operators used in ter-
154 <STRONG>o</STRONG> capabilities with more than one delay or with
155 delays before the end of the string will not
158 <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including
159 syntax problems and bad use links. If you specify
160 <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this option, the code will print warn-
161 ings about entries which, after use resolution, are
162 more than 1023 (4096) bytes long. Due to a fixed
163 buffer length in older termcap libraries, as well
164 as buggy checking for the buffer length (and a doc-
165 umented limit in terminfo), these entries may cause
166 core dumps with other implementations.
168 <STRONG>tic</STRONG> checks string capabilities to ensure that those
169 with parameters will be valid expressions. It does
170 this check only for the predefined string capabili-
171 ties; those which are defined with the <STRONG>-x</STRONG> option
174 <STRONG>-D</STRONG> tells <STRONG>tic</STRONG> to print the database locations that it
175 knows about, and exit. The first location shown is
176 the one to which it would write compiled terminal
177 descriptions. If <STRONG>tic</STRONG> is not able to find a
178 writable database location according to the rules
179 summarized above, it will print a diagnostic and
180 exit with an error rather than printing a list of
183 <STRONG>-e</STRONG> <EM>names</EM>
184 Limit writes and translations to the following
185 comma-separated list of terminals. If any name or
186 alias of a terminal matches one of the names in the
187 list, the entry will be written or translated as
188 normal. Otherwise no output will be generated for
189 it. The option value is interpreted as a file con-
190 taining the list if it contains a '/'. (Note:
191 depending on how tic was compiled, this option may
192 require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
194 <STRONG>-f</STRONG> Display complex terminfo strings which contain
195 if/then/else/endif expressions indented for read-
198 <STRONG>-G</STRONG> Display constant literals in decimal form rather
199 than their character equivalents.
201 <STRONG>-g</STRONG> Display constant character literals in quoted form
202 rather than their decimal equivalents.
204 <STRONG>-I</STRONG> Force source translation to terminfo format.
206 <STRONG>-K</STRONG> Suppress some longstanding ncurses extensions to
207 termcap format, e.g., "\s" for space.
209 <STRONG>-L</STRONG> Force source translation to terminfo format using
210 the long C variable names listed in <<STRONG>term.h</STRONG>>
212 <STRONG>-N</STRONG> Disable smart defaults. Normally, when translating
213 from termcap to terminfo, the compiler makes a num-
214 ber of assumptions about the defaults of string
215 capabilities <STRONG>reset1_string</STRONG>, <STRONG>carriage_return</STRONG>, <STRONG>cur-</STRONG>
216 <STRONG>sor_left</STRONG>, <STRONG>cursor_down</STRONG>, <STRONG>scroll_forward</STRONG>, <STRONG>tab</STRONG>, <STRONG>new-</STRONG>
217 <STRONG>line</STRONG>, <STRONG>key_backspace</STRONG>, <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then
218 attempts to use obsolete termcap capabilities to
219 deduce correct values. It also normally suppresses
220 output of obsolete termcap capabilities such as <STRONG>bs</STRONG>.
221 This option forces a more literal translation that
222 also preserves the obsolete capabilities.
224 <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given database location.
225 Overrides the TERMINFO environment variable.
227 <STRONG>-Q</STRONG><EM>n</EM> Rather than show source in terminfo (text) format,
228 print the compiled (binary) format in hexadecimal
229 or base64 form, depending on the option's value:
235 3 hexadecimal and base64
237 <STRONG>-q</STRONG> Suppress comments and blank lines when showing
240 <STRONG>-R</STRONG><EM>subset</EM>
241 Restrict output to a given subset. This option is
242 for use with archaic versions of terminfo like
243 those on SVr1, Ultrix, or HP/UX that do not support
244 the full set of SVR4/XSI Curses terminfo; and out-
245 right broken ports like AIX 3.x that have their own
246 extensions incompatible with SVr4/XSI. Available
247 subsets are "SVr1", "Ultrix", "HP", "BSD" and
248 "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details.
250 <STRONG>-r</STRONG> Force entry resolution (so there are no remaining
251 tc capabilities) even when doing translation to
252 termcap format. This may be needed if you are pre-
253 paring a termcap file for a termcap library (such
254 as GNU termcap through version 1.3 or BSD termcap
255 through 4.3BSD) that does not handle multiple tc
256 capabilities per entry.
258 <STRONG>-s</STRONG> Summarize the compile by showing the database loca-
259 tion into which entries are written, and the number
260 of entries which are compiled.
262 <STRONG>-T</STRONG> eliminates size-restrictions on the generated text.
263 This is mainly useful for testing and analysis,
264 since the compiled descriptions are limited (e.g.,
265 1023 for termcap, 4096 for terminfo).
267 <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities.
268 Normally when translating from terminfo to termcap,
269 untranslatable capabilities are commented-out.
271 <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing
272 the source file. Normally, it infers data which is
273 commonly missing in older terminfo data, or in term-
276 <STRONG>-V</STRONG> reports the version of ncurses which was used in this
279 <STRONG>-v</STRONG><EM>n</EM> specifies that (verbose) output be written to stan-
280 dard error trace information showing <STRONG>tic</STRONG>'s progress.
282 The optional parameter <EM>n</EM> is a number from 1 to 10,
283 inclusive, indicating the desired level of detail of
284 information. If ncurses is built without tracing
285 support, the optional parameter is ignored. If <EM>n</EM> is
286 omitted, the default level is 1. If <EM>n</EM> is specified
287 and greater than 1, the level of detail is increased.
289 The debug flag levels are as follows:
291 1 Names of files created and linked
293 2 Information related to the "use" facility
295 3 Statistics from the hashing algorithm
297 5 String-table memory allocations
299 7 Entries into the string-table
301 8 List of tokens encountered by scanner
303 9 All values computed in construction of the
306 If the debug level <EM>n</EM> is not given, it is taken to be
309 <STRONG>-W</STRONG> By itself, the <STRONG>-w</STRONG> option will not force long strings
310 to be wrapped. Use the <STRONG>-W</STRONG> option to do this.
312 <STRONG>-w</STRONG><EM>n</EM> specifies the width of the output. The parameter is
313 optional. If it is omitted, it defaults to 60.
315 <STRONG>-x</STRONG> Treat unknown capabilities as user-defined. That is,
316 if you supply a capability name which <STRONG>tic</STRONG> does not
317 recognize, it will infer its type (boolean, number or
318 string) from the syntax and make an extended table
319 entry for that. User-defined capability strings
320 whose name begins with "k" are treated as function
324 </PRE><H3><a name="h3-PARAMETERS">PARAMETERS</a></H3><PRE>
325 <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions
326 in source format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each descrip-
327 tion in the file describes the capabilities of a
330 If <EM>file</EM> is "-", then the data is read from the
331 standard input. The <EM>file</EM> parameter may also be the
332 path of a character-device.
335 </PRE><H3><a name="h3-PROCESSING">PROCESSING</a></H3><PRE>
336 All but one of the capabilities recognized by <STRONG>tic</STRONG> are doc-
337 umented in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. The exception is the <STRONG>use</STRONG> capabil-
340 When a <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM> field is discovered in a terminal
341 entry currently being compiled, <STRONG>tic</STRONG> reads in the binary
342 from <STRONG>/usr/share/terminfo</STRONG> to complete the entry. (Entries
343 created from <EM>file</EM> will be used first. <STRONG>tic</STRONG> duplicates the
344 capabilities in <EM>entry</EM>-<EM>name</EM> for the current entry, with the
345 exception of those capabilities that explicitly are
346 defined in the current entry.
348 When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a
349 <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field, any canceled capabilities in
350 <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG>
351 for these capabilities to be canceled in <STRONG>entry_name_1</STRONG>.
353 Total compiled entries cannot exceed 4096 bytes. The name
354 field cannot exceed 512 bytes. Terminal names exceeding
355 the maximum alias length (32 characters on systems with
356 long filenames, 14 characters otherwise) will be truncated
357 to the maximum alias length and a warning message will be
361 </PRE><H2><a name="h2-COMPATIBILITY">COMPATIBILITY</a></H2><PRE>
362 There is some evidence that historic <STRONG>tic</STRONG> implementations
363 treated description fields with no whitespace in them as
364 additional aliases or short names. This <STRONG>tic</STRONG> does not do
365 that, but it does warn when description fields may be
366 treated that way and check them for dangerous characters.
369 </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
370 Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actu-
371 ally compile termcap sources. In fact, entries in ter-
372 minfo and termcap syntax can be mixed in a single source
373 file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of termcap names taken
374 to be equivalent to terminfo names.
376 The SVr4 manual pages are not clear on the resolution
377 rules for <STRONG>use</STRONG> capabilities. This implementation of <STRONG>tic</STRONG>
378 will find <STRONG>use</STRONG> targets anywhere in the source file, or any-
379 where in the file tree rooted at <STRONG>TERMINFO</STRONG> (if <STRONG>TERMINFO</STRONG> is
380 defined), or in the user's <EM>$HOME/.terminfo</EM> database (if it
381 exists), or (finally) anywhere in the system's file tree
384 The error messages from this <STRONG>tic</STRONG> have the same format as
385 GNU C error messages, and can be parsed by GNU Emacs's
388 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>,
389 <STRONG>-o</STRONG>, <STRONG>-r</STRONG>, <STRONG>-s</STRONG>, <STRONG>-t</STRONG> and <STRONG>-x</STRONG> options are not supported under
390 SVr4. The SVr4 <STRONG>-c</STRONG> mode does not report bad use links.
392 System V does not compile entries to or read entries from
393 your <EM>$HOME/.terminfo</EM> database unless TERMINFO is explic-
397 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
398 <STRONG>/usr/share/terminfo/?/*</STRONG>
399 Compiled terminal description database.
402 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
403 <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>,
404 <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>.
406 This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170128).
409 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
410 Eric S. Raymond <esr@snark.thyrsus.com> and
411 Thomas E. Dickey <dickey@invisible-island.net>
415 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
419 <li><a href="#h2-NAME">NAME</a></li>
420 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
421 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
423 <li><a href="#h3-OPTIONS">OPTIONS</a></li>
424 <li><a href="#h3-PARAMETERS">PARAMETERS</a></li>
425 <li><a href="#h3-PROCESSING">PROCESSING</a></li>
428 <li><a href="#h2-COMPATIBILITY">COMPATIBILITY</a></li>
429 <li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
430 <li><a href="#h2-FILES">FILES</a></li>
431 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
432 <li><a href="#h2-AUTHOR">AUTHOR</a></li>