1 .\" Copyright (c) 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc 5.8 (Berkeley) 8/5/91
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
39 .\" Modified by wl@gnu.org to make it more readable: using long names and
40 .\" many groff features, updating and extending documentation.
46 . ab This version of mdoc can be run with groff only!
54 .\" Load start-up files
55 .ie t .mso mdoc/doc-ditroff.new
56 .el .mso mdoc/doc-nroff.new
58 .mso mdoc/doc-common.new
59 .mso mdoc/doc-syms.new
62 .\" NS doc-inline-debug user register (bool)
63 .\" NS inline debug mode (inline if 1, to stderr if 0 (default))
65 .if !r doc-inline-debug .nr doc-inline-debug 0
68 .\" NS doc-debug global register (bool)
69 .\" NS debug mode (1 if active, 0 otherwise (default))
75 .\" NS start/stop debug mode (`.Db'/`.Db on'/`.Db off')
77 .\" NS without argument, toggle debug status
94 . tm Usage: .Db [on | off] (#\n[.c])
97 . ie \n[doc-debug] \{\
108 .\" NS doc-macro-name global string
109 .\" NS name of calling request (set in each user-requestable macro)
114 .\" NS doc-arg-limit global register
115 .\" NS total number of arguments
120 .\" NS doc-num-args global register
121 .\" NS number of arguments to handle (must be set to \n[.$] prior to
122 .\" NS `doc-parse-arg-vector' request)
127 .\" NS doc-arg-ptr global register
128 .\" NS argument pointer
133 .\" NS doc-argXXX global string
134 .\" NS argument vector
136 .\" NS limit: doc-arg-limit
141 .\" NS doc-typeXXX global register
142 .\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
143 .\" NS punctuation prefix=4)
145 .\" NS limit: doc-arg-limit
150 .\" NS doc-spaceXXX global string
153 .\" NS limit: doc-arg-limit
158 .\" NS doc-out-string global string
159 .\" NS main working buffer
164 .\" NS doc-curr-space global string
165 .\" NS current space string
170 .\" NS doc-no-space global register (bool)
171 .\" NS whether no space shall be inserted
176 .\" NS doc-parse-args macro
177 .\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
180 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
181 .\" NS doc-arg-ptr, doc-out-string, doc-curr-space
183 .\" NS local variables:
184 .\" NS doc-str-dpa, doc-reg-dpa, doc-reg-dpa1
187 . nr doc-arg-limit +1
189 . \" handle `|' specially
191 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
193 . ds doc-arg\n[doc-arg-limit] "\$1
195 . \" get argument type and set spacing
196 . doc-get-arg-type* \n[doc-arg-limit]
197 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
198 . doc-set-spacing-\n[doc-arg-type]
200 . if \n[doc-debug] \{\
201 . ie (\n[doc-arg-type] == 1) \
202 . ds doc-str-dpa macro
204 . ie (\n[doc-arg-type] == 2) \
205 . ds doc-str-dpa string
207 . ie (\n[doc-arg-type] == 3) \
208 . ds doc-str-dpa closing punctuation or suffix
210 . ds doc-str-dpa opening punctuation or prefix
213 . ie \n[doc-inline-debug] \{\
215 . nr doc-reg-dpa \n[.i]u
216 . in -\n[doc-reg-dpa]u
218 . if (\n[doc-arg-limit] == 1) \{\
219 . nop \f[B]DEBUG(doc-parse-args) MACRO:\f[P] `.\*[doc-macro-name]'
220 . nop \& \f[B]Line #:\f[P] \n[.c]
222 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
223 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
224 . nop \ \f[B]Length:\f[P] \n[doc-width]
225 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
226 . nop \ \f[B]Type:\f[P] \*[doc-str-dpa]
229 . if (\n[doc-arg-limit] == 1) \{\
230 . tmc "DEBUG (doc-parse-args)
231 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
233 . tmc " Argc: \n[doc-arg-limit]
234 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
235 . tm1 " Length: \n[doc-width]
236 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
237 . tm1 " Type: \*[doc-str-dpa]
240 . \" check whether we have processed the last parameter
241 . ie (\n[.$] == 1) \{\
244 . \" Usually, an mdoc macro will call `doc-print-out-string' to print
245 . \" `doc-out-string'. This causes the insertion of a space since
246 . \" `.nop' is used. But if we are in an enclosure, no printing occurs
247 . \" until we have left the outermost enclosure (i.e.,
248 . \" `doc-nesting-level' is zero again), so spaces must be explicitly
249 . \" inserted -- if `doc-no-space' isn't set. The latter is active for
250 . \" a closing/closing or opening/opening request.
251 . if \n[doc-nesting-level] \
252 . if !\n[doc-func-arg-count] \
253 . if !\n[doc-no-space] \
254 . as doc-out-string "\*[doc-curr-space]
257 . nr doc-is-opening 0
259 . \" use space after last parameter as the current one
260 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
262 . if \n[doc-debug] \{\
265 . ie \n[doc-inline-debug] \{\
266 . nop MACRO REQUEST: \t.\*[doc-macro-name]
267 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
268 . nop "\*[doc-arg\n[doc-reg-dpa1]]"
272 . in \n[doc-reg-dpa]u
275 . tmc " MACRO REQUEST: .\*[doc-macro-name]
276 . while (\n[doc-reg-dpa1] <= \n[doc-arg-limit]) \{\
277 . tmc " "\*[doc-arg\n[doc-reg-dpa1]]"
289 .\" NS doc-parse-arg-vector macro
290 .\" NS parse argument vector (recursive)
292 .\" NS cf. comments in doc-parse-args
295 .\" NS doc-argXXX, doc-typeXXX, doc-spaceXXX, doc-arg-limit,
296 .\" NS doc-num-args, doc-arg-ptr, doc-out-string, doc-curr-space
298 .\" NS local variables:
299 .\" NS doc-str-dpav, doc-reg-dpav, doc-reg-dpav1
301 .de doc-parse-arg-vector
302 . nr doc-arg-limit +1
304 . if "\*[doc-arg\n[doc-arg-limit]]"|" \
305 . ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
307 . doc-get-arg-type* \n[doc-arg-limit]
308 . nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
309 . doc-set-spacing-\n[doc-arg-type]
311 . if \n[doc-debug] \{\
312 . ie (\n[doc-arg-type] == 1) \
313 . ds doc-str-dpav macro
315 . ie (\n[doc-arg-type] == 2) \
316 . ds doc-str-dpav string
318 . ie (\n[doc-arg-type] == 3) \
319 . ds doc-str-dpav closing punctuation or suffix
321 . ds doc-str-dpav opening punctuation or prefix
324 . ie \n[doc-inline-debug] \{\
326 . nr doc-reg-dpav \n[.i]u
327 . in -\n[doc-reg-dpav]u
329 . if (\n[doc-arg-limit] == 1) \{\
330 . nop \f[B]DEBUG(doc-parse-arg-vector)
331 . nop MACRO:\f[P] `.\*[doc-macro-name]'
332 . nop \& \f[B]Line #:\f[P] \n[.c]
334 . nop \t\f[B]Argc:\f[P] \n[doc-arg-limit]
335 . nop \ \f[B]Argv:\f[P] `\*[doc-arg\n[doc-arg-limit]]'
336 . nop \ \f[B]Length:\f[P] \n[doc-width]
337 . nop \t\f[B]Space:\f[P] `\*[doc-space\n[doc-arg-limit]]'
338 . nop \ \f[B]Type:\f[P] \*[doc-str-dpav]
341 . if (\n[doc-arg-limit] == 1) \{\
342 . tmc "DEBUG(doc-parse-arg-vector)
343 . tm1 " MACRO: `.\*[doc-macro-name]' Line #: \n[.c]
345 . tmc " Argc: \n[doc-arg-limit]
346 . tmc " Argv: `\*[doc-arg\n[doc-arg-limit]]'
347 . tm1 " Length: \n[doc-width]
348 . tmc " Space: `\*[doc-space\n[doc-arg-limit]]'
349 . tm1 " Type: \*[doc-str-dpav]
352 . ie (\n[doc-num-args] == 1) \{\
355 . if \n[doc-nesting-level] \
356 . if !\n[doc-func-arg-count] \
357 . if !\n[doc-no-space] \
358 . as doc-out-string "\*[doc-curr-space]
361 . nr doc-is-opening 0
363 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
367 . if \n[doc-debug] \{\
370 . ie \n[doc-inline-debug] \{\
371 . nop \tMACRO REQUEST: .\*[doc-macro-name]
372 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
373 . nop "\*[doc-arg\n[doc-reg-dpav1]]"
374 . nr doc-reg-dpav1 +1
377 . in \n[doc-reg-dpav]u
380 . tmc " MACRO REQUEST: .\*[doc-macro-name]
381 . while (\n[doc-reg-dpav1] <= \n[doc-arg-limit]) \{\
382 . tmc " "\*[doc-arg\n[doc-reg-dpav1]]"
383 . nr doc-reg-dpav1 +1
389 . doc-parse-arg-vector
394 .\" NS doc-parse-space-vector macro
395 .\" NS parse space vector (recursive)
398 .\" NS doc-spaceXXX, doc-arg-limit, doc-num-args, doc-curr-space
400 .de doc-parse-space-vector
401 . nr doc-arg-limit +1
403 . doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
405 . ie (\n[doc-num-args] == 1) \{\
406 . ds doc-curr-space "\*[doc-space\n[doc-arg-limit]]
411 . doc-parse-space-vector
416 .\" NS doc-remaining-args macro
417 .\" NS output remaining arguments as-is, separated by spaces (until
418 .\" NS `doc-num-args' is exhausted), to `doc-out-string'
421 .\" NS doc-num-args, doc-arg-ptr, doc-out-string
423 .de doc-remaining-args
425 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
427 . ie (\n[doc-num-args] == 1) \{\
432 . as doc-out-string "\*[doc-space]
439 .\" NS doc-have-append global register (bool)
440 .\" NS whether an argument has been appended to the argument vector
442 .nr doc-have-append 0
445 .\" NS doc-append-arg macro
446 .\" NS append one argument to argument vector:
447 .\" NS `.doc-append-arg [arg] [type]'
450 .\" NS doc-argXXX, doc-typeXXX, doc-arg-limit, doc-have-append
453 . nr doc-arg-limit +1
454 . ds doc-arg\n[doc-arg-limit] "\$1
455 . nr doc-type\n[doc-arg-limit] \$2
456 . doc-set-spacing-\$2
457 . nr doc-have-append 1
461 .\" NS doc-print-and-reset macro
462 .\" NS print doc-out-string and clean up argument vectors
464 .de doc-print-and-reset
465 . doc-print-out-string
470 .\" NS doc-reset-args macro
471 .\" NS reset argument counters
474 .\" NS doc-arg-limit, doc-arg-ptr, doc-have-append
479 . nr doc-have-append 0
483 .\" NS doc-print-out-string macro
484 .\" NS print `doc-out-string', enabling hyphenation afterwards
487 .\" NS doc-out-string, doc-curr-space
489 .de doc-print-out-string
490 . if !(\n[doc-in-list] : \n[doc-nesting-level]) \
491 . if !\n[doc-no-printing] \{\
492 . nop \&\*[doc-out-string]
503 .\" NS doc-curr-font global register
504 .\" NS saved current font
506 .nr doc-curr-font \n[.f]
509 .\" NS doc-curr-size global register
510 .\" NS saved current font size
512 .nr doc-curr-size \n[.s]
518 .\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
521 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
524 .\" NS local variables:
525 .\" NS doc-reg-Fl (for communication with doc-flag-recursion)
527 .\" NS width register `Fl' set in doc-common
530 . as doc-out-string \*[doc-Fl-font]
532 . if !\n[doc-arg-limit] \{\
534 . ds doc-macro-name Fl
539 . as doc-out-string \|\-\|\f[P]\s[0]
540 . doc-print-out-string
543 . if \n[doc-arg-limit] \{\
545 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
547 . as doc-out-string \|\-\f[P]\s[0]
548 . doc-print-and-reset
551 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
552 . as doc-out-string \|\-\f[P]\s[0]
553 . \*[doc-arg\n[doc-arg-ptr]]
556 . nr doc-curr-font \n[.f]
557 . nr doc-curr-size \n[.s]
559 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
560 . as doc-out-string \|\-\|
568 .\" NS doc-flag-recursion macro
569 .\" NS `Fl' flag recursion routine (special handling)
572 .\" NS doc-arg-ptr, doc-out-string
574 .\" NS local variables:
575 .\" NS doc-str-dfr, doc-reg-dfr, doc-reg-dfr1
577 .de doc-flag-recursion
578 . nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
579 . ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
583 . ie (\n[doc-reg-dfr1] == 1) \{\
584 . as doc-out-string \f[P]\s[0]
588 . nr doc-reg-dfr \n[doc-arg-ptr]
590 . ie (\n[doc-reg-dfr1] == 2) \{\
591 . \" handle vertical bar -- doc-reg-Fl is set for the first call of
592 . \" doc-flag-recursion only; we need this to make `.Fl | ...' work
594 . ie "\*[doc-str-dfr]"\*[Ba]" \{\
595 . if \n[doc-reg-Fl] \
596 . as doc-out-string \|\-\*[doc-space]
597 . as doc-out-string \&\*[Ba]
600 . ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
601 . if \n[doc-reg-Fl] \
602 . as doc-out-string \|\-\*[doc-space]
603 . as doc-out-string \f[R]|\f[P]
606 . \" two consecutive hyphen characters?
607 . ie "\*[doc-str-dfr]"-" \
608 . as doc-out-string \|\-\^\-\|
610 . as doc-out-string \|\-\*[doc-str-dfr]
613 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
614 . as doc-out-string "\*[doc-str-dfr]\f[P]\s[0]
617 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
619 . if (\n[doc-reg-dfr1] == 4) \
620 . as doc-out-string \|\-
621 . as doc-out-string \f[P]\s[0]
622 . doc-print-and-reset
626 . ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
627 . ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
628 . as doc-out-string \|\-
630 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
633 . as doc-out-string "\*[doc-space\n[doc-reg-dfr]]
637 . doc-flag-recursion \$@
642 .\" NS doc-print-recursive macro
643 .\" NS general name recursion routine (print remaining arguments)
645 .\" NS hyphenation is disabled
648 .\" NS doc-arg-ptr, doc-out-string
650 .\" NS local variables:
651 .\" NS doc-str-dpr, doc-reg-dpr, doc-reg-dpr1
653 .de doc-print-recursive
654 . nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
655 . ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
659 . ie (\n[doc-reg-dpr1] == 1) \{\
660 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
664 . nr doc-reg-dpr \n[doc-arg-ptr]
666 . ie (\n[doc-reg-dpr1] == 2) \
667 . as doc-out-string \&\*[doc-str-dpr]
669 . \" punctuation character
670 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
671 . as doc-out-string "\*[doc-str-dpr]\f[P]\s[0]
675 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
677 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
678 . doc-print-and-reset
681 . as doc-out-string "\*[doc-space\n[doc-reg-dpr]]
682 . doc-print-recursive
688 .\" NS command line `argument' macro: `.Ar [args ...]'
691 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
694 .\" NS width register `Ar' set in doc-common
697 . as doc-out-string \*[doc-Ar-font]
699 . if !\n[doc-arg-limit] \{\
701 . ds doc-macro-name Ar
706 . as doc-out-string \&file\ ...\f[P]\s[0]
707 . doc-print-out-string
710 . if \n[doc-arg-limit] \{\
712 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
713 . as doc-out-string \&file\ ...\f[P]\s[0]
714 . doc-print-and-reset
717 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
718 . as doc-out-string \&file\ ...\f[P]\s[0]
719 . \*[doc-arg\n[doc-arg-ptr]]
722 . nr doc-curr-font \n[.f]
723 . nr doc-curr-size \n[.s]
724 . if (\n[doc-type\n[doc-arg-ptr]] == 3) \
725 . as doc-out-string \&file\ ...
726 . doc-print-recursive
735 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
738 .\" NS width register `Ad' set in doc-common
741 . if !\n[doc-arg-limit] \{\
743 . ds doc-macro-name Ad
747 . tm Usage: .Ad address ... \*[doc-punct-chars] (#\n[.c])
751 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
752 . as doc-out-string \*[doc-Ad-font]
753 . nr doc-curr-font \n[.f]
754 . nr doc-curr-size \n[.s]
755 . doc-print-recursive
760 .\" NS doc-in-synopsis-count global register
761 .\" NS whether we have more than a single item in synopsis
763 .nr doc-in-synopsis-count 0
766 .\" NS doc-indent-synopsis global register
767 .\" NS indentation in synopsis
769 .nr doc-indent-synopsis 0
773 .\" NS Config declaration (for section 4 SYNOPSIS)
775 .\" NS this function causes a break; it uses the `Nm' font
778 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
779 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis
781 .\" NS width register `Cd' set in doc-common
783 .\" needs work - not very translatable
786 . if !\n[doc-arg-limit] \{\
788 . ds doc-macro-name Cd
792 . tm Usage: .Cd Configuration file declaration (#\n[.c])
798 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
799 . as doc-out-string \*[doc-Nm-font]
800 . nr doc-curr-font \n[.f]
801 . nr doc-curr-size \n[.s]
803 . ie \n[doc-in-synopsis-count] \{\
804 . if "\*[doc-macro-name]"Cd" \{\
806 . ie (\n[doc-in-synopsis-count] > 1) \
809 . if !\n[doc-indent-synopsis] \
810 . nr doc-indent-synopsis \n[doc-display-indent]u
812 . in +\n[doc-indent-synopsis]u
813 . ti -\n[doc-indent-synopsis]u
814 . nr doc-in-synopsis-count +1
817 . doc-print-recursive
818 . in -\n[doc-indent-synopsis]u
821 . doc-print-recursive
827 .\" NS Interactive command modifier (flag)
830 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
833 .\" NS width register `Cm' set in doc-common
836 . if !\n[doc-arg-limit] \{\
838 . ds doc-macro-name Cm
842 . tmc Usage: .Cm Interactive command modifier ...
843 . tm1 " \*[doc-punct-chars] (#\n[.c])
847 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
848 . as doc-out-string \*[doc-Cm-font]
849 . nr doc-curr-font \n[.f]
850 . nr doc-curr-size \n[.s]
851 . doc-print-recursive
857 .\" NS define variable
859 .\" NS this function uses the `Er' font
862 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
865 .\" NS width register `Dv' set in doc-common
868 . if !\n[doc-arg-limit] \{\
870 . ds doc-macro-name Dv
874 . tm Usage: .Dv define_variable ... \*[doc-punct-chars] (#\n[.c])
878 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
879 . as doc-out-string \*[doc-Er-font]
880 . nr doc-curr-font \n[.f]
881 . nr doc-curr-size \n[.s]
882 . doc-print-recursive
891 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
894 .\" NS width register `Em' set in doc-common
897 . if !\n[doc-arg-limit] \{\
899 . ds doc-macro-name Em
903 . tm Usage: .Em text ... \*[doc-punct-chars] (#\n[.c])
907 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
908 . as doc-out-string \*[doc-Em-font]
909 . nr doc-curr-font \n[.f]
910 . nr doc-curr-size \n[.s]
911 . doc-print-recursive
920 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
923 .\" NS width register `Er' set in doc-common
926 . if !\n[doc-arg-limit] \{\
928 . ds doc-macro-name Er
932 . tm Usage: .Er errno_type ... \*[doc-punct-chars] (#\n[.c])
936 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
937 . as doc-out-string \*[doc-Er-font]
938 . nr doc-curr-font \n[.f]
939 . nr doc-curr-size \n[.s]
940 . doc-print-recursive
946 .\" NS environment variable
949 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
952 .\" NS width register `Ev' set in doc-common
955 . if !\n[doc-arg-limit] \{\
957 . ds doc-macro-name Ev
961 . tm Usage: .Ev enviroment_variable ... \*[doc-punct-chars] (#\n[.c])
965 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
966 . as doc-out-string \*[doc-Ev-font]
967 . nr doc-curr-font \n[.f]
968 . nr doc-curr-size \n[.s]
969 . doc-print-recursive
974 .\" NS doc-have-decl global register (bool)
975 .\" NS subroutine test (in synopsis only)
980 .\" NS doc-have-var global register (bool)
981 .\" NS whether last type is a variable type
986 .\" NS doc-do-func-decl macro
987 .\" NS do someting special while in SYNOPSIS
990 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
994 . if \n[doc-in-synopsis-count] \{\
995 . \" if a variable type was the last thing given, want vertical space
996 . if \n[doc-have-var] \{\
1000 . \" if a subroutine was the last thing given, want vertical space
1001 . if \n[doc-have-func] \{\
1002 . ie \n[doc-have-decl] \
1008 . nr doc-have-decl 1
1011 . nr doc-curr-font \n[.f]
1012 . nr doc-curr-size \n[.s]
1016 .\" NS Fd user macro
1017 .\" NS function declaration -- not callable
1019 .\" NS this function causes a break
1021 .\" NS width register `Fd' set in doc-common
1024 . ie \n[doc-arg-limit] \
1025 . tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
1028 . nop \*[doc-Fd-font]\$*
1030 . ft \n[doc-curr-font]
1031 . ps \n[doc-curr-size]
1036 .\" NS In user macro
1037 .\" NS #include statement - not callable (& no err check)
1039 .\" NS this function causes a break; it uses the `Fd' font
1041 .\" NS width register `In' set in doc-common
1044 . ie \n[doc-arg-limit] \
1045 . tm Usage: .In #include_statement -- In is not callable (#\n[.c])
1048 . nop \*[doc-Fd-font]#include <\$1>
1050 . ft \n[doc-curr-font]
1051 . ps \n[doc-curr-size]
1056 .\" NS Fr user macro
1057 .\" NS function return value
1059 .\" NS this function uses the `Ar' font
1062 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1063 .\" NS doc-curr-size
1065 .\" NS width register `Fr' set in doc-common
1068 . if !\n[doc-arg-limit] \{\
1070 . ds doc-macro-name Fr
1071 . doc-parse-args \$@
1074 . tm Usage: .Fr Function_return_value... \*[doc-punct-chars] (#\n[.c])
1078 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1079 . as doc-out-string \*[doc-Ar-font]
1080 . nr doc-curr-font \n[.f]
1081 . nr doc-curr-size \n[.s]
1082 . doc-print-recursive
1087 .\" NS Ic user macro
1088 .\" NS interactive command
1091 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1092 .\" NS doc-curr-size
1094 .\" NS width register `Ic' set in doc-common
1097 . if !\n[doc-arg-limit] \{\
1099 . ds doc-macro-name Ic
1100 . doc-parse-args \$@
1103 . tm Usage: .Ic Interactive command ... \*[doc-punct-chars] (#\n[.c])
1107 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1108 . as doc-out-string \*[doc-Ic-font]
1109 . nr doc-curr-font \n[.f]
1110 . nr doc-curr-size \n[.s]
1111 . doc-print-recursive
1116 .\" NS Li user macro
1120 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1121 .\" NS doc-curr-size
1123 .\" NS width register `Li' set in doc-common
1126 . if !\n[doc-arg-limit] \{\
1128 . ds doc-macro-name Li
1129 . doc-parse-args \$@
1132 . tm Usage: .Li argument ... \*[doc-punct-chars] (#\n[.c])
1136 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1137 . as doc-out-string \*[doc-Li-font]
1138 . nr doc-curr-font \n[.f]
1139 . nr doc-curr-size \n[.s]
1140 . doc-print-recursive
1145 .\" NS Or user macro
1146 .\" NS pipe symbol (OR)
1149 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1150 .\" NS doc-curr-size
1152 .\" NS width register `Or' set in doc-common
1154 .\" XXX: What is this function good for? It sets a font but does not print
1155 .\" a pipe symbol. And it isn't documented.
1158 . if !\n[doc-arg-limit] \{\
1160 . ds doc-macro-name Or
1161 . doc-parse-args \$@
1164 . tm Usage: .Or ... \*[doc-punct-chars] (#\n[.c])
1168 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1169 . as doc-out-string \*[doc-Ic-font]
1170 . nr doc-curr-font \n[.f]
1171 . nr doc-curr-size \n[.s]
1172 . doc-print-recursive
1177 .\" NS Ms user macro
1180 .\" NS this function uses the `Sy' font
1183 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1184 .\" NS doc-curr-size
1186 .\" NS width register `Ms' set in doc-common
1189 . if !\n[doc-arg-limit] \{\
1191 . ds doc-macro-name Ms
1192 . doc-parse-args \$@
1195 . tm Usage: .Ms Math symbol ... \*[doc-punct-chars] (#\n[.c])
1199 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1200 . as doc-out-string \*[doc-Sy-font]
1201 . nr doc-curr-font \n[.f]
1202 . nr doc-curr-size \n[.s]
1203 . doc-print-recursive
1208 .\" NS doc-command-name global string
1209 .\" NS save first invocation of .Nm
1211 .ds doc-command-name
1214 .\" NS Nm user macro
1215 .\" NS name of command or page topic
1218 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1219 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
1220 .\" NS doc-command-name
1222 .\" NS width register `Nm' set in doc-common
1225 . if !\n[doc-arg-limit] \{\
1226 . ds doc-macro-name Nm
1228 . doc-parse-args \$@
1230 . ie "\*[doc-command-name]"" \
1231 . tm Usage: .Nm Name ... \*[doc-punct-chars] (#\n[.c])
1233 . doc-parse-args \*[doc-command-name]
1236 . if \n[doc-arg-limit] \{\
1238 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1240 . as doc-out-string \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
1241 . doc-print-and-reset
1244 . as doc-out-string \*[doc-Nm-font]
1245 . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \
1246 . as doc-out-string \&\*[doc-command-name]\f[P]\s[0]
1248 . nr doc-curr-font \n[.f]
1249 . nr doc-curr-size \n[.s]
1251 . \" handle `.Nm ...' in SYNOPSIS
1252 . if \n[doc-in-synopsis-count] \{\
1253 . if "\*[doc-macro-name]"Nm" \{\
1255 . in -\n[doc-indent-synopsis]u
1256 . ie (\n[doc-in-synopsis-count] > 1) \
1259 . if !\n[doc-indent-synopsis] \{\
1260 . doc-get-width "\*[doc-arg\n[doc-arg-ptr]]
1261 . nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1263 . in +\n[doc-indent-synopsis]u
1264 . ti -\n[doc-indent-synopsis]u
1265 . nr doc-in-synopsis-count +1
1267 . if "\*[doc-command-name]"" \
1268 . ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1270 . doc-print-recursive
1275 .\" NS Pa user macro
1276 .\" NS pathname: `.Pa [arg ...]'
1279 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1280 .\" NS doc-curr-size
1282 .\" NS width register `Pa' set in doc-common
1285 . if !\n[doc-arg-limit] \{\
1287 . ds doc-macro-name Pa
1288 . doc-parse-args \$@
1292 . nop \*[doc-Pa-font]~\f[P]\s[0]
1296 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1297 . as doc-out-string \*[doc-Pa-font]
1298 . nr doc-curr-font \n[.f]
1299 . nr doc-curr-size \n[.s]
1300 . doc-print-recursive
1305 .\" NS Sy user macro
1309 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1310 .\" NS doc-curr-size
1312 .\" NS width register `Sy' set in doc-common
1315 . if !\n[doc-arg-limit] \{\
1317 . ds doc-macro-name Sy
1318 . doc-parse-args \$@
1321 . tm Usage: .Sy symbolic_text ... \*[doc-punct-chars] (#\n[.c])
1325 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1326 . as doc-out-string \*[doc-Sy-font]
1327 . nr doc-curr-font \n[.f]
1328 . nr doc-curr-size \n[.s]
1329 . doc-print-recursive
1334 .\" NS Me user macro
1338 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1339 .\" NS doc-curr-size
1341 .\" NS width register `Me' set in doc-common
1344 . if !\n[doc-arg-limit] \{\
1346 . ds doc-macro-name Me
1347 . doc-parse-args \$@
1350 . tm Usage: .Me menu_entry ... \*[doc-punct-chars] (#\n[.c])
1354 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1355 . as doc-out-string \*[doc-Me-font]
1356 . nr doc-curr-font \n[.f]
1357 . nr doc-curr-size \n[.s]
1358 . doc-print-recursive
1363 .\" NS Tn user macro
1367 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1368 .\" NS doc-curr-size
1370 .\" NS width register `Tn' set in doc-common
1373 . if !\n[doc-arg-limit] \{\
1375 . ds doc-macro-name Tn
1376 . doc-parse-args \$@
1379 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1383 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1384 . as doc-out-string \&\*[doc-Tn-font-shape]\*[doc-Tn-font-size]
1385 . nr doc-curr-font \n[.f]
1386 . nr doc-curr-size \n[.s]
1387 . doc-print-recursive
1392 .\" NS doc-reference-trademark macro
1393 .\" NS .Tn for inside of references
1396 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1397 .\" NS doc-curr-size
1399 .\" NS the code for references below checks for `Tn'!
1401 .de doc-reference-trademark
1402 . if !\n[doc-arg-limit] \{\
1404 . ds doc-macro-name Tn
1405 . doc-parse-args \$@
1408 . tm Usage: .Tn trade_name ... \*[doc-punct-chars] (#\n[.c])
1412 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1413 . as doc-out-string \&\*[doc-Tn-font-size]
1414 . nr doc-curr-font \n[.f]
1415 . nr doc-curr-size \n[.s]
1421 .\" NS Va user macro
1422 .\" NS variable name
1425 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1426 .\" NS doc-curr-size
1428 .\" NS width register `Va' set in doc-common
1431 . if !\n[doc-arg-limit] \{\
1433 . ds doc-macro-name Va
1434 . doc-parse-args \$@
1437 . tm Usage: .Va variable_name ... \*[doc-punct-chars] (#\n[.c])
1441 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1442 . as doc-out-string \*[doc-Va-font]
1443 . nr doc-curr-font \n[.f]
1444 . nr doc-curr-size \n[.s]
1445 . doc-print-recursive
1450 .\" NS No user macro
1451 .\" NS normal text macro (default text style if mess up)
1454 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
1455 .\" NS doc-curr-size
1457 .\" NS width register `No' set in doc-common
1460 . as doc-out-string \*[doc-No-font]
1462 . if !\n[doc-arg-limit] \{\
1464 . ds doc-macro-name No
1465 . doc-parse-args \$@
1468 . tm Usage: .No normal_text ... \*[doc_punct_chars] (#\n[.c])
1472 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1473 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
1474 . \*[doc-arg\n[doc-arg-ptr]]
1476 . nr doc-curr-font \n[.f]
1477 . nr doc-curr-size \n[.s]
1478 . doc-print-recursive
1481 . doc-print-and-reset
1485 .\" NS doc-quote-left global string
1486 .\" NS left quotation character for `doc-enclose-string' and
1487 .\" NS `doc-enclose-open'
1492 .\" NS doc-quote-right global string
1493 .\" NS right quotation character for `doc-enclose-string' and
1494 .\" NS `doc-enclose-close'
1499 .\" NS Op user macro
1500 .\" NS option expression (i.e., enclose string in square brackets)
1503 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1505 .\" NS width register `Op' set in doc-common
1508 . if !\n[doc-arg-limit] \
1509 . ds doc-macro-name Op
1511 . ds doc-quote-left "\*[doc-left-bracket]
1512 . ds doc-quote-right "\*[doc-right-bracket]
1514 . doc-enclose-string \$@
1518 .\" NS Aq user macro
1519 .\" NS enclose string in angle brackets
1522 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1524 .\" NS width register `Aq' set in doc-common
1527 . if !\n[doc-arg-limit] \
1528 . ds doc-macro-name Aq
1530 . ds doc-quote-left <
1531 . ds doc-quote-right >
1533 . doc-enclose-string \$@
1537 .\" NS Bq user macro
1538 .\" NS enclose string in square brackets
1541 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1543 .\" NS width register `Bq' set in doc-common
1546 . if !\n[doc-arg-limit] \
1547 . ds doc-macro-name Bq
1549 . ds doc-quote-left "\*[doc-left-bracket]
1550 . ds doc-quote-right "\*[doc-right-bracket]
1552 . doc-enclose-string \$@
1556 .\" NS Brq user macro
1557 .\" NS enclose string in braces
1560 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1562 .\" NS width register `Brq' set in doc-common
1565 . if !\n[doc-arg-limit] \
1566 . ds doc-macro-name Brq
1568 . ds doc-quote-left {
1569 . ds doc-quote-right }
1571 . doc-enclose-string \$@
1575 .\" NS Dq user macro
1576 .\" NS enclose string in double quotes
1579 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1581 .\" NS width register `Dq' set in doc-common
1584 . if !\n[doc-arg-limit] \
1585 . ds doc-macro-name Dq
1587 . ds doc-quote-left "\*[Lq]
1588 . ds doc-quote-right "\*[Rq]
1590 . doc-enclose-string \$@
1594 .\" NS Eq user macro
1595 .\" NS enclose string in user-defined quotes (args 1 and 2)
1598 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1600 .\" NS width register `Eq' set in doc-common
1603 . if !\n[doc-arg-limit] \
1604 . ds doc-macro-name Eq
1606 . ds doc-quote-left "\$1
1607 . ds doc-quote-right "\$2
1610 . doc-enclose-string \$@
1614 .\" NS Pq user macro
1615 .\" NS enclose string in parentheses
1618 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1620 .\" NS width register `Pq' set in doc-common
1623 . if !\n[doc-arg-limit] \
1624 . ds doc-macro-name Pq
1626 . ds doc-quote-left "\*[doc-left-parenthesis]
1627 . ds doc-quote-right "\*[doc-right-parenthesis]
1629 . doc-enclose-string \$@
1633 .\" NS Ql user macro
1634 .\" NS quoted literal
1636 .\" is in file doc-[dit|n]roff
1639 .\" NS Qq user macro
1640 .\" NS enclose string in straight double quotes
1643 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1645 .\" NS width register `Qq' set in doc-common
1648 . if !\n[doc-arg-limit] \
1649 . ds doc-macro-name Qq
1651 . ds doc-quote-left "\*[q]
1652 . ds doc-quote-right "\*[q]
1654 . doc-enclose-string \$@
1658 .\" NS Sq user macro
1659 .\" NS enclose string in single quotes
1662 .\" NS doc-macro-name, doc-quote-left, doc-quote-right
1664 .\" NS width register `Sq' set in doc-common
1667 . if !\n[doc-arg-limit] \
1668 . ds doc-macro-name Sq
1670 . ds doc-quote-left "\*[doc-left-singlequote]
1671 . ds doc-quote-right "\*[doc-right-singlequote]
1673 . doc-enclose-string \$@
1677 .\" NS Es user macro
1678 .\" NS set up arguments (i.e., the left and right quotation character as
1679 .\" NS first and second argument) for .En call
1682 .\" NS doc-macro-name, doc-quote-left, doc-quote-right, doc-arg-ptr
1685 . if !\n[doc-arg-limit] \{\
1686 . ie (\n[.$] > 2) \{\
1687 . ds doc-macro-name Es
1688 . doc-parse-args \$@
1691 . ds doc-quote-left "\$1
1692 . ds doc-quote-right "\$2
1695 . if \n[doc-arg-limit] \{\
1697 . ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1699 . ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1701 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1702 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1704 . doc-print-and-reset
1709 .\" NS doc-is-opening global register (bool)
1710 .\" NS whether current request emits an opening character
1712 .nr doc-is-opening 0
1715 .\" NS doc-enclose-string macro
1716 .\" NS enclose string with given args (e.g. [ and ])
1719 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string
1721 .\" NS local variables:
1722 .\" NS doc-reg-des (for communication with doc-skip-punct-backwards)
1725 .\" NS doc-quote-left, doc-quote-right
1727 .de doc-enclose-string
1728 . ie \n[doc-arg-limit] \
1729 . as doc-out-string \&\*[doc-quote-left]
1732 . \" was the last request on the previous line an opening request?
1733 . if \n[doc-is-opening] \
1735 . doc-parse-args \$@
1736 . as doc-out-string \&\*[doc-quote-left]
1740 . as doc-out-string \&\*[doc-quote-left]\*[doc-quote-right]
1741 . doc-print-out-string
1744 . if \n[doc-arg-limit] \{\
1746 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1748 . as doc-out-string \&\*[doc-quote-right]
1749 . doc-print-and-reset
1752 . \" We test the last argument. If it isn't a closing punctuation
1753 . \" resp. suffix, we append one so that we have an anchor for
1754 . \" prepending nested closing delimiters.
1755 . ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1756 . nr doc-reg-des (\n[doc-arg-limit] - 1)
1757 . doc-skip-punct-backwards
1759 . ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\&\*[doc-arg\n[doc-reg-des]]
1763 . doc-append-arg "\*[doc-quote-right]" 3
1765 . doc-do-\n[doc-type\n[doc-arg-ptr]]
1770 .\" NS En user macro
1771 .\" NS enclose arguments with quotation characters set up with `.Es'
1773 .als En doc-enclose-string
1776 .\" NS doc-skip-punct-backwards macro
1777 .\" NS vector routine (for `doc-enclose-string': trace backwards past
1778 .\" NS trailing punctuation)
1783 .de doc-skip-punct-backwards
1784 . if (\n[doc-type\n[doc-reg-des]] == 3) \{\
1786 . doc-skip-punct-backwards
1791 .\" NS Ao user macro
1795 .\" NS doc-macro-name, doc-quote-left
1797 .\" NS width register `Ao' set in doc-common
1800 . if !\n[doc-arg-limit] \
1801 . ds doc-macro-name Ao
1803 . ds doc-quote-left <
1805 . doc-enclose-open \$@
1809 .\" NS Ac user macro
1813 .\" NS doc-macro-name, doc-quote-right
1815 .\" NS width register `Ac' set in doc-common
1818 . if !\n[doc-arg-limit] \
1819 . ds doc-macro-name Ac
1821 . ds doc-quote-right >
1823 . doc-enclose-close \$@
1827 .\" NS Bo user macro
1831 .\" NS doc-macro-name, doc-quote-left
1833 .\" NS width register `Bo' set in doc-common
1836 . if !\n[doc-arg-limit] \
1837 . ds doc-macro-name Bo
1839 . ds doc-quote-left "\*[doc-left-bracket]
1841 . doc-enclose-open \$@
1845 .\" NS Bc user macro
1846 .\" NS bracket close
1849 .\" NS doc-macro-name, doc-quote-right
1851 .\" NS width register `Bc' set in doc-common
1854 . if !\n[doc-arg-limit] \
1855 . ds doc-macro-name Bc
1857 . ds doc-quote-right "\*[doc-right-bracket]
1859 . doc-enclose-close \$@
1863 .\" NS Bro user macro
1867 .\" NS doc-macro-name, doc-quote-left
1869 .\" NS width register `Bro' set in doc-common
1872 . if !\n[doc-arg-limit] \
1873 . ds doc-macro-name Bo
1875 . ds doc-quote-left {
1877 . doc-enclose-open \$@
1881 .\" NS Brc user macro
1885 .\" NS doc-macro-name, doc-quote-right
1887 .\" NS width register `Brc' set in doc-common
1890 . if !\n[doc-arg-limit] \
1891 . ds doc-macro-name Bc
1893 . ds doc-quote-right }
1895 . doc-enclose-close \$@
1899 .\" NS Do user macro
1900 .\" NS double quote open
1903 .\" NS doc-macro-name, doc-quote-left
1905 .\" NS width register `Do' set in doc-common
1908 . if !\n[doc-arg-limit] \
1909 . ds doc-macro-name Do
1911 . ds doc-quote-left "\*[Lq]
1913 . doc-enclose-open \$@
1917 .\" NS Dc user macro
1918 .\" NS double quote close
1921 .\" NS doc-macro-name, doc-quote-right
1923 .\" NS width register `Dc' set in doc-common
1926 . if !\n[doc-arg-limit] \
1927 . ds doc-macro-name Dc
1929 . ds doc-quote-right "\*[Rq]
1931 . doc-enclose-close \$@
1935 .\" NS Eo user macro
1936 .\" NS enclose open (using first argument as beginning of enclosure)
1939 .\" NS doc-macro-name, doc-quote-left
1941 .\" NS width register `Eo' set in doc-common
1944 . if !\n[doc-arg-limit] \
1945 . ds doc-macro-name Eo
1947 . ds doc-quote-left "\$1
1950 . doc-enclose-open \$@
1954 .\" NS Ec user macro
1955 .\" NS enclose close (using first argument as end of enclosure)
1958 .\" NS doc-macro-name, doc-quote-right
1960 .\" NS width register `Ec' set in doc-common
1963 . if !\n[doc-arg-limit] \
1964 . ds doc-macro-name Ec
1966 . ds doc-quote-right "\$1
1969 . doc-enclose-close \$@
1973 .\" NS Oo user macro
1977 .\" NS doc-macro-name, doc-quote-left
1979 .\" NS width register `Oo' set in doc-common
1982 . if !\n[doc-arg-limit] \
1983 . ds doc-macro-name Oo
1985 . ds doc-quote-left [
1987 . doc-enclose-open \$@
1991 .\" NS Oc user macro
1995 .\" NS doc-macro-name, doc-quote-right
1997 .\" NS width register `Oc' set in doc-common
2000 . if !\n[doc-arg-limit] \
2001 . ds doc-macro-name Oc
2003 . ds doc-quote-right ]
2005 . doc-enclose-close \$@
2009 .\" NS Po user macro
2010 .\" NS parenthesis open
2013 .\" NS doc-macro-name, doc-quote-left
2015 .\" NS width register `Po' set in doc-common
2018 . if !\n[doc-arg-limit] \
2019 . ds doc-macro-name Po
2021 . ds doc-quote-left "\*[doc-left-parenthesis]
2023 . doc-enclose-open \$@
2027 .\" NS Pc user macro
2028 .\" NS parenthesis close
2031 .\" NS doc-macro-name, doc-quote-right
2033 .\" NS width register `Pc' set in doc-common
2036 . if !\n[doc-arg-limit] \
2037 . ds doc-macro-name Pc
2039 . ds doc-quote-right "\*[doc-right-parenthesis]
2041 . doc-enclose-close \$@
2045 .\" NS Qo user macro
2046 .\" NS straight double quote open
2049 .\" NS doc-macro-name, doc-quote-left
2051 .\" NS width register `Qo' set in doc-common
2054 . if !\n[doc-arg-limit] \
2055 . ds doc-macro-name Qo
2057 . ds doc-quote-left "\*[q]
2059 . doc-enclose-open \$@
2063 .\" NS Qc user macro
2064 .\" NS straight double quote close
2067 .\" NS doc-macro-name, doc-quote-right
2069 .\" NS width register `Qc' set in doc-common
2072 . if !\n[doc-arg-limit] \
2073 . ds doc-macro-name Qc
2075 . ds doc-quote-right "\*[q]
2077 . doc-enclose-close \$@
2081 .\" NS So user macro
2082 .\" NS single quote open
2085 .\" NS doc-macro-name, doc-quote-left
2087 .\" NS width register `So' set in doc-common
2090 . if !\n[doc-arg-limit] \
2091 . ds doc-macro-name So
2093 . ds doc-quote-left "\*[doc-left-singlequote]
2095 . doc-enclose-open \$@
2099 .\" NS Sc user macro
2100 .\" NS single quote close
2103 .\" NS doc-macro-name, doc-quote-right
2105 .\" NS width register `Sc' set in doc-common
2108 . if !\n[doc-arg-limit] \
2109 . ds doc-macro-name Sc
2111 . ds doc-quote-right "\*[doc-right-singlequote]
2113 . doc-enclose-close \$@
2117 .\" NS Xo user macro
2121 .\" NS doc-macro-name, doc-quote-left
2123 .\" NS width register `Xo' set in doc-common
2126 . if !\n[doc-arg-limit] \
2127 . ds doc-macro-name Xo
2131 . doc-enclose-open \$@
2135 .\" NS Xc user macro
2139 .\" NS doc-macro-name, doc-quote-right
2141 .\" NS width register `Xc' set in doc-common
2144 . if !\n[doc-arg-limit] \
2145 . ds doc-macro-name Xc
2147 . ds doc-quote-right
2149 . doc-enclose-close \$@
2153 .\" NS doc-nesting-level global register
2154 .\" NS used by `doc-enclose-open' and `doc-enclose-close', `.Fo', and `.Fc'
2156 .nr doc-nesting-level 0
2159 .\" NS doc-in-list global register (bool)
2160 .\" NS whether we are in (logical) .It
2165 .\" NS doc-enclose-open macro
2166 .\" NS enclose string open
2169 .\" NS doc-arg-ptr, doc-out-string, doc-nesting-level
2171 .de doc-enclose-open
2172 . nr doc-nesting-level +1
2174 . ie \n[doc-arg-limit] \
2175 . as doc-out-string \&\*[doc-quote-left]
2178 . \" was the last request on the previous line an opening request?
2179 . if \n[doc-is-opening] \
2181 . doc-parse-args \$@
2182 . as doc-out-string \&\*[doc-quote-left]
2185 . as doc-out-string \&\*[doc-quote-left]
2186 . nr doc-is-opening 1
2189 . if \n[doc-arg-limit] \{\
2190 . \" the following code makes things like
2192 . \" .Op Ar foo Ns Xo
2195 . \" work as expected -- the .Op macro possibly appends an argument
2196 . \" which we must ignore here
2197 . if ((\n[doc-arg-limit] - \n[doc-have-append]) == \n[doc-arg-ptr]) \
2198 . nr doc-is-opening 1
2200 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2206 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
2207 . \*[doc-arg\n[doc-arg-ptr]]
2215 .\" NS doc-enclose-close macro
2216 .\" NS enclose string close
2219 .\" NS doc-out-string, doc-nesting-level
2221 .\" NS local variables:
2224 .de doc-enclose-close
2225 . nr doc-nesting-level -1
2227 . as doc-out-string \&\*[doc-quote-right]
2229 . if !\n[doc-arg-limit] \{\
2232 . doc-parse-args \$@
2235 . doc-print-out-string
2238 . if \n[doc-arg-limit] \{\
2239 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
2241 . ie \n[doc-nesting-level] \
2244 . doc-print-and-reset
2247 . nr doc-str-dec (\n[doc-arg-ptr] + 1)
2248 . if (\n[doc-type\n[doc-str-dec]] == 2) \
2249 . as doc-out-string "\*[doc-space\n[doc-arg-limit]]
2253 . \" shall we finish .It request?
2254 . if !"\*[doc-macro-name]"It" \
2255 . if \n[doc-in-list] \
2256 . if !\n[doc-nesting-level] \
2257 . doc-\*[doc-list-type-stack\n[doc-list-depth]]
2261 .\" NS Pf user macro
2262 .\" NS prefix: `.Pf prefix arg ...'
2265 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-quote-left
2267 .\" NS width register `Pf' set in doc-common
2270 . if !\n[doc-arg-limit] \
2271 . ds doc-macro-name Pf
2273 . ds doc-quote-left "\$1
2277 . ie \n[doc-arg-limit] \{\
2278 . ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2280 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2283 . tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2286 . as doc-out-string \&\*[doc-quote-left]
2287 . ie (\n[.$] < 2) \{\
2288 . tm mdoc warning: .Pf: missing arguments (#\n[.c])
2289 . doc-print-out-string
2292 . doc-parse-args \$@
2295 . if \n[doc-arg-limit] \{\
2297 . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2298 . doc-print-and-reset
2300 . doc-do-\n[doc-type\n[doc-arg-ptr]]
2305 .\" NS Ns user macro
2306 .\" NS remove space (space removal done by `doc-parse-args')
2309 .\" NS doc-macro-name
2311 .\" NS width register `Ns' set in doc-common
2314 . if !\n[doc-arg-limit] \{\
2315 . ds doc-macro-name Ns
2317 . doc-parse-args \$@
2319 . tm Usage: .Ns must be called with arguments (#\n[.c])
2326 .\" NS Ap user macro
2327 .\" NS append an apostrophe
2330 .\" NS doc-out-string
2332 .\" NS width register `Ap' set in doc-common
2335 . if !\n[doc-arg-limit] \
2336 . tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2338 . as doc-out-string \&'
2343 .\" NS doc-space global string
2344 .\" NS current inter-argument space
2346 .ds doc-space "\*[doc-soft-space]
2349 .\" NS doc-soft-space constant string
2350 .\" NS soft (stretchable) space (defined in doc-common)
2353 .\" NS doc-hard-space constant string
2354 .\" NS hard (unpaddable) space (defined in doc-common)
2357 .\" NS doc-set-hard-space macro
2358 .\" NS set current space string to hard (unpaddable) space.
2363 .de doc-set-hard-space
2364 . ds doc-space "\*[doc-hard-space]
2368 .\" NS doc-set-soft-space macro
2369 .\" NS set current space string to soft space (troff limitation)
2374 .de doc-set-soft-space
2375 . ds doc-space "\*[doc-soft-space]
2379 .\" NS doc-space-mode global register (bool)
2380 .\" NS default is one (space mode on)
2382 .nr doc-space-mode 1
2385 .\" NS Sm user macro
2386 .\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
2388 .\" NS without argument, toggle space mode
2391 .\" NS doc-macro-name, doc-arg-limit, doc-num-args, doc-arg-ptr,
2392 .\" NS doc-argXXX, doc-spaceXXX, doc-curr-space, doc-space-mode,
2395 .\" NS width register `Sm' set in doc-common
2397 .\" NS local variables:
2401 . if !\n[doc-arg-limit] \{\
2403 . ds doc-macro-name Sm
2404 . doc-parse-args \$@
2407 . ie \n[doc-space-mode] \
2408 . nr doc-space-mode 0
2410 . nr doc-space-mode 1
2413 . if \n[doc-arg-limit] \{\
2416 . \" avoid a warning message in case `Sm' is the last parameter
2417 . if !d doc-arg\n[doc-arg-ptr] \
2418 . ds doc-arg\n[doc-arg-ptr]
2420 . ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2421 . ds doc-space "\*[doc-soft-space]
2422 . nr doc-space-mode 1
2425 . ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2428 . nr doc-space-mode 0
2431 . \" no argument for Sm
2433 . ie \n[doc-space-mode] \
2434 . nr doc-space-mode 0
2436 . nr doc-space-mode 1
2439 . ie \n[doc-space-mode] \{\
2440 . \" recompute space vector for remaining arguments
2441 . nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2442 . nr doc-arg-limit \n[doc-arg-ptr]
2443 . if \n[doc-num-args] \
2444 . doc-parse-space-vector
2447 . \" reset remaining space vector elements
2448 . nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2449 . while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2450 . ds doc-space\n[doc-reg-Sm]
2452 . \" the body of a `while' request must end with the fitting `\}'!
2456 . \" do we have parameters to print?
2457 . ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2458 . \" ignore `.Sm on' and `.Sm off' without additional parameters
2459 . ie (\n[doc-arg-ptr] > 1) \
2460 . doc-print-and-reset
2465 . \" skip `Sm' argument
2467 . doc-print-recursive
2472 .\" NS doc-arg-type immediate register
2473 .\" NS argument type (macro=1, string=2, punctuation suffix=3,
2474 .\" NS punctuation prefix=4)
2479 .\" NS doc-get-arg-type macro
2480 .\" NS get argument type
2482 .\" NS this macro expects the width of the argument in `doc-width'
2487 .de doc-get-arg-type
2490 . if ((\n[doc-width] < 4) & \A
\a\$1
\a) \{\
2491 . ie (\n[doc-width] == 1) \{\
2492 . if r doc-punct\$1 \
2493 . nr doc-arg-type \n[doc-punct\$1]
2503 .\" NS doc-get-arg-type* macro
2504 .\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
2506 .\" NS this macro sets the `doc-width' register using the `length' request
2507 .\" NS to get the number of characters in a string literally
2510 .\" NS doc-arg-type, doc-width
2512 .de doc-get-arg-type*
2514 . length doc-width "\*[doc-arg\$1]
2516 . if ((\n[doc-width] < 4) & \A
\a\*[doc-arg\$1]
\a) \{\
2517 . ie (\n[doc-width] == 1) \{\
2518 . if r doc-punct\*[doc-arg\$1] \
2519 . nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2522 . if r \*[doc-arg\$1] \
2523 . if d \*[doc-arg\$1] \
2529 .\" NS doc-set-spacing-1 macro
2530 .\" NS set spacing for macros
2535 .\" NS local variables:
2536 .\" NS doc-reg-dssfm, doc-reg-dssfm1
2538 .de doc-set-spacing-1
2539 . nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2541 . \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2543 . ie (\n[doc-reg-dssfm1] == 3) \{\
2544 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2545 . ds doc-space\n[doc-reg-dssfm]
2546 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2549 . \" macros like .Ap and .Ns have value 2 (remove space before and after
2551 . ie (\n[doc-reg-dssfm1] == 2) \{\
2552 . nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2553 . ds doc-space\n[doc-reg-dssfm]
2554 . ds doc-space\n[doc-arg-limit]
2557 . ds doc-space\n[doc-arg-limit]
2562 .\" NS doc-set-spacing-2 macro
2563 .\" NS set spacing for strings
2568 .de doc-set-spacing-2
2569 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2573 .\" NS doc-set-spacing-3 macro
2574 .\" NS set spacing for punctuation suffixes
2579 .\" NS local variables:
2580 .\" NS doc-reg-dssfps
2582 .de doc-set-spacing-3
2583 . if \n[doc-arg-limit] \{\
2584 . nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2585 . ds doc-space\n[doc-reg-dssfps]
2588 . ds doc-space\n[doc-arg-limit] "\*[doc-space]
2592 .\" NS doc-set-spacing-4 macro
2593 .\" NS set spacing for punctuation prefixes
2598 .de doc-set-spacing-4
2599 . ds doc-space\n[doc-arg-limit]
2603 .\" type switches (on current argument doc-arg-ptr)
2606 .\" NS doc-do-1 macro
2607 .\" NS call request if macro
2610 . \*[doc-arg\n[doc-arg-ptr]]
2614 .\" NS doc-do-2 macro
2615 .\" NS call .No if string
2626 .\" NS doc-do-3 macro
2627 .\" NS call .No if punctuation suffix
2638 .\" NS doc-do-4 macro
2639 .\" NS call .No if punctuation prefix
2650 .\" NS doc-do-xref-1 macro
2651 .\" NS ignore if macro
2657 .\" NS doc-do-xref-2 macro
2658 .\" NS ignore if string
2664 .\" NS doc-do-xref-3 macro
2665 .\" NS append if punctuation suffix
2668 .\" NS doc-arg-ptr, doc-out-string
2671 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2678 .\" NS doc-do-xref-4 macro
2679 .\" NS append if punctuation prefix
2682 .\" NS doc-arg-ptr, doc-out-string
2685 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
2692 .\" NS doc-curr-font-for-Ef global register
2693 .\" NS saved current font from `Bf' request
2695 .nr doc-curr-font-for-Ef 0
2698 .\" NS doc-curr-size-for-Ef global register
2699 .\" NS saved current size from `Bf' request
2701 .nr doc-curr-size-for-Ef 0
2704 .\" NS Bf user macro
2705 .\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
2708 .\" NS doc-macro-name, doc-curr-font-for-Ef, doc-curr-size-for-Ef
2710 .\" NS width register `Bf' set in doc-common
2713 . ds doc-macro-name Bf
2716 . nr doc-curr-font-for-Ef \n[.f]
2717 . nr doc-curr-size-for-Ef \n[.s]
2720 . nop \*[doc-Em-font]\c
2721 . el \{ .ie "\$1"Li" \
2722 . nop \*[doc-Li-font]\c
2723 . el \{ .ie "\$1"Sy" \
2724 . nop \*[doc-Sy-font]\c
2725 . el \{ .ie "\$1"-emphasis" \
2726 . nop \*[doc-Em-font]\c
2727 . el \{ .ie "\$1"-literal" \
2728 . nop \*[doc-Li-font]\c
2729 . el \{ .ie "\$1"-symbolic" \
2730 . nop \*[doc-Sy-font]\c
2732 . tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2736 . tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2740 .\" NS Ef user macro
2741 .\" NS end font mode
2744 .\" NS doc-macro-name
2746 .\" NS width register `Ef' set in doc-common
2749 . ds doc-macro-name Ef
2752 . tm Usage .Ef (does not take arguments) (#\n[.c])
2754 . nop \&\f[\n[doc-curr-font-for-Ef]]\s[\n[doc-curr-size-for-Ef]]
2758 .\" NS doc-keep-type global string
2759 .\" NS current keep type
2764 .\" NS Bk user macro
2768 .\" NS doc-macro-name, doc-keep-type
2770 .\" NS width register `Bk' set in doc-common
2775 . ds doc-macro-name Bk
2778 . if !"\*[doc-keep-type]"" \
2779 . tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2781 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2784 . doc-set-hard-space
2786 . tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2789 . ds doc-keep-type \$1
2792 . tm Usage: .Bk [-lines | -words] (#\n[.c])
2796 .\" NS Ek user macro
2800 .\" NS doc-macro-name
2802 .\" NS width register `Ek' set in doc-common
2805 . ds doc-macro-name Ek
2808 . tm Usage .Ek (does not take arguments) (#\n[.c])
2810 . ie "\*[doc-keep-type]"-words" \
2811 . doc-set-soft-space
2813 . tm .Bk -lines: Not implemented yet. (#\n[.c])
2818 .\" NS doc-display-depth global register
2819 .\" NS display level
2821 .nr doc-display-depth 0
2824 .\" NS doc-is-compact global register (bool)
2825 .\" NS set if the `compact' keyword is given
2827 .nr doc-is-compact 0
2830 .\" NS doc-display-type-stackXXX global string
2831 .\" NS the display type stack
2833 .\" NS limit: doc-display-depth
2835 .ds doc-display-type-stack0
2838 .\" NS doc-display-indent-stackXXX global register
2839 .\" NS stack of display indentation values
2841 .\" NS limit: doc-display-depth
2843 .nr doc-display-indent-stack0 0
2846 .\" NS Bd user macro
2847 .\" NS begin display
2849 .\" NS width register `Bd' set in doc-common
2852 .\" NS doc-macro-name, doc-curr-font, doc-curr-size, doc-display-depth,
2853 .\" NS doc-is-compact, doc-display-type-stackXXX,
2854 .\" NS doc-display-indent-stackXXX
2856 .\" NS local variables:
2860 . ds doc-macro-name Bd
2863 . nr doc-is-compact 0
2865 . nr doc-display-depth +1
2867 . ie "\$1"-literal" \{\
2868 . ds doc-display-type-stack\n[doc-display-depth] literal
2869 . nr doc-curr-font \n[.f]
2870 . nr doc-curr-size \n[.s]
2873 . nop \*[doc-Li-font]\c
2880 . el \{ .ie "\$1"-filled" \{\
2881 . ds doc-display-type-stack\n[doc-display-depth] filled
2884 . el \{ .ie "\$1"-ragged" \{\
2885 . ds doc-display-type-stack\n[doc-display-depth] ragged
2888 . el \{ .ie "\$1"-unfilled" \{\
2889 . ds doc-display-type-stack\n[doc-display-depth] unfilled
2893 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2897 . \" have we seen an argument?
2898 . if \n[doc-reg-Bd] \{\
2900 . \" check other arguments
2902 . doc-do-Bd-args \$@
2905 . \" avoid warning about non-existent register
2906 . if !r doc-display-indent-stack\n[doc-display-depth] \
2907 . nr doc-display-indent-stack\n[doc-display-depth] 0
2909 . if \n[doc-display-indent-stack\n[doc-display-depth]] \
2910 ' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2912 . if !\n[doc-is-compact] \{\
2913 . if !\n[doc-in-synopsis-count] \{\
2914 . ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2915 . sp \n[doc-display-vertical]u
2917 ' sp \n[doc-display-vertical]u
2923 . nr doc-is-compact 0
2926 . tm1 "Usage: .Bd [-literal | -filled | -ragged | -unfilled]
2927 . tm1 " [-offset [string]] [-compact] (#\n[.c])
2932 .\" NS doc-do-Bd-args macro
2933 .\" NS resolve remaining .Bd arguments
2936 .\" NS doc-is-compact, doc-display-indent-stackXXX
2938 .\" NS local variables:
2939 .\" NS doc-str-ddBa, doc-reg-ddBa
2945 . ie "\$1"-offset" \{\
2946 . ds doc-str-ddBa "\$2
2950 . nr doc-display-indent-stack\n[doc-display-depth] 0
2951 . el \{ .ie "\$2"right" \
2952 . nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2953 . el \{ .ie "\$2"center" \
2954 . nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2955 . el \{ .ie "\$2"indent" \
2956 . nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2957 . el \{ .ie "\$2"indent-two" \
2958 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2963 . \" not a known keyword
2964 . if (\n[doc-reg-ddBa] == 1) \{\
2966 . \" test whether argument is a valid numeric expression
2968 . nr doc-display-indent-stack\n[doc-display-depth] \$2
2970 . doc-get-width "\$2"
2971 . ie (\n[doc-width] == 2) \{\
2972 . \" if the offset parameter is a macro, use the macro's
2973 . \" width as specified in doc-common
2974 . doc-get-arg-type "\$2"
2975 . ie (\n[doc-arg-type] == 1) \
2976 . nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2978 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2981 . nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2984 . el \{ .ie "\$1"-compact" \
2985 . nr doc-is-compact 1
2987 . tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2990 . if (\n[doc-reg-ddBa] < \n[.$]) \{\
2991 . \" have we seen `-offset' or `-compact'?
2992 . ie "\*[doc-str-ddBa]"" \{\
2994 . doc-do-Bd-args \$@
2998 . doc-do-Bd-args \$@
3003 .\" NS Ed user macro
3007 .\" NS doc-macro-name, doc-display-depth, doc-display-type-stackXXX,
3008 .\" NS doc-display-indent-stackXXX
3010 .\" NS width register `Ed' set in doc-common
3013 . ds doc-macro-name Ed
3017 . if !\n[doc-display-depth] \
3018 . tm mdoc warning: Extraneous .Ed (#\n[.c])
3020 . if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
3021 . ft \n[doc-curr-font]
3022 . ps \n[doc-curr-size]
3025 . in -\n[doc-display-indent-stack\n[doc-display-depth]]u
3027 . nr doc-display-indent-stack\n[doc-display-depth] 0
3028 . ds doc-display-type-stack\n[doc-display-depth]
3029 . nr doc-display-depth -1
3037 .\" NS doc-list-type-stackXXX global string
3038 .\" NS stack of list types
3040 .\" NS limit: doc-list-depth
3042 .ds doc-list-type-stack1
3045 .\" NS doc-list-indent-stackXXX global register
3046 .\" NS stack of list indentation values
3048 .\" NS limit: doc-list-depth
3050 .nr doc-list-indent-stack1 0
3053 .\" NS doc-have-indent global register (bool)
3054 .\" NS an indentation value is active
3056 .nr doc-have-indent 0
3059 .\" NS Bl user macro
3062 .\" NS width register `Bl' set in doc-common
3065 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3066 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX, doc-have-indent,
3067 .\" NS doc-have-diag-list, doc-num-columns, doc-list-depth
3069 .\" NS local variables:
3074 . ds doc-macro-name Bl
3075 . nr doc-list-depth +1
3078 . ie "\$1"-hang" \{\
3079 . ds doc-list-type-stack\n[doc-list-depth] hang-list
3080 . nr doc-list-indent-stack\n[doc-list-depth] 6n
3081 . nr doc-have-indent 1
3083 . el \{ .ie "\$1"-tag" \{\
3084 . ds doc-list-type-stack\n[doc-list-depth] tag-list
3085 . nr doc-have-indent 1
3087 . el \{ .ie "\$1"-item" \{\
3088 . ds doc-list-type-stack\n[doc-list-depth] item-list
3089 . nr doc-have-indent 1
3091 . el \{ .ie "\$1"-enum" \{\
3092 . ds doc-list-type-stack\n[doc-list-depth] enum-list
3093 . nr doc-list-indent-stack\n[doc-list-depth] 3n
3094 . nr doc-have-indent 1
3096 . el \{ .ie "\$1"-bullet" \{\
3097 . ds doc-list-type-stack\n[doc-list-depth] bullet-list
3098 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3099 . nr doc-have-indent 1
3101 . el \{ .ie "\$1"-dash" \{\
3102 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3103 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3104 . nr doc-have-indent 1
3106 . el \{ .ie "\$1"-hyphen" \{\
3107 . ds doc-list-type-stack\n[doc-list-depth] dash-list
3108 . nr doc-list-indent-stack\n[doc-list-depth] 2n
3109 . nr doc-have-indent 1
3111 . el \{ .ie "\$1"-inset" \{\
3112 . ds doc-list-type-stack\n[doc-list-depth] inset-list
3113 . nr doc-have-indent 1
3115 . el \{ .ie "\$1"-diag" \{\
3116 . ds doc-list-type-stack\n[doc-list-depth] diag-list
3117 . nr doc-have-diag-list 1
3119 . el \{ .ie "\$1"-ohang" \{\
3120 . ds doc-list-type-stack\n[doc-list-depth] ohang-list
3121 . nr doc-have-indent 1
3123 . el \{ .ie "\$1"-column" \
3124 . ds doc-list-type-stack\n[doc-list-depth] column-list
3126 . tm mdoc warning: Unknown list type `\$1' in .Bl request
3129 . \}\}\}\}\}\}\}\}\}\}\}
3131 . \" we have seen a list type
3132 . ie \n[doc-arg-ptr] \{\
3135 . \" fill argument vector
3137 . while (\n[doc-reg-Bl] <= \n[.$]) \{\
3138 . ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3142 . doc-increment-list-stack
3145 . nr doc-arg-limit \n[.$]
3149 . \" initialize column list
3150 . if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3151 . doc-set-column-tab \n[doc-num-columns]
3152 . nr doc-list-indent-stack\n[doc-list-depth] 0
3153 ' in -\n[doc-column-indent-width]u
3154 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3155 . sp \n[doc-display-vertical]u
3158 . nr doc-num-columns 0
3170 .\" NS doc-Bl-usage macro
3173 . tm1 "Usage: .Bl [-hang | -ohang | -tag | -diag | -inset]
3174 . tm1 " [-width [string]] [-offset [string]] [-compact]
3175 . tm1 " .Bl [-column] [-offset [string]] [string1] [string2] ...
3176 . tm1 " .Bl [-item | -enum | -bullet | -hyphen | -dash]
3177 . tm1 " [-offset [string]] [-compact] (#\n[.c])
3181 .\" NS doc-have-tag-width global macro
3182 .\" NS set if a tag width has been explicitly given
3184 .nr doc-have-tag-width 0
3187 .\" NS doc-do-Bl-args macro
3188 .\" NS resolve remaining .Bl arguments
3191 .\" NS doc-arg-ptr, doc-argXXX, doc-list-indent-stackXXX, doc-num-columns,
3192 .\" NS doc-compact-list-stackXXX, doc-have-tag-width,
3193 .\" NS doc-tag-width-stackXXX, doc-list-offset-stackXXX
3195 .\" NS local variables:
3196 .\" NS doc-str-dBla, doc-reg-dBla
3200 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
3203 . ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3204 . nr doc-compact-list-stack\n[doc-list-depth] 1
3205 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3207 . \" XXX: this code should be modified to handle nested lists
3209 . nr doc-have-tag-width 1
3210 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3211 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3213 . \" test whether argument is a valid numeric expression
3214 . ie \B
\a\*[doc-str-dBla]
\a \
3215 . nr doc-list-indent-stack\n[doc-list-depth] \*[doc-str-dBla]
3217 . doc-get-arg-width \n[doc-arg-ptr]
3218 . ie (\n[doc-width] == 2) \{\
3219 . \" if the width parameter is a macro, use the macro's
3220 . \" width as specified in doc-common
3221 . doc-get-arg-type \*[doc-str-dBla]
3222 . ie (\n[doc-arg-type] == 1) \
3223 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3225 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3228 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3230 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
3232 . \" XXX: this code should be modified to handle nested lists
3234 . nr doc-have-tag-width 1
3235 . ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3237 . ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3238 . substring doc-str-dBla 1 2
3239 . if
\a.
\a\*[doc-str-dBla]
\a \{\
3240 . doc-save-global-vars
3242 . doc-dry-execute "\*[doc-arg\n[doc-arg-ptr]]"
3243 . \" save doc-out-string
3244 . ds doc-str-dBla "\*[doc-out-string]
3245 . doc-restore-global-vars
3246 . doc-get-width "\*[doc-str-dBla]"
3248 . nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3250 . el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3253 . ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3254 . nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3256 . ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3258 . ie \B
\a\*[doc-str-dBla]
\a \
3259 . nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3261 . doc-get-arg-width \n[doc-arg-ptr]
3262 . ie (\n[doc-width] == 2) \{\
3263 . doc-get-arg-type \*[doc-str-dBla]
3264 . ie (\n[doc-arg-type] == 1) \
3265 . nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3267 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3270 . nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3276 . \" not a known keyword, so it specifies the width of the next column
3277 . \" (if it is a column list)
3278 . if !\n[doc-reg-dBla] \{\
3279 . ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3280 . nr doc-num-columns +1
3281 . ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3284 . tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3285 . tm1 " in .Bl request (#\n[.c])
3288 . if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3294 .\" NS doc-save-global-vars macro
3295 .\" NS save all global variables
3297 .\" NS local variables:
3300 .de doc-save-global-vars
3301 . nr doc-debug-saved \n[doc-debug]
3302 . ds doc-macro-name-saved "\*[doc-macro-name]
3303 . nr doc-arg-limit-saved \n[doc-arg-limit]
3304 . nr doc-num-args-saved \n[doc-num-args]
3305 . nr doc-arg-ptr-saved \n[doc-arg-ptr]
3308 . while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3309 . ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3310 . nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3311 . ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3312 . nr doc-reg-dsgv +1
3315 . ds doc-out-string-saved "\*[doc-out-string]
3316 . ds doc-curr-space-saved "\*[doc-curr-space]
3317 . nr doc-curr-font-saved \n[doc-curr-font]
3318 . nr doc-curr-size-saved \n[doc-curr-size]
3319 . nr doc-in-synopsis-count-saved \n[doc-in-synopsis-count]
3320 . nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3321 . nr doc-have-decl-saved \n[doc-have-decl]
3322 . nr doc-have-var-saved \n[doc-have-var]
3323 . ds doc-command-name-saved "\*[doc-command-name]
3324 . ds doc-quote-left-saved "\*[doc-quote-left]
3325 . ds doc-quote-right-saved "\*[doc-quote-right]
3326 . nr doc-nesting-level-saved \n[doc-nesting-level]
3327 . nr doc-no-space-saved \n[doc-no-space]
3328 . nr doc-is-opening-saved \n[doc-is-opening]
3329 . nr doc-have-append-saved \n[doc-have-append]
3330 . nr doc-in-list-saved \n[doc-in-list]
3331 . ds doc-space-saved "\*[doc-space]
3332 . nr doc-space-mode-saved \n[doc-space-mode]
3333 . nr doc-curr-font-for-Ef-saved \n[doc-curr-font-for-Ef]
3334 . nr doc-curr-size-for-Ef-saved \n[doc-curr-size-for-Ef]
3335 . ds doc-keep-type-saved "\*[doc-keep-type]
3336 . nr doc-display-depth-saved \n[doc-display-depth]
3337 . nr doc-is-compact-saved \n[doc-is-compact]
3340 . while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3341 . ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3342 . nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3343 . nr doc-reg-dsgv +1
3346 . nr doc-list-depth-saved \n[doc-list-depth]
3349 . while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3350 . ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3351 . nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3352 . nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3353 . ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3354 . nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3355 . nr doc-reg-dsgv +1
3358 . nr doc-have-indent-saved \n[doc-have-indent]
3359 . nr doc-have-tag-width-saved \n[doc-have-tag-width]
3360 . nr doc-no-printing-saved \n[doc-no-printing]
3361 . ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3362 . nr doc-curr-type-saved \n[doc-curr-type]
3363 . ds doc-curr-arg-saved "\*[doc-curr-arg]
3364 . nr doc-enum-list-count-saved \n[doc-enum-list-count]
3365 . nr doc-have-diag-list-saved \n[doc-have-diag-list]
3366 . nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3367 . nr doc-num-columns-saved \n[doc-num-columns]
3368 . nr doc-next-list-depth-saved \n[doc-next-list-depth]
3369 . nr doc-column-indent-width-saved \n[doc-column-indent-width]
3370 . nr doc-is-func-saved \n[doc-is-func]
3371 . nr doc-have-old-func-saved \n[doc-have-old-func]
3372 . nr doc-func-arg-count-saved \n[doc-func-arg-count]
3373 . ds doc-func-arg-saved "\*[doc-func-arg]
3374 . nr doc-num-func-args-saved \n[doc-num-func-args]
3375 . nr doc-func-args-processed-saved \n[doc-func-args-processed]
3376 . nr doc-have-func-saved \n[doc-have-func]
3377 . nr doc-is-reference-saved \n[doc-is-reference]
3378 . nr doc-reference-count-saved \n[doc-reference-count]
3379 . ds doc-reference-string-name-saved "\*[doc-reference-string-name]
3380 . nr doc-authors-processed-saved \n[doc-authors-processed]
3381 . nr doc-author-count-saved \n[doc-author-count]
3384 . while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3385 . ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3386 . nr doc-reg-dsgv +1
3389 . nr doc-book-count-saved \n[doc-book-count]
3390 . ds doc-book-name-saved "\*[doc-book-name]
3391 . nr doc-date-count-saved \n[doc-date-count]
3392 . ds doc-date-saved "\*[doc-date]
3393 . nr doc-publisher-count-saved \n[doc-publisher-count]
3394 . ds doc-publisher-name-saved "\*[doc-publisher-name]
3395 . nr doc-journal-count-saved \n[doc-journal-count]
3396 . ds doc-journal-name-saved "\*[doc-journal-name]
3397 . nr doc-issue-count-saved \n[doc-issue-count]
3398 . ds doc-issue-name-saved "\*[doc-issue-name]
3399 . nr doc-optional-count-saved \n[doc-optional-count]
3400 . ds doc-optional-string-saved "\*[doc-optional-string]
3401 . nr doc-page-number-count-saved \n[doc-page-number-count]
3402 . ds doc-page-number-string-saved "\*[doc-page-number-string]
3403 . nr doc-corporate-count-saved \n[doc-corporate-count]
3404 . ds doc-corporate-name-saved "\*[doc-corporate-name]
3405 . nr doc-report-count-saved \n[doc-report-count]
3406 . ds doc-report-name-saved "\*[doc-report-name]
3407 . nr doc-reference-title-count-saved \n[doc-reference-title-count]
3408 . ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3409 . nr doc-volume-count-saved \n[doc-volume-count]
3410 . ds doc-volume-name-saved "\*[doc-volume-name]
3411 . nr doc-have-author-saved \n[doc-have-author]
3413 . ds doc-document-title-saved "\*[doc-document-title]
3414 . ds doc-volume-saved "\*[doc-volume]
3415 . ds doc-section-saved "\*[doc-section]
3416 . ds doc-operating-system-saved "\*[doc-operating-system]
3417 . ds doc-date-string-saved "\*[doc-date-string]
3418 . nr doc-header-space-saved \n[doc-header-space]
3419 . nr doc-footer-space-saved \n[doc-footer-space]
3420 . nr doc-display-vertical-saved \n[doc-display-vertical]
3421 . ds doc-header-string-saved "\*[doc-header-string]
3422 . nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3423 . nr doc-in-files-section-saved \n[doc-in-files-section]
3424 . nr doc-in-authors-section-saved \n[doc-in-authors-section]
3428 .\" NS doc-restore-global-vars macro
3429 .\" NS restore all global variables
3431 .\" NS local variables:
3434 .de doc-restore-global-vars
3435 . nr doc-debug \n[doc-debug-saved]
3436 . ds doc-macro-name "\*[doc-macro-name-saved]
3437 . nr doc-arg-limit \n[doc-arg-limit-saved]
3438 . nr doc-num-args \n[doc-num-args-saved]
3439 . nr doc-arg-ptr \n[doc-arg-ptr-saved]
3442 . while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3443 . ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3444 . nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3445 . ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3446 . nr doc-reg-drgv +1
3449 . ds doc-out-string "\*[doc-out-string-saved]
3450 . ds doc-curr-space "\*[doc-curr-space-saved]
3451 . nr doc-curr-font \n[doc-curr-font-saved]
3452 . nr doc-curr-size \n[doc-curr-size-saved]
3453 . nr doc-in-synopsis-count \n[doc-in-synopsis-count-saved]
3454 . nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3455 . nr doc-have-decl \n[doc-have-decl-saved]
3456 . nr doc-have-var \n[doc-have-var-saved]
3457 . ds doc-command-name "\*[doc-command-name-saved]
3458 . ds doc-quote-left "\*[doc-quote-left-saved]
3459 . ds doc-quote-right "\*[doc-quote-right-saved]
3460 . nr doc-nesting-level \n[doc-nesting-level-saved]
3461 . nr doc-no-space \n[doc-no-space-saved]
3462 . nr doc-is-opening \n[doc-is-opening-saved]
3463 . nr doc-have-append \n[doc-have-append-saved]
3464 . nr doc-in-list \n[doc-in-list-saved]
3465 . ds doc-space "\*[doc-space-saved]
3466 . nr doc-space-mode \n[doc-space-mode-saved]
3467 . nr doc-curr-font-for-Ef \n[doc-curr-font-for-Ef-saved]
3468 . nr doc-curr-size-for-Ef \n[doc-curr-size-for-Ef-saved]
3469 . ds doc-keep-type "\*[doc-keep-type-saved]
3470 . nr doc-display-depth \n[doc-display-depth-saved]
3471 . nr doc-is-compact \n[doc-is-compact-saved]
3474 . while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3475 . ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3476 . nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3477 . nr doc-reg-drgv +1
3480 . nr doc-list-depth \n[doc-list-depth-saved]
3483 . while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3484 . ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3485 . nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3486 . nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3487 . ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3488 . nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3489 . nr doc-reg-drgv +1
3492 . nr doc-have-indent \n[doc-have-indent-saved]
3493 . nr doc-have-tag-width \n[doc-have-tag-width-saved]
3494 . nr doc-no-printing \n[doc-no-printing-saved]
3495 . ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3496 . nr doc-curr-type \n[doc-curr-type-saved]
3497 . ds doc-curr-arg "\*[doc-curr-arg-saved]
3498 . nr doc-enum-list-count \n[doc-enum-list-count-saved]
3499 . nr doc-have-diag-list \n[doc-have-diag-list-saved]
3500 . nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3501 . nr doc-num-columns \n[doc-num-columns-saved]
3502 . nr doc-next-list-depth \n[doc-next-list-depth-saved]
3503 . nr doc-column-indent-width \n[doc-column-indent-width-saved]
3504 . nr doc-is-func \n[doc-is-func-saved]
3505 . nr doc-have-old-func \n[doc-have-old-func-saved]
3506 . nr doc-func-arg-count \n[doc-func-arg-count-saved]
3507 . ds doc-func-arg "\*[doc-func-arg-saved]
3508 . nr doc-num-func-args \n[doc-num-func-args-saved]
3509 . nr doc-func-args-processed \n[doc-func-args-processed-saved]
3510 . nr doc-have-func \n[doc-have-func-saved]
3511 . nr doc-is-reference \n[doc-is-reference-saved]
3512 . nr doc-reference-count \n[doc-reference-count-saved]
3513 . ds doc-reference-string-name "\*[doc-reference-string-name-saved]
3514 . nr doc-authors-processed \n[doc-authors-processed-saved]
3515 . nr doc-author-count \n[doc-author-count-saved]
3518 . while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3519 . ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3520 . nr doc-reg-drgv +1
3523 . nr doc-book-count \n[doc-book-count-saved]
3524 . ds doc-book-name "\*[doc-book-name-saved]
3525 . nr doc-date-count \n[doc-date-count-saved]
3526 . ds doc-date "\*[doc-date-saved]
3527 . nr doc-publisher-count \n[doc-publisher-count-saved]
3528 . ds doc-publisher-name "\*[doc-publisher-name-saved]
3529 . nr doc-journal-count \n[doc-journal-count-saved]
3530 . ds doc-journal-name "\*[doc-journal-name-saved]
3531 . nr doc-issue-count \n[doc-issue-count-saved]
3532 . ds doc-issue-name "\*[doc-issue-name-saved]
3533 . nr doc-optional-count \n[doc-optional-count-saved]
3534 . ds doc-optional-string "\*[doc-optional-string-saved]
3535 . nr doc-page-number-count \n[doc-page-number-count-saved]
3536 . ds doc-page-number-string "\*[doc-page-number-string-saved]
3537 . nr doc-corporate-count \n[doc-corporate-count-saved]
3538 . ds doc-corporate-name "\*[doc-corporate-name-saved]
3539 . nr doc-report-count \n[doc-report-count-saved]
3540 . ds doc-report-name "\*[doc-report-name-saved]
3541 . nr doc-reference-title-count \n[doc-reference-title-count-saved]
3542 . ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3543 . nr doc-volume-count \n[doc-volume-count-saved]
3544 . ds doc-volume-name "\*[doc-volume-name-saved]
3545 . nr doc-have-author \n[doc-have-author-saved]
3547 . ds doc-document-title "\*[doc-document-title-saved]
3548 . ds doc-volume "\*[doc-volume-saved]
3549 . ds doc-section "\*[doc-section-saved]
3550 . ds doc-operating-system "\*[doc-operating-system-saved]
3551 . ds doc-date-string "\*[doc-date-string-saved]
3552 . nr doc-header-space \n[doc-header-space-saved]
3553 . nr doc-footer-space \n[doc-footer-space-saved]
3554 . nr doc-display-vertical \n[doc-display-vertical-saved]
3555 . ds doc-header-string "\*[doc-header-string-saved]
3556 . nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3557 . nr doc-in-files-section \n[doc-in-files-section-saved]
3558 . nr doc-in-authors-section \n[doc-in-authors-section-saved]
3562 .\" NS doc-no-printing global register (bool)
3563 .\" NS set if output is suppressed
3565 .nr doc-no-printing 0
3568 .\" NS doc-dry-execute macro
3569 .\" NS execute a string (splitting one arg into multiple args) without
3570 .\" NS output; this command must be surrounded by `doc-save-global-args'
3571 .\" NS and `doc-restore-global-args'
3575 . nr doc-no-printing 1
3578 . nop \*[doc-str-de] \$@
3579 . nr doc-no-printing 0
3583 .\" NS El user macro
3587 .\" NS doc-macro-name, doc-have-diag-list, doc-enum-list-count,
3588 .\" NS doc-list-depth
3590 .\" NS local variables:
3593 .\" NS width register `El' set in doc-common
3597 . tm Usage: .El (does not take arguments) (#\n[.c])
3599 . ds doc-macro-name El
3600 . ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3602 . ie "\*[doc-str-El]"enum-list" \{\
3603 . nr doc-enum-list-count 0
3606 . el \{ .ie "\*[doc-str-El]"diag-list" \{\
3607 . nr doc-have-diag-list 0
3610 . el \{ .ie "\*[doc-str-El]"column-list" \
3611 . doc-end-column-list
3612 . el \{ .ie "\*[doc-str-El]"item-list" \
3614 . el \{ .ie "\*[doc-str-El]"ohang-list" \
3616 . el \{ .ie "\*[doc-str-El]"inset-list" \
3627 .\" NS doc-saved-Pa-font global string
3628 .\" NS saved doc-Pa-font string for section FILES (no underline if
3631 .ds doc-saved-Pa-font
3634 .\" NS doc-curr-type global register
3635 .\" NS current argument type
3640 .\" NS doc-curr-arg global string
3641 .\" NS current argument
3646 .\" NS It user macro
3650 .\" NS doc-macro-name, doc-num-args, doc-arg-ptr, doc-argXXX,
3651 .\" NS doc-out-string, doc-in-list, doc-saved-Pa-font, doc-curr-type,
3654 .\" NS width register `It' set in doc-common
3656 .\" NS local variables:
3657 .\" NS doc-str-It, doc-reg-It
3660 . ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3662 . if "\*[doc-str-It]"" \
3663 . tm mdoc error: .It without preceding .Bl (#\n[.c])
3665 . if \n[doc-nesting-level] \{\
3666 . tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3675 . ds doc-macro-name It
3678 . \" fill argument vector
3680 . while (\n[doc-reg-It] <= \n[.$]) \{\
3681 . ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3685 . nr doc-num-args \n[.$]
3689 . ie "\*[doc-str-It]"diag-list" \{\
3690 . doc-remaining-args
3695 . ie "\*[doc-str-It]"column-list" \{\
3700 . el \{ .ie "\*[doc-str-It]"tag-list" \
3702 . el \{ .ie "\*[doc-str-It]"hang-list" \
3704 . el \{ .ie "\*[doc-str-It]"ohang-list" \
3706 . el \{ .if "\*[doc-str-It]"inset-list" \
3710 . if \n[doc-reg-It] \{\
3711 . ie (\n[doc-reg-It] == 2) \{\
3712 . \" handle list types with arguments
3713 . doc-parse-arg-vector
3717 . nr doc-curr-type \n[doc-type1]
3718 . ds doc-curr-arg "\*[doc-arg1]
3720 . if \n[doc-in-files-section] \{\
3721 . ds doc-saved-Pa-font "\*[doc-Pa-font]
3723 . ds doc-Pa-font "\*[doc-No-font]
3726 . ie (\n[doc-type1] == 1) \
3733 . \" the previous call of `.No' can contain calls to opening requests
3734 . \" like `.Ac'; we then defer the call of `doc-xxx-list'
3735 . if !\n[doc-nesting-level] \
3736 . doc-\*[doc-str-It]
3739 . tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3740 . tm1 " don't take arguments (#\n[.c])
3741 . doc-\*[doc-str-It]
3744 . doc-\*[doc-str-It]
3748 .\" NS doc-inset-list macro
3749 .\" NS .It item of list-type inset
3752 .\" NS doc-out-string, doc-in-list
3755 . doc-set-vertical-and-indent 0
3757 . nop \&\*[doc-out-string]
3766 .\" NS doc-hang-list macro
3767 .\" NS .It item of list-type hanging tag (as opposed to tagged)
3770 .\" NS doc-out-string, doc-in-list
3772 .\" NS local variables:
3776 . doc-set-vertical-and-indent 1
3777 . nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3778 . ti -\n[doc-reg-dhl]u
3780 . ie (\w
\a\*[doc-out-string]
\au >= \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3781 . nop \&\*[doc-out-string]
3783 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dhl]u'\c
3792 .\" NS doc-ohang-list macro
3793 .\" NS .It item of list-type overhanging tag
3796 .\" NS doc-out-string, doc-in-list
3799 . doc-set-vertical-and-indent 0
3800 . nop \&\*[doc-out-string]
3810 .\" NS doc-item-list macro
3811 .\" NS .It item of list-type [empty tag]
3814 . doc-set-vertical-and-indent 0
3822 .\" NS doc-enum-list-count global register
3823 .\" NS contains current enum count value
3825 .nr doc-enum-list-count 0
3828 .\" NS doc-enum-list macro
3829 .\" NS enumerated list
3832 .\" NS doc-out-string, doc-in-list, doc-enum-list-count
3836 . nr doc-enum-list-count +1
3837 . ds doc-out-string \n[doc-enum-list-count].
3842 .\" NS doc-bullet-list macro
3843 .\" NS bullet paragraph list
3846 .\" NS doc-out-string, doc-in-list
3850 . ds doc-out-string "\*[doc-Sy-font]\[bu]\f[P]
3855 .\" NS doc-dash-list macro
3856 .\" NS hyphen paragraph list (sub bullet list)
3859 .\" NS doc-out-string, doc-in-list
3863 . ds doc-out-string "\*[doc-Sy-font]\-\f[P]
3868 .\" NS doc-do-list macro
3869 .\" NS .It item of list-type enum/bullet/hyphen
3871 .als doc-do-list doc-hang-list
3874 .\" NS doc-have-diag-list global register (bool)
3875 .\" NS set if last item was a diag list
3877 .\" XXX: this should be modified to handle nested lists of any type
3879 .nr doc-have-diag-list 0
3882 .\" NS doc-diag-list-input-line-count global register
3883 .\" NS saved line number to be checked in next diag-list item
3885 .nr doc-diag-list-input-line-count 0
3888 .\" NS doc-diag-list macro
3889 .\" NS .It item of list-type diagnostic-message
3892 .\" NS doc-out-string, doc-curr-font, doc-curr-size,
3893 .\" NS doc-diag-list-input-line-count
3896 . nr doc-curr-font \n[.f]
3897 . nr doc-curr-size \n[.s]
3899 . ie \n[doc-have-diag-list] \{\
3900 . ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \
3907 . nr doc-diag-list-input-line-count \n[.c]
3909 . nop \*[doc-Sy-font]\*[doc-out-string]\c
3910 . nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\*[doc-digit-string]\c
3918 .\" NS doc-tag-list macro
3919 .\" NS .It item of list-type `tag'
3922 .\" NS doc-out-string, doc-in-list
3924 .\" NS local variables:
3928 . if !\n[doc-have-tag-width] \
3930 . doc-set-vertical-and-indent 1
3931 . nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3932 . ti -\n[doc-reg-dtl]u
3934 . ie (\w
\a\*[doc-out-string]
\au > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3935 . nop \&\*[doc-out-string]
3939 . nop \&\*[doc-out-string]\h'|\n[doc-reg-dtl]u'\c
3941 . if \n[doc-in-files-section] \
3943 . ds doc-Pa-font "\*[doc-saved-Pa-font]
3952 .\" NS doc-get-tag-width macro
3953 .\" NS resolve unknown tag width (.Bl [inset | tag] only)
3956 .\" NS doc-list-indent-stackXXX, doc-have-indent, doc-tag-width-stackXXX
3959 .\" NS doc-curr-type, doc-curr-arg
3961 .de doc-get-tag-width
3962 . if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3963 . ie (\n[doc-curr-type] == 1) \{\
3964 . ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
3965 . nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
3968 . ds doc-tag-width-stack\n[doc-list-depth] No
3969 . nr doc-list-indent-stack\n[doc-list-depth] \n[No]
3971 . nr doc-have-tag-width 1
3976 .\" NS doc-set-vertical-and-indent macro
3977 .\" NS set up vertical spacing (if not compact) and indentation (with
3978 .\" NS offset if argument is non-zero)
3981 .\" NS doc-have-indent, doc-have-tag-width
3983 .de doc-set-vertical-and-indent
3984 . ie \n[doc-have-indent] \{\
3985 . nr doc-have-indent 0
3986 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3987 . sp \n[doc-display-vertical]u
3988 . in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3990 . in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3993 . if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3994 . sp \n[doc-display-vertical]u
4002 .\" NS doc-list-depth global register
4003 .\" NS list type stack counter
4005 .nr doc-list-depth 0
4008 .\" NS doc-num-columns global register
4009 .\" NS number of columns
4011 .nr doc-num-columns 0
4014 .\" NS doc-compact-list-stackXXX global register (bool)
4015 .\" NS stack of flags to indicate whether a particular list is compact
4017 .\" NS limit: doc-list-depth
4019 .nr doc-compact-list-stack1 0
4022 .\" NS doc-tag-width-stackXXX global string
4023 .\" NS stack of strings indicating how to set up current element of
4024 .\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4025 .\" NS directly; if it is a macro name, use the macro's width value;
4026 .\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
4028 .\" NS limit: doc-list-depth
4030 .ds doc-tag-width-stack0
4031 .ds doc-tag-width-stack1
4034 .\" NS doc-list-offset-stackXXX global register
4035 .\" NS stack of list offsets
4037 .\" NS limit: doc-list-depth
4039 .nr doc-list-offset-stack1 0
4042 .\" NS doc-end-list macro
4043 .\" NS list end function; resets indentation (and offset if argument is
4047 .\" NS doc-list-offset-stackXXX, doc-list-depth
4051 ' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4053 ' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4054 . nr doc-list-offset-stack\n[doc-list-depth] 0
4056 . if (\n[doc-list-depth] <= 0) \
4057 . tm mdoc warning: extraneous .El call (#\n[.c])
4059 . doc-decrement-list-stack
4060 . nr doc-list-depth -1
4061 . doc-increment-list-stack
4063 . nr doc-have-tag-width 0
4067 .\" NS doc-next-list-depth global register
4068 .\" NS next possible doc-list-depth value
4070 .nr doc-next-list-depth 1
4073 .\" NS doc-increment-list-stack macro
4074 .\" NS set up next block for list
4077 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4078 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4079 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4081 .de doc-increment-list-stack
4082 . nr doc-next-list-depth (\n[doc-list-depth] + 1)
4083 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4084 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4085 . ds doc-tag-width-stack\n[doc-next-list-depth] \*[doc-tag-width-stack\n[doc-list-depth]]
4086 . ds doc-list-type-stack\n[doc-next-list-depth]
4087 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4091 .\" NS doc-decrement-list-stack macro
4092 .\" NS decrement stack
4095 .\" NS doc-list-type-stackXXX, doc-list-indent-stackXXX,
4096 .\" NS doc-compact-list-stackXXX, doc-tag-width-stackXXX,
4097 .\" NS doc-list-offset-stackXXX, doc-next-list-depth
4099 .de doc-decrement-list-stack
4100 . ds doc-list-type-stack\n[doc-next-list-depth]
4101 . nr doc-list-indent-stack\n[doc-next-list-depth] 0
4102 . nr doc-list-offset-stack\n[doc-next-list-depth] 0
4103 . ds doc-tag-width-stack\n[doc-next-list-depth]
4104 . nr doc-compact-list-stack\n[doc-next-list-depth] 0
4105 . nr doc-next-list-depth -1
4109 .\" NS Xr user macro
4110 .\" NS cross reference (man page only)
4113 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string
4115 .\" NS width register `Xr' set in doc-common
4118 . if !\n[doc-arg-limit] \{\
4120 . ds doc-macro-name Xr
4121 . doc-parse-args \$@
4124 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4128 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4129 . ie (\n[doc-type\n[doc-arg-ptr]] == 1) \
4130 . tm Usage: .Xr manpage_name [section#] \*[doc-punct-chars] (#\n[.c])
4132 . ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4133 . as doc-out-string \*[doc-Xr-font]
4134 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4137 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4138 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4139 . as doc-out-string \&\*[lp]\*[doc-arg\n[doc-arg-ptr]]\*[rp]
4142 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4143 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4145 . doc-print-and-reset
4148 . doc-do-xref-\n[doc-type\n[doc-arg-ptr]]
4153 .\" NS Sx user macro
4154 .\" NS cross section reference
4157 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4158 .\" NS doc-curr-size
4160 .\" NS width register `Sx' set in doc-common
4163 . if !\n[doc-arg-limit] \{\
4165 . ds doc-macro-name Sx
4166 . doc-parse-args \$@
4169 . tm Usage: .Sx section_header \*[doc-punct-chars] (#\n[.c])
4173 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4174 . as doc-out-string \*[doc-Sx-font]
4175 . nr doc-curr-font \n[.f]
4176 . nr doc-curr-size \n[.s]
4177 . doc-print-recursive
4182 .\" NS doc-end-column-list macro
4183 .\" NS column-list end-list
4186 .\" NS doc-list-depth
4188 .de doc-end-column-list
4189 ' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4192 . doc-decrement-list-stack
4193 . nr doc-list-depth -1
4194 . doc-increment-list-stack
4198 .\" NS doc-column-indent-width global register
4199 .\" NS holds the indent width for a column list
4201 .nr doc-column-indent-width 0
4204 .\" NS doc-set-column-tab macro
4205 .\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
4207 .\" NS local variables:
4208 .\" NS doc-str-dsct, doc-str-dsct1, doc-reg-dsct, doc-column-indent-width
4210 .de doc-set-column-tab
4213 . nr doc-column-indent-width 0
4216 . ds doc-str-dsct1 " \"
4219 . ds doc-str-dsct1 " \"
4221 . \" XXX: this is packed abnormally close -- intercolumn width
4222 . \" should be configurable
4223 . ds doc-str-dsct1 " \"
4226 . while (\n[doc-reg-dsct] <= \$1) \{\
4227 . as doc-str-dsct " +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4228 . nr doc-column-indent-width +\w
\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]
\au
4229 . nr doc-reg-dsct +1
4232 . ta \*[doc-str-dsct]
4233 ' in +(\n[doc-column-indent-width]u + \n[doc-list-offset-stack\n[doc-list-depth]]u)
4237 .\" NS doc-column-list macro
4241 .\" NS doc-arg-ptr, doc-spaceXXX, doc-list-indent-stackXXX
4243 .\" NS local variables:
4247 . if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4248 . nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4251 ' in +\n[doc-column-indent-width]u
4253 . ti -\n[doc-column-indent-width]u
4255 . doc-parse-arg-vector
4258 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4259 . if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4260 . nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4261 . ds doc-space\n[doc-reg-dcl]
4263 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4266 . tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4270 .\" NS Ta user macro
4271 .\" NS append tab (\t)
4274 .\" NS doc-arg-ptr, doc-out-string
4276 .\" NS width register `Ta' set in doc-common
4279 . ie \n[doc-arg-limit] \{\
4281 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4282 . as doc-out-string \t
4283 . doc-do-\n[doc-type\n[doc-arg-ptr]]
4286 . as doc-out-string \t\c
4287 . doc-print-and-reset
4290 . tm1 "Usage: Ta must follow column entry: e.g. (#\n[.c])
4291 . tm1 " .It column_string [Ta [column_string ...]]
4296 .\" NS Dl user macro
4297 .\" NS display (one line) literal
4300 .\" NS doc-macro-name
4302 .\" NS width register `Dl' set in doc-common
4306 . in +\n[doc-display-indent]u
4308 . ie \n[doc-arg-limit] \
4309 . tm Usage: .Dl not callable by other macros (#\n[.c])
4312 . ds doc-macro-name Dl
4313 . doc-parse-args \$@
4317 . tm Usage: .Dl argument ... (#\n[.c])
4320 . in -\n[doc-display-indent]u
4324 .\" NS D1 user macro
4325 .\" NS display (one line)
4328 .\" NS doc-macro-name, doc-arg-ptr
4330 .\" NS width register `D1' set in doc-common
4334 . in +\n[doc-display-indent]u
4336 . ie \n[doc-arg-limit] \
4337 . tm Usage: .D1 not callable by other macros (#\n[.c])
4340 . ds doc-macro-name D1
4341 . doc-parse-args \$@
4345 . tm Usage: .D1 argument ... (#\n[.c])
4348 . in -\n[doc-display-indent]u
4352 .\" NS Ex user macro
4356 . tm mdoc error: .Ex defunct, use .D1: \$@ (#\n[.c])
4360 .\" NS Vt user macro
4361 .\" NS variable type (for forcing old style variable declarations);
4362 .\" NS this is not done in the same manner as .Ot for fortrash --
4363 .\" NS clean up later
4366 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4369 .\" NS width register `Vt' set in doc-common
4372 . \" if a function declaration was the last thing given, want vertical space
4373 . if \n[doc-have-decl] \{\
4375 . nr doc-have-decl 0
4378 . \" if a subroutine was the last thing given, want vertical space
4379 . if \n[doc-have-func] \{\
4380 . ie !\n[doc-have-var] \
4388 . nr doc-curr-font \n[.f]
4389 . nr doc-curr-size \n[.s]
4391 . nop \*[doc-Ft-font]\$*
4393 . ie \n[doc-have-old-func] \
4394 . nop \&\*[doc-soft-space]
4398 . ft \n[doc-curr-font]
4399 . ps \n[doc-curr-size]
4403 .\" NS doc-is-func global register (bool)
4404 .\" NS set if subroutine (in synopsis only) (fortran only)
4409 .\" NS Ft user macro
4410 .\" NS function type
4413 .\" NS doc-curr-font, doc-curr-size, doc-have-decl,
4414 .\" NS doc-have-var, doc-is-func
4416 .\" NS width register `Ft' set in doc-common
4419 . if \n[doc-in-synopsis-count] \{\
4420 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4422 . nr doc-have-decl 0
4426 . if \n[doc-have-var] \{\
4434 . nr doc-curr-font \n[.f]
4435 . nr doc-curr-size \n[.s]
4437 . nop \*[doc-Ft-font]\$*
4439 . ft \n[doc-curr-font]
4440 . ps \n[doc-curr-size]
4444 .\" NS doc-have-old-func global register (bool)
4445 .\" NS set if `Ot' has been called
4447 .nr doc-have-old-func 0
4450 .\" NS Ot user macro
4451 .\" NS old function type (fortran -- no newline)
4454 .\" NS doc-out-string, doc-have-decl, doc-have-var,
4455 .\" NS doc-is-func, doc-have-old-func
4457 .\" NS width register `Ot' set in doc-common
4460 . nr doc-have-old-func 1
4462 . if \n[doc-in-synopsis-count] \{\
4463 . if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4465 . nr doc-have-decl 0
4469 . if \n[doc-have-var] \{\
4478 . as doc-out-string \*[doc-Ft-font]\$*
4479 . as doc-out-string \ \f[P]
4483 .\" NS Fa user macro
4484 .\" NS function arguments
4487 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4488 .\" NS doc-curr-size
4490 .\" NS width register `Fa' set in doc-common
4493 . if !\n[doc-arg-limit] \{\
4495 . ds doc-macro-name Fa
4496 . doc-parse-args \$@
4499 . tm Usage: .Fa function_arguments ... \*[doc-punct-chars] (#\n[.c])
4502 . ie \n[doc-func-arg-count] \
4506 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4507 . as doc-out-string \*[doc-Fa-font]
4508 . nr doc-curr-font \n[.f]
4509 . nr doc-curr-size \n[.s]
4510 . doc-print-recursive
4512 . if \n[doc-in-synopsis-count] \
4513 . if \n[doc-have-func] \
4519 .\" NS doc-func-arg-count global register
4520 .\" NS how many function arguments have been processed so far
4522 .nr doc-func-arg-count 0
4525 .\" NS doc-func-arg global string
4526 .\" NS work buffer for function name strings
4531 .\" NS doc-num-func-args global register
4532 .\" NS number of function arguments
4534 .nr doc-num-func-args 0
4537 .\" NS doc-func-args-processed global register
4538 .\" NS function arguments processed so far
4540 .nr doc-func-args-processed 0
4543 .\" NS doc-do-func macro
4544 .\" NS internal .Fa for .Fc
4547 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg-count,
4548 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4551 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4555 . nr doc-num-func-args 0
4556 . nr doc-func-args-processed 0
4558 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4559 . if (\n[doc-num-func-args] > 1) \
4560 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4562 . if (\n[doc-func-arg-count] > 1) \{\
4563 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]\|,
4564 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]
4565 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4568 . if (\n[doc-func-arg-count] == 1) \{\
4569 . as doc-out-string \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]
4570 . as doc-out-string \f[P]\s[0]
4572 . nr doc-func-arg-count +1
4580 .\" NS doc-have-func global register (bool)
4581 .\" NS whether we have more than one function in synopsis
4586 .\" NS Fn user macro
4590 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4591 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4592 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4595 .\" NS width register `Fn' set in doc-common
4600 . if !\n[doc-arg-limit] \{\
4602 . ds doc-macro-name Fn
4603 . doc-parse-args \$@
4606 . tmc Usage: .Fn function_name function_arg(s) ... \*[doc-punct-chars]
4610 . if \n[doc-in-synopsis-count] \{\
4611 . \" if there is/has been more than one subroutine declaration
4612 . ie \n[doc-is-func] \{\
4615 . nr doc-have-decl 0
4619 . if \n[doc-have-func] \{\
4622 . nr doc-have-decl 0
4625 . if \n[doc-have-decl] \{\
4630 . if \n[doc-have-var] \{\
4632 . nr doc-have-decl 0
4635 . nr doc-have-func 1
4639 . ie (\n[doc-in-synopsis-count] > 1) \
4642 . if !\n[doc-indent-synopsis] \
4643 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4646 . in +\n[doc-indent-synopsis]u
4647 . ti -\n[doc-indent-synopsis]u
4648 . nr doc-in-synopsis-count +1
4652 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4653 . nr doc-curr-font \n[.f]
4654 . nr doc-curr-size \n[.s]
4655 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4656 . as doc-out-string \f[P]\s[0]\*[lp]
4659 . ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4660 . as doc-out-string \*[doc-Fa-font]
4661 . doc-do-func-\n[doc-type\n[doc-arg-ptr]]
4664 . as doc-out-string \|\*[rp]
4665 . doc-print-and-reset
4668 . if \n[doc-in-synopsis-count] \
4669 . in -\n[doc-indent-synopsis]u
4676 .\" NS doc-do-func-1 macro
4677 .\" NS prepare `doc-out-string' and execute doc-argXXX
4680 .\" NS doc-out-string
4683 . ie \n[doc-in-synopsis-count] \{\
4684 . as doc-out-string \&\*[rp]
4685 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4688 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4690 . \*[doc-arg\n[doc-arg-ptr]]
4694 .\" NS doc-do-func-2 macro
4695 .\" NS handle function arguments
4698 .\" NS doc-arg-ptr, doc-argXXX, doc-out-string, doc-func-arg,
4699 .\" NS doc-num-func-args, doc-func-args-processed
4701 .\" NS local variables:
4705 . if \n[doc-in-synopsis-count] \{\
4707 . nr doc-num-func-args 0
4708 . nr doc-func-args-processed 0
4710 . doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4711 . if (\n[doc-num-func-args] > 1) \
4712 . ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4715 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
4717 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4718 . nr doc-reg-ddfs \n[doc-arg-ptr]
4720 . if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4721 . as doc-out-string \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]],
4722 . as doc-out-string "\*[doc-space\n[doc-reg-ddfs]]\f[P]\s[0]\|
4724 . doc-do-func-\n[doc-type\n[doc-arg-ptr]]
4727 . ie \n[doc-in-synopsis-count] \{\
4728 . as doc-out-string \&\*[rp]
4729 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4732 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4734 . doc-print-and-reset
4739 .\" NS doc-do-func-3 macro
4740 .\" NS handle punctuation suffixes in functions
4743 .\" NS doc-out-string
4746 . ie \n[doc-in-synopsis-count] \{\
4747 . as doc-out-string \&\*[rp]
4748 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4749 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4752 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4753 . as doc-out-string "\*[doc-arg\n[doc-arg-ptr]]
4756 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
4759 . doc-print-and-reset
4763 .\" NS doc-do-func-4 macro
4764 .\" NS handle punctuation prefixes in functions
4767 .\" NS doc-arg-ptr, doc-out-string
4770 . ie \n[doc-in-synopsis-count] \{\
4771 . as doc-out-string \&\*[rp]
4772 . as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4773 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4776 . as doc-out-string \&\*[rp]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
4777 . as doc-out-string "\*[doc-space\n[doc-arg-ptr]]\*[doc-arg\n[doc-arg-ptr]]
4780 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4785 . doc-print-and-reset
4789 .\" NS Fo user macro
4790 .\" NS function open
4793 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
4794 .\" NS doc-curr-size, doc-in-synopsis-count, doc-indent-synopsis,
4795 .\" NS doc-have-decl, doc-have-var, doc-have-func,
4796 .\" NS doc-nesting-level, doc-is-func, doc-func-arg-count
4798 .\" NS width register `Fo' set in doc-common
4803 . if !\n[doc-arg-limit] \{\
4805 . ds doc-macro-name Fo
4806 . doc-parse-args \$@
4809 . tm Usage: .Fo function_name (#\n[.c])
4812 . if \n[doc-in-synopsis-count] \{\
4813 . \" if there is/has been more than one subroutine declaration
4814 . ie \n[doc-is-func] \{\
4817 . nr doc-have-decl 0
4821 . if \n[doc-have-func] \{\
4824 . nr doc-have-decl 0
4827 . if \n[doc-have-decl] \{\
4832 . if \n[doc-have-var] \{\
4834 . nr doc-have-decl 0
4837 . nr doc-have-func 1
4841 . ie (\n[doc-in-synopsis-count] > 1) \
4844 . if !\n[doc-indent-synopsis] \
4845 . nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4848 . in +\n[doc-indent-synopsis]u
4849 . ti -\n[doc-indent-synopsis]u
4850 . nr doc-in-synopsis-count +1
4854 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4855 . nr doc-nesting-level +1
4856 . nr doc-func-arg-count 1
4857 . nr doc-curr-font \n[.f]
4858 . nr doc-curr-size \n[.s]
4860 . as doc-out-string \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]
4861 . as doc-out-string \f[P]\s[0]\*[lp]
4867 .\" NS Fc user macro
4868 .\" NS function close
4871 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-nesting-level,
4872 .\" NS doc-func-arg-count
4874 .\" NS width register `Fc' set in doc-common
4877 . if !\n[doc-arg-limit] \{\
4879 . ds doc-macro-name Fc
4880 . doc-parse-args \$@
4883 . nr doc-func-arg-count 0
4884 . nr doc-nesting-level -1
4886 . ie \n[doc-in-synopsis-count] \
4887 . as doc-out-string \|\*[rp]
4889 . as doc-out-string \|\*[rp]
4890 . ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4892 . \*[doc-arg\n[doc-arg-ptr]]
4895 . doc-print-and-reset
4897 . if \n[doc-in-synopsis-count] \
4898 . in -\n[doc-indent-synopsis]u
4904 .\" NS doc-build-func-string macro
4905 .\" NS collect function arguments and set hard spaces inbetween
4908 .\" NS doc-func-arg, doc-num-func-args, doc-func-args-processed
4910 .de doc-build-func-string
4911 . if !\n[doc-num-func-args] \{\
4912 . nr doc-num-func-args \n[.$]
4913 . nr doc-func-args-processed 0
4917 . nr doc-func-args-processed +1
4918 . as doc-func-arg "\$1
4920 . if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
4921 . as doc-func-arg "\*[doc-hard-space]
4924 . doc-build-func-string \$@
4929 .\" Very crude references, stash all reference info into strings (usual
4930 .\" use of doc-out-string, then doc-out-string contents copied to
4931 .\" string of retrievable naming convention), print out reference on .Re
4932 .\" request and clean up. Ordering very limited, no fancy citations, but
4933 .\" can do articles, journals, and books -- need to add several missing
4934 .\" options (like city etc). Should be able to grab a refer entry, massage
4935 .\" it a wee bit (prefix a `.' to the %[A-Z]) and not worry (ha!).
4938 .\" NS doc-is-reference global register (bool)
4939 .\" NS set if in reference
4941 .nr doc-is-reference 0
4944 .\" NS doc-reference-count global register
4945 .\" NS reference element counter
4947 .nr doc-reference-count 0
4950 .\" NS doc-reference-string-name global string
4951 .\" NS contains current reference string name for handling in
4952 .\" NS `doc-do-references'
4954 .ds doc-reference-string-name
4957 .\" NS Rs user macro
4958 .\" NS reference start
4961 .\" NS doc-is-reference, doc-reference-count
4963 .\" NS width register `Rs' set in doc-common
4966 . nr doc-is-reference 1
4967 . doc-reset-reference
4968 . if \n[doc-in-see-also-section] \
4970 . nr doc-reference-count 0
4974 .\" NS Re user macro
4975 .\" NS reference end
4978 .\" NS doc-is-reference
4980 .\" NS width register `Re' set in doc-common
4983 . doc-print-reference
4984 . doc-reset-reference
4985 . nr doc-is-reference 0
4989 .\" NS doc-reset-reference macro
4990 .\" NS reference cleanup
4993 .\" NS doc-author-count, doc-journal-count, doc-issue-count,
4994 .\" NS doc-optional-count, doc-corporate-count, doc-report-count,
4995 .\" NS doc-reference-title-count, doc-volume-count, doc-date-count,
4996 .\" NS doc-page-number-count, doc-book-count, doc-reference-string-name,
4997 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
4998 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
4999 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5001 .de doc-reset-reference
5002 . while (\n[doc-author-count]) \{\
5003 . ds doc-author-name\n[doc-author-count]
5004 . nr doc-author-count -1
5006 . nr doc-journal-count 0
5007 . nr doc-issue-count 0
5008 . nr doc-optional-count 0
5009 . nr doc-corporate-count 0
5010 . nr doc-report-count 0
5011 . nr doc-reference-title-count 0
5012 . nr doc-volume-count 0
5013 . nr doc-date-count 0
5014 . nr doc-page-number-count 0
5015 . nr doc-book-count 0
5017 . ds doc-reference-string-name
5019 . ds doc-journal-name
5021 . ds doc-optional-string
5022 . ds doc-corporate-name
5023 . ds doc-report-name
5024 . ds doc-reference-title-name
5025 . ds doc-volume-name
5027 . ds doc-page-number-string
5032 .\" NS doc-finish-reference macro
5033 .\" NS auxiliary macro for doc-print-reference
5036 .\" NS doc-reference-count
5038 .de doc-finish-reference
5039 . nr doc-reference-count -1
5040 . ie \n[doc-reference-count] \
5047 .\" NS doc-print-reference macro
5048 .\" NS reference print
5051 .\" NS doc-reference-count, doc-authors-processed
5053 .de doc-print-reference
5054 . if \n[doc-author-count] \{\
5055 . nop \&\*[doc-author-name1],
5056 . nr doc-authors-processed 1
5057 . if (\n[doc-author-count] > 1) \
5058 . doc-print-reference-authors
5059 . nr doc-reference-count -\n[doc-author-count]
5062 . if \n[doc-reference-title-count] \{\
5063 . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5064 . nop \&\*[q]\*[doc-reference-title-name]\*[q]\c
5065 . doc-finish-reference
5068 . nop \*[doc-Em-font]\*[doc-reference-title-name]\*[doc-No-font]\c
5069 . doc-finish-reference
5072 . if \n[doc-book-count] \{\
5073 . nop \*[doc-Em-font]\*[doc-book-name]\*[doc-No-font]\c
5074 . doc-finish-reference
5077 . if \n[doc-publisher-count] \{\
5078 . nop \*[doc-Em-font]\*[doc-publisher-name]\*[doc-No-font]\c
5079 . doc-finish-reference
5082 . if \n[doc-journal-count] \{\
5083 . nop \*[doc-Em-font]\*[doc-journal-name]\*[doc-No-font]\c
5084 . doc-finish-reference
5087 . if \n[doc-report-count] \{\
5088 . nop \&\*[doc-report-name]\c
5089 . doc-finish-reference
5092 . if \n[doc-issue-count] \{\
5093 . nop \&\*[doc-issue-name]\c
5094 . doc-finish-reference
5097 . if \n[doc-volume-count] \{\
5098 . nop \&\*[doc-volume-name]\c
5099 . doc-finish-reference
5102 . if \n[doc-page-number-count] \{\
5103 . nop \&\*[doc-page-number-string]\c
5104 . doc-finish-reference
5107 . if \n[doc-corporate-count] \{\
5108 . nop \&\*[doc-corporate-name]\c
5109 . doc-finish-reference
5112 . if \n[doc-date-count] \{\
5113 . nop \&\*[doc-date]\c
5114 . doc-finish-reference
5117 . if \n[doc-optional-count] \{\
5118 . nop \&\*[doc-optional-string]\c
5119 . doc-finish-reference
5122 . if \n[doc-reference-count] \
5123 . tm mdoc warning: unresolved reference problem
5127 .\" NS doc-authors-processed global register
5128 .\" NS author references processed so far
5130 .nr doc-authors-processed 0
5133 .\" NS doc-print-reference-authors macro
5134 .\" NS print out reference authors
5137 .\" NS doc-authors-processed
5139 .de doc-print-reference-authors
5140 . nr doc-authors-processed +1
5141 . ie (\n[doc-author-count] == \n[doc-authors-processed]) \
5142 . nop \&and \*[doc-author-name\n[doc-authors-processed]],
5144 . nop \&\*[doc-author-name\n[doc-authors-processed]],
5145 . doc-print-reference-authors
5150 .\" NS doc-author-count global register
5151 .\" NS counter of author references
5153 .nr doc-author-count 0
5156 .\" NS doc-author-nameXXX global string
5157 .\" NS array of author names
5159 .\" NS limit: doc-author-count
5161 .ds doc-author-name0
5164 .\" NS %A user macro
5165 .\" NS reference author(s)
5168 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5169 .\" MS doc-reference-count, doc-author-count, doc-reference-string-name
5171 .\" NS width register `%A' set in doc-common
5174 . if !\n[doc-arg-limit] \{\
5176 . nr doc-author-count +1
5177 . nr doc-reference-count +1
5178 . ds doc-reference-string-name doc-author-name\n[doc-author-count]
5180 . ds doc-macro-name %A
5181 . doc-parse-args \$@
5184 . tm Usage: .%A author_name (#\n[.c])
5188 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5189 . nr doc-curr-font \n[.f]
5190 . nr doc-curr-size \n[.s]
5196 .\" NS doc-book-count global register
5197 .\" NS counter of book references
5199 .nr doc-book-count 0
5202 .\" NS doc-book-name global string
5203 .\" NS string of collected book references
5208 .\" NS %B user macro
5209 .\" NS [reference] book name
5212 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5213 .\" NS doc-curr-size, doc-reference-count, doc-book-count,
5214 .\" NS doc-reference-string-name
5216 .\" NS width register `%B' set in doc-common
5219 . if !\n[doc-arg-limit] \{\
5221 . if \n[doc-is-reference] \{\
5222 . nr doc-book-count +1
5223 . nr doc-reference-count +1
5224 . ds doc-reference-string-name doc-book-name
5227 . ds doc-macro-name %B
5228 . doc-parse-args \$@
5231 . tm Usage: .%B book_name (#\n[.c])
5235 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5236 . nr doc-curr-font \n[.f]
5237 . nr doc-curr-size \n[.s]
5239 . ie !\n[doc-is-reference] \{\
5240 . as doc-out-string \*[doc-Em-font]
5241 . doc-print-recursive
5249 .\" NS doc-date-count global register
5250 .\" NS counter of date references
5252 .nr doc-date-count 0
5255 .\" NS doc-date global string
5256 .\" NS string of collected date references
5261 .\" NS %D user macro
5262 .\" NS [reference] date
5265 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5266 .\" NS doc-reference-count, doc-date-count, doc-reference-string-name
5268 .\" NS width register `%D' set in doc-common
5271 . if !\n[doc-arg-limit] \{\
5273 . nr doc-date-count +1
5274 . nr doc-reference-count +1
5275 . ds doc-reference-string-name doc-date
5277 . ds doc-macro-name %D
5278 . doc-parse-args \$@
5281 . tm Usage: .%D date (#\n[.c])
5285 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5286 . nr doc-curr-font \n[.f]
5287 . nr doc-curr-size \n[.s]
5293 .\" NS doc-publisher-count global register
5294 .\" NS counter of publisher references
5296 .nr doc-publisher-count 0
5299 .\" NS doc-publisher-name global string
5300 .\" NS string of collected publisher references
5302 .ds doc-publisher-name
5305 .\" NS %I user macro
5306 .\" NS [reference] issuer/publisher name
5309 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5310 .\" NS doc-reference-count, doc-reference-string-name
5312 .\" NS width register `%I' set in doc-common
5315 . if !\n[doc-arg-limit] \{\
5317 . nr doc-publisher-count +1
5318 . nr doc-reference-count +1
5319 . ds doc-reference-string-name doc-publisher-name
5321 . ds doc-macro-name %I
5322 . doc-parse-args \$@
5325 . tm Usage: .%I issuer/publisher_name (#\n[.c])
5329 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5330 . nr doc-curr-font \n[.f]
5331 . nr doc-curr-size \n[.s]
5337 .\" NS doc-journal-count global register
5338 .\" NS counter of journal references
5340 .nr doc-journal-count 0
5343 .\" NS doc-journal-name global string
5344 .\" NS string of collected journal references
5346 .ds doc-journal-name
5349 .\" NS %J user macro
5350 .\" NS [reference] Journal Name
5353 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5354 .\" NS doc-reference-count, doc-journal-count, doc-reference-string-name
5356 .\" NS width register `%J' set in doc-common
5359 . if !\n[doc-arg-limit] \{\
5361 . nr doc-journal-count +1
5362 . nr doc-reference-count +1
5363 . ds doc-reference-string-name doc-journal-name
5365 . ds doc-macro-name %J
5366 . doc-parse-args \$@
5369 . tm Usage: .%J journal_name (#\n[.c])
5373 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5374 . nr doc-curr-font \n[.f]
5375 . nr doc-curr-size \n[.s]
5381 .\" NS doc-issue-count global register
5382 .\" NS counter of issue number references
5384 .nr doc-issue-count 0
5387 .\" NS doc-issue-name global string
5388 .\" NS string of collected issue number references
5393 .\" NS %N user macro
5394 .\" NS [reference] issue number
5397 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5398 .\" NS doc-reference-count, doc-issue-count, doc-reference-string-name
5400 .\" NS width register `%N' set in doc-common
5403 . if !\n[doc-arg-limit] \{\
5405 . nr doc-issue-count +1
5406 . nr doc-reference-count +1
5407 . ds doc-reference-string-name doc-issue-name
5409 . ds doc-macro-name %N
5410 . doc-parse-args \$@
5413 . tm Usage: .%N issue_number (#\n[.c])
5417 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5418 . nr doc-curr-font \n[.f]
5419 . nr doc-curr-size \n[.s]
5425 .\" NS doc-optional-count global register
5426 .\" NS counter of optional information references
5428 .nr doc-optional-count 0
5431 .\" NS doc-optional-string global string
5432 .\" NS string of collected optional information references
5434 .ds doc-optional-string
5437 .\" NS %O user macro
5438 .\" NS [reference] optional information
5441 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5442 .\" NS doc-reference-count, doc-optional-count, doc-reference-string-name
5444 .\" NS width register `%O' set in doc-common
5447 . if !\n[doc-arg-limit] \{\
5449 . nr doc-optional-count +1
5450 . nr doc-reference-count +1
5451 . ds doc-reference-string-name doc-optional-string
5453 . ds doc-macro-name %O
5454 . doc-parse-args \$@
5457 . tm Usage: .%O optional_information ... \*[doc-punct-chars] (#\n[.c])
5461 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5462 . nr doc-curr-font \n[.f]
5463 . nr doc-curr-size \n[.s]
5469 .\" NS doc-page-number-count global register
5470 .\" NS counter of page number references
5472 .nr doc-page-number-count 0
5475 .\" NS doc-page-number-string global string
5476 .\" NS string of collected page number references
5478 .ds doc-page-number-string
5481 .\" NS %P user macro
5482 .\" NS [reference] page numbers
5485 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5486 .\" NS doc-reference-count, doc-page-number-count, doc-reference-string-name
5488 .\" NS width register `%P' set in doc-common
5491 . if !\n[doc-arg-limit] \{\
5493 . nr doc-page-number-count +1
5494 . nr doc-reference-count +1
5495 . ds doc-reference-string-name doc-page-number-string
5497 . ds doc-macro-name %P
5498 . doc-parse-args \$@
5501 . tm Usage: .%P page_numbers ... \*[doc-punct-chars] (#\n[.c])
5505 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5506 . nr doc-curr-font \n[.f]
5507 . nr doc-curr-size \n[.s]
5513 .\" NS doc-corporate-count global register
5514 .\" NS counter of corporate references
5516 .nr doc-corporate-count 0
5519 .\" NS doc-corporate-name global string
5520 .\" NS string of collected corporate references
5522 .ds doc-corporate-name
5525 .\" NS %Q user macro
5526 .\" NS corporate or foreign author
5529 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5530 .\" NS doc-reference-count, doc-corporate-count, doc-reference-string-name
5532 .\" NS width register `%Q' set in doc-common
5535 . if !\n[doc-arg-limit] \{\
5537 . nr doc-corporate-count +1
5538 . nr doc-reference-count +1
5539 . ds doc-reference-string-name doc-corporate-name
5541 . ds doc-macro-name %Q
5542 . doc-parse-args \$@
5545 . tm Usage: .%Q corporate_or_foreign_author (#\n[.c])
5549 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5550 . nr doc-curr-font \n[.f]
5551 . nr doc-curr-size \n[.s]
5557 .\" NS doc-report-count global register
5558 .\" NS counter of report references
5560 .nr doc-report-count 0
5563 .\" NS doc-report-name global string
5564 .\" NS string of collected report references
5569 .\" NS %R user macro
5570 .\" NS [reference] report name
5573 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5574 .\" NS doc-reference-count, doc-report-count, doc-reference-string-name
5576 .\" NS width register `%R' set in doc-common
5579 . if !\n[doc-arg-limit] \{\
5581 . nr doc-report-count +1
5582 . nr doc-reference-count +1
5583 . ds doc-reference-string-name doc-report-name
5585 . ds doc-macro-name %R
5586 . doc-parse-args \$@
5589 . tm Usage: .%R reference_report (#\n[.c])
5593 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5594 . nr doc-curr-font \n[.f]
5595 . nr doc-curr-size \n[.s]
5601 .\" NS doc-reference-title-count global register
5602 .\" NS counter of reference title references
5604 .nr doc-reference-title-count 0
5607 .\" NS doc-reference-title-name global string
5608 .\" NS string of collected reference title references
5610 .ds doc-reference-title-name
5613 .\" NS %T user macro
5614 .\" NS reference title
5617 .\" NS doc-macro-name, doc-arg-ptr, doc-out-string, doc-curr-font,
5618 .\" NS doc-curr-size, doc-reference-count, doc-reference-title-count,
5619 .\" NS doc-reference-string-name
5621 .\" NS width register `%T' set in doc-common
5624 . if !\n[doc-arg-limit] \{\
5626 . if \n[doc-is-reference] \{\
5627 . nr doc-reference-title-count +1
5628 . nr doc-reference-count +1
5629 . ds doc-reference-string-name doc-reference-title-name
5632 . ds doc-macro-name %T
5633 . doc-parse-args \$@
5636 . tm Usage: .%T reference_title (#\n[.c])
5640 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5641 . nr doc-curr-font \n[.f]
5642 . nr doc-curr-size \n[.s]
5643 . ie \n[doc-is-reference] \
5646 . as doc-out-string \*[doc-Em-font]
5647 . doc-print-recursive
5652 .\" NS doc-volume-count global register
5653 .\" NS counter of reference title references
5655 .nr doc-volume-count 0
5658 .\" NS doc-volume-name global string
5659 .\" NS string of collected volume references
5664 .\" NS %V user macro
5665 .\" NS reference volume
5668 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5669 .\" NS doc-reference-count, doc-volume-count, doc-reference-string-name
5671 .\" NS width register `%V' set in doc-common
5674 . if !\n[doc-arg-limit] \{\
5676 . ds doc-macro-name %V
5677 . nr doc-volume-count +1
5678 . nr doc-reference-count +1
5679 . ds doc-reference-string-name doc-volume-name
5680 . doc-parse-args \$@
5683 . tm Usage: .%V volume , ... \*[doc-punct-chars] (#\n[.c])
5687 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5688 . nr doc-curr-font \n[.f]
5689 . nr doc-curr-size \n[.s]
5695 .\" NS doc-do-references macro
5696 .\" NS reference recursion routine
5699 .\" NS doc-arg-ptr, doc-out-string, doc-reference-string-name,
5700 .\" NS doc-journal-name, doc-issue-name, doc-optional-string,
5701 .\" NS doc-corporate-name, doc-report-name, doc-reference-title-name,
5702 .\" NS doc-volume-name, doc-date, doc-page-number-string, doc-book-name
5704 .\" NS local variables:
5705 .\" NS doc-reg-ddr, doc-reg-ddr1
5707 .de doc-do-references
5710 . nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
5712 . ie (\n[doc-reg-ddr1] == 1) \{\
5713 . \" .as doc-out-string \f[\n[doc-curr-font]]\s[\n[doc-curr-size]]
5714 . ie "\*[doc-arg\n[doc-arg-ptr]]"Tn" \
5715 . doc-reference-trademark
5717 . doc-append-arg doc-do-references 1
5718 . \*[doc-arg\n[doc-arg-ptr]]
5721 . nr doc-reg-ddr \n[doc-arg-ptr]
5722 . as doc-out-string \&\*[doc-arg\n[doc-arg-ptr]]
5724 . ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
5725 . as \*[doc-reference-string-name] \&\*[doc-out-string]
5727 . ds doc-reference-string-name
5732 . as doc-out-string "\*[doc-space\n[doc-reg-ddr]]
5738 .\" NS Hf user macro
5739 .\" NS source include header files.
5742 .\" NS doc-curr-font, doc-curr-size
5744 .\" NS width register `Hf' set in doc-common
5752 . nr doc-curr-font \n[.f]
5753 . nr doc-curr-size \n[.s]
5756 . nop \*[doc-Li-font]
5767 . ft \n[doc-curr-font]
5768 . ps \n[doc-curr-size]
5773 .\" NS doc-have-author global register (bool)
5776 .nr doc-have-author 0
5779 .\" NS An user macro
5783 .\" NS doc-macro-name, doc-arg-ptr, doc-curr-font, doc-curr-size,
5784 .\" NS doc-have-author
5786 .\" NS width register `An' set in doc-common
5789 . if !\n[doc-arg-limit] \{\
5791 . ie "\$1"-nosplit" \
5792 . nr doc-in-authors-section 0
5793 . el \{ .ie "\$1"-split" \
5794 . nr doc-in-authors-section 1
5796 . ds doc-macro-name An
5797 . doc-parse-args \$@
5800 . tm Usage: .An author_name ... \*[doc-punct-chars] (#\n[.c])
5803 . if \n[doc-in-authors-section] \{\
5804 . ie \n[doc-have-author] \
5807 . nr doc-have-author 1
5811 . if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5812 . nr doc-curr-font \n[.f]
5813 . nr doc-curr-size \n[.s]
5814 . doc-print-recursive
5819 .\" NS Sf user macro
5822 .\" NS width register `Sf' set in doc-common
5825 . tm mdoc error: .Sf defunct, use .Pf or .Ns (#\n[.c])
5829 .ds doc-func-error-string "function returns the value\~0 if successful;
5830 .as doc-func-error-string " otherwise the value\~-1 is returned and
5831 .as doc-func-error-string " the global variable \*[doc-Va-font]errno\f[P]
5832 .as doc-func-error-string " is set to indicate the error.
5835 .\" NS Rv user macro
5836 .\" NS return values
5838 .\" NS width register `Rv' set in doc-common
5840 .\" NS local variables:
5845 .\" XXX: what does this function without `-std'?
5848 . tm Usage: .Rv [-std] (#\n[.c])
5850 . \" .ds doc-macro-name Rv
5851 . \" .nr doc-arg-ptr 0
5853 . \" .ds doc-arg1 \$2
5854 . \" .ds doc-arg2 \$3
5855 . \" .ds doc-arg3 \$4
5856 . \" .ds doc-arg4 \$5
5857 . \" .ds doc-arg5 \$6
5858 . \" .ds doc-arg6 \$7
5859 . \" .ds doc-arg7 \$8
5860 . \" .ds doc-arg8 \$9
5862 . \" .nr doc-num-args (\n[.$] - 1)
5865 . doc-reg-Rv \*[doc-section]
5866 . if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
5867 . tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
5871 . nop \&\*[doc-func-error-string]
5876 .\" NS Mt user macro
5877 .\" NS mailto (for conversion to HTML)
5880 . \" XXX: error handling missing
5885 .\" NS Lk user macro
5886 .\" NS link (for conversion to HTML)
5888 .\" NS local variables:
5889 .\" NS doc-str-Lk, doc-reg-Lk
5892 . ds doc-str-Lk Sy \$@
5894 . ie (\n[.$] > 1) \{\
5895 . doc-get-arg-type \$2
5896 . ie (\[doc-arg-type] < 3) \{\
5898 . ds doc-str-Lk Sy "\$1"
5899 . doc-get-width "\$1"
5902 . as doc-str-Lk " \$@
5905 . doc-get-width "\$1"
5908 . doc-get-width "\$1"
5914 . ie (\n[doc-width] >= \n[doc-reg-Lk]) \
5924 . tm mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
5925 . ab Should this have been `.Em ...'?
5929 .\" NS doc-empty-line macro
5930 .\" NS emit warning and print empty line
5933 . if !"\*[doc-macro-name]"Bd" \
5934 . tm mdoc warning: Empty input line #\n[.c]!
5944 .\" load local modifications