1 .\" Copyright (c) 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc 5.8 (Berkeley) 8/5/91
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
41 .\" Werner LEMBERG <wl@gnu.org> and
42 .\" Ruslan Ermilov <ru@freebsd.org>
44 .\" to make it more readable: using long names and many groff features,
45 .\" updating and extending documentation, etc.
51 . ab This version of mdoc can be run with GNU troff only!
57 .if ((\n[.x] == 0) : ((\n[.x] == 1) & (\n[.y] < 17))) \
58 . ab You need GNU troff version 1.17 or higher to run this version of mdoc!
61 .\" Load start-up files
63 . mso mdoc/doc-ditroff.new
65 . mso mdoc/doc-nroff.new
67 .mso mdoc/doc-common.new
68 .mso mdoc/doc-syms.new
74 .\" NS doc-inline-debug user register (bool)
75 .\" NS inline debug mode (inline if 1, to stderr if 0 (default))
77 .if !r doc-inline-debug .nr doc-inline-debug 0
80 .\" NS doc-debug global register (bool)
81 .\" NS debug mode (1 if active, 0 otherwise (default))
87 .\" NS start/stop debug mode (`.Db'/`.Db on'/`.Db off')
89 .\" NS without argument, toggle debug status
106 . tm Usage: .Db [on | off] (#\n[.c])
109 . ie \n[doc-debug] \{\
120 .\" NS doc-macro-name global string
121 .\" NS name of calling request (set in each user-requestable macro)
124 .als doc-arg0 doc-macro-name
127 .\" NS doc-arg-limit global register
128 .\" NS total number of arguments
133 .\" NS doc-num-args global register
134 .\" NS number of arguments to handle (must be set to \n[.$] prior to
135 .\" NS `doc-parse-arg-vector' request)
140 .\" NS doc-arg-ptr global register
141 .\" NS argument pointer
146 .\" NS doc-argXXX global string
147 .\" NS argument vector
155 .\" NS doc-typeXXX global register
156 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
157 .\" NS punctuation prefix=4)
165 .\" NS doc-spaceXXX global string
174 .\" NS doc-parse-args macro
175 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
184 .\" NS doc-have-space
186 .\" NS local variables:
192 . if !\n[doc-arg-limit] \
196 . nr doc-arg-limit +1
198 . \" handle `|' specially
200 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
202 . ds doc-arg\n[doc-arg-limit] "\$1
204 . \" get argument type and set spacing
205 . doc-get-arg-type* \n[doc-arg-limit]
206 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
207 . doc-set-spacing-\n[doc-arg-type]
209 . if \n[doc-debug] \{\
210 . ie (\n[doc-arg-type] == 1) \
211 . ds doc-str-dpa macro
213 . ie (\n[doc-arg-type] == 2) \
214 . ds doc-str-dpa string
216 . ie (\n[doc-arg-type] == 3) \
217 . ds doc-str-dpa closing punctuation or suffix
219 . ds doc-str-dpa opening punctuation or prefix
222 . ie \n[doc-inline-debug] \{\
224 . nr doc-reg-dpa \n[.i]u
225 . in -\n[doc-reg-dpa]u
227 . if (\n[doc-arg-limit] == 1) \{\
228 . nop \f[B]DEBUG(doc-parse-args) MACRO:\f[P] `.\*[doc-macro-name]'
229 . nop \) \f[B]Line #:\f[P] \n[.c]
231 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
232 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
233 . nop \ \f[B]Length:\f[P] \n[doc-width]
234 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
235 . nop \ \f[B]Type:\f[P] \*[doc-str-dpa]
238 . if (\n[doc-arg-limit] == 1) \{\
239 . tmc "DEBUG (doc-parse-args)
240 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
242 . tmc " Argc: \n[doc-arg-limit]
243 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
244 . tm1 " Length: \n[doc-width]
245 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
246 . tm1 " Type: \*[doc-str-dpa]
249 . \" check whether we have processed the last parameter
250 . ie (\n[.$] == 1) \{\
253 . if \n[doc-debug] \{\
256 . ie \n[doc-inline-debug] \{\
257 . nop MACRO REQUEST: \t.\*[doc-macro-name]
258 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
259 . nop "\*[doc-arg\n[doc-reg-dpa1]]"
263 . in \n[doc-reg-dpa]u
266 . tmc " MACRO REQUEST: .\*[doc-macro-name]
267 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
268 . tmc " "\*[doc-arg\n[doc-reg-dpa1]]"
278 . \" disable hyphenation only if we have arguments
282 . nr doc-have-space 0
286 .\" NS doc-parse-arg-vector macro
287 .\" NS parse argument vector (recursive)
289 .\" NS cf. comments in doc-parse-args
299 .\" NS local variables:
304 .de doc-parse-arg-vector
305 . if !\n[doc-arg-limit] \
308 . nr doc-arg-limit +1
310 . if "\*[doc-arg\n[doc-arg-limit]]"|" \
311 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
313 . doc-get-arg-type* \n[doc-arg-limit]
314 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
315 . doc-set-spacing-\n[doc-arg-type]
317 . if \n[doc-debug] \{\
318 . ie (\n[doc-arg-type] == 1) \
319 . ds doc-str-dpav macro
321 . ie (\n[doc-arg-type] == 2) \
322 . ds doc-str-dpav string
324 . ie (\n[doc-arg-type] == 3) \
325 . ds doc-str-dpav closing punctuation or suffix
327 . ds doc-str-dpav opening punctuation or prefix
330 . ie \n[doc-inline-debug] \{\
332 . nr doc-reg-dpav \n[.i]u
333 . in -\n[doc-reg-dpav]u
335 . if (\n[doc-arg-limit] == 1) \{\
336 . nop \f[B]DEBUG(doc-parse-arg-vector)
337 . nop MACRO:\f[P] `.\*[doc-macro-name]'
338 . nop \) \f[B]Line #:\f[P] \n[.c]
340 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
341 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
342 . nop \ \f[B]Length:\f[P] \n[doc-width]
343 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
344 . nop \ \f[B]Type:\f[P] \*[doc-str-dpav]
347 . if (\n[doc-arg-limit] == 1) \{\
348 . tmc "DEBUG(doc-parse-arg-vector)
349 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
351 . tmc " Argc: \n[doc-arg-limit]
352 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
353 . tm1 " Length: \n[doc-width]
354 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
355 . tm1 " Type: \*[doc-str-dpav]
358 . ie (\n[doc-num-args] == 1) \{\
363 . if \n[doc-debug] \{\
366 . ie \n[doc-inline-debug] \{\
367 . nop \tMACRO REQUEST: .\*[doc-macro-name]
368 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
369 . nop "\*[doc-arg\n[doc-reg-dpav1]]"
370 . nr doc-reg-dpav1 +1
373 . in \n[doc-reg-dpav]u
376 . tmc " MACRO REQUEST: .\*[doc-macro-name]
377 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
378 . tmc " "\*[doc-arg\n[doc-reg-dpav1]]"
379 . nr doc-reg-dpav1 +1
385 . doc-parse-arg-vector
392 .\" NS doc-parse-space-vector macro
393 .\" NS parse space vector (recursive)
400 .de doc-parse-space-vector
401 . nr doc-arg-limit +1
403 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
405 . ie (\n[doc-num-args] == 1) \
409 . doc-parse-space-vector
414 .\" NS doc-remaining-args macro
415 .\" NS output remaining arguments as-is, separated by spaces (until
416 .\" NS `doc-num-args' is exhausted)
422 .de doc-remaining-args
424 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
426 . ie (\n[doc-num-args] == 1) \{\
431 . nop \)\*[doc-space]\c
438 .\" NS doc-append-arg macro
439 .\" NS append one argument to argument vector:
440 .\" NS `.doc-append-arg [arg] [type]'
448 . nr doc-arg-limit +1
449 . ds doc-arg\n[doc-arg-limit] "\$1
450 . nr doc-type\n[doc-arg-limit] \$2
451 . doc-set-spacing-\$2
455 .\" NS doc-print-and-reset macro
456 .\" NS finish input line and clean up argument vectors
458 .de doc-print-and-reset
459 . if \n[doc-space-mode] \
465 .\" NS doc-reset-args macro
466 .\" NS reset argument counters
478 . hy \n[doc-hyphen-flags]
484 .\" NS doc-curr-font global register
485 .\" NS saved current font
487 .nr doc-curr-font \n[.f]
490 .\" NS doc-curr-size global register
491 .\" NS saved current font size
493 .nr doc-curr-size \n[.ps]
499 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
505 .\" NS doc-macro-name
507 .\" NS local variables:
508 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
510 .\" NS width register `Fl' set in doc-common
513 . nr doc-curr-font \n[.f]
514 . nr doc-curr-size \n[.ps]
515 . nop \*[doc-Fl-font]\c
517 . if !\n[doc-arg-limit] \{\
518 . ds doc-macro-name Fl
523 . nop \|\-\|\f[P]\s[0]
526 . if \n[doc-arg-limit] \{\
528 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
530 . nop \|\-\f[P]\s[0]\c
531 . doc-print-and-reset
534 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
535 . nop \|\-\f[P]\s[0]\c
536 . \*[doc-arg\n[doc-arg-ptr]]
539 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
548 .\" NS doc-flag-recursion macro
549 .\" NS `Fl' flag recursion routine (special handling)
554 .\" NS local variables:
559 .de doc-flag-recursion
560 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
561 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
563 . ie (\n[doc-reg-dfr1] == 1) \{\
568 . nr doc-reg-dfr \n[doc-arg-ptr]
570 . ie (\n[doc-reg-dfr1] == 2) \{\
571 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
572 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
574 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
575 . if \n[doc-reg-Fl] \
576 . nop \|\-\*[doc-space]\c
580 . ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
581 . if \n[doc-reg-Fl] \
582 . nop \|\-\*[doc-space]\c
586 . \" two consecutive hyphen characters?
587 . ie "\*[doc-str-dfr]"-" \
590 . nop \|\%\-\*[doc-str-dfr]\c
593 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
594 . nop \)\*[doc-str-dfr]\f[P]\s[0]\c
597 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
599 . if (\n[doc-reg-dfr1] == 4) \
602 . doc-print-and-reset
606 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
607 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
610 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
613 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
617 . doc-flag-recursion \$@
622 .\" NS doc-print-recursive macro
623 .\" NS general name recursion routine (print remaining arguments)
628 .\" NS local variables:
633 .de doc-print-recursive
634 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
635 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
637 . ie (\n[doc-reg-dpr1] == 1) \{\
638 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
642 . nr doc-reg-dpr \n[doc-arg-ptr]
644 . ie (\n[doc-reg-dpr1] == 2) \
645 . \" the `\%' prevents hyphenation on a dash (`-')
646 . nop \%\*[doc-str-dpr]\&\c
648 . \" punctuation character
649 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
650 . nop \)\*[doc-str-dpr]\f[P]\s[0]\c
654 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
656 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
657 . doc-print-and-reset
660 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
661 . doc-print-recursive
666 .\" NS doc-print-prefixes macro
667 .\" NS print leading prefixes
672 .de doc-print-prefixes
673 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
674 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
676 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
677 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
683 .\" NS doc-generic-macro macro
684 .\" NS this is the skeleton for most simple macros
690 .\" NS doc-macro-name
692 .de doc-generic-macro
693 . if !\n[doc-arg-limit] \{\
695 . ds doc-macro-name \$0
699 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
702 . if \n[doc-arg-limit] \{\
704 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
705 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
706 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
708 . \" the right action here would be to reset the argument counters --
709 . \" unfortunately, a small number of manual pages (less than 2%
710 . \" for FreeBSD which has been used for testing) relies on the old
711 . \" behaviour, so it is commented out
716 . nr doc-curr-font \n[.f]
717 . nr doc-curr-size \n[.ps]
718 . nop \*[doc-\$0-font]\c
719 . doc-print-recursive
722 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
729 .\" NS command line `argument' macro: `.Ar [args ...]'
735 .\" NS doc-macro-name
737 .\" NS local variable:
738 .\" NS doc-str-Ar-default
740 .\" NS width register `Ar' set in doc-common
742 .ds doc-str-Ar-default "file\ .\|.\|.
745 . nr doc-curr-font \n[.f]
746 . nr doc-curr-size \n[.ps]
747 . nop \*[doc-Ar-font]\c
749 . if !\n[doc-arg-limit] \{\
750 . ds doc-macro-name Ar
755 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
758 . if \n[doc-arg-limit] \{\
761 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
762 . nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
763 . doc-print-and-reset
766 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
767 . \" replace previous argument (Ar) with default value
769 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
770 . nr doc-type\n[doc-arg-ptr] 2
771 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
773 . \" recompute space vector for remaining arguments
774 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
775 . nr doc-arg-limit \n[doc-arg-ptr]
776 . doc-parse-space-vector
778 . doc-print-recursive
786 .\" NS width register `Ad' set in doc-common
788 .als Ad doc-generic-macro
789 .ds doc-Ad-usage address
792 .\" NS doc-in-synopsis-count global register
793 .\" NS whether we have more than a single item in synopsis
795 .nr doc-in-synopsis-count 0
798 .\" NS doc-indent-synopsis global register
799 .\" NS indentation in synopsis
801 .nr doc-indent-synopsis 0
805 .\" NS config declaration (for section 4 SYNOPSIS)
807 .\" NS this function causes a break; it uses the `Nm' font
813 .\" NS doc-in-synopsis-count
814 .\" NS doc-indent-synopsis
815 .\" NS doc-macro-name
817 .\" NS width register `Cd' set in doc-common
819 .\" needs work - not very translatable
822 . if !\n[doc-arg-limit] \{\
824 . ds doc-macro-name Cd
828 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
833 . if \n[doc-arg-limit] \{\
835 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
836 . nr doc-curr-font \n[.f]
837 . nr doc-curr-size \n[.ps]
839 . ie \n[doc-in-synopsis-count] \{\
840 . if "\*[doc-macro-name]"Cd" \{\
842 . ie (\n[doc-in-synopsis-count] > 1) \
845 . if !\n[doc-indent-synopsis] \
846 . nr doc-indent-synopsis \n[doc-display-indent]u
848 . in +\n[doc-indent-synopsis]u
849 . ti -\n[doc-indent-synopsis]u
850 . nr doc-in-synopsis-count +1
853 . nop \*[doc-Nm-font]\c
854 . doc-print-recursive
855 . in -\n[doc-indent-synopsis]u
858 . nop \*[doc-Nm-font]\c
859 . doc-print-recursive
862 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
869 .\" NS interactive command modifier (flag)
871 .\" NS width register `Cm' set in doc-common
873 .als Cm doc-generic-macro
874 .ds doc-Cm-usage interactive_command_modifier
878 .\" NS defined variable
880 .\" NS this function uses the `Er' font
882 .\" NS width register `Dv' set in doc-common
884 .als Dv doc-generic-macro
885 .ds doc-Dv-usage defined_variable
886 .als doc-Dv-font doc-Er-font
892 .\" NS width register `Em' set in doc-common
894 .als Em doc-generic-macro
895 .ds doc-Em-usage text
901 .\" NS width register `Er' set in doc-common
903 .als Er doc-generic-macro
904 .ds doc-Er-usage text
908 .\" NS environment variable
910 .\" NS width register `Ev' set in doc-common
912 .als Ev doc-generic-macro
913 .ds doc-Ev-usage text
916 .\" NS doc-have-decl global register (bool)
917 .\" NS subroutine test (in synopsis only)
922 .\" NS doc-have-var global register (bool)
923 .\" NS whether last type is a variable type
928 .\" NS doc-do-func-decl macro
929 .\" NS do someting special while in SYNOPSIS
938 . if \n[doc-in-synopsis-count] \{\
939 . \" if a variable type was the last thing given, want vertical space
940 . if \n[doc-have-var] \{\
944 . \" if a subroutine was the last thing given, want vertical space
945 . if \n[doc-have-func] \{\
946 . ie \n[doc-have-decl] \
955 . nr doc-curr-font \n[.f]
956 . nr doc-curr-size \n[.ps]
961 .\" NS function declaration -- not callable
963 .\" NS this function causes a break
965 .\" NS width register `Fd' set in doc-common
968 . ie \n[doc-arg-limit] \{\
969 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
974 . nop \*[doc-Fd-font]\$*
976 . ft \n[doc-curr-font]
977 . ps \n[doc-curr-size]u
983 .\" NS #include statement - not callable (& no err check)
985 .\" NS this function causes a break; it uses the `Fd' font
987 .\" NS width register `In' set in doc-common
990 . ie \n[doc-arg-limit] \{\
991 . tm Usage: .In #include_statement -- In is not callable (#\n[.c])
996 . nop \*[doc-Fd-font]#include <\$1>
998 . ft \n[doc-curr-font]
999 . ps \n[doc-curr-size]u
1004 .\" NS Fr user macro
1005 .\" NS function return value
1007 .\" NS this function uses the `Ar' font
1009 .\" NS width register `Fr' set in doc-common
1011 .als Fr doc-generic-macro
1012 .ds doc-Fr-usage function_return_value
1013 .als doc-Fr-font doc-Ar-font
1016 .\" NS Ic user macro
1017 .\" NS interactive command
1019 .\" NS width register `Ic' set in doc-common
1021 .als Ic doc-generic-macro
1022 .ds doc-Ic-usage interactive_command
1025 .\" NS Li user macro
1028 .\" NS width register `Li' set in doc-common
1030 .als Li doc-generic-macro
1031 .ds doc-Li-usage argument
1034 .\" NS Or user macro
1035 .\" NS pipe symbol (OR)
1037 .\" NS this function uses the `Ic' font
1039 .\" NS width register `Or' set in doc-common
1041 .\" XXX: What is this function good for? It sets a font but does not print
1042 .\" a pipe symbol. And it isn't documented.
1044 .als Or doc-generic-macro
1046 .als doc-Or-font doc-Ic-font
1049 .\" NS Ms user macro
1052 .\" NS this function uses the `Sy' font
1054 .\" NS width register `Ms' set in doc-common
1056 .als Ms doc-generic-macro
1057 .ds doc-Ms-usage math_symbol
1058 .als doc-Ms-font doc-Sy-font
1061 .\" NS doc-command-name global string
1062 .\" NS save first invocation of .Nm
1064 .ds doc-command-name
1067 .\" NS Nm user macro
1068 .\" NS name of command or page topic
1072 .\" NS doc-command-name
1073 .\" NS doc-curr-font
1074 .\" NS doc-curr-size
1075 .\" NS doc-in-synopsis-count
1076 .\" NS doc-indent-synopsis,
1077 .\" NS doc-macro-name
1079 .\" NS width register `Nm' set in doc-common
1082 . if !\n[doc-arg-limit] \{\
1083 . ds doc-macro-name Nm
1085 . doc-parse-args \$@
1087 . ie "\*[doc-command-name]"" \
1088 . tm Usage: .Nm name ... (#\n[.c])
1090 . doc-parse-args \*[doc-command-name]
1093 . if \n[doc-arg-limit] \{\
1095 . doc-print-prefixes
1096 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1098 . ie "\*[doc-command-name]"" \{\
1099 . tm Usage: .Nm name ... (#\n[.c])
1103 . nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
1104 . doc-print-and-reset
1107 . nr doc-curr-font \n[.f]
1108 . nr doc-curr-size \n[.ps]
1112 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1113 . ie "\*[doc-command-name]"" \
1114 . tm Usage: .Nm name ... (#\n[.c])
1116 . \" replace previous argument (Nm) with default value
1118 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
1119 . nr doc-type\n[doc-arg-ptr] 2
1120 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1122 . \" recompute space vector for remaining arguments
1123 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1124 . nr doc-arg-limit \n[doc-arg-ptr]
1125 . doc-parse-space-vector
1128 . \" handle `.Nm ...' in SYNOPSIS
1129 . if \n[doc-in-synopsis-count] \{\
1130 . if "\*[doc-macro-name]"Nm" \{\
1131 . in -\n[doc-indent-synopsis]u
1132 . ie (\n[doc-in-synopsis-count] > 1) \
1135 . if !\n[doc-indent-synopsis] \{\
1136 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1137 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1140 . in +\n[doc-indent-synopsis]u
1141 . ti -\n[doc-indent-synopsis]u
1142 . nr doc-in-synopsis-count +1
1144 . if "\*[doc-command-name]"" \
1145 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1147 . nop \*[doc-Nm-font]\c
1149 . doc-print-recursive
1154 .\" NS Pa user macro
1155 .\" NS pathname: `.Pa [arg ...]'
1159 .\" NS doc-curr-font
1160 .\" NS doc-curr-size
1161 .\" NS doc-macro-name
1163 .\" NS width register `Pa' set in doc-common
1166 . if !\n[doc-arg-limit] \{\
1167 . ds doc-macro-name Pa
1168 . doc-parse-args \$@
1172 . nop \*[doc-Pa-font]~\f[P]\s[0]
1175 . if \n[doc-arg-limit] \{\
1177 . doc-print-prefixes
1178 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1179 . nr doc-curr-font \n[.f]
1180 . nr doc-curr-size \n[.ps]
1181 . nop \*[doc-Pa-font]\c
1182 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1183 . \" replace previous argument (Pa) with default value
1185 . ds doc-arg\n[doc-arg-ptr] ~
1186 . nr doc-type\n[doc-arg-ptr] 2
1187 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1189 . \" recompute space vector for remaining arguments
1190 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1191 . nr doc-arg-limit \n[doc-arg-ptr]
1192 . doc-parse-space-vector
1194 . doc-print-recursive
1197 . nop \*[doc-Pa-font]~\f[P]\s[0]\c
1198 . doc-print-and-reset
1203 .\" NS Sy user macro
1206 .\" NS width register `Sy' set in doc-common
1208 .als Sy doc-generic-macro
1209 .ds doc-Sy-usage symbolic_text
1212 .\" NS Me user macro
1215 .\" NS width register `Me' set in doc-common
1217 .als Me doc-generic-macro
1218 .ds doc-Me-usage menu_entry
1221 .\" NS Tn user macro
1226 .\" NS doc-curr-font
1227 .\" NS doc-curr-size
1228 .\" NS doc-macro-name
1230 .\" NS width register `Tn' set in doc-common
1233 . if !\n[doc-arg-limit] \{\
1235 . ds doc-macro-name Tn
1236 . doc-parse-args \$@
1239 . tm Usage: .Tn trade_name ... (#\n[.c])
1242 . if \n[doc-arg-limit] \{\
1244 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1245 . nr doc-curr-font \n[.f]
1246 . nr doc-curr-size \n[.ps]
1247 . nop \)\*[doc-Tn-font-size]\c
1248 . ie !\n[doc-is-reference] \{\
1249 . nop \)\*[doc-Tn-font-shape]\c
1250 . doc-print-recursive
1256 . tm Usage: .Tn trade_name ... (#\n[.c])
1262 .\" NS Va user macro
1263 .\" NS variable name
1265 .\" NS width register `Va' set in doc-common
1267 .als Va doc-generic-macro
1268 .ds doc-Va-usage variable_name
1271 .\" NS No user macro
1272 .\" NS normal text macro (default text style if mess up)
1274 .\" NS width register `No' set in doc-common
1276 .als No doc-generic-macro
1277 .ds doc-No-usage normal_text
1280 .\" NS doc-quote-left global string
1281 .\" NS left quotation character for `doc-enclose-string' and
1282 .\" NS `doc-enclose-open'
1287 .\" NS doc-quote-right global string
1288 .\" NS right quotation character for `doc-enclose-string' and
1289 .\" NS `doc-enclose-close'
1294 .\" NS Op user macro
1295 .\" NS option expression (i.e., enclose string in square brackets)
1298 .\" NS doc-macro-name
1299 .\" NS doc-quote-left
1300 .\" NS doc-quote-right
1302 .\" NS width register `Op' set in doc-common
1305 . if !\n[doc-arg-limit] \
1306 . ds doc-macro-name Op
1308 . ds doc-quote-left "\*[doc-left-bracket]
1309 . ds doc-quote-right "\*[doc-right-bracket]
1311 . doc-enclose-string \$@
1315 .\" NS Aq user macro
1316 .\" NS enclose string in angle brackets
1319 .\" NS doc-macro-name
1320 .\" NS doc-quote-left
1321 .\" NS doc-quote-right
1323 .\" NS width register `Aq' set in doc-common
1326 . if !\n[doc-arg-limit] \
1327 . ds doc-macro-name Aq
1329 . ds doc-quote-left \[la]
1330 . ds doc-quote-right \[ra]
1332 . doc-enclose-string \$@
1336 .\" NS Bq user macro
1337 .\" NS enclose string in square brackets
1340 .\" NS doc-macro-name
1341 .\" NS doc-quote-left
1342 .\" NS doc-quote-right
1344 .\" NS width register `Bq' set in doc-common
1347 . if !\n[doc-arg-limit] \
1348 . ds doc-macro-name Bq
1350 . ds doc-quote-left "\*[doc-left-bracket]
1351 . ds doc-quote-right "\*[doc-right-bracket]
1353 . doc-enclose-string \$@
1357 .\" NS Brq user macro
1358 .\" NS enclose string in braces
1361 .\" NS doc-macro-name
1362 .\" NS doc-quote-left
1363 .\" NS doc-quote-right
1365 .\" NS width register `Brq' set in doc-common
1368 . if !\n[doc-arg-limit] \
1369 . ds doc-macro-name Brq
1371 . ds doc-quote-left {
1372 . ds doc-quote-right }
1374 . doc-enclose-string \$@
1378 .\" NS Dq user macro
1379 .\" NS enclose string in double quotes
1382 .\" NS doc-macro-name
1383 .\" NS doc-quote-left
1384 .\" NS doc-quote-right
1386 .\" NS width register `Dq' set in doc-common
1389 . if !\n[doc-arg-limit] \
1390 . ds doc-macro-name Dq
1392 . ds doc-quote-left "\*[Lq]
1393 . ds doc-quote-right "\*[Rq]
1395 . doc-enclose-string \$@
1399 .\" NS Eq user macro
1400 .\" NS enclose string in user-defined quotes (args 1 and 2)
1403 .\" NS doc-macro-name
1404 .\" NS doc-quote-left
1405 .\" NS doc-quote-right
1407 .\" NS width register `Eq' set in doc-common
1410 . if !\n[doc-arg-limit] \
1411 . ds doc-macro-name Eq
1413 . ds doc-quote-left "\$1
1414 . ds doc-quote-right "\$2
1417 . doc-enclose-string \$@
1421 .\" NS Pq user macro
1422 .\" NS enclose string in parentheses
1425 .\" NS doc-macro-name
1426 .\" NS doc-quote-left
1427 .\" NS doc-quote-right
1429 .\" NS width register `Pq' set in doc-common
1432 . if !\n[doc-arg-limit] \
1433 . ds doc-macro-name Pq
1435 . ds doc-quote-left "\*[doc-left-parenthesis]
1436 . ds doc-quote-right "\*[doc-right-parenthesis]
1438 . doc-enclose-string \$@
1442 .\" NS Ql user macro
1443 .\" NS quoted literal
1445 .\" is in file doc-[dit|n]roff
1448 .\" NS Qq user macro
1449 .\" NS enclose string in straight double quotes
1452 .\" NS doc-macro-name
1453 .\" NS doc-quote-left
1454 .\" NS doc-quote-right
1456 .\" NS width register `Qq' set in doc-common
1459 . if !\n[doc-arg-limit] \
1460 . ds doc-macro-name Qq
1462 . ds doc-quote-left "\*[q]
1463 . ds doc-quote-right "\*[q]
1465 . doc-enclose-string \$@
1469 .\" NS Sq user macro
1470 .\" NS enclose string in single quotes
1473 .\" NS doc-macro-name
1474 .\" NS doc-quote-left
1475 .\" NS doc-quote-right
1477 .\" NS width register `Sq' set in doc-common
1480 . if !\n[doc-arg-limit] \
1481 . ds doc-macro-name Sq
1483 . ds doc-quote-left "\*[doc-left-singlequote]
1484 . ds doc-quote-right "\*[doc-right-singlequote]
1486 . doc-enclose-string \$@
1490 .\" NS Es user macro
1491 .\" NS set up arguments (i.e., the left and right quotation character as
1492 .\" NS first and second argument) for .En call
1496 .\" NS doc-macro-name
1497 .\" NS doc-quote-left
1498 .\" NS doc-quote-right
1501 . if !\n[doc-arg-limit] \{\
1502 . ie (\n[.$] > 2) \{\
1503 . ds doc-macro-name Es
1504 . doc-parse-args \$@
1507 . ds doc-quote-left "\$1
1508 . ds doc-quote-right "\$2
1511 . if \n[doc-arg-limit] \{\
1513 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1515 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1517 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1518 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1520 . doc-print-and-reset
1525 .\" NS doc-have-slot global register (bool)
1526 .\" NS set if `doc-enclose-string' has created a slot for closing
1532 .\" NS doc-enclose-string macro
1533 .\" NS enclose string with given args (e.g. [ and ])
1538 .\" NS doc-have-slot
1540 .\" NS local variables:
1546 .\" NS doc-quote-left
1547 .\" NS doc-quote-right
1549 .de doc-enclose-string
1550 . if \n[doc-in-synopsis-count] \
1551 . doc-set-hard-space
1553 . if !\n[doc-arg-limit] \{\
1555 . doc-parse-args \$@
1557 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1560 . if \n[doc-arg-limit] \{\
1562 . doc-print-prefixes
1563 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1564 . nop \)\*[doc-quote-left]\)\c
1565 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1567 . nop \)\*[doc-quote-right]\)\c
1568 . doc-print-and-reset
1571 . \" test whether last arguments are of type closing punctuation
1573 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1574 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1575 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1578 . \" prepend closing delimiter
1580 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1583 . \" test whether last arguments are macros which continue the line
1585 . nr doc-reg-des \n[doc-arg-limit]
1586 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1587 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1589 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1594 . \" if there are no trailing macros to be skipped, append argument
1595 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1596 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1598 . \" if a previous call to `doc-enclose-string' has already created
1599 . \" a slot, prepend argument
1600 . ie \n[doc-have-slot] \
1601 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1603 . \" we have to shift all arguments to the right
1605 . nr doc-reg-des1 \n[doc-arg-limit]
1606 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1607 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1608 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1609 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1610 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1611 . nr doc-reg-des1 -1
1612 . nr doc-reg-des2 -1
1614 . nr doc-arg-limit +1
1616 . \" finally, insert closing delimiter into the freed slot and
1617 . \" recompute spacing vector
1618 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1619 . nr doc-type\n[doc-reg-des] 3
1620 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1621 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1622 . doc-parse-space-vector
1623 . nr doc-have-slot 1
1626 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1629 . if \n[doc-in-synopsis-count] \
1630 . doc-set-soft-space
1634 .\" NS En user macro
1635 .\" NS enclose arguments with quotation characters set up with `.Es'
1637 .als En doc-enclose-string
1640 .\" NS Ao user macro
1644 .\" NS doc-macro-name
1645 .\" NS doc-quote-left
1647 .\" NS width register `Ao' set in doc-common
1650 . if !\n[doc-arg-limit] \
1651 . ds doc-macro-name Ao
1653 . ds doc-quote-left \[la]
1655 . doc-enclose-open \$@
1659 .\" NS Ac user macro
1663 .\" NS doc-macro-name
1664 .\" NS doc-quote-right
1666 .\" NS width register `Ac' set in doc-common
1669 . if !\n[doc-arg-limit] \
1670 . ds doc-macro-name Ac
1672 . ds doc-quote-right \[ra]
1674 . doc-enclose-close \$@
1678 .\" NS Bo user macro
1682 .\" NS doc-macro-name
1683 .\" NS doc-quote-left
1685 .\" NS width register `Bo' set in doc-common
1688 . if !\n[doc-arg-limit] \
1689 . ds doc-macro-name Bo
1691 . ds doc-quote-left "\*[doc-left-bracket]
1693 . doc-enclose-open \$@
1697 .\" NS Bc user macro
1698 .\" NS bracket close
1701 .\" NS doc-macro-name
1702 .\" NS doc-quote-right
1704 .\" NS width register `Bc' set in doc-common
1707 . if !\n[doc-arg-limit] \
1708 . ds doc-macro-name Bc
1710 . ds doc-quote-right "\*[doc-right-bracket]
1712 . doc-enclose-close \$@
1716 .\" NS Bro user macro
1720 .\" NS doc-macro-name
1721 .\" NS doc-quote-left
1723 .\" NS width register `Bro' set in doc-common
1726 . if !\n[doc-arg-limit] \
1727 . ds doc-macro-name Bo
1729 . ds doc-quote-left {
1731 . doc-enclose-open \$@
1735 .\" NS Brc user macro
1739 .\" NS doc-macro-name
1740 .\" NS doc-quote-right
1742 .\" NS width register `Brc' set in doc-common
1745 . if !\n[doc-arg-limit] \
1746 . ds doc-macro-name Bc
1748 . ds doc-quote-right }
1750 . doc-enclose-close \$@
1754 .\" NS Do user macro
1755 .\" NS double quote open
1758 .\" NS doc-macro-name
1759 .\" NS doc-quote-left
1761 .\" NS width register `Do' set in doc-common
1764 . if !\n[doc-arg-limit] \
1765 . ds doc-macro-name Do
1767 . ds doc-quote-left "\*[Lq]
1769 . doc-enclose-open \$@
1773 .\" NS Dc user macro
1774 .\" NS double quote close
1777 .\" NS doc-macro-name
1778 .\" NS doc-quote-right
1780 .\" NS width register `Dc' set in doc-common
1783 . if !\n[doc-arg-limit] \
1784 . ds doc-macro-name Dc
1786 . ds doc-quote-right "\*[Rq]
1788 . doc-enclose-close \$@
1792 .\" NS Eo user macro
1793 .\" NS enclose open (using first argument as beginning of enclosure)
1796 .\" NS doc-macro-name
1797 .\" NS doc-quote-left
1799 .\" NS width register `Eo' set in doc-common
1802 . if !\n[doc-arg-limit] \
1803 . ds doc-macro-name Eo
1805 . ds doc-quote-left "\$1
1808 . doc-enclose-open \$@
1812 .\" NS Ec user macro
1813 .\" NS enclose close (using first argument as end of enclosure)
1816 .\" NS doc-macro-name
1817 .\" NS doc-quote-right
1819 .\" NS width register `Ec' set in doc-common
1822 . if !\n[doc-arg-limit] \
1823 . ds doc-macro-name Ec
1825 . ds doc-quote-right "\$1
1828 . doc-enclose-close \$@
1832 .\" NS Oo user macro
1836 .\" NS doc-macro-name
1837 .\" NS doc-quote-left
1839 .\" NS width register `Oo' set in doc-common
1842 . if !\n[doc-arg-limit] \
1843 . ds doc-macro-name Oo
1845 . ds doc-quote-left [
1847 . doc-enclose-open \$@
1851 .\" NS Oc user macro
1855 .\" NS doc-macro-name
1856 .\" NS doc-quote-right
1858 .\" NS width register `Oc' set in doc-common
1861 . if !\n[doc-arg-limit] \
1862 . ds doc-macro-name Oc
1864 . ds doc-quote-right ]
1866 . doc-enclose-close \$@
1870 .\" NS Po user macro
1871 .\" NS parenthesis open
1874 .\" NS doc-macro-name
1875 .\" NS doc-quote-left
1877 .\" NS width register `Po' set in doc-common
1880 . if !\n[doc-arg-limit] \
1881 . ds doc-macro-name Po
1883 . ds doc-quote-left "\*[doc-left-parenthesis]
1885 . doc-enclose-open \$@
1889 .\" NS Pc user macro
1890 .\" NS parenthesis close
1893 .\" NS doc-macro-name
1894 .\" NS doc-quote-right
1896 .\" NS width register `Pc' set in doc-common
1899 . if !\n[doc-arg-limit] \
1900 . ds doc-macro-name Pc
1902 . ds doc-quote-right "\*[doc-right-parenthesis]
1904 . doc-enclose-close \$@
1908 .\" NS Qo user macro
1909 .\" NS straight double quote open
1912 .\" NS doc-macro-name
1913 .\" NS doc-quote-left
1915 .\" NS width register `Qo' set in doc-common
1918 . if !\n[doc-arg-limit] \
1919 . ds doc-macro-name Qo
1921 . ds doc-quote-left "\*[q]
1923 . doc-enclose-open \$@
1927 .\" NS Qc user macro
1928 .\" NS straight double quote close
1931 .\" NS doc-macro-name
1932 .\" NS doc-quote-right
1934 .\" NS width register `Qc' set in doc-common
1937 . if !\n[doc-arg-limit] \
1938 . ds doc-macro-name Qc
1940 . ds doc-quote-right "\*[q]
1942 . doc-enclose-close \$@
1946 .\" NS So user macro
1947 .\" NS single quote open
1950 .\" NS doc-macro-name
1951 .\" NS doc-quote-left
1953 .\" NS width register `So' set in doc-common
1956 . if !\n[doc-arg-limit] \
1957 . ds doc-macro-name So
1959 . ds doc-quote-left "\*[doc-left-singlequote]
1961 . doc-enclose-open \$@
1965 .\" NS Sc user macro
1966 .\" NS single quote close
1969 .\" NS doc-macro-name
1970 .\" NS doc-quote-right
1972 .\" NS width register `Sc' set in doc-common
1975 . if !\n[doc-arg-limit] \
1976 . ds doc-macro-name Sc
1978 . ds doc-quote-right "\*[doc-right-singlequote]
1980 . doc-enclose-close \$@
1984 .\" NS Xo user macro
1988 .\" NS doc-macro-name
1989 .\" NS doc-quote-left
1991 .\" NS width register `Xo' set in doc-common
1994 . if !\n[doc-arg-limit] \
1995 . ds doc-macro-name Xo
1999 . doc-enclose-open \$@
2003 .\" NS Xc user macro
2007 .\" NS doc-macro-name
2008 .\" NS doc-quote-right
2010 .\" NS width register `Xc' set in doc-common
2013 . if !\n[doc-arg-limit] \
2014 . ds doc-macro-name Xc
2016 . ds doc-quote-right
2018 . doc-enclose-close \$@
2022 .\" NS doc-nesting-level global register
2023 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
2025 .nr doc-nesting-level 0
2028 .\" NS doc-in-list global register (bool)
2029 .\" NS whether we are in (logical) .It
2034 .\" NS doc-enclose-open macro
2035 .\" NS enclose string open
2039 .\" NS doc-nesting-level
2041 .de doc-enclose-open
2042 . if !\n[doc-arg-limit] \
2043 . doc-parse-args \$@
2046 . doc-print-prefixes
2049 . nop \)\*[doc-quote-left]\)\c
2051 . \" start enclosure box
2052 . box doc-enclosure-box\n[doc-nesting-level]
2053 . ev doc-enclosure-env\n[doc-nesting-level]
2058 . \" increase nesting level *after* parsing of arguments
2059 . nr doc-nesting-level +1
2061 . if \n[doc-arg-limit] \{\
2063 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2064 . doc-print-recursive
2071 .\" NS doc-enclose-close macro
2072 .\" NS enclose string close
2075 .\" NS doc-nesting-level
2077 .de doc-enclose-close
2078 . nr doc-nesting-level -1
2080 . \" finish enclosure box
2084 . chop doc-enclosure-box\n[doc-nesting-level]
2085 . unformat doc-enclosure-box\n[doc-nesting-level]
2088 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
2089 . nop \)\*[doc-quote-right]\)\c
2091 . if !\n[doc-arg-limit] \{\
2092 . doc-parse-args \$@
2095 . doc-print-and-reset
2098 . if \n[doc-arg-limit] \{\
2099 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2100 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
2102 . doc-print-recursive
2105 . doc-print-and-reset
2108 . \" shall we finish .It request?
2109 . if !"\*[doc-macro-name]"It" \
2110 . if \n[doc-in-list] \
2111 . if !\n[doc-nesting-level] \
2112 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
2116 .\" NS Pf user macro
2117 .\" NS prefix: `.Pf prefix arg ...'
2121 .\" NS doc-macro-name
2122 .\" NS doc-quote-left
2124 .\" NS width register `Pf' set in doc-common
2127 . if !\n[doc-arg-limit] \
2128 . ds doc-macro-name Pf
2130 . ie \n[doc-arg-limit] \{\
2131 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2133 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2136 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2142 . doc-parse-args \$@
2144 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2148 . if \n[doc-arg-limit] \{\
2150 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2151 . doc-print-and-reset
2153 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2158 .\" NS Ns user macro
2159 .\" NS remove space (space removal done by `doc-parse-args')
2163 .\" NS doc-macro-name
2165 .\" NS width register `Ns' set in doc-common
2168 . if !\n[doc-arg-limit] \{\
2170 . ds doc-macro-name Ns
2171 . doc-parse-args \$@
2174 . tm Usage: .Ns must be called with arguments (#\n[.c])
2177 . if \n[doc-arg-limit] \{\
2179 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2180 . doc-print-recursive
2187 .\" NS Ap user macro
2188 .\" NS append an apostrophe
2190 .\" NS width register `Ap' set in doc-common
2193 . ie !\n[doc-arg-limit] \
2194 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2198 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2199 . doc-print-recursive
2206 .\" NS doc-space global string
2207 .\" NS current inter-argument space
2209 .ds doc-space "\*[doc-soft-space]
2212 .\" NS doc-soft-space constant string
2213 .\" NS soft (stretchable) space (defined in doc-common)
2216 .\" NS doc-hard-space constant string
2217 .\" NS hard (unpaddable) space (defined in doc-common)
2220 .\" NS doc-set-hard-space macro
2221 .\" NS set current space string to hard (unpaddable) space.
2224 .\" NS doc-saved-space
2227 .de doc-set-hard-space
2228 . ie "\*[doc-space]"" \
2229 . ds doc-saved-space "\*[doc-hard-space]
2231 . ds doc-space "\*[doc-hard-space]
2235 .\" NS doc-set-soft-space macro
2236 .\" NS set current space string to soft space
2239 .\" NS doc-saved-space
2242 .de doc-set-soft-space
2243 . ie "\*[doc-space]"" \
2244 . ds doc-saved-space "\*[doc-soft-space]
2246 . ds doc-space "\*[doc-soft-space]
2250 .\" NS doc-space-mode global register (bool)
2251 .\" NS default is one (space mode on)
2253 .nr doc-space-mode 1
2256 .\" NS doc-saved-space global string
2257 .\" NS saved value of `doc-space'
2259 .ds doc-saved-space "\*[doc-space]
2262 .\" NS doc-have-space global register (bool)
2263 .\" NS set if last command was horizontal space
2265 .nr doc-have-space 0
2268 .\" NS Sm user macro
2269 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2271 .\" NS without argument, toggle space mode
2274 .\" NS doc-arg-limit
2277 .\" NS doc-macro-name
2279 .\" NS doc-saved-space
2281 .\" NS doc-space-mode
2284 .\" NS local variables:
2287 .\" NS width register `Sm' set in doc-common
2290 . ie \n[doc-have-space] \
2295 . if !\n[doc-arg-limit] \{\
2297 . ds doc-macro-name Sm
2298 . doc-parse-args \$@
2301 . ie \n[doc-space-mode] \
2302 . nr doc-space-mode 0
2304 . nr doc-space-mode 1
2307 . if \n[doc-arg-limit] \{\
2310 . \" avoid a warning message in case `Sm' is the last parameter
2311 . if !d doc-arg\n[doc-arg-ptr] \
2312 . ds doc-arg\n[doc-arg-ptr]
2314 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2315 . ds doc-space "\*[doc-saved-space]
2316 . nr doc-space-mode 1
2319 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2320 . ds doc-saved-space "\*[doc-space]
2322 . nr doc-space-mode 0
2325 . \" no argument for Sm
2327 . ie \n[doc-space-mode] \
2328 . nr doc-space-mode 0
2330 . nr doc-space-mode 1
2333 . ie \n[doc-space-mode] \{\
2334 . \" recompute space vector for remaining arguments
2335 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2336 . nr doc-arg-limit \n[doc-arg-ptr]
2337 . if \n[doc-num-args] \
2338 . doc-parse-space-vector
2340 . \" finish line only if it is interrupted and `doc-have-space'
2342 . if \n[doc-reg-Sm] \
2347 . \" reset remaining space vector elements
2348 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2349 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2350 . ds doc-space\n[doc-reg-Sm]
2352 . \" the body of a `while' request must end with the fitting `\}'!
2356 . \" do we have parameters to print?
2357 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2358 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2359 . ie (\n[doc-arg-ptr] > 1) \
2360 . doc-print-and-reset
2365 . \" skip `Sm' argument
2367 . doc-print-recursive
2372 .\" NS doc-arg-type immediate register
2373 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2374 .\" NS punctuation prefix=4)
2379 .\" NS doc-get-arg-type macro
2380 .\" NS get argument type
2382 .\" NS this macro expects the width of the argument in `doc-width'
2387 .de doc-get-arg-type
2390 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2391 . ie (\n[doc-width] == 1) \{\
2392 . if r doc-punct\$1 \
2393 . nr doc-arg-type \n[doc-punct\$1]
2403 .\" NS doc-get-arg-type* macro
2404 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2406 .\" NS this macro sets the `doc-width' register using the `length' request
2407 .\" NS to get the number of characters in a string literally
2413 .de doc-get-arg-type*
2415 . length doc-width "\*[doc-arg\$1]
2417 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2418 . ie (\n[doc-width] == 1) \{\
2419 . if r doc-punct\*[doc-arg\$1] \
2420 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2423 . if r \*[doc-arg\$1] \
2424 . if d \*[doc-arg\$1] \
2430 .\" NS doc-set-spacing-1 macro
2431 .\" NS set spacing for macros
2436 .\" NS local variables:
2437 .\" NS doc-reg-dssfm
2438 .\" NS doc-reg-dssfm1
2440 .de doc-set-spacing-1
2441 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2443 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2445 . ie (\n[doc-reg-dssfm1] == 3) \{\
2446 . if \n[doc-arg-limit] \{\
2447 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2448 . ds doc-space\n[doc-reg-dssfm]
2450 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2453 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2455 . ie (\n[doc-reg-dssfm1] == 2) \{\
2456 . if \n[doc-arg-limit] \{\
2457 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2458 . ds doc-space\n[doc-reg-dssfm]
2460 . ds doc-space\n[doc-arg-limit]
2463 . ds doc-space\n[doc-arg-limit]
2468 .\" NS doc-set-spacing-2 macro
2469 .\" NS set spacing for strings
2474 .de doc-set-spacing-2
2475 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2479 .\" NS doc-set-spacing-3 macro
2480 .\" NS set spacing for punctuation suffixes
2485 .\" NS local variables:
2486 .\" NS doc-reg-dssfps
2488 .de doc-set-spacing-3
2489 . if \n[doc-arg-limit] \{\
2490 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2491 . ds doc-space\n[doc-reg-dssfps]
2494 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2498 .\" NS doc-set-spacing-4 macro
2499 .\" NS set spacing for punctuation prefixes
2504 .de doc-set-spacing-4
2505 . ds doc-space\n[doc-arg-limit]
2509 .\" type switches (on current argument doc-arg-ptr)
2512 .\" NS doc-do-1 macro
2513 .\" NS call request if macro
2516 . \*[doc-arg\n[doc-arg-ptr]]
2520 .\" NS doc-do-2 macro
2521 .\" NS call .doc-print-recursive if string
2524 . doc-print-recursive
2528 .\" NS doc-do-3 macro
2529 .\" NS call .doc-print-recursive if punctuation suffix
2532 . doc-print-recursive
2536 .\" NS doc-do-4 macro
2537 .\" NS call .doc-print-recursive if punctuation prefix
2540 . doc-print-recursive
2544 .\" NS doc-fontmode-depth global register
2545 .\" NS font mode level
2547 .nr doc-fontmode-depth 0
2550 .\" NS doc-fontmode-font-stackXXX global register
2551 .\" NS stack of saved current font values from `Bf' request
2554 .\" NS doc-fontmode-depth
2556 .nr doc-fontmode-font-stack0 0
2559 .\" NS doc-fontmode-size-stackXXX global register
2560 .\" NS stack of saved current size values from `Bf' request
2563 .\" NS doc-fontmode-depth
2565 .nr doc-fontmode-size-stack0 0
2568 .\" NS Bf user macro
2569 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2572 .\" NS doc-fontmode-depth
2573 .\" NS doc-fontmode-font-stackXXX
2574 .\" NS doc-fontmode-size-stackXXX
2575 .\" NS doc-macro-name
2577 .\" NS width register `Bf' set in doc-common
2580 . ds doc-macro-name Bf
2583 . nr doc-fontmode-depth +1
2585 . \" save current font and size
2586 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2587 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2590 . nop \*[doc-Em-font]\c
2591 . el \{ .ie "\$1"Li" \
2592 . nop \*[doc-Li-font]\c
2593 . el \{ .ie "\$1"Sy" \
2594 . nop \*[doc-Sy-font]\c
2595 . el \{ .ie "\$1"-emphasis" \
2596 . nop \*[doc-Em-font]\c
2597 . el \{ .ie "\$1"-literal" \
2598 . nop \*[doc-Li-font]\c
2599 . el \{ .ie "\$1"-symbolic" \
2600 . nop \*[doc-Sy-font]\c
2602 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2606 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2610 .\" NS Ef user macro
2611 .\" NS end font mode
2614 .\" NS doc-macro-name
2616 .\" NS width register `Ef' set in doc-common
2619 . ds doc-macro-name Ef
2621 . ie !\n[doc-fontmode-depth] \
2622 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2624 . \" restore saved font and size
2625 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2626 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2628 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2629 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2630 . nr doc-fontmode-depth -1
2635 .\" NS doc-keep-type global register
2636 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2641 .\" NS Bk user macro
2645 .\" NS doc-keep-type
2646 .\" NS doc-macro-name
2648 .\" NS width register `Bk' set in doc-common
2651 . ds doc-macro-name Bk
2653 . if \n[doc-keep-type] \
2654 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2656 . ie "\$1"-lines" \{\
2657 . nr doc-keep-type 2
2658 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2660 . el \{ .ie "\$1"-words" \{\
2661 . nr doc-keep-type 1
2662 . doc-set-hard-space
2664 . el \{ .ie "\$1"" \{\
2666 . nr doc-keep-type 1
2667 . doc-set-hard-space
2670 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2671 . nr doc-keep-type 3
2674 \#. nr doc-nesting-level +1
2678 .\" NS Ek user macro
2682 .\" NS doc-keep-type
2683 .\" NS doc-macro-name
2685 .\" NS width register `Ek' set in doc-common
2688 . ds doc-macro-name Ek
2690 \#. nr doc-nesting-level -1
2693 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2695 . if !\n[doc-keep-type] \
2696 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2698 . ie (\n[doc-keep-type] == 1) \
2699 . doc-set-soft-space
2700 . el \{ .if (\n[doc-keep-type] == 2) \
2701 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2704 . nr doc-keep-type 0
2706 \#. if !"\*[doc-out-string]"" \
2707 \#. doc-print-out-string
2711 .\" NS doc-display-depth global register
2712 .\" NS display level
2714 .nr doc-display-depth 0
2717 .\" NS doc-is-compact global register (bool)
2718 .\" NS set if the `compact' keyword is given
2720 .nr doc-is-compact 0
2723 .\" NS doc-display-type-stackXXX global string
2724 .\" NS the display type stack
2727 .\" NS doc-display-depth
2729 .ds doc-display-type-stack0
2732 .\" NS doc-display-indent-stackXXX global register
2733 .\" NS stack of display indentation values
2736 .\" NS doc-display-depth
2738 .nr doc-display-indent-stack0 0
2741 .\" NS doc-display-ad-stackXXX global register
2742 .\" NS stack of saved adjustment modes
2745 .\" NS doc-display-depth
2747 .nr doc-display-ad-stack0 0
2750 .\" NS doc-display-fi-stackXXX global register
2751 .\" NS stack of saved fill modes
2754 .\" NS doc-display-depth
2756 .nr doc-display-fi-stack0 0
2759 .\" NS Bd user macro
2760 .\" NS begin display
2762 .\" NS width register `Bd' set in doc-common
2765 .\" NS doc-curr-font
2766 .\" NS doc-curr-size
2767 .\" NS doc-display-depth
2768 .\" NS doc-display-ad-stackXXX
2769 .\" NS doc-display-fi-stackXXX
2770 .\" NS doc-display-file
2771 .\" NS doc-display-indent-stackXXX
2772 .\" NS doc-display-type-stackXXX
2773 .\" NS doc-is-compact
2774 .\" NS doc-macro-name
2776 .\" NS local variables:
2780 . ds doc-macro-name Bd
2783 . nr doc-is-compact 0
2784 . ds doc-display-file
2786 . nr doc-display-depth +1
2788 . \" save current adjustment and fill modes
2789 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2790 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2792 . ie "\$1"-literal" \{\
2793 . ds doc-display-type-stack\n[doc-display-depth] literal
2794 . nr doc-curr-font \n[.f]
2795 . nr doc-curr-size \n[.ps]
2798 . nop \*[doc-Li-font]\c
2805 . el \{ .ie "\$1"-filled" \{\
2806 . ds doc-display-type-stack\n[doc-display-depth] filled
2810 . el \{ .ie "\$1"-ragged" \{\
2811 . ds doc-display-type-stack\n[doc-display-depth] ragged
2815 . el \{ .ie "\$1"-centered" \{\
2816 . ds doc-display-type-stack\n[doc-display-depth] centered
2820 . el \{ .ie "\$1"-unfilled" \{\
2821 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2825 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2826 . tm1 " in .Bd request (#\n[.c])
2830 . \" have we seen an argument?
2831 . if \n[doc-reg-Bd] \{\
2833 . \" check other arguments
2835 . doc-do-Bd-args \$@
2838 . \" avoid warning about non-existent register
2839 . if !r doc-display-indent-stack\n[doc-display-depth] \
2840 . nr doc-display-indent-stack\n[doc-display-depth] 0
2842 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2843 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2845 . if !\n[doc-is-compact] \{\
2846 . if !\n[doc-in-synopsis-count] \{\
2847 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2848 . sp \n[doc-display-vertical]u
2850 ' sp \n[doc-display-vertical]u
2856 . if !"\*[doc-display-file]"" \
2857 . so \*[doc-display-file]
2859 . nr doc-is-compact 0
2860 . ds doc-display-file
2863 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2864 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2869 .\" NS doc-do-Bd-args macro
2870 .\" NS resolve remaining .Bd arguments
2873 .\" NS doc-display-file
2874 .\" NS doc-display-indent-stackXXX
2875 .\" NS doc-is-compact
2877 .\" NS local variables:
2883 . ie "\$1"-offset" \{\
2887 . nr doc-display-indent-stack\n[doc-display-depth] 0
2888 . el \{ .ie "\$2"right" \
2889 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2890 . el \{ .ie "\$2"center" \
2891 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2892 . el \{ .ie "\$2"indent" \
2893 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2894 . el \{ .ie "\$2"indent-two" \
2895 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2900 . \" not a known keyword
2901 . if (\n[doc-reg-ddBa] == 1) \{\
2903 . \" test whether argument is a valid numeric expression
2905 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2907 . doc-get-width "\$2"
2908 . ie (\n[doc-width] <= 3) \{\
2909 . \" if the offset parameter is a macro, use the macro's
2910 . \" width as specified in doc-common
2911 . doc-get-arg-type "\$2"
2912 . ie (\n[doc-arg-type] == 1) \
2913 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2915 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2918 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2921 . el \{ .ie "\$1"-compact" \
2922 . nr doc-is-compact 1
2923 . el \{ .ie "\$1"-file" \{\
2925 . ds doc-display-file "\$2
2929 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2932 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2935 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2936 . shift \n[doc-reg-ddBa]
2937 . doc-do-Bd-args \$@
2942 .\" NS Ed user macro
2946 .\" NS doc-display-depth
2947 .\" NS doc-display-indent-stackXXX
2948 .\" NS doc-display-type-stackXXX
2949 .\" NS doc-macro-name
2951 .\" NS width register `Ed' set in doc-common
2954 . ds doc-macro-name Ed
2958 . if !\n[doc-display-depth] \{\
2959 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2960 . nr doc-display-depth 1
2963 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2964 . ft \n[doc-curr-font]
2965 . ps \n[doc-curr-size]u
2968 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2970 . \" restore saved adjustment and fill modes
2971 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2975 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2977 . nr doc-display-indent-stack\n[doc-display-depth] 0
2978 . ds doc-display-type-stack\n[doc-display-depth]
2979 . nr doc-display-depth -1
2983 .\" NS doc-list-type-stackXXX global string
2984 .\" NS stack of list types
2987 .\" NS doc-list-depth
2989 .ds doc-list-type-stack1
2992 .\" NS doc-list-indent-stackXXX global register
2993 .\" NS stack of list indentation values
2996 .\" NS doc-list-depth
2998 .nr doc-list-indent-stack1 0
3001 .\" NS doc-have-indent global register (bool)
3002 .\" NS an indentation value is active
3004 .nr doc-have-indent 0
3007 .\" NS Bl user macro
3010 .\" NS width register `Bl' set in doc-common
3015 .\" NS doc-have-diag-list
3016 .\" NS doc-list-depth
3017 .\" NS doc-have-indent
3018 .\" NS doc-list-indent-stackXXX
3019 .\" NS doc-list-type-stackXXX
3020 .\" NS doc-macro-name
3022 .\" NS doc-num-columns
3024 .\" NS local variables:
3029 . ds doc-macro-name Bl
3030 . nr doc-list-depth +1
3033 . ie "\$1"-hang" \{\
3034 . ds doc-list-type-stack\n[doc-list-depth] hang-list
3035 . nr doc-list-indent-stack\n[doc-list-depth] 6n
3036 . nr doc-have-indent 1
3038 . el \{ .ie "\$1"-tag" \{\
3039 . ds doc-list-type-stack\n[doc-list-depth] tag-list
3040 . nr doc-have-indent 1
3042 . el \{ .ie "\$1"-item" \{\
3043 . ds doc-list-type-stack\n[doc-list-depth] item-list
3044 . nr doc-have-indent 1
3046 . el \{ .ie "\$1"-enum" \{\
3047 . ds doc-list-type-stack\n[doc-list-depth] enum-list
3048 . nr doc-list-indent-stack\n[doc-list-depth] 3n
3049 . nr doc-have-indent 1
3051 . el \{ .ie "\$1"-bullet" \{\
3052 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
3053 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3054 . nr doc-have-indent 1
3056 . el \{ .ie "\$1"-dash" \{\
3057 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3058 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3059 . nr doc-have-indent 1
3061 . el \{ .ie "\$1"-hyphen" \{\
3062 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3063 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3064 . nr doc-have-indent 1
3066 . el \{ .ie "\$1"-inset" \{\
3067 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3068 . nr doc-have-indent 1
3070 . el \{ .ie "\$1"-diag" \{\
3071 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3072 . nr doc-have-diag-list 1
3074 . el \{ .ie "\$1"-ohang" \{\
3075 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3076 . nr doc-have-indent 1
3078 . el \{ .ie "\$1"-column" \{\
3079 . ds doc-list-type-stack\n[doc-list-depth] column-list
3083 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3084 . tm1 " in .Bl request
3087 . \}\}\}\}\}\}\}\}\}\}\}
3089 . \" we have seen a list type
3090 . ie \n[doc-arg-ptr] \{\
3093 . \" fill argument vector
3095 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3096 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3100 . doc-increment-list-stack
3103 . nr doc-arg-limit \n[.$]
3107 . \" initialize column list
3108 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3109 . doc-set-column-tab \n[doc-num-columns]
3110 . nr doc-list-indent-stack\n[doc-list-depth] 0
3111 ' in -\n[doc-column-indent-width]u
3112 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3113 . sp \n[doc-display-vertical]u
3116 . nr doc-num-columns 0
3128 .\" NS doc-Bl-usage macro
3131 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3132 . tm1 " [-width <string>] [-xwidth <command>]
3133 . tm1 " [-offset <string>] [-compact]
3134 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3135 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3136 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3140 .\" NS doc-have-tag-width global register (bool)
3141 .\" NS set if a tag width has been explicitly given
3143 .nr doc-have-tag-width 0
3146 .\" NS doc-do-Bl-args macro
3147 .\" NS resolve remaining .Bl arguments
3152 .\" NS doc-compact-list-stackXXX
3153 .\" NS doc-have-tag-width
3154 .\" NS doc-list-indent-stackXXX
3155 .\" NS doc-list-offset-stackXXX
3156 .\" NS doc-num-columns
3157 .\" NS doc-tag-prefix-stackXXX
3158 .\" NS doc-tag-width-stackXXX
3160 .\" NS local variables:
3164 .\" NS doc-reg-dBla1
3165 .\" NS doc-reg-dBla2
3166 .\" NS doc-reg-dBla3
3167 .\" NS doc-reg-dBla4
3169 .\" NS doc-str-dBla1
3173 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
3176 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3177 . nr doc-compact-list-stack\n[doc-list-depth] 1
3179 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3180 . ie (\n[doc-list-depth] > 1) \{\
3181 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3182 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3183 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3184 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3185 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3188 . tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
3191 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3193 . \" XXX: this code should be modified to handle nested lists
3195 . nr doc-have-tag-width 1
3196 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3197 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3199 . \" test whether argument is a valid numeric expression
3200 . nr doc-reg-dBla1 0
3201 . if \B
\a(\*[doc-str-dBla])
\a \{\
3202 . \" disable warnings related to scaling indicators (32)
3203 . nr doc-reg-dBla2 \n[.warn]
3204 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3206 . \" values without a scaling indicator are taken as strings;
3207 . \" we test whether the parameter string with and without the last
3208 . \" character yields identical numerical results (ignoring the
3209 . \" scaling indicator)
3210 . ds doc-str-dBla1 "\*[doc-str-dBla]
3211 . substring doc-str-dBla1 1 -1
3212 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3213 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3214 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3215 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3216 . nr doc-reg-dBla1 1
3219 . \" enable all warnings again
3220 . warn \n[doc-reg-dBla2]
3223 . ie \n[doc-reg-dBla1] \
3224 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3226 . doc-get-arg-width \n[doc-arg-ptr]
3227 . ie (\n[doc-width] == 2) \{\
3228 . \" if the width parameter is a macro, use the macro's
3229 . \" width as specified in doc-common
3230 . doc-get-arg-type \*[doc-str-dBla]
3231 . ie (\n[doc-arg-type] == 1) \
3232 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3234 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3237 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3240 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3242 . \" XXX: this code should be modified to handle nested lists
3244 . nr doc-have-tag-width 1
3245 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3247 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3248 . substring doc-str-dBla 1 2
3249 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3250 . \" execute string in a box to get the width of the diversion
3251 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3252 . doc-save-global-vars
3259 . nop \*[doc-str-dBla]
3263 . doc-restore-global-vars
3264 . doc-get-width \h'\n[dl]u'
3266 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3269 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3272 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3273 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3275 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3277 . ie \B
\a\*[doc-str-dBla]
\a \
3278 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3280 . doc-get-arg-width \n[doc-arg-ptr]
3281 . ie (\n[doc-width] == 2) \{\
3282 . doc-get-arg-type \*[doc-str-dBla]
3283 . ie (\n[doc-arg-type] == 1) \
3284 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3286 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3289 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3295 . \" not a known keyword, so it specifies the width of the next column
3296 . \" (if it is a column list)
3297 . if !\n[doc-reg-dBla] \{\
3298 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3299 . nr doc-num-columns +1
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 request (#\n[.c])
3307 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3313 .\" NS doc-save-global-vars macro
3314 .\" NS save all global variables
3316 .\" NS local variables:
3319 .de doc-save-global-vars
3320 . nr doc-debug-saved \n[doc-debug]
3321 . ds doc-macro-name-saved "\*[doc-macro-name]
3322 . nr doc-arg-limit-saved \n[doc-arg-limit]
3323 . nr doc-num-args-saved \n[doc-num-args]
3324 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3327 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3328 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3329 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3330 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3331 . nr doc-reg-dsgv +1
3334 . nr doc-curr-font-saved \n[doc-curr-font]
3335 . nr doc-curr-size-saved \n[doc-curr-size]
3336 . nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
3337 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
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-reg-dsgv +1
3363 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3366 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3367 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3368 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3369 . nr doc-reg-dsgv +1
3372 . nr doc-list-depth-saved \n[doc-list-depth]
3375 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3376 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3377 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3378 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3379 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3380 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3381 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3382 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3383 . nr doc-reg-dsgv +1
3386 . nr doc-have-indent-saved \n[doc-have-indent]
3387 . nr doc-have-tag-width-saved \n[doc-have-tag-width]
3388 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3389 . nr doc-curr-type-saved \n[doc-curr-type]
3390 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3391 . nr doc-have-diag-list-saved \n[doc-have-diag-list]
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-next-list-depth-saved \n[doc-next-list-depth]
3395 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3396 . nr doc-is-func-saved \n[doc-is-func]
3397 . nr doc-have-old-func-saved \n[doc-have-old-func]
3398 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3399 . ds doc-func-arg-saved "\*[doc-func-arg]
3400 . nr doc-num-func-args-saved \n[doc-num-func-args]
3401 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3402 . nr doc-have-func-saved \n[doc-have-func]
3403 . nr doc-is-reference-saved \n[doc-is-reference]
3404 . nr doc-reference-count-saved \n[doc-reference-count]
3405 . nr doc-author-count-saved \n[doc-author-count]
3408 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3409 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3410 . nr doc-reg-dsgv +1
3413 . nr doc-book-count-saved \n[doc-book-count]
3414 . ds doc-book-name-saved "\*[doc-book-name]
3415 . nr doc-date-count-saved \n[doc-date-count]
3416 . ds doc-date-saved "\*[doc-date]
3417 . nr doc-publisher-count-saved \n[doc-publisher-count]
3418 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3419 . nr doc-journal-count-saved \n[doc-journal-count]
3420 . ds doc-journal-name-saved "\*[doc-journal-name]
3421 . nr doc-issue-count-saved \n[doc-issue-count]
3422 . ds doc-issue-name-saved "\*[doc-issue-name]
3423 . nr doc-optional-count-saved \n[doc-optional-count]
3424 . ds doc-optional-string-saved "\*[doc-optional-string]
3425 . nr doc-page-number-count-saved \n[doc-page-number-count]
3426 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3427 . nr doc-corporate-count-saved \n[doc-corporate-count]
3428 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3429 . nr doc-report-count-saved \n[doc-report-count]
3430 . ds doc-report-name-saved "\*[doc-report-name]
3431 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3432 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3433 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3434 . nr doc-volume-count-saved \n[doc-volume-count]
3435 . ds doc-volume-name-saved "\*[doc-volume-name]
3436 . nr doc-have-author-saved \n[doc-have-author]
3438 . ds doc-document-title-saved "\*[doc-document-title]
3439 . ds doc-volume-saved "\*[doc-volume]
3440 . ds doc-section-saved "\*[doc-section]
3441 . ds doc-operating-system-saved "\*[doc-operating-system]
3442 . ds doc-date-string-saved "\*[doc-date-string]
3443 . nr doc-header-space-saved \n[doc-header-space]
3444 . nr doc-footer-space-saved \n[doc-footer-space]
3445 . nr doc-display-vertical-saved \n[doc-display-vertical]
3446 . ds doc-header-string-saved "\*[doc-header-string]
3447 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3448 . nr doc-in-files-section-saved \n[doc-in-files-section]
3449 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3453 .\" NS doc-restore-global-vars macro
3454 .\" NS restore all global variables
3456 .\" NS local variables:
3459 .de doc-restore-global-vars
3460 . nr doc-debug \n[doc-debug-saved]
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-count \n[doc-in-synopsis-count-saved]
3477 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3478 . nr doc-have-decl \n[doc-have-decl-saved]
3479 . nr doc-have-var \n[doc-have-var-saved]
3480 . ds doc-command-name "\*[doc-command-name-saved]
3481 . ds doc-quote-left "\*[doc-quote-left-saved]
3482 . ds doc-quote-right "\*[doc-quote-right-saved]
3483 . nr doc-nesting-level \n[doc-nesting-level-saved]
3484 . nr doc-in-list \n[doc-in-list-saved]
3485 . ds doc-space "\*[doc-space-saved]
3486 . ds doc-saved-space "\*[doc-saved-space-saved]
3487 . nr doc-space-mode \n[doc-space-mode-saved]
3488 . nr doc-have-space \n[doc-have-space-saved]
3489 . nr doc-have-slot \n[doc-have-slot-saved]
3490 . nr doc-keep-type \n[doc-keep-type-saved]
3491 . nr doc-display-depth \n[doc-display-depth-saved]
3492 . nr doc-is-compact \n[doc-is-compact-saved]
3495 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3496 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3497 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3498 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3499 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3500 . nr doc-reg-drgv +1
3503 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3506 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3507 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3508 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3509 . nr doc-reg-drgv +1
3512 . nr doc-list-depth \n[doc-list-depth-saved]
3515 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3516 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3517 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3518 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3519 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3520 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3521 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3522 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3523 . nr doc-reg-drgv +1
3526 . nr doc-have-indent \n[doc-have-indent-saved]
3527 . nr doc-have-tag-width \n[doc-have-tag-width-saved]
3528 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3529 . nr doc-curr-type \n[doc-curr-type-saved]
3530 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3531 . nr doc-have-diag-list \n[doc-have-diag-list-saved]
3532 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3533 . nr doc-num-columns \n[doc-num-columns-saved]
3534 . nr doc-next-list-depth \n[doc-next-list-depth-saved]
3535 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3536 . nr doc-is-func \n[doc-is-func-saved]
3537 . nr doc-have-old-func \n[doc-have-old-func-saved]
3538 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3539 . ds doc-func-arg "\*[doc-func-arg-saved]
3540 . nr doc-num-func-args \n[doc-num-func-args-saved]
3541 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3542 . nr doc-have-func \n[doc-have-func-saved]
3543 . nr doc-is-reference \n[doc-is-reference-saved]
3544 . nr doc-reference-count \n[doc-reference-count-saved]
3545 . nr doc-author-count \n[doc-author-count-saved]
3548 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3549 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3550 . nr doc-reg-drgv +1
3553 . nr doc-book-count \n[doc-book-count-saved]
3554 . ds doc-book-name "\*[doc-book-name-saved]
3555 . nr doc-date-count \n[doc-date-count-saved]
3556 . ds doc-date "\*[doc-date-saved]
3557 . nr doc-publisher-count \n[doc-publisher-count-saved]
3558 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3559 . nr doc-journal-count \n[doc-journal-count-saved]
3560 . ds doc-journal-name "\*[doc-journal-name-saved]
3561 . nr doc-issue-count \n[doc-issue-count-saved]
3562 . ds doc-issue-name "\*[doc-issue-name-saved]
3563 . nr doc-optional-count \n[doc-optional-count-saved]
3564 . ds doc-optional-string "\*[doc-optional-string-saved]
3565 . nr doc-page-number-count \n[doc-page-number-count-saved]
3566 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3567 . nr doc-corporate-count \n[doc-corporate-count-saved]
3568 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3569 . nr doc-report-count \n[doc-report-count-saved]
3570 . ds doc-report-name "\*[doc-report-name-saved]
3571 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3572 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3573 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3574 . nr doc-volume-count \n[doc-volume-count-saved]
3575 . ds doc-volume-name "\*[doc-volume-name-saved]
3576 . nr doc-have-author \n[doc-have-author-saved]
3578 . ds doc-document-title "\*[doc-document-title-saved]
3579 . ds doc-volume "\*[doc-volume-saved]
3580 . ds doc-section "\*[doc-section-saved]
3581 . ds doc-operating-system "\*[doc-operating-system-saved]
3582 . ds doc-date-string "\*[doc-date-string-saved]
3583 . nr doc-header-space \n[doc-header-space-saved]
3584 . nr doc-footer-space \n[doc-footer-space-saved]
3585 . nr doc-display-vertical \n[doc-display-vertical-saved]
3586 . ds doc-header-string "\*[doc-header-string-saved]
3587 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3588 . nr doc-in-files-section \n[doc-in-files-section-saved]
3589 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3593 .\" NS El user macro
3597 .\" NS doc-have-diag-list
3598 .\" NS doc-list-depth
3599 .\" NS doc-macro-name
3601 .\" NS local variables:
3604 .\" NS width register `El' set in doc-common
3608 . tm Usage: .El (does not take arguments) (#\n[.c])
3610 . ds doc-macro-name El
3611 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3613 . ie "\*[doc-str-El]"diag-list" \{\
3614 . nr doc-have-diag-list 0
3617 . el \{ .ie "\*[doc-str-El]"column-list" \
3618 . doc-end-column-list
3619 . el \{ .ie "\*[doc-str-El]"item-list" \
3621 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3623 . el \{ .ie "\*[doc-str-El]"inset-list" \
3634 .\" NS doc-saved-Pa-font global string
3635 .\" NS saved doc-Pa-font string for section FILES (no underline if
3638 .ds doc-saved-Pa-font
3641 .\" NS doc-curr-type global register
3642 .\" NS current argument type
3647 .\" NS doc-curr-arg global string
3648 .\" NS current argument
3653 .\" NS doc-item-boxXXX global box
3654 .\" NS item boxes associated list depth
3657 .\" NS doc-list-depth
3660 .\" NS It user macro
3667 .\" NS doc-curr-type
3669 .\" NS doc-macro-name
3671 .\" NS doc-saved-Pa-font
3673 .\" NS local variables:
3676 .\" NS doc-XXX-list-type
3678 .\" NS width register `It' set in doc-common
3680 .nr doc-bullet-list-type 1
3681 .nr doc-column-list-type 0
3682 .nr doc-dash-list-type 1
3683 .nr doc-diag-list-type 0
3684 .nr doc-enum-list-type 1
3685 .nr doc-hang-list-type 2
3686 .nr doc-inset-list-type 2
3687 .nr doc-item-list-type 1
3688 .nr doc-ohang-list-type 2
3689 .nr doc-tag-list-type 2
3692 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3694 . if "\*[doc-str-It]"" \
3695 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3697 . if \n[doc-nesting-level] \{\
3698 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3707 . ds doc-macro-name It
3709 . \" fill argument vector
3711 . while (\n[doc-reg-It] <= \n[.$]) \{\
3712 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3716 . nr doc-num-args \n[.$]
3720 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3722 . if \n[doc-reg-It] \{\
3724 . box doc-item-box\n[doc-list-depth]
3725 . ev doc-item-env\n[doc-list-depth]
3731 . ie (\n[doc-reg-It] == 1) \{\
3733 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3734 . tm1 " don't take arguments (#\n[.c])
3738 . if (\n[doc-reg-It] == 2) \{\
3739 . \" handle list types with arguments
3740 . doc-parse-arg-vector
3744 . nr doc-curr-type \n[doc-type1]
3745 . ds doc-curr-arg "\*[doc-arg1]
3747 . if \n[doc-in-files-section] \{\
3748 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3750 . ds doc-Pa-font "\*[doc-No-font]
3753 . ie (\n[doc-type1] == 1) \
3757 . doc-print-recursive
3760 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3761 . tm1 " require arguments (#\n[.c])
3765 . \" the previous call of `.doc-print-recursive' can contain calls to
3766 . \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
3767 . if !\n[doc-nesting-level] \
3768 . doc-\*[doc-str-It]
3772 .\" NS doc-inset-list macro
3773 .\" NS .It item of list-type inset
3779 . \" finish item box
3783 . unformat doc-item-box\n[doc-list-depth]
3785 . doc-set-vertical-and-indent 0
3789 . doc-item-box\n[doc-list-depth]
3796 .\" NS doc-hang-list macro
3797 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3800 .\" NS doc-have-space
3803 .\" NS local variables:
3808 . \" finish item box
3812 . unformat doc-item-box\n[doc-list-depth]
3814 . doc-set-vertical-and-indent 1
3815 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3816 . ti -\n[doc-reg-dhl]u
3819 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3820 . doc-item-box\n[doc-list-depth]
3822 . chop doc-item-box\n[doc-list-depth]
3823 . nr doc-reg-dhl1 \n[.k]u
3824 . nop \*[doc-item-box\n[doc-list-depth]]\c
3825 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3826 . nr doc-have-space 1
3834 .\" NS doc-ohang-list macro
3835 .\" NS .It item of list-type overhanging tag
3841 . \" finish item box
3845 . unformat doc-item-box\n[doc-list-depth]
3847 . doc-set-vertical-and-indent 0
3849 . doc-item-box\n[doc-list-depth]
3857 .\" NS doc-item-list macro
3858 .\" NS .It item of list-type [empty tag]
3861 . \" finish (dummy) item box
3866 . doc-set-vertical-and-indent 0
3873 .\" NS doc-enum-list-count-stackXXX global register
3874 .\" NS stack of current enum count values
3877 .\" NS doc-list-depth
3879 .nr doc-enum-list-count-stack1 0
3882 .\" NS doc-enum-list macro
3883 .\" NS enumerated list
3886 .\" NS doc-enum-list-count-stackXXX
3891 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3893 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3895 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3896 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3901 .\" NS doc-bullet-list macro
3902 .\" NS bullet paragraph list
3909 . nop \)\*[doc-Sy-font]\[bu]\f[P]
3914 .\" NS doc-dash-list macro
3915 .\" NS hyphen paragraph list (sub bullet list)
3922 . nop \)\*[doc-Sy-font]\-\f[P]
3927 .\" NS doc-do-list macro
3928 .\" NS .It item of list-type enum/bullet/hyphen
3930 .als doc-do-list doc-hang-list
3933 .\" NS doc-have-diag-list global register (bool)
3934 .\" NS set if last item was a diag list
3936 .\" XXX: this should be modified to handle nested lists of any type
3938 .nr doc-have-diag-list 0
3941 .\" NS doc-diag-list-input-line-count global register
3942 .\" NS saved line number to be checked in next diag-list item
3944 .nr doc-diag-list-input-line-count 0
3947 .\" NS doc-diag-list macro
3948 .\" NS .It item of list-type diagnostic-message
3951 .\" NS doc-curr-font
3952 .\" NS doc-curr-size
3953 .\" NS doc-diag-list-input-line-count
3956 . nr doc-curr-font \n[.f]
3957 . nr doc-curr-size \n[.ps]
3959 . ie \n[doc-have-diag-list] \{\
3960 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
3967 . nr doc-diag-list-input-line-count \n[.c]
3970 . nop \*[doc-Sy-font]\c
3971 . if \n[doc-num-args] \
3972 . doc-remaining-args
3973 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3975 . doc-print-and-reset
3979 .\" NS doc-tag-list macro
3980 .\" NS .It item of list-type `tag'
3983 .\" NS doc-have-space
3986 .\" NS local variables:
3992 . \" finish item box
3996 . unformat doc-item-box\n[doc-list-depth]
3998 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
4005 . doc-item-box\n[doc-list-depth]
4010 . if !\n[doc-have-tag-width] \
4012 . doc-set-vertical-and-indent 1
4013 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4014 . ti -\n[doc-reg-dtl]u
4017 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
4018 . doc-item-box\n[doc-list-depth]
4022 . chop doc-item-box\n[doc-list-depth]
4023 . nr doc-reg-dtl1 \n[.k]u
4024 . nop \*[doc-item-box\n[doc-list-depth]]\c
4025 . nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
4026 . nr doc-have-space 1
4029 . if \n[doc-in-files-section] \
4031 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4038 .\" NS doc-get-tag-width macro
4039 .\" NS resolve unknown tag width (.Bl [inset | tag] only)
4042 .\" NS doc-have-indent
4043 .\" NS doc-list-indent-stackXXX
4044 .\" NS doc-tag-width-stackXXX
4048 .\" NS doc-curr-type
4050 .de doc-get-tag-width
4051 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4052 . ie (\n[doc-curr-type] == 1) \{\
4053 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4054 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4057 . ds doc-tag-width-stack\n[doc-list-depth] No
4058 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4060 . nr doc-have-tag-width 1
4065 .\" NS doc-set-vertical-and-indent macro
4066 .\" NS set up vertical spacing (if not compact) and indentation (with
4067 .\" NS offset if argument is non-zero)
4070 .\" NS doc-have-indent
4071 .\" NS doc-have-tag-width
4073 .de doc-set-vertical-and-indent
4074 . ie \n[doc-have-indent] \{\
4075 . nr doc-have-indent 0
4076 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4077 . sp \n[doc-display-vertical]u
4078 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
4080 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4083 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4084 . sp \n[doc-display-vertical]u
4092 .\" NS doc-list-depth global register
4093 .\" NS list type stack counter
4095 .nr doc-list-depth 0
4098 .\" NS doc-num-columns global register
4099 .\" NS number of columns
4101 .nr doc-num-columns 0
4104 .\" NS doc-compact-list-stackXXX global register (bool)
4105 .\" NS stack of flags to indicate whether a particular list is compact
4108 .\" NS doc-list-depth
4110 .nr doc-compact-list-stack1 0
4113 .\" NS doc-tag-prefix-stackXXX global string
4114 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4117 .\" NS doc-list-depth
4119 .ds doc-tag-prefix-stack1
4122 .\" NS doc-tag-width-stackXXX global string
4123 .\" NS stack of strings indicating how to set up current element of
4124 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4125 .\" NS directly; if it is a macro name, use the macro's width value;
4126 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4129 .\" NS doc-list-depth
4131 .ds doc-tag-width-stack0
4132 .ds doc-tag-width-stack1
4135 .\" NS doc-list-offset-stackXXX global register
4136 .\" NS stack of list offsets
4139 .\" NS doc-list-depth
4141 .nr doc-list-offset-stack1 0
4144 .\" NS doc-end-list macro
4145 .\" NS list end function; resets indentation (and offset if argument is
4149 .\" NS doc-list-depth
4150 .\" NS doc-list-offset-stackXXX
4154 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4156 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4157 . nr doc-list-offset-stack\n[doc-list-depth] 0
4159 . if (\n[doc-list-depth] <= 0) \
4160 . tm mdoc warning: extraneous .El call (#\n[.c])
4162 . doc-decrement-list-stack
4163 . nr doc-list-depth -1
4164 . doc-increment-list-stack
4166 . nr doc-have-tag-width 0
4170 .\" NS doc-next-list-depth global register
4171 .\" NS next possible doc-list-depth value
4173 .nr doc-next-list-depth 1
4176 .\" NS doc-increment-list-stack macro
4177 .\" NS set up next block for list
4180 .\" NS doc-compact-list-stackXXX
4181 .\" NS doc-list-indent-stackXXX
4182 .\" NS doc-list-offset-stackXXX
4183 .\" NS doc-list-type-stackXXX
4184 .\" NS doc-next-list-depth
4185 .\" NS doc-tag-prefix-stackXXX
4186 .\" NS doc-tag-width-stackXXX
4187 .\" NS doc-enum-list-count-stackXXX
4189 .de doc-increment-list-stack
4190 . nr doc-next-list-depth (\n[doc-list-depth] + 1)
4191 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4192 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4193 . ds doc-tag-prefix-stack\n[doc-next-list-depth]
4194 . ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
4195 . ds doc-list-type-stack\n[doc-next-list-depth]
4196 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4197 . nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
4201 .\" NS doc-decrement-list-stack macro
4202 .\" NS decrement stack
4205 .\" NS doc-compact-list-stackXXX
4206 .\" NS doc-list-indent-stackXXX
4207 .\" NS doc-list-offset-stackXXX
4208 .\" NS doc-list-type-stackXXX
4209 .\" NS doc-next-list-depth
4210 .\" NS doc-tag-prefix-stackXXX
4211 .\" NS doc-tag-width-stackXXX
4212 .\" NS doc-enum-list-count-stackXXX
4214 .de doc-decrement-list-stack
4215 . ds doc-list-type-stack\n[doc-next-list-depth]
4216 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4217 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4218 . ds doc-tag-prefix-stack\n[doc-next-list-depth]
4219 . ds doc-tag-width-stack\n[doc-next-list-depth]
4220 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4221 . nr doc-enum-list-count-stack\n[doc-next-list-depth] 0
4222 . nr doc-next-list-depth -1
4226 .\" NS Xr user macro
4227 .\" NS cross reference (for man pages only)
4231 .\" NS doc-macro-name
4233 .\" NS local variables:
4236 .\" NS width register `Xr' set in doc-common
4239 . if !\n[doc-arg-limit] \{\
4241 . ds doc-macro-name Xr
4242 . doc-parse-args \$@
4248 . if \n[doc-arg-limit] \{\
4250 . doc-print-prefixes
4251 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4252 . \" first argument must be a string
4253 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4254 . nr doc-curr-font \n[.f]
4255 . nr doc-curr-size \n[.ps]
4256 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4258 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4259 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4260 . \" modify second argument if it is a string and
4261 . \" remove space inbetween
4262 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4263 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4264 . ds doc-space\n[doc-arg-ptr]
4267 . doc-print-recursive
4278 .\" NS doc-Xr-usage macro
4281 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4286 .\" NS Sx user macro
4287 .\" NS cross section reference
4289 .\" NS width register `Sx' set in doc-common
4291 .als Sx doc-generic-macro
4292 .ds doc-Sx-usage section_header
4295 .\" NS doc-end-column-list macro
4296 .\" NS column-list end-list
4299 .\" NS doc-list-depth
4301 .de doc-end-column-list
4303 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4306 . doc-decrement-list-stack
4307 . nr doc-list-depth -1
4308 . doc-increment-list-stack
4312 .\" NS doc-column-indent-width global register
4313 .\" NS holds the indent width for a column list
4315 .nr doc-column-indent-width 0
4318 .\" NS doc-set-column-tab macro
4319 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4322 .\" NS doc-column-indent-width
4324 .\" NS local variables:
4327 .\" NS doc-str-dsct1
4329 .de doc-set-column-tab
4332 . nr doc-column-indent-width 0
4335 . ds doc-str-dsct1 " \"
4338 . ds doc-str-dsct1 " \"
4340 . \" XXX: this is packed abnormally close -- intercolumn width
4341 . \" should be configurable
4342 . ds doc-str-dsct1 " \"
4345 . while (\n[doc-reg-dsct] <= \$1) \{\
4346 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4347 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4348 . nr doc-reg-dsct +1
4351 . ta \*[doc-str-dsct]
4352 ' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
4356 .\" NS doc-column-list macro
4361 .\" NS doc-list-indent-stackXXX
4364 .\" NS local variables:
4368 . if \n[doc-num-args] \
4369 . doc-parse-arg-vector
4372 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
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]]
4389 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4393 .\" NS Ta user macro
4394 .\" NS append tab (\t)
4399 .\" NS width register `Ta' set in doc-common
4402 . ie \n[doc-arg-limit] \{\
4405 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4406 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4411 . tm1 "Usage: Ta must follow column entry: e.g. (#\n[.c])
4412 . tm1 " .It column_string [Ta [column_string ...]]
4417 .\" NS Dl user macro
4418 .\" NS display (one line) literal
4420 .\" NS this function uses the `Li' font
4424 .\" NS doc-curr-font
4425 .\" NS doc-curr-size
4426 .\" NS doc-macro-name
4428 .\" NS width register `Dl' set in doc-common
4432 . in +\n[doc-display-indent]u
4434 . ie \n[doc-arg-limit] \{\
4435 . tm Usage: .Dl not callable by other macros (#\n[.c])
4440 . ds doc-macro-name Dl
4441 . doc-parse-args \$@
4443 . nr doc-curr-font \n[.f]
4444 . nr doc-curr-size \n[.ps]
4445 . nop \*[doc-Li-font]\c
4446 . doc-print-recursive
4449 . tm Usage: .Dl argument ... (#\n[.c])
4452 . in -\n[doc-display-indent]u
4456 .\" NS D1 user macro
4457 .\" NS display (one line)
4461 .\" NS doc-macro-name
4463 .\" NS width register `D1' set in doc-common
4467 . in +\n[doc-display-indent]u
4469 . ie \n[doc-arg-limit] \{\
4470 . tm Usage: .D1 not callable by other macros (#\n[.c])
4475 . ds doc-macro-name D1
4476 . doc-parse-args \$@
4478 . doc-print-recursive
4481 . tm Usage: .D1 argument ... (#\n[.c])
4484 . in -\n[doc-display-indent]u
4488 .\" NS Ex user macro
4492 . tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
4496 .\" NS Vt user macro
4497 .\" NS variable type (for forcing old style variable declarations);
4498 .\" NS this is not done in the same manner as .Ot for fortrash --
4499 .\" NS clean up later
4502 .\" NS doc-curr-font
4503 .\" NS doc-curr-size
4504 .\" NS doc-have-decl
4506 .\" NS doc-macro-name
4508 .\" NS width register `Vt' set in doc-common
4511 . if !\n[doc-arg-limit] \{\
4513 . ds doc-macro-name Vt
4514 . doc-parse-args \$@
4517 . tm Usage: .Vt variable_type ... (#\n[.c])
4520 . if \n[doc-arg-limit] \{\
4522 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4523 . if \n[doc-in-synopsis-count] \{\
4524 . \" if a function declaration was the last thing given,
4525 . \" want vertical space
4526 . if \n[doc-have-decl] \{\
4528 . nr doc-have-decl 0
4531 . \" if a subroutine was the last thing given, want vertical space
4532 . if \n[doc-have-func] \{\
4533 . ie \n[doc-have-var] \
4543 . nr doc-curr-font \n[.f]
4544 . nr doc-curr-size \n[.ps]
4545 . nop \*[doc-Ft-font]\c
4546 . doc-print-recursive
4548 . if \n[doc-in-synopsis-count] \{\
4549 . ie \n[doc-have-old-func] \
4550 . nop \*[doc-soft-space]\c
4556 . tm Usage: .Vt variable_type ... (#\n[.c])
4562 .\" NS doc-is-func global register (bool)
4563 .\" NS set if subroutine (in synopsis only) (fortran only)
4568 .\" NS Ft user macro
4569 .\" NS function type
4572 .\" NS doc-curr-font
4573 .\" NS doc-curr-size
4574 .\" NS doc-have-decl
4577 .\" NS doc-macro-name
4579 .\" NS width register `Ft' set in doc-common
4582 . if !\n[doc-arg-limit] \{\
4584 . ds doc-macro-name Ft
4585 . doc-parse-args \$@
4588 . tm Usage: .Ft function_type ... (#\n[.c])
4591 . if \n[doc-arg-limit] \{\
4593 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4594 . if \n[doc-in-synopsis-count] \{\
4595 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4597 . nr doc-have-decl 0
4601 . if \n[doc-have-var] \{\
4609 . nr doc-curr-font \n[.f]
4610 . nr doc-curr-size \n[.ps]
4611 . nop \*[doc-Ft-font]\c
4612 . doc-print-recursive
4615 . tm Usage: .Ft function_type ... (#\n[.c])
4621 .\" NS doc-have-old-func global register (bool)
4622 .\" NS set if `Ot' has been called
4624 .nr doc-have-old-func 0
4627 .\" NS Ot user macro
4628 .\" NS old function type (fortran -- no newline)
4631 .\" NS doc-have-decl
4632 .\" NS doc-have-old-func
4636 .\" NS width register `Ot' set in doc-common
4639 . nr doc-have-old-func 1
4641 . if \n[doc-in-synopsis-count] \{\
4642 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4644 . nr doc-have-decl 0
4648 . if \n[doc-have-var] \{\
4657 . nop \*[doc-Ft-font]\$*\c
4662 .\" NS Fa user macro
4663 .\" NS function arguments
4667 .\" NS doc-curr-font
4668 .\" NS doc-curr-size
4669 .\" NS doc-macro-name
4671 .\" NS width register `Fa' set in doc-common
4674 . if !\n[doc-arg-limit] \{\
4676 . ds doc-macro-name Fa
4677 . doc-parse-args \$@
4680 . tm Usage: .Fa function_arguments ... (#\n[.c])
4683 . ie \n[doc-func-arg-count] \
4687 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4688 . nr doc-curr-font \n[.f]
4689 . nr doc-curr-size \n[.ps]
4690 . nop \*[doc-Fa-font]\c
4691 . doc-print-recursive
4693 . if \n[doc-in-synopsis-count] \
4694 . if \n[doc-have-func] \
4700 .\" NS doc-func-arg-count global register
4701 .\" NS how many function arguments have been processed so far
4703 .nr doc-func-arg-count 0
4706 .\" NS doc-func-arg global string
4707 .\" NS work buffer for function name strings
4712 .\" NS doc-num-func-args global register
4713 .\" NS number of function arguments
4715 .nr doc-num-func-args 0
4718 .\" NS doc-func-args-processed global register
4719 .\" NS function arguments processed so far
4721 .nr doc-func-args-processed 0
4724 .\" NS doc-do-func macro
4725 .\" NS internal .Fa for .Fc
4731 .\" NS doc-func-arg-count
4732 .\" NS doc-func-args-processed
4733 .\" NS doc-num-func-args
4736 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4740 . nr doc-num-func-args 0
4741 . nr doc-func-args-processed 0
4743 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4744 . if (\n[doc-num-func-args] > 1) \
4745 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4747 . if (\n[doc-func-arg-count] > 1) \{\
4748 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4749 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4750 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
4753 . if (\n[doc-func-arg-count] == 1) \{\
4754 . nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4757 . nr doc-func-arg-count +1
4765 .\" NS doc-have-func global register (bool)
4766 .\" NS whether we have more than one function in synopsis
4771 .\" NS Fn user macro
4776 .\" NS doc-curr-font
4777 .\" NS doc-curr-size
4778 .\" NS doc-have-decl
4779 .\" NS doc-have-func
4781 .\" NS doc-in-synopsis-count
4782 .\" NS doc-indent-synopsis
4784 .\" NS doc-macro-name
4786 .\" NS width register `Fn' set in doc-common
4789 . if !\n[doc-arg-limit] \{\
4791 . ds doc-macro-name Fn
4792 . doc-parse-args \$@
4795 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4798 . if \n[doc-in-synopsis-count] \{\
4799 . \" if there is/has been more than one subroutine declaration
4800 . ie \n[doc-is-func] \{\
4803 . nr doc-have-decl 0
4807 . if \n[doc-have-func] \{\
4810 . nr doc-have-decl 0
4813 . if \n[doc-have-decl] \{\
4818 . if \n[doc-have-var] \{\
4820 . nr doc-have-decl 0
4823 . nr doc-have-func 1
4827 . ie (\n[doc-in-synopsis-count] > 1) \
4830 . if !\n[doc-indent-synopsis] \
4831 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4834 . in +\n[doc-indent-synopsis]u
4835 . ti -\n[doc-indent-synopsis]u
4836 . nr doc-in-synopsis-count +1
4839 . if \n[doc-arg-limit] \{\
4841 . doc-print-prefixes
4842 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4843 . nr doc-curr-font \n[.f]
4844 . nr doc-curr-size \n[.ps]
4845 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4846 . nop \f[P]\s[0]\*[lp]\)\c
4849 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4850 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4851 . nop \*[doc-Fa-font]\c
4853 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4858 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4859 . \" output the space (if needed)
4861 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4864 . doc-print-recursive
4867 . doc-print-and-reset
4869 . if \n[doc-in-synopsis-count] \
4870 . in -\n[doc-indent-synopsis]u
4873 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4879 .\" NS doc-do-func-args macro
4880 .\" NS handle function arguments
4886 .\" NS doc-func-args-processed
4887 .\" NS doc-num-func-args
4889 .\" NS local variables:
4892 .de doc-do-func-args
4893 . if \n[doc-in-synopsis-count] \{\
4895 . nr doc-num-func-args 0
4896 . nr doc-func-args-processed 0
4898 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4899 . if (\n[doc-num-func-args] > 1) \
4900 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4903 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4906 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4907 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4908 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4909 . nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4910 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
4916 .\" NS doc-saved-nesting-level global register
4918 .nr doc-saved-nesting-level 0
4921 .\" NS doc-in-func-enclosure global register (bool)
4923 .nr doc-in-func-enclosure 0
4926 .\" NS Fo user macro
4927 .\" NS function open
4931 .\" NS doc-curr-font
4932 .\" NS doc-curr-size
4933 .\" NS doc-func-arg-count
4934 .\" NS doc-have-decl
4935 .\" NS doc-have-func
4937 .\" NS doc-in-func-enclosure
4938 .\" NS doc-in-synopsis-count
4939 .\" NS doc-indent-synopsis
4941 .\" NS doc-macro-name
4942 .\" NS doc-saved-nesting-level
4944 .\" NS width register `Fo' set in doc-common
4947 . ie (\n[doc-in-func-enclosure]) \
4948 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4950 . nr doc-saved-nesting-level \n[doc-nesting-level]
4951 . nr doc-in-func-enclosure 1
4953 . if !\n[doc-arg-limit] \{\
4955 . ds doc-macro-name Fo
4956 . doc-parse-args \$@
4959 . tm Usage: .Fo function_name (#\n[.c])
4962 . if \n[doc-in-synopsis-count] \{\
4963 . \" if there is/has been more than one subroutine declaration
4964 . ie \n[doc-is-func] \{\
4967 . nr doc-have-decl 0
4971 . if \n[doc-have-func] \{\
4974 . nr doc-have-decl 0
4977 . if \n[doc-have-decl] \{\
4982 . if \n[doc-have-var] \{\
4984 . nr doc-have-decl 0
4987 . nr doc-have-func 1
4991 . ie (\n[doc-in-synopsis-count] > 1) \
4994 . if !\n[doc-indent-synopsis] \
4995 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4998 . nr doc-in-synopsis-count +1
5001 . \" start function box
5009 . doc-print-prefixes
5010 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5011 . nr doc-func-arg-count 1
5012 . nr doc-curr-font \n[.f]
5013 . nr doc-curr-size \n[.ps]
5015 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
5016 . nop \f[P]\s[0]\*[lp]\)\c
5022 .\" NS Fc user macro
5023 .\" NS function close
5027 .\" NS doc-func-arg-count
5028 .\" NS doc-in-func-enclosure
5029 .\" NS doc-saved-nesting-level
5030 .\" NS doc-macro-name
5032 .\" NS width register `Fc' set in doc-common
5035 . ie !\n[doc-in-func-enclosure] \
5036 . tm mdoc warning: Extraneous .Fc (#\n[.c])
5039 . ds doc-macro-name Fc
5040 . \" the first (dummy) argument is used to get the correct spacing
5041 . doc-parse-args \) \$@
5044 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5045 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5047 . nr doc-func-arg-count 0
5048 . nr doc-in-func-enclosure 0
5052 . \" finish function box
5057 . unformat doc-func-box
5059 . if \n[doc-in-synopsis-count] \{\
5060 . in +\n[doc-indent-synopsis]u
5061 . ti -\n[doc-indent-synopsis]u
5065 . nop \*[doc-func-box]\c
5068 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5069 . nr doc-curr-font \n[.f]
5070 . nr doc-curr-size \n[.ps]
5071 . doc-print-recursive
5074 . doc-print-and-reset
5076 . if \n[doc-in-synopsis-count] \
5077 . in -\n[doc-indent-synopsis]u
5082 .\" NS doc-build-func-string macro
5083 .\" NS collect function arguments and set hard spaces inbetween
5087 .\" NS doc-func-args-processed
5088 .\" NS doc-num-func-args
5090 .de doc-build-func-string
5091 . if !\n[doc-num-func-args] \{\
5092 . nr doc-num-func-args \n[.$]
5093 . nr doc-func-args-processed 0
5097 . nr doc-func-args-processed +1
5098 . as doc-func-arg "\$1
5100 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5101 . as doc-func-arg "\*[doc-hard-space]
5104 . doc-build-func-string \$@
5109 .\" Very crude references: Stash all reference info into boxes, print out
5110 .\" reference on .Re request and clean up. Ordering very limited, no fancy
5111 .\" citations, but can do articles, journals, and books -- need to add
5112 .\" several missing options (like city etc). Should be able to grab a refer
5113 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5117 .\" NS doc-is-reference global register (bool)
5118 .\" NS set if in reference
5120 .nr doc-is-reference 0
5123 .\" NS doc-reference-count global register
5124 .\" NS reference element counter
5126 .nr doc-reference-count 0
5129 .\" NS Rs user macro
5130 .\" NS reference start
5133 .\" NS doc-is-reference
5134 .\" NS doc-reference-count
5136 .\" NS width register `Rs' set in doc-common
5140 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5142 . nr doc-is-reference 1
5143 . doc-reset-reference
5144 . if \n[doc-in-see-also-section] \
5146 . nr doc-reference-count 0
5151 .\" NS Re user macro
5152 .\" NS reference end
5155 .\" NS doc-is-reference
5157 .\" NS width register `Re' set in doc-common
5161 . tm Usage: .Re (does not take arguments) (#\n[.c])
5163 . doc-print-reference
5164 . doc-reset-reference
5165 . nr doc-is-reference 0
5170 .\" NS doc-reset-reference macro
5171 .\" NS reference cleanup
5174 .\" NS doc-author-count
5175 .\" NS doc-author-nameXXX
5176 .\" NS doc-book-count
5177 .\" NS doc-book-name
5178 .\" NS doc-corporate-count
5179 .\" NS doc-corporate-name
5181 .\" NS doc-date-count
5182 .\" NS doc-issue-count
5183 .\" NS doc-issue-name
5184 .\" NS doc-journal-count
5185 .\" NS doc-journam-name
5186 .\" NS doc-optional-count
5187 .\" NS doc-optional-string
5188 .\" NS doc-page-number-count
5189 .\" NS doc-page-number-string
5190 .\" NS doc-reference-title-count
5191 .\" NS doc-reference-title-name
5192 .\" NS doc-reference-title-name-for-book
5193 .\" NS doc-report-count
5194 .\" NS doc-report-name
5195 .\" NS doc-volume-count
5196 .\" NS doc-volume-name
5198 .de doc-reset-reference
5199 . while (\n[doc-author-count]) \{\
5200 . ds doc-author-name\n[doc-author-count]
5201 . nr doc-author-count -1
5203 . nr doc-journal-count 0
5204 . nr doc-issue-count 0
5205 . nr doc-optional-count 0
5206 . nr doc-corporate-count 0
5207 . nr doc-report-count 0
5208 . nr doc-reference-title-count 0
5209 . nr doc-volume-count 0
5210 . nr doc-date-count 0
5211 . nr doc-page-number-count 0
5212 . nr doc-book-count 0
5214 . ds doc-journal-name
5216 . ds doc-optional-string
5217 . ds doc-corporate-name
5218 . ds doc-report-name
5219 . ds doc-reference-title-name
5220 . ds doc-reference-title-name-for-book
5221 . ds doc-volume-name
5223 . ds doc-page-number-string
5228 .\" NS doc-finish-reference macro
5229 .\" NS auxiliary macro for doc-print-reference
5232 .\" NS doc-reference-count
5234 .de doc-finish-reference
5235 . nr doc-reference-count -1
5236 . ie \n[doc-reference-count] \
5243 .\" NS doc-print-reference macro
5244 .\" NS reference print
5247 .\" NS doc-reference-count
5249 .de doc-print-reference
5253 . if \n[doc-author-count] \{\
5254 . doc-print-reference-authors
5255 . nr doc-reference-count -\n[doc-author-count]
5258 . if \n[doc-reference-title-count] \{\
5259 . unformat doc-reference-title-name
5260 . chop doc-reference-title-name
5261 . unformat doc-reference-title-name-for-book
5262 . chop doc-reference-title-name-for-book
5263 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5264 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5265 . doc-finish-reference
5268 . nop \*[doc-reference-title-name]\c
5269 . doc-finish-reference
5272 . if \n[doc-book-count] \{\
5273 . unformat doc-book-name
5274 . chop doc-book-name
5275 . nop \*[doc-book-name]\c
5276 . doc-finish-reference
5279 . if \n[doc-publisher-count] \{\
5280 . unformat doc-publisher-name
5281 . chop doc-publisher-name
5282 . nop \*[doc-publisher-name]\c
5283 . doc-finish-reference
5286 . if \n[doc-journal-count] \{\
5287 . unformat doc-journal-name
5288 . chop doc-journal-name
5289 . nop \*[doc-journal-name]\c
5290 . doc-finish-reference
5293 . if \n[doc-report-count] \{\
5294 . unformat doc-report-name
5295 . chop doc-report-name
5296 . nop \*[doc-report-name]\c
5297 . doc-finish-reference
5300 . if \n[doc-issue-count] \{\
5301 . unformat doc-issue-name
5302 . chop doc-issue-name
5303 . nop \*[doc-issue-name]\c
5304 . doc-finish-reference
5307 . if \n[doc-volume-count] \{\
5308 . unformat doc-volume-name
5309 . chop doc-volume-name
5310 . nop \*[doc-volume-name]\c
5311 . doc-finish-reference
5314 . if \n[doc-page-number-count] \{\
5315 . unformat doc-page-number-string
5316 . chop doc-page-number-string
5317 . nop \*[doc-page-number-string]\c
5318 . doc-finish-reference
5321 . if \n[doc-corporate-count] \{\
5322 . unformat doc-corporate-name
5323 . chop doc-corporate-name
5324 . nop \*[doc-corporate-name]\c
5325 . doc-finish-reference
5328 . if \n[doc-date-count] \{\
5331 . nop \*[doc-date]\c
5332 . doc-finish-reference
5335 . if \n[doc-optional-count] \{\
5336 . unformat doc-optional-string
5337 . chop doc-optional-string
5338 . nop \*[doc-optional-string]\c
5339 . doc-finish-reference
5342 . if \n[doc-reference-count] \
5343 . tm mdoc warning: unresolved reference problem
5345 . hy \n[doc-hyphen-flags]
5349 .\" NS doc-print-reference-authors macro
5350 .\" NS print out reference authors
5352 .\" NS local variables:
5356 .ds doc-str-dpra "and
5358 .de doc-print-reference-authors
5361 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5362 . unformat doc-author-name\n[doc-reg-dpra]
5363 . chop doc-author-name\n[doc-reg-dpra]
5364 . ie (\n[doc-author-count] > 2) \
5365 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5367 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5368 . nr doc-reg-dpra +1
5371 . unformat doc-author-name\n[doc-reg-dpra]
5372 . chop doc-author-name\n[doc-reg-dpra]
5373 . if (\n[doc-author-count] > 1) \
5374 . nop \)\*[doc-str-dpra]
5375 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5379 .\" NS doc-author-count global register
5380 .\" NS counter of author references
5382 .nr doc-author-count 0
5385 .\" NS doc-author-nameXXX global box
5386 .\" NS array of author names
5389 .\" NS doc-author-count
5391 .ds doc-author-name0
5394 .\" NS %A user macro
5395 .\" NS reference author(s)
5399 .\" NS doc-author-count
5400 .\" NS doc-curr-font
5401 .\" NS doc-curr-size
5402 .\" NS doc-macro-name
5403 .\" NS doc-reference-count
5405 .\" NS local variables:
5408 .\" NS width register `%A' set in doc-common
5411 . ie \n[doc-arg-limit] \
5412 . tm Usage: .%A author_name ... (#\n[.c])
5415 . nr doc-author-count +1
5416 . nr doc-reference-count +1
5418 . ds doc-macro-name %A
5419 . doc-parse-args \$@
5422 . nr doc-curr-font \n[.f]
5423 . nr doc-curr-size \n[.ps]
5425 . \" save to reference box
5426 . box doc-author-name\n[doc-author-count]
5434 . tm Usage: .%A author_name ... (#\n[.c])
5440 .\" NS doc-book-count global register
5441 .\" NS counter of book references
5443 .nr doc-book-count 0
5446 .\" NS doc-book-name global box
5447 .\" NS string of collected book references
5452 .\" NS %B user macro
5453 .\" NS [reference] book name
5457 .\" NS doc-book-count
5458 .\" NS doc-curr-font
5459 .\" NS doc-curr-size
5460 .\" NS doc-macro-name
5461 .\" NS doc-reference-count
5463 .\" NS local variables:
5466 .\" NS width register `%B' set in doc-common
5469 . ie \n[doc-arg-limit] \
5470 . tm Usage: .%B book_name ... (#\n[.c])
5473 . if \n[doc-is-reference] \{\
5474 . nr doc-book-count +1
5475 . nr doc-reference-count +1
5478 . ds doc-macro-name %B
5479 . doc-parse-args \$@
5482 . nr doc-curr-font \n[.f]
5483 . nr doc-curr-size \n[.ps]
5485 . ie \n[doc-is-reference] \{\
5486 . \" append to reference box
5487 . boxa doc-book-name
5492 . nop \*[doc-Em-font]\c
5496 . nop \*[doc-Em-font]\c
5497 . doc-print-recursive
5500 . tm Usage: .%B book_name ... (#\n[.c])
5505 .\" NS doc-date-count global register
5506 .\" NS counter of date references
5508 .nr doc-date-count 0
5511 .\" NS doc-date global box
5512 .\" NS string of collected date references
5517 .\" NS %D user macro
5518 .\" NS [reference] date
5522 .\" NS doc-curr-font
5523 .\" NS doc-curr-size
5524 .\" NS doc-date-count
5525 .\" NS doc-macro-name
5526 .\" NS doc-reference-count
5528 .\" NS local variables:
5531 .\" NS width register `%D' set in doc-common
5534 . ie \n[doc-arg-limit] \
5535 . tm Usage: .%D date ... (#\n[.c])
5538 . nr doc-date-count +1
5539 . nr doc-reference-count +1
5541 . ds doc-macro-name %D
5542 . doc-parse-args \$@
5545 . nr doc-curr-font \n[.f]
5546 . nr doc-curr-size \n[.ps]
5548 . \" append to reference box
5557 . tm Usage: .%D date ... (#\n[.c])
5562 .\" NS doc-publisher-count global register
5563 .\" NS counter of publisher references
5565 .nr doc-publisher-count 0
5568 .\" NS doc-publisher-name global box
5569 .\" NS string of collected publisher references
5571 .ds doc-publisher-name
5574 .\" NS %I user macro
5575 .\" NS [reference] issuer/publisher name
5579 .\" NS doc-curr-font
5580 .\" NS doc-curr-size
5581 .\" NS doc-macro-name
5582 .\" NS doc-publisher-count
5583 .\" NS doc-reference-count
5585 .\" NS local variables:
5588 .\" NS width register `%I' set in doc-common
5591 . ie \n[doc-arg-limit] \
5592 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5595 . nr doc-publisher-count +1
5596 . nr doc-reference-count +1
5598 . ds doc-macro-name %I
5599 . doc-parse-args \$@
5602 . nr doc-curr-font \n[.f]
5603 . nr doc-curr-size \n[.ps]
5605 . \" append to reference box
5606 . boxa doc-publisher-name
5611 . nop \*[doc-Em-font]\c
5615 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5620 .\" NS doc-journal-count global register
5621 .\" NS counter of journal references
5623 .nr doc-journal-count 0
5626 .\" NS doc-journal-name global box
5627 .\" NS string of collected journal references
5629 .ds doc-journal-name
5632 .\" NS %J user macro
5633 .\" NS [reference] Journal Name
5637 .\" NS doc-curr-font
5638 .\" NS doc-curr-size
5639 .\" NS doc-journal-count
5640 .\" NS doc-macro-name
5641 .\" NS doc-reference-count
5643 .\" NS local variables:
5646 .\" NS width register `%J' set in doc-common
5649 . ie \n[doc-arg-limit] \
5650 . tm Usage: .%J journal_name ... (#\n[.c])
5653 . nr doc-journal-count +1
5654 . nr doc-reference-count +1
5656 . ds doc-macro-name %J
5657 . doc-parse-args \$@
5660 . nr doc-curr-font \n[.f]
5661 . nr doc-curr-size \n[.ps]
5663 . \" append to reference box
5664 . boxa doc-journal-name
5669 . nop \*[doc-Em-font]\c
5673 . tm Usage: .%J journal_name ... (#\n[.c])
5678 .\" NS doc-issue-count global register
5679 .\" NS counter of issue number references
5681 .nr doc-issue-count 0
5684 .\" NS doc-issue-name global box
5685 .\" NS string of collected issue number references
5690 .\" NS %N user macro
5691 .\" NS [reference] issue number
5695 .\" NS doc-curr-font
5696 .\" NS doc-curr-size
5697 .\" NS doc-issue-count
5698 .\" NS doc-macro-name
5699 .\" NS doc-reference-count
5701 .\" NS local variables:
5704 .\" NS width register `%N' set in doc-common
5707 . ie \n[doc-arg-limit] \
5708 . tm Usage: .%N issue_number ... (#\n[.c])
5711 . nr doc-issue-count +1
5712 . nr doc-reference-count +1
5714 . ds doc-macro-name %N
5715 . doc-parse-args \$@
5718 . nr doc-curr-font \n[.f]
5719 . nr doc-curr-size \n[.ps]
5721 . \" append to reference box
5722 . boxa doc-issue-name
5730 . tm Usage: .%N issue_number ... (#\n[.c])
5735 .\" NS doc-optional-count global register
5736 .\" NS counter of optional information references
5738 .nr doc-optional-count 0
5741 .\" NS doc-optional-string global box
5742 .\" NS string of collected optional information references
5744 .ds doc-optional-string
5747 .\" NS %O user macro
5748 .\" NS [reference] optional information
5752 .\" NS doc-curr-font
5753 .\" NS doc-curr-size
5754 .\" NS doc-macro-name
5755 .\" NS doc-optional-count
5756 .\" NS doc-reference-count
5758 .\" NS local variables:
5761 .\" NS width register `%O' set in doc-common
5764 . ie \n[doc-arg-limit] \
5765 . tm Usage: .%O optional_information ... (#\n[.c])
5768 . nr doc-optional-count +1
5769 . nr doc-reference-count +1
5771 . ds doc-macro-name %O
5772 . doc-parse-args \$@
5775 . nr doc-curr-font \n[.f]
5776 . nr doc-curr-size \n[.ps]
5778 . \" append to reference box
5779 . boxa doc-optional-string
5787 . tm Usage: .%O optional_information ... (#\n[.c])
5792 .\" NS doc-page-number-count global register
5793 .\" NS counter of page number references
5795 .nr doc-page-number-count 0
5798 .\" NS doc-page-number-string global box
5799 .\" NS string of collected page number references
5801 .ds doc-page-number-string
5804 .\" NS %P user macro
5805 .\" NS [reference] page numbers
5809 .\" NS doc-curr-font
5810 .\" NS doc-curr-size
5811 .\" NS doc-macro-name
5812 .\" NS doc-page-number-count
5813 .\" NS doc-reference-count
5815 .\" NS local variables:
5818 .\" NS width register `%P' set in doc-common
5821 . ie \n[doc-arg-limit] \
5822 . tm Usage: .%P page_number ... (#\n[.c])
5825 . nr doc-page-number-count +1
5826 . nr doc-reference-count +1
5828 . ds doc-macro-name %P
5829 . doc-parse-args \$@
5832 . nr doc-curr-font \n[.f]
5833 . nr doc-curr-size \n[.ps]
5835 . \" append to reference box
5836 . boxa doc-page-number-string
5844 . tm Usage: .%P page_number ... (#\n[.c])
5849 .\" NS doc-corporate-count global register
5850 .\" NS counter of corporate references
5852 .nr doc-corporate-count 0
5855 .\" NS doc-corporate-name global box
5856 .\" NS string of collected corporate references
5858 .ds doc-corporate-name
5861 .\" NS %Q user macro
5862 .\" NS corporate or foreign author
5866 .\" NS doc-corporate-count
5867 .\" NS doc-curr-font
5868 .\" NS doc-curr-size
5869 .\" NS doc-macro-name
5870 .\" NS doc-reference-count
5872 .\" NS local variables:
5875 .\" NS width register `%Q' set in doc-common
5878 . ie \n[doc-arg-limit] \
5879 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5882 . nr doc-corporate-count +1
5883 . nr doc-reference-count +1
5885 . ds doc-macro-name %Q
5886 . doc-parse-args \$@
5889 . nr doc-curr-font \n[.f]
5890 . nr doc-curr-size \n[.ps]
5892 . \" append to reference box
5893 . boxa doc-corporate-name
5901 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5906 .\" NS doc-report-count global register
5907 .\" NS counter of report references
5909 .nr doc-report-count 0
5912 .\" NS doc-report-name global box
5913 .\" NS string of collected report references
5918 .\" NS %R user macro
5919 .\" NS [reference] report name
5923 .\" NS doc-curr-font
5924 .\" NS doc-curr-size
5925 .\" NS doc-macro-name
5926 .\" NS doc-reference-count
5927 .\" NS doc-report-count
5929 .\" NS local variables:
5932 .\" NS width register `%R' set in doc-common
5935 . ie \n[doc-arg-limit] \
5936 . tm Usage: .%R reference_report ... (#\n[.c])
5939 . nr doc-report-count +1
5940 . nr doc-reference-count +1
5942 . ds doc-macro-name %R
5943 . doc-parse-args \$@
5946 . nr doc-curr-font \n[.f]
5947 . nr doc-curr-size \n[.ps]
5949 . \" append to reference box
5950 . boxa doc-report-name
5958 . tm Usage: .%R reference_report ... (#\n[.c])
5963 .\" NS doc-reference-title-count global register
5964 .\" NS counter of reference title references
5966 .nr doc-reference-title-count 0
5969 .\" NS doc-reference-title-name global box
5970 .\" NS string of collected reference title references
5972 .ds doc-reference-title-name
5975 .\" NS doc-reference-title-name-for-book global box
5976 .\" NS string of collected reference title references
5977 .\" NS (saved with another font; this is a shortcoming of groff)
5979 .ds doc-reference-title-name-for-book
5982 .\" NS %T user macro
5983 .\" NS reference title
5987 .\" NS doc-curr-font
5988 .\" NS doc-curr-size
5989 .\" NS doc-macro-name
5990 .\" NS doc-reference-title-count
5991 .\" NS doc-report-count
5993 .\" NS local variables:
5996 .\" NS width register `%T' set in doc-common
5999 . ie \n[doc-arg-limit] \
6000 . tm Usage: .%T reference_title ... (#\n[.c])
6003 . if \n[doc-is-reference] \{\
6004 . nr doc-reference-title-count +1
6005 . nr doc-reference-count +1
6008 . ds doc-macro-name %T
6009 . doc-parse-args \$@
6012 . nr doc-curr-font \n[.f]
6013 . nr doc-curr-size \n[.ps]
6014 . ie \n[doc-is-reference] \{\
6015 . \" append to reference box
6016 . boxa doc-reference-title-name-for-book
6021 . nop \*[doc-No-font]\c
6024 . \" do it a second time with another font
6025 . ds doc-macro-name %T
6026 . doc-parse-args \$@
6029 . nr doc-curr-font \n[.f]
6030 . nr doc-curr-size \n[.ps]
6031 . boxa doc-reference-title-name
6036 . nop \*[doc-Em-font]\c
6040 . nop \*[doc-Em-font]\c
6041 . doc-print-recursive
6044 . tm Usage: .%T reference_title ... (#\n[.c])
6049 .\" NS doc-volume-count global register
6050 .\" NS counter of reference title references
6052 .nr doc-volume-count 0
6055 .\" NS doc-volume-name global box
6056 .\" NS string of collected volume references
6061 .\" NS %V user macro
6062 .\" NS reference volume
6066 .\" NS doc-curr-font
6067 .\" NS doc-curr-size
6068 .\" NS doc-macro-name
6069 .\" NS doc-reference-title-count
6070 .\" NS doc-volume-count
6072 .\" NS local variables:
6075 .\" NS width register `%V' set in doc-common
6078 . ie \n[doc-arg-limit] \
6079 . tm Usage: .%V volume ... (#\n[.c])
6082 . nr doc-volume-count +1
6083 . nr doc-reference-count +1
6085 . ds doc-macro-name %V
6086 . doc-parse-args \$@
6089 . nr doc-curr-font \n[.f]
6090 . nr doc-curr-size \n[.ps]
6092 . \" append to reference box
6093 . boxa doc-volume-name
6101 . tm Usage: .%V volume ... (#\n[.c])
6106 .\" NS doc-do-references macro
6107 .\" NS reference recursion routine
6112 .\" NS local variables:
6116 .de doc-do-references
6117 . if !\n[doc-is-reference] \
6118 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6120 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6122 . ie (\n[doc-reg-ddr1] == 1) \{\
6123 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6124 . doc-append-arg \c 3
6125 . \*[doc-arg\n[doc-arg-ptr]]
6128 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6130 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6131 . \" finish reference box
6139 . nr doc-reg-ddr \n[doc-arg-ptr]
6141 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6147 .\" NS Hf user macro
6148 .\" NS source include header files.
6151 .\" NS doc-curr-font
6152 .\" NS doc-curr-size
6154 .\" NS width register `Hf' set in doc-common
6169 .\" NS doc-have-author global register (bool)
6172 .nr doc-have-author 0
6175 .\" NS An user macro
6180 .\" NS doc-curr-font
6181 .\" NS doc-curr-size
6182 .\" NS doc-have-author
6183 .\" NS doc-macro-name
6185 .\" NS width register `An' set in doc-common
6188 . if !\n[doc-arg-limit] \{\
6190 . ie "\$1"-nosplit" \
6191 . nr doc-in-authors-section 0
6192 . el \{ .ie "\$1"-split" \
6193 . nr doc-in-authors-section 1
6195 . ds doc-macro-name An
6196 . doc-parse-args \$@
6199 . tm1 "Usage: .An {-nosplit | -split}
6200 . tm1 .An author_name ... (#\n[.c])
6203 . if \n[doc-in-authors-section] \{\
6204 . ie \n[doc-have-author] \
6207 . nr doc-have-author 1
6210 . if \n[doc-arg-limit] \{\
6212 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6213 . nr doc-curr-font \n[.f]
6214 . nr doc-curr-size \n[.ps]
6215 . doc-print-recursive
6218 . tm Usage: .An author_name ... (#\n[.c])
6224 .\" NS Sf user macro
6227 .\" NS width register `Sf' set in doc-common
6230 . tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
6234 .\" NS Rv user macro
6235 .\" NS return values
6237 .\" NS width register `Rv' set in doc-common
6239 .\" NS local variables:
6240 .\" NS doc-str-Rv-prefix
6241 .\" NS doc-str-Rv-suffix
6243 .ds doc-str-Rv-prefix "The
6244 .ds doc-str-Rv-suffix "function returns the value\~0 if successful;
6245 .as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
6246 .as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
6247 .as doc-str-Rv-suffix " is set to indicate the error.
6251 .\" XXX: what does this function without `-std'?
6254 . tm Usage: .Rv [-std] (#\n[.c])
6256 . \" .ds doc-macro-name Rv
6257 . \" .nr doc-arg-ptr 0
6259 . \" .ds doc-arg1 \$2
6260 . \" .ds doc-arg2 \$3
6261 . \" .ds doc-arg3 \$4
6262 . \" .ds doc-arg4 \$5
6263 . \" .ds doc-arg5 \$6
6264 . \" .ds doc-arg6 \$7
6265 . \" .ds doc-arg7 \$8
6266 . \" .ds doc-arg8 \$9
6268 . \" .nr doc-num-args (\n[.$] - 1)
6271 . nr doc-reg-Rv \*[doc-section]
6272 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6273 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6275 . nop \)\*[doc-str-Rv-prefix]
6277 . nop \)\*[doc-str-Rv-suffix]
6282 .\" NS Mt user macro
6283 .\" NS mailto (for conversion to HTML)
6286 . \" XXX: error handling missing
6291 .\" NS Lk user macro
6292 .\" NS link (for conversion to HTML)
6294 .\" NS local variables:
6299 . ds doc-str-Lk Sy \$@
6301 . ie (\n[.$] > 1) \{\
6302 . doc-get-arg-type \$2
6303 . ie (\n[doc-arg-type] < 3) \{\
6305 . ds doc-str-Lk Sy "\$1"
6306 . doc-get-width "\$1"
6309 . as doc-str-Lk " \$@
6312 . doc-get-width "\$1"
6315 . doc-get-width "\$1"
6321 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6331 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6332 . tm1 " Should this have been `.Em ...'?
6337 .\" NS doc-empty-line macro
6338 .\" NS emit warning and print empty line
6341 . if !"\*[doc-macro-name]"Bd" \
6342 . tm mdoc warning: Empty input line #\n[.c]
6352 .\" load local modifications