1 .\" Copyright (c) 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc 8.1 (Berkeley) 06/08/93
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
41 .\" Werner LEMBERG <wl@gnu.org> and
42 .\" Ruslan Ermilov <ru@freebsd.org>
44 .\" to make it more readable: using long names and many groff features,
45 .\" updating and extending documentation, etc.
51 . ab This version of mdoc can be run with GNU troff only!
60 .if (\n[.x]\n[.y] < 118) \
61 . ab You need GNU troff version 1.18 or higher to run this version of mdoc!
64 .\" Load start-up files
66 . mso mdoc/doc-ditroff
77 .\" NS doc-macro-name global string
78 .\" NS name of calling request (set in each user-requestable macro)
81 .als doc-arg0 doc-macro-name
84 .\" NS doc-arg-limit global register
85 .\" NS total number of arguments
90 .\" NS doc-num-args global register
91 .\" NS number of arguments to handle (must be set to \n[.$] prior to
92 .\" NS `doc-parse-arg-vector' request)
97 .\" NS doc-arg-ptr global register
98 .\" NS argument pointer
103 .\" NS doc-argXXX global string
104 .\" NS argument vector
112 .\" NS doc-typeXXX global register
113 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
114 .\" NS punctuation prefix=4)
122 .\" NS doc-spaceXXX global string
131 .\" NS doc-parse-args macro
132 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
141 .\" NS doc-have-space
143 .\" NS local variables:
149 . if !\n[doc-arg-limit] \
152 . nr doc-have-space 0
157 . nr doc-arg-limit +1
159 . \" handle `|' and `...' specially
161 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
162 . el \{ .ie "\$1"..." \
163 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
165 . ds doc-arg\n[doc-arg-limit] "\$1
168 . \" get argument type and set spacing
169 . doc-get-arg-type* \n[doc-arg-limit]
170 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
171 . doc-set-spacing-\n[doc-arg-type]
173 . \" check whether we have processed the last parameter
185 .\" NS doc-parse-arg-vector macro
186 .\" NS parse argument vector (recursive)
188 .\" NS cf. comments in doc-parse-args
198 .\" NS local variables:
203 .de doc-parse-arg-vector
204 . if !\n[doc-arg-limit] \
207 . nr doc-arg-limit +1
209 . ie "\*[doc-arg\n[doc-arg-limit]]"|" \
210 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
211 . el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
212 . ds doc-arg\n[doc-arg-limit] \|.\|.\|.
215 . doc-get-arg-type* \n[doc-arg-limit]
216 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
217 . doc-set-spacing-\n[doc-arg-type]
219 . ie (\n[doc-num-args] == 1) \{\
225 . doc-parse-arg-vector
232 .\" NS doc-parse-space-vector macro
233 .\" NS parse space vector (recursive)
240 .de doc-parse-space-vector
241 . nr doc-arg-limit +1
243 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
245 . ie (\n[doc-num-args] == 1) \
249 . doc-parse-space-vector
254 .\" NS doc-remaining-args macro
255 .\" NS output remaining arguments as-is, separated by spaces (until
256 .\" NS `doc-num-args' is exhausted)
262 .de doc-remaining-args
264 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
266 . ie (\n[doc-num-args] == 1) \{\
271 . nop \)\*[doc-space]\c
278 .\" NS doc-append-arg macro
279 .\" NS append one argument to argument vector:
280 .\" NS `.doc-append-arg [arg] [type]'
288 . nr doc-arg-limit +1
289 . ds doc-arg\n[doc-arg-limit] "\$1
290 . nr doc-type\n[doc-arg-limit] \$2
291 . doc-set-spacing-\$2
295 .\" NS doc-print-and-reset macro
296 .\" NS finish input line and clean up argument vectors
298 .de doc-print-and-reset
299 . if \n[doc-space-mode] \
305 .\" NS doc-reset-args macro
306 .\" NS reset argument counters
318 . hy \n[doc-hyphen-flags]
324 .\" NS doc-curr-font global register
325 .\" NS saved current font
327 .nr doc-curr-font \n[.f]
330 .\" NS doc-curr-size global register
331 .\" NS saved current font size
333 .nr doc-curr-size \n[.ps]
339 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
345 .\" NS doc-macro-name
347 .\" NS local variables:
348 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
350 .\" NS width register `Fl' set in doc-common
353 . nr doc-curr-font \n[.f]
354 . nr doc-curr-size \n[.ps]
355 . nop \*[doc-Fl-font]\c
357 . if !\n[doc-arg-limit] \{\
358 . ds doc-macro-name Fl
363 . nop \|\-\|\f[]\s[0]
366 . if !\n[doc-arg-limit] \
370 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
372 . nop \|\-\f[]\s[0]\c
373 . doc-print-and-reset
376 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
377 . nop \|\-\f[]\s[0]\c
378 . \*[doc-arg\n[doc-arg-ptr]]
381 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
390 .\" NS doc-flag-recursion macro
391 .\" NS `Fl' flag recursion routine (special handling)
396 .\" NS local variables:
401 .de doc-flag-recursion
402 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
403 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
405 . ie (\n[doc-reg-dfr1] == 1) \{\
410 . nr doc-reg-dfr \n[doc-arg-ptr]
412 . ie (\n[doc-reg-dfr1] == 2) \{\
413 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
414 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
416 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
417 . if \n[doc-reg-Fl] \
418 . nop \|\-\*[doc-space]\c
422 . ie "\*[doc-str-dfr]"\f[R]|\f[]" \{\
423 . if \n[doc-reg-Fl] \
424 . nop \|\-\*[doc-space]\c
428 . \" two consecutive hyphen characters?
429 . ie "\*[doc-str-dfr]"-" \
432 . nop \|\%\-\*[doc-str-dfr]\&\c
435 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
436 . nop \)\*[doc-str-dfr]\f[]\s[0]\c
439 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
441 . if (\n[doc-reg-dfr1] == 4) \
444 . doc-print-and-reset
448 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
449 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
452 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
455 . nop \)\*[doc-space\n[doc-reg-dfr]]\c
459 . doc-flag-recursion \$@
464 .\" NS doc-print-recursive macro
465 .\" NS general name recursion routine (print remaining arguments)
470 .\" NS local variables:
475 .de doc-print-recursive
476 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
477 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
479 . ie (\n[doc-reg-dpr1] == 1) \{\
480 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
484 . nr doc-reg-dpr \n[doc-arg-ptr]
486 . ie (\n[doc-reg-dpr1] == 2) \
487 . \" the `\%' prevents hyphenation on a dash (`-')
488 . nop \%\*[doc-str-dpr]\&\c
490 . \" punctuation character
491 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
492 . nop \)\*[doc-str-dpr]\f[]\s[0]\c
496 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
498 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
499 . doc-print-and-reset
502 . nop \)\*[doc-space\n[doc-reg-dpr]]\c
503 . doc-print-recursive
508 .\" NS doc-print-prefixes macro
509 .\" NS print leading prefixes
514 .de doc-print-prefixes
515 . while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
516 . if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
518 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
519 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
525 .\" NS doc-generic-macro macro
526 .\" NS this is the skeleton for most simple macros
532 .\" NS doc-macro-name
534 .de doc-generic-macro
535 . if !\n[doc-arg-limit] \{\
537 . ds doc-macro-name \$0
541 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
544 . if !\n[doc-arg-limit] \
548 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
549 . if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
550 . tmc mdoc warning: Using a macro as first argument
551 . tm1 " cancels effect of .\$0 (#\n[.c])
553 . \" the right action here would be to reset the argument counters
554 . \" and bail out -- unfortunately, a small number of manual pages
555 . \" (less than 2% for FreeBSD which has been used for testing)
556 . \" relied on the old behaviour (silently ignore this error),
557 . \" so it is commented out
562 . nr doc-curr-font \n[.f]
563 . nr doc-curr-size \n[.ps]
564 . nop \*[doc-\$0-font]\c
565 . doc-print-recursive
569 . tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
576 .\" NS command line `argument' macro: `.Ar [args ...]'
582 .\" NS doc-macro-name
584 .\" NS local variable:
585 .\" NS doc-str-Ar-default
587 .\" NS width register `Ar' set in doc-common
589 .ds doc-str-Ar-default "file\ .\|.\|.
592 . nr doc-curr-font \n[.f]
593 . nr doc-curr-size \n[.ps]
594 . nop \*[doc-Ar-font]\c
596 . if !\n[doc-arg-limit] \{\
597 . ds doc-macro-name Ar
602 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
605 . if !\n[doc-arg-limit] \
610 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
611 . nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
612 . doc-print-and-reset
615 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
616 . \" replace previous argument (Ar) with default value
618 . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
619 . nr doc-type\n[doc-arg-ptr] 2
620 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
622 . \" recompute space vector for remaining arguments
623 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
624 . nr doc-arg-limit \n[doc-arg-ptr]
625 . doc-parse-space-vector
627 . doc-print-recursive
635 .\" NS width register `Ad' set in doc-common
637 .als Ad doc-generic-macro
638 .ds doc-Ad-usage address
641 .\" NS doc-indent-synopsis global register
642 .\" NS indentation in synopsis
644 .nr doc-indent-synopsis 0
647 .\" NS doc-indent-synopsis-active global register (bool)
648 .\" NS indentation in synopsis active
650 .nr doc-indent-synopsis-active 0
654 .\" NS config declaration (for section 4 SYNOPSIS)
656 .\" NS this function causes a break; it uses the `Nm' font
662 .\" NS doc-indent-synopsis
663 .\" NS doc-macro-name
665 .\" NS width register `Cd' set in doc-common
668 . if !\n[doc-arg-limit] \{\
670 . ds doc-macro-name Cd
674 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
677 . if !\n[doc-arg-limit] \
681 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
682 . nr doc-curr-font \n[.f]
683 . nr doc-curr-size \n[.ps]
685 . ie \n[doc-in-synopsis-section] \{\
686 . ie "\*[doc-macro-name]"Cd" \{\
688 . if !\n[doc-indent-synopsis] \
689 . nr doc-indent-synopsis \n[doc-display-indent]u
690 . if !\n[doc-indent-synopsis-active] \
691 . in +\n[doc-indent-synopsis]u
692 . ti -\n[doc-indent-synopsis]u
693 . nop \*[doc-Nm-font]\c
694 . doc-print-recursive
695 . if !\n[doc-indent-synopsis-active] \
696 . in -\n[doc-indent-synopsis]u
699 . nop \*[doc-Nm-font]\c
700 . doc-print-recursive
703 . nop \*[doc-Nm-font]\c
704 . doc-print-recursive
707 . tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
714 .\" NS interactive command modifier (flag)
716 .\" NS width register `Cm' set in doc-common
718 .als Cm doc-generic-macro
719 .ds doc-Cm-usage interactive_command_modifier
723 .\" NS defined variable
725 .\" NS this function uses the `Er' font
727 .\" NS width register `Dv' set in doc-common
729 .als Dv doc-generic-macro
730 .ds doc-Dv-usage defined_variable
731 .als doc-Dv-font doc-Er-font
737 .\" NS width register `Em' set in doc-common
739 .als Em doc-generic-macro
740 .ds doc-Em-usage text
746 .\" NS width register `Er' set in doc-common
748 .als Er doc-generic-macro
749 .ds doc-Er-usage text
753 .\" NS environment variable
755 .\" NS width register `Ev' set in doc-common
757 .als Ev doc-generic-macro
758 .ds doc-Ev-usage text
761 .\" NS doc-have-decl global register (bool)
762 .\" NS subroutine test (in synopsis only)
767 .\" NS doc-have-var global register (bool)
768 .\" NS whether last type is a variable type
773 .\" NS doc-do-func-decl macro
774 .\" NS do something special while in SYNOPSIS
783 . if \n[doc-in-synopsis-section] \{\
784 . \" if a variable type was the last thing given, want vertical space
785 . if \n[doc-have-var] \{\
789 . \" if a subroutine was the last thing given, want vertical space
790 . if \n[doc-have-func] \{\
791 . ie \n[doc-have-decl] \
799 . nr doc-curr-font \n[.f]
800 . nr doc-curr-size \n[.ps]
805 .\" NS function declaration -- not callable
807 .\" NS this function causes a break
809 .\" NS width register `Fd' set in doc-common
812 . ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
814 . nop \*[doc-Fd-font]\$*
816 . ft \n[doc-curr-font]
817 . ps \n[doc-curr-size]u
820 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
827 .\" NS #include statement in SYNOPSIS
828 .\" NS <header.h> if not in SYNOPSIS
830 .\" NS this function causes a break; it uses the `Fd' font
836 .\" NS doc-indent-synopsis
837 .\" NS doc-macro-name
839 .\" NS width register `In' set in doc-common
842 . if !\n[doc-arg-limit] \{\
844 . ds doc-macro-name In
848 . tm Usage: .In include_file ... (#\n[.c])
851 . if !\n[doc-arg-limit] \
856 . ie ((\n[doc-arg-limit] >= \n[doc-arg-ptr]) & (\n[doc-type\n[doc-arg-ptr]] == 2)) \{\
857 . nr doc-curr-font \n[.f]
858 . nr doc-curr-size \n[.ps]
860 . ie \n[doc-in-synopsis-section] \{\
861 . ie "\*[doc-macro-name]"In" \{\
863 . nop \*[doc-Fd-font]#include <\*[doc-arg\n[doc-arg-ptr]]>
864 . ft \n[doc-curr-font]
865 . ps \n[doc-curr-size]u
868 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
869 . doc-print-recursive
874 . ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
875 . as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
876 . doc-print-recursive
879 . ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
880 . as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
881 . doc-print-recursive
884 . tm Usage: .In include_file ... (#\n[.c])
891 .\" NS function return value
893 .\" NS this function uses the `Ar' font
895 .\" NS width register `Fr' set in doc-common
897 .als Fr doc-generic-macro
898 .ds doc-Fr-usage function_return_value
899 .als doc-Fr-font doc-Ar-font
903 .\" NS interactive command
905 .\" NS width register `Ic' set in doc-common
907 .als Ic doc-generic-macro
908 .ds doc-Ic-usage interactive_command
914 .\" NS width register `Li' set in doc-common
916 .als Li doc-generic-macro
917 .ds doc-Li-usage argument
923 .\" NS this function uses the `Sy' font
925 .\" NS width register `Ms' set in doc-common
927 .als Ms doc-generic-macro
928 .ds doc-Ms-usage math_symbol
929 .als doc-Ms-font doc-Sy-font
932 .\" NS doc-command-name global string
933 .\" NS save first invocation of .Nm
939 .\" NS name of command or page topic
943 .\" NS doc-command-name
946 .\" NS doc-indent-synopsis
947 .\" NS doc-indent-synopsis-active
948 .\" NS doc-macro-name
950 .\" NS width register `Nm' set in doc-common
953 . if !\n[doc-arg-limit] \{\
954 . ds doc-macro-name Nm
958 . ie "\*[doc-command-name]"" \
959 . tm Usage: .Nm name ... (#\n[.c])
961 . doc-parse-args \*[doc-command-name]
964 . if !\n[doc-arg-limit] \
969 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
971 . ie "\*[doc-command-name]"" \{\
972 . tm Usage: .Nm name ... (#\n[.c])
976 . nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
977 . doc-print-and-reset
980 . nr doc-curr-font \n[.f]
981 . nr doc-curr-size \n[.ps]
983 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
984 . ie "\*[doc-command-name]"" \
985 . tm Usage: .Nm name ... (#\n[.c])
987 . \" replace previous argument (Nm) with default value
989 . ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
990 . nr doc-type\n[doc-arg-ptr] 2
991 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
993 . \" recompute space vector for remaining arguments
994 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
995 . nr doc-arg-limit \n[doc-arg-ptr]
996 . doc-parse-space-vector
999 . \" handle `.Nm ...' in SYNOPSIS
1000 . if \n[doc-in-synopsis-section] \{\
1001 . if "\*[doc-macro-name]"Nm" \{\
1003 . if !\n[doc-indent-synopsis] \{\
1004 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1005 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1007 . if !\n[doc-indent-synopsis-active] \{\
1008 . in +\n[doc-indent-synopsis]u
1009 . nr doc-indent-synopsis-active 1
1011 . ti -\n[doc-indent-synopsis]u
1013 . if "\*[doc-command-name]"" \
1014 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1016 . nop \*[doc-Nm-font]\c
1018 . doc-print-recursive
1023 .\" NS Pa user macro
1024 .\" NS pathname: `.Pa [arg ...]'
1028 .\" NS doc-curr-font
1029 .\" NS doc-curr-size
1030 .\" NS doc-macro-name
1032 .\" NS width register `Pa' set in doc-common
1035 . if !\n[doc-arg-limit] \{\
1036 . ds doc-macro-name Pa
1037 . doc-parse-args \$@
1041 . nop \*[doc-Pa-font]~\f[]\s[0]
1044 . if !\n[doc-arg-limit] \
1048 . doc-print-prefixes
1049 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1050 . nr doc-curr-font \n[.f]
1051 . nr doc-curr-size \n[.ps]
1052 . nop \*[doc-Pa-font]\c
1053 . if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1054 . \" replace previous argument (Pa) with default value
1056 . ds doc-arg\n[doc-arg-ptr] ~
1057 . nr doc-type\n[doc-arg-ptr] 2
1058 . ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1060 . \" recompute space vector for remaining arguments
1061 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1062 . nr doc-arg-limit \n[doc-arg-ptr]
1063 . doc-parse-space-vector
1065 . doc-print-recursive
1068 . nop \*[doc-Pa-font]~\f[]\s[0]\c
1069 . doc-print-and-reset
1074 .\" NS Sy user macro
1077 .\" NS width register `Sy' set in doc-common
1079 .als Sy doc-generic-macro
1080 .ds doc-Sy-usage symbolic_text
1083 .\" NS Me user macro
1086 .\" NS width register `Me' set in doc-common
1088 .als Me doc-generic-macro
1089 .ds doc-Me-usage menu_entry
1092 .\" NS Tn user macro
1097 .\" NS doc-curr-font
1098 .\" NS doc-curr-size
1099 .\" NS doc-macro-name
1101 .\" NS width register `Tn' set in doc-common
1104 . if !\n[doc-arg-limit] \{\
1106 . ds doc-macro-name Tn
1107 . doc-parse-args \$@
1110 . tm Usage: .Tn trade_name ... (#\n[.c])
1113 . if !\n[doc-arg-limit] \
1117 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1118 . nr doc-curr-font \n[.f]
1119 . nr doc-curr-size \n[.ps]
1120 . nop \)\*[doc-Tn-font-size]\c
1121 . ie !\n[doc-is-reference] \{\
1122 . nop \)\*[doc-Tn-font-shape]\c
1123 . doc-print-recursive
1129 . tm Usage: .Tn trade_name ... (#\n[.c])
1135 .\" NS Va user macro
1136 .\" NS variable name
1138 .\" NS width register `Va' set in doc-common
1140 .als Va doc-generic-macro
1141 .ds doc-Va-usage variable_name
1144 .\" NS No user macro
1145 .\" NS normal text macro (default text style if mess up)
1147 .\" NS width register `No' set in doc-common
1149 .als No doc-generic-macro
1150 .ds doc-No-usage normal_text
1153 .\" NS doc-quote-left global string
1154 .\" NS left quotation character for `doc-enclose-string' and
1155 .\" NS `doc-enclose-open'
1160 .\" NS doc-quote-right global string
1161 .\" NS right quotation character for `doc-enclose-string' and
1162 .\" NS `doc-enclose-close'
1167 .\" NS Op user macro
1168 .\" NS option expression (i.e., enclose string in square brackets)
1171 .\" NS doc-macro-name
1172 .\" NS doc-quote-left
1173 .\" NS doc-quote-right
1175 .\" NS width register `Op' set in doc-common
1178 . if !\n[doc-arg-limit] \
1179 . ds doc-macro-name Op
1181 . ds doc-quote-left "\*[doc-left-bracket]
1182 . ds doc-quote-right "\*[doc-right-bracket]
1184 . doc-enclose-string \$@
1188 .\" NS Aq user macro
1189 .\" NS enclose string in angle brackets
1192 .\" NS doc-macro-name
1193 .\" NS doc-quote-left
1194 .\" NS doc-quote-right
1196 .\" NS width register `Aq' set in doc-common
1199 . if !\n[doc-arg-limit] \
1200 . ds doc-macro-name Aq
1202 . ds doc-quote-left \[la]
1203 . ds doc-quote-right \[ra]
1205 . doc-enclose-string \$@
1209 .\" NS Bq user macro
1210 .\" NS enclose string in square brackets
1213 .\" NS doc-macro-name
1214 .\" NS doc-quote-left
1215 .\" NS doc-quote-right
1217 .\" NS width register `Bq' set in doc-common
1220 . if !\n[doc-arg-limit] \
1221 . ds doc-macro-name Bq
1223 . ds doc-quote-left "\*[doc-left-bracket]
1224 . ds doc-quote-right "\*[doc-right-bracket]
1226 . doc-enclose-string \$@
1230 .\" NS Brq user macro
1231 .\" NS enclose string in braces
1234 .\" NS doc-macro-name
1235 .\" NS doc-quote-left
1236 .\" NS doc-quote-right
1238 .\" NS width register `Brq' set in doc-common
1241 . if !\n[doc-arg-limit] \
1242 . ds doc-macro-name Brq
1244 . ds doc-quote-left {
1245 . ds doc-quote-right }
1247 . doc-enclose-string \$@
1251 .\" NS Dq user macro
1252 .\" NS enclose string in double quotes
1255 .\" NS doc-macro-name
1256 .\" NS doc-quote-left
1257 .\" NS doc-quote-right
1259 .\" NS width register `Dq' set in doc-common
1262 . if !\n[doc-arg-limit] \
1263 . ds doc-macro-name Dq
1265 . ds doc-quote-left "\*[Lq]
1266 . ds doc-quote-right "\*[Rq]
1268 . doc-enclose-string \$@
1272 .\" NS Eq user macro
1273 .\" NS enclose string in user-defined quotes (args 1 and 2)
1276 .\" NS doc-macro-name
1277 .\" NS doc-quote-left
1278 .\" NS doc-quote-right
1280 .\" NS width register `Eq' set in doc-common
1283 . if !\n[doc-arg-limit] \
1284 . ds doc-macro-name Eq
1286 . ds doc-quote-left "\$1
1287 . ds doc-quote-right "\$2
1290 . doc-enclose-string \$@
1294 .\" NS Pq user macro
1295 .\" NS enclose string in parentheses
1298 .\" NS doc-macro-name
1299 .\" NS doc-quote-left
1300 .\" NS doc-quote-right
1302 .\" NS width register `Pq' set in doc-common
1305 . if !\n[doc-arg-limit] \
1306 . ds doc-macro-name Pq
1308 . ds doc-quote-left "\*[doc-left-parenthesis]
1309 . ds doc-quote-right "\*[doc-right-parenthesis]
1311 . doc-enclose-string \$@
1315 .\" NS Ql user macro
1316 .\" NS quoted literal
1318 .\" is in file doc-[dit|n]roff
1321 .\" NS Qq user macro
1322 .\" NS enclose string in straight double quotes
1325 .\" NS doc-macro-name
1326 .\" NS doc-quote-left
1327 .\" NS doc-quote-right
1329 .\" NS width register `Qq' set in doc-common
1332 . if !\n[doc-arg-limit] \
1333 . ds doc-macro-name Qq
1335 . ds doc-quote-left "\*[q]
1336 . ds doc-quote-right "\*[q]
1338 . doc-enclose-string \$@
1342 .\" NS Sq user macro
1343 .\" NS enclose string in single quotes
1346 .\" NS doc-macro-name
1347 .\" NS doc-quote-left
1348 .\" NS doc-quote-right
1350 .\" NS width register `Sq' set in doc-common
1353 . if !\n[doc-arg-limit] \
1354 . ds doc-macro-name Sq
1356 . ds doc-quote-left "\*[doc-left-singlequote]
1357 . ds doc-quote-right "\*[doc-right-singlequote]
1359 . doc-enclose-string \$@
1363 .\" NS Es user macro
1364 .\" NS set up arguments (i.e., the left and right quotation character as
1365 .\" NS first and second argument) for .En call
1369 .\" NS doc-macro-name
1370 .\" NS doc-quote-left
1371 .\" NS doc-quote-right
1374 . if !\n[doc-arg-limit] \{\
1375 . ie (\n[.$] > 2) \{\
1376 . ds doc-macro-name Es
1377 . doc-parse-args \$@
1380 . ds doc-quote-left "\$1
1381 . ds doc-quote-right "\$2
1384 . if !\n[doc-arg-limit] \
1388 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1390 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1392 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1393 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1395 . doc-print-and-reset
1399 .\" NS doc-have-slot global register (bool)
1400 .\" NS set if `doc-enclose-string' has created a slot for closing
1406 .\" NS doc-enclose-string macro
1407 .\" NS enclose string with given args (e.g. [ and ])
1412 .\" NS doc-have-slot
1414 .\" NS local variables:
1420 .\" NS doc-quote-left
1421 .\" NS doc-quote-right
1423 .de doc-enclose-string
1424 . if \n[doc-in-synopsis-section] \
1425 . doc-set-hard-space
1427 . if !\n[doc-arg-limit] \{\
1429 . doc-parse-args \$@
1431 . nop \)\*[doc-quote-left]\*[doc-quote-right]
1434 . if !\n[doc-arg-limit] \
1437 . nr doc-curr-font \n[.f]
1438 . nr doc-curr-size \n[.ps]
1441 . doc-print-prefixes
1442 . \" the final `\)' prevents hyphenation in case the next character is `\%'
1443 . nop \)\*[doc-quote-left]\)\c
1444 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1446 . nop \)\*[doc-quote-right]\)\c
1447 . doc-print-and-reset
1450 . \" test whether last arguments are of type closing punctuation
1452 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1453 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1454 . while (\n[doc-type\n[doc-reg-des]] == 3) \
1457 . \" prepend closing delimiter
1459 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1462 . \" test whether last arguments are macros which continue the line
1464 . nr doc-reg-des \n[doc-arg-limit]
1465 . while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1466 . if !\A
\a\*[doc-arg\n[doc-reg-des]]
\a \
1468 . if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1473 . \" if there are no trailing macros to be skipped, append argument
1474 . ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1475 . doc-append-arg "\)\*[doc-quote-right]\)" 3
1477 . \" if a previous call to `doc-enclose-string' has already created
1478 . \" a slot, prepend argument
1479 . ie \n[doc-have-slot] \
1480 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1482 . \" we have to shift all arguments to the right
1484 . nr doc-reg-des1 \n[doc-arg-limit]
1485 . nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1486 . while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1487 . rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1488 . rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1489 . rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1490 . nr doc-reg-des1 -1
1491 . nr doc-reg-des2 -1
1493 . nr doc-arg-limit +1
1495 . \" finally, insert closing delimiter into the freed slot and
1496 . \" recompute spacing vector
1497 . ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1498 . nr doc-type\n[doc-reg-des] 3
1499 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1500 . nr doc-arg-limit (\n[doc-reg-des] - 1)
1501 . doc-parse-space-vector
1502 . nr doc-have-slot 1
1505 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1508 . if \n[doc-in-synopsis-section] \
1509 . doc-set-soft-space
1513 .\" NS En user macro
1514 .\" NS enclose arguments with quotation characters set up with `.Es'
1516 .als En doc-enclose-string
1519 .\" NS Ao user macro
1523 .\" NS doc-macro-name
1524 .\" NS doc-quote-left
1526 .\" NS width register `Ao' set in doc-common
1529 . if !\n[doc-arg-limit] \
1530 . ds doc-macro-name Ao
1532 . ds doc-quote-left \[la]
1534 . doc-enclose-open \$@
1538 .\" NS Ac user macro
1542 .\" NS doc-macro-name
1543 .\" NS doc-quote-right
1545 .\" NS width register `Ac' set in doc-common
1548 . if !\n[doc-arg-limit] \
1549 . ds doc-macro-name Ac
1551 . ds doc-quote-right \[ra]
1553 . doc-enclose-close \$@
1557 .\" NS Bo user macro
1561 .\" NS doc-macro-name
1562 .\" NS doc-quote-left
1564 .\" NS width register `Bo' set in doc-common
1567 . if !\n[doc-arg-limit] \
1568 . ds doc-macro-name Bo
1570 . ds doc-quote-left "\*[doc-left-bracket]
1572 . doc-enclose-open \$@
1576 .\" NS Bc user macro
1577 .\" NS bracket close
1580 .\" NS doc-macro-name
1581 .\" NS doc-quote-right
1583 .\" NS width register `Bc' set in doc-common
1586 . if !\n[doc-arg-limit] \
1587 . ds doc-macro-name Bc
1589 . ds doc-quote-right "\*[doc-right-bracket]
1591 . doc-enclose-close \$@
1595 .\" NS Bro user macro
1599 .\" NS doc-macro-name
1600 .\" NS doc-quote-left
1602 .\" NS width register `Bro' set in doc-common
1605 . if !\n[doc-arg-limit] \
1606 . ds doc-macro-name Bo
1608 . ds doc-quote-left {
1610 . doc-enclose-open \$@
1614 .\" NS Brc user macro
1618 .\" NS doc-macro-name
1619 .\" NS doc-quote-right
1621 .\" NS width register `Brc' set in doc-common
1624 . if !\n[doc-arg-limit] \
1625 . ds doc-macro-name Bc
1627 . ds doc-quote-right }
1629 . doc-enclose-close \$@
1633 .\" NS Do user macro
1634 .\" NS double quote open
1637 .\" NS doc-macro-name
1638 .\" NS doc-quote-left
1640 .\" NS width register `Do' set in doc-common
1643 . if !\n[doc-arg-limit] \
1644 . ds doc-macro-name Do
1646 . ds doc-quote-left "\*[Lq]
1648 . doc-enclose-open \$@
1652 .\" NS Dc user macro
1653 .\" NS double quote close
1656 .\" NS doc-macro-name
1657 .\" NS doc-quote-right
1659 .\" NS width register `Dc' set in doc-common
1662 . if !\n[doc-arg-limit] \
1663 . ds doc-macro-name Dc
1665 . ds doc-quote-right "\*[Rq]
1667 . doc-enclose-close \$@
1671 .\" NS Eo user macro
1672 .\" NS enclose open (using first argument as beginning of enclosure)
1675 .\" NS doc-macro-name
1676 .\" NS doc-quote-left
1678 .\" NS width register `Eo' set in doc-common
1681 . if !\n[doc-arg-limit] \
1682 . ds doc-macro-name Eo
1684 . ds doc-quote-left "\$1
1687 . doc-enclose-open \$@
1691 .\" NS Ec user macro
1692 .\" NS enclose close (using first argument as end of enclosure)
1695 .\" NS doc-macro-name
1696 .\" NS doc-quote-right
1698 .\" NS width register `Ec' set in doc-common
1701 . if !\n[doc-arg-limit] \
1702 . ds doc-macro-name Ec
1704 . ds doc-quote-right "\$1
1707 . doc-enclose-close \$@
1711 .\" NS Oo user macro
1715 .\" NS doc-macro-name
1716 .\" NS doc-quote-left
1718 .\" NS width register `Oo' set in doc-common
1721 . if !\n[doc-arg-limit] \
1722 . ds doc-macro-name Oo
1724 . ds doc-quote-left [
1726 . doc-enclose-open \$@
1730 .\" NS Oc user macro
1734 .\" NS doc-macro-name
1735 .\" NS doc-quote-right
1737 .\" NS width register `Oc' set in doc-common
1740 . if !\n[doc-arg-limit] \
1741 . ds doc-macro-name Oc
1743 . ds doc-quote-right ]
1745 . doc-enclose-close \$@
1749 .\" NS Po user macro
1750 .\" NS parenthesis open
1753 .\" NS doc-macro-name
1754 .\" NS doc-quote-left
1756 .\" NS width register `Po' set in doc-common
1759 . if !\n[doc-arg-limit] \
1760 . ds doc-macro-name Po
1762 . ds doc-quote-left "\*[doc-left-parenthesis]
1764 . doc-enclose-open \$@
1768 .\" NS Pc user macro
1769 .\" NS parenthesis close
1772 .\" NS doc-macro-name
1773 .\" NS doc-quote-right
1775 .\" NS width register `Pc' set in doc-common
1778 . if !\n[doc-arg-limit] \
1779 . ds doc-macro-name Pc
1781 . ds doc-quote-right "\*[doc-right-parenthesis]
1783 . doc-enclose-close \$@
1787 .\" NS Qo user macro
1788 .\" NS straight double quote open
1791 .\" NS doc-macro-name
1792 .\" NS doc-quote-left
1794 .\" NS width register `Qo' set in doc-common
1797 . if !\n[doc-arg-limit] \
1798 . ds doc-macro-name Qo
1800 . ds doc-quote-left "\*[q]
1802 . doc-enclose-open \$@
1806 .\" NS Qc user macro
1807 .\" NS straight double quote close
1810 .\" NS doc-macro-name
1811 .\" NS doc-quote-right
1813 .\" NS width register `Qc' set in doc-common
1816 . if !\n[doc-arg-limit] \
1817 . ds doc-macro-name Qc
1819 . ds doc-quote-right "\*[q]
1821 . doc-enclose-close \$@
1825 .\" NS So user macro
1826 .\" NS single quote open
1829 .\" NS doc-macro-name
1830 .\" NS doc-quote-left
1832 .\" NS width register `So' set in doc-common
1835 . if !\n[doc-arg-limit] \
1836 . ds doc-macro-name So
1838 . ds doc-quote-left "\*[doc-left-singlequote]
1840 . doc-enclose-open \$@
1844 .\" NS Sc user macro
1845 .\" NS single quote close
1848 .\" NS doc-macro-name
1849 .\" NS doc-quote-right
1851 .\" NS width register `Sc' set in doc-common
1854 . if !\n[doc-arg-limit] \
1855 . ds doc-macro-name Sc
1857 . ds doc-quote-right "\*[doc-right-singlequote]
1859 . doc-enclose-close \$@
1863 .\" NS Xo user macro
1867 .\" NS doc-macro-name
1868 .\" NS doc-quote-left
1870 .\" NS width register `Xo' set in doc-common
1873 . if !\n[doc-arg-limit] \
1874 . ds doc-macro-name Xo
1878 . doc-enclose-open \$@
1882 .\" NS Xc user macro
1886 .\" NS doc-macro-name
1887 .\" NS doc-quote-right
1889 .\" NS width register `Xc' set in doc-common
1892 . if !\n[doc-arg-limit] \
1893 . ds doc-macro-name Xc
1895 . ds doc-quote-right
1897 . doc-enclose-close \$@
1901 .\" NS doc-nesting-level global register
1902 .\" NS used by `doc-enclose-open' and `doc-enclose-close'
1904 .nr doc-nesting-level 0
1907 .\" NS doc-in-list global register (bool)
1908 .\" NS whether we are in (logical) .It
1913 .\" NS doc-enclose-open macro
1914 .\" NS enclose string open
1918 .\" NS doc-nesting-level
1920 .de doc-enclose-open
1921 . if !\n[doc-arg-limit] \
1922 . doc-parse-args \$@
1925 . doc-print-prefixes
1928 . nop \)\*[doc-quote-left]\)\c
1930 . \" start enclosure box
1931 . box doc-enclosure-box\n[doc-nesting-level]
1932 . ev doc-enclosure-env\n[doc-nesting-level]
1936 . \" we insert something to make .chop always work
1939 . \" increase nesting level *after* parsing of arguments
1940 . nr doc-nesting-level +1
1942 . if \n[doc-arg-limit] \{\
1944 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1945 . doc-print-recursive
1952 .\" NS doc-enclose-close macro
1953 .\" NS enclose string close
1956 .\" NS doc-nesting-level
1958 .de doc-enclose-close
1959 . nr doc-nesting-level -1
1961 . \" finish enclosure box
1965 . chop doc-enclosure-box\n[doc-nesting-level]
1966 . unformat doc-enclosure-box\n[doc-nesting-level]
1969 . nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1970 . nop \)\*[doc-quote-right]\)\c
1972 . if !\n[doc-arg-limit] \{\
1973 . doc-parse-args \$@
1976 . doc-print-and-reset
1979 . if \n[doc-arg-limit] \{\
1980 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1981 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
1983 . doc-print-recursive
1986 . doc-print-and-reset
1989 . \" shall we finish .It macro?
1990 . if !"\*[doc-macro-name]"It" \
1991 . if \n[doc-in-list] \
1992 . if !\n[doc-nesting-level] \
1993 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
1997 .\" NS Pf user macro
1998 .\" NS prefix: `.Pf prefix arg ...'
2002 .\" NS doc-macro-name
2003 .\" NS doc-quote-left
2005 .\" NS width register `Pf' set in doc-common
2008 . if !\n[doc-arg-limit] \
2009 . ds doc-macro-name Pf
2011 . ie \n[doc-arg-limit] \{\
2012 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2014 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2017 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2023 . doc-parse-args \$@
2025 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2029 . if \n[doc-arg-limit] \{\
2031 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2032 . doc-print-and-reset
2034 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2039 .\" NS Ns user macro
2040 .\" NS remove space (space removal done by `doc-parse-args')
2044 .\" NS doc-macro-name
2046 .\" NS width register `Ns' set in doc-common
2049 . if !\n[doc-arg-limit] \{\
2051 . ds doc-macro-name Ns
2052 . doc-parse-args \$@
2055 . tm Usage: .Ns must be called with arguments (#\n[.c])
2058 . if \n[doc-arg-limit] \{\
2060 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2061 . doc-print-recursive
2068 .\" NS Ap user macro
2069 .\" NS append an apostrophe
2071 .\" NS width register `Ap' set in doc-common
2074 . ie !\n[doc-arg-limit] \
2075 . tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2079 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2080 . doc-print-recursive
2087 .\" NS doc-space global string
2088 .\" NS current inter-argument space
2090 .ds doc-space "\*[doc-soft-space]
2093 .\" NS doc-soft-space constant string
2094 .\" NS soft (stretchable) space (defined in doc-common)
2097 .\" NS doc-hard-space constant string
2098 .\" NS hard (unpaddable) space (defined in doc-common)
2101 .\" NS doc-set-hard-space macro
2102 .\" NS set current space string to hard (unpaddable) space.
2105 .\" NS doc-saved-space
2108 .de doc-set-hard-space
2109 . ie "\*[doc-space]"" \
2110 . ds doc-saved-space "\*[doc-hard-space]
2112 . ds doc-space "\*[doc-hard-space]
2116 .\" NS doc-set-soft-space macro
2117 .\" NS set current space string to soft space
2120 .\" NS doc-saved-space
2123 .de doc-set-soft-space
2124 . ie "\*[doc-space]"" \
2125 . ds doc-saved-space "\*[doc-soft-space]
2127 . ds doc-space "\*[doc-soft-space]
2131 .\" NS doc-space-mode global register (bool)
2132 .\" NS default is one (space mode on)
2134 .nr doc-space-mode 1
2137 .\" NS doc-saved-space global string
2138 .\" NS saved value of `doc-space'
2140 .ds doc-saved-space "\*[doc-space]
2143 .\" NS doc-have-space global register (bool)
2144 .\" NS set if last command was horizontal space
2146 .nr doc-have-space 0
2149 .\" NS Sm user macro
2150 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2152 .\" NS without argument, toggle space mode
2155 .\" NS doc-arg-limit
2158 .\" NS doc-macro-name
2160 .\" NS doc-saved-space
2162 .\" NS doc-space-mode
2165 .\" NS local variables:
2168 .\" NS width register `Sm' set in doc-common
2171 . ie \n[doc-have-space] \
2176 . if !\n[doc-arg-limit] \{\
2178 . ds doc-macro-name Sm
2179 . doc-parse-args \$@
2182 . ie \n[doc-space-mode] \
2183 . nr doc-space-mode 0
2185 . nr doc-space-mode 1
2188 . if !\n[doc-arg-limit] \
2193 . \" avoid a warning message in case `Sm' is the last parameter
2194 . if !d doc-arg\n[doc-arg-ptr] \
2195 . ds doc-arg\n[doc-arg-ptr]
2197 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2198 . ds doc-space "\*[doc-saved-space]
2199 . nr doc-space-mode 1
2202 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2203 . ds doc-saved-space "\*[doc-space]
2205 . nr doc-space-mode 0
2208 . \" no argument for Sm
2210 . ie \n[doc-space-mode] \
2211 . nr doc-space-mode 0
2213 . nr doc-space-mode 1
2216 . ie \n[doc-space-mode] \{\
2217 . \" recompute space vector for remaining arguments
2218 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2219 . nr doc-arg-limit \n[doc-arg-ptr]
2220 . if \n[doc-num-args] \
2221 . doc-parse-space-vector
2223 . \" finish line only if it is interrupted and `doc-have-space'
2225 . if \n[doc-reg-Sm] \
2230 . \" reset remaining space vector elements
2231 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2232 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2233 . ds doc-space\n[doc-reg-Sm]
2235 . \" the body of a `while' request must end with the fitting `\}'!
2239 . \" do we have parameters to print?
2240 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2241 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2242 . ie (\n[doc-arg-ptr] > 1) \
2243 . doc-print-and-reset
2248 . \" skip `Sm' argument
2250 . doc-print-recursive
2255 .\" NS doc-arg-type immediate register
2256 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2257 .\" NS punctuation prefix=4)
2262 .\" NS doc-get-arg-type macro
2263 .\" NS get argument type
2265 .\" NS this macro expects the width of the argument in `doc-width'
2270 .de doc-get-arg-type
2273 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2274 . ie (\n[doc-width] == 1) \{\
2275 . if r doc-punct\$1 \
2276 . nr doc-arg-type \n[doc-punct\$1]
2286 .\" NS doc-get-arg-type* macro
2287 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2289 .\" NS this macro sets the `doc-width' register using the `length' request
2290 .\" NS to get the number of characters in a string literally
2296 .de doc-get-arg-type*
2298 . length doc-width "\*[doc-arg\$1]
2300 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2301 . ie (\n[doc-width] == 1) \{\
2302 . if r doc-punct\*[doc-arg\$1] \
2303 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2306 . if r \*[doc-arg\$1] \
2307 . if d \*[doc-arg\$1] \
2313 .\" NS doc-set-spacing-1 macro
2314 .\" NS set spacing for macros
2319 .\" NS local variables:
2320 .\" NS doc-reg-dssfm
2321 .\" NS doc-reg-dssfm1
2323 .de doc-set-spacing-1
2324 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2326 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2328 . ie (\n[doc-reg-dssfm1] == 3) \{\
2329 . if \n[doc-arg-limit] \{\
2330 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2331 . ds doc-space\n[doc-reg-dssfm]
2333 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2336 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2338 . ie (\n[doc-reg-dssfm1] == 2) \{\
2339 . if \n[doc-arg-limit] \{\
2340 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2341 . ds doc-space\n[doc-reg-dssfm]
2343 . ds doc-space\n[doc-arg-limit]
2346 . ds doc-space\n[doc-arg-limit]
2351 .\" NS doc-set-spacing-2 macro
2352 .\" NS set spacing for strings
2357 .de doc-set-spacing-2
2358 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2362 .\" NS doc-set-spacing-3 macro
2363 .\" NS set spacing for punctuation suffixes
2368 .\" NS local variables:
2369 .\" NS doc-reg-dssfps
2371 .de doc-set-spacing-3
2372 . if \n[doc-arg-limit] \{\
2373 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2374 . ds doc-space\n[doc-reg-dssfps]
2377 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2381 .\" NS doc-set-spacing-4 macro
2382 .\" NS set spacing for punctuation prefixes
2387 .de doc-set-spacing-4
2388 . ds doc-space\n[doc-arg-limit]
2392 .\" type switches (on current argument doc-arg-ptr)
2395 .\" NS doc-do-1 macro
2396 .\" NS call request if macro
2399 . \*[doc-arg\n[doc-arg-ptr]]
2403 .\" NS doc-do-2 macro
2404 .\" NS call .doc-print-recursive if string
2406 .als doc-do-2 doc-print-recursive
2409 .\" NS doc-do-3 macro
2410 .\" NS call .doc-print-recursive if punctuation suffix
2412 .als doc-do-3 doc-print-recursive
2415 .\" NS doc-do-4 macro
2416 .\" NS call .doc-print-recursive if punctuation prefix
2418 .als doc-do-4 doc-print-recursive
2421 .\" NS doc-fontmode-depth global register
2422 .\" NS font mode level
2424 .nr doc-fontmode-depth 0
2427 .\" NS doc-fontmode-font-stackXXX global register
2428 .\" NS stack of saved current font values from `Bf' macro
2431 .\" NS doc-fontmode-depth
2433 .nr doc-fontmode-font-stack0 0
2436 .\" NS doc-fontmode-size-stackXXX global register
2437 .\" NS stack of saved current size values from `Bf' macro
2440 .\" NS doc-fontmode-depth
2442 .nr doc-fontmode-size-stack0 0
2445 .\" NS Bf user macro
2446 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2449 .\" NS doc-fontmode-depth
2450 .\" NS doc-fontmode-font-stackXXX
2451 .\" NS doc-fontmode-size-stackXXX
2452 .\" NS doc-macro-name
2454 .\" NS width register `Bf' set in doc-common
2457 . ds doc-macro-name Bf
2460 . nr doc-fontmode-depth +1
2462 . \" save current font and size
2463 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2464 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2467 . nop \*[doc-Em-font]\c
2468 . el \{ .ie "\$1"Li" \
2469 . nop \*[doc-Li-font]\c
2470 . el \{ .ie "\$1"Sy" \
2471 . nop \*[doc-Sy-font]\c
2472 . el \{ .ie "\$1"-emphasis" \
2473 . nop \*[doc-Em-font]\c
2474 . el \{ .ie "\$1"-literal" \
2475 . nop \*[doc-Li-font]\c
2476 . el \{ .ie "\$1"-symbolic" \
2477 . nop \*[doc-Sy-font]\c
2479 . tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2483 . tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2487 .\" NS Ef user macro
2488 .\" NS end font mode
2491 .\" NS doc-macro-name
2493 .\" NS width register `Ef' set in doc-common
2496 . ds doc-macro-name Ef
2498 . ie \n[doc-fontmode-depth] \{\
2499 . \" restore saved font and size
2500 . nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2501 . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2503 . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2504 . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2505 . nr doc-fontmode-depth -1
2508 . tm mdoc warning: Extraneous .Ef (#\n[.c])
2512 .\" NS doc-keep-type global register
2513 .\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2518 .\" NS Bk user macro
2522 .\" NS doc-keep-type
2523 .\" NS doc-macro-name
2525 .\" NS width register `Bk' set in doc-common
2528 . ds doc-macro-name Bk
2530 . if \n[doc-keep-type] \
2531 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2533 . ie "\$1"-lines" \{\
2534 . nr doc-keep-type 2
2535 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2537 . el \{ .ie "\$1"-words" \{\
2538 . nr doc-keep-type 1
2539 . doc-set-hard-space
2541 . el \{ .ie "\$1"" \{\
2543 . nr doc-keep-type 1
2544 . doc-set-hard-space
2547 . tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2548 . nr doc-keep-type 3
2551 \#. nr doc-nesting-level +1
2555 .\" NS Ek user macro
2559 .\" NS doc-keep-type
2560 .\" NS doc-macro-name
2562 .\" NS width register `Ek' set in doc-common
2565 . ds doc-macro-name Ek
2567 \#. nr doc-nesting-level -1
2570 . tm Usage: .Ek (does not take arguments) (#\n[.c])
2572 . if !\n[doc-keep-type] \
2573 . tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2575 . ie (\n[doc-keep-type] == 1) \
2576 . doc-set-soft-space
2577 . el \{ .if (\n[doc-keep-type] == 2) \
2578 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2581 . nr doc-keep-type 0
2583 \#. if !"\*[doc-out-string]"" \
2584 \#. doc-print-out-string
2588 .\" NS doc-display-depth global register
2589 .\" NS display level
2591 .nr doc-display-depth 0
2594 .\" NS doc-is-compact global register (bool)
2595 .\" NS set if the `compact' keyword is given
2597 .nr doc-is-compact 0
2600 .\" NS doc-display-type-stackXXX global string
2601 .\" NS the display type stack
2604 .\" NS doc-display-depth
2606 .ds doc-display-type-stack0
2609 .\" NS doc-display-indent-stackXXX global register
2610 .\" NS stack of display indentation values
2613 .\" NS doc-display-depth
2615 .nr doc-display-indent-stack0 0
2618 .\" NS doc-display-ad-stackXXX global register
2619 .\" NS stack of saved adjustment modes
2622 .\" NS doc-display-depth
2624 .nr doc-display-ad-stack0 0
2627 .\" NS doc-display-fi-stackXXX global register
2628 .\" NS stack of saved fill modes
2631 .\" NS doc-display-depth
2633 .nr doc-display-fi-stack0 0
2636 .\" NS doc-display-ft-stackXXX global register
2637 .\" NS stack of saved fonts
2640 .\" NS doc-display-depth
2642 .nr doc-display-ft-stack0 0
2645 .\" NS doc-display-ps-stackXXX global register
2646 .\" NS stack of saved font sizes
2649 .\" NS doc-display-depth
2651 .nr doc-display-ps-stack0 0
2654 .\" NS Bd user macro
2655 .\" NS begin display
2657 .\" NS width register `Bd' set in doc-common
2660 .\" NS doc-curr-font
2661 .\" NS doc-curr-size
2662 .\" NS doc-display-depth
2663 .\" NS doc-display-ad-stackXXX
2664 .\" NS doc-display-fi-stackXXX
2665 .\" NS doc-display-ft-stackXXX
2666 .\" NS doc-display-ps-stackXXX
2667 .\" NS doc-display-file
2668 .\" NS doc-display-indent-stackXXX
2669 .\" NS doc-display-type-stackXXX
2670 .\" NS doc-is-compact
2671 .\" NS doc-macro-name
2673 .\" NS local variables:
2677 . ds doc-macro-name Bd
2680 . tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2681 . tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
2685 . nr doc-is-compact 0
2686 . ds doc-display-file
2688 . nr doc-display-depth +1
2690 . \" save current adjustment and fill modes
2691 . nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2692 . nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2694 . ie "\$1"-literal" \{\
2695 . ds doc-display-type-stack\n[doc-display-depth] literal
2696 . nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2697 . nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2705 . el \{ .ie "\$1"-filled" \{\
2706 . ds doc-display-type-stack\n[doc-display-depth] filled
2710 . el \{ .ie "\$1"-ragged" \{\
2711 . ds doc-display-type-stack\n[doc-display-depth] ragged
2715 . el \{ .ie "\$1"-centered" \{\
2716 . ds doc-display-type-stack\n[doc-display-depth] centered
2720 . el \{ .ie "\$1"-unfilled" \{\
2721 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2725 . tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2726 . tm1 " in .Bd macro (#\n[.c])
2730 . \" have we seen an argument?
2731 . if \n[doc-reg-Bd] \{\
2733 . \" check other arguments
2735 . doc-do-Bd-args \$@
2738 . \" avoid warning about non-existent register
2739 . if !r doc-display-indent-stack\n[doc-display-depth] \
2740 . nr doc-display-indent-stack\n[doc-display-depth] 0
2742 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2743 . in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2745 . if !\n[doc-is-compact] \
2746 . sp \n[doc-display-vertical]u
2748 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2750 . nop \*[doc-Li-font]\c
2755 . if !"\*[doc-display-file]"" \
2756 . so \*[doc-display-file]
2758 . nr doc-is-compact 0
2759 . ds doc-display-file
2763 .\" NS doc-do-Bd-args macro
2764 .\" NS resolve remaining .Bd arguments
2767 .\" NS doc-display-file
2768 .\" NS doc-display-indent-stackXXX
2769 .\" NS doc-is-compact
2771 .\" NS local variables:
2773 .\" NS doc-reg-ddBa1
2774 .\" NS doc-reg-ddBa2
2775 .\" NS doc-reg-ddBa3
2776 .\" NS doc-reg-ddBa4
2782 . ie "\$1"-offset" \{\
2786 . nr doc-display-indent-stack\n[doc-display-depth] 0
2787 . el \{ .ie "\$2"right" \
2788 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2789 . el \{ .ie "\$2"center" \
2790 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2791 . el \{ .ie "\$2"indent" \
2792 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2793 . el \{ .ie "\$2"indent-two" \
2794 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2799 . \" not a known keyword
2800 . if (\n[doc-reg-ddBa] == 1) \{\
2803 . nr doc-reg-ddBa1 0
2804 . if \B
\a(\$2)
\a \{\
2805 . \" disable warnings related to scaling indicators (32)
2806 . nr doc-reg-ddBa2 \n[.warn]
2807 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2809 . \" values without a scaling indicator are taken as strings;
2810 . \" we test whether the parameter string with and without the last
2811 . \" character yields identical numerical results (ignoring the
2812 . \" scaling indicator)
2813 . ds doc-str-ddBa "\$2
2814 . substring doc-str-ddBa 0 -2
2815 . if \B
\a(\*[doc-str-ddBa])
\a \{\
2816 . nr doc-reg-ddBa3 (;(\$2))
2817 . nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2818 . if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2819 . nr doc-reg-ddBa1 1
2822 . \" enable all warnings again
2823 . warn \n[doc-reg-ddBa2]
2826 . ie \n[doc-reg-ddBa1] \
2827 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2829 . doc-get-width "\$2"
2830 . ie (\n[doc-width] <= 3) \{\
2831 . \" if the offset parameter is a macro, use the macro's
2832 . \" width as specified in doc-common
2833 . doc-get-arg-type "\$2"
2834 . ie (\n[doc-arg-type] == 1) \
2835 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2837 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2840 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2843 . el \{ .ie "\$1"-compact" \
2844 . nr doc-is-compact 1
2845 . el \{ .ie "\$1"-file" \{\
2847 . ds doc-display-file "\$2
2851 . tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2854 . tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2857 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2858 . shift \n[doc-reg-ddBa]
2859 . doc-do-Bd-args \$@
2864 .\" NS Ed user macro
2868 .\" NS doc-display-depth
2869 .\" NS doc-display-indent-stackXXX
2870 .\" NS doc-display-type-stackXXX
2871 .\" NS doc-macro-name
2873 .\" NS width register `Ed' set in doc-common
2876 . ds doc-macro-name Ed
2880 . if !\n[doc-display-depth] \{\
2881 . tm mdoc warning: Extraneous .Ed (#\n[.c])
2882 . nr doc-display-depth 1
2885 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2886 . ft \n[doc-display-ft-stack\n[doc-display-depth]]
2887 . ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2890 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2892 . \" restore saved adjustment and fill modes
2893 . ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2897 . ad \n[doc-display-ad-stack\n[doc-display-depth]]
2899 . nr doc-display-indent-stack\n[doc-display-depth] 0
2900 . ds doc-display-type-stack\n[doc-display-depth]
2901 . nr doc-display-depth -1
2905 .\" NS doc-list-type-stackXXX global string
2906 .\" NS stack of list types
2909 .\" NS doc-list-depth
2911 .ds doc-list-type-stack1
2914 .\" NS doc-list-indent-stackXXX global register
2915 .\" NS stack of list indentation values
2918 .\" NS doc-list-depth
2920 .nr doc-list-indent-stack1 0
2923 .\" NS doc-list-have-indent-stackXXX global register (bool)
2924 .\" NS an indentation value is active
2927 .\" NS doc-list-depth
2929 .nr doc-list-have-indent-stack1 0
2932 .\" NS Bl user macro
2935 .\" NS width register `Bl' set in doc-common
2940 .\" NS doc-list-depth
2941 .\" NS doc-list-have-indent-stackXXX
2942 .\" NS doc-list-indent-stackXXX
2943 .\" NS doc-list-type-stackXXX
2944 .\" NS doc-macro-name
2946 .\" NS doc-num-columns
2948 .\" NS local variables:
2957 . ds doc-macro-name Bl
2958 . nr doc-list-depth +1
2961 . ie "\$1"-hang" \{\
2962 . ds doc-list-type-stack\n[doc-list-depth] hang-list
2963 . nr doc-list-indent-stack\n[doc-list-depth] 6n
2964 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2966 . el \{ .ie "\$1"-tag" \{\
2967 . ds doc-list-type-stack\n[doc-list-depth] tag-list
2968 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2970 . el \{ .ie "\$1"-item" \{\
2971 . ds doc-list-type-stack\n[doc-list-depth] item-list
2972 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2974 . el \{ .ie "\$1"-enum" \{\
2975 . ds doc-list-type-stack\n[doc-list-depth] enum-list
2976 . nr doc-list-indent-stack\n[doc-list-depth] 3n
2977 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2979 . el \{ .ie "\$1"-bullet" \{\
2980 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
2981 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2982 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2984 . el \{ .ie "\$1"-dash" \{\
2985 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2986 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2987 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2989 . el \{ .ie "\$1"-hyphen" \{\
2990 . ds doc-list-type-stack\n[doc-list-depth] dash-list
2991 . nr doc-list-indent-stack\n[doc-list-depth] 2n
2992 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2994 . el \{ .ie "\$1"-inset" \{\
2995 . ds doc-list-type-stack\n[doc-list-depth] inset-list
2996 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
2998 . el \{ .ie "\$1"-diag" \{\
2999 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3001 . el \{ .ie "\$1"-ohang" \{\
3002 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3003 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
3005 . el \{ .ie "\$1"-column" \{\
3006 . ds doc-list-type-stack\n[doc-list-depth] column-list
3010 . tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3011 . tm1 " in .Bl macro
3014 . \}\}\}\}\}\}\}\}\}\}\}
3016 . \" we have seen a list type
3017 . if !\n[doc-arg-ptr] \{\
3020 . nr doc-list-depth -1
3026 . \" fill argument vector
3028 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3029 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3030 . \" dummy type and space so that doc-save-global-vars() doesn't warn
3031 . nr doc-type\n[doc-reg-Bl] 0
3032 . ds doc-space\n[doc-reg-Bl]
3036 . doc-increment-list-stack
3039 . nr doc-arg-limit \n[.$]
3043 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3045 . \" initialize column list
3046 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3047 . doc-set-column-tab \n[doc-num-columns]
3048 ' in -\n[doc-column-indent-width]u
3049 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3050 . sp \n[doc-display-vertical]u
3053 . nr doc-num-columns 0
3060 .\" NS doc-Bl-usage macro
3063 . tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3064 . tm1 " [-width <string>]
3065 . tm1 " [-offset <string>] [-compact]
3066 . tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
3067 . tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3068 . tm1 " [-offset <string>] [-compact] (#\n[.c])
3072 .\" NS doc-do-Bl-args macro
3073 .\" NS resolve remaining .Bl arguments
3078 .\" NS doc-compact-list-stackXXX
3079 .\" NS doc-list-indent-stackXXX
3080 .\" NS doc-list-offset-stackXXX
3081 .\" NS doc-num-columns
3082 .\" NS doc-tag-prefix-stackXXX
3083 .\" NS doc-tag-width-stackXXX
3085 .\" NS local variables:
3089 .\" NS doc-reg-dBla1
3090 .\" NS doc-reg-dBla2
3091 .\" NS doc-reg-dBla3
3092 .\" NS doc-reg-dBla4
3094 .\" NS doc-str-dBla1
3099 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3102 . \" avoid a warning message in case e.g. `-offset' has no parameter
3103 . nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3104 . if !d doc-arg\n[doc-reg-dBla] \
3105 . ds doc-arg\n[doc-reg-dBla]
3109 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3110 . nr doc-compact-list-stack\n[doc-list-depth] 1
3112 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3113 . ie (\n[doc-list-depth] > 1) \{\
3114 . nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3115 . ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3116 . as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3117 . length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3118 . nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3121 . tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3124 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3126 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3128 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3129 . substring doc-str-dBla 0 0
3130 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3131 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3132 . substring doc-str-dBla 1
3133 . doc-first-parameter \*[doc-str-dBla]
3134 . doc-get-width "\*[doc-str-dfp]
3135 . doc-get-arg-type "\*[doc-str-dfp]
3136 . ie (\n[doc-arg-type] == 1) \
3137 . nr doc-reg-dBla1 1
3139 . nr doc-reg-dBla1 0
3142 . nr doc-reg-dBla1 0
3143 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3145 . ie \n[doc-reg-dBla1] \{\
3146 . \" execute string in a box to get the width of the diversion
3147 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3148 . doc-save-global-vars
3155 . nop \*[doc-str-dBla]
3159 . doc-restore-global-vars
3160 . doc-get-width \h'\n[dl]u'
3161 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3164 . \" test whether argument is a valid numeric expression
3165 . nr doc-reg-dBla1 0
3166 . if \B
\a(\*[doc-str-dBla])
\a \{\
3167 . \" disable warnings related to scaling indicators (32)
3168 . nr doc-reg-dBla2 \n[.warn]
3169 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3171 . \" values without a scaling indicator are taken as strings;
3172 . \" we test whether the parameter string with and without the last
3173 . \" character yields identical numerical results (ignoring the
3174 . \" scaling indicator)
3175 . ds doc-str-dBla1 "\*[doc-str-dBla]
3176 . substring doc-str-dBla1 0 -2
3177 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3178 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3179 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3180 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3181 . nr doc-reg-dBla1 1
3184 . \" enable all warnings again
3185 . warn \n[doc-reg-dBla2]
3188 . ie \n[doc-reg-dBla1] \
3189 . nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3191 . doc-get-arg-width \n[doc-arg-ptr]
3192 . ie (\n[doc-width] == 2) \{\
3193 . \" if the width parameter is a macro, use the macro's
3194 . \" width as specified in doc-common
3195 . doc-get-arg-type \*[doc-str-dBla]
3196 . ie (\n[doc-arg-type] == 1) \
3197 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3199 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3202 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3205 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3208 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3209 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3211 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3212 . nr doc-reg-dBla1 0
3213 . if \B
\a(\*[doc-str-dBla])
\a \{\
3214 . nr doc-reg-dBla2 \n[.warn]
3215 . warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3217 . ds doc-str-dBla1 "\*[doc-str-dBla]
3218 . substring doc-str-dBla1 0 -2
3219 . if \B
\a(\*[doc-str-dBla1])
\a \{\
3220 . nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3221 . nr doc-reg-dBla4 (\*[doc-str-dBla1])
3222 . if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3223 . nr doc-reg-dBla1 1
3226 . warn \n[doc-reg-dBla2]
3229 . ie \n[doc-reg-dBla1] \
3230 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3232 . doc-get-arg-width \n[doc-arg-ptr]
3233 . ie (\n[doc-width] <= 3) \{\
3234 . \" if the offset parameter is a macro, use the macro's
3235 . \" width as specified in doc-common
3236 . doc-get-arg-type \*[doc-str-dBla]
3237 . ie (\n[doc-arg-type] == 1) \
3238 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3240 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3243 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3249 . \" not a known keyword, so it specifies the width of the next column
3250 . \" (if it is a column list)
3251 . if !\n[doc-reg-dBla] \{\
3252 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3253 . nr doc-num-columns +1
3254 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3255 . substring doc-str-dBla 0 0
3256 . ie
\a.
\a\*[doc-str-dBla]
\a \{\
3257 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3258 . substring doc-str-dBla 1
3259 . doc-first-parameter \*[doc-str-dBla]
3260 . doc-get-width "\*[doc-str-dfp]
3261 . doc-get-arg-type "\*[doc-str-dfp]
3262 . ie (\n[doc-arg-type] == 1) \
3263 . nr doc-reg-dBla1 1
3265 . nr doc-reg-dBla1 0
3268 . nr doc-reg-dBla1 0
3269 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3271 . ie \n[doc-reg-dBla1] \{\
3272 . \" execute string in a box to get the width of the diversion
3273 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3274 . doc-save-global-vars
3281 . nop \*[doc-str-dBla]
3285 . doc-restore-global-vars
3286 . ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3289 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3292 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3293 . tm1 " in .Bl macro (#\n[.c])
3296 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3301 .\" NS doc-save-global-vars macro
3302 .\" NS save all global variables
3304 .\" NS local variables:
3307 .de doc-save-global-vars
3308 . ds doc-macro-name-saved "\*[doc-macro-name]
3309 . nr doc-arg-limit-saved \n[doc-arg-limit]
3310 . nr doc-num-args-saved \n[doc-num-args]
3311 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3314 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3315 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3316 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3317 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3318 . nr doc-reg-dsgv +1
3321 . nr doc-curr-font-saved \n[doc-curr-font]
3322 . nr doc-curr-size-saved \n[doc-curr-size]
3323 . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3324 . nr doc-in-library-section-saved \n[doc-in-library-section]
3325 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3326 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3327 . nr doc-have-decl-saved \n[doc-have-decl]
3328 . nr doc-have-var-saved \n[doc-have-var]
3329 . ds doc-command-name-saved "\*[doc-command-name]
3330 . ds doc-quote-left-saved "\*[doc-quote-left]
3331 . ds doc-quote-right-saved "\*[doc-quote-right]
3332 . nr doc-nesting-level-saved \n[doc-nesting-level]
3333 . nr doc-in-list-saved \n[doc-in-list]
3334 . ds doc-space-saved "\*[doc-space]
3335 . ds doc-saved-space-saved "\*[doc-saved-space]
3336 . nr doc-space-mode-saved \n[doc-space-mode]
3337 . nr doc-have-space-saved \n[doc-have-space]
3338 . nr doc-have-slot-saved \n[doc-have-slot]
3339 . nr doc-keep-type-saved \n[doc-keep-type]
3340 . nr doc-display-depth-saved \n[doc-display-depth]
3341 . nr doc-is-compact-saved \n[doc-is-compact]
3344 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3345 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3346 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3347 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3348 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3349 . nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3350 . nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3351 . nr doc-reg-dsgv +1
3354 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3357 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3358 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3359 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3360 . nr doc-reg-dsgv +1
3363 . nr doc-list-depth-saved \n[doc-list-depth]
3366 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3367 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3368 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3369 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3370 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3371 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3372 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3373 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3374 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3375 . nr doc-reg-dsgv +1
3378 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3379 . nr doc-curr-type-saved \n[doc-curr-type]
3380 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3381 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3382 . nr doc-num-columns-saved \n[doc-num-columns]
3383 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3384 . nr doc-is-func-saved \n[doc-is-func]
3385 . nr doc-have-old-func-saved \n[doc-have-old-func]
3386 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3387 . ds doc-func-arg-saved "\*[doc-func-arg]
3388 . nr doc-num-func-args-saved \n[doc-num-func-args]
3389 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3390 . nr doc-have-func-saved \n[doc-have-func]
3391 . nr doc-is-reference-saved \n[doc-is-reference]
3392 . nr doc-reference-count-saved \n[doc-reference-count]
3393 . nr doc-author-count-saved \n[doc-author-count]
3396 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3397 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3398 . nr doc-reg-dsgv +1
3401 . nr doc-book-count-saved \n[doc-book-count]
3402 . ds doc-book-name-saved "\*[doc-book-name]
3403 . nr doc-date-count-saved \n[doc-date-count]
3404 . ds doc-date-saved "\*[doc-date]
3405 . nr doc-publisher-count-saved \n[doc-publisher-count]
3406 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3407 . nr doc-journal-count-saved \n[doc-journal-count]
3408 . ds doc-journal-name-saved "\*[doc-journal-name]
3409 . nr doc-issue-count-saved \n[doc-issue-count]
3410 . ds doc-issue-name-saved "\*[doc-issue-name]
3411 . nr doc-optional-count-saved \n[doc-optional-count]
3412 . ds doc-optional-string-saved "\*[doc-optional-string]
3413 . nr doc-page-number-count-saved \n[doc-page-number-count]
3414 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3415 . nr doc-corporate-count-saved \n[doc-corporate-count]
3416 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3417 . nr doc-report-count-saved \n[doc-report-count]
3418 . ds doc-report-name-saved "\*[doc-report-name]
3419 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3420 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3421 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3422 . nr doc-volume-count-saved \n[doc-volume-count]
3423 . ds doc-volume-name-saved "\*[doc-volume-name]
3424 . nr doc-have-author-saved \n[doc-have-author]
3426 . ds doc-document-title-saved "\*[doc-document-title]
3427 . ds doc-volume-saved "\*[doc-volume]
3428 . ds doc-section-saved "\*[doc-section]
3429 . ds doc-operating-system-saved "\*[doc-operating-system]
3430 . ds doc-date-string-saved "\*[doc-date-string]
3431 . nr doc-header-space-saved \n[doc-header-space]
3432 . nr doc-footer-space-saved \n[doc-footer-space]
3433 . nr doc-display-vertical-saved \n[doc-display-vertical]
3434 . ds doc-header-string-saved "\*[doc-header-string]
3435 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3436 . nr doc-in-files-section-saved \n[doc-in-files-section]
3437 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3441 .\" NS doc-restore-global-vars macro
3442 .\" NS restore all global variables
3444 .\" NS local variables:
3447 .de doc-restore-global-vars
3448 . ds doc-macro-name "\*[doc-macro-name-saved]
3449 . nr doc-arg-limit \n[doc-arg-limit-saved]
3450 . nr doc-num-args \n[doc-num-args-saved]
3451 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3454 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3455 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3456 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3457 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3458 . nr doc-reg-drgv +1
3461 . nr doc-curr-font \n[doc-curr-font-saved]
3462 . nr doc-curr-size \n[doc-curr-size-saved]
3463 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3464 . nr doc-in-library-section \n[doc-in-library-section-saved]
3465 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3466 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3467 . nr doc-have-decl \n[doc-have-decl-saved]
3468 . nr doc-have-var \n[doc-have-var-saved]
3469 . ds doc-command-name "\*[doc-command-name-saved]
3470 . ds doc-quote-left "\*[doc-quote-left-saved]
3471 . ds doc-quote-right "\*[doc-quote-right-saved]
3472 . nr doc-nesting-level \n[doc-nesting-level-saved]
3473 . nr doc-in-list \n[doc-in-list-saved]
3474 . ds doc-space "\*[doc-space-saved]
3475 . ds doc-saved-space "\*[doc-saved-space-saved]
3476 . nr doc-space-mode \n[doc-space-mode-saved]
3477 . nr doc-have-space \n[doc-have-space-saved]
3478 . nr doc-have-slot \n[doc-have-slot-saved]
3479 . nr doc-keep-type \n[doc-keep-type-saved]
3480 . nr doc-display-depth \n[doc-display-depth-saved]
3481 . nr doc-is-compact \n[doc-is-compact-saved]
3484 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3485 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3486 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3487 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3488 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3489 . nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3490 . nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3491 . nr doc-reg-drgv +1
3494 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3497 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3498 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3499 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3500 . nr doc-reg-drgv +1
3503 . nr doc-list-depth \n[doc-list-depth-saved]
3506 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3507 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3508 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3509 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3510 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3511 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3512 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3513 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3514 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3515 . nr doc-reg-drgv +1
3518 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3519 . nr doc-curr-type \n[doc-curr-type-saved]
3520 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3521 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3522 . nr doc-num-columns \n[doc-num-columns-saved]
3523 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3524 . nr doc-is-func \n[doc-is-func-saved]
3525 . nr doc-have-old-func \n[doc-have-old-func-saved]
3526 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3527 . ds doc-func-arg "\*[doc-func-arg-saved]
3528 . nr doc-num-func-args \n[doc-num-func-args-saved]
3529 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3530 . nr doc-have-func \n[doc-have-func-saved]
3531 . nr doc-is-reference \n[doc-is-reference-saved]
3532 . nr doc-reference-count \n[doc-reference-count-saved]
3533 . nr doc-author-count \n[doc-author-count-saved]
3536 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3537 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3538 . nr doc-reg-drgv +1
3541 . nr doc-book-count \n[doc-book-count-saved]
3542 . ds doc-book-name "\*[doc-book-name-saved]
3543 . nr doc-date-count \n[doc-date-count-saved]
3544 . ds doc-date "\*[doc-date-saved]
3545 . nr doc-publisher-count \n[doc-publisher-count-saved]
3546 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3547 . nr doc-journal-count \n[doc-journal-count-saved]
3548 . ds doc-journal-name "\*[doc-journal-name-saved]
3549 . nr doc-issue-count \n[doc-issue-count-saved]
3550 . ds doc-issue-name "\*[doc-issue-name-saved]
3551 . nr doc-optional-count \n[doc-optional-count-saved]
3552 . ds doc-optional-string "\*[doc-optional-string-saved]
3553 . nr doc-page-number-count \n[doc-page-number-count-saved]
3554 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3555 . nr doc-corporate-count \n[doc-corporate-count-saved]
3556 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3557 . nr doc-report-count \n[doc-report-count-saved]
3558 . ds doc-report-name "\*[doc-report-name-saved]
3559 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3560 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3561 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3562 . nr doc-volume-count \n[doc-volume-count-saved]
3563 . ds doc-volume-name "\*[doc-volume-name-saved]
3564 . nr doc-have-author \n[doc-have-author-saved]
3566 . ds doc-document-title "\*[doc-document-title-saved]
3567 . ds doc-volume "\*[doc-volume-saved]
3568 . ds doc-section "\*[doc-section-saved]
3569 . ds doc-operating-system "\*[doc-operating-system-saved]
3570 . ds doc-date-string "\*[doc-date-string-saved]
3571 . nr doc-header-space \n[doc-header-space-saved]
3572 . nr doc-footer-space \n[doc-footer-space-saved]
3573 . nr doc-display-vertical \n[doc-display-vertical-saved]
3574 . ds doc-header-string "\*[doc-header-string-saved]
3575 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3576 . nr doc-in-files-section \n[doc-in-files-section-saved]
3577 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3581 .\" NS El user macro
3585 .\" NS doc-list-depth
3586 .\" NS doc-macro-name
3588 .\" NS local variables:
3591 .\" NS width register `El' set in doc-common
3595 . tm Usage: .El (does not take arguments) (#\n[.c])
3599 . ds doc-macro-name El
3600 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3602 . ie "\*[doc-str-El]"diag-list" \
3604 . el \{ .ie "\*[doc-str-El]"column-list" \
3605 . doc-end-column-list
3606 . el \{ .ie "\*[doc-str-El]"item-list" \
3608 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3610 . el \{ .ie "\*[doc-str-El]"inset-list" \
3620 .\" NS doc-saved-Pa-font global string
3621 .\" NS saved doc-Pa-font string for section FILES (no underline if
3624 .ds doc-saved-Pa-font
3627 .\" NS doc-curr-type global register
3628 .\" NS current argument type
3633 .\" NS doc-curr-arg global string
3634 .\" NS current argument
3639 .\" NS doc-item-boxXXX global box
3640 .\" NS item boxes associated list depth
3643 .\" NS doc-list-depth
3646 .\" NS It user macro
3653 .\" NS doc-curr-type
3655 .\" NS doc-macro-name
3657 .\" NS doc-saved-Pa-font
3659 .\" NS local variables:
3662 .\" NS doc-XXX-list-type
3664 .\" NS width register `It' set in doc-common
3666 .nr doc-bullet-list-type 1
3667 .nr doc-column-list-type 0
3668 .nr doc-dash-list-type 1
3669 .nr doc-diag-list-type 0
3670 .nr doc-enum-list-type 1
3671 .nr doc-hang-list-type 2
3672 .nr doc-inset-list-type 2
3673 .nr doc-item-list-type 1
3674 .nr doc-ohang-list-type 2
3675 .nr doc-tag-list-type 2
3678 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3680 . if "\*[doc-str-It]"" \
3681 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3683 . if \n[doc-nesting-level] \{\
3684 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3693 . ds doc-macro-name It
3695 . \" fill argument vector
3697 . while (\n[doc-reg-It] <= \n[.$]) \{\
3698 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3702 . nr doc-num-args \n[.$]
3706 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3708 . if \n[doc-reg-It] \{\
3710 . box doc-item-box\n[doc-list-depth]
3711 . ev doc-item-env\n[doc-list-depth]
3717 . ie (\n[doc-reg-It] == 1) \{\
3719 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3720 . tm1 " don't take arguments (#\n[.c])
3724 . if (\n[doc-reg-It] == 2) \{\
3725 . \" handle list types with arguments
3726 . doc-parse-arg-vector
3730 . nr doc-curr-type \n[doc-type1]
3731 . ds doc-curr-arg "\*[doc-arg1]
3733 . if \n[doc-in-files-section] \{\
3734 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3736 . ds doc-Pa-font "\*[doc-No-font]
3739 . ie (\n[doc-type1] == 1) \
3743 . doc-print-recursive
3746 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3747 . tm1 " require arguments (#\n[.c])
3751 . \" the previous call of `.doc-print-recursive' can contain calls to
3752 . \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3753 . if !\n[doc-nesting-level] \
3754 . doc-\*[doc-str-It]
3758 .\" NS doc-inset-list macro
3759 .\" NS .It item of list-type inset
3765 . \" finish item box
3769 . unformat doc-item-box\n[doc-list-depth]
3771 . doc-set-vertical-and-indent 0
3775 . doc-item-box\n[doc-list-depth]
3777 . if \n[doc-in-files-section] \
3779 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3786 .\" NS doc-hang-list macro
3787 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3790 .\" NS doc-have-space
3793 .\" NS local variables:
3798 . \" finish item box
3802 . unformat doc-item-box\n[doc-list-depth]
3804 . doc-set-vertical-and-indent 1
3805 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3806 . ti -\n[doc-reg-dhl]u
3809 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3810 . doc-item-box\n[doc-list-depth]
3812 . chop doc-item-box\n[doc-list-depth]
3813 . nr doc-reg-dhl1 \n[.k]u
3814 . nop \*[doc-item-box\n[doc-list-depth]]\c
3815 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3816 . nr doc-have-space 1
3819 . if \n[doc-in-files-section] \
3821 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3828 .\" NS doc-ohang-list macro
3829 .\" NS .It item of list-type overhanging tag
3835 . \" finish item box
3839 . unformat doc-item-box\n[doc-list-depth]
3841 . doc-set-vertical-and-indent 0
3843 . doc-item-box\n[doc-list-depth]
3846 . if \n[doc-in-files-section] \
3848 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3855 .\" NS doc-item-list macro
3856 .\" NS .It item of list-type [empty tag]
3859 . \" finish (dummy) item box
3864 . doc-set-vertical-and-indent 0
3871 .\" NS doc-enum-list-count-stackXXX global register
3872 .\" NS stack of current enum count values
3875 .\" NS doc-list-depth
3877 .nr doc-enum-list-count-stack1 0
3880 .\" NS doc-enum-list macro
3881 .\" NS enumerated list
3884 .\" NS doc-enum-list-count-stackXXX
3889 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3891 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3893 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3894 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3899 .\" NS doc-bullet-list macro
3900 .\" NS bullet paragraph list
3907 . nop \)\*[doc-Sy-font]\[bu]\f[]
3912 .\" NS doc-dash-list macro
3913 .\" NS hyphen paragraph list (sub bullet list)
3920 . nop \)\*[doc-Sy-font]\-\f[]
3925 .\" NS doc-do-list macro
3926 .\" NS .It item of list-type enum/bullet/hyphen
3928 .als doc-do-list doc-hang-list
3931 .\" NS doc-diag-list-input-line-count global register
3932 .\" NS saved line number to be checked in next diag-list item
3934 .nr doc-diag-list-input-line-count 0
3937 .\" NS doc-diag-list macro
3938 .\" NS .It item of list-type diagnostic-message
3941 .\" NS doc-curr-font
3942 .\" NS doc-curr-size
3943 .\" NS doc-diag-list-input-line-count
3946 . nr doc-curr-font \n[.f]
3947 . nr doc-curr-size \n[.ps]
3949 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3950 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3957 . nr doc-diag-list-input-line-count \n[.c]
3960 . nop \*[doc-Sy-font]\c
3961 . if \n[doc-num-args] \
3962 . doc-remaining-args
3963 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3965 . doc-print-and-reset
3969 .\" NS doc-tag-list macro
3970 .\" NS .It item of list-type `tag'
3973 .\" NS doc-have-space
3976 .\" NS local variables:
3982 . \" finish item box
3986 . unformat doc-item-box\n[doc-list-depth]
3988 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
3995 . doc-item-box\n[doc-list-depth]
4000 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4001 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4002 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4003 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
4007 . doc-set-vertical-and-indent 1
4008 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4009 . ti -\n[doc-reg-dtl]u
4012 . doc-item-box\n[doc-list-depth]
4013 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4016 . \" format the tag separately to prevent stretching of spaces
4022 . nr doc-have-space 1
4025 . if \n[doc-in-files-section] \
4027 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4034 .\" NS doc-get-tag-width macro
4035 .\" NS resolve unknown tag width (`tag' list-type only)
4038 .\" NS doc-list-indent-stackXXX
4039 .\" NS doc-tag-width-stackXXX
4043 .\" NS doc-curr-type
4045 .de doc-get-tag-width
4046 . ie (\n[doc-curr-type] == 1) \{\
4047 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4048 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4051 . ds doc-tag-width-stack\n[doc-list-depth] No
4052 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4057 .\" NS doc-set-vertical-and-indent macro
4058 .\" NS set up vertical spacing (if not compact) and indentation (with
4059 .\" NS offset if argument is non-zero)
4062 .\" NS doc-list-have-indent-stackXXX
4064 .de doc-set-vertical-and-indent
4065 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4066 . sp \n[doc-display-vertical]u
4068 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4069 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4071 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4079 .\" NS doc-list-depth global register
4080 .\" NS list type stack counter
4082 .nr doc-list-depth 0
4085 .\" NS doc-num-columns global register
4086 .\" NS number of columns
4088 .nr doc-num-columns 0
4091 .\" NS doc-compact-list-stackXXX global register (bool)
4092 .\" NS stack of flags to indicate whether a particular list is compact
4095 .\" NS doc-list-depth
4097 .nr doc-compact-list-stack1 0
4100 .\" NS doc-tag-prefix-stackXXX global string
4101 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4104 .\" NS doc-list-depth
4106 .ds doc-tag-prefix-stack1
4109 .\" NS doc-tag-width-stackXXX global string
4110 .\" NS stack of strings indicating how to set up current element of
4111 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4112 .\" NS directly; if it is a macro name, use the macro's width value;
4113 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4116 .\" NS doc-list-depth
4118 .ds doc-tag-width-stack0
4119 .ds doc-tag-width-stack1
4122 .\" NS doc-list-offset-stackXXX global register
4123 .\" NS stack of list offsets
4126 .\" NS doc-list-depth
4128 .nr doc-list-offset-stack1 0
4131 .\" NS doc-end-list macro
4132 .\" NS list end function; resets indentation (and offset if argument is
4136 .\" NS doc-list-depth
4137 .\" NS doc-list-offset-stackXXX
4141 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4143 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4145 . if (\n[doc-list-depth] <= 0) \
4146 . tm mdoc warning: extraneous .El call (#\n[.c])
4148 . doc-decrement-list-stack
4149 . nr doc-list-depth -1
4153 .\" NS doc-increment-list-stack macro
4154 .\" NS set up next block for list
4157 .\" NS doc-compact-list-stackXXX
4158 .\" NS doc-list-have-indent-stackXXX
4159 .\" NS doc-list-indent-stackXXX
4160 .\" NS doc-list-offset-stackXXX
4161 .\" NS doc-list-type-stackXXX
4162 .\" NS doc-tag-prefix-stackXXX
4163 .\" NS doc-tag-width-stackXXX
4164 .\" NS doc-enum-list-count-stackXXX
4166 .\" NS local variables:
4169 .de doc-increment-list-stack
4170 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4171 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4172 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4173 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4174 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4175 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4176 . ds doc-list-type-stack\n[doc-reg-dils]
4177 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4178 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4182 .\" NS doc-decrement-list-stack macro
4183 .\" NS decrement stack
4186 .\" NS doc-compact-list-stackXXX
4187 .\" NS doc-list-have-indent-stackXXX
4188 .\" NS doc-list-indent-stackXXX
4189 .\" NS doc-list-offset-stackXXX
4190 .\" NS doc-list-type-stackXXX
4191 .\" NS doc-tag-prefix-stackXXX
4192 .\" NS doc-tag-width-stackXXX
4193 .\" NS doc-enum-list-count-stackXXX
4195 .de doc-decrement-list-stack
4196 . ds doc-list-type-stack\n[doc-list-depth]
4197 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4198 . nr doc-list-indent-stack\n[doc-list-depth] 0
4199 . nr doc-list-offset-stack\n[doc-list-depth] 0
4200 . ds doc-tag-prefix-stack\n[doc-list-depth]
4201 . ds doc-tag-width-stack\n[doc-list-depth]
4202 . nr doc-compact-list-stack\n[doc-list-depth] 0
4203 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4207 .\" NS Xr user macro
4208 .\" NS cross reference (for man pages only)
4212 .\" NS doc-macro-name
4214 .\" NS local variables:
4217 .\" NS width register `Xr' set in doc-common
4220 . if !\n[doc-arg-limit] \{\
4222 . ds doc-macro-name Xr
4223 . doc-parse-args \$@
4229 . if !\n[doc-arg-limit] \
4233 . doc-print-prefixes
4234 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4235 . \" first argument must be a string
4236 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4237 . nr doc-curr-font \n[.f]
4238 . nr doc-curr-size \n[.ps]
4239 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4241 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4242 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4243 . \" modify second argument if it is a string and
4244 . \" remove space inbetween
4245 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4246 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4247 . ds doc-space\n[doc-arg-ptr]
4250 . doc-print-recursive
4260 .\" NS doc-Xr-usage macro
4263 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4268 .\" NS Sx user macro
4269 .\" NS cross section reference
4271 .\" NS width register `Sx' set in doc-common
4273 .als Sx doc-generic-macro
4274 .ds doc-Sx-usage section_header
4277 .\" NS doc-end-column-list macro
4278 .\" NS column-list end-list
4281 .\" NS doc-list-depth
4283 .de doc-end-column-list
4285 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4288 . doc-decrement-list-stack
4289 . nr doc-list-depth -1
4293 .\" NS doc-column-indent-width global register
4294 .\" NS holds the indent width for a column list
4296 .nr doc-column-indent-width 0
4299 .\" NS doc-set-column-tab macro
4300 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4303 .\" NS doc-column-indent-width
4305 .\" NS local variables:
4308 .\" NS doc-str-dsct1
4310 .de doc-set-column-tab
4313 . nr doc-column-indent-width 0
4316 . ds doc-str-dsct1 " \"
4319 . ds doc-str-dsct1 " \"
4321 . \" XXX: this is packed abnormally close -- intercolumn width
4322 . \" should be configurable
4323 . ds doc-str-dsct1 " \"
4326 . while (\n[doc-reg-dsct] <= \$1) \{\
4327 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4328 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4329 . nr doc-reg-dsct +1
4332 . ta \*[doc-str-dsct]
4333 ' in +\n[doc-column-indent-width]u
4337 .\" NS doc-column-list macro
4342 .\" NS doc-list-indent-stackXXX
4345 .\" NS local variables:
4349 . if \n[doc-num-args] \
4350 . doc-parse-arg-vector
4353 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4354 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4358 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4359 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4360 . ds doc-space\n[doc-reg-dcl]
4363 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4364 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4367 . in +\n[doc-column-indent-width]u
4369 . ti -\n[doc-column-indent-width]u
4371 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4375 .\" NS Ta user macro
4376 .\" NS append tab (\t)
4381 .\" NS width register `Ta' set in doc-common
4384 . ie \n[doc-arg-limit] \{\
4387 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4388 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4393 . tm1 "Usage: Ta must follow column entry: e.g.
4394 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4399 .\" NS Dl user macro
4400 .\" NS display (one line) literal
4402 .\" NS this function uses the `Li' font
4406 .\" NS doc-curr-font
4407 .\" NS doc-curr-size
4408 .\" NS doc-macro-name
4410 .\" NS width register `Dl' set in doc-common
4414 . in +\n[doc-display-indent]u
4416 . ie \n[doc-arg-limit] \{\
4417 . tm Usage: .Dl not callable by other macros (#\n[.c])
4422 . ds doc-macro-name Dl
4423 . doc-parse-args \$@
4425 . nr doc-curr-font \n[.f]
4426 . nr doc-curr-size \n[.ps]
4427 . nop \*[doc-Li-font]\c
4428 . doc-print-recursive
4431 . tm Usage: .Dl argument ... (#\n[.c])
4434 . in -\n[doc-display-indent]u
4438 .\" NS D1 user macro
4439 .\" NS display (one line)
4443 .\" NS doc-macro-name
4445 .\" NS width register `D1' set in doc-common
4449 . in +\n[doc-display-indent]u
4451 . ie \n[doc-arg-limit] \{\
4452 . tm Usage: .D1 not callable by other macros (#\n[.c])
4457 . ds doc-macro-name D1
4458 . doc-parse-args \$@
4460 . doc-print-recursive
4463 . tm Usage: .D1 argument ... (#\n[.c])
4466 . in -\n[doc-display-indent]u
4470 .\" NS Vt user macro
4471 .\" NS variable type (for forcing old style variable declarations);
4472 .\" NS this is not done in the same manner as .Ot for fortrash --
4473 .\" NS clean up later
4476 .\" NS doc-curr-font
4477 .\" NS doc-curr-size
4478 .\" NS doc-have-decl
4480 .\" NS doc-macro-name
4482 .\" NS width register `Vt' set in doc-common
4485 . if !\n[doc-arg-limit] \{\
4487 . ds doc-macro-name Vt
4488 . doc-parse-args \$@
4491 . tm Usage: .Vt variable_type ... (#\n[.c])
4494 . if !\n[doc-arg-limit] \
4498 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4499 . tm Usage: .Vt variable_type ... (#\n[.c])
4504 . if \n[doc-in-synopsis-section] \{\
4505 . \" if a function declaration was the last thing given,
4506 . \" want vertical space
4507 . if \n[doc-have-decl] \{\
4509 . nr doc-have-decl 0
4512 . \" if a subroutine was the last thing given, want vertical space
4513 . if \n[doc-have-func] \{\
4514 . ie \n[doc-have-var] \
4523 . nr doc-curr-font \n[.f]
4524 . nr doc-curr-size \n[.ps]
4525 . nop \*[doc-Ft-font]\c
4526 . doc-print-recursive
4528 . if \n[doc-in-synopsis-section] \{\
4529 . ie \n[doc-have-old-func] \
4530 . nop \*[doc-soft-space]\c
4537 .\" NS doc-is-func global register (bool)
4538 .\" NS set if subroutine (in synopsis only) (fortran only)
4543 .\" NS Ft user macro
4544 .\" NS function type
4547 .\" NS doc-curr-font
4548 .\" NS doc-curr-size
4549 .\" NS doc-have-decl
4552 .\" NS doc-macro-name
4554 .\" NS width register `Ft' set in doc-common
4557 . if !\n[doc-arg-limit] \{\
4559 . ds doc-macro-name Ft
4560 . doc-parse-args \$@
4563 . tm Usage: .Ft function_type ... (#\n[.c])
4566 . if !\n[doc-arg-limit] \
4570 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4571 . tm Usage: .Ft function_type ... (#\n[.c])
4576 . if \n[doc-in-synopsis-section] \{\
4577 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4579 . nr doc-have-decl 0
4583 . if \n[doc-have-var] \{\
4591 . nr doc-curr-font \n[.f]
4592 . nr doc-curr-size \n[.ps]
4593 . nop \*[doc-Ft-font]\c
4594 . doc-print-recursive
4598 .\" NS doc-have-old-func global register (bool)
4599 .\" NS set if `Ot' has been called
4601 .nr doc-have-old-func 0
4604 .\" NS Ot user macro
4605 .\" NS old function type (fortran -- no newline)
4608 .\" NS doc-have-decl
4609 .\" NS doc-have-old-func
4613 .\" NS width register `Ot' set in doc-common
4616 . nr doc-have-old-func 1
4618 . if \n[doc-in-synopsis-section] \{\
4619 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4621 . nr doc-have-decl 0
4625 . if \n[doc-have-var] \{\
4634 . nop \*[doc-Ft-font]\$*\c
4639 .\" NS Fa user macro
4640 .\" NS function arguments
4644 .\" NS doc-curr-font
4645 .\" NS doc-curr-size
4646 .\" NS doc-macro-name
4648 .\" NS width register `Fa' set in doc-common
4651 . if !\n[doc-arg-limit] \{\
4653 . ds doc-macro-name Fa
4654 . doc-parse-args \$@
4657 . tm Usage: .Fa function_arguments ... (#\n[.c])
4660 . ie \n[doc-func-arg-count] \
4664 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4665 . nr doc-curr-font \n[.f]
4666 . nr doc-curr-size \n[.ps]
4667 . nop \*[doc-Fa-font]\c
4668 . doc-print-recursive
4670 . if \n[doc-in-synopsis-section] \
4671 . if \n[doc-have-func] \
4677 .\" NS doc-func-arg-count global register
4678 .\" NS how many function arguments have been processed so far
4680 .nr doc-func-arg-count 0
4683 .\" NS doc-func-arg global string
4684 .\" NS work buffer for function name strings
4689 .\" NS doc-num-func-args global register
4690 .\" NS number of function arguments
4692 .nr doc-num-func-args 0
4695 .\" NS doc-func-args-processed global register
4696 .\" NS function arguments processed so far
4698 .nr doc-func-args-processed 0
4701 .\" NS doc-do-func macro
4702 .\" NS internal .Fa for .Fc
4708 .\" NS doc-func-arg-count
4709 .\" NS doc-func-args-processed
4710 .\" NS doc-num-func-args
4713 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4721 . nr doc-num-func-args 0
4722 . nr doc-func-args-processed 0
4724 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4725 . if (\n[doc-num-func-args] > 1) \
4726 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4728 . if (\n[doc-func-arg-count] > 1) \{\
4729 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4730 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4731 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4733 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4734 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4737 . if (\n[doc-func-arg-count] == 1) \{\
4738 . nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4741 . nr doc-func-arg-count +1
4746 .\" NS doc-have-func global register (bool)
4747 .\" NS whether we have more than one function in synopsis
4752 .\" NS Fn user macro
4757 .\" NS doc-curr-font
4758 .\" NS doc-curr-size
4759 .\" NS doc-have-decl
4760 .\" NS doc-have-func
4762 .\" NS doc-indent-synopsis
4764 .\" NS doc-macro-name
4766 .\" NS width register `Fn' set in doc-common
4769 . if !\n[doc-arg-limit] \{\
4771 . ds doc-macro-name Fn
4772 . doc-parse-args \$@
4775 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4778 . if !\n[doc-arg-limit] \
4781 . if \n[doc-in-synopsis-section] \{\
4782 . \" if there is/has been more than one subroutine declaration
4783 . ie \n[doc-is-func] \{\
4786 . nr doc-have-decl 0
4790 . if \n[doc-have-func] \{\
4793 . nr doc-have-decl 0
4796 . if \n[doc-have-decl] \{\
4801 . if \n[doc-have-var] \{\
4803 . nr doc-have-decl 0
4806 . nr doc-have-func 1
4810 . if !\n[doc-indent-synopsis] \
4811 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4812 . if !\n[doc-indent-synopsis-active] \
4813 . in +\n[doc-indent-synopsis]u
4814 . ti -\n[doc-indent-synopsis]u
4818 . doc-print-prefixes
4819 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4820 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4825 . nr doc-curr-font \n[.f]
4826 . nr doc-curr-size \n[.ps]
4827 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4828 . nop \f[]\s[0]\*[lp]\)\c
4831 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4832 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4833 . nop \*[doc-Fa-font]\c
4835 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4839 . if \n[doc-in-synopsis-section] \
4842 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4843 . \" output the space (if needed)
4845 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4848 . doc-print-recursive
4851 . doc-print-and-reset
4853 . if \n[doc-in-synopsis-section] \
4854 . if !\n[doc-indent-synopsis-active] \
4855 . in -\n[doc-indent-synopsis]u
4859 .\" NS doc-do-func-args macro
4860 .\" NS handle function arguments
4866 .\" NS doc-func-args-processed
4867 .\" NS doc-num-func-args
4869 .\" NS local variables:
4872 .de doc-do-func-args
4873 . if \n[doc-in-synopsis-section] \{\
4875 . nr doc-num-func-args 0
4876 . nr doc-func-args-processed 0
4878 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4879 . if (\n[doc-num-func-args] > 1) \
4880 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4883 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4886 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4887 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4888 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4889 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4890 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4891 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4893 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4899 .\" NS doc-saved-nesting-level global register
4901 .nr doc-saved-nesting-level 0
4904 .\" NS doc-in-func-enclosure global register (bool)
4906 .nr doc-in-func-enclosure 0
4909 .\" NS Fo user macro
4910 .\" NS function open
4914 .\" NS doc-curr-font
4915 .\" NS doc-curr-size
4916 .\" NS doc-func-arg-count
4917 .\" NS doc-have-decl
4918 .\" NS doc-have-func
4920 .\" NS doc-in-func-enclosure
4921 .\" NS doc-indent-synopsis
4923 .\" NS doc-macro-name
4924 .\" NS doc-saved-nesting-level
4926 .\" NS width register `Fo' set in doc-common
4929 . if (\n[doc-in-func-enclosure]) \{\
4930 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4934 . nr doc-saved-nesting-level \n[doc-nesting-level]
4935 . nr doc-in-func-enclosure 1
4937 . if !\n[doc-arg-limit] \{\
4939 . ds doc-macro-name Fo
4940 . doc-parse-args \$@
4943 . tm Usage: .Fo function_name (#\n[.c])
4946 . if \n[doc-in-synopsis-section] \{\
4947 . \" if there is/has been more than one subroutine declaration
4948 . ie \n[doc-is-func] \{\
4951 . nr doc-have-decl 0
4955 . if \n[doc-have-func] \{\
4958 . nr doc-have-decl 0
4961 . if \n[doc-have-decl] \{\
4966 . if \n[doc-have-var] \{\
4968 . nr doc-have-decl 0
4971 . nr doc-have-func 1
4975 . if !\n[doc-indent-synopsis] \
4976 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4979 . \" start function box
4987 . doc-print-prefixes
4988 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4989 . nr doc-func-arg-count 1
4990 . nr doc-curr-font \n[.f]
4991 . nr doc-curr-size \n[.ps]
4993 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4994 . nop \f[]\s[0]\*[lp]\)\c
5000 .\" NS Fc user macro
5001 .\" NS function close
5005 .\" NS doc-func-arg-count
5006 .\" NS doc-in-func-enclosure
5007 .\" NS doc-saved-nesting-level
5008 .\" NS doc-macro-name
5010 .\" NS width register `Fc' set in doc-common
5013 . if !\n[doc-in-func-enclosure] \{\
5014 . tm mdoc warning: Extraneous .Fc (#\n[.c])
5019 . ds doc-macro-name Fc
5020 . \" the first (dummy) argument is used to get the correct spacing
5021 . doc-parse-args \) \$@
5024 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5025 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5027 . nr doc-func-arg-count 0
5028 . nr doc-in-func-enclosure 0
5030 . ie \n[doc-in-synopsis-section] \
5035 . \" finish function box
5040 . unformat doc-func-box
5042 . if \n[doc-in-synopsis-section] \{\
5043 . if !\n[doc-indent-synopsis-active] \
5044 . in +\n[doc-indent-synopsis]u
5045 . ti -\n[doc-indent-synopsis]u
5049 . nop \*[doc-func-box]\c
5052 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5053 . nr doc-curr-font \n[.f]
5054 . nr doc-curr-size \n[.ps]
5055 . doc-print-recursive
5058 . doc-print-and-reset
5060 . if \n[doc-in-synopsis-section] \
5061 . if !\n[doc-indent-synopsis-active] \
5062 . in -\n[doc-indent-synopsis]u
5066 .\" NS doc-build-func-string macro
5067 .\" NS collect function arguments and set hard spaces inbetween
5071 .\" NS doc-func-args-processed
5072 .\" NS doc-num-func-args
5074 .de doc-build-func-string
5075 . if !\n[doc-num-func-args] \{\
5076 . nr doc-num-func-args \n[.$]
5077 . nr doc-func-args-processed 0
5081 . nr doc-func-args-processed +1
5082 . as doc-func-arg "\$1
5084 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5085 . as doc-func-arg "\*[doc-hard-space]
5088 . doc-build-func-string \$@
5093 .\" Very crude references: Stash all reference info into boxes, print out
5094 .\" reference on .Re macro and clean up. Ordering very limited, no fancy
5095 .\" citations, but can do articles, journals, and books -- need to add
5096 .\" several missing options (like city etc). Should be able to grab a refer
5097 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5101 .\" NS doc-is-reference global register (bool)
5102 .\" NS set if in reference
5104 .nr doc-is-reference 0
5107 .\" NS doc-reference-count global register
5108 .\" NS reference element counter
5110 .nr doc-reference-count 0
5113 .\" NS Rs user macro
5114 .\" NS reference start
5117 .\" NS doc-is-reference
5118 .\" NS doc-reference-count
5120 .\" NS width register `Rs' set in doc-common
5124 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5126 . nr doc-is-reference 1
5127 . doc-reset-reference
5128 . if \n[doc-in-see-also-section] \
5130 . nr doc-reference-count 0
5135 .\" NS Re user macro
5136 .\" NS reference end
5139 .\" NS doc-is-reference
5141 .\" NS width register `Re' set in doc-common
5145 . tm Usage: .Re (does not take arguments) (#\n[.c])
5147 . doc-print-reference
5148 . doc-reset-reference
5149 . nr doc-is-reference 0
5154 .\" NS doc-reset-reference macro
5155 .\" NS reference cleanup
5158 .\" NS doc-author-count
5159 .\" NS doc-author-nameXXX
5160 .\" NS doc-book-count
5161 .\" NS doc-book-name
5162 .\" NS doc-corporate-count
5163 .\" NS doc-corporate-name
5165 .\" NS doc-date-count
5166 .\" NS doc-issue-count
5167 .\" NS doc-issue-name
5168 .\" NS doc-journal-count
5169 .\" NS doc-journal-name
5170 .\" NS doc-optional-count
5171 .\" NS doc-optional-string
5172 .\" NS doc-page-number-count
5173 .\" NS doc-page-number-string
5174 .\" NS doc-publisher-count
5175 .\" NS doc-publisher-name
5176 .\" NS doc-reference-count
5177 .\" NS doc-reference-title-count
5178 .\" NS doc-reference-title-name
5179 .\" NS doc-reference-title-name-for-book
5180 .\" NS doc-report-count
5181 .\" NS doc-report-name
5182 .\" NS doc-volume-count
5183 .\" NS doc-volume-name
5185 .de doc-reset-reference
5186 . while (\n[doc-author-count]) \{\
5187 . ds doc-author-name\n[doc-author-count]
5188 . nr doc-author-count -1
5190 . nr doc-journal-count 0
5191 . nr doc-issue-count 0
5192 . nr doc-optional-count 0
5193 . nr doc-corporate-count 0
5194 . nr doc-report-count 0
5195 . nr doc-reference-title-count 0
5196 . nr doc-volume-count 0
5197 . nr doc-date-count 0
5198 . nr doc-page-number-count 0
5199 . nr doc-book-count 0
5200 . nr doc-publisher-count 0
5201 . nr doc-reference-count 0
5203 . ds doc-journal-name
5205 . ds doc-optional-string
5206 . ds doc-corporate-name
5207 . ds doc-report-name
5208 . ds doc-reference-title-name
5209 . ds doc-reference-title-name-for-book
5210 . ds doc-volume-name
5212 . ds doc-page-number-string
5214 . ds doc-publisher-name
5218 .\" NS doc-finish-reference macro
5219 .\" NS auxiliary macro for doc-print-reference
5222 .\" NS doc-reference-count
5224 .de doc-finish-reference
5225 . nr doc-reference-count -1
5226 . ie \n[doc-reference-count] \
5233 .\" NS doc-print-reference macro
5234 .\" NS reference print
5237 .\" NS doc-reference-count
5239 .de doc-print-reference
5243 . if \n[doc-author-count] \{\
5244 . doc-print-reference-authors
5245 . nr doc-reference-count -\n[doc-author-count]
5248 . if \n[doc-reference-title-count] \{\
5249 . unformat doc-reference-title-name
5250 . chop doc-reference-title-name
5251 . unformat doc-reference-title-name-for-book
5252 . chop doc-reference-title-name-for-book
5253 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5254 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5255 . doc-finish-reference
5258 . nop \*[doc-reference-title-name]\c
5259 . doc-finish-reference
5262 . if \n[doc-book-count] \{\
5263 . unformat doc-book-name
5264 . chop doc-book-name
5265 . nop \*[doc-book-name]\c
5266 . doc-finish-reference
5269 . if \n[doc-publisher-count] \{\
5270 . unformat doc-publisher-name
5271 . chop doc-publisher-name
5272 . nop \*[doc-publisher-name]\c
5273 . doc-finish-reference
5276 . if \n[doc-journal-count] \{\
5277 . unformat doc-journal-name
5278 . chop doc-journal-name
5279 . nop \*[doc-journal-name]\c
5280 . doc-finish-reference
5283 . if \n[doc-report-count] \{\
5284 . unformat doc-report-name
5285 . chop doc-report-name
5286 . nop \*[doc-report-name]\c
5287 . doc-finish-reference
5290 . if \n[doc-issue-count] \{\
5291 . unformat doc-issue-name
5292 . chop doc-issue-name
5293 . nop \*[doc-issue-name]\c
5294 . doc-finish-reference
5297 . if \n[doc-volume-count] \{\
5298 . unformat doc-volume-name
5299 . chop doc-volume-name
5300 . nop \*[doc-volume-name]\c
5301 . doc-finish-reference
5304 . if \n[doc-page-number-count] \{\
5305 . unformat doc-page-number-string
5306 . chop doc-page-number-string
5307 . nop \*[doc-page-number-string]\c
5308 . doc-finish-reference
5311 . if \n[doc-corporate-count] \{\
5312 . unformat doc-corporate-name
5313 . chop doc-corporate-name
5314 . nop \*[doc-corporate-name]\c
5315 . doc-finish-reference
5318 . if \n[doc-date-count] \{\
5321 . nop \*[doc-date]\c
5322 . doc-finish-reference
5325 . if \n[doc-optional-count] \{\
5326 . unformat doc-optional-string
5327 . chop doc-optional-string
5328 . nop \*[doc-optional-string]\c
5329 . doc-finish-reference
5332 . if \n[doc-reference-count] \
5333 . tm mdoc warning: unresolved reference problem
5335 . hy \n[doc-hyphen-flags]
5339 .\" NS doc-print-reference-authors macro
5340 .\" NS print out reference authors
5342 .\" NS local variables:
5346 .ds doc-str-dpra "and
5348 .de doc-print-reference-authors
5351 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5352 . unformat doc-author-name\n[doc-reg-dpra]
5353 . chop doc-author-name\n[doc-reg-dpra]
5354 . ie (\n[doc-author-count] > 2) \
5355 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5357 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5358 . nr doc-reg-dpra +1
5361 . unformat doc-author-name\n[doc-reg-dpra]
5362 . chop doc-author-name\n[doc-reg-dpra]
5363 . if (\n[doc-author-count] > 1) \
5364 . nop \)\*[doc-str-dpra]
5365 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5369 .\" NS doc-author-count global register
5370 .\" NS counter of author references
5372 .nr doc-author-count 0
5375 .\" NS doc-author-nameXXX global box
5376 .\" NS array of author names
5379 .\" NS doc-author-count
5381 .ds doc-author-name0
5384 .\" NS %A user macro
5385 .\" NS reference author(s)
5389 .\" NS doc-author-count
5390 .\" NS doc-curr-font
5391 .\" NS doc-curr-size
5392 .\" NS doc-macro-name
5393 .\" NS doc-reference-count
5395 .\" NS local variables:
5398 .\" NS width register `%A' set in doc-common
5401 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5402 . tm Usage: .%A author_name ... (#\n[.c])
5406 . nr doc-author-count +1
5407 . nr doc-reference-count +1
5409 . ds doc-macro-name %A
5410 . doc-parse-args \$@
5413 . nr doc-curr-font \n[.f]
5414 . nr doc-curr-size \n[.ps]
5416 . \" save to reference box
5417 . box doc-author-name\n[doc-author-count]
5426 .\" NS doc-book-count global register
5427 .\" NS counter of book references
5429 .nr doc-book-count 0
5432 .\" NS doc-book-name global box
5433 .\" NS string of collected book references
5438 .\" NS %B user macro
5439 .\" NS [reference] book name
5443 .\" NS doc-book-count
5444 .\" NS doc-curr-font
5445 .\" NS doc-curr-size
5446 .\" NS doc-macro-name
5447 .\" NS doc-reference-count
5449 .\" NS local variables:
5452 .\" NS width register `%B' set in doc-common
5455 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5456 . tm Usage: .%B book_name ... (#\n[.c])
5460 . if \n[doc-is-reference] \{\
5461 . nr doc-book-count +1
5462 . nr doc-reference-count +1
5465 . ds doc-macro-name %B
5466 . doc-parse-args \$@
5469 . nr doc-curr-font \n[.f]
5470 . nr doc-curr-size \n[.ps]
5472 . ie \n[doc-is-reference] \{\
5473 . \" append to reference box
5474 . boxa doc-book-name
5479 . nop \*[doc-Em-font]\c
5483 . nop \*[doc-Em-font]\c
5484 . doc-print-recursive
5489 .\" NS doc-date-count global register
5490 .\" NS counter of date references
5492 .nr doc-date-count 0
5495 .\" NS doc-date global box
5496 .\" NS string of collected date references
5501 .\" NS %D user macro
5502 .\" NS [reference] date
5506 .\" NS doc-curr-font
5507 .\" NS doc-curr-size
5508 .\" NS doc-date-count
5509 .\" NS doc-macro-name
5510 .\" NS doc-reference-count
5512 .\" NS local variables:
5515 .\" NS width register `%D' set in doc-common
5518 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5519 . tm Usage: .%D date ... (#\n[.c])
5523 . nr doc-date-count +1
5524 . nr doc-reference-count +1
5526 . ds doc-macro-name %D
5527 . doc-parse-args \$@
5530 . nr doc-curr-font \n[.f]
5531 . nr doc-curr-size \n[.ps]
5533 . \" append to reference box
5543 .\" NS doc-publisher-count global register
5544 .\" NS counter of publisher references
5546 .nr doc-publisher-count 0
5549 .\" NS doc-publisher-name global box
5550 .\" NS string of collected publisher references
5552 .ds doc-publisher-name
5555 .\" NS %I user macro
5556 .\" NS [reference] issuer/publisher name
5560 .\" NS doc-curr-font
5561 .\" NS doc-curr-size
5562 .\" NS doc-macro-name
5563 .\" NS doc-publisher-count
5564 .\" NS doc-reference-count
5566 .\" NS local variables:
5569 .\" NS width register `%I' set in doc-common
5572 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5573 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5577 . nr doc-publisher-count +1
5578 . nr doc-reference-count +1
5580 . ds doc-macro-name %I
5581 . doc-parse-args \$@
5584 . nr doc-curr-font \n[.f]
5585 . nr doc-curr-size \n[.ps]
5587 . \" append to reference box
5588 . boxa doc-publisher-name
5593 . nop \*[doc-Em-font]\c
5598 .\" NS doc-journal-count global register
5599 .\" NS counter of journal references
5601 .nr doc-journal-count 0
5604 .\" NS doc-journal-name global box
5605 .\" NS string of collected journal references
5607 .ds doc-journal-name
5610 .\" NS %J user macro
5611 .\" NS [reference] Journal Name
5615 .\" NS doc-curr-font
5616 .\" NS doc-curr-size
5617 .\" NS doc-journal-count
5618 .\" NS doc-macro-name
5619 .\" NS doc-reference-count
5621 .\" NS local variables:
5624 .\" NS width register `%J' set in doc-common
5627 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5628 . tm Usage: .%J journal_name ... (#\n[.c])
5632 . nr doc-journal-count +1
5633 . nr doc-reference-count +1
5635 . ds doc-macro-name %J
5636 . doc-parse-args \$@
5639 . nr doc-curr-font \n[.f]
5640 . nr doc-curr-size \n[.ps]
5642 . \" append to reference box
5643 . boxa doc-journal-name
5648 . nop \*[doc-Em-font]\c
5653 .\" NS doc-issue-count global register
5654 .\" NS counter of issue number references
5656 .nr doc-issue-count 0
5659 .\" NS doc-issue-name global box
5660 .\" NS string of collected issue number references
5665 .\" NS %N user macro
5666 .\" NS [reference] issue number
5670 .\" NS doc-curr-font
5671 .\" NS doc-curr-size
5672 .\" NS doc-issue-count
5673 .\" NS doc-macro-name
5674 .\" NS doc-reference-count
5676 .\" NS local variables:
5679 .\" NS width register `%N' set in doc-common
5682 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5683 . tm Usage: .%N issue_number ... (#\n[.c])
5687 . nr doc-issue-count +1
5688 . nr doc-reference-count +1
5690 . ds doc-macro-name %N
5691 . doc-parse-args \$@
5694 . nr doc-curr-font \n[.f]
5695 . nr doc-curr-size \n[.ps]
5697 . \" append to reference box
5698 . boxa doc-issue-name
5707 .\" NS doc-optional-count global register
5708 .\" NS counter of optional information references
5710 .nr doc-optional-count 0
5713 .\" NS doc-optional-string global box
5714 .\" NS string of collected optional information references
5716 .ds doc-optional-string
5719 .\" NS %O user macro
5720 .\" NS [reference] optional information
5724 .\" NS doc-curr-font
5725 .\" NS doc-curr-size
5726 .\" NS doc-macro-name
5727 .\" NS doc-optional-count
5728 .\" NS doc-reference-count
5730 .\" NS local variables:
5733 .\" NS width register `%O' set in doc-common
5736 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5737 . tm Usage: .%O optional_information ... (#\n[.c])
5741 . nr doc-optional-count +1
5742 . nr doc-reference-count +1
5744 . ds doc-macro-name %O
5745 . doc-parse-args \$@
5748 . nr doc-curr-font \n[.f]
5749 . nr doc-curr-size \n[.ps]
5751 . \" append to reference box
5752 . boxa doc-optional-string
5761 .\" NS doc-page-number-count global register
5762 .\" NS counter of page number references
5764 .nr doc-page-number-count 0
5767 .\" NS doc-page-number-string global box
5768 .\" NS string of collected page number references
5770 .ds doc-page-number-string
5773 .\" NS %P user macro
5774 .\" NS [reference] page numbers
5778 .\" NS doc-curr-font
5779 .\" NS doc-curr-size
5780 .\" NS doc-macro-name
5781 .\" NS doc-page-number-count
5782 .\" NS doc-reference-count
5784 .\" NS local variables:
5787 .\" NS width register `%P' set in doc-common
5790 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5791 . tm Usage: .%P page_number ... (#\n[.c])
5795 . nr doc-page-number-count +1
5796 . nr doc-reference-count +1
5798 . ds doc-macro-name %P
5799 . doc-parse-args \$@
5802 . nr doc-curr-font \n[.f]
5803 . nr doc-curr-size \n[.ps]
5805 . \" append to reference box
5806 . boxa doc-page-number-string
5815 .\" NS doc-corporate-count global register
5816 .\" NS counter of corporate references
5818 .nr doc-corporate-count 0
5821 .\" NS doc-corporate-name global box
5822 .\" NS string of collected corporate references
5824 .ds doc-corporate-name
5827 .\" NS %Q user macro
5828 .\" NS corporate or foreign author
5832 .\" NS doc-corporate-count
5833 .\" NS doc-curr-font
5834 .\" NS doc-curr-size
5835 .\" NS doc-macro-name
5836 .\" NS doc-reference-count
5838 .\" NS local variables:
5841 .\" NS width register `%Q' set in doc-common
5844 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5845 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5849 . nr doc-corporate-count +1
5850 . nr doc-reference-count +1
5852 . ds doc-macro-name %Q
5853 . doc-parse-args \$@
5856 . nr doc-curr-font \n[.f]
5857 . nr doc-curr-size \n[.ps]
5859 . \" append to reference box
5860 . boxa doc-corporate-name
5869 .\" NS doc-report-count global register
5870 .\" NS counter of report references
5872 .nr doc-report-count 0
5875 .\" NS doc-report-name global box
5876 .\" NS string of collected report references
5881 .\" NS %R user macro
5882 .\" NS [reference] report name
5886 .\" NS doc-curr-font
5887 .\" NS doc-curr-size
5888 .\" NS doc-macro-name
5889 .\" NS doc-reference-count
5890 .\" NS doc-report-count
5892 .\" NS local variables:
5895 .\" NS width register `%R' set in doc-common
5898 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5899 . tm Usage: .%R reference_report ... (#\n[.c])
5903 . nr doc-report-count +1
5904 . nr doc-reference-count +1
5906 . ds doc-macro-name %R
5907 . doc-parse-args \$@
5910 . nr doc-curr-font \n[.f]
5911 . nr doc-curr-size \n[.ps]
5913 . \" append to reference box
5914 . boxa doc-report-name
5923 .\" NS doc-reference-title-count global register
5924 .\" NS counter of reference title references
5926 .nr doc-reference-title-count 0
5929 .\" NS doc-reference-title-name global box
5930 .\" NS string of collected reference title references
5932 .ds doc-reference-title-name
5935 .\" NS doc-reference-title-name-for-book global box
5936 .\" NS string of collected reference title references
5937 .\" NS (saved with another font; this is a shortcoming of groff)
5939 .ds doc-reference-title-name-for-book
5942 .\" NS %T user macro
5943 .\" NS reference title
5947 .\" NS doc-curr-font
5948 .\" NS doc-curr-size
5949 .\" NS doc-macro-name
5950 .\" NS doc-reference-title-count
5951 .\" NS doc-report-count
5953 .\" NS local variables:
5956 .\" NS width register `%T' set in doc-common
5959 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5960 . tm Usage: .%T reference_title ... (#\n[.c])
5964 . if \n[doc-is-reference] \{\
5965 . nr doc-reference-title-count +1
5966 . nr doc-reference-count +1
5969 . ds doc-macro-name %T
5970 . doc-parse-args \$@
5973 . nr doc-curr-font \n[.f]
5974 . nr doc-curr-size \n[.ps]
5975 . ie \n[doc-is-reference] \{\
5976 . \" append to reference box
5977 . boxa doc-reference-title-name-for-book
5982 . nop \*[doc-No-font]\c
5985 . \" do it a second time with another font
5986 . ds doc-macro-name %T
5987 . doc-parse-args \$@
5990 . nr doc-curr-font \n[.f]
5991 . nr doc-curr-size \n[.ps]
5992 . boxa doc-reference-title-name
5997 . nop \*[doc-Em-font]\c
6001 . nop \*[doc-Em-font]\c
6002 . doc-print-recursive
6007 .\" NS doc-volume-count global register
6008 .\" NS counter of reference title references
6010 .nr doc-volume-count 0
6013 .\" NS doc-volume-name global box
6014 .\" NS string of collected volume references
6019 .\" NS %V user macro
6020 .\" NS reference volume
6024 .\" NS doc-curr-font
6025 .\" NS doc-curr-size
6026 .\" NS doc-macro-name
6027 .\" NS doc-reference-title-count
6028 .\" NS doc-volume-count
6030 .\" NS local variables:
6033 .\" NS width register `%V' set in doc-common
6036 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6037 . tm Usage: .%V volume ... (#\n[.c])
6041 . nr doc-volume-count +1
6042 . nr doc-reference-count +1
6044 . ds doc-macro-name %V
6045 . doc-parse-args \$@
6048 . nr doc-curr-font \n[.f]
6049 . nr doc-curr-size \n[.ps]
6051 . \" append to reference box
6052 . boxa doc-volume-name
6061 .\" NS doc-do-references macro
6062 .\" NS reference recursion routine
6067 .\" NS local variables:
6071 .de doc-do-references
6072 . if !\n[doc-is-reference] \
6073 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6075 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6077 . ie (\n[doc-reg-ddr1] == 1) \{\
6078 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6079 . doc-append-arg \c 3
6080 . \*[doc-arg\n[doc-arg-ptr]]
6083 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6085 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6086 . \" finish reference box
6094 . nr doc-reg-ddr \n[doc-arg-ptr]
6096 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6102 .\" NS Hf user macro
6103 .\" NS source include header files.
6106 .\" NS doc-curr-font
6107 .\" NS doc-curr-size
6109 .\" NS width register `Hf' set in doc-common
6112 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6124 . Usage: .Hf file (#\n[.c])
6128 .\" NS doc-have-author global register (bool)
6131 .nr doc-have-author 0
6134 .\" NS An user macro
6139 .\" NS doc-curr-font
6140 .\" NS doc-curr-size
6141 .\" NS doc-have-author
6142 .\" NS doc-macro-name
6144 .\" NS width register `An' set in doc-common
6147 . if !\n[doc-arg-limit] \{\
6149 . ie "\$1"-nosplit" \
6150 . nr doc-in-authors-section 0
6151 . el \{ .ie "\$1"-split" \
6152 . nr doc-in-authors-section 1
6154 . ds doc-macro-name An
6155 . doc-parse-args \$@
6158 . tm1 "Usage: .An {-nosplit | -split}
6159 . tm1 .An author_name ... (#\n[.c])
6162 . if \n[doc-in-authors-section] \{\
6163 . ie \n[doc-have-author] \
6166 . nr doc-have-author 1
6169 . if \n[doc-arg-limit] \{\
6171 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6172 . nr doc-curr-font \n[.f]
6173 . nr doc-curr-size \n[.ps]
6174 . doc-print-recursive
6177 . tm Usage: .An author_name ... (#\n[.c])
6183 .\" NS Rv user macro
6184 .\" NS return values
6186 .\" NS width register `Rv' set in doc-common
6188 .\" NS local variables:
6189 .\" NS doc-str-Rv-std-prefix
6190 .\" NS doc-str-Rv-std-suffix
6191 .\" NS doc-str-Rv-stds-prefix
6192 .\" NS doc-str-Rv-stds-and
6193 .\" NS doc-str-Rv-stds-suffix
6194 .\" NS doc-str-Rv-std0
6196 .ds doc-str-Rv-std-prefix "The
6197 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6198 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6199 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6200 .as doc-str-Rv-std-suffix " is set to indicate the error.
6202 .ds doc-str-Rv-stds-prefix "The
6203 .ds doc-str-Rv-stds-and "and
6204 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6205 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6206 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6207 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6209 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6210 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6211 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6212 .as doc-str-Rv-std0 " is set to indicate the error.
6216 .\" XXX: what does this function without `-std'?
6218 . if \n[doc-arg-limit] \{\
6219 . tm Usage: .Rv not callable by other macros (#\n[.c])
6225 . tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6230 . nr doc-reg-Rv \*[doc-section]
6231 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6232 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6235 . ie (\n[.$] > 1) \{\
6236 . nop \)\*[doc-str-Rv-stds-prefix]
6238 . while (\n[doc-reg-Rv] < \n[.$]) \{\
6240 . Fn \$\n[doc-reg-Rv] ,
6242 . Fn \$\n[doc-reg-Rv]
6245 . nop \)\*[doc-str-Rv-stds-and]
6247 . nop \)\*[doc-str-Rv-stds-suffix]
6249 . el \{ .ie (\n[.$] == 1) \{\
6250 . nop \)\*[doc-str-Rv-std-prefix]
6252 . nop \)\*[doc-str-Rv-std-suffix]
6255 . nop \)\*[doc-str-Rv-std0]
6260 .\" NS Ex user macro
6263 .\" NS width register `Ex' set in doc-common
6265 .\" NS local variables:
6266 .\" NS doc-str-Ex-std-prefix
6267 .\" NS doc-str-Ex-std-suffix
6269 .ds doc-str-Ex-std-prefix "The
6270 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6271 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6273 .ds doc-str-Ex-stds-prefix "The
6274 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6275 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6276 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6280 .\" XXX: what does this function without `-std'?
6282 . if \n[doc-arg-limit] \{\
6283 . tm Usage: .Ex not callable by other macros (#\n[.c])
6289 . tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6294 . nr doc-reg-Ex \*[doc-section]
6295 . if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6296 . tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6299 . ie (\n[.$] > 1) \{\
6300 . nop \)\*[doc-str-Ex-stds-prefix]
6302 . while (\n[doc-reg-Ex] < \n[.$]) \{\
6304 . Nm \$\n[doc-reg-Ex] ,
6306 . Nm \$\n[doc-reg-Ex]
6309 . nop \)\*[doc-str-Ex-stds-and]
6311 . nop \)\*[doc-str-Ex-stds-suffix]
6314 . nop \)\*[doc-str-Ex-std-prefix]
6316 . nop \)\*[doc-str-Ex-std-suffix]
6321 .\" NS Mt user macro
6322 .\" NS mailto (for conversion to HTML)
6325 . \" XXX: error handling missing
6330 .\" NS Lk user macro
6331 .\" NS link (for conversion to HTML)
6333 .\" NS local variables:
6338 . ds doc-str-Lk Sy \$@
6340 . ie (\n[.$] > 1) \{\
6341 . doc-get-arg-type \$2
6342 . ie (\n[doc-arg-type] < 3) \{\
6344 . ds doc-str-Lk Sy "\$1"
6345 . doc-get-width "\$1"
6348 . as doc-str-Lk " \$@
6351 . doc-get-width "\$1"
6354 . doc-get-width "\$1"
6360 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6367 .\" NS doc-defunct-macro macro
6368 .\" NS this is the skeleton for defunct macros
6371 .de doc-defunct-macro
6372 . tmc mdoc error: .\$0 defunct
6373 . if d doc-\$0-usage \
6374 . tmc , \*[doc-\$0-usage]
6381 .als Db doc-defunct-macro
6383 .als Ds doc-defunct-macro
6385 .als Or doc-defunct-macro
6386 .ds doc-Or-usage use `|'
6388 .als Sf doc-defunct-macro
6389 .ds doc-Sf-usage use .Pf or .Ns
6395 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6396 . tm1 " Should this have been `.Em ...'?
6401 .\" NS doc-empty-line macro
6402 .\" NS emit warning and print empty line
6405 . if !\n[doc-display-depth] \
6406 . tm mdoc warning: Empty input line #\n[.c]
6416 .\" load local modifications