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