* tmac/www.tmac (DC): Handle TTY devices.
[s-roff.git] / tmac / doc-common
blob0d819ced08ffa3287ae4fef2e64c6d22e3eb2df3
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"      This product includes software developed by the University of
15 .\"      California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)doc-common  8.1 (Berkeley) 06/08/93
33 .\"
34 .\"     %beginstrip%
37 .\" Macro Identifiers.  For each user macro a corresponding register with
38 .\" the same name must exist.  Its value must not be zero.
40 .nr %A 1
41 .nr %B 1
42 .nr %D 1
43 .nr %I 1
44 .nr %J 1
45 .nr %N 1
46 .nr %O 1
47 .nr %P 1
48 .nr %Q 1
49 .nr %R 1
50 .nr %T 1
51 .nr %V 1
52 .nr Ac 3
53 .nr Ad 12n
54 .nr An 12n
55 .nr Ao 12n
56 .nr Ap 2
57 .nr Aq 12n
58 .nr Ar 12n
59 .nr At 1
60 .nr Bc 3
61 .nr Bf 8n\" ?
62 .nr Bk 8n\" ?
63 .nr Bl 1
64 .nr Bo 12n
65 .nr Bq 12n
66 .nr Brc 3
67 .nr Bro 12n
68 .nr Brq 12n
69 .nr Bsx 1
70 .nr Bt 8n\" ?
71 .nr Bx 1
72 .nr Cd 12n
73 .nr Cm 10n
74 .nr D1 8n\" ?
75 .nr Dc 3
76 .nr Dl 8n\" ?
77 .nr Dt 8n\" ?
78 .nr Do 12n
79 .nr Dq 12n
80 .nr Ds 6n\" many manpages still use this as a -width value
81 .nr Dv 12n
82 .nr Ec 3
83 .nr Ef 8n\" ?
84 .nr Ek 8n\" ?
85 .nr El 1
86 .nr Em 10n
87 .nr En 12n
88 .nr Eo 12n
89 .nr Eq 12n
90 .nr Er 17n
91 .nr Es 12n
92 .nr Ev 15n
93 .nr Ex 1
94 .nr Fa 12n
95 .nr Fc 3
96 .nr Fd 12n\" ?
97 .nr Fl 10n
98 .nr Fn 16n
99 .nr Fo 16n
100 .nr Fr 12n\" ?
101 .nr Ft 8n\" ?
102 .nr Fx 1
103 .nr Ic 10n
104 .nr In 12n
105 .nr It 8n\" ?
106 .nr Lb 11n
107 .nr Li 16n
108 .nr Lk 6n\" ?
109 .nr Lp 8n\" ?
110 .nr Me 6n
111 .nr Ms 6n
112 .nr Mt 6n\" ?
113 .nr Nd 8n\" ?
114 .nr Nm 10n
115 .nr No 12n
116 .nr Ns 2
117 .nr Nx 1
118 .nr Oc 3
119 .nr Oo 10n
120 .nr Op 14n
121 .nr Os 6n\" ?
122 .nr Ox 1
123 .nr Pa 32n
124 .nr Pc 3
125 .nr Pf 12n
126 .nr Po 12n
127 .nr Pp 8n\" ?
128 .nr Pq 12n
129 .nr Qc 3
130 .nr Ql 16n
131 .nr Qo 12n
132 .nr Qq 12n
133 .nr Rv 1
134 .nr Sc 3
135 .nr Sh 8n
136 .nr Sm 8n\" ?
137 .nr So 12n
138 .nr Sq 12n
139 .nr Ss 8n
140 .nr St 8n\" ?
141 .nr Sx 16n
142 .nr Sy 6n
143 .nr Ta 2
144 .nr Tn 10n
145 .nr Ud 8n\" ?
146 .nr Ux 1
147 .nr Va 12n
148 .nr Vt 8n\" ?
149 .nr Xc 3
150 .nr Xo 1
151 .nr Xr 10n
154 .\" macros which must be processed after the closing delimiter of `Op'
155 .\" and friends
156 .ds doc-after-Ao
157 .ds doc-after-Bo
158 .ds doc-after-Bro
159 .ds doc-after-Do
160 .ds doc-after-Eo
161 .ds doc-after-Fo
162 .ds doc-after-Ns
163 .ds doc-after-Oo
164 .ds doc-after-Po
165 .ds doc-after-Qo
166 .ds doc-after-So
167 .ds doc-after-Xo
170 .nr doc-display-indent 6n
173 .\" space strings
175 .ds doc-soft-space " \"
176 .ds doc-hard-space \~
177 .ds doc-tab \t
183 .\" punctuation values (suffix=3, prefix=4)
185 .nr doc-punct. 3
186 .nr doc-punct, 3
187 .nr doc-punct: 3
188 .nr doc-punct; 3
189 .nr doc-punct( 4
190 .nr doc-punct) 3
191 .nr doc-punct[ 4
192 .nr doc-punct] 3
193 .nr doc-punct? 3
194 .nr doc-punct! 3
197 .\" header assembly macros
199 .\" NS doc-document-title global string
200 .\" NS   the title of the manual page
202 .ds doc-document-title UNTITLED
205 .\" NS doc-volume global string
206 .\" NS   the volume where the manual page belongs to
208 .ds doc-volume LOCAL
211 .\" NS doc-section global string
212 .\" NS   the manual section
214 .ds doc-section Null
217 .\" NS Dt user macro (not parsed, not callable)
218 .\" NS   document title
219 .\" NS
220 .\" NS modifies:
221 .\" NS   doc-document-title
222 .\" NS   doc-section
223 .\" NS   doc-volume
224 .\" NS
225 .\" NS local variables:
226 .\" NS   doc-volume-as-XXX
227 .\" NS   doc-volume-ds-XXX
228 .\" NS
229 .\" NS width register `Dt' set above
231 .\" an alternative, more detailed scheme for naming the manual sections
233 .ds doc-volume-operating-system BSD
234 .nr doc-volume-operating-system-ateol 0
235 .ds doc-volume-ds-1 General Commands Manual
236 .ds doc-volume-ds-2 System Calls Manual
237 .ds doc-volume-ds-3 Library Functions Manual
238 .ds doc-volume-ds-4 Kernel Interfaces Manual
239 .ds doc-volume-ds-5 File Formats Manual
240 .ds doc-volume-ds-6 Games Manual
241 .ds doc-volume-ds-7 Miscellaneous Information Manual
242 .ds doc-volume-ds-8 System Manager's Manual
243 .ds doc-volume-ds-9 Kernel Developer's Manual
245 .ds doc-volume-ds-USD   User's Supplementary Documents
246 .ds doc-volume-ds-PS1   Programmer's Supplementary Documents
247 .ds doc-volume-ds-AMD   Ancestral Manual Documents
248 .ds doc-volume-ds-SMM   System Manager's Manual
249 .ds doc-volume-ds-URM   User's Reference Manual
250 .ds doc-volume-ds-PRM   Programmer's Manual
251 .ds doc-volume-ds-KM    Kernel Manual
252 .ds doc-volume-ds-IND   Manual Master Index
253 .ds doc-volume-ds-LOCAL Local Manual
254 .ds doc-volume-ds-CON   Contributed Software Manual
256 .als doc-volume-ds-MMI doc-volume-ds-IND
257 .als doc-volume-ds-LOC doc-volume-ds-LOCAL
259 .ds doc-volume-as-alpha    Alpha
260 .als doc-volume-as-Alpha doc-volume-as-alpha
261 .ds doc-volume-as-amiga    Amiga
262 .ds doc-volume-as-arc      Arc
263 .ds doc-volume-as-arm26    ARM26
264 .ds doc-volume-as-arm32    ARM32
265 .ds doc-volume-as-atari    Atari
266 .ds doc-volume-as-bebox    BEbox
267 .ds doc-volume-as-cobalt   Cobalt
268 .ds doc-volume-as-evbsh3   Evbsh3
269 .ds doc-volume-as-hp300    HP300
270 .ds doc-volume-as-hpcmips  HPcmips
271 .ds doc-volume-as-i386     i386
272 .ds doc-volume-as-luna68k  luna68k
273 .ds doc-volume-as-m68k     m68k
274 .ds doc-volume-as-mac68k   mac68k
275 .ds doc-volume-as-macppc   macppc
276 .ds doc-volume-as-mips     MIPS
277 .ds doc-volume-as-mmeye    mmeye
278 .ds doc-volume-as-mvme68k  mvme68k
279 .ds doc-volume-as-news68k  news68k
280 .ds doc-volume-as-newsmips newsmips
281 .ds doc-volume-as-next68k  next68k
282 .ds doc-volume-as-ofppc    ofppc
283 .ds doc-volume-as-pc532    pc532
284 .ds doc-volume-as-pmax     pmax
285 .ds doc-volume-as-powerpc  powerpc
286 .ds doc-volume-as-prep     prep
287 .ds doc-volume-as-sgimips  sgimips
288 .ds doc-volume-as-sh3      sh3
289 .ds doc-volume-as-sparc    SPARC
290 .ds doc-volume-as-sparc64  sparc64
291 .ds doc-volume-as-sun3     sun3
292 .ds doc-volume-as-tahoe    Tahoe
293 .ds doc-volume-as-vax      VAX
294 .ds doc-volume-as-x68k     x68k
296 .de Dt
297 .  \" reset default arguments
298 .  ds doc-document-title UNTITLED
299 .  ds doc-volume LOCAL
300 .  ds doc-section Null
302 .  if !"\$1"" \
303 .    ds doc-document-title "\$1
305 .  if !"\$2"" \{\
306 .    ds doc-section \$2
307 .    ie \B\a\$2\a \{\
308 .      if ((\$2 >= 1) & (\$2 <= 9)) \{\
309 .        ie \n[doc-volume-operating-system-ateol] \{\
310 .          ds doc-volume "\*[doc-volume-ds-\$2] \*[doc-volume-operating-system]
311 .          if \A\a\$3\a \{\
312 .            if d doc-volume-as-\$3 \
313 .              as doc-volume "/\*[doc-volume-as-\$3]
314 .        \}\}
315 .        el \{\
316 .          ds doc-volume "\*[doc-volume-operating-system]
317 .          if \A\a\$3\a \{\
318 .            if d doc-volume-as-\$3 \
319 .              as doc-volume "/\*[doc-volume-as-\$3]
320 .          \}
321 .          as doc-volume " \*[doc-volume-ds-\$2]
322 .    \}\}\}
323 .    el \{\
324 .      ie "\$2"unass" \
325 .        ds doc-volume DRAFT
326 .      el \{ .ie "\$2"draft" \
327 .        ds doc-volume DRAFT
328 .      el .if "\$2"paper" \
329 .        ds doc-volume UNTITLED
330 .      \}\}
331 .      if \A\a\$3\a \{\
332 .        if d doc-volume-ds-\$3 \
333 .          ds doc-volume "\*[doc-volume-ds-\$3]
334 .  \}\}\}
336 .  if !"\$3"" \
337 .    if "\*[doc-volume]"LOCAL" \
338 .      ds doc-volume \$3
342 .\" NS doc-default-operating-system global string
343 .\" NS   the exact (default) version of the operating system
344 .\" NS
345 .\" NS override this in `mdoc.local', if necessary
347 .ds doc-default-operating-system BSD
350 .\" NS doc-operating-system global string
351 .\" NS   the exact version of the operating system
353 .ds doc-operating-system
356 .\" NS Os user macro (not parsed, not callable)
357 .\" NS   operating system
358 .\" NS
359 .\" NS modifies:
360 .\" NS   doc-operating-system
361 .\" NS
362 .\" NS local variables:
363 .\" NS   doc-operating-system-XXX-XXX
364 .\" NS
365 .\" NS width register `Os' set above
367 .ds doc-operating-system-ATT-7   7th\~Edition
368 .als doc-operating-system-ATT-7th doc-operating-system-ATT-7
369 .ds doc-operating-system-ATT-3   System\~III
370 .als doc-operating-system-ATT-III doc-operating-system-ATT-3
371 .ds doc-operating-system-ATT-V   System\~V
372 .ds doc-operating-system-ATT-V.2 System\~V Release\~2
373 .ds doc-operating-system-ATT-V.3 System\~V Release\~3
374 .ds doc-operating-system-ATT-V.4 System\~V Release\~4
376 .ds doc-operating-system-BSD-3    3rd\~Berkeley Distribution
377 .ds doc-operating-system-BSD-4    4th\~Berkeley Distribution
378 .ds doc-operating-system-BSD-4.1  4.1\~Berkeley Distribution
379 .ds doc-operating-system-BSD-4.2  4.2\~Berkeley Distribution
380 .ds doc-operating-system-BSD-4.3  4.3\~Berkeley Distribution
381 .ds doc-operating-system-BSD-4.3T 4.3-Tahoe Berkeley Distribution
382 .ds doc-operating-system-BSD-4.3R 4.3-Reno Berkeley Distribution
383 .als doc-operating-system-BSD-4.3t doc-operating-system-BSD-4.3T
384 .als doc-operating-system-BSD-4.3r doc-operating-system-BSD-4.3R
385 .ds doc-operating-system-BSD-4.4  4.4BSD
387 .ds doc-operating-system-NetBSD-0.8  0.8
388 .ds doc-operating-system-NetBSD-0.8a 0.8A
389 .ds doc-operating-system-NetBSD-0.9  0.9
390 .ds doc-operating-system-NetBSD-0.9a 0.9A
391 .ds doc-operating-system-NetBSD-1.0  1.0
392 .ds doc-operating-system-NetBSD-1.0a 1.0A
393 .ds doc-operating-system-NetBSD-1.1  1.1
394 .ds doc-operating-system-NetBSD-1.2  1.2
395 .ds doc-operating-system-NetBSD-1.2a 1.2A
396 .ds doc-operating-system-NetBSD-1.2b 1.2B
397 .ds doc-operating-system-NetBSD-1.2c 1.2C
398 .ds doc-operating-system-NetBSD-1.2d 1.2D
399 .ds doc-operating-system-NetBSD-1.2e 1.2E
400 .ds doc-operating-system-NetBSD-1.3  1.3
401 .ds doc-operating-system-NetBSD-1.3a 1.3A
402 .ds doc-operating-system-NetBSD-1.4  1.4
403 .ds doc-operating-system-NetBSD-1.5  1.5
404 .ds doc-operating-system-NetBSD-1.6  1.6
406 .ds doc-operating-system-FreeBSD-1.0     1.0
407 .ds doc-operating-system-FreeBSD-1.1     1.1
408 .ds doc-operating-system-FreeBSD-1.1.5   1.1.5
409 .ds doc-operating-system-FreeBSD-1.1.5.1 1.1.5.1
410 .ds doc-operating-system-FreeBSD-2.0     2.0
411 .ds doc-operating-system-FreeBSD-2.0.5   2.0.5
412 .ds doc-operating-system-FreeBSD-2.1     2.1
413 .ds doc-operating-system-FreeBSD-2.1.5   2.1.5
414 .ds doc-operating-system-FreeBSD-2.1.6   2.1.6
415 .ds doc-operating-system-FreeBSD-2.1.7   2.1.7
416 .ds doc-operating-system-FreeBSD-2.2     2.2
417 .ds doc-operating-system-FreeBSD-2.2.1   2.2.1
418 .ds doc-operating-system-FreeBSD-2.2.2   2.2.2
419 .ds doc-operating-system-FreeBSD-2.2.5   2.2.5
420 .ds doc-operating-system-FreeBSD-2.2.6   2.2.6
421 .ds doc-operating-system-FreeBSD-2.2.7   2.2.7
422 .ds doc-operating-system-FreeBSD-2.2.8   2.2.8
423 .ds doc-operating-system-FreeBSD-3.0     3.0
424 .ds doc-operating-system-FreeBSD-3.1     3.1
425 .ds doc-operating-system-FreeBSD-3.2     3.2
426 .ds doc-operating-system-FreeBSD-3.3     3.3
427 .ds doc-operating-system-FreeBSD-3.4     3.4
428 .ds doc-operating-system-FreeBSD-3.5     3.5
429 .ds doc-operating-system-FreeBSD-4.0     4.0
430 .ds doc-operating-system-FreeBSD-4.1     4.1
431 .ds doc-operating-system-FreeBSD-4.1.1   4.1.1
432 .ds doc-operating-system-FreeBSD-4.2     4.2
433 .ds doc-operating-system-FreeBSD-4.3     4.3
434 .ds doc-operating-system-FreeBSD-4.4     4.4
435 .ds doc-operating-system-FreeBSD-4.5     4.5
436 .ds doc-operating-system-FreeBSD-4.6     4.6
437 .ds doc-operating-system-FreeBSD-4.6.2   4.6.2
438 .ds doc-operating-system-FreeBSD-4.7     4.7
439 .ds doc-operating-system-FreeBSD-4.8     4.8
440 .ds doc-operating-system-FreeBSD-5.0     5.0
442 .de Os
443 .  ie "\$1"" \
444 .    ds doc-operating-system "\*[doc-default-operating-system]
445 .  el \{ .ie "\$1"ATT" \{\
446 .    ds doc-operating-system AT&T
447 .    if \A\a\$2\a \{\
448 .      ie d doc-operating-system-ATT-\$2 \
449 .        as doc-operating-system " \*[doc-operating-system-ATT-\$2]
450 .      el \
451 .        as doc-operating-system " UNIX
452 .  \}\}
453 .  el \{ .ie "\$1"BSD" \{\
454 .    if \A\a\$2\a \{\
455 .      ie d doc-operating-system-BSD-\$2 \
456 .        ds doc-operating-system "\*[doc-operating-system-BSD-\$2]
457 .      el \
458 .        tm mdoc warning: .Os: Unknown BSD version `\$2' (#\n[.c])
459 .  \}\}
460 .  el \{ .ie "\$1"FreeBSD" \{\
461 .    ds doc-operating-system FreeBSD
462 .    if \A\a\$2\a \{\
463 .      ie d doc-operating-system-FreeBSD-\$2 \
464 .        as doc-operating-system \~\*[doc-operating-system-FreeBSD-\$2]
465 .      el \
466 .        tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c])
467 .  \}\}
468 .  el \{ .ie "\$1"NetBSD" \{\
469 .    ds doc-operating-system NetBSD
470 .    if \A\a\$2\a \{\
471 .      ie d doc-operating-system-NetBSD-\$2 \
472 .        as doc-operating-system \~\*[doc-operating-system-NetBSD-\$2]
473 .      el \
474 .        tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c])
475 .  \}\}
476 .  el \{\
477 .    ds doc-operating-system \$1
478 .    if !"\$2"" \
479 .      as doc-operating-system " \$2
480 .  \}\}\}\}\}
484 .\" NS doc-date-string global string
485 .\" NS   the manual page date as set by `Dd'
487 .ds doc-date-string
490 .\" NS Dd user macro (not parsed, not callable)
491 .\" NS   set document date
492 .\" NS
493 .\" NS modifies:
494 .\" NS   doc-date-string
495 .\" NS
496 .\" NS local variables:
497 .\" NS   doc-date-XXX
498 .\" NS
499 .\" NS width register `Dd' set above
501 .ds doc-date-1  January
502 .ds doc-date-2  February
503 .ds doc-date-3  March
504 .ds doc-date-4  April
505 .ds doc-date-5  May
506 .ds doc-date-6  June
507 .ds doc-date-7  July
508 .ds doc-date-8  August
509 .ds doc-date-9  September
510 .ds doc-date-10 October
511 .ds doc-date-11 November
512 .ds doc-date-12 December
514 .de Dd
515 .  \" XXX: why do we need gX?
516 .  if "\*[doc-date-string]"" \
517 .    nr gX 1
519 .  ie \n[.$] \{\
520 .    ie (\n[.$] == 3) \
521 .      ds doc-date-string \$1\~\$2 \$3
522 .    el \{\
523 .      ds doc-date-string "\*[doc-date-\n[mo]]
524 .      as doc-date-string \~\n[dy], \n[year]
525 .    \}
526 .  \}
527 .  el \
528 .    ds doc-date-string Epoch
532 .\" NS doc-hyphen-flags global register
533 .\" NS   the parameter for the `.hy' request
534 .\" NS
535 .\" NS override this in `mdoc.local', if necessary.
537 .nr doc-hyphen-flags 12
540 .\" NS doc-header macro
541 .\" NS   print page header
542 .\" NS
543 .\" NS local variables:
544 .\" NS   doc-reg-dh
545 .\" NS   doc-reg-dh1
547 .de doc-header
548 .  ev doc-env-dh
549 .  doc-setup-page-layout
550 .  if !\n[cR] \
551 .    sp \n[doc-header-space]u
552 .  nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\f[]'
553 .  nr doc-reg-dh1 \w'\*[doc-caption-font2]\*[doc-volume]\f[]'
554 .  if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
555 .    while (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
556 .      substring doc-header-string 0 -2
557 .      nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\|.\|.\|.\f[]'
558 .    \}
559 .    as doc-header-string "\|.\|.\|.
560 .  \}
561 .  tl \a\*[doc-caption-font]\*[doc-header-string]\f[]\a\*[doc-caption-font2]\*[doc-volume]\f[]\a\*[doc-caption-font]\*[doc-header-string]\f[]\a
562 .  ie !\n[cR] \
563 .    sp \n[doc-header-space]u
564 .  el \
565 .    sp 1v
566 .  ev
567 .  ns
571 .\" NS doc-footer macro
572 .\" NS   print page footer
574 .de doc-footer
575 .  ie \n[cR] \
576 .    br
577 .  el \{\
578 .    ev doc-caption-enviroment
579 .    doc-setup-page-layout
580 .    sp \n[doc-footer-space]u
581 .    ie \n[D] \{\
582 .      ie o \
583 .        tl \a%\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a\*[doc-caption-font]\*[doc-operating-system]\f[]\a
584 .      el \
585 .        tl \a\*[doc-caption-font]\*[doc-operating-system]\f[]\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a%\a
586 .    \}
587 .    el \
588 .      tl \a\*[doc-caption-font]\*[doc-operating-system]\f[]\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a%\a
589 .    bp
590 .    ev
591 .  \}
595 .\" NS doc-check-depth macro
596 .\" NS   check paired macros
598 .de doc-check-depth
599 .  if \n[doc-list-depth] \{\
600 .    tm mdoc warning: A .Bl directive has no matching .El (#\n[.c])
601 .    nr doc-list-depth 0
602 .  \}
603 .  if \n[doc-display-depth] \{\
604 .    tm mdoc warning: A .Bd directive has no matching .Ed (#\n[.c])
605 .    nr doc-display-depth 0
606 .  \}
607 .  if \n[doc-fontmode-depth] \{\
608 .    tm mdoc warning: A .Bf directive has no matching .Ef (#\n[.c])
609 .    nr doc-fontmode-depth 0
610 .  \}
614 .\" NS doc-end-macro macro
615 .\" NS   finish output
617 .de doc-end-macro
618 .  \" We may still have a partial line in the environment.  If this is the
619 .  \" case, and we happen to be on the last line of the page, the `.fl'
620 .  \" request will cause the page to be ejected and troff will immediately
621 .  \" exit.  If we are in nroff mode, this would be unfortunate, since we
622 .  \" would never get a chance to output the footer.  So we fudge the page
623 .  \" length to make sure that the last page is never ejected until we want
624 .  \" it to be.
626 .  if \n[cR] \
627 .    pl +3v
628 .  fl
630 .  doc-check-depth
632 .  if \n[cR] \{\
633 .    sp
634 .    tl \a\*[doc-caption-font]\*[doc-operating-system]\f[]\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a\*[doc-caption-font]\*[doc-operating-system]\f[]\a
635 .    \" suppress empty lines after the footer
636 .    pl \n[nl]u
637 .  \}
641 .\" NS doc-paragraph macro
642 .\" NS   insert a paragraph
644 .de doc-paragraph
645 .  sp \n[doc-paragraph-space]u
646 .  if !\n[cR] \
647 .    ne 2
648 .  ns
652 .\" NS Pp user macro (not parsed, not callable)
653 .\" NS   new paragraph
654 .\" NS
655 .\" NS width register `Pp' set above
657 .als Pp doc-paragraph
660 .\" NS Lp user macro (not parsed, not callable)
661 .\" NS   same as .Pp
662 .\" NS
663 .\" NS width register `Lp' set above
665 .als Lp doc-paragraph
668 .de LP
669 .  tm Not a \-mdoc command: .LP (#\n[.c])
673 .de PP
674 .  tm Not a \-mdoc command: .PP (#\n[.c])
678 .de pp
679 .  tm Not a \-mdoc command: .pp (#\n[.c])
683 .de SH
684 .  tm Not a \-mdoc command: .SH (#\n[.c])
688 .\" NS Nd user macro (not parsed, not callable)
689 .\" NS   print name description
690 .\" NS
691 .\" NS width register `Nd' set above
693 .de Nd
694 .  nop \[em] \$*
698 .\" NS doc-in-synopsis-section global register (bool)
699 .\" NS   whether we are in the `synopsis' section
701 .nr doc-in-synopsis-section 0
704 .\" NS doc-in-library-section global register (bool)
705 .\" NS   whether we are in the `library' section
707 .nr doc-in-library-section 0
710 .\" NS doc-in-see-also-section global register (bool)
711 .\" NS   whether we are in the `see also' section
713 .nr doc-in-see-also-section 0
716 .\" NS doc-in-files-section global register (bool)
717 .\" NS   whether we are in the `files' section
719 .nr doc-in-files-section 0
722 .\" NS doc-in-authors-section global register (bool)
723 .\" NS   whether we are in the `authors' section
725 .nr doc-in-authors-section 0
728 .\" NS doc-first-parameter macro
729 .\" NS   return first parameter
730 .\" NS
731 .\" NS local variables:
732 .\" NS   doc-str-dfp
734 .de doc-first-parameter
735 .  ds doc-str-dfp "\$1
739 .\" NS Sh user macro (not callable)
740 .\" NS   section headers
741 .\" NS
742 .\" NS modifies:
743 .\" NS   doc-func-args-processed
744 .\" NS   doc-func-count
745 .\" NS   doc-in-authors-section
746 .\" NS   doc-in-files-section
747 .\" NS   doc-in-library-section
748 .\" NS   doc-in-see-also-section
749 .\" NS   doc-in-synopsis-section
750 .\" NS   doc-indent-synopsis
751 .\" NS   doc-indent-synopsis-active
752 .\" NS   doc-is-func
753 .\" NS   doc-num-func-args
754 .\" NS
755 .\" NS local variables:
756 .\" NS   doc-reg-Sh
757 .\" NS   doc-reg-Sh1
758 .\" NS   doc-section-XXX
759 .\" NS
760 .\" NS width register `Sh' set in doc-common
762 .ds doc-section-name        NAME
763 .ds doc-section-synopsis    SYNOPSIS
764 .ds doc-section-library     LIBRARY
765 .ds doc-section-description DESCRIPTION
766 .ds doc-section-see-also    SEE
767 .ds doc-section-files       FILES
768 .ds doc-section-authors     AUTHORS
770 .de Sh
771 .  ie \n[doc-arg-limit] \{\
772 .    \" we only allow `Sh' within `Sh'; it will change the font back to
773 .    \" `doc-Sh-font'
774 .    ie "\*[doc-macro-name]"Sh" \{\
775 .      nr doc-arg-ptr +1
776 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
777 .        nr doc-curr-font \n[.f]
778 .        nr doc-curr-size \n[.ps]
779 .        nop \*[doc-Sh-font]\c
780 .        doc-print-recursive
781 .      \}
782 .      el \{\
783 .        tm Usage: .Sh section_name ... (#\n[.c])
784 .        doc-reset-args
785 .    \}\}
786 .    el \{\
787 .      tm Usage: .Sh not callable by other macros (#\n[.c])
788 .      doc-reset-args
789 .  \}\}
790 .  el \{\
791 .    if !\n[.$] \{\
792 .      tm Usage: .Sh section_name ... (#\n[.c])
793 .      return
794 .    \}
796 .    ds doc-macro-name Sh
797 .    doc-parse-args \$@
799 .    if t \
800 .      ad
802 .    \" this resolves e.g. `.Sh "SEE ALSO"'
803 .    doc-first-parameter \$*
805 .    ie "\*[doc-str-dfp]"\*[doc-section-name]" \{\
806 .      doc-setup-header
807 .      in 0
808 .    \}
809 .    el \{\
810 .      nr doc-in-synopsis-section 0
811 .      nr doc-in-library-section 0
812 .      nr doc-in-see-also-section 0
813 .      nr doc-in-files-section 0
814 .      nr doc-in-authors-section 0
816 .      ie        "\*[doc-str-dfp]"\*[doc-section-synopsis]" \{\
817 .        if t \
818 .          na
819 .        nr doc-in-synopsis-section 1
820 .        nr doc-indent-synopsis 0
821 .        nr doc-indent-synopsis-active 0
822 .      \}
823 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-library]" \{\
824 .        nr doc-in-library-section 1
825 .      \}
826 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
827 .        nr doc-is-func 0
828 .        nr doc-func-count 0
829 .        nr doc-func-args-processed 0
830 .        nr doc-num-func-args 0
831 .      \}
832 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-see-also]" \{\
833 .        if t \
834 .          na
835 .        nr doc-in-see-also-section 1
836 .      \}
837 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-files]" \
838 .        nr doc-in-files-section 1
839 .      el .if    "\*[doc-str-dfp]"\*[doc-section-authors]" \
840 .        nr doc-in-authors-section 1
841 .      \}\}\}\}
843 .      in 0
844 .      nr doc-have-author 0
845 .    \}
847 .    doc-setup-page-layout
848 .    sp
849 .    ns
850 .    ta T .5i
851 .    if !\n[cR] \
852 .      ne 3
853 .    fi
855 .    if t \{\
856 .      nr doc-reg-Sh \n[.ss]
857 .      nr doc-reg-Sh1 \n[.sss]
858 .      ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3)
859 .    \}
861 .    nr doc-arg-ptr +1
862 .    nr doc-curr-font \n[.f]
863 .    nr doc-curr-size \n[.ps]
864 .    nop \*[doc-Sh-font]\c
865 .    doc-print-recursive
867 .    if t \
868 .      ss \n[doc-reg-Sh] \n[doc-reg-Sh1]
870 .    in +\n[doc-subheader-indent]u
871 .    ns
873 .    doc-check-depth
874 .  \}
878 .\" NS Ss user macro (not callable)
879 .\" NS   subsection
880 .\" NS
881 .\" NS local variable:
882 .\" NS   doc-reg-Ss
883 .\" NS   doc-reg-Ss1
884 .\" NS
885 .\" NS width register `Ss' set above
887 .de Ss
888 .  ie \n[doc-arg-limit] \{\
889 .    \" we only allow `Ss' within `Ss'; it will change the font back to
890 .    \" `doc-Sh-font'
891 .    ie "\*[doc-macro-name]"Ss" \{\
892 .      nr doc-arg-ptr +1
893 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
894 .        nr doc-curr-font \n[.f]
895 .        nr doc-curr-size \n[.ps]
896 .        nop \*[doc-Sh-font]\c
897 .        doc-print-recursive
898 .      \}
899 .      el \{\
900 .        tm Usage: .Ss subsection_name ... (#\n[.c])
901 .        doc-reset-args
902 .    \}\}
903 .    el \{\
904 .      tm Usage: .Ss not callable by other macros (#\n[.c])
905 .      doc-reset-args
906 .  \}\}
907 .  el \{\
908 .    if !\n[.$] \{\
909 .      tm Usage: .Ss subsection_name ... (#\n[.c])
910 .      return
911 .    \}
913 .    ds doc-macro-name Ss
914 .    doc-parse-args \$@
916 .    sp
917 .    if !\n[cR] \
918 .      ne 3
919 .    ti -.25i
921 .    nr doc-reg-Ss \n[.ss]
922 .    nr doc-reg-Ss1 \n[.sss]
923 .    ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4)
925 .    nr doc-arg-ptr +1
926 .    nr doc-curr-font \n[.f]
927 .    nr doc-curr-size \n[.ps]
928 .    nop \*[doc-Sh-font]\c
929 .    doc-print-recursive
931 .    ss \n[doc-reg-Ss] \n[doc-reg-Ss1]
933 .    ta T .5i
934 .    if !\n[cR] \
935 .      ne 2
936 .    br
937 .    ns
939 .    doc-check-depth
940 .  \}
944 .\" NS Rd macro (not parsed, not callable)
945 .\" NS   print global register dump to stderr
946 .\" NS
947 .\" NS local variables:
948 .\" NS   doc-reg-Rd
950 .de Rd
951 .  tm MDOC GLOBAL REGISTER DUMP
952 .  tm doc-macro-name == `\*[doc-macro-name]'
953 .  tm doc-arg-limit == \n[doc-arg-limit]
954 .  tm doc-num-args == \n[doc-num-args]
955 .  tm doc-arg-ptr == \n[doc-arg-ptr]
957 .  nr doc-reg-Rd 1
958 .  while (\n[doc-reg-Rd] <= \n[doc-arg-limit]) \{\
959 .    tm doc-arg\n[doc-reg-Rd] == `\*[doc-arg\n[doc-reg-Rd]]'
960 .    tm doc-type\n[doc-reg-Rd] == \n[doc-type\n[doc-reg-Rd]]
961 .    tm doc-space\n[doc-reg-Rd] == `\*[doc-space\n[doc-reg-Rd]]'
962 .    nr doc-reg-Rd +1
963 .  \}
965 .  tm doc-curr-font == \n[doc-curr-font]
966 .  tm doc-curr-size == \n[doc-curr-size]
967 .  tm doc-indent-synopsis == \n[doc-indent-synopsis]
968 .  tm doc-indent-synopsis-active == \n[doc-indent-synopsis-active]
969 .  tm doc-have-decl == \n[doc-have-decl]
970 .  tm doc-have-var == \n[doc-have-var]
971 .  tm doc-command-name == `\*[doc-command-name]'
972 .  tm doc-quote-left == `\*[doc-quote-left]'
973 .  tm doc-quote-right == `\*[doc-quote-right]'
974 .  tm doc-nesting-level == \n[doc-nesting-level]
975 .  tm doc-in-list == \n[doc-in-list]
976 .  tm doc-space == `\*[doc-space]'
977 .  tm doc-saved-space == `\*[doc-saved-space]'
978 .  tm doc-space-mode == \n[doc-space-mode]
979 .  tm doc-have-space == \n[doc-have-space]
980 .  tm doc-have-slot == \n[doc-have-slot]
981 .  tm doc-keep-type == \n[doc-keep-type]
982 .  tm doc-display-depth == \n[doc-display-depth]
983 .  tm doc-is-compact == \n[doc-is-compact]
985 .  nr doc-reg-Rd 0
986 .  while (\n[doc-reg-Rd] <= \n[doc-display-depth]) \{\
987 .    tm doc-display-type-stack\n[doc-reg-Rd] == `\*[doc-display-type-stack\n[doc-reg-Rd]]'
988 .    tm doc-display-indent-stack\n[doc-reg-Rd] == \n[doc-display-indent-stack\n[doc-reg-Rd]]
989 .    tm doc-display-ad-stack\n[doc-reg-Rd] == \n[doc-display-ad-stack\n[doc-reg-Rd]]
990 .    tm doc-display-fi-stack\n[doc-reg-Rd] == \n[doc-display-fi-stack\n[doc-reg-Rd]]
991 .    tm doc-display-ft-stack\n[doc-reg-Rd] == \n[doc-display-ft-stack\n[doc-reg-Rd]]
992 .    tm doc-display-ps-stack\n[doc-reg-Rd] == \n[doc-display-ps-stack\n[doc-reg-Rd]]
993 .    nr doc-reg-Rd +1
994 .  \}
996 .  tm doc-fontmode-depth == \n[doc-fontmode-depth]
998 .  nr doc-reg-Rd 1
999 .  while (\n[doc-reg-Rd] <= \n[doc-fontmode-depth]) \{\
1000 .    tm doc-fontmode-font-stack\n[doc-reg-Rd] == `\n[doc-fontmode-font-stack\n[doc-reg-Rd]]'
1001 .    tm doc-fontmode-size-stack\n[doc-reg-Rd] == `\n[doc-fontmode-size-stack\n[doc-reg-Rd]]'
1002 .    nr doc-reg-Rd +1
1003 .  \}
1005 .  tm doc-list-depth == \n[doc-list-depth]
1007 .  nr doc-reg-Rd 1
1008 .  while (\n[doc-reg-Rd] <= \n[doc-list-depth]) \{\
1009 .    tm doc-list-type-stack\n[doc-reg-Rd] == `\*[doc-list-type-stack\n[doc-reg-Rd]]'
1010 .    tm doc-list-have-indent-stack\n[doc-reg-Rd] == \n[doc-list-have-indent-stack\n[doc-reg-Rd]]
1011 .    tm doc-list-indent-stack\n[doc-reg-Rd] == \n[doc-list-indent-stack\n[doc-reg-Rd]]
1012 .    tm doc-compact-list-stack\n[doc-reg-Rd] == \n[doc-compact-list-stack\n[doc-reg-Rd]]
1013 .    tm doc-tag-prefix-stack\n[doc-reg-Rd] == `\*[doc-tag-prefix-stack\n[doc-reg-Rd]]'
1014 .    tm doc-tag-width-stack\n[doc-reg-Rd] == `\*[doc-tag-width-stack\n[doc-reg-Rd]]'
1015 .    tm doc-list-offset-stack\n[doc-reg-Rd] == \n[doc-list-offset-stack\n[doc-reg-Rd]]
1016 .    tm doc-enum-list-count-stack\n[doc-reg-Rd] == \n[doc-enum-list-count-stack\n[doc-reg-Rd]]
1017 .    nr doc-reg-Rd +1
1018 .  \}
1020 .  tm doc-saved-Pa-font == `\*[doc-saved-Pa-font]'
1021 .  tm doc-curr-type == \n[doc-curr-type]
1022 .  tm doc-curr-arg == `\*[doc-curr-arg]'
1023 .  tm doc-diag-list-input-line-count == \n[doc-diag-list-input-line-count]
1024 .  tm doc-num-columns == \n[doc-num-columns]
1025 .  tm doc-column-indent-width == \n[doc-column-indent-width]
1026 .  tm doc-is-func == \n[doc-is-func]
1027 .  tm doc-have-old-func == \n[doc-have-old-func]
1028 .  tm doc-func-arg-count == \n[doc-func-arg-count]
1029 .  tm doc-func-arg == `\*[doc-func-arg]'
1030 .  tm doc-num-func-args == \n[doc-num-func-args]
1031 .  tm doc-func-args-processed == \n[doc-func-args-processed]
1032 .  tm doc-have-func == \n[doc-have-func]
1033 .  tm doc-is-reference == \n[doc-is-reference]
1034 .  tm doc-reference-count == \n[doc-reference-count]
1035 .  tm doc-author-count == \n[doc-author-count]
1037 .  nr doc-reg-Rd 0
1038 .  while (\n[doc-reg-Rd] <= \n[doc-author-count]) \{\
1039 .    tm doc-author-name\n[doc-reg-Rd] == `\*[doc-author-name\n[doc-reg-Rd]]'
1040 .    nr doc-reg-Rd +1
1041 .  \}
1043 .  tm doc-book-count == \n[doc-book-count]
1044 .  tm doc-book-name == `\*[doc-book-name]'
1045 .  tm doc-date-count == \n[doc-date-count]
1046 .  tm doc-date == `\*[doc-date]'
1047 .  tm doc-publisher-count == \n[doc-publisher-count]
1048 .  tm doc-publisher-name == `\*[doc-publisher-name]'
1049 .  tm doc-journal-count == \n[doc-journal-count]
1050 .  tm doc-journal-name == `\*[doc-journal-name]'
1051 .  tm doc-issue-count == \n[doc-issue-count]
1052 .  tm doc-issue-name == `\*[doc-issue-name]'
1053 .  tm doc-optional-count == \n[doc-optional-count]
1054 .  tm doc-optional-string == `\*[doc-optional-string]'
1055 .  tm doc-page-number-count == \n[doc-page-number-count]
1056 .  tm doc-page-number-string == `\*[doc-page-number-string]'
1057 .  tm doc-corporate-count == \n[doc-corporate-count]
1058 .  tm doc-corporate-name == `\*[doc-corporate-name]'
1059 .  tm doc-report-count == \n[doc-report-count]
1060 .  tm doc-report-name == `\*[doc-report-name]'
1061 .  tm doc-reference-title-count == \n[doc-reference-title-count]
1062 .  tm doc-reference-title-name == `\*[doc-reference-title-name]'
1063 .  tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]'
1064 .  tm doc-volume-count == \n[doc-volume-count]
1065 .  tm doc-volume-name == `\*[doc-volume-name]'
1066 .  tm doc-have-author == \n[doc-have-author]
1068 .  tm doc-document-title == `\*[doc-document-title]'
1069 .  tm doc-volume == `\*[doc-volume]'
1070 .  tm doc-section == `\*[doc-section]'
1071 .  tm doc-operating-system == `\*[doc-operating-system]'
1072 .  tm doc-date-string == `\*[doc-date-string]'
1073 .  tm doc-header-space == \n[doc-header-space]
1074 .  tm doc-footer-space == \n[doc-footer-space]
1075 .  tm doc-display-vertical == \n[doc-display-vertical]
1076 .  tm doc-header-string == `\*[doc-header-string]'
1077 .  tm doc-in-synopsis-section == \n[doc-in-synopsis-section]
1078 .  tm doc-in-library-section == \n[doc-in-library-section]
1079 .  tm doc-in-see-also-section == \n[doc-in-see-also-section]
1080 .  tm doc-in-files-section == \n[doc-in-files-section]
1081 .  tm doc-in-authors-section == \n[doc-in-authors-section]
1083 .  tm END OF GLOBAL REGISTER DUMP
1089 .\" EOF