4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / share / termcap / termcap.5
CommitLineData
fbadbf3d
KB
1.\" Copyright (c) 1985, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
c4737001 3.\"
91cff1e1 4.\" %sccs.include.redist.man%
110d9509 5.\"
fbadbf3d 6.\" @(#)termcap.5 8.1 (Berkeley) %G%
c4737001 7.\"
e46e0a76
CL
8.Dd
9.Dt TERMCAP 5
10.Os BSD 3
11.Sh NAME
12.Nm termcap
13.Nd terminal capability data base
14.Sh SYNOPSIS
15.Nm termcap
16.Sh DESCRIPTION
17The
18.Nm Termcap
19file
c4737001
KM
20is a data base describing terminals,
21used,
e46e0a76 22for example,
c4737001 23by
e46e0a76 24.Xr \&vi 1
c4737001 25and
e46e0a76 26.Xr curses 3 .
c4737001 27Terminals are described in
e46e0a76 28.Nm termcap
ef978bfe 29by giving a set of capabilities that they have and by describing
c4737001
KM
30how operations are performed.
31Padding requirements and initialization sequences
32are included in
e46e0a76
CL
33.Nm termcap .
34.Pp
c4737001 35Entries in
e46e0a76 36.Nm termcap
ef978bfe
JB
37consist of a number of `:'-separated fields.
38The first entry for each terminal gives the names that are known for the
39terminal, separated by `|' characters.
516a13e1
KB
40The first name given is the most common abbreviation for the terminal.
41The last name given should be a long name fully identifying the terminal,
ef978bfe 42and all others are understood as synonyms for the terminal name.
516a13e1
KB
43All names but the last should be in lower case and contain no blanks;
44the last name may well contain upper case characters and blanks for
45readability.
e46e0a76 46.Pp
ef978bfe
JB
47Terminal names (except for the last, verbose entry)
48should be chosen using the following conventions.
49The particular piece of hardware making up the terminal
e46e0a76
CL
50should have a root name chosen, thus
51.Dq hp2621
ef978bfe
JB
52This name should not contain hyphens.
53Modes that the hardware can be in
54or user preferences
55should be indicated by appending a hyphen and an indicator of the mode.
e46e0a76
CL
56Therefore, a
57.Dq vt100
58in 132-column mode would be
59.Dq vt100-w .
ef978bfe 60The following suffixes should be used where possible:
e46e0a76
CL
61.Pp
62.Bd -filled -offset indent
63.Bl -column indent "With automatic margins (usually default)xx"
64.Sy Suffix Meaning Example
ef978bfe
JB
65-w Wide mode (more than 80 columns) vt100-w
66-am With automatic margins (usually default) vt100-am
67-nam Without automatic margins vt100-nam
e46e0a76 68.Pf \- Ar n Ta No "Number of lines on the screen aaa-60"
ef978bfe 69-na No arrow keys (leave them in local) concept100-na
e46e0a76 70.Pf \- Ar \&np Ta No "Number of pages of memory concept100-4p"
ef978bfe 71-rv Reverse video concept100-rv
e46e0a76
CL
72.El
73.Ed
74.Sh CAPABILITIES
ef978bfe 75The characters in the
e46e0a76
CL
76The
77.Em Notes
78function
ef978bfe
JB
79field in the table have the following meanings
80(more than one may apply to a capability):
e46e0a76
CL
81.Pp
82.Bd -unfilled -offset indent
ef978bfe
JB
83N indicates numeric parameter(s)
84P indicates that padding may be specified
85* indicates that padding may be based on the number of lines affected
86o indicates capability is obsolete
e46e0a76
CL
87.Ed
88.Pp
89.Dq Obsolete
90capabilities have no
91.Em terminfo
ef978bfe
JB
92equivalents,
93since they were considered useless,
94or are subsumed by other capabilities.
95New software should not rely on them at all.
e46e0a76
CL
96.Pp
97.Bl -column indent indent indent
98.Sy Name Type Notes Description
99functions
100.It "ae str (P) End alternate character set."
101.It AL str (NP*) Add"
102.Em n
103new blank lines
104.It "al str (P*) Add new blank line."
105.It "am bool Terminal has automatic margins."
106.It "as str (P) Start alternate character set."
107.It "bc str (o) Backspace if not."
108.Sy \&^H .
109.It "bl str (P) Audible signal (bell)."
110.It "bs bool (o) Terminal can backspace with"
111.Sy \&^H .
112.It "bt str (P) Back tab."
113.It "bw bool " Ta Sy \&le
114(backspace) wraps from column 0 to last column.
115.It "CC str Terminal settable command character in prototype."
116.It "cd str (P*) Clear to end of display."
117.It "ce str (P) Clear to end of line."
118.It "ch str (NP) Set cursor column (horizontal position)."
119.It "cl str (P*) Clear screen and home cursor."
120.It "CM str (NP) Memory-relative cursor addressing."
121.It "cm str (NP) Screen-relative cursor motion."
122.It "co num Number of columns in a line (See"
123.Sx BUGS
124section below).
125.It "cr str (P) Carriage return."
126.It "cs str (NP) Change scrolling region (VT100)."
127.It "ct str (P) Clear all tab stops."
128.It "cv str (NP) Set cursor row (vertical position)."
129.It "da bool Display may be retained above the screen."
130.It "dB num (o) Milliseconds of"
131.Sy \&bs
132delay needed (default 0).
133.It "db bool Display may be retained below the screen."
134.It "DC str (NP*) Delete"
135.Em n
136characters.
137.It "dC num (o) Milliseconds of"
138.Sy \&cr
139delay needed (default 0).
140.It "dc str (P*) Delete character."
141.It "dF num (o) Milliseconds of"
142.Sy \&ff
143delay needed (default 0).
144.It "DL str (NP*) Delete"
145.Ar n
146lines.
147.It "dl str (P*) Delete line."
148.It "dm str Enter delete mode."
149.It "dN num (o) Milliseconds of
150.Sy \&nl
151delay needed (default 0).
152.It "DO str (NP*) Move cursor down:
153.Ar n
154lines.
155.It "do str Down one line."
156.It "ds str Disable status line."
157.It "dT num (o) Milliseconds of horizontal tab delay needed (default 0)."
158.It "dV num (o) Milliseconds of vertical tab delay needed (default 0)."
159.It "ec str (NP) Erase"
160.Ar n
161characters.
162.It "ed str End delete mode."
163.It "ei str End insert mode."
164.It "eo bool Can erase overstrikes with a blank."
165.It "EP bool (o) Even parity."
166.It "es bool Escape can be used on the status line."
167.It "ff str (P*) Hardcopy terminal page eject."
168.It "fs str Return from status line."
169.It "gn bool Generic line type, for example dialup, switch)."
170.It "hc bool Hardcopy terminal."
171.It "HD bool (o) Half-duplex."
172.It "hd str Half-line down (forward 1/2 linefeed)."
173.It "ho str (P) Home cursor."
174.It "hs bool Has extra"
175.Dq status line .
176.It "hu str Half-line up (reverse 1/2 linefeed)."
177.It "hz bool Cannot print ``~'' (Hazeltine)."
178.It "i1-i3 str Terminal initialization strings"
179.Pf ( Xr terminfo
180only)
181.It "IC str (NP*) Insert"
182.Ar n
183blank characters.
184.It "ic str (P*) Insert character."
185.It "if str Name of file containing initialization string."
186.It "im str Enter insert mode."
187.It "in bool Insert mode distinguishes nulls."
188.It "iP str Pathname of program for initialization"
189.Pf ( Xr terminfo
190only).
191.It "ip str (P*) Insert pad after character inserted."
192.It "is str Terminal initialization string"
193.Pf ( Nm termcap
194only).
195.It "it num Tabs initially every"
196.Ar n
197positions.
198.It "K1 str Sent by keypad upper left."
199.It "K2 str Sent by keypad upper right."
200.It "K3 str Sent by keypad center."
201.It "K4 str Sent by keypad lower left."
202.It "K5 str Sent by keypad lower right."
203.It "k0-k9 str Sent by function keys 0-9."
204.It "kA str Sent by insert-line key."
205.It "ka str Sent by clear-all-tabs key."
206.It "kb str Sent by backspace key."
207.It "kC str Sent by clear-screen or erase key."
208.It "kD str Sent by delete-character key."
209.It "kd str Sent by down-arrow key."
210.It "kE str Sent by clear-to-end-of-line key."
211.It "ke str Out of"
212.Dq keypad transmit
213mode.
214.It "kF str Sent by scroll-forward/down key."
215.It "kH str Sent by home-down key."
216.It "kh str Sent by home key."
217.It "kI str Sent by insert-character or enter-insert-mode key."
218.It "kL str Sent by delete-line key."
219.It "kl str Sent by left-arrow key."
220.It "kM str Sent by insert key while in insert mode."
221.It "km bool Has a"
222.Dq meta
223key (shift, sets parity bit).
224.It "kN str Sent by next-page key."
225.It "kn num (o) Number of function"
226.Pq Sy \&k\&0 Ns \- Sy \&k\&9
227keys (default 0).
228.It "ko str (o) Termcap entries for other non-function keys."
229.It "kP str Sent by previous-page key."
230.It "kR str Sent by scroll-backward/up key."
231.It "kr str Sent by right-arrow key."
232.It "kS str Sent by clear-to-end-of-screen key."
233.It "ks str Put terminal in"
234.Dq keypad transmit
235mode.
236.It "kT str Sent by set-tab key."
237.It "kt str Sent by clear-tab key."
238.It "ku str Sent by up-arrow key."
239.It "l0-l9 str Labels on function keys if not"
240.Dq \&f Ns Em n .
241.It "LC bool (o) Lower-case only."
242.It "LE str (NP) Move cursor left"
243.Ar n
244positions.
245.It "le str (P) Move cursor left one position."
246.It "li num Number of lines on screen or page (See"
247.Sx BUGS
248section below)
249.It "ll str Last line, first column
250.It "lm num Lines of memory if >" Sy \&li
251(0 means varies).
252.It "ma str (o) Arrow key map (used by"
253.Xr \&vi
254version 2 only).
255.It "mb str Turn on blinking attribute."
256.It "md str Turn on bold (extra bright) attribute."
257.It "me str Turn off all attributes."
258.It "mh str Turn on half-bright attribute."
259.It "mi bool Safe to move while in insert mode."
260.It "mk str Turn on blank attribute (characters invisible)."
261.It "ml str (o) Memory lock on above cursor."
262.It "mm str Turn on"
263.Dq meta mode
264(8th bit).
265.It "mo str Turn off"
266.Dq meta mode .
267.It "mp str Turn on protected attribute."
268.It "mr str Turn on reverse-video attibute."
269.It "ms bool Safe to move in standout modes."
270.It "mu str (o) Memory unlock (turn off memory lock)."
271.It "nc bool (o) No correctly-working"
272.Sy \&cr
273(Datamedia 2500, Hazeltine 2000).
274.It "nd str Non-destructive space (cursor right)."
275.It "NL bool (o)" Ta Sy \&\en No "is newline, not line feed."
276.It "nl str (o) Newline character if not" Sy \en .
277.It "ns bool (o) Terminal is a" Tn CRT No "but doesn't scroll."
278.It "nw str (P) Newline (behaves like"
279.Sy \&cr
280followed by
281.Sy \&do ).
282.It "OP bool (o) Odd parity."
283.It "os bool Terminal overstrikes."
284.It "pb num Lowest baud where delays are required."
285.It "pc str Pad character (default" Tn NUL ).
286.It "pf str Turn off the printer."
287.It "pk str Program function key"
288.Em n
289to type string
290.Em s
291.Pf ( Xr terminfo
292only).
293.It "pl str Program function key"
294.Em n
295to execute string
296.Em s
297.Pf ( Xr terminfo
298only).
299.It "pO str (N) Turn on the printer for"
300.Em n
301bytes.
302.It "po str Turn on the printer."
303.It "ps str Print contents of the screen."
304.It "pt bool (o) Has hardware tabs (may need to be set with"
305.Sy \&is ).
306.It "px str Program function key"
307.Em n
308to transmit string
309.Em s
310.Pf ( Xr terminfo
311only).
312.It "r1-r3 str Reset terminal completely to sane modes"
313.Pf ( Xr terminfo
314only).
315.It "rc str (P) Restore cursor to position of last"
316.Sy \&sc .
317.It "rf str Name of file containing reset codes."
318.It "RI str (NP) Move cursor right"
319.Em n
320positions.
321.It "rp str (NP*) Repeat character"
322.Em c n
323times.
324.It "rs str Reset terminal completely to sane modes"
325.Pf ( Nm termcap
326only).
327.It "sa str (NP) Define the video attributes."
328.It "sc str (P) Save cursor position."
329.It "se str End standout mode."
330.It "SF str (NP*) Scroll forward"
331.Em n
332lines.
333.It "sf str (P) Scroll text up."
334.It "sg num Number of garbage chars left by"
335.Sy \&so
336or
337.Sy \&se
338(default 0).
339.It "so str Begin standout mode."
340.It "SR str (NP*) Scroll backward"
341.Em n
342lines.
343.It "sr str (P) Scroll text down."
344.It "st str Set a tab in all rows, current column."
345.It "ta str (P) Tab to next 8-position hardware tab stop."
346.It "tc str Entry of similar terminal \- must be last."
347.It "te str String to end programs that use"
348.Nm termcap .
349.It "ti str String to begin programs that use"
350.Nm termcap .
351.It "ts str (N) Go to status line, column"
352.Em n .
353.It "UC bool (o) Upper-case only."
354.It "uc str Underscore one character and move past it."
355.It "ue str End underscore mode."
356.It "ug num Number of garbage chars left by"
357.Sy \&us
358or
359.Sy \&ue
360(default 0).
361.It "ul bool Underline character overstrikes."
362.It "UP str (NP*) Move cursor up"
363.Em n
364lines.
365.It "up str Upline (cursor up)."
366.It "us str Start underscore mode."
367.It "vb str Visible bell (must not move cursor)."
368.It "ve str Make cursor appear normal (undo"
369.Sy \&vs Ns / Sy \&vi ) .
370.It "vi str Make cursor invisible."
371.It "vs str Make cursor very visible."
372.It "vt num Virtual terminal number (not supported on all systems)."
373.It "wi str (N) Set current window."
374.It "ws num Number of columns in status line."
375.It "xb bool Beehive"
376.Pf ( "f1=" Dv ESC ,
377.Pf "f2=" Sy \&^C ) .
378.It "xn bool Newline ignored after 80 cols (Concept)."
379.It "xo bool Terminal uses xoff/xon"
380.Pq Dv DC3 Ns / Ns Dv DC1
381handshaking.
382.It "xr bool (o) Return acts like"
383.Sy "ce cr nl"
384(Delta Data).
385.It "xs bool Standout not erased by overwriting (Hewlett-Packard)."
386.It "xt bool Tabs ruin, magic"
387.SY \&so
388char (Teleray 1061).
389.It "xx bool (o) Tektronix 4025 insert-line."
390.El
391.Ss A Sample Entry
c4737001
KM
392The following entry, which describes the Concept\-100, is among the more
393complex entries in the
e46e0a76 394.Nm termcap
c4737001 395file as of this writing.
e46e0a76
CL
396.Pp
397.Bd -literal
ef978bfe
JB
398ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e
399 :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e
400 :co#80:.cr=9^M:db:dc=16\eE^A:dl=3*\eE^B:do=^J:ei=\eE\e200:eo:im=\eE^P:in:\e
401 :ip=16*:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200\eEo\e47\eE:k1=\eE5:\e
402 :k2=\eE6:k3=\eE7:kb=^h:kd=\eE<:ke=\eEx:kh=\eE?:kl=\eE>:kr=\eE=:ks=\eEX:\e
403 :ku=\eE;:le=^H:li#24:mb=\eEC:me=\eEN\e200:mh=\eEE:mi:mk=\eEH:mp=\eEI:\e
404 :mr=\eED:nd=\eE=:pb#9600:rp=0.2*\eEr%.%+ :se=\eEd\eEe:sf=^J:so=\eEE\eED:\e
405 :.ta=8\et:te=\eEv \e200\e200\e200\e200\e200\e200\eEp\er\en:\e
406 :ti=\eEU\eEv 8p\eEp\er:ue=\eEg:ul:up=\eE;:us=\eEG:\e
407 :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e
408 :ve=\eEw:vs=\eEW:vt#8:xn:\e
409 :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
e46e0a76
CL
410.Ed
411.Pp
c4737001 412Entries may continue onto multiple lines by giving a \e as the last
ef978bfe 413character of a line, and empty fields
c4737001
KM
414may be included for readability (here between the last field on a line
415and the first field on the next).
e46e0a76
CL
416Comments may be included on lines beginning with
417.Dq # .
418.Ss Types of Capabilities
ef978bfe 419Capabilities in
e46e0a76 420.Nm termcap
ef978bfe
JB
421are of three types: Boolean capabilities,
422which indicate particular features that the terminal has;
423numeric capabilities,
424giving the size of the display or the size of other attributes;
425and string capabilities,
426which give character sequences that can be used to perform particular
427terminal operations.
428All capabilities have two-letter codes.
429For instance, the fact that
430the Concept has
e46e0a76
CL
431.Em automatic margins
432(an automatic return and linefeed
ef978bfe 433when the end of a line is reached) is indicated by the Boolean capability
e46e0a76 434.Sy \&am .
ef978bfe 435Hence the description of the Concept includes
e46e0a76
CL
436.Sy \&am .
437.Pp
ef978bfe
JB
438Numeric capabilities are followed by the character `#' then the value.
439In the example above
e46e0a76 440.Sy \&co ,
ef978bfe 441which indicates the number of columns the display has,
c4737001 442gives the value `80' for the Concept.
e46e0a76 443.Pp
ef978bfe 444Finally, string-valued capabilities, such as
e46e0a76 445.Sy \&ce
ef978bfe
JB
446(clear-to-end-of-line
447sequence) are given by the two-letter code, an `=', then a string
448ending at the next following `:'.
449A delay in milliseconds may appear after
450the `=' in such a capability,
451which causes padding characters to be supplied by
e46e0a76 452.Xr tputs
ef978bfe
JB
453after the remainder of the string is sent to provide this delay.
454The delay can be either a number,
e46e0a76 455such as `20', or a number followed by
ef978bfe 456an `*',
e46e0a76 457such as `3*'.
ef978bfe 458An `*' indicates that the padding required is proportional
c4737001 459to the number of lines affected by the operation, and the amount given is
ef978bfe
JB
460the per-affected-line padding required.
461(In the case of insert-character,
462the factor is still the number of
e46e0a76 463.Em lines
ef978bfe
JB
464affected;
465this is always 1 unless the terminal has
e46e0a76 466.Sy \&in
ef978bfe
JB
467and the software uses it.)
468When an `*' is specified, it is sometimes useful to give a delay of the form
469`3.5' to specify a delay per line to tenths of milliseconds.
470(Only one decimal place is allowed.)
e46e0a76 471.Pp
ef978bfe
JB
472A number of escape sequences are provided in the string-valued capabilities
473for easy encoding of control characters there.
e46e0a76
CL
474.Sy \&\eE
475maps to an
476.Dv ESC
ef978bfe 477character,
e46e0a76 478.Sy \&^X
ef978bfe
JB
479maps to a control-X for any appropriate X,
480and the sequences
e46e0a76
CL
481.Sy \&\en
482.Sy \&\er
483.Sy \&\et
484.Sy \&\eb
485.Sy \&\ef
ef978bfe
JB
486map to linefeed, return, tab, backspace, and formfeed, respectively.
487Finally, characters may be given as three octal digits after a
e46e0a76 488.Sy \&\e ,
ef978bfe 489and the characters
e46e0a76 490.Sy \&^
ef978bfe 491and
e46e0a76 492.Sy \&\e
ef978bfe 493may be given as
e46e0a76 494.Sy \&\e^
ef978bfe 495and
e46e0a76 496.Sy \&\e\e .
ef978bfe 497If it is necessary to place a
e46e0a76 498.Sy \&:
ef978bfe
JB
499in a capability it must be escaped in
500octal as
e46e0a76
CL
501.Sy \&\e072 .
502If it is necessary to place a
503.Dv NUL
ef978bfe
JB
504character in a string capability it
505must be encoded as
e46e0a76 506.Sy \&\e200 .
ef978bfe 507(The routines that deal with
e46e0a76 508.Nm termcap
ef978bfe
JB
509use C strings and strip the high bits of the output very late, so that
510a
e46e0a76 511.Sy \&\e200
ef978bfe 512comes out as a
e46e0a76 513.Sy \&\e000
ef978bfe 514would.)
e46e0a76 515.Pp
ef978bfe
JB
516Sometimes individual capabilities must be commented out.
517To do this, put a period before the capability name.
518For example, see the first
e46e0a76 519.Sy \&cr
ef978bfe 520and
e46e0a76 521.Sy \&ta
ef978bfe 522in the example above.
e46e0a76 523.Ss Preparing Descriptions
c4737001
KM
524The most effective way to prepare a terminal description is by imitating
525the description of a similar terminal in
e46e0a76 526.Nm termcap
c4737001
KM
527and to build up a description gradually, using partial descriptions
528with
e46e0a76 529.Xr \&vi
c4737001
KM
530to check that they are correct.
531Be aware that a very unusual terminal may expose deficiencies in
532the ability of the
e46e0a76 533.Nm termcap
c4737001
KM
534file to describe it
535or bugs in
e46e0a76 536.Xr \&vi .
1e1561a8
JK
537To easily test a new terminal description you are working on
538you can put it in your home directory in a file called
e46e0a76 539.Pa .termcap
1e1561a8 540and programs will look there before looking in
e46e0a76 541.Pa /usr/share/misc/termcap .
1e1561a8 542You can also set the environment variable
e46e0a76 543.Ev TERMPATH
1e1561a8
JK
544to a list of absolute file pathnames (separated by spaces or colons),
545one of which contains the description you are working on,
546and programs will search them in the order listed, and nowhere else.
547See
e46e0a76 548.Xr termcap 3 .
1e1561a8 549The
e46e0a76 550.Ev TERMCAP
1e1561a8 551environment variable is usually set to the
e46e0a76 552.Nm termcap
ef978bfe 553entry itself
1e1561a8 554to avoid reading files when starting up a program.
e46e0a76 555.Pp
ef978bfe
JB
556To get the padding for insert-line right
557(if the terminal manufacturer did not document it),
558a severe test is to use
e46e0a76 559.Xr \&vi
ef978bfe 560to edit
e46e0a76 561.Pa /etc/passwd
ef978bfe
JB
562at 9600 baud, delete roughly 16 lines from the middle of the screen,
563then hit the `u' key several times quickly.
564If the display messes up, more padding is usually needed.
565A similar test can be used for insert-character.
e46e0a76 566.Ss Basic Capabilities
ef978bfe 567The number of columns on each line of the display is given by the
e46e0a76 568.Sy \&co
ef978bfe 569numeric capability.
e46e0a76
CL
570If the display is a
571.Tn CRT ,
572then the
ef978bfe 573number of lines on the screen is given by the
e46e0a76 574.Sy \&li
ef978bfe
JB
575capability.
576If the display wraps around to the beginning of the next line when
577the cursor reaches the right margin, then it should have the
e46e0a76 578.Sy \&am
ef978bfe
JB
579capability.
580If the terminal can clear its screen,
581the code to do this is given by the
e46e0a76 582.Sy \&cl
ef978bfe
JB
583string capability.
584If the terminal overstrikes
585(rather than clearing the position when a character is overwritten),
586it should have the
e46e0a76 587.Sy \&os
ef978bfe
JB
588capability.
589If the terminal is a printing terminal,
590with no soft copy unit,
591give it both
e46e0a76 592.Sy \&hc
ef978bfe 593and
e46e0a76
CL
594.Sy \&os .
595.Pf ( Sy \&os
ef978bfe
JB
596applies to storage scope terminals,
597such as the Tektronix 4010 series,
598as well as to hard copy and
e46e0a76 599.Tn APL
ef978bfe
JB
600terminals.)
601If there is a code to move the cursor to the left edge of the current row,
602give this as
e46e0a76 603.Sy \&cr .
ef978bfe 604(Normally this will be carriage-return,
e46e0a76 605.Sy \&^M . )
ef978bfe 606If there is a code to produce an audible signal (bell, beep,
e46e0a76 607etc. ) ,
ef978bfe 608give this as
e46e0a76
CL
609.Sy \&bl .
610.Pp
ef978bfe
JB
611If there is a code (such as backspace)
612to move the cursor one position to the left,
613that capability should be given as
e46e0a76 614.Sy \&le .
ef978bfe
JB
615Similarly,
616codes to move to the right, up, and down
617should be given as
e46e0a76
CL
618.Sy \&nd ,
619.Sy \&up ,
ef978bfe 620and
e46e0a76 621.Sy \&do ,
ef978bfe
JB
622respectively.
623These
e46e0a76 624.Em local cursor motions
ef978bfe
JB
625should not alter the text they pass over;
626for example, you would not normally use
e46e0a76 627.Dq nd=\ \&
ef978bfe 628unless the terminal has the
e46e0a76 629.Sy \&os
ef978bfe
JB
630capability,
631because the space would erase the character moved over.
e46e0a76 632.Pp
c4737001
KM
633A very important point here is that the local cursor motions encoded
634in
e46e0a76 635.Nm termcap
ef978bfe 636have undefined behavior at the left and top edges of a
e46e0a76 637.Tn CRT
ef978bfe
JB
638display.
639Programs should never attempt to backspace around the left edge,
640unless
e46e0a76 641.Sy \&bw
ef978bfe
JB
642is given, and never attempt to go up off the top
643using local cursor motions.
e46e0a76 644.Pp
ef978bfe
JB
645In order to scroll text up,
646a program goes to the bottom left corner of the screen and sends the
e46e0a76 647.Sy \&sf
ef978bfe
JB
648(index) string.
649To scroll text down,
650a program goes to the top left corner of the screen and sends the
e46e0a76 651.Sy \&sr
ef978bfe
JB
652(reverse index) string.
653The strings
e46e0a76 654.Sy \&sf
ef978bfe 655and
e46e0a76 656.Sy \&sr
ef978bfe
JB
657have undefined behavior
658when not on their respective corners of the screen.
659Parameterized versions of the scrolling sequences are
e46e0a76 660.Sy \&SF
ef978bfe 661and
e46e0a76 662.Sy \&SR ,
ef978bfe 663which have the same semantics as
e46e0a76 664.Sy \&sf
ef978bfe 665and
e46e0a76 666.Sy \&sr
ef978bfe
JB
667except that they take one parameter
668and scroll that many lines.
669They also have undefined behavior
670except at the appropriate corner of the screen.
e46e0a76 671.Pp
ef978bfe 672The
e46e0a76 673.Sy \&am
ef978bfe
JB
674capability tells whether the cursor sticks at the right
675edge of the screen when text is output there,
676but this does not necessarily apply to
e46e0a76 677.Sy \&nd
ef978bfe
JB
678from the last column.
679Leftward local motion is defined from the left edge only when
e46e0a76 680.Sy \&bw
ef978bfe 681is given; then an
e46e0a76 682.Sy \&le
ef978bfe
JB
683from the left edge will move to the right edge of the previous row.
684This is useful for drawing a box around the edge of the screen,
685for example.
686If the terminal has switch-selectable automatic margins,
c4737001 687the
e46e0a76 688.Nm termcap
ef978bfe 689description usually assumes that this feature is on,
e46e0a76
CL
690.Em i.e . ,
691.Sy \&am .
ef978bfe
JB
692If the terminal has a command
693that moves to the first column of the next line,
694that command can be given as
e46e0a76 695.Sy \&nw
ef978bfe
JB
696(newline).
697It is permissible for this to clear the remainder of the current line,
e46e0a76
CL
698so if the terminal has no correctly-working
699.Tn \&CR
700and
701.Tn \&LF
ef978bfe 702it may still be possible to craft a working
e46e0a76 703.Sy \&nw
ef978bfe 704out of one or both of them.
e46e0a76
CL
705.Pp
706These capabilities suffice to describe hardcopy and
707.Dq glass-tty
708terminals.
ef978bfe 709Thus the Teletype model 33 is described as
e46e0a76
CL
710.Bd -literal -offset indent
711T3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e
712 :bl=^G:co#72:cr=^M:do=^J:hc:os:
713.Ed
714.Pp
715and the Lear Siegler
716.Tn ADM Ns \-3
717is described as
718.Bd -literal -offset indent
719l3\||\|adm3\||\|3\||\|LSI \s-1ADM\s0-3:\e
720:am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
721.Ed
722.Ss Parameterized Strings
ef978bfe
JB
723Cursor addressing and other strings requiring parameters
724are described by a
e46e0a76
CL
725parameterized string capability, with
726.Xr printf 3 Ns \-like
ef978bfe 727escapes
e46e0a76 728.Sy \&%x
ef978bfe 729in it,
c4737001 730while other characters are passed through unchanged.
ef978bfe 731For example, to address the cursor the
e46e0a76 732.Sy \&cm
ef978bfe
JB
733capability is given, using two parameters: the row and column to move to.
734(Rows and columns are numbered from zero and refer to the physical screen
735visible to the user, not to any unseen memory.
736If the terminal has memory-relative cursor addressing,
737that can be indicated by an analogous
e46e0a76 738.Sy \&CM
ef978bfe 739capability.)
e46e0a76 740.Pp
ef978bfe 741The
e46e0a76 742.Sy \&%
ef978bfe 743encodings have the following meanings:
e46e0a76
CL
744.Bl -column xxxxx
745.It "%% output `%'"
746.It "%d output value as in"
747.Xr printf
748%d
749.It "%2 output value as in"
750.Xr printf
751%2d
752.It "%3 output value as in"
753.Xr printf
754%3d
755.It "%. output value as in"
756.Xr printf
757%c
758.It "%+" Ns Em x Ta No add
759.Em x
760to value, then do %.
761.It "%>" Ns Em \&xy Ta No if
762value >
763.Em x
764then add
765.Em y ,
766no output
767.It "%r reverse order of two parameters, no output"
768.It "%i increment by one, no output"
769.It "%n exclusive-or all parameters with 0140 (Datamedia 2500)"
770.It "%B" Ta Tn BCD No "(16*(value/10)) + (value%10), no output"
771.It "%D Reverse coding (value \- 2*(value%16)), no output (Delta Data)."
772.El
773.Pp
ef978bfe 774Consider the Hewlett-Packard 2645, which, to get to row 3 and column 12, needs
e46e0a76
CL
775to be sent
776.Dq \eE&a12c03Y
777padded for 6 milliseconds.
ef978bfe
JB
778Note that the order
779of the row and column coordinates is reversed here
780and that the row and column
781are sent as two-digit integers.
782Thus its
e46e0a76
CL
783.Sy \&cm
784capability is
785.Dq Li cm=6\eE&%r%2c%2Y .
786.Pp
dc9699ea 787The Datamedia 2500 needs the current row and column sent
e46e0a76
CL
788encoded in binary using
789.Dq \&%. .
790Terminals that use
791.Dq \&%.
792need to be able to
ef978bfe 793backspace the cursor
e46e0a76 794.Po Sy \&le Pc
ef978bfe 795and to move the cursor up one line on the screen
e46e0a76 796.Po Sy \&up Pc .
ef978bfe 797This is necessary because it is not always safe to transmit
e46e0a76
CL
798.Sy \&\en ,
799.Sy \&^D ,
ef978bfe 800and
e46e0a76 801.Sy \&\er ,
ef978bfe
JB
802as the system may change or discard them.
803(Programs using
e46e0a76 804.Nm termcap
ef978bfe 805must set terminal modes so that tabs are not expanded, so
e46e0a76 806.Sy \&\et
ef978bfe
JB
807is safe to send.
808This turns out to be essential for the Ann Arbor 4080.)
e46e0a76
CL
809.Pp
810A final example is the Lear Siegler
811.Tn ADM Ns \-3a,
ef978bfe 812which offsets row and column
e46e0a76
CL
813by a blank character, thus
814.Dq Li cm=\eE=%+ %+\ \& .
815.Pp
ef978bfe
JB
816Row or column absolute cursor addressing
817can be given as single parameter capabilities
e46e0a76 818.Sy \&ch
ef978bfe 819(horizontal position absolute) and
e46e0a76 820.Sy \&cv
ef978bfe
JB
821(vertical position absolute).
822Sometimes these are shorter than the more general two-parameter sequence
823(as with the Hewlett-Packard 2645) and can be used in preference to
e46e0a76 824.Sy \&cm .
ef978bfe 825If there are parameterized local motions
e46e0a76 826.Pf ( Em e.g . ,
ef978bfe 827move
e46e0a76 828.Ar n
ef978bfe
JB
829positions to the right)
830these can be given as
e46e0a76
CL
831.Sy \&DO ,
832.Sy \&LE ,
833.Sy \&RI ,
ef978bfe 834and
e46e0a76 835.Sy \&UP
ef978bfe
JB
836with a single parameter indicating how many positions to move.
837These are primarily useful if the terminal does not have
e46e0a76 838.Sy \&cm ,
ef978bfe 839such as the Tektronix 4025.
e46e0a76
CL
840.Ss Cursor Motions
841.Pp
ef978bfe
JB
842If the terminal has a fast way to home the cursor
843(to the very upper left corner of the screen), this can be given as
e46e0a76 844.Sy \&ho .
ef978bfe
JB
845Similarly, a fast way of getting to the lower left-hand corner
846can be given as
e46e0a76 847.Sy \&ll ;
ef978bfe 848this may involve going up with
e46e0a76 849.Sy \&up
c4737001 850from the home position,
ef978bfe 851but a program should never do this itself (unless
e46e0a76 852.Sy \&ll
ef978bfe
JB
853does), because it can
854make no assumption about the effect of moving up from the home position.
855Note that the home position is the same as
856cursor address (0,0): to the top left corner of the screen, not of memory.
e46e0a76
CL
857(Therefore, the
858.Dq \eEH
859sequence on Hewlett-Packard terminals
ef978bfe 860cannot be used for
e46e0a76
CL
861.Sy \&ho . )
862.Ss Area Clears
c4737001 863If the terminal can clear from the current position to the end of the
ef978bfe 864line, leaving the cursor where it is, this should be given as
e46e0a76 865.Sy \&ce .
c4737001 866If the terminal can clear from the current position to the end of the
ef978bfe 867display, this should be given as
e46e0a76
CL
868.Sy \&cd .
869.Sy \&cd
ef978bfe
JB
870must only be invoked from the first column of a line.
871(Therefore,
872it can be simulated by a request to delete a large number of lines,
873if a true
e46e0a76 874.Sy \&cd
ef978bfe 875is not available.)
e46e0a76 876.Ss Insert/Delete Line
ef978bfe
JB
877If the terminal can open a new blank line
878before the line containing the cursor,
879this should be given as
e46e0a76 880.Sy \&al ;
ef978bfe
JB
881this must be invoked only from the first
882position of a line.
883The cursor must then appear at the left of the newly blank line.
884If the terminal can delete the line that the cursor is on, this
885should be given as
e46e0a76 886.Sy \&dl ;
ef978bfe 887this must only be used from the first position on
c4737001 888the line to be deleted.
ef978bfe 889Versions of
e46e0a76 890.Sy \&al
ef978bfe 891and
e46e0a76 892.Sy \&dl
ef978bfe
JB
893which take a single parameter
894and insert or delete that many lines
895can be given as
e46e0a76 896.Sy \&AL
ef978bfe 897and
e46e0a76 898.Sy \&DL .
ef978bfe
JB
899If the terminal has a settable scrolling region
900(like the VT100),
901the command to set this can be described with the
e46e0a76 902.Sy \&cs
ef978bfe
JB
903capability,
904which takes two parameters: the top and bottom lines of the scrolling region.
905The cursor position is, alas, undefined after using this command.
906It is possible to get the effect of insert or delete line
907using this command \(em the
e46e0a76 908.Sy \&sc
ef978bfe 909and
e46e0a76 910.Sy \&rc
ef978bfe
JB
911(save and restore cursor) commands are also useful.
912Inserting lines at the top or bottom of the screen can also be done using
e46e0a76 913.Sy \&sr
ef978bfe 914or
e46e0a76 915.Sy \&sf
ef978bfe
JB
916on many terminals without a true insert/delete line,
917and is often faster even on terminals with those features.
e46e0a76 918.Pp
ef978bfe
JB
919If the terminal has the ability to define a window as part of memory
920which all commands affect, it should be given as the parameterized string
e46e0a76 921.Sy \&wi .
ef978bfe
JB
922The four parameters are the starting and ending lines in memory
923and the starting and ending columns in memory, in that order.
924(This
e46e0a76 925.Xr terminfo
ef978bfe
JB
926capability is described for completeness.
927It is unlikely that any
e46e0a76 928.Nm termcap Ns \- using
ef978bfe 929program will support it.)
e46e0a76 930.Pp
ef978bfe 931If the terminal can retain display memory above the screen, then the
e46e0a76 932.Sy \&da
ef978bfe
JB
933capability should be given;
934if display memory can be retained
935below, then
e46e0a76 936.Sy \&db
ef978bfe
JB
937should be given.
938These indicate
939that deleting a line or scrolling may bring non-blank lines up from below
940or that scrolling back with
e46e0a76 941.Sy \&sr
ef978bfe 942may bring down non-blank lines.
e46e0a76 943.Ss Insert/Delete Character
c4737001 944There are two basic kinds of intelligent terminals with respect to
ef978bfe 945insert/delete character that can be described using
e46e0a76 946.Nm termcap .
c4737001
KM
947The most common insert/delete character operations affect only the characters
948on the current line and shift characters off the end of the line rigidly.
ef978bfe 949Other terminals, such as the Concept\-100 and the Perkin Elmer Owl, make
c4737001
KM
950a distinction between typed and untyped blanks on the screen, shifting
951upon an insert or delete only to an untyped blank on the screen which is
ef978bfe
JB
952either eliminated or expanded to two untyped blanks.
953You can determine
954the kind of terminal you have by clearing the screen then typing
955text separated by cursor motions.
e46e0a76
CL
956Type
957.Dq Li abc\ \ \ \ def
958using local
959cursor motions (not spaces) between the
960.Dq abc
961and the
962.Dq def .
963Then position the cursor before the
964.Dq abc
965and put the terminal in insert
ef978bfe
JB
966mode.
967If typing characters causes the rest of the line to shift
c4737001 968rigidly and characters to fall off the end, then your terminal does
ef978bfe 969not distinguish between blanks and untyped positions.
e46e0a76
CL
970If the
971.Dq abc
972shifts over to the
973.Dq def
974which then move together around the end of the
ef978bfe 975current line and onto the next as you insert, then you have the second type of
e46e0a76
CL
976terminal and should give the capability
977.Sy \&in ,
978which stands for
979.Dq insert null .
ef978bfe
JB
980While these are two logically separate attributes
981(one line
e46e0a76 982.Em \&vs .
ef978bfe
JB
983multi-line insert mode,
984and special treatment of untyped spaces),
985we have seen no terminals whose insert
986mode cannot be described with the single attribute.
e46e0a76
CL
987.Pp
988.Nm Termcap
ef978bfe
JB
989can describe both terminals that have an insert mode and terminals
990that send a simple sequence to open a blank position on the current line.
991Give as
e46e0a76 992.Sy \&im
ef978bfe
JB
993the sequence to get into insert mode.
994Give as
e46e0a76 995.Sy \&ei
ef978bfe
JB
996the sequence to leave insert mode.
997Now give as
e46e0a76 998.Sy \&ic
ef978bfe
JB
999any sequence that needs to be sent just before
1000each character to be inserted.
1001Most terminals with a true insert mode
1002will not give
e46e0a76 1003.Sy \&ic ;
ef978bfe
JB
1004terminals that use a sequence to open a screen
1005position should give it here.
1006(If your terminal has both,
1007insert mode is usually preferable to
e46e0a76 1008.Sy \&ic .
ef978bfe
JB
1009Do not give both unless the terminal actually requires both to be used
1010in combination.)
1011If post-insert padding is needed, give this as a number of milliseconds
1012in
e46e0a76 1013.Sy \&ip
ef978bfe
JB
1014(a string option).
1015Any other sequence that may need to be
1016sent after insertion of a single character can also be given in
e46e0a76 1017.Sy \&ip .
ef978bfe
JB
1018If your terminal needs to be placed into an `insert mode'
1019and needs a special code preceding each inserted character,
1020then both
e46e0a76 1021.Sy \&im Ns / Sy \&ei
ef978bfe 1022and
e46e0a76 1023.Sy \&ic
ef978bfe
JB
1024can be given, and both will be used.
1025The
e46e0a76 1026.Sy \&IC
ef978bfe 1027capability, with one parameter
e46e0a76 1028.Em n ,
ef978bfe 1029will repeat the effects of
e46e0a76
CL
1030.Sy \&ic
1031.Em n
ef978bfe 1032times.
e46e0a76 1033.Pp
c4737001 1034It is occasionally necessary to move around while in insert mode
ef978bfe 1035to delete characters on the same line
e46e0a76 1036.Pf ( Em e.g . ,
ef978bfe
JB
1037if there is a tab after
1038the insertion position).
1039If your terminal allows motion while in
1040insert mode, you can give the capability
e46e0a76 1041.Sy \&mi
ef978bfe
JB
1042to speed up inserting
1043in this case.
1044Omitting
e46e0a76 1045.Sy \&mi
ef978bfe
JB
1046will affect only speed.
1047Some terminals
1048(notably Datamedia's) must not have
e46e0a76 1049.Sy \&mi
ef978bfe 1050because of the way their
c4737001 1051insert mode works.
e46e0a76 1052.Pp
ef978bfe 1053Finally, you can specify
e46e0a76 1054.Sy \&dc
ef978bfe 1055to delete a single character,
e46e0a76 1056.Sy \&DC
ef978bfe 1057with one parameter
e46e0a76 1058.Em n
ef978bfe 1059to delete
e46e0a76 1060.Em n
ef978bfe
JB
1061characters,
1062and delete mode by giving
e46e0a76 1063.Sy \&dm
ef978bfe 1064and
e46e0a76 1065.Sy \&ed
ef978bfe
JB
1066to enter and exit delete mode
1067(which is any mode the terminal needs to be placed in for
e46e0a76 1068.Sy \&dc
ef978bfe 1069to work).
e46e0a76 1070.Ss Highlighting, Underlining, and Visible Bells
ef978bfe
JB
1071If your terminal has one or more kinds of display attributes,
1072these can be represented in a number of different ways.
1073You should choose one display form as
e46e0a76 1074.Em standout mode ,
ef978bfe
JB
1075representing a good high-contrast, easy-on-the-eyes format
1076for highlighting error messages and other attention getters.
1077(If you have a choice, reverse video plus half-bright is good,
1078or reverse video alone.)
1079The sequences to enter and exit standout mode
1080are given as
e46e0a76 1081.Sy \&so
ef978bfe 1082and
e46e0a76 1083.Sy \&se ,
ef978bfe 1084respectively.
c4737001 1085If the code to change into or out of standout
ef978bfe 1086mode leaves one or even two blank spaces or garbage characters on the screen,
e46e0a76
CL
1087as the
1088.Tn TVI
1089912 and Teleray 1061 do,
ef978bfe 1090then
e46e0a76 1091.Sy \&sg
ef978bfe 1092should be given to tell how many characters are left.
e46e0a76 1093.Pp
ef978bfe 1094Codes to begin underlining and end underlining can be given as
e46e0a76 1095.Sy \&us
ef978bfe 1096and
e46e0a76 1097.Sy \&ue ,
ef978bfe
JB
1098respectively.
1099Underline mode change garbage is specified by
e46e0a76 1100.Sy \&ug ,
ef978bfe 1101similar to
e46e0a76 1102.Sy \&sg .
c4737001 1103If the terminal has a code to underline the current character and move
e46e0a76 1104the cursor one position to the right,
c4737001 1105such as the Microterm Mime,
ef978bfe 1106this can be given as
e46e0a76
CL
1107.Sy \&uc .
1108.Pp
ef978bfe 1109Other capabilities to enter various highlighting modes include
e46e0a76 1110.Sy \&mb
ef978bfe 1111(blinking),
e46e0a76 1112.Sy \&md
ef978bfe 1113(bold or extra bright),
e46e0a76 1114.Sy \&mh
ef978bfe 1115(dim or half-bright),
e46e0a76 1116.Sy \&mk
ef978bfe 1117(blanking or invisible text),
e46e0a76 1118.Sy \&mp
ef978bfe 1119(protected),
e46e0a76 1120.Sy \&mr
ef978bfe 1121(reverse video),
e46e0a76 1122.Sy \&me
ef978bfe 1123(turn off
e46e0a76 1124.Em all
ef978bfe 1125attribute modes),
e46e0a76 1126.Sy \&as
ef978bfe 1127(enter alternate character set mode), and
e46e0a76 1128.Sy \&ae
ef978bfe
JB
1129(exit alternate character set mode).
1130Turning on any of these modes singly may or may not turn off other modes.
e46e0a76 1131.Pp
ef978bfe
JB
1132If there is a sequence to set arbitrary combinations of mode,
1133this should be given as
e46e0a76 1134.Sy \&sa
ef978bfe
JB
1135(set attributes), taking 9 parameters.
1136Each parameter is either 0 or 1,
1137as the corresponding attributes is on or off.
1138The 9 parameters are, in order: standout, underline, reverse, blink,
1139dim, bold, blank, protect, and alternate character set.
1140Not all modes need be supported by
e46e0a76 1141.Sy \&sa ,
ef978bfe
JB
1142only those for which corresponding attribute commands exist.
1143(It is unlikely that a
e46e0a76 1144.Nm termcap Ns \-using
ef978bfe
JB
1145program will support this capability, which is defined for compatibility
1146with
e46e0a76
CL
1147.Xr terminfo . )
1148.Pp
1149Terminals with the
1150.Dq magic cookie
1151glitches
1152.Pf ( Sy \&sg
ef978bfe 1153and
e46e0a76 1154.Sy \&ug ) ,
ef978bfe 1155rather than maintaining extra attribute bits for each character cell,
e46e0a76
CL
1156instead deposit special
1157.Dq cookies ,
1158or
1159.Dq garbage characters ,,
ef978bfe
JB
1160when they receive mode-setting sequences,
1161which affect the display algorithm.
e46e0a76 1162.Pp
ef978bfe
JB
1163Some terminals,
1164such as the Hewlett-Packard 2621,
1165automatically leave standout
1166mode when they move to a new line or when the cursor is addressed.
1167Programs using standout mode
1168should exit standout mode on such terminals
1169before moving the cursor or sending a newline.
1170On terminals where this is not a problem,
1171the
e46e0a76 1172.Sy \&ms
ef978bfe
JB
1173capability should be present
1174to say that this overhead is unnecessary.
e46e0a76 1175.Pp
c4737001 1176If the terminal has
ef978bfe
JB
1177a way of flashing the screen to indicate an error quietly
1178(a bell replacement),
c4737001 1179this can be given as
e46e0a76 1180.Sy \&vb ;
ef978bfe 1181it must not move the cursor.
e46e0a76 1182.Pp
ef978bfe
JB
1183If the cursor needs to be made more visible than normal
1184when it is not on the bottom line
1185(to change, for example, a non-blinking underline into an easier-to-find
1186block or blinking underline),
1187give this sequence as
e46e0a76 1188.Sy \&vs .
ef978bfe 1189If there is a way to make the cursor completely invisible, give that as
e46e0a76 1190.Sy \&vi .
ef978bfe 1191The capability
e46e0a76 1192.Sy \&ve ,
ef978bfe
JB
1193which undoes the effects of both of these modes,
1194should also be given.
e46e0a76 1195.Pp
ef978bfe 1196If your terminal correctly displays underlined characters
c4737001
KM
1197(with no special codes needed)
1198even though it does not overstrike,
ef978bfe 1199then you should give the capability
e46e0a76 1200.Sy \&ul .
c4737001 1201If overstrikes are erasable with a blank,
ef978bfe 1202this should be indicated by giving
e46e0a76
CL
1203.Sy \&eo .
1204.Ss Keypad
c4737001 1205If the terminal has a keypad that transmits codes when the keys are pressed,
ef978bfe
JB
1206this information can be given.
1207Note that it is not possible to handle
1208terminals where the keypad only works in local mode
1209(this applies, for example, to the unshifted Hewlett-Packard 2621 keys).
c4737001 1210If the keypad can be set to transmit or not transmit,
ef978bfe 1211give these codes as
e46e0a76 1212.Sy \&ks
ef978bfe 1213and
e46e0a76 1214.Sy \&ke .
c4737001 1215Otherwise the keypad is assumed to always transmit.
ef978bfe
JB
1216The codes sent by the left-arrow, right-arrow, up-arrow, down-arrow,
1217and home keys can be given as
e46e0a76
CL
1218.Sy \&kl ,
1219.Sy \&kr ,
1220.Sy \&ku ,
1221.Sy \&kd ,
ef978bfe 1222and
e46e0a76 1223.Sy \&kh ,
ef978bfe 1224respectively.
c4737001 1225If there are function keys such as f0, f1, ..., f9, the codes they send
ef978bfe 1226can be given as
e46e0a76
CL
1227.Sy \&k0 ,
1228.Sy \&k1 ,
1229...,
1230.Sy \&k9 .
c4737001 1231If these keys have labels other than the default f0 through f9, the labels
ef978bfe 1232can be given as
e46e0a76
CL
1233.Sy \&l0 ,
1234.Sy \&l1 ,
1235...,
1236.Sy \&l9 .
ef978bfe 1237The codes transmitted by certain other special keys can be given:
e46e0a76 1238.Sy \&kH
ef978bfe 1239(home down),
e46e0a76 1240.Sy \&kb
ef978bfe 1241(backspace),
e46e0a76 1242.Sy \&ka
ef978bfe 1243(clear all tabs),
e46e0a76 1244.Sy \&kt
ef978bfe 1245(clear the tab stop in this column),
e46e0a76 1246.Sy \&kC
ef978bfe 1247(clear screen or erase),
e46e0a76 1248.Sy \&kD
ef978bfe 1249(delete character),
e46e0a76 1250.Sy \&kL
ef978bfe 1251(delete line),
e46e0a76 1252.Sy \&kM
ef978bfe 1253(exit insert mode),
e46e0a76 1254.Sy \&kE
ef978bfe 1255(clear to end of line),
e46e0a76 1256.Sy \&kS
ef978bfe 1257(clear to end of screen),
e46e0a76 1258.Sy \&kI
ef978bfe 1259(insert character or enter insert mode),
e46e0a76 1260.Sy \&kA
ef978bfe 1261(insert line),
e46e0a76 1262.Sy \&kN
ef978bfe 1263(next page),
e46e0a76 1264.Sy \&kP
ef978bfe 1265(previous page),
e46e0a76 1266.Sy \&kF
ef978bfe 1267(scroll forward/down),
e46e0a76 1268.Sy \&kR
ef978bfe 1269(scroll backward/up), and
e46e0a76 1270.Sy \&kT
ef978bfe
JB
1271(set a tab stop in this column).
1272In addition, if the keypad has a 3 by 3 array of keys
1273including the four arrow keys, then the other five keys can be given as
e46e0a76
CL
1274.Sy \&K1 ,
1275.Sy \&K2 ,
1276.Sy \&K3 ,
1277.Sy \&K4 ,
ef978bfe 1278and
e46e0a76 1279.Sy \&K5 .
ef978bfe
JB
1280These keys are useful when the effects of a 3 by 3 directional pad are needed.
1281The obsolete
e46e0a76
CL
1282.Sy \&ko
1283capability formerly used to describe
1284.Dq other
1285function keys has been
ef978bfe 1286completely supplanted by the above capabilities.
e46e0a76 1287.Pp
c4737001 1288The
e46e0a76 1289.Sy \&ma
ef978bfe
JB
1290entry is also used to indicate arrow keys on terminals that have
1291single-character arrow keys.
1292It is obsolete but still in use in
1293version 2 of
e46e0a76 1294.Sy \&vi
ef978bfe 1295which must be run on some minicomputers due to
c4737001
KM
1296memory limitations.
1297This field is redundant with
e46e0a76
CL
1298.Sy \&kl ,
1299.Sy \&kr ,
1300.Sy \&ku ,
1301.Sy \&kd ,
ef978bfe 1302and
e46e0a76 1303.Sy \&kh .
c4737001 1304It consists of groups of two characters.
ef978bfe
JB
1305In each group, the first character is what an arrow key sends, and the
1306second character is the corresponding
e46e0a76 1307.Sy \&vi
ef978bfe 1308command.
c4737001 1309These commands are
e46e0a76 1310.Ar h
c4737001 1311for
e46e0a76
CL
1312.Sy \&kl ,
1313.Ar j
c4737001 1314for
e46e0a76
CL
1315.Sy \&kd ,
1316.Ar k
c4737001 1317for
e46e0a76
CL
1318.Sy \&ku ,
1319.Ar l
c4737001 1320for
e46e0a76 1321.Sy \&kr ,
c4737001 1322and
e46e0a76 1323.Ar H
c4737001 1324for
e46e0a76
CL
1325.Sy \&kh .
1326For example, the Mime would have
1327.Dq Li ma=^Hh^Kj^Zk^Xl
c4737001 1328indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
ef978bfe 1329(There is no home key on the Mime.)
e46e0a76 1330.Ss Tabs and Initialization
ef978bfe
JB
1331If the terminal needs to be in a special mode when running
1332a program that uses these capabilities,
1333the codes to enter and exit this mode can be given as
e46e0a76 1334.Sy \&ti
ef978bfe 1335and
e46e0a76 1336.Sy \&te .
ef978bfe
JB
1337This arises, for example, from terminals like the Concept with more than
1338one page of memory.
1339If the terminal has only memory-relative cursor addressing and not
1340screen-relative cursor addressing,
1341a screen-sized window must be fixed into
1342the display for cursor addressing to work properly.
1343This is also used for the Tektronix 4025, where
e46e0a76 1344.Sy \&ti
ef978bfe 1345sets the command character to be the one used by
e46e0a76
CL
1346.Nm termcap .
1347.Pp
ef978bfe
JB
1348Other capabilities
1349include
e46e0a76 1350.Sy \&is ,
ef978bfe
JB
1351an initialization string for the terminal,
1352and
e46e0a76 1353.Sy \&if ,
ef978bfe
JB
1354the name of a file containing long initialization strings.
1355These strings are expected to set the terminal into modes
1356consistent with the rest of the
e46e0a76 1357.Nm termcap
ef978bfe
JB
1358description.
1359They are normally sent to the terminal by the
e46e0a76 1360.Xr tset
ef978bfe
JB
1361program each time the user logs in.
1362They will be printed in the following order:
e46e0a76 1363.Sy \&is ;
ef978bfe 1364setting tabs using
e46e0a76 1365.Sy \&ct
ef978bfe 1366and
e46e0a76 1367.Sy \&st ;
ef978bfe 1368and finally
e46e0a76
CL
1369.Sy \&if .
1370.Pf ( Xr Terminfo
ef978bfe 1371uses
e46e0a76 1372.Sy \&i\&1-i2
ef978bfe 1373instead of
e46e0a76 1374.Sy \&is
ef978bfe 1375and runs the program
e46e0a76 1376.Sy \&iP
ef978bfe 1377and prints
e46e0a76 1378.Sy "\&i\&3"
ef978bfe
JB
1379after the other initializations.)
1380A pair of sequences that does a harder reset from a totally unknown state
1381can be analogously given as
e46e0a76 1382.Sy \&rs
ef978bfe 1383and
e46e0a76 1384.Sy \&if .
ef978bfe 1385These strings are output by the
e46e0a76 1386.Xr reset
ef978bfe 1387program, which is used when the terminal gets into a wedged state.
e46e0a76 1388.Pf ( Xr Terminfo
ef978bfe 1389uses
e46e0a76 1390.Sy "\&r1-r3"
ef978bfe 1391instead of
e46e0a76 1392.Sy \&rs . )
ef978bfe 1393Commands are normally placed in
e46e0a76 1394.Sy \&rs
ef978bfe 1395and
e46e0a76 1396.Sy \&rf
ef978bfe
JB
1397only if they produce annoying effects on the screen and are not necessary
1398when logging in.
1399For example, the command to set the VT100 into 80-column mode
1400would normally be part of
e46e0a76 1401.Sy \&is ,
ef978bfe
JB
1402but it causes an annoying glitch of the screen and is not normally needed
1403since the terminal is usually already in 80-column mode.
e46e0a76 1404.Pp
ef978bfe
JB
1405If the terminal has hardware tabs,
1406the command to advance to the next tab stop can be given as
e46e0a76 1407.Sy \&ta
ef978bfe 1408(usually
e46e0a76
CL
1409.Sy \&^I ) .
1410A
1411.Dq backtab
1412command which moves leftward to the previous tab stop
ef978bfe 1413can be given as
e46e0a76 1414.Sy \&bt .
ef978bfe
JB
1415By convention,
1416if the terminal driver modes indicate that tab stops are being expanded
1417by the computer rather than being sent to the terminal,
1418programs should not use
e46e0a76 1419.Sy \&ta
ef978bfe 1420or
e46e0a76 1421.Sy \&bt
ef978bfe
JB
1422even if they are present,
1423since the user may not have the tab stops properly set.
1424If the terminal has hardware tabs that are initially set every
e46e0a76 1425.Ar n
ef978bfe 1426positions when the terminal is powered up, then the numeric parameter
e46e0a76 1427.Sy \&it
ef978bfe
JB
1428is given, showing the number of positions between tab stops.
1429This is normally used by the
e46e0a76 1430.Xr tset
ef978bfe
JB
1431command to determine whether to set the driver mode for hardware tab
1432expansion, and whether to set the tab stops.
1433If the terminal has tab stops that can be saved in nonvolatile memory, the
e46e0a76 1434.Nm termcap
ef978bfe 1435description can assume that they are properly set.
e46e0a76 1436.Pp
ef978bfe 1437If there are commands to set and clear tab stops, they can be given as
e46e0a76 1438.Sy \&ct
ef978bfe 1439(clear all tab stops) and
e46e0a76 1440.Sy \&st
ef978bfe
JB
1441(set a tab stop in the current column of every row).
1442If a more complex sequence is needed to set the tabs than can be
1443described by this, the sequence can be placed in
e46e0a76 1444.Sy \&is
ef978bfe 1445or
e46e0a76
CL
1446.Sy \&if .
1447.Ss Delays
ef978bfe
JB
1448Certain capabilities control padding in the terminal driver.
1449These are primarily needed by hardcopy terminals and are used by the
e46e0a76 1450.Xr tset
ef978bfe
JB
1451program to set terminal driver modes appropriately.
1452Delays embedded in the capabilities
e46e0a76
CL
1453.Sy \&cr ,
1454.Sy \&sf ,
1455.Sy \&le ,
1456.Sy \&ff ,
ef978bfe 1457and
e46e0a76 1458.Sy \&ta
ef978bfe
JB
1459will cause the appropriate delay bits to be set in the terminal driver.
1460If
e46e0a76 1461.Sy \&pb
ef978bfe
JB
1462(padding baud rate) is given, these values can be ignored at baud rates
1463below the value of
e46e0a76
CL
1464.Sy \&pb .
1465For
1466.Bx 4.2
1467.Xr tset ,
ef978bfe 1468the delays are given as numeric capabilities
e46e0a76
CL
1469.Sy \&dC ,
1470.Sy \&dN ,
1471.Sy \&dB ,
1472.Sy \&dF ,
ef978bfe 1473and
e46e0a76 1474.Sy \&dT
ef978bfe 1475instead.
e46e0a76
CL
1476.Ss Miscellaneous
1477If the terminal requires other than a
1478.Dv NUL
1479(zero) character as a pad,
ef978bfe 1480this can be given as
e46e0a76 1481.Sy \&pc .
ef978bfe 1482Only the first character of the
e46e0a76 1483.Sy \&pc
ef978bfe 1484string is used.
e46e0a76 1485.Pp
ef978bfe
JB
1486If the terminal has commands to save and restore the position of the
1487cursor, give them as
e46e0a76 1488.Sy \&sc
ef978bfe 1489and
e46e0a76
CL
1490.Sy \&rc .
1491.Pp
1492If the terminal has an extra
1493.Dq status line
1494that is not normally used by
ef978bfe
JB
1495software, this fact can be indicated.
1496If the status line is viewed as an extra line below the bottom line,
1497then the capability
e46e0a76 1498.Sy \&hs
ef978bfe
JB
1499should be given.
1500Special strings to go to a position in the status line and to return
1501from the status line can be given as
e46e0a76 1502.Sy \&ts
ef978bfe 1503and
e46e0a76
CL
1504.Sy \&fs .
1505.Pf ( Xr \&fs
ef978bfe 1506must leave the cursor position in the same place that it was before
e46e0a76 1507.Sy \&ts .
ef978bfe 1508If necessary, the
e46e0a76 1509.Sy \&sc
ef978bfe 1510and
e46e0a76 1511.Sy \&rc
ef978bfe 1512strings can be included in
e46e0a76 1513.Sy \&ts
ef978bfe 1514and
e46e0a76 1515.Sy \&fs
ef978bfe
JB
1516to get this effect.)
1517The capability
e46e0a76 1518.Sy \&ts
ef978bfe
JB
1519takes one parameter, which is the column number of the status line
1520to which the cursor is to be moved.
1521If escape sequences and other special commands such as tab work while in
1522the status line, the flag
e46e0a76 1523.Sy \&es
ef978bfe
JB
1524can be given.
1525A string that turns off the status line (or otherwise erases its contents)
1526should be given as
e46e0a76 1527.Sy \&ds .
ef978bfe
JB
1528The status line is normally assumed to be the same width as the
1529rest of the screen,
e46e0a76
CL
1530.Em i.e . ,
1531.Sy \&co .
ef978bfe
JB
1532If the status line is a different width (possibly because the terminal
1533does not allow an entire line to be loaded), then its width in columns
1534can be indicated with the numeric parameter
e46e0a76
CL
1535.Sy \&ws .
1536.Pp
ef978bfe
JB
1537If the terminal can move up or down half a line, this can be
1538indicated with
e46e0a76 1539.Sy \&hu
ef978bfe 1540(half-line up) and
e46e0a76 1541.Sy \&hd
ef978bfe
JB
1542(half-line down).
1543This is primarily useful for superscripts and subscripts on hardcopy
1544terminals.
1545If a hardcopy terminal can eject to the next page (form feed),
1546give this as
e46e0a76 1547.Sy \&ff
ef978bfe 1548(usually
e46e0a76
CL
1549.Sy \&^L ) .
1550.Pp
ef978bfe
JB
1551If there is a command to repeat a given character a given number of times
1552(to save time transmitting a large number of identical characters),
1553this can be indicated with the parameterized string
e46e0a76 1554.Sy \&rp .
ef978bfe
JB
1555The first parameter is the character to be repeated and the second is
1556the number of times to repeat it.
1557(This is a
e46e0a76 1558.Xr terminfo
ef978bfe 1559feature that is unlikely to be supported by a program that uses
e46e0a76
CL
1560.Nm termcap . )
1561.Pp
ef978bfe
JB
1562If the terminal has a settable command character, such as the
1563Tektronix 4025, this can be indicated with
e46e0a76 1564.Sy \&CC .
ef978bfe
JB
1565A prototype command character is chosen which is used in all capabilities.
1566This character is given in the
e46e0a76 1567.Sy \&CC
ef978bfe 1568capability to identify it.
e46e0a76
CL
1569The following convention is supported on some
1570.Ux
1571systems:
ef978bfe 1572The environment is to be searched for a
e46e0a76 1573.Ev \&CC
ef978bfe
JB
1574variable,
1575and if found,
1576all occurrences of the prototype character are replaced by the character
1577in the environment variable.
1578This use of the
e46e0a76 1579.Ev \&CC
ef978bfe
JB
1580environment variable
1581is a very bad idea, as it conflicts with
e46e0a76
CL
1582.Xr make 1 .
1583.Pp
ef978bfe
JB
1584Terminal descriptions that do not represent a specific kind of known
1585terminal, such as
e46e0a76
CL
1586.Em switch ,
1587.Em dialup ,
1588.Em patch ,
ef978bfe 1589and
e46e0a76 1590.Xr network ,
ef978bfe 1591should include the
e46e0a76 1592.Sy \&gn
ef978bfe
JB
1593(generic) capability so that programs can complain that they do not know
1594how to talk to the terminal.
1595(This capability does not apply to
e46e0a76 1596.Em virtual
ef978bfe 1597terminal descriptions for which the escape sequences are known.)
e46e0a76
CL
1598.Pp
1599If the terminal uses xoff/xon
1600.Pq Tn DC3 Ns / Ns Tn DC1
ef978bfe 1601handshaking for flow control, give
e46e0a76 1602.Sy \&xo .
ef978bfe
JB
1603Padding information should still be included so that routines can make
1604better decisions about costs, but actual pad characters will not be
1605transmitted.
e46e0a76
CL
1606.Pp
1607If the terminal has a
1608.Dq meta key
1609which acts as a shift key, setting the
ef978bfe 16108th bit of any character transmitted, then this fact can be indicated with
e46e0a76 1611.Sy \&km .
ef978bfe
JB
1612Otherwise, software will assume that the 8th bit is parity and it will
1613usually be cleared.
e46e0a76
CL
1614If strings exist to turn this
1615.Dq meta mode
1616on and off, they can be given as
1617.Sy \&mm
ef978bfe 1618and
e46e0a76
CL
1619.Sy \&mo .
1620.Pp
ef978bfe
JB
1621If the terminal has more lines of memory than will fit on the screen at once,
1622the number of lines of memory can be indicated with
e46e0a76 1623.Sy \&lm .
ef978bfe
JB
1624An explicit value of 0 indicates that the number of lines is not fixed,
1625but that there is still more memory than fits on the screen.
e46e0a76
CL
1626.Pp
1627If the terminal is one of those supported by the
1628.Ux
1629system virtual
ef978bfe 1630terminal protocol, the terminal number can be given as
e46e0a76
CL
1631.Sy \&vt .
1632.Pp
ef978bfe
JB
1633Media copy strings which control an auxiliary printer
1634connected to the terminal can be given as
e46e0a76 1635.Sy \&ps :
ef978bfe 1636print the contents of the screen;
e46e0a76 1637.Sy \&pf :
ef978bfe 1638turn off the printer; and
e46e0a76 1639.Sy \&po :
ef978bfe
JB
1640turn on the printer.
1641When the printer is on, all text sent to the terminal will be sent to the
1642printer.
1643It is undefined whether the text is also displayed on the terminal screen
1644when the printer is on.
1645A variation
e46e0a76 1646.Sy \&pO
ef978bfe
JB
1647takes one parameter and leaves the printer on for as many characters as the
1648value of the parameter, then turns the printer off.
1649The parameter should not exceed 255.
1650All text, including
e46e0a76 1651.Sy \&pf ,
ef978bfe 1652is transparently passed to the printer while
e46e0a76 1653.Sy \&pO
ef978bfe 1654is in effect.
e46e0a76 1655.Pp
ef978bfe 1656Strings to program function keys can be given as
e46e0a76
CL
1657.Sy \&pk ,
1658.Sy \&pl ,
ef978bfe 1659and
e46e0a76 1660.Sy \&px .
ef978bfe
JB
1661Each of these strings takes two parameters: the function key number
1662to program (from 0 to 9) and the string to program it with.
1663Function key numbers out of this range may program undefined keys
1664in a terminal-dependent manner.
1665The differences among the capabilities are that
e46e0a76 1666.Sy \&pk
ef978bfe
JB
1667causes pressing the given key to be the same as the user typing the given
1668string;
e46e0a76 1669.Sy \&pl
ef978bfe
JB
1670causes the string to be executed by the terminal in local mode;
1671and
e46e0a76 1672.Sy \&px
ef978bfe
JB
1673causes the string to be transmitted to the computer.
1674Unfortunately, due to lack of a definition for string parameters in
e46e0a76 1675.Nm termcap ,
ef978bfe 1676only
e46e0a76 1677.Xr terminfo
ef978bfe 1678supports these capabilities.
e46e0a76 1679.Ss Glitches and Braindamage
ef978bfe
JB
1680Hazeltine terminals, which do not allow `~' characters to be displayed,
1681should indicate
e46e0a76
CL
1682.Sy \&hz .
1683.Pp
ef978bfe 1684The
e46e0a76 1685.Sy \&nc
ef978bfe
JB
1686capability, now obsolete, formerly indicated Datamedia terminals,
1687which echo
e46e0a76 1688.Sy \&\er \en
ef978bfe
JB
1689for
1690carriage return then ignore a following linefeed.
e46e0a76 1691.Pp
ef978bfe 1692Terminals that ignore a linefeed immediately after an
e46e0a76 1693.Sy \&am
ef978bfe 1694wrap, such as the Concept, should indicate
e46e0a76
CL
1695.Sy \&xn .
1696.Pp
ef978bfe 1697If
e46e0a76 1698.Sy \&ce
ef978bfe
JB
1699is required to get rid of standout
1700(instead of merely writing normal text on top of it),
e46e0a76 1701.Sy \&xs
ef978bfe 1702should be given.
e46e0a76 1703.Pp
c4737001 1704Teleray terminals, where tabs turn all characters moved over to blanks,
ef978bfe 1705should indicate
e46e0a76 1706.Sy \&xt
ef978bfe
JB
1707(destructive tabs).
1708This glitch is also taken to mean that it is not possible
1709to position the cursor on top of a \*(lqmagic cookie\*(rq, and that
1710to erase standout mode it is necessary to use delete and insert line.
e46e0a76 1711.Pp
ef978bfe 1712The Beehive Superbee, which is unable to correctly transmit the
e46e0a76
CL
1713.Dv ESC
1714or
1715.Sy \&^C
1716characters, has
1717.Sy \&xb ,
1718indicating that the
1719.Dq \&f\&1
1720key is used for
1721.Dv ESC
1722and
1723.Dq \&f\&2
1724for ^C.
1725(Only certain Superbees have this problem, depending on the
1726.Tn ROM . )
1727.Pp
ef978bfe 1728Other specific terminal problems may be corrected by adding more
e46e0a76
CL
1729capabilities of the form
1730.Sy x Em x .
1731.Ss Similar Terminals
c4737001
KM
1732If there are two very similar terminals,
1733one can be defined as being just like the other with certain exceptions.
ef978bfe 1734The string capability
e46e0a76 1735.Sy \&tc
ef978bfe 1736can be given
c4737001 1737with the name of the similar terminal.
ef978bfe 1738This capability must be
e46e0a76 1739.Em last ,
ef978bfe
JB
1740and the combined length of the entries
1741must not exceed 1024.
1742The capabilities given before
e46e0a76 1743.Sy \&tc
ef978bfe 1744override those in the terminal type invoked by
e46e0a76 1745.Sy \&tc .
ef978bfe 1746A capability can be canceled by placing
e46e0a76 1747.Sy \&xx@
ef978bfe 1748to the left of the
e46e0a76 1749.Sy \&tc
ef978bfe 1750invocation, where
e46e0a76 1751.Sy \&xx
ef978bfe 1752is the capability.
c4737001 1753For example, the entry
e46e0a76
CL
1754.Bd -literal -offset indent
1755hn\||\|2621\-nl:ks@:ke@:tc=2621:
1756.Ed
1757.Pp
1758defines a
1759.Dq 2621\-nl
1760that does not have the
1761.Sy \&ks
ef978bfe 1762or
e46e0a76 1763.Sy \&ke
ef978bfe
JB
1764capabilities,
1765hence does not turn on the function key labels when in visual mode.
c4737001
KM
1766This is useful for different modes for a terminal, or for different
1767user preferences.
e46e0a76 1768.Sh FILES
cadfb54b 1769.Bl -tag -width /usr/share/misc/termcap.db -compact
e46e0a76
CL
1770.It Pa /usr/share/misc/termcap
1771File containing terminal descriptions.
cadfb54b
EA
1772.It Pa /usr/share/misc/termcap.db
1773Hash database file containing terminal descriptions (see
1774.Xr cap_mkdb 1 ) .
e46e0a76
CL
1775.El
1776.Sh SEE ALSO
1777.Xr \&ex 1 ,
cadfb54b 1778.Xr cap_mkdb 1 ,
e46e0a76
CL
1779.Xr more 1 ,
1780.Xr tset 1 ,
1781.Xr \&ul 1 ,
1782.Xr vi 1 ,
1783.Xr curses 3 ,
1784.Xr printf 3 ,
1785.Xr termcap 3 ,
1786.Xr term 7
1787.Sh CAVEATS AND BUGS
1788The
1789.Em Note :
1790.Nm termcap
1791functions
1792were replaced by
1793.Xr terminfo
1794in
1795.At V
1796Release 2.0.
ef978bfe 1797The transition will be relatively painless if capabilities flagged as
e46e0a76
CL
1798.Dq obsolete
1799are avoided.
1800.Pp
f3531ae0
JB
1801Lines and columns are now stored by the kernel as well as in the termcap
1802entry.
1803Most programs now use the kernel information primarily; the information
1804in this file is used only if the kernel does not have any information.
e46e0a76
CL
1805.Pp
1806.Xr \&Vi
c4737001 1807allows only 256 characters for string capabilities, and the routines
e46e0a76
CL
1808in
1809.Xr termlib 3
c4737001
KM
1810do not check for overflow of this buffer.
1811The total length of a single entry (excluding only escaped newlines)
1812may not exceed 1024.
e46e0a76 1813.Pp
c4737001 1814Not all programs support all entries.
e46e0a76
CL
1815.Sh HISTORY
1816The
1817.Nm
1818file format appeared in
1819.Bx 3 .