Merge from vendor branch GROFF:
[dragonfly.git] / contrib / groff-1.19 / tmac / doc.tmac
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"      This product includes software developed by the University of
15 .\"      California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)doc 8.1 (Berkeley) 06/08/93
33 .\"
34 .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
35 .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
36 .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
37 .\" are loaded using the `mso' request.
38 .\"
39 .\" Modified by
40 .\"
41 .\"   Werner LEMBERG <wl@gnu.org>      and
42 .\"   Ruslan Ermilov <ru@freebsd.org>
43 .\"
44 .\" to make it more readable: using long names and many groff features,
45 .\" updating and extending documentation, etc.
46 .\"
47 .\" %beginstrip%
48 .
49 .
50 .if !\n(.g \
51 .  ab This version of mdoc can be run with GNU troff only!
52 .
53 .
54 .do if d Dd .nx
55 .
56 .
57 .cp 0
58 .
59 .
60 .if (\n[.x]\n[.y] < 118) \
61 .  ab You need GNU troff version 1.18 or higher to run this version of mdoc!
62 .
63 .
64 .\" Load start-up files
65 .ie t \
66 .  mso mdoc/doc-ditroff
67 .el \
68 .  mso mdoc/doc-nroff
69 .
70 .mso mdoc/doc-common
71 .mso mdoc/doc-syms
72 .
73 .
74 .eo
75 .
76 .
77 .\" NS doc-macro-name global string
78 .\" NS   name of calling request (set in each user-requestable macro)
79 .
80 .ds doc-macro-name
81 .als doc-arg0 doc-macro-name
82 .
83 .
84 .\" NS doc-arg-limit global register
85 .\" NS   total number of arguments
86 .
87 .nr doc-arg-limit 0
88 .
89 .
90 .\" NS doc-num-args global register
91 .\" NS   number of arguments to handle (must be set to \n[.$] prior to
92 .\" NS   `doc-parse-arg-vector' request)
93 .
94 .nr doc-num-args 0
95 .
96 .
97 .\" NS doc-arg-ptr global register
98 .\" NS   argument pointer
99 .
100 .nr doc-arg-ptr 0
101 .
102 .
103 .\" NS doc-argXXX global string
104 .\" NS   argument vector
105 .\" NS
106 .\" NS limit:
107 .\" NS   doc-arg-limit
108 .
109 .ds doc-arg1
110 .
111 .
112 .\" NS doc-typeXXX global register
113 .\" NS   argument type vector (macro=1, string=2, punctuation suffix=3,
114 .\" NS   punctuation prefix=4)
115 .\" NS
116 .\" NS limit:
117 .\" NS   doc-arg-limit
118 .
119 .nr doc-type1 0
120 .
121 .
122 .\" NS doc-spaceXXX global string
123 .\" NS   space vector
124 .\" NS
125 .\" NS limit:
126 .\" NS   doc-arg-limit
127 .
128 .ds doc-space1
129 .
130 .
131 .\" NS doc-parse-args macro
132 .\" NS   parse arguments (recursively) (`.doc-parse-args arg ...')
133 .\" NS
134 .\" NS modifies:
135 .\" NS   doc-arg-limit
136 .\" NS   doc-arg-ptr
137 .\" NS   doc-argXXX
138 .\" NS   doc-spaceXXX
139 .\" NS   doc-typeXXX
140 .\" NS   doc-arg-ptr
141 .\" NS   doc-have-space
142 .\" NS
143 .\" NS local variables:
144 .\" NS   doc-reg-dpa
145 .\" NS   doc-reg-dpa1
146 .\" NS   doc-str-dpa
147 .
148 .de doc-parse-args
149 .  if !\n[doc-arg-limit] \
150 .    doc-set-spacing-1
151 .
152 .  nr doc-have-space 0
153 .
154 .  if !\n[.$] \
155 .    return
156 .
157 .  nr doc-arg-limit +1
158 .
159 .  \" handle `|' and `...' specially
160 .  ie        "\$1"|" \
161 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
162 .  el \{ .ie "\$1"..." \
163 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
164 .  el \
165 .    ds doc-arg\n[doc-arg-limit] "\$1
166 .  \}
167 .
168 .  \" get argument type and set spacing
169 .  doc-get-arg-type* \n[doc-arg-limit]
170 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
171 .  doc-set-spacing-\n[doc-arg-type]
172 .
173 .  \" check whether we have processed the last parameter
174 .  ie (\n[.$] == 1) \
175 .    nr doc-arg-ptr 0
176 .  el \{\
177 .    shift
178 .    doc-parse-args \$@
179 .  \}
180 .
181 .  nh
182 ..
183 .
184 .
185 .\" NS doc-parse-arg-vector macro
186 .\" NS   parse argument vector (recursive)
187 .\" NS
188 .\" NS   cf. comments in doc-parse-args
189 .\" NS
190 .\" NS modifies:
191 .\" NS   doc-arg-limit
192 .\" NS   doc-arg-ptr
193 .\" NS   doc-argXXX
194 .\" NS   doc-num-args
195 .\" NS   doc-spaceXXX
196 .\" NS   doc-typeXXX
197 .\" NS
198 .\" NS local variables:
199 .\" NS   doc-reg-dpav
200 .\" NS   doc-reg-dpav1
201 .\" NS   doc-str-dpav
202 .
203 .de doc-parse-arg-vector
204 .  if !\n[doc-arg-limit] \
205 .    doc-set-spacing-1
206 .
207 .  nr doc-arg-limit +1
208 .
209 .  ie        "\*[doc-arg\n[doc-arg-limit]]"|" \
210 .    ds doc-arg\n[doc-arg-limit] \f[R]|\f[]
211 .  el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
212 .    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
213 .  \}
214 .
215 .  doc-get-arg-type* \n[doc-arg-limit]
216 .  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
217 .  doc-set-spacing-\n[doc-arg-type]
218 .
219 .  ie (\n[doc-num-args] == 1) \{\
220 .    nr doc-arg-ptr 0
221 .    nr doc-num-args 0
222 .  \}
223 .  el \{\
224 .    nr doc-num-args -1
225 .    doc-parse-arg-vector
226 .  \}
227 .
228 .  nh
229 ..
230 .
231 .
232 .\" NS doc-parse-space-vector macro
233 .\" NS   parse space vector (recursive)
234 .\" NS
235 .\" NS modifies:
236 .\" NS   doc-arg-limit
237 .\" NS   doc-num-args
238 .\" NS   doc-spaceXXX
239 .
240 .de doc-parse-space-vector
241 .  nr doc-arg-limit +1
242 .
243 .  doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
244 .
245 .  ie (\n[doc-num-args] == 1) \
246 .    nr doc-num-args 0
247 .  el \{\
248 .    nr doc-num-args -1
249 .    doc-parse-space-vector
250 .  \}
251 ..
252 .
253 .
254 .\" NS doc-remaining-args macro
255 .\" NS   output remaining arguments as-is, separated by spaces (until
256 .\" NS   `doc-num-args' is exhausted)
257 .\" NS
258 .\" NS modifies:
259 .\" NS   doc-arg-ptr
260 .\" NS   doc-num-args
261 .
262 .de doc-remaining-args
263 .  nr doc-arg-ptr +1
264 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
265 .
266 .  ie (\n[doc-num-args] == 1) \{\
267 .    nr doc-arg-ptr 0
268 .    nr doc-num-args 0
269 .  \}
270 .  el \{\
271 .    nop \)\*[doc-space]\c
272 .    nr doc-num-args -1
273 .    doc-remaining-args
274 .  \}
275 ..
276 .
277 .
278 .\" NS doc-append-arg macro
279 .\" NS   append one argument to argument vector:
280 .\" NS   `.doc-append-arg [arg] [type]'
281 .\" NS
282 .\" NS modifies:
283 .\" NS   doc-arg-limit
284 .\" NS   doc-argXXX
285 .\" NS   doc-typeXXX
286 .
287 .de doc-append-arg
288 .  nr doc-arg-limit +1
289 .  ds doc-arg\n[doc-arg-limit] "\$1
290 .  nr doc-type\n[doc-arg-limit] \$2
291 .  doc-set-spacing-\$2
292 ..
293 .
294 .
295 .\" NS doc-print-and-reset macro
296 .\" NS   finish input line and clean up argument vectors
297 .
298 .de doc-print-and-reset
299 .  if \n[doc-space-mode] \
300 .    nop \)
301 .  doc-reset-args
302 ..
303 .
304 .
305 .\" NS doc-reset-args macro
306 .\" NS   reset argument counters
307 .\" NS
308 .\" NS modifies:
309 .\" NS   doc-arg-limit
310 .\" NS   doc-arg-ptr
311 .\" NS   doc-have-slot
312 .
313 .de doc-reset-args
314 .  nr doc-arg-limit 0
315 .  nr doc-arg-ptr 0
316 .  nr doc-have-slot 0
317 .
318 .  hy \n[doc-hyphen-flags]
319 ..
320 .
321 .
322 .ec
323 .
324 .\" NS doc-curr-font global register
325 .\" NS   saved current font
326 .
327 .nr doc-curr-font \n[.f]
328 .
329 .
330 .\" NS doc-curr-size global register
331 .\" NS   saved current font size
332 .
333 .nr doc-curr-size \n[.ps]
334 .
335 .eo
336 .
337 .
338 .\" NS Fl user macro
339 .\" NS   handle flags (appends `-' and prints flags): `.Fl [arg ...]'
340 .\" NS
341 .\" NS modifies:
342 .\" NS   doc-arg-ptr
343 .\" NS   doc-curr-font
344 .\" NS   doc-curr-size
345 .\" NS   doc-macro-name
346 .\" NS
347 .\" NS local variables:
348 .\" NS   doc-reg-Fl (for communication with doc-flag-recursion)
349 .\" NS
350 .\" NS width register `Fl' set in doc-common
351 .
352 .de Fl
353 .  nr doc-curr-font \n[.f]
354 .  nr doc-curr-size \n[.ps]
355 .  nop \*[doc-Fl-font]\c
356 .
357 .  if !\n[doc-arg-limit] \{\
358 .    ds doc-macro-name Fl
359 .    doc-parse-args \$@
360 .
361 .    if !\n[.$] \{\
362 .      \" no arguments
363 .      nop \|\-\|\f[]\s[0]
364 .  \}\}
365 .
366 .  if !\n[doc-arg-limit] \
367 .    return
368 .
369 .  nr doc-arg-ptr +1
370 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
371 .    \" last argument
372 .    nop \|\-\f[]\s[0]\c
373 .    doc-print-and-reset
374 .  \}
375 .  el \{\
376 .    ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
377 .      nop \|\-\f[]\s[0]\c
378 .      \*[doc-arg\n[doc-arg-ptr]]
379 .    \}
380 .    el \{\
381 .      if (\n[doc-type\n[doc-arg-ptr]] == 3) \
382 .        nop \|\-\|\c
383 .
384 .      nr doc-reg-Fl 1
385 .      doc-flag-recursion
386 .  \}\}
387 ..
388 .
389 .
390 .\" NS doc-flag-recursion macro
391 .\" NS   `Fl' flag recursion routine (special handling)
392 .\" NS
393 .\" NS modifies:
394 .\" NS   doc-arg-ptr
395 .\" NS
396 .\" NS local variables:
397 .\" NS   doc-reg-dfr
398 .\" NS   doc-reg-dfr1
399 .\" NS   doc-str-dfr
400 .
401 .de doc-flag-recursion
402 .  nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
403 .  ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
404 .
405 .  ie (\n[doc-reg-dfr1] == 1) \{\
406 .    nop \f[]\s[0]\c
407 .    \*[doc-str-dfr]
408 .  \}
409 .  el \{\
410 .    nr doc-reg-dfr \n[doc-arg-ptr]
411 .
412 .    ie (\n[doc-reg-dfr1] == 2) \{\
413 .      \" handle vertical bar -- doc-reg-Fl is set for the first call of
414 .      \" doc-flag-recursion only; we need this to make `.Fl | ...' work
415 .      \" correctly
416 .      ie "\*[doc-str-dfr]"\*[Ba]" \{\
417 .        if \n[doc-reg-Fl] \
418 .          nop \|\-\*[doc-space]\c
419 .        nop \)\*[Ba]\c
420 .      \}
421 .      el \{\
422 .        ie "\*[doc-str-dfr]"\f[R]|\f[]" \{\
423 .          if \n[doc-reg-Fl] \
424 .            nop \|\-\*[doc-space]\c
425 .          nop \f[R]|\f[]\c
426 .        \}
427 .        el \{\
428 .          \" two consecutive hyphen characters?
429 .          ie "\*[doc-str-dfr]"-" \
430 .            nop \|\-\^\-\|\c
431 .          el \
432 .            nop \|\%\-\*[doc-str-dfr]\&\c
433 .    \}\}\}
434 .    el \{\
435 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
436 .      nop \)\*[doc-str-dfr]\f[]\s[0]\c
437 .    \}
438 .
439 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
440 .      \" last argument
441 .      if (\n[doc-reg-dfr1] == 4) \
442 .        nop \|\-\c
443 .      nop \f[]\s[0]\c
444 .      doc-print-and-reset
445 .    \}
446 .    el \{\
447 .      nr doc-arg-ptr +1
448 .      ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
449 .        ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
450 .          nop \|\-\c
451 .        el \
452 .          nop \)\*[doc-space\n[doc-reg-dfr]]\c
453 .      \}
454 .      el \
455 .        nop \)\*[doc-space\n[doc-reg-dfr]]\c
456 .
457 .      shift
458 .      nr doc-reg-Fl 0
459 .      doc-flag-recursion \$@
460 .  \}\}
461 ..
462 .
463 .
464 .\" NS doc-print-recursive macro
465 .\" NS   general name recursion routine (print remaining arguments)
466 .\" NS
467 .\" NS modifies:
468 .\" NS   doc-arg-ptr
469 .\" NS
470 .\" NS local variables:
471 .\" NS   doc-reg-dpr
472 .\" NS   doc-reg-dpr1
473 .\" NS   doc-str-dpr
474 .
475 .de doc-print-recursive
476 .  nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
477 .  ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
478 .
479 .  ie (\n[doc-reg-dpr1] == 1) \{\
480 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
481 .    \*[doc-str-dpr]
482 .  \}
483 .  el \{\
484 .    nr doc-reg-dpr \n[doc-arg-ptr]
485 .
486 .    ie (\n[doc-reg-dpr1] == 2) \
487 .      \" the `\%' prevents hyphenation on a dash (`-')
488 .      nop \%\*[doc-str-dpr]\&\c
489 .    el \{\
490 .      \" punctuation character
491 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
492 .      nop \)\*[doc-str-dpr]\f[]\s[0]\c
493 .    \}
494 .
495 .    nr doc-arg-ptr +1
496 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
497 .      \" last argument
498 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
499 .      doc-print-and-reset
500 .    \}
501 .    el \{\
502 .      nop \)\*[doc-space\n[doc-reg-dpr]]\c
503 .      doc-print-recursive
504 .  \}\}
505 ..
506 .
507 .
508 .\" NS doc-print-prefixes macro
509 .\" NS   print leading prefixes
510 .\" NS
511 .\" NS modifies:
512 .\" NS   doc-arg-ptr
513 .
514 .de doc-print-prefixes
515 .  while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
516 .    if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
517 .      break
518 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
519 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
520 .    nr doc-arg-ptr +1
521 .  \}
522 ..
523 .
524 .
525 .\" NS doc-generic-macro macro
526 .\" NS   this is the skeleton for most simple macros
527 .\" NS
528 .\" NS modifies:
529 .\" NS   doc-arg-ptr
530 .\" NS   doc-curr-font
531 .\" NS   doc-curr-size
532 .\" NS   doc-macro-name
533 .
534 .de doc-generic-macro
535 .  if !\n[doc-arg-limit] \{\
536 .    ie \n[.$] \{\
537 .      ds doc-macro-name \$0
538 .      doc-parse-args \$@
539 .    \}
540 .    el \
541 .      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
542 .  \}
543 .
544 .  if !\n[doc-arg-limit] \
545 .    return
546 .
547 .  nr doc-arg-ptr +1
548 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
549 .    if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
550 .      tmc mdoc warning: Using a macro as first argument
551 .      tm1 " cancels effect of .\$0 (#\n[.c])
552 .
553 .      \" the right action here would be to reset the argument counters
554 .      \" and bail out -- unfortunately, a small number of manual pages
555 .      \" (less than 2% for FreeBSD which has been used for testing)
556 .      \" relied on the old behaviour (silently ignore this error),
557 .      \" so it is commented out
558 .
559 .\"    doc-reset-args
560 .    \}
561 .\"  el \{\
562 .      nr doc-curr-font \n[.f]
563 .      nr doc-curr-size \n[.ps]
564 .      nop \*[doc-\$0-font]\c
565 .      doc-print-recursive
566 .\"  \}
567 .  \}
568 .  el \{\
569 .    tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
570 .    doc-reset-args
571 .  \}
572 ..
573 .
574 .
575 .\" NS Ar user macro
576 .\" NS   command line `argument' macro: `.Ar [args ...]'
577 .\" NS
578 .\" NS modifies:
579 .\" NS   doc-arg-ptr
580 .\" NS   doc-curr-font
581 .\" NS   doc-curr-size
582 .\" NS   doc-macro-name
583 .\" NS
584 .\" NS local variable:
585 .\" NS   doc-str-Ar-default
586 .\" NS
587 .\" NS width register `Ar' set in doc-common
588 .
589 .ds doc-str-Ar-default "file\ .\|.\|.
590 .
591 .de Ar
592 .  nr doc-curr-font \n[.f]
593 .  nr doc-curr-size \n[.ps]
594 .  nop \*[doc-Ar-font]\c
595 .
596 .  if !\n[doc-arg-limit] \{\
597 .    ds doc-macro-name Ar
598 .    doc-parse-args \$@
599 .
600 .    if !\n[.$] \{\
601 .      \" no argument
602 .      nop \)\*[doc-str-Ar-default]\&\f[]\s[0]
603 .  \}\}
604 .
605 .  if !\n[doc-arg-limit] \
606 .    return
607 .
608 .  nr doc-arg-ptr +1
609 .  doc-print-prefixes
610 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
611 .    nop \)\*[doc-str-Ar-default]\&\f[]\s[0]\c
612 .    doc-print-and-reset
613 .  \}
614 .  el \{\
615 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
616 .      \" replace previous argument (Ar) with default value
617 .      nr doc-arg-ptr -1
618 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
619 .      nr doc-type\n[doc-arg-ptr] 2
620 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
621 .
622 .      \" recompute space vector for remaining arguments
623 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
624 .      nr doc-arg-limit \n[doc-arg-ptr]
625 .      doc-parse-space-vector
626 .    \}
627 .    doc-print-recursive
628 .  \}
629 ..
630 .
631 .
632 .\" NS Ad user macro
633 .\" NS   Addresses
634 .\" NS
635 .\" NS width register `Ad' set in doc-common
636 .
637 .als Ad doc-generic-macro
638 .ds doc-Ad-usage address
639 .
640 .
641 .\" NS doc-indent-synopsis global register
642 .\" NS   indentation in synopsis
643 .
644 .nr doc-indent-synopsis 0
645 .
646 .
647 .\" NS doc-indent-synopsis-active global register (bool)
648 .\" NS   indentation in synopsis active
649 .
650 .nr doc-indent-synopsis-active 0
651 .
652 .
653 .\" NS Cd user macro
654 .\" NS   config declaration (for section 4 SYNOPSIS)
655 .\" NS
656 .\" NS   this function causes a break; it uses the `Nm' font
657 .\" NS
658 .\" NS modifies:
659 .\" NS   doc-arg-ptr
660 .\" NS   doc-curr-font
661 .\" NS   doc-curr-size
662 .\" NS   doc-indent-synopsis
663 .\" NS   doc-macro-name
664 .\" NS
665 .\" NS width register `Cd' set in doc-common
666 .
667 .de Cd
668 .  if !\n[doc-arg-limit] \{\
669 .    ie \n[.$] \{\
670 .      ds doc-macro-name Cd
671 .      doc-parse-args \$@
672 .    \}
673 .    el \
674 .      tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
675 .  \}
676 .
677 .  if !\n[doc-arg-limit] \
678 .    return
679 .
680 .  nr doc-arg-ptr +1
681 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
682 .    nr doc-curr-font \n[.f]
683 .    nr doc-curr-size \n[.ps]
684 .
685 .    ie \n[doc-in-synopsis-section] \{\
686 .      ie "\*[doc-macro-name]"Cd" \{\
687 .        br
688 .        if !\n[doc-indent-synopsis] \
689 .          nr doc-indent-synopsis \n[doc-display-indent]u
690 .        if !\n[doc-indent-synopsis-active] \
691 .          in +\n[doc-indent-synopsis]u
692 .        ti -\n[doc-indent-synopsis]u
693 .        nop \*[doc-Nm-font]\c
694 .        doc-print-recursive
695 .        if !\n[doc-indent-synopsis-active] \
696 .          in -\n[doc-indent-synopsis]u
697 .      \}
698 .      el \{\
699 .        nop \*[doc-Nm-font]\c
700 .        doc-print-recursive
701 .    \}\}
702 .    el \{\
703 .      nop \*[doc-Nm-font]\c
704 .      doc-print-recursive
705 .  \}\}
706 .  el \{\
707 .    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
708 .    doc-reset-args
709 .  \}
710 ..
711 .
712 .
713 .\" NS Cm user macro
714 .\" NS   interactive command modifier (flag)
715 .\" NS
716 .\" NS width register `Cm' set in doc-common
717 .
718 .als Cm doc-generic-macro
719 .ds doc-Cm-usage interactive_command_modifier
720 .
721 .
722 .\" NS Dv user macro
723 .\" NS   defined variable
724 .\" NS
725 .\" NS   this function uses the `Er' font
726 .\" NS
727 .\" NS width register `Dv' set in doc-common
728 .
729 .als Dv doc-generic-macro
730 .ds doc-Dv-usage defined_variable
731 .als doc-Dv-font doc-Er-font
732 .
733 .
734 .\" NS Em user macro
735 .\" NS   emphasis
736 .\" NS
737 .\" NS width register `Em' set in doc-common
738 .
739 .als Em doc-generic-macro
740 .ds doc-Em-usage text
741 .
742 .
743 .\" NS Er user macro
744 .\" NS   errno type
745 .\" NS
746 .\" NS width register `Er' set in doc-common
747 .
748 .als Er doc-generic-macro
749 .ds doc-Er-usage text
750 .
751 .
752 .\" NS Ev user macro
753 .\" NS   environment variable
754 .\" NS
755 .\" NS width register `Ev' set in doc-common
756 .
757 .als Ev doc-generic-macro
758 .ds doc-Ev-usage text
759 .
760 .
761 .\" NS doc-have-decl global register (bool)
762 .\" NS   subroutine test (in synopsis only)
763 .
764 .nr doc-have-decl 0
765 .
766 .
767 .\" NS doc-have-var global register (bool)
768 .\" NS   whether last type is a variable type
769 .
770 .nr doc-have-var 0
771 .
772 .
773 .\" NS doc-do-func-decl macro
774 .\" NS   do something special while in SYNOPSIS
775 .\" NS
776 .\" NS modifies:
777 .\" NS   doc-curr-font
778 .\" NS   doc-curr-size
779 .\" NS   doc-have-decl
780 .\" NS   doc-have-var
781 .
782 .de doc-do-func-decl
783 .  if \n[doc-in-synopsis-section] \{\
784 .    \" if a variable type was the last thing given, want vertical space
785 .    if \n[doc-have-var] \{\
786 .      doc-paragraph
787 .      nr doc-have-var 0
788 .    \}
789 .    \" if a subroutine was the last thing given, want vertical space
790 .    if \n[doc-have-func] \{\
791 .      ie \n[doc-have-decl] \
792 .        br
793 .      el \
794 .        doc-paragraph
795 .    \}
796 .    nr doc-have-decl 1
797 .  \}
798 .
799 .  nr doc-curr-font \n[.f]
800 .  nr doc-curr-size \n[.ps]
801 ..
802 .
803 .
804 .\" NS Fd user macro
805 .\" NS   function declaration -- not callable
806 .\" NS
807 .\" NS   this function causes a break
808 .\" NS
809 .\" NS width register `Fd' set in doc-common
810 .
811 .de Fd
812 .  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
813 .    doc-do-func-decl
814 .    nop \*[doc-Fd-font]\$*
815 .    br
816 .    ft \n[doc-curr-font]
817 .    ps \n[doc-curr-size]u
818 .  \}
819 .  el \{\
820 .    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
821 .    doc-reset-args
822 .  \}
823 ..
824 .
825 .
826 .\" NS In user macro
827 .\" NS   #include statement in SYNOPSIS
828 .\" NS   <header.h> if not in SYNOPSIS
829 .\" NS
830 .\" NS   this function causes a break; it uses the `Fd' font
831 .\" NS
832 .\" NS modifies:
833 .\" NS   doc-arg-ptr
834 .\" NS   doc-curr-font
835 .\" NS   doc-curr-size
836 .\" NS   doc-indent-synopsis
837 .\" NS   doc-macro-name
838 .\" NS
839 .\" NS width register `In' set in doc-common
840 .
841 .de In
842 .  if !\n[doc-arg-limit] \{\
843 .    ie \n[.$] \{\
844 .      ds doc-macro-name In
845 .      doc-parse-args \$@
846 .    \}
847 .    el \
848 .      tm Usage: .In include_file ... (#\n[.c])
849 .  \}
850 .
851 .  if !\n[doc-arg-limit] \
852 .    return
853 .
854 .  nr doc-arg-ptr +1
855 .  doc-print-prefixes
856 .  ie ((\n[doc-arg-limit] >= \n[doc-arg-ptr]) & (\n[doc-type\n[doc-arg-ptr]] == 2)) \{\
857 .    nr doc-curr-font \n[.f]
858 .    nr doc-curr-size \n[.ps]
859 .
860 .    ie \n[doc-in-synopsis-section] \{\
861 .      ie "\*[doc-macro-name]"In" \{\
862 .        doc-do-func-decl
863 .        nop \*[doc-Fd-font]#include <\*[doc-arg\n[doc-arg-ptr]]>
864 .        ft \n[doc-curr-font]
865 .        ps \n[doc-curr-size]u
866 .        br
867 .        nr doc-arg-ptr +1
868 .        ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
869 .          doc-print-recursive
870 .        el \
871 .          doc-reset-args
872 .      \}
873 .      el \{\
874 .        ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
875 .        as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
876 .        doc-print-recursive
877 .    \}\}
878 .    el \{\
879 .      ds doc-arg\n[doc-arg-ptr] "<\*[doc-Pa-font]\*[doc-arg\n[doc-arg-ptr]]
880 .      as doc-arg\n[doc-arg-ptr] \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]>
881 .      doc-print-recursive
882 .  \}\}
883 .  el \{\
884 .    tm Usage: .In include_file ... (#\n[.c])
885 .    doc-reset-args
886 .  \}
887 ..
888 .
889 .
890 .\" NS Fr user macro
891 .\" NS   function return value
892 .\" NS
893 .\" NS   this function uses the `Ar' font
894 .\" NS
895 .\" NS width register `Fr' set in doc-common
896 .
897 .als Fr doc-generic-macro
898 .ds doc-Fr-usage function_return_value
899 .als doc-Fr-font doc-Ar-font
900 .
901 .
902 .\" NS Ic user macro
903 .\" NS   interactive command
904 .\" NS
905 .\" NS width register `Ic' set in doc-common
906 .
907 .als Ic doc-generic-macro
908 .ds doc-Ic-usage interactive_command
909 .
910 .
911 .\" NS Li user macro
912 .\" NS   literals
913 .\" NS
914 .\" NS width register `Li' set in doc-common
915 .
916 .als Li doc-generic-macro
917 .ds doc-Li-usage argument
918 .
919 .
920 .\" NS Ms user macro
921 .\" NS   math symbol
922 .\" NS
923 .\" NS   this function uses the `Sy' font
924 .\" NS
925 .\" NS width register `Ms' set in doc-common
926 .
927 .als Ms doc-generic-macro
928 .ds doc-Ms-usage math_symbol
929 .als doc-Ms-font doc-Sy-font
930 .
931 .
932 .\" NS doc-command-name global string
933 .\" NS   save first invocation of .Nm
934 .
935 .ds doc-command-name
936 .
937 .
938 .\" NS Nm user macro
939 .\" NS   name of command or page topic
940 .\" NS
941 .\" NS modifies:
942 .\" NS   doc-arg-ptr
943 .\" NS   doc-command-name
944 .\" NS   doc-curr-font
945 .\" NS   doc-curr-size
946 .\" NS   doc-indent-synopsis
947 .\" NS   doc-indent-synopsis-active
948 .\" NS   doc-macro-name
949 .\" NS
950 .\" NS width register `Nm' set in doc-common
951 .
952 .de Nm
953 .  if !\n[doc-arg-limit] \{\
954 .    ds doc-macro-name Nm
955 .    ie \n[.$] \
956 .      doc-parse-args \$@
957 .    el \{\
958 .      ie "\*[doc-command-name]"" \
959 .        tm Usage: .Nm name ... (#\n[.c])
960 .      el \
961 .        doc-parse-args \*[doc-command-name]
962 .  \}\}
963 .
964 .  if !\n[doc-arg-limit] \
965 .    return
966 .
967 .  nr doc-arg-ptr +1
968 .  doc-print-prefixes
969 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
970 .    \" last argument
971 .    ie "\*[doc-command-name]"" \{\
972 .      tm Usage: .Nm name ... (#\n[.c])
973 .      doc-reset-args
974 .    \}
975 .    el \{\
976 .      nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c
977 .      doc-print-and-reset
978 .  \}\}
979 .  el \{\
980 .    nr doc-curr-font \n[.f]
981 .    nr doc-curr-size \n[.ps]
982 .
983 .    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
984 .      ie "\*[doc-command-name]"" \
985 .        tm Usage: .Nm name ... (#\n[.c])
986 .      el \{\
987 .        \" replace previous argument (Nm) with default value
988 .        nr doc-arg-ptr -1
989 .        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]
990 .        nr doc-type\n[doc-arg-ptr] 2
991 .        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
992 .
993 .        \" recompute space vector for remaining arguments
994 .        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
995 .        nr doc-arg-limit \n[doc-arg-ptr]
996 .        doc-parse-space-vector
997 .    \}\}
998 .    el \{\
999 .      \" handle `.Nm ...' in SYNOPSIS
1000 .      if \n[doc-in-synopsis-section] \{\
1001 .        if "\*[doc-macro-name]"Nm" \{\
1002 .          br
1003 .          if !\n[doc-indent-synopsis] \{\
1004 .            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
1005 .            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
1006 .          \}
1007 .          if !\n[doc-indent-synopsis-active] \{\
1008 .            in +\n[doc-indent-synopsis]u
1009 .            nr doc-indent-synopsis-active 1
1010 .          \}
1011 .          ti -\n[doc-indent-synopsis]u
1012 .      \}\}
1013 .      if "\*[doc-command-name]"" \
1014 .        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
1015 .
1016 .      nop \*[doc-Nm-font]\c
1017 .    \}
1018 .    doc-print-recursive
1019 .  \}
1020 ..
1021 .
1022 .
1023 .\" NS Pa user macro
1024 .\" NS   pathname: `.Pa [arg ...]'
1025 .\" NS
1026 .\" NS modifies:
1027 .\" NS   doc-arg-ptr
1028 .\" NS   doc-curr-font
1029 .\" NS   doc-curr-size
1030 .\" NS   doc-macro-name
1031 .\" NS
1032 .\" NS width register `Pa' set in doc-common
1033 .
1034 .de Pa
1035 .  if !\n[doc-arg-limit] \{\
1036 .    ds doc-macro-name Pa
1037 .    doc-parse-args \$@
1038 .
1039 .    if !\n[.$] \{\
1040 .      \" default value
1041 .      nop \*[doc-Pa-font]~\f[]\s[0]
1042 .  \}\}
1043 .
1044 .  if !\n[doc-arg-limit] \
1045 .    return
1046 .
1047 .  nr doc-arg-ptr +1
1048 .  doc-print-prefixes
1049 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1050 .    nr doc-curr-font \n[.f]
1051 .    nr doc-curr-size \n[.ps]
1052 .    nop \*[doc-Pa-font]\c
1053 .    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
1054 .      \" replace previous argument (Pa) with default value
1055 .      nr doc-arg-ptr -1
1056 .      ds doc-arg\n[doc-arg-ptr] ~
1057 .      nr doc-type\n[doc-arg-ptr] 2
1058 .      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
1059 .
1060 .      \" recompute space vector for remaining arguments
1061 .      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
1062 .      nr doc-arg-limit \n[doc-arg-ptr]
1063 .      doc-parse-space-vector
1064 .    \}
1065 .    doc-print-recursive
1066 .  \}
1067 .  el \{\
1068 .    nop \*[doc-Pa-font]~\f[]\s[0]\c
1069 .    doc-print-and-reset
1070 .  \}
1071 ..
1072 .
1073 .
1074 .\" NS Sy user macro
1075 .\" NS   symbolics
1076 .\" NS
1077 .\" NS width register `Sy' set in doc-common
1078 .
1079 .als Sy doc-generic-macro
1080 .ds doc-Sy-usage symbolic_text
1081 .
1082 .
1083 .\" NS Me user macro
1084 .\" NS   menu entries
1085 .\" NS
1086 .\" NS width register `Me' set in doc-common
1087 .
1088 .als Me doc-generic-macro
1089 .ds doc-Me-usage menu_entry
1090 .
1091 .
1092 .\" NS Tn user macro
1093 .\" NS   trade name
1094 .\" NS
1095 .\" NS modifies:
1096 .\" NS   doc-arg-ptr
1097 .\" NS   doc-curr-font
1098 .\" NS   doc-curr-size
1099 .\" NS   doc-macro-name
1100 .\" NS
1101 .\" NS width register `Tn' set in doc-common
1102 .
1103 .de Tn
1104 .  if !\n[doc-arg-limit] \{\
1105 .    ie \n[.$] \{\
1106 .      ds doc-macro-name Tn
1107 .      doc-parse-args \$@
1108 .    \}
1109 .    el \
1110 .      tm Usage: .Tn trade_name ... (#\n[.c])
1111 .  \}
1112 .
1113 .  if !\n[doc-arg-limit] \
1114 .    return
1115 .
1116 .  nr doc-arg-ptr +1
1117 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
1118 .    nr doc-curr-font \n[.f]
1119 .    nr doc-curr-size \n[.ps]
1120 .    nop \)\*[doc-Tn-font-size]\c
1121 .    ie !\n[doc-is-reference] \{\
1122 .      nop \)\*[doc-Tn-font-shape]\c
1123 .      doc-print-recursive
1124 .    \}
1125 .    el \
1126 .      doc-do-references
1127 .  \}
1128 .  el \{\
1129 .    tm Usage: .Tn trade_name ... (#\n[.c])
1130 .    doc-reset-args
1131 .  \}
1132 ..
1133 .
1134 .
1135 .\" NS Va user macro
1136 .\" NS   variable name
1137 .\" NS
1138 .\" NS width register `Va' set in doc-common
1139 .
1140 .als Va doc-generic-macro
1141 .ds doc-Va-usage variable_name
1142 .
1143 .
1144 .\" NS No user macro
1145 .\" NS   normal text macro (default text style if mess up)
1146 .\" NS
1147 .\" NS width register `No' set in doc-common
1148 .
1149 .als No doc-generic-macro
1150 .ds doc-No-usage normal_text
1151 .
1152 .
1153 .\" NS doc-quote-left global string
1154 .\" NS   left quotation character for `doc-enclose-string' and
1155 .\" NS   `doc-enclose-open'
1156 .
1157 .ds doc-quote-left
1158 .
1159 .
1160 .\" NS doc-quote-right global string
1161 .\" NS   right quotation character for `doc-enclose-string' and
1162 .\" NS   `doc-enclose-close'
1163 .
1164 .ds doc-quote-right
1165 .
1166 .
1167 .\" NS Op user macro
1168 .\" NS   option expression (i.e., enclose string in square brackets)
1169 .\" NS
1170 .\" NS modifies:
1171 .\" NS   doc-macro-name
1172 .\" NS   doc-quote-left
1173 .\" NS   doc-quote-right
1174 .\" NS
1175 .\" NS width register `Op' set in doc-common
1176 .
1177 .de Op
1178 .  if !\n[doc-arg-limit] \
1179 .    ds doc-macro-name Op
1180 .
1181 .  ds doc-quote-left "\*[doc-left-bracket]
1182 .  ds doc-quote-right "\*[doc-right-bracket]
1183 .
1184 .  doc-enclose-string \$@
1185 ..
1186 .
1187 .
1188 .\" NS Aq user macro
1189 .\" NS   enclose string in angle brackets
1190 .\" NS
1191 .\" NS modifies:
1192 .\" NS   doc-macro-name
1193 .\" NS   doc-quote-left
1194 .\" NS   doc-quote-right
1195 .\" NS
1196 .\" NS width register `Aq' set in doc-common
1197 .
1198 .de Aq
1199 .  if !\n[doc-arg-limit] \
1200 .    ds doc-macro-name Aq
1201 .
1202 .  ds doc-quote-left \[la]
1203 .  ds doc-quote-right \[ra]
1204 .
1205 .  doc-enclose-string \$@
1206 ..
1207 .
1208 .
1209 .\" NS Bq user macro
1210 .\" NS   enclose string in square brackets
1211 .\" NS
1212 .\" NS modifies:
1213 .\" NS   doc-macro-name
1214 .\" NS   doc-quote-left
1215 .\" NS   doc-quote-right
1216 .\" NS
1217 .\" NS width register `Bq' set in doc-common
1218 .
1219 .de Bq
1220 .  if !\n[doc-arg-limit] \
1221 .    ds doc-macro-name Bq
1222 .
1223 .  ds doc-quote-left "\*[doc-left-bracket]
1224 .  ds doc-quote-right "\*[doc-right-bracket]
1225 .
1226 .  doc-enclose-string \$@
1227 ..
1228 .
1229 .
1230 .\" NS Brq user macro
1231 .\" NS   enclose string in braces
1232 .\" NS
1233 .\" NS modifies:
1234 .\" NS   doc-macro-name
1235 .\" NS   doc-quote-left
1236 .\" NS   doc-quote-right
1237 .\" NS
1238 .\" NS width register `Brq' set in doc-common
1239 .
1240 .de Brq
1241 .  if !\n[doc-arg-limit] \
1242 .    ds doc-macro-name Brq
1243 .
1244 .  ds doc-quote-left {
1245 .  ds doc-quote-right }
1246 .
1247 .  doc-enclose-string \$@
1248 ..
1249 .
1250 .
1251 .\" NS Dq user macro
1252 .\" NS   enclose string in double quotes
1253 .\" NS
1254 .\" NS modifies:
1255 .\" NS   doc-macro-name
1256 .\" NS   doc-quote-left
1257 .\" NS   doc-quote-right
1258 .\" NS
1259 .\" NS width register `Dq' set in doc-common
1260 .
1261 .de Dq
1262 .  if !\n[doc-arg-limit] \
1263 .    ds doc-macro-name Dq
1264 .
1265 .  ds doc-quote-left "\*[Lq]
1266 .  ds doc-quote-right "\*[Rq]
1267 .
1268 .  doc-enclose-string \$@
1269 ..
1270 .
1271 .
1272 .\" NS Eq user macro
1273 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1274 .\" NS
1275 .\" NS modifies:
1276 .\" NS   doc-macro-name
1277 .\" NS   doc-quote-left
1278 .\" NS   doc-quote-right
1279 .\" NS
1280 .\" NS width register `Eq' set in doc-common
1281 .
1282 .de Eq
1283 .  if !\n[doc-arg-limit] \
1284 .    ds doc-macro-name Eq
1285 .
1286 .  ds doc-quote-left "\$1
1287 .  ds doc-quote-right "\$2
1288 .
1289 .  shift 2
1290 .  doc-enclose-string \$@
1291 ..
1292 .
1293 .
1294 .\" NS Pq user macro
1295 .\" NS   enclose string in parentheses
1296 .\" NS
1297 .\" NS modifies:
1298 .\" NS   doc-macro-name
1299 .\" NS   doc-quote-left
1300 .\" NS   doc-quote-right
1301 .\" NS
1302 .\" NS width register `Pq' set in doc-common
1303 .
1304 .de Pq
1305 .  if !\n[doc-arg-limit] \
1306 .    ds doc-macro-name Pq
1307 .
1308 .  ds doc-quote-left "\*[doc-left-parenthesis]
1309 .  ds doc-quote-right "\*[doc-right-parenthesis]
1310 .
1311 .  doc-enclose-string \$@
1312 ..
1313 .
1314 .
1315 .\" NS Ql user macro
1316 .\" NS   quoted literal
1317 .\"
1318 .\"   is in file doc-[dit|n]roff
1319 .
1320 .
1321 .\" NS Qq user macro
1322 .\" NS   enclose string in straight double quotes
1323 .\" NS
1324 .\" NS modifies:
1325 .\" NS   doc-macro-name
1326 .\" NS   doc-quote-left
1327 .\" NS   doc-quote-right
1328 .\" NS
1329 .\" NS width register `Qq' set in doc-common
1330 .
1331 .de Qq
1332 .  if !\n[doc-arg-limit] \
1333 .    ds doc-macro-name Qq
1334 .
1335 .  ds doc-quote-left "\*[q]
1336 .  ds doc-quote-right "\*[q]
1337 .
1338 .  doc-enclose-string \$@
1339 ..
1340 .
1341 .
1342 .\" NS Sq user macro
1343 .\" NS   enclose string in single quotes
1344 .\" NS
1345 .\" NS modifies:
1346 .\" NS   doc-macro-name
1347 .\" NS   doc-quote-left
1348 .\" NS   doc-quote-right
1349 .\" NS
1350 .\" NS width register `Sq' set in doc-common
1351 .
1352 .de Sq
1353 .  if !\n[doc-arg-limit] \
1354 .    ds doc-macro-name Sq
1355 .
1356 .  ds doc-quote-left "\*[doc-left-singlequote]
1357 .  ds doc-quote-right "\*[doc-right-singlequote]
1358 .
1359 .  doc-enclose-string \$@
1360 ..
1361 .
1362 .
1363 .\" NS Es user macro
1364 .\" NS   set up arguments (i.e., the left and right quotation character as
1365 .\" NS   first and second argument) for .En call
1366 .\" NS
1367 .\" NS modifies:
1368 .\" NS   doc-arg-ptr
1369 .\" NS   doc-macro-name
1370 .\" NS   doc-quote-left
1371 .\" NS   doc-quote-right
1372 .
1373 .de Es
1374 .  if !\n[doc-arg-limit] \{\
1375 .    ie (\n[.$] > 2) \{\
1376 .      ds doc-macro-name Es
1377 .      doc-parse-args \$@
1378 .    \}
1379 .    el \{\
1380 .      ds doc-quote-left "\$1
1381 .      ds doc-quote-right "\$2
1382 .  \}\}
1383 .
1384 .  if !\n[doc-arg-limit] \
1385 .    return
1386 .
1387 .  nr doc-arg-ptr +1
1388 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1389 .  nr doc-arg-ptr +1
1390 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1391 .  nr doc-arg-ptr +1
1392 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1393 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1394 .  el \
1395 .    doc-print-and-reset
1396 ..
1397 .
1398 .
1399 .\" NS doc-have-slot global register (bool)
1400 .\" NS   set if `doc-enclose-string' has created a slot for closing
1401 .\" NS   delimiter
1402 .
1403 .nr doc-have-slot 0
1404 .
1405 .
1406 .\" NS doc-enclose-string macro
1407 .\" NS   enclose string with given args (e.g. [ and ])
1408 .\" NS
1409 .\" NS modifies:
1410 .\" NS   doc-arg-ptr
1411 .\" NS   doc-argXXX
1412 .\" NS   doc-have-slot
1413 .\" NS
1414 .\" NS local variables:
1415 .\" NS   doc-reg-des
1416 .\" NS   doc-reg-des1
1417 .\" NS   doc-reg-des2
1418 .\" NS
1419 .\" NS requires:
1420 .\" NS   doc-quote-left
1421 .\" NS   doc-quote-right
1422 .
1423 .de doc-enclose-string
1424 .  if \n[doc-in-synopsis-section] \
1425 .    doc-set-hard-space
1426 .
1427 .  if !\n[doc-arg-limit] \{\
1428 .    ie \n[.$] \
1429 .      doc-parse-args \$@
1430 .    el \{\
1431 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1432 .  \}\}
1433 .
1434 .  if !\n[doc-arg-limit] \
1435 .    return
1436 .
1437 .  nr doc-curr-font \n[.f]
1438 .  nr doc-curr-size \n[.ps]
1439 .
1440 .  nr doc-arg-ptr +1
1441 .  doc-print-prefixes
1442 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1443 .  nop \)\*[doc-quote-left]\)\c
1444 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1445 .    \" last argument
1446 .    nop \)\*[doc-quote-right]\)\c
1447 .    doc-print-and-reset
1448 .  \}
1449 .  el \{\
1450 .    \" test whether last arguments are of type closing punctuation
1451 .    \" resp. suffix
1452 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1453 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1454 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1455 .        nr doc-reg-des -1
1456 .
1457 .      \" prepend closing delimiter
1458 .      nr doc-reg-des +1
1459 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1460 .    \}
1461 .    el \{\
1462 .      \" test whether last arguments are macros which continue the line
1463 .      \" logically
1464 .      nr doc-reg-des \n[doc-arg-limit]
1465 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1466 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1467 .          break
1468 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1469 .          break
1470 .        nr doc-reg-des -1
1471 .      \}
1472 .
1473 .      \" if there are no trailing macros to be skipped, append argument
1474 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1475 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1476 .      el \{\
1477 .        \" if a previous call to `doc-enclose-string' has already created
1478 .        \" a slot, prepend argument
1479 .        ie \n[doc-have-slot] \
1480 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1481 .        el \{\
1482 .          \" we have to shift all arguments to the right
1483 .          nr doc-reg-des +1
1484 .          nr doc-reg-des1 \n[doc-arg-limit]
1485 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1486 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1487 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1488 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1489 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1490 .            nr doc-reg-des1 -1
1491 .            nr doc-reg-des2 -1
1492 .          \}
1493 .          nr doc-arg-limit +1
1494 .
1495 .          \" finally, insert closing delimiter into the freed slot and
1496 .          \" recompute spacing vector
1497 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1498 .          nr doc-type\n[doc-reg-des] 3
1499 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1500 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1501 .          doc-parse-space-vector
1502 .          nr doc-have-slot 1
1503 .    \}\}\}
1504 .
1505 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1506 .  \}
1507 .
1508 .  if \n[doc-in-synopsis-section] \
1509 .    doc-set-soft-space
1510 ..
1511 .
1512 .
1513 .\" NS En user macro
1514 .\" NS   enclose arguments with quotation characters set up with `.Es'
1515 .
1516 .als En doc-enclose-string
1517 .
1518 .
1519 .\" NS Ao user macro
1520 .\" NS   angle open
1521 .\" NS
1522 .\" NS modifies:
1523 .\" NS   doc-macro-name
1524 .\" NS   doc-quote-left
1525 .\" NS
1526 .\" NS width register `Ao' set in doc-common
1527 .
1528 .de Ao
1529 .  if !\n[doc-arg-limit] \
1530 .    ds doc-macro-name Ao
1531 .
1532 .  ds doc-quote-left \[la]
1533 .
1534 .  doc-enclose-open \$@
1535 ..
1536 .
1537 .
1538 .\" NS Ac user macro
1539 .\" NS   angle close
1540 .\" NS
1541 .\" NS modifies:
1542 .\" NS   doc-macro-name
1543 .\" NS   doc-quote-right
1544 .\" NS
1545 .\" NS width register `Ac' set in doc-common
1546 .
1547 .de Ac
1548 .  if !\n[doc-arg-limit] \
1549 .    ds doc-macro-name Ac
1550 .
1551 .  ds doc-quote-right \[ra]
1552 .
1553 .  doc-enclose-close \$@
1554 ..
1555 .
1556 .
1557 .\" NS Bo user macro
1558 .\" NS   bracket open
1559 .\" NS
1560 .\" NS modifies:
1561 .\" NS   doc-macro-name
1562 .\" NS   doc-quote-left
1563 .\" NS
1564 .\" NS width register `Bo' set in doc-common
1565 .
1566 .de Bo
1567 .  if !\n[doc-arg-limit] \
1568 .    ds doc-macro-name Bo
1569 .
1570 .  ds doc-quote-left "\*[doc-left-bracket]
1571 .
1572 .  doc-enclose-open \$@
1573 ..
1574 .
1575 .
1576 .\" NS Bc user macro
1577 .\" NS   bracket close
1578 .\" NS
1579 .\" NS modifies:
1580 .\" NS   doc-macro-name
1581 .\" NS   doc-quote-right
1582 .\" NS
1583 .\" NS width register `Bc' set in doc-common
1584 .
1585 .de Bc
1586 .  if !\n[doc-arg-limit] \
1587 .    ds doc-macro-name Bc
1588 .
1589 .  ds doc-quote-right "\*[doc-right-bracket]
1590 .
1591 .  doc-enclose-close \$@
1592 ..
1593 .
1594 .
1595 .\" NS Bro user macro
1596 .\" NS   brace open
1597 .\" NS
1598 .\" NS modifies:
1599 .\" NS   doc-macro-name
1600 .\" NS   doc-quote-left
1601 .\" NS
1602 .\" NS width register `Bro' set in doc-common
1603 .
1604 .de Bro
1605 .  if !\n[doc-arg-limit] \
1606 .    ds doc-macro-name Bo
1607 .
1608 .  ds doc-quote-left {
1609 .
1610 .  doc-enclose-open \$@
1611 ..
1612 .
1613 .
1614 .\" NS Brc user macro
1615 .\" NS   brace close
1616 .\" NS
1617 .\" NS modifies:
1618 .\" NS   doc-macro-name
1619 .\" NS   doc-quote-right
1620 .\" NS
1621 .\" NS width register `Brc' set in doc-common
1622 .
1623 .de Brc
1624 .  if !\n[doc-arg-limit] \
1625 .    ds doc-macro-name Bc
1626 .
1627 .  ds doc-quote-right }
1628 .
1629 .  doc-enclose-close \$@
1630 ..
1631 .
1632 .
1633 .\" NS Do user macro
1634 .\" NS   double quote open
1635 .\" NS
1636 .\" NS modifies:
1637 .\" NS   doc-macro-name
1638 .\" NS   doc-quote-left
1639 .\" NS
1640 .\" NS width register `Do' set in doc-common
1641 .
1642 .de Do
1643 .  if !\n[doc-arg-limit] \
1644 .    ds doc-macro-name Do
1645 .
1646 .  ds doc-quote-left "\*[Lq]
1647 .
1648 .  doc-enclose-open \$@
1649 ..
1650 .
1651 .
1652 .\" NS Dc user macro
1653 .\" NS   double quote close
1654 .\" NS
1655 .\" NS modifies:
1656 .\" NS   doc-macro-name
1657 .\" NS   doc-quote-right
1658 .\" NS
1659 .\" NS width register `Dc' set in doc-common
1660 .
1661 .de Dc
1662 .  if !\n[doc-arg-limit] \
1663 .    ds doc-macro-name Dc
1664 .
1665 .  ds doc-quote-right "\*[Rq]
1666 .
1667 .  doc-enclose-close \$@
1668 ..
1669 .
1670 .
1671 .\" NS Eo user macro
1672 .\" NS   enclose open (using first argument as beginning of enclosure)
1673 .\" NS
1674 .\" NS modifies:
1675 .\" NS   doc-macro-name
1676 .\" NS   doc-quote-left
1677 .\" NS
1678 .\" NS width register `Eo' set in doc-common
1679 .
1680 .de Eo
1681 .  if !\n[doc-arg-limit] \
1682 .    ds doc-macro-name Eo
1683 .
1684 .  ds doc-quote-left "\$1
1685 .
1686 .  shift
1687 .  doc-enclose-open \$@
1688 ..
1689 .
1690 .
1691 .\" NS Ec user macro
1692 .\" NS   enclose close (using first argument as end of enclosure)
1693 .\" NS
1694 .\" NS modifies:
1695 .\" NS   doc-macro-name
1696 .\" NS   doc-quote-right
1697 .\" NS
1698 .\" NS width register `Ec' set in doc-common
1699 .
1700 .de Ec
1701 .  if !\n[doc-arg-limit] \
1702 .    ds doc-macro-name Ec
1703 .
1704 .  ds doc-quote-right "\$1
1705 .
1706 .  shift
1707 .  doc-enclose-close \$@
1708 ..
1709 .
1710 .
1711 .\" NS Oo user macro
1712 .\" NS   option open
1713 .\" NS
1714 .\" NS modifies:
1715 .\" NS   doc-macro-name
1716 .\" NS   doc-quote-left
1717 .\" NS
1718 .\" NS width register `Oo' set in doc-common
1719 .
1720 .de Oo
1721 .  if !\n[doc-arg-limit] \
1722 .    ds doc-macro-name Oo
1723 .
1724 .  ds doc-quote-left [
1725 .
1726 .  doc-enclose-open \$@
1727 ..
1728 .
1729 .
1730 .\" NS Oc user macro
1731 .\" NS   option close
1732 .\" NS
1733 .\" NS modifies:
1734 .\" NS   doc-macro-name
1735 .\" NS   doc-quote-right
1736 .\" NS
1737 .\" NS width register `Oc' set in doc-common
1738 .
1739 .de Oc
1740 .  if !\n[doc-arg-limit] \
1741 .    ds doc-macro-name Oc
1742 .
1743 .  ds doc-quote-right ]
1744 .
1745 .  doc-enclose-close \$@
1746 ..
1747 .
1748 .
1749 .\" NS Po user macro
1750 .\" NS   parenthesis open
1751 .\" NS
1752 .\" NS modifies:
1753 .\" NS   doc-macro-name
1754 .\" NS   doc-quote-left
1755 .\" NS
1756 .\" NS width register `Po' set in doc-common
1757 .
1758 .de Po
1759 .  if !\n[doc-arg-limit] \
1760 .    ds doc-macro-name Po
1761 .
1762 .  ds doc-quote-left "\*[doc-left-parenthesis]
1763 .
1764 .  doc-enclose-open \$@
1765 ..
1766 .
1767 .
1768 .\" NS Pc user macro
1769 .\" NS   parenthesis close
1770 .\" NS
1771 .\" NS modifies:
1772 .\" NS   doc-macro-name
1773 .\" NS   doc-quote-right
1774 .\" NS
1775 .\" NS width register `Pc' set in doc-common
1776 .
1777 .de Pc
1778 .  if !\n[doc-arg-limit] \
1779 .    ds doc-macro-name Pc
1780 .
1781 .  ds doc-quote-right "\*[doc-right-parenthesis]
1782 .
1783 .  doc-enclose-close \$@
1784 ..
1785 .
1786 .
1787 .\" NS Qo user macro
1788 .\" NS   straight double quote open
1789 .\" NS
1790 .\" NS modifies:
1791 .\" NS   doc-macro-name
1792 .\" NS   doc-quote-left
1793 .\" NS
1794 .\" NS width register `Qo' set in doc-common
1795 .
1796 .de Qo
1797 .  if !\n[doc-arg-limit] \
1798 .    ds doc-macro-name Qo
1799 .
1800 .  ds doc-quote-left "\*[q]
1801 .
1802 .  doc-enclose-open \$@
1803 ..
1804 .
1805 .
1806 .\" NS Qc user macro
1807 .\" NS   straight double quote close
1808 .\" NS
1809 .\" NS modifies:
1810 .\" NS   doc-macro-name
1811 .\" NS   doc-quote-right
1812 .\" NS
1813 .\" NS width register `Qc' set in doc-common
1814 .
1815 .de Qc
1816 .  if !\n[doc-arg-limit] \
1817 .    ds doc-macro-name Qc
1818 .
1819 .  ds doc-quote-right "\*[q]
1820 .
1821 .  doc-enclose-close \$@
1822 ..
1823 .
1824 .
1825 .\" NS So user macro
1826 .\" NS   single quote open
1827 .\" NS
1828 .\" NS modifies:
1829 .\" NS   doc-macro-name
1830 .\" NS   doc-quote-left
1831 .\" NS
1832 .\" NS width register `So' set in doc-common
1833 .
1834 .de So
1835 .  if !\n[doc-arg-limit] \
1836 .    ds doc-macro-name So
1837 .
1838 .  ds doc-quote-left "\*[doc-left-singlequote]
1839 .
1840 .  doc-enclose-open \$@
1841 ..
1842 .
1843 .
1844 .\" NS Sc user macro
1845 .\" NS   single quote close
1846 .\" NS
1847 .\" NS modifies:
1848 .\" NS   doc-macro-name
1849 .\" NS   doc-quote-right
1850 .\" NS
1851 .\" NS width register `Sc' set in doc-common
1852 .
1853 .de Sc
1854 .  if !\n[doc-arg-limit] \
1855 .    ds doc-macro-name Sc
1856 .
1857 .  ds doc-quote-right "\*[doc-right-singlequote]
1858 .
1859 .  doc-enclose-close \$@
1860 ..
1861 .
1862 .
1863 .\" NS Xo user macro
1864 .\" NS   extend open
1865 .\" NS
1866 .\" NS modifies:
1867 .\" NS   doc-macro-name
1868 .\" NS   doc-quote-left
1869 .\" NS
1870 .\" NS width register `Xo' set in doc-common
1871 .
1872 .de Xo
1873 .  if !\n[doc-arg-limit] \
1874 .    ds doc-macro-name Xo
1875 .
1876 .  ds doc-quote-left
1877 .
1878 .  doc-enclose-open \$@
1879 ..
1880 .
1881 .
1882 .\" NS Xc user macro
1883 .\" NS   extend close
1884 .\" NS
1885 .\" NS modifies:
1886 .\" NS   doc-macro-name
1887 .\" NS   doc-quote-right
1888 .\" NS
1889 .\" NS width register `Xc' set in doc-common
1890 .
1891 .de Xc
1892 .  if !\n[doc-arg-limit] \
1893 .    ds doc-macro-name Xc
1894 .
1895 .  ds doc-quote-right
1896 .
1897 .  doc-enclose-close \$@
1898 ..
1899 .
1900 .
1901 .\" NS doc-nesting-level global register
1902 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1903 .
1904 .nr doc-nesting-level 0
1905 .
1906 .
1907 .\" NS doc-in-list global register (bool)
1908 .\" NS   whether we are in (logical) .It
1909 .
1910 .nr doc-in-list 0
1911 .
1912 .
1913 .\" NS doc-enclose-open macro
1914 .\" NS   enclose string open
1915 .\" NS
1916 .\" NS modifies:
1917 .\" NS   doc-arg-ptr
1918 .\" NS   doc-nesting-level
1919 .
1920 .de doc-enclose-open
1921 .  if !\n[doc-arg-limit] \
1922 .    doc-parse-args \$@
1923 .
1924 .  nr doc-arg-ptr +1
1925 .  doc-print-prefixes
1926 .  nr doc-arg-ptr -1
1927 .
1928 .  nop \)\*[doc-quote-left]\)\c
1929 .
1930 .  \" start enclosure box
1931 .  box doc-enclosure-box\n[doc-nesting-level]
1932 .  ev doc-enclosure-env\n[doc-nesting-level]
1933 .  evc 0
1934 .  in 0
1935 .  nf
1936 .  \" we insert something to make .chop always work
1937 .  nop \&\c
1938 .
1939 .  \" increase nesting level *after* parsing of arguments
1940 .  nr doc-nesting-level +1
1941 .
1942 .  if \n[doc-arg-limit] \{\
1943 .    nr doc-arg-ptr +1
1944 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1945 .      doc-print-recursive
1946 .    el \
1947 .      doc-reset-args
1948 .  \}
1949 ..
1950 .
1951 .
1952 .\" NS doc-enclose-close macro
1953 .\" NS   enclose string close
1954 .\" NS
1955 .\" NS modifies:
1956 .\" NS   doc-nesting-level
1957 .
1958 .de doc-enclose-close
1959 .  nr doc-nesting-level -1
1960 .
1961 .  \" finish enclosure box
1962 .  br
1963 .  ev
1964 .  box
1965 .  chop doc-enclosure-box\n[doc-nesting-level]
1966 .  unformat doc-enclosure-box\n[doc-nesting-level]
1967 .
1968 .  nh
1969 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1970 .  nop \)\*[doc-quote-right]\)\c
1971 .
1972 .  if !\n[doc-arg-limit] \{\
1973 .    doc-parse-args \$@
1974 .
1975 .    if !\n[.$] \
1976 .      doc-print-and-reset
1977 .  \}
1978 .
1979 .  if \n[doc-arg-limit] \{\
1980 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1981 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1982 .      nr doc-arg-ptr +1
1983 .      doc-print-recursive
1984 .    \}
1985 .    el \
1986 .      doc-print-and-reset
1987 .  \}
1988 .
1989 .  \" shall we finish .It macro?
1990 .  if !"\*[doc-macro-name]"It" \
1991 .    if \n[doc-in-list] \
1992 .      if !\n[doc-nesting-level] \
1993 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
1994 ..
1995 .
1996 .
1997 .\" NS Pf user macro
1998 .\" NS   prefix: `.Pf prefix arg ...'
1999 .\" NS
2000 .\" NS modifies:
2001 .\" NS   doc-arg-ptr
2002 .\" NS   doc-macro-name
2003 .\" NS   doc-quote-left
2004 .\" NS
2005 .\" NS width register `Pf' set in doc-common
2006 .
2007 .de Pf
2008 .  if !\n[doc-arg-limit] \
2009 .    ds doc-macro-name Pf
2010 .
2011 .  ie \n[doc-arg-limit] \{\
2012 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2013 .      nr doc-arg-ptr +1
2014 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2015 .    \}
2016 .    el \
2017 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2018 .  \}
2019 .  el \{\
2020 .    nop \)\$1\)\c
2021 .    shift
2022 .    ie \n[.$] \
2023 .      doc-parse-args \$@
2024 .    el \{\
2025 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
2026 .      nop \)
2027 .  \}\}
2028 .
2029 .  if \n[doc-arg-limit] \{\
2030 .    nr doc-arg-ptr +1
2031 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2032 .      doc-print-and-reset
2033 .    el \
2034 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
2035 .  \}
2036 ..
2037 .
2038 .
2039 .\" NS Ns user macro
2040 .\" NS   remove space (space removal done by `doc-parse-args')
2041 .\" NS
2042 .\" NS modifies:
2043 .\" NS   doc-argXXX
2044 .\" NS   doc-macro-name
2045 .\" NS
2046 .\" NS width register `Ns' set in doc-common
2047 .
2048 .de Ns
2049 .  if !\n[doc-arg-limit] \{\
2050 .    ie \n[.$] \{\
2051 .      ds doc-macro-name Ns
2052 .      doc-parse-args \$@
2053 .    \}
2054 .    el \
2055 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2056 .  \}
2057 .
2058 .  if \n[doc-arg-limit] \{\
2059 .    nr doc-arg-ptr +1
2060 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2061 .      doc-print-recursive
2062 .    el \
2063 .      doc-reset-args
2064 .  \}
2065 ..
2066 .
2067 .
2068 .\" NS Ap user macro
2069 .\" NS   append an apostrophe
2070 .\" NS
2071 .\" NS width register `Ap' set in doc-common
2072 .
2073 .de Ap
2074 .  ie !\n[doc-arg-limit] \
2075 .    tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2076 .  el \{\
2077 .    nop \)'\)\c
2078 .    nr doc-arg-ptr +1
2079 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2080 .      doc-print-recursive
2081 .    el \
2082 .      doc-reset-args
2083 .  \}
2084 ..
2085 .
2086 .
2087 .\" NS doc-space global string
2088 .\" NS   current inter-argument space
2089 .
2090 .ds doc-space "\*[doc-soft-space]
2091 .
2092 .
2093 .\" NS doc-soft-space constant string
2094 .\" NS   soft (stretchable) space (defined in doc-common)
2095 .
2096 .
2097 .\" NS doc-hard-space constant string
2098 .\" NS   hard (unpaddable) space (defined in doc-common)
2099 .
2100 .
2101 .\" NS doc-set-hard-space macro
2102 .\" NS   set current space string to hard (unpaddable) space.
2103 .\" NS
2104 .\" NS modifies:
2105 .\" NS   doc-saved-space
2106 .\" NS   doc-space
2107 .
2108 .de doc-set-hard-space
2109 .  ie "\*[doc-space]"" \
2110 .    ds doc-saved-space "\*[doc-hard-space]
2111 .  el \
2112 .    ds doc-space "\*[doc-hard-space]
2113 ..
2114 .
2115 .
2116 .\" NS doc-set-soft-space macro
2117 .\" NS   set current space string to soft space
2118 .\" NS
2119 .\" NS modifies:
2120 .\" NS   doc-saved-space
2121 .\" NS   doc-space
2122 .
2123 .de doc-set-soft-space
2124 .  ie "\*[doc-space]"" \
2125 .    ds doc-saved-space "\*[doc-soft-space]
2126 .  el \
2127 .    ds doc-space "\*[doc-soft-space]
2128 ..
2129 .
2130 .
2131 .\" NS doc-space-mode global register (bool)
2132 .\" NS   default is one (space mode on)
2133 .
2134 .nr doc-space-mode 1
2135 .
2136 .
2137 .\" NS doc-saved-space global string
2138 .\" NS   saved value of `doc-space'
2139 .
2140 .ds doc-saved-space "\*[doc-space]
2141 .
2142 .
2143 .\" NS doc-have-space global register (bool)
2144 .\" NS   set if last command was horizontal space
2145 .
2146 .nr doc-have-space 0
2147 .
2148 .
2149 .\" NS Sm user macro
2150 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2151 .\" NS
2152 .\" NS   without argument, toggle space mode
2153 .\" NS
2154 .\" NS modifies:
2155 .\" NS   doc-arg-limit
2156 .\" NS   doc-arg-ptr
2157 .\" NS   doc-argXXX
2158 .\" NS   doc-macro-name
2159 .\" NS   doc-num-args
2160 .\" NS   doc-saved-space
2161 .\" NS   doc-space
2162 .\" NS   doc-space-mode
2163 .\" NS   doc-spaceXXX
2164 .\" NS
2165 .\" NS local variables:
2166 .\" NS   doc-reg-Sm
2167 .\" NS
2168 .\" NS width register `Sm' set in doc-common
2169 .
2170 .de Sm
2171 .  ie \n[doc-have-space] \
2172 .    nr doc-reg-Sm 0
2173 .  el \
2174 .    nr doc-reg-Sm 1
2175 .
2176 .  if !\n[doc-arg-limit] \{\
2177 .    ie \n[.$] \{\
2178 .      ds doc-macro-name Sm
2179 .      doc-parse-args \$@
2180 .    \}
2181 .    el \{\
2182 .      ie \n[doc-space-mode] \
2183 .        nr doc-space-mode 0
2184 .      el \
2185 .        nr doc-space-mode 1
2186 .  \}\}
2187 .
2188 .  if !\n[doc-arg-limit] \
2189 .    return
2190 .
2191 .  nr doc-arg-ptr +1
2192 .
2193 .  \" avoid a warning message in case `Sm' is the last parameter
2194 .  if !d doc-arg\n[doc-arg-ptr] \
2195 .    ds doc-arg\n[doc-arg-ptr]
2196 .
2197 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2198 .    ds doc-space "\*[doc-saved-space]
2199 .    nr doc-space-mode 1
2200 .  \}
2201 .  el \{\
2202 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2203 .      ds doc-saved-space "\*[doc-space]
2204 .      ds doc-space
2205 .      nr doc-space-mode 0
2206 .    \}
2207 .    el \{\
2208 .      \" no argument for Sm
2209 .      nr doc-arg-ptr -1
2210 .      ie \n[doc-space-mode] \
2211 .        nr doc-space-mode 0
2212 .      el \
2213 .        nr doc-space-mode 1
2214 .  \}\}
2215 .
2216 .  ie \n[doc-space-mode] \{\
2217 .    \" recompute space vector for remaining arguments
2218 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2219 .    nr doc-arg-limit \n[doc-arg-ptr]
2220 .    if \n[doc-num-args] \
2221 .      doc-parse-space-vector
2222 .
2223 .    \" finish line only if it is interrupted and `doc-have-space'
2224 .    \" isn't set
2225 .    if \n[doc-reg-Sm] \
2226 .      if \n[.int] \
2227 .        nop \)
2228 .  \}
2229 .  el \{\
2230 .    \" reset remaining space vector elements
2231 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2232 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2233 .      ds doc-space\n[doc-reg-Sm]
2234 .      nr doc-reg-Sm +1
2235 .      \" the body of a `while' request must end with the fitting `\}'!
2236 .    \}
2237 .  \}
2238 .
2239 .  \" do we have parameters to print?
2240 .  ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
2241 .    \" ignore `.Sm on' and `.Sm off' without additional parameters
2242 .    ie (\n[doc-arg-ptr] > 1) \
2243 .      doc-print-and-reset
2244 .    el \
2245 .      doc-reset-args
2246 .  \}
2247 .  el \{\
2248 .    \" skip `Sm' argument
2249 .    nr doc-arg-ptr +1
2250 .    doc-print-recursive
2251 .  \}
2252 ..
2253 .
2254 .
2255 .\" NS doc-arg-type immediate register
2256 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2257 .\" NS   punctuation prefix=4)
2258 .
2259 .nr doc-arg-type 0
2260 .
2261 .
2262 .\" NS doc-get-arg-type macro
2263 .\" NS   get argument type
2264 .\" NS
2265 .\" NS   this macro expects the width of the argument in `doc-width'
2266 .\" NS
2267 .\" NS modifies:
2268 .\" NS   doc-arg-type
2269 .
2270 .de doc-get-arg-type
2271 .  nr doc-arg-type 2
2272 .
2273 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2274 .    ie (\n[doc-width] == 1) \{\
2275 .      if r doc-punct\$1 \
2276 .        nr doc-arg-type \n[doc-punct\$1]
2277 .    \}
2278 .    el \
2279 .      if r \$1 \
2280 .        if d \$1 \
2281 .          nr doc-arg-type 1
2282 .  \}
2283 ..
2284 .
2285 .
2286 .\" NS doc-get-arg-type* macro
2287 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2288 .\" NS
2289 .\" NS   this macro sets the `doc-width' register using the `length' request
2290 .\" NS   to get the number of characters in a string literally
2291 .\" NS
2292 .\" NS modifies:
2293 .\" NS   doc-arg-type
2294 .\" NS   doc-width
2295 .
2296 .de doc-get-arg-type*
2297 .  nr doc-arg-type 2
2298 .  length doc-width "\*[doc-arg\$1]
2299 .
2300 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2301 .    ie (\n[doc-width] == 1) \{\
2302 .      if r doc-punct\*[doc-arg\$1] \
2303 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2304 .    \}
2305 .    el \
2306 .      if r \*[doc-arg\$1] \
2307 .        if d \*[doc-arg\$1] \
2308 .          nr doc-arg-type 1
2309 .  \}
2310 ..
2311 .
2312 .
2313 .\" NS doc-set-spacing-1 macro
2314 .\" NS   set spacing for macros
2315 .\" NS
2316 .\" NS modifies:
2317 .\" NS   doc-spaceXXX
2318 .\" NS
2319 .\" NS local variables:
2320 .\" NS   doc-reg-dssfm
2321 .\" NS   doc-reg-dssfm1
2322 .
2323 .de doc-set-spacing-1
2324 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2325 .
2326 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2327 .  \" argument)
2328 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2329 .    if \n[doc-arg-limit] \{\
2330 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2331 .      ds doc-space\n[doc-reg-dssfm]
2332 .    \}
2333 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2334 .  \}
2335 .  el \{\
2336 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2337 .    \" argument)
2338 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2339 .      if \n[doc-arg-limit] \{\
2340 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2341 .        ds doc-space\n[doc-reg-dssfm]
2342 .      \}
2343 .      ds doc-space\n[doc-arg-limit]
2344 .    \}
2345 .    el \
2346 .      ds doc-space\n[doc-arg-limit]
2347 .  \}
2348 ..
2349 .
2350 .
2351 .\" NS doc-set-spacing-2 macro
2352 .\" NS   set spacing for strings
2353 .\" NS
2354 .\" NS modifies:
2355 .\" NS   doc-spaceXXX
2356 .
2357 .de doc-set-spacing-2
2358 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2359 ..
2360 .
2361 .
2362 .\" NS doc-set-spacing-3 macro
2363 .\" NS   set spacing for punctuation suffixes
2364 .\" NS
2365 .\" NS modifies:
2366 .\" NS   doc-spaceXXX
2367 .\" NS
2368 .\" NS local variables:
2369 .\" NS   doc-reg-dssfps
2370 .
2371 .de doc-set-spacing-3
2372 .  if \n[doc-arg-limit] \{\
2373 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2374 .    ds doc-space\n[doc-reg-dssfps]
2375 .  \}
2376 .
2377 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2378 ..
2379 .
2380 .
2381 .\" NS doc-set-spacing-4 macro
2382 .\" NS   set spacing for punctuation prefixes
2383 .\" NS
2384 .\" NS modifies:
2385 .\" NS   doc-spaceXXX
2386 .
2387 .de doc-set-spacing-4
2388 .  ds doc-space\n[doc-arg-limit]
2389 ..
2390 .
2391 .
2392 .\" type switches (on current argument doc-arg-ptr)
2393 .
2394 .
2395 .\" NS doc-do-1 macro
2396 .\" NS   call request if macro
2397 .
2398 .de doc-do-1
2399 .  \*[doc-arg\n[doc-arg-ptr]]
2400 ..
2401 .
2402 .
2403 .\" NS doc-do-2 macro
2404 .\" NS   call .doc-print-recursive if string
2405 .
2406 .als doc-do-2 doc-print-recursive
2407 .
2408 .
2409 .\" NS doc-do-3 macro
2410 .\" NS   call .doc-print-recursive if punctuation suffix
2411 .
2412 .als doc-do-3 doc-print-recursive
2413 .
2414 .
2415 .\" NS doc-do-4 macro
2416 .\" NS   call .doc-print-recursive if punctuation prefix
2417 .
2418 .als doc-do-4 doc-print-recursive
2419 .
2420 .
2421 .\" NS doc-fontmode-depth global register
2422 .\" NS   font mode level
2423 .
2424 .nr doc-fontmode-depth 0
2425 .
2426 .
2427 .\" NS doc-fontmode-font-stackXXX global register
2428 .\" NS   stack of saved current font values from `Bf' macro
2429 .\" NS
2430 .\" NS limit:
2431 .\" NS   doc-fontmode-depth
2432 .
2433 .nr doc-fontmode-font-stack0 0
2434 .
2435 .
2436 .\" NS doc-fontmode-size-stackXXX global register
2437 .\" NS   stack of saved current size values from `Bf' macro
2438 .\" NS
2439 .\" NS limit:
2440 .\" NS   doc-fontmode-depth
2441 .
2442 .nr doc-fontmode-size-stack0 0
2443 .
2444 .
2445 .\" NS Bf user macro
2446 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2447 .\" NS
2448 .\" NS modifies:
2449 .\" NS   doc-fontmode-depth
2450 .\" NS   doc-fontmode-font-stackXXX
2451 .\" NS   doc-fontmode-size-stackXXX
2452 .\" NS   doc-macro-name
2453 .\" NS
2454 .\" NS width register `Bf' set in doc-common
2455 .
2456 .de Bf
2457 .  ds doc-macro-name Bf
2458 .
2459 .  ie \n[.$] \{\
2460 .    nr doc-fontmode-depth +1
2461 .
2462 .    \" save current font and size
2463 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2464 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2465 .
2466 .    ie        "\$1"Em" \
2467 .      nop \*[doc-Em-font]\c
2468 .    el \{ .ie "\$1"Li" \
2469 .      nop \*[doc-Li-font]\c
2470 .    el \{ .ie "\$1"Sy" \
2471 .      nop \*[doc-Sy-font]\c
2472 .    el \{ .ie "\$1"-emphasis" \
2473 .      nop \*[doc-Em-font]\c
2474 .    el \{ .ie "\$1"-literal" \
2475 .      nop \*[doc-Li-font]\c
2476 .    el \{ .ie "\$1"-symbolic" \
2477 .      nop \*[doc-Sy-font]\c
2478 .    el \{\
2479 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2480 .      tm1 " (#\n[.c])
2481 .  \}\}\}\}\}\}\}
2482 .  el \
2483 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2484 ..
2485 .
2486 .
2487 .\" NS Ef user macro
2488 .\" NS   end font mode
2489 .\" NS
2490 .\" NS modifies:
2491 .\" NS   doc-macro-name
2492 .\" NS
2493 .\" NS width register `Ef' set in doc-common
2494 .
2495 .de Ef
2496 .  ds doc-macro-name Ef
2497 .
2498 .  ie \n[doc-fontmode-depth] \{\
2499 .    \" restore saved font and size
2500 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2501 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2502 .
2503 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2504 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2505 .    nr doc-fontmode-depth -1
2506 .  \}
2507 .  el \
2508 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2509 ..
2510 .
2511 .
2512 .\" NS doc-keep-type global register
2513 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2514 .
2515 .nr doc-keep-type 0
2516 .
2517 .
2518 .\" NS Bk user macro
2519 .\" NS   begin keep
2520 .\" NS
2521 .\" NS modifies:
2522 .\" NS   doc-keep-type
2523 .\" NS   doc-macro-name
2524 .\" NS
2525 .\" NS width register `Bk' set in doc-common
2526 .
2527 .de Bk
2528 .  ds doc-macro-name Bk
2529 .
2530 .  if \n[doc-keep-type] \
2531 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2532 .
2533 .  ie        "\$1"-lines" \{\
2534 .    nr doc-keep-type 2
2535 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2536 .  \}
2537 .  el \{ .ie "\$1"-words" \{\
2538 .    nr doc-keep-type 1
2539 .    doc-set-hard-space
2540 .  \}
2541 .  el \{ .ie "\$1"" \{\
2542 .    \" default
2543 .    nr doc-keep-type 1
2544 .    doc-set-hard-space
2545 .  \}
2546 .  el \{\
2547 .    tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2548 .    nr doc-keep-type 3
2549 .  \}\}\}
2550 .
2551 \#.  nr doc-nesting-level +1
2552 ..
2553 .
2554 .
2555 .\" NS Ek user macro
2556 .\" NS   end keep
2557 .\" NS
2558 .\" NS modifies:
2559 .\" NS   doc-keep-type
2560 .\" NS   doc-macro-name
2561 .\" NS
2562 .\" NS width register `Ek' set in doc-common
2563 .
2564 .de Ek
2565 .  ds doc-macro-name Ek
2566 .
2567 \#.  nr doc-nesting-level -1
2568 .
2569 .  ie \n[.$] \
2570 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2571 .  el \{\
2572 .    if !\n[doc-keep-type] \
2573 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2574 .
2575 .    ie        (\n[doc-keep-type] == 1) \
2576 .      doc-set-soft-space
2577 .    el \{ .if (\n[doc-keep-type] == 2) \
2578 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2579 .  \}\}
2580 .
2581 .  nr doc-keep-type 0
2582 .
2583 \#.  if !"\*[doc-out-string]"" \
2584 \#.    doc-print-out-string
2585 ..
2586 .
2587 .
2588 .\" NS doc-display-depth global register
2589 .\" NS   display level
2590 .
2591 .nr doc-display-depth 0
2592 .
2593 .
2594 .\" NS doc-is-compact global register (bool)
2595 .\" NS   set if the `compact' keyword is given
2596 .
2597 .nr doc-is-compact 0
2598 .
2599 .
2600 .\" NS doc-display-type-stackXXX global string
2601 .\" NS   the display type stack
2602 .\" NS
2603 .\" NS limit:
2604 .\" NS   doc-display-depth
2605 .
2606 .ds doc-display-type-stack0
2607 .
2608 .
2609 .\" NS doc-display-indent-stackXXX global register
2610 .\" NS   stack of display indentation values
2611 .\" NS
2612 .\" NS limit:
2613 .\" NS   doc-display-depth
2614 .
2615 .nr doc-display-indent-stack0 0
2616 .
2617 .
2618 .\" NS doc-display-ad-stackXXX global register
2619 .\" NS   stack of saved adjustment modes
2620 .\" NS
2621 .\" NS limit:
2622 .\" NS   doc-display-depth
2623 .
2624 .nr doc-display-ad-stack0 0
2625 .
2626 .
2627 .\" NS doc-display-fi-stackXXX global register
2628 .\" NS   stack of saved fill modes
2629 .\" NS
2630 .\" NS limit:
2631 .\" NS   doc-display-depth
2632 .
2633 .nr doc-display-fi-stack0 0
2634 .
2635 .
2636 .\" NS doc-display-ft-stackXXX global register
2637 .\" NS   stack of saved fonts
2638 .\" NS
2639 .\" NS limit:
2640 .\" NS   doc-display-depth
2641 .
2642 .nr doc-display-ft-stack0 0
2643 .
2644 .
2645 .\" NS doc-display-ps-stackXXX global register
2646 .\" NS   stack of saved font sizes
2647 .\" NS
2648 .\" NS limit:
2649 .\" NS   doc-display-depth
2650 .
2651 .nr doc-display-ps-stack0 0
2652 .
2653 .
2654 .\" NS Bd user macro
2655 .\" NS   begin display
2656 .\" NS
2657 .\" NS width register `Bd' set in doc-common
2658 .\" NS
2659 .\" NS modifies:
2660 .\" NS   doc-curr-font
2661 .\" NS   doc-curr-size
2662 .\" NS   doc-display-depth
2663 .\" NS   doc-display-ad-stackXXX
2664 .\" NS   doc-display-fi-stackXXX
2665 .\" NS   doc-display-ft-stackXXX
2666 .\" NS   doc-display-ps-stackXXX
2667 .\" NS   doc-display-file
2668 .\" NS   doc-display-indent-stackXXX
2669 .\" NS   doc-display-type-stackXXX
2670 .\" NS   doc-is-compact
2671 .\" NS   doc-macro-name
2672 .\" NS
2673 .\" NS local variables:
2674 .\" NS   doc-reg-Bd
2675 .
2676 .de Bd
2677 .  ds doc-macro-name Bd
2678 .
2679 .  if !\n[.$] \{\
2680 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2681 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2682 .    return
2683 .  \}
2684 .
2685 .  nr doc-is-compact 0
2686 .  ds doc-display-file
2687 .  nr doc-reg-Bd 1
2688 .  nr doc-display-depth +1
2689 .
2690 .  \" save current adjustment and fill modes
2691 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2692 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2693 .
2694 .  ie        "\$1"-literal" \{\
2695 .    ds doc-display-type-stack\n[doc-display-depth] literal
2696 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2697 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2698 .
2699 .    ie t \
2700 .      ta T 9n
2701 .    el \
2702 .      ta T 8n
2703 .    nf
2704 .  \}
2705 .  el \{ .ie "\$1"-filled" \{\
2706 .    ds doc-display-type-stack\n[doc-display-depth] filled
2707 .    ad b
2708 .    fi
2709 .  \}
2710 .  el \{ .ie "\$1"-ragged" \{\
2711 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2712 .    na
2713 .    fi
2714 .  \}
2715 .  el \{ .ie "\$1"-centered" \{\
2716 .    ds doc-display-type-stack\n[doc-display-depth] centered
2717 .    ad c
2718 .    fi
2719 .  \}
2720 .  el \{ .ie "\$1"-unfilled" \{\
2721 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2722 .    nf
2723 .  \}
2724 .  el \{\
2725 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2726 .    tm1 "              in .Bd macro (#\n[.c])
2727 .    nr doc-reg-Bd 0
2728 .  \}\}\}\}\}
2729 .
2730 .  \" have we seen an argument?
2731 .  if \n[doc-reg-Bd] \{\
2732 .    shift
2733 .    \" check other arguments
2734 .    if \n[.$] \
2735 .      doc-do-Bd-args \$@
2736 .  \}
2737 .
2738 .  \" avoid warning about non-existent register
2739 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2740 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2741 .
2742 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2743 .    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2744 .
2745 .  if !\n[doc-is-compact] \
2746 .    sp \n[doc-display-vertical]u
2747 .
2748 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2749 .    if t \
2750 .      nop \*[doc-Li-font]\c
2751 .
2752 .  if !\n[cR] \
2753 .    ne 2v
2754 .
2755 .  if !"\*[doc-display-file]"" \
2756 .    so \*[doc-display-file]
2757 .
2758 .  nr doc-is-compact 0
2759 .  ds doc-display-file
2760 ..
2761 .
2762 .
2763 .\" NS doc-do-Bd-args macro
2764 .\" NS   resolve remaining .Bd arguments
2765 .\" NS
2766 .\" NS modifies:
2767 .\" NS   doc-display-file
2768 .\" NS   doc-display-indent-stackXXX
2769 .\" NS   doc-is-compact
2770 .\" NS
2771 .\" NS local variables:
2772 .\" NS   doc-reg-ddBa
2773 .\" NS   doc-reg-ddBa1
2774 .\" NS   doc-reg-ddBa2
2775 .\" NS   doc-reg-ddBa3
2776 .\" NS   doc-reg-ddBa4
2777 .\" NS   doc-str-ddBa
2778 .
2779 .de doc-do-Bd-args
2780 .  nr doc-reg-ddBa 1
2781 .
2782 .  ie        "\$1"-offset" \{\
2783 .    nr doc-reg-ddBa 2
2784 .
2785 .    ie        "\$2"left" \
2786 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2787 .    el \{ .ie "\$2"right" \
2788 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2789 .    el \{ .ie "\$2"center" \
2790 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2791 .    el \{ .ie "\$2"indent" \
2792 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2793 .    el \{ .ie "\$2"indent-two" \
2794 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2795 .    el \
2796 .      nr doc-reg-ddBa 1
2797 .    \}\}\}\}
2798 .
2799 .    \" not a known keyword
2800 .    if (\n[doc-reg-ddBa] == 1) \{\
2801 .      nr doc-reg-ddBa 2
2802 .
2803 .      nr doc-reg-ddBa1 0
2804 .      if \B\a(\$2)\a \{\
2805 .        \" disable warnings related to scaling indicators (32)
2806 .        nr doc-reg-ddBa2 \n[.warn]
2807 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2808 .
2809 .        \" values without a scaling indicator are taken as strings;
2810 .        \" we test whether the parameter string with and without the last
2811 .        \" character yields identical numerical results (ignoring the
2812 .        \" scaling indicator)
2813 .        ds doc-str-ddBa "\$2
2814 .        substring doc-str-ddBa 0 -2
2815 .        if \B\a(\*[doc-str-ddBa])\a \{\
2816 .          nr doc-reg-ddBa3 (;(\$2))
2817 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2818 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2819 .            nr doc-reg-ddBa1 1
2820 .        \}
2821 .
2822 .        \" enable all warnings again
2823 .        warn \n[doc-reg-ddBa2]
2824 .      \}
2825 .
2826 .      ie \n[doc-reg-ddBa1] \
2827 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2828 .      el \{\
2829 .        doc-get-width "\$2"
2830 .        ie (\n[doc-width] <= 3) \{\
2831 .          \" if the offset parameter is a macro, use the macro's
2832 .          \" width as specified in doc-common
2833 .          doc-get-arg-type "\$2"
2834 .          ie (\n[doc-arg-type] == 1) \
2835 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2836 .          el \
2837 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2838 .        \}
2839 .        el \
2840 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2841 .    \}\}
2842 .  \}
2843 .  el \{ .ie "\$1"-compact" \
2844 .    nr doc-is-compact 1
2845 .  el \{ .ie "\$1"-file" \{\
2846 .    ie !"\$2"" \{\
2847 .      ds doc-display-file "\$2
2848 .      nr doc-reg-ddBa 2
2849 .    \}
2850 .    el \
2851 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2852 .  \}
2853 .  el \
2854 .      tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2855 .  \}\}
2856 .
2857 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2858 .    shift \n[doc-reg-ddBa]
2859 .    doc-do-Bd-args \$@
2860 .  \}
2861 ..
2862 .
2863 .
2864 .\" NS Ed user macro
2865 .\" NS   end display
2866 .\" NS
2867 .\" NS modifies:
2868 .\" NS   doc-display-depth
2869 .\" NS   doc-display-indent-stackXXX
2870 .\" NS   doc-display-type-stackXXX
2871 .\" NS   doc-macro-name
2872 .\" NS
2873 .\" NS width register `Ed' set in doc-common
2874 .
2875 .de Ed
2876 .  ds doc-macro-name Ed
2877 .
2878 .  br
2879 .
2880 .  if !\n[doc-display-depth] \{\
2881 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2882 .    nr doc-display-depth 1
2883 .  \}
2884 .
2885 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2886 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2887 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2888 .  \}
2889 .
2890 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2891 .
2892 .  \" restore saved adjustment and fill modes
2893 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2894 .    fi
2895 .  el \
2896 .    nf
2897 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2898 .
2899 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2900 .  ds doc-display-type-stack\n[doc-display-depth]
2901 .  nr doc-display-depth -1
2902 ..
2903 .
2904 .
2905 .\" NS doc-list-type-stackXXX global string
2906 .\" NS   stack of list types
2907 .\" NS
2908 .\" NS limit:
2909 .\" NS   doc-list-depth
2910 .
2911 .ds doc-list-type-stack1
2912 .
2913 .
2914 .\" NS doc-list-indent-stackXXX global register
2915 .\" NS   stack of list indentation values
2916 .\" NS
2917 .\" NS limit:
2918 .\" NS   doc-list-depth
2919 .
2920 .nr doc-list-indent-stack1 0
2921 .
2922 .
2923 .\" NS doc-list-have-indent-stackXXX global register (bool)
2924 .\" NS   an indentation value is active
2925 .\" NS
2926 .\" NS limit:
2927 .\" NS   doc-list-depth
2928 .
2929 .nr doc-list-have-indent-stack1 0
2930 .
2931 .
2932 .\" NS Bl user macro
2933 .\" NS   begin list
2934 .\" NS
2935 .\" NS width register `Bl' set in doc-common
2936 .\" NS
2937 .\" NS modifies:
2938 .\" NS   doc-arg-ptr
2939 .\" NS   doc-argXXX
2940 .\" NS   doc-list-depth
2941 .\" NS   doc-list-have-indent-stackXXX
2942 .\" NS   doc-list-indent-stackXXX
2943 .\" NS   doc-list-type-stackXXX
2944 .\" NS   doc-macro-name
2945 .\" NS   doc-num-args
2946 .\" NS   doc-num-columns
2947 .\" NS
2948 .\" NS local variables:
2949 .\" NS   doc-reg-Bl
2950 .
2951 .de Bl
2952 .  if !\n[.$] \{\
2953 .    doc-Bl-usage
2954 .    return
2955 .  \}
2956 .
2957 .  ds doc-macro-name Bl
2958 .  nr doc-list-depth +1
2959 .  nr doc-arg-ptr 1
2960 .
2961 .  ie        "\$1"-hang" \{\
2962 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2963 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2964 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2965 .  \}
2966 .  el \{ .ie "\$1"-tag" \{\
2967 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2968 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2969 .  \}
2970 .  el \{ .ie "\$1"-item" \{\
2971 .    ds doc-list-type-stack\n[doc-list-depth] item-list
2972 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2973 .  \}
2974 .  el \{ .ie "\$1"-enum" \{\
2975 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
2976 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
2977 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2978 .  \}
2979 .  el \{ .ie "\$1"-bullet" \{\
2980 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
2981 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2982 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2983 .  \}
2984 .  el \{ .ie "\$1"-dash" \{\
2985 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2986 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2987 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2988 .  \}
2989 .  el \{ .ie "\$1"-hyphen" \{\
2990 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
2991 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
2992 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2993 .  \}
2994 .  el \{ .ie "\$1"-inset" \{\
2995 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
2996 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2997 .  \}
2998 .  el \{ .ie "\$1"-diag" \{\
2999 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
3000 .  \}
3001 .  el \{ .ie "\$1"-ohang" \{\
3002 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
3003 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3004 .  \}
3005 .  el \{ .ie "\$1"-column" \{\
3006 .    ds doc-list-type-stack\n[doc-list-depth] column-list
3007 .    linetabs 1
3008 .  \}
3009 .  el \{\
3010 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3011 .    tm1 "              in .Bl macro
3012 .    tm
3013 .    nr doc-arg-ptr 0
3014 .  \}\}\}\}\}\}\}\}\}\}\}
3015 .
3016 .  \" we have seen a list type
3017 .  if !\n[doc-arg-ptr] \{\
3018 .    doc-Bl-usage
3019 .    doc-reset-args
3020 .    nr doc-list-depth -1
3021 .    return
3022 .  \}
3023 .
3024 .  shift
3025 .
3026 .  \" fill argument vector
3027 .  nr doc-reg-Bl 1
3028 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
3029 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3030 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
3031 .    nr doc-type\n[doc-reg-Bl] 0
3032 .    ds doc-space\n[doc-reg-Bl]
3033 .    nr doc-reg-Bl +1
3034 .  \}
3035 .
3036 .  doc-increment-list-stack
3037 .
3038 .  if \n[.$] \{\
3039 .    nr doc-arg-limit \n[.$]
3040 .    nr doc-arg-ptr 0
3041 .    doc-do-Bl-args
3042 .
3043 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3044 .
3045 .    \" initialize column list
3046 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3047 .      doc-set-column-tab \n[doc-num-columns]
3048 '      in -\n[doc-column-indent-width]u
3049 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3050 .        sp \n[doc-display-vertical]u
3051 .
3052 .      nf
3053 .      nr doc-num-columns 0
3054 .  \}\}
3055 .
3056 .  doc-reset-args
3057 ..
3058 .
3059 .
3060 .\" NS doc-Bl-usage macro
3061 .
3062 .de doc-Bl-usage
3063 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3064 .  tm1 "             [-width <string>]
3065 .  tm1 "             [-offset <string>] [-compact]
3066 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3067 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3068 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3069 ..
3070 .
3071 .
3072 .\" NS doc-do-Bl-args macro
3073 .\" NS   resolve remaining .Bl arguments
3074 .\" NS
3075 .\" NS modifies:
3076 .\" NS   doc-arg-ptr
3077 .\" NS   doc-argXXX
3078 .\" NS   doc-compact-list-stackXXX
3079 .\" NS   doc-list-indent-stackXXX
3080 .\" NS   doc-list-offset-stackXXX
3081 .\" NS   doc-num-columns
3082 .\" NS   doc-tag-prefix-stackXXX
3083 .\" NS   doc-tag-width-stackXXX
3084 .\" NS
3085 .\" NS local variables:
3086 .\" NS   doc-box-dBla
3087 .\" NS   doc-env-dBla
3088 .\" NS   doc-reg-dBla
3089 .\" NS   doc-reg-dBla1
3090 .\" NS   doc-reg-dBla2
3091 .\" NS   doc-reg-dBla3
3092 .\" NS   doc-reg-dBla4
3093 .\" NS   doc-str-dBla
3094 .\" NS   doc-str-dBla1
3095 .
3096 .de doc-do-Bl-args
3097 .  nr doc-arg-ptr +1
3098 .
3099 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3100 .    return
3101 .
3102 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3103 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3104 .  if !d doc-arg\n[doc-reg-dBla] \
3105 .    ds doc-arg\n[doc-reg-dBla]
3106 .
3107 .  nr doc-reg-dBla 1
3108 .
3109 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3110 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3111 .
3112 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3113 .    ie (\n[doc-list-depth] > 1) \{\
3114 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3115 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3116 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3117 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3118 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3119 .    \}
3120 .    el \
3121 .      tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3122 .  \}
3123 .
3124 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3125 .    nr doc-arg-ptr +1
3126 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3127 .
3128 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3129 .    substring doc-str-dBla 0 0
3130 .    ie \a.\a\*[doc-str-dBla]\a \{\
3131 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3132 .      substring doc-str-dBla 1
3133 .      doc-first-parameter \*[doc-str-dBla]
3134 .      doc-get-width "\*[doc-str-dfp]
3135 .      doc-get-arg-type "\*[doc-str-dfp]
3136 .      ie (\n[doc-arg-type] == 1) \
3137 .        nr doc-reg-dBla1 1
3138 .      el \
3139 .        nr doc-reg-dBla1 0
3140 .    \}
3141 .    el \
3142 .      nr doc-reg-dBla1 0
3143 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3144 .
3145 .    ie \n[doc-reg-dBla1] \{\
3146 .      \" execute string in a box to get the width of the diversion
3147 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3148 .      doc-save-global-vars
3149 .      doc-reset-args
3150 .      box doc-box-dBla
3151 .      ev doc-env-dBla
3152 .      evc 0
3153 .      in 0
3154 .      nf
3155 .      nop \*[doc-str-dBla]
3156 .      br
3157 .      ev
3158 .      box
3159 .      doc-restore-global-vars
3160 .      doc-get-width \h'\n[dl]u'
3161 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3162 .    \}
3163 .    el \{\
3164 .      \" test whether argument is a valid numeric expression
3165 .      nr doc-reg-dBla1 0
3166 .      if \B\a(\*[doc-str-dBla])\a \{\
3167 .        \" disable warnings related to scaling indicators (32)
3168 .        nr doc-reg-dBla2 \n[.warn]
3169 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3170 .
3171 .        \" values without a scaling indicator are taken as strings;
3172 .        \" we test whether the parameter string with and without the last
3173 .        \" character yields identical numerical results (ignoring the
3174 .        \" scaling indicator)
3175 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3176 .        substring doc-str-dBla1 0 -2
3177 .        if \B\a(\*[doc-str-dBla1])\a \{\
3178 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3179 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3180 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3181 .            nr doc-reg-dBla1 1
3182 .        \}
3183 .
3184 .        \" enable all warnings again
3185 .        warn \n[doc-reg-dBla2]
3186 .      \}
3187 .
3188 .      ie \n[doc-reg-dBla1] \
3189 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3190 .      el \{\
3191 .        doc-get-arg-width \n[doc-arg-ptr]
3192 .        ie (\n[doc-width] == 2) \{\
3193 .          \" if the width parameter is a macro, use the macro's
3194 .          \" width as specified in doc-common
3195 .          doc-get-arg-type \*[doc-str-dBla]
3196 .          ie (\n[doc-arg-type] == 1) \
3197 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3198 .          el \
3199 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3200 .        \}
3201 .        el \
3202 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3203 .  \}\}\}
3204 .
3205 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3206 .    nr doc-arg-ptr +1
3207 .
3208 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3209 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3210 .    el \{\
3211 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3212 .      nr doc-reg-dBla1 0
3213 .      if \B\a(\*[doc-str-dBla])\a \{\
3214 .        nr doc-reg-dBla2 \n[.warn]
3215 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3216 .
3217 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3218 .        substring doc-str-dBla1 0 -2
3219 .        if \B\a(\*[doc-str-dBla1])\a \{\
3220 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3221 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3222 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3223 .            nr doc-reg-dBla1 1
3224 .        \}
3225 .
3226 .        warn \n[doc-reg-dBla2]
3227 .      \}
3228 .
3229 .      ie \n[doc-reg-dBla1] \
3230 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3231 .      el \{\
3232 .        doc-get-arg-width \n[doc-arg-ptr]
3233 .        ie (\n[doc-width] <= 3) \{\
3234 .          \" if the offset parameter is a macro, use the macro's
3235 .          \" width as specified in doc-common
3236 .          doc-get-arg-type \*[doc-str-dBla]
3237 .          ie (\n[doc-arg-type] == 1) \
3238 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3239 .          el \
3240 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3241 .        \}
3242 .        el \
3243 .          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3244 .  \}\}\}
3245 .  el \
3246 .    nr doc-reg-dBla 0
3247 .  \}\}\}
3248 .
3249 .  \" not a known keyword, so it specifies the width of the next column
3250 .  \" (if it is a column list)
3251 .  if !\n[doc-reg-dBla] \{\
3252 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3253 .      nr doc-num-columns +1
3254 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3255 .      substring doc-str-dBla 0 0
3256 .      ie \a.\a\*[doc-str-dBla]\a \{\
3257 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3258 .        substring doc-str-dBla 1
3259 .        doc-first-parameter \*[doc-str-dBla]
3260 .        doc-get-width "\*[doc-str-dfp]
3261 .        doc-get-arg-type "\*[doc-str-dfp]
3262 .        ie (\n[doc-arg-type] == 1) \
3263 .          nr doc-reg-dBla1 1
3264 .        el \
3265 .          nr doc-reg-dBla1 0
3266 .      \}
3267 .      el \
3268 .        nr doc-reg-dBla1 0
3269 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3270 .
3271 .      ie \n[doc-reg-dBla1] \{\
3272 .        \" execute string in a box to get the width of the diversion
3273 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3274 .        doc-save-global-vars
3275 .        doc-reset-args
3276 .        box doc-box-dBla
3277 .        ev doc-env-dBla
3278 .        evc 0
3279 .        in 0
3280 .        nf
3281 .        nop \*[doc-str-dBla]
3282 .        br
3283 .        ev
3284 .        box
3285 .        doc-restore-global-vars
3286 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3287 .      \}
3288 .      el \
3289 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3290 .    \}
3291 .    el \{\
3292 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3293 .      tm1 " in .Bl macro (#\n[.c])
3294 .  \}\}
3295 .
3296 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3297 .    doc-do-Bl-args
3298 ..
3299 .
3300 .
3301 .\" NS doc-save-global-vars macro
3302 .\" NS   save all global variables
3303 .\" NS
3304 .\" NS local variables:
3305 .\" NS   doc-reg-dsgv
3306 .
3307 .de doc-save-global-vars
3308 .  ds doc-macro-name-saved "\*[doc-macro-name]
3309 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3310 .  nr doc-num-args-saved \n[doc-num-args]
3311 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3312 .
3313 .  nr doc-reg-dsgv 1
3314 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3315 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3316 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3317 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3318 .    nr doc-reg-dsgv +1
3319 .  \}
3320 .
3321 .  nr doc-curr-font-saved \n[doc-curr-font]
3322 .  nr doc-curr-size-saved \n[doc-curr-size]
3323 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3324 .  nr doc-in-library-section-saved \n[doc-in-library-section]
3325 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3326 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3327 .  nr doc-have-decl-saved \n[doc-have-decl]
3328 .  nr doc-have-var-saved \n[doc-have-var]
3329 .  ds doc-command-name-saved "\*[doc-command-name]
3330 .  ds doc-quote-left-saved "\*[doc-quote-left]
3331 .  ds doc-quote-right-saved "\*[doc-quote-right]
3332 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3333 .  nr doc-in-list-saved \n[doc-in-list]
3334 .  ds doc-space-saved "\*[doc-space]
3335 .  ds doc-saved-space-saved "\*[doc-saved-space]
3336 .  nr doc-space-mode-saved \n[doc-space-mode]
3337 .  nr doc-have-space-saved \n[doc-have-space]
3338 .  nr doc-have-slot-saved \n[doc-have-slot]
3339 .  nr doc-keep-type-saved \n[doc-keep-type]
3340 .  nr doc-display-depth-saved \n[doc-display-depth]
3341 .  nr doc-is-compact-saved \n[doc-is-compact]
3342 .
3343 .  nr doc-reg-dsgv 0
3344 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3345 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3346 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3347 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3348 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3349 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3350 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3351 .    nr doc-reg-dsgv +1
3352 .  \}
3353 .
3354 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3355 .
3356 .  nr doc-reg-dsgv 1
3357 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3358 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3359 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3360 .    nr doc-reg-dsgv +1
3361 .  \}
3362 .
3363 .  nr doc-list-depth-saved \n[doc-list-depth]
3364 .
3365 .  nr doc-reg-dsgv 1
3366 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3367 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3368 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3369 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3370 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3371 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3372 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3373 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3374 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3375 .    nr doc-reg-dsgv +1
3376 .  \}
3377 .
3378 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3379 .  nr doc-curr-type-saved \n[doc-curr-type]
3380 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3381 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3382 .  nr doc-num-columns-saved \n[doc-num-columns]
3383 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3384 .  nr doc-is-func-saved \n[doc-is-func]
3385 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3386 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3387 .  ds doc-func-arg-saved "\*[doc-func-arg]
3388 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3389 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3390 .  nr doc-have-func-saved \n[doc-have-func]
3391 .  nr doc-is-reference-saved \n[doc-is-reference]
3392 .  nr doc-reference-count-saved \n[doc-reference-count]
3393 .  nr doc-author-count-saved \n[doc-author-count]
3394 .
3395 .  nr doc-reg-dsgv 0
3396 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3397 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3398 .    nr doc-reg-dsgv +1
3399 .  \}
3400 .
3401 .  nr doc-book-count-saved \n[doc-book-count]
3402 .  ds doc-book-name-saved "\*[doc-book-name]
3403 .  nr doc-date-count-saved \n[doc-date-count]
3404 .  ds doc-date-saved "\*[doc-date]
3405 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3406 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3407 .  nr doc-journal-count-saved \n[doc-journal-count]
3408 .  ds doc-journal-name-saved "\*[doc-journal-name]
3409 .  nr doc-issue-count-saved \n[doc-issue-count]
3410 .  ds doc-issue-name-saved "\*[doc-issue-name]
3411 .  nr doc-optional-count-saved \n[doc-optional-count]
3412 .  ds doc-optional-string-saved "\*[doc-optional-string]
3413 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3414 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3415 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3416 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3417 .  nr doc-report-count-saved \n[doc-report-count]
3418 .  ds doc-report-name-saved "\*[doc-report-name]
3419 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3420 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3421 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3422 .  nr doc-volume-count-saved \n[doc-volume-count]
3423 .  ds doc-volume-name-saved "\*[doc-volume-name]
3424 .  nr doc-have-author-saved \n[doc-have-author]
3425 .
3426 .  ds doc-document-title-saved "\*[doc-document-title]
3427 .  ds doc-volume-saved "\*[doc-volume]
3428 .  ds doc-section-saved "\*[doc-section]
3429 .  ds doc-operating-system-saved "\*[doc-operating-system]
3430 .  ds doc-date-string-saved "\*[doc-date-string]
3431 .  nr doc-header-space-saved \n[doc-header-space]
3432 .  nr doc-footer-space-saved \n[doc-footer-space]
3433 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3434 .  ds doc-header-string-saved "\*[doc-header-string]
3435 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3436 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3437 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3438 ..
3439 .
3440 .
3441 .\" NS doc-restore-global-vars macro
3442 .\" NS   restore all global variables
3443 .\" NS
3444 .\" NS local variables:
3445 .\" NS   doc-reg-drgv
3446 .
3447 .de doc-restore-global-vars
3448 .  ds doc-macro-name "\*[doc-macro-name-saved]
3449 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3450 .  nr doc-num-args \n[doc-num-args-saved]
3451 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3452 .
3453 .  nr doc-reg-drgv 1
3454 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3455 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3456 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3457 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3458 .    nr doc-reg-drgv +1
3459 .  \}
3460 .
3461 .  nr doc-curr-font \n[doc-curr-font-saved]
3462 .  nr doc-curr-size \n[doc-curr-size-saved]
3463 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3464 .  nr doc-in-library-section \n[doc-in-library-section-saved]
3465 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3466 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3467 .  nr doc-have-decl \n[doc-have-decl-saved]
3468 .  nr doc-have-var \n[doc-have-var-saved]
3469 .  ds doc-command-name "\*[doc-command-name-saved]
3470 .  ds doc-quote-left "\*[doc-quote-left-saved]
3471 .  ds doc-quote-right "\*[doc-quote-right-saved]
3472 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3473 .  nr doc-in-list \n[doc-in-list-saved]
3474 .  ds doc-space "\*[doc-space-saved]
3475 .  ds doc-saved-space "\*[doc-saved-space-saved]
3476 .  nr doc-space-mode \n[doc-space-mode-saved]
3477 .  nr doc-have-space \n[doc-have-space-saved]
3478 .  nr doc-have-slot \n[doc-have-slot-saved]
3479 .  nr doc-keep-type \n[doc-keep-type-saved]
3480 .  nr doc-display-depth \n[doc-display-depth-saved]
3481 .  nr doc-is-compact \n[doc-is-compact-saved]
3482 .
3483 .  nr doc-reg-drgv 0
3484 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3485 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3486 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3487 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3488 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3489 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3490 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3491 .    nr doc-reg-drgv +1
3492 .  \}
3493 .
3494 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3495 .
3496 .  nr doc-reg-drgv 1
3497 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3498 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3499 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3500 .    nr doc-reg-drgv +1
3501 .  \}
3502 .
3503 .  nr doc-list-depth \n[doc-list-depth-saved]
3504 .
3505 .  nr doc-reg-drgv 1
3506 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3507 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3508 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3509 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3510 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3511 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3512 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3513 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3514 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3515 .    nr doc-reg-drgv +1
3516 .  \}
3517 .
3518 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3519 .  nr doc-curr-type \n[doc-curr-type-saved]
3520 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3521 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3522 .  nr doc-num-columns \n[doc-num-columns-saved]
3523 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3524 .  nr doc-is-func \n[doc-is-func-saved]
3525 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3526 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3527 .  ds doc-func-arg "\*[doc-func-arg-saved]
3528 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3529 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3530 .  nr doc-have-func \n[doc-have-func-saved]
3531 .  nr doc-is-reference \n[doc-is-reference-saved]
3532 .  nr doc-reference-count \n[doc-reference-count-saved]
3533 .  nr doc-author-count \n[doc-author-count-saved]
3534 .
3535 .  nr doc-reg-drgv 0
3536 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3537 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3538 .    nr doc-reg-drgv +1
3539 .  \}
3540 .
3541 .  nr doc-book-count \n[doc-book-count-saved]
3542 .  ds doc-book-name "\*[doc-book-name-saved]
3543 .  nr doc-date-count \n[doc-date-count-saved]
3544 .  ds doc-date "\*[doc-date-saved]
3545 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3546 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3547 .  nr doc-journal-count \n[doc-journal-count-saved]
3548 .  ds doc-journal-name "\*[doc-journal-name-saved]
3549 .  nr doc-issue-count \n[doc-issue-count-saved]
3550 .  ds doc-issue-name "\*[doc-issue-name-saved]
3551 .  nr doc-optional-count \n[doc-optional-count-saved]
3552 .  ds doc-optional-string "\*[doc-optional-string-saved]
3553 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3554 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3555 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3556 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3557 .  nr doc-report-count \n[doc-report-count-saved]
3558 .  ds doc-report-name "\*[doc-report-name-saved]
3559 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3560 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3561 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3562 .  nr doc-volume-count \n[doc-volume-count-saved]
3563 .  ds doc-volume-name "\*[doc-volume-name-saved]
3564 .  nr doc-have-author \n[doc-have-author-saved]
3565 .
3566 .  ds doc-document-title "\*[doc-document-title-saved]
3567 .  ds doc-volume "\*[doc-volume-saved]
3568 .  ds doc-section "\*[doc-section-saved]
3569 .  ds doc-operating-system "\*[doc-operating-system-saved]
3570 .  ds doc-date-string "\*[doc-date-string-saved]
3571 .  nr doc-header-space \n[doc-header-space-saved]
3572 .  nr doc-footer-space \n[doc-footer-space-saved]
3573 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3574 .  ds doc-header-string "\*[doc-header-string-saved]
3575 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3576 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3577 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3578 ..
3579 .
3580 .
3581 .\" NS El user macro
3582 .\" NS   end list
3583 .\" NS
3584 .\" NS modifies:
3585 .\" NS   doc-list-depth
3586 .\" NS   doc-macro-name
3587 .\" NS
3588 .\" NS local variables:
3589 .\" NS   doc-str-El
3590 .\" NS
3591 .\" NS width register `El' set in doc-common
3592 .
3593 .de El
3594 .  if \n[.$] \{\
3595 .    tm Usage: .El (does not take arguments) (#\n[.c])
3596 .    return
3597 .  \}
3598 .
3599 .  ds doc-macro-name El
3600 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3601 .
3602 .  ie        "\*[doc-str-El]"diag-list" \
3603 .    doc-end-list 0
3604 .  el \{ .ie "\*[doc-str-El]"column-list" \
3605 .    doc-end-column-list
3606 .  el \{ .ie "\*[doc-str-El]"item-list" \
3607 .    doc-end-list 0
3608 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3609 .    doc-end-list 0
3610 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3611 .    doc-end-list 0
3612 .  el \
3613 .    doc-end-list 1
3614 .  \}\}\}\}
3615 .
3616 .  br
3617 ..
3618 .
3619 .
3620 .\" NS doc-saved-Pa-font global string
3621 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3622 .\" NS   nroff)
3623 .
3624 .ds doc-saved-Pa-font
3625 .
3626 .
3627 .\" NS doc-curr-type global register
3628 .\" NS   current argument type
3629 .
3630 .nr doc-curr-type 0
3631 .
3632 .
3633 .\" NS doc-curr-arg global string
3634 .\" NS   current argument
3635 .
3636 .ds doc-curr-arg
3637 .
3638 .
3639 .\" NS doc-item-boxXXX global box
3640 .\" NS   item boxes associated list depth
3641 .\" NS
3642 .\" NS limit:
3643 .\" NS   doc-list-depth
3644 .
3645 .
3646 .\" NS It user macro
3647 .\" NS   list item
3648 .\" NS
3649 .\" NS modifies:
3650 .\" NS   doc-arg-ptr
3651 .\" NS   doc-argXXX
3652 .\" NS   doc-curr-arg
3653 .\" NS   doc-curr-type
3654 .\" NS   doc-in-list
3655 .\" NS   doc-macro-name
3656 .\" NS   doc-num-args
3657 .\" NS   doc-saved-Pa-font
3658 .\" NS
3659 .\" NS local variables:
3660 .\" NS   doc-reg-It
3661 .\" NS   doc-str-It
3662 .\" NS   doc-XXX-list-type
3663 .\" NS
3664 .\" NS width register `It' set in doc-common
3665 .
3666 .nr doc-bullet-list-type 1
3667 .nr doc-column-list-type 0
3668 .nr doc-dash-list-type 1
3669 .nr doc-diag-list-type 0
3670 .nr doc-enum-list-type 1
3671 .nr doc-hang-list-type 2
3672 .nr doc-inset-list-type 2
3673 .nr doc-item-list-type 1
3674 .nr doc-ohang-list-type 2
3675 .nr doc-tag-list-type 2
3676 .
3677 .de It
3678 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3679 .
3680 .  if "\*[doc-str-It]"" \
3681 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3682 .
3683 .  if \n[doc-nesting-level] \{\
3684 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3685 .    tm1 " (#\n[.c])
3686 .  \}
3687 .
3688 .  br
3689 .  if !\n[cR] \
3690 .    ne 3v
3691 .
3692 .  if \n[.$] \{\
3693 .    ds doc-macro-name It
3694 .
3695 .    \" fill argument vector
3696 .    nr doc-reg-It 1
3697 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3698 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3699 .      nr doc-reg-It +1
3700 .    \}
3701 .
3702 .    nr doc-num-args \n[.$]
3703 .    nr doc-arg-ptr 0
3704 .  \}
3705 .
3706 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3707 .
3708 .  if \n[doc-reg-It] \{\
3709 .    \" start item box
3710 .    box doc-item-box\n[doc-list-depth]
3711 .    ev doc-item-env\n[doc-list-depth]
3712 .    evc 0
3713 .    in 0
3714 .    nf
3715 .  \}
3716 .
3717 .  ie (\n[doc-reg-It] == 1) \{\
3718 .    if \n[.$] \{\
3719 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3720 .      tm1 "              don't take arguments (#\n[.c])
3721 .  \}\}
3722 .  el \{\
3723 .    ie \n[.$] \{\
3724 .      if (\n[doc-reg-It] == 2) \{\
3725 .        \" handle list types with arguments
3726 .        doc-parse-arg-vector
3727 .
3728 .        nr doc-in-list 1
3729 .        nr doc-arg-ptr 1
3730 .        nr doc-curr-type \n[doc-type1]
3731 .        ds doc-curr-arg "\*[doc-arg1]
3732 .
3733 .        if \n[doc-in-files-section] \{\
3734 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3735 .          if n \
3736 .            ds doc-Pa-font "\*[doc-No-font]
3737 .        \}
3738 .
3739 .        ie (\n[doc-type1] == 1) \
3740 .          \*[doc-arg1]
3741 .        el \{\
3742 .          nr doc-arg-ptr 1
3743 .          doc-print-recursive
3744 .    \}\}\}
3745 .    el \{\
3746 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3747 .      tm1 "              require arguments (#\n[.c])
3748 .    \}
3749 .  \}
3750 .
3751 .  \" the previous call of `.doc-print-recursive' can contain calls to
3752 .  \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3753 .  if !\n[doc-nesting-level] \
3754 .    doc-\*[doc-str-It]
3755 ..
3756 .
3757 .
3758 .\" NS doc-inset-list macro
3759 .\" NS   .It item of list-type inset
3760 .\" NS
3761 .\" NS modifies:
3762 .\" NS   doc-in-list
3763 .
3764 .de doc-inset-list
3765 .  \" finish item box
3766 .  br
3767 .  ev
3768 .  box
3769 .  unformat doc-item-box\n[doc-list-depth]
3770 .
3771 .  doc-set-vertical-and-indent 0
3772 .  br
3773 .
3774 .  nh
3775 .  doc-item-box\n[doc-list-depth]
3776 .
3777 .  if \n[doc-in-files-section] \
3778 .    if n \
3779 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3780 .
3781 .  nr doc-in-list 0
3782 .  doc-reset-args
3783 ..
3784 .
3785 .
3786 .\" NS doc-hang-list macro
3787 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3788 .\" NS
3789 .\" NS modifies:
3790 .\" NS   doc-have-space
3791 .\" NS   doc-in-list
3792 .\" NS
3793 .\" NS local variables:
3794 .\" NS   doc-reg-dhl
3795 .\" NS   doc-reg-dhl1
3796 .
3797 .de doc-hang-list
3798 .  \" finish item box
3799 .  br
3800 .  ev
3801 .  box
3802 .  unformat doc-item-box\n[doc-list-depth]
3803 .
3804 .  doc-set-vertical-and-indent 1
3805 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3806 .  ti -\n[doc-reg-dhl]u
3807 .
3808 .  nh
3809 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3810 .    doc-item-box\n[doc-list-depth]
3811 .  el \{\
3812 .    chop doc-item-box\n[doc-list-depth]
3813 .    nr doc-reg-dhl1 \n[.k]u
3814 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3815 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3816 .    nr doc-have-space 1
3817 .  \}
3818 .
3819 .  if \n[doc-in-files-section] \
3820 .    if n \
3821 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3822 .
3823 .  nr doc-in-list 0
3824 .  doc-reset-args
3825 ..
3826 .
3827 .
3828 .\" NS doc-ohang-list macro
3829 .\" NS   .It item of list-type overhanging tag
3830 .\" NS
3831 .\" NS modifies:
3832 .\" NS   doc-in-list
3833 .
3834 .de doc-ohang-list
3835 .  \" finish item box
3836 .  br
3837 .  ev
3838 .  box
3839 .  unformat doc-item-box\n[doc-list-depth]
3840 .
3841 .  doc-set-vertical-and-indent 0
3842 .  nh
3843 .  doc-item-box\n[doc-list-depth]
3844 .  br
3845 .
3846 .  if \n[doc-in-files-section] \
3847 .    if n \
3848 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3849 .
3850 .  nr doc-in-list 0
3851 .  doc-reset-args
3852 ..
3853 .
3854 .
3855 .\" NS doc-item-list macro
3856 .\" NS   .It item of list-type [empty tag]
3857 .
3858 .de doc-item-list
3859 .  \" finish (dummy) item box
3860 .  br
3861 .  ev
3862 .  box
3863 .
3864 .  doc-set-vertical-and-indent 0
3865 .  br
3866 .
3867 .  doc-reset-args
3868 ..
3869 .
3870 .
3871 .\" NS doc-enum-list-count-stackXXX global register
3872 .\" NS   stack of current enum count values
3873 .\" NS
3874 .\" NS limit:
3875 .\" NS   doc-list-depth
3876 .
3877 .nr doc-enum-list-count-stack1 0
3878 .
3879 .
3880 .\" NS doc-enum-list macro
3881 .\" NS   enumerated list
3882 .\" NS
3883 .\" NS modifies:
3884 .\" NS   doc-enum-list-count-stackXXX
3885 .\" NS   doc-in-list
3886 .
3887 .de doc-enum-list
3888 .  nr doc-in-list 1
3889 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3890 \# XXX
3891 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3892 \#.rj
3893 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3894 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3895 .  doc-do-list
3896 ..
3897 .
3898 .
3899 .\" NS doc-bullet-list macro
3900 .\" NS   bullet paragraph list
3901 .\" NS
3902 .\" NS modifies:
3903 .\" NS   doc-in-list
3904 .
3905 .de doc-bullet-list
3906 .  nr doc-in-list 1
3907 .  nop \)\*[doc-Sy-font]\[bu]\f[]
3908 .  doc-do-list
3909 ..
3910 .
3911 .
3912 .\" NS doc-dash-list macro
3913 .\" NS   hyphen paragraph list (sub bullet list)
3914 .\" NS
3915 .\" NS modifies:
3916 .\" NS   doc-in-list
3917 .
3918 .de doc-dash-list
3919 .  nr doc-in-list 1
3920 .  nop \)\*[doc-Sy-font]\-\f[]
3921 .  doc-do-list
3922 ..
3923 .
3924 .
3925 .\" NS doc-do-list macro
3926 .\" NS   .It item of list-type enum/bullet/hyphen
3927 .
3928 .als doc-do-list doc-hang-list
3929 .
3930 .
3931 .\" NS doc-diag-list-input-line-count global register
3932 .\" NS   saved line number to be checked in next diag-list item
3933 .
3934 .nr doc-diag-list-input-line-count 0
3935 .
3936 .
3937 .\" NS doc-diag-list macro
3938 .\" NS   .It item of list-type diagnostic-message
3939 .\" NS
3940 .\" NS modifies:
3941 .\" NS   doc-curr-font
3942 .\" NS   doc-curr-size
3943 .\" NS   doc-diag-list-input-line-count
3944 .
3945 .de doc-diag-list
3946 .  nr doc-curr-font \n[.f]
3947 .  nr doc-curr-size \n[.ps]
3948 .
3949 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3950 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3951 .      doc-paragraph
3952 .    el \
3953 .      br
3954 .  \}
3955 .  el \
3956 .    br
3957 .  nr doc-diag-list-input-line-count \n[.c]
3958 .
3959 .  nh
3960 .  nop \*[doc-Sy-font]\c
3961 .  if \n[doc-num-args] \
3962 .    doc-remaining-args
3963 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3964 .
3965 .  doc-print-and-reset
3966 ..
3967 .
3968 .
3969 .\" NS doc-tag-list macro
3970 .\" NS   .It item of list-type `tag'
3971 .\" NS
3972 .\" NS modifies:
3973 .\" NS   doc-have-space
3974 .\" NS   doc-in-list
3975 .\" NS
3976 .\" NS local variables:
3977 .\" NS   doc-box-dtl
3978 .\" NS   doc-reg-dtl
3979 .\" NS   doc-reg-dtl1
3980 .
3981 .de doc-tag-list
3982 .  \" finish item box
3983 .  br
3984 .  ev
3985 .  box
3986 .  unformat doc-item-box\n[doc-list-depth]
3987 .
3988 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
3989 .  box doc-box-dtl
3990 .  ev doc-env-dtl
3991 .  evc 0
3992 .  fi
3993 .  ad 0
3994 .  in 0
3995 .  doc-item-box\n[doc-list-depth]
3996 .  br
3997 .  ev
3998 .  box
3999 .
4000 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4001 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4002 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4003 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
4004 .    \}
4005 .    doc-get-tag-width
4006 .  \}
4007 .  doc-set-vertical-and-indent 1
4008 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4009 .  ti -\n[doc-reg-dtl]u
4010 .
4011 .  nh
4012 .  doc-item-box\n[doc-list-depth]
4013 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4014 .    br
4015 .  el \{\
4016 .    \" format the tag separately to prevent stretching of spaces
4017 .    vpt 0
4018 .    br
4019 .    sp -1
4020 .    vpt 1
4021 .    nop \&\c
4022 .    nr doc-have-space 1
4023 .  \}
4024 .
4025 .  if \n[doc-in-files-section] \
4026 .    if n \
4027 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
4028 .
4029 .  nr doc-in-list 0
4030 .  doc-reset-args
4031 ..
4032 .
4033 .
4034 .\" NS doc-get-tag-width macro
4035 .\" NS   resolve unknown tag width (`tag' list-type only)
4036 .\" NS
4037 .\" NS modifies:
4038 .\" NS   doc-list-indent-stackXXX
4039 .\" NS   doc-tag-width-stackXXX
4040 .\" NS
4041 .\" NS requires:
4042 .\" NS   doc-curr-arg
4043 .\" NS   doc-curr-type
4044 .
4045 .de doc-get-tag-width
4046 .  ie (\n[doc-curr-type] == 1) \{\
4047 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4048 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4049 .  \}
4050 .  el \{\
4051 .    ds doc-tag-width-stack\n[doc-list-depth] No
4052 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4053 .  \}
4054 ..
4055 .
4056 .
4057 .\" NS doc-set-vertical-and-indent macro
4058 .\" NS   set up vertical spacing (if not compact) and indentation (with
4059 .\" NS   offset if argument is non-zero)
4060 .\" NS
4061 .\" NS modifies:
4062 .\" NS   doc-list-have-indent-stackXXX
4063 .
4064 .de doc-set-vertical-and-indent
4065 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4066 .    sp \n[doc-display-vertical]u
4067 .
4068 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4069 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4070 .    if \$1 \
4071 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4072 .  \}
4073 .
4074 .  if !\n[cR] \
4075 .    ne 2v
4076 ..
4077 .
4078 .
4079 .\" NS doc-list-depth global register
4080 .\" NS   list type stack counter
4081 .
4082 .nr doc-list-depth 0
4083 .
4084 .
4085 .\" NS doc-num-columns global register
4086 .\" NS   number of columns
4087 .
4088 .nr doc-num-columns 0
4089 .
4090 .
4091 .\" NS doc-compact-list-stackXXX global register (bool)
4092 .\" NS   stack of flags to indicate whether a particular list is compact
4093 .\" NS
4094 .\" NS limit:
4095 .\" NS   doc-list-depth
4096 .
4097 .nr doc-compact-list-stack1 0
4098 .
4099 .
4100 .\" NS doc-tag-prefix-stackXXX global string
4101 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4102 .\" NS
4103 .\" NS limit:
4104 .\" NS   doc-list-depth
4105 .
4106 .ds doc-tag-prefix-stack1
4107 .
4108 .
4109 .\" NS doc-tag-width-stackXXX global string
4110 .\" NS   stack of strings indicating how to set up current element of
4111 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4112 .\" NS   directly; if it is a macro name, use the macro's width value;
4113 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4114 .\" NS
4115 .\" NS limit:
4116 .\" NS   doc-list-depth
4117 .
4118 .ds doc-tag-width-stack0
4119 .ds doc-tag-width-stack1
4120 .
4121 .
4122 .\" NS doc-list-offset-stackXXX global register
4123 .\" NS   stack of list offsets
4124 .\" NS
4125 .\" NS limit:
4126 .\" NS   doc-list-depth
4127 .
4128 .nr doc-list-offset-stack1 0
4129 .
4130 .
4131 .\" NS doc-end-list macro
4132 .\" NS   list end function; resets indentation (and offset if argument is
4133 .\" NS   non-zero)
4134 .\" NS
4135 .\" NS modifies:
4136 .\" NS   doc-list-depth
4137 .\" NS   doc-list-offset-stackXXX
4138 .
4139 .de doc-end-list
4140 .  if \$1 \
4141 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4142 .
4143 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4144 .
4145 .  if (\n[doc-list-depth] <= 0) \
4146 .    tm mdoc warning: extraneous .El call (#\n[.c])
4147 .
4148 .  doc-decrement-list-stack
4149 .  nr doc-list-depth -1
4150 ..
4151 .
4152 .
4153 .\" NS doc-increment-list-stack macro
4154 .\" NS   set up next block for list
4155 .\" NS
4156 .\" NS modifies:
4157 .\" NS   doc-compact-list-stackXXX
4158 .\" NS   doc-list-have-indent-stackXXX
4159 .\" NS   doc-list-indent-stackXXX
4160 .\" NS   doc-list-offset-stackXXX
4161 .\" NS   doc-list-type-stackXXX
4162 .\" NS   doc-tag-prefix-stackXXX
4163 .\" NS   doc-tag-width-stackXXX
4164 .\" NS   doc-enum-list-count-stackXXX
4165 .\" NS
4166 .\" NS local variables:
4167 .\" NS   doc-reg-dils
4168 .
4169 .de doc-increment-list-stack
4170 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4171 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4172 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4173 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4174 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4175 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4176 .  ds doc-list-type-stack\n[doc-reg-dils]
4177 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4178 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4179 ..
4180 .
4181 .
4182 .\" NS doc-decrement-list-stack macro
4183 .\" NS   decrement stack
4184 .\" NS
4185 .\" NS modifies:
4186 .\" NS   doc-compact-list-stackXXX
4187 .\" NS   doc-list-have-indent-stackXXX
4188 .\" NS   doc-list-indent-stackXXX
4189 .\" NS   doc-list-offset-stackXXX
4190 .\" NS   doc-list-type-stackXXX
4191 .\" NS   doc-tag-prefix-stackXXX
4192 .\" NS   doc-tag-width-stackXXX
4193 .\" NS   doc-enum-list-count-stackXXX
4194 .
4195 .de doc-decrement-list-stack
4196 .  ds doc-list-type-stack\n[doc-list-depth]
4197 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4198 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4199 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4200 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4201 .  ds doc-tag-width-stack\n[doc-list-depth]
4202 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4203 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4204 ..
4205 .
4206 .
4207 .\" NS Xr user macro
4208 .\" NS   cross reference (for man pages only)
4209 .\" NS
4210 .\" NS modifies:
4211 .\" NS   doc-arg-ptr
4212 .\" NS   doc-macro-name
4213 .\" NS
4214 .\" NS local variables:
4215 .\" NS   doc-reg-Xr
4216 .\" NS
4217 .\" NS width register `Xr' set in doc-common
4218 .
4219 .de Xr
4220 .  if !\n[doc-arg-limit] \{\
4221 .    ie \n[.$] \{\
4222 .      ds doc-macro-name Xr
4223 .      doc-parse-args \$@
4224 .    \}
4225 .    el \
4226 .      doc-Xr-usage
4227 .  \}
4228 .
4229 .  if !\n[doc-arg-limit] \
4230 .    return
4231 .
4232 .  nr doc-arg-ptr +1
4233 .  doc-print-prefixes
4234 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4235 .    \" first argument must be a string
4236 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4237 .      nr doc-curr-font \n[.f]
4238 .      nr doc-curr-size \n[.ps]
4239 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4240 .
4241 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4242 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4243 .        \" modify second argument if it is a string and
4244 .        \" remove space inbetween
4245 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4246 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4247 .          ds doc-space\n[doc-arg-ptr]
4248 .        \}
4249 .      \}
4250 .      doc-print-recursive
4251 .    \}
4252 .    el \
4253 .      doc-Xr-usage
4254 .  \}
4255 .  el \
4256 .    doc-Xr-usage
4257 ..
4258 .
4259 .
4260 .\" NS doc-Xr-usage macro
4261 .
4262 .de doc-Xr-usage
4263 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4264 .  doc-reset-args
4265 ..
4266 .
4267 .
4268 .\" NS Sx user macro
4269 .\" NS   cross section reference
4270 .\" NS
4271 .\" NS width register `Sx' set in doc-common
4272 .
4273 .als Sx doc-generic-macro
4274 .ds doc-Sx-usage section_header
4275 .
4276 .
4277 .\" NS doc-end-column-list macro
4278 .\" NS   column-list end-list
4279 .\" NS
4280 .\" NS modifies:
4281 .\" NS   doc-list-depth
4282 .
4283 .de doc-end-column-list
4284 .  linetabs 0
4285 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4286 .  ta T .5i
4287 .  fi
4288 .  doc-decrement-list-stack
4289 .  nr doc-list-depth -1
4290 ..
4291 .
4292 .
4293 .\" NS doc-column-indent-width global register
4294 .\" NS   holds the indent width for a column list
4295 .
4296 .nr doc-column-indent-width 0
4297 .
4298 .
4299 .\" NS doc-set-column-tab macro
4300 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4301 .\" NS
4302 .\" NS modifies:
4303 .\" NS   doc-column-indent-width
4304 .\" NS
4305 .\" NS local variables:
4306 .\" NS   doc-reg-dsct
4307 .\" NS   doc-str-dsct
4308 .\" NS   doc-str-dsct1
4309 .
4310 .de doc-set-column-tab
4311 .  ds doc-str-dsct
4312 .  nr doc-reg-dsct 1
4313 .  nr doc-column-indent-width 0
4314 .
4315 .  ie (\$1 < 5) \
4316 .    ds doc-str-dsct1 "    \"
4317 .  el \{\
4318 .    ie (\$1 == 5) \
4319 .      ds doc-str-dsct1 "   \"
4320 .    el \{\
4321 .      \" XXX: this is packed abnormally close -- intercolumn width
4322 .      \"      should be configurable
4323 .      ds doc-str-dsct1 " \"
4324 .  \}\}
4325 .
4326 .  while (\n[doc-reg-dsct] <= \$1) \{\
4327 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4328 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4329 .    nr doc-reg-dsct +1
4330 .  \}
4331 .
4332 .  ta \*[doc-str-dsct]
4333 '  in +\n[doc-column-indent-width]u
4334 ..
4335 .
4336 .
4337 .\" NS doc-column-list macro
4338 .\" NS   column items
4339 .\" NS
4340 .\" NS modifies:
4341 .\" NS   doc-arg-ptr
4342 .\" NS   doc-list-indent-stackXXX
4343 .\" NS   doc-spaceXXX
4344 .\" NS
4345 .\" NS local variables:
4346 .\" NS   doc-reg-dcl
4347 .
4348 .de doc-column-list
4349 .  if \n[doc-num-args] \
4350 .    doc-parse-arg-vector
4351 .  nr doc-arg-ptr +1
4352 .
4353 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4354 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4355 .    return
4356 .  \}
4357 .
4358 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4359 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4360 .    ds doc-space\n[doc-reg-dcl]
4361 .  \}
4362 .
4363 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4364 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4365 .  if !\n[.u] \{\
4366 .    fi
4367 .    in +\n[doc-column-indent-width]u
4368 .  \}
4369 .  ti -\n[doc-column-indent-width]u
4370 .
4371 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4372 ..
4373 .
4374 .
4375 .\" NS Ta user macro
4376 .\" NS   append tab (\t)
4377 .\" NS
4378 .\" NS modifies:
4379 .\" NS   doc-arg-ptr
4380 .\" NS
4381 .\" NS width register `Ta' set in doc-common
4382 .
4383 .de Ta
4384 .  ie \n[doc-arg-limit] \{\
4385 .    nr doc-arg-ptr +1
4386 .    nop \*[doc-tab]\c
4387 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4388 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4389 .    el \
4390 .      doc-reset-args
4391 .  \}
4392 .  el \{\
4393 .    tm1 "Usage: Ta must follow column entry: e.g.
4394 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4395 .  \}
4396 ..
4397 .
4398 .
4399 .\" NS Dl user macro
4400 .\" NS   display (one line) literal
4401 .\" NS
4402 .\" NS   this function uses the `Li' font
4403 .\" NS
4404 .\" NS modifies:
4405 .\" NS   doc-arg-ptr
4406 .\" NS   doc-curr-font
4407 .\" NS   doc-curr-size
4408 .\" NS   doc-macro-name
4409 .\" NS
4410 .\" NS width register `Dl' set in doc-common
4411 .
4412 .de Dl
4413 .  ta T .5i
4414 .  in +\n[doc-display-indent]u
4415 .
4416 .  ie \n[doc-arg-limit] \{\
4417 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4418 .    doc-reset-args
4419 .  \}
4420 .  el \{\
4421 .    ie \n[.$] \{\
4422 .      ds doc-macro-name Dl
4423 .      doc-parse-args \$@
4424 .      nr doc-arg-ptr 1
4425 .      nr doc-curr-font \n[.f]
4426 .      nr doc-curr-size \n[.ps]
4427 .      nop \*[doc-Li-font]\c
4428 .      doc-print-recursive
4429 .    \}
4430 .    el \
4431 .      tm Usage: .Dl argument ... (#\n[.c])
4432 .  \}
4433 .
4434 .  in -\n[doc-display-indent]u
4435 ..
4436 .
4437 .
4438 .\" NS D1 user macro
4439 .\" NS   display (one line)
4440 .\" NS
4441 .\" NS modifies:
4442 .\" NS   doc-arg-ptr
4443 .\" NS   doc-macro-name
4444 .\" NS
4445 .\" NS width register `D1' set in doc-common
4446 .
4447 .de D1
4448 .  ta T .5i
4449 .  in +\n[doc-display-indent]u
4450 .
4451 .  ie \n[doc-arg-limit] \{\
4452 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4453 .    doc-reset-args
4454 .  \}
4455 .  el \{\
4456 .    ie \n[.$] \{\
4457 .      ds doc-macro-name D1
4458 .      doc-parse-args \$@
4459 .      nr doc-arg-ptr 1
4460 .      doc-print-recursive
4461 .    \}
4462 .    el \
4463 .      tm Usage: .D1 argument ... (#\n[.c])
4464 .  \}
4465 .
4466 .  in -\n[doc-display-indent]u
4467 ..
4468 .
4469 .
4470 .\" NS Vt user macro
4471 .\" NS   variable type (for forcing old style variable declarations);
4472 .\" NS   this is not done in the same manner as .Ot for fortrash --
4473 .\" NS   clean up later
4474 .\" NS
4475 .\" NS modifies:
4476 .\" NS   doc-curr-font
4477 .\" NS   doc-curr-size
4478 .\" NS   doc-have-decl
4479 .\" NS   doc-have-var
4480 .\" NS   doc-macro-name
4481 .\" NS
4482 .\" NS width register `Vt' set in doc-common
4483 .
4484 .de Vt
4485 .  if !\n[doc-arg-limit] \{\
4486 .    ie \n[.$] \{\
4487 .      ds doc-macro-name Vt
4488 .      doc-parse-args \$@
4489 .    \}
4490 .    el \
4491 .      tm Usage: .Vt variable_type ... (#\n[.c])
4492 .  \}
4493 .
4494 .  if !\n[doc-arg-limit] \
4495 .    return
4496 .
4497 .  nr doc-arg-ptr +1
4498 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4499 .    tm Usage: .Vt variable_type ... (#\n[.c])
4500 .    doc-reset-args
4501 .    return
4502 .  \}
4503 .
4504 .  if \n[doc-in-synopsis-section] \{\
4505 .    \" if a function declaration was the last thing given,
4506 .    \" want vertical space
4507 .    if \n[doc-have-decl] \{\
4508 .      doc-paragraph
4509 .      nr doc-have-decl 0
4510 .    \}
4511 .
4512 .    \" if a subroutine was the last thing given, want vertical space
4513 .    if \n[doc-have-func] \{\
4514 .      ie \n[doc-have-var] \
4515 .        br
4516 .      el \
4517 .        doc-paragraph
4518 .    \}
4519 .
4520 .    nr doc-have-var 1
4521 .  \}
4522 .
4523 .  nr doc-curr-font \n[.f]
4524 .  nr doc-curr-size \n[.ps]
4525 .  nop \*[doc-Ft-font]\c
4526 .  doc-print-recursive
4527 .
4528 .  if \n[doc-in-synopsis-section] \{\
4529 .    ie \n[doc-have-old-func] \
4530 .      nop \*[doc-soft-space]\c
4531 .    el \
4532 .      br
4533 .  \}
4534 ..
4535 .
4536 .
4537 .\" NS doc-is-func global register (bool)
4538 .\" NS   set if subroutine (in synopsis only) (fortran only)
4539 .
4540 .nr doc-is-func 0
4541 .
4542 .
4543 .\" NS Ft user macro
4544 .\" NS   function type
4545 .\" NS
4546 .\" NS modifies:
4547 .\" NS   doc-curr-font
4548 .\" NS   doc-curr-size
4549 .\" NS   doc-have-decl
4550 .\" NS   doc-have-var
4551 .\" NS   doc-is-func
4552 .\" NS   doc-macro-name
4553 .\" NS
4554 .\" NS width register `Ft' set in doc-common
4555 .
4556 .de Ft
4557 .  if !\n[doc-arg-limit] \{\
4558 .    ie \n[.$] \{\
4559 .      ds doc-macro-name Ft
4560 .      doc-parse-args \$@
4561 .    \}
4562 .    el \
4563 .      tm Usage: .Ft function_type ... (#\n[.c])
4564 .  \}
4565 .
4566 .  if !\n[doc-arg-limit] \
4567 .    return
4568 .
4569 .  nr doc-arg-ptr +1
4570 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4571 .    tm Usage: .Ft function_type ... (#\n[.c])
4572 .    doc-reset-args
4573 .    return
4574 .  \}
4575 .
4576 .  if \n[doc-in-synopsis-section] \{\
4577 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4578 .      doc-paragraph
4579 .      nr doc-have-decl 0
4580 .      nr doc-have-var 0
4581 .    \}
4582 .
4583 .    if \n[doc-have-var] \{\
4584 .      doc-paragraph
4585 .      nr doc-have-var 0
4586 .    \}
4587 .
4588 .    nr doc-is-func 1
4589 .  \}
4590 .
4591 .  nr doc-curr-font \n[.f]
4592 .  nr doc-curr-size \n[.ps]
4593 .  nop \*[doc-Ft-font]\c
4594 .  doc-print-recursive
4595 ..
4596 .
4597 .
4598 .\" NS doc-have-old-func global register (bool)
4599 .\" NS   set if `Ot' has been called
4600 .
4601 .nr doc-have-old-func 0
4602 .
4603 .
4604 .\" NS Ot user macro
4605 .\" NS   old function type (fortran -- no newline)
4606 .\" NS
4607 .\" NS modifies:
4608 .\" NS   doc-have-decl
4609 .\" NS   doc-have-old-func
4610 .\" NS   doc-have-var
4611 .\" NS   doc-is-func
4612 .\" NS
4613 .\" NS width register `Ot' set in doc-common
4614 .
4615 .de Ot
4616 .  nr doc-have-old-func 1
4617 .
4618 .  if \n[doc-in-synopsis-section] \{\
4619 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4620 .      doc-paragraph
4621 .      nr doc-have-decl 0
4622 .      nr doc-have-var 0
4623 .    \}
4624 .
4625 .    if \n[doc-have-var] \{\
4626 .      doc-paragraph
4627 .      nr doc-have-var 0
4628 .    \}
4629 .
4630 .    nr doc-is-func 1
4631 .  \}
4632 .
4633 .  if \n[.$] \
4634 .    nop \*[doc-Ft-font]\$*\c
4635 .  nop \ \f[]\c
4636 ..
4637 .
4638 .
4639 .\" NS Fa user macro
4640 .\" NS   function arguments
4641 .\" NS
4642 .\" NS modifies:
4643 .\" NS   doc-arg-ptr
4644 .\" NS   doc-curr-font
4645 .\" NS   doc-curr-size
4646 .\" NS   doc-macro-name
4647 .\" NS
4648 .\" NS width register `Fa' set in doc-common
4649 .
4650 .de Fa
4651 .  if !\n[doc-arg-limit] \{\
4652 .    ie \n[.$] \{\
4653 .      ds doc-macro-name Fa
4654 .      doc-parse-args \$@
4655 .    \}
4656 .    el \
4657 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4658 .  \}
4659 .
4660 .  ie \n[doc-func-arg-count] \
4661 .    doc-do-func
4662 .  el \{\
4663 .    nr doc-arg-ptr +1
4664 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4665 .      nr doc-curr-font \n[.f]
4666 .      nr doc-curr-size \n[.ps]
4667 .      nop \*[doc-Fa-font]\c
4668 .      doc-print-recursive
4669 .
4670 .      if \n[doc-in-synopsis-section] \
4671 .        if \n[doc-have-func] \
4672 .          br
4673 .  \}\}
4674 ..
4675 .
4676 .
4677 .\" NS doc-func-arg-count global register
4678 .\" NS   how many function arguments have been processed so far
4679 .
4680 .nr doc-func-arg-count 0
4681 .
4682 .
4683 .\" NS doc-func-arg global string
4684 .\" NS   work buffer for function name strings
4685 .
4686 .ds doc-func-arg
4687 .
4688 .
4689 .\" NS doc-num-func-args global register
4690 .\" NS   number of function arguments
4691 .
4692 .nr doc-num-func-args 0
4693 .
4694 .
4695 .\" NS doc-func-args-processed global register
4696 .\" NS   function arguments processed so far
4697 .
4698 .nr doc-func-args-processed 0
4699 .
4700 .
4701 .\" NS doc-do-func macro
4702 .\" NS   internal .Fa for .Fc
4703 .\" NS
4704 .\" NS modifies:
4705 .\" NS   doc-arg-ptr
4706 .\" NS   doc-argXXX
4707 .\" NS   doc-func-arg
4708 .\" NS   doc-func-arg-count
4709 .\" NS   doc-func-args-processed
4710 .\" NS   doc-num-func-args
4711 .
4712 .de doc-do-func
4713 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4714 .    doc-reset-args
4715 .    return
4716 .  \}
4717 .
4718 .  nr doc-arg-ptr +1
4719 .
4720 .  ds doc-func-arg
4721 .  nr doc-num-func-args 0
4722 .  nr doc-func-args-processed 0
4723 .
4724 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4725 .  if (\n[doc-num-func-args] > 1) \
4726 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4727 .
4728 .  if (\n[doc-func-arg-count] > 1) \{\
4729 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4730 .    if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4731 .      if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4732 .        nop ,\)\c
4733 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4734 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4735 .  \}
4736 .
4737 .  if (\n[doc-func-arg-count] == 1) \{\
4738 .    nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4739 .    nop \f[]\s[0]\c
4740 .  \}
4741 .  nr doc-func-arg-count +1
4742 .  doc-do-func
4743 ..
4744 .
4745 .
4746 .\" NS doc-have-func global register (bool)
4747 .\" NS   whether we have more than one function in synopsis
4748 .
4749 .nr doc-have-func 0
4750 .
4751 .
4752 .\" NS Fn user macro
4753 .\" NS   functions
4754 .\" NS
4755 .\" NS modifies:
4756 .\" NS   doc-arg-ptr
4757 .\" NS   doc-curr-font
4758 .\" NS   doc-curr-size
4759 .\" NS   doc-have-decl
4760 .\" NS   doc-have-func
4761 .\" NS   doc-have-var
4762 .\" NS   doc-indent-synopsis
4763 .\" NS   doc-is-func
4764 .\" NS   doc-macro-name
4765 .\" NS
4766 .\" NS width register `Fn' set in doc-common
4767 .
4768 .de Fn
4769 .  if !\n[doc-arg-limit] \{\
4770 .    ie \n[.$] \{\
4771 .      ds doc-macro-name Fn
4772 .      doc-parse-args \$@
4773 .    \}
4774 .    el \
4775 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4776 .  \}
4777 .
4778 .  if !\n[doc-arg-limit] \
4779 .    return
4780 .
4781 .  if \n[doc-in-synopsis-section] \{\
4782 .    \" if there is/has been more than one subroutine declaration
4783 .    ie \n[doc-is-func] \{\
4784 .      br
4785 .      nr doc-have-var 0
4786 .      nr doc-have-decl 0
4787 .      nr doc-is-func 0
4788 .    \}
4789 .    el \{\
4790 .      if \n[doc-have-func] \{\
4791 .        doc-paragraph
4792 .        nr doc-have-var 0
4793 .        nr doc-have-decl 0
4794 .    \}\}
4795 .
4796 .    if \n[doc-have-decl] \{\
4797 .      doc-paragraph
4798 .      nr doc-have-var 0
4799 .    \}
4800 .
4801 .    if \n[doc-have-var] \{\
4802 .      doc-paragraph
4803 .      nr doc-have-decl 0
4804 .    \}
4805 .
4806 .    nr doc-have-func 1
4807 .    nr doc-is-func 0
4808 .
4809 .    br
4810 .    if !\n[doc-indent-synopsis] \
4811 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4812 .    if !\n[doc-indent-synopsis-active] \
4813 .      in +\n[doc-indent-synopsis]u
4814 .    ti -\n[doc-indent-synopsis]u
4815 .  \}
4816 .
4817 .  nr doc-arg-ptr +1
4818 .  doc-print-prefixes
4819 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4820 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4821 .    doc-reset-args
4822 .    return
4823 .  \}
4824 .
4825 .  nr doc-curr-font \n[.f]
4826 .  nr doc-curr-size \n[.ps]
4827 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4828 .  nop \f[]\s[0]\*[lp]\)\c
4829 .
4830 .  nr doc-arg-ptr +1
4831 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4832 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4833 .      nop \*[doc-Fa-font]\c
4834 .      doc-do-func-args
4835 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4836 .  \}\}
4837 .
4838 .  nop \)\*[rp]\)\c
4839 .  if \n[doc-in-synopsis-section] \
4840 .    nop \);\)\c
4841 .
4842 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4843 .    \" output the space (if needed)
4844 .    nr doc-arg-ptr -1
4845 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4846 .    nr doc-arg-ptr +1
4847 .
4848 .    doc-print-recursive
4849 .  \}
4850 .  el \
4851 .    doc-print-and-reset
4852 .
4853 .  if \n[doc-in-synopsis-section] \
4854 .    if !\n[doc-indent-synopsis-active] \
4855 .      in -\n[doc-indent-synopsis]u
4856 ..
4857 .
4858 .
4859 .\" NS doc-do-func-args macro
4860 .\" NS   handle function arguments
4861 .\" NS
4862 .\" NS modifies:
4863 .\" NS   doc-arg-ptr
4864 .\" NS   doc-argXXX
4865 .\" NS   doc-func-arg
4866 .\" NS   doc-func-args-processed
4867 .\" NS   doc-num-func-args
4868 .\" NS
4869 .\" NS local variables:
4870 .\" NS   doc-reg-ddfa
4871 .
4872 .de doc-do-func-args
4873 .  if \n[doc-in-synopsis-section] \{\
4874 .    ds doc-func-arg
4875 .    nr doc-num-func-args 0
4876 .    nr doc-func-args-processed 0
4877 .
4878 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4879 .    if (\n[doc-num-func-args] > 1) \
4880 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4881 .  \}
4882 .
4883 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4884 .  nr doc-arg-ptr +1
4885 .
4886 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4887 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4888 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4889 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4890 .      if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4891 .        if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4892 .          nop ,\)\c
4893 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4894 .      doc-do-func-args
4895 .  \}\}
4896 ..
4897 .
4898 .
4899 .\" NS doc-saved-nesting-level global register
4900 .
4901 .nr doc-saved-nesting-level 0
4902 .
4903 .
4904 .\" NS doc-in-func-enclosure global register (bool)
4905 .
4906 .nr doc-in-func-enclosure 0
4907 .
4908 .
4909 .\" NS Fo user macro
4910 .\" NS   function open
4911 .\" NS
4912 .\" NS modifies:
4913 .\" NS   doc-arg-ptr
4914 .\" NS   doc-curr-font
4915 .\" NS   doc-curr-size
4916 .\" NS   doc-func-arg-count
4917 .\" NS   doc-have-decl
4918 .\" NS   doc-have-func
4919 .\" NS   doc-have-var
4920 .\" NS   doc-in-func-enclosure
4921 .\" NS   doc-indent-synopsis
4922 .\" NS   doc-is-func
4923 .\" NS   doc-macro-name
4924 .\" NS   doc-saved-nesting-level
4925 .\" NS
4926 .\" NS width register `Fo' set in doc-common
4927 .
4928 .de Fo
4929 .  if (\n[doc-in-func-enclosure]) \{\
4930 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4931 .    return
4932 .  \}
4933 .
4934 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4935 .  nr doc-in-func-enclosure 1
4936 .
4937 .  if !\n[doc-arg-limit] \{\
4938 .    ie \n[.$] \{\
4939 .      ds doc-macro-name Fo
4940 .      doc-parse-args \$@
4941 .    \}
4942 .    el \
4943 .      tm Usage: .Fo function_name (#\n[.c])
4944 .  \}
4945 .
4946 .  if \n[doc-in-synopsis-section] \{\
4947 .    \" if there is/has been more than one subroutine declaration
4948 .    ie \n[doc-is-func] \{\
4949 .      br
4950 .      nr doc-have-var 0
4951 .      nr doc-have-decl 0
4952 .      nr doc-is-func 0
4953 .    \}
4954 .    el \{\
4955 .      if \n[doc-have-func] \{\
4956 .        doc-paragraph
4957 .        nr doc-have-var 0
4958 .        nr doc-have-decl 0
4959 .    \}\}
4960 .
4961 .    if \n[doc-have-decl] \{\
4962 .      doc-paragraph
4963 .      nr doc-have-var 0
4964 .    \}
4965 .
4966 .    if \n[doc-have-var] \{\
4967 .      doc-paragraph
4968 .      nr doc-have-decl 0
4969 .    \}
4970 .
4971 .    nr doc-have-func 1
4972 .    nr doc-is-func 0
4973 .
4974 .    br
4975 .    if !\n[doc-indent-synopsis] \
4976 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4977 .  \}
4978 .
4979 .  \" start function box
4980 .  box doc-func-box
4981 .  ev doc-func-env
4982 .  evc 0
4983 .  in 0
4984 .  nf
4985 .
4986 .  nr doc-arg-ptr +1
4987 .  doc-print-prefixes
4988 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4989 .    nr doc-func-arg-count 1
4990 .    nr doc-curr-font \n[.f]
4991 .    nr doc-curr-size \n[.ps]
4992 .
4993 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4994 .    nop \f[]\s[0]\*[lp]\)\c
4995 .    doc-reset-args
4996 .  \}
4997 ..
4998 .
4999 .
5000 .\" NS Fc user macro
5001 .\" NS   function close
5002 .\" NS
5003 .\" NS modifies:
5004 .\" NS   doc-arg-ptr
5005 .\" NS   doc-func-arg-count
5006 .\" NS   doc-in-func-enclosure
5007 .\" NS   doc-saved-nesting-level
5008 .\" NS   doc-macro-name
5009 .\" NS
5010 .\" NS width register `Fc' set in doc-common
5011 .
5012 .de Fc
5013 .  if !\n[doc-in-func-enclosure] \{\
5014 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
5015 .    return
5016 .  \}
5017 .
5018 .  if \n[.$] \{\
5019 .    ds doc-macro-name Fc
5020 .    \" the first (dummy) argument is used to get the correct spacing
5021 .    doc-parse-args \) \$@
5022 .  \}
5023 .
5024 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5025 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5026 .
5027 .  nr doc-func-arg-count 0
5028 .  nr doc-in-func-enclosure 0
5029 .
5030 .  ie \n[doc-in-synopsis-section] \
5031 .    nop \|\*[rp];\)
5032 .  el \
5033 .    nop \|\*[rp]\)
5034 .
5035 .  \" finish function box
5036 .  br
5037 .  ev
5038 .  box
5039 .  chop doc-func-box
5040 .  unformat doc-func-box
5041 .
5042 .  if \n[doc-in-synopsis-section] \{\
5043 .    if !\n[doc-indent-synopsis-active] \
5044 .      in +\n[doc-indent-synopsis]u
5045 .    ti -\n[doc-indent-synopsis]u
5046 .  \}
5047 .
5048 .  nh
5049 .  nop \*[doc-func-box]\c
5050 .
5051 .  nr doc-arg-ptr +1
5052 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5053 .    nr doc-curr-font \n[.f]
5054 .    nr doc-curr-size \n[.ps]
5055 .    doc-print-recursive
5056 .  \}
5057 .  el \
5058 .    doc-print-and-reset
5059 .
5060 .  if \n[doc-in-synopsis-section] \
5061 .    if !\n[doc-indent-synopsis-active] \
5062 .      in -\n[doc-indent-synopsis]u
5063 ..
5064 .
5065 .
5066 .\" NS doc-build-func-string macro
5067 .\" NS   collect function arguments and set hard spaces inbetween
5068 .\" NS
5069 .\" NS modifies:
5070 .\" NS   doc-func-arg
5071 .\" NS   doc-func-args-processed
5072 .\" NS   doc-num-func-args
5073 .
5074 .de doc-build-func-string
5075 .  if !\n[doc-num-func-args] \{\
5076 .    nr doc-num-func-args \n[.$]
5077 .    nr doc-func-args-processed 0
5078 .    ds doc-func-arg
5079 .  \}
5080 .
5081 .  nr doc-func-args-processed +1
5082 .  as doc-func-arg "\$1
5083 .
5084 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5085 .    as doc-func-arg "\*[doc-hard-space]
5086 .
5087 .    shift
5088 .    doc-build-func-string \$@
5089 .  \}
5090 ..
5091 .
5092 .
5093 .\" Very crude references: Stash all reference info into boxes, print out
5094 .\" reference on .Re macro and clean up.  Ordering very limited, no fancy
5095 .\" citations, but can do articles, journals, and books -- need to add
5096 .\" several missing options (like city etc).  Should be able to grab a refer
5097 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5098 .\" (ha!).
5099 .
5100 .
5101 .\" NS doc-is-reference global register (bool)
5102 .\" NS   set if in reference
5103 .
5104 .nr doc-is-reference 0
5105 .
5106 .
5107 .\" NS doc-reference-count global register
5108 .\" NS   reference element counter
5109 .
5110 .nr doc-reference-count 0
5111 .
5112 .
5113 .\" NS Rs user macro
5114 .\" NS   reference start
5115 .\" NS
5116 .\" NS modifies:
5117 .\" NS   doc-is-reference
5118 .\" NS   doc-reference-count
5119 .\" NS
5120 .\" NS width register `Rs' set in doc-common
5121 .
5122 .de Rs
5123 .  ie \n[.$] \
5124 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5125 .  el \{\
5126 .    nr doc-is-reference 1
5127 .    doc-reset-reference
5128 .    if \n[doc-in-see-also-section] \
5129 .      doc-paragraph
5130 .    nr doc-reference-count 0
5131 .  \}
5132 ..
5133 .
5134 .
5135 .\" NS Re user macro
5136 .\" NS   reference end
5137 .\" NS
5138 .\" NS modifies:
5139 .\" NS   doc-is-reference
5140 .\" NS
5141 .\" NS width register `Re' set in doc-common
5142 .
5143 .de Re
5144 .  ie \n[.$] \
5145 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5146 .  el \{\
5147 .    doc-print-reference
5148 .    doc-reset-reference
5149 .    nr doc-is-reference 0
5150 .  \}
5151 ..
5152 .
5153 .
5154 .\" NS doc-reset-reference macro
5155 .\" NS   reference cleanup
5156 .\" NS
5157 .\" NS modifies:
5158 .\" NS   doc-author-count
5159 .\" NS   doc-author-nameXXX
5160 .\" NS   doc-book-count
5161 .\" NS   doc-book-name
5162 .\" NS   doc-corporate-count
5163 .\" NS   doc-corporate-name
5164 .\" NS   doc-date
5165 .\" NS   doc-date-count
5166 .\" NS   doc-issue-count
5167 .\" NS   doc-issue-name
5168 .\" NS   doc-journal-count
5169 .\" NS   doc-journal-name
5170 .\" NS   doc-optional-count
5171 .\" NS   doc-optional-string
5172 .\" NS   doc-page-number-count
5173 .\" NS   doc-page-number-string
5174 .\" NS   doc-publisher-count
5175 .\" NS   doc-publisher-name
5176 .\" NS   doc-reference-count
5177 .\" NS   doc-reference-title-count
5178 .\" NS   doc-reference-title-name
5179 .\" NS   doc-reference-title-name-for-book
5180 .\" NS   doc-report-count
5181 .\" NS   doc-report-name
5182 .\" NS   doc-volume-count
5183 .\" NS   doc-volume-name
5184 .
5185 .de doc-reset-reference
5186 .  while (\n[doc-author-count]) \{\
5187 .    ds doc-author-name\n[doc-author-count]
5188 .    nr doc-author-count -1
5189 .  \}
5190 .  nr doc-journal-count 0
5191 .  nr doc-issue-count 0
5192 .  nr doc-optional-count 0
5193 .  nr doc-corporate-count 0
5194 .  nr doc-report-count 0
5195 .  nr doc-reference-title-count 0
5196 .  nr doc-volume-count 0
5197 .  nr doc-date-count 0
5198 .  nr doc-page-number-count 0
5199 .  nr doc-book-count 0
5200 .  nr doc-publisher-count 0
5201 .  nr doc-reference-count 0
5202 .
5203 .  ds doc-journal-name
5204 .  ds doc-issue-name
5205 .  ds doc-optional-string
5206 .  ds doc-corporate-name
5207 .  ds doc-report-name
5208 .  ds doc-reference-title-name
5209 .  ds doc-reference-title-name-for-book
5210 .  ds doc-volume-name
5211 .  ds doc-date
5212 .  ds doc-page-number-string
5213 .  ds doc-book-name
5214 .  ds doc-publisher-name
5215 ..
5216 .
5217 .
5218 .\" NS doc-finish-reference macro
5219 .\" NS   auxiliary macro for doc-print-reference
5220 .\" NS
5221 .\" NS modifies:
5222 .\" NS   doc-reference-count
5223 .
5224 .de doc-finish-reference
5225 .  nr doc-reference-count -1
5226 .  ie \n[doc-reference-count] \
5227 .    nop \),
5228 .  el \
5229 .    nop \).
5230 ..
5231 .
5232 .
5233 .\" NS doc-print-reference macro
5234 .\" NS   reference print
5235 .\" NS
5236 .\" NS modifies:
5237 .\" NS   doc-reference-count
5238 .
5239 .de doc-print-reference
5240 .
5241 .  nh
5242 .
5243 .  if \n[doc-author-count] \{\
5244 .    doc-print-reference-authors
5245 .    nr doc-reference-count -\n[doc-author-count]
5246 .  \}
5247 .
5248 .  if \n[doc-reference-title-count] \{\
5249 .    unformat doc-reference-title-name
5250 .    chop doc-reference-title-name
5251 .    unformat doc-reference-title-name-for-book
5252 .    chop doc-reference-title-name-for-book
5253 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5254 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5255 .      doc-finish-reference
5256 .    \}
5257 .    el \{\
5258 .      nop \*[doc-reference-title-name]\c
5259 .      doc-finish-reference
5260 .  \}\}
5261 .
5262 .  if \n[doc-book-count] \{\
5263 .    unformat doc-book-name
5264 .    chop doc-book-name
5265 .    nop \*[doc-book-name]\c
5266 .    doc-finish-reference
5267 .  \}
5268 .
5269 .  if \n[doc-publisher-count] \{\
5270 .    unformat doc-publisher-name
5271 .    chop doc-publisher-name
5272 .    nop \*[doc-publisher-name]\c
5273 .    doc-finish-reference
5274 .  \}
5275 .
5276 .  if \n[doc-journal-count] \{\
5277 .    unformat doc-journal-name
5278 .    chop doc-journal-name
5279 .    nop \*[doc-journal-name]\c
5280 .    doc-finish-reference
5281 .  \}
5282 .
5283 .  if \n[doc-report-count] \{\
5284 .    unformat doc-report-name
5285 .    chop doc-report-name
5286 .    nop \*[doc-report-name]\c
5287 .    doc-finish-reference
5288 .  \}
5289 .
5290 .  if \n[doc-issue-count] \{\
5291 .    unformat doc-issue-name
5292 .    chop doc-issue-name
5293 .    nop \*[doc-issue-name]\c
5294 .    doc-finish-reference
5295 .  \}
5296 .
5297 .  if \n[doc-volume-count] \{\
5298 .    unformat doc-volume-name
5299 .    chop doc-volume-name
5300 .    nop \*[doc-volume-name]\c
5301 .    doc-finish-reference
5302 .  \}
5303 .
5304 .  if \n[doc-page-number-count] \{\
5305 .    unformat doc-page-number-string
5306 .    chop doc-page-number-string
5307 .    nop \*[doc-page-number-string]\c
5308 .    doc-finish-reference
5309 .  \}
5310 .
5311 .  if \n[doc-corporate-count] \{\
5312 .    unformat doc-corporate-name
5313 .    chop doc-corporate-name
5314 .    nop \*[doc-corporate-name]\c
5315 .    doc-finish-reference
5316 .  \}
5317 .
5318 .  if \n[doc-date-count] \{\
5319 .    unformat doc-date
5320 .    chop doc-date
5321 .    nop \*[doc-date]\c
5322 .    doc-finish-reference
5323 .  \}
5324 .
5325 .  if \n[doc-optional-count] \{\
5326 .    unformat doc-optional-string
5327 .    chop doc-optional-string
5328 .    nop \*[doc-optional-string]\c
5329 .    doc-finish-reference
5330 .  \}
5331 .
5332 .  if \n[doc-reference-count] \
5333 .    tm mdoc warning: unresolved reference problem
5334 .
5335 .  hy \n[doc-hyphen-flags]
5336 ..
5337 .
5338 .
5339 .\" NS doc-print-reference-authors macro
5340 .\" NS   print out reference authors
5341 .\" NS
5342 .\" NS local variables:
5343 .\" NS   doc-reg-dpra
5344 .\" NS   doc-str-dpra
5345 .
5346 .ds doc-str-dpra "and
5347 .
5348 .de doc-print-reference-authors
5349 .  nr doc-reg-dpra 1
5350 .
5351 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5352 .    unformat doc-author-name\n[doc-reg-dpra]
5353 .    chop doc-author-name\n[doc-reg-dpra]
5354 .    ie (\n[doc-author-count] > 2) \
5355 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5356 .    el \
5357 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5358 .    nr doc-reg-dpra +1
5359 .  \}
5360 .
5361 .  unformat doc-author-name\n[doc-reg-dpra]
5362 .  chop doc-author-name\n[doc-reg-dpra]
5363 .  if (\n[doc-author-count] > 1) \
5364 .    nop \)\*[doc-str-dpra]
5365 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5366 ..
5367 .
5368 .
5369 .\" NS doc-author-count global register
5370 .\" NS   counter of author references
5371 .
5372 .nr doc-author-count 0
5373 .
5374 .
5375 .\" NS doc-author-nameXXX global box
5376 .\" NS   array of author names
5377 .\" NS
5378 .\" NS limit:
5379 .\" NS   doc-author-count
5380 .
5381 .ds doc-author-name0
5382 .
5383 .
5384 .\" NS %A user macro
5385 .\" NS   reference author(s)
5386 .\" NS
5387 .\" NS modifies:
5388 .\" NS   doc-arg-ptr
5389 .\" NS   doc-author-count
5390 .\" NS   doc-curr-font
5391 .\" NS   doc-curr-size
5392 .\" NS   doc-macro-name
5393 .\" NS   doc-reference-count
5394 .\" NS
5395 .\" NS local variables:
5396 .\" NS   doc-env-%A
5397 .\" NS
5398 .\" NS width register `%A' set in doc-common
5399 .
5400 .de %A
5401 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5402 .    tm Usage: .%A author_name ... (#\n[.c])
5403 .    return
5404 .  \}
5405 .
5406 .  nr doc-author-count +1
5407 .  nr doc-reference-count +1
5408 .
5409 .  ds doc-macro-name %A
5410 .  doc-parse-args \$@
5411 .
5412 .  nr doc-arg-ptr +1
5413 .  nr doc-curr-font \n[.f]
5414 .  nr doc-curr-size \n[.ps]
5415 .
5416 .  \" save to reference box
5417 .  box doc-author-name\n[doc-author-count]
5418 .  ev doc-env-%A
5419 .  evc 0
5420 .  in 0
5421 .  nf
5422 .  doc-do-references
5423 ..
5424 .
5425 .
5426 .\" NS doc-book-count global register
5427 .\" NS   counter of book references
5428 .
5429 .nr doc-book-count 0
5430 .
5431 .
5432 .\" NS doc-book-name global box
5433 .\" NS   string of collected book references
5434 .
5435 .ds doc-book-name
5436 .
5437 .
5438 .\" NS %B user macro
5439 .\" NS   [reference] book name
5440 .\" NS
5441 .\" NS modifies:
5442 .\" NS   doc-arg-ptr
5443 .\" NS   doc-book-count
5444 .\" NS   doc-curr-font
5445 .\" NS   doc-curr-size
5446 .\" NS   doc-macro-name
5447 .\" NS   doc-reference-count
5448 .\" NS
5449 .\" NS local variables:
5450 .\" NS   doc-env-%B
5451 .\" NS
5452 .\" NS width register `%B' set in doc-common
5453 .
5454 .de %B
5455 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5456 .    tm Usage: .%B book_name ... (#\n[.c])
5457 .    return
5458 .  \}
5459 .
5460 .  if \n[doc-is-reference] \{\
5461 .    nr doc-book-count +1
5462 .    nr doc-reference-count +1
5463 .  \}
5464 .
5465 .  ds doc-macro-name %B
5466 .  doc-parse-args \$@
5467 .
5468 .  nr doc-arg-ptr +1
5469 .  nr doc-curr-font \n[.f]
5470 .  nr doc-curr-size \n[.ps]
5471 .
5472 .  ie \n[doc-is-reference] \{\
5473 .    \" append to reference box
5474 .    boxa doc-book-name
5475 .    ev doc-env-%B
5476 .    evc 0
5477 .    in 0
5478 .    nf
5479 .    nop \*[doc-Em-font]\c
5480 .    doc-do-references
5481 .  \}
5482 .  el \{\
5483 .    nop \*[doc-Em-font]\c
5484 .    doc-print-recursive
5485 .  \}
5486 ..
5487 .
5488 .
5489 .\" NS doc-date-count global register
5490 .\" NS   counter of date references
5491 .
5492 .nr doc-date-count 0
5493 .
5494 .
5495 .\" NS doc-date global box
5496 .\" NS   string of collected date references
5497 .
5498 .ds doc-date
5499 .
5500 .
5501 .\" NS %D user macro
5502 .\" NS   [reference] date
5503 .\" NS
5504 .\" NS modifies:
5505 .\" NS   doc-arg-ptr
5506 .\" NS   doc-curr-font
5507 .\" NS   doc-curr-size
5508 .\" NS   doc-date-count
5509 .\" NS   doc-macro-name
5510 .\" NS   doc-reference-count
5511 .\" NS
5512 .\" NS local variables:
5513 .\" NS   doc-env-%D
5514 .\" NS
5515 .\" NS width register `%D' set in doc-common
5516 .
5517 .de %D
5518 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5519 .    tm Usage: .%D date ... (#\n[.c])
5520 .    return
5521 .  \}
5522 .
5523 .  nr doc-date-count +1
5524 .  nr doc-reference-count +1
5525 .
5526 .  ds doc-macro-name %D
5527 .  doc-parse-args \$@
5528 .
5529 .  nr doc-arg-ptr +1
5530 .  nr doc-curr-font \n[.f]
5531 .  nr doc-curr-size \n[.ps]
5532 .
5533 .  \" append to reference box
5534 .  boxa doc-date
5535 .  ev doc-env-%D
5536 .  evc 0
5537 .  in 0
5538 .  nf
5539 .  doc-do-references
5540 ..
5541 .
5542 .
5543 .\" NS doc-publisher-count global register
5544 .\" NS   counter of publisher references
5545 .
5546 .nr doc-publisher-count 0
5547 .
5548 .
5549 .\" NS doc-publisher-name global box
5550 .\" NS   string of collected publisher references
5551 .
5552 .ds doc-publisher-name
5553 .
5554 .
5555 .\" NS %I user macro
5556 .\" NS   [reference] issuer/publisher name
5557 .\" NS
5558 .\" NS modifies:
5559 .\" NS   doc-arg-ptr
5560 .\" NS   doc-curr-font
5561 .\" NS   doc-curr-size
5562 .\" NS   doc-macro-name
5563 .\" NS   doc-publisher-count
5564 .\" NS   doc-reference-count
5565 .\" NS
5566 .\" NS local variables:
5567 .\" NS   doc-env-%I
5568 .\" NS
5569 .\" NS width register `%I' set in doc-common
5570 .
5571 .de %I
5572 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5573 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5574 .    return
5575 .  \}
5576 .
5577 .  nr doc-publisher-count +1
5578 .  nr doc-reference-count +1
5579 .
5580 .  ds doc-macro-name %I
5581 .  doc-parse-args \$@
5582 .
5583 .  nr doc-arg-ptr +1
5584 .  nr doc-curr-font \n[.f]
5585 .  nr doc-curr-size \n[.ps]
5586 .
5587 .  \" append to reference box
5588 .  boxa doc-publisher-name
5589 .  ev doc-env-%I
5590 .  evc 0
5591 .  in 0
5592 .  nf
5593 .  nop \*[doc-Em-font]\c
5594 .  doc-do-references
5595 ..
5596 .
5597 .
5598 .\" NS doc-journal-count global register
5599 .\" NS   counter of journal references
5600 .
5601 .nr doc-journal-count 0
5602 .
5603 .
5604 .\" NS doc-journal-name global box
5605 .\" NS   string of collected journal references
5606 .
5607 .ds doc-journal-name
5608 .
5609 .
5610 .\" NS %J user macro
5611 .\" NS   [reference] Journal Name
5612 .\" NS
5613 .\" NS modifies:
5614 .\" NS   doc-arg-ptr
5615 .\" NS   doc-curr-font
5616 .\" NS   doc-curr-size
5617 .\" NS   doc-journal-count
5618 .\" NS   doc-macro-name
5619 .\" NS   doc-reference-count
5620 .\" NS
5621 .\" NS local variables:
5622 .\" NS   doc-env-%J
5623 .\" NS
5624 .\" NS width register `%J' set in doc-common
5625 .
5626 .de %J
5627 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5628 .    tm Usage: .%J journal_name ... (#\n[.c])
5629 .    return
5630 .  \}
5631 .
5632 .  nr doc-journal-count +1
5633 .  nr doc-reference-count +1
5634 .
5635 .  ds doc-macro-name %J
5636 .  doc-parse-args \$@
5637 .
5638 .  nr doc-arg-ptr +1
5639 .  nr doc-curr-font \n[.f]
5640 .  nr doc-curr-size \n[.ps]
5641 .
5642 .  \" append to reference box
5643 .  boxa doc-journal-name
5644 .  ev doc-env-%J
5645 .  evc 0
5646 .  in 0
5647 .  nf
5648 .  nop \*[doc-Em-font]\c
5649 .  doc-do-references
5650 ..
5651 .
5652 .
5653 .\" NS doc-issue-count global register
5654 .\" NS   counter of issue number references
5655 .
5656 .nr doc-issue-count 0
5657 .
5658 .
5659 .\" NS doc-issue-name global box
5660 .\" NS   string of collected issue number references
5661 .
5662 .ds doc-issue-name
5663 .
5664 .
5665 .\" NS %N user macro
5666 .\" NS   [reference] issue number
5667 .\" NS
5668 .\" NS modifies:
5669 .\" NS   doc-arg-ptr
5670 .\" NS   doc-curr-font
5671 .\" NS   doc-curr-size
5672 .\" NS   doc-issue-count
5673 .\" NS   doc-macro-name
5674 .\" NS   doc-reference-count
5675 .\" NS
5676 .\" NS local variables:
5677 .\" NS   doc-env-%N
5678 .\" NS
5679 .\" NS width register `%N' set in doc-common
5680 .
5681 .de %N
5682 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5683 .    tm Usage: .%N issue_number ... (#\n[.c])
5684 .    return
5685 .  \}
5686 .
5687 .  nr doc-issue-count +1
5688 .  nr doc-reference-count +1
5689 .
5690 .  ds doc-macro-name %N
5691 .  doc-parse-args \$@
5692 .
5693 .  nr doc-arg-ptr +1
5694 .  nr doc-curr-font \n[.f]
5695 .  nr doc-curr-size \n[.ps]
5696 .
5697 .  \" append to reference box
5698 .  boxa doc-issue-name
5699 .  ev doc-env-%N
5700 .  evc 0
5701 .  in 0
5702 .  nf
5703 .  doc-do-references
5704 ..
5705 .
5706 .
5707 .\" NS doc-optional-count global register
5708 .\" NS   counter of optional information references
5709 .
5710 .nr doc-optional-count 0
5711 .
5712 .
5713 .\" NS doc-optional-string global box
5714 .\" NS   string of collected optional information references
5715 .
5716 .ds doc-optional-string
5717 .
5718 .
5719 .\" NS %O user macro
5720 .\" NS   [reference] optional information
5721 .\" NS
5722 .\" NS modifies:
5723 .\" NS   doc-arg-ptr
5724 .\" NS   doc-curr-font
5725 .\" NS   doc-curr-size
5726 .\" NS   doc-macro-name
5727 .\" NS   doc-optional-count
5728 .\" NS   doc-reference-count
5729 .\" NS
5730 .\" NS local variables:
5731 .\" NS   doc-env-%O
5732 .\" NS
5733 .\" NS width register `%O' set in doc-common
5734 .
5735 .de %O
5736 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5737 .    tm Usage: .%O optional_information ... (#\n[.c])
5738 .    return
5739 .  \}
5740 .
5741 .  nr doc-optional-count +1
5742 .  nr doc-reference-count +1
5743 .
5744 .  ds doc-macro-name %O
5745 .  doc-parse-args \$@
5746 .
5747 .  nr doc-arg-ptr +1
5748 .  nr doc-curr-font \n[.f]
5749 .  nr doc-curr-size \n[.ps]
5750 .
5751 .  \" append to reference box
5752 .  boxa doc-optional-string
5753 .  ev doc-env-%O
5754 .  evc 0
5755 .  in 0
5756 .  nf
5757 .  doc-do-references
5758 ..
5759 .
5760 .
5761 .\" NS doc-page-number-count global register
5762 .\" NS   counter of page number references
5763 .
5764 .nr doc-page-number-count 0
5765 .
5766 .
5767 .\" NS doc-page-number-string global box
5768 .\" NS   string of collected page number references
5769 .
5770 .ds doc-page-number-string
5771 .
5772 .
5773 .\" NS %P user macro
5774 .\" NS   [reference] page numbers
5775 .\" NS
5776 .\" NS modifies:
5777 .\" NS   doc-arg-ptr
5778 .\" NS   doc-curr-font
5779 .\" NS   doc-curr-size
5780 .\" NS   doc-macro-name
5781 .\" NS   doc-page-number-count
5782 .\" NS   doc-reference-count
5783 .\" NS
5784 .\" NS local variables:
5785 .\" NS   doc-env-%P
5786 .\" NS
5787 .\" NS width register `%P' set in doc-common
5788 .
5789 .de %P
5790 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5791 .    tm Usage: .%P page_number ... (#\n[.c])
5792 .    return
5793 .  \}
5794 .
5795 .  nr doc-page-number-count +1
5796 .  nr doc-reference-count +1
5797 .
5798 .  ds doc-macro-name %P
5799 .  doc-parse-args \$@
5800 .
5801 .  nr doc-arg-ptr +1
5802 .  nr doc-curr-font \n[.f]
5803 .  nr doc-curr-size \n[.ps]
5804 .
5805 .  \" append to reference box
5806 .  boxa doc-page-number-string
5807 .  ev doc-env-%P
5808 .  evc 0
5809 .  in 0
5810 .  nf
5811 .  doc-do-references
5812 ..
5813 .
5814 .
5815 .\" NS doc-corporate-count global register
5816 .\" NS   counter of corporate references
5817 .
5818 .nr doc-corporate-count 0
5819 .
5820 .
5821 .\" NS doc-corporate-name global box
5822 .\" NS   string of collected corporate references
5823 .
5824 .ds doc-corporate-name
5825 .
5826 .
5827 .\" NS %Q user macro
5828 .\" NS   corporate or foreign author
5829 .\" NS
5830 .\" NS modifies:
5831 .\" NS   doc-arg-ptr
5832 .\" NS   doc-corporate-count
5833 .\" NS   doc-curr-font
5834 .\" NS   doc-curr-size
5835 .\" NS   doc-macro-name
5836 .\" NS   doc-reference-count
5837 .\" NS
5838 .\" NS local variables:
5839 .\" NS   doc-env-%Q
5840 .\" NS
5841 .\" NS width register `%Q' set in doc-common
5842 .
5843 .de %Q
5844 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5845 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5846 .    return
5847 .  \}
5848 .
5849 .  nr doc-corporate-count +1
5850 .  nr doc-reference-count +1
5851 .
5852 .  ds doc-macro-name %Q
5853 .  doc-parse-args \$@
5854 .
5855 .  nr doc-arg-ptr +1
5856 .  nr doc-curr-font \n[.f]
5857 .  nr doc-curr-size \n[.ps]
5858 .
5859 .  \" append to reference box
5860 .  boxa doc-corporate-name
5861 .  ev doc-env-%Q
5862 .  evc 0
5863 .  in 0
5864 .  nf
5865 .  doc-do-references
5866 ..
5867 .
5868 .
5869 .\" NS doc-report-count global register
5870 .\" NS   counter of report references
5871 .
5872 .nr doc-report-count 0
5873 .
5874 .
5875 .\" NS doc-report-name global box
5876 .\" NS   string of collected report references
5877 .
5878 .ds doc-report-name
5879 .
5880 .
5881 .\" NS %R user macro
5882 .\" NS   [reference] report name
5883 .\" NS
5884 .\" NS modifies:
5885 .\" NS   doc-arg-ptr
5886 .\" NS   doc-curr-font
5887 .\" NS   doc-curr-size
5888 .\" NS   doc-macro-name
5889 .\" NS   doc-reference-count
5890 .\" NS   doc-report-count
5891 .\" NS
5892 .\" NS local variables:
5893 .\" NS   doc-env-%R
5894 .\" NS
5895 .\" NS width register `%R' set in doc-common
5896 .
5897 .de %R
5898 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5899 .    tm Usage: .%R reference_report ... (#\n[.c])
5900 .    return
5901 .  \}
5902 .
5903 .  nr doc-report-count +1
5904 .  nr doc-reference-count +1
5905 .
5906 .  ds doc-macro-name %R
5907 .  doc-parse-args \$@
5908 .
5909 .  nr doc-arg-ptr +1
5910 .  nr doc-curr-font \n[.f]
5911 .  nr doc-curr-size \n[.ps]
5912 .
5913 .  \" append to reference box
5914 .  boxa doc-report-name
5915 .  ev doc-env-%R
5916 .  evc 0
5917 .  in 0
5918 .  nf
5919 .  doc-do-references
5920 ..
5921 .
5922 .
5923 .\" NS doc-reference-title-count global register
5924 .\" NS   counter of reference title references
5925 .
5926 .nr doc-reference-title-count 0
5927 .
5928 .
5929 .\" NS doc-reference-title-name global box
5930 .\" NS   string of collected reference title references
5931 .
5932 .ds doc-reference-title-name
5933 .
5934 .
5935 .\" NS doc-reference-title-name-for-book global box
5936 .\" NS   string of collected reference title references
5937 .\" NS   (saved with another font; this is a shortcoming of groff)
5938 .
5939 .ds doc-reference-title-name-for-book
5940 .
5941 .
5942 .\" NS %T user macro
5943 .\" NS   reference title
5944 .\" NS
5945 .\" NS modifies:
5946 .\" NS   doc-arg-ptr
5947 .\" NS   doc-curr-font
5948 .\" NS   doc-curr-size
5949 .\" NS   doc-macro-name
5950 .\" NS   doc-reference-title-count
5951 .\" NS   doc-report-count
5952 .\" NS
5953 .\" NS local variables:
5954 .\" NS   doc-env-%T
5955 .\" NS
5956 .\" NS width register `%T' set in doc-common
5957 .
5958 .de %T
5959 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5960 .    tm Usage: .%T reference_title ... (#\n[.c])
5961 .    return
5962 .  \}
5963 .
5964 .  if \n[doc-is-reference] \{\
5965 .    nr doc-reference-title-count +1
5966 .    nr doc-reference-count +1
5967 .  \}
5968 .
5969 .  ds doc-macro-name %T
5970 .  doc-parse-args \$@
5971 .
5972 .  nr doc-arg-ptr +1
5973 .  nr doc-curr-font \n[.f]
5974 .  nr doc-curr-size \n[.ps]
5975 .  ie \n[doc-is-reference] \{\
5976 .    \" append to reference box
5977 .    boxa doc-reference-title-name-for-book
5978 .    ev doc-env-%T
5979 .    evc 0
5980 .    in 0
5981 .    nf
5982 .    nop \*[doc-No-font]\c
5983 .    doc-do-references
5984 .
5985 .    \" do it a second time with another font
5986 .    ds doc-macro-name %T
5987 .    doc-parse-args \$@
5988 .
5989 .    nr doc-arg-ptr +1
5990 .    nr doc-curr-font \n[.f]
5991 .    nr doc-curr-size \n[.ps]
5992 .    boxa doc-reference-title-name
5993 .    ev doc-env-%T
5994 .    evc 0
5995 .    in 0
5996 .    nf
5997 .    nop \*[doc-Em-font]\c
5998 .    doc-do-references
5999 .  \}
6000 .  el \{\
6001 .    nop \*[doc-Em-font]\c
6002 .    doc-print-recursive
6003 .  \}
6004 ..
6005 .
6006 .
6007 .\" NS doc-volume-count global register
6008 .\" NS   counter of reference title references
6009 .
6010 .nr doc-volume-count 0
6011 .
6012 .
6013 .\" NS doc-volume-name global box
6014 .\" NS   string of collected volume references
6015 .
6016 .ds doc-volume-name
6017 .
6018 .
6019 .\" NS %V user macro
6020 .\" NS   reference volume
6021 .\" NS
6022 .\" NS modifies:
6023 .\" NS   doc-arg-ptr
6024 .\" NS   doc-curr-font
6025 .\" NS   doc-curr-size
6026 .\" NS   doc-macro-name
6027 .\" NS   doc-reference-title-count
6028 .\" NS   doc-volume-count
6029 .\" NS
6030 .\" NS local variables:
6031 .\" NS   doc-env-%V
6032 .\" NS
6033 .\" NS width register `%V' set in doc-common
6034 .
6035 .de %V
6036 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6037 .    tm Usage: .%V volume ... (#\n[.c])
6038 .    return
6039 .  \}
6040 .
6041 .  nr doc-volume-count +1
6042 .  nr doc-reference-count +1
6043 .
6044 .  ds doc-macro-name %V
6045 .  doc-parse-args \$@
6046 .
6047 .  nr doc-arg-ptr +1
6048 .  nr doc-curr-font \n[.f]
6049 .  nr doc-curr-size \n[.ps]
6050 .
6051 .  \" append to reference box
6052 .  boxa doc-volume-name
6053 .  ev doc-env-%V
6054 .  evc 0
6055 .  in 0
6056 .  nf
6057 .  doc-do-references
6058 ..
6059 .
6060 .
6061 .\" NS doc-do-references macro
6062 .\" NS   reference recursion routine
6063 .\" NS
6064 .\" NS modifies:
6065 .\" NS   doc-arg-ptr
6066 .\" NS
6067 .\" NS local variables:
6068 .\" NS   doc-reg-ddr
6069 .\" NS   doc-reg-ddr1
6070 .
6071 .de doc-do-references
6072 .  if !\n[doc-is-reference] \
6073 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6074 .
6075 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6076 .
6077 .  ie (\n[doc-reg-ddr1] == 1) \{\
6078 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6079 .    doc-append-arg \c 3
6080 .    \*[doc-arg\n[doc-arg-ptr]]
6081 .  \}
6082 .  el \{\
6083 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6084 .
6085 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6086 .      \" finish reference box
6087 .      br
6088 .      ev
6089 .      boxa
6090 .
6091 .      doc-reset-args
6092 .    \}
6093 .    el \{\
6094 .      nr doc-reg-ddr \n[doc-arg-ptr]
6095 .      nr doc-arg-ptr +1
6096 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6097 .      doc-do-references
6098 .  \}\}
6099 ..
6100 .
6101 .
6102 .\" NS Hf user macro
6103 .\" NS   source include header files.
6104 .\" NS
6105 .\" NS modifies:
6106 .\" NS   doc-curr-font
6107 .\" NS   doc-curr-size
6108 .\" NS
6109 .\" NS width register `Hf' set in doc-common
6110 .
6111 .de Hf
6112 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6113 .    doc-paragraph
6114 .    nop File:
6115 .    Pa \$1
6116 .
6117 .    Bd -literal
6118 .    so \$1
6119 .    Ed
6120 .
6121 .    doc-paragraph
6122 .  \}
6123 .  el \
6124 .    Usage: .Hf file (#\n[.c])
6125 ..
6126 .
6127 .
6128 .\" NS doc-have-author global register (bool)
6129 .\" NS   set in `An'
6130 .
6131 .nr doc-have-author 0
6132 .
6133 .
6134 .\" NS An user macro
6135 .\" NS   author name
6136 .\" NS
6137 .\" NS modifies:
6138 .\" NS   doc-arg-ptr
6139 .\" NS   doc-curr-font
6140 .\" NS   doc-curr-size
6141 .\" NS   doc-have-author
6142 .\" NS   doc-macro-name
6143 .\" NS
6144 .\" NS width register `An' set in doc-common
6145 .
6146 .de An
6147 .  if !\n[doc-arg-limit] \{\
6148 .    ie \n[.$] \{\
6149 .      ie        "\$1"-nosplit" \
6150 .        nr doc-in-authors-section 0
6151 .      el \{ .ie "\$1"-split" \
6152 .        nr doc-in-authors-section 1
6153 .      el \{\
6154 .        ds doc-macro-name An
6155 .        doc-parse-args \$@
6156 .    \}\}\}
6157 .    el \{\
6158 .      tm1 "Usage: .An {-nosplit | -split}
6159 .      tm1         .An author_name ... (#\n[.c])
6160 .  \}\}
6161 .
6162 .  if \n[doc-in-authors-section] \{\
6163 .    ie \n[doc-have-author] \
6164 .      br
6165 .    el \
6166 .      nr doc-have-author 1
6167 .  \}
6168 .
6169 .  if \n[doc-arg-limit] \{\
6170 .    nr doc-arg-ptr +1
6171 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6172 .      nr doc-curr-font \n[.f]
6173 .      nr doc-curr-size \n[.ps]
6174 .      doc-print-recursive
6175 .    \}
6176 .    el \{\
6177 .      tm Usage: .An author_name ... (#\n[.c])
6178 .      doc-reset-args
6179 .  \}\}
6180 ..
6181 .
6182 .
6183 .\" NS Rv user macro
6184 .\" NS   return values
6185 .\" NS
6186 .\" NS width register `Rv' set in doc-common
6187 .\" NS
6188 .\" NS local variables:
6189 .\" NS   doc-str-Rv-std-prefix
6190 .\" NS   doc-str-Rv-std-suffix
6191 .\" NS   doc-str-Rv-stds-prefix
6192 .\" NS   doc-str-Rv-stds-and
6193 .\" NS   doc-str-Rv-stds-suffix
6194 .\" NS   doc-str-Rv-std0
6195 .
6196 .ds doc-str-Rv-std-prefix "The
6197 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6198 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6199 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6200 .as doc-str-Rv-std-suffix " is set to indicate the error.
6201 .
6202 .ds doc-str-Rv-stds-prefix "The
6203 .ds doc-str-Rv-stds-and    "and
6204 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6205 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6206 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6207 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6208 .
6209 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6210 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6211 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6212 .as doc-str-Rv-std0 " is set to indicate the error.
6213 .
6214 .de Rv
6215 .
6216 .\" XXX: what does this function without `-std'?
6217 .
6218 .  if \n[doc-arg-limit] \{\
6219 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6220 .    doc-reset-args
6221 .    return
6222 .  \}
6223 .
6224 .  if !\n[.$] \{\
6225 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6226 .    return
6227 .  \}
6228 .
6229 .  if "\$1"-std" \{\
6230 .    nr doc-reg-Rv \*[doc-section]
6231 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6232 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6233 .    br
6234 .    shift
6235 .    ie (\n[.$] > 1) \{\
6236 .      nop \)\*[doc-str-Rv-stds-prefix]
6237 .      nr doc-reg-Rv 1
6238 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6239 .        ie (\n[.$] > 2) \
6240 .          Fn \$\n[doc-reg-Rv] ,
6241 .        el \
6242 .          Fn \$\n[doc-reg-Rv]
6243 .        nr doc-reg-Rv +1
6244 .      \}
6245 .      nop \)\*[doc-str-Rv-stds-and]
6246 .      Fn \$\n[.$]
6247 .      nop \)\*[doc-str-Rv-stds-suffix]
6248 .    \}
6249 .    el \{ .ie (\n[.$] == 1) \{\
6250 .      nop \)\*[doc-str-Rv-std-prefix]
6251 .      Fn \$1
6252 .      nop \)\*[doc-str-Rv-std-suffix]
6253 .    \}
6254 .    el \{\
6255 .      nop \)\*[doc-str-Rv-std0]
6256 .  \}\}\}
6257 ..
6258 .
6259 .
6260 .\" NS Ex user macro
6261 .\" NS   exit status
6262 .\" NS
6263 .\" NS width register `Ex' set in doc-common
6264 .\" NS
6265 .\" NS local variables:
6266 .\" NS   doc-str-Ex-std-prefix
6267 .\" NS   doc-str-Ex-std-suffix
6268 .
6269 .ds doc-str-Ex-std-prefix "The
6270 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6271 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6272 .
6273 .ds doc-str-Ex-stds-prefix "The
6274 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6275 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6276 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6277 .
6278 .de Ex
6279 .
6280 .\" XXX: what does this function without `-std'?
6281 .
6282 .  if \n[doc-arg-limit] \{\
6283 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6284 .    doc-reset-args
6285 .    return
6286 .  \}
6287 .
6288 .  if !\n[.$] \{\
6289 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6290 .    return
6291 .  \}
6292 .
6293 .  if "\$1"-std" \{\
6294 .    nr doc-reg-Ex \*[doc-section]
6295 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6296 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6297 .    br
6298 .    shift
6299 .    ie (\n[.$] > 1) \{\
6300 .      nop \)\*[doc-str-Ex-stds-prefix]
6301 .      nr doc-reg-Ex 1
6302 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6303 .        ie (\n[.$] > 2) \
6304 .          Nm \$\n[doc-reg-Ex] ,
6305 .        el \
6306 .          Nm \$\n[doc-reg-Ex]
6307 .        nr doc-reg-Ex +1
6308 .      \}
6309 .      nop \)\*[doc-str-Ex-stds-and]
6310 .      Nm \$\n[.$]
6311 .      nop \)\*[doc-str-Ex-stds-suffix]
6312 .    \}
6313 .    el \{\
6314 .      nop \)\*[doc-str-Ex-std-prefix]
6315 .      Nm \$1
6316 .      nop \)\*[doc-str-Ex-std-suffix]
6317 .  \}\}
6318 ..
6319 .
6320 .
6321 .\" NS Mt user macro
6322 .\" NS   mailto (for conversion to HTML)
6323 .
6324 .de Mt
6325 .  \" XXX: error handling missing
6326 .  Pa \$@
6327 ..
6328 .
6329 .
6330 .\" NS Lk user macro
6331 .\" NS   link (for conversion to HTML)
6332 .\" NS
6333 .\" NS local variables:
6334 .\" NS   doc-reg-Lk
6335 .\" NS   doc-str-Lk
6336 .
6337 .de Lk
6338 .  ds doc-str-Lk Sy \$@
6339 .
6340 .  ie (\n[.$] > 1) \{\
6341 .    doc-get-arg-type \$2
6342 .    ie (\n[doc-arg-type] < 3) \{\
6343 .      Em \)\$2:
6344 .      ds doc-str-Lk Sy "\$1"
6345 .      doc-get-width "\$1"
6346 .      shift 2
6347 .      if \n[.$] \
6348 .        as doc-str-Lk " \$@
6349 .    \}
6350 .    el \
6351 .      doc-get-width "\$1"
6352 .  \}
6353 .  el \
6354 .    doc-get-width "\$1"
6355 .
6356 .  ie n \
6357 .    nr doc-reg-Lk 26
6358 .  el \
6359 .    nr doc-reg-Lk 38
6360 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6361 .    D1 \*[doc-str-Lk]
6362 .  el \
6363 .    \*[doc-str-Lk]
6364 ..
6365 .
6366 .
6367 .\" NS doc-defunct-macro macro
6368 .\" NS   this is the skeleton for defunct macros
6369 .\" NS
6370 .
6371 .de doc-defunct-macro
6372 .  tmc mdoc error: .\$0 defunct
6373 .  if d doc-\$0-usage \
6374 .    tmc , \*[doc-\$0-usage]
6375 .  tm1 " (#\n[.c])
6376 ..
6377 .
6378 .
6379 .\" obsolete macros
6380 .
6381 .als Db doc-defunct-macro
6382 .
6383 .als Ds doc-defunct-macro
6384 .
6385 .als Or doc-defunct-macro
6386 .ds doc-Or-usage use `|'
6387 .
6388 .als Sf doc-defunct-macro
6389 .ds doc-Sf-usage use .Pf or .Ns
6390 .
6391 .
6392 .rn em e@
6393 .
6394 .de em
6395 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6396 .  tm1 "            Should this have been `.Em ...'?
6397 .  ab
6398 ..
6399 .
6400 .
6401 .\" NS doc-empty-line macro
6402 .\" NS   emit warning and print empty line
6403 .
6404 .de doc-empty-line
6405 .  if !\n[doc-display-depth] \
6406 .    tm mdoc warning: Empty input line #\n[.c]
6407 .  sp
6408 ..
6409 .
6410 .blm doc-empty-line
6411 .
6412 .
6413 .ec
6414 .
6415 .
6416 .\" load local modifications
6417 .mso mdoc.local
6418 .
6419 .\" EOF