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-indent-synopsis-saved \n[doc-indent-synopsis]
3325 . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3326 . nr doc-have-decl-saved \n[doc-have-decl]
3327 . nr doc-have-var-saved \n[doc-have-var]
3328 . ds doc-command-name-saved "\*[doc-command-name]
3329 . ds doc-quote-left-saved "\*[doc-quote-left]
3330 . ds doc-quote-right-saved "\*[doc-quote-right]
3331 . nr doc-nesting-level-saved \n[doc-nesting-level]
3332 . nr doc-in-list-saved \n[doc-in-list]
3333 . ds doc-space-saved "\*[doc-space]
3334 . ds doc-saved-space-saved "\*[doc-saved-space]
3335 . nr doc-space-mode-saved \n[doc-space-mode]
3336 . nr doc-have-space-saved \n[doc-have-space]
3337 . nr doc-have-slot-saved \n[doc-have-slot]
3338 . nr doc-keep-type-saved \n[doc-keep-type]
3339 . nr doc-display-depth-saved \n[doc-display-depth]
3340 . nr doc-is-compact-saved \n[doc-is-compact]
3343 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3344 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3345 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3346 . nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3347 . nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3348 . nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3349 . nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3350 . nr doc-reg-dsgv +1
3353 . nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3356 . while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3357 . nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3358 . nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3359 . nr doc-reg-dsgv +1
3362 . nr doc-list-depth-saved \n[doc-list-depth]
3365 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3366 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3367 . nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3368 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3369 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3370 . ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3371 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3372 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3373 . nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3374 . nr doc-reg-dsgv +1
3377 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3378 . nr doc-curr-type-saved \n[doc-curr-type]
3379 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3380 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3381 . nr doc-num-columns-saved \n[doc-num-columns]
3382 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3383 . nr doc-is-func-saved \n[doc-is-func]
3384 . nr doc-have-old-func-saved \n[doc-have-old-func]
3385 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3386 . ds doc-func-arg-saved "\*[doc-func-arg]
3387 . nr doc-num-func-args-saved \n[doc-num-func-args]
3388 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3389 . nr doc-have-func-saved \n[doc-have-func]
3390 . nr doc-is-reference-saved \n[doc-is-reference]
3391 . nr doc-reference-count-saved \n[doc-reference-count]
3392 . nr doc-author-count-saved \n[doc-author-count]
3395 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3396 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3397 . nr doc-reg-dsgv +1
3400 . nr doc-book-count-saved \n[doc-book-count]
3401 . ds doc-book-name-saved "\*[doc-book-name]
3402 . nr doc-date-count-saved \n[doc-date-count]
3403 . ds doc-date-saved "\*[doc-date]
3404 . nr doc-publisher-count-saved \n[doc-publisher-count]
3405 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3406 . nr doc-journal-count-saved \n[doc-journal-count]
3407 . ds doc-journal-name-saved "\*[doc-journal-name]
3408 . nr doc-issue-count-saved \n[doc-issue-count]
3409 . ds doc-issue-name-saved "\*[doc-issue-name]
3410 . nr doc-optional-count-saved \n[doc-optional-count]
3411 . ds doc-optional-string-saved "\*[doc-optional-string]
3412 . nr doc-page-number-count-saved \n[doc-page-number-count]
3413 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3414 . nr doc-corporate-count-saved \n[doc-corporate-count]
3415 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3416 . nr doc-report-count-saved \n[doc-report-count]
3417 . ds doc-report-name-saved "\*[doc-report-name]
3418 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3419 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3420 . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3421 . nr doc-volume-count-saved \n[doc-volume-count]
3422 . ds doc-volume-name-saved "\*[doc-volume-name]
3423 . nr doc-have-author-saved \n[doc-have-author]
3425 . ds doc-document-title-saved "\*[doc-document-title]
3426 . ds doc-volume-saved "\*[doc-volume]
3427 . ds doc-section-saved "\*[doc-section]
3428 . ds doc-operating-system-saved "\*[doc-operating-system]
3429 . ds doc-date-string-saved "\*[doc-date-string]
3430 . nr doc-header-space-saved \n[doc-header-space]
3431 . nr doc-footer-space-saved \n[doc-footer-space]
3432 . nr doc-display-vertical-saved \n[doc-display-vertical]
3433 . ds doc-header-string-saved "\*[doc-header-string]
3434 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3435 . nr doc-in-files-section-saved \n[doc-in-files-section]
3436 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3440 .\" NS doc-restore-global-vars macro
3441 .\" NS restore all global variables
3443 .\" NS local variables:
3446 .de doc-restore-global-vars
3447 . ds doc-macro-name "\*[doc-macro-name-saved]
3448 . nr doc-arg-limit \n[doc-arg-limit-saved]
3449 . nr doc-num-args \n[doc-num-args-saved]
3450 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3453 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3454 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3455 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3456 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3457 . nr doc-reg-drgv +1
3460 . nr doc-curr-font \n[doc-curr-font-saved]
3461 . nr doc-curr-size \n[doc-curr-size-saved]
3462 . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3463 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3464 . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3465 . nr doc-have-decl \n[doc-have-decl-saved]
3466 . nr doc-have-var \n[doc-have-var-saved]
3467 . ds doc-command-name "\*[doc-command-name-saved]
3468 . ds doc-quote-left "\*[doc-quote-left-saved]
3469 . ds doc-quote-right "\*[doc-quote-right-saved]
3470 . nr doc-nesting-level \n[doc-nesting-level-saved]
3471 . nr doc-in-list \n[doc-in-list-saved]
3472 . ds doc-space "\*[doc-space-saved]
3473 . ds doc-saved-space "\*[doc-saved-space-saved]
3474 . nr doc-space-mode \n[doc-space-mode-saved]
3475 . nr doc-have-space \n[doc-have-space-saved]
3476 . nr doc-have-slot \n[doc-have-slot-saved]
3477 . nr doc-keep-type \n[doc-keep-type-saved]
3478 . nr doc-display-depth \n[doc-display-depth-saved]
3479 . nr doc-is-compact \n[doc-is-compact-saved]
3482 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3483 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3484 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3485 . nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3486 . nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3487 . nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3488 . nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3489 . nr doc-reg-drgv +1
3492 . nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3495 . while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3496 . nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3497 . nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3498 . nr doc-reg-drgv +1
3501 . nr doc-list-depth \n[doc-list-depth-saved]
3504 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3505 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3506 . nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3507 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3508 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3509 . ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3510 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3511 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3512 . nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3513 . nr doc-reg-drgv +1
3516 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3517 . nr doc-curr-type \n[doc-curr-type-saved]
3518 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3519 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3520 . nr doc-num-columns \n[doc-num-columns-saved]
3521 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3522 . nr doc-is-func \n[doc-is-func-saved]
3523 . nr doc-have-old-func \n[doc-have-old-func-saved]
3524 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3525 . ds doc-func-arg "\*[doc-func-arg-saved]
3526 . nr doc-num-func-args \n[doc-num-func-args-saved]
3527 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3528 . nr doc-have-func \n[doc-have-func-saved]
3529 . nr doc-is-reference \n[doc-is-reference-saved]
3530 . nr doc-reference-count \n[doc-reference-count-saved]
3531 . nr doc-author-count \n[doc-author-count-saved]
3534 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3535 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3536 . nr doc-reg-drgv +1
3539 . nr doc-book-count \n[doc-book-count-saved]
3540 . ds doc-book-name "\*[doc-book-name-saved]
3541 . nr doc-date-count \n[doc-date-count-saved]
3542 . ds doc-date "\*[doc-date-saved]
3543 . nr doc-publisher-count \n[doc-publisher-count-saved]
3544 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3545 . nr doc-journal-count \n[doc-journal-count-saved]
3546 . ds doc-journal-name "\*[doc-journal-name-saved]
3547 . nr doc-issue-count \n[doc-issue-count-saved]
3548 . ds doc-issue-name "\*[doc-issue-name-saved]
3549 . nr doc-optional-count \n[doc-optional-count-saved]
3550 . ds doc-optional-string "\*[doc-optional-string-saved]
3551 . nr doc-page-number-count \n[doc-page-number-count-saved]
3552 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3553 . nr doc-corporate-count \n[doc-corporate-count-saved]
3554 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3555 . nr doc-report-count \n[doc-report-count-saved]
3556 . ds doc-report-name "\*[doc-report-name-saved]
3557 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3558 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3559 . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3560 . nr doc-volume-count \n[doc-volume-count-saved]
3561 . ds doc-volume-name "\*[doc-volume-name-saved]
3562 . nr doc-have-author \n[doc-have-author-saved]
3564 . ds doc-document-title "\*[doc-document-title-saved]
3565 . ds doc-volume "\*[doc-volume-saved]
3566 . ds doc-section "\*[doc-section-saved]
3567 . ds doc-operating-system "\*[doc-operating-system-saved]
3568 . ds doc-date-string "\*[doc-date-string-saved]
3569 . nr doc-header-space \n[doc-header-space-saved]
3570 . nr doc-footer-space \n[doc-footer-space-saved]
3571 . nr doc-display-vertical \n[doc-display-vertical-saved]
3572 . ds doc-header-string "\*[doc-header-string-saved]
3573 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3574 . nr doc-in-files-section \n[doc-in-files-section-saved]
3575 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3579 .\" NS El user macro
3583 .\" NS doc-list-depth
3584 .\" NS doc-macro-name
3586 .\" NS local variables:
3589 .\" NS width register `El' set in doc-common
3593 . tm Usage: .El (does not take arguments) (#\n[.c])
3597 . ds doc-macro-name El
3598 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3600 . ie "\*[doc-str-El]"diag-list" \
3602 . el \{ .ie "\*[doc-str-El]"column-list" \
3603 . doc-end-column-list
3604 . el \{ .ie "\*[doc-str-El]"item-list" \
3606 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3608 . el \{ .ie "\*[doc-str-El]"inset-list" \
3618 .\" NS doc-saved-Pa-font global string
3619 .\" NS saved doc-Pa-font string for section FILES (no underline if
3622 .ds doc-saved-Pa-font
3625 .\" NS doc-curr-type global register
3626 .\" NS current argument type
3631 .\" NS doc-curr-arg global string
3632 .\" NS current argument
3637 .\" NS doc-item-boxXXX global box
3638 .\" NS item boxes associated list depth
3641 .\" NS doc-list-depth
3644 .\" NS It user macro
3651 .\" NS doc-curr-type
3653 .\" NS doc-macro-name
3655 .\" NS doc-saved-Pa-font
3657 .\" NS local variables:
3660 .\" NS doc-XXX-list-type
3662 .\" NS width register `It' set in doc-common
3664 .nr doc-bullet-list-type 1
3665 .nr doc-column-list-type 0
3666 .nr doc-dash-list-type 1
3667 .nr doc-diag-list-type 0
3668 .nr doc-enum-list-type 1
3669 .nr doc-hang-list-type 2
3670 .nr doc-inset-list-type 2
3671 .nr doc-item-list-type 1
3672 .nr doc-ohang-list-type 2
3673 .nr doc-tag-list-type 2
3676 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3678 . if "\*[doc-str-It]"" \
3679 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3681 . if \n[doc-nesting-level] \{\
3682 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3691 . ds doc-macro-name It
3693 . \" fill argument vector
3695 . while (\n[doc-reg-It] <= \n[.$]) \{\
3696 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3700 . nr doc-num-args \n[.$]
3704 . nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3706 . if \n[doc-reg-It] \{\
3708 . box doc-item-box\n[doc-list-depth]
3709 . ev doc-item-env\n[doc-list-depth]
3715 . ie (\n[doc-reg-It] == 1) \{\
3717 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3718 . tm1 " don't take arguments (#\n[.c])
3722 . if (\n[doc-reg-It] == 2) \{\
3723 . \" handle list types with arguments
3724 . doc-parse-arg-vector
3728 . nr doc-curr-type \n[doc-type1]
3729 . ds doc-curr-arg "\*[doc-arg1]
3731 . if \n[doc-in-files-section] \{\
3732 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3734 . ds doc-Pa-font "\*[doc-No-font]
3737 . ie (\n[doc-type1] == 1) \
3741 . doc-print-recursive
3744 . tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3745 . tm1 " require arguments (#\n[.c])
3749 . \" the previous call of `.doc-print-recursive' can contain calls to
3750 . \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3751 . if !\n[doc-nesting-level] \
3752 . doc-\*[doc-str-It]
3756 .\" NS doc-inset-list macro
3757 .\" NS .It item of list-type inset
3763 . \" finish item box
3767 . unformat doc-item-box\n[doc-list-depth]
3769 . doc-set-vertical-and-indent 0
3773 . doc-item-box\n[doc-list-depth]
3775 . if \n[doc-in-files-section] \
3777 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3784 .\" NS doc-hang-list macro
3785 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3788 .\" NS doc-have-space
3791 .\" NS local variables:
3796 . \" finish item box
3800 . unformat doc-item-box\n[doc-list-depth]
3802 . doc-set-vertical-and-indent 1
3803 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3804 . ti -\n[doc-reg-dhl]u
3807 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3808 . doc-item-box\n[doc-list-depth]
3810 . chop doc-item-box\n[doc-list-depth]
3811 . nr doc-reg-dhl1 \n[.k]u
3812 . nop \*[doc-item-box\n[doc-list-depth]]\c
3813 . nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3814 . nr doc-have-space 1
3817 . if \n[doc-in-files-section] \
3819 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3826 .\" NS doc-ohang-list macro
3827 .\" NS .It item of list-type overhanging tag
3833 . \" finish item box
3837 . unformat doc-item-box\n[doc-list-depth]
3839 . doc-set-vertical-and-indent 0
3841 . doc-item-box\n[doc-list-depth]
3844 . if \n[doc-in-files-section] \
3846 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3853 .\" NS doc-item-list macro
3854 .\" NS .It item of list-type [empty tag]
3857 . \" finish (dummy) item box
3862 . doc-set-vertical-and-indent 0
3869 .\" NS doc-enum-list-count-stackXXX global register
3870 .\" NS stack of current enum count values
3873 .\" NS doc-list-depth
3875 .nr doc-enum-list-count-stack1 0
3878 .\" NS doc-enum-list macro
3879 .\" NS enumerated list
3882 .\" NS doc-enum-list-count-stackXXX
3887 . nr doc-enum-list-count-stack\n[doc-list-depth] +1
3889 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3891 . nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3892 . nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3897 .\" NS doc-bullet-list macro
3898 .\" NS bullet paragraph list
3905 . nop \)\*[doc-Sy-font]\[bu]\f[]
3910 .\" NS doc-dash-list macro
3911 .\" NS hyphen paragraph list (sub bullet list)
3918 . nop \)\*[doc-Sy-font]\-\f[]
3923 .\" NS doc-do-list macro
3924 .\" NS .It item of list-type enum/bullet/hyphen
3926 .als doc-do-list doc-hang-list
3929 .\" NS doc-diag-list-input-line-count global register
3930 .\" NS saved line number to be checked in next diag-list item
3932 .nr doc-diag-list-input-line-count 0
3935 .\" NS doc-diag-list macro
3936 .\" NS .It item of list-type diagnostic-message
3939 .\" NS doc-curr-font
3940 .\" NS doc-curr-size
3941 .\" NS doc-diag-list-input-line-count
3944 . nr doc-curr-font \n[.f]
3945 . nr doc-curr-size \n[.ps]
3947 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3948 . ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3955 . nr doc-diag-list-input-line-count \n[.c]
3958 . nop \*[doc-Sy-font]\c
3959 . if \n[doc-num-args] \
3960 . doc-remaining-args
3961 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3963 . doc-print-and-reset
3967 .\" NS doc-tag-list macro
3968 .\" NS .It item of list-type `tag'
3971 .\" NS doc-have-space
3974 .\" NS local variables:
3980 . \" finish item box
3984 . unformat doc-item-box\n[doc-list-depth]
3986 . \" we use a box without `.nf' to compute the tag width (via `dl' register)
3993 . doc-item-box\n[doc-list-depth]
3998 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3999 . if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4000 . in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4001 . nr doc-list-have-indent-stack\n[doc-list-depth] 1
4005 . doc-set-vertical-and-indent 1
4006 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4007 . ti -\n[doc-reg-dtl]u
4010 . doc-item-box\n[doc-list-depth]
4011 . ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4014 . \" format the tag separately to prevent stretching of spaces
4020 . nr doc-have-space 1
4023 . if \n[doc-in-files-section] \
4025 . ds doc-Pa-font "\*[doc-saved-Pa-font]
4032 .\" NS doc-get-tag-width macro
4033 .\" NS resolve unknown tag width (`tag' list-type only)
4036 .\" NS doc-list-indent-stackXXX
4037 .\" NS doc-tag-width-stackXXX
4041 .\" NS doc-curr-type
4043 .de doc-get-tag-width
4044 . ie (\n[doc-curr-type] == 1) \{\
4045 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4046 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4049 . ds doc-tag-width-stack\n[doc-list-depth] No
4050 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4055 .\" NS doc-set-vertical-and-indent macro
4056 .\" NS set up vertical spacing (if not compact) and indentation (with
4057 .\" NS offset if argument is non-zero)
4060 .\" NS doc-list-have-indent-stackXXX
4062 .de doc-set-vertical-and-indent
4063 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4064 . sp \n[doc-display-vertical]u
4066 . if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4067 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4069 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4077 .\" NS doc-list-depth global register
4078 .\" NS list type stack counter
4080 .nr doc-list-depth 0
4083 .\" NS doc-num-columns global register
4084 .\" NS number of columns
4086 .nr doc-num-columns 0
4089 .\" NS doc-compact-list-stackXXX global register (bool)
4090 .\" NS stack of flags to indicate whether a particular list is compact
4093 .\" NS doc-list-depth
4095 .nr doc-compact-list-stack1 0
4098 .\" NS doc-tag-prefix-stackXXX global string
4099 .\" NS stack of tag prefixes (currently used for -nested -enum lists)
4102 .\" NS doc-list-depth
4104 .ds doc-tag-prefix-stack1
4107 .\" NS doc-tag-width-stackXXX global string
4108 .\" NS stack of strings indicating how to set up current element of
4109 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4110 .\" NS directly; if it is a macro name, use the macro's width value;
4111 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4114 .\" NS doc-list-depth
4116 .ds doc-tag-width-stack0
4117 .ds doc-tag-width-stack1
4120 .\" NS doc-list-offset-stackXXX global register
4121 .\" NS stack of list offsets
4124 .\" NS doc-list-depth
4126 .nr doc-list-offset-stack1 0
4129 .\" NS doc-end-list macro
4130 .\" NS list end function; resets indentation (and offset if argument is
4134 .\" NS doc-list-depth
4135 .\" NS doc-list-offset-stackXXX
4139 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4141 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4143 . if (\n[doc-list-depth] <= 0) \
4144 . tm mdoc warning: extraneous .El call (#\n[.c])
4146 . doc-decrement-list-stack
4147 . nr doc-list-depth -1
4151 .\" NS doc-increment-list-stack macro
4152 .\" NS set up next block for list
4155 .\" NS doc-compact-list-stackXXX
4156 .\" NS doc-list-have-indent-stackXXX
4157 .\" NS doc-list-indent-stackXXX
4158 .\" NS doc-list-offset-stackXXX
4159 .\" NS doc-list-type-stackXXX
4160 .\" NS doc-tag-prefix-stackXXX
4161 .\" NS doc-tag-width-stackXXX
4162 .\" NS doc-enum-list-count-stackXXX
4164 .\" NS local variables:
4167 .de doc-increment-list-stack
4168 . nr doc-reg-dils (\n[doc-list-depth] + 1)
4169 . nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4170 . nr doc-list-indent-stack\n[doc-reg-dils] 0
4171 . nr doc-list-offset-stack\n[doc-reg-dils] 0
4172 . ds doc-tag-prefix-stack\n[doc-reg-dils]
4173 . ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4174 . ds doc-list-type-stack\n[doc-reg-dils]
4175 . nr doc-compact-list-stack\n[doc-reg-dils] 0
4176 . nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4180 .\" NS doc-decrement-list-stack macro
4181 .\" NS decrement stack
4184 .\" NS doc-compact-list-stackXXX
4185 .\" NS doc-list-have-indent-stackXXX
4186 .\" NS doc-list-indent-stackXXX
4187 .\" NS doc-list-offset-stackXXX
4188 .\" NS doc-list-type-stackXXX
4189 .\" NS doc-tag-prefix-stackXXX
4190 .\" NS doc-tag-width-stackXXX
4191 .\" NS doc-enum-list-count-stackXXX
4193 .de doc-decrement-list-stack
4194 . ds doc-list-type-stack\n[doc-list-depth]
4195 . nr doc-list-have-indent-stack\n[doc-list-depth] 0
4196 . nr doc-list-indent-stack\n[doc-list-depth] 0
4197 . nr doc-list-offset-stack\n[doc-list-depth] 0
4198 . ds doc-tag-prefix-stack\n[doc-list-depth]
4199 . ds doc-tag-width-stack\n[doc-list-depth]
4200 . nr doc-compact-list-stack\n[doc-list-depth] 0
4201 . nr doc-enum-list-count-stack\n[doc-list-depth] 0
4205 .\" NS Xr user macro
4206 .\" NS cross reference (for man pages only)
4210 .\" NS doc-macro-name
4212 .\" NS local variables:
4215 .\" NS width register `Xr' set in doc-common
4218 . if !\n[doc-arg-limit] \{\
4220 . ds doc-macro-name Xr
4221 . doc-parse-args \$@
4227 . if !\n[doc-arg-limit] \
4231 . doc-print-prefixes
4232 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4233 . \" first argument must be a string
4234 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4235 . nr doc-curr-font \n[.f]
4236 . nr doc-curr-size \n[.ps]
4237 . ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4239 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4240 . nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4241 . \" modify second argument if it is a string and
4242 . \" remove space inbetween
4243 . if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4244 . ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4245 . ds doc-space\n[doc-arg-ptr]
4248 . doc-print-recursive
4258 .\" NS doc-Xr-usage macro
4261 . tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4266 .\" NS Sx user macro
4267 .\" NS cross section reference
4269 .\" NS width register `Sx' set in doc-common
4271 .als Sx doc-generic-macro
4272 .ds doc-Sx-usage section_header
4275 .\" NS doc-end-column-list macro
4276 .\" NS column-list end-list
4279 .\" NS doc-list-depth
4281 .de doc-end-column-list
4283 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4286 . doc-decrement-list-stack
4287 . nr doc-list-depth -1
4291 .\" NS doc-column-indent-width global register
4292 .\" NS holds the indent width for a column list
4294 .nr doc-column-indent-width 0
4297 .\" NS doc-set-column-tab macro
4298 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4301 .\" NS doc-column-indent-width
4303 .\" NS local variables:
4306 .\" NS doc-str-dsct1
4308 .de doc-set-column-tab
4311 . nr doc-column-indent-width 0
4314 . ds doc-str-dsct1 " \"
4317 . ds doc-str-dsct1 " \"
4319 . \" XXX: this is packed abnormally close -- intercolumn width
4320 . \" should be configurable
4321 . ds doc-str-dsct1 " \"
4324 . while (\n[doc-reg-dsct] <= \$1) \{\
4325 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4326 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4327 . nr doc-reg-dsct +1
4330 . ta \*[doc-str-dsct]
4331 ' in +\n[doc-column-indent-width]u
4335 .\" NS doc-column-list macro
4340 .\" NS doc-list-indent-stackXXX
4343 .\" NS local variables:
4347 . if \n[doc-num-args] \
4348 . doc-parse-arg-vector
4351 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4352 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4356 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4357 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4358 . ds doc-space\n[doc-reg-dcl]
4361 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4362 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4365 . in +\n[doc-column-indent-width]u
4367 . ti -\n[doc-column-indent-width]u
4369 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4373 .\" NS Ta user macro
4374 .\" NS append tab (\t)
4379 .\" NS width register `Ta' set in doc-common
4382 . ie \n[doc-arg-limit] \{\
4385 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4386 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4391 . tm1 "Usage: Ta must follow column entry: e.g.
4392 . tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
4397 .\" NS Dl user macro
4398 .\" NS display (one line) literal
4400 .\" NS this function uses the `Li' font
4404 .\" NS doc-curr-font
4405 .\" NS doc-curr-size
4406 .\" NS doc-macro-name
4408 .\" NS width register `Dl' set in doc-common
4412 . in +\n[doc-display-indent]u
4414 . ie \n[doc-arg-limit] \{\
4415 . tm Usage: .Dl not callable by other macros (#\n[.c])
4420 . ds doc-macro-name Dl
4421 . doc-parse-args \$@
4423 . nr doc-curr-font \n[.f]
4424 . nr doc-curr-size \n[.ps]
4425 . nop \*[doc-Li-font]\c
4426 . doc-print-recursive
4429 . tm Usage: .Dl argument ... (#\n[.c])
4432 . in -\n[doc-display-indent]u
4436 .\" NS D1 user macro
4437 .\" NS display (one line)
4441 .\" NS doc-macro-name
4443 .\" NS width register `D1' set in doc-common
4447 . in +\n[doc-display-indent]u
4449 . ie \n[doc-arg-limit] \{\
4450 . tm Usage: .D1 not callable by other macros (#\n[.c])
4455 . ds doc-macro-name D1
4456 . doc-parse-args \$@
4458 . doc-print-recursive
4461 . tm Usage: .D1 argument ... (#\n[.c])
4464 . in -\n[doc-display-indent]u
4468 .\" NS Vt user macro
4469 .\" NS variable type (for forcing old style variable declarations);
4470 .\" NS this is not done in the same manner as .Ot for fortrash --
4471 .\" NS clean up later
4474 .\" NS doc-curr-font
4475 .\" NS doc-curr-size
4476 .\" NS doc-have-decl
4478 .\" NS doc-macro-name
4480 .\" NS width register `Vt' set in doc-common
4483 . if !\n[doc-arg-limit] \{\
4485 . ds doc-macro-name Vt
4486 . doc-parse-args \$@
4489 . tm Usage: .Vt variable_type ... (#\n[.c])
4492 . if !\n[doc-arg-limit] \
4496 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4497 . tm Usage: .Vt variable_type ... (#\n[.c])
4502 . if \n[doc-in-synopsis-section] \{\
4503 . \" if a function declaration was the last thing given,
4504 . \" want vertical space
4505 . if \n[doc-have-decl] \{\
4507 . nr doc-have-decl 0
4510 . \" if a subroutine was the last thing given, want vertical space
4511 . if \n[doc-have-func] \{\
4512 . ie \n[doc-have-var] \
4521 . nr doc-curr-font \n[.f]
4522 . nr doc-curr-size \n[.ps]
4523 . nop \*[doc-Ft-font]\c
4524 . doc-print-recursive
4526 . if \n[doc-in-synopsis-section] \{\
4527 . ie \n[doc-have-old-func] \
4528 . nop \*[doc-soft-space]\c
4535 .\" NS doc-is-func global register (bool)
4536 .\" NS set if subroutine (in synopsis only) (fortran only)
4541 .\" NS Ft user macro
4542 .\" NS function type
4545 .\" NS doc-curr-font
4546 .\" NS doc-curr-size
4547 .\" NS doc-have-decl
4550 .\" NS doc-macro-name
4552 .\" NS width register `Ft' set in doc-common
4555 . if !\n[doc-arg-limit] \{\
4557 . ds doc-macro-name Ft
4558 . doc-parse-args \$@
4561 . tm Usage: .Ft function_type ... (#\n[.c])
4564 . if !\n[doc-arg-limit] \
4568 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4569 . tm Usage: .Ft function_type ... (#\n[.c])
4574 . if \n[doc-in-synopsis-section] \{\
4575 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4577 . nr doc-have-decl 0
4581 . if \n[doc-have-var] \{\
4589 . nr doc-curr-font \n[.f]
4590 . nr doc-curr-size \n[.ps]
4591 . nop \*[doc-Ft-font]\c
4592 . doc-print-recursive
4596 .\" NS doc-have-old-func global register (bool)
4597 .\" NS set if `Ot' has been called
4599 .nr doc-have-old-func 0
4602 .\" NS Ot user macro
4603 .\" NS old function type (fortran -- no newline)
4606 .\" NS doc-have-decl
4607 .\" NS doc-have-old-func
4611 .\" NS width register `Ot' set in doc-common
4614 . nr doc-have-old-func 1
4616 . if \n[doc-in-synopsis-section] \{\
4617 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4619 . nr doc-have-decl 0
4623 . if \n[doc-have-var] \{\
4632 . nop \*[doc-Ft-font]\$*\c
4637 .\" NS Fa user macro
4638 .\" NS function arguments
4642 .\" NS doc-curr-font
4643 .\" NS doc-curr-size
4644 .\" NS doc-macro-name
4646 .\" NS width register `Fa' set in doc-common
4649 . if !\n[doc-arg-limit] \{\
4651 . ds doc-macro-name Fa
4652 . doc-parse-args \$@
4655 . tm Usage: .Fa function_arguments ... (#\n[.c])
4658 . ie \n[doc-func-arg-count] \
4662 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4663 . nr doc-curr-font \n[.f]
4664 . nr doc-curr-size \n[.ps]
4665 . nop \*[doc-Fa-font]\c
4666 . doc-print-recursive
4668 . if \n[doc-in-synopsis-section] \
4669 . if \n[doc-have-func] \
4675 .\" NS doc-func-arg-count global register
4676 .\" NS how many function arguments have been processed so far
4678 .nr doc-func-arg-count 0
4681 .\" NS doc-func-arg global string
4682 .\" NS work buffer for function name strings
4687 .\" NS doc-num-func-args global register
4688 .\" NS number of function arguments
4690 .nr doc-num-func-args 0
4693 .\" NS doc-func-args-processed global register
4694 .\" NS function arguments processed so far
4696 .nr doc-func-args-processed 0
4699 .\" NS doc-do-func macro
4700 .\" NS internal .Fa for .Fc
4706 .\" NS doc-func-arg-count
4707 .\" NS doc-func-args-processed
4708 .\" NS doc-num-func-args
4711 . if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4719 . nr doc-num-func-args 0
4720 . nr doc-func-args-processed 0
4722 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4723 . if (\n[doc-num-func-args] > 1) \
4724 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4726 . if (\n[doc-func-arg-count] > 1) \{\
4727 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4728 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4729 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4731 . nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4732 . nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4735 . if (\n[doc-func-arg-count] == 1) \{\
4736 . nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4739 . nr doc-func-arg-count +1
4744 .\" NS doc-have-func global register (bool)
4745 .\" NS whether we have more than one function in synopsis
4750 .\" NS Fn user macro
4755 .\" NS doc-curr-font
4756 .\" NS doc-curr-size
4757 .\" NS doc-have-decl
4758 .\" NS doc-have-func
4760 .\" NS doc-indent-synopsis
4762 .\" NS doc-macro-name
4764 .\" NS width register `Fn' set in doc-common
4767 . if !\n[doc-arg-limit] \{\
4769 . ds doc-macro-name Fn
4770 . doc-parse-args \$@
4773 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4776 . if !\n[doc-arg-limit] \
4779 . if \n[doc-in-synopsis-section] \{\
4780 . \" if there is/has been more than one subroutine declaration
4781 . ie \n[doc-is-func] \{\
4784 . nr doc-have-decl 0
4788 . if \n[doc-have-func] \{\
4791 . nr doc-have-decl 0
4794 . if \n[doc-have-decl] \{\
4799 . if \n[doc-have-var] \{\
4801 . nr doc-have-decl 0
4804 . nr doc-have-func 1
4808 . if !\n[doc-indent-synopsis] \
4809 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4810 . if !\n[doc-indent-synopsis-active] \
4811 . in +\n[doc-indent-synopsis]u
4812 . ti -\n[doc-indent-synopsis]u
4816 . doc-print-prefixes
4817 . if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4818 . tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4823 . nr doc-curr-font \n[.f]
4824 . nr doc-curr-size \n[.ps]
4825 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4826 . nop \f[]\s[0]\*[lp]\)\c
4829 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4830 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4831 . nop \*[doc-Fa-font]\c
4833 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4837 . if \n[doc-in-synopsis-section] \
4840 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4841 . \" output the space (if needed)
4843 . nop \)\*[doc-space\n[doc-arg-ptr]]\c
4846 . doc-print-recursive
4849 . doc-print-and-reset
4851 . if \n[doc-in-synopsis-section] \
4852 . if !\n[doc-indent-synopsis-active] \
4853 . in -\n[doc-indent-synopsis]u
4857 .\" NS doc-do-func-args macro
4858 .\" NS handle function arguments
4864 .\" NS doc-func-args-processed
4865 .\" NS doc-num-func-args
4867 .\" NS local variables:
4870 .de doc-do-func-args
4871 . if \n[doc-in-synopsis-section] \{\
4873 . nr doc-num-func-args 0
4874 . nr doc-func-args-processed 0
4876 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4877 . if (\n[doc-num-func-args] > 1) \
4878 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4881 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4884 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4885 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4886 . nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4887 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4888 . if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4889 . if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4891 . nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4897 .\" NS doc-saved-nesting-level global register
4899 .nr doc-saved-nesting-level 0
4902 .\" NS doc-in-func-enclosure global register (bool)
4904 .nr doc-in-func-enclosure 0
4907 .\" NS Fo user macro
4908 .\" NS function open
4912 .\" NS doc-curr-font
4913 .\" NS doc-curr-size
4914 .\" NS doc-func-arg-count
4915 .\" NS doc-have-decl
4916 .\" NS doc-have-func
4918 .\" NS doc-in-func-enclosure
4919 .\" NS doc-indent-synopsis
4921 .\" NS doc-macro-name
4922 .\" NS doc-saved-nesting-level
4924 .\" NS width register `Fo' set in doc-common
4927 . if (\n[doc-in-func-enclosure]) \{\
4928 . tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4932 . nr doc-saved-nesting-level \n[doc-nesting-level]
4933 . nr doc-in-func-enclosure 1
4935 . if !\n[doc-arg-limit] \{\
4937 . ds doc-macro-name Fo
4938 . doc-parse-args \$@
4941 . tm Usage: .Fo function_name (#\n[.c])
4944 . if \n[doc-in-synopsis-section] \{\
4945 . \" if there is/has been more than one subroutine declaration
4946 . ie \n[doc-is-func] \{\
4949 . nr doc-have-decl 0
4953 . if \n[doc-have-func] \{\
4956 . nr doc-have-decl 0
4959 . if \n[doc-have-decl] \{\
4964 . if \n[doc-have-var] \{\
4966 . nr doc-have-decl 0
4969 . nr doc-have-func 1
4973 . if !\n[doc-indent-synopsis] \
4974 . nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4977 . \" start function box
4985 . doc-print-prefixes
4986 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4987 . nr doc-func-arg-count 1
4988 . nr doc-curr-font \n[.f]
4989 . nr doc-curr-size \n[.ps]
4991 . nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4992 . nop \f[]\s[0]\*[lp]\)\c
4998 .\" NS Fc user macro
4999 .\" NS function close
5003 .\" NS doc-func-arg-count
5004 .\" NS doc-in-func-enclosure
5005 .\" NS doc-saved-nesting-level
5006 .\" NS doc-macro-name
5008 .\" NS width register `Fc' set in doc-common
5011 . if !\n[doc-in-func-enclosure] \{\
5012 . tm mdoc warning: Extraneous .Fc (#\n[.c])
5017 . ds doc-macro-name Fc
5018 . \" the first (dummy) argument is used to get the correct spacing
5019 . doc-parse-args \) \$@
5022 . if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5023 . tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5025 . nr doc-func-arg-count 0
5026 . nr doc-in-func-enclosure 0
5028 . ie \n[doc-in-synopsis-section] \
5033 . \" finish function box
5038 . unformat doc-func-box
5040 . if \n[doc-in-synopsis-section] \{\
5041 . if !\n[doc-indent-synopsis-active] \
5042 . in +\n[doc-indent-synopsis]u
5043 . ti -\n[doc-indent-synopsis]u
5047 . nop \*[doc-func-box]\c
5050 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5051 . nr doc-curr-font \n[.f]
5052 . nr doc-curr-size \n[.ps]
5053 . doc-print-recursive
5056 . doc-print-and-reset
5058 . if \n[doc-in-synopsis-section] \
5059 . if !\n[doc-indent-synopsis-active] \
5060 . in -\n[doc-indent-synopsis]u
5064 .\" NS doc-build-func-string macro
5065 .\" NS collect function arguments and set hard spaces inbetween
5069 .\" NS doc-func-args-processed
5070 .\" NS doc-num-func-args
5072 .de doc-build-func-string
5073 . if !\n[doc-num-func-args] \{\
5074 . nr doc-num-func-args \n[.$]
5075 . nr doc-func-args-processed 0
5079 . nr doc-func-args-processed +1
5080 . as doc-func-arg "\$1
5082 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5083 . as doc-func-arg "\*[doc-hard-space]
5086 . doc-build-func-string \$@
5091 .\" Very crude references: Stash all reference info into boxes, print out
5092 .\" reference on .Re macro and clean up. Ordering very limited, no fancy
5093 .\" citations, but can do articles, journals, and books -- need to add
5094 .\" several missing options (like city etc). Should be able to grab a refer
5095 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5099 .\" NS doc-is-reference global register (bool)
5100 .\" NS set if in reference
5102 .nr doc-is-reference 0
5105 .\" NS doc-reference-count global register
5106 .\" NS reference element counter
5108 .nr doc-reference-count 0
5111 .\" NS Rs user macro
5112 .\" NS reference start
5115 .\" NS doc-is-reference
5116 .\" NS doc-reference-count
5118 .\" NS width register `Rs' set in doc-common
5122 . tm Usage: .Rs (does not take arguments) (#\n[.c])
5124 . nr doc-is-reference 1
5125 . doc-reset-reference
5126 . if \n[doc-in-see-also-section] \
5128 . nr doc-reference-count 0
5133 .\" NS Re user macro
5134 .\" NS reference end
5137 .\" NS doc-is-reference
5139 .\" NS width register `Re' set in doc-common
5143 . tm Usage: .Re (does not take arguments) (#\n[.c])
5145 . doc-print-reference
5146 . doc-reset-reference
5147 . nr doc-is-reference 0
5152 .\" NS doc-reset-reference macro
5153 .\" NS reference cleanup
5156 .\" NS doc-author-count
5157 .\" NS doc-author-nameXXX
5158 .\" NS doc-book-count
5159 .\" NS doc-book-name
5160 .\" NS doc-corporate-count
5161 .\" NS doc-corporate-name
5163 .\" NS doc-date-count
5164 .\" NS doc-issue-count
5165 .\" NS doc-issue-name
5166 .\" NS doc-journal-count
5167 .\" NS doc-journam-name
5168 .\" NS doc-optional-count
5169 .\" NS doc-optional-string
5170 .\" NS doc-page-number-count
5171 .\" NS doc-page-number-string
5172 .\" NS doc-reference-title-count
5173 .\" NS doc-reference-title-name
5174 .\" NS doc-reference-title-name-for-book
5175 .\" NS doc-report-count
5176 .\" NS doc-report-name
5177 .\" NS doc-volume-count
5178 .\" NS doc-volume-name
5180 .de doc-reset-reference
5181 . while (\n[doc-author-count]) \{\
5182 . ds doc-author-name\n[doc-author-count]
5183 . nr doc-author-count -1
5185 . nr doc-journal-count 0
5186 . nr doc-issue-count 0
5187 . nr doc-optional-count 0
5188 . nr doc-corporate-count 0
5189 . nr doc-report-count 0
5190 . nr doc-reference-title-count 0
5191 . nr doc-volume-count 0
5192 . nr doc-date-count 0
5193 . nr doc-page-number-count 0
5194 . nr doc-book-count 0
5196 . ds doc-journal-name
5198 . ds doc-optional-string
5199 . ds doc-corporate-name
5200 . ds doc-report-name
5201 . ds doc-reference-title-name
5202 . ds doc-reference-title-name-for-book
5203 . ds doc-volume-name
5205 . ds doc-page-number-string
5210 .\" NS doc-finish-reference macro
5211 .\" NS auxiliary macro for doc-print-reference
5214 .\" NS doc-reference-count
5216 .de doc-finish-reference
5217 . nr doc-reference-count -1
5218 . ie \n[doc-reference-count] \
5225 .\" NS doc-print-reference macro
5226 .\" NS reference print
5229 .\" NS doc-reference-count
5231 .de doc-print-reference
5235 . if \n[doc-author-count] \{\
5236 . doc-print-reference-authors
5237 . nr doc-reference-count -\n[doc-author-count]
5240 . if \n[doc-reference-title-count] \{\
5241 . unformat doc-reference-title-name
5242 . chop doc-reference-title-name
5243 . unformat doc-reference-title-name-for-book
5244 . chop doc-reference-title-name-for-book
5245 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5246 . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5247 . doc-finish-reference
5250 . nop \*[doc-reference-title-name]\c
5251 . doc-finish-reference
5254 . if \n[doc-book-count] \{\
5255 . unformat doc-book-name
5256 . chop doc-book-name
5257 . nop \*[doc-book-name]\c
5258 . doc-finish-reference
5261 . if \n[doc-publisher-count] \{\
5262 . unformat doc-publisher-name
5263 . chop doc-publisher-name
5264 . nop \*[doc-publisher-name]\c
5265 . doc-finish-reference
5268 . if \n[doc-journal-count] \{\
5269 . unformat doc-journal-name
5270 . chop doc-journal-name
5271 . nop \*[doc-journal-name]\c
5272 . doc-finish-reference
5275 . if \n[doc-report-count] \{\
5276 . unformat doc-report-name
5277 . chop doc-report-name
5278 . nop \*[doc-report-name]\c
5279 . doc-finish-reference
5282 . if \n[doc-issue-count] \{\
5283 . unformat doc-issue-name
5284 . chop doc-issue-name
5285 . nop \*[doc-issue-name]\c
5286 . doc-finish-reference
5289 . if \n[doc-volume-count] \{\
5290 . unformat doc-volume-name
5291 . chop doc-volume-name
5292 . nop \*[doc-volume-name]\c
5293 . doc-finish-reference
5296 . if \n[doc-page-number-count] \{\
5297 . unformat doc-page-number-string
5298 . chop doc-page-number-string
5299 . nop \*[doc-page-number-string]\c
5300 . doc-finish-reference
5303 . if \n[doc-corporate-count] \{\
5304 . unformat doc-corporate-name
5305 . chop doc-corporate-name
5306 . nop \*[doc-corporate-name]\c
5307 . doc-finish-reference
5310 . if \n[doc-date-count] \{\
5313 . nop \*[doc-date]\c
5314 . doc-finish-reference
5317 . if \n[doc-optional-count] \{\
5318 . unformat doc-optional-string
5319 . chop doc-optional-string
5320 . nop \*[doc-optional-string]\c
5321 . doc-finish-reference
5324 . if \n[doc-reference-count] \
5325 . tm mdoc warning: unresolved reference problem
5327 . hy \n[doc-hyphen-flags]
5331 .\" NS doc-print-reference-authors macro
5332 .\" NS print out reference authors
5334 .\" NS local variables:
5338 .ds doc-str-dpra "and
5340 .de doc-print-reference-authors
5343 . while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5344 . unformat doc-author-name\n[doc-reg-dpra]
5345 . chop doc-author-name\n[doc-reg-dpra]
5346 . ie (\n[doc-author-count] > 2) \
5347 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5349 . nop \)\*[doc-author-name\n[doc-reg-dpra]]
5350 . nr doc-reg-dpra +1
5353 . unformat doc-author-name\n[doc-reg-dpra]
5354 . chop doc-author-name\n[doc-reg-dpra]
5355 . if (\n[doc-author-count] > 1) \
5356 . nop \)\*[doc-str-dpra]
5357 . nop \)\*[doc-author-name\n[doc-reg-dpra]],
5361 .\" NS doc-author-count global register
5362 .\" NS counter of author references
5364 .nr doc-author-count 0
5367 .\" NS doc-author-nameXXX global box
5368 .\" NS array of author names
5371 .\" NS doc-author-count
5373 .ds doc-author-name0
5376 .\" NS %A user macro
5377 .\" NS reference author(s)
5381 .\" NS doc-author-count
5382 .\" NS doc-curr-font
5383 .\" NS doc-curr-size
5384 .\" NS doc-macro-name
5385 .\" NS doc-reference-count
5387 .\" NS local variables:
5390 .\" NS width register `%A' set in doc-common
5393 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5394 . tm Usage: .%A author_name ... (#\n[.c])
5398 . nr doc-author-count +1
5399 . nr doc-reference-count +1
5401 . ds doc-macro-name %A
5402 . doc-parse-args \$@
5405 . nr doc-curr-font \n[.f]
5406 . nr doc-curr-size \n[.ps]
5408 . \" save to reference box
5409 . box doc-author-name\n[doc-author-count]
5418 .\" NS doc-book-count global register
5419 .\" NS counter of book references
5421 .nr doc-book-count 0
5424 .\" NS doc-book-name global box
5425 .\" NS string of collected book references
5430 .\" NS %B user macro
5431 .\" NS [reference] book name
5435 .\" NS doc-book-count
5436 .\" NS doc-curr-font
5437 .\" NS doc-curr-size
5438 .\" NS doc-macro-name
5439 .\" NS doc-reference-count
5441 .\" NS local variables:
5444 .\" NS width register `%B' set in doc-common
5447 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5448 . tm Usage: .%B book_name ... (#\n[.c])
5452 . if \n[doc-is-reference] \{\
5453 . nr doc-book-count +1
5454 . nr doc-reference-count +1
5457 . ds doc-macro-name %B
5458 . doc-parse-args \$@
5461 . nr doc-curr-font \n[.f]
5462 . nr doc-curr-size \n[.ps]
5464 . ie \n[doc-is-reference] \{\
5465 . \" append to reference box
5466 . boxa doc-book-name
5471 . nop \*[doc-Em-font]\c
5475 . nop \*[doc-Em-font]\c
5476 . doc-print-recursive
5481 .\" NS doc-date-count global register
5482 .\" NS counter of date references
5484 .nr doc-date-count 0
5487 .\" NS doc-date global box
5488 .\" NS string of collected date references
5493 .\" NS %D user macro
5494 .\" NS [reference] date
5498 .\" NS doc-curr-font
5499 .\" NS doc-curr-size
5500 .\" NS doc-date-count
5501 .\" NS doc-macro-name
5502 .\" NS doc-reference-count
5504 .\" NS local variables:
5507 .\" NS width register `%D' set in doc-common
5510 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5511 . tm Usage: .%D date ... (#\n[.c])
5515 . nr doc-date-count +1
5516 . nr doc-reference-count +1
5518 . ds doc-macro-name %D
5519 . doc-parse-args \$@
5522 . nr doc-curr-font \n[.f]
5523 . nr doc-curr-size \n[.ps]
5525 . \" append to reference box
5535 .\" NS doc-publisher-count global register
5536 .\" NS counter of publisher references
5538 .nr doc-publisher-count 0
5541 .\" NS doc-publisher-name global box
5542 .\" NS string of collected publisher references
5544 .ds doc-publisher-name
5547 .\" NS %I user macro
5548 .\" NS [reference] issuer/publisher name
5552 .\" NS doc-curr-font
5553 .\" NS doc-curr-size
5554 .\" NS doc-macro-name
5555 .\" NS doc-publisher-count
5556 .\" NS doc-reference-count
5558 .\" NS local variables:
5561 .\" NS width register `%I' set in doc-common
5564 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5565 . tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5569 . nr doc-publisher-count +1
5570 . nr doc-reference-count +1
5572 . ds doc-macro-name %I
5573 . doc-parse-args \$@
5576 . nr doc-curr-font \n[.f]
5577 . nr doc-curr-size \n[.ps]
5579 . \" append to reference box
5580 . boxa doc-publisher-name
5585 . nop \*[doc-Em-font]\c
5590 .\" NS doc-journal-count global register
5591 .\" NS counter of journal references
5593 .nr doc-journal-count 0
5596 .\" NS doc-journal-name global box
5597 .\" NS string of collected journal references
5599 .ds doc-journal-name
5602 .\" NS %J user macro
5603 .\" NS [reference] Journal Name
5607 .\" NS doc-curr-font
5608 .\" NS doc-curr-size
5609 .\" NS doc-journal-count
5610 .\" NS doc-macro-name
5611 .\" NS doc-reference-count
5613 .\" NS local variables:
5616 .\" NS width register `%J' set in doc-common
5619 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5620 . tm Usage: .%J journal_name ... (#\n[.c])
5624 . nr doc-journal-count +1
5625 . nr doc-reference-count +1
5627 . ds doc-macro-name %J
5628 . doc-parse-args \$@
5631 . nr doc-curr-font \n[.f]
5632 . nr doc-curr-size \n[.ps]
5634 . \" append to reference box
5635 . boxa doc-journal-name
5640 . nop \*[doc-Em-font]\c
5645 .\" NS doc-issue-count global register
5646 .\" NS counter of issue number references
5648 .nr doc-issue-count 0
5651 .\" NS doc-issue-name global box
5652 .\" NS string of collected issue number references
5657 .\" NS %N user macro
5658 .\" NS [reference] issue number
5662 .\" NS doc-curr-font
5663 .\" NS doc-curr-size
5664 .\" NS doc-issue-count
5665 .\" NS doc-macro-name
5666 .\" NS doc-reference-count
5668 .\" NS local variables:
5671 .\" NS width register `%N' set in doc-common
5674 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5675 . tm Usage: .%N issue_number ... (#\n[.c])
5679 . nr doc-issue-count +1
5680 . nr doc-reference-count +1
5682 . ds doc-macro-name %N
5683 . doc-parse-args \$@
5686 . nr doc-curr-font \n[.f]
5687 . nr doc-curr-size \n[.ps]
5689 . \" append to reference box
5690 . boxa doc-issue-name
5699 .\" NS doc-optional-count global register
5700 .\" NS counter of optional information references
5702 .nr doc-optional-count 0
5705 .\" NS doc-optional-string global box
5706 .\" NS string of collected optional information references
5708 .ds doc-optional-string
5711 .\" NS %O user macro
5712 .\" NS [reference] optional information
5716 .\" NS doc-curr-font
5717 .\" NS doc-curr-size
5718 .\" NS doc-macro-name
5719 .\" NS doc-optional-count
5720 .\" NS doc-reference-count
5722 .\" NS local variables:
5725 .\" NS width register `%O' set in doc-common
5728 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5729 . tm Usage: .%O optional_information ... (#\n[.c])
5733 . nr doc-optional-count +1
5734 . nr doc-reference-count +1
5736 . ds doc-macro-name %O
5737 . doc-parse-args \$@
5740 . nr doc-curr-font \n[.f]
5741 . nr doc-curr-size \n[.ps]
5743 . \" append to reference box
5744 . boxa doc-optional-string
5753 .\" NS doc-page-number-count global register
5754 .\" NS counter of page number references
5756 .nr doc-page-number-count 0
5759 .\" NS doc-page-number-string global box
5760 .\" NS string of collected page number references
5762 .ds doc-page-number-string
5765 .\" NS %P user macro
5766 .\" NS [reference] page numbers
5770 .\" NS doc-curr-font
5771 .\" NS doc-curr-size
5772 .\" NS doc-macro-name
5773 .\" NS doc-page-number-count
5774 .\" NS doc-reference-count
5776 .\" NS local variables:
5779 .\" NS width register `%P' set in doc-common
5782 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5783 . tm Usage: .%P page_number ... (#\n[.c])
5787 . nr doc-page-number-count +1
5788 . nr doc-reference-count +1
5790 . ds doc-macro-name %P
5791 . doc-parse-args \$@
5794 . nr doc-curr-font \n[.f]
5795 . nr doc-curr-size \n[.ps]
5797 . \" append to reference box
5798 . boxa doc-page-number-string
5807 .\" NS doc-corporate-count global register
5808 .\" NS counter of corporate references
5810 .nr doc-corporate-count 0
5813 .\" NS doc-corporate-name global box
5814 .\" NS string of collected corporate references
5816 .ds doc-corporate-name
5819 .\" NS %Q user macro
5820 .\" NS corporate or foreign author
5824 .\" NS doc-corporate-count
5825 .\" NS doc-curr-font
5826 .\" NS doc-curr-size
5827 .\" NS doc-macro-name
5828 .\" NS doc-reference-count
5830 .\" NS local variables:
5833 .\" NS width register `%Q' set in doc-common
5836 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5837 . tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5841 . nr doc-corporate-count +1
5842 . nr doc-reference-count +1
5844 . ds doc-macro-name %Q
5845 . doc-parse-args \$@
5848 . nr doc-curr-font \n[.f]
5849 . nr doc-curr-size \n[.ps]
5851 . \" append to reference box
5852 . boxa doc-corporate-name
5861 .\" NS doc-report-count global register
5862 .\" NS counter of report references
5864 .nr doc-report-count 0
5867 .\" NS doc-report-name global box
5868 .\" NS string of collected report references
5873 .\" NS %R user macro
5874 .\" NS [reference] report name
5878 .\" NS doc-curr-font
5879 .\" NS doc-curr-size
5880 .\" NS doc-macro-name
5881 .\" NS doc-reference-count
5882 .\" NS doc-report-count
5884 .\" NS local variables:
5887 .\" NS width register `%R' set in doc-common
5890 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5891 . tm Usage: .%R reference_report ... (#\n[.c])
5895 . nr doc-report-count +1
5896 . nr doc-reference-count +1
5898 . ds doc-macro-name %R
5899 . doc-parse-args \$@
5902 . nr doc-curr-font \n[.f]
5903 . nr doc-curr-size \n[.ps]
5905 . \" append to reference box
5906 . boxa doc-report-name
5915 .\" NS doc-reference-title-count global register
5916 .\" NS counter of reference title references
5918 .nr doc-reference-title-count 0
5921 .\" NS doc-reference-title-name global box
5922 .\" NS string of collected reference title references
5924 .ds doc-reference-title-name
5927 .\" NS doc-reference-title-name-for-book global box
5928 .\" NS string of collected reference title references
5929 .\" NS (saved with another font; this is a shortcoming of groff)
5931 .ds doc-reference-title-name-for-book
5934 .\" NS %T user macro
5935 .\" NS reference title
5939 .\" NS doc-curr-font
5940 .\" NS doc-curr-size
5941 .\" NS doc-macro-name
5942 .\" NS doc-reference-title-count
5943 .\" NS doc-report-count
5945 .\" NS local variables:
5948 .\" NS width register `%T' set in doc-common
5951 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5952 . tm Usage: .%T reference_title ... (#\n[.c])
5956 . if \n[doc-is-reference] \{\
5957 . nr doc-reference-title-count +1
5958 . nr doc-reference-count +1
5961 . ds doc-macro-name %T
5962 . doc-parse-args \$@
5965 . nr doc-curr-font \n[.f]
5966 . nr doc-curr-size \n[.ps]
5967 . ie \n[doc-is-reference] \{\
5968 . \" append to reference box
5969 . boxa doc-reference-title-name-for-book
5974 . nop \*[doc-No-font]\c
5977 . \" do it a second time with another font
5978 . ds doc-macro-name %T
5979 . doc-parse-args \$@
5982 . nr doc-curr-font \n[.f]
5983 . nr doc-curr-size \n[.ps]
5984 . boxa doc-reference-title-name
5989 . nop \*[doc-Em-font]\c
5993 . nop \*[doc-Em-font]\c
5994 . doc-print-recursive
5999 .\" NS doc-volume-count global register
6000 .\" NS counter of reference title references
6002 .nr doc-volume-count 0
6005 .\" NS doc-volume-name global box
6006 .\" NS string of collected volume references
6011 .\" NS %V user macro
6012 .\" NS reference volume
6016 .\" NS doc-curr-font
6017 .\" NS doc-curr-size
6018 .\" NS doc-macro-name
6019 .\" NS doc-reference-title-count
6020 .\" NS doc-volume-count
6022 .\" NS local variables:
6025 .\" NS width register `%V' set in doc-common
6028 . if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6029 . tm Usage: .%V volume ... (#\n[.c])
6033 . nr doc-volume-count +1
6034 . nr doc-reference-count +1
6036 . ds doc-macro-name %V
6037 . doc-parse-args \$@
6040 . nr doc-curr-font \n[.f]
6041 . nr doc-curr-size \n[.ps]
6043 . \" append to reference box
6044 . boxa doc-volume-name
6053 .\" NS doc-do-references macro
6054 .\" NS reference recursion routine
6059 .\" NS local variables:
6063 .de doc-do-references
6064 . if !\n[doc-is-reference] \
6065 . tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6067 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6069 . ie (\n[doc-reg-ddr1] == 1) \{\
6070 . \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6071 . doc-append-arg \c 3
6072 . \*[doc-arg\n[doc-arg-ptr]]
6075 . nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6077 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6078 . \" finish reference box
6086 . nr doc-reg-ddr \n[doc-arg-ptr]
6088 . nop \)\*[doc-space\n[doc-reg-ddr]]\c
6094 .\" NS Hf user macro
6095 .\" NS source include header files.
6098 .\" NS doc-curr-font
6099 .\" NS doc-curr-size
6101 .\" NS width register `Hf' set in doc-common
6104 . ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6116 . Usage: .Hf file (#\n[.c])
6120 .\" NS doc-have-author global register (bool)
6123 .nr doc-have-author 0
6126 .\" NS An user macro
6131 .\" NS doc-curr-font
6132 .\" NS doc-curr-size
6133 .\" NS doc-have-author
6134 .\" NS doc-macro-name
6136 .\" NS width register `An' set in doc-common
6139 . if !\n[doc-arg-limit] \{\
6141 . ie "\$1"-nosplit" \
6142 . nr doc-in-authors-section 0
6143 . el \{ .ie "\$1"-split" \
6144 . nr doc-in-authors-section 1
6146 . ds doc-macro-name An
6147 . doc-parse-args \$@
6150 . tm1 "Usage: .An {-nosplit | -split}
6151 . tm1 .An author_name ... (#\n[.c])
6154 . if \n[doc-in-authors-section] \{\
6155 . ie \n[doc-have-author] \
6158 . nr doc-have-author 1
6161 . if \n[doc-arg-limit] \{\
6163 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6164 . nr doc-curr-font \n[.f]
6165 . nr doc-curr-size \n[.ps]
6166 . doc-print-recursive
6169 . tm Usage: .An author_name ... (#\n[.c])
6175 .\" NS Rv user macro
6176 .\" NS return values
6178 .\" NS width register `Rv' set in doc-common
6180 .\" NS local variables:
6181 .\" NS doc-str-Rv-std-prefix
6182 .\" NS doc-str-Rv-std-suffix
6183 .\" NS doc-str-Rv-stds-prefix
6184 .\" NS doc-str-Rv-stds-and
6185 .\" NS doc-str-Rv-stds-suffix
6186 .\" NS doc-str-Rv-std0
6188 .ds doc-str-Rv-std-prefix "The
6189 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6190 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6191 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6192 .as doc-str-Rv-std-suffix " is set to indicate the error.
6194 .ds doc-str-Rv-stds-prefix "The
6195 .ds doc-str-Rv-stds-and "and
6196 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6197 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6198 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6199 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6201 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6202 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6203 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6204 .as doc-str-Rv-std0 " is set to indicate the error.
6208 .\" XXX: what does this function without `-std'?
6210 . if \n[doc-arg-limit] \{\
6211 . tm Usage: .Rv not callable by other macros (#\n[.c])
6217 . tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6222 . nr doc-reg-Rv \*[doc-section]
6223 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6224 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6227 . ie (\n[.$] > 1) \{\
6228 . nop \)\*[doc-str-Rv-stds-prefix]
6230 . while (\n[doc-reg-Rv] < \n[.$]) \{\
6232 . Fn \$\n[doc-reg-Rv] ,
6234 . Fn \$\n[doc-reg-Rv]
6237 . nop \)\*[doc-str-Rv-stds-and]
6239 . nop \)\*[doc-str-Rv-stds-suffix]
6241 . el \{ .ie (\n[.$] == 1) \{\
6242 . nop \)\*[doc-str-Rv-std-prefix]
6244 . nop \)\*[doc-str-Rv-std-suffix]
6247 . nop \)\*[doc-str-Rv-std0]
6252 .\" NS Ex user macro
6255 .\" NS width register `Ex' set in doc-common
6257 .\" NS local variables:
6258 .\" NS doc-str-Ex-std-prefix
6259 .\" NS doc-str-Ex-std-suffix
6261 .ds doc-str-Ex-std-prefix "The
6262 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6263 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6265 .ds doc-str-Ex-stds-prefix "The
6266 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6267 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6268 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6272 .\" XXX: what does this function without `-std'?
6274 . if \n[doc-arg-limit] \{\
6275 . tm Usage: .Ex not callable by other macros (#\n[.c])
6281 . tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6286 . nr doc-reg-Ex \*[doc-section]
6287 . if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6288 . tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6291 . ie (\n[.$] > 1) \{\
6292 . nop \)\*[doc-str-Ex-stds-prefix]
6294 . while (\n[doc-reg-Ex] < \n[.$]) \{\
6296 . Nm \$\n[doc-reg-Ex] ,
6298 . Nm \$\n[doc-reg-Ex]
6301 . nop \)\*[doc-str-Ex-stds-and]
6303 . nop \)\*[doc-str-Ex-stds-suffix]
6306 . nop \)\*[doc-str-Ex-std-prefix]
6308 . nop \)\*[doc-str-Ex-std-suffix]
6313 .\" NS Mt user macro
6314 .\" NS mailto (for conversion to HTML)
6317 . \" XXX: error handling missing
6322 .\" NS Lk user macro
6323 .\" NS link (for conversion to HTML)
6325 .\" NS local variables:
6330 . ds doc-str-Lk Sy \$@
6332 . ie (\n[.$] > 1) \{\
6333 . doc-get-arg-type \$2
6334 . ie (\n[doc-arg-type] < 3) \{\
6336 . ds doc-str-Lk Sy "\$1"
6337 . doc-get-width "\$1"
6340 . as doc-str-Lk " \$@
6343 . doc-get-width "\$1"
6346 . doc-get-width "\$1"
6352 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6359 .\" NS doc-defunct-macro macro
6360 .\" NS this is the skeleton for defunct macros
6363 .de doc-defunct-macro
6364 . tmc mdoc error: .\$0 defunct
6365 . if d doc-\$0-usage \
6366 . tmc , \*[doc-\$0-usage]
6373 .als Db doc-defunct-macro
6375 .als Ds doc-defunct-macro
6377 .als Or doc-defunct-macro
6378 .ds doc-Or-usage use `|'
6380 .als Sf doc-defunct-macro
6381 .ds doc-Sf-usage use .Pf or .Ns
6387 . tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6388 . tm1 " Should this have been `.Em ...'?
6393 .\" NS doc-empty-line macro
6394 .\" NS emit warning and print empty line
6397 . if !\n[doc-display-depth] \
6398 . tm mdoc warning: Empty input line #\n[.c]
6408 .\" load local modifications