blob: e5e6107244cf4604586094aff3f9264782762a20 [file] [log] [blame]
micky3879b9f5e72025-07-08 18:04:53 -04001<!--
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302 ****************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04003 * Copyright 2018-2023,2024 Thomas E. Dickey *
4 * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305 * *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
13 * *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
16 * *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 * *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
28 * authorization. *
29 ****************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -040030 * @Id: tic.1m,v 1.110 2024/04/27 17:57:06 tom Exp @
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031-->
Steve Kondikae271bc2015-11-15 02:50:53 +010032<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053033<HTML>
34<HEAD>
Steve Kondikae271bc2015-11-15 02:50:53 +010035<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
micky3879b9f5e72025-07-08 18:04:53 -040036<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
37<TITLE>tic 1m 2024-04-27 ncurses 6.5 User commands</TITLE>
38<link rel="author" href="mailto:bug-ncurses@gnu.org">
39
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053040</HEAD>
41<BODY>
micky3879b9f5e72025-07-08 18:04:53 -040042<H1 class="no-header">tic 1m 2024-04-27 ncurses 6.5 User commands</H1>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053043<PRE>
micky3879b9f5e72025-07-08 18:04:53 -040044<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> User commands <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053045
46
47
48
micky3879b9f5e72025-07-08 18:04:53 -040049</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
50 <STRONG>tic</STRONG> - compile terminal descriptions for <EM>terminfo</EM> or <EM>termcap</EM>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053051
52
micky3879b9f5e72025-07-08 18:04:53 -040053</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54 <STRONG>tic</STRONG> [<STRONG>-01acCDfgGIKLNqrstTUVWx</STRONG>] [<STRONG>-e</STRONG> <EM>terminal-type-list</EM>] [<STRONG>-o</STRONG> <EM>dir</EM>] [<STRONG>-Q</STRONG>[<EM>n</EM>]]
55 [<STRONG>-R</STRONG> <EM>subset</EM>] [<STRONG>-v</STRONG>[<EM>n</EM>]] [<STRONG>-w</STRONG>[<EM>n</EM>]] <EM>file</EM>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053056
57
micky3879b9f5e72025-07-08 18:04:53 -040058</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
59 The <STRONG>tic</STRONG> command translates a <STRONG>terminfo</STRONG> file from source format into
60 compiled format. The compiled format is necessary for use with the
61 library routines in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053062
micky3879b9f5e72025-07-08 18:04:53 -040063 As described in <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, the database may be either a directory tree
64 (one file per terminal entry) or a hashed database (one record per
65 entry). The <STRONG>tic</STRONG> command writes only one type of entry, depending on
66 how it was built:
Steve Kondikae271bc2015-11-15 02:50:53 +010067
micky3879b9f5e72025-07-08 18:04:53 -040068 <STRONG>o</STRONG> For directory trees, the top-level directory, e.g.,
69 /usr/share/terminfo, specifies the location of the database.
Steve Kondikae271bc2015-11-15 02:50:53 +010070
micky3879b9f5e72025-07-08 18:04:53 -040071 <STRONG>o</STRONG> For hashed databases, a filename is needed. If the given file is
72 not found by that name, but can be found by adding the suffix
73 ".db", then that is used.
Steve Kondikae271bc2015-11-15 02:50:53 +010074
micky3879b9f5e72025-07-08 18:04:53 -040075 The default name for the hashed database is the same as the default
76 directory name (only adding a ".db" suffix).
Steve Kondikae271bc2015-11-15 02:50:53 +010077
micky3879b9f5e72025-07-08 18:04:53 -040078 In either case (directory or hashed database), <STRONG>tic</STRONG> will create the
79 container if it does not exist. For a directory, this would be the
80 "terminfo" leaf, versus a "terminfo.db" file.
Steve Kondikae271bc2015-11-15 02:50:53 +010081
micky3879b9f5e72025-07-08 18:04:53 -040082 The results are normally placed in the system terminfo database
83 <STRONG>/usr/share/terminfo</STRONG>. The compiled terminal description can be placed
84 in a different terminfo database. There are two ways to achieve this:
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053085
micky3879b9f5e72025-07-08 18:04:53 -040086 <STRONG>o</STRONG> First, you may override the system default either by using the <STRONG>-o</STRONG>
87 option, or by setting the variable <EM>TERMINFO</EM> in your shell
88 environment to a valid database location.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053089
micky3879b9f5e72025-07-08 18:04:53 -040090 <STRONG>o</STRONG> Secondly, if <STRONG>tic</STRONG> cannot write in <EM>/usr/share/terminfo</EM> or the
91 location specified using your <EM>TERMINFO</EM> variable, it looks for the
92 directory <EM>$HOME/.terminfo</EM> (or hashed database <EM>$HOME/.terminfo.db)</EM>;
93 if that location exists, the entry is placed there.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053094
micky3879b9f5e72025-07-08 18:04:53 -040095 Libraries that read terminfo entries are expected to check in
96 succession
Steve Kondikae271bc2015-11-15 02:50:53 +010097
micky3879b9f5e72025-07-08 18:04:53 -040098 <STRONG>o</STRONG> a location specified with the <EM>TERMINFO</EM> environment variable,
Steve Kondikae271bc2015-11-15 02:50:53 +010099
100 <STRONG>o</STRONG> <EM>$HOME/.terminfo</EM>,
101
micky3879b9f5e72025-07-08 18:04:53 -0400102 <STRONG>o</STRONG> directories listed in the <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM> environment variable,
Steve Kondikae271bc2015-11-15 02:50:53 +0100103
micky3879b9f5e72025-07-08 18:04:53 -0400104 <STRONG>o</STRONG> a compiled-in list of directories (/usr/share/terminfo), and
Steve Kondikae271bc2015-11-15 02:50:53 +0100105
106 <STRONG>o</STRONG> the system terminfo database (<EM>/usr/share/terminfo</EM>).
107
micky3879b9f5e72025-07-08 18:04:53 -0400108 The <EM>Fetching</EM> <EM>Compiled</EM> <EM>Descriptions</EM> section in the <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> manual
109 goes into further detail.
Steve Kondikae271bc2015-11-15 02:50:53 +0100110
micky3879b9f5e72025-07-08 18:04:53 -0400111
112</PRE><H3><a name="h3-Aliases">Aliases</a></H3><PRE>
113 This is the same program as infotocap and captoinfo; usually those are
114 linked to, or copied from this program:
115
116 <STRONG>o</STRONG> When invoked as infotocap, tic sets the <STRONG>-I</STRONG> option.
117
118 <STRONG>o</STRONG> When invoked as captoinfo, tic sets the <STRONG>-C</STRONG> option.
119
120
121</PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
Steve Kondikae271bc2015-11-15 02:50:53 +0100122 <STRONG>-0</STRONG> restricts the output to a single line
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530123
124 <STRONG>-1</STRONG> restricts the output to a single column
125
micky3879b9f5e72025-07-08 18:04:53 -0400126 <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities rather than
127 discarding them. Capabilities are commented by prefixing them
128 with a period. This sets the <STRONG>-x</STRONG> option, because it treats the
129 commented-out entries as user-defined names. If the source is
130 termcap, accept the 2-character names required by version 6.
131 Otherwise these are ignored.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530132
micky3879b9f5e72025-07-08 18:04:53 -0400133 <STRONG>-C</STRONG> Force source translation to termcap format. Note: this differs
134 from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in that it does not merely
135 translate capability names, but also translates terminfo strings
136 to termcap format. Capabilities that are not translatable are
137 left in the entry under their terminfo names but commented out
138 with two preceding dots. The actual format used incorporates
139 some improvements for escaped characters from terminfo format.
140 For a stricter BSD-compatible translation, add the <STRONG>-K</STRONG> option.
Steve Kondikae271bc2015-11-15 02:50:53 +0100141
micky3879b9f5e72025-07-08 18:04:53 -0400142 If this is combined with <STRONG>-c</STRONG>, <STRONG>tic</STRONG> makes additional checks to
143 report cases where the terminfo values do not have an exact
144 equivalent in termcap form. For example:
Steve Kondikae271bc2015-11-15 02:50:53 +0100145
micky3879b9f5e72025-07-08 18:04:53 -0400146 <STRONG>o</STRONG> <STRONG>sgr</STRONG> usually will not convert, because termcap lacks the
147 ability to work with more than two parameters, and because
148 termcap lacks many of the arithmetic/logical operators used
149 in terminfo.
Steve Kondikae271bc2015-11-15 02:50:53 +0100150
micky3879b9f5e72025-07-08 18:04:53 -0400151 <STRONG>o</STRONG> capabilities with more than one delay or with delays before
152 the end of the string will not convert completely.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530153
micky3879b9f5e72025-07-08 18:04:53 -0400154 <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including syntax
155 problems and bad use-links. If you specify <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this
156 option, the code will print warnings about entries which, after
157 use resolution, are more than 1023 (4096) bytes long. Due to a
158 fixed buffer length in older termcap libraries, as well as buggy
159 checking for the buffer length (and a documented limit in
160 terminfo), these entries may cause core dumps with other
161 implementations.
Steve Kondikae271bc2015-11-15 02:50:53 +0100162
micky3879b9f5e72025-07-08 18:04:53 -0400163 <STRONG>tic</STRONG> checks string capabilities to ensure that those with
164 parameters will be valid expressions. It does this check only
165 for the predefined string capabilities; those which are defined
166 with the <STRONG>-x</STRONG> option are ignored.
Steve Kondikae271bc2015-11-15 02:50:53 +0100167
micky3879b9f5e72025-07-08 18:04:53 -0400168 <STRONG>-D</STRONG> tells <STRONG>tic</STRONG> to print the database locations that it knows about,
169 and exit. The first location shown is the one to which it would
170 write compiled terminal descriptions. If <STRONG>tic</STRONG> is not able to
171 find a writable database location according to the rules
172 summarized above, it will print a diagnostic and exit with an
173 error rather than printing a list of database locations.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530174
micky3879b9f5e72025-07-08 18:04:53 -0400175 <STRONG>-e</STRONG> <EM>list</EM>
176 Limit writes and translations to the comma-separated <EM>list</EM> of
177 terminal types. If any name or alias of a terminal matches one
178 of the names in the list, the entry will be written or
179 translated as normal. Otherwise no output will be generated for
180 it. The option value is interpreted as a file containing the
181 list if it contains a '/'. (Note: depending on how tic was
182 compiled, this option may require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530183
micky3879b9f5e72025-07-08 18:04:53 -0400184 <STRONG>-f</STRONG> Display complex terminfo strings which contain
185 if/then/else/endif expressions indented for readability.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530186
micky3879b9f5e72025-07-08 18:04:53 -0400187 <STRONG>-G</STRONG> Display constant literals in decimal form rather than their
188 character equivalents.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530189
micky3879b9f5e72025-07-08 18:04:53 -0400190 <STRONG>-g</STRONG> Display constant character literals in quoted form rather than
191 their decimal equivalents.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530192
193 <STRONG>-I</STRONG> Force source translation to terminfo format.
194
micky3879b9f5e72025-07-08 18:04:53 -0400195 <STRONG>-K</STRONG> Suppress some longstanding <EM>ncurses</EM> extensions to termcap format,
196 e.g., "\s" for space.
Steve Kondikae271bc2015-11-15 02:50:53 +0100197
micky3879b9f5e72025-07-08 18:04:53 -0400198 <STRONG>-L</STRONG> Force source translation to terminfo format using the long C
199 variable names listed in &lt;<STRONG>term.h</STRONG>&gt;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530200
micky3879b9f5e72025-07-08 18:04:53 -0400201 <STRONG>-N</STRONG> Disable smart defaults. Normally, when translating from termcap
202 to terminfo, the compiler makes a number of assumptions about
203 the defaults of string capabilities <STRONG>reset1_string</STRONG>,
204 <STRONG>carriage_return</STRONG>, <STRONG>cursor_left</STRONG>, <STRONG>cursor_down</STRONG>, <STRONG>scroll_forward</STRONG>, <STRONG>tab</STRONG>,
205 <STRONG>newline</STRONG>, <STRONG>key_backspace</STRONG>, <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then attempts to
206 use obsolete termcap capabilities to deduce correct values. It
207 also normally suppresses output of obsolete termcap capabilities
208 such as <STRONG>bs</STRONG>. This option forces a more literal translation that
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530209 also preserves the obsolete capabilities.
210
micky3879b9f5e72025-07-08 18:04:53 -0400211 <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given database location. Overrides
212 the <EM>TERMINFO</EM> environment variable.
213
214 <STRONG>-Q</STRONG><EM>n</EM> Rather than show source in terminfo (text) format, print the
215 compiled (binary) format in hexadecimal or base64 form,
216 depending on the option's value:
217
218 1 hexadecimal
219
220 2 base64
221
222 3 hexadecimal and base64
223
224 <STRONG>-q</STRONG> Suppress comments and blank lines when showing translated
225 source.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530226
227 <STRONG>-R</STRONG><EM>subset</EM>
micky3879b9f5e72025-07-08 18:04:53 -0400228 Restrict output to a given subset. This option is for use with
229 archaic versions of terminfo like those on SVr1, Ultrix, or HP-
230 UX that do not support the full set of SVR4/XSI Curses terminfo;
231 and outright broken ports like AIX 3.x that have their own
232 extensions incompatible with SVr4/XSI.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530233
micky3879b9f5e72025-07-08 18:04:53 -0400234 Available subsets are
235 "SVr1", "Ultrix", "HP", "BSD", and "AIX"
236
237 See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details.
238
239 <STRONG>-r</STRONG> Force entry resolution (so there are no remaining tc
240 capabilities) even when doing translation to termcap format.
241 This may be needed if you are preparing a termcap file for a
242 termcap library (such as GNU termcap through version 1.3 or BSD
243 termcap through 4.3BSD) that does not handle multiple tc
Steve Kondikae271bc2015-11-15 02:50:53 +0100244 capabilities per entry.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530245
micky3879b9f5e72025-07-08 18:04:53 -0400246 <STRONG>-s</STRONG> Summarize the compile by showing the database location into
247 which entries are written, and the number of entries which are
248 compiled.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530249
micky3879b9f5e72025-07-08 18:04:53 -0400250 <STRONG>-T</STRONG> eliminates size-restrictions on the generated text. This is
251 mainly useful for testing and analysis, since the compiled
252 descriptions are limited (e.g., 1023 for termcap, 4096 for
253 terminfo).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530254
micky3879b9f5e72025-07-08 18:04:53 -0400255 <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities. Normally when
256 translating from terminfo to termcap, untranslatable
257 capabilities are commented-out.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530258
micky3879b9f5e72025-07-08 18:04:53 -0400259 <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing the source
260 file. Normally, it infers data which is commonly missing in
261 older terminfo data, or in termcaps.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530262
micky3879b9f5e72025-07-08 18:04:53 -0400263 <STRONG>-V</STRONG> reports the version of <EM>ncurses</EM> which was used in this program,
264 and exits.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530265
micky3879b9f5e72025-07-08 18:04:53 -0400266 <STRONG>-v</STRONG><EM>n</EM> specifies that (verbose) output be written to standard error
267 trace information showing <STRONG>tic</STRONG>'s progress.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530268
micky3879b9f5e72025-07-08 18:04:53 -0400269 The optional parameter <EM>n</EM> is a number from 1 to 9, inclusive,
270 indicating the desired level of detail of information.
Steve Kondikae271bc2015-11-15 02:50:53 +0100271
micky3879b9f5e72025-07-08 18:04:53 -0400272 <STRONG>o</STRONG> If <EM>ncurses</EM> is built without tracing support, the optional
273 parameter is ignored.
Steve Kondikae271bc2015-11-15 02:50:53 +0100274
micky3879b9f5e72025-07-08 18:04:53 -0400275 <STRONG>o</STRONG> If <EM>n</EM> is omitted, the default level is 1.
Steve Kondikae271bc2015-11-15 02:50:53 +0100276
micky3879b9f5e72025-07-08 18:04:53 -0400277 <STRONG>o</STRONG> If <EM>n</EM> is specified and greater than 1, the level of detail is
278 increased, and the output is written (with tracing
279 information) to the "trace" file.
Steve Kondikae271bc2015-11-15 02:50:53 +0100280
micky3879b9f5e72025-07-08 18:04:53 -0400281 The debug flag levels are as follows:
Steve Kondikae271bc2015-11-15 02:50:53 +0100282
micky3879b9f5e72025-07-08 18:04:53 -0400283 1 Names of files created and linked
Steve Kondikae271bc2015-11-15 02:50:53 +0100284
micky3879b9f5e72025-07-08 18:04:53 -0400285 2 Information related to the "use" facility
Steve Kondikae271bc2015-11-15 02:50:53 +0100286
micky3879b9f5e72025-07-08 18:04:53 -0400287 3 Statistics from the hashing algorithm
Steve Kondikae271bc2015-11-15 02:50:53 +0100288
micky3879b9f5e72025-07-08 18:04:53 -0400289 4 Details of extended capabilities
Steve Kondikae271bc2015-11-15 02:50:53 +0100290
micky3879b9f5e72025-07-08 18:04:53 -0400291 5 (unused)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530292
micky3879b9f5e72025-07-08 18:04:53 -0400293 6 (unused)
294
295 7 Entries into the string-table
296
297 8 List of tokens encountered by scanner
298
299 9 All values computed in construction of the hash table
300
301 <STRONG>-W</STRONG> By itself, the <STRONG>-w</STRONG> option will not force long strings to be
302 wrapped. Use the <STRONG>-W</STRONG> option to do this.
303
304 If you specify both <STRONG>-f</STRONG> and <STRONG>-W</STRONG> options, the latter is ignored
305 when <STRONG>-f</STRONG> has already split the line.
306
307 <STRONG>-w</STRONG><EM>n</EM> specifies the width of the output. The parameter is optional.
308 If it is omitted, it defaults to 60.
309
310 <STRONG>-x</STRONG> Treat unknown capabilities as user-defined (see <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>).
311 That is, if you supply a capability name which <STRONG>tic</STRONG> does not
312 recognize, it will infer its type (Boolean, number or string)
313 from the syntax and make an extended table entry for that.
314 User-defined capability strings whose name begins with "k" are
315 treated as function keys.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530316
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530317
micky3879b9f5e72025-07-08 18:04:53 -0400318</PRE><H3><a name="h3-Parameters">Parameters</a></H3><PRE>
319 <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions in source
320 format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each description in the file
321 describes the capabilities of a particular terminal.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530322
micky3879b9f5e72025-07-08 18:04:53 -0400323 If <EM>file</EM> is "-", then the data is read from the standard input.
324 The <EM>file</EM> parameter may also be the path of a character-device.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530325
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530326
micky3879b9f5e72025-07-08 18:04:53 -0400327</PRE><H3><a name="h3-Processing">Processing</a></H3><PRE>
328 All but one of the capabilities recognized by <STRONG>tic</STRONG> are documented in
329 <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. The exception is the <STRONG>use</STRONG> capability.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530330
micky3879b9f5e72025-07-08 18:04:53 -0400331 When a <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM> field is discovered in a terminal entry currently
332 being compiled, <STRONG>tic</STRONG> reads in the binary from <STRONG>/usr/share/terminfo</STRONG> to
333 complete the entry. (Entries created from <EM>file</EM> will be used first.
334 <STRONG>tic</STRONG> duplicates the capabilities in <EM>entry</EM>-<EM>name</EM> for the current entry,
335 with the exception of those capabilities that explicitly are defined in
336 the current entry.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530337
micky3879b9f5e72025-07-08 18:04:53 -0400338 When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field,
339 any canceled capabilities in <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in
340 <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG> for these capabilities to be canceled in
341 <STRONG>entry_name_1</STRONG>.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530342
micky3879b9f5e72025-07-08 18:04:53 -0400343 Total compiled entries cannot exceed 4096 bytes in the legacy storage
344 format, or 32768 using the extended number format. The name field
345 cannot exceed 512 bytes. Terminal names exceeding the maximum alias
346 length (32 characters on systems with long filenames, 14 characters
347 otherwise) will be truncated to the maximum alias length and a warning
348 message will be printed.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530349
350
micky3879b9f5e72025-07-08 18:04:53 -0400351</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
352 <EM>/usr/share/terminfo</EM>
353 compiled terminal description database
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530354
355
micky3879b9f5e72025-07-08 18:04:53 -0400356</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
357 There is some evidence that historic <STRONG>tic</STRONG> implementations treated
358 description fields with no whitespace in them as additional aliases or
359 short names. This <STRONG>tic</STRONG> does not do that, but it does warn when
360 description fields may be treated that way and check them for dangerous
361 characters.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530362
363
micky3879b9f5e72025-07-08 18:04:53 -0400364</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
365 Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actually compile
366 termcap sources. In fact, entries in terminfo and termcap syntax can
367 be mixed in a single source file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of
368 termcap names taken to be equivalent to terminfo names.
369
370 The SVr4 manual pages are not clear on the resolution rules for <STRONG>use</STRONG>
371 capabilities. This implementation of <STRONG>tic</STRONG> will find <STRONG>use</STRONG> targets
372 anywhere in the source file, or anywhere in the file tree rooted at
373 <EM>TERMINFO</EM> (if <EM>TERMINFO</EM> is defined), or in the user's <EM>$HOME/.terminfo</EM>
374 database (if it exists), or (finally) anywhere in the system's file
375 tree of compiled entries.
376
377 The error messages from this <STRONG>tic</STRONG> have the same format as GNU C error
378 messages, and can be parsed by GNU Emacs's compile facility.
379
380 Aside from <STRONG>-c</STRONG> and <STRONG>-v</STRONG>, options are not portable:
381
382 <STRONG>o</STRONG> Most of tic's options are not supported by SVr4 <STRONG>tic</STRONG>:
383
384 <STRONG>-0</STRONG> <STRONG>-1</STRONG> <STRONG>-C</STRONG> <STRONG>-G</STRONG> <STRONG>-I</STRONG> <STRONG>-N</STRONG> <STRONG>-R</STRONG> <STRONG>-T</STRONG> <STRONG>-V</STRONG> <STRONG>-a</STRONG> <STRONG>-e</STRONG> <STRONG>-f</STRONG> <STRONG>-g</STRONG> <STRONG>-o</STRONG> <STRONG>-r</STRONG> <STRONG>-s</STRONG> <STRONG>-t</STRONG> <STRONG>-x</STRONG>
385
386 <STRONG>o</STRONG> The NetBSD <STRONG>tic</STRONG> supports a few of the <EM>ncurses</EM> options
387
388 <STRONG>-a</STRONG> <STRONG>-o</STRONG> <STRONG>-x</STRONG>
389
390 and adds <STRONG>-S</STRONG> (a feature which does the same thing as infocmp's <STRONG>-e</STRONG>
391 and <STRONG>-E</STRONG> options).
392
393 The SVr4 <STRONG>-c</STRONG> mode does not report bad "use=" links.
394
395 System V does not compile entries to or read entries from your
396 <EM>$HOME/.terminfo</EM> database unless <EM>TERMINFO</EM> is explicitly set to it.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530397
398
micky3879b9f5e72025-07-08 18:04:53 -0400399</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
400 X/Open Curses, Issue 7 (2009) provides a brief description of <STRONG>tic</STRONG>. It
401 lists one option: <STRONG>-c</STRONG>. The omission of <STRONG>-v</STRONG> is unexpected. The change
402 history states that the description is derived from Tru64. According
403 to its manual pages, that system also supported the <STRONG>-v</STRONG> option.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530404
micky3879b9f5e72025-07-08 18:04:53 -0400405 Shortly after Issue 7 was released, Tru64 was discontinued. As of
406 2019, the surviving implementations of <STRONG>tic</STRONG> are SVr4 (AIX, HP-UX and
407 Solaris), <EM>ncurses</EM> and NetBSD curses. The SVr4 <STRONG>tic</STRONG> programs all support
408 the <STRONG>-v</STRONG> option. The NetBSD <STRONG>tic</STRONG> program follows X/Open's documentation,
409 omitting the <STRONG>-v</STRONG> option.
410
411 The X/Open rationale states that some implementations of <STRONG>tic</STRONG> read
412 terminal descriptions from the standard input if the <EM>file</EM> parameter is
413 omitted. None of these implementations do that. Further, it comments
414 that some may choose to read from "./terminfo.src" but that is
415 obsolescent behavior from SVr2, and is not (for example) a documented
416 feature of SVr3.
Steve Kondikae271bc2015-11-15 02:50:53 +0100417
418
micky3879b9f5e72025-07-08 18:04:53 -0400419</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
420 System V Release 2 provided a <STRONG>tic</STRONG> utility. It accepted a single
421 option: <STRONG>-v</STRONG> (optionally followed by a number). According to Ross
422 Ridge's comment in <EM>mytinfo</EM>, this version of <STRONG>tic</STRONG> was unable to represent
423 cancelled capabilities.
424
425 System V Release 3 provided a different <STRONG>tic</STRONG> utility, written by Pavel
426 Curtis, (originally named "compile" in <EM>pcurses</EM>). This added an option
427 <STRONG>-c</STRONG> to check the file for errors, with the caveat that errors in "use="
428 links would not be reported. System V Release 3 documented a few
429 warning messages which did not appear in <EM>pcurses</EM>. While the program
430 itself was changed little as development continued with System V
431 Release 4, the table of capabilities grew from 180 (<EM>pcurses</EM>) to 464
432 (Solaris).
433
434 In early development of <EM>ncurses</EM> (1993), Zeyd Ben-Halim used the table
435 from <EM>mytinfo</EM> to extend the <EM>pcurses</EM> table to 469 capabilities (456
436 matched SVr4, 8 were only in SVr4, 13 were not in SVr4). Of those 13,
437 11 were ultimately discarded (perhaps to match the draft of X/Open
438 Curses). The exceptions were <STRONG>memory_lock_above</STRONG> and <STRONG>memory_unlock</STRONG> (see
439 <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>).
440
441 Eric Raymond incorporated parts of <EM>mytinfo</EM> into <EM>ncurses</EM> to implement
442 the termcap-to-terminfo source conversion, and extended that to begin
443 development of the corresponding terminfo-to-termcap source conversion,
444 Thomas Dickey completed that development over the course of several
445 years.
446
447 In 1999, Thomas Dickey added the <STRONG>-x</STRONG> option to support user-defined
448 capabilities.
449
450 In 2010, Roy Marples provided a <STRONG>tic</STRONG> program and terminfo library for
451 NetBSD. That implementation adapts several features from <EM>ncurses</EM>,
452 including <STRONG>tic</STRONG>'s <STRONG>-x</STRONG> option.
453
454 The <STRONG>-c</STRONG> option tells <STRONG>tic</STRONG> to check for problems in the terminfo source
455 file. Continued development provides additional checks:
456
457 <STRONG>o</STRONG> <EM>pcurses</EM> had 8 warnings
458
459 <STRONG>o</STRONG> <EM>ncurses</EM> in 1996 had 16 warnings
460
461 <STRONG>o</STRONG> Solaris (SVr4) curses has 28 warnings
462
463 <STRONG>o</STRONG> NetBSD tic in 2019 has 19 warnings.
464
465 <STRONG>o</STRONG> <EM>ncurses</EM> in 2019 has 96 warnings
466
467 The checking done in <EM>ncurses</EM>' <STRONG>tic</STRONG> helps with the conversion to termcap,
468 as well as pointing out errors and inconsistencies. It is also used to
469 ensure consistency with the user-defined capabilities. There are 527
470 distinct capabilities in <EM>ncurses</EM>' terminal database; 128 of those are
471 user-defined.
472
473
474</PRE><H2><a name="h2-AUTHORS">AUTHORS</a></H2><PRE>
Steve Kondikae271bc2015-11-15 02:50:53 +0100475 Eric S. Raymond &lt;esr@snark.thyrsus.com&gt; and
476 Thomas E. Dickey &lt;dickey@invisible-island.net&gt;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530477
478
micky3879b9f5e72025-07-08 18:04:53 -0400479</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
480 <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
481 <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530482
micky3879b9f5e72025-07-08 18:04:53 -0400483
484
485ncurses 6.5 2024-04-27 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530486</PRE>
Steve Kondikae271bc2015-11-15 02:50:53 +0100487<div class="nav">
488<ul>
489<li><a href="#h2-NAME">NAME</a></li>
490<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
491<li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
492<ul>
micky3879b9f5e72025-07-08 18:04:53 -0400493<li><a href="#h3-Aliases">Aliases</a></li>
Steve Kondikae271bc2015-11-15 02:50:53 +0100494</ul>
495</li>
micky3879b9f5e72025-07-08 18:04:53 -0400496<li><a href="#h2-OPTIONS">OPTIONS</a>
497<ul>
498<li><a href="#h3-Parameters">Parameters</a></li>
499<li><a href="#h3-Processing">Processing</a></li>
500</ul>
501</li>
Steve Kondikae271bc2015-11-15 02:50:53 +0100502<li><a href="#h2-FILES">FILES</a></li>
micky3879b9f5e72025-07-08 18:04:53 -0400503<li><a href="#h2-NOTES">NOTES</a></li>
504<li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
505<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
506<li><a href="#h2-HISTORY">HISTORY</a></li>
507<li><a href="#h2-AUTHORS">AUTHORS</a></li>
Steve Kondikae271bc2015-11-15 02:50:53 +0100508<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
Steve Kondikae271bc2015-11-15 02:50:53 +0100509</ul>
510</div>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530511</BODY>
512</HTML>