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