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