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