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.
51 . ab This version of mdoc can be run with GNU troff only!
57 .if ((\n[.x] == 0) : ((\n[.x] == 1) & (\n[.y] < 17))) \
58 . ab You need GNU troff version 1.17 or higher to run this version of mdoc!
61 .\" Load start-up files
63 . mso mdoc/doc-ditroff
74 .\" NS doc-macro-name global string
75 .\" NS name of calling request (set in each user-requestable macro)
78 .als doc-arg0 doc-macro-name
81 .\" NS doc-arg-limit global register
82 .\" NS total number of arguments
87 .\" NS doc-num-args global register
88 .\" NS number of arguments to handle (must be set to \n[.$] prior to
89 .\" NS `doc-parse-arg-vector' request)
94 .\" NS doc-arg-ptr global register
95 .\" NS argument pointer
100 .\" NS doc-argXXX global string
101 .\" NS argument vector
109 .\" NS doc-typeXXX global register
110 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
111 .\" NS punctuation prefix=4)
119 .\" NS doc-spaceXXX global string
128 .\" NS doc-parse-args macro
129 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
138 .\" NS doc-have-space
140 .\" NS local variables:
146 . if !\n[doc-arg-limit] \
149 . nr doc-have-space 0
154 . nr doc-arg-limit +1
156 . \" handle `|' and `...' specially
158 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
159 . el \{ .ie "\$1"..." \
160 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
162 . ds doc-arg\n[doc-arg-limit] "\$1
165 . \" get argument type and set spacing
166 . doc-get-arg-type* \n[doc-arg-limit]
167 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
168 . doc-set-spacing-\n[doc-arg-type]
170 . \" check whether we have processed the last parameter
182 .\" NS doc-parse-arg-vector macro
183 .\" NS parse argument vector (recursive)
185 .\" NS cf. comments in doc-parse-args
195 .\" NS local variables:
200 .de doc-parse-arg-vector
201 . if !\n[doc-arg-limit] \
204 . nr doc-arg-limit +1
206 . ie "\*[doc-arg\n[doc-arg-limit]]"|" \
207 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
208 . el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
209 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
212 . doc-get-arg-type* \n[doc-arg-limit]
213 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
214 . doc-set-spacing-\n[doc-arg-type]
216 . ie (\n[doc-num-args] == 1) \{\
222 . doc-parse-arg-vector
229 .\" NS doc-parse-space-vector macro
230 .\" NS parse space vector (recursive)
237 .de doc-parse-space-vector
238 . nr doc-arg-limit +1
240 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
242 . ie (\n[doc-num-args] == 1) \
246 . doc-parse-space-vector
251 .\" NS doc-remaining-args macro
252 .\" NS output remaining arguments as-is, separated by spaces (until
253 .\" NS `doc-num-args' is exhausted)
259 .de doc-remaining-args
261 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
263 . ie (\n[doc-num-args] == 1) \{\
268 . nop \)\*[doc-space]\c
275 .\" NS doc-append-arg macro
276 .\" NS append one argument to argument vector:
277 .\" NS `.doc-append-arg [arg] [type]'
285 . nr doc-arg-limit +1
286 . ds doc-arg\n[doc-arg-limit] "\$1
287 . nr doc-type\n[doc-arg-limit] \$2
288 . doc-set-spacing-\$2
292 .\" NS doc-print-and-reset macro
293 .\" NS finish input line and clean up argument vectors
295 .de doc-print-and-reset
296 . if \n[doc-space-mode] \
302 .\" NS doc-reset-args macro
303 .\" NS reset argument counters
315 . hy \n[doc-hyphen-flags]
321 .\" NS doc-curr-font global register
322 .\" NS saved current font
324 .nr doc-curr-font \n[.f]
327 .\" NS doc-curr-size global register
328 .\" NS saved current font size
330 .nr doc-curr-size \n[.ps]
336 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
342 .\" NS doc-macro-name
344 .\" NS local variables:
345 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
347 .\" NS width register `Fl' set in doc-common
350 . nr doc-curr-font \n[.f]
351 . nr doc-curr-size \n[.ps]
352 . nop \*[doc-Fl-font]\c
354 . if !\n[doc-arg-limit] \{\
355 . ds doc-macro-name Fl
360 . nop \|\-\|\f[P]\s[0]
363 . if !\n[doc-arg-limit] \
367 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
369 . nop \|\-\f[P]\s[0]\c
370 . doc-print-and-reset
373 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
374 . nop \|\-\f[P]\s[0]\c
375 . \*[doc-arg\n[doc-arg-ptr]]
378 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
387 .\" NS doc-flag-recursion macro
388 .\" NS `Fl' flag recursion routine (special handling)
393 .\" NS local variables:
398 .de doc-flag-recursion
399 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
400 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
402 . ie (\n[doc-reg-dfr1] == 1) \{\
407 . nr doc-reg-dfr \n[doc-arg-ptr]
409 . ie (\n[doc-reg-dfr1] == 2) \{\
410 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
411 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
413 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
414 . if \n[doc-reg-Fl] \
415 . nop \|\-\*[doc-space]\c
419 . ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
420 . if \n[doc-reg-Fl] \
421 . nop \|\-\*[doc-space]\c
425 . \" two consecutive hyphen characters?
426 . ie "\*[doc-str-dfr]"-" \
429 . nop \|\%\-\*[doc-str-dfr]\c
432 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
433 . nop \)\*[doc-str-dfr]\f[P]\s[0]\c
436 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
438 . if (\n[doc-reg-dfr1] == 4) \
441 . doc-print-and-reset
445 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
446 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
449 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
452 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
456 . doc-flag-recursion \$@
461 .\" NS doc-print-recursive macro
462 .\" NS general name recursion routine (print remaining arguments)
467 .\" NS local variables:
472 .de doc-print-recursive
473 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
474 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
476 . ie (\n[doc-reg-dpr1] == 1) \{\
477 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
481 . nr doc-reg-dpr \n[doc-arg-ptr]
483 . ie (\n[doc-reg-dpr1] == 2) \
484 . \" the `\%' prevents hyphenation on a dash (`-')
485 . nop \%\*[doc-str-dpr]\&\c
487 . \" punctuation character
488 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
489 . nop \)\*[doc-str-dpr]\f[P]\s[0]\c
493 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
495 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
496 . doc-print-and-reset
499 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
500 . doc-print-recursive
505 .\" NS doc-print-prefixes macro
506 .\" NS print leading prefixes
511 .de doc-print-prefixes
512 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
513 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
515 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
516 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
522 .\" NS doc-generic-macro macro
523 .\" NS this is the skeleton for most simple macros
529 .\" NS doc-macro-name
531 .de doc-generic-macro
532 . if !\n[doc-arg-limit] \{\
534 . ds doc-macro-name \$0
538 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
541 . if !\n[doc-arg-limit] \
545 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
546 . if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
547 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
549 . \" the right action here would be to reset the argument counters
550 . \" and bail out -- unfortunately, a small number of manual pages
551 . \" (less than 2% for FreeBSD which has been used for testing)
552 . \" relied on the old behaviour (silently ignore this error),
553 . \" so it is commented out
558 . nr doc-curr-font \n[.f]
559 . nr doc-curr-size \n[.ps]
560 . nop \*[doc-\$0-font]\c
561 . doc-print-recursive
565 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
572 .\" NS command line `argument' macro: `.Ar [args ...]'
578 .\" NS doc-macro-name
580 .\" NS local variable:
581 .\" NS doc-str-Ar-default
583 .\" NS width register `Ar' set in doc-common
585 .ds doc-str-Ar-default "file\ .\|.\|.
588 . nr doc-curr-font \n[.f]
589 . nr doc-curr-size \n[.ps]
590 . nop \*[doc-Ar-font]\c
592 . if !\n[doc-arg-limit] \{\
593 . ds doc-macro-name Ar
598 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
601 . if !\n[doc-arg-limit] \
606 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
607 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
608 . doc-print-and-reset
611 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
612 . \" replace previous argument (Ar) with default value
614 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
615 . nr doc-type\n[doc-arg-ptr] 2
616 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
618 . \" recompute space vector for remaining arguments
619 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
620 . nr doc-arg-limit \n[doc-arg-ptr]
621 . doc-parse-space-vector
623 . doc-print-recursive
631 .\" NS width register `Ad' set in doc-common
633 .als Ad doc-generic-macro
634 .ds doc-Ad-usage address
637 .\" NS doc-indent-synopsis global register
638 .\" NS indentation in synopsis
640 .nr doc-indent-synopsis 0
643 .\" NS doc-indent-synopsis-active global register (bool)
644 .\" NS indentation in synopsis active
646 .nr doc-indent-synopsis-active 0
650 .\" NS config declaration (for section 4 SYNOPSIS)
652 .\" NS this function causes a break; it uses the `Nm' font
658 .\" NS doc-indent-synopsis
659 .\" NS doc-macro-name
661 .\" NS width register `Cd' set in doc-common
664 . if !\n[doc-arg-limit] \{\
666 . ds doc-macro-name Cd
670 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
673 . if !\n[doc-arg-limit] \
677 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
678 . nr doc-curr-font \n[.f]
679 . nr doc-curr-size \n[.ps]
681 . ie \n[doc-in-synopsis-section] \{\
682 . if "\*[doc-macro-name]"Cd" \{\
684 . if !\n[doc-indent-synopsis] \
685 . nr doc-indent-synopsis \n[doc-display-indent]u
686 . if !\n[doc-indent-synopsis-active] \
687 . in +\n[doc-indent-synopsis]u
688 . ti -\n[doc-indent-synopsis]u
689 . nop \*[doc-Nm-font]\c
690 . doc-print-recursive
691 . if !\n[doc-indent-synopsis-active] \
692 . in -\n[doc-indent-synopsis]u
695 . nop \*[doc-Nm-font]\c
696 . doc-print-recursive
699 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
706 .\" NS interactive command modifier (flag)
708 .\" NS width register `Cm' set in doc-common
710 .als Cm doc-generic-macro
711 .ds doc-Cm-usage interactive_command_modifier
715 .\" NS defined variable
717 .\" NS this function uses the `Er' font
719 .\" NS width register `Dv' set in doc-common
721 .als Dv doc-generic-macro
722 .ds doc-Dv-usage defined_variable
723 .als doc-Dv-font doc-Er-font
729 .\" NS width register `Em' set in doc-common
731 .als Em doc-generic-macro
732 .ds doc-Em-usage text
738 .\" NS width register `Er' set in doc-common
740 .als Er doc-generic-macro
741 .ds doc-Er-usage text
745 .\" NS environment variable
747 .\" NS width register `Ev' set in doc-common
749 .als Ev doc-generic-macro
750 .ds doc-Ev-usage text
753 .\" NS doc-have-decl global register (bool)
754 .\" NS subroutine test (in synopsis only)
759 .\" NS doc-have-var global register (bool)
760 .\" NS whether last type is a variable type
765 .\" NS doc-do-func-decl macro
766 .\" NS do someting special while in SYNOPSIS
775 . if \n[doc-in-synopsis-section] \{\
776 . \" if a variable type was the last thing given, want vertical space
777 . if \n[doc-have-var] \{\
781 . \" if a subroutine was the last thing given, want vertical space
782 . if \n[doc-have-func] \{\
783 . ie \n[doc-have-decl] \
791 . nr doc-curr-font \n[.f]
792 . nr doc-curr-size \n[.ps]
797 .\" NS function declaration -- not callable
799 .\" NS this function causes a break
801 .\" NS width register `Fd' set in doc-common
804 . ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
806 . nop \*[doc-Fd-font]\$*
808 . ft \n[doc-curr-font]
809 . ps \n[doc-curr-size]u
812 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
819 .\" NS #include statement - not callable
821 .\" NS this function causes a break; it uses the `Fd' font
823 .\" NS width register `In' set in doc-common
826 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
828 . nop \*[doc-Fd-font]#include <\$1>
830 . ft \n[doc-curr-font]
831 . ps \n[doc-curr-size]u
834 . tm Usage: .In include_file -- In is not callable (#\n[.c])
841 .\" NS function return value
843 .\" NS this function uses the `Ar' font
845 .\" NS width register `Fr' set in doc-common
847 .als Fr doc-generic-macro
848 .ds doc-Fr-usage function_return_value
849 .als doc-Fr-font doc-Ar-font
853 .\" NS interactive command
855 .\" NS width register `Ic' set in doc-common
857 .als Ic doc-generic-macro
858 .ds doc-Ic-usage interactive_command
864 .\" NS width register `Li' set in doc-common
866 .als Li doc-generic-macro
867 .ds doc-Li-usage argument
873 .\" NS this function uses the `Sy' font
875 .\" NS width register `Ms' set in doc-common
877 .als Ms doc-generic-macro
878 .ds doc-Ms-usage math_symbol
879 .als doc-Ms-font doc-Sy-font
882 .\" NS doc-command-name global string
883 .\" NS save first invocation of .Nm
889 .\" NS name of command or page topic
893 .\" NS doc-command-name
896 .\" NS doc-indent-synopsis
897 .\" NS doc-indent-synopsis-active
898 .\" NS doc-macro-name
900 .\" NS width register `Nm' set in doc-common
903 . if !\n[doc-arg-limit] \{\
904 . ds doc-macro-name Nm
908 . ie "\*[doc-command-name]"" \
909 . tm Usage: .Nm name ... (#\n[.c])
911 . doc-parse-args \*[doc-command-name]
914 . if !\n[doc-arg-limit] \
919 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
921 . ie "\*[doc-command-name]"" \{\
922 . tm Usage: .Nm name ... (#\n[.c])
926 . nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
927 . doc-print-and-reset
930 . nr doc-curr-font \n[.f]
931 . nr doc-curr-size \n[.ps]
933 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
934 . ie "\*[doc-command-name]"" \
935 . tm Usage: .Nm name ... (#\n[.c])
937 . \" replace previous argument (Nm) with default value
939 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
940 . nr doc-type\n[doc-arg-ptr] 2
941 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
943 . \" recompute space vector for remaining arguments
944 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
945 . nr doc-arg-limit \n[doc-arg-ptr]
946 . doc-parse-space-vector
949 . \" handle `.Nm ...' in SYNOPSIS
950 . if \n[doc-in-synopsis-section] \{\
951 . if "\*[doc-macro-name]"Nm" \{\
953 . if !\n[doc-indent-synopsis] \{\
954 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
955 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
957 . if !\n[doc-indent-synopsis-active] \{\
958 . in +\n[doc-indent-synopsis]u
959 . nr doc-indent-synopsis-active 1
961 . ti -\n[doc-indent-synopsis]u
963 . if "\*[doc-command-name]"" \
964 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
966 . nop \*[doc-Nm-font]\c
968 . doc-print-recursive
974 .\" NS pathname: `.Pa [arg ...]'
980 .\" NS doc-macro-name
982 .\" NS width register `Pa' set in doc-common
985 . if !\n[doc-arg-limit] \{\
986 . ds doc-macro-name Pa
991 . nop \*[doc-Pa-font]~\f[P]\s[0]
994 . if !\n[doc-arg-limit] \
999 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1000 . nr doc-curr-font \n[.f]
1001 . nr doc-curr-size \n[.ps]
1002 . nop \*[doc-Pa-font]\c
1003 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1004 . \" replace previous argument (Pa) with default value
1006 . ds doc-arg\n[doc-arg-ptr] ~
1007 . nr doc-type\n[doc-arg-ptr] 2
1008 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1010 . \" recompute space vector for remaining arguments
1011 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1012 . nr doc-arg-limit \n[doc-arg-ptr]
1013 . doc-parse-space-vector
1015 . doc-print-recursive
1018 . nop \*[doc-Pa-font]~\f[P]\s[0]\c
1019 . doc-print-and-reset
1024 .\" NS Sy user macro
1027 .\" NS width register `Sy' set in doc-common
1029 .als Sy doc-generic-macro
1030 .ds doc-Sy-usage symbolic_text
1033 .\" NS Me user macro
1036 .\" NS width register `Me' set in doc-common
1038 .als Me doc-generic-macro
1039 .ds doc-Me-usage menu_entry
1042 .\" NS Tn user macro
1047 .\" NS doc-curr-font
1048 .\" NS doc-curr-size
1049 .\" NS doc-macro-name
1051 .\" NS width register `Tn' set in doc-common
1054 . if !\n[doc-arg-limit] \{\
1056 . ds doc-macro-name Tn
1057 . doc-parse-args \$@
1060 . tm Usage: .Tn trade_name ... (#\n[.c])
1063 . if !\n[doc-arg-limit] \
1067 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1068 . nr doc-curr-font \n[.f]
1069 . nr doc-curr-size \n[.ps]
1070 . nop \)\*[doc-Tn-font-size]\c
1071 . ie !\n[doc-is-reference] \{\
1072 . nop \)\*[doc-Tn-font-shape]\c
1073 . doc-print-recursive
1079 . tm Usage: .Tn trade_name ... (#\n[.c])
1085 .\" NS Va user macro
1086 .\" NS variable name
1088 .\" NS width register `Va' set in doc-common
1090 .als Va doc-generic-macro
1091 .ds doc-Va-usage variable_name
1094 .\" NS No user macro
1095 .\" NS normal text macro (default text style if mess up)
1097 .\" NS width register `No' set in doc-common
1099 .als No doc-generic-macro
1100 .ds doc-No-usage normal_text
1103 .\" NS doc-quote-left global string
1104 .\" NS left quotation character for `doc-enclose-string' and
1105 .\" NS `doc-enclose-open'
1110 .\" NS doc-quote-right global string
1111 .\" NS right quotation character for `doc-enclose-string' and
1112 .\" NS `doc-enclose-close'
1117 .\" NS Op user macro
1118 .\" NS option expression (i.e., enclose string in square brackets)
1121 .\" NS doc-macro-name
1122 .\" NS doc-quote-left
1123 .\" NS doc-quote-right
1125 .\" NS width register `Op' set in doc-common
1128 . if !\n[doc-arg-limit] \
1129 . ds doc-macro-name Op
1131 . ds doc-quote-left "\*[doc-left-bracket]
1132 . ds doc-quote-right "\*[doc-right-bracket]
1134 . doc-enclose-string \$@
1138 .\" NS Aq user macro
1139 .\" NS enclose string in angle brackets
1142 .\" NS doc-macro-name
1143 .\" NS doc-quote-left
1144 .\" NS doc-quote-right
1146 .\" NS width register `Aq' set in doc-common
1149 . if !\n[doc-arg-limit] \
1150 . ds doc-macro-name Aq
1152 . ds doc-quote-left \[la]
1153 . ds doc-quote-right \[ra]
1155 . doc-enclose-string \$@
1159 .\" NS Bq user macro
1160 .\" NS enclose string in square brackets
1163 .\" NS doc-macro-name
1164 .\" NS doc-quote-left
1165 .\" NS doc-quote-right
1167 .\" NS width register `Bq' set in doc-common
1170 . if !\n[doc-arg-limit] \
1171 . ds doc-macro-name Bq
1173 . ds doc-quote-left "\*[doc-left-bracket]
1174 . ds doc-quote-right "\*[doc-right-bracket]
1176 . doc-enclose-string \$@
1180 .\" NS Brq user macro
1181 .\" NS enclose string in braces
1184 .\" NS doc-macro-name
1185 .\" NS doc-quote-left
1186 .\" NS doc-quote-right
1188 .\" NS width register `Brq' set in doc-common
1191 . if !\n[doc-arg-limit] \
1192 . ds doc-macro-name Brq
1194 . ds doc-quote-left {
1195 . ds doc-quote-right }
1197 . doc-enclose-string \$@
1201 .\" NS Dq user macro
1202 .\" NS enclose string in double quotes
1205 .\" NS doc-macro-name
1206 .\" NS doc-quote-left
1207 .\" NS doc-quote-right
1209 .\" NS width register `Dq' set in doc-common
1212 . if !\n[doc-arg-limit] \
1213 . ds doc-macro-name Dq
1215 . ds doc-quote-left "\*[Lq]
1216 . ds doc-quote-right "\*[Rq]
1218 . doc-enclose-string \$@
1222 .\" NS Eq user macro
1223 .\" NS enclose string in user-defined quotes (args 1 and 2)
1226 .\" NS doc-macro-name
1227 .\" NS doc-quote-left
1228 .\" NS doc-quote-right
1230 .\" NS width register `Eq' set in doc-common
1233 . if !\n[doc-arg-limit] \
1234 . ds doc-macro-name Eq
1236 . ds doc-quote-left "\$1
1237 . ds doc-quote-right "\$2
1240 . doc-enclose-string \$@
1244 .\" NS Pq user macro
1245 .\" NS enclose string in parentheses
1248 .\" NS doc-macro-name
1249 .\" NS doc-quote-left
1250 .\" NS doc-quote-right
1252 .\" NS width register `Pq' set in doc-common
1255 . if !\n[doc-arg-limit] \
1256 . ds doc-macro-name Pq
1258 . ds doc-quote-left "\*[doc-left-parenthesis]
1259 . ds doc-quote-right "\*[doc-right-parenthesis]
1261 . doc-enclose-string \$@
1265 .\" NS Ql user macro
1266 .\" NS quoted literal
1268 .\" is in file doc-[dit|n]roff
1271 .\" NS Qq user macro
1272 .\" NS enclose string in straight double quotes
1275 .\" NS doc-macro-name
1276 .\" NS doc-quote-left
1277 .\" NS doc-quote-right
1279 .\" NS width register `Qq' set in doc-common
1282 . if !\n[doc-arg-limit] \
1283 . ds doc-macro-name Qq
1285 . ds doc-quote-left "\*[q]
1286 . ds doc-quote-right "\*[q]
1288 . doc-enclose-string \$@
1292 .\" NS Sq user macro
1293 .\" NS enclose string in single quotes
1296 .\" NS doc-macro-name
1297 .\" NS doc-quote-left
1298 .\" NS doc-quote-right
1300 .\" NS width register `Sq' set in doc-common
1303 . if !\n[doc-arg-limit] \
1304 . ds doc-macro-name Sq
1306 . ds doc-quote-left "\*[doc-left-singlequote]
1307 . ds doc-quote-right "\*[doc-right-singlequote]
1309 . doc-enclose-string \$@
1313 .\" NS Es user macro
1314 .\" NS set up arguments (i.e., the left and right quotation character as
1315 .\" NS first and second argument) for .En call
1319 .\" NS doc-macro-name
1320 .\" NS doc-quote-left
1321 .\" NS doc-quote-right
1324 . if !\n[doc-arg-limit] \{\
1325 . ie (\n[.$] > 2) \{\
1326 . ds doc-macro-name Es
1327 . doc-parse-args \$@
1330 . ds doc-quote-left "\$1
1331 . ds doc-quote-right "\$2
1334 . if !\n[doc-arg-limit] \
1338 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1340 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1342 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1343 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1345 . doc-print-and-reset
1349 .\" NS doc-have-slot global register (bool)
1350 .\" NS set if `doc-enclose-string' has created a slot for closing
1356 .\" NS doc-enclose-string macro
1357 .\" NS enclose string with given args (e.g. [ and ])
1362 .\" NS doc-have-slot
1364 .\" NS local variables:
1370 .\" NS doc-quote-left
1371 .\" NS doc-quote-right
1373 .de doc-enclose-string
1374 . if \n[doc-in-synopsis-section] \
1375 . doc-set-hard-space
1377 . if !\n[doc-arg-limit] \{\
1379 . doc-parse-args \$@
1381 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1384 . if !\n[doc-arg-limit] \
1387 . nr doc-curr-font \n[.f]
1388 . nr doc-curr-size \n[.ps]
1391 . doc-print-prefixes
1392 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1393 . nop \)\*[doc-quote-left]\)\c
1394 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1396 . nop \)\*[doc-quote-right]\)\c
1397 . doc-print-and-reset
1400 . \" test whether last arguments are of type closing punctuation
1402 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1403 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1404 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1407 . \" prepend closing delimiter
1409 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1412 . \" test whether last arguments are macros which continue the line
1414 . nr doc-reg-des \n[doc-arg-limit]
1415 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1416 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1418 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1423 . \" if there are no trailing macros to be skipped, append argument
1424 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1425 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1427 . \" if a previous call to `doc-enclose-string' has already created
1428 . \" a slot, prepend argument
1429 . ie \n[doc-have-slot] \
1430 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1432 . \" we have to shift all arguments to the right
1434 . nr doc-reg-des1 \n[doc-arg-limit]
1435 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1436 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1437 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1438 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1439 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1440 . nr doc-reg-des1 -1
1441 . nr doc-reg-des2 -1
1443 . nr doc-arg-limit +1
1445 . \" finally, insert closing delimiter into the freed slot and
1446 . \" recompute spacing vector
1447 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1448 . nr doc-type\n[doc-reg-des] 3
1449 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1450 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1451 . doc-parse-space-vector
1452 . nr doc-have-slot 1
1455 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1458 . if \n[doc-in-synopsis-section] \
1459 . doc-set-soft-space
1463 .\" NS En user macro
1464 .\" NS enclose arguments with quotation characters set up with `.Es'
1466 .als En doc-enclose-string
1469 .\" NS Ao user macro
1473 .\" NS doc-macro-name
1474 .\" NS doc-quote-left
1476 .\" NS width register `Ao' set in doc-common
1479 . if !\n[doc-arg-limit] \
1480 . ds doc-macro-name Ao
1482 . ds doc-quote-left \[la]
1484 . doc-enclose-open \$@
1488 .\" NS Ac user macro
1492 .\" NS doc-macro-name
1493 .\" NS doc-quote-right
1495 .\" NS width register `Ac' set in doc-common
1498 . if !\n[doc-arg-limit] \
1499 . ds doc-macro-name Ac
1501 . ds doc-quote-right \[ra]
1503 . doc-enclose-close \$@
1507 .\" NS Bo user macro
1511 .\" NS doc-macro-name
1512 .\" NS doc-quote-left
1514 .\" NS width register `Bo' set in doc-common
1517 . if !\n[doc-arg-limit] \
1518 . ds doc-macro-name Bo
1520 . ds doc-quote-left "\*[doc-left-bracket]
1522 . doc-enclose-open \$@
1526 .\" NS Bc user macro
1527 .\" NS bracket close
1530 .\" NS doc-macro-name
1531 .\" NS doc-quote-right
1533 .\" NS width register `Bc' set in doc-common
1536 . if !\n[doc-arg-limit] \
1537 . ds doc-macro-name Bc
1539 . ds doc-quote-right "\*[doc-right-bracket]
1541 . doc-enclose-close \$@
1545 .\" NS Bro user macro
1549 .\" NS doc-macro-name
1550 .\" NS doc-quote-left
1552 .\" NS width register `Bro' set in doc-common
1555 . if !\n[doc-arg-limit] \
1556 . ds doc-macro-name Bo
1558 . ds doc-quote-left {
1560 . doc-enclose-open \$@
1564 .\" NS Brc user macro
1568 .\" NS doc-macro-name
1569 .\" NS doc-quote-right
1571 .\" NS width register `Brc' set in doc-common
1574 . if !\n[doc-arg-limit] \
1575 . ds doc-macro-name Bc
1577 . ds doc-quote-right }
1579 . doc-enclose-close \$@
1583 .\" NS Do user macro
1584 .\" NS double quote open
1587 .\" NS doc-macro-name
1588 .\" NS doc-quote-left
1590 .\" NS width register `Do' set in doc-common
1593 . if !\n[doc-arg-limit] \
1594 . ds doc-macro-name Do
1596 . ds doc-quote-left "\*[Lq]
1598 . doc-enclose-open \$@
1602 .\" NS Dc user macro
1603 .\" NS double quote close
1606 .\" NS doc-macro-name
1607 .\" NS doc-quote-right
1609 .\" NS width register `Dc' set in doc-common
1612 . if !\n[doc-arg-limit] \
1613 . ds doc-macro-name Dc
1615 . ds doc-quote-right "\*[Rq]
1617 . doc-enclose-close \$@
1621 .\" NS Eo user macro
1622 .\" NS enclose open (using first argument as beginning of enclosure)
1625 .\" NS doc-macro-name
1626 .\" NS doc-quote-left
1628 .\" NS width register `Eo' set in doc-common
1631 . if !\n[doc-arg-limit] \
1632 . ds doc-macro-name Eo
1634 . ds doc-quote-left "\$1
1637 . doc-enclose-open \$@
1641 .\" NS Ec user macro
1642 .\" NS enclose close (using first argument as end of enclosure)
1645 .\" NS doc-macro-name
1646 .\" NS doc-quote-right
1648 .\" NS width register `Ec' set in doc-common
1651 . if !\n[doc-arg-limit] \
1652 . ds doc-macro-name Ec
1654 . ds doc-quote-right "\$1
1657 . doc-enclose-close \$@
1661 .\" NS Oo user macro
1665 .\" NS doc-macro-name
1666 .\" NS doc-quote-left
1668 .\" NS width register `Oo' set in doc-common
1671 . if !\n[doc-arg-limit] \
1672 . ds doc-macro-name Oo
1674 . ds doc-quote-left [
1676 . doc-enclose-open \$@
1680 .\" NS Oc user macro
1684 .\" NS doc-macro-name
1685 .\" NS doc-quote-right
1687 .\" NS width register `Oc' set in doc-common
1690 . if !\n[doc-arg-limit] \
1691 . ds doc-macro-name Oc
1693 . ds doc-quote-right ]
1695 . doc-enclose-close \$@
1699 .\" NS Po user macro
1700 .\" NS parenthesis open
1703 .\" NS doc-macro-name
1704 .\" NS doc-quote-left
1706 .\" NS width register `Po' set in doc-common
1709 . if !\n[doc-arg-limit] \
1710 . ds doc-macro-name Po
1712 . ds doc-quote-left "\*[doc-left-parenthesis]
1714 . doc-enclose-open \$@
1718 .\" NS Pc user macro
1719 .\" NS parenthesis close
1722 .\" NS doc-macro-name
1723 .\" NS doc-quote-right
1725 .\" NS width register `Pc' set in doc-common
1728 . if !\n[doc-arg-limit] \
1729 . ds doc-macro-name Pc
1731 . ds doc-quote-right "\*[doc-right-parenthesis]
1733 . doc-enclose-close \$@
1737 .\" NS Qo user macro
1738 .\" NS straight double quote open
1741 .\" NS doc-macro-name
1742 .\" NS doc-quote-left
1744 .\" NS width register `Qo' set in doc-common
1747 . if !\n[doc-arg-limit] \
1748 . ds doc-macro-name Qo
1750 . ds doc-quote-left "\*[q]
1752 . doc-enclose-open \$@
1756 .\" NS Qc user macro
1757 .\" NS straight double quote close
1760 .\" NS doc-macro-name
1761 .\" NS doc-quote-right
1763 .\" NS width register `Qc' set in doc-common
1766 . if !\n[doc-arg-limit] \
1767 . ds doc-macro-name Qc
1769 . ds doc-quote-right "\*[q]
1771 . doc-enclose-close \$@
1775 .\" NS So user macro
1776 .\" NS single quote open
1779 .\" NS doc-macro-name
1780 .\" NS doc-quote-left
1782 .\" NS width register `So' set in doc-common
1785 . if !\n[doc-arg-limit] \
1786 . ds doc-macro-name So
1788 . ds doc-quote-left "\*[doc-left-singlequote]
1790 . doc-enclose-open \$@
1794 .\" NS Sc user macro
1795 .\" NS single quote close
1798 .\" NS doc-macro-name
1799 .\" NS doc-quote-right
1801 .\" NS width register `Sc' set in doc-common
1804 . if !\n[doc-arg-limit] \
1805 . ds doc-macro-name Sc
1807 . ds doc-quote-right "\*[doc-right-singlequote]
1809 . doc-enclose-close \$@
1813 .\" NS Xo user macro
1817 .\" NS doc-macro-name
1818 .\" NS doc-quote-left
1820 .\" NS width register `Xo' set in doc-common
1823 . if !\n[doc-arg-limit] \
1824 . ds doc-macro-name Xo
1828 . doc-enclose-open \$@
1832 .\" NS Xc user macro
1836 .\" NS doc-macro-name
1837 .\" NS doc-quote-right
1839 .\" NS width register `Xc' set in doc-common
1842 . if !\n[doc-arg-limit] \
1843 . ds doc-macro-name Xc
1845 . ds doc-quote-right
1847 . doc-enclose-close \$@
1851 .\" NS doc-nesting-level global register
1852 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1854 .nr doc-nesting-level 0
1857 .\" NS doc-in-list global register (bool)
1858 .\" NS whether we are in (logical) .It
1863 .\" NS doc-enclose-open macro
1864 .\" NS enclose string open
1868 .\" NS doc-nesting-level
1870 .de doc-enclose-open
1871 . if !\n[doc-arg-limit] \
1872 . doc-parse-args \$@
1875 . doc-print-prefixes
1878 . nop \)\*[doc-quote-left]\)\c
1880 . \" start enclosure box
1881 . box doc-enclosure-box\n[doc-nesting-level]
1882 . ev doc-enclosure-env\n[doc-nesting-level]
1886 . \" we insert something to make .chop always work
1889 . \" increase nesting level *after* parsing of arguments
1890 . nr doc-nesting-level +1
1892 . if \n[doc-arg-limit] \{\
1894 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1895 . doc-print-recursive
1902 .\" NS doc-enclose-close macro
1903 .\" NS enclose string close
1906 .\" NS doc-nesting-level
1908 .de doc-enclose-close
1909 . nr doc-nesting-level -1
1911 . \" finish enclosure box
1915 . chop doc-enclosure-box\n[doc-nesting-level]
1916 . unformat doc-enclosure-box\n[doc-nesting-level]
1919 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1920 . nop \)\*[doc-quote-right]\)\c
1922 . if !\n[doc-arg-limit] \{\
1923 . doc-parse-args \$@
1926 . doc-print-and-reset
1929 . if \n[doc-arg-limit] \{\
1930 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1931 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1933 . doc-print-recursive
1936 . doc-print-and-reset
1939 . \" shall we finish .It request?
1940 . if !"\*[doc-macro-name]"It" \
1941 . if \n[doc-in-list] \
1942 . if !\n[doc-nesting-level] \
1943 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
1947 .\" NS Pf user macro
1948 .\" NS prefix: `.Pf prefix arg ...'
1952 .\" NS doc-macro-name
1953 .\" NS doc-quote-left
1955 .\" NS width register `Pf' set in doc-common
1958 . if !\n[doc-arg-limit] \
1959 . ds doc-macro-name Pf
1961 . ie \n[doc-arg-limit] \{\
1962 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
1964 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
1967 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
1973 . doc-parse-args \$@
1975 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
1979 . if \n[doc-arg-limit] \{\
1981 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
1982 . doc-print-and-reset
1984 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1989 .\" NS Ns user macro
1990 .\" NS remove space (space removal done by `doc-parse-args')
1994 .\" NS doc-macro-name
1996 .\" NS width register `Ns' set in doc-common
1999 . if !\n[doc-arg-limit] \{\
2001 . ds doc-macro-name Ns
2002 . doc-parse-args \$@
2005 . tm Usage: .Ns must be called with arguments (#\n[.c])
2008 . if \n[doc-arg-limit] \{\
2010 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2011 . doc-print-recursive
2018 .\" NS Ap user macro
2019 .\" NS append an apostrophe
2021 .\" NS width register `Ap' set in doc-common
2024 . ie !\n[doc-arg-limit] \
2025 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2029 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2030 . doc-print-recursive
2037 .\" NS doc-space global string
2038 .\" NS current inter-argument space
2040 .ds doc-space "\*[doc-soft-space]
2043 .\" NS doc-soft-space constant string
2044 .\" NS soft (stretchable) space (defined in doc-common)
2047 .\" NS doc-hard-space constant string
2048 .\" NS hard (unpaddable) space (defined in doc-common)
2051 .\" NS doc-set-hard-space macro
2052 .\" NS set current space string to hard (unpaddable) space.
2055 .\" NS doc-saved-space
2058 .de doc-set-hard-space
2059 . ie "\*[doc-space]"" \
2060 . ds doc-saved-space "\*[doc-hard-space]
2062 . ds doc-space "\*[doc-hard-space]
2066 .\" NS doc-set-soft-space macro
2067 .\" NS set current space string to soft space
2070 .\" NS doc-saved-space
2073 .de doc-set-soft-space
2074 . ie "\*[doc-space]"" \
2075 . ds doc-saved-space "\*[doc-soft-space]
2077 . ds doc-space "\*[doc-soft-space]
2081 .\" NS doc-space-mode global register (bool)
2082 .\" NS default is one (space mode on)
2084 .nr doc-space-mode 1
2087 .\" NS doc-saved-space global string
2088 .\" NS saved value of `doc-space'
2090 .ds doc-saved-space "\*[doc-space]
2093 .\" NS doc-have-space global register (bool)
2094 .\" NS set if last command was horizontal space
2096 .nr doc-have-space 0
2099 .\" NS Sm user macro
2100 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2102 .\" NS without argument, toggle space mode
2105 .\" NS doc-arg-limit
2108 .\" NS doc-macro-name
2110 .\" NS doc-saved-space
2112 .\" NS doc-space-mode
2115 .\" NS local variables:
2118 .\" NS width register `Sm' set in doc-common
2121 . ie \n[doc-have-space] \
2126 . if !\n[doc-arg-limit] \{\
2128 . ds doc-macro-name Sm
2129 . doc-parse-args \$@
2132 . ie \n[doc-space-mode] \
2133 . nr doc-space-mode 0
2135 . nr doc-space-mode 1
2138 . if !\n[doc-arg-limit] \
2143 . \" avoid a warning message in case `Sm' is the last parameter
2144 . if !d doc-arg\n[doc-arg-ptr] \
2145 . ds doc-arg\n[doc-arg-ptr]
2147 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2148 . ds doc-space "\*[doc-saved-space]
2149 . nr doc-space-mode 1
2152 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2153 . ds doc-saved-space "\*[doc-space]
2155 . nr doc-space-mode 0
2158 . \" no argument for Sm
2160 . ie \n[doc-space-mode] \
2161 . nr doc-space-mode 0
2163 . nr doc-space-mode 1
2166 . ie \n[doc-space-mode] \{\
2167 . \" recompute space vector for remaining arguments
2168 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2169 . nr doc-arg-limit \n[doc-arg-ptr]
2170 . if \n[doc-num-args] \
2171 . doc-parse-space-vector
2173 . \" finish line only if it is interrupted and `doc-have-space'
2175 . if \n[doc-reg-Sm] \
2180 . \" reset remaining space vector elements
2181 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2182 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2183 . ds doc-space\n[doc-reg-Sm]
2185 . \" the body of a `while' request must end with the fitting `\}'!
2189 . \" do we have parameters to print?
2190 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2191 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2192 . ie (\n[doc-arg-ptr] > 1) \
2193 . doc-print-and-reset
2198 . \" skip `Sm' argument
2200 . doc-print-recursive
2205 .\" NS doc-arg-type immediate register
2206 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2207 .\" NS punctuation prefix=4)
2212 .\" NS doc-get-arg-type macro
2213 .\" NS get argument type
2215 .\" NS this macro expects the width of the argument in `doc-width'
2220 .de doc-get-arg-type
2223 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2224 . ie (\n[doc-width] == 1) \{\
2225 . if r doc-punct\$1 \
2226 . nr doc-arg-type \n[doc-punct\$1]
2236 .\" NS doc-get-arg-type* macro
2237 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2239 .\" NS this macro sets the `doc-width' register using the `length' request
2240 .\" NS to get the number of characters in a string literally
2246 .de doc-get-arg-type*
2248 . length doc-width "\*[doc-arg\$1]
2250 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2251 . ie (\n[doc-width] == 1) \{\
2252 . if r doc-punct\*[doc-arg\$1] \
2253 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2256 . if r \*[doc-arg\$1] \
2257 . if d \*[doc-arg\$1] \
2263 .\" NS doc-set-spacing-1 macro
2264 .\" NS set spacing for macros
2269 .\" NS local variables:
2270 .\" NS doc-reg-dssfm
2271 .\" NS doc-reg-dssfm1
2273 .de doc-set-spacing-1
2274 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2276 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2278 . ie (\n[doc-reg-dssfm1] == 3) \{\
2279 . if \n[doc-arg-limit] \{\
2280 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2281 . ds doc-space\n[doc-reg-dssfm]
2283 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2286 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2288 . ie (\n[doc-reg-dssfm1] == 2) \{\
2289 . if \n[doc-arg-limit] \{\
2290 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2291 . ds doc-space\n[doc-reg-dssfm]
2293 . ds doc-space\n[doc-arg-limit]
2296 . ds doc-space\n[doc-arg-limit]
2301 .\" NS doc-set-spacing-2 macro
2302 .\" NS set spacing for strings
2307 .de doc-set-spacing-2
2308 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2312 .\" NS doc-set-spacing-3 macro
2313 .\" NS set spacing for punctuation suffixes
2318 .\" NS local variables:
2319 .\" NS doc-reg-dssfps
2321 .de doc-set-spacing-3
2322 . if \n[doc-arg-limit] \{\
2323 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2324 . ds doc-space\n[doc-reg-dssfps]
2327 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2331 .\" NS doc-set-spacing-4 macro
2332 .\" NS set spacing for punctuation prefixes
2337 .de doc-set-spacing-4
2338 . ds doc-space\n[doc-arg-limit]
2342 .\" type switches (on current argument doc-arg-ptr)
2345 .\" NS doc-do-1 macro
2346 .\" NS call request if macro
2349 . \*[doc-arg\n[doc-arg-ptr]]
2353 .\" NS doc-do-2 macro
2354 .\" NS call .doc-print-recursive if string
2356 .als doc-do-2 doc-print-recursive
2359 .\" NS doc-do-3 macro
2360 .\" NS call .doc-print-recursive if punctuation suffix
2362 .als doc-do-3 doc-print-recursive
2365 .\" NS doc-do-4 macro
2366 .\" NS call .doc-print-recursive if punctuation prefix
2368 .als doc-do-4 doc-print-recursive
2371 .\" NS doc-fontmode-depth global register
2372 .\" NS font mode level
2374 .nr doc-fontmode-depth 0
2377 .\" NS doc-fontmode-font-stackXXX global register
2378 .\" NS stack of saved current font values from `Bf' request
2381 .\" NS doc-fontmode-depth
2383 .nr doc-fontmode-font-stack0 0
2386 .\" NS doc-fontmode-size-stackXXX global register
2387 .\" NS stack of saved current size values from `Bf' request
2390 .\" NS doc-fontmode-depth
2392 .nr doc-fontmode-size-stack0 0
2395 .\" NS Bf user macro
2396 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2399 .\" NS doc-fontmode-depth
2400 .\" NS doc-fontmode-font-stackXXX
2401 .\" NS doc-fontmode-size-stackXXX
2402 .\" NS doc-macro-name
2404 .\" NS width register `Bf' set in doc-common
2407 . ds doc-macro-name Bf
2410 . nr doc-fontmode-depth +1
2412 . \" save current font and size
2413 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2414 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2417 . nop \*[doc-Em-font]\c
2418 . el \{ .ie "\$1"Li" \
2419 . nop \*[doc-Li-font]\c
2420 . el \{ .ie "\$1"Sy" \
2421 . nop \*[doc-Sy-font]\c
2422 . el \{ .ie "\$1"-emphasis" \
2423 . nop \*[doc-Em-font]\c
2424 . el \{ .ie "\$1"-literal" \
2425 . nop \*[doc-Li-font]\c
2426 . el \{ .ie "\$1"-symbolic" \
2427 . nop \*[doc-Sy-font]\c
2429 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2433 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2437 .\" NS Ef user macro
2438 .\" NS end font mode
2441 .\" NS doc-macro-name
2443 .\" NS width register `Ef' set in doc-common
2446 . ds doc-macro-name Ef
2448 . ie \n[doc-fontmode-depth] \{\
2449 . \" restore saved font and size
2450 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2451 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2453 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2454 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2455 . nr doc-fontmode-depth -1
2458 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2462 .\" NS doc-keep-type global register
2463 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2468 .\" NS Bk user macro
2472 .\" NS doc-keep-type
2473 .\" NS doc-macro-name
2475 .\" NS width register `Bk' set in doc-common
2478 . ds doc-macro-name Bk
2480 . if \n[doc-keep-type] \
2481 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2483 . ie "\$1"-lines" \{\
2484 . nr doc-keep-type 2
2485 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2487 . el \{ .ie "\$1"-words" \{\
2488 . nr doc-keep-type 1
2489 . doc-set-hard-space
2491 . el \{ .ie "\$1"" \{\
2493 . nr doc-keep-type 1
2494 . doc-set-hard-space
2497 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2498 . nr doc-keep-type 3
2501 \#. nr doc-nesting-level +1
2505 .\" NS Ek user macro
2509 .\" NS doc-keep-type
2510 .\" NS doc-macro-name
2512 .\" NS width register `Ek' set in doc-common
2515 . ds doc-macro-name Ek
2517 \#. nr doc-nesting-level -1
2520 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2522 . if !\n[doc-keep-type] \
2523 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2525 . ie (\n[doc-keep-type] == 1) \
2526 . doc-set-soft-space
2527 . el \{ .if (\n[doc-keep-type] == 2) \
2528 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2531 . nr doc-keep-type 0
2533 \#. if !"\*[doc-out-string]"" \
2534 \#. doc-print-out-string
2538 .\" NS doc-display-depth global register
2539 .\" NS display level
2541 .nr doc-display-depth 0
2544 .\" NS doc-is-compact global register (bool)
2545 .\" NS set if the `compact' keyword is given
2547 .nr doc-is-compact 0
2550 .\" NS doc-display-type-stackXXX global string
2551 .\" NS the display type stack
2554 .\" NS doc-display-depth
2556 .ds doc-display-type-stack0
2559 .\" NS doc-display-indent-stackXXX global register
2560 .\" NS stack of display indentation values
2563 .\" NS doc-display-depth
2565 .nr doc-display-indent-stack0 0
2568 .\" NS doc-display-ad-stackXXX global register
2569 .\" NS stack of saved adjustment modes
2572 .\" NS doc-display-depth
2574 .nr doc-display-ad-stack0 0
2577 .\" NS doc-display-fi-stackXXX global register
2578 .\" NS stack of saved fill modes
2581 .\" NS doc-display-depth
2583 .nr doc-display-fi-stack0 0
2586 .\" NS Bd user macro
2587 .\" NS begin display
2589 .\" NS width register `Bd' set in doc-common
2592 .\" NS doc-curr-font
2593 .\" NS doc-curr-size
2594 .\" NS doc-display-depth
2595 .\" NS doc-display-ad-stackXXX
2596 .\" NS doc-display-fi-stackXXX
2597 .\" NS doc-display-file
2598 .\" NS doc-display-indent-stackXXX
2599 .\" NS doc-display-type-stackXXX
2600 .\" NS doc-is-compact
2601 .\" NS doc-macro-name
2603 .\" NS local variables:
2607 . ds doc-macro-name Bd
2610 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2611 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2615 . nr doc-is-compact 0
2616 . ds doc-display-file
2618 . nr doc-display-depth +1
2620 . \" save current adjustment and fill modes
2621 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2622 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2624 . ie "\$1"-literal" \{\
2625 . ds doc-display-type-stack\n[doc-display-depth] literal
2626 . nr doc-curr-font \n[.f]
2627 . nr doc-curr-size \n[.ps]
2630 . nop \*[doc-Li-font]\c
2637 . el \{ .ie "\$1"-filled" \{\
2638 . ds doc-display-type-stack\n[doc-display-depth] filled
2642 . el \{ .ie "\$1"-ragged" \{\
2643 . ds doc-display-type-stack\n[doc-display-depth] ragged
2647 . el \{ .ie "\$1"-centered" \{\
2648 . ds doc-display-type-stack\n[doc-display-depth] centered
2652 . el \{ .ie "\$1"-unfilled" \{\
2653 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2657 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2658 . tm1 " in .Bd request (#\n[.c])
2662 . \" have we seen an argument?
2663 . if \n[doc-reg-Bd] \{\
2665 . \" check other arguments
2667 . doc-do-Bd-args \$@
2670 . \" avoid warning about non-existent register
2671 . if !r doc-display-indent-stack\n[doc-display-depth] \
2672 . nr doc-display-indent-stack\n[doc-display-depth] 0
2674 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2675 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2677 . if !\n[doc-is-compact] \{\
2678 . if !\n[doc-in-synopsis-section] \{\
2679 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2680 . sp \n[doc-display-vertical]u
2682 ' sp \n[doc-display-vertical]u
2688 . if !"\*[doc-display-file]"" \
2689 . so \*[doc-display-file]
2691 . nr doc-is-compact 0
2692 . ds doc-display-file
2696 .\" NS doc-do-Bd-args macro
2697 .\" NS resolve remaining .Bd arguments
2700 .\" NS doc-display-file
2701 .\" NS doc-display-indent-stackXXX
2702 .\" NS doc-is-compact
2704 .\" NS local variables:
2706 .\" NS doc-reg-ddBa1
2707 .\" NS doc-reg-ddBa2
2708 .\" NS doc-reg-ddBa3
2709 .\" NS doc-reg-ddBa4
2715 . ie "\$1"-offset" \{\
2719 . nr doc-display-indent-stack\n[doc-display-depth] 0
2720 . el \{ .ie "\$2"right" \
2721 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2722 . el \{ .ie "\$2"center" \
2723 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2724 . el \{ .ie "\$2"indent" \
2725 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2726 . el \{ .ie "\$2"indent-two" \
2727 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2732 . \" not a known keyword
2733 . if (\n[doc-reg-ddBa] == 1) \{\
2736 . nr doc-reg-ddBa1 0
2737 . if \B
\a(\$2)
\a \{\
2738 . \" disable warnings related to scaling indicators (32)
2739 . nr doc-reg-ddBa2 \n[.warn]
2740 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2742 . \" values without a scaling indicator are taken as strings;
2743 . \" we test whether the parameter string with and without the last
2744 . \" character yields identical numerical results (ignoring the
2745 . \" scaling indicator)
2746 . ds doc-str-ddBa "\$2
2747 . substring doc-str-ddBa 1 -1
2748 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2749 . nr doc-reg-ddBa3 (;(\$2))
2750 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2751 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2752 . nr doc-reg-ddBa1 1
2755 . \" enable all warnings again
2756 . warn \n[doc-reg-ddBa2]
2759 . ie \n[doc-reg-ddBa1] \
2760 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2762 . doc-get-width "\$2"
2763 . ie (\n[doc-width] <= 3) \{\
2764 . \" if the offset parameter is a macro, use the macro's
2765 . \" width as specified in doc-common
2766 . doc-get-arg-type "\$2"
2767 . ie (\n[doc-arg-type] == 1) \
2768 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2770 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2773 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2776 . el \{ .ie "\$1"-compact" \
2777 . nr doc-is-compact 1
2778 . el \{ .ie "\$1"-file" \{\
2780 . ds doc-display-file "\$2
2784 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2787 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2790 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2791 . shift \n[doc-reg-ddBa]
2792 . doc-do-Bd-args \$@
2797 .\" NS Ed user macro
2801 .\" NS doc-display-depth
2802 .\" NS doc-display-indent-stackXXX
2803 .\" NS doc-display-type-stackXXX
2804 .\" NS doc-macro-name
2806 .\" NS width register `Ed' set in doc-common
2809 . ds doc-macro-name Ed
2813 . if !\n[doc-display-depth] \{\
2814 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2815 . nr doc-display-depth 1
2818 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2819 . ft \n[doc-curr-font]
2820 . ps \n[doc-curr-size]u
2823 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2825 . \" restore saved adjustment and fill modes
2826 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2830 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2832 . nr doc-display-indent-stack\n[doc-display-depth] 0
2833 . ds doc-display-type-stack\n[doc-display-depth]
2834 . nr doc-display-depth -1
2838 .\" NS doc-list-type-stackXXX global string
2839 .\" NS stack of list types
2842 .\" NS doc-list-depth
2844 .ds doc-list-type-stack1
2847 .\" NS doc-list-indent-stackXXX global register
2848 .\" NS stack of list indentation values
2851 .\" NS doc-list-depth
2853 .nr doc-list-indent-stack1 0
2856 .\" NS doc-list-have-indent-stackXXX global register (bool)
2857 .\" NS an indentation value is active
2860 .\" NS doc-list-depth
2862 .nr doc-list-have-indent-stack1 0
2865 .\" NS Bl user macro
2868 .\" NS width register `Bl' set in doc-common
2873 .\" NS doc-list-depth
2874 .\" NS doc-list-have-indent-stackXXX
2875 .\" NS doc-list-indent-stackXXX
2876 .\" NS doc-list-type-stackXXX
2877 .\" NS doc-macro-name
2879 .\" NS doc-num-columns
2881 .\" NS local variables:
2890 . ds doc-macro-name Bl
2891 . nr doc-list-depth +1
2894 . ie "\$1"-hang" \{\
2895 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2896 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2897 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2899 . el \{ .ie "\$1"-tag" \{\
2900 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2901 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2903 . el \{ .ie "\$1"-item" \{\
2904 . ds doc-list-type-stack\n[doc-list-depth] item-list
2905 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2907 . el \{ .ie "\$1"-enum" \{\
2908 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2909 . nr doc-list-indent-stack\n[doc-list-depth] 3n
2910 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2912 . el \{ .ie "\$1"-bullet" \{\
2913 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
2914 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2915 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2917 . el \{ .ie "\$1"-dash" \{\
2918 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2919 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2920 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2922 . el \{ .ie "\$1"-hyphen" \{\
2923 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2924 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2925 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2927 . el \{ .ie "\$1"-inset" \{\
2928 . ds doc-list-type-stack\n[doc-list-depth] inset-list
2929 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2931 . el \{ .ie "\$1"-diag" \{\
2932 . ds doc-list-type-stack\n[doc-list-depth] diag-list
2934 . el \{ .ie "\$1"-ohang" \{\
2935 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
2936 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2938 . el \{ .ie "\$1"-column" \{\
2939 . ds doc-list-type-stack\n[doc-list-depth] column-list
2943 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
2944 . tm1 " in .Bl request
2947 . \}\}\}\}\}\}\}\}\}\}\}
2949 . \" we have seen a list type
2950 . if !\n[doc-arg-ptr] \{\
2953 . nr doc-list-depth -1
2959 . \" fill argument vector
2961 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
2962 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
2966 . doc-increment-list-stack
2969 . nr doc-arg-limit \n[.$]
2973 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
2975 . \" initialize column list
2976 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
2977 . doc-set-column-tab \n[doc-num-columns]
2978 ' in -\n[doc-column-indent-width]u
2979 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
2980 . sp \n[doc-display-vertical]u
2983 . nr doc-num-columns 0
2990 .\" NS doc-Bl-usage macro
2993 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
2994 . tm1 " [-width <string>] [-xwidth <command>]
2995 . tm1 " [-offset <string>] [-compact]
2996 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
2997 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
2998 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3002 .\" NS doc-do-Bl-args macro
3003 .\" NS resolve remaining .Bl arguments
3008 .\" NS doc-compact-list-stackXXX
3009 .\" NS doc-list-indent-stackXXX
3010 .\" NS doc-list-offset-stackXXX
3011 .\" NS doc-num-columns
3012 .\" NS doc-tag-prefix-stackXXX
3013 .\" NS doc-tag-width-stackXXX
3015 .\" NS local variables:
3019 .\" NS doc-reg-dBla1
3020 .\" NS doc-reg-dBla2
3021 .\" NS doc-reg-dBla3
3022 .\" NS doc-reg-dBla4
3024 .\" NS doc-str-dBla1
3029 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3032 . \" avoid a warning message in case e.g. `-offset' has no parameter
3033 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3034 . if !d doc-arg\n[doc-reg-dBla] \
3035 . ds doc-arg\n[doc-reg-dBla]
3039 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3040 . nr doc-compact-list-stack\n[doc-list-depth] 1
3042 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3043 . ie (\n[doc-list-depth] > 1) \{\
3044 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3045 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3046 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3047 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3048 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3051 . tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
3054 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3056 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3057 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3059 . \" test whether argument is a valid numeric expression
3060 . nr doc-reg-dBla1 0
3061 . if \B
\a(\*[doc-str-dBla])
\a \{\
3062 . \" disable warnings related to scaling indicators (32)
3063 . nr doc-reg-dBla2 \n[.warn]
3064 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3066 . \" values without a scaling indicator are taken as strings;
3067 . \" we test whether the parameter string with and without the last
3068 . \" character yields identical numerical results (ignoring the
3069 . \" scaling indicator)
3070 . ds doc-str-dBla1 "\*[doc-str-dBla]
3071 . substring doc-str-dBla1 1 -1
3072 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3073 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3074 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3075 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3076 . nr doc-reg-dBla1 1
3079 . \" enable all warnings again
3080 . warn \n[doc-reg-dBla2]
3083 . ie \n[doc-reg-dBla1] \
3084 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3086 . doc-get-arg-width \n[doc-arg-ptr]
3087 . ie (\n[doc-width] == 2) \{\
3088 . \" if the width parameter is a macro, use the macro's
3089 . \" width as specified in doc-common
3090 . doc-get-arg-type \*[doc-str-dBla]
3091 . ie (\n[doc-arg-type] == 1) \
3092 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3094 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3097 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3100 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3102 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3104 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3105 . substring doc-str-dBla 1 2
3106 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3107 . \" execute string in a box to get the width of the diversion
3108 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3109 . doc-save-global-vars
3116 . nop \*[doc-str-dBla]
3120 . doc-restore-global-vars
3121 . doc-get-width \h'\n[dl]u'
3123 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3126 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3129 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3130 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3132 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3133 . nr doc-reg-dBla1 0
3134 . if \B
\a(\*[doc-str-dBla])
\a \{\
3135 . nr doc-reg-dBla2 \n[.warn]
3136 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3138 . ds doc-str-dBla1 "\*[doc-str-dBla]
3139 . substring doc-str-dBla1 1 -1
3140 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3141 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3142 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3143 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3144 . nr doc-reg-dBla1 1
3147 . warn \n[doc-reg-dBla2]
3150 . ie \n[doc-reg-dBla1] \
3151 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3153 . doc-get-arg-width \n[doc-arg-ptr]
3154 . ie (\n[doc-width] <= 3) \{\
3155 . \" if the offset parameter is a macro, use the macro's
3156 . \" width as specified in doc-common
3157 . doc-get-arg-type \*[doc-str-dBla]
3158 . ie (\n[doc-arg-type] == 1) \
3159 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3161 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3164 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3170 . \" not a known keyword, so it specifies the width of the next column
3171 . \" (if it is a column list)
3172 . if !\n[doc-reg-dBla] \{\
3173 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3174 . nr doc-num-columns +1
3175 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3178 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3179 . tm1 " in .Bl request (#\n[.c])
3182 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3187 .\" NS doc-save-global-vars macro
3188 .\" NS save all global variables
3190 .\" NS local variables:
3193 .de doc-save-global-vars
3194 . ds doc-macro-name-saved "\*[doc-macro-name]
3195 . nr doc-arg-limit-saved \n[doc-arg-limit]
3196 . nr doc-num-args-saved \n[doc-num-args]
3197 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3200 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3201 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3202 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3203 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3204 . nr doc-reg-dsgv +1
3207 . nr doc-curr-font-saved \n[doc-curr-font]
3208 . nr doc-curr-size-saved \n[doc-curr-size]
3209 . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3210 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3211 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3212 . nr doc-have-decl-saved \n[doc-have-decl]
3213 . nr doc-have-var-saved \n[doc-have-var]
3214 . ds doc-command-name-saved "\*[doc-command-name]
3215 . ds doc-quote-left-saved "\*[doc-quote-left]
3216 . ds doc-quote-right-saved "\*[doc-quote-right]
3217 . nr doc-nesting-level-saved \n[doc-nesting-level]
3218 . nr doc-in-list-saved \n[doc-in-list]
3219 . ds doc-space-saved "\*[doc-space]
3220 . ds doc-saved-space-saved "\*[doc-saved-space]
3221 . nr doc-space-mode-saved \n[doc-space-mode]
3222 . nr doc-have-space-saved \n[doc-have-space]
3223 . nr doc-have-slot-saved \n[doc-have-slot]
3224 . nr doc-keep-type-saved \n[doc-keep-type]
3225 . nr doc-display-depth-saved \n[doc-display-depth]
3226 . nr doc-is-compact-saved \n[doc-is-compact]
3229 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3230 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3231 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3232 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3233 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3234 . nr doc-reg-dsgv +1
3237 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3240 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3241 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3242 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3243 . nr doc-reg-dsgv +1
3246 . nr doc-list-depth-saved \n[doc-list-depth]
3249 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3250 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3251 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3252 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3253 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3254 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3255 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3256 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3257 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3258 . nr doc-reg-dsgv +1
3261 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3262 . nr doc-curr-type-saved \n[doc-curr-type]
3263 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3264 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3265 . nr doc-num-columns-saved \n[doc-num-columns]
3266 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3267 . nr doc-is-func-saved \n[doc-is-func]
3268 . nr doc-have-old-func-saved \n[doc-have-old-func]
3269 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3270 . ds doc-func-arg-saved "\*[doc-func-arg]
3271 . nr doc-num-func-args-saved \n[doc-num-func-args]
3272 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3273 . nr doc-have-func-saved \n[doc-have-func]
3274 . nr doc-is-reference-saved \n[doc-is-reference]
3275 . nr doc-reference-count-saved \n[doc-reference-count]
3276 . nr doc-author-count-saved \n[doc-author-count]
3279 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3280 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3281 . nr doc-reg-dsgv +1
3284 . nr doc-book-count-saved \n[doc-book-count]
3285 . ds doc-book-name-saved "\*[doc-book-name]
3286 . nr doc-date-count-saved \n[doc-date-count]
3287 . ds doc-date-saved "\*[doc-date]
3288 . nr doc-publisher-count-saved \n[doc-publisher-count]
3289 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3290 . nr doc-journal-count-saved \n[doc-journal-count]
3291 . ds doc-journal-name-saved "\*[doc-journal-name]
3292 . nr doc-issue-count-saved \n[doc-issue-count]
3293 . ds doc-issue-name-saved "\*[doc-issue-name]
3294 . nr doc-optional-count-saved \n[doc-optional-count]
3295 . ds doc-optional-string-saved "\*[doc-optional-string]
3296 . nr doc-page-number-count-saved \n[doc-page-number-count]
3297 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3298 . nr doc-corporate-count-saved \n[doc-corporate-count]
3299 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3300 . nr doc-report-count-saved \n[doc-report-count]
3301 . ds doc-report-name-saved "\*[doc-report-name]
3302 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3303 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3304 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3305 . nr doc-volume-count-saved \n[doc-volume-count]
3306 . ds doc-volume-name-saved "\*[doc-volume-name]
3307 . nr doc-have-author-saved \n[doc-have-author]
3309 . ds doc-document-title-saved "\*[doc-document-title]
3310 . ds doc-volume-saved "\*[doc-volume]
3311 . ds doc-section-saved "\*[doc-section]
3312 . ds doc-operating-system-saved "\*[doc-operating-system]
3313 . ds doc-date-string-saved "\*[doc-date-string]
3314 . nr doc-header-space-saved \n[doc-header-space]
3315 . nr doc-footer-space-saved \n[doc-footer-space]
3316 . nr doc-display-vertical-saved \n[doc-display-vertical]
3317 . ds doc-header-string-saved "\*[doc-header-string]
3318 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3319 . nr doc-in-files-section-saved \n[doc-in-files-section]
3320 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3324 .\" NS doc-restore-global-vars macro
3325 .\" NS restore all global variables
3327 .\" NS local variables:
3330 .de doc-restore-global-vars
3331 . ds doc-macro-name "\*[doc-macro-name-saved]
3332 . nr doc-arg-limit \n[doc-arg-limit-saved]
3333 . nr doc-num-args \n[doc-num-args-saved]
3334 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3337 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3338 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3339 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3340 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3341 . nr doc-reg-drgv +1
3344 . nr doc-curr-font \n[doc-curr-font-saved]
3345 . nr doc-curr-size \n[doc-curr-size-saved]
3346 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3347 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3348 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3349 . nr doc-have-decl \n[doc-have-decl-saved]
3350 . nr doc-have-var \n[doc-have-var-saved]
3351 . ds doc-command-name "\*[doc-command-name-saved]
3352 . ds doc-quote-left "\*[doc-quote-left-saved]
3353 . ds doc-quote-right "\*[doc-quote-right-saved]
3354 . nr doc-nesting-level \n[doc-nesting-level-saved]
3355 . nr doc-in-list \n[doc-in-list-saved]
3356 . ds doc-space "\*[doc-space-saved]
3357 . ds doc-saved-space "\*[doc-saved-space-saved]
3358 . nr doc-space-mode \n[doc-space-mode-saved]
3359 . nr doc-have-space \n[doc-have-space-saved]
3360 . nr doc-have-slot \n[doc-have-slot-saved]
3361 . nr doc-keep-type \n[doc-keep-type-saved]
3362 . nr doc-display-depth \n[doc-display-depth-saved]
3363 . nr doc-is-compact \n[doc-is-compact-saved]
3366 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3367 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3368 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3369 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3370 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3371 . nr doc-reg-drgv +1
3374 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3377 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3378 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3379 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3380 . nr doc-reg-drgv +1
3383 . nr doc-list-depth \n[doc-list-depth-saved]
3386 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3387 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3388 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3389 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3390 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3391 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3392 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3393 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3394 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3395 . nr doc-reg-drgv +1
3398 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3399 . nr doc-curr-type \n[doc-curr-type-saved]
3400 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3401 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3402 . nr doc-num-columns \n[doc-num-columns-saved]
3403 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3404 . nr doc-is-func \n[doc-is-func-saved]
3405 . nr doc-have-old-func \n[doc-have-old-func-saved]
3406 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3407 . ds doc-func-arg "\*[doc-func-arg-saved]
3408 . nr doc-num-func-args \n[doc-num-func-args-saved]
3409 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3410 . nr doc-have-func \n[doc-have-func-saved]
3411 . nr doc-is-reference \n[doc-is-reference-saved]
3412 . nr doc-reference-count \n[doc-reference-count-saved]
3413 . nr doc-author-count \n[doc-author-count-saved]
3416 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3417 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3418 . nr doc-reg-drgv +1
3421 . nr doc-book-count \n[doc-book-count-saved]
3422 . ds doc-book-name "\*[doc-book-name-saved]
3423 . nr doc-date-count \n[doc-date-count-saved]
3424 . ds doc-date "\*[doc-date-saved]
3425 . nr doc-publisher-count \n[doc-publisher-count-saved]
3426 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3427 . nr doc-journal-count \n[doc-journal-count-saved]
3428 . ds doc-journal-name "\*[doc-journal-name-saved]
3429 . nr doc-issue-count \n[doc-issue-count-saved]
3430 . ds doc-issue-name "\*[doc-issue-name-saved]
3431 . nr doc-optional-count \n[doc-optional-count-saved]
3432 . ds doc-optional-string "\*[doc-optional-string-saved]
3433 . nr doc-page-number-count \n[doc-page-number-count-saved]
3434 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3435 . nr doc-corporate-count \n[doc-corporate-count-saved]
3436 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3437 . nr doc-report-count \n[doc-report-count-saved]
3438 . ds doc-report-name "\*[doc-report-name-saved]
3439 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3440 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3441 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3442 . nr doc-volume-count \n[doc-volume-count-saved]
3443 . ds doc-volume-name "\*[doc-volume-name-saved]
3444 . nr doc-have-author \n[doc-have-author-saved]
3446 . ds doc-document-title "\*[doc-document-title-saved]
3447 . ds doc-volume "\*[doc-volume-saved]
3448 . ds doc-section "\*[doc-section-saved]
3449 . ds doc-operating-system "\*[doc-operating-system-saved]
3450 . ds doc-date-string "\*[doc-date-string-saved]
3451 . nr doc-header-space \n[doc-header-space-saved]
3452 . nr doc-footer-space \n[doc-footer-space-saved]
3453 . nr doc-display-vertical \n[doc-display-vertical-saved]
3454 . ds doc-header-string "\*[doc-header-string-saved]
3455 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3456 . nr doc-in-files-section \n[doc-in-files-section-saved]
3457 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3461 .\" NS El user macro
3465 .\" NS doc-list-depth
3466 .\" NS doc-macro-name
3468 .\" NS local variables:
3471 .\" NS width register `El' set in doc-common
3475 . tm Usage: .El (does not take arguments) (#\n[.c])
3479 . ds doc-macro-name El
3480 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3482 . ie "\*[doc-str-El]"diag-list" \
3484 . el \{ .ie "\*[doc-str-El]"column-list" \
3485 . doc-end-column-list
3486 . el \{ .ie "\*[doc-str-El]"item-list" \
3488 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3490 . el \{ .ie "\*[doc-str-El]"inset-list" \
3500 .\" NS doc-saved-Pa-font global string
3501 .\" NS saved doc-Pa-font string for section FILES (no underline if
3504 .ds doc-saved-Pa-font
3507 .\" NS doc-curr-type global register
3508 .\" NS current argument type
3513 .\" NS doc-curr-arg global string
3514 .\" NS current argument
3519 .\" NS doc-item-boxXXX global box
3520 .\" NS item boxes associated list depth
3523 .\" NS doc-list-depth
3526 .\" NS It user macro
3533 .\" NS doc-curr-type
3535 .\" NS doc-macro-name
3537 .\" NS doc-saved-Pa-font
3539 .\" NS local variables:
3542 .\" NS doc-XXX-list-type
3544 .\" NS width register `It' set in doc-common
3546 .nr doc-bullet-list-type 1
3547 .nr doc-column-list-type 0
3548 .nr doc-dash-list-type 1
3549 .nr doc-diag-list-type 0
3550 .nr doc-enum-list-type 1
3551 .nr doc-hang-list-type 2
3552 .nr doc-inset-list-type 2
3553 .nr doc-item-list-type 1
3554 .nr doc-ohang-list-type 2
3555 .nr doc-tag-list-type 2
3558 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3560 . if "\*[doc-str-It]"" \
3561 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3563 . if \n[doc-nesting-level] \{\
3564 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3573 . ds doc-macro-name It
3575 . \" fill argument vector
3577 . while (\n[doc-reg-It] <= \n[.$]) \{\
3578 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3582 . nr doc-num-args \n[.$]
3586 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3588 . if \n[doc-reg-It] \{\
3590 . box doc-item-box\n[doc-list-depth]
3591 . ev doc-item-env\n[doc-list-depth]
3597 . ie (\n[doc-reg-It] == 1) \{\
3599 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3600 . tm1 " don't take arguments (#\n[.c])
3604 . if (\n[doc-reg-It] == 2) \{\
3605 . \" handle list types with arguments
3606 . doc-parse-arg-vector
3610 . nr doc-curr-type \n[doc-type1]
3611 . ds doc-curr-arg "\*[doc-arg1]
3613 . if \n[doc-in-files-section] \{\
3614 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3616 . ds doc-Pa-font "\*[doc-No-font]
3619 . ie (\n[doc-type1] == 1) \
3623 . doc-print-recursive
3626 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3627 . tm1 " require arguments (#\n[.c])
3631 . \" the previous call of `.doc-print-recursive' can contain calls to
3632 . \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
3633 . if !\n[doc-nesting-level] \
3634 . doc-\*[doc-str-It]
3638 .\" NS doc-inset-list macro
3639 .\" NS .It item of list-type inset
3645 . \" finish item box
3649 . unformat doc-item-box\n[doc-list-depth]
3651 . doc-set-vertical-and-indent 0
3655 . doc-item-box\n[doc-list-depth]
3662 .\" NS doc-hang-list macro
3663 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3666 .\" NS doc-have-space
3669 .\" NS local variables:
3674 . \" finish item box
3678 . unformat doc-item-box\n[doc-list-depth]
3680 . doc-set-vertical-and-indent 1
3681 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3682 . ti -\n[doc-reg-dhl]u
3685 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3686 . doc-item-box\n[doc-list-depth]
3688 . chop doc-item-box\n[doc-list-depth]
3689 . nr doc-reg-dhl1 \n[.k]u
3690 . nop \*[doc-item-box\n[doc-list-depth]]\c
3691 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3692 . nr doc-have-space 1
3700 .\" NS doc-ohang-list macro
3701 .\" NS .It item of list-type overhanging tag
3707 . \" finish item box
3711 . unformat doc-item-box\n[doc-list-depth]
3713 . doc-set-vertical-and-indent 0
3715 . doc-item-box\n[doc-list-depth]
3723 .\" NS doc-item-list macro
3724 .\" NS .It item of list-type [empty tag]
3727 . \" finish (dummy) item box
3732 . doc-set-vertical-and-indent 0
3739 .\" NS doc-enum-list-count-stackXXX global register
3740 .\" NS stack of current enum count values
3743 .\" NS doc-list-depth
3745 .nr doc-enum-list-count-stack1 0
3748 .\" NS doc-enum-list macro
3749 .\" NS enumerated list
3752 .\" NS doc-enum-list-count-stackXXX
3757 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3759 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3761 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3762 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3767 .\" NS doc-bullet-list macro
3768 .\" NS bullet paragraph list
3775 . nop \)\*[doc-Sy-font]\[bu]\f[P]
3780 .\" NS doc-dash-list macro
3781 .\" NS hyphen paragraph list (sub bullet list)
3788 . nop \)\*[doc-Sy-font]\-\f[P]
3793 .\" NS doc-do-list macro
3794 .\" NS .It item of list-type enum/bullet/hyphen
3796 .als doc-do-list doc-hang-list
3799 .\" NS doc-diag-list-input-line-count global register
3800 .\" NS saved line number to be checked in next diag-list item
3802 .nr doc-diag-list-input-line-count 0
3805 .\" NS doc-diag-list macro
3806 .\" NS .It item of list-type diagnostic-message
3809 .\" NS doc-curr-font
3810 .\" NS doc-curr-size
3811 .\" NS doc-diag-list-input-line-count
3814 . nr doc-curr-font \n[.f]
3815 . nr doc-curr-size \n[.ps]
3817 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3818 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3825 . nr doc-diag-list-input-line-count \n[.c]
3828 . nop \*[doc-Sy-font]\c
3829 . if \n[doc-num-args] \
3830 . doc-remaining-args
3831 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3833 . doc-print-and-reset
3837 .\" NS doc-tag-list macro
3838 .\" NS .It item of list-type `tag'
3841 .\" NS doc-have-space
3844 .\" NS local variables:
3850 . \" finish item box
3854 . unformat doc-item-box\n[doc-list-depth]
3856 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
3863 . doc-item-box\n[doc-list-depth]
3868 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3869 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3870 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3871 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3875 . doc-set-vertical-and-indent 1
3876 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3877 . ti -\n[doc-reg-dtl]u
3880 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3881 . doc-item-box\n[doc-list-depth]
3885 . chop doc-item-box\n[doc-list-depth]
3886 . nr doc-reg-dtl1 \n[.k]u
3887 . nop \*[doc-item-box\n[doc-list-depth]]\c
3888 . nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
3889 . nr doc-have-space 1
3892 . if \n[doc-in-files-section] \
3894 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3901 .\" NS doc-get-tag-width macro
3902 .\" NS resolve unknown tag width (`tag' list-type only)
3905 .\" NS doc-list-indent-stackXXX
3906 .\" NS doc-tag-width-stackXXX
3910 .\" NS doc-curr-type
3912 .de doc-get-tag-width
3913 . ie (\n[doc-curr-type] == 1) \{\
3914 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
3915 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
3918 . ds doc-tag-width-stack\n[doc-list-depth] No
3919 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
3924 .\" NS doc-set-vertical-and-indent macro
3925 .\" NS set up vertical spacing (if not compact) and indentation (with
3926 .\" NS offset if argument is non-zero)
3929 .\" NS doc-list-have-indent-stackXXX
3931 .de doc-set-vertical-and-indent
3932 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3933 . sp \n[doc-display-vertical]u
3935 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3936 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
3938 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3946 .\" NS doc-list-depth global register
3947 .\" NS list type stack counter
3949 .nr doc-list-depth 0
3952 .\" NS doc-num-columns global register
3953 .\" NS number of columns
3955 .nr doc-num-columns 0
3958 .\" NS doc-compact-list-stackXXX global register (bool)
3959 .\" NS stack of flags to indicate whether a particular list is compact
3962 .\" NS doc-list-depth
3964 .nr doc-compact-list-stack1 0
3967 .\" NS doc-tag-prefix-stackXXX global string
3968 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
3971 .\" NS doc-list-depth
3973 .ds doc-tag-prefix-stack1
3976 .\" NS doc-tag-width-stackXXX global string
3977 .\" NS stack of strings indicating how to set up current element of
3978 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
3979 .\" NS directly; if it is a macro name, use the macro's width value;
3980 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
3983 .\" NS doc-list-depth
3985 .ds doc-tag-width-stack0
3986 .ds doc-tag-width-stack1
3989 .\" NS doc-list-offset-stackXXX global register
3990 .\" NS stack of list offsets
3993 .\" NS doc-list-depth
3995 .nr doc-list-offset-stack1 0
3998 .\" NS doc-end-list macro
3999 .\" NS list end function; resets indentation (and offset if argument is
4003 .\" NS doc-list-depth
4004 .\" NS doc-list-offset-stackXXX
4008 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4010 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4012 . if (\n[doc-list-depth] <= 0) \
4013 . tm mdoc warning: extraneous .El call (#\n[.c])
4015 . doc-decrement-list-stack
4016 . nr doc-list-depth -1
4020 .\" NS doc-increment-list-stack macro
4021 .\" NS set up next block for list
4024 .\" NS doc-compact-list-stackXXX
4025 .\" NS doc-list-have-indent-stackXXX
4026 .\" NS doc-list-indent-stackXXX
4027 .\" NS doc-list-offset-stackXXX
4028 .\" NS doc-list-type-stackXXX
4029 .\" NS doc-tag-prefix-stackXXX
4030 .\" NS doc-tag-width-stackXXX
4031 .\" NS doc-enum-list-count-stackXXX
4033 .\" NS local variables:
4036 .de doc-increment-list-stack
4037 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4038 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4039 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4040 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4041 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4042 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4043 . ds doc-list-type-stack\n[doc-reg-dils]
4044 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4045 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4049 .\" NS doc-decrement-list-stack macro
4050 .\" NS decrement stack
4053 .\" NS doc-compact-list-stackXXX
4054 .\" NS doc-list-have-indent-stackXXX
4055 .\" NS doc-list-indent-stackXXX
4056 .\" NS doc-list-offset-stackXXX
4057 .\" NS doc-list-type-stackXXX
4058 .\" NS doc-tag-prefix-stackXXX
4059 .\" NS doc-tag-width-stackXXX
4060 .\" NS doc-enum-list-count-stackXXX
4062 .de doc-decrement-list-stack
4063 . ds doc-list-type-stack\n[doc-list-depth]
4064 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4065 . nr doc-list-indent-stack\n[doc-list-depth] 0
4066 . nr doc-list-offset-stack\n[doc-list-depth] 0
4067 . ds doc-tag-prefix-stack\n[doc-list-depth]
4068 . ds doc-tag-width-stack\n[doc-list-depth]
4069 . nr doc-compact-list-stack\n[doc-list-depth] 0
4070 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4074 .\" NS Xr user macro
4075 .\" NS cross reference (for man pages only)
4079 .\" NS doc-macro-name
4081 .\" NS local variables:
4084 .\" NS width register `Xr' set in doc-common
4087 . if !\n[doc-arg-limit] \{\
4089 . ds doc-macro-name Xr
4090 . doc-parse-args \$@
4096 . if !\n[doc-arg-limit] \
4100 . doc-print-prefixes
4101 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4102 . \" first argument must be a string
4103 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4104 . nr doc-curr-font \n[.f]
4105 . nr doc-curr-size \n[.ps]
4106 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4108 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4109 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4110 . \" modify second argument if it is a string and
4111 . \" remove space inbetween
4112 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4113 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4114 . ds doc-space\n[doc-arg-ptr]
4117 . doc-print-recursive
4127 .\" NS doc-Xr-usage macro
4130 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4135 .\" NS Sx user macro
4136 .\" NS cross section reference
4138 .\" NS width register `Sx' set in doc-common
4140 .als Sx doc-generic-macro
4141 .ds doc-Sx-usage section_header
4144 .\" NS doc-end-column-list macro
4145 .\" NS column-list end-list
4148 .\" NS doc-list-depth
4150 .de doc-end-column-list
4152 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4155 . doc-decrement-list-stack
4156 . nr doc-list-depth -1
4160 .\" NS doc-column-indent-width global register
4161 .\" NS holds the indent width for a column list
4163 .nr doc-column-indent-width 0
4166 .\" NS doc-set-column-tab macro
4167 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4170 .\" NS doc-column-indent-width
4172 .\" NS local variables:
4175 .\" NS doc-str-dsct1
4177 .de doc-set-column-tab
4180 . nr doc-column-indent-width 0
4183 . ds doc-str-dsct1 " \"
4186 . ds doc-str-dsct1 " \"
4188 . \" XXX: this is packed abnormally close -- intercolumn width
4189 . \" should be configurable
4190 . ds doc-str-dsct1 " \"
4193 . while (\n[doc-reg-dsct] <= \$1) \{\
4194 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4195 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4196 . nr doc-reg-dsct +1
4199 . ta \*[doc-str-dsct]
4200 ' in +\n[doc-column-indent-width]u
4204 .\" NS doc-column-list macro
4209 .\" NS doc-list-indent-stackXXX
4212 .\" NS local variables:
4216 . if \n[doc-num-args] \
4217 . doc-parse-arg-vector
4220 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4221 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4225 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4226 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4227 . ds doc-space\n[doc-reg-dcl]
4230 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4231 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4234 ' in +\n[doc-column-indent-width]u
4236 . ti -\n[doc-column-indent-width]u
4238 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4242 .\" NS Ta user macro
4243 .\" NS append tab (\t)
4248 .\" NS width register `Ta' set in doc-common
4251 . ie \n[doc-arg-limit] \{\
4254 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4255 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4260 . tm1 "Usage: Ta must follow column entry: e.g.
4261 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4266 .\" NS Dl user macro
4267 .\" NS display (one line) literal
4269 .\" NS this function uses the `Li' font
4273 .\" NS doc-curr-font
4274 .\" NS doc-curr-size
4275 .\" NS doc-macro-name
4277 .\" NS width register `Dl' set in doc-common
4281 . in +\n[doc-display-indent]u
4283 . ie \n[doc-arg-limit] \{\
4284 . tm Usage: .Dl not callable by other macros (#\n[.c])
4289 . ds doc-macro-name Dl
4290 . doc-parse-args \$@
4292 . nr doc-curr-font \n[.f]
4293 . nr doc-curr-size \n[.ps]
4294 . nop \*[doc-Li-font]\c
4295 . doc-print-recursive
4298 . tm Usage: .Dl argument ... (#\n[.c])
4301 . in -\n[doc-display-indent]u
4305 .\" NS D1 user macro
4306 .\" NS display (one line)
4310 .\" NS doc-macro-name
4312 .\" NS width register `D1' set in doc-common
4316 . in +\n[doc-display-indent]u
4318 . ie \n[doc-arg-limit] \{\
4319 . tm Usage: .D1 not callable by other macros (#\n[.c])
4324 . ds doc-macro-name D1
4325 . doc-parse-args \$@
4327 . doc-print-recursive
4330 . tm Usage: .D1 argument ... (#\n[.c])
4333 . in -\n[doc-display-indent]u
4337 .\" NS Vt user macro
4338 .\" NS variable type (for forcing old style variable declarations);
4339 .\" NS this is not done in the same manner as .Ot for fortrash --
4340 .\" NS clean up later
4343 .\" NS doc-curr-font
4344 .\" NS doc-curr-size
4345 .\" NS doc-have-decl
4347 .\" NS doc-macro-name
4349 .\" NS width register `Vt' set in doc-common
4352 . if !\n[doc-arg-limit] \{\
4354 . ds doc-macro-name Vt
4355 . doc-parse-args \$@
4358 . tm Usage: .Vt variable_type ... (#\n[.c])
4361 . if !\n[doc-arg-limit] \
4365 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4366 . tm Usage: .Vt variable_type ... (#\n[.c])
4371 . if \n[doc-in-synopsis-section] \{\
4372 . \" if a function declaration was the last thing given,
4373 . \" want vertical space
4374 . if \n[doc-have-decl] \{\
4376 . nr doc-have-decl 0
4379 . \" if a subroutine was the last thing given, want vertical space
4380 . if \n[doc-have-func] \{\
4381 . ie \n[doc-have-var] \
4390 . nr doc-curr-font \n[.f]
4391 . nr doc-curr-size \n[.ps]
4392 . nop \*[doc-Ft-font]\c
4393 . doc-print-recursive
4395 . if \n[doc-in-synopsis-section] \{\
4396 . ie \n[doc-have-old-func] \
4397 . nop \*[doc-soft-space]\c
4404 .\" NS doc-is-func global register (bool)
4405 .\" NS set if subroutine (in synopsis only) (fortran only)
4410 .\" NS Ft user macro
4411 .\" NS function type
4414 .\" NS doc-curr-font
4415 .\" NS doc-curr-size
4416 .\" NS doc-have-decl
4419 .\" NS doc-macro-name
4421 .\" NS width register `Ft' set in doc-common
4424 . if !\n[doc-arg-limit] \{\
4426 . ds doc-macro-name Ft
4427 . doc-parse-args \$@
4430 . tm Usage: .Ft function_type ... (#\n[.c])
4433 . if !\n[doc-arg-limit] \
4437 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4438 . tm Usage: .Ft function_type ... (#\n[.c])
4443 . if \n[doc-in-synopsis-section] \{\
4444 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4446 . nr doc-have-decl 0
4450 . if \n[doc-have-var] \{\
4458 . nr doc-curr-font \n[.f]
4459 . nr doc-curr-size \n[.ps]
4460 . nop \*[doc-Ft-font]\c
4461 . doc-print-recursive
4465 .\" NS doc-have-old-func global register (bool)
4466 .\" NS set if `Ot' has been called
4468 .nr doc-have-old-func 0
4471 .\" NS Ot user macro
4472 .\" NS old function type (fortran -- no newline)
4475 .\" NS doc-have-decl
4476 .\" NS doc-have-old-func
4480 .\" NS width register `Ot' set in doc-common
4483 . nr doc-have-old-func 1
4485 . if \n[doc-in-synopsis-section] \{\
4486 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4488 . nr doc-have-decl 0
4492 . if \n[doc-have-var] \{\
4501 . nop \*[doc-Ft-font]\$*\c
4506 .\" NS Fa user macro
4507 .\" NS function arguments
4511 .\" NS doc-curr-font
4512 .\" NS doc-curr-size
4513 .\" NS doc-macro-name
4515 .\" NS width register `Fa' set in doc-common
4518 . if !\n[doc-arg-limit] \{\
4520 . ds doc-macro-name Fa
4521 . doc-parse-args \$@
4524 . tm Usage: .Fa function_arguments ... (#\n[.c])
4527 . ie \n[doc-func-arg-count] \
4531 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4532 . nr doc-curr-font \n[.f]
4533 . nr doc-curr-size \n[.ps]
4534 . nop \*[doc-Fa-font]\c
4535 . doc-print-recursive
4537 . if \n[doc-in-synopsis-section] \
4538 . if \n[doc-have-func] \
4544 .\" NS doc-func-arg-count global register
4545 .\" NS how many function arguments have been processed so far
4547 .nr doc-func-arg-count 0
4550 .\" NS doc-func-arg global string
4551 .\" NS work buffer for function name strings
4556 .\" NS doc-num-func-args global register
4557 .\" NS number of function arguments
4559 .nr doc-num-func-args 0
4562 .\" NS doc-func-args-processed global register
4563 .\" NS function arguments processed so far
4565 .nr doc-func-args-processed 0
4568 .\" NS doc-do-func macro
4569 .\" NS internal .Fa for .Fc
4575 .\" NS doc-func-arg-count
4576 .\" NS doc-func-args-processed
4577 .\" NS doc-num-func-args
4580 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4588 . nr doc-num-func-args 0
4589 . nr doc-func-args-processed 0
4591 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4592 . if (\n[doc-num-func-args] > 1) \
4593 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4595 . if (\n[doc-func-arg-count] > 1) \{\
4596 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4597 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4598 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
4601 . if (\n[doc-func-arg-count] == 1) \{\
4602 . nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4605 . nr doc-func-arg-count +1
4610 .\" NS doc-have-func global register (bool)
4611 .\" NS whether we have more than one function in synopsis
4616 .\" NS Fn user macro
4621 .\" NS doc-curr-font
4622 .\" NS doc-curr-size
4623 .\" NS doc-have-decl
4624 .\" NS doc-have-func
4626 .\" NS doc-indent-synopsis
4628 .\" NS doc-macro-name
4630 .\" NS width register `Fn' set in doc-common
4633 . if !\n[doc-arg-limit] \{\
4635 . ds doc-macro-name Fn
4636 . doc-parse-args \$@
4639 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4642 . if !\n[doc-arg-limit] \
4645 . if \n[doc-in-synopsis-section] \{\
4646 . \" if there is/has been more than one subroutine declaration
4647 . ie \n[doc-is-func] \{\
4650 . nr doc-have-decl 0
4654 . if \n[doc-have-func] \{\
4657 . nr doc-have-decl 0
4660 . if \n[doc-have-decl] \{\
4665 . if \n[doc-have-var] \{\
4667 . nr doc-have-decl 0
4670 . nr doc-have-func 1
4674 . if !\n[doc-indent-synopsis] \
4675 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4676 . if !\n[doc-indent-synopsis-active] \
4677 . in +\n[doc-indent-synopsis]u
4678 . ti -\n[doc-indent-synopsis]u
4682 . doc-print-prefixes
4683 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4684 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4689 . nr doc-curr-font \n[.f]
4690 . nr doc-curr-size \n[.ps]
4691 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4692 . nop \f[P]\s[0]\*[lp]\)\c
4695 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4696 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4697 . nop \*[doc-Fa-font]\c
4699 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4703 . if \n[doc-in-synopsis-section] \
4706 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4707 . \" output the space (if needed)
4709 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4712 . doc-print-recursive
4715 . doc-print-and-reset
4717 . if \n[doc-in-synopsis-section] \
4718 . if !\n[doc-indent-synopsis-active] \
4719 . in -\n[doc-indent-synopsis]u
4723 .\" NS doc-do-func-args macro
4724 .\" NS handle function arguments
4730 .\" NS doc-func-args-processed
4731 .\" NS doc-num-func-args
4733 .\" NS local variables:
4736 .de doc-do-func-args
4737 . if \n[doc-in-synopsis-section] \{\
4739 . nr doc-num-func-args 0
4740 . nr doc-func-args-processed 0
4742 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4743 . if (\n[doc-num-func-args] > 1) \
4744 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4747 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4750 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4751 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4752 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4753 . nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4754 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
4760 .\" NS doc-saved-nesting-level global register
4762 .nr doc-saved-nesting-level 0
4765 .\" NS doc-in-func-enclosure global register (bool)
4767 .nr doc-in-func-enclosure 0
4770 .\" NS Fo user macro
4771 .\" NS function open
4775 .\" NS doc-curr-font
4776 .\" NS doc-curr-size
4777 .\" NS doc-func-arg-count
4778 .\" NS doc-have-decl
4779 .\" NS doc-have-func
4781 .\" NS doc-in-func-enclosure
4782 .\" NS doc-indent-synopsis
4784 .\" NS doc-macro-name
4785 .\" NS doc-saved-nesting-level
4787 .\" NS width register `Fo' set in doc-common
4790 . if (\n[doc-in-func-enclosure]) \{\
4791 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4795 . nr doc-saved-nesting-level \n[doc-nesting-level]
4796 . nr doc-in-func-enclosure 1
4798 . if !\n[doc-arg-limit] \{\
4800 . ds doc-macro-name Fo
4801 . doc-parse-args \$@
4804 . tm Usage: .Fo function_name (#\n[.c])
4807 . if \n[doc-in-synopsis-section] \{\
4808 . \" if there is/has been more than one subroutine declaration
4809 . ie \n[doc-is-func] \{\
4812 . nr doc-have-decl 0
4816 . if \n[doc-have-func] \{\
4819 . nr doc-have-decl 0
4822 . if \n[doc-have-decl] \{\
4827 . if \n[doc-have-var] \{\
4829 . nr doc-have-decl 0
4832 . nr doc-have-func 1
4836 . if !\n[doc-indent-synopsis] \
4837 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4840 . \" start function box
4848 . doc-print-prefixes
4849 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4850 . nr doc-func-arg-count 1
4851 . nr doc-curr-font \n[.f]
4852 . nr doc-curr-size \n[.ps]
4854 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4855 . nop \f[P]\s[0]\*[lp]\)\c
4861 .\" NS Fc user macro
4862 .\" NS function close
4866 .\" NS doc-func-arg-count
4867 .\" NS doc-in-func-enclosure
4868 .\" NS doc-saved-nesting-level
4869 .\" NS doc-macro-name
4871 .\" NS width register `Fc' set in doc-common
4874 . if !\n[doc-in-func-enclosure] \{\
4875 . tm mdoc warning: Extraneous .Fc (#\n[.c])
4880 . ds doc-macro-name Fc
4881 . \" the first (dummy) argument is used to get the correct spacing
4882 . doc-parse-args \) \$@
4885 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
4886 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
4888 . nr doc-func-arg-count 0
4889 . nr doc-in-func-enclosure 0
4891 . ie \n[doc-in-synopsis-section] \
4896 . \" finish function box
4901 . unformat doc-func-box
4903 . if \n[doc-in-synopsis-section] \{\
4904 . if !\n[doc-indent-synopsis-active] \
4905 . in +\n[doc-indent-synopsis]u
4906 . ti -\n[doc-indent-synopsis]u
4910 . nop \*[doc-func-box]\c
4913 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4914 . nr doc-curr-font \n[.f]
4915 . nr doc-curr-size \n[.ps]
4916 . doc-print-recursive
4919 . doc-print-and-reset
4921 . if \n[doc-in-synopsis-section] \
4922 . if !\n[doc-indent-synopsis-active] \
4923 . in -\n[doc-indent-synopsis]u
4927 .\" NS doc-build-func-string macro
4928 .\" NS collect function arguments and set hard spaces inbetween
4932 .\" NS doc-func-args-processed
4933 .\" NS doc-num-func-args
4935 .de doc-build-func-string
4936 . if !\n[doc-num-func-args] \{\
4937 . nr doc-num-func-args \n[.$]
4938 . nr doc-func-args-processed 0
4942 . nr doc-func-args-processed +1
4943 . as doc-func-arg "\$1
4945 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
4946 . as doc-func-arg "\*[doc-hard-space]
4949 . doc-build-func-string \$@
4954 .\" Very crude references: Stash all reference info into boxes, print out
4955 .\" reference on .Re request and clean up. Ordering very limited, no fancy
4956 .\" citations, but can do articles, journals, and books -- need to add
4957 .\" several missing options (like city etc). Should be able to grab a refer
4958 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
4962 .\" NS doc-is-reference global register (bool)
4963 .\" NS set if in reference
4965 .nr doc-is-reference 0
4968 .\" NS doc-reference-count global register
4969 .\" NS reference element counter
4971 .nr doc-reference-count 0
4974 .\" NS Rs user macro
4975 .\" NS reference start
4978 .\" NS doc-is-reference
4979 .\" NS doc-reference-count
4981 .\" NS width register `Rs' set in doc-common
4985 . tm Usage: .Rs (does not take arguments) (#\n[.c])
4987 . nr doc-is-reference 1
4988 . doc-reset-reference
4989 . if \n[doc-in-see-also-section] \
4991 . nr doc-reference-count 0
4996 .\" NS Re user macro
4997 .\" NS reference end
5000 .\" NS doc-is-reference
5002 .\" NS width register `Re' set in doc-common
5006 . tm Usage: .Re (does not take arguments) (#\n[.c])
5008 . doc-print-reference
5009 . doc-reset-reference
5010 . nr doc-is-reference 0
5015 .\" NS doc-reset-reference macro
5016 .\" NS reference cleanup
5019 .\" NS doc-author-count
5020 .\" NS doc-author-nameXXX
5021 .\" NS doc-book-count
5022 .\" NS doc-book-name
5023 .\" NS doc-corporate-count
5024 .\" NS doc-corporate-name
5026 .\" NS doc-date-count
5027 .\" NS doc-issue-count
5028 .\" NS doc-issue-name
5029 .\" NS doc-journal-count
5030 .\" NS doc-journam-name
5031 .\" NS doc-optional-count
5032 .\" NS doc-optional-string
5033 .\" NS doc-page-number-count
5034 .\" NS doc-page-number-string
5035 .\" NS doc-reference-title-count
5036 .\" NS doc-reference-title-name
5037 .\" NS doc-reference-title-name-for-book
5038 .\" NS doc-report-count
5039 .\" NS doc-report-name
5040 .\" NS doc-volume-count
5041 .\" NS doc-volume-name
5043 .de doc-reset-reference
5044 . while (\n[doc-author-count]) \{\
5045 . ds doc-author-name\n[doc-author-count]
5046 . nr doc-author-count -1
5048 . nr doc-journal-count 0
5049 . nr doc-issue-count 0
5050 . nr doc-optional-count 0
5051 . nr doc-corporate-count 0
5052 . nr doc-report-count 0
5053 . nr doc-reference-title-count 0
5054 . nr doc-volume-count 0
5055 . nr doc-date-count 0
5056 . nr doc-page-number-count 0
5057 . nr doc-book-count 0
5059 . ds doc-journal-name
5061 . ds doc-optional-string
5062 . ds doc-corporate-name
5063 . ds doc-report-name
5064 . ds doc-reference-title-name
5065 . ds doc-reference-title-name-for-book
5066 . ds doc-volume-name
5068 . ds doc-page-number-string
5073 .\" NS doc-finish-reference macro
5074 .\" NS auxiliary macro for doc-print-reference
5077 .\" NS doc-reference-count
5079 .de doc-finish-reference
5080 . nr doc-reference-count -1
5081 . ie \n[doc-reference-count] \
5088 .\" NS doc-print-reference macro
5089 .\" NS reference print
5092 .\" NS doc-reference-count
5094 .de doc-print-reference
5098 . if \n[doc-author-count] \{\
5099 . doc-print-reference-authors
5100 . nr doc-reference-count -\n[doc-author-count]
5103 . if \n[doc-reference-title-count] \{\
5104 . unformat doc-reference-title-name
5105 . chop doc-reference-title-name
5106 . unformat doc-reference-title-name-for-book
5107 . chop doc-reference-title-name-for-book
5108 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5109 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5110 . doc-finish-reference
5113 . nop \*[doc-reference-title-name]\c
5114 . doc-finish-reference
5117 . if \n[doc-book-count] \{\
5118 . unformat doc-book-name
5119 . chop doc-book-name
5120 . nop \*[doc-book-name]\c
5121 . doc-finish-reference
5124 . if \n[doc-publisher-count] \{\
5125 . unformat doc-publisher-name
5126 . chop doc-publisher-name
5127 . nop \*[doc-publisher-name]\c
5128 . doc-finish-reference
5131 . if \n[doc-journal-count] \{\
5132 . unformat doc-journal-name
5133 . chop doc-journal-name
5134 . nop \*[doc-journal-name]\c
5135 . doc-finish-reference
5138 . if \n[doc-report-count] \{\
5139 . unformat doc-report-name
5140 . chop doc-report-name
5141 . nop \*[doc-report-name]\c
5142 . doc-finish-reference
5145 . if \n[doc-issue-count] \{\
5146 . unformat doc-issue-name
5147 . chop doc-issue-name
5148 . nop \*[doc-issue-name]\c
5149 . doc-finish-reference
5152 . if \n[doc-volume-count] \{\
5153 . unformat doc-volume-name
5154 . chop doc-volume-name
5155 . nop \*[doc-volume-name]\c
5156 . doc-finish-reference
5159 . if \n[doc-page-number-count] \{\
5160 . unformat doc-page-number-string
5161 . chop doc-page-number-string
5162 . nop \*[doc-page-number-string]\c
5163 . doc-finish-reference
5166 . if \n[doc-corporate-count] \{\
5167 . unformat doc-corporate-name
5168 . chop doc-corporate-name
5169 . nop \*[doc-corporate-name]\c
5170 . doc-finish-reference
5173 . if \n[doc-date-count] \{\
5176 . nop \*[doc-date]\c
5177 . doc-finish-reference
5180 . if \n[doc-optional-count] \{\
5181 . unformat doc-optional-string
5182 . chop doc-optional-string
5183 . nop \*[doc-optional-string]\c
5184 . doc-finish-reference
5187 . if \n[doc-reference-count] \
5188 . tm mdoc warning: unresolved reference problem
5190 . hy \n[doc-hyphen-flags]
5194 .\" NS doc-print-reference-authors macro
5195 .\" NS print out reference authors
5197 .\" NS local variables:
5201 .ds doc-str-dpra "and
5203 .de doc-print-reference-authors
5206 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5207 . unformat doc-author-name\n[doc-reg-dpra]
5208 . chop doc-author-name\n[doc-reg-dpra]
5209 . ie (\n[doc-author-count] > 2) \
5210 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5212 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5213 . nr doc-reg-dpra +1
5216 . unformat doc-author-name\n[doc-reg-dpra]
5217 . chop doc-author-name\n[doc-reg-dpra]
5218 . if (\n[doc-author-count] > 1) \
5219 . nop \)\*[doc-str-dpra]
5220 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5224 .\" NS doc-author-count global register
5225 .\" NS counter of author references
5227 .nr doc-author-count 0
5230 .\" NS doc-author-nameXXX global box
5231 .\" NS array of author names
5234 .\" NS doc-author-count
5236 .ds doc-author-name0
5239 .\" NS %A user macro
5240 .\" NS reference author(s)
5244 .\" NS doc-author-count
5245 .\" NS doc-curr-font
5246 .\" NS doc-curr-size
5247 .\" NS doc-macro-name
5248 .\" NS doc-reference-count
5250 .\" NS local variables:
5253 .\" NS width register `%A' set in doc-common
5256 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5257 . tm Usage: .%A author_name ... (#\n[.c])
5261 . nr doc-author-count +1
5262 . nr doc-reference-count +1
5264 . ds doc-macro-name %A
5265 . doc-parse-args \$@
5268 . nr doc-curr-font \n[.f]
5269 . nr doc-curr-size \n[.ps]
5271 . \" save to reference box
5272 . box doc-author-name\n[doc-author-count]
5281 .\" NS doc-book-count global register
5282 .\" NS counter of book references
5284 .nr doc-book-count 0
5287 .\" NS doc-book-name global box
5288 .\" NS string of collected book references
5293 .\" NS %B user macro
5294 .\" NS [reference] book name
5298 .\" NS doc-book-count
5299 .\" NS doc-curr-font
5300 .\" NS doc-curr-size
5301 .\" NS doc-macro-name
5302 .\" NS doc-reference-count
5304 .\" NS local variables:
5307 .\" NS width register `%B' set in doc-common
5310 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5311 . tm Usage: .%B book_name ... (#\n[.c])
5315 . if \n[doc-is-reference] \{\
5316 . nr doc-book-count +1
5317 . nr doc-reference-count +1
5320 . ds doc-macro-name %B
5321 . doc-parse-args \$@
5324 . nr doc-curr-font \n[.f]
5325 . nr doc-curr-size \n[.ps]
5327 . ie \n[doc-is-reference] \{\
5328 . \" append to reference box
5329 . boxa doc-book-name
5334 . nop \*[doc-Em-font]\c
5338 . nop \*[doc-Em-font]\c
5339 . doc-print-recursive
5344 .\" NS doc-date-count global register
5345 .\" NS counter of date references
5347 .nr doc-date-count 0
5350 .\" NS doc-date global box
5351 .\" NS string of collected date references
5356 .\" NS %D user macro
5357 .\" NS [reference] date
5361 .\" NS doc-curr-font
5362 .\" NS doc-curr-size
5363 .\" NS doc-date-count
5364 .\" NS doc-macro-name
5365 .\" NS doc-reference-count
5367 .\" NS local variables:
5370 .\" NS width register `%D' set in doc-common
5373 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5374 . tm Usage: .%D date ... (#\n[.c])
5378 . nr doc-date-count +1
5379 . nr doc-reference-count +1
5381 . ds doc-macro-name %D
5382 . doc-parse-args \$@
5385 . nr doc-curr-font \n[.f]
5386 . nr doc-curr-size \n[.ps]
5388 . \" append to reference box
5398 .\" NS doc-publisher-count global register
5399 .\" NS counter of publisher references
5401 .nr doc-publisher-count 0
5404 .\" NS doc-publisher-name global box
5405 .\" NS string of collected publisher references
5407 .ds doc-publisher-name
5410 .\" NS %I user macro
5411 .\" NS [reference] issuer/publisher name
5415 .\" NS doc-curr-font
5416 .\" NS doc-curr-size
5417 .\" NS doc-macro-name
5418 .\" NS doc-publisher-count
5419 .\" NS doc-reference-count
5421 .\" NS local variables:
5424 .\" NS width register `%I' set in doc-common
5427 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5428 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5432 . nr doc-publisher-count +1
5433 . nr doc-reference-count +1
5435 . ds doc-macro-name %I
5436 . doc-parse-args \$@
5439 . nr doc-curr-font \n[.f]
5440 . nr doc-curr-size \n[.ps]
5442 . \" append to reference box
5443 . boxa doc-publisher-name
5448 . nop \*[doc-Em-font]\c
5453 .\" NS doc-journal-count global register
5454 .\" NS counter of journal references
5456 .nr doc-journal-count 0
5459 .\" NS doc-journal-name global box
5460 .\" NS string of collected journal references
5462 .ds doc-journal-name
5465 .\" NS %J user macro
5466 .\" NS [reference] Journal Name
5470 .\" NS doc-curr-font
5471 .\" NS doc-curr-size
5472 .\" NS doc-journal-count
5473 .\" NS doc-macro-name
5474 .\" NS doc-reference-count
5476 .\" NS local variables:
5479 .\" NS width register `%J' set in doc-common
5482 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5483 . tm Usage: .%J journal_name ... (#\n[.c])
5487 . nr doc-journal-count +1
5488 . nr doc-reference-count +1
5490 . ds doc-macro-name %J
5491 . doc-parse-args \$@
5494 . nr doc-curr-font \n[.f]
5495 . nr doc-curr-size \n[.ps]
5497 . \" append to reference box
5498 . boxa doc-journal-name
5503 . nop \*[doc-Em-font]\c
5508 .\" NS doc-issue-count global register
5509 .\" NS counter of issue number references
5511 .nr doc-issue-count 0
5514 .\" NS doc-issue-name global box
5515 .\" NS string of collected issue number references
5520 .\" NS %N user macro
5521 .\" NS [reference] issue number
5525 .\" NS doc-curr-font
5526 .\" NS doc-curr-size
5527 .\" NS doc-issue-count
5528 .\" NS doc-macro-name
5529 .\" NS doc-reference-count
5531 .\" NS local variables:
5534 .\" NS width register `%N' set in doc-common
5537 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5538 . tm Usage: .%N issue_number ... (#\n[.c])
5542 . nr doc-issue-count +1
5543 . nr doc-reference-count +1
5545 . ds doc-macro-name %N
5546 . doc-parse-args \$@
5549 . nr doc-curr-font \n[.f]
5550 . nr doc-curr-size \n[.ps]
5552 . \" append to reference box
5553 . boxa doc-issue-name
5562 .\" NS doc-optional-count global register
5563 .\" NS counter of optional information references
5565 .nr doc-optional-count 0
5568 .\" NS doc-optional-string global box
5569 .\" NS string of collected optional information references
5571 .ds doc-optional-string
5574 .\" NS %O user macro
5575 .\" NS [reference] optional information
5579 .\" NS doc-curr-font
5580 .\" NS doc-curr-size
5581 .\" NS doc-macro-name
5582 .\" NS doc-optional-count
5583 .\" NS doc-reference-count
5585 .\" NS local variables:
5588 .\" NS width register `%O' set in doc-common
5591 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5592 . tm Usage: .%O optional_information ... (#\n[.c])
5596 . nr doc-optional-count +1
5597 . nr doc-reference-count +1
5599 . ds doc-macro-name %O
5600 . doc-parse-args \$@
5603 . nr doc-curr-font \n[.f]
5604 . nr doc-curr-size \n[.ps]
5606 . \" append to reference box
5607 . boxa doc-optional-string
5616 .\" NS doc-page-number-count global register
5617 .\" NS counter of page number references
5619 .nr doc-page-number-count 0
5622 .\" NS doc-page-number-string global box
5623 .\" NS string of collected page number references
5625 .ds doc-page-number-string
5628 .\" NS %P user macro
5629 .\" NS [reference] page numbers
5633 .\" NS doc-curr-font
5634 .\" NS doc-curr-size
5635 .\" NS doc-macro-name
5636 .\" NS doc-page-number-count
5637 .\" NS doc-reference-count
5639 .\" NS local variables:
5642 .\" NS width register `%P' set in doc-common
5645 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5646 . tm Usage: .%P page_number ... (#\n[.c])
5650 . nr doc-page-number-count +1
5651 . nr doc-reference-count +1
5653 . ds doc-macro-name %P
5654 . doc-parse-args \$@
5657 . nr doc-curr-font \n[.f]
5658 . nr doc-curr-size \n[.ps]
5660 . \" append to reference box
5661 . boxa doc-page-number-string
5670 .\" NS doc-corporate-count global register
5671 .\" NS counter of corporate references
5673 .nr doc-corporate-count 0
5676 .\" NS doc-corporate-name global box
5677 .\" NS string of collected corporate references
5679 .ds doc-corporate-name
5682 .\" NS %Q user macro
5683 .\" NS corporate or foreign author
5687 .\" NS doc-corporate-count
5688 .\" NS doc-curr-font
5689 .\" NS doc-curr-size
5690 .\" NS doc-macro-name
5691 .\" NS doc-reference-count
5693 .\" NS local variables:
5696 .\" NS width register `%Q' set in doc-common
5699 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5700 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5704 . nr doc-corporate-count +1
5705 . nr doc-reference-count +1
5707 . ds doc-macro-name %Q
5708 . doc-parse-args \$@
5711 . nr doc-curr-font \n[.f]
5712 . nr doc-curr-size \n[.ps]
5714 . \" append to reference box
5715 . boxa doc-corporate-name
5724 .\" NS doc-report-count global register
5725 .\" NS counter of report references
5727 .nr doc-report-count 0
5730 .\" NS doc-report-name global box
5731 .\" NS string of collected report references
5736 .\" NS %R user macro
5737 .\" NS [reference] report name
5741 .\" NS doc-curr-font
5742 .\" NS doc-curr-size
5743 .\" NS doc-macro-name
5744 .\" NS doc-reference-count
5745 .\" NS doc-report-count
5747 .\" NS local variables:
5750 .\" NS width register `%R' set in doc-common
5753 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5754 . tm Usage: .%R reference_report ... (#\n[.c])
5758 . nr doc-report-count +1
5759 . nr doc-reference-count +1
5761 . ds doc-macro-name %R
5762 . doc-parse-args \$@
5765 . nr doc-curr-font \n[.f]
5766 . nr doc-curr-size \n[.ps]
5768 . \" append to reference box
5769 . boxa doc-report-name
5778 .\" NS doc-reference-title-count global register
5779 .\" NS counter of reference title references
5781 .nr doc-reference-title-count 0
5784 .\" NS doc-reference-title-name global box
5785 .\" NS string of collected reference title references
5787 .ds doc-reference-title-name
5790 .\" NS doc-reference-title-name-for-book global box
5791 .\" NS string of collected reference title references
5792 .\" NS (saved with another font; this is a shortcoming of groff)
5794 .ds doc-reference-title-name-for-book
5797 .\" NS %T user macro
5798 .\" NS reference title
5802 .\" NS doc-curr-font
5803 .\" NS doc-curr-size
5804 .\" NS doc-macro-name
5805 .\" NS doc-reference-title-count
5806 .\" NS doc-report-count
5808 .\" NS local variables:
5811 .\" NS width register `%T' set in doc-common
5814 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5815 . tm Usage: .%T reference_title ... (#\n[.c])
5819 . if \n[doc-is-reference] \{\
5820 . nr doc-reference-title-count +1
5821 . nr doc-reference-count +1
5824 . ds doc-macro-name %T
5825 . doc-parse-args \$@
5828 . nr doc-curr-font \n[.f]
5829 . nr doc-curr-size \n[.ps]
5830 . ie \n[doc-is-reference] \{\
5831 . \" append to reference box
5832 . boxa doc-reference-title-name-for-book
5837 . nop \*[doc-No-font]\c
5840 . \" do it a second time with another font
5841 . ds doc-macro-name %T
5842 . doc-parse-args \$@
5845 . nr doc-curr-font \n[.f]
5846 . nr doc-curr-size \n[.ps]
5847 . boxa doc-reference-title-name
5852 . nop \*[doc-Em-font]\c
5856 . nop \*[doc-Em-font]\c
5857 . doc-print-recursive
5862 .\" NS doc-volume-count global register
5863 .\" NS counter of reference title references
5865 .nr doc-volume-count 0
5868 .\" NS doc-volume-name global box
5869 .\" NS string of collected volume references
5874 .\" NS %V user macro
5875 .\" NS reference volume
5879 .\" NS doc-curr-font
5880 .\" NS doc-curr-size
5881 .\" NS doc-macro-name
5882 .\" NS doc-reference-title-count
5883 .\" NS doc-volume-count
5885 .\" NS local variables:
5888 .\" NS width register `%V' set in doc-common
5891 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5892 . tm Usage: .%V volume ... (#\n[.c])
5896 . nr doc-volume-count +1
5897 . nr doc-reference-count +1
5899 . ds doc-macro-name %V
5900 . doc-parse-args \$@
5903 . nr doc-curr-font \n[.f]
5904 . nr doc-curr-size \n[.ps]
5906 . \" append to reference box
5907 . boxa doc-volume-name
5916 .\" NS doc-do-references macro
5917 .\" NS reference recursion routine
5922 .\" NS local variables:
5926 .de doc-do-references
5927 . if !\n[doc-is-reference] \
5928 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
5930 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
5932 . ie (\n[doc-reg-ddr1] == 1) \{\
5933 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
5934 . doc-append-arg \c 3
5935 . \*[doc-arg\n[doc-arg-ptr]]
5938 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
5940 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
5941 . \" finish reference box
5949 . nr doc-reg-ddr \n[doc-arg-ptr]
5951 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
5957 .\" NS Hf user macro
5958 .\" NS source include header files.
5961 .\" NS doc-curr-font
5962 .\" NS doc-curr-size
5964 .\" NS width register `Hf' set in doc-common
5967 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
5979 . Usage: .Hf file (#\n[.c])
5983 .\" NS doc-have-author global register (bool)
5986 .nr doc-have-author 0
5989 .\" NS An user macro
5994 .\" NS doc-curr-font
5995 .\" NS doc-curr-size
5996 .\" NS doc-have-author
5997 .\" NS doc-macro-name
5999 .\" NS width register `An' set in doc-common
6002 . if !\n[doc-arg-limit] \{\
6004 . ie "\$1"-nosplit" \
6005 . nr doc-in-authors-section 0
6006 . el \{ .ie "\$1"-split" \
6007 . nr doc-in-authors-section 1
6009 . ds doc-macro-name An
6010 . doc-parse-args \$@
6013 . tm1 "Usage: .An {-nosplit | -split}
6014 . tm1 .An author_name ... (#\n[.c])
6017 . if \n[doc-in-authors-section] \{\
6018 . ie \n[doc-have-author] \
6021 . nr doc-have-author 1
6024 . if \n[doc-arg-limit] \{\
6026 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6027 . nr doc-curr-font \n[.f]
6028 . nr doc-curr-size \n[.ps]
6029 . doc-print-recursive
6032 . tm Usage: .An author_name ... (#\n[.c])
6038 .\" NS Rv user macro
6039 .\" NS return values
6041 .\" NS width register `Rv' set in doc-common
6043 .\" NS local variables:
6044 .\" NS doc-str-Rv-prefix
6045 .\" NS doc-str-Rv-suffix
6047 .ds doc-str-Rv-prefix "The
6048 .ds doc-str-Rv-suffix "function returns the value\~0 if successful;
6049 .as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
6050 .as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
6051 .as doc-str-Rv-suffix " is set to indicate the error.
6055 .\" XXX: what does this function without `-std'?
6058 . tm Usage: .Rv [-std] (#\n[.c])
6062 . \" .ds doc-macro-name Rv
6063 . \" .nr doc-arg-ptr 0
6065 . \" .ds doc-arg1 \$2
6066 . \" .ds doc-arg2 \$3
6067 . \" .ds doc-arg3 \$4
6068 . \" .ds doc-arg4 \$5
6069 . \" .ds doc-arg5 \$6
6070 . \" .ds doc-arg6 \$7
6071 . \" .ds doc-arg7 \$8
6072 . \" .ds doc-arg8 \$9
6074 . \" .nr doc-num-args (\n[.$] - 1)
6077 . nr doc-reg-Rv \*[doc-section]
6078 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6079 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6081 . nop \)\*[doc-str-Rv-prefix]
6083 . nop \)\*[doc-str-Rv-suffix]
6088 .\" NS Mt user macro
6089 .\" NS mailto (for conversion to HTML)
6092 . \" XXX: error handling missing
6097 .\" NS Lk user macro
6098 .\" NS link (for conversion to HTML)
6100 .\" NS local variables:
6105 . ds doc-str-Lk Sy \$@
6107 . ie (\n[.$] > 1) \{\
6108 . doc-get-arg-type \$2
6109 . ie (\n[doc-arg-type] < 3) \{\
6111 . ds doc-str-Lk Sy "\$1"
6112 . doc-get-width "\$1"
6115 . as doc-str-Lk " \$@
6118 . doc-get-width "\$1"
6121 . doc-get-width "\$1"
6127 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6134 .\" NS doc-defunct-macro macro
6135 .\" NS this is the skeleton for defunct macros
6138 .de doc-defunct-macro
6139 . tmc mdoc error: .\$0 defunct
6140 . if d doc-\$0-usage \
6141 . tmc , \*[doc-\$0-usage]
6148 .als Db doc-defunct-macro
6150 .als Ds doc-defunct-macro
6152 .als Ex doc-defunct-macro
6153 .ds doc-Ex-usage use .D1
6155 .als Or doc-defunct-macro
6156 .ds doc-Or-usage use `|'
6158 .als Sf doc-defunct-macro
6159 .ds doc-Sf-usage use .Pf or .Ns
6165 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6166 . tm1 " Should this have been `.Em ...'?
6171 .\" NS doc-empty-line macro
6172 .\" NS emit warning and print empty line
6175 . if !\n[doc-display-depth] \
6176 . tm mdoc warning: Empty input line #\n[.c]
6186 .\" load local modifications