Annotation of src/share/tmac/doc, Revision 1.1.1.1
1.1 deraadt 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: .\"
34: .\" .mdoc-parse - attempt to parse troff request arguments
35: .\" %beginstrip%
36: .if \n(.g \{\
37: .cp 0
38: .ftr C CR
39: .\}
40: .if t \{\
41: . so /usr/share/tmac/tmac.doc-ditroff
42: .\}
43: .if n \{\
44: . so /usr/share/tmac/tmac.doc-nroff
45: .\}
46: .so /usr/share/tmac/tmac.doc-common
47: .so /usr/share/tmac/tmac.doc-syms
48: .\" NS Db macro - start/stop DEBUG MODE
49: .\" NS Db register DEBUG MODE
50: .\" NS iN register DEBUG MODE (inline if 1, to stderr if 0 (default))
51: .nr Db 0
52: .de Db
53: .ie \\n(.$==0 \{\
54: . ie \\n(Db==0 \{\
55: .tm DEBUGGING ON
56: . nr Db 1
57: . \}
58: . el \{\
59: .tm DEBUGGING OFF
60: . nr Db 0
61: . \}
62: .\}
63: .el \{\
64: . if "\\$1"on" \{\
65: .tm DEBUGGING ON
66: . nr Db 1
67: . \}
68: . if "\\$1"off" \{\
69: .tm DEBUGGING OFF
70: . nr Db 0
71: . \}
72: .\}
73: ..
74: .\" NS aV macro - parse argument vector (recursive) (.aV arg ... )
75: .\" NS fV macro - parse argument vector (recursive) (.fV)
76: .\" NS aC register argument counter (aV/fV)
77: .\" NS fV register argument counter (must set to \\n(.$ prior to reuqest) (fV)
78: .\" NS A[0-9] argument vector (aV/fV)
79: .\" NS C[0-9] reg. arg type(1=macro, 2=arg, 3=punct-suf, 4=punct-pre) (aV/fV)
80: .\" NS S[0-9] space vector (sV)
81: .\" NS aP register argument pointer (aV)
82: .\" NS yU local string used for debugging
83: .\" NS iI local register (indent for inline debug mode)
84: .\" NS mN name of calling request (set in each user requestable macro)
85: .de aV
86: .nr aC \\n(aC+1
87: .ie "\\$1"|" \{\
88: . if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP
89: . if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP
90: . if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP
91: . if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP
92: . if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP
93: .\}
94: .el .ds A\\n(aC \\$1
95: .aU \\n(aC
96: .nr C\\n(aC \\n(aT
97: .s\\n(aT
98: .if \\n(Db \{\
99: . if \\n(aT==1 .ds yU Executable
100: . if \\n(aT==2 .ds yU String
101: . if \\n(aT==3 .ds yU Closing Punctuation or suffix
102: . if \\n(aT==4 .ds yU Opening Punctuation or prefix
103: . if \\n(iN==1 \{\
104: . br
105: . nr iI \\n(.iu
106: . in -\\n(iIu
107: . if \\n(aC==1 \{\
108: \&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
109: . \}
110: \&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
111: \&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
112: . \}
113: . if \\n(iN==0 \{\
114: . if \\n(aC==1 \{\
115: . tm DEBUG(argv) MACRO: `.\\*(mN' Line #: \\n(.c
116: . \}
117: . tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
118: . tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
119: . \}
120: .\}
121: .ie \\n(.$==1 \{\
122: . nr aP 0
123: . ie \\n(dZ==1 \{\
124: . if \\n(oM>1 .as b1 \\*(S0
125: . \}
126: . el \{\
127: . if \\n(oM>0 \{\
128: . if \\n(fC==0 .as b1 \\*(S0
129: . \}
130: . \}
131: . ds S0 \\*(S\\n(aC
132: . if \\n(Db \{\
133: . if \\n(iN==1 \{\
134: \&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
135: . br
136: . in \\n(iIu
137: . \}
138: . if \\n(iN==0 \{\
139: .tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
140: . \}
141: . \}
142: .\}
143: .el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
144: ..
145: .de fV
146: .nr aC \\n(aC+1
147: .if "\\*(A\\n(aC"|" \{\
148: . if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP
149: . if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP
150: . if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP
151: . if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP
152: . if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP
153: .\}
154: .aU \\n(aC
155: .nr C\\n(aC \\n(aT
156: .s\\n(aT
157: .if \\n(Db \{\
158: . if \\n(aT==1 .ds yU Executable
159: . if \\n(aT==2 .ds yU String
160: . if \\n(aT==3 .ds yU Closing Punctuation or suffix
161: . if \\n(aT==4 .ds yU Opening Punctuation or prefix
162: . if \\n(iN==1 \{\
163: . br
164: . nr iI \\n(.iu
165: . in -\\n(iIu
166: . if \\n(aC==1 \{\
167: \&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
168: . \}
169: \&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
170: \&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
171: . \}
172: . if \\n(iN==0 \{\
173: . if \\n(aC==1 \{\
174: . tm DEBUG(fargv) MACRO: `.\\*(mN' Line #: \\n(.c
175: . \}
176: . tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
177: . tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
178: . \}
179: .\}
180: .ie \\n(fV==1 \{\
181: . nr aP 0
182: . ie \\n(dZ==1 \{\
183: . if \\n(oM>1 .as b1 \\*(S0
184: . \}
185: . el \{\
186: . if \\n(oM>0 \{\
187: . if \\n(fC==0 .as b1 \\*(S0
188: . \}
189: . \}
190: . ds S0 \\*(S\\n(aC
191: . nr fV 0
192: . if \\n(Db \{\
193: . ie \\n(iN \{\
194: \&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
195: . br
196: . in \\n(iIu
197: . \}
198: . el \{\
199: .tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
200: . \}
201: . \}
202: .\}
203: .el \{\
204: . nr fV \\n(fV-1
205: . fV
206: .\}
207: ..
208: .\" NS aX macro - stuff saved strings into `b1' (used by -diag list)
209: .de aX
210: .nr aP \\n(aP+1
211: .as b1 \&\\*(A\\n(aP
212: .ie \\n(fV==1 \{\
213: . nr aP 0
214: . nr fV 0
215: .\}
216: .el \{\
217: . as b1 \&\\*(sV
218: . nr fV \\n(fV-1
219: . aX
220: .\}
221: ..
222: .\" NS aI macro - append arg to arg vector: .aI [arg] [type] (used by .En only)
223: .de aI
224: .ie \\n(aC<9 \{\
225: . nr aC \\n(aC+1
226: . ds A\\n(aC \\$1
227: . nr C\\n(aC \\$2
228: . s\\$2
229: . ds xV S\\n(aC
230: .\}
231: .el \{\
232: . tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c)
233: . tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
234: .\}
235: ..
236: .\"
237: .\" NS aZ macro - print buffer (pB) and clean up arg vectors (aY)
238: .de aZ
239: .pB
240: .aY
241: ..
242: .\" NS aY macro - clean up arg vector
243: .de aY
244: .rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
245: .rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
246: .rm S1 S2 S3 S4 S5 S6 S7 S8 S9
247: .nr aC 0
248: .nr aP 0
249: ..
250: .\" NS pB macro - test for end of vector (eol) (print b1 buffer or divert)
251: .de pB
252: .ie \\n(dZ==1 \{\
253: . if \\n(oM==1 \{\&\\*(b1
254: . rm S0
255: . ds b1
256: . \}
257: . if \\n(oM==0 \{\
258: . x2
259: . \}
260: .\}
261: .el \{\
262: . ie \\n(oM==0 \{\&\\*(b1
263: . rm S0
264: . ds b1
265: . \}
266: . el \{\
267: . if ((\\n(sM==1)&(\\n(tP==0)) \{\
268: . x1
269: . \}
270: . \}
271: .\}
272: .hy
273: ..
274: .\" NS x1 macro - save buffer and divert if tP flag set
275: .\" NS eB diversion string
276: .\" NS b2 string save of buffer
277: .\" NS lK register count of lines read from input file
278: .de x1
279: .nr dZ \\n(dZ+1
280: .ds b2 \\*(b1
281: .ds b1
282: .nr lK \\n(.c
283: .ev 2
284: .fi
285: .di eB
286: ..
287: .\"
288: .\" NS x2 macro - end diversion and print
289: .\" NS b0 string local temporary
290: .de x2
291: .br
292: .di
293: .ev
294: .ie (\\n(.c-\\n(lK>1) \{\
295: . ds b0 \&\\*(eB\\
296: . ds b1 \\*(b2\\*(b0\\*(b1
297: .\}
298: .el .ds b1 \\*(b2\\*(b1
299: \&\\*(b1
300: .rm eB b2 b0 b1
301: .nr dZ \\n(dZ-1
302: ..
303: .\" NS Fl macro - flags (appends - and prints flags)
304: .\" NS cF register save current font
305: .\" NS cZ register save current font size
306: .de Fl
307: .as b1 \&\\*(fL
308: .if \\n(aC==0 \{\
309: . ie \\n(.$==0 \{\
310: . as b1 \&\|\-\|\fP\s0
311: . pB
312: . \}
313: . el \{\
314: . ds mN Fl
315: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
316: . \}
317: .\}
318: .if \\n(aC>0 \{\
319: . ie (\\n(aC-\\n(aP)==0 \{\
320: . as b1 \&\|\-\fP\s0
321: . aZ
322: . \}
323: . el \{\
324: . nr aP \\n(aP+1
325: . ie \\n(C\\n(aP==1 \{\
326: . as b1 \&\|\-\fP\s0
327: . \\*(A\\n(aP
328: . \}
329: . el \{\
330: . nr cF \\n(.f
331: . nr cZ \\n(.s
332: . if \\n(C\\n(aP==3 \{\
333: . as b1 \&\|\-\|
334: . \}
335: . fR
336: . \}
337: . \}
338: .\}
339: ..
340: .\"
341: .\" NS fR macro - Fl flag recursion routine (special handling)
342: .\" NS jM local register
343: .\" NS jN local register
344: .\"
345: .de fR
346: .hy 0
347: .nr jM \\n(C\\n(aP
348: .ie \\n(jM==1 \{\
349: . as b1 \&\fP\s0
350: . \\*(A\\n(aP
351: .\}
352: .el \{\
353: . nr jN \\n(aP
354: . ie \\n(jM==2 \{\
355: . ie !"\\*(A\\n(aP"\\*(Ba" \{\
356: . ie !"\\*(A\\n(aP"\fR|\fP" \{\
357: . ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|
358: . el .as b1 \&\|\-\\*(A\\n(aP
359: . \}
360: . el .as b1 \&\\*(A\\n(aP
361: . \}
362: . el .as b1 \&\\*(A\\n(aP
363: . \}
364: . el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
365: . ie \\n(aC==\\n(aP \{\
366: . if \\n(jM==4 .as b1 \&\|\-
367: . as b1 \&\fP\s0
368: . aZ
369: . \}
370: . el \{\
371: . nr aP \\n(aP+1
372: . ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-
373: . el .as b1 \&\\*(S\\n(jN
374: . fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
375: . \}
376: .\}
377: .rr jM jN
378: ..
379: .\"
380: .\" NS nR macro - general name recursion routine
381: .\" NS jM local register
382: .\" NS jN local register
383: .de nR
384: .hy 0
385: .nr jM \\n(C\\n(aP
386: .ie \\n(jM==1 \{\
387: . as b1 \&\f\\n(cF\s\\n(cZ
388: . \\*(A\\n(aP
389: .\}
390: .el \{\
391: . nr jN \\n(aP
392: . ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
393: . el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
394: . ie \\n(aC==\\n(aP \{\
395: . as b1 \&\f\\n(cF\s\\n(cZ
396: . aZ
397: . \}
398: . el \{\
399: . nr aP \\n(aP+1
400: . as b1 \&\\*(S\\n(jN
401: . nR
402: . \}
403: .\}
404: .rr jM jN
405: ..
406: .\" NS Ar macro - command line `argument' macro
407: .\"
408: .de Ar
409: .as b1 \\*(aR
410: .if \\n(aC==0 \{\
411: . ie \\n(.$==0 \{\
412: . as b1 file\ ...\fP\s0
413: . pB
414: . \}
415: . el \{\
416: . ds mN Ar
417: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
418: . \}
419: .\}
420: .if \\n(aC>0 \{\
421: . ie (\\n(aC-\\n(aP)==0 \{\
422: . as b1 \&file\ ...\fP\s0
423: . aZ
424: . \}
425: . el \{\
426: . nr aP \\n(aP+1
427: . ie \\n(C\\n(aP==1 \{\
428: . as b1 \&file\ ...\fP\s0
429: . \\*(A\\n(aP
430: . \}
431: . el \{\
432: . nr cF \\n(.f
433: . nr cZ \\n(.s
434: . if \\n(C\\n(aP==3 \{\
435: . as b1 \&file\ ...
436: . \}
437: . nR
438: . \}
439: . \}
440: .\}
441: ..
442: .\" NS Ad macro - Addresses
443: .de Ad
444: .if \\n(aC==0 \{\
445: . ie \\n(.$==0 .tm Usage: .Ad address ... \\*(Pu (#\\n(.c)
446: . el \{\
447: . ds mN Ad
448: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
449: . \}
450: .\}
451: .if \\n(aC>\\n(aP \{\
452: . as b1 \\*(aD
453: . nr aP \\n(aP+1
454: . nr cF \\n(.f
455: . nr cZ \\n(.s
456: . nR
457: .\}
458: ..
459: .\" NS Cd macro - Config declaration (for section 4 SYNOPSIS) (not callable)
460: .\" needs work - not very translatable
461: .de Cd
462: .if \\n(aC==0 \{\
463: . ie \\n(.$==0 .tm Usage: .Cd Configuration file declaration (#\\n(.c)
464: . el \{\
465: . ds mN Cd
466: . ds A1 \\$1
467: . ds A2 \\$2
468: . ds A3 \\$3
469: . ds A4 \\$4
470: . ds A5 \\$5
471: . ds A6 \\$6
472: . ds A7 \\$7
473: . ds A8 \\$8
474: . ds A9 \\$9
475: . nr fV \\n(.$
476: . fV
477: . \}
478: .\}
479: .br
480: .if \\n(aC>\\n(aP \{\
481: . as b1 \\*(nM
482: . nr aP \\n(aP+1
483: . nr cF \\n(.f
484: . nr cZ \\n(.s
485: . ie \\n(nS \{\
486: . if "\\*(mN"Cd" \{\
487: . rs
488: . ie \\n(nS>1 .br
489: . el \{\
490: . if \\n(iS==0 .nr iS \\n(Dsu
491: . \}
492: . in +\\n(iSu
493: . ti -\\n(iSu
494: . nr nS \\n(nS+1
495: . \}
496: . nR
497: . in -\\n(iSu
498: . \}
499: . el .nR
500: .\}
501: ..
502: .\" NS Cm macro - Interactive command modifier (flag)
503: .de Cm
504: .if \\n(aC==0 \{\
505: . ie \\n(.$==0 .tm Usage: .Cm Interactive command modifier ... \\*(Pu (#\\n(.c)
506: . el \{\
507: . ds mN Cm
508: . ds A1 \\$1
509: . ds A2 \\$2
510: . ds A3 \\$3
511: . ds A4 \\$4
512: . ds A5 \\$5
513: . ds A6 \\$6
514: . ds A7 \\$7
515: . ds A8 \\$8
516: . ds A9 \\$9
517: . nr fV \\n(.$
518: . fV
519: . \}
520: .\}
521: .if \\n(aC>\\n(aP \{\
522: . as b1 \\*(cM
523: . nr aP \\n(aP+1
524: . nr cF \\n(.f
525: . nr cZ \\n(.s
526: . nR
527: .\}
528: ..
529: .\" NS Dv macro - define variable
530: .de Dv
531: .if \\n(aC==0 \{\
532: . ie \\n(.$==0 .tm Usage: .Dv define_variable ... \\*(Pu (#\\n(.c)
533: . el \{\
534: . ds mN Dv
535: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
536: . \}
537: .\}
538: .if \\n(aC>\\n(aP \{\
539: . as b1 \\*(eR
540: . nr aP \\n(aP+1
541: . nr cF \\n(.f
542: . nr cZ \\n(.s
543: . nR
544: .\}
545: ..
546: .\" NS Em macro - Emphasis
547: .de Em
548: .if \\n(aC==0 \{\
549: . ie \\n(.$==0 \{\
550: . tm Usage: .Em text ... \\*(Pu (#\\n(.c)
551: . \}
552: . el \{\
553: . ds mN Em
554: . ds A1 \\$1
555: . ds A2 \\$2
556: . ds A3 \\$3
557: . ds A4 \\$4
558: . ds A5 \\$5
559: . ds A6 \\$6
560: . ds A7 \\$7
561: . ds A8 \\$8
562: . ds A9 \\$9
563: . nr fV \\n(.$
564: . fV
565: . \}
566: .\}
567: .if \\n(aC>\\n(aP \{\
568: . as b1 \\*(eM
569: . nr aP \\n(aP+1
570: . nr cF \\n(.f
571: . nr cZ \\n(.s
572: . nR
573: .\}
574: ..
575: .\" NS Er macro - Errnotype
576: .de Er
577: .if \\n(aC==0 \{\
578: . ie \\n(.$==0 .tm Usage: .Er ERRNOTYPE ... \\*(Pu (#\\n(.c)
579: . el \{\
580: . ds mN Er
581: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
582: . \}
583: .\}
584: .if \\n(aC>\\n(aP \{\
585: . as b1 \\*(eR
586: . nr aP \\n(aP+1
587: . nr cF \\n(.f
588: . nr cZ \\n(.s
589: . nR
590: .\}
591: ..
592: .\" NS Ev macro - Environment variable
593: .de Ev
594: .if \\n(aC==0 \{\
595: . ie \\n(.$==0 .tm Usage: .Ev ENVIRONMENT_VARIABLE ... \\*(Pu (#\\n(.c)
596: . el \{\
597: . ds mN Ev
598: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
599: . \}
600: .\}
601: .if \\n(aC>\\n(aP \{\
602: . as b1 \\*(eV
603: . nr aP \\n(aP+1
604: . nr cF \\n(.f
605: . nr cZ \\n(.s
606: . nR
607: .\}
608: ..
609: .\" NS Fd macro - function declaration - not callable (& no err check)
610: .\" NS fD register subroutine test (in synopsis only)
611: .\" NS fY register subroutine count (in synopsis only) (fortran only)
612: .\" NS fZ register also subroutine count (in synopsis only)
613: .de Fd
614: .ds mN Fd
615: .if \\n(nS>0 \{\
616: .\" if a variable type was the last thing given, want vertical space
617: . if \\n(fX>0 \{\
618: . Pp
619: . nr fX 0
620: . \}
621: .\" if a subroutine was the last thing given, want vertical space
622: . if \\n(fZ>0 \{\
623: . ie \\n(fD==0 \{\
624: . Pp
625: . rs
626: . \}
627: . el .br
628: . \}
629: . nr fD \\n(fD+1
630: .\}
631: .nr cF \\n(.f
632: .nr cZ \\n(.s
633: \&\\*(fD\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
634: .br
635: .ft \\n(cF
636: .fs \\n(cZ
637: ..
638: .\" NS Fr macro - function return value - not callable (at the moment)
639: .de Fr
640: .if \\n(aC==0 \{\
641: . ie \\n(.$==0 .tm Usage: .Fr Function_return_value... \\*(Pu (#\\n(.c)
642: . el \{\
643: . ds mN Fr
644: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
645: . \}
646: .\}
647: .if \\n(aC>\\n(aP \{\
648: . as b1 \\*(aR
649: . nr aP \\n(aP+1
650: . nr cF \\n(.f
651: . nr cZ \\n(.s
652: . nR
653: .\}
654: ..
655: .\" NS Ic macro - Interactive command
656: .de Ic
657: .if \\n(aC==0 \{\
658: . ie \\n(.$==0 .tm Usage: .Ic Interactive command ... \\*(Pu (#\\n(.c)
659: . el \{\
660: . ds mN Ic
661: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
662: . \}
663: .\}
664: .if \\n(aC>\\n(aP \{\
665: . as b1 \\*(iC
666: . nr aP \\n(aP+1
667: . nr cF \\n(.f
668: . nr cZ \\n(.s
669: . nR
670: .\}
671: ..
672: .\" NS Li macro - literals
673: .de Li
674: .if \\n(aC==0 \{\
675: . ie \\n(.$==0 .tm Usage .Li argument ... \\*(Pu (#\\n(.c)
676: . el \{\
677: . ds mN Li
678: . ds A1 \\$1
679: . ds A2 \\$2
680: . ds A3 \\$3
681: . ds A4 \\$4
682: . ds A5 \\$5
683: . ds A6 \\$6
684: . ds A7 \\$7
685: . ds A8 \\$8
686: . ds A9 \\$9
687: . nr fV \\n(.$
688: . fV
689: . \}
690: .\}
691: .if \\n(aC>\\n(aP \{\
692: . as b1 \\*(lI
693: . nr aP \\n(aP+1
694: . nr cF \\n(.f
695: . nr cZ \\n(.s
696: . nR
697: .\}
698: ..
699: .\" NS Or macro - Pipe symbol (OR)
700: .de Or
701: .if \\n(aC==0 \{\
702: . ie \\n(.$==0 .tm Usage: .Or ... \\*(Pu (#\\n(.c)
703: . el \{\
704: . ds mN Or
705: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
706: . \}
707: .\}
708: .if \\n(aC>\\n(aP \{\
709: . as b1 \\*(iC
710: . nr aP \\n(aP+1
711: . nr cF \\n(.f
712: . nr cZ \\n(.s
713: . nR
714: .\}
715: ..
716: .\" NS Ms macro - Math symbol
717: .de Ms
718: .if \\n(aC==0 \{\
719: . ie \\n(.$==0 .tm Usage: .Ms Math symbol ... \\*(Pu (#\\n(.c)
720: . el \{\
721: . ds mN Ms
722: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
723: . \}
724: .\}
725: .if \\n(aC>\\n(aP \{\
726: . as b1 \\*(sY
727: . nr aP \\n(aP+1
728: . nr cF \\n(.f
729: . nr cZ \\n(.s
730: . nR
731: .\}
732: ..
733: .\" NS Nm macro - Name of command or page topic
734: .\" NS n1 string - save first invocation of .Nm
735: .\" NS iS register - indent second command line in a synopsis
736: .de Nm
737: .if \\n(aC==0 \{\
738: . ie \\n(.$==0 \{\
739: . ie "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu (#\\n(.c)
740: . el \&\\*(nM\\*(n1\fP\s0
741: . \}
742: . el \{\
743: . ds mN Nm
744: . ds A1 \\$1
745: . ds A2 \\$2
746: . ds A3 \\$3
747: . ds A4 \\$4
748: . ds A5 \\$5
749: . ds A6 \\$6
750: . ds A7 \\$7
751: . ds A8 \\$8
752: . ds A9 \\$9
753: . nr fV \\n(.$
754: . fV
755: . \}
756: .\}
757: .if \\n(aC>0 \{\
758: . ie \\n(aC==\\n(aP \{\
759: . as b1 \&\\*(nM\\*(n1\fP\s0
760: . aZ
761: . \}
762: . el \{\
763: . as b1 \\*(nM
764: . nr aP \\n(aP+1
765: . ie \\n(C\\n(aP==1 \{\
766: . as b1 \&\\*(n1\fP\s0
767: . \\*(A\\n(aP
768: . \}
769: . el \{\
770: . nr cF \\n(.f
771: . nr cZ \\n(.s
772: . if \\n(nS \{\
773: . if "\\*(mN"Nm" \{\
774: . rs
775: . in -\\n(iSu
776: . ie \\n(nS>1 .br
777: . el \{\
778: . if \\n(iS==0 \{\
779: . sw \\$1
780: . nr iS ((\\n(sWu+1)*\\n(fW)u
781: . \}
782: . \}
783: . in +\\n(iSu
784: . ti -\\n(iSu
785: . nr nS \\n(nS+1
786: . \}
787: . \}
788: . if "\\*(n1"" .ds n1 \\*(A\\n(aP
789: . nR
790: . \}
791: . \}
792: .\}
793: ..
794: .\" NS Pa macro - Pathname
795: .de Pa
796: .if \\n(aC==0 \{\
797: . ie \\n(.$==0 \&\\*(pA~\fP\s0
798: . el \{\
799: . ds mN Pa
800: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
801: . \}
802: .\}
803: .if \\n(aC>\\n(aP \{\
804: . as b1 \\*(pA
805: . nr aP \\n(aP+1
806: . nr cF \\n(.f
807: . nr cZ \\n(.s
808: . nR
809: .\}
810: ..
811: .\" NS Sy macro - Symbolics
812: .de Sy
813: .if \\n(aC==0 \{\
814: . ie \\n(.$==0 .tm Usage: .Sy symbolic_text ... \\*(Pu (#\\n(.c)
815: . el \{\
816: . ds mN Sy
817: . ds A1 \\$1
818: . ds A2 \\$2
819: . ds A3 \\$3
820: . ds A4 \\$4
821: . ds A5 \\$5
822: . ds A6 \\$6
823: . ds A7 \\$7
824: . ds A8 \\$8
825: . ds A9 \\$9
826: . nr fV \\n(.$
827: . fV
828: . \}
829: .\}
830: .if \\n(aC>\\n(aP \{\
831: . as b1 \\*(sY
832: . nr aP \\n(aP+1
833: . nr cF \\n(.f
834: . nr cZ \\n(.s
835: . nR
836: .\}
837: ..
838: .\" NS Tn macro - Trade Name Macro
839: .de Tn
840: .if \\n(aC==0 \{\
841: . ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
842: . el \{\
843: . ds mN Tn
844: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
845: . \}
846: .\}
847: .if \\n(aC>\\n(aP \{\
848: . as b1 \\*(tN\\*(tF
849: . nr aP \\n(aP+1
850: . nr cF \\n(.f
851: . nr cZ \\n(.s
852: . nR
853: .\}
854: ..
855: .\" NS nN macro - Trade Name Macro for inside of reference
856: .de nN
857: .if \\n(aC==0 \{\
858: . ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
859: . el \{\
860: . ds mN Tn
861: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
862: . \}
863: .\}
864: .if \\n(aC>\\n(aP \{\
865: . as b1 \\*(tN
866: . nr aP \\n(aP+1
867: . nr cF \\n(.f
868: . nr cZ \\n(.s
869: . rR
870: .\}
871: ..
872: .\" NS Va macro - variable name macro
873: .de Va
874: .if \\n(aC==0 \{\
875: . ie \\n(.$==0 .tm Usage: .Va variable_name(s) ... \\*(Pu (#\\n(.c)
876: . el \{\
877: . ds mN Va
878: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
879: . \}
880: .\}
881: .if \\n(aC>\\n(aP \{\
882: . as b1 \\*(vA
883: . nr aP \\n(aP+1
884: . nr cF \\n(.f
885: . nr cZ \\n(.s
886: . nR
887: .\}
888: ..
889: .\"
890: .\" NS No macro - Normal text macro (default text style if mess up)
891: .de No
892: .as b1 \\*(nO
893: .if \\n(aC==0 \{\
894: . ie \\n(.$==0 .tm Usage: .No must be called with arguments (#\\n(.c)
895: . el \{\
896: . ds mN No
897: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
898: . \}
899: .\}
900: .if \\n(aC>\\n(aP \{\
901: . nr aP \\n(aP+1
902: . ie \\n(C\\n(aP==1 \{\
903: . \\*(A\\n(aP
904: . \}
905: . el \{\
906: . nr cF \\n(.f
907: . nr cZ \\n(.s
908: . nR
909: . \}
910: .\}
911: ..
912: .\"------------------------------------------------------------------------
913: .\" NS Op macro - Option Expression
914: .de Op
915: .if \\n(aC==0 \{\
916: . ds mN Op
917: .\}
918: .\" .ds qL \&\\*(lO
919: .\" .ds qR \&\\*(rO
920: .ds qL \&\\*(lB
921: .ds qR \&\\*(rB
922: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
923: ..
924: .\" NS Aq macro - Enclose string in angle brackets
925: .de Aq
926: .if \\n(aC==0 .ds mN Aq
927: .ds qL \&<
928: .ds qR \&>
929: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
930: ..
931: .\" NS Bq macro - Enclose string in square brackets
932: .de Bq
933: .if \\n(aC==0 .ds mN Bq
934: .ds qL \&\\*(lB
935: .ds qR \&\\*(rB
936: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
937: ..
938: .\" NS Dq macro - Enclose string in double quotes
939: .de Dq
940: .if \\n(aC==0 .ds mN Dq
941: .ds qL \&\\*(Lq
942: .ds qR \&\\*(Rq
943: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
944: ..
945: .\" NS Eq macro - Enclose string in double quotes
946: .de Eq
947: .if \\n(aC==0 .ds mN Eq
948: .ds qL \\$1
949: .ds qR \\$2
950: .En \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
951: ..
952: .\" NS Pq macro - Enclose string in parenthesis
953: .de Pq
954: .if \\n(aC==0 .ds mN Pq
955: .ds qL \&\\*(lP
956: .ds qR \&\\*(rP
957: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
958: ..
959: .\" NS Ql macro - Quoted literal is in file mdoc-[dit|n|g]roff (too large
960: .\" an if-else to carry along recursively for `if n ...')
961: .\"
962: .\" NS Sq macro - Enclose string in single quotes
963: .de Qq
964: .if \\n(aC==0 .ds mN Qq
965: .ds qL \&\\*q
966: .ds qR \&\\*q
967: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
968: ..
969: .\" NS Sq macro - Enclose string in single quotes
970: .de Sq
971: .if \\n(aC==0 .ds mN Sq
972: .ds qL \&\\*(sL
973: .ds qR \&\\*(sR
974: .En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
975: ..
976: .\"
977: .\" NS Es macro - Set up strings for .En call
978: .de Es
979: .if \\n(aC==0 \{\
980: . ie \\n(.$>2 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
981: . el \{\
982: . ds qL \\$1
983: . ds qR \\$2
984: . \}
985: .\}
986: .if \\n(aC>\\n(aP \{\
987: . nr aP \\n(aP+1
988: . ds qL \\*(A\\n(aP
989: . nr aP \\n(aP+1
990: . ds qR \\*(A\\n(aP
991: . ie \\n(aC>\\n(aP .c\\n(C\\n(aP
992: . el .aZ
993: .\}
994: ..
995: .\" .tm En beg arg(A[\\n(aP])==\\*(A\\n(aP;
996: .\" .tm En oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
997: .\" NS En macro - Enclose string with given args (eg [ and ] etc)
998: .\" NS qL string variable set by calling macro
999: .\" NS qR string variable set by calling macro
1000: .\" NS aJ register (for vR)
1001: .de En
1002: .ie \\n(aC==0 \{\
1003: . ie \\n(.$==0 \{\
1004: . as b1 \&\\*(qL\\*(qR
1005: . pB
1006: . \}
1007: . el \{\
1008: .\". as mN (En)
1009: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1010: . as b1 \&\\*(qL
1011: . \}
1012: .\}
1013: .el \{\
1014: . as b1 \&\\*(qL
1015: .\}
1016: .if \\n(aC>0 \{\
1017: . ie (\\n(aC-\\n(aP)==0 \{\
1018: . as b1 \&\\*(qR
1019: . aZ
1020: . \}
1021: . el \{\
1022: . ie \\n(C\\n(aC==3 \{\
1023: . nr aJ \\n(aC-1
1024: . vR
1025: . nr aJ \\n(aJ+1
1026: . ds A\\n(aJ \&\\*(qR\\*(A\\n(aJ
1027: . nr aJ 0
1028: . \}
1029: . el .aI \&\\*(qR 3
1030: . nr aP \\n(aP+1
1031: . if \\n(C\\n(aP==1 .\\*(A\\n(aP
1032: . if \\n(C\\n(aP>1 \{\
1033: . nr aP \\n(aP-1
1034: . No
1035: . \}
1036: . \}
1037: .\}
1038: ..
1039: .\" NS vR macro - vector routine (for En, trace backwards past trail punct)
1040: .de vR
1041: .if \\n(C\\n(aJ==3 \{\
1042: . nr aJ \\n(aJ-1
1043: . vR
1044: .\}
1045: ..
1046: .\"------------------------------------------------------------------------
1047: .\" NS Ao macro - Angle open
1048: .de Ao
1049: .if \\n(aC==0 .ds mN Ao
1050: .ds qL \&<
1051: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1052: ..
1053: .\" NS Ac macro - Angle close
1054: .de Ac
1055: .if \\n(aC==0 .ds mN Ac
1056: .ds qR \&>
1057: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1058: ..
1059: .\" NS Bo macro - Bracket open
1060: .de Bo
1061: .if \\n(aC==0 .ds mN Bo
1062: .ds qL \&[
1063: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1064: ..
1065: .\" NS Bc macro - Bracket close
1066: .de Bc
1067: .if \\n(aC==0 .ds mN Bc
1068: .ds qR \&]
1069: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1070: ..
1071: .\" NS Do macro - Double Quote open
1072: .de Do
1073: .if \\n(aC==0 .ds mN Do
1074: .ds qL \&\\*(Lq
1075: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1076: ..
1077: .\" NS Dc macro - Double Quote close
1078: .de Dc
1079: .if \\n(aC==0 .ds mN Dc
1080: .ds qR \&\\*(Rq
1081: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1082: ..
1083: .\" NS Eo macro - Enclose open
1084: .de Eo
1085: .if \\n(aC==0 .ds mN Eo
1086: .ds qL \\$1
1087: .eO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1088: ..
1089: .\" NS Ec macro - Enclose close
1090: .de Ec
1091: .if \\n(aC==0 .ds mN Ec
1092: .ds qR \\$1
1093: .eC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1094: ..
1095: .\" NS Oo macro - Option open
1096: .de Oo
1097: .if \\n(aC==0 .ds mN Oo
1098: .ds qL \&[
1099: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1100: ..
1101: .\" NS Oc macro - Option close
1102: .de Oc
1103: .if \\n(aC==0 .ds mN Oc
1104: .ds qR \&]
1105: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1106: ..
1107: .\" NS Po macro - Parenthesis open
1108: .de Po
1109: .if \\n(aC==0 .ds mN Po
1110: .ds qL \&(
1111: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1112: ..
1113: .\" NS Pc macro - Parenthesis close
1114: .de Pc
1115: .if \\n(aC==0 .ds mN Pc
1116: .ds qR \&)
1117: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1118: ..
1119: .\" NS Qo macro - Straight Double Quote open
1120: .de Qo
1121: .if \\n(aC==0 .ds mN Qo
1122: .ds qL \&\\*q
1123: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1124: ..
1125: .\" NS Qc macro - Straight Double Quote close
1126: .de Qc
1127: .if \\n(aC==0 .ds mN Qc
1128: .ds qR \&\\*q
1129: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1130: ..
1131: .\" NS So macro - Single Quote open
1132: .de So
1133: .if \\n(aC==0 .ds mN So
1134: .ds qL \&\\*(sL
1135: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1136: ..
1137: .\" NS Sc macro - Single Quote close
1138: .de Sc
1139: .if \\n(aC==0 .ds mN Sc
1140: .ds qR \&\\*(sR
1141: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1142: ..
1143: .\" NS Xo macro - Extend open (continue)
1144: .de Xo
1145: .if \\n(aC==0 .ds mN Xo
1146: .\" .nr mN 1
1147: .ds qL
1148: .eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1149: ..
1150: .\" NS Xe macro - Extend close (end)
1151: .de Xc
1152: .\" .nr mN 0
1153: .if \\n(aC==0 .ds mN Xc
1154: .ds qR
1155: .eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1156: ..
1157: .\" NS eO macro - enclose string open
1158: .\" NS oM register (extension possible)
1159: .de eO
1160: .nr oM \\n(oM+1
1161: .\" .tm eO last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
1162: .ie \\n(aC==0 \{\
1163: . ie \\n(.$>0 \{\
1164: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1165: . as b1 \\*(qL
1166: . \}
1167: . el \{\
1168: . as b1 \\*(qL
1169: . if (\\n(dZ==0)&(\\n(sM==1) \{\
1170: . nr dZ \\n(dZ+1
1171: . ds b2 \\*(b1
1172: . ds b1
1173: . nr lK \\n(.c
1174: . ev 2
1175: . fi
1176: . di eB
1177: . \}
1178: . \}
1179: .\}
1180: .el \{\
1181: . as b1 \\*(qL
1182: .\}
1183: .ie \\n(aC>0 \{\
1184: . if \\n(aC>\\n(aP \{\
1185: . nr aP \\n(aP+1
1186: . ie \\n(C\\n(aP==1 .\\*(A\\n(aP
1187: . el \{\
1188: . nr aP \\n(aP-1
1189: . No
1190: . \}
1191: . \}
1192: . if \\n(aC==\\n(aP \{\
1193: . if \\n(tP==1 \{\
1194: .\" .tm SETTING Xt!!!
1195: . nr Xt 1
1196: . \}
1197: .\".\" . ds S0
1198: .\"CHANGED ds S0 \\*(iV
1199: . aY
1200: . \}
1201: .\}
1202: .el \{\
1203: . if \\n(oM>1 .as b1 \\*(sV
1204: .\}
1205: ..
1206: .\"
1207: .\" NS eC macro - enclose string close
1208: .\" NS aa local register
1209: .de eC
1210: .nr oM \\n(oM-1
1211: .\" tm eC last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
1212: .as b1 \\*(qR
1213: .if \\n(aC==0 \{\
1214: . ie \\n(.$>0 \{\
1215: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1216: . \}
1217: . el \{\
1218: . ie "\\*(xB"" \{\
1219: . pB
1220: . \}
1221: . el \{\
1222: . pB
1223: .\\*(L\\n(lC
1224: . nr Xt 0
1225: . ds xB
1226: . \}
1227: . \}
1228: .\}
1229: .if \\n(aC>0 \{\
1230: . ie \\n(aC==\\n(aP \{\
1231: . ie \\n(oM==0 \{\
1232: . aZ
1233: . \}
1234: . el .aY
1235: . \}
1236: . el \{\
1237: . nr aa \\n(aP+1
1238: . if \\n(C\\n(aa==2 .as b1 \\*(S\\n(aC
1239: .\" tm CURRENT arg (aP==\\*(A\\n(aP and ap+1==\\*(A\\n(aa) tP==\\n(tP Xt==\\n(Xt
1240: . rr aa
1241: . if \\n(tP>0 \{\
1242: .\" tm UNSETTING Xt==\\n(Xt!!!!
1243: . if \\n(Xt>0 .nr Xt \\n(Xt-1
1244: .\" tm NOW Xt==\\n(Xt!!!!
1245: . \}
1246: . No
1247: . \}
1248: .\}
1249: ..
1250: .\"------------------------------------------------------------------------
1251: .\" NS Pf macro - Prefix (calls .pF)
1252: .de Pf
1253: .if \\n(aC==0 .ds mN Pf
1254: .ds qL \&\\$1
1255: .pF \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1256: ..
1257: .\" NS pF macro - Prefix (for prefixing open quotes, brackets etc)
1258: .de pF
1259: .ie \\n(aC==0 \{\
1260: . as b1 \&\\*(qL
1261: . ie \\n(.$<2 \{\
1262: . tm Warning: Missing arguments - prefix .Pf)
1263: . pB
1264: . \}
1265: . el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1266: .\}
1267: .el \{\
1268: . ie (\\n(aC-\\n(aP)>1 \{\
1269: . nr aP \\n(aP+1
1270: . as b1 \&\\*(A\\n(aP
1271: . \}
1272: . el .tm Warning: .Pf: trailing prefix (#\\n(.c)
1273: .\}
1274: .if \\n(aC>0 \{\
1275: . ie (\\n(aC-\\n(aP)==0 .aZ
1276: . el \{\
1277: . nr aP \\n(aP+1
1278: . c\\n(C\\n(aP
1279: . \}
1280: .\}
1281: ..
1282: .\" NS Ns macro - remove space (space remove done by .aV or .fV)
1283: .de Ns
1284: .if \\n(aC==0 \{\
1285: . ds mN Ns
1286: . ie \\n(.$>0 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1287: . el .tm Usage: .Ns must be called with arguments (#\\n(.c)
1288: .\}
1289: .No
1290: ..
1291: .de Ap
1292: .if \\n(aC==0 \{\
1293: . ds mN Ap
1294: . tm Usage: Ap "cannot be first request on a line (no .Ap)" (#\\n(.c)
1295: .\}
1296: .as b1 \&'
1297: .No
1298: ..
1299: .\" NS Hv macro - Hard (unpaddable) Space vector
1300: .\" NS iV string inter-vector space
1301: .\" NS sV string inter-argument space
1302: .de Hv
1303: .ds iV \\*(sV
1304: .ds sV \\*(hV
1305: ..
1306: .\" NS Sv macro - Soft Space vector (troff limitation)
1307: .de Sv
1308: .ds sV \\*(iV
1309: ..
1310: .\" NS Tv macro - Tab Space vector
1311: .de Tv
1312: .ds sV \\*(tV
1313: ..
1314: .\" NS Sm macro - Space mode
1315: .\" NS sM register - default is one (space mode on)
1316: .nr sM 1
1317: .de Sm
1318: .if \\n(aC==0 \{\
1319: . ie \\n(.$==0 .tm "Usage: .Sm [off | on]" (#\\n(.c)
1320: . el \{\
1321: . ds mN Sm
1322: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1323: . \}
1324: .\}
1325: .if \\n(aC>0 \{\
1326: . nr aP \\n(aP+1
1327: . if "\\*(A\\n(aP"on" \{\
1328: . ds sV \\*(iV
1329: . nr sM 1
1330: . \}
1331: . if "\\*(A\\n(aP"off" \{\
1332: . ds sV
1333: . rm S0 S1 S2 S3 S4 S5 S6 S7 S8 S9
1334: . nr sM 0
1335: . \}
1336: . ie \\n(aC>\\n(aP \{\
1337: . No
1338: . \}
1339: . el .aY
1340: .\}
1341: ..
1342: .\"------------------------------------------------------------------------
1343: .\" Size and Argument type macros
1344: .\" NS aT macro - argument type
1345: .\" NS aU macro - argument type (same as .aT but uses A[1-9] strings
1346: .\" NS aT register argument type
1347: .if \n(.g \{\
1348: .de aT
1349: .nr aT 0
1350: .ie \\n(sW>2:(\A'\\$1'==0) \{\
1351: . nr aT 2
1352: .\}
1353: .el \{\
1354: . if \\n(sW==1 \{\
1355: . ie \\n(z\\$1>2 \{\
1356: . nr aT \\n(z\\$1
1357: . \}
1358: . el .nr aT 2
1359: . \}
1360: . if \\n(sW==2 \{\
1361: . ie \\n(\\$1 \{\
1362: . nr aT 1
1363: . \}
1364: . el .nr aT 2
1365: . \}
1366: .\}
1367: ..
1368: .de aU
1369: .nr aT 0
1370: .aW \\$1
1371: .ie \\n(sW>2:(\A'\\*(A\\$1'==0) .nr aT 2
1372: .el \{\
1373: . if \\n(sW==1 \{\
1374: . ie \\n(z\\*(A\\$1>2 \{\
1375: . nr aT \\n(z\\*(A\\$1
1376: . \}
1377: . el .nr aT 2
1378: . \}
1379: . if \\n(sW==2 \{\
1380: . ie (\\n(\\*(A\\$1) \{\
1381: . nr aT 1
1382: . \}
1383: . el .nr aT 2
1384: . \}
1385: .\}
1386: ..
1387: .\}
1388: .if !\n(.g \{\
1389: .de aT
1390: .nr aT 0
1391: .ie \\n(sW>2 \{\
1392: . nr aT 2
1393: .\}
1394: .el \{\
1395: . if \\n(sW==1 \{\
1396: . ie \\n(z\\$1>2 \{\
1397: . nr aT \\n(z\\$1
1398: . \}
1399: . el .nr aT 2
1400: . \}
1401: . if \\n(sW==2 \{\
1402: . ie \\n(\\$1 \{\
1403: . nr aT 1
1404: . \}
1405: . el .nr aT 2
1406: . \}
1407: .\}
1408: ..
1409: .de aU
1410: .nr aT 0
1411: .aW \\$1
1412: .ie \\n(sW>2 .nr aT 2
1413: .el \{\
1414: . if \\n(sW==1 \{\
1415: . ie \\n(z\\*(A\\$1>2 \{\
1416: . nr aT \\n(z\\*(A\\$1
1417: . \}
1418: . el .nr aT 2
1419: . \}
1420: . if \\n(sW==2 \{\
1421: . ie (\\n(\\*(A\\$1) \{\
1422: . nr aT 1
1423: . \}
1424: . el .nr aT 2
1425: . \}
1426: .\}
1427: ..
1428: .\}
1429: .\" NS s1 macro - set spacing for class type 1
1430: .\" NS s2 macro - set spacing for class type 2
1431: .\" NS s3 macro - set spacing for class type 3
1432: .\" NS s1 macro - set spacing for class type 1
1433: .\" NS s2 macro - set spacing for class type 2
1434: .\" NS s3 macro - set spacing for class type 3
1435: .\" NS s4 macro - set spacing for class type 4
1436: .\" NS S[0-9] string spacing
1437: .\" NS xX local register
1438: .\" NS aa local register
1439: .de s0
1440: .tm MDOC-ERROR: bogus type 0 (can't set space '\\*(A\\n(aC') (#\\n(.c)
1441: ..
1442: .de s1
1443: .if \\n(\\*(A\\n(aC==3 \{\
1444: . nr xX \\n(aC-1
1445: . rm S\\n(xX
1446: . ds S\\n(aC \\*(sV
1447: .\}
1448: .if \\n(\\*(A\\n(aC==2 \{\
1449: . nr xX \\n(aC-1
1450: .\" this kludge can probably go away, but need to double check first
1451: . ie "\\*(A\\n(aC"Nb" .ds S\\n(xX \\*(hV
1452: . el .rm S\\n(xX
1453: .\}
1454: ..
1455: .de s2
1456: .ds S\\n(aC \\*(sV
1457: ..
1458: .de s3
1459: .if \\n(aC>1 \{\
1460: . nr xX \\n(aC-1
1461: . rm S\\n(xX
1462: .\}
1463: .ds S\\n(aC \\*(sV
1464: ..
1465: .de s4
1466: .nr aa 0
1467: ..
1468: .\" Class switches (on current argument aP)
1469: .\" NS c0 macro - catch errors (non-existent class type 0)
1470: .\" NS c1 macro - call request if type 1
1471: .\" NS c2 macro - call .No if type 2
1472: .\" NS c3 macro - call .No if type 3
1473: .\" NS c4 macro - call .No if type 4
1474: .de c0
1475: .tm MDOC-ERROR: bogus class 0 (can't determine '\\*(A\\n(aC') (#\\n(.c)
1476: ..
1477: .de c1
1478: .\\*(A\\n(aP
1479: ..
1480: .de c2
1481: .nr aP \\n(aP-1
1482: .No
1483: ..
1484: .de c3
1485: .nr aP \\n(aP-1
1486: .No
1487: ..
1488: .de c4
1489: .nr aP \\n(aP-1
1490: .No
1491: ..
1492: .\" NS y1 macro - ignore if class 1
1493: .\" NS y2 macro - ignore if class 2
1494: .\" NS y3 macro - append if type 3
1495: .\" NS y4 macro - append if type 4
1496: .de y1
1497: .nr aa 1
1498: ..
1499: .de y2
1500: .nr aa 1
1501: ..
1502: .de y3
1503: .as b1 \\*(A\\n(aP
1504: .nr aP \\n(aP+1
1505: .n\\C\\n(aP
1506: ..
1507: .de y4
1508: .as b1 \\*(A\\n(aP
1509: .nr aP \\n(aP+1
1510: .n\\C\\n(aP
1511: ..
1512: .\"--------------------------------------------------------------------------
1513: .\" Ns Bf macro - Begin Font Mode (will be begin-mode/end-mode in groff & TeX)
1514: .\" Ns Ef macro - End Font Mode
1515: .de Bf
1516: .ds mN Bf
1517: .ie \\n(.$>0 \{\
1518: . nr bF \\n(.f
1519: . nr bZ \\n(.s
1520: . if "\\$1"Em" \&\\*(eM\c
1521: . if "\\$1"Li" \&\\*(lI\c
1522: . if "\\$1"Sy" \&\\*(sY\c
1523: . if "\\$1"-emphasis" \&\\*(eM\c
1524: . if "\\$1"-literal" \&\\*(lI\c
1525: . if "\\$1"-symbolic" \&\\*(sY\c
1526: .\}
1527: .el .tm Usage .Bf [Em | emphasis | Li | literal | Sy | symbolic] (#\\n(.c)
1528: ..
1529: .de Ef
1530: .ds mN Ef
1531: .ie \\n(.$>0 .tm Usage .Ef (does not take arguments) (#\\n(.c)
1532: .el \&\f\\n(bF\s\\n(bZ
1533: ..
1534: .\" Ns Bk macro - Begin Keep
1535: .\" Ns Ek macro - End Keep
1536: .\" Ns kS string - keep type
1537: .de Bk
1538: .ds mN Bk
1539: .ie \\n(.$==0 \{\
1540: .tm Usage: .Bk [-lines | -words] (#\\n(.c)
1541: .\}
1542: .el \{\
1543: . if !"\\*(kS"" .tm .Bk: nesting keeps not implemented yet. (#\\n(.c)
1544: . if "\\$1"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
1545: . if "\\$1"-words" .Hv
1546: . ds kS \\$1
1547: .\}
1548: ..
1549: .de Ek
1550: .ds mN Ek
1551: .ie \\n(.$>0 .tm Usage .Ek (does not take arguments) (#\\n(.c)
1552: .el \{\
1553: . if "\\*(kS"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
1554: . if "\\*(kS"-words" .Sv
1555: . rm kS
1556: .\}
1557: ..
1558: .\" NS Bd macro - Begin Display display-type [offset string]
1559: .\" NS Ed macro - end Display
1560: .\" NS O[0-9] registers - stack of indent
1561: .\" NS d[0-9] registers - display-type stack
1562: .de Bd
1563: .ds mN Bd
1564: .ie \\n(.$==0 \{\
1565: .tm Usage: .Bd [-literal | -filled | -ragged | -unfilled] [-offset [string]] [-compact] (#\\n(.c)
1566: .\}
1567: .el \{\
1568: . ds aa
1569: . nr bV 0
1570: . nr iD 0
1571: . nr dP \\n(dP+1
1572: . if "\\$1"-literal" \{\
1573: . nr iD \\n(iD+1
1574: . ds d\\n(dP dL
1575: . nr cF \\n(.f
1576: . nr cZ \\n(.s
1577: . ie t \{\&\\*(lI
1578: ' ta 9n 18n 27n 36n 45n 54n 63n 72n
1579: . \}
1580: . el \{\
1581: ' ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
1582: . \}
1583: . nf
1584: . \}
1585: . if "\\$1"-filled" \{\
1586: . nr iD \\n(iD+1
1587: . ds d\\n(dP dF
1588: . br
1589: . \}
1590: . if "\\$1"-ragged" \{\
1591: . nr iD \\n(iD+1
1592: . ds d\\n(dP dR
1593: . na
1594: . \}
1595: . if "\\$1"-unfilled" \{\
1596: . nr iD \\n(iD+1
1597: . ds d\\n(dP dU
1598: . nf
1599: . \}
1600: .\" .tm Here is argc: \\n(.$ and here is iD \\n(iD
1601: . if ((\\n(iD>=1)&(\\n(.$>\\n(iD)) \{\
1602: . bV \\$2 \\$3 \\$4
1603: . \}
1604: . if \\n(O\\n(dP>0 'in \\n(.iu+\\n(O\\n(dPu
1605: . if (\\n(bV==0) \{\
1606: . if (\\n(nS==0) \{\
1607: . ie "\\*(d\\n(dP"dR" .sp \\n(dVu
1608: . el 'sp \\n(dVu
1609: . \}
1610: . \}
1611: . if \\n(cR==0 .ne 2v
1612: . nr bV 0
1613: . nr iD 0
1614: .\}
1615: ..
1616: .\" NS bV macro - resolve remaining .Bd arguments
1617: .de bV
1618: .\" .tm in bV with args: \\$1 \\$2 \\$3
1619: .nr iD 1
1620: .ds bY
1621: .if "\\$1"-offset" \{\
1622: . ds bY \\$2
1623: . if "\\*(bY"left" \{\
1624: . nr iD \\n(iD+1
1625: . nr O\\n(dP 0
1626: . \}
1627: . if "\\*(bY"right" \{\
1628: . nr iD \\n(iD+1
1629: . nr O\\n(dP (\\n(.l/3)u
1630: . \}
1631: . if "\\*(bY"center" \{\
1632: . nr iD \\n(iD+1
1633: . nr O\\n(dP (\\n(.l-\\n(.i)/4u
1634: . \}
1635: . if "\\*(bY"indent" \{\
1636: . nr iD \\n(iD+1
1637: . nr O\\n(dP \\n(dIu
1638: . \}
1639: . if "\\*(bY"indent-two" \{\
1640: . nr iD \\n(iD+1
1641: . nr O\\n(dP \\n(dIu+\\n(dIu
1642: . \}
1643: . if \\n(iD==1 \{\
1644: . nr iD \\n(iD+1
1645: . sW "\\*(bY"
1646: . ie \\n(sW>2 \{\
1647: . ie ((\\*(bY>9n)&(\\*(bY<100n)) \{\
1648: . nr O\\n(dP \\*(bY
1649: . \}
1650: . el .nr O\\n(dP (\\n(sW)*\\n(fWu
1651: . \}
1652: . el \{\
1653: . if \\n(sW==2 .aT \\*(bY
1654: . ie \\n(aT==1 \{\
1655: . nr O\\n(dP \\n(\\*(bY
1656: . \}
1657: . el .nr O\\n(dP \\*(bY
1658: . \}
1659: . \}
1660: .\}
1661: .if "\\$1"-compact" \{\
1662: . nr bV 1
1663: .\}
1664: .if \\n(iD<\\n(.$ \{\
1665: . ie "\\*(bY"" \{\
1666: . bV \\$2 \\$3
1667: . \}
1668: . el \{\
1669: . bV \\$3
1670: . \}
1671: .\}
1672: ..
1673: .\" NS Ed macro - end display
1674: .de Ed
1675: .ds mN Ed
1676: .br
1677: .if \\n(dP==0 .tm mdoc: Extraneous .Ed
1678: .if "\\*(d\\n(dP"dL" \{\
1679: . ft \\n(cF
1680: . fz \\n(cZ
1681: .\}
1682: .in \\n(.iu-\\n(O\\n(dPu
1683: .rr O\\n(dP
1684: .rm d\\n(dP
1685: .nr dP \\n(dP-1
1686: .fi
1687: .if t .ad
1688: ..
1689: .\"--------------------------------------------------------------------------
1690: .\" NS Bl macro - begin list (.Bl list-type)
1691: .\" NS L[0-9] registers - stack of list types
1692: .de Bl
1693: .ie \\n(.$==0 \{\
1694: .tm Usage: .Bl [[-hang | -tag] [-width]] [ -item | -enum | -bullet | -diag] (#\\n(.c)
1695: .\}
1696: .el \{\
1697: . ds mN Bl
1698: . nr aP 0
1699: . nr lC \\n(lC+1
1700: . ds A1 \\$2
1701: . ds A2 \\$3
1702: . ds A3 \\$4
1703: . ds A4 \\$5
1704: . ds A5 \\$6
1705: . ds A6 \\$7
1706: . ds A7 \\$8
1707: . ds A8 \\$9
1708: . nr fV \\n(.$-1
1709: . if "\\$1"-hang" \{\
1710: . nr aP \\n(aP+1
1711: . ds L\\n(lC hL
1712: . nr w\\n(lC 6n
1713: . nr tC 1
1714: . \}
1715: . if "\\$1"-tag" \{\
1716: . nr aP \\n(aP+1
1717: . ds L\\n(lC tL
1718: . nr tC 1
1719: . \}
1720: . if "\\$1"-item" \{\
1721: . nr aP \\n(aP+1
1722: . ds L\\n(lC iT
1723: . nr tC 1
1724: . \}
1725: . if "\\$1"-enum" \{\
1726: . nr aP \\n(aP+1
1727: . ds L\\n(lC nU
1728: . nr w\\n(lC 3n
1729: . nr tC 1
1730: . \}
1731: . if "\\$1"-bullet" \{\
1732: . nr aP \\n(aP+1
1733: . ds L\\n(lC bU
1734: . nr w\\n(lC 2n
1735: . nr tC 1
1736: . \}
1737: . if "\\$1"-dash" \{\
1738: . nr aP \\n(aP+1
1739: . ds L\\n(lC hU
1740: . nr w\\n(lC 2n
1741: . nr tC 1
1742: . \}
1743: . if "\\$1"-hyphen" \{\
1744: . nr aP \\n(aP+1
1745: . ds L\\n(lC hU
1746: . nr w\\n(lC 2n
1747: . nr tC 1
1748: . \}
1749: . if "\\$1"-inset" \{\
1750: . nr aP \\n(aP+1
1751: . ds L\\n(lC lL
1752: . nr tC 1
1753: . \}
1754: . if "\\$1"-diag" \{\
1755: . nr aP \\n(aP+1
1756: . ds L\\n(lC mL
1757: . nr mL 1
1758: . \}
1759: . if "\\$1"-ohang" \{\
1760: . nr aP \\n(aP+1
1761: . ds L\\n(lC oL
1762: . nr tC 1
1763: . \}
1764: . if "\\$1"-column" \{\
1765: . nr aP \\n(aP+1
1766: . ds L\\n(lC cL
1767: . \}
1768: . ie \\n(aP==0 \{\
1769: . tm \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
1770: . tm Usage: .Bl [[-inset|-tag] -width] [-item|-enum|-bullet|-diag] (#\\n(.c)
1771: . \}
1772: . el \{\
1773: . tY
1774: . if (\\n(aP==1)&(\\n(aP<\\n(.$) \{\
1775: . nr aP 0
1776: . lV
1777: . if "\\*(L\\n(lC"cL" \{\
1778: . W\\n(wV
1779: . nr w\\n(lC 0
1780: ' in -\\n(eWu
1781: . ie \\n(v\\n(lC==1 \{\
1782: . nr aa 0
1783: . \}
1784: . el \{\
1785: . sp \\n(dVu
1786: . \}
1787: . nf
1788: . nr wV 0
1789: . \}
1790: . \}
1791: . \}
1792: . nr aP 0
1793: .\" . ds b1
1794: . aY
1795: .\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
1796: .\}
1797: ..
1798: .if \n(.g \{\
1799: . nr i 10
1800: . while \ni<100 \{\
1801: . nr num!\nin 1
1802: . nr i +1
1803: . \}
1804: .\}
1805: .\" NS lV macro - resolve remaining .Bl arguments
1806: .de lV
1807: .nr aP \\n(aP+1
1808: .if \\n(fV>=\\n(aP \{\
1809: . nr iD 0
1810: . if "\\*(A\\n(aP"-compact" \{\
1811: . nr iD 1
1812: . nr v\\n(lC 1
1813: . \}
1814: . if "\\*(A\\n(aP"-width" \{\
1815: . nr iD 1
1816: . nr aP \\n(aP+1
1817: . nr tW 1
1818: . ds t\\n(lC TagwidtH
1819: . ds tS \\*(A\\n(aP
1820: . aW \\n(aP
1821: . ie \\n(sW>2 \{\
1822: . nr w\\n(lC (\\n(sW)*\\n(fWu
1823: . if \\n(sW==3 \{\
1824: . ie \\n(.g \{\
1825: . if \A'\\*(tS' .if r num!\\*(tS \{\
1826: . nr w\\n(lC \\*(tS
1827: . \}
1828: . \}
1829: . el \{\
1830: . if (\\*(tS>9n)&(\\*(tS<99n) \{\
1831: . nr w\\n(lC \\*(tSu
1832: . \}
1833: . \}
1834: . \}
1835: . \}
1836: . el \{\
1837: . aT \\*(tS
1838: . ie \\n(aT==1 \{\
1839: . nr w\\n(lC \\n(\\*(tS
1840: . \}
1841: . el \{\
1842: . nr w\\n(lC \\*(tSu
1843: . \}
1844: . \}
1845: . \}
1846: . if "\\*(A\\n(aP"-offset" \{\
1847: . nr iD 1
1848: . nr aP \\n(aP+1
1849: . ie "\\*(A\\n(aP"indent" \{\
1850: . nr o\\n(lC \\n(Dsu
1851: . \}
1852: . el \{\
1853: . ds tS \\*(A\\n(aP
1854: . aW \\n(aP
1855: . ie \\n(sW>2 \{\
1856: . nr o\\n(lC (\\n(sW)*\\n(fWu
1857: . ie \\n(.g \{\
1858: . if \A'\\*(tS' .if r num!\\*(tS \{\
1859: . nr o\\n(lC \\*(tS
1860: . \}
1861: . \}
1862: . el \{\
1863: . if (\\*(tS>9n)&(\\*(tS<100n) \{\
1864: . nr o\\n(lC \\*(tS
1865: . \}
1866: . \}
1867: . \}
1868: . el \{\
1869: . ie \\n(C\\n(aP==1 .nr o\\n(lC \\n(\\*(tS
1870: . el .nr o\\n(lC \\*(tS
1871: . \}
1872: . \}
1873: . \}
1874: . if \\n(iD==0 \{\
1875: . if "\\*(L\\n(lC"cL" \{\
1876: . nr wV \\n(wV+1
1877: . ds A\\n(wV \\*(A\\n(aP
1878: . \}
1879: . \}
1880: . if \\n(fV>\\n(aP .lV
1881: .\}
1882: ..
1883: .\" NS El macro - end list
1884: .\" NS iD local register
1885: .de El
1886: .ie \\n(.$>0 \{\
1887: . tm Usage: .El (#\\n(.c)
1888: .\}
1889: .el \{\
1890: . ds mN El
1891: . nr iD 0
1892: . if "\\*(L\\n(lC"cL" \{\
1893: . nr iD 1
1894: . cC
1895: . \}
1896: . if "\\*(L\\n(lC"nU" \{\
1897: . nr nU 0
1898: . \}
1899: . if \\n(mL>0 \{\
1900: . nr iD 1
1901: . nr mL 0
1902: . tZ
1903: . nr lC \\n(lC-1
1904: . tY
1905: . \}
1906: . if "\\*(L\\n(lC"iT" \{\
1907: ' in \\n(.iu-\\n(o\\n(lCu
1908: . tZ
1909: . nr lC \\n(lC-1
1910: . tY
1911: . nr iD 1
1912: . \}
1913: . if "\\*(L\\n(lC"oL" \{\
1914: ' in \\n(.iu-\\n(o\\n(lCu
1915: . tZ
1916: . nr lC \\n(lC-1
1917: . tY
1918: . nr iD 1
1919: . \}
1920: . if "\\*(L\\n(lC"lL" \{\
1921: ' in \\n(.iu-\\n(o\\n(lCu
1922: . tZ
1923: . nr lC \\n(lC-1
1924: . tY
1925: . nr iD 1
1926: . \}
1927: . if \\n(iD==0 \{\
1928: . lE
1929: . \}
1930: . br
1931: . nr iD 0
1932: .\}
1933: ..
1934: .\" NS It macro - list item
1935: .\" NS iD local register
1936: .\" NS aA save pA font string for section FILES (no underline if nroff)
1937: .de It
1938: .if "\\*(L\\n(lC"" \{\
1939: . tm Usage .Bl -list-type [-width [string] | -compact | -offset [string]] (#\\n(.c)
1940: . tm .It \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
1941: .\}
1942: .\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
1943: .ne 3v
1944: .ie \\n(.$>0 \{\
1945: . ds mN It
1946: . ds b1
1947: . nr iD 0
1948: . ds A1 \\$1
1949: . ds A2 \\$2
1950: . ds A3 \\$3
1951: . ds A4 \\$4
1952: . ds A5 \\$5
1953: . ds A6 \\$6
1954: . ds A7 \\$7
1955: . ds A8 \\$8
1956: . ds A9 \\$9
1957: . nr fV \\n(.$
1958: . if "\\*(L\\n(lC"mL" \{\
1959: . nr iD 1
1960: . nr aP 0
1961: . aX
1962: . \\*(L\\n(lC
1963: . \}
1964: . if "\\*(L\\n(lC"cL" \{\
1965: . ds b1
1966: . nr aP 0
1967: . nr iD 1
1968: . \\*(L\\n(lC
1969: . \}
1970: . if "\\*(L\\n(lC"iT" \{\
1971: . nr aP 0
1972: . nr iD 1
1973: . \\*(L\\n(lC
1974: . \}
1975: . if \\n(iD==0 \{\
1976: . fV
1977: .\" tm ------------------------------------------------------------------------
1978: .\" tm It list-type==\\*(L\\n(lC, aP==\\n(aP
1979: .\" tm It beg arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
1980: . nr oM \\n(oM+1
1981: . nr tP 1
1982: . nr aP \\n(aP+1
1983: . nr tX \\n(C\\n(aP
1984: . ds tX \\*(A\\n(aP
1985: . if \\n(nF==1 \{\
1986: . ds aA \\*(pA
1987: . if n .ds pA \\*(nO
1988: . \}
1989: . ie \\n(C\\n(aP==1 \{\
1990: . \\*(A\\n(aP
1991: . \}
1992: . el \{\
1993: . nr aP \\n(aP-1
1994: . No
1995: . \}
1996: .\" tm in It here is b1==\\*(b1
1997: .\" tm It mid arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
1998: . ie \\n(Xt==1 .ds xB \&\\*(L\\n(lC
1999: . el .\\*(L\\n(lC
2000: . \}
2001: . nr iD 0
2002: .\}
2003: .el .\\*(L\\n(lC
2004: ..
2005: .\" NS lL macro - .It item of list-type inset
2006: .de lL
2007: .lY
2008: .br
2009: \&\\*(b1
2010: .nr oM \\n(oM-1
2011: .nr tP 0
2012: .ds b1
2013: .aY
2014: 'fi
2015: ..
2016: .\" NS hL macro - .It item of list-type hanging label (as opposed to tagged)
2017: .de hL
2018: .lX
2019: .nr bb \\n(w\\n(lCu+\\n(lSu
2020: .ti -\\n(bbu
2021: .ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
2022: .el \&\\*(b1\h'|\\n(bbu'\c
2023: .nr oM \\n(oM-1
2024: .ds b1
2025: .nr tP 0
2026: .aY
2027: 'fi
2028: ..
2029: .\" NS oL macro - .It item of list-type overhanging label
2030: .de oL
2031: .lY
2032: \&\\*(b1
2033: .br
2034: .nr oM \\n(oM-1
2035: .ds b1
2036: .nr tP 0
2037: .aY
2038: 'fi
2039: ..
2040: .\" NS iT macro - .It item of list-type [empty label]
2041: .de iT
2042: .lY
2043: .br
2044: .\" .ds b1
2045: .aY
2046: 'fi
2047: ..
2048: .\" NS nU macro - Enumerated list
2049: .\" NS nU register count
2050: .\" NS hU macro - Hyphen paragraph list (sub bullet list)
2051: .\" NS bU macro - Bullet paragraph list
2052: .de nU
2053: .nr oM \\n(oM+1
2054: .nr nU \\n(nU+1
2055: .ds b1 \&\\n(nU.
2056: .uL
2057: ..
2058: .de bU
2059: .nr oM \\n(oM+1
2060: .nr bU \\n(bU+1
2061: .ds b1 \&\\*(sY\&\(bu\fP
2062: .uL
2063: ..
2064: .de hU
2065: .nr oM \\n(oM+1
2066: .nr bU \\n(bU+1
2067: .ds b1 \&\\*(sY\&\-\fP
2068: .uL
2069: ..
2070: .\" NS uL macro - .It item of list-type enum/bullet/hyphen
2071: .de uL
2072: .lX
2073: .nr bb \\n(w\\n(lCu+\\n(lSu
2074: .ti -\\n(bbu
2075: .ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
2076: .el \&\\*(b1\h'|\\n(bbu'\c
2077: .nr oM \\n(oM-1
2078: .\" .nr dZ \\n(dZ+1
2079: .ds b1
2080: .nr tP 0
2081: .aY
2082: 'fi
2083: ..
2084: .\" NS mL macro - .It item of list-type diagnostic-message
2085: .de mL
2086: .nr cF \\n(.f
2087: .nr cZ \\n(.s
2088: .ie \\n(mL==1 \{\
2089: . nr zB \\n(.c
2090: . ie (\\n(zB-\\n(zA)>1 .Pp
2091: . el .br
2092: . nr zA \\n(zB
2093: . nr zB 0
2094: .\}
2095: .el \{\
2096: . nr zA \\n(.c
2097: . br
2098: .\}
2099: \&\\*(sY\\*(b1\f\\n(cF\s\\n(cZ\\*(lS\c
2100: .aY
2101: .ds b1
2102: 'fi
2103: ..
2104: .\" NS tL macro - .It item of list-type "tag"
2105: .de tL
2106: .\" tm in tL here is b1==\\*(b1
2107: .if \\n(tW==0 .lW
2108: .lX
2109: .nr bb \\n(w\\n(lCu+\\n(lSu
2110: .ti -\\n(bbu
2111: .ie (\w\\*(b1u)>(\\n(w\\n(lCu) \{\&\\*(b1
2112: . br
2113: .\}
2114: .el \&\\*(b1\h'|\\n(bbu'\c
2115: .if \\n(nF==1 \{\
2116: . if n .ds pA \\*(aA
2117: .\}
2118: .nr oM \\n(oM-1
2119: .nr tP 0
2120: .\" .nr dZ \\n(dZ+1
2121: .ds b1
2122: .aY
2123: 'fi
2124: ..
2125: .\" NS lW macro - resolve unknown label/tag width (if .Bl [inset | tag] only)
2126: .de lW
2127: .if !"TagwidtH"\\*(t\\n(lC" \{\
2128: . ie \\n(tX==1 \{\
2129: . ds t\\n(lN \\*(tX
2130: . nr w\\n(lN \\n(\\*(tX
2131: . \}
2132: . el \{\
2133: . ds t\\n(lN No
2134: . nr w\\n(lN \\n(No
2135: . \}
2136: . if !"\\*(t\\n(lC"\\*(t\\n(lN" .nr tC 1
2137: .\}
2138: ..
2139: .\" NS lX macro - set up vertical spacing (if compact) and offset+indent (all)
2140: .de lX
2141: .ie \\n(tC \{\
2142: . nr tC 0
2143: . nr tW 0
2144: . if \\n(v\\n(lC==0 .sp \\n(dVu
2145: . in \\n(.iu+\\n(w\\n(lCu+\\n(o\\n(lCu+\\n(lSu
2146: .\}
2147: .el \{\
2148: . ie \\n(v\\n(lC==1 \{\
2149: . nr aa 0
2150: . \}
2151: . el \{\
2152: . sp \\n(dVu
2153: . \}
2154: .\}
2155: .if !\\n(cR .ne 2v
2156: ..
2157: .\" NS lY macro - set up vertical spacing (if compact) and offset+indent (all)
2158: .de lY
2159: .ie \\n(tC \{\
2160: . nr tC 0
2161: . nr tW 0
2162: . if \\n(v\\n(lC==0 .sp \\n(dVu
2163: . in \\n(.iu+\\n(o\\n(lCu
2164: .\}
2165: .el \{\
2166: . ie \\n(v\\n(lC==1 \{\
2167: . nr aa 0
2168: . \}
2169: . el \{\
2170: . sp \\n(dVu
2171: . \}
2172: .\}
2173: .if !\\n(cR .ne 2v
2174: ..
2175: .\" NS tS temporary string
2176: .\" NS hL macro - hanging list function
2177: .\" NS tS temporary string
2178: .\" NS hL macro - hanging list function
2179: .\" NS lT macro - tagged list function
2180: .\" NS lE macro - list end function
2181: .\" NS tX string (initial string)
2182: .\" NS tX register (initial class)
2183: .\" NS tC parameter change flag
2184: .\" NS Xt save current list-type flag
2185: .\" NS lC register - list type stack counter
2186: .\" NS tP register tag flag (for diversions)
2187: .\" NS w[0-9] register tag stack (nested tags)
2188: .\" NS t[0-9] register tag string stack (nested tags)
2189: .\" NS o[0-9] register offset stack (nested tags)
2190: .\" NS v[0-9] register vertical tag break stack
2191: .\" NS h[0-9] register horizontal tag stack (continuous if 1, break if 0)
2192: .nr lC 0
2193: .nr wV 0
2194: .nr w1 0
2195: .nr o1 0
2196: .nr v1 0
2197: .nr h1 0
2198: .ds t\n(lC
2199: .de lE
2200: .\" IN lC o[\\n(lC]==\\n(o\\n(lC, w[\\n(lC]==\\n(w\\n(lC,
2201: .ie \\n(o\\n(lC>0 \{\
2202: ' in \\n(.iu-(\\n(w\\n(lCu)-(\\n(o\\n(lCu)-\\n(lSu
2203: . rr o\\n(lC
2204: .\}
2205: .el 'in \\n(.iu-\\n(w\\n(lCu-\\n(lSu
2206: .if \\n(lC<=0 .tm Extraneous .El call (#\\n(.c)
2207: .tZ
2208: .nr lC \\n(lC-1
2209: .tY
2210: ..
2211: .\" NS tY macro - set up next block for list
2212: .\" NS tZ macro - decrement stack
2213: .\" NS tY register (next possible lC value)
2214: .de tY
2215: .nr tY (\\n(lC+1)
2216: .nr w\\n(tY 0
2217: .nr h\\n(tY 0
2218: .nr o\\n(tY 0
2219: .ds t\\n(tY \\*(t\\n(lC
2220: .ds L\\n(tY
2221: .nr v\\n(tY 0
2222: ..
2223: .de tZ
2224: .rm L\\n(tY
2225: .rr w\\n(tY
2226: .rr h\\n(tY
2227: .rr o\\n(tY
2228: .rm t\\n(tY
2229: .rr v\\n(tY
2230: .nr tY \\n(tY-1
2231: ..
2232: .\" initial values
2233: .nr w1 0
2234: .nr o1 0
2235: .nr h1 0
2236: .ds t1
2237: .nr v1 0
2238: .nr tY 1
2239: .\" NS Xr macro - cross reference (man page only)
2240: .de Xr
2241: .if \\n(aC==0 \{\
2242: . ie \\n(.$==0 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
2243: . el \{\
2244: . ds mN Xr
2245: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2246: . \}
2247: .\}
2248: .if \\n(aC>\\n(aP \{\
2249: . nr aP \\n(aP+1
2250: . ie \\n(C\\n(aP==1 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
2251: . el \{\
2252: . ie \\n(C\\n(aP>2 .y\\n(C\\n(aP
2253: . el \{\
2254: . as b1 \&\\*(xR\\*(A\\n(aP\fP\s0
2255: . if \\n(aC>\\n(aP \{\
2256: . nr aP \\n(aP+1
2257: . if \\n(C\\n(aP==2 \{\
2258: . as b1 \&(\\*(A\\n(aP)
2259: . nr aP \\n(aP+1
2260: . \}
2261: . if \\n(aC>=\\n(aP \{\
2262: . c\\n(C\\n(aP
2263: . \}
2264: . \}
2265: . \}
2266: . aZ
2267: . \}
2268: .\}
2269: ..
2270: .\" NS Sx macro - cross section reference
2271: .de Sx
2272: .if \\n(aC==0 \{\
2273: . ie \\n(.$==0 .tm Sx Usage: .Sx Section Header \\*(Pu (#\\n(.c)
2274: . el \{\
2275: . ds mN Sx
2276: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2277: . \}
2278: .\}
2279: .\}
2280: .if \\n(aC>\\n(aP \{\
2281: . nr aP \\n(aP+1
2282: . as b1 \\*(sX
2283: . nr cF \\n(.f
2284: . nr cZ \\n(.s
2285: . nR
2286: .\}
2287: ..
2288: .\" NS cC macro - column-list end-list
2289: .\" NS eW macro - column indent width
2290: .\" NS cI register - column indent width
2291: .\" NS W[1-5] macro - establish tabs for list-type column
2292: .de cC
2293: 'in \\n(.iu-\\n(o\\n(lCu-\\n(w\\n(lCu
2294: .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
2295: .fi
2296: .tZ
2297: .nr lC \\n(lC-1
2298: .tY
2299: ..
2300: .de W1
2301: .ta \w\\*(A1 u
2302: .nr eW \w\\*(A1 u
2303: 'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2304: ..
2305: .de W2
2306: .ta \w\\*(A1 u +\w\\*(A2 u
2307: .nr eW \w\\*(A1 u+\w\\*(A2 u
2308: 'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2309: ..
2310: .de W3
2311: .ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u
2312: .nr eW \w\\*(A1 u+\w\\*(A2 u+\w\\*(A3 u
2313: 'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2314: ..
2315: .de W4
2316: .ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u
2317: .nr eW \w\\*(A1 u+\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u
2318: 'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2319: ..
2320: .de W5
2321: .ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u
2322: .nr eW \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u
2323: ' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2324: ..
2325: .\" This is packed abnormally close, intercol width should be an option
2326: .de W6
2327: .ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
2328: .nr eW \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
2329: ' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
2330: ..
2331: .\" NS cL macro - column items
2332: .de cL
2333: .if \\n(w\\n(lC==0 .nr w\\n(lC \\n(eWu
2334: .if \\n(.u==0 \{\
2335: . fi
2336: ' in \\n(.iu+\\n(eWu
2337: .\}
2338: .ti -\\n(eWu
2339: .fV
2340: .nr aP \\n(aP+1
2341: .ie \\n(aC>=\\n(aP \{\
2342: . if "\\*(A\\n(aP"Ta" \{\
2343: . nr jJ \\n(aP-1
2344: . rm S\\n(jJ
2345: . rr jJ
2346: . \}
2347: . c\\n(C\\n(aP
2348: .\}
2349: .el .tm Usage: .It column_string [Ta [column_string ...] ] (#\\n(.c)
2350: ..
2351: .\" NS Ta macro - append tab (\t)
2352: .de Ta
2353: .ie \\n(aC>0 \{\
2354: . nr aP \\n(aP+1
2355: . ie \\n(aC>=\\n(aP \{\
2356: . if "\\*(A\\n(aP"Ta" \{\
2357: . nr jJ \\n(aP-1
2358: . rm S\\n(jJ
2359: . rr jJ
2360: . \}
2361: . as b1 \\t
2362: . c\\n(C\\n(aP
2363: . \}
2364: . el \{\
2365: . as b1 \\t\\c
2366: . rm S\\n(aP
2367: . pB
2368: . aY
2369: .\" . ds b1
2370: . \}
2371: .\}
2372: .el \{\
2373: . tm Usage: Ta must follow column entry: e.g. (#\\n(.c)
2374: . tm .It column_string [Ta [column_string ...] ]
2375: .\}
2376: ..
2377: .\"
2378: .\" NS Dl macro - display (one line) literal
2379: .de Dl
2380: 'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
2381: .in \\n(.iu+\\n(Dsu
2382: .ie \\n(aC==0 \{\
2383: . ie \\n(.$==0 \{\
2384: . tm Usage: .Dl argument ... (#\\n(.c)
2385: . \}
2386: . el \{\
2387: . ds mN Dl
2388: . ds A1 \\$1
2389: . ds A2 \\$2
2390: . ds A3 \\$3
2391: . ds A4 \\$4
2392: . ds A5 \\$5
2393: . ds A6 \\$6
2394: . ds A7 \\$7
2395: . ds A8 \\$8
2396: . ds A9 \\$9
2397: . nr fV \\n(.$
2398: . fV
2399: . Li
2400: . \}
2401: .\}
2402: .el \{\
2403: . tm Usage: .Dl not callable by other macros (#\\n(.c)
2404: .\}
2405: .in \\n(.iu-\\n(Dsu
2406: ..
2407: .\"
2408: .\" NS D1 macro - display (one line)
2409: .de D1
2410: 'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
2411: .in \\n(.iu+\\n(Dsu
2412: .ie \\n(aC==0 \{\
2413: . ie \\n(.$==0 \{\
2414: . tm Usage: .D1 argument ... (#\\n(.c)
2415: . \}
2416: . el \{\
2417: . ds mN D1
2418: . ds A1 \\$1
2419: . ds A2 \\$2
2420: . ds A3 \\$3
2421: . ds A4 \\$4
2422: . ds A5 \\$5
2423: . ds A6 \\$6
2424: . ds A7 \\$7
2425: . ds A8 \\$8
2426: . ds A9 \\$9
2427: . nr fV \\n(.$
2428: . fV
2429: . nr aP \\n(aP+1
2430: . ie \\n(C\\n(aP==1 .\\*(A\\n(aP
2431: . el .No
2432: . \}
2433: .\}
2434: .el \{\
2435: . tm Usage: .D1 not callable by other macros (#\\n(.c)
2436: .\}
2437: .in \\n(.iu-\\n(Dsu
2438: ..
2439: .\" NS Ex macro - DEFUNCT
2440: .de Ex
2441: .tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2442: ..
2443: .\"
2444: .\" NS Ex macro - DEFUNCT
2445: .de Ex
2446: .tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2447: ..
2448: .\"
2449: .\" NS Vt macro - Variable type (for forcing old style variable declarations)
2450: .\" this is not done in the same manner as .Ot for fortrash - clean up later
2451: .de Vt
2452: .\" if a function declaration was the last thing given, want vertical space
2453: .if \\n(fD>0 \{\
2454: . Pp
2455: . nr fD 0
2456: .\}
2457: .\" if a subroutine was the last thing given, want vertical space
2458: .if \\n(fZ>0 \{\
2459: . ie \\n(fX==0 \{\
2460: . Pp
2461: . rs
2462: . \}
2463: . el .br
2464: .\}
2465: .nr fX \\n(fX+1
2466: .nr cF \\n(.f
2467: .nr cZ \\n(.s
2468: \\*(fT\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2469: .ie \\n(oT==0 .br
2470: .el \&\ \&
2471: .ft \\n(cF
2472: .fs \\n(cZ
2473: ..
2474: .\"
2475: .\" NS Ft macro - Function type
2476: .nr fZ 0
2477: .de Ft
2478: .if \\n(nS>0 \{\
2479: . if \\n(fZ>0 \{\
2480: . Pp
2481: . nr fD 0
2482: . nr fX 0
2483: . \}
2484: . if \\n(fD>0 \{\
2485: . Pp
2486: . nr fD 0
2487: . nr fX 0
2488: . \}
2489: . if \\n(fX>0 \{\
2490: . Pp
2491: . nr fX 0
2492: . \}
2493: . nr fY 1
2494: .\}
2495: .nr cF \\n(.f
2496: .nr cZ \\n(.s
2497: \&\\*(fT\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2498: .ft \\n(cF
2499: .fs \\n(cZ
2500: .\" .br
2501: ..
2502: .\"
2503: .\" NS Ot macro - Old Function type (fortran - no newline)
2504: .\" Ns oT register
2505: .nr oT 0
2506: .de Ot
2507: .nr oT 1
2508: .if \\n(nS>0 \{\
2509: . if \\n(fZ>0 \{\
2510: . Pp
2511: . nr fD 0
2512: . nr fX 0
2513: . \}
2514: . if \\n(fD>0 \{\
2515: . Pp
2516: . nr fD 0
2517: . nr fX 0
2518: . \}
2519: . if \\n(fX>0 \{\
2520: . Pp
2521: . nr fX 0
2522: . \}
2523: . nr fY 1
2524: .\}
2525: .if \\n(.$==4 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3 \\$4
2526: .if \\n(.$==3 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3
2527: .if \\n(.$==2 .as b1 \&\\*(fT\&\\$1 \\$2
2528: .if \\n(.$==1 .as b1 \&\\*(fT\&\\$1
2529: .as b1 \&\ \fP
2530: ..
2531: .\"
2532: .\" NS Fa macro - Function arguments
2533: .de Fa
2534: .if \\n(aC==0 \{\
2535: . ie \\n(.$==0 .tm Usage: .Fa Function Arguments ... \\*(Pu (#\\n(.c)
2536: . el \{\
2537: . ds mN Fa
2538: . ds A1 \\$1
2539: . ds A2 \\$2
2540: . ds A3 \\$3
2541: . ds A4 \\$4
2542: . ds A5 \\$5
2543: . ds A6 \\$6
2544: . ds A7 \\$7
2545: . ds A8 \\$8
2546: . ds A9 \\$9
2547: . nr fV \\n(.$
2548: . fV
2549: . \}
2550: .\}
2551: .ie \\n(fC>0 \{\
2552: . fC
2553: .\}
2554: .el \{\
2555: . if \\n(aC>\\n(aP \{\
2556: . as b1 \\*(fA
2557: . nr aP \\n(aP+1
2558: . nr cF \\n(.f
2559: . nr cZ \\n(.s
2560: . nR
2561: . if \\n(nS>0 \{\
2562: . if \\n(fZ>0 .br
2563: . \}
2564: . \}
2565: .\}
2566: ..
2567: .\" NS fC macro - interal .Fa for .FO and .Fc
2568: .de fC
2569: .ie \\n(aC>\\n(aP \{\
2570: . nr aP \\n(aP+1
2571: .\" . nr aa \\n(aP
2572: .\" . if \\n(nS>0 \{\
2573: . ds Fb
2574: . nr fB 0
2575: . nr Fb 0
2576: . fB \\*(A\\n(aP
2577: . if \\n(fB>1 \{\
2578: . rm A\\n(aP
2579: . rn Fb A\\n(aP
2580: . \}
2581: .\" . \}
2582: . if \\n(fC>1 \{\
2583: . as b1 \&\f\\n(cF\s\\n(cZ,\\*(S\\n(aP\\*(fA\\*(A\\n(aP\fP\s0
2584: .\" . as b1 \&\\,\\*(S\\n(aP\fP\s0\\*(fA\\*(A\\n(aP\fP\s0
2585: . \}
2586: . if \\n(fC==1 \{\
2587: . as b1 \&\|\\*(fA\\*(A\\n(aP\fP\s0
2588: . \}
2589: . nr fC \\n(fC+1
2590: . fC
2591: .\}
2592: .el \{\
2593: . aY
2594: .\}
2595: ..
2596: .\" NS Fn macro - functions
2597: .\" NS fY register - dick with old style function declarations (fortran)
2598: .\" NS fZ register - break a line when more than one function in a synopsis
2599: .\"
2600: .de Fn
2601: .if \\n(aC==0 \{\
2602: . ie \\n(.$==0 .tm Usage: .Fn function_name function_arg(s) ... \\*(Pu (#\\n(.c)
2603: . el \{\
2604: . ds mN Fn
2605: . ds A1 \\$1
2606: . ds A2 \\$2
2607: . ds A3 \\$3
2608: . ds A4 \\$4
2609: . ds A5 \\$5
2610: . ds A6 \\$6
2611: . ds A7 \\$7
2612: . ds A8 \\$8
2613: . ds A9 \\$9
2614: . nr fV \\n(.$
2615: . fV
2616: . \}
2617: .\}
2618: .if \\n(nS>0 \{\
2619: .\" if there is/has been more than one subroutine declaration
2620: . if \\n(fY==0 \{\
2621: . if \\n(fZ>0 \{\
2622: . Pp
2623: . nr fX 0
2624: . nr fD 0
2625: . \}
2626: . \}
2627: . if \\n(fY==1 \{\
2628: . br
2629: . nr fX 0
2630: . nr fD 0
2631: . nr fY 0
2632: . \}
2633: . if \\n(fD>0 \{\
2634: . Pp
2635: . nr fX 0
2636: . \}
2637: . if \\n(fX>0 \{\
2638: . Pp
2639: . nr fD 0
2640: . \}
2641: . nr fZ \\n(fZ+1
2642: . nr fY 0
2643: . rs
2644: . ie \\n(nS>1 .br
2645: . el \{\
2646: . if \\n(iS==0 \{\
2647: . nr iS ((8)*\\n(fW)u
2648: . \}
2649: . \}
2650: . in +\\n(iSu
2651: . ti -\\n(iSu
2652: . nr nS \\n(nS+1
2653: .\}
2654: .if \\n(aC>\\n(aP \{\
2655: . nr aP \\n(aP+1
2656: . nr cF \\n(.f
2657: . nr cZ \\n(.s
2658: . as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
2659: . ie \\n(aC>\\n(aP \{\
2660: . as b1 \\*(fA
2661: . nr aP \\n(aP+1
2662: . f\\n(C\\n(aP
2663: . \}
2664: . el \{\
2665: . as b1 \|\\*(rp
2666: . aZ
2667: . \}
2668: . if \\n(nS>0 \{\
2669: . in -\\n(iSu
2670: . \}
2671: .\}
2672: ..
2673: .\"
2674: .\" NS f1 macro - class switch
2675: .\" NS f2 macro - handle function arguments
2676: .\" NS f3 macro - punctuation
2677: .\" NS f4 macro - write out function
2678: .de f1
2679: .as b1 \\*(rp\f\\n(cF\s\\n(cZ
2680: .\\*(A\\n(aP
2681: ..
2682: .de f2
2683: .if \\n(nS>0 \{\
2684: . ds Fb
2685: . nr fB 0
2686: . nr Fb 0
2687: . fB \\*(A\\n(aP
2688: . if \\n(fB>1 \{\
2689: . rm A\\n(aP
2690: . rn Fb A\\n(aP
2691: . \}
2692: .\}
2693: .as b1 \\*(A\\n(aP
2694: .ie \\n(aC>\\n(aP \{\
2695: . nr aa \\n(aP
2696: . nr aP \\n(aP+1
2697: . if \\n(C\\n(aP==2 \{\
2698: . as b1 \&\|\f\\n(cF\s\\n(cZ,\\*(S\\n(aa\fP\s0\|
2699: . \}
2700: . f\\n(C\\n(aP
2701: .\}
2702: .el \{\
2703: . as b1 \\*(rp\f\\n(cF\s\\n(cZ
2704: . aZ
2705: .\}
2706: ..
2707: .de f3
2708: .as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(A\\n(aP
2709: .ie \\n(aC>\\n(aP \{\
2710: . No
2711: .\}
2712: .el .aZ
2713: ..
2714: .de f4
2715: .as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(S\\n(aP\\*(A\\n(aP
2716: .ie \\n(aC>\\n(aP \{\
2717: . nr aP \\n(aP+1
2718: . No
2719: .\}
2720: .el .aZ
2721: ..
2722: .de Fo
2723: .hy 0
2724: .if \\n(aC==0 \{\
2725: . ie \\n(.$==0 .tm Usage: .Fo function_name
2726: . el \{\
2727: . ds mN Fo
2728: . ds A1 \\$1
2729: . ds A2 \\$2
2730: . ds A3 \\$3
2731: . ds A4 \\$4
2732: . ds A5 \\$5
2733: . ds A6 \\$6
2734: . ds A7 \\$7
2735: . ds A8 \\$8
2736: . ds A9 \\$9
2737: . nr fV \\n(.$
2738: . fV
2739: . \}
2740: .\}
2741: .if \\n(nS>0 \{\
2742: .\" if there is/has been more than one subroutine declaration
2743: . if \\n(fY==0 \{\
2744: . if \\n(fZ>0 \{\
2745: . Pp
2746: . nr fX 0
2747: . nr fD 0
2748: . \}
2749: . \}
2750: . if \\n(fY==1 \{\
2751: . br
2752: . nr fX 0
2753: . nr fD 0
2754: . nr fY 0
2755: . \}
2756: . if \\n(fD>0 \{\
2757: . Pp
2758: . nr fX 0
2759: . \}
2760: . if \\n(fX>0 \{\
2761: . Pp
2762: . nr fD 0
2763: . \}
2764: . nr fZ \\n(fZ+1
2765: . nr fY 0
2766: . rs
2767: . ie \\n(nS>1 .br
2768: . el \{\
2769: . if \\n(iS==0 \{\
2770: . nr iS ((8)*\\n(fW)u
2771: . \}
2772: . \}
2773: . in +\\n(iSu
2774: . ti -\\n(iSu
2775: . nr nS \\n(nS+1
2776: .\}
2777: .if \\n(aC>\\n(aP \{\
2778: . nr oM \\n(oM+1
2779: . nr fC 1
2780: . nr aP \\n(aP+1
2781: . nr cF \\n(.f
2782: . nr cZ \\n(.s
2783: . as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
2784: . aY
2785: .\}
2786: ..
2787: .de Fc
2788: .if \\n(aC==0 \{\
2789: . if \\n(.$>0 \{\
2790: . ds mN Fo
2791: . ds A1 \\$1
2792: . ds A2 \\$2
2793: . ds A3 \\$3
2794: . ds A4 \\$4
2795: . ds A5 \\$5
2796: . ds A6 \\$6
2797: . ds A7 \\$7
2798: . ds A8 \\$8
2799: . ds A9 \\$9
2800: . nr fV \\n(.$
2801: . fV
2802: . \}
2803: .\}
2804: .nr fC 0
2805: .nr oM \\n(oM-1
2806: .as b1 \|\\*(rp
2807: .ie \\n(aC>\\n(aP \{\
2808: . nr aP \\n(aP+1
2809: . \\*(A\\n(aP
2810: .\}
2811: .el \{\
2812: . aZ
2813: .\}
2814: .if \\n(nS>0 \{\
2815: . in -\\n(iSu
2816: .\}
2817: .hy
2818: ..
2819: .\" NS fb macro - if SYNOPSIS, set hard space inbetween function args
2820: .\" NS fb register - count of words in a function argument
2821: .\" NS Fb register - counter
2822: .\" NS Fb string - temporary string
2823: .de fB
2824: .\" .tm fB==\\n(fB, Fb==\\n(Fb, 1==\\$1 2==\\$2 3==\\$3 4==\\$4 5==\\$5 6==\\$6
2825: .if \\n(fB==0 \{\
2826: . nr fB \\n(.$
2827: . nr Fb 0
2828: . ds Fb
2829: .\}
2830: .nr Fb \\n(Fb+1
2831: .as Fb \&\\$1
2832: .if \\n(Fb<\\n(fB \{\
2833: . as Fb \&\\*(hV
2834: . fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2835: .\}
2836: ..
2837: .\" NS Fc - Function close - not implemented yet
2838: .\" NS Fo - Function open - not implemented yet
2839: .\"
2840: .\" Very crude references, stash all reference info into strings (usual
2841: .\" use of b1 buffer, then b1 contents copied to string of retrievable
2842: .\" naming convention), print out reference on .Re request and clean up.
2843: .\" Ordering very limited, no fancy citations, but can do articles, journals
2844: .\" and books - need to add several missing options (like city etc).
2845: .\" should be able to grab a refer entry, massage it a wee bit (prefix
2846: .\" a `.' to the %[A-Z]) and not worry (ha!)
2847: .\"
2848: .\" NS Rs macro - Reference Start
2849: .\" NS rS register - Reference Start flag
2850: .\" NS rS string - Reference Start buffer name for next save (of b1 buffer)
2851: .de Rs
2852: .nr rS 1
2853: .rC
2854: .if \\n(nA==1 .Pp
2855: .nr Kl 0
2856: ..
2857: .\" NS Re macro - Reference End
2858: .de Re
2859: .rZ
2860: .rC
2861: .nr rS 0
2862: ..
2863: .\" NS rC macro - reference cleanup
2864: .de rC
2865: .nr uK 0
2866: .nr jK 0
2867: .nr nK 0
2868: .nr oK 0
2869: .nr qK 0
2870: .nr rK 0
2871: .nr tK 0
2872: .nr vK 0
2873: .nr dK 0
2874: .nr pK 0
2875: .nr bK 0
2876: .ds rS
2877: .rm U1 U2 U3 U4 U5 U6 U7 U8
2878: .rm uK jK nK oK rK qK tK vK dK pK bK
2879: ..
2880: .\" NS rZ macro - reference print
2881: .de rZ
2882: .if \\n(uK \{\&\\*(U1,
2883: . nr aK 1
2884: . if (\\n(uK>1 \{\
2885: . aK
2886: . \}
2887: . nr Kl -\\n(uK
2888: .\}
2889: .if \\n(tK \{\
2890: . nr Kl \\n(Kl-1
2891: . if \\n(Kl==0 \{\
2892: . ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q.
2893: . \}
2894: . el \{\&\\*(eM\\*(tK\\*(nO.
2895: . \}
2896: . \}
2897: . if \\n(Kl>0 \{\
2898: . ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q,
2899: . \}
2900: . el \{\&\\*(eM\\*(tK\\*(nO,
2901: . \}
2902: . \}
2903: .\}
2904: .if \\n(bK \{\
2905: . nr Kl \\n(Kl-1
2906: . if \\n(Kl==0 \&\\*(eM\\*(bK\\*(nO.
2907: . if \\n(Kl>0 \&\\*(eM\\*(bK\\*(nO,
2908: .\}
2909: .if \\n(jK \{\
2910: . nr Kl \\n(Kl-1
2911: . if \\n(Kl==0 \&\\*(eM\\*(jK\\*(nO.
2912: . if \\n(Kl>0 \&\\*(eM\\*(jK\\*(nO,
2913: .\}
2914: .if \\n(rK \{\
2915: . nr Kl \\n(Kl-1
2916: . if \\n(Kl==0 \&\\*(rK.
2917: . if \\n(Kl>0 \&\\*(rK,
2918: .\}
2919: .if \\n(nK \{\
2920: . nr Kl \\n(Kl-1
2921: . if \\n(Kl==0 \&\\*(nK.
2922: . if \\n(Kl>0 \&\\*(nK,
2923: .\}
2924: .if \\n(vK \{\
2925: . nr Kl \\n(Kl-1
2926: . if \\n(Kl==0 \&\\*(vK.
2927: . if \\n(Kl>0 \&\\*(vK,
2928: .\}
2929: .if \\n(pK \{\
2930: . nr Kl \\n(Kl-1
2931: . if \\n(Kl==0 \&\\*(pK.
2932: . if \\n(Kl>0 \&\\*(pK,
2933: .\}
2934: .if \\n(qK \{\
2935: . nr Kl \\n(Kl-1
2936: . if \\n(Kl==0 \&\\*(qK.
2937: . if \\n(Kl>0 \&\\*(qK,
2938: .\}
2939: .if \\n(dK \{\
2940: . nr Kl \\n(Kl-1
2941: . if \\n(Kl==0 \&\\*(dK.
2942: . if \\n(Kl>0 \&\\*(dK,
2943: .\}
2944: .if \\n(oK \{\
2945: . nr Kl \\n(Kl-1
2946: . if \\n(Kl==0 \&\\*(oK.
2947: . if \\n(Kl>0 \&\\*(oK,
2948: .\}
2949: .if \\n(Kl>0 .tm unresolved reference problem
2950: ..
2951: .\" NS aK macro - print out reference authors
2952: .de aK
2953: .nr aK \\n(aK+1
2954: .ie (\\n(uK-\\n(aK)==0 \{\&and \\*(U\\n(aK,
2955: .\}
2956: .el \{\&\\*(U\\n(aK,
2957: . aK
2958: .\}
2959: ..
2960: .\" NS %A macro - reference author(s)
2961: .\" NS uK register - reference author(s) counter
2962: .\" NS U[1-9] strings - reference author(s) names
2963: .de %A
2964: .if \\n(aC==0 \{\
2965: . ie \\n(.$==0 .tm Usage: .%A Author_name (#\\n(.c)
2966: . el \{\
2967: . nr uK \\n(uK+1
2968: . nr Kl \\n(Kl+1
2969: . ds rS U\\n(uK
2970: . ds mN %A
2971: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
2972: . \}
2973: .\}
2974: .if \\n(aC>\\n(aP \{\
2975: . nr aP \\n(aP+1
2976: . nr cF \\n(.f
2977: . nr cZ \\n(.s
2978: . rR
2979: .\}
2980: ..
2981: .\" NS %B macro - [reference] Book Name
2982: .\" NS bK string - Book Name
2983: .\" NS bK register - Book Name flag
2984: .de %B
2985: .if \\n(aC==0 \{\
2986: . ie \\n(.$==0 .tm Usage: .%B Book Name (#\\n(.c)
2987: . el \{\
2988: . ds mN %B
2989: . if \\n(rS>0 \{\
2990: . nr bK \\n(bK+1
2991: . nr Kl \\n(Kl+1
2992: . ds rS bK
2993: . \}
2994: . ds A1 \\$1
2995: . ds A2 \\$2
2996: . ds A3 \\$3
2997: . ds A4 \\$4
2998: . ds A5 \\$5
2999: . ds A6 \\$6
3000: . ds A7 \\$7
3001: . ds A8 \\$8
3002: . ds A9 \\$9
3003: . nr fV \\n(.$
3004: . fV
3005: . \}
3006: .\}
3007: .if \\n(aC>\\n(aP \{\
3008: . nr aP \\n(aP+1
3009: . nr cF \\n(.f
3010: . nr cZ \\n(.s
3011: . ie \\n(rS==0 \{\
3012: . as b1 \&\\*(eM
3013: . nR
3014: . \}
3015: . el .rR
3016: .\}
3017: ..
3018: .\" NS %D macro - [reference] Date
3019: .\" NS dK string - Date String
3020: .\" NS dK register - Date flag
3021: .de %D
3022: .if \\n(aC==0 \{\
3023: . ie \\n(.$==0 .tm Usage: .%D Date (#\\n(.c)
3024: . el \{\
3025: . ds mN %D
3026: . nr dK \\n(dK+1
3027: . nr Kl \\n(Kl+1
3028: . ds rS dK
3029: . ds A1 \\$1
3030: . ds A2 \\$2
3031: . ds A3 \\$3
3032: . ds A4 \\$4
3033: . ds A5 \\$5
3034: . ds A6 \\$6
3035: . ds A7 \\$7
3036: . ds A8 \\$8
3037: . ds A9 \\$9
3038: . nr fV \\n(.$
3039: . fV
3040: . \}
3041: .\}
3042: .if \\n(aC>\\n(aP \{\
3043: . nr aP \\n(aP+1
3044: . nr cF \\n(.f
3045: . nr cZ \\n(.s
3046: . rR
3047: .\}
3048: ..
3049: .\" NS %J macro - [reference] Journal Name
3050: .\" NS jK register - [reference] Journal Name flag
3051: .\" NS jK string - [reference] Journal Name
3052: .de %J
3053: .if \\n(aC==0 \{\
3054: . ie \\n(.$==0 .tm Usage: .%J Journal Name (#\\n(.c)
3055: . el \{\
3056: . ds mN %J
3057: . nr jK \\n(jK+1
3058: . ds rS jK
3059: . nr Kl \\n(Kl+1
3060: . ds A1 \\$1
3061: . ds A2 \\$2
3062: . ds A3 \\$3
3063: . ds A4 \\$4
3064: . ds A5 \\$5
3065: . ds A6 \\$6
3066: . ds A7 \\$7
3067: . ds A8 \\$8
3068: . ds A9 \\$9
3069: . nr fV \\n(.$
3070: . fV
3071: . \}
3072: .\}
3073: .if \\n(aC>\\n(aP \{\
3074: . nr aP \\n(aP+1
3075: . nr cF \\n(.f
3076: . nr cZ \\n(.s
3077: . rR
3078: .\}
3079: ..
3080: .\" NS %N macro - [reference] issue number
3081: .\" NS nK register - [reference] issue number flag
3082: .\" NS nK string - [reference] issue number
3083: .de %N
3084: .if \\n(aC==0 \{\
3085: . ie \\n(.$==0 .tm Usage: .%N issue number (#\\n(.c)
3086: . el \{\
3087: . nr nK \\n(nK+1
3088: . nr Kl \\n(Kl+1
3089: . ds rS nK
3090: . ds mN %N
3091: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
3092: . \}
3093: .\}
3094: .if \\n(aC>\\n(aP \{\
3095: . nr aP \\n(aP+1
3096: . nr cF \\n(.f
3097: . nr cZ \\n(.s
3098: . rR
3099: .\}
3100: ..
3101: .\" NS %O macro - [reference] optional information
3102: .\" NS oK register - [reference] optional information flag
3103: .\" NS oK string - [reference] optional information
3104: .de %O
3105: .if \\n(aC==0 \{\
3106: . ie \\n(.$==0 .tm Usage: .%O optional information ... \\*(Pu (#\\n(.c)
3107: . el \{\
3108: . ds mN %O
3109: . nr oK \\n(oK+1
3110: . nr Kl \\n(Kl+1
3111: . ds rS oK
3112: . ds A1 \\$1
3113: . ds A2 \\$2
3114: . ds A3 \\$3
3115: . ds A4 \\$4
3116: . ds A5 \\$5
3117: . ds A6 \\$6
3118: . ds A7 \\$7
3119: . ds A8 \\$8
3120: . ds A9 \\$9
3121: . nr fV \\n(.$
3122: . fV
3123: . \}
3124: .\}
3125: .if \\n(aC>\\n(aP \{\
3126: . nr aP \\n(aP+1
3127: . nr cF \\n(.f
3128: . nr cZ \\n(.s
3129: . rR
3130: .\}
3131: ..
3132: .\" NS %P macro - [reference] page numbers
3133: .\" NS pK register - [reference] page number flag
3134: .\" NS pK string - [reference] page number
3135: .de %P
3136: .if \\n(aC==0 \{\
3137: . ie \\n(.$==0 .tm Usage: .%P page numbers ... \\*(Pu (#\\n(.c)
3138: . el \{\
3139: . ds mN %P
3140: . nr pK \\n(pK+1
3141: . nr Kl \\n(Kl+1
3142: . ds rS pK
3143: . ds A1 \\$1
3144: . ds A2 \\$2
3145: . ds A3 \\$3
3146: . ds A4 \\$4
3147: . ds A5 \\$5
3148: . ds A6 \\$6
3149: . ds A7 \\$7
3150: . ds A8 \\$8
3151: . ds A9 \\$9
3152: . nr fV \\n(.$
3153: . fV
3154: . \}
3155: .\}
3156: .if \\n(aC>\\n(aP \{\
3157: . nr aP \\n(aP+1
3158: . nr cF \\n(.f
3159: . nr cZ \\n(.s
3160: . rR
3161: .\}
3162: ..
3163: .\" NS %Q macro - Corporate or Foreign Author
3164: .\" NS qK string - Corporate or Foreign Author
3165: .\" NS qK register - Corporate or Foreign Author flag
3166: .de %Q
3167: .if \\n(aC==0 \{\
3168: . ie \\n(.$==0 .tm Usage: .%Q Corporate or Foreign Author (#\\n(.c)
3169: . el \{\
3170: . ds mN %Q
3171: . nr qK \\n(qK+1
3172: . nr Kl \\n(Kl+1
3173: . ds rS qK
3174: . ds A1 \\$1
3175: . ds A2 \\$2
3176: . ds A3 \\$3
3177: . ds A4 \\$4
3178: . ds A5 \\$5
3179: . ds A6 \\$6
3180: . ds A7 \\$7
3181: . ds A8 \\$8
3182: . ds A9 \\$9
3183: . nr fV \\n(.$
3184: . fV
3185: . \}
3186: .\}
3187: .if \\n(aC>\\n(aP \{\
3188: . nr aP \\n(aP+1
3189: . nr cF \\n(.f
3190: . nr cZ \\n(.s
3191: . rR
3192: .\}
3193: ..
3194: .\" NS %R macro - [reference] report name
3195: .\" NS rK string - [reference] report name
3196: .\" NS rK register - [reference] report flag
3197: .de %R
3198: .if \\n(aC==0 \{\
3199: . ie \\n(.$==0 .tm Usage: .%R reference report (#\\n(.c)
3200: . el \{\
3201: . ds mN %R
3202: . nr rK \\n(rK+1
3203: . nr Kl \\n(Kl+1
3204: . ds rS rK
3205: . ds A1 \\$1
3206: . ds A2 \\$2
3207: . ds A3 \\$3
3208: . ds A4 \\$4
3209: . ds A5 \\$5
3210: . ds A6 \\$6
3211: . ds A7 \\$7
3212: . ds A8 \\$8
3213: . ds A9 \\$9
3214: . nr fV \\n(.$
3215: . fV
3216: . \}
3217: .\}
3218: .if \\n(aC>\\n(aP \{\
3219: . nr aP \\n(aP+1
3220: . nr cF \\n(.f
3221: . nr cZ \\n(.s
3222: . rR
3223: .\}
3224: ..
3225: .\" NS %T macro - reference title
3226: .\" NS tK string - reference title
3227: .\" NS tK register - reference title flag
3228: .de %T
3229: .if \\n(aC==0 \{\
3230: . ie \\n(.$==0 .tm Usage: .%T (#\\n(.c)
3231: . el \{\
3232: . ds mN %T
3233: . if \\n(rS>0 \{\
3234: . nr tK \\n(tK+1
3235: . nr Kl \\n(Kl+1
3236: . ds rS tK
3237: . \}
3238: . ds A1 \\$1
3239: . ds A2 \\$2
3240: . ds A3 \\$3
3241: . ds A4 \\$4
3242: . ds A5 \\$5
3243: . ds A6 \\$6
3244: . ds A7 \\$7
3245: . ds A8 \\$8
3246: . ds A9 \\$9
3247: . nr fV \\n(.$
3248: . fV
3249: . \}
3250: .\}
3251: .if \\n(aC>\\n(aP \{\
3252: .\" . ie \\n(jS==1 \{\
3253: .\" . nr cF \\n(.f
3254: .\" . nr cZ \\n(.s
3255: .\" . ds qL \&\\*(Lq\\*(rA
3256: .\" . ds qR \&\\*(Rq\f\\n(cF\s\\n(cZ
3257: .\" . En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
3258: .\" . \}
3259: .\" . el \{\
3260: . nr aP \\n(aP+1
3261: . nr cF \\n(.f
3262: . nr cZ \\n(.s
3263: . ie \\n(rS==0 \{\
3264: . as b1 \&\\*(eM
3265: . nR
3266: . \}
3267: . el .rR
3268: .\" . \}
3269: .\}
3270: ..
3271: .\" NS %V macro - reference volume
3272: .\" NS vK string - reference volume
3273: .\" NS vK register - reference volume flag
3274: .de %V
3275: .if \\n(aC==0 \{\
3276: . ie \\n(.$==0 .tm Usage: .%V Volume , ... \\*(Pu (#\\n(.c)
3277: . el \{\
3278: . ds mN %V
3279: . nr vK \\n(vK+1
3280: . nr Kl \\n(Kl+1
3281: . ds rS vK
3282: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
3283: . \}
3284: .\}
3285: .if \\n(aC>\\n(aP \{\
3286: . nr aP \\n(aP+1
3287: . nr cF \\n(.f
3288: . nr cZ \\n(.s
3289: . rR
3290: .\}
3291: ..
3292: .\" NS rR macro - reference recursion routine
3293: .\" NS jM local register
3294: .\" NS jN local register
3295: .de rR
3296: .hy 0
3297: .nr jM \\n(C\\n(aP
3298: .ie \\n(jM==1 \{\
3299: .\" . as b1 \&\f\\n(cF\s\\n(cZ
3300: . ie "\\*(A\\n(aP"Tn" \{\
3301: . nN
3302: . \}
3303: . el \{\
3304: . if \\n(aC>8 .tm Usage: \\*(mN - maximum 8 arguments (#\\n(.c)
3305: . aI rR 1
3306: . \\*(A\\n(aP
3307: . \}
3308: .\}
3309: .el \{\
3310: . nr jN \\n(aP
3311: . ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
3312: . el .as b1 \&\\*(A\\n(aP
3313: .\" . el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
3314: . ie \\n(aC==\\n(aP \{\
3315: .\" . as b1 \&\f\\n(cF\s\\n(cZ
3316: . rD
3317: . \}
3318: . el \{\
3319: . nr aP \\n(aP+1
3320: . as b1 \&\\*(S\\n(jN
3321: . rR
3322: . \}
3323: .\}
3324: .rr jM jN
3325: ..
3326: .\" NS rD macro - save b1 buffer in to appropriate name
3327: .de rD
3328: .as \\*(rS \\*(b1
3329: .ds b1
3330: .ds rS
3331: .aY
3332: ..
3333: .\" NS Hf macro - source include header files.
3334: .de Hf
3335: .Pp
3336: File:
3337: .Pa \\$1
3338: .Pp
3339: .nr cF \\n(.f
3340: .nr cZ \\n(.s
3341: .ie t \{\
3342: \&\\*(lI
3343: .br
3344: .ta +9n 18n 27n 36n 45n 54n 63n 72n
3345: .\}
3346: .el \{\
3347: .ta +8n 16n 24n 32n 40n 48n 56n 64n 72n
3348: .\}
3349: .nf
3350: .so \\$1
3351: .fi
3352: .ft \\n(cF
3353: .fz \\n(cZ
3354: .Pp
3355: ..
3356: .\" NS An macro - author name
3357: .\" NS aN register
3358: .nr aN 0
3359: .de An
3360: .if \\n(nY==1 \{\
3361: . ie \\n(aN==1 \{\
3362: . br
3363: . \}
3364: . el \{\
3365: . nr aN 1
3366: . \}
3367: .\}
3368: .if \\n(aC==0 \{\
3369: . ie \\n(.$==0 .tm Usage: .An author_name ... \\*(Pu (#\\n(.c)
3370: . el \{\
3371: . ds mN An
3372: . aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
3373: . \}
3374: .\}
3375: .if \\n(aC>\\n(aP \{\
3376: . nr aP \\n(aP+1
3377: . nr cF \\n(.f
3378: . nr cZ \\n(.s
3379: . nR
3380: .\}
3381: ..
3382: .\" NS Sf macro -defunct
3383: .de Sf
3384: .tm .Sf defunct, use prefix or Ns
3385: ..
3386: .ds rV "function returns the value 0 if successful; otherwise the value -1 is returned and the global variable \\*(vAerrno\fP is set to indicate the error.
3387: .\" Ns Rv macro - return values
3388: .\" Ns rV string - standard return message
3389: .de Rv
3390: .ie \\n(.$==0 \{\
3391: .tm Usage: .Rv [-std] (#\\n(.c)
3392: .\}
3393: .el \{\
3394: . ds mN Rv
3395: .\" . nr aP 0
3396: .\" . nr lR \\n(lR+1
3397: .\" . ds A1 \\$2
3398: .\" . ds A2 \\$3
3399: .\" . ds A3 \\$4
3400: .\" . ds A4 \\$5
3401: .\" . ds A5 \\$6
3402: .\" . ds A6 \\$7
3403: .\" . ds A7 \\$8
3404: .\" . ds A8 \\$9
3405: .\" . nr fV \\n(.$-1
3406: . if "\\$1"-std" \{\
3407: . nr cH \\*(cH
3408: . if (\\n(cH<2):(\\n(cH>3) .tm Usage: .Rv -std sections 2 and 3 only
3409: . br
3410: \&The
3411: .Fn \\$2
3412: \&\\*(rV
3413: . \}
3414: .\}
3415: ..