Imported Upstream version 1.22.3
[platform/upstream/groff.git] / tmac / doc-old.tmac
1 .\" -*- nroff -*-
2 .\"
3 .\" Copyright (c) 1990 The Regents of the University of California.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. [Deleted.  See
15 .\"     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
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-old.tmac        5.2 (Berkeley) 3/13/91
33 .\"     Slightly modified by jjc@jclark.com to work with groff as well.
34 .\"
35 .\" Assume nroff on crt's only if cR==1
36 .if n .nr cR 1
37 .\"     STRING CONSTANTS
38 .\"     DITROFF
39 .if t \{\
40 .\"     Address Style
41 .ds aD \fI
42 .\"     Argument Reference Style
43 .ds aR \f(CO
44 .\"     Interactive Command Modifier (flag)
45 .ds cM \f(CB
46 .\"     Emphasis (in the English sense - usually italics)
47 .ds eM \fI
48 .\"     Errno Style
49 .ds eR \fC
50 .\"     Environment Variable Style
51 .ds eV \fC
52 .\"     Command Line Flag Style
53 .ds fL \f(CB
54 .\"     Header String Style
55 .ds Hs \fR
56 .\"     Interactive Command Style
57 .ds iC \f(CB
58 .\"     Literal Style
59 .ds lI \fC
60 .\"     Left Parenthesis Style
61 .ds lP \fR\|(\|\fP
62 .\"     Right Parenthesis Style
63 .ds rP \fR\|)\|\fP
64 .\"     Options Open Bracket Style
65 .ds lB \fR\^[\^\fP
66 .\"     Options Open Bracket Style
67 .ds rB \fR\^]\fP
68 .\"     Name (subject of manpage) Style
69 .ds nM \f(CB
70 .\"     Pathname Style
71 .ds pA \fC
72 .\"     Accepted punctuation string for -mdoc syntax
73 .ds Pu \fR[.,:;(\^)[\^]\fR]
74 .\"     Section Header Style
75 .ds Sp \s12\fB
76 .\" .ds sT \s-2\fR
77 .\"     Symbolic Emphasis (boldface)
78 .ds sY \f(CB
79 .\"     Generic Variable Style
80 .ds vA \fI
81 .\"     Volume Title Style
82 .ds Vs \fR
83 .\"     Cross Reference STyle (man page only)
84 .ds xR \fC
85 .\"     Math *
86 .tr *\(**
87 .\}
88 .\"     NROFF
89 .if n \{\
90 .\"     Address Style
91 .ds aD \fI
92 .\"     Argument Reference Style
93 .ds aR \fI
94 .\"     Interactive Command Modifier (flag)
95 .ds cM \fB
96 .\"     Emphasis (in the English sense - usually italics)
97 .ds eM \fI
98 .\"     Errno Style
99 .ds eR \fR
100 .\"     Environment Variable Style
101 .ds eV \fR
102 .\"     Command Line Flag Style
103 .ds fL \fB
104 .\"     Header String Style
105 .ds Hs \fR
106 .\"     Interactive Command Style
107 .ds iC \fB
108 .\"     Literal Style
109 .ds lI \fR
110 .\"     Left Parenthesis Style
111 .ds lP \fR\|(\fP
112 .\"     Right Parenthesis Style
113 .ds rP \fR\|)\fP
114 .\"     Options Open Bracket Style
115 .ds lB \fR\|[\|\fP
116 .\"     Options Open Bracket Style
117 .ds rB \fR\|]\fP
118 .\"     Name (subject of manpage) Style
119 .ds nM \fB
120 .\"     Pathname Style
121 .ds pA \fI
122 .\"     Accepted punctuation string for -mdoc syntax
123 .ds Pu [.,;:()[]]
124 .\"     Section Header Style
125 .ds Sp \s12\fB
126 .\"     .ds sT \s-2\fR
127 .\" .ds sT \s-2\fR
128 .\"     Symbol, Mode or Mask Style
129 .ds sY \fB
130 .\"     Generic Variable Style
131 .ds vA \fI
132 .\"     Volume Title Style
133 .ds Vs \fR
134 .\"     Cross Reference Style (man page only)
135 .ds xR \fR
136 .\}
137 .\"     INDENTS - Subheaders(sI), Text(Ti) between Section Headers and Subsects
138 .if t \{\
139 .       nr sI \w'\fC,'u*5
140 .       nr Ti \n(sIu
141 .\}
142 .if n \{\
143 .       nr sI .5i
144 .       nr Ti .5i
145 .\}
146 .\"     Flags for macros names which are used only for .Ds
147 .nr dI 6n
148 .nr dC 1
149 .nr dL 1
150 .nr dR 1
151 .\"     INDENT WIDTHS (for Lists)
152 .\"     Width Needed for Address Tag (indented amount)
153 .nr Ad 12n
154 .\"     Angle Quote Width
155 .nr Aq 12n
156 .\"     Width Needed for Argument
157 .nr Ar 12n
158 .\"     Width Needed for Column offset
159 .nr Cl 15n
160 .\"     Width neeeded for Interactive Command Modifier
161 .nr Cm 10n
162 .\"     Width Needed for Complex Expressions
163 .nr Cx 20n
164 .\"     Indent Width Needed for Display (right and left margins)
165 .nr Ds 6n
166 .\"     Double Quote Width
167 .nr Dq 12n
168 .\"     tI is dependent on Ds and used by .Dp
169 .nr tI \n(Dsu
170 .\"     Width Needed for Display
171 .nr Em 10n
172 .\"     Width Needed for Errno Types
173 .nr Er 15n
174 .\"     Width Needed for Environment Variables
175 .nr Ev 15n
176 .\"     Width Needed for Example Indent
177 .nr Ex 10n
178 .\"     Width Needed for Flag
179 .nr Fl 10n
180 .\"     Width Needed for Function
181 .nr Fn 16n
182 .\"     Width neeeded for Interactive Command Name
183 .nr Ic 10n
184 .\"     Width Needed for Constant
185 .nr Li 16n
186 .\"     Width Needed for Math Symbol ? not sure if needed
187 .nr Ms 6n
188 .\"     Width Needed for Name
189 .nr Nm 10n
190 .\"     Width Needed for Option Begin
191 .nr Ob 14n
192 .\"     Width Needed for Option End
193 .nr Oe 14n
194 .\"     Width Needed for Option (one line)
195 .nr Op 14n
196 .\"     Width Needed for Pathname
197 .nr Pa 32n
198 .\"     Parenthesis Quote Width
199 .nr Pq 12n
200 .\"     Single Quote Width
201 .nr Sq 12n
202 .\"     Width Needed for Symbols, Modes or Masks
203 .nr Sy 6n
204 .\"     Width needed for default or unknown text width
205 .nr Tx 22n
206 .\"     Width Needed for Generic Variable
207 .nr Va 12n
208 .\"     Width Needed for Cross Reference, should the cross ref be annotated.
209 .nr Xr 10n
210 .\" PARAGRAPH SPACE
211 .if t \{\
212 .       nr Pp .5v
213 .\}
214 .if n \{\
215 .       nr Pp 1v
216 .\}
217 .\"     PAGE LAYOUT
218 .\" .Li Tagged Paragraph Style - zero if break on oversized tag
219 .\" one if add em space and continue filling line.
220 .nr tP 0
221 .\" Page Layout Macro
222 .de pL
223 .\"     DITROFF
224 .ie t \{\
225 .\" Header Margin
226 .       nr Hm .5i
227 .\" Footer Margin
228 .       nr Fm .5i
229 .\" Line length
230 .       nr ll 5.5i
231 .\" Line length
232 .       ll 5.5i
233 .\" Title length
234 .       nr lt 5.5i
235 .\" Title length
236 .       lt 5.5i
237 .\" Page offset
238 .       nr po 1.56i
239 .\" Page offset
240 .       po 1.56i
241 .\" Vertical space distance (from Section headers/Lists/Subsections)
242 .       nr vV .5v
243 .\" em space
244 .       ds tP \|\|\|\|\|\|
245 .\}
246 .el \{\
247 .\" Line length
248 .       nr ll 78n
249 .       ll 78n
250 .\" Title length
251 .       nr lt 78n
252 .\" Title length
253 .       lt 78n
254 .\" Page offset
255 .       nr po 0i
256 .\" Page offset
257 .       po 0i
258 .\" Vertical space distance (from Section headers/Lists/Subsections)
259 .       nr vV 1v
260 .\" em space
261 .       ds tP \0\0
262 .\" Test for crt
263 .       ie \\n(cR .nr Hm 0
264 .       el .nr Hm .5i
265 .\" Footer Margin
266 .       nr Fm .5i
267 .\}
268 ..
269 .\" Adjustment mode
270 .if n \{\
271 .ad l
272 .na
273 ..
274 .\}
275 .\" PREDEFINED STRINGS
276 .if t \{\
277 .       ds <= \(<=
278 .       ds >= \(>=
279 .       ds Lq \&``
280 .       ds Rq \&''
281 .       ds ua \(ua
282 .       ds aa \(aa
283 .       ds ga \(ga
284 .       ds sR \(aa
285 .       ds sL \(ga
286 .\}
287 .if n \{\
288 .       ds <= \&<\&=
289 .       ds >= \&>\&=
290 .       ds Rq ''
291 .       ds Lq ``
292 .       ds ua ^
293 .       ds aa '
294 .       ds ga `
295 .       ds sL `
296 .       ds sR '
297 .\}
298 .\" Note: The distances from the bottom or top of the page are set
299 .\" in headers (macro .hK): to -1.25 for troff, and -1.167 for nroff
300 .\" bottoms, and top is 0.
301 .\"
302 .\"     .Dt Document/manpage_title section/chapter volume
303 .\"             The \{ and \} is necessary as roff doesn't nest if-elses
304 .\"             properly, especially with .ds.
305 .\"     TODO: separate Dt into Dt, Ch and Vt for supp docs.
306 .de Dt
307 .ds dT UNTITLED
308 .ds vT Local
309 .ds cH Null
310 .\"     Volume and Section Number or Chapter Number
311 .if !"\\$1"" .ds dT \\$1
312 .if !"\\$2"" \{\
313 .       ds cH \\$2
314 .       if "\\$3"" \{\
315 .               \" Volume Title if none given
316 .               if \\$2>=1 .if \\$2<=8 \{\
317 .                       ds vT UNIX Reference Manual
318 .                       if \\$2>1 .if \\$2<6 .ds vT UNIX Programmer's Manual
319 .                       if "\\$2"8" .ds vT UNIX System Manager's Manual
320 .               \}
321 .               if "\\$2"unass"  .ds vT DRAFT
322 .               if "\\$2"draft"  .ds vT DRAFT
323 .               if "\\$2"paper"  .ds vT Null
324 .       \}
325 .\}
326 .if !"\\$3"" \{\
327 .       \" Volume Title if given
328 .       if "\\$3"USD"   .ds vT UNIX User's Supplementary Documents
329 .       if "\\$3"PS1"   .ds vT UNIX Programmers's Supplementary Documents
330 .       if "\\$3"AMD"   .ds vT UNIX Ancestral Manual Documents
331 .       if "\\$3"SMM"   .ds vT UNIX System Manager's Manual
332 .       if "\\$3"URM"   .ds vT UNIX Reference Manual
333 .       if "\\$3"PRM"   .ds vT UNIX Programmers's Manual
334 .       if "\\$3"IND"   .ds vT UNIX Manual Master Index
335 .       if "\\$3"CON"   .ds vT UNIX Contributed Software Manual
336 .       if "\\$3"IMP"   .ds vT UNIX Implementation Notes
337 .       if "\\$3"HOW"   .ds vT UNIX How Pocket Manual
338 .       if "\\$3"LOCAL" .ds vT UNIX Local Manual
339 .       if "\\*(vT"Local" .ds vT \\$3
340 .\}
341 ..
342 .\"
343 .\"     .Os Operating System/Standard and Release or Version Number
344 .\"
345 .de Os
346 .ds oS Null
347 .if "\\$1"" \{\
348 .       ds oS \fIBSD Experimental\fP
349 .\" .   ds oS (\fIBag o' Bits\fP)
350 .\}
351 .if "\\$2"" \{\
352 .       ds o1 Non-Null
353 .\}
354 .if "\\$1"ATT"   \{\
355 .       ds oS AT&T
356 .       if "\\$2""    .as oS \0UNIX
357 .       if "\\$2"7th" .as oS \07th Edition
358 .       if "\\$2"7"   .as oS \07th Edition
359 .       if "\\$2"III" .as oS \0System III
360 .       if "\\$2"3"   .as oS \0System III
361 .       if "\\$2"V"   .as oS \0System V
362 .       if "\\$2"V.2" .as oS \0System V Release 2
363 .       if "\\$2"V.3" .as oS \0System V Release 3
364 .       if "\\$2"V.4" .as oS \0System V Release 4
365 .\}
366 .if "\\$1"BSD" \{\
367 .       if "\\$2"3"    .ds oS 3rd Berkeley Distribution
368 .       if "\\$2"4"    .ds oS 4th Berkeley Distribution
369 .       if "\\$2"4.1"  .ds oS 4.1 Berkeley Distribution
370 .       if "\\$2"4.2"  .ds oS 4.2 Berkeley Distribution
371 .       if "\\$2"4.3"  .ds oS 4.3 Berkeley Distribution
372 .       if "\\$2"4.3+" .ds oS 4.3+tahoe Berkeley Distribution
373 .\}
374 .if "\\*(oS"Null" .ds oS \\$1
375 .if "\\*(o1"Non-Null" .as oS \0\\$2
376 .rm o1
377 ..
378 .\"
379 .\" Standards
380 .\"
381 .\" .de St
382 .\" .ds sT Null
383 .\" .if "\\$1"POSIX" \{\
384 .\" .   ds sT IEEE Standard POSIX
385 .\" .   if \\$2 .as sT \0\\$2
386 .\" .\}
387 .\" .if "\\$1"ANSI" \{\
388 .\" .   ds sT ANSI Standard
389 .\" .   if \\$2 .as sT \0\\$2
390 .\" .\}
391 .\" .if "\\$1"ISO" \{\
392 .\" .   ds sT ISO Standard
393 .\" .   if \\$2 .as sT \0\\$2
394 .\" .\}
395 .\" .if "\\*(sT"Null" .ds sR \\$3
396 .\" ..
397 .\"
398 .\" .de Gp
399 .\" .ie !"\\$1"" .ds gP \&\\$1 \\$2 \\$3 \\$4 \\$5
400 .\" .el .ds gP Null
401 .\" ..
402 .\"
403 .\"
404 .de Dd
405 .nr aa 0
406 .ie \\n(.$>0 \{\
407 .       ie \\n(.$<4 \{\
408 .               ds dD \\$1 \\$2 \\$3
409 .       \}
410 .       el .tm Usage: .Dd Month Day, Year (e.g July 4, 1977).
411 .\}
412 .el \{\
413 .       ds dD Epoch
414 .\}
415 ..
416 .\"
417 .\"     House Keeping Macro - Make sense of dT, cH, vT, sT, gP and dS
418 .\"     TODO: Try to get else's for efficiency
419 .\"     TODO: GET RID OF .wh -1.167i (its in v7)
420 .\"
421 .\"
422 .de hK
423 .nr % 1
424 .ds hT \\*(dT
425 .if !"\\*(cH"Null" \{\
426 .       ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
427 .       el .as hT \\|(\\|\\*(cH\\|)
428 .\}
429 .if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
430 .if t \{\
431 .       wh 0 hM
432 .       wh -1.25i fM
433 .\}
434 .if n \{\
435 .       ie \\n(cR \{\
436 .               hM
437 .               wh -0v fM
438 .       \}
439 .       el \{\
440 .               wh 0 hM
441 .               wh -1.167i fM
442 .       \}
443 .\}
444 .if n \{\
445 .       if \\n(nl==0:\\n(nl==-1 'bp
446 .\}
447 .if t 'bp
448 .em lM
449 ..
450 .\"     Header Macro
451 .\"
452 .de hM
453 .ev 1
454 .pL
455 .if !\\n(cR 'sp \\n(Hmu
456 .tl @\\*(Hs\\*(hT\fP@\\*(Vs\\*(vT\fP@\\*(Hs\\*(hT\fP@
457 'sp \\n(Hmu
458 .ev
459 ..
460 .\"
461 .de fM
462 .ev 1
463 .pL
464 .if !\\n(cR \{\
465 '       sp \\n(Fmu
466 .       tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
467 '       bp
468 .\}
469 .if \\n(cR \{\
470 .\" .   tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
471 .\" '   bp
472 .\}
473 .ev
474 ..
475 .de lM
476 .fl
477 .if \\n(cR \{\
478 .       fM
479 .       pl \\n(nlu
480 .\}
481 ..
482 .de Pp
483 .sp \\n(Ppu
484 .ne 2
485 .ns
486 ..
487 .de Lp
488 .Pp
489 ..
490 .de LP
491 .tm Not a \-mdoc command: .LP
492 ..
493 .de PP
494 .tm Not a \-mdoc command: .PP
495 ..
496 .de pp
497 .tm Not a \-mdoc command: .pp
498 ..
499 .de Co
500 .tm Not a \-mdoc command: .Co
501 ..
502 .nr z. 1
503 .nr z, 1
504 .nr z: 1
505 .nr z; 1
506 .nr z) 1
507 .nr z( 1
508 .nr z[ 1
509 .nr z] 1
510 .\" This is disgusting, troff not parse if stmt properly
511 .nr z1 0
512 .nr z2 0
513 .nr z3 0
514 .nr z4 0
515 .nr z5 0
516 .nr z6 0
517 .nr z7 0
518 .nr z8 0
519 .nr z9 0
520 .nr z0 0
521 .nr z# 0
522 .\"
523 .de Ad
524 .ie \\n(.$==0 \{\
525 .       tm Usage: .Ad address [...] \\*(Pu
526 .\}
527 .el \{\
528 .       ds sV \\*(aD
529 .       nr cF \\n(.f
530 .       ie "\\*(iM"" .ds f1 \&\\*(sV
531 .       el .as f1 \&\\*(sV
532 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
533 .       ft \\n(cF
534 .\}
535 ..
536 .\"
537 .\" Command Line Argument Macro
538 .\"
539 .de Ar
540 .ie \\n(.$==0 \{\
541 .       ie !"\\*(iM"" .as f1 \&[\|\\*(aRfile\ ...\fP\|]
542 .       el \&[\|\\*(aRfile\ ...\fP\|]
543 .\}
544 .el \{\
545 .       ds sV \\*(aR
546 .       nr cF \\n(.f
547 .       ie "\\*(iM"" .ds f1 \&\\*(sV
548 .       el .as f1 \&\\*(sV
549 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
550 .       ft \\n(cF
551 .\}
552 ..
553 .\"
554 .de Em
555 .ie \\n(.$==0 \{\
556 .       tm Usage: .Em text ... \\*(Pu
557 .\}
558 .el \{\
559 .       ds sV \\*(eM
560 .       nr cF \\n(.f
561 .       ie "\\*(iM"" .ds f1 \&\\*(sV
562 .       el .as f1 \&\\*(sV
563 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
564 .       ft \\n(cF
565 .\}
566 ..
567 .\"
568 .de Er
569 .ie \\n(.$==0 \{\
570 .       tm Usage: .Er ERRNOTYPE ... \\*(Pu
571 .       \}
572 .el \{\
573 .       ds sV \\*(eR
574 .       nr cF \\n(.f
575 .       ie "\\*(iM"" .ds f1 \&\\*(sV
576 .       el .as f1 \&\\*(sV
577 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
578 .       ft \\n(cF
579 .\}
580 ..
581 .\"
582 .de Ev
583 .ie \\n(.$==0 \{\
584 .       tm Usage: .Ev ENVIRONMENT_VARIABLE(s) ... \\*(Pu
585 .       \}
586 .el \{\
587 .       ds sV \\*(eV
588 .       nr cF \\n(.f
589 .       ie "\\*(iM"" .ds f1 \&\\*(sV
590 .       el .as f1 \&\\*(sV
591 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
592 .       ft \\n(cF
593 .\}
594 ..
595 .\"
596 .\" Flag Name Macro
597 .\"
598 .de Fl
599 .ie \\n(.$==0 \{\
600 .       ie !"\\*(iM"" .as f1 \&\\*(fL\-\fP
601 .       el \&\\*(fL\-\fP
602 .\}
603 .el \{\
604 .       nr rZ 0
605 .       sW \\$1
606 .       if (\\n(sW==1&\\n(.$==1) .rZ \\$1
607 .       ds sV \\*(fL
608 .       nr cF \\n(.f
609 .       ie \\n(rZ \{\
610 .               ie "\\*(iM"" .ds f1 \&\\*(sV\-\f\\n(cF\\$1
611 .               el \&\\*(sV\-\f\\n(cF\\$1
612 .       \}
613 .       el \{\
614 .              ie "\\*(iM"" .ds f1 \&\\*(sV
615 .              el .as f1 \&\\*(sV
616 .              fB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
617 .              ft \\n(cF
618 .       \}
619 .\}
620 ..
621 .\"     Interactive Commands Macro
622 .\"
623 .de Ic
624 .ie \\n(.$==0 \{\
625 .       tm Usage: .Ic Interactive Commands(s) ... \\*(Pu
626 .\}
627 .el \{\
628 .       ds sV \\*(iC
629 .       nr cF \\n(.f
630 .       ie "\\*(iM"" .ds f1 \&\\*(sV
631 .       el .as f1 \&\\*(sV
632 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
633 .       ft \\n(cF
634 .\}
635 ..
636 .\"
637 .\" Interactive Command Modifiers (flags)
638 .\"
639 .de Cm
640 .ie \\n(.$==0 \{\
641 .       tm Usage: .Cm Interactive Command Modifier(s) ... \\*(Pu
642 .\}
643 .el \{\
644 .       ds sV \\*(cM
645 .       nr cF \\n(.f
646 .       ie "\\*(iM"" .ds f1 \&\\*(sV
647 .       el .as f1 \&\\*(sV
648 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
649 .       ft \\n(cF
650 .\}
651 ..
652 .\"
653 .de Li
654 .ie \\n(.$==0 \{\
655 .       tm Usage: .Li literal ... \\*(Pu
656 .       \}
657 .el \{\
658 .       ds sV \\*(lI
659 .       nr cF \\n(.f
660 .       ie "\\*(iM"" .ds f1 \&\\*(sV
661 .       el .as f1 \&\\*(sV
662 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
663 .       ft \\n(cF
664 .\}
665 ..
666 .\" If in nroff or any other case where the default font
667 .\" is constant width, and literal means zilch, single quote instead.
668 .ie n \{\
669 .de Ql
670 .       ie \\n(.$==0 \{\
671 .              tm Usage: .Ql literal ... \\*(Pu
672 .       \}
673 .       el \{\
674 .               Sq \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
675 .       \}
676 ..
677 .\}
678 .el \{\
679 .de Ql
680 .       ie \\n(.$==0 \{\
681 .              tm Usage: .Ql literal ... \\*(Pu
682 .       \}
683 .       el \{\
684 .               Li \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
685 .       \}
686 ..
687 .\}
688 .\"
689 .de Nm
690 .ie \\n(.$==0 \{\
691 .       if "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu
692 .       ie !"\\*(iM"" .as f1 \&\\*(nM\\*(n1\\$1\fP
693 .       el \&\\*(nM\\*(n1\\$1\fP
694 .\}
695 .el \{\
696 .       ds sV \\*(nM
697 .       nr cF \\n(.f
698 .       if \\n(nS \{\
699 .               rs
700 .               in -\\n(iSu
701 .               ie \\n(nS>1 .br
702 .               el \{\
703 .                       sW \\$1
704 .                       nr iS ((\\n(sW+1)*\\n(fW)u
705 .               \}
706 .               in +\\n(iSu
707 .               ti -\\n(iSu
708 .               nr nS \\n(nS+1
709 .       \}
710 .       if "\\*(n1"" .ds n1 \\$1
711 .       ie "\\*(iM"" .ds f1 \&\\*(sV
712 .       el .as f1 \&\\*(sV
713 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
714 .       ft \\n(cF
715 .\}
716 ..
717 .\"
718 .de Pa
719 .ie \\n(.$==0 \{\
720 \&\\*(pA~\fP
721 .\}
722 .el \{\
723 .       ds sV \\*(pA
724 .       nr cF \\n(.f
725 .       ie "\\*(iM"" .ds f1 \&\\*(sV
726 .       el .as f1 \&\\*(sV
727 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
728 .       ft \\n(cF
729 .\}
730 ..
731 .\"
732 .de Sy
733 .ie \\n(.$==0 \{\
734 .       tm Usage: .Sy Symbolic Text ... \\*(Pu
735 .       \}
736 .el \{\
737 .       ds sV \\*(sY
738 .       nr cF \\n(.f
739 .       ie "\\*(iM"" .ds f1 \&\\*(sV
740 .       el .as f1 \&\\*(sV
741 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
742 .       ft \\n(cF
743 .\}
744 ..
745 .\"
746 .de Ms
747 .ie \\n(.$==0 \{\
748 .       tm Usage: .Ms Math Symbol ... \\*(Pu
749 .       \}
750 .el \{\
751 .       ds sV \\*(sY
752 .       nr cF \\n(.f
753 .       ie "\\*(iM"" .ds f1 \&\\*(sV
754 .       el .as f1 \&\\*(sV
755 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
756 .       ft \\n(cF
757 .\}
758 ..
759 .\"
760 .de Va
761 .ie \\n(.$==0 \{\
762 .       tm Usage: .Va variable_name(s) ... \\*(Pu
763 .\}
764 .el \{\
765 .       ds sV \\*(vA
766 .       nr cF \\n(.f
767 .       ie "\\*(iM"" .ds f1 \&\\*(sV
768 .       el .as f1 \&\\*(sV
769 .       nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
770 .       ft \\n(cF
771 .\}
772 ..
773 .\"
774 .de nB
775 .hy 0
776 .if \\n(.$==0 .tm Usage error: called with empty arguments (empty quotes)?
777 .ie \\n(.$>1 \{\
778 .       rZ \\$1
779 .       ie \\n(rZ .as f1 \&\f\\n(cF\\$1\fP
780 .       el .as f1 \&\\$1
781 .       rZ \\$2
782 .       if !\\n(rZ \{\
783 .               ie !"\\*(iM""\{\
784 .\"                     I surrender
785 .                       if "\\*(iM"Tp" .as f1 \&\ \&
786 .                       if "\\*(iM"Dp" .as f1 \&\ \&
787 .                       if "\\*(iM"Op" .as f1 \&\ \&
788 .                       if "\\*(iM"Cx" .as f1 \&\ \&
789 .                       if "\\*(iM"Dq" .as f1 \& \&
790 .                       if "\\*(iM"Sq" .as f1 \& \&
791 .                       if "\\*(iM"Pq" .as f1 \& \&
792 .                       if "\\*(iM"Aq" .as f1 \& \&
793 .               \}
794 .               el .as f1 \& \&
795 .       \}
796 .       nB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
797 .\}
798 .el \{\
799 .       rZ \\$1
800 .       ie \\n(rZ .as f1 \&\f\\n(cF\\$1
801 .       el .as f1 \&\\$1\f\\n(cF
802 .       if "\\*(iM"" \{\&\\*(f1
803 .               ds f1
804 .       \}
805 .       hy
806 .\}
807 ..
808 .de fB
809 .hy 0
810 .if \\n(.$==0 .tm Usage error: called with empty arguments (empty quotes)?
811 .ie \\n(.$>1 \{\
812 .       rZ \\$1
813 .       ie \\n(rZ .as f1 \&\f\\n(cF\\$1\fP
814 .       el \{\
815 .               ie "\\$1"-" .as f1 \&\-\-
816 .               el .as f1 \&\-\\$1
817 .       \}
818 .       rZ \\$2
819 .       if !\\n(rZ \{\
820 .               ie !"\\*(iM""\{\
821 .\"                     I surrender
822 .                       if "\\*(iM"Tp" .as f1 \&\ \&
823 .                       if "\\*(iM"Dp" .as f1 \&\ \&
824 .                       if "\\*(iM"Op" .as f1 \&\ \&
825 .                       if "\\*(iM"Cx" .as f1 \&\ \&
826 .                       if "\\*(iM"Dq" .as f1 \& \&
827 .                       if "\\*(iM"Sq" .as f1 \& \&
828 .                       if "\\*(iM"Pq" .as f1 \& \&
829 .                       if "\\*(iM"Aq" .as f1 \& \&
830 .               \}
831 .               el .as f1 \& \&
832 .       \}
833 .       fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
834 .\}
835 .el \{\
836 .       rZ \\$1
837 .       ie \\n(rZ .as f1 \&\f\\n(cF\\$1
838 .       el \{\
839 .               ie "\\$1"-" .as f1 \&\-\-\f\\n(cF
840 .               el .as f1 \&\-\\$1\f\\n(cF
841 .       \}
842 .       if "\\*(iM"" \{\&\\*(f1
843 .               ds f1
844 .       \}
845 .       hy
846 .\}
847 ..
848 .\"
849 .\" Single quoted Items
850 .\" eF, sB g[0-9] and f2
851 .de Sq
852 .nr eF 0
853 .ie \\n(.$==0 \{\
854 .       ie "\\*(iM"" \&\\*(sL\&\\*sR
855 .       el .as f1 \&\\*(sL\&\\*(sR
856 .\}
857 .el \{\
858 .       ie "\\*(iM"" \{\
859 .               ds f1 \&\\*(sL
860 .               ds iM Sq
861 .       \}
862 .       el .as f1 \&\\*(sL
863 .       sB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
864 .       ie \\n(eF>0 .\\*(g1 \\*(g2 \\*(g3 \\*(g4 \\*(g5 \\*(g6 \\*(g7 \\*(g8
865 .       el .as f1 \\*(g0
866 .       as f1 \\*(sR
867 .       if !"\\*(f2"" .as f1 \\*(f2
868 .       if "\\*(iM"Sq" \{\
869 \&\\*(f1
870 .               ds f1
871 .               ds iM
872 .       \}
873 .       ds f2
874 .       rm  g0 g1 g2 g3 g4 g5 g6 g7 g8 g9
875 .       nr eF 0
876 .\}
877 ..
878 .\"
879 .\" Double quoted Items
880 .de Dq
881 .nr Ef 0
882 .ie \\n(.$==0 \{\
883 .       ie "\\*(iM"" \&\\*(Lq\&\\*(Rq
884 .       el .as f1 \&\\*(Lq\&\\*(Rq
885 .\}
886 .el \{\
887 .       ie "\\*(iM"" \{\
888 .               ds f1 \&\\*(Lq
889 .               ds iM Dq
890 .       \}
891 .       el .as f1 \&\\*(Lq
892 .       Sb \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
893 .       ie \\n(Ef>0 .\\*(k1 \\*(k2 \\*(k3 \\*(k4 \\*(k5 \\*(k6 \\*(k7 \\*(k8
894 .       el .as f1 \\*(k0
895 .       as f1 \\*(Rq
896 .       if !"\\*(f4"" .as f1 \\*(f4
897 .       if "\\*(iM"Dq" \{\
898 \&\\*(f1
899 .               ds f1
900 .               ds iM
901 .       \}
902 .       ds f4
903 .       rm  k0 k1 k2 k3 k4 k5 k6 k7 k8 k9
904 .       nr Ef 0
905 .\}
906 ..
907 .\"
908 .\" Parenthesis quoted Items
909 .de Pq
910 .nr pQ 0
911 .ie \\n(.$==0 \{\
912 .       ie "\\*(iM"" \&(\&)
913 .       el .as f1 \&(\&)
914 .\}
915 .el \{\
916 .       ie "\\*(iM"" \{\
917 .               ds f1 \&(
918 .               ds iM Pq
919 .       \}
920 .       el .as f1 \&(
921 .       pB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
922 .       ie \\n(pQ>0 .\\*(y1 \\*(y2 \\*(y3 \\*(y4 \\*(y5 \\*(y6 \\*(y7 \\*(y8
923 .       el .as f1 \\*(y0
924 .       as f1 \&)
925 .       if !"\\*(f3"" .as f1 \\*(f3
926 .       if "\\*(iM"Pq" \{\
927 \&\\*(f1
928 .               ds f1
929 .               ds iM
930 .       \}
931 .       ds f3
932 .       rm  y0 y1 y2 y3 y4 y5 y6 y7 y8 y9
933 .       nr pQ 0
934 .\}
935 ..
936 .\" eF, sB g[0-9] and f2
937 .de sB
938 .hy 0
939 .ie \\n(.$==0 .tm Sick Logic: macro sB
940 .el \{\
941 .       ie \\n(eF>=1 .nr eF \\n(eF+1
942 .       el \{\
943 .               mN \\$1
944 .               if \\n(mN .nr eF \\n(eF+1
945 .       \}
946 .       rZ \\$1
947 .       ie \\n(rZ .as f2 \\$1
948 .       el \{\
949 .               ie \\n(eF<1 .as g\\n(eF \\$1
950 .               el .as g\\n(eF \\$1
951 .       \}
952 .       if \\n(.$>1 \{\
953 .               rZ \\$2
954 .               if \\n(rZ==0 \{\
955 .                       if \\n(eF<1 \{\
956 .                               as g\\n(eF \& \&
957 .                       \}
958 .               \}
959 .               sB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
960 .       \}
961 .\}
962 ..
963 .de Sb
964 .hy 0
965 .ie \\n(.$==0 .tm Sick Logic: macro Sb
966 .el \{\
967 .       ie \\n(Ef>=1 .nr Ef \\n(Ef+1
968 .       el \{\
969 .               mN \\$1
970 .               if \\n(mN .nr Ef \\n(Ef+1
971 .       \}
972 .       rZ \\$1
973 .       ie \\n(rZ .as f4 \\$1
974 .       el \{\
975 .               ie \\n(Ef<1 .as k\\n(Ef \\$1
976 .               el .as k\\n(Ef \\$1
977 .       \}
978 .       if \\n(.$>1 \{\
979 .               rZ \\$2
980 .               if \\n(rZ==0 \{\
981 .                       if \\n(Ef<1 \{\
982 .                               as k\\n(Ef \& \&
983 .                       \}
984 .               \}
985 .               Sb \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
986 .       \}
987 .\}
988 ..
989 .de pB
990 .hy 0
991 .ie \\n(.$==0 .tm Sick Logic: macro pB
992 .el \{\
993 .       ie \\n(pQ>=1 .nr pQ \\n(pQ+1
994 .       el \{\
995 .               mN \\$1
996 .               if \\n(mN .nr pQ \\n(pQ+1
997 .       \}
998 .       rZ \\$1
999 .       ie \\n(rZ .as f3 \\$1
1000 .       el \{\
1001 .               ie \\n(pQ<1 .as y\\n(pQ \\$1
1002 .               el .as y\\n(pQ \\$1
1003 .       \}
1004 .       if \\n(.$>1 \{\
1005 .               rZ \\$2
1006 .               if \\n(rZ==0 \{\
1007 .                       if \\n(pQ<1 \{\
1008 .                               as y\\n(pQ \& \&
1009 .                       \}
1010 .               \}
1011 .               pB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1012 .       \}
1013 .\}
1014 ..
1015 .de aQ
1016 .hy 0
1017 .ie \\n(.$==0 .tm Bad Syntax: .Aq
1018 .el \{\
1019 .       ie \\n(aQ>=1 .nr aQ \\n(aQ+1
1020 .       el \{\
1021 .               mN \\$1
1022 .               if \\n(mN .nr aQ \\n(aQ+1
1023 .       \}
1024 .       rZ \\$1
1025 .       ie \\n(rZ .as aZ \\$1
1026 .       el \{\
1027 .               ie \\n(aQ<1 .as a\\n(aQ \\$1
1028 .               el .as a\\n(aQ \\$1
1029 .       \}
1030 .       if \\n(.$>1 \{\
1031 .               rZ \\$2
1032 .               if \\n(rZ==0 \{\
1033 .                       if \\n(aQ<1 \{\
1034 .                               as a\\n(aQ \& \&
1035 .                       \}
1036 .               \}
1037 .               aQ \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1038 .       \}
1039 .\}
1040 ..
1041 .\" Angle Bracket Quoted Items
1042 .de Aq
1043 .nr aQ 0
1044 .ie \\n(.$==0 \{\
1045 .       ie "\\*(iM"" \&<\&>
1046 .       el .as f1 \&<\&>
1047 .\}
1048 .el \{\
1049 .       ie "\\*(iM"" \{\
1050 .               ds f1 \&<
1051 .               ds iM Aq
1052 .       \}
1053 .       el .as f1 \&<
1054 .       aQ \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1055 .       ie \\n(aQ>0 .\\*(a1 \\*(a2 \\*(a3 \\*(a4 \\*(a5 \\*(a6 \\*(a7 \\*(a8
1056 .       el .as f1 \\*(a0
1057 .       as f1 \&>
1058 .       if !"\\*(aZ"" .as f1 \\*(aZ
1059 .       if "\\*(iM"Aq" \{\
1060 \&\\*(f1
1061 .               ds f1
1062 .               ds iM
1063 .       \}
1064 .       ds aZ
1065 .       rm  a0 a1 a2 a3 a4 a5 a6 a7 a8
1066 .       nr aQ 0
1067 .\}
1068 ..
1069 .\" macro Name test, return macro register value if true
1070 .if \n(.g .ig
1071 .de mN
1072 .nr mN 0
1073 .sW \\$1
1074 .if \\n(sW==2 \{\
1075 .       if \\n(\\$1 .nr mN \\n(\\$1
1076 .\}
1077 ..
1078 .if !\n(.g .ig
1079 .de mN
1080 .nr mN 0
1081 .if \A'\\$1' \{\
1082 .       sW \\$1
1083 .       if \\n(sW==2 \{\
1084 .               if \\n(\\$1 .nr mN \\n(\\$1
1085 .       \}
1086 .\}
1087 ..
1088 .\" Punctuation test (using z registers), return 1 if true
1089 .if \n(.g .ig
1090 .de rZ
1091 .nr rZ 0
1092 .sW \\$1
1093 .if \\n(sW==1 \{\
1094 .       if \\n(z\\$1==1 \{\
1095 .               nr rZ 1
1096 .       \}
1097 .\}
1098 ..
1099 .if !\n(.g .ig
1100 .de rZ
1101 .nr rZ 0
1102 .if \A'\\$1' \{\
1103 .       sW \\$1
1104 .       if \\n(sW==1 \{\
1105 .               if \\n(z\\$1==1 \{\
1106 .                       nr rZ 1
1107 .               \}
1108 .       \}
1109 .\}
1110 ..
1111 .\"
1112 .\" sW returns number of characters in a string
1113 .if t \{\
1114 .nr fW \w'\fC,'
1115 .de sW
1116 .nr sW \w'\fC\\$1'
1117 .\}
1118 .if n \{\
1119 .nr fW \w'0'
1120 .de sW
1121 .nr sW \w'\\$1'
1122 .\}
1123 .ie \\n(sW>=\\n(fW \{\
1124 .       ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
1125 .       el .nr sW \\n(sW/\\n(fW
1126 .\}
1127 .el .nr sW 0
1128 ..
1129 .\"     Option Expression -
1130 .\"     TODO - add line overflow check (right!)
1131 .nr eP 0
1132 .ds e1
1133 .nr oE 0
1134 .nr hP 0
1135 .ds hP
1136 .nr Ep 0
1137 .de Op
1138 .hy 0
1139 .if "\\*(iM"" \{\
1140 .       ds iM Op
1141 .       ds f1 \&
1142 .\}
1143 .as f1 \&\\*(lB
1144 .\" .tm Op:  \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1145 .dO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1146 .ie !"\\$1"Cx" .oE
1147 .el .nr oE \\n(oE+1
1148 ..
1149 .\"
1150 .\" just for mike, with every bite of garlic in mind (oops, i mean burp).
1151 .\" dO: go dOwn an argument vector and test each argument to see if
1152 .\" a macro name or punctuation. stash in respective place along
1153 .\" with its arguments.
1154 .nr oO 0
1155 .nr oP 0
1156 .nr aO 0
1157 .de dO
1158 .mN \\$1
1159 .ie \\n(mN \{\
1160 .       if \\n(oP  \{\
1161 .               if \\n(hP \{\
1162 .                       nr oZ 1
1163 .                       oZ
1164 .                       Oz
1165 .               \}
1166 .               if \\n(e1==1 \{\
1167 .\\*(e1 \\*(e2 \\*(e3 \\*(e4 \\*(e5 \\*(e6 \\*(e7 \\*(e8 \\*(e9
1168 .               \}
1169 .               uO
1170 .               if !(\\n(oO:\\n(aO) .as f1 \& \&
1171 .       \}
1172 .       ie "\\$1"Op" \{\
1173 .               as f1 \&\\*(lB
1174 .               nr aO \\n(aO+1
1175 .       \}
1176 .       el \{\
1177 .               nr eP \\n(eP+1
1178 .               ds e\\n(eP \\$1
1179 .               nr e\\n(eP 1
1180 .       \}
1181 .\}
1182 .el \{\
1183 .\" .tm dO: $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(ePEE
1184 .       rZ \\$1
1185 .       ie \\n(rZ \{\
1186 .\" .tm dO:rZ: $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(eP
1187 .               nr hP \\n(hP+1
1188 .               ds h\\n(hP \\$1
1189 .       \}
1190 .       el \{\
1191 .\" .tm dO:word $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(ePEE
1192 .               if \\n(eP==0:\\n(e\\n(eP==1 .nr eP \\n(eP+1
1193 .               if \\n(eZ .as e\\n(eP \& \&
1194 .               as e\\n(eP " \&\\$1
1195 .\" .           ds e\\n(eP \&\\$1
1196 .               nr eZ \\n(eZ+1
1197 .       \}
1198 .\}
1199 .nr oP 1
1200 .ie \\n(.$>1 \{\
1201 .       dO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1202 .\}
1203 .el \{\
1204 .     ie \\n(e1 \{\
1205 .\\*(e1 \\*(e2 \\*(e3 \\*(e4 \\*(e5 \\*(e6 \\*(e7 \\*(e8 \\*(e9
1206 .       \}
1207 .     el \{\
1208 .       as f1 \\*(e1
1209 .       \}
1210 .\}
1211 ..
1212 .\" handle old style arguments such as the arg -Idir
1213 .\" in adb, .Oo is a toggle.
1214 .de Oo
1215 .ie \\n(oO .nr oO 0
1216 .el .nr oO 1
1217 ..
1218 .\" stash punctuation
1219 .de oZ
1220 .if \\n(hP>=\\n(oZ \{\
1221 .       nr eP \\n(eP+1
1222 .       ds e\\n(eP \\*(h\\n(oZ
1223 .       nr oZ \\n(oZ+1
1224 .       oZ
1225 .\}
1226 ..
1227 .\" clean up punctuation vector
1228 .de Oz
1229 .if \\n(hP>0 \{\
1230 .       rm h\\n(hP
1231 .       nr hP \\n(hP-1
1232 .       Oz
1233 .\}
1234 ..
1235 .\" uO: go back up created vector cleaning it up along the way
1236 .de uO
1237 .if \\n(eP>0 \{\
1238 .       rm e\\n(eP
1239 .       rr e\\n(eP
1240 .       nr eP \\n(eP-1
1241 .       nr oP 0
1242 .       nr eZ 0
1243 .       uO
1244 .\}
1245 ..
1246 .\" option end
1247 .de oE
1248 .uO
1249 .ie \\n(hP \{\
1250 .       as f1 \\*(rB\\*(h1\\*(h2\\*(h3
1251 .       Oz
1252 .       nr oZ 0
1253 .\}
1254 .el \{\
1255 .       as f1 \\*(rB
1256 .\}
1257 .ie "\\*(iM"Op" \{\
1258 .       if \\n(aO .aO
1259 .if t \{\
1260 .       if (\\n(.lu-\\n(.ku-\\n(.ou-(2*\\n(fWu))<\w'\fC\\*(f1'u .br
1261 .\}
1262 .if n \{\
1263 .       nr aa \w'\\*(f1'u
1264 .\" .   nr qq \\n(.lu-\\n(.ku-\\n(.ou
1265 .\" \&aa == \\n(aa, f1==\\*(f1, qq==\\n(qq
1266 .       if (\\n(.lu-\\n(.ku-\\n(.ou-\\n(aau)<=(8*\\n(fWu) .br
1267 .\}
1268 \&\\*(f1
1269 .       ds iM
1270 .       ds f1
1271 .       hy
1272 .\}
1273 .el .nr oE \\n(oE-1
1274 ..
1275 .de aO
1276 .as f1 \\*(rB
1277 .nr aO \\n(aO-1
1278 .if \\n(aO >0 .aO
1279 ..
1280 .\"
1281 .de Xr
1282 .if \\n(.$<=1 \{\
1283 .       ie \\n(.$==1 \{\
1284 .               if !"\\*(iM"" .as f1 \&\\*(xR\\$1\fP
1285 .               if "\\*(iM"" \&\\*(xR\\$1\fP
1286 .       \}
1287 .       el .tm Xr Usage: .Xr manpage_name [section#] \\*(Pu
1288 .\}
1289 .if \\n(.$==2 \{\
1290 .       rZ \\$2
1291 .       ie "\\*(iM"" \{\
1292 .               ie \\n(rZ \&\\*(xR\\$1\fP\\$2
1293 .               el \&\\*(xR\\$1\fP(\\$2)
1294 .       \}
1295 .       el \{\
1296 .               ie \\n(rZ .as f1 \&\\*(xR\\$1\fP\\$2
1297 .               el .as f1 \&\\*(xR\\$1\fP(\\$2)
1298 .       \}
1299 .\}
1300 .if \\n(.$>=3 \{\
1301 .       rZ \\$2
1302 .       ie \\n(rZ \{\
1303 .               ie !"\\*(iM"" .as f1 \&\\*(xR\\$1\fP\\$2\\$3\\$4\\$5\\$6\\$7\\$8
1304 .               el \&\\*(xR\\$1\fP\\$2\\$3\\$4\\$5\\$6\\$7\\$8
1305 .       \}
1306 .       el \{\
1307 .               rZ \\$3
1308 .               ie \\n(rZ \{\
1309 .                       if !"\\*(iM"" \{\
1310 .                            as f1 \&\\*(xR\\$1\fP(\\$2)\\$3\\$4\\$5\\$6\\$7\\$8
1311 .                       \}
1312 .                       if "\\*(iM"" \{\
1313 \&\\*(xR\\$1\fP(\\$2)\\$3\\$4\\$5\\$6\\$7\\$8
1314 .                       \}
1315 .               \}
1316 .               el \{\
1317 .                       tm rZ = \\n(rZ  the arg is \\$3
1318 .                       tm Xr-XX Usage: .Xr manpage_name [section#] \\*(Pu
1319 .               \}
1320 .       \}
1321 .\}
1322 ..
1323 .\"
1324 .\"
1325 .de Ex
1326 .tm Ex defunct, Use .Dl: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1327 ..
1328 .\" Display (one) Line of text.
1329 .de Dl
1330 .ie "\\*(iM"" \{\
1331 '       ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
1332 .       in \\n(.iu+\\n(Dsu
1333 .       mN \\$1
1334 .       ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1335 .       el \{\
1336 .               nr cF \\n(.f
1337 .\"      Literal font is none specified
1338 \&\\*(lI\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1339 .               ft \\n(cF
1340 .       \}
1341 .       in \\n(.iu-\\n(Dsu
1342 .\}
1343 .el \{\
1344 .       mN \\$1
1345 .       ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1346 .       el \{\
1347 .               nr cF \\n(.f
1348 .               ds f1 \&\\*(lI\\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1349 .               as f1 \&\f\\n(cF
1350 .       \}
1351 .\}
1352 ..
1353 .\"
1354 .\"
1355 .\" user set Tagged Paragraph Width (used in both Dp and Tp)
1356 .de Tw
1357 .ie \\n(.$==0 \{\
1358 .       nr aa 0
1359 .\}
1360 .el \{\
1361 .       mN \\$1
1362 .       ie \\n(sW>2 \{\
1363 .               nr tW (\\n(sW+3)*\\n(fWu)
1364 .       \}
1365 .       el \{\
1366 .               ie \\n(mN .nr tW \\n(mN
1367 .               el .nr tW \\$1
1368 .       \}
1369 .       nr tF 1
1370 .\}
1371 ..
1372 .\"
1373 .de Dw
1374 .Tw \\$1
1375 ..
1376 .\"
1377 .de Di
1378 .ie \\n(.$==0 \{\
1379 .       nr tI \\n(Dsu
1380 .\}
1381 .el \{\
1382 .       sW \\$1
1383 .       if \\n(sW>=2 \{\
1384 .               nr tI \\$1u
1385 .       \}
1386 .       if \\n(sW<2 \{\
1387 .               if "\\$1"L" \{\
1388 .                       nr tI 0
1389 .               \}
1390 .       \}
1391 .\}
1392 ..
1393 .\" tagged paragraph
1394 .\" initialize baby stack variables
1395 .nr np 0
1396 .nr p1 0
1397 .ds s\n(np
1398 .\"
1399 .de Tp
1400 .ie "\\$1"" .pE p s np
1401 .el \{\
1402 .       ds iM Tp
1403 .       mN \\$1
1404 .       ie \\n(tF \{\
1405 .               ds tC Tw
1406 .               nr tC 1
1407 .               nr tF 0
1408 .       \}
1409 .       el \{\
1410 .               if !"Tw"\\*(s\\n(np" \{\
1411 .                       ie \\n(mN \{\
1412 .                               ds tC \\$1
1413 .                               nr tW \\n(mN
1414 .                       \}
1415 .                       el \{\
1416 .                               ds tC Tx
1417 .                               nr tW \\n(Tx
1418 .                       \}
1419 .                       if !"\\*(tC"\\*(s\\n(np" .nr tC 1
1420 .               \}
1421 .       \}
1422 .       sp \\n(vVu
1423 .       if !\\n(cR .ne 2
1424 .       if \\n(tC \{\
1425 .               nr np \\n(np+1
1426 .               nr p\\n(np \\n(tW
1427 .               ds s\\n(np \\*(tC
1428 .               nr tC 0
1429 .               ds tC
1430 .               in \\n(.iu+\\n(p\\n(npu
1431 .       \}
1432 .       ie \\n(mN \{\
1433 .               ds f1
1434 .               \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1435 .               if !"\\$1"Cx" .pT st p np
1436 .       \}
1437 .       el \{\
1438 .               br
1439 .               ev 1
1440 .               fi
1441 .               di Td
1442 \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1443 .               br
1444 .               di
1445 .               ev
1446 .               na
1447 .               ds tD \\*(Td\\
1448 .               pT di p np
1449 .       \}
1450 .\}
1451 ..
1452 .\"
1453 .\"
1454 .\" Complex Expression Macro
1455 .\"
1456 .\"      TODO: add length across line boundary check (like Li)
1457 .de Cx
1458 .hy 0
1459 .ie \\n(.$==0 \{\
1460 .       if "\\*(iM"Cx" \{\
1461 .               ds iM
1462 .               if \\n(oE .oE
1463 \&\\*(f1
1464 .               ds f1
1465 .       \}
1466 .       if "\\*(iM"Tp" .pT st p np
1467 .       if "\\*(iM"Dp" .pT st q mp
1468 .\}
1469 .el \{\
1470 .       if "\\*(iM"" \{\
1471 .               ds iM Cx
1472 .               ds f1 \&
1473 .       \}
1474 .       mN \\$1
1475 .\" Here are the args: `\\$1'  `\\$2'  `\\$3'  `\\$4'
1476 .       ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1477 .       el \{\
1478 .               as f1 \&\\$1
1479 .               if \\n(.$>1 .Cx \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1480 .       \}
1481 .\}
1482 ..
1483 .\" Prefix string in default font to content specified string
1484 .de Pf
1485 .Cx \\$1
1486 .\\$2 \\$3 \\$4 \\$5
1487 .Cx
1488 ..
1489 .\" Suffix string in default font to content specified string
1490 .de Sf
1491 .Cx \\$1 \\$2
1492 .Cx \\$3
1493 .Cx
1494 ..
1495 .\" Simple Option Begin
1496 .de Ob
1497 .hy 0
1498 .ie "\\*(iM"" \{\
1499 .       ev 2
1500 .       fi
1501 .       di oB
1502 .\}
1503 .el \{\
1504 .tm shouldn't be here
1505 .       as f1 \&[
1506 .       mN \\$1
1507 .       ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1508 .       el \{\
1509 .               as f1 \&\\$1
1510 .               if \\n(.$>1 .Oc \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1511 .       \}
1512 .\}
1513 ..
1514 .de Oc
1515 .as f1 \&\\$1
1516 .if \\n(.$>1 .Oc \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1517 ..
1518 .de Oe
1519 .hy 0
1520 .ie "\\*(iM"" \{\
1521 .       br
1522 .       di
1523 .       ev
1524 .       ds bO \\*(oB\\
1525 \&[\\*(bO\&]
1526 .\}
1527 .el \{\
1528 .       as f1 \&]
1529 .\}
1530 ..
1531 .\" White space for Cx
1532 .de Ws
1533 .Cx \&\ \&
1534 ..
1535 .\" tagged paragraph
1536 .\" initialize baby stack variables
1537 .nr mp 0
1538 .nr q1 0
1539 .ds r\n(np
1540 .\"
1541 .\" Complex Dp tag
1542 .de Dc
1543 .Dp Cx \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1544 ..
1545 .\" Complex Tp tag
1546 .de Tc
1547 .Tp Cx \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1548 ..
1549 .\" Tag with a flag and an argument with a space
1550 .de Ta
1551 .if "\\$2"" \{\
1552 .       Tp Fl \\$1
1553 .\}
1554 .el \{\
1555 .       Tp Fl \\$1
1556 .       Cx \&\ \&
1557 .       Ar \\$2 \\$3
1558 .       Cx
1559 .\}
1560 ..
1561 .de Da
1562 .Dp Cx Fl \\$1
1563 .Ws
1564 .Ar \\$2 \\$3
1565 .Cx
1566 ..
1567 .de To
1568 .Tp Cx Fl \\$1
1569 .Ar \\$2 \\$3
1570 .Cx
1571 ..
1572 .de Do
1573 .Dp Cx Fl \\$1
1574 .Ar \\$2 \\$3
1575 .Cx
1576 ..
1577 .\" Blended tag toggle
1578 .de Bt
1579 .ie \\n(tP==0 .nr tP 1
1580 .el .nr tP 0
1581 ..
1582 .\" Bullet paragraph
1583 .de Bu
1584 .Tp Sy \&\(bu
1585 ..
1586 .\" Display tagged paragraph
1587 .de Dp
1588 .ie "\\$1"" \{\
1589 .       pE q r mp
1590 .       sp \\n(vVu
1591 .\}
1592 .el \{\
1593 .       ds iM Dp
1594 .       mN \\$1
1595 .       ie \\n(tF \{\
1596 .               ds tC Tw
1597 .               nr tC 1
1598 .               nr tF 0
1599 .       \}
1600 .       el \{\
1601 .               if !"Tw"\\*(r\\n(mp" \{\
1602 .                       ie \\n(mN \{\
1603 .                               ds tC \\$1
1604 .                               nr tW \\n(mN
1605 .                       \}
1606 .                       el \{\
1607 .                               ds tC Tx
1608 .                               nr tW \\n(Tx
1609 .                       \}
1610 .                       if !"\\*(tC"\\*(r\\n(mp" .nr tC 1
1611 .               \}
1612 .       \}
1613 .       if !\\n(cR .ne 2
1614 .       if \\n(tC \{\
1615 .               nr mp \\n(mp+1
1616 .               nr q\\n(mp \\n(tW
1617 .               ds r\\n(mp \\*(tC
1618 .               nr tC 0
1619 .               ds tC
1620 .               ie \\n(tIu==\\n(Dsu .nr i\\n(mp \\n(Dsu
1621 .               el \{\
1622 .                       nr i\\n(mp \\n(tIu
1623 .                       nr tI \\n(Dsu
1624 .               \}
1625 .               in \\n(.iu+\\n(i\\n(mpu
1626 .               sp \\n(vVu
1627 .               in \\n(.iu+\\n(\\q\\n(mpu
1628 .       \}
1629 .       ie \\n(mN \{\
1630 .               \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1631 .               if !"\\$1"Cx" .pT st q mp
1632 .       \}
1633 .       el \{\
1634 .               br
1635 .               ev 1
1636 .               fi
1637 .               di Td
1638 \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1639 .               br
1640 .               di
1641 .               ev
1642 .               na
1643 .               ds tD \\*(Td\\
1644 .               pT di q mp
1645 .       \}
1646 .\}
1647 ..
1648 .\"
1649 .\" .pE number_stack string_stack counter
1650 .de pE
1651 .ie "\\$3"mp" \{\
1652 .       in \\n(.iu-(\\n(\\$1\\n(\\$3u)-(\\n(i\\n(mpu)
1653 .       rr i\\n(mp
1654 .\}
1655 .el .in \\n(.iu-\\n(\\$1\\n(\\$3u
1656 .\" .in \\n(.iu-\\n(\\$1\\n(\\$3u
1657 .if \\n(\\$3<=0 .tm Extraneous call .Tp or .Dp
1658 .rr \\$1\\n(\\$3
1659 .rm \\$2\\n(\\$3
1660 .nr \\$3 \\n(\\$3-1
1661 .ds iM
1662 ..
1663 .\"
1664 .\" .pT [st or di] number_stack counter
1665 .de pT
1666 .ie "\\$1"st" \{\
1667 .       nr bb \\n(\\$2\\n(\\$3u
1668 .       ti -\\n(bbu
1669 .       ie (\\n(\\$2\\n(\\$3u-2n)<=\w'\\*(f1'u \{\&\\*(f1\\*(tP
1670 .               if \\n(tP==0 .br
1671 .       \}
1672 .       el \\*(f1\h'|\\n(\\$2\\n(\\$3u'\c
1673 .\}
1674 .el \{\
1675 .       ti -\\n(\\$2\\n(\\$3u
1676 .       ie (\\n(\\$2\\n(\\$3u-2n)<=\\n(dlu \{\&\\*(tD\\*(tP
1677 .              if !\\n(tP .br
1678 .       \}
1679 .       el \\*(tD\h'|\\n(\\$2\\n(\\$3u'\c
1680 .       if t 'ad
1681 .\}
1682 .       ds iM
1683 .       ds f1
1684 'fi
1685 ..
1686 .\"
1687 .\" The new SH
1688 .\"
1689 .de Sh
1690 .\" set Sh state off, check for list state before calling indent (.In)
1691 .nr nS 0
1692 .nr sE 0
1693 .ie "\\$1"NAME" \{\
1694 .\"     name state on, housekeep (headers & footers)
1695 .       hK
1696 '       in 0
1697 .\}
1698 .el \{\
1699 .       if "\\$1"SYNOPSIS" .nr nS 1
1700 .       in 0
1701 .\}
1702 .pL
1703 'sp
1704 .ns
1705 .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
1706 .if !\\n(cR .ne 3
1707 'fi
1708 \&\fB\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
1709 \&\fP\&
1710 .in \\n(.iu+\\n(Tiu
1711 .if "\\$1"SEE" .nr sE 1
1712 .ns
1713 ..
1714 .\"
1715 .\" Nd minus sign for an en dash used in .Sh Name
1716 .de Nd
1717 \&\-\& \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1718 ..
1719 .de Ss
1720 .sp
1721 .ti -.25i
1722 \&\fB\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
1723 \&\fP\&
1724 .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
1725 .if !\\n(cR .ne 2
1726 .br
1727 ..
1728 .\"     .if "\\$1"Ss" .in \\n(.iu+\\n(sIu
1729 .\"..
1730 .\"
1731 .\"
1732 .\" Column Macro
1733 .\"
1734 .hy 0
1735 .de Cw
1736 .ie \\n(.$==0 \{\
1737 .       br
1738 .       in \\n(.iu-\\n(eWu
1739 .       ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
1740 .\}
1741 .el \{\
1742 .       Pp
1743 .       if \\n(.$==1 \{\
1744 .               ta \w'\\$1    'u
1745 .               nr eW \w'\\$1    'u
1746 '               in \\n(.iu+\\n(eWu
1747 .       \}
1748 .       if \\n(.$==2 \{\
1749 .               ta \w'\\$1    'u +\w'\\$2    'u
1750 .               nr eW \w'\\$1    'u+\w'\\$2    'u
1751 '               in \\n(.iu+\\n(eWu
1752 .       \}
1753 .       if \\n(.$==3 \{\
1754 .               ta \w'\\$1    'u +\w'\\$2    'u +\w'\\$3    'u
1755 .               nr eW \w'\\$1    'u+\w'\\$2    'u+\w'\\$3    'u
1756 '               in \\n(.iu+\\n(eWu
1757 .       \}
1758 .       if \\n(.$==4 \{\
1759 .       ta \w'\\$1    'u +\w'\\$2    'u +\w'\\$3    'u +\w'\\$4    'u
1760 .       nr eW \w'\\$1    'u+\w'\\$2    'u+\w'\\$3    'u +\w'\\$4    'u
1761 '       in \\n(.iu+\\n(eWu
1762 .       \}
1763 .       if \\n(.$==5 \{\
1764 .ta \w'\\$1    'u +\w'\\$2    'u +\w'\\$3    'u +\w'\\$4    'u +\w'\\$5    'u
1765 .nr eW \w'\\$1    'u +\w'\\$2    'u +\w'\\$3    'u +\w'\\$4    'u +\w'\\$5    'u
1766 '       in \\n(.iu+\\n(eWu
1767 .       \}
1768 .\}
1769 ..
1770 .de Cl
1771 .ti -\\n(eWu
1772 .mN \\$1
1773 .ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1774 .el \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1775 ..
1776 .nr dQ 0
1777 .de Ds
1778 .ie !"\\$1"" \{\
1779 .       mN d\\$1
1780 .       if \\n(mN \{\
1781 .               nr dQ \\n(dQ+1
1782 .               d\\$1
1783 .       \}
1784 .\}
1785 .el .br
1786 .nf
1787 ..
1788 .de Df
1789 .ie !"\\$1"" \{\
1790 .       mN d\\$1
1791 .       if \\n(mN \{\
1792 .               nr dQ \\n(dQ+1
1793 .               d\\$1
1794 .       \}
1795 .\}
1796 .el .br
1797 ..
1798 .de Dn
1799 \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1800 .nf
1801 ..
1802 .de dI
1803 .nr d\\n(dQ \\n(dIu
1804 .in \\n(.iu+\\n(dIu
1805 ..
1806 .de dC
1807 .nr d\\n(dQ (\\n(.l-\\n(.i)/4u
1808 .in \\n(.iu+\\n(d\\n(dQu
1809 ..
1810 .de dR
1811 .nr d\\n(dQ (\\n(.l/3)u
1812 .in \\n(.iu+\\n(d\\n(dQu
1813 ..
1814 .de dL
1815 .nr aa 0
1816 ..
1817 .de De
1818 .br
1819 .if \\n(d\\n(dQ \{\
1820 .       in \\n(.iu-\\n(d\\n(dQu
1821 .       rr d\\n(dQ
1822 .       nr dQ \\n(dQ-1
1823 .\}
1824 .fi
1825 ..
1826 .\"
1827 .de Fn
1828 .ie \\n(.$==0 \{\
1829 .       tm Usage: .Fn function_name function_arg(s) ... \\*(Pu
1830 .\}
1831 .el \{\
1832 .       nr cF \\n(.f
1833 .       ie \\n(.$==1 .ds f1 \&\\*(nM\\$1\fP\\*(lP\fP\\*(rP\fP
1834 .       el \{\
1835 .               ds f1 \\*(nM\\$1\fP\\*(lP
1836 .               nr aa 0
1837 .               rC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1838 .       \}
1839 .       if "\\*(iM"" \{\\&\\*(f1
1840 .               ds f1
1841 .       \}
1842 .\}
1843 ..
1844 .\"
1845 .de rC
1846 .rZ \\$1
1847 .ie \\n(rZ \{\
1848 .       as f1 \f\\n(cF\\*(rP\f\\n(cF\\$1\\$2\\$3\\$4\\$5\\$6\\$7
1849 .\}
1850 .el \{\
1851 .       ie \\n(aa .as f1 \fP, \\*(aR\\$1
1852 .       el .as f1 \\*(aR\\$1
1853 .       nr aa 1
1854 .       ie \\n(.$>1 .rC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7
1855 .       el .as f1 \fP\\*(rP\fP
1856 .\}
1857 ..