* tmac/doc.common: Initialize %I register for the %I macro to
[s-roff.git] / tmac / doc.tmac
blob1fb07f3394182c8f814ab4215c67c4a615765eac
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
19 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)doc 8.1 (Berkeley) 06/08/93
33 .\"
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.
38 .\"
39 .\" Modified by
40 .\"
41 .\"   Werner LEMBERG <wl@gnu.org>      and
42 .\"   Ruslan Ermilov <ru@freebsd.org>
43 .\"
44 .\" to make it more readable: using long names and many groff features,
45 .\" updating and extending documentation, etc.
46 .\"
47 .\" %beginstrip%
50 .if !\n(.g \
51 .  ab This version of mdoc can be run with GNU troff only!
54 .do if d Dd .nx
57 .cp 0
60 .if (\n[.x]\n[.y] < 117) \
61 .  ab You need GNU troff version 1.17 or higher to run this version of mdoc!
64 .\" Load start-up files
65 .ie t \
66 .  mso mdoc/doc-ditroff
67 .el \
68 .  mso mdoc/doc-nroff
70 .mso mdoc/doc-common
71 .mso mdoc/doc-syms
74 .eo
77 .\" NS doc-macro-name global string
78 .\" NS   name of calling request (set in each user-requestable macro)
80 .ds doc-macro-name
81 .als doc-arg0 doc-macro-name
84 .\" NS doc-arg-limit global register
85 .\" NS   total number of arguments
87 .nr doc-arg-limit 0
90 .\" NS doc-num-args global register
91 .\" NS   number of arguments to handle (must be set to \n[.$] prior to
92 .\" NS   `doc-parse-arg-vector' request)
94 .nr doc-num-args 0
97 .\" NS doc-arg-ptr global register
98 .\" NS   argument pointer
100 .nr doc-arg-ptr 0
103 .\" NS doc-argXXX global string
104 .\" NS   argument vector
105 .\" NS
106 .\" NS limit:
107 .\" NS   doc-arg-limit
109 .ds doc-arg1
112 .\" NS doc-typeXXX global register
113 .\" NS   argument type vector (macro=1, string=2, punctuation suffix=3,
114 .\" NS   punctuation prefix=4)
115 .\" NS
116 .\" NS limit:
117 .\" NS   doc-arg-limit
119 .nr doc-type1 0
122 .\" NS doc-spaceXXX global string
123 .\" NS   space vector
124 .\" NS
125 .\" NS limit:
126 .\" NS   doc-arg-limit
128 .ds doc-space1
131 .\" NS doc-parse-args macro
132 .\" NS   parse arguments (recursively) (`.doc-parse-args arg ...')
133 .\" NS
134 .\" NS modifies:
135 .\" NS   doc-arg-limit
136 .\" NS   doc-arg-ptr
137 .\" NS   doc-argXXX
138 .\" NS   doc-spaceXXX
139 .\" NS   doc-typeXXX
140 .\" NS   doc-arg-ptr
141 .\" NS   doc-have-space
142 .\" NS
143 .\" NS local variables:
144 .\" NS   doc-reg-dpa
145 .\" NS   doc-reg-dpa1
146 .\" NS   doc-str-dpa
148 .de doc-parse-args
149 .  if !\n[doc-arg-limit] \
150 .    doc-set-spacing-1
152 .  nr doc-have-space 0
154 .  if !\n[.$] \
155 .    return
157 .  nr doc-arg-limit +1
159 .  \" handle `|' and `...' specially
160 .  ie        "\$1"|" \
161 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
162 .  el \{ .ie "\$1"..." \
163 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
164 .  el \
165 .    ds doc-arg\n[doc-arg-limit] "\$1
166 .  \}
168 .  \" get argument type and set spacing
169 .  doc-get-arg-type* \n[doc-arg-limit]
170 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
171 .  doc-set-spacing-\n[doc-arg-type]
173 .  \" check whether we have processed the last parameter
174 .  ie (\n[.$] == 1) \
175 .    nr doc-arg-ptr 0
176 .  el \{\
177 .    shift
178 .    doc-parse-args \$@
179 .  \}
181 .  nh
185 .\" NS doc-parse-arg-vector macro
186 .\" NS   parse argument vector (recursive)
187 .\" NS
188 .\" NS   cf. comments in doc-parse-args
189 .\" NS
190 .\" NS modifies:
191 .\" NS   doc-arg-limit
192 .\" NS   doc-arg-ptr
193 .\" NS   doc-argXXX
194 .\" NS   doc-num-args
195 .\" NS   doc-spaceXXX
196 .\" NS   doc-typeXXX
197 .\" NS
198 .\" NS local variables:
199 .\" NS   doc-reg-dpav
200 .\" NS   doc-reg-dpav1
201 .\" NS   doc-str-dpav
203 .de doc-parse-arg-vector
204 .  if !\n[doc-arg-limit] \
205 .    doc-set-spacing-1
207 .  nr doc-arg-limit +1
209 .  ie        "\*[doc-arg\n[doc-arg-limit]]"|" \
210 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
211 .  el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
212 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
213 .  \}
215 .  doc-get-arg-type* \n[doc-arg-limit]
216 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
217 .  doc-set-spacing-\n[doc-arg-type]
219 .  ie (\n[doc-num-args] == 1) \{\
220 .    nr doc-arg-ptr 0
221 .    nr doc-num-args 0
222 .  \}
223 .  el \{\
224 .    nr doc-num-args -1
225 .    doc-parse-arg-vector
226 .  \}
228 .  nh
232 .\" NS doc-parse-space-vector macro
233 .\" NS   parse space vector (recursive)
234 .\" NS
235 .\" NS modifies:
236 .\" NS   doc-arg-limit
237 .\" NS   doc-num-args
238 .\" NS   doc-spaceXXX
240 .de doc-parse-space-vector
241 .  nr doc-arg-limit +1
243 .  doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
245 .  ie (\n[doc-num-args] == 1) \
246 .    nr doc-num-args 0
247 .  el \{\
248 .    nr doc-num-args -1
249 .    doc-parse-space-vector
250 .  \}
254 .\" NS doc-remaining-args macro
255 .\" NS   output remaining arguments as-is, separated by spaces (until
256 .\" NS   `doc-num-args' is exhausted)
257 .\" NS
258 .\" NS modifies:
259 .\" NS   doc-arg-ptr
260 .\" NS   doc-num-args
262 .de doc-remaining-args
263 .  nr doc-arg-ptr +1
264 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
266 .  ie (\n[doc-num-args] == 1) \{\
267 .    nr doc-arg-ptr 0
268 .    nr doc-num-args 0
269 .  \}
270 .  el \{\
271 .    nop \)\*[doc-space]\c
272 .    nr doc-num-args -1
273 .    doc-remaining-args
274 .  \}
278 .\" NS doc-append-arg macro
279 .\" NS   append one argument to argument vector:
280 .\" NS   `.doc-append-arg [arg] [type]'
281 .\" NS
282 .\" NS modifies:
283 .\" NS   doc-arg-limit
284 .\" NS   doc-argXXX
285 .\" NS   doc-typeXXX
287 .de doc-append-arg
288 .  nr doc-arg-limit +1
289 .  ds doc-arg\n[doc-arg-limit] "\$1
290 .  nr doc-type\n[doc-arg-limit] \$2
291 .  doc-set-spacing-\$2
295 .\" NS doc-print-and-reset macro
296 .\" NS   finish input line and clean up argument vectors
298 .de doc-print-and-reset
299 .  if \n[doc-space-mode] \
300 .    nop \)
301 .  doc-reset-args
305 .\" NS doc-reset-args macro
306 .\" NS   reset argument counters
307 .\" NS
308 .\" NS modifies:
309 .\" NS   doc-arg-limit
310 .\" NS   doc-arg-ptr
311 .\" NS   doc-have-slot
313 .de doc-reset-args
314 .  nr doc-arg-limit 0
315 .  nr doc-arg-ptr 0
316 .  nr doc-have-slot 0
318 .  hy \n[doc-hyphen-flags]
324 .\" NS doc-curr-font global register
325 .\" NS   saved current font
327 .nr doc-curr-font \n[.f]
330 .\" NS doc-curr-size global register
331 .\" NS   saved current font size
333 .nr doc-curr-size \n[.ps]
338 .\" NS Fl user macro
339 .\" NS   handle flags (appends `-' and prints flags): `.Fl [arg ...]'
340 .\" NS
341 .\" NS modifies:
342 .\" NS   doc-arg-ptr
343 .\" NS   doc-curr-font
344 .\" NS   doc-curr-size
345 .\" NS   doc-macro-name
346 .\" NS
347 .\" NS local variables:
348 .\" NS   doc-reg-Fl (for communication with doc-flag-recursion)
349 .\" NS
350 .\" NS width register `Fl' set in doc-common
352 .de Fl
353 .  nr doc-curr-font \n[.f]
354 .  nr doc-curr-size \n[.ps]
355 .  nop \*[doc-Fl-font]\c
357 .  if !\n[doc-arg-limit] \{\
358 .    ds doc-macro-name Fl
359 .    doc-parse-args \$@
361 .    if !\n[.$] \{\
362 .      \" no arguments
363 .      nop \|\-\|\f[P]\s[0]
364 .  \}\}
366 .  if !\n[doc-arg-limit] \
367 .    return
369 .  nr doc-arg-ptr +1
370 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
371 .    \" last argument
372 .    nop \|\-\f[P]\s[0]\c
373 .    doc-print-and-reset
374 .  \}
375 .  el \{\
376 .    ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
377 .      nop \|\-\f[P]\s[0]\c
378 .      \*[doc-arg\n[doc-arg-ptr]]
379 .    \}
380 .    el \{\
381 .      if (\n[doc-type\n[doc-arg-ptr]] == 3) \
382 .        nop \|\-\|\c
384 .      nr doc-reg-Fl 1
385 .      doc-flag-recursion
386 .  \}\}
390 .\" NS doc-flag-recursion macro
391 .\" NS   `Fl' flag recursion routine (special handling)
392 .\" NS
393 .\" NS modifies:
394 .\" NS   doc-arg-ptr
395 .\" NS
396 .\" NS local variables:
397 .\" NS   doc-reg-dfr
398 .\" NS   doc-reg-dfr1
399 .\" NS   doc-str-dfr
401 .de doc-flag-recursion
402 .  nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
403 .  ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
405 .  ie (\n[doc-reg-dfr1] == 1) \{\
406 .    nop \f[P]\s[0]\c
407 .    \*[doc-str-dfr]
408 .  \}
409 .  el \{\
410 .    nr doc-reg-dfr \n[doc-arg-ptr]
412 .    ie (\n[doc-reg-dfr1] == 2) \{\
413 .      \" handle vertical bar -- doc-reg-Fl is set for the first call of
414 .      \" doc-flag-recursion only; we need this to make `.Fl | ...' work
415 .      \" correctly
416 .      ie "\*[doc-str-dfr]"\*[Ba]" \{\
417 .        if \n[doc-reg-Fl] \
418 .          nop \|\-\*[doc-space]\c
419 .        nop \)\*[Ba]\c
420 .      \}
421 .      el \{\
422 .        ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
423 .          if \n[doc-reg-Fl] \
424 .            nop \|\-\*[doc-space]\c
425 .          nop \f[R]|\f[P]\c
426 .        \}
427 .        el \{\
428 .          \" two consecutive hyphen characters?
429 .          ie "\*[doc-str-dfr]"-" \
430 .            nop \|\-\^\-\|\c
431 .          el \
432 .            nop \|\%\-\*[doc-str-dfr]\&\c
433 .    \}\}\}
434 .    el \{\
435 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
436 .      nop \)\*[doc-str-dfr]\f[P]\s[0]\c
437 .    \}
439 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
440 .      \" last argument
441 .      if (\n[doc-reg-dfr1] == 4) \
442 .        nop \|\-\c
443 .      nop \f[P]\s[0]\c
444 .      doc-print-and-reset
445 .    \}
446 .    el \{\
447 .      nr doc-arg-ptr +1
448 .      ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
449 .        ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
450 .          nop \|\-\c
451 .        el \
452 .          nop \)\*[doc-space\n[doc-reg-dfr]]\c
453 .      \}
454 .      el \
455 .        nop \)\*[doc-space\n[doc-reg-dfr]]\c
457 .      shift
458 .      nr doc-reg-Fl 0
459 .      doc-flag-recursion \$@
460 .  \}\}
464 .\" NS doc-print-recursive macro
465 .\" NS   general name recursion routine (print remaining arguments)
466 .\" NS
467 .\" NS modifies:
468 .\" NS   doc-arg-ptr
469 .\" NS
470 .\" NS local variables:
471 .\" NS   doc-reg-dpr
472 .\" NS   doc-reg-dpr1
473 .\" NS   doc-str-dpr
475 .de doc-print-recursive
476 .  nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
477 .  ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
479 .  ie (\n[doc-reg-dpr1] == 1) \{\
480 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
481 .    \*[doc-str-dpr]
482 .  \}
483 .  el \{\
484 .    nr doc-reg-dpr \n[doc-arg-ptr]
486 .    ie (\n[doc-reg-dpr1] == 2) \
487 .      \" the `\%' prevents hyphenation on a dash (`-')
488 .      nop \%\*[doc-str-dpr]\&\c
489 .    el \{\
490 .      \" punctuation character
491 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
492 .      nop \)\*[doc-str-dpr]\f[P]\s[0]\c
493 .    \}
495 .    nr doc-arg-ptr +1
496 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
497 .      \" last argument
498 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
499 .      doc-print-and-reset
500 .    \}
501 .    el \{\
502 .      nop \)\*[doc-space\n[doc-reg-dpr]]\c
503 .      doc-print-recursive
504 .  \}\}
508 .\" NS doc-print-prefixes macro
509 .\" NS   print leading prefixes
510 .\" NS
511 .\" NS modifies:
512 .\" NS   doc-arg-ptr
514 .de doc-print-prefixes
515 .  while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
516 .    if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
517 .      break
518 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
519 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
520 .    nr doc-arg-ptr +1
521 .  \}
525 .\" NS doc-generic-macro macro
526 .\" NS   this is the skeleton for most simple macros
527 .\" NS
528 .\" NS modifies:
529 .\" NS   doc-arg-ptr
530 .\" NS   doc-curr-font
531 .\" NS   doc-curr-size
532 .\" NS   doc-macro-name
534 .de doc-generic-macro
535 .  if !\n[doc-arg-limit] \{\
536 .    ie \n[.$] \{\
537 .      ds doc-macro-name \$0
538 .      doc-parse-args \$@
539 .    \}
540 .    el \
541 .      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
542 .  \}
544 .  if !\n[doc-arg-limit] \
545 .    return
547 .  nr doc-arg-ptr +1
548 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
549 .    if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
550 .      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
552 .      \" the right action here would be to reset the argument counters
553 .      \" and bail out -- unfortunately, a small number of manual pages
554 .      \" (less than 2% for FreeBSD which has been used for testing)
555 .      \" relied on the old behaviour (silently ignore this error),
556 .      \" so it is commented out
558 .\"    doc-reset-args
559 .    \}
560 .\"  el \{\
561 .      nr doc-curr-font \n[.f]
562 .      nr doc-curr-size \n[.ps]
563 .      nop \*[doc-\$0-font]\c
564 .      doc-print-recursive
565 .\"  \}
566 .  \}
567 .  el \{\
568 .    tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
569 .    doc-reset-args
570 .  \}
574 .\" NS Ar user macro
575 .\" NS   command line `argument' macro: `.Ar [args ...]'
576 .\" NS
577 .\" NS modifies:
578 .\" NS   doc-arg-ptr
579 .\" NS   doc-curr-font
580 .\" NS   doc-curr-size
581 .\" NS   doc-macro-name
582 .\" NS
583 .\" NS local variable:
584 .\" NS   doc-str-Ar-default
585 .\" NS
586 .\" NS width register `Ar' set in doc-common
588 .ds doc-str-Ar-default "file\ .\|.\|.
590 .de Ar
591 .  nr doc-curr-font \n[.f]
592 .  nr doc-curr-size \n[.ps]
593 .  nop \*[doc-Ar-font]\c
595 .  if !\n[doc-arg-limit] \{\
596 .    ds doc-macro-name Ar
597 .    doc-parse-args \$@
599 .    if !\n[.$] \{\
600 .      \" no argument
601 .      nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
602 .  \}\}
604 .  if !\n[doc-arg-limit] \
605 .    return
607 .  nr doc-arg-ptr +1
608 .  doc-print-prefixes
609 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
610 .    nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
611 .    doc-print-and-reset
612 .  \}
613 .  el \{\
614 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
615 .      \" replace previous argument (Ar) with default value
616 .      nr doc-arg-ptr -1
617 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
618 .      nr doc-type\n[doc-arg-ptr] 2
619 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
621 .      \" recompute space vector for remaining arguments
622 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
623 .      nr doc-arg-limit \n[doc-arg-ptr]
624 .      doc-parse-space-vector
625 .    \}
626 .    doc-print-recursive
627 .  \}
631 .\" NS Ad user macro
632 .\" NS   Addresses
633 .\" NS
634 .\" NS width register `Ad' set in doc-common
636 .als Ad doc-generic-macro
637 .ds doc-Ad-usage address
640 .\" NS doc-indent-synopsis global register
641 .\" NS   indentation in synopsis
643 .nr doc-indent-synopsis 0
646 .\" NS doc-indent-synopsis-active global register (bool)
647 .\" NS   indentation in synopsis active
649 .nr doc-indent-synopsis-active 0
652 .\" NS Cd user macro
653 .\" NS   config declaration (for section 4 SYNOPSIS)
654 .\" NS
655 .\" NS   this function causes a break; it uses the `Nm' font
656 .\" NS
657 .\" NS modifies:
658 .\" NS   doc-arg-ptr
659 .\" NS   doc-curr-font
660 .\" NS   doc-curr-size
661 .\" NS   doc-indent-synopsis
662 .\" NS   doc-macro-name
663 .\" NS
664 .\" NS width register `Cd' set in doc-common
666 .de Cd
667 .  if !\n[doc-arg-limit] \{\
668 .    ie \n[.$] \{\
669 .      ds doc-macro-name Cd
670 .      doc-parse-args \$@
671 .    \}
672 .    el \
673 .      tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
674 .  \}
676 .  if !\n[doc-arg-limit] \
677 .    return
679 .  nr doc-arg-ptr +1
680 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
681 .    nr doc-curr-font \n[.f]
682 .    nr doc-curr-size \n[.ps]
684 .    ie \n[doc-in-synopsis-section] \{\
685 .      if "\*[doc-macro-name]"Cd" \{\
686 .        br
687 .        if !\n[doc-indent-synopsis] \
688 .          nr doc-indent-synopsis \n[doc-display-indent]u
689 .        if !\n[doc-indent-synopsis-active] \
690 .          in +\n[doc-indent-synopsis]u
691 .        ti -\n[doc-indent-synopsis]u
692 .        nop \*[doc-Nm-font]\c
693 .        doc-print-recursive
694 .        if !\n[doc-indent-synopsis-active] \
695 .          in -\n[doc-indent-synopsis]u
696 .    \}\}
697 .    el \{\
698 .      nop \*[doc-Nm-font]\c
699 .      doc-print-recursive
700 .  \}\}
701 .  el \{\
702 .    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
703 .    doc-reset-args
704 .  \}
708 .\" NS Cm user macro
709 .\" NS   interactive command modifier (flag)
710 .\" NS
711 .\" NS width register `Cm' set in doc-common
713 .als Cm doc-generic-macro
714 .ds doc-Cm-usage interactive_command_modifier
717 .\" NS Dv user macro
718 .\" NS   defined variable
719 .\" NS
720 .\" NS   this function uses the `Er' font
721 .\" NS
722 .\" NS width register `Dv' set in doc-common
724 .als Dv doc-generic-macro
725 .ds doc-Dv-usage defined_variable
726 .als doc-Dv-font doc-Er-font
729 .\" NS Em user macro
730 .\" NS   emphasis
731 .\" NS
732 .\" NS width register `Em' set in doc-common
734 .als Em doc-generic-macro
735 .ds doc-Em-usage text
738 .\" NS Er user macro
739 .\" NS   errno type
740 .\" NS
741 .\" NS width register `Er' set in doc-common
743 .als Er doc-generic-macro
744 .ds doc-Er-usage text
747 .\" NS Ev user macro
748 .\" NS   environment variable
749 .\" NS
750 .\" NS width register `Ev' set in doc-common
752 .als Ev doc-generic-macro
753 .ds doc-Ev-usage text
756 .\" NS doc-have-decl global register (bool)
757 .\" NS   subroutine test (in synopsis only)
759 .nr doc-have-decl 0
762 .\" NS doc-have-var global register (bool)
763 .\" NS   whether last type is a variable type
765 .nr doc-have-var 0
768 .\" NS doc-do-func-decl macro
769 .\" NS   do someting special while in SYNOPSIS
770 .\" NS
771 .\" NS modifies:
772 .\" NS   doc-curr-font
773 .\" NS   doc-curr-size
774 .\" NS   doc-have-decl
775 .\" NS   doc-have-var
777 .de doc-do-func-decl
778 .  if \n[doc-in-synopsis-section] \{\
779 .    \" if a variable type was the last thing given, want vertical space
780 .    if \n[doc-have-var] \{\
781 .      doc-paragraph
782 .      nr doc-have-var 0
783 .    \}
784 .    \" if a subroutine was the last thing given, want vertical space
785 .    if \n[doc-have-func] \{\
786 .      ie \n[doc-have-decl] \
787 .        br
788 .      el \
789 .        doc-paragraph
790 .    \}
791 .    nr doc-have-decl 1
792 .  \}
794 .  nr doc-curr-font \n[.f]
795 .  nr doc-curr-size \n[.ps]
799 .\" NS Fd user macro
800 .\" NS   function declaration -- not callable
801 .\" NS
802 .\" NS   this function causes a break
803 .\" NS
804 .\" NS width register `Fd' set in doc-common
806 .de Fd
807 .  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
808 .    doc-do-func-decl
809 .    nop \*[doc-Fd-font]\$*
810 .    br
811 .    ft \n[doc-curr-font]
812 .    ps \n[doc-curr-size]u
813 .  \}
814 .  el \{\
815 .    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
816 .    doc-reset-args
817 .  \}
821 .\" NS In user macro
822 .\" NS   #include statement - not callable
823 .\" NS
824 .\" NS   this function causes a break; it uses the `Fd' font
825 .\" NS
826 .\" NS width register `In' set in doc-common
828 .de In
829 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
830 .    doc-do-func-decl
831 .    nop \*[doc-Fd-font]#include <\$1>
832 .    br
833 .    ft \n[doc-curr-font]
834 .    ps \n[doc-curr-size]u
835 .  \}
836 .  el \{\
837 .    tm Usage: .In include_file -- In is not callable (#\n[.c])
838 .    doc-reset-args
839 .  \}
843 .\" NS Fr user macro
844 .\" NS   function return value
845 .\" NS
846 .\" NS   this function uses the `Ar' font
847 .\" NS
848 .\" NS width register `Fr' set in doc-common
850 .als Fr doc-generic-macro
851 .ds doc-Fr-usage function_return_value
852 .als doc-Fr-font doc-Ar-font
855 .\" NS Ic user macro
856 .\" NS   interactive command
857 .\" NS
858 .\" NS width register `Ic' set in doc-common
860 .als Ic doc-generic-macro
861 .ds doc-Ic-usage interactive_command
864 .\" NS Li user macro
865 .\" NS   literals
866 .\" NS
867 .\" NS width register `Li' set in doc-common
869 .als Li doc-generic-macro
870 .ds doc-Li-usage argument
873 .\" NS Ms user macro
874 .\" NS   math symbol
875 .\" NS
876 .\" NS   this function uses the `Sy' font
877 .\" NS
878 .\" NS width register `Ms' set in doc-common
880 .als Ms doc-generic-macro
881 .ds doc-Ms-usage math_symbol
882 .als doc-Ms-font doc-Sy-font
885 .\" NS doc-command-name global string
886 .\" NS   save first invocation of .Nm
888 .ds doc-command-name
891 .\" NS Nm user macro
892 .\" NS   name of command or page topic
893 .\" NS
894 .\" NS modifies:
895 .\" NS   doc-arg-ptr
896 .\" NS   doc-command-name
897 .\" NS   doc-curr-font
898 .\" NS   doc-curr-size
899 .\" NS   doc-indent-synopsis
900 .\" NS   doc-indent-synopsis-active
901 .\" NS   doc-macro-name
902 .\" NS
903 .\" NS width register `Nm' set in doc-common
905 .de Nm
906 .  if !\n[doc-arg-limit] \{\
907 .    ds doc-macro-name Nm
908 .    ie \n[.$] \
909 .      doc-parse-args \$@
910 .    el \{\
911 .      ie "\*[doc-command-name]"" \
912 .        tm Usage: .Nm name ... (#\n[.c])
913 .      el \
914 .        doc-parse-args \*[doc-command-name]
915 .  \}\}
917 .  if !\n[doc-arg-limit] \
918 .    return
920 .  nr doc-arg-ptr +1
921 .  doc-print-prefixes
922 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
923 .    \" last argument
924 .    ie "\*[doc-command-name]"" \{\
925 .      tm Usage: .Nm name ... (#\n[.c])
926 .      doc-reset-args
927 .    \}
928 .    el \{\
929 .      nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
930 .      doc-print-and-reset
931 .  \}\}
932 .  el \{\
933 .    nr doc-curr-font \n[.f]
934 .    nr doc-curr-size \n[.ps]
936 .    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
937 .      ie "\*[doc-command-name]"" \
938 .        tm Usage: .Nm name ... (#\n[.c])
939 .      el \{\
940 .        \" replace previous argument (Nm) with default value
941 .        nr doc-arg-ptr -1
942 .        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
943 .        nr doc-type\n[doc-arg-ptr] 2
944 .        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
946 .        \" recompute space vector for remaining arguments
947 .        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
948 .        nr doc-arg-limit \n[doc-arg-ptr]
949 .        doc-parse-space-vector
950 .    \}\}
951 .    el \{\
952 .      \" handle `.Nm ...' in SYNOPSIS
953 .      if \n[doc-in-synopsis-section] \{\
954 .        if "\*[doc-macro-name]"Nm" \{\
955 .          br
956 .          if !\n[doc-indent-synopsis] \{\
957 .            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
958 .            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
959 .          \}
960 .          if !\n[doc-indent-synopsis-active] \{\
961 .            in +\n[doc-indent-synopsis]u
962 .            nr doc-indent-synopsis-active 1
963 .          \}
964 .          ti -\n[doc-indent-synopsis]u
965 .      \}\}
966 .      if "\*[doc-command-name]"" \
967 .        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
969 .      nop \*[doc-Nm-font]\c
970 .    \}
971 .    doc-print-recursive
972 .  \}
976 .\" NS Pa user macro
977 .\" NS   pathname: `.Pa [arg ...]'
978 .\" NS
979 .\" NS modifies:
980 .\" NS   doc-arg-ptr
981 .\" NS   doc-curr-font
982 .\" NS   doc-curr-size
983 .\" NS   doc-macro-name
984 .\" NS
985 .\" NS width register `Pa' set in doc-common
987 .de Pa
988 .  if !\n[doc-arg-limit] \{\
989 .    ds doc-macro-name Pa
990 .    doc-parse-args \$@
992 .    if !\n[.$] \{\
993 .      \" default value
994 .      nop \*[doc-Pa-font]~\f[P]\s[0]
995 .  \}\}
997 .  if !\n[doc-arg-limit] \
998 .    return
1000 .  nr doc-arg-ptr +1
1001 .  doc-print-prefixes
1002 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1003 .    nr doc-curr-font \n[.f]
1004 .    nr doc-curr-size \n[.ps]
1005 .    nop \*[doc-Pa-font]\c
1006 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1007 .      \" replace previous argument (Pa) with default value
1008 .      nr doc-arg-ptr -1
1009 .      ds doc-arg\n[doc-arg-ptr] ~
1010 .      nr doc-type\n[doc-arg-ptr] 2
1011 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1013 .      \" recompute space vector for remaining arguments
1014 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1015 .      nr doc-arg-limit \n[doc-arg-ptr]
1016 .      doc-parse-space-vector
1017 .    \}
1018 .    doc-print-recursive
1019 .  \}
1020 .  el \{\
1021 .    nop \*[doc-Pa-font]~\f[P]\s[0]\c
1022 .    doc-print-and-reset
1023 .  \}
1027 .\" NS Sy user macro
1028 .\" NS   symbolics
1029 .\" NS
1030 .\" NS width register `Sy' set in doc-common
1032 .als Sy doc-generic-macro
1033 .ds doc-Sy-usage symbolic_text
1036 .\" NS Me user macro
1037 .\" NS   menu entries
1038 .\" NS
1039 .\" NS width register `Me' set in doc-common
1041 .als Me doc-generic-macro
1042 .ds doc-Me-usage menu_entry
1045 .\" NS Tn user macro
1046 .\" NS   trade name
1047 .\" NS
1048 .\" NS modifies:
1049 .\" NS   doc-arg-ptr
1050 .\" NS   doc-curr-font
1051 .\" NS   doc-curr-size
1052 .\" NS   doc-macro-name
1053 .\" NS
1054 .\" NS width register `Tn' set in doc-common
1056 .de Tn
1057 .  if !\n[doc-arg-limit] \{\
1058 .    ie \n[.$] \{\
1059 .      ds doc-macro-name Tn
1060 .      doc-parse-args \$@
1061 .    \}
1062 .    el \
1063 .      tm Usage: .Tn trade_name ... (#\n[.c])
1064 .  \}
1066 .  if !\n[doc-arg-limit] \
1067 .    return
1069 .  nr doc-arg-ptr +1
1070 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1071 .    nr doc-curr-font \n[.f]
1072 .    nr doc-curr-size \n[.ps]
1073 .    nop \)\*[doc-Tn-font-size]\c
1074 .    ie !\n[doc-is-reference] \{\
1075 .      nop \)\*[doc-Tn-font-shape]\c
1076 .      doc-print-recursive
1077 .    \}
1078 .    el \
1079 .      doc-do-references
1080 .  \}
1081 .  el \{\
1082 .    tm Usage: .Tn trade_name ... (#\n[.c])
1083 .    doc-reset-args
1084 .  \}
1088 .\" NS Va user macro
1089 .\" NS   variable name
1090 .\" NS
1091 .\" NS width register `Va' set in doc-common
1093 .als Va doc-generic-macro
1094 .ds doc-Va-usage variable_name
1097 .\" NS No user macro
1098 .\" NS   normal text macro (default text style if mess up)
1099 .\" NS
1100 .\" NS width register `No' set in doc-common
1102 .als No doc-generic-macro
1103 .ds doc-No-usage normal_text
1106 .\" NS doc-quote-left global string
1107 .\" NS   left quotation character for `doc-enclose-string' and
1108 .\" NS   `doc-enclose-open'
1110 .ds doc-quote-left
1113 .\" NS doc-quote-right global string
1114 .\" NS   right quotation character for `doc-enclose-string' and
1115 .\" NS   `doc-enclose-close'
1117 .ds doc-quote-right
1120 .\" NS Op user macro
1121 .\" NS   option expression (i.e., enclose string in square brackets)
1122 .\" NS
1123 .\" NS modifies:
1124 .\" NS   doc-macro-name
1125 .\" NS   doc-quote-left
1126 .\" NS   doc-quote-right
1127 .\" NS
1128 .\" NS width register `Op' set in doc-common
1130 .de Op
1131 .  if !\n[doc-arg-limit] \
1132 .    ds doc-macro-name Op
1134 .  ds doc-quote-left "\*[doc-left-bracket]
1135 .  ds doc-quote-right "\*[doc-right-bracket]
1137 .  doc-enclose-string \$@
1141 .\" NS Aq user macro
1142 .\" NS   enclose string in angle brackets
1143 .\" NS
1144 .\" NS modifies:
1145 .\" NS   doc-macro-name
1146 .\" NS   doc-quote-left
1147 .\" NS   doc-quote-right
1148 .\" NS
1149 .\" NS width register `Aq' set in doc-common
1151 .de Aq
1152 .  if !\n[doc-arg-limit] \
1153 .    ds doc-macro-name Aq
1155 .  ds doc-quote-left \[la]
1156 .  ds doc-quote-right \[ra]
1158 .  doc-enclose-string \$@
1162 .\" NS Bq user macro
1163 .\" NS   enclose string in square brackets
1164 .\" NS
1165 .\" NS modifies:
1166 .\" NS   doc-macro-name
1167 .\" NS   doc-quote-left
1168 .\" NS   doc-quote-right
1169 .\" NS
1170 .\" NS width register `Bq' set in doc-common
1172 .de Bq
1173 .  if !\n[doc-arg-limit] \
1174 .    ds doc-macro-name Bq
1176 .  ds doc-quote-left "\*[doc-left-bracket]
1177 .  ds doc-quote-right "\*[doc-right-bracket]
1179 .  doc-enclose-string \$@
1183 .\" NS Brq user macro
1184 .\" NS   enclose string in braces
1185 .\" NS
1186 .\" NS modifies:
1187 .\" NS   doc-macro-name
1188 .\" NS   doc-quote-left
1189 .\" NS   doc-quote-right
1190 .\" NS
1191 .\" NS width register `Brq' set in doc-common
1193 .de Brq
1194 .  if !\n[doc-arg-limit] \
1195 .    ds doc-macro-name Brq
1197 .  ds doc-quote-left {
1198 .  ds doc-quote-right }
1200 .  doc-enclose-string \$@
1204 .\" NS Dq user macro
1205 .\" NS   enclose string in double quotes
1206 .\" NS
1207 .\" NS modifies:
1208 .\" NS   doc-macro-name
1209 .\" NS   doc-quote-left
1210 .\" NS   doc-quote-right
1211 .\" NS
1212 .\" NS width register `Dq' set in doc-common
1214 .de Dq
1215 .  if !\n[doc-arg-limit] \
1216 .    ds doc-macro-name Dq
1218 .  ds doc-quote-left "\*[Lq]
1219 .  ds doc-quote-right "\*[Rq]
1221 .  doc-enclose-string \$@
1225 .\" NS Eq user macro
1226 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1227 .\" NS
1228 .\" NS modifies:
1229 .\" NS   doc-macro-name
1230 .\" NS   doc-quote-left
1231 .\" NS   doc-quote-right
1232 .\" NS
1233 .\" NS width register `Eq' set in doc-common
1235 .de Eq
1236 .  if !\n[doc-arg-limit] \
1237 .    ds doc-macro-name Eq
1239 .  ds doc-quote-left "\$1
1240 .  ds doc-quote-right "\$2
1242 .  shift 2
1243 .  doc-enclose-string \$@
1247 .\" NS Pq user macro
1248 .\" NS   enclose string in parentheses
1249 .\" NS
1250 .\" NS modifies:
1251 .\" NS   doc-macro-name
1252 .\" NS   doc-quote-left
1253 .\" NS   doc-quote-right
1254 .\" NS
1255 .\" NS width register `Pq' set in doc-common
1257 .de Pq
1258 .  if !\n[doc-arg-limit] \
1259 .    ds doc-macro-name Pq
1261 .  ds doc-quote-left "\*[doc-left-parenthesis]
1262 .  ds doc-quote-right "\*[doc-right-parenthesis]
1264 .  doc-enclose-string \$@
1268 .\" NS Ql user macro
1269 .\" NS   quoted literal
1271 .\"   is in file doc-[dit|n]roff
1274 .\" NS Qq user macro
1275 .\" NS   enclose string in straight double quotes
1276 .\" NS
1277 .\" NS modifies:
1278 .\" NS   doc-macro-name
1279 .\" NS   doc-quote-left
1280 .\" NS   doc-quote-right
1281 .\" NS
1282 .\" NS width register `Qq' set in doc-common
1284 .de Qq
1285 .  if !\n[doc-arg-limit] \
1286 .    ds doc-macro-name Qq
1288 .  ds doc-quote-left "\*[q]
1289 .  ds doc-quote-right "\*[q]
1291 .  doc-enclose-string \$@
1295 .\" NS Sq user macro
1296 .\" NS   enclose string in single quotes
1297 .\" NS
1298 .\" NS modifies:
1299 .\" NS   doc-macro-name
1300 .\" NS   doc-quote-left
1301 .\" NS   doc-quote-right
1302 .\" NS
1303 .\" NS width register `Sq' set in doc-common
1305 .de Sq
1306 .  if !\n[doc-arg-limit] \
1307 .    ds doc-macro-name Sq
1309 .  ds doc-quote-left "\*[doc-left-singlequote]
1310 .  ds doc-quote-right "\*[doc-right-singlequote]
1312 .  doc-enclose-string \$@
1316 .\" NS Es user macro
1317 .\" NS   set up arguments (i.e., the left and right quotation character as
1318 .\" NS   first and second argument) for .En call
1319 .\" NS
1320 .\" NS modifies:
1321 .\" NS   doc-arg-ptr
1322 .\" NS   doc-macro-name
1323 .\" NS   doc-quote-left
1324 .\" NS   doc-quote-right
1326 .de Es
1327 .  if !\n[doc-arg-limit] \{\
1328 .    ie (\n[.$] > 2) \{\
1329 .      ds doc-macro-name Es
1330 .      doc-parse-args \$@
1331 .    \}
1332 .    el \{\
1333 .      ds doc-quote-left "\$1
1334 .      ds doc-quote-right "\$2
1335 .  \}\}
1337 .  if !\n[doc-arg-limit] \
1338 .    return
1340 .  nr doc-arg-ptr +1
1341 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1342 .  nr doc-arg-ptr +1
1343 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1344 .  nr doc-arg-ptr +1
1345 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1346 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1347 .  el \
1348 .    doc-print-and-reset
1352 .\" NS doc-have-slot global register (bool)
1353 .\" NS   set if `doc-enclose-string' has created a slot for closing
1354 .\" NS   delimiter
1356 .nr doc-have-slot 0
1359 .\" NS doc-enclose-string macro
1360 .\" NS   enclose string with given args (e.g. [ and ])
1361 .\" NS
1362 .\" NS modifies:
1363 .\" NS   doc-arg-ptr
1364 .\" NS   doc-argXXX
1365 .\" NS   doc-have-slot
1366 .\" NS
1367 .\" NS local variables:
1368 .\" NS   doc-reg-des
1369 .\" NS   doc-reg-des1
1370 .\" NS   doc-reg-des2
1371 .\" NS
1372 .\" NS requires:
1373 .\" NS   doc-quote-left
1374 .\" NS   doc-quote-right
1376 .de doc-enclose-string
1377 .  if \n[doc-in-synopsis-section] \
1378 .    doc-set-hard-space
1380 .  if !\n[doc-arg-limit] \{\
1381 .    ie \n[.$] \
1382 .      doc-parse-args \$@
1383 .    el \{\
1384 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1385 .  \}\}
1387 .  if !\n[doc-arg-limit] \
1388 .    return
1390 .  nr doc-curr-font \n[.f]
1391 .  nr doc-curr-size \n[.ps]
1393 .  nr doc-arg-ptr +1
1394 .  doc-print-prefixes
1395 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1396 .  nop \)\*[doc-quote-left]\)\c
1397 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1398 .    \" last argument
1399 .    nop \)\*[doc-quote-right]\)\c
1400 .    doc-print-and-reset
1401 .  \}
1402 .  el \{\
1403 .    \" test whether last arguments are of type closing punctuation
1404 .    \" resp. suffix
1405 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1406 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1407 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1408 .        nr doc-reg-des -1
1410 .      \" prepend closing delimiter
1411 .      nr doc-reg-des +1
1412 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1413 .    \}
1414 .    el \{\
1415 .      \" test whether last arguments are macros which continue the line
1416 .      \" logically
1417 .      nr doc-reg-des \n[doc-arg-limit]
1418 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1419 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1420 .          break
1421 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1422 .          break
1423 .        nr doc-reg-des -1
1424 .      \}
1426 .      \" if there are no trailing macros to be skipped, append argument
1427 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1428 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1429 .      el \{\
1430 .        \" if a previous call to `doc-enclose-string' has already created
1431 .        \" a slot, prepend argument
1432 .        ie \n[doc-have-slot] \
1433 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1434 .        el \{\
1435 .          \" we have to shift all arguments to the right
1436 .          nr doc-reg-des +1
1437 .          nr doc-reg-des1 \n[doc-arg-limit]
1438 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1439 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1440 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1441 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1442 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1443 .            nr doc-reg-des1 -1
1444 .            nr doc-reg-des2 -1
1445 .          \}
1446 .          nr doc-arg-limit +1
1448 .          \" finally, insert closing delimiter into the freed slot and
1449 .          \" recompute spacing vector
1450 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1451 .          nr doc-type\n[doc-reg-des] 3
1452 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1453 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1454 .          doc-parse-space-vector
1455 .          nr doc-have-slot 1
1456 .    \}\}\}
1458 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1459 .  \}
1461 .  if \n[doc-in-synopsis-section] \
1462 .    doc-set-soft-space
1466 .\" NS En user macro
1467 .\" NS   enclose arguments with quotation characters set up with `.Es'
1469 .als En doc-enclose-string
1472 .\" NS Ao user macro
1473 .\" NS   angle open
1474 .\" NS
1475 .\" NS modifies:
1476 .\" NS   doc-macro-name
1477 .\" NS   doc-quote-left
1478 .\" NS
1479 .\" NS width register `Ao' set in doc-common
1481 .de Ao
1482 .  if !\n[doc-arg-limit] \
1483 .    ds doc-macro-name Ao
1485 .  ds doc-quote-left \[la]
1487 .  doc-enclose-open \$@
1491 .\" NS Ac user macro
1492 .\" NS   angle close
1493 .\" NS
1494 .\" NS modifies:
1495 .\" NS   doc-macro-name
1496 .\" NS   doc-quote-right
1497 .\" NS
1498 .\" NS width register `Ac' set in doc-common
1500 .de Ac
1501 .  if !\n[doc-arg-limit] \
1502 .    ds doc-macro-name Ac
1504 .  ds doc-quote-right \[ra]
1506 .  doc-enclose-close \$@
1510 .\" NS Bo user macro
1511 .\" NS   bracket open
1512 .\" NS
1513 .\" NS modifies:
1514 .\" NS   doc-macro-name
1515 .\" NS   doc-quote-left
1516 .\" NS
1517 .\" NS width register `Bo' set in doc-common
1519 .de Bo
1520 .  if !\n[doc-arg-limit] \
1521 .    ds doc-macro-name Bo
1523 .  ds doc-quote-left "\*[doc-left-bracket]
1525 .  doc-enclose-open \$@
1529 .\" NS Bc user macro
1530 .\" NS   bracket close
1531 .\" NS
1532 .\" NS modifies:
1533 .\" NS   doc-macro-name
1534 .\" NS   doc-quote-right
1535 .\" NS
1536 .\" NS width register `Bc' set in doc-common
1538 .de Bc
1539 .  if !\n[doc-arg-limit] \
1540 .    ds doc-macro-name Bc
1542 .  ds doc-quote-right "\*[doc-right-bracket]
1544 .  doc-enclose-close \$@
1548 .\" NS Bro user macro
1549 .\" NS   brace open
1550 .\" NS
1551 .\" NS modifies:
1552 .\" NS   doc-macro-name
1553 .\" NS   doc-quote-left
1554 .\" NS
1555 .\" NS width register `Bro' set in doc-common
1557 .de Bro
1558 .  if !\n[doc-arg-limit] \
1559 .    ds doc-macro-name Bo
1561 .  ds doc-quote-left {
1563 .  doc-enclose-open \$@
1567 .\" NS Brc user macro
1568 .\" NS   brace close
1569 .\" NS
1570 .\" NS modifies:
1571 .\" NS   doc-macro-name
1572 .\" NS   doc-quote-right
1573 .\" NS
1574 .\" NS width register `Brc' set in doc-common
1576 .de Brc
1577 .  if !\n[doc-arg-limit] \
1578 .    ds doc-macro-name Bc
1580 .  ds doc-quote-right }
1582 .  doc-enclose-close \$@
1586 .\" NS Do user macro
1587 .\" NS   double quote open
1588 .\" NS
1589 .\" NS modifies:
1590 .\" NS   doc-macro-name
1591 .\" NS   doc-quote-left
1592 .\" NS
1593 .\" NS width register `Do' set in doc-common
1595 .de Do
1596 .  if !\n[doc-arg-limit] \
1597 .    ds doc-macro-name Do
1599 .  ds doc-quote-left "\*[Lq]
1601 .  doc-enclose-open \$@
1605 .\" NS Dc user macro
1606 .\" NS   double quote close
1607 .\" NS
1608 .\" NS modifies:
1609 .\" NS   doc-macro-name
1610 .\" NS   doc-quote-right
1611 .\" NS
1612 .\" NS width register `Dc' set in doc-common
1614 .de Dc
1615 .  if !\n[doc-arg-limit] \
1616 .    ds doc-macro-name Dc
1618 .  ds doc-quote-right "\*[Rq]
1620 .  doc-enclose-close \$@
1624 .\" NS Eo user macro
1625 .\" NS   enclose open (using first argument as beginning of enclosure)
1626 .\" NS
1627 .\" NS modifies:
1628 .\" NS   doc-macro-name
1629 .\" NS   doc-quote-left
1630 .\" NS
1631 .\" NS width register `Eo' set in doc-common
1633 .de Eo
1634 .  if !\n[doc-arg-limit] \
1635 .    ds doc-macro-name Eo
1637 .  ds doc-quote-left "\$1
1639 .  shift
1640 .  doc-enclose-open \$@
1644 .\" NS Ec user macro
1645 .\" NS   enclose close (using first argument as end of enclosure)
1646 .\" NS
1647 .\" NS modifies:
1648 .\" NS   doc-macro-name
1649 .\" NS   doc-quote-right
1650 .\" NS
1651 .\" NS width register `Ec' set in doc-common
1653 .de Ec
1654 .  if !\n[doc-arg-limit] \
1655 .    ds doc-macro-name Ec
1657 .  ds doc-quote-right "\$1
1659 .  shift
1660 .  doc-enclose-close \$@
1664 .\" NS Oo user macro
1665 .\" NS   option open
1666 .\" NS
1667 .\" NS modifies:
1668 .\" NS   doc-macro-name
1669 .\" NS   doc-quote-left
1670 .\" NS
1671 .\" NS width register `Oo' set in doc-common
1673 .de Oo
1674 .  if !\n[doc-arg-limit] \
1675 .    ds doc-macro-name Oo
1677 .  ds doc-quote-left [
1679 .  doc-enclose-open \$@
1683 .\" NS Oc user macro
1684 .\" NS   option close
1685 .\" NS
1686 .\" NS modifies:
1687 .\" NS   doc-macro-name
1688 .\" NS   doc-quote-right
1689 .\" NS
1690 .\" NS width register `Oc' set in doc-common
1692 .de Oc
1693 .  if !\n[doc-arg-limit] \
1694 .    ds doc-macro-name Oc
1696 .  ds doc-quote-right ]
1698 .  doc-enclose-close \$@
1702 .\" NS Po user macro
1703 .\" NS   parenthesis open
1704 .\" NS
1705 .\" NS modifies:
1706 .\" NS   doc-macro-name
1707 .\" NS   doc-quote-left
1708 .\" NS
1709 .\" NS width register `Po' set in doc-common
1711 .de Po
1712 .  if !\n[doc-arg-limit] \
1713 .    ds doc-macro-name Po
1715 .  ds doc-quote-left "\*[doc-left-parenthesis]
1717 .  doc-enclose-open \$@
1721 .\" NS Pc user macro
1722 .\" NS   parenthesis close
1723 .\" NS
1724 .\" NS modifies:
1725 .\" NS   doc-macro-name
1726 .\" NS   doc-quote-right
1727 .\" NS
1728 .\" NS width register `Pc' set in doc-common
1730 .de Pc
1731 .  if !\n[doc-arg-limit] \
1732 .    ds doc-macro-name Pc
1734 .  ds doc-quote-right "\*[doc-right-parenthesis]
1736 .  doc-enclose-close \$@
1740 .\" NS Qo user macro
1741 .\" NS   straight double quote open
1742 .\" NS
1743 .\" NS modifies:
1744 .\" NS   doc-macro-name
1745 .\" NS   doc-quote-left
1746 .\" NS
1747 .\" NS width register `Qo' set in doc-common
1749 .de Qo
1750 .  if !\n[doc-arg-limit] \
1751 .    ds doc-macro-name Qo
1753 .  ds doc-quote-left "\*[q]
1755 .  doc-enclose-open \$@
1759 .\" NS Qc user macro
1760 .\" NS   straight double quote close
1761 .\" NS
1762 .\" NS modifies:
1763 .\" NS   doc-macro-name
1764 .\" NS   doc-quote-right
1765 .\" NS
1766 .\" NS width register `Qc' set in doc-common
1768 .de Qc
1769 .  if !\n[doc-arg-limit] \
1770 .    ds doc-macro-name Qc
1772 .  ds doc-quote-right "\*[q]
1774 .  doc-enclose-close \$@
1778 .\" NS So user macro
1779 .\" NS   single quote open
1780 .\" NS
1781 .\" NS modifies:
1782 .\" NS   doc-macro-name
1783 .\" NS   doc-quote-left
1784 .\" NS
1785 .\" NS width register `So' set in doc-common
1787 .de So
1788 .  if !\n[doc-arg-limit] \
1789 .    ds doc-macro-name So
1791 .  ds doc-quote-left "\*[doc-left-singlequote]
1793 .  doc-enclose-open \$@
1797 .\" NS Sc user macro
1798 .\" NS   single quote close
1799 .\" NS
1800 .\" NS modifies:
1801 .\" NS   doc-macro-name
1802 .\" NS   doc-quote-right
1803 .\" NS
1804 .\" NS width register `Sc' set in doc-common
1806 .de Sc
1807 .  if !\n[doc-arg-limit] \
1808 .    ds doc-macro-name Sc
1810 .  ds doc-quote-right "\*[doc-right-singlequote]
1812 .  doc-enclose-close \$@
1816 .\" NS Xo user macro
1817 .\" NS   extend open
1818 .\" NS
1819 .\" NS modifies:
1820 .\" NS   doc-macro-name
1821 .\" NS   doc-quote-left
1822 .\" NS
1823 .\" NS width register `Xo' set in doc-common
1825 .de Xo
1826 .  if !\n[doc-arg-limit] \
1827 .    ds doc-macro-name Xo
1829 .  ds doc-quote-left
1831 .  doc-enclose-open \$@
1835 .\" NS Xc user macro
1836 .\" NS   extend close
1837 .\" NS
1838 .\" NS modifies:
1839 .\" NS   doc-macro-name
1840 .\" NS   doc-quote-right
1841 .\" NS
1842 .\" NS width register `Xc' set in doc-common
1844 .de Xc
1845 .  if !\n[doc-arg-limit] \
1846 .    ds doc-macro-name Xc
1848 .  ds doc-quote-right
1850 .  doc-enclose-close \$@
1854 .\" NS doc-nesting-level global register
1855 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1857 .nr doc-nesting-level 0
1860 .\" NS doc-in-list global register (bool)
1861 .\" NS   whether we are in (logical) .It
1863 .nr doc-in-list 0
1866 .\" NS doc-enclose-open macro
1867 .\" NS   enclose string open
1868 .\" NS
1869 .\" NS modifies:
1870 .\" NS   doc-arg-ptr
1871 .\" NS   doc-nesting-level
1873 .de doc-enclose-open
1874 .  if !\n[doc-arg-limit] \
1875 .    doc-parse-args \$@
1877 .  nr doc-arg-ptr +1
1878 .  doc-print-prefixes
1879 .  nr doc-arg-ptr -1
1881 .  nop \)\*[doc-quote-left]\)\c
1883 .  \" start enclosure box
1884 .  box doc-enclosure-box\n[doc-nesting-level]
1885 .  ev doc-enclosure-env\n[doc-nesting-level]
1886 .  evc 0
1887 .  in 0
1888 .  nf
1889 .  \" we insert something to make .chop always work
1890 .  nop \&\c
1892 .  \" increase nesting level *after* parsing of arguments
1893 .  nr doc-nesting-level +1
1895 .  if \n[doc-arg-limit] \{\
1896 .    nr doc-arg-ptr +1
1897 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1898 .      doc-print-recursive
1899 .    el \
1900 .      doc-reset-args
1901 .  \}
1905 .\" NS doc-enclose-close macro
1906 .\" NS   enclose string close
1907 .\" NS
1908 .\" NS modifies:
1909 .\" NS   doc-nesting-level
1911 .de doc-enclose-close
1912 .  nr doc-nesting-level -1
1914 .  \" finish enclosure box
1915 .  br
1916 .  ev
1917 .  box
1918 .  chop doc-enclosure-box\n[doc-nesting-level]
1919 .  unformat doc-enclosure-box\n[doc-nesting-level]
1921 .  nh
1922 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1923 .  nop \)\*[doc-quote-right]\)\c
1925 .  if !\n[doc-arg-limit] \{\
1926 .    doc-parse-args \$@
1928 .    if !\n[.$] \
1929 .      doc-print-and-reset
1930 .  \}
1932 .  if \n[doc-arg-limit] \{\
1933 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1934 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1935 .      nr doc-arg-ptr +1
1936 .      doc-print-recursive
1937 .    \}
1938 .    el \
1939 .      doc-print-and-reset
1940 .  \}
1942 .  \" shall we finish .It request?
1943 .  if !"\*[doc-macro-name]"It" \
1944 .    if \n[doc-in-list] \
1945 .      if !\n[doc-nesting-level] \
1946 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
1950 .\" NS Pf user macro
1951 .\" NS   prefix: `.Pf prefix arg ...'
1952 .\" NS
1953 .\" NS modifies:
1954 .\" NS   doc-arg-ptr
1955 .\" NS   doc-macro-name
1956 .\" NS   doc-quote-left
1957 .\" NS
1958 .\" NS width register `Pf' set in doc-common
1960 .de Pf
1961 .  if !\n[doc-arg-limit] \
1962 .    ds doc-macro-name Pf
1964 .  ie \n[doc-arg-limit] \{\
1965 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
1966 .      nr doc-arg-ptr +1
1967 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
1968 .    \}
1969 .    el \
1970 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
1971 .  \}
1972 .  el \{\
1973 .    nop \)\$1\)\c
1974 .    shift
1975 .    ie \n[.$] \
1976 .      doc-parse-args \$@
1977 .    el \{\
1978 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
1979 .      nop \)
1980 .  \}\}
1982 .  if \n[doc-arg-limit] \{\
1983 .    nr doc-arg-ptr +1
1984 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
1985 .      doc-print-and-reset
1986 .    el \
1987 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
1988 .  \}
1992 .\" NS Ns user macro
1993 .\" NS   remove space (space removal done by `doc-parse-args')
1994 .\" NS
1995 .\" NS modifies:
1996 .\" NS   doc-argXXX
1997 .\" NS   doc-macro-name
1998 .\" NS
1999 .\" NS width register `Ns' set in doc-common
2001 .de Ns
2002 .  if !\n[doc-arg-limit] \{\
2003 .    ie \n[.$] \{\
2004 .      ds doc-macro-name Ns
2005 .      doc-parse-args \$@
2006 .    \}
2007 .    el \
2008 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2009 .  \}
2011 .  if \n[doc-arg-limit] \{\
2012 .    nr doc-arg-ptr +1
2013 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2014 .      doc-print-recursive
2015 .    el \
2016 .      doc-reset-args
2017 .  \}
2021 .\" NS Ap user macro
2022 .\" NS   append an apostrophe
2023 .\" NS
2024 .\" NS width register `Ap' set in doc-common
2026 .de Ap
2027 .  ie !\n[doc-arg-limit] \
2028 .    tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
2029 .  el \{\
2030 .    nop \)'\)\c
2031 .    nr doc-arg-ptr +1
2032 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2033 .      doc-print-recursive
2034 .    el \
2035 .      doc-reset-args
2036 .  \}
2040 .\" NS doc-space global string
2041 .\" NS   current inter-argument space
2043 .ds doc-space "\*[doc-soft-space]
2046 .\" NS doc-soft-space constant string
2047 .\" NS   soft (stretchable) space (defined in doc-common)
2050 .\" NS doc-hard-space constant string
2051 .\" NS   hard (unpaddable) space (defined in doc-common)
2054 .\" NS doc-set-hard-space macro
2055 .\" NS   set current space string to hard (unpaddable) space.
2056 .\" NS
2057 .\" NS modifies:
2058 .\" NS   doc-saved-space
2059 .\" NS   doc-space
2061 .de doc-set-hard-space
2062 .  ie "\*[doc-space]"" \
2063 .    ds doc-saved-space "\*[doc-hard-space]
2064 .  el \
2065 .    ds doc-space "\*[doc-hard-space]
2069 .\" NS doc-set-soft-space macro
2070 .\" NS   set current space string to soft space
2071 .\" NS
2072 .\" NS modifies:
2073 .\" NS   doc-saved-space
2074 .\" NS   doc-space
2076 .de doc-set-soft-space
2077 .  ie "\*[doc-space]"" \
2078 .    ds doc-saved-space "\*[doc-soft-space]
2079 .  el \
2080 .    ds doc-space "\*[doc-soft-space]
2084 .\" NS doc-space-mode global register (bool)
2085 .\" NS   default is one (space mode on)
2087 .nr doc-space-mode 1
2090 .\" NS doc-saved-space global string
2091 .\" NS   saved value of `doc-space'
2093 .ds doc-saved-space "\*[doc-space]
2096 .\" NS doc-have-space global register (bool)
2097 .\" NS   set if last command was horizontal space
2099 .nr doc-have-space 0
2102 .\" NS Sm user macro
2103 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2104 .\" NS
2105 .\" NS   without argument, toggle space mode
2106 .\" NS
2107 .\" NS modifies:
2108 .\" NS   doc-arg-limit
2109 .\" NS   doc-arg-ptr
2110 .\" NS   doc-argXXX
2111 .\" NS   doc-macro-name
2112 .\" NS   doc-num-args
2113 .\" NS   doc-saved-space
2114 .\" NS   doc-space
2115 .\" NS   doc-space-mode
2116 .\" NS   doc-spaceXXX
2117 .\" NS
2118 .\" NS local variables:
2119 .\" NS   doc-reg-Sm
2120 .\" NS
2121 .\" NS width register `Sm' set in doc-common
2123 .de Sm
2124 .  ie \n[doc-have-space] \
2125 .    nr doc-reg-Sm 0
2126 .  el \
2127 .    nr doc-reg-Sm 1
2129 .  if !\n[doc-arg-limit] \{\
2130 .    ie \n[.$] \{\
2131 .      ds doc-macro-name Sm
2132 .      doc-parse-args \$@
2133 .    \}
2134 .    el \{\
2135 .      ie \n[doc-space-mode] \
2136 .        nr doc-space-mode 0
2137 .      el \
2138 .        nr doc-space-mode 1
2139 .  \}\}
2141 .  if !\n[doc-arg-limit] \
2142 .    return
2144 .  nr doc-arg-ptr +1
2146 .  \" avoid a warning message in case `Sm' is the last parameter
2147 .  if !d doc-arg\n[doc-arg-ptr] \
2148 .    ds doc-arg\n[doc-arg-ptr]
2150 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2151 .    ds doc-space "\*[doc-saved-space]
2152 .    nr doc-space-mode 1
2153 .  \}
2154 .  el \{\
2155 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2156 .      ds doc-saved-space "\*[doc-space]
2157 .      ds doc-space
2158 .      nr doc-space-mode 0
2159 .    \}
2160 .    el \{\
2161 .      \" no argument for Sm
2162 .      nr doc-arg-ptr -1
2163 .      ie \n[doc-space-mode] \
2164 .        nr doc-space-mode 0
2165 .      el \
2166 .        nr doc-space-mode 1
2167 .  \}\}
2169 .  ie \n[doc-space-mode] \{\
2170 .    \" recompute space vector for remaining arguments
2171 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2172 .    nr doc-arg-limit \n[doc-arg-ptr]
2173 .    if \n[doc-num-args] \
2174 .      doc-parse-space-vector
2176 .    \" finish line only if it is interrupted and `doc-have-space'
2177 .    \" isn't set
2178 .    if \n[doc-reg-Sm] \
2179 .      if \n[.int] \
2180 .        nop \)
2181 .  \}
2182 .  el \{\
2183 .    \" reset remaining space vector elements
2184 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2185 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2186 .      ds doc-space\n[doc-reg-Sm]
2187 .      nr doc-reg-Sm +1
2188 .      \" the body of a `while' request must end with the fitting `\}'!
2189 .    \}
2190 .  \}
2192 .  \" do we have parameters to print?
2193 .  ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2194 .    \" ignore `.Sm on' and `.Sm off' without additional parameters
2195 .    ie (\n[doc-arg-ptr] > 1) \
2196 .      doc-print-and-reset
2197 .    el \
2198 .      doc-reset-args
2199 .  \}
2200 .  el \{\
2201 .    \" skip `Sm' argument
2202 .    nr doc-arg-ptr +1
2203 .    doc-print-recursive
2204 .  \}
2208 .\" NS doc-arg-type immediate register
2209 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2210 .\" NS   punctuation prefix=4)
2212 .nr doc-arg-type 0
2215 .\" NS doc-get-arg-type macro
2216 .\" NS   get argument type
2217 .\" NS
2218 .\" NS   this macro expects the width of the argument in `doc-width'
2219 .\" NS
2220 .\" NS modifies:
2221 .\" NS   doc-arg-type
2223 .de doc-get-arg-type
2224 .  nr doc-arg-type 2
2226 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2227 .    ie (\n[doc-width] == 1) \{\
2228 .      if r doc-punct\$1 \
2229 .        nr doc-arg-type \n[doc-punct\$1]
2230 .    \}
2231 .    el \
2232 .      if r \$1 \
2233 .        if d \$1 \
2234 .          nr doc-arg-type 1
2235 .  \}
2239 .\" NS doc-get-arg-type* macro
2240 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2241 .\" NS
2242 .\" NS   this macro sets the `doc-width' register using the `length' request
2243 .\" NS   to get the number of characters in a string literally
2244 .\" NS
2245 .\" NS modifies:
2246 .\" NS   doc-arg-type
2247 .\" NS   doc-width
2249 .de doc-get-arg-type*
2250 .  nr doc-arg-type 2
2251 .  length doc-width "\*[doc-arg\$1]
2253 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2254 .    ie (\n[doc-width] == 1) \{\
2255 .      if r doc-punct\*[doc-arg\$1] \
2256 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2257 .    \}
2258 .    el \
2259 .      if r \*[doc-arg\$1] \
2260 .        if d \*[doc-arg\$1] \
2261 .          nr doc-arg-type 1
2262 .  \}
2266 .\" NS doc-set-spacing-1 macro
2267 .\" NS   set spacing for macros
2268 .\" NS
2269 .\" NS modifies:
2270 .\" NS   doc-spaceXXX
2271 .\" NS
2272 .\" NS local variables:
2273 .\" NS   doc-reg-dssfm
2274 .\" NS   doc-reg-dssfm1
2276 .de doc-set-spacing-1
2277 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2279 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2280 .  \" argument)
2281 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2282 .    if \n[doc-arg-limit] \{\
2283 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2284 .      ds doc-space\n[doc-reg-dssfm]
2285 .    \}
2286 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2287 .  \}
2288 .  el \{\
2289 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2290 .    \" argument)
2291 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2292 .      if \n[doc-arg-limit] \{\
2293 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2294 .        ds doc-space\n[doc-reg-dssfm]
2295 .      \}
2296 .      ds doc-space\n[doc-arg-limit]
2297 .    \}
2298 .    el \
2299 .      ds doc-space\n[doc-arg-limit]
2300 .  \}
2304 .\" NS doc-set-spacing-2 macro
2305 .\" NS   set spacing for strings
2306 .\" NS
2307 .\" NS modifies:
2308 .\" NS   doc-spaceXXX
2310 .de doc-set-spacing-2
2311 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2315 .\" NS doc-set-spacing-3 macro
2316 .\" NS   set spacing for punctuation suffixes
2317 .\" NS
2318 .\" NS modifies:
2319 .\" NS   doc-spaceXXX
2320 .\" NS
2321 .\" NS local variables:
2322 .\" NS   doc-reg-dssfps
2324 .de doc-set-spacing-3
2325 .  if \n[doc-arg-limit] \{\
2326 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2327 .    ds doc-space\n[doc-reg-dssfps]
2328 .  \}
2330 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2334 .\" NS doc-set-spacing-4 macro
2335 .\" NS   set spacing for punctuation prefixes
2336 .\" NS
2337 .\" NS modifies:
2338 .\" NS   doc-spaceXXX
2340 .de doc-set-spacing-4
2341 .  ds doc-space\n[doc-arg-limit]
2345 .\" type switches (on current argument doc-arg-ptr)
2348 .\" NS doc-do-1 macro
2349 .\" NS   call request if macro
2351 .de doc-do-1
2352 .  \*[doc-arg\n[doc-arg-ptr]]
2356 .\" NS doc-do-2 macro
2357 .\" NS   call .doc-print-recursive if string
2359 .als doc-do-2 doc-print-recursive
2362 .\" NS doc-do-3 macro
2363 .\" NS   call .doc-print-recursive if punctuation suffix
2365 .als doc-do-3 doc-print-recursive
2368 .\" NS doc-do-4 macro
2369 .\" NS   call .doc-print-recursive if punctuation prefix
2371 .als doc-do-4 doc-print-recursive
2374 .\" NS doc-fontmode-depth global register
2375 .\" NS   font mode level
2377 .nr doc-fontmode-depth 0
2380 .\" NS doc-fontmode-font-stackXXX global register
2381 .\" NS   stack of saved current font values from `Bf' request
2382 .\" NS
2383 .\" NS limit:
2384 .\" NS   doc-fontmode-depth
2386 .nr doc-fontmode-font-stack0 0
2389 .\" NS doc-fontmode-size-stackXXX global register
2390 .\" NS   stack of saved current size values from `Bf' request
2391 .\" NS
2392 .\" NS limit:
2393 .\" NS   doc-fontmode-depth
2395 .nr doc-fontmode-size-stack0 0
2398 .\" NS Bf user macro
2399 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2400 .\" NS
2401 .\" NS modifies:
2402 .\" NS   doc-fontmode-depth
2403 .\" NS   doc-fontmode-font-stackXXX
2404 .\" NS   doc-fontmode-size-stackXXX
2405 .\" NS   doc-macro-name
2406 .\" NS
2407 .\" NS width register `Bf' set in doc-common
2409 .de Bf
2410 .  ds doc-macro-name Bf
2412 .  ie \n[.$] \{\
2413 .    nr doc-fontmode-depth +1
2415 .    \" save current font and size
2416 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2417 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2419 .    ie        "\$1"Em" \
2420 .      nop \*[doc-Em-font]\c
2421 .    el \{ .ie "\$1"Li" \
2422 .      nop \*[doc-Li-font]\c
2423 .    el \{ .ie "\$1"Sy" \
2424 .      nop \*[doc-Sy-font]\c
2425 .    el \{ .ie "\$1"-emphasis" \
2426 .      nop \*[doc-Em-font]\c
2427 .    el \{ .ie "\$1"-literal" \
2428 .      nop \*[doc-Li-font]\c
2429 .    el \{ .ie "\$1"-symbolic" \
2430 .      nop \*[doc-Sy-font]\c
2431 .    el \{\
2432 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf request
2433 .      tm1 " (#\n[.c])
2434 .  \}\}\}\}\}\}\}
2435 .  el \
2436 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2440 .\" NS Ef user macro
2441 .\" NS   end font mode
2442 .\" NS
2443 .\" NS modifies:
2444 .\" NS   doc-macro-name
2445 .\" NS
2446 .\" NS width register `Ef' set in doc-common
2448 .de Ef
2449 .  ds doc-macro-name Ef
2451 .  ie \n[doc-fontmode-depth] \{\
2452 .    \" restore saved font and size
2453 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2454 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2456 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2457 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2458 .    nr doc-fontmode-depth -1
2459 .  \}
2460 .  el \
2461 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2465 .\" NS doc-keep-type global register
2466 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2468 .nr doc-keep-type 0
2471 .\" NS Bk user macro
2472 .\" NS   begin keep
2473 .\" NS
2474 .\" NS modifies:
2475 .\" NS   doc-keep-type
2476 .\" NS   doc-macro-name
2477 .\" NS
2478 .\" NS width register `Bk' set in doc-common
2480 .de Bk
2481 .  ds doc-macro-name Bk
2483 .  if \n[doc-keep-type] \
2484 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2486 .  ie        "\$1"-lines" \{\
2487 .    nr doc-keep-type 2
2488 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2489 .  \}
2490 .  el \{ .ie "\$1"-words" \{\
2491 .    nr doc-keep-type 1
2492 .    doc-set-hard-space
2493 .  \}
2494 .  el \{ .ie "\$1"" \{\
2495 .    \" default
2496 .    nr doc-keep-type 1
2497 .    doc-set-hard-space
2498 .  \}
2499 .  el \{\
2500 .    tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
2501 .    nr doc-keep-type 3
2502 .  \}\}\}
2504 \#.  nr doc-nesting-level +1
2508 .\" NS Ek user macro
2509 .\" NS   end keep
2510 .\" NS
2511 .\" NS modifies:
2512 .\" NS   doc-keep-type
2513 .\" NS   doc-macro-name
2514 .\" NS
2515 .\" NS width register `Ek' set in doc-common
2517 .de Ek
2518 .  ds doc-macro-name Ek
2520 \#.  nr doc-nesting-level -1
2522 .  ie \n[.$] \
2523 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2524 .  el \{\
2525 .    if !\n[doc-keep-type] \
2526 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2528 .    ie        (\n[doc-keep-type] == 1) \
2529 .      doc-set-soft-space
2530 .    el \{ .if (\n[doc-keep-type] == 2) \
2531 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2532 .  \}\}
2534 .  nr doc-keep-type 0
2536 \#.  if !"\*[doc-out-string]"" \
2537 \#.    doc-print-out-string
2541 .\" NS doc-display-depth global register
2542 .\" NS   display level
2544 .nr doc-display-depth 0
2547 .\" NS doc-is-compact global register (bool)
2548 .\" NS   set if the `compact' keyword is given
2550 .nr doc-is-compact 0
2553 .\" NS doc-display-type-stackXXX global string
2554 .\" NS   the display type stack
2555 .\" NS
2556 .\" NS limit:
2557 .\" NS   doc-display-depth
2559 .ds doc-display-type-stack0
2562 .\" NS doc-display-indent-stackXXX global register
2563 .\" NS   stack of display indentation values
2564 .\" NS
2565 .\" NS limit:
2566 .\" NS   doc-display-depth
2568 .nr doc-display-indent-stack0 0
2571 .\" NS doc-display-ad-stackXXX global register
2572 .\" NS   stack of saved adjustment modes
2573 .\" NS
2574 .\" NS limit:
2575 .\" NS   doc-display-depth
2577 .nr doc-display-ad-stack0 0
2580 .\" NS doc-display-fi-stackXXX global register
2581 .\" NS   stack of saved fill modes
2582 .\" NS
2583 .\" NS limit:
2584 .\" NS   doc-display-depth
2586 .nr doc-display-fi-stack0 0
2589 .\" NS doc-display-ft-stackXXX global register
2590 .\" NS   stack of saved fonts
2591 .\" NS
2592 .\" NS limit:
2593 .\" NS   doc-display-depth
2595 .nr doc-display-ft-stack0 0
2598 .\" NS doc-display-ps-stackXXX global register
2599 .\" NS   stack of saved font sizes
2600 .\" NS
2601 .\" NS limit:
2602 .\" NS   doc-display-depth
2604 .nr doc-display-ps-stack0 0
2607 .\" NS Bd user macro
2608 .\" NS   begin display
2609 .\" NS
2610 .\" NS width register `Bd' set in doc-common
2611 .\" NS
2612 .\" NS modifies:
2613 .\" NS   doc-curr-font
2614 .\" NS   doc-curr-size
2615 .\" NS   doc-display-depth
2616 .\" NS   doc-display-ad-stackXXX
2617 .\" NS   doc-display-fi-stackXXX
2618 .\" NS   doc-display-ft-stackXXX
2619 .\" NS   doc-display-ps-stackXXX
2620 .\" NS   doc-display-file
2621 .\" NS   doc-display-indent-stackXXX
2622 .\" NS   doc-display-type-stackXXX
2623 .\" NS   doc-is-compact
2624 .\" NS   doc-macro-name
2625 .\" NS
2626 .\" NS local variables:
2627 .\" NS   doc-reg-Bd
2629 .de Bd
2630 .  ds doc-macro-name Bd
2632 .  if !\n[.$] \{\
2633 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2634 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2635 .    return
2636 .  \}
2638 .  nr doc-is-compact 0
2639 .  ds doc-display-file
2640 .  nr doc-reg-Bd 1
2641 .  nr doc-display-depth +1
2643 .  \" save current adjustment and fill modes
2644 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2645 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2647 .  ie        "\$1"-literal" \{\
2648 .    ds doc-display-type-stack\n[doc-display-depth] literal
2649 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2650 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2652 .    ie t \{\
2653 .      nop \*[doc-Li-font]\c
2654 '      ta T 9n
2655 .    \}
2656 .    el \
2657 '      ta T 8n
2658 .    nf
2659 .  \}
2660 .  el \{ .ie "\$1"-filled" \{\
2661 .    ds doc-display-type-stack\n[doc-display-depth] filled
2662 .    ad b
2663 .    fi
2664 .  \}
2665 .  el \{ .ie "\$1"-ragged" \{\
2666 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2667 .    na
2668 .    fi
2669 .  \}
2670 .  el \{ .ie "\$1"-centered" \{\
2671 .    ds doc-display-type-stack\n[doc-display-depth] centered
2672 .    ad c
2673 .    fi
2674 .  \}
2675 .  el \{ .ie "\$1"-unfilled" \{\
2676 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2677 .    nf
2678 .  \}
2679 .  el \{\
2680 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2681 .    tm1 "              in .Bd request (#\n[.c])
2682 .    nr doc-reg-Bd 0
2683 .  \}\}\}\}\}
2685 .  \" have we seen an argument?
2686 .  if \n[doc-reg-Bd] \{\
2687 .    shift
2688 .    \" check other arguments
2689 .    if \n[.$] \
2690 .      doc-do-Bd-args \$@
2691 .  \}
2693 .  \" avoid warning about non-existent register
2694 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2695 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2697 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2698 '    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2700 .  if !\n[doc-is-compact] \{\
2701 .    ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
2702 .      sp \n[doc-display-vertical]u
2703 .    el \
2704 '      sp \n[doc-display-vertical]u
2705 .  \}
2707 .  if !\n[cR] \
2708 .    ne 2v
2710 .  if !"\*[doc-display-file]"" \
2711 .    so \*[doc-display-file]
2713 .  nr doc-is-compact 0
2714 .  ds doc-display-file
2718 .\" NS doc-do-Bd-args macro
2719 .\" NS   resolve remaining .Bd arguments
2720 .\" NS
2721 .\" NS modifies:
2722 .\" NS   doc-display-file
2723 .\" NS   doc-display-indent-stackXXX
2724 .\" NS   doc-is-compact
2725 .\" NS
2726 .\" NS local variables:
2727 .\" NS   doc-reg-ddBa
2728 .\" NS   doc-reg-ddBa1
2729 .\" NS   doc-reg-ddBa2
2730 .\" NS   doc-reg-ddBa3
2731 .\" NS   doc-reg-ddBa4
2732 .\" NS   doc-str-ddBa
2734 .de doc-do-Bd-args
2735 .  nr doc-reg-ddBa 1
2737 .  ie        "\$1"-offset" \{\
2738 .    nr doc-reg-ddBa 2
2740 .    ie        "\$2"left" \
2741 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2742 .    el \{ .ie "\$2"right" \
2743 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2744 .    el \{ .ie "\$2"center" \
2745 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2746 .    el \{ .ie "\$2"indent" \
2747 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2748 .    el \{ .ie "\$2"indent-two" \
2749 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2750 .    el \
2751 .      nr doc-reg-ddBa 1
2752 .    \}\}\}\}
2754 .    \" not a known keyword
2755 .    if (\n[doc-reg-ddBa] == 1) \{\
2756 .      nr doc-reg-ddBa 2
2758 .      nr doc-reg-ddBa1 0
2759 .      if \B\a(\$2)\a \{\
2760 .        \" disable warnings related to scaling indicators (32)
2761 .        nr doc-reg-ddBa2 \n[.warn]
2762 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2764 .        \" values without a scaling indicator are taken as strings;
2765 .        \" we test whether the parameter string with and without the last
2766 .        \" character yields identical numerical results (ignoring the
2767 .        \" scaling indicator)
2768 .        ds doc-str-ddBa "\$2
2769 .        substring doc-str-ddBa 1 -1
2770 .        if \B\a(\*[doc-str-ddBa])\a \{\
2771 .          nr doc-reg-ddBa3 (;(\$2))
2772 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2773 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2774 .            nr doc-reg-ddBa1 1
2775 .        \}
2777 .        \" enable all warnings again
2778 .        warn \n[doc-reg-ddBa2]
2779 .      \}
2781 .      ie \n[doc-reg-ddBa1] \
2782 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2783 .      el \{\
2784 .        doc-get-width "\$2"
2785 .        ie (\n[doc-width] <= 3) \{\
2786 .          \" if the offset parameter is a macro, use the macro's
2787 .          \" width as specified in doc-common
2788 .          doc-get-arg-type "\$2"
2789 .          ie (\n[doc-arg-type] == 1) \
2790 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2791 .          el \
2792 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2793 .        \}
2794 .        el \
2795 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2796 .    \}\}
2797 .  \}
2798 .  el \{ .ie "\$1"-compact" \
2799 .    nr doc-is-compact 1
2800 .  el \{ .ie "\$1"-file" \{\
2801 .    ie !"\$2"" \{\
2802 .      ds doc-display-file "\$2
2803 .      nr doc-reg-ddBa 2
2804 .    \}
2805 .    el \
2806 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2807 .  \}
2808 .  el \
2809 .      tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
2810 .  \}\}
2812 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2813 .    shift \n[doc-reg-ddBa]
2814 .    doc-do-Bd-args \$@
2815 .  \}
2819 .\" NS Ed user macro
2820 .\" NS   end display
2821 .\" NS
2822 .\" NS modifies:
2823 .\" NS   doc-display-depth
2824 .\" NS   doc-display-indent-stackXXX
2825 .\" NS   doc-display-type-stackXXX
2826 .\" NS   doc-macro-name
2827 .\" NS
2828 .\" NS width register `Ed' set in doc-common
2830 .de Ed
2831 .  ds doc-macro-name Ed
2833 .  br
2835 .  if !\n[doc-display-depth] \{\
2836 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2837 .    nr doc-display-depth 1
2838 .  \}
2840 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2841 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2842 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2843 .  \}
2845 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2847 .  \" restore saved adjustment and fill modes
2848 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2849 .    fi
2850 .  el \
2851 .    nf
2852 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2854 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2855 .  ds doc-display-type-stack\n[doc-display-depth]
2856 .  nr doc-display-depth -1
2860 .\" NS doc-list-type-stackXXX global string
2861 .\" NS   stack of list types
2862 .\" NS
2863 .\" NS limit:
2864 .\" NS   doc-list-depth
2866 .ds doc-list-type-stack1
2869 .\" NS doc-list-indent-stackXXX global register
2870 .\" NS   stack of list indentation values
2871 .\" NS
2872 .\" NS limit:
2873 .\" NS   doc-list-depth
2875 .nr doc-list-indent-stack1 0
2878 .\" NS doc-list-have-indent-stackXXX global register (bool)
2879 .\" NS   an indentation value is active
2880 .\" NS
2881 .\" NS limit:
2882 .\" NS   doc-list-depth
2884 .nr doc-list-have-indent-stack1 0
2887 .\" NS Bl user macro
2888 .\" NS   begin list
2889 .\" NS
2890 .\" NS width register `Bl' set in doc-common
2891 .\" NS
2892 .\" NS modifies:
2893 .\" NS   doc-arg-ptr
2894 .\" NS   doc-argXXX
2895 .\" NS   doc-list-depth
2896 .\" NS   doc-list-have-indent-stackXXX
2897 .\" NS   doc-list-indent-stackXXX
2898 .\" NS   doc-list-type-stackXXX
2899 .\" NS   doc-macro-name
2900 .\" NS   doc-num-args
2901 .\" NS   doc-num-columns
2902 .\" NS
2903 .\" NS local variables:
2904 .\" NS   doc-reg-Bl
2906 .de Bl
2907 .  if !\n[.$] \{\
2908 .    doc-Bl-usage
2909 .    return
2910 .  \}
2912 .  ds doc-macro-name Bl
2913 .  nr doc-list-depth +1
2914 .  nr doc-arg-ptr 1
2916 .  ie        "\$1"-hang" \{\
2917 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2918 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2919 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2920 .  \}
2921 .  el \{ .ie "\$1"-tag" \{\
2922 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2923 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2924 .  \}
2925 .  el \{ .ie "\$1"-item" \{\
2926 .    ds doc-list-type-stack\n[doc-list-depth] item-list
2927 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2928 .  \}
2929 .  el \{ .ie "\$1"-enum" \{\
2930 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
2931 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
2932 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2933 .  \}
2934 .  el \{ .ie "\$1"-bullet" \{\
2935 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
2936 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2937 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2938 .  \}
2939 .  el \{ .ie "\$1"-dash" \{\
2940 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2941 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2942 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2943 .  \}
2944 .  el \{ .ie "\$1"-hyphen" \{\
2945 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2946 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2947 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2948 .  \}
2949 .  el \{ .ie "\$1"-inset" \{\
2950 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
2951 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2952 .  \}
2953 .  el \{ .ie "\$1"-diag" \{\
2954 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
2955 .  \}
2956 .  el \{ .ie "\$1"-ohang" \{\
2957 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
2958 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2959 .  \}
2960 .  el \{ .ie "\$1"-column" \{\
2961 .    ds doc-list-type-stack\n[doc-list-depth] column-list
2962 .    linetabs 1
2963 .  \}
2964 .  el \{\
2965 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
2966 .    tm1 "              in .Bl request
2967 .    tm
2968 .    nr doc-arg-ptr 0
2969 .  \}\}\}\}\}\}\}\}\}\}\}
2971 .  \" we have seen a list type
2972 .  if !\n[doc-arg-ptr] \{\
2973 .    doc-Bl-usage
2974 .    doc-reset-args
2975 .    nr doc-list-depth -1
2976 .    return
2977 .  \}
2979 .  shift
2981 .  \" fill argument vector
2982 .  nr doc-reg-Bl 1
2983 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
2984 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
2985 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
2986 .    nr doc-type\n[doc-reg-Bl] 0
2987 .    ds doc-space\n[doc-reg-Bl]
2988 .    nr doc-reg-Bl +1
2989 .  \}
2991 .  doc-increment-list-stack
2993 .  if \n[.$] \{\
2994 .    nr doc-arg-limit \n[.$]
2995 .    nr doc-arg-ptr 0
2996 .    doc-do-Bl-args
2998 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3000 .    \" initialize column list
3001 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3002 .      doc-set-column-tab \n[doc-num-columns]
3003 '      in -\n[doc-column-indent-width]u
3004 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3005 .        sp \n[doc-display-vertical]u
3007 .      nf
3008 .      nr doc-num-columns 0
3009 .  \}\}
3011 .  doc-reset-args
3015 .\" NS doc-Bl-usage macro
3017 .de doc-Bl-usage
3018 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3019 .  tm1 "             [-width <string>]
3020 .  tm1 "             [-offset <string>] [-compact]
3021 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3022 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3023 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3027 .\" NS doc-do-Bl-args macro
3028 .\" NS   resolve remaining .Bl arguments
3029 .\" NS
3030 .\" NS modifies:
3031 .\" NS   doc-arg-ptr
3032 .\" NS   doc-argXXX
3033 .\" NS   doc-compact-list-stackXXX
3034 .\" NS   doc-list-indent-stackXXX
3035 .\" NS   doc-list-offset-stackXXX
3036 .\" NS   doc-num-columns
3037 .\" NS   doc-tag-prefix-stackXXX
3038 .\" NS   doc-tag-width-stackXXX
3039 .\" NS
3040 .\" NS local variables:
3041 .\" NS   doc-box-dBla
3042 .\" NS   doc-env-dBla
3043 .\" NS   doc-reg-dBla
3044 .\" NS   doc-reg-dBla1
3045 .\" NS   doc-reg-dBla2
3046 .\" NS   doc-reg-dBla3
3047 .\" NS   doc-reg-dBla4
3048 .\" NS   doc-str-dBla
3049 .\" NS   doc-str-dBla1
3051 .de doc-do-Bl-args
3052 .  nr doc-arg-ptr +1
3054 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3055 .    return
3057 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3058 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3059 .  if !d doc-arg\n[doc-reg-dBla] \
3060 .    ds doc-arg\n[doc-reg-dBla]
3062 .  nr doc-reg-dBla 1
3064 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3065 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3067 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3068 .    ie (\n[doc-list-depth] > 1) \{\
3069 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3070 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3071 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3072 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3073 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3074 .    \}
3075 .    el \
3076 .      tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
3077 .  \}
3079 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3080 .    nr doc-arg-ptr +1
3081 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3083 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3084 .    substring doc-str-dBla 1 1
3085 .    ie \a.\a\*[doc-str-dBla]\a \{\
3086 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3087 .      substring doc-str-dBla 2
3088 .      doc-first-parameter \*[doc-str-dBla]
3089 .      doc-get-width "\*[doc-str-dfp]
3090 .      doc-get-arg-type "\*[doc-str-dfp]
3091 .      ie (\n[doc-arg-type] == 1) \
3092 .        nr doc-reg-dBla1 1
3093 .      el \
3094 .        nr doc-reg-dBla1 0
3095 .    \}
3096 .    el \
3097 .      nr doc-reg-dBla1 0
3098 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3100 .    ie \n[doc-reg-dBla1] \{\
3101 .      \" execute string in a box to get the width of the diversion
3102 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3103 .      doc-save-global-vars
3104 .      doc-reset-args
3105 .      box doc-box-dBla
3106 .      ev doc-env-dBla
3107 .      evc 0
3108 .      in 0
3109 .      nf
3110 .      nop \*[doc-str-dBla]
3111 .      br
3112 .      ev
3113 .      box
3114 .      doc-restore-global-vars
3115 .      doc-get-width \h'\n[dl]u'
3116 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3117 .    \}
3118 .    el \{\
3119 .      \" test whether argument is a valid numeric expression
3120 .      nr doc-reg-dBla1 0
3121 .      if \B\a(\*[doc-str-dBla])\a \{\
3122 .        \" disable warnings related to scaling indicators (32)
3123 .        nr doc-reg-dBla2 \n[.warn]
3124 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3126 .        \" values without a scaling indicator are taken as strings;
3127 .        \" we test whether the parameter string with and without the last
3128 .        \" character yields identical numerical results (ignoring the
3129 .        \" scaling indicator)
3130 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3131 .        substring doc-str-dBla1 1 -1
3132 .        if \B\a(\*[doc-str-dBla1])\a \{\
3133 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3134 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3135 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3136 .            nr doc-reg-dBla1 1
3137 .        \}
3139 .        \" enable all warnings again
3140 .        warn \n[doc-reg-dBla2]
3141 .      \}
3143 .      ie \n[doc-reg-dBla1] \
3144 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3145 .      el \{\
3146 .        doc-get-arg-width \n[doc-arg-ptr]
3147 .        ie (\n[doc-width] == 2) \{\
3148 .          \" if the width parameter is a macro, use the macro's
3149 .          \" width as specified in doc-common
3150 .          doc-get-arg-type \*[doc-str-dBla]
3151 .          ie (\n[doc-arg-type] == 1) \
3152 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3153 .          el \
3154 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3155 .        \}
3156 .        el \
3157 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3158 .  \}\}\}
3160 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3161 .    nr doc-arg-ptr +1
3163 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3164 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3165 .    el \{\
3166 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3167 .      nr doc-reg-dBla1 0
3168 .      if \B\a(\*[doc-str-dBla])\a \{\
3169 .        nr doc-reg-dBla2 \n[.warn]
3170 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3172 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3173 .        substring doc-str-dBla1 1 -1
3174 .        if \B\a(\*[doc-str-dBla1])\a \{\
3175 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3176 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3177 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3178 .            nr doc-reg-dBla1 1
3179 .        \}
3181 .        warn \n[doc-reg-dBla2]
3182 .      \}
3184 .      ie \n[doc-reg-dBla1] \
3185 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3186 .      el \{\
3187 .        doc-get-arg-width \n[doc-arg-ptr]
3188 .        ie (\n[doc-width] <= 3) \{\
3189 .          \" if the offset parameter is a macro, use the macro's
3190 .          \" width as specified in doc-common
3191 .          doc-get-arg-type \*[doc-str-dBla]
3192 .          ie (\n[doc-arg-type] == 1) \
3193 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3194 .          el \
3195 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3196 .        \}
3197 .        el \
3198 .          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3199 .  \}\}\}
3200 .  el \
3201 .    nr doc-reg-dBla 0
3202 .  \}\}\}
3204 .  \" not a known keyword, so it specifies the width of the next column
3205 .  \" (if it is a column list)
3206 .  if !\n[doc-reg-dBla] \{\
3207 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3208 .      nr doc-num-columns +1
3209 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3210 .      substring doc-str-dBla 1 1
3211 .      ie \a.\a\*[doc-str-dBla]\a \{\
3212 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3213 .        substring doc-str-dBla 2
3214 .        doc-first-parameter \*[doc-str-dBla]
3215 .        doc-get-width "\*[doc-str-dfp]
3216 .        doc-get-arg-type "\*[doc-str-dfp]
3217 .        ie (\n[doc-arg-type] == 1) \
3218 .          nr doc-reg-dBla1 1
3219 .        el \
3220 .          nr doc-reg-dBla1 0
3221 .      \}
3222 .      el \
3223 .        nr doc-reg-dBla1 0
3224 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3226 .      ie \n[doc-reg-dBla1] \{\
3227 .        \" execute string in a box to get the width of the diversion
3228 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3229 .        doc-save-global-vars
3230 .        doc-reset-args
3231 .        box doc-box-dBla
3232 .        ev doc-env-dBla
3233 .        evc 0
3234 .        in 0
3235 .        nf
3236 .        nop \*[doc-str-dBla]
3237 .        br
3238 .        ev
3239 .        box
3240 .        doc-restore-global-vars
3241 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3242 .      \}
3243 .      el \
3244 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3245 .    \}
3246 .    el \{\
3247 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3248 .      tm1 " in .Bl request (#\n[.c])
3249 .  \}\}
3251 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3252 .    doc-do-Bl-args
3256 .\" NS doc-save-global-vars macro
3257 .\" NS   save all global variables
3258 .\" NS
3259 .\" NS local variables:
3260 .\" NS   doc-reg-dsgv
3262 .de doc-save-global-vars
3263 .  ds doc-macro-name-saved "\*[doc-macro-name]
3264 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3265 .  nr doc-num-args-saved \n[doc-num-args]
3266 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3268 .  nr doc-reg-dsgv 1
3269 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3270 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3271 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3272 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3273 .    nr doc-reg-dsgv +1
3274 .  \}
3276 .  nr doc-curr-font-saved \n[doc-curr-font]
3277 .  nr doc-curr-size-saved \n[doc-curr-size]
3278 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3279 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3280 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3281 .  nr doc-have-decl-saved \n[doc-have-decl]
3282 .  nr doc-have-var-saved \n[doc-have-var]
3283 .  ds doc-command-name-saved "\*[doc-command-name]
3284 .  ds doc-quote-left-saved "\*[doc-quote-left]
3285 .  ds doc-quote-right-saved "\*[doc-quote-right]
3286 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3287 .  nr doc-in-list-saved \n[doc-in-list]
3288 .  ds doc-space-saved "\*[doc-space]
3289 .  ds doc-saved-space-saved "\*[doc-saved-space]
3290 .  nr doc-space-mode-saved \n[doc-space-mode]
3291 .  nr doc-have-space-saved \n[doc-have-space]
3292 .  nr doc-have-slot-saved \n[doc-have-slot]
3293 .  nr doc-keep-type-saved \n[doc-keep-type]
3294 .  nr doc-display-depth-saved \n[doc-display-depth]
3295 .  nr doc-is-compact-saved \n[doc-is-compact]
3297 .  nr doc-reg-dsgv 0
3298 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3299 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3300 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3301 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3302 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3303 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3304 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3305 .    nr doc-reg-dsgv +1
3306 .  \}
3308 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3310 .  nr doc-reg-dsgv 1
3311 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3312 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3313 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3314 .    nr doc-reg-dsgv +1
3315 .  \}
3317 .  nr doc-list-depth-saved \n[doc-list-depth]
3319 .  nr doc-reg-dsgv 1
3320 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3321 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3322 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3323 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3324 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3325 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3326 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3327 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3328 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3329 .    nr doc-reg-dsgv +1
3330 .  \}
3332 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3333 .  nr doc-curr-type-saved \n[doc-curr-type]
3334 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3335 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3336 .  nr doc-num-columns-saved \n[doc-num-columns]
3337 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3338 .  nr doc-is-func-saved \n[doc-is-func]
3339 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3340 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3341 .  ds doc-func-arg-saved "\*[doc-func-arg]
3342 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3343 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3344 .  nr doc-have-func-saved \n[doc-have-func]
3345 .  nr doc-is-reference-saved \n[doc-is-reference]
3346 .  nr doc-reference-count-saved \n[doc-reference-count]
3347 .  nr doc-author-count-saved \n[doc-author-count]
3349 .  nr doc-reg-dsgv 0
3350 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3351 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3352 .    nr doc-reg-dsgv +1
3353 .  \}
3355 .  nr doc-book-count-saved \n[doc-book-count]
3356 .  ds doc-book-name-saved "\*[doc-book-name]
3357 .  nr doc-date-count-saved \n[doc-date-count]
3358 .  ds doc-date-saved "\*[doc-date]
3359 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3360 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3361 .  nr doc-journal-count-saved \n[doc-journal-count]
3362 .  ds doc-journal-name-saved "\*[doc-journal-name]
3363 .  nr doc-issue-count-saved \n[doc-issue-count]
3364 .  ds doc-issue-name-saved "\*[doc-issue-name]
3365 .  nr doc-optional-count-saved \n[doc-optional-count]
3366 .  ds doc-optional-string-saved "\*[doc-optional-string]
3367 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3368 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3369 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3370 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3371 .  nr doc-report-count-saved \n[doc-report-count]
3372 .  ds doc-report-name-saved "\*[doc-report-name]
3373 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3374 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3375 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3376 .  nr doc-volume-count-saved \n[doc-volume-count]
3377 .  ds doc-volume-name-saved "\*[doc-volume-name]
3378 .  nr doc-have-author-saved \n[doc-have-author]
3380 .  ds doc-document-title-saved "\*[doc-document-title]
3381 .  ds doc-volume-saved "\*[doc-volume]
3382 .  ds doc-section-saved "\*[doc-section]
3383 .  ds doc-operating-system-saved "\*[doc-operating-system]
3384 .  ds doc-date-string-saved "\*[doc-date-string]
3385 .  nr doc-header-space-saved \n[doc-header-space]
3386 .  nr doc-footer-space-saved \n[doc-footer-space]
3387 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3388 .  ds doc-header-string-saved "\*[doc-header-string]
3389 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3390 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3391 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3395 .\" NS doc-restore-global-vars macro
3396 .\" NS   restore all global variables
3397 .\" NS
3398 .\" NS local variables:
3399 .\" NS   doc-reg-drgv
3401 .de doc-restore-global-vars
3402 .  ds doc-macro-name "\*[doc-macro-name-saved]
3403 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3404 .  nr doc-num-args \n[doc-num-args-saved]
3405 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3407 .  nr doc-reg-drgv 1
3408 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3409 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3410 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3411 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3412 .    nr doc-reg-drgv +1
3413 .  \}
3415 .  nr doc-curr-font \n[doc-curr-font-saved]
3416 .  nr doc-curr-size \n[doc-curr-size-saved]
3417 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3418 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3419 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3420 .  nr doc-have-decl \n[doc-have-decl-saved]
3421 .  nr doc-have-var \n[doc-have-var-saved]
3422 .  ds doc-command-name "\*[doc-command-name-saved]
3423 .  ds doc-quote-left "\*[doc-quote-left-saved]
3424 .  ds doc-quote-right "\*[doc-quote-right-saved]
3425 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3426 .  nr doc-in-list \n[doc-in-list-saved]
3427 .  ds doc-space "\*[doc-space-saved]
3428 .  ds doc-saved-space "\*[doc-saved-space-saved]
3429 .  nr doc-space-mode \n[doc-space-mode-saved]
3430 .  nr doc-have-space \n[doc-have-space-saved]
3431 .  nr doc-have-slot \n[doc-have-slot-saved]
3432 .  nr doc-keep-type \n[doc-keep-type-saved]
3433 .  nr doc-display-depth \n[doc-display-depth-saved]
3434 .  nr doc-is-compact \n[doc-is-compact-saved]
3436 .  nr doc-reg-drgv 0
3437 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3438 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3439 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3440 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3441 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3442 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3443 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3444 .    nr doc-reg-drgv +1
3445 .  \}
3447 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3449 .  nr doc-reg-drgv 1
3450 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3451 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3452 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3453 .    nr doc-reg-drgv +1
3454 .  \}
3456 .  nr doc-list-depth \n[doc-list-depth-saved]
3458 .  nr doc-reg-drgv 1
3459 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3460 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3461 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3462 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3463 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3464 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3465 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3466 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3467 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3468 .    nr doc-reg-drgv +1
3469 .  \}
3471 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3472 .  nr doc-curr-type \n[doc-curr-type-saved]
3473 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3474 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3475 .  nr doc-num-columns \n[doc-num-columns-saved]
3476 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3477 .  nr doc-is-func \n[doc-is-func-saved]
3478 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3479 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3480 .  ds doc-func-arg "\*[doc-func-arg-saved]
3481 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3482 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3483 .  nr doc-have-func \n[doc-have-func-saved]
3484 .  nr doc-is-reference \n[doc-is-reference-saved]
3485 .  nr doc-reference-count \n[doc-reference-count-saved]
3486 .  nr doc-author-count \n[doc-author-count-saved]
3488 .  nr doc-reg-drgv 0
3489 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3490 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3491 .    nr doc-reg-drgv +1
3492 .  \}
3494 .  nr doc-book-count \n[doc-book-count-saved]
3495 .  ds doc-book-name "\*[doc-book-name-saved]
3496 .  nr doc-date-count \n[doc-date-count-saved]
3497 .  ds doc-date "\*[doc-date-saved]
3498 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3499 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3500 .  nr doc-journal-count \n[doc-journal-count-saved]
3501 .  ds doc-journal-name "\*[doc-journal-name-saved]
3502 .  nr doc-issue-count \n[doc-issue-count-saved]
3503 .  ds doc-issue-name "\*[doc-issue-name-saved]
3504 .  nr doc-optional-count \n[doc-optional-count-saved]
3505 .  ds doc-optional-string "\*[doc-optional-string-saved]
3506 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3507 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3508 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3509 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3510 .  nr doc-report-count \n[doc-report-count-saved]
3511 .  ds doc-report-name "\*[doc-report-name-saved]
3512 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3513 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3514 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3515 .  nr doc-volume-count \n[doc-volume-count-saved]
3516 .  ds doc-volume-name "\*[doc-volume-name-saved]
3517 .  nr doc-have-author \n[doc-have-author-saved]
3519 .  ds doc-document-title "\*[doc-document-title-saved]
3520 .  ds doc-volume "\*[doc-volume-saved]
3521 .  ds doc-section "\*[doc-section-saved]
3522 .  ds doc-operating-system "\*[doc-operating-system-saved]
3523 .  ds doc-date-string "\*[doc-date-string-saved]
3524 .  nr doc-header-space \n[doc-header-space-saved]
3525 .  nr doc-footer-space \n[doc-footer-space-saved]
3526 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3527 .  ds doc-header-string "\*[doc-header-string-saved]
3528 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3529 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3530 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3534 .\" NS El user macro
3535 .\" NS   end list
3536 .\" NS
3537 .\" NS modifies:
3538 .\" NS   doc-list-depth
3539 .\" NS   doc-macro-name
3540 .\" NS
3541 .\" NS local variables:
3542 .\" NS   doc-str-El
3543 .\" NS
3544 .\" NS width register `El' set in doc-common
3546 .de El
3547 .  if \n[.$] \{\
3548 .    tm Usage: .El (does not take arguments) (#\n[.c])
3549 .    return
3550 .  \}
3552 .  ds doc-macro-name El
3553 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3555 .  ie        "\*[doc-str-El]"diag-list" \
3556 .    doc-end-list 0
3557 .  el \{ .ie "\*[doc-str-El]"column-list" \
3558 .    doc-end-column-list
3559 .  el \{ .ie "\*[doc-str-El]"item-list" \
3560 .    doc-end-list 0
3561 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3562 .    doc-end-list 0
3563 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3564 .    doc-end-list 0
3565 .  el \
3566 .    doc-end-list 1
3567 .  \}\}\}\}
3569 .  br
3573 .\" NS doc-saved-Pa-font global string
3574 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3575 .\" NS   nroff)
3577 .ds doc-saved-Pa-font
3580 .\" NS doc-curr-type global register
3581 .\" NS   current argument type
3583 .nr doc-curr-type 0
3586 .\" NS doc-curr-arg global string
3587 .\" NS   current argument
3589 .ds doc-curr-arg
3592 .\" NS doc-item-boxXXX global box
3593 .\" NS   item boxes associated list depth
3594 .\" NS
3595 .\" NS limit:
3596 .\" NS   doc-list-depth
3599 .\" NS It user macro
3600 .\" NS   list item
3601 .\" NS
3602 .\" NS modifies:
3603 .\" NS   doc-arg-ptr
3604 .\" NS   doc-argXXX
3605 .\" NS   doc-curr-arg
3606 .\" NS   doc-curr-type
3607 .\" NS   doc-in-list
3608 .\" NS   doc-macro-name
3609 .\" NS   doc-num-args
3610 .\" NS   doc-saved-Pa-font
3611 .\" NS
3612 .\" NS local variables:
3613 .\" NS   doc-reg-It
3614 .\" NS   doc-str-It
3615 .\" NS   doc-XXX-list-type
3616 .\" NS
3617 .\" NS width register `It' set in doc-common
3619 .nr doc-bullet-list-type 1
3620 .nr doc-column-list-type 0
3621 .nr doc-dash-list-type 1
3622 .nr doc-diag-list-type 0
3623 .nr doc-enum-list-type 1
3624 .nr doc-hang-list-type 2
3625 .nr doc-inset-list-type 2
3626 .nr doc-item-list-type 1
3627 .nr doc-ohang-list-type 2
3628 .nr doc-tag-list-type 2
3630 .de It
3631 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3633 .  if "\*[doc-str-It]"" \
3634 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3636 .  if \n[doc-nesting-level] \{\
3637 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3638 .    tm1 " (#\n[.c])
3639 .  \}
3641 .  br
3642 .  if !\n[cR] \
3643 .    ne 3v
3645 .  if \n[.$] \{\
3646 .    ds doc-macro-name It
3648 .    \" fill argument vector
3649 .    nr doc-reg-It 1
3650 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3651 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3652 .      nr doc-reg-It +1
3653 .    \}
3655 .    nr doc-num-args \n[.$]
3656 .    nr doc-arg-ptr 0
3657 .  \}
3659 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3661 .  if \n[doc-reg-It] \{\
3662 .    \" start item box
3663 .    box doc-item-box\n[doc-list-depth]
3664 .    ev doc-item-env\n[doc-list-depth]
3665 .    evc 0
3666 .    in 0
3667 .    nf
3668 .  \}
3670 .  ie (\n[doc-reg-It] == 1) \{\
3671 .    if \n[.$] \{\
3672 .      tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3673 .      tm1 "              don't take arguments (#\n[.c])
3674 .  \}\}
3675 .  el \{\
3676 .    ie \n[.$] \{\
3677 .      if (\n[doc-reg-It] == 2) \{\
3678 .        \" handle list types with arguments
3679 .        doc-parse-arg-vector
3681 .        nr doc-in-list 1
3682 .        nr doc-arg-ptr 1
3683 .        nr doc-curr-type \n[doc-type1]
3684 .        ds doc-curr-arg "\*[doc-arg1]
3686 .        if \n[doc-in-files-section] \{\
3687 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3688 .          if n \
3689 .            ds doc-Pa-font "\*[doc-No-font]
3690 .        \}
3692 .        ie (\n[doc-type1] == 1) \
3693 .          \*[doc-arg1]
3694 .        el \{\
3695 .          nr doc-arg-ptr 1
3696 .          doc-print-recursive
3697 .    \}\}\}
3698 .    el \{\
3699 .      tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
3700 .      tm1 "              require arguments (#\n[.c])
3701 .    \}
3702 .  \}
3704 .  \" the previous call of `.doc-print-recursive' can contain calls to
3705 .  \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
3706 .  if !\n[doc-nesting-level] \
3707 .    doc-\*[doc-str-It]
3711 .\" NS doc-inset-list macro
3712 .\" NS   .It item of list-type inset
3713 .\" NS
3714 .\" NS modifies:
3715 .\" NS   doc-in-list
3717 .de doc-inset-list
3718 .  \" finish item box
3719 .  br
3720 .  ev
3721 .  box
3722 .  unformat doc-item-box\n[doc-list-depth]
3724 .  doc-set-vertical-and-indent 0
3725 .  br
3727 .  nh
3728 .  doc-item-box\n[doc-list-depth]
3730 .  if \n[doc-in-files-section] \
3731 .    if n \
3732 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3734 .  nr doc-in-list 0
3735 .  doc-reset-args
3739 .\" NS doc-hang-list macro
3740 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3741 .\" NS
3742 .\" NS modifies:
3743 .\" NS   doc-have-space
3744 .\" NS   doc-in-list
3745 .\" NS
3746 .\" NS local variables:
3747 .\" NS   doc-reg-dhl
3748 .\" NS   doc-reg-dhl1
3750 .de doc-hang-list
3751 .  \" finish item box
3752 .  br
3753 .  ev
3754 .  box
3755 .  unformat doc-item-box\n[doc-list-depth]
3757 .  doc-set-vertical-and-indent 1
3758 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3759 .  ti -\n[doc-reg-dhl]u
3761 .  nh
3762 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3763 .    doc-item-box\n[doc-list-depth]
3764 .  el \{\
3765 .    chop doc-item-box\n[doc-list-depth]
3766 .    nr doc-reg-dhl1 \n[.k]u
3767 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3768 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3769 .    nr doc-have-space 1
3770 .  \}
3772 .  if \n[doc-in-files-section] \
3773 .    if n \
3774 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3776 .  nr doc-in-list 0
3777 .  doc-reset-args
3781 .\" NS doc-ohang-list macro
3782 .\" NS   .It item of list-type overhanging tag
3783 .\" NS
3784 .\" NS modifies:
3785 .\" NS   doc-in-list
3787 .de doc-ohang-list
3788 .  \" finish item box
3789 .  br
3790 .  ev
3791 .  box
3792 .  unformat doc-item-box\n[doc-list-depth]
3794 .  doc-set-vertical-and-indent 0
3795 .  nh
3796 .  doc-item-box\n[doc-list-depth]
3797 .  br
3799 .  if \n[doc-in-files-section] \
3800 .    if n \
3801 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3803 .  nr doc-in-list 0
3804 .  doc-reset-args
3808 .\" NS doc-item-list macro
3809 .\" NS   .It item of list-type [empty tag]
3811 .de doc-item-list
3812 .  \" finish (dummy) item box
3813 .  br
3814 .  ev
3815 .  box
3817 .  doc-set-vertical-and-indent 0
3818 .  br
3820 .  doc-reset-args
3824 .\" NS doc-enum-list-count-stackXXX global register
3825 .\" NS   stack of current enum count values
3826 .\" NS
3827 .\" NS limit:
3828 .\" NS   doc-list-depth
3830 .nr doc-enum-list-count-stack1 0
3833 .\" NS doc-enum-list macro
3834 .\" NS   enumerated list
3835 .\" NS
3836 .\" NS modifies:
3837 .\" NS   doc-enum-list-count-stackXXX
3838 .\" NS   doc-in-list
3840 .de doc-enum-list
3841 .  nr doc-in-list 1
3842 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3843 \# XXX
3844 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3845 \#.rj
3846 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3847 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3848 .  doc-do-list
3852 .\" NS doc-bullet-list macro
3853 .\" NS   bullet paragraph list
3854 .\" NS
3855 .\" NS modifies:
3856 .\" NS   doc-in-list
3858 .de doc-bullet-list
3859 .  nr doc-in-list 1
3860 .  nop \)\*[doc-Sy-font]\[bu]\f[P]
3861 .  doc-do-list
3865 .\" NS doc-dash-list macro
3866 .\" NS   hyphen paragraph list (sub bullet list)
3867 .\" NS
3868 .\" NS modifies:
3869 .\" NS   doc-in-list
3871 .de doc-dash-list
3872 .  nr doc-in-list 1
3873 .  nop \)\*[doc-Sy-font]\-\f[P]
3874 .  doc-do-list
3878 .\" NS doc-do-list macro
3879 .\" NS   .It item of list-type enum/bullet/hyphen
3881 .als doc-do-list doc-hang-list
3884 .\" NS doc-diag-list-input-line-count global register
3885 .\" NS   saved line number to be checked in next diag-list item
3887 .nr doc-diag-list-input-line-count 0
3890 .\" NS doc-diag-list macro
3891 .\" NS   .It item of list-type diagnostic-message
3892 .\" NS
3893 .\" NS modifies:
3894 .\" NS   doc-curr-font
3895 .\" NS   doc-curr-size
3896 .\" NS   doc-diag-list-input-line-count
3898 .de doc-diag-list
3899 .  nr doc-curr-font \n[.f]
3900 .  nr doc-curr-size \n[.ps]
3902 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3903 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3904 .      doc-paragraph
3905 .    el \
3906 .      br
3907 .  \}
3908 .  el \
3909 .    br
3910 .  nr doc-diag-list-input-line-count \n[.c]
3912 .  nh
3913 .  nop \*[doc-Sy-font]\c
3914 .  if \n[doc-num-args] \
3915 .    doc-remaining-args
3916 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3918 .  doc-print-and-reset
3922 .\" NS doc-tag-list macro
3923 .\" NS   .It item of list-type `tag'
3924 .\" NS
3925 .\" NS modifies:
3926 .\" NS   doc-have-space
3927 .\" NS   doc-in-list
3928 .\" NS
3929 .\" NS local variables:
3930 .\" NS   doc-box-dtl
3931 .\" NS   doc-reg-dtl
3932 .\" NS   doc-reg-dtl1
3934 .de doc-tag-list
3935 .  \" finish item box
3936 .  br
3937 .  ev
3938 .  box
3939 .  unformat doc-item-box\n[doc-list-depth]
3941 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
3942 .  box doc-box-dtl
3943 .  ev doc-env-dtl
3944 .  evc 0
3945 .  fi
3946 .  ad 0
3947 .  in 0
3948 .  doc-item-box\n[doc-list-depth]
3949 .  br
3950 .  ev
3951 .  box
3953 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3954 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3955 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3956 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
3957 .    \}
3958 .    doc-get-tag-width
3959 .  \}
3960 .  doc-set-vertical-and-indent 1
3961 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3962 .  ti -\n[doc-reg-dtl]u
3964 .  nh
3965 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3966 .    doc-item-box\n[doc-list-depth]
3967 .    br
3968 .  \}
3969 .  el \{\
3970 .    chop doc-item-box\n[doc-list-depth]
3971 .    nr doc-reg-dtl1 \n[.k]u
3972 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3973 .    nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
3974 .    nr doc-have-space 1
3975 .  \}
3977 .  if \n[doc-in-files-section] \
3978 .    if n \
3979 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3981 .  nr doc-in-list 0
3982 .  doc-reset-args
3986 .\" NS doc-get-tag-width macro
3987 .\" NS   resolve unknown tag width (`tag' list-type only)
3988 .\" NS
3989 .\" NS modifies:
3990 .\" NS   doc-list-indent-stackXXX
3991 .\" NS   doc-tag-width-stackXXX
3992 .\" NS
3993 .\" NS requires:
3994 .\" NS   doc-curr-arg
3995 .\" NS   doc-curr-type
3997 .de doc-get-tag-width
3998 .  ie (\n[doc-curr-type] == 1) \{\
3999 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4000 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4001 .  \}
4002 .  el \{\
4003 .    ds doc-tag-width-stack\n[doc-list-depth] No
4004 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4005 .  \}
4009 .\" NS doc-set-vertical-and-indent macro
4010 .\" NS   set up vertical spacing (if not compact) and indentation (with
4011 .\" NS   offset if argument is non-zero)
4012 .\" NS
4013 .\" NS modifies:
4014 .\" NS   doc-list-have-indent-stackXXX
4016 .de doc-set-vertical-and-indent
4017 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4018 .    sp \n[doc-display-vertical]u
4020 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4021 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4022 .    if \$1 \
4023 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4024 .  \}
4026 .  if !\n[cR] \
4027 .    ne 2v
4031 .\" NS doc-list-depth global register
4032 .\" NS   list type stack counter
4034 .nr doc-list-depth 0
4037 .\" NS doc-num-columns global register
4038 .\" NS   number of columns
4040 .nr doc-num-columns 0
4043 .\" NS doc-compact-list-stackXXX global register (bool)
4044 .\" NS   stack of flags to indicate whether a particular list is compact
4045 .\" NS
4046 .\" NS limit:
4047 .\" NS   doc-list-depth
4049 .nr doc-compact-list-stack1 0
4052 .\" NS doc-tag-prefix-stackXXX global string
4053 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4054 .\" NS
4055 .\" NS limit:
4056 .\" NS   doc-list-depth
4058 .ds doc-tag-prefix-stack1
4061 .\" NS doc-tag-width-stackXXX global string
4062 .\" NS   stack of strings indicating how to set up current element of
4063 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4064 .\" NS   directly; if it is a macro name, use the macro's width value;
4065 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4066 .\" NS
4067 .\" NS limit:
4068 .\" NS   doc-list-depth
4070 .ds doc-tag-width-stack0
4071 .ds doc-tag-width-stack1
4074 .\" NS doc-list-offset-stackXXX global register
4075 .\" NS   stack of list offsets
4076 .\" NS
4077 .\" NS limit:
4078 .\" NS   doc-list-depth
4080 .nr doc-list-offset-stack1 0
4083 .\" NS doc-end-list macro
4084 .\" NS   list end function; resets indentation (and offset if argument is
4085 .\" NS   non-zero)
4086 .\" NS
4087 .\" NS modifies:
4088 .\" NS   doc-list-depth
4089 .\" NS   doc-list-offset-stackXXX
4091 .de doc-end-list
4092 .  if \$1 \
4093 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4095 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4097 .  if (\n[doc-list-depth] <= 0) \
4098 .    tm mdoc warning: extraneous .El call (#\n[.c])
4100 .  doc-decrement-list-stack
4101 .  nr doc-list-depth -1
4105 .\" NS doc-increment-list-stack macro
4106 .\" NS   set up next block for list
4107 .\" NS
4108 .\" NS modifies:
4109 .\" NS   doc-compact-list-stackXXX
4110 .\" NS   doc-list-have-indent-stackXXX
4111 .\" NS   doc-list-indent-stackXXX
4112 .\" NS   doc-list-offset-stackXXX
4113 .\" NS   doc-list-type-stackXXX
4114 .\" NS   doc-tag-prefix-stackXXX
4115 .\" NS   doc-tag-width-stackXXX
4116 .\" NS   doc-enum-list-count-stackXXX
4117 .\" NS
4118 .\" NS local variables:
4119 .\" NS   doc-reg-dils
4121 .de doc-increment-list-stack
4122 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4123 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4124 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4125 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4126 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4127 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4128 .  ds doc-list-type-stack\n[doc-reg-dils]
4129 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4130 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4134 .\" NS doc-decrement-list-stack macro
4135 .\" NS   decrement stack
4136 .\" NS
4137 .\" NS modifies:
4138 .\" NS   doc-compact-list-stackXXX
4139 .\" NS   doc-list-have-indent-stackXXX
4140 .\" NS   doc-list-indent-stackXXX
4141 .\" NS   doc-list-offset-stackXXX
4142 .\" NS   doc-list-type-stackXXX
4143 .\" NS   doc-tag-prefix-stackXXX
4144 .\" NS   doc-tag-width-stackXXX
4145 .\" NS   doc-enum-list-count-stackXXX
4147 .de doc-decrement-list-stack
4148 .  ds doc-list-type-stack\n[doc-list-depth]
4149 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4150 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4151 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4152 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4153 .  ds doc-tag-width-stack\n[doc-list-depth]
4154 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4155 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4159 .\" NS Xr user macro
4160 .\" NS   cross reference (for man pages only)
4161 .\" NS
4162 .\" NS modifies:
4163 .\" NS   doc-arg-ptr
4164 .\" NS   doc-macro-name
4165 .\" NS
4166 .\" NS local variables:
4167 .\" NS   doc-reg-Xr
4168 .\" NS
4169 .\" NS width register `Xr' set in doc-common
4171 .de Xr
4172 .  if !\n[doc-arg-limit] \{\
4173 .    ie \n[.$] \{\
4174 .      ds doc-macro-name Xr
4175 .      doc-parse-args \$@
4176 .    \}
4177 .    el \
4178 .      doc-Xr-usage
4179 .  \}
4181 .  if !\n[doc-arg-limit] \
4182 .    return
4184 .  nr doc-arg-ptr +1
4185 .  doc-print-prefixes
4186 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4187 .    \" first argument must be a string
4188 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4189 .      nr doc-curr-font \n[.f]
4190 .      nr doc-curr-size \n[.ps]
4191 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
4193 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4194 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4195 .        \" modify second argument if it is a string and
4196 .        \" remove space inbetween
4197 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4198 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4199 .          ds doc-space\n[doc-arg-ptr]
4200 .        \}
4201 .      \}
4202 .      doc-print-recursive
4203 .    \}
4204 .    el \
4205 .      doc-Xr-usage
4206 .  \}
4207 .  el \
4208 .    doc-Xr-usage
4212 .\" NS doc-Xr-usage macro
4214 .de doc-Xr-usage
4215 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4216 .  doc-reset-args
4220 .\" NS Sx user macro
4221 .\" NS   cross section reference
4222 .\" NS
4223 .\" NS width register `Sx' set in doc-common
4225 .als Sx doc-generic-macro
4226 .ds doc-Sx-usage section_header
4229 .\" NS doc-end-column-list macro
4230 .\" NS   column-list end-list
4231 .\" NS
4232 .\" NS modifies:
4233 .\" NS   doc-list-depth
4235 .de doc-end-column-list
4236 .  linetabs 0
4237 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4238 .  ta T .5i
4239 .  fi
4240 .  doc-decrement-list-stack
4241 .  nr doc-list-depth -1
4245 .\" NS doc-column-indent-width global register
4246 .\" NS   holds the indent width for a column list
4248 .nr doc-column-indent-width 0
4251 .\" NS doc-set-column-tab macro
4252 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4253 .\" NS
4254 .\" NS modifies:
4255 .\" NS   doc-column-indent-width
4256 .\" NS
4257 .\" NS local variables:
4258 .\" NS   doc-reg-dsct
4259 .\" NS   doc-str-dsct
4260 .\" NS   doc-str-dsct1
4262 .de doc-set-column-tab
4263 .  ds doc-str-dsct
4264 .  nr doc-reg-dsct 1
4265 .  nr doc-column-indent-width 0
4267 .  ie (\$1 < 5) \
4268 .    ds doc-str-dsct1 "    \"
4269 .  el \{\
4270 .    ie (\$1 == 5) \
4271 .      ds doc-str-dsct1 "   \"
4272 .    el \{\
4273 .      \" XXX: this is packed abnormally close -- intercolumn width
4274 .      \"      should be configurable
4275 .      ds doc-str-dsct1 " \"
4276 .  \}\}
4278 .  while (\n[doc-reg-dsct] <= \$1) \{\
4279 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4280 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4281 .    nr doc-reg-dsct +1
4282 .  \}
4284 .  ta \*[doc-str-dsct]
4285 '  in +\n[doc-column-indent-width]u
4289 .\" NS doc-column-list macro
4290 .\" NS   column items
4291 .\" NS
4292 .\" NS modifies:
4293 .\" NS   doc-arg-ptr
4294 .\" NS   doc-list-indent-stackXXX
4295 .\" NS   doc-spaceXXX
4296 .\" NS
4297 .\" NS local variables:
4298 .\" NS   doc-reg-dcl
4300 .de doc-column-list
4301 .  if \n[doc-num-args] \
4302 .    doc-parse-arg-vector
4303 .  nr doc-arg-ptr +1
4305 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4306 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4307 .    return
4308 .  \}
4310 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4311 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4312 .    ds doc-space\n[doc-reg-dcl]
4313 .  \}
4315 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4316 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4317 .  if !\n[.u] \{\
4318 .    fi
4319 '    in +\n[doc-column-indent-width]u
4320 .  \}
4321 .  ti -\n[doc-column-indent-width]u
4323 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4327 .\" NS Ta user macro
4328 .\" NS   append tab (\t)
4329 .\" NS
4330 .\" NS modifies:
4331 .\" NS   doc-arg-ptr
4332 .\" NS
4333 .\" NS width register `Ta' set in doc-common
4335 .de Ta
4336 .  ie \n[doc-arg-limit] \{\
4337 .    nr doc-arg-ptr +1
4338 .    nop \*[doc-tab]\c
4339 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4340 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4341 .    el \
4342 .      doc-reset-args
4343 .  \}
4344 .  el \{\
4345 .    tm1 "Usage: Ta must follow column entry: e.g.
4346 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4347 .  \}
4351 .\" NS Dl user macro
4352 .\" NS   display (one line) literal
4353 .\" NS
4354 .\" NS   this function uses the `Li' font
4355 .\" NS
4356 .\" NS modifies:
4357 .\" NS   doc-arg-ptr
4358 .\" NS   doc-curr-font
4359 .\" NS   doc-curr-size
4360 .\" NS   doc-macro-name
4361 .\" NS
4362 .\" NS width register `Dl' set in doc-common
4364 .de Dl
4365 '  ta T .5i
4366 .  in +\n[doc-display-indent]u
4368 .  ie \n[doc-arg-limit] \{\
4369 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4370 .    doc-reset-args
4371 .  \}
4372 .  el \{\
4373 .    ie \n[.$] \{\
4374 .      ds doc-macro-name Dl
4375 .      doc-parse-args \$@
4376 .      nr doc-arg-ptr 1
4377 .      nr doc-curr-font \n[.f]
4378 .      nr doc-curr-size \n[.ps]
4379 .      nop \*[doc-Li-font]\c
4380 .      doc-print-recursive
4381 .    \}
4382 .    el \
4383 .      tm Usage: .Dl argument ... (#\n[.c])
4384 .  \}
4386 .  in -\n[doc-display-indent]u
4390 .\" NS D1 user macro
4391 .\" NS   display (one line)
4392 .\" NS
4393 .\" NS modifies:
4394 .\" NS   doc-arg-ptr
4395 .\" NS   doc-macro-name
4396 .\" NS
4397 .\" NS width register `D1' set in doc-common
4399 .de D1
4400 '  ta T .5i
4401 .  in +\n[doc-display-indent]u
4403 .  ie \n[doc-arg-limit] \{\
4404 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4405 .    doc-reset-args
4406 .  \}
4407 .  el \{\
4408 .    ie \n[.$] \{\
4409 .      ds doc-macro-name D1
4410 .      doc-parse-args \$@
4411 .      nr doc-arg-ptr 1
4412 .      doc-print-recursive
4413 .    \}
4414 .    el \
4415 .      tm Usage: .D1 argument ... (#\n[.c])
4416 .  \}
4418 .  in -\n[doc-display-indent]u
4422 .\" NS Vt user macro
4423 .\" NS   variable type (for forcing old style variable declarations);
4424 .\" NS   this is not done in the same manner as .Ot for fortrash --
4425 .\" NS   clean up later
4426 .\" NS
4427 .\" NS modifies:
4428 .\" NS   doc-curr-font
4429 .\" NS   doc-curr-size
4430 .\" NS   doc-have-decl
4431 .\" NS   doc-have-var
4432 .\" NS   doc-macro-name
4433 .\" NS
4434 .\" NS width register `Vt' set in doc-common
4436 .de Vt
4437 .  if !\n[doc-arg-limit] \{\
4438 .    ie \n[.$] \{\
4439 .      ds doc-macro-name Vt
4440 .      doc-parse-args \$@
4441 .    \}
4442 .    el \
4443 .      tm Usage: .Vt variable_type ... (#\n[.c])
4444 .  \}
4446 .  if !\n[doc-arg-limit] \
4447 .    return
4449 .  nr doc-arg-ptr +1
4450 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4451 .    tm Usage: .Vt variable_type ... (#\n[.c])
4452 .    doc-reset-args
4453 .    return
4454 .  \}
4456 .  if \n[doc-in-synopsis-section] \{\
4457 .    \" if a function declaration was the last thing given,
4458 .    \" want vertical space
4459 .    if \n[doc-have-decl] \{\
4460 .      doc-paragraph
4461 .      nr doc-have-decl 0
4462 .    \}
4464 .    \" if a subroutine was the last thing given, want vertical space
4465 .    if \n[doc-have-func] \{\
4466 .      ie \n[doc-have-var] \
4467 .        br
4468 .      el \
4469 .        doc-paragraph
4470 .    \}
4472 .    nr doc-have-var 1
4473 .  \}
4475 .  nr doc-curr-font \n[.f]
4476 .  nr doc-curr-size \n[.ps]
4477 .  nop \*[doc-Ft-font]\c
4478 .  doc-print-recursive
4480 .  if \n[doc-in-synopsis-section] \{\
4481 .    ie \n[doc-have-old-func] \
4482 .      nop \*[doc-soft-space]\c
4483 .    el \
4484 .      br
4485 .  \}
4489 .\" NS doc-is-func global register (bool)
4490 .\" NS   set if subroutine (in synopsis only) (fortran only)
4492 .nr doc-is-func 0
4495 .\" NS Ft user macro
4496 .\" NS   function type
4497 .\" NS
4498 .\" NS modifies:
4499 .\" NS   doc-curr-font
4500 .\" NS   doc-curr-size
4501 .\" NS   doc-have-decl
4502 .\" NS   doc-have-var
4503 .\" NS   doc-is-func
4504 .\" NS   doc-macro-name
4505 .\" NS
4506 .\" NS width register `Ft' set in doc-common
4508 .de Ft
4509 .  if !\n[doc-arg-limit] \{\
4510 .    ie \n[.$] \{\
4511 .      ds doc-macro-name Ft
4512 .      doc-parse-args \$@
4513 .    \}
4514 .    el \
4515 .      tm Usage: .Ft function_type ... (#\n[.c])
4516 .  \}
4518 .  if !\n[doc-arg-limit] \
4519 .    return
4521 .  nr doc-arg-ptr +1
4522 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4523 .    tm Usage: .Ft function_type ... (#\n[.c])
4524 .    doc-reset-args
4525 .    return
4526 .  \}
4528 .  if \n[doc-in-synopsis-section] \{\
4529 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4530 .      doc-paragraph
4531 .      nr doc-have-decl 0
4532 .      nr doc-have-var 0
4533 .    \}
4535 .    if \n[doc-have-var] \{\
4536 .      doc-paragraph
4537 .      nr doc-have-var 0
4538 .    \}
4540 .    nr doc-is-func 1
4541 .  \}
4543 .  nr doc-curr-font \n[.f]
4544 .  nr doc-curr-size \n[.ps]
4545 .  nop \*[doc-Ft-font]\c
4546 .  doc-print-recursive
4550 .\" NS doc-have-old-func global register (bool)
4551 .\" NS   set if `Ot' has been called
4553 .nr doc-have-old-func 0
4556 .\" NS Ot user macro
4557 .\" NS   old function type (fortran -- no newline)
4558 .\" NS
4559 .\" NS modifies:
4560 .\" NS   doc-have-decl
4561 .\" NS   doc-have-old-func
4562 .\" NS   doc-have-var
4563 .\" NS   doc-is-func
4564 .\" NS
4565 .\" NS width register `Ot' set in doc-common
4567 .de Ot
4568 .  nr doc-have-old-func 1
4570 .  if \n[doc-in-synopsis-section] \{\
4571 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4572 .      doc-paragraph
4573 .      nr doc-have-decl 0
4574 .      nr doc-have-var 0
4575 .    \}
4577 .    if \n[doc-have-var] \{\
4578 .      doc-paragraph
4579 .      nr doc-have-var 0
4580 .    \}
4582 .    nr doc-is-func 1
4583 .  \}
4585 .  if \n[.$] \
4586 .    nop \*[doc-Ft-font]\$*\c
4587 .  nop \ \f[P]\c
4591 .\" NS Fa user macro
4592 .\" NS   function arguments
4593 .\" NS
4594 .\" NS modifies:
4595 .\" NS   doc-arg-ptr
4596 .\" NS   doc-curr-font
4597 .\" NS   doc-curr-size
4598 .\" NS   doc-macro-name
4599 .\" NS
4600 .\" NS width register `Fa' set in doc-common
4602 .de Fa
4603 .  if !\n[doc-arg-limit] \{\
4604 .    ie \n[.$] \{\
4605 .      ds doc-macro-name Fa
4606 .      doc-parse-args \$@
4607 .    \}
4608 .    el \
4609 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4610 .  \}
4612 .  ie \n[doc-func-arg-count] \
4613 .    doc-do-func
4614 .  el \{\
4615 .    nr doc-arg-ptr +1
4616 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4617 .      nr doc-curr-font \n[.f]
4618 .      nr doc-curr-size \n[.ps]
4619 .      nop \*[doc-Fa-font]\c
4620 .      doc-print-recursive
4622 .      if \n[doc-in-synopsis-section] \
4623 .        if \n[doc-have-func] \
4624 .          br
4625 .  \}\}
4629 .\" NS doc-func-arg-count global register
4630 .\" NS   how many function arguments have been processed so far
4632 .nr doc-func-arg-count 0
4635 .\" NS doc-func-arg global string
4636 .\" NS   work buffer for function name strings
4638 .ds doc-func-arg
4641 .\" NS doc-num-func-args global register
4642 .\" NS   number of function arguments
4644 .nr doc-num-func-args 0
4647 .\" NS doc-func-args-processed global register
4648 .\" NS   function arguments processed so far
4650 .nr doc-func-args-processed 0
4653 .\" NS doc-do-func macro
4654 .\" NS   internal .Fa for .Fc
4655 .\" NS
4656 .\" NS modifies:
4657 .\" NS   doc-arg-ptr
4658 .\" NS   doc-argXXX
4659 .\" NS   doc-func-arg
4660 .\" NS   doc-func-arg-count
4661 .\" NS   doc-func-args-processed
4662 .\" NS   doc-num-func-args
4664 .de doc-do-func
4665 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4666 .    doc-reset-args
4667 .    return
4668 .  \}
4670 .  nr doc-arg-ptr +1
4672 .  ds doc-func-arg
4673 .  nr doc-num-func-args 0
4674 .  nr doc-func-args-processed 0
4676 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4677 .  if (\n[doc-num-func-args] > 1) \
4678 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4680 .  if (\n[doc-func-arg-count] > 1) \{\
4681 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4682 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4683 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
4684 .  \}
4686 .  if (\n[doc-func-arg-count] == 1) \{\
4687 .    nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4688 .    nop \f[P]\s[0]\c
4689 .  \}
4690 .  nr doc-func-arg-count +1
4691 .  doc-do-func
4695 .\" NS doc-have-func global register (bool)
4696 .\" NS   whether we have more than one function in synopsis
4698 .nr doc-have-func 0
4701 .\" NS Fn user macro
4702 .\" NS   functions
4703 .\" NS
4704 .\" NS modifies:
4705 .\" NS   doc-arg-ptr
4706 .\" NS   doc-curr-font
4707 .\" NS   doc-curr-size
4708 .\" NS   doc-have-decl
4709 .\" NS   doc-have-func
4710 .\" NS   doc-have-var
4711 .\" NS   doc-indent-synopsis
4712 .\" NS   doc-is-func
4713 .\" NS   doc-macro-name
4714 .\" NS
4715 .\" NS width register `Fn' set in doc-common
4717 .de Fn
4718 .  if !\n[doc-arg-limit] \{\
4719 .    ie \n[.$] \{\
4720 .      ds doc-macro-name Fn
4721 .      doc-parse-args \$@
4722 .    \}
4723 .    el \
4724 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4725 .  \}
4727 .  if !\n[doc-arg-limit] \
4728 .    return
4730 .  if \n[doc-in-synopsis-section] \{\
4731 .    \" if there is/has been more than one subroutine declaration
4732 .    ie \n[doc-is-func] \{\
4733 .      br
4734 .      nr doc-have-var 0
4735 .      nr doc-have-decl 0
4736 .      nr doc-is-func 0
4737 .    \}
4738 .    el \{\
4739 .      if \n[doc-have-func] \{\
4740 .        doc-paragraph
4741 .        nr doc-have-var 0
4742 .        nr doc-have-decl 0
4743 .    \}\}
4745 .    if \n[doc-have-decl] \{\
4746 .      doc-paragraph
4747 .      nr doc-have-var 0
4748 .    \}
4750 .    if \n[doc-have-var] \{\
4751 .      doc-paragraph
4752 .      nr doc-have-decl 0
4753 .    \}
4755 .    nr doc-have-func 1
4756 .    nr doc-is-func 0
4758 .    br
4759 .    if !\n[doc-indent-synopsis] \
4760 .      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4761 .    if !\n[doc-indent-synopsis-active] \
4762 .      in +\n[doc-indent-synopsis]u
4763 .    ti -\n[doc-indent-synopsis]u
4764 .  \}
4766 .  nr doc-arg-ptr +1
4767 .  doc-print-prefixes
4768 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4769 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4770 .    doc-reset-args
4771 .    return
4772 .  \}
4774 .  nr doc-curr-font \n[.f]
4775 .  nr doc-curr-size \n[.ps]
4776 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4777 .  nop \f[P]\s[0]\*[lp]\)\c
4779 .  nr doc-arg-ptr +1
4780 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4781 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4782 .      nop \*[doc-Fa-font]\c
4783 .      doc-do-func-args
4784 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4785 .  \}\}
4787 .  nop \)\*[rp]\)\c
4788 .  if \n[doc-in-synopsis-section] \
4789 .    nop \);\)\c
4791 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4792 .    \" output the space (if needed)
4793 .    nr doc-arg-ptr -1
4794 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4795 .    nr doc-arg-ptr +1
4797 .    doc-print-recursive
4798 .  \}
4799 .  el \
4800 .    doc-print-and-reset
4802 .  if \n[doc-in-synopsis-section] \
4803 .    if !\n[doc-indent-synopsis-active] \
4804 .      in -\n[doc-indent-synopsis]u
4808 .\" NS doc-do-func-args macro
4809 .\" NS   handle function arguments
4810 .\" NS
4811 .\" NS modifies:
4812 .\" NS   doc-arg-ptr
4813 .\" NS   doc-argXXX
4814 .\" NS   doc-func-arg
4815 .\" NS   doc-func-args-processed
4816 .\" NS   doc-num-func-args
4817 .\" NS
4818 .\" NS local variables:
4819 .\" NS   doc-reg-ddfa
4821 .de doc-do-func-args
4822 .  if \n[doc-in-synopsis-section] \{\
4823 .    ds doc-func-arg
4824 .    nr doc-num-func-args 0
4825 .    nr doc-func-args-processed 0
4827 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4828 .    if (\n[doc-num-func-args] > 1) \
4829 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4830 .  \}
4832 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4833 .  nr doc-arg-ptr +1
4835 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4836 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4837 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4838 .      nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4839 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
4840 .      doc-do-func-args
4841 .  \}\}
4845 .\" NS doc-saved-nesting-level global register
4847 .nr doc-saved-nesting-level 0
4850 .\" NS doc-in-func-enclosure global register (bool)
4852 .nr doc-in-func-enclosure 0
4855 .\" NS Fo user macro
4856 .\" NS   function open
4857 .\" NS
4858 .\" NS modifies:
4859 .\" NS   doc-arg-ptr
4860 .\" NS   doc-curr-font
4861 .\" NS   doc-curr-size
4862 .\" NS   doc-func-arg-count
4863 .\" NS   doc-have-decl
4864 .\" NS   doc-have-func
4865 .\" NS   doc-have-var
4866 .\" NS   doc-in-func-enclosure
4867 .\" NS   doc-indent-synopsis
4868 .\" NS   doc-is-func
4869 .\" NS   doc-macro-name
4870 .\" NS   doc-saved-nesting-level
4871 .\" NS
4872 .\" NS width register `Fo' set in doc-common
4874 .de Fo
4875 .  if (\n[doc-in-func-enclosure]) \{\
4876 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4877 .    return
4878 .  \}
4880 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4881 .  nr doc-in-func-enclosure 1
4883 .  if !\n[doc-arg-limit] \{\
4884 .    ie \n[.$] \{\
4885 .      ds doc-macro-name Fo
4886 .      doc-parse-args \$@
4887 .    \}
4888 .    el \
4889 .      tm Usage: .Fo function_name (#\n[.c])
4890 .  \}
4892 .  if \n[doc-in-synopsis-section] \{\
4893 .    \" if there is/has been more than one subroutine declaration
4894 .    ie \n[doc-is-func] \{\
4895 .      br
4896 .      nr doc-have-var 0
4897 .      nr doc-have-decl 0
4898 .      nr doc-is-func 0
4899 .    \}
4900 .    el \{\
4901 .      if \n[doc-have-func] \{\
4902 .        doc-paragraph
4903 .        nr doc-have-var 0
4904 .        nr doc-have-decl 0
4905 .    \}\}
4907 .    if \n[doc-have-decl] \{\
4908 .      doc-paragraph
4909 .      nr doc-have-var 0
4910 .    \}
4912 .    if \n[doc-have-var] \{\
4913 .      doc-paragraph
4914 .      nr doc-have-decl 0
4915 .    \}
4917 .    nr doc-have-func 1
4918 .    nr doc-is-func 0
4920 .    br
4921 .    if !\n[doc-indent-synopsis] \
4922 .      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4923 .  \}
4925 .  \" start function box
4926 .  box doc-func-box
4927 .  ev doc-func-env
4928 .  evc 0
4929 .  in 0
4930 .  nf
4932 .  nr doc-arg-ptr +1
4933 .  doc-print-prefixes
4934 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4935 .    nr doc-func-arg-count 1
4936 .    nr doc-curr-font \n[.f]
4937 .    nr doc-curr-size \n[.ps]
4939 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4940 .    nop \f[P]\s[0]\*[lp]\)\c
4941 .    doc-reset-args
4942 .  \}
4946 .\" NS Fc user macro
4947 .\" NS   function close
4948 .\" NS
4949 .\" NS modifies:
4950 .\" NS   doc-arg-ptr
4951 .\" NS   doc-func-arg-count
4952 .\" NS   doc-in-func-enclosure
4953 .\" NS   doc-saved-nesting-level
4954 .\" NS   doc-macro-name
4955 .\" NS
4956 .\" NS width register `Fc' set in doc-common
4958 .de Fc
4959 .  if !\n[doc-in-func-enclosure] \{\
4960 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
4961 .    return
4962 .  \}
4964 .  if \n[.$] \{\
4965 .    ds doc-macro-name Fc
4966 .    \" the first (dummy) argument is used to get the correct spacing
4967 .    doc-parse-args \) \$@
4968 .  \}
4970 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
4971 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
4973 .  nr doc-func-arg-count 0
4974 .  nr doc-in-func-enclosure 0
4976 .  ie \n[doc-in-synopsis-section] \
4977 .    nop \|\*[rp];\)
4978 .  el \
4979 .    nop \|\*[rp]\)
4981 .  \" finish function box
4982 .  br
4983 .  ev
4984 .  box
4985 .  chop doc-func-box
4986 .  unformat doc-func-box
4988 .  if \n[doc-in-synopsis-section] \{\
4989 .    if !\n[doc-indent-synopsis-active] \
4990 .      in +\n[doc-indent-synopsis]u
4991 .    ti -\n[doc-indent-synopsis]u
4992 .  \}
4994 .  nh
4995 .  nop \*[doc-func-box]\c
4997 .  nr doc-arg-ptr +1
4998 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4999 .    nr doc-curr-font \n[.f]
5000 .    nr doc-curr-size \n[.ps]
5001 .    doc-print-recursive
5002 .  \}
5003 .  el \
5004 .    doc-print-and-reset
5006 .  if \n[doc-in-synopsis-section] \
5007 .    if !\n[doc-indent-synopsis-active] \
5008 .      in -\n[doc-indent-synopsis]u
5012 .\" NS doc-build-func-string macro
5013 .\" NS   collect function arguments and set hard spaces inbetween
5014 .\" NS
5015 .\" NS modifies:
5016 .\" NS   doc-func-arg
5017 .\" NS   doc-func-args-processed
5018 .\" NS   doc-num-func-args
5020 .de doc-build-func-string
5021 .  if !\n[doc-num-func-args] \{\
5022 .    nr doc-num-func-args \n[.$]
5023 .    nr doc-func-args-processed 0
5024 .    ds doc-func-arg
5025 .  \}
5027 .  nr doc-func-args-processed +1
5028 .  as doc-func-arg "\$1
5030 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5031 .    as doc-func-arg "\*[doc-hard-space]
5033 .    shift
5034 .    doc-build-func-string \$@
5035 .  \}
5039 .\" Very crude references: Stash all reference info into boxes, print out
5040 .\" reference on .Re request and clean up.  Ordering very limited, no fancy
5041 .\" citations, but can do articles, journals, and books -- need to add
5042 .\" several missing options (like city etc).  Should be able to grab a refer
5043 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5044 .\" (ha!).
5047 .\" NS doc-is-reference global register (bool)
5048 .\" NS   set if in reference
5050 .nr doc-is-reference 0
5053 .\" NS doc-reference-count global register
5054 .\" NS   reference element counter
5056 .nr doc-reference-count 0
5059 .\" NS Rs user macro
5060 .\" NS   reference start
5061 .\" NS
5062 .\" NS modifies:
5063 .\" NS   doc-is-reference
5064 .\" NS   doc-reference-count
5065 .\" NS
5066 .\" NS width register `Rs' set in doc-common
5068 .de Rs
5069 .  ie \n[.$] \
5070 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5071 .  el \{\
5072 .    nr doc-is-reference 1
5073 .    doc-reset-reference
5074 .    if \n[doc-in-see-also-section] \
5075 .      doc-paragraph
5076 .    nr doc-reference-count 0
5077 .  \}
5081 .\" NS Re user macro
5082 .\" NS   reference end
5083 .\" NS
5084 .\" NS modifies:
5085 .\" NS   doc-is-reference
5086 .\" NS
5087 .\" NS width register `Re' set in doc-common
5089 .de Re
5090 .  ie \n[.$] \
5091 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5092 .  el \{\
5093 .    doc-print-reference
5094 .    doc-reset-reference
5095 .    nr doc-is-reference 0
5096 .  \}
5100 .\" NS doc-reset-reference macro
5101 .\" NS   reference cleanup
5102 .\" NS
5103 .\" NS modifies:
5104 .\" NS   doc-author-count
5105 .\" NS   doc-author-nameXXX
5106 .\" NS   doc-book-count
5107 .\" NS   doc-book-name
5108 .\" NS   doc-corporate-count
5109 .\" NS   doc-corporate-name
5110 .\" NS   doc-date
5111 .\" NS   doc-date-count
5112 .\" NS   doc-issue-count
5113 .\" NS   doc-issue-name
5114 .\" NS   doc-journal-count
5115 .\" NS   doc-journam-name
5116 .\" NS   doc-optional-count
5117 .\" NS   doc-optional-string
5118 .\" NS   doc-page-number-count
5119 .\" NS   doc-page-number-string
5120 .\" NS   doc-reference-title-count
5121 .\" NS   doc-reference-title-name
5122 .\" NS   doc-reference-title-name-for-book
5123 .\" NS   doc-report-count
5124 .\" NS   doc-report-name
5125 .\" NS   doc-volume-count
5126 .\" NS   doc-volume-name
5128 .de doc-reset-reference
5129 .  while (\n[doc-author-count]) \{\
5130 .    ds doc-author-name\n[doc-author-count]
5131 .    nr doc-author-count -1
5132 .  \}
5133 .  nr doc-journal-count 0
5134 .  nr doc-issue-count 0
5135 .  nr doc-optional-count 0
5136 .  nr doc-corporate-count 0
5137 .  nr doc-report-count 0
5138 .  nr doc-reference-title-count 0
5139 .  nr doc-volume-count 0
5140 .  nr doc-date-count 0
5141 .  nr doc-page-number-count 0
5142 .  nr doc-book-count 0
5144 .  ds doc-journal-name
5145 .  ds doc-issue-name
5146 .  ds doc-optional-string
5147 .  ds doc-corporate-name
5148 .  ds doc-report-name
5149 .  ds doc-reference-title-name
5150 .  ds doc-reference-title-name-for-book
5151 .  ds doc-volume-name
5152 .  ds doc-date
5153 .  ds doc-page-number-string
5154 .  ds doc-book-name
5158 .\" NS doc-finish-reference macro
5159 .\" NS   auxiliary macro for doc-print-reference
5160 .\" NS
5161 .\" NS modifies:
5162 .\" NS   doc-reference-count
5164 .de doc-finish-reference
5165 .  nr doc-reference-count -1
5166 .  ie \n[doc-reference-count] \
5167 .    nop \),
5168 .  el \
5169 .    nop \).
5173 .\" NS doc-print-reference macro
5174 .\" NS   reference print
5175 .\" NS
5176 .\" NS modifies:
5177 .\" NS   doc-reference-count
5179 .de doc-print-reference
5181 .  nh
5183 .  if \n[doc-author-count] \{\
5184 .    doc-print-reference-authors
5185 .    nr doc-reference-count -\n[doc-author-count]
5186 .  \}
5188 .  if \n[doc-reference-title-count] \{\
5189 .    unformat doc-reference-title-name
5190 .    chop doc-reference-title-name
5191 .    unformat doc-reference-title-name-for-book
5192 .    chop doc-reference-title-name-for-book
5193 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5194 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5195 .      doc-finish-reference
5196 .    \}
5197 .    el \{\
5198 .      nop \*[doc-reference-title-name]\c
5199 .      doc-finish-reference
5200 .  \}\}
5202 .  if \n[doc-book-count] \{\
5203 .    unformat doc-book-name
5204 .    chop doc-book-name
5205 .    nop \*[doc-book-name]\c
5206 .    doc-finish-reference
5207 .  \}
5209 .  if \n[doc-publisher-count] \{\
5210 .    unformat doc-publisher-name
5211 .    chop doc-publisher-name
5212 .    nop \*[doc-publisher-name]\c
5213 .    doc-finish-reference
5214 .  \}
5216 .  if \n[doc-journal-count] \{\
5217 .    unformat doc-journal-name
5218 .    chop doc-journal-name
5219 .    nop \*[doc-journal-name]\c
5220 .    doc-finish-reference
5221 .  \}
5223 .  if \n[doc-report-count] \{\
5224 .    unformat doc-report-name
5225 .    chop doc-report-name
5226 .    nop \*[doc-report-name]\c
5227 .    doc-finish-reference
5228 .  \}
5230 .  if \n[doc-issue-count] \{\
5231 .    unformat doc-issue-name
5232 .    chop doc-issue-name
5233 .    nop \*[doc-issue-name]\c
5234 .    doc-finish-reference
5235 .  \}
5237 .  if \n[doc-volume-count] \{\
5238 .    unformat doc-volume-name
5239 .    chop doc-volume-name
5240 .    nop \*[doc-volume-name]\c
5241 .    doc-finish-reference
5242 .  \}
5244 .  if \n[doc-page-number-count] \{\
5245 .    unformat doc-page-number-string
5246 .    chop doc-page-number-string
5247 .    nop \*[doc-page-number-string]\c
5248 .    doc-finish-reference
5249 .  \}
5251 .  if \n[doc-corporate-count] \{\
5252 .    unformat doc-corporate-name
5253 .    chop doc-corporate-name
5254 .    nop \*[doc-corporate-name]\c
5255 .    doc-finish-reference
5256 .  \}
5258 .  if \n[doc-date-count] \{\
5259 .    unformat doc-date
5260 .    chop doc-date
5261 .    nop \*[doc-date]\c
5262 .    doc-finish-reference
5263 .  \}
5265 .  if \n[doc-optional-count] \{\
5266 .    unformat doc-optional-string
5267 .    chop doc-optional-string
5268 .    nop \*[doc-optional-string]\c
5269 .    doc-finish-reference
5270 .  \}
5272 .  if \n[doc-reference-count] \
5273 .    tm mdoc warning: unresolved reference problem
5275 .  hy \n[doc-hyphen-flags]
5279 .\" NS doc-print-reference-authors macro
5280 .\" NS   print out reference authors
5281 .\" NS
5282 .\" NS local variables:
5283 .\" NS   doc-reg-dpra
5284 .\" NS   doc-str-dpra
5286 .ds doc-str-dpra "and
5288 .de doc-print-reference-authors
5289 .  nr doc-reg-dpra 1
5291 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5292 .    unformat doc-author-name\n[doc-reg-dpra]
5293 .    chop doc-author-name\n[doc-reg-dpra]
5294 .    ie (\n[doc-author-count] > 2) \
5295 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5296 .    el \
5297 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5298 .    nr doc-reg-dpra +1
5299 .  \}
5301 .  unformat doc-author-name\n[doc-reg-dpra]
5302 .  chop doc-author-name\n[doc-reg-dpra]
5303 .  if (\n[doc-author-count] > 1) \
5304 .    nop \)\*[doc-str-dpra]
5305 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5309 .\" NS doc-author-count global register
5310 .\" NS   counter of author references
5312 .nr doc-author-count 0
5315 .\" NS doc-author-nameXXX global box
5316 .\" NS   array of author names
5317 .\" NS
5318 .\" NS limit:
5319 .\" NS   doc-author-count
5321 .ds doc-author-name0
5324 .\" NS %A user macro
5325 .\" NS   reference author(s)
5326 .\" NS
5327 .\" NS modifies:
5328 .\" NS   doc-arg-ptr
5329 .\" NS   doc-author-count
5330 .\" NS   doc-curr-font
5331 .\" NS   doc-curr-size
5332 .\" NS   doc-macro-name
5333 .\" NS   doc-reference-count
5334 .\" NS
5335 .\" NS local variables:
5336 .\" NS   doc-env-%A
5337 .\" NS
5338 .\" NS width register `%A' set in doc-common
5340 .de %A
5341 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5342 .    tm Usage: .%A author_name ... (#\n[.c])
5343 .    return
5344 .  \}
5346 .  nr doc-author-count +1
5347 .  nr doc-reference-count +1
5349 .  ds doc-macro-name %A
5350 .  doc-parse-args \$@
5352 .  nr doc-arg-ptr +1
5353 .  nr doc-curr-font \n[.f]
5354 .  nr doc-curr-size \n[.ps]
5356 .  \" save to reference box
5357 .  box doc-author-name\n[doc-author-count]
5358 .  ev doc-env-%A
5359 .  evc 0
5360 .  in 0
5361 .  nf
5362 .  doc-do-references
5366 .\" NS doc-book-count global register
5367 .\" NS   counter of book references
5369 .nr doc-book-count 0
5372 .\" NS doc-book-name global box
5373 .\" NS   string of collected book references
5375 .ds doc-book-name
5378 .\" NS %B user macro
5379 .\" NS   [reference] book name
5380 .\" NS
5381 .\" NS modifies:
5382 .\" NS   doc-arg-ptr
5383 .\" NS   doc-book-count
5384 .\" NS   doc-curr-font
5385 .\" NS   doc-curr-size
5386 .\" NS   doc-macro-name
5387 .\" NS   doc-reference-count
5388 .\" NS
5389 .\" NS local variables:
5390 .\" NS   doc-env-%B
5391 .\" NS
5392 .\" NS width register `%B' set in doc-common
5394 .de %B
5395 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5396 .    tm Usage: .%B book_name ... (#\n[.c])
5397 .    return
5398 .  \}
5400 .  if \n[doc-is-reference] \{\
5401 .    nr doc-book-count +1
5402 .    nr doc-reference-count +1
5403 .  \}
5405 .  ds doc-macro-name %B
5406 .  doc-parse-args \$@
5408 .  nr doc-arg-ptr +1
5409 .  nr doc-curr-font \n[.f]
5410 .  nr doc-curr-size \n[.ps]
5412 .  ie \n[doc-is-reference] \{\
5413 .    \" append to reference box
5414 .    boxa doc-book-name
5415 .    ev doc-env-%B
5416 .    evc 0
5417 .    in 0
5418 .    nf
5419 .    nop \*[doc-Em-font]\c
5420 .    doc-do-references
5421 .  \}
5422 .  el \{\
5423 .    nop \*[doc-Em-font]\c
5424 .    doc-print-recursive
5425 .  \}
5429 .\" NS doc-date-count global register
5430 .\" NS   counter of date references
5432 .nr doc-date-count 0
5435 .\" NS doc-date global box
5436 .\" NS   string of collected date references
5438 .ds doc-date
5441 .\" NS %D user macro
5442 .\" NS   [reference] date
5443 .\" NS
5444 .\" NS modifies:
5445 .\" NS   doc-arg-ptr
5446 .\" NS   doc-curr-font
5447 .\" NS   doc-curr-size
5448 .\" NS   doc-date-count
5449 .\" NS   doc-macro-name
5450 .\" NS   doc-reference-count
5451 .\" NS
5452 .\" NS local variables:
5453 .\" NS   doc-env-%D
5454 .\" NS
5455 .\" NS width register `%D' set in doc-common
5457 .de %D
5458 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5459 .    tm Usage: .%D date ... (#\n[.c])
5460 .    return
5461 .  \}
5463 .  nr doc-date-count +1
5464 .  nr doc-reference-count +1
5466 .  ds doc-macro-name %D
5467 .  doc-parse-args \$@
5469 .  nr doc-arg-ptr +1
5470 .  nr doc-curr-font \n[.f]
5471 .  nr doc-curr-size \n[.ps]
5473 .  \" append to reference box
5474 .  boxa doc-date
5475 .  ev doc-env-%D
5476 .  evc 0
5477 .  in 0
5478 .  nf
5479 .  doc-do-references
5483 .\" NS doc-publisher-count global register
5484 .\" NS   counter of publisher references
5486 .nr doc-publisher-count 0
5489 .\" NS doc-publisher-name global box
5490 .\" NS   string of collected publisher references
5492 .ds doc-publisher-name
5495 .\" NS %I user macro
5496 .\" NS   [reference] issuer/publisher name
5497 .\" NS
5498 .\" NS modifies:
5499 .\" NS   doc-arg-ptr
5500 .\" NS   doc-curr-font
5501 .\" NS   doc-curr-size
5502 .\" NS   doc-macro-name
5503 .\" NS   doc-publisher-count
5504 .\" NS   doc-reference-count
5505 .\" NS
5506 .\" NS local variables:
5507 .\" NS   doc-env-%I
5508 .\" NS
5509 .\" NS width register `%I' set in doc-common
5511 .de %I
5512 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5513 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5514 .    return
5515 .  \}
5517 .  nr doc-publisher-count +1
5518 .  nr doc-reference-count +1
5520 .  ds doc-macro-name %I
5521 .  doc-parse-args \$@
5523 .  nr doc-arg-ptr +1
5524 .  nr doc-curr-font \n[.f]
5525 .  nr doc-curr-size \n[.ps]
5527 .  \" append to reference box
5528 .  boxa doc-publisher-name
5529 .  ev doc-env-%I
5530 .  evc 0
5531 .  in 0
5532 .  nf
5533 .  nop \*[doc-Em-font]\c
5534 .  doc-do-references
5538 .\" NS doc-journal-count global register
5539 .\" NS   counter of journal references
5541 .nr doc-journal-count 0
5544 .\" NS doc-journal-name global box
5545 .\" NS   string of collected journal references
5547 .ds doc-journal-name
5550 .\" NS %J user macro
5551 .\" NS   [reference] Journal Name
5552 .\" NS
5553 .\" NS modifies:
5554 .\" NS   doc-arg-ptr
5555 .\" NS   doc-curr-font
5556 .\" NS   doc-curr-size
5557 .\" NS   doc-journal-count
5558 .\" NS   doc-macro-name
5559 .\" NS   doc-reference-count
5560 .\" NS
5561 .\" NS local variables:
5562 .\" NS   doc-env-%J
5563 .\" NS
5564 .\" NS width register `%J' set in doc-common
5566 .de %J
5567 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5568 .    tm Usage: .%J journal_name ... (#\n[.c])
5569 .    return
5570 .  \}
5572 .  nr doc-journal-count +1
5573 .  nr doc-reference-count +1
5575 .  ds doc-macro-name %J
5576 .  doc-parse-args \$@
5578 .  nr doc-arg-ptr +1
5579 .  nr doc-curr-font \n[.f]
5580 .  nr doc-curr-size \n[.ps]
5582 .  \" append to reference box
5583 .  boxa doc-journal-name
5584 .  ev doc-env-%J
5585 .  evc 0
5586 .  in 0
5587 .  nf
5588 .  nop \*[doc-Em-font]\c
5589 .  doc-do-references
5593 .\" NS doc-issue-count global register
5594 .\" NS   counter of issue number references
5596 .nr doc-issue-count 0
5599 .\" NS doc-issue-name global box
5600 .\" NS   string of collected issue number references
5602 .ds doc-issue-name
5605 .\" NS %N user macro
5606 .\" NS   [reference] issue number
5607 .\" NS
5608 .\" NS modifies:
5609 .\" NS   doc-arg-ptr
5610 .\" NS   doc-curr-font
5611 .\" NS   doc-curr-size
5612 .\" NS   doc-issue-count
5613 .\" NS   doc-macro-name
5614 .\" NS   doc-reference-count
5615 .\" NS
5616 .\" NS local variables:
5617 .\" NS   doc-env-%N
5618 .\" NS
5619 .\" NS width register `%N' set in doc-common
5621 .de %N
5622 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5623 .    tm Usage: .%N issue_number ... (#\n[.c])
5624 .    return
5625 .  \}
5627 .  nr doc-issue-count +1
5628 .  nr doc-reference-count +1
5630 .  ds doc-macro-name %N
5631 .  doc-parse-args \$@
5633 .  nr doc-arg-ptr +1
5634 .  nr doc-curr-font \n[.f]
5635 .  nr doc-curr-size \n[.ps]
5637 .  \" append to reference box
5638 .  boxa doc-issue-name
5639 .  ev doc-env-%N
5640 .  evc 0
5641 .  in 0
5642 .  nf
5643 .  doc-do-references
5647 .\" NS doc-optional-count global register
5648 .\" NS   counter of optional information references
5650 .nr doc-optional-count 0
5653 .\" NS doc-optional-string global box
5654 .\" NS   string of collected optional information references
5656 .ds doc-optional-string
5659 .\" NS %O user macro
5660 .\" NS   [reference] optional information
5661 .\" NS
5662 .\" NS modifies:
5663 .\" NS   doc-arg-ptr
5664 .\" NS   doc-curr-font
5665 .\" NS   doc-curr-size
5666 .\" NS   doc-macro-name
5667 .\" NS   doc-optional-count
5668 .\" NS   doc-reference-count
5669 .\" NS
5670 .\" NS local variables:
5671 .\" NS   doc-env-%O
5672 .\" NS
5673 .\" NS width register `%O' set in doc-common
5675 .de %O
5676 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5677 .    tm Usage: .%O optional_information ... (#\n[.c])
5678 .    return
5679 .  \}
5681 .  nr doc-optional-count +1
5682 .  nr doc-reference-count +1
5684 .  ds doc-macro-name %O
5685 .  doc-parse-args \$@
5687 .  nr doc-arg-ptr +1
5688 .  nr doc-curr-font \n[.f]
5689 .  nr doc-curr-size \n[.ps]
5691 .  \" append to reference box
5692 .  boxa doc-optional-string
5693 .  ev doc-env-%O
5694 .  evc 0
5695 .  in 0
5696 .  nf
5697 .  doc-do-references
5701 .\" NS doc-page-number-count global register
5702 .\" NS   counter of page number references
5704 .nr doc-page-number-count 0
5707 .\" NS doc-page-number-string global box
5708 .\" NS   string of collected page number references
5710 .ds doc-page-number-string
5713 .\" NS %P user macro
5714 .\" NS   [reference] page numbers
5715 .\" NS
5716 .\" NS modifies:
5717 .\" NS   doc-arg-ptr
5718 .\" NS   doc-curr-font
5719 .\" NS   doc-curr-size
5720 .\" NS   doc-macro-name
5721 .\" NS   doc-page-number-count
5722 .\" NS   doc-reference-count
5723 .\" NS
5724 .\" NS local variables:
5725 .\" NS   doc-env-%P
5726 .\" NS
5727 .\" NS width register `%P' set in doc-common
5729 .de %P
5730 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5731 .    tm Usage: .%P page_number ... (#\n[.c])
5732 .    return
5733 .  \}
5735 .  nr doc-page-number-count +1
5736 .  nr doc-reference-count +1
5738 .  ds doc-macro-name %P
5739 .  doc-parse-args \$@
5741 .  nr doc-arg-ptr +1
5742 .  nr doc-curr-font \n[.f]
5743 .  nr doc-curr-size \n[.ps]
5745 .  \" append to reference box
5746 .  boxa doc-page-number-string
5747 .  ev doc-env-%P
5748 .  evc 0
5749 .  in 0
5750 .  nf
5751 .  doc-do-references
5755 .\" NS doc-corporate-count global register
5756 .\" NS   counter of corporate references
5758 .nr doc-corporate-count 0
5761 .\" NS doc-corporate-name global box
5762 .\" NS   string of collected corporate references
5764 .ds doc-corporate-name
5767 .\" NS %Q user macro
5768 .\" NS   corporate or foreign author
5769 .\" NS
5770 .\" NS modifies:
5771 .\" NS   doc-arg-ptr
5772 .\" NS   doc-corporate-count
5773 .\" NS   doc-curr-font
5774 .\" NS   doc-curr-size
5775 .\" NS   doc-macro-name
5776 .\" NS   doc-reference-count
5777 .\" NS
5778 .\" NS local variables:
5779 .\" NS   doc-env-%Q
5780 .\" NS
5781 .\" NS width register `%Q' set in doc-common
5783 .de %Q
5784 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5785 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5786 .    return
5787 .  \}
5789 .  nr doc-corporate-count +1
5790 .  nr doc-reference-count +1
5792 .  ds doc-macro-name %Q
5793 .  doc-parse-args \$@
5795 .  nr doc-arg-ptr +1
5796 .  nr doc-curr-font \n[.f]
5797 .  nr doc-curr-size \n[.ps]
5799 .  \" append to reference box
5800 .  boxa doc-corporate-name
5801 .  ev doc-env-%Q
5802 .  evc 0
5803 .  in 0
5804 .  nf
5805 .  doc-do-references
5809 .\" NS doc-report-count global register
5810 .\" NS   counter of report references
5812 .nr doc-report-count 0
5815 .\" NS doc-report-name global box
5816 .\" NS   string of collected report references
5818 .ds doc-report-name
5821 .\" NS %R user macro
5822 .\" NS   [reference] report name
5823 .\" NS
5824 .\" NS modifies:
5825 .\" NS   doc-arg-ptr
5826 .\" NS   doc-curr-font
5827 .\" NS   doc-curr-size
5828 .\" NS   doc-macro-name
5829 .\" NS   doc-reference-count
5830 .\" NS   doc-report-count
5831 .\" NS
5832 .\" NS local variables:
5833 .\" NS   doc-env-%R
5834 .\" NS
5835 .\" NS width register `%R' set in doc-common
5837 .de %R
5838 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5839 .    tm Usage: .%R reference_report ... (#\n[.c])
5840 .    return
5841 .  \}
5843 .  nr doc-report-count +1
5844 .  nr doc-reference-count +1
5846 .  ds doc-macro-name %R
5847 .  doc-parse-args \$@
5849 .  nr doc-arg-ptr +1
5850 .  nr doc-curr-font \n[.f]
5851 .  nr doc-curr-size \n[.ps]
5853 .  \" append to reference box
5854 .  boxa doc-report-name
5855 .  ev doc-env-%R
5856 .  evc 0
5857 .  in 0
5858 .  nf
5859 .  doc-do-references
5863 .\" NS doc-reference-title-count global register
5864 .\" NS   counter of reference title references
5866 .nr doc-reference-title-count 0
5869 .\" NS doc-reference-title-name global box
5870 .\" NS   string of collected reference title references
5872 .ds doc-reference-title-name
5875 .\" NS doc-reference-title-name-for-book global box
5876 .\" NS   string of collected reference title references
5877 .\" NS   (saved with another font; this is a shortcoming of groff)
5879 .ds doc-reference-title-name-for-book
5882 .\" NS %T user macro
5883 .\" NS   reference title
5884 .\" NS
5885 .\" NS modifies:
5886 .\" NS   doc-arg-ptr
5887 .\" NS   doc-curr-font
5888 .\" NS   doc-curr-size
5889 .\" NS   doc-macro-name
5890 .\" NS   doc-reference-title-count
5891 .\" NS   doc-report-count
5892 .\" NS
5893 .\" NS local variables:
5894 .\" NS   doc-env-%T
5895 .\" NS
5896 .\" NS width register `%T' set in doc-common
5898 .de %T
5899 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5900 .    tm Usage: .%T reference_title ... (#\n[.c])
5901 .    return
5902 .  \}
5904 .  if \n[doc-is-reference] \{\
5905 .    nr doc-reference-title-count +1
5906 .    nr doc-reference-count +1
5907 .  \}
5909 .  ds doc-macro-name %T
5910 .  doc-parse-args \$@
5912 .  nr doc-arg-ptr +1
5913 .  nr doc-curr-font \n[.f]
5914 .  nr doc-curr-size \n[.ps]
5915 .  ie \n[doc-is-reference] \{\
5916 .    \" append to reference box
5917 .    boxa doc-reference-title-name-for-book
5918 .    ev doc-env-%T
5919 .    evc 0
5920 .    in 0
5921 .    nf
5922 .    nop \*[doc-No-font]\c
5923 .    doc-do-references
5925 .    \" do it a second time with another font
5926 .    ds doc-macro-name %T
5927 .    doc-parse-args \$@
5929 .    nr doc-arg-ptr +1
5930 .    nr doc-curr-font \n[.f]
5931 .    nr doc-curr-size \n[.ps]
5932 .    boxa doc-reference-title-name
5933 .    ev doc-env-%T
5934 .    evc 0
5935 .    in 0
5936 .    nf
5937 .    nop \*[doc-Em-font]\c
5938 .    doc-do-references
5939 .  \}
5940 .  el \{\
5941 .    nop \*[doc-Em-font]\c
5942 .    doc-print-recursive
5943 .  \}
5947 .\" NS doc-volume-count global register
5948 .\" NS   counter of reference title references
5950 .nr doc-volume-count 0
5953 .\" NS doc-volume-name global box
5954 .\" NS   string of collected volume references
5956 .ds doc-volume-name
5959 .\" NS %V user macro
5960 .\" NS   reference volume
5961 .\" NS
5962 .\" NS modifies:
5963 .\" NS   doc-arg-ptr
5964 .\" NS   doc-curr-font
5965 .\" NS   doc-curr-size
5966 .\" NS   doc-macro-name
5967 .\" NS   doc-reference-title-count
5968 .\" NS   doc-volume-count
5969 .\" NS
5970 .\" NS local variables:
5971 .\" NS   doc-env-%V
5972 .\" NS
5973 .\" NS width register `%V' set in doc-common
5975 .de %V
5976 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5977 .    tm Usage: .%V volume ... (#\n[.c])
5978 .    return
5979 .  \}
5981 .  nr doc-volume-count +1
5982 .  nr doc-reference-count +1
5984 .  ds doc-macro-name %V
5985 .  doc-parse-args \$@
5987 .  nr doc-arg-ptr +1
5988 .  nr doc-curr-font \n[.f]
5989 .  nr doc-curr-size \n[.ps]
5991 .  \" append to reference box
5992 .  boxa doc-volume-name
5993 .  ev doc-env-%V
5994 .  evc 0
5995 .  in 0
5996 .  nf
5997 .  doc-do-references
6001 .\" NS doc-do-references macro
6002 .\" NS   reference recursion routine
6003 .\" NS
6004 .\" NS modifies:
6005 .\" NS   doc-arg-ptr
6006 .\" NS
6007 .\" NS local variables:
6008 .\" NS   doc-reg-ddr
6009 .\" NS   doc-reg-ddr1
6011 .de doc-do-references
6012 .  if !\n[doc-is-reference] \
6013 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6015 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6017 .  ie (\n[doc-reg-ddr1] == 1) \{\
6018 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6019 .    doc-append-arg \c 3
6020 .    \*[doc-arg\n[doc-arg-ptr]]
6021 .  \}
6022 .  el \{\
6023 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6025 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6026 .      \" finish reference box
6027 .      br
6028 .      ev
6029 .      boxa
6031 .      doc-reset-args
6032 .    \}
6033 .    el \{\
6034 .      nr doc-reg-ddr \n[doc-arg-ptr]
6035 .      nr doc-arg-ptr +1
6036 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6037 .      doc-do-references
6038 .  \}\}
6042 .\" NS Hf user macro
6043 .\" NS   source include header files.
6044 .\" NS
6045 .\" NS modifies:
6046 .\" NS   doc-curr-font
6047 .\" NS   doc-curr-size
6048 .\" NS
6049 .\" NS width register `Hf' set in doc-common
6051 .de Hf
6052 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6053 .    doc-paragraph
6054 .    nop File:
6055 .    Pa \$1
6057 .    Bd -literal
6058 .    so \$1
6059 .    Ed
6061 .    doc-paragraph
6062 .  \}
6063 .  el \
6064 .    Usage: .Hf file (#\n[.c])
6068 .\" NS doc-have-author global register (bool)
6069 .\" NS   set in `An'
6071 .nr doc-have-author 0
6074 .\" NS An user macro
6075 .\" NS   author name
6076 .\" NS
6077 .\" NS modifies:
6078 .\" NS   doc-arg-ptr
6079 .\" NS   doc-curr-font
6080 .\" NS   doc-curr-size
6081 .\" NS   doc-have-author
6082 .\" NS   doc-macro-name
6083 .\" NS
6084 .\" NS width register `An' set in doc-common
6086 .de An
6087 .  if !\n[doc-arg-limit] \{\
6088 .    ie \n[.$] \{\
6089 .      ie        "\$1"-nosplit" \
6090 .        nr doc-in-authors-section 0
6091 .      el \{ .ie "\$1"-split" \
6092 .        nr doc-in-authors-section 1
6093 .      el \{\
6094 .        ds doc-macro-name An
6095 .        doc-parse-args \$@
6096 .    \}\}\}
6097 .    el \{\
6098 .      tm1 "Usage: .An {-nosplit | -split}
6099 .      tm1         .An author_name ... (#\n[.c])
6100 .  \}\}
6102 .  if \n[doc-in-authors-section] \{\
6103 .    ie \n[doc-have-author] \
6104 .      br
6105 .    el \
6106 .      nr doc-have-author 1
6107 .  \}
6109 .  if \n[doc-arg-limit] \{\
6110 .    nr doc-arg-ptr +1
6111 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6112 .      nr doc-curr-font \n[.f]
6113 .      nr doc-curr-size \n[.ps]
6114 .      doc-print-recursive
6115 .    \}
6116 .    el \{\
6117 .      tm Usage: .An author_name ... (#\n[.c])
6118 .      doc-reset-args
6119 .  \}\}
6123 .\" NS Rv user macro
6124 .\" NS   return values
6125 .\" NS
6126 .\" NS width register `Rv' set in doc-common
6127 .\" NS
6128 .\" NS local variables:
6129 .\" NS   doc-str-Rv-std-prefix
6130 .\" NS   doc-str-Rv-std-suffix
6131 .\" NS   doc-str-Rv-stds-prefix
6132 .\" NS   doc-str-Rv-stds-and
6133 .\" NS   doc-str-Rv-stds-suffix
6134 .\" NS   doc-str-Rv-std0
6136 .ds doc-str-Rv-std-prefix "The
6137 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6138 .as doc-str-Rv-std-suffix " otherwise the value\~-1 is returned and
6139 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[P]
6140 .as doc-str-Rv-std-suffix " is set to indicate the error.
6142 .ds doc-str-Rv-stds-prefix "The
6143 .ds doc-str-Rv-stds-and    "and
6144 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6145 .as doc-str-Rv-stds-suffix " otherwise the value\~-1 is returned and
6146 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[P]
6147 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6149 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6150 .as doc-str-Rv-std0 " otherwise the value\~-1 is returned and
6151 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[P]
6152 .as doc-str-Rv-std0 " is set to indicate the error.
6154 .de Rv
6156 .\" XXX: what does this function without `-std'?
6158 .  if \n[doc-arg-limit] \{\
6159 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6160 .    doc-reset-args
6161 .    return
6162 .  \}
6164 .  if !\n[.$] \{\
6165 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6166 .    return
6167 .  \}
6169 .  if "\$1"-std" \{\
6170 .    nr doc-reg-Rv \*[doc-section]
6171 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6172 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6173 .    br
6174 .    shift
6175 .    ie (\n[.$] > 1) \{\
6176 .      nop \)\*[doc-str-Rv-stds-prefix]
6177 .      nr doc-reg-Rv 1
6178 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6179 .        ie (\n[.$] > 2) \
6180 .          Fn \$\n[doc-reg-Rv] ,
6181 .        el \
6182 .          Fn \$\n[doc-reg-Rv]
6183 .        nr doc-reg-Rv +1
6184 .      \}
6185 .      nop \)\*[doc-str-Rv-stds-and]
6186 .      Fn \$\n[.$]
6187 .      nop \)\*[doc-str-Rv-stds-suffix]
6188 .    \}
6189 .    el \{ .ie (\n[.$] == 1) \{\
6190 .      nop \)\*[doc-str-Rv-std-prefix]
6191 .      Fn \$1
6192 .      nop \)\*[doc-str-Rv-std-suffix]
6193 .    \}
6194 .    el \{\
6195 .      nop \)\*[doc-str-Rv-std0]
6196 .  \}\}\}
6200 .\" NS Ex user macro
6201 .\" NS   exit status
6202 .\" NS
6203 .\" NS width register `Ex' set in doc-common
6204 .\" NS
6205 .\" NS local variables:
6206 .\" NS   doc-str-Ex-std-prefix
6207 .\" NS   doc-str-Ex-std-suffix
6209 .ds doc-str-Ex-std-prefix "The
6210 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6211 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6213 .ds doc-str-Ex-stds-prefix "The
6214 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6215 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6216 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6218 .de Ex
6220 .\" XXX: what does this function without `-std'?
6222 .  if \n[doc-arg-limit] \{\
6223 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6224 .    doc-reset-args
6225 .    return
6226 .  \}
6228 .  if !\n[.$] \{\
6229 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6230 .    return
6231 .  \}
6233 .  if "\$1"-std" \{\
6234 .    nr doc-reg-Ex \*[doc-section]
6235 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6236 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6237 .    br
6238 .    shift
6239 .    ie (\n[.$] > 1) \{\
6240 .      nop \)\*[doc-str-Ex-stds-prefix]
6241 .      nr doc-reg-Ex 1
6242 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6243 .        ie (\n[.$] > 2) \
6244 .          Nm \$\n[doc-reg-Ex] ,
6245 .        el \
6246 .          Nm \$\n[doc-reg-Ex]
6247 .        nr doc-reg-Ex +1
6248 .      \}
6249 .      nop \)\*[doc-str-Ex-stds-and]
6250 .      Nm \$\n[.$]
6251 .      nop \)\*[doc-str-Ex-stds-suffix]
6252 .    \}
6253 .    el \{\
6254 .      nop \)\*[doc-str-Ex-std-prefix]
6255 .      Nm \$1
6256 .      nop \)\*[doc-str-Ex-std-suffix]
6257 .  \}\}
6261 .\" NS Mt user macro
6262 .\" NS   mailto (for conversion to HTML)
6264 .de Mt
6265 .  \" XXX: error handling missing
6266 .  Pa \$@
6270 .\" NS Lk user macro
6271 .\" NS   link (for conversion to HTML)
6272 .\" NS
6273 .\" NS local variables:
6274 .\" NS   doc-reg-Lk
6275 .\" NS   doc-str-Lk
6277 .de Lk
6278 .  ds doc-str-Lk Sy \$@
6280 .  ie (\n[.$] > 1) \{\
6281 .    doc-get-arg-type \$2
6282 .    ie (\n[doc-arg-type] < 3) \{\
6283 .      Em \)\$2:
6284 .      ds doc-str-Lk Sy "\$1"
6285 .      doc-get-width "\$1"
6286 .      shift 2
6287 .      if \n[.$] \
6288 .        as doc-str-Lk " \$@
6289 .    \}
6290 .    el \
6291 .      doc-get-width "\$1"
6292 .  \}
6293 .  el \
6294 .    doc-get-width "\$1"
6296 .  ie n \
6297 .    nr doc-reg-Lk 26
6298 .  el \
6299 .    nr doc-reg-Lk 38
6300 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6301 .    D1 \*[doc-str-Lk]
6302 .  el \
6303 .    \*[doc-str-Lk]
6307 .\" NS doc-defunct-macro macro
6308 .\" NS   this is the skeleton for defunct macros
6309 .\" NS
6311 .de doc-defunct-macro
6312 .  tmc mdoc error: .\$0 defunct
6313 .  if d doc-\$0-usage \
6314 .    tmc , \*[doc-\$0-usage]
6315 .  tm1 " (#\n[.c])
6319 .\" obsolete macros
6321 .als Db doc-defunct-macro
6323 .als Ds doc-defunct-macro
6325 .als Or doc-defunct-macro
6326 .ds doc-Or-usage use `|'
6328 .als Sf doc-defunct-macro
6329 .ds doc-Sf-usage use .Pf or .Ns
6332 .rn em e@
6334 .de em
6335 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6336 .  tm1 "            Should this have been `.Em ...'?
6337 .  ab
6341 .\" NS doc-empty-line macro
6342 .\" NS   emit warning and print empty line
6344 .de doc-empty-line
6345 .  if !\n[doc-display-depth] \
6346 .    tm mdoc warning: Empty input line #\n[.c]
6347 .  sp
6350 .blm doc-empty-line
6356 .\" load local modifications
6357 .mso mdoc.local
6359 .\" EOF