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