s-gnu-diff.sh: removed
[s-roff.git] / tmac / doc.tmac
blob55094ec1e4794ff65c363d7458b6096245cb30e2
1 .\"@ doc.tmac
2 .\"@ Main file for the mdoc semantic markup language.
3 .\"
4 .\" Copyright (c) 1991, 1993
5 .\"     The Regents of the University of California.  All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. [Deleted.  See
16 .\"     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)doc 8.1 (Berkeley) 06/08/93
34 .\"
35 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
36 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
37 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
38 .\" are loaded using the `mso' request.
39 .\"
40 .\" Modified by
41 .\"
42 .\"   Werner LEMBERG <wl@gnu.org>      and
43 .\"   Ruslan Ermilov <ru@freebsd.org>
44 .\"
45 .\" to make it more readable: using long names and many groff features,
46 .\" updating and extending documentation, etc.
47 .\"
48 .\" Adapted to S-roff by Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
49 .\"
50 .\" %beginstrip%
53 .if !\n(.g \
54 .  ab This version of mdoc can only be run with groff / compatible!
57 .do if d Dd .nx
60 .cp 0
63 .if (\n[.x]\n[.y] < 118) \
64 .  ab You need a newer troff version (v1.18 or higher) for this version of mdoc!
67 .\" Load start-up files
68 .ie t \
69 .  mso mdoc-ditroff
70 .el \
71 .  mso mdoc-nroff
73 .mso mdoc-common
74 .mso mdoc-syms
77 .eo
80 .\" NS doc-macro-name global string
81 .\" NS   name of calling request (set in each user-requestable macro)
83 .ds doc-macro-name
84 .als doc-arg0 doc-macro-name
87 .\" NS doc-arg-limit global register
88 .\" NS   total number of arguments
90 .nr doc-arg-limit 0
93 .\" NS doc-num-args global register
94 .\" NS   number of arguments to handle (must be set to \n[.$] prior to
95 .\" NS   `doc-parse-arg-vector' request)
97 .nr doc-num-args 0
100 .\" NS doc-arg-ptr global register
101 .\" NS   argument pointer
103 .nr doc-arg-ptr 0
106 .\" NS doc-argXXX global string
107 .\" NS   argument vector
108 .\" NS
109 .\" NS limit:
110 .\" NS   doc-arg-limit
112 .ds doc-arg1
115 .\" NS doc-typeXXX global register
116 .\" NS   argument type vector (macro=1, string=2, punctuation suffix=3,
117 .\" NS   punctuation prefix=4)
118 .\" NS
119 .\" NS limit:
120 .\" NS   doc-arg-limit
122 .nr doc-type1 0
125 .\" NS doc-spaceXXX global string
126 .\" NS   space vector
127 .\" NS
128 .\" NS limit:
129 .\" NS   doc-arg-limit
131 .ds doc-space1
134 .\" NS doc-parse-args macro
135 .\" NS   parse arguments (recursively) (`.doc-parse-args arg ...')
136 .\" NS
137 .\" NS modifies:
138 .\" NS   doc-arg-limit
139 .\" NS   doc-arg-ptr
140 .\" NS   doc-argXXX
141 .\" NS   doc-spaceXXX
142 .\" NS   doc-typeXXX
143 .\" NS   doc-arg-ptr
144 .\" NS   doc-have-space
145 .\" NS
146 .\" NS local variables:
147 .\" NS   doc-reg-dpa
148 .\" NS   doc-reg-dpa1
149 .\" NS   doc-str-dpa
151 .de doc-parse-args
152 .  if !\n[doc-arg-limit] \
153 .    doc-set-spacing-1
155 .  nr doc-have-space 0
157 .  if !\n[.$] \
158 .    return
160 .  nr doc-arg-limit +1
162 .  \" handle `|' and `...' specially
163 .  ie        "\$1"|" \
164 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
165 .  el \{ .ie "\$1"..." \
166 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
167 .  el \
168 .    ds doc-arg\n[doc-arg-limit] "\$1
169 .  \}
171 .  \" get argument type and set spacing
172 .  doc-get-arg-type* \n[doc-arg-limit]
173 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
174 .  doc-set-spacing-\n[doc-arg-type]
176 .  \" check whether we have processed the last parameter
177 .  ie (\n[.$] == 1) \
178 .    nr doc-arg-ptr 0
179 .  el \{\
180 .    shift
181 .    doc-parse-args \$@
182 .  \}
184 .  nh
188 .\" NS doc-parse-arg-vector macro
189 .\" NS   parse argument vector (recursive)
190 .\" NS
191 .\" NS   cf. comments in doc-parse-args
192 .\" NS
193 .\" NS modifies:
194 .\" NS   doc-arg-limit
195 .\" NS   doc-arg-ptr
196 .\" NS   doc-argXXX
197 .\" NS   doc-num-args
198 .\" NS   doc-spaceXXX
199 .\" NS   doc-typeXXX
200 .\" NS
201 .\" NS local variables:
202 .\" NS   doc-reg-dpav
203 .\" NS   doc-reg-dpav1
204 .\" NS   doc-str-dpav
206 .de doc-parse-arg-vector
207 .  if !\n[doc-arg-limit] \
208 .    doc-set-spacing-1
210 .  nr doc-arg-limit +1
212 .  ie        "\*[doc-arg\n[doc-arg-limit]]"|" \
213 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
214 .  el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
215 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
216 .  \}
218 .  doc-get-arg-type* \n[doc-arg-limit]
219 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
220 .  doc-set-spacing-\n[doc-arg-type]
222 .  ie (\n[doc-num-args] == 1) \{\
223 .    nr doc-arg-ptr 0
224 .    nr doc-num-args 0
225 .  \}
226 .  el \{\
227 .    nr doc-num-args -1
228 .    doc-parse-arg-vector
229 .  \}
231 .  nh
235 .\" NS doc-parse-space-vector macro
236 .\" NS   parse space vector (recursive)
237 .\" NS
238 .\" NS modifies:
239 .\" NS   doc-arg-limit
240 .\" NS   doc-num-args
241 .\" NS   doc-spaceXXX
243 .de doc-parse-space-vector
244 .  nr doc-arg-limit +1
246 .  doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
248 .  ie (\n[doc-num-args] == 1) \
249 .    nr doc-num-args 0
250 .  el \{\
251 .    nr doc-num-args -1
252 .    doc-parse-space-vector
253 .  \}
257 .\" NS doc-remaining-args macro
258 .\" NS   output remaining arguments as-is, separated by spaces (until
259 .\" NS   `doc-num-args' is exhausted)
260 .\" NS
261 .\" NS modifies:
262 .\" NS   doc-arg-ptr
263 .\" NS   doc-num-args
265 .de doc-remaining-args
266 .  nr doc-arg-ptr +1
267 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
269 .  ie (\n[doc-num-args] == 1) \{\
270 .    nr doc-arg-ptr 0
271 .    nr doc-num-args 0
272 .  \}
273 .  el \{\
274 .    nop \)\*[doc-space]\c
275 .    nr doc-num-args -1
276 .    doc-remaining-args
277 .  \}
281 .\" NS doc-append-arg macro
282 .\" NS   append one argument to argument vector:
283 .\" NS   `.doc-append-arg [arg] [type]'
284 .\" NS
285 .\" NS modifies:
286 .\" NS   doc-arg-limit
287 .\" NS   doc-argXXX
288 .\" NS   doc-typeXXX
290 .de doc-append-arg
291 .  nr doc-arg-limit +1
292 .  ds doc-arg\n[doc-arg-limit] "\$1
293 .  nr doc-type\n[doc-arg-limit] \$2
294 .  doc-set-spacing-\$2
298 .\" NS doc-print-and-reset macro
299 .\" NS   finish input line and clean up argument vectors
301 .de doc-print-and-reset
302 .  if \n[doc-space-mode] \
303 .    nop \)
304 .  doc-reset-args
308 .\" NS doc-reset-args macro
309 .\" NS   reset argument counters
310 .\" NS
311 .\" NS modifies:
312 .\" NS   doc-arg-limit
313 .\" NS   doc-arg-ptr
314 .\" NS   doc-have-slot
316 .de doc-reset-args
317 .  nr doc-arg-limit 0
318 .  nr doc-arg-ptr 0
319 .  nr doc-have-slot 0
321 .  hy \n[doc-hyphen-flags]
327 .\" NS doc-curr-font global register
328 .\" NS   saved current font
330 .nr doc-curr-font \n[.f]
333 .\" NS doc-curr-size global register
334 .\" NS   saved current font size
336 .nr doc-curr-size \n[.ps]
341 .\" NS Fl user macro
342 .\" NS   handle flags (appends `-' and prints flags): `.Fl [arg ...]'
343 .\" NS
344 .\" NS modifies:
345 .\" NS   doc-arg-ptr
346 .\" NS   doc-curr-font
347 .\" NS   doc-curr-size
348 .\" NS   doc-macro-name
349 .\" NS
350 .\" NS local variables:
351 .\" NS   doc-reg-Fl (for communication with doc-flag-recursion)
352 .\" NS
353 .\" NS width register `Fl' set in doc-common
355 .de Fl
356 .  nr doc-curr-font \n[.f]
357 .  nr doc-curr-size \n[.ps]
358 .  nop \*[doc-Fl-font]\c
360 .  if !\n[doc-arg-limit] \{\
361 .    ds doc-macro-name Fl
362 .    doc-parse-args \$@
364 .    \" no arguments
365 .    if !\n[.$] \
366 .      nop \|\-\|\f[]\s[0]
367 .  \}
369 .  if !\n[doc-arg-limit] \
370 .    return
372 .  nr doc-arg-ptr +1
373 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
374 .    \" last argument
375 .    nop \|\-\f[]\s[0]\c
376 .    doc-print-and-reset
377 .  \}
378 .  el \{\
379 .    ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
380 .      nop \|\-\f[]\s[0]\c
381 .      \*[doc-arg\n[doc-arg-ptr]]
382 .    \}
383 .    el \{\
384 .      if (\n[doc-type\n[doc-arg-ptr]] == 3) \
385 .        nop \|\-\|\c
387 .      nr doc-reg-Fl 1
388 .      doc-flag-recursion
389 .  \}\}
393 .\" NS doc-flag-recursion macro
394 .\" NS   `Fl' flag recursion routine (special handling)
395 .\" NS
396 .\" NS modifies:
397 .\" NS   doc-arg-ptr
398 .\" NS
399 .\" NS local variables:
400 .\" NS   doc-reg-dfr
401 .\" NS   doc-reg-dfr1
402 .\" NS   doc-str-dfr
404 .de doc-flag-recursion
405 .  nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
406 .  ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
408 .  ie (\n[doc-reg-dfr1] == 1) \{\
409 .    nop \f[]\s[0]\c
410 .    \*[doc-str-dfr]
411 .  \}
412 .  el \{\
413 .    nr doc-reg-dfr \n[doc-arg-ptr]
415 .    ie (\n[doc-reg-dfr1] == 2) \{\
416 .      \" handle vertical bar -- doc-reg-Fl is set for the first call of
417 .      \" doc-flag-recursion only; we need this to make `.Fl | ...' work
418 .      \" correctly
419 .      ie "\*[doc-str-dfr]"\*[Ba]" \{\
420 .        if \n[doc-reg-Fl] \
421 .          nop \|\-\*[doc-space]\c
422 .        nop \)\*[Ba]\c
423 .      \}
424 .      el \{\
425 .        ie "\*[doc-str-dfr]"\f[R]|\f[]" \{\
426 .          if \n[doc-reg-Fl] \
427 .            nop \|\-\*[doc-space]\c
428 .          nop \f[R]|\f[]\c
429 .        \}
430 .        el \{\
431 .          \" two consecutive hyphen characters?
432 .          ie "\*[doc-str-dfr]"-" \
433 .            nop \|\-\^\-\|\c
434 .          el \
435 .            nop \|\%\-\*[doc-str-dfr]\&\c
436 .    \}\}\}
437 .    el \{\
438 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
439 .      nop \)\*[doc-str-dfr]\f[]\s[0]\c
440 .    \}
442 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
443 .      \" last argument
444 .      if (\n[doc-reg-dfr1] == 4) \
445 .        nop \|\-\c
446 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
447 .      doc-print-and-reset
448 .    \}
449 .    el \{\
450 .      nr doc-arg-ptr +1
451 .      ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
452 .        ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
453 .          nop \|\-\c
454 .        el \
455 .          nop \)\*[doc-space\n[doc-reg-dfr]]\c
456 .      \}
457 .      el \
458 .        nop \)\*[doc-space\n[doc-reg-dfr]]\c
460 .      shift
461 .      nr doc-reg-Fl 0
462 .      doc-flag-recursion \$@
463 .  \}\}
467 .\" NS doc-print-recursive macro
468 .\" NS   general name recursion routine (print remaining arguments)
469 .\" NS
470 .\" NS modifies:
471 .\" NS   doc-arg-ptr
472 .\" NS
473 .\" NS local variables:
474 .\" NS   doc-reg-dpr
475 .\" NS   doc-reg-dpr1
476 .\" NS   doc-str-dpr
478 .de doc-print-recursive
479 .  nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
480 .  ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
482 .  ie (\n[doc-reg-dpr1] == 1) \{\
483 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
484 .    \*[doc-str-dpr]
485 .  \}
486 .  el \{\
487 .    nr doc-reg-dpr \n[doc-arg-ptr]
489 .    \" the `\%' prevents hyphenation on a dash (`-')
490 .    ie (\n[doc-reg-dpr1] == 2) \
491 .      nop \%\*[doc-str-dpr]\&\c
492 .    el \{\
493 .      \" punctuation character
494 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
495 .      nop \)\*[doc-str-dpr]\f[]\s[0]\c
496 .    \}
498 .    nr doc-arg-ptr +1
499 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
500 .      \" last argument
501 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
502 .      doc-print-and-reset
503 .    \}
504 .    el \{\
505 .      nop \)\*[doc-space\n[doc-reg-dpr]]\c
506 .      doc-print-recursive
507 .  \}\}
511 .\" NS doc-print-prefixes macro
512 .\" NS   print leading prefixes
513 .\" NS
514 .\" NS modifies:
515 .\" NS   doc-arg-ptr
517 .de doc-print-prefixes
518 .  while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
519 .    if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
520 .      break
521 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
522 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
523 .    nr doc-arg-ptr +1
524 .  \}
528 .\" NS doc-generic-macro macro
529 .\" NS   this is the skeleton for most simple macros
530 .\" NS
531 .\" NS modifies:
532 .\" NS   doc-arg-ptr
533 .\" NS   doc-curr-font
534 .\" NS   doc-curr-size
535 .\" NS   doc-macro-name
537 .de doc-generic-macro
538 .  if !\n[doc-arg-limit] \{\
539 .    ie \n[.$] \{\
540 .      ds doc-macro-name \$0
541 .      doc-parse-args \$@
542 .    \}
543 .    el \
544 .      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
545 .  \}
547 .  if !\n[doc-arg-limit] \
548 .    return
550 .  nr doc-arg-ptr +1
551 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
552 .    if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
553 .      tmc mdoc warning: Using a macro as first argument
554 .      tm1 " cancels effect of .\$0 (#\n[.c])
556 .      \" the right action here would be to reset the argument counters
557 .      \" and bail out -- unfortunately, a small number of manual pages
558 .      \" (less than 2% for FreeBSD which has been used for testing)
559 .      \" relied on the old behaviour (silently ignore this error),
560 .      \" so it is commented out
562 .\"    doc-reset-args
563 .    \}
564 .\"  el \{\
565 .      nr doc-curr-font \n[.f]
566 .      nr doc-curr-size \n[.ps]
567 .      nop \*[doc-\$0-font]\c
568 .      doc-print-recursive
569 .\"  \}
570 .  \}
571 .  el \{\
572 .    tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
573 .    doc-reset-args
574 .  \}
578 .\" NS Ar user macro
579 .\" NS   command line `argument' macro: `.Ar [args ...]'
580 .\" NS
581 .\" NS modifies:
582 .\" NS   doc-arg-ptr
583 .\" NS   doc-curr-font
584 .\" NS   doc-curr-size
585 .\" NS   doc-macro-name
586 .\" NS
587 .\" NS local variable:
588 .\" NS   doc-str-Ar-default
589 .\" NS
590 .\" NS width register `Ar' set in doc-common
592 .ds doc-str-Ar-default "file\ .\|.\|.
594 .de Ar
595 .  nr doc-curr-font \n[.f]
596 .  nr doc-curr-size \n[.ps]
597 .  nop \*[doc-Ar-font]\c
599 .  if !\n[doc-arg-limit] \{\
600 .    ds doc-macro-name Ar
601 .    doc-parse-args \$@
603 .    \" no argument
604 .    if !\n[.$] \
605 .      nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
606 .  \}
608 .  if !\n[doc-arg-limit] \
609 .    return
611 .  nr doc-arg-ptr +1
612 .  doc-print-prefixes
613 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
614 .    nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
615 .    doc-print-and-reset
616 .  \}
617 .  el \{\
618 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
619 .      \" replace previous argument (Ar) with default value
620 .      nr doc-arg-ptr -1
621 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
622 .      nr doc-type\n[doc-arg-ptr] 2
623 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
625 .      \" recompute space vector for remaining arguments
626 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
627 .      nr doc-arg-limit \n[doc-arg-ptr]
628 .      doc-parse-space-vector
629 .    \}
630 .    doc-print-recursive
631 .  \}
635 .\" NS Ad user macro
636 .\" NS   Addresses
637 .\" NS
638 .\" NS width register `Ad' set in doc-common
640 .als Ad doc-generic-macro
641 .ds doc-Ad-usage address
644 .\" NS doc-indent-synopsis global register
645 .\" NS   indentation in synopsis
647 .nr doc-indent-synopsis 0
650 .\" NS doc-indent-synopsis-active global register (bool)
651 .\" NS   indentation in synopsis active
653 .nr doc-indent-synopsis-active 0
656 .\" NS Cd user macro
657 .\" NS   config declaration (for section 4 SYNOPSIS)
658 .\" NS
659 .\" NS   this function causes a break; it uses the `Nm' font
660 .\" NS
661 .\" NS modifies:
662 .\" NS   doc-arg-ptr
663 .\" NS   doc-curr-font
664 .\" NS   doc-curr-size
665 .\" NS   doc-indent-synopsis
666 .\" NS   doc-macro-name
667 .\" NS
668 .\" NS width register `Cd' set in doc-common
670 .de Cd
671 .  if !\n[doc-arg-limit] \{\
672 .    ie \n[.$] \{\
673 .      ds doc-macro-name Cd
674 .      doc-parse-args \$@
675 .    \}
676 .    el \
677 .      tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
678 .  \}
680 .  if !\n[doc-arg-limit] \
681 .    return
683 .  nr doc-arg-ptr +1
684 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
685 .    nr doc-curr-font \n[.f]
686 .    nr doc-curr-size \n[.ps]
688 .    ie \n[doc-in-synopsis-section] \{\
689 .      ie "\*[doc-macro-name]"Cd" \{\
690 .        br
691 .        if !\n[doc-indent-synopsis] \
692 .          nr doc-indent-synopsis \n[doc-display-indent]u
693 .        if !\n[doc-indent-synopsis-active] \
694 .          in +\n[doc-indent-synopsis]u
695 .        ti -\n[doc-indent-synopsis]u
696 .        nop \*[doc-Nm-font]\c
697 .        doc-print-recursive
698 .        if !\n[doc-indent-synopsis-active] \
699 .          in -\n[doc-indent-synopsis]u
700 .      \}
701 .      el \{\
702 .        nop \*[doc-Nm-font]\c
703 .        doc-print-recursive
704 .    \}\}
705 .    el \{\
706 .      nop \*[doc-Nm-font]\c
707 .      doc-print-recursive
708 .  \}\}
709 .  el \{\
710 .    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
711 .    doc-reset-args
712 .  \}
716 .\" NS Cm user macro
717 .\" NS   interactive command modifier (flag)
718 .\" NS
719 .\" NS width register `Cm' set in doc-common
721 .als Cm doc-generic-macro
722 .ds doc-Cm-usage interactive_command_modifier
725 .\" NS Dv user macro
726 .\" NS   defined variable
727 .\" NS
728 .\" NS   this function uses the `Er' font
729 .\" NS
730 .\" NS width register `Dv' set in doc-common
732 .als Dv doc-generic-macro
733 .ds doc-Dv-usage defined_variable
734 .als doc-Dv-font doc-Er-font
737 .\" NS Em user macro
738 .\" NS   emphasis
739 .\" NS
740 .\" NS width register `Em' set in doc-common
742 .als Em doc-generic-macro
743 .ds doc-Em-usage text
746 .\" NS Er user macro
747 .\" NS   errno type
748 .\" NS
749 .\" NS width register `Er' set in doc-common
751 .als Er doc-generic-macro
752 .ds doc-Er-usage text
755 .\" NS Ev user macro
756 .\" NS   environment variable
757 .\" NS
758 .\" NS width register `Ev' set in doc-common
760 .als Ev doc-generic-macro
761 .ds doc-Ev-usage text
764 .\" NS doc-have-decl global register (bool)
765 .\" NS   subroutine test (in synopsis only)
767 .nr doc-have-decl 0
770 .\" NS doc-have-var global register (bool)
771 .\" NS   whether last type is a variable type
773 .nr doc-have-var 0
776 .\" NS doc-do-func-decl macro
777 .\" NS   do something special while in SYNOPSIS
778 .\" NS
779 .\" NS modifies:
780 .\" NS   doc-curr-font
781 .\" NS   doc-curr-size
782 .\" NS   doc-have-decl
783 .\" NS   doc-have-var
785 .de doc-do-func-decl
786 .  if \n[doc-in-synopsis-section] \{\
787 .    \" if a variable type was the last thing given, want vertical space
788 .    if \n[doc-have-var] \{\
789 .      doc-paragraph
790 .      nr doc-have-var 0
791 .    \}
792 .    \" if a subroutine was the last thing given, want vertical space
793 .    if \n[doc-have-func] \{\
794 .      ie \n[doc-have-decl] \
795 .        br
796 .      el \
797 .        doc-paragraph
798 .    \}
799 .    nr doc-have-decl 1
800 .  \}
802 .  nr doc-curr-font \n[.f]
803 .  nr doc-curr-size \n[.ps]
807 .\" NS Fd user macro
808 .\" NS   function declaration -- not callable
809 .\" NS
810 .\" NS   this function causes a break
811 .\" NS
812 .\" NS width register `Fd' set in doc-common
814 .de Fd
815 .  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
816 .    doc-do-func-decl
817 .    nop \*[doc-Fd-font]\$*
818 .    br
819 .    ft \n[doc-curr-font]
820 .    ps \n[doc-curr-size]u
821 .  \}
822 .  el \{\
823 .    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
824 .    doc-reset-args
825 .  \}
829 .\" NS In user macro
830 .\" NS   #include statement in SYNOPSIS
831 .\" NS   <header.h> if not in SYNOPSIS
832 .\" NS
833 .\" NS   this function causes a break; it uses the `Fd' font
834 .\" NS
835 .\" NS modifies:
836 .\" NS   doc-arg-ptr
837 .\" NS   doc-curr-font
838 .\" NS   doc-curr-size
839 .\" NS   doc-indent-synopsis
840 .\" NS   doc-macro-name
841 .\" NS
842 .\" NS width register `In' set in doc-common
844 .de In
845 .  if !\n[doc-arg-limit] \{\
846 .    ie \n[.$] \{\
847 .      ds doc-macro-name In
848 .      doc-parse-args \$@
849 .    \}
850 .    el \
851 .      tm Usage: .In include_file ... (#\n[.c])
852 .  \}
854 .  if !\n[doc-arg-limit] \
855 .    return
857 .  nr doc-arg-ptr +1
858 .  doc-print-prefixes
859 .  ie ((\n[doc-arg-limit] >= \n[doc-arg-ptr]) & (\n[doc-type\n[doc-arg-ptr]] == 2)) \{\
860 .    nr doc-curr-font \n[.f]
861 .    nr doc-curr-size \n[.ps]
863 .    ie \n[doc-in-synopsis-section] \{\
864 .      ie "\*[doc-macro-name]"In" \{\
865 .        doc-do-func-decl
866 .        nop \*[doc-Fd-font]#include <\*[doc-arg\n[doc-arg-ptr]]>
867 .        ft \n[doc-curr-font]
868 .        ps \n[doc-curr-size]u
869 .        br
870 .        nr doc-arg-ptr +1
871 .        ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
872 .          doc-print-recursive
873 .        el \
874 .          doc-reset-args
875 .      \}
876 .      el \{\
877 .        ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
878 .        as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
879 .        doc-print-recursive
880 .    \}\}
881 .    el \{\
882 .      ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
883 .      as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
884 .      doc-print-recursive
885 .  \}\}
886 .  el \{\
887 .    tm Usage: .In include_file ... (#\n[.c])
888 .    doc-reset-args
889 .  \}
893 .\" NS Fr user macro
894 .\" NS   function return value
895 .\" NS
896 .\" NS   this function uses the `Ar' font
897 .\" NS
898 .\" NS width register `Fr' set in doc-common
900 .als Fr doc-generic-macro
901 .ds doc-Fr-usage function_return_value
902 .als doc-Fr-font doc-Ar-font
905 .\" NS Ic user macro
906 .\" NS   interactive command
907 .\" NS
908 .\" NS width register `Ic' set in doc-common
910 .als Ic doc-generic-macro
911 .ds doc-Ic-usage interactive_command
914 .\" NS Li user macro
915 .\" NS   literals
916 .\" NS
917 .\" NS width register `Li' set in doc-common
919 .als Li doc-generic-macro
920 .ds doc-Li-usage argument
923 .\" NS Ms user macro
924 .\" NS   math symbol
925 .\" NS
926 .\" NS   this function uses the `Sy' font
927 .\" NS
928 .\" NS width register `Ms' set in doc-common
930 .als Ms doc-generic-macro
931 .ds doc-Ms-usage math_symbol
932 .als doc-Ms-font doc-Sy-font
935 .\" NS doc-command-name global string
936 .\" NS   save first invocation of .Nm
938 .ds doc-command-name
941 .\" NS Nm user macro
942 .\" NS   name of command or page topic
943 .\" NS
944 .\" NS modifies:
945 .\" NS   doc-arg-ptr
946 .\" NS   doc-command-name
947 .\" NS   doc-curr-font
948 .\" NS   doc-curr-size
949 .\" NS   doc-indent-synopsis
950 .\" NS   doc-indent-synopsis-active
951 .\" NS   doc-macro-name
952 .\" NS
953 .\" NS width register `Nm' set in doc-common
955 .de Nm
956 .  if !\n[doc-arg-limit] \{\
957 .    ds doc-macro-name Nm
958 .    ie \n[.$] \
959 .      doc-parse-args \$@
960 .    el \{\
961 .      ie "\*[doc-command-name]"" \
962 .        tm Usage: .Nm name ... (#\n[.c])
963 .      el \
964 .        doc-parse-args \*[doc-command-name]
965 .  \}\}
967 .  if !\n[doc-arg-limit] \
968 .    return
970 .  nr doc-arg-ptr +1
971 .  doc-print-prefixes
972 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
973 .    \" last argument
974 .    ie "\*[doc-command-name]"" \{\
975 .      tm Usage: .Nm name ... (#\n[.c])
976 .      doc-reset-args
977 .    \}
978 .    el \{\
979 .      nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
980 .      doc-print-and-reset
981 .  \}\}
982 .  el \{\
983 .    nr doc-curr-font \n[.f]
984 .    nr doc-curr-size \n[.ps]
986 .    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
987 .      ie "\*[doc-command-name]"" \
988 .        tm Usage: .Nm name ... (#\n[.c])
989 .      el \{\
990 .        \" replace previous argument (Nm) with default value
991 .        nr doc-arg-ptr -1
992 .        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
993 .        nr doc-type\n[doc-arg-ptr] 2
994 .        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
996 .        \" recompute space vector for remaining arguments
997 .        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
998 .        nr doc-arg-limit \n[doc-arg-ptr]
999 .        doc-parse-space-vector
1000 .    \}\}
1001 .    el \{\
1002 .      \" handle `.Nm ...' in SYNOPSIS
1003 .      if \n[doc-in-synopsis-section] \{\
1004 .        if "\*[doc-macro-name]"Nm" \{\
1005 .          br
1006 .          if !\n[doc-indent-synopsis] \{\
1007 .            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1008 .            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1009 .          \}
1010 .          if !\n[doc-indent-synopsis-active] \{\
1011 .            in +\n[doc-indent-synopsis]u
1012 .            nr doc-indent-synopsis-active 1
1013 .          \}
1014 .          ti -\n[doc-indent-synopsis]u
1015 .      \}\}
1016 .      if "\*[doc-command-name]"" \
1017 .        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1019 .      nop \*[doc-Nm-font]\c
1020 .    \}
1021 .    doc-print-recursive
1022 .  \}
1026 .\" NS Pa user macro
1027 .\" NS   pathname: `.Pa [arg ...]'
1028 .\" NS
1029 .\" NS modifies:
1030 .\" NS   doc-arg-ptr
1031 .\" NS   doc-curr-font
1032 .\" NS   doc-curr-size
1033 .\" NS   doc-macro-name
1034 .\" NS
1035 .\" NS width register `Pa' set in doc-common
1037 .de Pa
1038 .  if !\n[doc-arg-limit] \{\
1039 .    ds doc-macro-name Pa
1040 .    doc-parse-args \$@
1042 .    \" default value
1043 .    if !\n[.$] \
1044 .      nop \*[doc-Pa-font]~\f[]\s[0]
1045 .  \}
1047 .  if !\n[doc-arg-limit] \
1048 .    return
1050 .  nr doc-arg-ptr +1
1051 .  doc-print-prefixes
1052 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1053 .    nr doc-curr-font \n[.f]
1054 .    nr doc-curr-size \n[.ps]
1055 .    nop \*[doc-Pa-font]\c
1056 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1057 .      \" replace previous argument (Pa) with default value
1058 .      nr doc-arg-ptr -1
1059 .      ds doc-arg\n[doc-arg-ptr] ~
1060 .      nr doc-type\n[doc-arg-ptr] 2
1061 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1063 .      \" recompute space vector for remaining arguments
1064 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1065 .      nr doc-arg-limit \n[doc-arg-ptr]
1066 .      doc-parse-space-vector
1067 .    \}
1068 .    doc-print-recursive
1069 .  \}
1070 .  el \{\
1071 .    nop \*[doc-Pa-font]~\f[]\s[0]\c
1072 .    doc-print-and-reset
1073 .  \}
1077 .\" NS Sy user macro
1078 .\" NS   symbolics
1079 .\" NS
1080 .\" NS width register `Sy' set in doc-common
1082 .als Sy doc-generic-macro
1083 .ds doc-Sy-usage symbolic_text
1086 .\" NS Me user macro
1087 .\" NS   menu entries
1088 .\" NS
1089 .\" NS width register `Me' set in doc-common
1091 .als Me doc-generic-macro
1092 .ds doc-Me-usage menu_entry
1095 .\" NS Tn user macro
1096 .\" NS   trade name
1097 .\" NS
1098 .\" NS modifies:
1099 .\" NS   doc-arg-ptr
1100 .\" NS   doc-curr-font
1101 .\" NS   doc-curr-size
1102 .\" NS   doc-macro-name
1103 .\" NS
1104 .\" NS width register `Tn' set in doc-common
1106 .de Tn
1107 .  if !\n[doc-arg-limit] \{\
1108 .    ie \n[.$] \{\
1109 .      ds doc-macro-name Tn
1110 .      doc-parse-args \$@
1111 .    \}
1112 .    el \
1113 .      tm Usage: .Tn trade_name ... (#\n[.c])
1114 .  \}
1116 .  if !\n[doc-arg-limit] \
1117 .    return
1119 .  nr doc-arg-ptr +1
1120 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1121 .    nr doc-curr-font \n[.f]
1122 .    nr doc-curr-size \n[.ps]
1123 .    nop \)\*[doc-Tn-font-size]\c
1124 .    ie !\n[doc-is-reference] \{\
1125 .      nop \)\*[doc-Tn-font-shape]\c
1126 .      doc-print-recursive
1127 .    \}
1128 .    el \
1129 .      doc-do-references
1130 .  \}
1131 .  el \{\
1132 .    tm Usage: .Tn trade_name ... (#\n[.c])
1133 .    doc-reset-args
1134 .  \}
1138 .\" NS Va user macro
1139 .\" NS   variable name
1140 .\" NS
1141 .\" NS width register `Va' set in doc-common
1143 .als Va doc-generic-macro
1144 .ds doc-Va-usage variable_name
1147 .\" NS No user macro
1148 .\" NS   normal text macro (default text style if mess up)
1149 .\" NS
1150 .\" NS width register `No' set in doc-common
1152 .als No doc-generic-macro
1153 .ds doc-No-usage normal_text
1156 .\" NS doc-quote-left global string
1157 .\" NS   left quotation character for `doc-enclose-string' and
1158 .\" NS   `doc-enclose-open'
1160 .ds doc-quote-left
1163 .\" NS doc-quote-right global string
1164 .\" NS   right quotation character for `doc-enclose-string' and
1165 .\" NS   `doc-enclose-close'
1167 .ds doc-quote-right
1170 .\" NS Op user macro
1171 .\" NS   option expression (i.e., enclose string in square brackets)
1172 .\" NS
1173 .\" NS modifies:
1174 .\" NS   doc-macro-name
1175 .\" NS   doc-quote-left
1176 .\" NS   doc-quote-right
1177 .\" NS
1178 .\" NS width register `Op' set in doc-common
1180 .de Op
1181 .  if !\n[doc-arg-limit] \
1182 .    ds doc-macro-name Op
1184 .  ds doc-quote-left "\*[doc-left-bracket]
1185 .  ds doc-quote-right "\*[doc-right-bracket]
1187 .  doc-enclose-string \$@
1191 .\" NS Aq user macro
1192 .\" NS   enclose string in angle brackets
1193 .\" NS
1194 .\" NS modifies:
1195 .\" NS   doc-macro-name
1196 .\" NS   doc-quote-left
1197 .\" NS   doc-quote-right
1198 .\" NS
1199 .\" NS width register `Aq' set in doc-common
1201 .de Aq
1202 .  if !\n[doc-arg-limit] \
1203 .    ds doc-macro-name Aq
1205 .  ie "\*[doc-macro-name]"An" \{\
1206 .    ds doc-quote-left <
1207 .    ds doc-quote-right >
1208 .  \}
1209 .  el \{\
1210 .    ds doc-quote-left \[la]
1211 .    ds doc-quote-right \[ra]
1212 .  \}
1214 .  doc-enclose-string \$@
1218 .\" NS Bq user macro
1219 .\" NS   enclose string in square brackets
1220 .\" NS
1221 .\" NS modifies:
1222 .\" NS   doc-macro-name
1223 .\" NS   doc-quote-left
1224 .\" NS   doc-quote-right
1225 .\" NS
1226 .\" NS width register `Bq' set in doc-common
1228 .de Bq
1229 .  if !\n[doc-arg-limit] \
1230 .    ds doc-macro-name Bq
1232 .  ds doc-quote-left "\*[doc-left-bracket]
1233 .  ds doc-quote-right "\*[doc-right-bracket]
1235 .  doc-enclose-string \$@
1239 .\" NS Brq user macro
1240 .\" NS   enclose string in braces
1241 .\" NS
1242 .\" NS modifies:
1243 .\" NS   doc-macro-name
1244 .\" NS   doc-quote-left
1245 .\" NS   doc-quote-right
1246 .\" NS
1247 .\" NS width register `Brq' set in doc-common
1249 .de Brq
1250 .  if !\n[doc-arg-limit] \
1251 .    ds doc-macro-name Brq
1253 .  ds doc-quote-left {
1254 .  ds doc-quote-right }
1256 .  doc-enclose-string \$@
1260 .\" NS Dq user macro
1261 .\" NS   enclose string in double quotes
1262 .\" NS
1263 .\" NS modifies:
1264 .\" NS   doc-macro-name
1265 .\" NS   doc-quote-left
1266 .\" NS   doc-quote-right
1267 .\" NS
1268 .\" NS width register `Dq' set in doc-common
1270 .de Dq
1271 .  if !\n[doc-arg-limit] \
1272 .    ds doc-macro-name Dq
1274 .  ds doc-quote-left "\*[Lq]
1275 .  ds doc-quote-right "\*[Rq]
1277 .  doc-enclose-string \$@
1281 .\" NS Eq user macro
1282 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1283 .\" NS
1284 .\" NS modifies:
1285 .\" NS   doc-macro-name
1286 .\" NS   doc-quote-left
1287 .\" NS   doc-quote-right
1288 .\" NS
1289 .\" NS width register `Eq' set in doc-common
1291 .de Eq
1292 .  if !\n[doc-arg-limit] \
1293 .    ds doc-macro-name Eq
1295 .  ds doc-quote-left "\$1
1296 .  ds doc-quote-right "\$2
1298 .  shift 2
1299 .  doc-enclose-string \$@
1303 .\" NS Pq user macro
1304 .\" NS   enclose string in parentheses
1305 .\" NS
1306 .\" NS modifies:
1307 .\" NS   doc-macro-name
1308 .\" NS   doc-quote-left
1309 .\" NS   doc-quote-right
1310 .\" NS
1311 .\" NS width register `Pq' set in doc-common
1313 .de Pq
1314 .  if !\n[doc-arg-limit] \
1315 .    ds doc-macro-name Pq
1317 .  ds doc-quote-left "\*[doc-left-parenthesis]
1318 .  ds doc-quote-right "\*[doc-right-parenthesis]
1320 .  doc-enclose-string \$@
1324 .\" NS Ql user macro
1325 .\" NS   quoted literal
1327 .\"   is in file doc-[dit|n]roff
1330 .\" NS Qq user macro
1331 .\" NS   enclose string in straight double quotes
1332 .\" NS
1333 .\" NS modifies:
1334 .\" NS   doc-macro-name
1335 .\" NS   doc-quote-left
1336 .\" NS   doc-quote-right
1337 .\" NS
1338 .\" NS width register `Qq' set in doc-common
1340 .de Qq
1341 .  if !\n[doc-arg-limit] \
1342 .    ds doc-macro-name Qq
1344 .  ds doc-quote-left "\*[q]
1345 .  ds doc-quote-right "\*[q]
1347 .  doc-enclose-string \$@
1351 .\" NS Sq user macro
1352 .\" NS   enclose string in single quotes
1353 .\" NS
1354 .\" NS modifies:
1355 .\" NS   doc-macro-name
1356 .\" NS   doc-quote-left
1357 .\" NS   doc-quote-right
1358 .\" NS
1359 .\" NS width register `Sq' set in doc-common
1361 .de Sq
1362 .  if !\n[doc-arg-limit] \
1363 .    ds doc-macro-name Sq
1365 .  ds doc-quote-left "\*[doc-left-singlequote]
1366 .  ds doc-quote-right "\*[doc-right-singlequote]
1368 .  doc-enclose-string \$@
1372 .\" NS Es user macro
1373 .\" NS   set up arguments (i.e., the left and right quotation character as
1374 .\" NS   first and second argument) for .En call
1375 .\" NS
1376 .\" NS modifies:
1377 .\" NS   doc-arg-ptr
1378 .\" NS   doc-macro-name
1379 .\" NS   doc-quote-left
1380 .\" NS   doc-quote-right
1382 .de Es
1383 .  if !\n[doc-arg-limit] \{\
1384 .    ie (\n[.$] > 2) \{\
1385 .      ds doc-macro-name Es
1386 .      doc-parse-args \$@
1387 .    \}
1388 .    el \{\
1389 .      ds doc-quote-left "\$1
1390 .      ds doc-quote-right "\$2
1391 .  \}\}
1393 .  if !\n[doc-arg-limit] \
1394 .    return
1396 .  nr doc-arg-ptr +1
1397 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1398 .  nr doc-arg-ptr +1
1399 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1400 .  nr doc-arg-ptr +1
1401 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1402 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1403 .  el \
1404 .    doc-print-and-reset
1408 .\" NS doc-have-slot global register (bool)
1409 .\" NS   set if `doc-enclose-string' has created a slot for closing
1410 .\" NS   delimiter
1412 .nr doc-have-slot 0
1415 .\" NS doc-enclose-string macro
1416 .\" NS   enclose string with given args (e.g. [ and ])
1417 .\" NS
1418 .\" NS modifies:
1419 .\" NS   doc-arg-ptr
1420 .\" NS   doc-argXXX
1421 .\" NS   doc-have-slot
1422 .\" NS
1423 .\" NS local variables:
1424 .\" NS   doc-reg-des
1425 .\" NS   doc-reg-des1
1426 .\" NS   doc-reg-des2
1427 .\" NS
1428 .\" NS requires:
1429 .\" NS   doc-quote-left
1430 .\" NS   doc-quote-right
1432 .de doc-enclose-string
1433 .  if \n[doc-in-synopsis-section] \
1434 .    doc-set-hard-space
1436 .  if !\n[doc-arg-limit] \{\
1437 .    ie \n[.$] \
1438 .      doc-parse-args \$@
1439 .    el \{\
1440 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1441 .  \}\}
1443 .  if !\n[doc-arg-limit] \
1444 .    return
1446 .  nr doc-curr-font \n[.f]
1447 .  nr doc-curr-size \n[.ps]
1449 .  nr doc-arg-ptr +1
1450 .  doc-print-prefixes
1451 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1452 .  nop \)\*[doc-quote-left]\)\c
1453 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1454 .    \" last argument
1455 .    nop \)\*[doc-quote-right]\)\c
1456 .    doc-print-and-reset
1457 .  \}
1458 .  el \{\
1459 .    \" test whether last arguments are of type closing punctuation
1460 .    \" resp. suffix
1461 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1462 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1463 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1464 .        nr doc-reg-des -1
1466 .      \" prepend closing delimiter
1467 .      nr doc-reg-des +1
1468 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1469 .    \}
1470 .    el \{\
1471 .      \" test whether last arguments are macros which continue the line
1472 .      \" logically
1473 .      nr doc-reg-des \n[doc-arg-limit]
1474 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1475 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1476 .          break
1477 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1478 .          break
1479 .        nr doc-reg-des -1
1480 .      \}
1482 .      \" if there are no trailing macros to be skipped, append argument
1483 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1484 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1485 .      el \{\
1486 .        \" if a previous call to `doc-enclose-string' has already created
1487 .        \" a slot, prepend argument
1488 .        ie \n[doc-have-slot] \
1489 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1490 .        el \{\
1491 .          \" we have to shift all arguments to the right
1492 .          nr doc-reg-des +1
1493 .          nr doc-reg-des1 \n[doc-arg-limit]
1494 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1495 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1496 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1497 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1498 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1499 .            nr doc-reg-des1 -1
1500 .            nr doc-reg-des2 -1
1501 .          \}
1502 .          nr doc-arg-limit +1
1504 .          \" finally, insert closing delimiter into the freed slot and
1505 .          \" recompute spacing vector
1506 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1507 .          nr doc-type\n[doc-reg-des] 3
1508 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1509 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1510 .          doc-parse-space-vector
1511 .          nr doc-have-slot 1
1512 .    \}\}\}
1514 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1515 .  \}
1517 .  if \n[doc-in-synopsis-section] \
1518 .    doc-set-soft-space
1522 .\" NS En user macro
1523 .\" NS   enclose arguments with quotation characters set up with `.Es'
1525 .als En doc-enclose-string
1528 .\" NS Ao user macro
1529 .\" NS   angle open
1530 .\" NS
1531 .\" NS modifies:
1532 .\" NS   doc-macro-name
1533 .\" NS   doc-quote-left
1534 .\" NS
1535 .\" NS width register `Ao' set in doc-common
1537 .de Ao
1538 .  if !\n[doc-arg-limit] \
1539 .    ds doc-macro-name Ao
1541 .  ie "\*[doc-macro-name]"An" \
1542 .    ds doc-quote-left <
1543 .  el \
1544 .    ds doc-quote-left \[la]
1546 .  doc-enclose-open \$@
1550 .\" NS Ac user macro
1551 .\" NS   angle close
1552 .\" NS
1553 .\" NS modifies:
1554 .\" NS   doc-macro-name
1555 .\" NS   doc-quote-right
1556 .\" NS
1557 .\" NS width register `Ac' set in doc-common
1559 .de Ac
1560 .  if !\n[doc-arg-limit] \
1561 .    ds doc-macro-name Ac
1563 .  ie "\*[doc-macro-name]"An" \
1564 .    ds doc-quote-right >
1565 .  el \
1566 .    ds doc-quote-right \[ra]
1568 .  doc-enclose-close \$@
1572 .\" NS Bo user macro
1573 .\" NS   bracket open
1574 .\" NS
1575 .\" NS modifies:
1576 .\" NS   doc-macro-name
1577 .\" NS   doc-quote-left
1578 .\" NS
1579 .\" NS width register `Bo' set in doc-common
1581 .de Bo
1582 .  if !\n[doc-arg-limit] \
1583 .    ds doc-macro-name Bo
1585 .  ds doc-quote-left "\*[doc-left-bracket]
1587 .  doc-enclose-open \$@
1591 .\" NS Bc user macro
1592 .\" NS   bracket close
1593 .\" NS
1594 .\" NS modifies:
1595 .\" NS   doc-macro-name
1596 .\" NS   doc-quote-right
1597 .\" NS
1598 .\" NS width register `Bc' set in doc-common
1600 .de Bc
1601 .  if !\n[doc-arg-limit] \
1602 .    ds doc-macro-name Bc
1604 .  ds doc-quote-right "\*[doc-right-bracket]
1606 .  doc-enclose-close \$@
1610 .\" NS Bro user macro
1611 .\" NS   brace open
1612 .\" NS
1613 .\" NS modifies:
1614 .\" NS   doc-macro-name
1615 .\" NS   doc-quote-left
1616 .\" NS
1617 .\" NS width register `Bro' set in doc-common
1619 .de Bro
1620 .  if !\n[doc-arg-limit] \
1621 .    ds doc-macro-name Bo
1623 .  ds doc-quote-left {
1625 .  doc-enclose-open \$@
1629 .\" NS Brc user macro
1630 .\" NS   brace close
1631 .\" NS
1632 .\" NS modifies:
1633 .\" NS   doc-macro-name
1634 .\" NS   doc-quote-right
1635 .\" NS
1636 .\" NS width register `Brc' set in doc-common
1638 .de Brc
1639 .  if !\n[doc-arg-limit] \
1640 .    ds doc-macro-name Bc
1642 .  ds doc-quote-right }
1644 .  doc-enclose-close \$@
1648 .\" NS Do user macro
1649 .\" NS   double quote open
1650 .\" NS
1651 .\" NS modifies:
1652 .\" NS   doc-macro-name
1653 .\" NS   doc-quote-left
1654 .\" NS
1655 .\" NS width register `Do' set in doc-common
1657 .de Do
1658 .  if !\n[doc-arg-limit] \
1659 .    ds doc-macro-name Do
1661 .  ds doc-quote-left "\*[Lq]
1663 .  doc-enclose-open \$@
1667 .\" NS Dc user macro
1668 .\" NS   double quote close
1669 .\" NS
1670 .\" NS modifies:
1671 .\" NS   doc-macro-name
1672 .\" NS   doc-quote-right
1673 .\" NS
1674 .\" NS width register `Dc' set in doc-common
1676 .de Dc
1677 .  if !\n[doc-arg-limit] \
1678 .    ds doc-macro-name Dc
1680 .  ds doc-quote-right "\*[Rq]
1682 .  doc-enclose-close \$@
1686 .\" NS Eo user macro
1687 .\" NS   enclose open (using first argument as beginning of enclosure)
1688 .\" NS
1689 .\" NS modifies:
1690 .\" NS   doc-macro-name
1691 .\" NS   doc-quote-left
1692 .\" NS
1693 .\" NS width register `Eo' set in doc-common
1695 .de Eo
1696 .  if !\n[doc-arg-limit] \
1697 .    ds doc-macro-name Eo
1699 .  ds doc-quote-left "\$1
1701 .  shift
1702 .  doc-enclose-open \$@
1706 .\" NS Ec user macro
1707 .\" NS   enclose close (using first argument as end of enclosure)
1708 .\" NS
1709 .\" NS modifies:
1710 .\" NS   doc-macro-name
1711 .\" NS   doc-quote-right
1712 .\" NS
1713 .\" NS width register `Ec' set in doc-common
1715 .de Ec
1716 .  if !\n[doc-arg-limit] \
1717 .    ds doc-macro-name Ec
1719 .  ds doc-quote-right "\$1
1721 .  shift
1722 .  doc-enclose-close \$@
1726 .\" NS Oo user macro
1727 .\" NS   option open
1728 .\" NS
1729 .\" NS modifies:
1730 .\" NS   doc-macro-name
1731 .\" NS   doc-quote-left
1732 .\" NS
1733 .\" NS width register `Oo' set in doc-common
1735 .de Oo
1736 .  if !\n[doc-arg-limit] \
1737 .    ds doc-macro-name Oo
1739 .  ds doc-quote-left [
1741 .  doc-enclose-open \$@
1745 .\" NS Oc user macro
1746 .\" NS   option close
1747 .\" NS
1748 .\" NS modifies:
1749 .\" NS   doc-macro-name
1750 .\" NS   doc-quote-right
1751 .\" NS
1752 .\" NS width register `Oc' set in doc-common
1754 .de Oc
1755 .  if !\n[doc-arg-limit] \
1756 .    ds doc-macro-name Oc
1758 .  ds doc-quote-right ]
1760 .  doc-enclose-close \$@
1764 .\" NS Po user macro
1765 .\" NS   parenthesis open
1766 .\" NS
1767 .\" NS modifies:
1768 .\" NS   doc-macro-name
1769 .\" NS   doc-quote-left
1770 .\" NS
1771 .\" NS width register `Po' set in doc-common
1773 .de Po
1774 .  if !\n[doc-arg-limit] \
1775 .    ds doc-macro-name Po
1777 .  ds doc-quote-left "\*[doc-left-parenthesis]
1779 .  doc-enclose-open \$@
1783 .\" NS Pc user macro
1784 .\" NS   parenthesis close
1785 .\" NS
1786 .\" NS modifies:
1787 .\" NS   doc-macro-name
1788 .\" NS   doc-quote-right
1789 .\" NS
1790 .\" NS width register `Pc' set in doc-common
1792 .de Pc
1793 .  if !\n[doc-arg-limit] \
1794 .    ds doc-macro-name Pc
1796 .  ds doc-quote-right "\*[doc-right-parenthesis]
1798 .  doc-enclose-close \$@
1802 .\" NS Qo user macro
1803 .\" NS   straight double quote open
1804 .\" NS
1805 .\" NS modifies:
1806 .\" NS   doc-macro-name
1807 .\" NS   doc-quote-left
1808 .\" NS
1809 .\" NS width register `Qo' set in doc-common
1811 .de Qo
1812 .  if !\n[doc-arg-limit] \
1813 .    ds doc-macro-name Qo
1815 .  ds doc-quote-left "\*[q]
1817 .  doc-enclose-open \$@
1821 .\" NS Qc user macro
1822 .\" NS   straight double quote close
1823 .\" NS
1824 .\" NS modifies:
1825 .\" NS   doc-macro-name
1826 .\" NS   doc-quote-right
1827 .\" NS
1828 .\" NS width register `Qc' set in doc-common
1830 .de Qc
1831 .  if !\n[doc-arg-limit] \
1832 .    ds doc-macro-name Qc
1834 .  ds doc-quote-right "\*[q]
1836 .  doc-enclose-close \$@
1840 .\" NS So user macro
1841 .\" NS   single quote open
1842 .\" NS
1843 .\" NS modifies:
1844 .\" NS   doc-macro-name
1845 .\" NS   doc-quote-left
1846 .\" NS
1847 .\" NS width register `So' set in doc-common
1849 .de So
1850 .  if !\n[doc-arg-limit] \
1851 .    ds doc-macro-name So
1853 .  ds doc-quote-left "\*[doc-left-singlequote]
1855 .  doc-enclose-open \$@
1859 .\" NS Sc user macro
1860 .\" NS   single quote close
1861 .\" NS
1862 .\" NS modifies:
1863 .\" NS   doc-macro-name
1864 .\" NS   doc-quote-right
1865 .\" NS
1866 .\" NS width register `Sc' set in doc-common
1868 .de Sc
1869 .  if !\n[doc-arg-limit] \
1870 .    ds doc-macro-name Sc
1872 .  ds doc-quote-right "\*[doc-right-singlequote]
1874 .  doc-enclose-close \$@
1878 .\" NS Xo user macro
1879 .\" NS   extend open
1880 .\" NS
1881 .\" NS modifies:
1882 .\" NS   doc-macro-name
1883 .\" NS   doc-quote-left
1884 .\" NS
1885 .\" NS width register `Xo' set in doc-common
1887 .de Xo
1888 .  if !\n[doc-arg-limit] \
1889 .    ds doc-macro-name Xo
1891 .  ds doc-quote-left
1893 .  doc-enclose-open \$@
1897 .\" NS Xc user macro
1898 .\" NS   extend close
1899 .\" NS
1900 .\" NS modifies:
1901 .\" NS   doc-macro-name
1902 .\" NS   doc-quote-right
1903 .\" NS
1904 .\" NS width register `Xc' set in doc-common
1906 .de Xc
1907 .  if !\n[doc-arg-limit] \
1908 .    ds doc-macro-name Xc
1910 .  ds doc-quote-right
1912 .  doc-enclose-close \$@
1916 .\" NS doc-nesting-level global register
1917 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1919 .nr doc-nesting-level 0
1922 .\" NS doc-in-list global register (bool)
1923 .\" NS   whether we are in (logical) .It
1925 .nr doc-in-list 0
1928 .\" NS doc-enclose-open macro
1929 .\" NS   enclose string open
1930 .\" NS
1931 .\" NS modifies:
1932 .\" NS   doc-arg-ptr
1933 .\" NS   doc-nesting-level
1935 .de doc-enclose-open
1936 .  if !\n[doc-arg-limit] \
1937 .    doc-parse-args \$@
1939 .  nr doc-arg-ptr +1
1940 .  doc-print-prefixes
1941 .  nr doc-arg-ptr -1
1943 .  nop \)\*[doc-quote-left]\)\c
1945 .  \" start enclosure box
1946 .  box doc-enclosure-box\n[doc-nesting-level]
1947 .  ev doc-enclosure-env\n[doc-nesting-level]
1948 .  evc 0
1949 .  in 0
1950 .  nf
1951 .  \" we insert something to make .chop always work
1952 .  nop \&\c
1954 .  \" increase nesting level *after* parsing of arguments
1955 .  nr doc-nesting-level +1
1957 .  if \n[doc-arg-limit] \{\
1958 .    nr doc-arg-ptr +1
1959 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1960 .      doc-print-recursive
1961 .    el \
1962 .      doc-reset-args
1963 .  \}
1967 .\" NS doc-enclose-close macro
1968 .\" NS   enclose string close
1969 .\" NS
1970 .\" NS modifies:
1971 .\" NS   doc-nesting-level
1973 .de doc-enclose-close
1974 .  nr doc-nesting-level -1
1976 .  \" finish enclosure box
1977 .  br
1978 .  ev
1979 .  box
1980 .  chop doc-enclosure-box\n[doc-nesting-level]
1981 .  unformat doc-enclosure-box\n[doc-nesting-level]
1983 .  nh
1984 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1985 .  nop \)\*[doc-quote-right]\)\c
1987 .  if !\n[doc-arg-limit] \{\
1988 .    doc-parse-args \$@
1990 .    if !\n[.$] \
1991 .      doc-print-and-reset
1992 .  \}
1994 .  if \n[doc-arg-limit] \{\
1995 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1996 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1997 .      nr doc-arg-ptr +1
1998 .      doc-print-recursive
1999 .    \}
2000 .    el \
2001 .      doc-print-and-reset
2002 .  \}
2004 .  \" shall we finish .It macro?
2005 .  if !"\*[doc-macro-name]"It" \
2006 .    if \n[doc-in-list] \
2007 .      if !\n[doc-nesting-level] \
2008 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
2012 .\" NS Pf user macro
2013 .\" NS   prefix: `.Pf prefix arg ...'
2014 .\" NS
2015 .\" NS modifies:
2016 .\" NS   doc-arg-ptr
2017 .\" NS   doc-macro-name
2018 .\" NS   doc-quote-left
2019 .\" NS
2020 .\" NS width register `Pf' set in doc-common
2022 .de Pf
2023 .  if !\n[doc-arg-limit] \
2024 .    ds doc-macro-name Pf
2026 .  ie \n[doc-arg-limit] \{\
2027 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2028 .      nr doc-arg-ptr +1
2029 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2030 .    \}
2031 .    el \
2032 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2033 .  \}
2034 .  el \{\
2035 .    nop \)\$1\)\c
2036 .    shift
2037 .    ie \n[.$] \
2038 .      doc-parse-args \$@
2039 .    el \{\
2040 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
2041 .      nop \)
2042 .  \}\}
2044 .  if \n[doc-arg-limit] \{\
2045 .    nr doc-arg-ptr +1
2046 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2047 .      doc-print-and-reset
2048 .    el \
2049 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
2050 .  \}
2054 .\" NS Ns user macro
2055 .\" NS   remove space (space removal done by `doc-parse-args')
2056 .\" NS
2057 .\" NS modifies:
2058 .\" NS   doc-argXXX
2059 .\" NS   doc-macro-name
2060 .\" NS
2061 .\" NS width register `Ns' set in doc-common
2063 .de Ns
2064 .  if !\n[doc-arg-limit] \{\
2065 .    ie \n[.$] \{\
2066 .      ds doc-macro-name Ns
2067 .      doc-parse-args \$@
2068 .    \}
2069 .    el \
2070 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2071 .  \}
2073 .  if \n[doc-arg-limit] \{\
2074 .    nr doc-arg-ptr +1
2075 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2076 .      doc-print-recursive
2077 .    el \
2078 .      doc-reset-args
2079 .  \}
2083 .\" NS Ap user macro
2084 .\" NS   append an apostrophe
2085 .\" NS
2086 .\" NS width register `Ap' set in doc-common
2088 .de Ap
2089 .  ie !\n[doc-arg-limit] \
2090 .    tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2091 .  el \{\
2092 .    nop \)'\)\c
2093 .    nr doc-arg-ptr +1
2094 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2095 .      doc-print-recursive
2096 .    el \
2097 .      doc-reset-args
2098 .  \}
2102 .\" NS doc-space global string
2103 .\" NS   current inter-argument space
2105 .ds doc-space "\*[doc-soft-space]
2108 .\" NS doc-soft-space constant string
2109 .\" NS   soft (stretchable) space (defined in doc-common)
2112 .\" NS doc-hard-space constant string
2113 .\" NS   hard (unpaddable) space (defined in doc-common)
2116 .\" NS doc-set-hard-space macro
2117 .\" NS   set current space string to hard (unpaddable) space.
2118 .\" NS
2119 .\" NS modifies:
2120 .\" NS   doc-saved-space
2121 .\" NS   doc-space
2123 .de doc-set-hard-space
2124 .  ie "\*[doc-space]"" \
2125 .    ds doc-saved-space "\*[doc-hard-space]
2126 .  el \
2127 .    ds doc-space "\*[doc-hard-space]
2131 .\" NS doc-set-soft-space macro
2132 .\" NS   set current space string to soft space
2133 .\" NS
2134 .\" NS modifies:
2135 .\" NS   doc-saved-space
2136 .\" NS   doc-space
2138 .de doc-set-soft-space
2139 .  ie "\*[doc-space]"" \
2140 .    ds doc-saved-space "\*[doc-soft-space]
2141 .  el \
2142 .    ds doc-space "\*[doc-soft-space]
2146 .\" NS doc-space-mode global register (bool)
2147 .\" NS   default is one (space mode on)
2149 .nr doc-space-mode 1
2152 .\" NS doc-saved-space global string
2153 .\" NS   saved value of `doc-space'
2155 .ds doc-saved-space "\*[doc-space]
2158 .\" NS doc-have-space global register (bool)
2159 .\" NS   set if last command was horizontal space
2161 .nr doc-have-space 0
2164 .\" NS Sm user macro
2165 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2166 .\" NS
2167 .\" NS   without argument, toggle space mode
2168 .\" NS
2169 .\" NS modifies:
2170 .\" NS   doc-arg-limit
2171 .\" NS   doc-arg-ptr
2172 .\" NS   doc-argXXX
2173 .\" NS   doc-macro-name
2174 .\" NS   doc-num-args
2175 .\" NS   doc-saved-space
2176 .\" NS   doc-space
2177 .\" NS   doc-space-mode
2178 .\" NS   doc-spaceXXX
2179 .\" NS
2180 .\" NS local variables:
2181 .\" NS   doc-reg-Sm
2182 .\" NS
2183 .\" NS width register `Sm' set in doc-common
2185 .de Sm
2186 .  ie \n[doc-have-space] \
2187 .    nr doc-reg-Sm 0
2188 .  el \
2189 .    nr doc-reg-Sm 1
2191 .  if !\n[doc-arg-limit] \{\
2192 .    ie \n[.$] \{\
2193 .      ds doc-macro-name Sm
2194 .      doc-parse-args \$@
2195 .    \}
2196 .    el \{\
2197 .      ie \n[doc-space-mode] \{\
2198 .        ds doc-saved-space "\*[doc-space]
2199 .        ds doc-space
2200 .        nr doc-space-mode 0
2201 .      \}
2202 .      el \{\
2203 .        ds doc-space "\*[doc-saved-space]
2204 .        nr doc-space-mode 1
2206 .        \" finish line only if it is interrupted and `doc-have-space'
2207 .        \" isn't set
2208 .        if \n[doc-reg-Sm] \
2209 .          if \n[.int] \
2210 .            nop \)
2211 .      \}
2212 .  \}\}
2214 .  if !\n[doc-arg-limit] \
2215 .    return
2217 .  nr doc-arg-ptr +1
2219 .  \" avoid a warning message in case `Sm' is the last parameter
2220 .  if !d doc-arg\n[doc-arg-ptr] \
2221 .    ds doc-arg\n[doc-arg-ptr]
2223 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2224 .    ds doc-space "\*[doc-saved-space]
2225 .    nr doc-space-mode 1
2226 .  \}
2227 .  el \{\
2228 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2229 .      ds doc-saved-space "\*[doc-space]
2230 .      ds doc-space
2231 .      nr doc-space-mode 0
2232 .    \}
2233 .    el \{\
2234 .      \" no argument for Sm
2235 .      nr doc-arg-ptr -1
2236 .      ie \n[doc-space-mode] \{\
2237 .        ds doc-saved-space "\*[doc-space]
2238 .        ds doc-space
2239 .        nr doc-space-mode 0
2240 .      \}
2241 .      el \{\
2242 .        ds doc-space "\*[doc-saved-space]
2243 .        nr doc-space-mode 1
2244 .      \}
2245 .  \}\}
2247 .  ie \n[doc-space-mode] \{\
2248 .    \" recompute space vector for remaining arguments
2249 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2250 .    nr doc-arg-limit \n[doc-arg-ptr]
2251 .    if \n[doc-num-args] \
2252 .      doc-parse-space-vector
2254 .    \" finish line only if it is interrupted and `doc-have-space'
2255 .    \" isn't set
2256 .    if \n[doc-reg-Sm] \
2257 .      if \n[.int] \
2258 .        nop \)
2259 .  \}
2260 .  el \{\
2261 .    \" reset remaining space vector elements
2262 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2263 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2264 .      ds doc-space\n[doc-reg-Sm]
2265 .      nr doc-reg-Sm +1
2266 .      \" the body of a `while' request must end with the fitting `\}'!
2267 .    \}
2268 .  \}
2270 .  \" do we have parameters to print?
2271 .  ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2272 .    \" skip `Sm' argument
2273 .    nr doc-arg-ptr +1
2274 .    doc-print-recursive
2275 .  \}
2276 .  el \
2277 .    doc-reset-args
2281 .\" NS doc-arg-type immediate register
2282 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2283 .\" NS   punctuation prefix=4)
2285 .nr doc-arg-type 0
2288 .\" NS doc-get-arg-type macro
2289 .\" NS   get argument type
2290 .\" NS
2291 .\" NS   this macro expects the width of the argument in `doc-width'
2292 .\" NS
2293 .\" NS modifies:
2294 .\" NS   doc-arg-type
2296 .de doc-get-arg-type
2297 .  nr doc-arg-type 2
2299 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2300 .    ie (\n[doc-width] == 1) \{\
2301 .      if r doc-punct\$1 \
2302 .        nr doc-arg-type \n[doc-punct\$1]
2303 .    \}
2304 .    el \
2305 .      if r \$1 \
2306 .        if d \$1 \
2307 .          nr doc-arg-type 1
2308 .  \}
2312 .\" NS doc-get-arg-type* macro
2313 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2314 .\" NS
2315 .\" NS   this macro sets the `doc-width' register using the `length' request
2316 .\" NS   to get the number of characters in a string literally
2317 .\" NS
2318 .\" NS modifies:
2319 .\" NS   doc-arg-type
2320 .\" NS   doc-width
2322 .de doc-get-arg-type*
2323 .  nr doc-arg-type 2
2324 .  length doc-width "\*[doc-arg\$1]
2326 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2327 .    ie (\n[doc-width] == 1) \{\
2328 .      if r doc-punct\*[doc-arg\$1] \
2329 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2330 .    \}
2331 .    el \
2332 .      if r \*[doc-arg\$1] \
2333 .        if d \*[doc-arg\$1] \
2334 .          nr doc-arg-type 1
2335 .  \}
2339 .\" NS doc-set-spacing-1 macro
2340 .\" NS   set spacing for macros
2341 .\" NS
2342 .\" NS modifies:
2343 .\" NS   doc-spaceXXX
2344 .\" NS
2345 .\" NS local variables:
2346 .\" NS   doc-reg-dssfm
2347 .\" NS   doc-reg-dssfm1
2349 .de doc-set-spacing-1
2350 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2352 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2353 .  \" argument)
2354 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2355 .    if \n[doc-arg-limit] \{\
2356 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2357 .      ds doc-space\n[doc-reg-dssfm]
2358 .    \}
2359 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2360 .  \}
2361 .  el \{\
2362 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2363 .    \" argument)
2364 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2365 .      if \n[doc-arg-limit] \{\
2366 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2367 .        ds doc-space\n[doc-reg-dssfm]
2368 .      \}
2369 .      ds doc-space\n[doc-arg-limit]
2370 .    \}
2371 .    el \
2372 .      ds doc-space\n[doc-arg-limit]
2373 .  \}
2377 .\" NS doc-set-spacing-2 macro
2378 .\" NS   set spacing for strings
2379 .\" NS
2380 .\" NS modifies:
2381 .\" NS   doc-spaceXXX
2383 .de doc-set-spacing-2
2384 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2388 .\" NS doc-set-spacing-3 macro
2389 .\" NS   set spacing for punctuation suffixes
2390 .\" NS
2391 .\" NS modifies:
2392 .\" NS   doc-spaceXXX
2393 .\" NS
2394 .\" NS local variables:
2395 .\" NS   doc-reg-dssfps
2397 .de doc-set-spacing-3
2398 .  if \n[doc-arg-limit] \{\
2399 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2400 .    ds doc-space\n[doc-reg-dssfps]
2401 .  \}
2403 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2407 .\" NS doc-set-spacing-4 macro
2408 .\" NS   set spacing for punctuation prefixes
2409 .\" NS
2410 .\" NS modifies:
2411 .\" NS   doc-spaceXXX
2413 .de doc-set-spacing-4
2414 .  ds doc-space\n[doc-arg-limit]
2418 .\" type switches (on current argument doc-arg-ptr)
2421 .\" NS doc-do-1 macro
2422 .\" NS   call request if macro
2424 .de doc-do-1
2425 .  \*[doc-arg\n[doc-arg-ptr]]
2429 .\" NS doc-do-2 macro
2430 .\" NS   call .doc-print-recursive if string
2432 .als doc-do-2 doc-print-recursive
2435 .\" NS doc-do-3 macro
2436 .\" NS   call .doc-print-recursive if punctuation suffix
2438 .als doc-do-3 doc-print-recursive
2441 .\" NS doc-do-4 macro
2442 .\" NS   call .doc-print-recursive if punctuation prefix
2444 .als doc-do-4 doc-print-recursive
2447 .\" NS doc-fontmode-depth global register
2448 .\" NS   font mode level
2450 .nr doc-fontmode-depth 0
2453 .\" NS doc-fontmode-font-stackXXX global register
2454 .\" NS   stack of saved current font values from `Bf' macro
2455 .\" NS
2456 .\" NS limit:
2457 .\" NS   doc-fontmode-depth
2459 .nr doc-fontmode-font-stack0 0
2462 .\" NS doc-fontmode-size-stackXXX global register
2463 .\" NS   stack of saved current size values from `Bf' macro
2464 .\" NS
2465 .\" NS limit:
2466 .\" NS   doc-fontmode-depth
2468 .nr doc-fontmode-size-stack0 0
2471 .\" NS Bf user macro
2472 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2473 .\" NS
2474 .\" NS modifies:
2475 .\" NS   doc-fontmode-depth
2476 .\" NS   doc-fontmode-font-stackXXX
2477 .\" NS   doc-fontmode-size-stackXXX
2478 .\" NS   doc-macro-name
2479 .\" NS
2480 .\" NS width register `Bf' set in doc-common
2482 .de Bf
2483 .  ds doc-macro-name Bf
2485 .  ie \n[.$] \{\
2486 .    nr doc-fontmode-depth +1
2488 .    \" save current font and size
2489 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2490 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2492 .    ie        "\$1"Em" \
2493 .      nop \*[doc-Em-font]\c
2494 .    el \{ .ie "\$1"Li" \
2495 .      nop \*[doc-Li-font]\c
2496 .    el \{ .ie "\$1"Sy" \
2497 .      nop \*[doc-Sy-font]\c
2498 .    el \{ .ie "\$1"-emphasis" \
2499 .      nop \*[doc-Em-font]\c
2500 .    el \{ .ie "\$1"-literal" \
2501 .      nop \*[doc-Li-font]\c
2502 .    el \{ .ie "\$1"-symbolic" \
2503 .      nop \*[doc-Sy-font]\c
2504 .    el \{\
2505 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2506 .      tm1 " (#\n[.c])
2507 .  \}\}\}\}\}\}\}
2508 .  el \
2509 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2513 .\" NS Ef user macro
2514 .\" NS   end font mode
2515 .\" NS
2516 .\" NS modifies:
2517 .\" NS   doc-macro-name
2518 .\" NS
2519 .\" NS width register `Ef' set in doc-common
2521 .de Ef
2522 .  ds doc-macro-name Ef
2524 .  ie \n[doc-fontmode-depth] \{\
2525 .    \" restore saved font and size
2526 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2527 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2529 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2530 .    nr doc-curr-font \n[.f]
2531 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2532 .    nr doc-curr-size \n[.ps]
2533 .    nr doc-fontmode-depth -1
2534 .  \}
2535 .  el \
2536 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2540 .\" NS doc-keep-type global register
2541 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2543 .nr doc-keep-type 0
2546 .\" NS Bk user macro
2547 .\" NS   begin keep
2548 .\" NS
2549 .\" NS modifies:
2550 .\" NS   doc-keep-type
2551 .\" NS   doc-macro-name
2552 .\" NS
2553 .\" NS width register `Bk' set in doc-common
2555 .de Bk
2556 .  ds doc-macro-name Bk
2558 .  if \n[doc-keep-type] \
2559 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2561 .  ie        "\$1"-lines" \{\
2562 .    nr doc-keep-type 2
2563 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2564 .  \}
2565 .  el \{ .ie "\$1"-words" \{\
2566 .    nr doc-keep-type 1
2567 .    doc-set-hard-space
2568 .  \}
2569 .  el \{ .ie "\$1"" \{\
2570 .    \" default
2571 .    nr doc-keep-type 1
2572 .    doc-set-hard-space
2573 .  \}
2574 .  el \{\
2575 .    tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2576 .    nr doc-keep-type 3
2577 .  \}\}\}
2579 \#.  nr doc-nesting-level +1
2583 .\" NS Ek user macro
2584 .\" NS   end keep
2585 .\" NS
2586 .\" NS modifies:
2587 .\" NS   doc-keep-type
2588 .\" NS   doc-macro-name
2589 .\" NS
2590 .\" NS width register `Ek' set in doc-common
2592 .de Ek
2593 .  ds doc-macro-name Ek
2595 \#.  nr doc-nesting-level -1
2597 .  ie \n[.$] \
2598 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2599 .  el \{\
2600 .    if !\n[doc-keep-type] \
2601 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2603 .    ie        (\n[doc-keep-type] == 1) \
2604 .      doc-set-soft-space
2605 .    el \{ .if (\n[doc-keep-type] == 2) \
2606 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2607 .  \}\}
2609 .  nr doc-keep-type 0
2611 \#.  if !"\*[doc-out-string]"" \
2612 \#.    doc-print-out-string
2616 .\" NS doc-display-depth global register
2617 .\" NS   display level
2619 .nr doc-display-depth 0
2622 .\" NS doc-is-compact global register (bool)
2623 .\" NS   set if the `compact' keyword is given
2625 .nr doc-is-compact 0
2628 .\" NS doc-display-type-stackXXX global string
2629 .\" NS   the display type stack
2630 .\" NS
2631 .\" NS limit:
2632 .\" NS   doc-display-depth
2634 .ds doc-display-type-stack0
2637 .\" NS doc-display-indent-stackXXX global register
2638 .\" NS   stack of display indentation values
2639 .\" NS
2640 .\" NS limit:
2641 .\" NS   doc-display-depth
2643 .nr doc-display-indent-stack0 0
2646 .\" NS doc-display-ad-stackXXX global register
2647 .\" NS   stack of saved adjustment modes
2648 .\" NS
2649 .\" NS limit:
2650 .\" NS   doc-display-depth
2652 .nr doc-display-ad-stack0 0
2655 .\" NS doc-display-fi-stackXXX global register
2656 .\" NS   stack of saved fill modes
2657 .\" NS
2658 .\" NS limit:
2659 .\" NS   doc-display-depth
2661 .nr doc-display-fi-stack0 0
2664 .\" NS doc-display-ft-stackXXX global register
2665 .\" NS   stack of saved fonts
2666 .\" NS
2667 .\" NS limit:
2668 .\" NS   doc-display-depth
2670 .nr doc-display-ft-stack0 0
2673 .\" NS doc-display-ps-stackXXX global register
2674 .\" NS   stack of saved font sizes
2675 .\" NS
2676 .\" NS limit:
2677 .\" NS   doc-display-depth
2679 .nr doc-display-ps-stack0 0
2682 .\" NS Bd user macro
2683 .\" NS   begin display
2684 .\" NS
2685 .\" NS width register `Bd' set in doc-common
2686 .\" NS
2687 .\" NS modifies:
2688 .\" NS   doc-curr-font
2689 .\" NS   doc-curr-size
2690 .\" NS   doc-display-depth
2691 .\" NS   doc-display-ad-stackXXX
2692 .\" NS   doc-display-fi-stackXXX
2693 .\" NS   doc-display-ft-stackXXX
2694 .\" NS   doc-display-ps-stackXXX
2695 .\" NS   doc-display-file
2696 .\" NS   doc-display-indent-stackXXX
2697 .\" NS   doc-display-type-stackXXX
2698 .\" NS   doc-is-compact
2699 .\" NS   doc-macro-name
2700 .\" NS
2701 .\" NS local variables:
2702 .\" NS   doc-reg-Bd
2704 .de Bd
2705 .  ds doc-macro-name Bd
2707 .  if !\n[.$] \{\
2708 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2709 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2710 .    return
2711 .  \}
2713 .  nr doc-is-compact 0
2714 .  ds doc-display-file
2715 .  nr doc-reg-Bd 1
2716 .  nr doc-display-depth +1
2718 .  \" save current adjustment and fill modes
2719 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2720 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2722 .  ie        "\$1"-literal" \{\
2723 .    ds doc-display-type-stack\n[doc-display-depth] literal
2724 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2725 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2727 .    ie t \
2728 .      ta T 9n
2729 .    el \
2730 .      ta T 8n
2731 .    nf
2732 .  \}
2733 .  el \{ .ie "\$1"-filled" \{\
2734 .    ds doc-display-type-stack\n[doc-display-depth] filled
2735 .    ad b
2736 .    fi
2737 .  \}
2738 .  el \{ .ie "\$1"-ragged" \{\
2739 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2740 .    na
2741 .    fi
2742 .  \}
2743 .  el \{ .ie "\$1"-centered" \{\
2744 .    ds doc-display-type-stack\n[doc-display-depth] centered
2745 .    ad c
2746 .    fi
2747 .  \}
2748 .  el \{ .ie "\$1"-unfilled" \{\
2749 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2750 .    nf
2751 .  \}
2752 .  el \{\
2753 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2754 .    tm1 "              in .Bd macro (#\n[.c])
2755 .    nr doc-reg-Bd 0
2756 .  \}\}\}\}\}
2758 .  \" have we seen an argument?
2759 .  if \n[doc-reg-Bd] \{\
2760 .    shift
2761 .    \" check other arguments
2762 .    if \n[.$] \
2763 .      doc-do-Bd-args \$@
2764 .  \}
2766 .  \" avoid warning about non-existent register
2767 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2768 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2770 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2771 .    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2773 .  if !\n[doc-is-compact] \
2774 .    sp \n[doc-display-vertical]u
2776 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2777 .    if t \
2778 .      nop \*[doc-Li-font]\c
2780 .  if !\n[cR] \
2781 .    ne 2v
2783 .  if !"\*[doc-display-file]"" \
2784 .    so \*[doc-display-file]
2786 .  nr doc-is-compact 0
2787 .  ds doc-display-file
2791 .\" NS doc-do-Bd-args macro
2792 .\" NS   resolve remaining .Bd arguments
2793 .\" NS
2794 .\" NS modifies:
2795 .\" NS   doc-display-file
2796 .\" NS   doc-display-indent-stackXXX
2797 .\" NS   doc-is-compact
2798 .\" NS
2799 .\" NS local variables:
2800 .\" NS   doc-reg-ddBa
2801 .\" NS   doc-reg-ddBa1
2802 .\" NS   doc-reg-ddBa2
2803 .\" NS   doc-reg-ddBa3
2804 .\" NS   doc-reg-ddBa4
2805 .\" NS   doc-str-ddBa
2807 .de doc-do-Bd-args
2808 .  nr doc-reg-ddBa 1
2810 .  ie        "\$1"-offset" \{\
2811 .    nr doc-reg-ddBa 2
2813 .    ie        "\$2"left" \
2814 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2815 .    el \{ .ie "\$2"right" \
2816 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2817 .    el \{ .ie "\$2"center" \
2818 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2819 .    el \{ .ie "\$2"indent" \
2820 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2821 .    el \{ .ie "\$2"indent-two" \
2822 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2823 .    el \
2824 .      nr doc-reg-ddBa 1
2825 .    \}\}\}\}
2827 .    \" not a known keyword
2828 .    if (\n[doc-reg-ddBa] == 1) \{\
2829 .      nr doc-reg-ddBa 2
2831 .      nr doc-reg-ddBa1 0
2832 .      if \B\a(\$2)\a \{\
2833 .        \" disable warnings related to scaling indicators (32)
2834 .        nr doc-reg-ddBa2 \n[.warn]
2835 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2837 .        \" values without a scaling indicator are taken as strings;
2838 .        \" we test whether the parameter string with and without the last
2839 .        \" character yields identical numerical results (ignoring the
2840 .        \" scaling indicator)
2841 .        ds doc-str-ddBa "\$2
2842 .        substring doc-str-ddBa 0 -2
2843 .        if \B\a(\*[doc-str-ddBa])\a \{\
2844 .          nr doc-reg-ddBa3 (;(\$2))
2845 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2846 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2847 .            nr doc-reg-ddBa1 1
2848 .        \}
2850 .        \" enable all warnings again
2851 .        warn \n[doc-reg-ddBa2]
2852 .      \}
2854 .      ie \n[doc-reg-ddBa1] \
2855 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2856 .      el \{\
2857 .        doc-get-width "\$2"
2858 .        ie (\n[doc-width] <= 3) \{\
2859 .          \" if the offset parameter is a macro, use the macro's
2860 .          \" width as specified in doc-common
2861 .          doc-get-arg-type "\$2"
2862 .          ie (\n[doc-arg-type] == 1) \
2863 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2864 .          el \
2865 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2866 .        \}
2867 .        el \
2868 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2869 .    \}\}
2870 .  \}
2871 .  el \{ .ie "\$1"-compact" \
2872 .    nr doc-is-compact 1
2873 .  el \{ .ie "\$1"-file" \{\
2874 .    ie !"\$2"" \{\
2875 .      ds doc-display-file "\$2
2876 .      nr doc-reg-ddBa 2
2877 .    \}
2878 .    el \
2879 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2880 .  \}
2881 .  el \
2882 .      tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2883 .  \}\}
2885 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2886 .    shift \n[doc-reg-ddBa]
2887 .    doc-do-Bd-args \$@
2888 .  \}
2892 .\" NS Ed user macro
2893 .\" NS   end display
2894 .\" NS
2895 .\" NS modifies:
2896 .\" NS   doc-display-depth
2897 .\" NS   doc-display-indent-stackXXX
2898 .\" NS   doc-display-type-stackXXX
2899 .\" NS   doc-macro-name
2900 .\" NS
2901 .\" NS width register `Ed' set in doc-common
2903 .de Ed
2904 .  ds doc-macro-name Ed
2906 .  br
2908 .  if !\n[doc-display-depth] \{\
2909 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2910 .    nr doc-display-depth 1
2911 .  \}
2913 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2914 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2915 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2916 .  \}
2918 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2920 .  \" restore saved adjustment and fill modes
2921 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2922 .    fi
2923 .  el \
2924 .    nf
2925 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2927 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2928 .  ds doc-display-type-stack\n[doc-display-depth]
2929 .  nr doc-display-depth -1
2933 .\" NS doc-list-type-stackXXX global string
2934 .\" NS   stack of list types
2935 .\" NS
2936 .\" NS limit:
2937 .\" NS   doc-list-depth
2939 .ds doc-list-type-stack1
2942 .\" NS doc-list-indent-stackXXX global register
2943 .\" NS   stack of list indentation values
2944 .\" NS
2945 .\" NS limit:
2946 .\" NS   doc-list-depth
2948 .nr doc-list-indent-stack1 0
2951 .\" NS doc-list-have-indent-stackXXX global register (bool)
2952 .\" NS   an indentation value is active
2953 .\" NS
2954 .\" NS limit:
2955 .\" NS   doc-list-depth
2957 .nr doc-list-have-indent-stack1 0
2960 .\" NS Bl user macro
2961 .\" NS   begin list
2962 .\" NS
2963 .\" NS width register `Bl' set in doc-common
2964 .\" NS
2965 .\" NS modifies:
2966 .\" NS   doc-arg-ptr
2967 .\" NS   doc-argXXX
2968 .\" NS   doc-list-depth
2969 .\" NS   doc-list-have-indent-stackXXX
2970 .\" NS   doc-list-indent-stackXXX
2971 .\" NS   doc-list-type-stackXXX
2972 .\" NS   doc-macro-name
2973 .\" NS   doc-num-args
2974 .\" NS   doc-num-columns
2975 .\" NS
2976 .\" NS local variables:
2977 .\" NS   doc-reg-Bl
2979 .de Bl
2980 .  if !\n[.$] \{\
2981 .    doc-Bl-usage
2982 .    return
2983 .  \}
2985 .  ds doc-macro-name Bl
2986 .  nr doc-list-depth +1
2987 .  nr doc-arg-ptr 1
2989 .  ie        "\$1"-hang" \{\
2990 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2991 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2992 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2993 .  \}
2994 .  el \{ .ie "\$1"-tag" \{\
2995 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2996 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2997 .  \}
2998 .  el \{ .ie "\$1"-item" \{\
2999 .    ds doc-list-type-stack\n[doc-list-depth] item-list
3000 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3001 .  \}
3002 .  el \{ .ie "\$1"-enum" \{\
3003 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
3004 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
3005 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3006 .  \}
3007 .  el \{ .ie "\$1"-bullet" \{\
3008 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
3009 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3010 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3011 .  \}
3012 .  el \{ .ie "\$1"-dash" \{\
3013 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
3014 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3015 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3016 .  \}
3017 .  el \{ .ie "\$1"-hyphen" \{\
3018 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
3019 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3020 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3021 .  \}
3022 .  el \{ .ie "\$1"-inset" \{\
3023 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
3024 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3025 .  \}
3026 .  el \{ .ie "\$1"-diag" \{\
3027 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
3028 .  \}
3029 .  el \{ .ie "\$1"-ohang" \{\
3030 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
3031 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3032 .  \}
3033 .  el \{ .ie "\$1"-column" \{\
3034 .    ds doc-list-type-stack\n[doc-list-depth] column-list
3035 .    linetabs 1
3036 .  \}
3037 .  el \{\
3038 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3039 .    tm1 "              in .Bl macro
3040 .    tm
3041 .    nr doc-arg-ptr 0
3042 .  \}\}\}\}\}\}\}\}\}\}\}
3044 .  \" we have seen a list type
3045 .  if !\n[doc-arg-ptr] \{\
3046 .    doc-Bl-usage
3047 .    doc-reset-args
3048 .    nr doc-list-depth -1
3049 .    return
3050 .  \}
3052 .  shift
3054 .  \" fill argument vector
3055 .  nr doc-reg-Bl 1
3056 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
3057 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3058 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
3059 .    nr doc-type\n[doc-reg-Bl] 0
3060 .    ds doc-space\n[doc-reg-Bl]
3061 .    nr doc-reg-Bl +1
3062 .  \}
3064 .  doc-increment-list-stack
3066 .  if \n[.$] \{\
3067 .    nr doc-arg-limit \n[.$]
3068 .    nr doc-arg-ptr 0
3069 .    doc-do-Bl-args
3071 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3073 .    \" initialize column list
3074 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3075 .      doc-set-column-tab \n[doc-num-columns]
3076 '      in -\n[doc-column-indent-width]u
3077 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3078 .        sp \n[doc-display-vertical]u
3080 .      nf
3081 .      nr doc-num-columns 0
3082 .  \}\}
3084 .  doc-reset-args
3088 .\" NS doc-Bl-usage macro
3090 .de doc-Bl-usage
3091 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3092 .  tm1 "             [-width <string>]
3093 .  tm1 "             [-offset <string>] [-compact]
3094 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3095 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3096 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3100 .\" NS doc-do-Bl-args macro
3101 .\" NS   resolve remaining .Bl arguments
3102 .\" NS
3103 .\" NS modifies:
3104 .\" NS   doc-arg-ptr
3105 .\" NS   doc-argXXX
3106 .\" NS   doc-compact-list-stackXXX
3107 .\" NS   doc-list-indent-stackXXX
3108 .\" NS   doc-list-offset-stackXXX
3109 .\" NS   doc-num-columns
3110 .\" NS   doc-tag-prefix-stackXXX
3111 .\" NS   doc-tag-width-stackXXX
3112 .\" NS
3113 .\" NS local variables:
3114 .\" NS   doc-box-dBla
3115 .\" NS   doc-env-dBla
3116 .\" NS   doc-reg-dBla
3117 .\" NS   doc-reg-dBla1
3118 .\" NS   doc-reg-dBla2
3119 .\" NS   doc-reg-dBla3
3120 .\" NS   doc-reg-dBla4
3121 .\" NS   doc-str-dBla
3122 .\" NS   doc-str-dBla1
3124 .de doc-do-Bl-args
3125 .  nr doc-arg-ptr +1
3127 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3128 .    return
3130 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3131 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3132 .  if (\n[doc-arg-limit] < \n[doc-reg-dBla]) \
3133 .    ds doc-arg\n[doc-reg-dBla]
3135 .  nr doc-reg-dBla 1
3137 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3138 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3140 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3141 .    ie (\n[doc-list-depth] > 1) \{\
3142 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3143 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3144 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3145 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3146 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3147 .    \}
3148 .    el \
3149 .      tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3150 .  \}
3152 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3153 .    nr doc-arg-ptr +1
3154 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3156 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3157 .    substring doc-str-dBla 0 0
3158 .    ie \a.\a\*[doc-str-dBla]\a \{\
3159 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3160 .      substring doc-str-dBla 1
3161 .      doc-first-parameter \*[doc-str-dBla]
3162 .      doc-get-width "\*[doc-str-dfp]
3163 .      doc-get-arg-type "\*[doc-str-dfp]
3164 .      ie (\n[doc-arg-type] == 1) \
3165 .        nr doc-reg-dBla1 1
3166 .      el \
3167 .        nr doc-reg-dBla1 0
3168 .    \}
3169 .    el \
3170 .      nr doc-reg-dBla1 0
3171 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3173 .    ie \n[doc-reg-dBla1] \{\
3174 .      \" execute string in a box to get the width of the diversion
3175 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3176 .      doc-save-global-vars
3177 .      doc-reset-args
3178 .      box doc-box-dBla
3179 .      ev doc-env-dBla
3180 .      evc 0
3181 .      in 0
3182 .      nf
3183 .      nop \*[doc-str-dBla]
3184 .      br
3185 .      ev
3186 .      box
3187 .      doc-restore-global-vars
3188 .      doc-get-width \h'\n[dl]u'
3189 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3190 .    \}
3191 .    el \{\
3192 .      \" test whether argument is a valid numeric expression
3193 .      nr doc-reg-dBla1 0
3194 .      if \B\a(\*[doc-str-dBla])\a \{\
3195 .        \" disable warnings related to scaling indicators (32)
3196 .        nr doc-reg-dBla2 \n[.warn]
3197 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3199 .        \" values without a scaling indicator are taken as strings;
3200 .        \" we test whether the parameter string with and without the last
3201 .        \" character yields identical numerical results (ignoring the
3202 .        \" scaling indicator)
3203 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3204 .        substring doc-str-dBla1 0 -2
3205 .        if \B\a(\*[doc-str-dBla1])\a \{\
3206 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3207 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3208 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3209 .            nr doc-reg-dBla1 1
3210 .        \}
3212 .        \" enable all warnings again
3213 .        warn \n[doc-reg-dBla2]
3214 .      \}
3216 .      ie \n[doc-reg-dBla1] \
3217 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3218 .      el \{\
3219 .        doc-get-arg-width \n[doc-arg-ptr]
3220 .        ie (\n[doc-width] == 2) \{\
3221 .          \" if the width parameter is a macro, use the macro's
3222 .          \" width as specified in doc-common
3223 .          doc-get-arg-type \*[doc-str-dBla]
3224 .          ie (\n[doc-arg-type] == 1) \
3225 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3226 .          el \
3227 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3228 .        \}
3229 .        el \
3230 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3231 .  \}\}\}
3233 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3234 .    nr doc-arg-ptr +1
3236 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3237 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3238 .    el \{\
3239 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3240 .      nr doc-reg-dBla1 0
3241 .      if \B\a(\*[doc-str-dBla])\a \{\
3242 .        nr doc-reg-dBla2 \n[.warn]
3243 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3245 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3246 .        substring doc-str-dBla1 0 -2
3247 .        if \B\a(\*[doc-str-dBla1])\a \{\
3248 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3249 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3250 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3251 .            nr doc-reg-dBla1 1
3252 .        \}
3254 .        warn \n[doc-reg-dBla2]
3255 .      \}
3257 .      ie \n[doc-reg-dBla1] \
3258 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3259 .      el \{\
3260 .        doc-get-arg-width \n[doc-arg-ptr]
3261 .        ie (\n[doc-width] <= 3) \{\
3262 .          \" if the offset parameter is a macro, use the macro's
3263 .          \" width as specified in doc-common
3264 .          doc-get-arg-type \*[doc-str-dBla]
3265 .          ie (\n[doc-arg-type] == 1) \
3266 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3267 .          el \
3268 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3269 .        \}
3270 .        el \
3271 .          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3272 .  \}\}\}
3273 .  el \
3274 .    nr doc-reg-dBla 0
3275 .  \}\}\}
3277 .  \" not a known keyword, so it specifies the width of the next column
3278 .  \" (if it is a column list)
3279 .  if !\n[doc-reg-dBla] \{\
3280 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3281 .      nr doc-num-columns +1
3282 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3283 .      substring doc-str-dBla 0 0
3284 .      ie \a.\a\*[doc-str-dBla]\a \{\
3285 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3286 .        substring doc-str-dBla 1
3287 .        doc-first-parameter \*[doc-str-dBla]
3288 .        doc-get-width "\*[doc-str-dfp]
3289 .        doc-get-arg-type "\*[doc-str-dfp]
3290 .        ie (\n[doc-arg-type] == 1) \
3291 .          nr doc-reg-dBla1 1
3292 .        el \
3293 .          nr doc-reg-dBla1 0
3294 .      \}
3295 .      el \
3296 .        nr doc-reg-dBla1 0
3297 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3299 .      ie \n[doc-reg-dBla1] \{\
3300 .        \" execute string in a box to get the width of the diversion
3301 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3302 .        doc-save-global-vars
3303 .        doc-reset-args
3304 .        box doc-box-dBla
3305 .        ev doc-env-dBla
3306 .        evc 0
3307 .        in 0
3308 .        nf
3309 .        nop \*[doc-str-dBla]
3310 .        br
3311 .        ev
3312 .        box
3313 .        doc-restore-global-vars
3314 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3315 .      \}
3316 .      el \
3317 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3318 .    \}
3319 .    el \{\
3320 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3321 .      tm1 " in .Bl macro (#\n[.c])
3322 .  \}\}
3324 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3325 .    doc-do-Bl-args
3329 .\" NS doc-save-global-vars macro
3330 .\" NS   save all global variables
3331 .\" NS
3332 .\" NS local variables:
3333 .\" NS   doc-reg-dsgv
3335 .de doc-save-global-vars
3336 .  ds doc-macro-name-saved "\*[doc-macro-name]
3337 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3338 .  nr doc-num-args-saved \n[doc-num-args]
3339 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3341 .  nr doc-reg-dsgv 1
3342 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3343 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3344 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3345 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3346 .    nr doc-reg-dsgv +1
3347 .  \}
3349 .  nr doc-curr-font-saved \n[doc-curr-font]
3350 .  nr doc-curr-size-saved \n[doc-curr-size]
3351 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3352 .  nr doc-in-library-section-saved \n[doc-in-library-section]
3353 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3354 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3355 .  nr doc-have-decl-saved \n[doc-have-decl]
3356 .  nr doc-have-var-saved \n[doc-have-var]
3357 .  ds doc-command-name-saved "\*[doc-command-name]
3358 .  ds doc-quote-left-saved "\*[doc-quote-left]
3359 .  ds doc-quote-right-saved "\*[doc-quote-right]
3360 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3361 .  nr doc-in-list-saved \n[doc-in-list]
3362 .  ds doc-space-saved "\*[doc-space]
3363 .  ds doc-saved-space-saved "\*[doc-saved-space]
3364 .  nr doc-space-mode-saved \n[doc-space-mode]
3365 .  nr doc-have-space-saved \n[doc-have-space]
3366 .  nr doc-have-slot-saved \n[doc-have-slot]
3367 .  nr doc-keep-type-saved \n[doc-keep-type]
3368 .  nr doc-display-depth-saved \n[doc-display-depth]
3369 .  nr doc-is-compact-saved \n[doc-is-compact]
3371 .  nr doc-reg-dsgv 0
3372 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3373 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3374 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3375 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3376 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3377 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3378 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3379 .    nr doc-reg-dsgv +1
3380 .  \}
3382 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3384 .  nr doc-reg-dsgv 1
3385 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3386 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3387 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3388 .    nr doc-reg-dsgv +1
3389 .  \}
3391 .  nr doc-list-depth-saved \n[doc-list-depth]
3393 .  nr doc-reg-dsgv 1
3394 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3395 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3396 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3397 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3398 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3399 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3400 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3401 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3402 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3403 .    nr doc-reg-dsgv +1
3404 .  \}
3406 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3407 .  nr doc-curr-type-saved \n[doc-curr-type]
3408 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3409 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3410 .  nr doc-num-columns-saved \n[doc-num-columns]
3411 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3412 .  nr doc-is-func-saved \n[doc-is-func]
3413 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3414 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3415 .  ds doc-func-arg-saved "\*[doc-func-arg]
3416 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3417 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3418 .  nr doc-have-func-saved \n[doc-have-func]
3419 .  nr doc-is-reference-saved \n[doc-is-reference]
3420 .  nr doc-reference-count-saved \n[doc-reference-count]
3421 .  nr doc-author-count-saved \n[doc-author-count]
3423 .  nr doc-reg-dsgv 0
3424 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3425 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3426 .    nr doc-reg-dsgv +1
3427 .  \}
3429 .  nr doc-book-count-saved \n[doc-book-count]
3430 .  ds doc-book-name-saved "\*[doc-book-name]
3431 .  nr doc-city-count-saved \n[doc-city-count]
3432 .  ds doc-city-name-saved "\*[doc-city-name]
3433 .  nr doc-date-count-saved \n[doc-date-count]
3434 .  ds doc-date-saved "\*[doc-date]
3435 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3436 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3437 .  nr doc-journal-count-saved \n[doc-journal-count]
3438 .  ds doc-journal-name-saved "\*[doc-journal-name]
3439 .  nr doc-issue-count-saved \n[doc-issue-count]
3440 .  ds doc-issue-name-saved "\*[doc-issue-name]
3441 .  nr doc-optional-count-saved \n[doc-optional-count]
3442 .  ds doc-optional-string-saved "\*[doc-optional-string]
3443 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3444 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3445 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3446 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3447 .  nr doc-report-count-saved \n[doc-report-count]
3448 .  ds doc-report-name-saved "\*[doc-report-name]
3449 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3450 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3451 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3452 .  nr doc-url-count-saved \n[doc-url-count]
3453 .  ds doc-url-name-saved "\*[doc-url-name]
3454 .  nr doc-volume-count-saved \n[doc-volume-count]
3455 .  ds doc-volume-name-saved "\*[doc-volume-name]
3456 .  nr doc-have-author-saved \n[doc-have-author]
3458 .  ds doc-document-title-saved "\*[doc-document-title]
3459 .  ds doc-volume-saved "\*[doc-volume]
3460 .  ds doc-section-saved "\*[doc-section]
3461 .  ds doc-operating-system-saved "\*[doc-operating-system]
3462 .  ds doc-date-string-saved "\*[doc-date-string]
3463 .  nr doc-header-space-saved \n[doc-header-space]
3464 .  nr doc-footer-space-saved \n[doc-footer-space]
3465 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3466 .  ds doc-header-string-saved "\*[doc-header-string]
3467 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3468 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3469 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3473 .\" NS doc-restore-global-vars macro
3474 .\" NS   restore all global variables
3475 .\" NS
3476 .\" NS local variables:
3477 .\" NS   doc-reg-drgv
3479 .de doc-restore-global-vars
3480 .  ds doc-macro-name "\*[doc-macro-name-saved]
3481 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3482 .  nr doc-num-args \n[doc-num-args-saved]
3483 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3485 .  nr doc-reg-drgv 1
3486 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3487 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3488 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3489 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3490 .    nr doc-reg-drgv +1
3491 .  \}
3493 .  nr doc-curr-font \n[doc-curr-font-saved]
3494 .  nr doc-curr-size \n[doc-curr-size-saved]
3495 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3496 .  nr doc-in-library-section \n[doc-in-library-section-saved]
3497 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3498 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3499 .  nr doc-have-decl \n[doc-have-decl-saved]
3500 .  nr doc-have-var \n[doc-have-var-saved]
3501 .  ds doc-command-name "\*[doc-command-name-saved]
3502 .  ds doc-quote-left "\*[doc-quote-left-saved]
3503 .  ds doc-quote-right "\*[doc-quote-right-saved]
3504 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3505 .  nr doc-in-list \n[doc-in-list-saved]
3506 .  ds doc-space "\*[doc-space-saved]
3507 .  ds doc-saved-space "\*[doc-saved-space-saved]
3508 .  nr doc-space-mode \n[doc-space-mode-saved]
3509 .  nr doc-have-space \n[doc-have-space-saved]
3510 .  nr doc-have-slot \n[doc-have-slot-saved]
3511 .  nr doc-keep-type \n[doc-keep-type-saved]
3512 .  nr doc-display-depth \n[doc-display-depth-saved]
3513 .  nr doc-is-compact \n[doc-is-compact-saved]
3515 .  nr doc-reg-drgv 0
3516 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3517 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3518 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3519 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3520 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3521 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3522 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3523 .    nr doc-reg-drgv +1
3524 .  \}
3526 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3528 .  nr doc-reg-drgv 1
3529 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3530 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3531 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3532 .    nr doc-reg-drgv +1
3533 .  \}
3535 .  nr doc-list-depth \n[doc-list-depth-saved]
3537 .  nr doc-reg-drgv 1
3538 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3539 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3540 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3541 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3542 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3543 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3544 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3545 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3546 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3547 .    nr doc-reg-drgv +1
3548 .  \}
3550 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3551 .  nr doc-curr-type \n[doc-curr-type-saved]
3552 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3553 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3554 .  nr doc-num-columns \n[doc-num-columns-saved]
3555 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3556 .  nr doc-is-func \n[doc-is-func-saved]
3557 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3558 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3559 .  ds doc-func-arg "\*[doc-func-arg-saved]
3560 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3561 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3562 .  nr doc-have-func \n[doc-have-func-saved]
3563 .  nr doc-is-reference \n[doc-is-reference-saved]
3564 .  nr doc-reference-count \n[doc-reference-count-saved]
3565 .  nr doc-author-count \n[doc-author-count-saved]
3567 .  nr doc-reg-drgv 0
3568 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3569 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3570 .    nr doc-reg-drgv +1
3571 .  \}
3573 .  nr doc-book-count \n[doc-book-count-saved]
3574 .  ds doc-book-name "\*[doc-book-name-saved]
3575 .  nr doc-city-count \n[doc-city-count-saved]
3576 .  ds doc-city-name "\*[doc-city-name-saved]
3577 .  nr doc-date-count \n[doc-date-count-saved]
3578 .  ds doc-date "\*[doc-date-saved]
3579 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3580 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3581 .  nr doc-journal-count \n[doc-journal-count-saved]
3582 .  ds doc-journal-name "\*[doc-journal-name-saved]
3583 .  nr doc-issue-count \n[doc-issue-count-saved]
3584 .  ds doc-issue-name "\*[doc-issue-name-saved]
3585 .  nr doc-optional-count \n[doc-optional-count-saved]
3586 .  ds doc-optional-string "\*[doc-optional-string-saved]
3587 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3588 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3589 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3590 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3591 .  nr doc-report-count \n[doc-report-count-saved]
3592 .  ds doc-report-name "\*[doc-report-name-saved]
3593 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3594 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3595 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3596 .  nr doc-url-count \n[doc-url-count-saved]
3597 .  ds doc-url-name "\*[doc-url-name-saved]
3598 .  nr doc-volume-count \n[doc-volume-count-saved]
3599 .  ds doc-volume-name "\*[doc-volume-name-saved]
3600 .  nr doc-have-author \n[doc-have-author-saved]
3602 .  ds doc-document-title "\*[doc-document-title-saved]
3603 .  ds doc-volume "\*[doc-volume-saved]
3604 .  ds doc-section "\*[doc-section-saved]
3605 .  ds doc-operating-system "\*[doc-operating-system-saved]
3606 .  ds doc-date-string "\*[doc-date-string-saved]
3607 .  nr doc-header-space \n[doc-header-space-saved]
3608 .  nr doc-footer-space \n[doc-footer-space-saved]
3609 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3610 .  ds doc-header-string "\*[doc-header-string-saved]
3611 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3612 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3613 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3617 .\" NS El user macro
3618 .\" NS   end list
3619 .\" NS
3620 .\" NS modifies:
3621 .\" NS   doc-list-depth
3622 .\" NS   doc-macro-name
3623 .\" NS
3624 .\" NS local variables:
3625 .\" NS   doc-str-El
3626 .\" NS
3627 .\" NS width register `El' set in doc-common
3629 .de El
3630 .  if \n[.$] \{\
3631 .    tm Usage: .El (does not take arguments) (#\n[.c])
3632 .    return
3633 .  \}
3635 .  ds doc-macro-name El
3636 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3638 .  ie        "\*[doc-str-El]"diag-list" \
3639 .    doc-end-list 0
3640 .  el \{ .ie "\*[doc-str-El]"column-list" \
3641 .    doc-end-column-list
3642 .  el \{ .ie "\*[doc-str-El]"item-list" \
3643 .    doc-end-list 0
3644 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3645 .    doc-end-list 0
3646 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3647 .    doc-end-list 0
3648 .  el \
3649 .    doc-end-list 1
3650 .  \}\}\}\}
3652 .  br
3656 .\" NS doc-saved-Pa-font global string
3657 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3658 .\" NS   nroff)
3660 .ds doc-saved-Pa-font
3663 .\" NS doc-curr-type global register
3664 .\" NS   current argument type
3666 .nr doc-curr-type 0
3669 .\" NS doc-curr-arg global string
3670 .\" NS   current argument
3672 .ds doc-curr-arg
3675 .\" NS doc-item-boxXXX global box
3676 .\" NS   item boxes associated list depth
3677 .\" NS
3678 .\" NS limit:
3679 .\" NS   doc-list-depth
3682 .\" NS It user macro
3683 .\" NS   list item
3684 .\" NS
3685 .\" NS modifies:
3686 .\" NS   doc-arg-ptr
3687 .\" NS   doc-argXXX
3688 .\" NS   doc-curr-arg
3689 .\" NS   doc-curr-type
3690 .\" NS   doc-in-list
3691 .\" NS   doc-macro-name
3692 .\" NS   doc-num-args
3693 .\" NS   doc-saved-Pa-font
3694 .\" NS
3695 .\" NS local variables:
3696 .\" NS   doc-reg-It
3697 .\" NS   doc-str-It
3698 .\" NS   doc-XXX-list-type
3699 .\" NS
3700 .\" NS width register `It' set in doc-common
3702 .nr doc-bullet-list-type 1
3703 .nr doc-column-list-type 0
3704 .nr doc-dash-list-type 1
3705 .nr doc-diag-list-type 0
3706 .nr doc-enum-list-type 1
3707 .nr doc-hang-list-type 2
3708 .nr doc-inset-list-type 2
3709 .nr doc-item-list-type 1
3710 .nr doc-ohang-list-type 2
3711 .nr doc-tag-list-type 2
3713 .de It
3714 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3716 .  if "\*[doc-str-It]"" \
3717 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3719 .  if \n[doc-nesting-level] \{\
3720 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3721 .    tm1 " (#\n[.c])
3722 .  \}
3724 .  br
3725 .  if !\n[cR] \
3726 .    ne 3v
3728 .  if \n[.$] \{\
3729 .    ds doc-macro-name It
3731 .    \" fill argument vector
3732 .    nr doc-reg-It 1
3733 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3734 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3735 .      nr doc-reg-It +1
3736 .    \}
3738 .    nr doc-num-args \n[.$]
3739 .    nr doc-arg-ptr 0
3740 .  \}
3742 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3744 .  if \n[doc-reg-It] \{\
3745 .    \" start item box
3746 .    box doc-item-box\n[doc-list-depth]
3747 .    ev doc-item-env\n[doc-list-depth]
3748 .    evc 0
3749 .    in 0
3750 .    nf
3751 .  \}
3753 .  ie (\n[doc-reg-It] == 1) \{\
3754 .    if \n[.$] \{\
3755 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3756 .      tm1 "              don't take arguments (#\n[.c])
3757 .  \}\}
3758 .  el \{\
3759 .    ie \n[.$] \{\
3760 .      if (\n[doc-reg-It] == 2) \{\
3761 .        \" handle list types with arguments
3762 .        doc-parse-arg-vector
3764 .        nr doc-in-list 1
3765 .        nr doc-arg-ptr 1
3766 .        nr doc-curr-type \n[doc-type1]
3767 .        ds doc-curr-arg "\*[doc-arg1]
3769 .        if \n[doc-in-files-section] \{\
3770 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3771 .          if n \
3772 .            ds doc-Pa-font "\*[doc-No-font]
3773 .        \}
3775 .        ie (\n[doc-type1] == 1) \
3776 .          \*[doc-arg1]
3777 .        el \{\
3778 .          nr doc-arg-ptr 1
3779 .          doc-print-recursive
3780 .    \}\}\}
3781 .    el \{\
3782 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3783 .      tm1 "              require arguments (#\n[.c])
3784 .    \}
3785 .  \}
3787 .  \" the previous call of `.doc-print-recursive' can contain calls to
3788 .  \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3789 .  if !\n[doc-nesting-level] \
3790 .    doc-\*[doc-str-It]
3794 .\" NS doc-inset-list macro
3795 .\" NS   .It item of list-type inset
3796 .\" NS
3797 .\" NS modifies:
3798 .\" NS   doc-in-list
3800 .de doc-inset-list
3801 .  \" finish item box
3802 .  br
3803 .  ev
3804 .  box
3805 .  unformat doc-item-box\n[doc-list-depth]
3807 .  doc-set-vertical-and-indent 0
3808 .  br
3810 .  nh
3811 .  doc-item-box\n[doc-list-depth]
3813 .  if \n[doc-in-files-section] \
3814 .    if n \
3815 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3817 .  nr doc-in-list 0
3818 .  doc-reset-args
3822 .\" NS doc-hang-list macro
3823 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3824 .\" NS
3825 .\" NS modifies:
3826 .\" NS   doc-have-space
3827 .\" NS   doc-in-list
3828 .\" NS
3829 .\" NS local variables:
3830 .\" NS   doc-reg-dhl
3831 .\" NS   doc-reg-dhl1
3833 .de doc-hang-list
3834 .  \" finish item box
3835 .  br
3836 .  ev
3837 .  box
3838 .  unformat doc-item-box\n[doc-list-depth]
3840 .  doc-set-vertical-and-indent 1
3841 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3842 .  ti -\n[doc-reg-dhl]u
3844 .  nh
3845 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3846 .    doc-item-box\n[doc-list-depth]
3847 .  el \{\
3848 .    chop doc-item-box\n[doc-list-depth]
3849 .    nr doc-reg-dhl1 \n[.k]u
3850 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3851 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3852 .    nr doc-have-space 1
3853 .  \}
3855 .  if \n[doc-in-files-section] \
3856 .    if n \
3857 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3859 .  nr doc-in-list 0
3860 .  doc-reset-args
3864 .\" NS doc-ohang-list macro
3865 .\" NS   .It item of list-type overhanging tag
3866 .\" NS
3867 .\" NS modifies:
3868 .\" NS   doc-in-list
3870 .de doc-ohang-list
3871 .  \" finish item box
3872 .  br
3873 .  ev
3874 .  box
3875 .  unformat doc-item-box\n[doc-list-depth]
3877 .  doc-set-vertical-and-indent 0
3878 .  nh
3879 .  doc-item-box\n[doc-list-depth]
3880 .  br
3882 .  if \n[doc-in-files-section] \
3883 .    if n \
3884 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3886 .  nr doc-in-list 0
3887 .  doc-reset-args
3891 .\" NS doc-item-list macro
3892 .\" NS   .It item of list-type [empty tag]
3894 .de doc-item-list
3895 .  \" finish (dummy) item box
3896 .  br
3897 .  ev
3898 .  box
3900 .  doc-set-vertical-and-indent 0
3901 .  br
3903 .  doc-reset-args
3907 .\" NS doc-enum-list-count-stackXXX global register
3908 .\" NS   stack of current enum count values
3909 .\" NS
3910 .\" NS limit:
3911 .\" NS   doc-list-depth
3913 .nr doc-enum-list-count-stack1 0
3916 .\" NS doc-enum-list macro
3917 .\" NS   enumerated list
3918 .\" NS
3919 .\" NS modifies:
3920 .\" NS   doc-enum-list-count-stackXXX
3921 .\" NS   doc-in-list
3923 .de doc-enum-list
3924 .  nr doc-in-list 1
3925 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3926 \# XXX
3927 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3928 \#.rj
3929 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3930 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3931 .  doc-do-list
3935 .\" NS doc-bullet-list macro
3936 .\" NS   bullet paragraph list
3937 .\" NS
3938 .\" NS modifies:
3939 .\" NS   doc-in-list
3941 .de doc-bullet-list
3942 .  nr doc-in-list 1
3943 .  nop \)\*[doc-Sy-font]\[bu]\f[]
3944 .  doc-do-list
3948 .\" NS doc-dash-list macro
3949 .\" NS   hyphen paragraph list (sub bullet list)
3950 .\" NS
3951 .\" NS modifies:
3952 .\" NS   doc-in-list
3954 .de doc-dash-list
3955 .  nr doc-in-list 1
3956 .  nop \)\*[doc-Sy-font]\-\f[]
3957 .  doc-do-list
3961 .\" NS doc-do-list macro
3962 .\" NS   .It item of list-type enum/bullet/hyphen
3964 .als doc-do-list doc-hang-list
3967 .\" NS doc-diag-list-input-line-count global register
3968 .\" NS   saved line number to be checked in next diag-list item
3970 .nr doc-diag-list-input-line-count 0
3973 .\" NS doc-diag-list macro
3974 .\" NS   .It item of list-type diagnostic-message
3975 .\" NS
3976 .\" NS modifies:
3977 .\" NS   doc-curr-font
3978 .\" NS   doc-curr-size
3979 .\" NS   doc-diag-list-input-line-count
3981 .de doc-diag-list
3982 .  nr doc-curr-font \n[.f]
3983 .  nr doc-curr-size \n[.ps]
3985 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3986 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3987 .      doc-paragraph
3988 .    el \
3989 .      br
3990 .  \}
3991 .  el \
3992 .    br
3993 .  nr doc-diag-list-input-line-count \n[.c]
3995 .  nh
3996 .  nop \*[doc-Sy-font]\c
3997 .  if \n[doc-num-args] \
3998 .    doc-remaining-args
3999 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
4001 .  doc-print-and-reset
4005 .\" NS doc-tag-list macro
4006 .\" NS   .It item of list-type `tag'
4007 .\" NS
4008 .\" NS modifies:
4009 .\" NS   doc-have-space
4010 .\" NS   doc-in-list
4011 .\" NS
4012 .\" NS local variables:
4013 .\" NS   doc-box-dtl
4014 .\" NS   doc-reg-dtl
4015 .\" NS   doc-reg-dtl1
4017 .de doc-tag-list
4018 .  \" finish item box
4019 .  br
4020 .  ev
4021 .  box
4022 .  unformat doc-item-box\n[doc-list-depth]
4024 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
4025 .  box doc-box-dtl
4026 .  ev doc-env-dtl
4027 .  evc 0
4028 .  fi
4029 .  ad 0
4030 .  in 0
4031 .  doc-item-box\n[doc-list-depth]
4032 .  br
4033 .  ev
4034 .  box
4036 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4037 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4038 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4039 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
4040 .    \}
4041 .    doc-get-tag-width
4042 .  \}
4043 .  doc-set-vertical-and-indent 1
4044 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4045 .  ti -\n[doc-reg-dtl]u
4047 .  nh
4048 .  doc-item-box\n[doc-list-depth]
4049 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4050 .    br
4051 .  el \{\
4052 .    \" format the tag separately to prevent stretching of spaces
4053 .    vpt 0
4054 .    br
4055 .    sp -1
4056 .    vpt 1
4057 .    nop \&\c
4058 .    nr doc-have-space 1
4059 .  \}
4061 .  if \n[doc-in-files-section] \
4062 .    if n \
4063 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
4065 .  nr doc-in-list 0
4066 .  doc-reset-args
4070 .\" NS doc-get-tag-width macro
4071 .\" NS   resolve unknown tag width (`tag' list-type only)
4072 .\" NS
4073 .\" NS modifies:
4074 .\" NS   doc-list-indent-stackXXX
4075 .\" NS   doc-tag-width-stackXXX
4076 .\" NS
4077 .\" NS requires:
4078 .\" NS   doc-curr-arg
4079 .\" NS   doc-curr-type
4081 .de doc-get-tag-width
4082 .  ie (\n[doc-curr-type] == 1) \{\
4083 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4084 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4085 .  \}
4086 .  el \{\
4087 .    ds doc-tag-width-stack\n[doc-list-depth] No
4088 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4089 .  \}
4093 .\" NS doc-set-vertical-and-indent macro
4094 .\" NS   set up vertical spacing (if not compact) and indentation (with
4095 .\" NS   offset if argument is non-zero)
4096 .\" NS
4097 .\" NS modifies:
4098 .\" NS   doc-list-have-indent-stackXXX
4100 .de doc-set-vertical-and-indent
4101 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4102 .    sp \n[doc-display-vertical]u
4104 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4105 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4106 .    if \$1 \
4107 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4108 .  \}
4110 .  if !\n[cR] \
4111 .    ne 2v
4115 .\" NS doc-list-depth global register
4116 .\" NS   list type stack counter
4118 .nr doc-list-depth 0
4121 .\" NS doc-num-columns global register
4122 .\" NS   number of columns
4124 .nr doc-num-columns 0
4127 .\" NS doc-compact-list-stackXXX global register (bool)
4128 .\" NS   stack of flags to indicate whether a particular list is compact
4129 .\" NS
4130 .\" NS limit:
4131 .\" NS   doc-list-depth
4133 .nr doc-compact-list-stack1 0
4136 .\" NS doc-tag-prefix-stackXXX global string
4137 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4138 .\" NS
4139 .\" NS limit:
4140 .\" NS   doc-list-depth
4142 .ds doc-tag-prefix-stack1
4145 .\" NS doc-tag-width-stackXXX global string
4146 .\" NS   stack of strings indicating how to set up current element of
4147 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4148 .\" NS   directly; if it is a macro name, use the macro's width value;
4149 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4150 .\" NS
4151 .\" NS limit:
4152 .\" NS   doc-list-depth
4154 .ds doc-tag-width-stack0
4155 .ds doc-tag-width-stack1
4158 .\" NS doc-list-offset-stackXXX global register
4159 .\" NS   stack of list offsets
4160 .\" NS
4161 .\" NS limit:
4162 .\" NS   doc-list-depth
4164 .nr doc-list-offset-stack1 0
4167 .\" NS doc-end-list macro
4168 .\" NS   list end function; resets indentation (and offset if argument is
4169 .\" NS   non-zero)
4170 .\" NS
4171 .\" NS modifies:
4172 .\" NS   doc-list-depth
4173 .\" NS   doc-list-offset-stackXXX
4175 .de doc-end-list
4176 .  if \$1 \
4177 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4179 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4181 .  if (\n[doc-list-depth] <= 0) \
4182 .    tm mdoc warning: extraneous .El call (#\n[.c])
4184 .  doc-decrement-list-stack
4185 .  nr doc-list-depth -1
4189 .\" NS doc-increment-list-stack macro
4190 .\" NS   set up next block for list
4191 .\" NS
4192 .\" NS modifies:
4193 .\" NS   doc-compact-list-stackXXX
4194 .\" NS   doc-list-have-indent-stackXXX
4195 .\" NS   doc-list-indent-stackXXX
4196 .\" NS   doc-list-offset-stackXXX
4197 .\" NS   doc-list-type-stackXXX
4198 .\" NS   doc-tag-prefix-stackXXX
4199 .\" NS   doc-tag-width-stackXXX
4200 .\" NS   doc-enum-list-count-stackXXX
4201 .\" NS
4202 .\" NS local variables:
4203 .\" NS   doc-reg-dils
4205 .de doc-increment-list-stack
4206 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4207 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4208 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4209 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4210 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4211 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4212 .  ds doc-list-type-stack\n[doc-reg-dils]
4213 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4214 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4218 .\" NS doc-decrement-list-stack macro
4219 .\" NS   decrement stack
4220 .\" NS
4221 .\" NS modifies:
4222 .\" NS   doc-compact-list-stackXXX
4223 .\" NS   doc-list-have-indent-stackXXX
4224 .\" NS   doc-list-indent-stackXXX
4225 .\" NS   doc-list-offset-stackXXX
4226 .\" NS   doc-list-type-stackXXX
4227 .\" NS   doc-tag-prefix-stackXXX
4228 .\" NS   doc-tag-width-stackXXX
4229 .\" NS   doc-enum-list-count-stackXXX
4231 .de doc-decrement-list-stack
4232 .  ds doc-list-type-stack\n[doc-list-depth]
4233 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4234 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4235 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4236 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4237 .  ds doc-tag-width-stack\n[doc-list-depth]
4238 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4239 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4243 .\" NS Xr user macro
4244 .\" NS   cross reference (for man pages only)
4245 .\" NS
4246 .\" NS modifies:
4247 .\" NS   doc-arg-ptr
4248 .\" NS   doc-macro-name
4249 .\" NS
4250 .\" NS local variables:
4251 .\" NS   doc-reg-Xr
4252 .\" NS
4253 .\" NS width register `Xr' set in doc-common
4255 .de Xr
4256 .  if !\n[doc-arg-limit] \{\
4257 .    ie \n[.$] \{\
4258 .      ds doc-macro-name Xr
4259 .      doc-parse-args \$@
4260 .    \}
4261 .    el \
4262 .      doc-Xr-usage
4263 .  \}
4265 .  if !\n[doc-arg-limit] \
4266 .    return
4268 .  nr doc-arg-ptr +1
4269 .  doc-print-prefixes
4270 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4271 .    \" first argument must be a string
4272 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4273 .      nr doc-curr-font \n[.f]
4274 .      nr doc-curr-size \n[.ps]
4275 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4277 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4278 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4279 .        \" modify second argument if it is a string and
4280 .        \" remove space in between
4281 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4282 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4283 .          ds doc-space\n[doc-arg-ptr]
4284 .        \}
4285 .      \}
4286 .      doc-print-recursive
4287 .    \}
4288 .    el \
4289 .      doc-Xr-usage
4290 .  \}
4291 .  el \
4292 .    doc-Xr-usage
4296 .\" NS doc-Xr-usage macro
4298 .de doc-Xr-usage
4299 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4300 .  doc-reset-args
4304 .\" NS Sx user macro
4305 .\" NS   cross section reference
4306 .\" NS
4307 .\" NS width register `Sx' set in doc-common
4309 .als Sx doc-generic-macro
4310 .ds doc-Sx-usage section_header
4313 .\" NS doc-end-column-list macro
4314 .\" NS   column-list end-list
4315 .\" NS
4316 .\" NS modifies:
4317 .\" NS   doc-list-depth
4319 .de doc-end-column-list
4320 .  linetabs 0
4321 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4322 .  ta T .5i
4323 .  fi
4324 .  doc-decrement-list-stack
4325 .  nr doc-list-depth -1
4329 .\" NS doc-column-indent-width global register
4330 .\" NS   holds the indent width for a column list
4332 .nr doc-column-indent-width 0
4335 .\" NS doc-set-column-tab macro
4336 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4337 .\" NS
4338 .\" NS modifies:
4339 .\" NS   doc-column-indent-width
4340 .\" NS
4341 .\" NS local variables:
4342 .\" NS   doc-reg-dsct
4343 .\" NS   doc-str-dsct
4344 .\" NS   doc-str-dsct1
4346 .de doc-set-column-tab
4347 .  ds doc-str-dsct
4348 .  nr doc-reg-dsct 1
4349 .  nr doc-column-indent-width 0
4351 .  ie (\$1 < 5) \
4352 .    ds doc-str-dsct1 "    \"
4353 .  el \{\
4354 .    ie (\$1 == 5) \
4355 .      ds doc-str-dsct1 "   \"
4356 .    el \{\
4357 .      \" XXX: this is packed abnormally close -- intercolumn width
4358 .      \"      should be configurable
4359 .      ds doc-str-dsct1 " \"
4360 .  \}\}
4362 .  while (\n[doc-reg-dsct] <= \$1) \{\
4363 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4364 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4365 .    nr doc-reg-dsct +1
4366 .  \}
4368 .  ta \*[doc-str-dsct]
4369 '  in +\n[doc-column-indent-width]u
4373 .\" NS doc-column-list macro
4374 .\" NS   column items
4375 .\" NS
4376 .\" NS modifies:
4377 .\" NS   doc-arg-ptr
4378 .\" NS   doc-list-indent-stackXXX
4379 .\" NS   doc-spaceXXX
4380 .\" NS
4381 .\" NS local variables:
4382 .\" NS   doc-reg-dcl
4384 .de doc-column-list
4385 .  if \n[doc-num-args] \
4386 .    doc-parse-arg-vector
4387 .  nr doc-arg-ptr +1
4389 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4390 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4391 .    return
4392 .  \}
4394 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4395 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4396 .    ds doc-space\n[doc-reg-dcl]
4397 .  \}
4399 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4400 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4401 .  if !\n[.u] \{\
4402 .    fi
4403 .    in +\n[doc-column-indent-width]u
4404 .  \}
4405 .  ti -\n[doc-column-indent-width]u
4407 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4411 .\" NS Ta user macro
4412 .\" NS   append tab (\t)
4413 .\" NS
4414 .\" NS modifies:
4415 .\" NS   doc-arg-ptr
4416 .\" NS
4417 .\" NS width register `Ta' set in doc-common
4419 .de Ta
4420 .  ie \n[doc-arg-limit] \{\
4421 .    nr doc-arg-ptr +1
4422 .    nop \*[doc-tab]\c
4423 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4424 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4425 .    el \
4426 .      doc-reset-args
4427 .  \}
4428 .  el \{\
4429 .    tm1 "Usage: Ta must follow column entry: e.g.
4430 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4431 .  \}
4435 .\" NS Dl user macro
4436 .\" NS   display (one line) literal
4437 .\" NS
4438 .\" NS   this function uses the `Li' font
4439 .\" NS
4440 .\" NS modifies:
4441 .\" NS   doc-arg-ptr
4442 .\" NS   doc-curr-font
4443 .\" NS   doc-curr-size
4444 .\" NS   doc-macro-name
4445 .\" NS
4446 .\" NS width register `Dl' set in doc-common
4448 .de Dl
4449 .  ta T .5i
4450 .  in +\n[doc-display-indent]u
4452 .  ie \n[doc-arg-limit] \{\
4453 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4454 .    doc-reset-args
4455 .  \}
4456 .  el \{\
4457 .    ie \n[.$] \{\
4458 .      ds doc-macro-name Dl
4459 .      doc-parse-args \$@
4460 .      nr doc-arg-ptr 1
4461 .      nr doc-curr-font \n[.f]
4462 .      nr doc-curr-size \n[.ps]
4463 .      nop \*[doc-Li-font]\c
4464 .      doc-print-recursive
4465 .    \}
4466 .    el \
4467 .      tm Usage: .Dl argument ... (#\n[.c])
4468 .  \}
4470 .  in -\n[doc-display-indent]u
4474 .\" NS D1 user macro
4475 .\" NS   display (one line)
4476 .\" NS
4477 .\" NS modifies:
4478 .\" NS   doc-arg-ptr
4479 .\" NS   doc-macro-name
4480 .\" NS
4481 .\" NS width register `D1' set in doc-common
4483 .de D1
4484 .  ta T .5i
4485 .  in +\n[doc-display-indent]u
4487 .  ie \n[doc-arg-limit] \{\
4488 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4489 .    doc-reset-args
4490 .  \}
4491 .  el \{\
4492 .    ie \n[.$] \{\
4493 .      ds doc-macro-name D1
4494 .      doc-parse-args \$@
4495 .      nr doc-arg-ptr 1
4496 .      doc-print-recursive
4497 .    \}
4498 .    el \
4499 .      tm Usage: .D1 argument ... (#\n[.c])
4500 .  \}
4502 .  in -\n[doc-display-indent]u
4506 .\" NS Vt user macro
4507 .\" NS   variable type (for forcing old style variable declarations);
4508 .\" NS   this is not done in the same manner as .Ot for fortrash --
4509 .\" NS   clean up later
4510 .\" NS
4511 .\" NS modifies:
4512 .\" NS   doc-curr-font
4513 .\" NS   doc-curr-size
4514 .\" NS   doc-have-decl
4515 .\" NS   doc-have-var
4516 .\" NS   doc-macro-name
4517 .\" NS
4518 .\" NS width register `Vt' set in doc-common
4520 .de Vt
4521 .  if !\n[doc-arg-limit] \{\
4522 .    ie \n[.$] \{\
4523 .      ds doc-macro-name Vt
4524 .      doc-parse-args \$@
4525 .    \}
4526 .    el \
4527 .      tm Usage: .Vt variable_type ... (#\n[.c])
4528 .  \}
4530 .  if !\n[doc-arg-limit] \
4531 .    return
4533 .  nr doc-arg-ptr +1
4534 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4535 .    tm Usage: .Vt variable_type ... (#\n[.c])
4536 .    doc-reset-args
4537 .    return
4538 .  \}
4540 .  if \n[doc-in-synopsis-section] \{\
4541 .    \" if a function declaration was the last thing given,
4542 .    \" want vertical space
4543 .    if \n[doc-have-decl] \{\
4544 .      doc-paragraph
4545 .      nr doc-have-decl 0
4546 .    \}
4548 .    \" if a subroutine was the last thing given, want vertical space
4549 .    if \n[doc-have-func] \{\
4550 .      ie \n[doc-have-var] \
4551 .        br
4552 .      el \
4553 .        doc-paragraph
4554 .    \}
4556 .    nr doc-have-var 1
4557 .  \}
4559 .  nr doc-curr-font \n[.f]
4560 .  nr doc-curr-size \n[.ps]
4561 .  nop \*[doc-Ft-font]\c
4562 .  doc-print-recursive
4564 .  if \n[doc-in-synopsis-section] \{\
4565 .    ie \n[doc-have-old-func] \
4566 .      nop \*[doc-soft-space]\c
4567 .    el \
4568 .      br
4569 .  \}
4573 .\" NS doc-is-func global register (bool)
4574 .\" NS   set if subroutine (in synopsis only) (fortran only)
4576 .nr doc-is-func 0
4579 .\" NS Ft user macro
4580 .\" NS   function type
4581 .\" NS
4582 .\" NS modifies:
4583 .\" NS   doc-curr-font
4584 .\" NS   doc-curr-size
4585 .\" NS   doc-have-decl
4586 .\" NS   doc-have-var
4587 .\" NS   doc-is-func
4588 .\" NS   doc-macro-name
4589 .\" NS
4590 .\" NS width register `Ft' set in doc-common
4592 .de Ft
4593 .  if !\n[doc-arg-limit] \{\
4594 .    ie \n[.$] \{\
4595 .      ds doc-macro-name Ft
4596 .      doc-parse-args \$@
4597 .    \}
4598 .    el \
4599 .      tm Usage: .Ft function_type ... (#\n[.c])
4600 .  \}
4602 .  if !\n[doc-arg-limit] \
4603 .    return
4605 .  nr doc-arg-ptr +1
4606 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4607 .    tm Usage: .Ft function_type ... (#\n[.c])
4608 .    doc-reset-args
4609 .    return
4610 .  \}
4612 .  if \n[doc-in-synopsis-section] \{\
4613 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4614 .      doc-paragraph
4615 .      nr doc-have-decl 0
4616 .      nr doc-have-var 0
4617 .    \}
4619 .    if \n[doc-have-var] \{\
4620 .      doc-paragraph
4621 .      nr doc-have-var 0
4622 .    \}
4624 .    nr doc-is-func 1
4625 .  \}
4627 .  nr doc-curr-font \n[.f]
4628 .  nr doc-curr-size \n[.ps]
4629 .  nop \*[doc-Ft-font]\c
4630 .  doc-print-recursive
4634 .\" NS doc-have-old-func global register (bool)
4635 .\" NS   set if `Ot' has been called
4637 .nr doc-have-old-func 0
4640 .\" NS Ot user macro
4641 .\" NS   old function type (fortran -- no newline)
4642 .\" NS
4643 .\" NS modifies:
4644 .\" NS   doc-have-decl
4645 .\" NS   doc-have-old-func
4646 .\" NS   doc-have-var
4647 .\" NS   doc-is-func
4648 .\" NS
4649 .\" NS width register `Ot' set in doc-common
4651 .de Ot
4652 .  nr doc-have-old-func 1
4654 .  if \n[doc-in-synopsis-section] \{\
4655 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4656 .      doc-paragraph
4657 .      nr doc-have-decl 0
4658 .      nr doc-have-var 0
4659 .    \}
4661 .    if \n[doc-have-var] \{\
4662 .      doc-paragraph
4663 .      nr doc-have-var 0
4664 .    \}
4666 .    nr doc-is-func 1
4667 .  \}
4669 .  if \n[.$] \
4670 .    nop \*[doc-Ft-font]\$*\c
4671 .  nop \ \f[]\c
4675 .\" NS Fa user macro
4676 .\" NS   function arguments
4677 .\" NS
4678 .\" NS modifies:
4679 .\" NS   doc-arg-ptr
4680 .\" NS   doc-curr-font
4681 .\" NS   doc-curr-size
4682 .\" NS   doc-macro-name
4683 .\" NS
4684 .\" NS width register `Fa' set in doc-common
4686 .de Fa
4687 .  if !\n[doc-arg-limit] \{\
4688 .    ie \n[.$] \{\
4689 .      ds doc-macro-name Fa
4690 .      doc-parse-args \$@
4691 .    \}
4692 .    el \
4693 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4694 .  \}
4696 .  ie \n[doc-func-arg-count] \
4697 .    doc-do-func
4698 .  el \{\
4699 .    nr doc-arg-ptr +1
4700 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4701 .      nr doc-curr-font \n[.f]
4702 .      nr doc-curr-size \n[.ps]
4703 .      nop \*[doc-Fa-font]\c
4704 .      doc-print-recursive
4706 .      if \n[doc-in-synopsis-section] \
4707 .        if \n[doc-have-func] \
4708 .          br
4709 .  \}\}
4713 .\" NS doc-func-arg-count global register
4714 .\" NS   how many function arguments have been processed so far
4716 .nr doc-func-arg-count 0
4719 .\" NS doc-func-arg global string
4720 .\" NS   work buffer for function name strings
4722 .ds doc-func-arg
4725 .\" NS doc-num-func-args global register
4726 .\" NS   number of function arguments
4728 .nr doc-num-func-args 0
4731 .\" NS doc-func-args-processed global register
4732 .\" NS   function arguments processed so far
4734 .nr doc-func-args-processed 0
4737 .\" NS doc-do-func macro
4738 .\" NS   internal .Fa for .Fc
4739 .\" NS
4740 .\" NS modifies:
4741 .\" NS   doc-arg-ptr
4742 .\" NS   doc-argXXX
4743 .\" NS   doc-func-arg
4744 .\" NS   doc-func-arg-count
4745 .\" NS   doc-func-args-processed
4746 .\" NS   doc-num-func-args
4748 .de doc-do-func
4749 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4750 .    doc-reset-args
4751 .    return
4752 .  \}
4754 .  nr doc-arg-ptr +1
4756 .  ds doc-func-arg
4757 .  nr doc-num-func-args 0
4758 .  nr doc-func-args-processed 0
4760 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4761 .  if (\n[doc-num-func-args] > 1) \
4762 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4764 .  if (\n[doc-func-arg-count] > 1) \{\
4765 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4766 .    if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4767 .      if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4768 .        nop ,\)\c
4769 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4770 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4771 .  \}
4773 .  if (\n[doc-func-arg-count] == 1) \{\
4774 .    nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4775 .    nop \f[]\s[0]\c
4776 .  \}
4777 .  nr doc-func-arg-count +1
4778 .  doc-do-func
4782 .\" NS doc-have-func global register (bool)
4783 .\" NS   whether we have more than one function in synopsis
4785 .nr doc-have-func 0
4788 .\" NS Fn user macro
4789 .\" NS   functions
4790 .\" NS
4791 .\" NS modifies:
4792 .\" NS   doc-arg-ptr
4793 .\" NS   doc-curr-font
4794 .\" NS   doc-curr-size
4795 .\" NS   doc-have-decl
4796 .\" NS   doc-have-func
4797 .\" NS   doc-have-var
4798 .\" NS   doc-indent-synopsis
4799 .\" NS   doc-is-func
4800 .\" NS   doc-macro-name
4801 .\" NS
4802 .\" NS width register `Fn' set in doc-common
4804 .de Fn
4805 .  if !\n[doc-arg-limit] \{\
4806 .    ie \n[.$] \{\
4807 .      ds doc-macro-name Fn
4808 .      doc-parse-args \$@
4809 .    \}
4810 .    el \
4811 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4812 .  \}
4814 .  if !\n[doc-arg-limit] \
4815 .    return
4817 .  if \n[doc-in-synopsis-section] \{\
4818 .    \" if there is/has been more than one subroutine declaration
4819 .    ie \n[doc-is-func] \{\
4820 .      br
4821 .      nr doc-have-var 0
4822 .      nr doc-have-decl 0
4823 .      nr doc-is-func 0
4824 .    \}
4825 .    el \{\
4826 .      if \n[doc-have-func] \{\
4827 .        doc-paragraph
4828 .        nr doc-have-var 0
4829 .        nr doc-have-decl 0
4830 .    \}\}
4832 .    if \n[doc-have-decl] \{\
4833 .      doc-paragraph
4834 .      nr doc-have-var 0
4835 .    \}
4837 .    if \n[doc-have-var] \{\
4838 .      doc-paragraph
4839 .      nr doc-have-decl 0
4840 .    \}
4842 .    nr doc-have-func 1
4843 .    nr doc-is-func 0
4845 .    br
4846 .    if !\n[doc-indent-synopsis] \
4847 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4848 .    if !\n[doc-indent-synopsis-active] \
4849 .      in +\n[doc-indent-synopsis]u
4850 .    ti -\n[doc-indent-synopsis]u
4851 .  \}
4853 .  nr doc-arg-ptr +1
4854 .  doc-print-prefixes
4855 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4856 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4857 .    doc-reset-args
4858 .    return
4859 .  \}
4861 .  nr doc-curr-font \n[.f]
4862 .  nr doc-curr-size \n[.ps]
4863 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4864 .  nop \f[]\s[0]\*[lp]\)\c
4866 .  nr doc-arg-ptr +1
4867 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4868 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4869 .      nop \*[doc-Fa-font]\c
4870 .      doc-do-func-args
4871 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4872 .  \}\}
4874 .  nop \)\*[rp]\)\c
4875 .  if \n[doc-in-synopsis-section] \
4876 .    nop \);\)\c
4878 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4879 .    \" output the space (if needed)
4880 .    nr doc-arg-ptr -1
4881 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4882 .    nr doc-arg-ptr +1
4884 .    doc-print-recursive
4885 .  \}
4886 .  el \
4887 .    doc-print-and-reset
4889 .  if \n[doc-in-synopsis-section] \
4890 .    if !\n[doc-indent-synopsis-active] \
4891 .      in -\n[doc-indent-synopsis]u
4895 .\" NS doc-do-func-args macro
4896 .\" NS   handle function arguments
4897 .\" NS
4898 .\" NS modifies:
4899 .\" NS   doc-arg-ptr
4900 .\" NS   doc-argXXX
4901 .\" NS   doc-func-arg
4902 .\" NS   doc-func-args-processed
4903 .\" NS   doc-num-func-args
4904 .\" NS
4905 .\" NS local variables:
4906 .\" NS   doc-reg-ddfa
4908 .de doc-do-func-args
4909 .  if \n[doc-in-synopsis-section] \{\
4910 .    ds doc-func-arg
4911 .    nr doc-num-func-args 0
4912 .    nr doc-func-args-processed 0
4914 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4915 .    if (\n[doc-num-func-args] > 1) \
4916 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4917 .  \}
4919 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4920 .  nr doc-arg-ptr +1
4922 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4923 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4924 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4925 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4926 .      if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4927 .        if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4928 .          nop ,\)\c
4929 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4930 .      doc-do-func-args
4931 .  \}\}
4935 .\" NS doc-saved-nesting-level global register
4937 .nr doc-saved-nesting-level 0
4940 .\" NS doc-in-func-enclosure global register (bool)
4942 .nr doc-in-func-enclosure 0
4945 .\" NS Fo user macro
4946 .\" NS   function open
4947 .\" NS
4948 .\" NS modifies:
4949 .\" NS   doc-arg-ptr
4950 .\" NS   doc-curr-font
4951 .\" NS   doc-curr-size
4952 .\" NS   doc-func-arg-count
4953 .\" NS   doc-have-decl
4954 .\" NS   doc-have-func
4955 .\" NS   doc-have-var
4956 .\" NS   doc-in-func-enclosure
4957 .\" NS   doc-indent-synopsis
4958 .\" NS   doc-is-func
4959 .\" NS   doc-macro-name
4960 .\" NS   doc-saved-nesting-level
4961 .\" NS
4962 .\" NS width register `Fo' set in doc-common
4964 .de Fo
4965 .  if (\n[doc-in-func-enclosure]) \{\
4966 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4967 .    return
4968 .  \}
4970 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4971 .  nr doc-in-func-enclosure 1
4973 .  if !\n[doc-arg-limit] \{\
4974 .    ie \n[.$] \{\
4975 .      ds doc-macro-name Fo
4976 .      doc-parse-args \$@
4977 .    \}
4978 .    el \
4979 .      tm Usage: .Fo function_name (#\n[.c])
4980 .  \}
4982 .  if \n[doc-in-synopsis-section] \{\
4983 .    \" if there is/has been more than one subroutine declaration
4984 .    ie \n[doc-is-func] \{\
4985 .      br
4986 .      nr doc-have-var 0
4987 .      nr doc-have-decl 0
4988 .      nr doc-is-func 0
4989 .    \}
4990 .    el \{\
4991 .      if \n[doc-have-func] \{\
4992 .        doc-paragraph
4993 .        nr doc-have-var 0
4994 .        nr doc-have-decl 0
4995 .    \}\}
4997 .    if \n[doc-have-decl] \{\
4998 .      doc-paragraph
4999 .      nr doc-have-var 0
5000 .    \}
5002 .    if \n[doc-have-var] \{\
5003 .      doc-paragraph
5004 .      nr doc-have-decl 0
5005 .    \}
5007 .    nr doc-have-func 1
5008 .    nr doc-is-func 0
5010 .    br
5011 .    if !\n[doc-indent-synopsis] \
5012 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
5013 .  \}
5015 .  \" start function box
5016 .  box doc-func-box
5017 .  ev doc-func-env
5018 .  evc 0
5019 .  in 0
5020 .  nf
5022 .  nr doc-arg-ptr +1
5023 .  doc-print-prefixes
5024 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5025 .    nr doc-func-arg-count 1
5026 .    nr doc-curr-font \n[.f]
5027 .    nr doc-curr-size \n[.ps]
5029 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
5030 .    nop \f[]\s[0]\*[lp]\)\c
5031 .    doc-reset-args
5032 .  \}
5036 .\" NS Fc user macro
5037 .\" NS   function close
5038 .\" NS
5039 .\" NS modifies:
5040 .\" NS   doc-arg-ptr
5041 .\" NS   doc-func-arg-count
5042 .\" NS   doc-in-func-enclosure
5043 .\" NS   doc-saved-nesting-level
5044 .\" NS   doc-macro-name
5045 .\" NS
5046 .\" NS width register `Fc' set in doc-common
5048 .de Fc
5049 .  if !\n[doc-in-func-enclosure] \{\
5050 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
5051 .    return
5052 .  \}
5054 .  if \n[.$] \{\
5055 .    ds doc-macro-name Fc
5056 .    \" the first (dummy) argument is used to get the correct spacing
5057 .    doc-parse-args \) \$@
5058 .  \}
5060 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5061 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5063 .  nr doc-func-arg-count 0
5064 .  nr doc-in-func-enclosure 0
5066 .  ie \n[doc-in-synopsis-section] \
5067 .    nop \|\*[rp];\)
5068 .  el \
5069 .    nop \|\*[rp]\)
5071 .  \" finish function box
5072 .  br
5073 .  ev
5074 .  box
5075 .  chop doc-func-box
5076 .  unformat doc-func-box
5078 .  if \n[doc-in-synopsis-section] \{\
5079 .    if !\n[doc-indent-synopsis-active] \
5080 .      in +\n[doc-indent-synopsis]u
5081 .    ti -\n[doc-indent-synopsis]u
5082 .  \}
5084 .  nh
5085 .  nop \*[doc-func-box]\c
5087 .  nr doc-arg-ptr +1
5088 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5089 .    nr doc-curr-font \n[.f]
5090 .    nr doc-curr-size \n[.ps]
5091 .    doc-print-recursive
5092 .  \}
5093 .  el \
5094 .    doc-print-and-reset
5096 .  if \n[doc-in-synopsis-section] \
5097 .    if !\n[doc-indent-synopsis-active] \
5098 .      in -\n[doc-indent-synopsis]u
5102 .\" NS doc-build-func-string macro
5103 .\" NS   collect function arguments and set hard spaces in between
5104 .\" NS
5105 .\" NS modifies:
5106 .\" NS   doc-func-arg
5107 .\" NS   doc-func-args-processed
5108 .\" NS   doc-num-func-args
5110 .de doc-build-func-string
5111 .  if !\n[doc-num-func-args] \{\
5112 .    nr doc-num-func-args \n[.$]
5113 .    nr doc-func-args-processed 0
5114 .    ds doc-func-arg
5115 .  \}
5117 .  nr doc-func-args-processed +1
5118 .  as doc-func-arg "\$1
5120 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5121 .    as doc-func-arg "\*[doc-hard-space]
5123 .    shift
5124 .    doc-build-func-string \$@
5125 .  \}
5129 .\" Very crude references: Stash all reference info into boxes, print out
5130 .\" reference on .Re macro and clean up.  Ordering very limited, no fancy
5131 .\" citations, but can do articles, journals, and books -- need to add
5132 .\" several missing options (like city etc).  Should be able to grab a refer
5133 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5134 .\" (ha!).
5137 .\" NS doc-is-reference global register (bool)
5138 .\" NS   set if in reference
5140 .nr doc-is-reference 0
5143 .\" NS doc-reference-count global register
5144 .\" NS   reference element counter
5146 .nr doc-reference-count 0
5149 .\" NS Rs user macro
5150 .\" NS   reference start
5151 .\" NS
5152 .\" NS modifies:
5153 .\" NS   doc-is-reference
5154 .\" NS   doc-reference-count
5155 .\" NS
5156 .\" NS width register `Rs' set in doc-common
5158 .de Rs
5159 .  ie \n[.$] \
5160 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5161 .  el \{\
5162 .    nr doc-is-reference 1
5163 .    doc-reset-reference
5164 .    if \n[doc-in-see-also-section] \
5165 .      doc-paragraph
5166 .    nr doc-reference-count 0
5167 .  \}
5171 .\" NS Re user macro
5172 .\" NS   reference end
5173 .\" NS
5174 .\" NS modifies:
5175 .\" NS   doc-is-reference
5176 .\" NS
5177 .\" NS width register `Re' set in doc-common
5179 .de Re
5180 .  ie \n[.$] \
5181 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5182 .  el \{\
5183 .    if !\n[doc-is-reference] \{\
5184 .      tm mdoc warning: Extraneous .Re (#\n[.c])
5185 .      return
5186 .    \}
5187 .    doc-print-reference
5188 .    doc-reset-reference
5189 .    nr doc-is-reference 0
5190 .  \}
5194 .\" NS doc-reset-reference macro
5195 .\" NS   reference cleanup
5196 .\" NS
5197 .\" NS modifies:
5198 .\" NS   doc-author-count
5199 .\" NS   doc-author-nameXXX
5200 .\" NS   doc-book-count
5201 .\" NS   doc-book-name
5202 .\" NS   doc-city-count
5203 .\" NS   doc-city-name
5204 .\" NS   doc-corporate-count
5205 .\" NS   doc-corporate-name
5206 .\" NS   doc-date
5207 .\" NS   doc-date-count
5208 .\" NS   doc-issue-count
5209 .\" NS   doc-issue-name
5210 .\" NS   doc-journal-count
5211 .\" NS   doc-journal-name
5212 .\" NS   doc-optional-count
5213 .\" NS   doc-optional-string
5214 .\" NS   doc-page-number-count
5215 .\" NS   doc-page-number-string
5216 .\" NS   doc-publisher-count
5217 .\" NS   doc-publisher-name
5218 .\" NS   doc-reference-count
5219 .\" NS   doc-reference-title-count
5220 .\" NS   doc-reference-title-name
5221 .\" NS   doc-reference-title-name-for-book
5222 .\" NS   doc-report-count
5223 .\" NS   doc-report-name
5224 .\" NS   doc-url-count
5225 .\" NS   doc-url-name
5226 .\" NS   doc-volume-count
5227 .\" NS   doc-volume-name
5229 .de doc-reset-reference
5230 .  while (\n[doc-author-count]) \{\
5231 .    ds doc-author-name\n[doc-author-count]
5232 .    nr doc-author-count -1
5233 .  \}
5234 .  nr doc-journal-count 0
5235 .  nr doc-issue-count 0
5236 .  nr doc-optional-count 0
5237 .  nr doc-corporate-count 0
5238 .  nr doc-report-count 0
5239 .  nr doc-reference-title-count 0
5240 .  nr doc-url-count 0
5241 .  nr doc-volume-count 0
5242 .  nr doc-city-count 0
5243 .  nr doc-date-count 0
5244 .  nr doc-page-number-count 0
5245 .  nr doc-book-count 0
5246 .  nr doc-publisher-count 0
5247 .  nr doc-reference-count 0
5249 .  ds doc-journal-name
5250 .  ds doc-issue-name
5251 .  ds doc-optional-string
5252 .  ds doc-corporate-name
5253 .  ds doc-report-name
5254 .  ds doc-reference-title-name
5255 .  ds doc-reference-title-name-for-book
5256 .  ds doc-url-name
5257 .  ds doc-volume-name
5258 .  ds doc-city-name
5259 .  ds doc-date
5260 .  ds doc-page-number-string
5261 .  ds doc-book-name
5262 .  ds doc-publisher-name
5266 .\" NS doc-finish-reference macro
5267 .\" NS   auxiliary macro for doc-print-reference
5268 .\" NS
5269 .\" NS modifies:
5270 .\" NS   doc-reference-count
5272 .de doc-finish-reference
5273 .  nr doc-reference-count -\$1
5274 .  ie \n[doc-reference-count] \
5275 .    nop \),
5276 .  el \
5277 .    nop \).
5281 .\" NS doc-print-reference macro
5282 .\" NS   reference print
5283 .\" NS
5284 .\" NS modifies:
5285 .\" NS   doc-reference-count
5287 .de doc-print-reference
5289 .  nh
5291 .  if \n[doc-author-count] \{\
5292 .    doc-print-reference-authors
5293 .    nr doc-reference-count -\n[doc-author-count]
5294 .  \}
5296 .  if \n[doc-reference-title-count] \{\
5297 .    unformat doc-reference-title-name
5298 .    chop doc-reference-title-name
5299 .    unformat doc-reference-title-name-for-book
5300 .    chop doc-reference-title-name-for-book
5301 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5302 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5303 .      doc-finish-reference \n[doc-reference-title-count]
5304 .    \}
5305 .    el \{\
5306 .      nop \*[doc-reference-title-name]\c
5307 .      doc-finish-reference \n[doc-reference-title-count]
5308 .  \}\}
5310 .  if \n[doc-book-count] \{\
5311 .    unformat doc-book-name
5312 .    chop doc-book-name
5313 .    nop \*[doc-book-name]\c
5314 .    doc-finish-reference \n[doc-book-count]
5315 .  \}
5317 .  if \n[doc-publisher-count] \{\
5318 .    unformat doc-publisher-name
5319 .    chop doc-publisher-name
5320 .    nop \*[doc-publisher-name]\c
5321 .    doc-finish-reference \n[doc-publisher-count]
5322 .  \}
5324 .  if \n[doc-journal-count] \{\
5325 .    unformat doc-journal-name
5326 .    chop doc-journal-name
5327 .    nop \*[doc-journal-name]\c
5328 .    doc-finish-reference \n[doc-journal-count]
5329 .  \}
5331 .  if \n[doc-report-count] \{\
5332 .    unformat doc-report-name
5333 .    chop doc-report-name
5334 .    nop \*[doc-report-name]\c
5335 .    doc-finish-reference \n[doc-report-count]
5336 .  \}
5338 .  if \n[doc-issue-count] \{\
5339 .    unformat doc-issue-name
5340 .    chop doc-issue-name
5341 .    nop \*[doc-issue-name]\c
5342 .    doc-finish-reference \n[doc-issue-count]
5343 .  \}
5345 .  if \n[doc-volume-count] \{\
5346 .    unformat doc-volume-name
5347 .    chop doc-volume-name
5348 .    nop \*[doc-volume-name]\c
5349 .    doc-finish-reference \n[doc-volume-count]
5350 .  \}
5352 .  if \n[doc-url-count] \{\
5353 .    unformat doc-url-name
5354 .    chop doc-url-name
5355 .    nop \*[doc-url-name]\c
5356 .    doc-finish-reference \n[doc-url-count]
5357 .  \}
5359 .  if \n[doc-page-number-count] \{\
5360 .    unformat doc-page-number-string
5361 .    chop doc-page-number-string
5362 .    nop \*[doc-page-number-string]\c
5363 .    doc-finish-reference \n[doc-page-number-count]
5364 .  \}
5366 .  if \n[doc-corporate-count] \{\
5367 .    unformat doc-corporate-name
5368 .    chop doc-corporate-name
5369 .    nop \*[doc-corporate-name]\c
5370 .    doc-finish-reference \n[doc-corporate-count]
5371 .  \}
5373 .  if \n[doc-city-count] \{\
5374 .    unformat doc-city-name
5375 .    chop doc-city-name
5376 .    nop \*[doc-city-name]\c
5377 .    doc-finish-reference \n[doc-city-count]
5378 .  \}
5380 .  if \n[doc-date-count] \{\
5381 .    unformat doc-date
5382 .    chop doc-date
5383 .    nop \*[doc-date]\c
5384 .    doc-finish-reference \n[doc-date-count]
5385 .  \}
5387 .  if \n[doc-optional-count] \{\
5388 .    unformat doc-optional-string
5389 .    chop doc-optional-string
5390 .    nop \*[doc-optional-string]\c
5391 .    doc-finish-reference \n[doc-optional-count]
5392 .  \}
5394 .  if \n[doc-reference-count] \
5395 .    tm mdoc warning: unresolved reference problem
5397 .  hy \n[doc-hyphen-flags]
5401 .\" NS doc-print-reference-authors macro
5402 .\" NS   print out reference authors
5403 .\" NS
5404 .\" NS local variables:
5405 .\" NS   doc-reg-dpra
5406 .\" NS   doc-str-dpra
5408 .ds doc-str-dpra "and
5410 .de doc-print-reference-authors
5411 .  nr doc-reg-dpra 1
5413 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5414 .    unformat doc-author-name\n[doc-reg-dpra]
5415 .    chop doc-author-name\n[doc-reg-dpra]
5416 .    ie (\n[doc-author-count] > 2) \
5417 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5418 .    el \
5419 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5420 .    nr doc-reg-dpra +1
5421 .  \}
5423 .  unformat doc-author-name\n[doc-reg-dpra]
5424 .  chop doc-author-name\n[doc-reg-dpra]
5425 .  if (\n[doc-author-count] > 1) \
5426 .    nop \)\*[doc-str-dpra]
5427 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5431 .\" NS doc-author-count global register
5432 .\" NS   counter of author references
5434 .nr doc-author-count 0
5437 .\" NS doc-author-nameXXX global box
5438 .\" NS   array of author names
5439 .\" NS
5440 .\" NS limit:
5441 .\" NS   doc-author-count
5443 .ds doc-author-name0
5446 .\" NS %A user macro
5447 .\" NS   reference author(s)
5448 .\" NS
5449 .\" NS modifies:
5450 .\" NS   doc-arg-ptr
5451 .\" NS   doc-author-count
5452 .\" NS   doc-curr-font
5453 .\" NS   doc-curr-size
5454 .\" NS   doc-macro-name
5455 .\" NS   doc-reference-count
5456 .\" NS
5457 .\" NS local variables:
5458 .\" NS   doc-env-%A
5459 .\" NS
5460 .\" NS width register `%A' set in doc-common
5462 .de %A
5463 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5464 .    tm Usage: .%A author_name ... (#\n[.c])
5465 .    return
5466 .  \}
5468 .  nr doc-author-count +1
5469 .  nr doc-reference-count +1
5471 .  ds doc-macro-name %A
5472 .  doc-parse-args \$@
5474 .  nr doc-arg-ptr +1
5475 .  nr doc-curr-font \n[.f]
5476 .  nr doc-curr-size \n[.ps]
5478 .  \" save to reference box
5479 .  box doc-author-name\n[doc-author-count]
5480 .  ev doc-env-%A
5481 .  evc 0
5482 .  in 0
5483 .  nf
5484 .  doc-do-references
5488 .\" NS doc-book-count global register
5489 .\" NS   counter of book references
5491 .nr doc-book-count 0
5494 .\" NS doc-book-name global box
5495 .\" NS   string of collected book references
5497 .ds doc-book-name
5500 .\" NS %B user macro
5501 .\" NS   [reference] book name
5502 .\" NS
5503 .\" NS modifies:
5504 .\" NS   doc-arg-ptr
5505 .\" NS   doc-book-count
5506 .\" NS   doc-curr-font
5507 .\" NS   doc-curr-size
5508 .\" NS   doc-macro-name
5509 .\" NS   doc-reference-count
5510 .\" NS
5511 .\" NS local variables:
5512 .\" NS   doc-env-%B
5513 .\" NS
5514 .\" NS width register `%B' set in doc-common
5516 .de %B
5517 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5518 .    tm Usage: .%B book_name ... (#\n[.c])
5519 .    return
5520 .  \}
5522 .  if \n[doc-is-reference] \{\
5523 .    nr doc-book-count +1
5524 .    nr doc-reference-count +1
5525 .  \}
5527 .  ds doc-macro-name %B
5528 .  doc-parse-args \$@
5530 .  nr doc-arg-ptr +1
5531 .  nr doc-curr-font \n[.f]
5532 .  nr doc-curr-size \n[.ps]
5534 .  ie \n[doc-is-reference] \{\
5535 .    \" append to reference box
5536 .    boxa doc-book-name
5537 .    ev doc-env-%B
5538 .    evc 0
5539 .    in 0
5540 .    nf
5541 .    nop \*[doc-Em-font]\c
5542 .    doc-do-references
5543 .  \}
5544 .  el \{\
5545 .    nop \*[doc-Em-font]\c
5546 .    doc-print-recursive
5547 .  \}
5551 .\" NS doc-city-count global register
5552 .\" NS   counter of city references
5554 .nr doc-city-count 0
5557 .\" NS doc-city-name global box
5558 .\" NS   string of collected city references
5560 .ds doc-city-name
5563 .\" NS %C user macro
5564 .\" NS   [reference] city
5565 .\" NS
5566 .\" NS modifies:
5567 .\" NS   doc-arg-ptr
5568 .\" NS   doc-curr-font
5569 .\" NS   doc-curr-size
5570 .\" NS   doc-city-count
5571 .\" NS   doc-macro-name
5572 .\" NS   doc-reference-count
5573 .\" NS
5574 .\" NS local variables:
5575 .\" NS   doc-env-%C
5576 .\" NS
5577 .\" NS width register `%C' set in doc-common
5579 .de %C
5580 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5581 .    tm Usage: .%C city_name ... (#\n[.c])
5582 .    return
5583 .  \}
5585 .  nr doc-city-count +1
5586 .  nr doc-reference-count +1
5588 .  ds doc-macro-name %C
5589 .  doc-parse-args \$@
5591 .  nr doc-arg-ptr +1
5592 .  nr doc-curr-font \n[.f]
5593 .  nr doc-curr-size \n[.ps]
5595 .  \" append to reference box
5596 .  boxa doc-city-name
5597 .  ev doc-env-%C
5598 .  evc 0
5599 .  in 0
5600 .  nf
5601 .  doc-do-references
5605 .\" NS doc-date-count global register
5606 .\" NS   counter of date references
5608 .nr doc-date-count 0
5611 .\" NS doc-date global box
5612 .\" NS   string of collected date references
5614 .ds doc-date
5617 .\" NS %D user macro
5618 .\" NS   [reference] date
5619 .\" NS
5620 .\" NS modifies:
5621 .\" NS   doc-arg-ptr
5622 .\" NS   doc-curr-font
5623 .\" NS   doc-curr-size
5624 .\" NS   doc-date-count
5625 .\" NS   doc-macro-name
5626 .\" NS   doc-reference-count
5627 .\" NS
5628 .\" NS local variables:
5629 .\" NS   doc-env-%D
5630 .\" NS
5631 .\" NS width register `%D' set in doc-common
5633 .de %D
5634 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5635 .    tm Usage: .%D date ... (#\n[.c])
5636 .    return
5637 .  \}
5639 .  nr doc-date-count +1
5640 .  nr doc-reference-count +1
5642 .  ds doc-macro-name %D
5643 .  doc-parse-args \$@
5645 .  nr doc-arg-ptr +1
5646 .  nr doc-curr-font \n[.f]
5647 .  nr doc-curr-size \n[.ps]
5649 .  \" append to reference box
5650 .  boxa doc-date
5651 .  ev doc-env-%D
5652 .  evc 0
5653 .  in 0
5654 .  nf
5655 .  doc-do-references
5659 .\" NS doc-publisher-count global register
5660 .\" NS   counter of publisher references
5662 .nr doc-publisher-count 0
5665 .\" NS doc-publisher-name global box
5666 .\" NS   string of collected publisher references
5668 .ds doc-publisher-name
5671 .\" NS %I user macro
5672 .\" NS   [reference] issuer/publisher name
5673 .\" NS
5674 .\" NS modifies:
5675 .\" NS   doc-arg-ptr
5676 .\" NS   doc-curr-font
5677 .\" NS   doc-curr-size
5678 .\" NS   doc-macro-name
5679 .\" NS   doc-publisher-count
5680 .\" NS   doc-reference-count
5681 .\" NS
5682 .\" NS local variables:
5683 .\" NS   doc-env-%I
5684 .\" NS
5685 .\" NS width register `%I' set in doc-common
5687 .de %I
5688 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5689 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5690 .    return
5691 .  \}
5693 .  nr doc-publisher-count +1
5694 .  nr doc-reference-count +1
5696 .  ds doc-macro-name %I
5697 .  doc-parse-args \$@
5699 .  nr doc-arg-ptr +1
5700 .  nr doc-curr-font \n[.f]
5701 .  nr doc-curr-size \n[.ps]
5703 .  \" append to reference box
5704 .  boxa doc-publisher-name
5705 .  ev doc-env-%I
5706 .  evc 0
5707 .  in 0
5708 .  nf
5709 .  nop \*[doc-Em-font]\c
5710 .  doc-do-references
5714 .\" NS doc-journal-count global register
5715 .\" NS   counter of journal references
5717 .nr doc-journal-count 0
5720 .\" NS doc-journal-name global box
5721 .\" NS   string of collected journal references
5723 .ds doc-journal-name
5726 .\" NS %J user macro
5727 .\" NS   [reference] Journal Name
5728 .\" NS
5729 .\" NS modifies:
5730 .\" NS   doc-arg-ptr
5731 .\" NS   doc-curr-font
5732 .\" NS   doc-curr-size
5733 .\" NS   doc-journal-count
5734 .\" NS   doc-macro-name
5735 .\" NS   doc-reference-count
5736 .\" NS
5737 .\" NS local variables:
5738 .\" NS   doc-env-%J
5739 .\" NS
5740 .\" NS width register `%J' set in doc-common
5742 .de %J
5743 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5744 .    tm Usage: .%J journal_name ... (#\n[.c])
5745 .    return
5746 .  \}
5748 .  nr doc-journal-count +1
5749 .  nr doc-reference-count +1
5751 .  ds doc-macro-name %J
5752 .  doc-parse-args \$@
5754 .  nr doc-arg-ptr +1
5755 .  nr doc-curr-font \n[.f]
5756 .  nr doc-curr-size \n[.ps]
5758 .  \" append to reference box
5759 .  boxa doc-journal-name
5760 .  ev doc-env-%J
5761 .  evc 0
5762 .  in 0
5763 .  nf
5764 .  nop \*[doc-Em-font]\c
5765 .  doc-do-references
5769 .\" NS doc-issue-count global register
5770 .\" NS   counter of issue number references
5772 .nr doc-issue-count 0
5775 .\" NS doc-issue-name global box
5776 .\" NS   string of collected issue number references
5778 .ds doc-issue-name
5781 .\" NS %N user macro
5782 .\" NS   [reference] issue number
5783 .\" NS
5784 .\" NS modifies:
5785 .\" NS   doc-arg-ptr
5786 .\" NS   doc-curr-font
5787 .\" NS   doc-curr-size
5788 .\" NS   doc-issue-count
5789 .\" NS   doc-macro-name
5790 .\" NS   doc-reference-count
5791 .\" NS
5792 .\" NS local variables:
5793 .\" NS   doc-env-%N
5794 .\" NS
5795 .\" NS width register `%N' set in doc-common
5797 .de %N
5798 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5799 .    tm Usage: .%N issue_number ... (#\n[.c])
5800 .    return
5801 .  \}
5803 .  nr doc-issue-count +1
5804 .  nr doc-reference-count +1
5806 .  ds doc-macro-name %N
5807 .  doc-parse-args \$@
5809 .  nr doc-arg-ptr +1
5810 .  nr doc-curr-font \n[.f]
5811 .  nr doc-curr-size \n[.ps]
5813 .  \" append to reference box
5814 .  boxa doc-issue-name
5815 .  ev doc-env-%N
5816 .  evc 0
5817 .  in 0
5818 .  nf
5819 .  doc-do-references
5823 .\" NS doc-optional-count global register
5824 .\" NS   counter of optional information references
5826 .nr doc-optional-count 0
5829 .\" NS doc-optional-string global box
5830 .\" NS   string of collected optional information references
5832 .ds doc-optional-string
5835 .\" NS %O user macro
5836 .\" NS   [reference] optional information
5837 .\" NS
5838 .\" NS modifies:
5839 .\" NS   doc-arg-ptr
5840 .\" NS   doc-curr-font
5841 .\" NS   doc-curr-size
5842 .\" NS   doc-macro-name
5843 .\" NS   doc-optional-count
5844 .\" NS   doc-reference-count
5845 .\" NS
5846 .\" NS local variables:
5847 .\" NS   doc-env-%O
5848 .\" NS
5849 .\" NS width register `%O' set in doc-common
5851 .de %O
5852 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5853 .    tm Usage: .%O optional_information ... (#\n[.c])
5854 .    return
5855 .  \}
5857 .  nr doc-optional-count +1
5858 .  nr doc-reference-count +1
5860 .  ds doc-macro-name %O
5861 .  doc-parse-args \$@
5863 .  nr doc-arg-ptr +1
5864 .  nr doc-curr-font \n[.f]
5865 .  nr doc-curr-size \n[.ps]
5867 .  \" append to reference box
5868 .  boxa doc-optional-string
5869 .  ev doc-env-%O
5870 .  evc 0
5871 .  in 0
5872 .  nf
5873 .  doc-do-references
5877 .\" NS doc-page-number-count global register
5878 .\" NS   counter of page number references
5880 .nr doc-page-number-count 0
5883 .\" NS doc-page-number-string global box
5884 .\" NS   string of collected page number references
5886 .ds doc-page-number-string
5889 .\" NS %P user macro
5890 .\" NS   [reference] page numbers
5891 .\" NS
5892 .\" NS modifies:
5893 .\" NS   doc-arg-ptr
5894 .\" NS   doc-curr-font
5895 .\" NS   doc-curr-size
5896 .\" NS   doc-macro-name
5897 .\" NS   doc-page-number-count
5898 .\" NS   doc-reference-count
5899 .\" NS
5900 .\" NS local variables:
5901 .\" NS   doc-env-%P
5902 .\" NS
5903 .\" NS width register `%P' set in doc-common
5905 .de %P
5906 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5907 .    tm Usage: .%P page_number ... (#\n[.c])
5908 .    return
5909 .  \}
5911 .  nr doc-page-number-count +1
5912 .  nr doc-reference-count +1
5914 .  ds doc-macro-name %P
5915 .  doc-parse-args \$@
5917 .  nr doc-arg-ptr +1
5918 .  nr doc-curr-font \n[.f]
5919 .  nr doc-curr-size \n[.ps]
5921 .  \" append to reference box
5922 .  boxa doc-page-number-string
5923 .  ev doc-env-%P
5924 .  evc 0
5925 .  in 0
5926 .  nf
5927 .  doc-do-references
5931 .\" NS doc-corporate-count global register
5932 .\" NS   counter of corporate references
5934 .nr doc-corporate-count 0
5937 .\" NS doc-corporate-name global box
5938 .\" NS   string of collected corporate references
5940 .ds doc-corporate-name
5943 .\" NS %Q user macro
5944 .\" NS   corporate or foreign author
5945 .\" NS
5946 .\" NS modifies:
5947 .\" NS   doc-arg-ptr
5948 .\" NS   doc-corporate-count
5949 .\" NS   doc-curr-font
5950 .\" NS   doc-curr-size
5951 .\" NS   doc-macro-name
5952 .\" NS   doc-reference-count
5953 .\" NS
5954 .\" NS local variables:
5955 .\" NS   doc-env-%Q
5956 .\" NS
5957 .\" NS width register `%Q' set in doc-common
5959 .de %Q
5960 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5961 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5962 .    return
5963 .  \}
5965 .  nr doc-corporate-count +1
5966 .  nr doc-reference-count +1
5968 .  ds doc-macro-name %Q
5969 .  doc-parse-args \$@
5971 .  nr doc-arg-ptr +1
5972 .  nr doc-curr-font \n[.f]
5973 .  nr doc-curr-size \n[.ps]
5975 .  \" append to reference box
5976 .  boxa doc-corporate-name
5977 .  ev doc-env-%Q
5978 .  evc 0
5979 .  in 0
5980 .  nf
5981 .  doc-do-references
5985 .\" NS doc-report-count global register
5986 .\" NS   counter of report references
5988 .nr doc-report-count 0
5991 .\" NS doc-report-name global box
5992 .\" NS   string of collected report references
5994 .ds doc-report-name
5997 .\" NS %R user macro
5998 .\" NS   [reference] report name
5999 .\" NS
6000 .\" NS modifies:
6001 .\" NS   doc-arg-ptr
6002 .\" NS   doc-curr-font
6003 .\" NS   doc-curr-size
6004 .\" NS   doc-macro-name
6005 .\" NS   doc-reference-count
6006 .\" NS   doc-report-count
6007 .\" NS
6008 .\" NS local variables:
6009 .\" NS   doc-env-%R
6010 .\" NS
6011 .\" NS width register `%R' set in doc-common
6013 .de %R
6014 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6015 .    tm Usage: .%R reference_report ... (#\n[.c])
6016 .    return
6017 .  \}
6019 .  nr doc-report-count +1
6020 .  nr doc-reference-count +1
6022 .  ds doc-macro-name %R
6023 .  doc-parse-args \$@
6025 .  nr doc-arg-ptr +1
6026 .  nr doc-curr-font \n[.f]
6027 .  nr doc-curr-size \n[.ps]
6029 .  \" append to reference box
6030 .  boxa doc-report-name
6031 .  ev doc-env-%R
6032 .  evc 0
6033 .  in 0
6034 .  nf
6035 .  doc-do-references
6039 .\" NS doc-reference-title-count global register
6040 .\" NS   counter of reference title references
6042 .nr doc-reference-title-count 0
6045 .\" NS doc-reference-title-name global box
6046 .\" NS   string of collected reference title references
6048 .ds doc-reference-title-name
6051 .\" NS doc-reference-title-name-for-book global box
6052 .\" NS   string of collected reference title references
6053 .\" NS   (saved with another font; this is a shortcoming of groff)
6055 .ds doc-reference-title-name-for-book
6058 .\" NS %T user macro
6059 .\" NS   reference title
6060 .\" NS
6061 .\" NS modifies:
6062 .\" NS   doc-arg-ptr
6063 .\" NS   doc-curr-font
6064 .\" NS   doc-curr-size
6065 .\" NS   doc-macro-name
6066 .\" NS   doc-reference-title-count
6067 .\" NS   doc-report-count
6068 .\" NS
6069 .\" NS local variables:
6070 .\" NS   doc-env-%T
6071 .\" NS
6072 .\" NS width register `%T' set in doc-common
6074 .de %T
6075 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6076 .    tm Usage: .%T reference_title ... (#\n[.c])
6077 .    return
6078 .  \}
6080 .  if \n[doc-is-reference] \{\
6081 .    nr doc-reference-title-count +1
6082 .    nr doc-reference-count +1
6083 .  \}
6085 .  ds doc-macro-name %T
6086 .  doc-parse-args \$@
6088 .  nr doc-arg-ptr +1
6089 .  nr doc-curr-font \n[.f]
6090 .  nr doc-curr-size \n[.ps]
6091 .  ie \n[doc-is-reference] \{\
6092 .    \" append to reference box
6093 .    boxa doc-reference-title-name-for-book
6094 .    ev doc-env-%T
6095 .    evc 0
6096 .    in 0
6097 .    nf
6098 .    nop \*[doc-No-font]\c
6099 .    doc-do-references
6101 .    \" do it a second time with another font
6102 .    ds doc-macro-name %T
6103 .    doc-parse-args \$@
6105 .    nr doc-arg-ptr +1
6106 .    nr doc-curr-font \n[.f]
6107 .    nr doc-curr-size \n[.ps]
6108 .    boxa doc-reference-title-name
6109 .    ev doc-env-%T
6110 .    evc 0
6111 .    in 0
6112 .    nf
6113 .    nop \*[doc-Em-font]\c
6114 .    doc-do-references
6115 .  \}
6116 .  el \{\
6117 .    nop \*[doc-Em-font]\c
6118 .    doc-print-recursive
6119 .  \}
6123 .\" NS doc-url-count global register
6124 .\" NS   counter of hypertext references
6126 .nr doc-url-count 0
6129 .\" NS doc-url-name global box
6130 .\" NS   string of collected hypertext references
6132 .ds doc-url-name
6135 .\" NS doc-volume-count global register
6136 .\" NS   counter of reference title references
6138 .nr doc-volume-count 0
6141 .\" NS doc-volume-name global box
6142 .\" NS   string of collected volume references
6144 .ds doc-volume-name
6147 .\" NS %U user macro
6148 .\" NS   hypertext reference
6149 .\" NS
6150 .\" NS modifies:
6151 .\" NS   doc-arg-ptr
6152 .\" NS   doc-curr-font
6153 .\" NS   doc-curr-size
6154 .\" NS   doc-macro-name
6155 .\" NS   doc-reference-count
6156 .\" NS   doc-url-count
6157 .\" NS
6158 .\" NS local variables:
6159 .\" NS   doc-env-%U
6160 .\" NS
6161 .\" NS width register `%U' set in doc-common
6163 .de %U
6164 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6165 .    tm Usage: .%U URL ... (#\n[.c])
6166 .    return
6167 .  \}
6169 .  nr doc-url-count +1
6170 .  nr doc-reference-count +1
6172 .  ds doc-macro-name %U
6173 .  doc-parse-args \$@
6175 .  nr doc-arg-ptr +1
6176 .  nr doc-curr-font \n[.f]
6177 .  nr doc-curr-size \n[.ps]
6179 .  \" append to reference box
6180 .  boxa doc-url-name
6181 .  ev doc-env-%U
6182 .  evc 0
6183 .  in 0
6184 .  nf
6185 .  doc-do-references
6189 .\" NS %V user macro
6190 .\" NS   reference volume
6191 .\" NS
6192 .\" NS modifies:
6193 .\" NS   doc-arg-ptr
6194 .\" NS   doc-curr-font
6195 .\" NS   doc-curr-size
6196 .\" NS   doc-macro-name
6197 .\" NS   doc-reference-count
6198 .\" NS   doc-volume-count
6199 .\" NS
6200 .\" NS local variables:
6201 .\" NS   doc-env-%V
6202 .\" NS
6203 .\" NS width register `%V' set in doc-common
6205 .de %V
6206 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6207 .    tm Usage: .%V volume ... (#\n[.c])
6208 .    return
6209 .  \}
6211 .  nr doc-volume-count +1
6212 .  nr doc-reference-count +1
6214 .  ds doc-macro-name %V
6215 .  doc-parse-args \$@
6217 .  nr doc-arg-ptr +1
6218 .  nr doc-curr-font \n[.f]
6219 .  nr doc-curr-size \n[.ps]
6221 .  \" append to reference box
6222 .  boxa doc-volume-name
6223 .  ev doc-env-%V
6224 .  evc 0
6225 .  in 0
6226 .  nf
6227 .  doc-do-references
6231 .\" NS doc-do-references macro
6232 .\" NS   reference recursion routine
6233 .\" NS
6234 .\" NS modifies:
6235 .\" NS   doc-arg-ptr
6236 .\" NS
6237 .\" NS local variables:
6238 .\" NS   doc-reg-ddr
6239 .\" NS   doc-reg-ddr1
6241 .de doc-do-references
6242 .  if !\n[doc-is-reference] \
6243 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6245 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6247 .  ie (\n[doc-reg-ddr1] == 1) \{\
6248 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6249 .    doc-append-arg \c 3
6250 .    \*[doc-arg\n[doc-arg-ptr]]
6251 .  \}
6252 .  el \{\
6253 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6255 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6256 .      \" finish reference box
6257 .      br
6258 .      ev
6259 .      boxa
6261 .      doc-reset-args
6262 .    \}
6263 .    el \{\
6264 .      nr doc-reg-ddr \n[doc-arg-ptr]
6265 .      nr doc-arg-ptr +1
6266 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6267 .      doc-do-references
6268 .  \}\}
6272 .\" NS Hf user macro
6273 .\" NS   source include header files.
6274 .\" NS
6275 .\" NS modifies:
6276 .\" NS   doc-curr-font
6277 .\" NS   doc-curr-size
6278 .\" NS
6279 .\" NS width register `Hf' set in doc-common
6281 .de Hf
6282 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6283 .    doc-paragraph
6284 .    nop File:
6285 .    Pa \$1
6287 .    Bd -literal
6288 .    so \$1
6289 .    Ed
6291 .    doc-paragraph
6292 .  \}
6293 .  el \
6294 .    Usage: .Hf file (#\n[.c])
6298 .\" NS doc-have-author global register (bool)
6299 .\" NS   set in `An'
6301 .nr doc-have-author 0
6304 .\" NS An user macro
6305 .\" NS   author name
6306 .\" NS
6307 .\" NS modifies:
6308 .\" NS   doc-arg-ptr
6309 .\" NS   doc-curr-font
6310 .\" NS   doc-curr-size
6311 .\" NS   doc-have-author
6312 .\" NS   doc-macro-name
6313 .\" NS
6314 .\" NS width register `An' set in doc-common
6316 .de An
6317 .  if !\n[doc-arg-limit] \{\
6318 .    ie \n[.$] \{\
6319 .      ie        "\$1"-nosplit" \
6320 .        nr doc-in-authors-section 0
6321 .      el \{ .ie "\$1"-split" \
6322 .        nr doc-in-authors-section 1
6323 .      el \{\
6324 .        ds doc-macro-name An
6325 .        doc-parse-args \$@
6326 .    \}\}\}
6327 .    el \{\
6328 .      tm1 "Usage: .An {-nosplit | -split}
6329 .      tm1 "       .An author_name ... (#\n[.c])
6330 .  \}\}
6332 .  if \n[doc-in-authors-section] \{\
6333 .    ie \n[doc-have-author] \
6334 .      br
6335 .    el \
6336 .      nr doc-have-author 1
6337 .  \}
6339 .  if \n[doc-arg-limit] \{\
6340 .    nr doc-arg-ptr +1
6341 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6342 .      nr doc-curr-font \n[.f]
6343 .      nr doc-curr-size \n[.ps]
6344 .      doc-print-recursive
6345 .    \}
6346 .    el \{\
6347 .      tm Usage: .An author_name ... (#\n[.c])
6348 .      doc-reset-args
6349 .  \}\}
6353 .\" NS Rv user macro
6354 .\" NS   return values
6355 .\" NS
6356 .\" NS width register `Rv' set in doc-common
6357 .\" NS
6358 .\" NS local variables:
6359 .\" NS   doc-str-Rv-std-prefix
6360 .\" NS   doc-str-Rv-std-suffix
6361 .\" NS   doc-str-Rv-stds-prefix
6362 .\" NS   doc-str-Rv-stds-and
6363 .\" NS   doc-str-Rv-stds-suffix
6364 .\" NS   doc-str-Rv-std0
6366 .ds doc-str-Rv-std-prefix "The
6367 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6368 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6369 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6370 .as doc-str-Rv-std-suffix " is set to indicate the error.
6372 .ds doc-str-Rv-stds-prefix "The
6373 .ds doc-str-Rv-stds-and    "and
6374 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6375 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6376 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6377 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6379 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6380 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6381 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6382 .as doc-str-Rv-std0 " is set to indicate the error.
6384 .de Rv
6386 .\" XXX: what does this function without `-std'?
6388 .  if \n[doc-arg-limit] \{\
6389 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6390 .    doc-reset-args
6391 .    return
6392 .  \}
6394 .  if !\n[.$] \{\
6395 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6396 .    return
6397 .  \}
6399 .  if "\$1"-std" \{\
6400 .    nr doc-reg-Rv \*[doc-section]
6401 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6402 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6403 .    br
6404 .    shift
6405 .    ie (\n[.$] > 1) \{\
6406 .      nop \)\*[doc-str-Rv-stds-prefix]
6407 .      nr doc-reg-Rv 1
6408 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6409 .        ie (\n[.$] > 2) \
6410 .          Fn \$\n[doc-reg-Rv] ,
6411 .        el \
6412 .          Fn \$\n[doc-reg-Rv]
6413 .        nr doc-reg-Rv +1
6414 .      \}
6415 .      nop \)\*[doc-str-Rv-stds-and]
6416 .      Fn \$\n[.$]
6417 .      nop \)\*[doc-str-Rv-stds-suffix]
6418 .    \}
6419 .    el \{ .ie (\n[.$] == 1) \{\
6420 .      nop \)\*[doc-str-Rv-std-prefix]
6421 .      Fn \$1
6422 .      nop \)\*[doc-str-Rv-std-suffix]
6423 .    \}
6424 .    el \{\
6425 .      nop \)\*[doc-str-Rv-std0]
6426 .  \}\}\}
6430 .\" NS Ex user macro
6431 .\" NS   exit status
6432 .\" NS
6433 .\" NS width register `Ex' set in doc-common
6434 .\" NS
6435 .\" NS local variables:
6436 .\" NS   doc-str-Ex-std-prefix
6437 .\" NS   doc-str-Ex-std-suffix
6439 .ds doc-str-Ex-std-prefix "The
6440 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6441 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6443 .ds doc-str-Ex-stds-prefix "The
6444 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6445 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6446 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6448 .de Ex
6450 .\" XXX: what does this function without `-std'?
6452 .  if \n[doc-arg-limit] \{\
6453 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6454 .    doc-reset-args
6455 .    return
6456 .  \}
6458 .  if !\n[.$] \{\
6459 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6460 .    return
6461 .  \}
6463 .  if "\$1"-std" \{\
6464 .    nr doc-reg-Ex \*[doc-section]
6465 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6466 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6467 .    br
6468 .    shift
6469 .    ie (\n[.$] > 1) \{\
6470 .      nop \)\*[doc-str-Ex-stds-prefix]
6471 .      nr doc-reg-Ex 1
6472 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6473 .        ie (\n[.$] > 2) \
6474 .          Nm \$\n[doc-reg-Ex] ,
6475 .        el \
6476 .          Nm \$\n[doc-reg-Ex]
6477 .        nr doc-reg-Ex +1
6478 .      \}
6479 .      nop \)\*[doc-str-Ex-stds-and]
6480 .      Nm \$\n[.$]
6481 .      nop \)\*[doc-str-Ex-stds-suffix]
6482 .    \}
6483 .    el \{\
6484 .      nop \)\*[doc-str-Ex-std-prefix]
6485 .      Nm \$1
6486 .      nop \)\*[doc-str-Ex-std-suffix]
6487 .  \}\}
6491 .\" NS Mt user macro
6492 .\" NS   mailto (for conversion to HTML)
6494 .de Mt
6495 .  \" XXX: error handling missing
6496 .  Pa \$@
6500 .\" NS Lk user macro
6501 .\" NS   link (for conversion to HTML)
6502 .\" NS
6503 .\" NS local variables:
6504 .\" NS   doc-reg-Lk
6505 .\" NS   doc-str-Lk
6507 .de Lk
6508 .  ds doc-str-Lk Sy \$@
6510 .  ie (\n[.$] > 1) \{\
6511 .    doc-get-arg-type \$2
6512 .    ie (\n[doc-arg-type] < 3) \{\
6513 .      Em \)\$2:
6514 .      ds doc-str-Lk Sy "\$1"
6515 .      doc-get-width "\$1"
6516 .      shift 2
6517 .      if \n[.$] \
6518 .        as doc-str-Lk " \$@
6519 .    \}
6520 .    el \
6521 .      doc-get-width "\$1"
6522 .  \}
6523 .  el \
6524 .    doc-get-width "\$1"
6526 .  ie n \
6527 .    nr doc-reg-Lk 26
6528 .  el \
6529 .    nr doc-reg-Lk 38
6530 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6531 .    D1 \*[doc-str-Lk]
6532 .  el \
6533 .    \*[doc-str-Lk]
6537 .\" NS doc-defunct-macro macro
6538 .\" NS   this is the skeleton for defunct macros
6539 .\" NS
6541 .de doc-defunct-macro
6542 .  tmc mdoc error: .\$0 defunct
6543 .  if d doc-\$0-usage \
6544 .    tmc , \*[doc-\$0-usage]
6545 .  tm1 " (#\n[.c])
6549 .\" obsolete macros
6551 .als Db doc-defunct-macro
6553 .als Ds doc-defunct-macro
6555 .als Or doc-defunct-macro
6556 .ds doc-Or-usage use `|'
6558 .als Sf doc-defunct-macro
6559 .ds doc-Sf-usage use .Pf or .Ns
6562 .rn em e@
6564 .de em
6565 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6566 .  tm1 "            Should this have been `.Em ...'?
6567 .  ab
6571 .\" NS doc-empty-line macro
6572 .\" NS   emit warning and print empty line
6574 .de doc-empty-line
6575 .  if !\n[doc-display-depth] \
6576 .    tm mdoc warning: Empty input line #\n[.c]
6577 .  sp
6580 .blm doc-empty-line
6586 .\" For UTF-8, map some characters conservatively for the sake
6587 .\" of easy cut and paste.
6589 .if '\*[.T]'utf8' \{\
6590 .  rchar \- - ' `
6592 .  char \- \N'45'
6593 .  char  - \N'45'
6594 .  char  ' \N'39'
6595 .  char  ` \N'96'
6599 .\" load local modifications
6600 .mso mdoc.local
6602 .\" s-ts-mode