Commit | Line | Data |
---|---|---|
5698e3d1 BJ |
1 | .TH TERMCAP 5 10/22/79 5 |
2 | .UC | |
3 | .SH NAME | |
4 | termcap \- terminal capability data base | |
5 | .SH SYNOPSIS | |
6 | /etc/termcap | |
7 | .SH DESCRIPTION | |
8 | .I Termcap | |
9 | is a data base describing terminals. | |
10 | Terminals are described in | |
11 | .I termcap | |
12 | by giving a set of capabilities which they have, and by describing | |
13 | how operations are performed. | |
14 | Padding requirements and initialization sequences | |
15 | are included in | |
16 | .I termcap. | |
17 | .PP | |
18 | Entries in | |
19 | .I termcap | |
20 | consist of a number of `:' separated fields. | |
21 | The first entry for each terminal gives the names which are known for the | |
22 | terminal, separated by `|' characters. The first name is always 2 characters | |
23 | long and is used by older version 6 systems which store the terminal type | |
24 | in a 16 bit word in a systemwide data base. | |
25 | The second name given is the most common abbreviation for the terminal, and the | |
26 | last name given should be a long name fully identifying the terminal. | |
27 | The second name should contain no blanks; the last name may well contain | |
28 | blanks for readability. | |
29 | .SH CAPABILITIES | |
30 | .nf | |
31 | (P) indicates padding may be specified | |
32 | (P*) indicates that padding may be based on no. lines affected | |
33 | ||
34 | .ta .7i 1.4i 2.1i | |
35 | \fBName Type Pad? Description\fR | |
36 | al str (P*) Add new blank line | |
37 | am bool Terminal has automatic margins | |
38 | bc str Backspace if not \fB^H\fR | |
39 | bs bool Terminal can backspace with \fB^H\fR | |
40 | cd str (P*) Clear to end of display | |
41 | co num Number of columns in a line | |
42 | ce str (P) Clear to end of line | |
43 | cl str (P*) Clear screen | |
44 | cm str (P) Cursor motion | |
45 | cr str (P*) Carriage return, (default \fB^M\fR) | |
46 | da bool Display may be retained above | |
47 | db bool Display may be retained below | |
48 | dc str (P*) Delete character | |
49 | dl str (P*) Delete line | |
50 | dm str Delete mode (enter) | |
51 | ed str End delete mode | |
52 | ei str End insert mode; give ``:ei=:'' if \fBic\fR | |
53 | eo str Can erase overstrikes with a blank | |
54 | ff str (P*) Hardcopy terminal page eject (default \fB^L\fR) | |
55 | hc bool Hardcopy terminal | |
56 | hd str Half-line down (forward 1/2 linefeed) | |
57 | ho str Home cursor (if no \fBcm\fR) | |
58 | hu str Half-line up (reverse 1/2 linefeed) | |
59 | hz str Hazeltine; can't print ~'s | |
60 | ic str (P) Insert character | |
61 | if str Name of file containing \fBis\fR | |
62 | im bool Insert mode (enter); give ``:im=:'' if \fBic\fR | |
63 | in bool Insert mode distinguishes nulls on display | |
64 | ip str (P*) Insert pad after character inserted | |
65 | is str Terminal initialization string | |
66 | k0-k9 str Sent by ``other'' function keys 0-9 | |
67 | kd str Sent by terminal down arrow key | |
68 | ke str Out of ``keypad transmit'' mode | |
69 | kl str Sent by terminal left arrow key | |
70 | ko str Termcap entries for other non-function keys | |
71 | kr str Sent by terminal right arrow key | |
72 | ks str Put terminal in ``keypad transmit'' mode | |
73 | ku str Sent by terminal up arrow key | |
74 | l0-l9 str Labels on ``other'' function keys | |
75 | li num Number of lines on screen or page | |
76 | ll str Last line, first column (if no \fBcm\fR) | |
77 | mi bool Safe to move while in insert mode | |
78 | nc bool No correctly working carriage return (DM2500,H2000) | |
79 | nd str Non-destructive space (cursor right) | |
80 | nl str (P*) Newline character (default \fB\en\fR) | |
81 | ns bool Terminal is a \s-2CRT\s+2 but doesn't scroll. | |
82 | os bool Terminal overstrikes | |
83 | pc str Pad character (rather than null) | |
84 | pt bool Has hardware tabs (may need to be set with \fBis\fR) | |
85 | se str End stand out mode | |
86 | sf str (P) Scroll forwards | |
87 | so str Begin stand out mode | |
88 | sr str (P) Scroll reverse (backwards) | |
89 | ta str (P) Tab (other than \fB^I\fR or with padding) | |
90 | tc str Entry of similar terminal - must be last | |
91 | ti str String to begin programs that use \fBcm\fR | |
92 | te str String to end programs that use \fBcm\fP | |
93 | uc str Underscore one char and move past it | |
94 | ue str End underscore mode | |
95 | ul bool Terminal underlines even though it doesn't overstrike | |
96 | up str Upline (cursor up) | |
97 | us str Start underscore mode | |
98 | vb str Visible bell (may not move cursor) | |
99 | ve str Sequence to end open/visual mode | |
100 | vs str Sequence to start open/visual mode | |
101 | xn str A newline is ignored after a wrap (Concept) | |
102 | xt bool Tabs are destructive (Teleray 1061) | |
103 | .fi | |
104 | .PP | |
105 | The following entry, which describes the Concept\-100, is among the more | |
106 | complex entries in the | |
107 | .I termcap | |
108 | file as of this writing. | |
109 | (Note that this particular concept entry is outdated, | |
110 | and is used as an example only.) | |
111 | .PP | |
112 | .nf | |
113 | c1|c100|concept100:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200:\e | |
114 | :al=3*\eE^R:am:bs:cd=16*\eE^C:ce=16\eE^S:cl=2*^L:cm=\eEa%+ %+ :co#80:\e | |
115 | :dc=16\eE^A:dl=3*\eE^B:ei=\eE\e200:eo:im=\eE^P:in:ip=16*:li#24:mi:nd=\eE=:\e | |
116 | :se=\eEd\eEe:so=\eED\eEE:ta=8\et:ul:up=\eE;:vb=\eEk\eEK:xn: | |
117 | .fi | |
118 | .PP | |
119 | Note that entries may continue onto multiple lines by giving a \e as the last | |
120 | character of a line, and that empty fields | |
121 | may be included for readability (here between the last field on a line | |
122 | and the first field on the next). | |
123 | Capabilities in | |
124 | .I termcap | |
125 | are of three types: | |
126 | Boolean capabilities which indicate that the terminal has | |
127 | some particular feature, numeric capabilities giving the size of the terminal | |
128 | or the size of particular delays, and string | |
129 | capabilities, which give a sequence which can be used to perform particular | |
130 | terminal operations. | |
131 | .PP | |
132 | All capabilities have two letter codes. For instance, the fact that | |
133 | the Concept has ``automatic margins'' (i.e. an automatic return and linefeed | |
134 | when the end of a line is reached) is indicated by the capability \fBam\fR. | |
135 | Hence the description of the Concept includes \fBam\fR. | |
136 | Numeric capabilities are followed by the character `#' and then the value. | |
137 | Thus \fBco\fR which indicates the number of columns the terminal has | |
138 | gives the value `80' for the Concept. | |
139 | .PP | |
140 | Finally, string valued capabilities, such as \fBce\fR (clear to end of line | |
141 | sequence) are given by the two character code, an `=', and then a string | |
142 | ending at the next following `:'. A delay in milliseconds may appear after | |
143 | the `=' in such a capability, and padding characters are supplied by the | |
144 | editor after the remainder of the string is sent to provide this delay. | |
145 | The delay can be either a integer, e.g. `20', or an integer followed by | |
146 | an `*', i.e. `3*'. A `*' indicates that the padding required is proportional | |
147 | to the number of lines affected by the operation, and the amount given is | |
148 | the per-affected-unit padding required. | |
149 | When a `*' is specified, it is sometimes useful to give a delay of the form | |
150 | `3.5' specify a delay per unit to tenths of milliseconds. | |
151 | .PP | |
152 | A number of escape sequences are provided in the string valued capabilities | |
153 | for easy encoding of characters there. A \fB\eE\fR maps to an \s-2ESCAPE\s0 | |
154 | character, \fB^x\fR maps to a control-x for any appropriate x, and the sequences | |
155 | \fB\en \er \et \eb \ef\fR give a newline, return, tab, backspace and formfeed. | |
156 | Finally, characters may be given as three octal digits after a \fB\e\fR, | |
157 | and the characters \fB^\fR and \fB\e\fR may be given as \fB\e^\fR and \fB\e\e\fR. | |
158 | If it is necessary to place a \fB:\fR in a capability it must be escaped in | |
159 | octal as \fB\e072\fR. | |
160 | If it is necessary to place a null character in a string capability it | |
161 | must be encoded as \fB\e200\fR. The routines which deal with | |
162 | .I termcap | |
163 | use C strings, and strip the high bits of the output very late so that | |
164 | a \fB\e200\fR comes out as a \fB\e000\fR would. | |
165 | .PP | |
166 | We now outline how to prepare descriptions of terminals. | |
167 | The most effective way to prepare a terminal description is by imitating | |
168 | the description of a similar terminal in | |
169 | .I termcap | |
170 | and to build up a description gradually, using partial descriptions | |
171 | with | |
172 | .I ex | |
173 | to check that they are correct. | |
174 | Be aware that a very unusual terminal may expose deficiencies in | |
175 | the ability of the | |
176 | .I termcap | |
177 | file to describe it | |
178 | or bugs in | |
179 | .I ex. | |
180 | To easily test a new terminal description you can set the environment variable | |
181 | TERMCAP to a pathname of a file containing the description you are working | |
182 | on and the editor will look there rather than in | |
183 | .I /etc/termcap. | |
184 | TERMCAP can also be set to the termcap entry itself | |
185 | to avoid reading the file when starting up the editor. | |
186 | (This only works on version 7 systems.) | |
187 | .PP | |
188 | .B Basic capabilities | |
189 | .PP | |
190 | The number of columns on each line for the terminal is given by the | |
191 | \fBco\fR numeric capability. If the terminal is a \s-2CRT\s0, then the | |
192 | number of lines on the screen is given by the \fBli\fR capability. | |
193 | If the terminal wraps around to the beginning of the next line when | |
194 | it reaches the right margin, then it should have the \fBam\fR capability. | |
195 | If the terminal can clear its screen, then this is given by the | |
196 | \fBcl\fR string capability. If the terminal can backspace, then it | |
197 | should have the \fBbs\fR capability, unless a backspace is accomplished | |
198 | by a character other than \fB^H\fR (ugh) in which case you should give | |
199 | this character as the \fBbc\fR string capability. If it overstrikes | |
200 | (rather than clearing a position when a character is struck over) | |
201 | then it should have the \fBos\fR capability. | |
202 | .PP | |
203 | A very important point here is that the local cursor motions encoded | |
204 | in | |
205 | .I termcap | |
206 | are undefined at the left and top edges of a \s-2CRT\s0 terminal. | |
207 | The editor will never attempt to backspace around the left edge, nor | |
208 | will it attempt to go up locally off the top. The editor assumes that | |
209 | feeding off the bottom of the screen will cause the screen to scroll up, | |
210 | and the \fBam\fR capability tells whether the cursor sticks at the right | |
211 | edge of the screen. If the terminal has switch selectable automatic margins, | |
212 | the | |
213 | .I termcap | |
214 | file usually assumes that this is on, i.e. \fBam\fR. | |
215 | .PP | |
216 | These capabilities suffice to describe hardcopy and ``glass-tty'' terminals. | |
217 | Thus the model 33 teletype is described as | |
218 | .PP | |
219 | .DT | |
220 | t3|33|tty33:co#72:os | |
221 | .PP | |
222 | while the Lear Siegler \s-2ADM\-3\s0 is described as | |
223 | .PP | |
224 | .DT | |
225 | cl|adm3|3|lsi adm3:am:bs:cl=^Z:li#24:co#80 | |
226 | .PP | |
227 | .B Cursor addressing | |
228 | .PP | |
229 | Cursor addressing in the terminal is described by a | |
230 | \fBcm\fR string capability, with | |
231 | .IR printf (3s) | |
232 | like escapes \fB%x\fR in it. | |
233 | These substitute to encodings of the current line or column position, | |
234 | while other characters are passed through unchanged. | |
235 | If the \fBcm\fR string is thought of as being a function, then its | |
236 | arguments are the line and then the column to which motion is desired, | |
237 | and the \fB%\fR encodings have the following meanings: | |
238 | .PP | |
239 | .DT | |
240 | .nf | |
241 | %d as in \fIprintf\fR, 0 origin | |
242 | %2 like %2d | |
243 | %3 like %3d | |
244 | %. like %c | |
245 | %+x adds \fIx\fR to value, then %. | |
246 | %<xy if value < x adds y; then in any case %. | |
247 | %r reverses order of line and column, no output | |
248 | %i increments line/column (for 1 origin) | |
249 | %% gives a single % | |
250 | %n exclusive or row and column with 0140 (DM2500) | |
251 | .fi | |
252 | .PP | |
253 | Consider the HP2645, which, to get to row 3 and column 12, needs | |
254 | to be sent \eE&a12c03Y padded for 6 milliseconds. Note that the order | |
255 | of the rows and columns is inverted here, and that the row and column | |
256 | are printed as two digits. Thus its \fBcm\fR capability is ``cm=6\eE&%r%2c%2Y''. | |
257 | The Microterm \s-2ACT-IV\s0 needs the current row and column sent | |
258 | preceded by a \fB^T\fR, with the row and column simply encoded in binary, | |
259 | ``cm=^T%.%.''. Terminals which use ``%.'' need to be able to | |
260 | backspace the cursor (\fBbs\fR or \fBbc\fR), | |
261 | and to move the cursor up one line on the screen (\fBup\fR introduced below). | |
262 | This is necessary because it is not always safe to transmit \fB\et\fR, \fB\en\fR | |
263 | \fB^D\fR and \fB\er\fR, as the system may change or discard them. | |
264 | .PP | |
265 | A final example is the \s-2LSI ADM-3a\s0, which uses row and column | |
266 | offset by a blank character, thus ``cm=\eE=%+ %+ ''. | |
267 | .PP | |
268 | .B Cursor motions | |
269 | .PP | |
270 | If the terminal can move the cursor one position to the right, leaving | |
271 | the character at the current position unchanged, then this sequence should | |
272 | be given as \fBnd\fR (non-destructive space). If it can move the cursor | |
273 | up a line | |
274 | on the screen in the same column, this should be given as \fBup\fR. | |
275 | If the terminal has no cursor addressing capability, but can home the cursor | |
276 | (to very upper left corner of screen) then this can be given as | |
277 | \fBho\fR; similarly a fast way of getting to the lower left hand corner | |
278 | can be given as \fBll\fR; this may involve going up with \fBup\fR | |
279 | from the home position, | |
280 | but the editor will never do this itself (unless \fBll\fR does) because it | |
281 | makes no assumption about the effect of moving up from the home position. | |
282 | .PP | |
283 | .B Area clears | |
284 | .PP | |
285 | If the terminal can clear from the current position to the end of the | |
286 | line, leaving the cursor where it is, this should be given as \fBce\fR. | |
287 | If the terminal can clear from the current position to the end of the | |
288 | display, then this should be given as \fBcd\fR. | |
289 | The editor only uses | |
290 | \fBcd\fR from the first column of a line. | |
291 | .PP | |
292 | .B Insert/delete line | |
293 | .PP | |
294 | If the terminal can open a new blank line before the line where the cursor | |
295 | is, this should be given as \fBal\fR; this is done only from the first | |
296 | position of a line. The cursor must then appear on the newly blank line. | |
297 | If the terminal can delete the line which the cursor is on, then this | |
298 | should be given as \fBdl\fR; this is done only from the first position on | |
299 | the line to be deleted. | |
300 | If the terminal can scroll the screen backwards, then this can be given as | |
301 | \fBsb\fR, but just \fBal\fR suffices. | |
302 | If the terminal can retain display memory above then the | |
303 | \fBda\fR capability should be given; if display memory can be retained | |
304 | below then \fBdb\fR should be given. These let the editor understand | |
305 | that deleting a line on the screen may bring non-blank lines up from below | |
306 | or that scrolling back with \fBsb\fR may bring down non-blank lines. | |
307 | .PP | |
308 | .B Insert/delete character | |
309 | .PP | |
310 | There are two basic kinds of intelligent terminals with respect to | |
311 | insert/delete character which can be described using | |
312 | .I termcap. | |
313 | The most common insert/delete character operations affect only the characters | |
314 | on the current line and shift characters off the end of the line rigidly. | |
315 | Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make | |
316 | a distinction between typed and untyped blanks on the screen, shifting | |
317 | upon an insert or delete only to an untyped blank on the screen which is | |
318 | either eliminated, or expanded to two untyped blanks. You can find out | |
319 | which kind of terminal you have by clearing the screen and then typing | |
320 | text separated by cursor motions. Type ``abc\ \ \ \ def'' using local | |
321 | cursor motions (not spaces) between the ``abc'' and the ``def''. | |
322 | Then position the cursor before the ``abc'' and put the terminal in insert | |
323 | mode. If typing characters causes the rest of the line to shift | |
324 | rigidly and characters to fall off the end, then your terminal does | |
325 | not distinguish between blanks and untyped positions. If the ``abc'' | |
326 | shifts over to the ``def'' which then move together around the end of the | |
327 | current line and onto the next as you insert, you have the second type of | |
328 | terminal, and should give the capability \fBin\fR, which stands for | |
329 | ``insert null''. If your terminal does something different and unusual | |
330 | then you may have to modify the editor to get it to use the insert | |
331 | mode your terminal defines. We have seen no terminals which have an insert | |
332 | mode not not falling into one of these two classes. | |
333 | .PP | |
334 | The editor can handle both terminals which have an insert mode, and terminals | |
335 | which send a simple sequence to open a blank position on the current line. | |
336 | Give as \fBim\fR the sequence to get into insert mode, or give it an | |
337 | empty value if your terminal uses a sequence to insert a blank position. | |
338 | Give as \fBei\fR the sequence to leave insert mode (give this, with | |
339 | an empty value also if you gave \fBim\fR so). | |
340 | Now give as \fBic\fR any sequence needed to be sent just before sending | |
341 | the character to be inserted. Most terminals with a true insert mode | |
342 | will not give \fBic\fR, terminals which send a sequence to open a screen | |
343 | position should give it here. (Insert mode is preferable to the sequence | |
344 | to open a position on the screen if your terminal has both.) | |
345 | If post insert padding is needed, give this as a number of milliseconds | |
346 | in \fBip\fR (a string option). Any other sequence which may need to be | |
347 | sent after an insert of a single character may also be given in \fBip\fR. | |
348 | .PP | |
349 | It is occasionally necessary to move around while in insert mode | |
350 | to delete characters on the same line (e.g. if there is a tab after | |
351 | the insertion position). If your terminal allows motion while in | |
352 | insert mode you can give the capability \fBmi\fR to speed up inserting | |
353 | in this case. Omitting \fBmi\fR will affect only speed. Some terminals | |
354 | (notably Datamedia's) must not have \fBmi\fR because of the way their | |
355 | insert mode works. | |
356 | .PP | |
357 | Finally, you can specify delete mode by giving \fBdm\fR and \fBed\fR | |
358 | to enter and exit delete mode, and \fBdc\fR to delete a single character | |
359 | while in delete mode. | |
360 | .PP | |
361 | .B "Highlighting, underlining, and visible bells" | |
362 | .PP | |
363 | If your terminal has sequences to enter and exit standout mode these | |
364 | can be given as \fBso\fR and \fBse\fR respectively. | |
365 | If there are several flavors of standout mode | |
366 | (such as inverse video, blinking, or underlining - | |
367 | half bright is not considered ``standout'') | |
368 | the prefered mode is inverse video by itself. | |
369 | It doesn't matter if the code to change into or out of standout | |
370 | mode leaves one or even two blank spaces on the screen, | |
371 | as the TVI 912 and Teleray 1061 do. | |
372 | .PP | |
373 | Codes to begin underlining and end underlining can be given as \fBus\fR | |
374 | and \fBue\fR respectively. | |
375 | If the terminal has a code to underline the current character and move | |
376 | the cursor one space to the right, | |
377 | such as the Microterm Mime, | |
378 | this can be given as \fBuc\fR. | |
379 | (If the underline code does not move the cursor to the right, | |
380 | give the code followed by a nondestructive space.) | |
381 | .PP | |
382 | If the terminal has | |
383 | a way of flashing the screen to indicate an error quietly (a bell replacement) | |
384 | then this can be given as \fBvb\fR; it must not move the cursor. | |
385 | If the terminal should be placed in a different mode during | |
386 | open and visual modes of | |
387 | .I ex, | |
388 | this can be given as | |
389 | \fBvs\fR and \fBve\fR, sent at the start and end of these modes | |
390 | respectively. These can be used to change, e.g., from a underline | |
391 | to a block cursor and back. | |
392 | .PP | |
393 | If the terminal needs to be in a special mode when running | |
394 | a program that addresses the cursor, | |
395 | the codes to enter and exit this mode can be given as \fBti\fR and \fBte\fR. | |
396 | This arises, for example, from terminals like the Concept with more than | |
397 | one page of memory. | |
398 | If the terminal has only memory relative cursor addressing and not screen | |
399 | relative cursor addressing, a one screen-sized window must be fixed into | |
400 | the terminal for cursor addressing to work properly. | |
401 | .PP | |
402 | If your terminal correctly generated underlined characters | |
403 | (with no special codes needed) | |
404 | enen though it does not overstrike, | |
405 | then you should give the capability \fBul\fR. | |
406 | If overstrikes are erasable with a blank, | |
407 | then this should be indicated by giving \fBeo\fR. | |
408 | .PP | |
409 | .B Keypad | |
410 | .PP | |
411 | If the terminal has a keypad that transmits codes when the keys are pressed, | |
412 | this information can be given. Note that it is not possible to handle | |
413 | terminals where the keypad only works in local (this applies, for example, | |
414 | to the unshifted HP 2621 keys). | |
415 | If the keypad can be set to transmit or not transmit, | |
416 | give these codes as \fBks\fR and \fBke\fR. | |
417 | Otherwise the keypad is assumed to always transmit. | |
418 | The codes sent by the left arrow, right arrow, up arrow, down arrow, | |
419 | and home keys can be given as \fBkl, kr, ku, kd, \fRand\fB kh\fR respectively. | |
420 | If there are function keys such as f0, f1, ..., f9, the codes they send | |
421 | can be given as \fBk0, k1, ..., k9\fR. | |
422 | If these keys have labels other than the default f0 through f9, the labels | |
423 | can be given as \fBl0, l1, ..., l9\fR. | |
424 | If there are other keys that transmit the same code as the terminal expects | |
425 | for the corresponding function, such as clear screen, the \fItermcap\fP | |
426 | 2 letter codes can be given in the \fBko\fR capability, | |
427 | for example, ``:ko=cl,ll,sf,sb:'', which says that the terminal has | |
428 | clear, home down, scroll down, and scroll up keys that transmit | |
429 | the same thing as the cl, ll, sf, and sb entries. | |
430 | .PP | |
431 | .B Miscellaneous | |
432 | .PP | |
433 | If the terminal requires other than a null (zero) character as a pad, | |
434 | then this can be given as \fBpc\fR. | |
435 | .PP | |
436 | If tabs on the terminal require padding, or if the terminal uses a | |
437 | character other than \fB^I\fR to tab, then this can be given as \fBta\fR. | |
438 | .PP | |
439 | Hazeltine terminals, which don't allow `~' characters to be printed should | |
440 | indicate \fBhz\fR. | |
441 | Datamedia terminals, which echo carriage-return linefeed for carriage return | |
442 | and then ignore a following linefeed should indicate \fBnc\fR. | |
443 | Early Concept terminals, which ignore a linefeed immediately after an \fBam\fR | |
444 | wrap, should indicate \fBxn\fR. | |
445 | Teleray terminals, where tabs turn all characters moved over to blanks, | |
446 | should indicate \fBxt\fR. | |
447 | Other specific terminal problems may be corrected by adding more | |
448 | capabilities of the form \fBx\fIx\fR. | |
449 | .PP | |
450 | Other capabilities | |
451 | include \fBis\fR, an initialization string for the terminal, | |
452 | and \fBif\fR, the name of a file containing long initialization strings. | |
453 | These strings are expected to properly clear and then set the tabs | |
454 | on the terminal, if the terminal has settable tabs. | |
455 | If both are given, \fBis\fR will be printed before \fBif\fR. | |
456 | This is useful where \fBif\fR is /usr/lib/tabset/std but \fBis\fR | |
457 | clears the tabs first. | |
458 | .PP | |
459 | If there are two very similar terminals, | |
460 | one can be defined as being just like the other with certain exceptions. | |
461 | The string capability \fBtc\fR can be given | |
462 | with the name of the similar terminal. | |
463 | This capability must be \fIlast\fP and the combined length of the two entries | |
464 | must not exceed 1024. Since | |
465 | .I termlib | |
466 | routines search the entry from left to right, and since the tc capability is | |
467 | replaced by the corresponding entry, the capabilities given at the left | |
468 | override the ones in the similar terminal. | |
469 | A capability can be cancelled with \fBxx@\fR where xx is the capibility. | |
470 | For example, the entry | |
471 | .br | |
472 | hn|2621nl:ks@:ke@:tc=2621: | |
473 | .br | |
474 | defines a 2621nl that does not have the \fBks\fR or \fBke\fR capabilities, | |
475 | and hence does not turn on the function key labels when in visual mode. | |
476 | This is useful for different modes for a terminal, or for different | |
477 | user preferences. | |
478 | .SH FILES | |
479 | .DT | |
480 | /etc/termcap file containing terminal descriptions | |
481 | .SH SEE ALSO | |
482 | ex(1), termlib(3), tset(1), vi(1), ul(1), more(1) | |
483 | .SH AUTHOR | |
484 | William Joy | |
485 | .br | |
486 | Mark Horton added underlining and keypad support | |
487 | .SH BUGS | |
488 | .I Ex | |
489 | allows only 256 characters for string capabilities, and the routines | |
490 | in | |
491 | .I termlib | |
492 | do not check for overflow of this buffer. | |
493 | The total length of a single entry (excluding only escaped newlines) | |
494 | may not exceed 1024. |