* src/preproc/ref/ref.cpp (reference::compute_sort_key): Always
[s-roff.git] / tmac / doc.tmac
blob059534cd3e80954c9e6d0609e1dd95674ee9b86c
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 .      ie "\*[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 .      nop \*[doc-Nm-font]\c
704 .      doc-print-recursive
705 .  \}\}
706 .  el \{\
707 .    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
708 .    doc-reset-args
709 .  \}
713 .\" NS Cm user macro
714 .\" NS   interactive command modifier (flag)
715 .\" NS
716 .\" NS width register `Cm' set in doc-common
718 .als Cm doc-generic-macro
719 .ds doc-Cm-usage interactive_command_modifier
722 .\" NS Dv user macro
723 .\" NS   defined variable
724 .\" NS
725 .\" NS   this function uses the `Er' font
726 .\" NS
727 .\" NS width register `Dv' set in doc-common
729 .als Dv doc-generic-macro
730 .ds doc-Dv-usage defined_variable
731 .als doc-Dv-font doc-Er-font
734 .\" NS Em user macro
735 .\" NS   emphasis
736 .\" NS
737 .\" NS width register `Em' set in doc-common
739 .als Em doc-generic-macro
740 .ds doc-Em-usage text
743 .\" NS Er user macro
744 .\" NS   errno type
745 .\" NS
746 .\" NS width register `Er' set in doc-common
748 .als Er doc-generic-macro
749 .ds doc-Er-usage text
752 .\" NS Ev user macro
753 .\" NS   environment variable
754 .\" NS
755 .\" NS width register `Ev' set in doc-common
757 .als Ev doc-generic-macro
758 .ds doc-Ev-usage text
761 .\" NS doc-have-decl global register (bool)
762 .\" NS   subroutine test (in synopsis only)
764 .nr doc-have-decl 0
767 .\" NS doc-have-var global register (bool)
768 .\" NS   whether last type is a variable type
770 .nr doc-have-var 0
773 .\" NS doc-do-func-decl macro
774 .\" NS   do something special while in SYNOPSIS
775 .\" NS
776 .\" NS modifies:
777 .\" NS   doc-curr-font
778 .\" NS   doc-curr-size
779 .\" NS   doc-have-decl
780 .\" NS   doc-have-var
782 .de doc-do-func-decl
783 .  if \n[doc-in-synopsis-section] \{\
784 .    \" if a variable type was the last thing given, want vertical space
785 .    if \n[doc-have-var] \{\
786 .      doc-paragraph
787 .      nr doc-have-var 0
788 .    \}
789 .    \" if a subroutine was the last thing given, want vertical space
790 .    if \n[doc-have-func] \{\
791 .      ie \n[doc-have-decl] \
792 .        br
793 .      el \
794 .        doc-paragraph
795 .    \}
796 .    nr doc-have-decl 1
797 .  \}
799 .  nr doc-curr-font \n[.f]
800 .  nr doc-curr-size \n[.ps]
804 .\" NS Fd user macro
805 .\" NS   function declaration -- not callable
806 .\" NS
807 .\" NS   this function causes a break
808 .\" NS
809 .\" NS width register `Fd' set in doc-common
811 .de Fd
812 .  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
813 .    doc-do-func-decl
814 .    nop \*[doc-Fd-font]\$*
815 .    br
816 .    ft \n[doc-curr-font]
817 .    ps \n[doc-curr-size]u
818 .  \}
819 .  el \{\
820 .    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
821 .    doc-reset-args
822 .  \}
826 .\" NS In user macro
827 .\" NS   #include statement in SYNOPSIS
828 .\" NS   <header.h> if not in SYNOPSIS
829 .\" NS
830 .\" NS   this function causes a break; it uses the `Fd' font
831 .\" NS
832 .\" NS modifies:
833 .\" NS   doc-arg-ptr
834 .\" NS   doc-curr-font
835 .\" NS   doc-curr-size
836 .\" NS   doc-indent-synopsis
837 .\" NS   doc-macro-name
838 .\" NS
839 .\" NS width register `In' set in doc-common
841 .de In
842 .  if !\n[doc-arg-limit] \{\
843 .    ie \n[.$] \{\
844 .      ds doc-macro-name In
845 .      doc-parse-args \$@
846 .    \}
847 .    el \
848 .      tm Usage: .In include_file ... (#\n[.c])
849 .  \}
851 .  if !\n[doc-arg-limit] \
852 .    return
854 .  nr doc-arg-ptr +1
855 .  doc-print-prefixes
856 .  ie ((\n[doc-arg-limit] >= \n[doc-arg-ptr]) & (\n[doc-type\n[doc-arg-ptr]] == 2)) \{\
857 .    nr doc-curr-font \n[.f]
858 .    nr doc-curr-size \n[.ps]
860 .    ie \n[doc-in-synopsis-section] \{\
861 .      ie "\*[doc-macro-name]"In" \{\
862 .        doc-do-func-decl
863 .        nop \*[doc-Fd-font]#include <\*[doc-arg\n[doc-arg-ptr]]>
864 .        ft \n[doc-curr-font]
865 .        ps \n[doc-curr-size]u
866 .        br
867 .        nr doc-arg-ptr +1
868 .        ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
869 .          doc-print-recursive
870 .        el \
871 .          doc-reset-args
872 .      \}
873 .      el \{\
874 .        ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
875 .        as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
876 .        doc-print-recursive
877 .    \}\}
878 .    el \{\
879 .      ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
880 .      as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
881 .      doc-print-recursive
882 .  \}\}
883 .  el \{\
884 .    tm Usage: .In include_file ... (#\n[.c])
885 .    doc-reset-args
886 .  \}
890 .\" NS Fr user macro
891 .\" NS   function return value
892 .\" NS
893 .\" NS   this function uses the `Ar' font
894 .\" NS
895 .\" NS width register `Fr' set in doc-common
897 .als Fr doc-generic-macro
898 .ds doc-Fr-usage function_return_value
899 .als doc-Fr-font doc-Ar-font
902 .\" NS Ic user macro
903 .\" NS   interactive command
904 .\" NS
905 .\" NS width register `Ic' set in doc-common
907 .als Ic doc-generic-macro
908 .ds doc-Ic-usage interactive_command
911 .\" NS Li user macro
912 .\" NS   literals
913 .\" NS
914 .\" NS width register `Li' set in doc-common
916 .als Li doc-generic-macro
917 .ds doc-Li-usage argument
920 .\" NS Ms user macro
921 .\" NS   math symbol
922 .\" NS
923 .\" NS   this function uses the `Sy' font
924 .\" NS
925 .\" NS width register `Ms' set in doc-common
927 .als Ms doc-generic-macro
928 .ds doc-Ms-usage math_symbol
929 .als doc-Ms-font doc-Sy-font
932 .\" NS doc-command-name global string
933 .\" NS   save first invocation of .Nm
935 .ds doc-command-name
938 .\" NS Nm user macro
939 .\" NS   name of command or page topic
940 .\" NS
941 .\" NS modifies:
942 .\" NS   doc-arg-ptr
943 .\" NS   doc-command-name
944 .\" NS   doc-curr-font
945 .\" NS   doc-curr-size
946 .\" NS   doc-indent-synopsis
947 .\" NS   doc-indent-synopsis-active
948 .\" NS   doc-macro-name
949 .\" NS
950 .\" NS width register `Nm' set in doc-common
952 .de Nm
953 .  if !\n[doc-arg-limit] \{\
954 .    ds doc-macro-name Nm
955 .    ie \n[.$] \
956 .      doc-parse-args \$@
957 .    el \{\
958 .      ie "\*[doc-command-name]"" \
959 .        tm Usage: .Nm name ... (#\n[.c])
960 .      el \
961 .        doc-parse-args \*[doc-command-name]
962 .  \}\}
964 .  if !\n[doc-arg-limit] \
965 .    return
967 .  nr doc-arg-ptr +1
968 .  doc-print-prefixes
969 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
970 .    \" last argument
971 .    ie "\*[doc-command-name]"" \{\
972 .      tm Usage: .Nm name ... (#\n[.c])
973 .      doc-reset-args
974 .    \}
975 .    el \{\
976 .      nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
977 .      doc-print-and-reset
978 .  \}\}
979 .  el \{\
980 .    nr doc-curr-font \n[.f]
981 .    nr doc-curr-size \n[.ps]
983 .    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
984 .      ie "\*[doc-command-name]"" \
985 .        tm Usage: .Nm name ... (#\n[.c])
986 .      el \{\
987 .        \" replace previous argument (Nm) with default value
988 .        nr doc-arg-ptr -1
989 .        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
990 .        nr doc-type\n[doc-arg-ptr] 2
991 .        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
993 .        \" recompute space vector for remaining arguments
994 .        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
995 .        nr doc-arg-limit \n[doc-arg-ptr]
996 .        doc-parse-space-vector
997 .    \}\}
998 .    el \{\
999 .      \" handle `.Nm ...' in SYNOPSIS
1000 .      if \n[doc-in-synopsis-section] \{\
1001 .        if "\*[doc-macro-name]"Nm" \{\
1002 .          br
1003 .          if !\n[doc-indent-synopsis] \{\
1004 .            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1005 .            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1006 .          \}
1007 .          if !\n[doc-indent-synopsis-active] \{\
1008 .            in +\n[doc-indent-synopsis]u
1009 .            nr doc-indent-synopsis-active 1
1010 .          \}
1011 .          ti -\n[doc-indent-synopsis]u
1012 .      \}\}
1013 .      if "\*[doc-command-name]"" \
1014 .        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1016 .      nop \*[doc-Nm-font]\c
1017 .    \}
1018 .    doc-print-recursive
1019 .  \}
1023 .\" NS Pa user macro
1024 .\" NS   pathname: `.Pa [arg ...]'
1025 .\" NS
1026 .\" NS modifies:
1027 .\" NS   doc-arg-ptr
1028 .\" NS   doc-curr-font
1029 .\" NS   doc-curr-size
1030 .\" NS   doc-macro-name
1031 .\" NS
1032 .\" NS width register `Pa' set in doc-common
1034 .de Pa
1035 .  if !\n[doc-arg-limit] \{\
1036 .    ds doc-macro-name Pa
1037 .    doc-parse-args \$@
1039 .    if !\n[.$] \{\
1040 .      \" default value
1041 .      nop \*[doc-Pa-font]~\f[]\s[0]
1042 .  \}\}
1044 .  if !\n[doc-arg-limit] \
1045 .    return
1047 .  nr doc-arg-ptr +1
1048 .  doc-print-prefixes
1049 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1050 .    nr doc-curr-font \n[.f]
1051 .    nr doc-curr-size \n[.ps]
1052 .    nop \*[doc-Pa-font]\c
1053 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1054 .      \" replace previous argument (Pa) with default value
1055 .      nr doc-arg-ptr -1
1056 .      ds doc-arg\n[doc-arg-ptr] ~
1057 .      nr doc-type\n[doc-arg-ptr] 2
1058 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1060 .      \" recompute space vector for remaining arguments
1061 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1062 .      nr doc-arg-limit \n[doc-arg-ptr]
1063 .      doc-parse-space-vector
1064 .    \}
1065 .    doc-print-recursive
1066 .  \}
1067 .  el \{\
1068 .    nop \*[doc-Pa-font]~\f[]\s[0]\c
1069 .    doc-print-and-reset
1070 .  \}
1074 .\" NS Sy user macro
1075 .\" NS   symbolics
1076 .\" NS
1077 .\" NS width register `Sy' set in doc-common
1079 .als Sy doc-generic-macro
1080 .ds doc-Sy-usage symbolic_text
1083 .\" NS Me user macro
1084 .\" NS   menu entries
1085 .\" NS
1086 .\" NS width register `Me' set in doc-common
1088 .als Me doc-generic-macro
1089 .ds doc-Me-usage menu_entry
1092 .\" NS Tn user macro
1093 .\" NS   trade name
1094 .\" NS
1095 .\" NS modifies:
1096 .\" NS   doc-arg-ptr
1097 .\" NS   doc-curr-font
1098 .\" NS   doc-curr-size
1099 .\" NS   doc-macro-name
1100 .\" NS
1101 .\" NS width register `Tn' set in doc-common
1103 .de Tn
1104 .  if !\n[doc-arg-limit] \{\
1105 .    ie \n[.$] \{\
1106 .      ds doc-macro-name Tn
1107 .      doc-parse-args \$@
1108 .    \}
1109 .    el \
1110 .      tm Usage: .Tn trade_name ... (#\n[.c])
1111 .  \}
1113 .  if !\n[doc-arg-limit] \
1114 .    return
1116 .  nr doc-arg-ptr +1
1117 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1118 .    nr doc-curr-font \n[.f]
1119 .    nr doc-curr-size \n[.ps]
1120 .    nop \)\*[doc-Tn-font-size]\c
1121 .    ie !\n[doc-is-reference] \{\
1122 .      nop \)\*[doc-Tn-font-shape]\c
1123 .      doc-print-recursive
1124 .    \}
1125 .    el \
1126 .      doc-do-references
1127 .  \}
1128 .  el \{\
1129 .    tm Usage: .Tn trade_name ... (#\n[.c])
1130 .    doc-reset-args
1131 .  \}
1135 .\" NS Va user macro
1136 .\" NS   variable name
1137 .\" NS
1138 .\" NS width register `Va' set in doc-common
1140 .als Va doc-generic-macro
1141 .ds doc-Va-usage variable_name
1144 .\" NS No user macro
1145 .\" NS   normal text macro (default text style if mess up)
1146 .\" NS
1147 .\" NS width register `No' set in doc-common
1149 .als No doc-generic-macro
1150 .ds doc-No-usage normal_text
1153 .\" NS doc-quote-left global string
1154 .\" NS   left quotation character for `doc-enclose-string' and
1155 .\" NS   `doc-enclose-open'
1157 .ds doc-quote-left
1160 .\" NS doc-quote-right global string
1161 .\" NS   right quotation character for `doc-enclose-string' and
1162 .\" NS   `doc-enclose-close'
1164 .ds doc-quote-right
1167 .\" NS Op user macro
1168 .\" NS   option expression (i.e., enclose string in square brackets)
1169 .\" NS
1170 .\" NS modifies:
1171 .\" NS   doc-macro-name
1172 .\" NS   doc-quote-left
1173 .\" NS   doc-quote-right
1174 .\" NS
1175 .\" NS width register `Op' set in doc-common
1177 .de Op
1178 .  if !\n[doc-arg-limit] \
1179 .    ds doc-macro-name Op
1181 .  ds doc-quote-left "\*[doc-left-bracket]
1182 .  ds doc-quote-right "\*[doc-right-bracket]
1184 .  doc-enclose-string \$@
1188 .\" NS Aq user macro
1189 .\" NS   enclose string in angle brackets
1190 .\" NS
1191 .\" NS modifies:
1192 .\" NS   doc-macro-name
1193 .\" NS   doc-quote-left
1194 .\" NS   doc-quote-right
1195 .\" NS
1196 .\" NS width register `Aq' set in doc-common
1198 .de Aq
1199 .  if !\n[doc-arg-limit] \
1200 .    ds doc-macro-name Aq
1202 .  ds doc-quote-left \[la]
1203 .  ds doc-quote-right \[ra]
1205 .  doc-enclose-string \$@
1209 .\" NS Bq user macro
1210 .\" NS   enclose string in square brackets
1211 .\" NS
1212 .\" NS modifies:
1213 .\" NS   doc-macro-name
1214 .\" NS   doc-quote-left
1215 .\" NS   doc-quote-right
1216 .\" NS
1217 .\" NS width register `Bq' set in doc-common
1219 .de Bq
1220 .  if !\n[doc-arg-limit] \
1221 .    ds doc-macro-name Bq
1223 .  ds doc-quote-left "\*[doc-left-bracket]
1224 .  ds doc-quote-right "\*[doc-right-bracket]
1226 .  doc-enclose-string \$@
1230 .\" NS Brq user macro
1231 .\" NS   enclose string in braces
1232 .\" NS
1233 .\" NS modifies:
1234 .\" NS   doc-macro-name
1235 .\" NS   doc-quote-left
1236 .\" NS   doc-quote-right
1237 .\" NS
1238 .\" NS width register `Brq' set in doc-common
1240 .de Brq
1241 .  if !\n[doc-arg-limit] \
1242 .    ds doc-macro-name Brq
1244 .  ds doc-quote-left {
1245 .  ds doc-quote-right }
1247 .  doc-enclose-string \$@
1251 .\" NS Dq user macro
1252 .\" NS   enclose string in double quotes
1253 .\" NS
1254 .\" NS modifies:
1255 .\" NS   doc-macro-name
1256 .\" NS   doc-quote-left
1257 .\" NS   doc-quote-right
1258 .\" NS
1259 .\" NS width register `Dq' set in doc-common
1261 .de Dq
1262 .  if !\n[doc-arg-limit] \
1263 .    ds doc-macro-name Dq
1265 .  ds doc-quote-left "\*[Lq]
1266 .  ds doc-quote-right "\*[Rq]
1268 .  doc-enclose-string \$@
1272 .\" NS Eq user macro
1273 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1274 .\" NS
1275 .\" NS modifies:
1276 .\" NS   doc-macro-name
1277 .\" NS   doc-quote-left
1278 .\" NS   doc-quote-right
1279 .\" NS
1280 .\" NS width register `Eq' set in doc-common
1282 .de Eq
1283 .  if !\n[doc-arg-limit] \
1284 .    ds doc-macro-name Eq
1286 .  ds doc-quote-left "\$1
1287 .  ds doc-quote-right "\$2
1289 .  shift 2
1290 .  doc-enclose-string \$@
1294 .\" NS Pq user macro
1295 .\" NS   enclose string in parentheses
1296 .\" NS
1297 .\" NS modifies:
1298 .\" NS   doc-macro-name
1299 .\" NS   doc-quote-left
1300 .\" NS   doc-quote-right
1301 .\" NS
1302 .\" NS width register `Pq' set in doc-common
1304 .de Pq
1305 .  if !\n[doc-arg-limit] \
1306 .    ds doc-macro-name Pq
1308 .  ds doc-quote-left "\*[doc-left-parenthesis]
1309 .  ds doc-quote-right "\*[doc-right-parenthesis]
1311 .  doc-enclose-string \$@
1315 .\" NS Ql user macro
1316 .\" NS   quoted literal
1318 .\"   is in file doc-[dit|n]roff
1321 .\" NS Qq user macro
1322 .\" NS   enclose string in straight double quotes
1323 .\" NS
1324 .\" NS modifies:
1325 .\" NS   doc-macro-name
1326 .\" NS   doc-quote-left
1327 .\" NS   doc-quote-right
1328 .\" NS
1329 .\" NS width register `Qq' set in doc-common
1331 .de Qq
1332 .  if !\n[doc-arg-limit] \
1333 .    ds doc-macro-name Qq
1335 .  ds doc-quote-left "\*[q]
1336 .  ds doc-quote-right "\*[q]
1338 .  doc-enclose-string \$@
1342 .\" NS Sq user macro
1343 .\" NS   enclose string in single quotes
1344 .\" NS
1345 .\" NS modifies:
1346 .\" NS   doc-macro-name
1347 .\" NS   doc-quote-left
1348 .\" NS   doc-quote-right
1349 .\" NS
1350 .\" NS width register `Sq' set in doc-common
1352 .de Sq
1353 .  if !\n[doc-arg-limit] \
1354 .    ds doc-macro-name Sq
1356 .  ds doc-quote-left "\*[doc-left-singlequote]
1357 .  ds doc-quote-right "\*[doc-right-singlequote]
1359 .  doc-enclose-string \$@
1363 .\" NS Es user macro
1364 .\" NS   set up arguments (i.e., the left and right quotation character as
1365 .\" NS   first and second argument) for .En call
1366 .\" NS
1367 .\" NS modifies:
1368 .\" NS   doc-arg-ptr
1369 .\" NS   doc-macro-name
1370 .\" NS   doc-quote-left
1371 .\" NS   doc-quote-right
1373 .de Es
1374 .  if !\n[doc-arg-limit] \{\
1375 .    ie (\n[.$] > 2) \{\
1376 .      ds doc-macro-name Es
1377 .      doc-parse-args \$@
1378 .    \}
1379 .    el \{\
1380 .      ds doc-quote-left "\$1
1381 .      ds doc-quote-right "\$2
1382 .  \}\}
1384 .  if !\n[doc-arg-limit] \
1385 .    return
1387 .  nr doc-arg-ptr +1
1388 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1389 .  nr doc-arg-ptr +1
1390 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1391 .  nr doc-arg-ptr +1
1392 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1393 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1394 .  el \
1395 .    doc-print-and-reset
1399 .\" NS doc-have-slot global register (bool)
1400 .\" NS   set if `doc-enclose-string' has created a slot for closing
1401 .\" NS   delimiter
1403 .nr doc-have-slot 0
1406 .\" NS doc-enclose-string macro
1407 .\" NS   enclose string with given args (e.g. [ and ])
1408 .\" NS
1409 .\" NS modifies:
1410 .\" NS   doc-arg-ptr
1411 .\" NS   doc-argXXX
1412 .\" NS   doc-have-slot
1413 .\" NS
1414 .\" NS local variables:
1415 .\" NS   doc-reg-des
1416 .\" NS   doc-reg-des1
1417 .\" NS   doc-reg-des2
1418 .\" NS
1419 .\" NS requires:
1420 .\" NS   doc-quote-left
1421 .\" NS   doc-quote-right
1423 .de doc-enclose-string
1424 .  if \n[doc-in-synopsis-section] \
1425 .    doc-set-hard-space
1427 .  if !\n[doc-arg-limit] \{\
1428 .    ie \n[.$] \
1429 .      doc-parse-args \$@
1430 .    el \{\
1431 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1432 .  \}\}
1434 .  if !\n[doc-arg-limit] \
1435 .    return
1437 .  nr doc-curr-font \n[.f]
1438 .  nr doc-curr-size \n[.ps]
1440 .  nr doc-arg-ptr +1
1441 .  doc-print-prefixes
1442 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1443 .  nop \)\*[doc-quote-left]\)\c
1444 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1445 .    \" last argument
1446 .    nop \)\*[doc-quote-right]\)\c
1447 .    doc-print-and-reset
1448 .  \}
1449 .  el \{\
1450 .    \" test whether last arguments are of type closing punctuation
1451 .    \" resp. suffix
1452 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1453 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1454 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1455 .        nr doc-reg-des -1
1457 .      \" prepend closing delimiter
1458 .      nr doc-reg-des +1
1459 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1460 .    \}
1461 .    el \{\
1462 .      \" test whether last arguments are macros which continue the line
1463 .      \" logically
1464 .      nr doc-reg-des \n[doc-arg-limit]
1465 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1466 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1467 .          break
1468 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1469 .          break
1470 .        nr doc-reg-des -1
1471 .      \}
1473 .      \" if there are no trailing macros to be skipped, append argument
1474 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1475 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1476 .      el \{\
1477 .        \" if a previous call to `doc-enclose-string' has already created
1478 .        \" a slot, prepend argument
1479 .        ie \n[doc-have-slot] \
1480 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1481 .        el \{\
1482 .          \" we have to shift all arguments to the right
1483 .          nr doc-reg-des +1
1484 .          nr doc-reg-des1 \n[doc-arg-limit]
1485 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1486 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1487 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1488 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1489 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1490 .            nr doc-reg-des1 -1
1491 .            nr doc-reg-des2 -1
1492 .          \}
1493 .          nr doc-arg-limit +1
1495 .          \" finally, insert closing delimiter into the freed slot and
1496 .          \" recompute spacing vector
1497 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1498 .          nr doc-type\n[doc-reg-des] 3
1499 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1500 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1501 .          doc-parse-space-vector
1502 .          nr doc-have-slot 1
1503 .    \}\}\}
1505 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1506 .  \}
1508 .  if \n[doc-in-synopsis-section] \
1509 .    doc-set-soft-space
1513 .\" NS En user macro
1514 .\" NS   enclose arguments with quotation characters set up with `.Es'
1516 .als En doc-enclose-string
1519 .\" NS Ao user macro
1520 .\" NS   angle open
1521 .\" NS
1522 .\" NS modifies:
1523 .\" NS   doc-macro-name
1524 .\" NS   doc-quote-left
1525 .\" NS
1526 .\" NS width register `Ao' set in doc-common
1528 .de Ao
1529 .  if !\n[doc-arg-limit] \
1530 .    ds doc-macro-name Ao
1532 .  ds doc-quote-left \[la]
1534 .  doc-enclose-open \$@
1538 .\" NS Ac user macro
1539 .\" NS   angle close
1540 .\" NS
1541 .\" NS modifies:
1542 .\" NS   doc-macro-name
1543 .\" NS   doc-quote-right
1544 .\" NS
1545 .\" NS width register `Ac' set in doc-common
1547 .de Ac
1548 .  if !\n[doc-arg-limit] \
1549 .    ds doc-macro-name Ac
1551 .  ds doc-quote-right \[ra]
1553 .  doc-enclose-close \$@
1557 .\" NS Bo user macro
1558 .\" NS   bracket open
1559 .\" NS
1560 .\" NS modifies:
1561 .\" NS   doc-macro-name
1562 .\" NS   doc-quote-left
1563 .\" NS
1564 .\" NS width register `Bo' set in doc-common
1566 .de Bo
1567 .  if !\n[doc-arg-limit] \
1568 .    ds doc-macro-name Bo
1570 .  ds doc-quote-left "\*[doc-left-bracket]
1572 .  doc-enclose-open \$@
1576 .\" NS Bc user macro
1577 .\" NS   bracket close
1578 .\" NS
1579 .\" NS modifies:
1580 .\" NS   doc-macro-name
1581 .\" NS   doc-quote-right
1582 .\" NS
1583 .\" NS width register `Bc' set in doc-common
1585 .de Bc
1586 .  if !\n[doc-arg-limit] \
1587 .    ds doc-macro-name Bc
1589 .  ds doc-quote-right "\*[doc-right-bracket]
1591 .  doc-enclose-close \$@
1595 .\" NS Bro user macro
1596 .\" NS   brace open
1597 .\" NS
1598 .\" NS modifies:
1599 .\" NS   doc-macro-name
1600 .\" NS   doc-quote-left
1601 .\" NS
1602 .\" NS width register `Bro' set in doc-common
1604 .de Bro
1605 .  if !\n[doc-arg-limit] \
1606 .    ds doc-macro-name Bo
1608 .  ds doc-quote-left {
1610 .  doc-enclose-open \$@
1614 .\" NS Brc user macro
1615 .\" NS   brace close
1616 .\" NS
1617 .\" NS modifies:
1618 .\" NS   doc-macro-name
1619 .\" NS   doc-quote-right
1620 .\" NS
1621 .\" NS width register `Brc' set in doc-common
1623 .de Brc
1624 .  if !\n[doc-arg-limit] \
1625 .    ds doc-macro-name Bc
1627 .  ds doc-quote-right }
1629 .  doc-enclose-close \$@
1633 .\" NS Do user macro
1634 .\" NS   double quote open
1635 .\" NS
1636 .\" NS modifies:
1637 .\" NS   doc-macro-name
1638 .\" NS   doc-quote-left
1639 .\" NS
1640 .\" NS width register `Do' set in doc-common
1642 .de Do
1643 .  if !\n[doc-arg-limit] \
1644 .    ds doc-macro-name Do
1646 .  ds doc-quote-left "\*[Lq]
1648 .  doc-enclose-open \$@
1652 .\" NS Dc user macro
1653 .\" NS   double quote close
1654 .\" NS
1655 .\" NS modifies:
1656 .\" NS   doc-macro-name
1657 .\" NS   doc-quote-right
1658 .\" NS
1659 .\" NS width register `Dc' set in doc-common
1661 .de Dc
1662 .  if !\n[doc-arg-limit] \
1663 .    ds doc-macro-name Dc
1665 .  ds doc-quote-right "\*[Rq]
1667 .  doc-enclose-close \$@
1671 .\" NS Eo user macro
1672 .\" NS   enclose open (using first argument as beginning of enclosure)
1673 .\" NS
1674 .\" NS modifies:
1675 .\" NS   doc-macro-name
1676 .\" NS   doc-quote-left
1677 .\" NS
1678 .\" NS width register `Eo' set in doc-common
1680 .de Eo
1681 .  if !\n[doc-arg-limit] \
1682 .    ds doc-macro-name Eo
1684 .  ds doc-quote-left "\$1
1686 .  shift
1687 .  doc-enclose-open \$@
1691 .\" NS Ec user macro
1692 .\" NS   enclose close (using first argument as end of enclosure)
1693 .\" NS
1694 .\" NS modifies:
1695 .\" NS   doc-macro-name
1696 .\" NS   doc-quote-right
1697 .\" NS
1698 .\" NS width register `Ec' set in doc-common
1700 .de Ec
1701 .  if !\n[doc-arg-limit] \
1702 .    ds doc-macro-name Ec
1704 .  ds doc-quote-right "\$1
1706 .  shift
1707 .  doc-enclose-close \$@
1711 .\" NS Oo user macro
1712 .\" NS   option open
1713 .\" NS
1714 .\" NS modifies:
1715 .\" NS   doc-macro-name
1716 .\" NS   doc-quote-left
1717 .\" NS
1718 .\" NS width register `Oo' set in doc-common
1720 .de Oo
1721 .  if !\n[doc-arg-limit] \
1722 .    ds doc-macro-name Oo
1724 .  ds doc-quote-left [
1726 .  doc-enclose-open \$@
1730 .\" NS Oc user macro
1731 .\" NS   option close
1732 .\" NS
1733 .\" NS modifies:
1734 .\" NS   doc-macro-name
1735 .\" NS   doc-quote-right
1736 .\" NS
1737 .\" NS width register `Oc' set in doc-common
1739 .de Oc
1740 .  if !\n[doc-arg-limit] \
1741 .    ds doc-macro-name Oc
1743 .  ds doc-quote-right ]
1745 .  doc-enclose-close \$@
1749 .\" NS Po user macro
1750 .\" NS   parenthesis open
1751 .\" NS
1752 .\" NS modifies:
1753 .\" NS   doc-macro-name
1754 .\" NS   doc-quote-left
1755 .\" NS
1756 .\" NS width register `Po' set in doc-common
1758 .de Po
1759 .  if !\n[doc-arg-limit] \
1760 .    ds doc-macro-name Po
1762 .  ds doc-quote-left "\*[doc-left-parenthesis]
1764 .  doc-enclose-open \$@
1768 .\" NS Pc user macro
1769 .\" NS   parenthesis close
1770 .\" NS
1771 .\" NS modifies:
1772 .\" NS   doc-macro-name
1773 .\" NS   doc-quote-right
1774 .\" NS
1775 .\" NS width register `Pc' set in doc-common
1777 .de Pc
1778 .  if !\n[doc-arg-limit] \
1779 .    ds doc-macro-name Pc
1781 .  ds doc-quote-right "\*[doc-right-parenthesis]
1783 .  doc-enclose-close \$@
1787 .\" NS Qo user macro
1788 .\" NS   straight double quote open
1789 .\" NS
1790 .\" NS modifies:
1791 .\" NS   doc-macro-name
1792 .\" NS   doc-quote-left
1793 .\" NS
1794 .\" NS width register `Qo' set in doc-common
1796 .de Qo
1797 .  if !\n[doc-arg-limit] \
1798 .    ds doc-macro-name Qo
1800 .  ds doc-quote-left "\*[q]
1802 .  doc-enclose-open \$@
1806 .\" NS Qc user macro
1807 .\" NS   straight double quote close
1808 .\" NS
1809 .\" NS modifies:
1810 .\" NS   doc-macro-name
1811 .\" NS   doc-quote-right
1812 .\" NS
1813 .\" NS width register `Qc' set in doc-common
1815 .de Qc
1816 .  if !\n[doc-arg-limit] \
1817 .    ds doc-macro-name Qc
1819 .  ds doc-quote-right "\*[q]
1821 .  doc-enclose-close \$@
1825 .\" NS So user macro
1826 .\" NS   single quote open
1827 .\" NS
1828 .\" NS modifies:
1829 .\" NS   doc-macro-name
1830 .\" NS   doc-quote-left
1831 .\" NS
1832 .\" NS width register `So' set in doc-common
1834 .de So
1835 .  if !\n[doc-arg-limit] \
1836 .    ds doc-macro-name So
1838 .  ds doc-quote-left "\*[doc-left-singlequote]
1840 .  doc-enclose-open \$@
1844 .\" NS Sc user macro
1845 .\" NS   single quote close
1846 .\" NS
1847 .\" NS modifies:
1848 .\" NS   doc-macro-name
1849 .\" NS   doc-quote-right
1850 .\" NS
1851 .\" NS width register `Sc' set in doc-common
1853 .de Sc
1854 .  if !\n[doc-arg-limit] \
1855 .    ds doc-macro-name Sc
1857 .  ds doc-quote-right "\*[doc-right-singlequote]
1859 .  doc-enclose-close \$@
1863 .\" NS Xo user macro
1864 .\" NS   extend open
1865 .\" NS
1866 .\" NS modifies:
1867 .\" NS   doc-macro-name
1868 .\" NS   doc-quote-left
1869 .\" NS
1870 .\" NS width register `Xo' set in doc-common
1872 .de Xo
1873 .  if !\n[doc-arg-limit] \
1874 .    ds doc-macro-name Xo
1876 .  ds doc-quote-left
1878 .  doc-enclose-open \$@
1882 .\" NS Xc user macro
1883 .\" NS   extend close
1884 .\" NS
1885 .\" NS modifies:
1886 .\" NS   doc-macro-name
1887 .\" NS   doc-quote-right
1888 .\" NS
1889 .\" NS width register `Xc' set in doc-common
1891 .de Xc
1892 .  if !\n[doc-arg-limit] \
1893 .    ds doc-macro-name Xc
1895 .  ds doc-quote-right
1897 .  doc-enclose-close \$@
1901 .\" NS doc-nesting-level global register
1902 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1904 .nr doc-nesting-level 0
1907 .\" NS doc-in-list global register (bool)
1908 .\" NS   whether we are in (logical) .It
1910 .nr doc-in-list 0
1913 .\" NS doc-enclose-open macro
1914 .\" NS   enclose string open
1915 .\" NS
1916 .\" NS modifies:
1917 .\" NS   doc-arg-ptr
1918 .\" NS   doc-nesting-level
1920 .de doc-enclose-open
1921 .  if !\n[doc-arg-limit] \
1922 .    doc-parse-args \$@
1924 .  nr doc-arg-ptr +1
1925 .  doc-print-prefixes
1926 .  nr doc-arg-ptr -1
1928 .  nop \)\*[doc-quote-left]\)\c
1930 .  \" start enclosure box
1931 .  box doc-enclosure-box\n[doc-nesting-level]
1932 .  ev doc-enclosure-env\n[doc-nesting-level]
1933 .  evc 0
1934 .  in 0
1935 .  nf
1936 .  \" we insert something to make .chop always work
1937 .  nop \&\c
1939 .  \" increase nesting level *after* parsing of arguments
1940 .  nr doc-nesting-level +1
1942 .  if \n[doc-arg-limit] \{\
1943 .    nr doc-arg-ptr +1
1944 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1945 .      doc-print-recursive
1946 .    el \
1947 .      doc-reset-args
1948 .  \}
1952 .\" NS doc-enclose-close macro
1953 .\" NS   enclose string close
1954 .\" NS
1955 .\" NS modifies:
1956 .\" NS   doc-nesting-level
1958 .de doc-enclose-close
1959 .  nr doc-nesting-level -1
1961 .  \" finish enclosure box
1962 .  br
1963 .  ev
1964 .  box
1965 .  chop doc-enclosure-box\n[doc-nesting-level]
1966 .  unformat doc-enclosure-box\n[doc-nesting-level]
1968 .  nh
1969 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1970 .  nop \)\*[doc-quote-right]\)\c
1972 .  if !\n[doc-arg-limit] \{\
1973 .    doc-parse-args \$@
1975 .    if !\n[.$] \
1976 .      doc-print-and-reset
1977 .  \}
1979 .  if \n[doc-arg-limit] \{\
1980 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1981 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1982 .      nr doc-arg-ptr +1
1983 .      doc-print-recursive
1984 .    \}
1985 .    el \
1986 .      doc-print-and-reset
1987 .  \}
1989 .  \" shall we finish .It macro?
1990 .  if !"\*[doc-macro-name]"It" \
1991 .    if \n[doc-in-list] \
1992 .      if !\n[doc-nesting-level] \
1993 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
1997 .\" NS Pf user macro
1998 .\" NS   prefix: `.Pf prefix arg ...'
1999 .\" NS
2000 .\" NS modifies:
2001 .\" NS   doc-arg-ptr
2002 .\" NS   doc-macro-name
2003 .\" NS   doc-quote-left
2004 .\" NS
2005 .\" NS width register `Pf' set in doc-common
2007 .de Pf
2008 .  if !\n[doc-arg-limit] \
2009 .    ds doc-macro-name Pf
2011 .  ie \n[doc-arg-limit] \{\
2012 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2013 .      nr doc-arg-ptr +1
2014 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2015 .    \}
2016 .    el \
2017 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2018 .  \}
2019 .  el \{\
2020 .    nop \)\$1\)\c
2021 .    shift
2022 .    ie \n[.$] \
2023 .      doc-parse-args \$@
2024 .    el \{\
2025 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
2026 .      nop \)
2027 .  \}\}
2029 .  if \n[doc-arg-limit] \{\
2030 .    nr doc-arg-ptr +1
2031 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2032 .      doc-print-and-reset
2033 .    el \
2034 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
2035 .  \}
2039 .\" NS Ns user macro
2040 .\" NS   remove space (space removal done by `doc-parse-args')
2041 .\" NS
2042 .\" NS modifies:
2043 .\" NS   doc-argXXX
2044 .\" NS   doc-macro-name
2045 .\" NS
2046 .\" NS width register `Ns' set in doc-common
2048 .de Ns
2049 .  if !\n[doc-arg-limit] \{\
2050 .    ie \n[.$] \{\
2051 .      ds doc-macro-name Ns
2052 .      doc-parse-args \$@
2053 .    \}
2054 .    el \
2055 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2056 .  \}
2058 .  if \n[doc-arg-limit] \{\
2059 .    nr doc-arg-ptr +1
2060 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2061 .      doc-print-recursive
2062 .    el \
2063 .      doc-reset-args
2064 .  \}
2068 .\" NS Ap user macro
2069 .\" NS   append an apostrophe
2070 .\" NS
2071 .\" NS width register `Ap' set in doc-common
2073 .de Ap
2074 .  ie !\n[doc-arg-limit] \
2075 .    tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2076 .  el \{\
2077 .    nop \)'\)\c
2078 .    nr doc-arg-ptr +1
2079 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2080 .      doc-print-recursive
2081 .    el \
2082 .      doc-reset-args
2083 .  \}
2087 .\" NS doc-space global string
2088 .\" NS   current inter-argument space
2090 .ds doc-space "\*[doc-soft-space]
2093 .\" NS doc-soft-space constant string
2094 .\" NS   soft (stretchable) space (defined in doc-common)
2097 .\" NS doc-hard-space constant string
2098 .\" NS   hard (unpaddable) space (defined in doc-common)
2101 .\" NS doc-set-hard-space macro
2102 .\" NS   set current space string to hard (unpaddable) space.
2103 .\" NS
2104 .\" NS modifies:
2105 .\" NS   doc-saved-space
2106 .\" NS   doc-space
2108 .de doc-set-hard-space
2109 .  ie "\*[doc-space]"" \
2110 .    ds doc-saved-space "\*[doc-hard-space]
2111 .  el \
2112 .    ds doc-space "\*[doc-hard-space]
2116 .\" NS doc-set-soft-space macro
2117 .\" NS   set current space string to soft space
2118 .\" NS
2119 .\" NS modifies:
2120 .\" NS   doc-saved-space
2121 .\" NS   doc-space
2123 .de doc-set-soft-space
2124 .  ie "\*[doc-space]"" \
2125 .    ds doc-saved-space "\*[doc-soft-space]
2126 .  el \
2127 .    ds doc-space "\*[doc-soft-space]
2131 .\" NS doc-space-mode global register (bool)
2132 .\" NS   default is one (space mode on)
2134 .nr doc-space-mode 1
2137 .\" NS doc-saved-space global string
2138 .\" NS   saved value of `doc-space'
2140 .ds doc-saved-space "\*[doc-space]
2143 .\" NS doc-have-space global register (bool)
2144 .\" NS   set if last command was horizontal space
2146 .nr doc-have-space 0
2149 .\" NS Sm user macro
2150 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2151 .\" NS
2152 .\" NS   without argument, toggle space mode
2153 .\" NS
2154 .\" NS modifies:
2155 .\" NS   doc-arg-limit
2156 .\" NS   doc-arg-ptr
2157 .\" NS   doc-argXXX
2158 .\" NS   doc-macro-name
2159 .\" NS   doc-num-args
2160 .\" NS   doc-saved-space
2161 .\" NS   doc-space
2162 .\" NS   doc-space-mode
2163 .\" NS   doc-spaceXXX
2164 .\" NS
2165 .\" NS local variables:
2166 .\" NS   doc-reg-Sm
2167 .\" NS
2168 .\" NS width register `Sm' set in doc-common
2170 .de Sm
2171 .  ie \n[doc-have-space] \
2172 .    nr doc-reg-Sm 0
2173 .  el \
2174 .    nr doc-reg-Sm 1
2176 .  if !\n[doc-arg-limit] \{\
2177 .    ie \n[.$] \{\
2178 .      ds doc-macro-name Sm
2179 .      doc-parse-args \$@
2180 .    \}
2181 .    el \{\
2182 .      ie \n[doc-space-mode] \
2183 .        nr doc-space-mode 0
2184 .      el \
2185 .        nr doc-space-mode 1
2186 .  \}\}
2188 .  if !\n[doc-arg-limit] \
2189 .    return
2191 .  nr doc-arg-ptr +1
2193 .  \" avoid a warning message in case `Sm' is the last parameter
2194 .  if !d doc-arg\n[doc-arg-ptr] \
2195 .    ds doc-arg\n[doc-arg-ptr]
2197 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2198 .    ds doc-space "\*[doc-saved-space]
2199 .    nr doc-space-mode 1
2200 .  \}
2201 .  el \{\
2202 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2203 .      ds doc-saved-space "\*[doc-space]
2204 .      ds doc-space
2205 .      nr doc-space-mode 0
2206 .    \}
2207 .    el \{\
2208 .      \" no argument for Sm
2209 .      nr doc-arg-ptr -1
2210 .      ie \n[doc-space-mode] \
2211 .        nr doc-space-mode 0
2212 .      el \
2213 .        nr doc-space-mode 1
2214 .  \}\}
2216 .  ie \n[doc-space-mode] \{\
2217 .    \" recompute space vector for remaining arguments
2218 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2219 .    nr doc-arg-limit \n[doc-arg-ptr]
2220 .    if \n[doc-num-args] \
2221 .      doc-parse-space-vector
2223 .    \" finish line only if it is interrupted and `doc-have-space'
2224 .    \" isn't set
2225 .    if \n[doc-reg-Sm] \
2226 .      if \n[.int] \
2227 .        nop \)
2228 .  \}
2229 .  el \{\
2230 .    \" reset remaining space vector elements
2231 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2232 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2233 .      ds doc-space\n[doc-reg-Sm]
2234 .      nr doc-reg-Sm +1
2235 .      \" the body of a `while' request must end with the fitting `\}'!
2236 .    \}
2237 .  \}
2239 .  \" do we have parameters to print?
2240 .  ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2241 .    \" ignore `.Sm on' and `.Sm off' without additional parameters
2242 .    ie (\n[doc-arg-ptr] > 1) \
2243 .      doc-print-and-reset
2244 .    el \
2245 .      doc-reset-args
2246 .  \}
2247 .  el \{\
2248 .    \" skip `Sm' argument
2249 .    nr doc-arg-ptr +1
2250 .    doc-print-recursive
2251 .  \}
2255 .\" NS doc-arg-type immediate register
2256 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2257 .\" NS   punctuation prefix=4)
2259 .nr doc-arg-type 0
2262 .\" NS doc-get-arg-type macro
2263 .\" NS   get argument type
2264 .\" NS
2265 .\" NS   this macro expects the width of the argument in `doc-width'
2266 .\" NS
2267 .\" NS modifies:
2268 .\" NS   doc-arg-type
2270 .de doc-get-arg-type
2271 .  nr doc-arg-type 2
2273 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2274 .    ie (\n[doc-width] == 1) \{\
2275 .      if r doc-punct\$1 \
2276 .        nr doc-arg-type \n[doc-punct\$1]
2277 .    \}
2278 .    el \
2279 .      if r \$1 \
2280 .        if d \$1 \
2281 .          nr doc-arg-type 1
2282 .  \}
2286 .\" NS doc-get-arg-type* macro
2287 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2288 .\" NS
2289 .\" NS   this macro sets the `doc-width' register using the `length' request
2290 .\" NS   to get the number of characters in a string literally
2291 .\" NS
2292 .\" NS modifies:
2293 .\" NS   doc-arg-type
2294 .\" NS   doc-width
2296 .de doc-get-arg-type*
2297 .  nr doc-arg-type 2
2298 .  length doc-width "\*[doc-arg\$1]
2300 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2301 .    ie (\n[doc-width] == 1) \{\
2302 .      if r doc-punct\*[doc-arg\$1] \
2303 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2304 .    \}
2305 .    el \
2306 .      if r \*[doc-arg\$1] \
2307 .        if d \*[doc-arg\$1] \
2308 .          nr doc-arg-type 1
2309 .  \}
2313 .\" NS doc-set-spacing-1 macro
2314 .\" NS   set spacing for macros
2315 .\" NS
2316 .\" NS modifies:
2317 .\" NS   doc-spaceXXX
2318 .\" NS
2319 .\" NS local variables:
2320 .\" NS   doc-reg-dssfm
2321 .\" NS   doc-reg-dssfm1
2323 .de doc-set-spacing-1
2324 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2326 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2327 .  \" argument)
2328 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2329 .    if \n[doc-arg-limit] \{\
2330 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2331 .      ds doc-space\n[doc-reg-dssfm]
2332 .    \}
2333 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2334 .  \}
2335 .  el \{\
2336 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2337 .    \" argument)
2338 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2339 .      if \n[doc-arg-limit] \{\
2340 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2341 .        ds doc-space\n[doc-reg-dssfm]
2342 .      \}
2343 .      ds doc-space\n[doc-arg-limit]
2344 .    \}
2345 .    el \
2346 .      ds doc-space\n[doc-arg-limit]
2347 .  \}
2351 .\" NS doc-set-spacing-2 macro
2352 .\" NS   set spacing for strings
2353 .\" NS
2354 .\" NS modifies:
2355 .\" NS   doc-spaceXXX
2357 .de doc-set-spacing-2
2358 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2362 .\" NS doc-set-spacing-3 macro
2363 .\" NS   set spacing for punctuation suffixes
2364 .\" NS
2365 .\" NS modifies:
2366 .\" NS   doc-spaceXXX
2367 .\" NS
2368 .\" NS local variables:
2369 .\" NS   doc-reg-dssfps
2371 .de doc-set-spacing-3
2372 .  if \n[doc-arg-limit] \{\
2373 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2374 .    ds doc-space\n[doc-reg-dssfps]
2375 .  \}
2377 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2381 .\" NS doc-set-spacing-4 macro
2382 .\" NS   set spacing for punctuation prefixes
2383 .\" NS
2384 .\" NS modifies:
2385 .\" NS   doc-spaceXXX
2387 .de doc-set-spacing-4
2388 .  ds doc-space\n[doc-arg-limit]
2392 .\" type switches (on current argument doc-arg-ptr)
2395 .\" NS doc-do-1 macro
2396 .\" NS   call request if macro
2398 .de doc-do-1
2399 .  \*[doc-arg\n[doc-arg-ptr]]
2403 .\" NS doc-do-2 macro
2404 .\" NS   call .doc-print-recursive if string
2406 .als doc-do-2 doc-print-recursive
2409 .\" NS doc-do-3 macro
2410 .\" NS   call .doc-print-recursive if punctuation suffix
2412 .als doc-do-3 doc-print-recursive
2415 .\" NS doc-do-4 macro
2416 .\" NS   call .doc-print-recursive if punctuation prefix
2418 .als doc-do-4 doc-print-recursive
2421 .\" NS doc-fontmode-depth global register
2422 .\" NS   font mode level
2424 .nr doc-fontmode-depth 0
2427 .\" NS doc-fontmode-font-stackXXX global register
2428 .\" NS   stack of saved current font values from `Bf' macro
2429 .\" NS
2430 .\" NS limit:
2431 .\" NS   doc-fontmode-depth
2433 .nr doc-fontmode-font-stack0 0
2436 .\" NS doc-fontmode-size-stackXXX global register
2437 .\" NS   stack of saved current size values from `Bf' macro
2438 .\" NS
2439 .\" NS limit:
2440 .\" NS   doc-fontmode-depth
2442 .nr doc-fontmode-size-stack0 0
2445 .\" NS Bf user macro
2446 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2447 .\" NS
2448 .\" NS modifies:
2449 .\" NS   doc-fontmode-depth
2450 .\" NS   doc-fontmode-font-stackXXX
2451 .\" NS   doc-fontmode-size-stackXXX
2452 .\" NS   doc-macro-name
2453 .\" NS
2454 .\" NS width register `Bf' set in doc-common
2456 .de Bf
2457 .  ds doc-macro-name Bf
2459 .  ie \n[.$] \{\
2460 .    nr doc-fontmode-depth +1
2462 .    \" save current font and size
2463 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2464 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2466 .    ie        "\$1"Em" \
2467 .      nop \*[doc-Em-font]\c
2468 .    el \{ .ie "\$1"Li" \
2469 .      nop \*[doc-Li-font]\c
2470 .    el \{ .ie "\$1"Sy" \
2471 .      nop \*[doc-Sy-font]\c
2472 .    el \{ .ie "\$1"-emphasis" \
2473 .      nop \*[doc-Em-font]\c
2474 .    el \{ .ie "\$1"-literal" \
2475 .      nop \*[doc-Li-font]\c
2476 .    el \{ .ie "\$1"-symbolic" \
2477 .      nop \*[doc-Sy-font]\c
2478 .    el \{\
2479 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2480 .      tm1 " (#\n[.c])
2481 .  \}\}\}\}\}\}\}
2482 .  el \
2483 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2487 .\" NS Ef user macro
2488 .\" NS   end font mode
2489 .\" NS
2490 .\" NS modifies:
2491 .\" NS   doc-macro-name
2492 .\" NS
2493 .\" NS width register `Ef' set in doc-common
2495 .de Ef
2496 .  ds doc-macro-name Ef
2498 .  ie \n[doc-fontmode-depth] \{\
2499 .    \" restore saved font and size
2500 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2501 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2503 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2504 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2505 .    nr doc-fontmode-depth -1
2506 .  \}
2507 .  el \
2508 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2512 .\" NS doc-keep-type global register
2513 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2515 .nr doc-keep-type 0
2518 .\" NS Bk user macro
2519 .\" NS   begin keep
2520 .\" NS
2521 .\" NS modifies:
2522 .\" NS   doc-keep-type
2523 .\" NS   doc-macro-name
2524 .\" NS
2525 .\" NS width register `Bk' set in doc-common
2527 .de Bk
2528 .  ds doc-macro-name Bk
2530 .  if \n[doc-keep-type] \
2531 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2533 .  ie        "\$1"-lines" \{\
2534 .    nr doc-keep-type 2
2535 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2536 .  \}
2537 .  el \{ .ie "\$1"-words" \{\
2538 .    nr doc-keep-type 1
2539 .    doc-set-hard-space
2540 .  \}
2541 .  el \{ .ie "\$1"" \{\
2542 .    \" default
2543 .    nr doc-keep-type 1
2544 .    doc-set-hard-space
2545 .  \}
2546 .  el \{\
2547 .    tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2548 .    nr doc-keep-type 3
2549 .  \}\}\}
2551 \#.  nr doc-nesting-level +1
2555 .\" NS Ek user macro
2556 .\" NS   end keep
2557 .\" NS
2558 .\" NS modifies:
2559 .\" NS   doc-keep-type
2560 .\" NS   doc-macro-name
2561 .\" NS
2562 .\" NS width register `Ek' set in doc-common
2564 .de Ek
2565 .  ds doc-macro-name Ek
2567 \#.  nr doc-nesting-level -1
2569 .  ie \n[.$] \
2570 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2571 .  el \{\
2572 .    if !\n[doc-keep-type] \
2573 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2575 .    ie        (\n[doc-keep-type] == 1) \
2576 .      doc-set-soft-space
2577 .    el \{ .if (\n[doc-keep-type] == 2) \
2578 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2579 .  \}\}
2581 .  nr doc-keep-type 0
2583 \#.  if !"\*[doc-out-string]"" \
2584 \#.    doc-print-out-string
2588 .\" NS doc-display-depth global register
2589 .\" NS   display level
2591 .nr doc-display-depth 0
2594 .\" NS doc-is-compact global register (bool)
2595 .\" NS   set if the `compact' keyword is given
2597 .nr doc-is-compact 0
2600 .\" NS doc-display-type-stackXXX global string
2601 .\" NS   the display type stack
2602 .\" NS
2603 .\" NS limit:
2604 .\" NS   doc-display-depth
2606 .ds doc-display-type-stack0
2609 .\" NS doc-display-indent-stackXXX global register
2610 .\" NS   stack of display indentation values
2611 .\" NS
2612 .\" NS limit:
2613 .\" NS   doc-display-depth
2615 .nr doc-display-indent-stack0 0
2618 .\" NS doc-display-ad-stackXXX global register
2619 .\" NS   stack of saved adjustment modes
2620 .\" NS
2621 .\" NS limit:
2622 .\" NS   doc-display-depth
2624 .nr doc-display-ad-stack0 0
2627 .\" NS doc-display-fi-stackXXX global register
2628 .\" NS   stack of saved fill modes
2629 .\" NS
2630 .\" NS limit:
2631 .\" NS   doc-display-depth
2633 .nr doc-display-fi-stack0 0
2636 .\" NS doc-display-ft-stackXXX global register
2637 .\" NS   stack of saved fonts
2638 .\" NS
2639 .\" NS limit:
2640 .\" NS   doc-display-depth
2642 .nr doc-display-ft-stack0 0
2645 .\" NS doc-display-ps-stackXXX global register
2646 .\" NS   stack of saved font sizes
2647 .\" NS
2648 .\" NS limit:
2649 .\" NS   doc-display-depth
2651 .nr doc-display-ps-stack0 0
2654 .\" NS Bd user macro
2655 .\" NS   begin display
2656 .\" NS
2657 .\" NS width register `Bd' set in doc-common
2658 .\" NS
2659 .\" NS modifies:
2660 .\" NS   doc-curr-font
2661 .\" NS   doc-curr-size
2662 .\" NS   doc-display-depth
2663 .\" NS   doc-display-ad-stackXXX
2664 .\" NS   doc-display-fi-stackXXX
2665 .\" NS   doc-display-ft-stackXXX
2666 .\" NS   doc-display-ps-stackXXX
2667 .\" NS   doc-display-file
2668 .\" NS   doc-display-indent-stackXXX
2669 .\" NS   doc-display-type-stackXXX
2670 .\" NS   doc-is-compact
2671 .\" NS   doc-macro-name
2672 .\" NS
2673 .\" NS local variables:
2674 .\" NS   doc-reg-Bd
2676 .de Bd
2677 .  ds doc-macro-name Bd
2679 .  if !\n[.$] \{\
2680 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2681 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2682 .    return
2683 .  \}
2685 .  nr doc-is-compact 0
2686 .  ds doc-display-file
2687 .  nr doc-reg-Bd 1
2688 .  nr doc-display-depth +1
2690 .  \" save current adjustment and fill modes
2691 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2692 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2694 .  ie        "\$1"-literal" \{\
2695 .    ds doc-display-type-stack\n[doc-display-depth] literal
2696 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2697 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2699 .    ie t \
2700 .      ta T 9n
2701 .    el \
2702 .      ta T 8n
2703 .    nf
2704 .  \}
2705 .  el \{ .ie "\$1"-filled" \{\
2706 .    ds doc-display-type-stack\n[doc-display-depth] filled
2707 .    ad b
2708 .    fi
2709 .  \}
2710 .  el \{ .ie "\$1"-ragged" \{\
2711 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2712 .    na
2713 .    fi
2714 .  \}
2715 .  el \{ .ie "\$1"-centered" \{\
2716 .    ds doc-display-type-stack\n[doc-display-depth] centered
2717 .    ad c
2718 .    fi
2719 .  \}
2720 .  el \{ .ie "\$1"-unfilled" \{\
2721 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2722 .    nf
2723 .  \}
2724 .  el \{\
2725 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2726 .    tm1 "              in .Bd macro (#\n[.c])
2727 .    nr doc-reg-Bd 0
2728 .  \}\}\}\}\}
2730 .  \" have we seen an argument?
2731 .  if \n[doc-reg-Bd] \{\
2732 .    shift
2733 .    \" check other arguments
2734 .    if \n[.$] \
2735 .      doc-do-Bd-args \$@
2736 .  \}
2738 .  \" avoid warning about non-existent register
2739 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2740 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2742 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2743 .    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2745 .  if !\n[doc-is-compact] \
2746 .    sp \n[doc-display-vertical]u
2748 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2749 .    if t \
2750 .      nop \*[doc-Li-font]\c
2752 .  if !\n[cR] \
2753 .    ne 2v
2755 .  if !"\*[doc-display-file]"" \
2756 .    so \*[doc-display-file]
2758 .  nr doc-is-compact 0
2759 .  ds doc-display-file
2763 .\" NS doc-do-Bd-args macro
2764 .\" NS   resolve remaining .Bd arguments
2765 .\" NS
2766 .\" NS modifies:
2767 .\" NS   doc-display-file
2768 .\" NS   doc-display-indent-stackXXX
2769 .\" NS   doc-is-compact
2770 .\" NS
2771 .\" NS local variables:
2772 .\" NS   doc-reg-ddBa
2773 .\" NS   doc-reg-ddBa1
2774 .\" NS   doc-reg-ddBa2
2775 .\" NS   doc-reg-ddBa3
2776 .\" NS   doc-reg-ddBa4
2777 .\" NS   doc-str-ddBa
2779 .de doc-do-Bd-args
2780 .  nr doc-reg-ddBa 1
2782 .  ie        "\$1"-offset" \{\
2783 .    nr doc-reg-ddBa 2
2785 .    ie        "\$2"left" \
2786 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2787 .    el \{ .ie "\$2"right" \
2788 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2789 .    el \{ .ie "\$2"center" \
2790 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2791 .    el \{ .ie "\$2"indent" \
2792 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2793 .    el \{ .ie "\$2"indent-two" \
2794 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2795 .    el \
2796 .      nr doc-reg-ddBa 1
2797 .    \}\}\}\}
2799 .    \" not a known keyword
2800 .    if (\n[doc-reg-ddBa] == 1) \{\
2801 .      nr doc-reg-ddBa 2
2803 .      nr doc-reg-ddBa1 0
2804 .      if \B\a(\$2)\a \{\
2805 .        \" disable warnings related to scaling indicators (32)
2806 .        nr doc-reg-ddBa2 \n[.warn]
2807 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2809 .        \" values without a scaling indicator are taken as strings;
2810 .        \" we test whether the parameter string with and without the last
2811 .        \" character yields identical numerical results (ignoring the
2812 .        \" scaling indicator)
2813 .        ds doc-str-ddBa "\$2
2814 .        substring doc-str-ddBa 0 -2
2815 .        if \B\a(\*[doc-str-ddBa])\a \{\
2816 .          nr doc-reg-ddBa3 (;(\$2))
2817 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2818 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2819 .            nr doc-reg-ddBa1 1
2820 .        \}
2822 .        \" enable all warnings again
2823 .        warn \n[doc-reg-ddBa2]
2824 .      \}
2826 .      ie \n[doc-reg-ddBa1] \
2827 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2828 .      el \{\
2829 .        doc-get-width "\$2"
2830 .        ie (\n[doc-width] <= 3) \{\
2831 .          \" if the offset parameter is a macro, use the macro's
2832 .          \" width as specified in doc-common
2833 .          doc-get-arg-type "\$2"
2834 .          ie (\n[doc-arg-type] == 1) \
2835 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2836 .          el \
2837 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2838 .        \}
2839 .        el \
2840 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2841 .    \}\}
2842 .  \}
2843 .  el \{ .ie "\$1"-compact" \
2844 .    nr doc-is-compact 1
2845 .  el \{ .ie "\$1"-file" \{\
2846 .    ie !"\$2"" \{\
2847 .      ds doc-display-file "\$2
2848 .      nr doc-reg-ddBa 2
2849 .    \}
2850 .    el \
2851 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2852 .  \}
2853 .  el \
2854 .      tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2855 .  \}\}
2857 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2858 .    shift \n[doc-reg-ddBa]
2859 .    doc-do-Bd-args \$@
2860 .  \}
2864 .\" NS Ed user macro
2865 .\" NS   end display
2866 .\" NS
2867 .\" NS modifies:
2868 .\" NS   doc-display-depth
2869 .\" NS   doc-display-indent-stackXXX
2870 .\" NS   doc-display-type-stackXXX
2871 .\" NS   doc-macro-name
2872 .\" NS
2873 .\" NS width register `Ed' set in doc-common
2875 .de Ed
2876 .  ds doc-macro-name Ed
2878 .  br
2880 .  if !\n[doc-display-depth] \{\
2881 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2882 .    nr doc-display-depth 1
2883 .  \}
2885 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2886 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2887 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2888 .  \}
2890 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2892 .  \" restore saved adjustment and fill modes
2893 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2894 .    fi
2895 .  el \
2896 .    nf
2897 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2899 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2900 .  ds doc-display-type-stack\n[doc-display-depth]
2901 .  nr doc-display-depth -1
2905 .\" NS doc-list-type-stackXXX global string
2906 .\" NS   stack of list types
2907 .\" NS
2908 .\" NS limit:
2909 .\" NS   doc-list-depth
2911 .ds doc-list-type-stack1
2914 .\" NS doc-list-indent-stackXXX global register
2915 .\" NS   stack of list indentation values
2916 .\" NS
2917 .\" NS limit:
2918 .\" NS   doc-list-depth
2920 .nr doc-list-indent-stack1 0
2923 .\" NS doc-list-have-indent-stackXXX global register (bool)
2924 .\" NS   an indentation value is active
2925 .\" NS
2926 .\" NS limit:
2927 .\" NS   doc-list-depth
2929 .nr doc-list-have-indent-stack1 0
2932 .\" NS Bl user macro
2933 .\" NS   begin list
2934 .\" NS
2935 .\" NS width register `Bl' set in doc-common
2936 .\" NS
2937 .\" NS modifies:
2938 .\" NS   doc-arg-ptr
2939 .\" NS   doc-argXXX
2940 .\" NS   doc-list-depth
2941 .\" NS   doc-list-have-indent-stackXXX
2942 .\" NS   doc-list-indent-stackXXX
2943 .\" NS   doc-list-type-stackXXX
2944 .\" NS   doc-macro-name
2945 .\" NS   doc-num-args
2946 .\" NS   doc-num-columns
2947 .\" NS
2948 .\" NS local variables:
2949 .\" NS   doc-reg-Bl
2951 .de Bl
2952 .  if !\n[.$] \{\
2953 .    doc-Bl-usage
2954 .    return
2955 .  \}
2957 .  ds doc-macro-name Bl
2958 .  nr doc-list-depth +1
2959 .  nr doc-arg-ptr 1
2961 .  ie        "\$1"-hang" \{\
2962 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2963 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2964 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2965 .  \}
2966 .  el \{ .ie "\$1"-tag" \{\
2967 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2968 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2969 .  \}
2970 .  el \{ .ie "\$1"-item" \{\
2971 .    ds doc-list-type-stack\n[doc-list-depth] item-list
2972 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2973 .  \}
2974 .  el \{ .ie "\$1"-enum" \{\
2975 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
2976 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
2977 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2978 .  \}
2979 .  el \{ .ie "\$1"-bullet" \{\
2980 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
2981 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2982 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2983 .  \}
2984 .  el \{ .ie "\$1"-dash" \{\
2985 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2986 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2987 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2988 .  \}
2989 .  el \{ .ie "\$1"-hyphen" \{\
2990 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2991 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2992 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2993 .  \}
2994 .  el \{ .ie "\$1"-inset" \{\
2995 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
2996 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2997 .  \}
2998 .  el \{ .ie "\$1"-diag" \{\
2999 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
3000 .  \}
3001 .  el \{ .ie "\$1"-ohang" \{\
3002 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
3003 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3004 .  \}
3005 .  el \{ .ie "\$1"-column" \{\
3006 .    ds doc-list-type-stack\n[doc-list-depth] column-list
3007 .    linetabs 1
3008 .  \}
3009 .  el \{\
3010 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3011 .    tm1 "              in .Bl macro
3012 .    tm
3013 .    nr doc-arg-ptr 0
3014 .  \}\}\}\}\}\}\}\}\}\}\}
3016 .  \" we have seen a list type
3017 .  if !\n[doc-arg-ptr] \{\
3018 .    doc-Bl-usage
3019 .    doc-reset-args
3020 .    nr doc-list-depth -1
3021 .    return
3022 .  \}
3024 .  shift
3026 .  \" fill argument vector
3027 .  nr doc-reg-Bl 1
3028 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
3029 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3030 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
3031 .    nr doc-type\n[doc-reg-Bl] 0
3032 .    ds doc-space\n[doc-reg-Bl]
3033 .    nr doc-reg-Bl +1
3034 .  \}
3036 .  doc-increment-list-stack
3038 .  if \n[.$] \{\
3039 .    nr doc-arg-limit \n[.$]
3040 .    nr doc-arg-ptr 0
3041 .    doc-do-Bl-args
3043 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3045 .    \" initialize column list
3046 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3047 .      doc-set-column-tab \n[doc-num-columns]
3048 '      in -\n[doc-column-indent-width]u
3049 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3050 .        sp \n[doc-display-vertical]u
3052 .      nf
3053 .      nr doc-num-columns 0
3054 .  \}\}
3056 .  doc-reset-args
3060 .\" NS doc-Bl-usage macro
3062 .de doc-Bl-usage
3063 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3064 .  tm1 "             [-width <string>]
3065 .  tm1 "             [-offset <string>] [-compact]
3066 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3067 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3068 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3072 .\" NS doc-do-Bl-args macro
3073 .\" NS   resolve remaining .Bl arguments
3074 .\" NS
3075 .\" NS modifies:
3076 .\" NS   doc-arg-ptr
3077 .\" NS   doc-argXXX
3078 .\" NS   doc-compact-list-stackXXX
3079 .\" NS   doc-list-indent-stackXXX
3080 .\" NS   doc-list-offset-stackXXX
3081 .\" NS   doc-num-columns
3082 .\" NS   doc-tag-prefix-stackXXX
3083 .\" NS   doc-tag-width-stackXXX
3084 .\" NS
3085 .\" NS local variables:
3086 .\" NS   doc-box-dBla
3087 .\" NS   doc-env-dBla
3088 .\" NS   doc-reg-dBla
3089 .\" NS   doc-reg-dBla1
3090 .\" NS   doc-reg-dBla2
3091 .\" NS   doc-reg-dBla3
3092 .\" NS   doc-reg-dBla4
3093 .\" NS   doc-str-dBla
3094 .\" NS   doc-str-dBla1
3096 .de doc-do-Bl-args
3097 .  nr doc-arg-ptr +1
3099 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3100 .    return
3102 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3103 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3104 .  if !d doc-arg\n[doc-reg-dBla] \
3105 .    ds doc-arg\n[doc-reg-dBla]
3107 .  nr doc-reg-dBla 1
3109 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3110 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3112 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3113 .    ie (\n[doc-list-depth] > 1) \{\
3114 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3115 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3116 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3117 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3118 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3119 .    \}
3120 .    el \
3121 .      tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3122 .  \}
3124 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3125 .    nr doc-arg-ptr +1
3126 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3128 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3129 .    substring doc-str-dBla 0 0
3130 .    ie \a.\a\*[doc-str-dBla]\a \{\
3131 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3132 .      substring doc-str-dBla 1
3133 .      doc-first-parameter \*[doc-str-dBla]
3134 .      doc-get-width "\*[doc-str-dfp]
3135 .      doc-get-arg-type "\*[doc-str-dfp]
3136 .      ie (\n[doc-arg-type] == 1) \
3137 .        nr doc-reg-dBla1 1
3138 .      el \
3139 .        nr doc-reg-dBla1 0
3140 .    \}
3141 .    el \
3142 .      nr doc-reg-dBla1 0
3143 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3145 .    ie \n[doc-reg-dBla1] \{\
3146 .      \" execute string in a box to get the width of the diversion
3147 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3148 .      doc-save-global-vars
3149 .      doc-reset-args
3150 .      box doc-box-dBla
3151 .      ev doc-env-dBla
3152 .      evc 0
3153 .      in 0
3154 .      nf
3155 .      nop \*[doc-str-dBla]
3156 .      br
3157 .      ev
3158 .      box
3159 .      doc-restore-global-vars
3160 .      doc-get-width \h'\n[dl]u'
3161 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3162 .    \}
3163 .    el \{\
3164 .      \" test whether argument is a valid numeric expression
3165 .      nr doc-reg-dBla1 0
3166 .      if \B\a(\*[doc-str-dBla])\a \{\
3167 .        \" disable warnings related to scaling indicators (32)
3168 .        nr doc-reg-dBla2 \n[.warn]
3169 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3171 .        \" values without a scaling indicator are taken as strings;
3172 .        \" we test whether the parameter string with and without the last
3173 .        \" character yields identical numerical results (ignoring the
3174 .        \" scaling indicator)
3175 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3176 .        substring doc-str-dBla1 0 -2
3177 .        if \B\a(\*[doc-str-dBla1])\a \{\
3178 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3179 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3180 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3181 .            nr doc-reg-dBla1 1
3182 .        \}
3184 .        \" enable all warnings again
3185 .        warn \n[doc-reg-dBla2]
3186 .      \}
3188 .      ie \n[doc-reg-dBla1] \
3189 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3190 .      el \{\
3191 .        doc-get-arg-width \n[doc-arg-ptr]
3192 .        ie (\n[doc-width] == 2) \{\
3193 .          \" if the width parameter is a macro, use the macro's
3194 .          \" width as specified in doc-common
3195 .          doc-get-arg-type \*[doc-str-dBla]
3196 .          ie (\n[doc-arg-type] == 1) \
3197 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3198 .          el \
3199 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3200 .        \}
3201 .        el \
3202 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3203 .  \}\}\}
3205 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3206 .    nr doc-arg-ptr +1
3208 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3209 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3210 .    el \{\
3211 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3212 .      nr doc-reg-dBla1 0
3213 .      if \B\a(\*[doc-str-dBla])\a \{\
3214 .        nr doc-reg-dBla2 \n[.warn]
3215 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3217 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3218 .        substring doc-str-dBla1 0 -2
3219 .        if \B\a(\*[doc-str-dBla1])\a \{\
3220 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3221 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3222 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3223 .            nr doc-reg-dBla1 1
3224 .        \}
3226 .        warn \n[doc-reg-dBla2]
3227 .      \}
3229 .      ie \n[doc-reg-dBla1] \
3230 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3231 .      el \{\
3232 .        doc-get-arg-width \n[doc-arg-ptr]
3233 .        ie (\n[doc-width] <= 3) \{\
3234 .          \" if the offset parameter is a macro, use the macro's
3235 .          \" width as specified in doc-common
3236 .          doc-get-arg-type \*[doc-str-dBla]
3237 .          ie (\n[doc-arg-type] == 1) \
3238 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3239 .          el \
3240 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3241 .        \}
3242 .        el \
3243 .          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3244 .  \}\}\}
3245 .  el \
3246 .    nr doc-reg-dBla 0
3247 .  \}\}\}
3249 .  \" not a known keyword, so it specifies the width of the next column
3250 .  \" (if it is a column list)
3251 .  if !\n[doc-reg-dBla] \{\
3252 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3253 .      nr doc-num-columns +1
3254 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3255 .      substring doc-str-dBla 0 0
3256 .      ie \a.\a\*[doc-str-dBla]\a \{\
3257 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3258 .        substring doc-str-dBla 1
3259 .        doc-first-parameter \*[doc-str-dBla]
3260 .        doc-get-width "\*[doc-str-dfp]
3261 .        doc-get-arg-type "\*[doc-str-dfp]
3262 .        ie (\n[doc-arg-type] == 1) \
3263 .          nr doc-reg-dBla1 1
3264 .        el \
3265 .          nr doc-reg-dBla1 0
3266 .      \}
3267 .      el \
3268 .        nr doc-reg-dBla1 0
3269 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3271 .      ie \n[doc-reg-dBla1] \{\
3272 .        \" execute string in a box to get the width of the diversion
3273 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3274 .        doc-save-global-vars
3275 .        doc-reset-args
3276 .        box doc-box-dBla
3277 .        ev doc-env-dBla
3278 .        evc 0
3279 .        in 0
3280 .        nf
3281 .        nop \*[doc-str-dBla]
3282 .        br
3283 .        ev
3284 .        box
3285 .        doc-restore-global-vars
3286 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3287 .      \}
3288 .      el \
3289 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3290 .    \}
3291 .    el \{\
3292 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3293 .      tm1 " in .Bl macro (#\n[.c])
3294 .  \}\}
3296 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3297 .    doc-do-Bl-args
3301 .\" NS doc-save-global-vars macro
3302 .\" NS   save all global variables
3303 .\" NS
3304 .\" NS local variables:
3305 .\" NS   doc-reg-dsgv
3307 .de doc-save-global-vars
3308 .  ds doc-macro-name-saved "\*[doc-macro-name]
3309 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3310 .  nr doc-num-args-saved \n[doc-num-args]
3311 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3313 .  nr doc-reg-dsgv 1
3314 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3315 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3316 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3317 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3318 .    nr doc-reg-dsgv +1
3319 .  \}
3321 .  nr doc-curr-font-saved \n[doc-curr-font]
3322 .  nr doc-curr-size-saved \n[doc-curr-size]
3323 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3324 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3325 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3326 .  nr doc-have-decl-saved \n[doc-have-decl]
3327 .  nr doc-have-var-saved \n[doc-have-var]
3328 .  ds doc-command-name-saved "\*[doc-command-name]
3329 .  ds doc-quote-left-saved "\*[doc-quote-left]
3330 .  ds doc-quote-right-saved "\*[doc-quote-right]
3331 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3332 .  nr doc-in-list-saved \n[doc-in-list]
3333 .  ds doc-space-saved "\*[doc-space]
3334 .  ds doc-saved-space-saved "\*[doc-saved-space]
3335 .  nr doc-space-mode-saved \n[doc-space-mode]
3336 .  nr doc-have-space-saved \n[doc-have-space]
3337 .  nr doc-have-slot-saved \n[doc-have-slot]
3338 .  nr doc-keep-type-saved \n[doc-keep-type]
3339 .  nr doc-display-depth-saved \n[doc-display-depth]
3340 .  nr doc-is-compact-saved \n[doc-is-compact]
3342 .  nr doc-reg-dsgv 0
3343 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3344 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3345 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3346 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3347 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3348 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3349 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3350 .    nr doc-reg-dsgv +1
3351 .  \}
3353 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3355 .  nr doc-reg-dsgv 1
3356 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3357 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3358 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3359 .    nr doc-reg-dsgv +1
3360 .  \}
3362 .  nr doc-list-depth-saved \n[doc-list-depth]
3364 .  nr doc-reg-dsgv 1
3365 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3366 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3367 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3368 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3369 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3370 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3371 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3372 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3373 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3374 .    nr doc-reg-dsgv +1
3375 .  \}
3377 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3378 .  nr doc-curr-type-saved \n[doc-curr-type]
3379 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3380 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3381 .  nr doc-num-columns-saved \n[doc-num-columns]
3382 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3383 .  nr doc-is-func-saved \n[doc-is-func]
3384 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3385 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3386 .  ds doc-func-arg-saved "\*[doc-func-arg]
3387 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3388 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3389 .  nr doc-have-func-saved \n[doc-have-func]
3390 .  nr doc-is-reference-saved \n[doc-is-reference]
3391 .  nr doc-reference-count-saved \n[doc-reference-count]
3392 .  nr doc-author-count-saved \n[doc-author-count]
3394 .  nr doc-reg-dsgv 0
3395 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3396 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3397 .    nr doc-reg-dsgv +1
3398 .  \}
3400 .  nr doc-book-count-saved \n[doc-book-count]
3401 .  ds doc-book-name-saved "\*[doc-book-name]
3402 .  nr doc-date-count-saved \n[doc-date-count]
3403 .  ds doc-date-saved "\*[doc-date]
3404 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3405 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3406 .  nr doc-journal-count-saved \n[doc-journal-count]
3407 .  ds doc-journal-name-saved "\*[doc-journal-name]
3408 .  nr doc-issue-count-saved \n[doc-issue-count]
3409 .  ds doc-issue-name-saved "\*[doc-issue-name]
3410 .  nr doc-optional-count-saved \n[doc-optional-count]
3411 .  ds doc-optional-string-saved "\*[doc-optional-string]
3412 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3413 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3414 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3415 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3416 .  nr doc-report-count-saved \n[doc-report-count]
3417 .  ds doc-report-name-saved "\*[doc-report-name]
3418 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3419 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3420 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3421 .  nr doc-volume-count-saved \n[doc-volume-count]
3422 .  ds doc-volume-name-saved "\*[doc-volume-name]
3423 .  nr doc-have-author-saved \n[doc-have-author]
3425 .  ds doc-document-title-saved "\*[doc-document-title]
3426 .  ds doc-volume-saved "\*[doc-volume]
3427 .  ds doc-section-saved "\*[doc-section]
3428 .  ds doc-operating-system-saved "\*[doc-operating-system]
3429 .  ds doc-date-string-saved "\*[doc-date-string]
3430 .  nr doc-header-space-saved \n[doc-header-space]
3431 .  nr doc-footer-space-saved \n[doc-footer-space]
3432 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3433 .  ds doc-header-string-saved "\*[doc-header-string]
3434 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3435 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3436 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3440 .\" NS doc-restore-global-vars macro
3441 .\" NS   restore all global variables
3442 .\" NS
3443 .\" NS local variables:
3444 .\" NS   doc-reg-drgv
3446 .de doc-restore-global-vars
3447 .  ds doc-macro-name "\*[doc-macro-name-saved]
3448 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3449 .  nr doc-num-args \n[doc-num-args-saved]
3450 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3452 .  nr doc-reg-drgv 1
3453 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3454 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3455 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3456 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3457 .    nr doc-reg-drgv +1
3458 .  \}
3460 .  nr doc-curr-font \n[doc-curr-font-saved]
3461 .  nr doc-curr-size \n[doc-curr-size-saved]
3462 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3463 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3464 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3465 .  nr doc-have-decl \n[doc-have-decl-saved]
3466 .  nr doc-have-var \n[doc-have-var-saved]
3467 .  ds doc-command-name "\*[doc-command-name-saved]
3468 .  ds doc-quote-left "\*[doc-quote-left-saved]
3469 .  ds doc-quote-right "\*[doc-quote-right-saved]
3470 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3471 .  nr doc-in-list \n[doc-in-list-saved]
3472 .  ds doc-space "\*[doc-space-saved]
3473 .  ds doc-saved-space "\*[doc-saved-space-saved]
3474 .  nr doc-space-mode \n[doc-space-mode-saved]
3475 .  nr doc-have-space \n[doc-have-space-saved]
3476 .  nr doc-have-slot \n[doc-have-slot-saved]
3477 .  nr doc-keep-type \n[doc-keep-type-saved]
3478 .  nr doc-display-depth \n[doc-display-depth-saved]
3479 .  nr doc-is-compact \n[doc-is-compact-saved]
3481 .  nr doc-reg-drgv 0
3482 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3483 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3484 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3485 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3486 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3487 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3488 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3489 .    nr doc-reg-drgv +1
3490 .  \}
3492 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3494 .  nr doc-reg-drgv 1
3495 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3496 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3497 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3498 .    nr doc-reg-drgv +1
3499 .  \}
3501 .  nr doc-list-depth \n[doc-list-depth-saved]
3503 .  nr doc-reg-drgv 1
3504 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3505 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3506 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3507 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3508 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3509 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3510 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3511 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3512 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3513 .    nr doc-reg-drgv +1
3514 .  \}
3516 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3517 .  nr doc-curr-type \n[doc-curr-type-saved]
3518 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3519 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3520 .  nr doc-num-columns \n[doc-num-columns-saved]
3521 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3522 .  nr doc-is-func \n[doc-is-func-saved]
3523 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3524 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3525 .  ds doc-func-arg "\*[doc-func-arg-saved]
3526 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3527 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3528 .  nr doc-have-func \n[doc-have-func-saved]
3529 .  nr doc-is-reference \n[doc-is-reference-saved]
3530 .  nr doc-reference-count \n[doc-reference-count-saved]
3531 .  nr doc-author-count \n[doc-author-count-saved]
3533 .  nr doc-reg-drgv 0
3534 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3535 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3536 .    nr doc-reg-drgv +1
3537 .  \}
3539 .  nr doc-book-count \n[doc-book-count-saved]
3540 .  ds doc-book-name "\*[doc-book-name-saved]
3541 .  nr doc-date-count \n[doc-date-count-saved]
3542 .  ds doc-date "\*[doc-date-saved]
3543 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3544 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3545 .  nr doc-journal-count \n[doc-journal-count-saved]
3546 .  ds doc-journal-name "\*[doc-journal-name-saved]
3547 .  nr doc-issue-count \n[doc-issue-count-saved]
3548 .  ds doc-issue-name "\*[doc-issue-name-saved]
3549 .  nr doc-optional-count \n[doc-optional-count-saved]
3550 .  ds doc-optional-string "\*[doc-optional-string-saved]
3551 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3552 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3553 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3554 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3555 .  nr doc-report-count \n[doc-report-count-saved]
3556 .  ds doc-report-name "\*[doc-report-name-saved]
3557 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3558 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3559 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3560 .  nr doc-volume-count \n[doc-volume-count-saved]
3561 .  ds doc-volume-name "\*[doc-volume-name-saved]
3562 .  nr doc-have-author \n[doc-have-author-saved]
3564 .  ds doc-document-title "\*[doc-document-title-saved]
3565 .  ds doc-volume "\*[doc-volume-saved]
3566 .  ds doc-section "\*[doc-section-saved]
3567 .  ds doc-operating-system "\*[doc-operating-system-saved]
3568 .  ds doc-date-string "\*[doc-date-string-saved]
3569 .  nr doc-header-space \n[doc-header-space-saved]
3570 .  nr doc-footer-space \n[doc-footer-space-saved]
3571 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3572 .  ds doc-header-string "\*[doc-header-string-saved]
3573 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3574 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3575 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3579 .\" NS El user macro
3580 .\" NS   end list
3581 .\" NS
3582 .\" NS modifies:
3583 .\" NS   doc-list-depth
3584 .\" NS   doc-macro-name
3585 .\" NS
3586 .\" NS local variables:
3587 .\" NS   doc-str-El
3588 .\" NS
3589 .\" NS width register `El' set in doc-common
3591 .de El
3592 .  if \n[.$] \{\
3593 .    tm Usage: .El (does not take arguments) (#\n[.c])
3594 .    return
3595 .  \}
3597 .  ds doc-macro-name El
3598 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3600 .  ie        "\*[doc-str-El]"diag-list" \
3601 .    doc-end-list 0
3602 .  el \{ .ie "\*[doc-str-El]"column-list" \
3603 .    doc-end-column-list
3604 .  el \{ .ie "\*[doc-str-El]"item-list" \
3605 .    doc-end-list 0
3606 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3607 .    doc-end-list 0
3608 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3609 .    doc-end-list 0
3610 .  el \
3611 .    doc-end-list 1
3612 .  \}\}\}\}
3614 .  br
3618 .\" NS doc-saved-Pa-font global string
3619 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3620 .\" NS   nroff)
3622 .ds doc-saved-Pa-font
3625 .\" NS doc-curr-type global register
3626 .\" NS   current argument type
3628 .nr doc-curr-type 0
3631 .\" NS doc-curr-arg global string
3632 .\" NS   current argument
3634 .ds doc-curr-arg
3637 .\" NS doc-item-boxXXX global box
3638 .\" NS   item boxes associated list depth
3639 .\" NS
3640 .\" NS limit:
3641 .\" NS   doc-list-depth
3644 .\" NS It user macro
3645 .\" NS   list item
3646 .\" NS
3647 .\" NS modifies:
3648 .\" NS   doc-arg-ptr
3649 .\" NS   doc-argXXX
3650 .\" NS   doc-curr-arg
3651 .\" NS   doc-curr-type
3652 .\" NS   doc-in-list
3653 .\" NS   doc-macro-name
3654 .\" NS   doc-num-args
3655 .\" NS   doc-saved-Pa-font
3656 .\" NS
3657 .\" NS local variables:
3658 .\" NS   doc-reg-It
3659 .\" NS   doc-str-It
3660 .\" NS   doc-XXX-list-type
3661 .\" NS
3662 .\" NS width register `It' set in doc-common
3664 .nr doc-bullet-list-type 1
3665 .nr doc-column-list-type 0
3666 .nr doc-dash-list-type 1
3667 .nr doc-diag-list-type 0
3668 .nr doc-enum-list-type 1
3669 .nr doc-hang-list-type 2
3670 .nr doc-inset-list-type 2
3671 .nr doc-item-list-type 1
3672 .nr doc-ohang-list-type 2
3673 .nr doc-tag-list-type 2
3675 .de It
3676 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3678 .  if "\*[doc-str-It]"" \
3679 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3681 .  if \n[doc-nesting-level] \{\
3682 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3683 .    tm1 " (#\n[.c])
3684 .  \}
3686 .  br
3687 .  if !\n[cR] \
3688 .    ne 3v
3690 .  if \n[.$] \{\
3691 .    ds doc-macro-name It
3693 .    \" fill argument vector
3694 .    nr doc-reg-It 1
3695 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3696 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3697 .      nr doc-reg-It +1
3698 .    \}
3700 .    nr doc-num-args \n[.$]
3701 .    nr doc-arg-ptr 0
3702 .  \}
3704 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3706 .  if \n[doc-reg-It] \{\
3707 .    \" start item box
3708 .    box doc-item-box\n[doc-list-depth]
3709 .    ev doc-item-env\n[doc-list-depth]
3710 .    evc 0
3711 .    in 0
3712 .    nf
3713 .  \}
3715 .  ie (\n[doc-reg-It] == 1) \{\
3716 .    if \n[.$] \{\
3717 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3718 .      tm1 "              don't take arguments (#\n[.c])
3719 .  \}\}
3720 .  el \{\
3721 .    ie \n[.$] \{\
3722 .      if (\n[doc-reg-It] == 2) \{\
3723 .        \" handle list types with arguments
3724 .        doc-parse-arg-vector
3726 .        nr doc-in-list 1
3727 .        nr doc-arg-ptr 1
3728 .        nr doc-curr-type \n[doc-type1]
3729 .        ds doc-curr-arg "\*[doc-arg1]
3731 .        if \n[doc-in-files-section] \{\
3732 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3733 .          if n \
3734 .            ds doc-Pa-font "\*[doc-No-font]
3735 .        \}
3737 .        ie (\n[doc-type1] == 1) \
3738 .          \*[doc-arg1]
3739 .        el \{\
3740 .          nr doc-arg-ptr 1
3741 .          doc-print-recursive
3742 .    \}\}\}
3743 .    el \{\
3744 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3745 .      tm1 "              require arguments (#\n[.c])
3746 .    \}
3747 .  \}
3749 .  \" the previous call of `.doc-print-recursive' can contain calls to
3750 .  \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3751 .  if !\n[doc-nesting-level] \
3752 .    doc-\*[doc-str-It]
3756 .\" NS doc-inset-list macro
3757 .\" NS   .It item of list-type inset
3758 .\" NS
3759 .\" NS modifies:
3760 .\" NS   doc-in-list
3762 .de doc-inset-list
3763 .  \" finish item box
3764 .  br
3765 .  ev
3766 .  box
3767 .  unformat doc-item-box\n[doc-list-depth]
3769 .  doc-set-vertical-and-indent 0
3770 .  br
3772 .  nh
3773 .  doc-item-box\n[doc-list-depth]
3775 .  if \n[doc-in-files-section] \
3776 .    if n \
3777 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3779 .  nr doc-in-list 0
3780 .  doc-reset-args
3784 .\" NS doc-hang-list macro
3785 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3786 .\" NS
3787 .\" NS modifies:
3788 .\" NS   doc-have-space
3789 .\" NS   doc-in-list
3790 .\" NS
3791 .\" NS local variables:
3792 .\" NS   doc-reg-dhl
3793 .\" NS   doc-reg-dhl1
3795 .de doc-hang-list
3796 .  \" finish item box
3797 .  br
3798 .  ev
3799 .  box
3800 .  unformat doc-item-box\n[doc-list-depth]
3802 .  doc-set-vertical-and-indent 1
3803 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3804 .  ti -\n[doc-reg-dhl]u
3806 .  nh
3807 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3808 .    doc-item-box\n[doc-list-depth]
3809 .  el \{\
3810 .    chop doc-item-box\n[doc-list-depth]
3811 .    nr doc-reg-dhl1 \n[.k]u
3812 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3813 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3814 .    nr doc-have-space 1
3815 .  \}
3817 .  if \n[doc-in-files-section] \
3818 .    if n \
3819 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3821 .  nr doc-in-list 0
3822 .  doc-reset-args
3826 .\" NS doc-ohang-list macro
3827 .\" NS   .It item of list-type overhanging tag
3828 .\" NS
3829 .\" NS modifies:
3830 .\" NS   doc-in-list
3832 .de doc-ohang-list
3833 .  \" finish item box
3834 .  br
3835 .  ev
3836 .  box
3837 .  unformat doc-item-box\n[doc-list-depth]
3839 .  doc-set-vertical-and-indent 0
3840 .  nh
3841 .  doc-item-box\n[doc-list-depth]
3842 .  br
3844 .  if \n[doc-in-files-section] \
3845 .    if n \
3846 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3848 .  nr doc-in-list 0
3849 .  doc-reset-args
3853 .\" NS doc-item-list macro
3854 .\" NS   .It item of list-type [empty tag]
3856 .de doc-item-list
3857 .  \" finish (dummy) item box
3858 .  br
3859 .  ev
3860 .  box
3862 .  doc-set-vertical-and-indent 0
3863 .  br
3865 .  doc-reset-args
3869 .\" NS doc-enum-list-count-stackXXX global register
3870 .\" NS   stack of current enum count values
3871 .\" NS
3872 .\" NS limit:
3873 .\" NS   doc-list-depth
3875 .nr doc-enum-list-count-stack1 0
3878 .\" NS doc-enum-list macro
3879 .\" NS   enumerated list
3880 .\" NS
3881 .\" NS modifies:
3882 .\" NS   doc-enum-list-count-stackXXX
3883 .\" NS   doc-in-list
3885 .de doc-enum-list
3886 .  nr doc-in-list 1
3887 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3888 \# XXX
3889 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3890 \#.rj
3891 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3892 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3893 .  doc-do-list
3897 .\" NS doc-bullet-list macro
3898 .\" NS   bullet paragraph list
3899 .\" NS
3900 .\" NS modifies:
3901 .\" NS   doc-in-list
3903 .de doc-bullet-list
3904 .  nr doc-in-list 1
3905 .  nop \)\*[doc-Sy-font]\[bu]\f[]
3906 .  doc-do-list
3910 .\" NS doc-dash-list macro
3911 .\" NS   hyphen paragraph list (sub bullet list)
3912 .\" NS
3913 .\" NS modifies:
3914 .\" NS   doc-in-list
3916 .de doc-dash-list
3917 .  nr doc-in-list 1
3918 .  nop \)\*[doc-Sy-font]\-\f[]
3919 .  doc-do-list
3923 .\" NS doc-do-list macro
3924 .\" NS   .It item of list-type enum/bullet/hyphen
3926 .als doc-do-list doc-hang-list
3929 .\" NS doc-diag-list-input-line-count global register
3930 .\" NS   saved line number to be checked in next diag-list item
3932 .nr doc-diag-list-input-line-count 0
3935 .\" NS doc-diag-list macro
3936 .\" NS   .It item of list-type diagnostic-message
3937 .\" NS
3938 .\" NS modifies:
3939 .\" NS   doc-curr-font
3940 .\" NS   doc-curr-size
3941 .\" NS   doc-diag-list-input-line-count
3943 .de doc-diag-list
3944 .  nr doc-curr-font \n[.f]
3945 .  nr doc-curr-size \n[.ps]
3947 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3948 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3949 .      doc-paragraph
3950 .    el \
3951 .      br
3952 .  \}
3953 .  el \
3954 .    br
3955 .  nr doc-diag-list-input-line-count \n[.c]
3957 .  nh
3958 .  nop \*[doc-Sy-font]\c
3959 .  if \n[doc-num-args] \
3960 .    doc-remaining-args
3961 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3963 .  doc-print-and-reset
3967 .\" NS doc-tag-list macro
3968 .\" NS   .It item of list-type `tag'
3969 .\" NS
3970 .\" NS modifies:
3971 .\" NS   doc-have-space
3972 .\" NS   doc-in-list
3973 .\" NS
3974 .\" NS local variables:
3975 .\" NS   doc-box-dtl
3976 .\" NS   doc-reg-dtl
3977 .\" NS   doc-reg-dtl1
3979 .de doc-tag-list
3980 .  \" finish item box
3981 .  br
3982 .  ev
3983 .  box
3984 .  unformat doc-item-box\n[doc-list-depth]
3986 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
3987 .  box doc-box-dtl
3988 .  ev doc-env-dtl
3989 .  evc 0
3990 .  fi
3991 .  ad 0
3992 .  in 0
3993 .  doc-item-box\n[doc-list-depth]
3994 .  br
3995 .  ev
3996 .  box
3998 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
3999 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4000 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4001 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
4002 .    \}
4003 .    doc-get-tag-width
4004 .  \}
4005 .  doc-set-vertical-and-indent 1
4006 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4007 .  ti -\n[doc-reg-dtl]u
4009 .  nh
4010 .  doc-item-box\n[doc-list-depth]
4011 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4012 .    br
4013 .  el \{\
4014 .    \" format the tag separately to prevent stretching of spaces
4015 .    vpt 0
4016 .    br
4017 .    sp -1
4018 .    vpt 1
4019 .    nop \&\c
4020 .    nr doc-have-space 1
4021 .  \}
4023 .  if \n[doc-in-files-section] \
4024 .    if n \
4025 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
4027 .  nr doc-in-list 0
4028 .  doc-reset-args
4032 .\" NS doc-get-tag-width macro
4033 .\" NS   resolve unknown tag width (`tag' list-type only)
4034 .\" NS
4035 .\" NS modifies:
4036 .\" NS   doc-list-indent-stackXXX
4037 .\" NS   doc-tag-width-stackXXX
4038 .\" NS
4039 .\" NS requires:
4040 .\" NS   doc-curr-arg
4041 .\" NS   doc-curr-type
4043 .de doc-get-tag-width
4044 .  ie (\n[doc-curr-type] == 1) \{\
4045 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4046 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4047 .  \}
4048 .  el \{\
4049 .    ds doc-tag-width-stack\n[doc-list-depth] No
4050 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4051 .  \}
4055 .\" NS doc-set-vertical-and-indent macro
4056 .\" NS   set up vertical spacing (if not compact) and indentation (with
4057 .\" NS   offset if argument is non-zero)
4058 .\" NS
4059 .\" NS modifies:
4060 .\" NS   doc-list-have-indent-stackXXX
4062 .de doc-set-vertical-and-indent
4063 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4064 .    sp \n[doc-display-vertical]u
4066 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4067 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4068 .    if \$1 \
4069 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4070 .  \}
4072 .  if !\n[cR] \
4073 .    ne 2v
4077 .\" NS doc-list-depth global register
4078 .\" NS   list type stack counter
4080 .nr doc-list-depth 0
4083 .\" NS doc-num-columns global register
4084 .\" NS   number of columns
4086 .nr doc-num-columns 0
4089 .\" NS doc-compact-list-stackXXX global register (bool)
4090 .\" NS   stack of flags to indicate whether a particular list is compact
4091 .\" NS
4092 .\" NS limit:
4093 .\" NS   doc-list-depth
4095 .nr doc-compact-list-stack1 0
4098 .\" NS doc-tag-prefix-stackXXX global string
4099 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4100 .\" NS
4101 .\" NS limit:
4102 .\" NS   doc-list-depth
4104 .ds doc-tag-prefix-stack1
4107 .\" NS doc-tag-width-stackXXX global string
4108 .\" NS   stack of strings indicating how to set up current element of
4109 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4110 .\" NS   directly; if it is a macro name, use the macro's width value;
4111 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4112 .\" NS
4113 .\" NS limit:
4114 .\" NS   doc-list-depth
4116 .ds doc-tag-width-stack0
4117 .ds doc-tag-width-stack1
4120 .\" NS doc-list-offset-stackXXX global register
4121 .\" NS   stack of list offsets
4122 .\" NS
4123 .\" NS limit:
4124 .\" NS   doc-list-depth
4126 .nr doc-list-offset-stack1 0
4129 .\" NS doc-end-list macro
4130 .\" NS   list end function; resets indentation (and offset if argument is
4131 .\" NS   non-zero)
4132 .\" NS
4133 .\" NS modifies:
4134 .\" NS   doc-list-depth
4135 .\" NS   doc-list-offset-stackXXX
4137 .de doc-end-list
4138 .  if \$1 \
4139 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4141 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4143 .  if (\n[doc-list-depth] <= 0) \
4144 .    tm mdoc warning: extraneous .El call (#\n[.c])
4146 .  doc-decrement-list-stack
4147 .  nr doc-list-depth -1
4151 .\" NS doc-increment-list-stack macro
4152 .\" NS   set up next block for list
4153 .\" NS
4154 .\" NS modifies:
4155 .\" NS   doc-compact-list-stackXXX
4156 .\" NS   doc-list-have-indent-stackXXX
4157 .\" NS   doc-list-indent-stackXXX
4158 .\" NS   doc-list-offset-stackXXX
4159 .\" NS   doc-list-type-stackXXX
4160 .\" NS   doc-tag-prefix-stackXXX
4161 .\" NS   doc-tag-width-stackXXX
4162 .\" NS   doc-enum-list-count-stackXXX
4163 .\" NS
4164 .\" NS local variables:
4165 .\" NS   doc-reg-dils
4167 .de doc-increment-list-stack
4168 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4169 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4170 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4171 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4172 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4173 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4174 .  ds doc-list-type-stack\n[doc-reg-dils]
4175 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4176 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4180 .\" NS doc-decrement-list-stack macro
4181 .\" NS   decrement stack
4182 .\" NS
4183 .\" NS modifies:
4184 .\" NS   doc-compact-list-stackXXX
4185 .\" NS   doc-list-have-indent-stackXXX
4186 .\" NS   doc-list-indent-stackXXX
4187 .\" NS   doc-list-offset-stackXXX
4188 .\" NS   doc-list-type-stackXXX
4189 .\" NS   doc-tag-prefix-stackXXX
4190 .\" NS   doc-tag-width-stackXXX
4191 .\" NS   doc-enum-list-count-stackXXX
4193 .de doc-decrement-list-stack
4194 .  ds doc-list-type-stack\n[doc-list-depth]
4195 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4196 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4197 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4198 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4199 .  ds doc-tag-width-stack\n[doc-list-depth]
4200 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4201 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4205 .\" NS Xr user macro
4206 .\" NS   cross reference (for man pages only)
4207 .\" NS
4208 .\" NS modifies:
4209 .\" NS   doc-arg-ptr
4210 .\" NS   doc-macro-name
4211 .\" NS
4212 .\" NS local variables:
4213 .\" NS   doc-reg-Xr
4214 .\" NS
4215 .\" NS width register `Xr' set in doc-common
4217 .de Xr
4218 .  if !\n[doc-arg-limit] \{\
4219 .    ie \n[.$] \{\
4220 .      ds doc-macro-name Xr
4221 .      doc-parse-args \$@
4222 .    \}
4223 .    el \
4224 .      doc-Xr-usage
4225 .  \}
4227 .  if !\n[doc-arg-limit] \
4228 .    return
4230 .  nr doc-arg-ptr +1
4231 .  doc-print-prefixes
4232 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4233 .    \" first argument must be a string
4234 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4235 .      nr doc-curr-font \n[.f]
4236 .      nr doc-curr-size \n[.ps]
4237 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4239 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4240 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4241 .        \" modify second argument if it is a string and
4242 .        \" remove space inbetween
4243 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4244 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4245 .          ds doc-space\n[doc-arg-ptr]
4246 .        \}
4247 .      \}
4248 .      doc-print-recursive
4249 .    \}
4250 .    el \
4251 .      doc-Xr-usage
4252 .  \}
4253 .  el \
4254 .    doc-Xr-usage
4258 .\" NS doc-Xr-usage macro
4260 .de doc-Xr-usage
4261 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4262 .  doc-reset-args
4266 .\" NS Sx user macro
4267 .\" NS   cross section reference
4268 .\" NS
4269 .\" NS width register `Sx' set in doc-common
4271 .als Sx doc-generic-macro
4272 .ds doc-Sx-usage section_header
4275 .\" NS doc-end-column-list macro
4276 .\" NS   column-list end-list
4277 .\" NS
4278 .\" NS modifies:
4279 .\" NS   doc-list-depth
4281 .de doc-end-column-list
4282 .  linetabs 0
4283 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4284 .  ta T .5i
4285 .  fi
4286 .  doc-decrement-list-stack
4287 .  nr doc-list-depth -1
4291 .\" NS doc-column-indent-width global register
4292 .\" NS   holds the indent width for a column list
4294 .nr doc-column-indent-width 0
4297 .\" NS doc-set-column-tab macro
4298 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4299 .\" NS
4300 .\" NS modifies:
4301 .\" NS   doc-column-indent-width
4302 .\" NS
4303 .\" NS local variables:
4304 .\" NS   doc-reg-dsct
4305 .\" NS   doc-str-dsct
4306 .\" NS   doc-str-dsct1
4308 .de doc-set-column-tab
4309 .  ds doc-str-dsct
4310 .  nr doc-reg-dsct 1
4311 .  nr doc-column-indent-width 0
4313 .  ie (\$1 < 5) \
4314 .    ds doc-str-dsct1 "    \"
4315 .  el \{\
4316 .    ie (\$1 == 5) \
4317 .      ds doc-str-dsct1 "   \"
4318 .    el \{\
4319 .      \" XXX: this is packed abnormally close -- intercolumn width
4320 .      \"      should be configurable
4321 .      ds doc-str-dsct1 " \"
4322 .  \}\}
4324 .  while (\n[doc-reg-dsct] <= \$1) \{\
4325 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4326 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4327 .    nr doc-reg-dsct +1
4328 .  \}
4330 .  ta \*[doc-str-dsct]
4331 '  in +\n[doc-column-indent-width]u
4335 .\" NS doc-column-list macro
4336 .\" NS   column items
4337 .\" NS
4338 .\" NS modifies:
4339 .\" NS   doc-arg-ptr
4340 .\" NS   doc-list-indent-stackXXX
4341 .\" NS   doc-spaceXXX
4342 .\" NS
4343 .\" NS local variables:
4344 .\" NS   doc-reg-dcl
4346 .de doc-column-list
4347 .  if \n[doc-num-args] \
4348 .    doc-parse-arg-vector
4349 .  nr doc-arg-ptr +1
4351 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4352 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4353 .    return
4354 .  \}
4356 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4357 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4358 .    ds doc-space\n[doc-reg-dcl]
4359 .  \}
4361 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4362 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4363 .  if !\n[.u] \{\
4364 .    fi
4365 .    in +\n[doc-column-indent-width]u
4366 .  \}
4367 .  ti -\n[doc-column-indent-width]u
4369 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4373 .\" NS Ta user macro
4374 .\" NS   append tab (\t)
4375 .\" NS
4376 .\" NS modifies:
4377 .\" NS   doc-arg-ptr
4378 .\" NS
4379 .\" NS width register `Ta' set in doc-common
4381 .de Ta
4382 .  ie \n[doc-arg-limit] \{\
4383 .    nr doc-arg-ptr +1
4384 .    nop \*[doc-tab]\c
4385 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4386 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4387 .    el \
4388 .      doc-reset-args
4389 .  \}
4390 .  el \{\
4391 .    tm1 "Usage: Ta must follow column entry: e.g.
4392 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4393 .  \}
4397 .\" NS Dl user macro
4398 .\" NS   display (one line) literal
4399 .\" NS
4400 .\" NS   this function uses the `Li' font
4401 .\" NS
4402 .\" NS modifies:
4403 .\" NS   doc-arg-ptr
4404 .\" NS   doc-curr-font
4405 .\" NS   doc-curr-size
4406 .\" NS   doc-macro-name
4407 .\" NS
4408 .\" NS width register `Dl' set in doc-common
4410 .de Dl
4411 .  ta T .5i
4412 .  in +\n[doc-display-indent]u
4414 .  ie \n[doc-arg-limit] \{\
4415 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4416 .    doc-reset-args
4417 .  \}
4418 .  el \{\
4419 .    ie \n[.$] \{\
4420 .      ds doc-macro-name Dl
4421 .      doc-parse-args \$@
4422 .      nr doc-arg-ptr 1
4423 .      nr doc-curr-font \n[.f]
4424 .      nr doc-curr-size \n[.ps]
4425 .      nop \*[doc-Li-font]\c
4426 .      doc-print-recursive
4427 .    \}
4428 .    el \
4429 .      tm Usage: .Dl argument ... (#\n[.c])
4430 .  \}
4432 .  in -\n[doc-display-indent]u
4436 .\" NS D1 user macro
4437 .\" NS   display (one line)
4438 .\" NS
4439 .\" NS modifies:
4440 .\" NS   doc-arg-ptr
4441 .\" NS   doc-macro-name
4442 .\" NS
4443 .\" NS width register `D1' set in doc-common
4445 .de D1
4446 .  ta T .5i
4447 .  in +\n[doc-display-indent]u
4449 .  ie \n[doc-arg-limit] \{\
4450 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4451 .    doc-reset-args
4452 .  \}
4453 .  el \{\
4454 .    ie \n[.$] \{\
4455 .      ds doc-macro-name D1
4456 .      doc-parse-args \$@
4457 .      nr doc-arg-ptr 1
4458 .      doc-print-recursive
4459 .    \}
4460 .    el \
4461 .      tm Usage: .D1 argument ... (#\n[.c])
4462 .  \}
4464 .  in -\n[doc-display-indent]u
4468 .\" NS Vt user macro
4469 .\" NS   variable type (for forcing old style variable declarations);
4470 .\" NS   this is not done in the same manner as .Ot for fortrash --
4471 .\" NS   clean up later
4472 .\" NS
4473 .\" NS modifies:
4474 .\" NS   doc-curr-font
4475 .\" NS   doc-curr-size
4476 .\" NS   doc-have-decl
4477 .\" NS   doc-have-var
4478 .\" NS   doc-macro-name
4479 .\" NS
4480 .\" NS width register `Vt' set in doc-common
4482 .de Vt
4483 .  if !\n[doc-arg-limit] \{\
4484 .    ie \n[.$] \{\
4485 .      ds doc-macro-name Vt
4486 .      doc-parse-args \$@
4487 .    \}
4488 .    el \
4489 .      tm Usage: .Vt variable_type ... (#\n[.c])
4490 .  \}
4492 .  if !\n[doc-arg-limit] \
4493 .    return
4495 .  nr doc-arg-ptr +1
4496 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4497 .    tm Usage: .Vt variable_type ... (#\n[.c])
4498 .    doc-reset-args
4499 .    return
4500 .  \}
4502 .  if \n[doc-in-synopsis-section] \{\
4503 .    \" if a function declaration was the last thing given,
4504 .    \" want vertical space
4505 .    if \n[doc-have-decl] \{\
4506 .      doc-paragraph
4507 .      nr doc-have-decl 0
4508 .    \}
4510 .    \" if a subroutine was the last thing given, want vertical space
4511 .    if \n[doc-have-func] \{\
4512 .      ie \n[doc-have-var] \
4513 .        br
4514 .      el \
4515 .        doc-paragraph
4516 .    \}
4518 .    nr doc-have-var 1
4519 .  \}
4521 .  nr doc-curr-font \n[.f]
4522 .  nr doc-curr-size \n[.ps]
4523 .  nop \*[doc-Ft-font]\c
4524 .  doc-print-recursive
4526 .  if \n[doc-in-synopsis-section] \{\
4527 .    ie \n[doc-have-old-func] \
4528 .      nop \*[doc-soft-space]\c
4529 .    el \
4530 .      br
4531 .  \}
4535 .\" NS doc-is-func global register (bool)
4536 .\" NS   set if subroutine (in synopsis only) (fortran only)
4538 .nr doc-is-func 0
4541 .\" NS Ft user macro
4542 .\" NS   function type
4543 .\" NS
4544 .\" NS modifies:
4545 .\" NS   doc-curr-font
4546 .\" NS   doc-curr-size
4547 .\" NS   doc-have-decl
4548 .\" NS   doc-have-var
4549 .\" NS   doc-is-func
4550 .\" NS   doc-macro-name
4551 .\" NS
4552 .\" NS width register `Ft' set in doc-common
4554 .de Ft
4555 .  if !\n[doc-arg-limit] \{\
4556 .    ie \n[.$] \{\
4557 .      ds doc-macro-name Ft
4558 .      doc-parse-args \$@
4559 .    \}
4560 .    el \
4561 .      tm Usage: .Ft function_type ... (#\n[.c])
4562 .  \}
4564 .  if !\n[doc-arg-limit] \
4565 .    return
4567 .  nr doc-arg-ptr +1
4568 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4569 .    tm Usage: .Ft function_type ... (#\n[.c])
4570 .    doc-reset-args
4571 .    return
4572 .  \}
4574 .  if \n[doc-in-synopsis-section] \{\
4575 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4576 .      doc-paragraph
4577 .      nr doc-have-decl 0
4578 .      nr doc-have-var 0
4579 .    \}
4581 .    if \n[doc-have-var] \{\
4582 .      doc-paragraph
4583 .      nr doc-have-var 0
4584 .    \}
4586 .    nr doc-is-func 1
4587 .  \}
4589 .  nr doc-curr-font \n[.f]
4590 .  nr doc-curr-size \n[.ps]
4591 .  nop \*[doc-Ft-font]\c
4592 .  doc-print-recursive
4596 .\" NS doc-have-old-func global register (bool)
4597 .\" NS   set if `Ot' has been called
4599 .nr doc-have-old-func 0
4602 .\" NS Ot user macro
4603 .\" NS   old function type (fortran -- no newline)
4604 .\" NS
4605 .\" NS modifies:
4606 .\" NS   doc-have-decl
4607 .\" NS   doc-have-old-func
4608 .\" NS   doc-have-var
4609 .\" NS   doc-is-func
4610 .\" NS
4611 .\" NS width register `Ot' set in doc-common
4613 .de Ot
4614 .  nr doc-have-old-func 1
4616 .  if \n[doc-in-synopsis-section] \{\
4617 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4618 .      doc-paragraph
4619 .      nr doc-have-decl 0
4620 .      nr doc-have-var 0
4621 .    \}
4623 .    if \n[doc-have-var] \{\
4624 .      doc-paragraph
4625 .      nr doc-have-var 0
4626 .    \}
4628 .    nr doc-is-func 1
4629 .  \}
4631 .  if \n[.$] \
4632 .    nop \*[doc-Ft-font]\$*\c
4633 .  nop \ \f[]\c
4637 .\" NS Fa user macro
4638 .\" NS   function arguments
4639 .\" NS
4640 .\" NS modifies:
4641 .\" NS   doc-arg-ptr
4642 .\" NS   doc-curr-font
4643 .\" NS   doc-curr-size
4644 .\" NS   doc-macro-name
4645 .\" NS
4646 .\" NS width register `Fa' set in doc-common
4648 .de Fa
4649 .  if !\n[doc-arg-limit] \{\
4650 .    ie \n[.$] \{\
4651 .      ds doc-macro-name Fa
4652 .      doc-parse-args \$@
4653 .    \}
4654 .    el \
4655 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4656 .  \}
4658 .  ie \n[doc-func-arg-count] \
4659 .    doc-do-func
4660 .  el \{\
4661 .    nr doc-arg-ptr +1
4662 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4663 .      nr doc-curr-font \n[.f]
4664 .      nr doc-curr-size \n[.ps]
4665 .      nop \*[doc-Fa-font]\c
4666 .      doc-print-recursive
4668 .      if \n[doc-in-synopsis-section] \
4669 .        if \n[doc-have-func] \
4670 .          br
4671 .  \}\}
4675 .\" NS doc-func-arg-count global register
4676 .\" NS   how many function arguments have been processed so far
4678 .nr doc-func-arg-count 0
4681 .\" NS doc-func-arg global string
4682 .\" NS   work buffer for function name strings
4684 .ds doc-func-arg
4687 .\" NS doc-num-func-args global register
4688 .\" NS   number of function arguments
4690 .nr doc-num-func-args 0
4693 .\" NS doc-func-args-processed global register
4694 .\" NS   function arguments processed so far
4696 .nr doc-func-args-processed 0
4699 .\" NS doc-do-func macro
4700 .\" NS   internal .Fa for .Fc
4701 .\" NS
4702 .\" NS modifies:
4703 .\" NS   doc-arg-ptr
4704 .\" NS   doc-argXXX
4705 .\" NS   doc-func-arg
4706 .\" NS   doc-func-arg-count
4707 .\" NS   doc-func-args-processed
4708 .\" NS   doc-num-func-args
4710 .de doc-do-func
4711 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4712 .    doc-reset-args
4713 .    return
4714 .  \}
4716 .  nr doc-arg-ptr +1
4718 .  ds doc-func-arg
4719 .  nr doc-num-func-args 0
4720 .  nr doc-func-args-processed 0
4722 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4723 .  if (\n[doc-num-func-args] > 1) \
4724 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4726 .  if (\n[doc-func-arg-count] > 1) \{\
4727 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4728 .    if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4729 .      if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4730 .        nop ,\)\c
4731 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4732 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4733 .  \}
4735 .  if (\n[doc-func-arg-count] == 1) \{\
4736 .    nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4737 .    nop \f[]\s[0]\c
4738 .  \}
4739 .  nr doc-func-arg-count +1
4740 .  doc-do-func
4744 .\" NS doc-have-func global register (bool)
4745 .\" NS   whether we have more than one function in synopsis
4747 .nr doc-have-func 0
4750 .\" NS Fn user macro
4751 .\" NS   functions
4752 .\" NS
4753 .\" NS modifies:
4754 .\" NS   doc-arg-ptr
4755 .\" NS   doc-curr-font
4756 .\" NS   doc-curr-size
4757 .\" NS   doc-have-decl
4758 .\" NS   doc-have-func
4759 .\" NS   doc-have-var
4760 .\" NS   doc-indent-synopsis
4761 .\" NS   doc-is-func
4762 .\" NS   doc-macro-name
4763 .\" NS
4764 .\" NS width register `Fn' set in doc-common
4766 .de Fn
4767 .  if !\n[doc-arg-limit] \{\
4768 .    ie \n[.$] \{\
4769 .      ds doc-macro-name Fn
4770 .      doc-parse-args \$@
4771 .    \}
4772 .    el \
4773 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4774 .  \}
4776 .  if !\n[doc-arg-limit] \
4777 .    return
4779 .  if \n[doc-in-synopsis-section] \{\
4780 .    \" if there is/has been more than one subroutine declaration
4781 .    ie \n[doc-is-func] \{\
4782 .      br
4783 .      nr doc-have-var 0
4784 .      nr doc-have-decl 0
4785 .      nr doc-is-func 0
4786 .    \}
4787 .    el \{\
4788 .      if \n[doc-have-func] \{\
4789 .        doc-paragraph
4790 .        nr doc-have-var 0
4791 .        nr doc-have-decl 0
4792 .    \}\}
4794 .    if \n[doc-have-decl] \{\
4795 .      doc-paragraph
4796 .      nr doc-have-var 0
4797 .    \}
4799 .    if \n[doc-have-var] \{\
4800 .      doc-paragraph
4801 .      nr doc-have-decl 0
4802 .    \}
4804 .    nr doc-have-func 1
4805 .    nr doc-is-func 0
4807 .    br
4808 .    if !\n[doc-indent-synopsis] \
4809 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4810 .    if !\n[doc-indent-synopsis-active] \
4811 .      in +\n[doc-indent-synopsis]u
4812 .    ti -\n[doc-indent-synopsis]u
4813 .  \}
4815 .  nr doc-arg-ptr +1
4816 .  doc-print-prefixes
4817 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4818 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4819 .    doc-reset-args
4820 .    return
4821 .  \}
4823 .  nr doc-curr-font \n[.f]
4824 .  nr doc-curr-size \n[.ps]
4825 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4826 .  nop \f[]\s[0]\*[lp]\)\c
4828 .  nr doc-arg-ptr +1
4829 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4830 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4831 .      nop \*[doc-Fa-font]\c
4832 .      doc-do-func-args
4833 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4834 .  \}\}
4836 .  nop \)\*[rp]\)\c
4837 .  if \n[doc-in-synopsis-section] \
4838 .    nop \);\)\c
4840 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4841 .    \" output the space (if needed)
4842 .    nr doc-arg-ptr -1
4843 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4844 .    nr doc-arg-ptr +1
4846 .    doc-print-recursive
4847 .  \}
4848 .  el \
4849 .    doc-print-and-reset
4851 .  if \n[doc-in-synopsis-section] \
4852 .    if !\n[doc-indent-synopsis-active] \
4853 .      in -\n[doc-indent-synopsis]u
4857 .\" NS doc-do-func-args macro
4858 .\" NS   handle function arguments
4859 .\" NS
4860 .\" NS modifies:
4861 .\" NS   doc-arg-ptr
4862 .\" NS   doc-argXXX
4863 .\" NS   doc-func-arg
4864 .\" NS   doc-func-args-processed
4865 .\" NS   doc-num-func-args
4866 .\" NS
4867 .\" NS local variables:
4868 .\" NS   doc-reg-ddfa
4870 .de doc-do-func-args
4871 .  if \n[doc-in-synopsis-section] \{\
4872 .    ds doc-func-arg
4873 .    nr doc-num-func-args 0
4874 .    nr doc-func-args-processed 0
4876 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4877 .    if (\n[doc-num-func-args] > 1) \
4878 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4879 .  \}
4881 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4882 .  nr doc-arg-ptr +1
4884 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4885 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4886 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4887 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4888 .      if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4889 .        if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4890 .          nop ,\)\c
4891 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4892 .      doc-do-func-args
4893 .  \}\}
4897 .\" NS doc-saved-nesting-level global register
4899 .nr doc-saved-nesting-level 0
4902 .\" NS doc-in-func-enclosure global register (bool)
4904 .nr doc-in-func-enclosure 0
4907 .\" NS Fo user macro
4908 .\" NS   function open
4909 .\" NS
4910 .\" NS modifies:
4911 .\" NS   doc-arg-ptr
4912 .\" NS   doc-curr-font
4913 .\" NS   doc-curr-size
4914 .\" NS   doc-func-arg-count
4915 .\" NS   doc-have-decl
4916 .\" NS   doc-have-func
4917 .\" NS   doc-have-var
4918 .\" NS   doc-in-func-enclosure
4919 .\" NS   doc-indent-synopsis
4920 .\" NS   doc-is-func
4921 .\" NS   doc-macro-name
4922 .\" NS   doc-saved-nesting-level
4923 .\" NS
4924 .\" NS width register `Fo' set in doc-common
4926 .de Fo
4927 .  if (\n[doc-in-func-enclosure]) \{\
4928 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4929 .    return
4930 .  \}
4932 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4933 .  nr doc-in-func-enclosure 1
4935 .  if !\n[doc-arg-limit] \{\
4936 .    ie \n[.$] \{\
4937 .      ds doc-macro-name Fo
4938 .      doc-parse-args \$@
4939 .    \}
4940 .    el \
4941 .      tm Usage: .Fo function_name (#\n[.c])
4942 .  \}
4944 .  if \n[doc-in-synopsis-section] \{\
4945 .    \" if there is/has been more than one subroutine declaration
4946 .    ie \n[doc-is-func] \{\
4947 .      br
4948 .      nr doc-have-var 0
4949 .      nr doc-have-decl 0
4950 .      nr doc-is-func 0
4951 .    \}
4952 .    el \{\
4953 .      if \n[doc-have-func] \{\
4954 .        doc-paragraph
4955 .        nr doc-have-var 0
4956 .        nr doc-have-decl 0
4957 .    \}\}
4959 .    if \n[doc-have-decl] \{\
4960 .      doc-paragraph
4961 .      nr doc-have-var 0
4962 .    \}
4964 .    if \n[doc-have-var] \{\
4965 .      doc-paragraph
4966 .      nr doc-have-decl 0
4967 .    \}
4969 .    nr doc-have-func 1
4970 .    nr doc-is-func 0
4972 .    br
4973 .    if !\n[doc-indent-synopsis] \
4974 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4975 .  \}
4977 .  \" start function box
4978 .  box doc-func-box
4979 .  ev doc-func-env
4980 .  evc 0
4981 .  in 0
4982 .  nf
4984 .  nr doc-arg-ptr +1
4985 .  doc-print-prefixes
4986 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4987 .    nr doc-func-arg-count 1
4988 .    nr doc-curr-font \n[.f]
4989 .    nr doc-curr-size \n[.ps]
4991 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4992 .    nop \f[]\s[0]\*[lp]\)\c
4993 .    doc-reset-args
4994 .  \}
4998 .\" NS Fc user macro
4999 .\" NS   function close
5000 .\" NS
5001 .\" NS modifies:
5002 .\" NS   doc-arg-ptr
5003 .\" NS   doc-func-arg-count
5004 .\" NS   doc-in-func-enclosure
5005 .\" NS   doc-saved-nesting-level
5006 .\" NS   doc-macro-name
5007 .\" NS
5008 .\" NS width register `Fc' set in doc-common
5010 .de Fc
5011 .  if !\n[doc-in-func-enclosure] \{\
5012 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
5013 .    return
5014 .  \}
5016 .  if \n[.$] \{\
5017 .    ds doc-macro-name Fc
5018 .    \" the first (dummy) argument is used to get the correct spacing
5019 .    doc-parse-args \) \$@
5020 .  \}
5022 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5023 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5025 .  nr doc-func-arg-count 0
5026 .  nr doc-in-func-enclosure 0
5028 .  ie \n[doc-in-synopsis-section] \
5029 .    nop \|\*[rp];\)
5030 .  el \
5031 .    nop \|\*[rp]\)
5033 .  \" finish function box
5034 .  br
5035 .  ev
5036 .  box
5037 .  chop doc-func-box
5038 .  unformat doc-func-box
5040 .  if \n[doc-in-synopsis-section] \{\
5041 .    if !\n[doc-indent-synopsis-active] \
5042 .      in +\n[doc-indent-synopsis]u
5043 .    ti -\n[doc-indent-synopsis]u
5044 .  \}
5046 .  nh
5047 .  nop \*[doc-func-box]\c
5049 .  nr doc-arg-ptr +1
5050 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5051 .    nr doc-curr-font \n[.f]
5052 .    nr doc-curr-size \n[.ps]
5053 .    doc-print-recursive
5054 .  \}
5055 .  el \
5056 .    doc-print-and-reset
5058 .  if \n[doc-in-synopsis-section] \
5059 .    if !\n[doc-indent-synopsis-active] \
5060 .      in -\n[doc-indent-synopsis]u
5064 .\" NS doc-build-func-string macro
5065 .\" NS   collect function arguments and set hard spaces inbetween
5066 .\" NS
5067 .\" NS modifies:
5068 .\" NS   doc-func-arg
5069 .\" NS   doc-func-args-processed
5070 .\" NS   doc-num-func-args
5072 .de doc-build-func-string
5073 .  if !\n[doc-num-func-args] \{\
5074 .    nr doc-num-func-args \n[.$]
5075 .    nr doc-func-args-processed 0
5076 .    ds doc-func-arg
5077 .  \}
5079 .  nr doc-func-args-processed +1
5080 .  as doc-func-arg "\$1
5082 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5083 .    as doc-func-arg "\*[doc-hard-space]
5085 .    shift
5086 .    doc-build-func-string \$@
5087 .  \}
5091 .\" Very crude references: Stash all reference info into boxes, print out
5092 .\" reference on .Re macro and clean up.  Ordering very limited, no fancy
5093 .\" citations, but can do articles, journals, and books -- need to add
5094 .\" several missing options (like city etc).  Should be able to grab a refer
5095 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5096 .\" (ha!).
5099 .\" NS doc-is-reference global register (bool)
5100 .\" NS   set if in reference
5102 .nr doc-is-reference 0
5105 .\" NS doc-reference-count global register
5106 .\" NS   reference element counter
5108 .nr doc-reference-count 0
5111 .\" NS Rs user macro
5112 .\" NS   reference start
5113 .\" NS
5114 .\" NS modifies:
5115 .\" NS   doc-is-reference
5116 .\" NS   doc-reference-count
5117 .\" NS
5118 .\" NS width register `Rs' set in doc-common
5120 .de Rs
5121 .  ie \n[.$] \
5122 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5123 .  el \{\
5124 .    nr doc-is-reference 1
5125 .    doc-reset-reference
5126 .    if \n[doc-in-see-also-section] \
5127 .      doc-paragraph
5128 .    nr doc-reference-count 0
5129 .  \}
5133 .\" NS Re user macro
5134 .\" NS   reference end
5135 .\" NS
5136 .\" NS modifies:
5137 .\" NS   doc-is-reference
5138 .\" NS
5139 .\" NS width register `Re' set in doc-common
5141 .de Re
5142 .  ie \n[.$] \
5143 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5144 .  el \{\
5145 .    doc-print-reference
5146 .    doc-reset-reference
5147 .    nr doc-is-reference 0
5148 .  \}
5152 .\" NS doc-reset-reference macro
5153 .\" NS   reference cleanup
5154 .\" NS
5155 .\" NS modifies:
5156 .\" NS   doc-author-count
5157 .\" NS   doc-author-nameXXX
5158 .\" NS   doc-book-count
5159 .\" NS   doc-book-name
5160 .\" NS   doc-corporate-count
5161 .\" NS   doc-corporate-name
5162 .\" NS   doc-date
5163 .\" NS   doc-date-count
5164 .\" NS   doc-issue-count
5165 .\" NS   doc-issue-name
5166 .\" NS   doc-journal-count
5167 .\" NS   doc-journam-name
5168 .\" NS   doc-optional-count
5169 .\" NS   doc-optional-string
5170 .\" NS   doc-page-number-count
5171 .\" NS   doc-page-number-string
5172 .\" NS   doc-reference-title-count
5173 .\" NS   doc-reference-title-name
5174 .\" NS   doc-reference-title-name-for-book
5175 .\" NS   doc-report-count
5176 .\" NS   doc-report-name
5177 .\" NS   doc-volume-count
5178 .\" NS   doc-volume-name
5180 .de doc-reset-reference
5181 .  while (\n[doc-author-count]) \{\
5182 .    ds doc-author-name\n[doc-author-count]
5183 .    nr doc-author-count -1
5184 .  \}
5185 .  nr doc-journal-count 0
5186 .  nr doc-issue-count 0
5187 .  nr doc-optional-count 0
5188 .  nr doc-corporate-count 0
5189 .  nr doc-report-count 0
5190 .  nr doc-reference-title-count 0
5191 .  nr doc-volume-count 0
5192 .  nr doc-date-count 0
5193 .  nr doc-page-number-count 0
5194 .  nr doc-book-count 0
5196 .  ds doc-journal-name
5197 .  ds doc-issue-name
5198 .  ds doc-optional-string
5199 .  ds doc-corporate-name
5200 .  ds doc-report-name
5201 .  ds doc-reference-title-name
5202 .  ds doc-reference-title-name-for-book
5203 .  ds doc-volume-name
5204 .  ds doc-date
5205 .  ds doc-page-number-string
5206 .  ds doc-book-name
5210 .\" NS doc-finish-reference macro
5211 .\" NS   auxiliary macro for doc-print-reference
5212 .\" NS
5213 .\" NS modifies:
5214 .\" NS   doc-reference-count
5216 .de doc-finish-reference
5217 .  nr doc-reference-count -1
5218 .  ie \n[doc-reference-count] \
5219 .    nop \),
5220 .  el \
5221 .    nop \).
5225 .\" NS doc-print-reference macro
5226 .\" NS   reference print
5227 .\" NS
5228 .\" NS modifies:
5229 .\" NS   doc-reference-count
5231 .de doc-print-reference
5233 .  nh
5235 .  if \n[doc-author-count] \{\
5236 .    doc-print-reference-authors
5237 .    nr doc-reference-count -\n[doc-author-count]
5238 .  \}
5240 .  if \n[doc-reference-title-count] \{\
5241 .    unformat doc-reference-title-name
5242 .    chop doc-reference-title-name
5243 .    unformat doc-reference-title-name-for-book
5244 .    chop doc-reference-title-name-for-book
5245 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5246 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5247 .      doc-finish-reference
5248 .    \}
5249 .    el \{\
5250 .      nop \*[doc-reference-title-name]\c
5251 .      doc-finish-reference
5252 .  \}\}
5254 .  if \n[doc-book-count] \{\
5255 .    unformat doc-book-name
5256 .    chop doc-book-name
5257 .    nop \*[doc-book-name]\c
5258 .    doc-finish-reference
5259 .  \}
5261 .  if \n[doc-publisher-count] \{\
5262 .    unformat doc-publisher-name
5263 .    chop doc-publisher-name
5264 .    nop \*[doc-publisher-name]\c
5265 .    doc-finish-reference
5266 .  \}
5268 .  if \n[doc-journal-count] \{\
5269 .    unformat doc-journal-name
5270 .    chop doc-journal-name
5271 .    nop \*[doc-journal-name]\c
5272 .    doc-finish-reference
5273 .  \}
5275 .  if \n[doc-report-count] \{\
5276 .    unformat doc-report-name
5277 .    chop doc-report-name
5278 .    nop \*[doc-report-name]\c
5279 .    doc-finish-reference
5280 .  \}
5282 .  if \n[doc-issue-count] \{\
5283 .    unformat doc-issue-name
5284 .    chop doc-issue-name
5285 .    nop \*[doc-issue-name]\c
5286 .    doc-finish-reference
5287 .  \}
5289 .  if \n[doc-volume-count] \{\
5290 .    unformat doc-volume-name
5291 .    chop doc-volume-name
5292 .    nop \*[doc-volume-name]\c
5293 .    doc-finish-reference
5294 .  \}
5296 .  if \n[doc-page-number-count] \{\
5297 .    unformat doc-page-number-string
5298 .    chop doc-page-number-string
5299 .    nop \*[doc-page-number-string]\c
5300 .    doc-finish-reference
5301 .  \}
5303 .  if \n[doc-corporate-count] \{\
5304 .    unformat doc-corporate-name
5305 .    chop doc-corporate-name
5306 .    nop \*[doc-corporate-name]\c
5307 .    doc-finish-reference
5308 .  \}
5310 .  if \n[doc-date-count] \{\
5311 .    unformat doc-date
5312 .    chop doc-date
5313 .    nop \*[doc-date]\c
5314 .    doc-finish-reference
5315 .  \}
5317 .  if \n[doc-optional-count] \{\
5318 .    unformat doc-optional-string
5319 .    chop doc-optional-string
5320 .    nop \*[doc-optional-string]\c
5321 .    doc-finish-reference
5322 .  \}
5324 .  if \n[doc-reference-count] \
5325 .    tm mdoc warning: unresolved reference problem
5327 .  hy \n[doc-hyphen-flags]
5331 .\" NS doc-print-reference-authors macro
5332 .\" NS   print out reference authors
5333 .\" NS
5334 .\" NS local variables:
5335 .\" NS   doc-reg-dpra
5336 .\" NS   doc-str-dpra
5338 .ds doc-str-dpra "and
5340 .de doc-print-reference-authors
5341 .  nr doc-reg-dpra 1
5343 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5344 .    unformat doc-author-name\n[doc-reg-dpra]
5345 .    chop doc-author-name\n[doc-reg-dpra]
5346 .    ie (\n[doc-author-count] > 2) \
5347 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5348 .    el \
5349 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5350 .    nr doc-reg-dpra +1
5351 .  \}
5353 .  unformat doc-author-name\n[doc-reg-dpra]
5354 .  chop doc-author-name\n[doc-reg-dpra]
5355 .  if (\n[doc-author-count] > 1) \
5356 .    nop \)\*[doc-str-dpra]
5357 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5361 .\" NS doc-author-count global register
5362 .\" NS   counter of author references
5364 .nr doc-author-count 0
5367 .\" NS doc-author-nameXXX global box
5368 .\" NS   array of author names
5369 .\" NS
5370 .\" NS limit:
5371 .\" NS   doc-author-count
5373 .ds doc-author-name0
5376 .\" NS %A user macro
5377 .\" NS   reference author(s)
5378 .\" NS
5379 .\" NS modifies:
5380 .\" NS   doc-arg-ptr
5381 .\" NS   doc-author-count
5382 .\" NS   doc-curr-font
5383 .\" NS   doc-curr-size
5384 .\" NS   doc-macro-name
5385 .\" NS   doc-reference-count
5386 .\" NS
5387 .\" NS local variables:
5388 .\" NS   doc-env-%A
5389 .\" NS
5390 .\" NS width register `%A' set in doc-common
5392 .de %A
5393 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5394 .    tm Usage: .%A author_name ... (#\n[.c])
5395 .    return
5396 .  \}
5398 .  nr doc-author-count +1
5399 .  nr doc-reference-count +1
5401 .  ds doc-macro-name %A
5402 .  doc-parse-args \$@
5404 .  nr doc-arg-ptr +1
5405 .  nr doc-curr-font \n[.f]
5406 .  nr doc-curr-size \n[.ps]
5408 .  \" save to reference box
5409 .  box doc-author-name\n[doc-author-count]
5410 .  ev doc-env-%A
5411 .  evc 0
5412 .  in 0
5413 .  nf
5414 .  doc-do-references
5418 .\" NS doc-book-count global register
5419 .\" NS   counter of book references
5421 .nr doc-book-count 0
5424 .\" NS doc-book-name global box
5425 .\" NS   string of collected book references
5427 .ds doc-book-name
5430 .\" NS %B user macro
5431 .\" NS   [reference] book name
5432 .\" NS
5433 .\" NS modifies:
5434 .\" NS   doc-arg-ptr
5435 .\" NS   doc-book-count
5436 .\" NS   doc-curr-font
5437 .\" NS   doc-curr-size
5438 .\" NS   doc-macro-name
5439 .\" NS   doc-reference-count
5440 .\" NS
5441 .\" NS local variables:
5442 .\" NS   doc-env-%B
5443 .\" NS
5444 .\" NS width register `%B' set in doc-common
5446 .de %B
5447 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5448 .    tm Usage: .%B book_name ... (#\n[.c])
5449 .    return
5450 .  \}
5452 .  if \n[doc-is-reference] \{\
5453 .    nr doc-book-count +1
5454 .    nr doc-reference-count +1
5455 .  \}
5457 .  ds doc-macro-name %B
5458 .  doc-parse-args \$@
5460 .  nr doc-arg-ptr +1
5461 .  nr doc-curr-font \n[.f]
5462 .  nr doc-curr-size \n[.ps]
5464 .  ie \n[doc-is-reference] \{\
5465 .    \" append to reference box
5466 .    boxa doc-book-name
5467 .    ev doc-env-%B
5468 .    evc 0
5469 .    in 0
5470 .    nf
5471 .    nop \*[doc-Em-font]\c
5472 .    doc-do-references
5473 .  \}
5474 .  el \{\
5475 .    nop \*[doc-Em-font]\c
5476 .    doc-print-recursive
5477 .  \}
5481 .\" NS doc-date-count global register
5482 .\" NS   counter of date references
5484 .nr doc-date-count 0
5487 .\" NS doc-date global box
5488 .\" NS   string of collected date references
5490 .ds doc-date
5493 .\" NS %D user macro
5494 .\" NS   [reference] date
5495 .\" NS
5496 .\" NS modifies:
5497 .\" NS   doc-arg-ptr
5498 .\" NS   doc-curr-font
5499 .\" NS   doc-curr-size
5500 .\" NS   doc-date-count
5501 .\" NS   doc-macro-name
5502 .\" NS   doc-reference-count
5503 .\" NS
5504 .\" NS local variables:
5505 .\" NS   doc-env-%D
5506 .\" NS
5507 .\" NS width register `%D' set in doc-common
5509 .de %D
5510 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5511 .    tm Usage: .%D date ... (#\n[.c])
5512 .    return
5513 .  \}
5515 .  nr doc-date-count +1
5516 .  nr doc-reference-count +1
5518 .  ds doc-macro-name %D
5519 .  doc-parse-args \$@
5521 .  nr doc-arg-ptr +1
5522 .  nr doc-curr-font \n[.f]
5523 .  nr doc-curr-size \n[.ps]
5525 .  \" append to reference box
5526 .  boxa doc-date
5527 .  ev doc-env-%D
5528 .  evc 0
5529 .  in 0
5530 .  nf
5531 .  doc-do-references
5535 .\" NS doc-publisher-count global register
5536 .\" NS   counter of publisher references
5538 .nr doc-publisher-count 0
5541 .\" NS doc-publisher-name global box
5542 .\" NS   string of collected publisher references
5544 .ds doc-publisher-name
5547 .\" NS %I user macro
5548 .\" NS   [reference] issuer/publisher name
5549 .\" NS
5550 .\" NS modifies:
5551 .\" NS   doc-arg-ptr
5552 .\" NS   doc-curr-font
5553 .\" NS   doc-curr-size
5554 .\" NS   doc-macro-name
5555 .\" NS   doc-publisher-count
5556 .\" NS   doc-reference-count
5557 .\" NS
5558 .\" NS local variables:
5559 .\" NS   doc-env-%I
5560 .\" NS
5561 .\" NS width register `%I' set in doc-common
5563 .de %I
5564 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5565 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5566 .    return
5567 .  \}
5569 .  nr doc-publisher-count +1
5570 .  nr doc-reference-count +1
5572 .  ds doc-macro-name %I
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-publisher-name
5581 .  ev doc-env-%I
5582 .  evc 0
5583 .  in 0
5584 .  nf
5585 .  nop \*[doc-Em-font]\c
5586 .  doc-do-references
5590 .\" NS doc-journal-count global register
5591 .\" NS   counter of journal references
5593 .nr doc-journal-count 0
5596 .\" NS doc-journal-name global box
5597 .\" NS   string of collected journal references
5599 .ds doc-journal-name
5602 .\" NS %J user macro
5603 .\" NS   [reference] Journal Name
5604 .\" NS
5605 .\" NS modifies:
5606 .\" NS   doc-arg-ptr
5607 .\" NS   doc-curr-font
5608 .\" NS   doc-curr-size
5609 .\" NS   doc-journal-count
5610 .\" NS   doc-macro-name
5611 .\" NS   doc-reference-count
5612 .\" NS
5613 .\" NS local variables:
5614 .\" NS   doc-env-%J
5615 .\" NS
5616 .\" NS width register `%J' set in doc-common
5618 .de %J
5619 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5620 .    tm Usage: .%J journal_name ... (#\n[.c])
5621 .    return
5622 .  \}
5624 .  nr doc-journal-count +1
5625 .  nr doc-reference-count +1
5627 .  ds doc-macro-name %J
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-journal-name
5636 .  ev doc-env-%J
5637 .  evc 0
5638 .  in 0
5639 .  nf
5640 .  nop \*[doc-Em-font]\c
5641 .  doc-do-references
5645 .\" NS doc-issue-count global register
5646 .\" NS   counter of issue number references
5648 .nr doc-issue-count 0
5651 .\" NS doc-issue-name global box
5652 .\" NS   string of collected issue number references
5654 .ds doc-issue-name
5657 .\" NS %N user macro
5658 .\" NS   [reference] issue number
5659 .\" NS
5660 .\" NS modifies:
5661 .\" NS   doc-arg-ptr
5662 .\" NS   doc-curr-font
5663 .\" NS   doc-curr-size
5664 .\" NS   doc-issue-count
5665 .\" NS   doc-macro-name
5666 .\" NS   doc-reference-count
5667 .\" NS
5668 .\" NS local variables:
5669 .\" NS   doc-env-%N
5670 .\" NS
5671 .\" NS width register `%N' set in doc-common
5673 .de %N
5674 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5675 .    tm Usage: .%N issue_number ... (#\n[.c])
5676 .    return
5677 .  \}
5679 .  nr doc-issue-count +1
5680 .  nr doc-reference-count +1
5682 .  ds doc-macro-name %N
5683 .  doc-parse-args \$@
5685 .  nr doc-arg-ptr +1
5686 .  nr doc-curr-font \n[.f]
5687 .  nr doc-curr-size \n[.ps]
5689 .  \" append to reference box
5690 .  boxa doc-issue-name
5691 .  ev doc-env-%N
5692 .  evc 0
5693 .  in 0
5694 .  nf
5695 .  doc-do-references
5699 .\" NS doc-optional-count global register
5700 .\" NS   counter of optional information references
5702 .nr doc-optional-count 0
5705 .\" NS doc-optional-string global box
5706 .\" NS   string of collected optional information references
5708 .ds doc-optional-string
5711 .\" NS %O user macro
5712 .\" NS   [reference] optional information
5713 .\" NS
5714 .\" NS modifies:
5715 .\" NS   doc-arg-ptr
5716 .\" NS   doc-curr-font
5717 .\" NS   doc-curr-size
5718 .\" NS   doc-macro-name
5719 .\" NS   doc-optional-count
5720 .\" NS   doc-reference-count
5721 .\" NS
5722 .\" NS local variables:
5723 .\" NS   doc-env-%O
5724 .\" NS
5725 .\" NS width register `%O' set in doc-common
5727 .de %O
5728 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5729 .    tm Usage: .%O optional_information ... (#\n[.c])
5730 .    return
5731 .  \}
5733 .  nr doc-optional-count +1
5734 .  nr doc-reference-count +1
5736 .  ds doc-macro-name %O
5737 .  doc-parse-args \$@
5739 .  nr doc-arg-ptr +1
5740 .  nr doc-curr-font \n[.f]
5741 .  nr doc-curr-size \n[.ps]
5743 .  \" append to reference box
5744 .  boxa doc-optional-string
5745 .  ev doc-env-%O
5746 .  evc 0
5747 .  in 0
5748 .  nf
5749 .  doc-do-references
5753 .\" NS doc-page-number-count global register
5754 .\" NS   counter of page number references
5756 .nr doc-page-number-count 0
5759 .\" NS doc-page-number-string global box
5760 .\" NS   string of collected page number references
5762 .ds doc-page-number-string
5765 .\" NS %P user macro
5766 .\" NS   [reference] page numbers
5767 .\" NS
5768 .\" NS modifies:
5769 .\" NS   doc-arg-ptr
5770 .\" NS   doc-curr-font
5771 .\" NS   doc-curr-size
5772 .\" NS   doc-macro-name
5773 .\" NS   doc-page-number-count
5774 .\" NS   doc-reference-count
5775 .\" NS
5776 .\" NS local variables:
5777 .\" NS   doc-env-%P
5778 .\" NS
5779 .\" NS width register `%P' set in doc-common
5781 .de %P
5782 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5783 .    tm Usage: .%P page_number ... (#\n[.c])
5784 .    return
5785 .  \}
5787 .  nr doc-page-number-count +1
5788 .  nr doc-reference-count +1
5790 .  ds doc-macro-name %P
5791 .  doc-parse-args \$@
5793 .  nr doc-arg-ptr +1
5794 .  nr doc-curr-font \n[.f]
5795 .  nr doc-curr-size \n[.ps]
5797 .  \" append to reference box
5798 .  boxa doc-page-number-string
5799 .  ev doc-env-%P
5800 .  evc 0
5801 .  in 0
5802 .  nf
5803 .  doc-do-references
5807 .\" NS doc-corporate-count global register
5808 .\" NS   counter of corporate references
5810 .nr doc-corporate-count 0
5813 .\" NS doc-corporate-name global box
5814 .\" NS   string of collected corporate references
5816 .ds doc-corporate-name
5819 .\" NS %Q user macro
5820 .\" NS   corporate or foreign author
5821 .\" NS
5822 .\" NS modifies:
5823 .\" NS   doc-arg-ptr
5824 .\" NS   doc-corporate-count
5825 .\" NS   doc-curr-font
5826 .\" NS   doc-curr-size
5827 .\" NS   doc-macro-name
5828 .\" NS   doc-reference-count
5829 .\" NS
5830 .\" NS local variables:
5831 .\" NS   doc-env-%Q
5832 .\" NS
5833 .\" NS width register `%Q' set in doc-common
5835 .de %Q
5836 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5837 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5838 .    return
5839 .  \}
5841 .  nr doc-corporate-count +1
5842 .  nr doc-reference-count +1
5844 .  ds doc-macro-name %Q
5845 .  doc-parse-args \$@
5847 .  nr doc-arg-ptr +1
5848 .  nr doc-curr-font \n[.f]
5849 .  nr doc-curr-size \n[.ps]
5851 .  \" append to reference box
5852 .  boxa doc-corporate-name
5853 .  ev doc-env-%Q
5854 .  evc 0
5855 .  in 0
5856 .  nf
5857 .  doc-do-references
5861 .\" NS doc-report-count global register
5862 .\" NS   counter of report references
5864 .nr doc-report-count 0
5867 .\" NS doc-report-name global box
5868 .\" NS   string of collected report references
5870 .ds doc-report-name
5873 .\" NS %R user macro
5874 .\" NS   [reference] report name
5875 .\" NS
5876 .\" NS modifies:
5877 .\" NS   doc-arg-ptr
5878 .\" NS   doc-curr-font
5879 .\" NS   doc-curr-size
5880 .\" NS   doc-macro-name
5881 .\" NS   doc-reference-count
5882 .\" NS   doc-report-count
5883 .\" NS
5884 .\" NS local variables:
5885 .\" NS   doc-env-%R
5886 .\" NS
5887 .\" NS width register `%R' set in doc-common
5889 .de %R
5890 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5891 .    tm Usage: .%R reference_report ... (#\n[.c])
5892 .    return
5893 .  \}
5895 .  nr doc-report-count +1
5896 .  nr doc-reference-count +1
5898 .  ds doc-macro-name %R
5899 .  doc-parse-args \$@
5901 .  nr doc-arg-ptr +1
5902 .  nr doc-curr-font \n[.f]
5903 .  nr doc-curr-size \n[.ps]
5905 .  \" append to reference box
5906 .  boxa doc-report-name
5907 .  ev doc-env-%R
5908 .  evc 0
5909 .  in 0
5910 .  nf
5911 .  doc-do-references
5915 .\" NS doc-reference-title-count global register
5916 .\" NS   counter of reference title references
5918 .nr doc-reference-title-count 0
5921 .\" NS doc-reference-title-name global box
5922 .\" NS   string of collected reference title references
5924 .ds doc-reference-title-name
5927 .\" NS doc-reference-title-name-for-book global box
5928 .\" NS   string of collected reference title references
5929 .\" NS   (saved with another font; this is a shortcoming of groff)
5931 .ds doc-reference-title-name-for-book
5934 .\" NS %T user macro
5935 .\" NS   reference title
5936 .\" NS
5937 .\" NS modifies:
5938 .\" NS   doc-arg-ptr
5939 .\" NS   doc-curr-font
5940 .\" NS   doc-curr-size
5941 .\" NS   doc-macro-name
5942 .\" NS   doc-reference-title-count
5943 .\" NS   doc-report-count
5944 .\" NS
5945 .\" NS local variables:
5946 .\" NS   doc-env-%T
5947 .\" NS
5948 .\" NS width register `%T' set in doc-common
5950 .de %T
5951 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5952 .    tm Usage: .%T reference_title ... (#\n[.c])
5953 .    return
5954 .  \}
5956 .  if \n[doc-is-reference] \{\
5957 .    nr doc-reference-title-count +1
5958 .    nr doc-reference-count +1
5959 .  \}
5961 .  ds doc-macro-name %T
5962 .  doc-parse-args \$@
5964 .  nr doc-arg-ptr +1
5965 .  nr doc-curr-font \n[.f]
5966 .  nr doc-curr-size \n[.ps]
5967 .  ie \n[doc-is-reference] \{\
5968 .    \" append to reference box
5969 .    boxa doc-reference-title-name-for-book
5970 .    ev doc-env-%T
5971 .    evc 0
5972 .    in 0
5973 .    nf
5974 .    nop \*[doc-No-font]\c
5975 .    doc-do-references
5977 .    \" do it a second time with another font
5978 .    ds doc-macro-name %T
5979 .    doc-parse-args \$@
5981 .    nr doc-arg-ptr +1
5982 .    nr doc-curr-font \n[.f]
5983 .    nr doc-curr-size \n[.ps]
5984 .    boxa doc-reference-title-name
5985 .    ev doc-env-%T
5986 .    evc 0
5987 .    in 0
5988 .    nf
5989 .    nop \*[doc-Em-font]\c
5990 .    doc-do-references
5991 .  \}
5992 .  el \{\
5993 .    nop \*[doc-Em-font]\c
5994 .    doc-print-recursive
5995 .  \}
5999 .\" NS doc-volume-count global register
6000 .\" NS   counter of reference title references
6002 .nr doc-volume-count 0
6005 .\" NS doc-volume-name global box
6006 .\" NS   string of collected volume references
6008 .ds doc-volume-name
6011 .\" NS %V user macro
6012 .\" NS   reference volume
6013 .\" NS
6014 .\" NS modifies:
6015 .\" NS   doc-arg-ptr
6016 .\" NS   doc-curr-font
6017 .\" NS   doc-curr-size
6018 .\" NS   doc-macro-name
6019 .\" NS   doc-reference-title-count
6020 .\" NS   doc-volume-count
6021 .\" NS
6022 .\" NS local variables:
6023 .\" NS   doc-env-%V
6024 .\" NS
6025 .\" NS width register `%V' set in doc-common
6027 .de %V
6028 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6029 .    tm Usage: .%V volume ... (#\n[.c])
6030 .    return
6031 .  \}
6033 .  nr doc-volume-count +1
6034 .  nr doc-reference-count +1
6036 .  ds doc-macro-name %V
6037 .  doc-parse-args \$@
6039 .  nr doc-arg-ptr +1
6040 .  nr doc-curr-font \n[.f]
6041 .  nr doc-curr-size \n[.ps]
6043 .  \" append to reference box
6044 .  boxa doc-volume-name
6045 .  ev doc-env-%V
6046 .  evc 0
6047 .  in 0
6048 .  nf
6049 .  doc-do-references
6053 .\" NS doc-do-references macro
6054 .\" NS   reference recursion routine
6055 .\" NS
6056 .\" NS modifies:
6057 .\" NS   doc-arg-ptr
6058 .\" NS
6059 .\" NS local variables:
6060 .\" NS   doc-reg-ddr
6061 .\" NS   doc-reg-ddr1
6063 .de doc-do-references
6064 .  if !\n[doc-is-reference] \
6065 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6067 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6069 .  ie (\n[doc-reg-ddr1] == 1) \{\
6070 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6071 .    doc-append-arg \c 3
6072 .    \*[doc-arg\n[doc-arg-ptr]]
6073 .  \}
6074 .  el \{\
6075 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6077 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6078 .      \" finish reference box
6079 .      br
6080 .      ev
6081 .      boxa
6083 .      doc-reset-args
6084 .    \}
6085 .    el \{\
6086 .      nr doc-reg-ddr \n[doc-arg-ptr]
6087 .      nr doc-arg-ptr +1
6088 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6089 .      doc-do-references
6090 .  \}\}
6094 .\" NS Hf user macro
6095 .\" NS   source include header files.
6096 .\" NS
6097 .\" NS modifies:
6098 .\" NS   doc-curr-font
6099 .\" NS   doc-curr-size
6100 .\" NS
6101 .\" NS width register `Hf' set in doc-common
6103 .de Hf
6104 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6105 .    doc-paragraph
6106 .    nop File:
6107 .    Pa \$1
6109 .    Bd -literal
6110 .    so \$1
6111 .    Ed
6113 .    doc-paragraph
6114 .  \}
6115 .  el \
6116 .    Usage: .Hf file (#\n[.c])
6120 .\" NS doc-have-author global register (bool)
6121 .\" NS   set in `An'
6123 .nr doc-have-author 0
6126 .\" NS An user macro
6127 .\" NS   author name
6128 .\" NS
6129 .\" NS modifies:
6130 .\" NS   doc-arg-ptr
6131 .\" NS   doc-curr-font
6132 .\" NS   doc-curr-size
6133 .\" NS   doc-have-author
6134 .\" NS   doc-macro-name
6135 .\" NS
6136 .\" NS width register `An' set in doc-common
6138 .de An
6139 .  if !\n[doc-arg-limit] \{\
6140 .    ie \n[.$] \{\
6141 .      ie        "\$1"-nosplit" \
6142 .        nr doc-in-authors-section 0
6143 .      el \{ .ie "\$1"-split" \
6144 .        nr doc-in-authors-section 1
6145 .      el \{\
6146 .        ds doc-macro-name An
6147 .        doc-parse-args \$@
6148 .    \}\}\}
6149 .    el \{\
6150 .      tm1 "Usage: .An {-nosplit | -split}
6151 .      tm1         .An author_name ... (#\n[.c])
6152 .  \}\}
6154 .  if \n[doc-in-authors-section] \{\
6155 .    ie \n[doc-have-author] \
6156 .      br
6157 .    el \
6158 .      nr doc-have-author 1
6159 .  \}
6161 .  if \n[doc-arg-limit] \{\
6162 .    nr doc-arg-ptr +1
6163 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6164 .      nr doc-curr-font \n[.f]
6165 .      nr doc-curr-size \n[.ps]
6166 .      doc-print-recursive
6167 .    \}
6168 .    el \{\
6169 .      tm Usage: .An author_name ... (#\n[.c])
6170 .      doc-reset-args
6171 .  \}\}
6175 .\" NS Rv user macro
6176 .\" NS   return values
6177 .\" NS
6178 .\" NS width register `Rv' set in doc-common
6179 .\" NS
6180 .\" NS local variables:
6181 .\" NS   doc-str-Rv-std-prefix
6182 .\" NS   doc-str-Rv-std-suffix
6183 .\" NS   doc-str-Rv-stds-prefix
6184 .\" NS   doc-str-Rv-stds-and
6185 .\" NS   doc-str-Rv-stds-suffix
6186 .\" NS   doc-str-Rv-std0
6188 .ds doc-str-Rv-std-prefix "The
6189 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6190 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6191 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6192 .as doc-str-Rv-std-suffix " is set to indicate the error.
6194 .ds doc-str-Rv-stds-prefix "The
6195 .ds doc-str-Rv-stds-and    "and
6196 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6197 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6198 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6199 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6201 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6202 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6203 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6204 .as doc-str-Rv-std0 " is set to indicate the error.
6206 .de Rv
6208 .\" XXX: what does this function without `-std'?
6210 .  if \n[doc-arg-limit] \{\
6211 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6212 .    doc-reset-args
6213 .    return
6214 .  \}
6216 .  if !\n[.$] \{\
6217 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6218 .    return
6219 .  \}
6221 .  if "\$1"-std" \{\
6222 .    nr doc-reg-Rv \*[doc-section]
6223 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6224 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6225 .    br
6226 .    shift
6227 .    ie (\n[.$] > 1) \{\
6228 .      nop \)\*[doc-str-Rv-stds-prefix]
6229 .      nr doc-reg-Rv 1
6230 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6231 .        ie (\n[.$] > 2) \
6232 .          Fn \$\n[doc-reg-Rv] ,
6233 .        el \
6234 .          Fn \$\n[doc-reg-Rv]
6235 .        nr doc-reg-Rv +1
6236 .      \}
6237 .      nop \)\*[doc-str-Rv-stds-and]
6238 .      Fn \$\n[.$]
6239 .      nop \)\*[doc-str-Rv-stds-suffix]
6240 .    \}
6241 .    el \{ .ie (\n[.$] == 1) \{\
6242 .      nop \)\*[doc-str-Rv-std-prefix]
6243 .      Fn \$1
6244 .      nop \)\*[doc-str-Rv-std-suffix]
6245 .    \}
6246 .    el \{\
6247 .      nop \)\*[doc-str-Rv-std0]
6248 .  \}\}\}
6252 .\" NS Ex user macro
6253 .\" NS   exit status
6254 .\" NS
6255 .\" NS width register `Ex' set in doc-common
6256 .\" NS
6257 .\" NS local variables:
6258 .\" NS   doc-str-Ex-std-prefix
6259 .\" NS   doc-str-Ex-std-suffix
6261 .ds doc-str-Ex-std-prefix "The
6262 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6263 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6265 .ds doc-str-Ex-stds-prefix "The
6266 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6267 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6268 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6270 .de Ex
6272 .\" XXX: what does this function without `-std'?
6274 .  if \n[doc-arg-limit] \{\
6275 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6276 .    doc-reset-args
6277 .    return
6278 .  \}
6280 .  if !\n[.$] \{\
6281 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6282 .    return
6283 .  \}
6285 .  if "\$1"-std" \{\
6286 .    nr doc-reg-Ex \*[doc-section]
6287 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6288 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6289 .    br
6290 .    shift
6291 .    ie (\n[.$] > 1) \{\
6292 .      nop \)\*[doc-str-Ex-stds-prefix]
6293 .      nr doc-reg-Ex 1
6294 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6295 .        ie (\n[.$] > 2) \
6296 .          Nm \$\n[doc-reg-Ex] ,
6297 .        el \
6298 .          Nm \$\n[doc-reg-Ex]
6299 .        nr doc-reg-Ex +1
6300 .      \}
6301 .      nop \)\*[doc-str-Ex-stds-and]
6302 .      Nm \$\n[.$]
6303 .      nop \)\*[doc-str-Ex-stds-suffix]
6304 .    \}
6305 .    el \{\
6306 .      nop \)\*[doc-str-Ex-std-prefix]
6307 .      Nm \$1
6308 .      nop \)\*[doc-str-Ex-std-suffix]
6309 .  \}\}
6313 .\" NS Mt user macro
6314 .\" NS   mailto (for conversion to HTML)
6316 .de Mt
6317 .  \" XXX: error handling missing
6318 .  Pa \$@
6322 .\" NS Lk user macro
6323 .\" NS   link (for conversion to HTML)
6324 .\" NS
6325 .\" NS local variables:
6326 .\" NS   doc-reg-Lk
6327 .\" NS   doc-str-Lk
6329 .de Lk
6330 .  ds doc-str-Lk Sy \$@
6332 .  ie (\n[.$] > 1) \{\
6333 .    doc-get-arg-type \$2
6334 .    ie (\n[doc-arg-type] < 3) \{\
6335 .      Em \)\$2:
6336 .      ds doc-str-Lk Sy "\$1"
6337 .      doc-get-width "\$1"
6338 .      shift 2
6339 .      if \n[.$] \
6340 .        as doc-str-Lk " \$@
6341 .    \}
6342 .    el \
6343 .      doc-get-width "\$1"
6344 .  \}
6345 .  el \
6346 .    doc-get-width "\$1"
6348 .  ie n \
6349 .    nr doc-reg-Lk 26
6350 .  el \
6351 .    nr doc-reg-Lk 38
6352 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6353 .    D1 \*[doc-str-Lk]
6354 .  el \
6355 .    \*[doc-str-Lk]
6359 .\" NS doc-defunct-macro macro
6360 .\" NS   this is the skeleton for defunct macros
6361 .\" NS
6363 .de doc-defunct-macro
6364 .  tmc mdoc error: .\$0 defunct
6365 .  if d doc-\$0-usage \
6366 .    tmc , \*[doc-\$0-usage]
6367 .  tm1 " (#\n[.c])
6371 .\" obsolete macros
6373 .als Db doc-defunct-macro
6375 .als Ds doc-defunct-macro
6377 .als Or doc-defunct-macro
6378 .ds doc-Or-usage use `|'
6380 .als Sf doc-defunct-macro
6381 .ds doc-Sf-usage use .Pf or .Ns
6384 .rn em e@
6386 .de em
6387 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6388 .  tm1 "            Should this have been `.Em ...'?
6389 .  ab
6393 .\" NS doc-empty-line macro
6394 .\" NS   emit warning and print empty line
6396 .de doc-empty-line
6397 .  if !\n[doc-display-depth] \
6398 .    tm mdoc warning: Empty input line #\n[.c]
6399 .  sp
6402 .blm doc-empty-line
6408 .\" load local modifications
6409 .mso mdoc.local
6411 .\" EOF