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