home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / tmac / tmac.doc.old < prev    next >
Text File  |  1992-01-04  |  36KB  |  1,859 lines

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