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