Add Cyrillic to devhtml.
[s-roff.git] / tmac / doc-common
blob40483e0cdde18efa3a47b2b716da1859db0ef5f9
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. [Deleted.  See
13 .\"     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
14 .\" 4. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)doc-common  8.1 (Berkeley) 06/08/93
31 .\"
32 .\"     %beginstrip%
35 .\" Macro Identifiers.  For each user macro a corresponding register with
36 .\" the same name must exist.  Its value must not be zero.
38 .nr %A 1
39 .nr %B 1
40 .nr %D 1
41 .nr %I 1
42 .nr %J 1
43 .nr %N 1
44 .nr %O 1
45 .nr %P 1
46 .nr %Q 1
47 .nr %R 1
48 .nr %T 1
49 .nr %V 1
50 .nr Ac 3
51 .nr Ad 12n
52 .nr An 12n
53 .nr Ao 12n
54 .nr Ap 2
55 .nr Aq 12n
56 .nr Ar 12n
57 .nr At 1
58 .nr Bc 3
59 .nr Bf 8n\" ?
60 .nr Bk 8n\" ?
61 .nr Bl 1
62 .nr Bo 12n
63 .nr Bq 12n
64 .nr Brc 3
65 .nr Bro 12n
66 .nr Brq 12n
67 .nr Bsx 1
68 .nr Bt 8n\" ?
69 .nr Bx 1
70 .nr Cd 12n
71 .nr Cm 10n
72 .nr D1 8n\" ?
73 .nr Dc 3
74 .nr Dl 8n\" ?
75 .nr Dt 8n\" ?
76 .nr Do 12n
77 .nr Dq 12n
78 .nr Ds 6n\" many manpages still use this as a -width value
79 .nr Dv 12n
80 .nr Ec 3
81 .nr Ef 8n\" ?
82 .nr Ek 8n\" ?
83 .nr El 1
84 .nr Em 10n
85 .nr En 12n
86 .nr Eo 12n
87 .nr Eq 12n
88 .nr Er 17n
89 .nr Es 12n
90 .nr Ev 15n
91 .nr Ex 1
92 .nr Fa 12n
93 .nr Fc 3
94 .nr Fd 12n\" ?
95 .nr Fl 10n
96 .nr Fn 16n
97 .nr Fo 16n
98 .nr Fr 12n\" ?
99 .nr Ft 8n\" ?
100 .nr Fx 1
101 .nr Ic 10n
102 .nr In 12n
103 .nr It 8n\" ?
104 .nr Lb 11n
105 .nr Li 16n
106 .nr Lk 6n\" ?
107 .nr Lp 8n\" ?
108 .nr Me 6n
109 .nr Ms 6n
110 .nr Mt 6n\" ?
111 .nr Nd 8n\" ?
112 .nr Nm 10n
113 .nr No 12n
114 .nr Ns 2
115 .nr Nx 1
116 .nr Oc 3
117 .nr Oo 10n
118 .nr Op 14n
119 .nr Os 6n\" ?
120 .nr Ox 1
121 .nr Pa 32n
122 .nr Pc 3
123 .nr Pf 12n
124 .nr Po 12n
125 .nr Pp 8n\" ?
126 .nr Pq 12n
127 .nr Qc 3
128 .nr Ql 16n
129 .nr Qo 12n
130 .nr Qq 12n
131 .nr Rv 1
132 .nr Sc 3
133 .nr Sh 8n
134 .nr Sm 8n\" ?
135 .nr So 12n
136 .nr Sq 12n
137 .nr Ss 8n
138 .nr St 8n\" ?
139 .nr Sx 16n
140 .nr Sy 6n
141 .nr Ta 2
142 .nr Tn 10n
143 .nr Ud 8n\" ?
144 .nr Ux 1
145 .nr Va 12n
146 .nr Vt 8n\" ?
147 .nr Xc 3
148 .nr Xo 1
149 .nr Xr 10n
152 .\" macros which must be processed after the closing delimiter of `Op'
153 .\" and friends
154 .ds doc-after-Ao
155 .ds doc-after-Bo
156 .ds doc-after-Bro
157 .ds doc-after-Do
158 .ds doc-after-Eo
159 .ds doc-after-Fo
160 .ds doc-after-Ns
161 .ds doc-after-Oo
162 .ds doc-after-Po
163 .ds doc-after-Qo
164 .ds doc-after-So
165 .ds doc-after-Xo
168 .nr doc-display-indent 6n
171 .\" space strings
173 .ds doc-soft-space " \"
174 .ds doc-hard-space \~
175 .ds doc-tab \t
181 .\" punctuation values (suffix=3, prefix=4)
183 .nr doc-punct. 3
184 .nr doc-punct, 3
185 .nr doc-punct: 3
186 .nr doc-punct; 3
187 .nr doc-punct( 4
188 .nr doc-punct) 3
189 .nr doc-punct[ 4
190 .nr doc-punct] 3
191 .nr doc-punct? 3
192 .nr doc-punct! 3
195 .\" header assembly macros
197 .\" NS doc-document-title global string
198 .\" NS   the title of the manual page
200 .ds doc-document-title UNTITLED
203 .\" NS doc-volume global string
204 .\" NS   the volume where the manual page belongs to
206 .ds doc-volume LOCAL
209 .\" NS doc-section global string
210 .\" NS   the manual section
212 .ds doc-section Null
215 .\" NS Dt user macro (not parsed, not callable)
216 .\" NS   document title
217 .\" NS
218 .\" NS modifies:
219 .\" NS   doc-document-title
220 .\" NS   doc-section
221 .\" NS   doc-volume
222 .\" NS
223 .\" NS local variables:
224 .\" NS   doc-volume-as-XXX
225 .\" NS   doc-volume-ds-XXX
226 .\" NS
227 .\" NS width register `Dt' set above
229 .\" an alternative, more detailed scheme for naming the manual sections
231 .ds doc-volume-operating-system BSD
232 .nr doc-volume-operating-system-ateol 0
233 .ds doc-volume-ds-1 General Commands Manual
234 .ds doc-volume-ds-2 System Calls Manual
235 .ds doc-volume-ds-3 Library Functions Manual
236 .ds doc-volume-ds-4 Kernel Interfaces Manual
237 .ds doc-volume-ds-5 File Formats Manual
238 .ds doc-volume-ds-6 Games Manual
239 .ds doc-volume-ds-7 Miscellaneous Information Manual
240 .ds doc-volume-ds-8 System Manager's Manual
241 .ds doc-volume-ds-9 Kernel Developer's Manual
243 .ds doc-volume-ds-USD   User's Supplementary Documents
244 .ds doc-volume-ds-PS1   Programmer's Supplementary Documents
245 .ds doc-volume-ds-AMD   Ancestral Manual Documents
246 .ds doc-volume-ds-SMM   System Manager's Manual
247 .ds doc-volume-ds-URM   User's Reference Manual
248 .ds doc-volume-ds-PRM   Programmer's Manual
249 .ds doc-volume-ds-KM    Kernel Manual
250 .ds doc-volume-ds-IND   Manual Master Index
251 .ds doc-volume-ds-LOCAL Local Manual
252 .ds doc-volume-ds-CON   Contributed Software Manual
254 .als doc-volume-ds-MMI doc-volume-ds-IND
255 .als doc-volume-ds-LOC doc-volume-ds-LOCAL
257 .ds doc-volume-as-alpha        alpha
258 .als doc-volume-as-Alpha doc-volume-as-alpha
259 .ds doc-volume-as-acorn26      acorn26
260 .ds doc-volume-as-acorn32      acorn32
261 .ds doc-volume-as-algor        algor
262 .ds doc-volume-as-amd64        amd64
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-cats         cats
270 .ds doc-volume-as-cesfic       cesfic
271 .ds doc-volume-as-cobalt       cobalt
272 .ds doc-volume-as-dreamcast    dreamcast
273 .ds doc-volume-as-evbarm       evbarm
274 .ds doc-volume-as-evbmips      evbmips
275 .ds doc-volume-as-evbppc       evbppc
276 .ds doc-volume-as-evbsh3       evbsh3
277 .ds doc-volume-as-hp300        hp300
278 .ds doc-volume-as-hp700        hp700
279 .ds doc-volume-as-hpcarm       hpcarm
280 .ds doc-volume-as-hpcmips      hpcmips
281 .ds doc-volume-as-hpcsh        hpcsh
282 .ds doc-volume-as-i386         i386
283 .ds doc-volume-as-luna68k      luna68k
284 .ds doc-volume-as-m68k         m68k
285 .ds doc-volume-as-mac68k       mac68k
286 .ds doc-volume-as-macppc       macppc
287 .ds doc-volume-as-mips         mips
288 .ds doc-volume-as-mipsco       mipsco
289 .ds doc-volume-as-mmeye        mmeye
290 .ds doc-volume-as-mvme68k      mvme68k
291 .ds doc-volume-as-mvmeppc      mvmeppc
292 .ds doc-volume-as-netwinder    netwinder
293 .ds doc-volume-as-news68k      news68k
294 .ds doc-volume-as-newsmips     newsmips
295 .ds doc-volume-as-next68k      next68k
296 .ds doc-volume-as-ofppc        ofppc
297 .ds doc-volume-as-pc532        pc532
298 .ds doc-volume-as-playstation2 playstation2
299 .ds doc-volume-as-pmax         pmax
300 .ds doc-volume-as-pmppc        pmppc
301 .ds doc-volume-as-powerpc      powerpc
302 .ds doc-volume-as-prep         prep
303 .ds doc-volume-as-sandpoint    sandpoint
304 .ds doc-volume-as-sbmips       sbmips
305 .ds doc-volume-as-sgimips      sgimips
306 .ds doc-volume-as-sh3          sh3
307 .ds doc-volume-as-shark        shark
308 .ds doc-volume-as-sparc        sparc
309 .ds doc-volume-as-sparc64      sparc64
310 .ds doc-volume-as-sun2         sun2
311 .ds doc-volume-as-sun3         sun3
312 .ds doc-volume-as-tahoe        tahoe
313 .ds doc-volume-as-vax          vax
314 .ds doc-volume-as-x68k         x68k
315 .ds doc-volume-as-x86_64       x86_64
317 .de Dt
318 .  \" reset default arguments
319 .  ds doc-document-title UNTITLED
320 .  ds doc-volume LOCAL
321 .  ds doc-section Null
323 .  if !"\$1"" \
324 .    ds doc-document-title "\$1
326 .  if !"\$2"" \{\
327 .    ds doc-section \$2
328 .    ie \B\a\$2\a \{\
329 .      if ((\$2 >= 1) & (\$2 <= 9)) \{\
330 .        ie \n[doc-volume-operating-system-ateol] \{\
331 .          ds doc-volume "\*[doc-volume-ds-\$2] \*[doc-volume-operating-system]
332 .          if \A\a\$3\a \{\
333 .            if d doc-volume-as-\$3 \
334 .              as doc-volume "/\*[doc-volume-as-\$3]
335 .        \}\}
336 .        el \{\
337 .          ds doc-volume "\*[doc-volume-operating-system]
338 .          if \A\a\$3\a \{\
339 .            if d doc-volume-as-\$3 \
340 .              as doc-volume "/\*[doc-volume-as-\$3]
341 .          \}
342 .          as doc-volume " \*[doc-volume-ds-\$2]
343 .    \}\}\}
344 .    el \{\
345 .      ie "\$2"unass" \
346 .        ds doc-volume DRAFT
347 .      el \{ .ie "\$2"draft" \
348 .        ds doc-volume DRAFT
349 .      el .if "\$2"paper" \
350 .        ds doc-volume UNTITLED
351 .      \}\}
352 .      if \A\a\$3\a \{\
353 .        if d doc-volume-ds-\$3 \
354 .          ds doc-volume "\*[doc-volume-ds-\$3]
355 .  \}\}\}
357 .  if !"\$3"" \
358 .    if "\*[doc-volume]"LOCAL" \
359 .      ds doc-volume \$3
363 .\" NS doc-default-operating-system global string
364 .\" NS   the exact (default) version of the operating system
365 .\" NS
366 .\" NS override this in `mdoc.local', if necessary
368 .ds doc-default-operating-system BSD
371 .\" NS doc-operating-system global string
372 .\" NS   the exact version of the operating system
374 .ds doc-operating-system
377 .\" NS Os user macro (not parsed, not callable)
378 .\" NS   operating system
379 .\" NS
380 .\" NS modifies:
381 .\" NS   doc-operating-system
382 .\" NS
383 .\" NS local variables:
384 .\" NS   doc-operating-system-XXX-XXX
385 .\" NS
386 .\" NS width register `Os' set above
388 .ds doc-operating-system-ATT-7   7th\~Edition
389 .als doc-operating-system-ATT-7th doc-operating-system-ATT-7
390 .ds doc-operating-system-ATT-3   System\~III
391 .als doc-operating-system-ATT-III doc-operating-system-ATT-3
392 .ds doc-operating-system-ATT-V   System\~V
393 .ds doc-operating-system-ATT-V.2 System\~V Release\~2
394 .ds doc-operating-system-ATT-V.3 System\~V Release\~3
395 .ds doc-operating-system-ATT-V.4 System\~V Release\~4
397 .ds doc-operating-system-BSD-3    3rd\~Berkeley Distribution
398 .ds doc-operating-system-BSD-4    4th\~Berkeley Distribution
399 .ds doc-operating-system-BSD-4.1  4.1\~Berkeley Distribution
400 .ds doc-operating-system-BSD-4.2  4.2\~Berkeley Distribution
401 .ds doc-operating-system-BSD-4.3  4.3\~Berkeley Distribution
402 .ds doc-operating-system-BSD-4.3T 4.3-Tahoe Berkeley Distribution
403 .ds doc-operating-system-BSD-4.3R 4.3-Reno Berkeley Distribution
404 .als doc-operating-system-BSD-4.3t doc-operating-system-BSD-4.3T
405 .als doc-operating-system-BSD-4.3r doc-operating-system-BSD-4.3R
406 .ds doc-operating-system-BSD-4.4  4.4BSD
408 .ds doc-operating-system-NetBSD-0.8   0.8
409 .ds doc-operating-system-NetBSD-0.8a  0.8A
410 .ds doc-operating-system-NetBSD-0.9   0.9
411 .ds doc-operating-system-NetBSD-0.9a  0.9A
412 .ds doc-operating-system-NetBSD-1.0   1.0
413 .ds doc-operating-system-NetBSD-1.0a  1.0A
414 .ds doc-operating-system-NetBSD-1.1   1.1
415 .ds doc-operating-system-NetBSD-1.2   1.2
416 .ds doc-operating-system-NetBSD-1.2a  1.2A
417 .ds doc-operating-system-NetBSD-1.2b  1.2B
418 .ds doc-operating-system-NetBSD-1.2c  1.2C
419 .ds doc-operating-system-NetBSD-1.2d  1.2D
420 .ds doc-operating-system-NetBSD-1.2e  1.2E
421 .ds doc-operating-system-NetBSD-1.3   1.3
422 .ds doc-operating-system-NetBSD-1.3a  1.3A
423 .ds doc-operating-system-NetBSD-1.4   1.4
424 .ds doc-operating-system-NetBSD-1.4.1 1.4.1
425 .ds doc-operating-system-NetBSD-1.4.2 1.4.2
426 .ds doc-operating-system-NetBSD-1.4.3 1.4.3
427 .ds doc-operating-system-NetBSD-1.5   1.5
428 .ds doc-operating-system-NetBSD-1.5.1 1.5.1
429 .ds doc-operating-system-NetBSD-1.5.2 1.5.2
430 .ds doc-operating-system-NetBSD-1.5.3 1.5.3
431 .ds doc-operating-system-NetBSD-1.6   1.6
432 .ds doc-operating-system-NetBSD-1.6.1 1.6.1
433 .ds doc-operating-system-NetBSD-1.6.2 1.6.2
434 .ds doc-operating-system-NetBSD-2.0   2.0
435 .ds doc-operating-system-NetBSD-2.1   2.1
437 .ds doc-operating-system-FreeBSD-1.0     1.0
438 .ds doc-operating-system-FreeBSD-1.1     1.1
439 .ds doc-operating-system-FreeBSD-1.1.5   1.1.5
440 .ds doc-operating-system-FreeBSD-1.1.5.1 1.1.5.1
441 .ds doc-operating-system-FreeBSD-2.0     2.0
442 .ds doc-operating-system-FreeBSD-2.0.5   2.0.5
443 .ds doc-operating-system-FreeBSD-2.1     2.1
444 .ds doc-operating-system-FreeBSD-2.1.5   2.1.5
445 .ds doc-operating-system-FreeBSD-2.1.6   2.1.6
446 .ds doc-operating-system-FreeBSD-2.1.7   2.1.7
447 .ds doc-operating-system-FreeBSD-2.2     2.2
448 .ds doc-operating-system-FreeBSD-2.2.1   2.2.1
449 .ds doc-operating-system-FreeBSD-2.2.2   2.2.2
450 .ds doc-operating-system-FreeBSD-2.2.5   2.2.5
451 .ds doc-operating-system-FreeBSD-2.2.6   2.2.6
452 .ds doc-operating-system-FreeBSD-2.2.7   2.2.7
453 .ds doc-operating-system-FreeBSD-2.2.8   2.2.8
454 .ds doc-operating-system-FreeBSD-3.0     3.0
455 .ds doc-operating-system-FreeBSD-3.1     3.1
456 .ds doc-operating-system-FreeBSD-3.2     3.2
457 .ds doc-operating-system-FreeBSD-3.3     3.3
458 .ds doc-operating-system-FreeBSD-3.4     3.4
459 .ds doc-operating-system-FreeBSD-3.5     3.5
460 .ds doc-operating-system-FreeBSD-4.0     4.0
461 .ds doc-operating-system-FreeBSD-4.1     4.1
462 .ds doc-operating-system-FreeBSD-4.1.1   4.1.1
463 .ds doc-operating-system-FreeBSD-4.2     4.2
464 .ds doc-operating-system-FreeBSD-4.3     4.3
465 .ds doc-operating-system-FreeBSD-4.4     4.4
466 .ds doc-operating-system-FreeBSD-4.5     4.5
467 .ds doc-operating-system-FreeBSD-4.6     4.6
468 .ds doc-operating-system-FreeBSD-4.6.2   4.6.2
469 .ds doc-operating-system-FreeBSD-4.7     4.7
470 .ds doc-operating-system-FreeBSD-4.8     4.8
471 .ds doc-operating-system-FreeBSD-4.9     4.9
472 .ds doc-operating-system-FreeBSD-4.10    4.10
473 .ds doc-operating-system-FreeBSD-5.0     5.0
474 .ds doc-operating-system-FreeBSD-5.1     5.1
475 .ds doc-operating-system-FreeBSD-5.2     5.2
476 .ds doc-operating-system-FreeBSD-5.2.1   5.2.1
477 .ds doc-operating-system-FreeBSD-5.3     5.3
479 .de Os
480 .  ie "\$1"" \
481 .    ds doc-operating-system "\*[doc-default-operating-system]
482 .  el \{ .ie "\$1"ATT" \{\
483 .    ds doc-operating-system AT&T
484 .    if \A\a\$2\a \{\
485 .      ie d doc-operating-system-ATT-\$2 \
486 .        as doc-operating-system " \*[doc-operating-system-ATT-\$2]
487 .      el \
488 .        as doc-operating-system " UNIX
489 .  \}\}
490 .  el \{ .ie "\$1"BSD" \{\
491 .    if \A\a\$2\a \{\
492 .      ie d doc-operating-system-BSD-\$2 \
493 .        ds doc-operating-system "\*[doc-operating-system-BSD-\$2]
494 .      el \
495 .        tm mdoc warning: .Os: Unknown BSD version `\$2' (#\n[.c])
496 .  \}\}
497 .  el \{ .ie "\$1"FreeBSD" \{\
498 .    ds doc-operating-system FreeBSD
499 .    if \A\a\$2\a \{\
500 .      ie d doc-operating-system-FreeBSD-\$2 \
501 .        as doc-operating-system \~\*[doc-operating-system-FreeBSD-\$2]
502 .      el \
503 .        tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c])
504 .  \}\}
505 .  el \{ .ie "\$1"NetBSD" \{\
506 .    ds doc-operating-system NetBSD
507 .    if \A\a\$2\a \{\
508 .      ie d doc-operating-system-NetBSD-\$2 \
509 .        as doc-operating-system \~\*[doc-operating-system-NetBSD-\$2]
510 .      el \
511 .        tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c])
512 .  \}\}
513 .  el \{\
514 .    ds doc-operating-system \$1
515 .    if !"\$2"" \
516 .      as doc-operating-system " \$2
517 .  \}\}\}\}\}
521 .\" NS doc-date-string global string
522 .\" NS   the manual page date as set by `Dd'
524 .ds doc-date-string
527 .\" NS Dd user macro (not parsed, not callable)
528 .\" NS   set document date
529 .\" NS
530 .\" NS modifies:
531 .\" NS   doc-date-string
532 .\" NS
533 .\" NS local variables:
534 .\" NS   doc-date-XXX
535 .\" NS
536 .\" NS width register `Dd' set above
538 .ds doc-date-1  January
539 .ds doc-date-2  February
540 .ds doc-date-3  March
541 .ds doc-date-4  April
542 .ds doc-date-5  May
543 .ds doc-date-6  June
544 .ds doc-date-7  July
545 .ds doc-date-8  August
546 .ds doc-date-9  September
547 .ds doc-date-10 October
548 .ds doc-date-11 November
549 .ds doc-date-12 December
551 .de Dd
552 .  ie \n[.$] \{\
553 .    ie (\n[.$] == 3) \
554 .      ds doc-date-string \$1\~\$2 \$3
555 .    el \{\
556 .      ds doc-date-string "\*[doc-date-\n[mo]]
557 .      as doc-date-string \~\n[dy], \n[year]
558 .    \}
559 .  \}
560 .  el \
561 .    ds doc-date-string Epoch
565 .\" NS doc-hyphen-flags global register
566 .\" NS   the parameter for the `.hy' request
567 .\" NS
568 .\" NS override this in `mdoc.local', if necessary.
570 .nr doc-hyphen-flags 12
573 .\" NS doc-header macro
574 .\" NS   print page header
575 .\" NS
576 .\" NS local variables:
577 .\" NS   doc-reg-dh
578 .\" NS   doc-reg-dh1
580 .de doc-header
581 .  ev doc-env-dh
582 .  doc-setup-page-layout
583 .  if !\n[cR] \
584 .    sp \n[doc-header-space]u
585 .  nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\f[]'
586 .  nr doc-reg-dh1 \w'\*[doc-caption-font2]\*[doc-volume]\f[]'
587 .  if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
588 .    while (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
589 .      substring doc-header-string 0 -2
590 .      nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\|.\|.\|.\f[]'
591 .    \}
592 .    as doc-header-string "\|.\|.\|.
593 .  \}
594 .  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
595 .  ie !\n[cR] \
596 .    sp \n[doc-header-space]u
597 .  el \
598 .    sp 1v
599 .  ev
600 .  ns
604 .\" NS doc-footer macro
605 .\" NS   print page footer
607 .de doc-footer
608 .  ie \n[cR] \
609 .    br
610 .  el \{\
611 .    ev doc-caption-enviroment
612 .    doc-setup-page-layout
613 .    sp \n[doc-footer-space]u
614 .    ie \n[D] \{\
615 .      ie o \
616 .        tl \a%\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a\*[doc-caption-font]\*[doc-operating-system]\f[]\a
617 .      el \
618 .        tl \a\*[doc-caption-font]\*[doc-operating-system]\f[]\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a%\a
619 .    \}
620 .    el \
621 .      tl \a\*[doc-caption-font]\*[doc-operating-system]\f[]\a\*[doc-caption-font2]\*[doc-date-string]\f[]\a%\a
622 .    bp
623 .    ev
624 .  \}
628 .\" NS doc-check-depth macro
629 .\" NS   check paired macros
631 .de doc-check-depth
632 .  if \n[doc-list-depth] \{\
633 .    tm mdoc warning: A .Bl directive has no matching .El (#\n[.c])
634 .    nr doc-list-depth 0
635 .  \}
636 .  if \n[doc-display-depth] \{\
637 .    tm mdoc warning: A .Bd directive has no matching .Ed (#\n[.c])
638 .    nr doc-display-depth 0
639 .  \}
640 .  if \n[doc-fontmode-depth] \{\
641 .    tm mdoc warning: A .Bf directive has no matching .Ef (#\n[.c])
642 .    nr doc-fontmode-depth 0
643 .  \}
647 .\" NS doc-end-macro macro
648 .\" NS   finish output
650 .de doc-end-macro
651 .  \" We may still have a partial line in the environment.  If this is the
652 .  \" case, and we happen to be on the last line of the page, the `.fl'
653 .  \" request will cause the page to be ejected and troff will immediately
654 .  \" exit.  If we are in nroff mode, this would be unfortunate, since we
655 .  \" would never get a chance to output the footer.  So we fudge the page
656 .  \" length to make sure that the last page is never ejected until we want
657 .  \" it to be.
659 .  if \n[cR] \
660 .    pl +3v
661 .  fl
663 .  doc-check-depth
665 .  if \n[cR] \{\
666 .    sp
667 .    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
668 .    \" suppress empty lines after the footer
669 .    pl \n[nl]u
670 .  \}
674 .\" NS doc-paragraph macro
675 .\" NS   insert a paragraph
677 .de doc-paragraph
678 .  sp \n[doc-paragraph-space]u
679 .  if !\n[cR] \
680 .    ne 2
681 .  ns
685 .\" NS Pp user macro (not parsed, not callable)
686 .\" NS   new paragraph
687 .\" NS
688 .\" NS width register `Pp' set above
690 .als Pp doc-paragraph
693 .\" NS Lp user macro (not parsed, not callable)
694 .\" NS   same as .Pp
695 .\" NS
696 .\" NS width register `Lp' set above
698 .als Lp doc-paragraph
701 .de LP
702 .  tm Not a \-mdoc command: .LP (#\n[.c])
706 .de PP
707 .  tm Not a \-mdoc command: .PP (#\n[.c])
711 .de pp
712 .  tm Not a \-mdoc command: .pp (#\n[.c])
716 .de SH
717 .  tm Not a \-mdoc command: .SH (#\n[.c])
721 .\" NS Nd user macro (not parsed, not callable)
722 .\" NS   print name description
723 .\" NS
724 .\" NS width register `Nd' set above
726 .de Nd
727 .  nop \[em] \$*
731 .\" NS doc-in-synopsis-section global register (bool)
732 .\" NS   whether we are in the `synopsis' section
734 .nr doc-in-synopsis-section 0
737 .\" NS doc-in-library-section global register (bool)
738 .\" NS   whether we are in the `library' section
740 .nr doc-in-library-section 0
743 .\" NS doc-in-see-also-section global register (bool)
744 .\" NS   whether we are in the `see also' section
746 .nr doc-in-see-also-section 0
749 .\" NS doc-in-files-section global register (bool)
750 .\" NS   whether we are in the `files' section
752 .nr doc-in-files-section 0
755 .\" NS doc-in-authors-section global register (bool)
756 .\" NS   whether we are in the `authors' section
758 .nr doc-in-authors-section 0
761 .\" NS doc-first-parameter macro
762 .\" NS   return first parameter
763 .\" NS
764 .\" NS local variables:
765 .\" NS   doc-str-dfp
767 .de doc-first-parameter
768 .  ds doc-str-dfp "\$1
772 .\" NS Sh user macro (not callable)
773 .\" NS   section headers
774 .\" NS
775 .\" NS modifies:
776 .\" NS   doc-func-args-processed
777 .\" NS   doc-func-count
778 .\" NS   doc-in-authors-section
779 .\" NS   doc-in-files-section
780 .\" NS   doc-in-library-section
781 .\" NS   doc-in-see-also-section
782 .\" NS   doc-in-synopsis-section
783 .\" NS   doc-indent-synopsis
784 .\" NS   doc-indent-synopsis-active
785 .\" NS   doc-is-func
786 .\" NS   doc-num-func-args
787 .\" NS
788 .\" NS local variables:
789 .\" NS   doc-reg-Sh
790 .\" NS   doc-reg-Sh1
791 .\" NS   doc-section-XXX
792 .\" NS
793 .\" NS width register `Sh' set in doc-common
795 .ds doc-section-name        NAME
796 .ds doc-section-synopsis    SYNOPSIS
797 .ds doc-section-library     LIBRARY
798 .ds doc-section-description DESCRIPTION
799 .ds doc-section-see-also    SEE
800 .ds doc-section-files       FILES
801 .ds doc-section-authors     AUTHORS
803 .de Sh
804 .  ie \n[doc-arg-limit] \{\
805 .    \" we only allow `Sh' within `Sh'; it will change the font back to
806 .    \" `doc-Sh-font'
807 .    ie "\*[doc-macro-name]"Sh" \{\
808 .      nr doc-arg-ptr +1
809 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
810 .        nr doc-curr-font \n[.f]
811 .        nr doc-curr-size \n[.ps]
812 .        nop \*[doc-Sh-font]\c
813 .        doc-print-recursive
814 .      \}
815 .      el \{\
816 .        tm Usage: .Sh section_name ... (#\n[.c])
817 .        doc-reset-args
818 .    \}\}
819 .    el \{\
820 .      tm Usage: .Sh not callable by other macros (#\n[.c])
821 .      doc-reset-args
822 .  \}\}
823 .  el \{\
824 .    if !\n[.$] \{\
825 .      tm Usage: .Sh section_name ... (#\n[.c])
826 .      return
827 .    \}
829 .    ds doc-macro-name Sh
830 .    doc-parse-args \$@
832 .    if t \
833 .      ad
835 .    \" this resolves e.g. `.Sh "SEE ALSO"'
836 .    doc-first-parameter \$*
838 .    ie "\*[doc-str-dfp]"\*[doc-section-name]" \{\
839 .      doc-setup-header
840 .      in 0
841 .    \}
842 .    el \{\
843 .      nr doc-in-synopsis-section 0
844 .      nr doc-in-library-section 0
845 .      nr doc-in-see-also-section 0
846 .      nr doc-in-files-section 0
847 .      nr doc-in-authors-section 0
849 .      ie        "\*[doc-str-dfp]"\*[doc-section-synopsis]" \{\
850 .        if t \
851 .          na
852 .        nr doc-in-synopsis-section 1
853 .        nr doc-indent-synopsis 0
854 .        nr doc-indent-synopsis-active 0
855 .      \}
856 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-library]" \{\
857 .        nr doc-in-library-section 1
858 .      \}
859 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\
860 .        nr doc-is-func 0
861 .        nr doc-func-count 0
862 .        nr doc-func-args-processed 0
863 .        nr doc-num-func-args 0
864 .      \}
865 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-see-also]" \{\
866 .        if t \
867 .          na
868 .        nr doc-in-see-also-section 1
869 .      \}
870 .      el \{ .ie "\*[doc-str-dfp]"\*[doc-section-files]" \
871 .        nr doc-in-files-section 1
872 .      el .if    "\*[doc-str-dfp]"\*[doc-section-authors]" \
873 .        nr doc-in-authors-section 1
874 .      \}\}\}\}
876 .      in 0
877 .      nr doc-have-author 0
878 .    \}
880 .    doc-setup-page-layout
881 .    sp
882 .    ns
883 .    ta T .5i
884 .    if !\n[cR] \
885 .      ne 3
886 .    fi
888 .    if t \{\
889 .      nr doc-reg-Sh \n[.ss]
890 .      nr doc-reg-Sh1 \n[.sss]
891 .      ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3)
892 .    \}
894 .    nr doc-arg-ptr +1
895 .    nr doc-curr-font \n[.f]
896 .    nr doc-curr-size \n[.ps]
897 .    nop \*[doc-Sh-font]\c
898 .    doc-print-recursive
900 .    if t \
901 .      ss \n[doc-reg-Sh] \n[doc-reg-Sh1]
903 .    in +\n[doc-subheader-indent]u
904 .    ns
906 .    doc-check-depth
907 .  \}
911 .\" NS Ss user macro (not callable)
912 .\" NS   subsection
913 .\" NS
914 .\" NS local variable:
915 .\" NS   doc-reg-Ss
916 .\" NS   doc-reg-Ss1
917 .\" NS
918 .\" NS width register `Ss' set above
920 .de Ss
921 .  ie \n[doc-arg-limit] \{\
922 .    \" we only allow `Ss' within `Ss'; it will change the font back to
923 .    \" `doc-Sh-font'
924 .    ie "\*[doc-macro-name]"Ss" \{\
925 .      nr doc-arg-ptr +1
926 .      ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
927 .        nr doc-curr-font \n[.f]
928 .        nr doc-curr-size \n[.ps]
929 .        nop \*[doc-Sh-font]\c
930 .        doc-print-recursive
931 .      \}
932 .      el \{\
933 .        tm Usage: .Ss subsection_name ... (#\n[.c])
934 .        doc-reset-args
935 .    \}\}
936 .    el \{\
937 .      tm Usage: .Ss not callable by other macros (#\n[.c])
938 .      doc-reset-args
939 .  \}\}
940 .  el \{\
941 .    if !\n[.$] \{\
942 .      tm Usage: .Ss subsection_name ... (#\n[.c])
943 .      return
944 .    \}
946 .    ds doc-macro-name Ss
947 .    doc-parse-args \$@
949 .    sp
950 .    if !\n[cR] \
951 .      ne 3
952 .    ti -.25i
954 .    nr doc-reg-Ss \n[.ss]
955 .    nr doc-reg-Ss1 \n[.sss]
956 .    ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4)
958 .    nr doc-arg-ptr +1
959 .    nr doc-curr-font \n[.f]
960 .    nr doc-curr-size \n[.ps]
961 .    nop \*[doc-Sh-font]\c
962 .    doc-print-recursive
964 .    ss \n[doc-reg-Ss] \n[doc-reg-Ss1]
966 .    ta T .5i
967 .    if !\n[cR] \
968 .      ne 2
969 .    br
970 .    ns
972 .    doc-check-depth
973 .  \}
977 .\" NS Rd macro (not parsed, not callable)
978 .\" NS   print global register dump to stderr
979 .\" NS
980 .\" NS local variables:
981 .\" NS   doc-reg-Rd
983 .de Rd
984 .  tm MDOC GLOBAL REGISTER DUMP
985 .  tm doc-macro-name == `\*[doc-macro-name]'
986 .  tm doc-arg-limit == \n[doc-arg-limit]
987 .  tm doc-num-args == \n[doc-num-args]
988 .  tm doc-arg-ptr == \n[doc-arg-ptr]
990 .  nr doc-reg-Rd 1
991 .  while (\n[doc-reg-Rd] <= \n[doc-arg-limit]) \{\
992 .    tm doc-arg\n[doc-reg-Rd] == `\*[doc-arg\n[doc-reg-Rd]]'
993 .    tm doc-type\n[doc-reg-Rd] == \n[doc-type\n[doc-reg-Rd]]
994 .    tm doc-space\n[doc-reg-Rd] == `\*[doc-space\n[doc-reg-Rd]]'
995 .    nr doc-reg-Rd +1
996 .  \}
998 .  tm doc-curr-font == \n[doc-curr-font]
999 .  tm doc-curr-size == \n[doc-curr-size]
1000 .  tm doc-indent-synopsis == \n[doc-indent-synopsis]
1001 .  tm doc-indent-synopsis-active == \n[doc-indent-synopsis-active]
1002 .  tm doc-have-decl == \n[doc-have-decl]
1003 .  tm doc-have-var == \n[doc-have-var]
1004 .  tm doc-command-name == `\*[doc-command-name]'
1005 .  tm doc-quote-left == `\*[doc-quote-left]'
1006 .  tm doc-quote-right == `\*[doc-quote-right]'
1007 .  tm doc-nesting-level == \n[doc-nesting-level]
1008 .  tm doc-in-list == \n[doc-in-list]
1009 .  tm doc-space == `\*[doc-space]'
1010 .  tm doc-saved-space == `\*[doc-saved-space]'
1011 .  tm doc-space-mode == \n[doc-space-mode]
1012 .  tm doc-have-space == \n[doc-have-space]
1013 .  tm doc-have-slot == \n[doc-have-slot]
1014 .  tm doc-keep-type == \n[doc-keep-type]
1015 .  tm doc-display-depth == \n[doc-display-depth]
1016 .  tm doc-is-compact == \n[doc-is-compact]
1018 .  nr doc-reg-Rd 0
1019 .  while (\n[doc-reg-Rd] <= \n[doc-display-depth]) \{\
1020 .    tm doc-display-type-stack\n[doc-reg-Rd] == `\*[doc-display-type-stack\n[doc-reg-Rd]]'
1021 .    tm doc-display-indent-stack\n[doc-reg-Rd] == \n[doc-display-indent-stack\n[doc-reg-Rd]]
1022 .    tm doc-display-ad-stack\n[doc-reg-Rd] == \n[doc-display-ad-stack\n[doc-reg-Rd]]
1023 .    tm doc-display-fi-stack\n[doc-reg-Rd] == \n[doc-display-fi-stack\n[doc-reg-Rd]]
1024 .    tm doc-display-ft-stack\n[doc-reg-Rd] == \n[doc-display-ft-stack\n[doc-reg-Rd]]
1025 .    tm doc-display-ps-stack\n[doc-reg-Rd] == \n[doc-display-ps-stack\n[doc-reg-Rd]]
1026 .    nr doc-reg-Rd +1
1027 .  \}
1029 .  tm doc-fontmode-depth == \n[doc-fontmode-depth]
1031 .  nr doc-reg-Rd 1
1032 .  while (\n[doc-reg-Rd] <= \n[doc-fontmode-depth]) \{\
1033 .    tm doc-fontmode-font-stack\n[doc-reg-Rd] == `\n[doc-fontmode-font-stack\n[doc-reg-Rd]]'
1034 .    tm doc-fontmode-size-stack\n[doc-reg-Rd] == `\n[doc-fontmode-size-stack\n[doc-reg-Rd]]'
1035 .    nr doc-reg-Rd +1
1036 .  \}
1038 .  tm doc-list-depth == \n[doc-list-depth]
1040 .  nr doc-reg-Rd 1
1041 .  while (\n[doc-reg-Rd] <= \n[doc-list-depth]) \{\
1042 .    tm doc-list-type-stack\n[doc-reg-Rd] == `\*[doc-list-type-stack\n[doc-reg-Rd]]'
1043 .    tm doc-list-have-indent-stack\n[doc-reg-Rd] == \n[doc-list-have-indent-stack\n[doc-reg-Rd]]
1044 .    tm doc-list-indent-stack\n[doc-reg-Rd] == \n[doc-list-indent-stack\n[doc-reg-Rd]]
1045 .    tm doc-compact-list-stack\n[doc-reg-Rd] == \n[doc-compact-list-stack\n[doc-reg-Rd]]
1046 .    tm doc-tag-prefix-stack\n[doc-reg-Rd] == `\*[doc-tag-prefix-stack\n[doc-reg-Rd]]'
1047 .    tm doc-tag-width-stack\n[doc-reg-Rd] == `\*[doc-tag-width-stack\n[doc-reg-Rd]]'
1048 .    tm doc-list-offset-stack\n[doc-reg-Rd] == \n[doc-list-offset-stack\n[doc-reg-Rd]]
1049 .    tm doc-enum-list-count-stack\n[doc-reg-Rd] == \n[doc-enum-list-count-stack\n[doc-reg-Rd]]
1050 .    nr doc-reg-Rd +1
1051 .  \}
1053 .  tm doc-saved-Pa-font == `\*[doc-saved-Pa-font]'
1054 .  tm doc-curr-type == \n[doc-curr-type]
1055 .  tm doc-curr-arg == `\*[doc-curr-arg]'
1056 .  tm doc-diag-list-input-line-count == \n[doc-diag-list-input-line-count]
1057 .  tm doc-num-columns == \n[doc-num-columns]
1058 .  tm doc-column-indent-width == \n[doc-column-indent-width]
1059 .  tm doc-is-func == \n[doc-is-func]
1060 .  tm doc-have-old-func == \n[doc-have-old-func]
1061 .  tm doc-func-arg-count == \n[doc-func-arg-count]
1062 .  tm doc-func-arg == `\*[doc-func-arg]'
1063 .  tm doc-num-func-args == \n[doc-num-func-args]
1064 .  tm doc-func-args-processed == \n[doc-func-args-processed]
1065 .  tm doc-have-func == \n[doc-have-func]
1066 .  tm doc-is-reference == \n[doc-is-reference]
1067 .  tm doc-reference-count == \n[doc-reference-count]
1068 .  tm doc-author-count == \n[doc-author-count]
1070 .  nr doc-reg-Rd 0
1071 .  while (\n[doc-reg-Rd] <= \n[doc-author-count]) \{\
1072 .    tm doc-author-name\n[doc-reg-Rd] == `\*[doc-author-name\n[doc-reg-Rd]]'
1073 .    nr doc-reg-Rd +1
1074 .  \}
1076 .  tm doc-book-count == \n[doc-book-count]
1077 .  tm doc-book-name == `\*[doc-book-name]'
1078 .  tm doc-date-count == \n[doc-date-count]
1079 .  tm doc-date == `\*[doc-date]'
1080 .  tm doc-publisher-count == \n[doc-publisher-count]
1081 .  tm doc-publisher-name == `\*[doc-publisher-name]'
1082 .  tm doc-journal-count == \n[doc-journal-count]
1083 .  tm doc-journal-name == `\*[doc-journal-name]'
1084 .  tm doc-issue-count == \n[doc-issue-count]
1085 .  tm doc-issue-name == `\*[doc-issue-name]'
1086 .  tm doc-optional-count == \n[doc-optional-count]
1087 .  tm doc-optional-string == `\*[doc-optional-string]'
1088 .  tm doc-page-number-count == \n[doc-page-number-count]
1089 .  tm doc-page-number-string == `\*[doc-page-number-string]'
1090 .  tm doc-corporate-count == \n[doc-corporate-count]
1091 .  tm doc-corporate-name == `\*[doc-corporate-name]'
1092 .  tm doc-report-count == \n[doc-report-count]
1093 .  tm doc-report-name == `\*[doc-report-name]'
1094 .  tm doc-reference-title-count == \n[doc-reference-title-count]
1095 .  tm doc-reference-title-name == `\*[doc-reference-title-name]'
1096 .  tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]'
1097 .  tm doc-volume-count == \n[doc-volume-count]
1098 .  tm doc-volume-name == `\*[doc-volume-name]'
1099 .  tm doc-have-author == \n[doc-have-author]
1101 .  tm doc-document-title == `\*[doc-document-title]'
1102 .  tm doc-volume == `\*[doc-volume]'
1103 .  tm doc-section == `\*[doc-section]'
1104 .  tm doc-operating-system == `\*[doc-operating-system]'
1105 .  tm doc-date-string == `\*[doc-date-string]'
1106 .  tm doc-header-space == \n[doc-header-space]
1107 .  tm doc-footer-space == \n[doc-footer-space]
1108 .  tm doc-display-vertical == \n[doc-display-vertical]
1109 .  tm doc-header-string == `\*[doc-header-string]'
1110 .  tm doc-in-synopsis-section == \n[doc-in-synopsis-section]
1111 .  tm doc-in-library-section == \n[doc-in-library-section]
1112 .  tm doc-in-see-also-section == \n[doc-in-see-also-section]
1113 .  tm doc-in-files-section == \n[doc-in-files-section]
1114 .  tm doc-in-authors-section == \n[doc-in-authors-section]
1116 .  tm END OF GLOBAL REGISTER DUMP
1122 .\" EOF