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