1tic(1M)                                                                tic(1M)
2
3
4

NAME

6       tic - the terminfo entry-description compiler
7

SYNOPSIS

9       tic  [-01CDGIKLNTUVWacfgqrstx]  [-e names] [-o dir] [-Q[n]] [-R subset]
10       [-v[n]] [-w[n]] file
11

DESCRIPTION

13       The tic command translates a terminfo file from source format into com‐
14       piled  format.   The  compiled  format  is  necessary  for use with the
15       library routines in ncurses(3X).
16
17       As described in term(5), the database may be either  a  directory  tree
18       (one  file  per  terminal  entry)  or a hashed database (one record per
19       entry).  The tic command writes only one type of  entry,  depending  on
20       how it was built:
21
22       ·   For directory trees, the top-level directory, e.g., /usr/share/ter‐
23           minfo, specifies the location of the database.
24
25       ·   For hashed databases, a filename is needed.  If the given  file  is
26           not  found  by  that  name,  but  can be found by adding the suffix
27           ".db", then that is used.
28
29           The default name for the hashed database is the same as the default
30           directory name (only adding a ".db" suffix).
31
32       In either case (directory or hashed database), tic will create the con‐
33       tainer if it does not exist.  For a directory, this would be the  "ter‐
34       minfo" leaf, versus a "terminfo.db" file.
35
36       The  results  are  normally  placed  in  the  system  terminfo database
37       /usr/share/terminfo.  The compiled terminal description can  be  placed
38       in a different terminfo database.  There are two ways to achieve this:
39
40       ·   First,  you  may override the system default either by using the -o
41           option, or by setting the variable TERMINFO in your shell  environ‐
42           ment to a valid database location.
43
44       ·   Secondly,  if  tic cannot write in /usr/share/terminfo or the loca‐
45           tion specified using your  TERMINFO  variable,  it  looks  for  the
46           directory  $HOME/.terminfo (or hashed database $HOME/.terminfo.db);
47           if that location exists, the entry is placed there.
48
49       Libraries that read terminfo entries are expected to check  in  succes‐
50       sion
51
52       ·   a location specified with the TERMINFO environment variable,
53
54       ·   $HOME/.terminfo,
55
56       ·   directories listed in the TERMINFO_DIRS environment variable,
57
58       ·   a compiled-in list of directories (no default value), and
59
60       ·   the system terminfo database (/usr/share/terminfo).
61
62   OPTIONS
63       -0     restricts the output to a single line
64
65       -1     restricts the output to a single column
66
67       -a     tells  tic to retain commented-out capabilities rather than dis‐
68              carding them.  Capabilities are commented by prefixing them with
69              a  period.   This sets the -x option, because it treats the com‐
70              mented-out entries as user-defined  names.   If  the  source  is
71              termcap,  accept  the  2-character  names required by version 6.
72              Otherwise these are ignored.
73
74       -C     Force source translation to termcap format.  Note: this  differs
75              from  the  -C  option  of infocmp(1M) in that it does not merely
76              translate capability names, but also translates terminfo strings
77              to  termcap  format.  Capabilities that are not translatable are
78              left in the entry under their terminfo names but  commented  out
79              with  two  preceding  dots.  The actual format used incorporates
80              some improvements for escaped characters from  terminfo  format.
81              For a stricter BSD-compatible translation, add the -K option.
82
83              If  this  is  combined  with  -c, tic makes additional checks to
84              report cases where the terminfo values  do  not  have  an  exact
85              equivalent in termcap form.  For example:
86
87              ·   sgr  usually  will  not  convert,  because termcap lacks the
88                  ability to work with more than two parameters,  and  because
89                  termcap  lacks many of the arithmetic/logical operators used
90                  in terminfo.
91
92              ·   capabilities with more than one delay or with delays  before
93                  the end of the string will not convert completely.
94
95       -c     tells  tic to only check file for errors, including syntax prob‐
96              lems and bad use-links.   If  you  specify  -C  (-I)  with  this
97              option,  the code will print warnings about entries which, after
98              use resolution, are more than 1023 (4096) bytes long.  Due to  a
99              fixed buffer length in older termcap libraries, as well as buggy
100              checking for the buffer length (and a documented limit  in  ter‐
101              minfo),  these entries may cause core dumps with other implemen‐
102              tations.
103
104              tic checks string capabilities to ensure that those with parame‐
105              ters will be valid expressions.  It does this check only for the
106              predefined string capabilities; those which are defined with the
107              -x option are ignored.
108
109       -D     tells  tic  to print the database locations that it knows about,
110              and exit.  The first location shown is the one to which it would
111              write  compiled  terminal  descriptions.   If tic is not able to
112              find a writable database location according to the rules  summa‐
113              rized  above,  it will print a diagnostic and exit with an error
114              rather than printing a list of database locations.
115
116       -e names
117              Limit writes and translations to the  following  comma-separated
118              list  of  terminals.  If any name or alias of a terminal matches
119              one of the names in the list,  the  entry  will  be  written  or
120              translated as normal.  Otherwise no output will be generated for
121              it.  The option value is interpreted as a  file  containing  the
122              list if it contains a '/'.  (Note: depending on how tic was com‐
123              piled, this option may require -I or -C.)
124
125       -f     Display    complex    terminfo     strings     which     contain
126              if/then/else/endif expressions indented for readability.
127
128       -G     Display  constant  literals  in  decimal  form rather than their
129              character equivalents.
130
131       -g     Display constant character literals in quoted form  rather  than
132              their decimal equivalents.
133
134       -I     Force source translation to terminfo format.
135
136       -K     Suppress some longstanding ncurses extensions to termcap format,
137              e.g., "\s" for space.
138
139       -L     Force source translation to terminfo format  using  the  long  C
140              variable names listed in <term.h>
141
142       -N     Disable smart defaults.  Normally, when translating from termcap
143              to terminfo, the compiler makes a number  of  assumptions  about
144              the   defaults   of   string  capabilities  reset1_string,  car‐
145              riage_return,  cursor_left,  cursor_down,  scroll_forward,  tab,
146              newline, key_backspace, key_left, and key_down, then attempts to
147              use obsolete termcap capabilities to deduce correct values.   It
148              also normally suppresses output of obsolete termcap capabilities
149              such as bs.  This option forces a more literal translation  that
150              also preserves the obsolete capabilities.
151
152       -odir  Write  compiled  entries  to given database location.  Overrides
153              the TERMINFO environment variable.
154
155       -Qn    Rather than show source in terminfo  (text)  format,  print  the
156              compiled  (binary) format in hexadecimal or base64 form, depend‐
157              ing on the option's value:
158
159               1  hexadecimal
160
161               2  base64
162
163               3  hexadecimal and base64
164
165       -q     Suppress  comments  and  blank  lines  when  showing  translated
166              source.
167
168       -Rsubset
169              Restrict  output to a given subset.  This option is for use with
170              archaic versions of terminfo like  those  on  SVr1,  Ultrix,  or
171              HP/UX  that  do not support the full set of SVR4/XSI Curses ter‐
172              minfo; and outright broken ports like AIX 3.x  that  have  their
173              own  extensions  incompatible  with SVr4/XSI.  Available subsets
174              are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see terminfo(5) for
175              details.
176
177       -r     Force  entry  resolution (so there are no remaining tc capabili‐
178              ties) even when doing translation to termcap format.   This  may
179              be  needed  if  you  are  preparing a termcap file for a termcap
180              library (such as GNU termcap through version 1.3 or BSD  termcap
181              through  4.3BSD)  that  does not handle multiple tc capabilities
182              per entry.
183
184       -s     Summarize the compile by  showing  the  database  location  into
185              which  entries  are written, and the number of entries which are
186              compiled.
187
188       -T     eliminates size-restrictions on the  generated  text.   This  is
189              mainly  useful  for  testing  and  analysis,  since the compiled
190              descriptions are limited (e.g., 1023 for termcap, 4096 for  ter‐
191              minfo).
192
193       -t     tells  tic to discard commented-out capabilities.  Normally when
194              translating from terminfo to termcap,  untranslatable  capabili‐
195              ties are commented-out.
196
197       -U   tells  tic  to  not post-process the data after parsing the source
198            file.  Normally, it infers data which is commonly missing in older
199            terminfo data, or in termcaps.
200
201       -V   reports the version of ncurses which was used in this program, and
202            exits.
203
204       -vn  specifies that (verbose) output be written to standard error trace
205            information showing tic's progress.
206
207            The  optional  parameter  n  is  a number from 1 to 10, inclusive,
208            indicating the desired level of detail of information.  If ncurses
209            is  built  without  tracing  support,  the  optional  parameter is
210            ignored.  If n is omitted, the default level is 1.  If n is speci‐
211            fied and greater than 1, the level of detail is increased.
212
213            The debug flag levels are as follows:
214
215            1      Names of files created and linked
216
217            2      Information related to the “use” facility
218
219            3      Statistics from the hashing algorithm
220
221            5      String-table memory allocations
222
223            7      Entries into the string-table
224
225            8      List of tokens encountered by scanner
226
227            9      All values computed in construction of the hash table
228
229            If the debug level n is not given, it is taken to be one.
230
231       -W   By  itself,  the  -w  option  will  not  force  long strings to be
232            wrapped.  Use the -W option to do this.
233
234            If you specify both -f and -W options, the latter is ignored  when
235            -f has already split the line.
236
237       -wn  specifies the width of the output.  The parameter is optional.  If
238            it is omitted, it defaults to 60.
239
240       -x   Treat unknown capabilities as user-defined.  That is, if you  sup‐
241            ply  a capability name which tic does not recognize, it will infer
242            its type (boolean, number or string) from the syntax and  make  an
243            extended  table  entry  for that.  User-defined capability strings
244            whose name begins with “k” are treated as function keys.
245
246   PARAMETERS
247       file   contains one or more terminfo terminal  descriptions  in  source
248              format   [see   terminfo(5)].   Each  description  in  the  file
249              describes the capabilities of a particular terminal.
250
251              If file is “-”, then the data is read from the  standard  input.
252              The file parameter may also be the path of a character-device.
253
254   PROCESSING
255       All  but  one  of  the capabilities recognized by tic are documented in
256       terminfo(5).  The exception is the use capability.
257
258       When a use=entry-name field is discovered in a terminal entry currently
259       being  compiled,  tic  reads  in the binary from /usr/share/terminfo to
260       complete the entry.  (Entries created from file  will  be  used  first.
261       tic  duplicates  the  capabilities in entry-name for the current entry,
262       with the exception of those capabilities that explicitly are defined in
263       the current entry.
264
265       When  an  entry, e.g., entry_name_1, contains a use=entry_name_2 field,
266       any  canceled  capabilities  in  entry_name_2  must  also   appear   in
267       entry_name_1  before  use=  for  these  capabilities  to be canceled in
268       entry_name_1.
269
270       Total compiled entries cannot exceed 4096 bytes.  The name field cannot
271       exceed  512  bytes.   Terminal names exceeding the maximum alias length
272       (32 characters on systems with long filenames, 14 characters otherwise)
273       will  be  truncated  to  the maximum alias length and a warning message
274       will be printed.
275

COMPATIBILITY

277       There is  some  evidence  that  historic  tic  implementations  treated
278       description  fields with no whitespace in them as additional aliases or
279       short names.  This tic does not do that, but it does warn when descrip‐
280       tion  fields may be treated that way and check them for dangerous char‐
281       acters.
282

EXTENSIONS

284       Unlike the SVr4 tic command, this implementation can  actually  compile
285       termcap  sources.   In fact, entries in terminfo and termcap syntax can
286       be mixed in a single source file.  See  terminfo(5)  for  the  list  of
287       termcap names taken to be equivalent to terminfo names.
288
289       The  SVr4  manual  pages  are not clear on the resolution rules for use
290       capabilities.  This implementation of tic will find  use  targets  any‐
291       where  in  the source file, or anywhere in the file tree rooted at TER‐
292       MINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo  data‐
293       base (if it exists), or (finally) anywhere in the system's file tree of
294       compiled entries.
295
296       The error messages from this tic have the same format as  GNU  C  error
297       messages, and can be parsed by GNU Emacs's compile facility.
298
299       The  -0, -1, -C, -G, -I, -N, -R, -T, -V, -a, -e, -f, -g, -o, -r, -s, -t
300       and -x options are not supported under SVr4.  The SVr4 -c mode does not
301       report bad use links.
302
303       System  V  does  not  compile  entries  to  or  read  entries from your
304       $HOME/.terminfo database unless TERMINFO is explicitly set to it.
305

FILES

307       /usr/share/terminfo/?/*
308            Compiled terminal description database.
309

SEE ALSO

311       infocmp(1M),   captoinfo(1M),   infotocap(1M),   toe(1M),   curses(3X),
312       term(5).  terminfo(5).
313
314       This describes ncurses version 6.1 (patch 20180923).
315

AUTHOR

317       Eric S. Raymond <esr@snark.thyrsus.com> and
318       Thomas E. Dickey <dickey@invisible-island.net>
319
320
321
322                                                                       tic(1M)
Impressum