summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-03-23 00:17:50 +0000
committerwlemb <wlemb>2001-03-23 00:17:50 +0000
commit5a425eaf6e5cc80206e2562878fd9e24f398b973 (patch)
treeb387186eef3de10b1b1ce6056eb7ddd77a5d0039
parenta736fb6eaf38fd5fbb5bc3bd20e59f42b0bad491 (diff)
downloadgroff-5a425eaf6e5cc80206e2562878fd9e24f398b973.tar.gz
Replaced mdoc implementation. The new version is `state of the
art', using almost all new features of groff 1.17 -- it won't run with older versions. * tmac/doc.tmac: Completely rewritten. * tmac/doc-common: Ditto. * tmac/doc-nroff: Ditto. * tmac/doc-ditroff: Ditto. * tmac/doc-syms: Ditto. * tmac/mdoc.local: New file. * tmac/groff_mdoc.samples.man: Replaced with ... * tmac/groff_mdoc.reference.man: New file, covering mdoc completely. * tmac/strip.sed: Updated. * tmac/Makefile.sub: Updated. * INSTALL: Updated. * tmac/groff_man.man: Add `man.local' to the FILES section.
-rw-r--r--ChangeLog20
-rw-r--r--NEWS25
-rw-r--r--tmac/Makefile.sub9
-rw-r--r--tmac/doc-common1263
-rwxr-xr-xtmac/doc-common.new1027
-rw-r--r--tmac/doc-ditroff529
-rwxr-xr-xtmac/doc-ditroff.new328
-rw-r--r--tmac/doc-nroff417
-rwxr-xr-xtmac/doc-nroff.new276
-rw-r--r--tmac/doc-syms907
-rwxr-xr-xtmac/doc-syms.new759
-rw-r--r--tmac/doc.tmac9429
-rw-r--r--tmac/groff_man.man3
-rwxr-xr-xtmac/groff_mdoc.reference.man42
-rwxr-xr-xtmac/groff_mdoc.samples.man2925
-rw-r--r--tmac/mdoc.local2
-rw-r--r--tmac/strip.sed11
-rwxr-xr-xtmac/tmac.doc.new6232
18 files changed, 8376 insertions, 15828 deletions
diff --git a/ChangeLog b/ChangeLog
index 07a5540e..66fd501a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2001-03-23 Werner LEMBERG <wl@gnu.org>
+
+ Replaced mdoc implementation. The new version is `state of the
+ art', using almost all new features of groff 1.17 -- it won't run
+ with older versions.
+
+ * tmac/doc.tmac: Completely rewritten.
+ * tmac/doc-common: Ditto.
+ * tmac/doc-nroff: Ditto.
+ * tmac/doc-ditroff: Ditto.
+ * tmac/doc-syms: Ditto.
+ * tmac/mdoc.local: New file.
+ * tmac/groff_mdoc.samples.man: Replaced with ...
+ * tmac/groff_mdoc.reference.man: New file, covering mdoc completely.
+ * tmac/strip.sed: Updated.
+ * tmac/Makefile.sub: Updated.
+ * INSTALL: Updated.
+
+ * tmac/groff_man.man: Add `man.local' to the FILES section.
+
2001-03-22 Werner LEMBERG <wl@gnu.org>
* doc/groff.texinfo: Added many @noindent.
diff --git a/NEWS b/NEWS
index 8f41b4f6..ea9846d9 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,31 @@ o The new environment variable GROFF_BIN_PATH will be checked for programs
Troff
-----
+o The mdoc package has been completely rewritten, using the full power of
+ GNU troff to remove limitations of Unix troff (which is no longer
+ supported). Most important changes are:
+
+ . No argument limit.
+ . Almost all macros are parsable and callable (if it makes sense).
+ . `.Lb': prints library names
+ . `.Nm <punctuation>' now works as expected; `.Nm "" <punctuation>' has
+ been withdrawn.
+ . Updated `.St' command
+ . `.Fx': prints FreeBSD
+ . `.Ox': prints OpenBSD
+ . `.Bsx': prints BSD/OS
+ . `.Brq', `.Bro', `.Brc': brace enclosure macros
+ . `.Bd -centered': center lines
+ . `.Bl -xwidth <string>': interpret <string> and use the resulting width
+ . `.Ld': prints `...'
+ . support for double-sided printing (-rD=1 command line switch)
+
+ groff_mdoc.samples.man has been replaced with groff_mdoc.reference.man
+ which completely documents the mdoc package.
+
+ Great care has been taken to assure backwards compatibility. If you
+ encounter any abnormal results, please report them to bug-groff@gnu.org.
+
o A new command line option for the `man' macros (similar to the `mdoc'
package has been implemented: `-rcR=1' (now the default in nroff mode) will
produce one single, very long page instead of multiple pages. `-rcR=0'
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index edc5edff..dd8e2e37 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -5,7 +5,7 @@ MAN7=\
groff_man.n \
groff_me.n \
groff_mdoc.n \
- groff_mdoc.samples.n \
+ groff_mdoc.reference.n \
groff_mwww.n
NORMALFILES=\
@@ -40,7 +40,7 @@ sys_tmac_prefix=
all: stamp-strip stamp-wrap stamp-sed
-install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
+install_data: $(NORMALFILES) $(SPECIALFILES) man.local mdoc.local \
stamp-strip stamp-wrap stamp-sed
-test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
-test -d $(systemtmacdir) || $(mkinstalldirs) $(systemtmacdir)
@@ -73,6 +73,8 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
done
-test -f $(localtmacdir)/man.local || \
$(INSTALL_DATA) $(srcdir)/man.local $(localtmacdir)/man.local
+ -test -f $(localtmacdir)/mdoc.local || \
+ $(INSTALL_DATA) $(srcdir)/mdoc.local $(localtmacdir)/mdoc.local
stamp-strip: $(STRIPFILES) $(MDOCFILES)
for f in $(STRIPFILES) $(MDOCFILES); do \
@@ -118,5 +120,8 @@ uninstall_sub:
-if cmp -s $(localtmacdir)/man.local $(srcdir)/man.local; then \
rm -f $(localtmacdir)/man.local; \
fi
+ -if cmp -s $(localtmacdir)/mdoc.local $(srcdir)/mdoc.local; then \
+ rm -f $(localtmacdir)/mdoc.local; \
+ fi
-for f in $(MDOCFILES); do rm -f $(mdocdir)/$$f; done
-rmdir $(mdocdir)
diff --git a/tmac/doc-common b/tmac/doc-common
index 1be19597..dbd05ff2 100644
--- a/tmac/doc-common
+++ b/tmac/doc-common
@@ -11,8 +11,8 @@
.\" 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.
+.\" 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.
@@ -29,422 +29,999 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc-common 5.7 (Berkeley) 8/5/91
+.\" @(#)doc-common 5.7 (Berkeley) 8/5/91
.\"
.\" %beginstrip%
+.
+.
+.\" Macro Identifiers. For each user macro a corresponding register with
+.\" the same name must exist. Its value must not be zero.
+.
.nr %A 1
+.nr %B 1
+.nr %D 1
.nr %J 1
.nr %N 1
.nr %O 1
+.nr %P 1
+.nr %Q 1
.nr %R 1
.nr %T 1
.nr %V 1
-.nr Ad 12n
.nr Ac 3
+.nr Ad 12n
+.nr An 12n
.nr Ao 12n
.nr Ap 2
-.nr An 12n
.nr Aq 12n
.nr Ar 12n
+.nr At 1
.nr Bc 3
+.nr Bf 8n\" ?
+.nr Bk 8n\" ?
.nr Bl 1
.nr Bo 12n
.nr Bq 12n
-.nr Bx 12n
+.nr Brc 3
+.nr Bro 12n
+.nr Brq 12n
+.nr Bsx 1
+.nr Bt 8n\" ?
+.nr Bx 1
.nr Cd 12n
.nr Cm 10n
-.nr Co 15n
-.nr Cx 20n
+.nr D1 8n\" ?
.nr Dc 3
-.nr Do 10n
-.nr Dq 12n
-.nr Ds 6n
+.nr Dl 8n\" ?
+.nr Dt 8n\" ?
+.nr Do 12n
.nr Dq 12n
.nr Dv 12n
-.nr tI \n(Dsu
.nr Ec 3
+.nr Ef 8n\" ?
+.nr Ek 8n\" ?
.nr El 1
+.nr Em 10n
+.nr En 12n
.nr Eo 12n
.nr Eq 12n
-.nr Em 10n
-.nr Er 12n
+.nr Er 17n
+.nr Es 12n
.nr Ev 15n
.nr Ex 10n
.nr Fa 12n
-.nr Fl 10n
.nr Fc 3
-.nr Fo 16n
+.nr Fd 12n\" ?
+.nr Fl 10n
.nr Fn 16n
-.nr Hl 1
-.nr I1 6n
-.nr I2 12n
-.nr I3 18n
+.nr Fo 16n
+.nr Fr 12n\" ?
+.nr Ft 8n\" ?
+.nr Fx 1
.nr Ic 10n
+.nr In 12n\" ?
+.nr It 8n\" ?
+.nr Lb 11n
+.nr Ld 4n
.nr Li 16n
+.nr Lk 6n\" ?
+.nr Lp 8n\" ?
+.nr Me 6n
.nr Ms 6n
+.nr Mt 6n\" ?
+.nr Nd 8n\" ?
.nr Nm 10n
.nr No 12n
.nr Ns 2
-.nr Oo 10n
+.nr Nx 1
.nr Oc 3
+.nr Oo 10n
.nr Op 14n
+.nr Or 6n\" ?
+.nr Os 6n\" ?
+.nr Ox 1
.nr Pa 32n
-.nr Pf 12n
.nr Pc 3
+.nr Pf 12n
.nr Po 12n
+.nr Pp 8n\" ?
.nr Pq 12n
-.nr Ql 16n
.nr Qc 3
+.nr Ql 16n
.nr Qo 12n
.nr Qq 12n
+.nr Rv 1
.nr Sc 3
+.nr Sf 8n\" ?
+.nr Sh 8n
+.nr Sm 8n\" ?
.nr So 12n
.nr Sq 12n
-.nr Sy 6n
+.nr Ss 8n
+.nr St 8n\" ?
.nr Sx 16n
-.nr Ra 1
-.nr Rj 1
-.nr Rn 1
-.nr Ro 1
-.nr Rr 1
-.nr Rt 1
-.nr Rv 1
+.nr Sy 6n
+.nr Ta 2
.nr Tn 10n
-.nr Ta 1
-.nr Tv 1
-.nr Tx 22n
-.nr Ux 10n
+.nr Ud 8n\" ?
+.nr Ux 1
.nr Va 12n
+.nr Vt 8n\" ?
.nr Xc 3
.nr Xo 1
.nr Xr 10n
-.nr Yr \n(yr+1900
-.ds sV \& \&
-.ds hV \&\ \&
-.ds iV \& \&
-.ds tV \&\\t\&
-.\" Punctuation values (3 = closing punctuation, 4 = opening)
-.nr z. 3
-.nr z, 3
-.nr z: 3
-.nr z; 3
-.nr z( 4
-.nr z) 3
-.nr z[ 4
-.nr z] 3
-.\" Matching pairs
-.ds z( z)
-.ds z[ z]
-.ds z< z>
-.\" This is disgusting, troff not parse ``if'' stmt properly
-.nr z0 0
-.nr z1 0
-.nr z2 0
-.nr z3 0
-.nr z4 0
-.nr z5 0
-.nr z6 0
-.nr z7 0
-.nr z8 0
-.nr z9 0
-.nr z# 0
-.\" Header assembly macros
+.
+.
+.\" requests which must be processed after the closing delimiter of `Op'
+.\" and friends
+.ds doc-after-Ao
+.ds doc-after-Bo
+.ds doc-after-Bro
+.ds doc-after-Do
+.ds doc-after-Eo
+.ds doc-after-Fo
+.ds doc-after-Ns
+.ds doc-after-Oo
+.ds doc-after-Po
+.ds doc-after-Qo
+.ds doc-after-So
+.ds doc-after-Xo
+.
+.
+.nr doc-display-indent 6n
+.
+.
+.\" space strings
+.
+.ds doc-soft-space " \"
+.ds doc-hard-space \~
+.ds doc-tab \t
+.
+.
+.eo
+.
+.
+.\" punctuation values (suffix=3, prefix = 4)
+.
+.nr doc-punct. 3
+.nr doc-punct, 3
+.nr doc-punct: 3
+.nr doc-punct; 3
+.nr doc-punct( 4
+.nr doc-punct) 3
+.nr doc-punct[ 4
+.nr doc-punct] 3
+.nr doc-punct? 3
+.nr doc-punct! 3
+.
+.
+.\" obsolete commands
+.
+.de Ds
+. tm mdoc error: .Ds defunct (#\n[.c])
+..
+.nr Ds 6n
+.
+.
+.\" header assembly macros
+.
+.\" NS doc-document-title global string
+.\" NS the title of the manual page
+.
+.ds doc-document-title UNTITLED
+.
+.
+.\" NS doc-volume global string
+.\" NS the volume where the manual page belongs to
+.
+.ds doc-volume LOCAL
+.
+.
+.\" NS doc-section global string
+.\" NS the manual section
+.
+.ds doc-section Null
+.
+.
+.\" NS Dt user macro (not parsed, not callable)
+.\" NS document title
+.\" NS
+.\" NS modifies:
+.\" NS doc-document-title
+.\" NS doc-section
+.\" NS doc-volume
+.\" NS
+.\" NS local variables:
+.\" NS doc-volume-as-XXX
+.\" NS doc-volume-ds-XXX
+.\" NS
+.\" NS width register `Dt' set above
+.
+.\" an alternative, more detailed scheme for naming the manual sections
+.\"
+.\" .ds doc-volume-ds-1 System General Commands Manual
+.\" .ds doc-volume-ds-2 System Calls Manual
+.\" .ds doc-volume-ds-3 System Library Functions Manual
+.\" .ds doc-volume-ds-4 System Kernel Interfaces Manual
+.\" .ds doc-volume-ds-5 System File Formats Manual
+.\" .ds doc-volume-ds-6 System Games Manual
+.\" .ds doc-volume-ds-7 System Miscellaneous Information Manual
+.\" .ds doc-volume-ds-8 System Manager's Manual
+.\" .ds doc-volume-ds-9 System Kernel Developer's Manual
+.
+.ds doc-volume-ds-USD System User's Supplementary Documents
+.ds doc-volume-ds-PS1 System Programmer's Supplementary Documents
+.ds doc-volume-ds-AMD System Ancestral Manual Documents
+.ds doc-volume-ds-SMM System Manager's Manual
+.ds doc-volume-ds-URM System Reference Manual
+.ds doc-volume-ds-PRM System Programmer's Manual
+.ds doc-volume-ds-KM System Kernel Manual
+.ds doc-volume-ds-IND System Manual Master Index
+.ds doc-volume-ds-LOCAL System Local Manual
+.ds doc-volume-ds-CON System Contributed Software Manual
+.
+.als doc-volume-ds-MMI doc-volume-ds-IND
+.als doc-volume-ds-LOC doc-volume-ds-LOCAL
+.
+.ds doc-volume-as-alpha (Alpha Architecture)
+.als doc-volume-as-Alpha doc-volume-as-alpha
+.ds doc-volume-as-amiga (Amiga Architecture)
+.ds doc-volume-as-arc (Arc Architecture)
+.ds doc-volume-as-arm26 (ARM26 Architecture)
+.ds doc-volume-as-arm32 (ARM32 Architecture)
+.ds doc-volume-as-atari (Atari Architecture)
+.ds doc-volume-as-bebox (BEbox Architecture)
+.ds doc-volume-as-cobalt (Cobalt Architecture)
+.ds doc-volume-as-evbsh3 (Evbsh3 Architecture)
+.ds doc-volume-as-hp300 (HP300 Architecture)
+.ds doc-volume-as-hpcmips (HPcmips Architecture)
+.ds doc-volume-as-i386 (i386 Architecture)
+.ds doc-volume-as-luna68k (luna68k Architecture)
+.ds doc-volume-as-m68k (m68k Architecture)
+.ds doc-volume-as-mac68k (mac68k Architecture)
+.ds doc-volume-as-macppc (macppc Architecture)
+.ds doc-volume-as-mips (MIPS Architecture)
+.ds doc-volume-as-mmeye (mmeye Architecture)
+.ds doc-volume-as-mvme68k (mvme68k Architecture)
+.ds doc-volume-as-news68k (news68k Architecture)
+.ds doc-volume-as-newsmips (newsmips Architecture)
+.ds doc-volume-as-next68k (next68k Architecture)
+.ds doc-volume-as-ofppc (ofppc Architecture)
+.ds doc-volume-as-pc532 (pc532 Architecture)
+.ds doc-volume-as-pmax (pmax Architecture)
+.ds doc-volume-as-powerpc (powerpc Architecture)
+.ds doc-volume-as-prep (prep Architecture)
+.ds doc-volume-as-sgimips (sgimips Architecture)
+.ds doc-volume-as-sh3 (sh3 Architecture)
+.ds doc-volume-as-sparc (SPARC Architecture)
+.ds doc-volume-as-sparc64 (sparc64 Architecture)
+.ds doc-volume-as-sun3 (sun3 Architecture)
+.ds doc-volume-as-tahoe (Tahoe Architecture)
+.ds doc-volume-as-vax (VAX Architecture)
+.ds doc-volume-as-x68k (x68k Architecture)
+.
.de Dt
-.ds dT UNTITLED
-.ds vT LOCAL
-.ds cH Null
-.if !"\\$1"" .ds dT \\$1
-.if !"\\$2"" \{\
-. ds cH \\$2
-.\" . if "\\$3"" \{\
-. if \\$2>=1 .if \\$2<=8 \{\
-. ds vT System Reference Manual
-. if \\$2>1 .if \\$2<6 .ds vT System Programmer's Manual
-. if "\\$2"8" .ds vT System Manager's Manual
-. nr sN \\$2
-. \}
-. if "\\$2"unass" .ds vT DRAFT
-. if "\\$2"draft" .ds vT DRAFT
-. if "\\$2"paper" .ds vT UNTITLED
-.\" . \}
-.\}
-.if !"\\$3"" \{\
-. if "\\$3"USD" .ds vT User's Supplementary Documents
-. if "\\$3"PS1" .ds vT Programmers's Supplementary Documents
-. if "\\$3"AMD" .ds vT Ancestral Manual Documents
-. if "\\$3"SMM" .ds vT System Manager's Manual
-. if "\\$3"URM" .ds vT Reference Manual
-. if "\\$3"PRM" .ds vT Programmers's Manual
-. if "\\$3"IND" .ds vT Manual Master Index
-.\" . if "\\$3"CON" .ds vT Contributed Software Manual
-.\" . if "\\$3"IMP" .ds vT Implementation Notes
-.\" . if "\\$3"HOW" .ds vT How Pocket Manual
-. if "\\$3"LOCAL" .ds vT Local Manual
-. if "\\$3"tahoe" .as vT \ (Tahoe Architecture)
-. if "\\$3"vax" .as vT \ (VAX Architecture)
-. if "\\$3"hp300" .as vT \ (HP300 Architecture)
-. if "\\*(vT"LOCAL" .ds vT \\$3
-.\}
+. \" reset default arguments
+. ds doc-document-title UNTITLED
+. ds doc-volume LOCAL
+. ds doc-section Null
+.
+. if !"\$1"" \
+. ds doc-document-title "\$1
+.
+. if !"\$2"" \{\
+. ds doc-section \$2
+. ie \B\$2 \{\
+. if ((\$2 >= 1) & (\$2 <= 9)) \{\
+. ds doc-volume "\*[doc-volume-ds-URM]
+. ie d doc-volume-ds-\$2 \
+. ds doc-volume "\*[doc-volume-ds-\$2]
+. el \{ .ie ((\$2 > 1) & (\$2 < 6)) \
+. ds doc-volume "\*[doc-volume-ds-PRM]
+. el \{ .ie (\$2 == 8) \
+. ds doc-volume "\*[doc-volume-ds-SMM]
+. el \{ .if (\$2 == 9) \
+. ds doc-volume "\*[doc-volume-ds-KM]
+. \}\}\}\}\}
+. el \{ .ie "\$2"unass" .ds doc-volume DRAFT
+. el \{ .ie "\$2"draft" .ds doc-volume DRAFT
+. el \{ .ie "\$2"paper" .ds doc-volume UNTITLED
+. el \
+. tm mdoc warning: .Dt: unknown section `\$2' (#\n[.c])
+. \}\}\}\}
+.
+. if \A\$3 \{\
+. if d doc-volume-ds-\$3 \
+. ds doc-volume "\*[doc-volume-ds-\$3]
+.
+. if d doc-volume-as-\$3 \
+. as doc-volume " \*[doc-volume-as-\$3]
+. \}
+.
+. if !"\$3"" \
+. if "\*[doc-volume]"LOCAL" \
+. ds doc-volume \$3
..
-.\" NS Os macro - Operating System (behaviour changes after first call)
-.\" . ds vT \f(CODRAFT\fP\ \ \-\-\ \ \\*(vT\ \ \-\-\ \ \f(CODRAFT
-.\" . ds dD \f(CODRAFT\fP\ \ \-\-\ \ \\*(dD\ \ \-\-\ \ \f(CODRAFT
-.\" .ds vT \s+4\f(CODRAFT\fP\s-4\ \ \-\-\ \ \\*(vT\ \ \-\-\ \ \s+4\f(CODRAFT\s-4
-.\" .ds dD \s+4\f(CODRAFT\fP\s-4\ \ \-\-\ \ \\*(dD\ \ \-\-\ \ \s+4\f(CODRAFT\s-4
+.
+.
+.\" NS doc-operating-system global string
+.\" NS the exact version of the operating system
+.
+.ds doc-operating-system
+.
+.
+.\" NS Os user macro (not parsed, not callable)
+.\" NS operating system
+.\" NS
+.\" NS modifies:
+.\" NS doc-operating-system
+.\" NS
+.\" NS local variables:
+.\" NS doc-operating-system-XXX-XXX
+.\" NS
+.\" NS width register `Os' set above
+.
+.ds doc-operating-system-ATT-7 7th\~Edition
+.als doc-operating-system-ATT-7th doc-operating-system-ATT-7
+.ds doc-operating-system-ATT-3 System\~III
+.als doc-operating-system-ATT-III doc-operating-system-ATT-3
+.ds doc-operating-system-ATT-V System\~V
+.ds doc-operating-system-ATT-V.2 System\~V Release\~2
+.ds doc-operating-system-ATT-V.3 System\~V Release\~3
+.ds doc-operating-system-ATT-V.4 System\~V Release\~4
+.
+.ds doc-operating-system-BSD-3 3rd\~Berkeley Distribution
+.ds doc-operating-system-BSD-4 4th\~Berkeley Distribution
+.ds doc-operating-system-BSD-4.1 4.1\~Berkeley Distribution
+.ds doc-operating-system-BSD-4.2 4.2\~Berkeley Distribution
+.ds doc-operating-system-BSD-4.3 4.3\~Berkeley Distribution
+.ds doc-operating-system-BSD-4.3T 4.3-Tahoe Berkeley Distribution
+.ds doc-operating-system-BSD-4.3R 4.3-Reno Berkeley Distribution
+.als doc-operating-system-BSD-4.3t doc-operating-system-BSD-4.3T
+.als doc-operating-system-BSD-4.3r doc-operating-system-BSD-4.3R
+.ds doc-operating-system-BSD-4.4 4.4BSD
+.
+.ds doc-operating-system-NetBSD-0.8 0.8
+.ds doc-operating-system-NetBSD-0.8a 0.8A
+.ds doc-operating-system-NetBSD-0.9 0.9
+.ds doc-operating-system-NetBSD-0.9a 0.9A
+.ds doc-operating-system-NetBSD-1.0 1.0
+.ds doc-operating-system-NetBSD-1.0a 1.0A
+.ds doc-operating-system-NetBSD-1.1 1.1
+.ds doc-operating-system-NetBSD-1.2 1.2
+.ds doc-operating-system-NetBSD-1.2a 1.2A
+.ds doc-operating-system-NetBSD-1.2b 1.2B
+.ds doc-operating-system-NetBSD-1.2c 1.2C
+.ds doc-operating-system-NetBSD-1.2d 1.2D
+.ds doc-operating-system-NetBSD-1.2e 1.2E
+.ds doc-operating-system-NetBSD-1.3 1.3
+.ds doc-operating-system-NetBSD-1.3a 1.3A
+.ds doc-operating-system-NetBSD-1.4 1.4
+.ds doc-operating-system-NetBSD-1.5 1.5
+.
+.ds doc-operating-system-FreeBSD-1.0 1.0
+.ds doc-operating-system-FreeBSD-1.1 1.1
+.ds doc-operating-system-FreeBSD-1.1.5 1.1.5
+.ds doc-operating-system-FreeBSD-1.1.5.1 1.1.5.1
+.ds doc-operating-system-FreeBSD-2.0 2.0
+.ds doc-operating-system-FreeBSD-2.0.5 2.0.5
+.ds doc-operating-system-FreeBSD-2.1 2.1
+.ds doc-operating-system-FreeBSD-2.1.5 2.1.5
+.ds doc-operating-system-FreeBSD-2.1.6 2.1.6
+.ds doc-operating-system-FreeBSD-2.1.7 2.1.7
+.ds doc-operating-system-FreeBSD-2.2 2.2
+.ds doc-operating-system-FreeBSD-2.2.1 2.2.1
+.ds doc-operating-system-FreeBSD-2.2.2 2.2.2
+.ds doc-operating-system-FreeBSD-2.2.5 2.2.5
+.ds doc-operating-system-FreeBSD-2.2.6 2.2.6
+.ds doc-operating-system-FreeBSD-2.2.7 2.2.7
+.ds doc-operating-system-FreeBSD-2.2.8 2.2.8
+.ds doc-operating-system-FreeBSD-3.0 3.0
+.ds doc-operating-system-FreeBSD-3.1 3.1
+.ds doc-operating-system-FreeBSD-3.2 3.2
+.ds doc-operating-system-FreeBSD-3.3 3.3
+.ds doc-operating-system-FreeBSD-3.4 3.4
+.ds doc-operating-system-FreeBSD-3.5 3.5
+.ds doc-operating-system-FreeBSD-4.0 4.0
+.ds doc-operating-system-FreeBSD-4.1 4.1
+.ds doc-operating-system-FreeBSD-4.1.1 4.1.1
+.ds doc-operating-system-FreeBSD-4.2 4.2
+.ds doc-operating-system-FreeBSD-4.3 4.3
+.ds doc-operating-system-FreeBSD-5.0 5.0
+.
+.ds doc-operating-system-default BSD
+.
.de Os
-.ds oS Null
-.if "\\$1"" \{\
-. ds oS BSD Experimental
-.\}
-.if "\\$2"" \{\
-. ds aa Non-Null
-.\}
-.if "\\$1"ATT" \{\
-. ds oS AT&T
-. if "\\$2"" .as oS \0UNIX
-. if "\\$2"7th" .as oS \07th Edition
-. if "\\$2"7" .as oS \07th Edition
-. if "\\$2"III" .as oS \0System III
-. if "\\$2"3" .as oS \0System III
-. if "\\$2"V" .as oS \0System V
-. if "\\$2"V.2" .as oS \0System V Release 2
-. if "\\$2"V.3" .as oS \0System V Release 3
-. if "\\$2"V.4" .as oS \0System V Release 4
-.\}
-.if "\\$1"BSD" \{\
-. if "\\$2"3" .ds oS 3rd Berkeley Distribution
-. if "\\$2"4" .ds oS 4th Berkeley Distribution
-. if "\\$2"4.1" .ds oS 4.1 Berkeley Distribution
-. if "\\$2"4.2" .ds oS 4.2 Berkeley Distribution
-. if "\\$2"4.3" .ds oS 4.3 Berkeley Distribution
-. if "\\$2"4.3T" .ds oS 4.3-Tahoe Berkeley Distribution
-. if "\\$2"4.3R" .ds oS 4.3-Reno Berkeley Distribution
-. if "\\$2"4.3t" .ds oS 4.3-Tahoe Berkeley Distribution
-. if "\\$2"4.3r" .ds oS 4.3-Reno Berkeley Distribution
-. if "\\$2"4.4" .ds oS BSD Experimental
-.\}
-.if "\\*(oS"Null" .ds oS \0\\$1
-.if "\\*(aa"Non-Null" .as oS \0\\$2
-.rm aa
+. ds doc-operating-system Null
+.
+. if "\$1"" \
+. ds doc-operating-system "\*[doc-operating-system-default]
+.
+. if "\$1"ATT" \{\
+. ds doc-operating-system AT&T
+. if \A\$2 \{\
+. ie d doc-operating-system-ATT-\$2 \
+. as doc-operating-system " \*[doc-operating-system-ATT-\$2]
+. el \
+. as doc-operating-system " UNIX
+. \}\}
+.
+. if "\$1"BSD" \{\
+. if \A\$2 \{\
+. ie d doc-operating-system-BSD-\$2 \
+. ds doc-operating-system "\*[doc-operating-system-BSD-\$2]
+. el \
+. tm mdoc warning: .Os: Unknown BSD version `\$2' (#\n[.c])
+. \}\}
+.
+. if "\$1"NetBSD" \{\
+. ds doc-operating-system NetBSD
+. if \A\$2 \{\
+. ie d doc-operating-system-NetBSD-\$2 \
+. as doc-operating-system \~\*[doc-operating-system-NetBSD-\$2]
+. el \
+. tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c])
+. \}\}
+.
+. if "\$1"FreeBSD" \{\
+. ds doc-operating-system FreeBSD
+. if \A\$2 \{\
+. ie d doc-operating-system-FreeBSD-\$2 \
+. as doc-operating-system \~\*[doc-operating-system-FreeBSD-\$2]
+. el \
+. tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c])
+. \}\}
+.
+. if "\*[doc-operating-system]"Null" \{\
+. ds doc-operating-system \$1
+. if !"\$2"" \
+. as doc-operating-system " \$2
+. \}
..
+.
+.
+.\" NS doc-date-string global string
+.\" NS the manual page date as set by `Dd'
+.
+.ds doc-date-string
+.
+.
+.\" NS Dd user macro (not parsed, not callable)
+.\" NS set document date
+.\" NS
+.\" NS modifies:
+.\" NS doc-date-string
+.\" NS
+.\" NS local variables:
+.\" NS doc-date-XXX
+.\" NS
+.\" NS width register `Dd' set above
+.
+.ds doc-date-1 January
+.ds doc-date-2 February
+.ds doc-date-3 March
+.ds doc-date-4 April
+.ds doc-date-5 May
+.ds doc-date-6 June
+.ds doc-date-7 July
+.ds doc-date-8 August
+.ds doc-date-9 September
+.ds doc-date-10 October
+.ds doc-date-11 November
+.ds doc-date-12 December
+.
.de Dd
-.if !"\\*(dD"" .nr gX 1
-.ie \\n(.$>0 \{\
-. ie \\n(.$==3 \{\
-. ds dD \\$1 \\$2 \\$3
-. \}
-. el \{\
-. if "\\n(mo"1" .ds dD January
-. if "\\n(mo"2" .ds dD February
-. if "\\n(mo"3" .ds dD March
-. if "\\n(mo"4" .ds dD April
-. if "\\n(mo"5" .ds dD May
-. if "\\n(mo"6" .ds dD June
-. if "\\n(mo"7" .ds dD July
-. if "\\n(mo"8" .ds dD August
-. if "\\n(mo"9" .ds dD September
-. if "\\n(mo"10" .ds dD October
-. if "\\n(mo"11" .ds dD November
-. if "\\n(mo"12" .ds dD December
-. as dD \&\ \\n(dy, \\n(Yr
-. \}
-.\}
-.el \{\
-. ds dD Epoch
-.\}
-..
-.de hM
-.ev 1
-.pL
-.if !\\n(cR 'sp \\n(Hmu
-.tl @\\*(Hs\\*(hT\fP@\\*(Vs\\*(vT\fP@\\*(Hs\\*(hT\fP@
-'sp \\n(Hmu
-.ev
+. \" XXX: why do we need gX?
+. if "\*[doc-date-string]"" \
+. nr gX 1
+.
+. ie \n[.$] \{\
+. ie (\n[.$] == 3) \
+. ds doc-date-string \$1\~\$2 \$3
+. el \{\
+. ds doc-date-string "\*[doc-date-\n[mo]]
+. as doc-date-string \~\n[dy], \n[year]
+. \}
+. \}
+. el \
+. ds doc-date-string Epoch
..
-.de fM
-.ie \\n(cR 'br
-.el \{\
-. ev 1
-. pL
-. if !\\n(cR \{\
-' sp \\n(Fmu
-. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
-' bp
-. \}
-. ev
-.\}
-.\" .tm IN 444 fM .k == \\n(.k and nl == \\n(nl
+.
+.
+.\" NS doc-hyphen-flags global register
+.\" NS the parameter for the `.hy' request
+.\" NS
+.\" NS override this in `mdoc.local', if necessary.
+.
+.nr doc-hyphen-flags 12
+.
+.
+.\" NS doc-header macro
+.\" NS print page header
+.
+.de doc-header
+. ev doc-env-dh
+. doc-setup-page-layout
+. if !\n[cR] \
+' sp \n[doc-header-space]u
+. tl \*[doc-caption-font]\*[doc-header-string]\f[P]\*[doc-caption-font2]\*[doc-volume]\f[P]\*[doc-caption-font]\*[doc-header-string]\f[P]
+' sp \n[doc-header-space]u
+. ev
..
-.de lM
-.fl
-.if \\n(cR \{\
-' sp
-. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
-. pl \\n(nlu
-.\}
+.
+.
+.\" NS doc-footer macro
+.\" NS print page footer
+.
+.de doc-footer
+. ie \n[cR] \
+' br
+. el \{\
+. ev doc-caption-enviroment
+. doc-setup-page-layout
+' sp \n[doc-footer-space]u
+. ie \n[D] \{\
+. ie o \
+. tl %\*[doc-caption-font2]\*[doc-date-string]\f[P]\*[doc-caption-font]\*[doc-operating-system]\f[P]
+. el \
+. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]%
+. \}
+. el \
+. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]%
+' bp
+. ev
+. \}
..
-.de Pp
-.sp \\n(Ppu
-.ne 2
-.ns
+.
+.
+.\" NS doc-end-macro macro
+.\" NS finish output
+.
+.de doc-end-macro
+. \" We may still have a partial line in the environment. If this is the
+. \" case, and we happen to be on the last line of the page, the `.fl'
+. \" request will cause the page to be ejected and troff will immediately
+. \" exit. If we are in nroff mode, this would be unfortunate, since we
+. \" would never get a chance to output the footer. So we fudge the page
+. \" length to make sure that the last page is never ejected until we want
+. \" it to be.
+.
+. if \n[cR] \
+. pl +3v
+. fl
+.
+. if \n[doc-list-depth] \
+. tm mdoc warning: list open at EOF! A .Bl directive has no matching .El
+.
+. if \n[cR] \{\
+' sp
+. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]\*[doc-caption-font]\*[doc-operating-system]\f[P]
+. \" suppress empty lines after the footer
+. pl \n[nl]u
+. \}
..
-.de Lp
-.Pp
+.
+.
+.\" NS doc-paragraph macro
+.\" NS insert a paragraph
+.
+.de doc-paragraph
+. sp \n[doc-paragraph-space]u
+. if !\n[cR] \
+. ne 2
+. ns
..
+.
+.
+.\" NS Pp user macro (not parsed, not callable)
+.\" NS new paragraph
+.\" NS
+.\" NS width register `Pp' set above
+.
+.als Pp doc-paragraph
+.
+.
+.\" NS Lp user macro (not parsed, not callable)
+.\" NS same as .Pp
+.\" NS
+.\" NS width register `Lp' set above
+.
+.als Lp doc-paragraph
+.
+.
.de LP
-.tm Not a \-mdoc command: .LP
+. tm Not a \-mdoc command: .LP (#\n[.c])
..
+.
+.
.de PP
-.tm Not a \-mdoc command: .PP
+. tm Not a \-mdoc command: .PP (#\n[.c])
..
+.
+.
.de pp
-.tm Not a \-mdoc command: .pp
+. tm Not a \-mdoc command: .pp (#\n[.c])
..
+.
+.
+.de SH
+. tm Not a \-mdoc command: .SH (#\n[.c])
+..
+.
+.
+.\" NS Nd user macro (not parsed, not callable)
+.\" NS print name description
+.\" NS
+.\" NS width register `Nd' set above
+.
.de Nd
-\&\-\& \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+. nop \- \$*
+..
+.
+.
+.\" NS doc-in-see-also-section global register (bool)
+.\" NS whether we are in the `see also' section
+.
+.nr doc-in-see-also-section 0
+.
+.
+.\" NS doc-in-files-section global register (bool)
+.\" NS whether we are in the `files' section
+.
+.nr doc-in-files-section 0
+.
+.
+.\" NS doc-in-authors-section global register (bool)
+.\" NS whether we are in the `authors' section
+.
+.nr doc-in-authors-section 0
+.
+.
+.\" NS doc-first-parameter macro
+.\" NS return first parameter
+.\" NS
+.\" NS local variables:
+.\" NS doc-str-dfp
+.
+.de doc-first-parameter
+. ds doc-str-dfp "\$1
+..
+.
+.
+.\" NS Sh user macro (not callable)
+.\" NS section headers
+.\" NS
+.\" NS modifies:
+.\" NS doc-func-args-processed
+.\" NS doc-func-count
+.\" NS doc-in-authors-section
+.\" NS doc-in-files-section
+.\" NS doc-in-see-also-section
+.\" NS doc-in-synopsis-count
+.\" NS doc-indent-synopsis
+.\" NS doc-is-func
+.\" NS doc-num-func-args
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Sh
+.\" NS doc-reg-Sh1
+.\" NS doc-section-XXX
+.\" NS
+.\" NS width register `Sh' set in doc-common
+.
+.ds doc-section-name NAME
+.ds doc-section-synopsis SYNOPSIS
+.ds doc-section-description DESCRIPTION
+.ds doc-section-see-also SEE
+.ds doc-section-files FILES
+.ds doc-section-authors AUTHORS
+.
+.de Sh
+. ie \n[doc-arg-limit] \{\
+. \" we only allow `Sh' within `Sh'; it will change the font back to
+. \" `doc-Sh-font'
+. ie "\*[doc-macro-name]"Sh" \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Sh-font]\c
+. doc-print-recursive
+. \}
+. el \{\
+. tm Usage: .Sh section_name ... (#\n[.c])
+. doc-reset-args
+. \}\}
+. el \{\
+. tm Usage: .Sh not callable by other macros (#\n[.c])
+. doc-reset-args
+. \}\}
+. el \{\
+. if !\n[.$] \{\
+. tm Usage: .Sh section_name ... (#\n[.c])
+. return
+. \}
+.
+. ds doc-macro-name Sh
+. doc-parse-args \$@
+.
+. nr doc-in-synopsis-count 0
+. nr doc-indent-synopsis 0
+.
+. if t \
+' ad
+.
+. \" this resolves e.g. `.Sh "SEE ALSO"'
+. doc-first-parameter \$*
+.
+. ie "\*[doc-str-dfp]"\*[doc-section-name]" \{\
+. doc-setup-header
+' in 0
+. \}
+. el \{\
+. nr doc-in-see-also-section 0
+. nr doc-in-files-section 0
+. nr doc-in-authors-section 0
+.
+. ie "\*[doc-str-dfp]"\*[doc-section-synopsis]" \{\
+. if t \
+. na
+. nr doc-in-synopsis-count 1
+. \}
+. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
+. nr doc-is-func 0
+. nr doc-func-count 0
+. nr doc-func-args-processed 0
+. nr doc-num-func-args 0
+. \}
+. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-see-also]" \{\
+. if t \
+. na
+. nr doc-in-see-also-section 1
+. \}
+. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-files]" \
+. nr doc-in-files-section 1
+. el .if "\*[doc-str-dfp]"\*[doc-section-authors]" \
+. nr doc-in-authors-section 1
+. \}\}\}
+.
+. in 0
+. nr doc-have-author 0
+. \}
+.
+. doc-setup-page-layout
+' sp
+. ns
+. ta T .5i
+. if !\n[cR] \
+. ne 3
+' fi
+.
+. if t \{\
+. nr doc-reg-Sh \n[.ss]
+. nr doc-reg-Sh1 \n[.sss]
+. ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3)
+. \}
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Sh-font]\c
+. doc-print-recursive
+.
+. if t \
+. ss \n[doc-reg-Sh] \n[doc-reg-Sh1]
+.
+. in +\n[doc-subheader-indent]u
+. ns
+. \}
..
+.
+.
+.\" NS Ss user macro (not callable)
+.\" NS subsection
+.\" NS
+.\" NS local variable:
+.\" NS doc-reg-Ss
+.\" NS doc-reg-Ss1
+.\" NS
+.\" NS width register `Ss' set above
+.
.de Ss
-.sp
-.ne 2
-.ti -.25i
-\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\s0
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 2
-.br
+. ie \n[doc-arg-limit] \{\
+. \" we only allow `Ss' within `Ss'; it will change the font back to
+. \" `doc-Sh-font'
+. ie "\*[doc-macro-name]"Ss" \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Sh-font]\c
+. doc-print-recursive
+. \}
+. el \{\
+. tm Usage: .Ss subsection_name ... (#\n[.c])
+. doc-reset-args
+. \}\}
+. el \{\
+. tm Usage: .Ss not callable by other macros (#\n[.c])
+. doc-reset-args
+. \}\}
+. el \{\
+. if !\n[.$] \{\
+. tm Usage: .Ss subsection_name ... (#\n[.c])
+. return
+. \}
+.
+. ds doc-macro-name Ss
+. doc-parse-args \$@
+.
+. sp
+. if !\n[cR] \
+. ne 3
+. ti -.25i
+.
+. nr doc-reg-Ss \n[.ss]
+. nr doc-reg-Ss1 \n[.sss]
+. ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4)
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Sh-font]\c
+. doc-print-recursive
+.
+. ss \n[doc-reg-Ss] \n[doc-reg-Ss1]
+.
+. ta T .5i
+. if !\n[cR] \
+. ne 2
+. br
+. \}
..
+.
+.
+.\" NS Rd macro (not parsed, not callable)
+.\" NS print global register dump to stderr
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Rd
+.
.de Rd
-.tm MDOC REGISTER DUMP
-.tm Db==\\n(Db register DEBUG MODE
-.tm L[0-9] registers - stack of list types
-.tm L0==\\n(L0
-.tm L1==\\n(L1
-.tm L2==\\n(L2
-.tm L3==\\n(L3
-.tm L4==\\n(L4
-.tm L5==\\n(L5
-.tm L6==\\n(L6
-.tm L7==\\n(L7
-.tm L8==\\n(L8
-.tm L9==\\n(L9
-.tm O[0-9] registers - stack of indent
-.tm O0==\\n(O0
-.tm O1==\\n(O1
-.tm O2==\\n(O2
-.tm O3==\\n(O3
-.tm O4==\\n(O4
-.tm O5==\\n(O5
-.tm O6==\\n(O6
-.tm O7==\\n(O7
-.tm O8==\\n(O8
-.tm O9==\\n(O9
-.tm aC==\\n(aC register argument counter (aV/fV)
-.tm aJ==\\n(aJ register (for vR)
-.tm aN==\\n(aN register
-.tm aP==\\n(aP register argument pointer (aV)
-.tm aT==\\n(aT register argument type
-.tm aa==\\n(aa local register
-.tm bK==\\n(bK register - Book Name flag
-.tm cF==\\n(cF register save current font
-.tm cI==\\n(cI register - column indent width
-.tm cZ==\\n(cZ register save current font size
-.tm dK==\\n(dK register - Date flag
-.tm d[0-9] registers - display-type stack
-.tm d0==\\n(d0
-.tm d1==\\n(d1
-.tm d2==\\n(d2
-.tm d3==\\n(d3
-.tm d4==\\n(d4
-.tm d5==\\n(d5
-.tm d6==\\n(d6
-.tm d7==\\n(d7
-.tm d8==\\n(d8
-.tm d9==\\n(d9
-.tm dZ==\\n(dZ register diversion count
-.tm fD==\\n(fD register subroutine test (in synopsis only)
-.tm fV==\\n(fV register argument counter (must set to \\n(.$ prior to
-.tm fY==\\n(fY register - dick with old style function declarations (fortran)
-.tm fZ==\\n(fZ register also subroutine count (in synopsis only)
-.tm h[0-9] register horizontal tag stack (continuous if 1, break if
-.tm h0==\\n(h0
-.tm h1==\\n(h1
-.tm h2==\\n(h2
-.tm h3==\\n(h3
-.tm h4==\\n(h4
-.tm h5==\\n(h5
-.tm h6==\\n(h6
-.tm h7==\\n(h7
-.tm h8==\\n(h8
-.tm h9==\\n(h9
-.tm iD==\\n(iD local register
-.tm iI==\\n(iI local register (indent for inline debug mode)
-.tm iN==\\n(iN register DEBUG MODE (inline if 1, to stderr if
-.tm iS==\\n(iS register - indent second command line in a synopsis
-.tm jK==\\n(jK register - [reference] Journal Name flag
-.tm jM==\\n(jM local register
-.tm jN==\\n(jN local register
-.tm lC==\\n(lC register - list type stack counter
-.tm lK==\\n(lK register count of lines read from input file
-.tm nK==\\n(nK register - [reference] issue number flag
-.tm nU==\\n(nU register count
-.tm oK==\\n(oK register - [reference] optional information flag
-.tm oM==\\n(oM register (extension possible)
-.tm o[0-9] register offset stack (nested tags)
-.tm o0==\\n(o0
-.tm o1==\\n(o1
-.tm o2==\\n(o2
-.tm o3==\\n(o3
-.tm o4==\\n(o4
-.tm o5==\\n(o5
-.tm o6==\\n(o6
-.tm o7==\\n(o7
-.tm o8==\\n(o8
-.tm o9==\\n(o9
-.tm oM==\\n(oM register open ended line flag
-.tm pK==\\n(pK register - [reference] page number flag
-.tm qK==\\n(qK register - Corporate or Foreign Author flag
-.tm rK==\\n(rK register - [reference] report flag
-.tm rS==\\n(rS register - Reference Start flag
-.tm sM==\\n(sM register - default is one (space mode on)
-.tm tK==\\n(tK register - reference title flag
-.tm tP==\\n(tP register tag flag (for diversions)
-.tm tX==\\n(tX register (initial class)
-.tm tY==\\n(tY register (next possible lC value)
-.tm t[0-9] register tag string stack (nested tags)
-.tm t0==\\n(t0
-.tm t1==\\n(t1
-.tm t2==\\n(t2
-.tm t3==\\n(t3
-.tm t4==\\n(t4
-.tm t5==\\n(t5
-.tm t6==\\n(t6
-.tm t7==\\n(t7
-.tm t8==\\n(t8
-.tm t9==\\n(t9
-.tm uK==\\n(uK register - reference author(s) counter
-.tm vK==\\n(vK register - reference volume flag
-.tm v[0-9] register vertical tag break stack
-.tm v0==\\n(v0
-.tm v1==\\n(v1
-.tm v2==\\n(v2
-.tm v3==\\n(v3
-.tm v4==\\n(v4
-.tm v5==\\n(v5
-.tm v6==\\n(v6
-.tm v7==\\n(v7
-.tm v8==\\n(v8
-.tm v9==\\n(v9
-.tm w[0-9] register tag stack (nested tags)
-.tm w0==\\n(w0
-.tm w1==\\n(w1
-.tm w2==\\n(w2
-.tm w3==\\n(w3
-.tm w4==\\n(w4
-.tm w5==\\n(w5
-.tm w6==\\n(w6
-.tm w7==\\n(w7
-.tm w8==\\n(w8
-.tm w9==\\n(w9
-.tm xX==\\n(xX local register
-.tm END OF REGISTER DUMP
+. tm MDOC GLOBAL REGISTER DUMP
+. tm doc-macro-name == `\*[doc-macro-name]'
+. tm doc-arg-limit == \n[doc-arg-limit]
+. tm doc-num-args == \n[doc-num-args]
+. tm doc-arg-ptr == \n[doc-arg-ptr]
+.
+. nr doc-reg-Rd 1
+. while (\n[doc-reg-Rd] <= \n[doc-arg-limit]) \{\
+. tm doc-arg\n[doc-reg-Rd] == `\*[doc-arg\n[doc-reg-Rd]]'
+. tm doc-type\n[doc-reg-Rd] == \n[doc-type\n[doc-reg-Rd]]
+. tm doc-space\n[doc-reg-Rd] == `\*[doc-space\n[doc-reg-Rd]]'
+. nr doc-reg-Rd +1
+. \}
+.
+. tm doc-curr-font == \n[doc-curr-font]
+. tm doc-curr-size == \n[doc-curr-size]
+. tm doc-in-synopsis-count == \n[doc-in-synopsis-count]
+. tm doc-indent-synopsis == \n[doc-indent-synopsis]
+. tm doc-have-decl == \n[doc-have-decl]
+. tm doc-have-var == \n[doc-have-var]
+. tm doc-command-name == `\*[doc-command-name]'
+. tm doc-quote-left == `\*[doc-quote-left]'
+. tm doc-quote-right == `\*[doc-quote-right]'
+. tm doc-nesting-level == \n[doc-nesting-level]
+. tm doc-in-list == \n[doc-in-list]
+. tm doc-space == `\*[doc-space]'
+. tm doc-saved-space == `\*[doc-saved-space]'
+. tm doc-space-mode == \n[doc-space-mode]
+. tm doc-have-space == \n[doc-have-space]
+. tm doc-have-slot == \n[doc-have-slot]
+. tm doc-keep-type == \n[doc-keep-type]
+. tm doc-display-depth == \n[doc-display-depth]
+. tm doc-is-compact == \n[doc-is-compact]
+.
+. nr doc-reg-Rd 0
+. while (\n[doc-reg-Rd] <= \n[doc-display-depth]) \{\
+. tm doc-display-type-stack\n[doc-reg-Rd] == `\*[doc-display-type-stack\n[doc-reg-Rd]]'
+. tm doc-display-indent-stack\n[doc-reg-Rd] == \n[doc-display-indent-stack\n[doc-reg-Rd]]
+. tm doc-display-ad-stack\n[doc-reg-Rd] == \n[doc-display-ad-stack\n[doc-reg-Rd]]
+. tm doc-display-fi-stack\n[doc-reg-Rd] == \n[doc-display-fi-stack\n[doc-reg-Rd]]
+. nr doc-reg-Rd +1
+. \}
+.
+. tm doc-fontmode-depth == \n[doc-fontmode-depth]
+.
+. nr doc-reg-Rd 1
+. while (\n[doc-reg-Rd] <= \n[doc-fontmode-depth]) \{\
+. tm doc-fontmode-font-stack\n[doc-reg-Rd] == `\n[doc-fontmode-font-stack\n[doc-reg-Rd]]'
+. tm doc-fontmode-size-stack\n[doc-reg-Rd] == `\n[doc-fontmode-size-stack\n[doc-reg-Rd]]'
+. nr doc-reg-Rd +1
+. \}
+.
+. tm doc-list-depth == \n[doc-list-depth]
+.
+. nr doc-reg-Rd 1
+. while (\n[doc-reg-Rd] <= \n[doc-list-depth]) \{\
+. tm doc-list-type-stack\n[doc-reg-Rd] == `\*[doc-list-type-stack\n[doc-reg-Rd]]'
+. tm doc-list-indent-stack\n[doc-reg-Rd] == \n[doc-list-indent-stack\n[doc-reg-Rd]]
+. tm doc-compact-list-stack\n[doc-reg-Rd] == \n[doc-compact-list-stack\n[doc-reg-Rd]]
+. tm doc-tag-prefix-stack\n[doc-reg-Rd] == `\*[doc-tag-prefix-stack\n[doc-reg-Rd]]'
+. tm doc-tag-width-stack\n[doc-reg-Rd] == `\*[doc-tag-width-stack\n[doc-reg-Rd]]'
+. tm doc-list-offset-stack\n[doc-reg-Rd] == \n[doc-list-offset-stack\n[doc-reg-Rd]]
+. tm doc-enum-list-count-stack\n[doc-reg-Rd] == \n[doc-enum-list-count-stack\n[doc-reg-Rd]]
+. nr doc-reg-Rd +1
+. \}
+.
+. tm doc-have-indent == \n[doc-have-indent]
+. tm doc-saved-Pa-font == `\*[doc-saved-Pa-font]'
+. tm doc-curr-type == \n[doc-curr-type]
+. tm doc-curr-arg == `\*[doc-curr-arg]'
+. tm doc-have-diag-list == \n[doc-have-diag-list]
+. tm doc-diag-list-input-line-count == \n[doc-diag-list-input-line-count]
+. tm doc-num-columns == \n[doc-num-columns]
+. tm doc-next-list-depth == \n[doc-next-list-depth]
+. tm doc-column-indent-width == \n[doc-column-indent-width]
+. tm doc-is-func == \n[doc-is-func]
+. tm doc-have-old-func == \n[doc-have-old-func]
+. tm doc-func-arg-count == \n[doc-func-arg-count]
+. tm doc-func-arg == `\*[doc-func-arg]'
+. tm doc-num-func-args == \n[doc-num-func-args]
+. tm doc-func-args-processed == \n[doc-func-args-processed]
+. tm doc-have-func == \n[doc-have-func]
+. tm doc-is-reference == \n[doc-is-reference]
+. tm doc-reference-count == \n[doc-reference-count]
+. tm doc-author-count == \n[doc-author-count]
+.
+. nr doc-reg-Rd 0
+. while (\n[doc-reg-Rd] <= \n[doc-author-count]) \{\
+. tm doc-author-name\n[doc-reg-Rd] == `\*[doc-author-name\n[doc-reg-Rd]]'
+. nr doc-reg-Rd +1
+. \}
+.
+. tm doc-book-count == \n[doc-book-count]
+. tm doc-book-name == `\*[doc-book-name]'
+. tm doc-date-count == \n[doc-date-count]
+. tm doc-date == `\*[doc-date]'
+. tm doc-publisher-count == \n[doc-publisher-count]
+. tm doc-publisher-name == `\*[doc-publisher-name]'
+. tm doc-journal-count == \n[doc-journal-count]
+. tm doc-journal-name == `\*[doc-journal-name]'
+. tm doc-issue-count == \n[doc-issue-count]
+. tm doc-issue-name == `\*[doc-issue-name]'
+. tm doc-optional-count == \n[doc-optional-count]
+. tm doc-optional-string == `\*[doc-optional-string]'
+. tm doc-page-number-count == \n[doc-page-number-count]
+. tm doc-page-number-string == `\*[doc-page-number-string]'
+. tm doc-corporate-count == \n[doc-corporate-count]
+. tm doc-corporate-name == `\*[doc-corporate-name]'
+. tm doc-report-count == \n[doc-report-count]
+. tm doc-report-name == `\*[doc-report-name]'
+. tm doc-reference-title-count == \n[doc-reference-title-count]
+. tm doc-reference-title-name == `\*[doc-reference-title-name]'
+. tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]'
+. tm doc-volume-count == \n[doc-volume-count]
+. tm doc-volume-name == `\*[doc-volume-name]'
+. tm doc-have-author == \n[doc-have-author]
+.
+. tm doc-document-title == `\*[doc-document-title]'
+. tm doc-volume == `\*[doc-volume]'
+. tm doc-section == `\*[doc-section]'
+. tm doc-operating-system == `\*[doc-operating-system]'
+. tm doc-date-string == `\*[doc-date-string]'
+. tm doc-header-space == \n[doc-header-space]
+. tm doc-footer-space == \n[doc-footer-space]
+. tm doc-display-vertical == \n[doc-display-vertical]
+. tm doc-header-string == `\*[doc-header-string]'
+. tm doc-in-see-also-section == \n[doc-in-see-also-section]
+. tm doc-in-files-section == \n[doc-in-files-section]
+. tm doc-in-authors-section == \n[doc-in-authors-section]
+.
+. tm END OF GLOBAL REGISTER DUMP
..
+.
+.
+.ec
+.
+.\" EOF
diff --git a/tmac/doc-common.new b/tmac/doc-common.new
deleted file mode 100755
index dbd05ff2..00000000
--- a/tmac/doc-common.new
+++ /dev/null
@@ -1,1027 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)doc-common 5.7 (Berkeley) 8/5/91
-.\"
-.\" %beginstrip%
-.
-.
-.\" Macro Identifiers. For each user macro a corresponding register with
-.\" the same name must exist. Its value must not be zero.
-.
-.nr %A 1
-.nr %B 1
-.nr %D 1
-.nr %J 1
-.nr %N 1
-.nr %O 1
-.nr %P 1
-.nr %Q 1
-.nr %R 1
-.nr %T 1
-.nr %V 1
-.nr Ac 3
-.nr Ad 12n
-.nr An 12n
-.nr Ao 12n
-.nr Ap 2
-.nr Aq 12n
-.nr Ar 12n
-.nr At 1
-.nr Bc 3
-.nr Bf 8n\" ?
-.nr Bk 8n\" ?
-.nr Bl 1
-.nr Bo 12n
-.nr Bq 12n
-.nr Brc 3
-.nr Bro 12n
-.nr Brq 12n
-.nr Bsx 1
-.nr Bt 8n\" ?
-.nr Bx 1
-.nr Cd 12n
-.nr Cm 10n
-.nr D1 8n\" ?
-.nr Dc 3
-.nr Dl 8n\" ?
-.nr Dt 8n\" ?
-.nr Do 12n
-.nr Dq 12n
-.nr Dv 12n
-.nr Ec 3
-.nr Ef 8n\" ?
-.nr Ek 8n\" ?
-.nr El 1
-.nr Em 10n
-.nr En 12n
-.nr Eo 12n
-.nr Eq 12n
-.nr Er 17n
-.nr Es 12n
-.nr Ev 15n
-.nr Ex 10n
-.nr Fa 12n
-.nr Fc 3
-.nr Fd 12n\" ?
-.nr Fl 10n
-.nr Fn 16n
-.nr Fo 16n
-.nr Fr 12n\" ?
-.nr Ft 8n\" ?
-.nr Fx 1
-.nr Ic 10n
-.nr In 12n\" ?
-.nr It 8n\" ?
-.nr Lb 11n
-.nr Ld 4n
-.nr Li 16n
-.nr Lk 6n\" ?
-.nr Lp 8n\" ?
-.nr Me 6n
-.nr Ms 6n
-.nr Mt 6n\" ?
-.nr Nd 8n\" ?
-.nr Nm 10n
-.nr No 12n
-.nr Ns 2
-.nr Nx 1
-.nr Oc 3
-.nr Oo 10n
-.nr Op 14n
-.nr Or 6n\" ?
-.nr Os 6n\" ?
-.nr Ox 1
-.nr Pa 32n
-.nr Pc 3
-.nr Pf 12n
-.nr Po 12n
-.nr Pp 8n\" ?
-.nr Pq 12n
-.nr Qc 3
-.nr Ql 16n
-.nr Qo 12n
-.nr Qq 12n
-.nr Rv 1
-.nr Sc 3
-.nr Sf 8n\" ?
-.nr Sh 8n
-.nr Sm 8n\" ?
-.nr So 12n
-.nr Sq 12n
-.nr Ss 8n
-.nr St 8n\" ?
-.nr Sx 16n
-.nr Sy 6n
-.nr Ta 2
-.nr Tn 10n
-.nr Ud 8n\" ?
-.nr Ux 1
-.nr Va 12n
-.nr Vt 8n\" ?
-.nr Xc 3
-.nr Xo 1
-.nr Xr 10n
-.
-.
-.\" requests which must be processed after the closing delimiter of `Op'
-.\" and friends
-.ds doc-after-Ao
-.ds doc-after-Bo
-.ds doc-after-Bro
-.ds doc-after-Do
-.ds doc-after-Eo
-.ds doc-after-Fo
-.ds doc-after-Ns
-.ds doc-after-Oo
-.ds doc-after-Po
-.ds doc-after-Qo
-.ds doc-after-So
-.ds doc-after-Xo
-.
-.
-.nr doc-display-indent 6n
-.
-.
-.\" space strings
-.
-.ds doc-soft-space " \"
-.ds doc-hard-space \~
-.ds doc-tab \t
-.
-.
-.eo
-.
-.
-.\" punctuation values (suffix=3, prefix = 4)
-.
-.nr doc-punct. 3
-.nr doc-punct, 3
-.nr doc-punct: 3
-.nr doc-punct; 3
-.nr doc-punct( 4
-.nr doc-punct) 3
-.nr doc-punct[ 4
-.nr doc-punct] 3
-.nr doc-punct? 3
-.nr doc-punct! 3
-.
-.
-.\" obsolete commands
-.
-.de Ds
-. tm mdoc error: .Ds defunct (#\n[.c])
-..
-.nr Ds 6n
-.
-.
-.\" header assembly macros
-.
-.\" NS doc-document-title global string
-.\" NS the title of the manual page
-.
-.ds doc-document-title UNTITLED
-.
-.
-.\" NS doc-volume global string
-.\" NS the volume where the manual page belongs to
-.
-.ds doc-volume LOCAL
-.
-.
-.\" NS doc-section global string
-.\" NS the manual section
-.
-.ds doc-section Null
-.
-.
-.\" NS Dt user macro (not parsed, not callable)
-.\" NS document title
-.\" NS
-.\" NS modifies:
-.\" NS doc-document-title
-.\" NS doc-section
-.\" NS doc-volume
-.\" NS
-.\" NS local variables:
-.\" NS doc-volume-as-XXX
-.\" NS doc-volume-ds-XXX
-.\" NS
-.\" NS width register `Dt' set above
-.
-.\" an alternative, more detailed scheme for naming the manual sections
-.\"
-.\" .ds doc-volume-ds-1 System General Commands Manual
-.\" .ds doc-volume-ds-2 System Calls Manual
-.\" .ds doc-volume-ds-3 System Library Functions Manual
-.\" .ds doc-volume-ds-4 System Kernel Interfaces Manual
-.\" .ds doc-volume-ds-5 System File Formats Manual
-.\" .ds doc-volume-ds-6 System Games Manual
-.\" .ds doc-volume-ds-7 System Miscellaneous Information Manual
-.\" .ds doc-volume-ds-8 System Manager's Manual
-.\" .ds doc-volume-ds-9 System Kernel Developer's Manual
-.
-.ds doc-volume-ds-USD System User's Supplementary Documents
-.ds doc-volume-ds-PS1 System Programmer's Supplementary Documents
-.ds doc-volume-ds-AMD System Ancestral Manual Documents
-.ds doc-volume-ds-SMM System Manager's Manual
-.ds doc-volume-ds-URM System Reference Manual
-.ds doc-volume-ds-PRM System Programmer's Manual
-.ds doc-volume-ds-KM System Kernel Manual
-.ds doc-volume-ds-IND System Manual Master Index
-.ds doc-volume-ds-LOCAL System Local Manual
-.ds doc-volume-ds-CON System Contributed Software Manual
-.
-.als doc-volume-ds-MMI doc-volume-ds-IND
-.als doc-volume-ds-LOC doc-volume-ds-LOCAL
-.
-.ds doc-volume-as-alpha (Alpha Architecture)
-.als doc-volume-as-Alpha doc-volume-as-alpha
-.ds doc-volume-as-amiga (Amiga Architecture)
-.ds doc-volume-as-arc (Arc Architecture)
-.ds doc-volume-as-arm26 (ARM26 Architecture)
-.ds doc-volume-as-arm32 (ARM32 Architecture)
-.ds doc-volume-as-atari (Atari Architecture)
-.ds doc-volume-as-bebox (BEbox Architecture)
-.ds doc-volume-as-cobalt (Cobalt Architecture)
-.ds doc-volume-as-evbsh3 (Evbsh3 Architecture)
-.ds doc-volume-as-hp300 (HP300 Architecture)
-.ds doc-volume-as-hpcmips (HPcmips Architecture)
-.ds doc-volume-as-i386 (i386 Architecture)
-.ds doc-volume-as-luna68k (luna68k Architecture)
-.ds doc-volume-as-m68k (m68k Architecture)
-.ds doc-volume-as-mac68k (mac68k Architecture)
-.ds doc-volume-as-macppc (macppc Architecture)
-.ds doc-volume-as-mips (MIPS Architecture)
-.ds doc-volume-as-mmeye (mmeye Architecture)
-.ds doc-volume-as-mvme68k (mvme68k Architecture)
-.ds doc-volume-as-news68k (news68k Architecture)
-.ds doc-volume-as-newsmips (newsmips Architecture)
-.ds doc-volume-as-next68k (next68k Architecture)
-.ds doc-volume-as-ofppc (ofppc Architecture)
-.ds doc-volume-as-pc532 (pc532 Architecture)
-.ds doc-volume-as-pmax (pmax Architecture)
-.ds doc-volume-as-powerpc (powerpc Architecture)
-.ds doc-volume-as-prep (prep Architecture)
-.ds doc-volume-as-sgimips (sgimips Architecture)
-.ds doc-volume-as-sh3 (sh3 Architecture)
-.ds doc-volume-as-sparc (SPARC Architecture)
-.ds doc-volume-as-sparc64 (sparc64 Architecture)
-.ds doc-volume-as-sun3 (sun3 Architecture)
-.ds doc-volume-as-tahoe (Tahoe Architecture)
-.ds doc-volume-as-vax (VAX Architecture)
-.ds doc-volume-as-x68k (x68k Architecture)
-.
-.de Dt
-. \" reset default arguments
-. ds doc-document-title UNTITLED
-. ds doc-volume LOCAL
-. ds doc-section Null
-.
-. if !"\$1"" \
-. ds doc-document-title "\$1
-.
-. if !"\$2"" \{\
-. ds doc-section \$2
-. ie \B\$2 \{\
-. if ((\$2 >= 1) & (\$2 <= 9)) \{\
-. ds doc-volume "\*[doc-volume-ds-URM]
-. ie d doc-volume-ds-\$2 \
-. ds doc-volume "\*[doc-volume-ds-\$2]
-. el \{ .ie ((\$2 > 1) & (\$2 < 6)) \
-. ds doc-volume "\*[doc-volume-ds-PRM]
-. el \{ .ie (\$2 == 8) \
-. ds doc-volume "\*[doc-volume-ds-SMM]
-. el \{ .if (\$2 == 9) \
-. ds doc-volume "\*[doc-volume-ds-KM]
-. \}\}\}\}\}
-. el \{ .ie "\$2"unass" .ds doc-volume DRAFT
-. el \{ .ie "\$2"draft" .ds doc-volume DRAFT
-. el \{ .ie "\$2"paper" .ds doc-volume UNTITLED
-. el \
-. tm mdoc warning: .Dt: unknown section `\$2' (#\n[.c])
-. \}\}\}\}
-.
-. if \A\$3 \{\
-. if d doc-volume-ds-\$3 \
-. ds doc-volume "\*[doc-volume-ds-\$3]
-.
-. if d doc-volume-as-\$3 \
-. as doc-volume " \*[doc-volume-as-\$3]
-. \}
-.
-. if !"\$3"" \
-. if "\*[doc-volume]"LOCAL" \
-. ds doc-volume \$3
-..
-.
-.
-.\" NS doc-operating-system global string
-.\" NS the exact version of the operating system
-.
-.ds doc-operating-system
-.
-.
-.\" NS Os user macro (not parsed, not callable)
-.\" NS operating system
-.\" NS
-.\" NS modifies:
-.\" NS doc-operating-system
-.\" NS
-.\" NS local variables:
-.\" NS doc-operating-system-XXX-XXX
-.\" NS
-.\" NS width register `Os' set above
-.
-.ds doc-operating-system-ATT-7 7th\~Edition
-.als doc-operating-system-ATT-7th doc-operating-system-ATT-7
-.ds doc-operating-system-ATT-3 System\~III
-.als doc-operating-system-ATT-III doc-operating-system-ATT-3
-.ds doc-operating-system-ATT-V System\~V
-.ds doc-operating-system-ATT-V.2 System\~V Release\~2
-.ds doc-operating-system-ATT-V.3 System\~V Release\~3
-.ds doc-operating-system-ATT-V.4 System\~V Release\~4
-.
-.ds doc-operating-system-BSD-3 3rd\~Berkeley Distribution
-.ds doc-operating-system-BSD-4 4th\~Berkeley Distribution
-.ds doc-operating-system-BSD-4.1 4.1\~Berkeley Distribution
-.ds doc-operating-system-BSD-4.2 4.2\~Berkeley Distribution
-.ds doc-operating-system-BSD-4.3 4.3\~Berkeley Distribution
-.ds doc-operating-system-BSD-4.3T 4.3-Tahoe Berkeley Distribution
-.ds doc-operating-system-BSD-4.3R 4.3-Reno Berkeley Distribution
-.als doc-operating-system-BSD-4.3t doc-operating-system-BSD-4.3T
-.als doc-operating-system-BSD-4.3r doc-operating-system-BSD-4.3R
-.ds doc-operating-system-BSD-4.4 4.4BSD
-.
-.ds doc-operating-system-NetBSD-0.8 0.8
-.ds doc-operating-system-NetBSD-0.8a 0.8A
-.ds doc-operating-system-NetBSD-0.9 0.9
-.ds doc-operating-system-NetBSD-0.9a 0.9A
-.ds doc-operating-system-NetBSD-1.0 1.0
-.ds doc-operating-system-NetBSD-1.0a 1.0A
-.ds doc-operating-system-NetBSD-1.1 1.1
-.ds doc-operating-system-NetBSD-1.2 1.2
-.ds doc-operating-system-NetBSD-1.2a 1.2A
-.ds doc-operating-system-NetBSD-1.2b 1.2B
-.ds doc-operating-system-NetBSD-1.2c 1.2C
-.ds doc-operating-system-NetBSD-1.2d 1.2D
-.ds doc-operating-system-NetBSD-1.2e 1.2E
-.ds doc-operating-system-NetBSD-1.3 1.3
-.ds doc-operating-system-NetBSD-1.3a 1.3A
-.ds doc-operating-system-NetBSD-1.4 1.4
-.ds doc-operating-system-NetBSD-1.5 1.5
-.
-.ds doc-operating-system-FreeBSD-1.0 1.0
-.ds doc-operating-system-FreeBSD-1.1 1.1
-.ds doc-operating-system-FreeBSD-1.1.5 1.1.5
-.ds doc-operating-system-FreeBSD-1.1.5.1 1.1.5.1
-.ds doc-operating-system-FreeBSD-2.0 2.0
-.ds doc-operating-system-FreeBSD-2.0.5 2.0.5
-.ds doc-operating-system-FreeBSD-2.1 2.1
-.ds doc-operating-system-FreeBSD-2.1.5 2.1.5
-.ds doc-operating-system-FreeBSD-2.1.6 2.1.6
-.ds doc-operating-system-FreeBSD-2.1.7 2.1.7
-.ds doc-operating-system-FreeBSD-2.2 2.2
-.ds doc-operating-system-FreeBSD-2.2.1 2.2.1
-.ds doc-operating-system-FreeBSD-2.2.2 2.2.2
-.ds doc-operating-system-FreeBSD-2.2.5 2.2.5
-.ds doc-operating-system-FreeBSD-2.2.6 2.2.6
-.ds doc-operating-system-FreeBSD-2.2.7 2.2.7
-.ds doc-operating-system-FreeBSD-2.2.8 2.2.8
-.ds doc-operating-system-FreeBSD-3.0 3.0
-.ds doc-operating-system-FreeBSD-3.1 3.1
-.ds doc-operating-system-FreeBSD-3.2 3.2
-.ds doc-operating-system-FreeBSD-3.3 3.3
-.ds doc-operating-system-FreeBSD-3.4 3.4
-.ds doc-operating-system-FreeBSD-3.5 3.5
-.ds doc-operating-system-FreeBSD-4.0 4.0
-.ds doc-operating-system-FreeBSD-4.1 4.1
-.ds doc-operating-system-FreeBSD-4.1.1 4.1.1
-.ds doc-operating-system-FreeBSD-4.2 4.2
-.ds doc-operating-system-FreeBSD-4.3 4.3
-.ds doc-operating-system-FreeBSD-5.0 5.0
-.
-.ds doc-operating-system-default BSD
-.
-.de Os
-. ds doc-operating-system Null
-.
-. if "\$1"" \
-. ds doc-operating-system "\*[doc-operating-system-default]
-.
-. if "\$1"ATT" \{\
-. ds doc-operating-system AT&T
-. if \A\$2 \{\
-. ie d doc-operating-system-ATT-\$2 \
-. as doc-operating-system " \*[doc-operating-system-ATT-\$2]
-. el \
-. as doc-operating-system " UNIX
-. \}\}
-.
-. if "\$1"BSD" \{\
-. if \A\$2 \{\
-. ie d doc-operating-system-BSD-\$2 \
-. ds doc-operating-system "\*[doc-operating-system-BSD-\$2]
-. el \
-. tm mdoc warning: .Os: Unknown BSD version `\$2' (#\n[.c])
-. \}\}
-.
-. if "\$1"NetBSD" \{\
-. ds doc-operating-system NetBSD
-. if \A\$2 \{\
-. ie d doc-operating-system-NetBSD-\$2 \
-. as doc-operating-system \~\*[doc-operating-system-NetBSD-\$2]
-. el \
-. tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c])
-. \}\}
-.
-. if "\$1"FreeBSD" \{\
-. ds doc-operating-system FreeBSD
-. if \A\$2 \{\
-. ie d doc-operating-system-FreeBSD-\$2 \
-. as doc-operating-system \~\*[doc-operating-system-FreeBSD-\$2]
-. el \
-. tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c])
-. \}\}
-.
-. if "\*[doc-operating-system]"Null" \{\
-. ds doc-operating-system \$1
-. if !"\$2"" \
-. as doc-operating-system " \$2
-. \}
-..
-.
-.
-.\" NS doc-date-string global string
-.\" NS the manual page date as set by `Dd'
-.
-.ds doc-date-string
-.
-.
-.\" NS Dd user macro (not parsed, not callable)
-.\" NS set document date
-.\" NS
-.\" NS modifies:
-.\" NS doc-date-string
-.\" NS
-.\" NS local variables:
-.\" NS doc-date-XXX
-.\" NS
-.\" NS width register `Dd' set above
-.
-.ds doc-date-1 January
-.ds doc-date-2 February
-.ds doc-date-3 March
-.ds doc-date-4 April
-.ds doc-date-5 May
-.ds doc-date-6 June
-.ds doc-date-7 July
-.ds doc-date-8 August
-.ds doc-date-9 September
-.ds doc-date-10 October
-.ds doc-date-11 November
-.ds doc-date-12 December
-.
-.de Dd
-. \" XXX: why do we need gX?
-. if "\*[doc-date-string]"" \
-. nr gX 1
-.
-. ie \n[.$] \{\
-. ie (\n[.$] == 3) \
-. ds doc-date-string \$1\~\$2 \$3
-. el \{\
-. ds doc-date-string "\*[doc-date-\n[mo]]
-. as doc-date-string \~\n[dy], \n[year]
-. \}
-. \}
-. el \
-. ds doc-date-string Epoch
-..
-.
-.
-.\" NS doc-hyphen-flags global register
-.\" NS the parameter for the `.hy' request
-.\" NS
-.\" NS override this in `mdoc.local', if necessary.
-.
-.nr doc-hyphen-flags 12
-.
-.
-.\" NS doc-header macro
-.\" NS print page header
-.
-.de doc-header
-. ev doc-env-dh
-. doc-setup-page-layout
-. if !\n[cR] \
-' sp \n[doc-header-space]u
-. tl \*[doc-caption-font]\*[doc-header-string]\f[P]\*[doc-caption-font2]\*[doc-volume]\f[P]\*[doc-caption-font]\*[doc-header-string]\f[P]
-' sp \n[doc-header-space]u
-. ev
-..
-.
-.
-.\" NS doc-footer macro
-.\" NS print page footer
-.
-.de doc-footer
-. ie \n[cR] \
-' br
-. el \{\
-. ev doc-caption-enviroment
-. doc-setup-page-layout
-' sp \n[doc-footer-space]u
-. ie \n[D] \{\
-. ie o \
-. tl %\*[doc-caption-font2]\*[doc-date-string]\f[P]\*[doc-caption-font]\*[doc-operating-system]\f[P]
-. el \
-. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]%
-. \}
-. el \
-. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]%
-' bp
-. ev
-. \}
-..
-.
-.
-.\" NS doc-end-macro macro
-.\" NS finish output
-.
-.de doc-end-macro
-. \" We may still have a partial line in the environment. If this is the
-. \" case, and we happen to be on the last line of the page, the `.fl'
-. \" request will cause the page to be ejected and troff will immediately
-. \" exit. If we are in nroff mode, this would be unfortunate, since we
-. \" would never get a chance to output the footer. So we fudge the page
-. \" length to make sure that the last page is never ejected until we want
-. \" it to be.
-.
-. if \n[cR] \
-. pl +3v
-. fl
-.
-. if \n[doc-list-depth] \
-. tm mdoc warning: list open at EOF! A .Bl directive has no matching .El
-.
-. if \n[cR] \{\
-' sp
-. tl \*[doc-caption-font]\*[doc-operating-system]\f[P]\*[doc-caption-font2]\*[doc-date-string]\f[P]\*[doc-caption-font]\*[doc-operating-system]\f[P]
-. \" suppress empty lines after the footer
-. pl \n[nl]u
-. \}
-..
-.
-.
-.\" NS doc-paragraph macro
-.\" NS insert a paragraph
-.
-.de doc-paragraph
-. sp \n[doc-paragraph-space]u
-. if !\n[cR] \
-. ne 2
-. ns
-..
-.
-.
-.\" NS Pp user macro (not parsed, not callable)
-.\" NS new paragraph
-.\" NS
-.\" NS width register `Pp' set above
-.
-.als Pp doc-paragraph
-.
-.
-.\" NS Lp user macro (not parsed, not callable)
-.\" NS same as .Pp
-.\" NS
-.\" NS width register `Lp' set above
-.
-.als Lp doc-paragraph
-.
-.
-.de LP
-. tm Not a \-mdoc command: .LP (#\n[.c])
-..
-.
-.
-.de PP
-. tm Not a \-mdoc command: .PP (#\n[.c])
-..
-.
-.
-.de pp
-. tm Not a \-mdoc command: .pp (#\n[.c])
-..
-.
-.
-.de SH
-. tm Not a \-mdoc command: .SH (#\n[.c])
-..
-.
-.
-.\" NS Nd user macro (not parsed, not callable)
-.\" NS print name description
-.\" NS
-.\" NS width register `Nd' set above
-.
-.de Nd
-. nop \- \$*
-..
-.
-.
-.\" NS doc-in-see-also-section global register (bool)
-.\" NS whether we are in the `see also' section
-.
-.nr doc-in-see-also-section 0
-.
-.
-.\" NS doc-in-files-section global register (bool)
-.\" NS whether we are in the `files' section
-.
-.nr doc-in-files-section 0
-.
-.
-.\" NS doc-in-authors-section global register (bool)
-.\" NS whether we are in the `authors' section
-.
-.nr doc-in-authors-section 0
-.
-.
-.\" NS doc-first-parameter macro
-.\" NS return first parameter
-.\" NS
-.\" NS local variables:
-.\" NS doc-str-dfp
-.
-.de doc-first-parameter
-. ds doc-str-dfp "\$1
-..
-.
-.
-.\" NS Sh user macro (not callable)
-.\" NS section headers
-.\" NS
-.\" NS modifies:
-.\" NS doc-func-args-processed
-.\" NS doc-func-count
-.\" NS doc-in-authors-section
-.\" NS doc-in-files-section
-.\" NS doc-in-see-also-section
-.\" NS doc-in-synopsis-count
-.\" NS doc-indent-synopsis
-.\" NS doc-is-func
-.\" NS doc-num-func-args
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Sh
-.\" NS doc-reg-Sh1
-.\" NS doc-section-XXX
-.\" NS
-.\" NS width register `Sh' set in doc-common
-.
-.ds doc-section-name NAME
-.ds doc-section-synopsis SYNOPSIS
-.ds doc-section-description DESCRIPTION
-.ds doc-section-see-also SEE
-.ds doc-section-files FILES
-.ds doc-section-authors AUTHORS
-.
-.de Sh
-. ie \n[doc-arg-limit] \{\
-. \" we only allow `Sh' within `Sh'; it will change the font back to
-. \" `doc-Sh-font'
-. ie "\*[doc-macro-name]"Sh" \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Sh-font]\c
-. doc-print-recursive
-. \}
-. el \{\
-. tm Usage: .Sh section_name ... (#\n[.c])
-. doc-reset-args
-. \}\}
-. el \{\
-. tm Usage: .Sh not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}\}
-. el \{\
-. if !\n[.$] \{\
-. tm Usage: .Sh section_name ... (#\n[.c])
-. return
-. \}
-.
-. ds doc-macro-name Sh
-. doc-parse-args \$@
-.
-. nr doc-in-synopsis-count 0
-. nr doc-indent-synopsis 0
-.
-. if t \
-' ad
-.
-. \" this resolves e.g. `.Sh "SEE ALSO"'
-. doc-first-parameter \$*
-.
-. ie "\*[doc-str-dfp]"\*[doc-section-name]" \{\
-. doc-setup-header
-' in 0
-. \}
-. el \{\
-. nr doc-in-see-also-section 0
-. nr doc-in-files-section 0
-. nr doc-in-authors-section 0
-.
-. ie "\*[doc-str-dfp]"\*[doc-section-synopsis]" \{\
-. if t \
-. na
-. nr doc-in-synopsis-count 1
-. \}
-. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
-. nr doc-is-func 0
-. nr doc-func-count 0
-. nr doc-func-args-processed 0
-. nr doc-num-func-args 0
-. \}
-. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-see-also]" \{\
-. if t \
-. na
-. nr doc-in-see-also-section 1
-. \}
-. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-files]" \
-. nr doc-in-files-section 1
-. el .if "\*[doc-str-dfp]"\*[doc-section-authors]" \
-. nr doc-in-authors-section 1
-. \}\}\}
-.
-. in 0
-. nr doc-have-author 0
-. \}
-.
-. doc-setup-page-layout
-' sp
-. ns
-. ta T .5i
-. if !\n[cR] \
-. ne 3
-' fi
-.
-. if t \{\
-. nr doc-reg-Sh \n[.ss]
-. nr doc-reg-Sh1 \n[.sss]
-. ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3)
-. \}
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Sh-font]\c
-. doc-print-recursive
-.
-. if t \
-. ss \n[doc-reg-Sh] \n[doc-reg-Sh1]
-.
-. in +\n[doc-subheader-indent]u
-. ns
-. \}
-..
-.
-.
-.\" NS Ss user macro (not callable)
-.\" NS subsection
-.\" NS
-.\" NS local variable:
-.\" NS doc-reg-Ss
-.\" NS doc-reg-Ss1
-.\" NS
-.\" NS width register `Ss' set above
-.
-.de Ss
-. ie \n[doc-arg-limit] \{\
-. \" we only allow `Ss' within `Ss'; it will change the font back to
-. \" `doc-Sh-font'
-. ie "\*[doc-macro-name]"Ss" \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Sh-font]\c
-. doc-print-recursive
-. \}
-. el \{\
-. tm Usage: .Ss subsection_name ... (#\n[.c])
-. doc-reset-args
-. \}\}
-. el \{\
-. tm Usage: .Ss not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}\}
-. el \{\
-. if !\n[.$] \{\
-. tm Usage: .Ss subsection_name ... (#\n[.c])
-. return
-. \}
-.
-. ds doc-macro-name Ss
-. doc-parse-args \$@
-.
-. sp
-. if !\n[cR] \
-. ne 3
-. ti -.25i
-.
-. nr doc-reg-Ss \n[.ss]
-. nr doc-reg-Ss1 \n[.sss]
-. ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4)
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Sh-font]\c
-. doc-print-recursive
-.
-. ss \n[doc-reg-Ss] \n[doc-reg-Ss1]
-.
-. ta T .5i
-. if !\n[cR] \
-. ne 2
-. br
-. \}
-..
-.
-.
-.\" NS Rd macro (not parsed, not callable)
-.\" NS print global register dump to stderr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Rd
-.
-.de Rd
-. tm MDOC GLOBAL REGISTER DUMP
-. tm doc-macro-name == `\*[doc-macro-name]'
-. tm doc-arg-limit == \n[doc-arg-limit]
-. tm doc-num-args == \n[doc-num-args]
-. tm doc-arg-ptr == \n[doc-arg-ptr]
-.
-. nr doc-reg-Rd 1
-. while (\n[doc-reg-Rd] <= \n[doc-arg-limit]) \{\
-. tm doc-arg\n[doc-reg-Rd] == `\*[doc-arg\n[doc-reg-Rd]]'
-. tm doc-type\n[doc-reg-Rd] == \n[doc-type\n[doc-reg-Rd]]
-. tm doc-space\n[doc-reg-Rd] == `\*[doc-space\n[doc-reg-Rd]]'
-. nr doc-reg-Rd +1
-. \}
-.
-. tm doc-curr-font == \n[doc-curr-font]
-. tm doc-curr-size == \n[doc-curr-size]
-. tm doc-in-synopsis-count == \n[doc-in-synopsis-count]
-. tm doc-indent-synopsis == \n[doc-indent-synopsis]
-. tm doc-have-decl == \n[doc-have-decl]
-. tm doc-have-var == \n[doc-have-var]
-. tm doc-command-name == `\*[doc-command-name]'
-. tm doc-quote-left == `\*[doc-quote-left]'
-. tm doc-quote-right == `\*[doc-quote-right]'
-. tm doc-nesting-level == \n[doc-nesting-level]
-. tm doc-in-list == \n[doc-in-list]
-. tm doc-space == `\*[doc-space]'
-. tm doc-saved-space == `\*[doc-saved-space]'
-. tm doc-space-mode == \n[doc-space-mode]
-. tm doc-have-space == \n[doc-have-space]
-. tm doc-have-slot == \n[doc-have-slot]
-. tm doc-keep-type == \n[doc-keep-type]
-. tm doc-display-depth == \n[doc-display-depth]
-. tm doc-is-compact == \n[doc-is-compact]
-.
-. nr doc-reg-Rd 0
-. while (\n[doc-reg-Rd] <= \n[doc-display-depth]) \{\
-. tm doc-display-type-stack\n[doc-reg-Rd] == `\*[doc-display-type-stack\n[doc-reg-Rd]]'
-. tm doc-display-indent-stack\n[doc-reg-Rd] == \n[doc-display-indent-stack\n[doc-reg-Rd]]
-. tm doc-display-ad-stack\n[doc-reg-Rd] == \n[doc-display-ad-stack\n[doc-reg-Rd]]
-. tm doc-display-fi-stack\n[doc-reg-Rd] == \n[doc-display-fi-stack\n[doc-reg-Rd]]
-. nr doc-reg-Rd +1
-. \}
-.
-. tm doc-fontmode-depth == \n[doc-fontmode-depth]
-.
-. nr doc-reg-Rd 1
-. while (\n[doc-reg-Rd] <= \n[doc-fontmode-depth]) \{\
-. tm doc-fontmode-font-stack\n[doc-reg-Rd] == `\n[doc-fontmode-font-stack\n[doc-reg-Rd]]'
-. tm doc-fontmode-size-stack\n[doc-reg-Rd] == `\n[doc-fontmode-size-stack\n[doc-reg-Rd]]'
-. nr doc-reg-Rd +1
-. \}
-.
-. tm doc-list-depth == \n[doc-list-depth]
-.
-. nr doc-reg-Rd 1
-. while (\n[doc-reg-Rd] <= \n[doc-list-depth]) \{\
-. tm doc-list-type-stack\n[doc-reg-Rd] == `\*[doc-list-type-stack\n[doc-reg-Rd]]'
-. tm doc-list-indent-stack\n[doc-reg-Rd] == \n[doc-list-indent-stack\n[doc-reg-Rd]]
-. tm doc-compact-list-stack\n[doc-reg-Rd] == \n[doc-compact-list-stack\n[doc-reg-Rd]]
-. tm doc-tag-prefix-stack\n[doc-reg-Rd] == `\*[doc-tag-prefix-stack\n[doc-reg-Rd]]'
-. tm doc-tag-width-stack\n[doc-reg-Rd] == `\*[doc-tag-width-stack\n[doc-reg-Rd]]'
-. tm doc-list-offset-stack\n[doc-reg-Rd] == \n[doc-list-offset-stack\n[doc-reg-Rd]]
-. tm doc-enum-list-count-stack\n[doc-reg-Rd] == \n[doc-enum-list-count-stack\n[doc-reg-Rd]]
-. nr doc-reg-Rd +1
-. \}
-.
-. tm doc-have-indent == \n[doc-have-indent]
-. tm doc-saved-Pa-font == `\*[doc-saved-Pa-font]'
-. tm doc-curr-type == \n[doc-curr-type]
-. tm doc-curr-arg == `\*[doc-curr-arg]'
-. tm doc-have-diag-list == \n[doc-have-diag-list]
-. tm doc-diag-list-input-line-count == \n[doc-diag-list-input-line-count]
-. tm doc-num-columns == \n[doc-num-columns]
-. tm doc-next-list-depth == \n[doc-next-list-depth]
-. tm doc-column-indent-width == \n[doc-column-indent-width]
-. tm doc-is-func == \n[doc-is-func]
-. tm doc-have-old-func == \n[doc-have-old-func]
-. tm doc-func-arg-count == \n[doc-func-arg-count]
-. tm doc-func-arg == `\*[doc-func-arg]'
-. tm doc-num-func-args == \n[doc-num-func-args]
-. tm doc-func-args-processed == \n[doc-func-args-processed]
-. tm doc-have-func == \n[doc-have-func]
-. tm doc-is-reference == \n[doc-is-reference]
-. tm doc-reference-count == \n[doc-reference-count]
-. tm doc-author-count == \n[doc-author-count]
-.
-. nr doc-reg-Rd 0
-. while (\n[doc-reg-Rd] <= \n[doc-author-count]) \{\
-. tm doc-author-name\n[doc-reg-Rd] == `\*[doc-author-name\n[doc-reg-Rd]]'
-. nr doc-reg-Rd +1
-. \}
-.
-. tm doc-book-count == \n[doc-book-count]
-. tm doc-book-name == `\*[doc-book-name]'
-. tm doc-date-count == \n[doc-date-count]
-. tm doc-date == `\*[doc-date]'
-. tm doc-publisher-count == \n[doc-publisher-count]
-. tm doc-publisher-name == `\*[doc-publisher-name]'
-. tm doc-journal-count == \n[doc-journal-count]
-. tm doc-journal-name == `\*[doc-journal-name]'
-. tm doc-issue-count == \n[doc-issue-count]
-. tm doc-issue-name == `\*[doc-issue-name]'
-. tm doc-optional-count == \n[doc-optional-count]
-. tm doc-optional-string == `\*[doc-optional-string]'
-. tm doc-page-number-count == \n[doc-page-number-count]
-. tm doc-page-number-string == `\*[doc-page-number-string]'
-. tm doc-corporate-count == \n[doc-corporate-count]
-. tm doc-corporate-name == `\*[doc-corporate-name]'
-. tm doc-report-count == \n[doc-report-count]
-. tm doc-report-name == `\*[doc-report-name]'
-. tm doc-reference-title-count == \n[doc-reference-title-count]
-. tm doc-reference-title-name == `\*[doc-reference-title-name]'
-. tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]'
-. tm doc-volume-count == \n[doc-volume-count]
-. tm doc-volume-name == `\*[doc-volume-name]'
-. tm doc-have-author == \n[doc-have-author]
-.
-. tm doc-document-title == `\*[doc-document-title]'
-. tm doc-volume == `\*[doc-volume]'
-. tm doc-section == `\*[doc-section]'
-. tm doc-operating-system == `\*[doc-operating-system]'
-. tm doc-date-string == `\*[doc-date-string]'
-. tm doc-header-space == \n[doc-header-space]
-. tm doc-footer-space == \n[doc-footer-space]
-. tm doc-display-vertical == \n[doc-display-vertical]
-. tm doc-header-string == `\*[doc-header-string]'
-. tm doc-in-see-also-section == \n[doc-in-see-also-section]
-. tm doc-in-files-section == \n[doc-in-files-section]
-. tm doc-in-authors-section == \n[doc-in-authors-section]
-.
-. tm END OF GLOBAL REGISTER DUMP
-..
-.
-.
-.ec
-.
-.\" EOF
diff --git a/tmac/doc-ditroff b/tmac/doc-ditroff
index 039db7dd..d3fed917 100644
--- a/tmac/doc-ditroff
+++ b/tmac/doc-ditroff
@@ -11,8 +11,8 @@
.\" 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.
+.\" 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.
@@ -29,253 +29,300 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
+.\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
.\"
-.\" tmac.mdoc-ditroff
.\" %beginstrip%
-.\"
-.\" -rC1 numbers pages continuously; initialize to avoid warnings
-.if \n(.g .if !rC .nr C 0
-.ds aD \fI\s10
-.ds aR \f(CO\s10
-.ds cM \f(CB\s10
-.ds dF \fR\s10
-.ds eM \fI\s10
-.ds eR \fC\s10
-.ds eV \fC\s10
-.ds fA \f(CO\s10
-.ds fD \f(CB\s10
-.ds fL \f(CB\s10
-.ds fN \f(CB\s10
-.ds fP \fP\s0
-.ds fS \s0
-.ds fT \f(CO\s10
-.ds Hs \fR\s10
-.ds iC \f(CB\s10
-.ds lI \fC
-.ds lP \fR\|(\|\fP\s10
-.ds lp \fR(\fP\s10
-.ds rP \fR\|)\|\fP\s10
-.ds rp \fR)\fP\s10
-.ds lB \fR\^[\^\fP\s10
-.ds rB \fR\^]\fP\s10
-.ds mL \fB\s10
-.ds nM \f(CB\s10
-.ds nO \fR\s10
-.ds nT \s0
-.ds pA \fC\s10
-.ds Pu \fR{\ .\ ,\ :\ ;\ (\ )\ [\ ]\ \fR}
-.ds rA \fR\s10
-.ds rT \f(CO\s10
-.ds sH \fB\s10
-.ds sP \s0
-.ds sY \fB\s10
-.ds sX \fR\s10
-.ds tF \fR
-.ds tN \s9
-.ds vA \fI\s10
-.ds Vs \fR\s10
-.ds vT \f(CB\s10
-.ds xR \fC\s10
-.tr *\(**
-.nr sI \w\fC,u*5
-.nr Ti \n(sIu
-.nr Pp .5v
-.ds lS \0
-.nr lS \w'\0'u
-.nr dI 6n
-.de pL
-.nr Hm .5i
-.nr Fm .5i
-.nr ll 6.5i
-.ll 6.5i
-.nr lt 6.5i
-.lt 6.5i
-.nr po 1i
-.po 1.i
-.nr dV .5v
+.
+.
+.eo
+.
+.\" use -rC=1 to number pages continuously
+.
+.if !r C .nr C 0
+.
+.\" use -rD=1 for double-sided printing
+.
+.if !r D .nr D 0
+.
+.\" use -rcR=1 to force the creation of a single, very long page
+.
+.if !r cR .nr cR 0
+.
+.
+.ec
+.
+.\" the `doc-xx-font' strings must not be empty!
+.
+.ds doc-caption-font \f[R]\s[\n[.ps]u]
+.ds doc-caption-font2 \f[R]\s[\n[.ps]u]
+.ds doc-Ad-font \f[I]\s[\n[.ps]u]
+.ds doc-Ar-font \f[CO]\s[\n[.ps]u]
+.ds doc-Cm-font \f[CB]\s[\n[.ps]u]
+.ds doc-Em-font \f[I]\s[\n[.ps]u]
+.ds doc-Er-font \f[C]\s[\n[.ps]u]
+.ds doc-Ev-font \f[C]\s[\n[.ps]u]
+.ds doc-Fa-font \f[CO]\s[\n[.ps]u]
+.ds doc-Fd-font \f[CB]\s[\n[.ps]u]
+.ds doc-Fl-font \f[CB]\s[\n[.ps]u]
+.ds doc-Fn-font \f[CB]\s[\n[.ps]u]
+.ds doc-Ft-font \f[CO]\s[\n[.ps]u]
+.ds doc-Ic-font \f[CB]\s[\n[.ps]u]
+.ds doc-Li-font \f[C]
+.ds doc-Me-font \f[B]\s[\n[.ps]u]
+.ds doc-Nm-font \f[CB]\s[\n[.ps]u]
+.ds doc-No-font \f[R]\s[\n[.ps]u]
+.ds doc-Pa-font \f[C]\s[\n[.ps]u]
+.ds doc-Sh-font \f[B]\s[\n[.ps]u]
+.ds doc-Sy-font \f[B]\s[\n[.ps]u]
+.ds doc-Sx-font \f[B]\s[\n[.ps]u]
+.ds doc-Tn-font-shape \f[R]
+\# XXX: adapt to discrete LaTeX font sizes
+.ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]
+.ds doc-Va-font \f[I]\s[\n[.ps]u]
+.ds doc-Xr-font \f[C]\s[\n[.ps]u]
+.
+.ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[\n[.ps]u]
+.ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[\n[.ps]u]
+.ds lp \f[R](\f[P]\s[\n[.ps]u]
+.ds rp \f[R])\f[P]\s[\n[.ps]u]
+.ds doc-left-bracket \f[R]\^[\^\f[P]\s[\n[.ps]u]
+.ds doc-right-bracket \f[R]\^]\f[P]\s[\n[.ps]u]
+.
+.tr *\[**]
+.
+.\" miscellaneous
+.nr doc-subheader-indent (\w\f[C],u * 5u)
+.nr doc-paragraph-space .5v
+.
+.nr doc-digit-width \w'\0'u
+.nr doc-fixed-width \w\f[C]0
+.
+.eo
+.
+.
+.\" NS doc-header-space global register
+.\" NS the space between header and body
+.
+.nr doc-header-space 0
+.
+.
+.\" NS doc-footer-space global register
+.\" NS the space between body and footer
+.
+.nr doc-footer-space 0
+.
+.
+.\" NS doc-display-vertical global register
+.\" NS vertical space between list elements etc.
+.
+.nr doc-display-vertical 0
+.
+.
+.\" NS doc-setup-page-layout macro
+.\" NS set up page layout
+.\" NS
+.\" NS modifies:
+.\" NS doc-display-vertical
+.\" NS doc-footer-space
+.\" NS doc-header-space
+.
+.de doc-setup-page-layout
+. nr doc-header-space .5i
+. nr doc-footer-space .5i
+.
+. ll 6.5i
+. lt 6.5i
+. po 1i
+.
+. nr doc-display-vertical .5v
..
-.ds <= \(<=
-.ds >= \(>=
-.ie \n(.g \{\
-. ds Lq \(lq
-. ds Rq \(rq
-.\}
-.el \{\
-. ds Lq \&``
-. ds Rq \&''
-.\}
-.ds ua \(ua
-.ds aa \(aa
-.ds ga \(ga
-.ds sR \&'
-.ds sL \&`
-.ds q \&"
-.\" Math stuff
-.ds Pi \(*p
-.ds Ne \(!=
-.ds Le \(<=
-.ds Ge \(>=
+.
+.
+.ds doc-left-singlequote \[oq]
+.ds doc-right-singlequote \[cq]
+.
+.\" the following strings are `official'
+.ds <= \[<=]
+.ds >= \[>=]
+.ds Lq \[lq]
+.ds Rq \[rq]
+.ds ua \[ua]
+.ds aa \[aa]
+.ds ga \[ga]
+.ds q \[dq]
+.ds Pi \[*p]
+.ds Ne \[!=]
+.ds Le \[<=]
+.ds Ge \[>=]
.ds Lt <
.ds Gt >
-.ds Pm \(+-
-.ds If \(if
-.ds Na \fINaN\fP
-.ds Ba \fR\&|\fP
-.\"
-.nr gX 0
-.de hK
-.ds hT \\*(dT
-.if !"\\*(cH"Null" \{\
-. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
-. el .as hT \\|(\\|\\*(cH\\|)
-.\}
-.if "\\*(cH"Null" \{\
-. if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
-.\}
-.wh 0 hM
-.wh -1.25i fM
-.nr nL \\n(nl
-.ie \\n(gX==1 \{\
-. rm n1
-. bp
-.\}
-.el \{\
-' bp
-.\}
-.\" Don't set the page number if this is the first page,
-.\" in case the user has used -n.
-.if \\n(nL>0 \{\
-. if !\\nC \{\
-. nr % 1
-. \}
-.\}
+.ds Pm \[+-]
+.ds If \[if]
+.ds Na \f[I]NaN\f[P]
+.ds Ba \f[R]|\f[P]
+.
.nr gX 0
-.em lM
+.
+.
+.\" NS doc-header-string global string
+.\" NS the final string used for the manual page header
+.
+.ds doc-header-string
+.
+.
+.\" NS doc-setup-header macro
+.\" NS install and initialize header and footer support
+.\" NS
+.\" NS modifies:
+.\" NS doc-header-string
+.
+.de doc-setup-header
+. ds doc-header-string "\*[doc-document-title]
+. if !"\*[doc-section]"Null" \
+. as doc-header-string \|(\*[doc-section])
+.
+. wh 0 doc-header
+. wh -1.25i doc-footer
+.
+. nr nL \n[nl]
+. if \n[gX] \
+. ds doc-command-name
+.
+. br
+.
+. \" Don't set the page number if this is the first page,
+. \" in case the user has used -n.
+. if \n[nL] \
+. if !\n[C] \
+. nr % 1
+.
+. nr gX 0
+. e@ doc-end-macro
..
-.\"
-.nr fW \w\fC0
-.de sW
-.nr sW \w\fC\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el \{\
-. ie \\n(sW>0 .nr sW 1
-. el .nr sW 0
-.\}
+.
+.
+.\" NS doc-get-width macro
+.\" NS computes the width of a string as a multiple of `doc-fixed-width':
+.\" NS `.doc-get-width string'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-width
+. nr doc-width \w\f[C]\$1
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \{\
+. ie \n[doc-width] \
+. nr doc-width 1
+. el \
+. nr doc-width 0
+. \}
..
-.\"
-.de aW
-.nr sW \w\fC\\*(A\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el \{\
-. ie \\n(sW>0 .nr sW 1
-. el .nr sW 0
-.\}
+.
+.
+.\" NS doc-get-arg-width macro
+.\" NS computes the width of an argument as a multiple of
+.\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-arg-width
+. nr doc-width \w\f[C]\*[doc-arg\$1]
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \{\
+. ie \n[doc-width] \
+. nr doc-width 1
+. el \
+. nr doc-width 0
+. \}
..
-.\" NS Ql macro - Quoted literal define
+.
+.
+.\" NS Ql user macro
+.\" NS quoted literal define
+.\" NS
+.\" NS modifies:
+.\" NS doc-argXXX
+.\" NS doc-arg-limit
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS doc-spaceXXX
+.\" NS doc-typeXXX
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Ql
+.\" NS doc-reg-Ql1
+.\" NS doc-reg-Ql2
+.\" NS
+.\" NS width register `Ql' set in doc-common
+.
.de Ql
-.if \\n(aC==0 \{\
-. ds mN Ql
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. nr fV \\n(.$
-. fV
-.\}
-.nr aP \\n(aP+1
-.aW \\n(aP
-.nr aP \\n(aP-1
-.if \\n(sW>2 .Li
-.if \\n(sW<=2 \{\
-.\" Db on
-. if (\\n(aP>0) \{\
-. ds A\\n(aP Li
-. nr aP \\n(aP -1
-. \}
-. if (\\n(aP==0) \{\
-. rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
-. rm S1 S2 S3 S4 S5 S6 S7 S8 S9
-. rn A8 A9
-. rn A7 A8
-. rn A6 A7
-. rn A5 A6
-. rn A4 A5
-. rn A3 A4
-. rn A2 A3
-. rn A1 A2
-. ds A1 Li
-. nr fV \\n(aC+1
-. nr aC 0
-. fV
-. \}
-. ds qL \&\\*(sL
-. ds qR \&\\*(sR
-. En
-.\" Db off
-.\}
-..
-.\" NS Sh macro - Section Headers
-.\" NS nS register - Section Header SYNOPSIS flag
-.\" NS nF register - Section Header FILES flag
-.\" NS nA register - Section Header SEE ALSO flag
-.\" NS nT register - Section Header STANDARDS flag
-.de Sh
-.nr nS 0
-.nr sE 0
-.nr iS 0
-'ad
-.ie "\\$1"NAME" \{\
-. hK
-' in 0
-.\}
-.el \{\
-. nr nS 0
-. nr nA 0
-. nr nF 0
-. nr nT 0
-. nr nY 0
-. nr oT 0
-. if "\\$1"SYNOPSIS" \{\
-. na
-. nr nS 1
-. \}
-. if "\\$1"DESCRIPTION" \{\
-. nr fY 0
-. nr fZ 0
-. nr fB 0
-. nr Fb 0
-. ds Fb
-. \}
-. if "\\$1"SEE" \{\
-. nr nA 1
-. na
-. \}
-. if "\\$1"FILES" .nr nF 1
-. if "\\$1"STANDARDS" .nr nT 1
-. if "\\$1"AUTHORS" .nr nY 1
-. if "\\$1"SEE" .nr sE 1
-. in 0
-. nr aN 0
-.\}
-.pL
-'sp
-.ns
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 3
-'fi
-\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\s0\&
-.in \\n(.iu+\\n(Tiu
-.ns
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Ql
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Ql argument ... (#\n[.c])
+. \}
+.
+. nr doc-reg-Ql (\n[doc-arg-ptr] + 1)
+. doc-get-arg-width \n[doc-reg-Ql]
+.
+. \" don't use quotes if we have more than two succeeding string arguments
+. nr doc-reg-Ql +1
+. if (\n[doc-arg-limit] >= \n[doc-reg-Ql]) \
+. if (\n[doc-type\n[doc-reg-Ql]] == 2) \
+. nr doc-width 3
+.
+. \" make a difference in quotation style for strings longer
+. \" than two characters
+. ie (\n[doc-width] > 2) \
+. Li
+. el \{\
+. ie \n[doc-arg-ptr] \{\
+. \" we replace `Ql' with `Li'
+. ds doc-arg\n[doc-arg-ptr] Li
+. nr doc-arg-ptr -1
+. \}
+. el \{\
+. \" if .Ql has been called directly, we must shift all elements in
+. \" the argument vector to the right so that we can insert `Li'
+. nr doc-reg-Ql \n[doc-arg-limit]
+. nr doc-reg-Ql1 (\n[doc-arg-limit] + 1)
+. while \n[doc-reg-Ql] \{\
+. rn doc-arg\n[doc-reg-Ql] doc-arg\n[doc-reg-Ql1]
+. rnn doc-type\n[doc-reg-Ql] doc-type\n[doc-reg-Ql1]
+. rn doc-space\n[doc-reg-Ql] doc-space\n[doc-reg-Ql1]
+. nr doc-reg-Ql -1
+. nr doc-reg-Ql1 -1
+. \}
+. ds doc-arg1 Li
+. nr doc-type1 1
+. ds doc-space1
+. nr doc-arg-limit +1
+. \}
+.
+. ds doc-quote-left "\*[doc-left-singlequote]
+. ds doc-quote-right "\*[doc-right-singlequote]
+. doc-enclose-string
+. \}
..
+.
+.
+.ec
+.
+.\" EOF
diff --git a/tmac/doc-ditroff.new b/tmac/doc-ditroff.new
deleted file mode 100755
index d3fed917..00000000
--- a/tmac/doc-ditroff.new
+++ /dev/null
@@ -1,328 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
-.\"
-.\" %beginstrip%
-.
-.
-.eo
-.
-.\" use -rC=1 to number pages continuously
-.
-.if !r C .nr C 0
-.
-.\" use -rD=1 for double-sided printing
-.
-.if !r D .nr D 0
-.
-.\" use -rcR=1 to force the creation of a single, very long page
-.
-.if !r cR .nr cR 0
-.
-.
-.ec
-.
-.\" the `doc-xx-font' strings must not be empty!
-.
-.ds doc-caption-font \f[R]\s[\n[.ps]u]
-.ds doc-caption-font2 \f[R]\s[\n[.ps]u]
-.ds doc-Ad-font \f[I]\s[\n[.ps]u]
-.ds doc-Ar-font \f[CO]\s[\n[.ps]u]
-.ds doc-Cm-font \f[CB]\s[\n[.ps]u]
-.ds doc-Em-font \f[I]\s[\n[.ps]u]
-.ds doc-Er-font \f[C]\s[\n[.ps]u]
-.ds doc-Ev-font \f[C]\s[\n[.ps]u]
-.ds doc-Fa-font \f[CO]\s[\n[.ps]u]
-.ds doc-Fd-font \f[CB]\s[\n[.ps]u]
-.ds doc-Fl-font \f[CB]\s[\n[.ps]u]
-.ds doc-Fn-font \f[CB]\s[\n[.ps]u]
-.ds doc-Ft-font \f[CO]\s[\n[.ps]u]
-.ds doc-Ic-font \f[CB]\s[\n[.ps]u]
-.ds doc-Li-font \f[C]
-.ds doc-Me-font \f[B]\s[\n[.ps]u]
-.ds doc-Nm-font \f[CB]\s[\n[.ps]u]
-.ds doc-No-font \f[R]\s[\n[.ps]u]
-.ds doc-Pa-font \f[C]\s[\n[.ps]u]
-.ds doc-Sh-font \f[B]\s[\n[.ps]u]
-.ds doc-Sy-font \f[B]\s[\n[.ps]u]
-.ds doc-Sx-font \f[B]\s[\n[.ps]u]
-.ds doc-Tn-font-shape \f[R]
-\# XXX: adapt to discrete LaTeX font sizes
-.ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]
-.ds doc-Va-font \f[I]\s[\n[.ps]u]
-.ds doc-Xr-font \f[C]\s[\n[.ps]u]
-.
-.ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[\n[.ps]u]
-.ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[\n[.ps]u]
-.ds lp \f[R](\f[P]\s[\n[.ps]u]
-.ds rp \f[R])\f[P]\s[\n[.ps]u]
-.ds doc-left-bracket \f[R]\^[\^\f[P]\s[\n[.ps]u]
-.ds doc-right-bracket \f[R]\^]\f[P]\s[\n[.ps]u]
-.
-.tr *\[**]
-.
-.\" miscellaneous
-.nr doc-subheader-indent (\w\f[C],u * 5u)
-.nr doc-paragraph-space .5v
-.
-.nr doc-digit-width \w'\0'u
-.nr doc-fixed-width \w\f[C]0
-.
-.eo
-.
-.
-.\" NS doc-header-space global register
-.\" NS the space between header and body
-.
-.nr doc-header-space 0
-.
-.
-.\" NS doc-footer-space global register
-.\" NS the space between body and footer
-.
-.nr doc-footer-space 0
-.
-.
-.\" NS doc-display-vertical global register
-.\" NS vertical space between list elements etc.
-.
-.nr doc-display-vertical 0
-.
-.
-.\" NS doc-setup-page-layout macro
-.\" NS set up page layout
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-vertical
-.\" NS doc-footer-space
-.\" NS doc-header-space
-.
-.de doc-setup-page-layout
-. nr doc-header-space .5i
-. nr doc-footer-space .5i
-.
-. ll 6.5i
-. lt 6.5i
-. po 1i
-.
-. nr doc-display-vertical .5v
-..
-.
-.
-.ds doc-left-singlequote \[oq]
-.ds doc-right-singlequote \[cq]
-.
-.\" the following strings are `official'
-.ds <= \[<=]
-.ds >= \[>=]
-.ds Lq \[lq]
-.ds Rq \[rq]
-.ds ua \[ua]
-.ds aa \[aa]
-.ds ga \[ga]
-.ds q \[dq]
-.ds Pi \[*p]
-.ds Ne \[!=]
-.ds Le \[<=]
-.ds Ge \[>=]
-.ds Lt <
-.ds Gt >
-.ds Pm \[+-]
-.ds If \[if]
-.ds Na \f[I]NaN\f[P]
-.ds Ba \f[R]|\f[P]
-.
-.nr gX 0
-.
-.
-.\" NS doc-header-string global string
-.\" NS the final string used for the manual page header
-.
-.ds doc-header-string
-.
-.
-.\" NS doc-setup-header macro
-.\" NS install and initialize header and footer support
-.\" NS
-.\" NS modifies:
-.\" NS doc-header-string
-.
-.de doc-setup-header
-. ds doc-header-string "\*[doc-document-title]
-. if !"\*[doc-section]"Null" \
-. as doc-header-string \|(\*[doc-section])
-.
-. wh 0 doc-header
-. wh -1.25i doc-footer
-.
-. nr nL \n[nl]
-. if \n[gX] \
-. ds doc-command-name
-.
-. br
-.
-. \" Don't set the page number if this is the first page,
-. \" in case the user has used -n.
-. if \n[nL] \
-. if !\n[C] \
-. nr % 1
-.
-. nr gX 0
-. e@ doc-end-macro
-..
-.
-.
-.\" NS doc-get-width macro
-.\" NS computes the width of a string as a multiple of `doc-fixed-width':
-.\" NS `.doc-get-width string'
-.\" NS
-.\" NS modifies:
-.\" NS doc-width
-.
-.de doc-get-width
-. nr doc-width \w\f[C]\$1
-. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
-. ie (\n[doc-width] % \n[doc-fixed-width]) \
-. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
-. el \
-. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
-. \}
-. el \{\
-. ie \n[doc-width] \
-. nr doc-width 1
-. el \
-. nr doc-width 0
-. \}
-..
-.
-.
-.\" NS doc-get-arg-width macro
-.\" NS computes the width of an argument as a multiple of
-.\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
-.\" NS
-.\" NS modifies:
-.\" NS doc-width
-.
-.de doc-get-arg-width
-. nr doc-width \w\f[C]\*[doc-arg\$1]
-. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
-. ie (\n[doc-width] % \n[doc-fixed-width]) \
-. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
-. el \
-. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
-. \}
-. el \{\
-. ie \n[doc-width] \
-. nr doc-width 1
-. el \
-. nr doc-width 0
-. \}
-..
-.
-.
-.\" NS Ql user macro
-.\" NS quoted literal define
-.\" NS
-.\" NS modifies:
-.\" NS doc-argXXX
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS doc-spaceXXX
-.\" NS doc-typeXXX
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Ql
-.\" NS doc-reg-Ql1
-.\" NS doc-reg-Ql2
-.\" NS
-.\" NS width register `Ql' set in doc-common
-.
-.de Ql
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Ql
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Ql argument ... (#\n[.c])
-. \}
-.
-. nr doc-reg-Ql (\n[doc-arg-ptr] + 1)
-. doc-get-arg-width \n[doc-reg-Ql]
-.
-. \" don't use quotes if we have more than two succeeding string arguments
-. nr doc-reg-Ql +1
-. if (\n[doc-arg-limit] >= \n[doc-reg-Ql]) \
-. if (\n[doc-type\n[doc-reg-Ql]] == 2) \
-. nr doc-width 3
-.
-. \" make a difference in quotation style for strings longer
-. \" than two characters
-. ie (\n[doc-width] > 2) \
-. Li
-. el \{\
-. ie \n[doc-arg-ptr] \{\
-. \" we replace `Ql' with `Li'
-. ds doc-arg\n[doc-arg-ptr] Li
-. nr doc-arg-ptr -1
-. \}
-. el \{\
-. \" if .Ql has been called directly, we must shift all elements in
-. \" the argument vector to the right so that we can insert `Li'
-. nr doc-reg-Ql \n[doc-arg-limit]
-. nr doc-reg-Ql1 (\n[doc-arg-limit] + 1)
-. while \n[doc-reg-Ql] \{\
-. rn doc-arg\n[doc-reg-Ql] doc-arg\n[doc-reg-Ql1]
-. rnn doc-type\n[doc-reg-Ql] doc-type\n[doc-reg-Ql1]
-. rn doc-space\n[doc-reg-Ql] doc-space\n[doc-reg-Ql1]
-. nr doc-reg-Ql -1
-. nr doc-reg-Ql1 -1
-. \}
-. ds doc-arg1 Li
-. nr doc-type1 1
-. ds doc-space1
-. nr doc-arg-limit +1
-. \}
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-. ds doc-quote-right "\*[doc-right-singlequote]
-. doc-enclose-string
-. \}
-..
-.
-.
-.ec
-.
-.\" EOF
diff --git a/tmac/doc-nroff b/tmac/doc-nroff
index c036f218..fbbcfa46 100644
--- a/tmac/doc-nroff
+++ b/tmac/doc-nroff
@@ -11,8 +11,8 @@
.\" 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.
+.\" 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.
@@ -29,197 +29,248 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
+.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
.\"
-.\" tmac.mdoc-nroff
.\" %beginstrip%
-.\"
-.ds aD \fI
-.ds aR \fI
-.ds cM \fB
-.ds dF \fR
-.ds eM \fI
-.ds eR \fR
-.ds eV \fR
-.ds fA \fI
-.ds fD \fB
-.ds fL \fB
-.ds fN \fB
-.ds fP \fP
-.ds fS
-.ds fT \fI
-.ds Hs \fR
-.ds iC \fB
-.ds lI \fR
-.ds lP \fR\|(\fP
-.ds rP \fR\|)\fP
-.ds lp \fR\|(\fP
-.ds rp \fR\|)\fP
-.ds lB \fR\|[\|\fP
-.ds rB \fR\|]\fP
-.ds mL \fB
-.ds nM \fB
-.ds nO \fR
-.ds pA \fI
-.ds Pu {\ .\ ,\ ;\ :\ (\ )\ [\ ]}
-.ds rA \fR
-.ds rT \fI
-.ds sH \fB
-.ds sP
-.ds sY \fB
-.ds sX \fI
-.ds tF \fR
-.ds tN
-.ds vA \fI
-.ds Vs \fR
-.ds vT \fB
-.ds xR \fR
-.\" MISCELLANEOUS
-.nr sI .5i
-.nr Ti .5i
-.nr cR 1
-.nr Pp 1v
-.ds lS \0\0
-.nr lS \w'\0\0'u
-.nr dI 6n
-.\"
-.de pL
-.ie \\n(cR .nr Hm 0
-.el .nr Hm .5i
-.nr Fm .5i
-.nr ll 78n
-.ll 78n
-.nr lt 78n
-.lt 78n
-.nr po 0i
-.po 0i
-.nr dV 1v
-.ad l
-.na
+.
+.
+.eo
+.
+.\" use -rD=1 for double-sided printing
+.
+.if !r D .nr D 0
+.
+.\" use -rcR=0 to have multiple pages instead of a single, very long page
+.
+.if !r cR .nr cR 1
+.
+.\" the `doc-xx-font' strings must not be empty!
+.
+.ds doc-caption-font \f[R]
+.ds doc-caption-font2 \f[R]
+.ds doc-Ad-font \f[I]
+.ds doc-Ar-font \f[I]
+.ds doc-Cm-font \f[B]
+.ds doc-Em-font \f[I]
+.ds doc-Er-font \f[R]
+.ds doc-Ev-font \f[R]
+.ds doc-Fa-font \f[I]
+.ds doc-Fd-font \f[B]
+.ds doc-Fl-font \f[B]
+.ds doc-Fn-font \f[B]
+.ds doc-Ft-font \f[I]
+.ds doc-Ic-font \f[B]
+.ds doc-Li-font \f[R]
+.ds doc-Me-font \f[B]
+.ds doc-Nm-font \f[B]
+.ds doc-No-font \f[R]
+.ds doc-Pa-font \f[I]
+.ds doc-Sh-font \f[B]
+.ds doc-Sy-font \f[B]
+.ds doc-Sx-font \f[I]
+.ds doc-Tn-font-shape \f[R]
+.ds doc-Tn-font-size
+.ds doc-Va-font \f[I]
+.ds doc-Xr-font \f[R]
+.
+.ds doc-left-parenthesis \f[R](\f[P]
+.ds doc-right-parenthesis \f[R])\f[P]
+.ds lp \f[R](\f[P]
+.ds rp \f[R])\f[P]
+.ds doc-left-bracket \f[R][\f[P]
+.ds doc-right-bracket \f[R]]\f[P]
+.
+.\" miscellaneous
+.nr doc-subheader-indent .5i
+.nr doc-paragraph-space 1v
+.
+.ec
+.nr doc-digit-width \w'\0\0'u
+.nr doc-fixed-width \w'0'
+.eo
+.
+.
+.\" NS doc-header-space global register
+.\" NS the space between header and body
+.
+.nr doc-header-space 0
+.
+.
+.\" NS doc-footer-space global register
+.\" NS the space between body and footer
+.
+.nr doc-footer-space 0
+.
+.
+.\" NS doc-display-vertical global register
+.\" NS vertical space between list elements etc.
+.
+.nr doc-display-vertical 0
+.
+.
+.\" NS doc-setup-page-layout macro
+.\" NS set up page layout
+.\" NS
+.\" NS modifies:
+.\" NS doc-display-vertical
+.\" NS doc-footer-space
+.\" NS doc-header-space
+.
+.de doc-setup-page-layout
+. ie \n[cR] \
+. nr doc-header-space 0
+. el \
+. nr doc-header-space .5i
+. nr doc-footer-space .5i
+.
+. ll 78n
+. lt 78n
+. po 0i
+.
+. nr doc-display-vertical 1v
+. ad l
+. na
..
-.ds <= \&<\&=
-.ds >= \&>\&=
-.ds Rq ''
-.ds Lq ``
-.ds ua ^
-.ds aa \'
-.ds ga \`
-.ds sL `
-.ds sR '
-.ds q \&"
-.\" Math stuff
-.ds Pi pi
-.ds Ne !=
-.ds Le <=
-.ds Ge >=
+.
+.
+.ec
+.
+.ds doc-left-singlequote \[oq]
+.ds doc-right-singlequote \[cq]
+.
+.\" the following strings are `official'
+.ds <= \[<=]
+.ds >= \[>=]
+.ds aa \[aa]
+.ds ga \[ga]
+.ds q \[dq]
+.ds Ne \[!=]
+.ds Le \[<=]
+.ds Ge \[>=]
.ds Lt <
.ds Gt >
-.ds Pm +-
-.ds If infinity
-.ds Na \fINaN\fP
-.ds Ba \fR\&|\fP
-
-.\"
-.de hK
-.nr % 1
-.ds hT \\*(dT
-.if !"\\*(cH"Null" \{\
-. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
-. el .as hT \\|(\\|\\*(cH\\|)
-.\}
-.if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
-.ie \\n(cR \{\
-. hM
-. wh -1v fM
+.ds Pm \[+-]
+.ds Na \f[I]NaN\f[P]
+.ds Ba \f[R]|\f[P]
+.
+.\" Unicode TTYs have all glyph forms; for other TTY character sets we need
+.\" character representations which are different from GNU troff's standard
+.\" forms.
+.ie '\*[.T]'utf8' \{\
+. ds Rq \[rq]
+. ds Lq \[lq]
+. ds ua \[ua]
+. ds Pi \[*p]
+. ds If \[if]
.\}
.el \{\
-. wh 0 hM
-. wh -1.167i fM
+. ds Rq ''
+. ds Lq ``
+. ds ua ^
+. ds Pi pi
+. ds If infinity
.\}
-.if \\n(nl==0:\\n(nl==-1 'bp
-.em lM
+.
+.eo
+.
+.
+.\" NS doc-header-string global string
+.\" NS the final string used for the manual page header
+.
+.ds doc-header-string
+.
+.
+.\" NS doc-setup-header macro
+.\" NS install and initialize header and footer support
+.\" NS
+.\" NS modifies:
+.\" NS doc-header-string
+.
+.de doc-setup-header
+. nr % 1
+. ds doc-header-string "\*[doc-document-title]
+. if !"\*[doc-section]"Null" \
+. as doc-header-string (\*[doc-section])
+.
+. ie \n[cR] \
+. doc-header
+. el \{\
+. wh 0 doc-header
+. wh -1.167i doc-footer
+. \}
+.
+. if ((\n[nl] == 0) : (\n[nl] == -1)) \
+' bp
+.
+. e@ doc-end-macro
..
-.nr fW \w'0'
-.de sW
-.nr sW \w\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el .nr sW 0
+.
+.
+.\" NS doc-get-width macro
+.\" NS computes the width of a string as a multiple of `doc-fixed-width':
+.\" NS `.doc-get-width string'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-width
+. nr doc-width \w\$1
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \
+. nr doc-width 0
..
-.de aW
-.nr sW \w\\*(A\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el .nr sW 0
+.
+.
+.\" NS doc-get-arg-width macro
+.\" NS computes the width of an argument as a multiple of
+.\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-arg-width
+. nr doc-width \w\*[doc-arg\$1]
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \
+. nr doc-width 0
..
-.\" NS Ql macro - Quoted literal define
+.
+.
+.\" NS Ql user macro
+.\" NS quoted literal define
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Ql' set in doc-common
+.
.de Ql
-.if \\n(aC==0 \{\
-. ds mN Ql
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-.\}
-.ds qL \&\\*(sL
-.ds qR \&\\*(sR
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Sh macro - Section Headers
-.\" NS nS register - Section Header SYNOPSIS flag
-.\" NS nF register - Section Header FILES flag
-.\" NS nA register - Section Header SEE ALSO flag
-.\" NS nT register - Section Header STANDARDS flag
-.de Sh
-.nr nS 0
-.nr sE 0
-.nr iS 0
-.ie "\\$1"NAME" \{\
-. hK
-' in 0
-.\}
-.el \{\
-. nr nS 0
-. nr nA 0
-. nr nF 0
-. nr nT 0
-. nr nY 0
-. nr aN 0
-. nr oT 0
-. if "\\$1"SEE" .nr nA 1
-. if "\\$1"FILES" .nr nF 1
-. if "\\$1"STANDARDS" .nr nT 1
-. if "\\$1"SYNOPSIS" .nr nS 1
-. if "\\$1"DESCRIPTION" \{\
-. rr fB
-. rr Fb
-. ds Fb
-. nr fY 0
-. nr fZ 0
-. \}
-. if "\\$1"AUTHORS" .nr nY 1
-. in 0
-.\}
-.pL
-'sp
-.ns
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 3
-'fi
-\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\s0\&
-.in \\n(.iu+\\n(Tiu
-.if "\\$1"SEE" .nr sE 1
-.ns
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \
+. ds doc-macro-name Ql
+. el \
+. tm Usage: .Ql argument ... (#\n[.c])
+. \}
+.
+. ds doc-quote-left "\*[doc-left-singlequote]
+. ds doc-quote-right "\*[doc-right-singlequote]
+.
+. doc-enclose-string \$@
..
+.
+.
+.ec
+.
+.\" EOF
diff --git a/tmac/doc-nroff.new b/tmac/doc-nroff.new
deleted file mode 100755
index fbbcfa46..00000000
--- a/tmac/doc-nroff.new
+++ /dev/null
@@ -1,276 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
-.\"
-.\" %beginstrip%
-.
-.
-.eo
-.
-.\" use -rD=1 for double-sided printing
-.
-.if !r D .nr D 0
-.
-.\" use -rcR=0 to have multiple pages instead of a single, very long page
-.
-.if !r cR .nr cR 1
-.
-.\" the `doc-xx-font' strings must not be empty!
-.
-.ds doc-caption-font \f[R]
-.ds doc-caption-font2 \f[R]
-.ds doc-Ad-font \f[I]
-.ds doc-Ar-font \f[I]
-.ds doc-Cm-font \f[B]
-.ds doc-Em-font \f[I]
-.ds doc-Er-font \f[R]
-.ds doc-Ev-font \f[R]
-.ds doc-Fa-font \f[I]
-.ds doc-Fd-font \f[B]
-.ds doc-Fl-font \f[B]
-.ds doc-Fn-font \f[B]
-.ds doc-Ft-font \f[I]
-.ds doc-Ic-font \f[B]
-.ds doc-Li-font \f[R]
-.ds doc-Me-font \f[B]
-.ds doc-Nm-font \f[B]
-.ds doc-No-font \f[R]
-.ds doc-Pa-font \f[I]
-.ds doc-Sh-font \f[B]
-.ds doc-Sy-font \f[B]
-.ds doc-Sx-font \f[I]
-.ds doc-Tn-font-shape \f[R]
-.ds doc-Tn-font-size
-.ds doc-Va-font \f[I]
-.ds doc-Xr-font \f[R]
-.
-.ds doc-left-parenthesis \f[R](\f[P]
-.ds doc-right-parenthesis \f[R])\f[P]
-.ds lp \f[R](\f[P]
-.ds rp \f[R])\f[P]
-.ds doc-left-bracket \f[R][\f[P]
-.ds doc-right-bracket \f[R]]\f[P]
-.
-.\" miscellaneous
-.nr doc-subheader-indent .5i
-.nr doc-paragraph-space 1v
-.
-.ec
-.nr doc-digit-width \w'\0\0'u
-.nr doc-fixed-width \w'0'
-.eo
-.
-.
-.\" NS doc-header-space global register
-.\" NS the space between header and body
-.
-.nr doc-header-space 0
-.
-.
-.\" NS doc-footer-space global register
-.\" NS the space between body and footer
-.
-.nr doc-footer-space 0
-.
-.
-.\" NS doc-display-vertical global register
-.\" NS vertical space between list elements etc.
-.
-.nr doc-display-vertical 0
-.
-.
-.\" NS doc-setup-page-layout macro
-.\" NS set up page layout
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-vertical
-.\" NS doc-footer-space
-.\" NS doc-header-space
-.
-.de doc-setup-page-layout
-. ie \n[cR] \
-. nr doc-header-space 0
-. el \
-. nr doc-header-space .5i
-. nr doc-footer-space .5i
-.
-. ll 78n
-. lt 78n
-. po 0i
-.
-. nr doc-display-vertical 1v
-. ad l
-. na
-..
-.
-.
-.ec
-.
-.ds doc-left-singlequote \[oq]
-.ds doc-right-singlequote \[cq]
-.
-.\" the following strings are `official'
-.ds <= \[<=]
-.ds >= \[>=]
-.ds aa \[aa]
-.ds ga \[ga]
-.ds q \[dq]
-.ds Ne \[!=]
-.ds Le \[<=]
-.ds Ge \[>=]
-.ds Lt <
-.ds Gt >
-.ds Pm \[+-]
-.ds Na \f[I]NaN\f[P]
-.ds Ba \f[R]|\f[P]
-.
-.\" Unicode TTYs have all glyph forms; for other TTY character sets we need
-.\" character representations which are different from GNU troff's standard
-.\" forms.
-.ie '\*[.T]'utf8' \{\
-. ds Rq \[rq]
-. ds Lq \[lq]
-. ds ua \[ua]
-. ds Pi \[*p]
-. ds If \[if]
-.\}
-.el \{\
-. ds Rq ''
-. ds Lq ``
-. ds ua ^
-. ds Pi pi
-. ds If infinity
-.\}
-.
-.eo
-.
-.
-.\" NS doc-header-string global string
-.\" NS the final string used for the manual page header
-.
-.ds doc-header-string
-.
-.
-.\" NS doc-setup-header macro
-.\" NS install and initialize header and footer support
-.\" NS
-.\" NS modifies:
-.\" NS doc-header-string
-.
-.de doc-setup-header
-. nr % 1
-. ds doc-header-string "\*[doc-document-title]
-. if !"\*[doc-section]"Null" \
-. as doc-header-string (\*[doc-section])
-.
-. ie \n[cR] \
-. doc-header
-. el \{\
-. wh 0 doc-header
-. wh -1.167i doc-footer
-. \}
-.
-. if ((\n[nl] == 0) : (\n[nl] == -1)) \
-' bp
-.
-. e@ doc-end-macro
-..
-.
-.
-.\" NS doc-get-width macro
-.\" NS computes the width of a string as a multiple of `doc-fixed-width':
-.\" NS `.doc-get-width string'
-.\" NS
-.\" NS modifies:
-.\" NS doc-width
-.
-.de doc-get-width
-. nr doc-width \w\$1
-. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
-. ie (\n[doc-width] % \n[doc-fixed-width]) \
-. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
-. el \
-. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
-. \}
-. el \
-. nr doc-width 0
-..
-.
-.
-.\" NS doc-get-arg-width macro
-.\" NS computes the width of an argument as a multiple of
-.\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
-.\" NS
-.\" NS modifies:
-.\" NS doc-width
-.
-.de doc-get-arg-width
-. nr doc-width \w\*[doc-arg\$1]
-. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
-. ie (\n[doc-width] % \n[doc-fixed-width]) \
-. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
-. el \
-. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
-. \}
-. el \
-. nr doc-width 0
-..
-.
-.
-.\" NS Ql user macro
-.\" NS quoted literal define
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Ql' set in doc-common
-.
-.de Ql
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \
-. ds doc-macro-name Ql
-. el \
-. tm Usage: .Ql argument ... (#\n[.c])
-. \}
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-. ds doc-quote-right "\*[doc-right-singlequote]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.ec
-.
-.\" EOF
diff --git a/tmac/doc-syms b/tmac/doc-syms
index 57e682aa..15ec8e4f 100644
--- a/tmac/doc-syms
+++ b/tmac/doc-syms
@@ -11,8 +11,8 @@
.\" 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.
+.\" 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.
@@ -29,208 +29,731 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc-syms 5.6 (Berkeley) 8/5/91
+.\" @(#)doc-syms 5.6 (Berkeley) 8/5/91
.\"
.\" %beginstrip%
-.\" NS Ux macro - UNIX
+.
+.
+.eo
+.
+.\" NS Ld user macro
+.\" NS print `...' (similar to TeX's \ldots command)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ld' defined in doc-common
+.
+.de Ld
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Ld
+. doc-parse-args \$@
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] \|.\|.\|.\&
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
+..
+.
+.
+.\" NS Ux user macro
+.\" NS print UNIX
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Ux
+.\" NS
+.\" NS width register `Ux' defined in doc-common
+.
.de Ux
-.nr cF \\n(.f
-.nr cZ \\n(.s
-.ds aa \&\f\\n(cF\s\\n(cZ
-.as b1 \&\\*(tNUNIX\\*(aa
-.rm aa
-.if \\n(aC==0 \{\
-. if \\n(.$>0 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 \{\
-. \\*(A\\n(aP
-. \}
-. el .nR
-.\}
-.el .aZ
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Ux \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Ux
+. doc-parse-args \$@
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] \*[doc-Tn-font-size]UNIX\*[doc-str-Ux]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
..
-.\" NS Bx macro -BSD UNIX (fix smaller nroff version)
+.
+.
+.\" NS Bx user macro
+.\" NS print BSD (fix smaller nroff version)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Bx
+.\" NS doc-str-Bx1
+.\" NS doc-str-Bx-XXX
+.\" NS
+.\" NS width register `Bx' defined in doc-common
+.
+.ds doc-str-Bx-Reno \-Reno
+.ds doc-str-Bx-reno \-Reno
+.ds doc-str-Bx-Tahoe \-Tahoe
+.ds doc-str-Bx-tahoe \-Tahoe
+.ds doc-str-Bx-Lite \-Lite
+.ds doc-str-Bx-lite \-Lite
+.ds doc-str-Bx-Lite2 \-Lite2
+.ds doc-str-Bx-lite2 \-Lite2
+.
.de Bx
-.nr cF \\n(.f
-.nr cZ \\n(.s
-.ds aa \&\f\\n(cF\s\\n(cZ
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \&\\*(tNBSD\\*(aa \\*(tNUNIX\\*(aa
-. el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.if "\\$1"-alpha" \{\
-\&currently in alpha test.
-. aY
-.\}
-.if "\\$1"-beta" \{\
-\&currently in beta test.
-. aY
-.\}
-.if "\\$1"-devel" \{\
-\&currently under development.
-. aY
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==2 \{\
-. as b1 \&\\*(A\\n(aP\&\\*(tNBSD\\*(aa
-. ie \\n(aC>\\n(aP \{\
-. nr jj \\n(aP+1
-. ie \\n(C\\n(jj==2 \{\
-. if "\\*(A\\n(jj"Reno" \{\
-. nr aP \\n(aP+1
-. as b1 \&\-\\*(A\\n(jj
-. \}
-. if "\\*(A\\n(jj"reno" \{\
-. nr aP \\n(aP+1
-. as b1 \&\-Reno
-. \}
-. if "\\*(A\\n(jj"Tahoe" \{\
-. nr aP \\n(aP+1
-. as b1 \&\-\\*(A\\n(jj
-. \}
-. if "\\*(A\\n(jj"tahoe" \{\
-. nr aP \\n(aP+1
-. as b1 \&\-Tahoe
-. \}
-. ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nR
-. \}
-. el .aZ
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. nR
-. \}
-. rr jj
-. \}
-. el .aZ
-. \}
-. el \{\
-. as b1 \&\\*(tNBSD\\*(aa U\\*(tNNIX\\*(aa
-. nR
-. \}
-.\}
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Bx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-Bx1 \*[doc-Tn-font-size]BSD\*[doc-str-Bx]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Bx
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie "\*[doc-arg\n[doc-arg-ptr]]"-alpha" \
+. as doc-str-Bx1 " (currently in alpha test)
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-beta" \
+. as doc-str-Bx1 " (currently in beta test)
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-devel" \
+. as doc-str-Bx1 " (currently under development)
+. el \{\
+. ds doc-str-Bx1 \&\*[doc-arg\n[doc-arg-ptr]]\^\*[doc-Tn-font-size]
+. as doc-str-Bx1 BSD\*[doc-str-Bx]
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie d doc-str-Bx-\*[doc-arg\n[doc-arg-ptr]] \
+. as doc-str-Bx1 "\*[doc-str-Bx-\*[doc-arg\n[doc-arg-ptr]]]
+. el \
+. nr doc-arg-ptr -1
+. \}
+. el \
+. nr doc-arg-ptr -1
+. \}
+. el \
+. nr doc-arg-ptr -1
+. \}\}\}\}\}
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Bx1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
..
-.\" Ns Ud macro - prints "currently under development" (HISTORY section)
+.
+.
+.\" NS Ud user macro (not parsed, not callable)
+.\" NS print "currently under development" (HISTORY section)
+.\" NS
+.\" NS width register `Ud' defined in doc-common
+.
.de Ud
-\&currently under development.
+. nop \&currently under development.
..
-.\" Ns At macro - AT&T UNIX
+.
+.
+.\" NS At user macro
+.\" NS print AT&T UNIX
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-At
+.\" NS doc-str-At1
+.\" NS doc-str-At-XXX
+.\" NS
+.\" NS width register `At' defined in doc-common
+.
+.ds doc-str-At-32v \&Version\~32V
+.as doc-str-At-32v " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v1 \&Version\~1
+.as doc-str-At-v1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v2 \&Version\~2
+.as doc-str-At-v2 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v3 \&Version\~3
+.as doc-str-At-v3 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v4 \&Version\~4
+.as doc-str-At-v4 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v5 \&Version\~5
+.as doc-str-At-v5 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v6 \&Version\~6
+.as doc-str-At-v6 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-v7 \&Version\~7
+.as doc-str-At-v7 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.ds doc-str-At-V \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V
+.as doc-str-At-V " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
+.ds doc-str-At-V.1 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.1
+.as doc-str-At-V.1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
+.ds doc-str-At-V.2 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.2
+.as doc-str-At-V.2 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
+.ds doc-str-At-V.4 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.4
+.as doc-str-At-V.4 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
+.
.de At
-.nr cF \\n(.f
-.nr cZ \\n(.s
-.ds aa \&\f\\n(cF\s\\n(cZ
-.if \\n(.$==2 \{\
-. if "\\$1"32v" \&Version 32V \\*(tNAT&T UNIX\\*(aa\\$2
-. if "\\$1"v6" \&Version 6 \\*(tNAT&T UNIX\\*(aa\\$2
-. if "\\$1"v7" \&Version 7 \\*(tNAT&T UNIX\\*(aa\\$2
-. if "\\$1"V" \&\\*(tNAT&T\\*(aa System V \\*(tNUNIX\\*(aa\\$2
-. if "\\$1"V.1" \&\\*(tNAT&T\\*(aa System V.1 \\*(tNUNIX\\*(aa\\$2
-. if "\\$1"V.4" \&\\*(tNAT&T\\*(aa System V.4 \\*(tNUNIX\\*(aa\\$2
-.\}
-.if \\n(.$==1 \{\
-. if "\\$1"32v" \&Version 32V \\*(tNAT&T UNIX\\*(aa
-. if "\\$1"v6" \&Version 6 \\*(tNAT&T UNIX\\*(aa
-. if "\\$1"v7" \&Version 7 \\*(tNAT&T UNIX\\*(aa
-. if "\\$1"V" \&\\*(tNAT&T\\*(aa System V \\*(tNUNIX\\*(aa
-. if "\\$1"V.1" \&\\*(tNAT&T\\*(aa System V.1 \\*(tNUNIX\\*(aa
-. if "\\$1"V.4" \&\\*(tNAT&T\\*(aa System V.4 \\*(tNUNIX\\*(aa
-.\}
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-At \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-At1 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name At
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
+. ie d doc-str-At-\*[doc-arg\n[doc-arg-ptr]] \
+. ds doc-str-At1 "\*[doc-str-At-\*[doc-arg\n[doc-arg-ptr]]]
+. el \{\
+. tmc mdoc warning: .At: Unknown AT&T UNIX version
+. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
+. nr doc-arg-ptr -1
+. \}\}
+. el \
+. nr doc-arg-ptr -1
+. \}
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-At1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
+..
+.
+.
+.\" NS Fx user macro
+.\" NS print FreeBSD
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Fx
+.\" NS doc-str-Fx1
+.\" NS
+.\" NS width register `Fx' defined in doc-common
+.
+.\" we use the doc-operating-system-FreeBSD-* strings defined in doc-common
+.
+.de Fx
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Fx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-Fx1 \*[doc-Tn-font-size]\%FreeBSD\*[doc-str-Fx]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Fx
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
+. ie d doc-operating-system-FreeBSD-\*[doc-arg\n[doc-arg-ptr]] \
+. as doc-str-Fx1 \~\*[doc-operating-system-FreeBSD-\*[doc-arg\n[doc-arg-ptr]]]
+. el \{\
+. tmc mdoc warning: .Fx: Unknown FreeBSD version
+. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
+. as doc-str-Fx1 \~\*[doc-arg\n[doc-arg-ptr]]
+. \}\}
+. el \
+. as doc-str-Fx1 \~\*[doc-arg\n[doc-arg-ptr]]
+. \}
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Fx1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
+..
+.
+.
+.\" NS Nx user macro
+.\" NS print NetBSD
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Nx
+.\" NS doc-str-Nx1
+.\" NS
+.\" NS width register `Nx' defined in doc-common
+.
+.\" we use the doc-operating-system-NetBSD-* strings defined in doc-common
+.
+.de Nx
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Nx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-Nx1 \*[doc-Tn-font-size]\%N\s[\n[doc-curr-size]u]et
+. as doc-str-Nx1 \*[doc-Tn-font-size]BSD\*[doc-str-Nx]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Nx
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
+. ie d doc-operating-system-NetBSD-\*[doc-arg\n[doc-arg-ptr]] \
+. as doc-str-Nx1 \~\*[doc-operating-system-NetBSD-\*[doc-arg\n[doc-arg-ptr]]]
+. el \{\
+. tmc mdoc warning: .Nx: Unknown NetBSD version
+. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
+. as doc-str-Nx1 \~\*[doc-arg\n[doc-arg-ptr]]
+. \}\}
+. el \
+. as doc-str-Nx1 \~\*[doc-arg\n[doc-arg-ptr]]
+. \}
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Nx1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
+..
+.
+.
+.\" NS Ox user macro
+.\" NS print OpenBSD
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Ox
+.\" NS doc-str-Ox1
+.\" NS
+.\" NS width register `Ox' defined in doc-common
+.
+.de Ox
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Ox \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-Ox1 \*[doc-Tn-font-size]\%OpenBSD\*[doc-str-Ox]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Ox
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \
+. as doc-str-Ox1 \~\*[doc-arg\n[doc-arg-ptr]]
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ox1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
..
+.
+.
+.\" NS Bsx user macro
+.\" NS print BSD/OS
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Bsx
+.\" NS doc-str-Bsx1
+.\" NS
+.\" NS width register `Bsx' defined in doc-common
+.
+.de Bsx
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-Bsx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. \" default value if no argument
+. ds doc-str-Bsx1 \*[doc-Tn-font-size]BSD/OS\*[doc-str-Bsx]
+.
+. if !\n[doc-arg-limit] \
+. if \n[.$] \{\
+. ds doc-macro-name Bsx
+. doc-parse-args \$@
+. \}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \
+. as doc-str-Bsx1 \~\*[doc-arg\n[doc-arg-ptr]]
+. el \
+. nr doc-arg-ptr -1
+. \}
+.
+. \" replace current argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Bsx1]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. doc-print-recursive
+..
+.
+.
.\" The Bt macro should go away now
-.\" Ns Bt macro - prints "is currently in beta test." (HISTORY section)
+.
+.\" NS Bt user macro (not parsed, not callable)
+.\" NS print "is currently in beta test." (HISTORY section)
+.\" NS
+.\" NS width register `Bt' defined in doc-common
+.
.de Bt
-\&is currently in beta test.
+. nop \&is currently in beta test.
..
-.\" NS St macro - standards (posix, ansi - formal standard names)
-.ds Px \\*(tNPOSIX
-.ds Ai \\*(tNANSI
+.
+.
+.\" NS Px user macro
+.\" NS print POSIX
+.
+.ds Px \*[doc-Tn-font-size]\%POSIX
+.
+.
+.\" NS Ai user macro
+.\" NS print ANSI
+.
+.ds Ai \*[doc-Tn-font-size]\%ANSI
+.
+.
+.\" NS St user macro
+.\" NS standards (posix, ansi - formal standard names)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-reg-St
+.\" NS doc-str-St
+.\" NS doc-str-St1
+.\" NS doc-str-St-XXX
+.\" NS
+.\" NS width register `St' defined in doc-common
+.
+.\" ANSI/ISO C
+.ds doc-str-St--ansiC-89 \*[Ai] \*[doc-str-St]X\^3.159-1989
+.as doc-str-St--ansiC-89 " (\*[Lq]\)\*[Ai]\~C\*[doc-str-St]\*[Rq])
+.als doc-str-St--ansiC doc-str-St--ansiC-89
+.ds doc-str-St--isoC \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1990
+.as doc-str-St--isoC " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^89\*[doc-str-St]\*[Rq])
+.ds doc-str-St--isoC-99 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1999
+.as doc-str-St--isoC-99 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^99\*[doc-str-St]\*[Rq])
+.
+.\" POSIX Part 1: System API
+.ds doc-str-St--p1003.1 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1
+.as doc-str-St--p1003.1 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1-88 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-1988
+.as doc-str-St--p1003.1-88 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1-90 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1990
+.as doc-str-St--p1003.1-90 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.als doc-str-St--iso9945-1-90 doc-str-St--p1003.1-90
+.ds doc-str-St--p1003.1b-93 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1b-1993
+.as doc-str-St--p1003.1b-93 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1c-95 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1c-1995
+.as doc-str-St--p1003.1c-95 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1i-95 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1i-1995
+.as doc-str-St--p1003.1i-95 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1-96 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1996
+.as doc-str-St--p1003.1-96 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.als doc-str-St--iso9945-1-96 doc-str-St--p1003.1-96
+.ds doc-str-St--p1003.1g-2000 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1g-2000
+.as doc-str-St--p1003.1g-2000 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.
+.\" POSIX Part 2: Shell and Utilities
+.ds doc-str-St--p1003.2 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2
+.as doc-str-St--p1003.2 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
+.ds doc-str-St--p1003.2-92 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2-1992
+.as doc-str-St--p1003.2-92 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
+.ds doc-str-St--p1003.2a-92 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2a-1992
+.as doc-str-St--p1003.2a-92 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
+.ds doc-str-St--iso9945-2-93 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-2:1993
+.as doc-str-St--iso9945-2-93 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
+.
+.\" X/Open
+.ds doc-str-St--susv2 Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
+.as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq])
+.ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition
+.as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq])
+.ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5
+.as doc-str-St--xbd5 " (\*[Lq]\*[doc-Tn-font-size]XBD\*[doc-str-St]\^5\*[Rq])
+.ds doc-str-St--xcu5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Commands and Utilities Issue\~5
+.as doc-str-St--xcu5 " (\*[Lq]\*[doc-Tn-font-size]XCU\*[doc-str-St]\^5\*[Rq])
+.ds doc-str-St--xcurses4.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Curses Issue\~4.2
+.as doc-str-St--xcurses4.2 " (\*[Lq]\*[doc-Tn-font-size]XCURSES\*[doc-str-St]\^4.2\*[Rq])
+.ds doc-str-St--xns5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Networking Services Issue\~5
+.as doc-str-St--xns5 " (\*[Lq]\*[doc-Tn-font-size]XNS\*[doc-str-St]\^5\*[Rq])
+.ds doc-str-St--xns5.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Networking Services Issue\~5.2
+.as doc-str-St--xns5.2 " (\*[Lq]\*[doc-Tn-font-size]XNS\*[doc-str-St]\^5.2\*[Rq])
+.ds doc-str-St--xpg3 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~3
+.as doc-str-St--xpg3 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^3\*[Rq])
+.ds doc-str-St--xpg4 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~4
+.as doc-str-St--xpg4 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4\*[Rq])
+.ds doc-str-St--xpg4.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~4.2
+.as doc-str-St--xpg4.2 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4.2\*[Rq])
+.ds doc-str-St--xsh5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interfaces and Headers Issue\~5
+.as doc-str-St--xsh5 " (\*[Lq]\*[doc-Tn-font-size]XSH\*[doc-str-St]\^5\*[Rq])
+.
+.\" Miscellaneous
+.ds doc-str-St--ieee754 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 754-1985
+.ds doc-str-St--iso8802-3 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 8802-3:1989
+.
.de St
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-.tm Usage: .St [-p1003.1-88 | -p1003.2 | -ansiC-89 | -iso ] \\*(Pu ... (#\\n(.c)
-. \}
-. el \{\
-. ds mN St
-. nr aP 0
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. ds aa \&\f\\n(cF\s\\n(cZ
-. nr aP \\n(aP+1
-. if "\\*(A\\n(aP"-p1003.1-88" \{\
-. ie \\n(sT==1 \{\
-. ds b1 \&\\*(tNIEEE Std\\*(aa1003.1-1988\\*(sV
-. as b1 (``\\*(tN\\*(Px\\*(aa'')
-. \}
-. el \{\
-. ds b1 \&\\*(tNIEEE Std\\*(aa1003.1-1988\\*(sV
-. as b1 (``\\*(tN\\*(Px\\*(aa'')
-. \}
-. \}
-. if "\\*(A\\n(aP"-p1003.2" \{\
-. ie \\n(sT==1 \{\
-. ds b1 \&\\*(tNIEEE Std\\*(aa1003.2
-. as b1 (``\\*(tN\\*(Px\\*(aa'')
-. \}
-. el \{\
-. ds b1 \&\\*(tNIEEE Std\\*(aa1003.2\\*(sV
-. as b1 (``\\*(tN\\*(Px\\*(aa'')
-. \}
-. \}
-. if "\\*(A\\n(aP"-ansiC" \{\
-. ie \\n(sT==1 \{\
-. ds b1 \&\\*(tNANSI C\\*(aa3.159-1989\\*(sV
-. as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. el \{\
-. ds b1 \&\\*(tNANSI C\\*(aa3.159-1989\\*(sV
-. as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. \}
-. if "\\*(A\\n(aP"-ansiC-89" \{\
-. ie \\n(sT==1 \{\
-. ds b1 \&\\*(tNANSI C\\*(aa3.159-1989\\*(sV
-. as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. el \{\
-. ds b1 \&\\*(tNANSI C\\*(aa3.159-1989\\*(sV
-. as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. \}
-. if "\\*(A\\n(aP"-iso8802-3" \{\
-. ie \\n(sT==1 \{\
-. ds b1 \&\\*(tNISO \\*(aa8802-3: 1989
-.\" . ds b1 \&\\*(tNISO \\*(aa8802-3: 1989\\*(sV
-.\" . as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. el \{\
-. ds b1 \&\\*(tNISO \\*(aa8802-3: 1989
-.\" . ds b1 \&\\*(tNISO \\*(aa8802-3: 1989\\*(sV
-.\" . as b1 (``\\*(tNANSI C\\*(aa'')
-. \}
-. \}
-. ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nR
-. \}
-. el .aZ
-.\}
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name St
+. doc-parse-args \$@
+. \}
+. el \
+. doc-St-usage
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-str-St \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
+.
+. ds doc-str-St1
+. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
+. ie d doc-str-St-\*[doc-arg\n[doc-arg-ptr]] \
+. ds doc-str-St1 "\*[doc-str-St-\*[doc-arg\n[doc-arg-ptr]]]
+. el \{\
+. tmc "mdoc warning: .St: Unknown standard abbreviation
+. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
+. tm1 " Please refer to groff_mdoc.references.man for a
+. tm1 " list of available standard abbreviations.
+. \}\}
+. el \
+. doc-St-usage
+.
+. \" replacing argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-St1]
+.
+. doc-print-recursive
+. \}
+. el \{\
+. doc-St-usage
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS doc-St-usage macro
+.
+.de doc-St-usage
+. tm1 "Usage: .St standard (#\n[.c])
+. tm1 " Please refer to groff_mdoc.references.man for a list of
+. tm1 " available standard abbreviations.
+..
+.
+.
+.\" NS Lb user macro
+.\" NS formal library names for LIBRARY sections
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-reg-Lb
+.\" NS doc-str-Lb
+.\" NS doc-str-Lb-XXX
+.\" NS
+.\" NS width register `Lb' defined in doc-common
+.
+.ds doc-str-Lb-libarm32 ARM32 Architecture Library (libarm32, \-larm32)
+.ds doc-str-Lb-libc Standard C\~Library (libc, \-lc)
+.ds doc-str-Lb-libcompat Compatibility Library (libcompat, \-lcompat)
+.ds doc-str-Lb-libcrypt Crypt Library (libcrypt, \-lcrypt)
+.ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses)
+.ds doc-str-Lb-libedit Command Line Editor Library (libedit, \-ledit)
+.ds doc-str-Lb-libi386 i386 Architecture Library (libi386, \-li386)
+.ds doc-str-Lb-libipsec IPsec Policy Control Library (libipsec, \-lipsec)
+.ds doc-str-Lb-libkvm Kernel Data Access Library (libkvm, \-lkvm)
+.ds doc-str-Lb-libm Math Library (libm, \-lm)
+.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu)
+.ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio)
+.ds doc-str-Lb-libposix \*[Px] Compatibility Library (libposix, \-lposix)
+.ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv)
+.ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap)
+.ds doc-str-Lb-libutil System Utilities Library (libutil, \-lutil)
+.ds doc-str-Lb-libz Compression Library (libz, \-lz)
+.
+.de Lb
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Lb
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Lb library_name ... (#\n[.c])
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. ie d doc-str-Lb-\*[doc-arg\n[doc-arg-ptr]] \
+. ds doc-str-Lb "\*[doc-str-Lb-\*[doc-arg\n[doc-arg-ptr]]]
+. el \{\
+. tmc "mdoc warning: .Lb: no description for library
+. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' available (#\n[.c])
+. ds doc-str-Lb library \*[Lq]\*[doc-arg\n[doc-arg-ptr]]\*[Rq]
+. \}
+.
+. \" replacing argument with result
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Lb]
+.
+. doc-print-recursive
+. \}
+. el \{\
+. tm Usage: .Lb library_name ... (#\n[.c])
+. doc-reset-args
+. \}
..
+.
+.
+.ec
+.
+.\" EOF
diff --git a/tmac/doc-syms.new b/tmac/doc-syms.new
deleted file mode 100755
index b1908081..00000000
--- a/tmac/doc-syms.new
+++ /dev/null
@@ -1,759 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)doc-syms 5.6 (Berkeley) 8/5/91
-.\"
-.\" %beginstrip%
-.
-.
-.eo
-.
-.\" NS Ld user macro
-.\" NS print `...' (similar to TeX's \ldots command)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ld' defined in doc-common
-.
-.de Ld
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Ld
-. doc-parse-args \$@
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] \|.\|.\|.\&
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Ux user macro
-.\" NS print UNIX
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Ux
-.\" NS
-.\" NS width register `Ux' defined in doc-common
-.
-.de Ux
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Ux \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Ux
-. doc-parse-args \$@
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] \*[doc-Tn-font-size]UNIX\*[doc-str-Ux]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Bx user macro
-.\" NS print BSD (fix smaller nroff version)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Bx
-.\" NS doc-str-Bx1
-.\" NS doc-str-Bx-XXX
-.\" NS
-.\" NS width register `Bx' defined in doc-common
-.
-.ds doc-str-Bx-Reno \-Reno
-.ds doc-str-Bx-reno \-Reno
-.ds doc-str-Bx-Tahoe \-Tahoe
-.ds doc-str-Bx-tahoe \-Tahoe
-.ds doc-str-Bx-Lite \-Lite
-.ds doc-str-Bx-lite \-Lite
-.ds doc-str-Bx-Lite2 \-Lite2
-.ds doc-str-Bx-lite2 \-Lite2
-.
-.de Bx
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Bx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-Bx1 \*[doc-Tn-font-size]BSD\*[doc-str-Bx]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Bx
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie "\*[doc-arg\n[doc-arg-ptr]]"-alpha" \
-. as doc-str-Bx1 " (currently in alpha test)
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-beta" \
-. as doc-str-Bx1 " (currently in beta test)
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-devel" \
-. as doc-str-Bx1 " (currently under development)
-. el \{\
-. ds doc-str-Bx1 \&\*[doc-arg\n[doc-arg-ptr]]\^\*[doc-Tn-font-size]
-. as doc-str-Bx1 BSD\*[doc-str-Bx]
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie d doc-str-Bx-\*[doc-arg\n[doc-arg-ptr]] \
-. as doc-str-Bx1 "\*[doc-str-Bx-\*[doc-arg\n[doc-arg-ptr]]]
-. el \
-. nr doc-arg-ptr -1
-. \}
-. el \
-. nr doc-arg-ptr -1
-. \}
-. el \
-. nr doc-arg-ptr -1
-. \}\}\}\}\}
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Bx1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Ud user macro (not parsed, not callable)
-.\" NS print "currently under development" (HISTORY section)
-.\" NS
-.\" NS width register `Ud' defined in doc-common
-.
-.de Ud
-. nop \&currently under development.
-..
-.
-.
-.\" NS At user macro
-.\" NS print AT&T UNIX
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-At
-.\" NS doc-str-At1
-.\" NS doc-str-At-XXX
-.\" NS
-.\" NS width register `At' defined in doc-common
-.
-.ds doc-str-At-32v \&Version\~32V
-.as doc-str-At-32v " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v1 \&Version\~1
-.as doc-str-At-v1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v2 \&Version\~2
-.as doc-str-At-v2 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v3 \&Version\~3
-.as doc-str-At-v3 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v4 \&Version\~4
-.as doc-str-At-v4 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v5 \&Version\~5
-.as doc-str-At-v5 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v6 \&Version\~6
-.as doc-str-At-v6 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-v7 \&Version\~7
-.as doc-str-At-v7 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.ds doc-str-At-V \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V
-.as doc-str-At-V " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-.ds doc-str-At-V.1 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.1
-.as doc-str-At-V.1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-.ds doc-str-At-V.2 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.2
-.as doc-str-At-V.2 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-.ds doc-str-At-V.4 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.4
-.as doc-str-At-V.4 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-.
-.de At
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-At \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-At1 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name At
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
-. ie d doc-str-At-\*[doc-arg\n[doc-arg-ptr]] \
-. ds doc-str-At1 "\*[doc-str-At-\*[doc-arg\n[doc-arg-ptr]]]
-. el \{\
-. tmc mdoc warning: .At: Unknown AT&T UNIX version
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
-. nr doc-arg-ptr -1
-. \}\}
-. el \
-. nr doc-arg-ptr -1
-. \}
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-At1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Fx user macro
-.\" NS print FreeBSD
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Fx
-.\" NS doc-str-Fx1
-.\" NS
-.\" NS width register `Fx' defined in doc-common
-.
-.\" we use the doc-operating-system-FreeBSD-* strings defined in doc-common
-.
-.de Fx
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Fx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-Fx1 \*[doc-Tn-font-size]\%FreeBSD\*[doc-str-Fx]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Fx
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
-. ie d doc-operating-system-FreeBSD-\*[doc-arg\n[doc-arg-ptr]] \
-. as doc-str-Fx1 \~\*[doc-operating-system-FreeBSD-\*[doc-arg\n[doc-arg-ptr]]]
-. el \{\
-. tmc mdoc warning: .Fx: Unknown FreeBSD version
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
-. as doc-str-Fx1 \~\*[doc-arg\n[doc-arg-ptr]]
-. \}\}
-. el \
-. as doc-str-Fx1 \~\*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Fx1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Nx user macro
-.\" NS print NetBSD
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Nx
-.\" NS doc-str-Nx1
-.\" NS
-.\" NS width register `Nx' defined in doc-common
-.
-.\" we use the doc-operating-system-NetBSD-* strings defined in doc-common
-.
-.de Nx
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Nx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-Nx1 \*[doc-Tn-font-size]\%N\s[\n[doc-curr-size]u]et
-. as doc-str-Nx1 \*[doc-Tn-font-size]BSD\*[doc-str-Nx]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Nx
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
-. ie d doc-operating-system-NetBSD-\*[doc-arg\n[doc-arg-ptr]] \
-. as doc-str-Nx1 \~\*[doc-operating-system-NetBSD-\*[doc-arg\n[doc-arg-ptr]]]
-. el \{\
-. tmc mdoc warning: .Nx: Unknown NetBSD version
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
-. as doc-str-Nx1 \~\*[doc-arg\n[doc-arg-ptr]]
-. \}\}
-. el \
-. as doc-str-Nx1 \~\*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Nx1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Ox user macro
-.\" NS print OpenBSD
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Ox
-.\" NS doc-str-Ox1
-.\" NS
-.\" NS width register `Ox' defined in doc-common
-.
-.de Ox
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Ox \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-Ox1 \*[doc-Tn-font-size]\%OpenBSD\*[doc-str-Ox]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Ox
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \
-. as doc-str-Ox1 \~\*[doc-arg\n[doc-arg-ptr]]
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ox1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" NS Bsx user macro
-.\" NS print BSD/OS
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Bsx
-.\" NS doc-str-Bsx1
-.\" NS
-.\" NS width register `Bsx' defined in doc-common
-.
-.de Bsx
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-Bsx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. \" default value if no argument
-. ds doc-str-Bsx1 \*[doc-Tn-font-size]BSD/OS\*[doc-str-Bsx]
-.
-. if !\n[doc-arg-limit] \
-. if \n[.$] \{\
-. ds doc-macro-name Bsx
-. doc-parse-args \$@
-. \}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \
-. as doc-str-Bsx1 \~\*[doc-arg\n[doc-arg-ptr]]
-. el \
-. nr doc-arg-ptr -1
-. \}
-.
-. \" replace current argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Bsx1]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. doc-print-recursive
-..
-.
-.
-.\" The Bt macro should go away now
-.
-.\" NS Bt user macro (not parsed, not callable)
-.\" NS print "is currently in beta test." (HISTORY section)
-.\" NS
-.\" NS width register `Bt' defined in doc-common
-.
-.de Bt
-. nop \&is currently in beta test.
-..
-.
-.
-.\" NS Px user macro
-.\" NS print POSIX
-.
-.ds Px \*[doc-Tn-font-size]\%POSIX
-.
-.
-.\" NS Ai user macro
-.\" NS print ANSI
-.
-.ds Ai \*[doc-Tn-font-size]\%ANSI
-.
-.
-.\" NS St user macro
-.\" NS standards (posix, ansi - formal standard names)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-reg-St
-.\" NS doc-str-St
-.\" NS doc-str-St1
-.\" NS doc-str-St-XXX
-.\" NS
-.\" NS width register `St' defined in doc-common
-.
-.\" ANSI/ISO C
-.ds doc-str-St--ansiC-89 \*[Ai] \*[doc-str-St]X\^3.159-1989
-.as doc-str-St--ansiC-89 " (\*[Lq]\)\*[Ai]\~C\*[doc-str-St]\*[Rq])
-.als doc-str-St--ansiC doc-str-St--ansiC-89
-.ds doc-str-St--isoC \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1990
-.as doc-str-St--isoC " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^89\*[doc-str-St]\*[Rq])
-.ds doc-str-St--isoC-99 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1999
-.as doc-str-St--isoC-99 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^99\*[doc-str-St]\*[Rq])
-.
-.\" POSIX Part 1: System API
-.ds doc-str-St--p1003.1 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1
-.as doc-str-St--p1003.1 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.ds doc-str-St--p1003.1-88 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-1988
-.as doc-str-St--p1003.1-88 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.ds doc-str-St--p1003.1-90 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1990
-.as doc-str-St--p1003.1-90 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.als doc-str-St--iso9945-1-90 doc-str-St--p1003.1-90
-.ds doc-str-St--p1003.1b-93 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1b-1993
-.as doc-str-St--p1003.1b-93 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.ds doc-str-St--p1003.1c-95 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1c-1995
-.as doc-str-St--p1003.1c-95 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.ds doc-str-St--p1003.1i-95 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1i-1995
-.as doc-str-St--p1003.1i-95 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.ds doc-str-St--p1003.1-96 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1996
-.as doc-str-St--p1003.1-96 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.als doc-str-St--iso9945-1-96 doc-str-St--p1003.1-96
-.ds doc-str-St--p1003.1g-2000 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1g-2000
-.as doc-str-St--p1003.1g-2000 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
-.
-.\" POSIX Part 2: Shell and Utilities
-.ds doc-str-St--p1003.2 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2
-.as doc-str-St--p1003.2 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
-.ds doc-str-St--p1003.2-92 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2-1992
-.as doc-str-St--p1003.2-92 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
-.ds doc-str-St--p1003.2a-92 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2a-1992
-.as doc-str-St--p1003.2a-92 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
-.ds doc-str-St--iso9945-2-93 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-2:1993
-.as doc-str-St--iso9945-2-93 " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
-.
-.\" X/Open
-.ds doc-str-St--susv2 Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
-.as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq])
-.ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition
-.as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq])
-.ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5
-.as doc-str-St--xbd5 " (\*[Lq]\*[doc-Tn-font-size]XBD\*[doc-str-St]\^5\*[Rq])
-.ds doc-str-St--xcu5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Commands and Utilities Issue\~5
-.as doc-str-St--xcu5 " (\*[Lq]\*[doc-Tn-font-size]XCU\*[doc-str-St]\^5\*[Rq])
-.ds doc-str-St--xcurses4.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Curses Issue\~4.2
-.as doc-str-St--xcurses4.2 " (\*[Lq]\*[doc-Tn-font-size]XCURSES\*[doc-str-St]\^4.2\*[Rq])
-.ds doc-str-St--xns5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Networking Services Issue\~5
-.as doc-str-St--xns5 " (\*[Lq]\*[doc-Tn-font-size]XNS\*[doc-str-St]\^5\*[Rq])
-.ds doc-str-St--xns5.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Networking Services Issue\~5.2
-.as doc-str-St--xns5.2 " (\*[Lq]\*[doc-Tn-font-size]XNS\*[doc-str-St]\^5.2\*[Rq])
-.ds doc-str-St--xpg3 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~3
-.as doc-str-St--xpg3 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^3\*[Rq])
-.ds doc-str-St--xpg4 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~4
-.as doc-str-St--xpg4 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4\*[Rq])
-.ds doc-str-St--xpg4.2 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~4.2
-.as doc-str-St--xpg4.2 " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4.2\*[Rq])
-.ds doc-str-St--xsh5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interfaces and Headers Issue\~5
-.as doc-str-St--xsh5 " (\*[Lq]\*[doc-Tn-font-size]XSH\*[doc-str-St]\^5\*[Rq])
-.
-.\" Miscellaneous
-.ds doc-str-St--ieee754 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 754-1985
-.ds doc-str-St--iso8802-3 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 8802-3:1989
-.
-.de St
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name St
-. doc-parse-args \$@
-. \}
-. el \
-. doc-St-usage
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-str-St \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
-.
-. ds doc-str-St1
-. ie \A\*[doc-arg\n[doc-arg-ptr]] \{\
-. ie d doc-str-St-\*[doc-arg\n[doc-arg-ptr]] \
-. ds doc-str-St1 "\*[doc-str-St-\*[doc-arg\n[doc-arg-ptr]]]
-. el \{\
-. tmc "mdoc warning: .St: Unknown standard abbreviation
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
-. tm1 " Please refer to groff_mdoc.references.man for a
-. tm1 " list of available standard abbreviations.
-. \}\}
-. el \
-. doc-St-usage
-.
-. \" replacing argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-St1]
-.
-. doc-print-recursive
-. \}
-. el \{\
-. doc-St-usage
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS doc-St-usage macro
-.
-.de doc-St-usage
-. tm1 "Usage: .St standard (#\n[.c])
-. tm1 " Please refer to groff_mdoc.references.man for a list of
-. tm1 " available standard abbreviations.
-..
-.
-.
-.\" NS Lb user macro
-.\" NS formal library names for LIBRARY sections
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-reg-Lb
-.\" NS doc-str-Lb
-.\" NS doc-str-Lb-XXX
-.\" NS
-.\" NS width register `Lb' defined in doc-common
-.
-.ds doc-str-Lb-libarm32 ARM32 Architecture Library (libarm32, \-larm32)
-.ds doc-str-Lb-libc Standard C\~Library (libc, \-lc)
-.ds doc-str-Lb-libcompat Compatibility Library (libcompat, \-lcompat)
-.ds doc-str-Lb-libcrypt Crypt Library (libcrypt, \-lcrypt)
-.ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses)
-.ds doc-str-Lb-libedit Command Line Editor Library (libedit, \-ledit)
-.ds doc-str-Lb-libi386 i386 Architecture Library (libi386, \-li386)
-.ds doc-str-Lb-libipsec IPsec Policy Control Library (libipsec, \-lipsec)
-.ds doc-str-Lb-libkvm Kernel Data Access Library (libkvm, \-lkvm)
-.ds doc-str-Lb-libm Math Library (libm, \-lm)
-.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu)
-.ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio)
-.ds doc-str-Lb-libposix \*[Px] Compatibility Library (libposix, \-lposix)
-.ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv)
-.ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap)
-.ds doc-str-Lb-libutil System Utilities Library (libutil, \-lutil)
-.ds doc-str-Lb-libz Compression Library (libz, \-lz)
-.
-.de Lb
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Lb
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Lb library_name ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. ie d doc-str-Lb-\*[doc-arg\n[doc-arg-ptr]] \
-. ds doc-str-Lb "\*[doc-str-Lb-\*[doc-arg\n[doc-arg-ptr]]]
-. el \{\
-. tmc "mdoc warning: .Lb: no description for library
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' available (#\n[.c])
-. ds doc-str-Lb library \*[Lq]\*[doc-arg\n[doc-arg-ptr]]\*[Rq]
-. \}
-.
-. \" replacing argument with result
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Lb]
-.
-. doc-print-recursive
-. \}
-. el \{\
-. tm Usage: .Lb library_name ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.ec
-.
-.\" EOF
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index f83f0874..45b9770e 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -11,8 +11,8 @@
.\" 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.
+.\" 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.
@@ -29,3397 +29,6204 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc.tmac 5.8 (Berkeley) 8/5/91
+.\" @(#)doc 5.8 (Berkeley) 8/5/91
+.\"
.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
.\" are loaded using the `mso' request.
-.\"
-.\" .mdoc-parse - attempt to parse troff request arguments
-.\" %beginstrip%
-.if \n(.g \{\
-.cp 0
-.ftr C CR
-.\}
-.if \n(.g .ig
-.de sO
-.so /usr/share/tmac/\\$1
-..
-.if !\n(.g .ig
-.de sO
-.mso mdoc/\\$1
-..
-.if t \{\
-. sO doc-ditroff
-.\}
-.if n \{\
-. sO doc-nroff
-.\}
-.sO doc-common
-.sO doc-syms
-.\" NS Db macro - start/stop DEBUG MODE
-.\" NS Db register DEBUG MODE
-.\" NS iN register DEBUG MODE (inline if 1, to stderr if 0 (default))
-.nr Db 0
-.de Db
-.ie \\n(.$==0 \{\
-. ie \\n(Db==0 \{\
-.tm DEBUGGING ON
-. nr Db 1
-. \}
-. el \{\
-.tm DEBUGGING OFF
-. nr Db 0
-. \}
-.\}
-.el \{\
-. if "\\$1"on" \{\
-.tm DEBUGGING ON
-. nr Db 1
-. \}
-. if "\\$1"off" \{\
-.tm DEBUGGING OFF
-. nr Db 0
-. \}
-.\}
-..
-.\" NS aV macro - parse argument vector (recursive) (.aV arg ... )
-.\" NS fV macro - parse argument vector (recursive) (.fV)
-.\" NS aC register argument counter (aV/fV)
-.\" NS fV register argument counter (must set to \\n(.$ prior to reuqest) (fV)
-.\" NS A[0-9] argument vector (aV/fV)
-.\" NS C[0-9] reg. arg type(1=macro, 2=arg, 3=punct-suf, 4=punct-pre) (aV/fV)
-.\" NS S[0-9] space vector (sV)
-.\" NS aP register argument pointer (aV)
-.\" NS yU local string used for debugging
-.\" NS iI local register (indent for inline debug mode)
-.\" NS mN name of calling request (set in each user requestable macro)
-.de aV
-.nr aC \\n(aC+1
-.ie "\\$1"|" \{\
-. if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP
-. if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP
-. if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP
-. if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP
-. if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP
-.\}
-.el .ds A\\n(aC \\$1
-.aU \\n(aC
-.nr C\\n(aC \\n(aT
-.s\\n(aT
-.if \\n(Db \{\
-. if \\n(aT==1 .ds yU Executable
-. if \\n(aT==2 .ds yU String
-. if \\n(aT==3 .ds yU Closing Punctuation or suffix
-. if \\n(aT==4 .ds yU Opening Punctuation or prefix
-. if \\n(iN==1 \{\
-. br
-. nr iI \\n(.iu
-. in -\\n(iIu
-. if \\n(aC==1 \{\
-\&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
-. \}
-\&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
-\&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
-. \}
-. if \\n(iN==0 \{\
-. if \\n(aC==1 \{\
-. tm DEBUG(argv) MACRO: `.\\*(mN' Line #: \\n(.c
-. \}
-. tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
-. tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
-. \}
-.\}
-.ie \\n(.$==1 \{\
-. nr aP 0
-. ie \\n(dZ==1 \{\
-. if \\n(oM>1 .as b1 \\*(S0
-. \}
-. el \{\
-. if \\n(oM>0 \{\
-. if \\n(fC==0 .as b1 \\*(S0
-. \}
-. \}
-. ds S0 \\*(S\\n(aC
-. if \\n(Db \{\
-. if \\n(iN==1 \{\
-\&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
-. br
-. in \\n(iIu
-. \}
-. if \\n(iN==0 \{\
-.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
-. \}
-. \}
-.\}
-.el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.de fV
-.nr aC \\n(aC+1
-.if "\\*(A\\n(aC"|" \{\
-. if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP
-. if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP
-. if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP
-. if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP
-. if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP
-.\}
-.aU \\n(aC
-.nr C\\n(aC \\n(aT
-.s\\n(aT
-.if \\n(Db \{\
-. if \\n(aT==1 .ds yU Executable
-. if \\n(aT==2 .ds yU String
-. if \\n(aT==3 .ds yU Closing Punctuation or suffix
-. if \\n(aT==4 .ds yU Opening Punctuation or prefix
-. if \\n(iN==1 \{\
-. br
-. nr iI \\n(.iu
-. in -\\n(iIu
-. if \\n(aC==1 \{\
-\&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
-. \}
-\&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
-\&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
-. \}
-. if \\n(iN==0 \{\
-. if \\n(aC==1 \{\
-. tm DEBUG(fargv) MACRO: `.\\*(mN' Line #: \\n(.c
-. \}
-. tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
-. tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
-. \}
-.\}
-.ie \\n(fV==1 \{\
-. nr aP 0
-. ie \\n(dZ==1 \{\
-. if \\n(oM>1 .as b1 \\*(S0
-. \}
-. el \{\
-. if \\n(oM>0 \{\
-. if \\n(fC==0 .as b1 \\*(S0
-. \}
-. \}
-. ds S0 \\*(S\\n(aC
-. nr fV 0
-. if \\n(Db \{\
-. ie \\n(iN \{\
-\&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
-. br
-. in \\n(iIu
-. \}
-. el \{\
-.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
-. \}
-. \}
-.\}
-.el \{\
-. nr fV \\n(fV-1
-. fV
-.\}
-..
-.\" NS aX macro - stuff saved strings into `b1' (used by -diag list)
-.de aX
-.nr aP \\n(aP+1
-.as b1 \&\\*(A\\n(aP
-.ie \\n(fV==1 \{\
-. nr aP 0
-. nr fV 0
-.\}
-.el \{\
-. as b1 \&\\*(sV
-. nr fV \\n(fV-1
-. aX
-.\}
-..
-.\" NS aI macro - append arg to arg vector: .aI [arg] [type] (used by .En only)
-.de aI
-.ie \\n(aC<9 \{\
-. nr aC \\n(aC+1
-. ds A\\n(aC \\$1
-. nr C\\n(aC \\$2
-. s\\$2
-. ds xV S\\n(aC
-.\}
-.el \{\
-. tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c)
-. tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
-.\}
-..
-.\"
-.\" NS aZ macro - print buffer (pB) and clean up arg vectors (aY)
-.de aZ
-.pB
-.aY
-..
-.\" NS aY macro - clean up arg vector
-.de aY
-.rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
-.rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
-.rm S1 S2 S3 S4 S5 S6 S7 S8 S9
-.nr aC 0
-.nr aP 0
-..
-.\" NS pB macro - test for end of vector (eol) (print b1 buffer or divert)
-.de pB
-.ie \\n(dZ==1 \{\
-. if \\n(oM==1 \{\&\\*(b1
-. rm S0
-. ds b1
-. \}
-. if \\n(oM==0 \{\
-. x2
-. \}
-.\}
-.el \{\
-. ie \\n(oM==0 \{\&\\*(b1
-. rm S0
-. ds b1
-. \}
-. el \{\
-. if ((\\n(sM==1)&(\\n(tP==0)) \{\
-. x1
-. \}
-. \}
-.\}
-.hy
-..
-.\" NS x1 macro - save buffer and divert if tP flag set
-.\" NS eB diversion string
-.\" NS b2 string save of buffer
-.\" NS lK register count of lines read from input file
-.de x1
-.nr dZ \\n(dZ+1
-.ds b2 \\*(b1
-.ds b1
-.nr lK \\n(.c
-.ev 2
-.fi
-.di eB
-..
.\"
-.\" NS x2 macro - end diversion and print
-.\" NS b0 string local temporary
-.de x2
-.br
-.di
-.ev
-.ie (\\n(.c-\\n(lK>1) \{\
-. ds b0 \&\\*(eB\\
-. ds b1 \\*(b2\\*(b0\\*(b1
-.\}
-.el .ds b1 \\*(b2\\*(b1
-\&\\*(b1
-.rm eB b2 b0 b1
-.nr dZ \\n(dZ-1
-..
-.\" NS Fl macro - flags (appends - and prints flags)
-.\" NS cF register save current font
-.\" NS cZ register save current font size
-.de Fl
-.as b1 \&\\*(fL
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. as b1 \&\|\-\|\fP\s0
-. pB
-. \}
-. el \{\
-. ds mN Fl
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>0 \{\
-. ie (\\n(aC-\\n(aP)==0 \{\
-. as b1 \&\|\-\fP\s0
-. aZ
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 \{\
-. as b1 \&\|\-\fP\s0
-. \\*(A\\n(aP
-. \}
-. el \{\
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. if \\n(C\\n(aP==3 \{\
-. as b1 \&\|\-\|
-. \}
-. fR
-. \}
-. \}
-.\}
-..
+.\" Modified by
.\"
-.\" NS fR macro - Fl flag recursion routine (special handling)
-.\" NS jM local register
-.\" NS jN local register
-.\"
-.de fR
-.hy 0
-.nr jM \\n(C\\n(aP
-.ie \\n(jM==1 \{\
-. as b1 \&\fP\s0
-. \\*(A\\n(aP
-.\}
-.el \{\
-. nr jN \\n(aP
-. ie \\n(jM==2 \{\
-. ie !"\\*(A\\n(aP"\\*(Ba" \{\
-. ie !"\\*(A\\n(aP"\fR|\fP" \{\
-. ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|
-. el .as b1 \&\|\-\\*(A\\n(aP
-. \}
-. el .as b1 \&\\*(A\\n(aP
-. \}
-. el .as b1 \&\\*(A\\n(aP
-. \}
-. el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
-. ie \\n(aC==\\n(aP \{\
-. if \\n(jM==4 .as b1 \&\|\-
-. as b1 \&\fP\s0
-. aZ
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-
-. el .as b1 \&\\*(S\\n(jN
-. fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.rr jM jN
-..
+.\" Werner LEMBERG <wl@gnu.org> and
+.\" Ruslan Ermilov <ru@freebsd.org>
.\"
-.\" NS nR macro - general name recursion routine
-.\" NS jM local register
-.\" NS jN local register
-.de nR
-.hy 0
-.nr jM \\n(C\\n(aP
-.ie \\n(jM==1 \{\
-. as b1 \&\f\\n(cF\s\\n(cZ
-. \\*(A\\n(aP
-.\}
-.el \{\
-. nr jN \\n(aP
-. ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
-. el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
-. ie \\n(aC==\\n(aP \{\
-. as b1 \&\f\\n(cF\s\\n(cZ
-. aZ
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. as b1 \&\\*(S\\n(jN
-. nR
-. \}
-.\}
-.rr jM jN
-..
-.\" NS Ar macro - command line `argument' macro
+.\" to make it more readable: using long names and many groff features,
+.\" updating and extending documentation, etc.
.\"
+.\" %beginstrip%
+.
+.
+.if !\n(.g \
+. ab This version of mdoc can be run with GNU troff only!
+.
+.
+.cp 0
+.
+.
+.if ((\n[.x] == 0) : ((\n[.x] == 1) & (\n[.y] < 17))) \
+. ab You need GNU troff version 1.17 or higher to run this version of mdoc!
+.
+.
+.\" Load start-up files
+.ie t \
+. mso mdoc/doc-ditroff.new
+.el \
+. mso mdoc/doc-nroff.new
+.
+.mso mdoc/doc-common.new
+.mso mdoc/doc-syms.new
+.
+.
+.eo
+.
+.
+.\" NS Db macro
+.\" NS defunct
+.
+.de Db
+. tm mdoc error: .Db defunct (#\n[.c])
+..
+.
+.
+.\" NS doc-macro-name global string
+.\" NS name of calling request (set in each user-requestable macro)
+.
+.ds doc-macro-name
+.als doc-arg0 doc-macro-name
+.
+.
+.\" NS doc-arg-limit global register
+.\" NS total number of arguments
+.
+.nr doc-arg-limit 0
+.
+.
+.\" NS doc-num-args global register
+.\" NS number of arguments to handle (must be set to \n[.$] prior to
+.\" NS `doc-parse-arg-vector' request)
+.
+.nr doc-num-args 0
+.
+.
+.\" NS doc-arg-ptr global register
+.\" NS argument pointer
+.
+.nr doc-arg-ptr 0
+.
+.
+.\" NS doc-argXXX global string
+.\" NS argument vector
+.\" NS
+.\" NS limit:
+.\" NS doc-arg-limit
+.
+.ds doc-arg1
+.
+.
+.\" NS doc-typeXXX global register
+.\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
+.\" NS punctuation prefix=4)
+.\" NS
+.\" NS limit:
+.\" NS doc-arg-limit
+.
+.nr doc-type1 0
+.
+.
+.\" NS doc-spaceXXX global string
+.\" NS space vector
+.\" NS
+.\" NS limit:
+.\" NS doc-arg-limit
+.
+.ds doc-space1
+.
+.
+.\" NS doc-parse-args macro
+.\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-spaceXXX
+.\" NS doc-typeXXX
+.\" NS doc-arg-ptr
+.\" NS doc-have-space
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dpa
+.\" NS doc-reg-dpa1
+.\" NS doc-str-dpa
+.
+.de doc-parse-args
+. if !\n[doc-arg-limit] \
+. doc-set-spacing-1
+.
+. nr doc-have-space 0
+.
+. if !\n[.$] \
+. return
+.
+. nr doc-arg-limit +1
+.
+. \" handle `|' specially
+. ie "\$1"|" \
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
+. el \
+. ds doc-arg\n[doc-arg-limit] "\$1
+.
+. \" get argument type and set spacing
+. doc-get-arg-type* \n[doc-arg-limit]
+. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
+. doc-set-spacing-\n[doc-arg-type]
+.
+. \" check whether we have processed the last parameter
+. ie (\n[.$] == 1) \
+. nr doc-arg-ptr 0
+. el \{\
+. shift
+. doc-parse-args \$@
+. \}
+.
+. nh
+..
+.
+.
+.\" NS doc-parse-arg-vector macro
+.\" NS parse argument vector (recursive)
+.\" NS
+.\" NS cf. comments in doc-parse-args
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-num-args
+.\" NS doc-spaceXXX
+.\" NS doc-typeXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dpav
+.\" NS doc-reg-dpav1
+.\" NS doc-str-dpav
+.
+.de doc-parse-arg-vector
+. if !\n[doc-arg-limit] \
+. doc-set-spacing-1
+.
+. nr doc-arg-limit +1
+.
+. if "\*[doc-arg\n[doc-arg-limit]]"|" \
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
+.
+. doc-get-arg-type* \n[doc-arg-limit]
+. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
+. doc-set-spacing-\n[doc-arg-type]
+.
+. ie (\n[doc-num-args] == 1) \{\
+. nr doc-arg-ptr 0
+. nr doc-num-args 0
+. \}
+. el \{\
+. nr doc-num-args -1
+. doc-parse-arg-vector
+. \}
+.
+. nh
+..
+.
+.
+.\" NS doc-parse-space-vector macro
+.\" NS parse space vector (recursive)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-num-args
+.\" NS doc-spaceXXX
+.
+.de doc-parse-space-vector
+. nr doc-arg-limit +1
+.
+. doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
+.
+. ie (\n[doc-num-args] == 1) \
+. nr doc-num-args 0
+. el \{\
+. nr doc-num-args -1
+. doc-parse-space-vector
+. \}
+..
+.
+.
+.\" NS doc-remaining-args macro
+.\" NS output remaining arguments as-is, separated by spaces (until
+.\" NS `doc-num-args' is exhausted)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-num-args
+.
+.de doc-remaining-args
+. nr doc-arg-ptr +1
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
+.
+. ie (\n[doc-num-args] == 1) \{\
+. nr doc-arg-ptr 0
+. nr doc-num-args 0
+. \}
+. el \{\
+. nop \)\*[doc-space]\c
+. nr doc-num-args -1
+. doc-remaining-args
+. \}
+..
+.
+.
+.\" NS doc-append-arg macro
+.\" NS append one argument to argument vector:
+.\" NS `.doc-append-arg [arg] [type]'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-argXXX
+.\" NS doc-typeXXX
+.
+.de doc-append-arg
+. nr doc-arg-limit +1
+. ds doc-arg\n[doc-arg-limit] "\$1
+. nr doc-type\n[doc-arg-limit] \$2
+. doc-set-spacing-\$2
+..
+.
+.
+.\" NS doc-print-and-reset macro
+.\" NS finish input line and clean up argument vectors
+.
+.de doc-print-and-reset
+. if \n[doc-space-mode] \
+. nop \)
+. doc-reset-args
+..
+.
+.
+.\" NS doc-reset-args macro
+.\" NS reset argument counters
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-arg-ptr
+.\" NS doc-have-slot
+.
+.de doc-reset-args
+. nr doc-arg-limit 0
+. nr doc-arg-ptr 0
+. nr doc-have-slot 0
+.
+. hy \n[doc-hyphen-flags]
+..
+.
+.
+.ec
+.
+.\" NS doc-curr-font global register
+.\" NS saved current font
+.
+.nr doc-curr-font \n[.f]
+.
+.
+.\" NS doc-curr-size global register
+.\" NS saved current font size
+.
+.nr doc-curr-size \n[.ps]
+.
+.eo
+.
+.
+.\" NS Fl user macro
+.\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Fl (for communication with doc-flag-recursion)
+.\" NS
+.\" NS width register `Fl' set in doc-common
+.
+.de Fl
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Fl-font]\c
+.
+. if !\n[doc-arg-limit] \{\
+. ds doc-macro-name Fl
+. doc-parse-args \$@
+.
+. if !\n[.$] \{\
+. \" no arguments
+. nop \|\-\|\f[P]\s[0]
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. \" last argument
+. nop \|\-\f[P]\s[0]\c
+. doc-print-and-reset
+. \}
+. el \{\
+. ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
+. nop \|\-\f[P]\s[0]\c
+. \*[doc-arg\n[doc-arg-ptr]]
+. \}
+. el \{\
+. if (\n[doc-type\n[doc-arg-ptr]] == 3) \
+. nop \|\-\|\c
+.
+. nr doc-reg-Fl 1
+. doc-flag-recursion
+. \}\}
+..
+.
+.
+.\" NS doc-flag-recursion macro
+.\" NS `Fl' flag recursion routine (special handling)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dfr
+.\" NS doc-reg-dfr1
+.\" NS doc-str-dfr
+.
+.de doc-flag-recursion
+. nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
+. ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
+.
+. ie (\n[doc-reg-dfr1] == 1) \{\
+. nop \f[P]\s[0]\c
+. \*[doc-str-dfr]
+. \}
+. el \{\
+. nr doc-reg-dfr \n[doc-arg-ptr]
+.
+. ie (\n[doc-reg-dfr1] == 2) \{\
+. \" handle vertical bar -- doc-reg-Fl is set for the first call of
+. \" doc-flag-recursion only; we need this to make `.Fl | ...' work
+. \" correctly
+. ie "\*[doc-str-dfr]"\*[Ba]" \{\
+. if \n[doc-reg-Fl] \
+. nop \|\-\*[doc-space]\c
+. nop \)\*[Ba]\c
+. \}
+. el \{\
+. ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
+. if \n[doc-reg-Fl] \
+. nop \|\-\*[doc-space]\c
+. nop \f[R]|\f[P]\c
+. \}
+. el \{\
+. \" two consecutive hyphen characters?
+. ie "\*[doc-str-dfr]"-" \
+. nop \|\-\^\-\|\c
+. el \
+. nop \|\%\-\*[doc-str-dfr]\c
+. \}\}\}
+. el \{\
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. nop \)\*[doc-str-dfr]\f[P]\s[0]\c
+. \}
+.
+. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
+. \" last argument
+. if (\n[doc-reg-dfr1] == 4) \
+. nop \|\-\c
+. nop \f[P]\s[0]\c
+. doc-print-and-reset
+. \}
+. el \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
+. ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
+. nop \|\-\c
+. el \
+. nop \)\*[doc-space\n[doc-reg-dfr]]\c
+. \}
+. el \
+. nop \)\*[doc-space\n[doc-reg-dfr]]\c
+.
+. shift
+. nr doc-reg-Fl 0
+. doc-flag-recursion \$@
+. \}\}
+..
+.
+.
+.\" NS doc-print-recursive macro
+.\" NS general name recursion routine (print remaining arguments)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dpr
+.\" NS doc-reg-dpr1
+.\" NS doc-str-dpr
+.
+.de doc-print-recursive
+. nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
+. ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
+.
+. ie (\n[doc-reg-dpr1] == 1) \{\
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. \*[doc-str-dpr]
+. \}
+. el \{\
+. nr doc-reg-dpr \n[doc-arg-ptr]
+.
+. ie (\n[doc-reg-dpr1] == 2) \
+. \" the `\%' prevents hyphenation on a dash (`-')
+. nop \%\*[doc-str-dpr]\&\c
+. el \{\
+. \" punctuation character
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. nop \)\*[doc-str-dpr]\f[P]\s[0]\c
+. \}
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. \" last argument
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. doc-print-and-reset
+. \}
+. el \{\
+. nop \)\*[doc-space\n[doc-reg-dpr]]\c
+. doc-print-recursive
+. \}\}
+..
+.
+.
+.\" NS doc-print-prefixes macro
+.\" NS print leading prefixes
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.
+.de doc-print-prefixes
+. while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
+. break
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
+. nr doc-arg-ptr +1
+. \}
+..
+.
+.
+.\" NS doc-generic-macro macro
+.\" NS this is the skeleton for most simple macros
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.
+.de doc-generic-macro
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name \$0
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
+. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
+.
+. \" the right action here would be to reset the argument counters
+. \" and bail out -- unfortunately, a small number of manual pages
+. \" (less than 2% for FreeBSD which has been used for testing)
+. \" relied on the old behaviour (silently ignore this error),
+. \" so it is commented out
+.
+.\" doc-reset-args
+. \}
+.\" el \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-\$0-font]\c
+. doc-print-recursive
+.\" \}
+. \}
+. el \{\
+. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Ar user macro
+.\" NS command line `argument' macro: `.Ar [args ...]'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variable:
+.\" NS doc-str-Ar-default
+.\" NS
+.\" NS width register `Ar' set in doc-common
+.
+.ds doc-str-Ar-default "file\ .\|.\|.
+.
.de Ar
-.as b1 \\*(aR
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. as b1 file\ ...\fP\s0
-. pB
-. \}
-. el \{\
-. ds mN Ar
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>0 \{\
-. ie (\\n(aC-\\n(aP)==0 \{\
-. as b1 \&file\ ...\fP\s0
-. aZ
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 \{\
-. as b1 \&file\ ...\fP\s0
-. \\*(A\\n(aP
-. \}
-. el \{\
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. if \\n(C\\n(aP==3 \{\
-. as b1 \&file\ ...
-. \}
-. nR
-. \}
-. \}
-.\}
-..
-.\" NS Ad macro - Addresses
-.de Ad
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Ad address ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Ad
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(aD
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Cd macro - Config declaration (for section 4 SYNOPSIS) (not callable)
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Ar-font]\c
+.
+. if !\n[doc-arg-limit] \{\
+. ds doc-macro-name Ar
+. doc-parse-args \$@
+.
+. if !\n[.$] \{\
+. \" no argument
+. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
+. doc-print-and-reset
+. \}
+. el \{\
+. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. \" replace previous argument (Ar) with default value
+. nr doc-arg-ptr -1
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. doc-parse-space-vector
+. \}
+. doc-print-recursive
+. \}
+..
+.
+.
+.\" NS Ad user macro
+.\" NS Addresses
+.\" NS
+.\" NS width register `Ad' set in doc-common
+.
+.als Ad doc-generic-macro
+.ds doc-Ad-usage address
+.
+.
+.\" NS doc-in-synopsis-count global register
+.\" NS whether we have more than a single item in synopsis
+.
+.nr doc-in-synopsis-count 0
+.
+.
+.\" NS doc-indent-synopsis global register
+.\" NS indentation in synopsis
+.
+.nr doc-indent-synopsis 0
+.
+.
+.\" NS Cd user macro
+.\" NS config declaration (for section 4 SYNOPSIS)
+.\" NS
+.\" NS this function causes a break; it uses the `Nm' font
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-in-synopsis-count
+.\" NS doc-indent-synopsis
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Cd' set in doc-common
+.\"
.\" needs work - not very translatable
+.
.de Cd
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Cd Configuration file declaration (#\\n(.c)
-. el \{\
-. ds mN Cd
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.br
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(nM
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. ie \\n(nS \{\
-. if "\\*(mN"Cd" \{\
-. rs
-. ie \\n(nS>1 .br
-. el \{\
-. if \\n(iS==0 .nr iS \\n(Dsu
-. \}
-. in +\\n(iSu
-. ti -\\n(iSu
-. nr nS \\n(nS+1
-. \}
-. nR
-. in -\\n(iSu
-. \}
-. el .nR
-.\}
-..
-.\" NS Cm macro - Interactive command modifier (flag)
-.de Cm
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Cm Interactive command modifier ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Cm
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(cM
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Dv macro - define variable
-.de Dv
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Dv define_variable ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Dv
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(eR
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Em macro - Emphasis
-.de Em
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. tm Usage: .Em text ... \\*(Pu (#\\n(.c)
-. \}
-. el \{\
-. ds mN Em
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(eM
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Er macro - Errnotype
-.de Er
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Er ERRNOTYPE ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Er
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(eR
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Ev macro - Environment variable
-.de Ev
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Ev ENVIRONMENT_VARIABLE ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Ev
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(eV
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Fd macro - function declaration - not callable (& no err check)
-.\" NS fD register subroutine test (in synopsis only)
-.\" NS fY register subroutine count (in synopsis only) (fortran only)
-.\" NS fZ register also subroutine count (in synopsis only)
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Cd
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
+. \}
+.
+. br
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. ie \n[doc-in-synopsis-count] \{\
+. if "\*[doc-macro-name]"Cd" \{\
+. rs
+. ie (\n[doc-in-synopsis-count] > 1) \
+. br
+. el \{\
+. if !\n[doc-indent-synopsis] \
+. nr doc-indent-synopsis \n[doc-display-indent]u
+. \}
+. in +\n[doc-indent-synopsis]u
+. ti -\n[doc-indent-synopsis]u
+. nr doc-in-synopsis-count +1
+. \}
+.
+. nop \*[doc-Nm-font]\c
+. doc-print-recursive
+. in -\n[doc-indent-synopsis]u
+. \}
+. el \{\
+. nop \*[doc-Nm-font]\c
+. doc-print-recursive
+. \}\}
+. el \{\
+. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Cm user macro
+.\" NS interactive command modifier (flag)
+.\" NS
+.\" NS width register `Cm' set in doc-common
+.
+.als Cm doc-generic-macro
+.ds doc-Cm-usage interactive_command_modifier
+.
+.
+.\" NS Dv user macro
+.\" NS defined variable
+.\" NS
+.\" NS this function uses the `Er' font
+.\" NS
+.\" NS width register `Dv' set in doc-common
+.
+.als Dv doc-generic-macro
+.ds doc-Dv-usage defined_variable
+.als doc-Dv-font doc-Er-font
+.
+.
+.\" NS Em user macro
+.\" NS emphasis
+.\" NS
+.\" NS width register `Em' set in doc-common
+.
+.als Em doc-generic-macro
+.ds doc-Em-usage text
+.
+.
+.\" NS Er user macro
+.\" NS errno type
+.\" NS
+.\" NS width register `Er' set in doc-common
+.
+.als Er doc-generic-macro
+.ds doc-Er-usage text
+.
+.
+.\" NS Ev user macro
+.\" NS environment variable
+.\" NS
+.\" NS width register `Ev' set in doc-common
+.
+.als Ev doc-generic-macro
+.ds doc-Ev-usage text
+.
+.
+.\" NS doc-have-decl global register (bool)
+.\" NS subroutine test (in synopsis only)
+.
+.nr doc-have-decl 0
+.
+.
+.\" NS doc-have-var global register (bool)
+.\" NS whether last type is a variable type
+.
+.nr doc-have-var 0
+.
+.
+.\" NS doc-do-func-decl macro
+.\" NS do someting special while in SYNOPSIS
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-have-decl
+.\" NS doc-have-var
+.
+.de doc-do-func-decl
+. if \n[doc-in-synopsis-count] \{\
+. \" if a variable type was the last thing given, want vertical space
+. if \n[doc-have-var] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. \}
+. \" if a subroutine was the last thing given, want vertical space
+. if \n[doc-have-func] \{\
+. ie \n[doc-have-decl] \
+. br
+. el \{\
+. doc-paragraph
+. rs
+. \}\}
+. nr doc-have-decl 1
+. \}
+.
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+..
+.
+.
+.\" NS Fd user macro
+.\" NS function declaration -- not callable
+.\" NS
+.\" NS this function causes a break
+.\" NS
+.\" NS width register `Fd' set in doc-common
+.
.de Fd
-.ds mN Fd
-.if \\n(nS>0 \{\
-.\" if a variable type was the last thing given, want vertical space
-. if \\n(fX>0 \{\
-. Pp
-. nr fX 0
-. \}
-.\" if a subroutine was the last thing given, want vertical space
-. if \\n(fZ>0 \{\
-. ie \\n(fD==0 \{\
-. Pp
-. rs
-. \}
-. el .br
-. \}
-. nr fD \\n(fD+1
-.\}
-.nr cF \\n(.f
-.nr cZ \\n(.s
-\&\\*(fD\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.br
-.ft \\n(cF
-.fs \\n(cZ
-..
-.\" NS Fr macro - function return value - not callable (at the moment)
-.de Fr
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Fr Function_return_value... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Fr
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(aR
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Ic macro - Interactive command
-.de Ic
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Ic Interactive command ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Ic
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(iC
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Li macro - literals
-.de Li
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage .Li argument ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Li
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(lI
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Or macro - Pipe symbol (OR)
-.de Or
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Or ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Or
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(iC
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Ms macro - Math symbol
-.de Ms
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Ms Math symbol ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Ms
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(sY
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Nm macro - Name of command or page topic
-.\" NS n1 string - save first invocation of .Nm
-.\" NS iS register - indent second command line in a synopsis
+. ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
+. doc-do-func-decl
+. nop \*[doc-Fd-font]\$*
+. br
+. ft \n[doc-curr-font]
+. ps \n[doc-curr-size]u
+. \}
+. el \{\
+. tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS In user macro
+.\" NS #include statement - not callable
+.\" NS
+.\" NS this function causes a break; it uses the `Fd' font
+.\" NS
+.\" NS width register `In' set in doc-common
+.
+.de In
+. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
+. doc-do-func-decl
+. nop \*[doc-Fd-font]#include <\$1>
+. br
+. ft \n[doc-curr-font]
+. ps \n[doc-curr-size]u
+. \}
+. el \{\
+. tm Usage: .In include_file -- In is not callable (#\n[.c])
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Fr user macro
+.\" NS function return value
+.\" NS
+.\" NS this function uses the `Ar' font
+.\" NS
+.\" NS width register `Fr' set in doc-common
+.
+.als Fr doc-generic-macro
+.ds doc-Fr-usage function_return_value
+.als doc-Fr-font doc-Ar-font
+.
+.
+.\" NS Ic user macro
+.\" NS interactive command
+.\" NS
+.\" NS width register `Ic' set in doc-common
+.
+.als Ic doc-generic-macro
+.ds doc-Ic-usage interactive_command
+.
+.
+.\" NS Li user macro
+.\" NS literals
+.\" NS
+.\" NS width register `Li' set in doc-common
+.
+.als Li doc-generic-macro
+.ds doc-Li-usage argument
+.
+.
+.\" NS Or user macro
+.\" NS pipe symbol (OR)
+.\" NS
+.\" NS this function uses the `Ic' font
+.\" NS
+.\" NS width register `Or' set in doc-common
+.\"
+.\" XXX: What is this function good for? It sets a font but does not print
+.\" a pipe symbol. And it isn't documented.
+.
+.als Or doc-generic-macro
+.ds doc-Or-usage
+.als doc-Or-font doc-Ic-font
+.
+.
+.\" NS Ms user macro
+.\" NS math symbol
+.\" NS
+.\" NS this function uses the `Sy' font
+.\" NS
+.\" NS width register `Ms' set in doc-common
+.
+.als Ms doc-generic-macro
+.ds doc-Ms-usage math_symbol
+.als doc-Ms-font doc-Sy-font
+.
+.
+.\" NS doc-command-name global string
+.\" NS save first invocation of .Nm
+.
+.ds doc-command-name
+.
+.
+.\" NS Nm user macro
+.\" NS name of command or page topic
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-command-name
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-in-synopsis-count
+.\" NS doc-indent-synopsis,
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Nm' set in doc-common
+.
.de Nm
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. ie "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu (#\\n(.c)
-. el \&\\*(nM\\*(n1\fP\s0
-. \}
-. el \{\
-. ds mN Nm
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>0 \{\
-. ie \\n(aC==\\n(aP \{\
-. as b1 \&\\*(nM\\*(n1\fP\s0
-. aZ
-. \}
-. el \{\
-. as b1 \\*(nM
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 \{\
-. as b1 \&\\*(n1\fP\s0
-. \\*(A\\n(aP
-. \}
-. el \{\
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. if \\n(nS \{\
-. if "\\*(mN"Nm" \{\
-. rs
-. in -\\n(iSu
-. ie \\n(nS>1 .br
-. el \{\
-. if \\n(iS==0 \{\
-. sw \\$1
-. nr iS ((\\n(sWu+1)*\\n(fW)u
-. \}
-. \}
-. in +\\n(iSu
-. ti -\\n(iSu
-. nr nS \\n(nS+1
-. \}
-. \}
-. if "\\*(n1"" .ds n1 \\*(A\\n(aP
-. nR
-. \}
-. \}
-.\}
-..
-.\" NS Pa macro - Pathname
+. if !\n[doc-arg-limit] \{\
+. ds doc-macro-name Nm
+. ie \n[.$] \
+. doc-parse-args \$@
+. el \{\
+. ie "\*[doc-command-name]"" \
+. tm Usage: .Nm name ... (#\n[.c])
+. el \
+. doc-parse-args \*[doc-command-name]
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. \" last argument
+. ie "\*[doc-command-name]"" \{\
+. tm Usage: .Nm name ... (#\n[.c])
+. doc-reset-args
+. \}
+. el \{\
+. nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
+. doc-print-and-reset
+. \}\}
+. el \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. rs
+.
+. ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. ie "\*[doc-command-name]"" \
+. tm Usage: .Nm name ... (#\n[.c])
+. el \{\
+. \" replace previous argument (Nm) with default value
+. nr doc-arg-ptr -1
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. doc-parse-space-vector
+. \}\}
+. el \{\
+. \" handle `.Nm ...' in SYNOPSIS
+. if \n[doc-in-synopsis-count] \{\
+. if "\*[doc-macro-name]"Nm" \{\
+. in -\n[doc-indent-synopsis]u
+. ie (\n[doc-in-synopsis-count] > 1) \
+. br
+. el \{\
+. if !\n[doc-indent-synopsis] \{\
+. doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
+. nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
+. \}\}
+.
+. in +\n[doc-indent-synopsis]u
+. ti -\n[doc-indent-synopsis]u
+. nr doc-in-synopsis-count +1
+. \}\}
+. if "\*[doc-command-name]"" \
+. ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
+.
+. nop \*[doc-Nm-font]\c
+. \}
+. doc-print-recursive
+. \}
+..
+.
+.
+.\" NS Pa user macro
+.\" NS pathname: `.Pa [arg ...]'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Pa' set in doc-common
+.
.de Pa
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 \&\\*(pA~\fP\s0
-. el \{\
-. ds mN Pa
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(pA
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Sy macro - Symbolics
-.de Sy
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Sy symbolic_text ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Sy
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(sY
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Tn macro - Trade Name Macro
+. if !\n[doc-arg-limit] \{\
+. ds doc-macro-name Pa
+. doc-parse-args \$@
+.
+. if !\n[.$] \{\
+. \" default value
+. nop \*[doc-Pa-font]~\f[P]\s[0]
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Pa-font]\c
+. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. \" replace previous argument (Pa) with default value
+. nr doc-arg-ptr -1
+. ds doc-arg\n[doc-arg-ptr] ~
+. nr doc-type\n[doc-arg-ptr] 2
+. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
+.
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. doc-parse-space-vector
+. \}
+. doc-print-recursive
+. \}
+. el \{\
+. nop \*[doc-Pa-font]~\f[P]\s[0]\c
+. doc-print-and-reset
+. \}
+..
+.
+.
+.\" NS Sy user macro
+.\" NS symbolics
+.\" NS
+.\" NS width register `Sy' set in doc-common
+.
+.als Sy doc-generic-macro
+.ds doc-Sy-usage symbolic_text
+.
+.
+.\" NS Me user macro
+.\" NS menu entries
+.\" NS
+.\" NS width register `Me' set in doc-common
+.
+.als Me doc-generic-macro
+.ds doc-Me-usage menu_entry
+.
+.
+.\" NS Tn user macro
+.\" NS trade name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Tn' set in doc-common
+.
.de Tn
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Tn
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(tN\\*(tF
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS nN macro - Trade Name Macro for inside of reference
-.de nN
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Tn
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(tN
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS Va macro - variable name macro
-.de Va
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Va variable_name(s) ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Va
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. as b1 \\*(vA
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\"
-.\" NS No macro - Normal text macro (default text style if mess up)
-.de No
-.as b1 \\*(nO
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .No must be called with arguments (#\\n(.c)
-. el \{\
-. ds mN No
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 \{\
-. \\*(A\\n(aP
-. \}
-. el \{\
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-. \}
-.\}
-..
-.\"------------------------------------------------------------------------
-.\" NS Op macro - Option Expression
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Tn
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Tn trade_name ... (#\n[.c])
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \)\*[doc-Tn-font-size]\c
+. ie !\n[doc-is-reference] \{\
+. nop \)\*[doc-Tn-font-shape]\c
+. doc-print-recursive
+. \}
+. el \
+. doc-do-references
+. \}
+. el \{\
+. tm Usage: .Tn trade_name ... (#\n[.c])
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Va user macro
+.\" NS variable name
+.\" NS
+.\" NS width register `Va' set in doc-common
+.
+.als Va doc-generic-macro
+.ds doc-Va-usage variable_name
+.
+.
+.\" NS No user macro
+.\" NS normal text macro (default text style if mess up)
+.\" NS
+.\" NS width register `No' set in doc-common
+.
+.als No doc-generic-macro
+.ds doc-No-usage normal_text
+.
+.
+.\" NS doc-quote-left global string
+.\" NS left quotation character for `doc-enclose-string' and
+.\" NS `doc-enclose-open'
+.
+.ds doc-quote-left
+.
+.
+.\" NS doc-quote-right global string
+.\" NS right quotation character for `doc-enclose-string' and
+.\" NS `doc-enclose-close'
+.
+.ds doc-quote-right
+.
+.
+.\" NS Op user macro
+.\" NS option expression (i.e., enclose string in square brackets)
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Op' set in doc-common
+.
.de Op
-.if \\n(aC==0 \{\
-. ds mN Op
-.\}
-.\" .ds qL \&\\*(lO
-.\" .ds qR \&\\*(rO
-.ds qL \&\\*(lB
-.ds qR \&\\*(rB
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-..
-.\" NS Aq macro - Enclose string in angle brackets
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Op
+.
+. ds doc-quote-left "\*[doc-left-bracket]
+. ds doc-quote-right "\*[doc-right-bracket]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Aq user macro
+.\" NS enclose string in angle brackets
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Aq' set in doc-common
+.
.de Aq
-.if \\n(aC==0 .ds mN Aq
-.ds qL \&<
-.ds qR \&>
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Bq macro - Enclose string in square brackets
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Aq
+.
+. ds doc-quote-left \[la]
+. ds doc-quote-right \[ra]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Bq user macro
+.\" NS enclose string in square brackets
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Bq' set in doc-common
+.
.de Bq
-.if \\n(aC==0 .ds mN Bq
-.ds qL \&\\*(lB
-.ds qR \&\\*(rB
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Dq macro - Enclose string in double quotes
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Bq
+.
+. ds doc-quote-left "\*[doc-left-bracket]
+. ds doc-quote-right "\*[doc-right-bracket]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Brq user macro
+.\" NS enclose string in braces
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Brq' set in doc-common
+.
+.de Brq
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Brq
+.
+. ds doc-quote-left {
+. ds doc-quote-right }
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Dq user macro
+.\" NS enclose string in double quotes
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Dq' set in doc-common
+.
.de Dq
-.if \\n(aC==0 .ds mN Dq
-.ds qL \&\\*(Lq
-.ds qR \&\\*(Rq
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Eq macro - Enclose string in double quotes
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Dq
+.
+. ds doc-quote-left "\*[Lq]
+. ds doc-quote-right "\*[Rq]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Eq user macro
+.\" NS enclose string in user-defined quotes (args 1 and 2)
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Eq' set in doc-common
+.
.de Eq
-.if \\n(aC==0 .ds mN Eq
-.ds qL \\$1
-.ds qR \\$2
-.En \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Pq macro - Enclose string in parenthesis
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Eq
+.
+. ds doc-quote-left "\$1
+. ds doc-quote-right "\$2
+.
+. shift 2
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Pq user macro
+.\" NS enclose string in parentheses
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Pq' set in doc-common
+.
.de Pq
-.if \\n(aC==0 .ds mN Pq
-.ds qL \&\\*(lP
-.ds qR \&\\*(rP
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Ql macro - Quoted literal is in file mdoc-[dit|n|g]roff (too large
-.\" an if-else to carry along recursively for `if n ...')
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Pq
+.
+. ds doc-quote-left "\*[doc-left-parenthesis]
+. ds doc-quote-right "\*[doc-right-parenthesis]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Ql user macro
+.\" NS quoted literal
.\"
-.\" NS Sq macro - Enclose string in single quotes
+.\" is in file doc-[dit|n]roff
+.
+.
+.\" NS Qq user macro
+.\" NS enclose string in straight double quotes
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Qq' set in doc-common
+.
.de Qq
-.if \\n(aC==0 .ds mN Qq
-.ds qL \&\\*q
-.ds qR \&\\*q
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Sq macro - Enclose string in single quotes
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Qq
+.
+. ds doc-quote-left "\*[q]
+. ds doc-quote-right "\*[q]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Sq user macro
+.\" NS enclose string in single quotes
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Sq' set in doc-common
+.
.de Sq
-.if \\n(aC==0 .ds mN Sq
-.ds qL \&\\*(sL
-.ds qR \&\\*(sR
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\"
-.\" NS Es macro - Set up strings for .En call
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Sq
+.
+. ds doc-quote-left "\*[doc-left-singlequote]
+. ds doc-quote-right "\*[doc-right-singlequote]
+.
+. doc-enclose-string \$@
+..
+.
+.
+.\" NS Es user macro
+.\" NS set up arguments (i.e., the left and right quotation character as
+.\" NS first and second argument) for .En call
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.
.de Es
-.if \\n(aC==0 \{\
-. ie \\n(.$>2 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. el \{\
-. ds qL \\$1
-. ds qR \\$2
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ds qL \\*(A\\n(aP
-. nr aP \\n(aP+1
-. ds qR \\*(A\\n(aP
-. ie \\n(aC>\\n(aP .c\\n(C\\n(aP
-. el .aZ
-.\}
-..
-.\" .tm En beg arg(A[\\n(aP])==\\*(A\\n(aP;
-.\" .tm En oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
-.\" NS En macro - Enclose string with given args (eg [ and ] etc)
-.\" NS qL string variable set by calling macro
-.\" NS qR string variable set by calling macro
-.\" NS aJ register (for vR)
-.de En
-.ie \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. as b1 \&\\*(qL\\*(qR
-. pB
-. \}
-. el \{\
-.\". as mN (En)
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. as b1 \&\\*(qL
-. \}
-.\}
-.el \{\
-. as b1 \&\\*(qL
-.\}
-.if \\n(aC>0 \{\
-. ie (\\n(aC-\\n(aP)==0 \{\
-. as b1 \&\\*(qR
-. aZ
-. \}
-. el \{\
-. ie \\n(C\\n(aC==3 \{\
-. nr aJ \\n(aC-1
-. vR
-. nr aJ \\n(aJ+1
-. ds A\\n(aJ \&\\*(qR\\*(A\\n(aJ
-. nr aJ 0
-. \}
-. el .aI \&\\*(qR 3
-. nr aP \\n(aP+1
-. if \\n(C\\n(aP==1 .\\*(A\\n(aP
-. if \\n(C\\n(aP>1 \{\
-. nr aP \\n(aP-1
-. No
-. \}
-. \}
-.\}
-..
-.\" NS vR macro - vector routine (for En, trace backwards past trail punct)
-.de vR
-.if \\n(C\\n(aJ==3 \{\
-. nr aJ \\n(aJ-1
-. vR
-.\}
-..
-.\"------------------------------------------------------------------------
-.\" NS Ao macro - Angle open
+. if !\n[doc-arg-limit] \{\
+. ie (\n[.$] > 2) \{\
+. ds doc-macro-name Es
+. doc-parse-args \$@
+. \}
+. el \{\
+. ds doc-quote-left "\$1
+. ds doc-quote-right "\$2
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
+. nr doc-arg-ptr +1
+. ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
+. doc-do-\n[doc-type\n[doc-arg-ptr]]
+. el \
+. doc-print-and-reset
+..
+.
+.
+.\" NS doc-have-slot global register (bool)
+.\" NS set if `doc-enclose-string' has created a slot for closing
+.\" NS delimiter
+.
+.nr doc-have-slot 0
+.
+.
+.\" NS doc-enclose-string macro
+.\" NS enclose string with given args (e.g. [ and ])
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-have-slot
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-des
+.\" NS doc-reg-des1
+.\" NS doc-reg-des2
+.\" NS
+.\" NS requires:
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.
+.de doc-enclose-string
+. if \n[doc-in-synopsis-count] \
+. doc-set-hard-space
+.
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \
+. doc-parse-args \$@
+. el \{\
+. nop \)\*[doc-quote-left]\*[doc-quote-right]
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. \" the final `\)' prevents hyphenation in case the next character is `\%'
+. nop \)\*[doc-quote-left]\)\c
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. \" last argument
+. nop \)\*[doc-quote-right]\)\c
+. doc-print-and-reset
+. \}
+. el \{\
+. \" test whether last arguments are of type closing punctuation
+. \" resp. suffix
+. ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
+. nr doc-reg-des (\n[doc-arg-limit] - 1)
+. while (\n[doc-type\n[doc-reg-des]] == 3) \
+. nr doc-reg-des -1
+.
+. \" prepend closing delimiter
+. nr doc-reg-des +1
+. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
+. \}
+. el \{\
+. \" test whether last arguments are macros which continue the line
+. \" logically
+. nr doc-reg-des \n[doc-arg-limit]
+. while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
+. if !\A\*[doc-arg\n[doc-reg-des]] \
+. break
+. if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
+. break
+. nr doc-reg-des -1
+. \}
+.
+. \" if there are no trailing macros to be skipped, append argument
+. ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
+. doc-append-arg "\)\*[doc-quote-right]\)" 3
+. el \{\
+. \" if a previous call to `doc-enclose-string' has already created
+. \" a slot, prepend argument
+. ie \n[doc-have-slot] \
+. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
+. el \{\
+. \" we have to shift all arguments to the right
+. nr doc-reg-des +1
+. nr doc-reg-des1 \n[doc-arg-limit]
+. nr doc-reg-des2 (\n[doc-arg-limit] + 1)
+. while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
+. rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
+. rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
+. rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
+. nr doc-reg-des1 -1
+. nr doc-reg-des2 -1
+. \}
+. nr doc-arg-limit +1
+.
+. \" finally, insert closing delimiter into the freed slot and
+. \" recompute spacing vector
+. ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
+. nr doc-type\n[doc-reg-des] 3
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
+. nr doc-arg-limit (\n[doc-reg-des] - 1)
+. doc-parse-space-vector
+. nr doc-have-slot 1
+. \}\}\}
+.
+. doc-do-\n[doc-type\n[doc-arg-ptr]]
+. \}
+.
+. if \n[doc-in-synopsis-count] \
+. doc-set-soft-space
+..
+.
+.
+.\" NS En user macro
+.\" NS enclose arguments with quotation characters set up with `.Es'
+.
+.als En doc-enclose-string
+.
+.
+.\" NS Ao user macro
+.\" NS angle open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Ao' set in doc-common
+.
.de Ao
-.if \\n(aC==0 .ds mN Ao
-.ds qL \&<
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Ac macro - Angle close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Ao
+.
+. ds doc-quote-left \[la]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Ac user macro
+.\" NS angle close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Ac' set in doc-common
+.
.de Ac
-.if \\n(aC==0 .ds mN Ac
-.ds qR \&>
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Bo macro - Bracket open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Ac
+.
+. ds doc-quote-right \[ra]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Bo user macro
+.\" NS bracket open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Bo' set in doc-common
+.
.de Bo
-.if \\n(aC==0 .ds mN Bo
-.ds qL \&[
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Bc macro - Bracket close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Bo
+.
+. ds doc-quote-left "\*[doc-left-bracket]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Bc user macro
+.\" NS bracket close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Bc' set in doc-common
+.
.de Bc
-.if \\n(aC==0 .ds mN Bc
-.ds qR \&]
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Do macro - Double Quote open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Bc
+.
+. ds doc-quote-right "\*[doc-right-bracket]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Bro user macro
+.\" NS brace open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Bro' set in doc-common
+.
+.de Bro
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Bo
+.
+. ds doc-quote-left {
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Brc user macro
+.\" NS brace close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Brc' set in doc-common
+.
+.de Brc
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Bc
+.
+. ds doc-quote-right }
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Do user macro
+.\" NS double quote open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Do' set in doc-common
+.
.de Do
-.if \\n(aC==0 .ds mN Do
-.ds qL \&\\*(Lq
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Dc macro - Double Quote close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Do
+.
+. ds doc-quote-left "\*[Lq]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Dc user macro
+.\" NS double quote close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Dc' set in doc-common
+.
.de Dc
-.if \\n(aC==0 .ds mN Dc
-.ds qR \&\\*(Rq
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Eo macro - Enclose open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Dc
+.
+. ds doc-quote-right "\*[Rq]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Eo user macro
+.\" NS enclose open (using first argument as beginning of enclosure)
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Eo' set in doc-common
+.
.de Eo
-.if \\n(aC==0 .ds mN Eo
-.ds qL \\$1
-.eO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Ec macro - Enclose close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Eo
+.
+. ds doc-quote-left "\$1
+.
+. shift
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Ec user macro
+.\" NS enclose close (using first argument as end of enclosure)
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Ec' set in doc-common
+.
.de Ec
-.if \\n(aC==0 .ds mN Ec
-.ds qR \\$1
-.eC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Oo macro - Option open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Ec
+.
+. ds doc-quote-right "\$1
+.
+. shift
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Oo user macro
+.\" NS option open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Oo' set in doc-common
+.
.de Oo
-.if \\n(aC==0 .ds mN Oo
-.ds qL \&[
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Oc macro - Option close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Oo
+.
+. ds doc-quote-left [
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Oc user macro
+.\" NS option close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Oc' set in doc-common
+.
.de Oc
-.if \\n(aC==0 .ds mN Oc
-.ds qR \&]
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Po macro - Parenthesis open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Oc
+.
+. ds doc-quote-right ]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Po user macro
+.\" NS parenthesis open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Po' set in doc-common
+.
.de Po
-.if \\n(aC==0 .ds mN Po
-.ds qL \&(
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Pc macro - Parenthesis close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Po
+.
+. ds doc-quote-left "\*[doc-left-parenthesis]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Pc user macro
+.\" NS parenthesis close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Pc' set in doc-common
+.
.de Pc
-.if \\n(aC==0 .ds mN Pc
-.ds qR \&)
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Qo macro - Straight Double Quote open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Pc
+.
+. ds doc-quote-right "\*[doc-right-parenthesis]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Qo user macro
+.\" NS straight double quote open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Qo' set in doc-common
+.
.de Qo
-.if \\n(aC==0 .ds mN Qo
-.ds qL \&\\*q
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Qc macro - Straight Double Quote close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Qo
+.
+. ds doc-quote-left "\*[q]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Qc user macro
+.\" NS straight double quote close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Qc' set in doc-common
+.
.de Qc
-.if \\n(aC==0 .ds mN Qc
-.ds qR \&\\*q
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS So macro - Single Quote open
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Qc
+.
+. ds doc-quote-right "\*[q]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS So user macro
+.\" NS single quote open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `So' set in doc-common
+.
.de So
-.if \\n(aC==0 .ds mN So
-.ds qL \&\\*(sL
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Sc macro - Single Quote close
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name So
+.
+. ds doc-quote-left "\*[doc-left-singlequote]
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Sc user macro
+.\" NS single quote close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Sc' set in doc-common
+.
.de Sc
-.if \\n(aC==0 .ds mN Sc
-.ds qR \&\\*(sR
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Xo macro - Extend open (continue)
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Sc
+.
+. ds doc-quote-right "\*[doc-right-singlequote]
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS Xo user macro
+.\" NS extend open
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Xo' set in doc-common
+.
.de Xo
-.if \\n(aC==0 .ds mN Xo
-.\" .nr mN 1
-.ds qL
-.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Xe macro - Extend close (end)
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Xo
+.
+. ds doc-quote-left
+.
+. doc-enclose-open \$@
+..
+.
+.
+.\" NS Xc user macro
+.\" NS extend close
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Xc' set in doc-common
+.
.de Xc
-.\" .nr mN 0
-.if \\n(aC==0 .ds mN Xc
-.ds qR
-.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS eO macro - enclose string open
-.\" NS oM register (extension possible)
-.de eO
-.nr oM \\n(oM+1
-.\" .tm eO last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
-.ie \\n(aC==0 \{\
-. ie \\n(.$>0 \{\
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. as b1 \\*(qL
-. \}
-. el \{\
-. as b1 \\*(qL
-. if (\\n(dZ==0)&(\\n(sM==1) \{\
-. nr dZ \\n(dZ+1
-. ds b2 \\*(b1
-. ds b1
-. nr lK \\n(.c
-. ev 2
-. fi
-. di eB
-. \}
-. \}
-.\}
-.el \{\
-. as b1 \\*(qL
-.\}
-.ie \\n(aC>0 \{\
-. if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 .\\*(A\\n(aP
-. el \{\
-. nr aP \\n(aP-1
-. No
-. \}
-. \}
-. if \\n(aC==\\n(aP \{\
-. if \\n(tP==1 \{\
-.\" .tm SETTING Xt!!!
-. nr Xt 1
-. \}
-.\".\" . ds S0
-.\"CHANGED ds S0 \\*(iV
-. aY
-. \}
-.\}
-.el \{\
-. if \\n(oM>1 .as b1 \\*(sV
-.\}
-..
-.\"
-.\" NS eC macro - enclose string close
-.\" NS aa local register
-.de eC
-.nr oM \\n(oM-1
-.\" tm eC last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
-.as b1 \\*(qR
-.if \\n(aC==0 \{\
-. ie \\n(.$>0 \{\
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-. el \{\
-. ie "\\*(xB"" \{\
-. pB
-. \}
-. el \{\
-. pB
-.\\*(L\\n(lC
-. nr Xt 0
-. ds xB
-. \}
-. \}
-.\}
-.if \\n(aC>0 \{\
-. ie \\n(aC==\\n(aP \{\
-. ie \\n(oM==0 \{\
-. aZ
-. \}
-. el .aY
-. \}
-. el \{\
-. nr aa \\n(aP+1
-. if \\n(C\\n(aa==2 .as b1 \\*(S\\n(aC
-.\" tm CURRENT arg (aP==\\*(A\\n(aP and ap+1==\\*(A\\n(aa) tP==\\n(tP Xt==\\n(Xt
-. rr aa
-. if \\n(tP>0 \{\
-.\" tm UNSETTING Xt==\\n(Xt!!!!
-. if \\n(Xt>0 .nr Xt \\n(Xt-1
-.\" tm NOW Xt==\\n(Xt!!!!
-. \}
-. No
-. \}
-.\}
-..
-.\"------------------------------------------------------------------------
-.\" NS Pf macro - Prefix (calls .pF)
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Xc
+.
+. ds doc-quote-right
+.
+. doc-enclose-close \$@
+..
+.
+.
+.\" NS doc-nesting-level global register
+.\" NS used by `doc-enclose-open' and `doc-enclose-close'
+.
+.nr doc-nesting-level 0
+.
+.
+.\" NS doc-in-list global register (bool)
+.\" NS whether we are in (logical) .It
+.
+.nr doc-in-list 0
+.
+.
+.\" NS doc-enclose-open macro
+.\" NS enclose string open
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-nesting-level
+.
+.de doc-enclose-open
+. if !\n[doc-arg-limit] \
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. nr doc-arg-ptr -1
+.
+. nop \)\*[doc-quote-left]\)\c
+.
+. \" start enclosure box
+. box doc-enclosure-box\n[doc-nesting-level]
+. ev doc-enclosure-env\n[doc-nesting-level]
+. evc 0
+. in 0
+. nf
+. \" we insert something to make .chop always work
+. nop \&\c
+.
+. \" increase nesting level *after* parsing of arguments
+. nr doc-nesting-level +1
+.
+. if \n[doc-arg-limit] \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
+. doc-print-recursive
+. el \
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS doc-enclose-close macro
+.\" NS enclose string close
+.\" NS
+.\" NS modifies:
+.\" NS doc-nesting-level
+.
+.de doc-enclose-close
+. nr doc-nesting-level -1
+.
+. \" finish enclosure box
+. br
+. ev
+. box
+. chop doc-enclosure-box\n[doc-nesting-level]
+. unformat doc-enclosure-box\n[doc-nesting-level]
+.
+. nh
+. nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
+. nop \)\*[doc-quote-right]\)\c
+.
+. if !\n[doc-arg-limit] \{\
+. doc-parse-args \$@
+.
+. if !\n[.$] \
+. doc-print-and-reset
+. \}
+.
+. if \n[doc-arg-limit] \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nop \)\*[doc-space\n[doc-arg-ptr]]\c
+. nr doc-arg-ptr +1
+. doc-print-recursive
+. \}
+. el \
+. doc-print-and-reset
+. \}
+.
+. \" shall we finish .It request?
+. if !"\*[doc-macro-name]"It" \
+. if \n[doc-in-list] \
+. if !\n[doc-nesting-level] \
+. doc-\*[doc-list-type-stack\n[doc-list-depth]]
+..
+.
+.
+.\" NS Pf user macro
+.\" NS prefix: `.Pf prefix arg ...'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS
+.\" NS width register `Pf' set in doc-common
+.
.de Pf
-.if \\n(aC==0 .ds mN Pf
-.ds qL \&\\$1
-.pF \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS pF macro - Prefix (for prefixing open quotes, brackets etc)
-.de pF
-.ie \\n(aC==0 \{\
-. as b1 \&\\*(qL
-. ie \\n(.$<2 \{\
-. tm Warning: Missing arguments - prefix .Pf)
-. pB
-. \}
-. el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.el \{\
-. ie (\\n(aC-\\n(aP)>1 \{\
-. nr aP \\n(aP+1
-. as b1 \&\\*(A\\n(aP
-. \}
-. el .tm Warning: .Pf: trailing prefix (#\\n(.c)
-.\}
-.if \\n(aC>0 \{\
-. ie (\\n(aC-\\n(aP)==0 .aZ
-. el \{\
-. nr aP \\n(aP+1
-. c\\n(C\\n(aP
-. \}
-.\}
-..
-.\" NS Ns macro - remove space (space remove done by .aV or .fV)
+. if !\n[doc-arg-limit] \
+. ds doc-macro-name Pf
+.
+. ie \n[doc-arg-limit] \{\
+. ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
+. nr doc-arg-ptr +1
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
+. \}
+. el \
+. tm mdoc warning: .Pf: trailing prefix (#\n[.c])
+. \}
+. el \{\
+. nop \)\$1\)\c
+. shift
+. ie \n[.$] \
+. doc-parse-args \$@
+. el \{\
+. tm mdoc warning: .Pf: missing arguments (#\n[.c])
+. nop \)
+. \}\}
+.
+. if \n[doc-arg-limit] \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
+. doc-print-and-reset
+. el \
+. doc-do-\n[doc-type\n[doc-arg-ptr]]
+. \}
+..
+.
+.
+.\" NS Ns user macro
+.\" NS remove space (space removal done by `doc-parse-args')
+.\" NS
+.\" NS modifies:
+.\" NS doc-argXXX
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ns' set in doc-common
+.
.de Ns
-.if \\n(aC==0 \{\
-. ds mN Ns
-. ie \\n(.$>0 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. el .tm Usage: .Ns must be called with arguments (#\\n(.c)
-.\}
-.No
-..
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Ns
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Ns must be called with arguments (#\n[.c])
+. \}
+.
+. if \n[doc-arg-limit] \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
+. doc-print-recursive
+. el \
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Ap user macro
+.\" NS append an apostrophe
+.\" NS
+.\" NS width register `Ap' set in doc-common
+.
.de Ap
-.if \\n(aC==0 \{\
-. ds mN Ap
-. tm Usage: Ap "cannot be first request on a line (no .Ap)" (#\\n(.c)
-.\}
-.as b1 \&'
-.No
-..
-.\" NS Hv macro - Hard (unpaddable) Space vector
-.\" NS iV string inter-vector space
-.\" NS sV string inter-argument space
-.de Hv
-.ds iV \\*(sV
-.ds sV \\*(hV
-..
-.\" NS Sv macro - Soft Space vector (troff limitation)
-.de Sv
-.ds sV \\*(iV
-..
-.\" NS Tv macro - Tab Space vector
-.de Tv
-.ds sV \\*(tV
-..
-.\" NS Sm macro - Space mode
-.\" NS sM register - default is one (space mode on)
-.nr sM 1
+. ie !\n[doc-arg-limit] \
+. tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
+. el \{\
+. nop \)'\)\c
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
+. doc-print-recursive
+. el \
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS doc-space global string
+.\" NS current inter-argument space
+.
+.ds doc-space "\*[doc-soft-space]
+.
+.
+.\" NS doc-soft-space constant string
+.\" NS soft (stretchable) space (defined in doc-common)
+.
+.
+.\" NS doc-hard-space constant string
+.\" NS hard (unpaddable) space (defined in doc-common)
+.
+.
+.\" NS doc-set-hard-space macro
+.\" NS set current space string to hard (unpaddable) space.
+.\" NS
+.\" NS modifies:
+.\" NS doc-saved-space
+.\" NS doc-space
+.
+.de doc-set-hard-space
+. ie "\*[doc-space]"" \
+. ds doc-saved-space "\*[doc-hard-space]
+. el \
+. ds doc-space "\*[doc-hard-space]
+..
+.
+.
+.\" NS doc-set-soft-space macro
+.\" NS set current space string to soft space
+.\" NS
+.\" NS modifies:
+.\" NS doc-saved-space
+.\" NS doc-space
+.
+.de doc-set-soft-space
+. ie "\*[doc-space]"" \
+. ds doc-saved-space "\*[doc-soft-space]
+. el \
+. ds doc-space "\*[doc-soft-space]
+..
+.
+.
+.\" NS doc-space-mode global register (bool)
+.\" NS default is one (space mode on)
+.
+.nr doc-space-mode 1
+.
+.
+.\" NS doc-saved-space global string
+.\" NS saved value of `doc-space'
+.
+.ds doc-saved-space "\*[doc-space]
+.
+.
+.\" NS doc-have-space global register (bool)
+.\" NS set if last command was horizontal space
+.
+.nr doc-have-space 0
+.
+.
+.\" NS Sm user macro
+.\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
+.\" NS
+.\" NS without argument, toggle space mode
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-limit
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-macro-name
+.\" NS doc-num-args
+.\" NS doc-saved-space
+.\" NS doc-space
+.\" NS doc-space-mode
+.\" NS doc-spaceXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Sm
+.\" NS
+.\" NS width register `Sm' set in doc-common
+.
.de Sm
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm "Usage: .Sm [off | on]" (#\\n(.c)
-. el \{\
-. ds mN Sm
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>0 \{\
-. nr aP \\n(aP+1
-. if "\\*(A\\n(aP"on" \{\
-. ds sV \\*(iV
-. nr sM 1
-. \}
-. if "\\*(A\\n(aP"off" \{\
-. ds sV
-. rm S0 S1 S2 S3 S4 S5 S6 S7 S8 S9
-. nr sM 0
-. \}
-. ie \\n(aC>\\n(aP \{\
-. No
-. \}
-. el .aY
-.\}
-..
-.\"------------------------------------------------------------------------
-.\" Size and Argument type macros
-.\" NS aT macro - argument type
-.\" NS aU macro - argument type (same as .aT but uses A[1-9] strings
-.\" NS aT register argument type
-.if \n(.g \{\
-.de aT
-.nr aT 0
-.ie \\n(sW>2:(\A'\\$1'==0) \{\
-. nr aT 2
-.\}
-.el \{\
-. if \\n(sW==1 \{\
-. ie \\n(z\\$1>2 \{\
-. nr aT \\n(z\\$1
-. \}
-. el .nr aT 2
-. \}
-. if \\n(sW==2 \{\
-. ie \\n(\\$1 \{\
-. nr aT 1
-. \}
-. el .nr aT 2
-. \}
-.\}
-..
-.de aU
-.nr aT 0
-.aW \\$1
-.ie \\n(sW>2:(\A'\\*(A\\$1'==0) .nr aT 2
-.el \{\
-. if \\n(sW==1 \{\
-. ie \\n(z\\*(A\\$1>2 \{\
-. nr aT \\n(z\\*(A\\$1
-. \}
-. el .nr aT 2
-. \}
-. if \\n(sW==2 \{\
-. ie (\\n(\\*(A\\$1) \{\
-. nr aT 1
-. \}
-. el .nr aT 2
-. \}
-.\}
-..
-.\}
-.if !\n(.g \{\
-.de aT
-.nr aT 0
-.ie \\n(sW>2 \{\
-. nr aT 2
-.\}
-.el \{\
-. if \\n(sW==1 \{\
-. ie \\n(z\\$1>2 \{\
-. nr aT \\n(z\\$1
-. \}
-. el .nr aT 2
-. \}
-. if \\n(sW==2 \{\
-. ie \\n(\\$1 \{\
-. nr aT 1
-. \}
-. el .nr aT 2
-. \}
-.\}
-..
-.de aU
-.nr aT 0
-.aW \\$1
-.ie \\n(sW>2 .nr aT 2
-.el \{\
-. if \\n(sW==1 \{\
-. ie \\n(z\\*(A\\$1>2 \{\
-. nr aT \\n(z\\*(A\\$1
-. \}
-. el .nr aT 2
-. \}
-. if \\n(sW==2 \{\
-. ie (\\n(\\*(A\\$1) \{\
-. nr aT 1
-. \}
-. el .nr aT 2
-. \}
-.\}
-..
-.\}
-.\" NS s1 macro - set spacing for class type 1
-.\" NS s2 macro - set spacing for class type 2
-.\" NS s3 macro - set spacing for class type 3
-.\" NS s1 macro - set spacing for class type 1
-.\" NS s2 macro - set spacing for class type 2
-.\" NS s3 macro - set spacing for class type 3
-.\" NS s4 macro - set spacing for class type 4
-.\" NS S[0-9] string spacing
-.\" NS xX local register
-.\" NS aa local register
-.de s0
-.tm MDOC-ERROR: bogus type 0 (can't set space '\\*(A\\n(aC') (#\\n(.c)
-..
-.de s1
-.if \\n(\\*(A\\n(aC==3 \{\
-. nr xX \\n(aC-1
-. rm S\\n(xX
-. ds S\\n(aC \\*(sV
-.\}
-.if \\n(\\*(A\\n(aC==2 \{\
-. nr xX \\n(aC-1
-.\" this kludge can probably go away, but need to double check first
-. ie "\\*(A\\n(aC"Nb" .ds S\\n(xX \\*(hV
-. el .rm S\\n(xX
-.\}
-..
-.de s2
-.ds S\\n(aC \\*(sV
-..
-.de s3
-.if \\n(aC>1 \{\
-. nr xX \\n(aC-1
-. rm S\\n(xX
-.\}
-.ds S\\n(aC \\*(sV
-..
-.de s4
-.nr aa 0
-..
-.\" Class switches (on current argument aP)
-.\" NS c0 macro - catch errors (non-existent class type 0)
-.\" NS c1 macro - call request if type 1
-.\" NS c2 macro - call .No if type 2
-.\" NS c3 macro - call .No if type 3
-.\" NS c4 macro - call .No if type 4
-.de c0
-.tm MDOC-ERROR: bogus class 0 (can't determine '\\*(A\\n(aC') (#\\n(.c)
-..
-.de c1
-.\\*(A\\n(aP
-..
-.de c2
-.nr aP \\n(aP-1
-.No
-..
-.de c3
-.nr aP \\n(aP-1
-.No
-..
-.de c4
-.nr aP \\n(aP-1
-.No
-..
-.\" NS y1 macro - ignore if class 1
-.\" NS y2 macro - ignore if class 2
-.\" NS y3 macro - append if type 3
-.\" NS y4 macro - append if type 4
-.de y1
-.nr aa 1
-..
-.de y2
-.nr aa 1
-..
-.de y3
-.as b1 \\*(A\\n(aP
-.nr aP \\n(aP+1
-.n\\C\\n(aP
-..
-.de y4
-.as b1 \\*(A\\n(aP
-.nr aP \\n(aP+1
-.n\\C\\n(aP
-..
-.\"--------------------------------------------------------------------------
-.\" Ns Bf macro - Begin Font Mode (will be begin-mode/end-mode in groff & TeX)
-.\" Ns Ef macro - End Font Mode
+. ie \n[doc-have-space] \
+. nr doc-reg-Sm 0
+. el \
+. nr doc-reg-Sm 1
+.
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Sm
+. doc-parse-args \$@
+. \}
+. el \{\
+. ie \n[doc-space-mode] \
+. nr doc-space-mode 0
+. el \
+. nr doc-space-mode 1
+. \}\}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+.
+. \" avoid a warning message in case `Sm' is the last parameter
+. if !d doc-arg\n[doc-arg-ptr] \
+. ds doc-arg\n[doc-arg-ptr]
+.
+. ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
+. ds doc-space "\*[doc-saved-space]
+. nr doc-space-mode 1
+. \}
+. el \{\
+. ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
+. ds doc-saved-space "\*[doc-space]
+. ds doc-space
+. nr doc-space-mode 0
+. \}
+. el \{\
+. \" no argument for Sm
+. nr doc-arg-ptr -1
+. ie \n[doc-space-mode] \
+. nr doc-space-mode 0
+. el \
+. nr doc-space-mode 1
+. \}\}
+.
+. ie \n[doc-space-mode] \{\
+. \" recompute space vector for remaining arguments
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
+. if \n[doc-num-args] \
+. doc-parse-space-vector
+.
+. \" finish line only if it is interrupted and `doc-have-space'
+. \" isn't set
+. if \n[doc-reg-Sm] \
+. if \n[.int] \
+. nop \)
+. \}
+. el \{\
+. \" reset remaining space vector elements
+. nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
+. while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
+. ds doc-space\n[doc-reg-Sm]
+. nr doc-reg-Sm +1
+. \" the body of a `while' request must end with the fitting `\}'!
+. \}
+. \}
+.
+. \" do we have parameters to print?
+. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
+. \" ignore `.Sm on' and `.Sm off' without additional parameters
+. ie (\n[doc-arg-ptr] > 1) \
+. doc-print-and-reset
+. el \
+. doc-reset-args
+. \}
+. el \{\
+. \" skip `Sm' argument
+. nr doc-arg-ptr +1
+. doc-print-recursive
+. \}
+..
+.
+.
+.\" NS doc-arg-type immediate register
+.\" NS argument type (macro=1, string=2, punctuation suffix=3,
+.\" NS punctuation prefix=4)
+.
+.nr doc-arg-type 0
+.
+.
+.\" NS doc-get-arg-type macro
+.\" NS get argument type
+.\" NS
+.\" NS this macro expects the width of the argument in `doc-width'
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-type
+.
+.de doc-get-arg-type
+. nr doc-arg-type 2
+.
+. if ((\n[doc-width] < 4) & \A\$1) \{\
+. ie (\n[doc-width] == 1) \{\
+. if r doc-punct\$1 \
+. nr doc-arg-type \n[doc-punct\$1]
+. \}
+. el \
+. if r \$1 \
+. if d \$1 \
+. nr doc-arg-type 1
+. \}
+..
+.
+.
+.\" NS doc-get-arg-type* macro
+.\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
+.\" NS
+.\" NS this macro sets the `doc-width' register using the `length' request
+.\" NS to get the number of characters in a string literally
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-type
+.\" NS doc-width
+.
+.de doc-get-arg-type*
+. nr doc-arg-type 2
+. length doc-width "\*[doc-arg\$1]
+.
+. if ((\n[doc-width] < 4) & \A\*[doc-arg\$1]) \{\
+. ie (\n[doc-width] == 1) \{\
+. if r doc-punct\*[doc-arg\$1] \
+. nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
+. \}
+. el \
+. if r \*[doc-arg\$1] \
+. if d \*[doc-arg\$1] \
+. nr doc-arg-type 1
+. \}
+..
+.
+.
+.\" NS doc-set-spacing-1 macro
+.\" NS set spacing for macros
+.\" NS
+.\" NS modifies:
+.\" NS doc-spaceXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dssfm
+.\" NS doc-reg-dssfm1
+.
+.de doc-set-spacing-1
+. nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
+.
+. \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
+. \" argument)
+. ie (\n[doc-reg-dssfm1] == 3) \{\
+. if \n[doc-arg-limit] \{\
+. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
+. ds doc-space\n[doc-reg-dssfm]
+. \}
+. ds doc-space\n[doc-arg-limit] "\*[doc-space]
+. \}
+. el \{\
+. \" macros like .Ap and .Ns have value 2 (remove space before and after
+. \" argument)
+. ie (\n[doc-reg-dssfm1] == 2) \{\
+. if \n[doc-arg-limit] \{\
+. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
+. ds doc-space\n[doc-reg-dssfm]
+. \}
+. ds doc-space\n[doc-arg-limit]
+. \}
+. el \
+. ds doc-space\n[doc-arg-limit]
+. \}
+..
+.
+.
+.\" NS doc-set-spacing-2 macro
+.\" NS set spacing for strings
+.\" NS
+.\" NS modifies:
+.\" NS doc-spaceXXX
+.
+.de doc-set-spacing-2
+. ds doc-space\n[doc-arg-limit] "\*[doc-space]
+..
+.
+.
+.\" NS doc-set-spacing-3 macro
+.\" NS set spacing for punctuation suffixes
+.\" NS
+.\" NS modifies:
+.\" NS doc-spaceXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dssfps
+.
+.de doc-set-spacing-3
+. if \n[doc-arg-limit] \{\
+. nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
+. ds doc-space\n[doc-reg-dssfps]
+. \}
+.
+. ds doc-space\n[doc-arg-limit] "\*[doc-space]
+..
+.
+.
+.\" NS doc-set-spacing-4 macro
+.\" NS set spacing for punctuation prefixes
+.\" NS
+.\" NS modifies:
+.\" NS doc-spaceXXX
+.
+.de doc-set-spacing-4
+. ds doc-space\n[doc-arg-limit]
+..
+.
+.
+.\" type switches (on current argument doc-arg-ptr)
+.
+.
+.\" NS doc-do-1 macro
+.\" NS call request if macro
+.
+.de doc-do-1
+. \*[doc-arg\n[doc-arg-ptr]]
+..
+.
+.
+.\" NS doc-do-2 macro
+.\" NS call .doc-print-recursive if string
+.
+.als doc-do-2 doc-print-recursive
+.
+.
+.\" NS doc-do-3 macro
+.\" NS call .doc-print-recursive if punctuation suffix
+.
+.als doc-do-3 doc-print-recursive
+.
+.
+.\" NS doc-do-4 macro
+.\" NS call .doc-print-recursive if punctuation prefix
+.
+.als doc-do-4 doc-print-recursive
+.
+.
+.\" NS doc-fontmode-depth global register
+.\" NS font mode level
+.
+.nr doc-fontmode-depth 0
+.
+.
+.\" NS doc-fontmode-font-stackXXX global register
+.\" NS stack of saved current font values from `Bf' request
+.\" NS
+.\" NS limit:
+.\" NS doc-fontmode-depth
+.
+.nr doc-fontmode-font-stack0 0
+.
+.
+.\" NS doc-fontmode-size-stackXXX global register
+.\" NS stack of saved current size values from `Bf' request
+.\" NS
+.\" NS limit:
+.\" NS doc-fontmode-depth
+.
+.nr doc-fontmode-size-stack0 0
+.
+.
+.\" NS Bf user macro
+.\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
+.\" NS
+.\" NS modifies:
+.\" NS doc-fontmode-depth
+.\" NS doc-fontmode-font-stackXXX
+.\" NS doc-fontmode-size-stackXXX
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Bf' set in doc-common
+.
.de Bf
-.ds mN Bf
-.ie \\n(.$>0 \{\
-. nr bF \\n(.f
-. nr bZ \\n(.s
-. if "\\$1"Em" \&\\*(eM\c
-. if "\\$1"Li" \&\\*(lI\c
-. if "\\$1"Sy" \&\\*(sY\c
-. if "\\$1"-emphasis" \&\\*(eM\c
-. if "\\$1"-literal" \&\\*(lI\c
-. if "\\$1"-symbolic" \&\\*(sY\c
-.\}
-.el .tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\\n(.c)
-..
+. ds doc-macro-name Bf
+.
+. ie \n[.$] \{\
+. nr doc-fontmode-depth +1
+.
+. \" save current font and size
+. nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
+. nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
+.
+. ie "\$1"Em" \
+. nop \*[doc-Em-font]\c
+. el \{ .ie "\$1"Li" \
+. nop \*[doc-Li-font]\c
+. el \{ .ie "\$1"Sy" \
+. nop \*[doc-Sy-font]\c
+. el \{ .ie "\$1"-emphasis" \
+. nop \*[doc-Em-font]\c
+. el \{ .ie "\$1"-literal" \
+. nop \*[doc-Li-font]\c
+. el \{ .ie "\$1"-symbolic" \
+. nop \*[doc-Sy-font]\c
+. el \{\
+. tmc mdoc warning: Unknown keyword `\$1' in .Bf request
+. tm1 " (#\n[.c])
+. \}\}\}\}\}\}\}
+. el \
+. tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
+..
+.
+.
+.\" NS Ef user macro
+.\" NS end font mode
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ef' set in doc-common
+.
.de Ef
-.ds mN Ef
-.ie \\n(.$>0 .tm Usage .Ef (does not take arguments) (#\\n(.c)
-.el \&\f\\n(bF\s\\n(bZ
-..
-.\" Ns Bk macro - Begin Keep
-.\" Ns Ek macro - End Keep
-.\" Ns kS string - keep type
+. ds doc-macro-name Ef
+.
+. ie \n[doc-fontmode-depth] \{\
+. \" restore saved font and size
+. nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
+. nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
+.
+. nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
+. nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
+. nr doc-fontmode-depth -1
+. \}
+. el \
+. tm mdoc warning: Extraneous .Ef (#\n[.c])
+..
+.
+.
+.\" NS doc-keep-type global register
+.\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
+.
+.nr doc-keep-type 0
+.
+.
+.\" NS Bk user macro
+.\" NS begin keep
+.\" NS
+.\" NS modifies:
+.\" NS doc-keep-type
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Bk' set in doc-common
+.
.de Bk
-.ds mN Bk
-.ie \\n(.$==0 \{\
-.tm Usage: .Bk [-lines | -words] (#\\n(.c)
-.\}
-.el \{\
-. if !"\\*(kS"" .tm .Bk: nesting keeps not implemented yet. (#\\n(.c)
-. if "\\$1"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
-. if "\\$1"-words" .Hv
-. ds kS \\$1
-.\}
-..
+. ds doc-macro-name Bk
+.
+. if \n[doc-keep-type] \
+. tm .Bk: nesting keeps not implemented yet. (#\n[.c])
+.
+. ie "\$1"-lines" \{\
+. nr doc-keep-type 2
+. tm .Bk -lines: Not implemented yet. (#\n[.c])
+. \}
+. el \{ .ie "\$1"-words" \{\
+. nr doc-keep-type 1
+. doc-set-hard-space
+. \}
+. el \{ .ie "\$1"" \{\
+. \" default
+. nr doc-keep-type 1
+. doc-set-hard-space
+. \}
+. el \{\
+. tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
+. nr doc-keep-type 3
+. \}\}\}
+.
+\#. nr doc-nesting-level +1
+..
+.
+.
+.\" NS Ek user macro
+.\" NS end keep
+.\" NS
+.\" NS modifies:
+.\" NS doc-keep-type
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ek' set in doc-common
+.
.de Ek
-.ds mN Ek
-.ie \\n(.$>0 .tm Usage .Ek (does not take arguments) (#\\n(.c)
-.el \{\
-. if "\\*(kS"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
-. if "\\*(kS"-words" .Sv
-. rm kS
-.\}
-..
-.\" NS Bd macro - Begin Display display-type [offset string]
-.\" NS Ed macro - end Display
-.\" NS O[0-9] registers - stack of indent
-.\" NS d[0-9] registers - display-type stack
+. ds doc-macro-name Ek
+.
+\#. nr doc-nesting-level -1
+.
+. ie \n[.$] \
+. tm Usage: .Ek (does not take arguments) (#\n[.c])
+. el \{\
+. if !\n[doc-keep-type] \
+. tm mdoc warning: .Ek found without .Bk before (#\n[.c])
+.
+. ie (\n[doc-keep-type] == 1) \
+. doc-set-soft-space
+. el \{ .if (\n[doc-keep-type] == 2) \
+. tm .Bk -lines: Not implemented yet. (#\n[.c])
+. \}\}
+.
+. nr doc-keep-type 0
+.
+\#. if !"\*[doc-out-string]"" \
+\#. doc-print-out-string
+..
+.
+.
+.\" NS doc-display-depth global register
+.\" NS display level
+.
+.nr doc-display-depth 0
+.
+.
+.\" NS doc-is-compact global register (bool)
+.\" NS set if the `compact' keyword is given
+.
+.nr doc-is-compact 0
+.
+.
+.\" NS doc-display-type-stackXXX global string
+.\" NS the display type stack
+.\" NS
+.\" NS limit:
+.\" NS doc-display-depth
+.
+.ds doc-display-type-stack0
+.
+.
+.\" NS doc-display-indent-stackXXX global register
+.\" NS stack of display indentation values
+.\" NS
+.\" NS limit:
+.\" NS doc-display-depth
+.
+.nr doc-display-indent-stack0 0
+.
+.
+.\" NS doc-display-ad-stackXXX global register
+.\" NS stack of saved adjustment modes
+.\" NS
+.\" NS limit:
+.\" NS doc-display-depth
+.
+.nr doc-display-ad-stack0 0
+.
+.
+.\" NS doc-display-fi-stackXXX global register
+.\" NS stack of saved fill modes
+.\" NS
+.\" NS limit:
+.\" NS doc-display-depth
+.
+.nr doc-display-fi-stack0 0
+.
+.
+.\" NS Bd user macro
+.\" NS begin display
+.\" NS
+.\" NS width register `Bd' set in doc-common
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-display-depth
+.\" NS doc-display-ad-stackXXX
+.\" NS doc-display-fi-stackXXX
+.\" NS doc-display-file
+.\" NS doc-display-indent-stackXXX
+.\" NS doc-display-type-stackXXX
+.\" NS doc-is-compact
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Bd
+.
.de Bd
-.ds mN Bd
-.ie \\n(.$==0 \{\
-.tm Usage: .Bd [-literal | -filled | -ragged | -unfilled] [-offset [string]] [-compact] (#\\n(.c)
-.\}
-.el \{\
-. ds aa
-. nr bV 0
-. nr iD 0
-. nr dP \\n(dP+1
-. if "\\$1"-literal" \{\
-. nr iD \\n(iD+1
-. ds d\\n(dP dL
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. ie t \{\&\\*(lI
-' ta 9n 18n 27n 36n 45n 54n 63n 72n
-. \}
-. el \{\
-' ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
-. \}
-. nf
-. \}
-. if "\\$1"-filled" \{\
-. nr iD \\n(iD+1
-. ds d\\n(dP dF
-. br
-. \}
-. if "\\$1"-ragged" \{\
-. nr iD \\n(iD+1
-. ds d\\n(dP dR
-. na
-. \}
-. if "\\$1"-unfilled" \{\
-. nr iD \\n(iD+1
-. ds d\\n(dP dU
-. nf
-. \}
-.\" .tm Here is argc: \\n(.$ and here is iD \\n(iD
-. if ((\\n(iD>=1)&(\\n(.$>\\n(iD)) \{\
-. bV \\$2 \\$3 \\$4
-. \}
-. if \\n(O\\n(dP>0 'in \\n(.iu+\\n(O\\n(dPu
-. if (\\n(bV==0) \{\
-. if (\\n(nS==0) \{\
-. ie "\\*(d\\n(dP"dR" .sp \\n(dVu
-. el 'sp \\n(dVu
-. \}
-. \}
-. if \\n(cR==0 .ne 2v
-. nr bV 0
-. nr iD 0
-.\}
-..
-.\" NS bV macro - resolve remaining .Bd arguments
-.de bV
-.\" .tm in bV with args: \\$1 \\$2 \\$3
-.nr iD 1
-.ds bY
-.if "\\$1"-offset" \{\
-. ds bY \\$2
-. if "\\*(bY"left" \{\
-. nr iD \\n(iD+1
-. nr O\\n(dP 0
-. \}
-. if "\\*(bY"right" \{\
-. nr iD \\n(iD+1
-. nr O\\n(dP (\\n(.l/3)u
-. \}
-. if "\\*(bY"center" \{\
-. nr iD \\n(iD+1
-. nr O\\n(dP (\\n(.l-\\n(.i)/4u
-. \}
-. if "\\*(bY"indent" \{\
-. nr iD \\n(iD+1
-. nr O\\n(dP \\n(dIu
-. \}
-. if "\\*(bY"indent-two" \{\
-. nr iD \\n(iD+1
-. nr O\\n(dP \\n(dIu+\\n(dIu
-. \}
-. if \\n(iD==1 \{\
-. nr iD \\n(iD+1
-. sW "\\*(bY"
-. ie \\n(sW>2 \{\
-. ie ((\\*(bY>9n)&(\\*(bY<100n)) \{\
-. nr O\\n(dP \\*(bY
-. \}
-. el .nr O\\n(dP (\\n(sW)*\\n(fWu
-. \}
-. el \{\
-. if \\n(sW==2 .aT \\*(bY
-. ie \\n(aT==1 \{\
-. nr O\\n(dP \\n(\\*(bY
-. \}
-. el .nr O\\n(dP \\*(bY
-. \}
-. \}
-.\}
-.if "\\$1"-compact" \{\
-. nr bV 1
-.\}
-.if \\n(iD<\\n(.$ \{\
-. ie "\\*(bY"" \{\
-. bV \\$2 \\$3
-. \}
-. el \{\
-. bV \\$3
-. \}
-.\}
-..
-.\" NS Ed macro - end display
+. ds doc-macro-name Bd
+.
+. if !\n[.$] \{\
+. tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
+. tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
+. return
+. \}
+.
+. nr doc-is-compact 0
+. ds doc-display-file
+. nr doc-reg-Bd 1
+. nr doc-display-depth +1
+.
+. \" save current adjustment and fill modes
+. nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
+. nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
+.
+. ie "\$1"-literal" \{\
+. ds doc-display-type-stack\n[doc-display-depth] literal
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. ie t \{\
+. nop \*[doc-Li-font]\c
+' ta T 9n
+. \}
+. el \
+' ta T 8n
+. nf
+. \}
+. el \{ .ie "\$1"-filled" \{\
+. ds doc-display-type-stack\n[doc-display-depth] filled
+. ad b
+. fi
+. \}
+. el \{ .ie "\$1"-ragged" \{\
+. ds doc-display-type-stack\n[doc-display-depth] ragged
+. na
+. fi
+. \}
+. el \{ .ie "\$1"-centered" \{\
+. ds doc-display-type-stack\n[doc-display-depth] centered
+. ad c
+. fi
+. \}
+. el \{ .ie "\$1"-unfilled" \{\
+. ds doc-display-type-stack\n[doc-display-depth] unfilled
+. nf
+. \}
+. el \{\
+. tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
+. tm1 " in .Bd request (#\n[.c])
+. nr doc-reg-Bd 0
+. \}\}\}\}\}
+.
+. \" have we seen an argument?
+. if \n[doc-reg-Bd] \{\
+. shift
+. \" check other arguments
+. if \n[.$] \
+. doc-do-Bd-args \$@
+. \}
+.
+. \" avoid warning about non-existent register
+. if !r doc-display-indent-stack\n[doc-display-depth] \
+. nr doc-display-indent-stack\n[doc-display-depth] 0
+.
+. if \n[doc-display-indent-stack\n[doc-display-depth]] \
+' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
+.
+. if !\n[doc-is-compact] \{\
+. if !\n[doc-in-synopsis-count] \{\
+. ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
+. sp \n[doc-display-vertical]u
+. el \
+' sp \n[doc-display-vertical]u
+. \}\}
+.
+. if !\n[cR] \
+. ne 2v
+.
+. if !"\*[doc-display-file]"" \
+. so \*[doc-display-file]
+.
+. nr doc-is-compact 0
+. ds doc-display-file
+..
+.
+.
+.\" NS doc-do-Bd-args macro
+.\" NS resolve remaining .Bd arguments
+.\" NS
+.\" NS modifies:
+.\" NS doc-display-file
+.\" NS doc-display-indent-stackXXX
+.\" NS doc-is-compact
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-ddBa
+.\" NS doc-reg-ddBa1
+.\" NS doc-reg-ddBa2
+.\" NS doc-reg-ddBa3
+.\" NS doc-reg-ddBa4
+.\" NS doc-str-ddBa
+.
+.de doc-do-Bd-args
+. nr doc-reg-ddBa 1
+.
+. ie "\$1"-offset" \{\
+. nr doc-reg-ddBa 2
+.
+. ie "\$2"left" \
+. nr doc-display-indent-stack\n[doc-display-depth] 0
+. el \{ .ie "\$2"right" \
+. nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
+. el \{ .ie "\$2"center" \
+. nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
+. el \{ .ie "\$2"indent" \
+. nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
+. el \{ .ie "\$2"indent-two" \
+. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
+. el \
+. nr doc-reg-ddBa 1
+. \}\}\}\}
+.
+. \" not a known keyword
+. if (\n[doc-reg-ddBa] == 1) \{\
+. nr doc-reg-ddBa 2
+.
+. nr doc-reg-ddBa1 0
+. if \B(\$2) \{\
+. \" disable warnings related to scaling indicators (32)
+. nr doc-reg-ddBa2 \n[.warn]
+. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
+.
+. \" values without a scaling indicator are taken as strings;
+. \" we test whether the parameter string with and without the last
+. \" character yields identical numerical results (ignoring the
+. \" scaling indicator)
+. ds doc-str-ddBa "\$2
+. substring doc-str-ddBa 1 -1
+. if \B(\*[doc-str-ddBa]) \{\
+. nr doc-reg-ddBa3 (;(\$2))
+. nr doc-reg-ddBa4 (\*[doc-str-ddBa])
+. if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
+. nr doc-reg-ddBa1 1
+. \}
+.
+. \" enable all warnings again
+. warn \n[doc-reg-ddBa2]
+. \}
+.
+. ie \n[doc-reg-ddBa1] \
+. nr doc-display-indent-stack\n[doc-display-depth] \$2
+. el \{\
+. doc-get-width "\$2"
+. ie (\n[doc-width] <= 3) \{\
+. \" if the offset parameter is a macro, use the macro's
+. \" width as specified in doc-common
+. doc-get-arg-type "\$2"
+. ie (\n[doc-arg-type] == 1) \
+. nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
+. el \
+. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}
+. el \
+. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}\}
+. \}
+. el \{ .ie "\$1"-compact" \
+. nr doc-is-compact 1
+. el \{ .ie "\$1"-file" \{\
+. ie !"\$2"" \{\
+. ds doc-display-file "\$2
+. nr doc-reg-ddBa 2
+. \}
+. el \
+. tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
+. \}
+. el \
+. tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
+. \}\}
+.
+. if (\n[doc-reg-ddBa] < \n[.$]) \{\
+. shift \n[doc-reg-ddBa]
+. doc-do-Bd-args \$@
+. \}
+..
+.
+.
+.\" NS Ed user macro
+.\" NS end display
+.\" NS
+.\" NS modifies:
+.\" NS doc-display-depth
+.\" NS doc-display-indent-stackXXX
+.\" NS doc-display-type-stackXXX
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ed' set in doc-common
+.
.de Ed
-.ds mN Ed
-.br
-.if \\n(dP==0 .tm mdoc: Extraneous .Ed
-.if "\\*(d\\n(dP"dL" \{\
-. ft \\n(cF
-. fz \\n(cZ
-.\}
-.in \\n(.iu-\\n(O\\n(dPu
-.rr O\\n(dP
-.rm d\\n(dP
-.nr dP \\n(dP-1
-.fi
-.if t .ad
-..
-.\"--------------------------------------------------------------------------
-.\" NS Bl macro - begin list (.Bl list-type)
-.\" NS L[0-9] registers - stack of list types
+. ds doc-macro-name Ed
+.
+. br
+.
+. if !\n[doc-display-depth] \{\
+. tm mdoc warning: Extraneous .Ed (#\n[.c])
+. nr doc-display-depth 1
+. \}
+.
+. if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
+. ft \n[doc-curr-font]
+. ps \n[doc-curr-size]u
+. \}
+.
+. in -\n[doc-display-indent-stack\n[doc-display-depth]]u
+.
+. \" restore saved adjustment and fill modes
+. ie \n[doc-display-fi-stack\n[doc-display-depth]] \
+. fi
+. el \
+. nf
+. ad \n[doc-display-ad-stack\n[doc-display-depth]]
+.
+. nr doc-display-indent-stack\n[doc-display-depth] 0
+. ds doc-display-type-stack\n[doc-display-depth]
+. nr doc-display-depth -1
+..
+.
+.
+.\" NS doc-list-type-stackXXX global string
+.\" NS stack of list types
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.ds doc-list-type-stack1
+.
+.
+.\" NS doc-list-indent-stackXXX global register
+.\" NS stack of list indentation values
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.nr doc-list-indent-stack1 0
+.
+.
+.\" NS doc-have-indent global register (bool)
+.\" NS an indentation value is active
+.
+.nr doc-have-indent 0
+.
+.
+.\" NS Bl user macro
+.\" NS begin list
+.\" NS
+.\" NS width register `Bl' set in doc-common
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-have-diag-list
+.\" NS doc-list-depth
+.\" NS doc-have-indent
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-list-type-stackXXX
+.\" NS doc-macro-name
+.\" NS doc-num-args
+.\" NS doc-num-columns
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Bl
+.
.de Bl
-.ie \\n(.$==0 \{\
-.tm Usage: .Bl [[-hang | -tag] [-width]] [ -item | -enum | -bullet | -diag] (#\\n(.c)
-.\}
-.el \{\
-. ds mN Bl
-. nr aP 0
-. nr lC \\n(lC+1
-. ds A1 \\$2
-. ds A2 \\$3
-. ds A3 \\$4
-. ds A4 \\$5
-. ds A5 \\$6
-. ds A6 \\$7
-. ds A7 \\$8
-. ds A8 \\$9
-. nr fV \\n(.$-1
-. if "\\$1"-hang" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC hL
-. nr w\\n(lC 6n
-. nr tC 1
-. \}
-. if "\\$1"-tag" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC tL
-. nr tC 1
-. \}
-. if "\\$1"-item" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC iT
-. nr tC 1
-. \}
-. if "\\$1"-enum" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC nU
-. nr w\\n(lC 3n
-. nr tC 1
-. \}
-. if "\\$1"-bullet" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC bU
-. nr w\\n(lC 2n
-. nr tC 1
-. \}
-. if "\\$1"-dash" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC hU
-. nr w\\n(lC 2n
-. nr tC 1
-. \}
-. if "\\$1"-hyphen" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC hU
-. nr w\\n(lC 2n
-. nr tC 1
-. \}
-. if "\\$1"-inset" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC lL
-. nr tC 1
-. \}
-. if "\\$1"-diag" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC mL
-. nr mL 1
-. \}
-. if "\\$1"-ohang" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC oL
-. nr tC 1
-. \}
-. if "\\$1"-column" \{\
-. nr aP \\n(aP+1
-. ds L\\n(lC cL
-. \}
-. ie \\n(aP==0 \{\
-. tm \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. tm Usage: .Bl [[-inset|-tag] -width] [-item|-enum|-bullet|-diag] (#\\n(.c)
-. \}
-. el \{\
-. tY
-. if (\\n(aP==1)&(\\n(aP<\\n(.$) \{\
-. nr aP 0
-. lV
-. if "\\*(L\\n(lC"cL" \{\
-. W\\n(wV
-. nr w\\n(lC 0
-' in -\\n(eWu
-. ie \\n(v\\n(lC==1 \{\
-. nr aa 0
-. \}
-. el \{\
-. sp \\n(dVu
-. \}
-. nf
-. nr wV 0
-. \}
-. \}
-. \}
-. nr aP 0
-.\" . ds b1
-. aY
-.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
-.\}
-..
-.if \n(.g \{\
-. nr i 10
-. while \ni<100 \{\
-. nr num!\nin 1
-. nr i +1
-. \}
-.\}
-.\" NS lV macro - resolve remaining .Bl arguments
-.de lV
-.nr aP \\n(aP+1
-.if \\n(fV>=\\n(aP \{\
-. nr iD 0
-. if "\\*(A\\n(aP"-compact" \{\
-. nr iD 1
-. nr v\\n(lC 1
-. \}
-. if "\\*(A\\n(aP"-width" \{\
-. nr iD 1
-. nr aP \\n(aP+1
-. nr tW 1
-. ds t\\n(lC TagwidtH
-. ds tS \\*(A\\n(aP
-. aW \\n(aP
-. ie \\n(sW>2 \{\
-. nr w\\n(lC (\\n(sW)*\\n(fWu
-. if \\n(sW==3 \{\
-. ie \\n(.g \{\
-. if \A'\\*(tS' .if r num!\\*(tS \{\
-. nr w\\n(lC \\*(tS
-. \}
-. \}
-. el \{\
-. if (\\*(tS>9n)&(\\*(tS<99n) \{\
-. nr w\\n(lC \\*(tSu
-. \}
-. \}
-. \}
-. \}
-. el \{\
-. aT \\*(tS
-. ie \\n(aT==1 \{\
-. nr w\\n(lC \\n(\\*(tS
-. \}
-. el \{\
-. nr w\\n(lC \\*(tSu
-. \}
-. \}
-. \}
-. if "\\*(A\\n(aP"-offset" \{\
-. nr iD 1
-. nr aP \\n(aP+1
-. ie "\\*(A\\n(aP"indent" \{\
-. nr o\\n(lC \\n(Dsu
-. \}
-. el \{\
-. ds tS \\*(A\\n(aP
-. aW \\n(aP
-. ie \\n(sW>2 \{\
-. nr o\\n(lC (\\n(sW)*\\n(fWu
-. ie \\n(.g \{\
-. if \A'\\*(tS' .if r num!\\*(tS \{\
-. nr o\\n(lC \\*(tS
-. \}
-. \}
-. el \{\
-. if (\\*(tS>9n)&(\\*(tS<100n) \{\
-. nr o\\n(lC \\*(tS
-. \}
-. \}
-. \}
-. el \{\
-. ie \\n(C\\n(aP==1 .nr o\\n(lC \\n(\\*(tS
-. el .nr o\\n(lC \\*(tS
-. \}
-. \}
-. \}
-. if \\n(iD==0 \{\
-. if "\\*(L\\n(lC"cL" \{\
-. nr wV \\n(wV+1
-. ds A\\n(wV \\*(A\\n(aP
-. \}
-. \}
-. if \\n(fV>\\n(aP .lV
-.\}
-..
-.\" NS El macro - end list
-.\" NS iD local register
+. if !\n[.$] \{\
+. doc-Bl-usage
+. return
+. \}
+.
+. ds doc-macro-name Bl
+. nr doc-list-depth +1
+. nr doc-arg-ptr 1
+.
+. ie "\$1"-hang" \{\
+. ds doc-list-type-stack\n[doc-list-depth] hang-list
+. nr doc-list-indent-stack\n[doc-list-depth] 6n
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-tag" \{\
+. ds doc-list-type-stack\n[doc-list-depth] tag-list
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-item" \{\
+. ds doc-list-type-stack\n[doc-list-depth] item-list
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-enum" \{\
+. ds doc-list-type-stack\n[doc-list-depth] enum-list
+. nr doc-list-indent-stack\n[doc-list-depth] 3n
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-bullet" \{\
+. ds doc-list-type-stack\n[doc-list-depth] bullet-list
+. nr doc-list-indent-stack\n[doc-list-depth] 2n
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-dash" \{\
+. ds doc-list-type-stack\n[doc-list-depth] dash-list
+. nr doc-list-indent-stack\n[doc-list-depth] 2n
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-hyphen" \{\
+. ds doc-list-type-stack\n[doc-list-depth] dash-list
+. nr doc-list-indent-stack\n[doc-list-depth] 2n
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-inset" \{\
+. ds doc-list-type-stack\n[doc-list-depth] inset-list
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-diag" \{\
+. ds doc-list-type-stack\n[doc-list-depth] diag-list
+. nr doc-have-diag-list 1
+. \}
+. el \{ .ie "\$1"-ohang" \{\
+. ds doc-list-type-stack\n[doc-list-depth] ohang-list
+. nr doc-have-indent 1
+. \}
+. el \{ .ie "\$1"-column" \{\
+. ds doc-list-type-stack\n[doc-list-depth] column-list
+. linetabs 1
+. \}
+. el \{\
+. tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
+. tm1 " in .Bl request
+. tm
+. nr doc-arg-ptr 0
+. \}\}\}\}\}\}\}\}\}\}\}
+.
+. \" we have seen a list type
+. if !\n[doc-arg-ptr] \{\
+. doc-Bl-usage
+. doc-reset-args
+. return
+. \}
+.
+. shift
+.
+. \" fill argument vector
+. nr doc-reg-Bl 1
+. while (\n[doc-reg-Bl] <= \n[.$]) \{\
+. ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
+. nr doc-reg-Bl +1
+. \}
+.
+. doc-increment-list-stack
+.
+. if \n[.$] \{\
+. nr doc-arg-limit \n[.$]
+. nr doc-arg-ptr 0
+. doc-do-Bl-args
+.
+. \" initialize column list
+. if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
+. doc-set-column-tab \n[doc-num-columns]
+. nr doc-list-indent-stack\n[doc-list-depth] 0
+' in -\n[doc-column-indent-width]u
+. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
+. sp \n[doc-display-vertical]u
+.
+. nf
+. nr doc-num-columns 0
+. \}\}
+.
+. doc-reset-args
+..
+.
+.
+.\" NS doc-Bl-usage macro
+.
+.de doc-Bl-usage
+. tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
+. tm1 " [-width <string>] [-xwidth <command>]
+. tm1 " [-offset <string>] [-compact]
+. tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
+. tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
+. tm1 " [-offset <string>] [-compact] (#\n[.c])
+..
+.
+.
+.\" NS doc-do-Bl-args macro
+.\" NS resolve remaining .Bl arguments
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-compact-list-stackXXX
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-list-offset-stackXXX
+.\" NS doc-num-columns
+.\" NS doc-tag-prefix-stackXXX
+.\" NS doc-tag-width-stackXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-box-dBla
+.\" NS doc-env-dBla
+.\" NS doc-reg-dBla
+.\" NS doc-reg-dBla1
+.\" NS doc-reg-dBla2
+.\" NS doc-reg-dBla3
+.\" NS doc-reg-dBla4
+.\" NS doc-str-dBla
+.\" NS doc-str-dBla1
+.
+.de doc-do-Bl-args
+. nr doc-arg-ptr +1
+.
+. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
+. return
+.
+. \" avoid a warning message in case e.g. `-offset' has no parameter
+. nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
+. if !d doc-arg\n[doc-reg-dBla] \
+. ds doc-arg\n[doc-reg-dBla]
+.
+. nr doc-reg-dBla 1
+.
+. ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
+. nr doc-compact-list-stack\n[doc-list-depth] 1
+.
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
+. ie (\n[doc-list-depth] > 1) \{\
+. nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
+. ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
+. as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
+. length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
+. nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
+. \}
+. el \
+. tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
+. \}
+.
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
+. nr doc-arg-ptr +1
+. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
+. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
+.
+. \" test whether argument is a valid numeric expression
+. nr doc-reg-dBla1 0
+. if \B(\*[doc-str-dBla]) \{\
+. \" disable warnings related to scaling indicators (32)
+. nr doc-reg-dBla2 \n[.warn]
+. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
+.
+. \" values without a scaling indicator are taken as strings;
+. \" we test whether the parameter string with and without the last
+. \" character yields identical numerical results (ignoring the
+. \" scaling indicator)
+. ds doc-str-dBla1 "\*[doc-str-dBla]
+. substring doc-str-dBla1 1 -1
+. if \B(\*[doc-str-dBla1]) \{\
+. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
+. nr doc-reg-dBla4 (\*[doc-str-dBla1])
+. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
+. nr doc-reg-dBla1 1
+. \}
+.
+. \" enable all warnings again
+. warn \n[doc-reg-dBla2]
+. \}
+.
+. ie \n[doc-reg-dBla1] \
+. nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
+. el \{\
+. doc-get-arg-width \n[doc-arg-ptr]
+. ie (\n[doc-width] == 2) \{\
+. \" if the width parameter is a macro, use the macro's
+. \" width as specified in doc-common
+. doc-get-arg-type \*[doc-str-dBla]
+. ie (\n[doc-arg-type] == 1) \
+. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
+. el \
+. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}
+. el \
+. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}\}
+.
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
+. nr doc-arg-ptr +1
+. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
+.
+. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
+. substring doc-str-dBla 1 2
+. if .\*[doc-str-dBla] \{\
+. \" execute string in a box to get the width of the diversion
+. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
+. doc-save-global-vars
+. doc-reset-args
+. box doc-box-dBla
+. ev doc-env-dBla
+. evc 0
+. in 0
+. nf
+. nop \*[doc-str-dBla]
+. br
+. ev
+. box
+. doc-restore-global-vars
+. doc-get-width \h'\n[dl]u'
+. \}
+. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}
+.
+. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
+. nr doc-arg-ptr +1
+.
+. ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
+. nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
+. el \{\
+. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
+. nr doc-reg-dBla1 0
+. if \B(\*[doc-str-dBla]) \{\
+. nr doc-reg-dBla2 \n[.warn]
+. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
+.
+. ds doc-str-dBla1 "\*[doc-str-dBla]
+. substring doc-str-dBla1 1 -1
+. if \B(\*[doc-str-dBla1]) \{\
+. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
+. nr doc-reg-dBla4 (\*[doc-str-dBla1])
+. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
+. nr doc-reg-dBla1 1
+. \}
+.
+. warn \n[doc-reg-dBla2]
+. \}
+.
+. ie \n[doc-reg-dBla1] \
+. nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
+. el \{\
+. doc-get-arg-width \n[doc-arg-ptr]
+. ie (\n[doc-width] <= 3) \{\
+. \" if the offset parameter is a macro, use the macro's
+. \" width as specified in doc-common
+. doc-get-arg-type \*[doc-str-dBla]
+. ie (\n[doc-arg-type] == 1) \
+. nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
+. el \
+. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}
+. el \
+. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
+. \}\}\}
+. el \
+. nr doc-reg-dBla 0
+. \}\}\}\}
+.
+. \" not a known keyword, so it specifies the width of the next column
+. \" (if it is a column list)
+. if !\n[doc-reg-dBla] \{\
+. ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
+. nr doc-num-columns +1
+. ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
+. \}
+. el \{\
+. tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
+. tm1 " in .Bl request (#\n[.c])
+. \}\}
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
+. doc-do-Bl-args
+..
+.
+.
+.\" NS doc-save-global-vars macro
+.\" NS save all global variables
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dsgv
+.
+.de doc-save-global-vars
+. ds doc-macro-name-saved "\*[doc-macro-name]
+. nr doc-arg-limit-saved \n[doc-arg-limit]
+. nr doc-num-args-saved \n[doc-num-args]
+. nr doc-arg-ptr-saved \n[doc-arg-ptr]
+.
+. nr doc-reg-dsgv 1
+. while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
+. ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
+. nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
+. ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
+. nr doc-reg-dsgv +1
+. \}
+.
+. nr doc-curr-font-saved \n[doc-curr-font]
+. nr doc-curr-size-saved \n[doc-curr-size]
+. nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
+. nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
+. nr doc-have-decl-saved \n[doc-have-decl]
+. nr doc-have-var-saved \n[doc-have-var]
+. ds doc-command-name-saved "\*[doc-command-name]
+. ds doc-quote-left-saved "\*[doc-quote-left]
+. ds doc-quote-right-saved "\*[doc-quote-right]
+. nr doc-nesting-level-saved \n[doc-nesting-level]
+. nr doc-in-list-saved \n[doc-in-list]
+. ds doc-space-saved "\*[doc-space]
+. ds doc-saved-space-saved "\*[doc-saved-space]
+. nr doc-space-mode-saved \n[doc-space-mode]
+. nr doc-have-space-saved \n[doc-have-space]
+. nr doc-have-slot-saved \n[doc-have-slot]
+. nr doc-keep-type-saved \n[doc-keep-type]
+. nr doc-display-depth-saved \n[doc-display-depth]
+. nr doc-is-compact-saved \n[doc-is-compact]
+.
+. nr doc-reg-dsgv 0
+. while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
+. ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
+. nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
+. nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
+. nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
+. nr doc-reg-dsgv +1
+. \}
+.
+. nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
+.
+. nr doc-reg-dsgv 1
+. while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
+. nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
+. nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
+. nr doc-reg-dsgv +1
+. \}
+.
+. nr doc-list-depth-saved \n[doc-list-depth]
+.
+. nr doc-reg-dsgv 1
+. while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
+. ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
+. nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
+. nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
+. ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
+. ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
+. nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
+. nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
+. nr doc-reg-dsgv +1
+. \}
+.
+. nr doc-have-indent-saved \n[doc-have-indent]
+. ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
+. nr doc-curr-type-saved \n[doc-curr-type]
+. ds doc-curr-arg-saved "\*[doc-curr-arg]
+. nr doc-have-diag-list-saved \n[doc-have-diag-list]
+. nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
+. nr doc-num-columns-saved \n[doc-num-columns]
+. nr doc-next-list-depth-saved \n[doc-next-list-depth]
+. nr doc-column-indent-width-saved \n[doc-column-indent-width]
+. nr doc-is-func-saved \n[doc-is-func]
+. nr doc-have-old-func-saved \n[doc-have-old-func]
+. nr doc-func-arg-count-saved \n[doc-func-arg-count]
+. ds doc-func-arg-saved "\*[doc-func-arg]
+. nr doc-num-func-args-saved \n[doc-num-func-args]
+. nr doc-func-args-processed-saved \n[doc-func-args-processed]
+. nr doc-have-func-saved \n[doc-have-func]
+. nr doc-is-reference-saved \n[doc-is-reference]
+. nr doc-reference-count-saved \n[doc-reference-count]
+. nr doc-author-count-saved \n[doc-author-count]
+.
+. nr doc-reg-dsgv 0
+. while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
+. ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
+. nr doc-reg-dsgv +1
+. \}
+.
+. nr doc-book-count-saved \n[doc-book-count]
+. ds doc-book-name-saved "\*[doc-book-name]
+. nr doc-date-count-saved \n[doc-date-count]
+. ds doc-date-saved "\*[doc-date]
+. nr doc-publisher-count-saved \n[doc-publisher-count]
+. ds doc-publisher-name-saved "\*[doc-publisher-name]
+. nr doc-journal-count-saved \n[doc-journal-count]
+. ds doc-journal-name-saved "\*[doc-journal-name]
+. nr doc-issue-count-saved \n[doc-issue-count]
+. ds doc-issue-name-saved "\*[doc-issue-name]
+. nr doc-optional-count-saved \n[doc-optional-count]
+. ds doc-optional-string-saved "\*[doc-optional-string]
+. nr doc-page-number-count-saved \n[doc-page-number-count]
+. ds doc-page-number-string-saved "\*[doc-page-number-string]
+. nr doc-corporate-count-saved \n[doc-corporate-count]
+. ds doc-corporate-name-saved "\*[doc-corporate-name]
+. nr doc-report-count-saved \n[doc-report-count]
+. ds doc-report-name-saved "\*[doc-report-name]
+. nr doc-reference-title-count-saved \n[doc-reference-title-count]
+. ds doc-reference-title-name-saved "\*[doc-reference-title-name]
+. ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
+. nr doc-volume-count-saved \n[doc-volume-count]
+. ds doc-volume-name-saved "\*[doc-volume-name]
+. nr doc-have-author-saved \n[doc-have-author]
+.
+. ds doc-document-title-saved "\*[doc-document-title]
+. ds doc-volume-saved "\*[doc-volume]
+. ds doc-section-saved "\*[doc-section]
+. ds doc-operating-system-saved "\*[doc-operating-system]
+. ds doc-date-string-saved "\*[doc-date-string]
+. nr doc-header-space-saved \n[doc-header-space]
+. nr doc-footer-space-saved \n[doc-footer-space]
+. nr doc-display-vertical-saved \n[doc-display-vertical]
+. ds doc-header-string-saved "\*[doc-header-string]
+. nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
+. nr doc-in-files-section-saved \n[doc-in-files-section]
+. nr doc-in-authors-section-saved \n[doc-in-authors-section]
+..
+.
+.
+.\" NS doc-restore-global-vars macro
+.\" NS restore all global variables
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-drgv
+.
+.de doc-restore-global-vars
+. ds doc-macro-name "\*[doc-macro-name-saved]
+. nr doc-arg-limit \n[doc-arg-limit-saved]
+. nr doc-num-args \n[doc-num-args-saved]
+. nr doc-arg-ptr \n[doc-arg-ptr-saved]
+.
+. nr doc-reg-drgv 1
+. while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
+. ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
+. nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
+. ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
+. nr doc-reg-drgv +1
+. \}
+.
+. nr doc-curr-font \n[doc-curr-font-saved]
+. nr doc-curr-size \n[doc-curr-size-saved]
+. nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
+. nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
+. nr doc-have-decl \n[doc-have-decl-saved]
+. nr doc-have-var \n[doc-have-var-saved]
+. ds doc-command-name "\*[doc-command-name-saved]
+. ds doc-quote-left "\*[doc-quote-left-saved]
+. ds doc-quote-right "\*[doc-quote-right-saved]
+. nr doc-nesting-level \n[doc-nesting-level-saved]
+. nr doc-in-list \n[doc-in-list-saved]
+. ds doc-space "\*[doc-space-saved]
+. ds doc-saved-space "\*[doc-saved-space-saved]
+. nr doc-space-mode \n[doc-space-mode-saved]
+. nr doc-have-space \n[doc-have-space-saved]
+. nr doc-have-slot \n[doc-have-slot-saved]
+. nr doc-keep-type \n[doc-keep-type-saved]
+. nr doc-display-depth \n[doc-display-depth-saved]
+. nr doc-is-compact \n[doc-is-compact-saved]
+.
+. nr doc-reg-drgv 0
+. while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
+. ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
+. nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
+. nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
+. nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
+. nr doc-reg-drgv +1
+. \}
+.
+. nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
+.
+. nr doc-reg-drgv 1
+. while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
+. nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
+. nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
+. nr doc-reg-drgv +1
+. \}
+.
+. nr doc-list-depth \n[doc-list-depth-saved]
+.
+. nr doc-reg-drgv 1
+. while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
+. ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
+. nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
+. nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
+. ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
+. ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
+. nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
+. nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
+. nr doc-reg-drgv +1
+. \}
+.
+. nr doc-have-indent \n[doc-have-indent-saved]
+. ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
+. nr doc-curr-type \n[doc-curr-type-saved]
+. ds doc-curr-arg "\*[doc-curr-arg-saved]
+. nr doc-have-diag-list \n[doc-have-diag-list-saved]
+. nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
+. nr doc-num-columns \n[doc-num-columns-saved]
+. nr doc-next-list-depth \n[doc-next-list-depth-saved]
+. nr doc-column-indent-width \n[doc-column-indent-width-saved]
+. nr doc-is-func \n[doc-is-func-saved]
+. nr doc-have-old-func \n[doc-have-old-func-saved]
+. nr doc-func-arg-count \n[doc-func-arg-count-saved]
+. ds doc-func-arg "\*[doc-func-arg-saved]
+. nr doc-num-func-args \n[doc-num-func-args-saved]
+. nr doc-func-args-processed \n[doc-func-args-processed-saved]
+. nr doc-have-func \n[doc-have-func-saved]
+. nr doc-is-reference \n[doc-is-reference-saved]
+. nr doc-reference-count \n[doc-reference-count-saved]
+. nr doc-author-count \n[doc-author-count-saved]
+.
+. nr doc-reg-drgv 0
+. while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
+. ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
+. nr doc-reg-drgv +1
+. \}
+.
+. nr doc-book-count \n[doc-book-count-saved]
+. ds doc-book-name "\*[doc-book-name-saved]
+. nr doc-date-count \n[doc-date-count-saved]
+. ds doc-date "\*[doc-date-saved]
+. nr doc-publisher-count \n[doc-publisher-count-saved]
+. ds doc-publisher-name "\*[doc-publisher-name-saved]
+. nr doc-journal-count \n[doc-journal-count-saved]
+. ds doc-journal-name "\*[doc-journal-name-saved]
+. nr doc-issue-count \n[doc-issue-count-saved]
+. ds doc-issue-name "\*[doc-issue-name-saved]
+. nr doc-optional-count \n[doc-optional-count-saved]
+. ds doc-optional-string "\*[doc-optional-string-saved]
+. nr doc-page-number-count \n[doc-page-number-count-saved]
+. ds doc-page-number-string "\*[doc-page-number-string-saved]
+. nr doc-corporate-count \n[doc-corporate-count-saved]
+. ds doc-corporate-name "\*[doc-corporate-name-saved]
+. nr doc-report-count \n[doc-report-count-saved]
+. ds doc-report-name "\*[doc-report-name-saved]
+. nr doc-reference-title-count \n[doc-reference-title-count-saved]
+. ds doc-reference-title-name "\*[doc-reference-title-name-saved]
+. ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
+. nr doc-volume-count \n[doc-volume-count-saved]
+. ds doc-volume-name "\*[doc-volume-name-saved]
+. nr doc-have-author \n[doc-have-author-saved]
+.
+. ds doc-document-title "\*[doc-document-title-saved]
+. ds doc-volume "\*[doc-volume-saved]
+. ds doc-section "\*[doc-section-saved]
+. ds doc-operating-system "\*[doc-operating-system-saved]
+. ds doc-date-string "\*[doc-date-string-saved]
+. nr doc-header-space \n[doc-header-space-saved]
+. nr doc-footer-space \n[doc-footer-space-saved]
+. nr doc-display-vertical \n[doc-display-vertical-saved]
+. ds doc-header-string "\*[doc-header-string-saved]
+. nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
+. nr doc-in-files-section \n[doc-in-files-section-saved]
+. nr doc-in-authors-section \n[doc-in-authors-section-saved]
+..
+.
+.
+.\" NS El user macro
+.\" NS end list
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-diag-list
+.\" NS doc-list-depth
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variables:
+.\" NS doc-str-El
+.\" NS
+.\" NS width register `El' set in doc-common
+.
.de El
-.ie \\n(.$>0 \{\
-. tm Usage: .El (#\\n(.c)
-.\}
-.el \{\
-. ds mN El
-. nr iD 0
-. if "\\*(L\\n(lC"cL" \{\
-. nr iD 1
-. cC
-. \}
-. if "\\*(L\\n(lC"nU" \{\
-. nr nU 0
-. \}
-. if \\n(mL>0 \{\
-. nr iD 1
-. nr mL 0
-. tZ
-. nr lC \\n(lC-1
-. tY
-. \}
-. if "\\*(L\\n(lC"iT" \{\
-' in \\n(.iu-\\n(o\\n(lCu
-. tZ
-. nr lC \\n(lC-1
-. tY
-. nr iD 1
-. \}
-. if "\\*(L\\n(lC"oL" \{\
-' in \\n(.iu-\\n(o\\n(lCu
-. tZ
-. nr lC \\n(lC-1
-. tY
-. nr iD 1
-. \}
-. if "\\*(L\\n(lC"lL" \{\
-' in \\n(.iu-\\n(o\\n(lCu
-. tZ
-. nr lC \\n(lC-1
-. tY
-. nr iD 1
-. \}
-. if \\n(iD==0 \{\
-. lE
-. \}
-. br
-. nr iD 0
-.\}
-..
-.\" NS It macro - list item
-.\" NS iD local register
-.\" NS aA save pA font string for section FILES (no underline if nroff)
+. if \n[.$] \{\
+. tm Usage: .El (does not take arguments) (#\n[.c])
+. return
+. \}
+.
+. ds doc-macro-name El
+. ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
+.
+. ie "\*[doc-str-El]"diag-list" \{\
+. nr doc-have-diag-list 0
+. doc-end-list 0
+. \}
+. el \{ .ie "\*[doc-str-El]"column-list" \
+. doc-end-column-list
+. el \{ .ie "\*[doc-str-El]"item-list" \
+. doc-end-list 0
+. el \{ .ie "\*[doc-str-El]"ohang-list" \
+. doc-end-list 0
+. el \{ .ie "\*[doc-str-El]"inset-list" \
+. doc-end-list 0
+. el \
+. doc-end-list 1
+. \}\}\}\}
+.
+. br
+..
+.
+.
+.\" NS doc-saved-Pa-font global string
+.\" NS saved doc-Pa-font string for section FILES (no underline if
+.\" NS nroff)
+.
+.ds doc-saved-Pa-font
+.
+.
+.\" NS doc-curr-type global register
+.\" NS current argument type
+.
+.nr doc-curr-type 0
+.
+.
+.\" NS doc-curr-arg global string
+.\" NS current argument
+.
+.ds doc-curr-arg
+.
+.
+.\" NS doc-item-boxXXX global box
+.\" NS item boxes associated list depth
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.
+.\" NS It user macro
+.\" NS list item
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-curr-arg
+.\" NS doc-curr-type
+.\" NS doc-in-list
+.\" NS doc-macro-name
+.\" NS doc-num-args
+.\" NS doc-saved-Pa-font
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-It
+.\" NS doc-str-It
+.\" NS doc-XXX-list-type
+.\" NS
+.\" NS width register `It' set in doc-common
+.
+.nr doc-bullet-list-type 1
+.nr doc-column-list-type 0
+.nr doc-dash-list-type 1
+.nr doc-diag-list-type 0
+.nr doc-enum-list-type 1
+.nr doc-hang-list-type 2
+.nr doc-inset-list-type 2
+.nr doc-item-list-type 1
+.nr doc-ohang-list-type 2
+.nr doc-tag-list-type 2
+.
.de It
-.if "\\*(L\\n(lC"" \{\
-. tm Usage .Bl -list-type [-width [string] | -compact | -offset [string]] (#\\n(.c)
-. tm .It \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-.\}
-.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
-.ne 3v
-.ie \\n(.$>0 \{\
-. ds mN It
-. ds b1
-. nr iD 0
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. if "\\*(L\\n(lC"mL" \{\
-. nr iD 1
-. nr aP 0
-. aX
-. \\*(L\\n(lC
-. \}
-. if "\\*(L\\n(lC"cL" \{\
-. ds b1
-. nr aP 0
-. nr iD 1
-. \\*(L\\n(lC
-. \}
-. if "\\*(L\\n(lC"iT" \{\
-. nr aP 0
-. nr iD 1
-. \\*(L\\n(lC
-. \}
-. if \\n(iD==0 \{\
-. fV
-.\" tm ------------------------------------------------------------------------
-.\" tm It list-type==\\*(L\\n(lC, aP==\\n(aP
-.\" tm It beg arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
-. nr oM \\n(oM+1
-. nr tP 1
-. nr aP \\n(aP+1
-. nr tX \\n(C\\n(aP
-. ds tX \\*(A\\n(aP
-. if \\n(nF==1 \{\
-. ds aA \\*(pA
-. if n .ds pA \\*(nO
-. \}
-. ie \\n(C\\n(aP==1 \{\
-. \\*(A\\n(aP
-. \}
-. el \{\
-. nr aP \\n(aP-1
-. No
-. \}
-.\" tm in It here is b1==\\*(b1
-.\" tm It mid arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
-. ie \\n(Xt==1 .ds xB \&\\*(L\\n(lC
-. el .\\*(L\\n(lC
-. \}
-. nr iD 0
-.\}
-.el .\\*(L\\n(lC
-..
-.\" NS lL macro - .It item of list-type inset
-.de lL
-.lY
-.br
-\&\\*(b1
-.nr oM \\n(oM-1
-.nr tP 0
-.ds b1
-.aY
-'fi
-..
-.\" NS hL macro - .It item of list-type hanging label (as opposed to tagged)
-.de hL
-.lX
-.nr bb \\n(w\\n(lCu+\\n(lSu
-.ti -\\n(bbu
-.ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
-.el \&\\*(b1\h'|\\n(bbu'\c
-.nr oM \\n(oM-1
-.ds b1
-.nr tP 0
-.aY
-'fi
-..
-.\" NS oL macro - .It item of list-type overhanging label
-.de oL
-.lY
-\&\\*(b1
-.br
-.nr oM \\n(oM-1
-.ds b1
-.nr tP 0
-.aY
-'fi
-..
-.\" NS iT macro - .It item of list-type [empty label]
-.de iT
-.lY
-.br
-.\" .ds b1
-.aY
-'fi
-..
-.\" NS nU macro - Enumerated list
-.\" NS nU register count
-.\" NS hU macro - Hyphen paragraph list (sub bullet list)
-.\" NS bU macro - Bullet paragraph list
-.de nU
-.nr oM \\n(oM+1
-.nr nU \\n(nU+1
-.ds b1 \&\\n(nU.
-.uL
-..
-.de bU
-.nr oM \\n(oM+1
-.nr bU \\n(bU+1
-.ds b1 \&\\*(sY\&\(bu\fP
-.uL
-..
-.de hU
-.nr oM \\n(oM+1
-.nr bU \\n(bU+1
-.ds b1 \&\\*(sY\&\-\fP
-.uL
-..
-.\" NS uL macro - .It item of list-type enum/bullet/hyphen
-.de uL
-.lX
-.nr bb \\n(w\\n(lCu+\\n(lSu
-.ti -\\n(bbu
-.ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
-.el \&\\*(b1\h'|\\n(bbu'\c
-.nr oM \\n(oM-1
-.\" .nr dZ \\n(dZ+1
-.ds b1
-.nr tP 0
-.aY
-'fi
-..
-.\" NS mL macro - .It item of list-type diagnostic-message
-.de mL
-.nr cF \\n(.f
-.nr cZ \\n(.s
-.ie \\n(mL==1 \{\
-. nr zB \\n(.c
-. ie (\\n(zB-\\n(zA)>1 .Pp
-. el .br
-. nr zA \\n(zB
-. nr zB 0
-.\}
-.el \{\
-. nr zA \\n(.c
-. br
-.\}
-\&\\*(sY\\*(b1\f\\n(cF\s\\n(cZ\\*(lS\c
-.aY
-.ds b1
-'fi
-..
-.\" NS tL macro - .It item of list-type "tag"
-.de tL
-.\" tm in tL here is b1==\\*(b1
-.if \\n(tW==0 .lW
-.lX
-.nr bb \\n(w\\n(lCu+\\n(lSu
-.ti -\\n(bbu
-.ie (\w\\*(b1u)>(\\n(w\\n(lCu) \{\&\\*(b1
-. br
-.\}
-.el \&\\*(b1\h'|\\n(bbu'\c
-.if \\n(nF==1 \{\
-. if n .ds pA \\*(aA
-.\}
-.nr oM \\n(oM-1
-.nr tP 0
-.\" .nr dZ \\n(dZ+1
-.ds b1
-.aY
-'fi
-..
-.\" NS lW macro - resolve unknown label/tag width (if .Bl [inset | tag] only)
-.de lW
-.if !"TagwidtH"\\*(t\\n(lC" \{\
-. ie \\n(tX==1 \{\
-. ds t\\n(lN \\*(tX
-. nr w\\n(lN \\n(\\*(tX
-. \}
-. el \{\
-. ds t\\n(lN No
-. nr w\\n(lN \\n(No
-. \}
-. if !"\\*(t\\n(lC"\\*(t\\n(lN" .nr tC 1
-.\}
-..
-.\" NS lX macro - set up vertical spacing (if compact) and offset+indent (all)
-.de lX
-.ie \\n(tC \{\
-. nr tC 0
-. nr tW 0
-. if \\n(v\\n(lC==0 .sp \\n(dVu
-. in \\n(.iu+\\n(w\\n(lCu+\\n(o\\n(lCu+\\n(lSu
-.\}
-.el \{\
-. ie \\n(v\\n(lC==1 \{\
-. nr aa 0
-. \}
-. el \{\
-. sp \\n(dVu
-. \}
-.\}
-.if !\\n(cR .ne 2v
-..
-.\" NS lY macro - set up vertical spacing (if compact) and offset+indent (all)
-.de lY
-.ie \\n(tC \{\
-. nr tC 0
-. nr tW 0
-. if \\n(v\\n(lC==0 .sp \\n(dVu
-. in \\n(.iu+\\n(o\\n(lCu
-.\}
-.el \{\
-. ie \\n(v\\n(lC==1 \{\
-. nr aa 0
-. \}
-. el \{\
-. sp \\n(dVu
-. \}
-.\}
-.if !\\n(cR .ne 2v
-..
-.\" NS tS temporary string
-.\" NS hL macro - hanging list function
-.\" NS lT macro - tagged list function
-.\" NS lE macro - list end function
-.\" NS tX string (initial string)
-.\" NS tX register (initial class)
-.\" NS tC parameter change flag
-.\" NS Xt save current list-type flag
-.\" NS lC register - list type stack counter
-.\" NS tP register tag flag (for diversions)
-.\" NS w[0-9] register tag stack (nested tags)
-.\" NS t[0-9] register tag string stack (nested tags)
-.\" NS o[0-9] register offset stack (nested tags)
-.\" NS v[0-9] register vertical tag break stack
-.\" NS h[0-9] register horizontal tag stack (continuous if 1, break if 0)
-.nr lC 0
-.nr wV 0
-.nr w1 0
-.nr o1 0
-.nr v1 0
-.nr h1 0
-.ds t\n(lC
-.de lE
-.\" IN lC o[\\n(lC]==\\n(o\\n(lC, w[\\n(lC]==\\n(w\\n(lC,
-.ie \\n(o\\n(lC>0 \{\
-' in \\n(.iu-(\\n(w\\n(lCu)-(\\n(o\\n(lCu)-\\n(lSu
-. rr o\\n(lC
-.\}
-.el 'in \\n(.iu-\\n(w\\n(lCu-\\n(lSu
-.if \\n(lC<=0 .tm Extraneous .El call (#\\n(.c)
-.tZ
-.nr lC \\n(lC-1
-.tY
-..
-.\" NS tY macro - set up next block for list
-.\" NS tZ macro - decrement stack
-.\" NS tY register (next possible lC value)
-.de tY
-.nr tY (\\n(lC+1)
-.nr w\\n(tY 0
-.nr h\\n(tY 0
-.nr o\\n(tY 0
-.ds t\\n(tY \\*(t\\n(lC
-.ds L\\n(tY
-.nr v\\n(tY 0
-..
-.de tZ
-.rm L\\n(tY
-.rr w\\n(tY
-.rr h\\n(tY
-.rr o\\n(tY
-.rm t\\n(tY
-.rr v\\n(tY
-.nr tY \\n(tY-1
-..
-.\" initial values
-.nr w1 0
-.nr o1 0
-.nr h1 0
-.ds t1
-.nr v1 0
-.nr tY 1
-.\" NS Xr macro - cross reference (man page only)
+. ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
+.
+. if "\*[doc-str-It]"" \
+. tm mdoc error: .It without preceding .Bl (#\n[.c])
+.
+. if \n[doc-nesting-level] \{\
+. tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
+. tm1 " (#\n[.c])
+. \}
+.
+. br
+. if !\n[cR] \
+. ne 3v
+.
+. if \n[.$] \{\
+. ds doc-macro-name It
+.
+. \" fill argument vector
+. nr doc-reg-It 1
+. while (\n[doc-reg-It] <= \n[.$]) \{\
+. ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
+. nr doc-reg-It +1
+. \}
+.
+. nr doc-num-args \n[.$]
+. nr doc-arg-ptr 0
+. \}
+.
+. nr doc-reg-It \n[doc-\*[doc-str-It]-type]
+.
+. if \n[doc-reg-It] \{\
+. \" start item box
+. box doc-item-box\n[doc-list-depth]
+. ev doc-item-env\n[doc-list-depth]
+. evc 0
+. in 0
+. nf
+. \}
+.
+. ie (\n[doc-reg-It] == 1) \{\
+. if \n[.$] \{\
+. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
+. tm1 " don't take arguments (#\n[.c])
+. \}\}
+. el \{\
+. ie \n[.$] \{\
+. if (\n[doc-reg-It] == 2) \{\
+. \" handle list types with arguments
+. doc-parse-arg-vector
+.
+. nr doc-in-list 1
+. nr doc-arg-ptr 1
+. nr doc-curr-type \n[doc-type1]
+. ds doc-curr-arg "\*[doc-arg1]
+.
+. if \n[doc-in-files-section] \{\
+. ds doc-saved-Pa-font "\*[doc-Pa-font]
+. if n \
+. ds doc-Pa-font "\*[doc-No-font]
+. \}
+.
+. ie (\n[doc-type1] == 1) \
+. \*[doc-arg1]
+. el \{\
+. nr doc-arg-ptr 1
+. doc-print-recursive
+. \}\}\}
+. el \{\
+. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
+. tm1 " require arguments (#\n[.c])
+. \}
+. \}
+.
+. \" the previous call of `.doc-print-recursive' can contain calls to
+. \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
+. if !\n[doc-nesting-level] \
+. doc-\*[doc-str-It]
+..
+.
+.
+.\" NS doc-inset-list macro
+.\" NS .It item of list-type inset
+.\" NS
+.\" NS modifies:
+.\" NS doc-in-list
+.
+.de doc-inset-list
+. \" finish item box
+. br
+. ev
+. box
+. unformat doc-item-box\n[doc-list-depth]
+.
+. doc-set-vertical-and-indent 0
+. br
+.
+. nh
+. doc-item-box\n[doc-list-depth]
+.
+. nr doc-in-list 0
+. doc-reset-args
+..
+.
+.
+.\" NS doc-hang-list macro
+.\" NS .It item of list-type hanging tag (as opposed to tagged)
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-space
+.\" NS doc-in-list
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dhl
+.\" NS doc-reg-dhl1
+.
+.de doc-hang-list
+. \" finish item box
+. br
+. ev
+. box
+. unformat doc-item-box\n[doc-list-depth]
+.
+. doc-set-vertical-and-indent 1
+. nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
+. ti -\n[doc-reg-dhl]u
+.
+. nh
+. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
+. doc-item-box\n[doc-list-depth]
+. el \{\
+. chop doc-item-box\n[doc-list-depth]
+. nr doc-reg-dhl1 \n[.k]u
+. nop \*[doc-item-box\n[doc-list-depth]]\c
+. nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
+. nr doc-have-space 1
+. \}
+.
+. nr doc-in-list 0
+. doc-reset-args
+..
+.
+.
+.\" NS doc-ohang-list macro
+.\" NS .It item of list-type overhanging tag
+.\" NS
+.\" NS modifies:
+.\" NS doc-in-list
+.
+.de doc-ohang-list
+. \" finish item box
+. br
+. ev
+. box
+. unformat doc-item-box\n[doc-list-depth]
+.
+. doc-set-vertical-and-indent 0
+. nh
+. doc-item-box\n[doc-list-depth]
+. br
+.
+. nr doc-in-list 0
+. doc-reset-args
+..
+.
+.
+.\" NS doc-item-list macro
+.\" NS .It item of list-type [empty tag]
+.
+.de doc-item-list
+. \" finish (dummy) item box
+. br
+. ev
+. box
+.
+. doc-set-vertical-and-indent 0
+. br
+.
+. doc-reset-args
+..
+.
+.
+.\" NS doc-enum-list-count-stackXXX global register
+.\" NS stack of current enum count values
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.nr doc-enum-list-count-stack1 0
+.
+.
+.\" NS doc-enum-list macro
+.\" NS enumerated list
+.\" NS
+.\" NS modifies:
+.\" NS doc-enum-list-count-stackXXX
+.\" NS doc-in-list
+.
+.de doc-enum-list
+. nr doc-in-list 1
+. nr doc-enum-list-count-stack\n[doc-list-depth] +1
+\# XXX
+\#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
+\#.rj
+. nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
+. nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
+. doc-do-list
+..
+.
+.
+.\" NS doc-bullet-list macro
+.\" NS bullet paragraph list
+.\" NS
+.\" NS modifies:
+.\" NS doc-in-list
+.
+.de doc-bullet-list
+. nr doc-in-list 1
+. nop \)\*[doc-Sy-font]\[bu]\f[P]
+. doc-do-list
+..
+.
+.
+.\" NS doc-dash-list macro
+.\" NS hyphen paragraph list (sub bullet list)
+.\" NS
+.\" NS modifies:
+.\" NS doc-in-list
+.
+.de doc-dash-list
+. nr doc-in-list 1
+. nop \)\*[doc-Sy-font]\-\f[P]
+. doc-do-list
+..
+.
+.
+.\" NS doc-do-list macro
+.\" NS .It item of list-type enum/bullet/hyphen
+.
+.als doc-do-list doc-hang-list
+.
+.
+.\" NS doc-have-diag-list global register (bool)
+.\" NS set if last item was a diag list
+.
+.\" XXX: this should be modified to handle nested lists of any type
+.
+.nr doc-have-diag-list 0
+.
+.
+.\" NS doc-diag-list-input-line-count global register
+.\" NS saved line number to be checked in next diag-list item
+.
+.nr doc-diag-list-input-line-count 0
+.
+.
+.\" NS doc-diag-list macro
+.\" NS .It item of list-type diagnostic-message
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-diag-list-input-line-count
+.
+.de doc-diag-list
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. ie \n[doc-have-diag-list] \{\
+. ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
+. doc-paragraph
+. el \
+. br
+. \}
+. el \
+. br
+. nr doc-diag-list-input-line-count \n[.c]
+.
+. nh
+. nop \*[doc-Sy-font]\c
+. if \n[doc-num-args] \
+. doc-remaining-args
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
+.
+. doc-print-and-reset
+..
+.
+.
+.\" NS doc-tag-list macro
+.\" NS .It item of list-type `tag'
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-space
+.\" NS doc-in-list
+.\" NS
+.\" NS local variables:
+.\" NS doc-box-dtl
+.\" NS doc-reg-dtl
+.\" NS doc-reg-dtl1
+.
+.de doc-tag-list
+. \" finish item box
+. br
+. ev
+. box
+. unformat doc-item-box\n[doc-list-depth]
+.
+. \" we use a box without `.nf' to compute the tag width (via `dl' register)
+. box doc-box-dtl
+. ev doc-env-dtl
+. evc 0
+. fi
+. ad 0
+. in 0
+. doc-item-box\n[doc-list-depth]
+. br
+. ev
+. box
+.
+. if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \
+. doc-get-tag-width
+. doc-set-vertical-and-indent 1
+. nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
+. ti -\n[doc-reg-dtl]u
+.
+. nh
+. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
+. doc-item-box\n[doc-list-depth]
+. br
+. \}
+. el \{\
+. chop doc-item-box\n[doc-list-depth]
+. nr doc-reg-dtl1 \n[.k]u
+. nop \*[doc-item-box\n[doc-list-depth]]\c
+. nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
+. nr doc-have-space 1
+. \}
+.
+. if \n[doc-in-files-section] \
+. if n \
+. ds doc-Pa-font "\*[doc-saved-Pa-font]
+.
+. nr doc-in-list 0
+. doc-reset-args
+..
+.
+.
+.\" NS doc-get-tag-width macro
+.\" NS resolve unknown tag width (`tag' list-type only)
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-indent
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-tag-width-stackXXX
+.\" NS
+.\" NS requires:
+.\" NS doc-curr-arg
+.\" NS doc-curr-type
+.
+.de doc-get-tag-width
+. ie (\n[doc-curr-type] == 1) \{\
+. ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
+. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
+. \}
+. el \{\
+. ds doc-tag-width-stack\n[doc-list-depth] No
+. nr doc-list-indent-stack\n[doc-list-depth] \n[No]
+. \}
+..
+.
+.
+.\" NS doc-set-vertical-and-indent macro
+.\" NS set up vertical spacing (if not compact) and indentation (with
+.\" NS offset if argument is non-zero)
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-indent
+.
+.de doc-set-vertical-and-indent
+. ie \n[doc-have-indent] \{\
+. nr doc-have-indent 0
+. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
+. sp \n[doc-display-vertical]u
+. in +\n[doc-list-offset-stack\n[doc-list-depth]]u
+. if \$1 \
+. in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
+. \}
+. el \{\
+. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
+. sp \n[doc-display-vertical]u
+. \}
+.
+. if !\n[cR] \
+. ne 2v
+..
+.
+.
+.\" NS doc-list-depth global register
+.\" NS list type stack counter
+.
+.nr doc-list-depth 0
+.
+.
+.\" NS doc-num-columns global register
+.\" NS number of columns
+.
+.nr doc-num-columns 0
+.
+.
+.\" NS doc-compact-list-stackXXX global register (bool)
+.\" NS stack of flags to indicate whether a particular list is compact
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.nr doc-compact-list-stack1 0
+.
+.
+.\" NS doc-tag-prefix-stackXXX global string
+.\" NS stack of tag prefixes (currently used for -nested -enum lists)
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.ds doc-tag-prefix-stack1
+.
+.
+.\" NS doc-tag-width-stackXXX global string
+.\" NS stack of strings indicating how to set up current element of
+.\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
+.\" NS directly; if it is a macro name, use the macro's width value;
+.\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.ds doc-tag-width-stack0
+.ds doc-tag-width-stack1
+.
+.
+.\" NS doc-list-offset-stackXXX global register
+.\" NS stack of list offsets
+.\" NS
+.\" NS limit:
+.\" NS doc-list-depth
+.
+.nr doc-list-offset-stack1 0
+.
+.
+.\" NS doc-end-list macro
+.\" NS list end function; resets indentation (and offset if argument is
+.\" NS non-zero)
+.\" NS
+.\" NS modifies:
+.\" NS doc-list-depth
+.\" NS doc-list-offset-stackXXX
+.
+.de doc-end-list
+. if \$1 \
+' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
+.
+' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
+. nr doc-list-offset-stack\n[doc-list-depth] 0
+.
+. if (\n[doc-list-depth] <= 0) \
+. tm mdoc warning: extraneous .El call (#\n[.c])
+.
+. doc-decrement-list-stack
+. nr doc-list-depth -1
+. doc-increment-list-stack
+..
+.
+.
+.\" NS doc-next-list-depth global register
+.\" NS next possible doc-list-depth value
+.
+.nr doc-next-list-depth 1
+.
+.
+.\" NS doc-increment-list-stack macro
+.\" NS set up next block for list
+.\" NS
+.\" NS modifies:
+.\" NS doc-compact-list-stackXXX
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-list-offset-stackXXX
+.\" NS doc-list-type-stackXXX
+.\" NS doc-next-list-depth
+.\" NS doc-tag-prefix-stackXXX
+.\" NS doc-tag-width-stackXXX
+.\" NS doc-enum-list-count-stackXXX
+.
+.de doc-increment-list-stack
+. nr doc-next-list-depth (\n[doc-list-depth] + 1)
+. nr doc-list-indent-stack\n[doc-next-list-depth] 0
+. nr doc-list-offset-stack\n[doc-next-list-depth] 0
+. ds doc-tag-prefix-stack\n[doc-next-list-depth]
+. ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
+. ds doc-list-type-stack\n[doc-next-list-depth]
+. nr doc-compact-list-stack\n[doc-next-list-depth] 0
+. nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
+..
+.
+.
+.\" NS doc-decrement-list-stack macro
+.\" NS decrement stack
+.\" NS
+.\" NS modifies:
+.\" NS doc-compact-list-stackXXX
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-list-offset-stackXXX
+.\" NS doc-list-type-stackXXX
+.\" NS doc-next-list-depth
+.\" NS doc-tag-prefix-stackXXX
+.\" NS doc-tag-width-stackXXX
+.\" NS doc-enum-list-count-stackXXX
+.
+.de doc-decrement-list-stack
+. ds doc-list-type-stack\n[doc-next-list-depth]
+. nr doc-list-indent-stack\n[doc-next-list-depth] 0
+. nr doc-list-offset-stack\n[doc-next-list-depth] 0
+. ds doc-tag-prefix-stack\n[doc-next-list-depth]
+. ds doc-tag-width-stack\n[doc-next-list-depth]
+. nr doc-compact-list-stack\n[doc-next-list-depth] 0
+. nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
+. nr doc-next-list-depth -1
+..
+.
+.
+.\" NS Xr user macro
+.\" NS cross reference (for man pages only)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Xr
+.\" NS
+.\" NS width register `Xr' set in doc-common
+.
.de Xr
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Xr
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
-. el \{\
-. ie \\n(C\\n(aP>2 .y\\n(C\\n(aP
-. el \{\
-. as b1 \&\\*(xR\\*(A\\n(aP\fP\s0
-. if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. if \\n(C\\n(aP==2 \{\
-. as b1 \&(\\*(A\\n(aP)
-. nr aP \\n(aP+1
-. \}
-. if \\n(aC>=\\n(aP \{\
-. c\\n(C\\n(aP
-. \}
-. \}
-. \}
-. aZ
-. \}
-.\}
-..
-.\" NS Sx macro - cross section reference
-.de Sx
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Sx Usage: .Sx Section Header \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Sx
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. as b1 \\*(sX
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS cC macro - column-list end-list
-.\" NS eW macro - column indent width
-.\" NS cI register - column indent width
-.\" NS W[1-5] macro - establish tabs for list-type column
-.de cC
-'in \\n(.iu-\\n(o\\n(lCu-\\n(w\\n(lCu
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.fi
-.tZ
-.nr lC \\n(lC-1
-.tY
-..
-.de W1
-.ta \w\\*(A1 u
-.nr eW \w\\*(A1 u
-'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.de W2
-.ta \w\\*(A1 u +\w\\*(A2 u
-.nr eW \w\\*(A1 u+\w\\*(A2 u
-'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.de W3
-.ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u
-.nr eW \w\\*(A1 u+\w\\*(A2 u+\w\\*(A3 u
-'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.de W4
-.ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u
-.nr eW \w\\*(A1 u+\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u
-'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.de W5
-.ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u
-.nr eW \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u
-' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.\" This is packed abnormally close, intercol width should be an option
-.de W6
-.ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
-.nr eW \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
-' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
-..
-.\" NS cL macro - column items
-.de cL
-.if \\n(w\\n(lC==0 .nr w\\n(lC \\n(eWu
-.if \\n(.u==0 \{\
-. fi
-' in \\n(.iu+\\n(eWu
-.\}
-.ti -\\n(eWu
-.fV
-.nr aP \\n(aP+1
-.ie \\n(aC>=\\n(aP \{\
-. if "\\*(A\\n(aP"Ta" \{\
-. nr jJ \\n(aP-1
-. rm S\\n(jJ
-. rr jJ
-. \}
-. c\\n(C\\n(aP
-.\}
-.el .tm Usage: .It column_string [Ta [column_string ...] ] (#\\n(.c)
-..
-.\" NS Ta macro - append tab (\t)
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Xr
+. doc-parse-args \$@
+. \}
+. el \
+. doc-Xr-usage
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. \" first argument must be a string
+. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
+.
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
+. nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
+. \" modify second argument if it is a string and
+. \" remove space inbetween
+. if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
+. ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
+. ds doc-space\n[doc-arg-ptr]
+. \}
+. \}
+. doc-print-recursive
+. \}
+. el \
+. doc-Xr-usage
+. \}
+. el \
+. doc-Xr-usage
+..
+.
+.
+.\" NS doc-Xr-usage macro
+.
+.de doc-Xr-usage
+. tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
+. doc-reset-args
+..
+.
+.
+.\" NS Sx user macro
+.\" NS cross section reference
+.\" NS
+.\" NS width register `Sx' set in doc-common
+.
+.als Sx doc-generic-macro
+.ds doc-Sx-usage section_header
+.
+.
+.\" NS doc-end-column-list macro
+.\" NS column-list end-list
+.\" NS
+.\" NS modifies:
+.\" NS doc-list-depth
+.
+.de doc-end-column-list
+. linetabs 0
+' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
+. ta T .5i
+. fi
+. doc-decrement-list-stack
+. nr doc-list-depth -1
+. doc-increment-list-stack
+..
+.
+.
+.\" NS doc-column-indent-width global register
+.\" NS holds the indent width for a column list
+.
+.nr doc-column-indent-width 0
+.
+.
+.\" NS doc-set-column-tab macro
+.\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
+.\" NS
+.\" NS modifies:
+.\" NS doc-column-indent-width
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dsct
+.\" NS doc-str-dsct
+.\" NS doc-str-dsct1
+.
+.de doc-set-column-tab
+. ds doc-str-dsct
+. nr doc-reg-dsct 1
+. nr doc-column-indent-width 0
+.
+. ie (\$1 < 5) \
+. ds doc-str-dsct1 " \"
+. el \{\
+. ie (\$1 == 5) \
+. ds doc-str-dsct1 " \"
+. el \{\
+. \" XXX: this is packed abnormally close -- intercolumn width
+. \" should be configurable
+. ds doc-str-dsct1 " \"
+. \}\}
+.
+. while (\n[doc-reg-dsct] <= \$1) \{\
+. as doc-str-dsct " +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
+. nr doc-column-indent-width +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
+. nr doc-reg-dsct +1
+. \}
+.
+. ta \*[doc-str-dsct]
+' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
+..
+.
+.
+.\" NS doc-column-list macro
+.\" NS column items
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-list-indent-stackXXX
+.\" NS doc-spaceXXX
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dcl
+.
+.de doc-column-list
+. if \n[doc-num-args] \
+. doc-parse-arg-vector
+. nr doc-arg-ptr +1
+.
+. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
+. return
+. \}
+.
+. if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
+. nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
+. ds doc-space\n[doc-reg-dcl]
+. \}
+.
+. if !\n[doc-list-indent-stack\n[doc-list-depth]] \
+. nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
+. if !\n[.u] \{\
+. fi
+' in +\n[doc-column-indent-width]u
+. \}
+. ti -\n[doc-column-indent-width]u
+.
+. doc-do-\n[doc-type\n[doc-arg-ptr]]
+..
+.
+.
+.\" NS Ta user macro
+.\" NS append tab (\t)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS
+.\" NS width register `Ta' set in doc-common
+.
.de Ta
-.ie \\n(aC>0 \{\
-. nr aP \\n(aP+1
-. ie \\n(aC>=\\n(aP \{\
-. if "\\*(A\\n(aP"Ta" \{\
-. nr jJ \\n(aP-1
-. rm S\\n(jJ
-. rr jJ
-. \}
-. as b1 \\t
-. c\\n(C\\n(aP
-. \}
-. el \{\
-. as b1 \\t\\c
-. rm S\\n(aP
-. pB
-. aY
-.\" . ds b1
-. \}
-.\}
-.el \{\
-. tm Usage: Ta must follow column entry: e.g. (#\\n(.c)
-. tm .It column_string [Ta [column_string ...] ]
-.\}
-..
-.\"
-.\" NS Dl macro - display (one line) literal
+. ie \n[doc-arg-limit] \{\
+. nr doc-arg-ptr +1
+. nop \*[doc-tab]\c
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
+. doc-do-\n[doc-type\n[doc-arg-ptr]]
+. el \
+. doc-reset-args
+. \}
+. el \{\
+. tm1 "Usage: Ta must follow column entry: e.g.
+. tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
+. \}
+..
+.
+.
+.\" NS Dl user macro
+.\" NS display (one line) literal
+.\" NS
+.\" NS this function uses the `Li' font
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Dl' set in doc-common
+.
.de Dl
-'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.in \\n(.iu+\\n(Dsu
-.ie \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. tm Usage: .Dl argument ... (#\\n(.c)
-. \}
-. el \{\
-. ds mN Dl
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. Li
-. \}
-.\}
-.el \{\
-. tm Usage: .Dl not callable by other macros (#\\n(.c)
-.\}
-.in \\n(.iu-\\n(Dsu
-..
-.\"
-.\" NS D1 macro - display (one line)
+' ta T .5i
+. in +\n[doc-display-indent]u
+.
+. ie \n[doc-arg-limit] \{\
+. tm Usage: .Dl not callable by other macros (#\n[.c])
+. doc-reset-args
+. \}
+. el \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Dl
+. doc-parse-args \$@
+. nr doc-arg-ptr 1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Li-font]\c
+. doc-print-recursive
+. \}
+. el \
+. tm Usage: .Dl argument ... (#\n[.c])
+. \}
+.
+. in -\n[doc-display-indent]u
+..
+.
+.
+.\" NS D1 user macro
+.\" NS display (one line)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `D1' set in doc-common
+.
.de D1
-'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.in \\n(.iu+\\n(Dsu
-.ie \\n(aC==0 \{\
-. ie \\n(.$==0 \{\
-. tm Usage: .D1 argument ... (#\\n(.c)
-. \}
-. el \{\
-. ds mN D1
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. nr aP \\n(aP+1
-. ie \\n(C\\n(aP==1 .\\*(A\\n(aP
-. el .No
-. \}
-.\}
-.el \{\
-. tm Usage: .D1 not callable by other macros (#\\n(.c)
-.\}
-.in \\n(.iu-\\n(Dsu
-..
-.\" NS Ex macro - DEFUNCT
-.de Ex
-.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\"
-.\" NS Ex macro - DEFUNCT
+' ta T .5i
+. in +\n[doc-display-indent]u
+.
+. ie \n[doc-arg-limit] \{\
+. tm Usage: .D1 not callable by other macros (#\n[.c])
+. doc-reset-args
+. \}
+. el \{\
+. ie \n[.$] \{\
+. ds doc-macro-name D1
+. doc-parse-args \$@
+. nr doc-arg-ptr 1
+. doc-print-recursive
+. \}
+. el \
+. tm Usage: .D1 argument ... (#\n[.c])
+. \}
+.
+. in -\n[doc-display-indent]u
+..
+.
+.
+.\" NS Ex user macro
+.\" NS defunct
+.
.de Ex
-.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\"
-.\" NS Vt macro - Variable type (for forcing old style variable declarations)
-.\" this is not done in the same manner as .Ot for fortrash - clean up later
+. tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
+..
+.
+.
+.\" NS Vt user macro
+.\" NS variable type (for forcing old style variable declarations);
+.\" NS this is not done in the same manner as .Ot for fortrash --
+.\" NS clean up later
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-have-decl
+.\" NS doc-have-var
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Vt' set in doc-common
+.
.de Vt
-.\" if a function declaration was the last thing given, want vertical space
-.if \\n(fD>0 \{\
-. Pp
-. nr fD 0
-.\}
-.\" if a subroutine was the last thing given, want vertical space
-.if \\n(fZ>0 \{\
-. ie \\n(fX==0 \{\
-. Pp
-. rs
-. \}
-. el .br
-.\}
-.nr fX \\n(fX+1
-.nr cF \\n(.f
-.nr cZ \\n(.s
-\\*(fT\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.ie \\n(oT==0 .br
-.el \&\ \&
-.ft \\n(cF
-.fs \\n(cZ
-..
-.\"
-.\" NS Ft macro - Function type
-.nr fZ 0
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Vt
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Vt variable_type ... (#\n[.c])
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. tm Usage: .Vt variable_type ... (#\n[.c])
+. doc-reset-args
+. return
+. \}
+.
+. if \n[doc-in-synopsis-count] \{\
+. \" if a function declaration was the last thing given,
+. \" want vertical space
+. if \n[doc-have-decl] \{\
+. doc-paragraph
+. nr doc-have-decl 0
+. \}
+.
+. \" if a subroutine was the last thing given, want vertical space
+. if \n[doc-have-func] \{\
+. ie \n[doc-have-var] \
+. br
+. el \{\
+. doc-paragraph
+. rs
+. \}\}
+.
+. nr doc-have-var 1
+. \}
+.
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Ft-font]\c
+. doc-print-recursive
+.
+. if \n[doc-in-synopsis-count] \{\
+. ie \n[doc-have-old-func] \
+. nop \*[doc-soft-space]\c
+. el \
+. br
+. \}
+..
+.
+.
+.\" NS doc-is-func global register (bool)
+.\" NS set if subroutine (in synopsis only) (fortran only)
+.
+.nr doc-is-func 0
+.
+.
+.\" NS Ft user macro
+.\" NS function type
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-have-decl
+.\" NS doc-have-var
+.\" NS doc-is-func
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Ft' set in doc-common
+.
.de Ft
-.if \\n(nS>0 \{\
-. if \\n(fZ>0 \{\
-. Pp
-. nr fD 0
-. nr fX 0
-. \}
-. if \\n(fD>0 \{\
-. Pp
-. nr fD 0
-. nr fX 0
-. \}
-. if \\n(fX>0 \{\
-. Pp
-. nr fX 0
-. \}
-. nr fY 1
-.\}
-.nr cF \\n(.f
-.nr cZ \\n(.s
-\&\\*(fT\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.ft \\n(cF
-.fs \\n(cZ
-.\" .br
-..
-.\"
-.\" NS Ot macro - Old Function type (fortran - no newline)
-.\" Ns oT register
-.nr oT 0
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Ft
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Ft function_type ... (#\n[.c])
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. tm Usage: .Ft function_type ... (#\n[.c])
+. doc-reset-args
+. return
+. \}
+.
+. if \n[doc-in-synopsis-count] \{\
+. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
+. doc-paragraph
+. nr doc-have-decl 0
+. nr doc-have-var 0
+. \}
+.
+. if \n[doc-have-var] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. \}
+.
+. nr doc-is-func 1
+. \}
+.
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Ft-font]\c
+. doc-print-recursive
+..
+.
+.
+.\" NS doc-have-old-func global register (bool)
+.\" NS set if `Ot' has been called
+.
+.nr doc-have-old-func 0
+.
+.
+.\" NS Ot user macro
+.\" NS old function type (fortran -- no newline)
+.\" NS
+.\" NS modifies:
+.\" NS doc-have-decl
+.\" NS doc-have-old-func
+.\" NS doc-have-var
+.\" NS doc-is-func
+.\" NS
+.\" NS width register `Ot' set in doc-common
+.
.de Ot
-.nr oT 1
-.if \\n(nS>0 \{\
-. if \\n(fZ>0 \{\
-. Pp
-. nr fD 0
-. nr fX 0
-. \}
-. if \\n(fD>0 \{\
-. Pp
-. nr fD 0
-. nr fX 0
-. \}
-. if \\n(fX>0 \{\
-. Pp
-. nr fX 0
-. \}
-. nr fY 1
-.\}
-.if \\n(.$==4 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3 \\$4
-.if \\n(.$==3 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3
-.if \\n(.$==2 .as b1 \&\\*(fT\&\\$1 \\$2
-.if \\n(.$==1 .as b1 \&\\*(fT\&\\$1
-.as b1 \&\ \fP
-..
-.\"
-.\" NS Fa macro - Function arguments
+. nr doc-have-old-func 1
+.
+. if \n[doc-in-synopsis-count] \{\
+. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
+. doc-paragraph
+. nr doc-have-decl 0
+. nr doc-have-var 0
+. \}
+.
+. if \n[doc-have-var] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. \}
+.
+. nr doc-is-func 1
+. \}
+.
+. if \n[.$] \
+. nop \*[doc-Ft-font]\$*\c
+. nop \ \f[P]\c
+..
+.
+.
+.\" NS Fa user macro
+.\" NS function arguments
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Fa' set in doc-common
+.
.de Fa
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Fa Function Arguments ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Fa
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.ie \\n(fC>0 \{\
-. fC
-.\}
-.el \{\
-. if \\n(aC>\\n(aP \{\
-. as b1 \\*(fA
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-. if \\n(nS>0 \{\
-. if \\n(fZ>0 .br
-. \}
-. \}
-.\}
-..
-.\" NS fC macro - interal .Fa for .FO and .Fc
-.de fC
-.ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-.\" . nr aa \\n(aP
-.\" . if \\n(nS>0 \{\
-. ds Fb
-. nr fB 0
-. nr Fb 0
-. fB \\*(A\\n(aP
-. if \\n(fB>1 \{\
-. rm A\\n(aP
-. rn Fb A\\n(aP
-. \}
-.\" . \}
-. if \\n(fC>1 \{\
-. as b1 \&\f\\n(cF\s\\n(cZ,\\*(S\\n(aP\\*(fA\\*(A\\n(aP\fP\s0
-.\" . as b1 \&\\,\\*(S\\n(aP\fP\s0\\*(fA\\*(A\\n(aP\fP\s0
-. \}
-. if \\n(fC==1 \{\
-. as b1 \&\|\\*(fA\\*(A\\n(aP\fP\s0
-. \}
-. nr fC \\n(fC+1
-. fC
-.\}
-.el \{\
-. aY
-.\}
-..
-.\" NS Fn macro - functions
-.\" NS fY register - dick with old style function declarations (fortran)
-.\" NS fZ register - break a line when more than one function in a synopsis
-.\"
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Fa
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Fa function_arguments ... (#\n[.c])
+. \}
+.
+. ie \n[doc-func-arg-count] \
+. doc-do-func
+. el \{\
+. nr doc-arg-ptr +1
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Fa-font]\c
+. doc-print-recursive
+.
+. if \n[doc-in-synopsis-count] \
+. if \n[doc-have-func] \
+. br
+. \}\}
+..
+.
+.
+.\" NS doc-func-arg-count global register
+.\" NS how many function arguments have been processed so far
+.
+.nr doc-func-arg-count 0
+.
+.
+.\" NS doc-func-arg global string
+.\" NS work buffer for function name strings
+.
+.ds doc-func-arg
+.
+.
+.\" NS doc-num-func-args global register
+.\" NS number of function arguments
+.
+.nr doc-num-func-args 0
+.
+.
+.\" NS doc-func-args-processed global register
+.\" NS function arguments processed so far
+.
+.nr doc-func-args-processed 0
+.
+.
+.\" NS doc-do-func macro
+.\" NS internal .Fa for .Fc
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-func-arg
+.\" NS doc-func-arg-count
+.\" NS doc-func-args-processed
+.\" NS doc-num-func-args
+.
+.de doc-do-func
+. if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
+. doc-reset-args
+. return
+. \}
+.
+. nr doc-arg-ptr +1
+.
+. ds doc-func-arg
+. nr doc-num-func-args 0
+. nr doc-func-args-processed 0
+.
+. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
+. if (\n[doc-num-func-args] > 1) \
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
+.
+. if (\n[doc-func-arg-count] > 1) \{\
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
+. nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
+. \}
+.
+. if (\n[doc-func-arg-count] == 1) \{\
+. nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
+. nop \f[P]\s[0]\c
+. \}
+. nr doc-func-arg-count +1
+. doc-do-func
+..
+.
+.
+.\" NS doc-have-func global register (bool)
+.\" NS whether we have more than one function in synopsis
+.
+.nr doc-have-func 0
+.
+.
+.\" NS Fn user macro
+.\" NS functions
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-have-decl
+.\" NS doc-have-func
+.\" NS doc-have-var
+.\" NS doc-in-synopsis-count
+.\" NS doc-indent-synopsis
+.\" NS doc-is-func
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Fn' set in doc-common
+.
.de Fn
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Fn function_name function_arg(s) ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN Fn
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(nS>0 \{\
-.\" if there is/has been more than one subroutine declaration
-. if \\n(fY==0 \{\
-. if \\n(fZ>0 \{\
-. Pp
-. nr fX 0
-. nr fD 0
-. \}
-. \}
-. if \\n(fY==1 \{\
-. br
-. nr fX 0
-. nr fD 0
-. nr fY 0
-. \}
-. if \\n(fD>0 \{\
-. Pp
-. nr fX 0
-. \}
-. if \\n(fX>0 \{\
-. Pp
-. nr fD 0
-. \}
-. nr fZ \\n(fZ+1
-. nr fY 0
-. rs
-. ie \\n(nS>1 .br
-. el \{\
-. if \\n(iS==0 \{\
-. nr iS ((8)*\\n(fW)u
-. \}
-. \}
-. in +\\n(iSu
-. ti -\\n(iSu
-. nr nS \\n(nS+1
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
-. ie \\n(aC>\\n(aP \{\
-. as b1 \\*(fA
-. nr aP \\n(aP+1
-. f\\n(C\\n(aP
-. \}
-. el \{\
-. as b1 \|\\*(rp
-. aZ
-. \}
-. if \\n(nS>0 \{\
-. in -\\n(iSu
-. \}
-.\}
-..
-.\"
-.\" NS f1 macro - class switch
-.\" NS f2 macro - handle function arguments
-.\" NS f3 macro - punctuation
-.\" NS f4 macro - write out function
-.de f1
-.as b1 \\*(rp\f\\n(cF\s\\n(cZ
-.\\*(A\\n(aP
-..
-.de f2
-.if \\n(nS>0 \{\
-. ds Fb
-. nr fB 0
-. nr Fb 0
-. fB \\*(A\\n(aP
-. if \\n(fB>1 \{\
-. rm A\\n(aP
-. rn Fb A\\n(aP
-. \}
-.\}
-.as b1 \\*(A\\n(aP
-.ie \\n(aC>\\n(aP \{\
-. nr aa \\n(aP
-. nr aP \\n(aP+1
-. if \\n(C\\n(aP==2 \{\
-. as b1 \&\|\f\\n(cF\s\\n(cZ,\\*(S\\n(aa\fP\s0\|
-. \}
-. f\\n(C\\n(aP
-.\}
-.el \{\
-. as b1 \\*(rp\f\\n(cF\s\\n(cZ
-. aZ
-.\}
-..
-.de f3
-.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(A\\n(aP
-.ie \\n(aC>\\n(aP \{\
-. No
-.\}
-.el .aZ
-..
-.de f4
-.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(S\\n(aP\\*(A\\n(aP
-.ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. No
-.\}
-.el .aZ
-..
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Fn
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
+. \}
+.
+. if \n[doc-in-synopsis-count] \{\
+. \" if there is/has been more than one subroutine declaration
+. ie \n[doc-is-func] \{\
+. br
+. nr doc-have-var 0
+. nr doc-have-decl 0
+. nr doc-is-func 0
+. \}
+. el \{\
+. if \n[doc-have-func] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. nr doc-have-decl 0
+. \}\}
+.
+. if \n[doc-have-decl] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. \}
+.
+. if \n[doc-have-var] \{\
+. doc-paragraph
+. nr doc-have-decl 0
+. \}
+.
+. nr doc-have-func 1
+. nr doc-is-func 0
+. rs
+.
+. ie (\n[doc-in-synopsis-count] > 1) \
+. br
+. el \{\
+. if !\n[doc-indent-synopsis] \
+. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
+. \}
+.
+. in +\n[doc-indent-synopsis]u
+. ti -\n[doc-indent-synopsis]u
+. nr doc-in-synopsis-count +1
+. \}
+.
+. if !\n[doc-arg-limit] \
+. return
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
+. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
+. doc-reset-args
+. return
+. \}
+.
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
+. nop \f[P]\s[0]\*[lp]\)\c
+.
+. nr doc-arg-ptr +1
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. nop \*[doc-Fa-font]\c
+. doc-do-func-args
+. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. \}\}
+.
+. nop \)\*[rp]\)\c
+.
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. \" output the space (if needed)
+. nr doc-arg-ptr -1
+. nop \)\*[doc-space\n[doc-arg-ptr]]\c
+. nr doc-arg-ptr +1
+.
+. doc-print-recursive
+. \}
+. el \
+. doc-print-and-reset
+.
+. if \n[doc-in-synopsis-count] \
+. in -\n[doc-indent-synopsis]u
+..
+.
+.
+.\" NS doc-do-func-args macro
+.\" NS handle function arguments
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-argXXX
+.\" NS doc-func-arg
+.\" NS doc-func-args-processed
+.\" NS doc-num-func-args
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-ddfa
+.
+.de doc-do-func-args
+. if \n[doc-in-synopsis-count] \{\
+. ds doc-func-arg
+. nr doc-num-func-args 0
+. nr doc-func-args-processed 0
+.
+. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
+. if (\n[doc-num-func-args] > 1) \
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
+. \}
+.
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
+. nr doc-arg-ptr +1
+.
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
+. nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
+. nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
+. nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
+. doc-do-func-args
+. \}\}
+..
+.
+.
+.\" NS doc-saved-nesting-level global register
+.
+.nr doc-saved-nesting-level 0
+.
+.
+.\" NS doc-in-func-enclosure global register (bool)
+.
+.nr doc-in-func-enclosure 0
+.
+.
+.\" NS Fo user macro
+.\" NS function open
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-func-arg-count
+.\" NS doc-have-decl
+.\" NS doc-have-func
+.\" NS doc-have-var
+.\" NS doc-in-func-enclosure
+.\" NS doc-in-synopsis-count
+.\" NS doc-indent-synopsis
+.\" NS doc-is-func
+.\" NS doc-macro-name
+.\" NS doc-saved-nesting-level
+.\" NS
+.\" NS width register `Fo' set in doc-common
+.
.de Fo
-.hy 0
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .Fo function_name
-. el \{\
-. ds mN Fo
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(nS>0 \{\
-.\" if there is/has been more than one subroutine declaration
-. if \\n(fY==0 \{\
-. if \\n(fZ>0 \{\
-. Pp
-. nr fX 0
-. nr fD 0
-. \}
-. \}
-. if \\n(fY==1 \{\
-. br
-. nr fX 0
-. nr fD 0
-. nr fY 0
-. \}
-. if \\n(fD>0 \{\
-. Pp
-. nr fX 0
-. \}
-. if \\n(fX>0 \{\
-. Pp
-. nr fD 0
-. \}
-. nr fZ \\n(fZ+1
-. nr fY 0
-. rs
-. ie \\n(nS>1 .br
-. el \{\
-. if \\n(iS==0 \{\
-. nr iS ((8)*\\n(fW)u
-. \}
-. \}
-. in +\\n(iSu
-. ti -\\n(iSu
-. nr nS \\n(nS+1
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr oM \\n(oM+1
-. nr fC 1
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
-. aY
-.\}
-..
+. if (\n[doc-in-func-enclosure]) \{\
+. tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
+. return
+. \}
+.
+. nr doc-saved-nesting-level \n[doc-nesting-level]
+. nr doc-in-func-enclosure 1
+.
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ds doc-macro-name Fo
+. doc-parse-args \$@
+. \}
+. el \
+. tm Usage: .Fo function_name (#\n[.c])
+. \}
+.
+. if \n[doc-in-synopsis-count] \{\
+. \" if there is/has been more than one subroutine declaration
+. ie \n[doc-is-func] \{\
+. br
+. nr doc-have-var 0
+. nr doc-have-decl 0
+. nr doc-is-func 0
+. \}
+. el \{\
+. if \n[doc-have-func] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. nr doc-have-decl 0
+. \}\}
+.
+. if \n[doc-have-decl] \{\
+. doc-paragraph
+. nr doc-have-var 0
+. \}
+.
+. if \n[doc-have-var] \{\
+. doc-paragraph
+. nr doc-have-decl 0
+. \}
+.
+. nr doc-have-func 1
+. nr doc-is-func 0
+. rs
+.
+. ie (\n[doc-in-synopsis-count] > 1) \
+. br
+. el \{\
+. if !\n[doc-indent-synopsis] \
+. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
+. \}
+.
+. nr doc-in-synopsis-count +1
+. \}
+.
+. \" start function box
+. box doc-func-box
+. ev doc-func-env
+. evc 0
+. in 0
+. nf
+.
+. nr doc-arg-ptr +1
+. doc-print-prefixes
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-func-arg-count 1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
+. nop \f[P]\s[0]\*[lp]\)\c
+. doc-reset-args
+. \}
+..
+.
+.
+.\" NS Fc user macro
+.\" NS function close
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-func-arg-count
+.\" NS doc-in-func-enclosure
+.\" NS doc-saved-nesting-level
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `Fc' set in doc-common
+.
.de Fc
-.if \\n(aC==0 \{\
-. if \\n(.$>0 \{\
-. ds mN Fo
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.nr fC 0
-.nr oM \\n(oM-1
-.as b1 \|\\*(rp
-.ie \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. \\*(A\\n(aP
-.\}
-.el \{\
-. aZ
-.\}
-.if \\n(nS>0 \{\
-. in -\\n(iSu
-.\}
-.hy
-..
-.\" NS fb macro - if SYNOPSIS, set hard space inbetween function args
-.\" NS fb register - count of words in a function argument
-.\" NS Fb register - counter
-.\" NS Fb string - temporary string
-.de fB
-.\" .tm fB==\\n(fB, Fb==\\n(Fb, 1==\\$1 2==\\$2 3==\\$3 4==\\$4 5==\\$5 6==\\$6
-.if \\n(fB==0 \{\
-. nr fB \\n(.$
-. nr Fb 0
-. ds Fb
-.\}
-.nr Fb \\n(Fb+1
-.as Fb \&\\$1
-.if \\n(Fb<\\n(fB \{\
-. as Fb \&\\*(hV
-. fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-..
-.\" NS Fc - Function close - not implemented yet
-.\" NS Fo - Function open - not implemented yet
-.\"
-.\" Very crude references, stash all reference info into strings (usual
-.\" use of b1 buffer, then b1 contents copied to string of retrievable
-.\" naming convention), print out reference on .Re request and clean up.
-.\" Ordering very limited, no fancy citations, but can do articles, journals
-.\" and books - need to add several missing options (like city etc).
-.\" should be able to grab a refer entry, massage it a wee bit (prefix
-.\" a `.' to the %[A-Z]) and not worry (ha!)
-.\"
-.\" NS Rs macro - Reference Start
-.\" NS rS register - Reference Start flag
-.\" NS rS string - Reference Start buffer name for next save (of b1 buffer)
+. if !\n[doc-in-func-enclosure] \{\
+. tm mdoc warning: Extraneous .Fc (#\n[.c])
+. return
+. \}
+.
+. if \n[.$] \{\
+. ds doc-macro-name Fc
+. \" the first (dummy) argument is used to get the correct spacing
+. doc-parse-args \) \$@
+. \}
+.
+. if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
+. tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
+.
+. nr doc-func-arg-count 0
+. nr doc-in-func-enclosure 0
+.
+. nop \|\*[rp]\)
+.
+. \" finish function box
+. br
+. ev
+. box
+. chop doc-func-box
+. unformat doc-func-box
+.
+. if \n[doc-in-synopsis-count] \{\
+. in +\n[doc-indent-synopsis]u
+. ti -\n[doc-indent-synopsis]u
+. \}
+.
+. nh
+. nop \*[doc-func-box]\c
+.
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. doc-print-recursive
+. \}
+. el \
+. doc-print-and-reset
+.
+. if \n[doc-in-synopsis-count] \
+. in -\n[doc-indent-synopsis]u
+..
+.
+.
+.\" NS doc-build-func-string macro
+.\" NS collect function arguments and set hard spaces inbetween
+.\" NS
+.\" NS modifies:
+.\" NS doc-func-arg
+.\" NS doc-func-args-processed
+.\" NS doc-num-func-args
+.
+.de doc-build-func-string
+. if !\n[doc-num-func-args] \{\
+. nr doc-num-func-args \n[.$]
+. nr doc-func-args-processed 0
+. ds doc-func-arg
+. \}
+.
+. nr doc-func-args-processed +1
+. as doc-func-arg "\$1
+.
+. if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
+. as doc-func-arg "\*[doc-hard-space]
+.
+. shift
+. doc-build-func-string \$@
+. \}
+..
+.
+.
+.\" Very crude references: Stash all reference info into boxes, print out
+.\" reference on .Re request and clean up. Ordering very limited, no fancy
+.\" citations, but can do articles, journals, and books -- need to add
+.\" several missing options (like city etc). Should be able to grab a refer
+.\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
+.\" (ha!).
+.
+.
+.\" NS doc-is-reference global register (bool)
+.\" NS set if in reference
+.
+.nr doc-is-reference 0
+.
+.
+.\" NS doc-reference-count global register
+.\" NS reference element counter
+.
+.nr doc-reference-count 0
+.
+.
+.\" NS Rs user macro
+.\" NS reference start
+.\" NS
+.\" NS modifies:
+.\" NS doc-is-reference
+.\" NS doc-reference-count
+.\" NS
+.\" NS width register `Rs' set in doc-common
+.
.de Rs
-.nr rS 1
-.rC
-.if \\n(nA==1 .Pp
-.nr Kl 0
-..
-.\" NS Re macro - Reference End
+. ie \n[.$] \
+. tm Usage: .Rs (does not take arguments) (#\n[.c])
+. el \{\
+. nr doc-is-reference 1
+. doc-reset-reference
+. if \n[doc-in-see-also-section] \
+. doc-paragraph
+. nr doc-reference-count 0
+. \}
+..
+.
+.
+.\" NS Re user macro
+.\" NS reference end
+.\" NS
+.\" NS modifies:
+.\" NS doc-is-reference
+.\" NS
+.\" NS width register `Re' set in doc-common
+.
.de Re
-.rZ
-.rC
-.nr rS 0
-..
-.\" NS rC macro - reference cleanup
-.de rC
-.nr uK 0
-.nr jK 0
-.nr nK 0
-.nr oK 0
-.nr qK 0
-.nr rK 0
-.nr tK 0
-.nr vK 0
-.nr dK 0
-.nr pK 0
-.nr bK 0
-.ds rS
-.rm U1 U2 U3 U4 U5 U6 U7 U8
-.rm uK jK nK oK rK qK tK vK dK pK bK
-..
-.\" NS rZ macro - reference print
-.de rZ
-.if \\n(uK \{\&\\*(U1,
-. nr aK 1
-. if (\\n(uK>1 \{\
-. aK
-. \}
-. nr Kl -\\n(uK
-.\}
-.if \\n(tK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \{\
-. ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q.
-. \}
-. el \{\&\\*(eM\\*(tK\\*(nO.
-. \}
-. \}
-. if \\n(Kl>0 \{\
-. ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q,
-. \}
-. el \{\&\\*(eM\\*(tK\\*(nO,
-. \}
-. \}
-.\}
-.if \\n(bK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(eM\\*(bK\\*(nO.
-. if \\n(Kl>0 \&\\*(eM\\*(bK\\*(nO,
-.\}
-.if \\n(jK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(eM\\*(jK\\*(nO.
-. if \\n(Kl>0 \&\\*(eM\\*(jK\\*(nO,
-.\}
-.if \\n(rK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(rK.
-. if \\n(Kl>0 \&\\*(rK,
-.\}
-.if \\n(nK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(nK.
-. if \\n(Kl>0 \&\\*(nK,
-.\}
-.if \\n(vK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(vK.
-. if \\n(Kl>0 \&\\*(vK,
-.\}
-.if \\n(pK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(pK.
-. if \\n(Kl>0 \&\\*(pK,
-.\}
-.if \\n(qK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(qK.
-. if \\n(Kl>0 \&\\*(qK,
-.\}
-.if \\n(dK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(dK.
-. if \\n(Kl>0 \&\\*(dK,
-.\}
-.if \\n(oK \{\
-. nr Kl \\n(Kl-1
-. if \\n(Kl==0 \&\\*(oK.
-. if \\n(Kl>0 \&\\*(oK,
-.\}
-.if \\n(Kl>0 .tm unresolved reference problem
-..
-.\" NS aK macro - print out reference authors
-.de aK
-.nr aK \\n(aK+1
-.ie (\\n(uK-\\n(aK)==0 \{\&and \\*(U\\n(aK,
-.\}
-.el \{\&\\*(U\\n(aK,
-. aK
-.\}
-..
-.\" NS %A macro - reference author(s)
-.\" NS uK register - reference author(s) counter
-.\" NS U[1-9] strings - reference author(s) names
+. ie \n[.$] \
+. tm Usage: .Re (does not take arguments) (#\n[.c])
+. el \{\
+. doc-print-reference
+. doc-reset-reference
+. nr doc-is-reference 0
+. \}
+..
+.
+.
+.\" NS doc-reset-reference macro
+.\" NS reference cleanup
+.\" NS
+.\" NS modifies:
+.\" NS doc-author-count
+.\" NS doc-author-nameXXX
+.\" NS doc-book-count
+.\" NS doc-book-name
+.\" NS doc-corporate-count
+.\" NS doc-corporate-name
+.\" NS doc-date
+.\" NS doc-date-count
+.\" NS doc-issue-count
+.\" NS doc-issue-name
+.\" NS doc-journal-count
+.\" NS doc-journam-name
+.\" NS doc-optional-count
+.\" NS doc-optional-string
+.\" NS doc-page-number-count
+.\" NS doc-page-number-string
+.\" NS doc-reference-title-count
+.\" NS doc-reference-title-name
+.\" NS doc-reference-title-name-for-book
+.\" NS doc-report-count
+.\" NS doc-report-name
+.\" NS doc-volume-count
+.\" NS doc-volume-name
+.
+.de doc-reset-reference
+. while (\n[doc-author-count]) \{\
+. ds doc-author-name\n[doc-author-count]
+. nr doc-author-count -1
+. \}
+. nr doc-journal-count 0
+. nr doc-issue-count 0
+. nr doc-optional-count 0
+. nr doc-corporate-count 0
+. nr doc-report-count 0
+. nr doc-reference-title-count 0
+. nr doc-volume-count 0
+. nr doc-date-count 0
+. nr doc-page-number-count 0
+. nr doc-book-count 0
+.
+. ds doc-journal-name
+. ds doc-issue-name
+. ds doc-optional-string
+. ds doc-corporate-name
+. ds doc-report-name
+. ds doc-reference-title-name
+. ds doc-reference-title-name-for-book
+. ds doc-volume-name
+. ds doc-date
+. ds doc-page-number-string
+. ds doc-book-name
+..
+.
+.
+.\" NS doc-finish-reference macro
+.\" NS auxiliary macro for doc-print-reference
+.\" NS
+.\" NS modifies:
+.\" NS doc-reference-count
+.
+.de doc-finish-reference
+. nr doc-reference-count -1
+. ie \n[doc-reference-count] \
+. nop \),
+. el \
+. nop \).
+..
+.
+.
+.\" NS doc-print-reference macro
+.\" NS reference print
+.\" NS
+.\" NS modifies:
+.\" NS doc-reference-count
+.
+.de doc-print-reference
+.
+. nh
+.
+. if \n[doc-author-count] \{\
+. doc-print-reference-authors
+. nr doc-reference-count -\n[doc-author-count]
+. \}
+.
+. if \n[doc-reference-title-count] \{\
+. unformat doc-reference-title-name
+. chop doc-reference-title-name
+. unformat doc-reference-title-name-for-book
+. chop doc-reference-title-name-for-book
+. ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
+. nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
+. doc-finish-reference
+. \}
+. el \{\
+. nop \*[doc-reference-title-name]\c
+. doc-finish-reference
+. \}\}
+.
+. if \n[doc-book-count] \{\
+. unformat doc-book-name
+. chop doc-book-name
+. nop \*[doc-book-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-publisher-count] \{\
+. unformat doc-publisher-name
+. chop doc-publisher-name
+. nop \*[doc-publisher-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-journal-count] \{\
+. unformat doc-journal-name
+. chop doc-journal-name
+. nop \*[doc-journal-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-report-count] \{\
+. unformat doc-report-name
+. chop doc-report-name
+. nop \*[doc-report-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-issue-count] \{\
+. unformat doc-issue-name
+. chop doc-issue-name
+. nop \*[doc-issue-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-volume-count] \{\
+. unformat doc-volume-name
+. chop doc-volume-name
+. nop \*[doc-volume-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-page-number-count] \{\
+. unformat doc-page-number-string
+. chop doc-page-number-string
+. nop \*[doc-page-number-string]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-corporate-count] \{\
+. unformat doc-corporate-name
+. chop doc-corporate-name
+. nop \*[doc-corporate-name]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-date-count] \{\
+. unformat doc-date
+. chop doc-date
+. nop \*[doc-date]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-optional-count] \{\
+. unformat doc-optional-string
+. chop doc-optional-string
+. nop \*[doc-optional-string]\c
+. doc-finish-reference
+. \}
+.
+. if \n[doc-reference-count] \
+. tm mdoc warning: unresolved reference problem
+.
+. hy \n[doc-hyphen-flags]
+..
+.
+.
+.\" NS doc-print-reference-authors macro
+.\" NS print out reference authors
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dpra
+.\" NS doc-str-dpra
+.
+.ds doc-str-dpra "and
+.
+.de doc-print-reference-authors
+. nr doc-reg-dpra 1
+.
+. while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
+. unformat doc-author-name\n[doc-reg-dpra]
+. chop doc-author-name\n[doc-reg-dpra]
+. ie (\n[doc-author-count] > 2) \
+. nop \)\*[doc-author-name\n[doc-reg-dpra]],
+. el \
+. nop \)\*[doc-author-name\n[doc-reg-dpra]]
+. nr doc-reg-dpra +1
+. \}
+.
+. unformat doc-author-name\n[doc-reg-dpra]
+. chop doc-author-name\n[doc-reg-dpra]
+. if (\n[doc-author-count] > 1) \
+. nop \)\*[doc-str-dpra]
+. nop \)\*[doc-author-name\n[doc-reg-dpra]],
+..
+.
+.
+.\" NS doc-author-count global register
+.\" NS counter of author references
+.
+.nr doc-author-count 0
+.
+.
+.\" NS doc-author-nameXXX global box
+.\" NS array of author names
+.\" NS
+.\" NS limit:
+.\" NS doc-author-count
+.
+.ds doc-author-name0
+.
+.
+.\" NS %A user macro
+.\" NS reference author(s)
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-author-count
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%A
+.\" NS
+.\" NS width register `%A' set in doc-common
+.
.de %A
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%A Author_name (#\\n(.c)
-. el \{\
-. nr uK \\n(uK+1
-. nr Kl \\n(Kl+1
-. ds rS U\\n(uK
-. ds mN %A
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %B macro - [reference] Book Name
-.\" NS bK string - Book Name
-.\" NS bK register - Book Name flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%A author_name ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-author-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %A
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" save to reference box
+. box doc-author-name\n[doc-author-count]
+. ev doc-env-%A
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-book-count global register
+.\" NS counter of book references
+.
+.nr doc-book-count 0
+.
+.
+.\" NS doc-book-name global box
+.\" NS string of collected book references
+.
+.ds doc-book-name
+.
+.
+.\" NS %B user macro
+.\" NS [reference] book name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-book-count
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%B
+.\" NS
+.\" NS width register `%B' set in doc-common
+.
.de %B
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%B Book Name (#\\n(.c)
-. el \{\
-. ds mN %B
-. if \\n(rS>0 \{\
-. nr bK \\n(bK+1
-. nr Kl \\n(Kl+1
-. ds rS bK
-. \}
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. ie \\n(rS==0 \{\
-. as b1 \&\\*(eM
-. nR
-. \}
-. el .rR
-.\}
-..
-.\" NS %D macro - [reference] Date
-.\" NS dK string - Date String
-.\" NS dK register - Date flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%B book_name ... (#\n[.c])
+. return
+. \}
+.
+. if \n[doc-is-reference] \{\
+. nr doc-book-count +1
+. nr doc-reference-count +1
+. \}
+.
+. ds doc-macro-name %B
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. ie \n[doc-is-reference] \{\
+. \" append to reference box
+. boxa doc-book-name
+. ev doc-env-%B
+. evc 0
+. in 0
+. nf
+. nop \*[doc-Em-font]\c
+. doc-do-references
+. \}
+. el \{\
+. nop \*[doc-Em-font]\c
+. doc-print-recursive
+. \}
+..
+.
+.
+.\" NS doc-date-count global register
+.\" NS counter of date references
+.
+.nr doc-date-count 0
+.
+.
+.\" NS doc-date global box
+.\" NS string of collected date references
+.
+.ds doc-date
+.
+.
+.\" NS %D user macro
+.\" NS [reference] date
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-date-count
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%D
+.\" NS
+.\" NS width register `%D' set in doc-common
+.
.de %D
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%D Date (#\\n(.c)
-. el \{\
-. ds mN %D
-. nr dK \\n(dK+1
-. nr Kl \\n(Kl+1
-. ds rS dK
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %J macro - [reference] Journal Name
-.\" NS jK register - [reference] Journal Name flag
-.\" NS jK string - [reference] Journal Name
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%D date ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-date-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %D
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-date
+. ev doc-env-%D
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-publisher-count global register
+.\" NS counter of publisher references
+.
+.nr doc-publisher-count 0
+.
+.
+.\" NS doc-publisher-name global box
+.\" NS string of collected publisher references
+.
+.ds doc-publisher-name
+.
+.
+.\" NS %I user macro
+.\" NS [reference] issuer/publisher name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-publisher-count
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%I
+.\" NS
+.\" NS width register `%I' set in doc-common
+.
+.de %I
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%I issuer/publisher_name ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-publisher-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %I
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-publisher-name
+. ev doc-env-%I
+. evc 0
+. in 0
+. nf
+. nop \*[doc-Em-font]\c
+. doc-do-references
+..
+.
+.
+.\" NS doc-journal-count global register
+.\" NS counter of journal references
+.
+.nr doc-journal-count 0
+.
+.
+.\" NS doc-journal-name global box
+.\" NS string of collected journal references
+.
+.ds doc-journal-name
+.
+.
+.\" NS %J user macro
+.\" NS [reference] Journal Name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-journal-count
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%J
+.\" NS
+.\" NS width register `%J' set in doc-common
+.
.de %J
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%J Journal Name (#\\n(.c)
-. el \{\
-. ds mN %J
-. nr jK \\n(jK+1
-. ds rS jK
-. nr Kl \\n(Kl+1
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %N macro - [reference] issue number
-.\" NS nK register - [reference] issue number flag
-.\" NS nK string - [reference] issue number
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%J journal_name ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-journal-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %J
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-journal-name
+. ev doc-env-%J
+. evc 0
+. in 0
+. nf
+. nop \*[doc-Em-font]\c
+. doc-do-references
+..
+.
+.
+.\" NS doc-issue-count global register
+.\" NS counter of issue number references
+.
+.nr doc-issue-count 0
+.
+.
+.\" NS doc-issue-name global box
+.\" NS string of collected issue number references
+.
+.ds doc-issue-name
+.
+.
+.\" NS %N user macro
+.\" NS [reference] issue number
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-issue-count
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%N
+.\" NS
+.\" NS width register `%N' set in doc-common
+.
.de %N
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%N issue number (#\\n(.c)
-. el \{\
-. nr nK \\n(nK+1
-. nr Kl \\n(Kl+1
-. ds rS nK
-. ds mN %N
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %O macro - [reference] optional information
-.\" NS oK register - [reference] optional information flag
-.\" NS oK string - [reference] optional information
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%N issue_number ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-issue-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %N
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-issue-name
+. ev doc-env-%N
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-optional-count global register
+.\" NS counter of optional information references
+.
+.nr doc-optional-count 0
+.
+.
+.\" NS doc-optional-string global box
+.\" NS string of collected optional information references
+.
+.ds doc-optional-string
+.
+.
+.\" NS %O user macro
+.\" NS [reference] optional information
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-optional-count
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%O
+.\" NS
+.\" NS width register `%O' set in doc-common
+.
.de %O
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%O optional information ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN %O
-. nr oK \\n(oK+1
-. nr Kl \\n(Kl+1
-. ds rS oK
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %P macro - [reference] page numbers
-.\" NS pK register - [reference] page number flag
-.\" NS pK string - [reference] page number
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%O optional_information ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-optional-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %O
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-optional-string
+. ev doc-env-%O
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-page-number-count global register
+.\" NS counter of page number references
+.
+.nr doc-page-number-count 0
+.
+.
+.\" NS doc-page-number-string global box
+.\" NS string of collected page number references
+.
+.ds doc-page-number-string
+.
+.
+.\" NS %P user macro
+.\" NS [reference] page numbers
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-page-number-count
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%P
+.\" NS
+.\" NS width register `%P' set in doc-common
+.
.de %P
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%P page numbers ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN %P
-. nr pK \\n(pK+1
-. nr Kl \\n(Kl+1
-. ds rS pK
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %Q macro - Corporate or Foreign Author
-.\" NS qK string - Corporate or Foreign Author
-.\" NS qK register - Corporate or Foreign Author flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%P page_number ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-page-number-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %P
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-page-number-string
+. ev doc-env-%P
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-corporate-count global register
+.\" NS counter of corporate references
+.
+.nr doc-corporate-count 0
+.
+.
+.\" NS doc-corporate-name global box
+.\" NS string of collected corporate references
+.
+.ds doc-corporate-name
+.
+.
+.\" NS %Q user macro
+.\" NS corporate or foreign author
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-corporate-count
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%Q
+.\" NS
+.\" NS width register `%Q' set in doc-common
+.
.de %Q
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%Q Corporate or Foreign Author (#\\n(.c)
-. el \{\
-. ds mN %Q
-. nr qK \\n(qK+1
-. nr Kl \\n(Kl+1
-. ds rS qK
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %R macro - [reference] report name
-.\" NS rK string - [reference] report name
-.\" NS rK register - [reference] report flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-corporate-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %Q
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-corporate-name
+. ev doc-env-%Q
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-report-count global register
+.\" NS counter of report references
+.
+.nr doc-report-count 0
+.
+.
+.\" NS doc-report-name global box
+.\" NS string of collected report references
+.
+.ds doc-report-name
+.
+.
+.\" NS %R user macro
+.\" NS [reference] report name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-count
+.\" NS doc-report-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%R
+.\" NS
+.\" NS width register `%R' set in doc-common
+.
.de %R
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%R reference report (#\\n(.c)
-. el \{\
-. ds mN %R
-. nr rK \\n(rK+1
-. nr Kl \\n(Kl+1
-. ds rS rK
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS %T macro - reference title
-.\" NS tK string - reference title
-.\" NS tK register - reference title flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%R reference_report ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-report-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %R
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-report-name
+. ev doc-env-%R
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-reference-title-count global register
+.\" NS counter of reference title references
+.
+.nr doc-reference-title-count 0
+.
+.
+.\" NS doc-reference-title-name global box
+.\" NS string of collected reference title references
+.
+.ds doc-reference-title-name
+.
+.
+.\" NS doc-reference-title-name-for-book global box
+.\" NS string of collected reference title references
+.\" NS (saved with another font; this is a shortcoming of groff)
+.
+.ds doc-reference-title-name-for-book
+.
+.
+.\" NS %T user macro
+.\" NS reference title
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-title-count
+.\" NS doc-report-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%T
+.\" NS
+.\" NS width register `%T' set in doc-common
+.
.de %T
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%T (#\\n(.c)
-. el \{\
-. ds mN %T
-. if \\n(rS>0 \{\
-. nr tK \\n(tK+1
-. nr Kl \\n(Kl+1
-. ds rS tK
-. \}
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-.\" . ie \\n(jS==1 \{\
-.\" . nr cF \\n(.f
-.\" . nr cZ \\n(.s
-.\" . ds qL \&\\*(Lq\\*(rA
-.\" . ds qR \&\\*(Rq\f\\n(cF\s\\n(cZ
-.\" . En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\" . \}
-.\" . el \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. ie \\n(rS==0 \{\
-. as b1 \&\\*(eM
-. nR
-. \}
-. el .rR
-.\" . \}
-.\}
-..
-.\" NS %V macro - reference volume
-.\" NS vK string - reference volume
-.\" NS vK register - reference volume flag
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%T reference_title ... (#\n[.c])
+. return
+. \}
+.
+. if \n[doc-is-reference] \{\
+. nr doc-reference-title-count +1
+. nr doc-reference-count +1
+. \}
+.
+. ds doc-macro-name %T
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. ie \n[doc-is-reference] \{\
+. \" append to reference box
+. boxa doc-reference-title-name-for-book
+. ev doc-env-%T
+. evc 0
+. in 0
+. nf
+. nop \*[doc-No-font]\c
+. doc-do-references
+.
+. \" do it a second time with another font
+. ds doc-macro-name %T
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. boxa doc-reference-title-name
+. ev doc-env-%T
+. evc 0
+. in 0
+. nf
+. nop \*[doc-Em-font]\c
+. doc-do-references
+. \}
+. el \{\
+. nop \*[doc-Em-font]\c
+. doc-print-recursive
+. \}
+..
+.
+.
+.\" NS doc-volume-count global register
+.\" NS counter of reference title references
+.
+.nr doc-volume-count 0
+.
+.
+.\" NS doc-volume-name global box
+.\" NS string of collected volume references
+.
+.ds doc-volume-name
+.
+.
+.\" NS %V user macro
+.\" NS reference volume
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-macro-name
+.\" NS doc-reference-title-count
+.\" NS doc-volume-count
+.\" NS
+.\" NS local variables:
+.\" NS doc-env-%V
+.\" NS
+.\" NS width register `%V' set in doc-common
+.
.de %V
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .%V Volume , ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN %V
-. nr vK \\n(vK+1
-. nr Kl \\n(Kl+1
-. ds rS vK
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. rR
-.\}
-..
-.\" NS rR macro - reference recursion routine
-.\" NS jM local register
-.\" NS jN local register
-.de rR
-.hy 0
-.nr jM \\n(C\\n(aP
-.ie \\n(jM==1 \{\
-.\" . as b1 \&\f\\n(cF\s\\n(cZ
-. ie "\\*(A\\n(aP"Tn" \{\
-. nN
-. \}
-. el \{\
-. if \\n(aC>8 .tm Usage: \\*(mN - maximum 8 arguments (#\\n(.c)
-. aI rR 1
-. \\*(A\\n(aP
-. \}
-.\}
-.el \{\
-. nr jN \\n(aP
-. ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
-. el .as b1 \&\\*(A\\n(aP
-.\" . el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
-. ie \\n(aC==\\n(aP \{\
-.\" . as b1 \&\f\\n(cF\s\\n(cZ
-. rD
-. \}
-. el \{\
-. nr aP \\n(aP+1
-. as b1 \&\\*(S\\n(jN
-. rR
-. \}
-.\}
-.rr jM jN
-..
-.\" NS rD macro - save b1 buffer in to appropriate name
-.de rD
-.as \\*(rS \\*(b1
-.ds b1
-.ds rS
-.aY
-..
-.\" NS Hf macro - source include header files.
+. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
+. tm Usage: .%V volume ... (#\n[.c])
+. return
+. \}
+.
+. nr doc-volume-count +1
+. nr doc-reference-count +1
+.
+. ds doc-macro-name %V
+. doc-parse-args \$@
+.
+. nr doc-arg-ptr +1
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+.
+. \" append to reference box
+. boxa doc-volume-name
+. ev doc-env-%V
+. evc 0
+. in 0
+. nf
+. doc-do-references
+..
+.
+.
+.\" NS doc-do-references macro
+.\" NS reference recursion routine
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-ddr
+.\" NS doc-reg-ddr1
+.
+.de doc-do-references
+. if !\n[doc-is-reference] \
+. tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
+.
+. nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
+.
+. ie (\n[doc-reg-ddr1] == 1) \{\
+. \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
+. doc-append-arg \c 3
+. \*[doc-arg\n[doc-arg-ptr]]
+. \}
+. el \{\
+. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
+.
+. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
+. \" finish reference box
+. br
+. ev
+. boxa
+.
+. doc-reset-args
+. \}
+. el \{\
+. nr doc-reg-ddr \n[doc-arg-ptr]
+. nr doc-arg-ptr +1
+. nop \)\*[doc-space\n[doc-reg-ddr]]\c
+. doc-do-references
+. \}\}
+..
+.
+.
+.\" NS Hf user macro
+.\" NS source include header files.
+.\" NS
+.\" NS modifies:
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS
+.\" NS width register `Hf' set in doc-common
+.
.de Hf
-.Pp
-File:
-.Pa \\$1
-.Pp
-.nr cF \\n(.f
-.nr cZ \\n(.s
-.ie t \{\
-\&\\*(lI
-.br
-.ta +9n 18n 27n 36n 45n 54n 63n 72n
-.\}
-.el \{\
-.ta +8n 16n 24n 32n 40n 48n 56n 64n 72n
-.\}
-.nf
-.so \\$1
-.fi
-.ft \\n(cF
-.fz \\n(cZ
-.Pp
-..
-.\" NS An macro - author name
-.\" NS aN register
-.nr aN 0
+. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
+. doc-paragraph
+. nop File:
+. Pa \$1
+.
+. Bd -literal
+. so \$1
+. Ed
+.
+. doc-paragraph
+. \}
+. el \
+. Usage: .Hf file (#\n[.c])
+..
+.
+.
+.\" NS doc-have-author global register (bool)
+.\" NS set in `An'
+.
+.nr doc-have-author 0
+.
+.
+.\" NS An user macro
+.\" NS author name
+.\" NS
+.\" NS modifies:
+.\" NS doc-arg-ptr
+.\" NS doc-curr-font
+.\" NS doc-curr-size
+.\" NS doc-have-author
+.\" NS doc-macro-name
+.\" NS
+.\" NS width register `An' set in doc-common
+.
.de An
-.if \\n(nY==1 \{\
-. ie \\n(aN==1 \{\
-. br
-. \}
-. el \{\
-. nr aN 1
-. \}
-.\}
-.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .An author_name ... \\*(Pu (#\\n(.c)
-. el \{\
-. ds mN An
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-.if \\n(aC>\\n(aP \{\
-. nr aP \\n(aP+1
-. nr cF \\n(.f
-. nr cZ \\n(.s
-. nR
-.\}
-..
-.\" NS Sf macro -defunct
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \{\
+. ie "\$1"-nosplit" \
+. nr doc-in-authors-section 0
+. el \{ .ie "\$1"-split" \
+. nr doc-in-authors-section 1
+. el \{\
+. ds doc-macro-name An
+. doc-parse-args \$@
+. \}\}\}
+. el \{\
+. tm1 "Usage: .An {-nosplit | -split}
+. tm1 .An author_name ... (#\n[.c])
+. \}\}
+.
+. if \n[doc-in-authors-section] \{\
+. ie \n[doc-have-author] \
+. br
+. el \
+. nr doc-have-author 1
+. \}
+.
+. if \n[doc-arg-limit] \{\
+. nr doc-arg-ptr +1
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
+. nr doc-curr-font \n[.f]
+. nr doc-curr-size \n[.ps]
+. doc-print-recursive
+. \}
+. el \{\
+. tm Usage: .An author_name ... (#\n[.c])
+. doc-reset-args
+. \}\}
+..
+.
+.
+.\" NS Sf user macro
+.\" NS defunct
+.\" NS
+.\" NS width register `Sf' set in doc-common
+.
.de Sf
-.tm .Sf defunct, use prefix or Ns
-..
-.ds rV "function returns the value 0 if successful; otherwise the value -1 is returned and the global variable \\*(vAerrno\fP is set to indicate the error.
-.\" Ns Rv macro - return values
-.\" Ns rV string - standard return message
+. tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
+..
+.
+.
+.\" NS Rv user macro
+.\" NS return values
+.\" NS
+.\" NS width register `Rv' set in doc-common
+.\" NS
+.\" NS local variables:
+.\" NS doc-str-Rv-prefix
+.\" NS doc-str-Rv-suffix
+.
+.ds doc-str-Rv-prefix "The
+.ds doc-str-Rv-suffix "function returns the value\~0 if successful;
+.as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
+.as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
+.as doc-str-Rv-suffix " is set to indicate the error.
+.
.de Rv
-.ie \\n(.$==0 \{\
-.tm Usage: .Rv [-std] (#\\n(.c)
-.\}
-.el \{\
-. ds mN Rv
-.\" . nr aP 0
-.\" . nr lR \\n(lR+1
-.\" . ds A1 \\$2
-.\" . ds A2 \\$3
-.\" . ds A3 \\$4
-.\" . ds A4 \\$5
-.\" . ds A5 \\$6
-.\" . ds A6 \\$7
-.\" . ds A7 \\$8
-.\" . ds A8 \\$9
-.\" . nr fV \\n(.$-1
-. if "\\$1"-std" \{\
-. nr cH \\*(cH
-. if (\\n(cH<2):(\\n(cH>3) .tm Usage: .Rv -std sections 2 and 3 only
-. br
-\&The
-.Fn \\$2
-\&\\*(rV
-. \}
-.\}
-..
+.
+.\" XXX: what does this function without `-std'?
+.
+. if !\n[.$] \{\
+. tm Usage: .Rv [-std] (#\n[.c])
+. return
+. \}
+.
+. \" .ds doc-macro-name Rv
+. \" .nr doc-arg-ptr 0
+. \" .nr lR +1
+. \" .ds doc-arg1 \$2
+. \" .ds doc-arg2 \$3
+. \" .ds doc-arg3 \$4
+. \" .ds doc-arg4 \$5
+. \" .ds doc-arg5 \$6
+. \" .ds doc-arg6 \$7
+. \" .ds doc-arg7 \$8
+. \" .ds doc-arg8 \$9
+. \" .
+. \" .nr doc-num-args (\n[.$] - 1)
+.
+. if "\$1"-std" \{\
+. nr doc-reg-Rv \*[doc-section]
+. if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
+. tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
+. br
+. nop \)\*[doc-str-Rv-prefix]
+. Fn \$2
+. nop \)\*[doc-str-Rv-suffix]
+. \}
+..
+.
+.
+.\" NS Mt user macro
+.\" NS mailto (for conversion to HTML)
+.
+.de Mt
+. \" XXX: error handling missing
+. Pa \$@
+..
+.
+.
+.\" NS Lk user macro
+.\" NS link (for conversion to HTML)
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-Lk
+.\" NS doc-str-Lk
+.
+.de Lk
+. ds doc-str-Lk Sy \$@
+.
+. ie (\n[.$] > 1) \{\
+. doc-get-arg-type \$2
+. ie (\n[doc-arg-type] < 3) \{\
+. Em \)\$2:
+. ds doc-str-Lk Sy "\$1"
+. doc-get-width "\$1"
+. shift 2
+. if \n[.$] \
+. as doc-str-Lk " \$@
+. \}
+. el \
+. doc-get-width "\$1"
+. \}
+. el \
+. doc-get-width "\$1"
+.
+. ie n \
+. nr doc-reg-Lk 26
+. el \
+. nr doc-reg-Lk 38
+. ie (\n[doc-width] >= \n[doc-reg-Lk]) \
+. D1 \*[doc-str-Lk]
+. el \
+. \*[doc-str-Lk]
+..
+.
+.
+.rn em e@
+.
+.de em
+. tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
+. tm1 " Should this have been `.Em ...'?
+. ab
+..
+.
+.
+.\" NS doc-empty-line macro
+.\" NS emit warning and print empty line
+.
+.de doc-empty-line
+. if !"\*[doc-macro-name]"Bd" \
+. tm mdoc warning: Empty input line #\n[.c]
+. sp
+..
+.
+.blm doc-empty-line
+.
+.
+.ec
+.
+.
+.\" load local modifications
+.mso mdoc.local
+.
+.\" EOF
diff --git a/tmac/groff_man.man b/tmac/groff_man.man
index 420e2840..e35acab8 100644
--- a/tmac/groff_man.man
+++ b/tmac/groff_man.man
@@ -449,6 +449,9 @@ package should be used.
All
.B man
macros are contained in this file.
+.TP
+.B man.local
+Local changes and customizations should be put into this file.
.
.SH "SEE ALSO"
.
diff --git a/tmac/groff_mdoc.reference.man b/tmac/groff_mdoc.reference.man
index df3167bf..23a1bf9e 100755
--- a/tmac/groff_mdoc.reference.man
+++ b/tmac/groff_mdoc.reference.man
@@ -3669,7 +3669,17 @@ source file describes it as
.Dq old function type (fortran) .
.
.It Li .Sm
-To be written.
+Activate (toggle) space mode.
+.Pp
+.Dl Usage: .Sm Oo on | off Oc Ld
+.Pp
+If space mode is off, no spaces between macro arguments are inserted.
+If called without a parameter (or if the next parameter is neither
+.Ql on
+nor
+.Ql off ,
+.Ql .Sm
+toggles space mode.
.
.It Li .Ud
prints
@@ -3826,18 +3836,36 @@ for macro files.
.
.Sh FILES
.
-.Bl -tag -width /usr/share/misc/mdoc.template -compact
-.It Pa /usr/share/tmac/tmac.doc
-manual macro package
-.It Pa /usr/share/misc/mdoc.template
-template for writing a man page
+.Bl -tag -width mdoc/doc-ditroff -compact
+.It Pa doc.tmac
+The main manual macro package.
+.It Pa mdoc.tmac
+A wrapper file to call
+.Pa doc.tmac .
+.It Pa mdoc/doc-common
+Common strings, definitions, stuff related typographic output.
+.It Pa mdoc/doc-nroff
+Definitions used for a
+.Tn TTY
+output device.
+.It Pa mdoc/doc-ditroff
+Definitions used for all other devices.
+.It Pa mdoc.local
+Local additions and customizations.
+.It Pa andoc.tmac
+This file checks whether the
+.Nm \-mdoc
+or the
+.Nm \-man
+package should be used.
.El
.
.
.Sh "SEE ALSO"
.
-.Xr mdoc 7 ,
.Xr man 1 ,
+.Xr groff_man 7 ,
+.Xr groff 1 ,
.Xr troff 1
.
.
diff --git a/tmac/groff_mdoc.samples.man b/tmac/groff_mdoc.samples.man
deleted file mode 100755
index 3329ec89..00000000
--- a/tmac/groff_mdoc.samples.man
+++ /dev/null
@@ -1,2925 +0,0 @@
-.\" $NetBSD: mdoc.samples.7,v 1.21 1999/08/23 21:54:20 ross Exp $
-.\"
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
-.\"
-.\" This tutorial sampler invokes every macro in the package several
-.\" times and is guaranteed to give a worst case performance
-.\" for an already extremely slow package.
-.\"
-.Dd November 24, 1997
-.Os
-.Dt MDOC.SAMPLES 7
-.Sh NAME
-.Nm mdoc.samples
-.Nd tutorial sampler for writing
-.Bx
-manuals with
-.Nm \-mdoc
-.Sh SYNOPSIS
-.Nm man mdoc.samples
-.Sh DESCRIPTION
-A tutorial sampler for writing
-.Bx
-manual pages with the
-.Nm \-mdoc
-macro package, a
-.Em content Ns \-based
-and
-.Em domain Ns \-based
-formatting
-package for
-.Xr troff 1 .
-Its predecessor, the
-.Xr \-man 7
-package,
-addressed page layout leaving the
-manipulation of fonts and other
-typesetting details to the individual author.
-In
-.Nm \-mdoc ,
-page layout macros
-make up the
-.Em "page structure domain"
-which consists of macros for titles, section headers, displays
-and lists. Essentially items which affect the physical position
-of text on a formatted page.
-In addition to the page structure domain, there are two more domains,
-the manual domain and the general text domain.
-The general text domain is defined as macros which
-perform tasks such as quoting or emphasizing pieces of text.
-The manual domain is defined as macros that are a subset of the
-day to day informal language used to describe commands, routines
-and related
-.Bx
-files.
-Macros in the manual domain handle
-command names, command line arguments and options, function names,
-function parameters, pathnames, variables, cross
-references to other manual pages, and so on.
-These domain
-items have value
-for both the author and the future user of the manual page.
-It is hoped the consistency gained
-across the manual set will provide easier
-translation to future documentation tools.
-.Pp
-Throughout the
-.Ux
-manual pages, a manual entry
-is simply referred
-to as a man page, regardless of actual length and without
-sexist intention.
-.Sh GETTING STARTED
-Since a tutorial document is normally read when a person
-desires to use the material immediately, the assumption has
-been made that the user of this document may be impatient.
-The material presented in the remained of this document is
-outlined as follows:
-.Bl -enum -offset indent
-.It
-.Tn "TROFF IDIOSYNCRASIES"
-.Bl -tag -width flag -compact -offset indent
-.It "Macro Usage" .
-.It "Passing Space Characters in an Argument" .
-.It "Trailing Blank Space Characters (a warning)" .
-.It "Escaping Special Characters" .
-.El
-.It
-.Tn "THE ANATOMY OF A MAN PAGE"
-.Bl -tag -width flag -compact -offset indent
-.It "A manual page template" .
-.El
-.It
-.Tn "INTRODUCTION OF TITLE MACROS" .
-.It
-.Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS" .
-.Bl -tag -width flag -compact -offset indent
-.It "What's in a name..." .
-.It "General Syntax" .
-.El
-.It
-.Tn "MANUAL DOMAIN"
-.Bl -tag -width flag -compact -offset indent
-.It "Addresses" .
-.It "Arguments" .
-.It "Configuration Declarations (section four only)" .
-.It "Command Modifier" .
-.It "Defined Variables" .
-.It "Errno's (Section two only)" .
-.It "Environment Variables" .
-.It "Function Argument" .
-.It "Function Declaration" .
-.It "Flags" .
-.It "Functions (library routines)" .
-.It "Function Types" .
-.\" .It "Header File (including source code)" .
-.It "Interactive Commands" .
-.It "Literals" .
-.It "Names" .
-.It "Options" .
-.It "Pathnames" .
-.It "Variables" .
-.It "Cross References" .
-.El
-.It
-.Tn "GENERAL TEXT DOMAIN"
-.Bl -tag -width flag -compact -offset indent
-.It "AT&T Macro" .
-.It "BSD Macro" .
-.It "UNIX Macro" .
-.It "Emphasis Macro" .
-.It "Enclosure/Quoting Macros"
-.Bl -tag -width flag -compact -offset indent
-.It "Angle Bracket Quote/Enclosure" .
-.It "Bracket Quotes/Enclosure" .
-.It "Double Quote macro/Enclosure" .
-.It "Parenthesis Quote/Enclosure" .
-.It "Single Quotes/Enclosure" .
-.It "Prefix Macro" .
-.El
-.It "Extended Arguments" .
-.It "No\-Op or Normal Text Macro" .
-.It "No Space Macro" .
-.It "Section Cross References" .
-.It "Symbolic Macro" .
-.It "References and Citations" .
-.It "Trade Names (Acronyms and Type Names)" .
-.El
-.It
-.Tn "PAGE STRUCTURE DOMAIN"
-.Bl -tag -width flag -compact -offset indent
-.It "Section Headers" .
-.It "Paragraphs and Line Spacing" .
-.It "Keeps" .
-.It "Displays" .
-.It "Lists and Columns" .
-.El
-.It
-.Tn "PREDEFINED STRINGS"
-.It
-.Tn "DIAGNOSTICS"
-.It
-.Tn "FORMATTING WITH GROFF, TROFF AND NROFF"
-.It
-.Tn "BUGS"
-.El
-.ne 7
-.Sh TROFF IDIOSYNCRASIES
-The
-.Nm \-mdoc
-package attempts to simplify the process of writing a man page.
-Theoretically, one should not have to learn the dirty details of
-.Xr troff 1
-to use
-.Nm \-mdoc ;
-however, there are a few
-limitations which are unavoidable and best gotten out
-of the way.
-And, too, be forewarned, this package is
-.Em not
-fast.
-.Ss Macro Usage
-As in
-.Xr troff 1 ,
-a macro is called by placing a
-.Ql \&\.
-(dot character)
-at the beginning of
-a line followed by the two character name for the macro.
-Arguments may follow the macro separated by spaces.
-It is the dot character at the beginning of the line which causes
-.Xr troff 1
-to interpret the next two characters as a macro name.
-To place a
-.Ql \&\.
-(dot character)
-at the beginning of a line in some context other than
-a macro invocation, precede the
-.Ql \&\.
-(dot) with the
-.Ql \e&
-escape sequence.
-The
-.Ql \e&
-translates literally to a zero width space, and is never displayed in the
-output.
-.Pp
-In general,
-.Xr troff 1
-macros accept up to nine arguments, any
-extra arguments are ignored.
-Most macros in
-.Nm \-mdoc
-accept nine arguments and,
-in limited cases, arguments may be continued or extended
-on the
-next line (See
-.Sx Extended Arguments ) .
-A few macros handle quoted arguments (see
-.Sx Passing Space Characters in an Argument
-below).
-.Pp
-Most of the
-.Nm \-mdoc
-general text domain and manual domain macros are special
-in that their argument lists are
-.Em parsed
-for callable macro names.
-This means an argument on the argument list which matches
-a general text or manual domain macro name and is determined
-to be callable will be executed
-or called when it is processed.
-In this case
-the argument, although the name of a macro,
-is not preceded by a
-.Ql \&\.
-(dot).
-It is in this manner that many macros are nested; for
-example
-the option macro,
-.Ql \&.Op ,
-may
-.Em call
-the flag and argument macros,
-.Ql \&Fl
-and
-.Ql \&Ar ,
-to specify an optional flag with an argument:
-.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
-.It Op Fl s Ar bytes
-is produced by
-.Li \&.Op \&Fl s \&Ar bytes
-.El
-.Pp
-To prevent a two character
-string from being interpreted as a macro name, precede
-the string with the
-escape sequence
-.Ql \e& :
-.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent
-.It Op \&Fl s \&Ar bytes
-is produced by
-.Li \&.Op \e&Fl s \e&Ar bytes
-.El
-.Pp
-Here the strings
-.Ql \&Fl
-and
-.Ql \&Ar
-are not interpreted as macros.
-Macros whose argument lists are parsed for callable arguments
-are referred to
-as parsed and macros which may be called from an argument
-list are referred to as callable
-throughout this document and in the companion quick reference
-manual
-.Xr mdoc 7 .
-This is a technical
-.Em faux pas
-as almost all of the macros in
-.Nm \-mdoc
-are parsed, but as it was cumbersome to constantly refer to macros
-as being callable and being able to call other macros,
-the term parsed has been used.
-.Ss Passing Space Characters in an Argument
-Sometimes it is desirable to give as one argument a string
-containing one or more blank space characters.
-This may be necessary
-to defeat the nine argument limit or to specify arguments to macros
-which expect particular arrangement of items in the argument list.
-For example,
-the function macro
-.Ql \&.Fn
-expects the first argument to be the name of a function and any
-remaining arguments to be function parameters.
-As
-.Tn "ANSI C"
-stipulates the declaration of function parameters in the
-parenthesized parameter list, each parameter is guaranteed
-to be at minimum a two word string.
-For example,
-.Fa int foo .
-.Pp
-There are two possible ways to pass an argument which contains
-an embedded space.
-.Em Implementation note :
-Unfortunately, the most convenient way
-of passing spaces in between quotes by reassigning individual
-arguments before parsing was fairly expensive speed wise
-and space wise to implement in all the macros for
-.Tn AT&T
-.Xr troff .
-It is not expensive for
-.Xr groff
-but for the sake of portability, has been limited
-to the following macros which need
-it the most:
-.Pp
-.Bl -tag -width 4n -offset indent -compact
-.It Li \&Cd
-Configuration declaration (section 4
-.Sx SYNOPSIS )
-.It Li \&Bl
-Begin list (for the width specifier).
-.It Li \&Em
-Emphasized text.
-.It Li \&Fn
-Functions (sections two and four).
-.It Li \&It
-List items.
-.It Li \&Li
-Literal text.
-.It Li \&Sy
-Symbolic text.
-.It Li \&%B
-Book titles.
-.It Li \&%J
-Journal names.
-.It Li \&%O
-Optional notes for a reference.
-.It Li \&%R
-Report title (in a reference).
-.It Li \&%T
-Title of article in a book or journal.
-.El
-.Pp
-One way of passing a string
-containing blank spaces is to use the hard or unpaddable space character
-.Ql \e\ ,
-that is, a blank space preceded by the escape character
-.Ql \e .
-This method may be used with any macro but has the side effect
-of interfering with the adjustment of text
-over the length of a line.
-.Xr Troff
-sees the hard space as if it were any other printable character and
-cannot split the string into blank or newline separated pieces as one
-would expect.
-The method is useful for strings which are not expected
-to overlap a line boundary.
-For example:
-.Bl -tag -width "fetch(char *str)" -offset indent
-.It Fn fetch char\ *str
-is created by
-.Ql \&.Fn fetch char\e *str
-.It Fn fetch "char *str"
-can also be created by
-.Ql \&.Fn fetch "\\*q*char *str\\*q"
-.El
-.Pp
-If the
-.Ql \e
-or quotes
-were omitted,
-.Ql \&.Fn
-would see three arguments and
-the result would be:
-.Pp
-.Dl Fn fetch char *str
-.Pp
-For an example of what happens when the parameter list overlaps
-a newline boundary, see the
-.Sx BUGS
-section.
-.Ss Trailing Blank Space Characters
-.Xr Troff
-can be confused by blank space characters at the end of a line.
-It
-is a wise preventive measure to globally remove all blank spaces
-from <blank-space><end-of-line> character sequences.
-Should the need
-arise to force a blank character at the end of a line,
-it may be forced with an unpaddable space and the
-.Ql \e&
-escape character.
-For example,
-.Ql string\e\ \e& .
-.Ss Escaping Special Characters
-Special characters
-like the newline character
-.Ql \en ,
-are handled by replacing the
-.Ql \e
-with
-.Ql \ee
-(e.g.
-.Ql \een )
-to preserve
-the backslash.
-.Sh THE ANATOMY OF A MAN PAGE
-The body of a man page is easily constructed from a basic
-template found in the file:
-.Bd -literal -offset indent
-\&.\e" /usr/share/misc/mdoc.template:
-\&.\e" The following six lines are required.
-\&.Dd Month day, year
-\&.Os OPERATING_SYSTEM [version/release]
-\&.Dt DOCUMENT_TITLE [section number] [volume]
-\&.Sh NAME
-\&.Sh SYNOPSIS
-\&.Sh DESCRIPTION
-\&.\e" The following requests should be uncommented and
-\&.\e" used where appropriate. This next request is
-\&.\e" for sections 2 and 3 function return values only.
-\&.\e" .Sh RETURN VALUES
-\&.\e" This next request is for sections 1, 6, 7 & 8 only
-\&.\e" .Sh ENVIRONMENT
-\&.\e" .Sh FILES
-\&.\e" .Sh EXAMPLES
-\&.\e" This next request is for sections 1, 6, 7 & 8 only
-\&.\e" (command return values (to shell) and
-\&.\e" fprintf/stderr type diagnostics)
-\&.\e" .Sh DIAGNOSTICS
-\&.\e" The next request is for sections 2 and 3 error
-\&.\e" and signal handling only.
-\&.\e" .Sh ERRORS
-\&.\e" .Sh SEE ALSO
-\&.\e" .Sh STANDARDS
-\&.\e" .Sh HISTORY
-\&.\e" .Sh AUTHORS
-\&.\e" .Sh BUGS
-.Ed
-.Pp
-The first items in the template are the macros
-.Pq Li \&.Dd , \&.Os , \&.Dt ;
-the document date,
-the operating system the man page or subject source is developed
-or modified for,
-and the man page title
-.Pq Em in upper case
-along with the section of the manual the page
-belongs in.
-These macros identify the page,
-and are discussed below in
-.Sx TITLE MACROS .
-.Pp
-The remaining items in the template are section headers
-.Pq Li \&.Sh ;
-of which
-.Sx NAME ,
-.Sx SYNOPSIS
-and
-.Sx DESCRIPTION
-are mandatory.
-The
-headers are
-discussed in
-.Sx PAGE STRUCTURE DOMAIN ,
-after
-presentation of
-.Sx MANUAL DOMAIN .
-Several content macros are used to demonstrate page layout macros;
-reading about content macros before page layout macros is
-recommended.
-.Sh TITLE MACROS
-The title macros are the first portion of the page structure
-domain, but are presented first and separate for someone who
-wishes to start writing a man page yesterday.
-Three header macros designate the document title or manual page title,
-the operating system,
-and the date of authorship.
-These macros are one called once at the very beginning of the document
-and are used to construct the headers and footers only.
-.Bl -tag -width 6n
-.It Li \&.Dt DOCUMENT_TITLE section# [volume]
-The document title is the
-subject of the man page and must be in
-.Tn CAPITALS
-due to troff
-limitations.
-The section number may be 1,\ ...,\ 9,
-and if it is specified,
-the volume title may be omitted.
-A volume title may be arbitrary or one of the following:
-.\" .Cl
-.\" USD UNIX User's Supplementary Documents
-.\" .Cl
-.\" PS1 UNIX Programmer's Supplementary Documents
-.Pp
-.Bl -column SMM -offset indent -compact
-.It Li AMD Ta NetBSD Ancestral Manual Documents
-.It Li SMM Ta NetBSD System Manager's Manual
-.It Li URM Ta NetBSD Reference Manual
-.It Li PRM Ta NetBSD Programmer's Manual
-.It Li KM Ta NetBSD Kernel Manual
-.El
-.Pp
-The default volume labeling is
-.Li URM
-for sections 1, 6, and 7;
-.Li SMM
-for section 8;
-.Li PRM
-for sections 2, 3, 4, and 5;
-.Li KM
-for section 9.
-.\" .Cl
-.\" MMI UNIX Manual Master Index
-.\" .Cl
-.\" CON UNIX Contributed Software Manual
-.\" .Cl
-.\" LOC UNIX Local Manual
-.It Li \&.Os operating_system release#
-The name of the operating system
-should be the common acronym, e.g.
-.Tn BSD
-or
-.Tn ATT .
-The release should be the standard release
-nomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3,
-V.4.
-Unrecognized arguments are displayed as given in the page footer.
-For instance, a typical footer might be:
-.Pp
-.Dl \&.Os BSD 4.3
-.Pp
-or for a locally produced set
-.Pp
-.Dl \&.Os CS Department
-.Pp
-The Berkeley default,
-.Ql \&.Os
-without an argument, has been defined as
-.Nx 1.4
-in the site specific file
-.Pa /usr/share/tmac/tmac.doc-common .
-Note, if the
-.Ql \&.Os
-macro is not present, the bottom left corner of the page
-will be ugly.
-.It Li \&.Dd month day, year
-The date should be written formally:
-.Pp
-.ne 5
-.Dl January 25, 1989
-.sp
-Note that the date must not be placed in quotes!
-.El
-.Sh MANUAL DOMAIN
-.Ss What's in a name...
-The manual domain macro names are derived from the day to day
-informal language used to describe commands, subroutines and related
-files.
-Slightly
-different variations of this language are used to describe
-the three different aspects of writing a man page.
-First, there is the description of
-.Nm \-mdoc
-macro request usage.
-Second is the description of a
-.Ux
-command
-.Em with
-.Nm \-mdoc
-macros and third,
-the
-description of a command to a user in the verbal sense;
-that is, discussion of a command in the text of a man page.
-.Pp
-In the first case,
-.Xr troff 1
-macros are themselves a type of command;
-the general syntax for a troff command is:
-.Bd -filled -offset indent
-\&.Va argument1 argument2 ... argument9
-.Ed
-.Pp
-The
-.Ql \&.Va
-is a macro command or request, and anything following it is an argument to
-be processed.
-In the second case,
-the description of a
-.Ux
-command using the content macros is a
-bit more involved;
-a typical
-.Sx SYNOPSIS
-command line might be displayed as:
-.Bd -filled -offset indent
-.Nm filter
-.Op Fl flag
-.Ar infile outfile
-.Ed
-.Pp
-Here,
-.Nm filter
-is the command name and the
-bracketed string
-.Fl flag
-is a
-.Em flag
-argument designated as optional by the option brackets.
-In
-.Nm \-mdoc
-terms,
-.Ar infile
-and
-.Ar outfile
-are
-called
-.Em arguments .
-The macros which formatted the above example:
-.Bd -literal -offset indent
-\&.Nm filter
-\&.Op \&Fl flag
-\&.Ar infile outfile
-.Ed
-.Pp
-In the third case, discussion of commands and command syntax
-includes both examples above, but may add more detail.
-The
-arguments
-.Ar infile
-and
-.Ar outfile
-from the example above might be referred to as
-.Em operands
-or
-.Em file arguments .
-Some command line argument lists are quite long:
-.Bl -tag -width make -offset indent
-.It Nm make
-.Op Fl eiknqrstv
-.Op Fl D Ar variable
-.Op Fl d Ar flags
-.Op Fl f Ar makefile
-.Bk -words
-.Op Fl I Ar directory
-.Ek
-.Op Fl j Ar max_jobs
-.Op Ar variable=value
-.Bk -words
-.Op Ar target ...
-.Ek
-.El
-.Pp
-Here one might talk about the command
-.Nm make
-and qualify the argument
-.Ar makefile ,
-as an argument to the flag,
-.Fl f ,
-or discuss the optional
-file
-operand
-.Ar target .
-In the verbal context, such detail can prevent confusion,
-however the
-.Nm \-mdoc
-package
-does not have a macro for an argument
-.Em to
-a flag.
-Instead the
-.Ql \&Ar
-argument macro is used for an operand or file argument like
-.Ar target
-as well as an argument to a flag like
-.Ar variable .
-The make command line was produced from:
-.Bd -literal -offset indent
-\&.Nm make
-\&.Op Fl eiknqrstv
-\&.Op Fl D Ar variable
-\&.Op Fl d Ar flags
-\&.Op Fl f Ar makefile
-\&.Op Fl I Ar directory
-\&.Op Fl j Ar max_jobs
-\&.Op Ar variable=value
-\&.Bk -words
-\&.Op Ar target ...
-\&.Ek
-.Ed
-.Pp
-The
-.Ql \&.Bk
-and
-.Ql \&.Ek
-macros are explained in
-.Sx Keeps .
-.Ss General Syntax
-The manual domain and general text domain macros share a similar
-syntax with a few minor deviations:
-.Ql \&.Ar ,
-.Ql \&.Fl ,
-.Ql \&.Nm ,
-and
-.Ql \&.Pa
-differ only when called without arguments;
-.Ql \&.Fn
-and
-.Ql \&.Xr
-impose an order on their argument lists
-and the
-.Ql \&.Op
-and
-.Ql \&.Fn
-macros
-have nesting limitations.
-All content macros
-are capable of recognizing and properly handling punctuation,
-provided each punctuation character is separated by a leading space.
-If an request is given:
-.Pp
-.Dl \&.Li sptr, ptr),
-.Pp
-The result is:
-.Pp
-.Dl Li sptr, ptr),
-.Pp
-The punctuation is not recognized and all is output in the
-literal font. If the punctuation is separated by a leading
-white space:
-.Pp
-.Dl \&.Li "sptr , ptr ) ,"
-.Pp
-The result is:
-.Pp
-.Dl Li sptr , ptr ) ,
-.Pp
-The punctuation is now recognized and is output in the
-default font distinguishing it from the strings in literal font.
-.Pp
-To remove the special meaning from a punctuation character
-escape it with
-.Ql \e& .
-.Xr Troff
-is limited as a macro language, and has difficulty
-when presented with a string containing
-a member of the mathematical, logical or
-quotation set:
-.Bd -literal -offset indent-two
-\&{+,\-,/,*,\&%,<,>,<=,>=,=,==,&,`,',"}
-.Ed
-.Pp
-The problem is that
-.Xr troff
-may assume it is supposed to actually perform the operation
-or evaluation suggested by the characters. To prevent
-the accidental evaluation of these characters,
-escape them with
-.Ql \e& .
-Typical syntax is shown in the first content macro displayed
-below,
-.Ql \&.Ad .
-.Ss Address Macro
-The address macro identifies an address construct
-of the form addr1[,addr2[,addr3]].
-.Pp
-.Dl Usage: .Ad address ... \*(Pu
-.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n
-.It Li \&.Ad addr1
-.Ad addr1
-.It Li \&.Ad addr1\ .
-.Ad addr1 .
-.It Li \&.Ad addr1\ , file2
-.Ad addr1 , file2
-.It Li \&.Ad f1\ , f2\ , f3\ :
-.Ad f1 , f2 , f3 :
-.It Li \&.Ad addr\ )\ )\ ,
-.Ad addr ) ) ,
-.El
-.Pp
-It is an error to call
-.Li \&.Ad
-without arguments.
-.Li \&.Ad
-is callable by other macros and is parsed.
-.Ss Argument Macro
-The
-.Li \&.Ar
-argument macro may be used whenever
-a command line argument is referenced.
-.Pp
-.Dl Usage: .Ar argument ... \*(Pu
-.Bl -tag -width ".Ar file1 file2" -compact -offset 15n
-.It Li \&.Ar
-.Ar
-.It Li \&.Ar file1
-.Ar file1
-.It Li \&.Ar file1\ .
-.Ar file1 .
-.It Li \&.Ar file1 file2
-.Ar file1 file2
-.It Li \&.Ar f1 f2 f3\ :
-.Ar f1 f2 f3 :
-.It Li \&.Ar file\ )\ )\ ,
-.Ar file ) ) ,
-.El
-.Pp
-If
-.Li \&.Ar
-is called without arguments
-.Ql Ar
-is assumed.
-The
-.Li \&.Ar
-macro is parsed and is callable.
-.Ss Configuration Declaration (section four only)
-The
-.Ql \&.Cd
-macro is used to demonstrate a
-.Xr config 8
-declaration for a device interface in a section four manual.
-This macro accepts quoted arguments (double quotes only).
-.Pp
-.Bl -tag -width "device le0 at scode?" -offset indent
-.It Cd "device le0 at scode?"
-produced by:
-.Ql ".Cd device le0 at scode?" .
-.El
-.Ss Command Modifier
-The command modifier is identical to the
-.Ql \&.Fl
-(flag) command with the exception
-the
-.Ql \&.Cm
-macro does not assert a dash
-in front of every argument.
-Traditionally flags are marked by the
-preceding dash, some commands or subsets of commands do not use them.
-Command modifiers may also be specified in conjunction with interactive
-commands such as editor commands.
-See
-.Sx Flags .
-.Ss Defined Variables
-A variable which is defined in an include file is specified
-by the macro
-.Ql \&.Dv .
-.Pp
-.Dl Usage: .Dv defined_variable ... \*(Pu
-.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n
-.It Li ".Dv MAXHOSTNAMELEN"
-.Dv MAXHOSTNAMELEN
-.It Li ".Dv TIOCGPGRP )"
-.Dv TIOCGPGRP )
-.El
-.Pp
-It is an error to call
-.Ql \&.Dv
-without arguments.
-.Ql \&.Dv
-is parsed and is callable.
-.Ss Errno's (Section two only)
-The
-.Ql \&.Er
-errno macro specifies the error return value
-for section two library routines.
-The second example
-below shows
-.Ql \&.Er
-used with the
-.Ql \&.Bq
-general text domain macro, as it would be used in
-a section two manual page.
-.Pp
-.Dl Usage: .Er ERRNOTYPE ... \*(Pu
-.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n
-.It Li \&.Er ENOENT
-.Er ENOENT
-.It Li \&.Er ENOENT\ )\ ;
-.Er ENOENT ) ;
-.It Li \&.Bq \&Er ENOTDIR
-.Bq Er ENOTDIR
-.El
-.Pp
-It is an error to call
-.Ql \&.Er
-without arguments.
-The
-.Ql \&.Er
-macro is parsed and is callable.
-.Ss Environment Variables
-The
-.Ql \&.Ev
-macro specifies an environment variable.
-.Pp
-.Dl Usage: .Ev argument ... \*(Pu
-.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n
-.It Li \&.Ev DISPLAY
-.Ev DISPLAY
-.It Li \&.Ev PATH\ .
-.Ev PATH .
-.It Li \&.Ev PRINTER\ )\ )\ ,
-.Ev PRINTER ) ) ,
-.El
-.Pp
-It is an error to call
-.Ql \&.Ev
-without arguments.
-The
-.Ql \&.Ev
-macro is parsed and is callable.
-.Ss Function Argument
-The
-.Ql \&.Fa
-macro is used to refer to function arguments (parameters)
-outside of the
-.Sx SYNOPSIS
-section of the manual or inside
-the
-.Sx SYNOPSIS
-section should a parameter list be too
-long for the
-.Ql \&.Fn
-macro and the enclosure macros
-.Ql \&.Fo
-and
-.Ql \&.Fc
-must be used.
-.Ql \&.Fa
-may also be used to refer to structure members.
-.Pp
-.Dl Usage: .Fa function_argument ... \*(Pu
-.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n
-.It Li \&.Fa d_namlen\ )\ )\ ,
-.Fa d_namlen ) ) ,
-.It Li \&.Fa iov_len
-.Fa iov_len
-.El
-.Pp
-It is an error to call
-.Ql \&.Fa
-without arguments.
-.Ql \&.Fa
-is parsed and is callable.
-.Ss Function Declaration
-The
-.Ql \&.Fd
-macro is used in the
-.Sx SYNOPSIS
-section with section two or three
-functions.
-The
-.Ql \&.Fd
-macro does not call other macros and is not callable by other
-macros.
-.Pp
-.Dl Usage: .Fd include_file (or defined variable)
-.Pp
-In the
-.Sx SYNOPSIS
-section a
-.Ql \&.Fd
-request causes a line break if a function has already been presented
-and a break has not occurred.
-This leaves a nice vertical space
-in between the previous function call and the declaration for the
-next function.
-.Ss Flags
-The
-.Ql \&.Fl
-macro handles command line flags.
-It prepends
-a dash,
-.Ql \- ,
-to the flag.
-For interactive command flags, which
-are not prepended with a dash, the
-.Ql \&.Cm
-(command modifier)
-macro is identical, but without the dash.
-.Pp
-.Dl Usage: .Fl argument ... \*(Pu
-.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n
-.It Li \&.Fl
-.Fl
-.It Li \&.Fl cfv
-.Fl cfv
-.It Li \&.Fl cfv\ .
-.Fl cfv .
-.It Li \&.Fl s v t
-.Fl s v t
-.It Li \&.Fl -\ ,
-.Fl - ,
-.It Li \&.Fl xyz\ )\ ,
-.Fl xyz ) ,
-.El
-.Pp
-The
-.Ql \&.Fl
-macro without any arguments results
-in a dash representing stdin/stdout.
-Note that giving
-.Ql \&.Fl
-a single dash, will result in two dashes.
-The
-.Ql \&.Fl
-macro is parsed and is callable.
-.Ss Functions (library routines)
-The .Fn macro is modeled on ANSI C conventions.
-.Bd -literal
-Usage: .Fn [type] function [[type] parameters ... \*(Pu]
-.Ed
-.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact
-.It Li "\&.Fn getchar"
-.Fn getchar
-.It Li "\&.Fn strlen ) ,"
-.Fn strlen ) ,
-.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" ,
-.Fn "int align" "const * char *sptrs" ,
-.El
-.Pp
-It is an error to call
-.Ql \&.Fn
-without any arguments.
-The
-.Ql \&.Fn
-macro
-is parsed and is callable,
-note that any call to another macro signals the end of
-the
-.Ql \&.Fn
-call (it will close-parenthesis at that point).
-.Pp
-For functions that have more than eight parameters (and this
-is rare), the
-macros
-.Ql \&.Fo
-(function open)
-and
-.Ql \&.Fc
-(function close)
-may be used with
-.Ql \&.Fa
-(function argument)
-to get around the limitation. For example:
-.Bd -literal -offset indent
-\&.Fo "int res_mkquery"
-\&.Fa "int op"
-\&.Fa "char *dname"
-\&.Fa "int class"
-\&.Fa "int type"
-\&.Fa "char *data"
-\&.Fa "int datalen"
-\&.Fa "struct rrec *newrr"
-\&.Fa "char *buf"
-\&.Fa "int buflen"
-\&.Fc
-.Ed
-.Pp
-Produces:
-.Bd -filled -offset indent
-.Fo "int res_mkquery"
-.Fa "int op"
-.Fa "char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "char *data"
-.Fa "int datalen"
-.Fa "struct rrec *newrr"
-.Fa "char *buf"
-.Fa "int buflen"
-.Fc
-.Ed
-.Pp
-The
-.Ql \&.Fo
-and
-.Ql \&.Fc
-macros are parsed and are callable.
-In the
-.Sx SYNOPSIS
-section, the function will always begin at
-the beginning of line.
-If there is more than one function
-presented in the
-.Sx SYNOPSIS
-section and a function type has not been
-given, a line break will occur, leaving a nice vertical space
-between the current function name and the one prior.
-At the moment,
-.Ql \&.Fn
-does not check its word boundaries
-against troff line lengths and may split across a newline
-ungracefully.
-This will be fixed in the near future.
-.Ss Function Type
-This macro is intended for the
-.Sx SYNOPSIS
-section.
-It may be used
-anywhere else in the man page without problems, but its main purpose
-is to present the function type in kernel normal form for the
-.Sx SYNOPSIS
-of sections two and three
-(it causes a page break allowing the function name to appear
-on the next line).
-.Pp
-.Dl Usage: .Ft type ... \*(Pu
-.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact
-.It Li \&.Ft struct stat
-.Ft struct stat
-.El
-.Pp
-The
-.Ql \&.Ft
-request is not callable by other macros.
-.Ss Interactive Commands
-The
-.Ql \&.Ic
-macro designates an interactive or internal command.
-.Pp
-.Dl Usage: .Li argument ... \*(Pu
-.Bl -tag -width ".Ic setenv , unsetenvxx" -compact -offset 14n
-.It Li \&.Ic :wq
-.Ic :wq
-.It Li \&.Ic do while {...}
-.Ic do while {...}
-.It Li \&.Ic setenv\ , unsetenv
-.Ic setenv , unsetenv
-.El
-.Pp
-It is an error to call
-.Ql \&.Ic
-without arguments.
-The
-.Ql \&.Ic
-macro is parsed and is callable.
-.Ss Literals
-The
-.Ql \&.Li
-literal macro may be used for special characters,
-variable constants, anything which should be displayed as it
-would be typed.
-.Pp
-.Dl Usage: .Li argument ... \*(Pu
-.Bl -tag -width ".Li cntrl-D ) ," -compact -offset 14n
-.It Li \&.Li \een
-.Li \en
-.It Li \&.Li M1 M2 M3\ ;
-.Li M1 M2 M3 ;
-.It Li \&.Li cntrl-D\ )\ ,
-.Li cntrl-D ) ,
-.It Li \&.Li 1024\ ...
-.Li 1024 ...
-.El
-.Pp
-The
-.Ql \&.Li
-macro is parsed and is callable.
-.Ss Name Macro
-The
-.Ql \&.Nm
-macro is used for the document title or subject name.
-It has the peculiarity of remembering the first
-argument it was called with, which should
-always be the subject name of the page.
-When called without
-arguments,
-.Ql \&.Nm
-regurgitates this initial name for the sole purpose
-of making less work for the author.
-If trailing punctuation is required with this feature,
-use
-.Qq
-as a first argument to
-.Ql \&.Nm .
-Note:
-a section two
-or three document function name is addressed with the
-.Ql \&.Nm
-in the
-.Sx NAME
-section, and with
-.Ql \&.Fn
-in the
-.Sx SYNOPSIS
-and remaining sections.
-For interactive commands, such as the
-.Ql while
-command keyword in
-.Xr csh 1 ,
-the
-.Ql \&.Ic
-macro should be used.
-While the
-.Ql \&.Ic
-is nearly identical
-to
-.Ql \&.Nm ,
-it can not recall the first argument it was invoked with.
-.Pp
-.Dl Usage: .Nm argument ... \*(Pu
-.Bl -tag -width ".Nm mdoc.samples" -compact -offset 14n
-.It Li \&.Nm mdoc.samples
-.Nm mdoc.samples
-.It Li \&.Nm \e-mdoc
-.Nm \-mdoc
-.It Li \&.Nm foo\ )\ )\ ,
-.Nm foo ) ) ,
-.It Li \&.Nm
-.Nm
-.It Li \&.Nm \&"\&"\ :
-.Nm "" :
-.El
-.Pp
-The
-.Ql \&.Nm
-macro is parsed and is callable.
-.Ss Options
-The
-.Ql \&.Op
-macro
-places option brackets around the any remaining arguments on the command
-line, and places any
-trailing punctuation outside the brackets.
-The macros
-.Ql \&.Oc
-and
-.Ql \&.Oo
-may be used across one or more lines.
-.Pp
-.Dl Usage: .Op options ... \*(Pu
-.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent
-.It Li \&.Op
-.Op
-.It Li ".Op Fl k"
-.Op Fl k
-.It Li ".Op Fl k ) ."
-.Op Fl k ) .
-.It Li ".Op Fl k Ar kookfile"
-.Op Fl k Ar kookfile
-.It Li ".Op Fl k Ar kookfile ,"
-.Op Fl k Ar kookfile ,
-.It Li ".Op Ar objfil Op Ar corfil"
-.Op Ar objfil Op Ar corfil
-.It Li ".Op Fl c Ar objfil Op Ar corfil ,"
-.Op Fl c Ar objfil Op Ar corfil ,
-.It Li \&.Op word1 word2
-.Op word1 word2
-.El
-.Pp
-The
-.Ql \&.Oc
-and
-.Ql \&.Oo
-macros:
-.Bd -literal -offset indent
-\&.Oo
-\&.Op \&Fl k \&Ar kilobytes
-\&.Op \&Fl i \&Ar interval
-\&.Op \&Fl c \&Ar count
-\&.Oc
-.Ed
-.Pp
-Produce:
-.Oo
-.Op Fl k Ar kilobytes
-.Op Fl i Ar interval
-.Op Fl c Ar count
-.Oc
-.Pp
-The macros
-.Ql \&.Op ,
-.Ql \&.Oc
-and
-.Ql \&.Oo
-are parsed and are callable.
-.Ss Pathnames
-The
-.Ql \&.Pa
-macro formats path or file names.
-.Pp
-.Dl Usage: .Pa pathname \*(Pu
-.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n
-.It Li \&.Pa /usr/share
-.Pa /usr/share
-.It Li \&.Pa /tmp/fooXXXXX\ )\ .
-.Pa /tmp/fooXXXXX ) .
-.El
-.Pp
-The
-.Ql \&.Pa
-macro is parsed and is callable.
-.Ss Variables
-Generic variable reference:
-.Pp
-.Dl Usage: .Va variable ... \*(Pu
-.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n
-.It Li \&.Va count
-.Va count
-.It Li \&.Va settimer ,
-.Va settimer ,
-.It Li \&.Va int\ *prt\ )\ :
-.Va int\ *prt ) :
-.It Li \&.Va char\ s\ ]\ )\ )\ ,
-.Va char\ s ] ) ) ,
-.El
-.Pp
-It is an error to call
-.Ql \&.Va
-without any arguments.
-The
-.Ql \&.Va
-macro is parsed and is callable.
-.Ss Manual Page Cross References
-The
-.Ql \&.Xr
-macro expects the first argument to be
-a manual page name, and the second argument, if it exists,
-to be either a section page number or punctuation.
-Any
-remaining arguments are assumed to be punctuation.
-.Pp
-.Dl Usage: .Xr man_page [1,...,9] \*(Pu
-.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n
-.It Li \&.Xr mdoc
-.Xr mdoc
-.It Li \&.Xr mdoc\ ,
-.Xr mdoc ,
-.It Li \&.Xr mdoc 7
-.Xr mdoc 7
-.It Li \&.Xr mdoc 7\ )\ )\ ,
-.Xr mdoc 7 ) ) ,
-.El
-.Pp
-The
-.Ql \&.Xr
-macro is parsed and is callable.
-It is an error to call
-.Ql \&.Xr
-without
-any arguments.
-.Sh GENERAL TEXT DOMAIN
-.Ss AT&T Macro
-.Bd -literal -offset indent -compact
-Usage: .At [v1 .. v7 | 32v | V.1 | V.4] ... \*(Pu
-.Ed
-.Bl -tag -width ".At v6 ) ," -compact -offset 14n
-.It Li ".At"
-.At
-.It Li ".At v6 ."
-.At v6 .
-.El
-.Pp
-The
-.Ql \&.At
-macro is
-.Em not
-parsed and
-.Em not
-callable. It accepts at most two arguments.
-.Ss BSD Macro
-.Dl Usage: .Bx [Version/release] ... \*(Pu
-.Bl -tag -width ".Bx 4.3 ) ," -compact -offset 14n
-.It Li ".Bx"
-.Bx
-.It Li ".Bx 4.3 ."
-.Bx 4.3 .
-.El
-.Pp
-The
-.Ql \&.Bx
-macro is parsed and is callable.
-.Ss NetBSD Macro
-.Dl Usage: .Nx [Version/release] ... \*(Pu
-.Bl -tag -width ".Nx 1.4 ) ," -compact -offset 14n
-.It Li ".Nx"
-.Nx
-.It Li ".Nx 1.4 ."
-.Nx 1.4 .
-.El
-.Pp
-The
-.Ql \&.Nx
-macro is parsed and is callable.
-.Ss FreeBSD Macro
-.Dl Usage: .Fx [Version/release] ... \*(Pu
-.Bl -tag -width ".Fx 2.2 ) ," -compact -offset 14n
-.It Li ".Fx"
-.Fx
-.It Li ".Fx 2.2 ."
-.Fx 2.2 .
-.El
-.Pp
-The
-.Ql \&.Fx
-macro is parsed and is callable.
-.Ss UNIX Macro
-.Dl Usage: .Ux ... \*(Pu
-.Bl -tag -width ".Ux 4.3 ) ," -compact -offset 14n
-.It Li ".Ux"
-.Ux
-.El
-.Pp
-The
-.Ql \&.Ux
-macro is parsed and is callable.
-.Ss Emphasis Macro
-Text may be stressed or emphasized with the
-.Ql \&.Em
-macro.
-The usual font for emphasis is italic.
-.Pp
-.Dl Usage: .Em argument ... \*(Pu
-.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n
-.It Li ".Em does not"
-.Em does not
-.It Li ".Em exceed 1024 ."
-.Em exceed 1024 .
-.It Li ".Em vide infra ) ) ,"
-.Em vide infra ) ) ,
-.El
-.\" .Pp
-.\" The emphasis can be forced across several lines of text by using
-.\" the
-.\" .Ql \&.Bf
-.\" macro discussed in
-.\" .Sx Modes
-.\" under
-.\" .Sx PAGE STRUCTURE DOMAIN .
-.\" .Pp
-.\" .Bf -emphasis
-.\" We are certain the reason most people desire a Harvard MBA
-.\" so they can become to be successful philanthropists. Only
-.\" mathematicians and physicists go to graduate school strictly
-.\" to acquire infinite wealthy and fame. Its that inifinity
-.\" word that does it to them. Ruins them.
-.\" .Ef
-.Pp
-The
-.Ql \&.Em
-macro is parsed and is callable.
-It is an error to call
-.Ql \&.Em
-without arguments.
-.Ss Enclosure and Quoting Macros
-The concept of enclosure is similar to quoting.
-The object being to enclose one or more strings between
-a pair of characters like quotes or parentheses.
-The terms quoting and enclosure are used
-interchangeably throughout this document.
-Most of the
-one line enclosure macros end
-in small letter
-.Ql q
-to give a hint of quoting, but there are a few irregularities.
-For each enclosure macro
-there is also a pair of open and close macros which end
-in small letters
-.Ql o
-and
-.Ql c
-respectively.
-These can be used across one or more lines of text
-and while they have nesting limitations, the one line quote macros
-can be used inside
-of them.
-.Pp
-.ne 5
-.Bd -filled -offset indent
-.Bl -column "quote " "close " "open " "Enclose Stringx(in XX) " XXstringXX
-.Em " Quote Close Open Function Result"
-\&.Aq .Ac .Ao Angle Bracket Enclosure <string>
-\&.Bq .Bc .Bo Bracket Enclosure [string]
-\&.Dq .Dc .Do Double Quote ``string''
- .Ec .Eo Enclose String (in XX) XXstringXX
-\&.Pq .Pc .Po Parenthesis Enclosure (string)
-\&.Ql Quoted Literal `st' or string
-\&.Qq .Qc .Qo Straight Double Quote "string"
-\&.Sq .Sc .So Single Quote `string'
-.El
-.Ed
-.Pp
-Except for the irregular macros noted below, all
-of the quoting macros are parsed and callable.
-All handle punctuation properly, as long as it
-is presented one character at a time and separated by spaces.
-The quoting macros examine opening and closing punctuation
-to determine whether it comes before or after the
-enclosing string. This makes some nesting possible.
-.Bl -tag -width xxx,xxxx
-.It Li \&.Ec , \&.Eo
-These macros expect the first argument to be the
-opening and closing strings respectively.
-.It Li \&.Ql
-The quoted literal macro behaves differently for
-.Xr troff
-than
-.Xr nroff .
-If formatted with
-.Xr nroff ,
-a quoted literal is always quoted. If formatted with
-troff, an item is only quoted if the width
-of the item is less than three constant width characters.
-This is to make short strings more visible where the font change
-to literal (constant width) is less noticeable.
-.It Li \&.Pf
-The prefix macro is not callable, but it is parsed:
-.Bl -tag -width "(namexx" -offset indent
-.It Li ".Pf ( Fa name2"
-becomes
-.Pf ( Fa name2 .
-.El
-.It Li \&.Ns
-The
-.Ql \&.Ns
-(no space) macro, which
-.Em is
-callable,
-performs the analogous suffix function.
-.It Li ".Ap
-The \&.Ap macro inserts an apostrophe and exits any special text modes,
-continuing in
-.Li \&.No
-mode.
-.El
-.Pp
-.ne 4
-Examples of quoting:
-.Bl -tag -width ".Aq Pa ctype.h ) ,xxxxxxxx" -compact -offset indent
-.It Li \&.Aq
-.Aq
-.It Li \&.Aq \&Ar ctype.h\ )\ ,
-.Aq Ar ctype.h ) ,
-.It Li \&.Bq
-.Bq
-.It Li \&.Bq \&Em Greek \&, French \&.
-.Bq Em Greek , French .
-.It Li \&.Dq
-.Dq
-.It Li ".Dq string abc ."
-.Dq string abc .
-.It Li ".Dq \'^[A-Z]\'"
-.Dq \'^[A-Z]\'
-.It Li "\&.Ql man mdoc"
-.Ql man mdoc
-.It Li \&.Qq
-.Qq
-.It Li "\&.Qq string ) ,"
-.Qq string ) ,
-.It Li "\&.Qq string Ns ),"
-.Qq string Ns ),
-.It Li \&.Sq
-.Sq
-.It Li "\&.Sq string
-.Sq string
-.It Li "\&.Em or Ap ing
-.Em or Ap ing
-.El
-.Pp
-For a good example of nested enclosure macros, see the
-.Ql \&.Op
-option macro.
-It was created from the same
-underlying enclosure macros as those presented in the list
-above.
-The
-.Ql \&.Xo
-and
-.Ql \&.Xc
-extended argument list macros
-were also built from the same underlying routines and are a good
-example of
-.Nm \-mdoc
-macro usage at its worst.
-.Ss No\-Op or Normal Text Macro
-The macro
-.Li \&.No
-is
-a hack for words in a macro command line which should
-.Em not
-be formatted and follows the conventional syntax
-for content macros.
-.Ss No Space Macro
-The
-.Ql \&.Ns
-macro eliminates unwanted spaces in between macro requests.
-It is useful for old style argument lists where there is no space
-between the flag and argument:
-.Bl -tag -width ".Op Fl I Ns Ar directoryxx" -offset indent
-.It Li ".Op Fl I Ns Ar directory"
-produces
-.Op Fl I Ns Ar directory
-.El
-.Pp
-Note: the
-.Ql \&.Ns
-macro always invokes the
-.Ql \&.No
-macro after eliminating the space unless another macro name
-follows it.
-The macro
-.Ql \&.Ns
-is parsed and is callable.
-.Ss Section Cross References
-The
-.Ql \&.Sx
-macro designates a reference to a section header
-within the same document.
-It is parsed and is callable.
-.Pp
-.Bl -tag -width "Li \&.Sx FILES" -offset 14n
-.It Li \&.Sx FILES
-.Sx FILES
-.El
-.Ss Symbolic
-The symbolic emphasis macro is generally a boldface macro in
-either the symbolic sense or the traditional English usage.
-.Pp
-.Dl Usage: .Sy symbol ... \*(Pu
-.Bl -tag -width ".Sy Important Noticex" -compact -offset 14n
-.It Li \&.Sy Important Notice
-.Sy Important Notice
-.El
-.Pp
-The
-.Ql \&.Sy
-macro is parsed and is callable.
-Arguments to
-.Ql \&.Sy
-may be quoted.
-.Ss References and Citations
-The following macros make a modest attempt to handle references.
-At best, the macros make it convenient to manually drop in a subset of
-refer style references.
-.Pp
-.Bl -tag -width 6n -offset indent -compact
-.It Li ".Rs"
-Reference Start.
-Causes a line break and begins collection
-of reference information until the
-reference end macro is read.
-.It Li ".Re"
-Reference End.
-The reference is printed.
-.It Li ".%A"
-Reference author name, one name per invocation.
-.It Li ".%B"
-Book title.
-.It Li ".\&%C"
-City/place.
-.It Li ".\&%D"
-Date.
-.It Li ".%J"
-Journal name.
-.It Li ".%N"
-Issue number.
-.It Li ".%O"
-Optional information.
-.It Li ".%P"
-Page number.
-.It Li ".%R"
-Report name.
-.It Li ".%T"
-Title of article.
-.It Li ".%V"
-Volume(s).
-.El
-.Pp
-The macros beginning with
-.Ql %
-are not callable, and are parsed only for the trade name macro which
-returns to its caller.
-(And not very predictably at the moment either.)
-The purpose is to allow trade names
-to be pretty printed in
-.Xr troff Ns / Ns Xr ditroff
-output.
-.Ss Trade Names (or Acronyms and Type Names)
-The trade name macro is generally a small caps macro for
-all upper case words longer than two characters.
-.Pp
-.Dl Usage: .Tn symbol ... \*(Pu
-.Bl -tag -width ".Tn ASCII" -compact -offset 14n
-.It Li \&.Tn DEC
-.Tn DEC
-.It Li \&.Tn ASCII
-.Tn ASCII
-.El
-.Pp
-The
-.Ql \&.Tn
-macro
-is parsed and is callable by other macros.
-.Ss Extended Arguments
-The
-.Li \&.Xo
-and
-.Li \&.Xc
-macros allow one to extend an argument list
-on a macro boundary.
-Argument lists cannot
-be extended within a macro
-which expects all of its arguments on one line such
-as
-.Ql \&.Op .
-.Pp
-Here is an example of
-.Ql \&.Xo
-using the space mode macro to turn spacing off:
-.Bd -literal -offset indent
-\&.Sm off
-\&.It Xo Sy I Ar operation
-\&.No \een Ar count No \een
-\&.Xc
-\&.Sm on
-.Ed
-.Pp
-Produces
-.Bd -filled -offset indent
-.Bl -tag -width flag -compact
-.Sm off
-.It Xo Sy I Ar operation
-.No \en Ar count No \en
-.Xc
-.Sm on
-.El
-.Ed
-.Pp
-Another one:
-.Bd -literal -offset indent
-\&.Sm off
-\&.It Cm S No \&/ Ar old_pattern Xo
-\&.No \&/ Ar new_pattern
-\&.No \&/ Op Cm g
-\&.Xc
-\&.Sm on
-.Ed
-.Pp
-Produces
-.Bd -filled -offset indent
-.Bl -tag -width flag -compact
-.Sm off
-.It Cm S No \&/ Ar old_pattern Xo
-.No \&/ Ar new_pattern
-.No \&/ Op Cm g
-.Xc
-.Sm on
-.El
-.Ed
-.Pp
-Another example of
-.Ql \&.Xo
-and using enclosure macros:
-Test the value of an variable.
-.Bd -literal -offset indent
-\&.It Xo
-\&.Ic .ifndef
-\&.Oo \e&! Oc Ns Ar variable
-\&.Op Ar operator variable ...
-\&.Xc
-.Ed
-.Pp
-Produces
-.Bd -filled -offset indent
-.Bl -tag -width flag -compact
-.It Xo
-.Ic .ifndef
-.Oo \&! Oc Ns Ar variable
-.Op Ar operator variable ...
-.Xc
-.El
-.Ed
-.Pp
-All of the above examples have used the
-.Ql \&.Xo
-macro on the argument list of the
-.Ql \&.It
-(list-item)
-macro.
-The extend macros are not used very often, and when they are
-it is usually to extend the list-item argument list.
-Unfortunately, this is also where the extend macros are the
-most finicky.
-In the first two examples, spacing was turned off;
-in the third, spacing was desired in part of the output but
-not all of it.
-To make these macros work in this situation make sure
-the
-.Ql \&.Xo
-and
-.Ql \&.Xc
-macros are placed as shown in the third example.
-If the
-.Ql \&.Xo
-macro is not alone on the
-.Ql \&.It
-argument list, spacing will be unpredictable.
-The
-.Ql \&.Ns
-(no space macro)
-must not occur as the first or last macro on a line
-in this situation.
-Out of 900 manual pages (about 1500 actual pages)
-currently released with
-.Bx
-only fifteen use the
-.Ql \&.Xo
-macro.
-.Sh PAGE STRUCTURE DOMAIN
-.Ss Section Headers
-The first three
-.Ql \&.Sh
-section header macros
-list below are required in every
-man page.
-The remaining section headers
-are recommended at the discretion of the author
-writing the manual page.
-The
-.Ql \&.Sh
-macro can take up to nine arguments.
-It is parsed and but is not callable.
-.Bl -tag -width ".Sh SYNOPSIS"
-.It \&.Sh NAME
-The
-.Ql \&.Sh NAME
-macro is mandatory.
-If not specified,
-the headers, footers and page layout defaults
-will not be set and things will be rather unpleasant.
-The
-.Sx NAME
-section consists of at least three items.
-The first is the
-.Ql \&.Nm
-name macro naming the subject of the man page.
-The second is the Name Description macro,
-.Ql \&.Nd ,
-which separates the subject
-name from the third item, which is the description.
-The
-description should be the most terse and lucid possible,
-as the space available is small.
-.It \&.Sh SYNOPSIS
-The
-.Sx SYNOPSIS
-section describes the typical usage of the
-subject of a man page.
-The macros required
-are either
-.Ql ".Nm" ,
-.Ql ".Cd" ,
-.Ql ".Fn" ,
-(and possibly
-.Ql ".Fo" ,
-.Ql ".Fc" ,
-.Ql ".Fd" ,
-.Ql ".Ft"
-macros).
-The function name
-macro
-.Ql ".Fn"
-is required
-for manual page sections 2 and 3, the command and general
-name macro
-.Ql \&.Nm
-is required for sections 1, 5, 6, 7, 8.
-Section 4 manuals require a
-.Ql ".Nm" , ".Fd"
-or a
-.Ql ".Cd"
-configuration device usage macro.
-Several other macros may be necessary to produce
-the synopsis line as shown below:
-.Pp
-.Bd -filled -offset indent
-.Nm cat
-.Op Fl benstuv
-.Op Fl
-.Ar
-.Ed
-.Pp
-The following macros were used:
-.Pp
-.Dl \&.Nm cat
-.Dl \&.Op \&Fl benstuv
-.Dl \&.Op \&Fl
-.Dl \&.Ar
-.Pp
-.Sy Note :
-The macros
-.Ql \&.Op ,
-.Ql \&.Fl ,
-and
-.Ql \&.Ar
-recognize the pipe bar character
-.Ql \*(Ba ,
-so a command line such as:
-.Pp
-.Dl ".Op Fl a | Fl b"
-.Pp
-will not go orbital.
-.Xr Troff
-normally interprets a \*(Ba as a special operator.
-See
-.Sx PREDEFINED STRINGS
-for a usable \*(Ba
-character in other situations.
-.It \&.Sh DESCRIPTION
-In most cases the first text in the
-.Sx DESCRIPTION
-section
-is a brief paragraph on the command, function or file,
-followed by a lexical list of options and respective
-explanations.
-To create such a list, the
-.Ql \&.Bl
-begin-list,
-.Ql \&.It
-list-item and
-.Ql \&.El
-end-list
-macros are used (see
-.Sx Lists and Columns
-below).
-.El
-.Pp
-The following
-.Ql \&.Sh
-section headers are part of the
-preferred manual page layout and must be used appropriately
-to maintain consistency.
-They are listed in the order
-in which they would be used.
-.Bl -tag -width SYNOPSIS
-.It \&.Sh ENVIRONMENT
-The
-.Sx ENVIRONMENT
-section should reveal any related
-environment
-variables and clues to their behavior and/or usage.
-.It \&.Sh EXAMPLES
-There are several ways to create examples.
-See
-the
-.Sx EXAMPLES
-section below
-for details.
-.It \&.Sh FILES
-Files which are used or created by the man page subject
-should be listed via the
-.Ql \&.Pa
-macro in the
-.Sx FILES
-section.
-.It \&.Sh SEE ALSO
-References to other material on the man page topic and
-cross references to other relevant man pages should
-be placed in the
-.Sx SEE ALSO
-section.
-Cross references
-are specified using the
-.Ql \&.Xr
-macro.
-At this time
-.Xr refer 1
-style references are not accommodated.
-.Pp
-It is recommended that the cross references are sorted on the section
-number, and then alphabetically on the names within a section.
-.It \&.Sh STANDARDS
-If the command, library function or file adheres to a
-specific implementation such as
-.St -p1003.2
-or
-.St -ansiC
-this should be noted here.
-If the
-command does not adhere to any standard, its history
-should be noted in the
-.Sx HISTORY
-section.
-.It \&.Sh HISTORY
-Any command which does not adhere to any specific standards
-should be outlined historically in this section.
-.It \&.Sh AUTHORS
-Credits, if need be, should be placed here.
-.It \&.Sh DIAGNOSTICS
-Diagnostics from a command should be placed in this section.
-.It \&.Sh ERRORS
-Specific error handling, especially from library functions
-(man page sections 2 and 3) should go here.
-The
-.Ql \&.Er
-macro is used to specify an errno.
-.It \&.Sh BUGS
-Blatant problems with the topic go here...
-.El
-.Pp
-User specified
-.Ql \&.Sh
-sections may be added,
-for example, this section was set with:
-.Bd -literal -offset 14n
-\&.Sh PAGE LAYOUT MACROS
-.Ed
-.Ss Paragraphs and Line Spacing.
-.Bl -tag -width 6n
-.It \&.Pp
-The \&.Pp paragraph command may
-be used to specify a line space where necessary.
-The macro is not necessary after a
-.Ql \&.Sh
-or
-.Ql \&.Ss
-macro or before
-a
-.Ql \&.Bl
-macro.
-(The
-.Ql \&.Bl
-macro asserts a vertical distance unless the -compact flag is given).
-.El
-.\" This worked with version one, need to redo for version three
-.\" .Pp
-.\" .Ds I
-.\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
-.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx\ (
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va ax
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy \+
-.\" .Cx
-.\" .Cl Cx \&(\&
-.\" .Va ax
-.\" .Cx +
-.\" .Va by
-.\" .Cx +
-.\" .Va c )
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cx \t
-.\" .Li \&.Va by
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy \+
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va c )
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.\" This example shows the same equation in a different format.
-.\" The spaces
-.\" around the
-.\" .Li \&+
-.\" signs were forced with
-.\" .Li \e :
-.\" .Pp
-.\" .Ds I
-.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
-.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx\ (
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va a
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy x
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx \e\ +\e\ \e&
-.\" .Cx
-.\" .Cl Cx \&(\&
-.\" .Va a
-.\" .Sy x
-.\" .Cx \ +\ \&
-.\" .Va b
-.\" .Sy y
-.\" .Cx \ +\ \&
-.\" .Va c )
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cl Cx \t\t
-.\" .Li \&.Va b
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy y
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx \e\ +\e\ \e&
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va c )
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.\" The incantation below was
-.\" lifted from the
-.\" .Xr adb 1
-.\" manual page:
-.\" .Pp
-.\" .Ds I
-.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx Op Sy ?/
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Nm m
-.\" .Cx
-.\" .Cl Cx Op Sy ?/
-.\" .Nm m
-.\" .Ad \ b1 e1 f1
-.\" .Op Sy ?/
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cx \t
-.\" .Li \&.Ar \e\ b1 e1 f1
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Op Sy ?/
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.Ss Keeps
-The only keep that is implemented at this time is for words.
-The macros are
-.Ql \&.Bk
-(begin-keep)
-and
-.Ql \&.Ek
-(end-keep).
-The only option that
-.Ql \&.Bl
-accepts is
-.Fl words
-and is useful for preventing line breaks in the middle of options.
-In the example for the make command line arguments (see
-.Sx What's in a name ) ,
-the keep prevented
-.Xr nroff
-from placing up the
-flag and the argument
-on separate lines.
-(Actually, the option macro used to prevent this from occurring,
-but was dropped when the decision (religious) was made to force
-right justified margins in
-.Xr troff
-as options in general look atrocious when spread across a sparse
-line.
-More work needs to be done with the keep macros, a
-.Fl line
-option needs to be added.)
-.Ss Examples and Displays
-There are six types of displays, a quickie one line indented display
-.Ql \&.D1 ,
-a quickie one line literal display
-.Ql \&.Dl ,
-and block literal, block filled, block unfilled, and block ragged which use
-the
-.Ql \&.Bd
-begin-display
-and
-.Ql \&.Ed
-end-display macros.
-.Pp
-.Bl -tag -width \&.Dlxx
-.It Li \&.D1
-(D-one) Display one line of indented text.
-This macro is parsed, but it is not callable.
-.Pp
-.Dl Fl ldghfstru
-.Pp
-The above was produced by:
-.Li \&.Dl Fl ldghfstru .
-.It Li \&.Dl
-(D-ell)
-Display one line of indented
-.Em literal
-text.
-The
-.Ql \&.Dl
-example macro has been used throughout this
-file.
-It allows
-the indent (display) of one line of text.
-Its default font is set to
-constant width (literal) however
-it is parsed and will recognized other macros.
-It is not callable however.
-.Pp
-.Dl % ls -ldg /usr/local/bin
-.Pp
-The above was produced by
-.Li \&.Dl % ls -ldg /usr/local/bin .
-.It Li \&.Bd
-Begin-display.
-The
-.Ql \&.Bd
-display must be ended with the
-.Ql \&.Ed
-macro.
-Displays may be nested within lists, but may
-.Em not
-contain other displays; this also prohibits nesting
-of .D1 and .Dl one-line displays.
-.Ql \&.Bd
-has the following syntax:
-.Pp
-.Dl ".Bd display-type [-offset offset_value] [-compact]"
-.Pp
-The display-type must be one of the following four types and
-may have an offset specifier for indentation:
-.Ql \&.Bd .
-.Pp
-.Bl -tag -width "file file_name " -compact
-.It Fl ragged
-Fill, but do not adjust the right margin.
-.It Fl unfilled
-Do not fill: display a block of text as typed, the
-right (and left) margin edges are left ragged.
-.It Fl filled
-Display a filled (formatted) block.
-The block of text is formatted (the edges are filled \-
-not left unjustified).
-.It Fl literal
-Display a literal block, useful for source code or
-simple tabbed or spaced text.
-.It Fl file Ar file_name
-The file name following the
-.Fl file
-flag is read and displayed.
-Literal mode is
-asserted and tabs are set at 8 constant width character
-intervals, however any
-.Xr troff/ Ns Nm \-mdoc
-commands in file will be processed.
-.It Fl offset Ar string
-If
-.Fl offset
-is specified with one of the following strings, the string
-is interpreted to indicate the level of indentation for the
-forthcoming block of text:
-.Pp
-.Bl -tag -width "indent-two" -compact
-.It Ar left
-Align block on the current left margin,
-this is the default mode of
-.Ql \&.Bd .
-.It Ar center
-Supposedly center the block.
-At this time
-unfortunately, the block merely gets
-left aligned about an imaginary center margin.
-.It Ar indent
-Indents by one default indent value or tab.
-The default
-indent value is also used for the
-.Ql \&.D1
-display so one is guaranteed the two types of displays
-will line up.
-This indent is normally set to 6n or about two
-thirds of an inch (six constant width characters).
-.It Ar indent-two
-Indents two times the default indent value.
-.It Ar right
-This
-.Em left
-aligns the block about two inches from
-the right side of the page.
-This macro needs
-work and perhaps may never do the right thing by
-.Xr troff .
-.El
-.El
-.It ".Ed"
-End-display.
-.El
-.Ss Tagged Lists and Columns
-There are several types of lists which may be initiated with the
-.Ql ".Bl"
-begin-list macro.
-Items within the list
-are specified with the
-.Ql ".It"
-item macro and
-each list must end with the
-.Ql ".El"
-macro.
-Lists other than
-.Li \-enum
-may be nested within themselves and within displays.
-The use of columns inside of lists or lists inside of columns
-is unproven.
-.Pp
-In addition, several list attributes may be specified such as
-the width of a tag, the list offset, and compactness
-(blank lines between items allowed or disallowed).
-Most of this document has been formatted with a tag style list
-.Pq Fl tag .
-For a change of pace, the list-type used to present the list-types
-is an over-hanging list
-.Pq Fl ohang .
-This type of list is quite popular with
-.Tn TeX
-users, but might look a bit funny after having read many pages of
-tagged lists.
-The following list types are accepted by
-.Ql ".Bl" :
-.Pp
-.Bl -ohang -compact
-.It Fl bullet
-.It Fl dash
-.It Fl enum
-.It Fl hyphen
-.It Fl item
-These five are the simplest types of lists.
-Once the
-.Ql ".Bl"
-macro has been given, items in the list are merely
-indicated by a line consisting solely of the
-.Ql ".It"
-macro.
-For example, the source text for a simple enumerated list
-would look like:
-.Bd -literal -offset indent-two
-\&.Bl -enum -compact
-\&.It
-\&Item one goes here.
-\&.It
-\&And item two here.
-\&.It
-\&Lastly item three goes here.
-\&.El
-.Ed
-.Pp
-The results:
-.Pp
-.Bl -enum -offset indent-two -compact
-.It
-Item one goes here.
-.It
-And item two here.
-.It
-Lastly item three goes here.
-.El
-.Pp
-A simple bullet list construction:
-.Bd -literal -offset indent-two
-\&.Bl -bullet -compact
-\&.It
-\&Bullet one goes here.
-\&.It
-\&Bullet two here.
-\&.El
-.Ed
-.Pp
-Produces:
-.Bl -bullet -offset indent-two -compact
-.It
-Bullet one goes here.
-.It
-Bullet two here.
-.El
-.Pp
-.It Fl tag
-.It Fl diag
-.It Fl hang
-.It Fl ohang
-.It Fl inset
-These list-types collect arguments specified with the
-.Ql \&.It
-macro and create a label which may be
-.Em inset
-into the forthcoming text,
-.Em hanged
-from the forthcoming text,
-.Em overhanged
-from above and not indented or
-.Em tagged .
-This
-list was constructed with the
-.Ql Fl ohang
-list-type.
-The
-.Ql \&.It
-macro is parsed only for the inset, hang
-and tag list-types and is not callable.
-Here is an example of inset labels:
-.Bl -inset -offset indent
-.It Em Tag
-The tagged list (also called a tagged paragraph) is the
-most common type of list used in the Berkeley manuals. Use a
-.Fl width
-attribute as described below.
-.It Em Diag
-Diag lists create section four diagnostic lists
-and are similar to inset lists except callable
-macros are ignored.
-.It Em Hang
-Hanged labels are a matter of taste.
-.It Em Ohang
-Overhanging labels are nice when space is constrained.
-.It Em Inset
-Inset labels are useful for controlling blocks of
-paragraphs and are valuable for converting
-.Nm \-mdoc
-manuals to other formats.
-.El
-.Pp
-Here is the source text which produced the above example:
-.Bd -literal -offset indent
-\&.Bl -inset -offset indent
-\&.It Em Tag
-\&The tagged list (also called a tagged paragraph) is the
-\&most common type of list used in the Berkeley manuals.
-\&.It Em Diag
-\&Diag lists create section four diagnostic lists
-\&and are similar to inset lists except callable
-\&macros are ignored.
-\&.It Em Hang
-\&Hanged labels are a matter of taste.
-\&.It Em Ohang
-\&Overhanging labels are nice when space is constrained.
-\&.It Em Inset
-\&Inset labels are useful for controlling blocks of
-\&paragraphs and are valuable for converting
-\&.Nm \-mdoc
-\&manuals to other formats.
-\&.El
-.Ed
-.Pp
-Here is a hanged list with just one item:
-.Bl -hang -offset indent
-.It Em Hanged
-labels appear similar to tagged lists when the
-label is smaller than the label width.
-.It Em Longer hanged list labels
-blend in to the paragraph unlike
-tagged paragraph labels.
-.El
-.Pp
-And the unformatted text which created it:
-.Bd -literal -offset indent
-\&.Bl -hang -offset indent
-\&.It Em Hanged
-\&labels appear similar to tagged lists when the
-\&label is smaller than the label width.
-\&.It Em Longer hanged list labels
-\&blend in to the paragraph unlike
-\&tagged paragraph labels.
-\&.El
-.Ed
-.Pp
-The tagged list which follows uses a width specifier to control
-the width of the tag.
-.Pp
-.Bl -tag -width "PAGEIN" -compact -offset indent
-.It SL
-sleep time of the process (seconds blocked)
-.It PAGEIN
-number of disk
-.Tn I/O Ns 's
-resulting from references
-by the process to pages not loaded in core.
-.It UID
-numerical user-id of process owner
-.It PPID
-numerical id of parent of process process priority
-(non-positive when in non-interruptible wait)
-.El
-.Pp
-The raw text:
-.Bd -literal -offset indent
-\&.Bl -tag -width "PAGEIN" -compact -offset indent
-\&.It SL
-\&sleep time of the process (seconds blocked)
-\&.It PAGEIN
-\&number of disk
-\&.Tn I/O Ns 's
-\&resulting from references
-\&by the process to pages not loaded in core.
-\&.It UID
-\&numerical user-id of process owner
-\&.It PPID
-\&numerical id of parent of process process priority
-\&(non-positive when in non-interruptible wait)
-\&.El
-.Ed
-.Pp
-Acceptable width specifiers:
-.Bl -tag -width Ar -offset indent
-.It Fl width Ar "\&Fl"
-sets the width to the default width for a flag.
-All callable
-macros have a default width value.
-The
-.Ql \&.Fl ,
-value is presently
-set to ten constant width characters or about five sixth of
-an inch.
-.It Fl width Ar "24n"
-sets the width to 24 constant width characters or about two
-inches.
-The
-.Ql n
-is absolutely necessary for the scaling to work correctly.
-.It Fl width Ar "ENAMETOOLONG"
-sets width to the constant width length of the
-string given.
-.It Fl width Ar "\\*qint mkfifo\\*q"
-again, the width is set to the constant width of the string
-given.
-.El
-.Pp
-If a width is not specified for the tag list type, the first
-time
-.Ql \&.It
-is invoked, an attempt is made to determine an appropriate
-width.
-If the first argument to
-.Ql ".It"
-is a callable macro, the default width for that macro will be used
-as if the macro name had been supplied as the width.
-However,
-if another item in the list is given with a different callable
-macro name, a new and nested list is assumed. This effectively
-means that
-.Fl width
-is required for the tag list type.
-.Pp
-.It Fl column
-This list type generates multiple columns.
-The number of columns and the width of each column is determined by
-the arguments to the
-.Fl column
-list.
-Each
-.Ql ".It"
-argument is parsed to make a row, each column within the
-row is a separate argument separated by a tab or the
-.Ql ".Ta"
-macro.
-.El
-The table:
-.Bl -column "String" "Nroff" "Troff" -offset indent
-.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff"
-.It Li "<=" Ta \&<\&= Ta \*(<=
-.It Li ">=" Ta \&>\&= Ta \*(>=
-.El
-.Pp
-was produced by:
-.Bd -literal -offset indent
-\&.Bl -column "String" "Nroff" "Troff" -offset indent
-\&.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff"
-\&.It Li "<=" Ta \&<\&= Ta \*(<=
-\&.It Li ">=" Ta \&>\&= Ta \*(>=
-\&.El
-.Ed
-.Sh PREDEFINED STRINGS
-The following strings are predefined as may be used by
-preceding with the troff string interpreting sequence
-.Ql \&\e*(xx
-where
-.Em xx
-is the name of the defined string or as
-.Ql \&\e*x
-where
-.Em x
-is the name of the string.
-The interpreting sequence may be used any where in the text.
-.Pp
-.Bl -column "String " "Nroff " "Troff " -offset indent
-.It Sy "String Nroff Troff"
-.It Li "<=" Ta \&<\&= Ta \*(<=
-.It Li ">=" Ta \&>\&= Ta \*(>=
-.It Li "Rq" Ta "''" Ta \*(Rq
-.It Li "Lq" Ta "``" Ta \*(Lq
-.It Li "ua" Ta ^ Ta \*(ua
-.It Li "aa" Ta ' Ta \*(aa
-.It Li "ga" Ta \` Ta \*(ga
-.\" .It Li "sL" Ta ` Ta \*(sL
-.\" .It Li "sR" Ta ' Ta \*(sR
-.It Li "q" Ta \&" Ta \*q
-.It Li "Pi" Ta pi Ta \*(Pi
-.It Li "Ne" Ta != Ta \*(Ne
-.It Li "Le" Ta <= Ta \*(Le
-.It Li "Ge" Ta >= Ta \*(Ge
-.It Li "Lt" Ta < Ta \*(Gt
-.It Li "Gt" Ta > Ta \*(Lt
-.It Li "Pm" Ta +- Ta \*(Pm
-.It Li "If" Ta infinity Ta \*(If
-.It Li "Na" Ta \fINaN\fP Ta \*(Na
-.It Li "Ba" Ta \fR\&|\fP Ta \*(Ba
-.El
-.Pp
-.Sy Note :
-The string named
-.Ql q
-should be written as
-.Ql \e*q
-since it is only one char.
-.Sh DIAGNOSTICS
-The debugging facilities for
-.Nm \-mdoc
-are limited, but can help detect subtle errors such
-as the collision of an argument name with an internal
-register or macro name.
-(A what?)
-A register is an arithmetic storage class for
-.Xr troff
-with a one or two character name.
-All registers internal to
-.Nm \-mdoc
-for
-.Xr troff
-and
-.Xr ditroff
-are two characters and
-of the form <upper_case><lower_case> such as
-.Ql \&Ar ,
-<lower_case><upper_case> as
-.Ql \&aR
-or
-<upper or lower letter><digit> as
-.Ql \&C\&1 .
-And adding to the muddle,
-.Xr troff
-has its own internal registers all of which are either
-two lower case characters or a dot plus a letter or meta-character
-character.
-In one of the introduction examples, it was shown how to
-prevent the interpretation of a macro name with the escape sequence
-.Ql \e& .
-This is sufficient for the internal register names also.
-.Pp
-.\" Every callable macro name has a corresponding register
-.\" of the same name (<upper_case><lower_case>).
-.\" There are also specific registers which have
-.\" been used for stacks and arrays and are listed in the
-.\" .Sx Appendix .
-.\" .Bd -ragged -offset 4n
-.\" [A-Z][a-z] registers corresponding to macro names (example ``Ar'')
-.\" [a-z][A-Z] registers corresponding to macro names (example ``aR'')
-.\" C[0-9] argument types (example C1)
-.\" O[0-9] offset stack (displays)
-.\" h[0-9] horizontal spacing stack (lists)
-.\" o[0-9] offset (stack) (lists)
-.\" t[0-9] tag stack (lists)
-.\" v[0-9] vertical spacing stack (lists)
-.\" w[0-9] width tag/label stack
-.\" .Ed
-.\" .Pp
-If a non-escaped register name is given in the argument list of a request
-unpredictable behavior will occur.
-In general, any time huge portions
-of text do not appear where expected in the output, or small strings
-such as list tags disappear, chances are there is a misunderstanding
-about an argument type in the argument list.
-Your mother never intended for you to remember this evil stuff - so here
-is a way to find out whether or not your arguments are valid: The
-.Ql \&.Db
-(debug)
-macro displays the interpretation of the argument list for most
-macros.
-Macros such as the
-.Ql \&.Pp
-(paragraph)
-macro do not contain debugging information.
-All of the callable macros do,
-and it is strongly advised whenever in doubt,
-turn on the
-.Ql \&.Db
-macro.
-.Pp
-.Dl Usage: \&.Db [on | off]
-.Pp
-An example of a portion of text with
-the debug macro placed above and below an
-artificially created problem (a flag argument
-.Ql \&aC
-which should be
-.Ql \e&aC
-in order to work):
-.Bd -literal -offset indent
-\&.Db on
-\&.Op Fl aC Ar file )
-\&.Db off
-.Ed
-.Pp
-The resulting output:
-.Bd -literal -offset indent
-DEBUGGING ON
-DEBUG(argv) MACRO: `.Op' Line #: 2
- Argc: 1 Argv: `Fl' Length: 2
- Space: `' Class: Executable
- Argc: 2 Argv: `aC' Length: 2
- Space: `' Class: Executable
- Argc: 3 Argv: `Ar' Length: 2
- Space: `' Class: Executable
- Argc: 4 Argv: `file' Length: 4
- Space: ` ' Class: String
- Argc: 5 Argv: `)' Length: 1
- Space: ` ' Class: Closing Punctuation or suffix
- MACRO REQUEST: .Op Fl aC Ar file )
-DEBUGGING OFF
-.Ed
-.Pp
-The first line of information tells the name of the calling
-macro, here
-.Ql \&.Op ,
-and the line number it appears on.
-If one or more files are involved
-(especially if text from another file is included) the line number
-may be bogus.
-If there is only one file, it should be accurate.
-The second line gives the argument count, the argument
-.Pq Ql \&Fl
-and its length.
-If the length of an argument is two characters, the
-argument is tested to see if it is executable (unfortunately, any
-register which contains a non-zero value appears executable).
-The third line gives the space allotted for a class, and the
-class type.
-The problem here is the argument aC should not be
-executable.
-The four types of classes are string, executable, closing
-punctuation and opening punctuation.
-The last line shows the entire
-argument list as it was read.
-In this next example, the offending
-.Ql \&aC
-is escaped:
-.Bd -literal -offset indent
-\&.Db on
-\&.Em An escaped \e&aC
-\&.Db off
-.Ed
-.Bd -literal -offset indent
-DEBUGGING ON
-DEBUG(fargv) MACRO: `.Em' Line #: 2
- Argc: 1 Argv: `An' Length: 2
- Space: ` ' Class: String
- Argc: 2 Argv: `escaped' Length: 7
- Space: ` ' Class: String
- Argc: 3 Argv: `aC' Length: 2
- Space: ` ' Class: String
- MACRO REQUEST: .Em An escaped &aC
-DEBUGGING OFF
-.Ed
-.Pp
-The argument
-.Ql \e&aC
-shows up with the same length of 2 as the
-.Ql \e&
-sequence produces a zero width, but a register
-named
-.Ql \e&aC
-was not found and the type classified as string.
-.Pp
-Other diagnostics consist of usage statements and are self explanatory.
-.Sh GROFF, TROFF AND NROFF
-The
-.Nm \-mdoc
-package does not need compatibility mode with
-.Xr groff .
-.Pp
-The package inhibits page breaks, and the headers and footers
-which normally occur at those breaks with
-.Xr nroff ,
-to make the manual more efficient for viewing on-line.
-At the moment,
-.Xr groff
-with
-.Fl T Ns Ar ascii
-does eject the imaginary remainder of the page at end of file.
-The inhibiting of the page breaks makes
-.Xr nroff Ns 'd
-files unsuitable for hardcopy.
-There is a register named
-.Ql \&cR
-which can be set to zero in the site dependent style file
-.Pa /usr/src/share/tmac/doc-nroff
-to restore the old style behavior.
-.Sh FILES
-.Bl -tag -width /usr/share/misc/mdoc.template -compact
-.It Pa /usr/share/tmac/tmac.doc
-manual macro package
-.It Pa /usr/share/misc/mdoc.template
-template for writing a man page
-.El
-.Sh SEE ALSO
-.Xr mdoc 7 ,
-.Xr man 1 ,
-.Xr troff 1
-.Sh BUGS
-Undesirable hyphenation on the dash of a flag
-argument is not yet resolved, and causes
-occasional mishaps in the
-.Sx DESCRIPTION
-section.
-(line break on the hyphen).
-.Pp
-Predefined strings are not declared in documentation.
-.Pp
-Section 3f has not been added to the header routines.
-.Pp
-.Ql \&.Nm
-font should be changed in
-.Sx NAME
-section.
-.Pp
-.Ql \&.Fn
-needs to have a check to prevent splitting up
-if the line length is too short.
-Occasionally it
-separates the last parenthesis, and sometimes
-looks ridiculous if a line is in fill mode.
-.Pp
-The method used to prevent header and footer page
-breaks (other than the initial header and footer) when using
-nroff occasionally places an unsightly partially filled line (blank)
-at the would be bottom of the page.
-.Pp
-If the outer-most list definition doesn't have a
-.Fl width
-argument, the
-.Ql ".It"
-elements of inner lists may not work (producing a list where
-each successive element
-.Sq walks
-to the right).
-.Pp
-The list and display macros to not do any keeps
-and certainly should be able to.
-.\" Note what happens if the parameter list overlaps a newline
-.\" boundary.
-.\" to make sure a line boundary is crossed:
-.\" .Bd -literal
-.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
-.\" .Ed
-.\" .Pp
-.\" produces, nudge nudge,
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
-.\" nudge
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
-.\" .Pp
-.\" If double quotes are used, for example:
-.\" .Bd -literal
-.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
-.\" .Ed
-.\" .Pp
-.\" produces, nudge nudge,
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
-.\" nudge
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
-.\" nudge
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
-.\" .Pp
-.\" Not a pretty sight...
-.\" In a paragraph, a long parameter containing unpaddable spaces as
-.\" in the former example will cause
-.\" .Xr troff
-.\" to break the line and spread
-.\" the remaining words out.
-.\" The latter example will adjust nicely to
-.\" justified margins, but may break in between an argument and its
-.\" declaration.
-.\" In
-.\" .Xr nroff
-.\" the right margin adjustment is normally ragged and the problem is
-.\" not as severe.
diff --git a/tmac/mdoc.local b/tmac/mdoc.local
new file mode 100644
index 00000000..2de66214
--- /dev/null
+++ b/tmac/mdoc.local
@@ -0,0 +1,2 @@
+.\" This file is loaded after doc.tmac.
+.\" Put any local modifications to doc.tmac here.
diff --git a/tmac/strip.sed b/tmac/strip.sed
index 3dac41e5..6133411d 100644
--- a/tmac/strip.sed
+++ b/tmac/strip.sed
@@ -1,3 +1,10 @@
-# strip all troff comments after a line containing `%beginstrip%
-/%beginstrip%/,$s/[ ]*\\".*//
+# strip comments, spaces, etc. after a line containing `%beginstrip%'
+/%beginstrip%/,$ {
+ s/^\.[ ]*/./
+ s/^\.\\".*/./
+ s/\\".*/\\"/
+ /\(.ds\)\|\(.as\)/!s/[ ]*\\"//
+ /\(.ds\)\|\(.as\)/s/\([^ ]\)\\"/\1/
+ s/\([^/]\)doc-/\1/g
+}
/^\.$/d
diff --git a/tmac/tmac.doc.new b/tmac/tmac.doc.new
deleted file mode 100755
index 45b9770e..00000000
--- a/tmac/tmac.doc.new
+++ /dev/null
@@ -1,6232 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" @(#)doc 5.8 (Berkeley) 8/5/91
-.\"
-.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
-.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
-.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
-.\" are loaded using the `mso' request.
-.\"
-.\" Modified by
-.\"
-.\" Werner LEMBERG <wl@gnu.org> and
-.\" Ruslan Ermilov <ru@freebsd.org>
-.\"
-.\" to make it more readable: using long names and many groff features,
-.\" updating and extending documentation, etc.
-.\"
-.\" %beginstrip%
-.
-.
-.if !\n(.g \
-. ab This version of mdoc can be run with GNU troff only!
-.
-.
-.cp 0
-.
-.
-.if ((\n[.x] == 0) : ((\n[.x] == 1) & (\n[.y] < 17))) \
-. ab You need GNU troff version 1.17 or higher to run this version of mdoc!
-.
-.
-.\" Load start-up files
-.ie t \
-. mso mdoc/doc-ditroff.new
-.el \
-. mso mdoc/doc-nroff.new
-.
-.mso mdoc/doc-common.new
-.mso mdoc/doc-syms.new
-.
-.
-.eo
-.
-.
-.\" NS Db macro
-.\" NS defunct
-.
-.de Db
-. tm mdoc error: .Db defunct (#\n[.c])
-..
-.
-.
-.\" NS doc-macro-name global string
-.\" NS name of calling request (set in each user-requestable macro)
-.
-.ds doc-macro-name
-.als doc-arg0 doc-macro-name
-.
-.
-.\" NS doc-arg-limit global register
-.\" NS total number of arguments
-.
-.nr doc-arg-limit 0
-.
-.
-.\" NS doc-num-args global register
-.\" NS number of arguments to handle (must be set to \n[.$] prior to
-.\" NS `doc-parse-arg-vector' request)
-.
-.nr doc-num-args 0
-.
-.
-.\" NS doc-arg-ptr global register
-.\" NS argument pointer
-.
-.nr doc-arg-ptr 0
-.
-.
-.\" NS doc-argXXX global string
-.\" NS argument vector
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.ds doc-arg1
-.
-.
-.\" NS doc-typeXXX global register
-.\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
-.\" NS punctuation prefix=4)
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.nr doc-type1 0
-.
-.
-.\" NS doc-spaceXXX global string
-.\" NS space vector
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.ds doc-space1
-.
-.
-.\" NS doc-parse-args macro
-.\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-spaceXXX
-.\" NS doc-typeXXX
-.\" NS doc-arg-ptr
-.\" NS doc-have-space
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpa
-.\" NS doc-reg-dpa1
-.\" NS doc-str-dpa
-.
-.de doc-parse-args
-. if !\n[doc-arg-limit] \
-. doc-set-spacing-1
-.
-. nr doc-have-space 0
-.
-. if !\n[.$] \
-. return
-.
-. nr doc-arg-limit +1
-.
-. \" handle `|' specially
-. ie "\$1"|" \
-. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
-. el \
-. ds doc-arg\n[doc-arg-limit] "\$1
-.
-. \" get argument type and set spacing
-. doc-get-arg-type* \n[doc-arg-limit]
-. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
-. doc-set-spacing-\n[doc-arg-type]
-.
-. \" check whether we have processed the last parameter
-. ie (\n[.$] == 1) \
-. nr doc-arg-ptr 0
-. el \{\
-. shift
-. doc-parse-args \$@
-. \}
-.
-. nh
-..
-.
-.
-.\" NS doc-parse-arg-vector macro
-.\" NS parse argument vector (recursive)
-.\" NS
-.\" NS cf. comments in doc-parse-args
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-num-args
-.\" NS doc-spaceXXX
-.\" NS doc-typeXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpav
-.\" NS doc-reg-dpav1
-.\" NS doc-str-dpav
-.
-.de doc-parse-arg-vector
-. if !\n[doc-arg-limit] \
-. doc-set-spacing-1
-.
-. nr doc-arg-limit +1
-.
-. if "\*[doc-arg\n[doc-arg-limit]]"|" \
-. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
-.
-. doc-get-arg-type* \n[doc-arg-limit]
-. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
-. doc-set-spacing-\n[doc-arg-type]
-.
-. ie (\n[doc-num-args] == 1) \{\
-. nr doc-arg-ptr 0
-. nr doc-num-args 0
-. \}
-. el \{\
-. nr doc-num-args -1
-. doc-parse-arg-vector
-. \}
-.
-. nh
-..
-.
-.
-.\" NS doc-parse-space-vector macro
-.\" NS parse space vector (recursive)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-num-args
-.\" NS doc-spaceXXX
-.
-.de doc-parse-space-vector
-. nr doc-arg-limit +1
-.
-. doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
-.
-. ie (\n[doc-num-args] == 1) \
-. nr doc-num-args 0
-. el \{\
-. nr doc-num-args -1
-. doc-parse-space-vector
-. \}
-..
-.
-.
-.\" NS doc-remaining-args macro
-.\" NS output remaining arguments as-is, separated by spaces (until
-.\" NS `doc-num-args' is exhausted)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-num-args
-.
-.de doc-remaining-args
-. nr doc-arg-ptr +1
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-.
-. ie (\n[doc-num-args] == 1) \{\
-. nr doc-arg-ptr 0
-. nr doc-num-args 0
-. \}
-. el \{\
-. nop \)\*[doc-space]\c
-. nr doc-num-args -1
-. doc-remaining-args
-. \}
-..
-.
-.
-.\" NS doc-append-arg macro
-.\" NS append one argument to argument vector:
-.\" NS `.doc-append-arg [arg] [type]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-argXXX
-.\" NS doc-typeXXX
-.
-.de doc-append-arg
-. nr doc-arg-limit +1
-. ds doc-arg\n[doc-arg-limit] "\$1
-. nr doc-type\n[doc-arg-limit] \$2
-. doc-set-spacing-\$2
-..
-.
-.
-.\" NS doc-print-and-reset macro
-.\" NS finish input line and clean up argument vectors
-.
-.de doc-print-and-reset
-. if \n[doc-space-mode] \
-. nop \)
-. doc-reset-args
-..
-.
-.
-.\" NS doc-reset-args macro
-.\" NS reset argument counters
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-have-slot
-.
-.de doc-reset-args
-. nr doc-arg-limit 0
-. nr doc-arg-ptr 0
-. nr doc-have-slot 0
-.
-. hy \n[doc-hyphen-flags]
-..
-.
-.
-.ec
-.
-.\" NS doc-curr-font global register
-.\" NS saved current font
-.
-.nr doc-curr-font \n[.f]
-.
-.
-.\" NS doc-curr-size global register
-.\" NS saved current font size
-.
-.nr doc-curr-size \n[.ps]
-.
-.eo
-.
-.
-.\" NS Fl user macro
-.\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Fl (for communication with doc-flag-recursion)
-.\" NS
-.\" NS width register `Fl' set in doc-common
-.
-.de Fl
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fl-font]\c
-.
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Fl
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" no arguments
-. nop \|\-\|\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \|\-\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
-. nop \|\-\f[P]\s[0]\c
-. \*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 3) \
-. nop \|\-\|\c
-.
-. nr doc-reg-Fl 1
-. doc-flag-recursion
-. \}\}
-..
-.
-.
-.\" NS doc-flag-recursion macro
-.\" NS `Fl' flag recursion routine (special handling)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dfr
-.\" NS doc-reg-dfr1
-.\" NS doc-str-dfr
-.
-.de doc-flag-recursion
-. nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
-. ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-dfr1] == 1) \{\
-. nop \f[P]\s[0]\c
-. \*[doc-str-dfr]
-. \}
-. el \{\
-. nr doc-reg-dfr \n[doc-arg-ptr]
-.
-. ie (\n[doc-reg-dfr1] == 2) \{\
-. \" handle vertical bar -- doc-reg-Fl is set for the first call of
-. \" doc-flag-recursion only; we need this to make `.Fl | ...' work
-. \" correctly
-. ie "\*[doc-str-dfr]"\*[Ba]" \{\
-. if \n[doc-reg-Fl] \
-. nop \|\-\*[doc-space]\c
-. nop \)\*[Ba]\c
-. \}
-. el \{\
-. ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
-. if \n[doc-reg-Fl] \
-. nop \|\-\*[doc-space]\c
-. nop \f[R]|\f[P]\c
-. \}
-. el \{\
-. \" two consecutive hyphen characters?
-. ie "\*[doc-str-dfr]"-" \
-. nop \|\-\^\-\|\c
-. el \
-. nop \|\%\-\*[doc-str-dfr]\c
-. \}\}\}
-. el \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-str-dfr]\f[P]\s[0]\c
-. \}
-.
-. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
-. \" last argument
-. if (\n[doc-reg-dfr1] == 4) \
-. nop \|\-\c
-. nop \f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
-. ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
-. nop \|\-\c
-. el \
-. nop \)\*[doc-space\n[doc-reg-dfr]]\c
-. \}
-. el \
-. nop \)\*[doc-space\n[doc-reg-dfr]]\c
-.
-. shift
-. nr doc-reg-Fl 0
-. doc-flag-recursion \$@
-. \}\}
-..
-.
-.
-.\" NS doc-print-recursive macro
-.\" NS general name recursion routine (print remaining arguments)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpr
-.\" NS doc-reg-dpr1
-.\" NS doc-str-dpr
-.
-.de doc-print-recursive
-. nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
-. ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-dpr1] == 1) \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. \*[doc-str-dpr]
-. \}
-. el \{\
-. nr doc-reg-dpr \n[doc-arg-ptr]
-.
-. ie (\n[doc-reg-dpr1] == 2) \
-. \" the `\%' prevents hyphenation on a dash (`-')
-. nop \%\*[doc-str-dpr]\&\c
-. el \{\
-. \" punctuation character
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-str-dpr]\f[P]\s[0]\c
-. \}
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. nop \)\*[doc-space\n[doc-reg-dpr]]\c
-. doc-print-recursive
-. \}\}
-..
-.
-.
-.\" NS doc-print-prefixes macro
-.\" NS print leading prefixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.
-.de doc-print-prefixes
-. while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
-. break
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
-. nr doc-arg-ptr +1
-. \}
-..
-.
-.
-.\" NS doc-generic-macro macro
-.\" NS this is the skeleton for most simple macros
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.
-.de doc-generic-macro
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name \$0
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-.
-. \" the right action here would be to reset the argument counters
-. \" and bail out -- unfortunately, a small number of manual pages
-. \" (less than 2% for FreeBSD which has been used for testing)
-. \" relied on the old behaviour (silently ignore this error),
-. \" so it is commented out
-.
-.\" doc-reset-args
-. \}
-.\" el \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-\$0-font]\c
-. doc-print-recursive
-.\" \}
-. \}
-. el \{\
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Ar user macro
-.\" NS command line `argument' macro: `.Ar [args ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Ar-default
-.\" NS
-.\" NS width register `Ar' set in doc-common
-.
-.ds doc-str-Ar-default "file\ .\|.\|.
-.
-.de Ar
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ar-font]\c
-.
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Ar
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" no argument
-. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. \" replace previous argument (Ar) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS Ad user macro
-.\" NS Addresses
-.\" NS
-.\" NS width register `Ad' set in doc-common
-.
-.als Ad doc-generic-macro
-.ds doc-Ad-usage address
-.
-.
-.\" NS doc-in-synopsis-count global register
-.\" NS whether we have more than a single item in synopsis
-.
-.nr doc-in-synopsis-count 0
-.
-.
-.\" NS doc-indent-synopsis global register
-.\" NS indentation in synopsis
-.
-.nr doc-indent-synopsis 0
-.
-.
-.\" NS Cd user macro
-.\" NS config declaration (for section 4 SYNOPSIS)
-.\" NS
-.\" NS this function causes a break; it uses the `Nm' font
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-in-synopsis-count
-.\" NS doc-indent-synopsis
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Cd' set in doc-common
-.\"
-.\" needs work - not very translatable
-.
-.de Cd
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Cd
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
-. \}
-.
-. br
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie \n[doc-in-synopsis-count] \{\
-. if "\*[doc-macro-name]"Cd" \{\
-. rs
-. ie (\n[doc-in-synopsis-count] > 1) \
-. br
-. el \{\
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis \n[doc-display-indent]u
-. \}
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. nr doc-in-synopsis-count +1
-. \}
-.
-. nop \*[doc-Nm-font]\c
-. doc-print-recursive
-. in -\n[doc-indent-synopsis]u
-. \}
-. el \{\
-. nop \*[doc-Nm-font]\c
-. doc-print-recursive
-. \}\}
-. el \{\
-. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Cm user macro
-.\" NS interactive command modifier (flag)
-.\" NS
-.\" NS width register `Cm' set in doc-common
-.
-.als Cm doc-generic-macro
-.ds doc-Cm-usage interactive_command_modifier
-.
-.
-.\" NS Dv user macro
-.\" NS defined variable
-.\" NS
-.\" NS this function uses the `Er' font
-.\" NS
-.\" NS width register `Dv' set in doc-common
-.
-.als Dv doc-generic-macro
-.ds doc-Dv-usage defined_variable
-.als doc-Dv-font doc-Er-font
-.
-.
-.\" NS Em user macro
-.\" NS emphasis
-.\" NS
-.\" NS width register `Em' set in doc-common
-.
-.als Em doc-generic-macro
-.ds doc-Em-usage text
-.
-.
-.\" NS Er user macro
-.\" NS errno type
-.\" NS
-.\" NS width register `Er' set in doc-common
-.
-.als Er doc-generic-macro
-.ds doc-Er-usage text
-.
-.
-.\" NS Ev user macro
-.\" NS environment variable
-.\" NS
-.\" NS width register `Ev' set in doc-common
-.
-.als Ev doc-generic-macro
-.ds doc-Ev-usage text
-.
-.
-.\" NS doc-have-decl global register (bool)
-.\" NS subroutine test (in synopsis only)
-.
-.nr doc-have-decl 0
-.
-.
-.\" NS doc-have-var global register (bool)
-.\" NS whether last type is a variable type
-.
-.nr doc-have-var 0
-.
-.
-.\" NS doc-do-func-decl macro
-.\" NS do someting special while in SYNOPSIS
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.
-.de doc-do-func-decl
-. if \n[doc-in-synopsis-count] \{\
-. \" if a variable type was the last thing given, want vertical space
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-. \" if a subroutine was the last thing given, want vertical space
-. if \n[doc-have-func] \{\
-. ie \n[doc-have-decl] \
-. br
-. el \{\
-. doc-paragraph
-. rs
-. \}\}
-. nr doc-have-decl 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-..
-.
-.
-.\" NS Fd user macro
-.\" NS function declaration -- not callable
-.\" NS
-.\" NS this function causes a break
-.\" NS
-.\" NS width register `Fd' set in doc-common
-.
-.de Fd
-. ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-do-func-decl
-. nop \*[doc-Fd-font]\$*
-. br
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-. el \{\
-. tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS In user macro
-.\" NS #include statement - not callable
-.\" NS
-.\" NS this function causes a break; it uses the `Fd' font
-.\" NS
-.\" NS width register `In' set in doc-common
-.
-.de In
-. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-do-func-decl
-. nop \*[doc-Fd-font]#include <\$1>
-. br
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-. el \{\
-. tm Usage: .In include_file -- In is not callable (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Fr user macro
-.\" NS function return value
-.\" NS
-.\" NS this function uses the `Ar' font
-.\" NS
-.\" NS width register `Fr' set in doc-common
-.
-.als Fr doc-generic-macro
-.ds doc-Fr-usage function_return_value
-.als doc-Fr-font doc-Ar-font
-.
-.
-.\" NS Ic user macro
-.\" NS interactive command
-.\" NS
-.\" NS width register `Ic' set in doc-common
-.
-.als Ic doc-generic-macro
-.ds doc-Ic-usage interactive_command
-.
-.
-.\" NS Li user macro
-.\" NS literals
-.\" NS
-.\" NS width register `Li' set in doc-common
-.
-.als Li doc-generic-macro
-.ds doc-Li-usage argument
-.
-.
-.\" NS Or user macro
-.\" NS pipe symbol (OR)
-.\" NS
-.\" NS this function uses the `Ic' font
-.\" NS
-.\" NS width register `Or' set in doc-common
-.\"
-.\" XXX: What is this function good for? It sets a font but does not print
-.\" a pipe symbol. And it isn't documented.
-.
-.als Or doc-generic-macro
-.ds doc-Or-usage
-.als doc-Or-font doc-Ic-font
-.
-.
-.\" NS Ms user macro
-.\" NS math symbol
-.\" NS
-.\" NS this function uses the `Sy' font
-.\" NS
-.\" NS width register `Ms' set in doc-common
-.
-.als Ms doc-generic-macro
-.ds doc-Ms-usage math_symbol
-.als doc-Ms-font doc-Sy-font
-.
-.
-.\" NS doc-command-name global string
-.\" NS save first invocation of .Nm
-.
-.ds doc-command-name
-.
-.
-.\" NS Nm user macro
-.\" NS name of command or page topic
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-command-name
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-in-synopsis-count
-.\" NS doc-indent-synopsis,
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Nm' set in doc-common
-.
-.de Nm
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Nm
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. ie "\*[doc-command-name]"" \
-. tm Usage: .Nm name ... (#\n[.c])
-. el \
-. doc-parse-args \*[doc-command-name]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. ie "\*[doc-command-name]"" \{\
-. tm Usage: .Nm name ... (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
-. doc-print-and-reset
-. \}\}
-. el \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. rs
-.
-. ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie "\*[doc-command-name]"" \
-. tm Usage: .Nm name ... (#\n[.c])
-. el \{\
-. \" replace previous argument (Nm) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}\}
-. el \{\
-. \" handle `.Nm ...' in SYNOPSIS
-. if \n[doc-in-synopsis-count] \{\
-. if "\*[doc-macro-name]"Nm" \{\
-. in -\n[doc-indent-synopsis]u
-. ie (\n[doc-in-synopsis-count] > 1) \
-. br
-. el \{\
-. if !\n[doc-indent-synopsis] \{\
-. doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
-. nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
-. \}\}
-.
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. nr doc-in-synopsis-count +1
-. \}\}
-. if "\*[doc-command-name]"" \
-. ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
-.
-. nop \*[doc-Nm-font]\c
-. \}
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS Pa user macro
-.\" NS pathname: `.Pa [arg ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Pa' set in doc-common
-.
-.de Pa
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Pa
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" default value
-. nop \*[doc-Pa-font]~\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Pa-font]\c
-. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. \" replace previous argument (Pa) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] ~
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}
-. doc-print-recursive
-. \}
-. el \{\
-. nop \*[doc-Pa-font]~\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-..
-.
-.
-.\" NS Sy user macro
-.\" NS symbolics
-.\" NS
-.\" NS width register `Sy' set in doc-common
-.
-.als Sy doc-generic-macro
-.ds doc-Sy-usage symbolic_text
-.
-.
-.\" NS Me user macro
-.\" NS menu entries
-.\" NS
-.\" NS width register `Me' set in doc-common
-.
-.als Me doc-generic-macro
-.ds doc-Me-usage menu_entry
-.
-.
-.\" NS Tn user macro
-.\" NS trade name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Tn' set in doc-common
-.
-.de Tn
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Tn
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Tn trade_name ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \)\*[doc-Tn-font-size]\c
-. ie !\n[doc-is-reference] \{\
-. nop \)\*[doc-Tn-font-shape]\c
-. doc-print-recursive
-. \}
-. el \
-. doc-do-references
-. \}
-. el \{\
-. tm Usage: .Tn trade_name ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Va user macro
-.\" NS variable name
-.\" NS
-.\" NS width register `Va' set in doc-common
-.
-.als Va doc-generic-macro
-.ds doc-Va-usage variable_name
-.
-.
-.\" NS No user macro
-.\" NS normal text macro (default text style if mess up)
-.\" NS
-.\" NS width register `No' set in doc-common
-.
-.als No doc-generic-macro
-.ds doc-No-usage normal_text
-.
-.
-.\" NS doc-quote-left global string
-.\" NS left quotation character for `doc-enclose-string' and
-.\" NS `doc-enclose-open'
-.
-.ds doc-quote-left
-.
-.
-.\" NS doc-quote-right global string
-.\" NS right quotation character for `doc-enclose-string' and
-.\" NS `doc-enclose-close'
-.
-.ds doc-quote-right
-.
-.
-.\" NS Op user macro
-.\" NS option expression (i.e., enclose string in square brackets)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Op' set in doc-common
-.
-.de Op
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Op
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Aq user macro
-.\" NS enclose string in angle brackets
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Aq' set in doc-common
-.
-.de Aq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Aq
-.
-. ds doc-quote-left \[la]
-. ds doc-quote-right \[ra]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Bq user macro
-.\" NS enclose string in square brackets
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Bq' set in doc-common
-.
-.de Bq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bq
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Brq user macro
-.\" NS enclose string in braces
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Brq' set in doc-common
-.
-.de Brq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Brq
-.
-. ds doc-quote-left {
-. ds doc-quote-right }
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Dq user macro
-.\" NS enclose string in double quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Dq' set in doc-common
-.
-.de Dq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Dq
-.
-. ds doc-quote-left "\*[Lq]
-. ds doc-quote-right "\*[Rq]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Eq user macro
-.\" NS enclose string in user-defined quotes (args 1 and 2)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Eq' set in doc-common
-.
-.de Eq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Eq
-.
-. ds doc-quote-left "\$1
-. ds doc-quote-right "\$2
-.
-. shift 2
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Pq user macro
-.\" NS enclose string in parentheses
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Pq' set in doc-common
-.
-.de Pq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pq
-.
-. ds doc-quote-left "\*[doc-left-parenthesis]
-. ds doc-quote-right "\*[doc-right-parenthesis]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Ql user macro
-.\" NS quoted literal
-.\"
-.\" is in file doc-[dit|n]roff
-.
-.
-.\" NS Qq user macro
-.\" NS enclose string in straight double quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Qq' set in doc-common
-.
-.de Qq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qq
-.
-. ds doc-quote-left "\*[q]
-. ds doc-quote-right "\*[q]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Sq user macro
-.\" NS enclose string in single quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Sq' set in doc-common
-.
-.de Sq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Sq
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-. ds doc-quote-right "\*[doc-right-singlequote]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Es user macro
-.\" NS set up arguments (i.e., the left and right quotation character as
-.\" NS first and second argument) for .En call
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.
-.de Es
-. if !\n[doc-arg-limit] \{\
-. ie (\n[.$] > 2) \{\
-. ds doc-macro-name Es
-. doc-parse-args \$@
-. \}
-. el \{\
-. ds doc-quote-left "\$1
-. ds doc-quote-right "\$2
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-arg-ptr +1
-. ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. el \
-. doc-print-and-reset
-..
-.
-.
-.\" NS doc-have-slot global register (bool)
-.\" NS set if `doc-enclose-string' has created a slot for closing
-.\" NS delimiter
-.
-.nr doc-have-slot 0
-.
-.
-.\" NS doc-enclose-string macro
-.\" NS enclose string with given args (e.g. [ and ])
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-have-slot
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-des
-.\" NS doc-reg-des1
-.\" NS doc-reg-des2
-.\" NS
-.\" NS requires:
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.
-.de doc-enclose-string
-. if \n[doc-in-synopsis-count] \
-. doc-set-hard-space
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. nop \)\*[doc-quote-left]\*[doc-quote-right]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. \" the final `\)' prevents hyphenation in case the next character is `\%'
-. nop \)\*[doc-quote-left]\)\c
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \)\*[doc-quote-right]\)\c
-. doc-print-and-reset
-. \}
-. el \{\
-. \" test whether last arguments are of type closing punctuation
-. \" resp. suffix
-. ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
-. nr doc-reg-des (\n[doc-arg-limit] - 1)
-. while (\n[doc-type\n[doc-reg-des]] == 3) \
-. nr doc-reg-des -1
-.
-. \" prepend closing delimiter
-. nr doc-reg-des +1
-. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
-. \}
-. el \{\
-. \" test whether last arguments are macros which continue the line
-. \" logically
-. nr doc-reg-des \n[doc-arg-limit]
-. while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
-. if !\A\*[doc-arg\n[doc-reg-des]] \
-. break
-. if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
-. break
-. nr doc-reg-des -1
-. \}
-.
-. \" if there are no trailing macros to be skipped, append argument
-. ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
-. doc-append-arg "\)\*[doc-quote-right]\)" 3
-. el \{\
-. \" if a previous call to `doc-enclose-string' has already created
-. \" a slot, prepend argument
-. ie \n[doc-have-slot] \
-. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
-. el \{\
-. \" we have to shift all arguments to the right
-. nr doc-reg-des +1
-. nr doc-reg-des1 \n[doc-arg-limit]
-. nr doc-reg-des2 (\n[doc-arg-limit] + 1)
-. while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
-. rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
-. rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
-. rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
-. nr doc-reg-des1 -1
-. nr doc-reg-des2 -1
-. \}
-. nr doc-arg-limit +1
-.
-. \" finally, insert closing delimiter into the freed slot and
-. \" recompute spacing vector
-. ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
-. nr doc-type\n[doc-reg-des] 3
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
-. nr doc-arg-limit (\n[doc-reg-des] - 1)
-. doc-parse-space-vector
-. nr doc-have-slot 1
-. \}\}\}
-.
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. \}
-.
-. if \n[doc-in-synopsis-count] \
-. doc-set-soft-space
-..
-.
-.
-.\" NS En user macro
-.\" NS enclose arguments with quotation characters set up with `.Es'
-.
-.als En doc-enclose-string
-.
-.
-.\" NS Ao user macro
-.\" NS angle open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Ao' set in doc-common
-.
-.de Ao
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ao
-.
-. ds doc-quote-left \[la]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Ac user macro
-.\" NS angle close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Ac' set in doc-common
-.
-.de Ac
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ac
-.
-. ds doc-quote-right \[ra]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Bo user macro
-.\" NS bracket open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Bo' set in doc-common
-.
-.de Bo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bo
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Bc user macro
-.\" NS bracket close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Bc' set in doc-common
-.
-.de Bc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bc
-.
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Bro user macro
-.\" NS brace open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Bro' set in doc-common
-.
-.de Bro
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bo
-.
-. ds doc-quote-left {
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Brc user macro
-.\" NS brace close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Brc' set in doc-common
-.
-.de Brc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bc
-.
-. ds doc-quote-right }
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Do user macro
-.\" NS double quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Do' set in doc-common
-.
-.de Do
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Do
-.
-. ds doc-quote-left "\*[Lq]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Dc user macro
-.\" NS double quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Dc' set in doc-common
-.
-.de Dc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Dc
-.
-. ds doc-quote-right "\*[Rq]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Eo user macro
-.\" NS enclose open (using first argument as beginning of enclosure)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Eo' set in doc-common
-.
-.de Eo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Eo
-.
-. ds doc-quote-left "\$1
-.
-. shift
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Ec user macro
-.\" NS enclose close (using first argument as end of enclosure)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Ec' set in doc-common
-.
-.de Ec
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ec
-.
-. ds doc-quote-right "\$1
-.
-. shift
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Oo user macro
-.\" NS option open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Oo' set in doc-common
-.
-.de Oo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Oo
-.
-. ds doc-quote-left [
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Oc user macro
-.\" NS option close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Oc' set in doc-common
-.
-.de Oc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Oc
-.
-. ds doc-quote-right ]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Po user macro
-.\" NS parenthesis open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Po' set in doc-common
-.
-.de Po
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Po
-.
-. ds doc-quote-left "\*[doc-left-parenthesis]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Pc user macro
-.\" NS parenthesis close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Pc' set in doc-common
-.
-.de Pc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pc
-.
-. ds doc-quote-right "\*[doc-right-parenthesis]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Qo user macro
-.\" NS straight double quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Qo' set in doc-common
-.
-.de Qo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qo
-.
-. ds doc-quote-left "\*[q]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Qc user macro
-.\" NS straight double quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Qc' set in doc-common
-.
-.de Qc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qc
-.
-. ds doc-quote-right "\*[q]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS So user macro
-.\" NS single quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `So' set in doc-common
-.
-.de So
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name So
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Sc user macro
-.\" NS single quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Sc' set in doc-common
-.
-.de Sc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Sc
-.
-. ds doc-quote-right "\*[doc-right-singlequote]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Xo user macro
-.\" NS extend open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Xo' set in doc-common
-.
-.de Xo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Xo
-.
-. ds doc-quote-left
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Xc user macro
-.\" NS extend close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Xc' set in doc-common
-.
-.de Xc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Xc
-.
-. ds doc-quote-right
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS doc-nesting-level global register
-.\" NS used by `doc-enclose-open' and `doc-enclose-close'
-.
-.nr doc-nesting-level 0
-.
-.
-.\" NS doc-in-list global register (bool)
-.\" NS whether we are in (logical) .It
-.
-.nr doc-in-list 0
-.
-.
-.\" NS doc-enclose-open macro
-.\" NS enclose string open
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-nesting-level
-.
-.de doc-enclose-open
-. if !\n[doc-arg-limit] \
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. nr doc-arg-ptr -1
-.
-. nop \)\*[doc-quote-left]\)\c
-.
-. \" start enclosure box
-. box doc-enclosure-box\n[doc-nesting-level]
-. ev doc-enclosure-env\n[doc-nesting-level]
-. evc 0
-. in 0
-. nf
-. \" we insert something to make .chop always work
-. nop \&\c
-.
-. \" increase nesting level *after* parsing of arguments
-. nr doc-nesting-level +1
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS doc-enclose-close macro
-.\" NS enclose string close
-.\" NS
-.\" NS modifies:
-.\" NS doc-nesting-level
-.
-.de doc-enclose-close
-. nr doc-nesting-level -1
-.
-. \" finish enclosure box
-. br
-. ev
-. box
-. chop doc-enclosure-box\n[doc-nesting-level]
-. unformat doc-enclosure-box\n[doc-nesting-level]
-.
-. nh
-. nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
-. nop \)\*[doc-quote-right]\)\c
-.
-. if !\n[doc-arg-limit] \{\
-. doc-parse-args \$@
-.
-. if !\n[.$] \
-. doc-print-and-reset
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nop \)\*[doc-space\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-. \}
-.
-. \" shall we finish .It request?
-. if !"\*[doc-macro-name]"It" \
-. if \n[doc-in-list] \
-. if !\n[doc-nesting-level] \
-. doc-\*[doc-list-type-stack\n[doc-list-depth]]
-..
-.
-.
-.\" NS Pf user macro
-.\" NS prefix: `.Pf prefix arg ...'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Pf' set in doc-common
-.
-.de Pf
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pf
-.
-. ie \n[doc-arg-limit] \{\
-. ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
-. nr doc-arg-ptr +1
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-. \}
-. el \
-. tm mdoc warning: .Pf: trailing prefix (#\n[.c])
-. \}
-. el \{\
-. nop \)\$1\)\c
-. shift
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. tm mdoc warning: .Pf: missing arguments (#\n[.c])
-. nop \)
-. \}\}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
-. doc-print-and-reset
-. el \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. \}
-..
-.
-.
-.\" NS Ns user macro
-.\" NS remove space (space removal done by `doc-parse-args')
-.\" NS
-.\" NS modifies:
-.\" NS doc-argXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ns' set in doc-common
-.
-.de Ns
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Ns
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Ns must be called with arguments (#\n[.c])
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Ap user macro
-.\" NS append an apostrophe
-.\" NS
-.\" NS width register `Ap' set in doc-common
-.
-.de Ap
-. ie !\n[doc-arg-limit] \
-. tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
-. el \{\
-. nop \)'\)\c
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS doc-space global string
-.\" NS current inter-argument space
-.
-.ds doc-space "\*[doc-soft-space]
-.
-.
-.\" NS doc-soft-space constant string
-.\" NS soft (stretchable) space (defined in doc-common)
-.
-.
-.\" NS doc-hard-space constant string
-.\" NS hard (unpaddable) space (defined in doc-common)
-.
-.
-.\" NS doc-set-hard-space macro
-.\" NS set current space string to hard (unpaddable) space.
-.\" NS
-.\" NS modifies:
-.\" NS doc-saved-space
-.\" NS doc-space
-.
-.de doc-set-hard-space
-. ie "\*[doc-space]"" \
-. ds doc-saved-space "\*[doc-hard-space]
-. el \
-. ds doc-space "\*[doc-hard-space]
-..
-.
-.
-.\" NS doc-set-soft-space macro
-.\" NS set current space string to soft space
-.\" NS
-.\" NS modifies:
-.\" NS doc-saved-space
-.\" NS doc-space
-.
-.de doc-set-soft-space
-. ie "\*[doc-space]"" \
-. ds doc-saved-space "\*[doc-soft-space]
-. el \
-. ds doc-space "\*[doc-soft-space]
-..
-.
-.
-.\" NS doc-space-mode global register (bool)
-.\" NS default is one (space mode on)
-.
-.nr doc-space-mode 1
-.
-.
-.\" NS doc-saved-space global string
-.\" NS saved value of `doc-space'
-.
-.ds doc-saved-space "\*[doc-space]
-.
-.
-.\" NS doc-have-space global register (bool)
-.\" NS set if last command was horizontal space
-.
-.nr doc-have-space 0
-.
-.
-.\" NS Sm user macro
-.\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
-.\" NS
-.\" NS without argument, toggle space mode
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-saved-space
-.\" NS doc-space
-.\" NS doc-space-mode
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Sm
-.\" NS
-.\" NS width register `Sm' set in doc-common
-.
-.de Sm
-. ie \n[doc-have-space] \
-. nr doc-reg-Sm 0
-. el \
-. nr doc-reg-Sm 1
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Sm
-. doc-parse-args \$@
-. \}
-. el \{\
-. ie \n[doc-space-mode] \
-. nr doc-space-mode 0
-. el \
-. nr doc-space-mode 1
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-.
-. \" avoid a warning message in case `Sm' is the last parameter
-. if !d doc-arg\n[doc-arg-ptr] \
-. ds doc-arg\n[doc-arg-ptr]
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
-. ds doc-space "\*[doc-saved-space]
-. nr doc-space-mode 1
-. \}
-. el \{\
-. ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
-. ds doc-saved-space "\*[doc-space]
-. ds doc-space
-. nr doc-space-mode 0
-. \}
-. el \{\
-. \" no argument for Sm
-. nr doc-arg-ptr -1
-. ie \n[doc-space-mode] \
-. nr doc-space-mode 0
-. el \
-. nr doc-space-mode 1
-. \}\}
-.
-. ie \n[doc-space-mode] \{\
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. \" finish line only if it is interrupted and `doc-have-space'
-. \" isn't set
-. if \n[doc-reg-Sm] \
-. if \n[.int] \
-. nop \)
-. \}
-. el \{\
-. \" reset remaining space vector elements
-. nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
-. while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
-. ds doc-space\n[doc-reg-Sm]
-. nr doc-reg-Sm +1
-. \" the body of a `while' request must end with the fitting `\}'!
-. \}
-. \}
-.
-. \" do we have parameters to print?
-. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
-. \" ignore `.Sm on' and `.Sm off' without additional parameters
-. ie (\n[doc-arg-ptr] > 1) \
-. doc-print-and-reset
-. el \
-. doc-reset-args
-. \}
-. el \{\
-. \" skip `Sm' argument
-. nr doc-arg-ptr +1
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-arg-type immediate register
-.\" NS argument type (macro=1, string=2, punctuation suffix=3,
-.\" NS punctuation prefix=4)
-.
-.nr doc-arg-type 0
-.
-.
-.\" NS doc-get-arg-type macro
-.\" NS get argument type
-.\" NS
-.\" NS this macro expects the width of the argument in `doc-width'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-type
-.
-.de doc-get-arg-type
-. nr doc-arg-type 2
-.
-. if ((\n[doc-width] < 4) & \A\$1) \{\
-. ie (\n[doc-width] == 1) \{\
-. if r doc-punct\$1 \
-. nr doc-arg-type \n[doc-punct\$1]
-. \}
-. el \
-. if r \$1 \
-. if d \$1 \
-. nr doc-arg-type 1
-. \}
-..
-.
-.
-.\" NS doc-get-arg-type* macro
-.\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
-.\" NS
-.\" NS this macro sets the `doc-width' register using the `length' request
-.\" NS to get the number of characters in a string literally
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-type
-.\" NS doc-width
-.
-.de doc-get-arg-type*
-. nr doc-arg-type 2
-. length doc-width "\*[doc-arg\$1]
-.
-. if ((\n[doc-width] < 4) & \A\*[doc-arg\$1]) \{\
-. ie (\n[doc-width] == 1) \{\
-. if r doc-punct\*[doc-arg\$1] \
-. nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
-. \}
-. el \
-. if r \*[doc-arg\$1] \
-. if d \*[doc-arg\$1] \
-. nr doc-arg-type 1
-. \}
-..
-.
-.
-.\" NS doc-set-spacing-1 macro
-.\" NS set spacing for macros
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dssfm
-.\" NS doc-reg-dssfm1
-.
-.de doc-set-spacing-1
-. nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
-.
-. \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
-. \" argument)
-. ie (\n[doc-reg-dssfm1] == 3) \{\
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfm]
-. \}
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-. \}
-. el \{\
-. \" macros like .Ap and .Ns have value 2 (remove space before and after
-. \" argument)
-. ie (\n[doc-reg-dssfm1] == 2) \{\
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfm]
-. \}
-. ds doc-space\n[doc-arg-limit]
-. \}
-. el \
-. ds doc-space\n[doc-arg-limit]
-. \}
-..
-.
-.
-.\" NS doc-set-spacing-2 macro
-.\" NS set spacing for strings
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.
-.de doc-set-spacing-2
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-..
-.
-.
-.\" NS doc-set-spacing-3 macro
-.\" NS set spacing for punctuation suffixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dssfps
-.
-.de doc-set-spacing-3
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfps]
-. \}
-.
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-..
-.
-.
-.\" NS doc-set-spacing-4 macro
-.\" NS set spacing for punctuation prefixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.
-.de doc-set-spacing-4
-. ds doc-space\n[doc-arg-limit]
-..
-.
-.
-.\" type switches (on current argument doc-arg-ptr)
-.
-.
-.\" NS doc-do-1 macro
-.\" NS call request if macro
-.
-.de doc-do-1
-. \*[doc-arg\n[doc-arg-ptr]]
-..
-.
-.
-.\" NS doc-do-2 macro
-.\" NS call .doc-print-recursive if string
-.
-.als doc-do-2 doc-print-recursive
-.
-.
-.\" NS doc-do-3 macro
-.\" NS call .doc-print-recursive if punctuation suffix
-.
-.als doc-do-3 doc-print-recursive
-.
-.
-.\" NS doc-do-4 macro
-.\" NS call .doc-print-recursive if punctuation prefix
-.
-.als doc-do-4 doc-print-recursive
-.
-.
-.\" NS doc-fontmode-depth global register
-.\" NS font mode level
-.
-.nr doc-fontmode-depth 0
-.
-.
-.\" NS doc-fontmode-font-stackXXX global register
-.\" NS stack of saved current font values from `Bf' request
-.\" NS
-.\" NS limit:
-.\" NS doc-fontmode-depth
-.
-.nr doc-fontmode-font-stack0 0
-.
-.
-.\" NS doc-fontmode-size-stackXXX global register
-.\" NS stack of saved current size values from `Bf' request
-.\" NS
-.\" NS limit:
-.\" NS doc-fontmode-depth
-.
-.nr doc-fontmode-size-stack0 0
-.
-.
-.\" NS Bf user macro
-.\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
-.\" NS
-.\" NS modifies:
-.\" NS doc-fontmode-depth
-.\" NS doc-fontmode-font-stackXXX
-.\" NS doc-fontmode-size-stackXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Bf' set in doc-common
-.
-.de Bf
-. ds doc-macro-name Bf
-.
-. ie \n[.$] \{\
-. nr doc-fontmode-depth +1
-.
-. \" save current font and size
-. nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
-. nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
-.
-. ie "\$1"Em" \
-. nop \*[doc-Em-font]\c
-. el \{ .ie "\$1"Li" \
-. nop \*[doc-Li-font]\c
-. el \{ .ie "\$1"Sy" \
-. nop \*[doc-Sy-font]\c
-. el \{ .ie "\$1"-emphasis" \
-. nop \*[doc-Em-font]\c
-. el \{ .ie "\$1"-literal" \
-. nop \*[doc-Li-font]\c
-. el \{ .ie "\$1"-symbolic" \
-. nop \*[doc-Sy-font]\c
-. el \{\
-. tmc mdoc warning: Unknown keyword `\$1' in .Bf request
-. tm1 " (#\n[.c])
-. \}\}\}\}\}\}\}
-. el \
-. tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
-..
-.
-.
-.\" NS Ef user macro
-.\" NS end font mode
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ef' set in doc-common
-.
-.de Ef
-. ds doc-macro-name Ef
-.
-. ie \n[doc-fontmode-depth] \{\
-. \" restore saved font and size
-. nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
-. nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
-.
-. nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
-. nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
-. nr doc-fontmode-depth -1
-. \}
-. el \
-. tm mdoc warning: Extraneous .Ef (#\n[.c])
-..
-.
-.
-.\" NS doc-keep-type global register
-.\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
-.
-.nr doc-keep-type 0
-.
-.
-.\" NS Bk user macro
-.\" NS begin keep
-.\" NS
-.\" NS modifies:
-.\" NS doc-keep-type
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Bk' set in doc-common
-.
-.de Bk
-. ds doc-macro-name Bk
-.
-. if \n[doc-keep-type] \
-. tm .Bk: nesting keeps not implemented yet. (#\n[.c])
-.
-. ie "\$1"-lines" \{\
-. nr doc-keep-type 2
-. tm .Bk -lines: Not implemented yet. (#\n[.c])
-. \}
-. el \{ .ie "\$1"-words" \{\
-. nr doc-keep-type 1
-. doc-set-hard-space
-. \}
-. el \{ .ie "\$1"" \{\
-. \" default
-. nr doc-keep-type 1
-. doc-set-hard-space
-. \}
-. el \{\
-. tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
-. nr doc-keep-type 3
-. \}\}\}
-.
-\#. nr doc-nesting-level +1
-..
-.
-.
-.\" NS Ek user macro
-.\" NS end keep
-.\" NS
-.\" NS modifies:
-.\" NS doc-keep-type
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ek' set in doc-common
-.
-.de Ek
-. ds doc-macro-name Ek
-.
-\#. nr doc-nesting-level -1
-.
-. ie \n[.$] \
-. tm Usage: .Ek (does not take arguments) (#\n[.c])
-. el \{\
-. if !\n[doc-keep-type] \
-. tm mdoc warning: .Ek found without .Bk before (#\n[.c])
-.
-. ie (\n[doc-keep-type] == 1) \
-. doc-set-soft-space
-. el \{ .if (\n[doc-keep-type] == 2) \
-. tm .Bk -lines: Not implemented yet. (#\n[.c])
-. \}\}
-.
-. nr doc-keep-type 0
-.
-\#. if !"\*[doc-out-string]"" \
-\#. doc-print-out-string
-..
-.
-.
-.\" NS doc-display-depth global register
-.\" NS display level
-.
-.nr doc-display-depth 0
-.
-.
-.\" NS doc-is-compact global register (bool)
-.\" NS set if the `compact' keyword is given
-.
-.nr doc-is-compact 0
-.
-.
-.\" NS doc-display-type-stackXXX global string
-.\" NS the display type stack
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.ds doc-display-type-stack0
-.
-.
-.\" NS doc-display-indent-stackXXX global register
-.\" NS stack of display indentation values
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-indent-stack0 0
-.
-.
-.\" NS doc-display-ad-stackXXX global register
-.\" NS stack of saved adjustment modes
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-ad-stack0 0
-.
-.
-.\" NS doc-display-fi-stackXXX global register
-.\" NS stack of saved fill modes
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-fi-stack0 0
-.
-.
-.\" NS Bd user macro
-.\" NS begin display
-.\" NS
-.\" NS width register `Bd' set in doc-common
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-display-depth
-.\" NS doc-display-ad-stackXXX
-.\" NS doc-display-fi-stackXXX
-.\" NS doc-display-file
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-display-type-stackXXX
-.\" NS doc-is-compact
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Bd
-.
-.de Bd
-. ds doc-macro-name Bd
-.
-. if !\n[.$] \{\
-. tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
-. tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
-. return
-. \}
-.
-. nr doc-is-compact 0
-. ds doc-display-file
-. nr doc-reg-Bd 1
-. nr doc-display-depth +1
-.
-. \" save current adjustment and fill modes
-. nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
-. nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
-.
-. ie "\$1"-literal" \{\
-. ds doc-display-type-stack\n[doc-display-depth] literal
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie t \{\
-. nop \*[doc-Li-font]\c
-' ta T 9n
-. \}
-. el \
-' ta T 8n
-. nf
-. \}
-. el \{ .ie "\$1"-filled" \{\
-. ds doc-display-type-stack\n[doc-display-depth] filled
-. ad b
-. fi
-. \}
-. el \{ .ie "\$1"-ragged" \{\
-. ds doc-display-type-stack\n[doc-display-depth] ragged
-. na
-. fi
-. \}
-. el \{ .ie "\$1"-centered" \{\
-. ds doc-display-type-stack\n[doc-display-depth] centered
-. ad c
-. fi
-. \}
-. el \{ .ie "\$1"-unfilled" \{\
-. ds doc-display-type-stack\n[doc-display-depth] unfilled
-. nf
-. \}
-. el \{\
-. tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
-. tm1 " in .Bd request (#\n[.c])
-. nr doc-reg-Bd 0
-. \}\}\}\}\}
-.
-. \" have we seen an argument?
-. if \n[doc-reg-Bd] \{\
-. shift
-. \" check other arguments
-. if \n[.$] \
-. doc-do-Bd-args \$@
-. \}
-.
-. \" avoid warning about non-existent register
-. if !r doc-display-indent-stack\n[doc-display-depth] \
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-.
-. if \n[doc-display-indent-stack\n[doc-display-depth]] \
-' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
-.
-. if !\n[doc-is-compact] \{\
-. if !\n[doc-in-synopsis-count] \{\
-. ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
-. sp \n[doc-display-vertical]u
-. el \
-' sp \n[doc-display-vertical]u
-. \}\}
-.
-. if !\n[cR] \
-. ne 2v
-.
-. if !"\*[doc-display-file]"" \
-. so \*[doc-display-file]
-.
-. nr doc-is-compact 0
-. ds doc-display-file
-..
-.
-.
-.\" NS doc-do-Bd-args macro
-.\" NS resolve remaining .Bd arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-file
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-is-compact
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddBa
-.\" NS doc-reg-ddBa1
-.\" NS doc-reg-ddBa2
-.\" NS doc-reg-ddBa3
-.\" NS doc-reg-ddBa4
-.\" NS doc-str-ddBa
-.
-.de doc-do-Bd-args
-. nr doc-reg-ddBa 1
-.
-. ie "\$1"-offset" \{\
-. nr doc-reg-ddBa 2
-.
-. ie "\$2"left" \
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-. el \{ .ie "\$2"right" \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
-. el \{ .ie "\$2"center" \
-. nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
-. el \{ .ie "\$2"indent" \
-. nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
-. el \{ .ie "\$2"indent-two" \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
-. el \
-. nr doc-reg-ddBa 1
-. \}\}\}\}
-.
-. \" not a known keyword
-. if (\n[doc-reg-ddBa] == 1) \{\
-. nr doc-reg-ddBa 2
-.
-. nr doc-reg-ddBa1 0
-. if \B(\$2) \{\
-. \" disable warnings related to scaling indicators (32)
-. nr doc-reg-ddBa2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. \" values without a scaling indicator are taken as strings;
-. \" we test whether the parameter string with and without the last
-. \" character yields identical numerical results (ignoring the
-. \" scaling indicator)
-. ds doc-str-ddBa "\$2
-. substring doc-str-ddBa 1 -1
-. if \B(\*[doc-str-ddBa]) \{\
-. nr doc-reg-ddBa3 (;(\$2))
-. nr doc-reg-ddBa4 (\*[doc-str-ddBa])
-. if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
-. nr doc-reg-ddBa1 1
-. \}
-.
-. \" enable all warnings again
-. warn \n[doc-reg-ddBa2]
-. \}
-.
-. ie \n[doc-reg-ddBa1] \
-. nr doc-display-indent-stack\n[doc-display-depth] \$2
-. el \{\
-. doc-get-width "\$2"
-. ie (\n[doc-width] <= 3) \{\
-. \" if the offset parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type "\$2"
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
-. el \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}
-. \}
-. el \{ .ie "\$1"-compact" \
-. nr doc-is-compact 1
-. el \{ .ie "\$1"-file" \{\
-. ie !"\$2"" \{\
-. ds doc-display-file "\$2
-. nr doc-reg-ddBa 2
-. \}
-. el \
-. tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
-. \}
-. el \
-. tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
-. \}\}
-.
-. if (\n[doc-reg-ddBa] < \n[.$]) \{\
-. shift \n[doc-reg-ddBa]
-. doc-do-Bd-args \$@
-. \}
-..
-.
-.
-.\" NS Ed user macro
-.\" NS end display
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-depth
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-display-type-stackXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ed' set in doc-common
-.
-.de Ed
-. ds doc-macro-name Ed
-.
-. br
-.
-. if !\n[doc-display-depth] \{\
-. tm mdoc warning: Extraneous .Ed (#\n[.c])
-. nr doc-display-depth 1
-. \}
-.
-. if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-.
-. in -\n[doc-display-indent-stack\n[doc-display-depth]]u
-.
-. \" restore saved adjustment and fill modes
-. ie \n[doc-display-fi-stack\n[doc-display-depth]] \
-. fi
-. el \
-. nf
-. ad \n[doc-display-ad-stack\n[doc-display-depth]]
-.
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-. ds doc-display-type-stack\n[doc-display-depth]
-. nr doc-display-depth -1
-..
-.
-.
-.\" NS doc-list-type-stackXXX global string
-.\" NS stack of list types
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-list-type-stack1
-.
-.
-.\" NS doc-list-indent-stackXXX global register
-.\" NS stack of list indentation values
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-list-indent-stack1 0
-.
-.
-.\" NS doc-have-indent global register (bool)
-.\" NS an indentation value is active
-.
-.nr doc-have-indent 0
-.
-.
-.\" NS Bl user macro
-.\" NS begin list
-.\" NS
-.\" NS width register `Bl' set in doc-common
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-have-diag-list
-.\" NS doc-list-depth
-.\" NS doc-have-indent
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-num-columns
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Bl
-.
-.de Bl
-. if !\n[.$] \{\
-. doc-Bl-usage
-. return
-. \}
-.
-. ds doc-macro-name Bl
-. nr doc-list-depth +1
-. nr doc-arg-ptr 1
-.
-. ie "\$1"-hang" \{\
-. ds doc-list-type-stack\n[doc-list-depth] hang-list
-. nr doc-list-indent-stack\n[doc-list-depth] 6n
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-tag" \{\
-. ds doc-list-type-stack\n[doc-list-depth] tag-list
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-item" \{\
-. ds doc-list-type-stack\n[doc-list-depth] item-list
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-enum" \{\
-. ds doc-list-type-stack\n[doc-list-depth] enum-list
-. nr doc-list-indent-stack\n[doc-list-depth] 3n
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-bullet" \{\
-. ds doc-list-type-stack\n[doc-list-depth] bullet-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-dash" \{\
-. ds doc-list-type-stack\n[doc-list-depth] dash-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-hyphen" \{\
-. ds doc-list-type-stack\n[doc-list-depth] dash-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-inset" \{\
-. ds doc-list-type-stack\n[doc-list-depth] inset-list
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-diag" \{\
-. ds doc-list-type-stack\n[doc-list-depth] diag-list
-. nr doc-have-diag-list 1
-. \}
-. el \{ .ie "\$1"-ohang" \{\
-. ds doc-list-type-stack\n[doc-list-depth] ohang-list
-. nr doc-have-indent 1
-. \}
-. el \{ .ie "\$1"-column" \{\
-. ds doc-list-type-stack\n[doc-list-depth] column-list
-. linetabs 1
-. \}
-. el \{\
-. tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
-. tm1 " in .Bl request
-. tm
-. nr doc-arg-ptr 0
-. \}\}\}\}\}\}\}\}\}\}\}
-.
-. \" we have seen a list type
-. if !\n[doc-arg-ptr] \{\
-. doc-Bl-usage
-. doc-reset-args
-. return
-. \}
-.
-. shift
-.
-. \" fill argument vector
-. nr doc-reg-Bl 1
-. while (\n[doc-reg-Bl] <= \n[.$]) \{\
-. ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
-. nr doc-reg-Bl +1
-. \}
-.
-. doc-increment-list-stack
-.
-. if \n[.$] \{\
-. nr doc-arg-limit \n[.$]
-. nr doc-arg-ptr 0
-. doc-do-Bl-args
-.
-. \" initialize column list
-. if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
-. doc-set-column-tab \n[doc-num-columns]
-. nr doc-list-indent-stack\n[doc-list-depth] 0
-' in -\n[doc-column-indent-width]u
-. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. sp \n[doc-display-vertical]u
-.
-. nf
-. nr doc-num-columns 0
-. \}\}
-.
-. doc-reset-args
-..
-.
-.
-.\" NS doc-Bl-usage macro
-.
-.de doc-Bl-usage
-. tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
-. tm1 " [-width <string>] [-xwidth <command>]
-. tm1 " [-offset <string>] [-compact]
-. tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
-. tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
-. tm1 " [-offset <string>] [-compact] (#\n[.c])
-..
-.
-.
-.\" NS doc-do-Bl-args macro
-.\" NS resolve remaining .Bl arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-num-columns
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-box-dBla
-.\" NS doc-env-dBla
-.\" NS doc-reg-dBla
-.\" NS doc-reg-dBla1
-.\" NS doc-reg-dBla2
-.\" NS doc-reg-dBla3
-.\" NS doc-reg-dBla4
-.\" NS doc-str-dBla
-.\" NS doc-str-dBla1
-.
-.de doc-do-Bl-args
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
-. return
-.
-. \" avoid a warning message in case e.g. `-offset' has no parameter
-. nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
-. if !d doc-arg\n[doc-reg-dBla] \
-. ds doc-arg\n[doc-reg-dBla]
-.
-. nr doc-reg-dBla 1
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
-. nr doc-compact-list-stack\n[doc-list-depth] 1
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
-. ie (\n[doc-list-depth] > 1) \{\
-. nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
-. ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
-. as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
-. length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
-. nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
-. \}
-. el \
-. tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
-. \}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
-. nr doc-arg-ptr +1
-. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
-. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
-.
-. \" test whether argument is a valid numeric expression
-. nr doc-reg-dBla1 0
-. if \B(\*[doc-str-dBla]) \{\
-. \" disable warnings related to scaling indicators (32)
-. nr doc-reg-dBla2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. \" values without a scaling indicator are taken as strings;
-. \" we test whether the parameter string with and without the last
-. \" character yields identical numerical results (ignoring the
-. \" scaling indicator)
-. ds doc-str-dBla1 "\*[doc-str-dBla]
-. substring doc-str-dBla1 1 -1
-. if \B(\*[doc-str-dBla1]) \{\
-. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
-. nr doc-reg-dBla4 (\*[doc-str-dBla1])
-. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
-. nr doc-reg-dBla1 1
-. \}
-.
-. \" enable all warnings again
-. warn \n[doc-reg-dBla2]
-. \}
-.
-. ie \n[doc-reg-dBla1] \
-. nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
-. el \{\
-. doc-get-arg-width \n[doc-arg-ptr]
-. ie (\n[doc-width] == 2) \{\
-. \" if the width parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type \*[doc-str-dBla]
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
-. el \
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
-. nr doc-arg-ptr +1
-. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
-.
-. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
-. substring doc-str-dBla 1 2
-. if .\*[doc-str-dBla] \{\
-. \" execute string in a box to get the width of the diversion
-. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
-. doc-save-global-vars
-. doc-reset-args
-. box doc-box-dBla
-. ev doc-env-dBla
-. evc 0
-. in 0
-. nf
-. nop \*[doc-str-dBla]
-. br
-. ev
-. box
-. doc-restore-global-vars
-. doc-get-width \h'\n[dl]u'
-. \}
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
-. nr doc-arg-ptr +1
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
-. nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
-. el \{\
-. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-reg-dBla1 0
-. if \B(\*[doc-str-dBla]) \{\
-. nr doc-reg-dBla2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. ds doc-str-dBla1 "\*[doc-str-dBla]
-. substring doc-str-dBla1 1 -1
-. if \B(\*[doc-str-dBla1]) \{\
-. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
-. nr doc-reg-dBla4 (\*[doc-str-dBla1])
-. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
-. nr doc-reg-dBla1 1
-. \}
-.
-. warn \n[doc-reg-dBla2]
-. \}
-.
-. ie \n[doc-reg-dBla1] \
-. nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
-. el \{\
-. doc-get-arg-width \n[doc-arg-ptr]
-. ie (\n[doc-width] <= 3) \{\
-. \" if the offset parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type \*[doc-str-dBla]
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
-. el \
-. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}\}
-. el \
-. nr doc-reg-dBla 0
-. \}\}\}\}
-.
-. \" not a known keyword, so it specifies the width of the next column
-. \" (if it is a column list)
-. if !\n[doc-reg-dBla] \{\
-. ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
-. nr doc-num-columns +1
-. ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
-. tm1 " in .Bl request (#\n[.c])
-. \}\}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
-. doc-do-Bl-args
-..
-.
-.
-.\" NS doc-save-global-vars macro
-.\" NS save all global variables
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dsgv
-.
-.de doc-save-global-vars
-. ds doc-macro-name-saved "\*[doc-macro-name]
-. nr doc-arg-limit-saved \n[doc-arg-limit]
-. nr doc-num-args-saved \n[doc-num-args]
-. nr doc-arg-ptr-saved \n[doc-arg-ptr]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
-. ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
-. nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
-. ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-curr-font-saved \n[doc-curr-font]
-. nr doc-curr-size-saved \n[doc-curr-size]
-. nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
-. nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
-. nr doc-have-decl-saved \n[doc-have-decl]
-. nr doc-have-var-saved \n[doc-have-var]
-. ds doc-command-name-saved "\*[doc-command-name]
-. ds doc-quote-left-saved "\*[doc-quote-left]
-. ds doc-quote-right-saved "\*[doc-quote-right]
-. nr doc-nesting-level-saved \n[doc-nesting-level]
-. nr doc-in-list-saved \n[doc-in-list]
-. ds doc-space-saved "\*[doc-space]
-. ds doc-saved-space-saved "\*[doc-saved-space]
-. nr doc-space-mode-saved \n[doc-space-mode]
-. nr doc-have-space-saved \n[doc-have-space]
-. nr doc-have-slot-saved \n[doc-have-slot]
-. nr doc-keep-type-saved \n[doc-keep-type]
-. nr doc-display-depth-saved \n[doc-display-depth]
-. nr doc-is-compact-saved \n[doc-is-compact]
-.
-. nr doc-reg-dsgv 0
-. while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
-. ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
-. nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
-. nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
-. nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
-. nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
-. nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-list-depth-saved \n[doc-list-depth]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
-. ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
-. nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
-. nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
-. ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
-. ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
-. nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
-. nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-have-indent-saved \n[doc-have-indent]
-. ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
-. nr doc-curr-type-saved \n[doc-curr-type]
-. ds doc-curr-arg-saved "\*[doc-curr-arg]
-. nr doc-have-diag-list-saved \n[doc-have-diag-list]
-. nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
-. nr doc-num-columns-saved \n[doc-num-columns]
-. nr doc-next-list-depth-saved \n[doc-next-list-depth]
-. nr doc-column-indent-width-saved \n[doc-column-indent-width]
-. nr doc-is-func-saved \n[doc-is-func]
-. nr doc-have-old-func-saved \n[doc-have-old-func]
-. nr doc-func-arg-count-saved \n[doc-func-arg-count]
-. ds doc-func-arg-saved "\*[doc-func-arg]
-. nr doc-num-func-args-saved \n[doc-num-func-args]
-. nr doc-func-args-processed-saved \n[doc-func-args-processed]
-. nr doc-have-func-saved \n[doc-have-func]
-. nr doc-is-reference-saved \n[doc-is-reference]
-. nr doc-reference-count-saved \n[doc-reference-count]
-. nr doc-author-count-saved \n[doc-author-count]
-.
-. nr doc-reg-dsgv 0
-. while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-book-count-saved \n[doc-book-count]
-. ds doc-book-name-saved "\*[doc-book-name]
-. nr doc-date-count-saved \n[doc-date-count]
-. ds doc-date-saved "\*[doc-date]
-. nr doc-publisher-count-saved \n[doc-publisher-count]
-. ds doc-publisher-name-saved "\*[doc-publisher-name]
-. nr doc-journal-count-saved \n[doc-journal-count]
-. ds doc-journal-name-saved "\*[doc-journal-name]
-. nr doc-issue-count-saved \n[doc-issue-count]
-. ds doc-issue-name-saved "\*[doc-issue-name]
-. nr doc-optional-count-saved \n[doc-optional-count]
-. ds doc-optional-string-saved "\*[doc-optional-string]
-. nr doc-page-number-count-saved \n[doc-page-number-count]
-. ds doc-page-number-string-saved "\*[doc-page-number-string]
-. nr doc-corporate-count-saved \n[doc-corporate-count]
-. ds doc-corporate-name-saved "\*[doc-corporate-name]
-. nr doc-report-count-saved \n[doc-report-count]
-. ds doc-report-name-saved "\*[doc-report-name]
-. nr doc-reference-title-count-saved \n[doc-reference-title-count]
-. ds doc-reference-title-name-saved "\*[doc-reference-title-name]
-. ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
-. nr doc-volume-count-saved \n[doc-volume-count]
-. ds doc-volume-name-saved "\*[doc-volume-name]
-. nr doc-have-author-saved \n[doc-have-author]
-.
-. ds doc-document-title-saved "\*[doc-document-title]
-. ds doc-volume-saved "\*[doc-volume]
-. ds doc-section-saved "\*[doc-section]
-. ds doc-operating-system-saved "\*[doc-operating-system]
-. ds doc-date-string-saved "\*[doc-date-string]
-. nr doc-header-space-saved \n[doc-header-space]
-. nr doc-footer-space-saved \n[doc-footer-space]
-. nr doc-display-vertical-saved \n[doc-display-vertical]
-. ds doc-header-string-saved "\*[doc-header-string]
-. nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
-. nr doc-in-files-section-saved \n[doc-in-files-section]
-. nr doc-in-authors-section-saved \n[doc-in-authors-section]
-..
-.
-.
-.\" NS doc-restore-global-vars macro
-.\" NS restore all global variables
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-drgv
-.
-.de doc-restore-global-vars
-. ds doc-macro-name "\*[doc-macro-name-saved]
-. nr doc-arg-limit \n[doc-arg-limit-saved]
-. nr doc-num-args \n[doc-num-args-saved]
-. nr doc-arg-ptr \n[doc-arg-ptr-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
-. ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
-. nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
-. ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-curr-font \n[doc-curr-font-saved]
-. nr doc-curr-size \n[doc-curr-size-saved]
-. nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
-. nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
-. nr doc-have-decl \n[doc-have-decl-saved]
-. nr doc-have-var \n[doc-have-var-saved]
-. ds doc-command-name "\*[doc-command-name-saved]
-. ds doc-quote-left "\*[doc-quote-left-saved]
-. ds doc-quote-right "\*[doc-quote-right-saved]
-. nr doc-nesting-level \n[doc-nesting-level-saved]
-. nr doc-in-list \n[doc-in-list-saved]
-. ds doc-space "\*[doc-space-saved]
-. ds doc-saved-space "\*[doc-saved-space-saved]
-. nr doc-space-mode \n[doc-space-mode-saved]
-. nr doc-have-space \n[doc-have-space-saved]
-. nr doc-have-slot \n[doc-have-slot-saved]
-. nr doc-keep-type \n[doc-keep-type-saved]
-. nr doc-display-depth \n[doc-display-depth-saved]
-. nr doc-is-compact \n[doc-is-compact-saved]
-.
-. nr doc-reg-drgv 0
-. while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
-. ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
-. nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
-. nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-list-depth \n[doc-list-depth-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
-. ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
-. nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
-. nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
-. ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
-. ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
-. nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
-. nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-have-indent \n[doc-have-indent-saved]
-. ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
-. nr doc-curr-type \n[doc-curr-type-saved]
-. ds doc-curr-arg "\*[doc-curr-arg-saved]
-. nr doc-have-diag-list \n[doc-have-diag-list-saved]
-. nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
-. nr doc-num-columns \n[doc-num-columns-saved]
-. nr doc-next-list-depth \n[doc-next-list-depth-saved]
-. nr doc-column-indent-width \n[doc-column-indent-width-saved]
-. nr doc-is-func \n[doc-is-func-saved]
-. nr doc-have-old-func \n[doc-have-old-func-saved]
-. nr doc-func-arg-count \n[doc-func-arg-count-saved]
-. ds doc-func-arg "\*[doc-func-arg-saved]
-. nr doc-num-func-args \n[doc-num-func-args-saved]
-. nr doc-func-args-processed \n[doc-func-args-processed-saved]
-. nr doc-have-func \n[doc-have-func-saved]
-. nr doc-is-reference \n[doc-is-reference-saved]
-. nr doc-reference-count \n[doc-reference-count-saved]
-. nr doc-author-count \n[doc-author-count-saved]
-.
-. nr doc-reg-drgv 0
-. while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-book-count \n[doc-book-count-saved]
-. ds doc-book-name "\*[doc-book-name-saved]
-. nr doc-date-count \n[doc-date-count-saved]
-. ds doc-date "\*[doc-date-saved]
-. nr doc-publisher-count \n[doc-publisher-count-saved]
-. ds doc-publisher-name "\*[doc-publisher-name-saved]
-. nr doc-journal-count \n[doc-journal-count-saved]
-. ds doc-journal-name "\*[doc-journal-name-saved]
-. nr doc-issue-count \n[doc-issue-count-saved]
-. ds doc-issue-name "\*[doc-issue-name-saved]
-. nr doc-optional-count \n[doc-optional-count-saved]
-. ds doc-optional-string "\*[doc-optional-string-saved]
-. nr doc-page-number-count \n[doc-page-number-count-saved]
-. ds doc-page-number-string "\*[doc-page-number-string-saved]
-. nr doc-corporate-count \n[doc-corporate-count-saved]
-. ds doc-corporate-name "\*[doc-corporate-name-saved]
-. nr doc-report-count \n[doc-report-count-saved]
-. ds doc-report-name "\*[doc-report-name-saved]
-. nr doc-reference-title-count \n[doc-reference-title-count-saved]
-. ds doc-reference-title-name "\*[doc-reference-title-name-saved]
-. ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
-. nr doc-volume-count \n[doc-volume-count-saved]
-. ds doc-volume-name "\*[doc-volume-name-saved]
-. nr doc-have-author \n[doc-have-author-saved]
-.
-. ds doc-document-title "\*[doc-document-title-saved]
-. ds doc-volume "\*[doc-volume-saved]
-. ds doc-section "\*[doc-section-saved]
-. ds doc-operating-system "\*[doc-operating-system-saved]
-. ds doc-date-string "\*[doc-date-string-saved]
-. nr doc-header-space \n[doc-header-space-saved]
-. nr doc-footer-space \n[doc-footer-space-saved]
-. nr doc-display-vertical \n[doc-display-vertical-saved]
-. ds doc-header-string "\*[doc-header-string-saved]
-. nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
-. nr doc-in-files-section \n[doc-in-files-section-saved]
-. nr doc-in-authors-section \n[doc-in-authors-section-saved]
-..
-.
-.
-.\" NS El user macro
-.\" NS end list
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-diag-list
-.\" NS doc-list-depth
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-str-El
-.\" NS
-.\" NS width register `El' set in doc-common
-.
-.de El
-. if \n[.$] \{\
-. tm Usage: .El (does not take arguments) (#\n[.c])
-. return
-. \}
-.
-. ds doc-macro-name El
-. ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
-.
-. ie "\*[doc-str-El]"diag-list" \{\
-. nr doc-have-diag-list 0
-. doc-end-list 0
-. \}
-. el \{ .ie "\*[doc-str-El]"column-list" \
-. doc-end-column-list
-. el \{ .ie "\*[doc-str-El]"item-list" \
-. doc-end-list 0
-. el \{ .ie "\*[doc-str-El]"ohang-list" \
-. doc-end-list 0
-. el \{ .ie "\*[doc-str-El]"inset-list" \
-. doc-end-list 0
-. el \
-. doc-end-list 1
-. \}\}\}\}
-.
-. br
-..
-.
-.
-.\" NS doc-saved-Pa-font global string
-.\" NS saved doc-Pa-font string for section FILES (no underline if
-.\" NS nroff)
-.
-.ds doc-saved-Pa-font
-.
-.
-.\" NS doc-curr-type global register
-.\" NS current argument type
-.
-.nr doc-curr-type 0
-.
-.
-.\" NS doc-curr-arg global string
-.\" NS current argument
-.
-.ds doc-curr-arg
-.
-.
-.\" NS doc-item-boxXXX global box
-.\" NS item boxes associated list depth
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.
-.\" NS It user macro
-.\" NS list item
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-curr-arg
-.\" NS doc-curr-type
-.\" NS doc-in-list
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-saved-Pa-font
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-It
-.\" NS doc-str-It
-.\" NS doc-XXX-list-type
-.\" NS
-.\" NS width register `It' set in doc-common
-.
-.nr doc-bullet-list-type 1
-.nr doc-column-list-type 0
-.nr doc-dash-list-type 1
-.nr doc-diag-list-type 0
-.nr doc-enum-list-type 1
-.nr doc-hang-list-type 2
-.nr doc-inset-list-type 2
-.nr doc-item-list-type 1
-.nr doc-ohang-list-type 2
-.nr doc-tag-list-type 2
-.
-.de It
-. ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
-.
-. if "\*[doc-str-It]"" \
-. tm mdoc error: .It without preceding .Bl (#\n[.c])
-.
-. if \n[doc-nesting-level] \{\
-. tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
-. tm1 " (#\n[.c])
-. \}
-.
-. br
-. if !\n[cR] \
-. ne 3v
-.
-. if \n[.$] \{\
-. ds doc-macro-name It
-.
-. \" fill argument vector
-. nr doc-reg-It 1
-. while (\n[doc-reg-It] <= \n[.$]) \{\
-. ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
-. nr doc-reg-It +1
-. \}
-.
-. nr doc-num-args \n[.$]
-. nr doc-arg-ptr 0
-. \}
-.
-. nr doc-reg-It \n[doc-\*[doc-str-It]-type]
-.
-. if \n[doc-reg-It] \{\
-. \" start item box
-. box doc-item-box\n[doc-list-depth]
-. ev doc-item-env\n[doc-list-depth]
-. evc 0
-. in 0
-. nf
-. \}
-.
-. ie (\n[doc-reg-It] == 1) \{\
-. if \n[.$] \{\
-. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
-. tm1 " don't take arguments (#\n[.c])
-. \}\}
-. el \{\
-. ie \n[.$] \{\
-. if (\n[doc-reg-It] == 2) \{\
-. \" handle list types with arguments
-. doc-parse-arg-vector
-.
-. nr doc-in-list 1
-. nr doc-arg-ptr 1
-. nr doc-curr-type \n[doc-type1]
-. ds doc-curr-arg "\*[doc-arg1]
-.
-. if \n[doc-in-files-section] \{\
-. ds doc-saved-Pa-font "\*[doc-Pa-font]
-. if n \
-. ds doc-Pa-font "\*[doc-No-font]
-. \}
-.
-. ie (\n[doc-type1] == 1) \
-. \*[doc-arg1]
-. el \{\
-. nr doc-arg-ptr 1
-. doc-print-recursive
-. \}\}\}
-. el \{\
-. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
-. tm1 " require arguments (#\n[.c])
-. \}
-. \}
-.
-. \" the previous call of `.doc-print-recursive' can contain calls to
-. \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
-. if !\n[doc-nesting-level] \
-. doc-\*[doc-str-It]
-..
-.
-.
-.\" NS doc-inset-list macro
-.\" NS .It item of list-type inset
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-inset-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 0
-. br
-.
-. nh
-. doc-item-box\n[doc-list-depth]
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-hang-list macro
-.\" NS .It item of list-type hanging tag (as opposed to tagged)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-space
-.\" NS doc-in-list
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dhl
-.\" NS doc-reg-dhl1
-.
-.de doc-hang-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 1
-. nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. ti -\n[doc-reg-dhl]u
-.
-. nh
-. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
-. doc-item-box\n[doc-list-depth]
-. el \{\
-. chop doc-item-box\n[doc-list-depth]
-. nr doc-reg-dhl1 \n[.k]u
-. nop \*[doc-item-box\n[doc-list-depth]]\c
-. nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
-. nr doc-have-space 1
-. \}
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-ohang-list macro
-.\" NS .It item of list-type overhanging tag
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-ohang-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 0
-. nh
-. doc-item-box\n[doc-list-depth]
-. br
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-item-list macro
-.\" NS .It item of list-type [empty tag]
-.
-.de doc-item-list
-. \" finish (dummy) item box
-. br
-. ev
-. box
-.
-. doc-set-vertical-and-indent 0
-. br
-.
-. doc-reset-args
-..
-.
-.
-.\" NS doc-enum-list-count-stackXXX global register
-.\" NS stack of current enum count values
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-enum-list-count-stack1 0
-.
-.
-.\" NS doc-enum-list macro
-.\" NS enumerated list
-.\" NS
-.\" NS modifies:
-.\" NS doc-enum-list-count-stackXXX
-.\" NS doc-in-list
-.
-.de doc-enum-list
-. nr doc-in-list 1
-. nr doc-enum-list-count-stack\n[doc-list-depth] +1
-\# XXX
-\#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
-\#.rj
-. nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
-. nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
-. doc-do-list
-..
-.
-.
-.\" NS doc-bullet-list macro
-.\" NS bullet paragraph list
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-bullet-list
-. nr doc-in-list 1
-. nop \)\*[doc-Sy-font]\[bu]\f[P]
-. doc-do-list
-..
-.
-.
-.\" NS doc-dash-list macro
-.\" NS hyphen paragraph list (sub bullet list)
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-dash-list
-. nr doc-in-list 1
-. nop \)\*[doc-Sy-font]\-\f[P]
-. doc-do-list
-..
-.
-.
-.\" NS doc-do-list macro
-.\" NS .It item of list-type enum/bullet/hyphen
-.
-.als doc-do-list doc-hang-list
-.
-.
-.\" NS doc-have-diag-list global register (bool)
-.\" NS set if last item was a diag list
-.
-.\" XXX: this should be modified to handle nested lists of any type
-.
-.nr doc-have-diag-list 0
-.
-.
-.\" NS doc-diag-list-input-line-count global register
-.\" NS saved line number to be checked in next diag-list item
-.
-.nr doc-diag-list-input-line-count 0
-.
-.
-.\" NS doc-diag-list macro
-.\" NS .It item of list-type diagnostic-message
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-diag-list-input-line-count
-.
-.de doc-diag-list
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie \n[doc-have-diag-list] \{\
-. ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
-. doc-paragraph
-. el \
-. br
-. \}
-. el \
-. br
-. nr doc-diag-list-input-line-count \n[.c]
-.
-. nh
-. nop \*[doc-Sy-font]\c
-. if \n[doc-num-args] \
-. doc-remaining-args
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
-.
-. doc-print-and-reset
-..
-.
-.
-.\" NS doc-tag-list macro
-.\" NS .It item of list-type `tag'
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-space
-.\" NS doc-in-list
-.\" NS
-.\" NS local variables:
-.\" NS doc-box-dtl
-.\" NS doc-reg-dtl
-.\" NS doc-reg-dtl1
-.
-.de doc-tag-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. \" we use a box without `.nf' to compute the tag width (via `dl' register)
-. box doc-box-dtl
-. ev doc-env-dtl
-. evc 0
-. fi
-. ad 0
-. in 0
-. doc-item-box\n[doc-list-depth]
-. br
-. ev
-. box
-.
-. if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \
-. doc-get-tag-width
-. doc-set-vertical-and-indent 1
-. nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. ti -\n[doc-reg-dtl]u
-.
-. nh
-. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
-. doc-item-box\n[doc-list-depth]
-. br
-. \}
-. el \{\
-. chop doc-item-box\n[doc-list-depth]
-. nr doc-reg-dtl1 \n[.k]u
-. nop \*[doc-item-box\n[doc-list-depth]]\c
-. nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
-. nr doc-have-space 1
-. \}
-.
-. if \n[doc-in-files-section] \
-. if n \
-. ds doc-Pa-font "\*[doc-saved-Pa-font]
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-get-tag-width macro
-.\" NS resolve unknown tag width (`tag' list-type only)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-indent
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS
-.\" NS requires:
-.\" NS doc-curr-arg
-.\" NS doc-curr-type
-.
-.de doc-get-tag-width
-. ie (\n[doc-curr-type] == 1) \{\
-. ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
-. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
-. \}
-. el \{\
-. ds doc-tag-width-stack\n[doc-list-depth] No
-. nr doc-list-indent-stack\n[doc-list-depth] \n[No]
-. \}
-..
-.
-.
-.\" NS doc-set-vertical-and-indent macro
-.\" NS set up vertical spacing (if not compact) and indentation (with
-.\" NS offset if argument is non-zero)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-indent
-.
-.de doc-set-vertical-and-indent
-. ie \n[doc-have-indent] \{\
-. nr doc-have-indent 0
-. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. sp \n[doc-display-vertical]u
-. in +\n[doc-list-offset-stack\n[doc-list-depth]]u
-. if \$1 \
-. in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. \}
-. el \{\
-. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. sp \n[doc-display-vertical]u
-. \}
-.
-. if !\n[cR] \
-. ne 2v
-..
-.
-.
-.\" NS doc-list-depth global register
-.\" NS list type stack counter
-.
-.nr doc-list-depth 0
-.
-.
-.\" NS doc-num-columns global register
-.\" NS number of columns
-.
-.nr doc-num-columns 0
-.
-.
-.\" NS doc-compact-list-stackXXX global register (bool)
-.\" NS stack of flags to indicate whether a particular list is compact
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-compact-list-stack1 0
-.
-.
-.\" NS doc-tag-prefix-stackXXX global string
-.\" NS stack of tag prefixes (currently used for -nested -enum lists)
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-tag-prefix-stack1
-.
-.
-.\" NS doc-tag-width-stackXXX global string
-.\" NS stack of strings indicating how to set up current element of
-.\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
-.\" NS directly; if it is a macro name, use the macro's width value;
-.\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-tag-width-stack0
-.ds doc-tag-width-stack1
-.
-.
-.\" NS doc-list-offset-stackXXX global register
-.\" NS stack of list offsets
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-list-offset-stack1 0
-.
-.
-.\" NS doc-end-list macro
-.\" NS list end function; resets indentation (and offset if argument is
-.\" NS non-zero)
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-depth
-.\" NS doc-list-offset-stackXXX
-.
-.de doc-end-list
-. if \$1 \
-' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-.
-' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
-. nr doc-list-offset-stack\n[doc-list-depth] 0
-.
-. if (\n[doc-list-depth] <= 0) \
-. tm mdoc warning: extraneous .El call (#\n[.c])
-.
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-. doc-increment-list-stack
-..
-.
-.
-.\" NS doc-next-list-depth global register
-.\" NS next possible doc-list-depth value
-.
-.nr doc-next-list-depth 1
-.
-.
-.\" NS doc-increment-list-stack macro
-.\" NS set up next block for list
-.\" NS
-.\" NS modifies:
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-next-list-depth
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS doc-enum-list-count-stackXXX
-.
-.de doc-increment-list-stack
-. nr doc-next-list-depth (\n[doc-list-depth] + 1)
-. nr doc-list-indent-stack\n[doc-next-list-depth] 0
-. nr doc-list-offset-stack\n[doc-next-list-depth] 0
-. ds doc-tag-prefix-stack\n[doc-next-list-depth]
-. ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
-. ds doc-list-type-stack\n[doc-next-list-depth]
-. nr doc-compact-list-stack\n[doc-next-list-depth] 0
-. nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
-..
-.
-.
-.\" NS doc-decrement-list-stack macro
-.\" NS decrement stack
-.\" NS
-.\" NS modifies:
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-next-list-depth
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS doc-enum-list-count-stackXXX
-.
-.de doc-decrement-list-stack
-. ds doc-list-type-stack\n[doc-next-list-depth]
-. nr doc-list-indent-stack\n[doc-next-list-depth] 0
-. nr doc-list-offset-stack\n[doc-next-list-depth] 0
-. ds doc-tag-prefix-stack\n[doc-next-list-depth]
-. ds doc-tag-width-stack\n[doc-next-list-depth]
-. nr doc-compact-list-stack\n[doc-next-list-depth] 0
-. nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
-. nr doc-next-list-depth -1
-..
-.
-.
-.\" NS Xr user macro
-.\" NS cross reference (for man pages only)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Xr
-.\" NS
-.\" NS width register `Xr' set in doc-common
-.
-.de Xr
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Xr
-. doc-parse-args \$@
-. \}
-. el \
-. doc-Xr-usage
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. \" first argument must be a string
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
-. \" modify second argument if it is a string and
-. \" remove space inbetween
-. if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
-. ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
-. ds doc-space\n[doc-arg-ptr]
-. \}
-. \}
-. doc-print-recursive
-. \}
-. el \
-. doc-Xr-usage
-. \}
-. el \
-. doc-Xr-usage
-..
-.
-.
-.\" NS doc-Xr-usage macro
-.
-.de doc-Xr-usage
-. tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
-. doc-reset-args
-..
-.
-.
-.\" NS Sx user macro
-.\" NS cross section reference
-.\" NS
-.\" NS width register `Sx' set in doc-common
-.
-.als Sx doc-generic-macro
-.ds doc-Sx-usage section_header
-.
-.
-.\" NS doc-end-column-list macro
-.\" NS column-list end-list
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-depth
-.
-.de doc-end-column-list
-. linetabs 0
-' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
-. ta T .5i
-. fi
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-. doc-increment-list-stack
-..
-.
-.
-.\" NS doc-column-indent-width global register
-.\" NS holds the indent width for a column list
-.
-.nr doc-column-indent-width 0
-.
-.
-.\" NS doc-set-column-tab macro
-.\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
-.\" NS
-.\" NS modifies:
-.\" NS doc-column-indent-width
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dsct
-.\" NS doc-str-dsct
-.\" NS doc-str-dsct1
-.
-.de doc-set-column-tab
-. ds doc-str-dsct
-. nr doc-reg-dsct 1
-. nr doc-column-indent-width 0
-.
-. ie (\$1 < 5) \
-. ds doc-str-dsct1 " \"
-. el \{\
-. ie (\$1 == 5) \
-. ds doc-str-dsct1 " \"
-. el \{\
-. \" XXX: this is packed abnormally close -- intercolumn width
-. \" should be configurable
-. ds doc-str-dsct1 " \"
-. \}\}
-.
-. while (\n[doc-reg-dsct] <= \$1) \{\
-. as doc-str-dsct " +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
-. nr doc-column-indent-width +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
-. nr doc-reg-dsct +1
-. \}
-.
-. ta \*[doc-str-dsct]
-' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
-..
-.
-.
-.\" NS doc-column-list macro
-.\" NS column items
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dcl
-.
-.de doc-column-list
-. if \n[doc-num-args] \
-. doc-parse-arg-vector
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
-. return
-. \}
-.
-. if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
-. nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
-. ds doc-space\n[doc-reg-dcl]
-. \}
-.
-. if !\n[doc-list-indent-stack\n[doc-list-depth]] \
-. nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
-. if !\n[.u] \{\
-. fi
-' in +\n[doc-column-indent-width]u
-. \}
-. ti -\n[doc-column-indent-width]u
-.
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-..
-.
-.
-.\" NS Ta user macro
-.\" NS append tab (\t)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS width register `Ta' set in doc-common
-.
-.de Ta
-. ie \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. nop \*[doc-tab]\c
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. el \
-. doc-reset-args
-. \}
-. el \{\
-. tm1 "Usage: Ta must follow column entry: e.g.
-. tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
-. \}
-..
-.
-.
-.\" NS Dl user macro
-.\" NS display (one line) literal
-.\" NS
-.\" NS this function uses the `Li' font
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Dl' set in doc-common
-.
-.de Dl
-' ta T .5i
-. in +\n[doc-display-indent]u
-.
-. ie \n[doc-arg-limit] \{\
-. tm Usage: .Dl not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Dl
-. doc-parse-args \$@
-. nr doc-arg-ptr 1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Li-font]\c
-. doc-print-recursive
-. \}
-. el \
-. tm Usage: .Dl argument ... (#\n[.c])
-. \}
-.
-. in -\n[doc-display-indent]u
-..
-.
-.
-.\" NS D1 user macro
-.\" NS display (one line)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `D1' set in doc-common
-.
-.de D1
-' ta T .5i
-. in +\n[doc-display-indent]u
-.
-. ie \n[doc-arg-limit] \{\
-. tm Usage: .D1 not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. ie \n[.$] \{\
-. ds doc-macro-name D1
-. doc-parse-args \$@
-. nr doc-arg-ptr 1
-. doc-print-recursive
-. \}
-. el \
-. tm Usage: .D1 argument ... (#\n[.c])
-. \}
-.
-. in -\n[doc-display-indent]u
-..
-.
-.
-.\" NS Ex user macro
-.\" NS defunct
-.
-.de Ex
-. tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
-..
-.
-.
-.\" NS Vt user macro
-.\" NS variable type (for forcing old style variable declarations);
-.\" NS this is not done in the same manner as .Ot for fortrash --
-.\" NS clean up later
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Vt' set in doc-common
-.
-.de Vt
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Vt
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Vt variable_type ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Vt variable_type ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. if \n[doc-in-synopsis-count] \{\
-. \" if a function declaration was the last thing given,
-. \" want vertical space
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. \" if a subroutine was the last thing given, want vertical space
-. if \n[doc-have-func] \{\
-. ie \n[doc-have-var] \
-. br
-. el \{\
-. doc-paragraph
-. rs
-. \}\}
-.
-. nr doc-have-var 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ft-font]\c
-. doc-print-recursive
-.
-. if \n[doc-in-synopsis-count] \{\
-. ie \n[doc-have-old-func] \
-. nop \*[doc-soft-space]\c
-. el \
-. br
-. \}
-..
-.
-.
-.\" NS doc-is-func global register (bool)
-.\" NS set if subroutine (in synopsis only) (fortran only)
-.
-.nr doc-is-func 0
-.
-.
-.\" NS Ft user macro
-.\" NS function type
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ft' set in doc-common
-.
-.de Ft
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Ft
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Ft function_type ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Ft function_type ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. if \n[doc-in-synopsis-count] \{\
-. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. nr doc-is-func 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ft-font]\c
-. doc-print-recursive
-..
-.
-.
-.\" NS doc-have-old-func global register (bool)
-.\" NS set if `Ot' has been called
-.
-.nr doc-have-old-func 0
-.
-.
-.\" NS Ot user macro
-.\" NS old function type (fortran -- no newline)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-decl
-.\" NS doc-have-old-func
-.\" NS doc-have-var
-.\" NS doc-is-func
-.\" NS
-.\" NS width register `Ot' set in doc-common
-.
-.de Ot
-. nr doc-have-old-func 1
-.
-. if \n[doc-in-synopsis-count] \{\
-. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. nr doc-is-func 1
-. \}
-.
-. if \n[.$] \
-. nop \*[doc-Ft-font]\$*\c
-. nop \ \f[P]\c
-..
-.
-.
-.\" NS Fa user macro
-.\" NS function arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fa' set in doc-common
-.
-.de Fa
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fa
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fa function_arguments ... (#\n[.c])
-. \}
-.
-. ie \n[doc-func-arg-count] \
-. doc-do-func
-. el \{\
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fa-font]\c
-. doc-print-recursive
-.
-. if \n[doc-in-synopsis-count] \
-. if \n[doc-have-func] \
-. br
-. \}\}
-..
-.
-.
-.\" NS doc-func-arg-count global register
-.\" NS how many function arguments have been processed so far
-.
-.nr doc-func-arg-count 0
-.
-.
-.\" NS doc-func-arg global string
-.\" NS work buffer for function name strings
-.
-.ds doc-func-arg
-.
-.
-.\" NS doc-num-func-args global register
-.\" NS number of function arguments
-.
-.nr doc-num-func-args 0
-.
-.
-.\" NS doc-func-args-processed global register
-.\" NS function arguments processed so far
-.
-.nr doc-func-args-processed 0
-.
-.
-.\" NS doc-do-func macro
-.\" NS internal .Fa for .Fc
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-func-arg
-.\" NS doc-func-arg-count
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.
-.de doc-do-func
-. if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
-. doc-reset-args
-. return
-. \}
-.
-. nr doc-arg-ptr +1
-.
-. ds doc-func-arg
-. nr doc-num-func-args 0
-. nr doc-func-args-processed 0
-.
-. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
-. if (\n[doc-num-func-args] > 1) \
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
-.
-. if (\n[doc-func-arg-count] > 1) \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
-. nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
-. \}
-.
-. if (\n[doc-func-arg-count] == 1) \{\
-. nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\c
-. \}
-. nr doc-func-arg-count +1
-. doc-do-func
-..
-.
-.
-.\" NS doc-have-func global register (bool)
-.\" NS whether we have more than one function in synopsis
-.
-.nr doc-have-func 0
-.
-.
-.\" NS Fn user macro
-.\" NS functions
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-func
-.\" NS doc-have-var
-.\" NS doc-in-synopsis-count
-.\" NS doc-indent-synopsis
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fn' set in doc-common
-.
-.de Fn
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fn
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
-. \}
-.
-. if \n[doc-in-synopsis-count] \{\
-. \" if there is/has been more than one subroutine declaration
-. ie \n[doc-is-func] \{\
-. br
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. nr doc-is-func 0
-. \}
-. el \{\
-. if \n[doc-have-func] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. \}\}
-.
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. nr doc-have-func 1
-. nr doc-is-func 0
-. rs
-.
-. ie (\n[doc-in-synopsis-count] > 1) \
-. br
-. el \{\
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
-. \}
-.
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. nr doc-in-synopsis-count +1
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\*[lp]\)\c
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nop \*[doc-Fa-font]\c
-. doc-do-func-args
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. \}\}
-.
-. nop \)\*[rp]\)\c
-.
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. \" output the space (if needed)
-. nr doc-arg-ptr -1
-. nop \)\*[doc-space\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-.
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-.
-. if \n[doc-in-synopsis-count] \
-. in -\n[doc-indent-synopsis]u
-..
-.
-.
-.\" NS doc-do-func-args macro
-.\" NS handle function arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-func-arg
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddfa
-.
-.de doc-do-func-args
-. if \n[doc-in-synopsis-count] \{\
-. ds doc-func-arg
-. nr doc-num-func-args 0
-. nr doc-func-args-processed 0
-.
-. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
-. if (\n[doc-num-func-args] > 1) \
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
-. \}
-.
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
-. nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
-. nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
-. doc-do-func-args
-. \}\}
-..
-.
-.
-.\" NS doc-saved-nesting-level global register
-.
-.nr doc-saved-nesting-level 0
-.
-.
-.\" NS doc-in-func-enclosure global register (bool)
-.
-.nr doc-in-func-enclosure 0
-.
-.
-.\" NS Fo user macro
-.\" NS function open
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-func-arg-count
-.\" NS doc-have-decl
-.\" NS doc-have-func
-.\" NS doc-have-var
-.\" NS doc-in-func-enclosure
-.\" NS doc-in-synopsis-count
-.\" NS doc-indent-synopsis
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS doc-saved-nesting-level
-.\" NS
-.\" NS width register `Fo' set in doc-common
-.
-.de Fo
-. if (\n[doc-in-func-enclosure]) \{\
-. tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
-. return
-. \}
-.
-. nr doc-saved-nesting-level \n[doc-nesting-level]
-. nr doc-in-func-enclosure 1
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fo
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fo function_name (#\n[.c])
-. \}
-.
-. if \n[doc-in-synopsis-count] \{\
-. \" if there is/has been more than one subroutine declaration
-. ie \n[doc-is-func] \{\
-. br
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. nr doc-is-func 0
-. \}
-. el \{\
-. if \n[doc-have-func] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. \}\}
-.
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. nr doc-have-func 1
-. nr doc-is-func 0
-. rs
-.
-. ie (\n[doc-in-synopsis-count] > 1) \
-. br
-. el \{\
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
-. \}
-.
-. nr doc-in-synopsis-count +1
-. \}
-.
-. \" start function box
-. box doc-func-box
-. ev doc-func-env
-. evc 0
-. in 0
-. nf
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-func-arg-count 1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\*[lp]\)\c
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Fc user macro
-.\" NS function close
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-func-arg-count
-.\" NS doc-in-func-enclosure
-.\" NS doc-saved-nesting-level
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fc' set in doc-common
-.
-.de Fc
-. if !\n[doc-in-func-enclosure] \{\
-. tm mdoc warning: Extraneous .Fc (#\n[.c])
-. return
-. \}
-.
-. if \n[.$] \{\
-. ds doc-macro-name Fc
-. \" the first (dummy) argument is used to get the correct spacing
-. doc-parse-args \) \$@
-. \}
-.
-. if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
-. tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
-.
-. nr doc-func-arg-count 0
-. nr doc-in-func-enclosure 0
-.
-. nop \|\*[rp]\)
-.
-. \" finish function box
-. br
-. ev
-. box
-. chop doc-func-box
-. unformat doc-func-box
-.
-. if \n[doc-in-synopsis-count] \{\
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. \}
-.
-. nh
-. nop \*[doc-func-box]\c
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-.
-. if \n[doc-in-synopsis-count] \
-. in -\n[doc-indent-synopsis]u
-..
-.
-.
-.\" NS doc-build-func-string macro
-.\" NS collect function arguments and set hard spaces inbetween
-.\" NS
-.\" NS modifies:
-.\" NS doc-func-arg
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.
-.de doc-build-func-string
-. if !\n[doc-num-func-args] \{\
-. nr doc-num-func-args \n[.$]
-. nr doc-func-args-processed 0
-. ds doc-func-arg
-. \}
-.
-. nr doc-func-args-processed +1
-. as doc-func-arg "\$1
-.
-. if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
-. as doc-func-arg "\*[doc-hard-space]
-.
-. shift
-. doc-build-func-string \$@
-. \}
-..
-.
-.
-.\" Very crude references: Stash all reference info into boxes, print out
-.\" reference on .Re request and clean up. Ordering very limited, no fancy
-.\" citations, but can do articles, journals, and books -- need to add
-.\" several missing options (like city etc). Should be able to grab a refer
-.\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
-.\" (ha!).
-.
-.
-.\" NS doc-is-reference global register (bool)
-.\" NS set if in reference
-.
-.nr doc-is-reference 0
-.
-.
-.\" NS doc-reference-count global register
-.\" NS reference element counter
-.
-.nr doc-reference-count 0
-.
-.
-.\" NS Rs user macro
-.\" NS reference start
-.\" NS
-.\" NS modifies:
-.\" NS doc-is-reference
-.\" NS doc-reference-count
-.\" NS
-.\" NS width register `Rs' set in doc-common
-.
-.de Rs
-. ie \n[.$] \
-. tm Usage: .Rs (does not take arguments) (#\n[.c])
-. el \{\
-. nr doc-is-reference 1
-. doc-reset-reference
-. if \n[doc-in-see-also-section] \
-. doc-paragraph
-. nr doc-reference-count 0
-. \}
-..
-.
-.
-.\" NS Re user macro
-.\" NS reference end
-.\" NS
-.\" NS modifies:
-.\" NS doc-is-reference
-.\" NS
-.\" NS width register `Re' set in doc-common
-.
-.de Re
-. ie \n[.$] \
-. tm Usage: .Re (does not take arguments) (#\n[.c])
-. el \{\
-. doc-print-reference
-. doc-reset-reference
-. nr doc-is-reference 0
-. \}
-..
-.
-.
-.\" NS doc-reset-reference macro
-.\" NS reference cleanup
-.\" NS
-.\" NS modifies:
-.\" NS doc-author-count
-.\" NS doc-author-nameXXX
-.\" NS doc-book-count
-.\" NS doc-book-name
-.\" NS doc-corporate-count
-.\" NS doc-corporate-name
-.\" NS doc-date
-.\" NS doc-date-count
-.\" NS doc-issue-count
-.\" NS doc-issue-name
-.\" NS doc-journal-count
-.\" NS doc-journam-name
-.\" NS doc-optional-count
-.\" NS doc-optional-string
-.\" NS doc-page-number-count
-.\" NS doc-page-number-string
-.\" NS doc-reference-title-count
-.\" NS doc-reference-title-name
-.\" NS doc-reference-title-name-for-book
-.\" NS doc-report-count
-.\" NS doc-report-name
-.\" NS doc-volume-count
-.\" NS doc-volume-name
-.
-.de doc-reset-reference
-. while (\n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-author-count]
-. nr doc-author-count -1
-. \}
-. nr doc-journal-count 0
-. nr doc-issue-count 0
-. nr doc-optional-count 0
-. nr doc-corporate-count 0
-. nr doc-report-count 0
-. nr doc-reference-title-count 0
-. nr doc-volume-count 0
-. nr doc-date-count 0
-. nr doc-page-number-count 0
-. nr doc-book-count 0
-.
-. ds doc-journal-name
-. ds doc-issue-name
-. ds doc-optional-string
-. ds doc-corporate-name
-. ds doc-report-name
-. ds doc-reference-title-name
-. ds doc-reference-title-name-for-book
-. ds doc-volume-name
-. ds doc-date
-. ds doc-page-number-string
-. ds doc-book-name
-..
-.
-.
-.\" NS doc-finish-reference macro
-.\" NS auxiliary macro for doc-print-reference
-.\" NS
-.\" NS modifies:
-.\" NS doc-reference-count
-.
-.de doc-finish-reference
-. nr doc-reference-count -1
-. ie \n[doc-reference-count] \
-. nop \),
-. el \
-. nop \).
-..
-.
-.
-.\" NS doc-print-reference macro
-.\" NS reference print
-.\" NS
-.\" NS modifies:
-.\" NS doc-reference-count
-.
-.de doc-print-reference
-.
-. nh
-.
-. if \n[doc-author-count] \{\
-. doc-print-reference-authors
-. nr doc-reference-count -\n[doc-author-count]
-. \}
-.
-. if \n[doc-reference-title-count] \{\
-. unformat doc-reference-title-name
-. chop doc-reference-title-name
-. unformat doc-reference-title-name-for-book
-. chop doc-reference-title-name-for-book
-. ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
-. nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
-. doc-finish-reference
-. \}
-. el \{\
-. nop \*[doc-reference-title-name]\c
-. doc-finish-reference
-. \}\}
-.
-. if \n[doc-book-count] \{\
-. unformat doc-book-name
-. chop doc-book-name
-. nop \*[doc-book-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-publisher-count] \{\
-. unformat doc-publisher-name
-. chop doc-publisher-name
-. nop \*[doc-publisher-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-journal-count] \{\
-. unformat doc-journal-name
-. chop doc-journal-name
-. nop \*[doc-journal-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-report-count] \{\
-. unformat doc-report-name
-. chop doc-report-name
-. nop \*[doc-report-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-issue-count] \{\
-. unformat doc-issue-name
-. chop doc-issue-name
-. nop \*[doc-issue-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-volume-count] \{\
-. unformat doc-volume-name
-. chop doc-volume-name
-. nop \*[doc-volume-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-page-number-count] \{\
-. unformat doc-page-number-string
-. chop doc-page-number-string
-. nop \*[doc-page-number-string]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-corporate-count] \{\
-. unformat doc-corporate-name
-. chop doc-corporate-name
-. nop \*[doc-corporate-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-date-count] \{\
-. unformat doc-date
-. chop doc-date
-. nop \*[doc-date]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-optional-count] \{\
-. unformat doc-optional-string
-. chop doc-optional-string
-. nop \*[doc-optional-string]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-reference-count] \
-. tm mdoc warning: unresolved reference problem
-.
-. hy \n[doc-hyphen-flags]
-..
-.
-.
-.\" NS doc-print-reference-authors macro
-.\" NS print out reference authors
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpra
-.\" NS doc-str-dpra
-.
-.ds doc-str-dpra "and
-.
-.de doc-print-reference-authors
-. nr doc-reg-dpra 1
-.
-. while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
-. unformat doc-author-name\n[doc-reg-dpra]
-. chop doc-author-name\n[doc-reg-dpra]
-. ie (\n[doc-author-count] > 2) \
-. nop \)\*[doc-author-name\n[doc-reg-dpra]],
-. el \
-. nop \)\*[doc-author-name\n[doc-reg-dpra]]
-. nr doc-reg-dpra +1
-. \}
-.
-. unformat doc-author-name\n[doc-reg-dpra]
-. chop doc-author-name\n[doc-reg-dpra]
-. if (\n[doc-author-count] > 1) \
-. nop \)\*[doc-str-dpra]
-. nop \)\*[doc-author-name\n[doc-reg-dpra]],
-..
-.
-.
-.\" NS doc-author-count global register
-.\" NS counter of author references
-.
-.nr doc-author-count 0
-.
-.
-.\" NS doc-author-nameXXX global box
-.\" NS array of author names
-.\" NS
-.\" NS limit:
-.\" NS doc-author-count
-.
-.ds doc-author-name0
-.
-.
-.\" NS %A user macro
-.\" NS reference author(s)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-author-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%A
-.\" NS
-.\" NS width register `%A' set in doc-common
-.
-.de %A
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%A author_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-author-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %A
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" save to reference box
-. box doc-author-name\n[doc-author-count]
-. ev doc-env-%A
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-book-count global register
-.\" NS counter of book references
-.
-.nr doc-book-count 0
-.
-.
-.\" NS doc-book-name global box
-.\" NS string of collected book references
-.
-.ds doc-book-name
-.
-.
-.\" NS %B user macro
-.\" NS [reference] book name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-book-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%B
-.\" NS
-.\" NS width register `%B' set in doc-common
-.
-.de %B
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%B book_name ... (#\n[.c])
-. return
-. \}
-.
-. if \n[doc-is-reference] \{\
-. nr doc-book-count +1
-. nr doc-reference-count +1
-. \}
-.
-. ds doc-macro-name %B
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie \n[doc-is-reference] \{\
-. \" append to reference box
-. boxa doc-book-name
-. ev doc-env-%B
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-. \}
-. el \{\
-. nop \*[doc-Em-font]\c
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-date-count global register
-.\" NS counter of date references
-.
-.nr doc-date-count 0
-.
-.
-.\" NS doc-date global box
-.\" NS string of collected date references
-.
-.ds doc-date
-.
-.
-.\" NS %D user macro
-.\" NS [reference] date
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-date-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%D
-.\" NS
-.\" NS width register `%D' set in doc-common
-.
-.de %D
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%D date ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-date-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %D
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-date
-. ev doc-env-%D
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-publisher-count global register
-.\" NS counter of publisher references
-.
-.nr doc-publisher-count 0
-.
-.
-.\" NS doc-publisher-name global box
-.\" NS string of collected publisher references
-.
-.ds doc-publisher-name
-.
-.
-.\" NS %I user macro
-.\" NS [reference] issuer/publisher name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-publisher-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%I
-.\" NS
-.\" NS width register `%I' set in doc-common
-.
-.de %I
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%I issuer/publisher_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-publisher-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %I
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-publisher-name
-. ev doc-env-%I
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-..
-.
-.
-.\" NS doc-journal-count global register
-.\" NS counter of journal references
-.
-.nr doc-journal-count 0
-.
-.
-.\" NS doc-journal-name global box
-.\" NS string of collected journal references
-.
-.ds doc-journal-name
-.
-.
-.\" NS %J user macro
-.\" NS [reference] Journal Name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-journal-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%J
-.\" NS
-.\" NS width register `%J' set in doc-common
-.
-.de %J
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%J journal_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-journal-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %J
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-journal-name
-. ev doc-env-%J
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-..
-.
-.
-.\" NS doc-issue-count global register
-.\" NS counter of issue number references
-.
-.nr doc-issue-count 0
-.
-.
-.\" NS doc-issue-name global box
-.\" NS string of collected issue number references
-.
-.ds doc-issue-name
-.
-.
-.\" NS %N user macro
-.\" NS [reference] issue number
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-issue-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%N
-.\" NS
-.\" NS width register `%N' set in doc-common
-.
-.de %N
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%N issue_number ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-issue-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %N
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-issue-name
-. ev doc-env-%N
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-optional-count global register
-.\" NS counter of optional information references
-.
-.nr doc-optional-count 0
-.
-.
-.\" NS doc-optional-string global box
-.\" NS string of collected optional information references
-.
-.ds doc-optional-string
-.
-.
-.\" NS %O user macro
-.\" NS [reference] optional information
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-optional-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%O
-.\" NS
-.\" NS width register `%O' set in doc-common
-.
-.de %O
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%O optional_information ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-optional-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %O
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-optional-string
-. ev doc-env-%O
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-page-number-count global register
-.\" NS counter of page number references
-.
-.nr doc-page-number-count 0
-.
-.
-.\" NS doc-page-number-string global box
-.\" NS string of collected page number references
-.
-.ds doc-page-number-string
-.
-.
-.\" NS %P user macro
-.\" NS [reference] page numbers
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-page-number-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%P
-.\" NS
-.\" NS width register `%P' set in doc-common
-.
-.de %P
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%P page_number ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-page-number-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %P
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-page-number-string
-. ev doc-env-%P
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-corporate-count global register
-.\" NS counter of corporate references
-.
-.nr doc-corporate-count 0
-.
-.
-.\" NS doc-corporate-name global box
-.\" NS string of collected corporate references
-.
-.ds doc-corporate-name
-.
-.
-.\" NS %Q user macro
-.\" NS corporate or foreign author
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-corporate-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%Q
-.\" NS
-.\" NS width register `%Q' set in doc-common
-.
-.de %Q
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-corporate-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %Q
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-corporate-name
-. ev doc-env-%Q
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-report-count global register
-.\" NS counter of report references
-.
-.nr doc-report-count 0
-.
-.
-.\" NS doc-report-name global box
-.\" NS string of collected report references
-.
-.ds doc-report-name
-.
-.
-.\" NS %R user macro
-.\" NS [reference] report name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS doc-report-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%R
-.\" NS
-.\" NS width register `%R' set in doc-common
-.
-.de %R
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%R reference_report ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-report-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %R
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-report-name
-. ev doc-env-%R
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-reference-title-count global register
-.\" NS counter of reference title references
-.
-.nr doc-reference-title-count 0
-.
-.
-.\" NS doc-reference-title-name global box
-.\" NS string of collected reference title references
-.
-.ds doc-reference-title-name
-.
-.
-.\" NS doc-reference-title-name-for-book global box
-.\" NS string of collected reference title references
-.\" NS (saved with another font; this is a shortcoming of groff)
-.
-.ds doc-reference-title-name-for-book
-.
-.
-.\" NS %T user macro
-.\" NS reference title
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-title-count
-.\" NS doc-report-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%T
-.\" NS
-.\" NS width register `%T' set in doc-common
-.
-.de %T
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%T reference_title ... (#\n[.c])
-. return
-. \}
-.
-. if \n[doc-is-reference] \{\
-. nr doc-reference-title-count +1
-. nr doc-reference-count +1
-. \}
-.
-. ds doc-macro-name %T
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ie \n[doc-is-reference] \{\
-. \" append to reference box
-. boxa doc-reference-title-name-for-book
-. ev doc-env-%T
-. evc 0
-. in 0
-. nf
-. nop \*[doc-No-font]\c
-. doc-do-references
-.
-. \" do it a second time with another font
-. ds doc-macro-name %T
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. boxa doc-reference-title-name
-. ev doc-env-%T
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-. \}
-. el \{\
-. nop \*[doc-Em-font]\c
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-volume-count global register
-.\" NS counter of reference title references
-.
-.nr doc-volume-count 0
-.
-.
-.\" NS doc-volume-name global box
-.\" NS string of collected volume references
-.
-.ds doc-volume-name
-.
-.
-.\" NS %V user macro
-.\" NS reference volume
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-title-count
-.\" NS doc-volume-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%V
-.\" NS
-.\" NS width register `%V' set in doc-common
-.
-.de %V
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%V volume ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-volume-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %V
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-volume-name
-. ev doc-env-%V
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-do-references macro
-.\" NS reference recursion routine
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddr
-.\" NS doc-reg-ddr1
-.
-.de doc-do-references
-. if !\n[doc-is-reference] \
-. tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
-.
-. nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-ddr1] == 1) \{\
-. \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. doc-append-arg \c 3
-. \*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-.
-. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
-. \" finish reference box
-. br
-. ev
-. boxa
-.
-. doc-reset-args
-. \}
-. el \{\
-. nr doc-reg-ddr \n[doc-arg-ptr]
-. nr doc-arg-ptr +1
-. nop \)\*[doc-space\n[doc-reg-ddr]]\c
-. doc-do-references
-. \}\}
-..
-.
-.
-.\" NS Hf user macro
-.\" NS source include header files.
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS
-.\" NS width register `Hf' set in doc-common
-.
-.de Hf
-. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-paragraph
-. nop File:
-. Pa \$1
-.
-. Bd -literal
-. so \$1
-. Ed
-.
-. doc-paragraph
-. \}
-. el \
-. Usage: .Hf file (#\n[.c])
-..
-.
-.
-.\" NS doc-have-author global register (bool)
-.\" NS set in `An'
-.
-.nr doc-have-author 0
-.
-.
-.\" NS An user macro
-.\" NS author name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-author
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `An' set in doc-common
-.
-.de An
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ie "\$1"-nosplit" \
-. nr doc-in-authors-section 0
-. el \{ .ie "\$1"-split" \
-. nr doc-in-authors-section 1
-. el \{\
-. ds doc-macro-name An
-. doc-parse-args \$@
-. \}\}\}
-. el \{\
-. tm1 "Usage: .An {-nosplit | -split}
-. tm1 .An author_name ... (#\n[.c])
-. \}\}
-.
-. if \n[doc-in-authors-section] \{\
-. ie \n[doc-have-author] \
-. br
-. el \
-. nr doc-have-author 1
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. doc-print-recursive
-. \}
-. el \{\
-. tm Usage: .An author_name ... (#\n[.c])
-. doc-reset-args
-. \}\}
-..
-.
-.
-.\" NS Sf user macro
-.\" NS defunct
-.\" NS
-.\" NS width register `Sf' set in doc-common
-.
-.de Sf
-. tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
-..
-.
-.
-.\" NS Rv user macro
-.\" NS return values
-.\" NS
-.\" NS width register `Rv' set in doc-common
-.\" NS
-.\" NS local variables:
-.\" NS doc-str-Rv-prefix
-.\" NS doc-str-Rv-suffix
-.
-.ds doc-str-Rv-prefix "The
-.ds doc-str-Rv-suffix "function returns the value\~0 if successful;
-.as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
-.as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
-.as doc-str-Rv-suffix " is set to indicate the error.
-.
-.de Rv
-.
-.\" XXX: what does this function without `-std'?
-.
-. if !\n[.$] \{\
-. tm Usage: .Rv [-std] (#\n[.c])
-. return
-. \}
-.
-. \" .ds doc-macro-name Rv
-. \" .nr doc-arg-ptr 0
-. \" .nr lR +1
-. \" .ds doc-arg1 \$2
-. \" .ds doc-arg2 \$3
-. \" .ds doc-arg3 \$4
-. \" .ds doc-arg4 \$5
-. \" .ds doc-arg5 \$6
-. \" .ds doc-arg6 \$7
-. \" .ds doc-arg7 \$8
-. \" .ds doc-arg8 \$9
-. \" .
-. \" .nr doc-num-args (\n[.$] - 1)
-.
-. if "\$1"-std" \{\
-. nr doc-reg-Rv \*[doc-section]
-. if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
-. tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
-. br
-. nop \)\*[doc-str-Rv-prefix]
-. Fn \$2
-. nop \)\*[doc-str-Rv-suffix]
-. \}
-..
-.
-.
-.\" NS Mt user macro
-.\" NS mailto (for conversion to HTML)
-.
-.de Mt
-. \" XXX: error handling missing
-. Pa \$@
-..
-.
-.
-.\" NS Lk user macro
-.\" NS link (for conversion to HTML)
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Lk
-.\" NS doc-str-Lk
-.
-.de Lk
-. ds doc-str-Lk Sy \$@
-.
-. ie (\n[.$] > 1) \{\
-. doc-get-arg-type \$2
-. ie (\n[doc-arg-type] < 3) \{\
-. Em \)\$2:
-. ds doc-str-Lk Sy "\$1"
-. doc-get-width "\$1"
-. shift 2
-. if \n[.$] \
-. as doc-str-Lk " \$@
-. \}
-. el \
-. doc-get-width "\$1"
-. \}
-. el \
-. doc-get-width "\$1"
-.
-. ie n \
-. nr doc-reg-Lk 26
-. el \
-. nr doc-reg-Lk 38
-. ie (\n[doc-width] >= \n[doc-reg-Lk]) \
-. D1 \*[doc-str-Lk]
-. el \
-. \*[doc-str-Lk]
-..
-.
-.
-.rn em e@
-.
-.de em
-. tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
-. tm1 " Should this have been `.Em ...'?
-. ab
-..
-.
-.
-.\" NS doc-empty-line macro
-.\" NS emit warning and print empty line
-.
-.de doc-empty-line
-. if !"\*[doc-macro-name]"Bd" \
-. tm mdoc warning: Empty input line #\n[.c]
-. sp
-..
-.
-.blm doc-empty-line
-.
-.
-.ec
-.
-.
-.\" load local modifications
-.mso mdoc.local
-.
-.\" EOF