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 . ie (\n[doc-reg-dpr1] == 2) \
485 . \" the `\%' prevents hyphenation on a dash (`-')
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 . ds doc-quote-left \[la]
1201 . ds doc-quote-right \[ra]
1203 . doc-enclose-string \$@
1207 .\" NS Bq user macro
1208 .\" NS enclose string in square brackets
1211 .\" NS doc-macro-name
1212 .\" NS doc-quote-left
1213 .\" NS doc-quote-right
1215 .\" NS width register `Bq' set in doc-common
1218 . if !\n[doc-arg-limit] \
1219 . ds doc-macro-name Bq
1221 . ds doc-quote-left "\*[doc-left-bracket]
1222 . ds doc-quote-right "\*[doc-right-bracket]
1224 . doc-enclose-string \$@
1228 .\" NS Brq user macro
1229 .\" NS enclose string in braces
1232 .\" NS doc-macro-name
1233 .\" NS doc-quote-left
1234 .\" NS doc-quote-right
1236 .\" NS width register `Brq' set in doc-common
1239 . if !\n[doc-arg-limit] \
1240 . ds doc-macro-name Brq
1242 . ds doc-quote-left {
1243 . ds doc-quote-right }
1245 . doc-enclose-string \$@
1249 .\" NS Dq user macro
1250 .\" NS enclose string in double quotes
1253 .\" NS doc-macro-name
1254 .\" NS doc-quote-left
1255 .\" NS doc-quote-right
1257 .\" NS width register `Dq' set in doc-common
1260 . if !\n[doc-arg-limit] \
1261 . ds doc-macro-name Dq
1263 . ds doc-quote-left "\*[Lq]
1264 . ds doc-quote-right "\*[Rq]
1266 . doc-enclose-string \$@
1270 .\" NS Eq user macro
1271 .\" NS enclose string in user-defined quotes (args 1 and 2)
1274 .\" NS doc-macro-name
1275 .\" NS doc-quote-left
1276 .\" NS doc-quote-right
1278 .\" NS width register `Eq' set in doc-common
1281 . if !\n[doc-arg-limit] \
1282 . ds doc-macro-name Eq
1284 . ds doc-quote-left "\$1
1285 . ds doc-quote-right "\$2
1288 . doc-enclose-string \$@
1292 .\" NS Pq user macro
1293 .\" NS enclose string in parentheses
1296 .\" NS doc-macro-name
1297 .\" NS doc-quote-left
1298 .\" NS doc-quote-right
1300 .\" NS width register `Pq' set in doc-common
1303 . if !\n[doc-arg-limit] \
1304 . ds doc-macro-name Pq
1306 . ds doc-quote-left "\*[doc-left-parenthesis]
1307 . ds doc-quote-right "\*[doc-right-parenthesis]
1309 . doc-enclose-string \$@
1313 .\" NS Ql user macro
1314 .\" NS quoted literal
1316 .\" is in file doc-[dit|n]roff
1319 .\" NS Qq user macro
1320 .\" NS enclose string in straight double quotes
1323 .\" NS doc-macro-name
1324 .\" NS doc-quote-left
1325 .\" NS doc-quote-right
1327 .\" NS width register `Qq' set in doc-common
1330 . if !\n[doc-arg-limit] \
1331 . ds doc-macro-name Qq
1333 . ds doc-quote-left "\*[q]
1334 . ds doc-quote-right "\*[q]
1336 . doc-enclose-string \$@
1340 .\" NS Sq user macro
1341 .\" NS enclose string in single quotes
1344 .\" NS doc-macro-name
1345 .\" NS doc-quote-left
1346 .\" NS doc-quote-right
1348 .\" NS width register `Sq' set in doc-common
1351 . if !\n[doc-arg-limit] \
1352 . ds doc-macro-name Sq
1354 . ds doc-quote-left "\*[doc-left-singlequote]
1355 . ds doc-quote-right "\*[doc-right-singlequote]
1357 . doc-enclose-string \$@
1361 .\" NS Es user macro
1362 .\" NS set up arguments (i.e., the left and right quotation character as
1363 .\" NS first and second argument) for .En call
1367 .\" NS doc-macro-name
1368 .\" NS doc-quote-left
1369 .\" NS doc-quote-right
1372 . if !\n[doc-arg-limit] \{\
1373 . ie (\n[.$] > 2) \{\
1374 . ds doc-macro-name Es
1375 . doc-parse-args \$@
1378 . ds doc-quote-left "\$1
1379 . ds doc-quote-right "\$2
1382 . if !\n[doc-arg-limit] \
1386 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1388 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1390 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1391 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1393 . doc-print-and-reset
1397 .\" NS doc-have-slot global register (bool)
1398 .\" NS set if `doc-enclose-string' has created a slot for closing
1404 .\" NS doc-enclose-string macro
1405 .\" NS enclose string with given args (e.g. [ and ])
1410 .\" NS doc-have-slot
1412 .\" NS local variables:
1418 .\" NS doc-quote-left
1419 .\" NS doc-quote-right
1421 .de doc-enclose-string
1422 . if \n[doc-in-synopsis-section] \
1423 . doc-set-hard-space
1425 . if !\n[doc-arg-limit] \{\
1427 . doc-parse-args \$@
1429 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1432 . if !\n[doc-arg-limit] \
1435 . nr doc-curr-font \n[.f]
1436 . nr doc-curr-size \n[.ps]
1439 . doc-print-prefixes
1440 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1441 . nop \)\*[doc-quote-left]\)\c
1442 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1444 . nop \)\*[doc-quote-right]\)\c
1445 . doc-print-and-reset
1448 . \" test whether last arguments are of type closing punctuation
1450 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1451 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1452 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1455 . \" prepend closing delimiter
1457 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1460 . \" test whether last arguments are macros which continue the line
1462 . nr doc-reg-des \n[doc-arg-limit]
1463 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1464 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1466 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1471 . \" if there are no trailing macros to be skipped, append argument
1472 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1473 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1475 . \" if a previous call to `doc-enclose-string' has already created
1476 . \" a slot, prepend argument
1477 . ie \n[doc-have-slot] \
1478 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1480 . \" we have to shift all arguments to the right
1482 . nr doc-reg-des1 \n[doc-arg-limit]
1483 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1484 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1485 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1486 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1487 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1488 . nr doc-reg-des1 -1
1489 . nr doc-reg-des2 -1
1491 . nr doc-arg-limit +1
1493 . \" finally, insert closing delimiter into the freed slot and
1494 . \" recompute spacing vector
1495 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1496 . nr doc-type\n[doc-reg-des] 3
1497 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1498 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1499 . doc-parse-space-vector
1500 . nr doc-have-slot 1
1503 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1506 . if \n[doc-in-synopsis-section] \
1507 . doc-set-soft-space
1511 .\" NS En user macro
1512 .\" NS enclose arguments with quotation characters set up with `.Es'
1514 .als En doc-enclose-string
1517 .\" NS Ao user macro
1521 .\" NS doc-macro-name
1522 .\" NS doc-quote-left
1524 .\" NS width register `Ao' set in doc-common
1527 . if !\n[doc-arg-limit] \
1528 . ds doc-macro-name Ao
1530 . ds doc-quote-left \[la]
1532 . doc-enclose-open \$@
1536 .\" NS Ac user macro
1540 .\" NS doc-macro-name
1541 .\" NS doc-quote-right
1543 .\" NS width register `Ac' set in doc-common
1546 . if !\n[doc-arg-limit] \
1547 . ds doc-macro-name Ac
1549 . ds doc-quote-right \[ra]
1551 . doc-enclose-close \$@
1555 .\" NS Bo user macro
1559 .\" NS doc-macro-name
1560 .\" NS doc-quote-left
1562 .\" NS width register `Bo' set in doc-common
1565 . if !\n[doc-arg-limit] \
1566 . ds doc-macro-name Bo
1568 . ds doc-quote-left "\*[doc-left-bracket]
1570 . doc-enclose-open \$@
1574 .\" NS Bc user macro
1575 .\" NS bracket close
1578 .\" NS doc-macro-name
1579 .\" NS doc-quote-right
1581 .\" NS width register `Bc' set in doc-common
1584 . if !\n[doc-arg-limit] \
1585 . ds doc-macro-name Bc
1587 . ds doc-quote-right "\*[doc-right-bracket]
1589 . doc-enclose-close \$@
1593 .\" NS Bro user macro
1597 .\" NS doc-macro-name
1598 .\" NS doc-quote-left
1600 .\" NS width register `Bro' set in doc-common
1603 . if !\n[doc-arg-limit] \
1604 . ds doc-macro-name Bo
1606 . ds doc-quote-left {
1608 . doc-enclose-open \$@
1612 .\" NS Brc user macro
1616 .\" NS doc-macro-name
1617 .\" NS doc-quote-right
1619 .\" NS width register `Brc' set in doc-common
1622 . if !\n[doc-arg-limit] \
1623 . ds doc-macro-name Bc
1625 . ds doc-quote-right }
1627 . doc-enclose-close \$@
1631 .\" NS Do user macro
1632 .\" NS double quote open
1635 .\" NS doc-macro-name
1636 .\" NS doc-quote-left
1638 .\" NS width register `Do' set in doc-common
1641 . if !\n[doc-arg-limit] \
1642 . ds doc-macro-name Do
1644 . ds doc-quote-left "\*[Lq]
1646 . doc-enclose-open \$@
1650 .\" NS Dc user macro
1651 .\" NS double quote close
1654 .\" NS doc-macro-name
1655 .\" NS doc-quote-right
1657 .\" NS width register `Dc' set in doc-common
1660 . if !\n[doc-arg-limit] \
1661 . ds doc-macro-name Dc
1663 . ds doc-quote-right "\*[Rq]
1665 . doc-enclose-close \$@
1669 .\" NS Eo user macro
1670 .\" NS enclose open (using first argument as beginning of enclosure)
1673 .\" NS doc-macro-name
1674 .\" NS doc-quote-left
1676 .\" NS width register `Eo' set in doc-common
1679 . if !\n[doc-arg-limit] \
1680 . ds doc-macro-name Eo
1682 . ds doc-quote-left "\$1
1685 . doc-enclose-open \$@
1689 .\" NS Ec user macro
1690 .\" NS enclose close (using first argument as end of enclosure)
1693 .\" NS doc-macro-name
1694 .\" NS doc-quote-right
1696 .\" NS width register `Ec' set in doc-common
1699 . if !\n[doc-arg-limit] \
1700 . ds doc-macro-name Ec
1702 . ds doc-quote-right "\$1
1705 . doc-enclose-close \$@
1709 .\" NS Oo user macro
1713 .\" NS doc-macro-name
1714 .\" NS doc-quote-left
1716 .\" NS width register `Oo' set in doc-common
1719 . if !\n[doc-arg-limit] \
1720 . ds doc-macro-name Oo
1722 . ds doc-quote-left [
1724 . doc-enclose-open \$@
1728 .\" NS Oc user macro
1732 .\" NS doc-macro-name
1733 .\" NS doc-quote-right
1735 .\" NS width register `Oc' set in doc-common
1738 . if !\n[doc-arg-limit] \
1739 . ds doc-macro-name Oc
1741 . ds doc-quote-right ]
1743 . doc-enclose-close \$@
1747 .\" NS Po user macro
1748 .\" NS parenthesis open
1751 .\" NS doc-macro-name
1752 .\" NS doc-quote-left
1754 .\" NS width register `Po' set in doc-common
1757 . if !\n[doc-arg-limit] \
1758 . ds doc-macro-name Po
1760 . ds doc-quote-left "\*[doc-left-parenthesis]
1762 . doc-enclose-open \$@
1766 .\" NS Pc user macro
1767 .\" NS parenthesis close
1770 .\" NS doc-macro-name
1771 .\" NS doc-quote-right
1773 .\" NS width register `Pc' set in doc-common
1776 . if !\n[doc-arg-limit] \
1777 . ds doc-macro-name Pc
1779 . ds doc-quote-right "\*[doc-right-parenthesis]
1781 . doc-enclose-close \$@
1785 .\" NS Qo user macro
1786 .\" NS straight double quote open
1789 .\" NS doc-macro-name
1790 .\" NS doc-quote-left
1792 .\" NS width register `Qo' set in doc-common
1795 . if !\n[doc-arg-limit] \
1796 . ds doc-macro-name Qo
1798 . ds doc-quote-left "\*[q]
1800 . doc-enclose-open \$@
1804 .\" NS Qc user macro
1805 .\" NS straight double quote close
1808 .\" NS doc-macro-name
1809 .\" NS doc-quote-right
1811 .\" NS width register `Qc' set in doc-common
1814 . if !\n[doc-arg-limit] \
1815 . ds doc-macro-name Qc
1817 . ds doc-quote-right "\*[q]
1819 . doc-enclose-close \$@
1823 .\" NS So user macro
1824 .\" NS single quote open
1827 .\" NS doc-macro-name
1828 .\" NS doc-quote-left
1830 .\" NS width register `So' set in doc-common
1833 . if !\n[doc-arg-limit] \
1834 . ds doc-macro-name So
1836 . ds doc-quote-left "\*[doc-left-singlequote]
1838 . doc-enclose-open \$@
1842 .\" NS Sc user macro
1843 .\" NS single quote close
1846 .\" NS doc-macro-name
1847 .\" NS doc-quote-right
1849 .\" NS width register `Sc' set in doc-common
1852 . if !\n[doc-arg-limit] \
1853 . ds doc-macro-name Sc
1855 . ds doc-quote-right "\*[doc-right-singlequote]
1857 . doc-enclose-close \$@
1861 .\" NS Xo user macro
1865 .\" NS doc-macro-name
1866 .\" NS doc-quote-left
1868 .\" NS width register `Xo' set in doc-common
1871 . if !\n[doc-arg-limit] \
1872 . ds doc-macro-name Xo
1876 . doc-enclose-open \$@
1880 .\" NS Xc user macro
1884 .\" NS doc-macro-name
1885 .\" NS doc-quote-right
1887 .\" NS width register `Xc' set in doc-common
1890 . if !\n[doc-arg-limit] \
1891 . ds doc-macro-name Xc
1893 . ds doc-quote-right
1895 . doc-enclose-close \$@
1899 .\" NS doc-nesting-level global register
1900 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1902 .nr doc-nesting-level 0
1905 .\" NS doc-in-list global register (bool)
1906 .\" NS whether we are in (logical) .It
1911 .\" NS doc-enclose-open macro
1912 .\" NS enclose string open
1916 .\" NS doc-nesting-level
1918 .de doc-enclose-open
1919 . if !\n[doc-arg-limit] \
1920 . doc-parse-args \$@
1923 . doc-print-prefixes
1926 . nop \)\*[doc-quote-left]\)\c
1928 . \" start enclosure box
1929 . box doc-enclosure-box\n[doc-nesting-level]
1930 . ev doc-enclosure-env\n[doc-nesting-level]
1934 . \" we insert something to make .chop always work
1937 . \" increase nesting level *after* parsing of arguments
1938 . nr doc-nesting-level +1
1940 . if \n[doc-arg-limit] \{\
1942 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1943 . doc-print-recursive
1950 .\" NS doc-enclose-close macro
1951 .\" NS enclose string close
1954 .\" NS doc-nesting-level
1956 .de doc-enclose-close
1957 . nr doc-nesting-level -1
1959 . \" finish enclosure box
1963 . chop doc-enclosure-box\n[doc-nesting-level]
1964 . unformat doc-enclosure-box\n[doc-nesting-level]
1967 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1968 . nop \)\*[doc-quote-right]\)\c
1970 . if !\n[doc-arg-limit] \{\
1971 . doc-parse-args \$@
1974 . doc-print-and-reset
1977 . if \n[doc-arg-limit] \{\
1978 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1979 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1981 . doc-print-recursive
1984 . doc-print-and-reset
1987 . \" shall we finish .It macro?
1988 . if !"\*[doc-macro-name]"It" \
1989 . if \n[doc-in-list] \
1990 . if !\n[doc-nesting-level] \
1991 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
1995 .\" NS Pf user macro
1996 .\" NS prefix: `.Pf prefix arg ...'
2000 .\" NS doc-macro-name
2001 .\" NS doc-quote-left
2003 .\" NS width register `Pf' set in doc-common
2006 . if !\n[doc-arg-limit] \
2007 . ds doc-macro-name Pf
2009 . ie \n[doc-arg-limit] \{\
2010 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2012 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2015 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2021 . doc-parse-args \$@
2023 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2027 . if \n[doc-arg-limit] \{\
2029 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2030 . doc-print-and-reset
2032 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2037 .\" NS Ns user macro
2038 .\" NS remove space (space removal done by `doc-parse-args')
2042 .\" NS doc-macro-name
2044 .\" NS width register `Ns' set in doc-common
2047 . if !\n[doc-arg-limit] \{\
2049 . ds doc-macro-name Ns
2050 . doc-parse-args \$@
2053 . tm Usage: .Ns must be called with arguments (#\n[.c])
2056 . if \n[doc-arg-limit] \{\
2058 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2059 . doc-print-recursive
2066 .\" NS Ap user macro
2067 .\" NS append an apostrophe
2069 .\" NS width register `Ap' set in doc-common
2072 . ie !\n[doc-arg-limit] \
2073 . tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2077 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2078 . doc-print-recursive
2085 .\" NS doc-space global string
2086 .\" NS current inter-argument space
2088 .ds doc-space "\*[doc-soft-space]
2091 .\" NS doc-soft-space constant string
2092 .\" NS soft (stretchable) space (defined in doc-common)
2095 .\" NS doc-hard-space constant string
2096 .\" NS hard (unpaddable) space (defined in doc-common)
2099 .\" NS doc-set-hard-space macro
2100 .\" NS set current space string to hard (unpaddable) space.
2103 .\" NS doc-saved-space
2106 .de doc-set-hard-space
2107 . ie "\*[doc-space]"" \
2108 . ds doc-saved-space "\*[doc-hard-space]
2110 . ds doc-space "\*[doc-hard-space]
2114 .\" NS doc-set-soft-space macro
2115 .\" NS set current space string to soft space
2118 .\" NS doc-saved-space
2121 .de doc-set-soft-space
2122 . ie "\*[doc-space]"" \
2123 . ds doc-saved-space "\*[doc-soft-space]
2125 . ds doc-space "\*[doc-soft-space]
2129 .\" NS doc-space-mode global register (bool)
2130 .\" NS default is one (space mode on)
2132 .nr doc-space-mode 1
2135 .\" NS doc-saved-space global string
2136 .\" NS saved value of `doc-space'
2138 .ds doc-saved-space "\*[doc-space]
2141 .\" NS doc-have-space global register (bool)
2142 .\" NS set if last command was horizontal space
2144 .nr doc-have-space 0
2147 .\" NS Sm user macro
2148 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2150 .\" NS without argument, toggle space mode
2153 .\" NS doc-arg-limit
2156 .\" NS doc-macro-name
2158 .\" NS doc-saved-space
2160 .\" NS doc-space-mode
2163 .\" NS local variables:
2166 .\" NS width register `Sm' set in doc-common
2169 . ie \n[doc-have-space] \
2174 . if !\n[doc-arg-limit] \{\
2176 . ds doc-macro-name Sm
2177 . doc-parse-args \$@
2180 . ie \n[doc-space-mode] \{\
2181 . ds doc-saved-space "\*[doc-space]
2183 . nr doc-space-mode 0
2186 . ds doc-space "\*[doc-saved-space]
2187 . nr doc-space-mode 1
2189 . \" finish line only if it is interrupted and `doc-have-space'
2191 . if \n[doc-reg-Sm] \
2197 . if !\n[doc-arg-limit] \
2202 . \" avoid a warning message in case `Sm' is the last parameter
2203 . if !d doc-arg\n[doc-arg-ptr] \
2204 . ds doc-arg\n[doc-arg-ptr]
2206 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2207 . ds doc-space "\*[doc-saved-space]
2208 . nr doc-space-mode 1
2211 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2212 . ds doc-saved-space "\*[doc-space]
2214 . nr doc-space-mode 0
2217 . \" no argument for Sm
2219 . ie \n[doc-space-mode] \{\
2220 . ds doc-saved-space "\*[doc-space]
2222 . nr doc-space-mode 0
2225 . ds doc-space "\*[doc-saved-space]
2226 . nr doc-space-mode 1
2230 . ie \n[doc-space-mode] \{\
2231 . \" recompute space vector for remaining arguments
2232 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2233 . nr doc-arg-limit \n[doc-arg-ptr]
2234 . if \n[doc-num-args] \
2235 . doc-parse-space-vector
2237 . \" finish line only if it is interrupted and `doc-have-space'
2239 . if \n[doc-reg-Sm] \
2244 . \" reset remaining space vector elements
2245 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2246 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2247 . ds doc-space\n[doc-reg-Sm]
2249 . \" the body of a `while' request must end with the fitting `\}'!
2253 . \" do we have parameters to print?
2254 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2255 . \" skip `Sm' argument
2257 . doc-print-recursive
2264 .\" NS doc-arg-type immediate register
2265 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2266 .\" NS punctuation prefix=4)
2271 .\" NS doc-get-arg-type macro
2272 .\" NS get argument type
2274 .\" NS this macro expects the width of the argument in `doc-width'
2279 .de doc-get-arg-type
2282 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2283 . ie (\n[doc-width] == 1) \{\
2284 . if r doc-punct\$1 \
2285 . nr doc-arg-type \n[doc-punct\$1]
2295 .\" NS doc-get-arg-type* macro
2296 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2298 .\" NS this macro sets the `doc-width' register using the `length' request
2299 .\" NS to get the number of characters in a string literally
2305 .de doc-get-arg-type*
2307 . length doc-width "\*[doc-arg\$1]
2309 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2310 . ie (\n[doc-width] == 1) \{\
2311 . if r doc-punct\*[doc-arg\$1] \
2312 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2315 . if r \*[doc-arg\$1] \
2316 . if d \*[doc-arg\$1] \
2322 .\" NS doc-set-spacing-1 macro
2323 .\" NS set spacing for macros
2328 .\" NS local variables:
2329 .\" NS doc-reg-dssfm
2330 .\" NS doc-reg-dssfm1
2332 .de doc-set-spacing-1
2333 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2335 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2337 . ie (\n[doc-reg-dssfm1] == 3) \{\
2338 . if \n[doc-arg-limit] \{\
2339 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2340 . ds doc-space\n[doc-reg-dssfm]
2342 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2345 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2347 . ie (\n[doc-reg-dssfm1] == 2) \{\
2348 . if \n[doc-arg-limit] \{\
2349 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2350 . ds doc-space\n[doc-reg-dssfm]
2352 . ds doc-space\n[doc-arg-limit]
2355 . ds doc-space\n[doc-arg-limit]
2360 .\" NS doc-set-spacing-2 macro
2361 .\" NS set spacing for strings
2366 .de doc-set-spacing-2
2367 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2371 .\" NS doc-set-spacing-3 macro
2372 .\" NS set spacing for punctuation suffixes
2377 .\" NS local variables:
2378 .\" NS doc-reg-dssfps
2380 .de doc-set-spacing-3
2381 . if \n[doc-arg-limit] \{\
2382 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2383 . ds doc-space\n[doc-reg-dssfps]
2386 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2390 .\" NS doc-set-spacing-4 macro
2391 .\" NS set spacing for punctuation prefixes
2396 .de doc-set-spacing-4
2397 . ds doc-space\n[doc-arg-limit]
2401 .\" type switches (on current argument doc-arg-ptr)
2404 .\" NS doc-do-1 macro
2405 .\" NS call request if macro
2408 . \*[doc-arg\n[doc-arg-ptr]]
2412 .\" NS doc-do-2 macro
2413 .\" NS call .doc-print-recursive if string
2415 .als doc-do-2 doc-print-recursive
2418 .\" NS doc-do-3 macro
2419 .\" NS call .doc-print-recursive if punctuation suffix
2421 .als doc-do-3 doc-print-recursive
2424 .\" NS doc-do-4 macro
2425 .\" NS call .doc-print-recursive if punctuation prefix
2427 .als doc-do-4 doc-print-recursive
2430 .\" NS doc-fontmode-depth global register
2431 .\" NS font mode level
2433 .nr doc-fontmode-depth 0
2436 .\" NS doc-fontmode-font-stackXXX global register
2437 .\" NS stack of saved current font values from `Bf' macro
2440 .\" NS doc-fontmode-depth
2442 .nr doc-fontmode-font-stack0 0
2445 .\" NS doc-fontmode-size-stackXXX global register
2446 .\" NS stack of saved current size values from `Bf' macro
2449 .\" NS doc-fontmode-depth
2451 .nr doc-fontmode-size-stack0 0
2454 .\" NS Bf user macro
2455 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2458 .\" NS doc-fontmode-depth
2459 .\" NS doc-fontmode-font-stackXXX
2460 .\" NS doc-fontmode-size-stackXXX
2461 .\" NS doc-macro-name
2463 .\" NS width register `Bf' set in doc-common
2466 . ds doc-macro-name Bf
2469 . nr doc-fontmode-depth +1
2471 . \" save current font and size
2472 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2473 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2476 . nop \*[doc-Em-font]\c
2477 . el \{ .ie "\$1"Li" \
2478 . nop \*[doc-Li-font]\c
2479 . el \{ .ie "\$1"Sy" \
2480 . nop \*[doc-Sy-font]\c
2481 . el \{ .ie "\$1"-emphasis" \
2482 . nop \*[doc-Em-font]\c
2483 . el \{ .ie "\$1"-literal" \
2484 . nop \*[doc-Li-font]\c
2485 . el \{ .ie "\$1"-symbolic" \
2486 . nop \*[doc-Sy-font]\c
2488 . tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2492 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2496 .\" NS Ef user macro
2497 .\" NS end font mode
2500 .\" NS doc-macro-name
2502 .\" NS width register `Ef' set in doc-common
2505 . ds doc-macro-name Ef
2507 . ie \n[doc-fontmode-depth] \{\
2508 . \" restore saved font and size
2509 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2510 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2512 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2513 . nr doc-curr-font \n[.f]
2514 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2515 . nr doc-curr-size \n[.ps]
2516 . nr doc-fontmode-depth -1
2519 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2523 .\" NS doc-keep-type global register
2524 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2529 .\" NS Bk user macro
2533 .\" NS doc-keep-type
2534 .\" NS doc-macro-name
2536 .\" NS width register `Bk' set in doc-common
2539 . ds doc-macro-name Bk
2541 . if \n[doc-keep-type] \
2542 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2544 . ie "\$1"-lines" \{\
2545 . nr doc-keep-type 2
2546 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2548 . el \{ .ie "\$1"-words" \{\
2549 . nr doc-keep-type 1
2550 . doc-set-hard-space
2552 . el \{ .ie "\$1"" \{\
2554 . nr doc-keep-type 1
2555 . doc-set-hard-space
2558 . tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2559 . nr doc-keep-type 3
2562 \#. nr doc-nesting-level +1
2566 .\" NS Ek user macro
2570 .\" NS doc-keep-type
2571 .\" NS doc-macro-name
2573 .\" NS width register `Ek' set in doc-common
2576 . ds doc-macro-name Ek
2578 \#. nr doc-nesting-level -1
2581 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2583 . if !\n[doc-keep-type] \
2584 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2586 . ie (\n[doc-keep-type] == 1) \
2587 . doc-set-soft-space
2588 . el \{ .if (\n[doc-keep-type] == 2) \
2589 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2592 . nr doc-keep-type 0
2594 \#. if !"\*[doc-out-string]"" \
2595 \#. doc-print-out-string
2599 .\" NS doc-display-depth global register
2600 .\" NS display level
2602 .nr doc-display-depth 0
2605 .\" NS doc-is-compact global register (bool)
2606 .\" NS set if the `compact' keyword is given
2608 .nr doc-is-compact 0
2611 .\" NS doc-display-type-stackXXX global string
2612 .\" NS the display type stack
2615 .\" NS doc-display-depth
2617 .ds doc-display-type-stack0
2620 .\" NS doc-display-indent-stackXXX global register
2621 .\" NS stack of display indentation values
2624 .\" NS doc-display-depth
2626 .nr doc-display-indent-stack0 0
2629 .\" NS doc-display-ad-stackXXX global register
2630 .\" NS stack of saved adjustment modes
2633 .\" NS doc-display-depth
2635 .nr doc-display-ad-stack0 0
2638 .\" NS doc-display-fi-stackXXX global register
2639 .\" NS stack of saved fill modes
2642 .\" NS doc-display-depth
2644 .nr doc-display-fi-stack0 0
2647 .\" NS doc-display-ft-stackXXX global register
2648 .\" NS stack of saved fonts
2651 .\" NS doc-display-depth
2653 .nr doc-display-ft-stack0 0
2656 .\" NS doc-display-ps-stackXXX global register
2657 .\" NS stack of saved font sizes
2660 .\" NS doc-display-depth
2662 .nr doc-display-ps-stack0 0
2665 .\" NS Bd user macro
2666 .\" NS begin display
2668 .\" NS width register `Bd' set in doc-common
2671 .\" NS doc-curr-font
2672 .\" NS doc-curr-size
2673 .\" NS doc-display-depth
2674 .\" NS doc-display-ad-stackXXX
2675 .\" NS doc-display-fi-stackXXX
2676 .\" NS doc-display-ft-stackXXX
2677 .\" NS doc-display-ps-stackXXX
2678 .\" NS doc-display-file
2679 .\" NS doc-display-indent-stackXXX
2680 .\" NS doc-display-type-stackXXX
2681 .\" NS doc-is-compact
2682 .\" NS doc-macro-name
2684 .\" NS local variables:
2688 . ds doc-macro-name Bd
2691 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2692 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2696 . nr doc-is-compact 0
2697 . ds doc-display-file
2699 . nr doc-display-depth +1
2701 . \" save current adjustment and fill modes
2702 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2703 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2705 . ie "\$1"-literal" \{\
2706 . ds doc-display-type-stack\n[doc-display-depth] literal
2707 . nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2708 . nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2716 . el \{ .ie "\$1"-filled" \{\
2717 . ds doc-display-type-stack\n[doc-display-depth] filled
2721 . el \{ .ie "\$1"-ragged" \{\
2722 . ds doc-display-type-stack\n[doc-display-depth] ragged
2726 . el \{ .ie "\$1"-centered" \{\
2727 . ds doc-display-type-stack\n[doc-display-depth] centered
2731 . el \{ .ie "\$1"-unfilled" \{\
2732 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2736 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2737 . tm1 " in .Bd macro (#\n[.c])
2741 . \" have we seen an argument?
2742 . if \n[doc-reg-Bd] \{\
2744 . \" check other arguments
2746 . doc-do-Bd-args \$@
2749 . \" avoid warning about non-existent register
2750 . if !r doc-display-indent-stack\n[doc-display-depth] \
2751 . nr doc-display-indent-stack\n[doc-display-depth] 0
2753 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2754 . in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2756 . if !\n[doc-is-compact] \
2757 . sp \n[doc-display-vertical]u
2759 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2761 . nop \*[doc-Li-font]\c
2766 . if !"\*[doc-display-file]"" \
2767 . so \*[doc-display-file]
2769 . nr doc-is-compact 0
2770 . ds doc-display-file
2774 .\" NS doc-do-Bd-args macro
2775 .\" NS resolve remaining .Bd arguments
2778 .\" NS doc-display-file
2779 .\" NS doc-display-indent-stackXXX
2780 .\" NS doc-is-compact
2782 .\" NS local variables:
2784 .\" NS doc-reg-ddBa1
2785 .\" NS doc-reg-ddBa2
2786 .\" NS doc-reg-ddBa3
2787 .\" NS doc-reg-ddBa4
2793 . ie "\$1"-offset" \{\
2797 . nr doc-display-indent-stack\n[doc-display-depth] 0
2798 . el \{ .ie "\$2"right" \
2799 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2800 . el \{ .ie "\$2"center" \
2801 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2802 . el \{ .ie "\$2"indent" \
2803 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2804 . el \{ .ie "\$2"indent-two" \
2805 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2810 . \" not a known keyword
2811 . if (\n[doc-reg-ddBa] == 1) \{\
2814 . nr doc-reg-ddBa1 0
2815 . if \B
\a(\$2)
\a \{\
2816 . \" disable warnings related to scaling indicators (32)
2817 . nr doc-reg-ddBa2 \n[.warn]
2818 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2820 . \" values without a scaling indicator are taken as strings;
2821 . \" we test whether the parameter string with and without the last
2822 . \" character yields identical numerical results (ignoring the
2823 . \" scaling indicator)
2824 . ds doc-str-ddBa "\$2
2825 . substring doc-str-ddBa 0 -2
2826 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2827 . nr doc-reg-ddBa3 (;(\$2))
2828 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2829 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2830 . nr doc-reg-ddBa1 1
2833 . \" enable all warnings again
2834 . warn \n[doc-reg-ddBa2]
2837 . ie \n[doc-reg-ddBa1] \
2838 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2840 . doc-get-width "\$2"
2841 . ie (\n[doc-width] <= 3) \{\
2842 . \" if the offset parameter is a macro, use the macro's
2843 . \" width as specified in doc-common
2844 . doc-get-arg-type "\$2"
2845 . ie (\n[doc-arg-type] == 1) \
2846 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2848 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2851 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2854 . el \{ .ie "\$1"-compact" \
2855 . nr doc-is-compact 1
2856 . el \{ .ie "\$1"-file" \{\
2858 . ds doc-display-file "\$2
2862 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2865 . tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2868 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2869 . shift \n[doc-reg-ddBa]
2870 . doc-do-Bd-args \$@
2875 .\" NS Ed user macro
2879 .\" NS doc-display-depth
2880 .\" NS doc-display-indent-stackXXX
2881 .\" NS doc-display-type-stackXXX
2882 .\" NS doc-macro-name
2884 .\" NS width register `Ed' set in doc-common
2887 . ds doc-macro-name Ed
2891 . if !\n[doc-display-depth] \{\
2892 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2893 . nr doc-display-depth 1
2896 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2897 . ft \n[doc-display-ft-stack\n[doc-display-depth]]
2898 . ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2901 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2903 . \" restore saved adjustment and fill modes
2904 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2908 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2910 . nr doc-display-indent-stack\n[doc-display-depth] 0
2911 . ds doc-display-type-stack\n[doc-display-depth]
2912 . nr doc-display-depth -1
2916 .\" NS doc-list-type-stackXXX global string
2917 .\" NS stack of list types
2920 .\" NS doc-list-depth
2922 .ds doc-list-type-stack1
2925 .\" NS doc-list-indent-stackXXX global register
2926 .\" NS stack of list indentation values
2929 .\" NS doc-list-depth
2931 .nr doc-list-indent-stack1 0
2934 .\" NS doc-list-have-indent-stackXXX global register (bool)
2935 .\" NS an indentation value is active
2938 .\" NS doc-list-depth
2940 .nr doc-list-have-indent-stack1 0
2943 .\" NS Bl user macro
2946 .\" NS width register `Bl' set in doc-common
2951 .\" NS doc-list-depth
2952 .\" NS doc-list-have-indent-stackXXX
2953 .\" NS doc-list-indent-stackXXX
2954 .\" NS doc-list-type-stackXXX
2955 .\" NS doc-macro-name
2957 .\" NS doc-num-columns
2959 .\" NS local variables:
2968 . ds doc-macro-name Bl
2969 . nr doc-list-depth +1
2972 . ie "\$1"-hang" \{\
2973 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2974 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2975 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2977 . el \{ .ie "\$1"-tag" \{\
2978 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2979 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2981 . el \{ .ie "\$1"-item" \{\
2982 . ds doc-list-type-stack\n[doc-list-depth] item-list
2983 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2985 . el \{ .ie "\$1"-enum" \{\
2986 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2987 . nr doc-list-indent-stack\n[doc-list-depth] 3n
2988 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2990 . el \{ .ie "\$1"-bullet" \{\
2991 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
2992 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2993 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2995 . el \{ .ie "\$1"-dash" \{\
2996 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2997 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2998 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3000 . el \{ .ie "\$1"-hyphen" \{\
3001 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3002 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3003 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3005 . el \{ .ie "\$1"-inset" \{\
3006 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3007 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3009 . el \{ .ie "\$1"-diag" \{\
3010 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3012 . el \{ .ie "\$1"-ohang" \{\
3013 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3014 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3016 . el \{ .ie "\$1"-column" \{\
3017 . ds doc-list-type-stack\n[doc-list-depth] column-list
3021 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3022 . tm1 " in .Bl macro
3025 . \}\}\}\}\}\}\}\}\}\}\}
3027 . \" we have seen a list type
3028 . if !\n[doc-arg-ptr] \{\
3031 . nr doc-list-depth -1
3037 . \" fill argument vector
3039 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3040 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3041 . \" dummy type and space so that doc-save-global-vars() doesn't warn
3042 . nr doc-type\n[doc-reg-Bl] 0
3043 . ds doc-space\n[doc-reg-Bl]
3047 . doc-increment-list-stack
3050 . nr doc-arg-limit \n[.$]
3054 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3056 . \" initialize column list
3057 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3058 . doc-set-column-tab \n[doc-num-columns]
3059 ' in -\n[doc-column-indent-width]u
3060 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3061 . sp \n[doc-display-vertical]u
3064 . nr doc-num-columns 0
3071 .\" NS doc-Bl-usage macro
3074 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3075 . tm1 " [-width <string>]
3076 . tm1 " [-offset <string>] [-compact]
3077 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3078 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3079 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3083 .\" NS doc-do-Bl-args macro
3084 .\" NS resolve remaining .Bl arguments
3089 .\" NS doc-compact-list-stackXXX
3090 .\" NS doc-list-indent-stackXXX
3091 .\" NS doc-list-offset-stackXXX
3092 .\" NS doc-num-columns
3093 .\" NS doc-tag-prefix-stackXXX
3094 .\" NS doc-tag-width-stackXXX
3096 .\" NS local variables:
3100 .\" NS doc-reg-dBla1
3101 .\" NS doc-reg-dBla2
3102 .\" NS doc-reg-dBla3
3103 .\" NS doc-reg-dBla4
3105 .\" NS doc-str-dBla1
3110 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3113 . \" avoid a warning message in case e.g. `-offset' has no parameter
3114 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3115 . if !d doc-arg\n[doc-reg-dBla] \
3116 . ds doc-arg\n[doc-reg-dBla]
3120 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3121 . nr doc-compact-list-stack\n[doc-list-depth] 1
3123 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3124 . ie (\n[doc-list-depth] > 1) \{\
3125 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3126 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3127 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3128 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3129 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3132 . tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3135 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3137 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3139 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3140 . substring doc-str-dBla 0 0
3141 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3142 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3143 . substring doc-str-dBla 1
3144 . doc-first-parameter \*[doc-str-dBla]
3145 . doc-get-width "\*[doc-str-dfp]
3146 . doc-get-arg-type "\*[doc-str-dfp]
3147 . ie (\n[doc-arg-type] == 1) \
3148 . nr doc-reg-dBla1 1
3150 . nr doc-reg-dBla1 0
3153 . nr doc-reg-dBla1 0
3154 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3156 . ie \n[doc-reg-dBla1] \{\
3157 . \" execute string in a box to get the width of the diversion
3158 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3159 . doc-save-global-vars
3166 . nop \*[doc-str-dBla]
3170 . doc-restore-global-vars
3171 . doc-get-width \h'\n[dl]u'
3172 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3175 . \" test whether argument is a valid numeric expression
3176 . nr doc-reg-dBla1 0
3177 . if \B
\a(\*[doc-str-dBla])
\a \{\
3178 . \" disable warnings related to scaling indicators (32)
3179 . nr doc-reg-dBla2 \n[.warn]
3180 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3182 . \" values without a scaling indicator are taken as strings;
3183 . \" we test whether the parameter string with and without the last
3184 . \" character yields identical numerical results (ignoring the
3185 . \" scaling indicator)
3186 . ds doc-str-dBla1 "\*[doc-str-dBla]
3187 . substring doc-str-dBla1 0 -2
3188 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3189 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3190 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3191 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3192 . nr doc-reg-dBla1 1
3195 . \" enable all warnings again
3196 . warn \n[doc-reg-dBla2]
3199 . ie \n[doc-reg-dBla1] \
3200 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3202 . doc-get-arg-width \n[doc-arg-ptr]
3203 . ie (\n[doc-width] == 2) \{\
3204 . \" if the width parameter is a macro, use the macro's
3205 . \" width as specified in doc-common
3206 . doc-get-arg-type \*[doc-str-dBla]
3207 . ie (\n[doc-arg-type] == 1) \
3208 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3210 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3213 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3216 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3219 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3220 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3222 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3223 . nr doc-reg-dBla1 0
3224 . if \B
\a(\*[doc-str-dBla])
\a \{\
3225 . nr doc-reg-dBla2 \n[.warn]
3226 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3228 . ds doc-str-dBla1 "\*[doc-str-dBla]
3229 . substring doc-str-dBla1 0 -2
3230 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3231 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3232 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3233 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3234 . nr doc-reg-dBla1 1
3237 . warn \n[doc-reg-dBla2]
3240 . ie \n[doc-reg-dBla1] \
3241 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3243 . doc-get-arg-width \n[doc-arg-ptr]
3244 . ie (\n[doc-width] <= 3) \{\
3245 . \" if the offset parameter is a macro, use the macro's
3246 . \" width as specified in doc-common
3247 . doc-get-arg-type \*[doc-str-dBla]
3248 . ie (\n[doc-arg-type] == 1) \
3249 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3251 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3254 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3260 . \" not a known keyword, so it specifies the width of the next column
3261 . \" (if it is a column list)
3262 . if !\n[doc-reg-dBla] \{\
3263 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3264 . nr doc-num-columns +1
3265 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3266 . substring doc-str-dBla 0 0
3267 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3268 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3269 . substring doc-str-dBla 1
3270 . doc-first-parameter \*[doc-str-dBla]
3271 . doc-get-width "\*[doc-str-dfp]
3272 . doc-get-arg-type "\*[doc-str-dfp]
3273 . ie (\n[doc-arg-type] == 1) \
3274 . nr doc-reg-dBla1 1
3276 . nr doc-reg-dBla1 0
3279 . nr doc-reg-dBla1 0
3280 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3282 . ie \n[doc-reg-dBla1] \{\
3283 . \" execute string in a box to get the width of the diversion
3284 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3285 . doc-save-global-vars
3292 . nop \*[doc-str-dBla]
3296 . doc-restore-global-vars
3297 . ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3300 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3303 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3304 . tm1 " in .Bl macro (#\n[.c])
3307 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3312 .\" NS doc-save-global-vars macro
3313 .\" NS save all global variables
3315 .\" NS local variables:
3318 .de doc-save-global-vars
3319 . ds doc-macro-name-saved "\*[doc-macro-name]
3320 . nr doc-arg-limit-saved \n[doc-arg-limit]
3321 . nr doc-num-args-saved \n[doc-num-args]
3322 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3325 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3326 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3327 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3328 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3329 . nr doc-reg-dsgv +1
3332 . nr doc-curr-font-saved \n[doc-curr-font]
3333 . nr doc-curr-size-saved \n[doc-curr-size]
3334 . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3335 . nr doc-in-library-section-saved \n[doc-in-library-section]
3336 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3337 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3338 . nr doc-have-decl-saved \n[doc-have-decl]
3339 . nr doc-have-var-saved \n[doc-have-var]
3340 . ds doc-command-name-saved "\*[doc-command-name]
3341 . ds doc-quote-left-saved "\*[doc-quote-left]
3342 . ds doc-quote-right-saved "\*[doc-quote-right]
3343 . nr doc-nesting-level-saved \n[doc-nesting-level]
3344 . nr doc-in-list-saved \n[doc-in-list]
3345 . ds doc-space-saved "\*[doc-space]
3346 . ds doc-saved-space-saved "\*[doc-saved-space]
3347 . nr doc-space-mode-saved \n[doc-space-mode]
3348 . nr doc-have-space-saved \n[doc-have-space]
3349 . nr doc-have-slot-saved \n[doc-have-slot]
3350 . nr doc-keep-type-saved \n[doc-keep-type]
3351 . nr doc-display-depth-saved \n[doc-display-depth]
3352 . nr doc-is-compact-saved \n[doc-is-compact]
3355 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3356 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3357 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3358 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3359 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3360 . nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3361 . nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3362 . nr doc-reg-dsgv +1
3365 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3368 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3369 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3370 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3371 . nr doc-reg-dsgv +1
3374 . nr doc-list-depth-saved \n[doc-list-depth]
3377 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3378 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3379 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3380 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3381 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3382 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3383 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3384 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3385 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3386 . nr doc-reg-dsgv +1
3389 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3390 . nr doc-curr-type-saved \n[doc-curr-type]
3391 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3392 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3393 . nr doc-num-columns-saved \n[doc-num-columns]
3394 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3395 . nr doc-is-func-saved \n[doc-is-func]
3396 . nr doc-have-old-func-saved \n[doc-have-old-func]
3397 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3398 . ds doc-func-arg-saved "\*[doc-func-arg]
3399 . nr doc-num-func-args-saved \n[doc-num-func-args]
3400 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3401 . nr doc-have-func-saved \n[doc-have-func]
3402 . nr doc-is-reference-saved \n[doc-is-reference]
3403 . nr doc-reference-count-saved \n[doc-reference-count]
3404 . nr doc-author-count-saved \n[doc-author-count]
3407 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3408 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3409 . nr doc-reg-dsgv +1
3412 . nr doc-book-count-saved \n[doc-book-count]
3413 . ds doc-book-name-saved "\*[doc-book-name]
3414 . nr doc-date-count-saved \n[doc-date-count]
3415 . ds doc-date-saved "\*[doc-date]
3416 . nr doc-publisher-count-saved \n[doc-publisher-count]
3417 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3418 . nr doc-journal-count-saved \n[doc-journal-count]
3419 . ds doc-journal-name-saved "\*[doc-journal-name]
3420 . nr doc-issue-count-saved \n[doc-issue-count]
3421 . ds doc-issue-name-saved "\*[doc-issue-name]
3422 . nr doc-optional-count-saved \n[doc-optional-count]
3423 . ds doc-optional-string-saved "\*[doc-optional-string]
3424 . nr doc-page-number-count-saved \n[doc-page-number-count]
3425 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3426 . nr doc-corporate-count-saved \n[doc-corporate-count]
3427 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3428 . nr doc-report-count-saved \n[doc-report-count]
3429 . ds doc-report-name-saved "\*[doc-report-name]
3430 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3431 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3432 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3433 . nr doc-url-count-saved \n[doc-url-count]
3434 . ds doc-url-name-saved "\*[doc-url-name]
3435 . nr doc-volume-count-saved \n[doc-volume-count]
3436 . ds doc-volume-name-saved "\*[doc-volume-name]
3437 . nr doc-have-author-saved \n[doc-have-author]
3439 . ds doc-document-title-saved "\*[doc-document-title]
3440 . ds doc-volume-saved "\*[doc-volume]
3441 . ds doc-section-saved "\*[doc-section]
3442 . ds doc-operating-system-saved "\*[doc-operating-system]
3443 . ds doc-date-string-saved "\*[doc-date-string]
3444 . nr doc-header-space-saved \n[doc-header-space]
3445 . nr doc-footer-space-saved \n[doc-footer-space]
3446 . nr doc-display-vertical-saved \n[doc-display-vertical]
3447 . ds doc-header-string-saved "\*[doc-header-string]
3448 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3449 . nr doc-in-files-section-saved \n[doc-in-files-section]
3450 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3454 .\" NS doc-restore-global-vars macro
3455 .\" NS restore all global variables
3457 .\" NS local variables:
3460 .de doc-restore-global-vars
3461 . ds doc-macro-name "\*[doc-macro-name-saved]
3462 . nr doc-arg-limit \n[doc-arg-limit-saved]
3463 . nr doc-num-args \n[doc-num-args-saved]
3464 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3467 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3468 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3469 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3470 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3471 . nr doc-reg-drgv +1
3474 . nr doc-curr-font \n[doc-curr-font-saved]
3475 . nr doc-curr-size \n[doc-curr-size-saved]
3476 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3477 . nr doc-in-library-section \n[doc-in-library-section-saved]
3478 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3479 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3480 . nr doc-have-decl \n[doc-have-decl-saved]
3481 . nr doc-have-var \n[doc-have-var-saved]
3482 . ds doc-command-name "\*[doc-command-name-saved]
3483 . ds doc-quote-left "\*[doc-quote-left-saved]
3484 . ds doc-quote-right "\*[doc-quote-right-saved]
3485 . nr doc-nesting-level \n[doc-nesting-level-saved]
3486 . nr doc-in-list \n[doc-in-list-saved]
3487 . ds doc-space "\*[doc-space-saved]
3488 . ds doc-saved-space "\*[doc-saved-space-saved]
3489 . nr doc-space-mode \n[doc-space-mode-saved]
3490 . nr doc-have-space \n[doc-have-space-saved]
3491 . nr doc-have-slot \n[doc-have-slot-saved]
3492 . nr doc-keep-type \n[doc-keep-type-saved]
3493 . nr doc-display-depth \n[doc-display-depth-saved]
3494 . nr doc-is-compact \n[doc-is-compact-saved]
3497 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3498 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3499 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3500 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3501 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3502 . nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3503 . nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3504 . nr doc-reg-drgv +1
3507 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3510 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3511 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3512 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3513 . nr doc-reg-drgv +1
3516 . nr doc-list-depth \n[doc-list-depth-saved]
3519 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3520 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3521 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3522 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3523 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3524 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3525 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3526 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3527 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3528 . nr doc-reg-drgv +1
3531 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3532 . nr doc-curr-type \n[doc-curr-type-saved]
3533 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3534 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3535 . nr doc-num-columns \n[doc-num-columns-saved]
3536 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3537 . nr doc-is-func \n[doc-is-func-saved]
3538 . nr doc-have-old-func \n[doc-have-old-func-saved]
3539 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3540 . ds doc-func-arg "\*[doc-func-arg-saved]
3541 . nr doc-num-func-args \n[doc-num-func-args-saved]
3542 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3543 . nr doc-have-func \n[doc-have-func-saved]
3544 . nr doc-is-reference \n[doc-is-reference-saved]
3545 . nr doc-reference-count \n[doc-reference-count-saved]
3546 . nr doc-author-count \n[doc-author-count-saved]
3549 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3550 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3551 . nr doc-reg-drgv +1
3554 . nr doc-book-count \n[doc-book-count-saved]
3555 . ds doc-book-name "\*[doc-book-name-saved]
3556 . nr doc-date-count \n[doc-date-count-saved]
3557 . ds doc-date "\*[doc-date-saved]
3558 . nr doc-publisher-count \n[doc-publisher-count-saved]
3559 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3560 . nr doc-journal-count \n[doc-journal-count-saved]
3561 . ds doc-journal-name "\*[doc-journal-name-saved]
3562 . nr doc-issue-count \n[doc-issue-count-saved]
3563 . ds doc-issue-name "\*[doc-issue-name-saved]
3564 . nr doc-optional-count \n[doc-optional-count-saved]
3565 . ds doc-optional-string "\*[doc-optional-string-saved]
3566 . nr doc-page-number-count \n[doc-page-number-count-saved]
3567 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3568 . nr doc-corporate-count \n[doc-corporate-count-saved]
3569 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3570 . nr doc-report-count \n[doc-report-count-saved]
3571 . ds doc-report-name "\*[doc-report-name-saved]
3572 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3573 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3574 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3575 . nr doc-url-count \n[doc-url-count-saved]
3576 . ds doc-url-name "\*[doc-url-name-saved]
3577 . nr doc-volume-count \n[doc-volume-count-saved]
3578 . ds doc-volume-name "\*[doc-volume-name-saved]
3579 . nr doc-have-author \n[doc-have-author-saved]
3581 . ds doc-document-title "\*[doc-document-title-saved]
3582 . ds doc-volume "\*[doc-volume-saved]
3583 . ds doc-section "\*[doc-section-saved]
3584 . ds doc-operating-system "\*[doc-operating-system-saved]
3585 . ds doc-date-string "\*[doc-date-string-saved]
3586 . nr doc-header-space \n[doc-header-space-saved]
3587 . nr doc-footer-space \n[doc-footer-space-saved]
3588 . nr doc-display-vertical \n[doc-display-vertical-saved]
3589 . ds doc-header-string "\*[doc-header-string-saved]
3590 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3591 . nr doc-in-files-section \n[doc-in-files-section-saved]
3592 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3596 .\" NS El user macro
3600 .\" NS doc-list-depth
3601 .\" NS doc-macro-name
3603 .\" NS local variables:
3606 .\" NS width register `El' set in doc-common
3610 . tm Usage: .El (does not take arguments) (#\n[.c])
3614 . ds doc-macro-name El
3615 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3617 . ie "\*[doc-str-El]"diag-list" \
3619 . el \{ .ie "\*[doc-str-El]"column-list" \
3620 . doc-end-column-list
3621 . el \{ .ie "\*[doc-str-El]"item-list" \
3623 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3625 . el \{ .ie "\*[doc-str-El]"inset-list" \
3635 .\" NS doc-saved-Pa-font global string
3636 .\" NS saved doc-Pa-font string for section FILES (no underline if
3639 .ds doc-saved-Pa-font
3642 .\" NS doc-curr-type global register
3643 .\" NS current argument type
3648 .\" NS doc-curr-arg global string
3649 .\" NS current argument
3654 .\" NS doc-item-boxXXX global box
3655 .\" NS item boxes associated list depth
3658 .\" NS doc-list-depth
3661 .\" NS It user macro
3668 .\" NS doc-curr-type
3670 .\" NS doc-macro-name
3672 .\" NS doc-saved-Pa-font
3674 .\" NS local variables:
3677 .\" NS doc-XXX-list-type
3679 .\" NS width register `It' set in doc-common
3681 .nr doc-bullet-list-type 1
3682 .nr doc-column-list-type 0
3683 .nr doc-dash-list-type 1
3684 .nr doc-diag-list-type 0
3685 .nr doc-enum-list-type 1
3686 .nr doc-hang-list-type 2
3687 .nr doc-inset-list-type 2
3688 .nr doc-item-list-type 1
3689 .nr doc-ohang-list-type 2
3690 .nr doc-tag-list-type 2
3693 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3695 . if "\*[doc-str-It]"" \
3696 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3698 . if \n[doc-nesting-level] \{\
3699 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3708 . ds doc-macro-name It
3710 . \" fill argument vector
3712 . while (\n[doc-reg-It] <= \n[.$]) \{\
3713 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3717 . nr doc-num-args \n[.$]
3721 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3723 . if \n[doc-reg-It] \{\
3725 . box doc-item-box\n[doc-list-depth]
3726 . ev doc-item-env\n[doc-list-depth]
3732 . ie (\n[doc-reg-It] == 1) \{\
3734 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3735 . tm1 " don't take arguments (#\n[.c])
3739 . if (\n[doc-reg-It] == 2) \{\
3740 . \" handle list types with arguments
3741 . doc-parse-arg-vector
3745 . nr doc-curr-type \n[doc-type1]
3746 . ds doc-curr-arg "\*[doc-arg1]
3748 . if \n[doc-in-files-section] \{\
3749 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3751 . ds doc-Pa-font "\*[doc-No-font]
3754 . ie (\n[doc-type1] == 1) \
3758 . doc-print-recursive
3761 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3762 . tm1 " require arguments (#\n[.c])
3766 . \" the previous call of `.doc-print-recursive' can contain calls to
3767 . \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3768 . if !\n[doc-nesting-level] \
3769 . doc-\*[doc-str-It]
3773 .\" NS doc-inset-list macro
3774 .\" NS .It item of list-type inset
3780 . \" finish item box
3784 . unformat doc-item-box\n[doc-list-depth]
3786 . doc-set-vertical-and-indent 0
3790 . doc-item-box\n[doc-list-depth]
3792 . if \n[doc-in-files-section] \
3794 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3801 .\" NS doc-hang-list macro
3802 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3805 .\" NS doc-have-space
3808 .\" NS local variables:
3813 . \" finish item box
3817 . unformat doc-item-box\n[doc-list-depth]
3819 . doc-set-vertical-and-indent 1
3820 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3821 . ti -\n[doc-reg-dhl]u
3824 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3825 . doc-item-box\n[doc-list-depth]
3827 . chop doc-item-box\n[doc-list-depth]
3828 . nr doc-reg-dhl1 \n[.k]u
3829 . nop \*[doc-item-box\n[doc-list-depth]]\c
3830 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3831 . nr doc-have-space 1
3834 . if \n[doc-in-files-section] \
3836 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3843 .\" NS doc-ohang-list macro
3844 .\" NS .It item of list-type overhanging tag
3850 . \" finish item box
3854 . unformat doc-item-box\n[doc-list-depth]
3856 . doc-set-vertical-and-indent 0
3858 . doc-item-box\n[doc-list-depth]
3861 . if \n[doc-in-files-section] \
3863 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3870 .\" NS doc-item-list macro
3871 .\" NS .It item of list-type [empty tag]
3874 . \" finish (dummy) item box
3879 . doc-set-vertical-and-indent 0
3886 .\" NS doc-enum-list-count-stackXXX global register
3887 .\" NS stack of current enum count values
3890 .\" NS doc-list-depth
3892 .nr doc-enum-list-count-stack1 0
3895 .\" NS doc-enum-list macro
3896 .\" NS enumerated list
3899 .\" NS doc-enum-list-count-stackXXX
3904 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3906 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3908 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3909 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3914 .\" NS doc-bullet-list macro
3915 .\" NS bullet paragraph list
3922 . nop \)\*[doc-Sy-font]\[bu]\f[]
3927 .\" NS doc-dash-list macro
3928 .\" NS hyphen paragraph list (sub bullet list)
3935 . nop \)\*[doc-Sy-font]\-\f[]
3940 .\" NS doc-do-list macro
3941 .\" NS .It item of list-type enum/bullet/hyphen
3943 .als doc-do-list doc-hang-list
3946 .\" NS doc-diag-list-input-line-count global register
3947 .\" NS saved line number to be checked in next diag-list item
3949 .nr doc-diag-list-input-line-count 0
3952 .\" NS doc-diag-list macro
3953 .\" NS .It item of list-type diagnostic-message
3956 .\" NS doc-curr-font
3957 .\" NS doc-curr-size
3958 .\" NS doc-diag-list-input-line-count
3961 . nr doc-curr-font \n[.f]
3962 . nr doc-curr-size \n[.ps]
3964 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3965 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3972 . nr doc-diag-list-input-line-count \n[.c]
3975 . nop \*[doc-Sy-font]\c
3976 . if \n[doc-num-args] \
3977 . doc-remaining-args
3978 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3980 . doc-print-and-reset
3984 .\" NS doc-tag-list macro
3985 .\" NS .It item of list-type `tag'
3988 .\" NS doc-have-space
3991 .\" NS local variables:
3997 . \" finish item box
4001 . unformat doc-item-box\n[doc-list-depth]
4003 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
4010 . doc-item-box\n[doc-list-depth]
4015 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4016 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4017 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4018 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
4022 . doc-set-vertical-and-indent 1
4023 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4024 . ti -\n[doc-reg-dtl]u
4027 . doc-item-box\n[doc-list-depth]
4028 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4031 . \" format the tag separately to prevent stretching of spaces
4037 . nr doc-have-space 1
4040 . if \n[doc-in-files-section] \
4042 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4049 .\" NS doc-get-tag-width macro
4050 .\" NS resolve unknown tag width (`tag' list-type only)
4053 .\" NS doc-list-indent-stackXXX
4054 .\" NS doc-tag-width-stackXXX
4058 .\" NS doc-curr-type
4060 .de doc-get-tag-width
4061 . ie (\n[doc-curr-type] == 1) \{\
4062 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4063 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4066 . ds doc-tag-width-stack\n[doc-list-depth] No
4067 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4072 .\" NS doc-set-vertical-and-indent macro
4073 .\" NS set up vertical spacing (if not compact) and indentation (with
4074 .\" NS offset if argument is non-zero)
4077 .\" NS doc-list-have-indent-stackXXX
4079 .de doc-set-vertical-and-indent
4080 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4081 . sp \n[doc-display-vertical]u
4083 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4084 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4086 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4094 .\" NS doc-list-depth global register
4095 .\" NS list type stack counter
4097 .nr doc-list-depth 0
4100 .\" NS doc-num-columns global register
4101 .\" NS number of columns
4103 .nr doc-num-columns 0
4106 .\" NS doc-compact-list-stackXXX global register (bool)
4107 .\" NS stack of flags to indicate whether a particular list is compact
4110 .\" NS doc-list-depth
4112 .nr doc-compact-list-stack1 0
4115 .\" NS doc-tag-prefix-stackXXX global string
4116 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4119 .\" NS doc-list-depth
4121 .ds doc-tag-prefix-stack1
4124 .\" NS doc-tag-width-stackXXX global string
4125 .\" NS stack of strings indicating how to set up current element of
4126 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4127 .\" NS directly; if it is a macro name, use the macro's width value;
4128 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4131 .\" NS doc-list-depth
4133 .ds doc-tag-width-stack0
4134 .ds doc-tag-width-stack1
4137 .\" NS doc-list-offset-stackXXX global register
4138 .\" NS stack of list offsets
4141 .\" NS doc-list-depth
4143 .nr doc-list-offset-stack1 0
4146 .\" NS doc-end-list macro
4147 .\" NS list end function; resets indentation (and offset if argument is
4151 .\" NS doc-list-depth
4152 .\" NS doc-list-offset-stackXXX
4156 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4158 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4160 . if (\n[doc-list-depth] <= 0) \
4161 . tm mdoc warning: extraneous .El call (#\n[.c])
4163 . doc-decrement-list-stack
4164 . nr doc-list-depth -1
4168 .\" NS doc-increment-list-stack macro
4169 .\" NS set up next block for list
4172 .\" NS doc-compact-list-stackXXX
4173 .\" NS doc-list-have-indent-stackXXX
4174 .\" NS doc-list-indent-stackXXX
4175 .\" NS doc-list-offset-stackXXX
4176 .\" NS doc-list-type-stackXXX
4177 .\" NS doc-tag-prefix-stackXXX
4178 .\" NS doc-tag-width-stackXXX
4179 .\" NS doc-enum-list-count-stackXXX
4181 .\" NS local variables:
4184 .de doc-increment-list-stack
4185 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4186 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4187 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4188 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4189 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4190 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4191 . ds doc-list-type-stack\n[doc-reg-dils]
4192 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4193 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4197 .\" NS doc-decrement-list-stack macro
4198 .\" NS decrement stack
4201 .\" NS doc-compact-list-stackXXX
4202 .\" NS doc-list-have-indent-stackXXX
4203 .\" NS doc-list-indent-stackXXX
4204 .\" NS doc-list-offset-stackXXX
4205 .\" NS doc-list-type-stackXXX
4206 .\" NS doc-tag-prefix-stackXXX
4207 .\" NS doc-tag-width-stackXXX
4208 .\" NS doc-enum-list-count-stackXXX
4210 .de doc-decrement-list-stack
4211 . ds doc-list-type-stack\n[doc-list-depth]
4212 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4213 . nr doc-list-indent-stack\n[doc-list-depth] 0
4214 . nr doc-list-offset-stack\n[doc-list-depth] 0
4215 . ds doc-tag-prefix-stack\n[doc-list-depth]
4216 . ds doc-tag-width-stack\n[doc-list-depth]
4217 . nr doc-compact-list-stack\n[doc-list-depth] 0
4218 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4222 .\" NS Xr user macro
4223 .\" NS cross reference (for man pages only)
4227 .\" NS doc-macro-name
4229 .\" NS local variables:
4232 .\" NS width register `Xr' set in doc-common
4235 . if !\n[doc-arg-limit] \{\
4237 . ds doc-macro-name Xr
4238 . doc-parse-args \$@
4244 . if !\n[doc-arg-limit] \
4248 . doc-print-prefixes
4249 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4250 . \" first argument must be a string
4251 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4252 . nr doc-curr-font \n[.f]
4253 . nr doc-curr-size \n[.ps]
4254 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4256 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4257 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4258 . \" modify second argument if it is a string and
4259 . \" remove space inbetween
4260 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4261 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4262 . ds doc-space\n[doc-arg-ptr]
4265 . doc-print-recursive
4275 .\" NS doc-Xr-usage macro
4278 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4283 .\" NS Sx user macro
4284 .\" NS cross section reference
4286 .\" NS width register `Sx' set in doc-common
4288 .als Sx doc-generic-macro
4289 .ds doc-Sx-usage section_header
4292 .\" NS doc-end-column-list macro
4293 .\" NS column-list end-list
4296 .\" NS doc-list-depth
4298 .de doc-end-column-list
4300 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4303 . doc-decrement-list-stack
4304 . nr doc-list-depth -1
4308 .\" NS doc-column-indent-width global register
4309 .\" NS holds the indent width for a column list
4311 .nr doc-column-indent-width 0
4314 .\" NS doc-set-column-tab macro
4315 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4318 .\" NS doc-column-indent-width
4320 .\" NS local variables:
4323 .\" NS doc-str-dsct1
4325 .de doc-set-column-tab
4328 . nr doc-column-indent-width 0
4331 . ds doc-str-dsct1 " \"
4334 . ds doc-str-dsct1 " \"
4336 . \" XXX: this is packed abnormally close -- intercolumn width
4337 . \" should be configurable
4338 . ds doc-str-dsct1 " \"
4341 . while (\n[doc-reg-dsct] <= \$1) \{\
4342 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4343 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4344 . nr doc-reg-dsct +1
4347 . ta \*[doc-str-dsct]
4348 ' in +\n[doc-column-indent-width]u
4352 .\" NS doc-column-list macro
4357 .\" NS doc-list-indent-stackXXX
4360 .\" NS local variables:
4364 . if \n[doc-num-args] \
4365 . doc-parse-arg-vector
4368 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4369 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4373 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4374 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4375 . ds doc-space\n[doc-reg-dcl]
4378 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4379 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4382 . in +\n[doc-column-indent-width]u
4384 . ti -\n[doc-column-indent-width]u
4386 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4390 .\" NS Ta user macro
4391 .\" NS append tab (\t)
4396 .\" NS width register `Ta' set in doc-common
4399 . ie \n[doc-arg-limit] \{\
4402 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4403 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4408 . tm1 "Usage: Ta must follow column entry: e.g.
4409 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4414 .\" NS Dl user macro
4415 .\" NS display (one line) literal
4417 .\" NS this function uses the `Li' font
4421 .\" NS doc-curr-font
4422 .\" NS doc-curr-size
4423 .\" NS doc-macro-name
4425 .\" NS width register `Dl' set in doc-common
4429 . in +\n[doc-display-indent]u
4431 . ie \n[doc-arg-limit] \{\
4432 . tm Usage: .Dl not callable by other macros (#\n[.c])
4437 . ds doc-macro-name Dl
4438 . doc-parse-args \$@
4440 . nr doc-curr-font \n[.f]
4441 . nr doc-curr-size \n[.ps]
4442 . nop \*[doc-Li-font]\c
4443 . doc-print-recursive
4446 . tm Usage: .Dl argument ... (#\n[.c])
4449 . in -\n[doc-display-indent]u
4453 .\" NS D1 user macro
4454 .\" NS display (one line)
4458 .\" NS doc-macro-name
4460 .\" NS width register `D1' set in doc-common
4464 . in +\n[doc-display-indent]u
4466 . ie \n[doc-arg-limit] \{\
4467 . tm Usage: .D1 not callable by other macros (#\n[.c])
4472 . ds doc-macro-name D1
4473 . doc-parse-args \$@
4475 . doc-print-recursive
4478 . tm Usage: .D1 argument ... (#\n[.c])
4481 . in -\n[doc-display-indent]u
4485 .\" NS Vt user macro
4486 .\" NS variable type (for forcing old style variable declarations);
4487 .\" NS this is not done in the same manner as .Ot for fortrash --
4488 .\" NS clean up later
4491 .\" NS doc-curr-font
4492 .\" NS doc-curr-size
4493 .\" NS doc-have-decl
4495 .\" NS doc-macro-name
4497 .\" NS width register `Vt' set in doc-common
4500 . if !\n[doc-arg-limit] \{\
4502 . ds doc-macro-name Vt
4503 . doc-parse-args \$@
4506 . tm Usage: .Vt variable_type ... (#\n[.c])
4509 . if !\n[doc-arg-limit] \
4513 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4514 . tm Usage: .Vt variable_type ... (#\n[.c])
4519 . if \n[doc-in-synopsis-section] \{\
4520 . \" if a function declaration was the last thing given,
4521 . \" want vertical space
4522 . if \n[doc-have-decl] \{\
4524 . nr doc-have-decl 0
4527 . \" if a subroutine was the last thing given, want vertical space
4528 . if \n[doc-have-func] \{\
4529 . ie \n[doc-have-var] \
4538 . nr doc-curr-font \n[.f]
4539 . nr doc-curr-size \n[.ps]
4540 . nop \*[doc-Ft-font]\c
4541 . doc-print-recursive
4543 . if \n[doc-in-synopsis-section] \{\
4544 . ie \n[doc-have-old-func] \
4545 . nop \*[doc-soft-space]\c
4552 .\" NS doc-is-func global register (bool)
4553 .\" NS set if subroutine (in synopsis only) (fortran only)
4558 .\" NS Ft user macro
4559 .\" NS function type
4562 .\" NS doc-curr-font
4563 .\" NS doc-curr-size
4564 .\" NS doc-have-decl
4567 .\" NS doc-macro-name
4569 .\" NS width register `Ft' set in doc-common
4572 . if !\n[doc-arg-limit] \{\
4574 . ds doc-macro-name Ft
4575 . doc-parse-args \$@
4578 . tm Usage: .Ft function_type ... (#\n[.c])
4581 . if !\n[doc-arg-limit] \
4585 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4586 . tm Usage: .Ft function_type ... (#\n[.c])
4591 . if \n[doc-in-synopsis-section] \{\
4592 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4594 . nr doc-have-decl 0
4598 . if \n[doc-have-var] \{\
4606 . nr doc-curr-font \n[.f]
4607 . nr doc-curr-size \n[.ps]
4608 . nop \*[doc-Ft-font]\c
4609 . doc-print-recursive
4613 .\" NS doc-have-old-func global register (bool)
4614 .\" NS set if `Ot' has been called
4616 .nr doc-have-old-func 0
4619 .\" NS Ot user macro
4620 .\" NS old function type (fortran -- no newline)
4623 .\" NS doc-have-decl
4624 .\" NS doc-have-old-func
4628 .\" NS width register `Ot' set in doc-common
4631 . nr doc-have-old-func 1
4633 . if \n[doc-in-synopsis-section] \{\
4634 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4636 . nr doc-have-decl 0
4640 . if \n[doc-have-var] \{\
4649 . nop \*[doc-Ft-font]\$*\c
4654 .\" NS Fa user macro
4655 .\" NS function arguments
4659 .\" NS doc-curr-font
4660 .\" NS doc-curr-size
4661 .\" NS doc-macro-name
4663 .\" NS width register `Fa' set in doc-common
4666 . if !\n[doc-arg-limit] \{\
4668 . ds doc-macro-name Fa
4669 . doc-parse-args \$@
4672 . tm Usage: .Fa function_arguments ... (#\n[.c])
4675 . ie \n[doc-func-arg-count] \
4679 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4680 . nr doc-curr-font \n[.f]
4681 . nr doc-curr-size \n[.ps]
4682 . nop \*[doc-Fa-font]\c
4683 . doc-print-recursive
4685 . if \n[doc-in-synopsis-section] \
4686 . if \n[doc-have-func] \
4692 .\" NS doc-func-arg-count global register
4693 .\" NS how many function arguments have been processed so far
4695 .nr doc-func-arg-count 0
4698 .\" NS doc-func-arg global string
4699 .\" NS work buffer for function name strings
4704 .\" NS doc-num-func-args global register
4705 .\" NS number of function arguments
4707 .nr doc-num-func-args 0
4710 .\" NS doc-func-args-processed global register
4711 .\" NS function arguments processed so far
4713 .nr doc-func-args-processed 0
4716 .\" NS doc-do-func macro
4717 .\" NS internal .Fa for .Fc
4723 .\" NS doc-func-arg-count
4724 .\" NS doc-func-args-processed
4725 .\" NS doc-num-func-args
4728 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4736 . nr doc-num-func-args 0
4737 . nr doc-func-args-processed 0
4739 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4740 . if (\n[doc-num-func-args] > 1) \
4741 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4743 . if (\n[doc-func-arg-count] > 1) \{\
4744 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4745 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4746 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4748 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4749 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4752 . if (\n[doc-func-arg-count] == 1) \{\
4753 . nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4756 . nr doc-func-arg-count +1
4761 .\" NS doc-have-func global register (bool)
4762 .\" NS whether we have more than one function in synopsis
4767 .\" NS Fn user macro
4772 .\" NS doc-curr-font
4773 .\" NS doc-curr-size
4774 .\" NS doc-have-decl
4775 .\" NS doc-have-func
4777 .\" NS doc-indent-synopsis
4779 .\" NS doc-macro-name
4781 .\" NS width register `Fn' set in doc-common
4784 . if !\n[doc-arg-limit] \{\
4786 . ds doc-macro-name Fn
4787 . doc-parse-args \$@
4790 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4793 . if !\n[doc-arg-limit] \
4796 . if \n[doc-in-synopsis-section] \{\
4797 . \" if there is/has been more than one subroutine declaration
4798 . ie \n[doc-is-func] \{\
4801 . nr doc-have-decl 0
4805 . if \n[doc-have-func] \{\
4808 . nr doc-have-decl 0
4811 . if \n[doc-have-decl] \{\
4816 . if \n[doc-have-var] \{\
4818 . nr doc-have-decl 0
4821 . nr doc-have-func 1
4825 . if !\n[doc-indent-synopsis] \
4826 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4827 . if !\n[doc-indent-synopsis-active] \
4828 . in +\n[doc-indent-synopsis]u
4829 . ti -\n[doc-indent-synopsis]u
4833 . doc-print-prefixes
4834 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4835 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4840 . nr doc-curr-font \n[.f]
4841 . nr doc-curr-size \n[.ps]
4842 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4843 . nop \f[]\s[0]\*[lp]\)\c
4846 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4847 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4848 . nop \*[doc-Fa-font]\c
4850 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4854 . if \n[doc-in-synopsis-section] \
4857 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4858 . \" output the space (if needed)
4860 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4863 . doc-print-recursive
4866 . doc-print-and-reset
4868 . if \n[doc-in-synopsis-section] \
4869 . if !\n[doc-indent-synopsis-active] \
4870 . in -\n[doc-indent-synopsis]u
4874 .\" NS doc-do-func-args macro
4875 .\" NS handle function arguments
4881 .\" NS doc-func-args-processed
4882 .\" NS doc-num-func-args
4884 .\" NS local variables:
4887 .de doc-do-func-args
4888 . if \n[doc-in-synopsis-section] \{\
4890 . nr doc-num-func-args 0
4891 . nr doc-func-args-processed 0
4893 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4894 . if (\n[doc-num-func-args] > 1) \
4895 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4898 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4901 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4902 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4903 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4904 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4905 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4906 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4908 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4914 .\" NS doc-saved-nesting-level global register
4916 .nr doc-saved-nesting-level 0
4919 .\" NS doc-in-func-enclosure global register (bool)
4921 .nr doc-in-func-enclosure 0
4924 .\" NS Fo user macro
4925 .\" NS function open
4929 .\" NS doc-curr-font
4930 .\" NS doc-curr-size
4931 .\" NS doc-func-arg-count
4932 .\" NS doc-have-decl
4933 .\" NS doc-have-func
4935 .\" NS doc-in-func-enclosure
4936 .\" NS doc-indent-synopsis
4938 .\" NS doc-macro-name
4939 .\" NS doc-saved-nesting-level
4941 .\" NS width register `Fo' set in doc-common
4944 . if (\n[doc-in-func-enclosure]) \{\
4945 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4949 . nr doc-saved-nesting-level \n[doc-nesting-level]
4950 . nr doc-in-func-enclosure 1
4952 . if !\n[doc-arg-limit] \{\
4954 . ds doc-macro-name Fo
4955 . doc-parse-args \$@
4958 . tm Usage: .Fo function_name (#\n[.c])
4961 . if \n[doc-in-synopsis-section] \{\
4962 . \" if there is/has been more than one subroutine declaration
4963 . ie \n[doc-is-func] \{\
4966 . nr doc-have-decl 0
4970 . if \n[doc-have-func] \{\
4973 . nr doc-have-decl 0
4976 . if \n[doc-have-decl] \{\
4981 . if \n[doc-have-var] \{\
4983 . nr doc-have-decl 0
4986 . nr doc-have-func 1
4990 . if !\n[doc-indent-synopsis] \
4991 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4994 . \" start function box
5002 . doc-print-prefixes
5003 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5004 . nr doc-func-arg-count 1
5005 . nr doc-curr-font \n[.f]
5006 . nr doc-curr-size \n[.ps]
5008 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
5009 . nop \f[]\s[0]\*[lp]\)\c
5015 .\" NS Fc user macro
5016 .\" NS function close
5020 .\" NS doc-func-arg-count
5021 .\" NS doc-in-func-enclosure
5022 .\" NS doc-saved-nesting-level
5023 .\" NS doc-macro-name
5025 .\" NS width register `Fc' set in doc-common
5028 . if !\n[doc-in-func-enclosure] \{\
5029 . tm mdoc warning: Extraneous .Fc (#\n[.c])
5034 . ds doc-macro-name Fc
5035 . \" the first (dummy) argument is used to get the correct spacing
5036 . doc-parse-args \) \$@
5039 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5040 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5042 . nr doc-func-arg-count 0
5043 . nr doc-in-func-enclosure 0
5045 . ie \n[doc-in-synopsis-section] \
5050 . \" finish function box
5055 . unformat doc-func-box
5057 . if \n[doc-in-synopsis-section] \{\
5058 . if !\n[doc-indent-synopsis-active] \
5059 . in +\n[doc-indent-synopsis]u
5060 . ti -\n[doc-indent-synopsis]u
5064 . nop \*[doc-func-box]\c
5067 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5068 . nr doc-curr-font \n[.f]
5069 . nr doc-curr-size \n[.ps]
5070 . doc-print-recursive
5073 . doc-print-and-reset
5075 . if \n[doc-in-synopsis-section] \
5076 . if !\n[doc-indent-synopsis-active] \
5077 . in -\n[doc-indent-synopsis]u
5081 .\" NS doc-build-func-string macro
5082 .\" NS collect function arguments and set hard spaces inbetween
5086 .\" NS doc-func-args-processed
5087 .\" NS doc-num-func-args
5089 .de doc-build-func-string
5090 . if !\n[doc-num-func-args] \{\
5091 . nr doc-num-func-args \n[.$]
5092 . nr doc-func-args-processed 0
5096 . nr doc-func-args-processed +1
5097 . as doc-func-arg "\$1
5099 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5100 . as doc-func-arg "\*[doc-hard-space]
5103 . doc-build-func-string \$@
5108 .\" Very crude references: Stash all reference info into boxes, print out
5109 .\" reference on .Re macro and clean up. Ordering very limited, no fancy
5110 .\" citations, but can do articles, journals, and books -- need to add
5111 .\" several missing options (like city etc). Should be able to grab a refer
5112 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5116 .\" NS doc-is-reference global register (bool)
5117 .\" NS set if in reference
5119 .nr doc-is-reference 0
5122 .\" NS doc-reference-count global register
5123 .\" NS reference element counter
5125 .nr doc-reference-count 0
5128 .\" NS Rs user macro
5129 .\" NS reference start
5132 .\" NS doc-is-reference
5133 .\" NS doc-reference-count
5135 .\" NS width register `Rs' set in doc-common
5139 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5141 . nr doc-is-reference 1
5142 . doc-reset-reference
5143 . if \n[doc-in-see-also-section] \
5145 . nr doc-reference-count 0
5150 .\" NS Re user macro
5151 .\" NS reference end
5154 .\" NS doc-is-reference
5156 .\" NS width register `Re' set in doc-common
5160 . tm Usage: .Re (does not take arguments) (#\n[.c])
5162 . if !\n[doc-is-reference] \{\
5163 . tm mdoc warning: Extraneous .Re (#\n[.c])
5166 . doc-print-reference
5167 . doc-reset-reference
5168 . nr doc-is-reference 0
5173 .\" NS doc-reset-reference macro
5174 .\" NS reference cleanup
5177 .\" NS doc-author-count
5178 .\" NS doc-author-nameXXX
5179 .\" NS doc-book-count
5180 .\" NS doc-book-name
5181 .\" NS doc-corporate-count
5182 .\" NS doc-corporate-name
5184 .\" NS doc-date-count
5185 .\" NS doc-issue-count
5186 .\" NS doc-issue-name
5187 .\" NS doc-journal-count
5188 .\" NS doc-journal-name
5189 .\" NS doc-optional-count
5190 .\" NS doc-optional-string
5191 .\" NS doc-page-number-count
5192 .\" NS doc-page-number-string
5193 .\" NS doc-publisher-count
5194 .\" NS doc-publisher-name
5195 .\" NS doc-reference-count
5196 .\" NS doc-reference-title-count
5197 .\" NS doc-reference-title-name
5198 .\" NS doc-reference-title-name-for-book
5199 .\" NS doc-report-count
5200 .\" NS doc-report-name
5201 .\" NS doc-url-count
5203 .\" NS doc-volume-count
5204 .\" NS doc-volume-name
5206 .de doc-reset-reference
5207 . while (\n[doc-author-count]) \{\
5208 . ds doc-author-name\n[doc-author-count]
5209 . nr doc-author-count -1
5211 . nr doc-journal-count 0
5212 . nr doc-issue-count 0
5213 . nr doc-optional-count 0
5214 . nr doc-corporate-count 0
5215 . nr doc-report-count 0
5216 . nr doc-reference-title-count 0
5217 . nr doc-url-count 0
5218 . nr doc-volume-count 0
5219 . nr doc-date-count 0
5220 . nr doc-page-number-count 0
5221 . nr doc-book-count 0
5222 . nr doc-publisher-count 0
5223 . nr doc-reference-count 0
5225 . ds doc-journal-name
5227 . ds doc-optional-string
5228 . ds doc-corporate-name
5229 . ds doc-report-name
5230 . ds doc-reference-title-name
5231 . ds doc-reference-title-name-for-book
5232 . ds doc-volume-name
5234 . ds doc-page-number-string
5236 . ds doc-publisher-name
5240 .\" NS doc-finish-reference macro
5241 .\" NS auxiliary macro for doc-print-reference
5244 .\" NS doc-reference-count
5246 .de doc-finish-reference
5247 . nr doc-reference-count -\$1
5248 . ie \n[doc-reference-count] \
5255 .\" NS doc-print-reference macro
5256 .\" NS reference print
5259 .\" NS doc-reference-count
5261 .de doc-print-reference
5265 . if \n[doc-author-count] \{\
5266 . doc-print-reference-authors
5267 . nr doc-reference-count -\n[doc-author-count]
5270 . if \n[doc-reference-title-count] \{\
5271 . unformat doc-reference-title-name
5272 . chop doc-reference-title-name
5273 . unformat doc-reference-title-name-for-book
5274 . chop doc-reference-title-name-for-book
5275 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5276 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5277 . doc-finish-reference \n[doc-reference-title-count]
5280 . nop \*[doc-reference-title-name]\c
5281 . doc-finish-reference \n[doc-reference-title-count]
5284 . if \n[doc-book-count] \{\
5285 . unformat doc-book-name
5286 . chop doc-book-name
5287 . nop \*[doc-book-name]\c
5288 . doc-finish-reference \n[doc-book-count]
5291 . if \n[doc-publisher-count] \{\
5292 . unformat doc-publisher-name
5293 . chop doc-publisher-name
5294 . nop \*[doc-publisher-name]\c
5295 . doc-finish-reference \n[doc-publisher-count]
5298 . if \n[doc-journal-count] \{\
5299 . unformat doc-journal-name
5300 . chop doc-journal-name
5301 . nop \*[doc-journal-name]\c
5302 . doc-finish-reference \n[doc-journal-count]
5305 . if \n[doc-report-count] \{\
5306 . unformat doc-report-name
5307 . chop doc-report-name
5308 . nop \*[doc-report-name]\c
5309 . doc-finish-reference \n[doc-report-count]
5312 . if \n[doc-issue-count] \{\
5313 . unformat doc-issue-name
5314 . chop doc-issue-name
5315 . nop \*[doc-issue-name]\c
5316 . doc-finish-reference \n[doc-issue-count]
5319 . if \n[doc-volume-count] \{\
5320 . unformat doc-volume-name
5321 . chop doc-volume-name
5322 . nop \*[doc-volume-name]\c
5323 . doc-finish-reference \n[doc-volume-count]
5326 . if \n[doc-url-count] \{\
5327 . unformat doc-url-name
5329 . nop \*[doc-url-name]\c
5330 . doc-finish-reference \n[doc-url-count]
5333 . if \n[doc-page-number-count] \{\
5334 . unformat doc-page-number-string
5335 . chop doc-page-number-string
5336 . nop \*[doc-page-number-string]\c
5337 . doc-finish-reference \n[doc-page-number-count]
5340 . if \n[doc-corporate-count] \{\
5341 . unformat doc-corporate-name
5342 . chop doc-corporate-name
5343 . nop \*[doc-corporate-name]\c
5344 . doc-finish-reference \n[doc-corporate-count]
5347 . if \n[doc-date-count] \{\
5350 . nop \*[doc-date]\c
5351 . doc-finish-reference \n[doc-date-count]
5354 . if \n[doc-optional-count] \{\
5355 . unformat doc-optional-string
5356 . chop doc-optional-string
5357 . nop \*[doc-optional-string]\c
5358 . doc-finish-reference \n[doc-optional-count]
5361 . if \n[doc-reference-count] \
5362 . tm mdoc warning: unresolved reference problem
5364 . hy \n[doc-hyphen-flags]
5368 .\" NS doc-print-reference-authors macro
5369 .\" NS print out reference authors
5371 .\" NS local variables:
5375 .ds doc-str-dpra "and
5377 .de doc-print-reference-authors
5380 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5381 . unformat doc-author-name\n[doc-reg-dpra]
5382 . chop doc-author-name\n[doc-reg-dpra]
5383 . ie (\n[doc-author-count] > 2) \
5384 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5386 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5387 . nr doc-reg-dpra +1
5390 . unformat doc-author-name\n[doc-reg-dpra]
5391 . chop doc-author-name\n[doc-reg-dpra]
5392 . if (\n[doc-author-count] > 1) \
5393 . nop \)\*[doc-str-dpra]
5394 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5398 .\" NS doc-author-count global register
5399 .\" NS counter of author references
5401 .nr doc-author-count 0
5404 .\" NS doc-author-nameXXX global box
5405 .\" NS array of author names
5408 .\" NS doc-author-count
5410 .ds doc-author-name0
5413 .\" NS %A user macro
5414 .\" NS reference author(s)
5418 .\" NS doc-author-count
5419 .\" NS doc-curr-font
5420 .\" NS doc-curr-size
5421 .\" NS doc-macro-name
5422 .\" NS doc-reference-count
5424 .\" NS local variables:
5427 .\" NS width register `%A' set in doc-common
5430 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5431 . tm Usage: .%A author_name ... (#\n[.c])
5435 . nr doc-author-count +1
5436 . nr doc-reference-count +1
5438 . ds doc-macro-name %A
5439 . doc-parse-args \$@
5442 . nr doc-curr-font \n[.f]
5443 . nr doc-curr-size \n[.ps]
5445 . \" save to reference box
5446 . box doc-author-name\n[doc-author-count]
5455 .\" NS doc-book-count global register
5456 .\" NS counter of book references
5458 .nr doc-book-count 0
5461 .\" NS doc-book-name global box
5462 .\" NS string of collected book references
5467 .\" NS %B user macro
5468 .\" NS [reference] book name
5472 .\" NS doc-book-count
5473 .\" NS doc-curr-font
5474 .\" NS doc-curr-size
5475 .\" NS doc-macro-name
5476 .\" NS doc-reference-count
5478 .\" NS local variables:
5481 .\" NS width register `%B' set in doc-common
5484 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5485 . tm Usage: .%B book_name ... (#\n[.c])
5489 . if \n[doc-is-reference] \{\
5490 . nr doc-book-count +1
5491 . nr doc-reference-count +1
5494 . ds doc-macro-name %B
5495 . doc-parse-args \$@
5498 . nr doc-curr-font \n[.f]
5499 . nr doc-curr-size \n[.ps]
5501 . ie \n[doc-is-reference] \{\
5502 . \" append to reference box
5503 . boxa doc-book-name
5508 . nop \*[doc-Em-font]\c
5512 . nop \*[doc-Em-font]\c
5513 . doc-print-recursive
5518 .\" NS doc-date-count global register
5519 .\" NS counter of date references
5521 .nr doc-date-count 0
5524 .\" NS doc-date global box
5525 .\" NS string of collected date references
5530 .\" NS %D user macro
5531 .\" NS [reference] date
5535 .\" NS doc-curr-font
5536 .\" NS doc-curr-size
5537 .\" NS doc-date-count
5538 .\" NS doc-macro-name
5539 .\" NS doc-reference-count
5541 .\" NS local variables:
5544 .\" NS width register `%D' set in doc-common
5547 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5548 . tm Usage: .%D date ... (#\n[.c])
5552 . nr doc-date-count +1
5553 . nr doc-reference-count +1
5555 . ds doc-macro-name %D
5556 . doc-parse-args \$@
5559 . nr doc-curr-font \n[.f]
5560 . nr doc-curr-size \n[.ps]
5562 . \" append to reference box
5572 .\" NS doc-publisher-count global register
5573 .\" NS counter of publisher references
5575 .nr doc-publisher-count 0
5578 .\" NS doc-publisher-name global box
5579 .\" NS string of collected publisher references
5581 .ds doc-publisher-name
5584 .\" NS %I user macro
5585 .\" NS [reference] issuer/publisher name
5589 .\" NS doc-curr-font
5590 .\" NS doc-curr-size
5591 .\" NS doc-macro-name
5592 .\" NS doc-publisher-count
5593 .\" NS doc-reference-count
5595 .\" NS local variables:
5598 .\" NS width register `%I' set in doc-common
5601 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5602 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5606 . nr doc-publisher-count +1
5607 . nr doc-reference-count +1
5609 . ds doc-macro-name %I
5610 . doc-parse-args \$@
5613 . nr doc-curr-font \n[.f]
5614 . nr doc-curr-size \n[.ps]
5616 . \" append to reference box
5617 . boxa doc-publisher-name
5622 . nop \*[doc-Em-font]\c
5627 .\" NS doc-journal-count global register
5628 .\" NS counter of journal references
5630 .nr doc-journal-count 0
5633 .\" NS doc-journal-name global box
5634 .\" NS string of collected journal references
5636 .ds doc-journal-name
5639 .\" NS %J user macro
5640 .\" NS [reference] Journal Name
5644 .\" NS doc-curr-font
5645 .\" NS doc-curr-size
5646 .\" NS doc-journal-count
5647 .\" NS doc-macro-name
5648 .\" NS doc-reference-count
5650 .\" NS local variables:
5653 .\" NS width register `%J' set in doc-common
5656 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5657 . tm Usage: .%J journal_name ... (#\n[.c])
5661 . nr doc-journal-count +1
5662 . nr doc-reference-count +1
5664 . ds doc-macro-name %J
5665 . doc-parse-args \$@
5668 . nr doc-curr-font \n[.f]
5669 . nr doc-curr-size \n[.ps]
5671 . \" append to reference box
5672 . boxa doc-journal-name
5677 . nop \*[doc-Em-font]\c
5682 .\" NS doc-issue-count global register
5683 .\" NS counter of issue number references
5685 .nr doc-issue-count 0
5688 .\" NS doc-issue-name global box
5689 .\" NS string of collected issue number references
5694 .\" NS %N user macro
5695 .\" NS [reference] issue number
5699 .\" NS doc-curr-font
5700 .\" NS doc-curr-size
5701 .\" NS doc-issue-count
5702 .\" NS doc-macro-name
5703 .\" NS doc-reference-count
5705 .\" NS local variables:
5708 .\" NS width register `%N' set in doc-common
5711 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5712 . tm Usage: .%N issue_number ... (#\n[.c])
5716 . nr doc-issue-count +1
5717 . nr doc-reference-count +1
5719 . ds doc-macro-name %N
5720 . doc-parse-args \$@
5723 . nr doc-curr-font \n[.f]
5724 . nr doc-curr-size \n[.ps]
5726 . \" append to reference box
5727 . boxa doc-issue-name
5736 .\" NS doc-optional-count global register
5737 .\" NS counter of optional information references
5739 .nr doc-optional-count 0
5742 .\" NS doc-optional-string global box
5743 .\" NS string of collected optional information references
5745 .ds doc-optional-string
5748 .\" NS %O user macro
5749 .\" NS [reference] optional information
5753 .\" NS doc-curr-font
5754 .\" NS doc-curr-size
5755 .\" NS doc-macro-name
5756 .\" NS doc-optional-count
5757 .\" NS doc-reference-count
5759 .\" NS local variables:
5762 .\" NS width register `%O' set in doc-common
5765 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5766 . tm Usage: .%O optional_information ... (#\n[.c])
5770 . nr doc-optional-count +1
5771 . nr doc-reference-count +1
5773 . ds doc-macro-name %O
5774 . doc-parse-args \$@
5777 . nr doc-curr-font \n[.f]
5778 . nr doc-curr-size \n[.ps]
5780 . \" append to reference box
5781 . boxa doc-optional-string
5790 .\" NS doc-page-number-count global register
5791 .\" NS counter of page number references
5793 .nr doc-page-number-count 0
5796 .\" NS doc-page-number-string global box
5797 .\" NS string of collected page number references
5799 .ds doc-page-number-string
5802 .\" NS %P user macro
5803 .\" NS [reference] page numbers
5807 .\" NS doc-curr-font
5808 .\" NS doc-curr-size
5809 .\" NS doc-macro-name
5810 .\" NS doc-page-number-count
5811 .\" NS doc-reference-count
5813 .\" NS local variables:
5816 .\" NS width register `%P' set in doc-common
5819 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5820 . tm Usage: .%P page_number ... (#\n[.c])
5824 . nr doc-page-number-count +1
5825 . nr doc-reference-count +1
5827 . ds doc-macro-name %P
5828 . doc-parse-args \$@
5831 . nr doc-curr-font \n[.f]
5832 . nr doc-curr-size \n[.ps]
5834 . \" append to reference box
5835 . boxa doc-page-number-string
5844 .\" NS doc-corporate-count global register
5845 .\" NS counter of corporate references
5847 .nr doc-corporate-count 0
5850 .\" NS doc-corporate-name global box
5851 .\" NS string of collected corporate references
5853 .ds doc-corporate-name
5856 .\" NS %Q user macro
5857 .\" NS corporate or foreign author
5861 .\" NS doc-corporate-count
5862 .\" NS doc-curr-font
5863 .\" NS doc-curr-size
5864 .\" NS doc-macro-name
5865 .\" NS doc-reference-count
5867 .\" NS local variables:
5870 .\" NS width register `%Q' set in doc-common
5873 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5874 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5878 . nr doc-corporate-count +1
5879 . nr doc-reference-count +1
5881 . ds doc-macro-name %Q
5882 . doc-parse-args \$@
5885 . nr doc-curr-font \n[.f]
5886 . nr doc-curr-size \n[.ps]
5888 . \" append to reference box
5889 . boxa doc-corporate-name
5898 .\" NS doc-report-count global register
5899 .\" NS counter of report references
5901 .nr doc-report-count 0
5904 .\" NS doc-report-name global box
5905 .\" NS string of collected report references
5910 .\" NS %R user macro
5911 .\" NS [reference] report name
5915 .\" NS doc-curr-font
5916 .\" NS doc-curr-size
5917 .\" NS doc-macro-name
5918 .\" NS doc-reference-count
5919 .\" NS doc-report-count
5921 .\" NS local variables:
5924 .\" NS width register `%R' set in doc-common
5927 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5928 . tm Usage: .%R reference_report ... (#\n[.c])
5932 . nr doc-report-count +1
5933 . nr doc-reference-count +1
5935 . ds doc-macro-name %R
5936 . doc-parse-args \$@
5939 . nr doc-curr-font \n[.f]
5940 . nr doc-curr-size \n[.ps]
5942 . \" append to reference box
5943 . boxa doc-report-name
5952 .\" NS doc-reference-title-count global register
5953 .\" NS counter of reference title references
5955 .nr doc-reference-title-count 0
5958 .\" NS doc-reference-title-name global box
5959 .\" NS string of collected reference title references
5961 .ds doc-reference-title-name
5964 .\" NS doc-reference-title-name-for-book global box
5965 .\" NS string of collected reference title references
5966 .\" NS (saved with another font; this is a shortcoming of groff)
5968 .ds doc-reference-title-name-for-book
5971 .\" NS %T user macro
5972 .\" NS reference title
5976 .\" NS doc-curr-font
5977 .\" NS doc-curr-size
5978 .\" NS doc-macro-name
5979 .\" NS doc-reference-title-count
5980 .\" NS doc-report-count
5982 .\" NS local variables:
5985 .\" NS width register `%T' set in doc-common
5988 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5989 . tm Usage: .%T reference_title ... (#\n[.c])
5993 . if \n[doc-is-reference] \{\
5994 . nr doc-reference-title-count +1
5995 . nr doc-reference-count +1
5998 . ds doc-macro-name %T
5999 . doc-parse-args \$@
6002 . nr doc-curr-font \n[.f]
6003 . nr doc-curr-size \n[.ps]
6004 . ie \n[doc-is-reference] \{\
6005 . \" append to reference box
6006 . boxa doc-reference-title-name-for-book
6011 . nop \*[doc-No-font]\c
6014 . \" do it a second time with another font
6015 . ds doc-macro-name %T
6016 . doc-parse-args \$@
6019 . nr doc-curr-font \n[.f]
6020 . nr doc-curr-size \n[.ps]
6021 . boxa doc-reference-title-name
6026 . nop \*[doc-Em-font]\c
6030 . nop \*[doc-Em-font]\c
6031 . doc-print-recursive
6036 .\" NS doc-url-count global register
6037 .\" NS counter of hypertext references
6042 .\" NS doc-volume-count global register
6043 .\" NS counter of reference title references
6045 .nr doc-volume-count 0
6048 .\" NS doc-volume-name global box
6049 .\" NS string of collected volume references
6054 .\" NS %U user macro
6055 .\" NS hypertext reference
6059 .\" NS doc-curr-font
6060 .\" NS doc-curr-size
6061 .\" NS doc-macro-name
6062 .\" NS doc-reference-count
6063 .\" NS doc-url-count
6065 .\" NS local variables:
6068 .\" NS width register `%U' set in doc-common
6071 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6072 . tm Usage: .%U URL ... (#\n[.c])
6076 . nr doc-url-count +1
6077 . nr doc-reference-count +1
6079 . ds doc-macro-name %U
6080 . doc-parse-args \$@
6083 . nr doc-curr-font \n[.f]
6084 . nr doc-curr-size \n[.ps]
6086 . \" append to reference box
6096 .\" NS %V user macro
6097 .\" NS reference volume
6101 .\" NS doc-curr-font
6102 .\" NS doc-curr-size
6103 .\" NS doc-macro-name
6104 .\" NS doc-reference-count
6105 .\" NS doc-volume-count
6107 .\" NS local variables:
6110 .\" NS width register `%V' set in doc-common
6113 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6114 . tm Usage: .%V volume ... (#\n[.c])
6118 . nr doc-volume-count +1
6119 . nr doc-reference-count +1
6121 . ds doc-macro-name %V
6122 . doc-parse-args \$@
6125 . nr doc-curr-font \n[.f]
6126 . nr doc-curr-size \n[.ps]
6128 . \" append to reference box
6129 . boxa doc-volume-name
6138 .\" NS doc-do-references macro
6139 .\" NS reference recursion routine
6144 .\" NS local variables:
6148 .de doc-do-references
6149 . if !\n[doc-is-reference] \
6150 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6152 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6154 . ie (\n[doc-reg-ddr1] == 1) \{\
6155 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6156 . doc-append-arg \c 3
6157 . \*[doc-arg\n[doc-arg-ptr]]
6160 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6162 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6163 . \" finish reference box
6171 . nr doc-reg-ddr \n[doc-arg-ptr]
6173 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6179 .\" NS Hf user macro
6180 .\" NS source include header files.
6183 .\" NS doc-curr-font
6184 .\" NS doc-curr-size
6186 .\" NS width register `Hf' set in doc-common
6189 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6201 . Usage: .Hf file (#\n[.c])
6205 .\" NS doc-have-author global register (bool)
6208 .nr doc-have-author 0
6211 .\" NS An user macro
6216 .\" NS doc-curr-font
6217 .\" NS doc-curr-size
6218 .\" NS doc-have-author
6219 .\" NS doc-macro-name
6221 .\" NS width register `An' set in doc-common
6224 . if !\n[doc-arg-limit] \{\
6226 . ie "\$1"-nosplit" \
6227 . nr doc-in-authors-section 0
6228 . el \{ .ie "\$1"-split" \
6229 . nr doc-in-authors-section 1
6231 . ds doc-macro-name An
6232 . doc-parse-args \$@
6235 . tm1 "Usage: .An {-nosplit | -split}
6236 . tm1 " .An author_name ... (#\n[.c])
6239 . if \n[doc-in-authors-section] \{\
6240 . ie \n[doc-have-author] \
6243 . nr doc-have-author 1
6246 . if \n[doc-arg-limit] \{\
6248 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6249 . nr doc-curr-font \n[.f]
6250 . nr doc-curr-size \n[.ps]
6251 . doc-print-recursive
6254 . tm Usage: .An author_name ... (#\n[.c])
6260 .\" NS Rv user macro
6261 .\" NS return values
6263 .\" NS width register `Rv' set in doc-common
6265 .\" NS local variables:
6266 .\" NS doc-str-Rv-std-prefix
6267 .\" NS doc-str-Rv-std-suffix
6268 .\" NS doc-str-Rv-stds-prefix
6269 .\" NS doc-str-Rv-stds-and
6270 .\" NS doc-str-Rv-stds-suffix
6271 .\" NS doc-str-Rv-std0
6273 .ds doc-str-Rv-std-prefix "The
6274 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6275 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6276 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6277 .as doc-str-Rv-std-suffix " is set to indicate the error.
6279 .ds doc-str-Rv-stds-prefix "The
6280 .ds doc-str-Rv-stds-and "and
6281 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6282 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6283 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6284 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6286 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6287 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6288 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6289 .as doc-str-Rv-std0 " is set to indicate the error.
6293 .\" XXX: what does this function without `-std'?
6295 . if \n[doc-arg-limit] \{\
6296 . tm Usage: .Rv not callable by other macros (#\n[.c])
6302 . tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6307 . nr doc-reg-Rv \*[doc-section]
6308 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6309 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6312 . ie (\n[.$] > 1) \{\
6313 . nop \)\*[doc-str-Rv-stds-prefix]
6315 . while (\n[doc-reg-Rv] < \n[.$]) \{\
6317 . Fn \$\n[doc-reg-Rv] ,
6319 . Fn \$\n[doc-reg-Rv]
6322 . nop \)\*[doc-str-Rv-stds-and]
6324 . nop \)\*[doc-str-Rv-stds-suffix]
6326 . el \{ .ie (\n[.$] == 1) \{\
6327 . nop \)\*[doc-str-Rv-std-prefix]
6329 . nop \)\*[doc-str-Rv-std-suffix]
6332 . nop \)\*[doc-str-Rv-std0]
6337 .\" NS Ex user macro
6340 .\" NS width register `Ex' set in doc-common
6342 .\" NS local variables:
6343 .\" NS doc-str-Ex-std-prefix
6344 .\" NS doc-str-Ex-std-suffix
6346 .ds doc-str-Ex-std-prefix "The
6347 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6348 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6350 .ds doc-str-Ex-stds-prefix "The
6351 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6352 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6353 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6357 .\" XXX: what does this function without `-std'?
6359 . if \n[doc-arg-limit] \{\
6360 . tm Usage: .Ex not callable by other macros (#\n[.c])
6366 . tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6371 . nr doc-reg-Ex \*[doc-section]
6372 . if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6373 . tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6376 . ie (\n[.$] > 1) \{\
6377 . nop \)\*[doc-str-Ex-stds-prefix]
6379 . while (\n[doc-reg-Ex] < \n[.$]) \{\
6381 . Nm \$\n[doc-reg-Ex] ,
6383 . Nm \$\n[doc-reg-Ex]
6386 . nop \)\*[doc-str-Ex-stds-and]
6388 . nop \)\*[doc-str-Ex-stds-suffix]
6391 . nop \)\*[doc-str-Ex-std-prefix]
6393 . nop \)\*[doc-str-Ex-std-suffix]
6398 .\" NS Mt user macro
6399 .\" NS mailto (for conversion to HTML)
6402 . \" XXX: error handling missing
6407 .\" NS Lk user macro
6408 .\" NS link (for conversion to HTML)
6410 .\" NS local variables:
6415 . ds doc-str-Lk Sy \$@
6417 . ie (\n[.$] > 1) \{\
6418 . doc-get-arg-type \$2
6419 . ie (\n[doc-arg-type] < 3) \{\
6421 . ds doc-str-Lk Sy "\$1"
6422 . doc-get-width "\$1"
6425 . as doc-str-Lk " \$@
6428 . doc-get-width "\$1"
6431 . doc-get-width "\$1"
6437 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6444 .\" NS doc-defunct-macro macro
6445 .\" NS this is the skeleton for defunct macros
6448 .de doc-defunct-macro
6449 . tmc mdoc error: .\$0 defunct
6450 . if d doc-\$0-usage \
6451 . tmc , \*[doc-\$0-usage]
6458 .als Db doc-defunct-macro
6460 .als Ds doc-defunct-macro
6462 .als Or doc-defunct-macro
6463 .ds doc-Or-usage use `|'
6465 .als Sf doc-defunct-macro
6466 .ds doc-Sf-usage use .Pf or .Ns
6472 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6473 . tm1 " Should this have been `.Em ...'?
6478 .\" NS doc-empty-line macro
6479 .\" NS emit warning and print empty line
6482 . if !\n[doc-display-depth] \
6483 . tm mdoc warning: Empty input line #\n[.c]
6493 .\" load local modifications