From 444bec18770c19ab76debc1dfae258090d3381d2 Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Fri, 22 Sep 2000 06:46:22 +0000 Subject: [PATCH] Internal update. --- tmac/doc-common.new | 36 ++++++++++++++++++++++++++++-------- tmac/doc-ditroff.new | 34 +++++++++++++++------------------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/tmac/doc-common.new b/tmac/doc-common.new index 610d1903..b3596c88 100755 --- a/tmac/doc-common.new +++ b/tmac/doc-common.new @@ -36,6 +36,8 @@ .eo . . +.\" Macro Identifiers +. .nr %A 1 .nr %B 1\" ? .nr %D 1\" ? @@ -141,13 +143,18 @@ .nr Xo 1 .nr Xr 10n . +. .nr doc-display-indent 6n . +. .\" space strings +. .ds doc-soft-space \& \& .ds doc-hard-space \&\ \& . +. .\" punctuation values +. .ds z. punct-suffix .ds z, punct-suffix .ds z: punct-suffix @@ -158,11 +165,13 @@ .ds z] punct-suffix . .\" Matching pairs +. .ds z( z) .ds z[ z] .ds z< z> . .\" This is disgusting, troff does not parse ``if'' stmt properly +. .ds z0 .ds z1 .ds z2 @@ -397,16 +406,27 @@ .\" NS subsection .\" NS .\" NS width register `.Ss' set above +.\" NS +.\" NS local variable: +.\" NS doc-reg-Ss . .de Ss -. sp -. if !\n[cR] .ne 2 -. ti -.25i -. nop \&\*[doc-Sh-font]\$1 \|\$2 \|\$3 \|\$4 \|\$5 \|\$6 \|\$7 \|\$8 \|\$9 -. nop \&\f[P]\s[0] -. ta T .5i -. if !\n[cR] .ne 2 -. br +. ie !\n[.$] .tm Usage: .Ss subsection name +. el \{\ +. sp +. if !\n[cR] .ne 2 +. ti -.25i +. 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 +. \} .. . . diff --git a/tmac/doc-ditroff.new b/tmac/doc-ditroff.new index fb1601b0..7495f17f 100755 --- a/tmac/doc-ditroff.new +++ b/tmac/doc-ditroff.new @@ -85,6 +85,7 @@ . .ds doc-digit-string \0 .nr doc-digit-width \w'\0'u +.nr doc-fixed-width \w\f[C]0 . .eo . @@ -129,6 +130,7 @@ . .nr gX 0 . +. .de doc-setup-header . ds doc-header-string \*[doc-document-title] . if !"\*[doc-section]"Null" \{\ @@ -139,13 +141,12 @@ . wh -1.25i doc-footer . . nr nL \n[nl] -. ie (\n[gX] == 1) \{\ +. ie \n[gX] \{\ . ds doc-command-name . bp . \} -. el \{\ +. el \ ' bp -. \} . . \" Don't set the page number if this is the first page, . \" in case the user has used -n. @@ -160,11 +161,6 @@ .. . . -.ec -.nr doc-fixed-width \w\f[C]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,18 +209,19 @@ .\" NS quoted literal define .\" NS .\" NS width register `.Ql' set in doc-common +.\" NS +.\" NS local register: +.\" NS doc-reg-Ql . .de Ql . if !\n[doc-args-processed] \{\ . ds doc-macro-name Ql -. ds doc-arg1 \$1 -. ds doc-arg2 \$2 -. ds doc-arg3 \$3 -. ds doc-arg4 \$4 -. ds doc-arg5 \$5 -. ds doc-arg6 \$6 -. ds doc-arg7 \$7 -. ds doc-arg8 \$8 +. +. nr doc-reg-Ql 1 +. while (\n[doc-reg-Ql] <= \n[.$]) \{\ +. ds doc-arg\n[doc-reg-Ql] "\$[\n[doc-reg-Ql]] +. nr doc-reg-Ql +1 +. \} . . nr doc-num-args \n[.$] . doc-parse-arg-vector @@ -234,9 +231,8 @@ . doc-get-arg-width \n[doc-arg-ptr] . nr doc-arg-ptr -1 . -. if (\n[doc-width] > 2) .Li -. -. if (\n[doc-width] <= 2) \{\ +. ie (\n[doc-width] > 2) .Li +. el \{\ . \" Db on . if \n[doc-arg-ptr] \{\ . ds doc-arg\n[doc-arg-ptr] Li -- 2.11.4.GIT