* tmac/doc.common: Initialize %I register for the %I macro to
[s-roff.git] / tmac / doc-common
blob3c588400bd5303b89d50cb23e40d7aade2f3707a
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 .\" requests 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 .ds doc-volume-ds-1 General Commands Manual
235 .ds doc-volume-ds-2 System Calls Manual
236 .ds doc-volume-ds-3 Library Functions Manual
237 .ds doc-volume-ds-4 Kernel Interfaces Manual
238 .ds doc-volume-ds-5 File Formats Manual
239 .ds doc-volume-ds-6 Games Manual
240 .ds doc-volume-ds-7 Miscellaneous Information Manual
241 .ds doc-volume-ds-8 System Manager's Manual
242 .ds doc-volume-ds-9 Kernel Developer's Manual
244 .ds doc-volume-ds-USD   User's Supplementary Documents
245 .ds doc-volume-ds-PS1   Programmer's Supplementary Documents
246 .ds doc-volume-ds-AMD   Ancestral Manual Documents
247 .ds doc-volume-ds-SMM   System Manager's Manual
248 .ds doc-volume-ds-URM   User's Reference Manual
249 .ds doc-volume-ds-PRM   Programmer's Manual
250 .ds doc-volume-ds-KM    Kernel Manual
251 .ds doc-volume-ds-IND   Manual Master Index
252 .ds doc-volume-ds-LOCAL Local Manual
253 .ds doc-volume-ds-CON   Contributed Software Manual
255 .als doc-volume-ds-MMI doc-volume-ds-IND
256 .als doc-volume-ds-LOC doc-volume-ds-LOCAL
258 .ds doc-volume-as-alpha    Alpha
259 .als doc-volume-as-Alpha doc-volume-as-alpha
260 .ds doc-volume-as-amiga    Amiga
261 .ds doc-volume-as-arc      Arc
262 .ds doc-volume-as-arm26    ARM26
263 .ds doc-volume-as-arm32    ARM32
264 .ds doc-volume-as-atari    Atari
265 .ds doc-volume-as-bebox    BEbox
266 .ds doc-volume-as-cobalt   Cobalt
267 .ds doc-volume-as-evbsh3   Evbsh3
268 .ds doc-volume-as-hp300    HP300
269 .ds doc-volume-as-hpcmips  HPcmips
270 .ds doc-volume-as-i386     i386
271 .ds doc-volume-as-luna68k  luna68k
272 .ds doc-volume-as-m68k     m68k
273 .ds doc-volume-as-mac68k   mac68k
274 .ds doc-volume-as-macppc   macppc
275 .ds doc-volume-as-mips     MIPS
276 .ds doc-volume-as-mmeye    mmeye
277 .ds doc-volume-as-mvme68k  mvme68k
278 .ds doc-volume-as-news68k  news68k
279 .ds doc-volume-as-newsmips newsmips
280 .ds doc-volume-as-next68k  next68k
281 .ds doc-volume-as-ofppc    ofppc
282 .ds doc-volume-as-pc532    pc532
283 .ds doc-volume-as-pmax     pmax
284 .ds doc-volume-as-powerpc  powerpc
285 .ds doc-volume-as-prep     prep
286 .ds doc-volume-as-sgimips  sgimips
287 .ds doc-volume-as-sh3      sh3
288 .ds doc-volume-as-sparc    SPARC
289 .ds doc-volume-as-sparc64  sparc64
290 .ds doc-volume-as-sun3     sun3
291 .ds doc-volume-as-tahoe    Tahoe
292 .ds doc-volume-as-vax      VAX
293 .ds doc-volume-as-x68k     x68k
295 .de Dt
296 .  \" reset default arguments
297 .  ds doc-document-title UNTITLED
298 .  ds doc-volume LOCAL
299 .  ds doc-section Null
301 .  if !"\$1"" \
302 .    ds doc-document-title "\$1
304 .  if !"\$2"" \{\
305 .    ds doc-section \$2
306 .    ie \B\a\$2\a \{\
307 .      if ((\$2 >= 1) & (\$2 <= 9)) \{\
308 .        ds doc-volume "\*[doc-volume-operating-system]
309 .        if \A\a\$3\a \{\
310 .          if d doc-volume-as-\$3 \
311 .            as doc-volume "/\*[doc-volume-as-\$3]
312 .        \}
313 .        as doc-volume " \*[doc-volume-ds-\$2]
314 .    \}\}
315 .    el \{\
316 .      ie "\$2"unass" .ds doc-volume DRAFT
317 .      el \{ .ie "\$2"draft" .ds doc-volume DRAFT
318 .      el \{ .ie "\$2"paper" .ds doc-volume UNTITLED
319 .      el \
320 .        tm mdoc warning: .Dt: unknown section `\$2' (#\n[.c])
321 .      \}\}
322 .      if \A\a\$3\a \{\
323 .        if d doc-volume-ds-\$3 \
324 .          ds doc-volume "\*[doc-volume-ds-\$3]
325 .  \}\}\}
327 .  if !"\$3"" \
328 .    if "\*[doc-volume]"LOCAL" \
329 .      ds doc-volume \$3
333 .\" NS doc-operating-system global string
334 .\" NS   the exact version of the operating system
335 .\" NS
336 .\" NS override this in `mdoc.local', if necessary
338 .ds doc-operating-system BSD
341 .\" NS Os user macro (not parsed, not callable)
342 .\" NS   operating system
343 .\" NS
344 .\" NS modifies:
345 .\" NS   doc-operating-system
346 .\" NS
347 .\" NS local variables:
348 .\" NS   doc-operating-system-XXX-XXX
349 .\" NS
350 .\" NS width register `Os' set above
352 .ds doc-operating-system-ATT-7   7th\~Edition
353 .als doc-operating-system-ATT-7th doc-operating-system-ATT-7
354 .ds doc-operating-system-ATT-3   System\~III
355 .als doc-operating-system-ATT-III doc-operating-system-ATT-3
356 .ds doc-operating-system-ATT-V   System\~V
357 .ds doc-operating-system-ATT-V.2 System\~V Release\~2
358 .ds doc-operating-system-ATT-V.3 System\~V Release\~3
359 .ds doc-operating-system-ATT-V.4 System\~V Release\~4
361 .ds doc-operating-system-BSD-3    3rd\~Berkeley Distribution
362 .ds doc-operating-system-BSD-4    4th\~Berkeley Distribution
363 .ds doc-operating-system-BSD-4.1  4.1\~Berkeley Distribution
364 .ds doc-operating-system-BSD-4.2  4.2\~Berkeley Distribution
365 .ds doc-operating-system-BSD-4.3  4.3\~Berkeley Distribution
366 .ds doc-operating-system-BSD-4.3T 4.3-Tahoe Berkeley Distribution
367 .ds doc-operating-system-BSD-4.3R 4.3-Reno Berkeley Distribution
368 .als doc-operating-system-BSD-4.3t doc-operating-system-BSD-4.3T
369 .als doc-operating-system-BSD-4.3r doc-operating-system-BSD-4.3R
370 .ds doc-operating-system-BSD-4.4  4.4BSD
372 .ds doc-operating-system-NetBSD-0.8  0.8
373 .ds doc-operating-system-NetBSD-0.8a 0.8A
374 .ds doc-operating-system-NetBSD-0.9  0.9
375 .ds doc-operating-system-NetBSD-0.9a 0.9A
376 .ds doc-operating-system-NetBSD-1.0  1.0
377 .ds doc-operating-system-NetBSD-1.0a 1.0A
378 .ds doc-operating-system-NetBSD-1.1  1.1
379 .ds doc-operating-system-NetBSD-1.2  1.2
380 .ds doc-operating-system-NetBSD-1.2a 1.2A
381 .ds doc-operating-system-NetBSD-1.2b 1.2B
382 .ds doc-operating-system-NetBSD-1.2c 1.2C
383 .ds doc-operating-system-NetBSD-1.2d 1.2D
384 .ds doc-operating-system-NetBSD-1.2e 1.2E
385 .ds doc-operating-system-NetBSD-1.3  1.3
386 .ds doc-operating-system-NetBSD-1.3a 1.3A
387 .ds doc-operating-system-NetBSD-1.4  1.4
388 .ds doc-operating-system-NetBSD-1.5  1.5
389 .ds doc-operating-system-NetBSD-1.6  1.6
391 .ds doc-operating-system-FreeBSD-1.0     1.0
392 .ds doc-operating-system-FreeBSD-1.1     1.1
393 .ds doc-operating-system-FreeBSD-1.1.5   1.1.5
394 .ds doc-operating-system-FreeBSD-1.1.5.1 1.1.5.1
395 .ds doc-operating-system-FreeBSD-2.0     2.0
396 .ds doc-operating-system-FreeBSD-2.0.5   2.0.5
397 .ds doc-operating-system-FreeBSD-2.1     2.1
398 .ds doc-operating-system-FreeBSD-2.1.5   2.1.5
399 .ds doc-operating-system-FreeBSD-2.1.6   2.1.6
400 .ds doc-operating-system-FreeBSD-2.1.7   2.1.7
401 .ds doc-operating-system-FreeBSD-2.2     2.2
402 .ds doc-operating-system-FreeBSD-2.2.1   2.2.1
403 .ds doc-operating-system-FreeBSD-2.2.2   2.2.2
404 .ds doc-operating-system-FreeBSD-2.2.5   2.2.5
405 .ds doc-operating-system-FreeBSD-2.2.6   2.2.6
406 .ds doc-operating-system-FreeBSD-2.2.7   2.2.7
407 .ds doc-operating-system-FreeBSD-2.2.8   2.2.8
408 .ds doc-operating-system-FreeBSD-3.0     3.0
409 .ds doc-operating-system-FreeBSD-3.1     3.1
410 .ds doc-operating-system-FreeBSD-3.2     3.2
411 .ds doc-operating-system-FreeBSD-3.3     3.3
412 .ds doc-operating-system-FreeBSD-3.4     3.4
413 .ds doc-operating-system-FreeBSD-3.5     3.5
414 .ds doc-operating-system-FreeBSD-4.0     4.0
415 .ds doc-operating-system-FreeBSD-4.1     4.1
416 .ds doc-operating-system-FreeBSD-4.1.1   4.1.1
417 .ds doc-operating-system-FreeBSD-4.2     4.2
418 .ds doc-operating-system-FreeBSD-4.3     4.3
419 .ds doc-operating-system-FreeBSD-4.4     4.4
420 .ds doc-operating-system-FreeBSD-4.5     4.5
421 .ds doc-operating-system-FreeBSD-5.0     5.0
423 .de Os
424 .  if "\$1"" \
425 .    return
427 .  ie        "\$1"ATT" \{\
428 .    ds doc-operating-system AT&T
429 .    if \A\a\$2\a \{\
430 .      ie d doc-operating-system-ATT-\$2 \
431 .        as doc-operating-system " \*[doc-operating-system-ATT-\$2]
432 .      el \
433 .        as doc-operating-system " UNIX
434 .  \}\}
435 .  el \{ .ie "\$1"BSD" \{\
436 .    if \A\a\$2\a \{\
437 .      ie d doc-operating-system-BSD-\$2 \
438 .        ds doc-operating-system "\*[doc-operating-system-BSD-\$2]
439 .      el \
440 .        tm mdoc warning: .Os: Unknown BSD version `\$2' (#\n[.c])
441 .  \}\}
442 .  el \{ .ie "\$1"FreeBSD" \{\
443 .    ds doc-operating-system FreeBSD
444 .    if \A\a\$2\a \{\
445 .      ie d doc-operating-system-FreeBSD-\$2 \
446 .        as doc-operating-system \~\*[doc-operating-system-FreeBSD-\$2]
447 .      el \
448 .        tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c])
449 .  \}\}
450 .  el \{ .ie "\$1"NetBSD" \{\
451 .    ds doc-operating-system NetBSD
452 .    if \A\a\$2\a \{\
453 .      ie d doc-operating-system-NetBSD-\$2 \
454 .        as doc-operating-system \~\*[doc-operating-system-NetBSD-\$2]
455 .      el \
456 .        tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c])
457 .  \}\}
458 .  el \{\
459 .    ds doc-operating-system \$1
460 .    if !"\$2"" \
461 .      as doc-operating-system " \$2
462 .  \}\}\}\}
466 .\" NS doc-date-string global string
467 .\" NS   the manual page date as set by `Dd'
469 .ds doc-date-string
472 .\" NS Dd user macro (not parsed, not callable)
473 .\" NS   set document date
474 .\" NS
475 .\" NS modifies:
476 .\" NS   doc-date-string
477 .\" NS
478 .\" NS local variables:
479 .\" NS   doc-date-XXX
480 .\" NS
481 .\" NS width register `Dd' set above
483 .ds doc-date-1  January
484 .ds doc-date-2  February
485 .ds doc-date-3  March
486 .ds doc-date-4  April
487 .ds doc-date-5  May
488 .ds doc-date-6  June
489 .ds doc-date-7  July
490 .ds doc-date-8  August
491 .ds doc-date-9  September
492 .ds doc-date-10 October
493 .ds doc-date-11 November
494 .ds doc-date-12 December
496 .de Dd
497 .  \" XXX: why do we need gX?
498 .  if "\*[doc-date-string]"" \
499 .    nr gX 1
501 .  ie \n[.$] \{\
502 .    ie (\n[.$] == 3) \
503 .      ds doc-date-string \$1\~\$2 \$3
504 .    el \{\
505 .      ds doc-date-string "\*[doc-date-\n[mo]]
506 .      as doc-date-string \~\n[dy], \n[year]
507 .    \}
508 .  \}
509 .  el \
510 .    ds doc-date-string Epoch
514 .\" NS doc-hyphen-flags global register
515 .\" NS   the parameter for the `.hy' request
516 .\" NS
517 .\" NS override this in `mdoc.local', if necessary.
519 .nr doc-hyphen-flags 12
522 .\" NS doc-header macro
523 .\" NS   print page header
524 .\" NS
525 .\" NS local variables:
526 .\" NS   doc-reg-dh
527 .\" NS   doc-reg-dh1
529 .de doc-header
530 .  ev doc-env-dh
531 .  doc-setup-page-layout
532 .  if !\n[cR] \
533 '    sp \n[doc-header-space]u
534 .  nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\f[P]'
535 .  nr doc-reg-dh1 \w'\*[doc-caption-font2]\*[doc-volume]\f[P]'
536 .  if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
537 .    while (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
538 .      substring doc-header-string 1 -1
539 .      nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\|.\|.\|.\f[P]'
540 .    \}
541 .    as doc-header-string "\|.\|.\|.
542 .  \}
543 .  tl \a\*[doc-caption-font]\*[doc-header-string]\f[P]\a\*[doc-caption-font2]\*[doc-volume]\f[P]\a\*[doc-caption-font]\*[doc-header-string]\f[P]\a
544 '  sp \n[doc-header-space]u
545 .  ev
549 .\" NS doc-footer macro
550 .\" NS   print page footer
552 .de doc-footer
553 .  ie \n[cR] \
554 '    br
555 .  el \{\
556 .    ev doc-caption-enviroment
557 .    doc-setup-page-layout
558 '    sp \n[doc-footer-space]u
559 .    ie \n[D] \{\
560 .      ie o \
561 .        tl \a%\a\*[doc-caption-font2]\*[doc-date-string]\f[P]\a\*[doc-caption-font]\*[doc-operating-system]\f[P]\a
562 .      el \
563 .        tl \a\*[doc-caption-font]\*[doc-operating-system]\f[P]\a\*[doc-caption-font2]\*[doc-date-string]\f[P]\a%\a
564 .    \}
565 .    el \
566 .      tl \a\*[doc-caption-font]\*[doc-operating-system]\f[P]\a\*[doc-caption-font2]\*[doc-date-string]\f[P]\a%\a
567 '    bp
568 .    ev
569 .  \}
573 .\" NS doc-end-macro macro
574 .\" NS   finish output
576 .de doc-end-macro
577 .  \" We may still have a partial line in the environment.  If this is the
578 .  \" case, and we happen to be on the last line of the page, the `.fl'
579 .  \" request will cause the page to be ejected and troff will immediately
580 .  \" exit.  If we are in nroff mode, this would be unfortunate, since we
581 .  \" would never get a chance to output the footer.  So we fudge the page
582 .  \" length to make sure that the last page is never ejected until we want
583 .  \" it to be.
585 .  if \n[cR] \
586 .    pl +3v
587 .  fl
589 .  if \n[doc-list-depth] \
590 .    tm mdoc warning: list open at EOF!  A .Bl directive has no matching .El
592 .  if \n[cR] \{\
593 '    sp
594 .    tl \a\*[doc-caption-font]\*[doc-operating-system]\f[P]\a\*[doc-caption-font2]\*[doc-date-string]\f[P]\a\*[doc-caption-font]\*[doc-operating-system]\f[P]\a
595 .    \" suppress empty lines after the footer
596 .    pl \n[nl]u
597 .  \}
601 .\" NS doc-paragraph macro
602 .\" NS   insert a paragraph
604 .de doc-paragraph
605 .  sp \n[doc-paragraph-space]u
606 .  if !\n[cR] \
607 .    ne 2
608 .  ns
612 .\" NS Pp user macro (not parsed, not callable)
613 .\" NS   new paragraph
614 .\" NS
615 .\" NS width register `Pp' set above
617 .als Pp doc-paragraph
620 .\" NS Lp user macro (not parsed, not callable)
621 .\" NS   same as .Pp
622 .\" NS
623 .\" NS width register `Lp' set above
625 .als Lp doc-paragraph
628 .de LP
629 .  tm Not a \-mdoc command: .LP (#\n[.c])
633 .de PP
634 .  tm Not a \-mdoc command: .PP (#\n[.c])
638 .de pp
639 .  tm Not a \-mdoc command: .pp (#\n[.c])
643 .de SH
644 .  tm Not a \-mdoc command: .SH (#\n[.c])
648 .\" NS Nd user macro (not parsed, not callable)
649 .\" NS   print name description
650 .\" NS
651 .\" NS width register `Nd' set above
653 .de Nd
654 .  nop \- \$*
658 .\" NS doc-in-synopsis-section global register (bool)
659 .\" NS   whether we are in the `synopsis' section
661 .nr doc-in-synopsis-section 0
664 .\" NS doc-in-see-also-section global register (bool)
665 .\" NS   whether we are in the `see also' section
667 .nr doc-in-see-also-section 0
670 .\" NS doc-in-files-section global register (bool)
671 .\" NS   whether we are in the `files' section
673 .nr doc-in-files-section 0
676 .\" NS doc-in-authors-section global register (bool)
677 .\" NS   whether we are in the `authors' section
679 .nr doc-in-authors-section 0
682 .\" NS doc-first-parameter macro
683 .\" NS   return first parameter
684 .\" NS
685 .\" NS local variables:
686 .\" NS   doc-str-dfp
688 .de doc-first-parameter
689 .  ds doc-str-dfp "\$1
693 .\" NS Sh user macro (not callable)
694 .\" NS   section headers
695 .\" NS
696 .\" NS modifies:
697 .\" NS   doc-func-args-processed
698 .\" NS   doc-func-count
699 .\" NS   doc-in-authors-section
700 .\" NS   doc-in-files-section
701 .\" NS   doc-in-see-also-section
702 .\" NS   doc-in-synopsis-section
703 .\" NS   doc-indent-synopsis
704 .\" NS   doc-indent-synopsis-active
705 .\" NS   doc-is-func
706 .\" NS   doc-num-func-args
707 .\" NS
708 .\" NS local variables:
709 .\" NS   doc-reg-Sh
710 .\" NS   doc-reg-Sh1
711 .\" NS   doc-section-XXX
712 .\" NS
713 .\" NS width register `Sh' set in doc-common
715 .ds doc-section-name        NAME
716 .ds doc-section-synopsis    SYNOPSIS
717 .ds doc-section-description DESCRIPTION
718 .ds doc-section-see-also    SEE
719 .ds doc-section-files       FILES
720 .ds doc-section-authors     AUTHORS
722 .de Sh
723 .  ie \n[doc-arg-limit] \{\
724 .    \" we only allow `Sh' within `Sh'; it will change the font back to
725 .    \" `doc-Sh-font'
726 .    ie "\*[doc-macro-name]"Sh" \{\
727 .      nr doc-arg-ptr +1
728 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
729 .        nr doc-curr-font \n[.f]
730 .        nr doc-curr-size \n[.ps]
731 .        nop \*[doc-Sh-font]\c
732 .        doc-print-recursive
733 .      \}
734 .      el \{\
735 .        tm Usage: .Sh section_name ... (#\n[.c])
736 .        doc-reset-args
737 .    \}\}
738 .    el \{\
739 .      tm Usage: .Sh not callable by other macros (#\n[.c])
740 .      doc-reset-args
741 .  \}\}
742 .  el \{\
743 .    if !\n[.$] \{\
744 .      tm Usage: .Sh section_name ... (#\n[.c])
745 .      return
746 .    \}
748 .    ds doc-macro-name Sh
749 .    doc-parse-args \$@
751 .    if t \
752 '      ad
754 .    \" this resolves e.g. `.Sh "SEE ALSO"'
755 .    doc-first-parameter \$*
757 .    ie "\*[doc-str-dfp]"\*[doc-section-name]" \{\
758 .      doc-setup-header
759 '      in 0
760 .    \}
761 .    el \{\
762 .      nr doc-in-synopsis-section 0
763 .      nr doc-in-see-also-section 0
764 .      nr doc-in-files-section 0
765 .      nr doc-in-authors-section 0
767 .      ie        "\*[doc-str-dfp]"\*[doc-section-synopsis]" \{\
768 .        if t \
769 .          na
770 .        nr doc-in-synopsis-section 1
771 .        nr doc-indent-synopsis 0
772 .        nr doc-indent-synopsis-active 0
773 .      \}
774 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
775 .        nr doc-is-func 0
776 .        nr doc-func-count 0
777 .        nr doc-func-args-processed 0
778 .        nr doc-num-func-args 0
779 .      \}
780 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-see-also]" \{\
781 .        if t \
782 .          na
783 .        nr doc-in-see-also-section 1
784 .      \}
785 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-files]" \
786 .        nr doc-in-files-section 1
787 .      el .if    "\*[doc-str-dfp]"\*[doc-section-authors]" \
788 .        nr doc-in-authors-section 1
789 .      \}\}\}
791 .      in 0
792 .      nr doc-have-author 0
793 .    \}
795 .    doc-setup-page-layout
796 '    sp
797 .    ns
798 .    ta T .5i
799 .    if !\n[cR] \
800 .      ne 3
801 '    fi
803 .    if t \{\
804 .      nr doc-reg-Sh \n[.ss]
805 .      nr doc-reg-Sh1 \n[.sss]
806 .      ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3)
807 .    \}
809 .    nr doc-arg-ptr +1
810 .    nr doc-curr-font \n[.f]
811 .    nr doc-curr-size \n[.ps]
812 .    nop \*[doc-Sh-font]\c
813 .    doc-print-recursive
815 .    if t \
816 .      ss \n[doc-reg-Sh] \n[doc-reg-Sh1]
818 .    in +\n[doc-subheader-indent]u
819 .    ns
820 .  \}
824 .\" NS Ss user macro (not callable)
825 .\" NS   subsection
826 .\" NS
827 .\" NS local variable:
828 .\" NS   doc-reg-Ss
829 .\" NS   doc-reg-Ss1
830 .\" NS
831 .\" NS width register `Ss' set above
833 .de Ss
834 .  ie \n[doc-arg-limit] \{\
835 .    \" we only allow `Ss' within `Ss'; it will change the font back to
836 .    \" `doc-Sh-font'
837 .    ie "\*[doc-macro-name]"Ss" \{\
838 .      nr doc-arg-ptr +1
839 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
840 .        nr doc-curr-font \n[.f]
841 .        nr doc-curr-size \n[.ps]
842 .        nop \*[doc-Sh-font]\c
843 .        doc-print-recursive
844 .      \}
845 .      el \{\
846 .        tm Usage: .Ss subsection_name ... (#\n[.c])
847 .        doc-reset-args
848 .    \}\}
849 .    el \{\
850 .      tm Usage: .Ss not callable by other macros (#\n[.c])
851 .      doc-reset-args
852 .  \}\}
853 .  el \{\
854 .    if !\n[.$] \{\
855 .      tm Usage: .Ss subsection_name ... (#\n[.c])
856 .      return
857 .    \}
859 .    ds doc-macro-name Ss
860 .    doc-parse-args \$@
862 .    sp
863 .    if !\n[cR] \
864 .      ne 3
865 .    ti -.25i
867 .    nr doc-reg-Ss \n[.ss]
868 .    nr doc-reg-Ss1 \n[.sss]
869 .    ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4)
871 .    nr doc-arg-ptr +1
872 .    nr doc-curr-font \n[.f]
873 .    nr doc-curr-size \n[.ps]
874 .    nop \*[doc-Sh-font]\c
875 .    doc-print-recursive
877 .    ss \n[doc-reg-Ss] \n[doc-reg-Ss1]
879 .    ta T .5i
880 .    if !\n[cR] \
881 .      ne 2
882 .    br
883 .  \}
887 .\" NS Rd macro (not parsed, not callable)
888 .\" NS   print global register dump to stderr
889 .\" NS
890 .\" NS local variables:
891 .\" NS   doc-reg-Rd
893 .de Rd
894 .  tm MDOC GLOBAL REGISTER DUMP
895 .  tm doc-macro-name == `\*[doc-macro-name]'
896 .  tm doc-arg-limit == \n[doc-arg-limit]
897 .  tm doc-num-args == \n[doc-num-args]
898 .  tm doc-arg-ptr == \n[doc-arg-ptr]
900 .  nr doc-reg-Rd 1
901 .  while (\n[doc-reg-Rd] <= \n[doc-arg-limit]) \{\
902 .    tm doc-arg\n[doc-reg-Rd] == `\*[doc-arg\n[doc-reg-Rd]]'
903 .    tm doc-type\n[doc-reg-Rd] == \n[doc-type\n[doc-reg-Rd]]
904 .    tm doc-space\n[doc-reg-Rd] == `\*[doc-space\n[doc-reg-Rd]]'
905 .    nr doc-reg-Rd +1
906 .  \}
908 .  tm doc-curr-font == \n[doc-curr-font]
909 .  tm doc-curr-size == \n[doc-curr-size]
910 .  tm doc-indent-synopsis == \n[doc-indent-synopsis]
911 .  tm doc-indent-synopsis-active == \n[doc-indent-synopsis-active]
912 .  tm doc-have-decl == \n[doc-have-decl]
913 .  tm doc-have-var == \n[doc-have-var]
914 .  tm doc-command-name == `\*[doc-command-name]'
915 .  tm doc-quote-left == `\*[doc-quote-left]'
916 .  tm doc-quote-right == `\*[doc-quote-right]'
917 .  tm doc-nesting-level == \n[doc-nesting-level]
918 .  tm doc-in-list == \n[doc-in-list]
919 .  tm doc-space == `\*[doc-space]'
920 .  tm doc-saved-space == `\*[doc-saved-space]'
921 .  tm doc-space-mode == \n[doc-space-mode]
922 .  tm doc-have-space == \n[doc-have-space]
923 .  tm doc-have-slot == \n[doc-have-slot]
924 .  tm doc-keep-type == \n[doc-keep-type]
925 .  tm doc-display-depth == \n[doc-display-depth]
926 .  tm doc-is-compact == \n[doc-is-compact]
928 .  nr doc-reg-Rd 0
929 .  while (\n[doc-reg-Rd] <= \n[doc-display-depth]) \{\
930 .    tm doc-display-type-stack\n[doc-reg-Rd] == `\*[doc-display-type-stack\n[doc-reg-Rd]]'
931 .    tm doc-display-indent-stack\n[doc-reg-Rd] == \n[doc-display-indent-stack\n[doc-reg-Rd]]
932 .    tm doc-display-ad-stack\n[doc-reg-Rd] == \n[doc-display-ad-stack\n[doc-reg-Rd]]
933 .    tm doc-display-fi-stack\n[doc-reg-Rd] == \n[doc-display-fi-stack\n[doc-reg-Rd]]
934 .    tm doc-display-ft-stack\n[doc-reg-Rd] == \n[doc-display-ft-stack\n[doc-reg-Rd]]
935 .    tm doc-display-ps-stack\n[doc-reg-Rd] == \n[doc-display-ps-stack\n[doc-reg-Rd]]
936 .    nr doc-reg-Rd +1
937 .  \}
939 .  tm doc-fontmode-depth == \n[doc-fontmode-depth]
941 .  nr doc-reg-Rd 1
942 .  while (\n[doc-reg-Rd] <= \n[doc-fontmode-depth]) \{\
943 .    tm doc-fontmode-font-stack\n[doc-reg-Rd] == `\n[doc-fontmode-font-stack\n[doc-reg-Rd]]'
944 .    tm doc-fontmode-size-stack\n[doc-reg-Rd] == `\n[doc-fontmode-size-stack\n[doc-reg-Rd]]'
945 .    nr doc-reg-Rd +1
946 .  \}
948 .  tm doc-list-depth == \n[doc-list-depth]
950 .  nr doc-reg-Rd 1
951 .  while (\n[doc-reg-Rd] <= \n[doc-list-depth]) \{\
952 .    tm doc-list-type-stack\n[doc-reg-Rd] == `\*[doc-list-type-stack\n[doc-reg-Rd]]'
953 .    tm doc-list-have-indent-stack\n[doc-reg-Rd] == \n[doc-list-have-indent-stack\n[doc-reg-Rd]]
954 .    tm doc-list-indent-stack\n[doc-reg-Rd] == \n[doc-list-indent-stack\n[doc-reg-Rd]]
955 .    tm doc-compact-list-stack\n[doc-reg-Rd] == \n[doc-compact-list-stack\n[doc-reg-Rd]]
956 .    tm doc-tag-prefix-stack\n[doc-reg-Rd] == `\*[doc-tag-prefix-stack\n[doc-reg-Rd]]'
957 .    tm doc-tag-width-stack\n[doc-reg-Rd] == `\*[doc-tag-width-stack\n[doc-reg-Rd]]'
958 .    tm doc-list-offset-stack\n[doc-reg-Rd] == \n[doc-list-offset-stack\n[doc-reg-Rd]]
959 .    tm doc-enum-list-count-stack\n[doc-reg-Rd] == \n[doc-enum-list-count-stack\n[doc-reg-Rd]]
960 .    nr doc-reg-Rd +1
961 .  \}
963 .  tm doc-saved-Pa-font == `\*[doc-saved-Pa-font]'
964 .  tm doc-curr-type == \n[doc-curr-type]
965 .  tm doc-curr-arg == `\*[doc-curr-arg]'
966 .  tm doc-diag-list-input-line-count == \n[doc-diag-list-input-line-count]
967 .  tm doc-num-columns == \n[doc-num-columns]
968 .  tm doc-column-indent-width == \n[doc-column-indent-width]
969 .  tm doc-is-func == \n[doc-is-func]
970 .  tm doc-have-old-func == \n[doc-have-old-func]
971 .  tm doc-func-arg-count == \n[doc-func-arg-count]
972 .  tm doc-func-arg == `\*[doc-func-arg]'
973 .  tm doc-num-func-args == \n[doc-num-func-args]
974 .  tm doc-func-args-processed == \n[doc-func-args-processed]
975 .  tm doc-have-func == \n[doc-have-func]
976 .  tm doc-is-reference == \n[doc-is-reference]
977 .  tm doc-reference-count == \n[doc-reference-count]
978 .  tm doc-author-count == \n[doc-author-count]
980 .  nr doc-reg-Rd 0
981 .  while (\n[doc-reg-Rd] <= \n[doc-author-count]) \{\
982 .    tm doc-author-name\n[doc-reg-Rd] == `\*[doc-author-name\n[doc-reg-Rd]]'
983 .    nr doc-reg-Rd +1
984 .  \}
986 .  tm doc-book-count == \n[doc-book-count]
987 .  tm doc-book-name == `\*[doc-book-name]'
988 .  tm doc-date-count == \n[doc-date-count]
989 .  tm doc-date == `\*[doc-date]'
990 .  tm doc-publisher-count == \n[doc-publisher-count]
991 .  tm doc-publisher-name == `\*[doc-publisher-name]'
992 .  tm doc-journal-count == \n[doc-journal-count]
993 .  tm doc-journal-name == `\*[doc-journal-name]'
994 .  tm doc-issue-count == \n[doc-issue-count]
995 .  tm doc-issue-name == `\*[doc-issue-name]'
996 .  tm doc-optional-count == \n[doc-optional-count]
997 .  tm doc-optional-string == `\*[doc-optional-string]'
998 .  tm doc-page-number-count == \n[doc-page-number-count]
999 .  tm doc-page-number-string == `\*[doc-page-number-string]'
1000 .  tm doc-corporate-count == \n[doc-corporate-count]
1001 .  tm doc-corporate-name == `\*[doc-corporate-name]'
1002 .  tm doc-report-count == \n[doc-report-count]
1003 .  tm doc-report-name == `\*[doc-report-name]'
1004 .  tm doc-reference-title-count == \n[doc-reference-title-count]
1005 .  tm doc-reference-title-name == `\*[doc-reference-title-name]'
1006 .  tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]'
1007 .  tm doc-volume-count == \n[doc-volume-count]
1008 .  tm doc-volume-name == `\*[doc-volume-name]'
1009 .  tm doc-have-author == \n[doc-have-author]
1011 .  tm doc-document-title == `\*[doc-document-title]'
1012 .  tm doc-volume == `\*[doc-volume]'
1013 .  tm doc-section == `\*[doc-section]'
1014 .  tm doc-operating-system == `\*[doc-operating-system]'
1015 .  tm doc-date-string == `\*[doc-date-string]'
1016 .  tm doc-header-space == \n[doc-header-space]
1017 .  tm doc-footer-space == \n[doc-footer-space]
1018 .  tm doc-display-vertical == \n[doc-display-vertical]
1019 .  tm doc-header-string == `\*[doc-header-string]'
1020 .  tm doc-in-synopsis-section == \n[doc-in-synopsis-section]
1021 .  tm doc-in-see-also-section == \n[doc-in-see-also-section]
1022 .  tm doc-in-files-section == \n[doc-in-files-section]
1023 .  tm doc-in-authors-section == \n[doc-in-authors-section]
1025 .  tm END OF GLOBAL REGISTER DUMP
1031 .\" EOF