]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/tic.1m.html
ncurses 5.9 - patch 20140412
[ncurses.git] / doc / html / man / tic.1m.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
5   *                                                                          *
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   ****************************************************************************
30   * @Id: tic.1m,v 1.58 2013/07/20 19:31:25 tom Exp @
31 -->
32 <HTML>
33 <HEAD>
34 <TITLE>tic 1m</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 </HEAD>
38 <BODY>
39 <H1>tic 1m</H1>
40 <HR>
41 <PRE>
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>                                                         <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
44
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
50        <STRONG>tic</STRONG> - the <EM>terminfo</EM> entry-description compiler
51
52
53 </PRE>
54 <H2>SYNOPSIS</H2><PRE>
55        <STRONG>tic</STRONG>  [<STRONG>-01CDGIKLNTUVacfgrstx</STRONG>]  [<STRONG>-e</STRONG> <EM>names</EM>] [<STRONG>-o</STRONG> <EM>dir</EM>] [<STRONG>-R</STRONG> <EM>sub-</EM>
56        <EM>set</EM>] [<STRONG>-v</STRONG>[<EM>n</EM>]] [<STRONG>-w</STRONG>[<EM>n</EM>]] <EM>file</EM>
57
58
59 </PRE>
60 <H2>DESCRIPTION</H2><PRE>
61        The <STRONG>tic</STRONG> command translates a  <STRONG>terminfo</STRONG>  file  from  source
62        format  into compiled format.  The compiled format is nec-
63        essary for use with the library routines in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
64
65        As described in <STRONG><A HREF="term.5.html">term(5)</A></STRONG>, the  database  may  be  either  a
66        directory  tree  (one file per terminal entry) or a hashed
67        database (one record per entry).  The <STRONG>tic</STRONG>  command  writes
68        only one type of entry, depending on how it was built:
69
70        <STRONG>o</STRONG>   For  directory  trees,  the top-level directory, e.g.,
71            /usr/share/terminfo, specifies  the  location  of  the
72            database.
73
74        <STRONG>o</STRONG>   For  hashed  databases,  a filename is needed.  If the
75            given file is not found by that name, but can be found
76            by adding the suffix ".db", then that is used.
77
78            The  default  name for the hashed database is the same
79            as the default directory name  (only  adding  a  ".db"
80            suffix).
81
82        In  either  case  (directory or hashed database), <STRONG>tic</STRONG> will
83        create the container if it does not exist.  For  a  direc-
84        tory,  this  would  be the "terminfo" leaf, versus a "ter-
85        minfo.db" file.
86
87        The results are normally placed  in  the  system  terminfo
88        database   <STRONG>/usr/share/terminfo</STRONG>.    The  compiled  terminal
89        description can be placed in a  different  terminfo  data-
90        base.  There are two ways to achieve this:
91
92        <STRONG>o</STRONG>   First,  you  may override the system default either by
93            using the <STRONG>-o</STRONG> option, or by setting the  variable  <STRONG>TER-</STRONG>
94            <STRONG>MINFO</STRONG>  in  your  shell environment to a valid database
95            location.
96
97        <STRONG>o</STRONG>   Secondly, if <STRONG>tic</STRONG> cannot write  in  <EM>/usr/share/terminfo</EM>
98            or  the  location  specified using your TERMINFO vari-
99            able, it looks for the directory  <EM>$HOME/.terminfo</EM>  (or
100            hashed  database <EM>$HOME/.terminfo.db)</EM>; if that location
101            exists, the entry is placed there.
102
103        Libraries that read terminfo entries are expected to check
104        in succession
105
106        <STRONG>o</STRONG>   a  location  specified  with  the TERMINFO environment
107            variable,
108
109        <STRONG>o</STRONG>   <EM>$HOME/.terminfo</EM>,
110
111        <STRONG>o</STRONG>   directories listed in  the  TERMINFO_DIRS  environment
112            variable,
113
114        <STRONG>o</STRONG>   a       compiled-in      list      of      directories
115            (/usr/local/ncurses/share/terminfo:/usr/share/ter-
116            minfo), and
117
118        <STRONG>o</STRONG>   the system terminfo database (<EM>/usr/share/terminfo</EM>).
119
120    <STRONG>OPTIONS</STRONG>
121        <STRONG>-0</STRONG>     restricts the output to a single line
122
123        <STRONG>-1</STRONG>     restricts the output to a single column
124
125        <STRONG>-a</STRONG>     tells  <STRONG>tic</STRONG>  to  retain  commented-out  capabilities
126               rather than discarding them.  Capabilities are com-
127               mented  by prefixing them with a period.  This sets
128               the <STRONG>-x</STRONG> option, because it treats the  commented-out
129               entries  as  user-defined  names.  If the source is
130               termcap, accept the 2-character names  required  by
131               version 6.  Otherwise these are ignored.
132
133        <STRONG>-C</STRONG>     Force  source translation to termcap format.  Note:
134               this differs from the <STRONG>-C</STRONG> option of  <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>  in
135               that it does not merely translate capability names,
136               but also translates  terminfo  strings  to  termcap
137               format.  Capabilities that are not translatable are
138               left in the entry under their  terminfo  names  but
139               commented  out with two preceding dots.  The actual
140               format  used  incorporates  some  improvements  for
141               escaped  characters  from  terminfo  format.  For a
142               stricter BSD-compatible  translation,  add  the  <STRONG>-K</STRONG>
143               option.
144
145        <STRONG>-c</STRONG>     tells  <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including
146               syntax problems and bad use links.  If you  specify
147               <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this option, the code will print warn-
148               ings about entries which, after use resolution, are
149               more  than  1023 (4096) bytes long.  Due to a fixed
150               buffer length in older termcap libraries,  as  well
151               as buggy checking for the buffer length (and a doc-
152               umented limit in terminfo), these entries may cause
153               core dumps with other implementations.
154
155        <STRONG>-D</STRONG>     tells  <STRONG>tic</STRONG>  to print the database locations that it
156               knows about, and exit.  The first location shown is
157               the  one  to which it would write compiled terminal
158               descriptions.   If  <STRONG>tic</STRONG>  is  not  able  to  find  a
159               writable  database  location according to the rules
160               summarized above, it will print  a  diagnostic  and
161               exit  with  an error rather than printing a list of
162               database locations.
163
164        <STRONG>-e</STRONG> <EM>names</EM>
165               Limit writes  and  translations  to  the  following
166               comma-separated  list of terminals.  If any name or
167               alias of a terminal matches one of the names in the
168               list,  the  entry  will be written or translated as
169               normal.  Otherwise no output will be generated  for
170               it.  The option value is interpreted as a file con-
171               taining the list if  it  contains  a  '/'.   (Note:
172               depending  on how tic was compiled, this option may
173               require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
174
175        <STRONG>-f</STRONG>     Display  complex  terminfo  strings  which  contain
176               if/then/else/endif  expressions  indented for read-
177               ability.
178
179        <STRONG>-G</STRONG>     Display constant literals in  decimal  form  rather
180               than their character equivalents.
181
182        <STRONG>-g</STRONG>     Display  constant character literals in quoted form
183               rather than their decimal equivalents.
184
185        <STRONG>-I</STRONG>     Force source translation to terminfo format.
186
187        <STRONG>-K</STRONG>     Suppress some longstanding  ncurses  extensions  to
188               termcap format, e.g., "\s" for space.
189
190        <STRONG>-L</STRONG>     Force  source  translation to terminfo format using
191               the long C variable names listed in &lt;<STRONG>term.h</STRONG>&gt;
192
193        <STRONG>-N</STRONG>     Disable smart defaults.  Normally, when translating
194               from termcap to terminfo, the compiler makes a num-
195               ber of assumptions about  the  defaults  of  string
196               capabilities  <STRONG>reset1_string</STRONG>,  <STRONG>carriage_return</STRONG>, <STRONG>cur-</STRONG>
197               <STRONG>sor_left</STRONG>, <STRONG>cursor_down</STRONG>,  <STRONG>scroll_forward</STRONG>,  <STRONG>tab</STRONG>,  <STRONG>new-</STRONG>
198               <STRONG>line</STRONG>,  <STRONG>key_backspace</STRONG>,  <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then
199               attempts to use obsolete  termcap  capabilities  to
200               deduce correct values.  It also normally suppresses
201               output of obsolete termcap capabilities such as <STRONG>bs</STRONG>.
202               This  option forces a more literal translation that
203               also preserves the obsolete capabilities.
204
205        <STRONG>-o</STRONG><EM>dir</EM>  Write compiled entries to given database  location.
206               Overrides the TERMINFO environment variable.
207
208        <STRONG>-R</STRONG><EM>subset</EM>
209               Restrict  output to a given subset.  This option is
210               for use with  archaic  versions  of  terminfo  like
211               those on SVr1, Ultrix, or HP/UX that do not support
212               the full set of SVR4/XSI Curses terminfo; and  out-
213               right broken ports like AIX 3.x that have their own
214               extensions incompatible with  SVr4/XSI.   Available
215               subsets  are  "SVr1",  "Ultrix",  "HP",  "BSD"  and
216               "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details.
217
218        <STRONG>-r</STRONG>     Force entry resolution (so there are  no  remaining
219               tc  capabilities)  even  when  doing translation to
220               termcap format.  This may be needed if you are pre-
221               paring  a  termcap file for a termcap library (such
222               as GNU termcap through version 1.3 or  BSD  termcap
223               through  4.3BSD)  that  does not handle multiple tc
224               capabilities per entry.
225
226        <STRONG>-s</STRONG>     Summarize the compile by showing the database loca-
227               tion into which entries are written, and the number
228               of entries which are compiled.
229
230        <STRONG>-T</STRONG>     eliminates size-restrictions on the generated text.
231               This  is  mainly  useful  for testing and analysis,
232               since the compiled descriptions are limited  (e.g.,
233               1023 for termcap, 4096 for terminfo).
234
235        <STRONG>-t</STRONG>     tells  <STRONG>tic</STRONG>  to  discard commented-out capabilities.
236               Normally when translating from terminfo to termcap,
237               untranslatable capabilities are commented-out.
238
239        <STRONG>-U</STRONG>   tells  <STRONG>tic</STRONG> to not post-process the data after parsing
240             the source file.  Normally, it infers data  which  is
241             commonly  missing in older terminfo data, or in term-
242             caps.
243
244        <STRONG>-V</STRONG>   reports the version of ncurses which was used in this
245             program, and exits.
246
247        <STRONG>-v</STRONG><EM>n</EM>  specifies  that  (verbose) output be written to stan-
248             dard error trace information showing <STRONG>tic</STRONG>'s  progress.
249             The  optional  parameter  <EM>n</EM> is a number from 1 to 10,
250             inclusive, indicating the desired level of detail  of
251             information.   If  <EM>n</EM> is omitted, the default level is
252             1.  If <EM>n</EM> is specified and greater than 1,  the  level
253             of detail is increased.
254
255             The debug flag levels are as follows:
256
257             1      Names of files created and linked
258
259             2      Information related to the "use" facility
260
261             3      Statistics from the hashing algorithm
262
263             5      String-table memory allocations
264
265             7      Entries into the string-table
266
267             8      List of tokens encountered by scanner
268
269             9      All  values  computed  in  construction of the
270                    hash table
271
272             If the debug level <EM>n</EM> is not given, it is taken to  be
273             one.
274
275        <STRONG>-w</STRONG><EM>n</EM>  specifies  the width of the output.  The parameter is
276             optional.  If it is omitted, it defaults to 60.
277
278        <STRONG>-x</STRONG>   Treat unknown capabilities as user-defined.  That is,
279             if  you  supply  a capability name which <STRONG>tic</STRONG> does not
280             recognize, it will infer its type (boolean, number or
281             string)  from  the  syntax and make an extended table
282             entry  for  that.   User-defined  capability  strings
283             whose  name  begins  with "k" are treated as function
284             keys.
285
286    <STRONG>PARAMETERS</STRONG>
287        <EM>file</EM>   contains one or more <STRONG>terminfo</STRONG> terminal descriptions
288               in  source format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>].  Each descrip-
289               tion in the file describes the  capabilities  of  a
290               particular terminal.
291
292               If  <EM>file</EM>  is  "-",  then  the data is read from the
293               standard input.  The <EM>file</EM> parameter may also be the
294               path of a character-device.
295
296    <STRONG>PROCESSING</STRONG>
297        All but one of the capabilities recognized by <STRONG>tic</STRONG> are doc-
298        umented in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.  The exception is the <STRONG>use</STRONG> capabil-
299        ity.
300
301        When  a  <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM>  field is discovered in a terminal
302        entry currently being compiled, <STRONG>tic</STRONG> reads  in  the  binary
303        from  <STRONG>/usr/share/terminfo</STRONG> to complete the entry.  (Entries
304        created from <EM>file</EM> will be used first.  <STRONG>tic</STRONG> duplicates  the
305        capabilities in <EM>entry</EM>-<EM>name</EM> for the current entry, with the
306        exception  of  those  capabilities  that  explicitly   are
307        defined in the current entry.
308
309        When    an   entry,   e.g.,   <STRONG>entry_name_1</STRONG>,   contains   a
310        <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM>  field,  any  canceled  capabilities   in
311        <EM>entry</EM>_<EM>name</EM>_<EM>2</EM>  must also appear in <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG>
312        for these capabilities to be canceled in <STRONG>entry_name_1</STRONG>.
313
314        Total compiled entries cannot exceed 4096 bytes.  The name
315        field  cannot  exceed 512 bytes.  Terminal names exceeding
316        the maximum alias length (32 characters  on  systems  with
317        long filenames, 14 characters otherwise) will be truncated
318        to the maximum alias length and a warning message will  be
319        printed.
320
321
322 </PRE>
323 <H2>COMPATIBILITY</H2><PRE>
324        There  is  some evidence that historic <STRONG>tic</STRONG> implementations
325        treated description fields with no whitespace in  them  as
326        additional  aliases  or short names.  This <STRONG>tic</STRONG> does not do
327        that, but it does warn  when  description  fields  may  be
328        treated that way and check them for dangerous characters.
329
330
331 </PRE>
332 <H2>EXTENSIONS</H2><PRE>
333        Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actu-
334        ally compile termcap sources.  In fact,  entries  in  ter-
335        minfo  and  termcap syntax can be mixed in a single source
336        file.  See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of termcap names taken
337        to be equivalent to terminfo names.
338
339        The  SVr4  manual  pages  are  not clear on the resolution
340        rules for <STRONG>use</STRONG> capabilities.  This  implementation  of  <STRONG>tic</STRONG>
341        will find <STRONG>use</STRONG> targets anywhere in the source file, or any-
342        where in the file tree rooted at <STRONG>TERMINFO</STRONG> (if <STRONG>TERMINFO</STRONG>  is
343        defined), or in the user's <EM>$HOME/.terminfo</EM> database (if it
344        exists), or (finally) anywhere in the system's  file  tree
345        of compiled entries.
346
347        The  error  messages from this <STRONG>tic</STRONG> have the same format as
348        GNU C error messages, and can be  parsed  by  GNU  Emacs's
349        compile facility.
350
351        The  <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>,
352        <STRONG>-o</STRONG>, <STRONG>-r</STRONG>, <STRONG>-s</STRONG>, <STRONG>-t</STRONG> and <STRONG>-x</STRONG>  options  are  not  supported  under
353        SVr4.  The SVr4 <STRONG>-c</STRONG> mode does not report bad use links.
354
355        System  V does not compile entries to or read entries from
356        your <EM>$HOME/.terminfo</EM> database unless TERMINFO  is  explic-
357        itly set to it.
358
359
360 </PRE>
361 <H2>FILES</H2><PRE>
362        <STRONG>/usr/share/terminfo/?/*</STRONG>
363             Compiled terminal description database.
364
365
366 </PRE>
367 <H2>SEE ALSO</H2><PRE>
368        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,    <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
369        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
370
371        This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20131221).
372
373
374 </PRE>
375 <H2>AUTHOR</H2><PRE>
376        Eric S. Raymond &lt;esr@snark.thyrsus.com&gt; and
377        Thomas E. Dickey &lt;dickey@invisible-island.net&gt;
378
379
380
381                                                                 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
382 </PRE>
383 <HR>
384 <ADDRESS>
385 Man(1) output converted with
386 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
387 </ADDRESS>
388 </BODY>
389 </HTML>