tic.1m.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <!--
  3. ****************************************************************************
  4. * Copyright (c) 1998-2005,2006 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.44 2006/12/24 17:59:11 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. </PRE>
  45. <H2>NAME</H2><PRE>
  46. <STRONG>tic</STRONG> - the <EM>terminfo</EM> entry-description compiler
  47. </PRE>
  48. <H2>SYNOPSIS</H2><PRE>
  49. <STRONG>tic</STRONG> [<STRONG>-1CGILNTUVacfgrstx</STRONG>] [<STRONG>-e</STRONG> <EM>names</EM>] [<STRONG>-o</STRONG> <EM>dir</EM>] [<STRONG>-R</STRONG> <EM>subset</EM>]
  50. [<STRONG>-v</STRONG>[<EM>n</EM>]] [<STRONG>-w</STRONG>[<EM>n</EM>]] <EM>file</EM>
  51. </PRE>
  52. <H2>DESCRIPTION</H2><PRE>
  53. The command <STRONG>tic</STRONG> translates a <STRONG>terminfo</STRONG> file from source
  54. format into compiled format. The compiled format is nec-
  55. essary for use with the library routines in <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
  56. The results are normally placed in the system terminfo
  57. directory <STRONG>/usr/share/terminfo</STRONG>. There are two ways to
  58. change this behavior.
  59. First, you may override the system default by setting the
  60. variable <STRONG>TERMINFO</STRONG> in your shell environment to a valid
  61. (existing) directory name.
  62. Secondly, if <STRONG>tic</STRONG> cannot get access to <EM>/usr/share/terminfo</EM>
  63. or your TERMINFO directory, it looks for the directory
  64. <EM>$HOME/.terminfo</EM>; if that directory exists, the entry is
  65. placed there.
  66. Libraries that read terminfo entries are expected to check
  67. for a TERMINFO directory first, look at <EM>$HOME/.terminfo</EM> if
  68. TERMINFO is not set, and finally look in <EM>/usr/share/ter-</EM>
  69. <EM>minfo</EM>.
  70. <STRONG>-1</STRONG> restricts the output to a single column
  71. <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities
  72. rather than discarding them. Capabilities are com-
  73. mented by prefixing them with a period. This sets
  74. the <STRONG>-x</STRONG> option, because it treats the commented-out
  75. entries as user-defined names. If the source is
  76. termcap, accept the 2-character names required by
  77. version 6. Otherwise these are ignored.
  78. <STRONG>-C</STRONG> Force source translation to termcap format. Note:
  79. this differs from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in
  80. that it does not merely translate capability names,
  81. but also translates terminfo strings to termcap
  82. format. Capabilities that are not translatable are
  83. left in the entry under their terminfo names but
  84. commented out with two preceding dots.
  85. <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including
  86. syntax problems and bad use links. If you specify
  87. <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this option, the code will print warn-
  88. ings about entries which, after use resolution, are
  89. more than 1023 (4096) bytes long. Due to a fixed
  90. buffer length in older termcap libraries (and a
  91. documented limit in terminfo), these entries may
  92. cause core dumps.
  93. <STRONG>-e</STRONG> <EM>names</EM>
  94. Limit writes and translations to the following
  95. comma-separated list of terminals. If any name or
  96. alias of a terminal matches one of the names in the
  97. list, the entry will be written or translated as
  98. normal. Otherwise no output will be generated for
  99. it. The option value is interpreted as a file con-
  100. taining the list if it contains a '/'. (Note:
  101. depending on how tic was compiled, this option may
  102. require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
  103. <STRONG>-f</STRONG> Display complex terminfo strings which contain
  104. if/then/else/endif expressions indented for read-
  105. ability.
  106. <STRONG>-G</STRONG> Display constant literals in decimal form rather
  107. than their character equivalents.
  108. <STRONG>-g</STRONG> Display constant character literals in quoted form
  109. rather than their decimal equivalents.
  110. <STRONG>-I</STRONG> Force source translation to terminfo format.
  111. <STRONG>-L</STRONG> Force source translation to terminfo format using
  112. the long C variable names listed in &lt;<STRONG>term.h</STRONG>&gt;
  113. <STRONG>-N</STRONG> Disable smart defaults. Normally, when translating
  114. from termcap to terminfo, the compiler makes a num-
  115. ber of assumptions about the defaults of string
  116. capabilities <STRONG>reset1_string</STRONG>, <STRONG>carriage_return</STRONG>, <STRONG>cur-</STRONG>
  117. <STRONG>sor_left</STRONG>, <STRONG>cursor_down</STRONG>, <STRONG>scroll_forward</STRONG>, <STRONG>tab</STRONG>, <STRONG>new-</STRONG>
  118. <STRONG>line</STRONG>, <STRONG>key_backspace</STRONG>, <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then
  119. attempts to use obsolete termcap capabilities to
  120. deduce correct values. It also normally suppresses
  121. output of obsolete termcap capabilities such as <STRONG>bs</STRONG>.
  122. This option forces a more literal translation that
  123. also preserves the obsolete capabilities.
  124. <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given directory. Over-
  125. rides the TERMINFO environment variable.
  126. <STRONG>-R</STRONG><EM>subset</EM>
  127. Restrict output to a given subset. This option is
  128. for use with archaic versions of terminfo like
  129. those on SVr1, Ultrix, or HP/UX that do not support
  130. the full set of SVR4/XSI Curses terminfo; and out-
  131. right broken ports like AIX 3.x that have their own
  132. extensions incompatible with SVr4/XSI. Available
  133. subsets are "SVr1", "Ultrix", "HP", "BSD" and
  134. "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details.
  135. <STRONG>-r</STRONG> Force entry resolution (so there are no remaining
  136. tc capabilities) even when doing translation to
  137. termcap format. This may be needed if you are
  138. preparing a termcap file for a termcap library
  139. (such as GNU termcap through version 1.3 or BSD
  140. termcap through 4.3BSD) that does not handle multi-
  141. ple tc capabilities per entry.
  142. <STRONG>-s</STRONG> Summarize the compile by showing the directory into
  143. which entries are written, and the number of
  144. entries which are compiled.
  145. <STRONG>-T</STRONG> eliminates size-restrictions on the generated text.
  146. This is mainly useful for testing and analysis,
  147. since the compiled descriptions are limited (e.g.,
  148. 1023 for termcap, 4096 for terminfo).
  149. <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities.
  150. Normally when translating from terminfo to termcap,
  151. untranslatable capabilities are commented-out.
  152. <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing
  153. the source file. Normally, it infers data which is
  154. commonly missing in older terminfo data, or in term-
  155. caps.
  156. <STRONG>-V</STRONG> reports the version of ncurses which was used in this
  157. program, and exits.
  158. <STRONG>-v</STRONG><EM>n</EM> specifies that (verbose) output be written to stan-
  159. dard error trace information showing <STRONG>tic</STRONG>'s progress.
  160. The optional parameter <EM>n</EM> is a number from 1 to 10,
  161. inclusive, indicating the desired level of detail of
  162. information. If <EM>n</EM> is omitted, the default level is
  163. 1. If <EM>n</EM> is specified and greater than 1, the level
  164. of detail is increased.
  165. <STRONG>-w</STRONG><EM>n</EM> specifies the width of the output. The parameter is
  166. optional. If it is omitted, it defaults to 60.
  167. <STRONG>-x</STRONG> Treat unknown capabilities as user-defined. That is,
  168. if you supply a capability name which <STRONG>tic</STRONG> does not
  169. recognize, it will infer its type (boolean, number or
  170. string) from the syntax and make an extended table
  171. entry for that. User-defined capability strings
  172. whose name begins with ``k'' are treated as function
  173. keys.
  174. <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions
  175. in source format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each description
  176. in the file describes the capabilities of a particu-
  177. lar terminal.
  178. The debug flag levels are as follows:
  179. 1 Names of files created and linked
  180. 2 Information related to the ``use'' facility
  181. 3 Statistics from the hashing algorithm
  182. 5 String-table memory allocations
  183. 7 Entries into the string-table
  184. 8 List of tokens encountered by scanner
  185. 9 All values computed in construction of the hash ta-
  186. ble
  187. If the debug level <EM>n</EM> is not given, it is taken to be one.
  188. All but one of the capabilities recognized by <STRONG>tic</STRONG> are doc-
  189. umented in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. The exception is the <STRONG>use</STRONG> capabil-
  190. ity.
  191. When a <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM> field is discovered in a terminal
  192. entry currently being compiled, <STRONG>tic</STRONG> reads in the binary
  193. from <STRONG>/usr/share/terminfo</STRONG> to complete the entry. (Entries
  194. created from <EM>file</EM> will be used first. If the environment
  195. variable <STRONG>TERMINFO</STRONG> is set, that directory is searched
  196. instead of <STRONG>/usr/share/terminfo</STRONG>.) <STRONG>tic</STRONG> duplicates the capa-
  197. bilities in <EM>entry</EM>-<EM>name</EM> for the current entry, with the
  198. exception of those capabilities that explicitly are
  199. defined in the current entry.
  200. When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a
  201. <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field, any canceled capabilities in
  202. <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG>
  203. for these capabilities to be canceled in <STRONG>entry_name_1</STRONG>.
  204. If the environment variable <STRONG>TERMINFO</STRONG> is set, the compiled
  205. results are placed there instead of <STRONG>/usr/share/terminfo</STRONG>.
  206. Total compiled entries cannot exceed 4096 bytes. The name
  207. field cannot exceed 512 bytes. Terminal names exceeding
  208. the maximum alias length (32 characters on systems with
  209. long filenames, 14 characters otherwise) will be truncated
  210. to the maximum alias length and a warning message will be
  211. printed.
  212. </PRE>
  213. <H2>COMPATIBILITY</H2><PRE>
  214. There is some evidence that historic <STRONG>tic</STRONG> implementations
  215. treated description fields with no whitespace in them as
  216. additional aliases or short names. This <STRONG>tic</STRONG> does not do
  217. that, but it does warn when description fields may be
  218. treated that way and check them for dangerous characters.
  219. </PRE>
  220. <H2>EXTENSIONS</H2><PRE>
  221. Unlike the stock SVr4 <STRONG>tic</STRONG> command, this implementation can
  222. actually compile termcap sources. In fact, entries in
  223. terminfo and termcap syntax can be mixed in a single
  224. source file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of termcap
  225. names taken to be equivalent to terminfo names.
  226. The SVr4 manual pages are not clear on the resolution
  227. rules for <STRONG>use</STRONG> capabilities. This implementation of <STRONG>tic</STRONG>
  228. will find <STRONG>use</STRONG> targets anywhere in the source file, or any-
  229. where in the file tree rooted at <STRONG>TERMINFO</STRONG> (if <STRONG>TERMINFO</STRONG> is
  230. defined), or in the user's <EM>$HOME/.terminfo</EM> directory (if
  231. it exists), or (finally) anywhere in the system's file
  232. tree of compiled entries.
  233. The error messages from this <STRONG>tic</STRONG> have the same format as
  234. GNU C error messages, and can be parsed by GNU Emacs's
  235. compile facility.
  236. The <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>,
  237. <STRONG>-s</STRONG>, <STRONG>-t</STRONG> and <STRONG>-x</STRONG> options are not supported under SVr4. The
  238. SVr4 <STRONG>-c</STRONG> mode does not report bad use links.
  239. System V does not compile entries to or read entries from
  240. your <EM>$HOME/.terminfo</EM> directory unless TERMINFO is explic-
  241. itly set to it.
  242. </PRE>
  243. <H2>FILES</H2><PRE>
  244. <STRONG>/usr/share/terminfo/?/*</STRONG>
  245. Compiled terminal description database.
  246. </PRE>
  247. <H2>SEE ALSO</H2><PRE>
  248. <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>,
  249. <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
  250. This describes <STRONG>ncurses</STRONG> version 5.6 (patch 20081011).
  251. <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
  252. </PRE>
  253. <HR>
  254. <ADDRESS>
  255. Man(1) output converted with
  256. <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
  257. </ADDRESS>
  258. </BODY>
  259. </HTML>