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