1 .\" Copyright (c) 1991, 1993
2 .\" The Regents of the University of California. 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 8.1 (Berkeley) 06/08/93
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.
41 .\" Werner LEMBERG <wl@gnu.org> and
42 .\" Ruslan Ermilov <ru@freebsd.org>
44 .\" to make it more readable: using long names and many groff features,
45 .\" updating and extending documentation, etc.
47 .\" $DragonFly: src/gnu/usr.bin/groff/tmac/Attic/doc.tmac,v 1.1 2004/02/03 08:37:33 rob Exp $
52 . ab This version of mdoc can be run with GNU troff only!
61 .if (\n[.x]\n[.y] < 118) \
62 . ab You need GNU troff version 1.18 or higher to run this version of mdoc!
65 .\" Load start-up files
67 . mso mdoc/doc-ditroff
78 .\" NS doc-macro-name global string
79 .\" NS name of calling request (set in each user-requestable macro)
82 .als doc-arg0 doc-macro-name
85 .\" NS doc-arg-limit global register
86 .\" NS total number of arguments
91 .\" NS doc-num-args global register
92 .\" NS number of arguments to handle (must be set to \n[.$] prior to
93 .\" NS `doc-parse-arg-vector' request)
98 .\" NS doc-arg-ptr global register
99 .\" NS argument pointer
104 .\" NS doc-argXXX global string
105 .\" NS argument vector
113 .\" NS doc-typeXXX global register
114 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
115 .\" NS punctuation prefix=4)
123 .\" NS doc-spaceXXX global string
132 .\" NS doc-parse-args macro
133 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
142 .\" NS doc-have-space
144 .\" NS local variables:
150 . if !\n[doc-arg-limit] \
153 . nr doc-have-space 0
158 . nr doc-arg-limit +1
160 . \" handle `|' and `...' specially
162 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
163 . el \{ .ie "\$1"..." \
164 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
166 . ds doc-arg\n[doc-arg-limit] "\$1
169 . \" get argument type and set spacing
170 . doc-get-arg-type* \n[doc-arg-limit]
171 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
172 . doc-set-spacing-\n[doc-arg-type]
174 . \" check whether we have processed the last parameter
186 .\" NS doc-parse-arg-vector macro
187 .\" NS parse argument vector (recursive)
189 .\" NS cf. comments in doc-parse-args
199 .\" NS local variables:
204 .de doc-parse-arg-vector
205 . if !\n[doc-arg-limit] \
208 . nr doc-arg-limit +1
210 . ie "\*[doc-arg\n[doc-arg-limit]]"|" \
211 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
212 . el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
213 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
216 . doc-get-arg-type* \n[doc-arg-limit]
217 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
218 . doc-set-spacing-\n[doc-arg-type]
220 . ie (\n[doc-num-args] == 1) \{\
226 . doc-parse-arg-vector
233 .\" NS doc-parse-space-vector macro
234 .\" NS parse space vector (recursive)
241 .de doc-parse-space-vector
242 . nr doc-arg-limit +1
244 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
246 . ie (\n[doc-num-args] == 1) \
250 . doc-parse-space-vector
255 .\" NS doc-remaining-args macro
256 .\" NS output remaining arguments as-is, separated by spaces (until
257 .\" NS `doc-num-args' is exhausted)
263 .de doc-remaining-args
265 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
267 . ie (\n[doc-num-args] == 1) \{\
272 . nop \)\*[doc-space]\c
279 .\" NS doc-append-arg macro
280 .\" NS append one argument to argument vector:
281 .\" NS `.doc-append-arg [arg] [type]'
289 . nr doc-arg-limit +1
290 . ds doc-arg\n[doc-arg-limit] "\$1
291 . nr doc-type\n[doc-arg-limit] \$2
292 . doc-set-spacing-\$2
296 .\" NS doc-print-and-reset macro
297 .\" NS finish input line and clean up argument vectors
299 .de doc-print-and-reset
300 . if \n[doc-space-mode] \
306 .\" NS doc-reset-args macro
307 .\" NS reset argument counters
319 . hy \n[doc-hyphen-flags]
325 .\" NS doc-curr-font global register
326 .\" NS saved current font
328 .nr doc-curr-font \n[.f]
331 .\" NS doc-curr-size global register
332 .\" NS saved current font size
334 .nr doc-curr-size \n[.ps]
340 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
346 .\" NS doc-macro-name
348 .\" NS local variables:
349 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
351 .\" NS width register `Fl' set in doc-common
354 . nr doc-curr-font \n[.f]
355 . nr doc-curr-size \n[.ps]
356 . nop \*[doc-Fl-font]\c
358 . if !\n[doc-arg-limit] \{\
359 . ds doc-macro-name Fl
364 . nop \|\-\|\f[]\s[0]
367 . if !\n[doc-arg-limit] \
371 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
373 . nop \|\-\f[]\s[0]\c
374 . doc-print-and-reset
377 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
378 . nop \|\-\f[]\s[0]\c
379 . \*[doc-arg\n[doc-arg-ptr]]
382 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
391 .\" NS doc-flag-recursion macro
392 .\" NS `Fl' flag recursion routine (special handling)
397 .\" NS local variables:
402 .de doc-flag-recursion
403 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
404 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
406 . ie (\n[doc-reg-dfr1] == 1) \{\
411 . nr doc-reg-dfr \n[doc-arg-ptr]
413 . ie (\n[doc-reg-dfr1] == 2) \{\
414 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
415 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
417 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
418 . if \n[doc-reg-Fl] \
419 . nop \|\-\*[doc-space]\c
423 . ie "\*[doc-str-dfr]"\f[R]|\f[]" \{\
424 . if \n[doc-reg-Fl] \
425 . nop \|\-\*[doc-space]\c
429 . \" two consecutive hyphen characters?
430 . ie "\*[doc-str-dfr]"-" \
433 . nop \|\%\-\*[doc-str-dfr]\&\c
436 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
437 . nop \)\*[doc-str-dfr]\f[]\s[0]\c
440 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
442 . if (\n[doc-reg-dfr1] == 4) \
445 . doc-print-and-reset
449 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
450 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
453 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
456 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
460 . doc-flag-recursion \$@
465 .\" NS doc-print-recursive macro
466 .\" NS general name recursion routine (print remaining arguments)
471 .\" NS local variables:
476 .de doc-print-recursive
477 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
478 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
480 . ie (\n[doc-reg-dpr1] == 1) \{\
481 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
485 . nr doc-reg-dpr \n[doc-arg-ptr]
487 . ie (\n[doc-reg-dpr1] == 2) \
488 . \" the `\%' prevents hyphenation on a dash (`-')
489 . nop \%\*[doc-str-dpr]\&\c
491 . \" punctuation character
492 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
493 . nop \)\*[doc-str-dpr]\f[]\s[0]\c
497 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
499 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
500 . doc-print-and-reset
503 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
504 . doc-print-recursive
509 .\" NS doc-print-prefixes macro
510 .\" NS print leading prefixes
515 .de doc-print-prefixes
516 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
517 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
519 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
520 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
526 .\" NS doc-generic-macro macro
527 .\" NS this is the skeleton for most simple macros
533 .\" NS doc-macro-name
535 .de doc-generic-macro
536 . if !\n[doc-arg-limit] \{\
538 . ds doc-macro-name \$0
542 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
545 . if !\n[doc-arg-limit] \
549 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
550 . if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
551 . tmc mdoc warning: Using a macro as first argument
552 . tm1 " cancels effect of .\$0 (#\n[.c])
554 . \" the right action here would be to reset the argument counters
555 . \" and bail out -- unfortunately, a small number of manual pages
556 . \" (less than 2% for FreeBSD which has been used for testing)
557 . \" relied on the old behaviour (silently ignore this error),
558 . \" so it is commented out
563 . nr doc-curr-font \n[.f]
564 . nr doc-curr-size \n[.ps]
565 . nop \*[doc-\$0-font]\c
566 . doc-print-recursive
570 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
577 .\" NS command line `argument' macro: `.Ar [args ...]'
583 .\" NS doc-macro-name
585 .\" NS local variable:
586 .\" NS doc-str-Ar-default
588 .\" NS width register `Ar' set in doc-common
590 .ds doc-str-Ar-default "file\ .\|.\|.
593 . nr doc-curr-font \n[.f]
594 . nr doc-curr-size \n[.ps]
595 . nop \*[doc-Ar-font]\c
597 . if !\n[doc-arg-limit] \{\
598 . ds doc-macro-name Ar
603 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
606 . if !\n[doc-arg-limit] \
611 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
612 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
613 . doc-print-and-reset
616 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
617 . \" replace previous argument (Ar) with default value
619 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
620 . nr doc-type\n[doc-arg-ptr] 2
621 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
623 . \" recompute space vector for remaining arguments
624 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
625 . nr doc-arg-limit \n[doc-arg-ptr]
626 . doc-parse-space-vector
628 . doc-print-recursive
636 .\" NS width register `Ad' set in doc-common
638 .als Ad doc-generic-macro
639 .ds doc-Ad-usage address
642 .\" NS doc-indent-synopsis global register
643 .\" NS indentation in synopsis
645 .nr doc-indent-synopsis 0
648 .\" NS doc-indent-synopsis-active global register (bool)
649 .\" NS indentation in synopsis active
651 .nr doc-indent-synopsis-active 0
655 .\" NS config declaration (for section 4 SYNOPSIS)
657 .\" NS this function causes a break; it uses the `Nm' font
663 .\" NS doc-indent-synopsis
664 .\" NS doc-macro-name
666 .\" NS width register `Cd' set in doc-common
669 . if !\n[doc-arg-limit] \{\
671 . ds doc-macro-name Cd
675 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
678 . if !\n[doc-arg-limit] \
682 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
683 . nr doc-curr-font \n[.f]
684 . nr doc-curr-size \n[.ps]
686 . ie \n[doc-in-synopsis-section] \{\
687 . if "\*[doc-macro-name]"Cd" \{\
689 . if !\n[doc-indent-synopsis] \
690 . nr doc-indent-synopsis \n[doc-display-indent]u
691 . if !\n[doc-indent-synopsis-active] \
692 . in +\n[doc-indent-synopsis]u
693 . ti -\n[doc-indent-synopsis]u
694 . nop \*[doc-Nm-font]\c
695 . doc-print-recursive
696 . if !\n[doc-indent-synopsis-active] \
697 . in -\n[doc-indent-synopsis]u
700 . nop \*[doc-Nm-font]\c
701 . doc-print-recursive
704 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
711 .\" NS interactive command modifier (flag)
713 .\" NS width register `Cm' set in doc-common
715 .als Cm doc-generic-macro
716 .ds doc-Cm-usage interactive_command_modifier
720 .\" NS defined variable
722 .\" NS this function uses the `Er' font
724 .\" NS width register `Dv' set in doc-common
726 .als Dv doc-generic-macro
727 .ds doc-Dv-usage defined_variable
728 .als doc-Dv-font doc-Er-font
734 .\" NS width register `Em' set in doc-common
736 .als Em doc-generic-macro
737 .ds doc-Em-usage text
743 .\" NS width register `Er' set in doc-common
745 .als Er doc-generic-macro
746 .ds doc-Er-usage text
750 .\" NS environment variable
752 .\" NS width register `Ev' set in doc-common
754 .als Ev doc-generic-macro
755 .ds doc-Ev-usage text
758 .\" NS doc-have-decl global register (bool)
759 .\" NS subroutine test (in synopsis only)
764 .\" NS doc-have-var global register (bool)
765 .\" NS whether last type is a variable type
770 .\" NS doc-do-func-decl macro
771 .\" NS do someting special while in SYNOPSIS
780 . if \n[doc-in-synopsis-section] \{\
781 . \" if a variable type was the last thing given, want vertical space
782 . if \n[doc-have-var] \{\
786 . \" if a subroutine was the last thing given, want vertical space
787 . if \n[doc-have-func] \{\
788 . ie \n[doc-have-decl] \
796 . nr doc-curr-font \n[.f]
797 . nr doc-curr-size \n[.ps]
802 .\" NS function declaration -- not callable
804 .\" NS this function causes a break
806 .\" NS width register `Fd' set in doc-common
809 . ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
811 . nop \*[doc-Fd-font]\$*
813 . ft \n[doc-curr-font]
814 . ps \n[doc-curr-size]u
817 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
824 .\" NS #include statement - not callable
826 .\" NS this function causes a break; it uses the `Fd' font
828 .\" NS width register `In' set in doc-common
831 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
833 . nop \*[doc-Fd-font]#include <\$1>
835 . ft \n[doc-curr-font]
836 . ps \n[doc-curr-size]u
839 . tm Usage: .In include_file -- In is not callable (#\n[.c])
846 .\" NS function return value
848 .\" NS this function uses the `Ar' font
850 .\" NS width register `Fr' set in doc-common
852 .als Fr doc-generic-macro
853 .ds doc-Fr-usage function_return_value
854 .als doc-Fr-font doc-Ar-font
858 .\" NS interactive command
860 .\" NS width register `Ic' set in doc-common
862 .als Ic doc-generic-macro
863 .ds doc-Ic-usage interactive_command
869 .\" NS width register `Li' set in doc-common
871 .als Li doc-generic-macro
872 .ds doc-Li-usage argument
878 .\" NS this function uses the `Sy' font
880 .\" NS width register `Ms' set in doc-common
882 .als Ms doc-generic-macro
883 .ds doc-Ms-usage math_symbol
884 .als doc-Ms-font doc-Sy-font
887 .\" NS doc-command-name global string
888 .\" NS save first invocation of .Nm
894 .\" NS name of command or page topic
898 .\" NS doc-command-name
901 .\" NS doc-indent-synopsis
902 .\" NS doc-indent-synopsis-active
903 .\" NS doc-macro-name
905 .\" NS width register `Nm' set in doc-common
908 . if !\n[doc-arg-limit] \{\
909 . ds doc-macro-name Nm
913 . ie "\*[doc-command-name]"" \
914 . tm Usage: .Nm name ... (#\n[.c])
916 . doc-parse-args \*[doc-command-name]
919 . if !\n[doc-arg-limit] \
924 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
926 . ie "\*[doc-command-name]"" \{\
927 . tm Usage: .Nm name ... (#\n[.c])
931 . nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
932 . doc-print-and-reset
935 . nr doc-curr-font \n[.f]
936 . nr doc-curr-size \n[.ps]
938 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
939 . ie "\*[doc-command-name]"" \
940 . tm Usage: .Nm name ... (#\n[.c])
942 . \" replace previous argument (Nm) with default value
944 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
945 . nr doc-type\n[doc-arg-ptr] 2
946 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
948 . \" recompute space vector for remaining arguments
949 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
950 . nr doc-arg-limit \n[doc-arg-ptr]
951 . doc-parse-space-vector
954 . \" handle `.Nm ...' in SYNOPSIS
955 . if \n[doc-in-synopsis-section] \{\
956 . if "\*[doc-macro-name]"Nm" \{\
958 . if !\n[doc-indent-synopsis] \{\
959 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
960 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
962 . if !\n[doc-indent-synopsis-active] \{\
963 . in +\n[doc-indent-synopsis]u
964 . nr doc-indent-synopsis-active 1
966 . ti -\n[doc-indent-synopsis]u
968 . if "\*[doc-command-name]"" \
969 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
971 . nop \*[doc-Nm-font]\c
973 . doc-print-recursive
979 .\" NS pathname: `.Pa [arg ...]'
985 .\" NS doc-macro-name
987 .\" NS width register `Pa' set in doc-common
990 . if !\n[doc-arg-limit] \{\
991 . ds doc-macro-name Pa
996 . nop \*[doc-Pa-font]~\f[]\s[0]
999 . if !\n[doc-arg-limit] \
1003 . doc-print-prefixes
1004 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1005 . nr doc-curr-font \n[.f]
1006 . nr doc-curr-size \n[.ps]
1007 . nop \*[doc-Pa-font]\c
1008 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1009 . \" replace previous argument (Pa) with default value
1011 . ds doc-arg\n[doc-arg-ptr] ~
1012 . nr doc-type\n[doc-arg-ptr] 2
1013 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1015 . \" recompute space vector for remaining arguments
1016 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1017 . nr doc-arg-limit \n[doc-arg-ptr]
1018 . doc-parse-space-vector
1020 . doc-print-recursive
1023 . nop \*[doc-Pa-font]~\f[]\s[0]\c
1024 . doc-print-and-reset
1029 .\" NS Sy user macro
1032 .\" NS width register `Sy' set in doc-common
1034 .als Sy doc-generic-macro
1035 .ds doc-Sy-usage symbolic_text
1038 .\" NS Me user macro
1041 .\" NS width register `Me' set in doc-common
1043 .als Me doc-generic-macro
1044 .ds doc-Me-usage menu_entry
1047 .\" NS Tn user macro
1052 .\" NS doc-curr-font
1053 .\" NS doc-curr-size
1054 .\" NS doc-macro-name
1056 .\" NS width register `Tn' set in doc-common
1059 . if !\n[doc-arg-limit] \{\
1061 . ds doc-macro-name Tn
1062 . doc-parse-args \$@
1065 . tm Usage: .Tn trade_name ... (#\n[.c])
1068 . if !\n[doc-arg-limit] \
1072 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1073 . nr doc-curr-font \n[.f]
1074 . nr doc-curr-size \n[.ps]
1075 . nop \)\*[doc-Tn-font-size]\c
1076 . ie !\n[doc-is-reference] \{\
1077 . nop \)\*[doc-Tn-font-shape]\c
1078 . doc-print-recursive
1084 . tm Usage: .Tn trade_name ... (#\n[.c])
1090 .\" NS Va user macro
1091 .\" NS variable name
1093 .\" NS width register `Va' set in doc-common
1095 .als Va doc-generic-macro
1096 .ds doc-Va-usage variable_name
1099 .\" NS No user macro
1100 .\" NS normal text macro (default text style if mess up)
1102 .\" NS width register `No' set in doc-common
1104 .als No doc-generic-macro
1105 .ds doc-No-usage normal_text
1108 .\" NS doc-quote-left global string
1109 .\" NS left quotation character for `doc-enclose-string' and
1110 .\" NS `doc-enclose-open'
1115 .\" NS doc-quote-right global string
1116 .\" NS right quotation character for `doc-enclose-string' and
1117 .\" NS `doc-enclose-close'
1122 .\" NS Op user macro
1123 .\" NS option expression (i.e., enclose string in square brackets)
1126 .\" NS doc-macro-name
1127 .\" NS doc-quote-left
1128 .\" NS doc-quote-right
1130 .\" NS width register `Op' set in doc-common
1133 . if !\n[doc-arg-limit] \
1134 . ds doc-macro-name Op
1136 . ds doc-quote-left "\*[doc-left-bracket]
1137 . ds doc-quote-right "\*[doc-right-bracket]
1139 . doc-enclose-string \$@
1143 .\" NS Aq user macro
1144 .\" NS enclose string in angle brackets
1147 .\" NS doc-macro-name
1148 .\" NS doc-quote-left
1149 .\" NS doc-quote-right
1151 .\" NS width register `Aq' set in doc-common
1154 . if !\n[doc-arg-limit] \
1155 . ds doc-macro-name Aq
1157 . ds doc-quote-left \[la]
1158 . ds doc-quote-right \[ra]
1160 . doc-enclose-string \$@
1164 .\" NS Bq user macro
1165 .\" NS enclose string in square brackets
1168 .\" NS doc-macro-name
1169 .\" NS doc-quote-left
1170 .\" NS doc-quote-right
1172 .\" NS width register `Bq' set in doc-common
1175 . if !\n[doc-arg-limit] \
1176 . ds doc-macro-name Bq
1178 . ds doc-quote-left "\*[doc-left-bracket]
1179 . ds doc-quote-right "\*[doc-right-bracket]
1181 . doc-enclose-string \$@
1185 .\" NS Brq user macro
1186 .\" NS enclose string in braces
1189 .\" NS doc-macro-name
1190 .\" NS doc-quote-left
1191 .\" NS doc-quote-right
1193 .\" NS width register `Brq' set in doc-common
1196 . if !\n[doc-arg-limit] \
1197 . ds doc-macro-name Brq
1199 . ds doc-quote-left {
1200 . ds doc-quote-right }
1202 . doc-enclose-string \$@
1206 .\" NS Dq user macro
1207 .\" NS enclose string in double quotes
1210 .\" NS doc-macro-name
1211 .\" NS doc-quote-left
1212 .\" NS doc-quote-right
1214 .\" NS width register `Dq' set in doc-common
1217 . if !\n[doc-arg-limit] \
1218 . ds doc-macro-name Dq
1220 . ds doc-quote-left "\*[Lq]
1221 . ds doc-quote-right "\*[Rq]
1223 . doc-enclose-string \$@
1227 .\" NS Eq user macro
1228 .\" NS enclose string in user-defined quotes (args 1 and 2)
1231 .\" NS doc-macro-name
1232 .\" NS doc-quote-left
1233 .\" NS doc-quote-right
1235 .\" NS width register `Eq' set in doc-common
1238 . if !\n[doc-arg-limit] \
1239 . ds doc-macro-name Eq
1241 . ds doc-quote-left "\$1
1242 . ds doc-quote-right "\$2
1245 . doc-enclose-string \$@
1249 .\" NS Pq user macro
1250 .\" NS enclose string in parentheses
1253 .\" NS doc-macro-name
1254 .\" NS doc-quote-left
1255 .\" NS doc-quote-right
1257 .\" NS width register `Pq' set in doc-common
1260 . if !\n[doc-arg-limit] \
1261 . ds doc-macro-name Pq
1263 . ds doc-quote-left "\*[doc-left-parenthesis]
1264 . ds doc-quote-right "\*[doc-right-parenthesis]
1266 . doc-enclose-string \$@
1270 .\" NS Ql user macro
1271 .\" NS quoted literal
1273 .\" is in file doc-[dit|n]roff
1276 .\" NS Qq user macro
1277 .\" NS enclose string in straight double quotes
1280 .\" NS doc-macro-name
1281 .\" NS doc-quote-left
1282 .\" NS doc-quote-right
1284 .\" NS width register `Qq' set in doc-common
1287 . if !\n[doc-arg-limit] \
1288 . ds doc-macro-name Qq
1290 . ds doc-quote-left "\*[q]
1291 . ds doc-quote-right "\*[q]
1293 . doc-enclose-string \$@
1297 .\" NS Sq user macro
1298 .\" NS enclose string in single quotes
1301 .\" NS doc-macro-name
1302 .\" NS doc-quote-left
1303 .\" NS doc-quote-right
1305 .\" NS width register `Sq' set in doc-common
1308 . if !\n[doc-arg-limit] \
1309 . ds doc-macro-name Sq
1311 . ds doc-quote-left "\*[doc-left-singlequote]
1312 . ds doc-quote-right "\*[doc-right-singlequote]
1314 . doc-enclose-string \$@
1318 .\" NS Es user macro
1319 .\" NS set up arguments (i.e., the left and right quotation character as
1320 .\" NS first and second argument) for .En call
1324 .\" NS doc-macro-name
1325 .\" NS doc-quote-left
1326 .\" NS doc-quote-right
1329 . if !\n[doc-arg-limit] \{\
1330 . ie (\n[.$] > 2) \{\
1331 . ds doc-macro-name Es
1332 . doc-parse-args \$@
1335 . ds doc-quote-left "\$1
1336 . ds doc-quote-right "\$2
1339 . if !\n[doc-arg-limit] \
1343 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1345 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1347 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1348 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1350 . doc-print-and-reset
1354 .\" NS doc-have-slot global register (bool)
1355 .\" NS set if `doc-enclose-string' has created a slot for closing
1361 .\" NS doc-enclose-string macro
1362 .\" NS enclose string with given args (e.g. [ and ])
1367 .\" NS doc-have-slot
1369 .\" NS local variables:
1375 .\" NS doc-quote-left
1376 .\" NS doc-quote-right
1378 .de doc-enclose-string
1379 . if \n[doc-in-synopsis-section] \
1380 . doc-set-hard-space
1382 . if !\n[doc-arg-limit] \{\
1384 . doc-parse-args \$@
1386 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1389 . if !\n[doc-arg-limit] \
1392 . nr doc-curr-font \n[.f]
1393 . nr doc-curr-size \n[.ps]
1396 . doc-print-prefixes
1397 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1398 . nop \)\*[doc-quote-left]\)\c
1399 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1401 . nop \)\*[doc-quote-right]\)\c
1402 . doc-print-and-reset
1405 . \" test whether last arguments are of type closing punctuation
1407 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1408 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1409 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1412 . \" prepend closing delimiter
1414 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1417 . \" test whether last arguments are macros which continue the line
1419 . nr doc-reg-des \n[doc-arg-limit]
1420 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1421 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1423 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1428 . \" if there are no trailing macros to be skipped, append argument
1429 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1430 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1432 . \" if a previous call to `doc-enclose-string' has already created
1433 . \" a slot, prepend argument
1434 . ie \n[doc-have-slot] \
1435 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1437 . \" we have to shift all arguments to the right
1439 . nr doc-reg-des1 \n[doc-arg-limit]
1440 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1441 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1442 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1443 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1444 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1445 . nr doc-reg-des1 -1
1446 . nr doc-reg-des2 -1
1448 . nr doc-arg-limit +1
1450 . \" finally, insert closing delimiter into the freed slot and
1451 . \" recompute spacing vector
1452 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1453 . nr doc-type\n[doc-reg-des] 3
1454 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1455 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1456 . doc-parse-space-vector
1457 . nr doc-have-slot 1
1460 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1463 . if \n[doc-in-synopsis-section] \
1464 . doc-set-soft-space
1468 .\" NS En user macro
1469 .\" NS enclose arguments with quotation characters set up with `.Es'
1471 .als En doc-enclose-string
1474 .\" NS Ao user macro
1478 .\" NS doc-macro-name
1479 .\" NS doc-quote-left
1481 .\" NS width register `Ao' set in doc-common
1484 . if !\n[doc-arg-limit] \
1485 . ds doc-macro-name Ao
1487 . ds doc-quote-left \[la]
1489 . doc-enclose-open \$@
1493 .\" NS Ac user macro
1497 .\" NS doc-macro-name
1498 .\" NS doc-quote-right
1500 .\" NS width register `Ac' set in doc-common
1503 . if !\n[doc-arg-limit] \
1504 . ds doc-macro-name Ac
1506 . ds doc-quote-right \[ra]
1508 . doc-enclose-close \$@
1512 .\" NS Bo user macro
1516 .\" NS doc-macro-name
1517 .\" NS doc-quote-left
1519 .\" NS width register `Bo' set in doc-common
1522 . if !\n[doc-arg-limit] \
1523 . ds doc-macro-name Bo
1525 . ds doc-quote-left "\*[doc-left-bracket]
1527 . doc-enclose-open \$@
1531 .\" NS Bc user macro
1532 .\" NS bracket close
1535 .\" NS doc-macro-name
1536 .\" NS doc-quote-right
1538 .\" NS width register `Bc' set in doc-common
1541 . if !\n[doc-arg-limit] \
1542 . ds doc-macro-name Bc
1544 . ds doc-quote-right "\*[doc-right-bracket]
1546 . doc-enclose-close \$@
1550 .\" NS Bro user macro
1554 .\" NS doc-macro-name
1555 .\" NS doc-quote-left
1557 .\" NS width register `Bro' set in doc-common
1560 . if !\n[doc-arg-limit] \
1561 . ds doc-macro-name Bo
1563 . ds doc-quote-left {
1565 . doc-enclose-open \$@
1569 .\" NS Brc user macro
1573 .\" NS doc-macro-name
1574 .\" NS doc-quote-right
1576 .\" NS width register `Brc' set in doc-common
1579 . if !\n[doc-arg-limit] \
1580 . ds doc-macro-name Bc
1582 . ds doc-quote-right }
1584 . doc-enclose-close \$@
1588 .\" NS Do user macro
1589 .\" NS double quote open
1592 .\" NS doc-macro-name
1593 .\" NS doc-quote-left
1595 .\" NS width register `Do' set in doc-common
1598 . if !\n[doc-arg-limit] \
1599 . ds doc-macro-name Do
1601 . ds doc-quote-left "\*[Lq]
1603 . doc-enclose-open \$@
1607 .\" NS Dc user macro
1608 .\" NS double quote close
1611 .\" NS doc-macro-name
1612 .\" NS doc-quote-right
1614 .\" NS width register `Dc' set in doc-common
1617 . if !\n[doc-arg-limit] \
1618 . ds doc-macro-name Dc
1620 . ds doc-quote-right "\*[Rq]
1622 . doc-enclose-close \$@
1626 .\" NS Eo user macro
1627 .\" NS enclose open (using first argument as beginning of enclosure)
1630 .\" NS doc-macro-name
1631 .\" NS doc-quote-left
1633 .\" NS width register `Eo' set in doc-common
1636 . if !\n[doc-arg-limit] \
1637 . ds doc-macro-name Eo
1639 . ds doc-quote-left "\$1
1642 . doc-enclose-open \$@
1646 .\" NS Ec user macro
1647 .\" NS enclose close (using first argument as end of enclosure)
1650 .\" NS doc-macro-name
1651 .\" NS doc-quote-right
1653 .\" NS width register `Ec' set in doc-common
1656 . if !\n[doc-arg-limit] \
1657 . ds doc-macro-name Ec
1659 . ds doc-quote-right "\$1
1662 . doc-enclose-close \$@
1666 .\" NS Oo user macro
1670 .\" NS doc-macro-name
1671 .\" NS doc-quote-left
1673 .\" NS width register `Oo' set in doc-common
1676 . if !\n[doc-arg-limit] \
1677 . ds doc-macro-name Oo
1679 . ds doc-quote-left [
1681 . doc-enclose-open \$@
1685 .\" NS Oc user macro
1689 .\" NS doc-macro-name
1690 .\" NS doc-quote-right
1692 .\" NS width register `Oc' set in doc-common
1695 . if !\n[doc-arg-limit] \
1696 . ds doc-macro-name Oc
1698 . ds doc-quote-right ]
1700 . doc-enclose-close \$@
1704 .\" NS Po user macro
1705 .\" NS parenthesis open
1708 .\" NS doc-macro-name
1709 .\" NS doc-quote-left
1711 .\" NS width register `Po' set in doc-common
1714 . if !\n[doc-arg-limit] \
1715 . ds doc-macro-name Po
1717 . ds doc-quote-left "\*[doc-left-parenthesis]
1719 . doc-enclose-open \$@
1723 .\" NS Pc user macro
1724 .\" NS parenthesis close
1727 .\" NS doc-macro-name
1728 .\" NS doc-quote-right
1730 .\" NS width register `Pc' set in doc-common
1733 . if !\n[doc-arg-limit] \
1734 . ds doc-macro-name Pc
1736 . ds doc-quote-right "\*[doc-right-parenthesis]
1738 . doc-enclose-close \$@
1742 .\" NS Qo user macro
1743 .\" NS straight double quote open
1746 .\" NS doc-macro-name
1747 .\" NS doc-quote-left
1749 .\" NS width register `Qo' set in doc-common
1752 . if !\n[doc-arg-limit] \
1753 . ds doc-macro-name Qo
1755 . ds doc-quote-left "\*[q]
1757 . doc-enclose-open \$@
1761 .\" NS Qc user macro
1762 .\" NS straight double quote close
1765 .\" NS doc-macro-name
1766 .\" NS doc-quote-right
1768 .\" NS width register `Qc' set in doc-common
1771 . if !\n[doc-arg-limit] \
1772 . ds doc-macro-name Qc
1774 . ds doc-quote-right "\*[q]
1776 . doc-enclose-close \$@
1780 .\" NS So user macro
1781 .\" NS single quote open
1784 .\" NS doc-macro-name
1785 .\" NS doc-quote-left
1787 .\" NS width register `So' set in doc-common
1790 . if !\n[doc-arg-limit] \
1791 . ds doc-macro-name So
1793 . ds doc-quote-left "\*[doc-left-singlequote]
1795 . doc-enclose-open \$@
1799 .\" NS Sc user macro
1800 .\" NS single quote close
1803 .\" NS doc-macro-name
1804 .\" NS doc-quote-right
1806 .\" NS width register `Sc' set in doc-common
1809 . if !\n[doc-arg-limit] \
1810 . ds doc-macro-name Sc
1812 . ds doc-quote-right "\*[doc-right-singlequote]
1814 . doc-enclose-close \$@
1818 .\" NS Xo user macro
1822 .\" NS doc-macro-name
1823 .\" NS doc-quote-left
1825 .\" NS width register `Xo' set in doc-common
1828 . if !\n[doc-arg-limit] \
1829 . ds doc-macro-name Xo
1833 . doc-enclose-open \$@
1837 .\" NS Xc user macro
1841 .\" NS doc-macro-name
1842 .\" NS doc-quote-right
1844 .\" NS width register `Xc' set in doc-common
1847 . if !\n[doc-arg-limit] \
1848 . ds doc-macro-name Xc
1850 . ds doc-quote-right
1852 . doc-enclose-close \$@
1856 .\" NS doc-nesting-level global register
1857 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1859 .nr doc-nesting-level 0
1862 .\" NS doc-in-list global register (bool)
1863 .\" NS whether we are in (logical) .It
1868 .\" NS doc-enclose-open macro
1869 .\" NS enclose string open
1873 .\" NS doc-nesting-level
1875 .de doc-enclose-open
1876 . if !\n[doc-arg-limit] \
1877 . doc-parse-args \$@
1880 . doc-print-prefixes
1883 . nop \)\*[doc-quote-left]\)\c
1885 . \" start enclosure box
1886 . box doc-enclosure-box\n[doc-nesting-level]
1887 . ev doc-enclosure-env\n[doc-nesting-level]
1891 . \" we insert something to make .chop always work
1894 . \" increase nesting level *after* parsing of arguments
1895 . nr doc-nesting-level +1
1897 . if \n[doc-arg-limit] \{\
1899 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1900 . doc-print-recursive
1907 .\" NS doc-enclose-close macro
1908 .\" NS enclose string close
1911 .\" NS doc-nesting-level
1913 .de doc-enclose-close
1914 . nr doc-nesting-level -1
1916 . \" finish enclosure box
1920 . chop doc-enclosure-box\n[doc-nesting-level]
1921 . unformat doc-enclosure-box\n[doc-nesting-level]
1924 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1925 . nop \)\*[doc-quote-right]\)\c
1927 . if !\n[doc-arg-limit] \{\
1928 . doc-parse-args \$@
1931 . doc-print-and-reset
1934 . if \n[doc-arg-limit] \{\
1935 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1936 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1938 . doc-print-recursive
1941 . doc-print-and-reset
1944 . \" shall we finish .It macro?
1945 . if !"\*[doc-macro-name]"It" \
1946 . if \n[doc-in-list] \
1947 . if !\n[doc-nesting-level] \
1948 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
1952 .\" NS Pf user macro
1953 .\" NS prefix: `.Pf prefix arg ...'
1957 .\" NS doc-macro-name
1958 .\" NS doc-quote-left
1960 .\" NS width register `Pf' set in doc-common
1963 . if !\n[doc-arg-limit] \
1964 . ds doc-macro-name Pf
1966 . ie \n[doc-arg-limit] \{\
1967 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
1969 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
1972 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
1978 . doc-parse-args \$@
1980 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
1984 . if \n[doc-arg-limit] \{\
1986 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
1987 . doc-print-and-reset
1989 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1994 .\" NS Ns user macro
1995 .\" NS remove space (space removal done by `doc-parse-args')
1999 .\" NS doc-macro-name
2001 .\" NS width register `Ns' set in doc-common
2004 . if !\n[doc-arg-limit] \{\
2006 . ds doc-macro-name Ns
2007 . doc-parse-args \$@
2010 . tm Usage: .Ns must be called with arguments (#\n[.c])
2013 . if \n[doc-arg-limit] \{\
2015 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2016 . doc-print-recursive
2023 .\" NS Ap user macro
2024 .\" NS append an apostrophe
2026 .\" NS width register `Ap' set in doc-common
2029 . ie !\n[doc-arg-limit] \
2030 . tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2034 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2035 . doc-print-recursive
2042 .\" NS doc-space global string
2043 .\" NS current inter-argument space
2045 .ds doc-space "\*[doc-soft-space]
2048 .\" NS doc-soft-space constant string
2049 .\" NS soft (stretchable) space (defined in doc-common)
2052 .\" NS doc-hard-space constant string
2053 .\" NS hard (unpaddable) space (defined in doc-common)
2056 .\" NS doc-set-hard-space macro
2057 .\" NS set current space string to hard (unpaddable) space.
2060 .\" NS doc-saved-space
2063 .de doc-set-hard-space
2064 . ie "\*[doc-space]"" \
2065 . ds doc-saved-space "\*[doc-hard-space]
2067 . ds doc-space "\*[doc-hard-space]
2071 .\" NS doc-set-soft-space macro
2072 .\" NS set current space string to soft space
2075 .\" NS doc-saved-space
2078 .de doc-set-soft-space
2079 . ie "\*[doc-space]"" \
2080 . ds doc-saved-space "\*[doc-soft-space]
2082 . ds doc-space "\*[doc-soft-space]
2086 .\" NS doc-space-mode global register (bool)
2087 .\" NS default is one (space mode on)
2089 .nr doc-space-mode 1
2092 .\" NS doc-saved-space global string
2093 .\" NS saved value of `doc-space'
2095 .ds doc-saved-space "\*[doc-space]
2098 .\" NS doc-have-space global register (bool)
2099 .\" NS set if last command was horizontal space
2101 .nr doc-have-space 0
2104 .\" NS Sm user macro
2105 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2107 .\" NS without argument, toggle space mode
2110 .\" NS doc-arg-limit
2113 .\" NS doc-macro-name
2115 .\" NS doc-saved-space
2117 .\" NS doc-space-mode
2120 .\" NS local variables:
2123 .\" NS width register `Sm' set in doc-common
2126 . ie \n[doc-have-space] \
2131 . if !\n[doc-arg-limit] \{\
2133 . ds doc-macro-name Sm
2134 . doc-parse-args \$@
2137 . ie \n[doc-space-mode] \
2138 . nr doc-space-mode 0
2140 . nr doc-space-mode 1
2143 . if !\n[doc-arg-limit] \
2148 . \" avoid a warning message in case `Sm' is the last parameter
2149 . if !d doc-arg\n[doc-arg-ptr] \
2150 . ds doc-arg\n[doc-arg-ptr]
2152 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2153 . ds doc-space "\*[doc-saved-space]
2154 . nr doc-space-mode 1
2157 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2158 . ds doc-saved-space "\*[doc-space]
2160 . nr doc-space-mode 0
2163 . \" no argument for Sm
2165 . ie \n[doc-space-mode] \
2166 . nr doc-space-mode 0
2168 . nr doc-space-mode 1
2171 . ie \n[doc-space-mode] \{\
2172 . \" recompute space vector for remaining arguments
2173 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2174 . nr doc-arg-limit \n[doc-arg-ptr]
2175 . if \n[doc-num-args] \
2176 . doc-parse-space-vector
2178 . \" finish line only if it is interrupted and `doc-have-space'
2180 . if \n[doc-reg-Sm] \
2185 . \" reset remaining space vector elements
2186 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2187 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2188 . ds doc-space\n[doc-reg-Sm]
2190 . \" the body of a `while' request must end with the fitting `\}'!
2194 . \" do we have parameters to print?
2195 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2196 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2197 . ie (\n[doc-arg-ptr] > 1) \
2198 . doc-print-and-reset
2203 . \" skip `Sm' argument
2205 . doc-print-recursive
2210 .\" NS doc-arg-type immediate register
2211 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2212 .\" NS punctuation prefix=4)
2217 .\" NS doc-get-arg-type macro
2218 .\" NS get argument type
2220 .\" NS this macro expects the width of the argument in `doc-width'
2225 .de doc-get-arg-type
2228 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2229 . ie (\n[doc-width] == 1) \{\
2230 . if r doc-punct\$1 \
2231 . nr doc-arg-type \n[doc-punct\$1]
2241 .\" NS doc-get-arg-type* macro
2242 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2244 .\" NS this macro sets the `doc-width' register using the `length' request
2245 .\" NS to get the number of characters in a string literally
2251 .de doc-get-arg-type*
2253 . length doc-width "\*[doc-arg\$1]
2255 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2256 . ie (\n[doc-width] == 1) \{\
2257 . if r doc-punct\*[doc-arg\$1] \
2258 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2261 . if r \*[doc-arg\$1] \
2262 . if d \*[doc-arg\$1] \
2268 .\" NS doc-set-spacing-1 macro
2269 .\" NS set spacing for macros
2274 .\" NS local variables:
2275 .\" NS doc-reg-dssfm
2276 .\" NS doc-reg-dssfm1
2278 .de doc-set-spacing-1
2279 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2281 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2283 . ie (\n[doc-reg-dssfm1] == 3) \{\
2284 . if \n[doc-arg-limit] \{\
2285 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2286 . ds doc-space\n[doc-reg-dssfm]
2288 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2291 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2293 . ie (\n[doc-reg-dssfm1] == 2) \{\
2294 . if \n[doc-arg-limit] \{\
2295 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2296 . ds doc-space\n[doc-reg-dssfm]
2298 . ds doc-space\n[doc-arg-limit]
2301 . ds doc-space\n[doc-arg-limit]
2306 .\" NS doc-set-spacing-2 macro
2307 .\" NS set spacing for strings
2312 .de doc-set-spacing-2
2313 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2317 .\" NS doc-set-spacing-3 macro
2318 .\" NS set spacing for punctuation suffixes
2323 .\" NS local variables:
2324 .\" NS doc-reg-dssfps
2326 .de doc-set-spacing-3
2327 . if \n[doc-arg-limit] \{\
2328 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2329 . ds doc-space\n[doc-reg-dssfps]
2332 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2336 .\" NS doc-set-spacing-4 macro
2337 .\" NS set spacing for punctuation prefixes
2342 .de doc-set-spacing-4
2343 . ds doc-space\n[doc-arg-limit]
2347 .\" type switches (on current argument doc-arg-ptr)
2350 .\" NS doc-do-1 macro
2351 .\" NS call request if macro
2354 . \*[doc-arg\n[doc-arg-ptr]]
2358 .\" NS doc-do-2 macro
2359 .\" NS call .doc-print-recursive if string
2361 .als doc-do-2 doc-print-recursive
2364 .\" NS doc-do-3 macro
2365 .\" NS call .doc-print-recursive if punctuation suffix
2367 .als doc-do-3 doc-print-recursive
2370 .\" NS doc-do-4 macro
2371 .\" NS call .doc-print-recursive if punctuation prefix
2373 .als doc-do-4 doc-print-recursive
2376 .\" NS doc-fontmode-depth global register
2377 .\" NS font mode level
2379 .nr doc-fontmode-depth 0
2382 .\" NS doc-fontmode-font-stackXXX global register
2383 .\" NS stack of saved current font values from `Bf' macro
2386 .\" NS doc-fontmode-depth
2388 .nr doc-fontmode-font-stack0 0
2391 .\" NS doc-fontmode-size-stackXXX global register
2392 .\" NS stack of saved current size values from `Bf' macro
2395 .\" NS doc-fontmode-depth
2397 .nr doc-fontmode-size-stack0 0
2400 .\" NS Bf user macro
2401 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2404 .\" NS doc-fontmode-depth
2405 .\" NS doc-fontmode-font-stackXXX
2406 .\" NS doc-fontmode-size-stackXXX
2407 .\" NS doc-macro-name
2409 .\" NS width register `Bf' set in doc-common
2412 . ds doc-macro-name Bf
2415 . nr doc-fontmode-depth +1
2417 . \" save current font and size
2418 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2419 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2422 . nop \*[doc-Em-font]\c
2423 . el \{ .ie "\$1"Li" \
2424 . nop \*[doc-Li-font]\c
2425 . el \{ .ie "\$1"Sy" \
2426 . nop \*[doc-Sy-font]\c
2427 . el \{ .ie "\$1"-emphasis" \
2428 . nop \*[doc-Em-font]\c
2429 . el \{ .ie "\$1"-literal" \
2430 . nop \*[doc-Li-font]\c
2431 . el \{ .ie "\$1"-symbolic" \
2432 . nop \*[doc-Sy-font]\c
2434 . tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2438 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2442 .\" NS Ef user macro
2443 .\" NS end font mode
2446 .\" NS doc-macro-name
2448 .\" NS width register `Ef' set in doc-common
2451 . ds doc-macro-name Ef
2453 . ie \n[doc-fontmode-depth] \{\
2454 . \" restore saved font and size
2455 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2456 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2458 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2459 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2460 . nr doc-fontmode-depth -1
2463 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2467 .\" NS doc-keep-type global register
2468 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2473 .\" NS Bk user macro
2477 .\" NS doc-keep-type
2478 .\" NS doc-macro-name
2480 .\" NS width register `Bk' set in doc-common
2483 . ds doc-macro-name Bk
2485 . if \n[doc-keep-type] \
2486 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2488 . ie "\$1"-lines" \{\
2489 . nr doc-keep-type 2
2490 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2492 . el \{ .ie "\$1"-words" \{\
2493 . nr doc-keep-type 1
2494 . doc-set-hard-space
2496 . el \{ .ie "\$1"" \{\
2498 . nr doc-keep-type 1
2499 . doc-set-hard-space
2502 . tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2503 . nr doc-keep-type 3
2506 \#. nr doc-nesting-level +1
2510 .\" NS Ek user macro
2514 .\" NS doc-keep-type
2515 .\" NS doc-macro-name
2517 .\" NS width register `Ek' set in doc-common
2520 . ds doc-macro-name Ek
2522 \#. nr doc-nesting-level -1
2525 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2527 . if !\n[doc-keep-type] \
2528 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2530 . ie (\n[doc-keep-type] == 1) \
2531 . doc-set-soft-space
2532 . el \{ .if (\n[doc-keep-type] == 2) \
2533 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2536 . nr doc-keep-type 0
2538 \#. if !"\*[doc-out-string]"" \
2539 \#. doc-print-out-string
2543 .\" NS doc-display-depth global register
2544 .\" NS display level
2546 .nr doc-display-depth 0
2549 .\" NS doc-is-compact global register (bool)
2550 .\" NS set if the `compact' keyword is given
2552 .nr doc-is-compact 0
2555 .\" NS doc-display-type-stackXXX global string
2556 .\" NS the display type stack
2559 .\" NS doc-display-depth
2561 .ds doc-display-type-stack0
2564 .\" NS doc-display-indent-stackXXX global register
2565 .\" NS stack of display indentation values
2568 .\" NS doc-display-depth
2570 .nr doc-display-indent-stack0 0
2573 .\" NS doc-display-ad-stackXXX global register
2574 .\" NS stack of saved adjustment modes
2577 .\" NS doc-display-depth
2579 .nr doc-display-ad-stack0 0
2582 .\" NS doc-display-fi-stackXXX global register
2583 .\" NS stack of saved fill modes
2586 .\" NS doc-display-depth
2588 .nr doc-display-fi-stack0 0
2591 .\" NS doc-display-ft-stackXXX global register
2592 .\" NS stack of saved fonts
2595 .\" NS doc-display-depth
2597 .nr doc-display-ft-stack0 0
2600 .\" NS doc-display-ps-stackXXX global register
2601 .\" NS stack of saved font sizes
2604 .\" NS doc-display-depth
2606 .nr doc-display-ps-stack0 0
2609 .\" NS Bd user macro
2610 .\" NS begin display
2612 .\" NS width register `Bd' set in doc-common
2615 .\" NS doc-curr-font
2616 .\" NS doc-curr-size
2617 .\" NS doc-display-depth
2618 .\" NS doc-display-ad-stackXXX
2619 .\" NS doc-display-fi-stackXXX
2620 .\" NS doc-display-ft-stackXXX
2621 .\" NS doc-display-ps-stackXXX
2622 .\" NS doc-display-file
2623 .\" NS doc-display-indent-stackXXX
2624 .\" NS doc-display-type-stackXXX
2625 .\" NS doc-is-compact
2626 .\" NS doc-macro-name
2628 .\" NS local variables:
2632 . ds doc-macro-name Bd
2635 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2636 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2640 . nr doc-is-compact 0
2641 . ds doc-display-file
2643 . nr doc-display-depth +1
2645 . \" save current adjustment and fill modes
2646 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2647 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2649 . ie "\$1"-literal" \{\
2650 . ds doc-display-type-stack\n[doc-display-depth] literal
2651 . nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2652 . nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2655 . nop \*[doc-Li-font]\c
2662 . el \{ .ie "\$1"-filled" \{\
2663 . ds doc-display-type-stack\n[doc-display-depth] filled
2667 . el \{ .ie "\$1"-ragged" \{\
2668 . ds doc-display-type-stack\n[doc-display-depth] ragged
2672 . el \{ .ie "\$1"-centered" \{\
2673 . ds doc-display-type-stack\n[doc-display-depth] centered
2677 . el \{ .ie "\$1"-unfilled" \{\
2678 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2682 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2683 . tm1 " in .Bd macro (#\n[.c])
2687 . \" have we seen an argument?
2688 . if \n[doc-reg-Bd] \{\
2690 . \" check other arguments
2692 . doc-do-Bd-args \$@
2695 . \" avoid warning about non-existent register
2696 . if !r doc-display-indent-stack\n[doc-display-depth] \
2697 . nr doc-display-indent-stack\n[doc-display-depth] 0
2699 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2700 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2702 . if !\n[doc-is-compact] \{\
2703 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2704 . sp \n[doc-display-vertical]u
2706 ' sp \n[doc-display-vertical]u
2712 . if !"\*[doc-display-file]"" \
2713 . so \*[doc-display-file]
2715 . nr doc-is-compact 0
2716 . ds doc-display-file
2720 .\" NS doc-do-Bd-args macro
2721 .\" NS resolve remaining .Bd arguments
2724 .\" NS doc-display-file
2725 .\" NS doc-display-indent-stackXXX
2726 .\" NS doc-is-compact
2728 .\" NS local variables:
2730 .\" NS doc-reg-ddBa1
2731 .\" NS doc-reg-ddBa2
2732 .\" NS doc-reg-ddBa3
2733 .\" NS doc-reg-ddBa4
2739 . ie "\$1"-offset" \{\
2743 . nr doc-display-indent-stack\n[doc-display-depth] 0
2744 . el \{ .ie "\$2"right" \
2745 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2746 . el \{ .ie "\$2"center" \
2747 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2748 . el \{ .ie "\$2"indent" \
2749 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2750 . el \{ .ie "\$2"indent-two" \
2751 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2756 . \" not a known keyword
2757 . if (\n[doc-reg-ddBa] == 1) \{\
2760 . nr doc-reg-ddBa1 0
2761 . if \B
\a(\$2)
\a \{\
2762 . \" disable warnings related to scaling indicators (32)
2763 . nr doc-reg-ddBa2 \n[.warn]
2764 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2766 . \" values without a scaling indicator are taken as strings;
2767 . \" we test whether the parameter string with and without the last
2768 . \" character yields identical numerical results (ignoring the
2769 . \" scaling indicator)
2770 . ds doc-str-ddBa "\$2
2771 . substring doc-str-ddBa 0 -2
2772 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2773 . nr doc-reg-ddBa3 (;(\$2))
2774 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2775 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2776 . nr doc-reg-ddBa1 1
2779 . \" enable all warnings again
2780 . warn \n[doc-reg-ddBa2]
2783 . ie \n[doc-reg-ddBa1] \
2784 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2786 . doc-get-width "\$2"
2787 . ie (\n[doc-width] <= 3) \{\
2788 . \" if the offset parameter is a macro, use the macro's
2789 . \" width as specified in doc-common
2790 . doc-get-arg-type "\$2"
2791 . ie (\n[doc-arg-type] == 1) \
2792 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2794 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2797 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2800 . el \{ .ie "\$1"-compact" \
2801 . nr doc-is-compact 1
2802 . el \{ .ie "\$1"-file" \{\
2804 . ds doc-display-file "\$2
2808 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2811 . tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2814 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2815 . shift \n[doc-reg-ddBa]
2816 . doc-do-Bd-args \$@
2821 .\" NS Ed user macro
2825 .\" NS doc-display-depth
2826 .\" NS doc-display-indent-stackXXX
2827 .\" NS doc-display-type-stackXXX
2828 .\" NS doc-macro-name
2830 .\" NS width register `Ed' set in doc-common
2833 . ds doc-macro-name Ed
2837 . if !\n[doc-display-depth] \{\
2838 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2839 . nr doc-display-depth 1
2842 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2843 . ft \n[doc-display-ft-stack\n[doc-display-depth]]
2844 . ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2847 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2849 . \" restore saved adjustment and fill modes
2850 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2854 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2856 . nr doc-display-indent-stack\n[doc-display-depth] 0
2857 . ds doc-display-type-stack\n[doc-display-depth]
2858 . nr doc-display-depth -1
2862 .\" NS doc-list-type-stackXXX global string
2863 .\" NS stack of list types
2866 .\" NS doc-list-depth
2868 .ds doc-list-type-stack1
2871 .\" NS doc-list-indent-stackXXX global register
2872 .\" NS stack of list indentation values
2875 .\" NS doc-list-depth
2877 .nr doc-list-indent-stack1 0
2880 .\" NS doc-list-have-indent-stackXXX global register (bool)
2881 .\" NS an indentation value is active
2884 .\" NS doc-list-depth
2886 .nr doc-list-have-indent-stack1 0
2889 .\" NS Bl user macro
2892 .\" NS width register `Bl' set in doc-common
2897 .\" NS doc-list-depth
2898 .\" NS doc-list-have-indent-stackXXX
2899 .\" NS doc-list-indent-stackXXX
2900 .\" NS doc-list-type-stackXXX
2901 .\" NS doc-macro-name
2903 .\" NS doc-num-columns
2905 .\" NS local variables:
2914 . ds doc-macro-name Bl
2915 . nr doc-list-depth +1
2918 . ie "\$1"-hang" \{\
2919 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2920 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2921 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2923 . el \{ .ie "\$1"-tag" \{\
2924 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2925 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2927 . el \{ .ie "\$1"-item" \{\
2928 . ds doc-list-type-stack\n[doc-list-depth] item-list
2929 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2931 . el \{ .ie "\$1"-enum" \{\
2932 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2933 . nr doc-list-indent-stack\n[doc-list-depth] 3n
2934 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2936 . el \{ .ie "\$1"-bullet" \{\
2937 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
2938 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2939 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2941 . el \{ .ie "\$1"-dash" \{\
2942 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2943 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2944 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2946 . el \{ .ie "\$1"-hyphen" \{\
2947 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2948 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2949 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2951 . el \{ .ie "\$1"-inset" \{\
2952 . ds doc-list-type-stack\n[doc-list-depth] inset-list
2953 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2955 . el \{ .ie "\$1"-diag" \{\
2956 . ds doc-list-type-stack\n[doc-list-depth] diag-list
2958 . el \{ .ie "\$1"-ohang" \{\
2959 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
2960 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2962 . el \{ .ie "\$1"-column" \{\
2963 . ds doc-list-type-stack\n[doc-list-depth] column-list
2967 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
2968 . tm1 " in .Bl macro
2971 . \}\}\}\}\}\}\}\}\}\}\}
2973 . \" we have seen a list type
2974 . if !\n[doc-arg-ptr] \{\
2977 . nr doc-list-depth -1
2983 . \" fill argument vector
2985 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
2986 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
2987 . \" dummy type and space so that doc-save-global-vars() doesn't warn
2988 . nr doc-type\n[doc-reg-Bl] 0
2989 . ds doc-space\n[doc-reg-Bl]
2993 . doc-increment-list-stack
2996 . nr doc-arg-limit \n[.$]
3000 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3002 . \" initialize column list
3003 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3004 . doc-set-column-tab \n[doc-num-columns]
3005 ' in -\n[doc-column-indent-width]u
3006 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3007 . sp \n[doc-display-vertical]u
3010 . nr doc-num-columns 0
3017 .\" NS doc-Bl-usage macro
3020 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3021 . tm1 " [-width <string>]
3022 . tm1 " [-offset <string>] [-compact]
3023 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3024 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3025 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3029 .\" NS doc-do-Bl-args macro
3030 .\" NS resolve remaining .Bl arguments
3035 .\" NS doc-compact-list-stackXXX
3036 .\" NS doc-list-indent-stackXXX
3037 .\" NS doc-list-offset-stackXXX
3038 .\" NS doc-num-columns
3039 .\" NS doc-tag-prefix-stackXXX
3040 .\" NS doc-tag-width-stackXXX
3042 .\" NS local variables:
3046 .\" NS doc-reg-dBla1
3047 .\" NS doc-reg-dBla2
3048 .\" NS doc-reg-dBla3
3049 .\" NS doc-reg-dBla4
3051 .\" NS doc-str-dBla1
3056 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3059 . \" avoid a warning message in case e.g. `-offset' has no parameter
3060 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3061 . if !d doc-arg\n[doc-reg-dBla] \
3062 . ds doc-arg\n[doc-reg-dBla]
3066 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3067 . nr doc-compact-list-stack\n[doc-list-depth] 1
3069 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3070 . ie (\n[doc-list-depth] > 1) \{\
3071 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3072 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3073 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3074 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3075 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3078 . tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3081 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3083 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3085 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3086 . substring doc-str-dBla 0 0
3087 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3088 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3089 . substring doc-str-dBla 1
3090 . doc-first-parameter \*[doc-str-dBla]
3091 . doc-get-width "\*[doc-str-dfp]
3092 . doc-get-arg-type "\*[doc-str-dfp]
3093 . ie (\n[doc-arg-type] == 1) \
3094 . nr doc-reg-dBla1 1
3096 . nr doc-reg-dBla1 0
3099 . nr doc-reg-dBla1 0
3100 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3102 . ie \n[doc-reg-dBla1] \{\
3103 . \" execute string in a box to get the width of the diversion
3104 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3105 . doc-save-global-vars
3112 . nop \*[doc-str-dBla]
3116 . doc-restore-global-vars
3117 . doc-get-width \h'\n[dl]u'
3118 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3121 . \" test whether argument is a valid numeric expression
3122 . nr doc-reg-dBla1 0
3123 . if \B
\a(\*[doc-str-dBla])
\a \{\
3124 . \" disable warnings related to scaling indicators (32)
3125 . nr doc-reg-dBla2 \n[.warn]
3126 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3128 . \" values without a scaling indicator are taken as strings;
3129 . \" we test whether the parameter string with and without the last
3130 . \" character yields identical numerical results (ignoring the
3131 . \" scaling indicator)
3132 . ds doc-str-dBla1 "\*[doc-str-dBla]
3133 . substring doc-str-dBla1 0 -2
3134 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3135 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3136 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3137 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3138 . nr doc-reg-dBla1 1
3141 . \" enable all warnings again
3142 . warn \n[doc-reg-dBla2]
3145 . ie \n[doc-reg-dBla1] \
3146 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3148 . doc-get-arg-width \n[doc-arg-ptr]
3149 . ie (\n[doc-width] == 2) \{\
3150 . \" if the width parameter is a macro, use the macro's
3151 . \" width as specified in doc-common
3152 . doc-get-arg-type \*[doc-str-dBla]
3153 . ie (\n[doc-arg-type] == 1) \
3154 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3156 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3159 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3162 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3165 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3166 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3168 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3169 . nr doc-reg-dBla1 0
3170 . if \B
\a(\*[doc-str-dBla])
\a \{\
3171 . nr doc-reg-dBla2 \n[.warn]
3172 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3174 . ds doc-str-dBla1 "\*[doc-str-dBla]
3175 . substring doc-str-dBla1 0 -2
3176 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3177 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3178 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3179 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3180 . nr doc-reg-dBla1 1
3183 . warn \n[doc-reg-dBla2]
3186 . ie \n[doc-reg-dBla1] \
3187 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3189 . doc-get-arg-width \n[doc-arg-ptr]
3190 . ie (\n[doc-width] <= 3) \{\
3191 . \" if the offset parameter is a macro, use the macro's
3192 . \" width as specified in doc-common
3193 . doc-get-arg-type \*[doc-str-dBla]
3194 . ie (\n[doc-arg-type] == 1) \
3195 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3197 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3200 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3206 . \" not a known keyword, so it specifies the width of the next column
3207 . \" (if it is a column list)
3208 . if !\n[doc-reg-dBla] \{\
3209 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3210 . nr doc-num-columns +1
3211 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3212 . substring doc-str-dBla 0 0
3213 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3214 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3215 . substring doc-str-dBla 1
3216 . doc-first-parameter \*[doc-str-dBla]
3217 . doc-get-width "\*[doc-str-dfp]
3218 . doc-get-arg-type "\*[doc-str-dfp]
3219 . ie (\n[doc-arg-type] == 1) \
3220 . nr doc-reg-dBla1 1
3222 . nr doc-reg-dBla1 0
3225 . nr doc-reg-dBla1 0
3226 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3228 . ie \n[doc-reg-dBla1] \{\
3229 . \" execute string in a box to get the width of the diversion
3230 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3231 . doc-save-global-vars
3238 . nop \*[doc-str-dBla]
3242 . doc-restore-global-vars
3243 . ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3246 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3249 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3250 . tm1 " in .Bl macro (#\n[.c])
3253 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3258 .\" NS doc-save-global-vars macro
3259 .\" NS save all global variables
3261 .\" NS local variables:
3264 .de doc-save-global-vars
3265 . ds doc-macro-name-saved "\*[doc-macro-name]
3266 . nr doc-arg-limit-saved \n[doc-arg-limit]
3267 . nr doc-num-args-saved \n[doc-num-args]
3268 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3271 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3272 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3273 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3274 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3275 . nr doc-reg-dsgv +1
3278 . nr doc-curr-font-saved \n[doc-curr-font]
3279 . nr doc-curr-size-saved \n[doc-curr-size]
3280 . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3281 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3282 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3283 . nr doc-have-decl-saved \n[doc-have-decl]
3284 . nr doc-have-var-saved \n[doc-have-var]
3285 . ds doc-command-name-saved "\*[doc-command-name]
3286 . ds doc-quote-left-saved "\*[doc-quote-left]
3287 . ds doc-quote-right-saved "\*[doc-quote-right]
3288 . nr doc-nesting-level-saved \n[doc-nesting-level]
3289 . nr doc-in-list-saved \n[doc-in-list]
3290 . ds doc-space-saved "\*[doc-space]
3291 . ds doc-saved-space-saved "\*[doc-saved-space]
3292 . nr doc-space-mode-saved \n[doc-space-mode]
3293 . nr doc-have-space-saved \n[doc-have-space]
3294 . nr doc-have-slot-saved \n[doc-have-slot]
3295 . nr doc-keep-type-saved \n[doc-keep-type]
3296 . nr doc-display-depth-saved \n[doc-display-depth]
3297 . nr doc-is-compact-saved \n[doc-is-compact]
3300 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3301 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3302 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3303 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3304 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3305 . nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3306 . nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3307 . nr doc-reg-dsgv +1
3310 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3313 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3314 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3315 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3316 . nr doc-reg-dsgv +1
3319 . nr doc-list-depth-saved \n[doc-list-depth]
3322 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3323 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3324 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3325 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3326 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3327 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3328 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3329 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3330 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3331 . nr doc-reg-dsgv +1
3334 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3335 . nr doc-curr-type-saved \n[doc-curr-type]
3336 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3337 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3338 . nr doc-num-columns-saved \n[doc-num-columns]
3339 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3340 . nr doc-is-func-saved \n[doc-is-func]
3341 . nr doc-have-old-func-saved \n[doc-have-old-func]
3342 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3343 . ds doc-func-arg-saved "\*[doc-func-arg]
3344 . nr doc-num-func-args-saved \n[doc-num-func-args]
3345 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3346 . nr doc-have-func-saved \n[doc-have-func]
3347 . nr doc-is-reference-saved \n[doc-is-reference]
3348 . nr doc-reference-count-saved \n[doc-reference-count]
3349 . nr doc-author-count-saved \n[doc-author-count]
3352 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3353 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3354 . nr doc-reg-dsgv +1
3357 . nr doc-book-count-saved \n[doc-book-count]
3358 . ds doc-book-name-saved "\*[doc-book-name]
3359 . nr doc-date-count-saved \n[doc-date-count]
3360 . ds doc-date-saved "\*[doc-date]
3361 . nr doc-publisher-count-saved \n[doc-publisher-count]
3362 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3363 . nr doc-journal-count-saved \n[doc-journal-count]
3364 . ds doc-journal-name-saved "\*[doc-journal-name]
3365 . nr doc-issue-count-saved \n[doc-issue-count]
3366 . ds doc-issue-name-saved "\*[doc-issue-name]
3367 . nr doc-optional-count-saved \n[doc-optional-count]
3368 . ds doc-optional-string-saved "\*[doc-optional-string]
3369 . nr doc-page-number-count-saved \n[doc-page-number-count]
3370 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3371 . nr doc-corporate-count-saved \n[doc-corporate-count]
3372 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3373 . nr doc-report-count-saved \n[doc-report-count]
3374 . ds doc-report-name-saved "\*[doc-report-name]
3375 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3376 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3377 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3378 . nr doc-volume-count-saved \n[doc-volume-count]
3379 . ds doc-volume-name-saved "\*[doc-volume-name]
3380 . nr doc-have-author-saved \n[doc-have-author]
3382 . ds doc-document-title-saved "\*[doc-document-title]
3383 . ds doc-volume-saved "\*[doc-volume]
3384 . ds doc-section-saved "\*[doc-section]
3385 . ds doc-operating-system-saved "\*[doc-operating-system]
3386 . ds doc-date-string-saved "\*[doc-date-string]
3387 . nr doc-header-space-saved \n[doc-header-space]
3388 . nr doc-footer-space-saved \n[doc-footer-space]
3389 . nr doc-display-vertical-saved \n[doc-display-vertical]
3390 . ds doc-header-string-saved "\*[doc-header-string]
3391 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3392 . nr doc-in-files-section-saved \n[doc-in-files-section]
3393 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3397 .\" NS doc-restore-global-vars macro
3398 .\" NS restore all global variables
3400 .\" NS local variables:
3403 .de doc-restore-global-vars
3404 . ds doc-macro-name "\*[doc-macro-name-saved]
3405 . nr doc-arg-limit \n[doc-arg-limit-saved]
3406 . nr doc-num-args \n[doc-num-args-saved]
3407 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3410 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3411 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3412 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3413 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3414 . nr doc-reg-drgv +1
3417 . nr doc-curr-font \n[doc-curr-font-saved]
3418 . nr doc-curr-size \n[doc-curr-size-saved]
3419 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3420 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3421 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3422 . nr doc-have-decl \n[doc-have-decl-saved]
3423 . nr doc-have-var \n[doc-have-var-saved]
3424 . ds doc-command-name "\*[doc-command-name-saved]
3425 . ds doc-quote-left "\*[doc-quote-left-saved]
3426 . ds doc-quote-right "\*[doc-quote-right-saved]
3427 . nr doc-nesting-level \n[doc-nesting-level-saved]
3428 . nr doc-in-list \n[doc-in-list-saved]
3429 . ds doc-space "\*[doc-space-saved]
3430 . ds doc-saved-space "\*[doc-saved-space-saved]
3431 . nr doc-space-mode \n[doc-space-mode-saved]
3432 . nr doc-have-space \n[doc-have-space-saved]
3433 . nr doc-have-slot \n[doc-have-slot-saved]
3434 . nr doc-keep-type \n[doc-keep-type-saved]
3435 . nr doc-display-depth \n[doc-display-depth-saved]
3436 . nr doc-is-compact \n[doc-is-compact-saved]
3439 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3440 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3441 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3442 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3443 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3444 . nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3445 . nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3446 . nr doc-reg-drgv +1
3449 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3452 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3453 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3454 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3455 . nr doc-reg-drgv +1
3458 . nr doc-list-depth \n[doc-list-depth-saved]
3461 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3462 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3463 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3464 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3465 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3466 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3467 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3468 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3469 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3470 . nr doc-reg-drgv +1
3473 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3474 . nr doc-curr-type \n[doc-curr-type-saved]
3475 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3476 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3477 . nr doc-num-columns \n[doc-num-columns-saved]
3478 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3479 . nr doc-is-func \n[doc-is-func-saved]
3480 . nr doc-have-old-func \n[doc-have-old-func-saved]
3481 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3482 . ds doc-func-arg "\*[doc-func-arg-saved]
3483 . nr doc-num-func-args \n[doc-num-func-args-saved]
3484 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3485 . nr doc-have-func \n[doc-have-func-saved]
3486 . nr doc-is-reference \n[doc-is-reference-saved]
3487 . nr doc-reference-count \n[doc-reference-count-saved]
3488 . nr doc-author-count \n[doc-author-count-saved]
3491 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3492 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3493 . nr doc-reg-drgv +1
3496 . nr doc-book-count \n[doc-book-count-saved]
3497 . ds doc-book-name "\*[doc-book-name-saved]
3498 . nr doc-date-count \n[doc-date-count-saved]
3499 . ds doc-date "\*[doc-date-saved]
3500 . nr doc-publisher-count \n[doc-publisher-count-saved]
3501 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3502 . nr doc-journal-count \n[doc-journal-count-saved]
3503 . ds doc-journal-name "\*[doc-journal-name-saved]
3504 . nr doc-issue-count \n[doc-issue-count-saved]
3505 . ds doc-issue-name "\*[doc-issue-name-saved]
3506 . nr doc-optional-count \n[doc-optional-count-saved]
3507 . ds doc-optional-string "\*[doc-optional-string-saved]
3508 . nr doc-page-number-count \n[doc-page-number-count-saved]
3509 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3510 . nr doc-corporate-count \n[doc-corporate-count-saved]
3511 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3512 . nr doc-report-count \n[doc-report-count-saved]
3513 . ds doc-report-name "\*[doc-report-name-saved]
3514 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3515 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3516 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3517 . nr doc-volume-count \n[doc-volume-count-saved]
3518 . ds doc-volume-name "\*[doc-volume-name-saved]
3519 . nr doc-have-author \n[doc-have-author-saved]
3521 . ds doc-document-title "\*[doc-document-title-saved]
3522 . ds doc-volume "\*[doc-volume-saved]
3523 . ds doc-section "\*[doc-section-saved]
3524 . ds doc-operating-system "\*[doc-operating-system-saved]
3525 . ds doc-date-string "\*[doc-date-string-saved]
3526 . nr doc-header-space \n[doc-header-space-saved]
3527 . nr doc-footer-space \n[doc-footer-space-saved]
3528 . nr doc-display-vertical \n[doc-display-vertical-saved]
3529 . ds doc-header-string "\*[doc-header-string-saved]
3530 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3531 . nr doc-in-files-section \n[doc-in-files-section-saved]
3532 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3536 .\" NS El user macro
3540 .\" NS doc-list-depth
3541 .\" NS doc-macro-name
3543 .\" NS local variables:
3546 .\" NS width register `El' set in doc-common
3550 . tm Usage: .El (does not take arguments) (#\n[.c])
3554 . ds doc-macro-name El
3555 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3557 . ie "\*[doc-str-El]"diag-list" \
3559 . el \{ .ie "\*[doc-str-El]"column-list" \
3560 . doc-end-column-list
3561 . el \{ .ie "\*[doc-str-El]"item-list" \
3563 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3565 . el \{ .ie "\*[doc-str-El]"inset-list" \
3575 .\" NS doc-saved-Pa-font global string
3576 .\" NS saved doc-Pa-font string for section FILES (no underline if
3579 .ds doc-saved-Pa-font
3582 .\" NS doc-curr-type global register
3583 .\" NS current argument type
3588 .\" NS doc-curr-arg global string
3589 .\" NS current argument
3594 .\" NS doc-item-boxXXX global box
3595 .\" NS item boxes associated list depth
3598 .\" NS doc-list-depth
3601 .\" NS It user macro
3608 .\" NS doc-curr-type
3610 .\" NS doc-macro-name
3612 .\" NS doc-saved-Pa-font
3614 .\" NS local variables:
3617 .\" NS doc-XXX-list-type
3619 .\" NS width register `It' set in doc-common
3621 .nr doc-bullet-list-type 1
3622 .nr doc-column-list-type 0
3623 .nr doc-dash-list-type 1
3624 .nr doc-diag-list-type 0
3625 .nr doc-enum-list-type 1
3626 .nr doc-hang-list-type 2
3627 .nr doc-inset-list-type 2
3628 .nr doc-item-list-type 1
3629 .nr doc-ohang-list-type 2
3630 .nr doc-tag-list-type 2
3633 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3635 . if "\*[doc-str-It]"" \
3636 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3638 . if \n[doc-nesting-level] \{\
3639 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3648 . ds doc-macro-name It
3650 . \" fill argument vector
3652 . while (\n[doc-reg-It] <= \n[.$]) \{\
3653 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3657 . nr doc-num-args \n[.$]
3661 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3663 . if \n[doc-reg-It] \{\
3665 . box doc-item-box\n[doc-list-depth]
3666 . ev doc-item-env\n[doc-list-depth]
3672 . ie (\n[doc-reg-It] == 1) \{\
3674 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3675 . tm1 " don't take arguments (#\n[.c])
3679 . if (\n[doc-reg-It] == 2) \{\
3680 . \" handle list types with arguments
3681 . doc-parse-arg-vector
3685 . nr doc-curr-type \n[doc-type1]
3686 . ds doc-curr-arg "\*[doc-arg1]
3688 . if \n[doc-in-files-section] \{\
3689 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3691 . ds doc-Pa-font "\*[doc-No-font]
3694 . ie (\n[doc-type1] == 1) \
3698 . doc-print-recursive
3701 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3702 . tm1 " require arguments (#\n[.c])
3706 . \" the previous call of `.doc-print-recursive' can contain calls to
3707 . \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3708 . if !\n[doc-nesting-level] \
3709 . doc-\*[doc-str-It]
3713 .\" NS doc-inset-list macro
3714 .\" NS .It item of list-type inset
3720 . \" finish item box
3724 . unformat doc-item-box\n[doc-list-depth]
3726 . doc-set-vertical-and-indent 0
3730 . doc-item-box\n[doc-list-depth]
3732 . if \n[doc-in-files-section] \
3734 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3741 .\" NS doc-hang-list macro
3742 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3745 .\" NS doc-have-space
3748 .\" NS local variables:
3753 . \" finish item box
3757 . unformat doc-item-box\n[doc-list-depth]
3759 . doc-set-vertical-and-indent 1
3760 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3761 . ti -\n[doc-reg-dhl]u
3764 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3765 . doc-item-box\n[doc-list-depth]
3767 . chop doc-item-box\n[doc-list-depth]
3768 . nr doc-reg-dhl1 \n[.k]u
3769 . nop \*[doc-item-box\n[doc-list-depth]]\c
3770 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3771 . nr doc-have-space 1
3774 . if \n[doc-in-files-section] \
3776 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3783 .\" NS doc-ohang-list macro
3784 .\" NS .It item of list-type overhanging tag
3790 . \" finish item box
3794 . unformat doc-item-box\n[doc-list-depth]
3796 . doc-set-vertical-and-indent 0
3798 . doc-item-box\n[doc-list-depth]
3801 . if \n[doc-in-files-section] \
3803 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3810 .\" NS doc-item-list macro
3811 .\" NS .It item of list-type [empty tag]
3814 . \" finish (dummy) item box
3819 . doc-set-vertical-and-indent 0
3826 .\" NS doc-enum-list-count-stackXXX global register
3827 .\" NS stack of current enum count values
3830 .\" NS doc-list-depth
3832 .nr doc-enum-list-count-stack1 0
3835 .\" NS doc-enum-list macro
3836 .\" NS enumerated list
3839 .\" NS doc-enum-list-count-stackXXX
3844 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3846 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3848 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3849 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3854 .\" NS doc-bullet-list macro
3855 .\" NS bullet paragraph list
3862 . nop \)\*[doc-Sy-font]\[bu]\f[]
3867 .\" NS doc-dash-list macro
3868 .\" NS hyphen paragraph list (sub bullet list)
3875 . nop \)\*[doc-Sy-font]\-\f[]
3880 .\" NS doc-do-list macro
3881 .\" NS .It item of list-type enum/bullet/hyphen
3883 .als doc-do-list doc-hang-list
3886 .\" NS doc-diag-list-input-line-count global register
3887 .\" NS saved line number to be checked in next diag-list item
3889 .nr doc-diag-list-input-line-count 0
3892 .\" NS doc-diag-list macro
3893 .\" NS .It item of list-type diagnostic-message
3896 .\" NS doc-curr-font
3897 .\" NS doc-curr-size
3898 .\" NS doc-diag-list-input-line-count
3901 . nr doc-curr-font \n[.f]
3902 . nr doc-curr-size \n[.ps]
3904 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3905 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3912 . nr doc-diag-list-input-line-count \n[.c]
3915 . nop \*[doc-Sy-font]\c
3916 . if \n[doc-num-args] \
3917 . doc-remaining-args
3918 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3920 . doc-print-and-reset
3924 .\" NS doc-tag-list macro
3925 .\" NS .It item of list-type `tag'
3928 .\" NS doc-have-space
3931 .\" NS local variables:
3937 . \" finish item box
3941 . unformat doc-item-box\n[doc-list-depth]
3943 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
3950 . doc-item-box\n[doc-list-depth]
3955 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3956 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3957 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3958 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3962 . doc-set-vertical-and-indent 1
3963 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3964 . ti -\n[doc-reg-dtl]u
3967 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3968 . doc-item-box\n[doc-list-depth]
3972 . chop doc-item-box\n[doc-list-depth]
3973 . \" Using \Z prevents stretching of the spaces in the tag
3974 . nop \Z'\*[doc-item-box\n[doc-list-depth]]'\c
3975 . nop \h'\n[doc-reg-dtl]u'\c
3976 . nr doc-have-space 1
3979 . if \n[doc-in-files-section] \
3981 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3988 .\" NS doc-get-tag-width macro
3989 .\" NS resolve unknown tag width (`tag' list-type only)
3992 .\" NS doc-list-indent-stackXXX
3993 .\" NS doc-tag-width-stackXXX
3997 .\" NS doc-curr-type
3999 .de doc-get-tag-width
4000 . ie (\n[doc-curr-type] == 1) \{\
4001 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4002 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4005 . ds doc-tag-width-stack\n[doc-list-depth] No
4006 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4011 .\" NS doc-set-vertical-and-indent macro
4012 .\" NS set up vertical spacing (if not compact) and indentation (with
4013 .\" NS offset if argument is non-zero)
4016 .\" NS doc-list-have-indent-stackXXX
4018 .de doc-set-vertical-and-indent
4019 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4020 . sp \n[doc-display-vertical]u
4022 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4023 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4025 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4033 .\" NS doc-list-depth global register
4034 .\" NS list type stack counter
4036 .nr doc-list-depth 0
4039 .\" NS doc-num-columns global register
4040 .\" NS number of columns
4042 .nr doc-num-columns 0
4045 .\" NS doc-compact-list-stackXXX global register (bool)
4046 .\" NS stack of flags to indicate whether a particular list is compact
4049 .\" NS doc-list-depth
4051 .nr doc-compact-list-stack1 0
4054 .\" NS doc-tag-prefix-stackXXX global string
4055 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4058 .\" NS doc-list-depth
4060 .ds doc-tag-prefix-stack1
4063 .\" NS doc-tag-width-stackXXX global string
4064 .\" NS stack of strings indicating how to set up current element of
4065 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4066 .\" NS directly; if it is a macro name, use the macro's width value;
4067 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4070 .\" NS doc-list-depth
4072 .ds doc-tag-width-stack0
4073 .ds doc-tag-width-stack1
4076 .\" NS doc-list-offset-stackXXX global register
4077 .\" NS stack of list offsets
4080 .\" NS doc-list-depth
4082 .nr doc-list-offset-stack1 0
4085 .\" NS doc-end-list macro
4086 .\" NS list end function; resets indentation (and offset if argument is
4090 .\" NS doc-list-depth
4091 .\" NS doc-list-offset-stackXXX
4095 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4097 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4099 . if (\n[doc-list-depth] <= 0) \
4100 . tm mdoc warning: extraneous .El call (#\n[.c])
4102 . doc-decrement-list-stack
4103 . nr doc-list-depth -1
4107 .\" NS doc-increment-list-stack macro
4108 .\" NS set up next block for list
4111 .\" NS doc-compact-list-stackXXX
4112 .\" NS doc-list-have-indent-stackXXX
4113 .\" NS doc-list-indent-stackXXX
4114 .\" NS doc-list-offset-stackXXX
4115 .\" NS doc-list-type-stackXXX
4116 .\" NS doc-tag-prefix-stackXXX
4117 .\" NS doc-tag-width-stackXXX
4118 .\" NS doc-enum-list-count-stackXXX
4120 .\" NS local variables:
4123 .de doc-increment-list-stack
4124 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4125 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4126 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4127 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4128 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4129 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4130 . ds doc-list-type-stack\n[doc-reg-dils]
4131 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4132 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4136 .\" NS doc-decrement-list-stack macro
4137 .\" NS decrement stack
4140 .\" NS doc-compact-list-stackXXX
4141 .\" NS doc-list-have-indent-stackXXX
4142 .\" NS doc-list-indent-stackXXX
4143 .\" NS doc-list-offset-stackXXX
4144 .\" NS doc-list-type-stackXXX
4145 .\" NS doc-tag-prefix-stackXXX
4146 .\" NS doc-tag-width-stackXXX
4147 .\" NS doc-enum-list-count-stackXXX
4149 .de doc-decrement-list-stack
4150 . ds doc-list-type-stack\n[doc-list-depth]
4151 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4152 . nr doc-list-indent-stack\n[doc-list-depth] 0
4153 . nr doc-list-offset-stack\n[doc-list-depth] 0
4154 . ds doc-tag-prefix-stack\n[doc-list-depth]
4155 . ds doc-tag-width-stack\n[doc-list-depth]
4156 . nr doc-compact-list-stack\n[doc-list-depth] 0
4157 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4161 .\" NS Xr user macro
4162 .\" NS cross reference (for man pages only)
4166 .\" NS doc-macro-name
4168 .\" NS local variables:
4171 .\" NS width register `Xr' set in doc-common
4174 . if !\n[doc-arg-limit] \{\
4176 . ds doc-macro-name Xr
4177 . doc-parse-args \$@
4183 . if !\n[doc-arg-limit] \
4187 . doc-print-prefixes
4188 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4189 . \" first argument must be a string
4190 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4191 . nr doc-curr-font \n[.f]
4192 . nr doc-curr-size \n[.ps]
4193 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4195 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4196 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4197 . \" modify second argument if it is a string and
4198 . \" remove space inbetween
4199 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4200 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4201 . ds doc-space\n[doc-arg-ptr]
4204 . doc-print-recursive
4214 .\" NS doc-Xr-usage macro
4217 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4222 .\" NS Sx user macro
4223 .\" NS cross section reference
4225 .\" NS width register `Sx' set in doc-common
4227 .als Sx doc-generic-macro
4228 .ds doc-Sx-usage section_header
4231 .\" NS doc-end-column-list macro
4232 .\" NS column-list end-list
4235 .\" NS doc-list-depth
4237 .de doc-end-column-list
4239 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4242 . doc-decrement-list-stack
4243 . nr doc-list-depth -1
4247 .\" NS doc-column-indent-width global register
4248 .\" NS holds the indent width for a column list
4250 .nr doc-column-indent-width 0
4253 .\" NS doc-set-column-tab macro
4254 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4257 .\" NS doc-column-indent-width
4259 .\" NS local variables:
4262 .\" NS doc-str-dsct1
4264 .de doc-set-column-tab
4267 . nr doc-column-indent-width 0
4270 . ds doc-str-dsct1 " \"
4273 . ds doc-str-dsct1 " \"
4275 . \" XXX: this is packed abnormally close -- intercolumn width
4276 . \" should be configurable
4277 . ds doc-str-dsct1 " \"
4280 . while (\n[doc-reg-dsct] <= \$1) \{\
4281 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4282 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4283 . nr doc-reg-dsct +1
4286 . ta \*[doc-str-dsct]
4287 ' in +\n[doc-column-indent-width]u
4291 .\" NS doc-column-list macro
4296 .\" NS doc-list-indent-stackXXX
4299 .\" NS local variables:
4303 . if \n[doc-num-args] \
4304 . doc-parse-arg-vector
4307 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4308 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4312 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4313 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4314 . ds doc-space\n[doc-reg-dcl]
4317 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4318 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4321 ' in +\n[doc-column-indent-width]u
4323 . ti -\n[doc-column-indent-width]u
4325 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4329 .\" NS Ta user macro
4330 .\" NS append tab (\t)
4335 .\" NS width register `Ta' set in doc-common
4338 . ie \n[doc-arg-limit] \{\
4341 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4342 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4347 . tm1 "Usage: Ta must follow column entry: e.g.
4348 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4353 .\" NS Dl user macro
4354 .\" NS display (one line) literal
4356 .\" NS this function uses the `Li' font
4360 .\" NS doc-curr-font
4361 .\" NS doc-curr-size
4362 .\" NS doc-macro-name
4364 .\" NS width register `Dl' set in doc-common
4368 . in +\n[doc-display-indent]u
4370 . ie \n[doc-arg-limit] \{\
4371 . tm Usage: .Dl not callable by other macros (#\n[.c])
4376 . ds doc-macro-name Dl
4377 . doc-parse-args \$@
4379 . nr doc-curr-font \n[.f]
4380 . nr doc-curr-size \n[.ps]
4381 . nop \*[doc-Li-font]\c
4382 . doc-print-recursive
4385 . tm Usage: .Dl argument ... (#\n[.c])
4388 . in -\n[doc-display-indent]u
4392 .\" NS D1 user macro
4393 .\" NS display (one line)
4397 .\" NS doc-macro-name
4399 .\" NS width register `D1' set in doc-common
4403 . in +\n[doc-display-indent]u
4405 . ie \n[doc-arg-limit] \{\
4406 . tm Usage: .D1 not callable by other macros (#\n[.c])
4411 . ds doc-macro-name D1
4412 . doc-parse-args \$@
4414 . doc-print-recursive
4417 . tm Usage: .D1 argument ... (#\n[.c])
4420 . in -\n[doc-display-indent]u
4424 .\" NS Vt user macro
4425 .\" NS variable type (for forcing old style variable declarations);
4426 .\" NS this is not done in the same manner as .Ot for fortrash --
4427 .\" NS clean up later
4430 .\" NS doc-curr-font
4431 .\" NS doc-curr-size
4432 .\" NS doc-have-decl
4434 .\" NS doc-macro-name
4436 .\" NS width register `Vt' set in doc-common
4439 . if !\n[doc-arg-limit] \{\
4441 . ds doc-macro-name Vt
4442 . doc-parse-args \$@
4445 . tm Usage: .Vt variable_type ... (#\n[.c])
4448 . if !\n[doc-arg-limit] \
4452 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4453 . tm Usage: .Vt variable_type ... (#\n[.c])
4458 . if \n[doc-in-synopsis-section] \{\
4459 . \" if a function declaration was the last thing given,
4460 . \" want vertical space
4461 . if \n[doc-have-decl] \{\
4463 . nr doc-have-decl 0
4466 . \" if a subroutine was the last thing given, want vertical space
4467 . if \n[doc-have-func] \{\
4468 . ie \n[doc-have-var] \
4477 . nr doc-curr-font \n[.f]
4478 . nr doc-curr-size \n[.ps]
4479 . nop \*[doc-Ft-font]\c
4480 . doc-print-recursive
4482 . if \n[doc-in-synopsis-section] \{\
4483 . ie \n[doc-have-old-func] \
4484 . nop \*[doc-soft-space]\c
4491 .\" NS doc-is-func global register (bool)
4492 .\" NS set if subroutine (in synopsis only) (fortran only)
4497 .\" NS Ft user macro
4498 .\" NS function type
4501 .\" NS doc-curr-font
4502 .\" NS doc-curr-size
4503 .\" NS doc-have-decl
4506 .\" NS doc-macro-name
4508 .\" NS width register `Ft' set in doc-common
4511 . if !\n[doc-arg-limit] \{\
4513 . ds doc-macro-name Ft
4514 . doc-parse-args \$@
4517 . tm Usage: .Ft function_type ... (#\n[.c])
4520 . if !\n[doc-arg-limit] \
4524 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4525 . tm Usage: .Ft function_type ... (#\n[.c])
4530 . if \n[doc-in-synopsis-section] \{\
4531 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4533 . nr doc-have-decl 0
4537 . if \n[doc-have-var] \{\
4545 . nr doc-curr-font \n[.f]
4546 . nr doc-curr-size \n[.ps]
4547 . nop \*[doc-Ft-font]\c
4548 . doc-print-recursive
4552 .\" NS doc-have-old-func global register (bool)
4553 .\" NS set if `Ot' has been called
4555 .nr doc-have-old-func 0
4558 .\" NS Ot user macro
4559 .\" NS old function type (fortran -- no newline)
4562 .\" NS doc-have-decl
4563 .\" NS doc-have-old-func
4567 .\" NS width register `Ot' set in doc-common
4570 . nr doc-have-old-func 1
4572 . if \n[doc-in-synopsis-section] \{\
4573 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4575 . nr doc-have-decl 0
4579 . if \n[doc-have-var] \{\
4588 . nop \*[doc-Ft-font]\$*\c
4593 .\" NS Fa user macro
4594 .\" NS function arguments
4598 .\" NS doc-curr-font
4599 .\" NS doc-curr-size
4600 .\" NS doc-macro-name
4602 .\" NS width register `Fa' set in doc-common
4605 . if !\n[doc-arg-limit] \{\
4607 . ds doc-macro-name Fa
4608 . doc-parse-args \$@
4611 . tm Usage: .Fa function_arguments ... (#\n[.c])
4614 . ie \n[doc-func-arg-count] \
4618 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4619 . nr doc-curr-font \n[.f]
4620 . nr doc-curr-size \n[.ps]
4621 . nop \*[doc-Fa-font]\c
4622 . doc-print-recursive
4624 . if \n[doc-in-synopsis-section] \
4625 . if \n[doc-have-func] \
4631 .\" NS doc-func-arg-count global register
4632 .\" NS how many function arguments have been processed so far
4634 .nr doc-func-arg-count 0
4637 .\" NS doc-func-arg global string
4638 .\" NS work buffer for function name strings
4643 .\" NS doc-num-func-args global register
4644 .\" NS number of function arguments
4646 .nr doc-num-func-args 0
4649 .\" NS doc-func-args-processed global register
4650 .\" NS function arguments processed so far
4652 .nr doc-func-args-processed 0
4655 .\" NS doc-do-func macro
4656 .\" NS internal .Fa for .Fc
4662 .\" NS doc-func-arg-count
4663 .\" NS doc-func-args-processed
4664 .\" NS doc-num-func-args
4667 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4675 . nr doc-num-func-args 0
4676 . nr doc-func-args-processed 0
4678 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4679 . if (\n[doc-num-func-args] > 1) \
4680 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4682 . if (\n[doc-func-arg-count] > 1) \{\
4683 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4684 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4685 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4688 . if (\n[doc-func-arg-count] == 1) \{\
4689 . nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4692 . nr doc-func-arg-count +1
4697 .\" NS doc-have-func global register (bool)
4698 .\" NS whether we have more than one function in synopsis
4703 .\" NS Fn user macro
4708 .\" NS doc-curr-font
4709 .\" NS doc-curr-size
4710 .\" NS doc-have-decl
4711 .\" NS doc-have-func
4713 .\" NS doc-indent-synopsis
4715 .\" NS doc-macro-name
4717 .\" NS width register `Fn' set in doc-common
4720 . if !\n[doc-arg-limit] \{\
4722 . ds doc-macro-name Fn
4723 . doc-parse-args \$@
4726 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4729 . if !\n[doc-arg-limit] \
4732 . if \n[doc-in-synopsis-section] \{\
4733 . \" if there is/has been more than one subroutine declaration
4734 . ie \n[doc-is-func] \{\
4737 . nr doc-have-decl 0
4741 . if \n[doc-have-func] \{\
4744 . nr doc-have-decl 0
4747 . if \n[doc-have-decl] \{\
4752 . if \n[doc-have-var] \{\
4754 . nr doc-have-decl 0
4757 . nr doc-have-func 1
4761 . if !\n[doc-indent-synopsis] \
4762 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4763 . if !\n[doc-indent-synopsis-active] \
4764 . in +\n[doc-indent-synopsis]u
4765 . ti -\n[doc-indent-synopsis]u
4769 . doc-print-prefixes
4770 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4771 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4776 . nr doc-curr-font \n[.f]
4777 . nr doc-curr-size \n[.ps]
4778 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4779 . nop \f[]\s[0]\*[lp]\)\c
4782 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4783 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4784 . nop \*[doc-Fa-font]\c
4786 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4790 . if \n[doc-in-synopsis-section] \
4793 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4794 . \" output the space (if needed)
4796 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4799 . doc-print-recursive
4802 . doc-print-and-reset
4804 . if \n[doc-in-synopsis-section] \
4805 . if !\n[doc-indent-synopsis-active] \
4806 . in -\n[doc-indent-synopsis]u
4810 .\" NS doc-do-func-args macro
4811 .\" NS handle function arguments
4817 .\" NS doc-func-args-processed
4818 .\" NS doc-num-func-args
4820 .\" NS local variables:
4823 .de doc-do-func-args
4824 . if \n[doc-in-synopsis-section] \{\
4826 . nr doc-num-func-args 0
4827 . nr doc-func-args-processed 0
4829 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4830 . if (\n[doc-num-func-args] > 1) \
4831 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4834 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4837 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4838 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4839 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4840 . nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4841 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4847 .\" NS doc-saved-nesting-level global register
4849 .nr doc-saved-nesting-level 0
4852 .\" NS doc-in-func-enclosure global register (bool)
4854 .nr doc-in-func-enclosure 0
4857 .\" NS Fo user macro
4858 .\" NS function open
4862 .\" NS doc-curr-font
4863 .\" NS doc-curr-size
4864 .\" NS doc-func-arg-count
4865 .\" NS doc-have-decl
4866 .\" NS doc-have-func
4868 .\" NS doc-in-func-enclosure
4869 .\" NS doc-indent-synopsis
4871 .\" NS doc-macro-name
4872 .\" NS doc-saved-nesting-level
4874 .\" NS width register `Fo' set in doc-common
4877 . if (\n[doc-in-func-enclosure]) \{\
4878 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4882 . nr doc-saved-nesting-level \n[doc-nesting-level]
4883 . nr doc-in-func-enclosure 1
4885 . if !\n[doc-arg-limit] \{\
4887 . ds doc-macro-name Fo
4888 . doc-parse-args \$@
4891 . tm Usage: .Fo function_name (#\n[.c])
4894 . if \n[doc-in-synopsis-section] \{\
4895 . \" if there is/has been more than one subroutine declaration
4896 . ie \n[doc-is-func] \{\
4899 . nr doc-have-decl 0
4903 . if \n[doc-have-func] \{\
4906 . nr doc-have-decl 0
4909 . if \n[doc-have-decl] \{\
4914 . if \n[doc-have-var] \{\
4916 . nr doc-have-decl 0
4919 . nr doc-have-func 1
4923 . if !\n[doc-indent-synopsis] \
4924 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4927 . \" start function box
4935 . doc-print-prefixes
4936 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4937 . nr doc-func-arg-count 1
4938 . nr doc-curr-font \n[.f]
4939 . nr doc-curr-size \n[.ps]
4941 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4942 . nop \f[]\s[0]\*[lp]\)\c
4948 .\" NS Fc user macro
4949 .\" NS function close
4953 .\" NS doc-func-arg-count
4954 .\" NS doc-in-func-enclosure
4955 .\" NS doc-saved-nesting-level
4956 .\" NS doc-macro-name
4958 .\" NS width register `Fc' set in doc-common
4961 . if !\n[doc-in-func-enclosure] \{\
4962 . tm mdoc warning: Extraneous .Fc (#\n[.c])
4967 . ds doc-macro-name Fc
4968 . \" the first (dummy) argument is used to get the correct spacing
4969 . doc-parse-args \) \$@
4972 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
4973 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
4975 . nr doc-func-arg-count 0
4976 . nr doc-in-func-enclosure 0
4978 . ie \n[doc-in-synopsis-section] \
4983 . \" finish function box
4988 . unformat doc-func-box
4990 . if \n[doc-in-synopsis-section] \{\
4991 . if !\n[doc-indent-synopsis-active] \
4992 . in +\n[doc-indent-synopsis]u
4993 . ti -\n[doc-indent-synopsis]u
4997 . nop \*[doc-func-box]\c
5000 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5001 . nr doc-curr-font \n[.f]
5002 . nr doc-curr-size \n[.ps]
5003 . doc-print-recursive
5006 . doc-print-and-reset
5008 . if \n[doc-in-synopsis-section] \
5009 . if !\n[doc-indent-synopsis-active] \
5010 . in -\n[doc-indent-synopsis]u
5014 .\" NS doc-build-func-string macro
5015 .\" NS collect function arguments and set hard spaces inbetween
5019 .\" NS doc-func-args-processed
5020 .\" NS doc-num-func-args
5022 .de doc-build-func-string
5023 . if !\n[doc-num-func-args] \{\
5024 . nr doc-num-func-args \n[.$]
5025 . nr doc-func-args-processed 0
5029 . nr doc-func-args-processed +1
5030 . as doc-func-arg "\$1
5032 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5033 . as doc-func-arg "\*[doc-hard-space]
5036 . doc-build-func-string \$@
5041 .\" Very crude references: Stash all reference info into boxes, print out
5042 .\" reference on .Re macro and clean up. Ordering very limited, no fancy
5043 .\" citations, but can do articles, journals, and books -- need to add
5044 .\" several missing options (like city etc). Should be able to grab a refer
5045 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5049 .\" NS doc-is-reference global register (bool)
5050 .\" NS set if in reference
5052 .nr doc-is-reference 0
5055 .\" NS doc-reference-count global register
5056 .\" NS reference element counter
5058 .nr doc-reference-count 0
5061 .\" NS Rs user macro
5062 .\" NS reference start
5065 .\" NS doc-is-reference
5066 .\" NS doc-reference-count
5068 .\" NS width register `Rs' set in doc-common
5072 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5074 . nr doc-is-reference 1
5075 . doc-reset-reference
5076 . if \n[doc-in-see-also-section] \
5078 . nr doc-reference-count 0
5083 .\" NS Re user macro
5084 .\" NS reference end
5087 .\" NS doc-is-reference
5089 .\" NS width register `Re' set in doc-common
5093 . tm Usage: .Re (does not take arguments) (#\n[.c])
5095 . doc-print-reference
5096 . doc-reset-reference
5097 . nr doc-is-reference 0
5102 .\" NS doc-reset-reference macro
5103 .\" NS reference cleanup
5106 .\" NS doc-author-count
5107 .\" NS doc-author-nameXXX
5108 .\" NS doc-book-count
5109 .\" NS doc-book-name
5110 .\" NS doc-corporate-count
5111 .\" NS doc-corporate-name
5113 .\" NS doc-date-count
5114 .\" NS doc-issue-count
5115 .\" NS doc-issue-name
5116 .\" NS doc-journal-count
5117 .\" NS doc-journam-name
5118 .\" NS doc-optional-count
5119 .\" NS doc-optional-string
5120 .\" NS doc-page-number-count
5121 .\" NS doc-page-number-string
5122 .\" NS doc-reference-title-count
5123 .\" NS doc-reference-title-name
5124 .\" NS doc-reference-title-name-for-book
5125 .\" NS doc-report-count
5126 .\" NS doc-report-name
5127 .\" NS doc-volume-count
5128 .\" NS doc-volume-name
5130 .de doc-reset-reference
5131 . while (\n[doc-author-count]) \{\
5132 . ds doc-author-name\n[doc-author-count]
5133 . nr doc-author-count -1
5135 . nr doc-journal-count 0
5136 . nr doc-issue-count 0
5137 . nr doc-optional-count 0
5138 . nr doc-corporate-count 0
5139 . nr doc-report-count 0
5140 . nr doc-reference-title-count 0
5141 . nr doc-volume-count 0
5142 . nr doc-date-count 0
5143 . nr doc-page-number-count 0
5144 . nr doc-book-count 0
5146 . ds doc-journal-name
5148 . ds doc-optional-string
5149 . ds doc-corporate-name
5150 . ds doc-report-name
5151 . ds doc-reference-title-name
5152 . ds doc-reference-title-name-for-book
5153 . ds doc-volume-name
5155 . ds doc-page-number-string
5160 .\" NS doc-finish-reference macro
5161 .\" NS auxiliary macro for doc-print-reference
5164 .\" NS doc-reference-count
5166 .de doc-finish-reference
5167 . nr doc-reference-count -1
5168 . ie \n[doc-reference-count] \
5175 .\" NS doc-print-reference macro
5176 .\" NS reference print
5179 .\" NS doc-reference-count
5181 .de doc-print-reference
5185 . if \n[doc-author-count] \{\
5186 . doc-print-reference-authors
5187 . nr doc-reference-count -\n[doc-author-count]
5190 . if \n[doc-reference-title-count] \{\
5191 . unformat doc-reference-title-name
5192 . chop doc-reference-title-name
5193 . unformat doc-reference-title-name-for-book
5194 . chop doc-reference-title-name-for-book
5195 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5196 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5197 . doc-finish-reference
5200 . nop \*[doc-reference-title-name]\c
5201 . doc-finish-reference
5204 . if \n[doc-book-count] \{\
5205 . unformat doc-book-name
5206 . chop doc-book-name
5207 . nop \*[doc-book-name]\c
5208 . doc-finish-reference
5211 . if \n[doc-publisher-count] \{\
5212 . unformat doc-publisher-name
5213 . chop doc-publisher-name
5214 . nop \*[doc-publisher-name]\c
5215 . doc-finish-reference
5218 . if \n[doc-journal-count] \{\
5219 . unformat doc-journal-name
5220 . chop doc-journal-name
5221 . nop \*[doc-journal-name]\c
5222 . doc-finish-reference
5225 . if \n[doc-report-count] \{\
5226 . unformat doc-report-name
5227 . chop doc-report-name
5228 . nop \*[doc-report-name]\c
5229 . doc-finish-reference
5232 . if \n[doc-issue-count] \{\
5233 . unformat doc-issue-name
5234 . chop doc-issue-name
5235 . nop \*[doc-issue-name]\c
5236 . doc-finish-reference
5239 . if \n[doc-volume-count] \{\
5240 . unformat doc-volume-name
5241 . chop doc-volume-name
5242 . nop \*[doc-volume-name]\c
5243 . doc-finish-reference
5246 . if \n[doc-page-number-count] \{\
5247 . unformat doc-page-number-string
5248 . chop doc-page-number-string
5249 . nop \*[doc-page-number-string]\c
5250 . doc-finish-reference
5253 . if \n[doc-corporate-count] \{\
5254 . unformat doc-corporate-name
5255 . chop doc-corporate-name
5256 . nop \*[doc-corporate-name]\c
5257 . doc-finish-reference
5260 . if \n[doc-date-count] \{\
5263 . nop \*[doc-date]\c
5264 . doc-finish-reference
5267 . if \n[doc-optional-count] \{\
5268 . unformat doc-optional-string
5269 . chop doc-optional-string
5270 . nop \*[doc-optional-string]\c
5271 . doc-finish-reference
5274 . if \n[doc-reference-count] \
5275 . tm mdoc warning: unresolved reference problem
5277 . hy \n[doc-hyphen-flags]
5281 .\" NS doc-print-reference-authors macro
5282 .\" NS print out reference authors
5284 .\" NS local variables:
5288 .ds doc-str-dpra "and
5290 .de doc-print-reference-authors
5293 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5294 . unformat doc-author-name\n[doc-reg-dpra]
5295 . chop doc-author-name\n[doc-reg-dpra]
5296 . ie (\n[doc-author-count] > 2) \
5297 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5299 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5300 . nr doc-reg-dpra +1
5303 . unformat doc-author-name\n[doc-reg-dpra]
5304 . chop doc-author-name\n[doc-reg-dpra]
5305 . if (\n[doc-author-count] > 1) \
5306 . nop \)\*[doc-str-dpra]
5307 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5311 .\" NS doc-author-count global register
5312 .\" NS counter of author references
5314 .nr doc-author-count 0
5317 .\" NS doc-author-nameXXX global box
5318 .\" NS array of author names
5321 .\" NS doc-author-count
5323 .ds doc-author-name0
5326 .\" NS %A user macro
5327 .\" NS reference author(s)
5331 .\" NS doc-author-count
5332 .\" NS doc-curr-font
5333 .\" NS doc-curr-size
5334 .\" NS doc-macro-name
5335 .\" NS doc-reference-count
5337 .\" NS local variables:
5340 .\" NS width register `%A' set in doc-common
5343 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5344 . tm Usage: .%A author_name ... (#\n[.c])
5348 . nr doc-author-count +1
5349 . nr doc-reference-count +1
5351 . ds doc-macro-name %A
5352 . doc-parse-args \$@
5355 . nr doc-curr-font \n[.f]
5356 . nr doc-curr-size \n[.ps]
5358 . \" save to reference box
5359 . box doc-author-name\n[doc-author-count]
5368 .\" NS doc-book-count global register
5369 .\" NS counter of book references
5371 .nr doc-book-count 0
5374 .\" NS doc-book-name global box
5375 .\" NS string of collected book references
5380 .\" NS %B user macro
5381 .\" NS [reference] book name
5385 .\" NS doc-book-count
5386 .\" NS doc-curr-font
5387 .\" NS doc-curr-size
5388 .\" NS doc-macro-name
5389 .\" NS doc-reference-count
5391 .\" NS local variables:
5394 .\" NS width register `%B' set in doc-common
5397 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5398 . tm Usage: .%B book_name ... (#\n[.c])
5402 . if \n[doc-is-reference] \{\
5403 . nr doc-book-count +1
5404 . nr doc-reference-count +1
5407 . ds doc-macro-name %B
5408 . doc-parse-args \$@
5411 . nr doc-curr-font \n[.f]
5412 . nr doc-curr-size \n[.ps]
5414 . ie \n[doc-is-reference] \{\
5415 . \" append to reference box
5416 . boxa doc-book-name
5421 . nop \*[doc-Em-font]\c
5425 . nop \*[doc-Em-font]\c
5426 . doc-print-recursive
5431 .\" NS doc-date-count global register
5432 .\" NS counter of date references
5434 .nr doc-date-count 0
5437 .\" NS doc-date global box
5438 .\" NS string of collected date references
5443 .\" NS %D user macro
5444 .\" NS [reference] date
5448 .\" NS doc-curr-font
5449 .\" NS doc-curr-size
5450 .\" NS doc-date-count
5451 .\" NS doc-macro-name
5452 .\" NS doc-reference-count
5454 .\" NS local variables:
5457 .\" NS width register `%D' set in doc-common
5460 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5461 . tm Usage: .%D date ... (#\n[.c])
5465 . nr doc-date-count +1
5466 . nr doc-reference-count +1
5468 . ds doc-macro-name %D
5469 . doc-parse-args \$@
5472 . nr doc-curr-font \n[.f]
5473 . nr doc-curr-size \n[.ps]
5475 . \" append to reference box
5485 .\" NS doc-publisher-count global register
5486 .\" NS counter of publisher references
5488 .nr doc-publisher-count 0
5491 .\" NS doc-publisher-name global box
5492 .\" NS string of collected publisher references
5494 .ds doc-publisher-name
5497 .\" NS %I user macro
5498 .\" NS [reference] issuer/publisher name
5502 .\" NS doc-curr-font
5503 .\" NS doc-curr-size
5504 .\" NS doc-macro-name
5505 .\" NS doc-publisher-count
5506 .\" NS doc-reference-count
5508 .\" NS local variables:
5511 .\" NS width register `%I' set in doc-common
5514 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5515 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5519 . nr doc-publisher-count +1
5520 . nr doc-reference-count +1
5522 . ds doc-macro-name %I
5523 . doc-parse-args \$@
5526 . nr doc-curr-font \n[.f]
5527 . nr doc-curr-size \n[.ps]
5529 . \" append to reference box
5530 . boxa doc-publisher-name
5535 . nop \*[doc-Em-font]\c
5540 .\" NS doc-journal-count global register
5541 .\" NS counter of journal references
5543 .nr doc-journal-count 0
5546 .\" NS doc-journal-name global box
5547 .\" NS string of collected journal references
5549 .ds doc-journal-name
5552 .\" NS %J user macro
5553 .\" NS [reference] Journal Name
5557 .\" NS doc-curr-font
5558 .\" NS doc-curr-size
5559 .\" NS doc-journal-count
5560 .\" NS doc-macro-name
5561 .\" NS doc-reference-count
5563 .\" NS local variables:
5566 .\" NS width register `%J' set in doc-common
5569 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5570 . tm Usage: .%J journal_name ... (#\n[.c])
5574 . nr doc-journal-count +1
5575 . nr doc-reference-count +1
5577 . ds doc-macro-name %J
5578 . doc-parse-args \$@
5581 . nr doc-curr-font \n[.f]
5582 . nr doc-curr-size \n[.ps]
5584 . \" append to reference box
5585 . boxa doc-journal-name
5590 . nop \*[doc-Em-font]\c
5595 .\" NS doc-issue-count global register
5596 .\" NS counter of issue number references
5598 .nr doc-issue-count 0
5601 .\" NS doc-issue-name global box
5602 .\" NS string of collected issue number references
5607 .\" NS %N user macro
5608 .\" NS [reference] issue number
5612 .\" NS doc-curr-font
5613 .\" NS doc-curr-size
5614 .\" NS doc-issue-count
5615 .\" NS doc-macro-name
5616 .\" NS doc-reference-count
5618 .\" NS local variables:
5621 .\" NS width register `%N' set in doc-common
5624 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5625 . tm Usage: .%N issue_number ... (#\n[.c])
5629 . nr doc-issue-count +1
5630 . nr doc-reference-count +1
5632 . ds doc-macro-name %N
5633 . doc-parse-args \$@
5636 . nr doc-curr-font \n[.f]
5637 . nr doc-curr-size \n[.ps]
5639 . \" append to reference box
5640 . boxa doc-issue-name
5649 .\" NS doc-optional-count global register
5650 .\" NS counter of optional information references
5652 .nr doc-optional-count 0
5655 .\" NS doc-optional-string global box
5656 .\" NS string of collected optional information references
5658 .ds doc-optional-string
5661 .\" NS %O user macro
5662 .\" NS [reference] optional information
5666 .\" NS doc-curr-font
5667 .\" NS doc-curr-size
5668 .\" NS doc-macro-name
5669 .\" NS doc-optional-count
5670 .\" NS doc-reference-count
5672 .\" NS local variables:
5675 .\" NS width register `%O' set in doc-common
5678 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5679 . tm Usage: .%O optional_information ... (#\n[.c])
5683 . nr doc-optional-count +1
5684 . nr doc-reference-count +1
5686 . ds doc-macro-name %O
5687 . doc-parse-args \$@
5690 . nr doc-curr-font \n[.f]
5691 . nr doc-curr-size \n[.ps]
5693 . \" append to reference box
5694 . boxa doc-optional-string
5703 .\" NS doc-page-number-count global register
5704 .\" NS counter of page number references
5706 .nr doc-page-number-count 0
5709 .\" NS doc-page-number-string global box
5710 .\" NS string of collected page number references
5712 .ds doc-page-number-string
5715 .\" NS %P user macro
5716 .\" NS [reference] page numbers
5720 .\" NS doc-curr-font
5721 .\" NS doc-curr-size
5722 .\" NS doc-macro-name
5723 .\" NS doc-page-number-count
5724 .\" NS doc-reference-count
5726 .\" NS local variables:
5729 .\" NS width register `%P' set in doc-common
5732 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5733 . tm Usage: .%P page_number ... (#\n[.c])
5737 . nr doc-page-number-count +1
5738 . nr doc-reference-count +1
5740 . ds doc-macro-name %P
5741 . doc-parse-args \$@
5744 . nr doc-curr-font \n[.f]
5745 . nr doc-curr-size \n[.ps]
5747 . \" append to reference box
5748 . boxa doc-page-number-string
5757 .\" NS doc-corporate-count global register
5758 .\" NS counter of corporate references
5760 .nr doc-corporate-count 0
5763 .\" NS doc-corporate-name global box
5764 .\" NS string of collected corporate references
5766 .ds doc-corporate-name
5769 .\" NS %Q user macro
5770 .\" NS corporate or foreign author
5774 .\" NS doc-corporate-count
5775 .\" NS doc-curr-font
5776 .\" NS doc-curr-size
5777 .\" NS doc-macro-name
5778 .\" NS doc-reference-count
5780 .\" NS local variables:
5783 .\" NS width register `%Q' set in doc-common
5786 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5787 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5791 . nr doc-corporate-count +1
5792 . nr doc-reference-count +1
5794 . ds doc-macro-name %Q
5795 . doc-parse-args \$@
5798 . nr doc-curr-font \n[.f]
5799 . nr doc-curr-size \n[.ps]
5801 . \" append to reference box
5802 . boxa doc-corporate-name
5811 .\" NS doc-report-count global register
5812 .\" NS counter of report references
5814 .nr doc-report-count 0
5817 .\" NS doc-report-name global box
5818 .\" NS string of collected report references
5823 .\" NS %R user macro
5824 .\" NS [reference] report name
5828 .\" NS doc-curr-font
5829 .\" NS doc-curr-size
5830 .\" NS doc-macro-name
5831 .\" NS doc-reference-count
5832 .\" NS doc-report-count
5834 .\" NS local variables:
5837 .\" NS width register `%R' set in doc-common
5840 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5841 . tm Usage: .%R reference_report ... (#\n[.c])
5845 . nr doc-report-count +1
5846 . nr doc-reference-count +1
5848 . ds doc-macro-name %R
5849 . doc-parse-args \$@
5852 . nr doc-curr-font \n[.f]
5853 . nr doc-curr-size \n[.ps]
5855 . \" append to reference box
5856 . boxa doc-report-name
5865 .\" NS doc-reference-title-count global register
5866 .\" NS counter of reference title references
5868 .nr doc-reference-title-count 0
5871 .\" NS doc-reference-title-name global box
5872 .\" NS string of collected reference title references
5874 .ds doc-reference-title-name
5877 .\" NS doc-reference-title-name-for-book global box
5878 .\" NS string of collected reference title references
5879 .\" NS (saved with another font; this is a shortcoming of groff)
5881 .ds doc-reference-title-name-for-book
5884 .\" NS %T user macro
5885 .\" NS reference title
5889 .\" NS doc-curr-font
5890 .\" NS doc-curr-size
5891 .\" NS doc-macro-name
5892 .\" NS doc-reference-title-count
5893 .\" NS doc-report-count
5895 .\" NS local variables:
5898 .\" NS width register `%T' set in doc-common
5901 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5902 . tm Usage: .%T reference_title ... (#\n[.c])
5906 . if \n[doc-is-reference] \{\
5907 . nr doc-reference-title-count +1
5908 . nr doc-reference-count +1
5911 . ds doc-macro-name %T
5912 . doc-parse-args \$@
5915 . nr doc-curr-font \n[.f]
5916 . nr doc-curr-size \n[.ps]
5917 . ie \n[doc-is-reference] \{\
5918 . \" append to reference box
5919 . boxa doc-reference-title-name-for-book
5924 . nop \*[doc-No-font]\c
5927 . \" do it a second time with another font
5928 . ds doc-macro-name %T
5929 . doc-parse-args \$@
5932 . nr doc-curr-font \n[.f]
5933 . nr doc-curr-size \n[.ps]
5934 . boxa doc-reference-title-name
5939 . nop \*[doc-Em-font]\c
5943 . nop \*[doc-Em-font]\c
5944 . doc-print-recursive
5949 .\" NS doc-volume-count global register
5950 .\" NS counter of reference title references
5952 .nr doc-volume-count 0
5955 .\" NS doc-volume-name global box
5956 .\" NS string of collected volume references
5961 .\" NS %V user macro
5962 .\" NS reference volume
5966 .\" NS doc-curr-font
5967 .\" NS doc-curr-size
5968 .\" NS doc-macro-name
5969 .\" NS doc-reference-title-count
5970 .\" NS doc-volume-count
5972 .\" NS local variables:
5975 .\" NS width register `%V' set in doc-common
5978 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5979 . tm Usage: .%V volume ... (#\n[.c])
5983 . nr doc-volume-count +1
5984 . nr doc-reference-count +1
5986 . ds doc-macro-name %V
5987 . doc-parse-args \$@
5990 . nr doc-curr-font \n[.f]
5991 . nr doc-curr-size \n[.ps]
5993 . \" append to reference box
5994 . boxa doc-volume-name
6003 .\" NS doc-do-references macro
6004 .\" NS reference recursion routine
6009 .\" NS local variables:
6013 .de doc-do-references
6014 . if !\n[doc-is-reference] \
6015 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6017 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6019 . ie (\n[doc-reg-ddr1] == 1) \{\
6020 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6021 . doc-append-arg \c 3
6022 . \*[doc-arg\n[doc-arg-ptr]]
6025 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6027 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6028 . \" finish reference box
6036 . nr doc-reg-ddr \n[doc-arg-ptr]
6038 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6044 .\" NS Hf user macro
6045 .\" NS source include header files.
6048 .\" NS doc-curr-font
6049 .\" NS doc-curr-size
6051 .\" NS width register `Hf' set in doc-common
6054 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6066 . Usage: .Hf file (#\n[.c])
6070 .\" NS doc-have-author global register (bool)
6073 .nr doc-have-author 0
6076 .\" NS An user macro
6081 .\" NS doc-curr-font
6082 .\" NS doc-curr-size
6083 .\" NS doc-have-author
6084 .\" NS doc-macro-name
6086 .\" NS width register `An' set in doc-common
6089 . if !\n[doc-arg-limit] \{\
6091 . ie "\$1"-nosplit" \
6092 . nr doc-in-authors-section 0
6093 . el \{ .ie "\$1"-split" \
6094 . nr doc-in-authors-section 1
6096 . ds doc-macro-name An
6097 . doc-parse-args \$@
6100 . tm1 "Usage: .An {-nosplit | -split}
6101 . tm1 .An author_name ... (#\n[.c])
6104 . if \n[doc-in-authors-section] \{\
6105 . ie \n[doc-have-author] \
6108 . nr doc-have-author 1
6111 . if \n[doc-arg-limit] \{\
6113 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6114 . nr doc-curr-font \n[.f]
6115 . nr doc-curr-size \n[.ps]
6116 . doc-print-recursive
6119 . tm Usage: .An author_name ... (#\n[.c])
6125 .\" NS Rv user macro
6126 .\" NS return values
6128 .\" NS width register `Rv' set in doc-common
6130 .\" NS local variables:
6131 .\" NS doc-str-Rv-std-prefix
6132 .\" NS doc-str-Rv-std-suffix
6133 .\" NS doc-str-Rv-stds-prefix
6134 .\" NS doc-str-Rv-stds-and
6135 .\" NS doc-str-Rv-stds-suffix
6136 .\" NS doc-str-Rv-std0
6138 .ds doc-str-Rv-std-prefix "The
6139 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6140 .as doc-str-Rv-std-suffix " otherwise the value\~-1 is returned and
6141 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6142 .as doc-str-Rv-std-suffix " is set to indicate the error.
6144 .ds doc-str-Rv-stds-prefix "The
6145 .ds doc-str-Rv-stds-and "and
6146 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6147 .as doc-str-Rv-stds-suffix " otherwise the value\~-1 is returned and
6148 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6149 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6151 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6152 .as doc-str-Rv-std0 " otherwise the value\~-1 is returned and
6153 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6154 .as doc-str-Rv-std0 " is set to indicate the error.
6158 .\" XXX: what does this function without `-std'?
6160 . if \n[doc-arg-limit] \{\
6161 . tm Usage: .Rv not callable by other macros (#\n[.c])
6167 . tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6172 . nr doc-reg-Rv \*[doc-section]
6173 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6174 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6177 . ie (\n[.$] > 1) \{\
6178 . nop \)\*[doc-str-Rv-stds-prefix]
6180 . while (\n[doc-reg-Rv] < \n[.$]) \{\
6182 . Fn \$\n[doc-reg-Rv] ,
6184 . Fn \$\n[doc-reg-Rv]
6187 . nop \)\*[doc-str-Rv-stds-and]
6189 . nop \)\*[doc-str-Rv-stds-suffix]
6191 . el \{ .ie (\n[.$] == 1) \{\
6192 . nop \)\*[doc-str-Rv-std-prefix]
6194 . nop \)\*[doc-str-Rv-std-suffix]
6197 . nop \)\*[doc-str-Rv-std0]
6202 .\" NS Ex user macro
6205 .\" NS width register `Ex' set in doc-common
6207 .\" NS local variables:
6208 .\" NS doc-str-Ex-std-prefix
6209 .\" NS doc-str-Ex-std-suffix
6211 .ds doc-str-Ex-std-prefix "The
6212 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6213 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6215 .ds doc-str-Ex-stds-prefix "The
6216 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6217 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6218 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6222 .\" XXX: what does this function without `-std'?
6224 . if \n[doc-arg-limit] \{\
6225 . tm Usage: .Ex not callable by other macros (#\n[.c])
6231 . tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6236 . nr doc-reg-Ex \*[doc-section]
6237 . if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6238 . tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6241 . ie (\n[.$] > 1) \{\
6242 . nop \)\*[doc-str-Ex-stds-prefix]
6244 . while (\n[doc-reg-Ex] < \n[.$]) \{\
6246 . Nm \$\n[doc-reg-Ex] ,
6248 . Nm \$\n[doc-reg-Ex]
6251 . nop \)\*[doc-str-Ex-stds-and]
6253 . nop \)\*[doc-str-Ex-stds-suffix]
6256 . nop \)\*[doc-str-Ex-std-prefix]
6258 . nop \)\*[doc-str-Ex-std-suffix]
6263 .\" NS Mt user macro
6264 .\" NS mailto (for conversion to HTML)
6267 . \" XXX: error handling missing
6272 .\" NS Lk user macro
6273 .\" NS link (for conversion to HTML)
6275 .\" NS local variables:
6280 . ds doc-str-Lk Sy \$@
6282 . ie (\n[.$] > 1) \{\
6283 . doc-get-arg-type \$2
6284 . ie (\n[doc-arg-type] < 3) \{\
6286 . ds doc-str-Lk Sy "\$1"
6287 . doc-get-width "\$1"
6290 . as doc-str-Lk " \$@
6293 . doc-get-width "\$1"
6296 . doc-get-width "\$1"
6302 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6309 .\" NS doc-defunct-macro macro
6310 .\" NS this is the skeleton for defunct macros
6313 .de doc-defunct-macro
6314 . tmc mdoc error: .\$0 defunct
6315 . if d doc-\$0-usage \
6316 . tmc , \*[doc-\$0-usage]
6323 .als Db doc-defunct-macro
6325 .als Ds doc-defunct-macro
6327 .als Or doc-defunct-macro
6328 .ds doc-Or-usage use `|'
6330 .als Sf doc-defunct-macro
6331 .ds doc-Sf-usage use .Pf or .Ns
6337 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6338 . tm1 " Should this have been `.Em ...'?
6343 .\" NS doc-empty-line macro
6344 .\" NS emit warning and print empty line
6347 . if !\n[doc-display-depth] \
6348 . tm mdoc warning: Empty input line #\n[.c]
6358 .\" load local modifications