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