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.
46 . ab This version of mdoc can be run with groff only!
54 .\" Load start-up files
55 .ie t .mso mdoc/doc-ditroff.new
56 .el .mso mdoc/doc-nroff.new
58 .mso mdoc/doc-common.new
59 .mso mdoc/doc-syms.new
62 .\" NS doc-inline-debug user register (bool)
63 .\" NS inline debug mode (inline if 1, to stderr if 0 (default))
65 .if !r doc-inline-debug .nr doc-inline-debug 0
68 .\" NS doc-debug global register (bool)
69 .\" NS debug mode (1 if active, 0 otherwise (default))
75 .\" NS start/stop debug mode (`.Db'/`.Db on'/`.Db off')
77 .\" NS without argument, toggle debug status
94 . tm Usage: .Db [on | off] (#\n[.c])
97 . ie \n[doc-debug] \{\
108 .\" NS doc-macro-name global string
109 .\" NS name of calling request (set in each user-requestable macro)
114 .\" NS doc-arg-limit global register
115 .\" NS total number of arguments
120 .\" NS doc-num-args global register
121 .\" NS number of arguments to handle (must be set to \n[.$] prior to
122 .\" NS `doc-parse-arg-vector' request)
127 .\" NS doc-arg-ptr global register
128 .\" NS argument pointer
133 .\" NS doc-argXXX global string
134 .\" NS argument vector
136 .\" NS limit: doc-arg-limit
141 .\" NS doc-typeXXX global register
142 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
143 .\" NS punctuation prefix=4)
145 .\" NS limit: doc-arg-limit
150 .\" NS doc-spaceXXX global string
153 .\" NS limit: doc-arg-limit
158 .\" NS doc-out-string global string
159 .\" NS main working buffer
164 .\" NS doc-curr-space global string
165 .\" NS current space string
170 .\" NS doc-no-space global register (bool)
171 .\" NS whether no space shall be inserted
176 .\" NS doc-parse-args macro
177 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
180 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
181 .\" NS doc-arg-ptr, doc-out-string, doc-curr-space
183 .\" NS local variables:
184 .\" NS doc-str-dpa, doc-reg-dpa, doc-reg-dpa1
187 . nr doc-arg-limit +1
189 . \" handle `|' specially
191 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
193 . ds doc-arg\n[doc-arg-limit] "\$1
195 . \" get argument type and set spacing
196 . doc-get-arg-type* \n[doc-arg-limit]
197 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
198 . doc-set-spacing-\n[doc-arg-type]
200 . if \n[doc-debug] \{\
201 . ie (\n[doc-arg-type] == 1) \
202 . ds doc-str-dpa macro
204 . ie (\n[doc-arg-type] == 2) \
205 . ds doc-str-dpa string
207 . ie (\n[doc-arg-type] == 3) \
208 . ds doc-str-dpa closing punctuation or suffix
210 . ds doc-str-dpa opening punctuation or prefix
213 . ie \n[doc-inline-debug] \{\
215 . nr doc-reg-dpa \n[.i]u
216 . in -\n[doc-reg-dpa]u
218 . if (\n[doc-arg-limit] == 1) \{\
219 . nop \f[B]DEBUG(doc-parse-args) MACRO:\f[P] `.\*[doc-macro-name]'
220 . nop \& \f[B]Line #:\f[P] \n[.c]
222 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
223 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
224 . nop \ \f[B]Length:\f[P] \n[doc-width]
225 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
226 . nop \ \f[B]Type:\f[P] \*[doc-str-dpa]
229 . if (\n[doc-arg-limit] == 1) \{\
230 . tmc "DEBUG (doc-parse-args)
231 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
233 . tmc " Argc: \n[doc-arg-limit]
234 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
235 . tm1 " Length: \n[doc-width]
236 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
237 . tm1 " Type: \*[doc-str-dpa]
240 . \" check whether we have processed the last parameter
241 . ie (\n[.$] == 1) \{\
244 . \" Usually, an mdoc macro will call `doc-print-out-string' to print
245 . \" `doc-out-string'. This causes the insertion of a space since
246 . \" `.nop' is used. But if we are in an enclosure, no printing occurs
247 . \" until we have left the outermost enclosure (i.e.,
248 . \" `doc-nesting-level' is zero again), so spaces must be explicitly
249 . \" inserted -- if we are neither in an diversion nor `doc-no-space'
250 . \" is set. The latter is active for a closing/closing or
251 . \" opening/opening request.
252 . if \n[doc-nesting-level] \
253 . if !\n[doc-in-diversion] \
254 . if !\n[doc-func-arg-count] \
255 . if !\n[doc-no-space] \
256 . as doc-out-string "\*[doc-curr-space]
259 . nr doc-is-opening 0
261 . \" use space after last parameter as the current one
262 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
264 . if \n[doc-debug] \{\
267 . ie \n[doc-inline-debug] \{\
268 . nop MACRO REQUEST: \t.\*[doc-macro-name]
269 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
270 . nop "\*[doc-arg\n[doc-reg-dpa1]]"
274 . in \n[doc-reg-dpa]u
277 . tmc " MACRO REQUEST: .\*[doc-macro-name]
278 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
279 . tmc " "\*[doc-arg\n[doc-reg-dpa1]]"
291 .\" NS doc-parse-arg-vector macro
292 .\" NS parse argument vector (recursive)
294 .\" NS cf. comments in doc-parse-args
297 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
298 .\" NS doc-num-args, doc-arg-ptr, doc-out-string, doc-curr-space
300 .\" NS local variables:
301 .\" NS doc-str-dpav, doc-reg-dpav, doc-reg-dpav1
303 .de doc-parse-arg-vector
304 . nr doc-arg-limit +1
306 . if "\*[doc-arg\n[doc-arg-limit]]"|" \
307 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
309 . doc-get-arg-type* \n[doc-arg-limit]
310 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
311 . doc-set-spacing-\n[doc-arg-type]
313 . if \n[doc-debug] \{\
314 . ie (\n[doc-arg-type] == 1) \
315 . ds doc-str-dpav macro
317 . ie (\n[doc-arg-type] == 2) \
318 . ds doc-str-dpav string
320 . ie (\n[doc-arg-type] == 3) \
321 . ds doc-str-dpav closing punctuation or suffix
323 . ds doc-str-dpav opening punctuation or prefix
326 . ie \n[doc-inline-debug] \{\
328 . nr doc-reg-dpav \n[.i]u
329 . in -\n[doc-reg-dpav]u
331 . if (\n[doc-arg-limit] == 1) \{\
332 . nop \f[B]DEBUG(doc-parse-arg-vector)
333 . nop MACRO:\f[P] `.\*[doc-macro-name]'
334 . nop \& \f[B]Line #:\f[P] \n[.c]
336 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
337 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
338 . nop \ \f[B]Length:\f[P] \n[doc-width]
339 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
340 . nop \ \f[B]Type:\f[P] \*[doc-str-dpav]
343 . if (\n[doc-arg-limit] == 1) \{\
344 . tmc "DEBUG(doc-parse-arg-vector)
345 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
347 . tmc " Argc: \n[doc-arg-limit]
348 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
349 . tm1 " Length: \n[doc-width]
350 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
351 . tm1 " Type: \*[doc-str-dpav]
354 . ie (\n[doc-num-args] == 1) \{\
357 . if \n[doc-nesting-level] \
358 . if !\n[doc-in-diversion] \
359 . if !\n[doc-func-arg-count] \
360 . if !\n[doc-no-space] \
361 . as doc-out-string "\*[doc-curr-space]
364 . nr doc-is-opening 0
366 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
370 . if \n[doc-debug] \{\
373 . ie \n[doc-inline-debug] \{\
374 . nop \tMACRO REQUEST: .\*[doc-macro-name]
375 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
376 . nop "\*[doc-arg\n[doc-reg-dpav1]]"
377 . nr doc-reg-dpav1 +1
380 . in \n[doc-reg-dpav]u
383 . tmc " MACRO REQUEST: .\*[doc-macro-name]
384 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
385 . tmc " "\*[doc-arg\n[doc-reg-dpav1]]"
386 . nr doc-reg-dpav1 +1
392 . doc-parse-arg-vector
397 .\" NS doc-remaining-args macro
398 .\" NS output remaining arguments as-is, separated by spaces (until
399 .\" NS `doc-num-args' is exhausted), to `doc-out-string'
402 .\" NS doc-num-args, doc-arg-ptr, doc-out-string
404 .de doc-remaining-args
406 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
408 . ie (\n[doc-num-args] == 1) \{\
413 . as doc-out-string "\*[doc-space]
420 .\" NS doc-append-arg macro
421 .\" NS append one argument to argument vector:
422 .\" NS `.doc-append-arg [arg] [type]'
425 .\" NS doc-argXXX, doc-typeXXX, doc-arg-limit
428 . nr doc-arg-limit +1
429 . ds doc-arg\n[doc-arg-limit] "\$1
430 . nr doc-type\n[doc-arg-limit] \$2
431 . doc-set-spacing-\$2
435 .\" NS doc-print-and-reset macro
436 .\" NS print doc-out-string and clean up argument vectors
438 .de doc-print-and-reset
439 . doc-print-out-string
444 .\" NS doc-reset-args macro
445 .\" NS reset argument counters
448 .\" NS doc-arg-limit, doc-arg-ptr
456 .\" NS doc-print-out-string macro
457 .\" NS print `doc-out-string', possibly ending a diversion, enabling
458 .\" NS hyphenation afterwards
461 .\" NS doc-out-string, doc-curr-space
463 .de doc-print-out-string
464 . ie \n[doc-in-diversion] \{\
465 . ie (\n[doc-in-list] : \n[doc-nesting-level]) \{\
466 . if !\n[doc-no-printing] \{\
467 . if !\n[doc-space-mode] \
468 . as doc-out-string \c
469 . nop \&\*[doc-out-string]
474 . doc-end-diversion-and-print
477 . ie (\n[doc-in-list] : \n[doc-nesting-level]) \{\
478 . if \n[doc-space-mode] \
479 . if !\n[doc-list-immediate] \
480 . doc-save-and-divert
483 . if !\n[doc-no-printing] \{\
484 . nop \&\*[doc-out-string]
493 .\" NS doc-diversion diversion
494 .\" NS diversion string
497 .\" NS doc-saved-out-string global string
498 .\" NS saved doc-out-string
500 .ds doc-saved-out-string
503 .\" NS doc-in-diversion global register (bool)
504 .\" NS whether we are in a diversion
506 .nr doc-in-diversion 0
509 .\" NS doc-save-and-divert macro
510 .\" NS save doc-out-string, restore fill mode, and divert
513 .\" NS doc-out-string, doc-saved-out-string, doc-diversion,
514 .\" NS doc-in-diversion
516 .de doc-save-and-divert
517 . nr doc-in-diversion 1
518 . ds doc-saved-out-string "\*[doc-out-string]
520 . ev doc-divert-environment
524 . tm begin of `doc-diversion' at line #\n[.c]
529 .\" NS doc-end-diversion-and-print macro
530 .\" NS end diversion and print
533 .\" NS doc-out-string, doc-in-diversion
535 .\" NS local variables:
538 .de doc-end-diversion-and-print
543 . \" insert diversion only if it contains printable stuff
545 . ds doc-str-dedap \&\*[doc-diversion]\c
546 . ds doc-out-string "\*[doc-saved-out-string]\*[doc-str-dedap]\*[doc-out-string]
549 . ds doc-out-string "\*[doc-saved-out-string]\*[doc-out-string]
551 . nop \&\*[doc-out-string]
554 . nr doc-in-diversion 0
560 .\" NS doc-curr-font global register
561 .\" NS saved current font
563 .nr doc-curr-font \n[.f]
566 .\" NS doc-curr-size global register
567 .\" NS saved current font size
569 .nr doc-curr-size \n[.s]
575 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
578 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
581 .\" NS local variables:
582 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
584 .\" NS width register `Fl' set in doc-common
587 . as doc-out-string \*[doc-Fl-font]
589 . if !\n[doc-arg-limit] \{\
591 . ds doc-macro-name Fl
596 . as doc-out-string \|\-\|\f[P]\s[0]
597 . doc-print-out-string
600 . if \n[doc-arg-limit] \{\
602 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
604 . as doc-out-string \|\-\f[P]\s[0]
605 . doc-print-and-reset
608 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
609 . as doc-out-string \|\-\f[P]\s[0]
610 . \*[doc-arg\n[doc-arg-ptr]]
613 . nr doc-curr-font \n[.f]
614 . nr doc-curr-size \n[.s]
616 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
617 . as doc-out-string \|\-\|
625 .\" NS doc-flag-recursion macro
626 .\" NS `Fl' flag recursion routine (special handling)
629 .\" NS doc-arg-ptr, doc-out-string
631 .\" NS local variables:
632 .\" NS doc-str-dfr, doc-reg-dfr, doc-reg-dfr1
634 .de doc-flag-recursion
635 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
636 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
640 . ie (\n[doc-reg-dfr1] == 1) \{\
641 . as doc-out-string \f[P]\s[0]
645 . nr doc-reg-dfr \n[doc-arg-ptr]
647 . ie (\n[doc-reg-dfr1] == 2) \{\
648 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
649 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
651 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
652 . if \n[doc-reg-Fl] \
653 . as doc-out-string \|\-\*[doc-space]
654 . as doc-out-string \&\*[Ba]
657 . ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
658 . if \n[doc-reg-Fl] \
659 . as doc-out-string \|\-\*[doc-space]
660 . as doc-out-string \f[R]|\f[P]
663 . \" two consecutive hyphen characters?
664 . ie "\*[doc-str-dfr]"-" \
665 . as doc-out-string \|\-\^\-\|
667 . as doc-out-string \|\-\*[doc-str-dfr]
670 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
671 . as doc-out-string "\*[doc-str-dfr]\f[P]\s[0]
674 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
676 . if (\n[doc-reg-dfr1] == 4) \
677 . as doc-out-string \|\-
678 . as doc-out-string \f[P]\s[0]
679 . doc-print-and-reset
683 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
684 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
685 . as doc-out-string \|\-
687 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
690 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
694 . doc-flag-recursion \$@
699 .\" NS doc-print-recursive macro
700 .\" NS general name recursion routine (print remaining arguments)
702 .\" NS hyphenation is disabled
705 .\" NS doc-arg-ptr, doc-out-string
707 .\" NS local variables:
708 .\" NS doc-str-dpr, doc-reg-dpr, doc-reg-dpr1
710 .de doc-print-recursive
711 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
712 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
716 . ie (\n[doc-reg-dpr1] == 1) \{\
717 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
721 . nr doc-reg-dpr \n[doc-arg-ptr]
723 . ie (\n[doc-reg-dpr1] == 2) \
724 . as doc-out-string \&\*[doc-str-dpr]
726 . \" punctuation character
727 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
728 . as doc-out-string "\*[doc-str-dpr]\f[P]\s[0]
732 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
734 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
735 . doc-print-and-reset
738 . as doc-out-string "\*[doc-space\n[doc-reg-dpr]]
739 . doc-print-recursive
745 .\" NS command line `argument' macro: `.Ar [args ...]'
748 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
751 .\" NS width register `Ar' set in doc-common
754 . as doc-out-string \*[doc-Ar-font]
756 . if !\n[doc-arg-limit] \{\
758 . ds doc-macro-name Ar
763 . as doc-out-string \&file\ ...\f[P]\s[0]
764 . doc-print-out-string
767 . if \n[doc-arg-limit] \{\
769 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
770 . as doc-out-string \&file\ ...\f[P]\s[0]
771 . doc-print-and-reset
774 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
775 . as doc-out-string \&file\ ...\f[P]\s[0]
776 . \*[doc-arg\n[doc-arg-ptr]]
779 . nr doc-curr-font \n[.f]
780 . nr doc-curr-size \n[.s]
781 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
782 . as doc-out-string \&file\ ...
783 . doc-print-recursive
792 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
795 .\" NS width register `Ad' set in doc-common
798 . if !\n[doc-arg-limit] \{\
800 . ds doc-macro-name Ad
804 . tm Usage: .Ad address ... \*[doc-punct-chars] (#\n[.c])
808 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
809 . as doc-out-string \*[doc-Ad-font]
810 . nr doc-curr-font \n[.f]
811 . nr doc-curr-size \n[.s]
812 . doc-print-recursive
817 .\" NS doc-in-synopsis-count global register
818 .\" NS whether we have more than a single item in synopsis
820 .nr doc-in-synopsis-count 0
823 .\" NS doc-indent-synopsis global register
824 .\" NS indentation in synopsis
826 .nr doc-indent-synopsis 0
830 .\" NS Config declaration (for section 4 SYNOPSIS)
832 .\" NS this function causes a break; it uses the `Nm' font
835 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
836 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis
838 .\" NS width register `Cd' set in doc-common
840 .\" needs work - not very translatable
843 . if !\n[doc-arg-limit] \{\
845 . ds doc-macro-name Cd
849 . tm Usage: .Cd Configuration file declaration (#\n[.c])
855 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
856 . as doc-out-string \*[doc-Nm-font]
857 . nr doc-curr-font \n[.f]
858 . nr doc-curr-size \n[.s]
860 . ie \n[doc-in-synopsis-count] \{\
861 . if "\*[doc-macro-name]"Cd" \{\
863 . ie (\n[doc-in-synopsis-count] > 1) \
866 . if !\n[doc-indent-synopsis] \
867 . nr doc-indent-synopsis \n[doc-display-indent]u
869 . in +\n[doc-indent-synopsis]u
870 . ti -\n[doc-indent-synopsis]u
871 . nr doc-in-synopsis-count +1
874 . doc-print-recursive
875 . in -\n[doc-indent-synopsis]u
878 . doc-print-recursive
884 .\" NS Interactive command modifier (flag)
887 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
890 .\" NS width register `Cm' set in doc-common
893 . if !\n[doc-arg-limit] \{\
895 . ds doc-macro-name Cm
899 . tmc Usage: .Cm Interactive command modifier ...
900 . tm1 " \*[doc-punct-chars] (#\n[.c])
904 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
905 . as doc-out-string \*[doc-Cm-font]
906 . nr doc-curr-font \n[.f]
907 . nr doc-curr-size \n[.s]
908 . doc-print-recursive
914 .\" NS define variable
916 .\" NS this function uses the `Er' font
919 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
922 .\" NS width register `Dv' set in doc-common
925 . if !\n[doc-arg-limit] \{\
927 . ds doc-macro-name Dv
931 . tm Usage: .Dv define_variable ... \*[doc-punct-chars] (#\n[.c])
935 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
936 . as doc-out-string \*[doc-Er-font]
937 . nr doc-curr-font \n[.f]
938 . nr doc-curr-size \n[.s]
939 . doc-print-recursive
948 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
951 .\" NS width register `Em' set in doc-common
954 . if !\n[doc-arg-limit] \{\
956 . ds doc-macro-name Em
960 . tm Usage: .Em text ... \*[doc-punct-chars] (#\n[.c])
964 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
965 . as doc-out-string \*[doc-Em-font]
966 . nr doc-curr-font \n[.f]
967 . nr doc-curr-size \n[.s]
968 . doc-print-recursive
977 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
980 .\" NS width register `Er' set in doc-common
983 . if !\n[doc-arg-limit] \{\
985 . ds doc-macro-name Er
989 . tm Usage: .Er errno_type ... \*[doc-punct-chars] (#\n[.c])
993 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
994 . as doc-out-string \*[doc-Er-font]
995 . nr doc-curr-font \n[.f]
996 . nr doc-curr-size \n[.s]
997 . doc-print-recursive
1002 .\" NS Ev user macro
1003 .\" NS environment variable
1006 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1007 .\" NS doc-curr-size
1009 .\" NS width register `Ev' set in doc-common
1012 . if !\n[doc-arg-limit] \{\
1014 . ds doc-macro-name Ev
1015 . doc-parse-args \$@
1018 . tm Usage: .Ev enviroment_variable ... \*[doc-punct-chars] (#\n[.c])
1022 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1023 . as doc-out-string \*[doc-Ev-font]
1024 . nr doc-curr-font \n[.f]
1025 . nr doc-curr-size \n[.s]
1026 . doc-print-recursive
1031 .\" NS doc-have-decl global register (bool)
1032 .\" NS subroutine test (in synopsis only)
1037 .\" NS doc-have-var global register (bool)
1038 .\" NS whether last type is a variable type
1043 .\" NS doc-do-func-decl macro
1044 .\" NS do someting special while in SYNOPSIS
1047 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
1050 .de doc-do-func-decl
1051 . if \n[doc-in-synopsis-count] \{\
1052 . \" if a variable type was the last thing given, want vertical space
1053 . if \n[doc-have-var] \{\
1057 . \" if a subroutine was the last thing given, want vertical space
1058 . if \n[doc-have-func] \{\
1059 . ie \n[doc-have-decl] \
1065 . nr doc-have-decl 1
1068 . nr doc-curr-font \n[.f]
1069 . nr doc-curr-size \n[.s]
1073 .\" NS Fd user macro
1074 .\" NS function declaration -- not callable
1076 .\" NS this function causes a break
1078 .\" NS width register `Fd' set in doc-common
1081 . ie \n[doc-arg-limit] \
1082 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
1085 . nop \*[doc-Fd-font]\$*
1087 . ft \n[doc-curr-font]
1088 . ps \n[doc-curr-size]
1093 .\" NS In user macro
1094 .\" NS #include statement - not callable (& no err check)
1096 .\" NS this function causes a break; it uses the `Fd' font
1098 .\" NS width register `In' set in doc-common
1101 . ie \n[doc-arg-limit] \
1102 . tm Usage: .In #include_statement -- In is not callable (#\n[.c])
1105 . nop \*[doc-Fd-font]#include <\$1>
1107 . ft \n[doc-curr-font]
1108 . ps \n[doc-curr-size]
1113 .\" NS Fr user macro
1114 .\" NS function return value
1116 .\" NS this function uses the `Ar' font
1119 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1120 .\" NS doc-curr-size
1122 .\" NS width register `Fr' set in doc-common
1125 . if !\n[doc-arg-limit] \{\
1127 . ds doc-macro-name Fr
1128 . doc-parse-args \$@
1131 . tm Usage: .Fr Function_return_value... \*[doc-punct-chars] (#\n[.c])
1135 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1136 . as doc-out-string \*[doc-Ar-font]
1137 . nr doc-curr-font \n[.f]
1138 . nr doc-curr-size \n[.s]
1139 . doc-print-recursive
1144 .\" NS Ic user macro
1145 .\" NS interactive command
1148 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1149 .\" NS doc-curr-size
1151 .\" NS width register `Ic' set in doc-common
1154 . if !\n[doc-arg-limit] \{\
1156 . ds doc-macro-name Ic
1157 . doc-parse-args \$@
1160 . tm Usage: .Ic Interactive command ... \*[doc-punct-chars] (#\n[.c])
1164 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1165 . as doc-out-string \*[doc-Ic-font]
1166 . nr doc-curr-font \n[.f]
1167 . nr doc-curr-size \n[.s]
1168 . doc-print-recursive
1173 .\" NS Li user macro
1177 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1178 .\" NS doc-curr-size
1180 .\" NS width register `Li' set in doc-common
1183 . if !\n[doc-arg-limit] \{\
1185 . ds doc-macro-name Li
1186 . doc-parse-args \$@
1189 . tm Usage: .Li argument ... \*[doc-punct-chars] (#\n[.c])
1193 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1194 . as doc-out-string \*[doc-Li-font]
1195 . nr doc-curr-font \n[.f]
1196 . nr doc-curr-size \n[.s]
1197 . doc-print-recursive
1202 .\" NS Or user macro
1203 .\" NS pipe symbol (OR)
1206 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1207 .\" NS doc-curr-size
1209 .\" NS width register `Or' set in doc-common
1211 .\" XXX: What is this function good for? It sets a font but does not print
1212 .\" a pipe symbol. And it isn't documented.
1215 . if !\n[doc-arg-limit] \{\
1217 . ds doc-macro-name Or
1218 . doc-parse-args \$@
1221 . tm Usage: .Or ... \*[doc-punct-chars] (#\n[.c])
1225 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1226 . as doc-out-string \*[doc-Ic-font]
1227 . nr doc-curr-font \n[.f]
1228 . nr doc-curr-size \n[.s]
1229 . doc-print-recursive
1234 .\" NS Ms user macro
1237 .\" NS this function uses the `Sy' font
1240 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1241 .\" NS doc-curr-size
1243 .\" NS width register `Ms' set in doc-common
1246 . if !\n[doc-arg-limit] \{\
1248 . ds doc-macro-name Ms
1249 . doc-parse-args \$@
1252 . tm Usage: .Ms Math symbol ... \*[doc-punct-chars] (#\n[.c])
1256 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1257 . as doc-out-string \*[doc-Sy-font]
1258 . nr doc-curr-font \n[.f]
1259 . nr doc-curr-size \n[.s]
1260 . doc-print-recursive
1265 .\" NS doc-command-name global string
1266 .\" NS save first invocation of .Nm
1268 .ds doc-command-name
1271 .\" NS Nm user macro
1272 .\" NS name of command or page topic
1275 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1276 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
1277 .\" NS doc-command-name
1279 .\" NS width register `Nm' set in doc-common
1282 . if !\n[doc-arg-limit] \{\
1283 . ds doc-macro-name Nm
1285 . doc-parse-args \$@
1287 . ie "\*[doc-command-name]"" \
1288 . tm Usage: .Nm Name ... \*[doc-punct-chars] (#\n[.c])
1290 . doc-parse-args \*[doc-command-name]
1293 . if \n[doc-arg-limit] \{\
1295 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1297 . as doc-out-string \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
1298 . doc-print-and-reset
1301 . as doc-out-string \*[doc-Nm-font]
1302 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \
1303 . as doc-out-string \&\*[doc-command-name]\f[P]\s[0]
1305 . nr doc-curr-font \n[.f]
1306 . nr doc-curr-size \n[.s]
1308 . \" handle `.Nm ...' in SYNOPSIS
1309 . if \n[doc-in-synopsis-count] \{\
1310 . if "\*[doc-macro-name]"Nm" \{\
1312 . in -\n[doc-indent-synopsis]u
1313 . ie (\n[doc-in-synopsis-count] > 1) \
1316 . if !\n[doc-indent-synopsis] \{\
1317 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]
1318 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1320 . in +\n[doc-indent-synopsis]u
1321 . ti -\n[doc-indent-synopsis]u
1322 . nr doc-in-synopsis-count +1
1324 . if "\*[doc-command-name]"" \
1325 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1327 . doc-print-recursive
1332 .\" NS Pa user macro
1333 .\" NS pathname: `.Pa [arg ...]'
1336 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1337 .\" NS doc-curr-size
1339 .\" NS width register `Pa' set in doc-common
1342 . if !\n[doc-arg-limit] \{\
1344 . ds doc-macro-name Pa
1345 . doc-parse-args \$@
1349 . nop \*[doc-Pa-font]~\f[P]\s[0]
1353 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1354 . as doc-out-string \*[doc-Pa-font]
1355 . nr doc-curr-font \n[.f]
1356 . nr doc-curr-size \n[.s]
1357 . doc-print-recursive
1362 .\" NS Sy user macro
1366 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1367 .\" NS doc-curr-size
1369 .\" NS width register `Sy' set in doc-common
1372 . if !\n[doc-arg-limit] \{\
1374 . ds doc-macro-name Sy
1375 . doc-parse-args \$@
1378 . tm Usage: .Sy symbolic_text ... \*[doc-punct-chars] (#\n[.c])
1382 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1383 . as doc-out-string \*[doc-Sy-font]
1384 . nr doc-curr-font \n[.f]
1385 . nr doc-curr-size \n[.s]
1386 . doc-print-recursive
1391 .\" NS Me user macro
1395 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1396 .\" NS doc-curr-size
1398 .\" NS width register `Me' set in doc-common
1401 . if !\n[doc-arg-limit] \{\
1403 . ds doc-macro-name Me
1404 . doc-parse-args \$@
1407 . tm Usage: .Me menu_entry ... \*[doc-punct-chars] (#\n[.c])
1411 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1412 . as doc-out-string \*[doc-Me-font]
1413 . nr doc-curr-font \n[.f]
1414 . nr doc-curr-size \n[.s]
1415 . doc-print-recursive
1420 .\" NS Tn user macro
1424 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1425 .\" NS doc-curr-size
1427 .\" NS width register `Tn' set in doc-common
1430 . if !\n[doc-arg-limit] \{\
1432 . ds doc-macro-name Tn
1433 . doc-parse-args \$@
1436 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1440 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1441 . as doc-out-string \&\*[doc-Tn-font-shape]\*[doc-Tn-font-size]
1442 . nr doc-curr-font \n[.f]
1443 . nr doc-curr-size \n[.s]
1444 . doc-print-recursive
1449 .\" NS doc-reference-trademark macro
1450 .\" NS .Tn for inside of references
1453 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1454 .\" NS doc-curr-size
1456 .\" NS the code for references below checks for `Tn'!
1458 .de doc-reference-trademark
1459 . if !\n[doc-arg-limit] \{\
1461 . ds doc-macro-name Tn
1462 . doc-parse-args \$@
1465 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1469 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1470 . as doc-out-string \&\*[doc-Tn-font-size]
1471 . nr doc-curr-font \n[.f]
1472 . nr doc-curr-size \n[.s]
1478 .\" NS Va user macro
1479 .\" NS variable name
1482 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1483 .\" NS doc-curr-size
1485 .\" NS width register `Va' set in doc-common
1488 . if !\n[doc-arg-limit] \{\
1490 . ds doc-macro-name Va
1491 . doc-parse-args \$@
1494 . tm Usage: .Va variable_name ... \*[doc-punct-chars] (#\n[.c])
1498 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1499 . as doc-out-string \*[doc-Va-font]
1500 . nr doc-curr-font \n[.f]
1501 . nr doc-curr-size \n[.s]
1502 . doc-print-recursive
1507 .\" NS No user macro
1508 .\" NS normal text macro (default text style if mess up)
1511 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1512 .\" NS doc-curr-size
1514 .\" NS width register `No' set in doc-common
1517 . as doc-out-string \*[doc-No-font]
1519 . if !\n[doc-arg-limit] \{\
1521 . ds doc-macro-name No
1522 . doc-parse-args \$@
1525 . tm Usage: .No normal_text ... \*[doc_punct_chars] (#\n[.c])
1529 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1530 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
1531 . \*[doc-arg\n[doc-arg-ptr]]
1533 . nr doc-curr-font \n[.f]
1534 . nr doc-curr-size \n[.s]
1535 . doc-print-recursive
1538 . doc-print-and-reset
1542 .\" NS doc-quote-left global string
1543 .\" NS left quotation character for `doc-enclose-string' and
1544 .\" NS `doc-enclose-open'
1549 .\" NS doc-quote-right global string
1550 .\" NS right quotation character for `doc-enclose-string' and
1551 .\" NS `doc-enclose-close'
1556 .\" NS Op user macro
1557 .\" NS option expression (i.e., enclose string in square brackets)
1560 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1562 .\" NS width register `Op' set in doc-common
1565 . if !\n[doc-arg-limit] \
1566 . ds doc-macro-name Op
1568 . ds doc-quote-left "\*[doc-left-bracket]
1569 . ds doc-quote-right "\*[doc-right-bracket]
1571 . doc-enclose-string \$@
1575 .\" NS Aq user macro
1576 .\" NS enclose string in angle brackets
1579 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1581 .\" NS width register `Aq' set in doc-common
1584 . if !\n[doc-arg-limit] \
1585 . ds doc-macro-name Aq
1587 . ds doc-quote-left <
1588 . ds doc-quote-right >
1590 . doc-enclose-string \$@
1594 .\" NS Bq user macro
1595 .\" NS enclose string in square brackets
1598 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1600 .\" NS width register `Bq' set in doc-common
1603 . if !\n[doc-arg-limit] \
1604 . ds doc-macro-name Bq
1606 . ds doc-quote-left "\*[doc-left-bracket]
1607 . ds doc-quote-right "\*[doc-right-bracket]
1609 . doc-enclose-string \$@
1613 .\" NS Brq user macro
1614 .\" NS enclose string in braces
1617 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1619 .\" NS width register `Brq' set in doc-common
1622 . if !\n[doc-arg-limit] \
1623 . ds doc-macro-name Brq
1625 . ds doc-quote-left {
1626 . ds doc-quote-right }
1628 . doc-enclose-string \$@
1632 .\" NS Dq user macro
1633 .\" NS enclose string in double quotes
1636 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1638 .\" NS width register `Dq' set in doc-common
1641 . if !\n[doc-arg-limit] \
1642 . ds doc-macro-name Dq
1644 . ds doc-quote-left "\*[Lq]
1645 . ds doc-quote-right "\*[Rq]
1647 . doc-enclose-string \$@
1651 .\" NS Eq user macro
1652 .\" NS enclose string in user-defined quotes (args 1 and 2)
1655 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1657 .\" NS width register `Eq' set in doc-common
1660 . if !\n[doc-arg-limit] \
1661 . ds doc-macro-name Eq
1663 . ds doc-quote-left "\$1
1664 . ds doc-quote-right "\$2
1667 . doc-enclose-string \$@
1671 .\" NS Pq user macro
1672 .\" NS enclose string in parentheses
1675 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1677 .\" NS width register `Pq' set in doc-common
1680 . if !\n[doc-arg-limit] \
1681 . ds doc-macro-name Pq
1683 . ds doc-quote-left "\*[doc-left-parenthesis]
1684 . ds doc-quote-right "\*[doc-right-parenthesis]
1686 . doc-enclose-string \$@
1690 .\" NS Ql user macro
1691 .\" NS quoted literal
1693 .\" is in file doc-[dit|n]roff
1696 .\" NS Qq user macro
1697 .\" NS enclose string in straight double quotes
1700 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1702 .\" NS width register `Qq' set in doc-common
1705 . if !\n[doc-arg-limit] \
1706 . ds doc-macro-name Qq
1708 . ds doc-quote-left "\*[q]
1709 . ds doc-quote-right "\*[q]
1711 . doc-enclose-string \$@
1715 .\" NS Sq user macro
1716 .\" NS enclose string in single quotes
1719 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1721 .\" NS width register `Sq' set in doc-common
1724 . if !\n[doc-arg-limit] \
1725 . ds doc-macro-name Sq
1727 . ds doc-quote-left "\*[doc-left-singlequote]
1728 . ds doc-quote-right "\*[doc-right-singlequote]
1730 . doc-enclose-string \$@
1734 .\" NS Es user macro
1735 .\" NS set up arguments (i.e., the left and right quotation character as
1736 .\" NS first and second argument) for .En call
1739 .\" NS doc-macro-name, doc-quote-left, doc-quote-right, doc-arg-ptr
1742 . if !\n[doc-arg-limit] \{\
1743 . ie (\n[.$] > 2) \{\
1744 . ds doc-macro-name Es
1745 . doc-parse-args \$@
1748 . ds doc-quote-left "\$1
1749 . ds doc-quote-right "\$2
1752 . if \n[doc-arg-limit] \{\
1754 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1756 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1758 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1759 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1761 . doc-print-and-reset
1766 .\" NS doc-is-opening global register (bool)
1767 .\" NS whether current request emits an opening character
1769 .nr doc-is-opening 0
1772 .\" NS doc-enclose-string macro
1773 .\" NS enclose string with given args (e.g. [ and ])
1776 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string
1778 .\" NS local variables:
1779 .\" NS doc-reg-des (for communication with doc-skip-punct-backwards)
1782 .\" NS doc-quote-left, doc-quote-right
1784 .de doc-enclose-string
1785 . ie \n[doc-arg-limit] \
1786 . as doc-out-string \&\*[doc-quote-left]
1789 . \" was the last request on the previous line an opening request?
1790 . if \n[doc-is-opening] \
1792 . doc-parse-args \$@
1793 . as doc-out-string \&\*[doc-quote-left]
1797 . as doc-out-string \&\*[doc-quote-left]\*[doc-quote-right]
1798 . doc-print-out-string
1801 . if \n[doc-arg-limit] \{\
1803 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1805 . as doc-out-string \&\*[doc-quote-right]
1806 . doc-print-and-reset
1809 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1810 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1811 . doc-skip-punct-backwards
1813 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\&\*[doc-arg\n[doc-reg-des]]
1817 . doc-append-arg "\*[doc-quote-right]" 3
1819 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1824 .\" NS En user macro
1825 .\" NS enclose arguments with quotation characters set up with `.Es'
1827 .als En doc-enclose-string
1830 .\" NS doc-skip-punct-backwards macro
1831 .\" NS vector routine (for `doc-enclose-string': trace backwards past
1832 .\" NS trailing punctuation)
1837 .de doc-skip-punct-backwards
1838 . if (\n[doc-type\n[doc-reg-des]] == 3) \{\
1840 . doc-skip-punct-backwards
1845 .\" NS Ao user macro
1849 .\" NS doc-macro-name, doc-quote-left
1851 .\" NS width register `Ao' set in doc-common
1854 . if !\n[doc-arg-limit] \
1855 . ds doc-macro-name Ao
1857 . ds doc-quote-left <
1859 . doc-enclose-open \$@
1863 .\" NS Ac user macro
1867 .\" NS doc-macro-name, doc-quote-right
1869 .\" NS width register `Ac' set in doc-common
1872 . if !\n[doc-arg-limit] \
1873 . ds doc-macro-name Ac
1875 . ds doc-quote-right >
1877 . doc-enclose-close \$@
1881 .\" NS Bo user macro
1885 .\" NS doc-macro-name, doc-quote-left
1887 .\" NS width register `Bo' set in doc-common
1890 . if !\n[doc-arg-limit] \
1891 . ds doc-macro-name Bo
1893 . ds doc-quote-left "\*[doc-left-bracket]
1895 . doc-enclose-open \$@
1899 .\" NS Bc user macro
1900 .\" NS bracket close
1903 .\" NS doc-macro-name, doc-quote-right
1905 .\" NS width register `Bc' set in doc-common
1908 . if !\n[doc-arg-limit] \
1909 . ds doc-macro-name Bc
1911 . ds doc-quote-right "\*[doc-right-bracket]
1913 . doc-enclose-close \$@
1917 .\" NS Bro user macro
1921 .\" NS doc-macro-name, doc-quote-left
1923 .\" NS width register `Bro' set in doc-common
1926 . if !\n[doc-arg-limit] \
1927 . ds doc-macro-name Bo
1929 . ds doc-quote-left {
1931 . doc-enclose-open \$@
1935 .\" NS Brc user macro
1939 .\" NS doc-macro-name, doc-quote-right
1941 .\" NS width register `Brc' set in doc-common
1944 . if !\n[doc-arg-limit] \
1945 . ds doc-macro-name Bc
1947 . ds doc-quote-right }
1949 . doc-enclose-close \$@
1953 .\" NS Do user macro
1954 .\" NS double quote open
1957 .\" NS doc-macro-name, doc-quote-left
1959 .\" NS width register `Do' set in doc-common
1962 . if !\n[doc-arg-limit] \
1963 . ds doc-macro-name Do
1965 . ds doc-quote-left "\*[Lq]
1967 . doc-enclose-open \$@
1971 .\" NS Dc user macro
1972 .\" NS double quote close
1975 .\" NS doc-macro-name, doc-quote-right
1977 .\" NS width register `Dc' set in doc-common
1980 . if !\n[doc-arg-limit] \
1981 . ds doc-macro-name Dc
1983 . ds doc-quote-right "\*[Rq]
1985 . doc-enclose-close \$@
1989 .\" NS Eo user macro
1990 .\" NS enclose open (using first argument as beginning of enclosure)
1993 .\" NS doc-macro-name, doc-quote-left
1995 .\" NS width register `Eo' set in doc-common
1998 . if !\n[doc-arg-limit] \
1999 . ds doc-macro-name Eo
2001 . ds doc-quote-left "\$1
2004 . doc-enclose-open \$@
2008 .\" NS Ec user macro
2009 .\" NS enclose close (using first argument as end of enclosure)
2012 .\" NS doc-macro-name, doc-quote-right
2014 .\" NS width register `Ec' set in doc-common
2017 . if !\n[doc-arg-limit] \
2018 . ds doc-macro-name Ec
2020 . ds doc-quote-right "\$1
2023 . doc-enclose-close \$@
2027 .\" NS Oo user macro
2031 .\" NS doc-macro-name, doc-quote-left
2033 .\" NS width register `Oo' set in doc-common
2036 . if !\n[doc-arg-limit] \
2037 . ds doc-macro-name Oo
2039 . ds doc-quote-left [
2041 . doc-enclose-open \$@
2045 .\" NS Oc user macro
2049 .\" NS doc-macro-name, doc-quote-right
2051 .\" NS width register `Oc' set in doc-common
2054 . if !\n[doc-arg-limit] \
2055 . ds doc-macro-name Oc
2057 . ds doc-quote-right ]
2059 . doc-enclose-close \$@
2063 .\" NS Po user macro
2064 .\" NS parenthesis open
2067 .\" NS doc-macro-name, doc-quote-left
2069 .\" NS width register `Po' set in doc-common
2072 . if !\n[doc-arg-limit] \
2073 . ds doc-macro-name Po
2075 . ds doc-quote-left "\*[doc-left-parenthesis]
2077 . doc-enclose-open \$@
2081 .\" NS Pc user macro
2082 .\" NS parenthesis close
2085 .\" NS doc-macro-name, doc-quote-right
2087 .\" NS width register `Pc' set in doc-common
2090 . if !\n[doc-arg-limit] \
2091 . ds doc-macro-name Pc
2093 . ds doc-quote-right "\*[doc-right-parenthesis]
2095 . doc-enclose-close \$@
2099 .\" NS Qo user macro
2100 .\" NS straight double quote open
2103 .\" NS doc-macro-name, doc-quote-left
2105 .\" NS width register `Qo' set in doc-common
2108 . if !\n[doc-arg-limit] \
2109 . ds doc-macro-name Qo
2111 . ds doc-quote-left "\*[q]
2113 . doc-enclose-open \$@
2117 .\" NS Qc user macro
2118 .\" NS straight double quote close
2121 .\" NS doc-macro-name, doc-quote-right
2123 .\" NS width register `Qc' set in doc-common
2126 . if !\n[doc-arg-limit] \
2127 . ds doc-macro-name Qc
2129 . ds doc-quote-right "\*[q]
2131 . doc-enclose-close \$@
2135 .\" NS So user macro
2136 .\" NS single quote open
2139 .\" NS doc-macro-name, doc-quote-left
2141 .\" NS width register `So' set in doc-common
2144 . if !\n[doc-arg-limit] \
2145 . ds doc-macro-name So
2147 . ds doc-quote-left "\*[doc-left-singlequote]
2149 . doc-enclose-open \$@
2153 .\" NS Sc user macro
2154 .\" NS single quote close
2157 .\" NS doc-macro-name, doc-quote-right
2159 .\" NS width register `Sc' set in doc-common
2162 . if !\n[doc-arg-limit] \
2163 . ds doc-macro-name Sc
2165 . ds doc-quote-right "\*[doc-right-singlequote]
2167 . doc-enclose-close \$@
2171 .\" NS Xo user macro
2175 .\" NS doc-macro-name, doc-quote-left
2177 .\" NS width register `Xo' set in doc-common
2180 . if !\n[doc-arg-limit] \
2181 . ds doc-macro-name Xo
2185 . doc-enclose-open \$@
2189 .\" NS Xc user macro
2193 .\" NS doc-macro-name, doc-quote-right
2195 .\" NS width register `Xc' set in doc-common
2198 . if !\n[doc-arg-limit] \
2199 . ds doc-macro-name Xc
2201 . ds doc-quote-right
2203 . doc-enclose-close \$@
2207 .\" NS doc-nesting-level global register
2208 .\" NS used by `doc-enclose-open' and `doc-enclose-close', `.Fo', and `.Fc'
2210 .nr doc-nesting-level 0
2213 .\" NS doc-in-list global register (bool)
2214 .\" NS whether we are in (logical) .It
2219 .\" NS doc-enclose-open macro
2220 .\" NS enclose string open
2223 .\" NS doc-arg-ptr, doc-out-string, doc-nesting-level
2225 .de doc-enclose-open
2226 . nr doc-nesting-level +1
2228 . ie \n[doc-arg-limit] \
2229 . as doc-out-string \&\*[doc-quote-left]
2232 . \" was the last request on the previous line an opening request?
2233 . if \n[doc-is-opening] \
2235 . doc-parse-args \$@
2236 . as doc-out-string \&\*[doc-quote-left]
2239 . as doc-out-string \&\*[doc-quote-left]
2241 . if !\n[doc-in-diversion] \
2242 . if !(\n[doc-in-list] & \n[doc-nesting-level]) \
2243 . if \n[doc-space-mode] \
2244 . doc-save-and-divert
2245 . nr doc-is-opening 1
2248 . if \n[doc-arg-limit] \{\
2249 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2252 . nr doc-is-opening 1
2256 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
2257 . \*[doc-arg\n[doc-arg-ptr]]
2265 .\" NS doc-enclose-close macro
2266 .\" NS enclose string close
2269 .\" NS doc-out-string, doc-nesting-level
2271 .\" NS local variables:
2274 .de doc-enclose-close
2275 . nr doc-nesting-level -1
2277 . as doc-out-string \&\*[doc-quote-right]
2279 . if !\n[doc-arg-limit] \{\
2282 . doc-parse-args \$@
2285 . doc-print-out-string
2288 . if \n[doc-arg-limit] \{\
2289 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2291 . ie \n[doc-nesting-level] \
2294 . doc-print-and-reset
2297 . nr doc-str-dec (\n[doc-arg-ptr] + 1)
2298 . if (\n[doc-type\n[doc-str-dec]] == 2) \
2299 . as doc-out-string "\*[doc-space\n[doc-arg-limit]]
2303 . \" shall we finish .It request?
2304 . if !"\*[doc-macro-name]"It" \
2305 . if \n[doc-in-list] \
2306 . if !\n[doc-nesting-level] \
2307 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
2311 .\" NS Pf user macro
2312 .\" NS prefix: `.Pf prefix arg ...'
2315 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-quote-left
2317 .\" NS width register `Pf' set in doc-common
2320 . if !\n[doc-arg-limit] \
2321 . ds doc-macro-name Pf
2323 . ds doc-quote-left "\$1
2327 . ie \n[doc-arg-limit] \{\
2328 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2330 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2333 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2336 . as doc-out-string \&\*[doc-quote-left]
2337 . ie (\n[.$] < 2) \{\
2338 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2339 . doc-print-out-string
2342 . doc-parse-args \$@
2345 . if \n[doc-arg-limit] \{\
2347 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2348 . doc-print-and-reset
2350 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2355 .\" NS Ns user macro
2356 .\" NS remove space (space removal done by `doc-parse-args')
2359 .\" NS doc-macro-name
2361 .\" NS width register `Ns' set in doc-common
2364 . if !\n[doc-arg-limit] \{\
2365 . ds doc-macro-name Ns
2367 . doc-parse-args \$@
2369 . tm Usage: .Ns must be called with arguments (#\n[.c])
2376 .\" NS Ap user macro
2377 .\" NS append an apostrophe
2380 .\" NS doc-out-string
2382 .\" NS width register `Ap' set in doc-common
2385 . if !\n[doc-arg-limit] \
2386 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2388 . as doc-out-string \&'
2393 .\" NS doc-space global string
2394 .\" NS current inter-argument space
2396 .ds doc-space "\*[doc-soft-space]
2399 .\" NS doc-soft-space constant string
2400 .\" NS soft (stretchable) space (defined in doc-common)
2403 .\" NS doc-hard-space constant string
2404 .\" NS hard (unpaddable) space (defined in doc-common)
2407 .\" NS doc-set-hard-space macro
2408 .\" NS set current space string to hard (unpaddable) space.
2413 .de doc-set-hard-space
2414 . ds doc-space "\*[doc-hard-space]
2418 .\" NS doc-set-soft-space macro
2419 .\" NS set current space string to soft space (troff limitation)
2424 .de doc-set-soft-space
2425 . ds doc-space "\*[doc-soft-space]
2429 .\" NS doc-space-mode global register (bool)
2430 .\" NS default is one (space mode on)
2432 .nr doc-space-mode 1
2435 .\" NS Sm user macro
2436 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2438 .\" NS without argument, toggle space mode
2441 .\" NS doc-macro-name, doc-arg-limit, doc-num-args, doc-arg-ptr,
2442 .\" NS doc-argXXX, doc-spaceXXX, doc-curr-space, doc-space-mode,
2445 .\" NS width register `Sm' set in doc-common
2447 .\" NS local variables:
2451 . if !\n[doc-arg-limit] \{\
2453 . ds doc-macro-name Sm
2454 . doc-parse-args \$@
2457 . ie \n[doc-space-mode] \
2458 . nr doc-space-mode 0
2460 . nr doc-space-mode 1
2463 . if \n[doc-arg-limit] \{\
2466 . \" avoid a warning message in case `Sm' is the last parameter
2467 . if !d doc-arg\n[doc-arg-ptr] \
2468 . ds doc-arg\n[doc-arg-ptr]
2470 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2471 . ds doc-space "\*[doc-soft-space]
2472 . nr doc-space-mode 1
2475 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2478 . nr doc-space-mode 0
2481 . \" no argument for Sm
2483 . ie \n[doc-space-mode] \
2484 . nr doc-space-mode 0
2486 . nr doc-space-mode 1
2489 . ie \n[doc-space-mode] \{\
2490 . \" recompute space vector for remaining arguments
2491 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2492 . nr doc-arg-limit \n[doc-arg-ptr]
2493 . nr doc-reg-Sm \n[doc-arg-ptr]
2494 . if \n[doc-num-args] \{\
2495 . doc-parse-arg-vector
2496 . nr doc-arg-ptr \n[doc-reg-Sm]
2499 . \" reset remaining space vector elements
2500 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2501 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2502 . ds doc-space\n[doc-reg-Sm]
2504 . \" the body of a `while' request must end with the fitting `\}'!
2508 . \" do we have parameters to print?
2509 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2510 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2511 . ie (\n[doc-arg-ptr] > 1) \
2512 . doc-print-and-reset
2517 . \" skip `Sm' argument
2519 . doc-print-recursive
2524 .\" NS doc-arg-type immediate register
2525 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2526 .\" NS punctuation prefix=4)
2531 .\" NS doc-get-arg-type macro
2532 .\" NS get argument type
2534 .\" NS this macro expects the width of the argument in `doc-width'
2539 .de doc-get-arg-type
2542 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2543 . ie (\n[doc-width] == 1) \{\
2544 . if r doc-punct\$1 \
2545 . nr doc-arg-type \n[doc-punct\$1]
2555 .\" NS doc-get-arg-type* macro
2556 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2558 .\" NS this macro sets the `doc-width' register using the `length' request
2559 .\" NS to get the number of characters in a string literally
2562 .\" NS doc-arg-type, doc-width
2564 .de doc-get-arg-type*
2566 . length doc-width "\*[doc-arg\$1]
2568 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2569 . ie (\n[doc-width] == 1) \{\
2570 . if r doc-punct\*[doc-arg\$1] \
2571 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2574 . if r \*[doc-arg\$1] \
2575 . if d \*[doc-arg\$1] \
2581 .\" NS doc-set-spacing-1 macro
2582 .\" NS set spacing for macros
2587 .\" NS local variables:
2588 .\" NS doc-reg-dssfm, doc-reg-dssfm1
2590 .de doc-set-spacing-1
2591 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2593 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2595 . ie (\n[doc-reg-dssfm1] == 3) \{\
2596 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2597 . ds doc-space\n[doc-reg-dssfm]
2598 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2601 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2603 . ie (\n[doc-reg-dssfm1] == 2) \{\
2604 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2605 . ds doc-space\n[doc-reg-dssfm]
2606 . ds doc-space\n[doc-arg-limit]
2609 . ds doc-space\n[doc-arg-limit]
2614 .\" NS doc-set-spacing-2 macro
2615 .\" NS set spacing for strings
2620 .de doc-set-spacing-2
2621 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2625 .\" NS doc-set-spacing-3 macro
2626 .\" NS set spacing for punctuation suffixes
2631 .\" NS local variables:
2632 .\" NS doc-reg-dssfps
2634 .de doc-set-spacing-3
2635 . if \n[doc-arg-limit] \{\
2636 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2637 . ds doc-space\n[doc-reg-dssfps]
2640 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2644 .\" NS doc-set-spacing-4 macro
2645 .\" NS set spacing for punctuation prefixes
2650 .de doc-set-spacing-4
2651 . ds doc-space\n[doc-arg-limit]
2655 .\" type switches (on current argument doc-arg-ptr)
2658 .\" NS doc-do-1 macro
2659 .\" NS call request if macro
2662 . \*[doc-arg\n[doc-arg-ptr]]
2666 .\" NS doc-do-2 macro
2667 .\" NS call .No if string
2678 .\" NS doc-do-3 macro
2679 .\" NS call .No if punctuation suffix
2690 .\" NS doc-do-4 macro
2691 .\" NS call .No if punctuation prefix
2702 .\" NS doc-do-xref-1 macro
2703 .\" NS ignore if macro
2709 .\" NS doc-do-xref-2 macro
2710 .\" NS ignore if string
2716 .\" NS doc-do-xref-3 macro
2717 .\" NS append if punctuation suffix
2720 .\" NS doc-arg-ptr, doc-out-string
2723 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2730 .\" NS doc-do-xref-4 macro
2731 .\" NS append if punctuation prefix
2734 .\" NS doc-arg-ptr, doc-out-string
2737 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2744 .\" NS doc-curr-font-for-Ef global register
2745 .\" NS saved current font from `Bf' request
2747 .nr doc-curr-font-for-Ef 0
2750 .\" NS doc-curr-size-for-Ef global register
2751 .\" NS saved current size from `Bf' request
2753 .nr doc-curr-size-for-Ef 0
2756 .\" NS Bf user macro
2757 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2760 .\" NS doc-macro-name, doc-curr-font-for-Ef, doc-curr-size-for-Ef
2762 .\" NS width register `Bf' set in doc-common
2765 . ds doc-macro-name Bf
2768 . nr doc-curr-font-for-Ef \n[.f]
2769 . nr doc-curr-size-for-Ef \n[.s]
2772 . nop \*[doc-Em-font]\c
2773 . el \{ .ie "\$1"Li" \
2774 . nop \*[doc-Li-font]\c
2775 . el \{ .ie "\$1"Sy" \
2776 . nop \*[doc-Sy-font]\c
2777 . el \{ .ie "\$1"-emphasis" \
2778 . nop \*[doc-Em-font]\c
2779 . el \{ .ie "\$1"-literal" \
2780 . nop \*[doc-Li-font]\c
2781 . el \{ .ie "\$1"-symbolic" \
2782 . nop \*[doc-Sy-font]\c
2784 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2788 . tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2792 .\" NS Ef user macro
2793 .\" NS end font mode
2796 .\" NS doc-macro-name
2798 .\" NS width register `Ef' set in doc-common
2801 . ds doc-macro-name Ef
2804 . tm Usage .Ef (does not take arguments) (#\n[.c])
2806 . nop \&\f[\n[doc-curr-font-for-Ef]]\s[\n[doc-curr-size-for-Ef]]
2810 .\" NS doc-keep-type global string
2811 .\" NS current keep type
2816 .\" NS Bk user macro
2820 .\" NS doc-macro-name, doc-keep-type
2822 .\" NS width register `Bk' set in doc-common
2827 . ds doc-macro-name Bk
2830 . if !"\*[doc-keep-type]"" \
2831 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2833 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2836 . doc-set-hard-space
2838 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2841 . ds doc-keep-type \$1
2844 . tm Usage: .Bk [-lines | -words] (#\n[.c])
2848 .\" NS Ek user macro
2852 .\" NS doc-macro-name
2854 .\" NS width register `Ek' set in doc-common
2857 . ds doc-macro-name Ek
2860 . tm Usage .Ek (does not take arguments) (#\n[.c])
2862 . ie "\*[doc-keep-type]"-words" \
2863 . doc-set-soft-space
2865 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2870 .\" NS doc-display-depth global register
2871 .\" NS display level
2873 .nr doc-display-depth 0
2876 .\" NS doc-is-compact global register (bool)
2877 .\" NS set if the `compact' keyword is given
2879 .nr doc-is-compact 0
2882 .\" NS doc-display-type-stackXXX global string
2883 .\" NS the display type stack
2885 .\" NS limit: doc-display-depth
2887 .ds doc-display-type-stack0
2890 .\" NS doc-display-indent-stackXXX global register
2891 .\" NS stack of display indentation values
2893 .\" NS limit: doc-display-depth
2895 .nr doc-display-indent-stack0 0
2898 .\" NS Bd user macro
2899 .\" NS begin display
2901 .\" NS width register `Bd' set in doc-common
2904 .\" NS doc-macro-name, doc-curr-font, doc-curr-size, doc-display-depth,
2905 .\" NS doc-is-compact, doc-display-type-stackXXX,
2906 .\" NS doc-display-indent-stackXXX
2908 .\" NS local variables:
2912 . ds doc-macro-name Bd
2915 . nr doc-is-compact 0
2917 . nr doc-display-depth +1
2919 . ie "\$1"-literal" \{\
2920 . ds doc-display-type-stack\n[doc-display-depth] literal
2921 . nr doc-curr-font \n[.f]
2922 . nr doc-curr-size \n[.s]
2925 . nop \*[doc-Li-font]\c
2932 . el \{ .ie "\$1"-filled" \{\
2933 . ds doc-display-type-stack\n[doc-display-depth] filled
2936 . el \{ .ie "\$1"-ragged" \{\
2937 . ds doc-display-type-stack\n[doc-display-depth] ragged
2940 . el \{ .ie "\$1"-unfilled" \{\
2941 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2945 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2949 . \" have we seen an argument?
2950 . if \n[doc-reg-Bd] \{\
2952 . \" check other arguments
2954 . doc-do-Bd-args \$@
2957 . \" avoid warning about non-existent register
2958 . if !r doc-display-indent-stack\n[doc-display-depth] \
2959 . nr doc-display-indent-stack\n[doc-display-depth] 0
2961 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2962 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2964 . if !\n[doc-is-compact] \{\
2965 . if !\n[doc-in-synopsis-count] \{\
2966 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2967 . sp \n[doc-display-vertical]u
2969 ' sp \n[doc-display-vertical]u
2975 . nr doc-is-compact 0
2978 . tm1 "Usage: .Bd [-literal | -filled | -ragged | -unfilled]
2979 . tm1 " [-offset [string]] [-compact] (#\n[.c])
2984 .\" NS doc-do-Bd-args macro
2985 .\" NS resolve remaining .Bd arguments
2988 .\" NS doc-is-compact, doc-display-indent-stackXXX
2990 .\" NS local variables:
2991 .\" NS doc-str-ddBa, doc-reg-ddBa
2997 . ie "\$1"-offset" \{\
2998 . ds doc-str-ddBa "\$2
3002 . nr doc-display-indent-stack\n[doc-display-depth] 0
3003 . el \{ .ie "\$2"right" \
3004 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
3005 . el \{ .ie "\$2"center" \
3006 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
3007 . el \{ .ie "\$2"indent" \
3008 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
3009 . el \{ .ie "\$2"indent-two" \
3010 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
3015 . \" not a known keyword
3016 . if (\n[doc-reg-ddBa] == 1) \{\
3018 . \" test whether argument is a valid numeric expression
3020 . nr doc-display-indent-stack\n[doc-display-depth] \$2
3022 . doc-get-width "\$2"
3023 . ie (\n[doc-width] == 2) \{\
3024 . \" if the offset parameter is a macro, use the macro's
3025 . \" width as specified in doc-common
3026 . doc-get-arg-type "\$2"
3027 . ie (\n[doc-arg-type] == 1) \
3028 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
3030 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3033 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3036 . el \{ .ie "\$1"-compact" \
3037 . nr doc-is-compact 1
3039 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
3042 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
3043 . \" have we seen `-offset' or `-compact'?
3044 . ie "\*[doc-str-ddBa]"" \{\
3046 . doc-do-Bd-args \$@
3050 . doc-do-Bd-args \$@
3055 .\" NS Ed user macro
3059 .\" NS doc-macro-name, doc-display-depth, doc-display-type-stackXXX,
3060 .\" NS doc-display-indent-stackXXX
3062 .\" NS width register `Ed' set in doc-common
3065 . ds doc-macro-name Ed
3069 . if !\n[doc-display-depth] \
3070 . tm mdoc warning: Extraneous .Ed (#\n[.c])
3072 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
3073 . ft \n[doc-curr-font]
3074 . ps \n[doc-curr-size]
3077 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
3079 . nr doc-display-indent-stack\n[doc-display-depth] 0
3080 . ds doc-display-type-stack\n[doc-display-depth]
3081 . nr doc-display-depth -1
3089 .\" NS doc-list-type-stackXXX global string
3090 .\" NS stack of list types
3092 .\" NS limit: doc-list-depth
3094 .ds doc-list-type-stack1
3097 .\" NS doc-list-indent-stackXXX global register
3098 .\" NS stack of list indentation values
3100 .\" NS limit: doc-list-depth
3102 .nr doc-list-indent-stack1 0
3105 .\" NS doc-have-indent global register (bool)
3106 .\" NS an indentation value is active
3108 .nr doc-have-indent 0
3111 .\" NS Bl user macro
3114 .\" NS width register `Bl' set in doc-common
3117 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3118 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX, doc-have-indent,
3119 .\" NS doc-have-diag-list, doc-num-columns, doc-list-depth
3121 .\" NS local variables:
3126 . ds doc-macro-name Bl
3127 . nr doc-list-depth +1
3130 . ie "\$1"-hang" \{\
3131 . ds doc-list-type-stack\n[doc-list-depth] hang-list
3132 . nr doc-list-indent-stack\n[doc-list-depth] 6n
3133 . nr doc-have-indent 1
3135 . el \{ .ie "\$1"-tag" \{\
3136 . ds doc-list-type-stack\n[doc-list-depth] tag-list
3137 . nr doc-have-indent 1
3139 . el \{ .ie "\$1"-item" \{\
3140 . ds doc-list-type-stack\n[doc-list-depth] item-list
3141 . nr doc-have-indent 1
3143 . el \{ .ie "\$1"-enum" \{\
3144 . ds doc-list-type-stack\n[doc-list-depth] enum-list
3145 . nr doc-list-indent-stack\n[doc-list-depth] 3n
3146 . nr doc-have-indent 1
3148 . el \{ .ie "\$1"-bullet" \{\
3149 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
3150 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3151 . nr doc-have-indent 1
3153 . el \{ .ie "\$1"-dash" \{\
3154 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3155 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3156 . nr doc-have-indent 1
3158 . el \{ .ie "\$1"-hyphen" \{\
3159 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3160 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3161 . nr doc-have-indent 1
3163 . el \{ .ie "\$1"-inset" \{\
3164 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3165 . nr doc-have-indent 1
3167 . el \{ .ie "\$1"-diag" \{\
3168 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3169 . nr doc-have-diag-list 1
3171 . el \{ .ie "\$1"-ohang" \{\
3172 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3173 . nr doc-have-indent 1
3175 . el \{ .ie "\$1"-column" \
3176 . ds doc-list-type-stack\n[doc-list-depth] column-list
3178 . tm mdoc warning: Unknown list type `\$1' in .Bl request
3181 . \}\}\}\}\}\}\}\}\}\}\}
3183 . \" we have seen a list type
3184 . ie \n[doc-arg-ptr] \{\
3187 . \" fill argument vector
3189 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3190 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3194 . doc-increment-list-stack
3197 . nr doc-arg-limit \n[.$]
3201 . \" initialize column list
3202 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3203 . doc-set-column-tab \n[doc-num-columns]
3204 . nr doc-list-indent-stack\n[doc-list-depth] 0
3205 ' in -\n[doc-column-indent-width]u
3206 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3207 . sp \n[doc-display-vertical]u
3210 . nr doc-num-columns 0
3222 .\" NS doc-Bl-usage macro
3225 . tm1 "Usage: .Bl [-hang | -ohang | -tag | -diag | -inset]
3226 . tm1 " [-width [string]] [-offset [string]] [-compact]
3227 . tm1 " .Bl [-column] [-offset [string]] [string1] [string2] ...
3228 . tm1 " .Bl [-item | -enum | -bullet | -hyphen | -dash]
3229 . tm1 " [-offset [string]] [-compact] (#\n[.c])
3233 .\" NS doc-have-tag-width global macro
3234 .\" NS set if a tag width has been explicitly given
3236 .nr doc-have-tag-width 0
3239 .\" NS doc-do-Bl-args macro
3240 .\" NS resolve remaining .Bl arguments
3243 .\" NS doc-arg-ptr, doc-argXXX, doc-list-indent-stackXXX, doc-num-columns,
3244 .\" NS doc-compact-list-stackXXX, doc-have-tag-width,
3245 .\" NS doc-tag-width-stackXXX, doc-list-offset-stackXXX
3247 .\" NS local variables:
3248 .\" NS doc-str-dBla, doc-reg-dBla
3252 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
3255 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3256 . nr doc-compact-list-stack\n[doc-list-depth] 1
3257 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3259 . \" XXX: this code should be modified to handle nested lists
3261 . nr doc-have-tag-width 1
3262 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3263 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3265 . \" test whether argument is a valid numeric expression
3266 . ie \B
\a\*[doc-str-dBla]
\a \
3267 . nr doc-list-indent-stack\n[doc-list-depth] \*[doc-str-dBla]
3269 . doc-get-arg-width \n[doc-arg-ptr]
3270 . ie (\n[doc-width] == 2) \{\
3271 . \" if the width parameter is a macro, use the macro's
3272 . \" width as specified in doc-common
3273 . doc-get-arg-type \*[doc-str-dBla]
3274 . ie (\n[doc-arg-type] == 1) \
3275 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3277 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3280 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3282 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3284 . \" XXX: this code should be modified to handle nested lists
3286 . nr doc-have-tag-width 1
3287 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3289 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3290 . substring doc-str-dBla 1 2
3291 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3292 . doc-save-global-vars
3293 . nr doc-in-diversion 0
3295 . doc-dry-execute "\*[doc-arg\n[doc-arg-ptr]]"
3296 . \" save doc-out-string
3297 . ds doc-str-dBla "\*[doc-out-string]
3298 . doc-restore-global-vars
3299 . doc-get-width "\*[doc-str-dBla]"
3301 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3303 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3306 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3307 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3309 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3311 . ie \B
\a\*[doc-str-dBla]
\a \
3312 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3314 . doc-get-arg-width \n[doc-arg-ptr]
3315 . ie (\n[doc-width] == 2) \{\
3316 . doc-get-arg-type \*[doc-str-dBla]
3317 . ie (\n[doc-arg-type] == 1) \
3318 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3320 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3323 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3329 . \" not a known keyword, so it specifies the width of the next column
3330 . \" (if it is a column list)
3331 . if !\n[doc-reg-dBla] \{\
3332 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3333 . nr doc-num-columns +1
3334 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3337 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3338 . tm1 " in .Bl request (#\n[.c])
3341 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3347 .\" NS doc-save-global-vars macro
3348 .\" NS save all global variables
3350 .\" NS local variables:
3353 .de doc-save-global-vars
3354 . nr doc-debug-saved \n[doc-debug]
3355 . ds doc-macro-name-saved "\*[doc-macro-name]
3356 . nr doc-arg-limit-saved \n[doc-arg-limit]
3357 . nr doc-num-args-saved \n[doc-num-args]
3358 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3361 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3362 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3363 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3364 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3365 . nr doc-reg-dsgv +1
3368 . ds doc-out-string-saved "\*[doc-out-string]
3369 . ds doc-curr-space-saved "\*[doc-curr-space]
3370 . ds doc-saved-out-string-saved "\*[doc-saved-out-string]
3371 . nr doc-in-diversion-saved \n[doc-in-diversion]
3372 . nr doc-curr-font-saved \n[doc-curr-font]
3373 . nr doc-curr-size-saved \n[doc-curr-size]
3374 . nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
3375 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3376 . nr doc-have-decl-saved \n[doc-have-decl]
3377 . nr doc-have-var-saved \n[doc-have-var]
3378 . ds doc-command-name-saved "\*[doc-command-name]
3379 . ds doc-quote-left-saved "\*[doc-quote-left]
3380 . ds doc-quote-right-saved "\*[doc-quote-right]
3381 . nr doc-nesting-level-saved \n[doc-nesting-level]
3382 . nr doc-no-space-saved \n[doc-no-space]
3383 . nr doc-is-opening-saved \n[doc-is-opening]
3384 . nr doc-in-list-saved \n[doc-in-list]
3385 . ds doc-space-saved "\*[doc-space]
3386 . nr doc-space-mode-saved \n[doc-space-mode]
3387 . nr doc-curr-font-for-Ef-saved \n[doc-curr-font-for-Ef]
3388 . nr doc-curr-size-for-Ef-saved \n[doc-curr-size-for-Ef]
3389 . ds doc-keep-type-saved "\*[doc-keep-type]
3390 . nr doc-display-depth-saved \n[doc-display-depth]
3391 . nr doc-is-compact-saved \n[doc-is-compact]
3394 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3395 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3396 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3397 . nr doc-reg-dsgv +1
3400 . nr doc-list-depth-saved \n[doc-list-depth]
3403 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3404 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3405 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3406 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3407 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3408 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3409 . nr doc-reg-dsgv +1
3412 . nr doc-have-indent-saved \n[doc-have-indent]
3413 . nr doc-have-tag-width-saved \n[doc-have-tag-width]
3414 . nr doc-no-printing-saved \n[doc-no-printing]
3415 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3416 . nr doc-curr-type-saved \n[doc-curr-type]
3417 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3418 . nr doc-enum-list-count-saved \n[doc-enum-list-count]
3419 . nr doc-have-diag-list-saved \n[doc-have-diag-list]
3420 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3421 . nr doc-list-immediate-saved \n[doc-list-immediate]
3422 . nr doc-num-columns-saved \n[doc-num-columns]
3423 . nr doc-next-list-depth-saved \n[doc-next-list-depth]
3424 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3425 . nr doc-is-func-saved \n[doc-is-func]
3426 . nr doc-have-old-func-saved \n[doc-have-old-func]
3427 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3428 . ds doc-func-arg-saved "\*[doc-func-arg]
3429 . nr doc-num-func-args-saved \n[doc-num-func-args]
3430 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3431 . nr doc-have-func-saved \n[doc-have-func]
3432 . nr doc-is-reference-saved \n[doc-is-reference]
3433 . nr doc-reference-count-saved \n[doc-reference-count]
3434 . ds doc-reference-string-name-saved "\*[doc-reference-string-name]
3435 . nr doc-authors-processed-saved \n[doc-authors-processed]
3436 . nr doc-author-count-saved \n[doc-author-count]
3439 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3440 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3441 . nr doc-reg-dsgv +1
3444 . nr doc-book-count-saved \n[doc-book-count]
3445 . ds doc-book-name-saved "\*[doc-book-name]
3446 . nr doc-date-count-saved \n[doc-date-count]
3447 . ds doc-date-saved "\*[doc-date]
3448 . nr doc-publisher-count-saved \n[doc-publisher-count]
3449 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3450 . nr doc-journal-count-saved \n[doc-journal-count]
3451 . ds doc-journal-name-saved "\*[doc-journal-name]
3452 . nr doc-issue-count-saved \n[doc-issue-count]
3453 . ds doc-issue-name-saved "\*[doc-issue-name]
3454 . nr doc-optional-count-saved \n[doc-optional-count]
3455 . ds doc-optional-string-saved "\*[doc-optional-string]
3456 . nr doc-page-number-count-saved \n[doc-page-number-count]
3457 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3458 . nr doc-corporate-count-saved \n[doc-corporate-count]
3459 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3460 . nr doc-report-count-saved \n[doc-report-count]
3461 . ds doc-report-name-saved "\*[doc-report-name]
3462 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3463 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3464 . nr doc-volume-count-saved \n[doc-volume-count]
3465 . ds doc-volume-name-saved "\*[doc-volume-name]
3466 . nr doc-have-author-saved \n[doc-have-author]
3468 . ds doc-document-title-saved "\*[doc-document-title]
3469 . ds doc-volume-saved "\*[doc-volume]
3470 . ds doc-section-saved "\*[doc-section]
3471 . ds doc-operating-system-saved "\*[doc-operating-system]
3472 . ds doc-date-string-saved "\*[doc-date-string]
3473 . nr doc-header-space-saved \n[doc-header-space]
3474 . nr doc-footer-space-saved \n[doc-footer-space]
3475 . nr doc-display-vertical-saved \n[doc-display-vertical]
3476 . ds doc-header-string-saved "\*[doc-header-string]
3477 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3478 . nr doc-in-files-section-saved \n[doc-in-files-section]
3479 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3483 .\" NS doc-restore-global-vars macro
3484 .\" NS restore all global variables
3486 .\" NS local variables:
3489 .de doc-restore-global-vars
3490 . nr doc-debug \n[doc-debug-saved]
3491 . ds doc-macro-name "\*[doc-macro-name-saved]
3492 . nr doc-arg-limit \n[doc-arg-limit-saved]
3493 . nr doc-num-args \n[doc-num-args-saved]
3494 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3497 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3498 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3499 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3500 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3501 . nr doc-reg-drgv +1
3504 . ds doc-out-string "\*[doc-out-string-saved]
3505 . ds doc-curr-space "\*[doc-curr-space-saved]
3506 . ds doc-saved-out-string "\*[doc-saved-out-string-saved]
3507 . nr doc-in-diversion \n[doc-in-diversion-saved]
3508 . nr doc-curr-font \n[doc-curr-font-saved]
3509 . nr doc-curr-size \n[doc-curr-size-saved]
3510 . nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
3511 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3512 . nr doc-have-decl \n[doc-have-decl-saved]
3513 . nr doc-have-var \n[doc-have-var-saved]
3514 . ds doc-command-name "\*[doc-command-name-saved]
3515 . ds doc-quote-left "\*[doc-quote-left-saved]
3516 . ds doc-quote-right "\*[doc-quote-right-saved]
3517 . nr doc-nesting-level \n[doc-nesting-level-saved]
3518 . nr doc-no-space \n[doc-no-space-saved]
3519 . nr doc-is-opening \n[doc-is-opening-saved]
3520 . nr doc-in-list \n[doc-in-list-saved]
3521 . ds doc-space "\*[doc-space-saved]
3522 . nr doc-space-mode \n[doc-space-mode-saved]
3523 . nr doc-curr-font-for-Ef \n[doc-curr-font-for-Ef-saved]
3524 . nr doc-curr-size-for-Ef \n[doc-curr-size-for-Ef-saved]
3525 . ds doc-keep-type "\*[doc-keep-type-saved]
3526 . nr doc-display-depth \n[doc-display-depth-saved]
3527 . nr doc-is-compact \n[doc-is-compact-saved]
3530 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3531 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3532 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3533 . nr doc-reg-drgv +1
3536 . nr doc-list-depth \n[doc-list-depth-saved]
3539 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3540 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3541 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3542 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3543 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3544 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3545 . nr doc-reg-drgv +1
3548 . nr doc-have-indent \n[doc-have-indent-saved]
3549 . nr doc-have-tag-width \n[doc-have-tag-width-saved]
3550 . nr doc-no-printing \n[doc-no-printing-saved]
3551 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3552 . nr doc-curr-type \n[doc-curr-type-saved]
3553 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3554 . nr doc-enum-list-count \n[doc-enum-list-count-saved]
3555 . nr doc-have-diag-list \n[doc-have-diag-list-saved]
3556 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3557 . nr doc-list-immediate \n[doc-list-immediate-saved]
3558 . nr doc-num-columns \n[doc-num-columns-saved]
3559 . nr doc-next-list-depth \n[doc-next-list-depth-saved]
3560 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3561 . nr doc-is-func \n[doc-is-func-saved]
3562 . nr doc-have-old-func \n[doc-have-old-func-saved]
3563 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3564 . ds doc-func-arg "\*[doc-func-arg-saved]
3565 . nr doc-num-func-args \n[doc-num-func-args-saved]
3566 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3567 . nr doc-have-func \n[doc-have-func-saved]
3568 . nr doc-is-reference \n[doc-is-reference-saved]
3569 . nr doc-reference-count \n[doc-reference-count-saved]
3570 . ds doc-reference-string-name "\*[doc-reference-string-name-saved]
3571 . nr doc-authors-processed \n[doc-authors-processed-saved]
3572 . nr doc-author-count \n[doc-author-count-saved]
3575 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3576 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3577 . nr doc-reg-drgv +1
3580 . nr doc-book-count \n[doc-book-count-saved]
3581 . ds doc-book-name "\*[doc-book-name-saved]
3582 . nr doc-date-count \n[doc-date-count-saved]
3583 . ds doc-date "\*[doc-date-saved]
3584 . nr doc-publisher-count \n[doc-publisher-count-saved]
3585 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3586 . nr doc-journal-count \n[doc-journal-count-saved]
3587 . ds doc-journal-name "\*[doc-journal-name-saved]
3588 . nr doc-issue-count \n[doc-issue-count-saved]
3589 . ds doc-issue-name "\*[doc-issue-name-saved]
3590 . nr doc-optional-count \n[doc-optional-count-saved]
3591 . ds doc-optional-string "\*[doc-optional-string-saved]
3592 . nr doc-page-number-count \n[doc-page-number-count-saved]
3593 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3594 . nr doc-corporate-count \n[doc-corporate-count-saved]
3595 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3596 . nr doc-report-count \n[doc-report-count-saved]
3597 . ds doc-report-name "\*[doc-report-name-saved]
3598 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3599 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3600 . nr doc-volume-count \n[doc-volume-count-saved]
3601 . ds doc-volume-name "\*[doc-volume-name-saved]
3602 . nr doc-have-author \n[doc-have-author-saved]
3604 . ds doc-document-title "\*[doc-document-title-saved]
3605 . ds doc-volume "\*[doc-volume-saved]
3606 . ds doc-section "\*[doc-section-saved]
3607 . ds doc-operating-system "\*[doc-operating-system-saved]
3608 . ds doc-date-string "\*[doc-date-string-saved]
3609 . nr doc-header-space \n[doc-header-space-saved]
3610 . nr doc-footer-space \n[doc-footer-space-saved]
3611 . nr doc-display-vertical \n[doc-display-vertical-saved]
3612 . ds doc-header-string "\*[doc-header-string-saved]
3613 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3614 . nr doc-in-files-section \n[doc-in-files-section-saved]
3615 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3619 .\" NS doc-no-printing global register (bool)
3620 .\" NS set if output is suppressed
3622 .nr doc-no-printing 0
3625 .\" NS doc-dry-execute macro
3626 .\" NS execute a string (splitting one arg into multiple args) without
3627 .\" NS output; this command must be surrounded by `doc-save-global-args'
3628 .\" NS and `doc-restore-global-args'
3632 . nr doc-no-printing 1
3635 . nop \*[doc-str-de] \$@
3636 . nr doc-no-printing 0
3640 .\" NS El user macro
3644 .\" NS doc-macro-name, doc-have-diag-list, doc-enum-list-count,
3645 .\" NS doc-list-depth
3647 .\" NS local variables:
3650 .\" NS width register `El' set in doc-common
3654 . tm Usage: .El (does not take arguments) (#\n[.c])
3656 . ds doc-macro-name El
3657 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3659 . ie "\*[doc-str-El]"enum-list" \{\
3660 . nr doc-enum-list-count 0
3663 . el \{ .ie "\*[doc-str-El]"diag-list" \{\
3664 . nr doc-have-diag-list 0
3667 . el \{ .ie "\*[doc-str-El]"column-list" \
3668 . doc-end-column-list
3669 . el \{ .ie "\*[doc-str-El]"item-list" \
3671 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3673 . el \{ .ie "\*[doc-str-El]"inset-list" \
3684 .\" NS doc-saved-Pa-font global string
3685 .\" NS saved doc-Pa-font string for section FILES (no underline if
3688 .ds doc-saved-Pa-font
3691 .\" NS doc-curr-type global register
3692 .\" NS current argument type
3697 .\" NS doc-curr-arg global string
3698 .\" NS current argument
3703 .\" NS It user macro
3707 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3708 .\" NS doc-out-string, doc-in-list, doc-list-immediate,
3709 .\" NS doc-saved-Pa-font, doc-curr-type, doc-curr-arg
3711 .\" NS width register `It' set in doc-common
3713 .\" NS local variables:
3714 .\" NS doc-str-It, doc-reg-It
3717 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3719 . if "\*[doc-str-It]"" \
3720 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3722 . if \n[doc-nesting-level] \{\
3723 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3732 . ds doc-macro-name It
3735 . \" fill argument vector
3737 . while (\n[doc-reg-It] <= \n[.$]) \{\
3738 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3742 . nr doc-num-args \n[.$]
3746 . ie "\*[doc-str-It]"diag-list" \{\
3747 . doc-remaining-args
3752 . ie "\*[doc-str-It]"column-list" \{\
3757 . el \{ .ie "\*[doc-str-It]"tag-list" \
3759 . el \{ .ie "\*[doc-str-It]"hang-list" \
3761 . el \{ .ie "\*[doc-str-It]"ohang-list" \
3763 . el \{ .if "\*[doc-str-It]"inset-list" \
3767 . if \n[doc-reg-It] \{\
3768 . ie (\n[doc-reg-It] == 2) \{\
3769 . \" handle list types with arguments
3770 . doc-parse-arg-vector
3773 . nr doc-list-immediate 1
3775 . nr doc-curr-type \n[doc-type1]
3776 . ds doc-curr-arg "\*[doc-arg1]
3778 . if \n[doc-in-files-section] \{\
3779 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3781 . ds doc-Pa-font "\*[doc-No-font]
3784 . ie (\n[doc-type1] == 1) \
3791 . \" the previous call of `.No' can contain calls to opening requests
3792 . \" like `.Ac'; we then defer the call of `doc-xxx-list'
3793 . if !\n[doc-nesting-level] \
3794 . doc-\*[doc-str-It]
3797 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3798 . tm1 " don't take arguments (#\n[.c])
3799 . doc-\*[doc-str-It]
3802 . doc-\*[doc-str-It]
3806 .\" NS doc-inset-list macro
3807 .\" NS .It item of list-type inset
3810 .\" NS doc-out-string, doc-in-list, doc-list-immediate
3813 . doc-set-vertical-and-indent 0
3815 . nop \&\*[doc-out-string]
3818 . nr doc-list-immediate 0
3825 .\" NS doc-hang-list macro
3826 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3829 .\" NS doc-out-string, doc-in-list, doc-list-immediate
3831 .\" NS local variables:
3835 . doc-set-vertical-and-indent 1
3836 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3837 . ti -\n[doc-reg-dhl]u
3839 . ie (\w
\a\*[doc-out-string]
\au >= \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3840 . nop \&\*[doc-out-string]
3842 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dhl]u'\c
3846 . nr doc-list-immediate 0
3852 .\" NS doc-ohang-list macro
3853 .\" NS .It item of list-type overhanging tag
3856 .\" NS doc-out-string, doc-in-list, doc-list-immediate
3859 . doc-set-vertical-and-indent 0
3860 . nop \&\*[doc-out-string]
3865 . nr doc-list-immediate 0
3871 .\" NS doc-item-list macro
3872 .\" NS .It item of list-type [empty tag]
3875 . doc-set-vertical-and-indent 0
3883 .\" NS doc-enum-list-count global register
3884 .\" NS contains current enum count value
3886 .nr doc-enum-list-count 0
3889 .\" NS doc-enum-list macro
3890 .\" NS enumerated list
3893 .\" NS doc-out-string, doc-in-list, doc-enum-list-count
3897 . nr doc-enum-list-count +1
3898 . ds doc-out-string \n[doc-enum-list-count].
3903 .\" NS doc-bullet-list macro
3904 .\" NS bullet paragraph list
3907 .\" NS doc-out-string, doc-in-list
3911 . ds doc-out-string "\*[doc-Sy-font]\[bu]\f[P]
3916 .\" NS doc-dash-list macro
3917 .\" NS hyphen paragraph list (sub bullet list)
3920 .\" NS doc-out-string, doc-in-list
3924 . ds doc-out-string "\*[doc-Sy-font]\-\f[P]
3929 .\" NS doc-do-list macro
3930 .\" NS .It item of list-type enum/bullet/hyphen
3932 .als doc-do-list doc-hang-list
3935 .\" NS doc-have-diag-list global register (bool)
3936 .\" NS set if last item was a diag list
3938 .\" XXX: this should be modified to handle nested lists of any type
3940 .nr doc-have-diag-list 0
3943 .\" NS doc-diag-list-input-line-count global register
3944 .\" NS saved line number to be checked in next diag-list item
3946 .nr doc-diag-list-input-line-count 0
3949 .\" NS doc-diag-list macro
3950 .\" NS .It item of list-type diagnostic-message
3953 .\" NS doc-out-string, doc-curr-font, doc-curr-size,
3954 .\" NS doc-diag-list-input-line-count
3957 . nr doc-curr-font \n[.f]
3958 . nr doc-curr-size \n[.s]
3960 . ie \n[doc-have-diag-list] \{\
3961 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
3968 . nr doc-diag-list-input-line-count \n[.c]
3970 . nop \*[doc-Sy-font]\*[doc-out-string]\c
3971 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\*[doc-digit-string]\c
3979 .\" NS doc-tag-list macro
3980 .\" NS .It item of list-type `tag'
3983 .\" NS doc-out-string, doc-in-list, doc-list-immediate
3985 .\" NS local variables:
3989 . if !\n[doc-have-tag-width] \
3991 . doc-set-vertical-and-indent 1
3992 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3993 . ti -\n[doc-reg-dtl]u
3995 . ie (\w
\a\*[doc-out-string]
\au > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3996 . nop \&\*[doc-out-string]
4000 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dtl]u'\c
4002 . if \n[doc-in-files-section] \
4004 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4007 . nr doc-list-immediate 0
4014 .\" NS doc-get-tag-width macro
4015 .\" NS resolve unknown tag width (.Bl [inset | tag] only)
4018 .\" NS doc-list-indent-stackXXX, doc-have-indent, doc-tag-width-stackXXX
4021 .\" NS doc-curr-type, doc-curr-arg
4023 .de doc-get-tag-width
4024 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4025 . ie (\n[doc-curr-type] == 1) \{\
4026 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4027 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4030 . ds doc-tag-width-stack\n[doc-list-depth] No
4031 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4033 . nr doc-have-tag-width 1
4038 .\" NS doc-set-vertical-and-indent macro
4039 .\" NS set up vertical spacing (if not compact) and indentation (with
4040 .\" NS offset if argument is non-zero)
4043 .\" NS doc-have-indent, doc-have-tag-width
4045 .de doc-set-vertical-and-indent
4046 . ie \n[doc-have-indent] \{\
4047 . nr doc-have-indent 0
4048 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4049 . sp \n[doc-display-vertical]u
4050 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
4052 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4055 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4056 . sp \n[doc-display-vertical]u
4064 .\" NS doc-list-depth global register
4065 .\" NS list type stack counter
4067 .nr doc-list-depth 0
4070 .\" NS doc-list-immediate global register (bool)
4071 .\" NS tag flag (for diversions)
4073 .nr doc-list-immediate 0
4076 .\" NS doc-num-columns global register
4077 .\" NS number of columns
4079 .nr doc-num-columns 0
4082 .\" NS doc-compact-list-stackXXX global register (bool)
4083 .\" NS stack of flags to indicate whether a particular list is compact
4085 .\" NS limit: doc-list-depth
4087 .nr doc-compact-list-stack1 0
4090 .\" NS doc-tag-width-stackXXX global string
4091 .\" NS stack of strings indicating how to set up current element of
4092 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4093 .\" NS directly; if it is a macro name, use the macro's width value;
4094 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4096 .\" NS limit: doc-list-depth
4098 .ds doc-tag-width-stack0
4099 .ds doc-tag-width-stack1
4102 .\" NS doc-list-offset-stackXXX global register
4103 .\" NS stack of list offsets
4105 .\" NS limit: doc-list-depth
4107 .nr doc-list-offset-stack1 0
4110 .\" NS doc-end-list macro
4111 .\" NS list end function; resets indentation (and offset if argument is
4115 .\" NS doc-list-offset-stackXXX, doc-list-depth
4119 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4121 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4122 . nr doc-list-offset-stack\n[doc-list-depth] 0
4124 . if (\n[doc-list-depth] <= 0) \
4125 . tm mdoc warning: extraneous .El call (#\n[.c])
4127 . doc-decrement-list-stack
4128 . nr doc-list-depth -1
4129 . doc-increment-list-stack
4131 . nr doc-have-tag-width 0
4135 .\" NS doc-next-list-depth global register
4136 .\" NS next possible doc-list-depth value
4138 .nr doc-next-list-depth 1
4141 .\" NS doc-increment-list-stack macro
4142 .\" NS set up next block for list
4145 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4146 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4147 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4149 .de doc-increment-list-stack
4150 . nr doc-next-list-depth (\n[doc-list-depth] + 1)
4151 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4152 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4153 . ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
4154 . ds doc-list-type-stack\n[doc-next-list-depth]
4155 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4159 .\" NS doc-decrement-list-stack macro
4160 .\" NS decrement stack
4163 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4164 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4165 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4167 .de doc-decrement-list-stack
4168 . ds doc-list-type-stack\n[doc-next-list-depth]
4169 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4170 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4171 . ds doc-tag-width-stack\n[doc-next-list-depth]
4172 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4173 . nr doc-next-list-depth -1
4177 .\" NS Xr user macro
4178 .\" NS cross reference (man page only)
4181 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string
4183 .\" NS width register `Xr' set in doc-common
4186 . if !\n[doc-arg-limit] \{\
4188 . ds doc-macro-name Xr
4189 . doc-parse-args \$@
4192 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4196 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4197 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
4198 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4200 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4201 . as doc-out-string \*[doc-Xr-font]
4202 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4205 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4206 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4207 . as doc-out-string \&\*[lp]\*[doc-arg\n[doc-arg-ptr]]\*[rp]
4210 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4211 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4213 . doc-print-and-reset
4216 . doc-do-xref-\n[doc-type\n[doc-arg-ptr]]
4221 .\" NS Sx user macro
4222 .\" NS cross section reference
4225 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4226 .\" NS doc-curr-size
4228 .\" NS width register `Sx' set in doc-common
4231 . if !\n[doc-arg-limit] \{\
4233 . ds doc-macro-name Sx
4234 . doc-parse-args \$@
4237 . tm Usage: .Sx section_header \*[doc-punct-chars] (#\n[.c])
4241 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4242 . as doc-out-string \*[doc-Sx-font]
4243 . nr doc-curr-font \n[.f]
4244 . nr doc-curr-size \n[.s]
4245 . doc-print-recursive
4250 .\" NS doc-end-column-list macro
4251 .\" NS column-list end-list
4254 .\" NS doc-list-depth
4256 .de doc-end-column-list
4257 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4260 . doc-decrement-list-stack
4261 . nr doc-list-depth -1
4262 . doc-increment-list-stack
4266 .\" NS doc-column-indent-width global register
4267 .\" NS holds the indent width for a column list
4269 .nr doc-column-indent-width 0
4272 .\" NS doc-set-column-tab macro
4273 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4275 .\" NS local variables:
4276 .\" NS doc-str-dsct, doc-str-dsct1, doc-reg-dsct, doc-column-indent-width
4278 .de doc-set-column-tab
4281 . nr doc-column-indent-width 0
4284 . ds doc-str-dsct1 " \"
4287 . ds doc-str-dsct1 " \"
4289 . \" XXX: this is packed abnormally close -- intercolumn width
4290 . \" should be configurable
4291 . ds doc-str-dsct1 " \"
4294 . while (\n[doc-reg-dsct] <= \$1) \{\
4295 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4296 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4297 . nr doc-reg-dsct +1
4300 . ta \*[doc-str-dsct]
4301 ' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
4305 .\" NS doc-column-list macro
4309 .\" NS doc-arg-ptr, doc-spaceXXX, doc-list-indent-stackXXX
4311 .\" NS local variables:
4315 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4316 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4319 ' in +\n[doc-column-indent-width]u
4321 . ti -\n[doc-column-indent-width]u
4323 . doc-parse-arg-vector
4326 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4327 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4328 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4329 . ds doc-space\n[doc-reg-dcl]
4331 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4334 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4338 .\" NS Ta user macro
4339 .\" NS append tab (\t)
4342 .\" NS doc-arg-ptr, doc-out-string
4344 .\" NS width register `Ta' set in doc-common
4347 . ie \n[doc-arg-limit] \{\
4349 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4350 . as doc-out-string \t
4351 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4354 . as doc-out-string \t\c
4355 . doc-print-and-reset
4358 . tm1 "Usage: Ta must follow column entry: e.g. (#\n[.c])
4359 . tm1 " .It column_string [Ta [column_string ...]]
4364 .\" NS Dl user macro
4365 .\" NS display (one line) literal
4368 .\" NS doc-macro-name
4370 .\" NS width register `Dl' set in doc-common
4374 . in +\n[doc-display-indent]u
4376 . ie \n[doc-arg-limit] \
4377 . tm Usage: .Dl not callable by other macros (#\n[.c])
4380 . ds doc-macro-name Dl
4381 . doc-parse-args \$@
4385 . tm Usage: .Dl argument ... (#\n[.c])
4388 . in -\n[doc-display-indent]u
4392 .\" NS D1 user macro
4393 .\" NS display (one line)
4396 .\" NS doc-macro-name, doc-arg-ptr
4398 .\" NS width register `D1' set in doc-common
4402 . in +\n[doc-display-indent]u
4404 . ie \n[doc-arg-limit] \
4405 . tm Usage: .D1 not callable by other macros (#\n[.c])
4408 . ds doc-macro-name D1
4409 . doc-parse-args \$@
4413 . tm Usage: .D1 argument ... (#\n[.c])
4416 . in -\n[doc-display-indent]u
4420 .\" NS Ex user macro
4424 . tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
4428 .\" NS Vt user macro
4429 .\" NS variable type (for forcing old style variable declarations);
4430 .\" NS this is not done in the same manner as .Ot for fortrash --
4431 .\" NS clean up later
4434 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4437 .\" NS width register `Vt' set in doc-common
4440 . \" if a function declaration was the last thing given, want vertical space
4441 . if \n[doc-have-decl] \{\
4443 . nr doc-have-decl 0
4446 . \" if a subroutine was the last thing given, want vertical space
4447 . if \n[doc-have-func] \{\
4448 . ie !\n[doc-have-var] \
4456 . nr doc-curr-font \n[.f]
4457 . nr doc-curr-size \n[.s]
4459 . nop \*[doc-Ft-font]\$*
4461 . ie \n[doc-have-old-func] \
4462 . nop \&\*[doc-soft-space]
4466 . ft \n[doc-curr-font]
4467 . ps \n[doc-curr-size]
4471 .\" NS doc-is-func global register (bool)
4472 .\" NS set if subroutine (in synopsis only) (fortran only)
4477 .\" NS Ft user macro
4478 .\" NS function type
4481 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4482 .\" NS doc-have-var, doc-is-func
4484 .\" NS width register `Ft' set in doc-common
4487 . if \n[doc-in-synopsis-count] \{\
4488 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4490 . nr doc-have-decl 0
4494 . if \n[doc-have-var] \{\
4502 . nr doc-curr-font \n[.f]
4503 . nr doc-curr-size \n[.s]
4505 . nop \*[doc-Ft-font]\$*
4507 . ft \n[doc-curr-font]
4508 . ps \n[doc-curr-size]
4512 .\" NS doc-have-old-func global register (bool)
4513 .\" NS set if `Ot' has been called
4515 .nr doc-have-old-func 0
4518 .\" NS Ot user macro
4519 .\" NS old function type (fortran -- no newline)
4522 .\" NS doc-out-string, doc-have-decl, doc-have-var,
4523 .\" NS doc-is-func, doc-have-old-func
4525 .\" NS width register `Ot' set in doc-common
4528 . nr doc-have-old-func 1
4530 . if \n[doc-in-synopsis-count] \{\
4531 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4533 . nr doc-have-decl 0
4537 . if \n[doc-have-var] \{\
4546 . as doc-out-string \*[doc-Ft-font]\$*
4547 . as doc-out-string \ \f[P]
4551 .\" NS Fa user macro
4552 .\" NS function arguments
4555 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4556 .\" NS doc-curr-size
4558 .\" NS width register `Fa' set in doc-common
4561 . if !\n[doc-arg-limit] \{\
4563 . ds doc-macro-name Fa
4564 . doc-parse-args \$@
4567 . tm Usage: .Fa function_arguments ... \*[doc-punct-chars] (#\n[.c])
4570 . ie \n[doc-func-arg-count] \
4574 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4575 . as doc-out-string \*[doc-Fa-font]
4576 . nr doc-curr-font \n[.f]
4577 . nr doc-curr-size \n[.s]
4578 . doc-print-recursive
4580 . if \n[doc-in-synopsis-count] \
4581 . if \n[doc-have-func] \
4587 .\" NS doc-func-arg-count global register
4588 .\" NS how many function arguments have been processed so far
4590 .nr doc-func-arg-count 0
4593 .\" NS doc-func-arg global string
4594 .\" NS work buffer for function name strings
4599 .\" NS doc-num-func-args global register
4600 .\" NS number of function arguments
4602 .nr doc-num-func-args 0
4605 .\" NS doc-func-args-processed global register
4606 .\" NS function arguments processed so far
4608 .nr doc-func-args-processed 0
4611 .\" NS doc-do-func macro
4612 .\" NS internal .Fa for .Fc
4615 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg-count,
4616 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4619 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4623 . nr doc-num-func-args 0
4624 . nr doc-func-args-processed 0
4626 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4627 . if (\n[doc-num-func-args] > 1) \
4628 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4630 . if (\n[doc-func-arg-count] > 1) \{\
4631 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|,
4632 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]
4633 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4636 . if (\n[doc-func-arg-count] == 1) \{\
4637 . as doc-out-string \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]
4638 . as doc-out-string \f[P]\s[0]
4640 . nr doc-func-arg-count +1
4648 .\" NS doc-have-func global register (bool)
4649 .\" NS whether we have more than one function in synopsis
4654 .\" NS Fn user macro
4658 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4659 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4660 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4663 .\" NS width register `Fn' set in doc-common
4668 . if !\n[doc-arg-limit] \{\
4670 . ds doc-macro-name Fn
4671 . doc-parse-args \$@
4674 . tmc Usage: .Fn function_name function_arg(s) ... \*[doc-punct-chars]
4678 . if \n[doc-in-synopsis-count] \{\
4679 . \" if there is/has been more than one subroutine declaration
4680 . ie \n[doc-is-func] \{\
4683 . nr doc-have-decl 0
4687 . if \n[doc-have-func] \{\
4690 . nr doc-have-decl 0
4693 . if \n[doc-have-decl] \{\
4698 . if \n[doc-have-var] \{\
4700 . nr doc-have-decl 0
4703 . nr doc-have-func 1
4707 . ie (\n[doc-in-synopsis-count] > 1) \
4710 . if !\n[doc-indent-synopsis] \
4711 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4714 . in +\n[doc-indent-synopsis]u
4715 . ti -\n[doc-indent-synopsis]u
4716 . nr doc-in-synopsis-count +1
4720 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4721 . nr doc-curr-font \n[.f]
4722 . nr doc-curr-size \n[.s]
4723 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4724 . as doc-out-string \f[P]\s[0]\*[lp]
4727 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4728 . as doc-out-string \*[doc-Fa-font]
4729 . doc-do-func-\n[doc-type\n[doc-arg-ptr]]
4732 . as doc-out-string \|\*[rp]
4733 . doc-print-and-reset
4736 . if \n[doc-in-synopsis-count] \
4737 . in -\n[doc-indent-synopsis]u
4744 .\" NS doc-do-func-1 macro
4745 .\" NS prepare `doc-out-string' and execute doc-argXXX
4748 .\" NS doc-out-string
4751 . ie \n[doc-in-synopsis-count] \{\
4752 . as doc-out-string \&\*[rp]
4753 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4756 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4758 . \*[doc-arg\n[doc-arg-ptr]]
4762 .\" NS doc-do-func-2 macro
4763 .\" NS handle function arguments
4766 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg,
4767 .\" NS doc-num-func-args, doc-func-args-processed
4769 .\" NS local variables:
4773 . if \n[doc-in-synopsis-count] \{\
4775 . nr doc-num-func-args 0
4776 . nr doc-func-args-processed 0
4778 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4779 . if (\n[doc-num-func-args] > 1) \
4780 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4783 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
4785 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4786 . nr doc-reg-ddfs \n[doc-arg-ptr]
4788 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4789 . as doc-out-string \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]],
4790 . as doc-out-string "\*[doc-space\n[doc-reg-ddfs]]\f[P]\s[0]\|
4792 . doc-do-func-\n[doc-type\n[doc-arg-ptr]]
4795 . ie \n[doc-in-synopsis-count] \{\
4796 . as doc-out-string \&\*[rp]
4797 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4800 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4802 . doc-print-and-reset
4807 .\" NS doc-do-func-3 macro
4808 .\" NS handle punctuation suffixes in functions
4811 .\" NS doc-out-string
4814 . ie \n[doc-in-synopsis-count] \{\
4815 . as doc-out-string \&\*[rp]
4816 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4817 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4820 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4821 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4824 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
4827 . doc-print-and-reset
4831 .\" NS doc-do-func-4 macro
4832 .\" NS handle punctuation prefixes in functions
4835 .\" NS doc-arg-ptr, doc-out-string
4838 . ie \n[doc-in-synopsis-count] \{\
4839 . as doc-out-string \&\*[rp]
4840 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4841 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4844 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4845 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4848 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4853 . doc-print-and-reset
4857 .\" NS Fo user macro
4858 .\" NS function open
4861 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4862 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4863 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4864 .\" NS doc-nesting-level, doc-is-func, doc-func-arg-count
4866 .\" NS width register `Fo' set in doc-common
4871 . if !\n[doc-arg-limit] \{\
4873 . ds doc-macro-name Fo
4874 . doc-parse-args \$@
4877 . tm Usage: .Fo function_name (#\n[.c])
4880 . if \n[doc-in-synopsis-count] \{\
4881 . \" if there is/has been more than one subroutine declaration
4882 . ie \n[doc-is-func] \{\
4885 . nr doc-have-decl 0
4889 . if \n[doc-have-func] \{\
4892 . nr doc-have-decl 0
4895 . if \n[doc-have-decl] \{\
4900 . if \n[doc-have-var] \{\
4902 . nr doc-have-decl 0
4905 . nr doc-have-func 1
4909 . ie (\n[doc-in-synopsis-count] > 1) \
4912 . if !\n[doc-indent-synopsis] \
4913 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4916 . in +\n[doc-indent-synopsis]u
4917 . ti -\n[doc-indent-synopsis]u
4918 . nr doc-in-synopsis-count +1
4922 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4923 . nr doc-nesting-level +1
4924 . nr doc-func-arg-count 1
4925 . nr doc-curr-font \n[.f]
4926 . nr doc-curr-size \n[.s]
4928 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4929 . as doc-out-string \f[P]\s[0]\*[lp]
4935 .\" NS Fc user macro
4936 .\" NS function close
4939 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-nesting-level,
4940 .\" NS doc-func-arg-count
4942 .\" NS width register `Fc' set in doc-common
4945 . if !\n[doc-arg-limit] \{\
4947 . ds doc-macro-name Fc
4948 . doc-parse-args \$@
4951 . nr doc-func-arg-count 0
4952 . nr doc-nesting-level -1
4954 . ie \n[doc-in-synopsis-count] \
4955 . as doc-out-string \|\*[rp]
4957 . as doc-out-string \|\*[rp]
4958 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4960 . \*[doc-arg\n[doc-arg-ptr]]
4963 . doc-print-and-reset
4965 . if \n[doc-in-synopsis-count] \
4966 . in -\n[doc-indent-synopsis]u
4972 .\" NS doc-build-func-string macro
4973 .\" NS collect function arguments and set hard spaces inbetween
4976 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4978 .de doc-build-func-string
4979 . if !\n[doc-num-func-args] \{\
4980 . nr doc-num-func-args \n[.$]
4981 . nr doc-func-args-processed 0
4985 . nr doc-func-args-processed +1
4986 . as doc-func-arg "\$1
4988 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
4989 . as doc-func-arg "\*[doc-hard-space]
4992 . doc-build-func-string \$@
4997 .\" Very crude references, stash all reference info into strings (usual
4998 .\" use of doc-out-string, then doc-out-string contents copied to
4999 .\" string of retrievable naming convention), print out reference on .Re
5000 .\" request and clean up. Ordering very limited, no fancy citations, but
5001 .\" can do articles, journals, and books -- need to add several missing
5002 .\" options (like city etc). Should be able to grab a refer entry, massage
5003 .\" it a wee bit (prefix a `.' to the %[A-Z]) and not worry (ha!).
5006 .\" NS doc-is-reference global register (bool)
5007 .\" NS set if in reference
5009 .nr doc-is-reference 0
5012 .\" NS doc-reference-count global register
5013 .\" NS reference element counter
5015 .nr doc-reference-count 0
5018 .\" NS doc-reference-string-name global string
5019 .\" NS contains current reference string name for handling in
5020 .\" NS `doc-do-references'
5022 .ds doc-reference-string-name
5025 .\" NS Rs user macro
5026 .\" NS reference start
5029 .\" NS doc-is-reference, doc-reference-count
5031 .\" NS width register `Rs' set in doc-common
5034 . nr doc-is-reference 1
5035 . doc-reset-reference
5036 . if \n[doc-in-see-also-section] \
5038 . nr doc-reference-count 0
5042 .\" NS Re user macro
5043 .\" NS reference end
5046 .\" NS doc-is-reference
5048 .\" NS width register `Re' set in doc-common
5051 . doc-print-reference
5052 . doc-reset-reference
5053 . nr doc-is-reference 0
5057 .\" NS doc-reset-reference macro
5058 .\" NS reference cleanup
5061 .\" NS doc-author-count, doc-journal-count, doc-issue-count,
5062 .\" NS doc-optional-count, doc-corporate-count, doc-report-count,
5063 .\" NS doc-reference-title-count, doc-volume-count, doc-date-count,
5064 .\" NS doc-page-number-count, doc-book-count, doc-reference-string-name,
5065 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
5066 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
5067 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5069 .de doc-reset-reference
5070 . while (\n[doc-author-count]) \{\
5071 . ds doc-author-name\n[doc-author-count]
5072 . nr doc-author-count -1
5074 . nr doc-journal-count 0
5075 . nr doc-issue-count 0
5076 . nr doc-optional-count 0
5077 . nr doc-corporate-count 0
5078 . nr doc-report-count 0
5079 . nr doc-reference-title-count 0
5080 . nr doc-volume-count 0
5081 . nr doc-date-count 0
5082 . nr doc-page-number-count 0
5083 . nr doc-book-count 0
5085 . ds doc-reference-string-name
5087 . ds doc-journal-name
5089 . ds doc-optional-string
5090 . ds doc-corporate-name
5091 . ds doc-report-name
5092 . ds doc-reference-title-name
5093 . ds doc-volume-name
5095 . ds doc-page-number-string
5100 .\" NS doc-finish-reference macro
5101 .\" NS auxiliary macro for doc-print-reference
5104 .\" NS doc-reference-count
5106 .de doc-finish-reference
5107 . nr doc-reference-count -1
5108 . ie \n[doc-reference-count] \
5115 .\" NS doc-print-reference macro
5116 .\" NS reference print
5119 .\" NS doc-reference-count, doc-authors-processed
5121 .de doc-print-reference
5122 . if \n[doc-author-count] \{\
5123 . nop \&\*[doc-author-name1],
5124 . nr doc-authors-processed 1
5125 . if (\n[doc-author-count] > 1) \
5126 . doc-print-reference-authors
5127 . nr doc-reference-count -\n[doc-author-count]
5130 . if \n[doc-reference-title-count] \{\
5131 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5132 . nop \&\*[q]\*[doc-reference-title-name]\*[q]\c
5133 . doc-finish-reference
5136 . nop \*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font]\c
5137 . doc-finish-reference
5140 . if \n[doc-book-count] \{\
5141 . nop \*[doc-Em-font]\*[doc-book-name]\*[doc-No-font]\c
5142 . doc-finish-reference
5145 . if \n[doc-publisher-count] \{\
5146 . nop \*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font]\c
5147 . doc-finish-reference
5150 . if \n[doc-journal-count] \{\
5151 . nop \*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font]\c
5152 . doc-finish-reference
5155 . if \n[doc-report-count] \{\
5156 . nop \&\*[doc-report-name]\c
5157 . doc-finish-reference
5160 . if \n[doc-issue-count] \{\
5161 . nop \&\*[doc-issue-name]\c
5162 . doc-finish-reference
5165 . if \n[doc-volume-count] \{\
5166 . nop \&\*[doc-volume-name]\c
5167 . doc-finish-reference
5170 . if \n[doc-page-number-count] \{\
5171 . nop \&\*[doc-page-number-string]\c
5172 . doc-finish-reference
5175 . if \n[doc-corporate-count] \{\
5176 . nop \&\*[doc-corporate-name]\c
5177 . doc-finish-reference
5180 . if \n[doc-date-count] \{\
5181 . nop \&\*[doc-date]\c
5182 . doc-finish-reference
5185 . if \n[doc-optional-count] \{\
5186 . nop \&\*[doc-optional-string]\c
5187 . doc-finish-reference
5190 . if \n[doc-reference-count] \
5191 . tm mdoc warning: unresolved reference problem
5195 .\" NS doc-authors-processed global register
5196 .\" NS author references processed so far
5198 .nr doc-authors-processed 0
5201 .\" NS doc-print-reference-authors macro
5202 .\" NS print out reference authors
5205 .\" NS doc-authors-processed
5207 .de doc-print-reference-authors
5208 . nr doc-authors-processed +1
5209 . ie (\n[doc-author-count] == \n[doc-authors-processed]) \
5210 . nop \&and \*[doc-author-name\n[doc-authors-processed]],
5212 . nop \&\*[doc-author-name\n[doc-authors-processed]],
5213 . doc-print-reference-authors
5218 .\" NS doc-author-count global register
5219 .\" NS counter of author references
5221 .nr doc-author-count 0
5224 .\" NS doc-author-nameXXX global string
5225 .\" NS array of author names
5227 .\" NS limit: doc-author-count
5229 .ds doc-author-name0
5232 .\" NS %A user macro
5233 .\" NS reference author(s)
5236 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5237 .\" MS doc-reference-count, doc-author-count, doc-reference-string-name
5239 .\" NS width register `%A' set in doc-common
5242 . if !\n[doc-arg-limit] \{\
5244 . nr doc-author-count +1
5245 . nr doc-reference-count +1
5246 . ds doc-reference-string-name doc-author-name\n[doc-author-count]
5248 . ds doc-macro-name %A
5249 . doc-parse-args \$@
5252 . tm Usage: .%A author_name (#\n[.c])
5256 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5257 . nr doc-curr-font \n[.f]
5258 . nr doc-curr-size \n[.s]
5264 .\" NS doc-book-count global register
5265 .\" NS counter of book references
5267 .nr doc-book-count 0
5270 .\" NS doc-book-name global string
5271 .\" NS string of collected book references
5276 .\" NS %B user macro
5277 .\" NS [reference] book name
5280 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5281 .\" NS doc-curr-size, doc-reference-count, doc-book-count,
5282 .\" NS doc-reference-string-name
5284 .\" NS width register `%B' set in doc-common
5287 . if !\n[doc-arg-limit] \{\
5289 . if \n[doc-is-reference] \{\
5290 . nr doc-book-count +1
5291 . nr doc-reference-count +1
5292 . ds doc-reference-string-name doc-book-name
5295 . ds doc-macro-name %B
5296 . doc-parse-args \$@
5299 . tm Usage: .%B book_name (#\n[.c])
5303 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5304 . nr doc-curr-font \n[.f]
5305 . nr doc-curr-size \n[.s]
5307 . ie !\n[doc-is-reference] \{\
5308 . as doc-out-string \*[doc-Em-font]
5309 . doc-print-recursive
5317 .\" NS doc-date-count global register
5318 .\" NS counter of date references
5320 .nr doc-date-count 0
5323 .\" NS doc-date global string
5324 .\" NS string of collected date references
5329 .\" NS %D user macro
5330 .\" NS [reference] date
5333 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5334 .\" NS doc-reference-count, doc-date-count, doc-reference-string-name
5336 .\" NS width register `%D' set in doc-common
5339 . if !\n[doc-arg-limit] \{\
5341 . nr doc-date-count +1
5342 . nr doc-reference-count +1
5343 . ds doc-reference-string-name doc-date
5345 . ds doc-macro-name %D
5346 . doc-parse-args \$@
5349 . tm Usage: .%D date (#\n[.c])
5353 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5354 . nr doc-curr-font \n[.f]
5355 . nr doc-curr-size \n[.s]
5361 .\" NS doc-publisher-count global register
5362 .\" NS counter of publisher references
5364 .nr doc-publisher-count 0
5367 .\" NS doc-publisher-name global string
5368 .\" NS string of collected publisher references
5370 .ds doc-publisher-name
5373 .\" NS %I user macro
5374 .\" NS [reference] issuer/publisher name
5377 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5378 .\" NS doc-reference-count, doc-reference-string-name
5380 .\" NS width register `%I' set in doc-common
5383 . if !\n[doc-arg-limit] \{\
5385 . nr doc-publisher-count +1
5386 . nr doc-reference-count +1
5387 . ds doc-reference-string-name doc-publisher-name
5389 . ds doc-macro-name %I
5390 . doc-parse-args \$@
5393 . tm Usage: .%I issuer/publisher_name (#\n[.c])
5397 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5398 . nr doc-curr-font \n[.f]
5399 . nr doc-curr-size \n[.s]
5405 .\" NS doc-journal-count global register
5406 .\" NS counter of journal references
5408 .nr doc-journal-count 0
5411 .\" NS doc-journal-name global string
5412 .\" NS string of collected journal references
5414 .ds doc-journal-name
5417 .\" NS %J user macro
5418 .\" NS [reference] Journal Name
5421 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5422 .\" NS doc-reference-count, doc-journal-count, doc-reference-string-name
5424 .\" NS width register `%J' set in doc-common
5427 . if !\n[doc-arg-limit] \{\
5429 . nr doc-journal-count +1
5430 . nr doc-reference-count +1
5431 . ds doc-reference-string-name doc-journal-name
5433 . ds doc-macro-name %J
5434 . doc-parse-args \$@
5437 . tm Usage: .%J journal_name (#\n[.c])
5441 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5442 . nr doc-curr-font \n[.f]
5443 . nr doc-curr-size \n[.s]
5449 .\" NS doc-issue-count global register
5450 .\" NS counter of issue number references
5452 .nr doc-issue-count 0
5455 .\" NS doc-issue-name global string
5456 .\" NS string of collected issue number references
5461 .\" NS %N user macro
5462 .\" NS [reference] issue number
5465 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5466 .\" NS doc-reference-count, doc-issue-count, doc-reference-string-name
5468 .\" NS width register `%N' set in doc-common
5471 . if !\n[doc-arg-limit] \{\
5473 . nr doc-issue-count +1
5474 . nr doc-reference-count +1
5475 . ds doc-reference-string-name doc-issue-name
5477 . ds doc-macro-name %N
5478 . doc-parse-args \$@
5481 . tm Usage: .%N issue_number (#\n[.c])
5485 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5486 . nr doc-curr-font \n[.f]
5487 . nr doc-curr-size \n[.s]
5493 .\" NS doc-optional-count global register
5494 .\" NS counter of optional information references
5496 .nr doc-optional-count 0
5499 .\" NS doc-optional-string global string
5500 .\" NS string of collected optional information references
5502 .ds doc-optional-string
5505 .\" NS %O user macro
5506 .\" NS [reference] optional information
5509 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5510 .\" NS doc-reference-count, doc-optional-count, doc-reference-string-name
5512 .\" NS width register `%O' set in doc-common
5515 . if !\n[doc-arg-limit] \{\
5517 . nr doc-optional-count +1
5518 . nr doc-reference-count +1
5519 . ds doc-reference-string-name doc-optional-string
5521 . ds doc-macro-name %O
5522 . doc-parse-args \$@
5525 . tm Usage: .%O optional_information ... \*[doc-punct-chars] (#\n[.c])
5529 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5530 . nr doc-curr-font \n[.f]
5531 . nr doc-curr-size \n[.s]
5537 .\" NS doc-page-number-count global register
5538 .\" NS counter of page number references
5540 .nr doc-page-number-count 0
5543 .\" NS doc-page-number-string global string
5544 .\" NS string of collected page number references
5546 .ds doc-page-number-string
5549 .\" NS %P user macro
5550 .\" NS [reference] page numbers
5553 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5554 .\" NS doc-reference-count, doc-page-number-count, doc-reference-string-name
5556 .\" NS width register `%P' set in doc-common
5559 . if !\n[doc-arg-limit] \{\
5561 . nr doc-page-number-count +1
5562 . nr doc-reference-count +1
5563 . ds doc-reference-string-name doc-page-number-string
5565 . ds doc-macro-name %P
5566 . doc-parse-args \$@
5569 . tm Usage: .%P page_numbers ... \*[doc-punct-chars] (#\n[.c])
5573 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5574 . nr doc-curr-font \n[.f]
5575 . nr doc-curr-size \n[.s]
5581 .\" NS doc-corporate-count global register
5582 .\" NS counter of corporate references
5584 .nr doc-corporate-count 0
5587 .\" NS doc-corporate-name global string
5588 .\" NS string of collected corporate references
5590 .ds doc-corporate-name
5593 .\" NS %Q user macro
5594 .\" NS corporate or foreign author
5597 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5598 .\" NS doc-reference-count, doc-corporate-count, doc-reference-string-name
5600 .\" NS width register `%Q' set in doc-common
5603 . if !\n[doc-arg-limit] \{\
5605 . nr doc-corporate-count +1
5606 . nr doc-reference-count +1
5607 . ds doc-reference-string-name doc-corporate-name
5609 . ds doc-macro-name %Q
5610 . doc-parse-args \$@
5613 . tm Usage: .%Q corporate_or_foreign_author (#\n[.c])
5617 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5618 . nr doc-curr-font \n[.f]
5619 . nr doc-curr-size \n[.s]
5625 .\" NS doc-report-count global register
5626 .\" NS counter of report references
5628 .nr doc-report-count 0
5631 .\" NS doc-report-name global string
5632 .\" NS string of collected report references
5637 .\" NS %R user macro
5638 .\" NS [reference] report name
5641 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5642 .\" NS doc-reference-count, doc-report-count, doc-reference-string-name
5644 .\" NS width register `%R' set in doc-common
5647 . if !\n[doc-arg-limit] \{\
5649 . nr doc-report-count +1
5650 . nr doc-reference-count +1
5651 . ds doc-reference-string-name doc-report-name
5653 . ds doc-macro-name %R
5654 . doc-parse-args \$@
5657 . tm Usage: .%R reference_report (#\n[.c])
5661 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5662 . nr doc-curr-font \n[.f]
5663 . nr doc-curr-size \n[.s]
5669 .\" NS doc-reference-title-count global register
5670 .\" NS counter of reference title references
5672 .nr doc-reference-title-count 0
5675 .\" NS doc-reference-title-name global string
5676 .\" NS string of collected reference title references
5678 .ds doc-reference-title-name
5681 .\" NS %T user macro
5682 .\" NS reference title
5685 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5686 .\" NS doc-curr-size, doc-reference-count, doc-reference-title-count,
5687 .\" NS doc-reference-string-name
5689 .\" NS width register `%T' set in doc-common
5692 . if !\n[doc-arg-limit] \{\
5694 . if \n[doc-is-reference] \{\
5695 . nr doc-reference-title-count +1
5696 . nr doc-reference-count +1
5697 . ds doc-reference-string-name doc-reference-title-name
5700 . ds doc-macro-name %T
5701 . doc-parse-args \$@
5704 . tm Usage: .%T reference_title (#\n[.c])
5708 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5709 . nr doc-curr-font \n[.f]
5710 . nr doc-curr-size \n[.s]
5711 . ie \n[doc-is-reference] \
5714 . as doc-out-string \*[doc-Em-font]
5715 . doc-print-recursive
5720 .\" NS doc-volume-count global register
5721 .\" NS counter of reference title references
5723 .nr doc-volume-count 0
5726 .\" NS doc-volume-name global string
5727 .\" NS string of collected volume references
5732 .\" NS %V user macro
5733 .\" NS reference volume
5736 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5737 .\" NS doc-reference-count, doc-volume-count, doc-reference-string-name
5739 .\" NS width register `%V' set in doc-common
5742 . if !\n[doc-arg-limit] \{\
5744 . ds doc-macro-name %V
5745 . nr doc-volume-count +1
5746 . nr doc-reference-count +1
5747 . ds doc-reference-string-name doc-volume-name
5748 . doc-parse-args \$@
5751 . tm Usage: .%V volume , ... \*[doc-punct-chars] (#\n[.c])
5755 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5756 . nr doc-curr-font \n[.f]
5757 . nr doc-curr-size \n[.s]
5763 .\" NS doc-do-references macro
5764 .\" NS reference recursion routine
5767 .\" NS doc-arg-ptr, doc-out-string, doc-reference-string-name,
5768 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
5769 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
5770 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5772 .\" NS local variables:
5773 .\" NS doc-reg-ddr, doc-reg-ddr1
5775 .de doc-do-references
5778 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
5780 . ie (\n[doc-reg-ddr1] == 1) \{\
5781 . \" .as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
5782 . ie "\*[doc-arg\n[doc-arg-ptr]]"Tn" \
5783 . doc-reference-trademark
5785 . doc-append-arg doc-do-references 1
5786 . \*[doc-arg\n[doc-arg-ptr]]
5789 . nr doc-reg-ddr \n[doc-arg-ptr]
5790 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
5792 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
5793 . as \*[doc-reference-string-name] \&\*[doc-out-string]
5795 . ds doc-reference-string-name
5800 . as doc-out-string "\*[doc-space\n[doc-reg-ddr]]
5806 .\" NS Hf user macro
5807 .\" NS source include header files.
5810 .\" NS doc-curr-font, doc-curr-size
5812 .\" NS width register `Hf' set in doc-common
5820 . nr doc-curr-font \n[.f]
5821 . nr doc-curr-size \n[.s]
5824 . nop \*[doc-Li-font]
5835 . ft \n[doc-curr-font]
5836 . ps \n[doc-curr-size]
5841 .\" NS doc-have-author global register (bool)
5844 .nr doc-have-author 0
5847 .\" NS An user macro
5851 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5852 .\" NS doc-have-author
5854 .\" NS width register `An' set in doc-common
5857 . if !\n[doc-arg-limit] \{\
5859 . ie "\$1"-nosplit" \
5860 . nr doc-in-authors-section 0
5861 . el \{ .ie "\$1"-split" \
5862 . nr doc-in-authors-section 1
5864 . ds doc-macro-name An
5865 . doc-parse-args \$@
5868 . tm Usage: .An author_name ... \*[doc-punct-chars] (#\n[.c])
5871 . if \n[doc-in-authors-section] \{\
5872 . ie \n[doc-have-author] \
5875 . nr doc-have-author 1
5879 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5880 . nr doc-curr-font \n[.f]
5881 . nr doc-curr-size \n[.s]
5882 . doc-print-recursive
5887 .\" NS Sf user macro
5890 .\" NS width register `Sf' set in doc-common
5893 . tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
5897 .ds doc-func-error-string "function returns the value\~0 if successful;
5898 .as doc-func-error-string " otherwise the value\~-1 is returned and
5899 .as doc-func-error-string " the global variable \*[doc-Va-font]errno\f[P]
5900 .as doc-func-error-string " is set to indicate the error.
5903 .\" NS Rv user macro
5904 .\" NS return values
5906 .\" NS width register `Rv' set in doc-common
5908 .\" NS local variables:
5913 .\" XXX: what does this function without `-std'?
5916 . tm Usage: .Rv [-std] (#\n[.c])
5918 . \" .ds doc-macro-name Rv
5919 . \" .nr doc-arg-ptr 0
5921 . \" .ds doc-arg1 \$2
5922 . \" .ds doc-arg2 \$3
5923 . \" .ds doc-arg3 \$4
5924 . \" .ds doc-arg4 \$5
5925 . \" .ds doc-arg5 \$6
5926 . \" .ds doc-arg6 \$7
5927 . \" .ds doc-arg7 \$8
5928 . \" .ds doc-arg8 \$9
5930 . \" .nr doc-num-args (\n[.$] - 1)
5933 . doc-reg-Rv \*[doc-section]
5934 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
5935 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
5939 . nop \&\*[doc-func-error-string]
5944 .\" NS Mt user macro
5945 .\" NS mailto (for conversion to HTML)
5948 . \" XXX: error handling missing
5953 .\" NS Lk user macro
5954 .\" NS link (for conversion to HTML)
5956 .\" NS local variables:
5957 .\" NS doc-str-Lk, doc-reg-Lk
5960 . ds doc-str-Lk Sy \$@
5962 . ie (\n[.$] > 1) \{\
5963 . doc-get-arg-type \$2
5964 . ie (\[doc-arg-type] < 3) \{\
5966 . ds doc-str-Lk Sy "\$1"
5967 . doc-get-width "\$1"
5970 . as doc-str-Lk " \$@
5973 . doc-get-width "\$1"
5976 . doc-get-width "\$1"
5982 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
5992 . tm mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
5993 . ab Should this have been `.Em ...'?
5997 .\" NS doc-empty-line macro
5998 .\" NS emit warning and print empty line
6001 . if !\n[doc-in-diversion] \
6002 . if !"\*[doc-macro-name]"Bd" \
6003 . tm mdoc warning: Empty input line #\n[.c]!
6013 .\" load local modifications