Annotation of src/usr.bin/tic/tic.1, Revision 1.6
1.6 ! millert 1: .\" $OpenBSD: tic.1,v 1.5 1999/03/03 00:42:16 millert Exp $
1.1 millert 2: .\"
3: .\"***************************************************************************
1.4 millert 4: .\" Copyright (c) 1998,1999 Free Software Foundation, Inc. *
1.1 millert 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: .\"
1.6 ! millert 31: .\" $From: tic.1m,v 1.25 1999/03/07 02:07:06 tom Exp $
1.1 millert 32: .TH tic 1 ""
33: .ds n 5
34: .ds d /usr/share/terminfo
35: .SH NAME
36: \fBtic\fR - the \fIterminfo\fR entry-description compiler
37: .SH SYNOPSIS
38: \fBtic\fR
1.3 millert 39: [\fB\-\
1.1 millert 40: 1\
41: C\
42: I\
43: N\
44: R\
45: T\
46: c\
47: f\
48: r\
49: s\
50: \fR]
51: [\fB-e\fR \fInames\fR]
52: [\fB-o\fR \fIdir\fR]
53: [\fB-v\fR[\fIn\fR]]
54: [\fB-w\fR[\fIn\fR]]
55: \fIfile\fR
56: .br
57: .SH DESCRIPTION
58: The command \fBtic\fR translates a \fBterminfo\fR file from source
59: format into compiled format. The compiled format is necessary for use with
60: the library routines in \fBcurses\fR(3).
61: .PP
62: The results are normally placed in the system terminfo
63: directory \fB\*d\fR. There are two ways to change this behavior.
64: .PP
65: First, you may override the system default by setting the variable
66: \fBTERMINFO\fR in your shell environment to a valid (existing) directory name.
67: .PP
68: Secondly, if \fBtic\fR cannot get access to \fI\*d\fR or your TERMINFO
69: directory, it looks for the directory \fI$HOME/.terminfo\fR; if that directory
70: exists, the entry is placed there.
71: .PP
72: Libraries that read terminfo entries are expected to check for a TERMINFO
73: directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
74: finally look in \fI\*d\fR.
75: .TP
76: \fB-c\fR
77: specifies to only check \fIfile\fR for errors, including syntax problems and
78: bad use links. If you specify \fB-C\fR (\fB-I\fR) with this option, the code
79: will print warnings about entries which, after use resolution, are more than
80: 1023 (4096) bytes long. Due to a fixed buffer length in older termcap
81: libraries (and a documented limit in terminfo), these entries may cause core
82: dumps.
83: .TP
84: \fB-v\fR\fIn\fR
85: specifies that (verbose) output be written to standard error trace
86: information showing \fBtic\fR's progress. The optional integer
87: \fIn\fR is a number from 1 to 10, inclusive, indicating the desired
88: level of detail of information. If \fIn\fR is omitted, the default
89: level is 1. If \fIn\fR is specified and greater than 1, the level of
90: detail is increased.
91: .TP
92: \fB-o\fR\fIdir\fR
93: Write compiled entries to given directory. Overrides the TERMINFO environment
94: variable.
95: .TP
96: \fB-w\fR\fIn\fR
97: specifies the width of the output.
98: .TP
99: \fB-1\fR
100: restricts the output to a single column
101: .TP
102: \fB-C\fR
103: Force source translation to termcap format. Note: this differs from the -C
104: option of \fIinfocmp\fR(1) in that it does not merely translate capability
105: names, but also translates terminfo strings to termcap format. Capabilities
106: that are not translatable are left in the entry under their terminfo names
107: but commented out with two preceding dots.
108: .TP
1.6 ! millert 109: \fB-G\fR
! 110: Display constant literals in decimal form
! 111: rather than their character equivalents.
! 112: .TP
1.1 millert 113: \fB-I\fR
114: Force source translation to terminfo format.
115: .TP
116: \fB-L\fR
117: Force source translation to terminfo format
118: using the long C variable names listed in <\fBterm.h\fR>
119: .TP
120: \fB-N\fR
121: Disable smart defaults.
122: Normally, when translating from termcap to terminfo, the compiler makes
123: a number of assumptions about the defaults of string capabilities
124: \fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR,
125: \fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR,
126: \fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts
127: to use obsolete termcap capabilities to deduce correct values. It also
128: normally suppresses output of obsolete termcap capabilities such as \fBbs\fR.
129: This option forces a more literal translation that also preserves the
130: obsolete capabilities.
131: .TP
132: \fB-R\fR\fIsubset\fR
133: Restrict output to a given subset. This option is for use with archaic
134: versions of terminfo like those on SVr1, Ultrix, or HP/UX that don't support
135: the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
136: that have their own extensions incompatible with SVr4/XSI. Available subsets
137: are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
138: .TP
139: \fB-T\fR
140: eliminates size-restrictions on the generated text.
141: This is mainly useful for testing and analysis, since the compiled
142: descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
143: .TP
144: \fB-r\fR
145: Force entry resolution (so there are no remaining tc capabilities) even
146: when doing translation to termcap format. This may be needed if you are
147: preparing a termcap file for a termcap library (such as GNU termcap up
148: to version 1.3 or BSD termcap up to 4.3BSD) that doesn't handle multiple
149: tc capabilities per entry.
150: .TP
151: \fB-e\fR
152: Limit writes and translations to the following comma-separated list of
153: terminals.
154: If any name or alias of a terminal matches one of the names in
155: the list, the entry will be written or translated as normal.
156: Otherwise no output will be generated for it.
157: The option value is interpreted as a file containing the list if it
158: contains a '/'.
159: (Note: depending on how tic was compiled, this option may require -I or -C.)
160: .TP
161: \fB-f\fR
162: Display complex terminfo strings which contain if/then/else/endif expressions
163: indented for readability.
164: .TP
1.3 millert 165: \fB-g\fR
166: Display constant character literals in quoted form
167: rather than their decimal equivalents.
168: .TP
1.1 millert 169: \fB-s\fR
170: Summarize the compile by showing the directory into which entries
171: are written, and the number of entries which are compiled.
172: .TP
173: \fIfile\fR
174: contains one or more \fBterminfo\fR terminal descriptions in source
175: format [see \fBterminfo\fR(\*n)]. Each description in the file
176: describes the capabilities of a particular terminal.
177: .PP
178: The debug flag levels are as follows:
179: .TP
180: 1
181: Names of files created and linked
182: .TP
183: 2
184: Information related to the ``use'' facility
185: .TP
186: 3
187: Statistics from the hashing algorithm
188: .TP
189: 5
190: String-table memory allocations
191: .TP
192: 7
193: Entries into the string-table
194: .TP
195: 8
196: List of tokens encountered by scanner
197: .TP
198: 9
199: All values computed in construction of the hash table
200: .LP
201: If n is not given, it is taken to be one.
202: .PP
203: All but one of the capabilities recognized by \fBtic\fR are documented
204: in \fBterminfo\fR(\*n). The exception is the \fBuse\fR capability.
205:
206: When a \fBuse\fR=\fIentry\fR-\fIname\fR field is discovered in a
207: terminal entry currently being compiled, \fBtic\fR reads in the binary
208: from \fB\*d\fR to complete the entry. (Entries created from
209: \fIfile\fR will be used first. If the environment variable
210: \fBTERMINFO\fR is set, that directory is searched instead of
211: \fB\*d\fR.) \fBtic\fR duplicates the capabilities in
212: \fIentry\fR-\fIname\fR for the current entry, with the exception of
213: those capabilities that explicitly are defined in the current entry.
214:
215: When an entry, e.g., \fBentry_name_1\fR, contains a
216: \fBuse=\fR\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled
217: capabilities in \fIentry\fR_\fIname\fR_\fI2\fR must also appear in
218: \fBentry_name_1\fR before \fBuse=\fR for these capabilities to be
219: canceled in \fBentry_name_1\fR.
220:
221: If the environment variable \fBTERMINFO\fR is set, the compiled
222: results are placed there instead of \fB\*d\fR.
223:
224: Total compiled entries cannot exceed 4096 bytes. The name field cannot
225: exceed 512 bytes. Terminal names exceeding the maximum alias length
226: (32 characters on systems with long filenames, 14 characters otherwise)
227: will be truncated to the maximum alias length and a warning message will be printed.
228: .SH COMPATIBILITY
229: There is some evidence that historic \fBtic\fR implementations treated
230: description fields with no whitespace in them as additional aliases or
231: short names. This \fBtic\fR does not do that, but it does warn when
232: description fields may be treated that way and check them for dangerous
233: characters.
234: .SH EXTENSIONS
235: Unlike the stock SVr4 \fBtic\fR command, this implementation can actually
236: compile termcap sources. In fact, entries in terminfo and termcap syntax can
237: be mixed in a single source file. See \fBterminfo\fR(\*n) for the list of
238: termcap names taken to be equivalent to terminfo names.
239:
240: The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR
241: capabilities.
242: This implementation of \fBtic\fR will find \fBuse\fR targets anywhere
243: in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fR (if
244: \fBTERMINFO\fR is defined), or in the user's \fI$HOME/.terminfo\fR directory
245: (if it exists), or (finally) anywhere in the system's file tree of
246: compiled entries.
247:
248: The error messages from this \fBtic\fR have the same format as GNU C
249: error messages, and can be parsed by GNU Emacs's compile facility.
250:
1.3 millert 251: The
252: \fB-o\fR,
1.6 ! millert 253: \fB-G\fR,
1.3 millert 254: \fB-I\fR,
255: \fB-C\fR,
256: \fB-N\fR,
257: \fB-R\fR,
258: \fB-e\fR,
259: \fB-f\fR,
260: \fB-g\fR,
261: \fB-T\fR,
1.5 millert 262: \fB-r\fR and
263: \fB-s\fR
1.3 millert 264: options
1.1 millert 265: are not supported under SVr4.
266: The SVr4 -c mode does not report bad use links.
267:
268: System V does not compile entries to or read entries from your
269: \fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it.
270: .SH FILES
271: .TP 5
272: \fB\*d/?/*\fR
273: Compiled terminal description database.
274: .SH SEE ALSO
1.4 millert 275: \fBinfocmp\fR(1), \fBcaptoinfo\fR(1), \fBcurses\fR(3), \fBterminfo\fR(\*n).
1.1 millert 276: .\"#
277: .\"# The following sets edit modes for GNU EMACS
278: .\"# Local Variables:
279: .\"# mode:nroff
280: .\"# fill-column:79
281: .\"# End: