80c6b8895efb2c188a1b612434d1d8fde0aa7909
[platform/upstream/groff.git] / tmac / doc.tmac
1 .\" -*- nroff -*-
2 .\"
3 .\" Copyright (c) 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. [Deleted.  See
15 .\"     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
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 .    \" no arguments
362 .    if !\n[.$] \
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[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\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 .    \" the `\%' prevents hyphenation on a dash (`-')
487 .    ie (\n[doc-reg-dpr1] == 2) \
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 .    \" no argument
601 .    if !\n[.$] \
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 .    \" default value
1040 .    if !\n[.$] \
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 .  ie "\*[doc-macro-name]"An" \{\
1203 .    ds doc-quote-left <
1204 .    ds doc-quote-right >
1205 .  \}
1206 .  el \{\
1207 .    ds doc-quote-left \[la]
1208 .    ds doc-quote-right \[ra]
1209 .  \}
1210 .
1211 .  doc-enclose-string \$@
1212 ..
1213 .
1214 .
1215 .\" NS Bq user macro
1216 .\" NS   enclose string in square brackets
1217 .\" NS
1218 .\" NS modifies:
1219 .\" NS   doc-macro-name
1220 .\" NS   doc-quote-left
1221 .\" NS   doc-quote-right
1222 .\" NS
1223 .\" NS width register `Bq' set in doc-common
1224 .
1225 .de Bq
1226 .  if !\n[doc-arg-limit] \
1227 .    ds doc-macro-name Bq
1228 .
1229 .  ds doc-quote-left "\*[doc-left-bracket]
1230 .  ds doc-quote-right "\*[doc-right-bracket]
1231 .
1232 .  doc-enclose-string \$@
1233 ..
1234 .
1235 .
1236 .\" NS Brq user macro
1237 .\" NS   enclose string in braces
1238 .\" NS
1239 .\" NS modifies:
1240 .\" NS   doc-macro-name
1241 .\" NS   doc-quote-left
1242 .\" NS   doc-quote-right
1243 .\" NS
1244 .\" NS width register `Brq' set in doc-common
1245 .
1246 .de Brq
1247 .  if !\n[doc-arg-limit] \
1248 .    ds doc-macro-name Brq
1249 .
1250 .  ds doc-quote-left {
1251 .  ds doc-quote-right }
1252 .
1253 .  doc-enclose-string \$@
1254 ..
1255 .
1256 .
1257 .\" NS Dq user macro
1258 .\" NS   enclose string in double quotes
1259 .\" NS
1260 .\" NS modifies:
1261 .\" NS   doc-macro-name
1262 .\" NS   doc-quote-left
1263 .\" NS   doc-quote-right
1264 .\" NS
1265 .\" NS width register `Dq' set in doc-common
1266 .
1267 .de Dq
1268 .  if !\n[doc-arg-limit] \
1269 .    ds doc-macro-name Dq
1270 .
1271 .  ds doc-quote-left "\*[Lq]
1272 .  ds doc-quote-right "\*[Rq]
1273 .
1274 .  doc-enclose-string \$@
1275 ..
1276 .
1277 .
1278 .\" NS Eq user macro
1279 .\" NS   enclose string in user-defined quotes (args 1 and 2)
1280 .\" NS
1281 .\" NS modifies:
1282 .\" NS   doc-macro-name
1283 .\" NS   doc-quote-left
1284 .\" NS   doc-quote-right
1285 .\" NS
1286 .\" NS width register `Eq' set in doc-common
1287 .
1288 .de Eq
1289 .  if !\n[doc-arg-limit] \
1290 .    ds doc-macro-name Eq
1291 .
1292 .  ds doc-quote-left "\$1
1293 .  ds doc-quote-right "\$2
1294 .
1295 .  shift 2
1296 .  doc-enclose-string \$@
1297 ..
1298 .
1299 .
1300 .\" NS Pq user macro
1301 .\" NS   enclose string in parentheses
1302 .\" NS
1303 .\" NS modifies:
1304 .\" NS   doc-macro-name
1305 .\" NS   doc-quote-left
1306 .\" NS   doc-quote-right
1307 .\" NS
1308 .\" NS width register `Pq' set in doc-common
1309 .
1310 .de Pq
1311 .  if !\n[doc-arg-limit] \
1312 .    ds doc-macro-name Pq
1313 .
1314 .  ds doc-quote-left "\*[doc-left-parenthesis]
1315 .  ds doc-quote-right "\*[doc-right-parenthesis]
1316 .
1317 .  doc-enclose-string \$@
1318 ..
1319 .
1320 .
1321 .\" NS Ql user macro
1322 .\" NS   quoted literal
1323 .\"
1324 .\"   is in file doc-[dit|n]roff
1325 .
1326 .
1327 .\" NS Qq user macro
1328 .\" NS   enclose string in straight double quotes
1329 .\" NS
1330 .\" NS modifies:
1331 .\" NS   doc-macro-name
1332 .\" NS   doc-quote-left
1333 .\" NS   doc-quote-right
1334 .\" NS
1335 .\" NS width register `Qq' set in doc-common
1336 .
1337 .de Qq
1338 .  if !\n[doc-arg-limit] \
1339 .    ds doc-macro-name Qq
1340 .
1341 .  ds doc-quote-left "\*[q]
1342 .  ds doc-quote-right "\*[q]
1343 .
1344 .  doc-enclose-string \$@
1345 ..
1346 .
1347 .
1348 .\" NS Sq user macro
1349 .\" NS   enclose string in single quotes
1350 .\" NS
1351 .\" NS modifies:
1352 .\" NS   doc-macro-name
1353 .\" NS   doc-quote-left
1354 .\" NS   doc-quote-right
1355 .\" NS
1356 .\" NS width register `Sq' set in doc-common
1357 .
1358 .de Sq
1359 .  if !\n[doc-arg-limit] \
1360 .    ds doc-macro-name Sq
1361 .
1362 .  ds doc-quote-left "\*[doc-left-singlequote]
1363 .  ds doc-quote-right "\*[doc-right-singlequote]
1364 .
1365 .  doc-enclose-string \$@
1366 ..
1367 .
1368 .
1369 .\" NS Es user macro
1370 .\" NS   set up arguments (i.e., the left and right quotation character as
1371 .\" NS   first and second argument) for .En call
1372 .\" NS
1373 .\" NS modifies:
1374 .\" NS   doc-arg-ptr
1375 .\" NS   doc-macro-name
1376 .\" NS   doc-quote-left
1377 .\" NS   doc-quote-right
1378 .
1379 .de Es
1380 .  if !\n[doc-arg-limit] \{\
1381 .    ie (\n[.$] > 2) \{\
1382 .      ds doc-macro-name Es
1383 .      doc-parse-args \$@
1384 .    \}
1385 .    el \{\
1386 .      ds doc-quote-left "\$1
1387 .      ds doc-quote-right "\$2
1388 .  \}\}
1389 .
1390 .  if !\n[doc-arg-limit] \
1391 .    return
1392 .
1393 .  nr doc-arg-ptr +1
1394 .  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
1395 .  nr doc-arg-ptr +1
1396 .  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
1397 .  nr doc-arg-ptr +1
1398 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1399 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1400 .  el \
1401 .    doc-print-and-reset
1402 ..
1403 .
1404 .
1405 .\" NS doc-have-slot global register (bool)
1406 .\" NS   set if `doc-enclose-string' has created a slot for closing
1407 .\" NS   delimiter
1408 .
1409 .nr doc-have-slot 0
1410 .
1411 .
1412 .\" NS doc-enclose-string macro
1413 .\" NS   enclose string with given args (e.g. [ and ])
1414 .\" NS
1415 .\" NS modifies:
1416 .\" NS   doc-arg-ptr
1417 .\" NS   doc-argXXX
1418 .\" NS   doc-have-slot
1419 .\" NS
1420 .\" NS local variables:
1421 .\" NS   doc-reg-des
1422 .\" NS   doc-reg-des1
1423 .\" NS   doc-reg-des2
1424 .\" NS
1425 .\" NS requires:
1426 .\" NS   doc-quote-left
1427 .\" NS   doc-quote-right
1428 .
1429 .de doc-enclose-string
1430 .  if \n[doc-in-synopsis-section] \
1431 .    doc-set-hard-space
1432 .
1433 .  if !\n[doc-arg-limit] \{\
1434 .    ie \n[.$] \
1435 .      doc-parse-args \$@
1436 .    el \{\
1437 .      nop \)\*[doc-quote-left]\*[doc-quote-right]
1438 .  \}\}
1439 .
1440 .  if !\n[doc-arg-limit] \
1441 .    return
1442 .
1443 .  nr doc-curr-font \n[.f]
1444 .  nr doc-curr-size \n[.ps]
1445 .
1446 .  nr doc-arg-ptr +1
1447 .  doc-print-prefixes
1448 .  \" the final `\)' prevents hyphenation in case the next character is `\%'
1449 .  nop \)\*[doc-quote-left]\)\c
1450 .  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
1451 .    \" last argument
1452 .    nop \)\*[doc-quote-right]\)\c
1453 .    doc-print-and-reset
1454 .  \}
1455 .  el \{\
1456 .    \" test whether last arguments are of type closing punctuation
1457 .    \" resp. suffix
1458 .    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
1459 .      nr doc-reg-des (\n[doc-arg-limit] - 1)
1460 .      while (\n[doc-type\n[doc-reg-des]] == 3) \
1461 .        nr doc-reg-des -1
1462 .
1463 .      \" prepend closing delimiter
1464 .      nr doc-reg-des +1
1465 .      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1466 .    \}
1467 .    el \{\
1468 .      \" test whether last arguments are macros which continue the line
1469 .      \" logically
1470 .      nr doc-reg-des \n[doc-arg-limit]
1471 .      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
1472 .        if !\A\a\*[doc-arg\n[doc-reg-des]]\a \
1473 .          break
1474 .        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
1475 .          break
1476 .        nr doc-reg-des -1
1477 .      \}
1478 .
1479 .      \" if there are no trailing macros to be skipped, append argument
1480 .      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
1481 .        doc-append-arg "\)\*[doc-quote-right]\)" 3
1482 .      el \{\
1483 .        \" if a previous call to `doc-enclose-string' has already created
1484 .        \" a slot, prepend argument
1485 .        ie \n[doc-have-slot] \
1486 .          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
1487 .        el \{\
1488 .          \" we have to shift all arguments to the right
1489 .          nr doc-reg-des +1
1490 .          nr doc-reg-des1 \n[doc-arg-limit]
1491 .          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
1492 .          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
1493 .            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
1494 .            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
1495 .            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
1496 .            nr doc-reg-des1 -1
1497 .            nr doc-reg-des2 -1
1498 .          \}
1499 .          nr doc-arg-limit +1
1500 .
1501 .          \" finally, insert closing delimiter into the freed slot and
1502 .          \" recompute spacing vector
1503 .          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
1504 .          nr doc-type\n[doc-reg-des] 3
1505 .          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
1506 .          nr doc-arg-limit (\n[doc-reg-des] - 1)
1507 .          doc-parse-space-vector
1508 .          nr doc-have-slot 1
1509 .    \}\}\}
1510 .
1511 .    doc-do-\n[doc-type\n[doc-arg-ptr]]
1512 .  \}
1513 .
1514 .  if \n[doc-in-synopsis-section] \
1515 .    doc-set-soft-space
1516 ..
1517 .
1518 .
1519 .\" NS En user macro
1520 .\" NS   enclose arguments with quotation characters set up with `.Es'
1521 .
1522 .als En doc-enclose-string
1523 .
1524 .
1525 .\" NS Ao user macro
1526 .\" NS   angle open
1527 .\" NS
1528 .\" NS modifies:
1529 .\" NS   doc-macro-name
1530 .\" NS   doc-quote-left
1531 .\" NS
1532 .\" NS width register `Ao' set in doc-common
1533 .
1534 .de Ao
1535 .  if !\n[doc-arg-limit] \
1536 .    ds doc-macro-name Ao
1537 .
1538 .  ie "\*[doc-macro-name]"An" \
1539 .    ds doc-quote-left <
1540 .  el \
1541 .    ds doc-quote-left \[la]
1542 .
1543 .  doc-enclose-open \$@
1544 ..
1545 .
1546 .
1547 .\" NS Ac user macro
1548 .\" NS   angle close
1549 .\" NS
1550 .\" NS modifies:
1551 .\" NS   doc-macro-name
1552 .\" NS   doc-quote-right
1553 .\" NS
1554 .\" NS width register `Ac' set in doc-common
1555 .
1556 .de Ac
1557 .  if !\n[doc-arg-limit] \
1558 .    ds doc-macro-name Ac
1559 .
1560 .  ie "\*[doc-macro-name]"An" \
1561 .    ds doc-quote-right >
1562 .  el \
1563 .    ds doc-quote-right \[ra]
1564 .
1565 .  doc-enclose-close \$@
1566 ..
1567 .
1568 .
1569 .\" NS Bo user macro
1570 .\" NS   bracket open
1571 .\" NS
1572 .\" NS modifies:
1573 .\" NS   doc-macro-name
1574 .\" NS   doc-quote-left
1575 .\" NS
1576 .\" NS width register `Bo' set in doc-common
1577 .
1578 .de Bo
1579 .  if !\n[doc-arg-limit] \
1580 .    ds doc-macro-name Bo
1581 .
1582 .  ds doc-quote-left "\*[doc-left-bracket]
1583 .
1584 .  doc-enclose-open \$@
1585 ..
1586 .
1587 .
1588 .\" NS Bc user macro
1589 .\" NS   bracket close
1590 .\" NS
1591 .\" NS modifies:
1592 .\" NS   doc-macro-name
1593 .\" NS   doc-quote-right
1594 .\" NS
1595 .\" NS width register `Bc' set in doc-common
1596 .
1597 .de Bc
1598 .  if !\n[doc-arg-limit] \
1599 .    ds doc-macro-name Bc
1600 .
1601 .  ds doc-quote-right "\*[doc-right-bracket]
1602 .
1603 .  doc-enclose-close \$@
1604 ..
1605 .
1606 .
1607 .\" NS Bro user macro
1608 .\" NS   brace open
1609 .\" NS
1610 .\" NS modifies:
1611 .\" NS   doc-macro-name
1612 .\" NS   doc-quote-left
1613 .\" NS
1614 .\" NS width register `Bro' set in doc-common
1615 .
1616 .de Bro
1617 .  if !\n[doc-arg-limit] \
1618 .    ds doc-macro-name Bo
1619 .
1620 .  ds doc-quote-left {
1621 .
1622 .  doc-enclose-open \$@
1623 ..
1624 .
1625 .
1626 .\" NS Brc user macro
1627 .\" NS   brace close
1628 .\" NS
1629 .\" NS modifies:
1630 .\" NS   doc-macro-name
1631 .\" NS   doc-quote-right
1632 .\" NS
1633 .\" NS width register `Brc' set in doc-common
1634 .
1635 .de Brc
1636 .  if !\n[doc-arg-limit] \
1637 .    ds doc-macro-name Bc
1638 .
1639 .  ds doc-quote-right }
1640 .
1641 .  doc-enclose-close \$@
1642 ..
1643 .
1644 .
1645 .\" NS Do user macro
1646 .\" NS   double quote open
1647 .\" NS
1648 .\" NS modifies:
1649 .\" NS   doc-macro-name
1650 .\" NS   doc-quote-left
1651 .\" NS
1652 .\" NS width register `Do' set in doc-common
1653 .
1654 .de Do
1655 .  if !\n[doc-arg-limit] \
1656 .    ds doc-macro-name Do
1657 .
1658 .  ds doc-quote-left "\*[Lq]
1659 .
1660 .  doc-enclose-open \$@
1661 ..
1662 .
1663 .
1664 .\" NS Dc user macro
1665 .\" NS   double quote close
1666 .\" NS
1667 .\" NS modifies:
1668 .\" NS   doc-macro-name
1669 .\" NS   doc-quote-right
1670 .\" NS
1671 .\" NS width register `Dc' set in doc-common
1672 .
1673 .de Dc
1674 .  if !\n[doc-arg-limit] \
1675 .    ds doc-macro-name Dc
1676 .
1677 .  ds doc-quote-right "\*[Rq]
1678 .
1679 .  doc-enclose-close \$@
1680 ..
1681 .
1682 .
1683 .\" NS Eo user macro
1684 .\" NS   enclose open (using first argument as beginning of enclosure)
1685 .\" NS
1686 .\" NS modifies:
1687 .\" NS   doc-macro-name
1688 .\" NS   doc-quote-left
1689 .\" NS
1690 .\" NS width register `Eo' set in doc-common
1691 .
1692 .de Eo
1693 .  if !\n[doc-arg-limit] \
1694 .    ds doc-macro-name Eo
1695 .
1696 .  ds doc-quote-left "\$1
1697 .
1698 .  shift
1699 .  doc-enclose-open \$@
1700 ..
1701 .
1702 .
1703 .\" NS Ec user macro
1704 .\" NS   enclose close (using first argument as end of enclosure)
1705 .\" NS
1706 .\" NS modifies:
1707 .\" NS   doc-macro-name
1708 .\" NS   doc-quote-right
1709 .\" NS
1710 .\" NS width register `Ec' set in doc-common
1711 .
1712 .de Ec
1713 .  if !\n[doc-arg-limit] \
1714 .    ds doc-macro-name Ec
1715 .
1716 .  ds doc-quote-right "\$1
1717 .
1718 .  shift
1719 .  doc-enclose-close \$@
1720 ..
1721 .
1722 .
1723 .\" NS Oo user macro
1724 .\" NS   option open
1725 .\" NS
1726 .\" NS modifies:
1727 .\" NS   doc-macro-name
1728 .\" NS   doc-quote-left
1729 .\" NS
1730 .\" NS width register `Oo' set in doc-common
1731 .
1732 .de Oo
1733 .  if !\n[doc-arg-limit] \
1734 .    ds doc-macro-name Oo
1735 .
1736 .  ds doc-quote-left [
1737 .
1738 .  doc-enclose-open \$@
1739 ..
1740 .
1741 .
1742 .\" NS Oc user macro
1743 .\" NS   option close
1744 .\" NS
1745 .\" NS modifies:
1746 .\" NS   doc-macro-name
1747 .\" NS   doc-quote-right
1748 .\" NS
1749 .\" NS width register `Oc' set in doc-common
1750 .
1751 .de Oc
1752 .  if !\n[doc-arg-limit] \
1753 .    ds doc-macro-name Oc
1754 .
1755 .  ds doc-quote-right ]
1756 .
1757 .  doc-enclose-close \$@
1758 ..
1759 .
1760 .
1761 .\" NS Po user macro
1762 .\" NS   parenthesis open
1763 .\" NS
1764 .\" NS modifies:
1765 .\" NS   doc-macro-name
1766 .\" NS   doc-quote-left
1767 .\" NS
1768 .\" NS width register `Po' set in doc-common
1769 .
1770 .de Po
1771 .  if !\n[doc-arg-limit] \
1772 .    ds doc-macro-name Po
1773 .
1774 .  ds doc-quote-left "\*[doc-left-parenthesis]
1775 .
1776 .  doc-enclose-open \$@
1777 ..
1778 .
1779 .
1780 .\" NS Pc user macro
1781 .\" NS   parenthesis close
1782 .\" NS
1783 .\" NS modifies:
1784 .\" NS   doc-macro-name
1785 .\" NS   doc-quote-right
1786 .\" NS
1787 .\" NS width register `Pc' set in doc-common
1788 .
1789 .de Pc
1790 .  if !\n[doc-arg-limit] \
1791 .    ds doc-macro-name Pc
1792 .
1793 .  ds doc-quote-right "\*[doc-right-parenthesis]
1794 .
1795 .  doc-enclose-close \$@
1796 ..
1797 .
1798 .
1799 .\" NS Qo user macro
1800 .\" NS   straight double quote open
1801 .\" NS
1802 .\" NS modifies:
1803 .\" NS   doc-macro-name
1804 .\" NS   doc-quote-left
1805 .\" NS
1806 .\" NS width register `Qo' set in doc-common
1807 .
1808 .de Qo
1809 .  if !\n[doc-arg-limit] \
1810 .    ds doc-macro-name Qo
1811 .
1812 .  ds doc-quote-left "\*[q]
1813 .
1814 .  doc-enclose-open \$@
1815 ..
1816 .
1817 .
1818 .\" NS Qc user macro
1819 .\" NS   straight double quote close
1820 .\" NS
1821 .\" NS modifies:
1822 .\" NS   doc-macro-name
1823 .\" NS   doc-quote-right
1824 .\" NS
1825 .\" NS width register `Qc' set in doc-common
1826 .
1827 .de Qc
1828 .  if !\n[doc-arg-limit] \
1829 .    ds doc-macro-name Qc
1830 .
1831 .  ds doc-quote-right "\*[q]
1832 .
1833 .  doc-enclose-close \$@
1834 ..
1835 .
1836 .
1837 .\" NS So user macro
1838 .\" NS   single quote open
1839 .\" NS
1840 .\" NS modifies:
1841 .\" NS   doc-macro-name
1842 .\" NS   doc-quote-left
1843 .\" NS
1844 .\" NS width register `So' set in doc-common
1845 .
1846 .de So
1847 .  if !\n[doc-arg-limit] \
1848 .    ds doc-macro-name So
1849 .
1850 .  ds doc-quote-left "\*[doc-left-singlequote]
1851 .
1852 .  doc-enclose-open \$@
1853 ..
1854 .
1855 .
1856 .\" NS Sc user macro
1857 .\" NS   single quote close
1858 .\" NS
1859 .\" NS modifies:
1860 .\" NS   doc-macro-name
1861 .\" NS   doc-quote-right
1862 .\" NS
1863 .\" NS width register `Sc' set in doc-common
1864 .
1865 .de Sc
1866 .  if !\n[doc-arg-limit] \
1867 .    ds doc-macro-name Sc
1868 .
1869 .  ds doc-quote-right "\*[doc-right-singlequote]
1870 .
1871 .  doc-enclose-close \$@
1872 ..
1873 .
1874 .
1875 .\" NS Xo user macro
1876 .\" NS   extend open
1877 .\" NS
1878 .\" NS modifies:
1879 .\" NS   doc-macro-name
1880 .\" NS   doc-quote-left
1881 .\" NS
1882 .\" NS width register `Xo' set in doc-common
1883 .
1884 .de Xo
1885 .  if !\n[doc-arg-limit] \
1886 .    ds doc-macro-name Xo
1887 .
1888 .  ds doc-quote-left
1889 .
1890 .  doc-enclose-open \$@
1891 ..
1892 .
1893 .
1894 .\" NS Xc user macro
1895 .\" NS   extend close
1896 .\" NS
1897 .\" NS modifies:
1898 .\" NS   doc-macro-name
1899 .\" NS   doc-quote-right
1900 .\" NS
1901 .\" NS width register `Xc' set in doc-common
1902 .
1903 .de Xc
1904 .  if !\n[doc-arg-limit] \
1905 .    ds doc-macro-name Xc
1906 .
1907 .  ds doc-quote-right
1908 .
1909 .  doc-enclose-close \$@
1910 ..
1911 .
1912 .
1913 .\" NS doc-nesting-level global register
1914 .\" NS   used by `doc-enclose-open' and `doc-enclose-close'
1915 .
1916 .nr doc-nesting-level 0
1917 .
1918 .
1919 .\" NS doc-in-list global register (bool)
1920 .\" NS   whether we are in (logical) .It
1921 .
1922 .nr doc-in-list 0
1923 .
1924 .
1925 .\" NS doc-enclose-open macro
1926 .\" NS   enclose string open
1927 .\" NS
1928 .\" NS modifies:
1929 .\" NS   doc-arg-ptr
1930 .\" NS   doc-nesting-level
1931 .
1932 .de doc-enclose-open
1933 .  if !\n[doc-arg-limit] \
1934 .    doc-parse-args \$@
1935 .
1936 .  nr doc-arg-ptr +1
1937 .  doc-print-prefixes
1938 .  nr doc-arg-ptr -1
1939 .
1940 .  nop \)\*[doc-quote-left]\)\c
1941 .
1942 .  \" start enclosure box
1943 .  box doc-enclosure-box\n[doc-nesting-level]
1944 .  ev doc-enclosure-env\n[doc-nesting-level]
1945 .  evc 0
1946 .  in 0
1947 .  nf
1948 .  \" we insert something to make .chop always work
1949 .  nop \&\c
1950 .
1951 .  \" increase nesting level *after* parsing of arguments
1952 .  nr doc-nesting-level +1
1953 .
1954 .  if \n[doc-arg-limit] \{\
1955 .    nr doc-arg-ptr +1
1956 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
1957 .      doc-print-recursive
1958 .    el \
1959 .      doc-reset-args
1960 .  \}
1961 ..
1962 .
1963 .
1964 .\" NS doc-enclose-close macro
1965 .\" NS   enclose string close
1966 .\" NS
1967 .\" NS modifies:
1968 .\" NS   doc-nesting-level
1969 .
1970 .de doc-enclose-close
1971 .  nr doc-nesting-level -1
1972 .
1973 .  \" finish enclosure box
1974 .  br
1975 .  ev
1976 .  box
1977 .  chop doc-enclosure-box\n[doc-nesting-level]
1978 .  unformat doc-enclosure-box\n[doc-nesting-level]
1979 .
1980 .  nh
1981 .  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
1982 .  nop \)\*[doc-quote-right]\)\c
1983 .
1984 .  if !\n[doc-arg-limit] \{\
1985 .    doc-parse-args \$@
1986 .
1987 .    if !\n[.$] \
1988 .      doc-print-and-reset
1989 .  \}
1990 .
1991 .  if \n[doc-arg-limit] \{\
1992 .    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
1993 .      nop \)\*[doc-space\n[doc-arg-ptr]]\c
1994 .      nr doc-arg-ptr +1
1995 .      doc-print-recursive
1996 .    \}
1997 .    el \
1998 .      doc-print-and-reset
1999 .  \}
2000 .
2001 .  \" shall we finish .It macro?
2002 .  if !"\*[doc-macro-name]"It" \
2003 .    if \n[doc-in-list] \
2004 .      if !\n[doc-nesting-level] \
2005 .        doc-\*[doc-list-type-stack\n[doc-list-depth]]
2006 ..
2007 .
2008 .
2009 .\" NS Pf user macro
2010 .\" NS   prefix: `.Pf prefix arg ...'
2011 .\" NS
2012 .\" NS modifies:
2013 .\" NS   doc-arg-ptr
2014 .\" NS   doc-macro-name
2015 .\" NS   doc-quote-left
2016 .\" NS
2017 .\" NS width register `Pf' set in doc-common
2018 .
2019 .de Pf
2020 .  if !\n[doc-arg-limit] \
2021 .    ds doc-macro-name Pf
2022 .
2023 .  ie \n[doc-arg-limit] \{\
2024 .    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
2025 .      nr doc-arg-ptr +1
2026 .      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
2027 .    \}
2028 .    el \
2029 .      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
2030 .  \}
2031 .  el \{\
2032 .    nop \)\$1\)\c
2033 .    shift
2034 .    ie \n[.$] \
2035 .      doc-parse-args \$@
2036 .    el \{\
2037 .      tm mdoc warning: .Pf: missing arguments (#\n[.c])
2038 .      nop \)
2039 .  \}\}
2040 .
2041 .  if \n[doc-arg-limit] \{\
2042 .    nr doc-arg-ptr +1
2043 .    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
2044 .      doc-print-and-reset
2045 .    el \
2046 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
2047 .  \}
2048 ..
2049 .
2050 .
2051 .\" NS Ns user macro
2052 .\" NS   remove space (space removal done by `doc-parse-args')
2053 .\" NS
2054 .\" NS modifies:
2055 .\" NS   doc-argXXX
2056 .\" NS   doc-macro-name
2057 .\" NS
2058 .\" NS width register `Ns' set in doc-common
2059 .
2060 .de Ns
2061 .  if !\n[doc-arg-limit] \{\
2062 .    ie \n[.$] \{\
2063 .      ds doc-macro-name Ns
2064 .      doc-parse-args \$@
2065 .    \}
2066 .    el \
2067 .      tm Usage: .Ns must be called with arguments (#\n[.c])
2068 .  \}
2069 .
2070 .  if \n[doc-arg-limit] \{\
2071 .    nr doc-arg-ptr +1
2072 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2073 .      doc-print-recursive
2074 .    el \
2075 .      doc-reset-args
2076 .  \}
2077 ..
2078 .
2079 .
2080 .\" NS Ap user macro
2081 .\" NS   append an apostrophe
2082 .\" NS
2083 .\" NS width register `Ap' set in doc-common
2084 .
2085 .de Ap
2086 .  ie !\n[doc-arg-limit] \
2087 .    tm Usage: `Ap' cannot be first macro on a line (no `.Ap') (#\n[.c])
2088 .  el \{\
2089 .    nop \)'\)\c
2090 .    nr doc-arg-ptr +1
2091 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
2092 .      doc-print-recursive
2093 .    el \
2094 .      doc-reset-args
2095 .  \}
2096 ..
2097 .
2098 .
2099 .\" NS doc-space global string
2100 .\" NS   current inter-argument space
2101 .
2102 .ds doc-space "\*[doc-soft-space]
2103 .
2104 .
2105 .\" NS doc-soft-space constant string
2106 .\" NS   soft (stretchable) space (defined in doc-common)
2107 .
2108 .
2109 .\" NS doc-hard-space constant string
2110 .\" NS   hard (unpaddable) space (defined in doc-common)
2111 .
2112 .
2113 .\" NS doc-set-hard-space macro
2114 .\" NS   set current space string to hard (unpaddable) space.
2115 .\" NS
2116 .\" NS modifies:
2117 .\" NS   doc-saved-space
2118 .\" NS   doc-space
2119 .
2120 .de doc-set-hard-space
2121 .  ie "\*[doc-space]"" \
2122 .    ds doc-saved-space "\*[doc-hard-space]
2123 .  el \
2124 .    ds doc-space "\*[doc-hard-space]
2125 ..
2126 .
2127 .
2128 .\" NS doc-set-soft-space macro
2129 .\" NS   set current space string to soft space
2130 .\" NS
2131 .\" NS modifies:
2132 .\" NS   doc-saved-space
2133 .\" NS   doc-space
2134 .
2135 .de doc-set-soft-space
2136 .  ie "\*[doc-space]"" \
2137 .    ds doc-saved-space "\*[doc-soft-space]
2138 .  el \
2139 .    ds doc-space "\*[doc-soft-space]
2140 ..
2141 .
2142 .
2143 .\" NS doc-space-mode global register (bool)
2144 .\" NS   default is one (space mode on)
2145 .
2146 .nr doc-space-mode 1
2147 .
2148 .
2149 .\" NS doc-saved-space global string
2150 .\" NS   saved value of `doc-space'
2151 .
2152 .ds doc-saved-space "\*[doc-space]
2153 .
2154 .
2155 .\" NS doc-have-space global register (bool)
2156 .\" NS   set if last command was horizontal space
2157 .
2158 .nr doc-have-space 0
2159 .
2160 .
2161 .\" NS Sm user macro
2162 .\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
2163 .\" NS
2164 .\" NS   without argument, toggle space mode
2165 .\" NS
2166 .\" NS modifies:
2167 .\" NS   doc-arg-limit
2168 .\" NS   doc-arg-ptr
2169 .\" NS   doc-argXXX
2170 .\" NS   doc-macro-name
2171 .\" NS   doc-num-args
2172 .\" NS   doc-saved-space
2173 .\" NS   doc-space
2174 .\" NS   doc-space-mode
2175 .\" NS   doc-spaceXXX
2176 .\" NS
2177 .\" NS local variables:
2178 .\" NS   doc-reg-Sm
2179 .\" NS
2180 .\" NS width register `Sm' set in doc-common
2181 .
2182 .de Sm
2183 .  ie \n[doc-have-space] \
2184 .    nr doc-reg-Sm 0
2185 .  el \
2186 .    nr doc-reg-Sm 1
2187 .
2188 .  if !\n[doc-arg-limit] \{\
2189 .    ie \n[.$] \{\
2190 .      ds doc-macro-name Sm
2191 .      doc-parse-args \$@
2192 .    \}
2193 .    el \{\
2194 .      ie \n[doc-space-mode] \{\
2195 .        ds doc-saved-space "\*[doc-space]
2196 .        ds doc-space
2197 .        nr doc-space-mode 0
2198 .      \}
2199 .      el \{\
2200 .        ds doc-space "\*[doc-saved-space]
2201 .        nr doc-space-mode 1
2202 .
2203 .        \" finish line only if it is interrupted and `doc-have-space'
2204 .        \" isn't set
2205 .        if \n[doc-reg-Sm] \
2206 .          if \n[.int] \
2207 .            nop \)
2208 .      \}
2209 .  \}\}
2210 .
2211 .  if !\n[doc-arg-limit] \
2212 .    return
2213 .
2214 .  nr doc-arg-ptr +1
2215 .
2216 .  \" avoid a warning message in case `Sm' is the last parameter
2217 .  if !d doc-arg\n[doc-arg-ptr] \
2218 .    ds doc-arg\n[doc-arg-ptr]
2219 .
2220 .  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
2221 .    ds doc-space "\*[doc-saved-space]
2222 .    nr doc-space-mode 1
2223 .  \}
2224 .  el \{\
2225 .    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
2226 .      ds doc-saved-space "\*[doc-space]
2227 .      ds doc-space
2228 .      nr doc-space-mode 0
2229 .    \}
2230 .    el \{\
2231 .      \" no argument for Sm
2232 .      nr doc-arg-ptr -1
2233 .      ie \n[doc-space-mode] \{\
2234 .        ds doc-saved-space "\*[doc-space]
2235 .        ds doc-space
2236 .        nr doc-space-mode 0
2237 .      \}
2238 .      el \{\
2239 .        ds doc-space "\*[doc-saved-space]
2240 .        nr doc-space-mode 1
2241 .      \}
2242 .  \}\}
2243 .
2244 .  ie \n[doc-space-mode] \{\
2245 .    \" recompute space vector for remaining arguments
2246 .    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
2247 .    nr doc-arg-limit \n[doc-arg-ptr]
2248 .    if \n[doc-num-args] \
2249 .      doc-parse-space-vector
2250 .
2251 .    \" finish line only if it is interrupted and `doc-have-space'
2252 .    \" isn't set
2253 .    if \n[doc-reg-Sm] \
2254 .      if \n[.int] \
2255 .        nop \)
2256 .  \}
2257 .  el \{\
2258 .    \" reset remaining space vector elements
2259 .    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
2260 .    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
2261 .      ds doc-space\n[doc-reg-Sm]
2262 .      nr doc-reg-Sm +1
2263 .      \" the body of a `while' request must end with the fitting `\}'!
2264 .    \}
2265 .  \}
2266 .
2267 .  \" do we have parameters to print?
2268 .  ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
2269 .    \" skip `Sm' argument
2270 .    nr doc-arg-ptr +1
2271 .    doc-print-recursive
2272 .  \}
2273 .  el \
2274 .    doc-reset-args
2275 ..
2276 .
2277 .
2278 .\" NS doc-arg-type immediate register
2279 .\" NS   argument type (macro=1, string=2, punctuation suffix=3,
2280 .\" NS   punctuation prefix=4)
2281 .
2282 .nr doc-arg-type 0
2283 .
2284 .
2285 .\" NS doc-get-arg-type macro
2286 .\" NS   get argument type
2287 .\" NS
2288 .\" NS   this macro expects the width of the argument in `doc-width'
2289 .\" NS
2290 .\" NS modifies:
2291 .\" NS   doc-arg-type
2292 .
2293 .de doc-get-arg-type
2294 .  nr doc-arg-type 2
2295 .
2296 .  if ((\n[doc-width] < 4) & \A\a\$1\a) \{\
2297 .    ie (\n[doc-width] == 1) \{\
2298 .      if r doc-punct\$1 \
2299 .        nr doc-arg-type \n[doc-punct\$1]
2300 .    \}
2301 .    el \
2302 .      if r \$1 \
2303 .        if d \$1 \
2304 .          nr doc-arg-type 1
2305 .  \}
2306 ..
2307 .
2308 .
2309 .\" NS doc-get-arg-type* macro
2310 .\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
2311 .\" NS
2312 .\" NS   this macro sets the `doc-width' register using the `length' request
2313 .\" NS   to get the number of characters in a string literally
2314 .\" NS
2315 .\" NS modifies:
2316 .\" NS   doc-arg-type
2317 .\" NS   doc-width
2318 .
2319 .de doc-get-arg-type*
2320 .  nr doc-arg-type 2
2321 .  length doc-width "\*[doc-arg\$1]
2322 .
2323 .  if ((\n[doc-width] < 4) & \A\a\*[doc-arg\$1]\a) \{\
2324 .    ie (\n[doc-width] == 1) \{\
2325 .      if r doc-punct\*[doc-arg\$1] \
2326 .        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
2327 .    \}
2328 .    el \
2329 .      if r \*[doc-arg\$1] \
2330 .        if d \*[doc-arg\$1] \
2331 .          nr doc-arg-type 1
2332 .  \}
2333 ..
2334 .
2335 .
2336 .\" NS doc-set-spacing-1 macro
2337 .\" NS   set spacing for macros
2338 .\" NS
2339 .\" NS modifies:
2340 .\" NS   doc-spaceXXX
2341 .\" NS
2342 .\" NS local variables:
2343 .\" NS   doc-reg-dssfm
2344 .\" NS   doc-reg-dssfm1
2345 .
2346 .de doc-set-spacing-1
2347 .  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
2348 .
2349 .  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
2350 .  \" argument)
2351 .  ie (\n[doc-reg-dssfm1] == 3) \{\
2352 .    if \n[doc-arg-limit] \{\
2353 .      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2354 .      ds doc-space\n[doc-reg-dssfm]
2355 .    \}
2356 .    ds doc-space\n[doc-arg-limit] "\*[doc-space]
2357 .  \}
2358 .  el \{\
2359 .    \" macros like .Ap and .Ns have value 2 (remove space before and after
2360 .    \" argument)
2361 .    ie (\n[doc-reg-dssfm1] == 2) \{\
2362 .      if \n[doc-arg-limit] \{\
2363 .        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
2364 .        ds doc-space\n[doc-reg-dssfm]
2365 .      \}
2366 .      ds doc-space\n[doc-arg-limit]
2367 .    \}
2368 .    el \
2369 .      ds doc-space\n[doc-arg-limit]
2370 .  \}
2371 ..
2372 .
2373 .
2374 .\" NS doc-set-spacing-2 macro
2375 .\" NS   set spacing for strings
2376 .\" NS
2377 .\" NS modifies:
2378 .\" NS   doc-spaceXXX
2379 .
2380 .de doc-set-spacing-2
2381 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2382 ..
2383 .
2384 .
2385 .\" NS doc-set-spacing-3 macro
2386 .\" NS   set spacing for punctuation suffixes
2387 .\" NS
2388 .\" NS modifies:
2389 .\" NS   doc-spaceXXX
2390 .\" NS
2391 .\" NS local variables:
2392 .\" NS   doc-reg-dssfps
2393 .
2394 .de doc-set-spacing-3
2395 .  if \n[doc-arg-limit] \{\
2396 .    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
2397 .    ds doc-space\n[doc-reg-dssfps]
2398 .  \}
2399 .
2400 .  ds doc-space\n[doc-arg-limit] "\*[doc-space]
2401 ..
2402 .
2403 .
2404 .\" NS doc-set-spacing-4 macro
2405 .\" NS   set spacing for punctuation prefixes
2406 .\" NS
2407 .\" NS modifies:
2408 .\" NS   doc-spaceXXX
2409 .
2410 .de doc-set-spacing-4
2411 .  ds doc-space\n[doc-arg-limit]
2412 ..
2413 .
2414 .
2415 .\" type switches (on current argument doc-arg-ptr)
2416 .
2417 .
2418 .\" NS doc-do-1 macro
2419 .\" NS   call request if macro
2420 .
2421 .de doc-do-1
2422 .  \*[doc-arg\n[doc-arg-ptr]]
2423 ..
2424 .
2425 .
2426 .\" NS doc-do-2 macro
2427 .\" NS   call .doc-print-recursive if string
2428 .
2429 .als doc-do-2 doc-print-recursive
2430 .
2431 .
2432 .\" NS doc-do-3 macro
2433 .\" NS   call .doc-print-recursive if punctuation suffix
2434 .
2435 .als doc-do-3 doc-print-recursive
2436 .
2437 .
2438 .\" NS doc-do-4 macro
2439 .\" NS   call .doc-print-recursive if punctuation prefix
2440 .
2441 .als doc-do-4 doc-print-recursive
2442 .
2443 .
2444 .\" NS doc-fontmode-depth global register
2445 .\" NS   font mode level
2446 .
2447 .nr doc-fontmode-depth 0
2448 .
2449 .
2450 .\" NS doc-fontmode-font-stackXXX global register
2451 .\" NS   stack of saved current font values from `Bf' macro
2452 .\" NS
2453 .\" NS limit:
2454 .\" NS   doc-fontmode-depth
2455 .
2456 .nr doc-fontmode-font-stack0 0
2457 .
2458 .
2459 .\" NS doc-fontmode-size-stackXXX global register
2460 .\" NS   stack of saved current size values from `Bf' macro
2461 .\" NS
2462 .\" NS limit:
2463 .\" NS   doc-fontmode-depth
2464 .
2465 .nr doc-fontmode-size-stack0 0
2466 .
2467 .
2468 .\" NS Bf user macro
2469 .\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
2470 .\" NS
2471 .\" NS modifies:
2472 .\" NS   doc-fontmode-depth
2473 .\" NS   doc-fontmode-font-stackXXX
2474 .\" NS   doc-fontmode-size-stackXXX
2475 .\" NS   doc-macro-name
2476 .\" NS
2477 .\" NS width register `Bf' set in doc-common
2478 .
2479 .de Bf
2480 .  ds doc-macro-name Bf
2481 .
2482 .  ie \n[.$] \{\
2483 .    nr doc-fontmode-depth +1
2484 .
2485 .    \" save current font and size
2486 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
2487 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
2488 .
2489 .    ie        "\$1"Em" \
2490 .      nop \*[doc-Em-font]\c
2491 .    el \{ .ie "\$1"Li" \
2492 .      nop \*[doc-Li-font]\c
2493 .    el \{ .ie "\$1"Sy" \
2494 .      nop \*[doc-Sy-font]\c
2495 .    el \{ .ie "\$1"-emphasis" \
2496 .      nop \*[doc-Em-font]\c
2497 .    el \{ .ie "\$1"-literal" \
2498 .      nop \*[doc-Li-font]\c
2499 .    el \{ .ie "\$1"-symbolic" \
2500 .      nop \*[doc-Sy-font]\c
2501 .    el \{\
2502 .      tmc mdoc warning: Unknown keyword `\$1' in .Bf macro
2503 .      tm1 " (#\n[.c])
2504 .  \}\}\}\}\}\}\}
2505 .  el \
2506 .    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
2507 ..
2508 .
2509 .
2510 .\" NS Ef user macro
2511 .\" NS   end font mode
2512 .\" NS
2513 .\" NS modifies:
2514 .\" NS   doc-macro-name
2515 .\" NS
2516 .\" NS width register `Ef' set in doc-common
2517 .
2518 .de Ef
2519 .  ds doc-macro-name Ef
2520 .
2521 .  ie \n[doc-fontmode-depth] \{\
2522 .    \" restore saved font and size
2523 .    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
2524 .    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
2525 .
2526 .    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
2527 .    nr doc-curr-font \n[.f]
2528 .    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
2529 .    nr doc-curr-size \n[.ps]
2530 .    nr doc-fontmode-depth -1
2531 .  \}
2532 .  el \
2533 .    tm mdoc warning: Extraneous .Ef (#\n[.c])
2534 ..
2535 .
2536 .
2537 .\" NS doc-keep-type global register
2538 .\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
2539 .
2540 .nr doc-keep-type 0
2541 .
2542 .
2543 .\" NS Bk user macro
2544 .\" NS   begin keep
2545 .\" NS
2546 .\" NS modifies:
2547 .\" NS   doc-keep-type
2548 .\" NS   doc-macro-name
2549 .\" NS
2550 .\" NS width register `Bk' set in doc-common
2551 .
2552 .de Bk
2553 .  ds doc-macro-name Bk
2554 .
2555 .  if \n[doc-keep-type] \
2556 .    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
2557 .
2558 .  ie        "\$1"-lines" \{\
2559 .    nr doc-keep-type 2
2560 .    tm .Bk -lines: Not implemented yet. (#\n[.c])
2561 .  \}
2562 .  el \{ .ie "\$1"-words" \{\
2563 .    nr doc-keep-type 1
2564 .    doc-set-hard-space
2565 .  \}
2566 .  el \{ .ie "\$1"" \{\
2567 .    \" default
2568 .    nr doc-keep-type 1
2569 .    doc-set-hard-space
2570 .  \}
2571 .  el \{\
2572 .    tm mdoc warning: Unknown keyword `\$1' in .Bk macro (#\n[.c])
2573 .    nr doc-keep-type 3
2574 .  \}\}\}
2575 .
2576 \#.  nr doc-nesting-level +1
2577 ..
2578 .
2579 .
2580 .\" NS Ek user macro
2581 .\" NS   end keep
2582 .\" NS
2583 .\" NS modifies:
2584 .\" NS   doc-keep-type
2585 .\" NS   doc-macro-name
2586 .\" NS
2587 .\" NS width register `Ek' set in doc-common
2588 .
2589 .de Ek
2590 .  ds doc-macro-name Ek
2591 .
2592 \#.  nr doc-nesting-level -1
2593 .
2594 .  ie \n[.$] \
2595 .    tm Usage: .Ek (does not take arguments) (#\n[.c])
2596 .  el \{\
2597 .    if !\n[doc-keep-type] \
2598 .      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
2599 .
2600 .    ie        (\n[doc-keep-type] == 1) \
2601 .      doc-set-soft-space
2602 .    el \{ .if (\n[doc-keep-type] == 2) \
2603 .      tm .Bk -lines: Not implemented yet. (#\n[.c])
2604 .  \}\}
2605 .
2606 .  nr doc-keep-type 0
2607 .
2608 \#.  if !"\*[doc-out-string]"" \
2609 \#.    doc-print-out-string
2610 ..
2611 .
2612 .
2613 .\" NS doc-display-depth global register
2614 .\" NS   display level
2615 .
2616 .nr doc-display-depth 0
2617 .
2618 .
2619 .\" NS doc-is-compact global register (bool)
2620 .\" NS   set if the `compact' keyword is given
2621 .
2622 .nr doc-is-compact 0
2623 .
2624 .
2625 .\" NS doc-display-type-stackXXX global string
2626 .\" NS   the display type stack
2627 .\" NS
2628 .\" NS limit:
2629 .\" NS   doc-display-depth
2630 .
2631 .ds doc-display-type-stack0
2632 .
2633 .
2634 .\" NS doc-display-indent-stackXXX global register
2635 .\" NS   stack of display indentation values
2636 .\" NS
2637 .\" NS limit:
2638 .\" NS   doc-display-depth
2639 .
2640 .nr doc-display-indent-stack0 0
2641 .
2642 .
2643 .\" NS doc-display-ad-stackXXX global register
2644 .\" NS   stack of saved adjustment modes
2645 .\" NS
2646 .\" NS limit:
2647 .\" NS   doc-display-depth
2648 .
2649 .nr doc-display-ad-stack0 0
2650 .
2651 .
2652 .\" NS doc-display-fi-stackXXX global register
2653 .\" NS   stack of saved fill modes
2654 .\" NS
2655 .\" NS limit:
2656 .\" NS   doc-display-depth
2657 .
2658 .nr doc-display-fi-stack0 0
2659 .
2660 .
2661 .\" NS doc-display-ft-stackXXX global register
2662 .\" NS   stack of saved fonts
2663 .\" NS
2664 .\" NS limit:
2665 .\" NS   doc-display-depth
2666 .
2667 .nr doc-display-ft-stack0 0
2668 .
2669 .
2670 .\" NS doc-display-ps-stackXXX global register
2671 .\" NS   stack of saved font sizes
2672 .\" NS
2673 .\" NS limit:
2674 .\" NS   doc-display-depth
2675 .
2676 .nr doc-display-ps-stack0 0
2677 .
2678 .
2679 .\" NS Bd user macro
2680 .\" NS   begin display
2681 .\" NS
2682 .\" NS width register `Bd' set in doc-common
2683 .\" NS
2684 .\" NS modifies:
2685 .\" NS   doc-curr-font
2686 .\" NS   doc-curr-size
2687 .\" NS   doc-display-depth
2688 .\" NS   doc-display-ad-stackXXX
2689 .\" NS   doc-display-fi-stackXXX
2690 .\" NS   doc-display-ft-stackXXX
2691 .\" NS   doc-display-ps-stackXXX
2692 .\" NS   doc-display-file
2693 .\" NS   doc-display-indent-stackXXX
2694 .\" NS   doc-display-type-stackXXX
2695 .\" NS   doc-is-compact
2696 .\" NS   doc-macro-name
2697 .\" NS
2698 .\" NS local variables:
2699 .\" NS   doc-reg-Bd
2700 .
2701 .de Bd
2702 .  ds doc-macro-name Bd
2703 .
2704 .  if !\n[.$] \{\
2705 .    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
2706 .    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
2707 .    return
2708 .  \}
2709 .
2710 .  nr doc-is-compact 0
2711 .  ds doc-display-file
2712 .  nr doc-reg-Bd 1
2713 .  nr doc-display-depth +1
2714 .
2715 .  \" save current adjustment and fill modes
2716 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
2717 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
2718 .
2719 .  ie        "\$1"-literal" \{\
2720 .    ds doc-display-type-stack\n[doc-display-depth] literal
2721 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
2722 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
2723 .
2724 .    ie t \
2725 .      ta T 9n
2726 .    el \
2727 .      ta T 8n
2728 .    nf
2729 .  \}
2730 .  el \{ .ie "\$1"-filled" \{\
2731 .    ds doc-display-type-stack\n[doc-display-depth] filled
2732 .    ad b
2733 .    fi
2734 .  \}
2735 .  el \{ .ie "\$1"-ragged" \{\
2736 .    ds doc-display-type-stack\n[doc-display-depth] ragged
2737 .    na
2738 .    fi
2739 .  \}
2740 .  el \{ .ie "\$1"-centered" \{\
2741 .    ds doc-display-type-stack\n[doc-display-depth] centered
2742 .    ad c
2743 .    fi
2744 .  \}
2745 .  el \{ .ie "\$1"-unfilled" \{\
2746 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
2747 .    nf
2748 .  \}
2749 .  el \{\
2750 .    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
2751 .    tm1 "              in .Bd macro (#\n[.c])
2752 .    nr doc-reg-Bd 0
2753 .  \}\}\}\}\}
2754 .
2755 .  \" have we seen an argument?
2756 .  if \n[doc-reg-Bd] \{\
2757 .    shift
2758 .    \" check other arguments
2759 .    if \n[.$] \
2760 .      doc-do-Bd-args \$@
2761 .  \}
2762 .
2763 .  \" avoid warning about non-existent register
2764 .  if !r doc-display-indent-stack\n[doc-display-depth] \
2765 .    nr doc-display-indent-stack\n[doc-display-depth] 0
2766 .
2767 .  if \n[doc-display-indent-stack\n[doc-display-depth]] \
2768 .    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
2769 .
2770 .  if !\n[doc-is-compact] \
2771 .    sp \n[doc-display-vertical]u
2772 .
2773 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \
2774 .    if t \
2775 .      nop \*[doc-Li-font]\c
2776 .
2777 .  if !\n[cR] \
2778 .    ne 2v
2779 .
2780 .  if !"\*[doc-display-file]"" \
2781 .    so \*[doc-display-file]
2782 .
2783 .  nr doc-is-compact 0
2784 .  ds doc-display-file
2785 ..
2786 .
2787 .
2788 .\" NS doc-do-Bd-args macro
2789 .\" NS   resolve remaining .Bd arguments
2790 .\" NS
2791 .\" NS modifies:
2792 .\" NS   doc-display-file
2793 .\" NS   doc-display-indent-stackXXX
2794 .\" NS   doc-is-compact
2795 .\" NS
2796 .\" NS local variables:
2797 .\" NS   doc-reg-ddBa
2798 .\" NS   doc-reg-ddBa1
2799 .\" NS   doc-reg-ddBa2
2800 .\" NS   doc-reg-ddBa3
2801 .\" NS   doc-reg-ddBa4
2802 .\" NS   doc-str-ddBa
2803 .
2804 .de doc-do-Bd-args
2805 .  nr doc-reg-ddBa 1
2806 .
2807 .  ie        "\$1"-offset" \{\
2808 .    nr doc-reg-ddBa 2
2809 .
2810 .    ie        "\$2"left" \
2811 .      nr doc-display-indent-stack\n[doc-display-depth] 0
2812 .    el \{ .ie "\$2"right" \
2813 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
2814 .    el \{ .ie "\$2"center" \
2815 .      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
2816 .    el \{ .ie "\$2"indent" \
2817 .      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
2818 .    el \{ .ie "\$2"indent-two" \
2819 .      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
2820 .    el \
2821 .      nr doc-reg-ddBa 1
2822 .    \}\}\}\}
2823 .
2824 .    \" not a known keyword
2825 .    if (\n[doc-reg-ddBa] == 1) \{\
2826 .      nr doc-reg-ddBa 2
2827 .
2828 .      nr doc-reg-ddBa1 0
2829 .      if \B\a(\$2)\a \{\
2830 .        \" disable warnings related to scaling indicators (32)
2831 .        nr doc-reg-ddBa2 \n[.warn]
2832 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
2833 .
2834 .        \" values without a scaling indicator are taken as strings;
2835 .        \" we test whether the parameter string with and without the last
2836 .        \" character yields identical numerical results (ignoring the
2837 .        \" scaling indicator)
2838 .        ds doc-str-ddBa "\$2
2839 .        substring doc-str-ddBa 0 -2
2840 .        if \B\a(\*[doc-str-ddBa])\a \{\
2841 .          nr doc-reg-ddBa3 (;(\$2))
2842 .          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
2843 .          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
2844 .            nr doc-reg-ddBa1 1
2845 .        \}
2846 .
2847 .        \" enable all warnings again
2848 .        warn \n[doc-reg-ddBa2]
2849 .      \}
2850 .
2851 .      ie \n[doc-reg-ddBa1] \
2852 .        nr doc-display-indent-stack\n[doc-display-depth] \$2
2853 .      el \{\
2854 .        doc-get-width "\$2"
2855 .        ie (\n[doc-width] <= 3) \{\
2856 .          \" if the offset parameter is a macro, use the macro's
2857 .          \" width as specified in doc-common
2858 .          doc-get-arg-type "\$2"
2859 .          ie (\n[doc-arg-type] == 1) \
2860 .            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
2861 .          el \
2862 .            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2863 .        \}
2864 .        el \
2865 .          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
2866 .    \}\}
2867 .  \}
2868 .  el \{ .ie "\$1"-compact" \
2869 .    nr doc-is-compact 1
2870 .  el \{ .ie "\$1"-file" \{\
2871 .    ie !"\$2"" \{\
2872 .      ds doc-display-file "\$2
2873 .      nr doc-reg-ddBa 2
2874 .    \}
2875 .    el \
2876 .      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
2877 .  \}
2878 .  el \
2879 .      tm mdoc warning: Unknown keyword `\$1' in .Bd macro (#\n[.c])
2880 .  \}\}
2881 .
2882 .  if (\n[doc-reg-ddBa] < \n[.$]) \{\
2883 .    shift \n[doc-reg-ddBa]
2884 .    doc-do-Bd-args \$@
2885 .  \}
2886 ..
2887 .
2888 .
2889 .\" NS Ed user macro
2890 .\" NS   end display
2891 .\" NS
2892 .\" NS modifies:
2893 .\" NS   doc-display-depth
2894 .\" NS   doc-display-indent-stackXXX
2895 .\" NS   doc-display-type-stackXXX
2896 .\" NS   doc-macro-name
2897 .\" NS
2898 .\" NS width register `Ed' set in doc-common
2899 .
2900 .de Ed
2901 .  ds doc-macro-name Ed
2902 .
2903 .  br
2904 .
2905 .  if !\n[doc-display-depth] \{\
2906 .    tm mdoc warning: Extraneous .Ed (#\n[.c])
2907 .    nr doc-display-depth 1
2908 .  \}
2909 .
2910 .  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
2911 .    ft \n[doc-display-ft-stack\n[doc-display-depth]]
2912 .    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
2913 .  \}
2914 .
2915 .  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
2916 .
2917 .  \" restore saved adjustment and fill modes
2918 .  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
2919 .    fi
2920 .  el \
2921 .    nf
2922 .  ad \n[doc-display-ad-stack\n[doc-display-depth]]
2923 .
2924 .  nr doc-display-indent-stack\n[doc-display-depth] 0
2925 .  ds doc-display-type-stack\n[doc-display-depth]
2926 .  nr doc-display-depth -1
2927 ..
2928 .
2929 .
2930 .\" NS doc-list-type-stackXXX global string
2931 .\" NS   stack of list types
2932 .\" NS
2933 .\" NS limit:
2934 .\" NS   doc-list-depth
2935 .
2936 .ds doc-list-type-stack1
2937 .
2938 .
2939 .\" NS doc-list-indent-stackXXX global register
2940 .\" NS   stack of list indentation values
2941 .\" NS
2942 .\" NS limit:
2943 .\" NS   doc-list-depth
2944 .
2945 .nr doc-list-indent-stack1 0
2946 .
2947 .
2948 .\" NS doc-list-have-indent-stackXXX global register (bool)
2949 .\" NS   an indentation value is active
2950 .\" NS
2951 .\" NS limit:
2952 .\" NS   doc-list-depth
2953 .
2954 .nr doc-list-have-indent-stack1 0
2955 .
2956 .
2957 .\" NS Bl user macro
2958 .\" NS   begin list
2959 .\" NS
2960 .\" NS width register `Bl' set in doc-common
2961 .\" NS
2962 .\" NS modifies:
2963 .\" NS   doc-arg-ptr
2964 .\" NS   doc-argXXX
2965 .\" NS   doc-list-depth
2966 .\" NS   doc-list-have-indent-stackXXX
2967 .\" NS   doc-list-indent-stackXXX
2968 .\" NS   doc-list-type-stackXXX
2969 .\" NS   doc-macro-name
2970 .\" NS   doc-num-args
2971 .\" NS   doc-num-columns
2972 .\" NS
2973 .\" NS local variables:
2974 .\" NS   doc-reg-Bl
2975 .
2976 .de Bl
2977 .  if !\n[.$] \{\
2978 .    doc-Bl-usage
2979 .    return
2980 .  \}
2981 .
2982 .  ds doc-macro-name Bl
2983 .  nr doc-list-depth +1
2984 .  nr doc-arg-ptr 1
2985 .
2986 .  ie        "\$1"-hang" \{\
2987 .    ds doc-list-type-stack\n[doc-list-depth] hang-list
2988 .    nr doc-list-indent-stack\n[doc-list-depth] 6n
2989 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2990 .  \}
2991 .  el \{ .ie "\$1"-tag" \{\
2992 .    ds doc-list-type-stack\n[doc-list-depth] tag-list
2993 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2994 .  \}
2995 .  el \{ .ie "\$1"-item" \{\
2996 .    ds doc-list-type-stack\n[doc-list-depth] item-list
2997 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
2998 .  \}
2999 .  el \{ .ie "\$1"-enum" \{\
3000 .    ds doc-list-type-stack\n[doc-list-depth] enum-list
3001 .    nr doc-list-indent-stack\n[doc-list-depth] 3n
3002 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3003 .  \}
3004 .  el \{ .ie "\$1"-bullet" \{\
3005 .    ds doc-list-type-stack\n[doc-list-depth] bullet-list
3006 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3007 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3008 .  \}
3009 .  el \{ .ie "\$1"-dash" \{\
3010 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
3011 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3012 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3013 .  \}
3014 .  el \{ .ie "\$1"-hyphen" \{\
3015 .    ds doc-list-type-stack\n[doc-list-depth] dash-list
3016 .    nr doc-list-indent-stack\n[doc-list-depth] 2n
3017 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3018 .  \}
3019 .  el \{ .ie "\$1"-inset" \{\
3020 .    ds doc-list-type-stack\n[doc-list-depth] inset-list
3021 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3022 .  \}
3023 .  el \{ .ie "\$1"-diag" \{\
3024 .    ds doc-list-type-stack\n[doc-list-depth] diag-list
3025 .  \}
3026 .  el \{ .ie "\$1"-ohang" \{\
3027 .    ds doc-list-type-stack\n[doc-list-depth] ohang-list
3028 .    nr doc-list-have-indent-stack\n[doc-list-depth] 1
3029 .  \}
3030 .  el \{ .ie "\$1"-column" \{\
3031 .    ds doc-list-type-stack\n[doc-list-depth] column-list
3032 .    linetabs 1
3033 .  \}
3034 .  el \{\
3035 .    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
3036 .    tm1 "              in .Bl macro
3037 .    tm
3038 .    nr doc-arg-ptr 0
3039 .  \}\}\}\}\}\}\}\}\}\}\}
3040 .
3041 .  \" we have seen a list type
3042 .  if !\n[doc-arg-ptr] \{\
3043 .    doc-Bl-usage
3044 .    doc-reset-args
3045 .    nr doc-list-depth -1
3046 .    return
3047 .  \}
3048 .
3049 .  shift
3050 .
3051 .  \" fill argument vector
3052 .  nr doc-reg-Bl 1
3053 .  while (\n[doc-reg-Bl] <= \n[.$]) \{\
3054 .    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
3055 .    \" dummy type and space so that doc-save-global-vars() doesn't warn
3056 .    nr doc-type\n[doc-reg-Bl] 0
3057 .    ds doc-space\n[doc-reg-Bl]
3058 .    nr doc-reg-Bl +1
3059 .  \}
3060 .
3061 .  doc-increment-list-stack
3062 .
3063 .  if \n[.$] \{\
3064 .    nr doc-arg-limit \n[.$]
3065 .    nr doc-arg-ptr 0
3066 .    doc-do-Bl-args
3067 .
3068 .    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
3069 .
3070 .    \" initialize column list
3071 .    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3072 .      doc-set-column-tab \n[doc-num-columns]
3073 '      in -\n[doc-column-indent-width]u
3074 .      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
3075 .        sp \n[doc-display-vertical]u
3076 .
3077 .      nf
3078 .      nr doc-num-columns 0
3079 .  \}\}
3080 .
3081 .  doc-reset-args
3082 ..
3083 .
3084 .
3085 .\" NS doc-Bl-usage macro
3086 .
3087 .de doc-Bl-usage
3088 .  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
3089 .  tm1 "             [-width <string>]
3090 .  tm1 "             [-offset <string>] [-compact]
3091 .  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
3092 .  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
3093 .  tm1 "             [-offset <string>] [-compact] (#\n[.c])
3094 ..
3095 .
3096 .
3097 .\" NS doc-do-Bl-args macro
3098 .\" NS   resolve remaining .Bl arguments
3099 .\" NS
3100 .\" NS modifies:
3101 .\" NS   doc-arg-ptr
3102 .\" NS   doc-argXXX
3103 .\" NS   doc-compact-list-stackXXX
3104 .\" NS   doc-list-indent-stackXXX
3105 .\" NS   doc-list-offset-stackXXX
3106 .\" NS   doc-num-columns
3107 .\" NS   doc-tag-prefix-stackXXX
3108 .\" NS   doc-tag-width-stackXXX
3109 .\" NS
3110 .\" NS local variables:
3111 .\" NS   doc-box-dBla
3112 .\" NS   doc-env-dBla
3113 .\" NS   doc-reg-dBla
3114 .\" NS   doc-reg-dBla1
3115 .\" NS   doc-reg-dBla2
3116 .\" NS   doc-reg-dBla3
3117 .\" NS   doc-reg-dBla4
3118 .\" NS   doc-str-dBla
3119 .\" NS   doc-str-dBla1
3120 .
3121 .de doc-do-Bl-args
3122 .  nr doc-arg-ptr +1
3123 .
3124 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
3125 .    return
3126 .
3127 .  \" avoid a warning message in case e.g. `-offset' has no parameter
3128 .  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
3129 .  if !d doc-arg\n[doc-reg-dBla] \
3130 .    ds doc-arg\n[doc-reg-dBla]
3131 .
3132 .  nr doc-reg-dBla 1
3133 .
3134 .  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
3135 .    nr doc-compact-list-stack\n[doc-list-depth] 1
3136 .
3137 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
3138 .    ie (\n[doc-list-depth] > 1) \{\
3139 .      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
3140 .      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
3141 .      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
3142 .      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
3143 .      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
3144 .    \}
3145 .    el \
3146 .      tm mdoc warning: `-nested' allowed with nested .Bl macros only (#\n[.c])
3147 .  \}
3148 .
3149 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
3150 .    nr doc-arg-ptr +1
3151 .    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
3152 .
3153 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3154 .    substring doc-str-dBla 0 0
3155 .    ie \a.\a\*[doc-str-dBla]\a \{\
3156 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3157 .      substring doc-str-dBla 1
3158 .      doc-first-parameter \*[doc-str-dBla]
3159 .      doc-get-width "\*[doc-str-dfp]
3160 .      doc-get-arg-type "\*[doc-str-dfp]
3161 .      ie (\n[doc-arg-type] == 1) \
3162 .        nr doc-reg-dBla1 1
3163 .      el \
3164 .        nr doc-reg-dBla1 0
3165 .    \}
3166 .    el \
3167 .      nr doc-reg-dBla1 0
3168 .    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3169 .
3170 .    ie \n[doc-reg-dBla1] \{\
3171 .      \" execute string in a box to get the width of the diversion
3172 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3173 .      doc-save-global-vars
3174 .      doc-reset-args
3175 .      box doc-box-dBla
3176 .      ev doc-env-dBla
3177 .      evc 0
3178 .      in 0
3179 .      nf
3180 .      nop \*[doc-str-dBla]
3181 .      br
3182 .      ev
3183 .      box
3184 .      doc-restore-global-vars
3185 .      doc-get-width \h'\n[dl]u'
3186 .      nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3187 .    \}
3188 .    el \{\
3189 .      \" test whether argument is a valid numeric expression
3190 .      nr doc-reg-dBla1 0
3191 .      if \B\a(\*[doc-str-dBla])\a \{\
3192 .        \" disable warnings related to scaling indicators (32)
3193 .        nr doc-reg-dBla2 \n[.warn]
3194 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3195 .
3196 .        \" values without a scaling indicator are taken as strings;
3197 .        \" we test whether the parameter string with and without the last
3198 .        \" character yields identical numerical results (ignoring the
3199 .        \" scaling indicator)
3200 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3201 .        substring doc-str-dBla1 0 -2
3202 .        if \B\a(\*[doc-str-dBla1])\a \{\
3203 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3204 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3205 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3206 .            nr doc-reg-dBla1 1
3207 .        \}
3208 .
3209 .        \" enable all warnings again
3210 .        warn \n[doc-reg-dBla2]
3211 .      \}
3212 .
3213 .      ie \n[doc-reg-dBla1] \
3214 .        nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
3215 .      el \{\
3216 .        doc-get-arg-width \n[doc-arg-ptr]
3217 .        ie (\n[doc-width] == 2) \{\
3218 .          \" if the width parameter is a macro, use the macro's
3219 .          \" width as specified in doc-common
3220 .          doc-get-arg-type \*[doc-str-dBla]
3221 .          ie (\n[doc-arg-type] == 1) \
3222 .            nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3223 .          el \
3224 .            nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3225 .        \}
3226 .        el \
3227 .          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3228 .  \}\}\}
3229 .
3230 .  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
3231 .    nr doc-arg-ptr +1
3232 .
3233 .    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
3234 .      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
3235 .    el \{\
3236 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3237 .      nr doc-reg-dBla1 0
3238 .      if \B\a(\*[doc-str-dBla])\a \{\
3239 .        nr doc-reg-dBla2 \n[.warn]
3240 .        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
3241 .
3242 .        ds doc-str-dBla1 "\*[doc-str-dBla]
3243 .        substring doc-str-dBla1 0 -2
3244 .        if \B\a(\*[doc-str-dBla1])\a \{\
3245 .          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
3246 .          nr doc-reg-dBla4 (\*[doc-str-dBla1])
3247 .          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
3248 .            nr doc-reg-dBla1 1
3249 .        \}
3250 .
3251 .        warn \n[doc-reg-dBla2]
3252 .      \}
3253 .
3254 .      ie \n[doc-reg-dBla1] \
3255 .        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
3256 .      el \{\
3257 .        doc-get-arg-width \n[doc-arg-ptr]
3258 .        ie (\n[doc-width] <= 3) \{\
3259 .          \" if the offset parameter is a macro, use the macro's
3260 .          \" width as specified in doc-common
3261 .          doc-get-arg-type \*[doc-str-dBla]
3262 .          ie (\n[doc-arg-type] == 1) \
3263 .            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
3264 .          el \
3265 .            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3266 .        \}
3267 .        el \
3268 .          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
3269 .  \}\}\}
3270 .  el \
3271 .    nr doc-reg-dBla 0
3272 .  \}\}\}
3273 .
3274 .  \" not a known keyword, so it specifies the width of the next column
3275 .  \" (if it is a column list)
3276 .  if !\n[doc-reg-dBla] \{\
3277 .    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
3278 .      nr doc-num-columns +1
3279 .      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3280 .      substring doc-str-dBla 0 0
3281 .      ie \a.\a\*[doc-str-dBla]\a \{\
3282 .        ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3283 .        substring doc-str-dBla 1
3284 .        doc-first-parameter \*[doc-str-dBla]
3285 .        doc-get-width "\*[doc-str-dfp]
3286 .        doc-get-arg-type "\*[doc-str-dfp]
3287 .        ie (\n[doc-arg-type] == 1) \
3288 .          nr doc-reg-dBla1 1
3289 .        el \
3290 .          nr doc-reg-dBla1 0
3291 .      \}
3292 .      el \
3293 .        nr doc-reg-dBla1 0
3294 .      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
3295 .
3296 .      ie \n[doc-reg-dBla1] \{\
3297 .        \" execute string in a box to get the width of the diversion
3298 .        ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
3299 .        doc-save-global-vars
3300 .        doc-reset-args
3301 .        box doc-box-dBla
3302 .        ev doc-env-dBla
3303 .        evc 0
3304 .        in 0
3305 .        nf
3306 .        nop \*[doc-str-dBla]
3307 .        br
3308 .        ev
3309 .        box
3310 .        doc-restore-global-vars
3311 .        ds doc-arg\n[doc-num-columns] "\h'\n[dl]u'
3312 .      \}
3313 .      el \
3314 .        ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
3315 .    \}
3316 .    el \{\
3317 .      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
3318 .      tm1 " in .Bl macro (#\n[.c])
3319 .  \}\}
3320 .
3321 .  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
3322 .    doc-do-Bl-args
3323 ..
3324 .
3325 .
3326 .\" NS doc-save-global-vars macro
3327 .\" NS   save all global variables
3328 .\" NS
3329 .\" NS local variables:
3330 .\" NS   doc-reg-dsgv
3331 .
3332 .de doc-save-global-vars
3333 .  ds doc-macro-name-saved "\*[doc-macro-name]
3334 .  nr doc-arg-limit-saved \n[doc-arg-limit]
3335 .  nr doc-num-args-saved \n[doc-num-args]
3336 .  nr doc-arg-ptr-saved \n[doc-arg-ptr]
3337 .
3338 .  nr doc-reg-dsgv 1
3339 .  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
3340 .    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
3341 .    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
3342 .    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
3343 .    nr doc-reg-dsgv +1
3344 .  \}
3345 .
3346 .  nr doc-curr-font-saved \n[doc-curr-font]
3347 .  nr doc-curr-size-saved \n[doc-curr-size]
3348 .  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
3349 .  nr doc-in-library-section-saved \n[doc-in-library-section]
3350 .  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
3351 .  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
3352 .  nr doc-have-decl-saved \n[doc-have-decl]
3353 .  nr doc-have-var-saved \n[doc-have-var]
3354 .  ds doc-command-name-saved "\*[doc-command-name]
3355 .  ds doc-quote-left-saved "\*[doc-quote-left]
3356 .  ds doc-quote-right-saved "\*[doc-quote-right]
3357 .  nr doc-nesting-level-saved \n[doc-nesting-level]
3358 .  nr doc-in-list-saved \n[doc-in-list]
3359 .  ds doc-space-saved "\*[doc-space]
3360 .  ds doc-saved-space-saved "\*[doc-saved-space]
3361 .  nr doc-space-mode-saved \n[doc-space-mode]
3362 .  nr doc-have-space-saved \n[doc-have-space]
3363 .  nr doc-have-slot-saved \n[doc-have-slot]
3364 .  nr doc-keep-type-saved \n[doc-keep-type]
3365 .  nr doc-display-depth-saved \n[doc-display-depth]
3366 .  nr doc-is-compact-saved \n[doc-is-compact]
3367 .
3368 .  nr doc-reg-dsgv 0
3369 .  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
3370 .    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
3371 .    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
3372 .    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
3373 .    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
3374 .    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
3375 .    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
3376 .    nr doc-reg-dsgv +1
3377 .  \}
3378 .
3379 .  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
3380 .
3381 .  nr doc-reg-dsgv 1
3382 .  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
3383 .    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
3384 .    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
3385 .    nr doc-reg-dsgv +1
3386 .  \}
3387 .
3388 .  nr doc-list-depth-saved \n[doc-list-depth]
3389 .
3390 .  nr doc-reg-dsgv 1
3391 .  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
3392 .    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
3393 .    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
3394 .    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
3395 .    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
3396 .    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
3397 .    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
3398 .    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
3399 .    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
3400 .    nr doc-reg-dsgv +1
3401 .  \}
3402 .
3403 .  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
3404 .  nr doc-curr-type-saved \n[doc-curr-type]
3405 .  ds doc-curr-arg-saved "\*[doc-curr-arg]
3406 .  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
3407 .  nr doc-num-columns-saved \n[doc-num-columns]
3408 .  nr doc-column-indent-width-saved \n[doc-column-indent-width]
3409 .  nr doc-is-func-saved \n[doc-is-func]
3410 .  nr doc-have-old-func-saved \n[doc-have-old-func]
3411 .  nr doc-func-arg-count-saved \n[doc-func-arg-count]
3412 .  ds doc-func-arg-saved "\*[doc-func-arg]
3413 .  nr doc-num-func-args-saved \n[doc-num-func-args]
3414 .  nr doc-func-args-processed-saved \n[doc-func-args-processed]
3415 .  nr doc-have-func-saved \n[doc-have-func]
3416 .  nr doc-is-reference-saved \n[doc-is-reference]
3417 .  nr doc-reference-count-saved \n[doc-reference-count]
3418 .  nr doc-author-count-saved \n[doc-author-count]
3419 .
3420 .  nr doc-reg-dsgv 0
3421 .  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
3422 .    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
3423 .    nr doc-reg-dsgv +1
3424 .  \}
3425 .
3426 .  nr doc-book-count-saved \n[doc-book-count]
3427 .  ds doc-book-name-saved "\*[doc-book-name]
3428 .  nr doc-city-count-saved \n[doc-city-count]
3429 .  ds doc-city-name-saved "\*[doc-city-name]
3430 .  nr doc-date-count-saved \n[doc-date-count]
3431 .  ds doc-date-saved "\*[doc-date]
3432 .  nr doc-publisher-count-saved \n[doc-publisher-count]
3433 .  ds doc-publisher-name-saved "\*[doc-publisher-name]
3434 .  nr doc-journal-count-saved \n[doc-journal-count]
3435 .  ds doc-journal-name-saved "\*[doc-journal-name]
3436 .  nr doc-issue-count-saved \n[doc-issue-count]
3437 .  ds doc-issue-name-saved "\*[doc-issue-name]
3438 .  nr doc-optional-count-saved \n[doc-optional-count]
3439 .  ds doc-optional-string-saved "\*[doc-optional-string]
3440 .  nr doc-page-number-count-saved \n[doc-page-number-count]
3441 .  ds doc-page-number-string-saved "\*[doc-page-number-string]
3442 .  nr doc-corporate-count-saved \n[doc-corporate-count]
3443 .  ds doc-corporate-name-saved "\*[doc-corporate-name]
3444 .  nr doc-report-count-saved \n[doc-report-count]
3445 .  ds doc-report-name-saved "\*[doc-report-name]
3446 .  nr doc-reference-title-count-saved \n[doc-reference-title-count]
3447 .  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
3448 .  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
3449 .  nr doc-url-count-saved \n[doc-url-count]
3450 .  ds doc-url-name-saved "\*[doc-url-name]
3451 .  nr doc-volume-count-saved \n[doc-volume-count]
3452 .  ds doc-volume-name-saved "\*[doc-volume-name]
3453 .  nr doc-have-author-saved \n[doc-have-author]
3454 .
3455 .  ds doc-document-title-saved "\*[doc-document-title]
3456 .  ds doc-volume-saved "\*[doc-volume]
3457 .  ds doc-section-saved "\*[doc-section]
3458 .  ds doc-operating-system-saved "\*[doc-operating-system]
3459 .  ds doc-date-string-saved "\*[doc-date-string]
3460 .  nr doc-header-space-saved \n[doc-header-space]
3461 .  nr doc-footer-space-saved \n[doc-footer-space]
3462 .  nr doc-display-vertical-saved \n[doc-display-vertical]
3463 .  ds doc-header-string-saved "\*[doc-header-string]
3464 .  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
3465 .  nr doc-in-files-section-saved \n[doc-in-files-section]
3466 .  nr doc-in-authors-section-saved \n[doc-in-authors-section]
3467 ..
3468 .
3469 .
3470 .\" NS doc-restore-global-vars macro
3471 .\" NS   restore all global variables
3472 .\" NS
3473 .\" NS local variables:
3474 .\" NS   doc-reg-drgv
3475 .
3476 .de doc-restore-global-vars
3477 .  ds doc-macro-name "\*[doc-macro-name-saved]
3478 .  nr doc-arg-limit \n[doc-arg-limit-saved]
3479 .  nr doc-num-args \n[doc-num-args-saved]
3480 .  nr doc-arg-ptr \n[doc-arg-ptr-saved]
3481 .
3482 .  nr doc-reg-drgv 1
3483 .  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
3484 .    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
3485 .    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
3486 .    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
3487 .    nr doc-reg-drgv +1
3488 .  \}
3489 .
3490 .  nr doc-curr-font \n[doc-curr-font-saved]
3491 .  nr doc-curr-size \n[doc-curr-size-saved]
3492 .  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
3493 .  nr doc-in-library-section \n[doc-in-library-section-saved]
3494 .  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
3495 .  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
3496 .  nr doc-have-decl \n[doc-have-decl-saved]
3497 .  nr doc-have-var \n[doc-have-var-saved]
3498 .  ds doc-command-name "\*[doc-command-name-saved]
3499 .  ds doc-quote-left "\*[doc-quote-left-saved]
3500 .  ds doc-quote-right "\*[doc-quote-right-saved]
3501 .  nr doc-nesting-level \n[doc-nesting-level-saved]
3502 .  nr doc-in-list \n[doc-in-list-saved]
3503 .  ds doc-space "\*[doc-space-saved]
3504 .  ds doc-saved-space "\*[doc-saved-space-saved]
3505 .  nr doc-space-mode \n[doc-space-mode-saved]
3506 .  nr doc-have-space \n[doc-have-space-saved]
3507 .  nr doc-have-slot \n[doc-have-slot-saved]
3508 .  nr doc-keep-type \n[doc-keep-type-saved]
3509 .  nr doc-display-depth \n[doc-display-depth-saved]
3510 .  nr doc-is-compact \n[doc-is-compact-saved]
3511 .
3512 .  nr doc-reg-drgv 0
3513 .  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
3514 .    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
3515 .    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
3516 .    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
3517 .    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
3518 .    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
3519 .    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
3520 .    nr doc-reg-drgv +1
3521 .  \}
3522 .
3523 .  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
3524 .
3525 .  nr doc-reg-drgv 1
3526 .  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
3527 .    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
3528 .    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
3529 .    nr doc-reg-drgv +1
3530 .  \}
3531 .
3532 .  nr doc-list-depth \n[doc-list-depth-saved]
3533 .
3534 .  nr doc-reg-drgv 1
3535 .  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
3536 .    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
3537 .    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
3538 .    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
3539 .    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
3540 .    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
3541 .    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
3542 .    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
3543 .    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
3544 .    nr doc-reg-drgv +1
3545 .  \}
3546 .
3547 .  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
3548 .  nr doc-curr-type \n[doc-curr-type-saved]
3549 .  ds doc-curr-arg "\*[doc-curr-arg-saved]
3550 .  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
3551 .  nr doc-num-columns \n[doc-num-columns-saved]
3552 .  nr doc-column-indent-width \n[doc-column-indent-width-saved]
3553 .  nr doc-is-func \n[doc-is-func-saved]
3554 .  nr doc-have-old-func \n[doc-have-old-func-saved]
3555 .  nr doc-func-arg-count \n[doc-func-arg-count-saved]
3556 .  ds doc-func-arg "\*[doc-func-arg-saved]
3557 .  nr doc-num-func-args \n[doc-num-func-args-saved]
3558 .  nr doc-func-args-processed \n[doc-func-args-processed-saved]
3559 .  nr doc-have-func \n[doc-have-func-saved]
3560 .  nr doc-is-reference \n[doc-is-reference-saved]
3561 .  nr doc-reference-count \n[doc-reference-count-saved]
3562 .  nr doc-author-count \n[doc-author-count-saved]
3563 .
3564 .  nr doc-reg-drgv 0
3565 .  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
3566 .    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
3567 .    nr doc-reg-drgv +1
3568 .  \}
3569 .
3570 .  nr doc-book-count \n[doc-book-count-saved]
3571 .  ds doc-book-name "\*[doc-book-name-saved]
3572 .  nr doc-city-count \n[doc-city-count-saved]
3573 .  ds doc-city-name "\*[doc-city-name-saved]
3574 .  nr doc-date-count \n[doc-date-count-saved]
3575 .  ds doc-date "\*[doc-date-saved]
3576 .  nr doc-publisher-count \n[doc-publisher-count-saved]
3577 .  ds doc-publisher-name "\*[doc-publisher-name-saved]
3578 .  nr doc-journal-count \n[doc-journal-count-saved]
3579 .  ds doc-journal-name "\*[doc-journal-name-saved]
3580 .  nr doc-issue-count \n[doc-issue-count-saved]
3581 .  ds doc-issue-name "\*[doc-issue-name-saved]
3582 .  nr doc-optional-count \n[doc-optional-count-saved]
3583 .  ds doc-optional-string "\*[doc-optional-string-saved]
3584 .  nr doc-page-number-count \n[doc-page-number-count-saved]
3585 .  ds doc-page-number-string "\*[doc-page-number-string-saved]
3586 .  nr doc-corporate-count \n[doc-corporate-count-saved]
3587 .  ds doc-corporate-name "\*[doc-corporate-name-saved]
3588 .  nr doc-report-count \n[doc-report-count-saved]
3589 .  ds doc-report-name "\*[doc-report-name-saved]
3590 .  nr doc-reference-title-count \n[doc-reference-title-count-saved]
3591 .  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
3592 .  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
3593 .  nr doc-url-count \n[doc-url-count-saved]
3594 .  ds doc-url-name "\*[doc-url-name-saved]
3595 .  nr doc-volume-count \n[doc-volume-count-saved]
3596 .  ds doc-volume-name "\*[doc-volume-name-saved]
3597 .  nr doc-have-author \n[doc-have-author-saved]
3598 .
3599 .  ds doc-document-title "\*[doc-document-title-saved]
3600 .  ds doc-volume "\*[doc-volume-saved]
3601 .  ds doc-section "\*[doc-section-saved]
3602 .  ds doc-operating-system "\*[doc-operating-system-saved]
3603 .  ds doc-date-string "\*[doc-date-string-saved]
3604 .  nr doc-header-space \n[doc-header-space-saved]
3605 .  nr doc-footer-space \n[doc-footer-space-saved]
3606 .  nr doc-display-vertical \n[doc-display-vertical-saved]
3607 .  ds doc-header-string "\*[doc-header-string-saved]
3608 .  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
3609 .  nr doc-in-files-section \n[doc-in-files-section-saved]
3610 .  nr doc-in-authors-section \n[doc-in-authors-section-saved]
3611 ..
3612 .
3613 .
3614 .\" NS El user macro
3615 .\" NS   end list
3616 .\" NS
3617 .\" NS modifies:
3618 .\" NS   doc-list-depth
3619 .\" NS   doc-macro-name
3620 .\" NS
3621 .\" NS local variables:
3622 .\" NS   doc-str-El
3623 .\" NS
3624 .\" NS width register `El' set in doc-common
3625 .
3626 .de El
3627 .  if \n[.$] \{\
3628 .    tm Usage: .El (does not take arguments) (#\n[.c])
3629 .    return
3630 .  \}
3631 .
3632 .  ds doc-macro-name El
3633 .  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
3634 .
3635 .  ie        "\*[doc-str-El]"diag-list" \
3636 .    doc-end-list 0
3637 .  el \{ .ie "\*[doc-str-El]"column-list" \
3638 .    doc-end-column-list
3639 .  el \{ .ie "\*[doc-str-El]"item-list" \
3640 .    doc-end-list 0
3641 .  el \{ .ie "\*[doc-str-El]"ohang-list" \
3642 .    doc-end-list 0
3643 .  el \{ .ie "\*[doc-str-El]"inset-list" \
3644 .    doc-end-list 0
3645 .  el \
3646 .    doc-end-list 1
3647 .  \}\}\}\}
3648 .
3649 .  br
3650 ..
3651 .
3652 .
3653 .\" NS doc-saved-Pa-font global string
3654 .\" NS   saved doc-Pa-font string for section FILES (no underline if
3655 .\" NS   nroff)
3656 .
3657 .ds doc-saved-Pa-font
3658 .
3659 .
3660 .\" NS doc-curr-type global register
3661 .\" NS   current argument type
3662 .
3663 .nr doc-curr-type 0
3664 .
3665 .
3666 .\" NS doc-curr-arg global string
3667 .\" NS   current argument
3668 .
3669 .ds doc-curr-arg
3670 .
3671 .
3672 .\" NS doc-item-boxXXX global box
3673 .\" NS   item boxes associated list depth
3674 .\" NS
3675 .\" NS limit:
3676 .\" NS   doc-list-depth
3677 .
3678 .
3679 .\" NS It user macro
3680 .\" NS   list item
3681 .\" NS
3682 .\" NS modifies:
3683 .\" NS   doc-arg-ptr
3684 .\" NS   doc-argXXX
3685 .\" NS   doc-curr-arg
3686 .\" NS   doc-curr-type
3687 .\" NS   doc-in-list
3688 .\" NS   doc-macro-name
3689 .\" NS   doc-num-args
3690 .\" NS   doc-saved-Pa-font
3691 .\" NS
3692 .\" NS local variables:
3693 .\" NS   doc-reg-It
3694 .\" NS   doc-str-It
3695 .\" NS   doc-XXX-list-type
3696 .\" NS
3697 .\" NS width register `It' set in doc-common
3698 .
3699 .nr doc-bullet-list-type 1
3700 .nr doc-column-list-type 0
3701 .nr doc-dash-list-type 1
3702 .nr doc-diag-list-type 0
3703 .nr doc-enum-list-type 1
3704 .nr doc-hang-list-type 2
3705 .nr doc-inset-list-type 2
3706 .nr doc-item-list-type 1
3707 .nr doc-ohang-list-type 2
3708 .nr doc-tag-list-type 2
3709 .
3710 .de It
3711 .  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
3712 .
3713 .  if "\*[doc-str-It]"" \
3714 .    tm mdoc error: .It without preceding .Bl (#\n[.c])
3715 .
3716 .  if \n[doc-nesting-level] \{\
3717 .    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
3718 .    tm1 " (#\n[.c])
3719 .  \}
3720 .
3721 .  br
3722 .  if !\n[cR] \
3723 .    ne 3v
3724 .
3725 .  if \n[.$] \{\
3726 .    ds doc-macro-name It
3727 .
3728 .    \" fill argument vector
3729 .    nr doc-reg-It 1
3730 .    while (\n[doc-reg-It] <= \n[.$]) \{\
3731 .      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
3732 .      nr doc-reg-It +1
3733 .    \}
3734 .
3735 .    nr doc-num-args \n[.$]
3736 .    nr doc-arg-ptr 0
3737 .  \}
3738 .
3739 .  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
3740 .
3741 .  if \n[doc-reg-It] \{\
3742 .    \" start item box
3743 .    box doc-item-box\n[doc-list-depth]
3744 .    ev doc-item-env\n[doc-list-depth]
3745 .    evc 0
3746 .    in 0
3747 .    nf
3748 .  \}
3749 .
3750 .  ie (\n[doc-reg-It] == 1) \{\
3751 .    if \n[.$] \{\
3752 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3753 .      tm1 "              don't take arguments (#\n[.c])
3754 .  \}\}
3755 .  el \{\
3756 .    ie \n[.$] \{\
3757 .      if (\n[doc-reg-It] == 2) \{\
3758 .        \" handle list types with arguments
3759 .        doc-parse-arg-vector
3760 .
3761 .        nr doc-in-list 1
3762 .        nr doc-arg-ptr 1
3763 .        nr doc-curr-type \n[doc-type1]
3764 .        ds doc-curr-arg "\*[doc-arg1]
3765 .
3766 .        if \n[doc-in-files-section] \{\
3767 .          ds doc-saved-Pa-font "\*[doc-Pa-font]
3768 .          if n \
3769 .            ds doc-Pa-font "\*[doc-No-font]
3770 .        \}
3771 .
3772 .        ie (\n[doc-type1] == 1) \
3773 .          \*[doc-arg1]
3774 .        el \{\
3775 .          nr doc-arg-ptr 1
3776 .          doc-print-recursive
3777 .    \}\}\}
3778 .    el \{\
3779 .      tm1 "mdoc warning: .It macros in lists of type `\*[doc-str-It]'
3780 .      tm1 "              require arguments (#\n[.c])
3781 .    \}
3782 .  \}
3783 .
3784 .  \" the previous call of `.doc-print-recursive' can contain calls to
3785 .  \" opening macros like `.Ao'; we then defer the call of `doc-xxx-list'
3786 .  if !\n[doc-nesting-level] \
3787 .    doc-\*[doc-str-It]
3788 ..
3789 .
3790 .
3791 .\" NS doc-inset-list macro
3792 .\" NS   .It item of list-type inset
3793 .\" NS
3794 .\" NS modifies:
3795 .\" NS   doc-in-list
3796 .
3797 .de doc-inset-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 0
3805 .  br
3806 .
3807 .  nh
3808 .  doc-item-box\n[doc-list-depth]
3809 .
3810 .  if \n[doc-in-files-section] \
3811 .    if n \
3812 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3813 .
3814 .  nr doc-in-list 0
3815 .  doc-reset-args
3816 ..
3817 .
3818 .
3819 .\" NS doc-hang-list macro
3820 .\" NS   .It item of list-type hanging tag (as opposed to tagged)
3821 .\" NS
3822 .\" NS modifies:
3823 .\" NS   doc-have-space
3824 .\" NS   doc-in-list
3825 .\" NS
3826 .\" NS local variables:
3827 .\" NS   doc-reg-dhl
3828 .\" NS   doc-reg-dhl1
3829 .
3830 .de doc-hang-list
3831 .  \" finish item box
3832 .  br
3833 .  ev
3834 .  box
3835 .  unformat doc-item-box\n[doc-list-depth]
3836 .
3837 .  doc-set-vertical-and-indent 1
3838 .  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
3839 .  ti -\n[doc-reg-dhl]u
3840 .
3841 .  nh
3842 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
3843 .    doc-item-box\n[doc-list-depth]
3844 .  el \{\
3845 .    chop doc-item-box\n[doc-list-depth]
3846 .    nr doc-reg-dhl1 \n[.k]u
3847 .    nop \*[doc-item-box\n[doc-list-depth]]\c
3848 .    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
3849 .    nr doc-have-space 1
3850 .  \}
3851 .
3852 .  if \n[doc-in-files-section] \
3853 .    if n \
3854 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3855 .
3856 .  nr doc-in-list 0
3857 .  doc-reset-args
3858 ..
3859 .
3860 .
3861 .\" NS doc-ohang-list macro
3862 .\" NS   .It item of list-type overhanging tag
3863 .\" NS
3864 .\" NS modifies:
3865 .\" NS   doc-in-list
3866 .
3867 .de doc-ohang-list
3868 .  \" finish item box
3869 .  br
3870 .  ev
3871 .  box
3872 .  unformat doc-item-box\n[doc-list-depth]
3873 .
3874 .  doc-set-vertical-and-indent 0
3875 .  nh
3876 .  doc-item-box\n[doc-list-depth]
3877 .  br
3878 .
3879 .  if \n[doc-in-files-section] \
3880 .    if n \
3881 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
3882 .
3883 .  nr doc-in-list 0
3884 .  doc-reset-args
3885 ..
3886 .
3887 .
3888 .\" NS doc-item-list macro
3889 .\" NS   .It item of list-type [empty tag]
3890 .
3891 .de doc-item-list
3892 .  \" finish (dummy) item box
3893 .  br
3894 .  ev
3895 .  box
3896 .
3897 .  doc-set-vertical-and-indent 0
3898 .  br
3899 .
3900 .  doc-reset-args
3901 ..
3902 .
3903 .
3904 .\" NS doc-enum-list-count-stackXXX global register
3905 .\" NS   stack of current enum count values
3906 .\" NS
3907 .\" NS limit:
3908 .\" NS   doc-list-depth
3909 .
3910 .nr doc-enum-list-count-stack1 0
3911 .
3912 .
3913 .\" NS doc-enum-list macro
3914 .\" NS   enumerated list
3915 .\" NS
3916 .\" NS modifies:
3917 .\" NS   doc-enum-list-count-stackXXX
3918 .\" NS   doc-in-list
3919 .
3920 .de doc-enum-list
3921 .  nr doc-in-list 1
3922 .  nr doc-enum-list-count-stack\n[doc-list-depth] +1
3923 \# XXX
3924 \#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
3925 \#.rj
3926 .  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
3927 .  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
3928 .  doc-do-list
3929 ..
3930 .
3931 .
3932 .\" NS doc-bullet-list macro
3933 .\" NS   bullet paragraph list
3934 .\" NS
3935 .\" NS modifies:
3936 .\" NS   doc-in-list
3937 .
3938 .de doc-bullet-list
3939 .  nr doc-in-list 1
3940 .  nop \)\*[doc-Sy-font]\[bu]\f[]
3941 .  doc-do-list
3942 ..
3943 .
3944 .
3945 .\" NS doc-dash-list macro
3946 .\" NS   hyphen paragraph list (sub bullet list)
3947 .\" NS
3948 .\" NS modifies:
3949 .\" NS   doc-in-list
3950 .
3951 .de doc-dash-list
3952 .  nr doc-in-list 1
3953 .  nop \)\*[doc-Sy-font]\-\f[]
3954 .  doc-do-list
3955 ..
3956 .
3957 .
3958 .\" NS doc-do-list macro
3959 .\" NS   .It item of list-type enum/bullet/hyphen
3960 .
3961 .als doc-do-list doc-hang-list
3962 .
3963 .
3964 .\" NS doc-diag-list-input-line-count global register
3965 .\" NS   saved line number to be checked in next diag-list item
3966 .
3967 .nr doc-diag-list-input-line-count 0
3968 .
3969 .
3970 .\" NS doc-diag-list macro
3971 .\" NS   .It item of list-type diagnostic-message
3972 .\" NS
3973 .\" NS modifies:
3974 .\" NS   doc-curr-font
3975 .\" NS   doc-curr-size
3976 .\" NS   doc-diag-list-input-line-count
3977 .
3978 .de doc-diag-list
3979 .  nr doc-curr-font \n[.f]
3980 .  nr doc-curr-size \n[.ps]
3981 .
3982 .  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
3983 .    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
3984 .      doc-paragraph
3985 .    el \
3986 .      br
3987 .  \}
3988 .  el \
3989 .    br
3990 .  nr doc-diag-list-input-line-count \n[.c]
3991 .
3992 .  nh
3993 .  nop \*[doc-Sy-font]\c
3994 .  if \n[doc-num-args] \
3995 .    doc-remaining-args
3996 .  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
3997 .
3998 .  doc-print-and-reset
3999 ..
4000 .
4001 .
4002 .\" NS doc-tag-list macro
4003 .\" NS   .It item of list-type `tag'
4004 .\" NS
4005 .\" NS modifies:
4006 .\" NS   doc-have-space
4007 .\" NS   doc-in-list
4008 .\" NS
4009 .\" NS local variables:
4010 .\" NS   doc-box-dtl
4011 .\" NS   doc-reg-dtl
4012 .\" NS   doc-reg-dtl1
4013 .
4014 .de doc-tag-list
4015 .  \" finish item box
4016 .  br
4017 .  ev
4018 .  box
4019 .  unformat doc-item-box\n[doc-list-depth]
4020 .
4021 .  \" we use a box without `.nf' to compute the tag width (via `dl' register)
4022 .  box doc-box-dtl
4023 .  ev doc-env-dtl
4024 .  evc 0
4025 .  fi
4026 .  ad 0
4027 .  in 0
4028 .  doc-item-box\n[doc-list-depth]
4029 .  br
4030 .  ev
4031 .  box
4032 .
4033 .  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
4034 .    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4035 .      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4036 .      nr doc-list-have-indent-stack\n[doc-list-depth] 1
4037 .    \}
4038 .    doc-get-tag-width
4039 .  \}
4040 .  doc-set-vertical-and-indent 1
4041 .  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4042 .  ti -\n[doc-reg-dtl]u
4043 .
4044 .  nh
4045 .  doc-item-box\n[doc-list-depth]
4046 .  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
4047 .    br
4048 .  el \{\
4049 .    \" format the tag separately to prevent stretching of spaces
4050 .    vpt 0
4051 .    br
4052 .    sp -1
4053 .    vpt 1
4054 .    nop \&\c
4055 .    nr doc-have-space 1
4056 .  \}
4057 .
4058 .  if \n[doc-in-files-section] \
4059 .    if n \
4060 .      ds doc-Pa-font "\*[doc-saved-Pa-font]
4061 .
4062 .  nr doc-in-list 0
4063 .  doc-reset-args
4064 ..
4065 .
4066 .
4067 .\" NS doc-get-tag-width macro
4068 .\" NS   resolve unknown tag width (`tag' list-type only)
4069 .\" NS
4070 .\" NS modifies:
4071 .\" NS   doc-list-indent-stackXXX
4072 .\" NS   doc-tag-width-stackXXX
4073 .\" NS
4074 .\" NS requires:
4075 .\" NS   doc-curr-arg
4076 .\" NS   doc-curr-type
4077 .
4078 .de doc-get-tag-width
4079 .  ie (\n[doc-curr-type] == 1) \{\
4080 .    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
4081 .    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
4082 .  \}
4083 .  el \{\
4084 .    ds doc-tag-width-stack\n[doc-list-depth] No
4085 .    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
4086 .  \}
4087 ..
4088 .
4089 .
4090 .\" NS doc-set-vertical-and-indent macro
4091 .\" NS   set up vertical spacing (if not compact) and indentation (with
4092 .\" NS   offset if argument is non-zero)
4093 .\" NS
4094 .\" NS modifies:
4095 .\" NS   doc-list-have-indent-stackXXX
4096 .
4097 .de doc-set-vertical-and-indent
4098 .  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
4099 .    sp \n[doc-display-vertical]u
4100 .
4101 .  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
4102 .    nr doc-list-have-indent-stack\n[doc-list-depth] 0
4103 .    if \$1 \
4104 .      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4105 .  \}
4106 .
4107 .  if !\n[cR] \
4108 .    ne 2v
4109 ..
4110 .
4111 .
4112 .\" NS doc-list-depth global register
4113 .\" NS   list type stack counter
4114 .
4115 .nr doc-list-depth 0
4116 .
4117 .
4118 .\" NS doc-num-columns global register
4119 .\" NS   number of columns
4120 .
4121 .nr doc-num-columns 0
4122 .
4123 .
4124 .\" NS doc-compact-list-stackXXX global register (bool)
4125 .\" NS   stack of flags to indicate whether a particular list is compact
4126 .\" NS
4127 .\" NS limit:
4128 .\" NS   doc-list-depth
4129 .
4130 .nr doc-compact-list-stack1 0
4131 .
4132 .
4133 .\" NS doc-tag-prefix-stackXXX global string
4134 .\" NS   stack of tag prefixes (currently used for -nested -enum lists)
4135 .\" NS
4136 .\" NS limit:
4137 .\" NS   doc-list-depth
4138 .
4139 .ds doc-tag-prefix-stack1
4140 .
4141 .
4142 .\" NS doc-tag-width-stackXXX global string
4143 .\" NS   stack of strings indicating how to set up current element of
4144 .\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
4145 .\" NS   directly; if it is a macro name, use the macro's width value;
4146 .\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
4147 .\" NS
4148 .\" NS limit:
4149 .\" NS   doc-list-depth
4150 .
4151 .ds doc-tag-width-stack0
4152 .ds doc-tag-width-stack1
4153 .
4154 .
4155 .\" NS doc-list-offset-stackXXX global register
4156 .\" NS   stack of list offsets
4157 .\" NS
4158 .\" NS limit:
4159 .\" NS   doc-list-depth
4160 .
4161 .nr doc-list-offset-stack1 0
4162 .
4163 .
4164 .\" NS doc-end-list macro
4165 .\" NS   list end function; resets indentation (and offset if argument is
4166 .\" NS   non-zero)
4167 .\" NS
4168 .\" NS modifies:
4169 .\" NS   doc-list-depth
4170 .\" NS   doc-list-offset-stackXXX
4171 .
4172 .de doc-end-list
4173 .  if \$1 \
4174 '    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
4175 .
4176 '  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
4177 .
4178 .  if (\n[doc-list-depth] <= 0) \
4179 .    tm mdoc warning: extraneous .El call (#\n[.c])
4180 .
4181 .  doc-decrement-list-stack
4182 .  nr doc-list-depth -1
4183 ..
4184 .
4185 .
4186 .\" NS doc-increment-list-stack macro
4187 .\" NS   set up next block for list
4188 .\" NS
4189 .\" NS modifies:
4190 .\" NS   doc-compact-list-stackXXX
4191 .\" NS   doc-list-have-indent-stackXXX
4192 .\" NS   doc-list-indent-stackXXX
4193 .\" NS   doc-list-offset-stackXXX
4194 .\" NS   doc-list-type-stackXXX
4195 .\" NS   doc-tag-prefix-stackXXX
4196 .\" NS   doc-tag-width-stackXXX
4197 .\" NS   doc-enum-list-count-stackXXX
4198 .\" NS
4199 .\" NS local variables:
4200 .\" NS   doc-reg-dils
4201 .
4202 .de doc-increment-list-stack
4203 .  nr doc-reg-dils (\n[doc-list-depth] + 1)
4204 .  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
4205 .  nr doc-list-indent-stack\n[doc-reg-dils] 0
4206 .  nr doc-list-offset-stack\n[doc-reg-dils] 0
4207 .  ds doc-tag-prefix-stack\n[doc-reg-dils]
4208 .  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
4209 .  ds doc-list-type-stack\n[doc-reg-dils]
4210 .  nr doc-compact-list-stack\n[doc-reg-dils] 0
4211 .  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
4212 ..
4213 .
4214 .
4215 .\" NS doc-decrement-list-stack macro
4216 .\" NS   decrement stack
4217 .\" NS
4218 .\" NS modifies:
4219 .\" NS   doc-compact-list-stackXXX
4220 .\" NS   doc-list-have-indent-stackXXX
4221 .\" NS   doc-list-indent-stackXXX
4222 .\" NS   doc-list-offset-stackXXX
4223 .\" NS   doc-list-type-stackXXX
4224 .\" NS   doc-tag-prefix-stackXXX
4225 .\" NS   doc-tag-width-stackXXX
4226 .\" NS   doc-enum-list-count-stackXXX
4227 .
4228 .de doc-decrement-list-stack
4229 .  ds doc-list-type-stack\n[doc-list-depth]
4230 .  nr doc-list-have-indent-stack\n[doc-list-depth] 0
4231 .  nr doc-list-indent-stack\n[doc-list-depth] 0
4232 .  nr doc-list-offset-stack\n[doc-list-depth] 0
4233 .  ds doc-tag-prefix-stack\n[doc-list-depth]
4234 .  ds doc-tag-width-stack\n[doc-list-depth]
4235 .  nr doc-compact-list-stack\n[doc-list-depth] 0
4236 .  nr doc-enum-list-count-stack\n[doc-list-depth] 0
4237 ..
4238 .
4239 .
4240 .\" NS Xr user macro
4241 .\" NS   cross reference (for man pages only)
4242 .\" NS
4243 .\" NS modifies:
4244 .\" NS   doc-arg-ptr
4245 .\" NS   doc-macro-name
4246 .\" NS
4247 .\" NS local variables:
4248 .\" NS   doc-reg-Xr
4249 .\" NS
4250 .\" NS width register `Xr' set in doc-common
4251 .
4252 .de Xr
4253 .  if !\n[doc-arg-limit] \{\
4254 .    ie \n[.$] \{\
4255 .      ds doc-macro-name Xr
4256 .      doc-parse-args \$@
4257 .    \}
4258 .    el \
4259 .      doc-Xr-usage
4260 .  \}
4261 .
4262 .  if !\n[doc-arg-limit] \
4263 .    return
4264 .
4265 .  nr doc-arg-ptr +1
4266 .  doc-print-prefixes
4267 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4268 .    \" first argument must be a string
4269 .    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4270 .      nr doc-curr-font \n[.f]
4271 .      nr doc-curr-size \n[.ps]
4272 .      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]
4273 .
4274 .      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
4275 .        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
4276 .        \" modify second argument if it is a string and
4277 .        \" remove space in between
4278 .        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
4279 .          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
4280 .          ds doc-space\n[doc-arg-ptr]
4281 .        \}
4282 .      \}
4283 .      doc-print-recursive
4284 .    \}
4285 .    el \
4286 .      doc-Xr-usage
4287 .  \}
4288 .  el \
4289 .    doc-Xr-usage
4290 ..
4291 .
4292 .
4293 .\" NS doc-Xr-usage macro
4294 .
4295 .de doc-Xr-usage
4296 .  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
4297 .  doc-reset-args
4298 ..
4299 .
4300 .
4301 .\" NS Sx user macro
4302 .\" NS   cross section reference
4303 .\" NS
4304 .\" NS width register `Sx' set in doc-common
4305 .
4306 .als Sx doc-generic-macro
4307 .ds doc-Sx-usage section_header
4308 .
4309 .
4310 .\" NS doc-end-column-list macro
4311 .\" NS   column-list end-list
4312 .\" NS
4313 .\" NS modifies:
4314 .\" NS   doc-list-depth
4315 .
4316 .de doc-end-column-list
4317 .  linetabs 0
4318 '  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
4319 .  ta T .5i
4320 .  fi
4321 .  doc-decrement-list-stack
4322 .  nr doc-list-depth -1
4323 ..
4324 .
4325 .
4326 .\" NS doc-column-indent-width global register
4327 .\" NS   holds the indent width for a column list
4328 .
4329 .nr doc-column-indent-width 0
4330 .
4331 .
4332 .\" NS doc-set-column-tab macro
4333 .\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
4334 .\" NS
4335 .\" NS modifies:
4336 .\" NS   doc-column-indent-width
4337 .\" NS
4338 .\" NS local variables:
4339 .\" NS   doc-reg-dsct
4340 .\" NS   doc-str-dsct
4341 .\" NS   doc-str-dsct1
4342 .
4343 .de doc-set-column-tab
4344 .  ds doc-str-dsct
4345 .  nr doc-reg-dsct 1
4346 .  nr doc-column-indent-width 0
4347 .
4348 .  ie (\$1 < 5) \
4349 .    ds doc-str-dsct1 "    \"
4350 .  el \{\
4351 .    ie (\$1 == 5) \
4352 .      ds doc-str-dsct1 "   \"
4353 .    el \{\
4354 .      \" XXX: this is packed abnormally close -- intercolumn width
4355 .      \"      should be configurable
4356 .      ds doc-str-dsct1 " \"
4357 .  \}\}
4358 .
4359 .  while (\n[doc-reg-dsct] <= \$1) \{\
4360 .    as doc-str-dsct " +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4361 .    nr doc-column-indent-width +\w\a\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]\au
4362 .    nr doc-reg-dsct +1
4363 .  \}
4364 .
4365 .  ta \*[doc-str-dsct]
4366 '  in +\n[doc-column-indent-width]u
4367 ..
4368 .
4369 .
4370 .\" NS doc-column-list macro
4371 .\" NS   column items
4372 .\" NS
4373 .\" NS modifies:
4374 .\" NS   doc-arg-ptr
4375 .\" NS   doc-list-indent-stackXXX
4376 .\" NS   doc-spaceXXX
4377 .\" NS
4378 .\" NS local variables:
4379 .\" NS   doc-reg-dcl
4380 .
4381 .de doc-column-list
4382 .  if \n[doc-num-args] \
4383 .    doc-parse-arg-vector
4384 .  nr doc-arg-ptr +1
4385 .
4386 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4387 .    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
4388 .    return
4389 .  \}
4390 .
4391 .  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
4392 .    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
4393 .    ds doc-space\n[doc-reg-dcl]
4394 .  \}
4395 .
4396 .  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
4397 .    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
4398 .  if !\n[.u] \{\
4399 .    fi
4400 .    in +\n[doc-column-indent-width]u
4401 .  \}
4402 .  ti -\n[doc-column-indent-width]u
4403 .
4404 .  doc-do-\n[doc-type\n[doc-arg-ptr]]
4405 ..
4406 .
4407 .
4408 .\" NS Ta user macro
4409 .\" NS   append tab (\t)
4410 .\" NS
4411 .\" NS modifies:
4412 .\" NS   doc-arg-ptr
4413 .\" NS
4414 .\" NS width register `Ta' set in doc-common
4415 .
4416 .de Ta
4417 .  ie \n[doc-arg-limit] \{\
4418 .    nr doc-arg-ptr +1
4419 .    nop \*[doc-tab]\c
4420 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
4421 .      doc-do-\n[doc-type\n[doc-arg-ptr]]
4422 .    el \
4423 .      doc-reset-args
4424 .  \}
4425 .  el \{\
4426 .    tm1 "Usage: Ta must follow column entry: e.g.
4427 .    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
4428 .  \}
4429 ..
4430 .
4431 .
4432 .\" NS Dl user macro
4433 .\" NS   display (one line) literal
4434 .\" NS
4435 .\" NS   this function uses the `Li' font
4436 .\" NS
4437 .\" NS modifies:
4438 .\" NS   doc-arg-ptr
4439 .\" NS   doc-curr-font
4440 .\" NS   doc-curr-size
4441 .\" NS   doc-macro-name
4442 .\" NS
4443 .\" NS width register `Dl' set in doc-common
4444 .
4445 .de Dl
4446 .  ta T .5i
4447 .  in +\n[doc-display-indent]u
4448 .
4449 .  ie \n[doc-arg-limit] \{\
4450 .    tm Usage: .Dl not callable by other macros (#\n[.c])
4451 .    doc-reset-args
4452 .  \}
4453 .  el \{\
4454 .    ie \n[.$] \{\
4455 .      ds doc-macro-name Dl
4456 .      doc-parse-args \$@
4457 .      nr doc-arg-ptr 1
4458 .      nr doc-curr-font \n[.f]
4459 .      nr doc-curr-size \n[.ps]
4460 .      nop \*[doc-Li-font]\c
4461 .      doc-print-recursive
4462 .    \}
4463 .    el \
4464 .      tm Usage: .Dl argument ... (#\n[.c])
4465 .  \}
4466 .
4467 .  in -\n[doc-display-indent]u
4468 ..
4469 .
4470 .
4471 .\" NS D1 user macro
4472 .\" NS   display (one line)
4473 .\" NS
4474 .\" NS modifies:
4475 .\" NS   doc-arg-ptr
4476 .\" NS   doc-macro-name
4477 .\" NS
4478 .\" NS width register `D1' set in doc-common
4479 .
4480 .de D1
4481 .  ta T .5i
4482 .  in +\n[doc-display-indent]u
4483 .
4484 .  ie \n[doc-arg-limit] \{\
4485 .    tm Usage: .D1 not callable by other macros (#\n[.c])
4486 .    doc-reset-args
4487 .  \}
4488 .  el \{\
4489 .    ie \n[.$] \{\
4490 .      ds doc-macro-name D1
4491 .      doc-parse-args \$@
4492 .      nr doc-arg-ptr 1
4493 .      doc-print-recursive
4494 .    \}
4495 .    el \
4496 .      tm Usage: .D1 argument ... (#\n[.c])
4497 .  \}
4498 .
4499 .  in -\n[doc-display-indent]u
4500 ..
4501 .
4502 .
4503 .\" NS Vt user macro
4504 .\" NS   variable type (for forcing old style variable declarations);
4505 .\" NS   this is not done in the same manner as .Ot for fortrash --
4506 .\" NS   clean up later
4507 .\" NS
4508 .\" NS modifies:
4509 .\" NS   doc-curr-font
4510 .\" NS   doc-curr-size
4511 .\" NS   doc-have-decl
4512 .\" NS   doc-have-var
4513 .\" NS   doc-macro-name
4514 .\" NS
4515 .\" NS width register `Vt' set in doc-common
4516 .
4517 .de Vt
4518 .  if !\n[doc-arg-limit] \{\
4519 .    ie \n[.$] \{\
4520 .      ds doc-macro-name Vt
4521 .      doc-parse-args \$@
4522 .    \}
4523 .    el \
4524 .      tm Usage: .Vt variable_type ... (#\n[.c])
4525 .  \}
4526 .
4527 .  if !\n[doc-arg-limit] \
4528 .    return
4529 .
4530 .  nr doc-arg-ptr +1
4531 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4532 .    tm Usage: .Vt variable_type ... (#\n[.c])
4533 .    doc-reset-args
4534 .    return
4535 .  \}
4536 .
4537 .  if \n[doc-in-synopsis-section] \{\
4538 .    \" if a function declaration was the last thing given,
4539 .    \" want vertical space
4540 .    if \n[doc-have-decl] \{\
4541 .      doc-paragraph
4542 .      nr doc-have-decl 0
4543 .    \}
4544 .
4545 .    \" if a subroutine was the last thing given, want vertical space
4546 .    if \n[doc-have-func] \{\
4547 .      ie \n[doc-have-var] \
4548 .        br
4549 .      el \
4550 .        doc-paragraph
4551 .    \}
4552 .
4553 .    nr doc-have-var 1
4554 .  \}
4555 .
4556 .  nr doc-curr-font \n[.f]
4557 .  nr doc-curr-size \n[.ps]
4558 .  nop \*[doc-Ft-font]\c
4559 .  doc-print-recursive
4560 .
4561 .  if \n[doc-in-synopsis-section] \{\
4562 .    ie \n[doc-have-old-func] \
4563 .      nop \*[doc-soft-space]\c
4564 .    el \
4565 .      br
4566 .  \}
4567 ..
4568 .
4569 .
4570 .\" NS doc-is-func global register (bool)
4571 .\" NS   set if subroutine (in synopsis only) (fortran only)
4572 .
4573 .nr doc-is-func 0
4574 .
4575 .
4576 .\" NS Ft user macro
4577 .\" NS   function type
4578 .\" NS
4579 .\" NS modifies:
4580 .\" NS   doc-curr-font
4581 .\" NS   doc-curr-size
4582 .\" NS   doc-have-decl
4583 .\" NS   doc-have-var
4584 .\" NS   doc-is-func
4585 .\" NS   doc-macro-name
4586 .\" NS
4587 .\" NS width register `Ft' set in doc-common
4588 .
4589 .de Ft
4590 .  if !\n[doc-arg-limit] \{\
4591 .    ie \n[.$] \{\
4592 .      ds doc-macro-name Ft
4593 .      doc-parse-args \$@
4594 .    \}
4595 .    el \
4596 .      tm Usage: .Ft function_type ... (#\n[.c])
4597 .  \}
4598 .
4599 .  if !\n[doc-arg-limit] \
4600 .    return
4601 .
4602 .  nr doc-arg-ptr +1
4603 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4604 .    tm Usage: .Ft function_type ... (#\n[.c])
4605 .    doc-reset-args
4606 .    return
4607 .  \}
4608 .
4609 .  if \n[doc-in-synopsis-section] \{\
4610 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4611 .      doc-paragraph
4612 .      nr doc-have-decl 0
4613 .      nr doc-have-var 0
4614 .    \}
4615 .
4616 .    if \n[doc-have-var] \{\
4617 .      doc-paragraph
4618 .      nr doc-have-var 0
4619 .    \}
4620 .
4621 .    nr doc-is-func 1
4622 .  \}
4623 .
4624 .  nr doc-curr-font \n[.f]
4625 .  nr doc-curr-size \n[.ps]
4626 .  nop \*[doc-Ft-font]\c
4627 .  doc-print-recursive
4628 ..
4629 .
4630 .
4631 .\" NS doc-have-old-func global register (bool)
4632 .\" NS   set if `Ot' has been called
4633 .
4634 .nr doc-have-old-func 0
4635 .
4636 .
4637 .\" NS Ot user macro
4638 .\" NS   old function type (fortran -- no newline)
4639 .\" NS
4640 .\" NS modifies:
4641 .\" NS   doc-have-decl
4642 .\" NS   doc-have-old-func
4643 .\" NS   doc-have-var
4644 .\" NS   doc-is-func
4645 .\" NS
4646 .\" NS width register `Ot' set in doc-common
4647 .
4648 .de Ot
4649 .  nr doc-have-old-func 1
4650 .
4651 .  if \n[doc-in-synopsis-section] \{\
4652 .    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
4653 .      doc-paragraph
4654 .      nr doc-have-decl 0
4655 .      nr doc-have-var 0
4656 .    \}
4657 .
4658 .    if \n[doc-have-var] \{\
4659 .      doc-paragraph
4660 .      nr doc-have-var 0
4661 .    \}
4662 .
4663 .    nr doc-is-func 1
4664 .  \}
4665 .
4666 .  if \n[.$] \
4667 .    nop \*[doc-Ft-font]\$*\c
4668 .  nop \ \f[]\c
4669 ..
4670 .
4671 .
4672 .\" NS Fa user macro
4673 .\" NS   function arguments
4674 .\" NS
4675 .\" NS modifies:
4676 .\" NS   doc-arg-ptr
4677 .\" NS   doc-curr-font
4678 .\" NS   doc-curr-size
4679 .\" NS   doc-macro-name
4680 .\" NS
4681 .\" NS width register `Fa' set in doc-common
4682 .
4683 .de Fa
4684 .  if !\n[doc-arg-limit] \{\
4685 .    ie \n[.$] \{\
4686 .      ds doc-macro-name Fa
4687 .      doc-parse-args \$@
4688 .    \}
4689 .    el \
4690 .      tm Usage: .Fa function_arguments ... (#\n[.c])
4691 .  \}
4692 .
4693 .  ie \n[doc-func-arg-count] \
4694 .    doc-do-func
4695 .  el \{\
4696 .    nr doc-arg-ptr +1
4697 .    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4698 .      nr doc-curr-font \n[.f]
4699 .      nr doc-curr-size \n[.ps]
4700 .      nop \*[doc-Fa-font]\c
4701 .      doc-print-recursive
4702 .
4703 .      if \n[doc-in-synopsis-section] \
4704 .        if \n[doc-have-func] \
4705 .          br
4706 .  \}\}
4707 ..
4708 .
4709 .
4710 .\" NS doc-func-arg-count global register
4711 .\" NS   how many function arguments have been processed so far
4712 .
4713 .nr doc-func-arg-count 0
4714 .
4715 .
4716 .\" NS doc-func-arg global string
4717 .\" NS   work buffer for function name strings
4718 .
4719 .ds doc-func-arg
4720 .
4721 .
4722 .\" NS doc-num-func-args global register
4723 .\" NS   number of function arguments
4724 .
4725 .nr doc-num-func-args 0
4726 .
4727 .
4728 .\" NS doc-func-args-processed global register
4729 .\" NS   function arguments processed so far
4730 .
4731 .nr doc-func-args-processed 0
4732 .
4733 .
4734 .\" NS doc-do-func macro
4735 .\" NS   internal .Fa for .Fc
4736 .\" NS
4737 .\" NS modifies:
4738 .\" NS   doc-arg-ptr
4739 .\" NS   doc-argXXX
4740 .\" NS   doc-func-arg
4741 .\" NS   doc-func-arg-count
4742 .\" NS   doc-func-args-processed
4743 .\" NS   doc-num-func-args
4744 .
4745 .de doc-do-func
4746 .  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
4747 .    doc-reset-args
4748 .    return
4749 .  \}
4750 .
4751 .  nr doc-arg-ptr +1
4752 .
4753 .  ds doc-func-arg
4754 .  nr doc-num-func-args 0
4755 .  nr doc-func-args-processed 0
4756 .
4757 .  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4758 .  if (\n[doc-num-func-args] > 1) \
4759 .    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4760 .
4761 .  if (\n[doc-func-arg-count] > 1) \{\
4762 .    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4763 .    if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4764 .      if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4765 .        nop ,\)\c
4766 .    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
4767 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[]\s[0]\c
4768 .  \}
4769 .
4770 .  if (\n[doc-func-arg-count] == 1) \{\
4771 .    nop \)\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
4772 .    nop \f[]\s[0]\c
4773 .  \}
4774 .  nr doc-func-arg-count +1
4775 .  doc-do-func
4776 ..
4777 .
4778 .
4779 .\" NS doc-have-func global register (bool)
4780 .\" NS   whether we have more than one function in synopsis
4781 .
4782 .nr doc-have-func 0
4783 .
4784 .
4785 .\" NS Fn user macro
4786 .\" NS   functions
4787 .\" NS
4788 .\" NS modifies:
4789 .\" NS   doc-arg-ptr
4790 .\" NS   doc-curr-font
4791 .\" NS   doc-curr-size
4792 .\" NS   doc-have-decl
4793 .\" NS   doc-have-func
4794 .\" NS   doc-have-var
4795 .\" NS   doc-indent-synopsis
4796 .\" NS   doc-is-func
4797 .\" NS   doc-macro-name
4798 .\" NS
4799 .\" NS width register `Fn' set in doc-common
4800 .
4801 .de Fn
4802 .  if !\n[doc-arg-limit] \{\
4803 .    ie \n[.$] \{\
4804 .      ds doc-macro-name Fn
4805 .      doc-parse-args \$@
4806 .    \}
4807 .    el \
4808 .      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4809 .  \}
4810 .
4811 .  if !\n[doc-arg-limit] \
4812 .    return
4813 .
4814 .  if \n[doc-in-synopsis-section] \{\
4815 .    \" if there is/has been more than one subroutine declaration
4816 .    ie \n[doc-is-func] \{\
4817 .      br
4818 .      nr doc-have-var 0
4819 .      nr doc-have-decl 0
4820 .      nr doc-is-func 0
4821 .    \}
4822 .    el \{\
4823 .      if \n[doc-have-func] \{\
4824 .        doc-paragraph
4825 .        nr doc-have-var 0
4826 .        nr doc-have-decl 0
4827 .    \}\}
4828 .
4829 .    if \n[doc-have-decl] \{\
4830 .      doc-paragraph
4831 .      nr doc-have-var 0
4832 .    \}
4833 .
4834 .    if \n[doc-have-var] \{\
4835 .      doc-paragraph
4836 .      nr doc-have-decl 0
4837 .    \}
4838 .
4839 .    nr doc-have-func 1
4840 .    nr doc-is-func 0
4841 .
4842 .    br
4843 .    if !\n[doc-indent-synopsis] \
4844 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
4845 .    if !\n[doc-indent-synopsis-active] \
4846 .      in +\n[doc-indent-synopsis]u
4847 .    ti -\n[doc-indent-synopsis]u
4848 .  \}
4849 .
4850 .  nr doc-arg-ptr +1
4851 .  doc-print-prefixes
4852 .  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
4853 .    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
4854 .    doc-reset-args
4855 .    return
4856 .  \}
4857 .
4858 .  nr doc-curr-font \n[.f]
4859 .  nr doc-curr-size \n[.ps]
4860 .  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
4861 .  nop \f[]\s[0]\*[lp]\)\c
4862 .
4863 .  nr doc-arg-ptr +1
4864 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4865 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4866 .      nop \*[doc-Fa-font]\c
4867 .      doc-do-func-args
4868 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
4869 .  \}\}
4870 .
4871 .  nop \)\*[rp]\)\c
4872 .  if \n[doc-in-synopsis-section] \
4873 .    nop \);\)\c
4874 .
4875 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4876 .    \" output the space (if needed)
4877 .    nr doc-arg-ptr -1
4878 .    nop \)\*[doc-space\n[doc-arg-ptr]]\c
4879 .    nr doc-arg-ptr +1
4880 .
4881 .    doc-print-recursive
4882 .  \}
4883 .  el \
4884 .    doc-print-and-reset
4885 .
4886 .  if \n[doc-in-synopsis-section] \
4887 .    if !\n[doc-indent-synopsis-active] \
4888 .      in -\n[doc-indent-synopsis]u
4889 ..
4890 .
4891 .
4892 .\" NS doc-do-func-args macro
4893 .\" NS   handle function arguments
4894 .\" NS
4895 .\" NS modifies:
4896 .\" NS   doc-arg-ptr
4897 .\" NS   doc-argXXX
4898 .\" NS   doc-func-arg
4899 .\" NS   doc-func-args-processed
4900 .\" NS   doc-num-func-args
4901 .\" NS
4902 .\" NS local variables:
4903 .\" NS   doc-reg-ddfa
4904 .
4905 .de doc-do-func-args
4906 .  if \n[doc-in-synopsis-section] \{\
4907 .    ds doc-func-arg
4908 .    nr doc-num-func-args 0
4909 .    nr doc-func-args-processed 0
4910 .
4911 .    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
4912 .    if (\n[doc-num-func-args] > 1) \
4913 .      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
4914 .  \}
4915 .
4916 .  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
4917 .  nr doc-arg-ptr +1
4918 .
4919 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
4920 .    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
4921 .      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
4922 .      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|\c
4923 .      if !"\*[doc-arg\n[doc-arg-ptr]]"/*" \
4924 .        if !"\*[doc-arg\n[doc-arg-ptr]]"*/" \
4925 .          nop ,\)\c
4926 .      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[]\s[0]\|\c
4927 .      doc-do-func-args
4928 .  \}\}
4929 ..
4930 .
4931 .
4932 .\" NS doc-saved-nesting-level global register
4933 .
4934 .nr doc-saved-nesting-level 0
4935 .
4936 .
4937 .\" NS doc-in-func-enclosure global register (bool)
4938 .
4939 .nr doc-in-func-enclosure 0
4940 .
4941 .
4942 .\" NS Fo user macro
4943 .\" NS   function open
4944 .\" NS
4945 .\" NS modifies:
4946 .\" NS   doc-arg-ptr
4947 .\" NS   doc-curr-font
4948 .\" NS   doc-curr-size
4949 .\" NS   doc-func-arg-count
4950 .\" NS   doc-have-decl
4951 .\" NS   doc-have-func
4952 .\" NS   doc-have-var
4953 .\" NS   doc-in-func-enclosure
4954 .\" NS   doc-indent-synopsis
4955 .\" NS   doc-is-func
4956 .\" NS   doc-macro-name
4957 .\" NS   doc-saved-nesting-level
4958 .\" NS
4959 .\" NS width register `Fo' set in doc-common
4960 .
4961 .de Fo
4962 .  if (\n[doc-in-func-enclosure]) \{\
4963 .    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
4964 .    return
4965 .  \}
4966 .
4967 .  nr doc-saved-nesting-level \n[doc-nesting-level]
4968 .  nr doc-in-func-enclosure 1
4969 .
4970 .  if !\n[doc-arg-limit] \{\
4971 .    ie \n[.$] \{\
4972 .      ds doc-macro-name Fo
4973 .      doc-parse-args \$@
4974 .    \}
4975 .    el \
4976 .      tm Usage: .Fo function_name (#\n[.c])
4977 .  \}
4978 .
4979 .  if \n[doc-in-synopsis-section] \{\
4980 .    \" if there is/has been more than one subroutine declaration
4981 .    ie \n[doc-is-func] \{\
4982 .      br
4983 .      nr doc-have-var 0
4984 .      nr doc-have-decl 0
4985 .      nr doc-is-func 0
4986 .    \}
4987 .    el \{\
4988 .      if \n[doc-have-func] \{\
4989 .        doc-paragraph
4990 .        nr doc-have-var 0
4991 .        nr doc-have-decl 0
4992 .    \}\}
4993 .
4994 .    if \n[doc-have-decl] \{\
4995 .      doc-paragraph
4996 .      nr doc-have-var 0
4997 .    \}
4998 .
4999 .    if \n[doc-have-var] \{\
5000 .      doc-paragraph
5001 .      nr doc-have-decl 0
5002 .    \}
5003 .
5004 .    nr doc-have-func 1
5005 .    nr doc-is-func 0
5006 .
5007 .    br
5008 .    if !\n[doc-indent-synopsis] \
5009 .      nr doc-indent-synopsis (4u * \n[doc-fixed-width]u)
5010 .  \}
5011 .
5012 .  \" start function box
5013 .  box doc-func-box
5014 .  ev doc-func-env
5015 .  evc 0
5016 .  in 0
5017 .  nf
5018 .
5019 .  nr doc-arg-ptr +1
5020 .  doc-print-prefixes
5021 .  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5022 .    nr doc-func-arg-count 1
5023 .    nr doc-curr-font \n[.f]
5024 .    nr doc-curr-size \n[.ps]
5025 .
5026 .    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
5027 .    nop \f[]\s[0]\*[lp]\)\c
5028 .    doc-reset-args
5029 .  \}
5030 ..
5031 .
5032 .
5033 .\" NS Fc user macro
5034 .\" NS   function close
5035 .\" NS
5036 .\" NS modifies:
5037 .\" NS   doc-arg-ptr
5038 .\" NS   doc-func-arg-count
5039 .\" NS   doc-in-func-enclosure
5040 .\" NS   doc-saved-nesting-level
5041 .\" NS   doc-macro-name
5042 .\" NS
5043 .\" NS width register `Fc' set in doc-common
5044 .
5045 .de Fc
5046 .  if !\n[doc-in-func-enclosure] \{\
5047 .    tm mdoc warning: Extraneous .Fc (#\n[.c])
5048 .    return
5049 .  \}
5050 .
5051 .  if \n[.$] \{\
5052 .    ds doc-macro-name Fc
5053 .    \" the first (dummy) argument is used to get the correct spacing
5054 .    doc-parse-args \) \$@
5055 .  \}
5056 .
5057 .  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
5058 .    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
5059 .
5060 .  nr doc-func-arg-count 0
5061 .  nr doc-in-func-enclosure 0
5062 .
5063 .  ie \n[doc-in-synopsis-section] \
5064 .    nop \|\*[rp];\)
5065 .  el \
5066 .    nop \|\*[rp]\)
5067 .
5068 .  \" finish function box
5069 .  br
5070 .  ev
5071 .  box
5072 .  chop doc-func-box
5073 .  unformat doc-func-box
5074 .
5075 .  if \n[doc-in-synopsis-section] \{\
5076 .    if !\n[doc-indent-synopsis-active] \
5077 .      in +\n[doc-indent-synopsis]u
5078 .    ti -\n[doc-indent-synopsis]u
5079 .  \}
5080 .
5081 .  nh
5082 .  nop \*[doc-func-box]\c
5083 .
5084 .  nr doc-arg-ptr +1
5085 .  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
5086 .    nr doc-curr-font \n[.f]
5087 .    nr doc-curr-size \n[.ps]
5088 .    doc-print-recursive
5089 .  \}
5090 .  el \
5091 .    doc-print-and-reset
5092 .
5093 .  if \n[doc-in-synopsis-section] \
5094 .    if !\n[doc-indent-synopsis-active] \
5095 .      in -\n[doc-indent-synopsis]u
5096 ..
5097 .
5098 .
5099 .\" NS doc-build-func-string macro
5100 .\" NS   collect function arguments and set hard spaces in between
5101 .\" NS
5102 .\" NS modifies:
5103 .\" NS   doc-func-arg
5104 .\" NS   doc-func-args-processed
5105 .\" NS   doc-num-func-args
5106 .
5107 .de doc-build-func-string
5108 .  if !\n[doc-num-func-args] \{\
5109 .    nr doc-num-func-args \n[.$]
5110 .    nr doc-func-args-processed 0
5111 .    ds doc-func-arg
5112 .  \}
5113 .
5114 .  nr doc-func-args-processed +1
5115 .  as doc-func-arg "\$1
5116 .
5117 .  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
5118 .    as doc-func-arg "\*[doc-hard-space]
5119 .
5120 .    shift
5121 .    doc-build-func-string \$@
5122 .  \}
5123 ..
5124 .
5125 .
5126 .\" Very crude references: Stash all reference info into boxes, print out
5127 .\" reference on .Re macro and clean up.  Ordering very limited, no fancy
5128 .\" citations, but can do articles, journals, and books -- need to add
5129 .\" several missing options (like city etc).  Should be able to grab a refer
5130 .\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
5131 .\" (ha!).
5132 .
5133 .
5134 .\" NS doc-is-reference global register (bool)
5135 .\" NS   set if in reference
5136 .
5137 .nr doc-is-reference 0
5138 .
5139 .
5140 .\" NS doc-reference-count global register
5141 .\" NS   reference element counter
5142 .
5143 .nr doc-reference-count 0
5144 .
5145 .
5146 .\" NS Rs user macro
5147 .\" NS   reference start
5148 .\" NS
5149 .\" NS modifies:
5150 .\" NS   doc-is-reference
5151 .\" NS   doc-reference-count
5152 .\" NS
5153 .\" NS width register `Rs' set in doc-common
5154 .
5155 .de Rs
5156 .  ie \n[.$] \
5157 .    tm Usage: .Rs (does not take arguments) (#\n[.c])
5158 .  el \{\
5159 .    nr doc-is-reference 1
5160 .    doc-reset-reference
5161 .    if \n[doc-in-see-also-section] \
5162 .      doc-paragraph
5163 .    nr doc-reference-count 0
5164 .  \}
5165 ..
5166 .
5167 .
5168 .\" NS Re user macro
5169 .\" NS   reference end
5170 .\" NS
5171 .\" NS modifies:
5172 .\" NS   doc-is-reference
5173 .\" NS
5174 .\" NS width register `Re' set in doc-common
5175 .
5176 .de Re
5177 .  ie \n[.$] \
5178 .    tm Usage: .Re (does not take arguments) (#\n[.c])
5179 .  el \{\
5180 .    if !\n[doc-is-reference] \{\
5181 .      tm mdoc warning: Extraneous .Re (#\n[.c])
5182 .      return
5183 .    \}
5184 .    doc-print-reference
5185 .    doc-reset-reference
5186 .    nr doc-is-reference 0
5187 .  \}
5188 ..
5189 .
5190 .
5191 .\" NS doc-reset-reference macro
5192 .\" NS   reference cleanup
5193 .\" NS
5194 .\" NS modifies:
5195 .\" NS   doc-author-count
5196 .\" NS   doc-author-nameXXX
5197 .\" NS   doc-book-count
5198 .\" NS   doc-book-name
5199 .\" NS   doc-city-count
5200 .\" NS   doc-city-name
5201 .\" NS   doc-corporate-count
5202 .\" NS   doc-corporate-name
5203 .\" NS   doc-date
5204 .\" NS   doc-date-count
5205 .\" NS   doc-issue-count
5206 .\" NS   doc-issue-name
5207 .\" NS   doc-journal-count
5208 .\" NS   doc-journal-name
5209 .\" NS   doc-optional-count
5210 .\" NS   doc-optional-string
5211 .\" NS   doc-page-number-count
5212 .\" NS   doc-page-number-string
5213 .\" NS   doc-publisher-count
5214 .\" NS   doc-publisher-name
5215 .\" NS   doc-reference-count
5216 .\" NS   doc-reference-title-count
5217 .\" NS   doc-reference-title-name
5218 .\" NS   doc-reference-title-name-for-book
5219 .\" NS   doc-report-count
5220 .\" NS   doc-report-name
5221 .\" NS   doc-url-count
5222 .\" NS   doc-url-name
5223 .\" NS   doc-volume-count
5224 .\" NS   doc-volume-name
5225 .
5226 .de doc-reset-reference
5227 .  while (\n[doc-author-count]) \{\
5228 .    ds doc-author-name\n[doc-author-count]
5229 .    nr doc-author-count -1
5230 .  \}
5231 .  nr doc-journal-count 0
5232 .  nr doc-issue-count 0
5233 .  nr doc-optional-count 0
5234 .  nr doc-corporate-count 0
5235 .  nr doc-report-count 0
5236 .  nr doc-reference-title-count 0
5237 .  nr doc-url-count 0
5238 .  nr doc-volume-count 0
5239 .  nr doc-city-count 0
5240 .  nr doc-date-count 0
5241 .  nr doc-page-number-count 0
5242 .  nr doc-book-count 0
5243 .  nr doc-publisher-count 0
5244 .  nr doc-reference-count 0
5245 .
5246 .  ds doc-journal-name
5247 .  ds doc-issue-name
5248 .  ds doc-optional-string
5249 .  ds doc-corporate-name
5250 .  ds doc-report-name
5251 .  ds doc-reference-title-name
5252 .  ds doc-reference-title-name-for-book
5253 .  ds doc-url-name
5254 .  ds doc-volume-name
5255 .  ds doc-city-name
5256 .  ds doc-date
5257 .  ds doc-page-number-string
5258 .  ds doc-book-name
5259 .  ds doc-publisher-name
5260 ..
5261 .
5262 .
5263 .\" NS doc-finish-reference macro
5264 .\" NS   auxiliary macro for doc-print-reference
5265 .\" NS
5266 .\" NS modifies:
5267 .\" NS   doc-reference-count
5268 .
5269 .de doc-finish-reference
5270 .  nr doc-reference-count -\$1
5271 .  ie \n[doc-reference-count] \
5272 .    nop \),
5273 .  el \
5274 .    nop \).
5275 ..
5276 .
5277 .
5278 .\" NS doc-print-reference macro
5279 .\" NS   reference print
5280 .\" NS
5281 .\" NS modifies:
5282 .\" NS   doc-reference-count
5283 .
5284 .de doc-print-reference
5285 .
5286 .  nh
5287 .
5288 .  if \n[doc-author-count] \{\
5289 .    doc-print-reference-authors
5290 .    nr doc-reference-count -\n[doc-author-count]
5291 .  \}
5292 .
5293 .  if \n[doc-reference-title-count] \{\
5294 .    unformat doc-reference-title-name
5295 .    chop doc-reference-title-name
5296 .    unformat doc-reference-title-name-for-book
5297 .    chop doc-reference-title-name-for-book
5298 .    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
5299 .      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
5300 .      doc-finish-reference \n[doc-reference-title-count]
5301 .    \}
5302 .    el \{\
5303 .      nop \*[doc-reference-title-name]\c
5304 .      doc-finish-reference \n[doc-reference-title-count]
5305 .  \}\}
5306 .
5307 .  if \n[doc-book-count] \{\
5308 .    unformat doc-book-name
5309 .    chop doc-book-name
5310 .    nop \*[doc-book-name]\c
5311 .    doc-finish-reference \n[doc-book-count]
5312 .  \}
5313 .
5314 .  if \n[doc-publisher-count] \{\
5315 .    unformat doc-publisher-name
5316 .    chop doc-publisher-name
5317 .    nop \*[doc-publisher-name]\c
5318 .    doc-finish-reference \n[doc-publisher-count]
5319 .  \}
5320 .
5321 .  if \n[doc-journal-count] \{\
5322 .    unformat doc-journal-name
5323 .    chop doc-journal-name
5324 .    nop \*[doc-journal-name]\c
5325 .    doc-finish-reference \n[doc-journal-count]
5326 .  \}
5327 .
5328 .  if \n[doc-report-count] \{\
5329 .    unformat doc-report-name
5330 .    chop doc-report-name
5331 .    nop \*[doc-report-name]\c
5332 .    doc-finish-reference \n[doc-report-count]
5333 .  \}
5334 .
5335 .  if \n[doc-issue-count] \{\
5336 .    unformat doc-issue-name
5337 .    chop doc-issue-name
5338 .    nop \*[doc-issue-name]\c
5339 .    doc-finish-reference \n[doc-issue-count]
5340 .  \}
5341 .
5342 .  if \n[doc-volume-count] \{\
5343 .    unformat doc-volume-name
5344 .    chop doc-volume-name
5345 .    nop \*[doc-volume-name]\c
5346 .    doc-finish-reference \n[doc-volume-count]
5347 .  \}
5348 .
5349 .  if \n[doc-url-count] \{\
5350 .    unformat doc-url-name
5351 .    chop doc-url-name
5352 .    nop \*[doc-url-name]\c
5353 .    doc-finish-reference \n[doc-url-count]
5354 .  \}
5355 .
5356 .  if \n[doc-page-number-count] \{\
5357 .    unformat doc-page-number-string
5358 .    chop doc-page-number-string
5359 .    nop \*[doc-page-number-string]\c
5360 .    doc-finish-reference \n[doc-page-number-count]
5361 .  \}
5362 .
5363 .  if \n[doc-corporate-count] \{\
5364 .    unformat doc-corporate-name
5365 .    chop doc-corporate-name
5366 .    nop \*[doc-corporate-name]\c
5367 .    doc-finish-reference \n[doc-corporate-count]
5368 .  \}
5369 .
5370 .  if \n[doc-city-count] \{\
5371 .    unformat doc-city-name
5372 .    chop doc-city-name
5373 .    nop \*[doc-city-name]\c
5374 .    doc-finish-reference \n[doc-city-count]
5375 .  \}
5376 .
5377 .  if \n[doc-date-count] \{\
5378 .    unformat doc-date
5379 .    chop doc-date
5380 .    nop \*[doc-date]\c
5381 .    doc-finish-reference \n[doc-date-count]
5382 .  \}
5383 .
5384 .  if \n[doc-optional-count] \{\
5385 .    unformat doc-optional-string
5386 .    chop doc-optional-string
5387 .    nop \*[doc-optional-string]\c
5388 .    doc-finish-reference \n[doc-optional-count]
5389 .  \}
5390 .
5391 .  if \n[doc-reference-count] \
5392 .    tm mdoc warning: unresolved reference problem
5393 .
5394 .  hy \n[doc-hyphen-flags]
5395 ..
5396 .
5397 .
5398 .\" NS doc-print-reference-authors macro
5399 .\" NS   print out reference authors
5400 .\" NS
5401 .\" NS local variables:
5402 .\" NS   doc-reg-dpra
5403 .\" NS   doc-str-dpra
5404 .
5405 .ds doc-str-dpra "and
5406 .
5407 .de doc-print-reference-authors
5408 .  nr doc-reg-dpra 1
5409 .
5410 .  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
5411 .    unformat doc-author-name\n[doc-reg-dpra]
5412 .    chop doc-author-name\n[doc-reg-dpra]
5413 .    ie (\n[doc-author-count] > 2) \
5414 .      nop \)\*[doc-author-name\n[doc-reg-dpra]],
5415 .    el \
5416 .      nop \)\*[doc-author-name\n[doc-reg-dpra]]
5417 .    nr doc-reg-dpra +1
5418 .  \}
5419 .
5420 .  unformat doc-author-name\n[doc-reg-dpra]
5421 .  chop doc-author-name\n[doc-reg-dpra]
5422 .  if (\n[doc-author-count] > 1) \
5423 .    nop \)\*[doc-str-dpra]
5424 .  nop \)\*[doc-author-name\n[doc-reg-dpra]],
5425 ..
5426 .
5427 .
5428 .\" NS doc-author-count global register
5429 .\" NS   counter of author references
5430 .
5431 .nr doc-author-count 0
5432 .
5433 .
5434 .\" NS doc-author-nameXXX global box
5435 .\" NS   array of author names
5436 .\" NS
5437 .\" NS limit:
5438 .\" NS   doc-author-count
5439 .
5440 .ds doc-author-name0
5441 .
5442 .
5443 .\" NS %A user macro
5444 .\" NS   reference author(s)
5445 .\" NS
5446 .\" NS modifies:
5447 .\" NS   doc-arg-ptr
5448 .\" NS   doc-author-count
5449 .\" NS   doc-curr-font
5450 .\" NS   doc-curr-size
5451 .\" NS   doc-macro-name
5452 .\" NS   doc-reference-count
5453 .\" NS
5454 .\" NS local variables:
5455 .\" NS   doc-env-%A
5456 .\" NS
5457 .\" NS width register `%A' set in doc-common
5458 .
5459 .de %A
5460 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5461 .    tm Usage: .%A author_name ... (#\n[.c])
5462 .    return
5463 .  \}
5464 .
5465 .  nr doc-author-count +1
5466 .  nr doc-reference-count +1
5467 .
5468 .  ds doc-macro-name %A
5469 .  doc-parse-args \$@
5470 .
5471 .  nr doc-arg-ptr +1
5472 .  nr doc-curr-font \n[.f]
5473 .  nr doc-curr-size \n[.ps]
5474 .
5475 .  \" save to reference box
5476 .  box doc-author-name\n[doc-author-count]
5477 .  ev doc-env-%A
5478 .  evc 0
5479 .  in 0
5480 .  nf
5481 .  doc-do-references
5482 ..
5483 .
5484 .
5485 .\" NS doc-book-count global register
5486 .\" NS   counter of book references
5487 .
5488 .nr doc-book-count 0
5489 .
5490 .
5491 .\" NS doc-book-name global box
5492 .\" NS   string of collected book references
5493 .
5494 .ds doc-book-name
5495 .
5496 .
5497 .\" NS %B user macro
5498 .\" NS   [reference] book name
5499 .\" NS
5500 .\" NS modifies:
5501 .\" NS   doc-arg-ptr
5502 .\" NS   doc-book-count
5503 .\" NS   doc-curr-font
5504 .\" NS   doc-curr-size
5505 .\" NS   doc-macro-name
5506 .\" NS   doc-reference-count
5507 .\" NS
5508 .\" NS local variables:
5509 .\" NS   doc-env-%B
5510 .\" NS
5511 .\" NS width register `%B' set in doc-common
5512 .
5513 .de %B
5514 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5515 .    tm Usage: .%B book_name ... (#\n[.c])
5516 .    return
5517 .  \}
5518 .
5519 .  if \n[doc-is-reference] \{\
5520 .    nr doc-book-count +1
5521 .    nr doc-reference-count +1
5522 .  \}
5523 .
5524 .  ds doc-macro-name %B
5525 .  doc-parse-args \$@
5526 .
5527 .  nr doc-arg-ptr +1
5528 .  nr doc-curr-font \n[.f]
5529 .  nr doc-curr-size \n[.ps]
5530 .
5531 .  ie \n[doc-is-reference] \{\
5532 .    \" append to reference box
5533 .    boxa doc-book-name
5534 .    ev doc-env-%B
5535 .    evc 0
5536 .    in 0
5537 .    nf
5538 .    nop \*[doc-Em-font]\c
5539 .    doc-do-references
5540 .  \}
5541 .  el \{\
5542 .    nop \*[doc-Em-font]\c
5543 .    doc-print-recursive
5544 .  \}
5545 ..
5546 .
5547 .
5548 .\" NS doc-city-count global register
5549 .\" NS   counter of city references
5550 .
5551 .nr doc-city-count 0
5552 .
5553 .
5554 .\" NS doc-city-name global box
5555 .\" NS   string of collected city references
5556 .
5557 .ds doc-city-name
5558 .
5559 .
5560 .\" NS %C user macro
5561 .\" NS   [reference] city
5562 .\" NS
5563 .\" NS modifies:
5564 .\" NS   doc-arg-ptr
5565 .\" NS   doc-curr-font
5566 .\" NS   doc-curr-size
5567 .\" NS   doc-city-count
5568 .\" NS   doc-macro-name
5569 .\" NS   doc-reference-count
5570 .\" NS
5571 .\" NS local variables:
5572 .\" NS   doc-env-%C
5573 .\" NS
5574 .\" NS width register `%C' set in doc-common
5575 .
5576 .de %C
5577 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5578 .    tm Usage: .%C city_name ... (#\n[.c])
5579 .    return
5580 .  \}
5581 .
5582 .  nr doc-city-count +1
5583 .  nr doc-reference-count +1
5584 .
5585 .  ds doc-macro-name %C
5586 .  doc-parse-args \$@
5587 .
5588 .  nr doc-arg-ptr +1
5589 .  nr doc-curr-font \n[.f]
5590 .  nr doc-curr-size \n[.ps]
5591 .
5592 .  \" append to reference box
5593 .  boxa doc-city-name
5594 .  ev doc-env-%C
5595 .  evc 0
5596 .  in 0
5597 .  nf
5598 .  doc-do-references
5599 ..
5600 .
5601 .
5602 .\" NS doc-date-count global register
5603 .\" NS   counter of date references
5604 .
5605 .nr doc-date-count 0
5606 .
5607 .
5608 .\" NS doc-date global box
5609 .\" NS   string of collected date references
5610 .
5611 .ds doc-date
5612 .
5613 .
5614 .\" NS %D user macro
5615 .\" NS   [reference] date
5616 .\" NS
5617 .\" NS modifies:
5618 .\" NS   doc-arg-ptr
5619 .\" NS   doc-curr-font
5620 .\" NS   doc-curr-size
5621 .\" NS   doc-date-count
5622 .\" NS   doc-macro-name
5623 .\" NS   doc-reference-count
5624 .\" NS
5625 .\" NS local variables:
5626 .\" NS   doc-env-%D
5627 .\" NS
5628 .\" NS width register `%D' set in doc-common
5629 .
5630 .de %D
5631 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5632 .    tm Usage: .%D date ... (#\n[.c])
5633 .    return
5634 .  \}
5635 .
5636 .  nr doc-date-count +1
5637 .  nr doc-reference-count +1
5638 .
5639 .  ds doc-macro-name %D
5640 .  doc-parse-args \$@
5641 .
5642 .  nr doc-arg-ptr +1
5643 .  nr doc-curr-font \n[.f]
5644 .  nr doc-curr-size \n[.ps]
5645 .
5646 .  \" append to reference box
5647 .  boxa doc-date
5648 .  ev doc-env-%D
5649 .  evc 0
5650 .  in 0
5651 .  nf
5652 .  doc-do-references
5653 ..
5654 .
5655 .
5656 .\" NS doc-publisher-count global register
5657 .\" NS   counter of publisher references
5658 .
5659 .nr doc-publisher-count 0
5660 .
5661 .
5662 .\" NS doc-publisher-name global box
5663 .\" NS   string of collected publisher references
5664 .
5665 .ds doc-publisher-name
5666 .
5667 .
5668 .\" NS %I user macro
5669 .\" NS   [reference] issuer/publisher name
5670 .\" NS
5671 .\" NS modifies:
5672 .\" NS   doc-arg-ptr
5673 .\" NS   doc-curr-font
5674 .\" NS   doc-curr-size
5675 .\" NS   doc-macro-name
5676 .\" NS   doc-publisher-count
5677 .\" NS   doc-reference-count
5678 .\" NS
5679 .\" NS local variables:
5680 .\" NS   doc-env-%I
5681 .\" NS
5682 .\" NS width register `%I' set in doc-common
5683 .
5684 .de %I
5685 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5686 .    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
5687 .    return
5688 .  \}
5689 .
5690 .  nr doc-publisher-count +1
5691 .  nr doc-reference-count +1
5692 .
5693 .  ds doc-macro-name %I
5694 .  doc-parse-args \$@
5695 .
5696 .  nr doc-arg-ptr +1
5697 .  nr doc-curr-font \n[.f]
5698 .  nr doc-curr-size \n[.ps]
5699 .
5700 .  \" append to reference box
5701 .  boxa doc-publisher-name
5702 .  ev doc-env-%I
5703 .  evc 0
5704 .  in 0
5705 .  nf
5706 .  nop \*[doc-Em-font]\c
5707 .  doc-do-references
5708 ..
5709 .
5710 .
5711 .\" NS doc-journal-count global register
5712 .\" NS   counter of journal references
5713 .
5714 .nr doc-journal-count 0
5715 .
5716 .
5717 .\" NS doc-journal-name global box
5718 .\" NS   string of collected journal references
5719 .
5720 .ds doc-journal-name
5721 .
5722 .
5723 .\" NS %J user macro
5724 .\" NS   [reference] Journal Name
5725 .\" NS
5726 .\" NS modifies:
5727 .\" NS   doc-arg-ptr
5728 .\" NS   doc-curr-font
5729 .\" NS   doc-curr-size
5730 .\" NS   doc-journal-count
5731 .\" NS   doc-macro-name
5732 .\" NS   doc-reference-count
5733 .\" NS
5734 .\" NS local variables:
5735 .\" NS   doc-env-%J
5736 .\" NS
5737 .\" NS width register `%J' set in doc-common
5738 .
5739 .de %J
5740 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5741 .    tm Usage: .%J journal_name ... (#\n[.c])
5742 .    return
5743 .  \}
5744 .
5745 .  nr doc-journal-count +1
5746 .  nr doc-reference-count +1
5747 .
5748 .  ds doc-macro-name %J
5749 .  doc-parse-args \$@
5750 .
5751 .  nr doc-arg-ptr +1
5752 .  nr doc-curr-font \n[.f]
5753 .  nr doc-curr-size \n[.ps]
5754 .
5755 .  \" append to reference box
5756 .  boxa doc-journal-name
5757 .  ev doc-env-%J
5758 .  evc 0
5759 .  in 0
5760 .  nf
5761 .  nop \*[doc-Em-font]\c
5762 .  doc-do-references
5763 ..
5764 .
5765 .
5766 .\" NS doc-issue-count global register
5767 .\" NS   counter of issue number references
5768 .
5769 .nr doc-issue-count 0
5770 .
5771 .
5772 .\" NS doc-issue-name global box
5773 .\" NS   string of collected issue number references
5774 .
5775 .ds doc-issue-name
5776 .
5777 .
5778 .\" NS %N user macro
5779 .\" NS   [reference] issue number
5780 .\" NS
5781 .\" NS modifies:
5782 .\" NS   doc-arg-ptr
5783 .\" NS   doc-curr-font
5784 .\" NS   doc-curr-size
5785 .\" NS   doc-issue-count
5786 .\" NS   doc-macro-name
5787 .\" NS   doc-reference-count
5788 .\" NS
5789 .\" NS local variables:
5790 .\" NS   doc-env-%N
5791 .\" NS
5792 .\" NS width register `%N' set in doc-common
5793 .
5794 .de %N
5795 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5796 .    tm Usage: .%N issue_number ... (#\n[.c])
5797 .    return
5798 .  \}
5799 .
5800 .  nr doc-issue-count +1
5801 .  nr doc-reference-count +1
5802 .
5803 .  ds doc-macro-name %N
5804 .  doc-parse-args \$@
5805 .
5806 .  nr doc-arg-ptr +1
5807 .  nr doc-curr-font \n[.f]
5808 .  nr doc-curr-size \n[.ps]
5809 .
5810 .  \" append to reference box
5811 .  boxa doc-issue-name
5812 .  ev doc-env-%N
5813 .  evc 0
5814 .  in 0
5815 .  nf
5816 .  doc-do-references
5817 ..
5818 .
5819 .
5820 .\" NS doc-optional-count global register
5821 .\" NS   counter of optional information references
5822 .
5823 .nr doc-optional-count 0
5824 .
5825 .
5826 .\" NS doc-optional-string global box
5827 .\" NS   string of collected optional information references
5828 .
5829 .ds doc-optional-string
5830 .
5831 .
5832 .\" NS %O user macro
5833 .\" NS   [reference] optional information
5834 .\" NS
5835 .\" NS modifies:
5836 .\" NS   doc-arg-ptr
5837 .\" NS   doc-curr-font
5838 .\" NS   doc-curr-size
5839 .\" NS   doc-macro-name
5840 .\" NS   doc-optional-count
5841 .\" NS   doc-reference-count
5842 .\" NS
5843 .\" NS local variables:
5844 .\" NS   doc-env-%O
5845 .\" NS
5846 .\" NS width register `%O' set in doc-common
5847 .
5848 .de %O
5849 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5850 .    tm Usage: .%O optional_information ... (#\n[.c])
5851 .    return
5852 .  \}
5853 .
5854 .  nr doc-optional-count +1
5855 .  nr doc-reference-count +1
5856 .
5857 .  ds doc-macro-name %O
5858 .  doc-parse-args \$@
5859 .
5860 .  nr doc-arg-ptr +1
5861 .  nr doc-curr-font \n[.f]
5862 .  nr doc-curr-size \n[.ps]
5863 .
5864 .  \" append to reference box
5865 .  boxa doc-optional-string
5866 .  ev doc-env-%O
5867 .  evc 0
5868 .  in 0
5869 .  nf
5870 .  doc-do-references
5871 ..
5872 .
5873 .
5874 .\" NS doc-page-number-count global register
5875 .\" NS   counter of page number references
5876 .
5877 .nr doc-page-number-count 0
5878 .
5879 .
5880 .\" NS doc-page-number-string global box
5881 .\" NS   string of collected page number references
5882 .
5883 .ds doc-page-number-string
5884 .
5885 .
5886 .\" NS %P user macro
5887 .\" NS   [reference] page numbers
5888 .\" NS
5889 .\" NS modifies:
5890 .\" NS   doc-arg-ptr
5891 .\" NS   doc-curr-font
5892 .\" NS   doc-curr-size
5893 .\" NS   doc-macro-name
5894 .\" NS   doc-page-number-count
5895 .\" NS   doc-reference-count
5896 .\" NS
5897 .\" NS local variables:
5898 .\" NS   doc-env-%P
5899 .\" NS
5900 .\" NS width register `%P' set in doc-common
5901 .
5902 .de %P
5903 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5904 .    tm Usage: .%P page_number ... (#\n[.c])
5905 .    return
5906 .  \}
5907 .
5908 .  nr doc-page-number-count +1
5909 .  nr doc-reference-count +1
5910 .
5911 .  ds doc-macro-name %P
5912 .  doc-parse-args \$@
5913 .
5914 .  nr doc-arg-ptr +1
5915 .  nr doc-curr-font \n[.f]
5916 .  nr doc-curr-size \n[.ps]
5917 .
5918 .  \" append to reference box
5919 .  boxa doc-page-number-string
5920 .  ev doc-env-%P
5921 .  evc 0
5922 .  in 0
5923 .  nf
5924 .  doc-do-references
5925 ..
5926 .
5927 .
5928 .\" NS doc-corporate-count global register
5929 .\" NS   counter of corporate references
5930 .
5931 .nr doc-corporate-count 0
5932 .
5933 .
5934 .\" NS doc-corporate-name global box
5935 .\" NS   string of collected corporate references
5936 .
5937 .ds doc-corporate-name
5938 .
5939 .
5940 .\" NS %Q user macro
5941 .\" NS   corporate or foreign author
5942 .\" NS
5943 .\" NS modifies:
5944 .\" NS   doc-arg-ptr
5945 .\" NS   doc-corporate-count
5946 .\" NS   doc-curr-font
5947 .\" NS   doc-curr-size
5948 .\" NS   doc-macro-name
5949 .\" NS   doc-reference-count
5950 .\" NS
5951 .\" NS local variables:
5952 .\" NS   doc-env-%Q
5953 .\" NS
5954 .\" NS width register `%Q' set in doc-common
5955 .
5956 .de %Q
5957 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
5958 .    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
5959 .    return
5960 .  \}
5961 .
5962 .  nr doc-corporate-count +1
5963 .  nr doc-reference-count +1
5964 .
5965 .  ds doc-macro-name %Q
5966 .  doc-parse-args \$@
5967 .
5968 .  nr doc-arg-ptr +1
5969 .  nr doc-curr-font \n[.f]
5970 .  nr doc-curr-size \n[.ps]
5971 .
5972 .  \" append to reference box
5973 .  boxa doc-corporate-name
5974 .  ev doc-env-%Q
5975 .  evc 0
5976 .  in 0
5977 .  nf
5978 .  doc-do-references
5979 ..
5980 .
5981 .
5982 .\" NS doc-report-count global register
5983 .\" NS   counter of report references
5984 .
5985 .nr doc-report-count 0
5986 .
5987 .
5988 .\" NS doc-report-name global box
5989 .\" NS   string of collected report references
5990 .
5991 .ds doc-report-name
5992 .
5993 .
5994 .\" NS %R user macro
5995 .\" NS   [reference] report name
5996 .\" NS
5997 .\" NS modifies:
5998 .\" NS   doc-arg-ptr
5999 .\" NS   doc-curr-font
6000 .\" NS   doc-curr-size
6001 .\" NS   doc-macro-name
6002 .\" NS   doc-reference-count
6003 .\" NS   doc-report-count
6004 .\" NS
6005 .\" NS local variables:
6006 .\" NS   doc-env-%R
6007 .\" NS
6008 .\" NS width register `%R' set in doc-common
6009 .
6010 .de %R
6011 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6012 .    tm Usage: .%R reference_report ... (#\n[.c])
6013 .    return
6014 .  \}
6015 .
6016 .  nr doc-report-count +1
6017 .  nr doc-reference-count +1
6018 .
6019 .  ds doc-macro-name %R
6020 .  doc-parse-args \$@
6021 .
6022 .  nr doc-arg-ptr +1
6023 .  nr doc-curr-font \n[.f]
6024 .  nr doc-curr-size \n[.ps]
6025 .
6026 .  \" append to reference box
6027 .  boxa doc-report-name
6028 .  ev doc-env-%R
6029 .  evc 0
6030 .  in 0
6031 .  nf
6032 .  doc-do-references
6033 ..
6034 .
6035 .
6036 .\" NS doc-reference-title-count global register
6037 .\" NS   counter of reference title references
6038 .
6039 .nr doc-reference-title-count 0
6040 .
6041 .
6042 .\" NS doc-reference-title-name global box
6043 .\" NS   string of collected reference title references
6044 .
6045 .ds doc-reference-title-name
6046 .
6047 .
6048 .\" NS doc-reference-title-name-for-book global box
6049 .\" NS   string of collected reference title references
6050 .\" NS   (saved with another font; this is a shortcoming of groff)
6051 .
6052 .ds doc-reference-title-name-for-book
6053 .
6054 .
6055 .\" NS %T user macro
6056 .\" NS   reference title
6057 .\" NS
6058 .\" NS modifies:
6059 .\" NS   doc-arg-ptr
6060 .\" NS   doc-curr-font
6061 .\" NS   doc-curr-size
6062 .\" NS   doc-macro-name
6063 .\" NS   doc-reference-title-count
6064 .\" NS   doc-report-count
6065 .\" NS
6066 .\" NS local variables:
6067 .\" NS   doc-env-%T
6068 .\" NS
6069 .\" NS width register `%T' set in doc-common
6070 .
6071 .de %T
6072 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6073 .    tm Usage: .%T reference_title ... (#\n[.c])
6074 .    return
6075 .  \}
6076 .
6077 .  if \n[doc-is-reference] \{\
6078 .    nr doc-reference-title-count +1
6079 .    nr doc-reference-count +1
6080 .  \}
6081 .
6082 .  ds doc-macro-name %T
6083 .  doc-parse-args \$@
6084 .
6085 .  nr doc-arg-ptr +1
6086 .  nr doc-curr-font \n[.f]
6087 .  nr doc-curr-size \n[.ps]
6088 .  ie \n[doc-is-reference] \{\
6089 .    \" append to reference box
6090 .    boxa doc-reference-title-name-for-book
6091 .    ev doc-env-%T
6092 .    evc 0
6093 .    in 0
6094 .    nf
6095 .    nop \*[doc-No-font]\c
6096 .    doc-do-references
6097 .
6098 .    \" do it a second time with another font
6099 .    ds doc-macro-name %T
6100 .    doc-parse-args \$@
6101 .
6102 .    nr doc-arg-ptr +1
6103 .    nr doc-curr-font \n[.f]
6104 .    nr doc-curr-size \n[.ps]
6105 .    boxa doc-reference-title-name
6106 .    ev doc-env-%T
6107 .    evc 0
6108 .    in 0
6109 .    nf
6110 .    nop \*[doc-Em-font]\c
6111 .    doc-do-references
6112 .  \}
6113 .  el \{\
6114 .    nop \*[doc-Em-font]\c
6115 .    doc-print-recursive
6116 .  \}
6117 ..
6118 .
6119 .
6120 .\" NS doc-url-count global register
6121 .\" NS   counter of hypertext references
6122 .
6123 .nr doc-url-count 0
6124 .
6125 .
6126 .\" NS doc-url-name global box
6127 .\" NS   string of collected hypertext references
6128 .
6129 .ds doc-url-name
6130 .
6131 .
6132 .\" NS doc-volume-count global register
6133 .\" NS   counter of reference title references
6134 .
6135 .nr doc-volume-count 0
6136 .
6137 .
6138 .\" NS doc-volume-name global box
6139 .\" NS   string of collected volume references
6140 .
6141 .ds doc-volume-name
6142 .
6143 .
6144 .\" NS %U user macro
6145 .\" NS   hypertext reference
6146 .\" NS
6147 .\" NS modifies:
6148 .\" NS   doc-arg-ptr
6149 .\" NS   doc-curr-font
6150 .\" NS   doc-curr-size
6151 .\" NS   doc-macro-name
6152 .\" NS   doc-reference-count
6153 .\" NS   doc-url-count
6154 .\" NS
6155 .\" NS local variables:
6156 .\" NS   doc-env-%U
6157 .\" NS
6158 .\" NS width register `%U' set in doc-common
6159 .
6160 .de %U
6161 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6162 .    tm Usage: .%U URL ... (#\n[.c])
6163 .    return
6164 .  \}
6165 .
6166 .  nr doc-url-count +1
6167 .  nr doc-reference-count +1
6168 .
6169 .  ds doc-macro-name %U
6170 .  doc-parse-args \$@
6171 .
6172 .  nr doc-arg-ptr +1
6173 .  nr doc-curr-font \n[.f]
6174 .  nr doc-curr-size \n[.ps]
6175 .
6176 .  \" append to reference box
6177 .  boxa doc-url-name
6178 .  ev doc-env-%U
6179 .  evc 0
6180 .  in 0
6181 .  nf
6182 .  doc-do-references
6183 ..
6184 .
6185 .
6186 .\" NS %V user macro
6187 .\" NS   reference volume
6188 .\" NS
6189 .\" NS modifies:
6190 .\" NS   doc-arg-ptr
6191 .\" NS   doc-curr-font
6192 .\" NS   doc-curr-size
6193 .\" NS   doc-macro-name
6194 .\" NS   doc-reference-count
6195 .\" NS   doc-volume-count
6196 .\" NS
6197 .\" NS local variables:
6198 .\" NS   doc-env-%V
6199 .\" NS
6200 .\" NS width register `%V' set in doc-common
6201 .
6202 .de %V
6203 .  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
6204 .    tm Usage: .%V volume ... (#\n[.c])
6205 .    return
6206 .  \}
6207 .
6208 .  nr doc-volume-count +1
6209 .  nr doc-reference-count +1
6210 .
6211 .  ds doc-macro-name %V
6212 .  doc-parse-args \$@
6213 .
6214 .  nr doc-arg-ptr +1
6215 .  nr doc-curr-font \n[.f]
6216 .  nr doc-curr-size \n[.ps]
6217 .
6218 .  \" append to reference box
6219 .  boxa doc-volume-name
6220 .  ev doc-env-%V
6221 .  evc 0
6222 .  in 0
6223 .  nf
6224 .  doc-do-references
6225 ..
6226 .
6227 .
6228 .\" NS doc-do-references macro
6229 .\" NS   reference recursion routine
6230 .\" NS
6231 .\" NS modifies:
6232 .\" NS   doc-arg-ptr
6233 .\" NS
6234 .\" NS local variables:
6235 .\" NS   doc-reg-ddr
6236 .\" NS   doc-reg-ddr1
6237 .
6238 .de doc-do-references
6239 .  if !\n[doc-is-reference] \
6240 .    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
6241 .
6242 .  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
6243 .
6244 .  ie (\n[doc-reg-ddr1] == 1) \{\
6245 .    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
6246 .    doc-append-arg \c 3
6247 .    \*[doc-arg\n[doc-arg-ptr]]
6248 .  \}
6249 .  el \{\
6250 .    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
6251 .
6252 .    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
6253 .      \" finish reference box
6254 .      br
6255 .      ev
6256 .      boxa
6257 .
6258 .      doc-reset-args
6259 .    \}
6260 .    el \{\
6261 .      nr doc-reg-ddr \n[doc-arg-ptr]
6262 .      nr doc-arg-ptr +1
6263 .      nop \)\*[doc-space\n[doc-reg-ddr]]\c
6264 .      doc-do-references
6265 .  \}\}
6266 ..
6267 .
6268 .
6269 .\" NS Hf user macro
6270 .\" NS   source include header files.
6271 .\" NS
6272 .\" NS modifies:
6273 .\" NS   doc-curr-font
6274 .\" NS   doc-curr-size
6275 .\" NS
6276 .\" NS width register `Hf' set in doc-common
6277 .
6278 .de Hf
6279 .  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
6280 .    doc-paragraph
6281 .    nop File:
6282 .    Pa \$1
6283 .
6284 .    Bd -literal
6285 .    so \$1
6286 .    Ed
6287 .
6288 .    doc-paragraph
6289 .  \}
6290 .  el \
6291 .    Usage: .Hf file (#\n[.c])
6292 ..
6293 .
6294 .
6295 .\" NS doc-have-author global register (bool)
6296 .\" NS   set in `An'
6297 .
6298 .nr doc-have-author 0
6299 .
6300 .
6301 .\" NS An user macro
6302 .\" NS   author name
6303 .\" NS
6304 .\" NS modifies:
6305 .\" NS   doc-arg-ptr
6306 .\" NS   doc-curr-font
6307 .\" NS   doc-curr-size
6308 .\" NS   doc-have-author
6309 .\" NS   doc-macro-name
6310 .\" NS
6311 .\" NS width register `An' set in doc-common
6312 .
6313 .de An
6314 .  if !\n[doc-arg-limit] \{\
6315 .    ie \n[.$] \{\
6316 .      ie        "\$1"-nosplit" \
6317 .        nr doc-in-authors-section 0
6318 .      el \{ .ie "\$1"-split" \
6319 .        nr doc-in-authors-section 1
6320 .      el \{\
6321 .        ds doc-macro-name An
6322 .        doc-parse-args \$@
6323 .    \}\}\}
6324 .    el \{\
6325 .      tm1 "Usage: .An {-nosplit | -split}
6326 .      tm1 "       .An author_name ... (#\n[.c])
6327 .  \}\}
6328 .
6329 .  if \n[doc-in-authors-section] \{\
6330 .    ie \n[doc-have-author] \
6331 .      br
6332 .    el \
6333 .      nr doc-have-author 1
6334 .  \}
6335 .
6336 .  if \n[doc-arg-limit] \{\
6337 .    nr doc-arg-ptr +1
6338 .    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
6339 .      nr doc-curr-font \n[.f]
6340 .      nr doc-curr-size \n[.ps]
6341 .      doc-print-recursive
6342 .    \}
6343 .    el \{\
6344 .      tm Usage: .An author_name ... (#\n[.c])
6345 .      doc-reset-args
6346 .  \}\}
6347 ..
6348 .
6349 .
6350 .\" NS Rv user macro
6351 .\" NS   return values
6352 .\" NS
6353 .\" NS width register `Rv' set in doc-common
6354 .\" NS
6355 .\" NS local variables:
6356 .\" NS   doc-str-Rv-std-prefix
6357 .\" NS   doc-str-Rv-std-suffix
6358 .\" NS   doc-str-Rv-stds-prefix
6359 .\" NS   doc-str-Rv-stds-and
6360 .\" NS   doc-str-Rv-stds-suffix
6361 .\" NS   doc-str-Rv-std0
6362 .
6363 .ds doc-str-Rv-std-prefix "The
6364 .ds doc-str-Rv-std-suffix "function returns the value\~0 if successful;
6365 .as doc-str-Rv-std-suffix " otherwise the value\~\-1 is returned and
6366 .as doc-str-Rv-std-suffix " the global variable \*[doc-Va-font]errno\f[]
6367 .as doc-str-Rv-std-suffix " is set to indicate the error.
6368 .
6369 .ds doc-str-Rv-stds-prefix "The
6370 .ds doc-str-Rv-stds-and    "and
6371 .ds doc-str-Rv-stds-suffix "functions return the value\~0 if successful;
6372 .as doc-str-Rv-stds-suffix " otherwise the value\~\-1 is returned and
6373 .as doc-str-Rv-stds-suffix " the global variable \*[doc-Va-font]errno\f[]
6374 .as doc-str-Rv-stds-suffix " is set to indicate the error.
6375 .
6376 .ds doc-str-Rv-std0 "Upon successful completion, the value\~0 is returned;
6377 .as doc-str-Rv-std0 " otherwise the value\~\-1 is returned and
6378 .as doc-str-Rv-std0 " the global variable \*[doc-Va-font]errno\f[]
6379 .as doc-str-Rv-std0 " is set to indicate the error.
6380 .
6381 .de Rv
6382 .
6383 .\" XXX: what does this function without `-std'?
6384 .
6385 .  if \n[doc-arg-limit] \{\
6386 .    tm Usage: .Rv not callable by other macros (#\n[.c])
6387 .    doc-reset-args
6388 .    return
6389 .  \}
6390 .
6391 .  if !\n[.$] \{\
6392 .    tm Usage: .Rv [-std] [<function> ...] (#\n[.c])
6393 .    return
6394 .  \}
6395 .
6396 .  if "\$1"-std" \{\
6397 .    nr doc-reg-Rv \*[doc-section]
6398 .    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
6399 .      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
6400 .    br
6401 .    shift
6402 .    ie (\n[.$] > 1) \{\
6403 .      nop \)\*[doc-str-Rv-stds-prefix]
6404 .      nr doc-reg-Rv 1
6405 .      while (\n[doc-reg-Rv] < \n[.$]) \{\
6406 .        ie (\n[.$] > 2) \
6407 .          Fn \$\n[doc-reg-Rv] ,
6408 .        el \
6409 .          Fn \$\n[doc-reg-Rv]
6410 .        nr doc-reg-Rv +1
6411 .      \}
6412 .      nop \)\*[doc-str-Rv-stds-and]
6413 .      Fn \$\n[.$]
6414 .      nop \)\*[doc-str-Rv-stds-suffix]
6415 .    \}
6416 .    el \{ .ie (\n[.$] == 1) \{\
6417 .      nop \)\*[doc-str-Rv-std-prefix]
6418 .      Fn \$1
6419 .      nop \)\*[doc-str-Rv-std-suffix]
6420 .    \}
6421 .    el \{\
6422 .      nop \)\*[doc-str-Rv-std0]
6423 .  \}\}\}
6424 ..
6425 .
6426 .
6427 .\" NS Ex user macro
6428 .\" NS   exit status
6429 .\" NS
6430 .\" NS width register `Ex' set in doc-common
6431 .\" NS
6432 .\" NS local variables:
6433 .\" NS   doc-str-Ex-std-prefix
6434 .\" NS   doc-str-Ex-std-suffix
6435 .
6436 .ds doc-str-Ex-std-prefix "The
6437 .ds doc-str-Ex-std-suffix "utility exits\~0 on success,
6438 .as doc-str-Ex-std-suffix " and\~>0 if an error occurs.
6439 .
6440 .ds doc-str-Ex-stds-prefix "The
6441 .als doc-str-Ex-stds-and doc-str-Rv-stds-and
6442 .ds doc-str-Ex-stds-suffix "utilities exit\~0 on success,
6443 .as doc-str-Ex-stds-suffix " and\~>0 if an error occurs.
6444 .
6445 .de Ex
6446 .
6447 .\" XXX: what does this function without `-std'?
6448 .
6449 .  if \n[doc-arg-limit] \{\
6450 .    tm Usage: .Ex not callable by other macros (#\n[.c])
6451 .    doc-reset-args
6452 .    return
6453 .  \}
6454 .
6455 .  if !\n[.$] \{\
6456 .    tm Usage: .Ex [-std] [<utility> ...] (#\n[.c])
6457 .    return
6458 .  \}
6459 .
6460 .  if "\$1"-std" \{\
6461 .    nr doc-reg-Ex \*[doc-section]
6462 .    if !((\n[doc-reg-Ex] == 1) : (\n[doc-reg-Ex] == 6) : (\n[doc-reg-Ex] == 8)) \
6463 .      tm Usage: .Ex -std in sections 1, 6 and 8 only (#\n[.c])
6464 .    br
6465 .    shift
6466 .    ie (\n[.$] > 1) \{\
6467 .      nop \)\*[doc-str-Ex-stds-prefix]
6468 .      nr doc-reg-Ex 1
6469 .      while (\n[doc-reg-Ex] < \n[.$]) \{\
6470 .        ie (\n[.$] > 2) \
6471 .          Nm \$\n[doc-reg-Ex] ,
6472 .        el \
6473 .          Nm \$\n[doc-reg-Ex]
6474 .        nr doc-reg-Ex +1
6475 .      \}
6476 .      nop \)\*[doc-str-Ex-stds-and]
6477 .      Nm \$\n[.$]
6478 .      nop \)\*[doc-str-Ex-stds-suffix]
6479 .    \}
6480 .    el \{\
6481 .      nop \)\*[doc-str-Ex-std-prefix]
6482 .      Nm \$1
6483 .      nop \)\*[doc-str-Ex-std-suffix]
6484 .  \}\}
6485 ..
6486 .
6487 .
6488 .\" NS Mt user macro
6489 .\" NS   mailto (for conversion to HTML)
6490 .
6491 .de Mt
6492 .  \" XXX: error handling missing
6493 .  Pa \$@
6494 ..
6495 .
6496 .
6497 .\" NS Lk user macro
6498 .\" NS   link (for conversion to HTML)
6499 .\" NS
6500 .\" NS local variables:
6501 .\" NS   doc-reg-Lk
6502 .\" NS   doc-str-Lk
6503 .
6504 .de Lk
6505 .  ds doc-str-Lk Sy \$@
6506 .
6507 .  ie (\n[.$] > 1) \{\
6508 .    doc-get-arg-type \$2
6509 .    ie (\n[doc-arg-type] < 3) \{\
6510 .      Em \)\$2:
6511 .      ds doc-str-Lk Sy "\$1"
6512 .      doc-get-width "\$1"
6513 .      shift 2
6514 .      if \n[.$] \
6515 .        as doc-str-Lk " \$@
6516 .    \}
6517 .    el \
6518 .      doc-get-width "\$1"
6519 .  \}
6520 .  el \
6521 .    doc-get-width "\$1"
6522 .
6523 .  ie n \
6524 .    nr doc-reg-Lk 26
6525 .  el \
6526 .    nr doc-reg-Lk 38
6527 .  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
6528 .    D1 \*[doc-str-Lk]
6529 .  el \
6530 .    \*[doc-str-Lk]
6531 ..
6532 .
6533 .
6534 .\" NS doc-defunct-macro macro
6535 .\" NS   this is the skeleton for defunct macros
6536 .\" NS
6537 .
6538 .de doc-defunct-macro
6539 .  tmc mdoc error: .\$0 defunct
6540 .  if d doc-\$0-usage \
6541 .    tmc , \*[doc-\$0-usage]
6542 .  tm1 " (#\n[.c])
6543 ..
6544 .
6545 .
6546 .\" obsolete macros
6547 .
6548 .als Db doc-defunct-macro
6549 .
6550 .als Ds doc-defunct-macro
6551 .
6552 .als Or doc-defunct-macro
6553 .ds doc-Or-usage use `|'
6554 .
6555 .als Sf doc-defunct-macro
6556 .ds doc-Sf-usage use .Pf or .Ns
6557 .
6558 .
6559 .rn em e@
6560 .
6561 .de em
6562 .  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
6563 .  tm1 "            Should this have been `.Em ...'?
6564 .  ab
6565 ..
6566 .
6567 .
6568 .\" NS doc-empty-line macro
6569 .\" NS   emit warning and print empty line
6570 .
6571 .de doc-empty-line
6572 .  if !\n[doc-display-depth] \
6573 .    tm mdoc warning: Empty input line #\n[.c]
6574 .  sp
6575 ..
6576 .
6577 .blm doc-empty-line
6578 .
6579 .
6580 .ec
6581 .
6582 .
6583 .\" For UTF-8, map some characters conservatively for the sake
6584 .\" of easy cut and paste.
6585 .
6586 .if '\*[.T]'utf8' \{\
6587 .  rchar \- - ' `
6588 .
6589 .  char \- \N'45'
6590 .  char  - \N'45'
6591 .  char  ' \N'39'
6592 .  char  ` \N'96'
6593 .\}
6594 .
6595 .
6596 .\" load local modifications
6597 .mso mdoc.local
6598 .
6599 .\" EOF