1 .\" Copyright (c) 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc 5.8 (Berkeley) 8/5/91
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
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
78 . tm mdoc error: .Db defunct (#\n[.c])
82 .\" NS doc-macro-name global string
83 .\" NS name of calling request (set in each user-requestable macro)
86 .als doc-arg0 doc-macro-name
89 .\" NS doc-arg-limit global register
90 .\" NS total number of arguments
95 .\" NS doc-num-args global register
96 .\" NS number of arguments to handle (must be set to \n[.$] prior to
97 .\" NS `doc-parse-arg-vector' request)
102 .\" NS doc-arg-ptr global register
103 .\" NS argument pointer
108 .\" NS doc-argXXX global string
109 .\" NS argument vector
117 .\" NS doc-typeXXX global register
118 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
119 .\" NS punctuation prefix=4)
127 .\" NS doc-spaceXXX global string
136 .\" NS doc-parse-args macro
137 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
146 .\" NS doc-have-space
148 .\" NS local variables:
154 . if !\n[doc-arg-limit] \
157 . nr doc-have-space 0
162 . nr doc-arg-limit +1
164 . \" handle `|' and `...' specially
166 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
167 . el \{ .ie "\$1"..." \
168 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
170 . ds doc-arg\n[doc-arg-limit] "\$1
173 . \" get argument type and set spacing
174 . doc-get-arg-type* \n[doc-arg-limit]
175 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
176 . doc-set-spacing-\n[doc-arg-type]
178 . \" check whether we have processed the last parameter
190 .\" NS doc-parse-arg-vector macro
191 .\" NS parse argument vector (recursive)
193 .\" NS cf. comments in doc-parse-args
203 .\" NS local variables:
208 .de doc-parse-arg-vector
209 . if !\n[doc-arg-limit] \
212 . nr doc-arg-limit +1
214 . ie "\*[doc-arg\n[doc-arg-limit]]"|" \
215 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
216 . el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
217 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
220 . doc-get-arg-type* \n[doc-arg-limit]
221 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
222 . doc-set-spacing-\n[doc-arg-type]
224 . ie (\n[doc-num-args] == 1) \{\
230 . doc-parse-arg-vector
237 .\" NS doc-parse-space-vector macro
238 .\" NS parse space vector (recursive)
245 .de doc-parse-space-vector
246 . nr doc-arg-limit +1
248 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
250 . ie (\n[doc-num-args] == 1) \
254 . doc-parse-space-vector
259 .\" NS doc-remaining-args macro
260 .\" NS output remaining arguments as-is, separated by spaces (until
261 .\" NS `doc-num-args' is exhausted)
267 .de doc-remaining-args
269 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
271 . ie (\n[doc-num-args] == 1) \{\
276 . nop \)\*[doc-space]\c
283 .\" NS doc-append-arg macro
284 .\" NS append one argument to argument vector:
285 .\" NS `.doc-append-arg [arg] [type]'
293 . nr doc-arg-limit +1
294 . ds doc-arg\n[doc-arg-limit] "\$1
295 . nr doc-type\n[doc-arg-limit] \$2
296 . doc-set-spacing-\$2
300 .\" NS doc-print-and-reset macro
301 .\" NS finish input line and clean up argument vectors
303 .de doc-print-and-reset
304 . if \n[doc-space-mode] \
310 .\" NS doc-reset-args macro
311 .\" NS reset argument counters
323 . hy \n[doc-hyphen-flags]
329 .\" NS doc-curr-font global register
330 .\" NS saved current font
332 .nr doc-curr-font \n[.f]
335 .\" NS doc-curr-size global register
336 .\" NS saved current font size
338 .nr doc-curr-size \n[.ps]
344 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
350 .\" NS doc-macro-name
352 .\" NS local variables:
353 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
355 .\" NS width register `Fl' set in doc-common
358 . nr doc-curr-font \n[.f]
359 . nr doc-curr-size \n[.ps]
360 . nop \*[doc-Fl-font]\c
362 . if !\n[doc-arg-limit] \{\
363 . ds doc-macro-name Fl
368 . nop \|\-\|\f[P]\s[0]
371 . if !\n[doc-arg-limit] \
375 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
377 . nop \|\-\f[P]\s[0]\c
378 . doc-print-and-reset
381 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
382 . nop \|\-\f[P]\s[0]\c
383 . \*[doc-arg\n[doc-arg-ptr]]
386 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
395 .\" NS doc-flag-recursion macro
396 .\" NS `Fl' flag recursion routine (special handling)
401 .\" NS local variables:
406 .de doc-flag-recursion
407 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
408 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
410 . ie (\n[doc-reg-dfr1] == 1) \{\
415 . nr doc-reg-dfr \n[doc-arg-ptr]
417 . ie (\n[doc-reg-dfr1] == 2) \{\
418 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
419 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
421 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
422 . if \n[doc-reg-Fl] \
423 . nop \|\-\*[doc-space]\c
427 . ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
428 . if \n[doc-reg-Fl] \
429 . nop \|\-\*[doc-space]\c
433 . \" two consecutive hyphen characters?
434 . ie "\*[doc-str-dfr]"-" \
437 . nop \|\%\-\*[doc-str-dfr]\c
440 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
441 . nop \)\*[doc-str-dfr]\f[P]\s[0]\c
444 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
446 . if (\n[doc-reg-dfr1] == 4) \
449 . doc-print-and-reset
453 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
454 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
457 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
460 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
464 . doc-flag-recursion \$@
469 .\" NS doc-print-recursive macro
470 .\" NS general name recursion routine (print remaining arguments)
475 .\" NS local variables:
480 .de doc-print-recursive
481 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
482 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
484 . ie (\n[doc-reg-dpr1] == 1) \{\
485 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
489 . nr doc-reg-dpr \n[doc-arg-ptr]
491 . ie (\n[doc-reg-dpr1] == 2) \
492 . \" the `\%' prevents hyphenation on a dash (`-')
493 . nop \%\*[doc-str-dpr]\&\c
495 . \" punctuation character
496 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
497 . nop \)\*[doc-str-dpr]\f[P]\s[0]\c
501 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
503 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
504 . doc-print-and-reset
507 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
508 . doc-print-recursive
513 .\" NS doc-print-prefixes macro
514 .\" NS print leading prefixes
519 .de doc-print-prefixes
520 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
521 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
523 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
524 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
530 .\" NS doc-generic-macro macro
531 .\" NS this is the skeleton for most simple macros
537 .\" NS doc-macro-name
539 .de doc-generic-macro
540 . if !\n[doc-arg-limit] \{\
542 . ds doc-macro-name \$0
546 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
549 . if !\n[doc-arg-limit] \
553 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
554 . if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
555 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
557 . \" the right action here would be to reset the argument counters
558 . \" and bail out -- unfortunately, a small number of manual pages
559 . \" (less than 2% for FreeBSD which has been used for testing)
560 . \" relied on the old behaviour (silently ignore this error),
561 . \" so it is commented out
566 . nr doc-curr-font \n[.f]
567 . nr doc-curr-size \n[.ps]
568 . nop \*[doc-\$0-font]\c
569 . doc-print-recursive
573 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
580 .\" NS command line `argument' macro: `.Ar [args ...]'
586 .\" NS doc-macro-name
588 .\" NS local variable:
589 .\" NS doc-str-Ar-default
591 .\" NS width register `Ar' set in doc-common
593 .ds doc-str-Ar-default "file\ .\|.\|.
596 . nr doc-curr-font \n[.f]
597 . nr doc-curr-size \n[.ps]
598 . nop \*[doc-Ar-font]\c
600 . if !\n[doc-arg-limit] \{\
601 . ds doc-macro-name Ar
606 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
609 . if !\n[doc-arg-limit] \
614 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
615 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
616 . doc-print-and-reset
619 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
620 . \" replace previous argument (Ar) with default value
622 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
623 . nr doc-type\n[doc-arg-ptr] 2
624 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
626 . \" recompute space vector for remaining arguments
627 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
628 . nr doc-arg-limit \n[doc-arg-ptr]
629 . doc-parse-space-vector
631 . doc-print-recursive
639 .\" NS width register `Ad' set in doc-common
641 .als Ad doc-generic-macro
642 .ds doc-Ad-usage address
645 .\" NS doc-in-synopsis-count global register
646 .\" NS whether we have more than a single item in synopsis
648 .nr doc-in-synopsis-count 0
651 .\" NS doc-indent-synopsis global register
652 .\" NS indentation in synopsis
654 .nr doc-indent-synopsis 0
658 .\" NS config declaration (for section 4 SYNOPSIS)
660 .\" NS this function causes a break; it uses the `Nm' font
666 .\" NS doc-in-synopsis-count
667 .\" NS doc-indent-synopsis
668 .\" NS doc-macro-name
670 .\" NS width register `Cd' set in doc-common
672 .\" needs work - not very translatable
675 . if !\n[doc-arg-limit] \{\
677 . ds doc-macro-name Cd
681 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
686 . if !\n[doc-arg-limit] \
690 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
691 . nr doc-curr-font \n[.f]
692 . nr doc-curr-size \n[.ps]
694 . ie \n[doc-in-synopsis-count] \{\
695 . if "\*[doc-macro-name]"Cd" \{\
697 . ie (\n[doc-in-synopsis-count] > 1) \
700 . if !\n[doc-indent-synopsis] \
701 . nr doc-indent-synopsis \n[doc-display-indent]u
703 . in +\n[doc-indent-synopsis]u
704 . ti -\n[doc-indent-synopsis]u
705 . nr doc-in-synopsis-count +1
708 . nop \*[doc-Nm-font]\c
709 . doc-print-recursive
710 . in -\n[doc-indent-synopsis]u
713 . nop \*[doc-Nm-font]\c
714 . doc-print-recursive
717 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
724 .\" NS interactive command modifier (flag)
726 .\" NS width register `Cm' set in doc-common
728 .als Cm doc-generic-macro
729 .ds doc-Cm-usage interactive_command_modifier
733 .\" NS defined variable
735 .\" NS this function uses the `Er' font
737 .\" NS width register `Dv' set in doc-common
739 .als Dv doc-generic-macro
740 .ds doc-Dv-usage defined_variable
741 .als doc-Dv-font doc-Er-font
747 .\" NS width register `Em' set in doc-common
749 .als Em doc-generic-macro
750 .ds doc-Em-usage text
756 .\" NS width register `Er' set in doc-common
758 .als Er doc-generic-macro
759 .ds doc-Er-usage text
763 .\" NS environment variable
765 .\" NS width register `Ev' set in doc-common
767 .als Ev doc-generic-macro
768 .ds doc-Ev-usage text
771 .\" NS doc-have-decl global register (bool)
772 .\" NS subroutine test (in synopsis only)
777 .\" NS doc-have-var global register (bool)
778 .\" NS whether last type is a variable type
783 .\" NS doc-do-func-decl macro
784 .\" NS do someting special while in SYNOPSIS
793 . if \n[doc-in-synopsis-count] \{\
794 . \" if a variable type was the last thing given, want vertical space
795 . if \n[doc-have-var] \{\
799 . \" if a subroutine was the last thing given, want vertical space
800 . if \n[doc-have-func] \{\
801 . ie \n[doc-have-decl] \
810 . nr doc-curr-font \n[.f]
811 . nr doc-curr-size \n[.ps]
816 .\" NS function declaration -- not callable
818 .\" NS this function causes a break
820 .\" NS width register `Fd' set in doc-common
823 . ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
825 . nop \*[doc-Fd-font]\$*
827 . ft \n[doc-curr-font]
828 . ps \n[doc-curr-size]u
831 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
838 .\" NS #include statement - not callable
840 .\" NS this function causes a break; it uses the `Fd' font
842 .\" NS width register `In' set in doc-common
845 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
847 . nop \*[doc-Fd-font]#include <\$1>
849 . ft \n[doc-curr-font]
850 . ps \n[doc-curr-size]u
853 . tm Usage: .In include_file -- In is not callable (#\n[.c])
860 .\" NS function return value
862 .\" NS this function uses the `Ar' font
864 .\" NS width register `Fr' set in doc-common
866 .als Fr doc-generic-macro
867 .ds doc-Fr-usage function_return_value
868 .als doc-Fr-font doc-Ar-font
872 .\" NS interactive command
874 .\" NS width register `Ic' set in doc-common
876 .als Ic doc-generic-macro
877 .ds doc-Ic-usage interactive_command
883 .\" NS width register `Li' set in doc-common
885 .als Li doc-generic-macro
886 .ds doc-Li-usage argument
890 .\" NS pipe symbol (OR)
892 .\" NS this function uses the `Ic' font
894 .\" NS width register `Or' set in doc-common
896 .\" XXX: What is this function good for? It sets a font but does not print
897 .\" a pipe symbol. And it isn't documented.
899 .als Or doc-generic-macro
901 .als doc-Or-font doc-Ic-font
907 .\" NS this function uses the `Sy' font
909 .\" NS width register `Ms' set in doc-common
911 .als Ms doc-generic-macro
912 .ds doc-Ms-usage math_symbol
913 .als doc-Ms-font doc-Sy-font
916 .\" NS doc-command-name global string
917 .\" NS save first invocation of .Nm
923 .\" NS name of command or page topic
927 .\" NS doc-command-name
930 .\" NS doc-in-synopsis-count
931 .\" NS doc-indent-synopsis,
932 .\" NS doc-macro-name
934 .\" NS width register `Nm' set in doc-common
937 . if !\n[doc-arg-limit] \{\
938 . ds doc-macro-name Nm
942 . ie "\*[doc-command-name]"" \
943 . tm Usage: .Nm name ... (#\n[.c])
945 . doc-parse-args \*[doc-command-name]
948 . if !\n[doc-arg-limit] \
953 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
955 . ie "\*[doc-command-name]"" \{\
956 . tm Usage: .Nm name ... (#\n[.c])
960 . nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
961 . doc-print-and-reset
964 . nr doc-curr-font \n[.f]
965 . nr doc-curr-size \n[.ps]
969 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
970 . ie "\*[doc-command-name]"" \
971 . tm Usage: .Nm name ... (#\n[.c])
973 . \" replace previous argument (Nm) with default value
975 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
976 . nr doc-type\n[doc-arg-ptr] 2
977 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
979 . \" recompute space vector for remaining arguments
980 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
981 . nr doc-arg-limit \n[doc-arg-ptr]
982 . doc-parse-space-vector
985 . \" handle `.Nm ...' in SYNOPSIS
986 . if \n[doc-in-synopsis-count] \{\
987 . if "\*[doc-macro-name]"Nm" \{\
988 . in -\n[doc-indent-synopsis]u
989 . ie (\n[doc-in-synopsis-count] > 1) \
992 . if !\n[doc-indent-synopsis] \{\
993 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
994 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
997 . in +\n[doc-indent-synopsis]u
998 . ti -\n[doc-indent-synopsis]u
999 . nr doc-in-synopsis-count +1
1001 . if "\*[doc-command-name]"" \
1002 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1004 . nop \*[doc-Nm-font]\c
1006 . doc-print-recursive
1011 .\" NS Pa user macro
1012 .\" NS pathname: `.Pa [arg ...]'
1016 .\" NS doc-curr-font
1017 .\" NS doc-curr-size
1018 .\" NS doc-macro-name
1020 .\" NS width register `Pa' set in doc-common
1023 . if !\n[doc-arg-limit] \{\
1024 . ds doc-macro-name Pa
1025 . doc-parse-args \$@
1029 . nop \*[doc-Pa-font]~\f[P]\s[0]
1032 . if !\n[doc-arg-limit] \
1036 . doc-print-prefixes
1037 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1038 . nr doc-curr-font \n[.f]
1039 . nr doc-curr-size \n[.ps]
1040 . nop \*[doc-Pa-font]\c
1041 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1042 . \" replace previous argument (Pa) with default value
1044 . ds doc-arg\n[doc-arg-ptr] ~
1045 . nr doc-type\n[doc-arg-ptr] 2
1046 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1048 . \" recompute space vector for remaining arguments
1049 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1050 . nr doc-arg-limit \n[doc-arg-ptr]
1051 . doc-parse-space-vector
1053 . doc-print-recursive
1056 . nop \*[doc-Pa-font]~\f[P]\s[0]\c
1057 . doc-print-and-reset
1062 .\" NS Sy user macro
1065 .\" NS width register `Sy' set in doc-common
1067 .als Sy doc-generic-macro
1068 .ds doc-Sy-usage symbolic_text
1071 .\" NS Me user macro
1074 .\" NS width register `Me' set in doc-common
1076 .als Me doc-generic-macro
1077 .ds doc-Me-usage menu_entry
1080 .\" NS Tn user macro
1085 .\" NS doc-curr-font
1086 .\" NS doc-curr-size
1087 .\" NS doc-macro-name
1089 .\" NS width register `Tn' set in doc-common
1092 . if !\n[doc-arg-limit] \{\
1094 . ds doc-macro-name Tn
1095 . doc-parse-args \$@
1098 . tm Usage: .Tn trade_name ... (#\n[.c])
1101 . if !\n[doc-arg-limit] \
1105 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1106 . nr doc-curr-font \n[.f]
1107 . nr doc-curr-size \n[.ps]
1108 . nop \)\*[doc-Tn-font-size]\c
1109 . ie !\n[doc-is-reference] \{\
1110 . nop \)\*[doc-Tn-font-shape]\c
1111 . doc-print-recursive
1117 . tm Usage: .Tn trade_name ... (#\n[.c])
1123 .\" NS Va user macro
1124 .\" NS variable name
1126 .\" NS width register `Va' set in doc-common
1128 .als Va doc-generic-macro
1129 .ds doc-Va-usage variable_name
1132 .\" NS No user macro
1133 .\" NS normal text macro (default text style if mess up)
1135 .\" NS width register `No' set in doc-common
1137 .als No doc-generic-macro
1138 .ds doc-No-usage normal_text
1141 .\" NS doc-quote-left global string
1142 .\" NS left quotation character for `doc-enclose-string' and
1143 .\" NS `doc-enclose-open'
1148 .\" NS doc-quote-right global string
1149 .\" NS right quotation character for `doc-enclose-string' and
1150 .\" NS `doc-enclose-close'
1155 .\" NS Op user macro
1156 .\" NS option expression (i.e., enclose string in square brackets)
1159 .\" NS doc-macro-name
1160 .\" NS doc-quote-left
1161 .\" NS doc-quote-right
1163 .\" NS width register `Op' set in doc-common
1166 . if !\n[doc-arg-limit] \
1167 . ds doc-macro-name Op
1169 . ds doc-quote-left "\*[doc-left-bracket]
1170 . ds doc-quote-right "\*[doc-right-bracket]
1172 . doc-enclose-string \$@
1176 .\" NS Aq user macro
1177 .\" NS enclose string in angle brackets
1180 .\" NS doc-macro-name
1181 .\" NS doc-quote-left
1182 .\" NS doc-quote-right
1184 .\" NS width register `Aq' set in doc-common
1187 . if !\n[doc-arg-limit] \
1188 . ds doc-macro-name Aq
1190 . ds doc-quote-left \[la]
1191 . ds doc-quote-right \[ra]
1193 . doc-enclose-string \$@
1197 .\" NS Bq user macro
1198 .\" NS enclose string in square brackets
1201 .\" NS doc-macro-name
1202 .\" NS doc-quote-left
1203 .\" NS doc-quote-right
1205 .\" NS width register `Bq' set in doc-common
1208 . if !\n[doc-arg-limit] \
1209 . ds doc-macro-name Bq
1211 . ds doc-quote-left "\*[doc-left-bracket]
1212 . ds doc-quote-right "\*[doc-right-bracket]
1214 . doc-enclose-string \$@
1218 .\" NS Brq user macro
1219 .\" NS enclose string in braces
1222 .\" NS doc-macro-name
1223 .\" NS doc-quote-left
1224 .\" NS doc-quote-right
1226 .\" NS width register `Brq' set in doc-common
1229 . if !\n[doc-arg-limit] \
1230 . ds doc-macro-name Brq
1232 . ds doc-quote-left {
1233 . ds doc-quote-right }
1235 . doc-enclose-string \$@
1239 .\" NS Dq user macro
1240 .\" NS enclose string in double quotes
1243 .\" NS doc-macro-name
1244 .\" NS doc-quote-left
1245 .\" NS doc-quote-right
1247 .\" NS width register `Dq' set in doc-common
1250 . if !\n[doc-arg-limit] \
1251 . ds doc-macro-name Dq
1253 . ds doc-quote-left "\*[Lq]
1254 . ds doc-quote-right "\*[Rq]
1256 . doc-enclose-string \$@
1260 .\" NS Eq user macro
1261 .\" NS enclose string in user-defined quotes (args 1 and 2)
1264 .\" NS doc-macro-name
1265 .\" NS doc-quote-left
1266 .\" NS doc-quote-right
1268 .\" NS width register `Eq' set in doc-common
1271 . if !\n[doc-arg-limit] \
1272 . ds doc-macro-name Eq
1274 . ds doc-quote-left "\$1
1275 . ds doc-quote-right "\$2
1278 . doc-enclose-string \$@
1282 .\" NS Pq user macro
1283 .\" NS enclose string in parentheses
1286 .\" NS doc-macro-name
1287 .\" NS doc-quote-left
1288 .\" NS doc-quote-right
1290 .\" NS width register `Pq' set in doc-common
1293 . if !\n[doc-arg-limit] \
1294 . ds doc-macro-name Pq
1296 . ds doc-quote-left "\*[doc-left-parenthesis]
1297 . ds doc-quote-right "\*[doc-right-parenthesis]
1299 . doc-enclose-string \$@
1303 .\" NS Ql user macro
1304 .\" NS quoted literal
1306 .\" is in file doc-[dit|n]roff
1309 .\" NS Qq user macro
1310 .\" NS enclose string in straight double quotes
1313 .\" NS doc-macro-name
1314 .\" NS doc-quote-left
1315 .\" NS doc-quote-right
1317 .\" NS width register `Qq' set in doc-common
1320 . if !\n[doc-arg-limit] \
1321 . ds doc-macro-name Qq
1323 . ds doc-quote-left "\*[q]
1324 . ds doc-quote-right "\*[q]
1326 . doc-enclose-string \$@
1330 .\" NS Sq user macro
1331 .\" NS enclose string in single quotes
1334 .\" NS doc-macro-name
1335 .\" NS doc-quote-left
1336 .\" NS doc-quote-right
1338 .\" NS width register `Sq' set in doc-common
1341 . if !\n[doc-arg-limit] \
1342 . ds doc-macro-name Sq
1344 . ds doc-quote-left "\*[doc-left-singlequote]
1345 . ds doc-quote-right "\*[doc-right-singlequote]
1347 . doc-enclose-string \$@
1351 .\" NS Es user macro
1352 .\" NS set up arguments (i.e., the left and right quotation character as
1353 .\" NS first and second argument) for .En call
1357 .\" NS doc-macro-name
1358 .\" NS doc-quote-left
1359 .\" NS doc-quote-right
1362 . if !\n[doc-arg-limit] \{\
1363 . ie (\n[.$] > 2) \{\
1364 . ds doc-macro-name Es
1365 . doc-parse-args \$@
1368 . ds doc-quote-left "\$1
1369 . ds doc-quote-right "\$2
1372 . if !\n[doc-arg-limit] \
1376 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1378 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1380 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1381 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1383 . doc-print-and-reset
1387 .\" NS doc-have-slot global register (bool)
1388 .\" NS set if `doc-enclose-string' has created a slot for closing
1394 .\" NS doc-enclose-string macro
1395 .\" NS enclose string with given args (e.g. [ and ])
1400 .\" NS doc-have-slot
1402 .\" NS local variables:
1408 .\" NS doc-quote-left
1409 .\" NS doc-quote-right
1411 .de doc-enclose-string
1412 . if \n[doc-in-synopsis-count] \
1413 . doc-set-hard-space
1415 . if !\n[doc-arg-limit] \{\
1417 . doc-parse-args \$@
1419 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1422 . if !\n[doc-arg-limit] \
1425 . nr doc-curr-font \n[.f]
1426 . nr doc-curr-size \n[.ps]
1429 . doc-print-prefixes
1430 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1431 . nop \)\*[doc-quote-left]\)\c
1432 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1434 . nop \)\*[doc-quote-right]\)\c
1435 . doc-print-and-reset
1438 . \" test whether last arguments are of type closing punctuation
1440 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1441 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1442 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1445 . \" prepend closing delimiter
1447 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1450 . \" test whether last arguments are macros which continue the line
1452 . nr doc-reg-des \n[doc-arg-limit]
1453 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1454 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1456 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1461 . \" if there are no trailing macros to be skipped, append argument
1462 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1463 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1465 . \" if a previous call to `doc-enclose-string' has already created
1466 . \" a slot, prepend argument
1467 . ie \n[doc-have-slot] \
1468 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1470 . \" we have to shift all arguments to the right
1472 . nr doc-reg-des1 \n[doc-arg-limit]
1473 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1474 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1475 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1476 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1477 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1478 . nr doc-reg-des1 -1
1479 . nr doc-reg-des2 -1
1481 . nr doc-arg-limit +1
1483 . \" finally, insert closing delimiter into the freed slot and
1484 . \" recompute spacing vector
1485 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1486 . nr doc-type\n[doc-reg-des] 3
1487 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1488 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1489 . doc-parse-space-vector
1490 . nr doc-have-slot 1
1493 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1496 . if \n[doc-in-synopsis-count] \
1497 . doc-set-soft-space
1501 .\" NS En user macro
1502 .\" NS enclose arguments with quotation characters set up with `.Es'
1504 .als En doc-enclose-string
1507 .\" NS Ao user macro
1511 .\" NS doc-macro-name
1512 .\" NS doc-quote-left
1514 .\" NS width register `Ao' set in doc-common
1517 . if !\n[doc-arg-limit] \
1518 . ds doc-macro-name Ao
1520 . ds doc-quote-left \[la]
1522 . doc-enclose-open \$@
1526 .\" NS Ac user macro
1530 .\" NS doc-macro-name
1531 .\" NS doc-quote-right
1533 .\" NS width register `Ac' set in doc-common
1536 . if !\n[doc-arg-limit] \
1537 . ds doc-macro-name Ac
1539 . ds doc-quote-right \[ra]
1541 . doc-enclose-close \$@
1545 .\" NS Bo user macro
1549 .\" NS doc-macro-name
1550 .\" NS doc-quote-left
1552 .\" NS width register `Bo' set in doc-common
1555 . if !\n[doc-arg-limit] \
1556 . ds doc-macro-name Bo
1558 . ds doc-quote-left "\*[doc-left-bracket]
1560 . doc-enclose-open \$@
1564 .\" NS Bc user macro
1565 .\" NS bracket close
1568 .\" NS doc-macro-name
1569 .\" NS doc-quote-right
1571 .\" NS width register `Bc' set in doc-common
1574 . if !\n[doc-arg-limit] \
1575 . ds doc-macro-name Bc
1577 . ds doc-quote-right "\*[doc-right-bracket]
1579 . doc-enclose-close \$@
1583 .\" NS Bro user macro
1587 .\" NS doc-macro-name
1588 .\" NS doc-quote-left
1590 .\" NS width register `Bro' set in doc-common
1593 . if !\n[doc-arg-limit] \
1594 . ds doc-macro-name Bo
1596 . ds doc-quote-left {
1598 . doc-enclose-open \$@
1602 .\" NS Brc user macro
1606 .\" NS doc-macro-name
1607 .\" NS doc-quote-right
1609 .\" NS width register `Brc' set in doc-common
1612 . if !\n[doc-arg-limit] \
1613 . ds doc-macro-name Bc
1615 . ds doc-quote-right }
1617 . doc-enclose-close \$@
1621 .\" NS Do user macro
1622 .\" NS double quote open
1625 .\" NS doc-macro-name
1626 .\" NS doc-quote-left
1628 .\" NS width register `Do' set in doc-common
1631 . if !\n[doc-arg-limit] \
1632 . ds doc-macro-name Do
1634 . ds doc-quote-left "\*[Lq]
1636 . doc-enclose-open \$@
1640 .\" NS Dc user macro
1641 .\" NS double quote close
1644 .\" NS doc-macro-name
1645 .\" NS doc-quote-right
1647 .\" NS width register `Dc' set in doc-common
1650 . if !\n[doc-arg-limit] \
1651 . ds doc-macro-name Dc
1653 . ds doc-quote-right "\*[Rq]
1655 . doc-enclose-close \$@
1659 .\" NS Eo user macro
1660 .\" NS enclose open (using first argument as beginning of enclosure)
1663 .\" NS doc-macro-name
1664 .\" NS doc-quote-left
1666 .\" NS width register `Eo' set in doc-common
1669 . if !\n[doc-arg-limit] \
1670 . ds doc-macro-name Eo
1672 . ds doc-quote-left "\$1
1675 . doc-enclose-open \$@
1679 .\" NS Ec user macro
1680 .\" NS enclose close (using first argument as end of enclosure)
1683 .\" NS doc-macro-name
1684 .\" NS doc-quote-right
1686 .\" NS width register `Ec' set in doc-common
1689 . if !\n[doc-arg-limit] \
1690 . ds doc-macro-name Ec
1692 . ds doc-quote-right "\$1
1695 . doc-enclose-close \$@
1699 .\" NS Oo user macro
1703 .\" NS doc-macro-name
1704 .\" NS doc-quote-left
1706 .\" NS width register `Oo' set in doc-common
1709 . if !\n[doc-arg-limit] \
1710 . ds doc-macro-name Oo
1712 . ds doc-quote-left [
1714 . doc-enclose-open \$@
1718 .\" NS Oc user macro
1722 .\" NS doc-macro-name
1723 .\" NS doc-quote-right
1725 .\" NS width register `Oc' set in doc-common
1728 . if !\n[doc-arg-limit] \
1729 . ds doc-macro-name Oc
1731 . ds doc-quote-right ]
1733 . doc-enclose-close \$@
1737 .\" NS Po user macro
1738 .\" NS parenthesis open
1741 .\" NS doc-macro-name
1742 .\" NS doc-quote-left
1744 .\" NS width register `Po' set in doc-common
1747 . if !\n[doc-arg-limit] \
1748 . ds doc-macro-name Po
1750 . ds doc-quote-left "\*[doc-left-parenthesis]
1752 . doc-enclose-open \$@
1756 .\" NS Pc user macro
1757 .\" NS parenthesis close
1760 .\" NS doc-macro-name
1761 .\" NS doc-quote-right
1763 .\" NS width register `Pc' set in doc-common
1766 . if !\n[doc-arg-limit] \
1767 . ds doc-macro-name Pc
1769 . ds doc-quote-right "\*[doc-right-parenthesis]
1771 . doc-enclose-close \$@
1775 .\" NS Qo user macro
1776 .\" NS straight double quote open
1779 .\" NS doc-macro-name
1780 .\" NS doc-quote-left
1782 .\" NS width register `Qo' set in doc-common
1785 . if !\n[doc-arg-limit] \
1786 . ds doc-macro-name Qo
1788 . ds doc-quote-left "\*[q]
1790 . doc-enclose-open \$@
1794 .\" NS Qc user macro
1795 .\" NS straight double quote close
1798 .\" NS doc-macro-name
1799 .\" NS doc-quote-right
1801 .\" NS width register `Qc' set in doc-common
1804 . if !\n[doc-arg-limit] \
1805 . ds doc-macro-name Qc
1807 . ds doc-quote-right "\*[q]
1809 . doc-enclose-close \$@
1813 .\" NS So user macro
1814 .\" NS single quote open
1817 .\" NS doc-macro-name
1818 .\" NS doc-quote-left
1820 .\" NS width register `So' set in doc-common
1823 . if !\n[doc-arg-limit] \
1824 . ds doc-macro-name So
1826 . ds doc-quote-left "\*[doc-left-singlequote]
1828 . doc-enclose-open \$@
1832 .\" NS Sc user macro
1833 .\" NS single quote close
1836 .\" NS doc-macro-name
1837 .\" NS doc-quote-right
1839 .\" NS width register `Sc' set in doc-common
1842 . if !\n[doc-arg-limit] \
1843 . ds doc-macro-name Sc
1845 . ds doc-quote-right "\*[doc-right-singlequote]
1847 . doc-enclose-close \$@
1851 .\" NS Xo user macro
1855 .\" NS doc-macro-name
1856 .\" NS doc-quote-left
1858 .\" NS width register `Xo' set in doc-common
1861 . if !\n[doc-arg-limit] \
1862 . ds doc-macro-name Xo
1866 . doc-enclose-open \$@
1870 .\" NS Xc user macro
1874 .\" NS doc-macro-name
1875 .\" NS doc-quote-right
1877 .\" NS width register `Xc' set in doc-common
1880 . if !\n[doc-arg-limit] \
1881 . ds doc-macro-name Xc
1883 . ds doc-quote-right
1885 . doc-enclose-close \$@
1889 .\" NS doc-nesting-level global register
1890 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1892 .nr doc-nesting-level 0
1895 .\" NS doc-in-list global register (bool)
1896 .\" NS whether we are in (logical) .It
1901 .\" NS doc-enclose-open macro
1902 .\" NS enclose string open
1906 .\" NS doc-nesting-level
1908 .de doc-enclose-open
1909 . if !\n[doc-arg-limit] \
1910 . doc-parse-args \$@
1913 . doc-print-prefixes
1916 . nop \)\*[doc-quote-left]\)\c
1918 . \" start enclosure box
1919 . box doc-enclosure-box\n[doc-nesting-level]
1920 . ev doc-enclosure-env\n[doc-nesting-level]
1924 . \" we insert something to make .chop always work
1927 . \" increase nesting level *after* parsing of arguments
1928 . nr doc-nesting-level +1
1930 . if \n[doc-arg-limit] \{\
1932 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1933 . doc-print-recursive
1940 .\" NS doc-enclose-close macro
1941 .\" NS enclose string close
1944 .\" NS doc-nesting-level
1946 .de doc-enclose-close
1947 . nr doc-nesting-level -1
1949 . \" finish enclosure box
1953 . chop doc-enclosure-box\n[doc-nesting-level]
1954 . unformat doc-enclosure-box\n[doc-nesting-level]
1957 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1958 . nop \)\*[doc-quote-right]\)\c
1960 . if !\n[doc-arg-limit] \{\
1961 . doc-parse-args \$@
1964 . doc-print-and-reset
1967 . if \n[doc-arg-limit] \{\
1968 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1969 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1971 . doc-print-recursive
1974 . doc-print-and-reset
1977 . \" shall we finish .It request?
1978 . if !"\*[doc-macro-name]"It" \
1979 . if \n[doc-in-list] \
1980 . if !\n[doc-nesting-level] \
1981 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
1985 .\" NS Pf user macro
1986 .\" NS prefix: `.Pf prefix arg ...'
1990 .\" NS doc-macro-name
1991 .\" NS doc-quote-left
1993 .\" NS width register `Pf' set in doc-common
1996 . if !\n[doc-arg-limit] \
1997 . ds doc-macro-name Pf
1999 . ie \n[doc-arg-limit] \{\
2000 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2002 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2005 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2011 . doc-parse-args \$@
2013 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2017 . if \n[doc-arg-limit] \{\
2019 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2020 . doc-print-and-reset
2022 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2027 .\" NS Ns user macro
2028 .\" NS remove space (space removal done by `doc-parse-args')
2032 .\" NS doc-macro-name
2034 .\" NS width register `Ns' set in doc-common
2037 . if !\n[doc-arg-limit] \{\
2039 . ds doc-macro-name Ns
2040 . doc-parse-args \$@
2043 . tm Usage: .Ns must be called with arguments (#\n[.c])
2046 . if \n[doc-arg-limit] \{\
2048 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2049 . doc-print-recursive
2056 .\" NS Ap user macro
2057 .\" NS append an apostrophe
2059 .\" NS width register `Ap' set in doc-common
2062 . ie !\n[doc-arg-limit] \
2063 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2067 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2068 . doc-print-recursive
2075 .\" NS doc-space global string
2076 .\" NS current inter-argument space
2078 .ds doc-space "\*[doc-soft-space]
2081 .\" NS doc-soft-space constant string
2082 .\" NS soft (stretchable) space (defined in doc-common)
2085 .\" NS doc-hard-space constant string
2086 .\" NS hard (unpaddable) space (defined in doc-common)
2089 .\" NS doc-set-hard-space macro
2090 .\" NS set current space string to hard (unpaddable) space.
2093 .\" NS doc-saved-space
2096 .de doc-set-hard-space
2097 . ie "\*[doc-space]"" \
2098 . ds doc-saved-space "\*[doc-hard-space]
2100 . ds doc-space "\*[doc-hard-space]
2104 .\" NS doc-set-soft-space macro
2105 .\" NS set current space string to soft space
2108 .\" NS doc-saved-space
2111 .de doc-set-soft-space
2112 . ie "\*[doc-space]"" \
2113 . ds doc-saved-space "\*[doc-soft-space]
2115 . ds doc-space "\*[doc-soft-space]
2119 .\" NS doc-space-mode global register (bool)
2120 .\" NS default is one (space mode on)
2122 .nr doc-space-mode 1
2125 .\" NS doc-saved-space global string
2126 .\" NS saved value of `doc-space'
2128 .ds doc-saved-space "\*[doc-space]
2131 .\" NS doc-have-space global register (bool)
2132 .\" NS set if last command was horizontal space
2134 .nr doc-have-space 0
2137 .\" NS Sm user macro
2138 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2140 .\" NS without argument, toggle space mode
2143 .\" NS doc-arg-limit
2146 .\" NS doc-macro-name
2148 .\" NS doc-saved-space
2150 .\" NS doc-space-mode
2153 .\" NS local variables:
2156 .\" NS width register `Sm' set in doc-common
2159 . ie \n[doc-have-space] \
2164 . if !\n[doc-arg-limit] \{\
2166 . ds doc-macro-name Sm
2167 . doc-parse-args \$@
2170 . ie \n[doc-space-mode] \
2171 . nr doc-space-mode 0
2173 . nr doc-space-mode 1
2176 . if !\n[doc-arg-limit] \
2181 . \" avoid a warning message in case `Sm' is the last parameter
2182 . if !d doc-arg\n[doc-arg-ptr] \
2183 . ds doc-arg\n[doc-arg-ptr]
2185 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2186 . ds doc-space "\*[doc-saved-space]
2187 . nr doc-space-mode 1
2190 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2191 . ds doc-saved-space "\*[doc-space]
2193 . nr doc-space-mode 0
2196 . \" no argument for Sm
2198 . ie \n[doc-space-mode] \
2199 . nr doc-space-mode 0
2201 . nr doc-space-mode 1
2204 . ie \n[doc-space-mode] \{\
2205 . \" recompute space vector for remaining arguments
2206 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2207 . nr doc-arg-limit \n[doc-arg-ptr]
2208 . if \n[doc-num-args] \
2209 . doc-parse-space-vector
2211 . \" finish line only if it is interrupted and `doc-have-space'
2213 . if \n[doc-reg-Sm] \
2218 . \" reset remaining space vector elements
2219 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2220 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2221 . ds doc-space\n[doc-reg-Sm]
2223 . \" the body of a `while' request must end with the fitting `\}'!
2227 . \" do we have parameters to print?
2228 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2229 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2230 . ie (\n[doc-arg-ptr] > 1) \
2231 . doc-print-and-reset
2236 . \" skip `Sm' argument
2238 . doc-print-recursive
2243 .\" NS doc-arg-type immediate register
2244 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2245 .\" NS punctuation prefix=4)
2250 .\" NS doc-get-arg-type macro
2251 .\" NS get argument type
2253 .\" NS this macro expects the width of the argument in `doc-width'
2258 .de doc-get-arg-type
2261 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2262 . ie (\n[doc-width] == 1) \{\
2263 . if r doc-punct\$1 \
2264 . nr doc-arg-type \n[doc-punct\$1]
2274 .\" NS doc-get-arg-type* macro
2275 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2277 .\" NS this macro sets the `doc-width' register using the `length' request
2278 .\" NS to get the number of characters in a string literally
2284 .de doc-get-arg-type*
2286 . length doc-width "\*[doc-arg\$1]
2288 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2289 . ie (\n[doc-width] == 1) \{\
2290 . if r doc-punct\*[doc-arg\$1] \
2291 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2294 . if r \*[doc-arg\$1] \
2295 . if d \*[doc-arg\$1] \
2301 .\" NS doc-set-spacing-1 macro
2302 .\" NS set spacing for macros
2307 .\" NS local variables:
2308 .\" NS doc-reg-dssfm
2309 .\" NS doc-reg-dssfm1
2311 .de doc-set-spacing-1
2312 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2314 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2316 . ie (\n[doc-reg-dssfm1] == 3) \{\
2317 . if \n[doc-arg-limit] \{\
2318 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2319 . ds doc-space\n[doc-reg-dssfm]
2321 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2324 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2326 . ie (\n[doc-reg-dssfm1] == 2) \{\
2327 . if \n[doc-arg-limit] \{\
2328 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2329 . ds doc-space\n[doc-reg-dssfm]
2331 . ds doc-space\n[doc-arg-limit]
2334 . ds doc-space\n[doc-arg-limit]
2339 .\" NS doc-set-spacing-2 macro
2340 .\" NS set spacing for strings
2345 .de doc-set-spacing-2
2346 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2350 .\" NS doc-set-spacing-3 macro
2351 .\" NS set spacing for punctuation suffixes
2356 .\" NS local variables:
2357 .\" NS doc-reg-dssfps
2359 .de doc-set-spacing-3
2360 . if \n[doc-arg-limit] \{\
2361 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2362 . ds doc-space\n[doc-reg-dssfps]
2365 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2369 .\" NS doc-set-spacing-4 macro
2370 .\" NS set spacing for punctuation prefixes
2375 .de doc-set-spacing-4
2376 . ds doc-space\n[doc-arg-limit]
2380 .\" type switches (on current argument doc-arg-ptr)
2383 .\" NS doc-do-1 macro
2384 .\" NS call request if macro
2387 . \*[doc-arg\n[doc-arg-ptr]]
2391 .\" NS doc-do-2 macro
2392 .\" NS call .doc-print-recursive if string
2394 .als doc-do-2 doc-print-recursive
2397 .\" NS doc-do-3 macro
2398 .\" NS call .doc-print-recursive if punctuation suffix
2400 .als doc-do-3 doc-print-recursive
2403 .\" NS doc-do-4 macro
2404 .\" NS call .doc-print-recursive if punctuation prefix
2406 .als doc-do-4 doc-print-recursive
2409 .\" NS doc-fontmode-depth global register
2410 .\" NS font mode level
2412 .nr doc-fontmode-depth 0
2415 .\" NS doc-fontmode-font-stackXXX global register
2416 .\" NS stack of saved current font values from `Bf' request
2419 .\" NS doc-fontmode-depth
2421 .nr doc-fontmode-font-stack0 0
2424 .\" NS doc-fontmode-size-stackXXX global register
2425 .\" NS stack of saved current size values from `Bf' request
2428 .\" NS doc-fontmode-depth
2430 .nr doc-fontmode-size-stack0 0
2433 .\" NS Bf user macro
2434 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2437 .\" NS doc-fontmode-depth
2438 .\" NS doc-fontmode-font-stackXXX
2439 .\" NS doc-fontmode-size-stackXXX
2440 .\" NS doc-macro-name
2442 .\" NS width register `Bf' set in doc-common
2445 . ds doc-macro-name Bf
2448 . nr doc-fontmode-depth +1
2450 . \" save current font and size
2451 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2452 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2455 . nop \*[doc-Em-font]\c
2456 . el \{ .ie "\$1"Li" \
2457 . nop \*[doc-Li-font]\c
2458 . el \{ .ie "\$1"Sy" \
2459 . nop \*[doc-Sy-font]\c
2460 . el \{ .ie "\$1"-emphasis" \
2461 . nop \*[doc-Em-font]\c
2462 . el \{ .ie "\$1"-literal" \
2463 . nop \*[doc-Li-font]\c
2464 . el \{ .ie "\$1"-symbolic" \
2465 . nop \*[doc-Sy-font]\c
2467 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2471 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2475 .\" NS Ef user macro
2476 .\" NS end font mode
2479 .\" NS doc-macro-name
2481 .\" NS width register `Ef' set in doc-common
2484 . ds doc-macro-name Ef
2486 . ie \n[doc-fontmode-depth] \{\
2487 . \" restore saved font and size
2488 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2489 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2491 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2492 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2493 . nr doc-fontmode-depth -1
2496 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2500 .\" NS doc-keep-type global register
2501 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2506 .\" NS Bk user macro
2510 .\" NS doc-keep-type
2511 .\" NS doc-macro-name
2513 .\" NS width register `Bk' set in doc-common
2516 . ds doc-macro-name Bk
2518 . if \n[doc-keep-type] \
2519 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2521 . ie "\$1"-lines" \{\
2522 . nr doc-keep-type 2
2523 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2525 . el \{ .ie "\$1"-words" \{\
2526 . nr doc-keep-type 1
2527 . doc-set-hard-space
2529 . el \{ .ie "\$1"" \{\
2531 . nr doc-keep-type 1
2532 . doc-set-hard-space
2535 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2536 . nr doc-keep-type 3
2539 \#. nr doc-nesting-level +1
2543 .\" NS Ek user macro
2547 .\" NS doc-keep-type
2548 .\" NS doc-macro-name
2550 .\" NS width register `Ek' set in doc-common
2553 . ds doc-macro-name Ek
2555 \#. nr doc-nesting-level -1
2558 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2560 . if !\n[doc-keep-type] \
2561 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2563 . ie (\n[doc-keep-type] == 1) \
2564 . doc-set-soft-space
2565 . el \{ .if (\n[doc-keep-type] == 2) \
2566 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2569 . nr doc-keep-type 0
2571 \#. if !"\*[doc-out-string]"" \
2572 \#. doc-print-out-string
2576 .\" NS doc-display-depth global register
2577 .\" NS display level
2579 .nr doc-display-depth 0
2582 .\" NS doc-is-compact global register (bool)
2583 .\" NS set if the `compact' keyword is given
2585 .nr doc-is-compact 0
2588 .\" NS doc-display-type-stackXXX global string
2589 .\" NS the display type stack
2592 .\" NS doc-display-depth
2594 .ds doc-display-type-stack0
2597 .\" NS doc-display-indent-stackXXX global register
2598 .\" NS stack of display indentation values
2601 .\" NS doc-display-depth
2603 .nr doc-display-indent-stack0 0
2606 .\" NS doc-display-ad-stackXXX global register
2607 .\" NS stack of saved adjustment modes
2610 .\" NS doc-display-depth
2612 .nr doc-display-ad-stack0 0
2615 .\" NS doc-display-fi-stackXXX global register
2616 .\" NS stack of saved fill modes
2619 .\" NS doc-display-depth
2621 .nr doc-display-fi-stack0 0
2624 .\" NS Bd user macro
2625 .\" NS begin display
2627 .\" NS width register `Bd' set in doc-common
2630 .\" NS doc-curr-font
2631 .\" NS doc-curr-size
2632 .\" NS doc-display-depth
2633 .\" NS doc-display-ad-stackXXX
2634 .\" NS doc-display-fi-stackXXX
2635 .\" NS doc-display-file
2636 .\" NS doc-display-indent-stackXXX
2637 .\" NS doc-display-type-stackXXX
2638 .\" NS doc-is-compact
2639 .\" NS doc-macro-name
2641 .\" NS local variables:
2645 . ds doc-macro-name Bd
2648 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2649 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2653 . nr doc-is-compact 0
2654 . ds doc-display-file
2656 . nr doc-display-depth +1
2658 . \" save current adjustment and fill modes
2659 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2660 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2662 . ie "\$1"-literal" \{\
2663 . ds doc-display-type-stack\n[doc-display-depth] literal
2664 . nr doc-curr-font \n[.f]
2665 . nr doc-curr-size \n[.ps]
2668 . nop \*[doc-Li-font]\c
2675 . el \{ .ie "\$1"-filled" \{\
2676 . ds doc-display-type-stack\n[doc-display-depth] filled
2680 . el \{ .ie "\$1"-ragged" \{\
2681 . ds doc-display-type-stack\n[doc-display-depth] ragged
2685 . el \{ .ie "\$1"-centered" \{\
2686 . ds doc-display-type-stack\n[doc-display-depth] centered
2690 . el \{ .ie "\$1"-unfilled" \{\
2691 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2695 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2696 . tm1 " in .Bd request (#\n[.c])
2700 . \" have we seen an argument?
2701 . if \n[doc-reg-Bd] \{\
2703 . \" check other arguments
2705 . doc-do-Bd-args \$@
2708 . \" avoid warning about non-existent register
2709 . if !r doc-display-indent-stack\n[doc-display-depth] \
2710 . nr doc-display-indent-stack\n[doc-display-depth] 0
2712 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2713 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2715 . if !\n[doc-is-compact] \{\
2716 . if !\n[doc-in-synopsis-count] \{\
2717 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2718 . sp \n[doc-display-vertical]u
2720 ' sp \n[doc-display-vertical]u
2726 . if !"\*[doc-display-file]"" \
2727 . so \*[doc-display-file]
2729 . nr doc-is-compact 0
2730 . ds doc-display-file
2734 .\" NS doc-do-Bd-args macro
2735 .\" NS resolve remaining .Bd arguments
2738 .\" NS doc-display-file
2739 .\" NS doc-display-indent-stackXXX
2740 .\" NS doc-is-compact
2742 .\" NS local variables:
2744 .\" NS doc-reg-ddBa1
2745 .\" NS doc-reg-ddBa2
2746 .\" NS doc-reg-ddBa3
2747 .\" NS doc-reg-ddBa4
2753 . ie "\$1"-offset" \{\
2757 . nr doc-display-indent-stack\n[doc-display-depth] 0
2758 . el \{ .ie "\$2"right" \
2759 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2760 . el \{ .ie "\$2"center" \
2761 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2762 . el \{ .ie "\$2"indent" \
2763 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2764 . el \{ .ie "\$2"indent-two" \
2765 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2770 . \" not a known keyword
2771 . if (\n[doc-reg-ddBa] == 1) \{\
2774 . nr doc-reg-ddBa1 0
2775 . if \B
\a(\$2)
\a \{\
2776 . \" disable warnings related to scaling indicators (32)
2777 . nr doc-reg-ddBa2 \n[.warn]
2778 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2780 . \" values without a scaling indicator are taken as strings;
2781 . \" we test whether the parameter string with and without the last
2782 . \" character yields identical numerical results (ignoring the
2783 . \" scaling indicator)
2784 . ds doc-str-ddBa "\$2
2785 . substring doc-str-ddBa 1 -1
2786 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2787 . nr doc-reg-ddBa3 (;(\$2))
2788 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2789 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2790 . nr doc-reg-ddBa1 1
2793 . \" enable all warnings again
2794 . warn \n[doc-reg-ddBa2]
2797 . ie \n[doc-reg-ddBa1] \
2798 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2800 . doc-get-width "\$2"
2801 . ie (\n[doc-width] <= 3) \{\
2802 . \" if the offset parameter is a macro, use the macro's
2803 . \" width as specified in doc-common
2804 . doc-get-arg-type "\$2"
2805 . ie (\n[doc-arg-type] == 1) \
2806 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2808 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2811 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2814 . el \{ .ie "\$1"-compact" \
2815 . nr doc-is-compact 1
2816 . el \{ .ie "\$1"-file" \{\
2818 . ds doc-display-file "\$2
2822 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2825 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2828 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2829 . shift \n[doc-reg-ddBa]
2830 . doc-do-Bd-args \$@
2835 .\" NS Ed user macro
2839 .\" NS doc-display-depth
2840 .\" NS doc-display-indent-stackXXX
2841 .\" NS doc-display-type-stackXXX
2842 .\" NS doc-macro-name
2844 .\" NS width register `Ed' set in doc-common
2847 . ds doc-macro-name Ed
2851 . if !\n[doc-display-depth] \{\
2852 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2853 . nr doc-display-depth 1
2856 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2857 . ft \n[doc-curr-font]
2858 . ps \n[doc-curr-size]u
2861 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2863 . \" restore saved adjustment and fill modes
2864 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2868 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2870 . nr doc-display-indent-stack\n[doc-display-depth] 0
2871 . ds doc-display-type-stack\n[doc-display-depth]
2872 . nr doc-display-depth -1
2876 .\" NS doc-list-type-stackXXX global string
2877 .\" NS stack of list types
2880 .\" NS doc-list-depth
2882 .ds doc-list-type-stack1
2885 .\" NS doc-list-indent-stackXXX global register
2886 .\" NS stack of list indentation values
2889 .\" NS doc-list-depth
2891 .nr doc-list-indent-stack1 0
2894 .\" NS doc-list-have-indent-stackXXX global register (bool)
2895 .\" NS an indentation value is active
2898 .\" NS doc-list-depth
2900 .nr doc-list-have-indent-stack1 0
2903 .\" NS Bl user macro
2906 .\" NS width register `Bl' set in doc-common
2911 .\" NS doc-list-depth
2912 .\" NS doc-list-have-indent-stackXXX
2913 .\" NS doc-list-indent-stackXXX
2914 .\" NS doc-list-type-stackXXX
2915 .\" NS doc-macro-name
2917 .\" NS doc-num-columns
2919 .\" NS local variables:
2928 . ds doc-macro-name Bl
2929 . nr doc-list-depth +1
2932 . ie "\$1"-hang" \{\
2933 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2934 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2935 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2937 . el \{ .ie "\$1"-tag" \{\
2938 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2939 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2941 . el \{ .ie "\$1"-item" \{\
2942 . ds doc-list-type-stack\n[doc-list-depth] item-list
2943 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2945 . el \{ .ie "\$1"-enum" \{\
2946 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2947 . nr doc-list-indent-stack\n[doc-list-depth] 3n
2948 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2950 . el \{ .ie "\$1"-bullet" \{\
2951 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
2952 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2953 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2955 . el \{ .ie "\$1"-dash" \{\
2956 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2957 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2958 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2960 . el \{ .ie "\$1"-hyphen" \{\
2961 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2962 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2963 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2965 . el \{ .ie "\$1"-inset" \{\
2966 . ds doc-list-type-stack\n[doc-list-depth] inset-list
2967 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2969 . el \{ .ie "\$1"-diag" \{\
2970 . ds doc-list-type-stack\n[doc-list-depth] diag-list
2972 . el \{ .ie "\$1"-ohang" \{\
2973 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
2974 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2976 . el \{ .ie "\$1"-column" \{\
2977 . ds doc-list-type-stack\n[doc-list-depth] column-list
2981 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
2982 . tm1 " in .Bl request
2985 . \}\}\}\}\}\}\}\}\}\}\}
2987 . \" we have seen a list type
2988 . if !\n[doc-arg-ptr] \{\
2991 . nr doc-list-depth -1
2997 . \" fill argument vector
2999 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3000 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3004 . doc-increment-list-stack
3007 . nr doc-arg-limit \n[.$]
3011 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3013 . \" initialize column list
3014 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3015 . doc-set-column-tab \n[doc-num-columns]
3016 ' in -\n[doc-column-indent-width]u
3017 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3018 . sp \n[doc-display-vertical]u
3021 . nr doc-num-columns 0
3028 .\" NS doc-Bl-usage macro
3031 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3032 . tm1 " [-width <string>] [-xwidth <command>]
3033 . tm1 " [-offset <string>] [-compact]
3034 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3035 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3036 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3040 .\" NS doc-do-Bl-args macro
3041 .\" NS resolve remaining .Bl arguments
3046 .\" NS doc-compact-list-stackXXX
3047 .\" NS doc-list-indent-stackXXX
3048 .\" NS doc-list-offset-stackXXX
3049 .\" NS doc-num-columns
3050 .\" NS doc-tag-prefix-stackXXX
3051 .\" NS doc-tag-width-stackXXX
3053 .\" NS local variables:
3057 .\" NS doc-reg-dBla1
3058 .\" NS doc-reg-dBla2
3059 .\" NS doc-reg-dBla3
3060 .\" NS doc-reg-dBla4
3062 .\" NS doc-str-dBla1
3067 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3070 . \" avoid a warning message in case e.g. `-offset' has no parameter
3071 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3072 . if !d doc-arg\n[doc-reg-dBla] \
3073 . ds doc-arg\n[doc-reg-dBla]
3077 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3078 . nr doc-compact-list-stack\n[doc-list-depth] 1
3080 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3081 . ie (\n[doc-list-depth] > 1) \{\
3082 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3083 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3084 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3085 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3086 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3089 . tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
3092 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3094 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3095 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3097 . \" test whether argument is a valid numeric expression
3098 . nr doc-reg-dBla1 0
3099 . if \B
\a(\*[doc-str-dBla])
\a \{\
3100 . \" disable warnings related to scaling indicators (32)
3101 . nr doc-reg-dBla2 \n[.warn]
3102 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3104 . \" values without a scaling indicator are taken as strings;
3105 . \" we test whether the parameter string with and without the last
3106 . \" character yields identical numerical results (ignoring the
3107 . \" scaling indicator)
3108 . ds doc-str-dBla1 "\*[doc-str-dBla]
3109 . substring doc-str-dBla1 1 -1
3110 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3111 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3112 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3113 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3114 . nr doc-reg-dBla1 1
3117 . \" enable all warnings again
3118 . warn \n[doc-reg-dBla2]
3121 . ie \n[doc-reg-dBla1] \
3122 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3124 . doc-get-arg-width \n[doc-arg-ptr]
3125 . ie (\n[doc-width] == 2) \{\
3126 . \" if the width parameter is a macro, use the macro's
3127 . \" width as specified in doc-common
3128 . doc-get-arg-type \*[doc-str-dBla]
3129 . ie (\n[doc-arg-type] == 1) \
3130 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3132 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3135 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3138 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3140 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3142 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3143 . substring doc-str-dBla 1 2
3144 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3145 . \" execute string in a box to get the width of the diversion
3146 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3147 . doc-save-global-vars
3154 . nop \*[doc-str-dBla]
3158 . doc-restore-global-vars
3159 . doc-get-width \h'\n[dl]u'
3161 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3164 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3167 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3168 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3170 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3171 . nr doc-reg-dBla1 0
3172 . if \B
\a(\*[doc-str-dBla])
\a \{\
3173 . nr doc-reg-dBla2 \n[.warn]
3174 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3176 . ds doc-str-dBla1 "\*[doc-str-dBla]
3177 . substring doc-str-dBla1 1 -1
3178 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3179 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3180 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3181 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3182 . nr doc-reg-dBla1 1
3185 . warn \n[doc-reg-dBla2]
3188 . ie \n[doc-reg-dBla1] \
3189 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3191 . doc-get-arg-width \n[doc-arg-ptr]
3192 . ie (\n[doc-width] <= 3) \{\
3193 . \" if the offset parameter is a macro, use the macro's
3194 . \" width as specified in doc-common
3195 . doc-get-arg-type \*[doc-str-dBla]
3196 . ie (\n[doc-arg-type] == 1) \
3197 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3199 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3202 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3208 . \" not a known keyword, so it specifies the width of the next column
3209 . \" (if it is a column list)
3210 . if !\n[doc-reg-dBla] \{\
3211 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3212 . nr doc-num-columns +1
3213 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3216 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3217 . tm1 " in .Bl request (#\n[.c])
3220 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3225 .\" NS doc-save-global-vars macro
3226 .\" NS save all global variables
3228 .\" NS local variables:
3231 .de doc-save-global-vars
3232 . ds doc-macro-name-saved "\*[doc-macro-name]
3233 . nr doc-arg-limit-saved \n[doc-arg-limit]
3234 . nr doc-num-args-saved \n[doc-num-args]
3235 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3238 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3239 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3240 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3241 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3242 . nr doc-reg-dsgv +1
3245 . nr doc-curr-font-saved \n[doc-curr-font]
3246 . nr doc-curr-size-saved \n[doc-curr-size]
3247 . nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
3248 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3249 . nr doc-have-decl-saved \n[doc-have-decl]
3250 . nr doc-have-var-saved \n[doc-have-var]
3251 . ds doc-command-name-saved "\*[doc-command-name]
3252 . ds doc-quote-left-saved "\*[doc-quote-left]
3253 . ds doc-quote-right-saved "\*[doc-quote-right]
3254 . nr doc-nesting-level-saved \n[doc-nesting-level]
3255 . nr doc-in-list-saved \n[doc-in-list]
3256 . ds doc-space-saved "\*[doc-space]
3257 . ds doc-saved-space-saved "\*[doc-saved-space]
3258 . nr doc-space-mode-saved \n[doc-space-mode]
3259 . nr doc-have-space-saved \n[doc-have-space]
3260 . nr doc-have-slot-saved \n[doc-have-slot]
3261 . nr doc-keep-type-saved \n[doc-keep-type]
3262 . nr doc-display-depth-saved \n[doc-display-depth]
3263 . nr doc-is-compact-saved \n[doc-is-compact]
3266 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3267 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3268 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3269 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3270 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3271 . nr doc-reg-dsgv +1
3274 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3277 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3278 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3279 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3280 . nr doc-reg-dsgv +1
3283 . nr doc-list-depth-saved \n[doc-list-depth]
3286 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3287 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3288 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3289 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3290 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3291 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3292 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3293 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3294 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3295 . nr doc-reg-dsgv +1
3298 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3299 . nr doc-curr-type-saved \n[doc-curr-type]
3300 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3301 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3302 . nr doc-num-columns-saved \n[doc-num-columns]
3303 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3304 . nr doc-is-func-saved \n[doc-is-func]
3305 . nr doc-have-old-func-saved \n[doc-have-old-func]
3306 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3307 . ds doc-func-arg-saved "\*[doc-func-arg]
3308 . nr doc-num-func-args-saved \n[doc-num-func-args]
3309 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3310 . nr doc-have-func-saved \n[doc-have-func]
3311 . nr doc-is-reference-saved \n[doc-is-reference]
3312 . nr doc-reference-count-saved \n[doc-reference-count]
3313 . nr doc-author-count-saved \n[doc-author-count]
3316 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3317 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3318 . nr doc-reg-dsgv +1
3321 . nr doc-book-count-saved \n[doc-book-count]
3322 . ds doc-book-name-saved "\*[doc-book-name]
3323 . nr doc-date-count-saved \n[doc-date-count]
3324 . ds doc-date-saved "\*[doc-date]
3325 . nr doc-publisher-count-saved \n[doc-publisher-count]
3326 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3327 . nr doc-journal-count-saved \n[doc-journal-count]
3328 . ds doc-journal-name-saved "\*[doc-journal-name]
3329 . nr doc-issue-count-saved \n[doc-issue-count]
3330 . ds doc-issue-name-saved "\*[doc-issue-name]
3331 . nr doc-optional-count-saved \n[doc-optional-count]
3332 . ds doc-optional-string-saved "\*[doc-optional-string]
3333 . nr doc-page-number-count-saved \n[doc-page-number-count]
3334 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3335 . nr doc-corporate-count-saved \n[doc-corporate-count]
3336 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3337 . nr doc-report-count-saved \n[doc-report-count]
3338 . ds doc-report-name-saved "\*[doc-report-name]
3339 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3340 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3341 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3342 . nr doc-volume-count-saved \n[doc-volume-count]
3343 . ds doc-volume-name-saved "\*[doc-volume-name]
3344 . nr doc-have-author-saved \n[doc-have-author]
3346 . ds doc-document-title-saved "\*[doc-document-title]
3347 . ds doc-volume-saved "\*[doc-volume]
3348 . ds doc-section-saved "\*[doc-section]
3349 . ds doc-operating-system-saved "\*[doc-operating-system]
3350 . ds doc-date-string-saved "\*[doc-date-string]
3351 . nr doc-header-space-saved \n[doc-header-space]
3352 . nr doc-footer-space-saved \n[doc-footer-space]
3353 . nr doc-display-vertical-saved \n[doc-display-vertical]
3354 . ds doc-header-string-saved "\*[doc-header-string]
3355 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3356 . nr doc-in-files-section-saved \n[doc-in-files-section]
3357 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3361 .\" NS doc-restore-global-vars macro
3362 .\" NS restore all global variables
3364 .\" NS local variables:
3367 .de doc-restore-global-vars
3368 . ds doc-macro-name "\*[doc-macro-name-saved]
3369 . nr doc-arg-limit \n[doc-arg-limit-saved]
3370 . nr doc-num-args \n[doc-num-args-saved]
3371 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3374 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3375 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3376 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3377 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3378 . nr doc-reg-drgv +1
3381 . nr doc-curr-font \n[doc-curr-font-saved]
3382 . nr doc-curr-size \n[doc-curr-size-saved]
3383 . nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
3384 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3385 . nr doc-have-decl \n[doc-have-decl-saved]
3386 . nr doc-have-var \n[doc-have-var-saved]
3387 . ds doc-command-name "\*[doc-command-name-saved]
3388 . ds doc-quote-left "\*[doc-quote-left-saved]
3389 . ds doc-quote-right "\*[doc-quote-right-saved]
3390 . nr doc-nesting-level \n[doc-nesting-level-saved]
3391 . nr doc-in-list \n[doc-in-list-saved]
3392 . ds doc-space "\*[doc-space-saved]
3393 . ds doc-saved-space "\*[doc-saved-space-saved]
3394 . nr doc-space-mode \n[doc-space-mode-saved]
3395 . nr doc-have-space \n[doc-have-space-saved]
3396 . nr doc-have-slot \n[doc-have-slot-saved]
3397 . nr doc-keep-type \n[doc-keep-type-saved]
3398 . nr doc-display-depth \n[doc-display-depth-saved]
3399 . nr doc-is-compact \n[doc-is-compact-saved]
3402 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3403 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3404 . nr doc-display-have-indent-stack\n[doc-reg-drgv] \n[doc-display-have-indent-stack\n[doc-reg-drgv]-saved]
3405 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3406 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3407 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3408 . nr doc-reg-drgv +1
3411 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3414 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3415 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3416 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3417 . nr doc-reg-drgv +1
3420 . nr doc-list-depth \n[doc-list-depth-saved]
3423 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3424 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3425 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3426 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3427 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3428 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3429 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3430 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3431 . nr doc-reg-drgv +1
3434 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3435 . nr doc-curr-type \n[doc-curr-type-saved]
3436 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3437 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3438 . nr doc-num-columns \n[doc-num-columns-saved]
3439 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3440 . nr doc-is-func \n[doc-is-func-saved]
3441 . nr doc-have-old-func \n[doc-have-old-func-saved]
3442 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3443 . ds doc-func-arg "\*[doc-func-arg-saved]
3444 . nr doc-num-func-args \n[doc-num-func-args-saved]
3445 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3446 . nr doc-have-func \n[doc-have-func-saved]
3447 . nr doc-is-reference \n[doc-is-reference-saved]
3448 . nr doc-reference-count \n[doc-reference-count-saved]
3449 . nr doc-author-count \n[doc-author-count-saved]
3452 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3453 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3454 . nr doc-reg-drgv +1
3457 . nr doc-book-count \n[doc-book-count-saved]
3458 . ds doc-book-name "\*[doc-book-name-saved]
3459 . nr doc-date-count \n[doc-date-count-saved]
3460 . ds doc-date "\*[doc-date-saved]
3461 . nr doc-publisher-count \n[doc-publisher-count-saved]
3462 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3463 . nr doc-journal-count \n[doc-journal-count-saved]
3464 . ds doc-journal-name "\*[doc-journal-name-saved]
3465 . nr doc-issue-count \n[doc-issue-count-saved]
3466 . ds doc-issue-name "\*[doc-issue-name-saved]
3467 . nr doc-optional-count \n[doc-optional-count-saved]
3468 . ds doc-optional-string "\*[doc-optional-string-saved]
3469 . nr doc-page-number-count \n[doc-page-number-count-saved]
3470 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3471 . nr doc-corporate-count \n[doc-corporate-count-saved]
3472 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3473 . nr doc-report-count \n[doc-report-count-saved]
3474 . ds doc-report-name "\*[doc-report-name-saved]
3475 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3476 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3477 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3478 . nr doc-volume-count \n[doc-volume-count-saved]
3479 . ds doc-volume-name "\*[doc-volume-name-saved]
3480 . nr doc-have-author \n[doc-have-author-saved]
3482 . ds doc-document-title "\*[doc-document-title-saved]
3483 . ds doc-volume "\*[doc-volume-saved]
3484 . ds doc-section "\*[doc-section-saved]
3485 . ds doc-operating-system "\*[doc-operating-system-saved]
3486 . ds doc-date-string "\*[doc-date-string-saved]
3487 . nr doc-header-space \n[doc-header-space-saved]
3488 . nr doc-footer-space \n[doc-footer-space-saved]
3489 . nr doc-display-vertical \n[doc-display-vertical-saved]
3490 . ds doc-header-string "\*[doc-header-string-saved]
3491 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3492 . nr doc-in-files-section \n[doc-in-files-section-saved]
3493 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3497 .\" NS El user macro
3501 .\" NS doc-list-depth
3502 .\" NS doc-macro-name
3504 .\" NS local variables:
3507 .\" NS width register `El' set in doc-common
3511 . tm Usage: .El (does not take arguments) (#\n[.c])
3515 . ds doc-macro-name El
3516 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3518 . ie "\*[doc-str-El]"diag-list" \
3520 . el \{ .ie "\*[doc-str-El]"column-list" \
3521 . doc-end-column-list
3522 . el \{ .ie "\*[doc-str-El]"item-list" \
3524 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3526 . el \{ .ie "\*[doc-str-El]"inset-list" \
3536 .\" NS doc-saved-Pa-font global string
3537 .\" NS saved doc-Pa-font string for section FILES (no underline if
3540 .ds doc-saved-Pa-font
3543 .\" NS doc-curr-type global register
3544 .\" NS current argument type
3549 .\" NS doc-curr-arg global string
3550 .\" NS current argument
3555 .\" NS doc-item-boxXXX global box
3556 .\" NS item boxes associated list depth
3559 .\" NS doc-list-depth
3562 .\" NS It user macro
3569 .\" NS doc-curr-type
3571 .\" NS doc-macro-name
3573 .\" NS doc-saved-Pa-font
3575 .\" NS local variables:
3578 .\" NS doc-XXX-list-type
3580 .\" NS width register `It' set in doc-common
3582 .nr doc-bullet-list-type 1
3583 .nr doc-column-list-type 0
3584 .nr doc-dash-list-type 1
3585 .nr doc-diag-list-type 0
3586 .nr doc-enum-list-type 1
3587 .nr doc-hang-list-type 2
3588 .nr doc-inset-list-type 2
3589 .nr doc-item-list-type 1
3590 .nr doc-ohang-list-type 2
3591 .nr doc-tag-list-type 2
3594 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3596 . if "\*[doc-str-It]"" \
3597 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3599 . if \n[doc-nesting-level] \{\
3600 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3609 . ds doc-macro-name It
3611 . \" fill argument vector
3613 . while (\n[doc-reg-It] <= \n[.$]) \{\
3614 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3618 . nr doc-num-args \n[.$]
3622 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3624 . if \n[doc-reg-It] \{\
3626 . box doc-item-box\n[doc-list-depth]
3627 . ev doc-item-env\n[doc-list-depth]
3633 . ie (\n[doc-reg-It] == 1) \{\
3635 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3636 . tm1 " don't take arguments (#\n[.c])
3640 . if (\n[doc-reg-It] == 2) \{\
3641 . \" handle list types with arguments
3642 . doc-parse-arg-vector
3646 . nr doc-curr-type \n[doc-type1]
3647 . ds doc-curr-arg "\*[doc-arg1]
3649 . if \n[doc-in-files-section] \{\
3650 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3652 . ds doc-Pa-font "\*[doc-No-font]
3655 . ie (\n[doc-type1] == 1) \
3659 . doc-print-recursive
3662 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3663 . tm1 " require arguments (#\n[.c])
3667 . \" the previous call of `.doc-print-recursive' can contain calls to
3668 . \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
3669 . if !\n[doc-nesting-level] \
3670 . doc-\*[doc-str-It]
3674 .\" NS doc-inset-list macro
3675 .\" NS .It item of list-type inset
3681 . \" finish item box
3685 . unformat doc-item-box\n[doc-list-depth]
3687 . doc-set-vertical-and-indent 0
3691 . doc-item-box\n[doc-list-depth]
3698 .\" NS doc-hang-list macro
3699 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3702 .\" NS doc-have-space
3705 .\" NS local variables:
3710 . \" finish item box
3714 . unformat doc-item-box\n[doc-list-depth]
3716 . doc-set-vertical-and-indent 1
3717 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3718 . ti -\n[doc-reg-dhl]u
3721 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3722 . doc-item-box\n[doc-list-depth]
3724 . chop doc-item-box\n[doc-list-depth]
3725 . nr doc-reg-dhl1 \n[.k]u
3726 . nop \*[doc-item-box\n[doc-list-depth]]\c
3727 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3728 . nr doc-have-space 1
3736 .\" NS doc-ohang-list macro
3737 .\" NS .It item of list-type overhanging tag
3743 . \" finish item box
3747 . unformat doc-item-box\n[doc-list-depth]
3749 . doc-set-vertical-and-indent 0
3751 . doc-item-box\n[doc-list-depth]
3759 .\" NS doc-item-list macro
3760 .\" NS .It item of list-type [empty tag]
3763 . \" finish (dummy) item box
3768 . doc-set-vertical-and-indent 0
3775 .\" NS doc-enum-list-count-stackXXX global register
3776 .\" NS stack of current enum count values
3779 .\" NS doc-list-depth
3781 .nr doc-enum-list-count-stack1 0
3784 .\" NS doc-enum-list macro
3785 .\" NS enumerated list
3788 .\" NS doc-enum-list-count-stackXXX
3793 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3795 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3797 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3798 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3803 .\" NS doc-bullet-list macro
3804 .\" NS bullet paragraph list
3811 . nop \)\*[doc-Sy-font]\[bu]\f[P]
3816 .\" NS doc-dash-list macro
3817 .\" NS hyphen paragraph list (sub bullet list)
3824 . nop \)\*[doc-Sy-font]\-\f[P]
3829 .\" NS doc-do-list macro
3830 .\" NS .It item of list-type enum/bullet/hyphen
3832 .als doc-do-list doc-hang-list
3835 .\" NS doc-diag-list-input-line-count global register
3836 .\" NS saved line number to be checked in next diag-list item
3838 .nr doc-diag-list-input-line-count 0
3841 .\" NS doc-diag-list macro
3842 .\" NS .It item of list-type diagnostic-message
3845 .\" NS doc-curr-font
3846 .\" NS doc-curr-size
3847 .\" NS doc-diag-list-input-line-count
3850 . nr doc-curr-font \n[.f]
3851 . nr doc-curr-size \n[.ps]
3853 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3854 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3861 . nr doc-diag-list-input-line-count \n[.c]
3864 . nop \*[doc-Sy-font]\c
3865 . if \n[doc-num-args] \
3866 . doc-remaining-args
3867 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3869 . doc-print-and-reset
3873 .\" NS doc-tag-list macro
3874 .\" NS .It item of list-type `tag'
3877 .\" NS doc-have-space
3880 .\" NS local variables:
3886 . \" finish item box
3890 . unformat doc-item-box\n[doc-list-depth]
3892 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
3899 . doc-item-box\n[doc-list-depth]
3904 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3905 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3906 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3907 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3911 . doc-set-vertical-and-indent 1
3912 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3913 . ti -\n[doc-reg-dtl]u
3916 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3917 . doc-item-box\n[doc-list-depth]
3921 . chop doc-item-box\n[doc-list-depth]
3922 . nr doc-reg-dtl1 \n[.k]u
3923 . nop \*[doc-item-box\n[doc-list-depth]]\c
3924 . nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
3925 . nr doc-have-space 1
3928 . if \n[doc-in-files-section] \
3930 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3937 .\" NS doc-get-tag-width macro
3938 .\" NS resolve unknown tag width (`tag' list-type only)
3941 .\" NS doc-list-indent-stackXXX
3942 .\" NS doc-tag-width-stackXXX
3946 .\" NS doc-curr-type
3948 .de doc-get-tag-width
3949 . ie (\n[doc-curr-type] == 1) \{\
3950 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
3951 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
3954 . ds doc-tag-width-stack\n[doc-list-depth] No
3955 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
3960 .\" NS doc-set-vertical-and-indent macro
3961 .\" NS set up vertical spacing (if not compact) and indentation (with
3962 .\" NS offset if argument is non-zero)
3965 .\" NS doc-list-have-indent-stackXXX
3967 .de doc-set-vertical-and-indent
3968 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3969 . sp \n[doc-display-vertical]u
3971 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3972 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
3974 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3982 .\" NS doc-list-depth global register
3983 .\" NS list type stack counter
3985 .nr doc-list-depth 0
3988 .\" NS doc-num-columns global register
3989 .\" NS number of columns
3991 .nr doc-num-columns 0
3994 .\" NS doc-compact-list-stackXXX global register (bool)
3995 .\" NS stack of flags to indicate whether a particular list is compact
3998 .\" NS doc-list-depth
4000 .nr doc-compact-list-stack1 0
4003 .\" NS doc-tag-prefix-stackXXX global string
4004 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4007 .\" NS doc-list-depth
4009 .ds doc-tag-prefix-stack1
4012 .\" NS doc-tag-width-stackXXX global string
4013 .\" NS stack of strings indicating how to set up current element of
4014 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4015 .\" NS directly; if it is a macro name, use the macro's width value;
4016 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4019 .\" NS doc-list-depth
4021 .ds doc-tag-width-stack0
4022 .ds doc-tag-width-stack1
4025 .\" NS doc-list-offset-stackXXX global register
4026 .\" NS stack of list offsets
4029 .\" NS doc-list-depth
4031 .nr doc-list-offset-stack1 0
4034 .\" NS doc-end-list macro
4035 .\" NS list end function; resets indentation (and offset if argument is
4039 .\" NS doc-list-depth
4040 .\" NS doc-list-offset-stackXXX
4044 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4046 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4048 . if (\n[doc-list-depth] <= 0) \
4049 . tm mdoc warning: extraneous .El call (#\n[.c])
4051 . doc-decrement-list-stack
4052 . nr doc-list-depth -1
4056 .\" NS doc-increment-list-stack macro
4057 .\" NS set up next block for list
4060 .\" NS doc-compact-list-stackXXX
4061 .\" NS doc-list-have-indent-stackXXX
4062 .\" NS doc-list-indent-stackXXX
4063 .\" NS doc-list-offset-stackXXX
4064 .\" NS doc-list-type-stackXXX
4065 .\" NS doc-tag-prefix-stackXXX
4066 .\" NS doc-tag-width-stackXXX
4067 .\" NS doc-enum-list-count-stackXXX
4069 .\" NS local variables:
4072 .de doc-increment-list-stack
4073 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4074 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4075 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4076 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4077 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4078 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4079 . ds doc-list-type-stack\n[doc-reg-dils]
4080 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4081 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4085 .\" NS doc-decrement-list-stack macro
4086 .\" NS decrement stack
4089 .\" NS doc-compact-list-stackXXX
4090 .\" NS doc-list-have-indent-stackXXX
4091 .\" NS doc-list-indent-stackXXX
4092 .\" NS doc-list-offset-stackXXX
4093 .\" NS doc-list-type-stackXXX
4094 .\" NS doc-tag-prefix-stackXXX
4095 .\" NS doc-tag-width-stackXXX
4096 .\" NS doc-enum-list-count-stackXXX
4098 .de doc-decrement-list-stack
4099 . ds doc-list-type-stack\n[doc-list-depth]
4100 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4101 . nr doc-list-indent-stack\n[doc-list-depth] 0
4102 . nr doc-list-offset-stack\n[doc-list-depth] 0
4103 . ds doc-tag-prefix-stack\n[doc-list-depth]
4104 . ds doc-tag-width-stack\n[doc-list-depth]
4105 . nr doc-compact-list-stack\n[doc-list-depth] 0
4106 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4110 .\" NS Xr user macro
4111 .\" NS cross reference (for man pages only)
4115 .\" NS doc-macro-name
4117 .\" NS local variables:
4120 .\" NS width register `Xr' set in doc-common
4123 . if !\n[doc-arg-limit] \{\
4125 . ds doc-macro-name Xr
4126 . doc-parse-args \$@
4132 . if !\n[doc-arg-limit] \
4136 . doc-print-prefixes
4137 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4138 . \" first argument must be a string
4139 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4140 . nr doc-curr-font \n[.f]
4141 . nr doc-curr-size \n[.ps]
4142 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4144 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4145 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4146 . \" modify second argument if it is a string and
4147 . \" remove space inbetween
4148 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4149 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4150 . ds doc-space\n[doc-arg-ptr]
4153 . doc-print-recursive
4163 .\" NS doc-Xr-usage macro
4166 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4171 .\" NS Sx user macro
4172 .\" NS cross section reference
4174 .\" NS width register `Sx' set in doc-common
4176 .als Sx doc-generic-macro
4177 .ds doc-Sx-usage section_header
4180 .\" NS doc-end-column-list macro
4181 .\" NS column-list end-list
4184 .\" NS doc-list-depth
4186 .de doc-end-column-list
4188 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4191 . doc-decrement-list-stack
4192 . nr doc-list-depth -1
4196 .\" NS doc-column-indent-width global register
4197 .\" NS holds the indent width for a column list
4199 .nr doc-column-indent-width 0
4202 .\" NS doc-set-column-tab macro
4203 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4206 .\" NS doc-column-indent-width
4208 .\" NS local variables:
4211 .\" NS doc-str-dsct1
4213 .de doc-set-column-tab
4216 . nr doc-column-indent-width 0
4219 . ds doc-str-dsct1 " \"
4222 . ds doc-str-dsct1 " \"
4224 . \" XXX: this is packed abnormally close -- intercolumn width
4225 . \" should be configurable
4226 . ds doc-str-dsct1 " \"
4229 . while (\n[doc-reg-dsct] <= \$1) \{\
4230 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4231 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4232 . nr doc-reg-dsct +1
4235 . ta \*[doc-str-dsct]
4236 ' in +\n[doc-column-indent-width]u
4240 .\" NS doc-column-list macro
4245 .\" NS doc-list-indent-stackXXX
4248 .\" NS local variables:
4252 . if \n[doc-num-args] \
4253 . doc-parse-arg-vector
4256 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4257 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4261 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4262 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4263 . ds doc-space\n[doc-reg-dcl]
4266 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4267 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4270 ' in +\n[doc-column-indent-width]u
4272 . ti -\n[doc-column-indent-width]u
4274 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4278 .\" NS Ta user macro
4279 .\" NS append tab (\t)
4284 .\" NS width register `Ta' set in doc-common
4287 . ie \n[doc-arg-limit] \{\
4290 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4291 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4296 . tm1 "Usage: Ta must follow column entry: e.g.
4297 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4302 .\" NS Dl user macro
4303 .\" NS display (one line) literal
4305 .\" NS this function uses the `Li' font
4309 .\" NS doc-curr-font
4310 .\" NS doc-curr-size
4311 .\" NS doc-macro-name
4313 .\" NS width register `Dl' set in doc-common
4317 . in +\n[doc-display-indent]u
4319 . ie \n[doc-arg-limit] \{\
4320 . tm Usage: .Dl not callable by other macros (#\n[.c])
4325 . ds doc-macro-name Dl
4326 . doc-parse-args \$@
4328 . nr doc-curr-font \n[.f]
4329 . nr doc-curr-size \n[.ps]
4330 . nop \*[doc-Li-font]\c
4331 . doc-print-recursive
4334 . tm Usage: .Dl argument ... (#\n[.c])
4337 . in -\n[doc-display-indent]u
4341 .\" NS D1 user macro
4342 .\" NS display (one line)
4346 .\" NS doc-macro-name
4348 .\" NS width register `D1' set in doc-common
4352 . in +\n[doc-display-indent]u
4354 . ie \n[doc-arg-limit] \{\
4355 . tm Usage: .D1 not callable by other macros (#\n[.c])
4360 . ds doc-macro-name D1
4361 . doc-parse-args \$@
4363 . doc-print-recursive
4366 . tm Usage: .D1 argument ... (#\n[.c])
4369 . in -\n[doc-display-indent]u
4373 .\" NS Ex user macro
4377 . tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
4381 .\" NS Vt user macro
4382 .\" NS variable type (for forcing old style variable declarations);
4383 .\" NS this is not done in the same manner as .Ot for fortrash --
4384 .\" NS clean up later
4387 .\" NS doc-curr-font
4388 .\" NS doc-curr-size
4389 .\" NS doc-have-decl
4391 .\" NS doc-macro-name
4393 .\" NS width register `Vt' set in doc-common
4396 . if !\n[doc-arg-limit] \{\
4398 . ds doc-macro-name Vt
4399 . doc-parse-args \$@
4402 . tm Usage: .Vt variable_type ... (#\n[.c])
4405 . if !\n[doc-arg-limit] \
4409 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4410 . tm Usage: .Vt variable_type ... (#\n[.c])
4415 . if \n[doc-in-synopsis-count] \{\
4416 . \" if a function declaration was the last thing given,
4417 . \" want vertical space
4418 . if \n[doc-have-decl] \{\
4420 . nr doc-have-decl 0
4423 . \" if a subroutine was the last thing given, want vertical space
4424 . if \n[doc-have-func] \{\
4425 . ie \n[doc-have-var] \
4435 . nr doc-curr-font \n[.f]
4436 . nr doc-curr-size \n[.ps]
4437 . nop \*[doc-Ft-font]\c
4438 . doc-print-recursive
4440 . if \n[doc-in-synopsis-count] \{\
4441 . ie \n[doc-have-old-func] \
4442 . nop \*[doc-soft-space]\c
4449 .\" NS doc-is-func global register (bool)
4450 .\" NS set if subroutine (in synopsis only) (fortran only)
4455 .\" NS Ft user macro
4456 .\" NS function type
4459 .\" NS doc-curr-font
4460 .\" NS doc-curr-size
4461 .\" NS doc-have-decl
4464 .\" NS doc-macro-name
4466 .\" NS width register `Ft' set in doc-common
4469 . if !\n[doc-arg-limit] \{\
4471 . ds doc-macro-name Ft
4472 . doc-parse-args \$@
4475 . tm Usage: .Ft function_type ... (#\n[.c])
4478 . if !\n[doc-arg-limit] \
4482 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4483 . tm Usage: .Ft function_type ... (#\n[.c])
4488 . if \n[doc-in-synopsis-count] \{\
4489 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4491 . nr doc-have-decl 0
4495 . if \n[doc-have-var] \{\
4503 . nr doc-curr-font \n[.f]
4504 . nr doc-curr-size \n[.ps]
4505 . nop \*[doc-Ft-font]\c
4506 . doc-print-recursive
4510 .\" NS doc-have-old-func global register (bool)
4511 .\" NS set if `Ot' has been called
4513 .nr doc-have-old-func 0
4516 .\" NS Ot user macro
4517 .\" NS old function type (fortran -- no newline)
4520 .\" NS doc-have-decl
4521 .\" NS doc-have-old-func
4525 .\" NS width register `Ot' set in doc-common
4528 . nr doc-have-old-func 1
4530 . if \n[doc-in-synopsis-count] \{\
4531 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4533 . nr doc-have-decl 0
4537 . if \n[doc-have-var] \{\
4546 . nop \*[doc-Ft-font]\$*\c
4551 .\" NS Fa user macro
4552 .\" NS function arguments
4556 .\" NS doc-curr-font
4557 .\" NS doc-curr-size
4558 .\" NS doc-macro-name
4560 .\" NS width register `Fa' set in doc-common
4563 . if !\n[doc-arg-limit] \{\
4565 . ds doc-macro-name Fa
4566 . doc-parse-args \$@
4569 . tm Usage: .Fa function_arguments ... (#\n[.c])
4572 . ie \n[doc-func-arg-count] \
4576 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4577 . nr doc-curr-font \n[.f]
4578 . nr doc-curr-size \n[.ps]
4579 . nop \*[doc-Fa-font]\c
4580 . doc-print-recursive
4582 . if \n[doc-in-synopsis-count] \
4583 . if \n[doc-have-func] \
4589 .\" NS doc-func-arg-count global register
4590 .\" NS how many function arguments have been processed so far
4592 .nr doc-func-arg-count 0
4595 .\" NS doc-func-arg global string
4596 .\" NS work buffer for function name strings
4601 .\" NS doc-num-func-args global register
4602 .\" NS number of function arguments
4604 .nr doc-num-func-args 0
4607 .\" NS doc-func-args-processed global register
4608 .\" NS function arguments processed so far
4610 .nr doc-func-args-processed 0
4613 .\" NS doc-do-func macro
4614 .\" NS internal .Fa for .Fc
4620 .\" NS doc-func-arg-count
4621 .\" NS doc-func-args-processed
4622 .\" NS doc-num-func-args
4625 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4633 . nr doc-num-func-args 0
4634 . nr doc-func-args-processed 0
4636 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4637 . if (\n[doc-num-func-args] > 1) \
4638 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4640 . if (\n[doc-func-arg-count] > 1) \{\
4641 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4642 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4643 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
4646 . if (\n[doc-func-arg-count] == 1) \{\
4647 . nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4650 . nr doc-func-arg-count +1
4655 .\" NS doc-have-func global register (bool)
4656 .\" NS whether we have more than one function in synopsis
4661 .\" NS Fn user macro
4666 .\" NS doc-curr-font
4667 .\" NS doc-curr-size
4668 .\" NS doc-have-decl
4669 .\" NS doc-have-func
4671 .\" NS doc-in-synopsis-count
4672 .\" NS doc-indent-synopsis
4674 .\" NS doc-macro-name
4676 .\" NS width register `Fn' set in doc-common
4679 . if !\n[doc-arg-limit] \{\
4681 . ds doc-macro-name Fn
4682 . doc-parse-args \$@
4685 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4688 . if \n[doc-in-synopsis-count] \{\
4689 . \" if there is/has been more than one subroutine declaration
4690 . ie \n[doc-is-func] \{\
4693 . nr doc-have-decl 0
4697 . if \n[doc-have-func] \{\
4700 . nr doc-have-decl 0
4703 . if \n[doc-have-decl] \{\
4708 . if \n[doc-have-var] \{\
4710 . nr doc-have-decl 0
4713 . nr doc-have-func 1
4717 . ie (\n[doc-in-synopsis-count] > 1) \
4720 . if !\n[doc-indent-synopsis] \
4721 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4724 . in +\n[doc-indent-synopsis]u
4725 . ti -\n[doc-indent-synopsis]u
4726 . nr doc-in-synopsis-count +1
4729 . if !\n[doc-arg-limit] \
4733 . doc-print-prefixes
4734 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4735 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4740 . nr doc-curr-font \n[.f]
4741 . nr doc-curr-size \n[.ps]
4742 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4743 . nop \f[P]\s[0]\*[lp]\)\c
4746 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4747 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4748 . nop \*[doc-Fa-font]\c
4750 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4755 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4756 . \" output the space (if needed)
4758 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4761 . doc-print-recursive
4764 . doc-print-and-reset
4766 . if \n[doc-in-synopsis-count] \
4767 . in -\n[doc-indent-synopsis]u
4771 .\" NS doc-do-func-args macro
4772 .\" NS handle function arguments
4778 .\" NS doc-func-args-processed
4779 .\" NS doc-num-func-args
4781 .\" NS local variables:
4784 .de doc-do-func-args
4785 . if \n[doc-in-synopsis-count] \{\
4787 . nr doc-num-func-args 0
4788 . nr doc-func-args-processed 0
4790 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4791 . if (\n[doc-num-func-args] > 1) \
4792 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4795 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4798 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4799 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4800 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4801 . nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4802 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
4808 .\" NS doc-saved-nesting-level global register
4810 .nr doc-saved-nesting-level 0
4813 .\" NS doc-in-func-enclosure global register (bool)
4815 .nr doc-in-func-enclosure 0
4818 .\" NS Fo user macro
4819 .\" NS function open
4823 .\" NS doc-curr-font
4824 .\" NS doc-curr-size
4825 .\" NS doc-func-arg-count
4826 .\" NS doc-have-decl
4827 .\" NS doc-have-func
4829 .\" NS doc-in-func-enclosure
4830 .\" NS doc-in-synopsis-count
4831 .\" NS doc-indent-synopsis
4833 .\" NS doc-macro-name
4834 .\" NS doc-saved-nesting-level
4836 .\" NS width register `Fo' set in doc-common
4839 . if (\n[doc-in-func-enclosure]) \{\
4840 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4844 . nr doc-saved-nesting-level \n[doc-nesting-level]
4845 . nr doc-in-func-enclosure 1
4847 . if !\n[doc-arg-limit] \{\
4849 . ds doc-macro-name Fo
4850 . doc-parse-args \$@
4853 . tm Usage: .Fo function_name (#\n[.c])
4856 . if \n[doc-in-synopsis-count] \{\
4857 . \" if there is/has been more than one subroutine declaration
4858 . ie \n[doc-is-func] \{\
4861 . nr doc-have-decl 0
4865 . if \n[doc-have-func] \{\
4868 . nr doc-have-decl 0
4871 . if \n[doc-have-decl] \{\
4876 . if \n[doc-have-var] \{\
4878 . nr doc-have-decl 0
4881 . nr doc-have-func 1
4885 . ie (\n[doc-in-synopsis-count] > 1) \
4888 . if !\n[doc-indent-synopsis] \
4889 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4892 . nr doc-in-synopsis-count +1
4895 . \" start function box
4903 . doc-print-prefixes
4904 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4905 . nr doc-func-arg-count 1
4906 . nr doc-curr-font \n[.f]
4907 . nr doc-curr-size \n[.ps]
4909 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4910 . nop \f[P]\s[0]\*[lp]\)\c
4916 .\" NS Fc user macro
4917 .\" NS function close
4921 .\" NS doc-func-arg-count
4922 .\" NS doc-in-func-enclosure
4923 .\" NS doc-saved-nesting-level
4924 .\" NS doc-macro-name
4926 .\" NS width register `Fc' set in doc-common
4929 . if !\n[doc-in-func-enclosure] \{\
4930 . tm mdoc warning: Extraneous .Fc (#\n[.c])
4935 . ds doc-macro-name Fc
4936 . \" the first (dummy) argument is used to get the correct spacing
4937 . doc-parse-args \) \$@
4940 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
4941 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
4943 . nr doc-func-arg-count 0
4944 . nr doc-in-func-enclosure 0
4948 . \" finish function box
4953 . unformat doc-func-box
4955 . if \n[doc-in-synopsis-count] \{\
4956 . in +\n[doc-indent-synopsis]u
4957 . ti -\n[doc-indent-synopsis]u
4961 . nop \*[doc-func-box]\c
4964 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4965 . nr doc-curr-font \n[.f]
4966 . nr doc-curr-size \n[.ps]
4967 . doc-print-recursive
4970 . doc-print-and-reset
4972 . if \n[doc-in-synopsis-count] \
4973 . in -\n[doc-indent-synopsis]u
4977 .\" NS doc-build-func-string macro
4978 .\" NS collect function arguments and set hard spaces inbetween
4982 .\" NS doc-func-args-processed
4983 .\" NS doc-num-func-args
4985 .de doc-build-func-string
4986 . if !\n[doc-num-func-args] \{\
4987 . nr doc-num-func-args \n[.$]
4988 . nr doc-func-args-processed 0
4992 . nr doc-func-args-processed +1
4993 . as doc-func-arg "\$1
4995 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
4996 . as doc-func-arg "\*[doc-hard-space]
4999 . doc-build-func-string \$@
5004 .\" Very crude references: Stash all reference info into boxes, print out
5005 .\" reference on .Re request and clean up. Ordering very limited, no fancy
5006 .\" citations, but can do articles, journals, and books -- need to add
5007 .\" several missing options (like city etc). Should be able to grab a refer
5008 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5012 .\" NS doc-is-reference global register (bool)
5013 .\" NS set if in reference
5015 .nr doc-is-reference 0
5018 .\" NS doc-reference-count global register
5019 .\" NS reference element counter
5021 .nr doc-reference-count 0
5024 .\" NS Rs user macro
5025 .\" NS reference start
5028 .\" NS doc-is-reference
5029 .\" NS doc-reference-count
5031 .\" NS width register `Rs' set in doc-common
5035 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5037 . nr doc-is-reference 1
5038 . doc-reset-reference
5039 . if \n[doc-in-see-also-section] \
5041 . nr doc-reference-count 0
5046 .\" NS Re user macro
5047 .\" NS reference end
5050 .\" NS doc-is-reference
5052 .\" NS width register `Re' set in doc-common
5056 . tm Usage: .Re (does not take arguments) (#\n[.c])
5058 . doc-print-reference
5059 . doc-reset-reference
5060 . nr doc-is-reference 0
5065 .\" NS doc-reset-reference macro
5066 .\" NS reference cleanup
5069 .\" NS doc-author-count
5070 .\" NS doc-author-nameXXX
5071 .\" NS doc-book-count
5072 .\" NS doc-book-name
5073 .\" NS doc-corporate-count
5074 .\" NS doc-corporate-name
5076 .\" NS doc-date-count
5077 .\" NS doc-issue-count
5078 .\" NS doc-issue-name
5079 .\" NS doc-journal-count
5080 .\" NS doc-journam-name
5081 .\" NS doc-optional-count
5082 .\" NS doc-optional-string
5083 .\" NS doc-page-number-count
5084 .\" NS doc-page-number-string
5085 .\" NS doc-reference-title-count
5086 .\" NS doc-reference-title-name
5087 .\" NS doc-reference-title-name-for-book
5088 .\" NS doc-report-count
5089 .\" NS doc-report-name
5090 .\" NS doc-volume-count
5091 .\" NS doc-volume-name
5093 .de doc-reset-reference
5094 . while (\n[doc-author-count]) \{\
5095 . ds doc-author-name\n[doc-author-count]
5096 . nr doc-author-count -1
5098 . nr doc-journal-count 0
5099 . nr doc-issue-count 0
5100 . nr doc-optional-count 0
5101 . nr doc-corporate-count 0
5102 . nr doc-report-count 0
5103 . nr doc-reference-title-count 0
5104 . nr doc-volume-count 0
5105 . nr doc-date-count 0
5106 . nr doc-page-number-count 0
5107 . nr doc-book-count 0
5109 . ds doc-journal-name
5111 . ds doc-optional-string
5112 . ds doc-corporate-name
5113 . ds doc-report-name
5114 . ds doc-reference-title-name
5115 . ds doc-reference-title-name-for-book
5116 . ds doc-volume-name
5118 . ds doc-page-number-string
5123 .\" NS doc-finish-reference macro
5124 .\" NS auxiliary macro for doc-print-reference
5127 .\" NS doc-reference-count
5129 .de doc-finish-reference
5130 . nr doc-reference-count -1
5131 . ie \n[doc-reference-count] \
5138 .\" NS doc-print-reference macro
5139 .\" NS reference print
5142 .\" NS doc-reference-count
5144 .de doc-print-reference
5148 . if \n[doc-author-count] \{\
5149 . doc-print-reference-authors
5150 . nr doc-reference-count -\n[doc-author-count]
5153 . if \n[doc-reference-title-count] \{\
5154 . unformat doc-reference-title-name
5155 . chop doc-reference-title-name
5156 . unformat doc-reference-title-name-for-book
5157 . chop doc-reference-title-name-for-book
5158 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5159 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5160 . doc-finish-reference
5163 . nop \*[doc-reference-title-name]\c
5164 . doc-finish-reference
5167 . if \n[doc-book-count] \{\
5168 . unformat doc-book-name
5169 . chop doc-book-name
5170 . nop \*[doc-book-name]\c
5171 . doc-finish-reference
5174 . if \n[doc-publisher-count] \{\
5175 . unformat doc-publisher-name
5176 . chop doc-publisher-name
5177 . nop \*[doc-publisher-name]\c
5178 . doc-finish-reference
5181 . if \n[doc-journal-count] \{\
5182 . unformat doc-journal-name
5183 . chop doc-journal-name
5184 . nop \*[doc-journal-name]\c
5185 . doc-finish-reference
5188 . if \n[doc-report-count] \{\
5189 . unformat doc-report-name
5190 . chop doc-report-name
5191 . nop \*[doc-report-name]\c
5192 . doc-finish-reference
5195 . if \n[doc-issue-count] \{\
5196 . unformat doc-issue-name
5197 . chop doc-issue-name
5198 . nop \*[doc-issue-name]\c
5199 . doc-finish-reference
5202 . if \n[doc-volume-count] \{\
5203 . unformat doc-volume-name
5204 . chop doc-volume-name
5205 . nop \*[doc-volume-name]\c
5206 . doc-finish-reference
5209 . if \n[doc-page-number-count] \{\
5210 . unformat doc-page-number-string
5211 . chop doc-page-number-string
5212 . nop \*[doc-page-number-string]\c
5213 . doc-finish-reference
5216 . if \n[doc-corporate-count] \{\
5217 . unformat doc-corporate-name
5218 . chop doc-corporate-name
5219 . nop \*[doc-corporate-name]\c
5220 . doc-finish-reference
5223 . if \n[doc-date-count] \{\
5226 . nop \*[doc-date]\c
5227 . doc-finish-reference
5230 . if \n[doc-optional-count] \{\
5231 . unformat doc-optional-string
5232 . chop doc-optional-string
5233 . nop \*[doc-optional-string]\c
5234 . doc-finish-reference
5237 . if \n[doc-reference-count] \
5238 . tm mdoc warning: unresolved reference problem
5240 . hy \n[doc-hyphen-flags]
5244 .\" NS doc-print-reference-authors macro
5245 .\" NS print out reference authors
5247 .\" NS local variables:
5251 .ds doc-str-dpra "and
5253 .de doc-print-reference-authors
5256 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5257 . unformat doc-author-name\n[doc-reg-dpra]
5258 . chop doc-author-name\n[doc-reg-dpra]
5259 . ie (\n[doc-author-count] > 2) \
5260 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5262 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5263 . nr doc-reg-dpra +1
5266 . unformat doc-author-name\n[doc-reg-dpra]
5267 . chop doc-author-name\n[doc-reg-dpra]
5268 . if (\n[doc-author-count] > 1) \
5269 . nop \)\*[doc-str-dpra]
5270 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5274 .\" NS doc-author-count global register
5275 .\" NS counter of author references
5277 .nr doc-author-count 0
5280 .\" NS doc-author-nameXXX global box
5281 .\" NS array of author names
5284 .\" NS doc-author-count
5286 .ds doc-author-name0
5289 .\" NS %A user macro
5290 .\" NS reference author(s)
5294 .\" NS doc-author-count
5295 .\" NS doc-curr-font
5296 .\" NS doc-curr-size
5297 .\" NS doc-macro-name
5298 .\" NS doc-reference-count
5300 .\" NS local variables:
5303 .\" NS width register `%A' set in doc-common
5306 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5307 . tm Usage: .%A author_name ... (#\n[.c])
5311 . nr doc-author-count +1
5312 . nr doc-reference-count +1
5314 . ds doc-macro-name %A
5315 . doc-parse-args \$@
5318 . nr doc-curr-font \n[.f]
5319 . nr doc-curr-size \n[.ps]
5321 . \" save to reference box
5322 . box doc-author-name\n[doc-author-count]
5331 .\" NS doc-book-count global register
5332 .\" NS counter of book references
5334 .nr doc-book-count 0
5337 .\" NS doc-book-name global box
5338 .\" NS string of collected book references
5343 .\" NS %B user macro
5344 .\" NS [reference] book name
5348 .\" NS doc-book-count
5349 .\" NS doc-curr-font
5350 .\" NS doc-curr-size
5351 .\" NS doc-macro-name
5352 .\" NS doc-reference-count
5354 .\" NS local variables:
5357 .\" NS width register `%B' set in doc-common
5360 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5361 . tm Usage: .%B book_name ... (#\n[.c])
5365 . if \n[doc-is-reference] \{\
5366 . nr doc-book-count +1
5367 . nr doc-reference-count +1
5370 . ds doc-macro-name %B
5371 . doc-parse-args \$@
5374 . nr doc-curr-font \n[.f]
5375 . nr doc-curr-size \n[.ps]
5377 . ie \n[doc-is-reference] \{\
5378 . \" append to reference box
5379 . boxa doc-book-name
5384 . nop \*[doc-Em-font]\c
5388 . nop \*[doc-Em-font]\c
5389 . doc-print-recursive
5394 .\" NS doc-date-count global register
5395 .\" NS counter of date references
5397 .nr doc-date-count 0
5400 .\" NS doc-date global box
5401 .\" NS string of collected date references
5406 .\" NS %D user macro
5407 .\" NS [reference] date
5411 .\" NS doc-curr-font
5412 .\" NS doc-curr-size
5413 .\" NS doc-date-count
5414 .\" NS doc-macro-name
5415 .\" NS doc-reference-count
5417 .\" NS local variables:
5420 .\" NS width register `%D' set in doc-common
5423 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5424 . tm Usage: .%D date ... (#\n[.c])
5428 . nr doc-date-count +1
5429 . nr doc-reference-count +1
5431 . ds doc-macro-name %D
5432 . doc-parse-args \$@
5435 . nr doc-curr-font \n[.f]
5436 . nr doc-curr-size \n[.ps]
5438 . \" append to reference box
5448 .\" NS doc-publisher-count global register
5449 .\" NS counter of publisher references
5451 .nr doc-publisher-count 0
5454 .\" NS doc-publisher-name global box
5455 .\" NS string of collected publisher references
5457 .ds doc-publisher-name
5460 .\" NS %I user macro
5461 .\" NS [reference] issuer/publisher name
5465 .\" NS doc-curr-font
5466 .\" NS doc-curr-size
5467 .\" NS doc-macro-name
5468 .\" NS doc-publisher-count
5469 .\" NS doc-reference-count
5471 .\" NS local variables:
5474 .\" NS width register `%I' set in doc-common
5477 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5478 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5482 . nr doc-publisher-count +1
5483 . nr doc-reference-count +1
5485 . ds doc-macro-name %I
5486 . doc-parse-args \$@
5489 . nr doc-curr-font \n[.f]
5490 . nr doc-curr-size \n[.ps]
5492 . \" append to reference box
5493 . boxa doc-publisher-name
5498 . nop \*[doc-Em-font]\c
5503 .\" NS doc-journal-count global register
5504 .\" NS counter of journal references
5506 .nr doc-journal-count 0
5509 .\" NS doc-journal-name global box
5510 .\" NS string of collected journal references
5512 .ds doc-journal-name
5515 .\" NS %J user macro
5516 .\" NS [reference] Journal Name
5520 .\" NS doc-curr-font
5521 .\" NS doc-curr-size
5522 .\" NS doc-journal-count
5523 .\" NS doc-macro-name
5524 .\" NS doc-reference-count
5526 .\" NS local variables:
5529 .\" NS width register `%J' set in doc-common
5532 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5533 . tm Usage: .%J journal_name ... (#\n[.c])
5537 . nr doc-journal-count +1
5538 . nr doc-reference-count +1
5540 . ds doc-macro-name %J
5541 . doc-parse-args \$@
5544 . nr doc-curr-font \n[.f]
5545 . nr doc-curr-size \n[.ps]
5547 . \" append to reference box
5548 . boxa doc-journal-name
5553 . nop \*[doc-Em-font]\c
5558 .\" NS doc-issue-count global register
5559 .\" NS counter of issue number references
5561 .nr doc-issue-count 0
5564 .\" NS doc-issue-name global box
5565 .\" NS string of collected issue number references
5570 .\" NS %N user macro
5571 .\" NS [reference] issue number
5575 .\" NS doc-curr-font
5576 .\" NS doc-curr-size
5577 .\" NS doc-issue-count
5578 .\" NS doc-macro-name
5579 .\" NS doc-reference-count
5581 .\" NS local variables:
5584 .\" NS width register `%N' set in doc-common
5587 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5588 . tm Usage: .%N issue_number ... (#\n[.c])
5592 . nr doc-issue-count +1
5593 . nr doc-reference-count +1
5595 . ds doc-macro-name %N
5596 . doc-parse-args \$@
5599 . nr doc-curr-font \n[.f]
5600 . nr doc-curr-size \n[.ps]
5602 . \" append to reference box
5603 . boxa doc-issue-name
5612 .\" NS doc-optional-count global register
5613 .\" NS counter of optional information references
5615 .nr doc-optional-count 0
5618 .\" NS doc-optional-string global box
5619 .\" NS string of collected optional information references
5621 .ds doc-optional-string
5624 .\" NS %O user macro
5625 .\" NS [reference] optional information
5629 .\" NS doc-curr-font
5630 .\" NS doc-curr-size
5631 .\" NS doc-macro-name
5632 .\" NS doc-optional-count
5633 .\" NS doc-reference-count
5635 .\" NS local variables:
5638 .\" NS width register `%O' set in doc-common
5641 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5642 . tm Usage: .%O optional_information ... (#\n[.c])
5646 . nr doc-optional-count +1
5647 . nr doc-reference-count +1
5649 . ds doc-macro-name %O
5650 . doc-parse-args \$@
5653 . nr doc-curr-font \n[.f]
5654 . nr doc-curr-size \n[.ps]
5656 . \" append to reference box
5657 . boxa doc-optional-string
5666 .\" NS doc-page-number-count global register
5667 .\" NS counter of page number references
5669 .nr doc-page-number-count 0
5672 .\" NS doc-page-number-string global box
5673 .\" NS string of collected page number references
5675 .ds doc-page-number-string
5678 .\" NS %P user macro
5679 .\" NS [reference] page numbers
5683 .\" NS doc-curr-font
5684 .\" NS doc-curr-size
5685 .\" NS doc-macro-name
5686 .\" NS doc-page-number-count
5687 .\" NS doc-reference-count
5689 .\" NS local variables:
5692 .\" NS width register `%P' set in doc-common
5695 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5696 . tm Usage: .%P page_number ... (#\n[.c])
5700 . nr doc-page-number-count +1
5701 . nr doc-reference-count +1
5703 . ds doc-macro-name %P
5704 . doc-parse-args \$@
5707 . nr doc-curr-font \n[.f]
5708 . nr doc-curr-size \n[.ps]
5710 . \" append to reference box
5711 . boxa doc-page-number-string
5720 .\" NS doc-corporate-count global register
5721 .\" NS counter of corporate references
5723 .nr doc-corporate-count 0
5726 .\" NS doc-corporate-name global box
5727 .\" NS string of collected corporate references
5729 .ds doc-corporate-name
5732 .\" NS %Q user macro
5733 .\" NS corporate or foreign author
5737 .\" NS doc-corporate-count
5738 .\" NS doc-curr-font
5739 .\" NS doc-curr-size
5740 .\" NS doc-macro-name
5741 .\" NS doc-reference-count
5743 .\" NS local variables:
5746 .\" NS width register `%Q' set in doc-common
5749 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5750 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5754 . nr doc-corporate-count +1
5755 . nr doc-reference-count +1
5757 . ds doc-macro-name %Q
5758 . doc-parse-args \$@
5761 . nr doc-curr-font \n[.f]
5762 . nr doc-curr-size \n[.ps]
5764 . \" append to reference box
5765 . boxa doc-corporate-name
5774 .\" NS doc-report-count global register
5775 .\" NS counter of report references
5777 .nr doc-report-count 0
5780 .\" NS doc-report-name global box
5781 .\" NS string of collected report references
5786 .\" NS %R user macro
5787 .\" NS [reference] report name
5791 .\" NS doc-curr-font
5792 .\" NS doc-curr-size
5793 .\" NS doc-macro-name
5794 .\" NS doc-reference-count
5795 .\" NS doc-report-count
5797 .\" NS local variables:
5800 .\" NS width register `%R' set in doc-common
5803 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5804 . tm Usage: .%R reference_report ... (#\n[.c])
5808 . nr doc-report-count +1
5809 . nr doc-reference-count +1
5811 . ds doc-macro-name %R
5812 . doc-parse-args \$@
5815 . nr doc-curr-font \n[.f]
5816 . nr doc-curr-size \n[.ps]
5818 . \" append to reference box
5819 . boxa doc-report-name
5828 .\" NS doc-reference-title-count global register
5829 .\" NS counter of reference title references
5831 .nr doc-reference-title-count 0
5834 .\" NS doc-reference-title-name global box
5835 .\" NS string of collected reference title references
5837 .ds doc-reference-title-name
5840 .\" NS doc-reference-title-name-for-book global box
5841 .\" NS string of collected reference title references
5842 .\" NS (saved with another font; this is a shortcoming of groff)
5844 .ds doc-reference-title-name-for-book
5847 .\" NS %T user macro
5848 .\" NS reference title
5852 .\" NS doc-curr-font
5853 .\" NS doc-curr-size
5854 .\" NS doc-macro-name
5855 .\" NS doc-reference-title-count
5856 .\" NS doc-report-count
5858 .\" NS local variables:
5861 .\" NS width register `%T' set in doc-common
5864 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5865 . tm Usage: .%T reference_title ... (#\n[.c])
5869 . if \n[doc-is-reference] \{\
5870 . nr doc-reference-title-count +1
5871 . nr doc-reference-count +1
5874 . ds doc-macro-name %T
5875 . doc-parse-args \$@
5878 . nr doc-curr-font \n[.f]
5879 . nr doc-curr-size \n[.ps]
5880 . ie \n[doc-is-reference] \{\
5881 . \" append to reference box
5882 . boxa doc-reference-title-name-for-book
5887 . nop \*[doc-No-font]\c
5890 . \" do it a second time with another font
5891 . ds doc-macro-name %T
5892 . doc-parse-args \$@
5895 . nr doc-curr-font \n[.f]
5896 . nr doc-curr-size \n[.ps]
5897 . boxa doc-reference-title-name
5902 . nop \*[doc-Em-font]\c
5906 . nop \*[doc-Em-font]\c
5907 . doc-print-recursive
5912 .\" NS doc-volume-count global register
5913 .\" NS counter of reference title references
5915 .nr doc-volume-count 0
5918 .\" NS doc-volume-name global box
5919 .\" NS string of collected volume references
5924 .\" NS %V user macro
5925 .\" NS reference volume
5929 .\" NS doc-curr-font
5930 .\" NS doc-curr-size
5931 .\" NS doc-macro-name
5932 .\" NS doc-reference-title-count
5933 .\" NS doc-volume-count
5935 .\" NS local variables:
5938 .\" NS width register `%V' set in doc-common
5941 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5942 . tm Usage: .%V volume ... (#\n[.c])
5946 . nr doc-volume-count +1
5947 . nr doc-reference-count +1
5949 . ds doc-macro-name %V
5950 . doc-parse-args \$@
5953 . nr doc-curr-font \n[.f]
5954 . nr doc-curr-size \n[.ps]
5956 . \" append to reference box
5957 . boxa doc-volume-name
5966 .\" NS doc-do-references macro
5967 .\" NS reference recursion routine
5972 .\" NS local variables:
5976 .de doc-do-references
5977 . if !\n[doc-is-reference] \
5978 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
5980 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
5982 . ie (\n[doc-reg-ddr1] == 1) \{\
5983 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
5984 . doc-append-arg \c 3
5985 . \*[doc-arg\n[doc-arg-ptr]]
5988 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
5990 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
5991 . \" finish reference box
5999 . nr doc-reg-ddr \n[doc-arg-ptr]
6001 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6007 .\" NS Hf user macro
6008 .\" NS source include header files.
6011 .\" NS doc-curr-font
6012 .\" NS doc-curr-size
6014 .\" NS width register `Hf' set in doc-common
6017 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6029 . Usage: .Hf file (#\n[.c])
6033 .\" NS doc-have-author global register (bool)
6036 .nr doc-have-author 0
6039 .\" NS An user macro
6044 .\" NS doc-curr-font
6045 .\" NS doc-curr-size
6046 .\" NS doc-have-author
6047 .\" NS doc-macro-name
6049 .\" NS width register `An' set in doc-common
6052 . if !\n[doc-arg-limit] \{\
6054 . ie "\$1"-nosplit" \
6055 . nr doc-in-authors-section 0
6056 . el \{ .ie "\$1"-split" \
6057 . nr doc-in-authors-section 1
6059 . ds doc-macro-name An
6060 . doc-parse-args \$@
6063 . tm1 "Usage: .An {-nosplit | -split}
6064 . tm1 .An author_name ... (#\n[.c])
6067 . if \n[doc-in-authors-section] \{\
6068 . ie \n[doc-have-author] \
6071 . nr doc-have-author 1
6074 . if \n[doc-arg-limit] \{\
6076 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6077 . nr doc-curr-font \n[.f]
6078 . nr doc-curr-size \n[.ps]
6079 . doc-print-recursive
6082 . tm Usage: .An author_name ... (#\n[.c])
6088 .\" NS Sf user macro
6091 .\" NS width register `Sf' set in doc-common
6094 . tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
6098 .\" NS Rv user macro
6099 .\" NS return values
6101 .\" NS width register `Rv' set in doc-common
6103 .\" NS local variables:
6104 .\" NS doc-str-Rv-prefix
6105 .\" NS doc-str-Rv-suffix
6107 .ds doc-str-Rv-prefix "The
6108 .ds doc-str-Rv-suffix "function returns the value\~0 if successful;
6109 .as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
6110 .as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
6111 .as doc-str-Rv-suffix " is set to indicate the error.
6115 .\" XXX: what does this function without `-std'?
6118 . tm Usage: .Rv [-std] (#\n[.c])
6122 . \" .ds doc-macro-name Rv
6123 . \" .nr doc-arg-ptr 0
6125 . \" .ds doc-arg1 \$2
6126 . \" .ds doc-arg2 \$3
6127 . \" .ds doc-arg3 \$4
6128 . \" .ds doc-arg4 \$5
6129 . \" .ds doc-arg5 \$6
6130 . \" .ds doc-arg6 \$7
6131 . \" .ds doc-arg7 \$8
6132 . \" .ds doc-arg8 \$9
6134 . \" .nr doc-num-args (\n[.$] - 1)
6137 . nr doc-reg-Rv \*[doc-section]
6138 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6139 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6141 . nop \)\*[doc-str-Rv-prefix]
6143 . nop \)\*[doc-str-Rv-suffix]
6148 .\" NS Mt user macro
6149 .\" NS mailto (for conversion to HTML)
6152 . \" XXX: error handling missing
6157 .\" NS Lk user macro
6158 .\" NS link (for conversion to HTML)
6160 .\" NS local variables:
6165 . ds doc-str-Lk Sy \$@
6167 . ie (\n[.$] > 1) \{\
6168 . doc-get-arg-type \$2
6169 . ie (\n[doc-arg-type] < 3) \{\
6171 . ds doc-str-Lk Sy "\$1"
6172 . doc-get-width "\$1"
6175 . as doc-str-Lk " \$@
6178 . doc-get-width "\$1"
6181 . doc-get-width "\$1"
6187 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6197 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6198 . tm1 " Should this have been `.Em ...'?
6203 .\" NS doc-empty-line macro
6204 .\" NS emit warning and print empty line
6207 . if !"\*[doc-macro-name]"Bd" \
6208 . tm mdoc warning: Empty input line #\n[.c]
6218 .\" load local modifications