1 .\" Copyright (c) 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
14 .\" 4. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)doc 8.1 (Berkeley) 06/08/93
32 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
33 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
34 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
35 .\" are loaded using the `mso' request.
39 .\" Werner LEMBERG <wl@gnu.org> and
40 .\" Ruslan Ermilov <ru@freebsd.org>
42 .\" to make it more readable: using long names and many groff features,
43 .\" updating and extending documentation, etc.
49 . ab This version of mdoc can be run with GNU troff only!
58 .if (\n[.x]\n[.y] < 118) \
59 . ab You need GNU troff version 1.18 or higher to run this version of mdoc!
62 .\" Load start-up files
64 . mso mdoc/doc-ditroff
75 .\" NS doc-macro-name global string
76 .\" NS name of calling request (set in each user-requestable macro)
79 .als doc-arg0 doc-macro-name
82 .\" NS doc-arg-limit global register
83 .\" NS total number of arguments
88 .\" NS doc-num-args global register
89 .\" NS number of arguments to handle (must be set to \n[.$] prior to
90 .\" NS `doc-parse-arg-vector' request)
95 .\" NS doc-arg-ptr global register
96 .\" NS argument pointer
101 .\" NS doc-argXXX global string
102 .\" NS argument vector
110 .\" NS doc-typeXXX global register
111 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
112 .\" NS punctuation prefix=4)
120 .\" NS doc-spaceXXX global string
129 .\" NS doc-parse-args macro
130 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
139 .\" NS doc-have-space
141 .\" NS local variables:
147 . if !\n[doc-arg-limit] \
150 . nr doc-have-space 0
155 . nr doc-arg-limit +1
157 . \" handle `|' and `...' specially
159 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
160 . el \{ .ie "\$1"..." \
161 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
163 . ds doc-arg\n[doc-arg-limit] "\$1
166 . \" get argument type and set spacing
167 . doc-get-arg-type* \n[doc-arg-limit]
168 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
169 . doc-set-spacing-\n[doc-arg-type]
171 . \" check whether we have processed the last parameter
183 .\" NS doc-parse-arg-vector macro
184 .\" NS parse argument vector (recursive)
186 .\" NS cf. comments in doc-parse-args
196 .\" NS local variables:
201 .de doc-parse-arg-vector
202 . if !\n[doc-arg-limit] \
205 . nr doc-arg-limit +1
207 . ie "\*[doc-arg\n[doc-arg-limit]]"|" \
208 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
209 . el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
210 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
213 . doc-get-arg-type* \n[doc-arg-limit]
214 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
215 . doc-set-spacing-\n[doc-arg-type]
217 . ie (\n[doc-num-args] == 1) \{\
223 . doc-parse-arg-vector
230 .\" NS doc-parse-space-vector macro
231 .\" NS parse space vector (recursive)
238 .de doc-parse-space-vector
239 . nr doc-arg-limit +1
241 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
243 . ie (\n[doc-num-args] == 1) \
247 . doc-parse-space-vector
252 .\" NS doc-remaining-args macro
253 .\" NS output remaining arguments as-is, separated by spaces (until
254 .\" NS `doc-num-args' is exhausted)
260 .de doc-remaining-args
262 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
264 . ie (\n[doc-num-args] == 1) \{\
269 . nop \)\*[doc-space]\c
276 .\" NS doc-append-arg macro
277 .\" NS append one argument to argument vector:
278 .\" NS `.doc-append-arg [arg] [type]'
286 . nr doc-arg-limit +1
287 . ds doc-arg\n[doc-arg-limit] "\$1
288 . nr doc-type\n[doc-arg-limit] \$2
289 . doc-set-spacing-\$2
293 .\" NS doc-print-and-reset macro
294 .\" NS finish input line and clean up argument vectors
296 .de doc-print-and-reset
297 . if \n[doc-space-mode] \
303 .\" NS doc-reset-args macro
304 .\" NS reset argument counters
316 . hy \n[doc-hyphen-flags]
322 .\" NS doc-curr-font global register
323 .\" NS saved current font
325 .nr doc-curr-font \n[.f]
328 .\" NS doc-curr-size global register
329 .\" NS saved current font size
331 .nr doc-curr-size \n[.ps]
337 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
343 .\" NS doc-macro-name
345 .\" NS local variables:
346 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
348 .\" NS width register `Fl' set in doc-common
351 . nr doc-curr-font \n[.f]
352 . nr doc-curr-size \n[.ps]
353 . nop \*[doc-Fl-font]\c
355 . if !\n[doc-arg-limit] \{\
356 . ds doc-macro-name Fl
361 . nop \|\-\|\f[]\s[0]
364 . if !\n[doc-arg-limit] \
368 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
370 . nop \|\-\f[]\s[0]\c
371 . doc-print-and-reset
374 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
375 . nop \|\-\f[]\s[0]\c
376 . \*[doc-arg\n[doc-arg-ptr]]
379 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
388 .\" NS doc-flag-recursion macro
389 .\" NS `Fl' flag recursion routine (special handling)
394 .\" NS local variables:
399 .de doc-flag-recursion
400 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
401 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
403 . ie (\n[doc-reg-dfr1] == 1) \{\
408 . nr doc-reg-dfr \n[doc-arg-ptr]
410 . ie (\n[doc-reg-dfr1] == 2) \{\
411 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
412 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
414 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
415 . if \n[doc-reg-Fl] \
416 . nop \|\-\*[doc-space]\c
420 . ie "\*[doc-str-dfr]"\f[R]|\f[]" \{\
421 . if \n[doc-reg-Fl] \
422 . nop \|\-\*[doc-space]\c
426 . \" two consecutive hyphen characters?
427 . ie "\*[doc-str-dfr]"-" \
430 . nop \|\%\-\*[doc-str-dfr]\&\c
433 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
434 . nop \)\*[doc-str-dfr]\f[]\s[0]\c
437 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
439 . if (\n[doc-reg-dfr1] == 4) \
442 . doc-print-and-reset
446 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
447 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
450 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
453 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
457 . doc-flag-recursion \$@
462 .\" NS doc-print-recursive macro
463 .\" NS general name recursion routine (print remaining arguments)
468 .\" NS local variables:
473 .de doc-print-recursive
474 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
475 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
477 . ie (\n[doc-reg-dpr1] == 1) \{\
478 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
482 . nr doc-reg-dpr \n[doc-arg-ptr]
484 . \" the `\%' prevents hyphenation on a dash (`-')
485 . ie (\n[doc-reg-dpr1] == 2) \
486 . nop \%\*[doc-str-dpr]\&\c
488 . \" punctuation character
489 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
490 . nop \)\*[doc-str-dpr]\f[]\s[0]\c
494 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
496 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
497 . doc-print-and-reset
500 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
501 . doc-print-recursive
506 .\" NS doc-print-prefixes macro
507 .\" NS print leading prefixes
512 .de doc-print-prefixes
513 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
514 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
516 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
517 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
523 .\" NS doc-generic-macro macro
524 .\" NS this is the skeleton for most simple macros
530 .\" NS doc-macro-name
532 .de doc-generic-macro
533 . if !\n[doc-arg-limit] \{\
535 . ds doc-macro-name \$0
539 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
542 . if !\n[doc-arg-limit] \
546 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
547 . if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
548 . tmc mdoc warning: Using a macro as first argument
549 . tm1 " cancels effect of .\$0 (#\n[.c])
551 . \" the right action here would be to reset the argument counters
552 . \" and bail out -- unfortunately, a small number of manual pages
553 . \" (less than 2% for FreeBSD which has been used for testing)
554 . \" relied on the old behaviour (silently ignore this error),
555 . \" so it is commented out
560 . nr doc-curr-font \n[.f]
561 . nr doc-curr-size \n[.ps]
562 . nop \*[doc-\$0-font]\c
563 . doc-print-recursive
567 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
574 .\" NS command line `argument' macro: `.Ar [args ...]'
580 .\" NS doc-macro-name
582 .\" NS local variable:
583 .\" NS doc-str-Ar-default
585 .\" NS width register `Ar' set in doc-common
587 .ds doc-str-Ar-default "file\ .\|.\|.
590 . nr doc-curr-font \n[.f]
591 . nr doc-curr-size \n[.ps]
592 . nop \*[doc-Ar-font]\c
594 . if !\n[doc-arg-limit] \{\
595 . ds doc-macro-name Ar
600 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
603 . if !\n[doc-arg-limit] \
608 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
609 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
610 . doc-print-and-reset
613 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
614 . \" replace previous argument (Ar) with default value
616 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
617 . nr doc-type\n[doc-arg-ptr] 2
618 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
620 . \" recompute space vector for remaining arguments
621 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
622 . nr doc-arg-limit \n[doc-arg-ptr]
623 . doc-parse-space-vector
625 . doc-print-recursive
633 .\" NS width register `Ad' set in doc-common
635 .als Ad doc-generic-macro
636 .ds doc-Ad-usage address
639 .\" NS doc-indent-synopsis global register
640 .\" NS indentation in synopsis
642 .nr doc-indent-synopsis 0
645 .\" NS doc-indent-synopsis-active global register (bool)
646 .\" NS indentation in synopsis active
648 .nr doc-indent-synopsis-active 0
652 .\" NS config declaration (for section 4 SYNOPSIS)
654 .\" NS this function causes a break; it uses the `Nm' font
660 .\" NS doc-indent-synopsis
661 .\" NS doc-macro-name
663 .\" NS width register `Cd' set in doc-common
666 . if !\n[doc-arg-limit] \{\
668 . ds doc-macro-name Cd
672 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
675 . if !\n[doc-arg-limit] \
679 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
680 . nr doc-curr-font \n[.f]
681 . nr doc-curr-size \n[.ps]
683 . ie \n[doc-in-synopsis-section] \{\
684 . ie "\*[doc-macro-name]"Cd" \{\
686 . if !\n[doc-indent-synopsis] \
687 . nr doc-indent-synopsis \n[doc-display-indent]u
688 . if !\n[doc-indent-synopsis-active] \
689 . in +\n[doc-indent-synopsis]u
690 . ti -\n[doc-indent-synopsis]u
691 . nop \*[doc-Nm-font]\c
692 . doc-print-recursive
693 . if !\n[doc-indent-synopsis-active] \
694 . in -\n[doc-indent-synopsis]u
697 . nop \*[doc-Nm-font]\c
698 . doc-print-recursive
701 . nop \*[doc-Nm-font]\c
702 . doc-print-recursive
705 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
712 .\" NS interactive command modifier (flag)
714 .\" NS width register `Cm' set in doc-common
716 .als Cm doc-generic-macro
717 .ds doc-Cm-usage interactive_command_modifier
721 .\" NS defined variable
723 .\" NS this function uses the `Er' font
725 .\" NS width register `Dv' set in doc-common
727 .als Dv doc-generic-macro
728 .ds doc-Dv-usage defined_variable
729 .als doc-Dv-font doc-Er-font
735 .\" NS width register `Em' set in doc-common
737 .als Em doc-generic-macro
738 .ds doc-Em-usage text
744 .\" NS width register `Er' set in doc-common
746 .als Er doc-generic-macro
747 .ds doc-Er-usage text
751 .\" NS environment variable
753 .\" NS width register `Ev' set in doc-common
755 .als Ev doc-generic-macro
756 .ds doc-Ev-usage text
759 .\" NS doc-have-decl global register (bool)
760 .\" NS subroutine test (in synopsis only)
765 .\" NS doc-have-var global register (bool)
766 .\" NS whether last type is a variable type
771 .\" NS doc-do-func-decl macro
772 .\" NS do something special while in SYNOPSIS
781 . if \n[doc-in-synopsis-section] \{\
782 . \" if a variable type was the last thing given, want vertical space
783 . if \n[doc-have-var] \{\
787 . \" if a subroutine was the last thing given, want vertical space
788 . if \n[doc-have-func] \{\
789 . ie \n[doc-have-decl] \
797 . nr doc-curr-font \n[.f]
798 . nr doc-curr-size \n[.ps]
803 .\" NS function declaration -- not callable
805 .\" NS this function causes a break
807 .\" NS width register `Fd' set in doc-common
810 . ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
812 . nop \*[doc-Fd-font]\$*
814 . ft \n[doc-curr-font]
815 . ps \n[doc-curr-size]u
818 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
825 .\" NS #include statement in SYNOPSIS
826 .\" NS <header.h> if not in SYNOPSIS
828 .\" NS this function causes a break; it uses the `Fd' font
834 .\" NS doc-indent-synopsis
835 .\" NS doc-macro-name
837 .\" NS width register `In' set in doc-common
840 . if !\n[doc-arg-limit] \{\
842 . ds doc-macro-name In
846 . tm Usage: .In include_file ... (#\n[.c])
849 . if !\n[doc-arg-limit] \
854 . ie ((\n[doc-arg-limit] >= \n[doc-arg-ptr]) & (\n[doc-type\n[doc-arg-ptr]] == 2)) \{\
855 . nr doc-curr-font \n[.f]
856 . nr doc-curr-size \n[.ps]
858 . ie \n[doc-in-synopsis-section] \{\
859 . ie "\*[doc-macro-name]"In" \{\
861 . nop \*[doc-Fd-font]#include <\*[doc-arg\n[doc-arg-ptr]]>
862 . ft \n[doc-curr-font]
863 . ps \n[doc-curr-size]u
866 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
867 . doc-print-recursive
872 . ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
873 . as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
874 . doc-print-recursive
877 . ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
878 . as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
879 . doc-print-recursive
882 . tm Usage: .In include_file ... (#\n[.c])
889 .\" NS function return value
891 .\" NS this function uses the `Ar' font
893 .\" NS width register `Fr' set in doc-common
895 .als Fr doc-generic-macro
896 .ds doc-Fr-usage function_return_value
897 .als doc-Fr-font doc-Ar-font
901 .\" NS interactive command
903 .\" NS width register `Ic' set in doc-common
905 .als Ic doc-generic-macro
906 .ds doc-Ic-usage interactive_command
912 .\" NS width register `Li' set in doc-common
914 .als Li doc-generic-macro
915 .ds doc-Li-usage argument
921 .\" NS this function uses the `Sy' font
923 .\" NS width register `Ms' set in doc-common
925 .als Ms doc-generic-macro
926 .ds doc-Ms-usage math_symbol
927 .als doc-Ms-font doc-Sy-font
930 .\" NS doc-command-name global string
931 .\" NS save first invocation of .Nm
937 .\" NS name of command or page topic
941 .\" NS doc-command-name
944 .\" NS doc-indent-synopsis
945 .\" NS doc-indent-synopsis-active
946 .\" NS doc-macro-name
948 .\" NS width register `Nm' set in doc-common
951 . if !\n[doc-arg-limit] \{\
952 . ds doc-macro-name Nm
956 . ie "\*[doc-command-name]"" \
957 . tm Usage: .Nm name ... (#\n[.c])
959 . doc-parse-args \*[doc-command-name]
962 . if !\n[doc-arg-limit] \
967 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
969 . ie "\*[doc-command-name]"" \{\
970 . tm Usage: .Nm name ... (#\n[.c])
974 . nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
975 . doc-print-and-reset
978 . nr doc-curr-font \n[.f]
979 . nr doc-curr-size \n[.ps]
981 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
982 . ie "\*[doc-command-name]"" \
983 . tm Usage: .Nm name ... (#\n[.c])
985 . \" replace previous argument (Nm) with default value
987 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
988 . nr doc-type\n[doc-arg-ptr] 2
989 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
991 . \" recompute space vector for remaining arguments
992 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
993 . nr doc-arg-limit \n[doc-arg-ptr]
994 . doc-parse-space-vector
997 . \" handle `.Nm ...' in SYNOPSIS
998 . if \n[doc-in-synopsis-section] \{\
999 . if "\*[doc-macro-name]"Nm" \{\
1001 . if !\n[doc-indent-synopsis] \{\
1002 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1003 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1005 . if !\n[doc-indent-synopsis-active] \{\
1006 . in +\n[doc-indent-synopsis]u
1007 . nr doc-indent-synopsis-active 1
1009 . ti -\n[doc-indent-synopsis]u
1011 . if "\*[doc-command-name]"" \
1012 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1014 . nop \*[doc-Nm-font]\c
1016 . doc-print-recursive
1021 .\" NS Pa user macro
1022 .\" NS pathname: `.Pa [arg ...]'
1026 .\" NS doc-curr-font
1027 .\" NS doc-curr-size
1028 .\" NS doc-macro-name
1030 .\" NS width register `Pa' set in doc-common
1033 . if !\n[doc-arg-limit] \{\
1034 . ds doc-macro-name Pa
1035 . doc-parse-args \$@
1039 . nop \*[doc-Pa-font]~\f[]\s[0]
1042 . if !\n[doc-arg-limit] \
1046 . doc-print-prefixes
1047 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1048 . nr doc-curr-font \n[.f]
1049 . nr doc-curr-size \n[.ps]
1050 . nop \*[doc-Pa-font]\c
1051 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1052 . \" replace previous argument (Pa) with default value
1054 . ds doc-arg\n[doc-arg-ptr] ~
1055 . nr doc-type\n[doc-arg-ptr] 2
1056 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1058 . \" recompute space vector for remaining arguments
1059 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1060 . nr doc-arg-limit \n[doc-arg-ptr]
1061 . doc-parse-space-vector
1063 . doc-print-recursive
1066 . nop \*[doc-Pa-font]~\f[]\s[0]\c
1067 . doc-print-and-reset
1072 .\" NS Sy user macro
1075 .\" NS width register `Sy' set in doc-common
1077 .als Sy doc-generic-macro
1078 .ds doc-Sy-usage symbolic_text
1081 .\" NS Me user macro
1084 .\" NS width register `Me' set in doc-common
1086 .als Me doc-generic-macro
1087 .ds doc-Me-usage menu_entry
1090 .\" NS Tn user macro
1095 .\" NS doc-curr-font
1096 .\" NS doc-curr-size
1097 .\" NS doc-macro-name
1099 .\" NS width register `Tn' set in doc-common
1102 . if !\n[doc-arg-limit] \{\
1104 . ds doc-macro-name Tn
1105 . doc-parse-args \$@
1108 . tm Usage: .Tn trade_name ... (#\n[.c])
1111 . if !\n[doc-arg-limit] \
1115 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1116 . nr doc-curr-font \n[.f]
1117 . nr doc-curr-size \n[.ps]
1118 . nop \)\*[doc-Tn-font-size]\c
1119 . ie !\n[doc-is-reference] \{\
1120 . nop \)\*[doc-Tn-font-shape]\c
1121 . doc-print-recursive
1127 . tm Usage: .Tn trade_name ... (#\n[.c])
1133 .\" NS Va user macro
1134 .\" NS variable name
1136 .\" NS width register `Va' set in doc-common
1138 .als Va doc-generic-macro
1139 .ds doc-Va-usage variable_name
1142 .\" NS No user macro
1143 .\" NS normal text macro (default text style if mess up)
1145 .\" NS width register `No' set in doc-common
1147 .als No doc-generic-macro
1148 .ds doc-No-usage normal_text
1151 .\" NS doc-quote-left global string
1152 .\" NS left quotation character for `doc-enclose-string' and
1153 .\" NS `doc-enclose-open'
1158 .\" NS doc-quote-right global string
1159 .\" NS right quotation character for `doc-enclose-string' and
1160 .\" NS `doc-enclose-close'
1165 .\" NS Op user macro
1166 .\" NS option expression (i.e., enclose string in square brackets)
1169 .\" NS doc-macro-name
1170 .\" NS doc-quote-left
1171 .\" NS doc-quote-right
1173 .\" NS width register `Op' set in doc-common
1176 . if !\n[doc-arg-limit] \
1177 . ds doc-macro-name Op
1179 . ds doc-quote-left "\*[doc-left-bracket]
1180 . ds doc-quote-right "\*[doc-right-bracket]
1182 . doc-enclose-string \$@
1186 .\" NS Aq user macro
1187 .\" NS enclose string in angle brackets
1190 .\" NS doc-macro-name
1191 .\" NS doc-quote-left
1192 .\" NS doc-quote-right
1194 .\" NS width register `Aq' set in doc-common
1197 . if !\n[doc-arg-limit] \
1198 . ds doc-macro-name Aq
1200 . ie "\*[doc-macro-name]"An" \{\
1201 . ds doc-quote-left <
1202 . ds doc-quote-right >
1205 . ds doc-quote-left \[la]
1206 . ds doc-quote-right \[ra]
1209 . doc-enclose-string \$@
1213 .\" NS Bq user macro
1214 .\" NS enclose string in square brackets
1217 .\" NS doc-macro-name
1218 .\" NS doc-quote-left
1219 .\" NS doc-quote-right
1221 .\" NS width register `Bq' set in doc-common
1224 . if !\n[doc-arg-limit] \
1225 . ds doc-macro-name Bq
1227 . ds doc-quote-left "\*[doc-left-bracket]
1228 . ds doc-quote-right "\*[doc-right-bracket]
1230 . doc-enclose-string \$@
1234 .\" NS Brq user macro
1235 .\" NS enclose string in braces
1238 .\" NS doc-macro-name
1239 .\" NS doc-quote-left
1240 .\" NS doc-quote-right
1242 .\" NS width register `Brq' set in doc-common
1245 . if !\n[doc-arg-limit] \
1246 . ds doc-macro-name Brq
1248 . ds doc-quote-left {
1249 . ds doc-quote-right }
1251 . doc-enclose-string \$@
1255 .\" NS Dq user macro
1256 .\" NS enclose string in double quotes
1259 .\" NS doc-macro-name
1260 .\" NS doc-quote-left
1261 .\" NS doc-quote-right
1263 .\" NS width register `Dq' set in doc-common
1266 . if !\n[doc-arg-limit] \
1267 . ds doc-macro-name Dq
1269 . ds doc-quote-left "\*[Lq]
1270 . ds doc-quote-right "\*[Rq]
1272 . doc-enclose-string \$@
1276 .\" NS Eq user macro
1277 .\" NS enclose string in user-defined quotes (args 1 and 2)
1280 .\" NS doc-macro-name
1281 .\" NS doc-quote-left
1282 .\" NS doc-quote-right
1284 .\" NS width register `Eq' set in doc-common
1287 . if !\n[doc-arg-limit] \
1288 . ds doc-macro-name Eq
1290 . ds doc-quote-left "\$1
1291 . ds doc-quote-right "\$2
1294 . doc-enclose-string \$@
1298 .\" NS Pq user macro
1299 .\" NS enclose string in parentheses
1302 .\" NS doc-macro-name
1303 .\" NS doc-quote-left
1304 .\" NS doc-quote-right
1306 .\" NS width register `Pq' set in doc-common
1309 . if !\n[doc-arg-limit] \
1310 . ds doc-macro-name Pq
1312 . ds doc-quote-left "\*[doc-left-parenthesis]
1313 . ds doc-quote-right "\*[doc-right-parenthesis]
1315 . doc-enclose-string \$@
1319 .\" NS Ql user macro
1320 .\" NS quoted literal
1322 .\" is in file doc-[dit|n]roff
1325 .\" NS Qq user macro
1326 .\" NS enclose string in straight double quotes
1329 .\" NS doc-macro-name
1330 .\" NS doc-quote-left
1331 .\" NS doc-quote-right
1333 .\" NS width register `Qq' set in doc-common
1336 . if !\n[doc-arg-limit] \
1337 . ds doc-macro-name Qq
1339 . ds doc-quote-left "\*[q]
1340 . ds doc-quote-right "\*[q]
1342 . doc-enclose-string \$@
1346 .\" NS Sq user macro
1347 .\" NS enclose string in single quotes
1350 .\" NS doc-macro-name
1351 .\" NS doc-quote-left
1352 .\" NS doc-quote-right
1354 .\" NS width register `Sq' set in doc-common
1357 . if !\n[doc-arg-limit] \
1358 . ds doc-macro-name Sq
1360 . ds doc-quote-left "\*[doc-left-singlequote]
1361 . ds doc-quote-right "\*[doc-right-singlequote]
1363 . doc-enclose-string \$@
1367 .\" NS Es user macro
1368 .\" NS set up arguments (i.e., the left and right quotation character as
1369 .\" NS first and second argument) for .En call
1373 .\" NS doc-macro-name
1374 .\" NS doc-quote-left
1375 .\" NS doc-quote-right
1378 . if !\n[doc-arg-limit] \{\
1379 . ie (\n[.$] > 2) \{\
1380 . ds doc-macro-name Es
1381 . doc-parse-args \$@
1384 . ds doc-quote-left "\$1
1385 . ds doc-quote-right "\$2
1388 . if !\n[doc-arg-limit] \
1392 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1394 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1396 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1397 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1399 . doc-print-and-reset
1403 .\" NS doc-have-slot global register (bool)
1404 .\" NS set if `doc-enclose-string' has created a slot for closing
1410 .\" NS doc-enclose-string macro
1411 .\" NS enclose string with given args (e.g. [ and ])
1416 .\" NS doc-have-slot
1418 .\" NS local variables:
1424 .\" NS doc-quote-left
1425 .\" NS doc-quote-right
1427 .de doc-enclose-string
1428 . if \n[doc-in-synopsis-section] \
1429 . doc-set-hard-space
1431 . if !\n[doc-arg-limit] \{\
1433 . doc-parse-args \$@
1435 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1438 . if !\n[doc-arg-limit] \
1441 . nr doc-curr-font \n[.f]
1442 . nr doc-curr-size \n[.ps]
1445 . doc-print-prefixes
1446 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1447 . nop \)\*[doc-quote-left]\)\c
1448 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1450 . nop \)\*[doc-quote-right]\)\c
1451 . doc-print-and-reset
1454 . \" test whether last arguments are of type closing punctuation
1456 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1457 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1458 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1461 . \" prepend closing delimiter
1463 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1466 . \" test whether last arguments are macros which continue the line
1468 . nr doc-reg-des \n[doc-arg-limit]
1469 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1470 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1472 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1477 . \" if there are no trailing macros to be skipped, append argument
1478 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1479 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1481 . \" if a previous call to `doc-enclose-string' has already created
1482 . \" a slot, prepend argument
1483 . ie \n[doc-have-slot] \
1484 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1486 . \" we have to shift all arguments to the right
1488 . nr doc-reg-des1 \n[doc-arg-limit]
1489 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1490 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1491 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1492 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1493 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1494 . nr doc-reg-des1 -1
1495 . nr doc-reg-des2 -1
1497 . nr doc-arg-limit +1
1499 . \" finally, insert closing delimiter into the freed slot and
1500 . \" recompute spacing vector
1501 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1502 . nr doc-type\n[doc-reg-des] 3
1503 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1504 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1505 . doc-parse-space-vector
1506 . nr doc-have-slot 1
1509 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1512 . if \n[doc-in-synopsis-section] \
1513 . doc-set-soft-space
1517 .\" NS En user macro
1518 .\" NS enclose arguments with quotation characters set up with `.Es'
1520 .als En doc-enclose-string
1523 .\" NS Ao user macro
1527 .\" NS doc-macro-name
1528 .\" NS doc-quote-left
1530 .\" NS width register `Ao' set in doc-common
1533 . if !\n[doc-arg-limit] \
1534 . ds doc-macro-name Ao
1536 . ie "\*[doc-macro-name]"An" \
1537 . ds doc-quote-left <
1539 . ds doc-quote-left \[la]
1541 . doc-enclose-open \$@
1545 .\" NS Ac user macro
1549 .\" NS doc-macro-name
1550 .\" NS doc-quote-right
1552 .\" NS width register `Ac' set in doc-common
1555 . if !\n[doc-arg-limit] \
1556 . ds doc-macro-name Ac
1558 . ie "\*[doc-macro-name]"An" \
1559 . ds doc-quote-right >
1561 . ds doc-quote-right \[ra]
1563 . doc-enclose-close \$@
1567 .\" NS Bo user macro
1571 .\" NS doc-macro-name
1572 .\" NS doc-quote-left
1574 .\" NS width register `Bo' set in doc-common
1577 . if !\n[doc-arg-limit] \
1578 . ds doc-macro-name Bo
1580 . ds doc-quote-left "\*[doc-left-bracket]
1582 . doc-enclose-open \$@
1586 .\" NS Bc user macro
1587 .\" NS bracket close
1590 .\" NS doc-macro-name
1591 .\" NS doc-quote-right
1593 .\" NS width register `Bc' set in doc-common
1596 . if !\n[doc-arg-limit] \
1597 . ds doc-macro-name Bc
1599 . ds doc-quote-right "\*[doc-right-bracket]
1601 . doc-enclose-close \$@
1605 .\" NS Bro user macro
1609 .\" NS doc-macro-name
1610 .\" NS doc-quote-left
1612 .\" NS width register `Bro' set in doc-common
1615 . if !\n[doc-arg-limit] \
1616 . ds doc-macro-name Bo
1618 . ds doc-quote-left {
1620 . doc-enclose-open \$@
1624 .\" NS Brc user macro
1628 .\" NS doc-macro-name
1629 .\" NS doc-quote-right
1631 .\" NS width register `Brc' set in doc-common
1634 . if !\n[doc-arg-limit] \
1635 . ds doc-macro-name Bc
1637 . ds doc-quote-right }
1639 . doc-enclose-close \$@
1643 .\" NS Do user macro
1644 .\" NS double quote open
1647 .\" NS doc-macro-name
1648 .\" NS doc-quote-left
1650 .\" NS width register `Do' set in doc-common
1653 . if !\n[doc-arg-limit] \
1654 . ds doc-macro-name Do
1656 . ds doc-quote-left "\*[Lq]
1658 . doc-enclose-open \$@
1662 .\" NS Dc user macro
1663 .\" NS double quote close
1666 .\" NS doc-macro-name
1667 .\" NS doc-quote-right
1669 .\" NS width register `Dc' set in doc-common
1672 . if !\n[doc-arg-limit] \
1673 . ds doc-macro-name Dc
1675 . ds doc-quote-right "\*[Rq]
1677 . doc-enclose-close \$@
1681 .\" NS Eo user macro
1682 .\" NS enclose open (using first argument as beginning of enclosure)
1685 .\" NS doc-macro-name
1686 .\" NS doc-quote-left
1688 .\" NS width register `Eo' set in doc-common
1691 . if !\n[doc-arg-limit] \
1692 . ds doc-macro-name Eo
1694 . ds doc-quote-left "\$1
1697 . doc-enclose-open \$@
1701 .\" NS Ec user macro
1702 .\" NS enclose close (using first argument as end of enclosure)
1705 .\" NS doc-macro-name
1706 .\" NS doc-quote-right
1708 .\" NS width register `Ec' set in doc-common
1711 . if !\n[doc-arg-limit] \
1712 . ds doc-macro-name Ec
1714 . ds doc-quote-right "\$1
1717 . doc-enclose-close \$@
1721 .\" NS Oo user macro
1725 .\" NS doc-macro-name
1726 .\" NS doc-quote-left
1728 .\" NS width register `Oo' set in doc-common
1731 . if !\n[doc-arg-limit] \
1732 . ds doc-macro-name Oo
1734 . ds doc-quote-left [
1736 . doc-enclose-open \$@
1740 .\" NS Oc user macro
1744 .\" NS doc-macro-name
1745 .\" NS doc-quote-right
1747 .\" NS width register `Oc' set in doc-common
1750 . if !\n[doc-arg-limit] \
1751 . ds doc-macro-name Oc
1753 . ds doc-quote-right ]
1755 . doc-enclose-close \$@
1759 .\" NS Po user macro
1760 .\" NS parenthesis open
1763 .\" NS doc-macro-name
1764 .\" NS doc-quote-left
1766 .\" NS width register `Po' set in doc-common
1769 . if !\n[doc-arg-limit] \
1770 . ds doc-macro-name Po
1772 . ds doc-quote-left "\*[doc-left-parenthesis]
1774 . doc-enclose-open \$@
1778 .\" NS Pc user macro
1779 .\" NS parenthesis close
1782 .\" NS doc-macro-name
1783 .\" NS doc-quote-right
1785 .\" NS width register `Pc' set in doc-common
1788 . if !\n[doc-arg-limit] \
1789 . ds doc-macro-name Pc
1791 . ds doc-quote-right "\*[doc-right-parenthesis]
1793 . doc-enclose-close \$@
1797 .\" NS Qo user macro
1798 .\" NS straight double quote open
1801 .\" NS doc-macro-name
1802 .\" NS doc-quote-left
1804 .\" NS width register `Qo' set in doc-common
1807 . if !\n[doc-arg-limit] \
1808 . ds doc-macro-name Qo
1810 . ds doc-quote-left "\*[q]
1812 . doc-enclose-open \$@
1816 .\" NS Qc user macro
1817 .\" NS straight double quote close
1820 .\" NS doc-macro-name
1821 .\" NS doc-quote-right
1823 .\" NS width register `Qc' set in doc-common
1826 . if !\n[doc-arg-limit] \
1827 . ds doc-macro-name Qc
1829 . ds doc-quote-right "\*[q]
1831 . doc-enclose-close \$@
1835 .\" NS So user macro
1836 .\" NS single quote open
1839 .\" NS doc-macro-name
1840 .\" NS doc-quote-left
1842 .\" NS width register `So' set in doc-common
1845 . if !\n[doc-arg-limit] \
1846 . ds doc-macro-name So
1848 . ds doc-quote-left "\*[doc-left-singlequote]
1850 . doc-enclose-open \$@
1854 .\" NS Sc user macro
1855 .\" NS single quote close
1858 .\" NS doc-macro-name
1859 .\" NS doc-quote-right
1861 .\" NS width register `Sc' set in doc-common
1864 . if !\n[doc-arg-limit] \
1865 . ds doc-macro-name Sc
1867 . ds doc-quote-right "\*[doc-right-singlequote]
1869 . doc-enclose-close \$@
1873 .\" NS Xo user macro
1877 .\" NS doc-macro-name
1878 .\" NS doc-quote-left
1880 .\" NS width register `Xo' set in doc-common
1883 . if !\n[doc-arg-limit] \
1884 . ds doc-macro-name Xo
1888 . doc-enclose-open \$@
1892 .\" NS Xc user macro
1896 .\" NS doc-macro-name
1897 .\" NS doc-quote-right
1899 .\" NS width register `Xc' set in doc-common
1902 . if !\n[doc-arg-limit] \
1903 . ds doc-macro-name Xc
1905 . ds doc-quote-right
1907 . doc-enclose-close \$@
1911 .\" NS doc-nesting-level global register
1912 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1914 .nr doc-nesting-level 0
1917 .\" NS doc-in-list global register (bool)
1918 .\" NS whether we are in (logical) .It
1923 .\" NS doc-enclose-open macro
1924 .\" NS enclose string open
1928 .\" NS doc-nesting-level
1930 .de doc-enclose-open
1931 . if !\n[doc-arg-limit] \
1932 . doc-parse-args \$@
1935 . doc-print-prefixes
1938 . nop \)\*[doc-quote-left]\)\c
1940 . \" start enclosure box
1941 . box doc-enclosure-box\n[doc-nesting-level]
1942 . ev doc-enclosure-env\n[doc-nesting-level]
1946 . \" we insert something to make .chop always work
1949 . \" increase nesting level *after* parsing of arguments
1950 . nr doc-nesting-level +1
1952 . if \n[doc-arg-limit] \{\
1954 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1955 . doc-print-recursive
1962 .\" NS doc-enclose-close macro
1963 .\" NS enclose string close
1966 .\" NS doc-nesting-level
1968 .de doc-enclose-close
1969 . nr doc-nesting-level -1
1971 . \" finish enclosure box
1975 . chop doc-enclosure-box\n[doc-nesting-level]
1976 . unformat doc-enclosure-box\n[doc-nesting-level]
1979 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1980 . nop \)\*[doc-quote-right]\)\c
1982 . if !\n[doc-arg-limit] \{\
1983 . doc-parse-args \$@
1986 . doc-print-and-reset
1989 . if \n[doc-arg-limit] \{\
1990 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1991 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1993 . doc-print-recursive
1996 . doc-print-and-reset
1999 . \" shall we finish .It macro?
2000 . if !"\*[doc-macro-name]"It" \
2001 . if \n[doc-in-list] \
2002 . if !\n[doc-nesting-level] \
2003 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
2007 .\" NS Pf user macro
2008 .\" NS prefix: `.Pf prefix arg ...'
2012 .\" NS doc-macro-name
2013 .\" NS doc-quote-left
2015 .\" NS width register `Pf' set in doc-common
2018 . if !\n[doc-arg-limit] \
2019 . ds doc-macro-name Pf
2021 . ie \n[doc-arg-limit] \{\
2022 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2024 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2027 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2033 . doc-parse-args \$@
2035 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2039 . if \n[doc-arg-limit] \{\
2041 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2042 . doc-print-and-reset
2044 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2049 .\" NS Ns user macro
2050 .\" NS remove space (space removal done by `doc-parse-args')
2054 .\" NS doc-macro-name
2056 .\" NS width register `Ns' set in doc-common
2059 . if !\n[doc-arg-limit] \{\
2061 . ds doc-macro-name Ns
2062 . doc-parse-args \$@
2065 . tm Usage: .Ns must be called with arguments (#\n[.c])
2068 . if \n[doc-arg-limit] \{\
2070 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2071 . doc-print-recursive
2078 .\" NS Ap user macro
2079 .\" NS append an apostrophe
2081 .\" NS width register `Ap' set in doc-common
2084 . ie !\n[doc-arg-limit] \
2085 . tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2089 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2090 . doc-print-recursive
2097 .\" NS doc-space global string
2098 .\" NS current inter-argument space
2100 .ds doc-space "\*[doc-soft-space]
2103 .\" NS doc-soft-space constant string
2104 .\" NS soft (stretchable) space (defined in doc-common)
2107 .\" NS doc-hard-space constant string
2108 .\" NS hard (unpaddable) space (defined in doc-common)
2111 .\" NS doc-set-hard-space macro
2112 .\" NS set current space string to hard (unpaddable) space.
2115 .\" NS doc-saved-space
2118 .de doc-set-hard-space
2119 . ie "\*[doc-space]"" \
2120 . ds doc-saved-space "\*[doc-hard-space]
2122 . ds doc-space "\*[doc-hard-space]
2126 .\" NS doc-set-soft-space macro
2127 .\" NS set current space string to soft space
2130 .\" NS doc-saved-space
2133 .de doc-set-soft-space
2134 . ie "\*[doc-space]"" \
2135 . ds doc-saved-space "\*[doc-soft-space]
2137 . ds doc-space "\*[doc-soft-space]
2141 .\" NS doc-space-mode global register (bool)
2142 .\" NS default is one (space mode on)
2144 .nr doc-space-mode 1
2147 .\" NS doc-saved-space global string
2148 .\" NS saved value of `doc-space'
2150 .ds doc-saved-space "\*[doc-space]
2153 .\" NS doc-have-space global register (bool)
2154 .\" NS set if last command was horizontal space
2156 .nr doc-have-space 0
2159 .\" NS Sm user macro
2160 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2162 .\" NS without argument, toggle space mode
2165 .\" NS doc-arg-limit
2168 .\" NS doc-macro-name
2170 .\" NS doc-saved-space
2172 .\" NS doc-space-mode
2175 .\" NS local variables:
2178 .\" NS width register `Sm' set in doc-common
2181 . ie \n[doc-have-space] \
2186 . if !\n[doc-arg-limit] \{\
2188 . ds doc-macro-name Sm
2189 . doc-parse-args \$@
2192 . ie \n[doc-space-mode] \{\
2193 . ds doc-saved-space "\*[doc-space]
2195 . nr doc-space-mode 0
2198 . ds doc-space "\*[doc-saved-space]
2199 . nr doc-space-mode 1
2201 . \" finish line only if it is interrupted and `doc-have-space'
2203 . if \n[doc-reg-Sm] \
2209 . if !\n[doc-arg-limit] \
2214 . \" avoid a warning message in case `Sm' is the last parameter
2215 . if !d doc-arg\n[doc-arg-ptr] \
2216 . ds doc-arg\n[doc-arg-ptr]
2218 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2219 . ds doc-space "\*[doc-saved-space]
2220 . nr doc-space-mode 1
2223 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2224 . ds doc-saved-space "\*[doc-space]
2226 . nr doc-space-mode 0
2229 . \" no argument for Sm
2231 . ie \n[doc-space-mode] \{\
2232 . ds doc-saved-space "\*[doc-space]
2234 . nr doc-space-mode 0
2237 . ds doc-space "\*[doc-saved-space]
2238 . nr doc-space-mode 1
2242 . ie \n[doc-space-mode] \{\
2243 . \" recompute space vector for remaining arguments
2244 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2245 . nr doc-arg-limit \n[doc-arg-ptr]
2246 . if \n[doc-num-args] \
2247 . doc-parse-space-vector
2249 . \" finish line only if it is interrupted and `doc-have-space'
2251 . if \n[doc-reg-Sm] \
2256 . \" reset remaining space vector elements
2257 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2258 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2259 . ds doc-space\n[doc-reg-Sm]
2261 . \" the body of a `while' request must end with the fitting `\}'!
2265 . \" do we have parameters to print?
2266 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2267 . \" skip `Sm' argument
2269 . doc-print-recursive
2276 .\" NS doc-arg-type immediate register
2277 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2278 .\" NS punctuation prefix=4)
2283 .\" NS doc-get-arg-type macro
2284 .\" NS get argument type
2286 .\" NS this macro expects the width of the argument in `doc-width'
2291 .de doc-get-arg-type
2294 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2295 . ie (\n[doc-width] == 1) \{\
2296 . if r doc-punct\$1 \
2297 . nr doc-arg-type \n[doc-punct\$1]
2307 .\" NS doc-get-arg-type* macro
2308 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2310 .\" NS this macro sets the `doc-width' register using the `length' request
2311 .\" NS to get the number of characters in a string literally
2317 .de doc-get-arg-type*
2319 . length doc-width "\*[doc-arg\$1]
2321 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2322 . ie (\n[doc-width] == 1) \{\
2323 . if r doc-punct\*[doc-arg\$1] \
2324 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2327 . if r \*[doc-arg\$1] \
2328 . if d \*[doc-arg\$1] \
2334 .\" NS doc-set-spacing-1 macro
2335 .\" NS set spacing for macros
2340 .\" NS local variables:
2341 .\" NS doc-reg-dssfm
2342 .\" NS doc-reg-dssfm1
2344 .de doc-set-spacing-1
2345 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2347 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2349 . ie (\n[doc-reg-dssfm1] == 3) \{\
2350 . if \n[doc-arg-limit] \{\
2351 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2352 . ds doc-space\n[doc-reg-dssfm]
2354 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2357 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2359 . ie (\n[doc-reg-dssfm1] == 2) \{\
2360 . if \n[doc-arg-limit] \{\
2361 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2362 . ds doc-space\n[doc-reg-dssfm]
2364 . ds doc-space\n[doc-arg-limit]
2367 . ds doc-space\n[doc-arg-limit]
2372 .\" NS doc-set-spacing-2 macro
2373 .\" NS set spacing for strings
2378 .de doc-set-spacing-2
2379 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2383 .\" NS doc-set-spacing-3 macro
2384 .\" NS set spacing for punctuation suffixes
2389 .\" NS local variables:
2390 .\" NS doc-reg-dssfps
2392 .de doc-set-spacing-3
2393 . if \n[doc-arg-limit] \{\
2394 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2395 . ds doc-space\n[doc-reg-dssfps]
2398 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2402 .\" NS doc-set-spacing-4 macro
2403 .\" NS set spacing for punctuation prefixes
2408 .de doc-set-spacing-4
2409 . ds doc-space\n[doc-arg-limit]
2413 .\" type switches (on current argument doc-arg-ptr)
2416 .\" NS doc-do-1 macro
2417 .\" NS call request if macro
2420 . \*[doc-arg\n[doc-arg-ptr]]
2424 .\" NS doc-do-2 macro
2425 .\" NS call .doc-print-recursive if string
2427 .als doc-do-2 doc-print-recursive
2430 .\" NS doc-do-3 macro
2431 .\" NS call .doc-print-recursive if punctuation suffix
2433 .als doc-do-3 doc-print-recursive
2436 .\" NS doc-do-4 macro
2437 .\" NS call .doc-print-recursive if punctuation prefix
2439 .als doc-do-4 doc-print-recursive
2442 .\" NS doc-fontmode-depth global register
2443 .\" NS font mode level
2445 .nr doc-fontmode-depth 0
2448 .\" NS doc-fontmode-font-stackXXX global register
2449 .\" NS stack of saved current font values from `Bf' macro
2452 .\" NS doc-fontmode-depth
2454 .nr doc-fontmode-font-stack0 0
2457 .\" NS doc-fontmode-size-stackXXX global register
2458 .\" NS stack of saved current size values from `Bf' macro
2461 .\" NS doc-fontmode-depth
2463 .nr doc-fontmode-size-stack0 0
2466 .\" NS Bf user macro
2467 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2470 .\" NS doc-fontmode-depth
2471 .\" NS doc-fontmode-font-stackXXX
2472 .\" NS doc-fontmode-size-stackXXX
2473 .\" NS doc-macro-name
2475 .\" NS width register `Bf' set in doc-common
2478 . ds doc-macro-name Bf
2481 . nr doc-fontmode-depth +1
2483 . \" save current font and size
2484 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2485 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2488 . nop \*[doc-Em-font]\c
2489 . el \{ .ie "\$1"Li" \
2490 . nop \*[doc-Li-font]\c
2491 . el \{ .ie "\$1"Sy" \
2492 . nop \*[doc-Sy-font]\c
2493 . el \{ .ie "\$1"-emphasis" \
2494 . nop \*[doc-Em-font]\c
2495 . el \{ .ie "\$1"-literal" \
2496 . nop \*[doc-Li-font]\c
2497 . el \{ .ie "\$1"-symbolic" \
2498 . nop \*[doc-Sy-font]\c
2500 . tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2504 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2508 .\" NS Ef user macro
2509 .\" NS end font mode
2512 .\" NS doc-macro-name
2514 .\" NS width register `Ef' set in doc-common
2517 . ds doc-macro-name Ef
2519 . ie \n[doc-fontmode-depth] \{\
2520 . \" restore saved font and size
2521 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2522 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2524 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2525 . nr doc-curr-font \n[.f]
2526 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2527 . nr doc-curr-size \n[.ps]
2528 . nr doc-fontmode-depth -1
2531 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2535 .\" NS doc-keep-type global register
2536 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2541 .\" NS Bk user macro
2545 .\" NS doc-keep-type
2546 .\" NS doc-macro-name
2548 .\" NS width register `Bk' set in doc-common
2551 . ds doc-macro-name Bk
2553 . if \n[doc-keep-type] \
2554 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2556 . ie "\$1"-lines" \{\
2557 . nr doc-keep-type 2
2558 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2560 . el \{ .ie "\$1"-words" \{\
2561 . nr doc-keep-type 1
2562 . doc-set-hard-space
2564 . el \{ .ie "\$1"" \{\
2566 . nr doc-keep-type 1
2567 . doc-set-hard-space
2570 . tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2571 . nr doc-keep-type 3
2574 \#. nr doc-nesting-level +1
2578 .\" NS Ek user macro
2582 .\" NS doc-keep-type
2583 .\" NS doc-macro-name
2585 .\" NS width register `Ek' set in doc-common
2588 . ds doc-macro-name Ek
2590 \#. nr doc-nesting-level -1
2593 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2595 . if !\n[doc-keep-type] \
2596 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2598 . ie (\n[doc-keep-type] == 1) \
2599 . doc-set-soft-space
2600 . el \{ .if (\n[doc-keep-type] == 2) \
2601 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2604 . nr doc-keep-type 0
2606 \#. if !"\*[doc-out-string]"" \
2607 \#. doc-print-out-string
2611 .\" NS doc-display-depth global register
2612 .\" NS display level
2614 .nr doc-display-depth 0
2617 .\" NS doc-is-compact global register (bool)
2618 .\" NS set if the `compact' keyword is given
2620 .nr doc-is-compact 0
2623 .\" NS doc-display-type-stackXXX global string
2624 .\" NS the display type stack
2627 .\" NS doc-display-depth
2629 .ds doc-display-type-stack0
2632 .\" NS doc-display-indent-stackXXX global register
2633 .\" NS stack of display indentation values
2636 .\" NS doc-display-depth
2638 .nr doc-display-indent-stack0 0
2641 .\" NS doc-display-ad-stackXXX global register
2642 .\" NS stack of saved adjustment modes
2645 .\" NS doc-display-depth
2647 .nr doc-display-ad-stack0 0
2650 .\" NS doc-display-fi-stackXXX global register
2651 .\" NS stack of saved fill modes
2654 .\" NS doc-display-depth
2656 .nr doc-display-fi-stack0 0
2659 .\" NS doc-display-ft-stackXXX global register
2660 .\" NS stack of saved fonts
2663 .\" NS doc-display-depth
2665 .nr doc-display-ft-stack0 0
2668 .\" NS doc-display-ps-stackXXX global register
2669 .\" NS stack of saved font sizes
2672 .\" NS doc-display-depth
2674 .nr doc-display-ps-stack0 0
2677 .\" NS Bd user macro
2678 .\" NS begin display
2680 .\" NS width register `Bd' set in doc-common
2683 .\" NS doc-curr-font
2684 .\" NS doc-curr-size
2685 .\" NS doc-display-depth
2686 .\" NS doc-display-ad-stackXXX
2687 .\" NS doc-display-fi-stackXXX
2688 .\" NS doc-display-ft-stackXXX
2689 .\" NS doc-display-ps-stackXXX
2690 .\" NS doc-display-file
2691 .\" NS doc-display-indent-stackXXX
2692 .\" NS doc-display-type-stackXXX
2693 .\" NS doc-is-compact
2694 .\" NS doc-macro-name
2696 .\" NS local variables:
2700 . ds doc-macro-name Bd
2703 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2704 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2708 . nr doc-is-compact 0
2709 . ds doc-display-file
2711 . nr doc-display-depth +1
2713 . \" save current adjustment and fill modes
2714 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2715 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2717 . ie "\$1"-literal" \{\
2718 . ds doc-display-type-stack\n[doc-display-depth] literal
2719 . nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2720 . nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2728 . el \{ .ie "\$1"-filled" \{\
2729 . ds doc-display-type-stack\n[doc-display-depth] filled
2733 . el \{ .ie "\$1"-ragged" \{\
2734 . ds doc-display-type-stack\n[doc-display-depth] ragged
2738 . el \{ .ie "\$1"-centered" \{\
2739 . ds doc-display-type-stack\n[doc-display-depth] centered
2743 . el \{ .ie "\$1"-unfilled" \{\
2744 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2748 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2749 . tm1 " in .Bd macro (#\n[.c])
2753 . \" have we seen an argument?
2754 . if \n[doc-reg-Bd] \{\
2756 . \" check other arguments
2758 . doc-do-Bd-args \$@
2761 . \" avoid warning about non-existent register
2762 . if !r doc-display-indent-stack\n[doc-display-depth] \
2763 . nr doc-display-indent-stack\n[doc-display-depth] 0
2765 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2766 . in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2768 . if !\n[doc-is-compact] \
2769 . sp \n[doc-display-vertical]u
2771 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2773 . nop \*[doc-Li-font]\c
2778 . if !"\*[doc-display-file]"" \
2779 . so \*[doc-display-file]
2781 . nr doc-is-compact 0
2782 . ds doc-display-file
2786 .\" NS doc-do-Bd-args macro
2787 .\" NS resolve remaining .Bd arguments
2790 .\" NS doc-display-file
2791 .\" NS doc-display-indent-stackXXX
2792 .\" NS doc-is-compact
2794 .\" NS local variables:
2796 .\" NS doc-reg-ddBa1
2797 .\" NS doc-reg-ddBa2
2798 .\" NS doc-reg-ddBa3
2799 .\" NS doc-reg-ddBa4
2805 . ie "\$1"-offset" \{\
2809 . nr doc-display-indent-stack\n[doc-display-depth] 0
2810 . el \{ .ie "\$2"right" \
2811 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2812 . el \{ .ie "\$2"center" \
2813 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2814 . el \{ .ie "\$2"indent" \
2815 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2816 . el \{ .ie "\$2"indent-two" \
2817 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2822 . \" not a known keyword
2823 . if (\n[doc-reg-ddBa] == 1) \{\
2826 . nr doc-reg-ddBa1 0
2827 . if \B
\a(\$2)
\a \{\
2828 . \" disable warnings related to scaling indicators (32)
2829 . nr doc-reg-ddBa2 \n[.warn]
2830 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2832 . \" values without a scaling indicator are taken as strings;
2833 . \" we test whether the parameter string with and without the last
2834 . \" character yields identical numerical results (ignoring the
2835 . \" scaling indicator)
2836 . ds doc-str-ddBa "\$2
2837 . substring doc-str-ddBa 0 -2
2838 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2839 . nr doc-reg-ddBa3 (;(\$2))
2840 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2841 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2842 . nr doc-reg-ddBa1 1
2845 . \" enable all warnings again
2846 . warn \n[doc-reg-ddBa2]
2849 . ie \n[doc-reg-ddBa1] \
2850 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2852 . doc-get-width "\$2"
2853 . ie (\n[doc-width] <= 3) \{\
2854 . \" if the offset parameter is a macro, use the macro's
2855 . \" width as specified in doc-common
2856 . doc-get-arg-type "\$2"
2857 . ie (\n[doc-arg-type] == 1) \
2858 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2860 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2863 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2866 . el \{ .ie "\$1"-compact" \
2867 . nr doc-is-compact 1
2868 . el \{ .ie "\$1"-file" \{\
2870 . ds doc-display-file "\$2
2874 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2877 . tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2880 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2881 . shift \n[doc-reg-ddBa]
2882 . doc-do-Bd-args \$@
2887 .\" NS Ed user macro
2891 .\" NS doc-display-depth
2892 .\" NS doc-display-indent-stackXXX
2893 .\" NS doc-display-type-stackXXX
2894 .\" NS doc-macro-name
2896 .\" NS width register `Ed' set in doc-common
2899 . ds doc-macro-name Ed
2903 . if !\n[doc-display-depth] \{\
2904 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2905 . nr doc-display-depth 1
2908 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2909 . ft \n[doc-display-ft-stack\n[doc-display-depth]]
2910 . ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2913 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2915 . \" restore saved adjustment and fill modes
2916 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2920 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2922 . nr doc-display-indent-stack\n[doc-display-depth] 0
2923 . ds doc-display-type-stack\n[doc-display-depth]
2924 . nr doc-display-depth -1
2928 .\" NS doc-list-type-stackXXX global string
2929 .\" NS stack of list types
2932 .\" NS doc-list-depth
2934 .ds doc-list-type-stack1
2937 .\" NS doc-list-indent-stackXXX global register
2938 .\" NS stack of list indentation values
2941 .\" NS doc-list-depth
2943 .nr doc-list-indent-stack1 0
2946 .\" NS doc-list-have-indent-stackXXX global register (bool)
2947 .\" NS an indentation value is active
2950 .\" NS doc-list-depth
2952 .nr doc-list-have-indent-stack1 0
2955 .\" NS Bl user macro
2958 .\" NS width register `Bl' set in doc-common
2963 .\" NS doc-list-depth
2964 .\" NS doc-list-have-indent-stackXXX
2965 .\" NS doc-list-indent-stackXXX
2966 .\" NS doc-list-type-stackXXX
2967 .\" NS doc-macro-name
2969 .\" NS doc-num-columns
2971 .\" NS local variables:
2980 . ds doc-macro-name Bl
2981 . nr doc-list-depth +1
2984 . ie "\$1"-hang" \{\
2985 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2986 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2987 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2989 . el \{ .ie "\$1"-tag" \{\
2990 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2991 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2993 . el \{ .ie "\$1"-item" \{\
2994 . ds doc-list-type-stack\n[doc-list-depth] item-list
2995 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2997 . el \{ .ie "\$1"-enum" \{\
2998 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2999 . nr doc-list-indent-stack\n[doc-list-depth] 3n
3000 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3002 . el \{ .ie "\$1"-bullet" \{\
3003 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
3004 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3005 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3007 . el \{ .ie "\$1"-dash" \{\
3008 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3009 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3010 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3012 . el \{ .ie "\$1"-hyphen" \{\
3013 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3014 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3015 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3017 . el \{ .ie "\$1"-inset" \{\
3018 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3019 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3021 . el \{ .ie "\$1"-diag" \{\
3022 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3024 . el \{ .ie "\$1"-ohang" \{\
3025 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3026 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3028 . el \{ .ie "\$1"-column" \{\
3029 . ds doc-list-type-stack\n[doc-list-depth] column-list
3033 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3034 . tm1 " in .Bl macro
3037 . \}\}\}\}\}\}\}\}\}\}\}
3039 . \" we have seen a list type
3040 . if !\n[doc-arg-ptr] \{\
3043 . nr doc-list-depth -1
3049 . \" fill argument vector
3051 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3052 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3053 . \" dummy type and space so that doc-save-global-vars() doesn't warn
3054 . nr doc-type\n[doc-reg-Bl] 0
3055 . ds doc-space\n[doc-reg-Bl]
3059 . doc-increment-list-stack
3062 . nr doc-arg-limit \n[.$]
3066 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3068 . \" initialize column list
3069 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3070 . doc-set-column-tab \n[doc-num-columns]
3071 ' in -\n[doc-column-indent-width]u
3072 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3073 . sp \n[doc-display-vertical]u
3076 . nr doc-num-columns 0
3083 .\" NS doc-Bl-usage macro
3086 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3087 . tm1 " [-width <string>]
3088 . tm1 " [-offset <string>] [-compact]
3089 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3090 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3091 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3095 .\" NS doc-do-Bl-args macro
3096 .\" NS resolve remaining .Bl arguments
3101 .\" NS doc-compact-list-stackXXX
3102 .\" NS doc-list-indent-stackXXX
3103 .\" NS doc-list-offset-stackXXX
3104 .\" NS doc-num-columns
3105 .\" NS doc-tag-prefix-stackXXX
3106 .\" NS doc-tag-width-stackXXX
3108 .\" NS local variables:
3112 .\" NS doc-reg-dBla1
3113 .\" NS doc-reg-dBla2
3114 .\" NS doc-reg-dBla3
3115 .\" NS doc-reg-dBla4
3117 .\" NS doc-str-dBla1
3122 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3125 . \" avoid a warning message in case e.g. `-offset' has no parameter
3126 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3127 . if !d doc-arg\n[doc-reg-dBla] \
3128 . ds doc-arg\n[doc-reg-dBla]
3132 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3133 . nr doc-compact-list-stack\n[doc-list-depth] 1
3135 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3136 . ie (\n[doc-list-depth] > 1) \{\
3137 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3138 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3139 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3140 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3141 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3144 . tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3147 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3149 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3151 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3152 . substring doc-str-dBla 0 0
3153 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3154 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3155 . substring doc-str-dBla 1
3156 . doc-first-parameter \*[doc-str-dBla]
3157 . doc-get-width "\*[doc-str-dfp]
3158 . doc-get-arg-type "\*[doc-str-dfp]
3159 . ie (\n[doc-arg-type] == 1) \
3160 . nr doc-reg-dBla1 1
3162 . nr doc-reg-dBla1 0
3165 . nr doc-reg-dBla1 0
3166 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3168 . ie \n[doc-reg-dBla1] \{\
3169 . \" execute string in a box to get the width of the diversion
3170 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3171 . doc-save-global-vars
3178 . nop \*[doc-str-dBla]
3182 . doc-restore-global-vars
3183 . doc-get-width \h'\n[dl]u'
3184 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3187 . \" test whether argument is a valid numeric expression
3188 . nr doc-reg-dBla1 0
3189 . if \B
\a(\*[doc-str-dBla])
\a \{\
3190 . \" disable warnings related to scaling indicators (32)
3191 . nr doc-reg-dBla2 \n[.warn]
3192 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3194 . \" values without a scaling indicator are taken as strings;
3195 . \" we test whether the parameter string with and without the last
3196 . \" character yields identical numerical results (ignoring the
3197 . \" scaling indicator)
3198 . ds doc-str-dBla1 "\*[doc-str-dBla]
3199 . substring doc-str-dBla1 0 -2
3200 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3201 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3202 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3203 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3204 . nr doc-reg-dBla1 1
3207 . \" enable all warnings again
3208 . warn \n[doc-reg-dBla2]
3211 . ie \n[doc-reg-dBla1] \
3212 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3214 . doc-get-arg-width \n[doc-arg-ptr]
3215 . ie (\n[doc-width] == 2) \{\
3216 . \" if the width parameter is a macro, use the macro's
3217 . \" width as specified in doc-common
3218 . doc-get-arg-type \*[doc-str-dBla]
3219 . ie (\n[doc-arg-type] == 1) \
3220 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3222 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3225 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3228 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3231 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3232 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3234 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3235 . nr doc-reg-dBla1 0
3236 . if \B
\a(\*[doc-str-dBla])
\a \{\
3237 . nr doc-reg-dBla2 \n[.warn]
3238 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3240 . ds doc-str-dBla1 "\*[doc-str-dBla]
3241 . substring doc-str-dBla1 0 -2
3242 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3243 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3244 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3245 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3246 . nr doc-reg-dBla1 1
3249 . warn \n[doc-reg-dBla2]
3252 . ie \n[doc-reg-dBla1] \
3253 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3255 . doc-get-arg-width \n[doc-arg-ptr]
3256 . ie (\n[doc-width] <= 3) \{\
3257 . \" if the offset parameter is a macro, use the macro's
3258 . \" width as specified in doc-common
3259 . doc-get-arg-type \*[doc-str-dBla]
3260 . ie (\n[doc-arg-type] == 1) \
3261 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3263 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3266 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3272 . \" not a known keyword, so it specifies the width of the next column
3273 . \" (if it is a column list)
3274 . if !\n[doc-reg-dBla] \{\
3275 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3276 . nr doc-num-columns +1
3277 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3278 . substring doc-str-dBla 0 0
3279 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3280 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3281 . substring doc-str-dBla 1
3282 . doc-first-parameter \*[doc-str-dBla]
3283 . doc-get-width "\*[doc-str-dfp]
3284 . doc-get-arg-type "\*[doc-str-dfp]
3285 . ie (\n[doc-arg-type] == 1) \
3286 . nr doc-reg-dBla1 1
3288 . nr doc-reg-dBla1 0
3291 . nr doc-reg-dBla1 0
3292 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3294 . ie \n[doc-reg-dBla1] \{\
3295 . \" execute string in a box to get the width of the diversion
3296 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3297 . doc-save-global-vars
3304 . nop \*[doc-str-dBla]
3308 . doc-restore-global-vars
3309 . ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3312 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3315 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3316 . tm1 " in .Bl macro (#\n[.c])
3319 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3324 .\" NS doc-save-global-vars macro
3325 .\" NS save all global variables
3327 .\" NS local variables:
3330 .de doc-save-global-vars
3331 . ds doc-macro-name-saved "\*[doc-macro-name]
3332 . nr doc-arg-limit-saved \n[doc-arg-limit]
3333 . nr doc-num-args-saved \n[doc-num-args]
3334 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3337 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3338 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3339 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3340 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3341 . nr doc-reg-dsgv +1
3344 . nr doc-curr-font-saved \n[doc-curr-font]
3345 . nr doc-curr-size-saved \n[doc-curr-size]
3346 . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3347 . nr doc-in-library-section-saved \n[doc-in-library-section]
3348 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3349 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3350 . nr doc-have-decl-saved \n[doc-have-decl]
3351 . nr doc-have-var-saved \n[doc-have-var]
3352 . ds doc-command-name-saved "\*[doc-command-name]
3353 . ds doc-quote-left-saved "\*[doc-quote-left]
3354 . ds doc-quote-right-saved "\*[doc-quote-right]
3355 . nr doc-nesting-level-saved \n[doc-nesting-level]
3356 . nr doc-in-list-saved \n[doc-in-list]
3357 . ds doc-space-saved "\*[doc-space]
3358 . ds doc-saved-space-saved "\*[doc-saved-space]
3359 . nr doc-space-mode-saved \n[doc-space-mode]
3360 . nr doc-have-space-saved \n[doc-have-space]
3361 . nr doc-have-slot-saved \n[doc-have-slot]
3362 . nr doc-keep-type-saved \n[doc-keep-type]
3363 . nr doc-display-depth-saved \n[doc-display-depth]
3364 . nr doc-is-compact-saved \n[doc-is-compact]
3367 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3368 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3369 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3370 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3371 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3372 . nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3373 . nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3374 . nr doc-reg-dsgv +1
3377 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3380 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3381 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3382 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3383 . nr doc-reg-dsgv +1
3386 . nr doc-list-depth-saved \n[doc-list-depth]
3389 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3390 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3391 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3392 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3393 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3394 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3395 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3396 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3397 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3398 . nr doc-reg-dsgv +1
3401 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3402 . nr doc-curr-type-saved \n[doc-curr-type]
3403 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3404 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3405 . nr doc-num-columns-saved \n[doc-num-columns]
3406 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3407 . nr doc-is-func-saved \n[doc-is-func]
3408 . nr doc-have-old-func-saved \n[doc-have-old-func]
3409 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3410 . ds doc-func-arg-saved "\*[doc-func-arg]
3411 . nr doc-num-func-args-saved \n[doc-num-func-args]
3412 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3413 . nr doc-have-func-saved \n[doc-have-func]
3414 . nr doc-is-reference-saved \n[doc-is-reference]
3415 . nr doc-reference-count-saved \n[doc-reference-count]
3416 . nr doc-author-count-saved \n[doc-author-count]
3419 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3420 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3421 . nr doc-reg-dsgv +1
3424 . nr doc-book-count-saved \n[doc-book-count]
3425 . ds doc-book-name-saved "\*[doc-book-name]
3426 . nr doc-date-count-saved \n[doc-date-count]
3427 . ds doc-date-saved "\*[doc-date]
3428 . nr doc-publisher-count-saved \n[doc-publisher-count]
3429 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3430 . nr doc-journal-count-saved \n[doc-journal-count]
3431 . ds doc-journal-name-saved "\*[doc-journal-name]
3432 . nr doc-issue-count-saved \n[doc-issue-count]
3433 . ds doc-issue-name-saved "\*[doc-issue-name]
3434 . nr doc-optional-count-saved \n[doc-optional-count]
3435 . ds doc-optional-string-saved "\*[doc-optional-string]
3436 . nr doc-page-number-count-saved \n[doc-page-number-count]
3437 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3438 . nr doc-corporate-count-saved \n[doc-corporate-count]
3439 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3440 . nr doc-report-count-saved \n[doc-report-count]
3441 . ds doc-report-name-saved "\*[doc-report-name]
3442 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3443 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3444 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3445 . nr doc-url-count-saved \n[doc-url-count]
3446 . ds doc-url-name-saved "\*[doc-url-name]
3447 . nr doc-volume-count-saved \n[doc-volume-count]
3448 . ds doc-volume-name-saved "\*[doc-volume-name]
3449 . nr doc-have-author-saved \n[doc-have-author]
3451 . ds doc-document-title-saved "\*[doc-document-title]
3452 . ds doc-volume-saved "\*[doc-volume]
3453 . ds doc-section-saved "\*[doc-section]
3454 . ds doc-operating-system-saved "\*[doc-operating-system]
3455 . ds doc-date-string-saved "\*[doc-date-string]
3456 . nr doc-header-space-saved \n[doc-header-space]
3457 . nr doc-footer-space-saved \n[doc-footer-space]
3458 . nr doc-display-vertical-saved \n[doc-display-vertical]
3459 . ds doc-header-string-saved "\*[doc-header-string]
3460 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3461 . nr doc-in-files-section-saved \n[doc-in-files-section]
3462 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3466 .\" NS doc-restore-global-vars macro
3467 .\" NS restore all global variables
3469 .\" NS local variables:
3472 .de doc-restore-global-vars
3473 . ds doc-macro-name "\*[doc-macro-name-saved]
3474 . nr doc-arg-limit \n[doc-arg-limit-saved]
3475 . nr doc-num-args \n[doc-num-args-saved]
3476 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3479 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3480 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3481 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3482 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3483 . nr doc-reg-drgv +1
3486 . nr doc-curr-font \n[doc-curr-font-saved]
3487 . nr doc-curr-size \n[doc-curr-size-saved]
3488 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3489 . nr doc-in-library-section \n[doc-in-library-section-saved]
3490 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3491 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3492 . nr doc-have-decl \n[doc-have-decl-saved]
3493 . nr doc-have-var \n[doc-have-var-saved]
3494 . ds doc-command-name "\*[doc-command-name-saved]
3495 . ds doc-quote-left "\*[doc-quote-left-saved]
3496 . ds doc-quote-right "\*[doc-quote-right-saved]
3497 . nr doc-nesting-level \n[doc-nesting-level-saved]
3498 . nr doc-in-list \n[doc-in-list-saved]
3499 . ds doc-space "\*[doc-space-saved]
3500 . ds doc-saved-space "\*[doc-saved-space-saved]
3501 . nr doc-space-mode \n[doc-space-mode-saved]
3502 . nr doc-have-space \n[doc-have-space-saved]
3503 . nr doc-have-slot \n[doc-have-slot-saved]
3504 . nr doc-keep-type \n[doc-keep-type-saved]
3505 . nr doc-display-depth \n[doc-display-depth-saved]
3506 . nr doc-is-compact \n[doc-is-compact-saved]
3509 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3510 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3511 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3512 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3513 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3514 . nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3515 . nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3516 . nr doc-reg-drgv +1
3519 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3522 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3523 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3524 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3525 . nr doc-reg-drgv +1
3528 . nr doc-list-depth \n[doc-list-depth-saved]
3531 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3532 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3533 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3534 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3535 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3536 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3537 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3538 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3539 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3540 . nr doc-reg-drgv +1
3543 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3544 . nr doc-curr-type \n[doc-curr-type-saved]
3545 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3546 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3547 . nr doc-num-columns \n[doc-num-columns-saved]
3548 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3549 . nr doc-is-func \n[doc-is-func-saved]
3550 . nr doc-have-old-func \n[doc-have-old-func-saved]
3551 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3552 . ds doc-func-arg "\*[doc-func-arg-saved]
3553 . nr doc-num-func-args \n[doc-num-func-args-saved]
3554 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3555 . nr doc-have-func \n[doc-have-func-saved]
3556 . nr doc-is-reference \n[doc-is-reference-saved]
3557 . nr doc-reference-count \n[doc-reference-count-saved]
3558 . nr doc-author-count \n[doc-author-count-saved]
3561 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3562 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3563 . nr doc-reg-drgv +1
3566 . nr doc-book-count \n[doc-book-count-saved]
3567 . ds doc-book-name "\*[doc-book-name-saved]
3568 . nr doc-date-count \n[doc-date-count-saved]
3569 . ds doc-date "\*[doc-date-saved]
3570 . nr doc-publisher-count \n[doc-publisher-count-saved]
3571 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3572 . nr doc-journal-count \n[doc-journal-count-saved]
3573 . ds doc-journal-name "\*[doc-journal-name-saved]
3574 . nr doc-issue-count \n[doc-issue-count-saved]
3575 . ds doc-issue-name "\*[doc-issue-name-saved]
3576 . nr doc-optional-count \n[doc-optional-count-saved]
3577 . ds doc-optional-string "\*[doc-optional-string-saved]
3578 . nr doc-page-number-count \n[doc-page-number-count-saved]
3579 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3580 . nr doc-corporate-count \n[doc-corporate-count-saved]
3581 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3582 . nr doc-report-count \n[doc-report-count-saved]
3583 . ds doc-report-name "\*[doc-report-name-saved]
3584 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3585 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3586 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3587 . nr doc-url-count \n[doc-url-count-saved]
3588 . ds doc-url-name "\*[doc-url-name-saved]
3589 . nr doc-volume-count \n[doc-volume-count-saved]
3590 . ds doc-volume-name "\*[doc-volume-name-saved]
3591 . nr doc-have-author \n[doc-have-author-saved]
3593 . ds doc-document-title "\*[doc-document-title-saved]
3594 . ds doc-volume "\*[doc-volume-saved]
3595 . ds doc-section "\*[doc-section-saved]
3596 . ds doc-operating-system "\*[doc-operating-system-saved]
3597 . ds doc-date-string "\*[doc-date-string-saved]
3598 . nr doc-header-space \n[doc-header-space-saved]
3599 . nr doc-footer-space \n[doc-footer-space-saved]
3600 . nr doc-display-vertical \n[doc-display-vertical-saved]
3601 . ds doc-header-string "\*[doc-header-string-saved]
3602 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3603 . nr doc-in-files-section \n[doc-in-files-section-saved]
3604 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3608 .\" NS El user macro
3612 .\" NS doc-list-depth
3613 .\" NS doc-macro-name
3615 .\" NS local variables:
3618 .\" NS width register `El' set in doc-common
3622 . tm Usage: .El (does not take arguments) (#\n[.c])
3626 . ds doc-macro-name El
3627 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3629 . ie "\*[doc-str-El]"diag-list" \
3631 . el \{ .ie "\*[doc-str-El]"column-list" \
3632 . doc-end-column-list
3633 . el \{ .ie "\*[doc-str-El]"item-list" \
3635 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3637 . el \{ .ie "\*[doc-str-El]"inset-list" \
3647 .\" NS doc-saved-Pa-font global string
3648 .\" NS saved doc-Pa-font string for section FILES (no underline if
3651 .ds doc-saved-Pa-font
3654 .\" NS doc-curr-type global register
3655 .\" NS current argument type
3660 .\" NS doc-curr-arg global string
3661 .\" NS current argument
3666 .\" NS doc-item-boxXXX global box
3667 .\" NS item boxes associated list depth
3670 .\" NS doc-list-depth
3673 .\" NS It user macro
3680 .\" NS doc-curr-type
3682 .\" NS doc-macro-name
3684 .\" NS doc-saved-Pa-font
3686 .\" NS local variables:
3689 .\" NS doc-XXX-list-type
3691 .\" NS width register `It' set in doc-common
3693 .nr doc-bullet-list-type 1
3694 .nr doc-column-list-type 0
3695 .nr doc-dash-list-type 1
3696 .nr doc-diag-list-type 0
3697 .nr doc-enum-list-type 1
3698 .nr doc-hang-list-type 2
3699 .nr doc-inset-list-type 2
3700 .nr doc-item-list-type 1
3701 .nr doc-ohang-list-type 2
3702 .nr doc-tag-list-type 2
3705 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3707 . if "\*[doc-str-It]"" \
3708 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3710 . if \n[doc-nesting-level] \{\
3711 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3720 . ds doc-macro-name It
3722 . \" fill argument vector
3724 . while (\n[doc-reg-It] <= \n[.$]) \{\
3725 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3729 . nr doc-num-args \n[.$]
3733 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3735 . if \n[doc-reg-It] \{\
3737 . box doc-item-box\n[doc-list-depth]
3738 . ev doc-item-env\n[doc-list-depth]
3744 . ie (\n[doc-reg-It] == 1) \{\
3746 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3747 . tm1 " don't take arguments (#\n[.c])
3751 . if (\n[doc-reg-It] == 2) \{\
3752 . \" handle list types with arguments
3753 . doc-parse-arg-vector
3757 . nr doc-curr-type \n[doc-type1]
3758 . ds doc-curr-arg "\*[doc-arg1]
3760 . if \n[doc-in-files-section] \{\
3761 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3763 . ds doc-Pa-font "\*[doc-No-font]
3766 . ie (\n[doc-type1] == 1) \
3770 . doc-print-recursive
3773 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3774 . tm1 " require arguments (#\n[.c])
3778 . \" the previous call of `.doc-print-recursive' can contain calls to
3779 . \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3780 . if !\n[doc-nesting-level] \
3781 . doc-\*[doc-str-It]
3785 .\" NS doc-inset-list macro
3786 .\" NS .It item of list-type inset
3792 . \" finish item box
3796 . unformat doc-item-box\n[doc-list-depth]
3798 . doc-set-vertical-and-indent 0
3802 . doc-item-box\n[doc-list-depth]
3804 . if \n[doc-in-files-section] \
3806 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3813 .\" NS doc-hang-list macro
3814 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3817 .\" NS doc-have-space
3820 .\" NS local variables:
3825 . \" finish item box
3829 . unformat doc-item-box\n[doc-list-depth]
3831 . doc-set-vertical-and-indent 1
3832 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3833 . ti -\n[doc-reg-dhl]u
3836 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3837 . doc-item-box\n[doc-list-depth]
3839 . chop doc-item-box\n[doc-list-depth]
3840 . nr doc-reg-dhl1 \n[.k]u
3841 . nop \*[doc-item-box\n[doc-list-depth]]\c
3842 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3843 . nr doc-have-space 1
3846 . if \n[doc-in-files-section] \
3848 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3855 .\" NS doc-ohang-list macro
3856 .\" NS .It item of list-type overhanging tag
3862 . \" finish item box
3866 . unformat doc-item-box\n[doc-list-depth]
3868 . doc-set-vertical-and-indent 0
3870 . doc-item-box\n[doc-list-depth]
3873 . if \n[doc-in-files-section] \
3875 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3882 .\" NS doc-item-list macro
3883 .\" NS .It item of list-type [empty tag]
3886 . \" finish (dummy) item box
3891 . doc-set-vertical-and-indent 0
3898 .\" NS doc-enum-list-count-stackXXX global register
3899 .\" NS stack of current enum count values
3902 .\" NS doc-list-depth
3904 .nr doc-enum-list-count-stack1 0
3907 .\" NS doc-enum-list macro
3908 .\" NS enumerated list
3911 .\" NS doc-enum-list-count-stackXXX
3916 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3918 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3920 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3921 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3926 .\" NS doc-bullet-list macro
3927 .\" NS bullet paragraph list
3934 . nop \)\*[doc-Sy-font]\[bu]\f[]
3939 .\" NS doc-dash-list macro
3940 .\" NS hyphen paragraph list (sub bullet list)
3947 . nop \)\*[doc-Sy-font]\-\f[]
3952 .\" NS doc-do-list macro
3953 .\" NS .It item of list-type enum/bullet/hyphen
3955 .als doc-do-list doc-hang-list
3958 .\" NS doc-diag-list-input-line-count global register
3959 .\" NS saved line number to be checked in next diag-list item
3961 .nr doc-diag-list-input-line-count 0
3964 .\" NS doc-diag-list macro
3965 .\" NS .It item of list-type diagnostic-message
3968 .\" NS doc-curr-font
3969 .\" NS doc-curr-size
3970 .\" NS doc-diag-list-input-line-count
3973 . nr doc-curr-font \n[.f]
3974 . nr doc-curr-size \n[.ps]
3976 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3977 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3984 . nr doc-diag-list-input-line-count \n[.c]
3987 . nop \*[doc-Sy-font]\c
3988 . if \n[doc-num-args] \
3989 . doc-remaining-args
3990 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3992 . doc-print-and-reset
3996 .\" NS doc-tag-list macro
3997 .\" NS .It item of list-type `tag'
4000 .\" NS doc-have-space
4003 .\" NS local variables:
4009 . \" finish item box
4013 . unformat doc-item-box\n[doc-list-depth]
4015 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
4022 . doc-item-box\n[doc-list-depth]
4027 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4028 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4029 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4030 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
4034 . doc-set-vertical-and-indent 1
4035 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4036 . ti -\n[doc-reg-dtl]u
4039 . doc-item-box\n[doc-list-depth]
4040 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4043 . \" format the tag separately to prevent stretching of spaces
4049 . nr doc-have-space 1
4052 . if \n[doc-in-files-section] \
4054 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4061 .\" NS doc-get-tag-width macro
4062 .\" NS resolve unknown tag width (`tag' list-type only)
4065 .\" NS doc-list-indent-stackXXX
4066 .\" NS doc-tag-width-stackXXX
4070 .\" NS doc-curr-type
4072 .de doc-get-tag-width
4073 . ie (\n[doc-curr-type] == 1) \{\
4074 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4075 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4078 . ds doc-tag-width-stack\n[doc-list-depth] No
4079 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4084 .\" NS doc-set-vertical-and-indent macro
4085 .\" NS set up vertical spacing (if not compact) and indentation (with
4086 .\" NS offset if argument is non-zero)
4089 .\" NS doc-list-have-indent-stackXXX
4091 .de doc-set-vertical-and-indent
4092 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4093 . sp \n[doc-display-vertical]u
4095 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4096 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4098 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4106 .\" NS doc-list-depth global register
4107 .\" NS list type stack counter
4109 .nr doc-list-depth 0
4112 .\" NS doc-num-columns global register
4113 .\" NS number of columns
4115 .nr doc-num-columns 0
4118 .\" NS doc-compact-list-stackXXX global register (bool)
4119 .\" NS stack of flags to indicate whether a particular list is compact
4122 .\" NS doc-list-depth
4124 .nr doc-compact-list-stack1 0
4127 .\" NS doc-tag-prefix-stackXXX global string
4128 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4131 .\" NS doc-list-depth
4133 .ds doc-tag-prefix-stack1
4136 .\" NS doc-tag-width-stackXXX global string
4137 .\" NS stack of strings indicating how to set up current element of
4138 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4139 .\" NS directly; if it is a macro name, use the macro's width value;
4140 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4143 .\" NS doc-list-depth
4145 .ds doc-tag-width-stack0
4146 .ds doc-tag-width-stack1
4149 .\" NS doc-list-offset-stackXXX global register
4150 .\" NS stack of list offsets
4153 .\" NS doc-list-depth
4155 .nr doc-list-offset-stack1 0
4158 .\" NS doc-end-list macro
4159 .\" NS list end function; resets indentation (and offset if argument is
4163 .\" NS doc-list-depth
4164 .\" NS doc-list-offset-stackXXX
4168 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4170 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4172 . if (\n[doc-list-depth] <= 0) \
4173 . tm mdoc warning: extraneous .El call (#\n[.c])
4175 . doc-decrement-list-stack
4176 . nr doc-list-depth -1
4180 .\" NS doc-increment-list-stack macro
4181 .\" NS set up next block for list
4184 .\" NS doc-compact-list-stackXXX
4185 .\" NS doc-list-have-indent-stackXXX
4186 .\" NS doc-list-indent-stackXXX
4187 .\" NS doc-list-offset-stackXXX
4188 .\" NS doc-list-type-stackXXX
4189 .\" NS doc-tag-prefix-stackXXX
4190 .\" NS doc-tag-width-stackXXX
4191 .\" NS doc-enum-list-count-stackXXX
4193 .\" NS local variables:
4196 .de doc-increment-list-stack
4197 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4198 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4199 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4200 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4201 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4202 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4203 . ds doc-list-type-stack\n[doc-reg-dils]
4204 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4205 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4209 .\" NS doc-decrement-list-stack macro
4210 .\" NS decrement stack
4213 .\" NS doc-compact-list-stackXXX
4214 .\" NS doc-list-have-indent-stackXXX
4215 .\" NS doc-list-indent-stackXXX
4216 .\" NS doc-list-offset-stackXXX
4217 .\" NS doc-list-type-stackXXX
4218 .\" NS doc-tag-prefix-stackXXX
4219 .\" NS doc-tag-width-stackXXX
4220 .\" NS doc-enum-list-count-stackXXX
4222 .de doc-decrement-list-stack
4223 . ds doc-list-type-stack\n[doc-list-depth]
4224 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4225 . nr doc-list-indent-stack\n[doc-list-depth] 0
4226 . nr doc-list-offset-stack\n[doc-list-depth] 0
4227 . ds doc-tag-prefix-stack\n[doc-list-depth]
4228 . ds doc-tag-width-stack\n[doc-list-depth]
4229 . nr doc-compact-list-stack\n[doc-list-depth] 0
4230 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4234 .\" NS Xr user macro
4235 .\" NS cross reference (for man pages only)
4239 .\" NS doc-macro-name
4241 .\" NS local variables:
4244 .\" NS width register `Xr' set in doc-common
4247 . if !\n[doc-arg-limit] \{\
4249 . ds doc-macro-name Xr
4250 . doc-parse-args \$@
4256 . if !\n[doc-arg-limit] \
4260 . doc-print-prefixes
4261 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4262 . \" first argument must be a string
4263 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4264 . nr doc-curr-font \n[.f]
4265 . nr doc-curr-size \n[.ps]
4266 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4268 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4269 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4270 . \" modify second argument if it is a string and
4271 . \" remove space inbetween
4272 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4273 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4274 . ds doc-space\n[doc-arg-ptr]
4277 . doc-print-recursive
4287 .\" NS doc-Xr-usage macro
4290 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4295 .\" NS Sx user macro
4296 .\" NS cross section reference
4298 .\" NS width register `Sx' set in doc-common
4300 .als Sx doc-generic-macro
4301 .ds doc-Sx-usage section_header
4304 .\" NS doc-end-column-list macro
4305 .\" NS column-list end-list
4308 .\" NS doc-list-depth
4310 .de doc-end-column-list
4312 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4315 . doc-decrement-list-stack
4316 . nr doc-list-depth -1
4320 .\" NS doc-column-indent-width global register
4321 .\" NS holds the indent width for a column list
4323 .nr doc-column-indent-width 0
4326 .\" NS doc-set-column-tab macro
4327 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4330 .\" NS doc-column-indent-width
4332 .\" NS local variables:
4335 .\" NS doc-str-dsct1
4337 .de doc-set-column-tab
4340 . nr doc-column-indent-width 0
4343 . ds doc-str-dsct1 " \"
4346 . ds doc-str-dsct1 " \"
4348 . \" XXX: this is packed abnormally close -- intercolumn width
4349 . \" should be configurable
4350 . ds doc-str-dsct1 " \"
4353 . while (\n[doc-reg-dsct] <= \$1) \{\
4354 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4355 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4356 . nr doc-reg-dsct +1
4359 . ta \*[doc-str-dsct]
4360 ' in +\n[doc-column-indent-width]u
4364 .\" NS doc-column-list macro
4369 .\" NS doc-list-indent-stackXXX
4372 .\" NS local variables:
4376 . if \n[doc-num-args] \
4377 . doc-parse-arg-vector
4380 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4381 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4385 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4386 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4387 . ds doc-space\n[doc-reg-dcl]
4390 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4391 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4394 . in +\n[doc-column-indent-width]u
4396 . ti -\n[doc-column-indent-width]u
4398 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4402 .\" NS Ta user macro
4403 .\" NS append tab (\t)
4408 .\" NS width register `Ta' set in doc-common
4411 . ie \n[doc-arg-limit] \{\
4414 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4415 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4420 . tm1 "Usage: Ta must follow column entry: e.g.
4421 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4426 .\" NS Dl user macro
4427 .\" NS display (one line) literal
4429 .\" NS this function uses the `Li' font
4433 .\" NS doc-curr-font
4434 .\" NS doc-curr-size
4435 .\" NS doc-macro-name
4437 .\" NS width register `Dl' set in doc-common
4441 . in +\n[doc-display-indent]u
4443 . ie \n[doc-arg-limit] \{\
4444 . tm Usage: .Dl not callable by other macros (#\n[.c])
4449 . ds doc-macro-name Dl
4450 . doc-parse-args \$@
4452 . nr doc-curr-font \n[.f]
4453 . nr doc-curr-size \n[.ps]
4454 . nop \*[doc-Li-font]\c
4455 . doc-print-recursive
4458 . tm Usage: .Dl argument ... (#\n[.c])
4461 . in -\n[doc-display-indent]u
4465 .\" NS D1 user macro
4466 .\" NS display (one line)
4470 .\" NS doc-macro-name
4472 .\" NS width register `D1' set in doc-common
4476 . in +\n[doc-display-indent]u
4478 . ie \n[doc-arg-limit] \{\
4479 . tm Usage: .D1 not callable by other macros (#\n[.c])
4484 . ds doc-macro-name D1
4485 . doc-parse-args \$@
4487 . doc-print-recursive
4490 . tm Usage: .D1 argument ... (#\n[.c])
4493 . in -\n[doc-display-indent]u
4497 .\" NS Vt user macro
4498 .\" NS variable type (for forcing old style variable declarations);
4499 .\" NS this is not done in the same manner as .Ot for fortrash --
4500 .\" NS clean up later
4503 .\" NS doc-curr-font
4504 .\" NS doc-curr-size
4505 .\" NS doc-have-decl
4507 .\" NS doc-macro-name
4509 .\" NS width register `Vt' set in doc-common
4512 . if !\n[doc-arg-limit] \{\
4514 . ds doc-macro-name Vt
4515 . doc-parse-args \$@
4518 . tm Usage: .Vt variable_type ... (#\n[.c])
4521 . if !\n[doc-arg-limit] \
4525 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4526 . tm Usage: .Vt variable_type ... (#\n[.c])
4531 . if \n[doc-in-synopsis-section] \{\
4532 . \" if a function declaration was the last thing given,
4533 . \" want vertical space
4534 . if \n[doc-have-decl] \{\
4536 . nr doc-have-decl 0
4539 . \" if a subroutine was the last thing given, want vertical space
4540 . if \n[doc-have-func] \{\
4541 . ie \n[doc-have-var] \
4550 . nr doc-curr-font \n[.f]
4551 . nr doc-curr-size \n[.ps]
4552 . nop \*[doc-Ft-font]\c
4553 . doc-print-recursive
4555 . if \n[doc-in-synopsis-section] \{\
4556 . ie \n[doc-have-old-func] \
4557 . nop \*[doc-soft-space]\c
4564 .\" NS doc-is-func global register (bool)
4565 .\" NS set if subroutine (in synopsis only) (fortran only)
4570 .\" NS Ft user macro
4571 .\" NS function type
4574 .\" NS doc-curr-font
4575 .\" NS doc-curr-size
4576 .\" NS doc-have-decl
4579 .\" NS doc-macro-name
4581 .\" NS width register `Ft' set in doc-common
4584 . if !\n[doc-arg-limit] \{\
4586 . ds doc-macro-name Ft
4587 . doc-parse-args \$@
4590 . tm Usage: .Ft function_type ... (#\n[.c])
4593 . if !\n[doc-arg-limit] \
4597 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4598 . tm Usage: .Ft function_type ... (#\n[.c])
4603 . if \n[doc-in-synopsis-section] \{\
4604 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4606 . nr doc-have-decl 0
4610 . if \n[doc-have-var] \{\
4618 . nr doc-curr-font \n[.f]
4619 . nr doc-curr-size \n[.ps]
4620 . nop \*[doc-Ft-font]\c
4621 . doc-print-recursive
4625 .\" NS doc-have-old-func global register (bool)
4626 .\" NS set if `Ot' has been called
4628 .nr doc-have-old-func 0
4631 .\" NS Ot user macro
4632 .\" NS old function type (fortran -- no newline)
4635 .\" NS doc-have-decl
4636 .\" NS doc-have-old-func
4640 .\" NS width register `Ot' set in doc-common
4643 . nr doc-have-old-func 1
4645 . if \n[doc-in-synopsis-section] \{\
4646 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4648 . nr doc-have-decl 0
4652 . if \n[doc-have-var] \{\
4661 . nop \*[doc-Ft-font]\$*\c
4666 .\" NS Fa user macro
4667 .\" NS function arguments
4671 .\" NS doc-curr-font
4672 .\" NS doc-curr-size
4673 .\" NS doc-macro-name
4675 .\" NS width register `Fa' set in doc-common
4678 . if !\n[doc-arg-limit] \{\
4680 . ds doc-macro-name Fa
4681 . doc-parse-args \$@
4684 . tm Usage: .Fa function_arguments ... (#\n[.c])
4687 . ie \n[doc-func-arg-count] \
4691 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4692 . nr doc-curr-font \n[.f]
4693 . nr doc-curr-size \n[.ps]
4694 . nop \*[doc-Fa-font]\c
4695 . doc-print-recursive
4697 . if \n[doc-in-synopsis-section] \
4698 . if \n[doc-have-func] \
4704 .\" NS doc-func-arg-count global register
4705 .\" NS how many function arguments have been processed so far
4707 .nr doc-func-arg-count 0
4710 .\" NS doc-func-arg global string
4711 .\" NS work buffer for function name strings
4716 .\" NS doc-num-func-args global register
4717 .\" NS number of function arguments
4719 .nr doc-num-func-args 0
4722 .\" NS doc-func-args-processed global register
4723 .\" NS function arguments processed so far
4725 .nr doc-func-args-processed 0
4728 .\" NS doc-do-func macro
4729 .\" NS internal .Fa for .Fc
4735 .\" NS doc-func-arg-count
4736 .\" NS doc-func-args-processed
4737 .\" NS doc-num-func-args
4740 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4748 . nr doc-num-func-args 0
4749 . nr doc-func-args-processed 0
4751 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4752 . if (\n[doc-num-func-args] > 1) \
4753 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4755 . if (\n[doc-func-arg-count] > 1) \{\
4756 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4757 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4758 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4760 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4761 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4764 . if (\n[doc-func-arg-count] == 1) \{\
4765 . nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4768 . nr doc-func-arg-count +1
4773 .\" NS doc-have-func global register (bool)
4774 .\" NS whether we have more than one function in synopsis
4779 .\" NS Fn user macro
4784 .\" NS doc-curr-font
4785 .\" NS doc-curr-size
4786 .\" NS doc-have-decl
4787 .\" NS doc-have-func
4789 .\" NS doc-indent-synopsis
4791 .\" NS doc-macro-name
4793 .\" NS width register `Fn' set in doc-common
4796 . if !\n[doc-arg-limit] \{\
4798 . ds doc-macro-name Fn
4799 . doc-parse-args \$@
4802 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4805 . if !\n[doc-arg-limit] \
4808 . if \n[doc-in-synopsis-section] \{\
4809 . \" if there is/has been more than one subroutine declaration
4810 . ie \n[doc-is-func] \{\
4813 . nr doc-have-decl 0
4817 . if \n[doc-have-func] \{\
4820 . nr doc-have-decl 0
4823 . if \n[doc-have-decl] \{\
4828 . if \n[doc-have-var] \{\
4830 . nr doc-have-decl 0
4833 . nr doc-have-func 1
4837 . if !\n[doc-indent-synopsis] \
4838 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4839 . if !\n[doc-indent-synopsis-active] \
4840 . in +\n[doc-indent-synopsis]u
4841 . ti -\n[doc-indent-synopsis]u
4845 . doc-print-prefixes
4846 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4847 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4852 . nr doc-curr-font \n[.f]
4853 . nr doc-curr-size \n[.ps]
4854 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4855 . nop \f[]\s[0]\*[lp]\)\c
4858 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4859 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4860 . nop \*[doc-Fa-font]\c
4862 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4866 . if \n[doc-in-synopsis-section] \
4869 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4870 . \" output the space (if needed)
4872 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4875 . doc-print-recursive
4878 . doc-print-and-reset
4880 . if \n[doc-in-synopsis-section] \
4881 . if !\n[doc-indent-synopsis-active] \
4882 . in -\n[doc-indent-synopsis]u
4886 .\" NS doc-do-func-args macro
4887 .\" NS handle function arguments
4893 .\" NS doc-func-args-processed
4894 .\" NS doc-num-func-args
4896 .\" NS local variables:
4899 .de doc-do-func-args
4900 . if \n[doc-in-synopsis-section] \{\
4902 . nr doc-num-func-args 0
4903 . nr doc-func-args-processed 0
4905 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4906 . if (\n[doc-num-func-args] > 1) \
4907 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4910 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4913 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4914 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4915 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4916 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4917 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4918 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4920 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4926 .\" NS doc-saved-nesting-level global register
4928 .nr doc-saved-nesting-level 0
4931 .\" NS doc-in-func-enclosure global register (bool)
4933 .nr doc-in-func-enclosure 0
4936 .\" NS Fo user macro
4937 .\" NS function open
4941 .\" NS doc-curr-font
4942 .\" NS doc-curr-size
4943 .\" NS doc-func-arg-count
4944 .\" NS doc-have-decl
4945 .\" NS doc-have-func
4947 .\" NS doc-in-func-enclosure
4948 .\" NS doc-indent-synopsis
4950 .\" NS doc-macro-name
4951 .\" NS doc-saved-nesting-level
4953 .\" NS width register `Fo' set in doc-common
4956 . if (\n[doc-in-func-enclosure]) \{\
4957 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4961 . nr doc-saved-nesting-level \n[doc-nesting-level]
4962 . nr doc-in-func-enclosure 1
4964 . if !\n[doc-arg-limit] \{\
4966 . ds doc-macro-name Fo
4967 . doc-parse-args \$@
4970 . tm Usage: .Fo function_name (#\n[.c])
4973 . if \n[doc-in-synopsis-section] \{\
4974 . \" if there is/has been more than one subroutine declaration
4975 . ie \n[doc-is-func] \{\
4978 . nr doc-have-decl 0
4982 . if \n[doc-have-func] \{\
4985 . nr doc-have-decl 0
4988 . if \n[doc-have-decl] \{\
4993 . if \n[doc-have-var] \{\
4995 . nr doc-have-decl 0
4998 . nr doc-have-func 1
5002 . if !\n[doc-indent-synopsis] \
5003 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
5006 . \" start function box
5014 . doc-print-prefixes
5015 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5016 . nr doc-func-arg-count 1
5017 . nr doc-curr-font \n[.f]
5018 . nr doc-curr-size \n[.ps]
5020 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
5021 . nop \f[]\s[0]\*[lp]\)\c
5027 .\" NS Fc user macro
5028 .\" NS function close
5032 .\" NS doc-func-arg-count
5033 .\" NS doc-in-func-enclosure
5034 .\" NS doc-saved-nesting-level
5035 .\" NS doc-macro-name
5037 .\" NS width register `Fc' set in doc-common
5040 . if !\n[doc-in-func-enclosure] \{\
5041 . tm mdoc warning: Extraneous .Fc (#\n[.c])
5046 . ds doc-macro-name Fc
5047 . \" the first (dummy) argument is used to get the correct spacing
5048 . doc-parse-args \) \$@
5051 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5052 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5054 . nr doc-func-arg-count 0
5055 . nr doc-in-func-enclosure 0
5057 . ie \n[doc-in-synopsis-section] \
5062 . \" finish function box
5067 . unformat doc-func-box
5069 . if \n[doc-in-synopsis-section] \{\
5070 . if !\n[doc-indent-synopsis-active] \
5071 . in +\n[doc-indent-synopsis]u
5072 . ti -\n[doc-indent-synopsis]u
5076 . nop \*[doc-func-box]\c
5079 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5080 . nr doc-curr-font \n[.f]
5081 . nr doc-curr-size \n[.ps]
5082 . doc-print-recursive
5085 . doc-print-and-reset
5087 . if \n[doc-in-synopsis-section] \
5088 . if !\n[doc-indent-synopsis-active] \
5089 . in -\n[doc-indent-synopsis]u
5093 .\" NS doc-build-func-string macro
5094 .\" NS collect function arguments and set hard spaces inbetween
5098 .\" NS doc-func-args-processed
5099 .\" NS doc-num-func-args
5101 .de doc-build-func-string
5102 . if !\n[doc-num-func-args] \{\
5103 . nr doc-num-func-args \n[.$]
5104 . nr doc-func-args-processed 0
5108 . nr doc-func-args-processed +1
5109 . as doc-func-arg "\$1
5111 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5112 . as doc-func-arg "\*[doc-hard-space]
5115 . doc-build-func-string \$@
5120 .\" Very crude references: Stash all reference info into boxes, print out
5121 .\" reference on .Re macro and clean up. Ordering very limited, no fancy
5122 .\" citations, but can do articles, journals, and books -- need to add
5123 .\" several missing options (like city etc). Should be able to grab a refer
5124 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5128 .\" NS doc-is-reference global register (bool)
5129 .\" NS set if in reference
5131 .nr doc-is-reference 0
5134 .\" NS doc-reference-count global register
5135 .\" NS reference element counter
5137 .nr doc-reference-count 0
5140 .\" NS Rs user macro
5141 .\" NS reference start
5144 .\" NS doc-is-reference
5145 .\" NS doc-reference-count
5147 .\" NS width register `Rs' set in doc-common
5151 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5153 . nr doc-is-reference 1
5154 . doc-reset-reference
5155 . if \n[doc-in-see-also-section] \
5157 . nr doc-reference-count 0
5162 .\" NS Re user macro
5163 .\" NS reference end
5166 .\" NS doc-is-reference
5168 .\" NS width register `Re' set in doc-common
5172 . tm Usage: .Re (does not take arguments) (#\n[.c])
5174 . if !\n[doc-is-reference] \{\
5175 . tm mdoc warning: Extraneous .Re (#\n[.c])
5178 . doc-print-reference
5179 . doc-reset-reference
5180 . nr doc-is-reference 0
5185 .\" NS doc-reset-reference macro
5186 .\" NS reference cleanup
5189 .\" NS doc-author-count
5190 .\" NS doc-author-nameXXX
5191 .\" NS doc-book-count
5192 .\" NS doc-book-name
5193 .\" NS doc-corporate-count
5194 .\" NS doc-corporate-name
5196 .\" NS doc-date-count
5197 .\" NS doc-issue-count
5198 .\" NS doc-issue-name
5199 .\" NS doc-journal-count
5200 .\" NS doc-journal-name
5201 .\" NS doc-optional-count
5202 .\" NS doc-optional-string
5203 .\" NS doc-page-number-count
5204 .\" NS doc-page-number-string
5205 .\" NS doc-publisher-count
5206 .\" NS doc-publisher-name
5207 .\" NS doc-reference-count
5208 .\" NS doc-reference-title-count
5209 .\" NS doc-reference-title-name
5210 .\" NS doc-reference-title-name-for-book
5211 .\" NS doc-report-count
5212 .\" NS doc-report-name
5213 .\" NS doc-url-count
5215 .\" NS doc-volume-count
5216 .\" NS doc-volume-name
5218 .de doc-reset-reference
5219 . while (\n[doc-author-count]) \{\
5220 . ds doc-author-name\n[doc-author-count]
5221 . nr doc-author-count -1
5223 . nr doc-journal-count 0
5224 . nr doc-issue-count 0
5225 . nr doc-optional-count 0
5226 . nr doc-corporate-count 0
5227 . nr doc-report-count 0
5228 . nr doc-reference-title-count 0
5229 . nr doc-url-count 0
5230 . nr doc-volume-count 0
5231 . nr doc-date-count 0
5232 . nr doc-page-number-count 0
5233 . nr doc-book-count 0
5234 . nr doc-publisher-count 0
5235 . nr doc-reference-count 0
5237 . ds doc-journal-name
5239 . ds doc-optional-string
5240 . ds doc-corporate-name
5241 . ds doc-report-name
5242 . ds doc-reference-title-name
5243 . ds doc-reference-title-name-for-book
5245 . ds doc-volume-name
5247 . ds doc-page-number-string
5249 . ds doc-publisher-name
5253 .\" NS doc-finish-reference macro
5254 .\" NS auxiliary macro for doc-print-reference
5257 .\" NS doc-reference-count
5259 .de doc-finish-reference
5260 . nr doc-reference-count -\$1
5261 . ie \n[doc-reference-count] \
5268 .\" NS doc-print-reference macro
5269 .\" NS reference print
5272 .\" NS doc-reference-count
5274 .de doc-print-reference
5278 . if \n[doc-author-count] \{\
5279 . doc-print-reference-authors
5280 . nr doc-reference-count -\n[doc-author-count]
5283 . if \n[doc-reference-title-count] \{\
5284 . unformat doc-reference-title-name
5285 . chop doc-reference-title-name
5286 . unformat doc-reference-title-name-for-book
5287 . chop doc-reference-title-name-for-book
5288 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5289 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5290 . doc-finish-reference \n[doc-reference-title-count]
5293 . nop \*[doc-reference-title-name]\c
5294 . doc-finish-reference \n[doc-reference-title-count]
5297 . if \n[doc-book-count] \{\
5298 . unformat doc-book-name
5299 . chop doc-book-name
5300 . nop \*[doc-book-name]\c
5301 . doc-finish-reference \n[doc-book-count]
5304 . if \n[doc-publisher-count] \{\
5305 . unformat doc-publisher-name
5306 . chop doc-publisher-name
5307 . nop \*[doc-publisher-name]\c
5308 . doc-finish-reference \n[doc-publisher-count]
5311 . if \n[doc-journal-count] \{\
5312 . unformat doc-journal-name
5313 . chop doc-journal-name
5314 . nop \*[doc-journal-name]\c
5315 . doc-finish-reference \n[doc-journal-count]
5318 . if \n[doc-report-count] \{\
5319 . unformat doc-report-name
5320 . chop doc-report-name
5321 . nop \*[doc-report-name]\c
5322 . doc-finish-reference \n[doc-report-count]
5325 . if \n[doc-issue-count] \{\
5326 . unformat doc-issue-name
5327 . chop doc-issue-name
5328 . nop \*[doc-issue-name]\c
5329 . doc-finish-reference \n[doc-issue-count]
5332 . if \n[doc-volume-count] \{\
5333 . unformat doc-volume-name
5334 . chop doc-volume-name
5335 . nop \*[doc-volume-name]\c
5336 . doc-finish-reference \n[doc-volume-count]
5339 . if \n[doc-url-count] \{\
5340 . unformat doc-url-name
5342 . nop \*[doc-url-name]\c
5343 . doc-finish-reference \n[doc-url-count]
5346 . if \n[doc-page-number-count] \{\
5347 . unformat doc-page-number-string
5348 . chop doc-page-number-string
5349 . nop \*[doc-page-number-string]\c
5350 . doc-finish-reference \n[doc-page-number-count]
5353 . if \n[doc-corporate-count] \{\
5354 . unformat doc-corporate-name
5355 . chop doc-corporate-name
5356 . nop \*[doc-corporate-name]\c
5357 . doc-finish-reference \n[doc-corporate-count]
5360 . if \n[doc-date-count] \{\
5363 . nop \*[doc-date]\c
5364 . doc-finish-reference \n[doc-date-count]
5367 . if \n[doc-optional-count] \{\
5368 . unformat doc-optional-string
5369 . chop doc-optional-string
5370 . nop \*[doc-optional-string]\c
5371 . doc-finish-reference \n[doc-optional-count]
5374 . if \n[doc-reference-count] \
5375 . tm mdoc warning: unresolved reference problem
5377 . hy \n[doc-hyphen-flags]
5381 .\" NS doc-print-reference-authors macro
5382 .\" NS print out reference authors
5384 .\" NS local variables:
5388 .ds doc-str-dpra "and
5390 .de doc-print-reference-authors
5393 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5394 . unformat doc-author-name\n[doc-reg-dpra]
5395 . chop doc-author-name\n[doc-reg-dpra]
5396 . ie (\n[doc-author-count] > 2) \
5397 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5399 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5400 . nr doc-reg-dpra +1
5403 . unformat doc-author-name\n[doc-reg-dpra]
5404 . chop doc-author-name\n[doc-reg-dpra]
5405 . if (\n[doc-author-count] > 1) \
5406 . nop \)\*[doc-str-dpra]
5407 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5411 .\" NS doc-author-count global register
5412 .\" NS counter of author references
5414 .nr doc-author-count 0
5417 .\" NS doc-author-nameXXX global box
5418 .\" NS array of author names
5421 .\" NS doc-author-count
5423 .ds doc-author-name0
5426 .\" NS %A user macro
5427 .\" NS reference author(s)
5431 .\" NS doc-author-count
5432 .\" NS doc-curr-font
5433 .\" NS doc-curr-size
5434 .\" NS doc-macro-name
5435 .\" NS doc-reference-count
5437 .\" NS local variables:
5440 .\" NS width register `%A' set in doc-common
5443 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5444 . tm Usage: .%A author_name ... (#\n[.c])
5448 . nr doc-author-count +1
5449 . nr doc-reference-count +1
5451 . ds doc-macro-name %A
5452 . doc-parse-args \$@
5455 . nr doc-curr-font \n[.f]
5456 . nr doc-curr-size \n[.ps]
5458 . \" save to reference box
5459 . box doc-author-name\n[doc-author-count]
5468 .\" NS doc-book-count global register
5469 .\" NS counter of book references
5471 .nr doc-book-count 0
5474 .\" NS doc-book-name global box
5475 .\" NS string of collected book references
5480 .\" NS %B user macro
5481 .\" NS [reference] book name
5485 .\" NS doc-book-count
5486 .\" NS doc-curr-font
5487 .\" NS doc-curr-size
5488 .\" NS doc-macro-name
5489 .\" NS doc-reference-count
5491 .\" NS local variables:
5494 .\" NS width register `%B' set in doc-common
5497 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5498 . tm Usage: .%B book_name ... (#\n[.c])
5502 . if \n[doc-is-reference] \{\
5503 . nr doc-book-count +1
5504 . nr doc-reference-count +1
5507 . ds doc-macro-name %B
5508 . doc-parse-args \$@
5511 . nr doc-curr-font \n[.f]
5512 . nr doc-curr-size \n[.ps]
5514 . ie \n[doc-is-reference] \{\
5515 . \" append to reference box
5516 . boxa doc-book-name
5521 . nop \*[doc-Em-font]\c
5525 . nop \*[doc-Em-font]\c
5526 . doc-print-recursive
5531 .\" NS doc-date-count global register
5532 .\" NS counter of date references
5534 .nr doc-date-count 0
5537 .\" NS doc-date global box
5538 .\" NS string of collected date references
5543 .\" NS %D user macro
5544 .\" NS [reference] date
5548 .\" NS doc-curr-font
5549 .\" NS doc-curr-size
5550 .\" NS doc-date-count
5551 .\" NS doc-macro-name
5552 .\" NS doc-reference-count
5554 .\" NS local variables:
5557 .\" NS width register `%D' set in doc-common
5560 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5561 . tm Usage: .%D date ... (#\n[.c])
5565 . nr doc-date-count +1
5566 . nr doc-reference-count +1
5568 . ds doc-macro-name %D
5569 . doc-parse-args \$@
5572 . nr doc-curr-font \n[.f]
5573 . nr doc-curr-size \n[.ps]
5575 . \" append to reference box
5585 .\" NS doc-publisher-count global register
5586 .\" NS counter of publisher references
5588 .nr doc-publisher-count 0
5591 .\" NS doc-publisher-name global box
5592 .\" NS string of collected publisher references
5594 .ds doc-publisher-name
5597 .\" NS %I user macro
5598 .\" NS [reference] issuer/publisher name
5602 .\" NS doc-curr-font
5603 .\" NS doc-curr-size
5604 .\" NS doc-macro-name
5605 .\" NS doc-publisher-count
5606 .\" NS doc-reference-count
5608 .\" NS local variables:
5611 .\" NS width register `%I' set in doc-common
5614 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5615 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5619 . nr doc-publisher-count +1
5620 . nr doc-reference-count +1
5622 . ds doc-macro-name %I
5623 . doc-parse-args \$@
5626 . nr doc-curr-font \n[.f]
5627 . nr doc-curr-size \n[.ps]
5629 . \" append to reference box
5630 . boxa doc-publisher-name
5635 . nop \*[doc-Em-font]\c
5640 .\" NS doc-journal-count global register
5641 .\" NS counter of journal references
5643 .nr doc-journal-count 0
5646 .\" NS doc-journal-name global box
5647 .\" NS string of collected journal references
5649 .ds doc-journal-name
5652 .\" NS %J user macro
5653 .\" NS [reference] Journal Name
5657 .\" NS doc-curr-font
5658 .\" NS doc-curr-size
5659 .\" NS doc-journal-count
5660 .\" NS doc-macro-name
5661 .\" NS doc-reference-count
5663 .\" NS local variables:
5666 .\" NS width register `%J' set in doc-common
5669 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5670 . tm Usage: .%J journal_name ... (#\n[.c])
5674 . nr doc-journal-count +1
5675 . nr doc-reference-count +1
5677 . ds doc-macro-name %J
5678 . doc-parse-args \$@
5681 . nr doc-curr-font \n[.f]
5682 . nr doc-curr-size \n[.ps]
5684 . \" append to reference box
5685 . boxa doc-journal-name
5690 . nop \*[doc-Em-font]\c
5695 .\" NS doc-issue-count global register
5696 .\" NS counter of issue number references
5698 .nr doc-issue-count 0
5701 .\" NS doc-issue-name global box
5702 .\" NS string of collected issue number references
5707 .\" NS %N user macro
5708 .\" NS [reference] issue number
5712 .\" NS doc-curr-font
5713 .\" NS doc-curr-size
5714 .\" NS doc-issue-count
5715 .\" NS doc-macro-name
5716 .\" NS doc-reference-count
5718 .\" NS local variables:
5721 .\" NS width register `%N' set in doc-common
5724 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5725 . tm Usage: .%N issue_number ... (#\n[.c])
5729 . nr doc-issue-count +1
5730 . nr doc-reference-count +1
5732 . ds doc-macro-name %N
5733 . doc-parse-args \$@
5736 . nr doc-curr-font \n[.f]
5737 . nr doc-curr-size \n[.ps]
5739 . \" append to reference box
5740 . boxa doc-issue-name
5749 .\" NS doc-optional-count global register
5750 .\" NS counter of optional information references
5752 .nr doc-optional-count 0
5755 .\" NS doc-optional-string global box
5756 .\" NS string of collected optional information references
5758 .ds doc-optional-string
5761 .\" NS %O user macro
5762 .\" NS [reference] optional information
5766 .\" NS doc-curr-font
5767 .\" NS doc-curr-size
5768 .\" NS doc-macro-name
5769 .\" NS doc-optional-count
5770 .\" NS doc-reference-count
5772 .\" NS local variables:
5775 .\" NS width register `%O' set in doc-common
5778 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5779 . tm Usage: .%O optional_information ... (#\n[.c])
5783 . nr doc-optional-count +1
5784 . nr doc-reference-count +1
5786 . ds doc-macro-name %O
5787 . doc-parse-args \$@
5790 . nr doc-curr-font \n[.f]
5791 . nr doc-curr-size \n[.ps]
5793 . \" append to reference box
5794 . boxa doc-optional-string
5803 .\" NS doc-page-number-count global register
5804 .\" NS counter of page number references
5806 .nr doc-page-number-count 0
5809 .\" NS doc-page-number-string global box
5810 .\" NS string of collected page number references
5812 .ds doc-page-number-string
5815 .\" NS %P user macro
5816 .\" NS [reference] page numbers
5820 .\" NS doc-curr-font
5821 .\" NS doc-curr-size
5822 .\" NS doc-macro-name
5823 .\" NS doc-page-number-count
5824 .\" NS doc-reference-count
5826 .\" NS local variables:
5829 .\" NS width register `%P' set in doc-common
5832 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5833 . tm Usage: .%P page_number ... (#\n[.c])
5837 . nr doc-page-number-count +1
5838 . nr doc-reference-count +1
5840 . ds doc-macro-name %P
5841 . doc-parse-args \$@
5844 . nr doc-curr-font \n[.f]
5845 . nr doc-curr-size \n[.ps]
5847 . \" append to reference box
5848 . boxa doc-page-number-string
5857 .\" NS doc-corporate-count global register
5858 .\" NS counter of corporate references
5860 .nr doc-corporate-count 0
5863 .\" NS doc-corporate-name global box
5864 .\" NS string of collected corporate references
5866 .ds doc-corporate-name
5869 .\" NS %Q user macro
5870 .\" NS corporate or foreign author
5874 .\" NS doc-corporate-count
5875 .\" NS doc-curr-font
5876 .\" NS doc-curr-size
5877 .\" NS doc-macro-name
5878 .\" NS doc-reference-count
5880 .\" NS local variables:
5883 .\" NS width register `%Q' set in doc-common
5886 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5887 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5891 . nr doc-corporate-count +1
5892 . nr doc-reference-count +1
5894 . ds doc-macro-name %Q
5895 . doc-parse-args \$@
5898 . nr doc-curr-font \n[.f]
5899 . nr doc-curr-size \n[.ps]
5901 . \" append to reference box
5902 . boxa doc-corporate-name
5911 .\" NS doc-report-count global register
5912 .\" NS counter of report references
5914 .nr doc-report-count 0
5917 .\" NS doc-report-name global box
5918 .\" NS string of collected report references
5923 .\" NS %R user macro
5924 .\" NS [reference] report name
5928 .\" NS doc-curr-font
5929 .\" NS doc-curr-size
5930 .\" NS doc-macro-name
5931 .\" NS doc-reference-count
5932 .\" NS doc-report-count
5934 .\" NS local variables:
5937 .\" NS width register `%R' set in doc-common
5940 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5941 . tm Usage: .%R reference_report ... (#\n[.c])
5945 . nr doc-report-count +1
5946 . nr doc-reference-count +1
5948 . ds doc-macro-name %R
5949 . doc-parse-args \$@
5952 . nr doc-curr-font \n[.f]
5953 . nr doc-curr-size \n[.ps]
5955 . \" append to reference box
5956 . boxa doc-report-name
5965 .\" NS doc-reference-title-count global register
5966 .\" NS counter of reference title references
5968 .nr doc-reference-title-count 0
5971 .\" NS doc-reference-title-name global box
5972 .\" NS string of collected reference title references
5974 .ds doc-reference-title-name
5977 .\" NS doc-reference-title-name-for-book global box
5978 .\" NS string of collected reference title references
5979 .\" NS (saved with another font; this is a shortcoming of groff)
5981 .ds doc-reference-title-name-for-book
5984 .\" NS %T user macro
5985 .\" NS reference title
5989 .\" NS doc-curr-font
5990 .\" NS doc-curr-size
5991 .\" NS doc-macro-name
5992 .\" NS doc-reference-title-count
5993 .\" NS doc-report-count
5995 .\" NS local variables:
5998 .\" NS width register `%T' set in doc-common
6001 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6002 . tm Usage: .%T reference_title ... (#\n[.c])
6006 . if \n[doc-is-reference] \{\
6007 . nr doc-reference-title-count +1
6008 . nr doc-reference-count +1
6011 . ds doc-macro-name %T
6012 . doc-parse-args \$@
6015 . nr doc-curr-font \n[.f]
6016 . nr doc-curr-size \n[.ps]
6017 . ie \n[doc-is-reference] \{\
6018 . \" append to reference box
6019 . boxa doc-reference-title-name-for-book
6024 . nop \*[doc-No-font]\c
6027 . \" do it a second time with another font
6028 . ds doc-macro-name %T
6029 . doc-parse-args \$@
6032 . nr doc-curr-font \n[.f]
6033 . nr doc-curr-size \n[.ps]
6034 . boxa doc-reference-title-name
6039 . nop \*[doc-Em-font]\c
6043 . nop \*[doc-Em-font]\c
6044 . doc-print-recursive
6049 .\" NS doc-url-count global register
6050 .\" NS counter of hypertext references
6055 .\" NS doc-url-name global box
6056 .\" NS string of collected hypertext references
6061 .\" NS doc-volume-count global register
6062 .\" NS counter of reference title references
6064 .nr doc-volume-count 0
6067 .\" NS doc-volume-name global box
6068 .\" NS string of collected volume references
6073 .\" NS %U user macro
6074 .\" NS hypertext reference
6078 .\" NS doc-curr-font
6079 .\" NS doc-curr-size
6080 .\" NS doc-macro-name
6081 .\" NS doc-reference-count
6082 .\" NS doc-url-count
6084 .\" NS local variables:
6087 .\" NS width register `%U' set in doc-common
6090 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6091 . tm Usage: .%U URL ... (#\n[.c])
6095 . nr doc-url-count +1
6096 . nr doc-reference-count +1
6098 . ds doc-macro-name %U
6099 . doc-parse-args \$@
6102 . nr doc-curr-font \n[.f]
6103 . nr doc-curr-size \n[.ps]
6105 . \" append to reference box
6115 .\" NS %V user macro
6116 .\" NS reference volume
6120 .\" NS doc-curr-font
6121 .\" NS doc-curr-size
6122 .\" NS doc-macro-name
6123 .\" NS doc-reference-count
6124 .\" NS doc-volume-count
6126 .\" NS local variables:
6129 .\" NS width register `%V' set in doc-common
6132 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6133 . tm Usage: .%V volume ... (#\n[.c])
6137 . nr doc-volume-count +1
6138 . nr doc-reference-count +1
6140 . ds doc-macro-name %V
6141 . doc-parse-args \$@
6144 . nr doc-curr-font \n[.f]
6145 . nr doc-curr-size \n[.ps]
6147 . \" append to reference box
6148 . boxa doc-volume-name
6157 .\" NS doc-do-references macro
6158 .\" NS reference recursion routine
6163 .\" NS local variables:
6167 .de doc-do-references
6168 . if !\n[doc-is-reference] \
6169 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6171 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6173 . ie (\n[doc-reg-ddr1] == 1) \{\
6174 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6175 . doc-append-arg \c 3
6176 . \*[doc-arg\n[doc-arg-ptr]]
6179 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6181 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6182 . \" finish reference box
6190 . nr doc-reg-ddr \n[doc-arg-ptr]
6192 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6198 .\" NS Hf user macro
6199 .\" NS source include header files.
6202 .\" NS doc-curr-font
6203 .\" NS doc-curr-size
6205 .\" NS width register `Hf' set in doc-common
6208 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6220 . Usage: .Hf file (#\n[.c])
6224 .\" NS doc-have-author global register (bool)
6227 .nr doc-have-author 0
6230 .\" NS An user macro
6235 .\" NS doc-curr-font
6236 .\" NS doc-curr-size
6237 .\" NS doc-have-author
6238 .\" NS doc-macro-name
6240 .\" NS width register `An' set in doc-common
6243 . if !\n[doc-arg-limit] \{\
6245 . ie "\$1"-nosplit" \
6246 . nr doc-in-authors-section 0
6247 . el \{ .ie "\$1"-split" \
6248 . nr doc-in-authors-section 1
6250 . ds doc-macro-name An
6251 . doc-parse-args \$@
6254 . tm1 "Usage: .An {-nosplit | -split}
6255 . tm1 " .An author_name ... (#\n[.c])
6258 . if \n[doc-in-authors-section] \{\
6259 . ie \n[doc-have-author] \
6262 . nr doc-have-author 1
6265 . if \n[doc-arg-limit] \{\
6267 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6268 . nr doc-curr-font \n[.f]
6269 . nr doc-curr-size \n[.ps]
6270 . doc-print-recursive
6273 . tm Usage: .An author_name ... (#\n[.c])
6279 .\" NS Rv user macro
6280 .\" NS return values
6282 .\" NS width register `Rv' set in doc-common
6284 .\" NS local variables:
6285 .\" NS doc-str-Rv-std-prefix
6286 .\" NS doc-str-Rv-std-suffix
6287 .\" NS doc-str-Rv-stds-prefix
6288 .\" NS doc-str-Rv-stds-and
6289 .\" NS doc-str-Rv-stds-suffix
6290 .\" NS doc-str-Rv-std0
6292 .ds doc-str-Rv-std-prefix "The
6293 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6294 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6295 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6296 .as doc-str-Rv-std-suffix " is set to indicate the error.
6298 .ds doc-str-Rv-stds-prefix "The
6299 .ds doc-str-Rv-stds-and "and
6300 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6301 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6302 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6303 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6305 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6306 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6307 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6308 .as doc-str-Rv-std0 " is set to indicate the error.
6312 .\" XXX: what does this function without `-std'?
6314 . if \n[doc-arg-limit] \{\
6315 . tm Usage: .Rv not callable by other macros (#\n[.c])
6321 . tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6326 . nr doc-reg-Rv \*[doc-section]
6327 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6328 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6331 . ie (\n[.$] > 1) \{\
6332 . nop \)\*[doc-str-Rv-stds-prefix]
6334 . while (\n[doc-reg-Rv] < \n[.$]) \{\
6336 . Fn \$\n[doc-reg-Rv] ,
6338 . Fn \$\n[doc-reg-Rv]
6341 . nop \)\*[doc-str-Rv-stds-and]
6343 . nop \)\*[doc-str-Rv-stds-suffix]
6345 . el \{ .ie (\n[.$] == 1) \{\
6346 . nop \)\*[doc-str-Rv-std-prefix]
6348 . nop \)\*[doc-str-Rv-std-suffix]
6351 . nop \)\*[doc-str-Rv-std0]
6356 .\" NS Ex user macro
6359 .\" NS width register `Ex' set in doc-common
6361 .\" NS local variables:
6362 .\" NS doc-str-Ex-std-prefix
6363 .\" NS doc-str-Ex-std-suffix
6365 .ds doc-str-Ex-std-prefix "The
6366 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6367 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6369 .ds doc-str-Ex-stds-prefix "The
6370 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6371 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6372 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6376 .\" XXX: what does this function without `-std'?
6378 . if \n[doc-arg-limit] \{\
6379 . tm Usage: .Ex not callable by other macros (#\n[.c])
6385 . tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6390 . nr doc-reg-Ex \*[doc-section]
6391 . if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6392 . tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6395 . ie (\n[.$] > 1) \{\
6396 . nop \)\*[doc-str-Ex-stds-prefix]
6398 . while (\n[doc-reg-Ex] < \n[.$]) \{\
6400 . Nm \$\n[doc-reg-Ex] ,
6402 . Nm \$\n[doc-reg-Ex]
6405 . nop \)\*[doc-str-Ex-stds-and]
6407 . nop \)\*[doc-str-Ex-stds-suffix]
6410 . nop \)\*[doc-str-Ex-std-prefix]
6412 . nop \)\*[doc-str-Ex-std-suffix]
6417 .\" NS Mt user macro
6418 .\" NS mailto (for conversion to HTML)
6421 . \" XXX: error handling missing
6426 .\" NS Lk user macro
6427 .\" NS link (for conversion to HTML)
6429 .\" NS local variables:
6434 . ds doc-str-Lk Sy \$@
6436 . ie (\n[.$] > 1) \{\
6437 . doc-get-arg-type \$2
6438 . ie (\n[doc-arg-type] < 3) \{\
6440 . ds doc-str-Lk Sy "\$1"
6441 . doc-get-width "\$1"
6444 . as doc-str-Lk " \$@
6447 . doc-get-width "\$1"
6450 . doc-get-width "\$1"
6456 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6463 .\" NS doc-defunct-macro macro
6464 .\" NS this is the skeleton for defunct macros
6467 .de doc-defunct-macro
6468 . tmc mdoc error: .\$0 defunct
6469 . if d doc-\$0-usage \
6470 . tmc , \*[doc-\$0-usage]
6477 .als Db doc-defunct-macro
6479 .als Ds doc-defunct-macro
6481 .als Or doc-defunct-macro
6482 .ds doc-Or-usage use `|'
6484 .als Sf doc-defunct-macro
6485 .ds doc-Sf-usage use .Pf or .Ns
6491 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6492 . tm1 " Should this have been `.Em ...'?
6497 .\" NS doc-empty-line macro
6498 .\" NS emit warning and print empty line
6501 . if !\n[doc-display-depth] \
6502 . tm mdoc warning: Empty input line #\n[.c]
6512 .\" For UTF-8, map some characters conservatively for the sake
6513 .\" of easy cut and paste.
6515 .if '\*[.T]'utf8' \{\
6525 .\" load local modifications