home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / groff-1.09-bin.lha / GNU / lib / groff / tmac / tmac.doc < prev    next >
Text File  |  1994-09-02  |  52KB  |  3,056 lines

  1. .\" Copyright (c) 1991 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"     @(#)doc    5.8 (Berkeley) 8/5/91
  33. .\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
  34. .\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
  35. .\" `tmac.doc-common' would be too long); when using groff, the doc-* files
  36. .\" are loaded using the `mso' request.
  37. .\"   
  38. .\" .mdoc-parse - attempt to parse troff request arguments
  39. .if \n(.g \{\
  40. .cp 0
  41. .ftr C CR
  42. .\}
  43. .if \n(.g .ig
  44. .de sO
  45. .so /gnu/share/tmac/\\$1
  46. ..
  47. .if !\n(.g .ig
  48. .de sO
  49. .mso mdoc/\\$1
  50. ..
  51. .if t \{\
  52. .       sO doc-ditroff
  53. .\}
  54. .if n \{\
  55. .       sO doc-nroff
  56. .\}
  57. .sO doc-common
  58. .sO doc-syms
  59. .nr Db 0
  60. .de Db
  61. .ie \\n(.$==0 \{\
  62. .    ie \\n(Db==0 \{\
  63. .tm DEBUGGING ON
  64. .        nr Db 1
  65. .    \}
  66. .    el \{\
  67. .tm DEBUGGING OFF
  68. .        nr Db 0
  69. .    \}
  70. .\}
  71. .el \{\
  72. .    if "\\$1"on" \{\
  73. .tm DEBUGGING ON
  74. .        nr Db 1
  75. .    \}
  76. .    if "\\$1"off" \{\
  77. .tm DEBUGGING OFF
  78. .        nr Db 0
  79. .    \}
  80. .\}
  81. ..
  82. .de aV
  83. .nr aC \\n(aC+1
  84. .ie "\\$1"|" \{\
  85. .    if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP
  86. .    if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP
  87. .    if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP
  88. .    if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP
  89. .    if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP
  90. .\}
  91. .el .ds A\\n(aC \\$1
  92. .aU \\n(aC
  93. .nr C\\n(aC \\n(aT
  94. .s\\n(aT
  95. .if \\n(Db \{\
  96. .    if \\n(aT==1 .ds yU Executable
  97. .    if \\n(aT==2 .ds yU String
  98. .    if \\n(aT==3 .ds yU Closing Punctuation or suffix
  99. .    if \\n(aT==4 .ds yU Opening Punctuation or prefix
  100. .    if \\n(iN==1 \{\
  101. .        br
  102. .        nr iI \\n(.iu
  103. .        in -\\n(iIu
  104. .        if \\n(aC==1 \{\
  105. \&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
  106. .        \}
  107. \&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW
  108. \&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU
  109. .    \}
  110. .    if \\n(iN==0 \{\
  111. .        if \\n(aC==1 \{\
  112. .            tm DEBUG(argv) MACRO: `.\\*(mN'  Line #: \\n(.c
  113. .        \}
  114. .        tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW
  115. .        tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU
  116. .    \}
  117. .\}
  118. .ie \\n(.$==1 \{\
  119. .    nr aP 0
  120. .    ie \\n(dZ==1 \{\
  121. .        if \\n(oM>1 .as b1 \\*(S0
  122. .    \}
  123. .    el \{\
  124. .        if \\n(oM>0 \{\
  125. .            if \\n(fC==0 .as b1 \\*(S0
  126. .        \}
  127. .    \}
  128. .    ds S0 \\*(S\\n(aC
  129. .    if \\n(Db \{\
  130. .        if \\n(iN==1 \{\
  131. \&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
  132. .            br
  133. .            in \\n(iIu
  134. .        \}
  135. .        if \\n(iN==0 \{\
  136. .tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
  137. .        \}
  138. .    \}
  139. .\}
  140. .el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  141. ..
  142. .de fV
  143. .nr aC \\n(aC+1
  144. .if "\\*(A\\n(aC"|" \{\
  145. .    if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP
  146. .    if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP
  147. .    if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP
  148. .    if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP
  149. .    if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP
  150. .\}
  151. .aU \\n(aC
  152. .nr C\\n(aC \\n(aT
  153. .s\\n(aT
  154. .if \\n(Db \{\
  155. .    if \\n(aT==1 .ds yU Executable
  156. .    if \\n(aT==2 .ds yU String
  157. .    if \\n(aT==3 .ds yU Closing Punctuation or suffix
  158. .    if \\n(aT==4 .ds yU Opening Punctuation or prefix
  159. .    if \\n(iN==1 \{\
  160. .        br
  161. .        nr iI \\n(.iu
  162. .        in -\\n(iIu
  163. .        if \\n(aC==1 \{\
  164. \&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN'  \fBLine #:\fP \\n(.c
  165. .        \}
  166. \&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW
  167. \&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU
  168. .    \}
  169. .    if \\n(iN==0 \{\
  170. .        if \\n(aC==1 \{\
  171. .            tm DEBUG(fargv) MACRO: `.\\*(mN'  Line #: \\n(.c
  172. .        \}
  173. .        tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW
  174. .        tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU
  175. .    \}
  176. .\}
  177. .ie \\n(fV==1 \{\
  178. .    nr aP 0
  179. .    ie \\n(dZ==1 \{\
  180. .        if \\n(oM>1 .as b1 \\*(S0
  181. .    \}
  182. .    el \{\
  183. .        if \\n(oM>0 \{\
  184. .            if \\n(fC==0 .as b1 \\*(S0
  185. .        \}
  186. .    \}
  187. .    ds S0 \\*(S\\n(aC
  188. .    nr fV 0
  189. .    if \\n(Db \{\
  190. .        ie \\n(iN \{\
  191. \&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
  192. .            br
  193. .            in \\n(iIu
  194. .        \}
  195. .        el \{\
  196. .tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
  197. .        \}
  198. .    \}
  199. .\}
  200. .el \{\
  201. .    nr fV \\n(fV-1
  202. .    fV
  203. .\}
  204. ..
  205. .de aX
  206. .nr aP \\n(aP+1
  207. .as b1 \&\\*(A\\n(aP
  208. .ie \\n(fV==1 \{\
  209. .    nr aP 0
  210. .    nr fV 0
  211. .\}
  212. .el \{\
  213. .    as b1 \&\\*(sV
  214. .    nr fV \\n(fV-1
  215. .    aX
  216. .\}
  217. ..
  218. .de aI
  219. .ie \\n(aC<9 \{\
  220. .    nr aC \\n(aC+1
  221. .    ds A\\n(aC \\$1
  222. .    nr C\\n(aC \\$2
  223. .    s\\$2
  224. .    ds xV S\\n(aC
  225. .\}
  226. .el \{\
  227. .    tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c)
  228. .    tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
  229. .\}
  230. ..
  231. .de aZ
  232. .pB
  233. .aY
  234. ..
  235. .de aY
  236. .rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
  237. .rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
  238. .rm S1 S2 S3 S4 S5 S6 S7 S8 S9
  239. .nr aC 0
  240. .nr aP 0
  241. ..
  242. .de pB
  243. .ie \\n(dZ==1 \{\
  244. .    if \\n(oM==1 \{\&\\*(b1
  245. .        rm S0
  246. .        ds b1
  247. .    \}
  248. .    if \\n(oM==0 \{\
  249. .        x2
  250. .    \}
  251. .\}
  252. .el \{\
  253. .    ie \\n(oM==0 \{\&\\*(b1
  254. .        rm S0
  255. .        ds b1
  256. .    \}
  257. .    el \{\
  258. .        if ((\\n(sM==1)&(\\n(tP==0)) \{\
  259. .            x1
  260. .        \}
  261. .    \}
  262. .\}
  263. .hy
  264. ..
  265. .de x1
  266. .nr dZ \\n(dZ+1
  267. .ds b2 \\*(b1
  268. .ds b1
  269. .nr lK \\n(.c
  270. .ev 2
  271. .fi
  272. .di eB
  273. ..
  274. .de x2
  275. .br
  276. .di
  277. .ev
  278. .ie (\\n(.c-\\n(lK>1) \{\
  279. .    ds b0 \&\\*(eB\\
  280. .    ds b1 \\*(b2\\*(b0\\*(b1
  281. .\}
  282. .el .ds b1 \\*(b2\\*(b1
  283. \&\\*(b1
  284. .rm eB b2 b0 b1
  285. .nr dZ \\n(dZ-1
  286. ..
  287. .de Fl
  288. .as b1 \&\\*(fL
  289. .if \\n(aC==0 \{\
  290. .    ie \\n(.$==0 \{\
  291. .        as b1 \&\|\-\|\fP\s0
  292. .        pB
  293. .    \}
  294. .    el \{\
  295. .        ds mN Fl
  296. .        aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  297. .    \}
  298. .\}
  299. .if \\n(aC>0 \{\
  300. .    ie (\\n(aC-\\n(aP)==0 \{\
  301. .        as b1 \&\|\-\fP\s0
  302. .        aZ
  303. .    \}
  304. .    el \{\
  305. .        nr aP \\n(aP+1
  306. .        ie \\n(C\\n(aP==1 \{\
  307. .            as b1 \&\|\-\fP\s0
  308. .            \\*(A\\n(aP
  309. .        \}
  310. .        el \{\
  311. .            nr cF \\n(.f
  312. .            nr cZ \\n(.s
  313. .            if \\n(C\\n(aP==3 \{\
  314. .                as b1 \&\|\-\|
  315. .            \}
  316. .            fR
  317. .        \}
  318. .    \}
  319. .\}
  320. ..
  321. .de fR
  322. .hy 0
  323. .nr jM \\n(C\\n(aP
  324. .ie \\n(jM==1 \{\
  325. .    as b1 \&\fP\s0
  326. .    \\*(A\\n(aP
  327. .\}
  328. .el \{\
  329. .    nr jN \\n(aP
  330. .    ie \\n(jM==2 \{\
  331. .        ie !"\\*(A\\n(aP"\\*(Ba" \{\
  332. .            ie !"\\*(A\\n(aP"\fR|\fP" \{\
  333. .                       ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|
  334. .                       el .as b1 \&\|\-\\*(A\\n(aP
  335. .            \}
  336. .            el .as b1 \&\\*(A\\n(aP
  337. .        \}
  338. .        el .as b1 \&\\*(A\\n(aP
  339. .    \}
  340. .    el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
  341. .    ie \\n(aC==\\n(aP \{\
  342. .        if \\n(jM==4 .as b1 \&\|\-
  343. .        as b1 \&\fP\s0
  344. .        aZ
  345. .    \}
  346. .    el \{\
  347. .        nr aP \\n(aP+1
  348. .        ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-
  349. .        el .as b1 \&\\*(S\\n(jN
  350. .        fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  351. .    \}
  352. .\}
  353. .rr jM jN
  354. ..
  355. .de nR
  356. .hy 0
  357. .nr jM \\n(C\\n(aP
  358. .ie \\n(jM==1 \{\
  359. .    as b1 \&\f\\n(cF\s\\n(cZ
  360. .    \\*(A\\n(aP
  361. .\}
  362. .el \{\
  363. .    nr jN \\n(aP
  364. .    ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
  365. .    el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
  366. .    ie \\n(aC==\\n(aP \{\
  367. .        as b1 \&\f\\n(cF\s\\n(cZ
  368. .        aZ
  369. .    \}
  370. .    el \{\
  371. .        nr aP \\n(aP+1
  372. .        as b1 \&\\*(S\\n(jN
  373. .        nR
  374. .    \}
  375. .\}
  376. .rr jM jN
  377. ..
  378. .de Ar
  379. .as b1 \\*(aR
  380. .if \\n(aC==0 \{\
  381. .       ie