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