1tic(1M) tic(1M)
2
3
4
6 tic - the terminfo entry-description compiler
7
9 tic [-01CDGIKLNTUVacfgrstx] [-e names] [-o dir] [-R subset] [-v[n]]
10 [-w[n]] file
11
13 The tic command translates a terminfo file from source format into com‐
14 piled format. The compiled format is necessary for use with the
15 library routines in ncurses(3X).
16
17 As described in term(5), the database may be either a directory tree
18 (one file per terminal entry) or a hashed database (one record per
19 entry). The tic command writes only one type of entry, depending on
20 how it was built:
21
22 · For directory trees, the top-level directory, e.g., /usr/share/ter‐
23 minfo, specifies the location of the database.
24
25 · For hashed databases, a filename is needed. If the given file is
26 not found by that name, but can be found by adding the suffix
27 ".db", then that is used.
28
29 The default name for the hashed database is the same as the default
30 directory name (only adding a ".db" suffix).
31
32 In either case (directory or hashed database), tic will create the con‐
33 tainer if it does not exist. For a directory, this would be the "ter‐
34 minfo" leaf, versus a "terminfo.db" file.
35
36 The results are normally placed in the system terminfo database
37 /usr/share/terminfo. The compiled terminal description can be placed
38 in a different terminfo database. There are two ways to achieve this:
39
40 · First, you may override the system default either by using the -o
41 option, or by setting the variable TERMINFO in your shell environ‐
42 ment to a valid database location.
43
44 · Secondly, if tic cannot write in /usr/share/terminfo or the loca‐
45 tion specified using your TERMINFO variable, it looks for the
46 directory $HOME/.terminfo (or hashed database $HOME/.terminfo.db);
47 if that location exists, the entry is placed there.
48
49 Libraries that read terminfo entries are expected to check in succes‐
50 sion
51
52 · a location specified with the TERMINFO environment variable,
53
54 · $HOME/.terminfo,
55
56 · directories listed in the TERMINFO_DIRS environment variable,
57
58 · a compiled-in list of directories (no default value), and
59
60 · the system terminfo database (/usr/share/terminfo).
61
62 OPTIONS
63 -0 restricts the output to a single line
64
65 -1 restricts the output to a single column
66
67 -a tells tic to retain commented-out capabilities rather than dis‐
68 carding them. Capabilities are commented by prefixing them with
69 a period. This sets the -x option, because it treats the com‐
70 mented-out entries as user-defined names. If the source is
71 termcap, accept the 2-character names required by version 6.
72 Otherwise these are ignored.
73
74 -C Force source translation to termcap format. Note: this differs
75 from the -C option of infocmp(1M) in that it does not merely
76 translate capability names, but also translates terminfo strings
77 to termcap format. Capabilities that are not translatable are
78 left in the entry under their terminfo names but commented out
79 with two preceding dots. The actual format used incorporates
80 some improvements for escaped characters from terminfo format.
81 For a stricter BSD-compatible translation, add the -K option.
82
83 -c tells tic to only check file for errors, including syntax prob‐
84 lems and bad use links. If you specify -C (-I) with this
85 option, the code will print warnings about entries which, after
86 use resolution, are more than 1023 (4096) bytes long. Due to a
87 fixed buffer length in older termcap libraries, as well as buggy
88 checking for the buffer length (and a documented limit in ter‐
89 minfo), these entries may cause core dumps with other implemen‐
90 tations.
91
92 -D tells tic to print the database locations that it knows about,
93 and exit. The first location shown is the one to which it would
94 write compiled terminal descriptions. If tic is not able to
95 find a writable database location according to the rules summa‐
96 rized above, it will print a diagnostic and exit with an error
97 rather than printing a list of database locations.
98
99 -e names
100 Limit writes and translations to the following comma-separated
101 list of terminals. If any name or alias of a terminal matches
102 one of the names in the list, the entry will be written or
103 translated as normal. Otherwise no output will be generated for
104 it. The option value is interpreted as a file containing the
105 list if it contains a '/'. (Note: depending on how tic was com‐
106 piled, this option may require -I or -C.)
107
108 -f Display complex terminfo strings which contain
109 if/then/else/endif expressions indented for readability.
110
111 -G Display constant literals in decimal form rather than their
112 character equivalents.
113
114 -g Display constant character literals in quoted form rather than
115 their decimal equivalents.
116
117 -I Force source translation to terminfo format.
118
119 -K Suppress some longstanding ncurses extensions to termcap format,
120 e.g., "\s" for space.
121
122 -L Force source translation to terminfo format using the long C
123 variable names listed in <term.h>
124
125 -N Disable smart defaults. Normally, when translating from termcap
126 to terminfo, the compiler makes a number of assumptions about
127 the defaults of string capabilities reset1_string, car‐
128 riage_return, cursor_left, cursor_down, scroll_forward, tab,
129 newline, key_backspace, key_left, and key_down, then attempts to
130 use obsolete termcap capabilities to deduce correct values. It
131 also normally suppresses output of obsolete termcap capabilities
132 such as bs. This option forces a more literal translation that
133 also preserves the obsolete capabilities.
134
135 -odir Write compiled entries to given database location. Overrides
136 the TERMINFO environment variable.
137
138 -Rsubset
139 Restrict output to a given subset. This option is for use with
140 archaic versions of terminfo like those on SVr1, Ultrix, or
141 HP/UX that do not support the full set of SVR4/XSI Curses ter‐
142 minfo; and outright broken ports like AIX 3.x that have their
143 own extensions incompatible with SVr4/XSI. Available subsets
144 are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see terminfo(5) for
145 details.
146
147 -r Force entry resolution (so there are no remaining tc capabili‐
148 ties) even when doing translation to termcap format. This may
149 be needed if you are preparing a termcap file for a termcap
150 library (such as GNU termcap through version 1.3 or BSD termcap
151 through 4.3BSD) that does not handle multiple tc capabilities
152 per entry.
153
154 -s Summarize the compile by showing the database location into
155 which entries are written, and the number of entries which are
156 compiled.
157
158 -T eliminates size-restrictions on the generated text. This is
159 mainly useful for testing and analysis, since the compiled
160 descriptions are limited (e.g., 1023 for termcap, 4096 for ter‐
161 minfo).
162
163 -t tells tic to discard commented-out capabilities. Normally when
164 translating from terminfo to termcap, untranslatable capabili‐
165 ties are commented-out.
166
167 -U tells tic to not post-process the data after parsing the source
168 file. Normally, it infers data which is commonly missing in older
169 terminfo data, or in termcaps.
170
171 -V reports the version of ncurses which was used in this program, and
172 exits.
173
174 -vn specifies that (verbose) output be written to standard error trace
175 information showing tic's progress. The optional parameter n is a
176 number from 1 to 10, inclusive, indicating the desired level of
177 detail of information. If n is omitted, the default level is 1.
178 If n is specified and greater than 1, the level of detail is
179 increased.
180
181 The debug flag levels are as follows:
182
183 1 Names of files created and linked
184
185 2 Information related to the ``use'' facility
186
187 3 Statistics from the hashing algorithm
188
189 5 String-table memory allocations
190
191 7 Entries into the string-table
192
193 8 List of tokens encountered by scanner
194
195 9 All values computed in construction of the hash table
196
197 If the debug level n is not given, it is taken to be one.
198
199 -wn specifies the width of the output. The parameter is optional. If
200 it is omitted, it defaults to 60.
201
202 -x Treat unknown capabilities as user-defined. That is, if you sup‐
203 ply a capability name which tic does not recognize, it will infer
204 its type (boolean, number or string) from the syntax and make an
205 extended table entry for that. User-defined capability strings
206 whose name begins with ``k'' are treated as function keys.
207
208 PARAMETERS
209 file contains one or more terminfo terminal descriptions in source
210 format [see terminfo(5)]. Each description in the file
211 describes the capabilities of a particular terminal.
212
213 If file is ``-'', then the data is read from the standard input.
214 The file parameter may also be the path of a character-device.
215
216 PROCESSING
217 All but one of the capabilities recognized by tic are documented in
218 terminfo(5). The exception is the use capability.
219
220 When a use=entry-name field is discovered in a terminal entry currently
221 being compiled, tic reads in the binary from /usr/share/terminfo to
222 complete the entry. (Entries created from file will be used first.
223 tic duplicates the capabilities in entry-name for the current entry,
224 with the exception of those capabilities that explicitly are defined in
225 the current entry.
226
227 When an entry, e.g., entry_name_1, contains a use=entry_name_2 field,
228 any canceled capabilities in entry_name_2 must also appear in
229 entry_name_1 before use= for these capabilities to be canceled in
230 entry_name_1.
231
232 Total compiled entries cannot exceed 4096 bytes. The name field cannot
233 exceed 512 bytes. Terminal names exceeding the maximum alias length
234 (32 characters on systems with long filenames, 14 characters otherwise)
235 will be truncated to the maximum alias length and a warning message
236 will be printed.
237
239 There is some evidence that historic tic implementations treated
240 description fields with no whitespace in them as additional aliases or
241 short names. This tic does not do that, but it does warn when descrip‐
242 tion fields may be treated that way and check them for dangerous char‐
243 acters.
244
246 Unlike the SVr4 tic command, this implementation can actually compile
247 termcap sources. In fact, entries in terminfo and termcap syntax can
248 be mixed in a single source file. See terminfo(5) for the list of
249 termcap names taken to be equivalent to terminfo names.
250
251 The SVr4 manual pages are not clear on the resolution rules for use
252 capabilities. This implementation of tic will find use targets any‐
253 where in the source file, or anywhere in the file tree rooted at TER‐
254 MINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo data‐
255 base (if it exists), or (finally) anywhere in the system's file tree of
256 compiled entries.
257
258 The error messages from this tic have the same format as GNU C error
259 messages, and can be parsed by GNU Emacs's compile facility.
260
261 The -0, -1, -C, -G, -I, -N, -R, -T, -V, -a, -e, -f, -g, -o, -r, -s, -t
262 and -x options are not supported under SVr4. The SVr4 -c mode does not
263 report bad use links.
264
265 System V does not compile entries to or read entries from your
266 $HOME/.terminfo database unless TERMINFO is explicitly set to it.
267
269 /usr/share/terminfo/?/*
270 Compiled terminal description database.
271
273 infocmp(1M), captoinfo(1M), infotocap(1M), toe(1M), curses(3X),
274 term(5). terminfo(5).
275
276 This describes ncurses version 5.9 (patch 20130511).
277
279 Eric S. Raymond <esr@snark.thyrsus.com> and
280 Thomas E. Dickey <dickey@invisible-island.net>
281
282
283
284 tic(1M)