summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtmac/doc-common.new42
-rwxr-xr-xtmac/doc-syms.new188
-rwxr-xr-xtmac/tmac.doc.new104
3 files changed, 161 insertions, 173 deletions
diff --git a/tmac/doc-common.new b/tmac/doc-common.new
index 87da1bc4..da181cdc 100755
--- a/tmac/doc-common.new
+++ b/tmac/doc-common.new
@@ -311,6 +311,34 @@
.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.2 4.2
+.ds doc-operating-system-FreeBSD-5.0 5.0
+.
.de Os
. ds doc-operating-system Null
.
@@ -330,7 +358,7 @@
. if "\$1"BSD" \{\
. if \A\$2 \{\
. ie d doc-operating-system-BSD-\$2 \
-. ds doc-operating-system \*[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])
. \}
@@ -346,6 +374,16 @@
. \}
. \}
.
+. 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"" \
@@ -393,7 +431,7 @@
. ie (\n[.$] == 3) \
. ds doc-date-string \$1\~\$2 \$3
. el \{\
-. ds doc-date-string \*[doc-date-\n[mo]]
+. ds doc-date-string "\*[doc-date-\n[mo]]
. as doc-date-string \~\n[dy], \n[year]
. \}
. \}
diff --git a/tmac/doc-syms.new b/tmac/doc-syms.new
index e86f82cb..45ae39c9 100755
--- a/tmac/doc-syms.new
+++ b/tmac/doc-syms.new
@@ -76,10 +76,19 @@
.\" NS doc-macro-name, doc-curr-font, doc-curr-size, doc-arg-ptr
.\" NS
.\" NS local variable:
-.\" NS doc-str-Bx, doc-str-Bx1, doc-reg-Bx
+.\" NS doc-str-Bx, doc-str-Bx1, doc-reg-Bx, 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[.s]
@@ -110,25 +119,14 @@
. 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]]"Reno" \
-. as doc-str-Bx1 \-Reno
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"reno" \
-. as doc-str-Bx1 \-Reno
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"Tahoe" \
-. as doc-str-Bx1 \-Tahoe
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"tahoe" \
-. as doc-str-Bx1 \-Tahoe
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"Lite" \
-. as doc-str-Bx1 \-Lite
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"lite" \
-. as doc-str-Bx1 \-Lite
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"Lite2" \
-. as doc-str-Bx1 \-Lite2
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"lite2" \
-. as doc-str-Bx1 \-Lite2
+. 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
@@ -167,10 +165,35 @@
.\" NS doc-macro-name, doc-curr-font, doc-curr-size, doc-arg-ptr
.\" NS
.\" NS local variable:
-.\" NS doc-str-At, doc-str-At1, doc-reg-At
+.\" NS doc-str-At, doc-str-At1, doc-reg-At, 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[.s]
@@ -188,56 +211,17 @@
. 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]]"32v" \{\
-. ds doc-str-At1 "\&Version\~32V
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v1" \{\
-. ds doc-str-At1 "\&Version\~1
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v2" \{\
-. ds doc-str-At1 "\&Version\~2
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v3" \{\
-. ds doc-str-At1 "\&Version\~3
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v4" \{\
-. ds doc-str-At1 "\&Version\~4
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v5" \{\
-. ds doc-str-At1 "\&Version\~5
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v6" \{\
-. ds doc-str-At1 "\&Version\~6
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"v7" \{\
-. ds doc-str-At1 "\&Version\~7
-. as doc-str-At1 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"V" \{\
-. ds doc-str-At1 "\*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V
-. as doc-str-At1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"V.1" \{\
-. ds doc-str-At1 "\*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.1
-. as doc-str-At1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"V.2" \{\
-. ds doc-str-At1 "\*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.2
-. as doc-str-At1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
-. \}
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"V.4" \{\
-. ds doc-str-At1 "\*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.4
-. as doc-str-At1 " \*[doc-Tn-font-size]UNIX\*[doc-str-At]
+. 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
. \}
@@ -266,6 +250,8 @@
.\" 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[.s]
@@ -283,39 +269,17 @@
. 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-Fx1 \~\*[doc-arg\n[doc-arg-ptr]]
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"1.0" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.1.5" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.1.5.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.0" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.0.5" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.1.5" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.1.6" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.1.7" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.2" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.5" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.6" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.7" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"2.2.8" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.0" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.2" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.3" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.4" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"3.5" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"4.0" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"4.1" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"4.2" .
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"5.0" .
-. el \{\
-. tmc "mdoc warning: .Fx: Unknown FreeBSD version
-. tm1 " `\*[doc-arg\n[doc-arg-ptr]]' (#\n[.c])
-. \}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}\}
+. 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
. \}
@@ -344,6 +308,8 @@
.\" 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[.s]
@@ -362,14 +328,17 @@
. 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]]"0.8a" .as doc-str-Nx1 \~0.8A
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"0.9a" .as doc-str-Nx1 \~0.9A
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.0a" .as doc-str-Nx1 \~1.0A
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.2a" .as doc-str-Nx1 \~1.2A
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"1.2b" .as doc-str-Nx1 \~1.2B
+. 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
. \}
@@ -568,13 +537,12 @@
. 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]]]
+. ds doc-str-St1 "\*[doc-str-St-\*[doc-arg\n[doc-arg-ptr]]]
. el \
. doc-St-usage
. \}
. el \
. doc-St-usage
-. \}
.
. \" replacing argument with result
. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-St1]
@@ -584,6 +552,8 @@
..
.
.
+.\" NS doc-St-usage macro
+.
.de doc-St-usage
. tm1 "Usage: .St [-p1003.1 | -p1003.1-88 | -p1003.1-90 | -p1003.1b |
. tm1 " -p1003.1b-93 | -p1003.1g | -p1003.2 | -p1003.2-92 |
@@ -635,7 +605,7 @@
. nr doc-arg-ptr +1
. if (\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]]]
+. 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
diff --git a/tmac/tmac.doc.new b/tmac/tmac.doc.new
index 8407a989..f90e16e2 100755
--- a/tmac/tmac.doc.new
+++ b/tmac/tmac.doc.new
@@ -2880,7 +2880,7 @@
. nr doc-display-indent-stack\n[doc-display-depth] 0
.
. if \n[doc-display-indent-stack\n[doc-display-depth]] \
-' in (\n[.i]u + \n[doc-display-indent-stack\n[doc-display-depth]]u)
+' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
.
. if !\n[doc-is-compact] \{\
. if !\n[doc-in-synopsis-count] \{\
@@ -2995,7 +2995,7 @@
. ps \n[doc-curr-size]
. \}
.
-. in (\n[.i]u - \n[doc-display-indent-stack\n[doc-display-depth]]u)
+. in -\n[doc-display-indent-stack\n[doc-display-depth]]u
.
. nr doc-display-indent-stack\n[doc-display-depth] 0
. ds doc-display-type-stack\n[doc-display-depth]
@@ -3565,7 +3565,7 @@
.\" NS doc-list-depth
.\" NS
.\" NS local variables:
-.\" NS doc-str-El, doc-reg-El
+.\" NS doc-str-El
.\" NS
.\" NS width register `El' set in doc-common
.
@@ -3574,43 +3574,25 @@
. tm Usage: .El (does not take arguments) (#\n[.c])
. el \{\
. ds doc-macro-name El
-. nr doc-reg-El 0
. ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
.
-. ie "\*[doc-str-El]"enum-list" \
+. ie "\*[doc-str-El]"enum-list" \{\
. nr doc-enum-list-count 0
-. el \{ .ie "\*[doc-str-El]"column-list" \{\
-. nr doc-reg-El 1
-. doc-do-end-column-list
-. \}
-. el \{ .ie "\*[doc-str-El]"item-list" \{\
-. nr doc-reg-El 1
-' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-. doc-increment-list-stack
-. \}
-. el \{ .ie "\*[doc-str-El]"ohang-list" \{\
-. nr doc-reg-El 1
-' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-. doc-increment-list-stack
+. doc-end-list 1
. \}
-. el \{ .if "\*[doc-str-El]"inset-list" \{\
-. nr doc-reg-El 1
-' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-. doc-increment-list-stack
-. \}\}\}\}\}
-.
-. \" XXX: this code should be modified to handle nested lists of any type
-. if \n[doc-have-diag-list] \
+. el \{ .ie "\*[doc-str-El]"diag-list" \
. nr doc-have-diag-list 0
-.
-. if !\n[doc-reg-El] \
-. doc-end-list
+. el \{ .ie "\*[doc-str-El]"column-list" \
+. doc-do-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
. \}
@@ -3726,8 +3708,8 @@
. doc-\*[doc-str-It]
. \}
. el \{\
-. .tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
-. .tm1 " don't take arguments (#\n[.c])
+. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
+. tm1 " don't take arguments (#\n[.c])
. doc-\*[doc-str-It]
. \}\}\}
. el \
@@ -3867,6 +3849,8 @@
.\" 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
.
.
@@ -3953,25 +3937,21 @@
.de doc-get-tag-width
. if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
. ie (\n[doc-curr-type] == 1) \{\
-.
-.\" XXX: what is `lN'?
-.
-. ds doc-tag-width-stack\n[lN] \*[doc-curr-arg]
-. nr doc-list-indent-stack\n[lN] \n[\*[doc-curr-arg]]
+. 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[lN] No
-. nr doc-list-indent-stack\n[lN] \n[No]
+. ds doc-tag-width-stack\n[doc-list-depth] No
+. nr doc-list-indent-stack\n[doc-list-depth] \n[No]
. \}
-. if !"\*[doc-tag-width-stack\n[doc-list-depth]]"\*[doc-tag-width-stack\n[lN]]" \
-. nr doc-have-indent 1
+. nr doc-have-tag-width 1
. \}
..
.
.
.\" NS doc-set-vertical-and-indent macro
-.\" NS set up vertical spacing (if not compact) and indent (with offset if
-.\" NS argument is non-zero)
+.\" 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, doc-have-tag-width
@@ -3982,7 +3962,7 @@
. nr doc-have-tag-width 0
. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
. sp \n[doc-display-vertical]u
-. in (\n[.i]u + \n[doc-list-offset-stack\n[doc-list-depth]]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)
. \}
@@ -4049,18 +4029,18 @@
.
.
.\" NS doc-end-list macro
-.\" NS list end function
+.\" NS list end function; resets indentation (and offset if argument is
+.\" NS non-zero)
.\" NS
.\" NS modifies:
.\" NS doc-list-offset-stackXXX, doc-list-depth
.
.de doc-end-list
-' in (\n[.i]u - \n[doc-list-indent-stack\n[doc-list-depth]]u - \n[doc-digit-width]u)
+. if \$1 \
+' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
.
-. if \n[doc-list-offset-stack\n[doc-list-depth]] \{\
-' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
-. nr doc-list-offset-stack\n[doc-list-depth] 0
-. \}
+' 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])
@@ -4193,7 +4173,7 @@
.\" NS doc-list-depth
.
.de doc-do-end-column-list
-' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u - \n[doc-list-indent-stack\n[doc-list-depth]]u)
+' 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
@@ -4237,7 +4217,7 @@
. \}
.
. ta \*[doc-str-dsct]
-' in (\n[.i]u + \n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
+' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
..
.
.
@@ -4255,7 +4235,7 @@
. nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
. if !\n[.u] \{\
. fi
-' in (\n[.i]u + \n[doc-column-indent-width]u)
+' in +\n[doc-column-indent-width]u
. \}
. ti -\n[doc-column-indent-width]u
.
@@ -4310,7 +4290,7 @@
.
.de Dl
' ta T .5i
-. in (\n[.i]u + \n[doc-display-indent]u)
+. in +\n[doc-display-indent]u
.
. ie \n[doc-arg-limit] \
. tm Usage: .Dl not callable by other macros (#\n[.c])
@@ -4324,7 +4304,7 @@
. tm Usage: .Dl argument ... (#\n[.c])
. \}
.
-. in (\n[.i]u - \n[doc-display-indent]u)
+. in -\n[doc-display-indent]u
..
.
.
@@ -4338,7 +4318,7 @@
.
.de D1
' ta T .5i
-. in (\n[.i]u + \n[doc-display-indent]u)
+. in +\n[doc-display-indent]u
.
. ie \n[doc-arg-limit] \
. tm Usage: .D1 not callable by other macros (#\n[.c])
@@ -4353,7 +4333,7 @@
. tm Usage: .D1 argument ... (#\n[.c])
. \}
.
-. in (\n[.i]u - \n[doc-display-indent]u)
+. in -\n[doc-display-indent]u
..
.
.