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