source: trunk/ncurses/man/tic.1m@ 2787

Last change on this file since 2787 was 2621, checked in by bird, 19 years ago

GNU ncurses 5.5

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