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