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 5.8 (Berkeley) 8/5/91
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
39 .\" Modified by wl@gnu.org to make it more readable: using long names and
40 .\" many groff features, updating and extending documentation.
44 . ab This version of mdoc can be run with groff only!
52 .\" Load start-up files
53 .ie t .mso mdoc/doc-ditroff.new
54 .el .mso mdoc/doc-nroff.new
56 .mso mdoc/doc-common.new
57 .mso mdoc/doc-syms.new
60 .\" NS doc-inline-debug user register (bool)
61 .\" NS inline debug mode (inline if 1, to stderr if 0 (default))
63 .if !r doc-inline-debug .nr doc-inline-debug 0
66 .\" NS doc-debug global register (bool)
67 .\" NS debug mode (1 if active, 0 otherwise (default))
73 .\" NS start/stop debug mode (`.Db'/`.Db on'/`.Db off')
75 .\" NS without argument, toggle debug status
92 . tm Usage: .Db [on | off] (#\n[.c])
95 . ie \n[doc-debug] \{\
106 .\" NS doc-macro-name global string
107 .\" NS name of calling request (set in each user-requestable macro)
112 .\" NS doc-arg-limit global register
113 .\" NS total number of arguments
118 .\" NS doc-num-args global register
119 .\" NS number of arguments to handle (must be set to \n[.$] prior to
120 .\" NS `doc-parse-arg-vector' request)
125 .\" NS doc-arg-ptr global register
126 .\" NS argument pointer
131 .\" NS doc-argXXX global string
132 .\" NS argument vector
134 .\" NS limit: doc-arg-limit
139 .\" NS doc-typeXXX global string
140 .\" NS argument type vector (`macro', `string', `punct-suffix',
141 .\" NS `punct-prefix')
143 .\" NS limit: doc-arg-limit
148 .\" NS doc-spaceXXX global string
151 .\" NS limit: doc-arg-limit
156 .\" NS doc-out-string global string
157 .\" NS main working buffer
162 .\" NS doc-curr-space global string
163 .\" NS current space string
168 .\" NS doc-parse-args macro
169 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
172 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
173 .\" NS doc-arg-ptr, doc-out-string, doc-curr-space
175 .\" NS local variables:
176 .\" NS doc-str-dpa, doc-reg-dpa, doc-reg-dpa1
179 . nr doc-arg-limit +1
181 . \" handle `|' specially for some requests
183 . ie "\*[doc-macro-name]"Op" \
184 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
185 . el \{ .ie "\*[doc-macro-name]"Ar" \
186 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
187 . el \{ .ie "\*[doc-macro-name]"Fl" \
188 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
189 . el \{ .ie "\*[doc-macro-name]"Cm" \
190 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
191 . el \{ .ie "\*[doc-macro-name]"It" \
192 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
194 . ds doc-arg\n[doc-arg-limit] |
197 . ds doc-arg\n[doc-arg-limit] "\$1
199 . \" get argument type and set spacing
200 . doc-get-arg-type* \n[doc-arg-limit]
201 . ds doc-type\n[doc-arg-limit] \*[doc-arg-type]
202 . doc-set-spacing-for-\*[doc-arg-type]
204 . if \n[doc-debug] \{\
205 . ie "\*[doc-arg-type]"macro" \
206 . ds doc-str-dpa macro
208 . ie "\*[doc-arg-type]"string" \
209 . ds doc-str-dpa string
211 . ie "\*[doc-arg-type]"punct-suffix" \
212 . ds doc-str-dpa closing punctuation or suffix
214 . ds doc-str-dpa opening punctuation or prefix
217 . ie \n[doc-inline-debug] \{\
219 . nr doc-reg-dpa \n[.i]u
220 . in -\n[doc-reg-dpa]u
222 . if (\n[doc-arg-limit] == 1) \{\
223 . nop \f[B]DEBUG(doc-parse-args) MACRO:\f[P] `.\*[doc-macro-name]'
224 . nop \& \f[B]Line #:\f[P] \n[.c]
226 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
227 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
228 . nop \ \f[B]Length:\f[P] \n[doc-width]
229 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
230 . nop \ \f[B]Type:\f[P] \*[doc-str-dpa]
233 . if (\n[doc-arg-limit] == 1) \{\
234 . tmc "DEBUG (doc-parse-args)
235 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
237 . tmc " Argc: \n[doc-arg-limit]
238 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
239 . tm1 " Length: \n[doc-width]
240 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
241 . tm1 " Type: \*[doc-str-dpa]
244 . \" check whether we have processed the last parameter
245 . ie (\n[.$] == 1) \{\
248 . ie \n[doc-in-diversion] \{\
249 . if (\n[doc-nesting-level] > 1) \
250 . as doc-out-string "\*[doc-curr-space]
253 . if \n[doc-nesting-level] \
254 . if !\n[doc-func-arg-count] \
255 . as doc-out-string "\*[doc-curr-space]
258 . \" use space after last parameter as the current one
259 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
261 . if \n[doc-debug] \{\
264 . ie \n[doc-inline-debug] \{\
265 . nop MACRO REQUEST: \t.\*[doc-macro-name]
266 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
267 . nop "\*[doc-arg\n[doc-reg-dpa1]]"
271 . in \n[doc-reg-dpa]u
274 . tmc " MACRO REQUEST: .\*[doc-macro-name]
275 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
276 . tmc " "\*[doc-arg\n[doc-reg-dpa1]]"
288 .\" NS doc-parse-arg-vector macro
289 .\" NS parse argument vector (recursive)
292 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
293 .\" NS doc-num-args, doc-arg-ptr, doc-out-string, doc-curr-space
295 .\" NS local variables:
296 .\" NS doc-str-dpav, doc-reg-dpav, doc-reg-dpav1
298 .de doc-parse-arg-vector
299 . nr doc-arg-limit +1
301 . \" handle `|' specially for some requests
302 . if "\*[doc-arg\n[doc-arg-limit]]"|" \{\
303 . ie "\*[doc-macro-name]"Op" \
304 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
305 . el \{ .ie "\*[doc-macro-name]"Ar" \
306 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
307 . el \{ .ie "\*[doc-macro-name]"Fl" \
308 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
309 . el \{ .ie "\*[doc-macro-name]"Cm" \
310 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
311 . el \{ .if "\*[doc-macro-name]"It" \
312 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
315 . \" get argument type and set spacing
316 . doc-get-arg-type* \n[doc-arg-limit]
317 . ds doc-type\n[doc-arg-limit] \*[doc-arg-type]
318 . doc-set-spacing-for-\*[doc-arg-type]
320 . if \n[doc-debug] \{\
321 . ie "\*[doc-arg-type]"macro" \
322 . ds doc-str-dpav macro
324 . ie "\*[doc-arg-type]"string" \
325 . ds doc-str-dpav string
327 . ie "\*[doc-arg-type]"punct-suffix" \
328 . ds doc-str-dpav closing punctuation or suffix
330 . ds doc-str-dpav opening punctuation or prefix
333 . ie \n[doc-inline-debug] \{\
335 . nr doc-reg-dpav \n[.i]u
336 . in -\n[doc-reg-dpav]u
338 . if (\n[doc-arg-limit] == 1) \{\
339 . nop \f[B]DEBUG(doc-parse-arg-vector)
340 . nop MACRO:\f[P] `.\*[doc-macro-name]'
341 . nop \& \f[B]Line #:\f[P] \n[.c]
343 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
344 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
345 . nop \ \f[B]Length:\f[P] \n[doc-width]
346 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
347 . nop \ \f[B]Type:\f[P] \*[doc-str-dpav]
350 . if (\n[doc-arg-limit] == 1) \{\
351 . tmc "DEBUG(doc-parse-arg-vector)
352 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
354 . tmc " Argc: \n[doc-arg-limit]
355 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
356 . tm1 " Length: \n[doc-width]
357 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
358 . tm1 " Type: \*[doc-str-dpav]
361 . \" check whether we have processed the last parameter
362 . ie (\n[doc-num-args] == 1) \{\
365 . ie \n[doc-in-diversion] \{\
366 . if (\n[doc-nesting-level] > 1) \
367 . as doc-out-string "\*[doc-curr-space]
370 . if \n[doc-nesting-level] \
371 . if !\n[doc-func-arg-count] \
372 . as doc-out-string "\*[doc-curr-space]
375 . \" use space after last parameter as the current one
376 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
380 . if \n[doc-debug] \{\
383 . ie \n[doc-inline-debug] \{\
384 . nop \tMACRO REQUEST: .\*[doc-macro-name]
385 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
386 . nop "\*[doc-arg\n[doc-reg-dpav1]]"
387 . nr doc-reg-dpav1 +1
390 . in \n[doc-reg-dpav]u
393 . tmc " MACRO REQUEST: .\*[doc-macro-name]
394 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
395 . tmc " "\*[doc-arg\n[doc-reg-dpav1]]"
396 . nr doc-reg-dpav1 +1
402 . doc-parse-arg-vector
407 .\" NS doc-remaining-args macro
408 .\" NS output remaining arguments as-is, separated by spaces (until
409 .\" NS `doc-num-args' is exhausted), to `doc-out-string'
412 .\" NS doc-num-args, doc-arg-ptr, doc-out-string
414 .de doc-remaining-args
416 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
418 . ie (\n[doc-num-args] == 1) \{\
423 . as doc-out-string "\*[doc-space]
430 .\" NS doc-append-arg macro
431 .\" NS append one argument to argument vector:
432 .\" NS `.doc-append-arg [arg] [type]'
435 .\" NS doc-argXXX, doc-typeXXX, doc-arg-limit
438 . nr doc-arg-limit +1
439 . ds doc-arg\n[doc-arg-limit] "\$1
440 . ds doc-type\n[doc-arg-limit] \$2
441 . doc-set-spacing-for-\$2
445 .\" NS doc-print-and-reset macro
446 .\" NS print doc-out-string and clean up argument vectors
448 .de doc-print-and-reset
449 . doc-print-out-string
454 .\" NS doc-reset-args macro
455 .\" NS reset argument counters
458 .\" NS doc-arg-limit, doc-arg-ptr
466 .\" NS doc-print-out-string macro
467 .\" NS print `doc-out-string', possibly ending a diversion, enabling
468 .\" NS hyphenation afterwards
471 .\" NS doc-out-string, doc-curr-space
473 .de doc-print-out-string
474 . ie \n[doc-in-diversion] \{\
475 . if (\n[doc-nesting-level] == 1) \{\
476 . if !\n[doc-no-printing] \{\
477 . nop \&\*[doc-out-string]
481 . if !\n[doc-nesting-level] \
482 . doc-end-diversion-and-print
485 . ie \n[doc-nesting-level] \{\
486 . if \n[doc-space-mode] \
487 . if !\n[doc-list-immediate] \
488 . doc-save-and-divert
491 . if !\n[doc-no-printing] \{\
492 . nop \&\*[doc-out-string]
501 .\" NS doc-diversion diversion
502 .\" NS diversion string
505 .\" NS doc-saved-out-string global string
506 .\" NS saved doc-out-string
508 .ds doc-saved-out-string
511 .\" NS doc-in-diversion global register (bool)
512 .\" NS whether we are in a diversion
514 .nr doc-in-diversion 0
517 .\" NS doc-save-and-divert macro
518 .\" NS save doc-out-string, restore fill mode, and divert
521 .\" NS doc-out-string, doc-saved-out-string, doc-diversion,
522 .\" NS doc-in-diversion
524 .de doc-save-and-divert
525 . nr doc-in-diversion 1
526 . ds doc-saved-out-string "\*[doc-out-string]
528 . ev doc-divert-environment
532 . tm begin of `doc-diversion' at line #\n[.c]
537 .\" NS doc-end-diversion-and-print macro
538 .\" NS end diversion and print
541 .\" NS doc-out-string, doc-in-diversion
543 .\" NS local variables:
546 .de doc-end-diversion-and-print
551 . \" insert diversion only if it contains printable stuff
553 . ds doc-str-dedap \&\*[doc-diversion]\c
554 . ds doc-out-string "\*[doc-saved-out-string]\*[doc-str-dedap]\*[doc-out-string]
557 . ds doc-out-string "\*[doc-saved-out-string]\*[doc-out-string]
559 . nop \&\*[doc-out-string]
562 . nr doc-in-diversion 0
568 .\" NS doc-curr-font global register
569 .\" NS saved current font
571 .nr doc-curr-font \n[.f]
574 .\" NS doc-curr-size global register
575 .\" NS saved current font size
577 .nr doc-curr-size \n[.s]
583 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
586 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
589 .\" NS local variables:
590 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
592 .\" NS width register `Fl' set in doc-common
595 . as doc-out-string \*[doc-Fl-font]
597 . if !\n[doc-arg-limit] \{\
599 . ds doc-macro-name Fl
604 . as doc-out-string \|\-\|\f[P]\s[0]
605 . doc-print-out-string
608 . if \n[doc-arg-limit] \{\
610 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
612 . as doc-out-string \|\-\f[P]\s[0]
613 . doc-print-and-reset
616 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \{\
617 . as doc-out-string \|\-\f[P]\s[0]
618 . \*[doc-arg\n[doc-arg-ptr]]
621 . nr doc-curr-font \n[.f]
622 . nr doc-curr-size \n[.s]
624 . if "\*[doc-type\n[doc-arg-ptr]]"punct-suffix" \
625 . as doc-out-string \|\-\|
633 .\" NS doc-flag-recursion macro
634 .\" NS `Fl' flag recursion routine (special handling)
637 .\" NS doc-arg-ptr, doc-out-string
639 .\" NS local variables:
640 .\" NS doc-str-dfr, doc-str-dfr1, doc-reg-dfr
642 .de doc-flag-recursion
643 . ds doc-str-dfr \*[doc-type\n[doc-arg-ptr]]
644 . ds doc-str-dfr1 "\*[doc-arg\n[doc-arg-ptr]]
648 . ie "\*[doc-str-dfr]"macro" \{\
649 . as doc-out-string \f[P]\s[0]
653 . nr doc-reg-dfr \n[doc-arg-ptr]
655 . ie "\*[doc-str-dfr]"string" \{\
656 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
657 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
659 . ie "\*[doc-str-dfr1]"\*[Ba]" \{\
660 . if \n[doc-reg-Fl] \
661 . as doc-out-string \|\-\*[doc-space]
662 . as doc-out-string \&\*[Ba]
665 . ie "\*[doc-str-dfr1]"\f[R]|\f[P]" \{\
666 . if \n[doc-reg-Fl] \
667 . as doc-out-string \|\-\*[doc-space]
668 . as doc-out-string \f[R]|\f[P]
671 . \" two consecutive hyphen characters?
672 . ie "\*[doc-str-dfr1]"-" \
673 . as doc-out-string \|\-\^\-\|
675 . as doc-out-string \|\-\*[doc-str-dfr1]
678 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
679 . as doc-out-string "\*[doc-str-dfr1]\f[P]\s[0]
682 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
684 . if "\*[doc-str-dfr]"punct-prefix" \
685 . as doc-out-string \|\-
686 . as doc-out-string \f[P]\s[0]
687 . doc-print-and-reset
691 . ie "\*[doc-type\n[doc-arg-ptr]]"punct-suffix" \{\
692 . ie "\*[doc-type\n[doc-reg-dfr]]"punct-prefix" \
693 . as doc-out-string \|\-
695 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
698 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
702 . doc-flag-recursion \$@
707 .\" NS doc-print-recursive macro
708 .\" NS general name recursion routine (print remaining arguments)
710 .\" NS hyphenation is disabled
713 .\" NS doc-arg-ptr, doc-out-string
715 .\" NS local variables:
716 .\" NS doc-str-dpr, doc-str-dpr1, doc-reg-dpr
718 .de doc-print-recursive
719 . ds doc-str-dpr \*[doc-type\n[doc-arg-ptr]]
720 . ds doc-str-dpr1 "\*[doc-arg\n[doc-arg-ptr]]
724 . ie "\*[doc-str-dpr]"macro" \{\
725 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
729 . nr doc-reg-dpr \n[doc-arg-ptr]
731 . ie "\*[doc-str-dpr]"string" \
732 . as doc-out-string \&\*[doc-str-dpr1]
734 . \" punctuation character
735 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
736 . as doc-out-string "\*[doc-str-dpr1]\f[P]\s[0]
740 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
742 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
743 . doc-print-and-reset
746 . as doc-out-string "\*[doc-space\n[doc-reg-dpr]]
747 . doc-print-recursive
753 .\" NS command line `argument' macro: `.Ar [args ...]'
756 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
759 .\" NS width register `Ar' set in doc-common
762 . as doc-out-string \*[doc-Ar-font]
764 . if !\n[doc-arg-limit] \{\
766 . ds doc-macro-name Ar
771 . as doc-out-string \&file\ ...\f[P]\s[0]
772 . doc-print-out-string
775 . if \n[doc-arg-limit] \{\
777 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
778 . as doc-out-string \&file\ ...\f[P]\s[0]
779 . doc-print-and-reset
782 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \{\
783 . as doc-out-string \&file\ ...\f[P]\s[0]
784 . \*[doc-arg\n[doc-arg-ptr]]
787 . nr doc-curr-font \n[.f]
788 . nr doc-curr-size \n[.s]
789 . if "\*[doc-type\n[doc-arg-ptr]]"punct-suffix" \
790 . as doc-out-string \&file\ ...
791 . doc-print-recursive
800 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
803 .\" NS width register `Ad' set in doc-common
806 . if !\n[doc-arg-limit] \{\
808 . ds doc-macro-name Ad
812 . tm Usage: .Ad address ... \*[doc-punct-chars] (#\n[.c])
816 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
817 . as doc-out-string \*[doc-Ad-font]
818 . nr doc-curr-font \n[.f]
819 . nr doc-curr-size \n[.s]
820 . doc-print-recursive
825 .\" NS doc-in-synopsis-count global register
826 .\" NS whether we have more than a single item in synopsis
828 .nr doc-in-synopsis-count 0
831 .\" NS doc-indent-synopsis global register
832 .\" NS indentation in synopsis
834 .nr doc-indent-synopsis 0
838 .\" NS Config declaration (for section 4 SYNOPSIS)
840 .\" NS this function causes a break; it uses the `Nm' font
843 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
844 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis
846 .\" NS width register `Cd' set in doc-common
848 .\" needs work - not very translatable
851 . if !\n[doc-arg-limit] \{\
853 . ds doc-macro-name Cd
857 . tm Usage: .Cd Configuration file declaration (#\n[.c])
863 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
864 . as doc-out-string \*[doc-Nm-font]
865 . nr doc-curr-font \n[.f]
866 . nr doc-curr-size \n[.s]
868 . ie \n[doc-in-synopsis-count] \{\
869 . if "\*[doc-macro-name]"Cd" \{\
871 . ie (\n[doc-in-synopsis-count] > 1) \
874 . if !\n[doc-indent-synopsis] \
875 . nr doc-indent-synopsis \n[doc-display-indent]u
877 . in +\n[doc-indent-synopsis]u
878 . ti -\n[doc-indent-synopsis]u
879 . nr doc-in-synopsis-count +1
882 . doc-print-recursive
883 . in -\n[doc-indent-synopsis]u
886 . doc-print-recursive
892 .\" NS Interactive command modifier (flag)
895 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
898 .\" NS width register `Cm' set in doc-common
901 . if !\n[doc-arg-limit] \{\
903 . ds doc-macro-name Cm
907 . tmc Usage: .Cm Interactive command modifier ...
908 . tm1 " \*[doc-punct-chars] (#\n[.c])
912 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
913 . as doc-out-string \*[doc-Cm-font]
914 . nr doc-curr-font \n[.f]
915 . nr doc-curr-size \n[.s]
916 . doc-print-recursive
922 .\" NS define variable
924 .\" NS this function uses the `Er' font
927 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
930 .\" NS width register `Dv' set in doc-common
933 . if !\n[doc-arg-limit] \{\
935 . ds doc-macro-name Dv
939 . tm Usage: .Dv define_variable ... \*[doc-punct-chars] (#\n[.c])
943 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
944 . as doc-out-string \*[doc-Er-font]
945 . nr doc-curr-font \n[.f]
946 . nr doc-curr-size \n[.s]
947 . doc-print-recursive
956 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
959 .\" NS width register `Em' set in doc-common
962 . if !\n[doc-arg-limit] \{\
964 . ds doc-macro-name Em
968 . tm Usage: .Em text ... \*[doc-punct-chars] (#\n[.c])
972 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
973 . as doc-out-string \*[doc-Em-font]
974 . nr doc-curr-font \n[.f]
975 . nr doc-curr-size \n[.s]
976 . doc-print-recursive
985 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
988 .\" NS width register `Er' set in doc-common
991 . if !\n[doc-arg-limit] \{\
993 . ds doc-macro-name Er
997 . tm Usage: .Er errno_type ... \*[doc-punct-chars] (#\n[.c])
1001 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1002 . as doc-out-string \*[doc-Er-font]
1003 . nr doc-curr-font \n[.f]
1004 . nr doc-curr-size \n[.s]
1005 . doc-print-recursive
1010 .\" NS Ev user macro
1011 .\" NS environment variable
1014 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1015 .\" NS doc-curr-size
1017 .\" NS width register `Ev' set in doc-common
1020 . if !\n[doc-arg-limit] \{\
1022 . ds doc-macro-name Ev
1023 . doc-parse-args \$@
1026 . tm Usage: .Ev enviroment_variable ... \*[doc-punct-chars] (#\n[.c])
1030 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1031 . as doc-out-string \*[doc-Ev-font]
1032 . nr doc-curr-font \n[.f]
1033 . nr doc-curr-size \n[.s]
1034 . doc-print-recursive
1039 .\" NS doc-have-decl global register (bool)
1040 .\" NS subroutine test (in synopsis only)
1045 .\" NS doc-have-var global register (bool)
1046 .\" NS whether last type is a variable type
1051 .\" NS doc-do-func-decl macro
1052 .\" NS do someting special while in SYNOPSIS
1055 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
1058 .de doc-do-func-decl
1059 . if \n[doc-in-synopsis-count] \{\
1060 . \" if a variable type was the last thing given, want vertical space
1061 . if \n[doc-have-var] \{\
1065 . \" if a subroutine was the last thing given, want vertical space
1066 . if \n[doc-have-func] \{\
1067 . ie \n[doc-have-decl] \
1073 . nr doc-have-decl 1
1076 . nr doc-curr-font \n[.f]
1077 . nr doc-curr-size \n[.s]
1081 .\" NS Fd user macro
1082 .\" NS function declaration -- not callable
1084 .\" NS this function causes a break
1086 .\" NS width register `Fd' set in doc-common
1089 . ie \n[doc-arg-limit] \
1090 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
1093 . nop \*[doc-Fd-font]\$*
1095 . ft \n[doc-curr-font]
1096 . ps \n[doc-curr-size]
1101 .\" NS In user macro
1102 .\" NS #include statement - not callable (& no err check)
1104 .\" NS this function causes a break; it uses the `Fd' font
1106 .\" NS width register `In' set in doc-common
1109 . ie \n[doc-arg-limit] \
1110 . tm Usage: .In #include_statement -- In is not callable (#\n[.c])
1113 . nop \*[doc-Fd-font]#include <\$1>
1115 . ft \n[doc-curr-font]
1116 . ps \n[doc-curr-size]
1121 .\" NS Fr user macro
1122 .\" NS function return value
1124 .\" NS this function uses the `Ar' font
1127 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1128 .\" NS doc-curr-size
1130 .\" NS width register `Fr' set in doc-common
1133 . if !\n[doc-arg-limit] \{\
1135 . ds doc-macro-name Fr
1136 . doc-parse-args \$@
1139 . tm Usage: .Fr Function_return_value... \*[doc-punct-chars] (#\n[.c])
1143 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1144 . as doc-out-string \*[doc-Ar-font]
1145 . nr doc-curr-font \n[.f]
1146 . nr doc-curr-size \n[.s]
1147 . doc-print-recursive
1152 .\" NS Ic user macro
1153 .\" NS interactive command
1156 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1157 .\" NS doc-curr-size
1159 .\" NS width register `Ic' set in doc-common
1162 . if !\n[doc-arg-limit] \{\
1164 . ds doc-macro-name Ic
1165 . doc-parse-args \$@
1168 . tm Usage: .Ic Interactive command ... \*[doc-punct-chars] (#\n[.c])
1172 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1173 . as doc-out-string \*[doc-Ic-font]
1174 . nr doc-curr-font \n[.f]
1175 . nr doc-curr-size \n[.s]
1176 . doc-print-recursive
1181 .\" NS Li user macro
1185 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1186 .\" NS doc-curr-size
1188 .\" NS width register `Li' set in doc-common
1191 . if !\n[doc-arg-limit] \{\
1193 . ds doc-macro-name Li
1194 . doc-parse-args \$@
1197 . tm Usage: .Li argument ... \*[doc-punct-chars] (#\n[.c])
1201 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1202 . as doc-out-string \*[doc-Li-font]
1203 . nr doc-curr-font \n[.f]
1204 . nr doc-curr-size \n[.s]
1205 . doc-print-recursive
1210 .\" NS Or user macro
1211 .\" NS pipe symbol (OR)
1214 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1215 .\" NS doc-curr-size
1217 .\" NS width register `Or' set in doc-common
1219 .\" XXX: What is this function good for? It sets a font but does not print
1220 .\" a pipe symbol. And it isn't documented.
1223 . if !\n[doc-arg-limit] \{\
1225 . ds doc-macro-name Or
1226 . doc-parse-args \$@
1229 . tm Usage: .Or ... \*[doc-punct-chars] (#\n[.c])
1233 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1234 . as doc-out-string \*[doc-Ic-font]
1235 . nr doc-curr-font \n[.f]
1236 . nr doc-curr-size \n[.s]
1237 . doc-print-recursive
1242 .\" NS Ms user macro
1245 .\" NS this function uses the `Sy' font
1248 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1249 .\" NS doc-curr-size
1251 .\" NS width register `Ms' set in doc-common
1254 . if !\n[doc-arg-limit] \{\
1256 . ds doc-macro-name Ms
1257 . doc-parse-args \$@
1260 . tm Usage: .Ms Math symbol ... \*[doc-punct-chars] (#\n[.c])
1264 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1265 . as doc-out-string \*[doc-Sy-font]
1266 . nr doc-curr-font \n[.f]
1267 . nr doc-curr-size \n[.s]
1268 . doc-print-recursive
1273 .\" NS doc-command-name global string
1274 .\" NS save first invocation of .Nm
1276 .ds doc-command-name
1279 .\" NS Nm user macro
1280 .\" NS name of command or page topic
1283 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1284 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
1285 .\" NS doc-command-name
1287 .\" NS local variables:
1290 .\" NS width register `Nm' set in doc-common
1293 . if !\n[doc-arg-limit] \{\
1295 . ds doc-macro-name Nm
1297 . \" handle empty first parameter
1299 . ds doc-str-Nm "\*[doc-command-name]
1301 . ds doc-str-Nm "\$1
1303 . doc-parse-args "\*[doc-str-Nm]" \$@
1306 . ie "\*[doc-command-name]"" \
1307 . tm Usage: .Nm Name ... \*[doc-punct-chars] (#\n[.c])
1309 . nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
1312 . if \n[doc-arg-limit] \{\
1314 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1316 . as doc-out-string \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
1317 . doc-print-and-reset
1320 . as doc-out-string \*[doc-Nm-font]
1321 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \{\
1322 . as doc-out-string \&\*[doc-command-name]\f[P]\s[0]
1323 . \*[doc-arg\n[doc-arg-ptr]]
1326 . nr doc-curr-font \n[.f]
1327 . nr doc-curr-size \n[.s]
1329 . \" handle `.Nm ...' in SYNOPSIS
1330 . if \n[doc-in-synopsis-count] \{\
1331 . if "\*[doc-macro-name]"Nm" \{\
1333 . in -\n[doc-indent-synopsis]u
1334 . ie (\n[doc-in-synopsis-count] > 1) \
1337 . if !\n[doc-indent-synopsis] \{\
1339 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1341 . in +\n[doc-indent-synopsis]u
1342 . ti -\n[doc-indent-synopsis]u
1343 . nr doc-in-synopsis-count +1
1345 . if "\*[doc-command-name]"" \
1346 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1347 . doc-print-recursive
1352 .\" NS Pa user macro
1353 .\" NS pathname: `.Pa [arg ...]'
1356 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1357 .\" NS doc-curr-size
1359 .\" NS width register `Pa' set in doc-common
1362 . if !\n[doc-arg-limit] \{\
1364 . ds doc-macro-name Pa
1365 . doc-parse-args \$@
1369 . nop \*[doc-Pa-font]~\f[P]\s[0]
1373 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1374 . as doc-out-string \*[doc-Pa-font]
1375 . nr doc-curr-font \n[.f]
1376 . nr doc-curr-size \n[.s]
1377 . doc-print-recursive
1382 .\" NS Sy user macro
1386 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1387 .\" NS doc-curr-size
1389 .\" NS width register `Sy' set in doc-common
1392 . if !\n[doc-arg-limit] \{\
1394 . ds doc-macro-name Sy
1395 . doc-parse-args \$@
1398 . tm Usage: .Sy symbolic_text ... \*[doc-punct-chars] (#\n[.c])
1402 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1403 . as doc-out-string \*[doc-Sy-font]
1404 . nr doc-curr-font \n[.f]
1405 . nr doc-curr-size \n[.s]
1406 . doc-print-recursive
1411 .\" NS Me user macro
1415 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1416 .\" NS doc-curr-size
1418 .\" NS width register `Me' set in doc-common
1421 . if !\n[doc-arg-limit] \{\
1423 . ds doc-macro-name Me
1424 . doc-parse-args \$@
1427 . tm Usage: .Me menu_entry ... \*[doc-punct-chars] (#\n[.c])
1431 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1432 . as doc-out-string \*[doc-Me-font]
1433 . nr doc-curr-font \n[.f]
1434 . nr doc-curr-size \n[.s]
1435 . doc-print-recursive
1440 .\" NS Tn user macro
1444 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1445 .\" NS doc-curr-size
1447 .\" NS width register `Tn' set in doc-common
1450 . if !\n[doc-arg-limit] \{\
1452 . ds doc-macro-name Tn
1453 . doc-parse-args \$@
1456 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1460 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1461 . as doc-out-string \&\*[doc-Tn-font-shape]\*[doc-Tn-font-size]
1462 . nr doc-curr-font \n[.f]
1463 . nr doc-curr-size \n[.s]
1464 . doc-print-recursive
1469 .\" NS doc-reference-trademark macro
1470 .\" NS .Tn for inside of references
1473 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1474 .\" NS doc-curr-size
1476 .\" NS the code for references below checks for `Tn'!
1478 .de doc-reference-trademark
1479 . if !\n[doc-arg-limit] \{\
1481 . ds doc-macro-name Tn
1482 . doc-parse-args \$@
1485 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1489 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1490 . as doc-out-string \&\*[doc-Tn-font-size]
1491 . nr doc-curr-font \n[.f]
1492 . nr doc-curr-size \n[.s]
1498 .\" NS Va user macro
1499 .\" NS variable name
1502 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1503 .\" NS doc-curr-size
1505 .\" NS width register `Va' set in doc-common
1508 . if !\n[doc-arg-limit] \{\
1510 . ds doc-macro-name Va
1511 . doc-parse-args \$@
1514 . tm Usage: .Va variable_name ... \*[doc-punct-chars] (#\n[.c])
1518 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1519 . as doc-out-string \*[doc-Va-font]
1520 . nr doc-curr-font \n[.f]
1521 . nr doc-curr-size \n[.s]
1522 . doc-print-recursive
1527 .\" NS No user macro
1528 .\" NS normal text macro (default text style if mess up)
1531 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1532 .\" NS doc-curr-size
1534 .\" NS width register `No' set in doc-common
1537 . as doc-out-string \*[doc-No-font]
1539 . if !\n[doc-arg-limit] \{\
1541 . ds doc-macro-name No
1542 . doc-parse-args \$@
1545 . tm Usage: .No normal_text ... \*[doc_punct_chars] (#\n[.c])
1549 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1550 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
1551 . \*[doc-arg\n[doc-arg-ptr]]
1553 . nr doc-curr-font \n[.f]
1554 . nr doc-curr-size \n[.s]
1555 . doc-print-recursive
1560 .\" NS doc-quote-left global string
1561 .\" NS left quotation character for `doc-enclose-string' and
1562 .\" NS `doc-enclose-open'
1567 .\" NS doc-quote-right global string
1568 .\" NS right quotation character for `doc-enclose-string' and
1569 .\" NS `doc-enclose-close'
1574 .\" NS Op user macro
1575 .\" NS option expression (i.e., enclose string in square brackets)
1578 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1580 .\" NS width register `Op' set in doc-common
1583 . if !\n[doc-arg-limit] \
1584 . ds doc-macro-name Op
1586 . ds doc-quote-left "\*[doc-left-bracket]
1587 . ds doc-quote-right "\*[doc-right-bracket]
1589 . doc-enclose-string \$@
1593 .\" NS Aq user macro
1594 .\" NS enclose string in angle brackets
1597 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1599 .\" NS width register `Aq' set in doc-common
1602 . if !\n[doc-arg-limit] \
1603 . ds doc-macro-name Aq
1605 . ds doc-quote-left <
1606 . ds doc-quote-right >
1608 . doc-enclose-string \$@
1612 .\" NS Bq user macro
1613 .\" NS enclose string in square brackets
1616 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1618 .\" NS width register `Bq' set in doc-common
1621 . if !\n[doc-arg-limit] \
1622 . ds doc-macro-name Bq
1624 . ds doc-quote-left "\*[doc-left-bracket]
1625 . ds doc-quote-right "\*[doc-right-bracket]
1627 . doc-enclose-string \$@
1631 .\" NS Dq user macro
1632 .\" NS enclose string in double quotes
1635 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1637 .\" NS width register `Dq' set in doc-common
1640 . if !\n[doc-arg-limit] \
1641 . ds doc-macro-name Dq
1643 . ds doc-quote-left "\*[Lq]
1644 . ds doc-quote-right "\*[Rq]
1646 . doc-enclose-string \$@
1650 .\" NS Eq user macro
1651 .\" NS enclose string in user-defined quotes (args 1 and 2)
1654 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1656 .\" NS width register `Eq' set in doc-common
1659 . if !\n[doc-arg-limit] \
1660 . ds doc-macro-name Eq
1662 . ds doc-quote-left "\$1
1663 . ds doc-quote-right "\$2
1666 . doc-enclose-string \$@
1670 .\" NS Pq user macro
1671 .\" NS enclose string in parentheses
1674 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1676 .\" NS width register `Pq' set in doc-common
1679 . if !\n[doc-arg-limit] \
1680 . ds doc-macro-name Pq
1682 . ds doc-quote-left "\*[doc-left-parenthesis]
1683 . ds doc-quote-right "\*[doc-right-parenthesis]
1685 . doc-enclose-string \$@
1689 .\" NS Ql user macro
1690 .\" NS quoted literal
1692 .\" is in file doc-[dit|n]roff
1695 .\" NS Qq user macro
1696 .\" NS enclose string in straight double quotes
1699 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1701 .\" NS width register `Qq' set in doc-common
1704 . if !\n[doc-arg-limit] \
1705 . ds doc-macro-name Qq
1707 . ds doc-quote-left "\*[q]
1708 . ds doc-quote-right "\*[q]
1710 . doc-enclose-string \$@
1714 .\" NS Sq user macro
1715 .\" NS enclose string in single quotes
1718 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1720 .\" NS width register `Sq' set in doc-common
1723 . if !\n[doc-arg-limit] \
1724 . ds doc-macro-name Sq
1726 . ds doc-quote-left "\*[doc-left-singlequote]
1727 . ds doc-quote-right "\*[doc-right-singlequote]
1729 . doc-enclose-string \$@
1733 .\" NS doc-enclose-string macro
1734 .\" NS enclose string with given args (e.g. [ and ])
1737 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string
1739 .\" NS local variables:
1740 .\" NS doc-register-des (for communication with doc-skip-punct-backwards)
1743 .\" NS doc-quote-left, doc-quote-right
1745 .de doc-enclose-string
1746 . ie \n[doc-arg-limit] \
1747 . as doc-out-string \&\*[doc-quote-left]
1750 . doc-parse-args \$@
1751 . as doc-out-string \&\*[doc-quote-left]
1755 . as doc-out-string \&\*[doc-quote-left]\*[doc-quote-right]
1756 . doc-print-out-string
1759 . if \n[doc-arg-limit] \{\
1761 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1763 . as doc-out-string \&\*[doc-quote-right]
1764 . doc-print-and-reset
1767 . ie "\*[doc-type\n[doc-arg-limit]]"punct-suffix" \{\
1768 . nr doc-register-des (\n[doc-arg-limit] - 1)
1769 . doc-skip-punct-backwards
1770 . nr doc-register-des +1
1771 . ds doc-arg\n[doc-register-des] "\*[doc-quote-right]\&\*[doc-arg\n[doc-register-des]]
1772 . nr doc-register-des 0
1775 . doc-append-arg "\*[doc-quote-right]" punct-suffix
1777 . doc-do-\*[doc-type\n[doc-arg-ptr]]
1782 .\" NS doc-skip-punct-backwards macro
1783 .\" NS vector routine (for `doc-enclose-string': trace backwards past
1784 .\" NS trailing punctuation)
1786 .de doc-skip-punct-backwards
1787 . if "\*[doc-type\n[doc-register-des]]"punct-suffix" \{\
1788 . nr doc-register-des -1
1789 . doc-skip-punct-backwards
1794 .\" NS Ao user macro
1798 .\" NS doc-macro-name, doc-quote-left
1800 .\" NS width register `Ao' set in doc-common
1803 . if !\n[doc-arg-limit] \
1804 . ds doc-macro-name Ao
1806 . ds doc-quote-left <
1808 . doc-enclose-open \$@
1812 .\" NS Ac user macro
1816 .\" NS doc-macro-name, doc-quote-right
1818 .\" NS width register `Ac' set in doc-common
1821 . if !\n[doc-arg-limit] \
1822 . ds doc-macro-name Ac
1824 . ds doc-quote-right >
1826 . doc-enclose-close \$@
1830 .\" NS Bo user macro
1834 .\" NS doc-macro-name, doc-quote-left
1836 .\" NS width register `Bo' set in doc-common
1839 . if !\n[doc-arg-limit] \
1840 . ds doc-macro-name Bo
1842 . ds doc-quote-left [
1844 . doc-enclose-open \$@
1848 .\" NS Bc user macro
1849 .\" NS bracket close
1852 .\" NS doc-macro-name, doc-quote-right
1854 .\" NS width register `Bc' set in doc-common
1857 . if !\n[doc-arg-limit] \
1858 . ds doc-macro-name Bc
1860 . ds doc-quote-right ]
1862 . doc-enclose-close \$@
1866 .\" NS Do user macro
1867 .\" NS double quote open
1870 .\" NS doc-macro-name, doc-quote-left
1872 .\" NS width register `Do' set in doc-common
1875 . if !\n[doc-arg-limit] \
1876 . ds doc-macro-name Do
1878 . ds doc-quote-left "\*[Lq]
1880 . doc-enclose-open \$@
1884 .\" NS Dc user macro
1885 .\" NS double quote close
1888 .\" NS doc-macro-name, doc-quote-right
1890 .\" NS width register `Dc' set in doc-common
1893 . if !\n[doc-arg-limit] \
1894 . ds doc-macro-name Dc
1896 . ds doc-quote-right "\*[Rq]
1898 . doc-enclose-close \$@
1902 .\" NS Eo user macro
1903 .\" NS enclose open (using first argument as beginning of enclosure)
1906 .\" NS doc-macro-name, doc-quote-left
1908 .\" NS width register `Eo' set in doc-common
1911 . if !\n[doc-arg-limit] \
1912 . ds doc-macro-name Eo
1914 . ds doc-quote-left "\$1
1917 . doc-enclose-open \$@
1921 .\" NS Ec user macro
1922 .\" NS enclose close (using first argument as end of enclosure)
1925 .\" NS doc-macro-name, doc-quote-right
1927 .\" NS width register `Ec' set in doc-common
1930 . if !\n[doc-arg-limit] \
1931 . ds doc-macro-name Ec
1933 . ds doc-quote-right "\$1
1936 . doc-enclose-close \$@
1940 .\" NS Oo user macro
1944 .\" NS doc-macro-name, doc-quote-left
1946 .\" NS width register `Oo' set in doc-common
1949 . if !\n[doc-arg-limit] \
1950 . ds doc-macro-name Oo
1952 . ds doc-quote-left [
1954 . doc-enclose-open \$@
1958 .\" NS Oc user macro
1962 .\" NS doc-macro-name, doc-quote-right
1964 .\" NS width register `Oc' set in doc-common
1967 . if !\n[doc-arg-limit] \
1968 . ds doc-macro-name Oc
1970 . ds doc-quote-right ]
1972 . doc-enclose-close \$@
1976 .\" NS Po user macro
1977 .\" NS parenthesis open
1980 .\" NS doc-macro-name, doc-quote-left
1982 .\" NS width register `Po' set in doc-common
1985 . if !\n[doc-arg-limit] \
1986 . ds doc-macro-name Po
1988 . ds doc-quote-left (
1990 . doc-enclose-open \$@
1994 .\" NS Pc user macro
1995 .\" NS parenthesis close
1998 .\" NS doc-macro-name, doc-quote-right
2000 .\" NS width register `Pc' set in doc-common
2003 . if !\n[doc-arg-limit] \
2004 . ds doc-macro-name Pc
2006 . ds doc-quote-right )
2008 . doc-enclose-close \$@
2012 .\" NS Qo user macro
2013 .\" NS straight double quote open
2016 .\" NS doc-macro-name, doc-quote-left
2018 .\" NS width register `Qo' set in doc-common
2021 . if !\n[doc-arg-limit] \
2022 . ds doc-macro-name Qo
2024 . ds doc-quote-left "\*[q]
2026 . doc-enclose-open \$@
2030 .\" NS Qc user macro
2031 .\" NS straight double quote close
2034 .\" NS doc-macro-name, doc-quote-right
2036 .\" NS width register `Qc' set in doc-common
2039 . if !\n[doc-arg-limit] \
2040 . ds doc-macro-name Qc
2042 . ds doc-quote-right "\*[q]
2044 . doc-enclose-close \$@
2048 .\" NS So user macro
2049 .\" NS single quote open
2052 .\" NS doc-macro-name, doc-quote-left
2054 .\" NS width register `So' set in doc-common
2057 . if !\n[doc-arg-limit] \
2058 . ds doc-macro-name So
2060 . ds doc-quote-left "\*[doc-left-singlequote]
2062 . doc-enclose-open \$@
2066 .\" NS Sc user macro
2067 .\" NS single quote close
2070 .\" NS doc-macro-name, doc-quote-right
2072 .\" NS width register `Sc' set in doc-common
2075 . if !\n[doc-arg-limit] \
2076 . ds doc-macro-name Sc
2078 . ds doc-quote-right "\*[doc-right-singlequote]
2080 . doc-enclose-close \$@
2084 .\" NS Xo user macro
2088 .\" NS doc-macro-name, doc-quote-left
2090 .\" NS width register `Xo' set in doc-common
2093 . if !\n[doc-arg-limit] \
2094 . ds doc-macro-name Xo
2098 . doc-enclose-open \$@
2102 .\" NS Xc user macro
2106 .\" NS doc-macro-name, doc-quote-right
2108 .\" NS width register `Xc' set in doc-common
2111 . if !\n[doc-arg-limit] \
2112 . ds doc-macro-name Xc
2114 . ds doc-quote-right
2116 . doc-enclose-close \$@
2120 .\" NS doc-nesting-level global register
2121 .\" NS (extension possible)
2123 .nr doc-nesting-level 0
2126 .\" NS doc-enclose-open macro
2127 .\" NS enclose string open
2130 .\" NS doc-arg-ptr, doc-out-string, doc-nesting-level,
2131 .\" NS doc-saved-list-immediate
2133 .de doc-enclose-open
2134 . nr doc-nesting-level +1
2136 . ie \n[doc-arg-limit] \
2137 . as doc-out-string \&\*[doc-quote-left]
2140 . doc-parse-args \$@
2141 . as doc-out-string \&\*[doc-quote-left]
2144 . as doc-out-string \&\*[doc-quote-left]
2146 . if !\n[doc-in-diversion] \
2147 . if \n[doc-space-mode] \
2148 . doc-save-and-divert
2151 . ie \n[doc-arg-limit] \{\
2152 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2154 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
2155 . \*[doc-arg\n[doc-arg-ptr]]
2161 . if (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2162 . if \n[doc-list-immediate] \{\
2163 . \" .tm SETTING doc-saved-list-immediate!
2164 . nr doc-saved-list-immediate 1
2169 . if (\n[doc-nesting-level] > 1) \
2170 . as doc-out-string "\*[doc-space]
2175 .\" NS doc-saved-list-type global string
2176 .\" NS saved list type
2178 .ds doc-saved-list-type
2181 .\" NS doc-enclose-close macro
2182 .\" NS enclose string close
2185 .\" NS doc-out-string, doc-nesting-level, doc-saved-list-immediate,
2186 .\" NS doc-saved-list-type
2188 .\" NS local variables:
2191 .de doc-enclose-close
2192 . nr doc-nesting-level -1
2194 . as doc-out-string \&\*[doc-quote-right]
2196 . if !\n[doc-arg-limit] \{\
2198 . doc-parse-args \$@
2200 . doc-print-out-string
2201 . if !"\*[doc-saved-list-type]"" \{\
2202 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
2203 . nr doc-saved-list-immediate 0
2204 . ds doc-saved-list-type
2207 . if \n[doc-arg-limit] \{\
2208 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2209 . ie \n[doc-nesting-level] \
2212 . doc-print-and-reset
2215 . nr doc-str-dec (\n[doc-arg-ptr] + 1)
2216 . if "\*[doc-type\n[doc-str-dec]]"string" \
2217 . as doc-out-string "\*[doc-space\n[doc-arg-limit]]
2219 . if \n[doc-list-immediate] \{\
2220 . \" .tm UNSETTING doc-saved-list-immediate==\n[doc-saved-list-immediate]!
2221 . if \n[doc-saved-list-immediate] \
2222 . nr doc-saved-list-immediate 0
2229 .\" NS Pf user macro
2230 .\" NS prefix: `.Pf prefix arg ...'
2233 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-quote-left
2235 .\" NS width register `Pf' set in doc-common
2238 . if !\n[doc-arg-limit] \
2239 . ds doc-macro-name Pf
2241 . ds doc-quote-left "\$1
2245 . ie \n[doc-arg-limit] \{\
2246 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2248 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2251 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2254 . as doc-out-string \&\*[doc-quote-left]
2255 . ie (\n[.$] < 2) \{\
2256 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2257 . doc-print-out-string
2260 . doc-parse-args \$@
2263 . if \n[doc-arg-limit] \{\
2265 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2266 . doc-print-and-reset
2268 . doc-do-\*[doc-type\n[doc-arg-ptr]]
2273 .\" NS Ns user macro
2274 .\" NS remove space (space removal done by `doc-parse-args')
2277 .\" NS doc-macro-name
2279 .\" NS width register `Ns' set in doc-common
2282 . if !\n[doc-arg-limit] \{\
2283 . ds doc-macro-name Ns
2285 . doc-parse-args \$@
2287 . tm Usage: .Ns must be called with arguments (#\n[.c])
2294 .\" NS Ap user macro
2295 .\" NS append an apostrophe
2298 .\" NS doc-out-string
2300 .\" NS width register `Ap' set in doc-common
2303 . if !\n[doc-arg-limit] \
2304 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2306 . as doc-out-string \&'
2311 .\" NS doc-space global string
2312 .\" NS current inter-argument space
2314 .ds doc-space "\*[doc-soft-space]
2317 .\" NS doc-soft-space constant string
2318 .\" NS soft (stretchable) space (defined in doc-common)
2321 .\" NS doc-hard-space constant string
2322 .\" NS hard (unpaddable) space (defined in doc-common)
2325 .\" NS doc-set-hard-space macro
2326 .\" NS set current space string to hard (unpaddable) space.
2331 .de doc-set-hard-space
2332 . ds doc-space "\*[doc-hard-space]
2336 .\" NS doc-set-soft-space macro
2337 .\" NS set current space string to soft space (troff limitation)
2342 .de doc-set-soft-space
2343 . ds doc-space "\*[doc-soft-space]
2347 .\" NS doc-space-mode global register (bool)
2348 .\" NS default is one (space mode on)
2350 .nr doc-space-mode 1
2353 .\" NS Sm user macro
2354 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2356 .\" NS without argument, toggle space mode
2359 .\" NS doc-macro-name, doc-arg-limit, doc-num-args, doc-arg-ptr,
2360 .\" NS doc-argXXX, doc-spaceXXX, doc-curr-space, doc-space-mode,
2363 .\" NS width register `Sm' set in doc-common
2365 .\" NS local variables:
2369 . if !\n[doc-arg-limit] \{\
2371 . ds doc-macro-name Sm
2372 . doc-parse-args \$@
2375 . ie \n[doc-space-mode] \
2376 . nr doc-space-mode 0
2378 . nr doc-space-mode 1
2381 . if \n[doc-arg-limit] \{\
2384 . \" avoid a warning message in case `Sm' is the last parameter
2385 . if !d doc-arg\n[doc-arg-ptr] \
2386 . ds doc-arg\n[doc-arg-ptr]
2388 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2389 . ds doc-space "\*[doc-soft-space]
2390 . nr doc-space-mode 1
2393 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2396 . nr doc-space-mode 0
2399 . \" no argument for Sm
2401 . ie \n[doc-space-mode] \
2402 . nr doc-space-mode 0
2404 . nr doc-space-mode 1
2407 . ie \n[doc-space-mode] \{\
2408 . \" recompute space vector for remaining arguments
2409 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2410 . nr doc-arg-limit \n[doc-arg-ptr]
2411 . nr doc-reg-Sm \n[doc-arg-ptr]
2412 . if \n[doc-num-args] \{\
2413 . doc-parse-arg-vector
2414 . nr doc-arg-ptr \n[doc-reg-Sm]
2417 . \" reset remaining space vector elements
2418 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2419 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2420 . ds doc-space\n[doc-reg-Sm]
2422 . \" the body of a `while' request must end with the fitting `\}'!
2426 . \" do we have parameters to print?
2427 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2428 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2429 . ie (\n[doc-arg-ptr] > 1) \
2430 . doc-print-and-reset
2435 . \" skip `Sm' argument
2437 . doc-print-recursive
2442 .\" NS doc-arg-type immediate string
2443 .\" NS argument type
2448 .\" NS doc-get-arg-type macro
2449 .\" NS get argument type (`macro', `string', `punct-suffix', or
2450 .\" NS `punct-prefix')
2452 .\" NS this macro expects the width of the argument in `doc-width'
2457 .de doc-get-arg-type
2458 . ds doc-arg-type string
2460 . if ((\n[doc-width] < 3) & \A
\a\$1
\a) \{\
2461 . ie (\n[doc-width] == 1) \{\
2462 . if d doc-punct\$1 \
2463 . ds doc-arg-type \*[doc-punct\$1]
2468 . ds doc-arg-type macro
2473 .\" NS doc-get-arg-type* macro
2474 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2476 .\" NS this macro sets the `doc-width' register using the `length' request
2477 .\" NS to get the number of characters in a string literally
2480 .\" NS doc-arg-type, doc-width
2482 .de doc-get-arg-type*
2483 . ds doc-arg-type string
2484 . length doc-width "\*[doc-arg\$1]
2486 . if ((\n[doc-width] < 3) & \A
\a\*[doc-arg\$1]
\a) \{\
2487 . ie (\n[doc-width] == 1) \{\
2488 . if d doc-punct\*[doc-arg\$1] \
2489 . ds doc-arg-type \*[doc-punct\*[doc-arg\$1]]
2492 . if r \*[doc-arg\$1] \
2493 . if \n[\*[doc-arg\$1]] \
2494 . ds doc-arg-type macro
2499 .\" NS doc-set-spacing-for-macro macro
2500 .\" NS set spacing for macros
2505 .\" NS local variables:
2506 .\" NS doc-reg-dssfm, doc-reg-dssfm1
2508 .de doc-set-spacing-for-macro
2509 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2511 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2513 . ie (\n[doc-reg-dssfm1] == 3) \{\
2514 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2515 . ds doc-space\n[doc-reg-dssfm]
2516 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2519 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2521 . ie (\n[doc-reg-dssfm1] == 2) \{\
2522 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2523 . ds doc-space\n[doc-reg-dssfm]
2524 . ds doc-space\n[doc-arg-limit]
2527 . ds doc-space\n[doc-arg-limit]
2532 .\" NS doc-set-spacing-for-string macro
2533 .\" NS set spacing for strings
2538 .de doc-set-spacing-for-string
2539 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2543 .\" NS doc-set-spacing-for-punct-suffix macro
2544 .\" NS set spacing for punctuation suffixes
2549 .\" NS local variables:
2550 .\" NS doc-reg-dssfps
2552 .de doc-set-spacing-for-punct-suffix
2553 . if \n[doc-arg-limit] \{\
2554 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2555 . ds doc-space\n[doc-reg-dssfps]
2558 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2562 .\" NS doc-set-spacing-for-punct-prefix macro
2563 .\" NS set spacing for punctuation prefixes
2568 .de doc-set-spacing-for-punct-prefix
2569 . ds doc-space\n[doc-arg-limit]
2573 .\" type switches (on current argument doc-arg-ptr)
2576 .\" NS doc-do-macro macro
2577 .\" NS call request if macro
2580 . \*[doc-arg\n[doc-arg-ptr]]
2584 .\" NS doc-do-string macro
2585 .\" NS call .No if string
2596 .\" NS doc-do-punct-suffix macro
2597 .\" NS call .No if punctuation suffix
2602 .de doc-do-punct-suffix
2608 .\" NS doc-do-punct-prefix macro
2609 .\" NS call .No if punctuation prefix
2614 .de doc-do-punct-prefix
2620 .\" NS doc-do-xref-macro macro
2621 .\" NS ignore if macro
2623 .de doc-do-xref-macro
2627 .\" NS doc-do-xref-string macro
2628 .\" NS ignore if string
2630 .de doc-do-xref-string
2634 .\" NS doc-do-xref-punct-suffix macro
2635 .\" NS append if punctuation suffix
2638 .\" NS doc-arg-ptr, doc-out-string
2640 .de doc-do-xref-punct-suffix
2641 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2648 .\" NS doc-do-xref-punct-prefix macro
2649 .\" NS append if punctuation prefix
2652 .\" NS doc-arg-ptr, doc-out-string
2654 .de doc-do-xref-punct-prefix
2655 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2662 .\" NS doc-curr-font-for-Ef global register
2663 .\" NS saved current font from `Bf' request
2665 .nr doc-curr-font-for-Ef 0
2668 .\" NS doc-curr-size-for-Ef global register
2669 .\" NS saved current size from `Bf' request
2671 .nr doc-curr-size-for-Ef 0
2674 .\" NS Bf user macro
2675 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2678 .\" NS doc-macro-name, doc-curr-font-for-Ef, doc-curr-size-for-Ef
2680 .\" NS width register `Bf' set in doc-common
2683 . ds doc-macro-name Bf
2686 . nr doc-curr-font-for-Ef \n[.f]
2687 . nr doc-curr-size-for-Ef \n[.s]
2690 . nop \*[doc-Em-font]\c
2691 . el \{ .ie "\$1"Li" \
2692 . nop \*[doc-Li-font]\c
2693 . el \{ .ie "\$1"Sy" \
2694 . nop \*[doc-Sy-font]\c
2695 . el \{ .ie "\$1"-emphasis" \
2696 . nop \*[doc-Em-font]\c
2697 . el \{ .ie "\$1"-literal" \
2698 . nop \*[doc-Li-font]\c
2699 . el \{ .ie "\$1"-symbolic" \
2700 . nop \*[doc-Sy-font]\c
2702 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2706 . tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2710 .\" NS Ef user macro
2711 .\" NS end font mode
2714 .\" NS doc-macro-name
2716 .\" NS width register `Ef' set in doc-common
2719 . ds doc-macro-name Ef
2722 . tm Usage .Ef (does not take arguments) (#\n[.c])
2724 . nop \&\f[\n[doc-curr-font-for-Ef]]\s[\n[doc-curr-size-for-Ef]]
2728 .\" NS doc-keep-type global string
2729 .\" NS current keep type
2734 .\" NS Bk user macro
2738 .\" NS doc-macro-name, doc-keep-type
2740 .\" NS width register `Bk' set in doc-common
2745 . ds doc-macro-name Bk
2748 . if !"\*[doc-keep-type]"" \
2749 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2751 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2754 . doc-set-hard-space
2756 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2759 . ds doc-keep-type \$1
2762 . tm Usage: .Bk [-lines | -words] (#\n[.c])
2766 .\" NS Ek user macro
2770 .\" NS doc-macro-name
2772 .\" NS width register `Ek' set in doc-common
2775 . ds doc-macro-name Ek
2778 . tm Usage .Ek (does not take arguments) (#\n[.c])
2780 . ie "\*[doc-keep-type]"-words" \
2781 . doc-set-soft-space
2783 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2788 .\" NS doc-display-depth global register
2789 .\" NS display level
2791 .nr doc-display-depth 0
2794 .\" NS doc-is-compact global register (bool)
2795 .\" NS set if the `compact' keyword is given
2797 .nr doc-is-compact 0
2800 .\" NS doc-display-type-stackXXX global string
2801 .\" NS the display type stack
2803 .\" NS limit: doc-display-depth
2805 .ds doc-display-type-stack0
2808 .\" NS doc-display-indent-stackXXX global register
2809 .\" NS stack of display indentation values
2811 .\" NS limit: doc-display-depth
2813 .nr doc-display-indent-stack0 0
2816 .\" NS Bd user macro
2817 .\" NS begin display
2819 .\" NS width register `Bd' set in doc-common
2822 .\" NS doc-macro-name, doc-curr-font, doc-curr-size, doc-display-depth,
2823 .\" NS doc-is-compact, doc-display-type-stackXXX,
2824 .\" NS doc-display-indent-stackXXX
2826 .\" NS local variables:
2830 . ds doc-macro-name Bd
2833 . nr doc-is-compact 0
2835 . nr doc-display-depth +1
2837 . ie "\$1"-literal" \{\
2838 . ds doc-display-type-stack\n[doc-display-depth] literal
2839 . nr doc-curr-font \n[.f]
2840 . nr doc-curr-size \n[.s]
2843 . nop \*[doc-Li-font]\c
2850 . el \{ .ie "\$1"-filled" \{\
2851 . ds doc-display-type-stack\n[doc-display-depth] filled
2854 . el \{ .ie "\$1"-ragged" \{\
2855 . ds doc-display-type-stack\n[doc-display-depth] ragged
2858 . el \{ .ie "\$1"-unfilled" \{\
2859 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2863 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2867 . \" have we seen an argument?
2868 . if \n[doc-reg-Bd] \{\
2870 . \" check other arguments
2872 . doc-do-Bd-args \$@
2875 . \" avoid warning about non-existent register
2876 . if !r doc-display-indent-stack\n[doc-display-depth] \
2877 . nr doc-display-indent-stack\n[doc-display-depth] 0
2879 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2880 ' in (\n[.i]u + \n[doc-display-indent-stack\n[doc-display-depth]]u)
2882 . if !\n[doc-is-compact] \{\
2883 . if !\n[doc-in-synopsis-count] \{\
2884 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2885 . sp \n[doc-display-vertical]u
2887 ' sp \n[doc-display-vertical]u
2893 . nr doc-is-compact 0
2896 . tm1 "Usage: .Bd [-literal | -filled | -ragged | -unfilled]
2897 . tm1 " [-offset [string]] [-compact] (#\n[.c])
2902 .\" NS doc-do-Bd-args macro
2903 .\" NS resolve remaining .Bd arguments
2906 .\" NS doc-is-compact, doc-display-indent-stackXXX
2908 .\" NS local variables:
2909 .\" NS doc-str-ddBa, doc-reg-ddBa
2915 . ie "\$1"-offset" \{\
2916 . ds doc-str-ddBa "\$2
2920 . nr doc-display-indent-stack\n[doc-display-depth] 0
2921 . el \{ .ie "\$2"right" \
2922 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2923 . el \{ .ie "\$2"center" \
2924 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2925 . el \{ .ie "\$2"indent" \
2926 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2927 . el \{ .ie "\$2"indent-two" \
2928 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2933 . \" not a known keyword
2934 . if (\n[doc-reg-ddBa] == 1) \{\
2936 . \" test whether argument is a valid numeric expression
2938 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2940 . doc-get-width "\$2"
2941 . ie (\n[doc-width] == 2) \{\
2942 . \" if the offset parameter is a macro, use the macro's
2943 . \" width as specified in doc-common
2944 . doc-get-arg-type "\$2"
2945 . ie "\*[doc-arg-type]"macro" \
2946 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2948 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2951 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2954 . el \{ .ie "\$1"-compact" \
2955 . nr doc-is-compact 1
2957 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2960 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2961 . \" have we seen `-offset' or `-compact'?
2962 . ie "\*[doc-str-ddBa]"" \{\
2964 . doc-do-Bd-args \$@
2968 . doc-do-Bd-args \$@
2973 .\" NS Ed user macro
2977 .\" NS doc-macro-name, doc-display-depth, doc-display-type-stackXXX,
2978 .\" NS doc-display-indent-stackXXX
2980 .\" NS width register `Ed' set in doc-common
2983 . ds doc-macro-name Ed
2987 . if !\n[doc-display-depth] \
2988 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2990 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2991 . ft \n[doc-curr-font]
2992 . ps \n[doc-curr-size]
2995 . in (\n[.i]u - \n[doc-display-indent-stack\n[doc-display-depth]]u)
2997 . nr doc-display-indent-stack\n[doc-display-depth] 0
2998 . ds doc-display-type-stack\n[doc-display-depth]
2999 . nr doc-display-depth -1
3007 .\" NS doc-list-type-stackXXX global string
3008 .\" NS stack of list types
3010 .\" NS limit: doc-list-depth
3012 .ds doc-list-type-stack1
3015 .\" NS doc-list-indent-stackXXX global register
3016 .\" NS stack of list indentation values
3018 .\" NS limit: doc-list-depth
3020 .nr doc-list-indent-stack1 0
3023 .\" NS doc-have-indent global register (bool)
3024 .\" NS an indentation value is active
3026 .nr doc-have-indent 0
3029 .\" NS Bl user macro
3032 .\" NS width register `Bl' set in doc-common
3035 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3036 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX, doc-have-indent,
3037 .\" NS doc-have-diag-list, doc-num-columns, doc-list-depth
3039 .\" NS local variables:
3044 . ds doc-macro-name Bl
3045 . nr doc-list-depth +1
3048 . ie "\$1"-hang" \{\
3049 . ds doc-list-type-stack\n[doc-list-depth] hang-list
3050 . nr doc-list-indent-stack\n[doc-list-depth] 6n
3051 . nr doc-have-indent 1
3053 . el \{ .ie "\$1"-tag" \{\
3054 . ds doc-list-type-stack\n[doc-list-depth] tag-list
3055 . nr doc-have-indent 1
3057 . el \{ .ie "\$1"-item" \{\
3058 . ds doc-list-type-stack\n[doc-list-depth] item-list
3059 . nr doc-have-indent 1
3061 . el \{ .ie "\$1"-enum" \{\
3062 . ds doc-list-type-stack\n[doc-list-depth] enum-list
3063 . nr doc-list-indent-stack\n[doc-list-depth] 3n
3064 . nr doc-have-indent 1
3066 . el \{ .ie "\$1"-bullet" \{\
3067 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
3068 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3069 . nr doc-have-indent 1
3071 . el \{ .ie "\$1"-dash" \{\
3072 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3073 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3074 . nr doc-have-indent 1
3076 . el \{ .ie "\$1"-hyphen" \{\
3077 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3078 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3079 . nr doc-have-indent 1
3081 . el \{ .ie "\$1"-inset" \{\
3082 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3083 . nr doc-have-indent 1
3085 . el \{ .ie "\$1"-diag" \{\
3086 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3087 . nr doc-have-diag-list 1
3089 . el \{ .ie "\$1"-ohang" \{\
3090 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3091 . nr doc-have-indent 1
3093 . el \{ .ie "\$1"-column" \
3094 . ds doc-list-type-stack\n[doc-list-depth] column-list
3096 . tm mdoc warning: Unknown list type `\$1' in .Bl request
3099 . \}\}\}\}\}\}\}\}\}\}\}
3101 . \" we have seen a list type
3102 . ie \n[doc-arg-ptr] \{\
3105 . \" fill argument vector
3107 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3108 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3112 . doc-increment-list-stack
3115 . nr doc-arg-limit \n[.$]
3119 . \" initialize column list
3120 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3121 . doc-set-column-tab \n[doc-num-columns]
3122 . nr doc-list-indent-stack\n[doc-list-depth] 0
3123 ' in -\n[doc-column-indent-width]u
3124 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3125 . sp \n[doc-display-vertical]u
3128 . nr doc-num-columns 0
3140 .\" NS doc-Bl-usage macro
3143 . tm1 "Usage: .Bl [-hang | -ohang | -tag | -diag | -inset]
3144 . tm1 " [-width [string]] [-offset [string]] [-compact]
3145 . tm1 " .Bl [-column] [-offset [string]] [string1] [string2] ...
3146 . tm1 " .Bl [-item | -enum | -bullet | -hyphen | -dash]
3147 . tm1 " [-offset [string]] [-compact] (#\n[.c])
3151 .\" NS doc-have-tag-width global macro
3152 .\" NS set if a tag width has been explicitly given
3154 .nr doc-have-tag-width 0
3157 .\" NS doc-do-Bl-args macro
3158 .\" NS resolve remaining .Bl arguments
3161 .\" NS doc-arg-ptr, doc-argXXX, doc-list-indent-stackXXX, doc-num-columns,
3162 .\" NS doc-compact-list-stackXXX, doc-have-tag-width,
3163 .\" NS doc-tag-width-stackXXX, doc-list-offset-stackXXX
3165 .\" NS local variables:
3166 .\" NS doc-str-dBla, doc-reg-dBla
3170 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
3173 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3174 . nr doc-compact-list-stack\n[doc-list-depth] 1
3175 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3177 . \" XXX: this code should be modified to handle nested lists
3179 . nr doc-have-tag-width 1
3180 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3181 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3183 . \" test whether argument is a valid numeric expression
3184 . ie \B
\a\*[doc-str-dBla]
\a \
3185 . nr doc-list-indent-stack\n[doc-list-depth] \*[doc-str-dBla]
3187 . doc-get-arg-width \n[doc-arg-ptr]
3188 . ie (\n[doc-width] == 2) \{\
3189 . \" if the width parameter is a macro, use the macro's
3190 . \" width as specified in doc-common
3191 . doc-get-arg-type \*[doc-str-dBla]
3192 . ie "\*[doc-arg-type]"macro" \
3193 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3195 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3198 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3200 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3202 . \" XXX: this code should be modified to handle nested lists
3204 . nr doc-have-tag-width 1
3205 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3207 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3208 . substring doc-str-dBla 1 2
3209 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3210 . doc-save-global-vars
3211 . nr doc-in-diversion 0
3212 . nr doc-nesting-level 0
3214 . doc-dry-execute "\*[doc-arg\n[doc-arg-ptr]]"
3215 . \" save doc-out-string
3216 . ds doc-str-dBla "\*[doc-out-string]
3217 . doc-restore-global-vars
3218 . doc-get-width "\*[doc-str-dBla]"
3220 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3222 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3225 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3226 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3228 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3230 . ie \B
\a\*[doc-str-dBla]
\a \
3231 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3233 . doc-get-arg-width \n[doc-arg-ptr]
3234 . ie (\n[doc-width] == 2) \{\
3235 . doc-get-arg-type \*[doc-str-dBla]
3236 . ie "\*[doc-arg-type]"macro" \
3237 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3239 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3242 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3248 . \" not a known keyword, so it specifies the width of the next column
3249 . \" (if it is a column list)
3250 . if !\n[doc-reg-dBla] \{\
3251 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3252 . nr doc-num-columns +1
3253 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3256 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3257 . tm1 " in .Bl request (#\n[.c])
3260 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3266 .\" NS doc-save-global-vars macro
3267 .\" NS save all global variables
3269 .\" NS local variables:
3272 .de doc-save-global-vars
3273 . nr doc-debug-saved \n[doc-debug]
3274 . ds doc-macro-name-saved "\*[doc-macro-name]
3275 . nr doc-arg-limit-saved \n[doc-arg-limit]
3276 . nr doc-num-args-saved \n[doc-num-args]
3277 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3280 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3281 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3282 . ds doc-type\n[doc-reg-dsgv]-saved "\*[doc-type\n[doc-reg-dsgv]]
3283 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3284 . nr doc-reg-dsgv +1
3287 . ds doc-out-string-saved "\*[doc-out-string]
3288 . ds doc-curr-space-saved "\*[doc-curr-space]
3289 . ds doc-saved-out-string-saved "\*[doc-saved-out-string]
3290 . nr doc-in-diversion-saved \n[doc-in-diversion]
3291 . nr doc-curr-font-saved \n[doc-curr-font]
3292 . nr doc-curr-size-saved \n[doc-curr-size]
3293 . nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
3294 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3295 . nr doc-have-decl-saved \n[doc-have-decl]
3296 . nr doc-have-var-saved \n[doc-have-var]
3297 . ds doc-command-name-saved "\*[doc-command-name]
3298 . ds doc-quote-left-saved "\*[doc-quote-left]
3299 . ds doc-quote-right-saved "\*[doc-quote-right]
3300 . nr doc-nesting-level-saved \n[doc-nesting-level]
3301 . ds doc-saved-list-type-saved "\*[doc-saved-list-type]
3302 . ds doc-space-saved "\*[doc-space]
3303 . nr doc-space-mode-saved \n[doc-space-mode]
3304 . nr doc-curr-font-for-Ef-saved \n[doc-curr-font-for-Ef]
3305 . nr doc-curr-size-for-Ef-saved \n[doc-curr-size-for-Ef]
3306 . ds doc-keep-type-saved "\*[doc-keep-type]
3307 . nr doc-display-depth-saved \n[doc-display-depth]
3308 . nr doc-is-compact-saved \n[doc-is-compact]
3311 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3312 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3313 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3314 . nr doc-reg-dsgv +1
3317 . nr doc-list-depth-saved \n[doc-list-depth]
3320 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3321 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3322 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3323 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3324 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3325 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3326 . nr doc-reg-dsgv +1
3329 . nr doc-have-indent-saved \n[doc-have-indent]
3330 . nr doc-have-tag-width-saved \n[doc-have-tag-width]
3331 . nr doc-no-printing-saved \n[doc-no-printing]
3332 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3333 . ds doc-curr-type-saved "\*[doc-curr-type]
3334 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3335 . nr doc-enum-list-count-saved \n[doc-enum-list-count]
3336 . nr doc-have-diag-list-saved \n[doc-have-diag-list]
3337 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3338 . nr doc-saved-list-immediate-saved \n[doc-saved-list-immediate]
3339 . nr doc-list-immediate-saved \n[doc-list-immediate]
3340 . nr doc-num-columns-saved \n[doc-num-columns]
3341 . nr doc-next-list-depth-saved \n[doc-next-list-depth]
3342 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3343 . nr doc-is-func-saved \n[doc-is-func]
3344 . nr doc-have-old-func-saved \n[doc-have-old-func]
3345 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3346 . ds doc-func-arg-saved "\*[doc-func-arg]
3347 . nr doc-num-func-args-saved \n[doc-num-func-args]
3348 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3349 . nr doc-have-func-saved \n[doc-have-func]
3350 . nr doc-is-reference-saved \n[doc-is-reference]
3351 . nr doc-reference-count-saved \n[doc-reference-count]
3352 . ds doc-reference-string-name-saved "\*[doc-reference-string-name]
3353 . nr doc-authors-processed-saved \n[doc-authors-processed]
3354 . nr doc-author-count-saved \n[doc-author-count]
3357 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3358 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3359 . nr doc-reg-dsgv +1
3362 . nr doc-book-count-saved \n[doc-book-count]
3363 . ds doc-book-name-saved "\*[doc-book-name]
3364 . nr doc-date-count-saved \n[doc-date-count]
3365 . ds doc-date-saved "\*[doc-date]
3366 . nr doc-publisher-count-saved \n[doc-publisher-count]
3367 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3368 . nr doc-journal-count-saved \n[doc-journal-count]
3369 . ds doc-journal-name-saved "\*[doc-journal-name]
3370 . nr doc-issue-count-saved \n[doc-issue-count]
3371 . ds doc-issue-name-saved "\*[doc-issue-name]
3372 . nr doc-optional-count-saved \n[doc-optional-count]
3373 . ds doc-optional-string-saved "\*[doc-optional-string]
3374 . nr doc-page-number-count-saved \n[doc-page-number-count]
3375 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3376 . nr doc-corporate-count-saved \n[doc-corporate-count]
3377 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3378 . nr doc-report-count-saved \n[doc-report-count]
3379 . ds doc-report-name-saved "\*[doc-report-name]
3380 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3381 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3382 . nr doc-volume-count-saved \n[doc-volume-count]
3383 . ds doc-volume-name-saved "\*[doc-volume-name]
3384 . nr doc-have-author-saved \n[doc-have-author]
3386 . ds doc-document-title-saved "\*[doc-document-title]
3387 . ds doc-volume-saved "\*[doc-volume]
3388 . ds doc-section-saved "\*[doc-section]
3389 . ds doc-operating-system-saved "\*[doc-operating-system]
3390 . ds doc-date-string-saved "\*[doc-date-string]
3391 . nr doc-header-space-saved \n[doc-header-space]
3392 . nr doc-footer-space-saved \n[doc-footer-space]
3393 . nr doc-display-vertical-saved \n[doc-display-vertical]
3394 . ds doc-header-string-saved "\*[doc-header-string]
3395 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3396 . nr doc-in-files-section-saved \n[doc-in-files-section]
3397 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3401 .\" NS doc-restore-global-vars macro
3402 .\" NS restore all global variables
3404 .\" NS local variables:
3407 .de doc-restore-global-vars
3408 . nr doc-debug \n[doc-debug-saved]
3409 . ds doc-macro-name "\*[doc-macro-name-saved]
3410 . nr doc-arg-limit \n[doc-arg-limit-saved]
3411 . nr doc-num-args \n[doc-num-args-saved]
3412 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3415 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3416 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3417 . ds doc-type\n[doc-reg-drgv] "\*[doc-type\n[doc-reg-drgv]-saved]
3418 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3419 . nr doc-reg-drgv +1
3422 . ds doc-out-string "\*[doc-out-string-saved]
3423 . ds doc-curr-space "\*[doc-curr-space-saved]
3424 . ds doc-saved-out-string "\*[doc-saved-out-string-saved]
3425 . nr doc-in-diversion \n[doc-in-diversion-saved]
3426 . nr doc-curr-font \n[doc-curr-font-saved]
3427 . nr doc-curr-size \n[doc-curr-size-saved]
3428 . nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
3429 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3430 . nr doc-have-decl \n[doc-have-decl-saved]
3431 . nr doc-have-var \n[doc-have-var-saved]
3432 . ds doc-command-name "\*[doc-command-name-saved]
3433 . ds doc-quote-left "\*[doc-quote-left-saved]
3434 . ds doc-quote-right "\*[doc-quote-right-saved]
3435 . nr doc-nesting-level \n[doc-nesting-level-saved]
3436 . ds doc-saved-list-type "\*[doc-saved-list-type-saved]
3437 . ds doc-space "\*[doc-space-saved]
3438 . nr doc-space-mode \n[doc-space-mode-saved]
3439 . nr doc-curr-font-for-Ef \n[doc-curr-font-for-Ef-saved]
3440 . nr doc-curr-size-for-Ef \n[doc-curr-size-for-Ef-saved]
3441 . ds doc-keep-type "\*[doc-keep-type-saved]
3442 . nr doc-display-depth \n[doc-display-depth-saved]
3443 . nr doc-is-compact \n[doc-is-compact-saved]
3446 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3447 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3448 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3449 . nr doc-reg-drgv +1
3452 . nr doc-list-depth \n[doc-list-depth-saved]
3455 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3456 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3457 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3458 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3459 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3460 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3461 . nr doc-reg-drgv +1
3464 . nr doc-have-indent \n[doc-have-indent-saved]
3465 . nr doc-have-tag-width \n[doc-have-tag-width-saved]
3466 . nr doc-no-printing \n[doc-no-printing-saved]
3467 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3468 . ds doc-curr-type "\*[doc-curr-type-saved]
3469 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3470 . nr doc-enum-list-count \n[doc-enum-list-count-saved]
3471 . nr doc-have-diag-list \n[doc-have-diag-list-saved]
3472 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3473 . nr doc-saved-list-immediate \n[doc-saved-list-immediate-saved]
3474 . nr doc-list-immediate \n[doc-list-immediate-saved]
3475 . nr doc-num-columns \n[doc-num-columns-saved]
3476 . nr doc-next-list-depth \n[doc-next-list-depth-saved]
3477 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3478 . nr doc-is-func \n[doc-is-func-saved]
3479 . nr doc-have-old-func \n[doc-have-old-func-saved]
3480 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3481 . ds doc-func-arg "\*[doc-func-arg-saved]
3482 . nr doc-num-func-args \n[doc-num-func-args-saved]
3483 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3484 . nr doc-have-func \n[doc-have-func-saved]
3485 . nr doc-is-reference \n[doc-is-reference-saved]
3486 . nr doc-reference-count \n[doc-reference-count-saved]
3487 . ds doc-reference-string-name "\*[doc-reference-string-name-saved]
3488 . nr doc-authors-processed \n[doc-authors-processed-saved]
3489 . nr doc-author-count \n[doc-author-count-saved]
3492 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3493 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3494 . nr doc-reg-drgv +1
3497 . nr doc-book-count \n[doc-book-count-saved]
3498 . ds doc-book-name "\*[doc-book-name-saved]
3499 . nr doc-date-count \n[doc-date-count-saved]
3500 . ds doc-date "\*[doc-date-saved]
3501 . nr doc-publisher-count \n[doc-publisher-count-saved]
3502 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3503 . nr doc-journal-count \n[doc-journal-count-saved]
3504 . ds doc-journal-name "\*[doc-journal-name-saved]
3505 . nr doc-issue-count \n[doc-issue-count-saved]
3506 . ds doc-issue-name "\*[doc-issue-name-saved]
3507 . nr doc-optional-count \n[doc-optional-count-saved]
3508 . ds doc-optional-string "\*[doc-optional-string-saved]
3509 . nr doc-page-number-count \n[doc-page-number-count-saved]
3510 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3511 . nr doc-corporate-count \n[doc-corporate-count-saved]
3512 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3513 . nr doc-report-count \n[doc-report-count-saved]
3514 . ds doc-report-name "\*[doc-report-name-saved]
3515 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3516 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3517 . nr doc-volume-count \n[doc-volume-count-saved]
3518 . ds doc-volume-name "\*[doc-volume-name-saved]
3519 . nr doc-have-author \n[doc-have-author-saved]
3521 . ds doc-document-title "\*[doc-document-title-saved]
3522 . ds doc-volume "\*[doc-volume-saved]
3523 . ds doc-section "\*[doc-section-saved]
3524 . ds doc-operating-system "\*[doc-operating-system-saved]
3525 . ds doc-date-string "\*[doc-date-string-saved]
3526 . nr doc-header-space \n[doc-header-space-saved]
3527 . nr doc-footer-space \n[doc-footer-space-saved]
3528 . nr doc-display-vertical \n[doc-display-vertical-saved]
3529 . ds doc-header-string "\*[doc-header-string-saved]
3530 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3531 . nr doc-in-files-section \n[doc-in-files-section-saved]
3532 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3536 .\" NS doc-no-printing global register (bool)
3537 .\" NS set if output is suppressed
3539 .nr doc-no-printing 0
3542 .\" NS doc-dry-execute macro
3543 .\" NS execute a string (splitting one arg into multiple args) without
3544 .\" NS output; this command must be surrounded by `doc-save-global-args'
3545 .\" NS and `doc-restore-global-args'
3549 . nr doc-no-printing 1
3552 . nop \*[doc-str-de] \$@
3553 . nr doc-no-printing 0
3557 .\" NS El user macro
3561 .\" NS doc-macro-name, doc-have-diag-list, doc-enum-list-count,
3562 .\" NS doc-list-depth
3564 .\" NS local variables:
3565 .\" NS doc-str-El, doc-reg-El
3567 .\" NS width register `El' set in doc-common
3571 . tm Usage: .El (does not take arguments) (#\n[.c])
3573 . ds doc-macro-name El
3575 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3577 . ie "\*[doc-str-El]"enum-list" \
3578 . nr doc-enum-list-count 0
3579 . el \{ .ie "\*[doc-str-El]"column-list" \{\
3581 . doc-do-end-column-list
3583 . el \{ .ie "\*[doc-str-El]"item-list" \{\
3585 ' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
3586 . doc-decrement-list-stack
3587 . nr doc-list-depth -1
3588 . doc-increment-list-stack
3590 . el \{ .ie "\*[doc-str-El]"ohang-list" \{\
3592 ' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
3593 . doc-decrement-list-stack
3594 . nr doc-list-depth -1
3595 . doc-increment-list-stack
3597 . el \{ .if "\*[doc-str-El]"inset-list" \{\
3599 ' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u)
3600 . doc-decrement-list-stack
3601 . nr doc-list-depth -1
3602 . doc-increment-list-stack
3605 . \" XXX: this code should be modified to handle nested lists of any type
3606 . if \n[doc-have-diag-list] \
3607 . nr doc-have-diag-list 0
3609 . if !\n[doc-reg-El] \
3617 .\" NS doc-saved-Pa-font global string
3618 .\" NS saved doc-Pa-font string for section FILES (no underline if
3621 .ds doc-saved-Pa-font
3624 .\" NS doc-curr-type global string
3625 .\" NS current argument type
3630 .\" NS doc-curr-arg global string
3631 .\" NS current argument
3636 .\" NS It user macro
3640 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3641 .\" NS doc-out-string, doc-nesting-level, doc-list-immediate,
3642 .\" NS doc-saved-list-type, doc-saved-Pa-font, doc-curr-type, doc-curr-arg,
3644 .\" NS width register `It' set in doc-common
3646 .\" NS local variables:
3647 .\" NS doc-str-It, doc-reg-It
3650 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3652 . if "\*[doc-str-It]"" \
3653 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3660 . ds doc-macro-name It
3663 . \" fill argument vector
3665 . while (\n[doc-reg-It] <= \n[.$]) \{\
3666 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3670 . nr doc-num-args \n[.$]
3674 . ie "\*[doc-str-It]"diag-list" \{\
3675 . doc-remaining-args
3680 . ie "\*[doc-str-It]"column-list" \{\
3685 . el \{ .ie "\*[doc-str-It]"tag-list" \
3687 . el \{ .ie "\*[doc-str-It]"hang-list" \
3689 . el \{ .ie "\*[doc-str-It]"ohang-list" \
3691 . el \{ .if "\*[doc-str-It]"inset-list" \
3695 . if \n[doc-reg-It] \{\
3696 . ie (\n[doc-reg-It] == 2) \{\
3697 . \" handle remaining list types with arguments
3698 . doc-parse-arg-vector
3700 . nr doc-nesting-level +1
3701 . nr doc-list-immediate 1
3703 . ds doc-curr-type \*[doc-type1]
3704 . ds doc-curr-arg "\*[doc-arg1]
3706 . if \n[doc-in-files-section] \{\
3707 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3709 . ds doc-Pa-font "\*[doc-No-font]
3712 . ie "\*[doc-type1]"macro" \
3719 . ie \n[doc-saved-list-immediate] \
3720 . ds doc-saved-list-type "\*[doc-str-It]
3722 . doc-\*[doc-str-It]
3725 . .tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3726 . .tm1 " don't take arguments (#\n[.c])
3727 . doc-\*[doc-str-It]
3730 . doc-\*[doc-str-It]
3734 .\" NS doc-inset-list macro
3735 .\" NS .It item of list-type inset
3738 .\" NS doc-out-string, doc-nesting-level, doc-list-immediate
3741 . doc-set-vertical-and-indent 0
3743 . nop \&\*[doc-out-string]
3745 . nr doc-nesting-level -1
3746 . nr doc-list-immediate 0
3753 .\" NS doc-hang-list macro
3754 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3757 .\" NS doc-out-string, doc-nesting-level, doc-list-immediate
3759 .\" NS local variables:
3763 . doc-set-vertical-and-indent 1
3764 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3765 . ti -\n[doc-reg-dhl]u
3767 . ie (\w
\a\*[doc-out-string]
\au >= \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3768 . nop \&\*[doc-out-string]
3770 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dhl]u'\c
3772 . nr doc-nesting-level -1
3774 . nr doc-list-immediate 0
3780 .\" NS doc-ohang-list macro
3781 .\" NS .It item of list-type overhanging tag
3784 .\" NS doc-out-string, doc-nesting-level, doc-list-immediate
3787 . doc-set-vertical-and-indent 0
3788 . nop \&\*[doc-out-string]
3791 . nr doc-nesting-level -1
3793 . nr doc-list-immediate 0
3799 .\" NS doc-item-list macro
3800 .\" NS .It item of list-type [empty tag]
3803 . doc-set-vertical-and-indent 0
3811 .\" NS doc-enum-list-count global register
3812 .\" NS contains current enum count value
3814 .nr doc-enum-list-count 0
3817 .\" NS doc-enum-list macro
3818 .\" NS enumerated list
3821 .\" NS doc-out-string, doc-nesting-level, doc-enum-list-count
3824 . nr doc-nesting-level +1
3825 . nr doc-enum-list-count +1
3826 . ds doc-out-string "\n[doc-enum-list-count].
3831 .\" NS doc-bullet-list macro
3832 .\" NS bullet paragraph list
3835 .\" NS doc-out-string, doc-nesting-level
3838 . nr doc-nesting-level +1
3839 . ds doc-out-string "\*[doc-Sy-font]\[bu]\f[P]
3844 .\" NS doc-dash-list macro
3845 .\" NS hyphen paragraph list (sub bullet list)
3848 .\" NS doc-out-string, doc-nesting-level
3851 . nr doc-nesting-level +1
3852 . ds doc-out-string "\*[doc-Sy-font]\-\f[P]
3857 .\" NS doc-do-list macro
3858 .\" NS .It item of list-type enum/bullet/hyphen
3860 .als doc-do-list doc-hang-list
3863 .\" NS doc-have-diag-list global register (bool)
3864 .\" NS set if last item was a diag list
3866 .nr doc-have-diag-list 0
3869 .\" NS doc-diag-list-input-line-count global register
3870 .\" NS saved line number to be checked in next diag-list item
3872 .nr doc-diag-list-input-line-count 0
3875 .\" NS doc-diag-list macro
3876 .\" NS .It item of list-type diagnostic-message
3879 .\" NS doc-out-string, doc-curr-font, doc-curr-size,
3880 .\" NS doc-diag-list-input-line-count
3883 . nr doc-curr-font \n[.f]
3884 . nr doc-curr-size \n[.s]
3886 . ie \n[doc-have-diag-list] \{\
3887 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
3894 . nr doc-diag-list-input-line-count \n[.c]
3896 . nop \*[doc-Sy-font]\*[doc-out-string]\c
3897 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\*[doc-digit-string]\c
3905 .\" NS doc-tag-list macro
3906 .\" NS .It item of list-type `tag'
3909 .\" NS doc-out-string, doc-nesting-level, doc-list-immediate
3911 .\" NS local variables:
3915 . if !\n[doc-have-tag-width] \
3917 . doc-set-vertical-and-indent 1
3918 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3919 . ti -\n[doc-reg-dtl]u
3921 . ie (\w
\a\*[doc-out-string]
\au > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3922 . nop \&\*[doc-out-string]
3926 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dtl]u'\c
3928 . if \n[doc-in-files-section] \
3930 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3932 . nr doc-nesting-level -1
3933 . nr doc-list-immediate 0
3940 .\" NS doc-get-tag-width macro
3941 .\" NS resolve unknown tag width (.Bl [inset | tag] only)
3944 .\" NS doc-list-indent-stackXXX, doc-have-indent, doc-tag-width-stackXXX
3947 .\" NS doc-curr-type, doc-curr-arg
3949 .de doc-get-tag-width
3950 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3951 . ie "\*[doc-curr-type]"macro" \{\
3953 .\" XXX: what is `lN'?
3955 . ds doc-tag-width-stack\n[lN] \*[doc-curr-arg]
3956 . nr doc-list-indent-stack\n[lN] \n[\*[doc-curr-arg]]
3959 . ds doc-tag-width-stack\n[lN] No
3960 . nr doc-list-indent-stack\n[lN] \n[No]
3962 . if !"\*[doc-tag-width-stack\n[doc-list-depth]]"\*[doc-tag-width-stack\n[lN]]" \
3963 . nr doc-have-indent 1
3968 .\" NS doc-set-vertical-and-indent macro
3969 .\" NS set up vertical spacing (if not compact) and indent (with offset if
3970 .\" NS argument is non-zero)
3973 .\" NS doc-have-indent, doc-have-tag-width
3975 .de doc-set-vertical-and-indent
3976 . ie \n[doc-have-indent] \{\
3977 . nr doc-have-indent 0
3978 . nr doc-have-tag-width 0
3979 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3980 . sp \n[doc-display-vertical]u
3981 . in (\n[.i]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
3983 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3986 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3987 . sp \n[doc-display-vertical]u
3995 .\" NS doc-saved-list-immediate global register (bool)
3996 .\" NS saved `doc-list-immediate' value
3998 .nr doc-saved-list-immediate 0
4001 .\" NS doc-list-depth global register
4002 .\" NS list type stack counter
4004 .nr doc-list-depth 0
4007 .\" NS doc-list-immediate global register (bool)
4008 .\" NS tag flag (for diversions)
4010 .nr doc-list-immediate 0
4013 .\" NS doc-num-columns global register
4014 .\" NS number of columns
4016 .nr doc-num-columns 0
4019 .\" NS doc-compact-list-stackXXX global register (bool)
4020 .\" NS stack of flags to indicate whether a particular list is compact
4022 .\" NS limit: doc-list-depth
4024 .nr doc-compact-list-stack1 0
4027 .\" NS doc-tag-width-stackXXX global string
4028 .\" NS stack of strings indicating how to set up current element of
4029 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4030 .\" NS directly; if it is a macro name, use the macro's width value;
4031 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4033 .\" NS limit: doc-list-depth
4035 .ds doc-tag-width-stack0
4036 .ds doc-tag-width-stack1
4039 .\" NS doc-list-offset-stackXXX global register
4040 .\" NS stack of list offsets
4042 .\" NS limit: doc-list-depth
4044 .nr doc-list-offset-stack1 0
4047 .\" NS doc-end-list macro
4048 .\" NS list end function
4051 .\" NS doc-list-offset-stackXXX, doc-list-depth
4054 ' in (\n[.i]u - \n[doc-list-indent-stack\n[doc-list-depth]]u - \n[doc-digit-width]u)
4056 . if \n[doc-list-offset-stack\n[doc-list-depth]] \{\
4057 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4058 . nr doc-list-offset-stack\n[doc-list-depth] 0
4061 . if (\n[doc-list-depth] <= 0) \
4062 . tm mdoc warning: extraneous .El call (#\n[.c])
4064 . doc-decrement-list-stack
4065 . nr doc-list-depth -1
4066 . doc-increment-list-stack
4070 .\" NS doc-next-list-depth global register
4071 .\" NS next possible doc-list-depth value
4073 .nr doc-next-list-depth 1
4076 .\" NS doc-increment-list-stack macro
4077 .\" NS set up next block for list
4080 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4081 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4082 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4084 .de doc-increment-list-stack
4085 . nr doc-next-list-depth (\n[doc-list-depth] + 1)
4086 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4087 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4088 . ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
4089 . ds doc-list-type-stack\n[doc-next-list-depth]
4090 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4094 .\" NS doc-decrement-list-stack macro
4095 .\" NS decrement stack
4098 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4099 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4100 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4102 .de doc-decrement-list-stack
4103 . ds doc-list-type-stack\n[doc-next-list-depth]
4104 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4105 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4106 . ds doc-tag-width-stack\n[doc-next-list-depth]
4107 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4108 . nr doc-next-list-depth -1
4112 .\" NS Xr user macro
4113 .\" NS cross reference (man page only)
4116 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string
4118 .\" NS width register `Xr' set in doc-common
4121 . if !\n[doc-arg-limit] \{\
4123 . ds doc-macro-name Xr
4124 . doc-parse-args \$@
4127 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4131 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4132 . ie "\*[doc-type\n[doc-arg-ptr]]"macro" \
4133 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4135 . ie "\*[doc-type\n[doc-arg-ptr]]"string" \{\
4136 . as doc-out-string \*[doc-Xr-font]
4137 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4140 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4141 . if "\*[doc-type\n[doc-arg-ptr]]"string" \{\
4142 . as doc-out-string \&\*[lp]\*[doc-arg\n[doc-arg-ptr]]\*[rp]
4145 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4146 . doc-do-\*[doc-type\n[doc-arg-ptr]]
4148 . doc-print-and-reset
4151 . doc-do-xref-\*[doc-type\n[doc-arg-ptr]]
4156 .\" NS Sx user macro
4157 .\" NS cross section reference
4160 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4161 .\" NS doc-curr-size
4163 .\" NS width register `Sx' set in doc-common
4166 . if !\n[doc-arg-limit] \{\
4168 . ds doc-macro-name Sx
4169 . doc-parse-args \$@
4172 . tm Usage: .Sx section_header \*[doc-punct-chars] (#\n[.c])
4176 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4177 . as doc-out-string \*[doc-Sx-font]
4178 . nr doc-curr-font \n[.f]
4179 . nr doc-curr-size \n[.s]
4180 . doc-print-recursive
4185 .\" NS doc-do-end-column-list macro
4186 .\" NS column-list end-list
4189 .\" NS doc-list-depth
4191 .de doc-do-end-column-list
4192 ' in (\n[.i]u - \n[doc-list-offset-stack\n[doc-list-depth]]u - \n[doc-list-indent-stack\n[doc-list-depth]]u)
4195 . doc-decrement-list-stack
4196 . nr doc-list-depth -1
4197 . doc-increment-list-stack
4201 .\" NS doc-column-indent-width global register
4202 .\" NS holds the indent width for a column list
4204 .nr doc-column-indent-width 0
4207 .\" NS doc-set-column-tab macro
4208 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4210 .\" NS local variables:
4211 .\" NS doc-str-dsct, doc-str-dsct1, doc-reg-dsct, doc-column-indent-width
4213 .de doc-set-column-tab
4216 . nr doc-column-indent-width 0
4219 . ds doc-str-dsct1 " \"
4222 . ds doc-str-dsct1 " \"
4224 . \" XXX: this is packed abnormally close -- intercolumn width
4225 . \" should be configurable
4226 . ds doc-str-dsct1 " \"
4229 . while (\n[doc-reg-dsct] <= \$1) \{\
4230 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4231 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4232 . nr doc-reg-dsct +1
4235 . ta \*[doc-str-dsct]
4236 ' in (\n[.i]u + \n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
4240 .\" NS doc-column-list macro
4244 .\" NS doc-arg-ptr, doc-spaceXXX, doc-list-indent-stackXXX
4246 .\" NS local variables:
4250 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4251 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4254 ' in (\n[.i]u + \n[doc-column-indent-width]u)
4256 . ti -\n[doc-column-indent-width]u
4258 . doc-parse-arg-vector
4261 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4262 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4263 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4264 . ds doc-space\n[doc-reg-dcl]
4266 . doc-do-\*[doc-type\n[doc-arg-ptr]]
4269 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4273 .\" NS Ta user macro
4274 .\" NS append tab (\t)
4277 .\" NS doc-arg-ptr, doc-out-string
4279 .\" NS width register `Ta' set in doc-common
4282 . ie \n[doc-arg-limit] \{\
4284 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4285 . as doc-out-string \t
4286 . doc-do-\*[doc-type\n[doc-arg-ptr]]
4289 . as doc-out-string \t\c
4290 . doc-print-and-reset
4293 . tm1 "Usage: Ta must follow column entry: e.g. (#\n[.c])
4294 . tm1 " .It column_string [Ta [column_string ...]]
4299 .\" NS Dl user macro
4300 .\" NS display (one line) literal
4303 .\" NS doc-macro-name
4305 .\" NS width register `Dl' set in doc-common
4309 . in (\n[.i]u + \n[doc-display-indent]u)
4311 . ie \n[doc-arg-limit] \
4312 . tm Usage: .Dl not callable by other macros (#\n[.c])
4315 . ds doc-macro-name Dl
4316 . doc-parse-args \$@
4320 . tm Usage: .Dl argument ... (#\n[.c])
4323 . in (\n[.i]u - \n[doc-display-indent]u)
4327 .\" NS D1 user macro
4328 .\" NS display (one line)
4331 .\" NS doc-macro-name, doc-arg-ptr
4333 .\" NS width register `D1' set in doc-common
4337 . in (\n[.i]u + \n[doc-display-indent]u)
4339 . ie \n[doc-arg-limit] \
4340 . tm Usage: .D1 not callable by other macros (#\n[.c])
4343 . ds doc-macro-name D1
4344 . doc-parse-args \$@
4349 . tm Usage: .D1 argument ... (#\n[.c])
4352 . in (\n[.i]u - \n[doc-display-indent]u)
4356 .\" NS Ex user macro
4360 . tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
4364 .\" NS Vt user macro
4365 .\" NS variable type (for forcing old style variable declarations);
4366 .\" NS this is not done in the same manner as .Ot for fortrash --
4367 .\" NS clean up later
4370 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4373 .\" NS width register `Vt' set in doc-common
4376 . \" if a function declaration was the last thing given, want vertical space
4377 . if \n[doc-have-decl] \{\
4379 . nr doc-have-decl 0
4382 . \" if a subroutine was the last thing given, want vertical space
4383 . if \n[doc-have-func] \{\
4384 . ie !\n[doc-have-var] \
4392 . nr doc-curr-font \n[.f]
4393 . nr doc-curr-size \n[.s]
4395 . nop \*[doc-Ft-font]\$*
4397 . ie \n[doc-have-old-func] \
4398 . nop \&\*[doc-soft-space]
4402 . ft \n[doc-curr-font]
4403 . ps \n[doc-curr-size]
4407 .\" NS doc-is-func global register (bool)
4408 .\" NS set if subroutine (in synopsis only) (fortran only)
4413 .\" NS Ft user macro
4414 .\" NS function type
4417 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4418 .\" NS doc-have-var, doc-is-func
4420 .\" NS width register `Ft' set in doc-common
4423 . if \n[doc-in-synopsis-count] \{\
4424 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4426 . nr doc-have-decl 0
4430 . if \n[doc-have-var] \{\
4438 . nr doc-curr-font \n[.f]
4439 . nr doc-curr-size \n[.s]
4441 . nop \*[doc-Ft-font]\$*
4443 . ft \n[doc-curr-font]
4444 . ps \n[doc-curr-size]
4448 .\" NS doc-have-old-func global register (bool)
4449 .\" NS set if `Ot' has been called
4451 .nr doc-have-old-func 0
4454 .\" NS Ot user macro
4455 .\" NS old function type (fortran -- no newline)
4458 .\" NS doc-out-string, doc-have-decl, doc-have-var,
4459 .\" NS doc-is-func, doc-have-old-func
4461 .\" NS width register `Ot' set in doc-common
4464 . nr doc-have-old-func 1
4466 . if \n[doc-in-synopsis-count] \{\
4467 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4469 . nr doc-have-decl 0
4473 . if \n[doc-have-var] \{\
4482 . as doc-out-string \*[doc-Ft-font]\$*
4483 . as doc-out-string \ \f[P]
4487 .\" NS Fa user macro
4488 .\" NS function arguments
4491 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4492 .\" NS doc-curr-size
4494 .\" NS width register `Fa' set in doc-common
4497 . if !\n[doc-arg-limit] \{\
4499 . ds doc-macro-name Fa
4500 . doc-parse-args \$@
4503 . tm Usage: .Fa function_arguments ... \*[doc-punct-chars] (#\n[.c])
4506 . ie \n[doc-func-arg-count] \
4510 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4511 . as doc-out-string \*[doc-Fa-font]
4512 . nr doc-curr-font \n[.f]
4513 . nr doc-curr-size \n[.s]
4514 . doc-print-recursive
4516 . if \n[doc-in-synopsis-count] \
4517 . if \n[doc-have-func] \
4523 .\" NS doc-func-arg-count global register
4524 .\" NS how many function arguments have been processed so far
4526 .nr doc-func-arg-count 0
4529 .\" NS doc-func-arg global string
4530 .\" NS work buffer for function name strings
4535 .\" NS doc-num-func-args global register
4536 .\" NS number of function arguments
4538 .nr doc-num-func-args 0
4541 .\" NS doc-func-args-processed global register
4542 .\" NS function arguments processed so far
4544 .nr doc-func-args-processed 0
4547 .\" NS doc-do-func macro
4548 .\" NS internal .Fa for .Fc
4551 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg-count,
4552 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4555 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4559 . nr doc-num-func-args 0
4560 . nr doc-func-args-processed 0
4562 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4563 . if (\n[doc-num-func-args] > 1) \
4564 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4566 . if (\n[doc-func-arg-count] > 1) \{\
4567 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|,
4568 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]
4569 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4572 . if (\n[doc-func-arg-count] == 1) \{\
4573 . as doc-out-string \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]
4574 . as doc-out-string \f[P]\s[0]
4576 . nr doc-func-arg-count +1
4584 .\" NS doc-have-func global register (bool)
4585 .\" NS whether we have more than one function in synopsis
4590 .\" NS Fn user macro
4594 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4595 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4596 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4599 .\" NS width register `Fn' set in doc-common
4602 . if !\n[doc-arg-limit] \{\
4604 . ds doc-macro-name Fn
4605 . doc-parse-args \$@
4608 . tmc Usage: .Fn function_name function_arg(s) ... \*[doc-punct-chars]
4612 . if \n[doc-in-synopsis-count] \{\
4613 . \" if there is/has been more than one subroutine declaration
4614 . ie \n[doc-is-func] \{\
4617 . nr doc-have-decl 0
4621 . if \n[doc-have-func] \{\
4624 . nr doc-have-decl 0
4627 . if \n[doc-have-decl] \{\
4632 . if \n[doc-have-var] \{\
4634 . nr doc-have-decl 0
4637 . nr doc-have-func 1
4641 . ie (\n[doc-in-synopsis-count] > 1) \
4644 . if !\n[doc-indent-synopsis] \
4645 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4648 . in +\n[doc-indent-synopsis]u
4649 . ti -\n[doc-indent-synopsis]u
4650 . nr doc-in-synopsis-count +1
4654 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4655 . nr doc-curr-font \n[.f]
4656 . nr doc-curr-size \n[.s]
4657 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4658 . as doc-out-string \f[P]\s[0]\*[lp]
4661 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4662 . as doc-out-string \*[doc-Fa-font]
4663 . doc-do-func-\*[doc-type\n[doc-arg-ptr]]
4666 . as doc-out-string \|\*[rp]
4667 . doc-print-and-reset
4670 . if \n[doc-in-synopsis-count] \
4671 . in -\n[doc-indent-synopsis]u
4676 .\" NS doc-do-func-macro macro
4677 .\" NS prepare `doc-out-string' and execute doc-argXXX
4680 .\" NS doc-out-string
4682 .de doc-do-func-macro
4683 . ie \n[doc-in-synopsis-count] \{\
4684 . as doc-out-string \&\*[rp]\f[R];\f[P]
4685 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4688 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4690 . \*[doc-arg\n[doc-arg-ptr]]
4694 .\" NS doc-do-func-string macro
4695 .\" NS handle function arguments
4698 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg,
4699 .\" NS doc-num-func-args, doc-func-args-processed
4701 .\" NS local variables:
4704 .de doc-do-func-string
4705 . if \n[doc-in-synopsis-count] \{\
4707 . nr doc-num-func-args 0
4708 . nr doc-func-args-processed 0
4710 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4711 . if (\n[doc-num-func-args] > 1) \
4712 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4715 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
4717 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4718 . nr doc-reg-ddfs \n[doc-arg-ptr]
4720 . if "\*[doc-type\n[doc-arg-ptr]]"string" \{\
4721 . as doc-out-string \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]],
4722 . as doc-out-string "\*[doc-space\n[doc-reg-ddfs]]\f[P]\s[0]\|
4724 . doc-do-func-\*[doc-type\n[doc-arg-ptr]]
4727 . ie \n[doc-in-synopsis-count] \{\
4728 . as doc-out-string \&\*[rp]\f[R];\f[P]
4729 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4732 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4734 . doc-print-and-reset
4739 .\" NS doc-do-func-punct-suffix macro
4740 .\" NS handle punctuation suffixes in functions
4743 .\" NS doc-out-string
4745 .de doc-do-func-punct-suffix
4746 . ie \n[doc-in-synopsis-count] \{\
4747 . as doc-out-string \&\*[rp]\f[R];\f[P]
4748 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4749 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4752 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4753 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4756 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
4759 . doc-print-and-reset
4763 .\" NS doc-do-func-punct-prefix macro
4764 .\" NS handle punctuation prefixes in functions
4767 .\" NS doc-arg-ptr, doc-out-string
4769 .de doc-do-func-punct-prefix
4770 . ie \n[doc-in-synopsis-count] \{\
4771 . as doc-out-string \&\*[rp]\f[R];\f[P]
4772 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4773 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4776 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4777 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4780 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4785 . doc-print-and-reset
4789 .\" NS Fo user macro
4790 .\" NS function open
4793 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4794 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4795 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4796 .\" NS doc-nesting-level, doc-is-func, doc-func-arg-count
4798 .\" NS width register `Fo' set in doc-common
4803 . if !\n[doc-arg-limit] \{\
4805 . ds doc-macro-name Fo
4806 . doc-parse-args \$@
4809 . tm Usage: .Fo function_name (#\n[.c])
4812 . if \n[doc-in-synopsis-count] \{\
4813 . \" if there is/has been more than one subroutine declaration
4814 . ie \n[doc-is-func] \{\
4817 . nr doc-have-decl 0
4821 . if \n[doc-have-func] \{\
4824 . nr doc-have-decl 0
4827 . if \n[doc-have-decl] \{\
4832 . if \n[doc-have-var] \{\
4834 . nr doc-have-decl 0
4837 . nr doc-have-func 1
4841 . ie (\n[doc-in-synopsis-count] > 1) \
4844 . if !\n[doc-indent-synopsis] \
4845 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4848 . in +\n[doc-indent-synopsis]u
4849 . ti -\n[doc-indent-synopsis]u
4850 . nr doc-in-synopsis-count +1
4854 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4855 . nr doc-nesting-level +1
4856 . nr doc-func-arg-count 1
4857 . nr doc-curr-font \n[.f]
4858 . nr doc-curr-size \n[.s]
4860 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4861 . as doc-out-string \f[P]\s[0]\*[lp]
4867 .\" NS Fc user macro
4868 .\" NS function close
4871 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-nesting-level,
4872 .\" NS doc-func-arg-count
4874 .\" NS width register `Fc' set in doc-common
4877 . if !\n[doc-arg-limit] \{\
4879 . ds doc-macro-name Fc
4880 . doc-parse-args \$@
4883 . nr doc-func-arg-count 0
4884 . nr doc-nesting-level -1
4886 . ie \n[doc-in-synopsis-count] \
4887 . as doc-out-string \|\*[rp]\f[R];\f[P]
4889 . as doc-out-string \|\*[rp]
4890 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4892 . \*[doc-arg\n[doc-arg-ptr]]
4895 . doc-print-and-reset
4897 . if \n[doc-in-synopsis-count] \
4898 . in -\n[doc-indent-synopsis]u
4904 .\" NS doc-build-func-string macro
4905 .\" NS collect function arguments and set hard spaces inbetween
4908 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4910 .de doc-build-func-string
4911 . if !\n[doc-num-func-args] \{\
4912 . nr doc-num-func-args \n[.$]
4913 . nr doc-func-args-processed 0
4917 . nr doc-func-args-processed +1
4918 . as doc-func-arg "\$1
4920 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
4921 . as doc-func-arg "\*[doc-hard-space]
4924 . doc-build-func-string \$@
4929 .\" Very crude references, stash all reference info into strings (usual
4930 .\" use of doc-out-string, then doc-out-string contents copied to
4931 .\" string of retrievable naming convention), print out reference on .Re
4932 .\" request and clean up. Ordering very limited, no fancy citations, but
4933 .\" can do articles, journals, and books -- need to add several missing
4934 .\" options (like city etc). Should be able to grab a refer entry, massage
4935 .\" it a wee bit (prefix a `.' to the %[A-Z]) and not worry (ha!).
4938 .\" NS doc-is-reference global register (bool)
4939 .\" NS set if in reference
4941 .nr doc-is-reference 0
4944 .\" NS doc-reference-count global register
4945 .\" NS reference element counter
4947 .nr doc-reference-count 0
4950 .\" NS doc-reference-string-name global string
4951 .\" NS contains current reference string name for handling in
4952 .\" NS `doc-do-references'
4954 .ds doc-reference-string-name
4957 .\" NS Rs user macro
4958 .\" NS reference start
4961 .\" NS doc-is-reference, doc-reference-count
4963 .\" NS width register `Rs' set in doc-common
4966 . nr doc-is-reference 1
4967 . doc-reset-reference
4968 . if \n[doc-in-see-also-section] \
4970 . nr doc-reference-count 0
4974 .\" NS Re user macro
4975 .\" NS reference end
4978 .\" NS doc-is-reference
4980 .\" NS width register `Re' set in doc-common
4983 . doc-print-reference
4984 . doc-reset-reference
4985 . nr doc-is-reference 0
4989 .\" NS doc-reset-reference macro
4990 .\" NS reference cleanup
4993 .\" NS doc-author-count, doc-journal-count, doc-issue-count,
4994 .\" NS doc-optional-count, doc-corporate-count, doc-report-count,
4995 .\" NS doc-reference-title-count, doc-volume-count, doc-date-count,
4996 .\" NS doc-page-number-count, doc-book-count, doc-reference-string-name,
4997 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
4998 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
4999 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5001 .de doc-reset-reference
5002 . nr doc-author-count 0
5003 . nr doc-journal-count 0
5004 . nr doc-issue-count 0
5005 . nr doc-optional-count 0
5006 . nr doc-corporate-count 0
5007 . nr doc-report-count 0
5008 . nr doc-reference-title-count 0
5009 . nr doc-volume-count 0
5010 . nr doc-date-count 0
5011 . nr doc-page-number-count 0
5012 . nr doc-book-count 0
5014 . ds doc-reference-string-name
5016 . ds doc-journal-name
5018 . ds doc-optional-string
5019 . ds doc-corporate-name
5020 . ds doc-report-name
5021 . ds doc-reference-title-name
5022 . ds doc-volume-name
5024 . ds doc-page-number-string
5029 .\" NS doc-finish-reference macro
5030 .\" NS auxiliary macro for doc-print-reference
5033 .\" NS doc-reference-count
5035 .de doc-finish-reference
5036 . nr doc-reference-count -1
5037 . ie \n[doc-reference-count] \
5044 .\" NS doc-print-reference macro
5045 .\" NS reference print
5048 .\" NS doc-reference-count, doc-authors-processed
5050 .de doc-print-reference
5051 . if \n[doc-author-count] \{\
5052 . nop \&\*[doc-author-name1],
5053 . nr doc-authors-processed 1
5054 . if (\n[doc-author-count] > 1) \
5055 . doc-print-reference-authors
5056 . nr doc-reference-count -\n[doc-author-count]
5059 . if \n[doc-reference-title-count] \{\
5060 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5061 . nop \&\*[q]\*[doc-reference-title-name]\*[q]\c
5062 . doc-finish-reference
5065 . nop \*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font]\c
5066 . doc-finish-reference
5069 . if \n[doc-book-count] \{\
5070 . nop \*[doc-Em-font]\*[doc-book-name]\*[doc-No-font]\c
5071 . doc-finish-reference
5074 . if \n[doc-publisher-count] \{\
5075 . nop \*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font]\c
5076 . doc-finish-reference
5079 . if \n[doc-journal-count] \{\
5080 . nop \*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font]\c
5081 . doc-finish-reference
5084 . if \n[doc-report-count] \{\
5085 . nop \&\*[doc-report-name]\c
5086 . doc-finish-reference
5089 . if \n[doc-issue-count] \{\
5090 . nop \&\*[doc-issue-name]\c
5091 . doc-finish-reference
5094 . if \n[doc-volume-count] \{\
5095 . nop \&\*[doc-volume-name]\c
5096 . doc-finish-reference
5099 . if \n[doc-page-number-count] \{\
5100 . nop \&\*[doc-page-number-string]\c
5101 . doc-finish-reference
5104 . if \n[doc-corporate-count] \{\
5105 . nop \&\*[doc-corporate-name]\c
5106 . doc-finish-reference
5109 . if \n[doc-date-count] \{\
5110 . nop \&\*[doc-date]\c
5111 . doc-finish-reference
5114 . if \n[doc-optional-count] \{\
5115 . nop \&\*[doc-optional-string]\c
5116 . doc-finish-reference
5119 . if \n[doc-reference-count] \
5120 . tm mdoc warning: unresolved reference problem
5124 .\" NS doc-authors-processed global register
5125 .\" NS author references processed so far
5127 .nr doc-authors-processed 0
5130 .\" NS doc-print-reference-authors macro
5131 .\" NS print out reference authors
5134 .\" NS doc-authors-processed
5136 .de doc-print-reference-authors
5137 . nr doc-authors-processed +1
5138 . ie (\n[doc-author-count] == \n[doc-authors-processed]) \
5139 . nop \&and \*[doc-author-name\n[doc-authors-processed]],
5141 . nop \&\*[doc-author-name\n[doc-authors-processed]],
5142 . doc-print-reference-authors
5147 .\" NS doc-author-count global register
5148 .\" NS counter of author references
5150 .nr doc-author-count 0
5153 .\" NS doc-author-nameXXX global string
5154 .\" NS array of author names
5156 .\" NS limit: doc-author-count
5158 .ds doc-author-name0
5161 .\" NS %A user macro
5162 .\" NS reference author(s)
5165 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5166 .\" MS doc-reference-count, doc-author-count, doc-reference-string-name
5168 .\" NS width register `%A' set in doc-common
5171 . if !\n[doc-arg-limit] \{\
5173 . nr doc-author-count +1
5174 . nr doc-reference-count +1
5175 . ds doc-reference-string-name doc-author-name\n[doc-author-count]
5177 . ds doc-macro-name %A
5178 . doc-parse-args \$@
5181 . tm Usage: .%A author_name (#\n[.c])
5185 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5186 . nr doc-curr-font \n[.f]
5187 . nr doc-curr-size \n[.s]
5193 .\" NS doc-book-count global register
5194 .\" NS counter of book references
5196 .nr doc-book-count 0
5199 .\" NS doc-book-name global string
5200 .\" NS string of collected book references
5205 .\" NS %B user macro
5206 .\" NS [reference] book name
5209 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5210 .\" NS doc-curr-size, doc-reference-count, doc-book-count,
5211 .\" NS doc-reference-string-name
5213 .\" NS width register `%B' set in doc-common
5216 . if !\n[doc-arg-limit] \{\
5218 . if \n[doc-is-reference] \{\
5219 . nr doc-book-count +1
5220 . nr doc-reference-count +1
5221 . ds doc-reference-string-name doc-book-name
5224 . ds doc-macro-name %B
5225 . doc-parse-args \$@
5228 . tm Usage: .%B book_name (#\n[.c])
5232 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5233 . nr doc-curr-font \n[.f]
5234 . nr doc-curr-size \n[.s]
5236 . ie !\n[doc-is-reference] \{\
5237 . as doc-out-string \*[doc-Em-font]
5238 . doc-print-recursive
5246 .\" NS doc-date-count global register
5247 .\" NS counter of date references
5249 .nr doc-date-count 0
5252 .\" NS doc-date global string
5253 .\" NS string of collected date references
5258 .\" NS %D user macro
5259 .\" NS [reference] date
5262 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5263 .\" NS doc-reference-count, doc-date-count, doc-reference-string-name
5265 .\" NS width register `%D' set in doc-common
5268 . if !\n[doc-arg-limit] \{\
5270 . nr doc-date-count +1
5271 . nr doc-reference-count +1
5272 . ds doc-reference-string-name doc-date
5274 . ds doc-macro-name %D
5275 . doc-parse-args \$@
5278 . tm Usage: .%D date (#\n[.c])
5282 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5283 . nr doc-curr-font \n[.f]
5284 . nr doc-curr-size \n[.s]
5290 .\" NS doc-publisher-count global register
5291 .\" NS counter of publisher references
5293 .nr doc-publisher-count 0
5296 .\" NS doc-publisher-name global string
5297 .\" NS string of collected publisher references
5299 .ds doc-publisher-name
5302 .\" NS %I user macro
5303 .\" NS [reference] issuer/publisher name
5306 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5307 .\" NS doc-reference-count, doc-reference-string-name
5309 .\" NS width register `%I' set in doc-common
5312 . if !\n[doc-arg-limit] \{\
5314 . nr doc-publisher-count +1
5315 . nr doc-reference-count +1
5316 . ds doc-reference-string-name doc-publisher-name
5318 . ds doc-macro-name %I
5319 . doc-parse-args \$@
5322 . tm Usage: .%I issuer/publisher_name (#\n[.c])
5326 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5327 . nr doc-curr-font \n[.f]
5328 . nr doc-curr-size \n[.s]
5334 .\" NS doc-journal-count global register
5335 .\" NS counter of journal references
5337 .nr doc-journal-count 0
5340 .\" NS doc-journal-name global string
5341 .\" NS string of collected journal references
5343 .ds doc-journal-name
5346 .\" NS %J user macro
5347 .\" NS [reference] Journal Name
5350 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5351 .\" NS doc-reference-count, doc-journal-count, doc-reference-string-name
5353 .\" NS width register `%J' set in doc-common
5356 . if !\n[doc-arg-limit] \{\
5358 . nr doc-journal-count +1
5359 . nr doc-reference-count +1
5360 . ds doc-reference-string-name doc-journal-name
5362 . ds doc-macro-name %J
5363 . doc-parse-args \$@
5366 . tm Usage: .%J journal_name (#\n[.c])
5370 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5371 . nr doc-curr-font \n[.f]
5372 . nr doc-curr-size \n[.s]
5378 .\" NS doc-issue-count global register
5379 .\" NS counter of issue number references
5381 .nr doc-issue-count 0
5384 .\" NS doc-issue-name global string
5385 .\" NS string of collected issue number references
5390 .\" NS %N user macro
5391 .\" NS [reference] issue number
5394 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5395 .\" NS doc-reference-count, doc-issue-count, doc-reference-string-name
5397 .\" NS width register `%N' set in doc-common
5400 . if !\n[doc-arg-limit] \{\
5402 . nr doc-issue-count +1
5403 . nr doc-reference-count +1
5404 . ds doc-reference-string-name doc-issue-name
5406 . ds doc-macro-name %N
5407 . doc-parse-args \$@
5410 . tm Usage: .%N issue_number (#\n[.c])
5414 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5415 . nr doc-curr-font \n[.f]
5416 . nr doc-curr-size \n[.s]
5422 .\" NS doc-optional-count global register
5423 .\" NS counter of optional information references
5425 .nr doc-optional-count 0
5428 .\" NS doc-optional-string global string
5429 .\" NS string of collected optional information references
5431 .ds doc-optional-string
5434 .\" NS %O user macro
5435 .\" NS [reference] optional information
5438 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5439 .\" NS doc-reference-count, doc-optional-count, doc-reference-string-name
5441 .\" NS width register `%O' set in doc-common
5444 . if !\n[doc-arg-limit] \{\
5446 . nr doc-optional-count +1
5447 . nr doc-reference-count +1
5448 . ds doc-reference-string-name doc-optional-string
5450 . ds doc-macro-name %O
5451 . doc-parse-args \$@
5454 . tm Usage: .%O optional_information ... \*[doc-punct-chars] (#\n[.c])
5458 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5459 . nr doc-curr-font \n[.f]
5460 . nr doc-curr-size \n[.s]
5466 .\" NS doc-page-number-count global register
5467 .\" NS counter of page number references
5469 .nr doc-page-number-count 0
5472 .\" NS doc-page-number-string global string
5473 .\" NS string of collected page number references
5475 .ds doc-page-number-string
5478 .\" NS %P user macro
5479 .\" NS [reference] page numbers
5482 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5483 .\" NS doc-reference-count, doc-page-number-count, doc-reference-string-name
5485 .\" NS width register `%P' set in doc-common
5488 . if !\n[doc-arg-limit] \{\
5490 . nr doc-page-number-count +1
5491 . nr doc-reference-count +1
5492 . ds doc-reference-string-name doc-page-number-string
5494 . ds doc-macro-name %P
5495 . doc-parse-args \$@
5498 . tm Usage: .%P page_numbers ... \*[doc-punct-chars] (#\n[.c])
5502 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5503 . nr doc-curr-font \n[.f]
5504 . nr doc-curr-size \n[.s]
5510 .\" NS doc-corporate-count global register
5511 .\" NS counter of corporate references
5513 .nr doc-corporate-count 0
5516 .\" NS doc-corporate-name global string
5517 .\" NS string of collected corporate references
5519 .ds doc-corporate-name
5522 .\" NS %Q user macro
5523 .\" NS corporate or foreign author
5526 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5527 .\" NS doc-reference-count, doc-corporate-count, doc-reference-string-name
5529 .\" NS width register `%Q' set in doc-common
5532 . if !\n[doc-arg-limit] \{\
5534 . nr doc-corporate-count +1
5535 . nr doc-reference-count +1
5536 . ds doc-reference-string-name doc-corporate-name
5538 . ds doc-macro-name %Q
5539 . doc-parse-args \$@
5542 . tm Usage: .%Q corporate_or_foreign_author (#\n[.c])
5546 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5547 . nr doc-curr-font \n[.f]
5548 . nr doc-curr-size \n[.s]
5554 .\" NS doc-report-count global register
5555 .\" NS counter of report references
5557 .nr doc-report-count 0
5560 .\" NS doc-report-name global string
5561 .\" NS string of collected report references
5566 .\" NS %R user macro
5567 .\" NS [reference] report name
5570 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5571 .\" NS doc-reference-count, doc-report-count, doc-reference-string-name
5573 .\" NS width register `%R' set in doc-common
5576 . if !\n[doc-arg-limit] \{\
5578 . nr doc-report-count +1
5579 . nr doc-reference-count +1
5580 . ds doc-reference-string-name doc-report-name
5582 . ds doc-macro-name %R
5583 . doc-parse-args \$@
5586 . tm Usage: .%R reference_report (#\n[.c])
5590 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5591 . nr doc-curr-font \n[.f]
5592 . nr doc-curr-size \n[.s]
5598 .\" NS doc-reference-title-count global register
5599 .\" NS counter of reference title references
5601 .nr doc-reference-title-count 0
5604 .\" NS doc-reference-title-name global string
5605 .\" NS string of collected reference title references
5607 .ds doc-reference-title-name
5610 .\" NS %T user macro
5611 .\" NS reference title
5614 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5615 .\" NS doc-curr-size, doc-reference-count, doc-reference-title-count,
5616 .\" NS doc-reference-string-name
5618 .\" NS width register `%T' set in doc-common
5621 . if !\n[doc-arg-limit] \{\
5623 . if \n[doc-is-reference] \{\
5624 . nr doc-reference-title-count +1
5625 . nr doc-reference-count +1
5626 . ds doc-reference-string-name doc-reference-title-name
5629 . ds doc-macro-name %T
5630 . doc-parse-args \$@
5633 . tm Usage: .%T reference_title (#\n[.c])
5637 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5638 . nr doc-curr-font \n[.f]
5639 . nr doc-curr-size \n[.s]
5640 . ie \n[doc-is-reference] \
5643 . as doc-out-string \*[doc-Em-font]
5644 . doc-print-recursive
5649 .\" NS doc-volume-count global register
5650 .\" NS counter of reference title references
5652 .nr doc-volume-count 0
5655 .\" NS doc-volume-name global string
5656 .\" NS string of collected volume references
5661 .\" NS %V user macro
5662 .\" NS reference volume
5665 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5666 .\" NS doc-reference-count, doc-volume-count, doc-reference-string-name
5668 .\" NS width register `%V' set in doc-common
5671 . if !\n[doc-arg-limit] \{\
5673 . ds doc-macro-name %V
5674 . nr doc-volume-count +1
5675 . nr doc-reference-count +1
5676 . ds doc-reference-string-name doc-volume-name
5677 . doc-parse-args \$@
5680 . tm Usage: .%V volume , ... \*[doc-punct-chars] (#\n[.c])
5684 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5685 . nr doc-curr-font \n[.f]
5686 . nr doc-curr-size \n[.s]
5692 .\" NS doc-do-references macro
5693 .\" NS reference recursion routine
5696 .\" NS doc-arg-ptr, doc-out-string, doc-reference-string-name,
5697 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
5698 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
5699 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5701 .\" NS local variables:
5702 .\" NS doc-str-ddr, doc-reg-ddr
5704 .de doc-do-references
5707 . ds doc-str-ddr "\*[doc-type\n[doc-arg-ptr]]
5709 . ie "\*[doc-str-ddr]"macro" \{\
5710 . \" .as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
5711 . ie "\*[doc-arg\n[doc-arg-ptr]]"Tn" \
5712 . doc-reference-trademark
5714 . doc-append-arg doc-do-references macro
5715 . \*[doc-arg\n[doc-arg-ptr]]
5718 . nr doc-reg-ddr \n[doc-arg-ptr]
5719 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
5721 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
5722 . as \*[doc-reference-string-name] \&\*[doc-out-string]
5724 . ds doc-reference-string-name
5729 . as doc-out-string "\*[doc-space\n[doc-reg-ddr]]
5735 .\" NS Hf user macro
5736 .\" NS source include header files.
5739 .\" NS doc-curr-font, doc-curr-size
5741 .\" NS width register `Hf' set in doc-common
5749 . nr doc-curr-font \n[.f]
5750 . nr doc-curr-size \n[.s]
5753 . nop \*[doc-Li-font]
5764 . ft \n[doc-curr-font]
5765 . ps \n[doc-curr-size]
5770 .\" NS doc-have-author global register (bool)
5773 .nr doc-have-author 0
5776 .\" NS An user macro
5780 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5781 .\" NS doc-have-author
5783 .\" NS width register `An' set in doc-common
5786 . if \n[doc-in-authors-section] \{\
5787 . ie \n[doc-have-author] \
5790 . nr doc-have-author 1
5793 . if !\n[doc-arg-limit] \{\
5795 . ds doc-macro-name An
5796 . doc-parse-args \$@
5799 . tm Usage: .An author_name ... \*[doc-punct-chars] (#\n[.c])
5803 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5804 . nr doc-curr-font \n[.f]
5805 . nr doc-curr-size \n[.s]
5806 . doc-print-recursive
5811 .\" NS Sf user macro
5814 .\" NS width register `Sf' set in doc-common
5817 . tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
5821 .ds doc-func-error-string "function returns the value\~0 if successful;
5822 .as doc-func-error-string " otherwise the value\~-1 is returned and
5823 .as doc-func-error-string " the global variable \*[doc-Va-font]errno\f[P]
5824 .as doc-func-error-string " is set to indicate the error.
5827 .\" NS Rv user macro
5828 .\" NS return values
5830 .\" NS width register `Rv' set in doc-common
5832 .\" NS local variables:
5837 .\" XXX: what does this function without `-std'?
5840 . tm Usage: .Rv [-std] (#\n[.c])
5842 . \" .ds doc-macro-name Rv
5843 . \" .nr doc-arg-ptr 0
5845 . \" .ds doc-arg1 \$2
5846 . \" .ds doc-arg2 \$3
5847 . \" .ds doc-arg3 \$4
5848 . \" .ds doc-arg4 \$5
5849 . \" .ds doc-arg5 \$6
5850 . \" .ds doc-arg6 \$7
5851 . \" .ds doc-arg7 \$8
5852 . \" .ds doc-arg8 \$9
5854 . \" .nr doc-num-args (\n[.$] - 1)
5857 . doc-reg-Rv \*[doc-section]
5858 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
5859 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
5863 . nop \&\*[doc-func-error-string]
5868 .\" NS Mt user macro
5869 .\" NS mailto (for conversion to HTML)
5872 . \" XXX: error handling missing
5877 .\" NS Lk user macro
5878 .\" NS link (for conversion to HTML)
5880 .\" NS local variables:
5881 .\" NS doc-str-Lk, doc-reg-Lk
5884 . ds doc-str-Lk Sy \$@
5886 . ie (\n[.$] > 1) \{\
5887 . doc-get-arg-type \$2
5888 . ie (\[doc-arg-type] < 3) \{\
5890 . ds doc-str-Lk Sy "\$1"
5891 . doc-get-width "\$1"
5894 . as doc-str-Lk " \$@
5897 . doc-get-width "\$1"
5900 . doc-get-width "\$1"
5906 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
5916 . tm mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
5917 . ab Should this have been `.Em ...'?