Merge branch 'vendor/TNFTP'
[dragonfly.git] / contrib / groff / tmac / an-old.tmac
1 .\" an-old.tmac
2 .\"
3 .\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005,
4 .\"               2007, 2008, 2009
5 .\"   Free Software Foundation, Inc.
6 .\"      Written by James Clark (jjc@jclark.com)
7 .\"
8 .\" This file is part of groff.
9 .\"
10 .\" groff is free software; you can redistribute it and/or modify it under
11 .\" the terms of the GNU General Public License as published by the Free
12 .\" Software Foundation, either version 3 of the License, or
13 .\" (at your option) any later version.
14 .\"
15 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 .\" for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public License
21 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
22 .\"
23 .\"  -rcR=1 => Create a single, very long page instead of multiple pages.
24 .\"            Useful for online display.  Default in nroff mode.
25 .\"            Desactivate with -rcR=0.
26 .\"  -rC1 => Number pages continuously, rather than start each at 1.
27 .\"  -rD1 => Double-sided printing, ie different odd and even page footers.
28 .\"  -rPnnn => Number first page nnn.
29 .\"  -rSxx => Use size `xx'pt (either 10, 11, or 12) for document rather
30 .\"           than the default size of 10pt.
31 .\"  -rXnnn => Number pages after nnn as nnna, nnnb, nnnc, ...
32 .\"
33 .\" The file man.local is loaded at the end.  Put local additions there.
34 .\" If you need to add things to TH, use `.am1 TH'.
35 .\"
36 .
37 .if !\n(.g .ab These man macros work only with groff.
38 .
39 .do if d RI .nx
40 .
41 .do mso devtag.tmac
42 .
43 .nr _C \n(.C
44 .cp 0
45 .
46 .if (\n[.x]\n[.y] < 118) \
47 .  ab You need GNU troff version 1.18 or higher to run this version of man!
48 .
49 .if !r D .nr D 0
50 .if !r C .nr C 0
51 .if !r S .nr S 10
52 .\" we must use consecutive page numbers when using postscript to generate
53 .\" html images, and we must not reset the page number at the beginning
54 .\" (the `ps4html' register is automatically added to the command line by
55 .\" the pre-html preprocessor)
56 .if !r ps4html \
57 .  if r P .pn 0\n[P]
58 .if !r cR \{\
59 .  ie n .nr cR 1
60 .  el   .nr cR 0
61 .\}
62 .
63 .nr need_eo_h 0
64 .nr need_col2 0
65 .
66 .\" set up the line length...
67 .\" giving precedence to any prior assignment to the \n[LL] register.
68 .if !r LL \{\
69 .
70 .  \" but if that isn't predefined...
71 .  \" then try to respect any prior `.ll' request.
72 .  nr LL \n[.l]
73 .
74 .  \" For troff, this is sufficient to give us a default line length of
75 .  \" 6.5i, but for nroff, we prefer a default of 78n to nroff's default
76 .  \" 65n.  This has the unfortunate side effect that we will override a
77 .  \" user's `.ll 65n' request, with our preferred 78n default; we can't
78 .  \" possibly know that the 65n came from a `.ll' request, and MUST
79 .  \" assume that it was set by nroff, as its built-in default!  If the
80 .  \" user wants to force this setting, then he MUST use the `-rLL=65n'
81 .  \" option, or an equivalent `.nr LL 65n' request.
82 .  if n \
83 .    if (\n[LL] = 65n) \
84 .      nr LL 78n
85 .\}
86 .
87 .if !r LT \
88 .  nr LT \n[LL]
89 .
90 .nr FT (-.5i)
91 .
92 .\" Default heading font
93 .ds HF B\"
94 .
95 .nr an-first 1
96 .
97 .nr an-html 0
98 .if '\*[.T]'html' .nr an-html 1
99 .if \n[an-html] .nr C 1
100 .if r ps4html .nr C 1
101 .
102 .\" we redefine .ne to avoid page breaks if cR is set; instead, the page
103 .\" length is increased to the necessary amount (this is needed for tables)
104 .\"
105 .\" similarly, we redefine .bp if cR is set, adjusting the page length to
106 .\" the current position so that no empty lines are inserted
107 .if \n[cR] \{\
108 .  de1 ne
109 .    ie \\n[.$] \
110 .      nr an-ne (v;\\$*)
111 .    el \
112 .      nr an-ne 1v
113 .    if (\\n[an-ne] >= \\n[.t]) \
114 .      pl +(\\n[an-ne]u - \\n[.t]u + 1v)
115 .  .
116 .
117 .  rn bp an-bp
118 .  de1 bp
119 .    br
120 .    pl \\n[nl]u
121 .    an-bp \\$*
122 .  .
123 .\}
124 .
125 .de set-an-margin
126 .  nr an-margin \\n[IN]
127 ..
128 .
129 .ds an-extra1
130 .ds an-extra2
131 .ds an-extra3
132 .
133 .\" .TH title section extra1 extra2 extra3
134 .de1 TH
135 .  if \\n[an-html] \{\
136 .    DEVTAG-TL
137 .    nop \\$1
138 .    DEVTAG-EO-TL
139 .  \}
140 .
141 .  de an-init \" We have to do it like this to get multiple man pages right.
142 .    ds an-title "\\$1\"
143 .    ds an-section "\\$2\"
144 .    ds an-extra1 "\\$3\"
145 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4\"
146 .    el               .ds an-extra2 \"Sun Release 4.0
147 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
148 .    el               .ds an-extra3 \"System Programmer's Manual
149 .    ds an-init
150 \\..
151 .
152 .  DT
153 .
154 .  nr PS    10z \" default point size
155 .  nr PS-SS 10z
156 .  nr PS-SH 10.95z
157 .  nr VS    12p
158 .
159 .  \" use sizes similar to LaTeX
160 .  if t \{\
161 .    ie (\\n[S] == 11) \{\
162 .      nr PS    10.95z
163 .      nr PS-SS 10.95z
164 .      nr PS-SH 12z
165 .      nr VS    13.6p
166 .    \}
167 .    el \{\
168 .      if (\\n[S] == 12) \{\
169 .        nr PS    12z
170 .        nr PS-SS 12z
171 .        nr PS-SH 14.4z
172 .        nr VS    14.5p
173 .      \}
174 .    \}
175 .  \}
176 .
177 .  ps \\n[PS]u
178 .  vs \\n[VS]u
179 .  ll \\n[LL]u
180 .
181 .\" We must select an integer indentation value for nroff;
182 .\" see comment in an-do-tag.
183 .  if !r IN \{\
184 .    ie t .nr IN 7.2n
185 .    el   .nr IN 7n
186 .  \}
187 .  PD
188 .  if !r SN \
189 .    nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
190 .  nr an-level 1
191 .  set-an-margin
192 .  nr an-prevailing-indent \\n[IN]
193 .  nr an-tag-sep 1n
194 .
195 .  nr an-no-space-flag 0
196 .  nr an-break-flag 0
197 .  nr an-div? 0
198 .
199 .  ie \\n[cR] \
200 .    an-header
201 .  el \{\
202 .    wh 0 an-header
203 .    wh -1i an-footer
204 .    wh \\n[FT]u an-p-footer
205 .
206 .    if \\n[nl] \{\
207 .      ie \\n[C] .bp (\\n[%] + 1)
208 .      el        .bp 1
209 .    \}
210 .  \}
211 ..
212 .
213 .\" BSD compatibility macros: .AT and .UC
214 .
215 .de1 AT
216 .  ds an-extra2 "7th Edition\"
217 .  if "\\$1"3" .ds an-extra2 "7th Edition\"
218 .  if "\\$1"4" .ds an-extra2 "System III\"
219 .  if "\\$1"5" \{\
220 .    ie "\\$2"" .ds an-extra2 "System V\"
221 .    el .ds an-extra2 "System V Release \\$2\"
222 .  \}
223 ..
224 .
225 .de1 UC
226 .  ds an-extra2 "3rd Berkeley Distribution\"
227 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution\"
228 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution\"
229 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution\"
230 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution\"
231 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution\"
232 ..
233 .
234 .de1 DT
235 .  ta T .5i \" This sets tabs every .5 inches
236 ..
237 .
238 .de1 PD
239 .  ie \\n[.$] .nr PD (v;\\$1)
240 .  el         .nr PD (.4v >? \n[.V])
241 ..
242 .
243 .\" Redefine these to customize the header & footer
244 .
245 .de1 PT
246 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
247 ..
248 .
249 .de1 BT
250 .  if r ps4html \
251 .    return
252 .  ie \\n[D] \{\
253 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
254 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
255 .  \}
256 .  el \
257 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
258 ..
259 .
260 .de1 an-header
261 .  an-init
262 .  if \\n[cR] \{\
263 .    ie \\n[an-first] \
264 .      nr an-first 0
265 .    el \
266 .      sp .5i
267 .  \}
268 .  ev an-1
269 .  ps \\n[PS]u
270 .  vs \\n[VS]u
271 .  lt \\n[LT]u
272 .  ie \\n[an-html] \
273 .    tl ''''
274 .  el \{\
275 .    if !\\n[cR] \
276 .      sp .5i
277 .    PT
278 .    ie !\\n[cR] \
279 .      sp |1i
280 .    el \
281 .      sp .5i
282 .  \}
283 .  ev
284 .  ns
285 ..
286 .
287 .de1 an-footer
288 '  bp
289 ..
290 .
291 .af an-page-letter a
292 .
293 .de1 an-p-footer
294 .  ev an-1
295 .  ps \\n[PS]u
296 .  vs \\n[VS]u
297 .  lt \\n[LT]u
298 .  ie \\n[an-html] \{\
299 .    ds an-page-string
300 .    ds an-extra1
301 .    ds an-extra2
302 .  \}
303 .  el \{\
304 .    ie r X \{\
305 .      if (\\n[%] > \\n[X]) \{\
306 .        nr an-page-letter (\\n[%] - \\n[X])
307 .        ds an-page-string \\n[X]\\n[an-page-letter]\"
308 .      \}
309 .    \}
310 .    el \{\
311 .      ie \\n[cR] \
312 .        ds an-page-string "\\*[an-title](\\*[an-section])\"
313 .      el \
314 .        ds an-page-string \\n[%]\"
315 .    \}
316 .  \}
317 .  BT
318 .  ev
319 ..
320 .
321 .de1 an-end
322 .  nr % 1
323 .  pl +4v
324 .  fl
325 .  sp 3
326 .  an-p-footer
327 .  pl \\n[nl]u
328 ..
329 .
330 .if \n[cR] .em an-end
331 .
332 .de1 SH
333 .  sp \\n[PD]u
334 .  nr an-level 1
335 .  set-an-margin
336 .  nr an-prevailing-indent \\n[IN]
337 .  fi
338 .  in \\n[an-margin]u
339 .  ti 0
340 .  nr need_eo_h 1
341 .  DEVTAG-NH \\n[an-level]
342 .  it 1 an-trap
343 .  nr an-no-space-flag 1
344 .  nr an-break-flag 1
345 .  ps \\n[PS-SH]u
346 .  ft \\*[HF]
347 .  ne (2v + 1u)
348 .  if \\n[.$] \&\\$*
349 ..
350 .
351 .de1 SS
352 .  sp \\n[PD]u
353 .  nr an-level 1
354 .  set-an-margin
355 .  nr an-prevailing-indent \\n[IN]
356 .  fi
357 .  in \\n[IN]u
358 .  ti \\n[SN]u
359 .  it 1 an-trap
360 .  nr an-no-space-flag 1
361 .  nr an-break-flag 1
362 .  ps \\n[PS-SS]u
363 .  ft \\*[HF]
364 .  ne (2v + 1u)
365 .  if \\n[.$] \&\\$*
366 ..
367 .
368 .de1 B
369 .  it 1 an-trap
370 .  ft B
371 .  if \\n[.$] \&\\$*
372 ..
373 .
374 .de1 I
375 .  it 1 an-trap
376 .  ft I
377 .  if \\n[.$] \,\\$*\/
378 ..
379 .
380 .de1 SM
381 .  it 1 an-trap
382 .  ps -1
383 .  if \\n[.$] \&\\$*
384 ..
385 .
386 .de1 SB
387 .  it 1 an-trap
388 .  ps -1
389 .  ft B
390 .  if \\n[.$] \&\\$*
391 ..
392 .
393 .de1 TP
394 .  sp \\n[PD]u
395 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
396 .  it 1 an-trap
397 .  in 0
398 .  ll -\\n[an-margin]u
399 .  if !\\n[an-div?] .di an-div
400 .  nr an-div? 1
401 ..
402 .
403 .de1 an-trap
404 .  if \\n[need_eo_h]>0 .DEVTAG-EO-H
405 .  nr need_eo_h 0
406 .  if \\n[need_col2]>0 .DEVTAG-COL 2
407 .  nr need_col2 0
408 .  ft R
409 .  ps \\n[PS]u
410 .  vs \\n[VS]u
411 .  if \\n[an-break-flag] \{\
412 .    br
413 .    nr an-break-flag 0
414 .  \}
415 .  if \\n[an-no-space-flag] \{\
416 .    ns
417 .    nr an-no-space-flag 0
418 .  \}
419 .  if \\n[an-div?] .an-do-tag
420 ..
421 .
422 .de an-do-tag
423 .  br
424 .  di
425 .  nr an-div? 0
426 .  ll
427 .  \" We must emit the diversion in a separate environment to
428 .  \" assure that a possible margin character is printed correctly.
429 .  ev an-2
430 .  evc 0
431 .  mc
432 .  nf
433 .  in \\n[an-margin]u
434 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
435 .    ne (2v + 1u)
436 .    an-div
437 .    ev
438 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
439 .  \}
440 .  el \{\
441 .    \" In nroff mode, the indentation value should be an integer multiple
442 .    \" of the character cell, to avoid different results compared to the
443 .    \" the .ie part above.
444 .    ne (1v + 1u)
445 .    DEVTAG-COL 1
446 .    an-div
447 .    sp -1
448 .    ev
449 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
450 .    DEVTAG-COL-NEXT 2
451 .  \}
452 ..
453 .
454 .de1 LP
455 .  sp \\n[PD]u
456 .  ps \\n[PS]u
457 .  vs \\n[VS]u
458 .  ft R
459 .  in \\n[an-margin]u
460 .  nr an-prevailing-indent \\n[IN]
461 .  ns
462 ..
463 .
464 .als PP LP
465 .als P LP
466 .
467 .de1 IP
468 .  ie !\\n[.$] \{\
469 .    ps \\n[PS]u
470 .    vs \\n[VS]u
471 .    ft R
472 .    sp \\n[PD]u
473 .    ne (1v + 1u)
474 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
475 .    ns
476 .  \}
477 .  el \{\
478 .    ie (\\n[.$] - 1) .TP "\\$2"
479 .    el               .TP
480 \&\\$1
481 .  \}
482 ..
483 .
484 .de1 HP
485 .  ps \\n[PS]u
486 .  vs \\n[VS]u
487 .  ft R
488 .  sp \\n[PD]u
489 .  ne (1v + 1u)
490 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
491 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
492 .  ti \\n[an-margin]u
493 .  DEVTAG-COL 1
494 .  nr need_col2 1
495 .  ns
496 ..
497 .
498 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
499 .
500 .de1 RI
501 .  if \\n[.$] \{\
502 .    ds an-result \&\f[R]\\$1\"
503 .    shift
504 .    while (\\n[.$] >= 2) \{\
505 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]\"
506 .      shift 2
507 .    \}
508 .    if \\n[.$] .as an-result \,\f[I]\\$1\"
509 \\*[an-result]
510 .    ft R
511 .  \}
512 ..
513 .
514 .de1 IR
515 .  if \\n[.$] \{\
516 .    ds an-result \&\f[I]\\$1\f[R]\"
517 .    shift
518 .    while (\\n[.$] >= 2) \{\
519 .      as an-result \/\\$1\f[I]\,\\$2\f[R]\"
520 .      shift 2
521 .    \}
522 .    if \\n[.$] .as an-result \/\\$1\"
523 \\*[an-result]
524 .    ft R
525 .  \}
526 ..
527 .
528 .de1 IB
529 .  if \\n[.$] \{\
530 .    ds an-result \&\f[I]\\$1\"
531 .    shift
532 .    while (\\n[.$] >= 2) \{\
533 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]\"
534 .      shift 2
535 .    \}
536 .    if \\n[.$] .as an-result \/\f[B]\\$1\"
537 \\*[an-result]
538 .    ft R
539 .  \}
540 ..
541 .
542 .de1 BI
543 .  if \\n[.$] \{\
544 .    ds an-result \&\f[B]\\$1\"
545 .    shift
546 .    while (\\n[.$] >= 2) \{\
547 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]\"
548 .      shift 2
549 .    \}
550 .    if \\n[.$] .as an-result \,\f[I]\\$1\"
551 \\*[an-result]
552 .    ft R
553 .  \}
554 ..
555 .
556 .de1 RB
557 .  ds an-result \&\"
558 .  while (\\n[.$] >= 2) \{\
559 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]\"
560 .    shift 2
561 .  \}
562 .  if \\n[.$] .as an-result \f[R]\\$1\"
563 \\*[an-result]
564 .  ft R
565 ..
566 .
567 .de1 BR
568 .  ds an-result \&\"
569 .  while (\\n[.$] >= 2) \{\
570 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]\"
571 .    shift 2
572 .  \}
573 .  if \\n[.$] .as an-result \f[B]\\$1\"
574 \\*[an-result]
575 .  ft R
576 ..
577 .
578 .de1 RS
579 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
580 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
581 .  ie \\n[.$] .nr an-margin +(n;\\$1)
582 .  el         .nr an-margin +\\n[an-prevailing-indent]
583 .  in \\n[an-margin]u
584 .  nr an-prevailing-indent \\n[IN]
585 .  nr an-level +1
586 ..
587 .
588 .de1 RE
589 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
590 .  el         .nr an-level -1
591 .  nr an-level (1 >? \\n[an-level])
592 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
593 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
594 .  in \\n[an-margin]u
595 ..
596 .
597 .\" table support
598 .
599 .de1 TS
600 .  sp \\n[PD]u
601 .  if \\n[an-html] \{\
602 .    nr an-TS-ll \\n[.l]
603 .    ll 1000n
604 .  \}
605 .  HTML-IMAGE
606 ..
607 .
608 .de1 T&
609 ..
610 .
611 .de1 TE
612 .  HTML-IMAGE-END
613 .  if \\n[an-html] \
614 .    ll \\n[an-TS-ll]u
615 ..
616 .
617 .\" dummy equation delimiters
618 .de1 EQ
619 .  if \\n[an-html] \{\
620 .    nr an-EQ-ll \\n[.l]
621 .    ll 1000n
622 .  \}
623 .  HTML-IMAGE
624 ..
625 .de1 EN
626 .  HTML-IMAGE-END
627 .  if \\n[an-html] \
628 .    ll \\n[an-EQ-ll]u
629 ..
630 .
631 .de1 R
632 \c
633 .  ie \\n[.$] \{\
634 .    tm `R' is a string (producing the registered sign), not a macro.
635 .    nop \\$*
636 .  \}
637 .  el \{\
638 .    ie c\[rg] \
639 .      nop \[rg]\c
640 .    el \
641 .      nop (Reg.)\c
642 .  \}
643 ..
644 .
645 .\" these strings must work in compatibility mode also
646 .
647 .ds S \s'\\n(PSu'\"
648 .ie c\[tm] .ds Tm \(tm\"
649 .el        .ds Tm (TM)\"
650 .ds lq \(lq\"
651 .ds rq \(rq\"
652 .
653 .if !\n[an-html] \{\
654 .  if !rHY \{\
655 .    ie \n[cR] \
656 .      nr HY 12
657 .    el \
658 .      nr HY 14
659 .  \}
660 .  hy \n[HY]
661 .\}
662 .
663 .\" For UTF-8, map some characters conservatively for the sake
664 .\" of easy cut and paste.
665 .
666 .if '\*[.T]'utf8' \{\
667 .  rchar \- - ' `
668 .
669 .  char \- \N'45'
670 .  char  - \N'45'
671 .  char  ' \N'39'
672 .  char  ` \N'96'
673 .\}
674 .
675 .\" Load man macro extensions.
676 .mso an-ext.tmac
677 .
678 .\" Load local modifications.
679 .mso man.local
680 .
681 .cp \n[_C]
682 .
683 .\" end of an-old.tmac