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