summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-11-20 13:31:09 +0000
committerwlemb <wlemb>2000-11-20 13:31:09 +0000
commit84b1d88c8adc19b3e308483bbc614620bfac4f6f (patch)
tree8e27ac65c915976eb871c7929c9010d9a1208f7d
parent49a7c59b9c30257ccf53feb8aecc5aaf5a2d7197 (diff)
downloadgroff-84b1d88c8adc19b3e308483bbc614620bfac4f6f.tar.gz
Internal update.
-rwxr-xr-xtmac/doc-common.new2
-rwxr-xr-xtmac/doc-ditroff.new8
-rwxr-xr-xtmac/doc-nroff.new2
-rwxr-xr-xtmac/doc-syms.new18
-rwxr-xr-xtmac/tmac.doc.new973
5 files changed, 701 insertions, 302 deletions
diff --git a/tmac/doc-common.new b/tmac/doc-common.new
index 8010b87a..0cb376af 100755
--- a/tmac/doc-common.new
+++ b/tmac/doc-common.new
@@ -517,7 +517,7 @@
. tm O8==\n[O8]
. tm O9==\n[O9]
.
-. tm doc-args-processed==\n[doc-args-processed] register
+. tm doc-arg-limit==\n[doc-arg-limit] register
. tm1 " arguments processed so far (doc-parse-args/doc-parse-arg-vector)
. tm aJ==\n[aJ] register
. tm1 " for doc-skip-punct-backwards
diff --git a/tmac/doc-ditroff.new b/tmac/doc-ditroff.new
index c4c28527..06727b14 100755
--- a/tmac/doc-ditroff.new
+++ b/tmac/doc-ditroff.new
@@ -215,7 +215,7 @@
.\" NS doc-reg-Ql, doc-reg-Ql1
.
.de Ql
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ql
. doc-parse-args \$@
@@ -238,8 +238,8 @@
. 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-args-processed]
-. nr doc-reg-Ql1 (\n[doc-args-processed] + 1)
+. 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]
. rn doc-type\n[doc-reg-Ql] doc-type\n[doc-reg-Ql1]
@@ -250,7 +250,7 @@
. ds doc-arg1 Li
. ds doc-type1 macro
. ds doc-space1
-. nr doc-args-processed +1
+. nr doc-arg-limit +1
. \}
.
. ds doc-quote-left "\*[doc-left-singlequote]
diff --git a/tmac/doc-nroff.new b/tmac/doc-nroff.new
index 2eb951cd..057518dd 100755
--- a/tmac/doc-nroff.new
+++ b/tmac/doc-nroff.new
@@ -195,7 +195,7 @@
.\" NS width register `.Ql' set in doc-common
.
.de Ql
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Ql
.
. ds doc-quote-left "\*[doc-left-singlequote]
diff --git a/tmac/doc-syms.new b/tmac/doc-syms.new
index 1a25c59d..e526cd5c 100755
--- a/tmac/doc-syms.new
+++ b/tmac/doc-syms.new
@@ -47,11 +47,11 @@
. ds doc-str-Ux \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
. as doc-out-string \*[doc-Tn-font-size]UNIX\*[doc-str-Ux]
.
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. if \n[.$] \
. doc-parse-args \$@
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
. \*[doc-arg\n[doc-arg-ptr]]
@@ -76,7 +76,7 @@
. nr doc-curr-size \n[.s]
. ds doc-str-Bx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie !\n[.$] \{\
. nop \*[doc-Tn-font-size]BSD\*[doc-str-Bx]
. nop \*[doc-Tn-font-size]UNIX\*[doc-str-Bx]
@@ -100,12 +100,12 @@
. doc-clean-vectors
. \}
.
-. if (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. ie "\*[doc-type\n[doc-arg-ptr]]"string" \{\
. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]\*[doc-Tn-font-size]
. as doc-out-string BSD\*[doc-str-Bx]
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-reg-Bx (\n[doc-arg-ptr] + 1)
. ie "\*[doc-type\n[doc-reg-Bx]]"string" \{\
. if "\*[doc-arg\n[doc-reg-Bx]]"Reno" \{\
@@ -126,7 +126,7 @@
. as doc-out-string \-Tahoe
. \}
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. doc-print-recursive
. \}
@@ -240,7 +240,7 @@
.ds Ai \*[doc-Tn-font-size]ANSI
.
.de St
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name St
.
@@ -259,7 +259,7 @@
. \}
. \}
.
-. if (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. ds doc-str-St \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
@@ -293,7 +293,7 @@
. \" .as doc-out-string " (``\*[doc-Tn-font-size]ANSI\~C\*[doc-str-St]'')
. \}
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. doc-print-recursive
. \}
diff --git a/tmac/tmac.doc.new b/tmac/tmac.doc.new
index 0f936254..7046b7ac 100755
--- a/tmac/tmac.doc.new
+++ b/tmac/tmac.doc.new
@@ -109,15 +109,15 @@
.ds doc-macro-name
.
.
-.\" NS doc-args-processed global register
-.\" NS arguments processed so far
+.\" NS doc-arg-limit global register
+.\" NS total number of arguments
.
-.nr doc-args-processed 0
+.nr doc-arg-limit 0
.
.
.\" NS doc-num-args global register
-.\" NS number of arguments (must be set to \n[.$] prior to
-.\" NS doc-parse-arg-vector request)
+.\" NS number of arguments to handle (must be set to \n[.$] prior to
+.\" NS `doc-parse-arg-vector' request)
.
.nr doc-num-args 0
.
@@ -130,63 +130,79 @@
.
.\" NS doc-argXXX global string
.\" NS argument vector
+.\" NS
+.\" NS limit: doc-arg-limit
+.
+.ds doc-arg1
.
.
.\" NS doc-typeXXX global string
.\" NS argument type vector (`macro', `string', `punct-suffix',
.\" NS `punct-prefix')
+.\" NS
+.\" NS limit: doc-arg-limit
+.
+.ds doc-type1
.
.
.\" NS doc-spaceXXX global string
.\" NS space vector
+.\" NS
+.\" NS limit: doc-arg-limit
+.
+.ds doc-space1
.
.
.\" NS doc-out-string global string
.\" NS main working buffer
.
+.ds doc-out-string
+.
.
.\" NS doc-curr-space global string
.\" NS current space string
.
+.ds doc-curr-space
+.
.
.\" NS doc-parse-args macro
.\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
.\" NS
.\" NS modifies:
-.\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-args-processed,
+.\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
.\" NS doc-arg-ptr, doc-out-string, doc-curr-space
.\" NS
.\" NS local variables:
.\" NS doc-str-dpa, doc-reg-dpa, doc-reg-dpa1
.
.de doc-parse-args
-. nr doc-args-processed +1
+. nr doc-arg-limit +1
.
. \" handle `|' specially for some requests
. ie "\$1"|" \{\
. ie "\*[doc-macro-name]"Op" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Ar" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Fl" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Cm" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"It" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \
-. ds doc-arg\n[doc-args-processed] |
+. ds doc-arg\n[doc-arg-limit] |
. \}\}\}\}\}
. el \
-. ds doc-arg\n[doc-args-processed] "\$1
+. ds doc-arg\n[doc-arg-limit] "\$1
.
. \" get argument type and set spacing
-. doc-get-arg-type* \n[doc-args-processed]
-. ds doc-type\n[doc-args-processed] \*[doc-arg-type]
+. doc-get-arg-type* \n[doc-arg-limit]
+. ds doc-type\n[doc-arg-limit] \*[doc-arg-type]
. doc-set-spacing-for-\*[doc-arg-type]
.
. if \n[doc-debug] \{\
@@ -207,25 +223,25 @@
. nr doc-reg-dpa \n[.i]u
. in -\n[doc-reg-dpa]u
.
-. if (\n[doc-args-processed] == 1) \{\
+. if (\n[doc-arg-limit] == 1) \{\
. nop \f[B]DEBUG(doc-parse-args) MACRO:\f[P] `.\*[doc-macro-name]'
. nop \& \f[B]Line #:\f[P] \n[.c]
. \}
-. nop \t\f[B]Argc:\f[P] \n[doc-args-processed]
-. nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-args-processed]]'
+. nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
+. nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
. nop \ \f[B]Length:\f[P] \n[doc-width]
-. nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-args-processed]]'
+. nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
. nop \ \f[B]Type:\f[P] \*[doc-str-dpa]
. \}
. el \{\
-. if (\n[doc-args-processed] == 1) \{\
+. if (\n[doc-arg-limit] == 1) \{\
. tmc "DEBUG (doc-parse-args)
. tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
. \}
-. tmc " Argc: \n[doc-args-processed]
-. tmc " Argv: `\*[doc-arg\n[doc-args-processed]]'
+. tmc " Argc: \n[doc-arg-limit]
+. tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
. tm1 " Length: \n[doc-width]
-. tmc " Space: `\*[doc-space\n[doc-args-processed]]'
+. tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
. tm1 " Type: \*[doc-str-dpa]
. \}\}
.
@@ -244,14 +260,14 @@
. \}
.
. \" use space after last parameter as the current one
-. ds doc-curr-space "\*[doc-space\n[doc-args-processed]]
+. ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
.
. if \n[doc-debug] \{\
. nr doc-reg-dpa1 1
.
. ie \n[doc-inline-debug] \{\
. nop MACRO REQUEST: \t.\*[doc-macro-name]
-. while (\n[doc-reg-dpa1] <= \n[doc-args-processed]) \{\
+. while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
. nop "\*[doc-arg\n[doc-reg-dpa1]]"
. nr doc-reg-dpa1 +1
. \}
@@ -260,7 +276,7 @@
. \}
. el \{\
. tmc " MACRO REQUEST: .\*[doc-macro-name]
-. while (\n[doc-reg-dpa1] <= \n[doc-args-processed]) \{\
+. while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
. tmc " "\*[doc-arg\n[doc-reg-dpa1]]"
. nr doc-reg-dpa1 +1
. \}
@@ -277,36 +293,36 @@
.\" NS parse argument vector (recursive)
.\" NS
.\" NS modifies:
-.\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-args-processed,
+.\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
.\" NS doc-num-args, doc-arg-ptr, doc-out-string, doc-curr-space
.\" NS
.\" NS local variables:
.\" NS doc-str-dpav, doc-reg-dpav, doc-reg-dpav1
.
.de doc-parse-arg-vector
-. nr doc-args-processed +1
+. nr doc-arg-limit +1
.
. \" handle `|' specially for some requests
-. if "\*[doc-arg\n[doc-args-processed]]"|" \{\
+. if "\*[doc-arg\n[doc-arg-limit]]"|" \{\
. ie "\*[doc-macro-name]"Op" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Ar" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Fl" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. ie "\*[doc-macro-name]"Cm" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. el \{\
. if "\*[doc-macro-name]"It" \
-. ds doc-arg\n[doc-args-processed] \f[R]|\f[P]
+. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
. \}\}\}\}\}
.
. \" get argument type and set spacing
-. doc-get-arg-type* \n[doc-args-processed]
-. ds doc-type\n[doc-args-processed] \*[doc-arg-type]
+. doc-get-arg-type* \n[doc-arg-limit]
+. ds doc-type\n[doc-arg-limit] \*[doc-arg-type]
. doc-set-spacing-for-\*[doc-arg-type]
.
. if \n[doc-debug] \{\
@@ -327,26 +343,26 @@
. nr doc-reg-dpav \n[.i]u
. in -\n[doc-reg-dpav]u
.
-. if (\n[doc-args-processed] == 1) \{\
+. if (\n[doc-arg-limit] == 1) \{\
. nop \f[B]DEBUG(doc-parse-arg-vector)
. nop MACRO:\f[P] `.\*[doc-macro-name]'
. nop \& \f[B]Line #:\f[P] \n[.c]
. \}
-. nop \t\f[B]Argc:\f[P] \n[doc-args-processed]
-. nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-args-processed]]'
+. nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
+. nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
. nop \ \f[B]Length:\f[P] \n[doc-width]
-. nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-args-processed]]'
+. nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
. nop \ \f[B]Type:\f[P] \*[doc-str-dpav]
. \}
. el \{\
-. if (\n[doc-args-processed] == 1) \{\
+. if (\n[doc-arg-limit] == 1) \{\
. tmc "DEBUG(doc-parse-arg-vector)
. tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
. \}
-. tmc " Argc: \n[doc-args-processed]
-. tmc " Argv: `\*[doc-arg\n[doc-args-processed]]'
+. tmc " Argc: \n[doc-arg-limit]
+. tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
. tm1 " Length: \n[doc-width]
-. tmc " Space: `\*[doc-space\n[doc-args-processed]]'
+. tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
. tm1 " Type: \*[doc-str-dpav]
. \}\}
.
@@ -365,7 +381,7 @@
. \}
.
. \" use space after last parameter as the current one
-. ds doc-curr-space "\*[doc-space\n[doc-args-processed]]
+. ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
.
. nr doc-num-args 0
.
@@ -374,7 +390,7 @@
.
. ie \n[doc-inline-debug] \{\
. nop \tMACRO REQUEST: .\*[doc-macro-name]
-. while (\n[doc-reg-dpav1] <= \n[doc-args-processed]) \{\
+. while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
. nop "\*[doc-arg\n[doc-reg-dpav1]]"
. nr doc-reg-dpav1 +1
. \}
@@ -383,7 +399,7 @@
. \}
. el \{\
. tmc " MACRO REQUEST: .\*[doc-macro-name]
-. while (\n[doc-reg-dpav1] <= \n[doc-args-processed]) \{\
+. while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
. tmc " "\*[doc-arg\n[doc-reg-dpav1]]"
. nr doc-reg-dpav1 +1
. \}
@@ -424,12 +440,12 @@
.\" NS `.doc-append-arg [arg] [type]'
.\" NS
.\" NS modifies:
-.\" NS doc-argXXX, doc-typeXXX, doc-args-processed
+.\" NS doc-argXXX, doc-typeXXX, doc-arg-limit
.
.de doc-append-arg
-. nr doc-args-processed +1
-. ds doc-arg\n[doc-args-processed] "\$1
-. ds doc-type\n[doc-args-processed] \$2
+. nr doc-arg-limit +1
+. ds doc-arg\n[doc-arg-limit] "\$1
+. ds doc-type\n[doc-arg-limit] \$2
. doc-set-spacing-for-\$2
..
.
@@ -447,10 +463,10 @@
.\" NS reset argument counters
.\" NS
.\" NS modifies:
-.\" NS doc-args-processed, doc-arg-ptr
+.\" NS doc-arg-limit, doc-arg-ptr
.
.de doc-reset-args
-. nr doc-args-processed 0
+. nr doc-arg-limit 0
. nr doc-arg-ptr 0
..
.
@@ -465,10 +481,11 @@
.de doc-print-out-string
. ie \n[doc-in-diversion] \{\
. if (\n[doc-nesting-level] == 1) \{\
-. nop \&\*[doc-out-string]
-. ds doc-curr-space
-. ds doc-out-string
-. \}
+. if !\n[doc-no-printing] \{\
+. nop \&\*[doc-out-string]
+. ds doc-curr-space
+. ds doc-out-string
+. \}\}
. if !\n[doc-nesting-level] \
. doc-end-diversion-and-print
. \}
@@ -479,10 +496,11 @@
. doc-save-and-divert
. \}
. el \{\
-. nop \&\*[doc-out-string]
-. ds doc-curr-space
-. ds doc-out-string
-. \}\}
+. if !\n[doc-no-printing] \{\
+. nop \&\*[doc-out-string]
+. ds doc-curr-space
+. ds doc-out-string
+. \}\}\}
.
. hy
..
@@ -495,6 +513,8 @@
.\" NS doc-saved-out-string global string
.\" NS saved doc-out-string
.
+.ds doc-saved-out-string
+.
.
.\" NS doc-in-diversion global register (bool)
.\" NS whether we are in a diversion
@@ -551,14 +571,19 @@
..
.
.
+.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
.
-.ec
-.nr doc-curr-font \n[.f]
.nr doc-curr-size \n[.s]
+.
.eo
.
.
@@ -577,7 +602,7 @@
.de Fl
. as doc-out-string \*[doc-Fl-font]
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Fl
. doc-parse-args \$@
@@ -588,9 +613,9 @@
. doc-print-out-string
. \}\}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
. \" last argument
. as doc-out-string \|\-\f[P]\s[0]
. doc-print-and-reset
@@ -662,7 +687,7 @@
. as doc-out-string "\*[doc-str-dfr1]\f[P]\s[0]
. \}
.
-. ie (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
. \" last argument
. if "\*[doc-str-dfr]"punct-prefix" \
. as doc-out-string \|\-
@@ -720,7 +745,7 @@
. \}
.
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
. \" last argument
. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
. doc-print-and-reset
@@ -744,7 +769,7 @@
.de Ar
. as doc-out-string \*[doc-Ar-font]
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ar
. doc-parse-args \$@
@@ -755,9 +780,9 @@
. doc-print-out-string
. \}\}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
. as doc-out-string \&file\ ...\f[P]\s[0]
. doc-print-and-reset
. \}
@@ -786,7 +811,7 @@
.\" NS width register `Ad' set in doc-common
.
.de Ad
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ad
. doc-parse-args \$@
@@ -796,7 +821,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Ad-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -808,10 +833,14 @@
.\" 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)
@@ -827,7 +856,7 @@
.\" needs work - not very translatable
.
.de Cd
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Cd
. doc-parse-args \$@
@@ -839,7 +868,7 @@
. br
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Nm-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -877,7 +906,7 @@
.\" NS width register `Cm' set in doc-common
.
.de Cm
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Cm
. doc-parse-args \$@
@@ -888,7 +917,7 @@
. \}\}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Cm-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -909,7 +938,7 @@
.\" NS width register `Dv' set in doc-common
.
.de Dv
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Dv
. doc-parse-args \$@
@@ -919,7 +948,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Er-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -938,7 +967,7 @@
.\" NS width register `Em' set in doc-common
.
.de Em
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Em
. doc-parse-args \$@
@@ -948,7 +977,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Em-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -967,7 +996,7 @@
.\" NS width register `Er' set in doc-common
.
.de Er
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Er
. doc-parse-args \$@
@@ -977,7 +1006,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Er-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -996,7 +1025,7 @@
.\" NS width register `Ev' set in doc-common
.
.de Ev
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ev
. doc-parse-args \$@
@@ -1006,7 +1035,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Ev-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1024,6 +1053,8 @@
.\" 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
@@ -1063,7 +1094,7 @@
.\" NS width register `Fd' set in doc-common
.
.de Fd
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
. el \{\
. doc-do-func-decl
@@ -1083,7 +1114,7 @@
.\" NS width register `In' set in doc-common
.
.de In
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. tm Usage: .In #include_statement -- In is not callable (#\n[.c])
. el \{\
. doc-do-func-decl
@@ -1107,7 +1138,7 @@
.\" NS width register `Fr' set in doc-common
.
.de Fr
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Fr
. doc-parse-args \$@
@@ -1117,7 +1148,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Ar-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1136,7 +1167,7 @@
.\" NS width register `Ic' set in doc-common
.
.de Ic
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ic
. doc-parse-args \$@
@@ -1146,7 +1177,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Ic-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1165,7 +1196,7 @@
.\" NS width register `Li' set in doc-common
.
.de Li
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Li
. doc-parse-args \$@
@@ -1175,7 +1206,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Li-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1197,7 +1228,7 @@
.\" a pipe symbol. And it isn't documented.
.
.de Or
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Or
. doc-parse-args \$@
@@ -1207,7 +1238,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Ic-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1228,7 +1259,7 @@
.\" NS width register `Ms' set in doc-common
.
.de Ms
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Ms
. doc-parse-args \$@
@@ -1238,7 +1269,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Sy-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1267,7 +1298,7 @@
.\" NS width register `Nm' set in doc-common
.
.de Nm
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Nm
.
@@ -1286,9 +1317,9 @@
. nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
. \}\}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
. \" last argument
. as doc-out-string \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
. doc-print-and-reset
@@ -1336,7 +1367,7 @@
.\" NS width register `Pa' set in doc-common
.
.de Pa
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Pa
. doc-parse-args \$@
@@ -1347,7 +1378,7 @@
. \}\}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Pa-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1366,7 +1397,7 @@
.\" NS width register `Sy' set in doc-common
.
.de Sy
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Sy
. doc-parse-args \$@
@@ -1376,7 +1407,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Sy-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1395,7 +1426,7 @@
.\" NS width register `Me' set in doc-common
.
.de Me
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Me
. doc-parse-args \$@
@@ -1405,7 +1436,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Me-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1424,7 +1455,7 @@
.\" NS width register `Tn' set in doc-common
.
.de Tn
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Tn
. doc-parse-args \$@
@@ -1434,7 +1465,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \&\*[doc-Tn-font-shape]\*[doc-Tn-font-size]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1453,7 +1484,7 @@
.\" NS the code for references below checks for `Tn'!
.
.de doc-reference-trademark
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Tn
. doc-parse-args \$@
@@ -1463,7 +1494,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \&\*[doc-Tn-font-size]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1482,7 +1513,7 @@
.\" NS width register `Va' set in doc-common
.
.de Va
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Va
. doc-parse-args \$@
@@ -1492,7 +1523,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Va-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -1513,7 +1544,7 @@
.de No
. as doc-out-string \*[doc-No-font]
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name No
. doc-parse-args \$@
@@ -1523,7 +1554,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
. \*[doc-arg\n[doc-arg-ptr]]
. el \{\
@@ -1538,11 +1569,15 @@
.\" 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)
@@ -1553,7 +1588,7 @@
.\" NS width register `Op' set in doc-common
.
.de Op
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Op
.
. ds doc-quote-left "\*[doc-left-bracket]
@@ -1572,7 +1607,7 @@
.\" NS width register `Aq' set in doc-common
.
.de Aq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Aq
.
. ds doc-quote-left <
@@ -1591,7 +1626,7 @@
.\" NS width register `Bq' set in doc-common
.
.de Bq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Bq
.
. ds doc-quote-left "\*[doc-left-bracket]
@@ -1610,7 +1645,7 @@
.\" NS width register `Dq' set in doc-common
.
.de Dq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Dq
.
. ds doc-quote-left "\*[Lq]
@@ -1629,7 +1664,7 @@
.\" NS width register `Eq' set in doc-common
.
.de Eq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Eq
.
. ds doc-quote-left "\$1
@@ -1649,7 +1684,7 @@
.\" NS width register `Pq' set in doc-common
.
.de Pq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Pq
.
. ds doc-quote-left "\*[doc-left-parenthesis]
@@ -1674,7 +1709,7 @@
.\" NS width register `Qq' set in doc-common
.
.de Qq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Qq
.
. ds doc-quote-left "\*[q]
@@ -1693,7 +1728,7 @@
.\" NS width register `Sq' set in doc-common
.
.de Sq
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Sq
.
. ds doc-quote-left "\*[doc-left-singlequote]
@@ -1716,7 +1751,7 @@
.\" NS doc-quote-left, doc-quote-right
.
.de doc-enclose-string
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. as doc-out-string \&\*[doc-quote-left]
. el \{\
. ie \n[.$] \{\
@@ -1729,16 +1764,16 @@
. doc-print-out-string
. \}\}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
. \" last argument
. as doc-out-string \&\*[doc-quote-right]
. doc-print-and-reset
. \}
. el \{\
-. ie "\*[doc-type\n[doc-args-processed]]"punct-suffix" \{\
-. nr doc-register-des (\n[doc-args-processed] - 1)
+. ie "\*[doc-type\n[doc-arg-limit]]"punct-suffix" \{\
+. nr doc-register-des (\n[doc-arg-limit] - 1)
. doc-skip-punct-backwards
. nr doc-register-des +1
. ds doc-arg\n[doc-register-des] "\*[doc-quote-right]\&\*[doc-arg\n[doc-register-des]]
@@ -1773,7 +1808,7 @@
.\" NS width register `Ao' set in doc-common
.
.de Ao
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Ao
.
. ds doc-quote-left <
@@ -1791,7 +1826,7 @@
.\" NS width register `Ac' set in doc-common
.
.de Ac
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Ac
.
. ds doc-quote-right >
@@ -1809,7 +1844,7 @@
.\" NS width register `Bo' set in doc-common
.
.de Bo
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Bo
.
. ds doc-quote-left [
@@ -1827,7 +1862,7 @@
.\" NS width register `Bc' set in doc-common
.
.de Bc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Bc
.
. ds doc-quote-right ]
@@ -1845,7 +1880,7 @@
.\" NS width register `Do' set in doc-common
.
.de Do
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Do
.
. ds doc-quote-left "\*[Lq]
@@ -1863,7 +1898,7 @@
.\" NS width register `Dc' set in doc-common
.
.de Dc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Dc
.
. ds doc-quote-right "\*[Rq]
@@ -1881,7 +1916,7 @@
.\" NS width register `Eo' set in doc-common
.
.de Eo
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Eo
.
. ds doc-quote-left "\$1
@@ -1900,7 +1935,7 @@
.\" NS width register `Ec' set in doc-common
.
.de Ec
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Ec
.
. ds doc-quote-right "\$1
@@ -1919,7 +1954,7 @@
.\" NS width register `Oo' set in doc-common
.
.de Oo
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Oo
.
. ds doc-quote-left [
@@ -1937,7 +1972,7 @@
.\" NS width register `Oc' set in doc-common
.
.de Oc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Oc
.
. ds doc-quote-right ]
@@ -1955,7 +1990,7 @@
.\" NS width register `Po' set in doc-common
.
.de Po
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Po
.
. ds doc-quote-left (
@@ -1973,7 +2008,7 @@
.\" NS width register `Pc' set in doc-common
.
.de Pc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Pc
.
. ds doc-quote-right )
@@ -1991,7 +2026,7 @@
.\" NS width register `Qo' set in doc-common
.
.de Qo
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Qo
.
. ds doc-quote-left "\*[q]
@@ -2009,7 +2044,7 @@
.\" NS width register `Qc' set in doc-common
.
.de Qc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Qc
.
. ds doc-quote-right "\*[q]
@@ -2027,7 +2062,7 @@
.\" NS width register `So' set in doc-common
.
.de So
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name So
.
. ds doc-quote-left "\*[doc-left-singlequote]
@@ -2045,7 +2080,7 @@
.\" NS width register `Sc' set in doc-common
.
.de Sc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Sc
.
. ds doc-quote-right "\*[doc-right-singlequote]
@@ -2063,7 +2098,7 @@
.\" NS width register `Xo' set in doc-common
.
.de Xo
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Xo
.
. ds doc-quote-left
@@ -2081,7 +2116,7 @@
.\" NS width register `Xc' set in doc-common
.
.de Xc
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Xc
.
. ds doc-quote-right
@@ -2106,7 +2141,7 @@
.de doc-enclose-open
. nr doc-nesting-level +1
.
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. as doc-out-string \&\*[doc-quote-left]
. el \{\
. ie \n[.$] \{\
@@ -2121,8 +2156,8 @@
. doc-save-and-divert
. \}\}
.
-. ie \n[doc-args-processed] \{\
-. if (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie \n[doc-arg-limit] \{\
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
. \*[doc-arg\n[doc-arg-ptr]]
@@ -2131,7 +2166,7 @@
. No
. \}\}
.
-. if (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
. if \n[doc-list-immediate] \{\
. \" .tm SETTING doc-saved-list-immediate!
. nr doc-saved-list-immediate 1
@@ -2166,7 +2201,7 @@
.
. as doc-out-string \&\*[doc-quote-right]
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \
. doc-parse-args \$@
. el \{\
@@ -2177,8 +2212,8 @@
. ds doc-saved-list-type
. \}\}\}
.
-. if \n[doc-args-processed] \{\
-. ie (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\
+. if \n[doc-arg-limit] \{\
+. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
. ie \n[doc-nesting-level] \
. doc-reset-args
. el \
@@ -2187,7 +2222,7 @@
. el \{\
. nr doc-str-dec (\n[doc-arg-ptr] + 1)
. if "\*[doc-type\n[doc-str-dec]]"string" \
-. as doc-out-string "\*[doc-space\n[doc-args-processed]]
+. as doc-out-string "\*[doc-space\n[doc-arg-limit]]
.
. if \n[doc-list-immediate] \{\
. \" .tm UNSETTING doc-saved-list-immediate==\n[doc-saved-list-immediate]!
@@ -2208,15 +2243,15 @@
.\" NS width register `Pf' set in doc-common
.
.de Pf
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. ds doc-macro-name Pf
.
. ds doc-quote-left "\$1
.
. shift
.
-. ie \n[doc-args-processed] \{\
-. ie ((\n[doc-args-processed] - \n[doc-arg-ptr]) > 1) \{\
+. ie \n[doc-arg-limit] \{\
+. ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
. nr doc-arg-ptr +1
. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
. \}
@@ -2233,9 +2268,9 @@
. doc-parse-args \$@
. \}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \
+. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
. doc-print-and-reset
. el \
. doc-do-\*[doc-type\n[doc-arg-ptr]]
@@ -2252,7 +2287,7 @@
.\" NS width register `Ns' set in doc-common
.
.de Ns
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ds doc-macro-name Ns
. ie \n[.$] \
. doc-parse-args \$@
@@ -2273,7 +2308,7 @@
.\" NS width register `Ap' set in doc-common
.
.de Ap
-. if !\n[doc-args-processed] \
+. if !\n[doc-arg-limit] \
. tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
.
. as doc-out-string \&'
@@ -2329,7 +2364,7 @@
.\" NS without argument, toggle space mode
.\" NS
.\" NS modifies:
-.\" NS doc-macro-name, doc-args-processed, doc-num-args, doc-arg-ptr,
+.\" NS doc-macro-name, doc-arg-limit, doc-num-args, doc-arg-ptr,
.\" NS doc-argXXX, doc-spaceXXX, doc-curr-space, doc-space-mode,
.\" NS doc-space
.\" NS
@@ -2339,7 +2374,7 @@
.\" NS doc-reg-Sm
.
.de Sm
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Sm
. doc-parse-args \$@
@@ -2351,7 +2386,7 @@
. nr doc-space-mode 1
. \}\}
.
-. if \n[doc-args-processed] \{\
+. if \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
.
. \" avoid a warning message in case `Sm' is the last parameter
@@ -2379,8 +2414,8 @@
.
. ie \n[doc-space-mode] \{\
. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-args-processed] - \n[doc-arg-ptr])
-. nr doc-args-processed \n[doc-arg-ptr]
+. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
+. nr doc-arg-limit \n[doc-arg-ptr]
. nr doc-reg-Sm \n[doc-arg-ptr]
. if \n[doc-num-args] \{\
. doc-parse-arg-vector
@@ -2389,7 +2424,7 @@
. el \{\
. \" reset remaining space vector elements
. nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
-. while (\n[doc-reg-Sm] <= \n[doc-args-processed]) \{\
+. 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 `\}'!
@@ -2397,7 +2432,7 @@
. \}
.
. \" do we have parameters to print?
-. ie (\n[doc-args-processed] <= \n[doc-arg-ptr]) \{\
+. 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
@@ -2483,25 +2518,25 @@
.\" NS doc-reg-dssfm, doc-reg-dssfm1
.
.de doc-set-spacing-for-macro
-. nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-args-processed]]]
+. 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) \{\
-. nr doc-reg-dssfm (\n[doc-args-processed] - 1)
+. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
. ds doc-space\n[doc-reg-dssfm]
-. ds doc-space\n[doc-args-processed] "\*[doc-space]
+. 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) \{\
-. nr doc-reg-dssfm (\n[doc-args-processed] - 1)
+. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
. ds doc-space\n[doc-reg-dssfm]
-. ds doc-space\n[doc-args-processed]
+. ds doc-space\n[doc-arg-limit]
. \}
. el \
-. ds doc-space\n[doc-args-processed]
+. ds doc-space\n[doc-arg-limit]
. \}
..
.
@@ -2513,7 +2548,7 @@
.\" NS doc-spaceXXX
.
.de doc-set-spacing-for-string
-. ds doc-space\n[doc-args-processed] "\*[doc-space]
+. ds doc-space\n[doc-arg-limit] "\*[doc-space]
..
.
.
@@ -2527,12 +2562,12 @@
.\" NS doc-reg-dssfps
.
.de doc-set-spacing-for-punct-suffix
-. if (\n[doc-args-processed] > 1) \{\
-. nr doc-reg-dssfps (\n[doc-args-processed] - 1)
+. if (\n[doc-arg-limit] > 1) \{\
+. nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
. ds doc-space\n[doc-reg-dssfps]
. \}
.
-. ds doc-space\n[doc-args-processed] "\*[doc-space]
+. ds doc-space\n[doc-arg-limit] "\*[doc-space]
..
.
.
@@ -2543,7 +2578,7 @@
.\" NS doc-spaceXXX
.
.de doc-set-spacing-for-punct-prefix
-. ds doc-space\n[doc-args-processed]
+. ds doc-space\n[doc-arg-limit]
..
.
.
@@ -2639,10 +2674,14 @@
.\" NS doc-curr-font-for-Ef global register
.\" NS saved current font from `Bf' request
.
+.nr doc-curr-font-for-Ef 0
+.
.
.\" NS doc-curr-size-for-Ef global register
.\" NS saved current size from `Bf' request
.
+.nr doc-curr-size-for-Ef 0
+.
.
.\" NS Bf user macro
.\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
@@ -2706,6 +2745,8 @@
.\" NS doc-keep-type global string
.\" NS current keep type
.
+.ds doc-keep-type
+.
.
.\" NS Bk user macro
.\" NS begin keep
@@ -2770,13 +2811,23 @@
.\" 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: doc-display-depth
+.
+.ds doc-display-type-stack0
.
.
.\" NS doc-display-indent-stackXXX global register
.\" NS stack of display indentation values
+.\" NS
+.\" NS limit: doc-display-depth
+.
+.nr doc-display-indent-stack0 0
.
.
.\" NS Bd user macro
@@ -2980,15 +3031,25 @@
.
.\" NS doc-list-type-stackXXX global string
.\" NS stack of list types
+.\" NS
+.\" NS limit: doc-list-depth
+.
+.ds doc-list-type-stack1
.
.
.\" NS doc-list-indent-stackXXX global register
.\" NS stack of list indentation values
+.\" NS
+.\" NS limit: 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
@@ -3087,7 +3148,7 @@
. doc-increment-list-stack
.
. if \n[.$] \{\
-. nr doc-num-args \n[.$]
+. nr doc-arg-limit \n[.$]
. nr doc-arg-ptr 0
. doc-do-Bl-args
.
@@ -3126,6 +3187,8 @@
.\" NS doc-have-tag-width global macro
.\" NS set if a tag width has been explicitly given
.
+.nr doc-have-tag-width 0
+.
.
.\" NS doc-do-Bl-args macro
.\" NS resolve remaining .Bl arguments
@@ -3140,7 +3203,7 @@
.
.de doc-do-Bl-args
. nr doc-arg-ptr +1
-. if (\n[doc-num-args] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-reg-dBla 1
.
. ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
@@ -3170,53 +3233,56 @@
. \}
. el \
. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-.\"
-.\" el \{\
-.\" ds doc-str-dBla1 \*[doc-arg\n[doc-arg-ptr]]
-.\" substring doc-str-dBla1 1 2
-.\" if .\*[doc-str-dBla1] \{\
-.\" \" execute string in a diversion
-.\" doc-save-global-vars
-.\" di doc-width-diversion
-.\" br
-.\" doc-execute "\*[doc-arg\n[doc-arg-ptr]]"
-.\" br
-.\" di
-.\" doc-restore-global-vars
-.\" \" copy it to a string
-.\" ds doc-str-dBla1 \&\*[doc-width-diversion]\c
-.\" doc-get-width "\*[doc-str-dBla1]"
-.\" \}
-.\" 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" \{\
+. ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
. nr doc-arg-ptr +1
+. \" XXX: this code should be modified to handle nested lists
+. \" of any type
+. nr doc-have-tag-width 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] \{\
+. doc-save-global-vars
+. nr doc-in-diversion 0
+. nr doc-nesting-level 0
+. ds doc-out-string
+. doc-dry-execute "\*[doc-arg\n[doc-arg-ptr]]"
+. \" save doc-out-string
+. ds doc-str-dBla "\*[doc-out-string]
+. doc-restore-global-vars
+. doc-get-width "\*[doc-str-dBla]"
+. \}
+. 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]]
-.
-. ie \B\*[doc-str-dBla] \
-. nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
+. ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
+. nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
. el \{\
-. doc-get-arg-width \n[doc-arg-ptr]
-. ie (\n[doc-width] == 2) \{\
-. doc-get-arg-type \*[doc-str-dBla]
-. ie "\*[doc-arg-type]"macro" \
-. nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
+. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
+.
+. ie \B\*[doc-str-dBla] \
+. 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] == 2) \{\
+. doc-get-arg-type \*[doc-str-dBla]
+. ie "\*[doc-arg-type]"macro" \
+. 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-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}\}
-. el \
-. nr doc-reg-dBla 0
-. \}\}
+. \}\}\}
+. 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)
@@ -3230,19 +3296,272 @@
. tm1 " in .Bl request (#\n[.c])
. \}\}
.
-. if (\n[doc-num-args] > \n[doc-arg-ptr]) \
+. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
. doc-do-Bl-args
. \}
..
.
.
-.\" NS doc-execute macro
-.\" NS execute a string (splitting one arg into multiple args)
-.
-.de doc-execute
+.\" NS doc-save-global-vars macro
+.\" NS save all global variables
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dsgv
+.
+.de doc-save-global-vars
+. nr doc-debug-saved \n[doc-debug]
+. 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]]
+. ds doc-type\n[doc-reg-dsgv]-saved "\*[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
+. \}
+.
+. ds doc-out-string-saved "\*[doc-out-string]
+. ds doc-curr-space-saved "\*[doc-curr-space]
+. ds doc-saved-out-string-saved "\*[doc-saved-out-string]
+. nr doc-in-diversion-saved \n[doc-in-diversion]
+. 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]
+. ds doc-saved-list-type-saved "\*[doc-saved-list-type]
+. ds doc-space-saved "\*[doc-space]
+. nr doc-space-mode-saved \n[doc-space-mode]
+. nr doc-curr-font-for-Ef-saved \n[doc-curr-font-for-Ef]
+. nr doc-curr-size-for-Ef-saved \n[doc-curr-size-for-Ef]
+. ds doc-keep-type-saved "\*[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-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-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-reg-dsgv +1
+. \}
+.
+. nr doc-have-indent-saved \n[doc-have-indent]
+. nr doc-have-tag-width-saved \n[doc-have-tag-width]
+. ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
+. ds doc-curr-type-saved "\*[doc-curr-type]
+. ds doc-curr-arg-saved "\*[doc-curr-arg]
+. nr doc-enum-list-count-saved \n[doc-enum-list-count]
+. 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-saved-list-immediate-saved \n[doc-saved-list-immediate]
+. nr doc-list-immediate-saved \n[doc-list-immediate]
+. 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]
+. ds doc-reference-string-name-saved "\*[doc-reference-string-name]
+. nr doc-authors-processed-saved \n[doc-authors-processed]
+. 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]
+. 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]
+..
+.
+.
+.\" NS doc-restore-global-vars macro
+.\" NS restore all global variables
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-drgv
+.
+.de doc-restore-global-vars
+. nr doc-debug \n[doc-debug-saved]
+. 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]
+. ds doc-type\n[doc-reg-drgv] "\*[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
+. \}
+.
+. ds doc-out-string "\*[doc-out-string-saved]
+. ds doc-curr-space "\*[doc-curr-space-saved]
+. ds doc-saved-out-string "\*[doc-saved-out-string-saved]
+. nr doc-in-diversion \n[doc-in-diversion-saved]
+. 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]
+. ds doc-saved-list-type "\*[doc-saved-list-type-saved]
+. ds doc-space "\*[doc-space-saved]
+. nr doc-space-mode \n[doc-space-mode-saved]
+. nr doc-curr-font-for-Ef \n[doc-curr-font-for-Ef-saved]
+. nr doc-curr-size-for-Ef \n[doc-curr-size-for-Ef-saved]
+. ds doc-keep-type "\*[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-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-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-reg-drgv +1
+. \}
+.
+. nr doc-have-indent \n[doc-have-indent-saved]
+. nr doc-have-tag-width \n[doc-have-tag-width-saved]
+. ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
+. ds doc-curr-type "\*[doc-curr-type-saved]
+. ds doc-curr-arg "\*[doc-curr-arg-saved]
+. nr doc-enum-list-count \n[doc-enum-list-count-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-saved-list-immediate \n[doc-saved-list-immediate-saved]
+. nr doc-list-immediate \n[doc-list-immediate-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]
+. ds doc-reference-string-name "\*[doc-reference-string-name-saved]
+. nr doc-authors-processed \n[doc-authors-processed-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]
+. 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]
+..
+.
+.
+.\" NS doc-no-printing global register (bool)
+.\" NS set if output is suppressed
+.
+.nr doc-no-printing 0
+.
+.
+.\" NS doc-dry-execute macro
+.\" NS execute a string (splitting one arg into multiple args) without
+.\" NS output; this command must be surrounded by `doc-save-global-args'
+.\" NS and `doc-restore-global-args'
+.
+.de doc-dry-execute
+. doc-reset-args
+. nr doc-no-printing 1
. ds doc-str-de \$1
. shift
. nop \*[doc-str-de] \$@
+. nr doc-no-printing 0
..
.
.
@@ -3310,18 +3629,24 @@
..
.
.
-.\" NS doc-save-Pa-font global string
-.\" NS saved doc-Pa-font font string for section FILES (no underline if
+.\" 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 string
.\" NS current argument type
.
+.ds doc-curr-type
+.
.
.\" NS doc-curr-arg global string
.\" NS current argument
.
+.ds doc-curr-arg
+.
.
.\" NS It user macro
.\" NS list item
@@ -3329,7 +3654,7 @@
.\" NS modifies:
.\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
.\" NS doc-out-string, doc-nesting-level, doc-list-immediate,
-.\" NS doc-saved-list-type, doc-save-Pa-font, doc-curr-type, doc-curr-arg,
+.\" NS doc-saved-list-type, doc-saved-Pa-font, doc-curr-type, doc-curr-arg,
.\" NS
.\" NS width register `It' set in doc-common
.\" NS
@@ -3398,7 +3723,7 @@
. ds doc-curr-arg "\*[doc-arg1]
.
. if \n[doc-in-files-section] \{\
-. ds doc-save-Pa-font "\*[doc-Pa-font]
+. ds doc-saved-Pa-font "\*[doc-Pa-font]
. if n \
. ds doc-Pa-font "\*[doc-No-font]
. \}
@@ -3621,7 +3946,7 @@
.
. if \n[doc-in-files-section] \
. if n \
-. ds doc-Pa-font "\*[doc-save-Pa-font]
+. ds doc-Pa-font "\*[doc-saved-Pa-font]
.
. nr doc-nesting-level -1
. nr doc-list-immediate 0
@@ -3701,6 +4026,8 @@
.\" NS doc-list-immediate global register (bool)
.\" NS tag flag (for diversions)
.
+.nr doc-list-immediate 0
+.
.
.\" NS doc-num-columns global register
.\" NS number of columns
@@ -3710,6 +4037,8 @@
.
.\" NS doc-compact-list-stackXXX global register (bool)
.\" NS stack of flags to indicate whether a particular list is compact
+.\" NS
+.\" NS limit: doc-list-depth
.
.nr doc-compact-list-stack1 0
.
@@ -3719,6 +4048,8 @@
.\" 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: doc-list-depth
.
.ds doc-tag-width-stack0
.ds doc-tag-width-stack1
@@ -3726,6 +4057,8 @@
.
.\" NS doc-list-offset-stackXXX global register
.\" NS stack of list offsets
+.\" NS
+.\" NS limit: doc-list-depth
.
.nr doc-list-offset-stack1 0
.
@@ -3804,7 +4137,7 @@
.\" NS width register `Xr' set in doc-common
.
.de Xr
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Xr
. doc-parse-args \$@
@@ -3814,7 +4147,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
. tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
. el \{\
@@ -3823,12 +4156,12 @@
. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. if "\*[doc-type\n[doc-arg-ptr]]"string" \{\
. as doc-out-string \&\*[lp]\*[doc-arg\n[doc-arg-ptr]]\*[rp]
. nr doc-arg-ptr +1
. \}\}
-. ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
. doc-do-\*[doc-type\n[doc-arg-ptr]]
. el \
. doc-print-and-reset
@@ -3849,7 +4182,7 @@
.\" NS width register `Sx' set in doc-common
.
.de Sx
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Sx
. doc-parse-args \$@
@@ -3859,7 +4192,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Sx-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -3887,6 +4220,8 @@
.\" 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'
@@ -3942,7 +4277,7 @@
. doc-parse-arg-vector
. nr doc-arg-ptr +1
.
-. ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
. nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
. ds doc-space\n[doc-reg-dcl]
@@ -3963,9 +4298,9 @@
.\" NS width register `Ta' set in doc-common
.
.de Ta
-. ie \n[doc-args-processed] \{\
+. ie \n[doc-arg-limit] \{\
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \t
. doc-do-\*[doc-type\n[doc-arg-ptr]]
. \}
@@ -3992,7 +4327,7 @@
' ta T .5i
. in (\n[.i]u + \n[doc-display-indent]u)
.
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. tm Usage: .Dl not callable by other macros (#\n[.c])
. el \{\
. ie \n[.$] \{\
@@ -4020,7 +4355,7 @@
' ta T .5i
. in (\n[.i]u + \n[doc-display-indent]u)
.
-. ie \n[doc-args-processed] \
+. ie \n[doc-arg-limit] \
. tm Usage: .D1 not callable by other macros (#\n[.c])
. el \{\
. ie \n[.$] \{\
@@ -4129,7 +4464,7 @@
..
.
.
-.\" NS doc-have-old-func global register
+.\" NS doc-have-old-func global register (bool)
.\" NS set if `Ot' has been called
.
.nr doc-have-old-func 0
@@ -4178,7 +4513,7 @@
.\" NS width register `Fa' set in doc-common
.
.de Fa
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Fa
. doc-parse-args \$@
@@ -4191,7 +4526,7 @@
. doc-do-func
. el \{\
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Fa-font]
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
@@ -4213,14 +4548,20 @@
.\" 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
@@ -4230,7 +4571,7 @@
.\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
.
.de doc-do-func
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
.
. ds doc-func-arg
@@ -4239,7 +4580,7 @@
.
. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
. if (\n[doc-num-func-args] > 1) \
-. rn doc-func-arg doc-arg\n[doc-arg-ptr]
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
.
. if (\n[doc-func-arg-count] > 1) \{\
. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|,
@@ -4277,7 +4618,7 @@
.\" NS width register `Fn' set in doc-common
.
.de Fn
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Fn
. doc-parse-args \$@
@@ -4329,14 +4670,14 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
. as doc-out-string \f[P]\s[0]\*[lp]
.
. nr doc-arg-ptr +1
-. ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. as doc-out-string \*[doc-Fa-font]
. doc-do-func-\*[doc-type\n[doc-arg-ptr]]
. \}
@@ -4387,12 +4728,12 @@
.
. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
. if (\n[doc-num-func-args] > 1) \
-. rn doc-func-arg doc-arg\n[doc-arg-ptr]
+. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
. \}
.
. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-reg-ddfs \n[doc-arg-ptr]
. nr doc-arg-ptr +1
. if "\*[doc-type\n[doc-arg-ptr]]"string" \{\
@@ -4431,7 +4772,7 @@
. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
. \}
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
. No
. el \
. doc-print-and-reset
@@ -4455,7 +4796,7 @@
. as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
. \}
.
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. No
. \}
@@ -4478,7 +4819,7 @@
.de Fo
. hy 0
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name Fo
. doc-parse-args \$@
@@ -4529,7 +4870,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-nesting-level +1
. nr doc-func-arg-count 1
. nr doc-curr-font \n[.f]
@@ -4552,7 +4893,7 @@
.\" NS width register `Fc' set in doc-common
.
.de Fc
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. if \n[.$] \{\
. ds doc-macro-name Fc
. doc-parse-args \$@
@@ -4565,7 +4906,7 @@
. as doc-out-string \|\*[rp]\f[R];\f[P]
. el \
. as doc-out-string \|\*[rp]
-. ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. nr doc-arg-ptr +1
. \*[doc-arg\n[doc-arg-ptr]]
. \}
@@ -4613,18 +4954,24 @@
.\" it a wee bit (prefix a `.' to the %[A-Z]) and not worry (ha!).
.
.
-.\" NS doc-is-reference global register
+.\" 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 doc-reference-string-name global string
.\" NS contains current reference string name for handling in
.\" NS `doc-do-references'
.
+.ds doc-reference-string-name
+.
.
.\" NS Rs user macro
.\" NS reference start
@@ -4796,6 +5143,8 @@
.\" NS doc-authors-processed global register
.\" NS author references processed so far
.
+.nr doc-authors-processed 0
+.
.
.\" NS doc-print-reference-authors macro
.\" NS print out reference authors
@@ -4817,9 +5166,15 @@
.\" NS doc-author-count global register
.\" NS counter of author references
.
+.nr doc-author-count 0
+.
.
.\" NS doc-author-nameXXX global string
.\" NS array of author names
+.\" NS
+.\" NS limit: doc-author-count
+.
+.ds doc-author-name0
.
.
.\" NS %A user macro
@@ -4832,7 +5187,7 @@
.\" NS width register `%A' set in doc-common
.
.de %A
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-author-count +1
. nr doc-reference-count +1
@@ -4846,7 +5201,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -4857,10 +5212,14 @@
.\" NS doc-book-count global register
.\" NS counter of book references
.
+.nr doc-book-count 0
+.
.
.\" NS doc-book-name global string
.\" NS string of collected book references
.
+.ds doc-book-name
+.
.
.\" NS %B user macro
.\" NS [reference] book name
@@ -4873,7 +5232,7 @@
.\" NS width register `%B' set in doc-common
.
.de %B
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. if \n[doc-is-reference] \{\
. nr doc-book-count +1
@@ -4889,7 +5248,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
.
@@ -4906,10 +5265,14 @@
.\" NS doc-date-count global register
.\" NS counter of date references
.
+.nr doc-date-count 0
+.
.
.\" NS doc-date global string
.\" NS string of collected date references
.
+.ds doc-date
+.
.
.\" NS %D user macro
.\" NS [reference] date
@@ -4921,7 +5284,7 @@
.\" NS width register `%D' set in doc-common
.
.de %D
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-date-count +1
. nr doc-reference-count +1
@@ -4935,7 +5298,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -4946,10 +5309,14 @@
.\" NS doc-publisher-count global register
.\" NS counter of publisher references
.
+.nr doc-publisher-count 0
+.
.
.\" NS doc-publisher-name global string
.\" NS string of collected publisher references
.
+.ds doc-publisher-name
+.
.
.\" NS %I user macro
.\" NS [reference] issuer/publisher name
@@ -4961,7 +5328,7 @@
.\" NS width register `%I' set in doc-common
.
.de %I
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-publisher-count +1
. nr doc-reference-count +1
@@ -4975,7 +5342,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -4986,10 +5353,14 @@
.\" NS doc-journal-count global register
.\" NS counter of journal references
.
+.nr doc-journal-count 0
+.
.
.\" NS doc-journal-name global string
.\" NS string of collected journal references
.
+.ds doc-journal-name
+.
.
.\" NS %J user macro
.\" NS [reference] Journal Name
@@ -5001,7 +5372,7 @@
.\" NS width register `%J' set in doc-common
.
.de %J
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-journal-count +1
. nr doc-reference-count +1
@@ -5015,7 +5386,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5026,10 +5397,14 @@
.\" NS doc-issue-count global register
.\" NS counter of issue number references
.
+.nr doc-issue-count 0
+.
.
.\" NS doc-issue-name global string
.\" NS string of collected issue number references
.
+.ds doc-issue-name
+.
.
.\" NS %N user macro
.\" NS [reference] issue number
@@ -5041,7 +5416,7 @@
.\" NS width register `%N' set in doc-common
.
.de %N
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-issue-count +1
. nr doc-reference-count +1
@@ -5055,7 +5430,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5066,10 +5441,14 @@
.\" NS doc-optional-count global register
.\" NS counter of optional information references
.
+.nr doc-optional-count 0
+.
.
.\" NS doc-optional-string global string
.\" NS string of collected optional information references
.
+.ds doc-optional-string
+.
.
.\" NS %O user macro
.\" NS [reference] optional information
@@ -5081,7 +5460,7 @@
.\" NS width register `%O' set in doc-common
.
.de %O
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-optional-count +1
. nr doc-reference-count +1
@@ -5095,7 +5474,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5106,10 +5485,14 @@
.\" 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 string
.\" NS string of collected page number references
.
+.ds doc-page-number-string
+.
.
.\" NS %P user macro
.\" NS [reference] page numbers
@@ -5121,7 +5504,7 @@
.\" NS width register `%P' set in doc-common
.
.de %P
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-page-number-count +1
. nr doc-reference-count +1
@@ -5135,7 +5518,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5146,10 +5529,14 @@
.\" NS doc-corporate-count global register
.\" NS counter of corporate references
.
+.nr doc-corporate-count 0
+.
.
.\" NS doc-corporate-name global string
.\" NS string of collected corporate references
.
+.ds doc-corporate-name
+.
.
.\" NS %Q user macro
.\" NS corporate or foreign author
@@ -5161,7 +5548,7 @@
.\" NS width register `%Q' set in doc-common
.
.de %Q
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-corporate-count +1
. nr doc-reference-count +1
@@ -5175,7 +5562,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5186,10 +5573,14 @@
.\" NS doc-report-count global register
.\" NS counter of report references
.
+.nr doc-report-count 0
+.
.
.\" NS doc-report-name global string
.\" NS string of collected report references
.
+.ds doc-report-name
+.
.
.\" NS %R user macro
.\" NS [reference] report name
@@ -5201,7 +5592,7 @@
.\" NS width register `%R' set in doc-common
.
.de %R
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. nr doc-report-count +1
. nr doc-reference-count +1
@@ -5215,7 +5606,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5226,10 +5617,14 @@
.\" 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 string
.\" NS string of collected reference title references
.
+.ds doc-reference-title-name
+.
.
.\" NS %T user macro
.\" NS reference title
@@ -5242,7 +5637,7 @@
.\" NS width register `%T' set in doc-common
.
.de %T
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. if \n[doc-is-reference] \{\
. nr doc-reference-title-count +1
@@ -5258,7 +5653,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. ie \n[doc-is-reference] \
@@ -5273,10 +5668,14 @@
.\" NS doc-volume-count global register
.\" NS counter of reference title references
.
+.nr doc-volume-count 0
+.
.
.\" NS doc-volume-name global string
.\" NS string of collected volume references
.
+.ds doc-volume-name
+.
.
.\" NS %V user macro
.\" NS reference volume
@@ -5288,7 +5687,7 @@
.\" NS width register `%V' set in doc-common
.
.de %V
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name %V
. nr doc-volume-count +1
@@ -5301,7 +5700,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-do-references
@@ -5338,7 +5737,7 @@
. nr doc-reg-ddr \n[doc-arg-ptr]
. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
.
-. ie (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\
+. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
. as \*[doc-reference-string-name] \&\*[doc-out-string]
. ds doc-out-string
. ds doc-reference-string-name
@@ -5387,7 +5786,7 @@
..
.
.
-.\" NS doc-have-author global register
+.\" NS doc-have-author global register (bool)
.\" NS set in `An'
.
.nr doc-have-author 0
@@ -5410,7 +5809,7 @@
. nr doc-have-author 1
. \}
.
-. if !\n[doc-args-processed] \{\
+. if !\n[doc-arg-limit] \{\
. ie \n[.$] \{\
. ds doc-macro-name An
. doc-parse-args \$@
@@ -5420,7 +5819,7 @@
. \}
.
. nr doc-arg-ptr +1
-. if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\
+. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
. nr doc-curr-font \n[.f]
. nr doc-curr-size \n[.s]
. doc-print-recursive