* Imakefile.in (extraclean): Added gxditview._man.
[s-roff.git] / tmac / doc.tmac
blob290431a80a97d4ae06de029741f608e822631f0d
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] < 118) \
61 .  ab You need GNU troff version 1.18 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[]
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[]
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[]\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[]\s[0]\c
373 .    doc-print-and-reset
374 .  \}
375 .  el \{\
376 .    ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
377 .      nop \|\-\f[]\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[]\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[]" \{\
423 .          if \n[doc-reg-Fl] \
424 .            nop \|\-\*[doc-space]\c
425 .          nop \f[R]|\f[]\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[]\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[]\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[]\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[]\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 .      tmc mdoc warning: Using a macro as first argument
551 .      tm1 " cancels effect of .\$0 (#\n[.c])
553 .      \" the right action here would be to reset the argument counters
554 .      \" and bail out -- unfortunately, a small number of manual pages
555 .      \" (less than 2% for FreeBSD which has been used for testing)
556 .      \" relied on the old behaviour (silently ignore this error),
557 .      \" so it is commented out
559 .\"    doc-reset-args
560 .    \}
561 .\"  el \{\
562 .      nr doc-curr-font \n[.f]
563 .      nr doc-curr-size \n[.ps]
564 .      nop \*[doc-\$0-font]\c
565 .      doc-print-recursive
566 .\"  \}
567 .  \}
568 .  el \{\
569 .    tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
570 .    doc-reset-args
571 .  \}
575 .\" NS Ar user macro
576 .\" NS   command line `argument' macro: `.Ar [args ...]'
577 .\" NS
578 .\" NS modifies:
579 .\" NS   doc-arg-ptr
580 .\" NS   doc-curr-font
581 .\" NS   doc-curr-size
582 .\" NS   doc-macro-name
583 .\" NS
584 .\" NS local variable:
585 .\" NS   doc-str-Ar-default
586 .\" NS
587 .\" NS width register `Ar' set in doc-common
589 .ds doc-str-Ar-default "file\ .\|.\|.
591 .de Ar
592 .  nr doc-curr-font \n[.f]
593 .  nr doc-curr-size \n[.ps]
594 .  nop \*[doc-Ar-font]\c
596 .  if !\n[doc-arg-limit] \{\
597 .    ds doc-macro-name Ar
598 .    doc-parse-args \$@
600 .    if !\n[.$] \{\
601 .      \" no argument
602 .      nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
603 .  \}\}
605 .  if !\n[doc-arg-limit] \
606 .    return
608 .  nr doc-arg-ptr +1
609 .  doc-print-prefixes
610 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
611 .    nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
612 .    doc-print-and-reset
613 .  \}
614 .  el \{\
615 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
616 .      \" replace previous argument (Ar) with default value
617 .      nr doc-arg-ptr -1
618 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
619 .      nr doc-type\n[doc-arg-ptr] 2
620 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
622 .      \" recompute space vector for remaining arguments
623 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
624 .      nr doc-arg-limit \n[doc-arg-ptr]
625 .      doc-parse-space-vector
626 .    \}
627 .    doc-print-recursive
628 .  \}
632 .\" NS Ad user macro
633 .\" NS   Addresses
634 .\" NS
635 .\" NS width register `Ad' set in doc-common
637 .als Ad doc-generic-macro
638 .ds doc-Ad-usage address
641 .\" NS doc-indent-synopsis global register
642 .\" NS   indentation in synopsis
644 .nr doc-indent-synopsis 0
647 .\" NS doc-indent-synopsis-active global register (bool)
648 .\" NS   indentation in synopsis active
650 .nr doc-indent-synopsis-active 0
653 .\" NS Cd user macro
654 .\" NS   config declaration (for section 4 SYNOPSIS)
655 .\" NS
656 .\" NS   this function causes a break; it uses the `Nm' font
657 .\" NS
658 .\" NS modifies:
659 .\" NS   doc-arg-ptr
660 .\" NS   doc-curr-font
661 .\" NS   doc-curr-size
662 .\" NS   doc-indent-synopsis
663 .\" NS   doc-macro-name
664 .\" NS
665 .\" NS width register `Cd' set in doc-common
667 .de Cd
668 .  if !\n[doc-arg-limit] \{\
669 .    ie \n[.$] \{\
670 .      ds doc-macro-name Cd
671 .      doc-parse-args \$@
672 .    \}
673 .    el \
674 .      tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
675 .  \}
677 .  if !\n[doc-arg-limit] \
678 .    return
680 .  nr doc-arg-ptr +1
681 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
682 .    nr doc-curr-font \n[.f]
683 .    nr doc-curr-size \n[.ps]
685 .    ie \n[doc-in-synopsis-section] \{\
686 .      if "\*[doc-macro-name]"Cd" \{\
687 .        br
688 .        if !\n[doc-indent-synopsis] \
689 .          nr doc-indent-synopsis \n[doc-display-indent]u
690 .        if !\n[doc-indent-synopsis-active] \
691 .          in +\n[doc-indent-synopsis]u
692 .        ti -\n[doc-indent-synopsis]u
693 .        nop \*[doc-Nm-font]\c
694 .        doc-print-recursive
695 .        if !\n[doc-indent-synopsis-active] \
696 .          in -\n[doc-indent-synopsis]u
697 .    \}\}
698 .    el \{\
699 .      nop \*[doc-Nm-font]\c
700 .      doc-print-recursive
701 .  \}\}
702 .  el \{\
703 .    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
704 .    doc-reset-args
705 .  \}
709 .\" NS Cm user macro
710 .\" NS   interactive command modifier (flag)
711 .\" NS
712 .\" NS width register `Cm' set in doc-common
714 .als Cm doc-generic-macro
715 .ds doc-Cm-usage interactive_command_modifier
718 .\" NS Dv user macro
719 .\" NS   defined variable
720 .\" NS
721 .\" NS   this function uses the `Er' font
722 .\" NS
723 .\" NS width register `Dv' set in doc-common
725 .als Dv doc-generic-macro
726 .ds doc-Dv-usage defined_variable
727 .als doc-Dv-font doc-Er-font
730 .\" NS Em user macro
731 .\" NS   emphasis
732 .\" NS
733 .\" NS width register `Em' set in doc-common
735 .als Em doc-generic-macro
736 .ds doc-Em-usage text
739 .\" NS Er user macro
740 .\" NS   errno type
741 .\" NS
742 .\" NS width register `Er' set in doc-common
744 .als Er doc-generic-macro
745 .ds doc-Er-usage text
748 .\" NS Ev user macro
749 .\" NS   environment variable
750 .\" NS
751 .\" NS width register `Ev' set in doc-common
753 .als Ev doc-generic-macro
754 .ds doc-Ev-usage text
757 .\" NS doc-have-decl global register (bool)
758 .\" NS   subroutine test (in synopsis only)
760 .nr doc-have-decl 0
763 .\" NS doc-have-var global register (bool)
764 .\" NS   whether last type is a variable type
766 .nr doc-have-var 0
769 .\" NS doc-do-func-decl macro
770 .\" NS   do something special while in SYNOPSIS
771 .\" NS
772 .\" NS modifies:
773 .\" NS   doc-curr-font
774 .\" NS   doc-curr-size
775 .\" NS   doc-have-decl
776 .\" NS   doc-have-var
778 .de doc-do-func-decl
779 .  if \n[doc-in-synopsis-section] \{\
780 .    \" if a variable type was the last thing given, want vertical space
781 .    if \n[doc-have-var] \{\
782 .      doc-paragraph
783 .      nr doc-have-var 0
784 .    \}
785 .    \" if a subroutine was the last thing given, want vertical space
786 .    if \n[doc-have-func] \{\
787 .      ie \n[doc-have-decl] \
788 .        br
789 .      el \
790 .        doc-paragraph
791 .    \}
792 .    nr doc-have-decl 1
793 .  \}
795 .  nr doc-curr-font \n[.f]
796 .  nr doc-curr-size \n[.ps]
800 .\" NS Fd user macro
801 .\" NS   function declaration -- not callable
802 .\" NS
803 .\" NS   this function causes a break
804 .\" NS
805 .\" NS width register `Fd' set in doc-common
807 .de Fd
808 .  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
809 .    doc-do-func-decl
810 .    nop \*[doc-Fd-font]\$*
811 .    br
812 .    ft \n[doc-curr-font]
813 .    ps \n[doc-curr-size]u
814 .  \}
815 .  el \{\
816 .    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
817 .    doc-reset-args
818 .  \}
822 .\" NS In user macro
823 .\" NS   #include statement - not callable
824 .\" NS
825 .\" NS   this function causes a break; it uses the `Fd' font
826 .\" NS
827 .\" NS width register `In' set in doc-common
829 .de In
830 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
831 .    doc-do-func-decl
832 .    nop \*[doc-Fd-font]#include <\$1>
833 .    br
834 .    ft \n[doc-curr-font]
835 .    ps \n[doc-curr-size]u
836 .  \}
837 .  el \{\
838 .    tm Usage: .In include_file -- In is not callable (#\n[.c])
839 .    doc-reset-args
840 .  \}
844 .\" NS Fr user macro
845 .\" NS   function return value
846 .\" NS
847 .\" NS   this function uses the `Ar' font
848 .\" NS
849 .\" NS width register `Fr' set in doc-common
851 .als Fr doc-generic-macro
852 .ds doc-Fr-usage function_return_value
853 .als doc-Fr-font doc-Ar-font
856 .\" NS Ic user macro
857 .\" NS   interactive command
858 .\" NS
859 .\" NS width register `Ic' set in doc-common
861 .als Ic doc-generic-macro
862 .ds doc-Ic-usage interactive_command
865 .\" NS Li user macro
866 .\" NS   literals
867 .\" NS
868 .\" NS width register `Li' set in doc-common
870 .als Li doc-generic-macro
871 .ds doc-Li-usage argument
874 .\" NS Ms user macro
875 .\" NS   math symbol
876 .\" NS
877 .\" NS   this function uses the `Sy' font
878 .\" NS
879 .\" NS width register `Ms' set in doc-common
881 .als Ms doc-generic-macro
882 .ds doc-Ms-usage math_symbol
883 .als doc-Ms-font doc-Sy-font
886 .\" NS doc-command-name global string
887 .\" NS   save first invocation of .Nm
889 .ds doc-command-name
892 .\" NS Nm user macro
893 .\" NS   name of command or page topic
894 .\" NS
895 .\" NS modifies:
896 .\" NS   doc-arg-ptr
897 .\" NS   doc-command-name
898 .\" NS   doc-curr-font
899 .\" NS   doc-curr-size
900 .\" NS   doc-indent-synopsis
901 .\" NS   doc-indent-synopsis-active
902 .\" NS   doc-macro-name
903 .\" NS
904 .\" NS width register `Nm' set in doc-common
906 .de Nm
907 .  if !\n[doc-arg-limit] \{\
908 .    ds doc-macro-name Nm
909 .    ie \n[.$] \
910 .      doc-parse-args \$@
911 .    el \{\
912 .      ie "\*[doc-command-name]"" \
913 .        tm Usage: .Nm name ... (#\n[.c])
914 .      el \
915 .        doc-parse-args \*[doc-command-name]
916 .  \}\}
918 .  if !\n[doc-arg-limit] \
919 .    return
921 .  nr doc-arg-ptr +1
922 .  doc-print-prefixes
923 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
924 .    \" last argument
925 .    ie "\*[doc-command-name]"" \{\
926 .      tm Usage: .Nm name ... (#\n[.c])
927 .      doc-reset-args
928 .    \}
929 .    el \{\
930 .      nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
931 .      doc-print-and-reset
932 .  \}\}
933 .  el \{\
934 .    nr doc-curr-font \n[.f]
935 .    nr doc-curr-size \n[.ps]
937 .    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
938 .      ie "\*[doc-command-name]"" \
939 .        tm Usage: .Nm name ... (#\n[.c])
940 .      el \{\
941 .        \" replace previous argument (Nm) with default value
942 .        nr doc-arg-ptr -1
943 .        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
944 .        nr doc-type\n[doc-arg-ptr] 2
945 .        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
947 .        \" recompute space vector for remaining arguments
948 .        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
949 .        nr doc-arg-limit \n[doc-arg-ptr]
950 .        doc-parse-space-vector
951 .    \}\}
952 .    el \{\
953 .      \" handle `.Nm ...' in SYNOPSIS
954 .      if \n[doc-in-synopsis-section] \{\
955 .        if "\*[doc-macro-name]"Nm" \{\
956 .          br
957 .          if !\n[doc-indent-synopsis] \{\
958 .            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
959 .            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
960 .          \}
961 .          if !\n[doc-indent-synopsis-active] \{\
962 .            in +\n[doc-indent-synopsis]u
963 .            nr doc-indent-synopsis-active 1
964 .          \}
965 .          ti -\n[doc-indent-synopsis]u
966 .      \}\}
967 .      if "\*[doc-command-name]"" \
968 .        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
970 .      nop \*[doc-Nm-font]\c
971 .    \}
972 .    doc-print-recursive
973 .  \}
977 .\" NS Pa user macro
978 .\" NS   pathname: `.Pa [arg ...]'
979 .\" NS
980 .\" NS modifies:
981 .\" NS   doc-arg-ptr
982 .\" NS   doc-curr-font
983 .\" NS   doc-curr-size
984 .\" NS   doc-macro-name
985 .\" NS
986 .\" NS width register `Pa' set in doc-common
988 .de Pa
989 .  if !\n[doc-arg-limit] \{\
990 .    ds doc-macro-name Pa
991 .    doc-parse-args \$@
993 .    if !\n[.$] \{\
994 .      \" default value
995 .      nop \*[doc-Pa-font]~\f[]\s[0]
996 .  \}\}
998 .  if !\n[doc-arg-limit] \
999 .    return
1001 .  nr doc-arg-ptr +1
1002 .  doc-print-prefixes
1003 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1004 .    nr doc-curr-font \n[.f]
1005 .    nr doc-curr-size \n[.ps]
1006 .    nop \*[doc-Pa-font]\c
1007 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1008 .      \" replace previous argument (Pa) with default value
1009 .      nr doc-arg-ptr -1
1010 .      ds doc-arg\n[doc-arg-ptr] ~
1011 .      nr doc-type\n[doc-arg-ptr] 2
1012 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1014 .      \" recompute space vector for remaining arguments
1015 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1016 .      nr doc-arg-limit \n[doc-arg-ptr]
1017 .      doc-parse-space-vector
1018 .    \}
1019 .    doc-print-recursive
1020 .  \}
1021 .  el \{\
1022 .    nop \*[doc-Pa-font]~\f[]\s[0]\c
1023 .    doc-print-and-reset
1024 .  \}
1028 .\" NS Sy user macro
1029 .\" NS   symbolics
1030 .\" NS
1031 .\" NS width register `Sy' set in doc-common
1033 .als Sy doc-generic-macro
1034 .ds doc-Sy-usage symbolic_text
1037 .\" NS Me user macro
1038 .\" NS   menu entries
1039 .\" NS
1040 .\" NS width register `Me' set in doc-common
1042 .als Me doc-generic-macro
1043 .ds doc-Me-usage menu_entry
1046 .\" NS Tn user macro
1047 .\" NS   trade name
1048 .\" NS
1049 .\" NS modifies:
1050 .\" NS   doc-arg-ptr
1051 .\" NS   doc-curr-font
1052 .\" NS   doc-curr-size
1053 .\" NS   doc-macro-name
1054 .\" NS
1055 .\" NS width register `Tn' set in doc-common
1057 .de Tn
1058 .  if !\n[doc-arg-limit] \{\
1059 .    ie \n[.$] \{\
1060 .      ds doc-macro-name Tn
1061 .      doc-parse-args \$@
1062 .    \}
1063 .    el \
1064 .      tm Usage: .Tn trade_name ... (#\n[.c])
1065 .  \}
1067 .  if !\n[doc-arg-limit] \
1068 .    return
1070 .  nr doc-arg-ptr +1
1071 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1072 .    nr doc-curr-font \n[.f]
1073 .    nr doc-curr-size \n[.ps]
1074 .    nop \)\*[doc-Tn-font-size]\c
1075 .    ie !\n[doc-is-reference] \{\
1076 .      nop \)\*[doc-Tn-font-shape]\c
1077 .      doc-print-recursive
1078 .    \}
1079 .    el \
1080 .      doc-do-references
1081 .  \}
1082 .  el \{\
1083 .    tm Usage: .Tn trade_name ... (#\n[.c])
1084 .    doc-reset-args
1085 .  \}
1089 .\" NS Va user macro
1090 .\" NS   variable name
1091 .\" NS
1092 .\" NS width register `Va' set in doc-common
1094 .als Va doc-generic-macro
1095 .ds doc-Va-usage variable_name
1098 .\" NS No user macro
1099 .\" NS   normal text macro (default text style if mess up)
1100 .\" NS
1101 .\" NS width register `No' set in doc-common
1103 .als No doc-generic-macro
1104 .ds doc-No-usage normal_text
1107 .\" NS doc-quote-left global string
1108 .\" NS   left quotation character for `doc-enclose-string' and
1109 .\" NS   `doc-enclose-open'
1111 .ds doc-quote-left
1114 .\" NS doc-quote-right global string
1115 .\" NS   right quotation character for `doc-enclose-string' and
1116 .\" NS   `doc-enclose-close'
1118 .ds doc-quote-right
1121 .\" NS Op user macro
1122 .\" NS   option expression (i.e., enclose string in square brackets)
1123 .\" NS
1124 .\" NS modifies:
1125 .\" NS   doc-macro-name
1126 .\" NS   doc-quote-left
1127 .\" NS   doc-quote-right
1128 .\" NS
1129 .\" NS width register `Op' set in doc-common
1131 .de Op
1132 .  if !\n[doc-arg-limit] \
1133 .    ds doc-macro-name Op
1135 .  ds doc-quote-left "\*[doc-left-bracket]
1136 .  ds doc-quote-right "\*[doc-right-bracket]
1138 .  doc-enclose-string \$@
1142 .\" NS Aq user macro
1143 .\" NS   enclose string in angle brackets
1144 .\" NS
1145 .\" NS modifies:
1146 .\" NS   doc-macro-name
1147 .\" NS   doc-quote-left
1148 .\" NS   doc-quote-right
1149 .\" NS
1150 .\" NS width register `Aq' set in doc-common
1152 .de Aq
1153 .  if !\n[doc-arg-limit] \
1154 .    ds doc-macro-name Aq
1156 .  ds doc-quote-left \[la]
1157 .  ds doc-quote-right \[ra]
1159 .  doc-enclose-string \$@
1163 .\" NS Bq user macro
1164 .\" NS   enclose string in square brackets
1165 .\" NS
1166 .\" NS modifies:
1167 .\" NS   doc-macro-name
1168 .\" NS   doc-quote-left
1169 .\" NS   doc-quote-right
1170 .\" NS
1171 .\" NS width register `Bq' set in doc-common
1173 .de Bq
1174 .  if !\n[doc-arg-limit] \
1175 .    ds doc-macro-name Bq
1177 .  ds doc-quote-left "\*[doc-left-bracket]
1178 .  ds doc-quote-right "\*[doc-right-bracket]
1180 .  doc-enclose-string \$@
1184 .\" NS Brq user macro
1185 .\" NS   enclose string in braces
1186 .\" NS
1187 .\" NS modifies:
1188 .\" NS   doc-macro-name
1189 .\" NS   doc-quote-left
1190 .\" NS   doc-quote-right
1191 .\" NS
1192 .\" NS width register `Brq' set in doc-common
1194 .de Brq
1195 .  if !\n[doc-arg-limit] \
1196 .    ds doc-macro-name Brq
1198 .  ds doc-quote-left {
1199 .  ds doc-quote-right }
1201 .  doc-enclose-string \$@
1205 .\" NS Dq user macro
1206 .\" NS   enclose string in double quotes
1207 .\" NS
1208 .\" NS modifies:
1209 .\" NS   doc-macro-name
1210 .\" NS   doc-quote-left
1211 .\" NS   doc-quote-right
1212 .\" NS
1213 .\" NS width register `Dq' set in doc-common
1215 .de Dq
1216 .  if !\n[doc-arg-limit] \
1217 .    ds doc-macro-name Dq
1219 .  ds doc-quote-left "\*[Lq]
1220 .  ds doc-quote-right "\*[Rq]
1222 .  doc-enclose-string \$@
1226 .\" NS Eq user macro
1227 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1228 .\" NS
1229 .\" NS modifies:
1230 .\" NS   doc-macro-name
1231 .\" NS   doc-quote-left
1232 .\" NS   doc-quote-right
1233 .\" NS
1234 .\" NS width register `Eq' set in doc-common
1236 .de Eq
1237 .  if !\n[doc-arg-limit] \
1238 .    ds doc-macro-name Eq
1240 .  ds doc-quote-left "\$1
1241 .  ds doc-quote-right "\$2
1243 .  shift 2
1244 .  doc-enclose-string \$@
1248 .\" NS Pq user macro
1249 .\" NS   enclose string in parentheses
1250 .\" NS
1251 .\" NS modifies:
1252 .\" NS   doc-macro-name
1253 .\" NS   doc-quote-left
1254 .\" NS   doc-quote-right
1255 .\" NS
1256 .\" NS width register `Pq' set in doc-common
1258 .de Pq
1259 .  if !\n[doc-arg-limit] \
1260 .    ds doc-macro-name Pq
1262 .  ds doc-quote-left "\*[doc-left-parenthesis]
1263 .  ds doc-quote-right "\*[doc-right-parenthesis]
1265 .  doc-enclose-string \$@
1269 .\" NS Ql user macro
1270 .\" NS   quoted literal
1272 .\"   is in file doc-[dit|n]roff
1275 .\" NS Qq user macro
1276 .\" NS   enclose string in straight double quotes
1277 .\" NS
1278 .\" NS modifies:
1279 .\" NS   doc-macro-name
1280 .\" NS   doc-quote-left
1281 .\" NS   doc-quote-right
1282 .\" NS
1283 .\" NS width register `Qq' set in doc-common
1285 .de Qq
1286 .  if !\n[doc-arg-limit] \
1287 .    ds doc-macro-name Qq
1289 .  ds doc-quote-left "\*[q]
1290 .  ds doc-quote-right "\*[q]
1292 .  doc-enclose-string \$@
1296 .\" NS Sq user macro
1297 .\" NS   enclose string in single quotes
1298 .\" NS
1299 .\" NS modifies:
1300 .\" NS   doc-macro-name
1301 .\" NS   doc-quote-left
1302 .\" NS   doc-quote-right
1303 .\" NS
1304 .\" NS width register `Sq' set in doc-common
1306 .de Sq
1307 .  if !\n[doc-arg-limit] \
1308 .    ds doc-macro-name Sq
1310 .  ds doc-quote-left "\*[doc-left-singlequote]
1311 .  ds doc-quote-right "\*[doc-right-singlequote]
1313 .  doc-enclose-string \$@
1317 .\" NS Es user macro
1318 .\" NS   set up arguments (i.e., the left and right quotation character as
1319 .\" NS   first and second argument) for .En call
1320 .\" NS
1321 .\" NS modifies:
1322 .\" NS   doc-arg-ptr
1323 .\" NS   doc-macro-name
1324 .\" NS   doc-quote-left
1325 .\" NS   doc-quote-right
1327 .de Es
1328 .  if !\n[doc-arg-limit] \{\
1329 .    ie (\n[.$] > 2) \{\
1330 .      ds doc-macro-name Es
1331 .      doc-parse-args \$@
1332 .    \}
1333 .    el \{\
1334 .      ds doc-quote-left "\$1
1335 .      ds doc-quote-right "\$2
1336 .  \}\}
1338 .  if !\n[doc-arg-limit] \
1339 .    return
1341 .  nr doc-arg-ptr +1
1342 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1343 .  nr doc-arg-ptr +1
1344 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1345 .  nr doc-arg-ptr +1
1346 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1347 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1348 .  el \
1349 .    doc-print-and-reset
1353 .\" NS doc-have-slot global register (bool)
1354 .\" NS   set if `doc-enclose-string' has created a slot for closing
1355 .\" NS   delimiter
1357 .nr doc-have-slot 0
1360 .\" NS doc-enclose-string macro
1361 .\" NS   enclose string with given args (e.g. [ and ])
1362 .\" NS
1363 .\" NS modifies:
1364 .\" NS   doc-arg-ptr
1365 .\" NS   doc-argXXX
1366 .\" NS   doc-have-slot
1367 .\" NS
1368 .\" NS local variables:
1369 .\" NS   doc-reg-des
1370 .\" NS   doc-reg-des1
1371 .\" NS   doc-reg-des2
1372 .\" NS
1373 .\" NS requires:
1374 .\" NS   doc-quote-left
1375 .\" NS   doc-quote-right
1377 .de doc-enclose-string
1378 .  if \n[doc-in-synopsis-section] \
1379 .    doc-set-hard-space
1381 .  if !\n[doc-arg-limit] \{\
1382 .    ie \n[.$] \
1383 .      doc-parse-args \$@
1384 .    el \{\
1385 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1386 .  \}\}
1388 .  if !\n[doc-arg-limit] \
1389 .    return
1391 .  nr doc-curr-font \n[.f]
1392 .  nr doc-curr-size \n[.ps]
1394 .  nr doc-arg-ptr +1
1395 .  doc-print-prefixes
1396 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1397 .  nop \)\*[doc-quote-left]\)\c
1398 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1399 .    \" last argument
1400 .    nop \)\*[doc-quote-right]\)\c
1401 .    doc-print-and-reset
1402 .  \}
1403 .  el \{\
1404 .    \" test whether last arguments are of type closing punctuation
1405 .    \" resp. suffix
1406 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1407 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1408 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1409 .        nr doc-reg-des -1
1411 .      \" prepend closing delimiter
1412 .      nr doc-reg-des +1
1413 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1414 .    \}
1415 .    el \{\
1416 .      \" test whether last arguments are macros which continue the line
1417 .      \" logically
1418 .      nr doc-reg-des \n[doc-arg-limit]
1419 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1420 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1421 .          break
1422 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1423 .          break
1424 .        nr doc-reg-des -1
1425 .      \}
1427 .      \" if there are no trailing macros to be skipped, append argument
1428 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1429 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1430 .      el \{\
1431 .        \" if a previous call to `doc-enclose-string' has already created
1432 .        \" a slot, prepend argument
1433 .        ie \n[doc-have-slot] \
1434 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1435 .        el \{\
1436 .          \" we have to shift all arguments to the right
1437 .          nr doc-reg-des +1
1438 .          nr doc-reg-des1 \n[doc-arg-limit]
1439 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1440 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1441 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1442 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1443 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1444 .            nr doc-reg-des1 -1
1445 .            nr doc-reg-des2 -1
1446 .          \}
1447 .          nr doc-arg-limit +1
1449 .          \" finally, insert closing delimiter into the freed slot and
1450 .          \" recompute spacing vector
1451 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1452 .          nr doc-type\n[doc-reg-des] 3
1453 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1454 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1455 .          doc-parse-space-vector
1456 .          nr doc-have-slot 1
1457 .    \}\}\}
1459 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1460 .  \}
1462 .  if \n[doc-in-synopsis-section] \
1463 .    doc-set-soft-space
1467 .\" NS En user macro
1468 .\" NS   enclose arguments with quotation characters set up with `.Es'
1470 .als En doc-enclose-string
1473 .\" NS Ao user macro
1474 .\" NS   angle open
1475 .\" NS
1476 .\" NS modifies:
1477 .\" NS   doc-macro-name
1478 .\" NS   doc-quote-left
1479 .\" NS
1480 .\" NS width register `Ao' set in doc-common
1482 .de Ao
1483 .  if !\n[doc-arg-limit] \
1484 .    ds doc-macro-name Ao
1486 .  ds doc-quote-left \[la]
1488 .  doc-enclose-open \$@
1492 .\" NS Ac user macro
1493 .\" NS   angle close
1494 .\" NS
1495 .\" NS modifies:
1496 .\" NS   doc-macro-name
1497 .\" NS   doc-quote-right
1498 .\" NS
1499 .\" NS width register `Ac' set in doc-common
1501 .de Ac
1502 .  if !\n[doc-arg-limit] \
1503 .    ds doc-macro-name Ac
1505 .  ds doc-quote-right \[ra]
1507 .  doc-enclose-close \$@
1511 .\" NS Bo user macro
1512 .\" NS   bracket open
1513 .\" NS
1514 .\" NS modifies:
1515 .\" NS   doc-macro-name
1516 .\" NS   doc-quote-left
1517 .\" NS
1518 .\" NS width register `Bo' set in doc-common
1520 .de Bo
1521 .  if !\n[doc-arg-limit] \
1522 .    ds doc-macro-name Bo
1524 .  ds doc-quote-left "\*[doc-left-bracket]
1526 .  doc-enclose-open \$@
1530 .\" NS Bc user macro
1531 .\" NS   bracket close
1532 .\" NS
1533 .\" NS modifies:
1534 .\" NS   doc-macro-name
1535 .\" NS   doc-quote-right
1536 .\" NS
1537 .\" NS width register `Bc' set in doc-common
1539 .de Bc
1540 .  if !\n[doc-arg-limit] \
1541 .    ds doc-macro-name Bc
1543 .  ds doc-quote-right "\*[doc-right-bracket]
1545 .  doc-enclose-close \$@
1549 .\" NS Bro user macro
1550 .\" NS   brace open
1551 .\" NS
1552 .\" NS modifies:
1553 .\" NS   doc-macro-name
1554 .\" NS   doc-quote-left
1555 .\" NS
1556 .\" NS width register `Bro' set in doc-common
1558 .de Bro
1559 .  if !\n[doc-arg-limit] \
1560 .    ds doc-macro-name Bo
1562 .  ds doc-quote-left {
1564 .  doc-enclose-open \$@
1568 .\" NS Brc user macro
1569 .\" NS   brace close
1570 .\" NS
1571 .\" NS modifies:
1572 .\" NS   doc-macro-name
1573 .\" NS   doc-quote-right
1574 .\" NS
1575 .\" NS width register `Brc' set in doc-common
1577 .de Brc
1578 .  if !\n[doc-arg-limit] \
1579 .    ds doc-macro-name Bc
1581 .  ds doc-quote-right }
1583 .  doc-enclose-close \$@
1587 .\" NS Do user macro
1588 .\" NS   double quote open
1589 .\" NS
1590 .\" NS modifies:
1591 .\" NS   doc-macro-name
1592 .\" NS   doc-quote-left
1593 .\" NS
1594 .\" NS width register `Do' set in doc-common
1596 .de Do
1597 .  if !\n[doc-arg-limit] \
1598 .    ds doc-macro-name Do
1600 .  ds doc-quote-left "\*[Lq]
1602 .  doc-enclose-open \$@
1606 .\" NS Dc user macro
1607 .\" NS   double quote close
1608 .\" NS
1609 .\" NS modifies:
1610 .\" NS   doc-macro-name
1611 .\" NS   doc-quote-right
1612 .\" NS
1613 .\" NS width register `Dc' set in doc-common
1615 .de Dc
1616 .  if !\n[doc-arg-limit] \
1617 .    ds doc-macro-name Dc
1619 .  ds doc-quote-right "\*[Rq]
1621 .  doc-enclose-close \$@
1625 .\" NS Eo user macro
1626 .\" NS   enclose open (using first argument as beginning of enclosure)
1627 .\" NS
1628 .\" NS modifies:
1629 .\" NS   doc-macro-name
1630 .\" NS   doc-quote-left
1631 .\" NS
1632 .\" NS width register `Eo' set in doc-common
1634 .de Eo
1635 .  if !\n[doc-arg-limit] \
1636 .    ds doc-macro-name Eo
1638 .  ds doc-quote-left "\$1
1640 .  shift
1641 .  doc-enclose-open \$@
1645 .\" NS Ec user macro
1646 .\" NS   enclose close (using first argument as end of enclosure)
1647 .\" NS
1648 .\" NS modifies:
1649 .\" NS   doc-macro-name
1650 .\" NS   doc-quote-right
1651 .\" NS
1652 .\" NS width register `Ec' set in doc-common
1654 .de Ec
1655 .  if !\n[doc-arg-limit] \
1656 .    ds doc-macro-name Ec
1658 .  ds doc-quote-right "\$1
1660 .  shift
1661 .  doc-enclose-close \$@
1665 .\" NS Oo user macro
1666 .\" NS   option open
1667 .\" NS
1668 .\" NS modifies:
1669 .\" NS   doc-macro-name
1670 .\" NS   doc-quote-left
1671 .\" NS
1672 .\" NS width register `Oo' set in doc-common
1674 .de Oo
1675 .  if !\n[doc-arg-limit] \
1676 .    ds doc-macro-name Oo
1678 .  ds doc-quote-left [
1680 .  doc-enclose-open \$@
1684 .\" NS Oc user macro
1685 .\" NS   option close
1686 .\" NS
1687 .\" NS modifies:
1688 .\" NS   doc-macro-name
1689 .\" NS   doc-quote-right
1690 .\" NS
1691 .\" NS width register `Oc' set in doc-common
1693 .de Oc
1694 .  if !\n[doc-arg-limit] \
1695 .    ds doc-macro-name Oc
1697 .  ds doc-quote-right ]
1699 .  doc-enclose-close \$@
1703 .\" NS Po user macro
1704 .\" NS   parenthesis open
1705 .\" NS
1706 .\" NS modifies:
1707 .\" NS   doc-macro-name
1708 .\" NS   doc-quote-left
1709 .\" NS
1710 .\" NS width register `Po' set in doc-common
1712 .de Po
1713 .  if !\n[doc-arg-limit] \
1714 .    ds doc-macro-name Po
1716 .  ds doc-quote-left "\*[doc-left-parenthesis]
1718 .  doc-enclose-open \$@
1722 .\" NS Pc user macro
1723 .\" NS   parenthesis close
1724 .\" NS
1725 .\" NS modifies:
1726 .\" NS   doc-macro-name
1727 .\" NS   doc-quote-right
1728 .\" NS
1729 .\" NS width register `Pc' set in doc-common
1731 .de Pc
1732 .  if !\n[doc-arg-limit] \
1733 .    ds doc-macro-name Pc
1735 .  ds doc-quote-right "\*[doc-right-parenthesis]
1737 .  doc-enclose-close \$@
1741 .\" NS Qo user macro
1742 .\" NS   straight double quote open
1743 .\" NS
1744 .\" NS modifies:
1745 .\" NS   doc-macro-name
1746 .\" NS   doc-quote-left
1747 .\" NS
1748 .\" NS width register `Qo' set in doc-common
1750 .de Qo
1751 .  if !\n[doc-arg-limit] \
1752 .    ds doc-macro-name Qo
1754 .  ds doc-quote-left "\*[q]
1756 .  doc-enclose-open \$@
1760 .\" NS Qc user macro
1761 .\" NS   straight double quote close
1762 .\" NS
1763 .\" NS modifies:
1764 .\" NS   doc-macro-name
1765 .\" NS   doc-quote-right
1766 .\" NS
1767 .\" NS width register `Qc' set in doc-common
1769 .de Qc
1770 .  if !\n[doc-arg-limit] \
1771 .    ds doc-macro-name Qc
1773 .  ds doc-quote-right "\*[q]
1775 .  doc-enclose-close \$@
1779 .\" NS So user macro
1780 .\" NS   single quote open
1781 .\" NS
1782 .\" NS modifies:
1783 .\" NS   doc-macro-name
1784 .\" NS   doc-quote-left
1785 .\" NS
1786 .\" NS width register `So' set in doc-common
1788 .de So
1789 .  if !\n[doc-arg-limit] \
1790 .    ds doc-macro-name So
1792 .  ds doc-quote-left "\*[doc-left-singlequote]
1794 .  doc-enclose-open \$@
1798 .\" NS Sc user macro
1799 .\" NS   single quote close
1800 .\" NS
1801 .\" NS modifies:
1802 .\" NS   doc-macro-name
1803 .\" NS   doc-quote-right
1804 .\" NS
1805 .\" NS width register `Sc' set in doc-common
1807 .de Sc
1808 .  if !\n[doc-arg-limit] \
1809 .    ds doc-macro-name Sc
1811 .  ds doc-quote-right "\*[doc-right-singlequote]
1813 .  doc-enclose-close \$@
1817 .\" NS Xo user macro
1818 .\" NS   extend open
1819 .\" NS
1820 .\" NS modifies:
1821 .\" NS   doc-macro-name
1822 .\" NS   doc-quote-left
1823 .\" NS
1824 .\" NS width register `Xo' set in doc-common
1826 .de Xo
1827 .  if !\n[doc-arg-limit] \
1828 .    ds doc-macro-name Xo
1830 .  ds doc-quote-left
1832 .  doc-enclose-open \$@
1836 .\" NS Xc user macro
1837 .\" NS   extend close
1838 .\" NS
1839 .\" NS modifies:
1840 .\" NS   doc-macro-name
1841 .\" NS   doc-quote-right
1842 .\" NS
1843 .\" NS width register `Xc' set in doc-common
1845 .de Xc
1846 .  if !\n[doc-arg-limit] \
1847 .    ds doc-macro-name Xc
1849 .  ds doc-quote-right
1851 .  doc-enclose-close \$@
1855 .\" NS doc-nesting-level global register
1856 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1858 .nr doc-nesting-level 0
1861 .\" NS doc-in-list global register (bool)
1862 .\" NS   whether we are in (logical) .It
1864 .nr doc-in-list 0
1867 .\" NS doc-enclose-open macro
1868 .\" NS   enclose string open
1869 .\" NS
1870 .\" NS modifies:
1871 .\" NS   doc-arg-ptr
1872 .\" NS   doc-nesting-level
1874 .de doc-enclose-open
1875 .  if !\n[doc-arg-limit] \
1876 .    doc-parse-args \$@
1878 .  nr doc-arg-ptr +1
1879 .  doc-print-prefixes
1880 .  nr doc-arg-ptr -1
1882 .  nop \)\*[doc-quote-left]\)\c
1884 .  \" start enclosure box
1885 .  box doc-enclosure-box\n[doc-nesting-level]
1886 .  ev doc-enclosure-env\n[doc-nesting-level]
1887 .  evc 0
1888 .  in 0
1889 .  nf
1890 .  \" we insert something to make .chop always work
1891 .  nop \&\c
1893 .  \" increase nesting level *after* parsing of arguments
1894 .  nr doc-nesting-level +1
1896 .  if \n[doc-arg-limit] \{\
1897 .    nr doc-arg-ptr +1
1898 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1899 .      doc-print-recursive
1900 .    el \
1901 .      doc-reset-args
1902 .  \}
1906 .\" NS doc-enclose-close macro
1907 .\" NS   enclose string close
1908 .\" NS
1909 .\" NS modifies:
1910 .\" NS   doc-nesting-level
1912 .de doc-enclose-close
1913 .  nr doc-nesting-level -1
1915 .  \" finish enclosure box
1916 .  br
1917 .  ev
1918 .  box
1919 .  chop doc-enclosure-box\n[doc-nesting-level]
1920 .  unformat doc-enclosure-box\n[doc-nesting-level]
1922 .  nh
1923 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1924 .  nop \)\*[doc-quote-right]\)\c
1926 .  if !\n[doc-arg-limit] \{\
1927 .    doc-parse-args \$@
1929 .    if !\n[.$] \
1930 .      doc-print-and-reset
1931 .  \}
1933 .  if \n[doc-arg-limit] \{\
1934 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1935 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1936 .      nr doc-arg-ptr +1
1937 .      doc-print-recursive
1938 .    \}
1939 .    el \
1940 .      doc-print-and-reset
1941 .  \}
1943 .  \" shall we finish .It macro?
1944 .  if !"\*[doc-macro-name]"It" \
1945 .    if \n[doc-in-list] \
1946 .      if !\n[doc-nesting-level] \
1947 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
1951 .\" NS Pf user macro
1952 .\" NS   prefix: `.Pf prefix arg ...'
1953 .\" NS
1954 .\" NS modifies:
1955 .\" NS   doc-arg-ptr
1956 .\" NS   doc-macro-name
1957 .\" NS   doc-quote-left
1958 .\" NS
1959 .\" NS width register `Pf' set in doc-common
1961 .de Pf
1962 .  if !\n[doc-arg-limit] \
1963 .    ds doc-macro-name Pf
1965 .  ie \n[doc-arg-limit] \{\
1966 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
1967 .      nr doc-arg-ptr +1
1968 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
1969 .    \}
1970 .    el \
1971 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
1972 .  \}
1973 .  el \{\
1974 .    nop \)\$1\)\c
1975 .    shift
1976 .    ie \n[.$] \
1977 .      doc-parse-args \$@
1978 .    el \{\
1979 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
1980 .      nop \)
1981 .  \}\}
1983 .  if \n[doc-arg-limit] \{\
1984 .    nr doc-arg-ptr +1
1985 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
1986 .      doc-print-and-reset
1987 .    el \
1988 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
1989 .  \}
1993 .\" NS Ns user macro
1994 .\" NS   remove space (space removal done by `doc-parse-args')
1995 .\" NS
1996 .\" NS modifies:
1997 .\" NS   doc-argXXX
1998 .\" NS   doc-macro-name
1999 .\" NS
2000 .\" NS width register `Ns' set in doc-common
2002 .de Ns
2003 .  if !\n[doc-arg-limit] \{\
2004 .    ie \n[.$] \{\
2005 .      ds doc-macro-name Ns
2006 .      doc-parse-args \$@
2007 .    \}
2008 .    el \
2009 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2010 .  \}
2012 .  if \n[doc-arg-limit] \{\
2013 .    nr doc-arg-ptr +1
2014 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2015 .      doc-print-recursive
2016 .    el \
2017 .      doc-reset-args
2018 .  \}
2022 .\" NS Ap user macro
2023 .\" NS   append an apostrophe
2024 .\" NS
2025 .\" NS width register `Ap' set in doc-common
2027 .de Ap
2028 .  ie !\n[doc-arg-limit] \
2029 .    tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2030 .  el \{\
2031 .    nop \)'\)\c
2032 .    nr doc-arg-ptr +1
2033 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2034 .      doc-print-recursive
2035 .    el \
2036 .      doc-reset-args
2037 .  \}
2041 .\" NS doc-space global string
2042 .\" NS   current inter-argument space
2044 .ds doc-space "\*[doc-soft-space]
2047 .\" NS doc-soft-space constant string
2048 .\" NS   soft (stretchable) space (defined in doc-common)
2051 .\" NS doc-hard-space constant string
2052 .\" NS   hard (unpaddable) space (defined in doc-common)
2055 .\" NS doc-set-hard-space macro
2056 .\" NS   set current space string to hard (unpaddable) space.
2057 .\" NS
2058 .\" NS modifies:
2059 .\" NS   doc-saved-space
2060 .\" NS   doc-space
2062 .de doc-set-hard-space
2063 .  ie "\*[doc-space]"" \
2064 .    ds doc-saved-space "\*[doc-hard-space]
2065 .  el \
2066 .    ds doc-space "\*[doc-hard-space]
2070 .\" NS doc-set-soft-space macro
2071 .\" NS   set current space string to soft space
2072 .\" NS
2073 .\" NS modifies:
2074 .\" NS   doc-saved-space
2075 .\" NS   doc-space
2077 .de doc-set-soft-space
2078 .  ie "\*[doc-space]"" \
2079 .    ds doc-saved-space "\*[doc-soft-space]
2080 .  el \
2081 .    ds doc-space "\*[doc-soft-space]
2085 .\" NS doc-space-mode global register (bool)
2086 .\" NS   default is one (space mode on)
2088 .nr doc-space-mode 1
2091 .\" NS doc-saved-space global string
2092 .\" NS   saved value of `doc-space'
2094 .ds doc-saved-space "\*[doc-space]
2097 .\" NS doc-have-space global register (bool)
2098 .\" NS   set if last command was horizontal space
2100 .nr doc-have-space 0
2103 .\" NS Sm user macro
2104 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2105 .\" NS
2106 .\" NS   without argument, toggle space mode
2107 .\" NS
2108 .\" NS modifies:
2109 .\" NS   doc-arg-limit
2110 .\" NS   doc-arg-ptr
2111 .\" NS   doc-argXXX
2112 .\" NS   doc-macro-name
2113 .\" NS   doc-num-args
2114 .\" NS   doc-saved-space
2115 .\" NS   doc-space
2116 .\" NS   doc-space-mode
2117 .\" NS   doc-spaceXXX
2118 .\" NS
2119 .\" NS local variables:
2120 .\" NS   doc-reg-Sm
2121 .\" NS
2122 .\" NS width register `Sm' set in doc-common
2124 .de Sm
2125 .  ie \n[doc-have-space] \
2126 .    nr doc-reg-Sm 0
2127 .  el \
2128 .    nr doc-reg-Sm 1
2130 .  if !\n[doc-arg-limit] \{\
2131 .    ie \n[.$] \{\
2132 .      ds doc-macro-name Sm
2133 .      doc-parse-args \$@
2134 .    \}
2135 .    el \{\
2136 .      ie \n[doc-space-mode] \
2137 .        nr doc-space-mode 0
2138 .      el \
2139 .        nr doc-space-mode 1
2140 .  \}\}
2142 .  if !\n[doc-arg-limit] \
2143 .    return
2145 .  nr doc-arg-ptr +1
2147 .  \" avoid a warning message in case `Sm' is the last parameter
2148 .  if !d doc-arg\n[doc-arg-ptr] \
2149 .    ds doc-arg\n[doc-arg-ptr]
2151 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2152 .    ds doc-space "\*[doc-saved-space]
2153 .    nr doc-space-mode 1
2154 .  \}
2155 .  el \{\
2156 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2157 .      ds doc-saved-space "\*[doc-space]
2158 .      ds doc-space
2159 .      nr doc-space-mode 0
2160 .    \}
2161 .    el \{\
2162 .      \" no argument for Sm
2163 .      nr doc-arg-ptr -1
2164 .      ie \n[doc-space-mode] \
2165 .        nr doc-space-mode 0
2166 .      el \
2167 .        nr doc-space-mode 1
2168 .  \}\}
2170 .  ie \n[doc-space-mode] \{\
2171 .    \" recompute space vector for remaining arguments
2172 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2173 .    nr doc-arg-limit \n[doc-arg-ptr]
2174 .    if \n[doc-num-args] \
2175 .      doc-parse-space-vector
2177 .    \" finish line only if it is interrupted and `doc-have-space'
2178 .    \" isn't set
2179 .    if \n[doc-reg-Sm] \
2180 .      if \n[.int] \
2181 .        nop \)
2182 .  \}
2183 .  el \{\
2184 .    \" reset remaining space vector elements
2185 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2186 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2187 .      ds doc-space\n[doc-reg-Sm]
2188 .      nr doc-reg-Sm +1
2189 .      \" the body of a `while' request must end with the fitting `\}'!
2190 .    \}
2191 .  \}
2193 .  \" do we have parameters to print?
2194 .  ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2195 .    \" ignore `.Sm on' and `.Sm off' without additional parameters
2196 .    ie (\n[doc-arg-ptr] > 1) \
2197 .      doc-print-and-reset
2198 .    el \
2199 .      doc-reset-args
2200 .  \}
2201 .  el \{\
2202 .    \" skip `Sm' argument
2203 .    nr doc-arg-ptr +1
2204 .    doc-print-recursive
2205 .  \}
2209 .\" NS doc-arg-type immediate register
2210 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2211 .\" NS   punctuation prefix=4)
2213 .nr doc-arg-type 0
2216 .\" NS doc-get-arg-type macro
2217 .\" NS   get argument type
2218 .\" NS
2219 .\" NS   this macro expects the width of the argument in `doc-width'
2220 .\" NS
2221 .\" NS modifies:
2222 .\" NS   doc-arg-type
2224 .de doc-get-arg-type
2225 .  nr doc-arg-type 2
2227 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2228 .    ie (\n[doc-width] == 1) \{\
2229 .      if r doc-punct\$1 \
2230 .        nr doc-arg-type \n[doc-punct\$1]
2231 .    \}
2232 .    el \
2233 .      if r \$1 \
2234 .        if d \$1 \
2235 .          nr doc-arg-type 1
2236 .  \}
2240 .\" NS doc-get-arg-type* macro
2241 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2242 .\" NS
2243 .\" NS   this macro sets the `doc-width' register using the `length' request
2244 .\" NS   to get the number of characters in a string literally
2245 .\" NS
2246 .\" NS modifies:
2247 .\" NS   doc-arg-type
2248 .\" NS   doc-width
2250 .de doc-get-arg-type*
2251 .  nr doc-arg-type 2
2252 .  length doc-width "\*[doc-arg\$1]
2254 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2255 .    ie (\n[doc-width] == 1) \{\
2256 .      if r doc-punct\*[doc-arg\$1] \
2257 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2258 .    \}
2259 .    el \
2260 .      if r \*[doc-arg\$1] \
2261 .        if d \*[doc-arg\$1] \
2262 .          nr doc-arg-type 1
2263 .  \}
2267 .\" NS doc-set-spacing-1 macro
2268 .\" NS   set spacing for macros
2269 .\" NS
2270 .\" NS modifies:
2271 .\" NS   doc-spaceXXX
2272 .\" NS
2273 .\" NS local variables:
2274 .\" NS   doc-reg-dssfm
2275 .\" NS   doc-reg-dssfm1
2277 .de doc-set-spacing-1
2278 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2280 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2281 .  \" argument)
2282 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2283 .    if \n[doc-arg-limit] \{\
2284 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2285 .      ds doc-space\n[doc-reg-dssfm]
2286 .    \}
2287 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2288 .  \}
2289 .  el \{\
2290 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2291 .    \" argument)
2292 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2293 .      if \n[doc-arg-limit] \{\
2294 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2295 .        ds doc-space\n[doc-reg-dssfm]
2296 .      \}
2297 .      ds doc-space\n[doc-arg-limit]
2298 .    \}
2299 .    el \
2300 .      ds doc-space\n[doc-arg-limit]
2301 .  \}
2305 .\" NS doc-set-spacing-2 macro
2306 .\" NS   set spacing for strings
2307 .\" NS
2308 .\" NS modifies:
2309 .\" NS   doc-spaceXXX
2311 .de doc-set-spacing-2
2312 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2316 .\" NS doc-set-spacing-3 macro
2317 .\" NS   set spacing for punctuation suffixes
2318 .\" NS
2319 .\" NS modifies:
2320 .\" NS   doc-spaceXXX
2321 .\" NS
2322 .\" NS local variables:
2323 .\" NS   doc-reg-dssfps
2325 .de doc-set-spacing-3
2326 .  if \n[doc-arg-limit] \{\
2327 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2328 .    ds doc-space\n[doc-reg-dssfps]
2329 .  \}
2331 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2335 .\" NS doc-set-spacing-4 macro
2336 .\" NS   set spacing for punctuation prefixes
2337 .\" NS
2338 .\" NS modifies:
2339 .\" NS   doc-spaceXXX
2341 .de doc-set-spacing-4
2342 .  ds doc-space\n[doc-arg-limit]
2346 .\" type switches (on current argument doc-arg-ptr)
2349 .\" NS doc-do-1 macro
2350 .\" NS   call request if macro
2352 .de doc-do-1
2353 .  \*[doc-arg\n[doc-arg-ptr]]
2357 .\" NS doc-do-2 macro
2358 .\" NS   call .doc-print-recursive if string
2360 .als doc-do-2 doc-print-recursive
2363 .\" NS doc-do-3 macro
2364 .\" NS   call .doc-print-recursive if punctuation suffix
2366 .als doc-do-3 doc-print-recursive
2369 .\" NS doc-do-4 macro
2370 .\" NS   call .doc-print-recursive if punctuation prefix
2372 .als doc-do-4 doc-print-recursive
2375 .\" NS doc-fontmode-depth global register
2376 .\" NS   font mode level
2378 .nr doc-fontmode-depth 0
2381 .\" NS doc-fontmode-font-stackXXX global register
2382 .\" NS   stack of saved current font values from `Bf' macro
2383 .\" NS
2384 .\" NS limit:
2385 .\" NS   doc-fontmode-depth
2387 .nr doc-fontmode-font-stack0 0
2390 .\" NS doc-fontmode-size-stackXXX global register
2391 .\" NS   stack of saved current size values from `Bf' macro
2392 .\" NS
2393 .\" NS limit:
2394 .\" NS   doc-fontmode-depth
2396 .nr doc-fontmode-size-stack0 0
2399 .\" NS Bf user macro
2400 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2401 .\" NS
2402 .\" NS modifies:
2403 .\" NS   doc-fontmode-depth
2404 .\" NS   doc-fontmode-font-stackXXX
2405 .\" NS   doc-fontmode-size-stackXXX
2406 .\" NS   doc-macro-name
2407 .\" NS
2408 .\" NS width register `Bf' set in doc-common
2410 .de Bf
2411 .  ds doc-macro-name Bf
2413 .  ie \n[.$] \{\
2414 .    nr doc-fontmode-depth +1
2416 .    \" save current font and size
2417 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2418 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2420 .    ie        "\$1"Em" \
2421 .      nop \*[doc-Em-font]\c
2422 .    el \{ .ie "\$1"Li" \
2423 .      nop \*[doc-Li-font]\c
2424 .    el \{ .ie "\$1"Sy" \
2425 .      nop \*[doc-Sy-font]\c
2426 .    el \{ .ie "\$1"-emphasis" \
2427 .      nop \*[doc-Em-font]\c
2428 .    el \{ .ie "\$1"-literal" \
2429 .      nop \*[doc-Li-font]\c
2430 .    el \{ .ie "\$1"-symbolic" \
2431 .      nop \*[doc-Sy-font]\c
2432 .    el \{\
2433 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2434 .      tm1 " (#\n[.c])
2435 .  \}\}\}\}\}\}\}
2436 .  el \
2437 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2441 .\" NS Ef user macro
2442 .\" NS   end font mode
2443 .\" NS
2444 .\" NS modifies:
2445 .\" NS   doc-macro-name
2446 .\" NS
2447 .\" NS width register `Ef' set in doc-common
2449 .de Ef
2450 .  ds doc-macro-name Ef
2452 .  ie \n[doc-fontmode-depth] \{\
2453 .    \" restore saved font and size
2454 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2455 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2457 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2458 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2459 .    nr doc-fontmode-depth -1
2460 .  \}
2461 .  el \
2462 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2466 .\" NS doc-keep-type global register
2467 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2469 .nr doc-keep-type 0
2472 .\" NS Bk user macro
2473 .\" NS   begin keep
2474 .\" NS
2475 .\" NS modifies:
2476 .\" NS   doc-keep-type
2477 .\" NS   doc-macro-name
2478 .\" NS
2479 .\" NS width register `Bk' set in doc-common
2481 .de Bk
2482 .  ds doc-macro-name Bk
2484 .  if \n[doc-keep-type] \
2485 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2487 .  ie        "\$1"-lines" \{\
2488 .    nr doc-keep-type 2
2489 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2490 .  \}
2491 .  el \{ .ie "\$1"-words" \{\
2492 .    nr doc-keep-type 1
2493 .    doc-set-hard-space
2494 .  \}
2495 .  el \{ .ie "\$1"" \{\
2496 .    \" default
2497 .    nr doc-keep-type 1
2498 .    doc-set-hard-space
2499 .  \}
2500 .  el \{\
2501 .    tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2502 .    nr doc-keep-type 3
2503 .  \}\}\}
2505 \#.  nr doc-nesting-level +1
2509 .\" NS Ek user macro
2510 .\" NS   end keep
2511 .\" NS
2512 .\" NS modifies:
2513 .\" NS   doc-keep-type
2514 .\" NS   doc-macro-name
2515 .\" NS
2516 .\" NS width register `Ek' set in doc-common
2518 .de Ek
2519 .  ds doc-macro-name Ek
2521 \#.  nr doc-nesting-level -1
2523 .  ie \n[.$] \
2524 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2525 .  el \{\
2526 .    if !\n[doc-keep-type] \
2527 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2529 .    ie        (\n[doc-keep-type] == 1) \
2530 .      doc-set-soft-space
2531 .    el \{ .if (\n[doc-keep-type] == 2) \
2532 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2533 .  \}\}
2535 .  nr doc-keep-type 0
2537 \#.  if !"\*[doc-out-string]"" \
2538 \#.    doc-print-out-string
2542 .\" NS doc-display-depth global register
2543 .\" NS   display level
2545 .nr doc-display-depth 0
2548 .\" NS doc-is-compact global register (bool)
2549 .\" NS   set if the `compact' keyword is given
2551 .nr doc-is-compact 0
2554 .\" NS doc-display-type-stackXXX global string
2555 .\" NS   the display type stack
2556 .\" NS
2557 .\" NS limit:
2558 .\" NS   doc-display-depth
2560 .ds doc-display-type-stack0
2563 .\" NS doc-display-indent-stackXXX global register
2564 .\" NS   stack of display indentation values
2565 .\" NS
2566 .\" NS limit:
2567 .\" NS   doc-display-depth
2569 .nr doc-display-indent-stack0 0
2572 .\" NS doc-display-ad-stackXXX global register
2573 .\" NS   stack of saved adjustment modes
2574 .\" NS
2575 .\" NS limit:
2576 .\" NS   doc-display-depth
2578 .nr doc-display-ad-stack0 0
2581 .\" NS doc-display-fi-stackXXX global register
2582 .\" NS   stack of saved fill modes
2583 .\" NS
2584 .\" NS limit:
2585 .\" NS   doc-display-depth
2587 .nr doc-display-fi-stack0 0
2590 .\" NS doc-display-ft-stackXXX global register
2591 .\" NS   stack of saved fonts
2592 .\" NS
2593 .\" NS limit:
2594 .\" NS   doc-display-depth
2596 .nr doc-display-ft-stack0 0
2599 .\" NS doc-display-ps-stackXXX global register
2600 .\" NS   stack of saved font sizes
2601 .\" NS
2602 .\" NS limit:
2603 .\" NS   doc-display-depth
2605 .nr doc-display-ps-stack0 0
2608 .\" NS Bd user macro
2609 .\" NS   begin display
2610 .\" NS
2611 .\" NS width register `Bd' set in doc-common
2612 .\" NS
2613 .\" NS modifies:
2614 .\" NS   doc-curr-font
2615 .\" NS   doc-curr-size
2616 .\" NS   doc-display-depth
2617 .\" NS   doc-display-ad-stackXXX
2618 .\" NS   doc-display-fi-stackXXX
2619 .\" NS   doc-display-ft-stackXXX
2620 .\" NS   doc-display-ps-stackXXX
2621 .\" NS   doc-display-file
2622 .\" NS   doc-display-indent-stackXXX
2623 .\" NS   doc-display-type-stackXXX
2624 .\" NS   doc-is-compact
2625 .\" NS   doc-macro-name
2626 .\" NS
2627 .\" NS local variables:
2628 .\" NS   doc-reg-Bd
2630 .de Bd
2631 .  ds doc-macro-name Bd
2633 .  if !\n[.$] \{\
2634 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2635 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2636 .    return
2637 .  \}
2639 .  nr doc-is-compact 0
2640 .  ds doc-display-file
2641 .  nr doc-reg-Bd 1
2642 .  nr doc-display-depth +1
2644 .  \" save current adjustment and fill modes
2645 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2646 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2648 .  ie        "\$1"-literal" \{\
2649 .    ds doc-display-type-stack\n[doc-display-depth] literal
2650 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2651 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2653 .    ie t \{\
2654 .      nop \*[doc-Li-font]\c
2655 .      ta T 9n
2656 .    \}
2657 .    el \
2658 .      ta T 8n
2659 .    nf
2660 .  \}
2661 .  el \{ .ie "\$1"-filled" \{\
2662 .    ds doc-display-type-stack\n[doc-display-depth] filled
2663 .    ad b
2664 .    fi
2665 .  \}
2666 .  el \{ .ie "\$1"-ragged" \{\
2667 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2668 .    na
2669 .    fi
2670 .  \}
2671 .  el \{ .ie "\$1"-centered" \{\
2672 .    ds doc-display-type-stack\n[doc-display-depth] centered
2673 .    ad c
2674 .    fi
2675 .  \}
2676 .  el \{ .ie "\$1"-unfilled" \{\
2677 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2678 .    nf
2679 .  \}
2680 .  el \{\
2681 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2682 .    tm1 "              in .Bd macro (#\n[.c])
2683 .    nr doc-reg-Bd 0
2684 .  \}\}\}\}\}
2686 .  \" have we seen an argument?
2687 .  if \n[doc-reg-Bd] \{\
2688 .    shift
2689 .    \" check other arguments
2690 .    if \n[.$] \
2691 .      doc-do-Bd-args \$@
2692 .  \}
2694 .  \" avoid warning about non-existent register
2695 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2696 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2698 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2699 .    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2701 .  if !\n[doc-is-compact] \
2702 .    sp \n[doc-display-vertical]u
2704 .  if !\n[cR] \
2705 .    ne 2v
2707 .  if !"\*[doc-display-file]"" \
2708 .    so \*[doc-display-file]
2710 .  nr doc-is-compact 0
2711 .  ds doc-display-file
2715 .\" NS doc-do-Bd-args macro
2716 .\" NS   resolve remaining .Bd arguments
2717 .\" NS
2718 .\" NS modifies:
2719 .\" NS   doc-display-file
2720 .\" NS   doc-display-indent-stackXXX
2721 .\" NS   doc-is-compact
2722 .\" NS
2723 .\" NS local variables:
2724 .\" NS   doc-reg-ddBa
2725 .\" NS   doc-reg-ddBa1
2726 .\" NS   doc-reg-ddBa2
2727 .\" NS   doc-reg-ddBa3
2728 .\" NS   doc-reg-ddBa4
2729 .\" NS   doc-str-ddBa
2731 .de doc-do-Bd-args
2732 .  nr doc-reg-ddBa 1
2734 .  ie        "\$1"-offset" \{\
2735 .    nr doc-reg-ddBa 2
2737 .    ie        "\$2"left" \
2738 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2739 .    el \{ .ie "\$2"right" \
2740 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2741 .    el \{ .ie "\$2"center" \
2742 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2743 .    el \{ .ie "\$2"indent" \
2744 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2745 .    el \{ .ie "\$2"indent-two" \
2746 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2747 .    el \
2748 .      nr doc-reg-ddBa 1
2749 .    \}\}\}\}
2751 .    \" not a known keyword
2752 .    if (\n[doc-reg-ddBa] == 1) \{\
2753 .      nr doc-reg-ddBa 2
2755 .      nr doc-reg-ddBa1 0
2756 .      if \B\a(\$2)\a \{\
2757 .        \" disable warnings related to scaling indicators (32)
2758 .        nr doc-reg-ddBa2 \n[.warn]
2759 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2761 .        \" values without a scaling indicator are taken as strings;
2762 .        \" we test whether the parameter string with and without the last
2763 .        \" character yields identical numerical results (ignoring the
2764 .        \" scaling indicator)
2765 .        ds doc-str-ddBa "\$2
2766 .        substring doc-str-ddBa 0 -2
2767 .        if \B\a(\*[doc-str-ddBa])\a \{\
2768 .          nr doc-reg-ddBa3 (;(\$2))
2769 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2770 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2771 .            nr doc-reg-ddBa1 1
2772 .        \}
2774 .        \" enable all warnings again
2775 .        warn \n[doc-reg-ddBa2]
2776 .      \}
2778 .      ie \n[doc-reg-ddBa1] \
2779 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2780 .      el \{\
2781 .        doc-get-width "\$2"
2782 .        ie (\n[doc-width] <= 3) \{\
2783 .          \" if the offset parameter is a macro, use the macro's
2784 .          \" width as specified in doc-common
2785 .          doc-get-arg-type "\$2"
2786 .          ie (\n[doc-arg-type] == 1) \
2787 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2788 .          el \
2789 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2790 .        \}
2791 .        el \
2792 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2793 .    \}\}
2794 .  \}
2795 .  el \{ .ie "\$1"-compact" \
2796 .    nr doc-is-compact 1
2797 .  el \{ .ie "\$1"-file" \{\
2798 .    ie !"\$2"" \{\
2799 .      ds doc-display-file "\$2
2800 .      nr doc-reg-ddBa 2
2801 .    \}
2802 .    el \
2803 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2804 .  \}
2805 .  el \
2806 .      tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2807 .  \}\}
2809 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2810 .    shift \n[doc-reg-ddBa]
2811 .    doc-do-Bd-args \$@
2812 .  \}
2816 .\" NS Ed user macro
2817 .\" NS   end display
2818 .\" NS
2819 .\" NS modifies:
2820 .\" NS   doc-display-depth
2821 .\" NS   doc-display-indent-stackXXX
2822 .\" NS   doc-display-type-stackXXX
2823 .\" NS   doc-macro-name
2824 .\" NS
2825 .\" NS width register `Ed' set in doc-common
2827 .de Ed
2828 .  ds doc-macro-name Ed
2830 .  br
2832 .  if !\n[doc-display-depth] \{\
2833 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2834 .    nr doc-display-depth 1
2835 .  \}
2837 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2838 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2839 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2840 .  \}
2842 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2844 .  \" restore saved adjustment and fill modes
2845 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2846 .    fi
2847 .  el \
2848 .    nf
2849 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2851 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2852 .  ds doc-display-type-stack\n[doc-display-depth]
2853 .  nr doc-display-depth -1
2857 .\" NS doc-list-type-stackXXX global string
2858 .\" NS   stack of list types
2859 .\" NS
2860 .\" NS limit:
2861 .\" NS   doc-list-depth
2863 .ds doc-list-type-stack1
2866 .\" NS doc-list-indent-stackXXX global register
2867 .\" NS   stack of list indentation values
2868 .\" NS
2869 .\" NS limit:
2870 .\" NS   doc-list-depth
2872 .nr doc-list-indent-stack1 0
2875 .\" NS doc-list-have-indent-stackXXX global register (bool)
2876 .\" NS   an indentation value is active
2877 .\" NS
2878 .\" NS limit:
2879 .\" NS   doc-list-depth
2881 .nr doc-list-have-indent-stack1 0
2884 .\" NS Bl user macro
2885 .\" NS   begin list
2886 .\" NS
2887 .\" NS width register `Bl' set in doc-common
2888 .\" NS
2889 .\" NS modifies:
2890 .\" NS   doc-arg-ptr
2891 .\" NS   doc-argXXX
2892 .\" NS   doc-list-depth
2893 .\" NS   doc-list-have-indent-stackXXX
2894 .\" NS   doc-list-indent-stackXXX
2895 .\" NS   doc-list-type-stackXXX
2896 .\" NS   doc-macro-name
2897 .\" NS   doc-num-args
2898 .\" NS   doc-num-columns
2899 .\" NS
2900 .\" NS local variables:
2901 .\" NS   doc-reg-Bl
2903 .de Bl
2904 .  if !\n[.$] \{\
2905 .    doc-Bl-usage
2906 .    return
2907 .  \}
2909 .  ds doc-macro-name Bl
2910 .  nr doc-list-depth +1
2911 .  nr doc-arg-ptr 1
2913 .  ie        "\$1"-hang" \{\
2914 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2915 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2916 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2917 .  \}
2918 .  el \{ .ie "\$1"-tag" \{\
2919 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2920 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2921 .  \}
2922 .  el \{ .ie "\$1"-item" \{\
2923 .    ds doc-list-type-stack\n[doc-list-depth] item-list
2924 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2925 .  \}
2926 .  el \{ .ie "\$1"-enum" \{\
2927 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
2928 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
2929 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2930 .  \}
2931 .  el \{ .ie "\$1"-bullet" \{\
2932 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
2933 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2934 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2935 .  \}
2936 .  el \{ .ie "\$1"-dash" \{\
2937 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2938 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2939 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2940 .  \}
2941 .  el \{ .ie "\$1"-hyphen" \{\
2942 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2943 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2944 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2945 .  \}
2946 .  el \{ .ie "\$1"-inset" \{\
2947 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
2948 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2949 .  \}
2950 .  el \{ .ie "\$1"-diag" \{\
2951 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
2952 .  \}
2953 .  el \{ .ie "\$1"-ohang" \{\
2954 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
2955 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2956 .  \}
2957 .  el \{ .ie "\$1"-column" \{\
2958 .    ds doc-list-type-stack\n[doc-list-depth] column-list
2959 .    linetabs 1
2960 .  \}
2961 .  el \{\
2962 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
2963 .    tm1 "              in .Bl macro
2964 .    tm
2965 .    nr doc-arg-ptr 0
2966 .  \}\}\}\}\}\}\}\}\}\}\}
2968 .  \" we have seen a list type
2969 .  if !\n[doc-arg-ptr] \{\
2970 .    doc-Bl-usage
2971 .    doc-reset-args
2972 .    nr doc-list-depth -1
2973 .    return
2974 .  \}
2976 .  shift
2978 .  \" fill argument vector
2979 .  nr doc-reg-Bl 1
2980 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
2981 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
2982 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
2983 .    nr doc-type\n[doc-reg-Bl] 0
2984 .    ds doc-space\n[doc-reg-Bl]
2985 .    nr doc-reg-Bl +1
2986 .  \}
2988 .  doc-increment-list-stack
2990 .  if \n[.$] \{\
2991 .    nr doc-arg-limit \n[.$]
2992 .    nr doc-arg-ptr 0
2993 .    doc-do-Bl-args
2995 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
2997 .    \" initialize column list
2998 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
2999 .      doc-set-column-tab \n[doc-num-columns]
3000 '      in -\n[doc-column-indent-width]u
3001 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3002 .        sp \n[doc-display-vertical]u
3004 .      nf
3005 .      nr doc-num-columns 0
3006 .  \}\}
3008 .  doc-reset-args
3012 .\" NS doc-Bl-usage macro
3014 .de doc-Bl-usage
3015 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3016 .  tm1 "             [-width <string>]
3017 .  tm1 "             [-offset <string>] [-compact]
3018 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3019 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3020 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3024 .\" NS doc-do-Bl-args macro
3025 .\" NS   resolve remaining .Bl arguments
3026 .\" NS
3027 .\" NS modifies:
3028 .\" NS   doc-arg-ptr
3029 .\" NS   doc-argXXX
3030 .\" NS   doc-compact-list-stackXXX
3031 .\" NS   doc-list-indent-stackXXX
3032 .\" NS   doc-list-offset-stackXXX
3033 .\" NS   doc-num-columns
3034 .\" NS   doc-tag-prefix-stackXXX
3035 .\" NS   doc-tag-width-stackXXX
3036 .\" NS
3037 .\" NS local variables:
3038 .\" NS   doc-box-dBla
3039 .\" NS   doc-env-dBla
3040 .\" NS   doc-reg-dBla
3041 .\" NS   doc-reg-dBla1
3042 .\" NS   doc-reg-dBla2
3043 .\" NS   doc-reg-dBla3
3044 .\" NS   doc-reg-dBla4
3045 .\" NS   doc-str-dBla
3046 .\" NS   doc-str-dBla1
3048 .de doc-do-Bl-args
3049 .  nr doc-arg-ptr +1
3051 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3052 .    return
3054 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3055 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3056 .  if !d doc-arg\n[doc-reg-dBla] \
3057 .    ds doc-arg\n[doc-reg-dBla]
3059 .  nr doc-reg-dBla 1
3061 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3062 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3064 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3065 .    ie (\n[doc-list-depth] > 1) \{\
3066 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3067 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3068 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3069 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3070 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3071 .    \}
3072 .    el \
3073 .      tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3074 .  \}
3076 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3077 .    nr doc-arg-ptr +1
3078 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3080 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3081 .    substring doc-str-dBla 0 0
3082 .    ie \a.\a\*[doc-str-dBla]\a \{\
3083 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3084 .      substring doc-str-dBla 1
3085 .      doc-first-parameter \*[doc-str-dBla]
3086 .      doc-get-width "\*[doc-str-dfp]
3087 .      doc-get-arg-type "\*[doc-str-dfp]
3088 .      ie (\n[doc-arg-type] == 1) \
3089 .        nr doc-reg-dBla1 1
3090 .      el \
3091 .        nr doc-reg-dBla1 0
3092 .    \}
3093 .    el \
3094 .      nr doc-reg-dBla1 0
3095 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3097 .    ie \n[doc-reg-dBla1] \{\
3098 .      \" execute string in a box to get the width of the diversion
3099 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3100 .      doc-save-global-vars
3101 .      doc-reset-args
3102 .      box doc-box-dBla
3103 .      ev doc-env-dBla
3104 .      evc 0
3105 .      in 0
3106 .      nf
3107 .      nop \*[doc-str-dBla]
3108 .      br
3109 .      ev
3110 .      box
3111 .      doc-restore-global-vars
3112 .      doc-get-width \h'\n[dl]u'
3113 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3114 .    \}
3115 .    el \{\
3116 .      \" test whether argument is a valid numeric expression
3117 .      nr doc-reg-dBla1 0
3118 .      if \B\a(\*[doc-str-dBla])\a \{\
3119 .        \" disable warnings related to scaling indicators (32)
3120 .        nr doc-reg-dBla2 \n[.warn]
3121 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3123 .        \" values without a scaling indicator are taken as strings;
3124 .        \" we test whether the parameter string with and without the last
3125 .        \" character yields identical numerical results (ignoring the
3126 .        \" scaling indicator)
3127 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3128 .        substring doc-str-dBla1 0 -2
3129 .        if \B\a(\*[doc-str-dBla1])\a \{\
3130 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3131 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3132 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3133 .            nr doc-reg-dBla1 1
3134 .        \}
3136 .        \" enable all warnings again
3137 .        warn \n[doc-reg-dBla2]
3138 .      \}
3140 .      ie \n[doc-reg-dBla1] \
3141 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3142 .      el \{\
3143 .        doc-get-arg-width \n[doc-arg-ptr]
3144 .        ie (\n[doc-width] == 2) \{\
3145 .          \" if the width parameter is a macro, use the macro's
3146 .          \" width as specified in doc-common
3147 .          doc-get-arg-type \*[doc-str-dBla]
3148 .          ie (\n[doc-arg-type] == 1) \
3149 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3150 .          el \
3151 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3152 .        \}
3153 .        el \
3154 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3155 .  \}\}\}
3157 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3158 .    nr doc-arg-ptr +1
3160 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3161 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3162 .    el \{\
3163 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3164 .      nr doc-reg-dBla1 0
3165 .      if \B\a(\*[doc-str-dBla])\a \{\
3166 .        nr doc-reg-dBla2 \n[.warn]
3167 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3169 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3170 .        substring doc-str-dBla1 0 -2
3171 .        if \B\a(\*[doc-str-dBla1])\a \{\
3172 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3173 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3174 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3175 .            nr doc-reg-dBla1 1
3176 .        \}
3178 .        warn \n[doc-reg-dBla2]
3179 .      \}
3181 .      ie \n[doc-reg-dBla1] \
3182 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3183 .      el \{\
3184 .        doc-get-arg-width \n[doc-arg-ptr]
3185 .        ie (\n[doc-width] <= 3) \{\
3186 .          \" if the offset parameter is a macro, use the macro's
3187 .          \" width as specified in doc-common
3188 .          doc-get-arg-type \*[doc-str-dBla]
3189 .          ie (\n[doc-arg-type] == 1) \
3190 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3191 .          el \
3192 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3193 .        \}
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-reg-dBla 0
3199 .  \}\}\}
3201 .  \" not a known keyword, so it specifies the width of the next column
3202 .  \" (if it is a column list)
3203 .  if !\n[doc-reg-dBla] \{\
3204 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3205 .      nr doc-num-columns +1
3206 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3207 .      substring doc-str-dBla 0 0
3208 .      ie \a.\a\*[doc-str-dBla]\a \{\
3209 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3210 .        substring doc-str-dBla 1
3211 .        doc-first-parameter \*[doc-str-dBla]
3212 .        doc-get-width "\*[doc-str-dfp]
3213 .        doc-get-arg-type "\*[doc-str-dfp]
3214 .        ie (\n[doc-arg-type] == 1) \
3215 .          nr doc-reg-dBla1 1
3216 .        el \
3217 .          nr doc-reg-dBla1 0
3218 .      \}
3219 .      el \
3220 .        nr doc-reg-dBla1 0
3221 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3223 .      ie \n[doc-reg-dBla1] \{\
3224 .        \" execute string in a box to get the width of the diversion
3225 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3226 .        doc-save-global-vars
3227 .        doc-reset-args
3228 .        box doc-box-dBla
3229 .        ev doc-env-dBla
3230 .        evc 0
3231 .        in 0
3232 .        nf
3233 .        nop \*[doc-str-dBla]
3234 .        br
3235 .        ev
3236 .        box
3237 .        doc-restore-global-vars
3238 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3239 .      \}
3240 .      el \
3241 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3242 .    \}
3243 .    el \{\
3244 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3245 .      tm1 " in .Bl macro (#\n[.c])
3246 .  \}\}
3248 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3249 .    doc-do-Bl-args
3253 .\" NS doc-save-global-vars macro
3254 .\" NS   save all global variables
3255 .\" NS
3256 .\" NS local variables:
3257 .\" NS   doc-reg-dsgv
3259 .de doc-save-global-vars
3260 .  ds doc-macro-name-saved "\*[doc-macro-name]
3261 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3262 .  nr doc-num-args-saved \n[doc-num-args]
3263 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3265 .  nr doc-reg-dsgv 1
3266 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3267 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3268 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3269 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3270 .    nr doc-reg-dsgv +1
3271 .  \}
3273 .  nr doc-curr-font-saved \n[doc-curr-font]
3274 .  nr doc-curr-size-saved \n[doc-curr-size]
3275 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3276 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3277 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3278 .  nr doc-have-decl-saved \n[doc-have-decl]
3279 .  nr doc-have-var-saved \n[doc-have-var]
3280 .  ds doc-command-name-saved "\*[doc-command-name]
3281 .  ds doc-quote-left-saved "\*[doc-quote-left]
3282 .  ds doc-quote-right-saved "\*[doc-quote-right]
3283 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3284 .  nr doc-in-list-saved \n[doc-in-list]
3285 .  ds doc-space-saved "\*[doc-space]
3286 .  ds doc-saved-space-saved "\*[doc-saved-space]
3287 .  nr doc-space-mode-saved \n[doc-space-mode]
3288 .  nr doc-have-space-saved \n[doc-have-space]
3289 .  nr doc-have-slot-saved \n[doc-have-slot]
3290 .  nr doc-keep-type-saved \n[doc-keep-type]
3291 .  nr doc-display-depth-saved \n[doc-display-depth]
3292 .  nr doc-is-compact-saved \n[doc-is-compact]
3294 .  nr doc-reg-dsgv 0
3295 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3296 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3297 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3298 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3299 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3300 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3301 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3302 .    nr doc-reg-dsgv +1
3303 .  \}
3305 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3307 .  nr doc-reg-dsgv 1
3308 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3309 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3310 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3311 .    nr doc-reg-dsgv +1
3312 .  \}
3314 .  nr doc-list-depth-saved \n[doc-list-depth]
3316 .  nr doc-reg-dsgv 1
3317 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3318 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3319 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3320 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3321 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3322 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3323 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3324 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3325 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3326 .    nr doc-reg-dsgv +1
3327 .  \}
3329 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3330 .  nr doc-curr-type-saved \n[doc-curr-type]
3331 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3332 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3333 .  nr doc-num-columns-saved \n[doc-num-columns]
3334 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3335 .  nr doc-is-func-saved \n[doc-is-func]
3336 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3337 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3338 .  ds doc-func-arg-saved "\*[doc-func-arg]
3339 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3340 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3341 .  nr doc-have-func-saved \n[doc-have-func]
3342 .  nr doc-is-reference-saved \n[doc-is-reference]
3343 .  nr doc-reference-count-saved \n[doc-reference-count]
3344 .  nr doc-author-count-saved \n[doc-author-count]
3346 .  nr doc-reg-dsgv 0
3347 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3348 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3349 .    nr doc-reg-dsgv +1
3350 .  \}
3352 .  nr doc-book-count-saved \n[doc-book-count]
3353 .  ds doc-book-name-saved "\*[doc-book-name]
3354 .  nr doc-date-count-saved \n[doc-date-count]
3355 .  ds doc-date-saved "\*[doc-date]
3356 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3357 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3358 .  nr doc-journal-count-saved \n[doc-journal-count]
3359 .  ds doc-journal-name-saved "\*[doc-journal-name]
3360 .  nr doc-issue-count-saved \n[doc-issue-count]
3361 .  ds doc-issue-name-saved "\*[doc-issue-name]
3362 .  nr doc-optional-count-saved \n[doc-optional-count]
3363 .  ds doc-optional-string-saved "\*[doc-optional-string]
3364 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3365 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3366 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3367 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3368 .  nr doc-report-count-saved \n[doc-report-count]
3369 .  ds doc-report-name-saved "\*[doc-report-name]
3370 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3371 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3372 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3373 .  nr doc-volume-count-saved \n[doc-volume-count]
3374 .  ds doc-volume-name-saved "\*[doc-volume-name]
3375 .  nr doc-have-author-saved \n[doc-have-author]
3377 .  ds doc-document-title-saved "\*[doc-document-title]
3378 .  ds doc-volume-saved "\*[doc-volume]
3379 .  ds doc-section-saved "\*[doc-section]
3380 .  ds doc-operating-system-saved "\*[doc-operating-system]
3381 .  ds doc-date-string-saved "\*[doc-date-string]
3382 .  nr doc-header-space-saved \n[doc-header-space]
3383 .  nr doc-footer-space-saved \n[doc-footer-space]
3384 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3385 .  ds doc-header-string-saved "\*[doc-header-string]
3386 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3387 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3388 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3392 .\" NS doc-restore-global-vars macro
3393 .\" NS   restore all global variables
3394 .\" NS
3395 .\" NS local variables:
3396 .\" NS   doc-reg-drgv
3398 .de doc-restore-global-vars
3399 .  ds doc-macro-name "\*[doc-macro-name-saved]
3400 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3401 .  nr doc-num-args \n[doc-num-args-saved]
3402 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3404 .  nr doc-reg-drgv 1
3405 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3406 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3407 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3408 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3409 .    nr doc-reg-drgv +1
3410 .  \}
3412 .  nr doc-curr-font \n[doc-curr-font-saved]
3413 .  nr doc-curr-size \n[doc-curr-size-saved]
3414 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3415 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3416 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3417 .  nr doc-have-decl \n[doc-have-decl-saved]
3418 .  nr doc-have-var \n[doc-have-var-saved]
3419 .  ds doc-command-name "\*[doc-command-name-saved]
3420 .  ds doc-quote-left "\*[doc-quote-left-saved]
3421 .  ds doc-quote-right "\*[doc-quote-right-saved]
3422 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3423 .  nr doc-in-list \n[doc-in-list-saved]
3424 .  ds doc-space "\*[doc-space-saved]
3425 .  ds doc-saved-space "\*[doc-saved-space-saved]
3426 .  nr doc-space-mode \n[doc-space-mode-saved]
3427 .  nr doc-have-space \n[doc-have-space-saved]
3428 .  nr doc-have-slot \n[doc-have-slot-saved]
3429 .  nr doc-keep-type \n[doc-keep-type-saved]
3430 .  nr doc-display-depth \n[doc-display-depth-saved]
3431 .  nr doc-is-compact \n[doc-is-compact-saved]
3433 .  nr doc-reg-drgv 0
3434 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3435 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3436 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3437 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3438 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3439 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3440 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3441 .    nr doc-reg-drgv +1
3442 .  \}
3444 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3446 .  nr doc-reg-drgv 1
3447 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3448 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3449 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3450 .    nr doc-reg-drgv +1
3451 .  \}
3453 .  nr doc-list-depth \n[doc-list-depth-saved]
3455 .  nr doc-reg-drgv 1
3456 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3457 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3458 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3459 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3460 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3461 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3462 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3463 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3464 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3465 .    nr doc-reg-drgv +1
3466 .  \}
3468 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3469 .  nr doc-curr-type \n[doc-curr-type-saved]
3470 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3471 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3472 .  nr doc-num-columns \n[doc-num-columns-saved]
3473 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3474 .  nr doc-is-func \n[doc-is-func-saved]
3475 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3476 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3477 .  ds doc-func-arg "\*[doc-func-arg-saved]
3478 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3479 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3480 .  nr doc-have-func \n[doc-have-func-saved]
3481 .  nr doc-is-reference \n[doc-is-reference-saved]
3482 .  nr doc-reference-count \n[doc-reference-count-saved]
3483 .  nr doc-author-count \n[doc-author-count-saved]
3485 .  nr doc-reg-drgv 0
3486 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3487 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3488 .    nr doc-reg-drgv +1
3489 .  \}
3491 .  nr doc-book-count \n[doc-book-count-saved]
3492 .  ds doc-book-name "\*[doc-book-name-saved]
3493 .  nr doc-date-count \n[doc-date-count-saved]
3494 .  ds doc-date "\*[doc-date-saved]
3495 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3496 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3497 .  nr doc-journal-count \n[doc-journal-count-saved]
3498 .  ds doc-journal-name "\*[doc-journal-name-saved]
3499 .  nr doc-issue-count \n[doc-issue-count-saved]
3500 .  ds doc-issue-name "\*[doc-issue-name-saved]
3501 .  nr doc-optional-count \n[doc-optional-count-saved]
3502 .  ds doc-optional-string "\*[doc-optional-string-saved]
3503 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3504 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3505 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3506 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3507 .  nr doc-report-count \n[doc-report-count-saved]
3508 .  ds doc-report-name "\*[doc-report-name-saved]
3509 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3510 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3511 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3512 .  nr doc-volume-count \n[doc-volume-count-saved]
3513 .  ds doc-volume-name "\*[doc-volume-name-saved]
3514 .  nr doc-have-author \n[doc-have-author-saved]
3516 .  ds doc-document-title "\*[doc-document-title-saved]
3517 .  ds doc-volume "\*[doc-volume-saved]
3518 .  ds doc-section "\*[doc-section-saved]
3519 .  ds doc-operating-system "\*[doc-operating-system-saved]
3520 .  ds doc-date-string "\*[doc-date-string-saved]
3521 .  nr doc-header-space \n[doc-header-space-saved]
3522 .  nr doc-footer-space \n[doc-footer-space-saved]
3523 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3524 .  ds doc-header-string "\*[doc-header-string-saved]
3525 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3526 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3527 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3531 .\" NS El user macro
3532 .\" NS   end list
3533 .\" NS
3534 .\" NS modifies:
3535 .\" NS   doc-list-depth
3536 .\" NS   doc-macro-name
3537 .\" NS
3538 .\" NS local variables:
3539 .\" NS   doc-str-El
3540 .\" NS
3541 .\" NS width register `El' set in doc-common
3543 .de El
3544 .  if \n[.$] \{\
3545 .    tm Usage: .El (does not take arguments) (#\n[.c])
3546 .    return
3547 .  \}
3549 .  ds doc-macro-name El
3550 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3552 .  ie        "\*[doc-str-El]"diag-list" \
3553 .    doc-end-list 0
3554 .  el \{ .ie "\*[doc-str-El]"column-list" \
3555 .    doc-end-column-list
3556 .  el \{ .ie "\*[doc-str-El]"item-list" \
3557 .    doc-end-list 0
3558 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3559 .    doc-end-list 0
3560 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3561 .    doc-end-list 0
3562 .  el \
3563 .    doc-end-list 1
3564 .  \}\}\}\}
3566 .  br
3570 .\" NS doc-saved-Pa-font global string
3571 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3572 .\" NS   nroff)
3574 .ds doc-saved-Pa-font
3577 .\" NS doc-curr-type global register
3578 .\" NS   current argument type
3580 .nr doc-curr-type 0
3583 .\" NS doc-curr-arg global string
3584 .\" NS   current argument
3586 .ds doc-curr-arg
3589 .\" NS doc-item-boxXXX global box
3590 .\" NS   item boxes associated list depth
3591 .\" NS
3592 .\" NS limit:
3593 .\" NS   doc-list-depth
3596 .\" NS It user macro
3597 .\" NS   list item
3598 .\" NS
3599 .\" NS modifies:
3600 .\" NS   doc-arg-ptr
3601 .\" NS   doc-argXXX
3602 .\" NS   doc-curr-arg
3603 .\" NS   doc-curr-type
3604 .\" NS   doc-in-list
3605 .\" NS   doc-macro-name
3606 .\" NS   doc-num-args
3607 .\" NS   doc-saved-Pa-font
3608 .\" NS
3609 .\" NS local variables:
3610 .\" NS   doc-reg-It
3611 .\" NS   doc-str-It
3612 .\" NS   doc-XXX-list-type
3613 .\" NS
3614 .\" NS width register `It' set in doc-common
3616 .nr doc-bullet-list-type 1
3617 .nr doc-column-list-type 0
3618 .nr doc-dash-list-type 1
3619 .nr doc-diag-list-type 0
3620 .nr doc-enum-list-type 1
3621 .nr doc-hang-list-type 2
3622 .nr doc-inset-list-type 2
3623 .nr doc-item-list-type 1
3624 .nr doc-ohang-list-type 2
3625 .nr doc-tag-list-type 2
3627 .de It
3628 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3630 .  if "\*[doc-str-It]"" \
3631 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3633 .  if \n[doc-nesting-level] \{\
3634 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3635 .    tm1 " (#\n[.c])
3636 .  \}
3638 .  br
3639 .  if !\n[cR] \
3640 .    ne 3v
3642 .  if \n[.$] \{\
3643 .    ds doc-macro-name It
3645 .    \" fill argument vector
3646 .    nr doc-reg-It 1
3647 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3648 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3649 .      nr doc-reg-It +1
3650 .    \}
3652 .    nr doc-num-args \n[.$]
3653 .    nr doc-arg-ptr 0
3654 .  \}
3656 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3658 .  if \n[doc-reg-It] \{\
3659 .    \" start item box
3660 .    box doc-item-box\n[doc-list-depth]
3661 .    ev doc-item-env\n[doc-list-depth]
3662 .    evc 0
3663 .    in 0
3664 .    nf
3665 .  \}
3667 .  ie (\n[doc-reg-It] == 1) \{\
3668 .    if \n[.$] \{\
3669 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3670 .      tm1 "              don't take arguments (#\n[.c])
3671 .  \}\}
3672 .  el \{\
3673 .    ie \n[.$] \{\
3674 .      if (\n[doc-reg-It] == 2) \{\
3675 .        \" handle list types with arguments
3676 .        doc-parse-arg-vector
3678 .        nr doc-in-list 1
3679 .        nr doc-arg-ptr 1
3680 .        nr doc-curr-type \n[doc-type1]
3681 .        ds doc-curr-arg "\*[doc-arg1]
3683 .        if \n[doc-in-files-section] \{\
3684 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3685 .          if n \
3686 .            ds doc-Pa-font "\*[doc-No-font]
3687 .        \}
3689 .        ie (\n[doc-type1] == 1) \
3690 .          \*[doc-arg1]
3691 .        el \{\
3692 .          nr doc-arg-ptr 1
3693 .          doc-print-recursive
3694 .    \}\}\}
3695 .    el \{\
3696 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3697 .      tm1 "              require arguments (#\n[.c])
3698 .    \}
3699 .  \}
3701 .  \" the previous call of `.doc-print-recursive' can contain calls to
3702 .  \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3703 .  if !\n[doc-nesting-level] \
3704 .    doc-\*[doc-str-It]
3708 .\" NS doc-inset-list macro
3709 .\" NS   .It item of list-type inset
3710 .\" NS
3711 .\" NS modifies:
3712 .\" NS   doc-in-list
3714 .de doc-inset-list
3715 .  \" finish item box
3716 .  br
3717 .  ev
3718 .  box
3719 .  unformat doc-item-box\n[doc-list-depth]
3721 .  doc-set-vertical-and-indent 0
3722 .  br
3724 .  nh
3725 .  doc-item-box\n[doc-list-depth]
3727 .  if \n[doc-in-files-section] \
3728 .    if n \
3729 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3731 .  nr doc-in-list 0
3732 .  doc-reset-args
3736 .\" NS doc-hang-list macro
3737 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3738 .\" NS
3739 .\" NS modifies:
3740 .\" NS   doc-have-space
3741 .\" NS   doc-in-list
3742 .\" NS
3743 .\" NS local variables:
3744 .\" NS   doc-reg-dhl
3745 .\" NS   doc-reg-dhl1
3747 .de doc-hang-list
3748 .  \" finish item box
3749 .  br
3750 .  ev
3751 .  box
3752 .  unformat doc-item-box\n[doc-list-depth]
3754 .  doc-set-vertical-and-indent 1
3755 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3756 .  ti -\n[doc-reg-dhl]u
3758 .  nh
3759 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3760 .    doc-item-box\n[doc-list-depth]
3761 .  el \{\
3762 .    chop doc-item-box\n[doc-list-depth]
3763 .    nr doc-reg-dhl1 \n[.k]u
3764 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3765 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3766 .    nr doc-have-space 1
3767 .  \}
3769 .  if \n[doc-in-files-section] \
3770 .    if n \
3771 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3773 .  nr doc-in-list 0
3774 .  doc-reset-args
3778 .\" NS doc-ohang-list macro
3779 .\" NS   .It item of list-type overhanging tag
3780 .\" NS
3781 .\" NS modifies:
3782 .\" NS   doc-in-list
3784 .de doc-ohang-list
3785 .  \" finish item box
3786 .  br
3787 .  ev
3788 .  box
3789 .  unformat doc-item-box\n[doc-list-depth]
3791 .  doc-set-vertical-and-indent 0
3792 .  nh
3793 .  doc-item-box\n[doc-list-depth]
3794 .  br
3796 .  if \n[doc-in-files-section] \
3797 .    if n \
3798 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3800 .  nr doc-in-list 0
3801 .  doc-reset-args
3805 .\" NS doc-item-list macro
3806 .\" NS   .It item of list-type [empty tag]
3808 .de doc-item-list
3809 .  \" finish (dummy) item box
3810 .  br
3811 .  ev
3812 .  box
3814 .  doc-set-vertical-and-indent 0
3815 .  br
3817 .  doc-reset-args
3821 .\" NS doc-enum-list-count-stackXXX global register
3822 .\" NS   stack of current enum count values
3823 .\" NS
3824 .\" NS limit:
3825 .\" NS   doc-list-depth
3827 .nr doc-enum-list-count-stack1 0
3830 .\" NS doc-enum-list macro
3831 .\" NS   enumerated list
3832 .\" NS
3833 .\" NS modifies:
3834 .\" NS   doc-enum-list-count-stackXXX
3835 .\" NS   doc-in-list
3837 .de doc-enum-list
3838 .  nr doc-in-list 1
3839 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3840 \# XXX
3841 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3842 \#.rj
3843 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3844 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3845 .  doc-do-list
3849 .\" NS doc-bullet-list macro
3850 .\" NS   bullet paragraph list
3851 .\" NS
3852 .\" NS modifies:
3853 .\" NS   doc-in-list
3855 .de doc-bullet-list
3856 .  nr doc-in-list 1
3857 .  nop \)\*[doc-Sy-font]\[bu]\f[]
3858 .  doc-do-list
3862 .\" NS doc-dash-list macro
3863 .\" NS   hyphen paragraph list (sub bullet list)
3864 .\" NS
3865 .\" NS modifies:
3866 .\" NS   doc-in-list
3868 .de doc-dash-list
3869 .  nr doc-in-list 1
3870 .  nop \)\*[doc-Sy-font]\-\f[]
3871 .  doc-do-list
3875 .\" NS doc-do-list macro
3876 .\" NS   .It item of list-type enum/bullet/hyphen
3878 .als doc-do-list doc-hang-list
3881 .\" NS doc-diag-list-input-line-count global register
3882 .\" NS   saved line number to be checked in next diag-list item
3884 .nr doc-diag-list-input-line-count 0
3887 .\" NS doc-diag-list macro
3888 .\" NS   .It item of list-type diagnostic-message
3889 .\" NS
3890 .\" NS modifies:
3891 .\" NS   doc-curr-font
3892 .\" NS   doc-curr-size
3893 .\" NS   doc-diag-list-input-line-count
3895 .de doc-diag-list
3896 .  nr doc-curr-font \n[.f]
3897 .  nr doc-curr-size \n[.ps]
3899 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3900 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3901 .      doc-paragraph
3902 .    el \
3903 .      br
3904 .  \}
3905 .  el \
3906 .    br
3907 .  nr doc-diag-list-input-line-count \n[.c]
3909 .  nh
3910 .  nop \*[doc-Sy-font]\c
3911 .  if \n[doc-num-args] \
3912 .    doc-remaining-args
3913 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3915 .  doc-print-and-reset
3919 .\" NS doc-tag-list macro
3920 .\" NS   .It item of list-type `tag'
3921 .\" NS
3922 .\" NS modifies:
3923 .\" NS   doc-have-space
3924 .\" NS   doc-in-list
3925 .\" NS
3926 .\" NS local variables:
3927 .\" NS   doc-box-dtl
3928 .\" NS   doc-reg-dtl
3929 .\" NS   doc-reg-dtl1
3931 .de doc-tag-list
3932 .  \" finish item box
3933 .  br
3934 .  ev
3935 .  box
3936 .  unformat doc-item-box\n[doc-list-depth]
3938 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
3939 .  box doc-box-dtl
3940 .  ev doc-env-dtl
3941 .  evc 0
3942 .  fi
3943 .  ad 0
3944 .  in 0
3945 .  doc-item-box\n[doc-list-depth]
3946 .  br
3947 .  ev
3948 .  box
3950 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3951 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
3952 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3953 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
3954 .    \}
3955 .    doc-get-tag-width
3956 .  \}
3957 .  doc-set-vertical-and-indent 1
3958 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3959 .  ti -\n[doc-reg-dtl]u
3961 .  nh
3962 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
3963 .    doc-item-box\n[doc-list-depth]
3964 .    br
3965 .  \}
3966 .  el \{\
3967 .    chop doc-item-box\n[doc-list-depth]
3968 .    \" Using \Z prevents stretching of the spaces in the tag
3969 .    nop \Z'\*[doc-item-box\n[doc-list-depth]]'\c
3970 .    nop \h'\n[doc-reg-dtl]u'\c
3971 .    nr doc-have-space 1
3972 .  \}
3974 .  if \n[doc-in-files-section] \
3975 .    if n \
3976 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3978 .  nr doc-in-list 0
3979 .  doc-reset-args
3983 .\" NS doc-get-tag-width macro
3984 .\" NS   resolve unknown tag width (`tag' list-type only)
3985 .\" NS
3986 .\" NS modifies:
3987 .\" NS   doc-list-indent-stackXXX
3988 .\" NS   doc-tag-width-stackXXX
3989 .\" NS
3990 .\" NS requires:
3991 .\" NS   doc-curr-arg
3992 .\" NS   doc-curr-type
3994 .de doc-get-tag-width
3995 .  ie (\n[doc-curr-type] == 1) \{\
3996 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
3997 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
3998 .  \}
3999 .  el \{\
4000 .    ds doc-tag-width-stack\n[doc-list-depth] No
4001 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4002 .  \}
4006 .\" NS doc-set-vertical-and-indent macro
4007 .\" NS   set up vertical spacing (if not compact) and indentation (with
4008 .\" NS   offset if argument is non-zero)
4009 .\" NS
4010 .\" NS modifies:
4011 .\" NS   doc-list-have-indent-stackXXX
4013 .de doc-set-vertical-and-indent
4014 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4015 .    sp \n[doc-display-vertical]u
4017 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4018 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4019 .    if \$1 \
4020 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4021 .  \}
4023 .  if !\n[cR] \
4024 .    ne 2v
4028 .\" NS doc-list-depth global register
4029 .\" NS   list type stack counter
4031 .nr doc-list-depth 0
4034 .\" NS doc-num-columns global register
4035 .\" NS   number of columns
4037 .nr doc-num-columns 0
4040 .\" NS doc-compact-list-stackXXX global register (bool)
4041 .\" NS   stack of flags to indicate whether a particular list is compact
4042 .\" NS
4043 .\" NS limit:
4044 .\" NS   doc-list-depth
4046 .nr doc-compact-list-stack1 0
4049 .\" NS doc-tag-prefix-stackXXX global string
4050 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4051 .\" NS
4052 .\" NS limit:
4053 .\" NS   doc-list-depth
4055 .ds doc-tag-prefix-stack1
4058 .\" NS doc-tag-width-stackXXX global string
4059 .\" NS   stack of strings indicating how to set up current element of
4060 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4061 .\" NS   directly; if it is a macro name, use the macro's width value;
4062 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4063 .\" NS
4064 .\" NS limit:
4065 .\" NS   doc-list-depth
4067 .ds doc-tag-width-stack0
4068 .ds doc-tag-width-stack1
4071 .\" NS doc-list-offset-stackXXX global register
4072 .\" NS   stack of list offsets
4073 .\" NS
4074 .\" NS limit:
4075 .\" NS   doc-list-depth
4077 .nr doc-list-offset-stack1 0
4080 .\" NS doc-end-list macro
4081 .\" NS   list end function; resets indentation (and offset if argument is
4082 .\" NS   non-zero)
4083 .\" NS
4084 .\" NS modifies:
4085 .\" NS   doc-list-depth
4086 .\" NS   doc-list-offset-stackXXX
4088 .de doc-end-list
4089 .  if \$1 \
4090 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4092 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4094 .  if (\n[doc-list-depth] <= 0) \
4095 .    tm mdoc warning: extraneous .El call (#\n[.c])
4097 .  doc-decrement-list-stack
4098 .  nr doc-list-depth -1
4102 .\" NS doc-increment-list-stack macro
4103 .\" NS   set up next block for list
4104 .\" NS
4105 .\" NS modifies:
4106 .\" NS   doc-compact-list-stackXXX
4107 .\" NS   doc-list-have-indent-stackXXX
4108 .\" NS   doc-list-indent-stackXXX
4109 .\" NS   doc-list-offset-stackXXX
4110 .\" NS   doc-list-type-stackXXX
4111 .\" NS   doc-tag-prefix-stackXXX
4112 .\" NS   doc-tag-width-stackXXX
4113 .\" NS   doc-enum-list-count-stackXXX
4114 .\" NS
4115 .\" NS local variables:
4116 .\" NS   doc-reg-dils
4118 .de doc-increment-list-stack
4119 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4120 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4121 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4122 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4123 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4124 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4125 .  ds doc-list-type-stack\n[doc-reg-dils]
4126 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4127 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4131 .\" NS doc-decrement-list-stack macro
4132 .\" NS   decrement stack
4133 .\" NS
4134 .\" NS modifies:
4135 .\" NS   doc-compact-list-stackXXX
4136 .\" NS   doc-list-have-indent-stackXXX
4137 .\" NS   doc-list-indent-stackXXX
4138 .\" NS   doc-list-offset-stackXXX
4139 .\" NS   doc-list-type-stackXXX
4140 .\" NS   doc-tag-prefix-stackXXX
4141 .\" NS   doc-tag-width-stackXXX
4142 .\" NS   doc-enum-list-count-stackXXX
4144 .de doc-decrement-list-stack
4145 .  ds doc-list-type-stack\n[doc-list-depth]
4146 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4147 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4148 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4149 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4150 .  ds doc-tag-width-stack\n[doc-list-depth]
4151 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4152 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4156 .\" NS Xr user macro
4157 .\" NS   cross reference (for man pages only)
4158 .\" NS
4159 .\" NS modifies:
4160 .\" NS   doc-arg-ptr
4161 .\" NS   doc-macro-name
4162 .\" NS
4163 .\" NS local variables:
4164 .\" NS   doc-reg-Xr
4165 .\" NS
4166 .\" NS width register `Xr' set in doc-common
4168 .de Xr
4169 .  if !\n[doc-arg-limit] \{\
4170 .    ie \n[.$] \{\
4171 .      ds doc-macro-name Xr
4172 .      doc-parse-args \$@
4173 .    \}
4174 .    el \
4175 .      doc-Xr-usage
4176 .  \}
4178 .  if !\n[doc-arg-limit] \
4179 .    return
4181 .  nr doc-arg-ptr +1
4182 .  doc-print-prefixes
4183 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4184 .    \" first argument must be a string
4185 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4186 .      nr doc-curr-font \n[.f]
4187 .      nr doc-curr-size \n[.ps]
4188 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4190 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4191 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4192 .        \" modify second argument if it is a string and
4193 .        \" remove space inbetween
4194 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4195 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4196 .          ds doc-space\n[doc-arg-ptr]
4197 .        \}
4198 .      \}
4199 .      doc-print-recursive
4200 .    \}
4201 .    el \
4202 .      doc-Xr-usage
4203 .  \}
4204 .  el \
4205 .    doc-Xr-usage
4209 .\" NS doc-Xr-usage macro
4211 .de doc-Xr-usage
4212 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4213 .  doc-reset-args
4217 .\" NS Sx user macro
4218 .\" NS   cross section reference
4219 .\" NS
4220 .\" NS width register `Sx' set in doc-common
4222 .als Sx doc-generic-macro
4223 .ds doc-Sx-usage section_header
4226 .\" NS doc-end-column-list macro
4227 .\" NS   column-list end-list
4228 .\" NS
4229 .\" NS modifies:
4230 .\" NS   doc-list-depth
4232 .de doc-end-column-list
4233 .  linetabs 0
4234 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4235 .  ta T .5i
4236 .  fi
4237 .  doc-decrement-list-stack
4238 .  nr doc-list-depth -1
4242 .\" NS doc-column-indent-width global register
4243 .\" NS   holds the indent width for a column list
4245 .nr doc-column-indent-width 0
4248 .\" NS doc-set-column-tab macro
4249 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4250 .\" NS
4251 .\" NS modifies:
4252 .\" NS   doc-column-indent-width
4253 .\" NS
4254 .\" NS local variables:
4255 .\" NS   doc-reg-dsct
4256 .\" NS   doc-str-dsct
4257 .\" NS   doc-str-dsct1
4259 .de doc-set-column-tab
4260 .  ds doc-str-dsct
4261 .  nr doc-reg-dsct 1
4262 .  nr doc-column-indent-width 0
4264 .  ie (\$1 < 5) \
4265 .    ds doc-str-dsct1 "    \"
4266 .  el \{\
4267 .    ie (\$1 == 5) \
4268 .      ds doc-str-dsct1 "   \"
4269 .    el \{\
4270 .      \" XXX: this is packed abnormally close -- intercolumn width
4271 .      \"      should be configurable
4272 .      ds doc-str-dsct1 " \"
4273 .  \}\}
4275 .  while (\n[doc-reg-dsct] <= \$1) \{\
4276 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4277 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4278 .    nr doc-reg-dsct +1
4279 .  \}
4281 .  ta \*[doc-str-dsct]
4282 '  in +\n[doc-column-indent-width]u
4286 .\" NS doc-column-list macro
4287 .\" NS   column items
4288 .\" NS
4289 .\" NS modifies:
4290 .\" NS   doc-arg-ptr
4291 .\" NS   doc-list-indent-stackXXX
4292 .\" NS   doc-spaceXXX
4293 .\" NS
4294 .\" NS local variables:
4295 .\" NS   doc-reg-dcl
4297 .de doc-column-list
4298 .  if \n[doc-num-args] \
4299 .    doc-parse-arg-vector
4300 .  nr doc-arg-ptr +1
4302 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4303 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4304 .    return
4305 .  \}
4307 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4308 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4309 .    ds doc-space\n[doc-reg-dcl]
4310 .  \}
4312 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4313 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4314 .  if !\n[.u] \{\
4315 .    fi
4316 .    in +\n[doc-column-indent-width]u
4317 .  \}
4318 .  ti -\n[doc-column-indent-width]u
4320 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4324 .\" NS Ta user macro
4325 .\" NS   append tab (\t)
4326 .\" NS
4327 .\" NS modifies:
4328 .\" NS   doc-arg-ptr
4329 .\" NS
4330 .\" NS width register `Ta' set in doc-common
4332 .de Ta
4333 .  ie \n[doc-arg-limit] \{\
4334 .    nr doc-arg-ptr +1
4335 .    nop \*[doc-tab]\c
4336 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4337 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4338 .    el \
4339 .      doc-reset-args
4340 .  \}
4341 .  el \{\
4342 .    tm1 "Usage: Ta must follow column entry: e.g.
4343 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4344 .  \}
4348 .\" NS Dl user macro
4349 .\" NS   display (one line) literal
4350 .\" NS
4351 .\" NS   this function uses the `Li' font
4352 .\" NS
4353 .\" NS modifies:
4354 .\" NS   doc-arg-ptr
4355 .\" NS   doc-curr-font
4356 .\" NS   doc-curr-size
4357 .\" NS   doc-macro-name
4358 .\" NS
4359 .\" NS width register `Dl' set in doc-common
4361 .de Dl
4362 .  ta T .5i
4363 .  in +\n[doc-display-indent]u
4365 .  ie \n[doc-arg-limit] \{\
4366 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4367 .    doc-reset-args
4368 .  \}
4369 .  el \{\
4370 .    ie \n[.$] \{\
4371 .      ds doc-macro-name Dl
4372 .      doc-parse-args \$@
4373 .      nr doc-arg-ptr 1
4374 .      nr doc-curr-font \n[.f]
4375 .      nr doc-curr-size \n[.ps]
4376 .      nop \*[doc-Li-font]\c
4377 .      doc-print-recursive
4378 .    \}
4379 .    el \
4380 .      tm Usage: .Dl argument ... (#\n[.c])
4381 .  \}
4383 .  in -\n[doc-display-indent]u
4387 .\" NS D1 user macro
4388 .\" NS   display (one line)
4389 .\" NS
4390 .\" NS modifies:
4391 .\" NS   doc-arg-ptr
4392 .\" NS   doc-macro-name
4393 .\" NS
4394 .\" NS width register `D1' set in doc-common
4396 .de D1
4397 .  ta T .5i
4398 .  in +\n[doc-display-indent]u
4400 .  ie \n[doc-arg-limit] \{\
4401 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4402 .    doc-reset-args
4403 .  \}
4404 .  el \{\
4405 .    ie \n[.$] \{\
4406 .      ds doc-macro-name D1
4407 .      doc-parse-args \$@
4408 .      nr doc-arg-ptr 1
4409 .      doc-print-recursive
4410 .    \}
4411 .    el \
4412 .      tm Usage: .D1 argument ... (#\n[.c])
4413 .  \}
4415 .  in -\n[doc-display-indent]u
4419 .\" NS Vt user macro
4420 .\" NS   variable type (for forcing old style variable declarations);
4421 .\" NS   this is not done in the same manner as .Ot for fortrash --
4422 .\" NS   clean up later
4423 .\" NS
4424 .\" NS modifies:
4425 .\" NS   doc-curr-font
4426 .\" NS   doc-curr-size
4427 .\" NS   doc-have-decl
4428 .\" NS   doc-have-var
4429 .\" NS   doc-macro-name
4430 .\" NS
4431 .\" NS width register `Vt' set in doc-common
4433 .de Vt
4434 .  if !\n[doc-arg-limit] \{\
4435 .    ie \n[.$] \{\
4436 .      ds doc-macro-name Vt
4437 .      doc-parse-args \$@
4438 .    \}
4439 .    el \
4440 .      tm Usage: .Vt variable_type ... (#\n[.c])
4441 .  \}
4443 .  if !\n[doc-arg-limit] \
4444 .    return
4446 .  nr doc-arg-ptr +1
4447 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4448 .    tm Usage: .Vt variable_type ... (#\n[.c])
4449 .    doc-reset-args
4450 .    return
4451 .  \}
4453 .  if \n[doc-in-synopsis-section] \{\
4454 .    \" if a function declaration was the last thing given,
4455 .    \" want vertical space
4456 .    if \n[doc-have-decl] \{\
4457 .      doc-paragraph
4458 .      nr doc-have-decl 0
4459 .    \}
4461 .    \" if a subroutine was the last thing given, want vertical space
4462 .    if \n[doc-have-func] \{\
4463 .      ie \n[doc-have-var] \
4464 .        br
4465 .      el \
4466 .        doc-paragraph
4467 .    \}
4469 .    nr doc-have-var 1
4470 .  \}
4472 .  nr doc-curr-font \n[.f]
4473 .  nr doc-curr-size \n[.ps]
4474 .  nop \*[doc-Ft-font]\c
4475 .  doc-print-recursive
4477 .  if \n[doc-in-synopsis-section] \{\
4478 .    ie \n[doc-have-old-func] \
4479 .      nop \*[doc-soft-space]\c
4480 .    el \
4481 .      br
4482 .  \}
4486 .\" NS doc-is-func global register (bool)
4487 .\" NS   set if subroutine (in synopsis only) (fortran only)
4489 .nr doc-is-func 0
4492 .\" NS Ft user macro
4493 .\" NS   function type
4494 .\" NS
4495 .\" NS modifies:
4496 .\" NS   doc-curr-font
4497 .\" NS   doc-curr-size
4498 .\" NS   doc-have-decl
4499 .\" NS   doc-have-var
4500 .\" NS   doc-is-func
4501 .\" NS   doc-macro-name
4502 .\" NS
4503 .\" NS width register `Ft' set in doc-common
4505 .de Ft
4506 .  if !\n[doc-arg-limit] \{\
4507 .    ie \n[.$] \{\
4508 .      ds doc-macro-name Ft
4509 .      doc-parse-args \$@
4510 .    \}
4511 .    el \
4512 .      tm Usage: .Ft function_type ... (#\n[.c])
4513 .  \}
4515 .  if !\n[doc-arg-limit] \
4516 .    return
4518 .  nr doc-arg-ptr +1
4519 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4520 .    tm Usage: .Ft function_type ... (#\n[.c])
4521 .    doc-reset-args
4522 .    return
4523 .  \}
4525 .  if \n[doc-in-synopsis-section] \{\
4526 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4527 .      doc-paragraph
4528 .      nr doc-have-decl 0
4529 .      nr doc-have-var 0
4530 .    \}
4532 .    if \n[doc-have-var] \{\
4533 .      doc-paragraph
4534 .      nr doc-have-var 0
4535 .    \}
4537 .    nr doc-is-func 1
4538 .  \}
4540 .  nr doc-curr-font \n[.f]
4541 .  nr doc-curr-size \n[.ps]
4542 .  nop \*[doc-Ft-font]\c
4543 .  doc-print-recursive
4547 .\" NS doc-have-old-func global register (bool)
4548 .\" NS   set if `Ot' has been called
4550 .nr doc-have-old-func 0
4553 .\" NS Ot user macro
4554 .\" NS   old function type (fortran -- no newline)
4555 .\" NS
4556 .\" NS modifies:
4557 .\" NS   doc-have-decl
4558 .\" NS   doc-have-old-func
4559 .\" NS   doc-have-var
4560 .\" NS   doc-is-func
4561 .\" NS
4562 .\" NS width register `Ot' set in doc-common
4564 .de Ot
4565 .  nr doc-have-old-func 1
4567 .  if \n[doc-in-synopsis-section] \{\
4568 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4569 .      doc-paragraph
4570 .      nr doc-have-decl 0
4571 .      nr doc-have-var 0
4572 .    \}
4574 .    if \n[doc-have-var] \{\
4575 .      doc-paragraph
4576 .      nr doc-have-var 0
4577 .    \}
4579 .    nr doc-is-func 1
4580 .  \}
4582 .  if \n[.$] \
4583 .    nop \*[doc-Ft-font]\$*\c
4584 .  nop \ \f[]\c
4588 .\" NS Fa user macro
4589 .\" NS   function arguments
4590 .\" NS
4591 .\" NS modifies:
4592 .\" NS   doc-arg-ptr
4593 .\" NS   doc-curr-font
4594 .\" NS   doc-curr-size
4595 .\" NS   doc-macro-name
4596 .\" NS
4597 .\" NS width register `Fa' set in doc-common
4599 .de Fa
4600 .  if !\n[doc-arg-limit] \{\
4601 .    ie \n[.$] \{\
4602 .      ds doc-macro-name Fa
4603 .      doc-parse-args \$@
4604 .    \}
4605 .    el \
4606 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4607 .  \}
4609 .  ie \n[doc-func-arg-count] \
4610 .    doc-do-func
4611 .  el \{\
4612 .    nr doc-arg-ptr +1
4613 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4614 .      nr doc-curr-font \n[.f]
4615 .      nr doc-curr-size \n[.ps]
4616 .      nop \*[doc-Fa-font]\c
4617 .      doc-print-recursive
4619 .      if \n[doc-in-synopsis-section] \
4620 .        if \n[doc-have-func] \
4621 .          br
4622 .  \}\}
4626 .\" NS doc-func-arg-count global register
4627 .\" NS   how many function arguments have been processed so far
4629 .nr doc-func-arg-count 0
4632 .\" NS doc-func-arg global string
4633 .\" NS   work buffer for function name strings
4635 .ds doc-func-arg
4638 .\" NS doc-num-func-args global register
4639 .\" NS   number of function arguments
4641 .nr doc-num-func-args 0
4644 .\" NS doc-func-args-processed global register
4645 .\" NS   function arguments processed so far
4647 .nr doc-func-args-processed 0
4650 .\" NS doc-do-func macro
4651 .\" NS   internal .Fa for .Fc
4652 .\" NS
4653 .\" NS modifies:
4654 .\" NS   doc-arg-ptr
4655 .\" NS   doc-argXXX
4656 .\" NS   doc-func-arg
4657 .\" NS   doc-func-arg-count
4658 .\" NS   doc-func-args-processed
4659 .\" NS   doc-num-func-args
4661 .de doc-do-func
4662 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4663 .    doc-reset-args
4664 .    return
4665 .  \}
4667 .  nr doc-arg-ptr +1
4669 .  ds doc-func-arg
4670 .  nr doc-num-func-args 0
4671 .  nr doc-func-args-processed 0
4673 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4674 .  if (\n[doc-num-func-args] > 1) \
4675 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4677 .  if (\n[doc-func-arg-count] > 1) \{\
4678 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
4679 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4680 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4681 .  \}
4683 .  if (\n[doc-func-arg-count] == 1) \{\
4684 .    nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4685 .    nop \f[]\s[0]\c
4686 .  \}
4687 .  nr doc-func-arg-count +1
4688 .  doc-do-func
4692 .\" NS doc-have-func global register (bool)
4693 .\" NS   whether we have more than one function in synopsis
4695 .nr doc-have-func 0
4698 .\" NS Fn user macro
4699 .\" NS   functions
4700 .\" NS
4701 .\" NS modifies:
4702 .\" NS   doc-arg-ptr
4703 .\" NS   doc-curr-font
4704 .\" NS   doc-curr-size
4705 .\" NS   doc-have-decl
4706 .\" NS   doc-have-func
4707 .\" NS   doc-have-var
4708 .\" NS   doc-indent-synopsis
4709 .\" NS   doc-is-func
4710 .\" NS   doc-macro-name
4711 .\" NS
4712 .\" NS width register `Fn' set in doc-common
4714 .de Fn
4715 .  if !\n[doc-arg-limit] \{\
4716 .    ie \n[.$] \{\
4717 .      ds doc-macro-name Fn
4718 .      doc-parse-args \$@
4719 .    \}
4720 .    el \
4721 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4722 .  \}
4724 .  if !\n[doc-arg-limit] \
4725 .    return
4727 .  if \n[doc-in-synopsis-section] \{\
4728 .    \" if there is/has been more than one subroutine declaration
4729 .    ie \n[doc-is-func] \{\
4730 .      br
4731 .      nr doc-have-var 0
4732 .      nr doc-have-decl 0
4733 .      nr doc-is-func 0
4734 .    \}
4735 .    el \{\
4736 .      if \n[doc-have-func] \{\
4737 .        doc-paragraph
4738 .        nr doc-have-var 0
4739 .        nr doc-have-decl 0
4740 .    \}\}
4742 .    if \n[doc-have-decl] \{\
4743 .      doc-paragraph
4744 .      nr doc-have-var 0
4745 .    \}
4747 .    if \n[doc-have-var] \{\
4748 .      doc-paragraph
4749 .      nr doc-have-decl 0
4750 .    \}
4752 .    nr doc-have-func 1
4753 .    nr doc-is-func 0
4755 .    br
4756 .    if !\n[doc-indent-synopsis] \
4757 .      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4758 .    if !\n[doc-indent-synopsis-active] \
4759 .      in +\n[doc-indent-synopsis]u
4760 .    ti -\n[doc-indent-synopsis]u
4761 .  \}
4763 .  nr doc-arg-ptr +1
4764 .  doc-print-prefixes
4765 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4766 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4767 .    doc-reset-args
4768 .    return
4769 .  \}
4771 .  nr doc-curr-font \n[.f]
4772 .  nr doc-curr-size \n[.ps]
4773 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4774 .  nop \f[]\s[0]\*[lp]\)\c
4776 .  nr doc-arg-ptr +1
4777 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4778 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4779 .      nop \*[doc-Fa-font]\c
4780 .      doc-do-func-args
4781 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4782 .  \}\}
4784 .  nop \)\*[rp]\)\c
4785 .  if \n[doc-in-synopsis-section] \
4786 .    nop \);\)\c
4788 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4789 .    \" output the space (if needed)
4790 .    nr doc-arg-ptr -1
4791 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4792 .    nr doc-arg-ptr +1
4794 .    doc-print-recursive
4795 .  \}
4796 .  el \
4797 .    doc-print-and-reset
4799 .  if \n[doc-in-synopsis-section] \
4800 .    if !\n[doc-indent-synopsis-active] \
4801 .      in -\n[doc-indent-synopsis]u
4805 .\" NS doc-do-func-args macro
4806 .\" NS   handle function arguments
4807 .\" NS
4808 .\" NS modifies:
4809 .\" NS   doc-arg-ptr
4810 .\" NS   doc-argXXX
4811 .\" NS   doc-func-arg
4812 .\" NS   doc-func-args-processed
4813 .\" NS   doc-num-func-args
4814 .\" NS
4815 .\" NS local variables:
4816 .\" NS   doc-reg-ddfa
4818 .de doc-do-func-args
4819 .  if \n[doc-in-synopsis-section] \{\
4820 .    ds doc-func-arg
4821 .    nr doc-num-func-args 0
4822 .    nr doc-func-args-processed 0
4824 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4825 .    if (\n[doc-num-func-args] > 1) \
4826 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4827 .  \}
4829 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4830 .  nr doc-arg-ptr +1
4832 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4833 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4834 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4835 .      nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
4836 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4837 .      doc-do-func-args
4838 .  \}\}
4842 .\" NS doc-saved-nesting-level global register
4844 .nr doc-saved-nesting-level 0
4847 .\" NS doc-in-func-enclosure global register (bool)
4849 .nr doc-in-func-enclosure 0
4852 .\" NS Fo user macro
4853 .\" NS   function open
4854 .\" NS
4855 .\" NS modifies:
4856 .\" NS   doc-arg-ptr
4857 .\" NS   doc-curr-font
4858 .\" NS   doc-curr-size
4859 .\" NS   doc-func-arg-count
4860 .\" NS   doc-have-decl
4861 .\" NS   doc-have-func
4862 .\" NS   doc-have-var
4863 .\" NS   doc-in-func-enclosure
4864 .\" NS   doc-indent-synopsis
4865 .\" NS   doc-is-func
4866 .\" NS   doc-macro-name
4867 .\" NS   doc-saved-nesting-level
4868 .\" NS
4869 .\" NS width register `Fo' set in doc-common
4871 .de Fo
4872 .  if (\n[doc-in-func-enclosure]) \{\
4873 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4874 .    return
4875 .  \}
4877 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4878 .  nr doc-in-func-enclosure 1
4880 .  if !\n[doc-arg-limit] \{\
4881 .    ie \n[.$] \{\
4882 .      ds doc-macro-name Fo
4883 .      doc-parse-args \$@
4884 .    \}
4885 .    el \
4886 .      tm Usage: .Fo function_name (#\n[.c])
4887 .  \}
4889 .  if \n[doc-in-synopsis-section] \{\
4890 .    \" if there is/has been more than one subroutine declaration
4891 .    ie \n[doc-is-func] \{\
4892 .      br
4893 .      nr doc-have-var 0
4894 .      nr doc-have-decl 0
4895 .      nr doc-is-func 0
4896 .    \}
4897 .    el \{\
4898 .      if \n[doc-have-func] \{\
4899 .        doc-paragraph
4900 .        nr doc-have-var 0
4901 .        nr doc-have-decl 0
4902 .    \}\}
4904 .    if \n[doc-have-decl] \{\
4905 .      doc-paragraph
4906 .      nr doc-have-var 0
4907 .    \}
4909 .    if \n[doc-have-var] \{\
4910 .      doc-paragraph
4911 .      nr doc-have-decl 0
4912 .    \}
4914 .    nr doc-have-func 1
4915 .    nr doc-is-func 0
4917 .    br
4918 .    if !\n[doc-indent-synopsis] \
4919 .      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
4920 .  \}
4922 .  \" start function box
4923 .  box doc-func-box
4924 .  ev doc-func-env
4925 .  evc 0
4926 .  in 0
4927 .  nf
4929 .  nr doc-arg-ptr +1
4930 .  doc-print-prefixes
4931 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4932 .    nr doc-func-arg-count 1
4933 .    nr doc-curr-font \n[.f]
4934 .    nr doc-curr-size \n[.ps]
4936 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4937 .    nop \f[]\s[0]\*[lp]\)\c
4938 .    doc-reset-args
4939 .  \}
4943 .\" NS Fc user macro
4944 .\" NS   function close
4945 .\" NS
4946 .\" NS modifies:
4947 .\" NS   doc-arg-ptr
4948 .\" NS   doc-func-arg-count
4949 .\" NS   doc-in-func-enclosure
4950 .\" NS   doc-saved-nesting-level
4951 .\" NS   doc-macro-name
4952 .\" NS
4953 .\" NS width register `Fc' set in doc-common
4955 .de Fc
4956 .  if !\n[doc-in-func-enclosure] \{\
4957 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
4958 .    return
4959 .  \}
4961 .  if \n[.$] \{\
4962 .    ds doc-macro-name Fc
4963 .    \" the first (dummy) argument is used to get the correct spacing
4964 .    doc-parse-args \) \$@
4965 .  \}
4967 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
4968 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
4970 .  nr doc-func-arg-count 0
4971 .  nr doc-in-func-enclosure 0
4973 .  ie \n[doc-in-synopsis-section] \
4974 .    nop \|\*[rp];\)
4975 .  el \
4976 .    nop \|\*[rp]\)
4978 .  \" finish function box
4979 .  br
4980 .  ev
4981 .  box
4982 .  chop doc-func-box
4983 .  unformat doc-func-box
4985 .  if \n[doc-in-synopsis-section] \{\
4986 .    if !\n[doc-indent-synopsis-active] \
4987 .      in +\n[doc-indent-synopsis]u
4988 .    ti -\n[doc-indent-synopsis]u
4989 .  \}
4991 .  nh
4992 .  nop \*[doc-func-box]\c
4994 .  nr doc-arg-ptr +1
4995 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4996 .    nr doc-curr-font \n[.f]
4997 .    nr doc-curr-size \n[.ps]
4998 .    doc-print-recursive
4999 .  \}
5000 .  el \
5001 .    doc-print-and-reset
5003 .  if \n[doc-in-synopsis-section] \
5004 .    if !\n[doc-indent-synopsis-active] \
5005 .      in -\n[doc-indent-synopsis]u
5009 .\" NS doc-build-func-string macro
5010 .\" NS   collect function arguments and set hard spaces inbetween
5011 .\" NS
5012 .\" NS modifies:
5013 .\" NS   doc-func-arg
5014 .\" NS   doc-func-args-processed
5015 .\" NS   doc-num-func-args
5017 .de doc-build-func-string
5018 .  if !\n[doc-num-func-args] \{\
5019 .    nr doc-num-func-args \n[.$]
5020 .    nr doc-func-args-processed 0
5021 .    ds doc-func-arg
5022 .  \}
5024 .  nr doc-func-args-processed +1
5025 .  as doc-func-arg "\$1
5027 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5028 .    as doc-func-arg "\*[doc-hard-space]
5030 .    shift
5031 .    doc-build-func-string \$@
5032 .  \}
5036 .\" Very crude references: Stash all reference info into boxes, print out
5037 .\" reference on .Re macro and clean up.  Ordering very limited, no fancy
5038 .\" citations, but can do articles, journals, and books -- need to add
5039 .\" several missing options (like city etc).  Should be able to grab a refer
5040 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5041 .\" (ha!).
5044 .\" NS doc-is-reference global register (bool)
5045 .\" NS   set if in reference
5047 .nr doc-is-reference 0
5050 .\" NS doc-reference-count global register
5051 .\" NS   reference element counter
5053 .nr doc-reference-count 0
5056 .\" NS Rs user macro
5057 .\" NS   reference start
5058 .\" NS
5059 .\" NS modifies:
5060 .\" NS   doc-is-reference
5061 .\" NS   doc-reference-count
5062 .\" NS
5063 .\" NS width register `Rs' set in doc-common
5065 .de Rs
5066 .  ie \n[.$] \
5067 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5068 .  el \{\
5069 .    nr doc-is-reference 1
5070 .    doc-reset-reference
5071 .    if \n[doc-in-see-also-section] \
5072 .      doc-paragraph
5073 .    nr doc-reference-count 0
5074 .  \}
5078 .\" NS Re user macro
5079 .\" NS   reference end
5080 .\" NS
5081 .\" NS modifies:
5082 .\" NS   doc-is-reference
5083 .\" NS
5084 .\" NS width register `Re' set in doc-common
5086 .de Re
5087 .  ie \n[.$] \
5088 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5089 .  el \{\
5090 .    doc-print-reference
5091 .    doc-reset-reference
5092 .    nr doc-is-reference 0
5093 .  \}
5097 .\" NS doc-reset-reference macro
5098 .\" NS   reference cleanup
5099 .\" NS
5100 .\" NS modifies:
5101 .\" NS   doc-author-count
5102 .\" NS   doc-author-nameXXX
5103 .\" NS   doc-book-count
5104 .\" NS   doc-book-name
5105 .\" NS   doc-corporate-count
5106 .\" NS   doc-corporate-name
5107 .\" NS   doc-date
5108 .\" NS   doc-date-count
5109 .\" NS   doc-issue-count
5110 .\" NS   doc-issue-name
5111 .\" NS   doc-journal-count
5112 .\" NS   doc-journam-name
5113 .\" NS   doc-optional-count
5114 .\" NS   doc-optional-string
5115 .\" NS   doc-page-number-count
5116 .\" NS   doc-page-number-string
5117 .\" NS   doc-reference-title-count
5118 .\" NS   doc-reference-title-name
5119 .\" NS   doc-reference-title-name-for-book
5120 .\" NS   doc-report-count
5121 .\" NS   doc-report-name
5122 .\" NS   doc-volume-count
5123 .\" NS   doc-volume-name
5125 .de doc-reset-reference
5126 .  while (\n[doc-author-count]) \{\
5127 .    ds doc-author-name\n[doc-author-count]
5128 .    nr doc-author-count -1
5129 .  \}
5130 .  nr doc-journal-count 0
5131 .  nr doc-issue-count 0
5132 .  nr doc-optional-count 0
5133 .  nr doc-corporate-count 0
5134 .  nr doc-report-count 0
5135 .  nr doc-reference-title-count 0
5136 .  nr doc-volume-count 0
5137 .  nr doc-date-count 0
5138 .  nr doc-page-number-count 0
5139 .  nr doc-book-count 0
5141 .  ds doc-journal-name
5142 .  ds doc-issue-name
5143 .  ds doc-optional-string
5144 .  ds doc-corporate-name
5145 .  ds doc-report-name
5146 .  ds doc-reference-title-name
5147 .  ds doc-reference-title-name-for-book
5148 .  ds doc-volume-name
5149 .  ds doc-date
5150 .  ds doc-page-number-string
5151 .  ds doc-book-name
5155 .\" NS doc-finish-reference macro
5156 .\" NS   auxiliary macro for doc-print-reference
5157 .\" NS
5158 .\" NS modifies:
5159 .\" NS   doc-reference-count
5161 .de doc-finish-reference
5162 .  nr doc-reference-count -1
5163 .  ie \n[doc-reference-count] \
5164 .    nop \),
5165 .  el \
5166 .    nop \).
5170 .\" NS doc-print-reference macro
5171 .\" NS   reference print
5172 .\" NS
5173 .\" NS modifies:
5174 .\" NS   doc-reference-count
5176 .de doc-print-reference
5178 .  nh
5180 .  if \n[doc-author-count] \{\
5181 .    doc-print-reference-authors
5182 .    nr doc-reference-count -\n[doc-author-count]
5183 .  \}
5185 .  if \n[doc-reference-title-count] \{\
5186 .    unformat doc-reference-title-name
5187 .    chop doc-reference-title-name
5188 .    unformat doc-reference-title-name-for-book
5189 .    chop doc-reference-title-name-for-book
5190 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5191 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5192 .      doc-finish-reference
5193 .    \}
5194 .    el \{\
5195 .      nop \*[doc-reference-title-name]\c
5196 .      doc-finish-reference
5197 .  \}\}
5199 .  if \n[doc-book-count] \{\
5200 .    unformat doc-book-name
5201 .    chop doc-book-name
5202 .    nop \*[doc-book-name]\c
5203 .    doc-finish-reference
5204 .  \}
5206 .  if \n[doc-publisher-count] \{\
5207 .    unformat doc-publisher-name
5208 .    chop doc-publisher-name
5209 .    nop \*[doc-publisher-name]\c
5210 .    doc-finish-reference
5211 .  \}
5213 .  if \n[doc-journal-count] \{\
5214 .    unformat doc-journal-name
5215 .    chop doc-journal-name
5216 .    nop \*[doc-journal-name]\c
5217 .    doc-finish-reference
5218 .  \}
5220 .  if \n[doc-report-count] \{\
5221 .    unformat doc-report-name
5222 .    chop doc-report-name
5223 .    nop \*[doc-report-name]\c
5224 .    doc-finish-reference
5225 .  \}
5227 .  if \n[doc-issue-count] \{\
5228 .    unformat doc-issue-name
5229 .    chop doc-issue-name
5230 .    nop \*[doc-issue-name]\c
5231 .    doc-finish-reference
5232 .  \}
5234 .  if \n[doc-volume-count] \{\
5235 .    unformat doc-volume-name
5236 .    chop doc-volume-name
5237 .    nop \*[doc-volume-name]\c
5238 .    doc-finish-reference
5239 .  \}
5241 .  if \n[doc-page-number-count] \{\
5242 .    unformat doc-page-number-string
5243 .    chop doc-page-number-string
5244 .    nop \*[doc-page-number-string]\c
5245 .    doc-finish-reference
5246 .  \}
5248 .  if \n[doc-corporate-count] \{\
5249 .    unformat doc-corporate-name
5250 .    chop doc-corporate-name
5251 .    nop \*[doc-corporate-name]\c
5252 .    doc-finish-reference
5253 .  \}
5255 .  if \n[doc-date-count] \{\
5256 .    unformat doc-date
5257 .    chop doc-date
5258 .    nop \*[doc-date]\c
5259 .    doc-finish-reference
5260 .  \}
5262 .  if \n[doc-optional-count] \{\
5263 .    unformat doc-optional-string
5264 .    chop doc-optional-string
5265 .    nop \*[doc-optional-string]\c
5266 .    doc-finish-reference
5267 .  \}
5269 .  if \n[doc-reference-count] \
5270 .    tm mdoc warning: unresolved reference problem
5272 .  hy \n[doc-hyphen-flags]
5276 .\" NS doc-print-reference-authors macro
5277 .\" NS   print out reference authors
5278 .\" NS
5279 .\" NS local variables:
5280 .\" NS   doc-reg-dpra
5281 .\" NS   doc-str-dpra
5283 .ds doc-str-dpra "and
5285 .de doc-print-reference-authors
5286 .  nr doc-reg-dpra 1
5288 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5289 .    unformat doc-author-name\n[doc-reg-dpra]
5290 .    chop doc-author-name\n[doc-reg-dpra]
5291 .    ie (\n[doc-author-count] > 2) \
5292 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5293 .    el \
5294 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5295 .    nr doc-reg-dpra +1
5296 .  \}
5298 .  unformat doc-author-name\n[doc-reg-dpra]
5299 .  chop doc-author-name\n[doc-reg-dpra]
5300 .  if (\n[doc-author-count] > 1) \
5301 .    nop \)\*[doc-str-dpra]
5302 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5306 .\" NS doc-author-count global register
5307 .\" NS   counter of author references
5309 .nr doc-author-count 0
5312 .\" NS doc-author-nameXXX global box
5313 .\" NS   array of author names
5314 .\" NS
5315 .\" NS limit:
5316 .\" NS   doc-author-count
5318 .ds doc-author-name0
5321 .\" NS %A user macro
5322 .\" NS   reference author(s)
5323 .\" NS
5324 .\" NS modifies:
5325 .\" NS   doc-arg-ptr
5326 .\" NS   doc-author-count
5327 .\" NS   doc-curr-font
5328 .\" NS   doc-curr-size
5329 .\" NS   doc-macro-name
5330 .\" NS   doc-reference-count
5331 .\" NS
5332 .\" NS local variables:
5333 .\" NS   doc-env-%A
5334 .\" NS
5335 .\" NS width register `%A' set in doc-common
5337 .de %A
5338 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5339 .    tm Usage: .%A author_name ... (#\n[.c])
5340 .    return
5341 .  \}
5343 .  nr doc-author-count +1
5344 .  nr doc-reference-count +1
5346 .  ds doc-macro-name %A
5347 .  doc-parse-args \$@
5349 .  nr doc-arg-ptr +1
5350 .  nr doc-curr-font \n[.f]
5351 .  nr doc-curr-size \n[.ps]
5353 .  \" save to reference box
5354 .  box doc-author-name\n[doc-author-count]
5355 .  ev doc-env-%A
5356 .  evc 0
5357 .  in 0
5358 .  nf
5359 .  doc-do-references
5363 .\" NS doc-book-count global register
5364 .\" NS   counter of book references
5366 .nr doc-book-count 0
5369 .\" NS doc-book-name global box
5370 .\" NS   string of collected book references
5372 .ds doc-book-name
5375 .\" NS %B user macro
5376 .\" NS   [reference] book name
5377 .\" NS
5378 .\" NS modifies:
5379 .\" NS   doc-arg-ptr
5380 .\" NS   doc-book-count
5381 .\" NS   doc-curr-font
5382 .\" NS   doc-curr-size
5383 .\" NS   doc-macro-name
5384 .\" NS   doc-reference-count
5385 .\" NS
5386 .\" NS local variables:
5387 .\" NS   doc-env-%B
5388 .\" NS
5389 .\" NS width register `%B' set in doc-common
5391 .de %B
5392 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5393 .    tm Usage: .%B book_name ... (#\n[.c])
5394 .    return
5395 .  \}
5397 .  if \n[doc-is-reference] \{\
5398 .    nr doc-book-count +1
5399 .    nr doc-reference-count +1
5400 .  \}
5402 .  ds doc-macro-name %B
5403 .  doc-parse-args \$@
5405 .  nr doc-arg-ptr +1
5406 .  nr doc-curr-font \n[.f]
5407 .  nr doc-curr-size \n[.ps]
5409 .  ie \n[doc-is-reference] \{\
5410 .    \" append to reference box
5411 .    boxa doc-book-name
5412 .    ev doc-env-%B
5413 .    evc 0
5414 .    in 0
5415 .    nf
5416 .    nop \*[doc-Em-font]\c
5417 .    doc-do-references
5418 .  \}
5419 .  el \{\
5420 .    nop \*[doc-Em-font]\c
5421 .    doc-print-recursive
5422 .  \}
5426 .\" NS doc-date-count global register
5427 .\" NS   counter of date references
5429 .nr doc-date-count 0
5432 .\" NS doc-date global box
5433 .\" NS   string of collected date references
5435 .ds doc-date
5438 .\" NS %D user macro
5439 .\" NS   [reference] date
5440 .\" NS
5441 .\" NS modifies:
5442 .\" NS   doc-arg-ptr
5443 .\" NS   doc-curr-font
5444 .\" NS   doc-curr-size
5445 .\" NS   doc-date-count
5446 .\" NS   doc-macro-name
5447 .\" NS   doc-reference-count
5448 .\" NS
5449 .\" NS local variables:
5450 .\" NS   doc-env-%D
5451 .\" NS
5452 .\" NS width register `%D' set in doc-common
5454 .de %D
5455 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5456 .    tm Usage: .%D date ... (#\n[.c])
5457 .    return
5458 .  \}
5460 .  nr doc-date-count +1
5461 .  nr doc-reference-count +1
5463 .  ds doc-macro-name %D
5464 .  doc-parse-args \$@
5466 .  nr doc-arg-ptr +1
5467 .  nr doc-curr-font \n[.f]
5468 .  nr doc-curr-size \n[.ps]
5470 .  \" append to reference box
5471 .  boxa doc-date
5472 .  ev doc-env-%D
5473 .  evc 0
5474 .  in 0
5475 .  nf
5476 .  doc-do-references
5480 .\" NS doc-publisher-count global register
5481 .\" NS   counter of publisher references
5483 .nr doc-publisher-count 0
5486 .\" NS doc-publisher-name global box
5487 .\" NS   string of collected publisher references
5489 .ds doc-publisher-name
5492 .\" NS %I user macro
5493 .\" NS   [reference] issuer/publisher name
5494 .\" NS
5495 .\" NS modifies:
5496 .\" NS   doc-arg-ptr
5497 .\" NS   doc-curr-font
5498 .\" NS   doc-curr-size
5499 .\" NS   doc-macro-name
5500 .\" NS   doc-publisher-count
5501 .\" NS   doc-reference-count
5502 .\" NS
5503 .\" NS local variables:
5504 .\" NS   doc-env-%I
5505 .\" NS
5506 .\" NS width register `%I' set in doc-common
5508 .de %I
5509 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5510 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5511 .    return
5512 .  \}
5514 .  nr doc-publisher-count +1
5515 .  nr doc-reference-count +1
5517 .  ds doc-macro-name %I
5518 .  doc-parse-args \$@
5520 .  nr doc-arg-ptr +1
5521 .  nr doc-curr-font \n[.f]
5522 .  nr doc-curr-size \n[.ps]
5524 .  \" append to reference box
5525 .  boxa doc-publisher-name
5526 .  ev doc-env-%I
5527 .  evc 0
5528 .  in 0
5529 .  nf
5530 .  nop \*[doc-Em-font]\c
5531 .  doc-do-references
5535 .\" NS doc-journal-count global register
5536 .\" NS   counter of journal references
5538 .nr doc-journal-count 0
5541 .\" NS doc-journal-name global box
5542 .\" NS   string of collected journal references
5544 .ds doc-journal-name
5547 .\" NS %J user macro
5548 .\" NS   [reference] Journal Name
5549 .\" NS
5550 .\" NS modifies:
5551 .\" NS   doc-arg-ptr
5552 .\" NS   doc-curr-font
5553 .\" NS   doc-curr-size
5554 .\" NS   doc-journal-count
5555 .\" NS   doc-macro-name
5556 .\" NS   doc-reference-count
5557 .\" NS
5558 .\" NS local variables:
5559 .\" NS   doc-env-%J
5560 .\" NS
5561 .\" NS width register `%J' set in doc-common
5563 .de %J
5564 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5565 .    tm Usage: .%J journal_name ... (#\n[.c])
5566 .    return
5567 .  \}
5569 .  nr doc-journal-count +1
5570 .  nr doc-reference-count +1
5572 .  ds doc-macro-name %J
5573 .  doc-parse-args \$@
5575 .  nr doc-arg-ptr +1
5576 .  nr doc-curr-font \n[.f]
5577 .  nr doc-curr-size \n[.ps]
5579 .  \" append to reference box
5580 .  boxa doc-journal-name
5581 .  ev doc-env-%J
5582 .  evc 0
5583 .  in 0
5584 .  nf
5585 .  nop \*[doc-Em-font]\c
5586 .  doc-do-references
5590 .\" NS doc-issue-count global register
5591 .\" NS   counter of issue number references
5593 .nr doc-issue-count 0
5596 .\" NS doc-issue-name global box
5597 .\" NS   string of collected issue number references
5599 .ds doc-issue-name
5602 .\" NS %N user macro
5603 .\" NS   [reference] issue number
5604 .\" NS
5605 .\" NS modifies:
5606 .\" NS   doc-arg-ptr
5607 .\" NS   doc-curr-font
5608 .\" NS   doc-curr-size
5609 .\" NS   doc-issue-count
5610 .\" NS   doc-macro-name
5611 .\" NS   doc-reference-count
5612 .\" NS
5613 .\" NS local variables:
5614 .\" NS   doc-env-%N
5615 .\" NS
5616 .\" NS width register `%N' set in doc-common
5618 .de %N
5619 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5620 .    tm Usage: .%N issue_number ... (#\n[.c])
5621 .    return
5622 .  \}
5624 .  nr doc-issue-count +1
5625 .  nr doc-reference-count +1
5627 .  ds doc-macro-name %N
5628 .  doc-parse-args \$@
5630 .  nr doc-arg-ptr +1
5631 .  nr doc-curr-font \n[.f]
5632 .  nr doc-curr-size \n[.ps]
5634 .  \" append to reference box
5635 .  boxa doc-issue-name
5636 .  ev doc-env-%N
5637 .  evc 0
5638 .  in 0
5639 .  nf
5640 .  doc-do-references
5644 .\" NS doc-optional-count global register
5645 .\" NS   counter of optional information references
5647 .nr doc-optional-count 0
5650 .\" NS doc-optional-string global box
5651 .\" NS   string of collected optional information references
5653 .ds doc-optional-string
5656 .\" NS %O user macro
5657 .\" NS   [reference] optional information
5658 .\" NS
5659 .\" NS modifies:
5660 .\" NS   doc-arg-ptr
5661 .\" NS   doc-curr-font
5662 .\" NS   doc-curr-size
5663 .\" NS   doc-macro-name
5664 .\" NS   doc-optional-count
5665 .\" NS   doc-reference-count
5666 .\" NS
5667 .\" NS local variables:
5668 .\" NS   doc-env-%O
5669 .\" NS
5670 .\" NS width register `%O' set in doc-common
5672 .de %O
5673 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5674 .    tm Usage: .%O optional_information ... (#\n[.c])
5675 .    return
5676 .  \}
5678 .  nr doc-optional-count +1
5679 .  nr doc-reference-count +1
5681 .  ds doc-macro-name %O
5682 .  doc-parse-args \$@
5684 .  nr doc-arg-ptr +1
5685 .  nr doc-curr-font \n[.f]
5686 .  nr doc-curr-size \n[.ps]
5688 .  \" append to reference box
5689 .  boxa doc-optional-string
5690 .  ev doc-env-%O
5691 .  evc 0
5692 .  in 0
5693 .  nf
5694 .  doc-do-references
5698 .\" NS doc-page-number-count global register
5699 .\" NS   counter of page number references
5701 .nr doc-page-number-count 0
5704 .\" NS doc-page-number-string global box
5705 .\" NS   string of collected page number references
5707 .ds doc-page-number-string
5710 .\" NS %P user macro
5711 .\" NS   [reference] page numbers
5712 .\" NS
5713 .\" NS modifies:
5714 .\" NS   doc-arg-ptr
5715 .\" NS   doc-curr-font
5716 .\" NS   doc-curr-size
5717 .\" NS   doc-macro-name
5718 .\" NS   doc-page-number-count
5719 .\" NS   doc-reference-count
5720 .\" NS
5721 .\" NS local variables:
5722 .\" NS   doc-env-%P
5723 .\" NS
5724 .\" NS width register `%P' set in doc-common
5726 .de %P
5727 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5728 .    tm Usage: .%P page_number ... (#\n[.c])
5729 .    return
5730 .  \}
5732 .  nr doc-page-number-count +1
5733 .  nr doc-reference-count +1
5735 .  ds doc-macro-name %P
5736 .  doc-parse-args \$@
5738 .  nr doc-arg-ptr +1
5739 .  nr doc-curr-font \n[.f]
5740 .  nr doc-curr-size \n[.ps]
5742 .  \" append to reference box
5743 .  boxa doc-page-number-string
5744 .  ev doc-env-%P
5745 .  evc 0
5746 .  in 0
5747 .  nf
5748 .  doc-do-references
5752 .\" NS doc-corporate-count global register
5753 .\" NS   counter of corporate references
5755 .nr doc-corporate-count 0
5758 .\" NS doc-corporate-name global box
5759 .\" NS   string of collected corporate references
5761 .ds doc-corporate-name
5764 .\" NS %Q user macro
5765 .\" NS   corporate or foreign author
5766 .\" NS
5767 .\" NS modifies:
5768 .\" NS   doc-arg-ptr
5769 .\" NS   doc-corporate-count
5770 .\" NS   doc-curr-font
5771 .\" NS   doc-curr-size
5772 .\" NS   doc-macro-name
5773 .\" NS   doc-reference-count
5774 .\" NS
5775 .\" NS local variables:
5776 .\" NS   doc-env-%Q
5777 .\" NS
5778 .\" NS width register `%Q' set in doc-common
5780 .de %Q
5781 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5782 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5783 .    return
5784 .  \}
5786 .  nr doc-corporate-count +1
5787 .  nr doc-reference-count +1
5789 .  ds doc-macro-name %Q
5790 .  doc-parse-args \$@
5792 .  nr doc-arg-ptr +1
5793 .  nr doc-curr-font \n[.f]
5794 .  nr doc-curr-size \n[.ps]
5796 .  \" append to reference box
5797 .  boxa doc-corporate-name
5798 .  ev doc-env-%Q
5799 .  evc 0
5800 .  in 0
5801 .  nf
5802 .  doc-do-references
5806 .\" NS doc-report-count global register
5807 .\" NS   counter of report references
5809 .nr doc-report-count 0
5812 .\" NS doc-report-name global box
5813 .\" NS   string of collected report references
5815 .ds doc-report-name
5818 .\" NS %R user macro
5819 .\" NS   [reference] report name
5820 .\" NS
5821 .\" NS modifies:
5822 .\" NS   doc-arg-ptr
5823 .\" NS   doc-curr-font
5824 .\" NS   doc-curr-size
5825 .\" NS   doc-macro-name
5826 .\" NS   doc-reference-count
5827 .\" NS   doc-report-count
5828 .\" NS
5829 .\" NS local variables:
5830 .\" NS   doc-env-%R
5831 .\" NS
5832 .\" NS width register `%R' set in doc-common
5834 .de %R
5835 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5836 .    tm Usage: .%R reference_report ... (#\n[.c])
5837 .    return
5838 .  \}
5840 .  nr doc-report-count +1
5841 .  nr doc-reference-count +1
5843 .  ds doc-macro-name %R
5844 .  doc-parse-args \$@
5846 .  nr doc-arg-ptr +1
5847 .  nr doc-curr-font \n[.f]
5848 .  nr doc-curr-size \n[.ps]
5850 .  \" append to reference box
5851 .  boxa doc-report-name
5852 .  ev doc-env-%R
5853 .  evc 0
5854 .  in 0
5855 .  nf
5856 .  doc-do-references
5860 .\" NS doc-reference-title-count global register
5861 .\" NS   counter of reference title references
5863 .nr doc-reference-title-count 0
5866 .\" NS doc-reference-title-name global box
5867 .\" NS   string of collected reference title references
5869 .ds doc-reference-title-name
5872 .\" NS doc-reference-title-name-for-book global box
5873 .\" NS   string of collected reference title references
5874 .\" NS   (saved with another font; this is a shortcoming of groff)
5876 .ds doc-reference-title-name-for-book
5879 .\" NS %T user macro
5880 .\" NS   reference title
5881 .\" NS
5882 .\" NS modifies:
5883 .\" NS   doc-arg-ptr
5884 .\" NS   doc-curr-font
5885 .\" NS   doc-curr-size
5886 .\" NS   doc-macro-name
5887 .\" NS   doc-reference-title-count
5888 .\" NS   doc-report-count
5889 .\" NS
5890 .\" NS local variables:
5891 .\" NS   doc-env-%T
5892 .\" NS
5893 .\" NS width register `%T' set in doc-common
5895 .de %T
5896 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5897 .    tm Usage: .%T reference_title ... (#\n[.c])
5898 .    return
5899 .  \}
5901 .  if \n[doc-is-reference] \{\
5902 .    nr doc-reference-title-count +1
5903 .    nr doc-reference-count +1
5904 .  \}
5906 .  ds doc-macro-name %T
5907 .  doc-parse-args \$@
5909 .  nr doc-arg-ptr +1
5910 .  nr doc-curr-font \n[.f]
5911 .  nr doc-curr-size \n[.ps]
5912 .  ie \n[doc-is-reference] \{\
5913 .    \" append to reference box
5914 .    boxa doc-reference-title-name-for-book
5915 .    ev doc-env-%T
5916 .    evc 0
5917 .    in 0
5918 .    nf
5919 .    nop \*[doc-No-font]\c
5920 .    doc-do-references
5922 .    \" do it a second time with another font
5923 .    ds doc-macro-name %T
5924 .    doc-parse-args \$@
5926 .    nr doc-arg-ptr +1
5927 .    nr doc-curr-font \n[.f]
5928 .    nr doc-curr-size \n[.ps]
5929 .    boxa doc-reference-title-name
5930 .    ev doc-env-%T
5931 .    evc 0
5932 .    in 0
5933 .    nf
5934 .    nop \*[doc-Em-font]\c
5935 .    doc-do-references
5936 .  \}
5937 .  el \{\
5938 .    nop \*[doc-Em-font]\c
5939 .    doc-print-recursive
5940 .  \}
5944 .\" NS doc-volume-count global register
5945 .\" NS   counter of reference title references
5947 .nr doc-volume-count 0
5950 .\" NS doc-volume-name global box
5951 .\" NS   string of collected volume references
5953 .ds doc-volume-name
5956 .\" NS %V user macro
5957 .\" NS   reference volume
5958 .\" NS
5959 .\" NS modifies:
5960 .\" NS   doc-arg-ptr
5961 .\" NS   doc-curr-font
5962 .\" NS   doc-curr-size
5963 .\" NS   doc-macro-name
5964 .\" NS   doc-reference-title-count
5965 .\" NS   doc-volume-count
5966 .\" NS
5967 .\" NS local variables:
5968 .\" NS   doc-env-%V
5969 .\" NS
5970 .\" NS width register `%V' set in doc-common
5972 .de %V
5973 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5974 .    tm Usage: .%V volume ... (#\n[.c])
5975 .    return
5976 .  \}
5978 .  nr doc-volume-count +1
5979 .  nr doc-reference-count +1
5981 .  ds doc-macro-name %V
5982 .  doc-parse-args \$@
5984 .  nr doc-arg-ptr +1
5985 .  nr doc-curr-font \n[.f]
5986 .  nr doc-curr-size \n[.ps]
5988 .  \" append to reference box
5989 .  boxa doc-volume-name
5990 .  ev doc-env-%V
5991 .  evc 0
5992 .  in 0
5993 .  nf
5994 .  doc-do-references
5998 .\" NS doc-do-references macro
5999 .\" NS   reference recursion routine
6000 .\" NS
6001 .\" NS modifies:
6002 .\" NS   doc-arg-ptr
6003 .\" NS
6004 .\" NS local variables:
6005 .\" NS   doc-reg-ddr
6006 .\" NS   doc-reg-ddr1
6008 .de doc-do-references
6009 .  if !\n[doc-is-reference] \
6010 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6012 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6014 .  ie (\n[doc-reg-ddr1] == 1) \{\
6015 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6016 .    doc-append-arg \c 3
6017 .    \*[doc-arg\n[doc-arg-ptr]]
6018 .  \}
6019 .  el \{\
6020 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6022 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6023 .      \" finish reference box
6024 .      br
6025 .      ev
6026 .      boxa
6028 .      doc-reset-args
6029 .    \}
6030 .    el \{\
6031 .      nr doc-reg-ddr \n[doc-arg-ptr]
6032 .      nr doc-arg-ptr +1
6033 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6034 .      doc-do-references
6035 .  \}\}
6039 .\" NS Hf user macro
6040 .\" NS   source include header files.
6041 .\" NS
6042 .\" NS modifies:
6043 .\" NS   doc-curr-font
6044 .\" NS   doc-curr-size
6045 .\" NS
6046 .\" NS width register `Hf' set in doc-common
6048 .de Hf
6049 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6050 .    doc-paragraph
6051 .    nop File:
6052 .    Pa \$1
6054 .    Bd -literal
6055 .    so \$1
6056 .    Ed
6058 .    doc-paragraph
6059 .  \}
6060 .  el \
6061 .    Usage: .Hf file (#\n[.c])
6065 .\" NS doc-have-author global register (bool)
6066 .\" NS   set in `An'
6068 .nr doc-have-author 0
6071 .\" NS An user macro
6072 .\" NS   author name
6073 .\" NS
6074 .\" NS modifies:
6075 .\" NS   doc-arg-ptr
6076 .\" NS   doc-curr-font
6077 .\" NS   doc-curr-size
6078 .\" NS   doc-have-author
6079 .\" NS   doc-macro-name
6080 .\" NS
6081 .\" NS width register `An' set in doc-common
6083 .de An
6084 .  if !\n[doc-arg-limit] \{\
6085 .    ie \n[.$] \{\
6086 .      ie        "\$1"-nosplit" \
6087 .        nr doc-in-authors-section 0
6088 .      el \{ .ie "\$1"-split" \
6089 .        nr doc-in-authors-section 1
6090 .      el \{\
6091 .        ds doc-macro-name An
6092 .        doc-parse-args \$@
6093 .    \}\}\}
6094 .    el \{\
6095 .      tm1 "Usage: .An {-nosplit | -split}
6096 .      tm1         .An author_name ... (#\n[.c])
6097 .  \}\}
6099 .  if \n[doc-in-authors-section] \{\
6100 .    ie \n[doc-have-author] \
6101 .      br
6102 .    el \
6103 .      nr doc-have-author 1
6104 .  \}
6106 .  if \n[doc-arg-limit] \{\
6107 .    nr doc-arg-ptr +1
6108 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6109 .      nr doc-curr-font \n[.f]
6110 .      nr doc-curr-size \n[.ps]
6111 .      doc-print-recursive
6112 .    \}
6113 .    el \{\
6114 .      tm Usage: .An author_name ... (#\n[.c])
6115 .      doc-reset-args
6116 .  \}\}
6120 .\" NS Rv user macro
6121 .\" NS   return values
6122 .\" NS
6123 .\" NS width register `Rv' set in doc-common
6124 .\" NS
6125 .\" NS local variables:
6126 .\" NS   doc-str-Rv-std-prefix
6127 .\" NS   doc-str-Rv-std-suffix
6128 .\" NS   doc-str-Rv-stds-prefix
6129 .\" NS   doc-str-Rv-stds-and
6130 .\" NS   doc-str-Rv-stds-suffix
6131 .\" NS   doc-str-Rv-std0
6133 .ds doc-str-Rv-std-prefix "The
6134 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6135 .as doc-str-Rv-std-suffix " otherwise the value\~-1 is returned and
6136 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6137 .as doc-str-Rv-std-suffix " is set to indicate the error.
6139 .ds doc-str-Rv-stds-prefix "The
6140 .ds doc-str-Rv-stds-and    "and
6141 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6142 .as doc-str-Rv-stds-suffix " otherwise the value\~-1 is returned and
6143 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6144 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6146 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6147 .as doc-str-Rv-std0 " otherwise the value\~-1 is returned and
6148 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6149 .as doc-str-Rv-std0 " is set to indicate the error.
6151 .de Rv
6153 .\" XXX: what does this function without `-std'?
6155 .  if \n[doc-arg-limit] \{\
6156 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6157 .    doc-reset-args
6158 .    return
6159 .  \}
6161 .  if !\n[.$] \{\
6162 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6163 .    return
6164 .  \}
6166 .  if "\$1"-std" \{\
6167 .    nr doc-reg-Rv \*[doc-section]
6168 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6169 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6170 .    br
6171 .    shift
6172 .    ie (\n[.$] > 1) \{\
6173 .      nop \)\*[doc-str-Rv-stds-prefix]
6174 .      nr doc-reg-Rv 1
6175 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6176 .        ie (\n[.$] > 2) \
6177 .          Fn \$\n[doc-reg-Rv] ,
6178 .        el \
6179 .          Fn \$\n[doc-reg-Rv]
6180 .        nr doc-reg-Rv +1
6181 .      \}
6182 .      nop \)\*[doc-str-Rv-stds-and]
6183 .      Fn \$\n[.$]
6184 .      nop \)\*[doc-str-Rv-stds-suffix]
6185 .    \}
6186 .    el \{ .ie (\n[.$] == 1) \{\
6187 .      nop \)\*[doc-str-Rv-std-prefix]
6188 .      Fn \$1
6189 .      nop \)\*[doc-str-Rv-std-suffix]
6190 .    \}
6191 .    el \{\
6192 .      nop \)\*[doc-str-Rv-std0]
6193 .  \}\}\}
6197 .\" NS Ex user macro
6198 .\" NS   exit status
6199 .\" NS
6200 .\" NS width register `Ex' set in doc-common
6201 .\" NS
6202 .\" NS local variables:
6203 .\" NS   doc-str-Ex-std-prefix
6204 .\" NS   doc-str-Ex-std-suffix
6206 .ds doc-str-Ex-std-prefix "The
6207 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6208 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6210 .ds doc-str-Ex-stds-prefix "The
6211 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6212 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6213 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6215 .de Ex
6217 .\" XXX: what does this function without `-std'?
6219 .  if \n[doc-arg-limit] \{\
6220 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6221 .    doc-reset-args
6222 .    return
6223 .  \}
6225 .  if !\n[.$] \{\
6226 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6227 .    return
6228 .  \}
6230 .  if "\$1"-std" \{\
6231 .    nr doc-reg-Ex \*[doc-section]
6232 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6233 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6234 .    br
6235 .    shift
6236 .    ie (\n[.$] > 1) \{\
6237 .      nop \)\*[doc-str-Ex-stds-prefix]
6238 .      nr doc-reg-Ex 1
6239 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6240 .        ie (\n[.$] > 2) \
6241 .          Nm \$\n[doc-reg-Ex] ,
6242 .        el \
6243 .          Nm \$\n[doc-reg-Ex]
6244 .        nr doc-reg-Ex +1
6245 .      \}
6246 .      nop \)\*[doc-str-Ex-stds-and]
6247 .      Nm \$\n[.$]
6248 .      nop \)\*[doc-str-Ex-stds-suffix]
6249 .    \}
6250 .    el \{\
6251 .      nop \)\*[doc-str-Ex-std-prefix]
6252 .      Nm \$1
6253 .      nop \)\*[doc-str-Ex-std-suffix]
6254 .  \}\}
6258 .\" NS Mt user macro
6259 .\" NS   mailto (for conversion to HTML)
6261 .de Mt
6262 .  \" XXX: error handling missing
6263 .  Pa \$@
6267 .\" NS Lk user macro
6268 .\" NS   link (for conversion to HTML)
6269 .\" NS
6270 .\" NS local variables:
6271 .\" NS   doc-reg-Lk
6272 .\" NS   doc-str-Lk
6274 .de Lk
6275 .  ds doc-str-Lk Sy \$@
6277 .  ie (\n[.$] > 1) \{\
6278 .    doc-get-arg-type \$2
6279 .    ie (\n[doc-arg-type] < 3) \{\
6280 .      Em \)\$2:
6281 .      ds doc-str-Lk Sy "\$1"
6282 .      doc-get-width "\$1"
6283 .      shift 2
6284 .      if \n[.$] \
6285 .        as doc-str-Lk " \$@
6286 .    \}
6287 .    el \
6288 .      doc-get-width "\$1"
6289 .  \}
6290 .  el \
6291 .    doc-get-width "\$1"
6293 .  ie n \
6294 .    nr doc-reg-Lk 26
6295 .  el \
6296 .    nr doc-reg-Lk 38
6297 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6298 .    D1 \*[doc-str-Lk]
6299 .  el \
6300 .    \*[doc-str-Lk]
6304 .\" NS doc-defunct-macro macro
6305 .\" NS   this is the skeleton for defunct macros
6306 .\" NS
6308 .de doc-defunct-macro
6309 .  tmc mdoc error: .\$0 defunct
6310 .  if d doc-\$0-usage \
6311 .    tmc , \*[doc-\$0-usage]
6312 .  tm1 " (#\n[.c])
6316 .\" obsolete macros
6318 .als Db doc-defunct-macro
6320 .als Ds doc-defunct-macro
6322 .als Or doc-defunct-macro
6323 .ds doc-Or-usage use `|'
6325 .als Sf doc-defunct-macro
6326 .ds doc-Sf-usage use .Pf or .Ns
6329 .rn em e@
6331 .de em
6332 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6333 .  tm1 "            Should this have been `.Em ...'?
6334 .  ab
6338 .\" NS doc-empty-line macro
6339 .\" NS   emit warning and print empty line
6341 .de doc-empty-line
6342 .  if !\n[doc-display-depth] \
6343 .    tm mdoc warning: Empty input line #\n[.c]
6344 .  sp
6347 .blm doc-empty-line
6353 .\" load local modifications
6354 .mso mdoc.local
6356 .\" EOF