]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/tic.1m
2e1c24ec170615bfac524c7742c66754df58d895
[ncurses.git] / man / tic.1m
1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc.              *
3 .\"                                                                          *
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:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
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.                               *
22 .\"                                                                          *
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       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: tic.1m,v 1.46 2010/08/28 19:41:09 tom Exp $
30 .TH @TIC@ 1M ""
31 .ds n 5
32 .ds d @TERMINFO@
33 .SH NAME
34 \fBtic\fR \- the \fIterminfo\fR entry-description compiler
35 .SH SYNOPSIS
36 \fBtic\fR
37 [\fB\-\
38 1\
39 C\
40 G\
41 I\
42 L\
43 N\
44 T\
45 U\
46 V\
47 a\
48 c\
49 f\
50 g\
51 r\
52 s\
53 t\
54 x\
55 \fR]
56 [\fB\-e\fR \fInames\fR]
57 [\fB\-o\fR \fIdir\fR]
58 [\fB\-R\fR \fIsubset\fR]
59 [\fB\-v\fR[\fIn\fR]]
60 [\fB\-w\fR[\fIn\fR]]
61 \fIfile\fR
62 .br
63 .SH DESCRIPTION
64 The command \fBtic\fR translates a \fBterminfo\fR file from source
65 format into compiled format.
66 The compiled format is necessary for use with
67 the library routines in \fBncurses\fR(3X).
68 .PP
69 The results are normally placed in the system terminfo
70 directory \fB\*d\fR.
71 There are two ways to change this behavior.
72 .PP
73 First, you may override the system default by setting the variable
74 \fBTERMINFO\fR in your shell environment to a valid (existing) directory name.
75 .PP
76 Secondly, if \fBtic\fR cannot get access to \fI\*d\fR or your TERMINFO
77 directory, it looks for the directory \fI$HOME/.terminfo\fR; if that directory
78 exists, the entry is placed there.
79 .PP
80 Libraries that read terminfo entries are expected to check for a TERMINFO
81 directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
82 finally look in \fI\*d\fR.
83 .TP
84 \fB\-1\fR
85 restricts the output to a single column
86 .TP
87 \fB\-a\fR
88 tells \fBtic\fP to retain commented-out capabilities rather than discarding
89 them.
90 Capabilities are commented by prefixing them with a period.
91 This sets the \fB\-x\fR option, because it treats the commented-out
92 entries as user-defined names.
93 If the source is termcap, accept the 2-character names required by version 6.
94 Otherwise these are ignored.
95 .TP
96 \fB\-C\fR
97 Force source translation to termcap format.
98 Note: this differs from the \fB\-C\fR
99 option of \fB@INFOCMP@\fR(1M) in that it does not merely translate capability
100 names, but also translates terminfo strings to termcap format.
101 Capabilities
102 that are not translatable are left in the entry under their terminfo names
103 but commented out with two preceding dots.
104 .TP
105 \fB\-c\fR
106 tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and
107 bad use links.
108 If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code
109 will print warnings about entries which, after use resolution, are more than
110 1023 (4096) bytes long.
111 Due to a fixed buffer length in older termcap
112 libraries (and a documented limit in terminfo), these entries may cause core
113 dumps.
114 .TP
115 \fB\-e \fR\fInames\fR
116 Limit writes and translations to the following comma-separated list of
117 terminals.
118 If any name or alias of a terminal matches one of the names in
119 the list, the entry will be written or translated as normal.
120 Otherwise no output will be generated for it.
121 The option value is interpreted as a file containing the list if it
122 contains a '/'.
123 (Note: depending on how tic was compiled, this option may require \fB\-I\fR or \fB\-C\fR.)
124 .TP
125 \fB\-f\fR
126 Display complex terminfo strings which contain if/then/else/endif expressions
127 indented for readability.
128 .TP
129 \fB\-G\fR
130 Display constant literals in decimal form
131 rather than their character equivalents.
132 .TP
133 \fB\-g\fR
134 Display constant character literals in quoted form
135 rather than their decimal equivalents.
136 .TP
137 \fB\-I\fR
138 Force source translation to terminfo format.
139 .TP
140 \fB\-L\fR
141 Force source translation to terminfo format
142 using the long C variable names listed in <\fBterm.h\fR>
143 .TP
144 \fB\-N\fR
145 Disable smart defaults.
146 Normally, when translating from termcap to terminfo, the compiler makes
147 a number of assumptions about the defaults of string capabilities
148 \fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR,
149 \fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR,
150 \fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts
151 to use obsolete termcap capabilities to deduce correct values.
152 It also
153 normally suppresses output of obsolete termcap capabilities such as \fBbs\fR.
154 This option forces a more literal translation that also preserves the
155 obsolete capabilities.
156 .TP
157 \fB\-o\fR\fIdir\fR
158 Write compiled entries to given directory.
159 Overrides the TERMINFO environment
160 variable.
161 .TP
162 \fB\-R\fR\fIsubset\fR
163 Restrict output to a given subset.
164 This option is for use with archaic
165 versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
166 the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
167 that have their own extensions incompatible with SVr4/XSI.
168 Available subsets
169 are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
170 .TP
171 \fB\-r\fR
172 Force entry resolution (so there are no remaining tc capabilities) even
173 when doing translation to termcap format.
174 This may be needed if you are
175 preparing a termcap file for a termcap library (such as GNU termcap through
176 version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple
177 tc capabilities per entry.
178 .TP
179 \fB\-s\fR
180 Summarize the compile by showing the directory into which entries
181 are written, and the number of entries which are compiled.
182 .TP
183 \fB\-T\fR
184 eliminates size-restrictions on the generated text.
185 This is mainly useful for testing and analysis, since the compiled
186 descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
187 .TP
188 \fB\-t\fR
189 tells \fBtic\fP to discard commented-out capabilities.
190 Normally when translating from terminfo to termcap,
191 untranslatable capabilities are commented-out.
192 .TP 5
193 \fB\-U\fR
194 tells \fBtic\fP to not post-process the data after parsing the source file.
195 Normally, it infers data which is commonly missing in older terminfo data,
196 or in termcaps.
197 .TP
198 \fB\-V\fR
199 reports the version of ncurses which was used in this program, and exits.
200 .TP
201 \fB\-v\fR\fIn\fR
202 specifies that (verbose) output be written to standard error trace
203 information showing \fBtic\fR's progress.
204 The optional parameter \fIn\fR is a number from 1 to 10, inclusive,
205 indicating the desired level of detail of information.
206 If \fIn\fR is omitted, the default level is 1.
207 If \fIn\fR is specified and greater than 1, the level of
208 detail is increased.
209 .TP
210 \fB\-w\fR\fIn\fR
211 specifies the width of the output.
212 The parameter is optional.
213 If it is omitted, it defaults to 60.
214 .TP
215 \fB\-x\fR
216 Treat unknown capabilities as user-defined.
217 That is, if you supply a capability name which \fBtic\fP does not recognize,
218 it will infer its type (boolean, number or string) from the syntax and
219 make an extended table entry for that.
220 User-defined capability strings
221 whose name begins with ``k'' are treated as function keys.
222 .TP
223 \fIfile\fR
224 contains one or more \fBterminfo\fR terminal descriptions in source
225 format [see \fBterminfo\fR(\*n)].
226 Each description in the file
227 describes the capabilities of a particular terminal.
228 .PP
229 The debug flag levels are as follows:
230 .TP
231 1
232 Names of files created and linked
233 .TP
234 2
235 Information related to the ``use'' facility
236 .TP
237 3
238 Statistics from the hashing algorithm
239 .TP
240 5
241 String-table memory allocations
242 .TP
243 7
244 Entries into the string-table
245 .TP
246 8
247 List of tokens encountered by scanner
248 .TP
249 9
250 All values computed in construction of the hash table
251 .LP
252 If the debug level \fIn\fR is not given, it is taken to be one.
253 .PP
254 All but one of the capabilities recognized by \fBtic\fR are documented
255 in \fBterminfo\fR(\*n).
256 The exception is the \fBuse\fR capability.
257 .PP
258 When a \fBuse\fR=\fIentry\fR\-\fIname\fR field is discovered in a
259 terminal entry currently being compiled, \fBtic\fR reads in the binary
260 from \fB\*d\fR to complete the entry.
261 (Entries created from
262 \fIfile\fR will be used first.
263 If the environment variable
264 \fBTERMINFO\fR is set, that directory is searched instead of
265 \fB\*d\fR.)  \fBtic\fR duplicates the capabilities in
266 \fIentry\fR\-\fIname\fR for the current entry, with the exception of
267 those capabilities that explicitly are defined in the current entry.
268 .PP
269 When an entry, e.g., \fBentry_name_1\fR, contains a
270 \fBuse=\fR\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled
271 capabilities in \fIentry\fR_\fIname\fR_\fI2\fR must also appear in
272 \fBentry_name_1\fR before \fBuse=\fR for these capabilities to be
273 canceled in \fBentry_name_1\fR.
274 .PP
275 If the environment variable \fBTERMINFO\fR is set, the compiled
276 results are placed there instead of \fB\*d\fR.
277 .PP
278 Total compiled entries cannot exceed 4096 bytes.
279 The name field cannot
280 exceed 512 bytes.
281 Terminal names exceeding the maximum alias length
282 (32 characters on systems with long filenames, 14 characters otherwise)
283 will be truncated to the maximum alias length and a warning message will be printed.
284 .SH COMPATIBILITY
285 There is some evidence that historic \fBtic\fR implementations treated
286 description fields with no whitespace in them as additional aliases or
287 short names.
288 This \fBtic\fR does not do that, but it does warn when
289 description fields may be treated that way and check them for dangerous
290 characters.
291 .SH EXTENSIONS
292 Unlike the stock SVr4 \fBtic\fR command, this implementation can actually
293 compile termcap sources.
294 In fact, entries in terminfo and termcap syntax can
295 be mixed in a single source file.
296 See \fBterminfo\fR(\*n) for the list of
297 termcap names taken to be equivalent to terminfo names.
298 .PP
299 The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR
300 capabilities.
301 This implementation of \fBtic\fR will find \fBuse\fR targets anywhere
302 in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fR (if
303 \fBTERMINFO\fR is defined), or in the user's \fI$HOME/.terminfo\fR directory
304 (if it exists), or (finally) anywhere in the system's file tree of
305 compiled entries.
306 .PP
307 The error messages from this \fBtic\fR have the same format as GNU C
308 error messages, and can be parsed by GNU Emacs's compile facility.
309 .PP
310 The
311 \fB\-C\fR,
312 \fB\-G\fR,
313 \fB\-I\fR,
314 \fB\-N\fR,
315 \fB\-R\fR,
316 \fB\-T\fR,
317 \fB\-V\fR,
318 \fB\-a\fR,
319 \fB\-e\fR,
320 \fB\-f\fR,
321 \fB\-g\fR,
322 \fB\-o\fR,
323 \fB\-r\fR,
324 \fB\-s\fR,
325 \fB\-t\fR and
326 \fB\-x\fR
327 options
328 are not supported under SVr4.
329 The SVr4 \fB\-c\fR mode does not report bad use links.
330 .PP
331 System V does not compile entries to or read entries from your
332 \fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it.
333 .SH FILES
334 .TP 5
335 \fB\*d/?/*\fR
336 Compiled terminal description database.
337 .SH SEE ALSO
338 \fB@INFOCMP@\fR(1M),
339 \fB@CAPTOINFO@\fR(1M),
340 \fB@INFOTOCAP@\fR(1M),
341 \fB@TOE@\fR(1M),
342 \fBcurses\fR(3X),
343 \fBterminfo\fR(\*n).
344 .PP
345 This describes \fBncurses\fR
346 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
347 .SH AUTHOR
348 Eric S. Raymond <esr@snark.thyrsus.com>
349 and
350 .br
351 Thomas E. Dickey <dickey@invisible-island.net>
352 .\"#
353 .\"# The following sets edit modes for GNU EMACS
354 .\"# Local Variables:
355 .\"# mode:nroff
356 .\"# fill-column:79
357 .\"# End: