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