BSD 4_3_Net_2 release
[unix-history] / usr / src / share / termcap / termcap.5
index 042b204..3214bae 100644 (file)
@@ -1,46 +1,65 @@
-.\" Copyright (c) 1985 The Regents of the University of California.
+.\" Copyright (c) 1985, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" All rights reserved.
 .\"
-.\" %sccs.include.redist.man%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"    @(#)termcap.5   6.8 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.ie n \{\
-.      ds lq \&"\"
-.      ds rq \&"\"
-.\}
-.el \{\
-.      ds rq ''
-.      ds lq ``
-.\}
-.tr ||
-.tr *\(**
-.hw trans-parently
-.TH TERMCAP 5 ""
-.UC
-.SH NAME
-termcap \- terminal capability data base
-.SH SYNOPSIS
-/etc/termcap
-.SH DESCRIPTION
-.I Termcap\^
+.\"     @(#)termcap.5  6.9 (Berkeley) 5/10/91
+.\"
+.Dd May 10, 1991
+.Dt TERMCAP 5
+.Os BSD 3
+.Sh NAME
+.Nm termcap
+.Nd terminal capability data base
+.Sh SYNOPSIS
+.Nm termcap
+.Sh DESCRIPTION
+The
+.Nm Termcap
+file
 is a data base describing terminals,
 used,
 is a data base describing terminals,
 used,
-.IR e.g. ,
+for example,
 by
 by
-.IR vi\^ (1)
+.Xr \&vi 1
 and
 and
-.IR curses\^ (3X).
+.Xr curses 3 .
 Terminals are described in
 Terminals are described in
-.I termcap\^
+.Nm termcap
 by giving a set of capabilities that they have and by describing
 how operations are performed.
 Padding requirements and initialization sequences
 are included in
 by giving a set of capabilities that they have and by describing
 how operations are performed.
 Padding requirements and initialization sequences
 are included in
-.IR termcap\^ .
-.PP
+.Nm termcap .
+.Pp
 Entries in
 Entries in
-.I termcap\^
+.Nm termcap
 consist of a number of `:'-separated fields.
 The first entry for each terminal gives the names that are known for the
 terminal, separated by `|' characters.
 consist of a number of `:'-separated fields.
 The first entry for each terminal gives the names that are known for the
 terminal, separated by `|' characters.
@@ -54,254 +73,358 @@ All names but the first and last
 should be in lower case and contain no blanks;
 the last name may well contain
 upper case and blanks for readability.
 should be in lower case and contain no blanks;
 the last name may well contain
 upper case and blanks for readability.
-.PP
+.Pp
 Terminal names (except for the last, verbose entry)
 should be chosen using the following conventions.
 The particular piece of hardware making up the terminal
 Terminal names (except for the last, verbose entry)
 should be chosen using the following conventions.
 The particular piece of hardware making up the terminal
-should have a root name chosen, thus \*(lqhp2621\*(rq.
+should have a root name chosen, thus
+.Dq hp2621
 This name should not contain hyphens.
 Modes that the hardware can be in
 or user preferences
 should be indicated by appending a hyphen and an indicator of the mode.
 This name should not contain hyphens.
 Modes that the hardware can be in
 or user preferences
 should be indicated by appending a hyphen and an indicator of the mode.
-Therefore, a \*(lqvt100\*(rq in 132-column mode would be \*(lqvt100-w\*(rq.
+Therefore, a
+.Dq vt100
+in 132-column mode would be
+.Dq vt100-w .
 The following suffixes should be used where possible:
 The following suffixes should be used where possible:
-.sp
-.ev
-.ta
-.ta \w'\fBSuffix\fP\ \ \ 'u +\w'With automatic margins (usually default)\ \ 'u
-.nf
-.if t \{\
-.nr Xx \n(.lu-\n(.i-\w'\fBSuffix\fP\ \ \ With automatic margins (usually default)\ \ vt100-am'u
-.in +\n(Xxu/2u
-.\}
-\fBSuffix      Meaning Example\fP
+.Pp
+.Bd -filled -offset indent
+.Bl -column indent "With automatic margins (usually default)xx"
+.Sy Suffix     Meaning Example
 -w     Wide mode (more than 80 columns)        vt100-w
 -am    With automatic margins (usually default)        vt100-am
 -nam   Without automatic margins       vt100-nam
 -w     Wide mode (more than 80 columns)        vt100-w
 -am    With automatic margins (usually default)        vt100-am
 -nam   Without automatic margins       vt100-nam
--\fIn\fP       Number of lines on the screen   aaa-60
+.Pf \- Ar n Ta No "Number of lines on the screen       aaa-60"
 -na    No arrow keys (leave them in local)     concept100-na
 -na    No arrow keys (leave them in local)     concept100-na
--\fIn\^\fPp    Number of pages of memory       concept100-4p
+.Pf \- Ar \&np Ta No "Number of pages of memory        concept100-4p"
 -rv    Reverse video   concept100-rv
 -rv    Reverse video   concept100-rv
-.fi
-.ev
-.SH CAPABILITIES
-.PP
+.El
+.Ed
+.Sh CAPABILITIES
 The characters in the
 The characters in the
-.I Notes
+The
+.Em Notes
+function
 field in the table have the following meanings
 (more than one may apply to a capability):
 field in the table have the following meanings
 (more than one may apply to a capability):
-.PP
-.ev
-.ta
-.ta \w'N\ \ \ 'u
-.nf
+.Pp
+.Bd -unfilled -offset indent
 N      indicates numeric parameter(s)
 P      indicates that padding may be specified
 *      indicates that padding may be based on the number of lines affected
 o      indicates capability is obsolete
 N      indicates numeric parameter(s)
 P      indicates that padding may be specified
 *      indicates that padding may be based on the number of lines affected
 o      indicates capability is obsolete
-.fi
-.ev
-.PP
-\*(lqObsolete\*(rq capabilities have no
-.I terminfo\^
+.Ed
+.Pp
+.Dq Obsolete
+capabilities have no
+.Em terminfo
 equivalents,
 since they were considered useless,
 or are subsumed by other capabilities.
 New software should not rely on them at all.
 equivalents,
 since they were considered useless,
 or are subsumed by other capabilities.
 New software should not rely on them at all.
-.PP
-.nf
-.ta \w'\fBName  \fP'u +\w'\fBType  \fP'u +\w'\fBNotes  \fP'u
-\fBName        Type    Notes   Description\fP
-ae     str     (P)     End alternate character set
-AL     str     (NP*)   Add \fIn\^\fP new blank lines
-al     str     (P*)    Add new blank line
-am     bool            Terminal has automatic margins
-as     str     (P)     Start alternate character set
-bc     str     (o)     Backspace if not \fB^H\fP
-bl     str     (P)     Audible signal (bell)
-bs     bool    (o)     Terminal can backspace with \fB^H\fP
-bt     str     (P)     Back tab
-bw     bool            \fBle\fP (backspace) wraps from column 0 to last column
-CC     str             Terminal settable command character in prototype
-cd     str     (P*)    Clear to end of display
-ce     str     (P)     Clear to end of line
-ch     str     (NP)    Set cursor column (horizontal position)
-cl     str     (P*)    Clear screen and home cursor
-CM     str     (NP)    Memory-relative cursor addressing
-cm     str     (NP)    Screen-relative cursor motion
-co     num             Number of columns in a line (See BUGS section below)
-cr     str     (P)     Carriage return
-cs     str     (NP)    Change scrolling region (VT100)
-ct     str     (P)     Clear all tab stops
-cv     str     (NP)    Set cursor row (vertical position)
-da     bool            Display may be retained above the screen
-dB     num     (o)     Milliseconds of \fBbs\fP delay needed (default 0)
-db     bool            Display may be retained below the screen
-DC     str     (NP*)   Delete \fIn\^\fP characters
-dC     num     (o)     Milliseconds of \fBcr\fP delay needed (default 0)
-dc     str     (P*)    Delete character
-dF     num     (o)     Milliseconds of \fBff\fP delay needed (default 0)
-DL     str     (NP*)   Delete \fIn\^\fP lines
-dl     str     (P*)    Delete line
-dm     str             Enter delete mode
-dN     num     (o)     Milliseconds of \fBnl\fP delay needed (default 0)
-DO     str     (NP*)   Move cursor down \fIn\^\fP lines
-do     str             Down one line
-ds     str             Disable status line
-dT     num     (o)     Milliseconds of horizontal tab delay needed (default 0)
-dV     num     (o)     Milliseconds of vertical tab delay needed (default 0)
-ec     str     (NP)    Erase \fIn\^\fP characters
-ed     str             End delete mode
-ei     str             End insert mode
-eo     bool            Can erase overstrikes with a blank
-EP     bool    (o)     Even parity
-es     bool            Escape can be used on the status line
-ff     str     (P*)    Hardcopy terminal page eject
-fs     str             Return from status line
-gn     bool            Generic line type (\fIe.g.\fP dialup, switch)
-hc     bool            Hardcopy terminal
-HD     bool    (o)     Half-duplex
-hd     str             Half-line down (forward 1/2 linefeed)
-ho     str     (P)     Home cursor
-hs     bool            Has extra \*(lqstatus line\*(rq
-hu     str             Half-line up (reverse 1/2 linefeed)
-hz     bool            Cannot print ~s (Hazeltine)
-i1-i3  str             Terminal initialization strings (\fIterminfo\^\fP only)
-IC     str     (NP*)   Insert \fIn\^\fP blank characters
-ic     str     (P*)    Insert character
-if     str             Name of file containing initialization string
-im     str             Enter insert mode
-in     bool            Insert mode distinguishes nulls
-iP     str             Pathname of program for initialization (\fIterminfo\^\fP only)
-ip     str     (P*)    Insert pad after character inserted
-is     str             Terminal initialization string (\fItermcap\^\fP only)
-it     num             Tabs initially every \fIn\^\fP positions
-K1     str             Sent by keypad upper left
-K2     str             Sent by keypad upper right
-K3     str             Sent by keypad center
-K4     str             Sent by keypad lower left
-K5     str             Sent by keypad lower right
-k0-k9  str             Sent by function keys 0-9
-kA     str             Sent by insert-line key
-ka     str             Sent by clear-all-tabs key
-kb     str             Sent by backspace key
-kC     str             Sent by clear-screen or erase key
-kD     str             Sent by delete-character key
-kd     str             Sent by down-arrow key
-kE     str             Sent by clear-to-end-of-line key
-ke     str             Out of \*(lqkeypad transmit\*(rq mode
-kF     str             Sent by scroll-forward/down key
-kH     str             Sent by home-down key
-kh     str             Sent by home key
-kI     str             Sent by insert-character or enter-insert-mode key
-kL     str             Sent by delete-line key
-kl     str             Sent by left-arrow key
-kM     str             Sent by insert key while in insert mode
-km     bool            Has a \*(lqmeta\*(rq key (shift, sets parity bit)
-kN     str             Sent by next-page key
-kn     num     (o)     Number of function (\fBk0\fP\-\fBk9\fP) keys (default 0)
-ko     str     (o)     Termcap entries for other non-function keys
-kP     str             Sent by previous-page key
-kR     str             Sent by scroll-backward/up key
-kr     str             Sent by right-arrow key
-kS     str             Sent by clear-to-end-of-screen key
-ks     str             Put terminal in \*(lqkeypad transmit\*(rq mode
-kT     str             Sent by set-tab key
-kt     str             Sent by clear-tab key
-ku     str             Sent by up-arrow key
-l0-l9  str             Labels on function keys if not \*(lqf\fIn\^\fP\*(rq
-LC     bool    (o)     Lower-case only
-LE     str     (NP)    Move cursor left \fIn\^\fP positions
-le     str     (P)     Move cursor left one position
-li     num             Number of lines on screen or page (See BUGS section below)
-ll     str             Last line, first column
-lm     num             Lines of memory if > \fBli\fP (0 means varies)
-ma     str     (o)     Arrow key map (used by \fIvi\^\fP version 2 only)
-mb     str             Turn on blinking attribute
-md     str             Turn on bold (extra bright) attribute
-me     str             Turn off all attributes
-mh     str             Turn on half-bright attribute
-mi     bool            Safe to move while in insert mode
-mk     str             Turn on blank attribute (characters invisible)
-ml     str     (o)     Memory lock on above cursor
-mm     str             Turn on \*(lqmeta mode\*(rq (8th bit)
-mo     str             Turn off \*(lqmeta mode\*(rq
-mp     str             Turn on protected attribute
-mr     str             Turn on reverse-video attibute
-ms     bool            Safe to move in standout modes
-mu     str     (o)     Memory unlock (turn off memory lock)
-nc     bool    (o)     No correctly-working \fBcr\fP (Datamedia 2500, Hazeltine 2000)
-nd     str             Non-destructive space (cursor right)
-NL     bool    (o)     \fB\\n\fP is newline, not line feed
-nl     str     (o)     Newline character if not \fB\\n\fP
-ns     bool    (o)     Terminal is a \s-1CRT\s0 but doesn't scroll
-nw     str     (P)     Newline (behaves like \fBcr\fP followed by \fBdo\fP)
-OP     bool    (o)     Odd parity
-os     bool            Terminal overstrikes
-pb     num             Lowest baud where delays are required
-pc     str             Pad character (default \s-2NUL\s0)
-pf     str             Turn off the printer
-pk     str             Program function key \fIn\^\fP to type string \fIs\fP (\fIterminfo\^\fP only)
-pl     str             Program function key \fIn\^\fP to execute string \fIs\fP (\fIterminfo\^\fP only)
-pO     str     (N)     Turn on the printer for \fIn\^\fP bytes
-po     str             Turn on the printer
-ps     str             Print contents of the screen
-pt     bool    (o)     Has hardware tabs (may need to be set with \fBis\fP)
-px     str             Program function key \fIn\^\fP to transmit string \fIs\fP (\fIterminfo\^\fP only)
-r1-r3  str             Reset terminal completely to sane modes (\fIterminfo\^\fP only)
-rc     str     (P)     Restore cursor to position of last \fBsc\fP
-rf     str             Name of file containing reset codes
-RI     str     (NP)    Move cursor right \fIn\^\fP positions
-rp     str     (NP*)   Repeat character \fIc n\^\fP times
-rs     str             Reset terminal completely to sane modes (\fItermcap\^\fP only)
-sa     str     (NP)    Define the video attributes
-sc     str     (P)     Save cursor position
-se     str             End standout mode
-SF     str     (NP*)   Scroll forward \fIn\^\fP lines
-sf     str     (P)     Scroll text up
-sg     num             Number of garbage chars left by \fBso\fP or \fBse\fP (default 0)
-so     str             Begin standout mode
-SR     str     (NP*)   Scroll backward \fIn\^\fP lines
-sr     str     (P)     Scroll text down
-st     str             Set a tab in all rows, current column
-ta     str     (P)     Tab to next 8-position hardware tab stop
-tc     str             Entry of similar terminal \- must be last
-te     str             String to end programs that use \fItermcap\fP
-ti     str             String to begin programs that use \fItermcap\fP
-ts     str     (N)     Go to status line, column \fIn\^\fP
-UC     bool    (o)     Upper-case only
-uc     str             Underscore one character and move past it
-ue     str             End underscore mode
-ug     num             Number of garbage chars left by \fBus\fP or \fBue\fP (default 0)
-ul     bool            Underline character overstrikes
-UP     str     (NP*)   Move cursor up \fIn\^\fP lines
-up     str             Upline (cursor up)
-us     str             Start underscore mode
-vb     str             Visible bell (must not move cursor)
-ve     str             Make cursor appear normal (undo \fBvs\fP/\fBvi\fP)
-vi     str             Make cursor invisible
-vs     str             Make cursor very visible
-vt     num             Virtual terminal number (not supported on all systems)
-wi     str     (N)     Set current window
-ws     num             Number of columns in status line
-xb     bool            Beehive (f1=\s-2ESC\s0, f2=^C)
-xn     bool            Newline ignored after 80 cols (Concept)
-xo     bool            Terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0) handshaking
-xr     bool    (o)     Return acts like \fBce cr nl\fP (Delta Data)
-xs     bool            Standout not erased by overwriting (Hewlett-Packard)
-xt     bool            Tabs ruin, magic \fBso\fP char (Teleray 1061)
-xx     bool    (o)     Tektronix 4025 insert-line
-.fi
-.ta 8n +8n
-.PP
-.B A Sample Entry
-.PP
+.Pp
+.Bl -column indent indent indent
+.Sy Name       Type    Notes   Description
+functions
+.It "ae        str     (P)     End alternate character set."
+.It AL str     (NP*)   Add"
+.Em n
+new blank lines
+.It "al        str     (P*)    Add new blank line."
+.It "am        bool            Terminal has automatic margins."
+.It "as        str     (P)     Start alternate character set."
+.It "bc        str     (o)     Backspace if not."
+.Sy \&^H .
+.It "bl        str     (P)     Audible signal (bell)."
+.It "bs        bool    (o)     Terminal can backspace with"
+.Sy \&^H .
+.It "bt        str     (P)     Back tab."
+.It "bw        bool    " Ta Sy \&le
+(backspace) wraps from column 0 to last column.
+.It "CC        str             Terminal settable command character in prototype."
+.It "cd        str     (P*)    Clear to end of display."
+.It "ce        str     (P)     Clear to end of line."
+.It "ch        str     (NP)    Set cursor column (horizontal position)."
+.It "cl        str     (P*)    Clear screen and home cursor."
+.It "CM        str     (NP)    Memory-relative cursor addressing."
+.It "cm        str     (NP)    Screen-relative cursor motion."
+.It "co        num             Number of columns in a line (See"
+.Sx BUGS
+section below).
+.It "cr        str     (P)     Carriage return."
+.It "cs        str     (NP)    Change scrolling region (VT100)."
+.It "ct        str     (P)     Clear all tab stops."
+.It "cv        str     (NP)    Set cursor row (vertical position)."
+.It "da        bool            Display may be retained above the screen."
+.It "dB        num     (o)     Milliseconds of"
+.Sy \&bs
+delay needed (default 0).
+.It "db        bool            Display may be retained below the screen."
+.It "DC        str     (NP*)   Delete"
+.Em n
+characters.
+.It "dC        num     (o)     Milliseconds of"
+.Sy \&cr
+delay needed (default 0).
+.It "dc        str     (P*)    Delete character."
+.It "dF        num     (o)     Milliseconds of"
+.Sy \&ff
+delay needed (default 0).
+.It "DL        str     (NP*)   Delete"
+.Ar n
+lines.
+.It "dl        str     (P*)    Delete line."
+.It "dm        str             Enter delete mode."
+.It "dN        num     (o)     Milliseconds of
+.Sy \&nl
+delay needed (default 0).
+.It "DO        str     (NP*)   Move cursor down:
+.Ar n
+lines.
+.It "do        str             Down one line."
+.It "ds        str             Disable status line."
+.It "dT        num     (o)     Milliseconds of horizontal tab delay needed (default 0)."
+.It "dV        num     (o)     Milliseconds of vertical tab delay needed (default 0)."
+.It "ec        str     (NP)    Erase"
+.Ar n
+characters.
+.It "ed        str             End delete mode."
+.It "ei        str             End insert mode."
+.It "eo        bool            Can erase overstrikes with a blank."
+.It "EP        bool    (o)     Even parity."
+.It "es        bool            Escape can be used on the status line."
+.It "ff        str     (P*)    Hardcopy terminal page eject."
+.It "fs        str             Return from status line."
+.It "gn        bool            Generic line type, for example dialup, switch)."
+.It "hc        bool            Hardcopy terminal."
+.It "HD        bool    (o)     Half-duplex."
+.It "hd        str             Half-line down (forward 1/2 linefeed)."
+.It "ho        str     (P)     Home cursor."
+.It "hs        bool            Has extra"
+.Dq status line .
+.It "hu        str             Half-line up (reverse 1/2 linefeed)."
+.It "hz        bool            Cannot print ``~'' (Hazeltine)."
+.It "i1-i3     str             Terminal initialization strings"
+.Pf ( Xr terminfo
+only)
+.It "IC        str     (NP*)   Insert"
+.Ar n
+blank characters.
+.It "ic        str     (P*)    Insert character."
+.It "if        str             Name of file containing initialization string."
+.It "im        str             Enter insert mode."
+.It "in        bool            Insert mode distinguishes nulls."
+.It "iP        str             Pathname of program for initialization"
+.Pf ( Xr terminfo
+only).
+.It "ip        str     (P*)    Insert pad after character inserted."
+.It "is        str             Terminal initialization string"
+.Pf ( Nm termcap
+only).
+.It "it        num             Tabs initially every"
+.Ar n
+positions.
+.It "K1        str             Sent by keypad upper left."
+.It "K2        str             Sent by keypad upper right."
+.It "K3        str             Sent by keypad center."
+.It "K4        str             Sent by keypad lower left."
+.It "K5        str             Sent by keypad lower right."
+.It "k0-k9     str             Sent by function keys 0-9."
+.It "kA        str             Sent by insert-line key."
+.It "ka        str             Sent by clear-all-tabs key."
+.It "kb        str             Sent by backspace key."
+.It "kC        str             Sent by clear-screen or erase key."
+.It "kD        str             Sent by delete-character key."
+.It "kd        str             Sent by down-arrow key."
+.It "kE        str             Sent by clear-to-end-of-line key."
+.It "ke        str             Out of"
+.Dq keypad transmit
+mode.
+.It "kF        str             Sent by scroll-forward/down key."
+.It "kH        str             Sent by home-down key."
+.It "kh        str             Sent by home key."
+.It "kI        str             Sent by insert-character or enter-insert-mode key."
+.It "kL        str             Sent by delete-line key."
+.It "kl        str             Sent by left-arrow key."
+.It "kM        str             Sent by insert key while in insert mode."
+.It "km        bool            Has a"
+.Dq meta
+key (shift, sets parity bit).
+.It "kN        str             Sent by next-page key."
+.It "kn        num     (o)     Number of function"
+.Pq Sy \&k\&0 Ns \- Sy \&k\&9
+keys (default 0).
+.It "ko        str     (o)     Termcap entries for other non-function keys."
+.It "kP        str             Sent by previous-page key."
+.It "kR        str             Sent by scroll-backward/up key."
+.It "kr        str             Sent by right-arrow key."
+.It "kS        str             Sent by clear-to-end-of-screen key."
+.It "ks        str             Put terminal in"
+.Dq keypad transmit
+mode.
+.It "kT        str             Sent by set-tab key."
+.It "kt        str             Sent by clear-tab key."
+.It "ku        str             Sent by up-arrow key."
+.It "l0-l9     str             Labels on function keys if not"
+.Dq \&f Ns Em n .
+.It "LC        bool    (o)     Lower-case only."
+.It "LE        str     (NP)    Move cursor left"
+.Ar n
+positions.
+.It "le        str     (P)     Move cursor left one position."
+.It "li        num             Number of lines on screen or page (See"
+.Sx BUGS
+section below)
+.It "ll        str             Last line, first column
+.It "lm        num             Lines of memory if >" Sy \&li
+(0 means varies).
+.It "ma        str     (o)     Arrow key map (used by"
+.Xr \&vi
+version 2 only).
+.It "mb        str             Turn on blinking attribute."
+.It "md        str             Turn on bold (extra bright) attribute."
+.It "me        str             Turn off all attributes."
+.It "mh        str             Turn on half-bright attribute."
+.It "mi        bool            Safe to move while in insert mode."
+.It "mk        str             Turn on blank attribute (characters invisible)."
+.It "ml        str     (o)     Memory lock on above cursor."
+.It "mm        str             Turn on"
+.Dq meta mode
+(8th bit).
+.It "mo        str             Turn off"
+.Dq meta mode .
+.It "mp        str             Turn on protected attribute."
+.It "mr        str             Turn on reverse-video attibute."
+.It "ms        bool            Safe to move in standout modes."
+.It "mu        str     (o)     Memory unlock (turn off memory lock)."
+.It "nc        bool    (o)     No correctly-working"
+.Sy \&cr
+(Datamedia 2500, Hazeltine 2000).
+.It "nd        str             Non-destructive space (cursor right)."
+.It "NL        bool    (o)" Ta Sy \&\en No "is newline, not line feed."
+.It "nl        str     (o)     Newline character if not" Sy \en .
+.It "ns        bool    (o)     Terminal is a" Tn CRT No "but doesn't scroll."
+.It "nw        str     (P)     Newline (behaves like"
+.Sy \&cr
+followed by
+.Sy \&do ).
+.It "OP        bool    (o)     Odd parity."
+.It "os        bool            Terminal overstrikes."
+.It "pb        num             Lowest baud where delays are required."
+.It "pc        str             Pad character (default" Tn NUL ).
+.It "pf        str             Turn off the printer."
+.It "pk        str             Program function key"
+.Em n
+to type string
+.Em s
+.Pf ( Xr terminfo
+only).
+.It "pl        str             Program function key"
+.Em n
+to execute string
+.Em s
+.Pf ( Xr terminfo
+only).
+.It "pO        str     (N)     Turn on the printer for"
+.Em n
+bytes.
+.It "po        str             Turn on the printer."
+.It "ps        str             Print contents of the screen."
+.It "pt        bool    (o)     Has hardware tabs (may need to be set with"
+.Sy \&is ).
+.It "px        str             Program function key"
+.Em n
+to transmit string
+.Em s
+.Pf ( Xr terminfo
+only).
+.It "r1-r3     str             Reset terminal completely to sane modes"
+.Pf ( Xr terminfo
+only).
+.It "rc        str     (P)     Restore cursor to position of last"
+.Sy \&sc .
+.It "rf        str             Name of file containing reset codes."
+.It "RI        str     (NP)    Move cursor right"
+.Em n
+positions.
+.It "rp        str     (NP*)   Repeat character"
+.Em c n
+times.
+.It "rs        str             Reset terminal completely to sane modes"
+.Pf ( Nm termcap
+only).
+.It "sa        str     (NP)    Define the video attributes."
+.It "sc        str     (P)     Save cursor position."
+.It "se        str             End standout mode."
+.It "SF        str     (NP*)   Scroll forward"
+.Em n
+lines.
+.It "sf        str     (P)     Scroll text up."
+.It "sg        num             Number of garbage chars left by"
+.Sy \&so
+or
+.Sy \&se
+(default 0).
+.It "so        str             Begin standout mode."
+.It "SR        str     (NP*)   Scroll backward"
+.Em n
+lines.
+.It "sr        str     (P)     Scroll text down."
+.It "st        str             Set a tab in all rows, current column."
+.It "ta        str     (P)     Tab to next 8-position hardware tab stop."
+.It "tc        str             Entry of similar terminal \- must be last."
+.It "te        str             String to end programs that use"
+.Nm termcap .
+.It "ti        str             String to begin programs that use"
+.Nm termcap .
+.It "ts        str     (N)     Go to status line, column"
+.Em n .
+.It "UC        bool    (o)     Upper-case only."
+.It "uc        str             Underscore one character and move past it."
+.It "ue        str             End underscore mode."
+.It "ug        num             Number of garbage chars left by"
+.Sy \&us
+or
+.Sy \&ue
+(default 0).
+.It "ul        bool            Underline character overstrikes."
+.It "UP        str     (NP*)   Move cursor up"
+.Em n
+lines.
+.It "up        str             Upline (cursor up)."
+.It "us        str             Start underscore mode."
+.It "vb        str             Visible bell (must not move cursor)."
+.It "ve        str             Make cursor appear normal (undo"
+.Sy \&vs Ns / Sy \&vi ) .
+.It "vi        str             Make cursor invisible."
+.It "vs        str             Make cursor very visible."
+.It "vt        num             Virtual terminal number (not supported on all systems)."
+.It "wi        str     (N)     Set current window."
+.It "ws        num             Number of columns in status line."
+.It "xb        bool            Beehive"
+.Pf ( "f1=" Dv ESC ,
+.Pf "f2=" Sy \&^C ) .
+.It "xn        bool            Newline ignored after 80 cols (Concept)."
+.It "xo        bool            Terminal uses xoff/xon"
+.Pq Dv DC3 Ns / Ns Dv DC1
+handshaking.
+.It "xr        bool    (o)     Return acts like"
+.Sy "ce cr nl"
+(Delta Data).
+.It "xs        bool            Standout not erased by overwriting (Hewlett-Packard)."
+.It "xt        bool            Tabs ruin, magic"
+.SY \&so
+char (Teleray 1061).
+.It "xx        bool    (o)     Tektronix 4025 insert-line."
+.El
+.Ss A Sample Entry
 The following entry, which describes the Concept\-100, is among the more
 complex entries in the
 The following entry, which describes the Concept\-100, is among the more
 complex entries in the
-.I termcap\^
+.Nm termcap
 file as of this writing.
 file as of this writing.
-.PP
-.nf
+.Pp
+.Bd -literal
 ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e
        :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e
        :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
 ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concept\-100:\e
        :al=3*\eE^R:am:bl=^G:cd=16*\eE^C:ce=16\eE^U:cl=2*^L:cm=\eEa%+ %+ :\e
        :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
@@ -314,20 +437,17 @@ ca\||\|concept100\||\|c100\||\|concept\||\|c104\||\|concept100-4p\||\|HDS Concep
        :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e
        :ve=\eEw:vs=\eEW:vt#8:xn:\e
        :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
        :vb=\eEk\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\e200\eEK:\e
        :ve=\eEw:vs=\eEW:vt#8:xn:\e
        :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
-.fi
-.PP
+.Ed
+.Pp
 Entries may continue onto multiple lines by giving a \e as the last
 character of a line, and empty fields
 may be included for readability (here between the last field on a line
 and the first field on the next).
 Entries may continue onto multiple lines by giving a \e as the last
 character of a line, and empty fields
 may be included for readability (here between the last field on a line
 and the first field on the next).
-Comments may be included on lines beginning with \*(lq#\*(rq.
-.br
-.ne 5
-.PP
-.B Types of Capabilities
-.PP
+Comments may be included on lines beginning with
+.Dq # .
+.Ss Types of Capabilities
 Capabilities in
 Capabilities in
-.I termcap\^
+.Nm termcap
 are of three types: Boolean capabilities,
 which indicate particular features that the terminal has;
 numeric capabilities,
 are of three types: Boolean capabilities,
 which indicate particular features that the terminal has;
 numeric capabilities,
@@ -338,523 +458,522 @@ terminal operations.
 All capabilities have two-letter codes.
 For instance, the fact that
 the Concept has
 All capabilities have two-letter codes.
 For instance, the fact that
 the Concept has
-.I automatic margins
-.RI ( i.e. ,
-an automatic return and linefeed
+.Em automatic margins
+(an automatic return and linefeed
 when the end of a line is reached) is indicated by the Boolean capability
 when the end of a line is reached) is indicated by the Boolean capability
-.BR am .
+.Sy \&am .
 Hence the description of the Concept includes
 Hence the description of the Concept includes
-.BR am .
-.PP
+.Sy \&am .
+.Pp
 Numeric capabilities are followed by the character `#' then the value.
 In the example above
 Numeric capabilities are followed by the character `#' then the value.
 In the example above
-.BR co ,
+.Sy \&co ,
 which indicates the number of columns the display has,
 gives the value `80' for the Concept.
 which indicates the number of columns the display has,
 gives the value `80' for the Concept.
-.PP
+.Pp
 Finally, string-valued capabilities, such as
 Finally, string-valued capabilities, such as
-.ce
+.Sy \&ce
 (clear-to-end-of-line
 sequence) are given by the two-letter code, an `=', then a string
 ending at the next following `:'.
 A delay in milliseconds may appear after
 the `=' in such a capability,
 which causes padding characters to be supplied by
 (clear-to-end-of-line
 sequence) are given by the two-letter code, an `=', then a string
 ending at the next following `:'.
 A delay in milliseconds may appear after
 the `=' in such a capability,
 which causes padding characters to be supplied by
-.I tputs\^
+.Xr tputs
 after the remainder of the string is sent to provide this delay.
 The delay can be either a number,
 after the remainder of the string is sent to provide this delay.
 The delay can be either a number,
-.I e.g.
-`20', or a number followed by
+such as `20', or a number followed by
 an `*',
 an `*',
-.IR i.e. ,
-`3*'.
+such as `3*'.
 An `*' indicates that the padding required is proportional
 to the number of lines affected by the operation, and the amount given is
 the per-affected-line padding required.
 (In the case of insert-character,
 the factor is still the number of
 An `*' indicates that the padding required is proportional
 to the number of lines affected by the operation, and the amount given is
 the per-affected-line padding required.
 (In the case of insert-character,
 the factor is still the number of
-.I lines\^
+.Em lines
 affected;
 this is always 1 unless the terminal has
 affected;
 this is always 1 unless the terminal has
-.in
+.Sy \&in
 and the software uses it.)
 When an `*' is specified, it is sometimes useful to give a delay of the form
 `3.5' to specify a delay per line to tenths of milliseconds.
 (Only one decimal place is allowed.)
 and the software uses it.)
 When an `*' is specified, it is sometimes useful to give a delay of the form
 `3.5' to specify a delay per line to tenths of milliseconds.
 (Only one decimal place is allowed.)
-.PP
+.Pp
 A number of escape sequences are provided in the string-valued capabilities
 for easy encoding of control characters there.
 A number of escape sequences are provided in the string-valued capabilities
 for easy encoding of control characters there.
-.B \eE
-maps to an \s-2ESC\s0
+.Sy \&\eE
+maps to an
+.Dv ESC
 character,
 character,
-.^X
+.Sy \&^X
 maps to a control-X for any appropriate X,
 and the sequences
 maps to a control-X for any appropriate X,
 and the sequences
-.\en
-.\er
-.\et
-.\eb
-.\ef
+.Sy \&\en
+.Sy \&\er
+.Sy \&\et
+.Sy \&\eb
+.Sy \&\ef
 map to linefeed, return, tab, backspace, and formfeed, respectively.
 Finally, characters may be given as three octal digits after a
 map to linefeed, return, tab, backspace, and formfeed, respectively.
 Finally, characters may be given as three octal digits after a
-.BR \e ,
+.Sy \&\e ,
 and the characters
 and the characters
-.^
+.Sy \&^
 and
 and
-.\e
+.Sy \&\e
 may be given as
 may be given as
-.\e^
+.Sy \&\e^
 and
 and
-.BR \e\e .
+.Sy \&\e\e .
 If it is necessary to place a
 If it is necessary to place a
-.:
+.Sy \&:
 in a capability it must be escaped in
 octal as
 in a capability it must be escaped in
 octal as
-.BR \e072 .
-If it is necessary to place a \s-2NUL\s0
+.Sy \&\e072 .
+If it is necessary to place a
+.Dv NUL
 character in a string capability it
 must be encoded as
 character in a string capability it
 must be encoded as
-.BR \e200 .
+.Sy \&\e200 .
 (The routines that deal with
 (The routines that deal with
-.I termcap\^
+.Nm termcap
 use C strings and strip the high bits of the output very late, so that
 a
 use C strings and strip the high bits of the output very late, so that
 a
-.\e200
+.Sy \&\e200
 comes out as a
 comes out as a
-.\e000
+.Sy \&\e000
 would.)
 would.)
-.PP
+.Pp
 Sometimes individual capabilities must be commented out.
 To do this, put a period before the capability name.
 For example, see the first
 Sometimes individual capabilities must be commented out.
 To do this, put a period before the capability name.
 For example, see the first
-.cr
+.Sy \&cr
 and
 and
-.ta
+.Sy \&ta
 in the example above.
 in the example above.
-.br
-.ne 5
-.PP
-.B Preparing Descriptions
-.PP
-We now outline how to prepare descriptions of terminals.
+.Ss Preparing Descriptions
 The most effective way to prepare a terminal description is by imitating
 the description of a similar terminal in
 The most effective way to prepare a terminal description is by imitating
 the description of a similar terminal in
-.I termcap\^
+.Nm termcap
 and to build up a description gradually, using partial descriptions
 with
 and to build up a description gradually, using partial descriptions
 with
-.I vi\^
+.Xr \&vi
 to check that they are correct.
 Be aware that a very unusual terminal may expose deficiencies in
 the ability of the
 to check that they are correct.
 Be aware that a very unusual terminal may expose deficiencies in
 the ability of the
-.I termcap\^
+.Nm termcap
 file to describe it
 or bugs in
 file to describe it
 or bugs in
-.IR vi\^ .
+.Xr \&vi .
 To easily test a new terminal description you are working on
 you can put it in your home directory in a file called
 To easily test a new terminal description you are working on
 you can put it in your home directory in a file called
-.I .termcap\^
+.Pa .termcap
 and programs will look there before looking in
 and programs will look there before looking in
-.IR /etc/termcap\^ .
+.Pa /usr/share/misc/termcap .
 You can also set the environment variable
 You can also set the environment variable
-.B
-.SM TERMPATH
+.Ev TERMPATH
 to a list of absolute file pathnames (separated by spaces or colons),
 one of which contains the description you are working on,
 and programs will search them in the order listed, and nowhere else.
 See
 to a list of absolute file pathnames (separated by spaces or colons),
 one of which contains the description you are working on,
 and programs will search them in the order listed, and nowhere else.
 See
-.IR termcap\^ (3X).
+.Xr termcap 3 .
 The
 The
-.B
-.SM TERMCAP
+.Ev TERMCAP
 environment variable is usually set to the
 environment variable is usually set to the
-.I termcap\^
+.Nm termcap
 entry itself
 to avoid reading files when starting up a program.
 entry itself
 to avoid reading files when starting up a program.
-.PP
+.Pp
 To get the padding for insert-line right
 (if the terminal manufacturer did not document it),
 a severe test is to use
 To get the padding for insert-line right
 (if the terminal manufacturer did not document it),
 a severe test is to use
-.I vi\^
+.Xr \&vi
 to edit
 to edit
-.I /etc/passwd\^
+.Pa /etc/passwd
 at 9600 baud, delete roughly 16 lines from the middle of the screen,
 then hit the `u' key several times quickly.
 If the display messes up, more padding is usually needed.
 A similar test can be used for insert-character.
 at 9600 baud, delete roughly 16 lines from the middle of the screen,
 then hit the `u' key several times quickly.
 If the display messes up, more padding is usually needed.
 A similar test can be used for insert-character.
-.br
-.ne 5
-.PP
-.B Basic Capabilities
-.PP
+.Ss Basic Capabilities
 The number of columns on each line of the display is given by the
 The number of columns on each line of the display is given by the
-.co
+.Sy \&co
 numeric capability.
 numeric capability.
-If the display is a \s-1CRT\s0, then the
+If the display is a
+.Tn CRT ,
+then the
 number of lines on the screen is given by the
 number of lines on the screen is given by the
-.li
+.Sy \&li
 capability.
 If the display wraps around to the beginning of the next line when
 the cursor reaches the right margin, then it should have the
 capability.
 If the display wraps around to the beginning of the next line when
 the cursor reaches the right margin, then it should have the
-.am
+.Sy \&am
 capability.
 If the terminal can clear its screen,
 the code to do this is given by the
 capability.
 If the terminal can clear its screen,
 the code to do this is given by the
-.cl
+.Sy \&cl
 string capability.
 If the terminal overstrikes
 (rather than clearing the position when a character is overwritten),
 it should have the
 string capability.
 If the terminal overstrikes
 (rather than clearing the position when a character is overwritten),
 it should have the
-.os
+.Sy \&os
 capability.
 If the terminal is a printing terminal,
 with no soft copy unit,
 give it both
 capability.
 If the terminal is a printing terminal,
 with no soft copy unit,
 give it both
-.hc
+.Sy \&hc
 and
 and
-.BR os .
-.RB ( os
+.Sy \&os .
+.Pf ( Sy \&os
 applies to storage scope terminals,
 such as the Tektronix 4010 series,
 as well as to hard copy and
 applies to storage scope terminals,
 such as the Tektronix 4010 series,
 as well as to hard copy and
-.SM APL
+.Tn APL
 terminals.)
 If there is a code to move the cursor to the left edge of the current row,
 give this as
 terminals.)
 If there is a code to move the cursor to the left edge of the current row,
 give this as
-.BR cr .
+.Sy \&cr .
 (Normally this will be carriage-return,
 (Normally this will be carriage-return,
-.BR ^M .)
+.Sy \&^M . )
 If there is a code to produce an audible signal (bell, beep,
 If there is a code to produce an audible signal (bell, beep,
-.IR etc.\^ ),
+etc. ) ,
 give this as
 give this as
-.BR bl .
-.PP
+.Sy \&bl .
+.Pp
 If there is a code (such as backspace)
 to move the cursor one position to the left,
 that capability should be given as
 If there is a code (such as backspace)
 to move the cursor one position to the left,
 that capability should be given as
-.BR le .
+.Sy \&le .
 Similarly,
 codes to move to the right, up, and down
 should be given as
 Similarly,
 codes to move to the right, up, and down
 should be given as
-.BR nd ,
-.BR up ,
+.Sy \&nd ,
+.Sy \&up ,
 and
 and
-.BR do ,
+.Sy \&do ,
 respectively.
 These
 respectively.
 These
-.I local cursor motions\^
+.Em local cursor motions
 should not alter the text they pass over;
 for example, you would not normally use
 should not alter the text they pass over;
 for example, you would not normally use
-\*(lqnd=\ \*(rq
+.Dq nd=\ \&
 unless the terminal has the
 unless the terminal has the
-.os
+.Sy \&os
 capability,
 because the space would erase the character moved over.
 capability,
 because the space would erase the character moved over.
-.PP
+.Pp
 A very important point here is that the local cursor motions encoded
 in
 A very important point here is that the local cursor motions encoded
 in
-.I termcap\^
+.Nm termcap
 have undefined behavior at the left and top edges of a
 have undefined behavior at the left and top edges of a
-.SM CRT
+.Tn CRT
 display.
 Programs should never attempt to backspace around the left edge,
 unless
 display.
 Programs should never attempt to backspace around the left edge,
 unless
-.bw
+.Sy \&bw
 is given, and never attempt to go up off the top
 using local cursor motions.
 is given, and never attempt to go up off the top
 using local cursor motions.
-.PP
+.Pp
 In order to scroll text up,
 a program goes to the bottom left corner of the screen and sends the
 In order to scroll text up,
 a program goes to the bottom left corner of the screen and sends the
-.sf
+.Sy \&sf
 (index) string.
 To scroll text down,
 a program goes to the top left corner of the screen and sends the
 (index) string.
 To scroll text down,
 a program goes to the top left corner of the screen and sends the
-.sr
+.Sy \&sr
 (reverse index) string.
 The strings
 (reverse index) string.
 The strings
-.sf
+.Sy \&sf
 and
 and
-.sr
+.Sy \&sr
 have undefined behavior
 when not on their respective corners of the screen.
 Parameterized versions of the scrolling sequences are
 have undefined behavior
 when not on their respective corners of the screen.
 Parameterized versions of the scrolling sequences are
-.SF
+.Sy \&SF
 and
 and
-.BR SR ,
+.Sy \&SR ,
 which have the same semantics as
 which have the same semantics as
-.sf
+.Sy \&sf
 and
 and
-.sr
+.Sy \&sr
 except that they take one parameter
 and scroll that many lines.
 They also have undefined behavior
 except at the appropriate corner of the screen.
 except that they take one parameter
 and scroll that many lines.
 They also have undefined behavior
 except at the appropriate corner of the screen.
-.PP
+.Pp
 The
 The
-.am
+.Sy \&am
 capability tells whether the cursor sticks at the right
 edge of the screen when text is output there,
 but this does not necessarily apply to
 capability tells whether the cursor sticks at the right
 edge of the screen when text is output there,
 but this does not necessarily apply to
-.nd
+.Sy \&nd
 from the last column.
 Leftward local motion is defined from the left edge only when
 from the last column.
 Leftward local motion is defined from the left edge only when
-.bw
+.Sy \&bw
 is given; then an
 is given; then an
-.le
+.Sy \&le
 from the left edge will move to the right edge of the previous row.
 This is useful for drawing a box around the edge of the screen,
 for example.
 If the terminal has switch-selectable automatic margins,
 the
 from the left edge will move to the right edge of the previous row.
 This is useful for drawing a box around the edge of the screen,
 for example.
 If the terminal has switch-selectable automatic margins,
 the
-.I termcap\^
+.Nm termcap
 description usually assumes that this feature is on,
 description usually assumes that this feature is on,
-.IR i.e. ,
-.BR am .
+.Em i.e . ,
+.Sy \&am .
 If the terminal has a command
 that moves to the first column of the next line,
 that command can be given as
 If the terminal has a command
 that moves to the first column of the next line,
 that command can be given as
-.nw
+.Sy \&nw
 (newline).
 It is permissible for this to clear the remainder of the current line,
 (newline).
 It is permissible for this to clear the remainder of the current line,
-so if the terminal has no correctly-working \s-2CR\s0 and \s-2LF\s0
+so if the terminal has no correctly-working
+.Tn \&CR
+and
+.Tn \&LF
 it may still be possible to craft a working
 it may still be possible to craft a working
-.nw
+.Sy \&nw
 out of one or both of them.
 out of one or both of them.
-.PP
-These capabilities suffice to describe hardcopy and \*(lqglass-tty\*(rq terminals.
+.Pp
+These capabilities suffice to describe hardcopy and
+.Dq glass-tty
+terminals.
 Thus the Teletype model 33 is described as
 Thus the Teletype model 33 is described as
-.PP
-.nf
-       T3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e
-               :bl=^G:co#72:cr=^M:do=^J:hc:os:
-.fi
-.PP
-and the Lear Siegler \s-1ADM\s0\-3 is described as
-.PP
-.nf
-       l3\||\|adm3\||\|3\||\|LSI \s-1ADM\s0-3:\e
-               :am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
-.fi
-.br
-.ne 5
-.PP
-.B Parameterized Strings
-.PP
+.Bd -literal -offset indent
+T3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e
+       :bl=^G:co#72:cr=^M:do=^J:hc:os:
+.Ed
+.Pp
+and the Lear Siegler
+.Tn ADM Ns \-3
+is described as
+.Bd -literal -offset indent
+l3\||\|adm3\||\|3\||\|LSI \s-1ADM\s0-3:\e
+:am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
+.Ed
+.Ss Parameterized Strings
 Cursor addressing and other strings requiring parameters
 are described by a
 Cursor addressing and other strings requiring parameters
 are described by a
-parameterized string capability, with 
-.IR printf\^ (3S)-like
+parameterized string capability, with
+.Xr printf 3 Ns \-like
 escapes
 escapes
-.%x
+.Sy \&%x
 in it,
 while other characters are passed through unchanged.
 For example, to address the cursor the
 in it,
 while other characters are passed through unchanged.
 For example, to address the cursor the
-.cm
+.Sy \&cm
 capability is given, using two parameters: the row and column to move to.
 (Rows and columns are numbered from zero and refer to the physical screen
 visible to the user, not to any unseen memory.
 If the terminal has memory-relative cursor addressing,
 that can be indicated by an analogous
 capability is given, using two parameters: the row and column to move to.
 (Rows and columns are numbered from zero and refer to the physical screen
 visible to the user, not to any unseen memory.
 If the terminal has memory-relative cursor addressing,
 that can be indicated by an analogous
-.CM
+.Sy \&CM
 capability.)
 capability.)
-.PP
+.Pp
 The
 The
-.%
+.Sy \&%
 encodings have the following meanings:
 encodings have the following meanings:
-.PP
-.DT
-.nf
-       %%      output `%'
-       %d      output value as in \fIprintf\^\fP %d
-       %2      output value as in \fIprintf\^\fP %2d
-       %3      output value as in \fIprintf\^\fP %3d
-       %.      output value as in \fIprintf\^\fP %c
-       %+\fIx\fP       add \fIx\^\fP to value, then do %.
-       %>\fIxy\fP      if value > \fIx\^\fP then add \fIy\^\fP, no output
-       %r      reverse order of two parameters, no output
-       %i      increment by one, no output
-       %n      exclusive-or all parameters with 0140 (Datamedia 2500)
-       %B      BCD (16*(value/10)) + (value%10), no output
-       %D      Reverse coding (value \- 2*(value%16)), no output (Delta Data)
-.fi
-.PP
+.Bl -column xxxxx
+.It "%%        output `%'"
+.It "%d        output value as in"
+.Xr printf
+%d
+.It "%2        output value as in"
+.Xr printf
+%2d
+.It "%3        output value as in"
+.Xr printf
+%3d
+.It "%.        output value as in"
+.Xr printf
+%c
+.It "%+" Ns Em x Ta No add
+.Em x
+to value, then do %.
+.It "%>" Ns Em \&xy Ta No if
+value >
+.Em x
+then add
+.Em y ,
+no output
+.It "%r        reverse order of two parameters, no output"
+.It "%i        increment by one, no output"
+.It "%n        exclusive-or all parameters with 0140 (Datamedia 2500)"
+.It "%B" Ta Tn BCD No "(16*(value/10)) + (value%10), no output"
+.It "%D        Reverse coding (value \- 2*(value%16)), no output (Delta Data)."
+.El
+.Pp
 Consider the Hewlett-Packard 2645, which, to get to row 3 and column 12, needs
 Consider the Hewlett-Packard 2645, which, to get to row 3 and column 12, needs
-to be sent \*(lq\eE&a12c03Y\*(rq padded for 6 milliseconds.
+to be sent
+.Dq \eE&a12c03Y
+padded for 6 milliseconds.
 Note that the order
 of the row and column coordinates is reversed here
 and that the row and column
 are sent as two-digit integers.
 Thus its
 Note that the order
 of the row and column coordinates is reversed here
 and that the row and column
 are sent as two-digit integers.
 Thus its
-.B cm
-capability is \*(lqcm=6\eE&%r%2c%2Y\*(rq.
-.PP
+.Sy \&cm
+capability is
+.Dq Li cm=6\eE&%r%2c%2Y .
+.Pp
 The Datamedia 2500 needs the current row and column sent
 The Datamedia 2500 needs the current row and column sent
-encoded in binary using \*(lq%.\*(rq.
-Terminals that use \*(lq%.\*(rq need to be able to
+encoded in binary using
+.Dq \&%. .
+Terminals that use
+.Dq \&%.
+need to be able to
 backspace the cursor
 backspace the cursor
-.RB ( le )
+.Po Sy \&le Pc
 and to move the cursor up one line on the screen
 and to move the cursor up one line on the screen
-.RB ( up ).
+.Po Sy \&up Pc .
 This is necessary because it is not always safe to transmit
 This is necessary because it is not always safe to transmit
-.BR \en ,
-.BR ^D ,
+.Sy \&\en ,
+.Sy \&^D ,
 and
 and
-.BR \er ,
+.Sy \&\er ,
 as the system may change or discard them.
 (Programs using
 as the system may change or discard them.
 (Programs using
-.I termcap\^
+.Nm termcap
 must set terminal modes so that tabs are not expanded, so
 must set terminal modes so that tabs are not expanded, so
-.\et
+.Sy \&\et
 is safe to send.
 This turns out to be essential for the Ann Arbor 4080.)
 is safe to send.
 This turns out to be essential for the Ann Arbor 4080.)
-.PP
-A final example is the Lear Siegler \s-1ADM\s0\-3a,
+.Pp
+A final example is the Lear Siegler
+.Tn ADM Ns \-3a,
 which offsets row and column
 which offsets row and column
-by a blank character, thus \*(lqcm=\eE=%+ %+ \*(rq.
-.PP
+by a blank character, thus
+.Dq Li cm=\eE=%+ %+\ \& .
+.Pp
 Row or column absolute cursor addressing
 can be given as single parameter capabilities
 Row or column absolute cursor addressing
 can be given as single parameter capabilities
-.ch
+.Sy \&ch
 (horizontal position absolute) and
 (horizontal position absolute) and
-.cv
+.Sy \&cv
 (vertical position absolute).
 Sometimes these are shorter than the more general two-parameter sequence
 (as with the Hewlett-Packard 2645) and can be used in preference to
 (vertical position absolute).
 Sometimes these are shorter than the more general two-parameter sequence
 (as with the Hewlett-Packard 2645) and can be used in preference to
-.BR cm .
+.Sy \&cm .
 If there are parameterized local motions
 If there are parameterized local motions
-.RI ( e.g. ,
+.Pf ( Em e.g . ,
 move
 move
-.I n\^
+.Ar n
 positions to the right)
 these can be given as
 positions to the right)
 these can be given as
-.BR DO ,
-.BR LE ,
-.BR RI ,
+.Sy \&DO ,
+.Sy \&LE ,
+.Sy \&RI ,
 and
 and
-.UP
+.Sy \&UP
 with a single parameter indicating how many positions to move.
 These are primarily useful if the terminal does not have
 with a single parameter indicating how many positions to move.
 These are primarily useful if the terminal does not have
-.BR cm ,
+.Sy \&cm ,
 such as the Tektronix 4025.
 such as the Tektronix 4025.
-.br
-.ne 5
-.PP
-.B Cursor Motions
-.PP
+.Ss Cursor Motions
+.Pp
 If the terminal has a fast way to home the cursor
 (to the very upper left corner of the screen), this can be given as
 If the terminal has a fast way to home the cursor
 (to the very upper left corner of the screen), this can be given as
-.BR ho .
+.Sy \&ho .
 Similarly, a fast way of getting to the lower left-hand corner
 can be given as
 Similarly, a fast way of getting to the lower left-hand corner
 can be given as
-.BR ll ;
+.Sy \&ll ;
 this may involve going up with
 this may involve going up with
-.up
+.Sy \&up
 from the home position,
 but a program should never do this itself (unless
 from the home position,
 but a program should never do this itself (unless
-.ll
+.Sy \&ll
 does), because it can
 make no assumption about the effect of moving up from the home position.
 Note that the home position is the same as
 cursor address (0,0): to the top left corner of the screen, not of memory.
 does), because it can
 make no assumption about the effect of moving up from the home position.
 Note that the home position is the same as
 cursor address (0,0): to the top left corner of the screen, not of memory.
-(Therefore, the \*(lq\eEH\*(rq sequence on Hewlett-Packard terminals
+(Therefore, the
+.Dq \eEH
+sequence on Hewlett-Packard terminals
 cannot be used for
 cannot be used for
-.BR ho .)
-.br
-.ne 5
-.PP
-.B Area Clears
-.PP
+.Sy \&ho . )
+.Ss Area Clears
 If the terminal can clear from the current position to the end of the
 line, leaving the cursor where it is, this should be given as
 If the terminal can clear from the current position to the end of the
 line, leaving the cursor where it is, this should be given as
-.BR ce .
+.Sy \&ce .
 If the terminal can clear from the current position to the end of the
 display, this should be given as
 If the terminal can clear from the current position to the end of the
 display, this should be given as
-.BR cd .
-.cd
+.Sy \&cd .
+.Sy \&cd
 must only be invoked from the first column of a line.
 (Therefore,
 it can be simulated by a request to delete a large number of lines,
 if a true
 must only be invoked from the first column of a line.
 (Therefore,
 it can be simulated by a request to delete a large number of lines,
 if a true
-.cd
+.Sy \&cd
 is not available.)
 is not available.)
-.br
-.ne 5
-.PP
-.B Insert/Delete Line
-.PP
+.Ss Insert/Delete Line
 If the terminal can open a new blank line
 before the line containing the cursor,
 this should be given as
 If the terminal can open a new blank line
 before the line containing the cursor,
 this should be given as
-.BR al ;
+.Sy \&al ;
 this must be invoked only from the first
 position of a line.
 The cursor must then appear at the left of the newly blank line.
 If the terminal can delete the line that the cursor is on, this
 should be given as
 this must be invoked only from the first
 position of a line.
 The cursor must then appear at the left of the newly blank line.
 If the terminal can delete the line that the cursor is on, this
 should be given as
-.BR dl ;
+.Sy \&dl ;
 this must only be used from the first position on
 the line to be deleted.
 Versions of
 this must only be used from the first position on
 the line to be deleted.
 Versions of
-.al
+.Sy \&al
 and
 and
-.dl
+.Sy \&dl
 which take a single parameter
 and insert or delete that many lines
 can be given as
 which take a single parameter
 and insert or delete that many lines
 can be given as
-.AL
+.Sy \&AL
 and
 and
-.BR DL .
+.Sy \&DL .
 If the terminal has a settable scrolling region
 (like the VT100),
 the command to set this can be described with the
 If the terminal has a settable scrolling region
 (like the VT100),
 the command to set this can be described with the
-.cs
+.Sy \&cs
 capability,
 which takes two parameters: the top and bottom lines of the scrolling region.
 The cursor position is, alas, undefined after using this command.
 It is possible to get the effect of insert or delete line
 using this command \(em the
 capability,
 which takes two parameters: the top and bottom lines of the scrolling region.
 The cursor position is, alas, undefined after using this command.
 It is possible to get the effect of insert or delete line
 using this command \(em the
-.sc
+.Sy \&sc
 and
 and
-.rc
+.Sy \&rc
 (save and restore cursor) commands are also useful.
 Inserting lines at the top or bottom of the screen can also be done using
 (save and restore cursor) commands are also useful.
 Inserting lines at the top or bottom of the screen can also be done using
-.sr
+.Sy \&sr
 or
 or
-.sf
+.Sy \&sf
 on many terminals without a true insert/delete line,
 and is often faster even on terminals with those features.
 on many terminals without a true insert/delete line,
 and is often faster even on terminals with those features.
-.PP
+.Pp
 If the terminal has the ability to define a window as part of memory
 which all commands affect, it should be given as the parameterized string
 If the terminal has the ability to define a window as part of memory
 which all commands affect, it should be given as the parameterized string
-.BR wi .
+.Sy \&wi .
 The four parameters are the starting and ending lines in memory
 and the starting and ending columns in memory, in that order.
 (This
 The four parameters are the starting and ending lines in memory
 and the starting and ending columns in memory, in that order.
 (This
-.I terminfo\^
+.Xr terminfo
 capability is described for completeness.
 It is unlikely that any
 capability is described for completeness.
 It is unlikely that any
-.IR termcap\^ -using
+.Nm termcap Ns \- using
 program will support it.)
 program will support it.)
-.PP
+.Pp
 If the terminal can retain display memory above the screen, then the
 If the terminal can retain display memory above the screen, then the
-.da
+.Sy \&da
 capability should be given;
 if display memory can be retained
 below, then
 capability should be given;
 if display memory can be retained
 below, then
-.db
+.Sy \&db
 should be given.
 These indicate
 that deleting a line or scrolling may bring non-blank lines up from below
 or that scrolling back with
 should be given.
 These indicate
 that deleting a line or scrolling may bring non-blank lines up from below
 or that scrolling back with
-.sr
+.Sy \&sr
 may bring down non-blank lines.
 may bring down non-blank lines.
-.br
-.ne 5
-.PP
-.B Insert/Delete Character
-.PP
+.Ss Insert/Delete Character
 There are two basic kinds of intelligent terminals with respect to
 insert/delete character that can be described using
 There are two basic kinds of intelligent terminals with respect to
 insert/delete character that can be described using
-.IR termcap\^ .
+.Nm termcap .
 The most common insert/delete character operations affect only the characters
 on the current line and shift characters off the end of the line rigidly.
 Other terminals, such as the Concept\-100 and the Perkin Elmer Owl, make
 The most common insert/delete character operations affect only the characters
 on the current line and shift characters off the end of the line rigidly.
 Other terminals, such as the Concept\-100 and the Perkin Elmer Owl, make
@@ -864,199 +983,213 @@ either eliminated or expanded to two untyped blanks.
 You can determine
 the kind of terminal you have by clearing the screen then typing
 text separated by cursor motions.
 You can determine
 the kind of terminal you have by clearing the screen then typing
 text separated by cursor motions.
-Type \*(lqabc\ \ \ \ def\*(rq using local
-cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
-Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
+Type
+.Dq Li abc\ \ \ \ def
+using local
+cursor motions (not spaces) between the
+.Dq abc
+and the
+.Dq def .
+Then position the cursor before the
+.Dq abc
+and put the terminal in insert
 mode.
 If typing characters causes the rest of the line to shift
 rigidly and characters to fall off the end, then your terminal does
 not distinguish between blanks and untyped positions.
 mode.
 If typing characters causes the rest of the line to shift
 rigidly and characters to fall off the end, then your terminal does
 not distinguish between blanks and untyped positions.
-If the \*(lqabc\*(rq
-shifts over to the \*(lqdef\*(rq which then move together around the end of the
+If the
+.Dq abc
+shifts over to the
+.Dq def
+which then move together around the end of the
 current line and onto the next as you insert, then you have the second type of
 current line and onto the next as you insert, then you have the second type of
-terminal and should give the capability \fBin\fP, which stands for
-\*(lqinsert null\*(rq.
+terminal and should give the capability
+.Sy \&in ,
+which stands for
+.Dq insert null .
 While these are two logically separate attributes
 (one line
 While these are two logically separate attributes
 (one line
-.I vs.
+.Em \&vs .
 multi-line insert mode,
 and special treatment of untyped spaces),
 we have seen no terminals whose insert
 mode cannot be described with the single attribute.
 multi-line insert mode,
 and special treatment of untyped spaces),
 we have seen no terminals whose insert
 mode cannot be described with the single attribute.
-.PP
-.I Termcap\^
+.Pp
+.Nm Termcap
 can describe both terminals that have an insert mode and terminals
 that send a simple sequence to open a blank position on the current line.
 Give as
 can describe both terminals that have an insert mode and terminals
 that send a simple sequence to open a blank position on the current line.
 Give as
-.im
+.Sy \&im
 the sequence to get into insert mode.
 Give as
 the sequence to get into insert mode.
 Give as
-.ei
+.Sy \&ei
 the sequence to leave insert mode.
 Now give as
 the sequence to leave insert mode.
 Now give as
-.ic
+.Sy \&ic
 any sequence that needs to be sent just before
 each character to be inserted.
 Most terminals with a true insert mode
 will not give
 any sequence that needs to be sent just before
 each character to be inserted.
 Most terminals with a true insert mode
 will not give
-.BR ic ;
+.Sy \&ic ;
 terminals that use a sequence to open a screen
 position should give it here.
 (If your terminal has both,
 insert mode is usually preferable to
 terminals that use a sequence to open a screen
 position should give it here.
 (If your terminal has both,
 insert mode is usually preferable to
-.BR ic .
+.Sy \&ic .
 Do not give both unless the terminal actually requires both to be used
 in combination.)
 If post-insert padding is needed, give this as a number of milliseconds
 in
 Do not give both unless the terminal actually requires both to be used
 in combination.)
 If post-insert padding is needed, give this as a number of milliseconds
 in
-.ip
+.Sy \&ip
 (a string option).
 Any other sequence that may need to be
 sent after insertion of a single character can also be given in
 (a string option).
 Any other sequence that may need to be
 sent after insertion of a single character can also be given in
-.BR ip .
+.Sy \&ip .
 If your terminal needs to be placed into an `insert mode'
 and needs a special code preceding each inserted character,
 then both
 If your terminal needs to be placed into an `insert mode'
 and needs a special code preceding each inserted character,
 then both
-.BR im / ei
+.Sy \&im Ns / Sy \&ei
 and
 and
-.ic
+.Sy \&ic
 can be given, and both will be used.
 The
 can be given, and both will be used.
 The
-.IC
+.Sy \&IC
 capability, with one parameter
 capability, with one parameter
-.IR n\^ ,
+.Em n ,
 will repeat the effects of
 will repeat the effects of
-.ic
-.I n\^
+.Sy \&ic
+.Em n
 times.
 times.
-.PP
+.Pp
 It is occasionally necessary to move around while in insert mode
 to delete characters on the same line
 It is occasionally necessary to move around while in insert mode
 to delete characters on the same line
-.RI ( e.g. ,
+.Pf ( Em e.g . ,
 if there is a tab after
 the insertion position).
 If your terminal allows motion while in
 insert mode, you can give the capability
 if there is a tab after
 the insertion position).
 If your terminal allows motion while in
 insert mode, you can give the capability
-.mi
+.Sy \&mi
 to speed up inserting
 in this case.
 Omitting
 to speed up inserting
 in this case.
 Omitting
-.mi
+.Sy \&mi
 will affect only speed.
 Some terminals
 (notably Datamedia's) must not have
 will affect only speed.
 Some terminals
 (notably Datamedia's) must not have
-.mi
+.Sy \&mi
 because of the way their
 insert mode works.
 because of the way their
 insert mode works.
-.PP
+.Pp
 Finally, you can specify
 Finally, you can specify
-.dc
+.Sy \&dc
 to delete a single character,
 to delete a single character,
-.DC
+.Sy \&DC
 with one parameter
 with one parameter
-.I n\^
+.Em n
 to delete
 to delete
-.I n\^
+.Em n
 characters,
 and delete mode by giving
 characters,
 and delete mode by giving
-.dm
+.Sy \&dm
 and
 and
-.ed
+.Sy \&ed
 to enter and exit delete mode
 (which is any mode the terminal needs to be placed in for
 to enter and exit delete mode
 (which is any mode the terminal needs to be placed in for
-.dc
+.Sy \&dc
 to work).
 to work).
-.br
-.ne 5
-.PP
-.B Highlighting, Underlining, and Visible Bells
-.PP
+.Ss Highlighting, Underlining, and Visible  Bells
 If your terminal has one or more kinds of display attributes,
 these can be represented in a number of different ways.
 You should choose one display form as
 If your terminal has one or more kinds of display attributes,
 these can be represented in a number of different ways.
 You should choose one display form as
-.IR "standout mode" ,
+.Em standout mode ,
 representing a good high-contrast, easy-on-the-eyes format
 for highlighting error messages and other attention getters.
 (If you have a choice, reverse video plus half-bright is good,
 or reverse video alone.)
 The sequences to enter and exit standout mode
 are given as
 representing a good high-contrast, easy-on-the-eyes format
 for highlighting error messages and other attention getters.
 (If you have a choice, reverse video plus half-bright is good,
 or reverse video alone.)
 The sequences to enter and exit standout mode
 are given as
-.so
+.Sy \&so
 and
 and
-.BR se ,
+.Sy \&se ,
 respectively.
 If the code to change into or out of standout
 mode leaves one or even two blank spaces or garbage characters on the screen,
 respectively.
 If the code to change into or out of standout
 mode leaves one or even two blank spaces or garbage characters on the screen,
-as the TVI 912 and Teleray 1061 do,
+as the
+.Tn TVI
+912 and Teleray 1061 do,
 then
 then
-.sg
+.Sy \&sg
 should be given to tell how many characters are left.
 should be given to tell how many characters are left.
-.PP
+.Pp
 Codes to begin underlining and end underlining can be given as
 Codes to begin underlining and end underlining can be given as
-.us
+.Sy \&us
 and
 and
-.BR ue ,
+.Sy \&ue ,
 respectively.
 Underline mode change garbage is specified by
 respectively.
 Underline mode change garbage is specified by
-.BR ug ,
+.Sy \&ug ,
 similar to
 similar to
-.BR sg .
+.Sy \&sg .
 If the terminal has a code to underline the current character and move
 If the terminal has a code to underline the current character and move
-the cursor one position to the right, 
+the cursor one position to the right,
 such as the Microterm Mime,
 this can be given as
 such as the Microterm Mime,
 this can be given as
-.BR uc .
-.PP
+.Sy \&uc .
+.Pp
 Other capabilities to enter various highlighting modes include
 Other capabilities to enter various highlighting modes include
-.mb
+.Sy \&mb
 (blinking),
 (blinking),
-.md
+.Sy \&md
 (bold or extra bright),
 (bold or extra bright),
-.mh
+.Sy \&mh
 (dim or half-bright),
 (dim or half-bright),
-.mk
+.Sy \&mk
 (blanking or invisible text),
 (blanking or invisible text),
-.mp
+.Sy \&mp
 (protected),
 (protected),
-.mr
+.Sy \&mr
 (reverse video),
 (reverse video),
-.me
+.Sy \&me
 (turn off
 (turn off
-.I all
+.Em all
 attribute modes),
 attribute modes),
-.as
+.Sy \&as
 (enter alternate character set mode), and
 (enter alternate character set mode), and
-.ae
+.Sy \&ae
 (exit alternate character set mode).
 Turning on any of these modes singly may or may not turn off other modes.
 (exit alternate character set mode).
 Turning on any of these modes singly may or may not turn off other modes.
-.PP
+.Pp
 If there is a sequence to set arbitrary combinations of mode,
 this should be given as
 If there is a sequence to set arbitrary combinations of mode,
 this should be given as
-.sa
+.Sy \&sa
 (set attributes), taking 9 parameters.
 Each parameter is either 0 or 1,
 as the corresponding attributes is on or off.
 The 9 parameters are, in order: standout, underline, reverse, blink,
 dim, bold, blank, protect, and alternate character set.
 Not all modes need be supported by
 (set attributes), taking 9 parameters.
 Each parameter is either 0 or 1,
 as the corresponding attributes is on or off.
 The 9 parameters are, in order: standout, underline, reverse, blink,
 dim, bold, blank, protect, and alternate character set.
 Not all modes need be supported by
-.BR sa ,
+.Sy \&sa ,
 only those for which corresponding attribute commands exist.
 (It is unlikely that a
 only those for which corresponding attribute commands exist.
 (It is unlikely that a
-.IR termcap\^ -using
+.Nm termcap Ns \-using
 program will support this capability, which is defined for compatibility
 with
 program will support this capability, which is defined for compatibility
 with
-.IR terminfo\^ .)
-.PP
-Terminals with the \*(lqmagic cookie\*(rq glitches
-.RB ( sg
+.Xr terminfo . )
+.Pp
+Terminals with the
+.Dq magic cookie
+glitches
+.Pf ( Sy \&sg
 and
 and
-.BR ug ),
+.Sy \&ug ) ,
 rather than maintaining extra attribute bits for each character cell,
 rather than maintaining extra attribute bits for each character cell,
-instead deposit special \*(lqcookies\*(rq,
-or \*(lqgarbage characters\*(rq,
+instead deposit special
+.Dq cookies ,
+or
+.Dq garbage characters ,,
 when they receive mode-setting sequences,
 which affect the display algorithm.
 when they receive mode-setting sequences,
 which affect the display algorithm.
-.PP
+.Pp
 Some terminals,
 such as the Hewlett-Packard 2621,
 automatically leave standout
 Some terminals,
 such as the Hewlett-Packard 2621,
 automatically leave standout
@@ -1066,43 +1199,39 @@ should exit standout mode on such terminals
 before moving the cursor or sending a newline.
 On terminals where this is not a problem,
 the
 before moving the cursor or sending a newline.
 On terminals where this is not a problem,
 the
-.ms
+.Sy \&ms
 capability should be present
 to say that this overhead is unnecessary.
 capability should be present
 to say that this overhead is unnecessary.
-.PP
+.Pp
 If the terminal has
 a way of flashing the screen to indicate an error quietly
 (a bell replacement),
 this can be given as
 If the terminal has
 a way of flashing the screen to indicate an error quietly
 (a bell replacement),
 this can be given as
-.BR vb ;
+.Sy \&vb ;
 it must not move the cursor.
 it must not move the cursor.
-.PP
+.Pp
 If the cursor needs to be made more visible than normal
 when it is not on the bottom line
 (to change, for example, a non-blinking underline into an easier-to-find
 block or blinking underline),
 give this sequence as
 If the cursor needs to be made more visible than normal
 when it is not on the bottom line
 (to change, for example, a non-blinking underline into an easier-to-find
 block or blinking underline),
 give this sequence as
-.BR vs .
+.Sy \&vs .
 If there is a way to make the cursor completely invisible, give that as
 If there is a way to make the cursor completely invisible, give that as
-.BR vi .
+.Sy \&vi .
 The capability
 The capability
-.BR ve ,
+.Sy \&ve ,
 which undoes the effects of both of these modes,
 should also be given.
 which undoes the effects of both of these modes,
 should also be given.
-.PP
+.Pp
 If your terminal correctly displays underlined characters
 (with no special codes needed)
 even though it does not overstrike,
 then you should give the capability
 If your terminal correctly displays underlined characters
 (with no special codes needed)
 even though it does not overstrike,
 then you should give the capability
-.BR ul .
+.Sy \&ul .
 If overstrikes are erasable with a blank,
 this should be indicated by giving
 If overstrikes are erasable with a blank,
 this should be indicated by giving
-.BR eo .
-.br
-.ne 5
-.PP
-.B Keypad
-.PP
+.Sy \&eo .
+.Ss Keypad
 If the terminal has a keypad that transmits codes when the keys are pressed,
 this information can be given.
 Note that it is not possible to handle
 If the terminal has a keypad that transmits codes when the keys are pressed,
 this information can be given.
 Note that it is not possible to handle
@@ -1110,130 +1239,131 @@ terminals where the keypad only works in local mode
 (this applies, for example, to the unshifted Hewlett-Packard 2621 keys).
 If the keypad can be set to transmit or not transmit,
 give these codes as
 (this applies, for example, to the unshifted Hewlett-Packard 2621 keys).
 If the keypad can be set to transmit or not transmit,
 give these codes as
-.ks
+.Sy \&ks
 and
 and
-.BR ke .
+.Sy \&ke .
 Otherwise the keypad is assumed to always transmit.
 The codes sent by the left-arrow, right-arrow, up-arrow, down-arrow,
 and home keys can be given as
 Otherwise the keypad is assumed to always transmit.
 The codes sent by the left-arrow, right-arrow, up-arrow, down-arrow,
 and home keys can be given as
-.BR kl ,
-.BR kr ,
-.BR ku ,
-.BR kd ,
+.Sy \&kl ,
+.Sy \&kr ,
+.Sy \&ku ,
+.Sy \&kd ,
 and
 and
-.BR kh ,
+.Sy \&kh ,
 respectively.
 If there are function keys such as f0, f1, ..., f9, the codes they send
 can be given as
 respectively.
 If there are function keys such as f0, f1, ..., f9, the codes they send
 can be given as
-.BR k0 ,
-.BR k1 , "" ...,
-.BR k9 .
+.Sy \&k0 ,
+.Sy \&k1 ,
+...,
+.Sy \&k9 .
 If these keys have labels other than the default f0 through f9, the labels
 can be given as
 If these keys have labels other than the default f0 through f9, the labels
 can be given as
-.BR l0 ,
-.BR l1 , "" ...,
-.BR l9 .
+.Sy \&l0 ,
+.Sy \&l1 ,
+...,
+.Sy \&l9 .
 The codes transmitted by certain other special keys can be given:
 The codes transmitted by certain other special keys can be given:
-.kH
+.Sy \&kH
 (home down),
 (home down),
-.kb
+.Sy \&kb
 (backspace),
 (backspace),
-.ka
+.Sy \&ka
 (clear all tabs),
 (clear all tabs),
-.kt
+.Sy \&kt
 (clear the tab stop in this column),
 (clear the tab stop in this column),
-.kC
+.Sy \&kC
 (clear screen or erase),
 (clear screen or erase),
-.kD
+.Sy \&kD
 (delete character),
 (delete character),
-.kL
+.Sy \&kL
 (delete line),
 (delete line),
-.kM
+.Sy \&kM
 (exit insert mode),
 (exit insert mode),
-.kE
+.Sy \&kE
 (clear to end of line),
 (clear to end of line),
-.kS
+.Sy \&kS
 (clear to end of screen),
 (clear to end of screen),
-.kI
+.Sy \&kI
 (insert character or enter insert mode),
 (insert character or enter insert mode),
-.kA
+.Sy \&kA
 (insert line),
 (insert line),
-.kN
+.Sy \&kN
 (next page),
 (next page),
-.kP
+.Sy \&kP
 (previous page),
 (previous page),
-.kF
+.Sy \&kF
 (scroll forward/down),
 (scroll forward/down),
-.kR
+.Sy \&kR
 (scroll backward/up), and
 (scroll backward/up), and
-.kT
+.Sy \&kT
 (set a tab stop in this column).
 In addition, if the keypad has a 3 by 3 array of keys
 including the four arrow keys, then the other five keys can be given as
 (set a tab stop in this column).
 In addition, if the keypad has a 3 by 3 array of keys
 including the four arrow keys, then the other five keys can be given as
-.BR K1 ,
-.BR K2 ,
-.BR K3 ,
-.BR K4 ,
+.Sy \&K1 ,
+.Sy \&K2 ,
+.Sy \&K3 ,
+.Sy \&K4 ,
 and
 and
-.BR K5 .
+.Sy \&K5 .
 These keys are useful when the effects of a 3 by 3 directional pad are needed.
 The obsolete
 These keys are useful when the effects of a 3 by 3 directional pad are needed.
 The obsolete
-.B ko
-capability formerly used to describe \*(lqother\*(rq function keys has been
+.Sy \&ko
+capability formerly used to describe
+.Dq other
+function keys has been
 completely supplanted by the above capabilities.
 completely supplanted by the above capabilities.
-.PP
+.Pp
 The
 The
-.ma
+.Sy \&ma
 entry is also used to indicate arrow keys on terminals that have
 single-character arrow keys.
 It is obsolete but still in use in
 version 2 of
 entry is also used to indicate arrow keys on terminals that have
 single-character arrow keys.
 It is obsolete but still in use in
 version 2 of
-.I vi\^
+.Sy \&vi
 which must be run on some minicomputers due to
 memory limitations.
 This field is redundant with
 which must be run on some minicomputers due to
 memory limitations.
 This field is redundant with
-.BR kl ,
-.BR kr ,
-.BR ku ,
-.BR kd ,
+.Sy \&kl ,
+.Sy \&kr ,
+.Sy \&ku ,
+.Sy \&kd ,
 and
 and
-.BR kh .
+.Sy \&kh .
 It consists of groups of two characters.
 In each group, the first character is what an arrow key sends, and the
 second character is the corresponding
 It consists of groups of two characters.
 In each group, the first character is what an arrow key sends, and the
 second character is the corresponding
-.I vi\^
+.Sy \&vi
 command.
 These commands are
 command.
 These commands are
-.B h
+.Ar h
 for
 for
-.BR kl ,
-.B j
+.Sy \&kl ,
+.Ar j
 for
 for
-.BR kd ,
-.B k
+.Sy \&kd ,
+.Ar k
 for
 for
-.BR ku ,
-.B l
+.Sy \&ku ,
+.Ar l
 for
 for
-.BR kr ,
+.Sy \&kr ,
 and
 and
-.B H
+.Ar H
 for
 for
-.BR kh .
-For example, the Mime would have \*(lqma=^Hh^Kj^Zk^Xl\*(rq
+.Sy \&kh .
+For example, the Mime would have
+.Dq Li ma=^Hh^Kj^Zk^Xl
 indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
 (There is no home key on the Mime.)
 indicating arrow keys left (^H), down (^K), up (^Z), and right (^X).
 (There is no home key on the Mime.)
-.br
-.ne 5
-.PP
-.B Tabs and Initialization
-.PP
+.Ss Tabs and Initialization
 If the terminal needs to be in a special mode when running
 a program that uses these capabilities,
 the codes to enter and exit this mode can be given as
 If the terminal needs to be in a special mode when running
 a program that uses these capabilities,
 the codes to enter and exit this mode can be given as
-.ti
+.Sy \&ti
 and
 and
-.BR te .
+.Sy \&te .
 This arises, for example, from terminals like the Concept with more than
 one page of memory.
 If the terminal has only memory-relative cursor addressing and not
 This arises, for example, from terminals like the Concept with more than
 one page of memory.
 If the terminal has only memory-relative cursor addressing and not
@@ -1241,448 +1371,475 @@ screen-relative cursor addressing,
 a screen-sized window must be fixed into
 the display for cursor addressing to work properly.
 This is also used for the Tektronix 4025, where
 a screen-sized window must be fixed into
 the display for cursor addressing to work properly.
 This is also used for the Tektronix 4025, where
-.ti
+.Sy \&ti
 sets the command character to be the one used by
 sets the command character to be the one used by
-.IR termcap\^ .
-.PP
+.Nm termcap .
+.Pp
 Other capabilities
 include
 Other capabilities
 include
-.BR is ,
+.Sy \&is ,
 an initialization string for the terminal,
 and
 an initialization string for the terminal,
 and
-.BR if ,
+.Sy \&if ,
 the name of a file containing long initialization strings.
 These strings are expected to set the terminal into modes
 consistent with the rest of the
 the name of a file containing long initialization strings.
 These strings are expected to set the terminal into modes
 consistent with the rest of the
-.I termcap\^
+.Nm termcap
 description.
 They are normally sent to the terminal by the
 description.
 They are normally sent to the terminal by the
-.I tset\^
+.Xr tset
 program each time the user logs in.
 They will be printed in the following order:
 program each time the user logs in.
 They will be printed in the following order:
-.BR is ;
+.Sy \&is ;
 setting tabs using
 setting tabs using
-.ct
+.Sy \&ct
 and
 and
-.BR st ;
+.Sy \&st ;
 and finally
 and finally
-.BR if .
-.RI ( Terminfo\^
+.Sy \&if .
+.Pf ( Xr Terminfo
 uses
 uses
-.B i1-i2
+.Sy \&i\&1-i2
 instead of
 instead of
-.is
+.Sy \&is
 and runs the program
 and runs the program
-.iP
+.Sy \&iP
 and prints
 and prints
-.B i3
+.Sy "\&i\&3"
 after the other initializations.)
 A pair of sequences that does a harder reset from a totally unknown state
 can be analogously given as
 after the other initializations.)
 A pair of sequences that does a harder reset from a totally unknown state
 can be analogously given as
-.rs
+.Sy \&rs
 and
 and
-.BR if .
+.Sy \&if .
 These strings are output by the
 These strings are output by the
-.I reset\^
+.Xr reset
 program, which is used when the terminal gets into a wedged state.
 program, which is used when the terminal gets into a wedged state.
-.RI ( Terminfo\^
+.Pf ( Xr Terminfo
 uses
 uses
-.B r1-r3
+.Sy "\&r1-r3"
 instead of
 instead of
-.BR rs .)
+.Sy \&rs . )
 Commands are normally placed in
 Commands are normally placed in
-.rs
+.Sy \&rs
 and
 and
-.rf
+.Sy \&rf
 only if they produce annoying effects on the screen and are not necessary
 when logging in.
 For example, the command to set the VT100 into 80-column mode
 would normally be part of
 only if they produce annoying effects on the screen and are not necessary
 when logging in.
 For example, the command to set the VT100 into 80-column mode
 would normally be part of
-.BR is ,
+.Sy \&is ,
 but it causes an annoying glitch of the screen and is not normally needed
 since the terminal is usually already in 80-column mode.
 but it causes an annoying glitch of the screen and is not normally needed
 since the terminal is usually already in 80-column mode.
-.PP
+.Pp
 If the terminal has hardware tabs,
 the command to advance to the next tab stop can be given as
 If the terminal has hardware tabs,
 the command to advance to the next tab stop can be given as
-.ta
+.Sy \&ta
 (usually
 (usually
-.BR ^I ).
-A \*(lqbacktab\*(rq command which moves leftward to the previous tab stop
+.Sy \&^I ) .
+A
+.Dq backtab
+command which moves leftward to the previous tab stop
 can be given as
 can be given as
-.BR bt .
+.Sy \&bt .
 By convention,
 if the terminal driver modes indicate that tab stops are being expanded
 by the computer rather than being sent to the terminal,
 programs should not use
 By convention,
 if the terminal driver modes indicate that tab stops are being expanded
 by the computer rather than being sent to the terminal,
 programs should not use
-.ta
+.Sy \&ta
 or
 or
-.bt
+.Sy \&bt
 even if they are present,
 since the user may not have the tab stops properly set.
 If the terminal has hardware tabs that are initially set every
 even if they are present,
 since the user may not have the tab stops properly set.
 If the terminal has hardware tabs that are initially set every
-.I n\^
+.Ar n
 positions when the terminal is powered up, then the numeric parameter
 positions when the terminal is powered up, then the numeric parameter
-.it
+.Sy \&it
 is given, showing the number of positions between tab stops.
 This is normally used by the
 is given, showing the number of positions between tab stops.
 This is normally used by the
-.I tset\^
+.Xr tset
 command to determine whether to set the driver mode for hardware tab
 expansion, and whether to set the tab stops.
 If the terminal has tab stops that can be saved in nonvolatile memory, the
 command to determine whether to set the driver mode for hardware tab
 expansion, and whether to set the tab stops.
 If the terminal has tab stops that can be saved in nonvolatile memory, the
-.I termcap\^
+.Nm termcap
 description can assume that they are properly set.
 description can assume that they are properly set.
-.PP
+.Pp
 If there are commands to set and clear tab stops, they can be given as
 If there are commands to set and clear tab stops, they can be given as
-.ct
+.Sy \&ct
 (clear all tab stops) and
 (clear all tab stops) and
-.st
+.Sy \&st
 (set a tab stop in the current column of every row).
 If a more complex sequence is needed to set the tabs than can be
 described by this, the sequence can be placed in
 (set a tab stop in the current column of every row).
 If a more complex sequence is needed to set the tabs than can be
 described by this, the sequence can be placed in
-.is
+.Sy \&is
 or
 or
-.BR if .
-.br
-.ne 5
-.PP
-.B Delays
-.PP
+.Sy \&if .
+.Ss Delays
 Certain capabilities control padding in the terminal driver.
 These are primarily needed by hardcopy terminals and are used by the
 Certain capabilities control padding in the terminal driver.
 These are primarily needed by hardcopy terminals and are used by the
-.I tset\^
+.Xr tset
 program to set terminal driver modes appropriately.
 Delays embedded in the capabilities
 program to set terminal driver modes appropriately.
 Delays embedded in the capabilities
-.BR cr ,
-.BR sf ,
-.BR le ,
-.BR ff ,
+.Sy \&cr ,
+.Sy \&sf ,
+.Sy \&le ,
+.Sy \&ff ,
 and
 and
-.ta
+.Sy \&ta
 will cause the appropriate delay bits to be set in the terminal driver.
 If
 will cause the appropriate delay bits to be set in the terminal driver.
 If
-.pb
+.Sy \&pb
 (padding baud rate) is given, these values can be ignored at baud rates
 below the value of
 (padding baud rate) is given, these values can be ignored at baud rates
 below the value of
-.BR pb .
-For 4.2BSD
-.IR tset\^ ,
+.Sy \&pb .
+For
+.Bx 4.2
+.Xr tset ,
 the delays are given as numeric capabilities
 the delays are given as numeric capabilities
-.BR dC ,
-.BR dN ,
-.BR dB ,
-.BR dF ,
+.Sy \&dC ,
+.Sy \&dN ,
+.Sy \&dB ,
+.Sy \&dF ,
 and
 and
-.BR dT
+.Sy \&dT
 instead.
 instead.
-.br
-.ne 5
-.PP
-.B Miscellaneous
-.PP
-If the terminal requires other than a \s-2NUL\s0 (zero) character as a pad,
+.Ss Miscellaneous
+If the terminal requires other than a
+.Dv NUL
+(zero) character as a pad,
 this can be given as
 this can be given as
-.BR pc .
+.Sy \&pc .
 Only the first character of the
 Only the first character of the
-.pc
+.Sy \&pc
 string is used.
 string is used.
-.PP
+.Pp
 If the terminal has commands to save and restore the position of the
 cursor, give them as
 If the terminal has commands to save and restore the position of the
 cursor, give them as
-.sc
+.Sy \&sc
 and
 and
-.BR rc .
-.PP
-If the terminal has an extra \*(lqstatus line\*(rq that is not normally used by
+.Sy \&rc .
+.Pp
+If the terminal has an extra
+.Dq status line
+that is not normally used by
 software, this fact can be indicated.
 If the status line is viewed as an extra line below the bottom line,
 then the capability
 software, this fact can be indicated.
 If the status line is viewed as an extra line below the bottom line,
 then the capability
-.hs
+.Sy \&hs
 should be given.
 Special strings to go to a position in the status line and to return
 from the status line can be given as
 should be given.
 Special strings to go to a position in the status line and to return
 from the status line can be given as
-.ts
+.Sy \&ts
 and
 and
-.BR fs .
-.RB ( fs
+.Sy \&fs .
+.Pf ( Xr \&fs
 must leave the cursor position in the same place that it was before
 must leave the cursor position in the same place that it was before
-.BR ts .
+.Sy \&ts .
 If necessary, the
 If necessary, the
-.sc
+.Sy \&sc
 and
 and
-.rc
+.Sy \&rc
 strings can be included in
 strings can be included in
-.ts
+.Sy \&ts
 and
 and
-.fs
+.Sy \&fs
 to get this effect.)
 The capability
 to get this effect.)
 The capability
-.ts
+.Sy \&ts
 takes one parameter, which is the column number of the status line
 to which the cursor is to be moved.
 If escape sequences and other special commands such as tab work while in
 the status line, the flag
 takes one parameter, which is the column number of the status line
 to which the cursor is to be moved.
 If escape sequences and other special commands such as tab work while in
 the status line, the flag
-.es
+.Sy \&es
 can be given.
 A string that turns off the status line (or otherwise erases its contents)
 should be given as
 can be given.
 A string that turns off the status line (or otherwise erases its contents)
 should be given as
-.BR ds .
+.Sy \&ds .
 The status line is normally assumed to be the same width as the
 rest of the screen,
 The status line is normally assumed to be the same width as the
 rest of the screen,
-.IR i.e. ,
-.BR co .
+.Em i.e . ,
+.Sy \&co .
 If the status line is a different width (possibly because the terminal
 does not allow an entire line to be loaded), then its width in columns
 can be indicated with the numeric parameter
 If the status line is a different width (possibly because the terminal
 does not allow an entire line to be loaded), then its width in columns
 can be indicated with the numeric parameter
-.BR ws .
-.PP
+.Sy \&ws .
+.Pp
 If the terminal can move up or down half a line, this can be
 indicated with
 If the terminal can move up or down half a line, this can be
 indicated with
-.hu
+.Sy \&hu
 (half-line up) and
 (half-line up) and
-.hd
+.Sy \&hd
 (half-line down).
 This is primarily useful for superscripts and subscripts on hardcopy
 terminals.
 If a hardcopy terminal can eject to the next page (form feed),
 give this as
 (half-line down).
 This is primarily useful for superscripts and subscripts on hardcopy
 terminals.
 If a hardcopy terminal can eject to the next page (form feed),
 give this as
-.ff
+.Sy \&ff
 (usually
 (usually
-.BR ^L ).
-.PP
+.Sy \&^L ) .
+.Pp
 If there is a command to repeat a given character a given number of times
 (to save time transmitting a large number of identical characters),
 this can be indicated with the parameterized string
 If there is a command to repeat a given character a given number of times
 (to save time transmitting a large number of identical characters),
 this can be indicated with the parameterized string
-.BR rp .
+.Sy \&rp .
 The first parameter is the character to be repeated and the second is
 the number of times to repeat it.
 (This is a
 The first parameter is the character to be repeated and the second is
 the number of times to repeat it.
 (This is a
-.I terminfo\^
+.Xr terminfo
 feature that is unlikely to be supported by a program that uses
 feature that is unlikely to be supported by a program that uses
-.IR termcap\^ .)
-.PP
+.Nm termcap . )
+.Pp
 If the terminal has a settable command character, such as the
 Tektronix 4025, this can be indicated with
 If the terminal has a settable command character, such as the
 Tektronix 4025, this can be indicated with
-.BR CC .
+.Sy \&CC .
 A prototype command character is chosen which is used in all capabilities.
 This character is given in the
 A prototype command character is chosen which is used in all capabilities.
 This character is given in the
-.CC
+.Sy \&CC
 capability to identify it.
 capability to identify it.
-The following convention is supported on some UNIX systems:
+The following convention is supported on some
+.Ux
+systems:
 The environment is to be searched for a
 The environment is to be searched for a
-.B
-.SM CC
+.Ev \&CC
 variable,
 and if found,
 all occurrences of the prototype character are replaced by the character
 in the environment variable.
 This use of the
 variable,
 and if found,
 all occurrences of the prototype character are replaced by the character
 in the environment variable.
 This use of the
-.B
-.SM CC
+.Ev \&CC
 environment variable
 is a very bad idea, as it conflicts with
 environment variable
 is a very bad idea, as it conflicts with
-.IR make\^ (1).
-.PP
+.Xr make 1 .
+.Pp
 Terminal descriptions that do not represent a specific kind of known
 terminal, such as
 Terminal descriptions that do not represent a specific kind of known
 terminal, such as
-.IR switch\^ ,
-.IR dialup\^ ,
-.IR patch\^ ,
+.Em switch ,
+.Em dialup ,
+.Em patch ,
 and
 and
-.IR network\^ ,
+.Xr network ,
 should include the
 should include the
-.gn
+.Sy \&gn
 (generic) capability so that programs can complain that they do not know
 how to talk to the terminal.
 (This capability does not apply to
 (generic) capability so that programs can complain that they do not know
 how to talk to the terminal.
 (This capability does not apply to
-.I virtual\^
+.Em virtual
 terminal descriptions for which the escape sequences are known.)
 terminal descriptions for which the escape sequences are known.)
-.PP
-If the terminal uses xoff/xon (\s-2DC3\s0/\s-2DC1\s0)
+.Pp
+If the terminal uses xoff/xon
+.Pq Tn DC3 Ns / Ns Tn DC1
 handshaking for flow control, give
 handshaking for flow control, give
-.BR xo .
+.Sy \&xo .
 Padding information should still be included so that routines can make
 better decisions about costs, but actual pad characters will not be
 transmitted.
 Padding information should still be included so that routines can make
 better decisions about costs, but actual pad characters will not be
 transmitted.
-.PP
-If the terminal has a \*(lqmeta key\*(rq which acts as a shift key, setting the
+.Pp
+If the terminal has a
+.Dq meta key
+which acts as a shift key, setting the
 8th bit of any character transmitted, then this fact can be indicated with
 8th bit of any character transmitted, then this fact can be indicated with
-.BR km .
+.Sy \&km .
 Otherwise, software will assume that the 8th bit is parity and it will
 usually be cleared.
 Otherwise, software will assume that the 8th bit is parity and it will
 usually be cleared.
-If strings exist to turn this \*(lqmeta mode\*(rq on and off, they can be given as
-.B mm
+If strings exist to turn this
+.Dq meta mode
+on and off, they can be given as
+.Sy \&mm
 and
 and
-.BR mo .
-.PP
+.Sy \&mo .
+.Pp
 If the terminal has more lines of memory than will fit on the screen at once,
 the number of lines of memory can be indicated with
 If the terminal has more lines of memory than will fit on the screen at once,
 the number of lines of memory can be indicated with
-.BR lm .
+.Sy \&lm .
 An explicit value of 0 indicates that the number of lines is not fixed,
 but that there is still more memory than fits on the screen.
 An explicit value of 0 indicates that the number of lines is not fixed,
 but that there is still more memory than fits on the screen.
-.PP
-If the terminal is one of those supported by the UNIX system virtual
+.Pp
+If the terminal is one of those supported by the
+.Ux
+system virtual
 terminal protocol, the terminal number can be given as
 terminal protocol, the terminal number can be given as
-.BR vt .
-.PP
+.Sy \&vt .
+.Pp
 Media copy strings which control an auxiliary printer
 connected to the terminal can be given as
 Media copy strings which control an auxiliary printer
 connected to the terminal can be given as
-.BR ps :
+.Sy \&ps :
 print the contents of the screen;
 print the contents of the screen;
-.BR pf :
+.Sy \&pf :
 turn off the printer; and
 turn off the printer; and
-.BR po :
+.Sy \&po :
 turn on the printer.
 When the printer is on, all text sent to the terminal will be sent to the
 printer.
 It is undefined whether the text is also displayed on the terminal screen
 when the printer is on.
 A variation
 turn on the printer.
 When the printer is on, all text sent to the terminal will be sent to the
 printer.
 It is undefined whether the text is also displayed on the terminal screen
 when the printer is on.
 A variation
-.pO
+.Sy \&pO
 takes one parameter and leaves the printer on for as many characters as the
 value of the parameter, then turns the printer off.
 The parameter should not exceed 255.
 All text, including
 takes one parameter and leaves the printer on for as many characters as the
 value of the parameter, then turns the printer off.
 The parameter should not exceed 255.
 All text, including
-.BR pf ,
+.Sy \&pf ,
 is transparently passed to the printer while
 is transparently passed to the printer while
-.pO
+.Sy \&pO
 is in effect.
 is in effect.
-.PP
+.Pp
 Strings to program function keys can be given as
 Strings to program function keys can be given as
-.BR pk ,
-.BR pl ,
+.Sy \&pk ,
+.Sy \&pl ,
 and
 and
-.BR px .
+.Sy \&px .
 Each of these strings takes two parameters: the function key number
 to program (from 0 to 9) and the string to program it with.
 Function key numbers out of this range may program undefined keys
 in a terminal-dependent manner.
 The differences among the capabilities are that
 Each of these strings takes two parameters: the function key number
 to program (from 0 to 9) and the string to program it with.
 Function key numbers out of this range may program undefined keys
 in a terminal-dependent manner.
 The differences among the capabilities are that
-.pk
+.Sy \&pk
 causes pressing the given key to be the same as the user typing the given
 string;
 causes pressing the given key to be the same as the user typing the given
 string;
-.pl
+.Sy \&pl
 causes the string to be executed by the terminal in local mode;
 and
 causes the string to be executed by the terminal in local mode;
 and
-.px
+.Sy \&px
 causes the string to be transmitted to the computer.
 Unfortunately, due to lack of a definition for string parameters in
 causes the string to be transmitted to the computer.
 Unfortunately, due to lack of a definition for string parameters in
-.IR termcap\^ ,
+.Nm termcap ,
 only
 only
-.I terminfo\^
+.Xr terminfo
 supports these capabilities.
 supports these capabilities.
-.br
-.ne 5
-.PP
-.B Glitches and Braindamage
-.PP
+.Ss Glitches and Braindamage
 Hazeltine terminals, which do not allow `~' characters to be displayed,
 should indicate
 Hazeltine terminals, which do not allow `~' characters to be displayed,
 should indicate
-.BR hz .
-.PP
+.Sy \&hz .
+.Pp
 The
 The
-.nc
+.Sy \&nc
 capability, now obsolete, formerly indicated Datamedia terminals,
 which echo
 capability, now obsolete, formerly indicated Datamedia terminals,
 which echo
-.\er \en
+.Sy \&\er \en
 for
 carriage return then ignore a following linefeed.
 for
 carriage return then ignore a following linefeed.
-.PP
+.Pp
 Terminals that ignore a linefeed immediately after an
 Terminals that ignore a linefeed immediately after an
-.am
+.Sy \&am
 wrap, such as the Concept, should indicate
 wrap, such as the Concept, should indicate
-.BR xn .
-.PP
+.Sy \&xn .
+.Pp
 If
 If
-.ce
+.Sy \&ce
 is required to get rid of standout
 (instead of merely writing normal text on top of it),
 is required to get rid of standout
 (instead of merely writing normal text on top of it),
-.xs
+.Sy \&xs
 should be given.
 should be given.
-.PP
+.Pp
 Teleray terminals, where tabs turn all characters moved over to blanks,
 should indicate
 Teleray terminals, where tabs turn all characters moved over to blanks,
 should indicate
-.xt
+.Sy \&xt
 (destructive tabs).
 This glitch is also taken to mean that it is not possible
 to position the cursor on top of a \*(lqmagic cookie\*(rq, and that
 to erase standout mode it is necessary to use delete and insert line.
 (destructive tabs).
 This glitch is also taken to mean that it is not possible
 to position the cursor on top of a \*(lqmagic cookie\*(rq, and that
 to erase standout mode it is necessary to use delete and insert line.
-.PP
+.Pp
 The Beehive Superbee, which is unable to correctly transmit the
 The Beehive Superbee, which is unable to correctly transmit the
-\s-2ESC\s0 or ^C characters, has
-.BR xb ,
-indicating that the \*(lqf1\*(rq key is used for \s-2ESC\s0 and \*(lqf2\*(rq for ^C.
-(Only certain Superbees have this problem, depending on the ROM.)
-.PP
+.Dv ESC
+or
+.Sy \&^C
+characters, has
+.Sy \&xb ,
+indicating that the
+.Dq \&f\&1
+key is used for
+.Dv ESC
+and
+.Dq \&f\&2
+for ^C.
+(Only certain Superbees have this problem, depending on the
+.Tn ROM . )
+.Pp
 Other specific terminal problems may be corrected by adding more
 Other specific terminal problems may be corrected by adding more
-capabilities of the form \fBx\fIx\^\fP.
-.br
-.ne 5
-.PP
-.B Similar Terminals
-.PP
+capabilities of the form
+.Sy x Em x .
+.Ss Similar Terminals
 If there are two very similar terminals,
 one can be defined as being just like the other with certain exceptions.
 The string capability
 If there are two very similar terminals,
 one can be defined as being just like the other with certain exceptions.
 The string capability
-.tc
+.Sy \&tc
 can be given
 with the name of the similar terminal.
 This capability must be
 can be given
 with the name of the similar terminal.
 This capability must be
-.IR last\^ ,
+.Em last ,
 and the combined length of the entries
 must not exceed 1024.
 The capabilities given before
 and the combined length of the entries
 must not exceed 1024.
 The capabilities given before
-.tc
+.Sy \&tc
 override those in the terminal type invoked by
 override those in the terminal type invoked by
-.BR tc .
+.Sy \&tc .
 A capability can be canceled by placing
 A capability can be canceled by placing
-.xx@
+.Sy \&xx@
 to the left of the
 to the left of the
-.tc
+.Sy \&tc
 invocation, where
 invocation, where
-.I xx\^
+.Sy \&xx
 is the capability.
 For example, the entry
 is the capability.
 For example, the entry
-.PP
-       hn\||\|2621\-nl:ks@:ke@:tc=2621:
-.PP
-defines a \*(lq2621\-nl\*(rq that does not have the
-.B ks
+.Bd -literal -offset indent
+hn\||\|2621\-nl:ks@:ke@:tc=2621:
+.Ed
+.Pp
+defines a
+.Dq 2621\-nl
+that does not have the
+.Sy \&ks
 or
 or
-.ke
+.Sy \&ke
 capabilities,
 hence does not turn on the function key labels when in visual mode.
 This is useful for different modes for a terminal, or for different
 user preferences.
 capabilities,
 hence does not turn on the function key labels when in visual mode.
 This is useful for different modes for a terminal, or for different
 user preferences.
-.SH AUTHOR
-William Joy
-.br
-Mark Horton added underlining and keypad support
-.SH FILES
-.DT
-/etc/termcap   file containing terminal descriptions
-.SH SEE ALSO
-ex(1), more(1), tset(1), ul(1), vi(1), curses(3X), printf(3S),
-termcap(3X), term(7)
-.SH "CAVEATS AND BUGS"
-.B Note:
-.I termcap\^
-was replaced by
-.I terminfo\^
-in UNIX System V Release 2.0.
+.Sh FILES
+.Bl -tag -width /usr/share/misc/termcap -compact
+.It Pa /usr/share/misc/termcap
+File containing terminal descriptions.
+.El
+.Sh SEE ALSO
+.Xr \&ex 1 ,
+.Xr more 1 ,
+.Xr tset 1 ,
+.Xr \&ul 1 ,
+.Xr vi 1 ,
+.Xr curses 3 ,
+.Xr printf 3 ,
+.Xr termcap 3 ,
+.Xr term 7
+.Sh CAVEATS AND BUGS
+The
+.Em Note :
+.Nm termcap
+functions
+were replaced by
+.Xr terminfo
+in
+.At V
+Release 2.0.
 The transition will be relatively painless if capabilities flagged as
 The transition will be relatively painless if capabilities flagged as
-\*(lqobsolete\*(rq are avoided.
-.PP
+.Dq obsolete
+are avoided.
+.Pp
 Lines and columns are now stored by the kernel as well as in the termcap
 entry.
 Most programs now use the kernel information primarily; the information
 in this file is used only if the kernel does not have any information.
 Lines and columns are now stored by the kernel as well as in the termcap
 entry.
 Most programs now use the kernel information primarily; the information
 in this file is used only if the kernel does not have any information.
-.PP
-.I Vi\^
+.Pp
+.Xr \&Vi
 allows only 256 characters for string capabilities, and the routines
 allows only 256 characters for string capabilities, and the routines
-in 
-.IR termlib\^ (3)
+in
+.Xr termlib 3
 do not check for overflow of this buffer.
 The total length of a single entry (excluding only escaped newlines)
 may not exceed 1024.
 do not check for overflow of this buffer.
 The total length of a single entry (excluding only escaped newlines)
 may not exceed 1024.
-.PP
+.Pp
 Not all programs support all entries.
 Not all programs support all entries.
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 3 .