From d8e29a600bd6d40be3df484074ffbea0bda1b549 Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Sat, 30 Sep 2000 15:19:59 +0000 Subject: [PATCH] internal update --- tmac/doc-common.new | 173 +++++++++++------ tmac/doc-ditroff.new | 143 ++++++-------- tmac/doc-nroff.new | 42 ++--- tmac/doc-syms.new | 112 ++++++----- tmac/tmac.doc.new | 521 +++++++++++++++++++++++++++++---------------------- 5 files changed, 556 insertions(+), 435 deletions(-) diff --git a/tmac/doc-common.new b/tmac/doc-common.new index 5ab1133b..6033f7d2 100755 --- a/tmac/doc-common.new +++ b/tmac/doc-common.new @@ -99,9 +99,11 @@ .nr In 12n\" ? .nr It 8n\" ? .nr Li 16n +.nr Lk 6n\" ? .nr Lp 8n\" ? .nr Me 6n .nr Ms 6n +.nr Mt 6n\" ? .nr Nd 8n\" ? .nr Nm 10n .nr No 12n @@ -135,7 +137,7 @@ .nr St 8n\" ? .nr Sx 16n .nr Sy 6n -.nr Ta 1 +.nr Ta 2 .nr Tn 10n .nr Ud 8n\" ? .nr Ux 10n @@ -151,8 +153,8 @@ . .\" space strings . -.ds doc-soft-space \& \& -.ds doc-hard-space \&\ \& +.ds doc-soft-space " \" +.ds doc-hard-space "\ \" . . .\" punctuation values @@ -201,6 +203,7 @@ . . if !"\$1"" \ . ds doc-document-title \$1 +. . if !"\$2"" \{\ . ds doc-section \$2 . \" .if "\$3"" \{\ @@ -213,30 +216,45 @@ . ds doc-volume System Manager's Manual . \} . -. if "\$2"unass" .ds doc-volume DRAFT -. if "\$2"draft" .ds doc-volume DRAFT -. if "\$2"paper" .ds doc-volume UNTITLED +. if "\$2"unass" \ +. ds doc-volume DRAFT +. if "\$2"draft" \ +. ds doc-volume DRAFT +. if "\$2"paper" \ +. ds doc-volume UNTITLED . \" .\} . \} . . if !"\$3"" \{\ -. if "\$3"USD" .ds doc-volume User's Supplementary Documents -. if "\$3"PS1" .ds doc-volume Programmers's Supplementary Documents -. if "\$3"AMD" .ds doc-volume Ancestral Manual Documents -. if "\$3"SMM" .ds doc-volume System Manager's Manual -. if "\$3"URM" .ds doc-volume Reference Manual -. if "\$3"PRM" .ds doc-volume Programmers's Manual -. if "\$3"IND" .ds doc-volume Manual Master Index +. if "\$3"USD" \ +. ds doc-volume User's Supplementary Documents +. if "\$3"PS1" \ +. ds doc-volume Programmers's Supplementary Documents +. if "\$3"AMD" \ +. ds doc-volume Ancestral Manual Documents +. if "\$3"SMM" \ +. ds doc-volume System Manager's Manual +. if "\$3"URM" \ +. ds doc-volume Reference Manual +. if "\$3"PRM" \ +. ds doc-volume Programmers's Manual +. if "\$3"IND" \ +. ds doc-volume Manual Master Index . \" .if "\$3"CON" .ds doc-volume Contributed Software Manual . \" .if "\$3"IMP" .ds doc-volume Implementation Notes . \" .if "\$3"HOW" .ds doc-volume How Pocket Manual -. if "\$3"LOCAL" .ds doc-volume Local Manual -. -. if "\$3"tahoe" .as doc-volume \ (Tahoe Architecture) -. if "\$3"vax" .as doc-volume \ (VAX Architecture) -. if "\$3"hp300" .as doc-volume \ (HP300 Architecture) -. -. if "\*[doc-volume]"LOCAL" .ds doc-volume \$3 +. if "\$3"LOCAL" \ +. ds doc-volume Local Manual +. +. if "\$3"tahoe" \ +. as doc-volume " (Tahoe Architecture) +. if "\$3"vax" \ +. as doc-volume " (VAX Architecture) +. if "\$3"hp300" \ +. as doc-volume " (HP300 Architecture) +. +. if "\*[doc-volume]"LOCAL" \ +. ds doc-volume \$3 .\} .. . @@ -261,34 +279,53 @@ . if "\$1"ATT" \{\ . ds doc-operating-system AT&T . -. if "\$2"" .as doc-operating-system \0UNIX -. if "\$2"7th" .as doc-operating-system \07th Edition -. if "\$2"7" .as doc-operating-system \07th Edition -. if "\$2"III" .as doc-operating-system \0System III -. if "\$2"3" .as doc-operating-system \0System III -. if "\$2"V" .as doc-operating-system \0System V -. if "\$2"V.2" .as doc-operating-system \0System V Release 2 -. if "\$2"V.3" .as doc-operating-system \0System V Release 3 -. if "\$2"V.4" .as doc-operating-system \0System V Release 4 +. if "\$2"" \ +. as doc-operating-system " UNIX +. if "\$2"7th" \ +. as doc-operating-system " 7th\~Edition +. if "\$2"7" \ +. as doc-operating-system " 7th\~Edition +. if "\$2"III" \ +. as doc-operating-system " System\~III +. if "\$2"3" \ +. as doc-operating-system " System\~III +. if "\$2"V" \ +. as doc-operating-system " System\~V +. if "\$2"V.2" \ +. as doc-operating-system " System\~V Release\~2 +. if "\$2"V.3" \ +. as doc-operating-system " System\~V Release\~3 +. if "\$2"V.4" \ +. as doc-operating-system " System\~V Release\~4 . \} . . if "\$1"BSD" \{\ -. if "\$2"3" .ds doc-operating-system 3rd Berkeley Distribution -. if "\$2"4" .ds doc-operating-system 4th Berkeley Distribution -. if "\$2"4.1" .ds doc-operating-system 4.1 Berkeley Distribution -. if "\$2"4.2" .ds doc-operating-system 4.2 Berkeley Distribution -. if "\$2"4.3" .ds doc-operating-system 4.3 Berkeley Distribution -. if "\$2"4.3T" .ds doc-operating-system 4.3-Tahoe Berkeley Distribution -. if "\$2"4.3R" .ds doc-operating-system 4.3-Reno Berkeley Distribution -. if "\$2"4.3t" .ds doc-operating-system 4.3-Tahoe Berkeley Distribution -. if "\$2"4.3r" .ds doc-operating-system 4.3-Reno Berkeley Distribution -. if "\$2"4.4" .ds doc-operating-system BSD Experimental +. if "\$2"3" \ +. ds doc-operating-system 3rd\~Berkeley Distribution +. if "\$2"4" \ +. ds doc-operating-system 4th\~Berkeley Distribution +. if "\$2"4.1" \ +. ds doc-operating-system 4.1\~Berkeley Distribution +. if "\$2"4.2" \ +. ds doc-operating-system 4.2\~Berkeley Distribution +. if "\$2"4.3" \ +. ds doc-operating-system 4.3\~Berkeley Distribution +. if "\$2"4.3T" \ +. ds doc-operating-system 4.3-Tahoe Berkeley Distribution +. if "\$2"4.3R" \ +. ds doc-operating-system 4.3-Reno Berkeley Distribution +. if "\$2"4.3t" \ +. ds doc-operating-system 4.3-Tahoe Berkeley Distribution +. if "\$2"4.3r" \ +. ds doc-operating-system 4.3-Reno Berkeley Distribution +. if "\$2"4.4" \ +. ds doc-operating-system BSD Experimental . \} . . if "\*[doc-operating-system]"Null" \ -. ds doc-operating-system \0\$1 +. ds doc-operating-system " \$1 . if "\*[doc-str-Os]"Non-Null" \ -. as doc-operating-system \0\$2 +. as doc-operating-system " \$2 .. . . @@ -299,27 +336,39 @@ . .de Dd . \" XXX why do we need gX? -. if !ddoc-date-string \ +. if !d doc-date-string \ . nr gX 1 . . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1 \$2 \$3 . el \{\ -. if "\n[mo]"1" .ds doc-date-string January -. if "\n[mo]"2" .ds doc-date-string February -. if "\n[mo]"3" .ds doc-date-string March -. if "\n[mo]"4" .ds doc-date-string April -. if "\n[mo]"5" .ds doc-date-string May -. if "\n[mo]"6" .ds doc-date-string June -. if "\n[mo]"7" .ds doc-date-string July -. if "\n[mo]"8" .ds doc-date-string August -. if "\n[mo]"9" .ds doc-date-string September -. if "\n[mo]"10" .ds doc-date-string October -. if "\n[mo]"11" .ds doc-date-string November -. if "\n[mo]"12" .ds doc-date-string December -. -. as doc-date-string \&\ \n[dy], \n[year] +. if "\n[mo]"1" \ +. ds doc-date-string January +. if "\n[mo]"2" \ +. ds doc-date-string February +. if "\n[mo]"3" \ +. ds doc-date-string March +. if "\n[mo]"4" \ +. ds doc-date-string April +. if "\n[mo]"5" \ +. ds doc-date-string May +. if "\n[mo]"6" \ +. ds doc-date-string June +. if "\n[mo]"7" \ +. ds doc-date-string July +. if "\n[mo]"8" \ +. ds doc-date-string August +. if "\n[mo]"9" \ +. ds doc-date-string September +. if "\n[mo]"10" \ +. ds doc-date-string October +. if "\n[mo]"11" \ +. ds doc-date-string November +. if "\n[mo]"12" \ +. ds doc-date-string December +. +. as doc-date-string \~\n[dy], \n[year] . \} . \} . el \ @@ -423,7 +472,7 @@ .\" NS width register `.Nd' set above . .de Nd -. nop \&\-\& \$* +. nop \- \$* .. . . @@ -436,25 +485,27 @@ .\" NS doc-reg-Ss . .de Ss -. ie !\n[.$] \ -. tm Usage: .Ss subsection name -. el \{\ +. ie \n[.$] \{\ . sp . if !\n[cR] \ . ne 3 . ti -.25i -. nop \&\*[doc-Sh-font]\$1\c +. +. nop \*[doc-Sh-font]\$1\c . nr doc-reg-Ss 2 . while (\n[doc-reg-Ss] <= \n[.$]) \{\ . nop \& \|\$[\n[doc-reg-Ss]]\c . nr doc-reg-Ss +1 . \} . nop \f[P]\s[0] +. . ta T .5i . if !\n[cR] \ . ne 2 . br . \} +. el \ +. tm Usage: .Ss subsection name (#\n[.c]) .. . . diff --git a/tmac/doc-ditroff.new b/tmac/doc-ditroff.new index dc73f7cc..dd54d0d6 100755 --- a/tmac/doc-ditroff.new +++ b/tmac/doc-ditroff.new @@ -42,41 +42,42 @@ .\" use -rcR=1 to force the creation of a single, very long page .if !rcR .nr cR 0 . -.ds doc-caption-font \f[R]\s[10] -.ds doc-caption-font2 \f[R]\s[10] -.ds doc-Ad-font \f[I]\s[10] -.ds doc-Ar-font \f[CO]\s[10] -.ds doc-Cm-font \f[CB]\s[10] -.ds doc-Em-font \f[I]\s[10] -.ds doc-Er-font \f[C]\s[10] -.ds doc-Ev-font \f[C]\s[10] -.ds doc-Fa-font \f[CO]\s[10] -.ds doc-Fd-font \f[CB]\s[10] -.ds doc-Fl-font \f[CB]\s[10] -.ds doc-Fn-font \f[CB]\s[10] -.ds doc-Ft-font \f[CO]\s[10] -.ds doc-Ic-font \f[CB]\s[10] +.ec +. +.\" the `doc-xx-font' strings must not be empty! +.ds doc-caption-font \f[R]\s[\n[.s]] +.ds doc-caption-font2 \f[R]\s[\n[.s]] +.ds doc-Ad-font \f[I]\s[\n[.s]] +.ds doc-Ar-font \f[CO]\s[\n[.s]] +.ds doc-Cm-font \f[CB]\s[\n[.s]] +.ds doc-Em-font \f[I]\s[\n[.s]] +.ds doc-Er-font \f[C]\s[\n[.s]] +.ds doc-Ev-font \f[C]\s[\n[.s]] +.ds doc-Fa-font \f[CO]\s[\n[.s]] +.ds doc-Fd-font \f[CB]\s[\n[.s]] +.ds doc-Fl-font \f[CB]\s[\n[.s]] +.ds doc-Fn-font \f[CB]\s[\n[.s]] +.ds doc-Ft-font \f[CO]\s[\n[.s]] +.ds doc-Ic-font \f[CB]\s[\n[.s]] .ds doc-Li-font \f[C] -.ds doc-Me-font \f[B]\s[10] -.ds doc-Nm-font \f[CB]\s[10] -.ds doc-No-font \f[R]\s[10] -.ds doc-Pa-font \f[C]\s[10] -.ds doc-Sh-font \f[B]\s[10] -.ds doc-Sy-font \f[B]\s[10] -.ds doc-Sx-font \f[R]\s[10] +.ds doc-Me-font \f[B]\s[\n[.s]] +.ds doc-Nm-font \f[CB]\s[\n[.s]] +.ds doc-No-font \f[R]\s[\n[.s]] +.ds doc-Pa-font \f[C]\s[\n[.s]] +.ds doc-Sh-font \f[B]\s[\n[.s]] +.ds doc-Sy-font \f[B]\s[\n[.s]] +.ds doc-Sx-font \f[B]\s[\n[.s]] .ds doc-Tn-font-shape \f[R] -.ds doc-Tn-font-size \s[9] -.ds doc-Va-font \f[I]\s[10] -.ds doc-Xr-font \f[C]\s[10] +.ds doc-Tn-font-size \s[(\n[.s] - 1)] +.ds doc-Va-font \f[I]\s[\n[.s]] +.ds doc-Xr-font \f[C]\s[\n[.s]] . -.ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[10] -.ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[10] -.ds lp \f[R](\f[P]\s[10] -.ds rp \f[R])\f[P]\s[10] -.ds doc-left-bracket \f[R]\^[\^\f[P]\s[10] -.ds doc-right-bracket \f[R]\^]\f[P]\s[10] -. -.ec +.ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[\n[.s]] +.ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[\n[.s]] +.ds lp \f[R](\f[P]\s[\n[.s]] +.ds rp \f[R])\f[P]\s[\n[.s]] +.ds doc-left-bracket \f[R]\^[\^\f[P]\s[\n[.s]] +.ds doc-right-bracket \f[R]\^]\f[P]\s[\n[.s]] . .tr *\[**] . @@ -117,7 +118,7 @@ .\" q is `official' .ds q \&" . -.\" Math stuff -- all macro names are `official' +.\" math stuff -- all macro names are `official' .ds Pi \[*p] .ds Ne \[!=] .ds Le \[<=] @@ -133,7 +134,7 @@ . . .de doc-setup-header -. ds doc-header-string \*[doc-document-title] +. ds doc-header-string "\*[doc-document-title] . if !"\*[doc-section]"Null" \ . as doc-header-string \|(\|\*[doc-section]\|) . @@ -141,12 +142,10 @@ . wh -1.25i doc-footer . . nr nL \n[nl] -. ie \n[gX] \{\ +. if \n[gX] \ . ds doc-command-name -. bp -. \} -. el \ -' bp +. +. br . . \" Don't set the page number if this is the first page, . \" in case the user has used -n. @@ -155,7 +154,7 @@ . nr % 1 . . nr gX 0 -. em doc-end-macro +. e@ doc-end-macro .. . . @@ -174,7 +173,7 @@ . el \ . nr doc-width (\n[doc-width] / \n[doc-fixed-width]) . \} -. el \{ +. el \{\ . ie \n[doc-width] \ . nr doc-width 1 . el \ @@ -198,7 +197,7 @@ . el \ . nr doc-width (\n[doc-width] / \n[doc-fixed-width]) . \} -. el \{ +. el \{\ . ie \n[doc-width] \ . nr doc-width 1 . el \ @@ -216,6 +215,8 @@ .\" NS doc-reg-Ql . .de Ql +.tm doc-arg-ptr==\n[doc-arg-ptr] +.tm doc-args-processed==\n[doc-args-processed] . if !\n[doc-args-processed] \{\ . ds doc-macro-name Ql . @@ -229,45 +230,15 @@ . doc-parse-arg-vector . \} . -. nr doc-arg-ptr +1 -. doc-get-arg-width \n[doc-arg-ptr] -. nr doc-arg-ptr -1 +. nr doc-reg-Ql (\n[doc-arg-ptr] + 1) +. doc-get-arg-width \n[doc-reg-Ql] . . ie (\n[doc-width] > 2) \ . Li . el \{\ -. \" Db on -. if \n[doc-arg-ptr] \{\ -. ds doc-arg\n[doc-arg-ptr] Li -. nr doc-arg-ptr -1 -. \} -. -. if !\n[doc-arg-ptr] \{\ -. rm doc-type0 doc-type1 doc-type2 doc-type3 doc-type4 -. rm doc-type5 doc-type6 doc-type7 doc-type8 doc-type9 -. rm doc-space1 doc-space2 doc-space3 doc-space4 doc-space5 -. rm doc-space6 doc-space7 doc-space8 doc-space9 -. -. rn doc-arg8 doc-arg9 -. rn doc-arg7 doc-arg8 -. rn doc-arg6 doc-arg7 -. rn doc-arg5 doc-arg6 -. rn doc-arg4 doc-arg5 -. rn doc-arg3 doc-arg4 -. rn doc-arg2 doc-arg3 -. rn doc-arg1 doc-arg2 -. -. ds doc-arg1 Li -. nr doc-num-args (\n[doc-args-processed] + 1) -. nr doc-args-processed 0 -. doc-parse-arg-vector -. \} -. -. ds doc-quote-left \&\*[doc-left-singlequote] -. ds doc-quote-right \&\*[doc-right-singlequote] -. +. ds doc-quote-left "\*[doc-left-singlequote] +. ds doc-quote-right "\*[doc-right-singlequote] . doc-enclose-string -. \" Db off . \} .. . @@ -301,7 +272,6 @@ . na . nr doc-in-synopsis-section 1 . \} -. . if "\$1"DESCRIPTION" \{\ . nr doc-is-func-type 0 . nr doc-function-count 0 @@ -309,15 +279,16 @@ . nr doc-num-function-args 0 . ds doc-function-arg . \} -. . if "\$1"SEE" \{\ . nr doc-in-see-also-section 1 . na . \} -. -. if "\$1"FILES" .nr doc-in-files-section 1 -. if "\$1"STANDARDS" .nr doc-in-standards-section 1 -. if "\$1"AUTHORS" .nr doc-in-authors-section 1 +. if "\$1"FILES" \ +. nr doc-in-files-section 1 +. if "\$1"STANDARDS" \ +. nr doc-in-standards-section 1 +. if "\$1"AUTHORS" \ +. nr doc-in-authors-section 1 . . in 0 . nr doc-have-author 0 @@ -331,10 +302,8 @@ . ne 3 ' fi . -. ie !\n[.$] \ -. tm Usage: .Sh section name -. el \{\ -. nop \&\*[doc-Sh-font]\$1\c +. ie !\n[.$] \{\ +. nop \*[doc-Sh-font]\$1\c . nr doc-reg-Sh 2 . while (\n[doc-reg-Sh] <= \n[.$]) \{\ . nop \& \|\$[\n[doc-reg-Sh]]\c @@ -342,6 +311,8 @@ . \} . nop \f[P]\s[0] . \} +. el \ +. tm Usage: .Sh section name (#\n[.c]) . . in (\n[.i]u + \n[doc-subheader-indent]u) . ns diff --git a/tmac/doc-nroff.new b/tmac/doc-nroff.new index 2677110e..70d4812e 100755 --- a/tmac/doc-nroff.new +++ b/tmac/doc-nroff.new @@ -38,6 +38,7 @@ .\" use -rcR=0 to have multiple pages instead of a single, very long page .if !rcR .nr cR 1 . +.\" the `doc-xx-font' strings must not be empty! .ds doc-caption-font \f[R] .ds doc-caption-font2 \f[R] .ds doc-Ad-font \f[I] @@ -72,14 +73,15 @@ .ds doc-left-bracket \f[R]\|[\|\f[P] .ds doc-right-bracket \f[R]\|]\f[P] . -.\" MISCELLANEOUS +.\" miscellaneous .ds doc-punct-chars {\ .\ ,\ ;\ :\ (\ )\ [\ ]} .nr doc-subheader-indent .5i .nr doc-paragraph-space 1v . -.ds doc-digit-string \0\0 .ec +.ds doc-digit-string \0\0 .nr doc-digit-width \w'\0\0'u +.nr doc-fixed-width \w'0' .eo . . @@ -114,7 +116,7 @@ .\" q is `official' .ds q \&" . -.\" Math stuff -- all macro names are `official' +.\" math stuff -- all macro names are `official' .ds Pi pi .ds Ne != .ds Le <= @@ -126,9 +128,10 @@ .ds Na \f[I]NaN\f[P] .ds Ba \f[R]|\f[P] . +. .de doc-setup-header . nr % 1 -. ds doc-header-string \*[doc-document-title] +. ds doc-header-string "\*[doc-document-title] . if !"\*[doc-section]"Null" \ . as doc-header-string \|(\|\*[doc-section]\|) . @@ -146,11 +149,6 @@ .. . . -.ec -.nr doc-fixed-width \w'0' -.eo -. -. .\" NS doc-get-width macro .\" NS computes the width of a string as a multiple of `doc-fixed-width': .\" NS `.doc-get-width string' @@ -213,8 +211,8 @@ . doc-parse-arg-vector . \} . -. ds doc-quote-left \&\*[doc-left-singlequote] -. ds doc-quote-right \&\*[doc-right-singlequote] +. ds doc-quote-left "\*[doc-left-singlequote] +. ds doc-quote-right "\*[doc-right-singlequote] . . doc-enclose-string \$@ .. @@ -243,11 +241,14 @@ . nr doc-in-standards-section 0 . nr doc-in-authors-section 0 . -. if "\$1"SEE" .nr doc-in-see-also-section 1 -. if "\$1"FILES" .nr doc-in-files-section 1 -. if "\$1"STANDARDS" .nr doc-in-standards-section 1 -. if "\$1"SYNOPSIS" .nr doc-in-synopsis-section 1 -. +. if "\$1"SEE" \ +. nr doc-in-see-also-section 1 +. if "\$1"FILES" \ +. nr doc-in-files-section 1 +. if "\$1"STANDARDS" \ +. nr doc-in-standards-section 1 +. if "\$1"SYNOPSIS" \ +. nr doc-in-synopsis-section 1 . if "\$1"DESCRIPTION" \{\ . nr doc-is-func-type 0 . nr doc-function-count 0 @@ -255,7 +256,6 @@ . nr doc-num-function-args 0 . ds doc-function-arg . \} -. . if "\$1"AUTHORS" \ . nr doc-in-authors-section 1 . @@ -270,10 +270,8 @@ . ne 3 ' fi . -. ie !\n[.$] \ -. tm Usage: .Sh section name -. el \{\ -. nop \&\*[doc-Sh-font]\$1\c +. ie \n[.$] \{\ +. nop \*[doc-Sh-font]\$1\c . nr doc-reg-Sh 2 . while (\n[doc-reg-Sh] <= \n[.$]) \{\ . nop \& \|\$[\n[doc-reg-Sh]]\c @@ -281,6 +279,8 @@ . \} . nop \f[P]\s[0] . \} +. el \ +. tm Usage: .Sh section name (#\n[.c]) . . in (\n[.i]u + \n[doc-subheader-indent]u) . ns diff --git a/tmac/doc-syms.new b/tmac/doc-syms.new index 81c36452..1a25c59d 100755 --- a/tmac/doc-syms.new +++ b/tmac/doc-syms.new @@ -44,8 +44,8 @@ .de Ux . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] -. 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] +. 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[.$] \ @@ -74,11 +74,11 @@ .de Bx . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] -. ds doc-str-Bx \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. ds doc-str-Bx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . . if !\n[doc-args-processed] \{\ . ie !\n[.$] \{\ -. nop \&\*[doc-Tn-font-size]BSD\*[doc-str-Bx] +. nop \*[doc-Tn-font-size]BSD\*[doc-str-Bx] . nop \*[doc-Tn-font-size]UNIX\*[doc-str-Bx] . \} . el \ @@ -103,7 +103,7 @@ . if (\n[doc-args-processed] > \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 \&\*[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]) \{\ . nr doc-reg-Bx (\n[doc-arg-ptr] + 1) @@ -142,7 +142,7 @@ . doc-print-and-reset . \} . el \{\ -. as doc-out-string \&\*[doc-Tn-font-size]BSD\*[doc-str-Bx] +. as doc-out-string \*[doc-Tn-font-size]BSD\*[doc-str-Bx] . as doc-out-string " U\*[doc-Tn-font-size]NIX\*[doc-str-Bx] . doc-print-recursive . \} @@ -171,24 +171,48 @@ .de At . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] -. ds doc-str-At \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. ds doc-str-At \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . . if (\n[.$] == 2) \{\ -. if "\$1"32v" \&Version 32V \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 -. if "\$1"v6" \&Version 6 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 -. if "\$1"v7" \&Version 7 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 -. if "\$1"V" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 -. if "\$1"V.1" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V.1 \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 -. if "\$1"V.4" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V.4 \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 +. if "\$1"32v" \ +. nop \&Version\~32V \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 +. if "\$1"v6" \ +. nop \&Version\~6 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 +. if "\$1"v7" \ +. nop \&Version\~7 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At]\$2 +. if "\$1"V" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 +. \} +. if "\$1"V.1" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.1 +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 +. \} +. if "\$1"V.4" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.4 +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At]\$2 +. \} . \} . . if (\n[.$] == 1) \{\ -. if "\$1"32v" \&Version 32V \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] -. if "\$1"v6" \&Version 6 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] -. if "\$1"v7" \&Version 7 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] -. if "\$1"V" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V \*[doc-Tn-font-size]UNIX\*[doc-str-At] -. if "\$1"V.1" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V.1 \*[doc-Tn-font-size]UNIX\*[doc-str-At] -. if "\$1"V.4" \&\*[doc-Tn-font-size]AT&T\*[doc-str-At] System V.4 \*[doc-Tn-font-size]UNIX\*[doc-str-At] +. if "\$1"32v" \ +. nop \&Version\~32V \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] +. if "\$1"v6" \ +. nop \&Version\~6 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] +. if "\$1"v7" \ +. nop \&Version\~7 \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] +. if "\$1"V" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At] +. \} +. if "\$1"V.1" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.1 +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At] +. \} +. if "\$1"V.4" \{\ +. nop \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V.4 +. nop \*[doc-Tn-font-size]UNIX\*[doc-str-At] +. \} . \} .. . @@ -217,11 +241,7 @@ . .de St . if !\n[doc-args-processed] \{\ -. ie !\n[.$] \{\ -. tmc "Usage: .St [-p1003.1-88 | -p1003.2 | -ansiC-89 | -iso ] -. tm1 " \*[doc-punct-chars] ... (#\n[.c]) -. \} -. el \{\ +. ie \n[.$] \{\ . ds doc-macro-name St . . nr doc-reg-St 1 @@ -233,44 +253,44 @@ . nr doc-num-args \n[.$] . doc-parse-arg-vector . \} +. el \{\ +. tmc "Usage: .St [-p1003.1-88 | -p1003.2 | -ansiC-89 | -iso] +. tm1 " \*[doc-punct-chars] ... (#\n[.c]) +. \} . \} . . if (\n[doc-args-processed] > \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]] +. ds doc-str-St \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . nr doc-arg-ptr +1 . . if "\*[doc-arg\n[doc-arg-ptr]]"-p1003.1-88" \{\ -. ds doc-out-string \&\*[doc-Tn-font-size]IEEE Std -. as doc-out-string \*[doc-str-St]1003.1-1988\*[doc-space] -. as doc-out-string (``\*[doc-Tn-font-size]\*[Px]\*[doc-str-St]'') +. ds doc-out-string \*[doc-Tn-font-size]IEEE Std +. as doc-out-string " \*[doc-str-St]1003.1-1988 +. as doc-out-string " (``\*[doc-Tn-font-size]\*[Px]\*[doc-str-St]'') . \} -. . if "\*[doc-arg\n[doc-arg-ptr]]"-p1003.2" \{\ -. ds doc-out-string \&\*[doc-Tn-font-size]IEEE Std -. as doc-out-string \*[doc-str-St]1003.2\*[doc-space] -. as doc-out-string (``\*[doc-Tn-font-size]\*[Px]\*[doc-str-St]'') +. ds doc-out-string \*[doc-Tn-font-size]IEEE Std +. as doc-out-string " \*[doc-str-St]1003.2 +. as doc-out-string " (``\*[doc-Tn-font-size]\*[Px]\*[doc-str-St]'') . \} -. . if "\*[doc-arg\n[doc-arg-ptr]]"-ansiC" \{\ -. ds doc-out-string \&\*[doc-Tn-font-size]ANSI C -. as doc-out-string \*[doc-str-St]3.159-1989\*[doc-space] -. as doc-out-string (``\*[doc-Tn-font-size]ANSI C\*[doc-str-St]'') +. ds doc-out-string \*[doc-Tn-font-size]ANSI\~C +. as doc-out-string " \*[doc-str-St]3.159-1989 +. as doc-out-string " (``\*[doc-Tn-font-size]ANSI\~C\*[doc-str-St]'') . \} -. . if "\*[doc-arg\n[doc-arg-ptr]]"-ansiC-89" \{\ -. ds doc-out-string \&\*[doc-Tn-font-size]ANSI C -. as doc-out-string \*[doc-str-St]3.159-1989\*[doc-space] -. as doc-out-string (``\*[doc-Tn-font-size]ANSI C\*[doc-str-St]'') +. ds doc-out-string \*[doc-Tn-font-size]ANSI\~C +. as doc-out-string " \*[doc-str-St]3.159-1989 +. as doc-out-string " (``\*[doc-Tn-font-size]ANSI\~C\*[doc-str-St]'') . \} -. . if "\*[doc-arg\n[doc-arg-ptr]]"-iso8802-3" \{\ -. ds doc-out-string \&\*[doc-Tn-font-size] -. as doc-out-string ISO \*[doc-str-St]8802-3: 1989 -. \" .ds doc-out-string \&\*[doc-Tn-font-size] -. \" .as doc-out-string ISO \*[doc-str-St]8802-3: 1989\*[doc-space] -. \" .as doc-out-string (``\*[doc-Tn-font-size]ANSI C\*[doc-str-St]'') +. ds doc-out-string \*[doc-Tn-font-size] +. as doc-out-string ISO\~\*[doc-str-St]8802-3:\~1989 +. \" .ds doc-out-string \*[doc-Tn-font-size] +. \" .as doc-out-string ISO\~\*[doc-str-St]8802-3:\~1989 +. \" .as doc-out-string " (``\*[doc-Tn-font-size]ANSI\~C\*[doc-str-St]'') . \} . . ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \{\ diff --git a/tmac/tmac.doc.new b/tmac/tmac.doc.new index 3973512b..56ca1d02 100755 --- a/tmac/tmac.doc.new +++ b/tmac/tmac.doc.new @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)doc 5.8 (Berkeley) 8/5/91 +.\" .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename .\" `tmac.doc-common' would be too long); when using groff, the doc-* files @@ -57,19 +58,19 @@ . . .\" NS doc-inline-debug register (bool) -.\" NS DEBUG MODE (inline if 1, to stderr if 0 (default)) +.\" NS inline debug mode (inline if 1, to stderr if 0 (default)) . .nr doc-inline-debug 0 . . -.\" NS doc-debug register (bool) -.\" NS DEBUG MODE (1 if active, 0 otherwise (default)) +.\" NS doc-debug register (bool) +.\" NS debug mode (1 if active, 0 otherwise (default)) . .nr doc-debug 0 . . .\" NS Db macro -.\" NS start/stop DEBUG MODE (`.Db'/`.Db on'/`.Db off') +.\" NS start/stop debug mode (`.Db'/`.Db on'/`.Db off') .\" NS .\" NS without argument, toggle debug status .\" NS @@ -78,31 +79,31 @@ .\" NS doc-debug . .de Db -. ie !\n[.$] \{\ -. ie !\n[doc-debug] \{\ +. ie \n[.$] \{\ +. if "\$1"on" \{\ . tm DEBUGGING ON . nr doc-debug 1 . \} -. el \{\ +. if "\$1"off" \{\ . tm DEBUGGING OFF . nr doc-debug 0 . \} . \} . el \{\ -. if "\$1"on" \{\ -. tm DEBUGGING ON -. nr doc-debug 1 -. \} -. if "\$1"off" \{\ +. ie \n[doc-debug] \{\ . tm DEBUGGING OFF . nr doc-debug 0 . \} +. el \{\ +. tm DEBUGGING ON +. nr doc-debug 1 +. \} . \} .. . . .\" NS doc-macro-name string -.\" NS name of calling request (set in each user requestable macro) +.\" NS name of calling request (set in each user-requestable macro) . .ds doc-macro-name . @@ -114,14 +115,14 @@ . . .\" NS doc-num-args register -.\" NS number of arguments (must set to \n[.$] prior to +.\" NS number of arguments (must be set to \n[.$] prior to .\" NS doc-parse-arg-vector request) . .nr doc-num-args 0 . . .\" NS doc-arg-ptr register -.\" NS argument pointer (used by doc-parse-args) +.\" NS argument pointer . .nr doc-arg-ptr 0 . @@ -140,7 +141,7 @@ . . .\" NS doc-parse-args macro -.\" NS parse arguments (recursive) (`.doc-parse-args arg ...') +.\" NS parse arguments (recursively) (`.doc-parse-args arg ...') .\" NS .\" NS modifies: .\" NS @@ -152,6 +153,7 @@ .de doc-parse-args . nr doc-args-processed +1 . +. \" handle `|' specially for some requests . ie "\$1"|" \{\ . if "\*[doc-macro-name]"Op" \ . ds doc-arg\n[doc-args-processed] \f[R]|\f[P] @@ -164,8 +166,10 @@ . if "\*[doc-macro-name]"It" \ . ds doc-arg\n[doc-args-processed] \f[R]|\f[P] . \} -. el .ds doc-arg\n[doc-args-processed] "\$1 +. el \ +. ds doc-arg\n[doc-args-processed] "\$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-set-spacing-for-\*[doc-arg-type] @@ -208,22 +212,22 @@ . \} . \} . +. \" check whether we have processed the last parameter . ie (\n[.$] == 1) \{\ . nr doc-arg-ptr 0 -. ie (\n[doc-diversion-level] == 1) \{\ +. +. ie \n[doc-in-diversion] \{\ . if (\n[doc-nesting-level] > 1) \ -. as doc-out-string \*[doc-curr-space] +. as doc-out-string "\*[doc-curr-space] . \} . el \{\ . if \n[doc-nesting-level] \ . if !\n[doc-func-arg-count] \ -. as doc-out-string \*[doc-curr-space] +. as doc-out-string "\*[doc-curr-space] . \} . -. ie ddoc-space\n[doc-args-processed] \ -. ds doc-curr-space \*[doc-space\n[doc-args-processed]] -. el \ -. ds doc-curr-space +. \" use space after last parameter as the current one +. ds doc-curr-space "\*[doc-space\n[doc-args-processed]] . . if \n[doc-debug] \{\ . nr doc-reg-dpa1 1 @@ -231,7 +235,7 @@ . ie \n[doc-inline-debug] \{\ . nop MACRO REQUEST: \t.\*[doc-macro-name] . while (\n[doc-reg-dpa1] <= \n[doc-args-processed]) \{\ -. nop \*[doc-arg\n[doc-reg-dpa1]] +. nop "\*[doc-arg\n[doc-reg-dpa1]]" . nr doc-reg-dpa1 +1 . \} . br @@ -240,7 +244,7 @@ . el \{\ . tmc " MACRO REQUEST: .\*[doc-macro-name] . while (\n[doc-reg-dpa1] <= \n[doc-args-processed]) \{\ -. tmc " \*[doc-arg\n[doc-reg-dpa1]] +. tmc " "\*[doc-arg\n[doc-reg-dpa1]]" . nr doc-reg-dpa1 +1 . \} . tm @@ -255,7 +259,7 @@ . . .\" NS doc-parse-arg-vector macro -.\" NS parse argument vector (recursive): set up doc-typeX, doc-spaceX +.\" NS parse argument vector (recursive) .\" NS .\" NS modifies: .\" NS @@ -267,6 +271,7 @@ .de doc-parse-arg-vector . nr doc-args-processed +1 . +. \" handle `|' specially for some requests . if "\*[doc-arg\n[doc-args-processed]]"|" \{\ . if "\*[doc-macro-name]"Op" \ . ds doc-arg\n[doc-args-processed] \f[R]|\f[P] @@ -280,6 +285,7 @@ . ds doc-arg\n[doc-args-processed] \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-set-spacing-for-\*[doc-arg-type] @@ -323,22 +329,22 @@ . \} . \} . +. \" check whether we have processed the last parameter . ie (\n[doc-num-args] == 1) \{\ . nr doc-arg-ptr 0 -. ie (\n[doc-diversion-level] == 1) \{\ +. +. ie \n[doc-in-diversion] \{\ . if (\n[doc-nesting-level] > 1) \ -. as doc-out-string \*[doc-curr-space] +. as doc-out-string "\*[doc-curr-space] . \} . el \{\ . if \n[doc-nesting-level] \ . if !\n[doc-func-arg-count] \ -. as doc-out-string \*[doc-curr-space] +. as doc-out-string "\*[doc-curr-space] . \} . -. ie ddoc-space\n[doc-args-processed] \ -. ds doc-curr-space \*[doc-space\n[doc-args-processed]] -. el \ -. ds doc-curr-space +. \" use space after last parameter as the current one +. ds doc-curr-space "\*[doc-space\n[doc-args-processed]] . . nr doc-num-args 0 . @@ -348,7 +354,7 @@ . ie \n[doc-inline-debug] \{\ . nop \tMACRO REQUEST: .\*[doc-macro-name] . while (\n[doc-reg-dpav1] <= \n[doc-args-processed]) \{\ -. nop \*[doc-arg\n[doc-reg-dpav1]] +. nop "\*[doc-arg\n[doc-reg-dpav1]]" . nr doc-reg-dpav1 +1 . \} . br @@ -357,7 +363,7 @@ . el \{\ . tmc " MACRO REQUEST: .\*[doc-macro-name] . while (\n[doc-reg-dpav1] <= \n[doc-args-processed]) \{\ -. tmc " \*[doc-arg\n[doc-reg-dpav1]] +. tmc " "\*[doc-arg\n[doc-reg-dpav1]]" . nr doc-reg-dpav1 +1 . \} . tm @@ -372,8 +378,8 @@ . . .\" NS doc-remaining-args macro -.\" NS output remaining arguments as-is (until `doc-num-args' is zero) to -.\" NS `doc-out-string' (used by -diag list type) +.\" NS output remaining arguments as-is, separated by spaces (until +.\" NS `doc-num-args' is exhausted), to `doc-out-string' . .de doc-remaining-args . nr doc-arg-ptr +1 @@ -384,7 +390,7 @@ . nr doc-num-args 0 . \} . el \{\ -. as doc-out-string \*[doc-space] +. as doc-out-string "\*[doc-space] . nr doc-num-args -1 . doc-remaining-args . \} @@ -393,7 +399,7 @@ . .\" NS doc-append-arg macro .\" NS append one argument to argument vector: -.\" NS `.doc-append-arg [arg] [type]' (used by `.doc-enclose-string') +.\" NS `.doc-append-arg [arg] [type]' . .de doc-append-arg . nr doc-args-processed +1 @@ -422,11 +428,11 @@ . . .\" NS doc-print-out-string macro -.\" NS test for end of vector (i.e. end of line) and print -.\" NS `doc-out-string' or divert +.\" NS print `doc-out-string', possibly ending a diversion, enabling +.\" NS hyphenation afterwards . .de doc-print-out-string -. ie (\n[doc-diversion-level] == 1) \{\ +. ie \n[doc-in-diversion] \{\ . if (\n[doc-nesting-level] == 1) \{\ . nop \&\*[doc-out-string] . ds doc-curr-space @@ -436,16 +442,16 @@ . doc-end-diversion-and-print . \} . el \{\ -. ie !\n[doc-nesting-level] \{\ -. nop \&\*[doc-out-string] -. ds doc-curr-space -. ds doc-out-string -. \} -. el \{\ +. ie \n[doc-nesting-level] \{\ . if \n[doc-space-mode] \ . if !\n[doc-list-immediate] \ . doc-save-and-divert . \} +. el \{\ +. nop \&\*[doc-out-string] +. ds doc-curr-space +. ds doc-out-string +. \} . \} . . hy @@ -460,18 +466,18 @@ .\" NS saved doc-out-string . . -.\" NS doc-diversion-level register -.\" NS diversion count +.\" NS doc-in-diversion register (bool) +.\" NS whether we are in a diversion . -.nr doc-diversion-level 0 +.nr doc-in-diversion 0 . . .\" NS doc-save-and-divert macro -.\" NS save doc-out-string and divert +.\" NS save doc-out-string, restore fill mode, and divert . .de doc-save-and-divert -. nr doc-diversion-level +1 -. ds doc-saved-out-string \&\*[doc-out-string] +. nr doc-in-diversion 1 +. ds doc-saved-out-string "\*[doc-out-string] . ds doc-out-string . ev doc-divert-environment . fi @@ -487,17 +493,18 @@ . di . ev . +. \" insert diversion only if it contains printable stuff . ie \n[dn] \{\ . ds doc-str-dedap \&\*[doc-diversion]\c -. ds doc-out-string \*[doc-saved-out-string]\*[doc-str-dedap]\*[doc-out-string] +. ds doc-out-string "\*[doc-saved-out-string]\*[doc-str-dedap]\*[doc-out-string] . \} . el \ -. ds doc-out-string \*[doc-saved-out-string]\*[doc-out-string] +. ds doc-out-string "\*[doc-saved-out-string]\*[doc-out-string] . . nop \&\*[doc-out-string] . . ds doc-out-string -. nr doc-diversion-level -1 +. nr doc-in-diversion 0 .. . . @@ -513,27 +520,32 @@ . . .\" NS Fl user macro -.\" NS handle flags (appends - and prints flags): `.Fl arg ...' +.\" NS handle flags (appends `-' and prints flags): `.Fl arg ...' .\" NS .\" NS width register `.Fl' set in doc-common +.\" NS +.\" NS local variable: +.\" NS doc-reg-Fl (for communication with doc-flag-recursion) . .de Fl -. as doc-out-string \&\*[doc-Fl-font] +. as doc-out-string \*[doc-Fl-font] . . if !\n[doc-args-processed] \{\ -. ie !\n[.$] \{\ -. as doc-out-string \|\-\|\f[P]\s[0] -. doc-print-out-string -. \} -. el \{\ +. ie \n[.$] \{\ . ds doc-macro-name Fl . doc-parse-args \$@ . \} +. el \{\ +. \" no arguments +. as doc-out-string \|\-\|\f[P]\s[0] +. doc-print-out-string +. \} . \} . . if \n[doc-args-processed] \{\ . nr doc-arg-ptr +1 . ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\ +. \" last argument . as doc-out-string \|\-\f[P]\s[0] . doc-print-and-reset . \} @@ -548,6 +560,8 @@ . . if "\*[doc-type\n[doc-arg-ptr]]"punct-suffix" \ . as doc-out-string \|\-\| +. +. nr doc-reg-Fl 1 . doc-flag-recursion . \} . \} @@ -559,42 +573,55 @@ .\" NS `Fl' flag recursion routine (special handling) .\" NS .\" NS local variables: -.\" NS doc-str-dfr, doc-reg-dfr +.\" NS doc-str-dfr, doc-str-dfr1, doc-reg-dfr . .de doc-flag-recursion . ds doc-str-dfr \*[doc-type\n[doc-arg-ptr]] +. ds doc-str-dfr1 "\*[doc-arg\n[doc-arg-ptr]] . . hy 0 . . ie "\*[doc-str-dfr]"macro" \{\ -. as doc-out-string \&\f[P]\s[0] -. \*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string \f[P]\s[0] +. \*[doc-str-dfr1] . \} . el \{\ . nr doc-reg-dfr \n[doc-arg-ptr] +. . ie "\*[doc-str-dfr]"string" \{\ -. ie !"\*[doc-arg\n[doc-arg-ptr]]"\*[Ba]" \{\ -. ie !"\*[doc-arg\n[doc-arg-ptr]]"\f[R]|\f[P]" \{\ -. ie "\*[doc-arg\n[doc-arg-ptr]]"-" \ +. \" handle vertical bar -- doc-reg-Fl is set for the first call of +. \" doc-flag-recursion only; we need this to handle `.Fl | ...' +. \" correctly +. ie "\*[doc-str-dfr1]"\*[Ba]" \{\ +. if \n[doc-reg-Fl] \ +. as doc-out-string \|\-\*[doc-space] +. as doc-out-string \&\*[Ba] +. \} +. el \{\ +. ie "\*[doc-str-dfr1]"\f[R]|\f[P]" \{\ +. if \n[doc-reg-Fl] \ +. as doc-out-string \|\-\*[doc-space] +. as doc-out-string \f[R]|\f[P] +. \} +. el \{\ +. \" two consecutive hyphen characters? +. ie "\*[doc-str-dfr1]"-" \ . as doc-out-string \|\-\^\-\| . el \ -. as doc-out-string \|\-\*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string \|\-\*[doc-str-dfr1] . \} -. el \ -. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . \} -. el \ -. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . \} . el \{\ -. as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] +. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. as doc-out-string "\*[doc-str-dfr1]\f[P]\s[0] . \} . . ie (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\ +. \" last argument . if "\*[doc-str-dfr]"punct-prefix" \ . as doc-out-string \|\- -. as doc-out-string \&\f[P]\s[0] +. as doc-out-string \f[P]\s[0] . doc-print-and-reset . \} . el \{\ @@ -603,12 +630,13 @@ . ie "\*[doc-type\n[doc-reg-dfr]]"punct-prefix" \ . as doc-out-string \|\- . el \ -. as doc-out-string \*[doc-space\n[doc-reg-dfr]] +. as doc-out-string "\*[doc-space\n[doc-reg-dfr]] . \} . el \ -. as doc-out-string \*[doc-space\n[doc-reg-dfr]] +. as doc-out-string "\*[doc-space\n[doc-reg-dfr]] . . shift +. nr doc-reg-Fl 0 . doc-flag-recursion \$@ . \} . \} @@ -627,7 +655,7 @@ . hy 0 . . ie "\*[doc-str-dpr]"macro" \{\ -. as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . \*[doc-arg\n[doc-arg-ptr]] . \} . el \{\ @@ -636,17 +664,18 @@ . ie "\*[doc-str-dpr]"string" \ . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . el \{\ -. as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. \" punctuation character +. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] . \} . . nr doc-arg-ptr +1 . ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . doc-print-and-reset . \} . el \{\ -. as doc-out-string \*[doc-space\n[doc-reg-dpr]] +. as doc-out-string "\*[doc-space\n[doc-reg-dpr]] . doc-print-recursive . \} . \} @@ -659,17 +688,17 @@ .\" NS width register `.Ar' set in doc-common . .de Ar -. as doc-out-string \&\*[doc-Ar-font] +. as doc-out-string \*[doc-Ar-font] . . if !\n[doc-args-processed] \{\ -. ie !\n[.$] \{\ -. as doc-out-string \&file\ ...\f[P]\s[0] -. doc-print-out-string -. \} -. el \{\ +. ie \n[.$] \{\ . ds doc-macro-name Ar . doc-parse-args \$@ . \} +. el \{\ +. as doc-out-string \&file\ ...\f[P]\s[0] +. doc-print-out-string +. \} . \} . . if \n[doc-args-processed] \{\ @@ -712,7 +741,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Ad-font] +. as doc-out-string \*[doc-Ad-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -752,7 +781,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Nm-font] +. as doc-out-string \*[doc-Nm-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . @@ -809,7 +838,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Cm-font] +. as doc-out-string \*[doc-Cm-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -834,7 +863,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Er-font] +. as doc-out-string \*[doc-Er-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -870,7 +899,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Em-font] +. as doc-out-string \*[doc-Em-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -895,7 +924,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Er-font] +. as doc-out-string \*[doc-Er-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -920,7 +949,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Ev-font] +. as doc-out-string \*[doc-Ev-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -969,7 +998,7 @@ . .de Fd . doc-do-function-declaration Fd -. nop \&\*[doc-Fd-font]\$* +. nop \*[doc-Fd-font]\$* . br . ft \n[doc-curr-font] . fs \n[doc-curr-size] @@ -983,7 +1012,7 @@ . .de In . doc-do-function-declaration In -. nop \&\*[doc-Fd-font]#include <\$1> +. nop \*[doc-Fd-font]#include <\$1> . br . ft \n[doc-curr-font] . fs \n[doc-curr-size] @@ -1007,7 +1036,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Ar-font] +. as doc-out-string \*[doc-Ar-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1032,7 +1061,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Ic-font] +. as doc-out-string \*[doc-Ic-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1068,7 +1097,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Li-font] +. as doc-out-string \*[doc-Li-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1093,7 +1122,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Ic-font] +. as doc-out-string \*[doc-Ic-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1118,7 +1147,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Sy-font] +. as doc-out-string \*[doc-Sy-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1146,7 +1175,7 @@ . ie "\*[doc-command-name]"" \ . tm Usage: .Nm Name(s) ... \*[doc-punct-chars] (#\n[.c]) . el \ -. nop \&\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0] +. nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0] . \} . el \{\ . ds doc-macro-name Nm @@ -1169,11 +1198,11 @@ . if \n[doc-args-processed] \{\ . nr doc-arg-ptr +1 . ie (\n[doc-args-processed] < \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0] +. as doc-out-string \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0] . doc-print-and-reset . \} . el \{\ -. as doc-out-string \&\*[doc-Nm-font] +. as doc-out-string \*[doc-Nm-font] . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \{\ . as doc-out-string \&\*[doc-command-name]\f[P]\s[0] . \*[doc-arg\n[doc-arg-ptr]] @@ -1215,7 +1244,7 @@ .de Pa . if !\n[doc-args-processed] \{\ . ie !\n[.$] \ -. nop \&\*[doc-Pa-font]~\f[P]\s[0] +. nop \*[doc-Pa-font]~\f[P]\s[0] . el \{\ . ds doc-macro-name Pa . doc-parse-args \$@ @@ -1224,7 +1253,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Pa-font] +. as doc-out-string \*[doc-Pa-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1260,7 +1289,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Sy-font] +. as doc-out-string \*[doc-Sy-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1296,7 +1325,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Me-font] +. as doc-out-string \*[doc-Me-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1371,7 +1400,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Va-font] +. as doc-out-string \*[doc-Va-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -1388,11 +1417,11 @@ . as doc-out-string \*[doc-No-font] . . if !\n[doc-args-processed] \{\ -. ie !\n[.$] \ -. tm Usage: .No must be called with arguments (#\n[.c]) -. el \{\ +. ie \n[.$] \ . ds doc-macro-name No . doc-parse-args \$@ +. el \{\ +. tm Usage: .No must be called with arguments (#\n[.c]) . \} . \} . @@ -1562,7 +1591,7 @@ . \" .tm doc-enclose-string beg: . \" .tm1 " arg(doc-arg[\n[doc-arg-ptr]])==\*[doc-arg\n[doc-arg-ptr]] . \" .tm1 " doc-nesting-level==\n[doc-nesting-level] -. \" .tm1 " doc-diversion-level==\n[doc-diversion-level] +. \" .tm1 " doc-in-diversion==\n[doc-in-diversion] . \" .tm1 " doc-saved-list-immediate==\n[doc-saved-list-immediate] . \" .tm1 " doc-args-processed==\n[doc-args-processed] . @@ -1591,7 +1620,7 @@ . nr doc-temp-args-processed (\n[doc-args-processed] - 1) . doc-skip-punct-backwards . nr doc-temp-args-processed +1 -. ds doc-arg\n[doc-temp-args-processed] \&\*[doc-quote-right]\*[doc-arg\n[doc-temp-args-processed]] +. ds doc-arg\n[doc-temp-args-processed] "\*[doc-quote-right]\&\*[doc-arg\n[doc-temp-args-processed]] . nr doc-temp-args-processed 0 . \} . el \ @@ -1906,7 +1935,7 @@ . \" .tm doc-arg[\n[doc-args-processed]]==\*[doc-arg\n[doc-args-processed]] . \" .tm1 " doc-arg-ptr==\n[doc-arg-ptr] . \" .tm1 " doc-nesting-level==\n[doc-nesting-level] -. \" .tm1 " doc-diversion-level==\n[doc-diversion-level] +. \" .tm1 " doc-in-diversion==\n[doc-in-diversion] . . ie !\n[doc-args-processed] \{\ . ie \n[.$] \{\ @@ -1916,16 +1945,9 @@ . el \{\ . as doc-out-string \&\*[doc-quote-left] . -. if !\n[doc-diversion-level] \{\ -. if \n[doc-space-mode] \{\ -. nr doc-diversion-level +1 -. ds doc-saved-out-string \&\*[doc-out-string] -. ds doc-out-string -. ev doc-divert-environment -. fi -. di doc-diversion -. \} -. \} +. if !\n[doc-in-diversion] \ +. if \n[doc-space-mode] \ +. doc-save-and-divert . \} . \} . el \ @@ -1948,13 +1970,13 @@ . nr doc-saved-list-immediate 1 . \} . \" .\" .ds doc-curr-space -. \" CHANGED .ds doc-curr-space \*[doc-soft-space] +. \" CHANGED .ds doc-curr-space "\*[doc-soft-space] . doc-reset-args . \} . \} . el \{\ . if (\n[doc-nesting-level] > 1) \ -. as doc-out-string \*[doc-space] +. as doc-out-string "\*[doc-space] . \} .. . @@ -1976,7 +1998,7 @@ . \" .tm doc-arg[\n[doc-args-processed]]==\*[doc-arg\n[doc-args-processed]] . \" .tm1 " doc-arg-ptr==\n[doc-arg-ptr] . \" .tm1 " doc-nesting-level==\n[doc-nesting-level] -. \" .tm1 " doc-diversion-level==\n[doc-diversion-level] +. \" .tm1 " doc-in-diversion==\n[doc-in-diversion] . . as doc-out-string \&\*[doc-quote-right] . @@ -2003,7 +2025,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-args-processed]] . . \" .tm CURRENT . \" .tm1 " doc-arg-ptr==\*[doc-arg\n[doc-arg-ptr]] @@ -2107,7 +2129,7 @@ .\" NS doc-space string .\" NS current inter-argument space . -.ds doc-space \*[doc-soft-space] +.ds doc-space "\*[doc-soft-space] . . .\" NS doc-soft-space string @@ -2121,7 +2143,7 @@ .\" NS set current space string to hard (unpaddable) space. . .de doc-set-hard-space -. ds doc-space \*[doc-hard-space] +. ds doc-space "\*[doc-hard-space] .. . . @@ -2129,7 +2151,7 @@ .\" NS set current space string to soft space (troff limitation) . .de doc-set-soft-space -. ds doc-space \*[doc-soft-space] +. ds doc-space "\*[doc-soft-space] .. . . @@ -2154,10 +2176,10 @@ . \} . \} . -. if (\n[doc-args-processed] > 0) \{\ +. if \n[doc-args-processed] \{\ . nr doc-arg-ptr +1 . if "\*[doc-arg\n[doc-arg-ptr]]"on" \{\ -. ds doc-space \*[doc-soft-space] +. ds doc-space "\*[doc-soft-space] . nr doc-space-mode 1 . \} . if "\*[doc-arg\n[doc-arg-ptr]]"off" \{\ @@ -2197,10 +2219,10 @@ . ds doc-arg-type string . el \{\ . if (\n[doc-width] == 1) \{\ -. ie dz\$1 \{\ +. ie d z\$1 \{\ . ie "\*[z\$1]"punct-suffix" \ . ds doc-arg-type punct-suffix -. el \{ +. el \{\ . ie "\*[z\$1]"punct-prefix" \ . ds doc-arg-type punct-prefix . el \ @@ -2211,7 +2233,7 @@ . ds doc-arg-type string . \} . if (\n[doc-width] == 2) \{\ -. ie r\$1 \{\ +. ie r \$1 \{\ . ie \n[\$1] \ . ds doc-arg-type macro . el \ @@ -2225,7 +2247,7 @@ . . .\" NS doc-get-arg-type* macro -.\" NS same as `.doc-get-arg-type' but uses doc-arg[1-9] strings +.\" NS same as `.doc-get-arg-type' but uses doc-argXXX strings .\" NS .\" NS modifies: .\" NS @@ -2239,7 +2261,7 @@ . ds doc-arg-type string . el \{\ . if (\n[doc-width] == 1) \{\ -. ie dz\*[doc-arg\$1] \{\ +. ie d z\*[doc-arg\$1] \{\ . ie "\*[z\*[doc-arg\$1]]"punct-suffix" \ . ds doc-arg-type punct-suffix . el \{\ @@ -2249,10 +2271,11 @@ . ds doc-arg-type string . \} . \} -. el .ds doc-arg-type string +. el \ +. ds doc-arg-type string . \} . if (\n[doc-width] == 2) \{\ -. ie r\*[doc-arg\$1] \{\ +. ie r \*[doc-arg\$1] \{\ . ie \n[\*[doc-arg\$1]] \ . ds doc-arg-type macro . el \ @@ -2278,20 +2301,26 @@ .\" NS set spacing for macros .\" NS .\" NS local variable: -.\" NS doc-reg-dssfm +.\" NS doc-reg-dssfm, doc-reg-dssfm1 . .de doc-set-spacing-for-macro +. nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-args-processed]]] +. . \" closing macros like .Ac, Bc., etc. have value 3 -. if (\n[\*[doc-arg\n[doc-args-processed]]] == 3) \{\ +. ie (\n[doc-reg-dssfm1] == 3) \{\ . nr doc-reg-dssfm (\n[doc-args-processed] - 1) . ds doc-space\n[doc-reg-dssfm] -. ds doc-space\n[doc-args-processed] \*[doc-space] +. ds doc-space\n[doc-args-processed] "\*[doc-space] . \} -. -. \" macros like .Ap and .Ns have value 2 -. if (\n[\*[doc-arg\n[doc-args-processed]]] == 2) \{\ -. nr doc-reg-dssfm (\n[doc-args-processed] - 1) -. ds doc-space\n[doc-reg-dssfm] +. el \{\ +. \" macros like .Ap and .Ns have value 2 +. ie (\n[doc-reg-dssfm1] == 2) \{\ +. nr doc-reg-dssfm (\n[doc-args-processed] - 1) +. ds doc-space\n[doc-reg-dssfm] +. ds doc-space\n[doc-args-processed] +. \} +. el \ +. ds doc-space\n[doc-args-processed] . \} .. . @@ -2300,7 +2329,7 @@ .\" NS set spacing for strings . .de doc-set-spacing-for-string -. ds doc-space\n[doc-args-processed] \*[doc-space] +. ds doc-space\n[doc-args-processed] "\*[doc-space] .. . . @@ -2316,7 +2345,7 @@ . ds doc-space\n[doc-reg-dssfps] . \} . -. ds doc-space\n[doc-args-processed] \*[doc-space] +. ds doc-space\n[doc-args-processed] "\*[doc-space] .. . . @@ -2324,6 +2353,7 @@ .\" NS set spacing for punctuation prefixes . .de doc-set-spacing-for-punct-prefix +. ds doc-space\n[doc-args-processed] .. . . @@ -2391,7 +2421,7 @@ .\" NS append if punctuation suffix . .de doc-do-xref-punct-suffix -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . nr doc-arg-ptr +1 . \" XXX ? . n\\C\\n(aP @@ -2402,7 +2432,7 @@ .\" NS append if punctuation prefix . .de doc-do-xref-punct-prefix -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . nr doc-arg-ptr +1 . \" XXX ? . n\\C\\n(aP @@ -2421,12 +2451,12 @@ . nr doc-curr-font-for-Ef \n[.f] . nr doc-curr-size-for-Ef \n[.s] . -. if "\$1"Em" \&\*[doc-Em-font]\c -. if "\$1"Li" \&\*[doc-Li-font]\c -. if "\$1"Sy" \&\*[doc-Sy-font]\c -. if "\$1"-emphasis" \&\*[doc-Em-font]\c -. if "\$1"-literal" \&\*[doc-Li-font]\c -. if "\$1"-symbolic" \&\*[doc-Sy-font]\c +. if "\$1"Em" \*[doc-Em-font]\c +. if "\$1"Li" \*[doc-Li-font]\c +. if "\$1"Sy" \*[doc-Sy-font]\c +. if "\$1"-emphasis" \*[doc-Em-font]\c +. if "\$1"-literal" \*[doc-Li-font]\c +. if "\$1"-symbolic" \*[doc-Sy-font]\c . \} . el \ . tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c]) @@ -2526,7 +2556,7 @@ . nr doc-curr-size \n[.s] . . ie t \{\ -. nop \&\*[doc-Li-font] +. nop \*[doc-Li-font]\c ' ta T 9n . \} . el \ @@ -2848,7 +2878,7 @@ . nr doc-arg-ptr +1 . nr have-tag-width 1 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH -. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]] +. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]] . . doc-get-arg-width \n[doc-arg-ptr] . ie (\n[doc-width] > 2) \{\ @@ -2874,7 +2904,7 @@ . 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]] +. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]] . . doc-get-arg-width \n[doc-arg-ptr] . ie (\n[doc-width] > 2) \{\ @@ -2897,7 +2927,7 @@ . if !\n[doc-reg-dBla] \{\ . if "\*[doc-list-stack\n[doc-list-depth]]"column-list" \{\ . nr doc-column-depth +1 -. ds doc-arg\n[doc-column-depth] \*[doc-arg\n[doc-arg-ptr]] +. ds doc-arg\n[doc-column-depth] "\*[doc-arg\n[doc-arg-ptr]] . \} . \} . if (\n[doc-num-args] > \n[doc-arg-ptr]) \ @@ -3040,7 +3070,7 @@ . \" tm1 " doc-arg-ptr==\n[doc-arg-ptr] . \" tm1 " beg arg(doc-arg[1])==\*[doc-arg1] . \" tm1 " doc-nesting-level==\n[doc-nesting-level] -. \" tm1 " doc-diversion-level==\n[doc-diversion-level] +. \" tm1 " doc-in-diversion==\n[doc-in-diversion] . \" tm1 " doc-saved-list-immediate==\n[doc-saved-list-immediate] . \" tm1 " doc-args-processed==\n[doc-args-processed] . @@ -3048,12 +3078,12 @@ . nr doc-list-immediate 1 . nr doc-arg-ptr +1 . ds doc-curr-type \*[doc-type\n[doc-arg-ptr]] -. ds doc-curr-arg \*[doc-arg\n[doc-arg-ptr]] +. ds doc-curr-arg "\*[doc-arg\n[doc-arg-ptr]] . . if \n[doc-in-files-section] \{\ -. ds doc-save-Pa-font \*[doc-Pa-font] +. ds doc-save-Pa-font "\*[doc-Pa-font] . if n \ -. ds doc-Pa-font \*[doc-No-font] +. ds doc-Pa-font "\*[doc-No-font] . \} . . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \ @@ -3063,8 +3093,13 @@ . No . \} . -. \" tm in It here is doc-out-string==\*[doc-out-string] -. \" tm It mid arg(doc-arg[1])==\*[doc-arg1]; doc-nesting-level==\n[doc-nesting-level]; doc-diversion-level==\n[doc-diversion-level]; doc-saved-list-immediate==\n[doc-saved-list-immediate]; doc-args-processed==\n[doc-args-processed] +. \" tm1 "in It here is doc-out-string==\*[doc-out-string] +. \" tm1 " arg(doc-arg[1])==\*[doc-arg1] +. \" tm1 " doc-nesting-level==\n[doc-nesting-level] +. \" tm1 " doc-in-diversion==\n[doc-in-diversion] +. \" tm1 " doc-saved-list-immediate==\n[doc-saved-list-immediate] +. \" tm1 " doc-args-processed==\n[doc-args-processed] +. . ie \n[doc-saved-list-immediate] \ . ds doc-saved-list-type "\*[doc-str-It] . el \ @@ -3157,7 +3192,7 @@ .de doc-enum-list . nr doc-nesting-level +1 . nr doc-enum-list-count +1 -. ds doc-out-string \&\n[doc-enum-list-count]. +. ds doc-out-string "\n[doc-enum-list-count]. . doc-do-list .. . @@ -3167,7 +3202,7 @@ . .de doc-bullet-list . nr doc-nesting-level +1 -. ds doc-out-string \&\*[doc-Sy-font]\[bu]\f[P] +. ds doc-out-string "\*[doc-Sy-font]\[bu]\f[P] . doc-do-list .. . @@ -3177,7 +3212,7 @@ . .de doc-dash-list . nr doc-nesting-level +1 -. ds doc-out-string \&\*[doc-Sy-font]\-\f[P] +. ds doc-out-string "\*[doc-Sy-font]\-\f[P] . doc-do-list .. . @@ -3199,7 +3234,7 @@ . nop \&\*[doc-out-string]\h'|\n[doc-reg-ddl]u'\c . . nr doc-nesting-level -1 -. \" .nr doc-diversion-level +1 +. \" .nr doc-in-diversion 1 . ds doc-out-string . nr doc-list-immediate 0 . doc-reset-args @@ -3227,7 +3262,7 @@ . br . nr doc-diag-list-input-line-count \n[.c] . -. nop \&\*[doc-Sy-font]\*[doc-out-string]\c +. nop \*[doc-Sy-font]\*[doc-out-string]\c . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\*[doc-digit-string]\c . . doc-reset-args @@ -3259,11 +3294,11 @@ . . if \n[doc-in-files-section] \ . if n \ -. ds doc-Pa-font \*[doc-save-Pa-font] +. ds doc-Pa-font "\*[doc-save-Pa-font] . . nr doc-nesting-level -1 . nr doc-list-immediate 0 -. \" .nr doc-diversion-level +1 +. \" .nr doc-in-diversion 1 . ds doc-out-string . doc-reset-args ' fi @@ -3436,8 +3471,8 @@ . ie !"\*[doc-type\n[doc-arg-ptr]]"string" \ . doc-do-xref-\*[doc-type\n[doc-arg-ptr]] . el \{\ -. as doc-out-string \&\*[doc-Xr-font] -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] +. as doc-out-string \*[doc-Xr-font] +. 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 "\*[doc-type\n[doc-arg-ptr]]"string" \{\ @@ -3472,7 +3507,7 @@ . . nr doc-arg-ptr +1 . if (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ -. as doc-out-string \&\*[doc-Sx-font] +. as doc-out-string \*[doc-Sx-font] . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . doc-print-recursive @@ -3561,7 +3596,7 @@ . ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\ . nr doc-reg-dcl (\n[doc-arg-ptr] - 1) -. rm doc-space\n[doc-reg-dcl] +. ds doc-space\n[doc-reg-dcl] . \} . doc-do-\*[doc-type\n[doc-arg-ptr]] . \} @@ -3584,14 +3619,14 @@ . ie (\n[doc-args-processed] >= \n[doc-arg-ptr]) \{\ . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\ . nr doc-reg-Ta (\n[doc-arg-ptr] - 1) -. rm doc-space\n[doc-reg-Ta] +. ds doc-space\n[doc-reg-Ta] . \} . as doc-out-string \t . doc-do-\*[doc-type\n[doc-arg-ptr]] . \} . el \{\ . as doc-out-string \t\c -. rm doc-space\n[doc-arg-ptr] +. ds doc-space\n[doc-arg-ptr] . doc-print-out-string . doc-reset-args . \" .ds doc-out-string @@ -3712,12 +3747,12 @@ . nr doc-variable-type +1 . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] -. nop \&\*[doc-Ft-font]\$* +. nop \*[doc-Ft-font]\$* . . ie !\n[doc-have-old-function] \ . br . el \ -. nop \*[doc-soft-space] +. nop \&\*[doc-soft-space] . . ft \n[doc-curr-font] . fs \n[doc-curr-size] @@ -3759,7 +3794,7 @@ . . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] -. nop \&\*[doc-Ft-font]\$* +. nop \*[doc-Ft-font]\$* . . ft \n[doc-curr-font] . ps \n[doc-curr-size] @@ -3802,8 +3837,8 @@ . \} . . if \n[.$] \ -. as doc-out-string \&\*[doc-Ft-font]\$* -. as doc-out-string \&\ \f[P] +. as doc-out-string \*[doc-Ft-font]\$* +. as doc-out-string \ \f[P] .. . . @@ -3869,13 +3904,13 @@ . \" .\} . . if (\n[doc-func-arg-count] > 1) \{\ -. as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|, -. as doc-out-string \*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font] -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] +. as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|, +. as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font] +. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] . \} . . if (\n[doc-func-arg-count] == 1) \{\ -. as doc-out-string \&\|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]] . as doc-out-string \f[P]\s[0] . \} . nr doc-func-arg-count +1 @@ -3966,7 +4001,7 @@ . if (\n[doc-args-processed] >= \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 \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]] . as doc-out-string \f[P]\s[0]\*[lp] . . nr doc-arg-ptr +1 @@ -4022,7 +4057,7 @@ . nr doc-arg-ptr +1 . if "\*[doc-type\n[doc-arg-ptr]]"string" \{\ . as doc-out-string \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]], -. as doc-out-string \*[doc-space\n[doc-reg-ddfs]]\f[P]\s[0]\| +. as doc-out-string "\*[doc-space\n[doc-reg-ddfs]]\f[P]\s[0]\| . \} . doc-do-function-\*[doc-type\n[doc-arg-ptr]] . \} @@ -4044,11 +4079,11 @@ . ie \n[doc-in-synopsis-section] \{\ . as doc-out-string \&\*[rp]\f[R];\f[P] . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]] . \} . el \{\ . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. as doc-out-string \*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string "\*[doc-arg\n[doc-arg-ptr]] . \} . . ie (\n[doc-args-processed] > \n[doc-arg-ptr]) \ @@ -4065,11 +4100,11 @@ . ie \n[doc-in-synopsis-section] \{\ . as doc-out-string \&\*[rp]\f[R];\f[P] . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. as doc-out-string \*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]] +. as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]] . \} . el \{\ . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. as doc-out-string \*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]] +. 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]) \{\ @@ -4158,7 +4193,7 @@ . 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 \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]] . as doc-out-string \f[P]\s[0]\*[lp] . doc-reset-args . \} @@ -4229,7 +4264,7 @@ . as doc-function-arg "\$1 . . if (\n[doc-function-args-processed] < \n[doc-num-function-args]) \{\ -. as doc-function-arg \*[doc-hard-space] +. as doc-function-arg "\*[doc-hard-space] . . shift . doc-insert-hard-space \$@ @@ -4310,38 +4345,38 @@ . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \ . nop \&\*[q]\*[doc-reference-title-name]\*[q]. . el \ -. nop \&\*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font]. +. nop \*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font]. . \} . el \{\ . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \ . nop \&\*[q]\*[doc-reference-title-name]\*[q], . el \ -. nop \&\*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font], +. nop \*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font], . \} . \} . . if \n[doc-book-count] \{\ . nr doc-reference-count -1 . ie !\n[doc-reference-count] \ -. nop \&\*[doc-Em-font]\*[doc-book-name]\*[doc-No-font]. +. nop \*[doc-Em-font]\*[doc-book-name]\*[doc-No-font]. . el \ -. nop \&\*[doc-Em-font]\*[doc-book-name]\*[doc-No-font], +. nop \*[doc-Em-font]\*[doc-book-name]\*[doc-No-font], . \} . . if \n[doc-publisher-count] \{\ . nr doc-reference-count -1 . ie !\n[doc-reference-count] \ -. nop \&\*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font]. +. nop \*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font]. . el \ -. nop \&\*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font], +. nop \*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font], . \} . . if \n[doc-journal-count] \{\ . nr doc-reference-count -1 . ie !\n[doc-reference-count] \ -. nop \&\*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font]. +. nop \*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font]. . el \ -. nop \&\*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font], +. nop \*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font], . \} . . if \n[doc-report-count] \{\ @@ -4485,7 +4520,7 @@ . nr doc-curr-size \n[.s] . . ie !\n[doc-is-reference] \{\ -. as doc-out-string \&\*[doc-Em-font] +. as doc-out-string \*[doc-Em-font] . doc-print-recursive . \} . el \ @@ -4828,7 +4863,7 @@ . nr doc-curr-font \n[.f] . nr doc-curr-size \n[.s] . ie !\n[doc-is-reference] \{\ -. as doc-out-string \&\*[doc-Em-font] +. as doc-out-string \*[doc-Em-font] . doc-print-recursive . \} . el \ @@ -4873,10 +4908,10 @@ .de doc-do-references . hy 0 . -. ds doc-str-ddr \*[doc-type\n[doc-arg-ptr]] +. ds doc-str-ddr "\*[doc-type\n[doc-arg-ptr]] . . ie "\*[doc-str-ddr]"macro" \{\ -. \" .as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. \" .as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . ie "\*[doc-arg\n[doc-arg-ptr]]"Tn" \ . doc-reference-trademark . el \{\ @@ -4891,11 +4926,11 @@ . el \ . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]] . \" .el \{\ -. \" . as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] -. \" . as doc-out-string \*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] +. \" . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. \" . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0] . . ie (\n[doc-args-processed] == \n[doc-arg-ptr]) \{\ -. \" .as doc-out-string \&\f[\n[doc-curr-font]]\s[\n[doc-curr-size]] +. \" .as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]] . as \*[doc-reference-string-name] \&\*[doc-out-string] . ds doc-out-string . ds doc-reference-string-name @@ -4903,7 +4938,7 @@ . \} . el \{\ . nr doc-arg-ptr +1 -. as doc-out-string \*[doc-space\n[doc-reg-ddr]] +. as doc-out-string "\*[doc-space\n[doc-reg-ddr]] . doc-do-references . \} . \} @@ -4925,7 +4960,7 @@ . nr doc-curr-size \n[.s] . . ie t \{\ -. nop \&\*[doc-Li-font] +. nop \*[doc-Li-font] . br . ta T 9n . \} @@ -5026,7 +5061,7 @@ . if "\$1"-std" \{\ . doc-reg-Rv \*[doc-section] . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \ -. tm Usage: .Rv -std in sections 2 and 3 only +. tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c]) . br . nop \&The . Fn \$2 @@ -5036,6 +5071,50 @@ .. . . +.\" NS Mt user macro +.\" NS mailto (for conversion to HTML) +. +.de Mt +. Pa \$@ +.. +. +. +.\" NS Lk user macro +.\" NS link (for conversion to HTML) +.\" NS +.\" NS local variables: +.\" NS doc-str-Lk, doc-reg-Lk +. +.de Lk +. ds doc-str-Lk Sy \$@ +. +. ie (\n[.$] >= 2) \{\ +. doc-get-arg-type \$2 +. ie (\[doc-arg-type] < 3) \{\ +. Em \&\$2: +. ds doc-str-Lk Sy "\$1" +. doc-get-width "\$1" +. shift 2 +. if \n[.$] \ +. as doc-str-Lk " \$@ +. \} +. el \ +. doc-get-width "\$1" +. \} +. el \ +. doc-get-width "\$1" +. +. ie n \ +. nr doc-reg-Lk 26 +. el \ +. nr doc-reg-Lk 38 +. ie (\n[doc-width] >= \n[doc-reg-Lk]) \ +. D1 \*[doc-str-Lk] +. el \ +. \*[doc-str-Lk] +.. +. +. .rn em e@ . .de em -- 2.11.4.GIT