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