1 .\" Copyright (c) 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
38 .\" use -rC=1 to number pages continuously
42 .\" use -rcR=1 to force the creation of a single, very long page
45 .ds doc-caption-font \f[R]\s[10]
46 .ds doc-caption-font2 \f[R]\s[10]
47 .ds doc-Ad-font \f[I]\s[10]
48 .ds doc-Ar-font \f[CO]\s[10]
49 .ds doc-Cm-font \f[CB]\s[10]
50 .ds doc-Em-font \f[I]\s[10]
51 .ds doc-Er-font \f[C]\s[10]
52 .ds doc-Ev-font \f[C]\s[10]
53 .ds doc-Fa-font \f[CO]\s[10]
54 .ds doc-Fd-font \f[CB]\s[10]
55 .ds doc-Fl-font \f[CB]\s[10]
56 .ds doc-Fn-font \f[CB]\s[10]
57 .ds doc-Ft-font \f[CO]\s[10]
58 .ds doc-Ic-font \f[CB]\s[10]
60 .ds doc-Nm-font \f[CB]\s[10]
61 .ds doc-No-font \f[R]\s[10]
62 .ds doc-Pa-font \f[C]\s[10]
63 .ds doc-Sh-font \f[B]\s[10]
64 .ds doc-Sy-font \f[B]\s[10]
65 .ds doc-Sx-font \f[R]\s[10]
66 .ds doc-Tn-font-shape \f[R]
67 .ds doc-Tn-font-size \s[9]
68 .ds doc-Va-font \f[I]\s[10]
69 .ds doc-Xr-font \f[C]\s[10]
71 .ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[10]
72 .ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[10]
73 .ds lp \f[R](\f[P]\s[10]
74 .ds rp \f[R])\f[P]\s[10]
75 .ds doc-left-bracket \f[R]\^[\^\f[P]\s[10]
76 .ds doc-right-bracket \f[R]\^]\f[P]\s[10]
82 .ds doc-punct-chars \f[R]{\ .\ ,\ :\ ;\ (\ )\ [\ ]\ \f[R]}
83 .nr doc-subheader-indent (\w
\a\f[C],
\au * 5u)
84 .nr doc-paragraph-space .5v
86 .ds doc-digit-string \0
87 .nr doc-digit-width \w'\0'u
88 .nr doc-fixed-width \w
\a\f[C]0
\a
93 .de doc-setup-page-layout
94 . nr doc-header-space .5i
95 . nr doc-footer-space .5i
101 . nr doc-display-vertical .5v
108 .\" Lq and Rq are `official'
114 .ds doc-right-singlequote \&'
115 .ds doc-left-singlequote \&`
119 .\" Math stuff -- all macro names are `official'
135 . ds doc-header-string \*[doc-document-title]
136 . if !"\*[doc-section]"Null" \{\
137 . as doc-header-string \|(\|\*[doc-section]\|)
141 . wh -1.25i doc-footer
145 . ds doc-command-name
151 . \" Don't set the page number if this is the first page,
152 . \" in case the user has used -n.
164 .\" NS doc-get-width macro
165 .\" NS computes the width of a string as a multiple of `doc-fixed-width':
166 .\" NS `.doc-get-width string'
172 . nr doc-width \w
\a\f[C]\$1
\a
173 . ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
174 . ie (\n[doc-width] % \n[doc-fixed-width]) \{\
175 . nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
177 . el .nr doc-width (\n[doc-width] / \n[doc-fixed-width])
180 . ie \n[doc-width] .nr doc-width 1
186 .\" NS doc-get-arg-width macro
187 .\" NS computes the width of an argument as a multiple of
188 .\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
193 .de doc-get-arg-width
194 . nr doc-width \w
\a\f[C]\*[doc-arg\$1]
\a
195 . ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
196 . ie (\n[doc-width] % \n[doc-fixed-width]) \{\
197 . nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
199 . el .nr doc-width (\n[doc-width] / \n[doc-fixed-width])
202 . ie \n[doc-width] .nr doc-width 1
209 .\" NS quoted literal define
211 .\" NS width register `.Ql' set in doc-common
213 .\" NS local register:
217 . if !\n[doc-args-processed] \{\
218 . ds doc-macro-name Ql
221 . while (\n[doc-reg-Ql] <= \n[.$]) \{\
222 . ds doc-arg\n[doc-reg-Ql] "\$[\n[doc-reg-Ql]]
226 . nr doc-num-args \n[.$]
227 . doc-parse-arg-vector
231 . doc-get-arg-width \n[doc-arg-ptr]
234 . ie (\n[doc-width] > 2) .Li
237 . if \n[doc-arg-ptr] \{\
238 . ds doc-arg\n[doc-arg-ptr] Li
242 . if !\n[doc-arg-ptr] \{\
243 . rm doc-type0 doc-type1 doc-type2 doc-type3 doc-type4
244 . rm doc-type5 doc-type6 doc-type7 doc-type8 doc-type9
245 . rm doc-space1 doc-space2 doc-space3 doc-space4 doc-space5
246 . rm doc-space6 doc-space7 doc-space8 doc-space9
248 . rn doc-arg8 doc-arg9
249 . rn doc-arg7 doc-arg8
250 . rn doc-arg6 doc-arg7
251 . rn doc-arg5 doc-arg6
252 . rn doc-arg4 doc-arg5
253 . rn doc-arg3 doc-arg4
254 . rn doc-arg2 doc-arg3
255 . rn doc-arg1 doc-arg2
258 . nr doc-num-args (\n[doc-args-processed] + 1)
259 . nr doc-args-processed 0
260 . doc-parse-arg-vector
263 . ds doc-quote-left \&\*[doc-left-singlequote]
264 . ds doc-quote-right \&\*[doc-right-singlequote]
273 .\" NS section headers
275 .\" NS width register `.Sh' set in doc-common
278 . nr doc-in-synopsis-section 0
279 . nr doc-indent-synopsis 0
288 . nr doc-in-synopsis-section 0
289 . nr doc-in-see-also-section 0
290 . nr doc-in-files-section 0
291 . nr doc-in-standards-section 0
292 . nr doc-in-authors-section 0
294 . if "\$1"SYNOPSIS" \{\
296 . nr doc-in-synopsis-section 1
299 . if "\$1"DESCRIPTION" \{\
308 . nr doc-in-see-also-section 1
312 . if "\$1"FILES" .nr doc-in-files-section 1
313 . if "\$1"STANDARDS" .nr doc-in-standards-section 1
314 . if "\$1"AUTHORS" .nr doc-in-authors-section 1
320 . doc-setup-page-layout
323 . ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
327 . nop \&\*[doc-Sh-font]\$1 \|\$2 \|\$3 \|\$4 \|\$5 \|\$6 \|\$7 \|\$8 \|\$9
330 . in (\n[.i]u + \n[doc-subheader-indent]u)