]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/tic.1m
ncurses 5.9 - patch 20111022
[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.50 2011/09/26 23:59:40 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, add 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\-K\fR
151 Suppress some longstanding ncurses extensions to termcap format,
152 e.g., "\\s" for space.
153 .TP
154 \fB\-L\fR
155 Force source translation to terminfo format
156 using the long C variable names listed in <\fBterm.h\fR>
157 .TP
158 \fB\-N\fR
159 Disable smart defaults.
160 Normally, when translating from termcap to terminfo, the compiler makes
161 a number of assumptions about the defaults of string capabilities
162 \fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR,
163 \fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR,
164 \fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts
165 to use obsolete termcap capabilities to deduce correct values.
166 It also
167 normally suppresses output of obsolete termcap capabilities such as \fBbs\fR.
168 This option forces a more literal translation that also preserves the
169 obsolete capabilities.
170 .TP
171 \fB\-o\fR\fIdir\fR
172 Write compiled entries to given directory.
173 Overrides the TERMINFO environment
174 variable.
175 .TP
176 \fB\-R\fR\fIsubset\fR
177 Restrict output to a given subset.
178 This option is for use with archaic
179 versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
180 the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
181 that have their own extensions incompatible with SVr4/XSI.
182 Available subsets
183 are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
184 .TP
185 \fB\-r\fR
186 Force entry resolution (so there are no remaining tc capabilities) even
187 when doing translation to termcap format.
188 This may be needed if you are
189 preparing a termcap file for a termcap library (such as GNU termcap through
190 version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple
191 tc capabilities per entry.
192 .TP
193 \fB\-s\fR
194 Summarize the compile by showing the directory into which entries
195 are written, and the number of entries which are compiled.
196 .TP
197 \fB\-T\fR
198 eliminates size-restrictions on the generated text.
199 This is mainly useful for testing and analysis, since the compiled
200 descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
201 .TP
202 \fB\-t\fR
203 tells \fBtic\fP to discard commented-out capabilities.
204 Normally when translating from terminfo to termcap,
205 untranslatable capabilities are commented-out.
206 .TP 5
207 \fB\-U\fR
208 tells \fBtic\fP to not post-process the data after parsing the source file.
209 Normally, it infers data which is commonly missing in older terminfo data,
210 or in termcaps.
211 .TP
212 \fB\-V\fR
213 reports the version of ncurses which was used in this program, and exits.
214 .TP
215 \fB\-v\fR\fIn\fR
216 specifies that (verbose) output be written to standard error trace
217 information showing \fBtic\fR's progress.
218 The optional parameter \fIn\fR is a number from 1 to 10, inclusive,
219 indicating the desired level of detail of information.
220 If \fIn\fR is omitted, the default level is 1.
221 If \fIn\fR is specified and greater than 1, the level of
222 detail is increased.
223 .TP
224 \fB\-w\fR\fIn\fR
225 specifies the width of the output.
226 The parameter is optional.
227 If it is omitted, it defaults to 60.
228 .TP
229 \fB\-x\fR
230 Treat unknown capabilities as user-defined.
231 That is, if you supply a capability name which \fBtic\fP does not recognize,
232 it will infer its type (boolean, number or string) from the syntax and
233 make an extended table entry for that.
234 User-defined capability strings
235 whose name begins with ``k'' are treated as function keys.
236 .TP
237 \fIfile\fR
238 contains one or more \fBterminfo\fR terminal descriptions in source
239 format [see \fBterminfo\fR(\*n)].
240 Each description in the file
241 describes the capabilities of a particular terminal.
242 .PP
243 The debug flag levels are as follows:
244 .TP
245 1
246 Names of files created and linked
247 .TP
248 2
249 Information related to the ``use'' facility
250 .TP
251 3
252 Statistics from the hashing algorithm
253 .TP
254 5
255 String-table memory allocations
256 .TP
257 7
258 Entries into the string-table
259 .TP
260 8
261 List of tokens encountered by scanner
262 .TP
263 9
264 All values computed in construction of the hash table
265 .LP
266 If the debug level \fIn\fR is not given, it is taken to be one.
267 .PP
268 All but one of the capabilities recognized by \fBtic\fR are documented
269 in \fBterminfo\fR(\*n).
270 The exception is the \fBuse\fR capability.
271 .PP
272 When a \fBuse\fR=\fIentry\fR\-\fIname\fR field is discovered in a
273 terminal entry currently being compiled, \fBtic\fR reads in the binary
274 from \fB\*d\fR to complete the entry.
275 (Entries created from
276 \fIfile\fR will be used first.
277 If the environment variable
278 \fBTERMINFO\fR is set, that directory is searched instead of
279 \fB\*d\fR.)  \fBtic\fR duplicates the capabilities in
280 \fIentry\fR\-\fIname\fR for the current entry, with the exception of
281 those capabilities that explicitly are defined in the current entry.
282 .PP
283 When an entry, e.g., \fBentry_name_1\fR, contains a
284 \fBuse=\fR\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled
285 capabilities in \fIentry\fR_\fIname\fR_\fI2\fR must also appear in
286 \fBentry_name_1\fR before \fBuse=\fR for these capabilities to be
287 canceled in \fBentry_name_1\fR.
288 .PP
289 If the environment variable \fBTERMINFO\fR is set, the compiled
290 results are placed there instead of \fB\*d\fR.
291 .PP
292 Total compiled entries cannot exceed 4096 bytes.
293 The name field cannot
294 exceed 512 bytes.
295 Terminal names exceeding the maximum alias length
296 (32 characters on systems with long filenames, 14 characters otherwise)
297 will be truncated to the maximum alias length and a warning message will be printed.
298 .SH COMPATIBILITY
299 There is some evidence that historic \fBtic\fR implementations treated
300 description fields with no whitespace in them as additional aliases or
301 short names.
302 This \fBtic\fR does not do that, but it does warn when
303 description fields may be treated that way and check them for dangerous
304 characters.
305 .SH EXTENSIONS
306 Unlike the stock SVr4 \fBtic\fR command, this implementation can actually
307 compile termcap sources.
308 In fact, entries in terminfo and termcap syntax can
309 be mixed in a single source file.
310 See \fBterminfo\fR(\*n) for the list of
311 termcap names taken to be equivalent to terminfo names.
312 .PP
313 The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR
314 capabilities.
315 This implementation of \fBtic\fR will find \fBuse\fR targets anywhere
316 in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fR (if
317 \fBTERMINFO\fR is defined), or in the user's \fI$HOME/.terminfo\fR directory
318 (if it exists), or (finally) anywhere in the system's file tree of
319 compiled entries.
320 .PP
321 The error messages from this \fBtic\fR have the same format as GNU C
322 error messages, and can be parsed by GNU Emacs's compile facility.
323 .PP
324 The
325 \fB\-0\fR,
326 \fB\-1\fR,
327 \fB\-C\fR,
328 \fB\-G\fR,
329 \fB\-I\fR,
330 \fB\-N\fR,
331 \fB\-R\fR,
332 \fB\-T\fR,
333 \fB\-V\fR,
334 \fB\-a\fR,
335 \fB\-e\fR,
336 \fB\-f\fR,
337 \fB\-g\fR,
338 \fB\-o\fR,
339 \fB\-r\fR,
340 \fB\-s\fR,
341 \fB\-t\fR and
342 \fB\-x\fR
343 options
344 are not supported under SVr4.
345 The SVr4 \fB\-c\fR mode does not report bad use links.
346 .PP
347 System V does not compile entries to or read entries from your
348 \fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it.
349 .SH FILES
350 .TP 5
351 \fB\*d/?/*\fR
352 Compiled terminal description database.
353 .SH SEE ALSO
354 \fB@INFOCMP@\fR(1M),
355 \fB@CAPTOINFO@\fR(1M),
356 \fB@INFOTOCAP@\fR(1M),
357 \fB@TOE@\fR(1M),
358 \fBcurses\fR(3X),
359 \fBterminfo\fR(\*n).
360 .PP
361 This describes \fBncurses\fR
362 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
363 .SH AUTHOR
364 Eric S. Raymond <esr@snark.thyrsus.com>
365 and
366 .br
367 Thomas E. Dickey <dickey@invisible-island.net>