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