~ubuntu-branches/ubuntu/dapper/groff/dapper

« back to all changes in this revision

Viewing changes to tmac/doc.tmac

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2002-03-17 04:11:50 UTC
  • Revision ID: james.westby@ubuntu.com-20020317041150-wkgfawjc3gxlk0o5
Tags: upstream-1.17.2
ImportĀ upstreamĀ versionĀ 1.17.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" Copyright (c) 1991, 1993
 
2
.\"     The Regents of the University of California.  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 8.1 (Berkeley) 06/08/93
 
33
.\"
 
34
.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
 
35
.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
 
36
.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
 
37
.\" are loaded using the `mso' request.
 
38
.\"
 
39
.\" Modified by
 
40
.\"
 
41
.\"   Werner LEMBERG <wl@gnu.org>      and
 
42
.\"   Ruslan Ermilov <ru@freebsd.org>
 
43
.\"
 
44
.\" to make it more readable: using long names and many groff features,
 
45
.\" updating and extending documentation, etc.
 
46
.\"
 
47
.\" %beginstrip%
 
48
.
 
49
.
 
50
.if !\n(.g \
 
51
.  ab This version of mdoc can be run with GNU troff only!
 
52
.
 
53
.
 
54
.cp 0
 
55
.
 
56
.
 
57
.if (\n[.x]\n[.y] < 117) \
 
58
.  ab You need GNU troff version 1.17 or higher to run this version of mdoc!
 
59
.
 
60
.
 
61
.\" Load start-up files
 
62
.ie t \
 
63
.  mso mdoc/doc-ditroff
 
64
.el \
 
65
.  mso mdoc/doc-nroff
 
66
.
 
67
.mso mdoc/doc-common
 
68
.mso mdoc/doc-syms
 
69
.
 
70
.
 
71
.eo
 
72
.
 
73
.
 
74
.\" NS doc-macro-name global string
 
75
.\" NS   name of calling request (set in each user-requestable macro)
 
76
.
 
77
.ds doc-macro-name
 
78
.als doc-arg0 doc-macro-name
 
79
.
 
80
.
 
81
.\" NS doc-arg-limit global register
 
82
.\" NS   total number of arguments
 
83
.
 
84
.nr doc-arg-limit 0
 
85
.
 
86
.
 
87
.\" NS doc-num-args global register
 
88
.\" NS   number of arguments to handle (must be set to \n[.$] prior to
 
89
.\" NS   `doc-parse-arg-vector' request)
 
90
.
 
91
.nr doc-num-args 0
 
92
.
 
93
.
 
94
.\" NS doc-arg-ptr global register
 
95
.\" NS   argument pointer
 
96
.
 
97
.nr doc-arg-ptr 0
 
98
.
 
99
.
 
100
.\" NS doc-argXXX global string
 
101
.\" NS   argument vector
 
102
.\" NS
 
103
.\" NS limit:
 
104
.\" NS   doc-arg-limit
 
105
.
 
106
.ds doc-arg1
 
107
.
 
108
.
 
109
.\" NS doc-typeXXX global register
 
110
.\" NS   argument type vector (macro=1, string=2, punctuation suffix=3,
 
111
.\" NS   punctuation prefix=4)
 
112
.\" NS
 
113
.\" NS limit:
 
114
.\" NS   doc-arg-limit
 
115
.
 
116
.nr doc-type1 0
 
117
.
 
118
.
 
119
.\" NS doc-spaceXXX global string
 
120
.\" NS   space vector
 
121
.\" NS
 
122
.\" NS limit:
 
123
.\" NS   doc-arg-limit
 
124
.
 
125
.ds doc-space1
 
126
.
 
127
.
 
128
.\" NS doc-parse-args macro
 
129
.\" NS   parse arguments (recursively) (`.doc-parse-args arg ...')
 
130
.\" NS
 
131
.\" NS modifies:
 
132
.\" NS   doc-arg-limit
 
133
.\" NS   doc-arg-ptr
 
134
.\" NS   doc-argXXX
 
135
.\" NS   doc-spaceXXX
 
136
.\" NS   doc-typeXXX
 
137
.\" NS   doc-arg-ptr
 
138
.\" NS   doc-have-space
 
139
.\" NS
 
140
.\" NS local variables:
 
141
.\" NS   doc-reg-dpa
 
142
.\" NS   doc-reg-dpa1
 
143
.\" NS   doc-str-dpa
 
144
.
 
145
.de doc-parse-args
 
146
.  if !\n[doc-arg-limit] \
 
147
.    doc-set-spacing-1
 
148
.
 
149
.  nr doc-have-space 0
 
150
.
 
151
.  if !\n[.$] \
 
152
.    return
 
153
.
 
154
.  nr doc-arg-limit +1
 
155
.
 
156
.  \" handle `|' and `...' specially
 
157
.  ie        "\$1"|" \
 
158
.    ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
 
159
.  el \{ .ie "\$1"..." \
 
160
.    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
 
161
.  el \
 
162
.    ds doc-arg\n[doc-arg-limit] "\$1
 
163
.  \}
 
164
.
 
165
.  \" get argument type and set spacing
 
166
.  doc-get-arg-type* \n[doc-arg-limit]
 
167
.  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
 
168
.  doc-set-spacing-\n[doc-arg-type]
 
169
.
 
170
.  \" check whether we have processed the last parameter
 
171
.  ie (\n[.$] == 1) \
 
172
.    nr doc-arg-ptr 0
 
173
.  el \{\
 
174
.    shift
 
175
.    doc-parse-args \$@
 
176
.  \}
 
177
.
 
178
.  nh
 
179
..
 
180
.
 
181
.
 
182
.\" NS doc-parse-arg-vector macro
 
183
.\" NS   parse argument vector (recursive)
 
184
.\" NS
 
185
.\" NS   cf. comments in doc-parse-args
 
186
.\" NS
 
187
.\" NS modifies:
 
188
.\" NS   doc-arg-limit
 
189
.\" NS   doc-arg-ptr
 
190
.\" NS   doc-argXXX
 
191
.\" NS   doc-num-args
 
192
.\" NS   doc-spaceXXX
 
193
.\" NS   doc-typeXXX
 
194
.\" NS
 
195
.\" NS local variables:
 
196
.\" NS   doc-reg-dpav
 
197
.\" NS   doc-reg-dpav1
 
198
.\" NS   doc-str-dpav
 
199
.
 
200
.de doc-parse-arg-vector
 
201
.  if !\n[doc-arg-limit] \
 
202
.    doc-set-spacing-1
 
203
.
 
204
.  nr doc-arg-limit +1
 
205
.
 
206
.  ie        "\*[doc-arg\n[doc-arg-limit]]"|" \
 
207
.    ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
 
208
.  el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
 
209
.    ds doc-arg\n[doc-arg-limit] \|.\|.\|.
 
210
.  \}
 
211
.
 
212
.  doc-get-arg-type* \n[doc-arg-limit]
 
213
.  nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
 
214
.  doc-set-spacing-\n[doc-arg-type]
 
215
.
 
216
.  ie (\n[doc-num-args] == 1) \{\
 
217
.    nr doc-arg-ptr 0
 
218
.    nr doc-num-args 0
 
219
.  \}
 
220
.  el \{\
 
221
.    nr doc-num-args -1
 
222
.    doc-parse-arg-vector
 
223
.  \}
 
224
.
 
225
.  nh
 
226
..
 
227
.
 
228
.
 
229
.\" NS doc-parse-space-vector macro
 
230
.\" NS   parse space vector (recursive)
 
231
.\" NS
 
232
.\" NS modifies:
 
233
.\" NS   doc-arg-limit
 
234
.\" NS   doc-num-args
 
235
.\" NS   doc-spaceXXX
 
236
.
 
237
.de doc-parse-space-vector
 
238
.  nr doc-arg-limit +1
 
239
.
 
240
.  doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
 
241
.
 
242
.  ie (\n[doc-num-args] == 1) \
 
243
.    nr doc-num-args 0
 
244
.  el \{\
 
245
.    nr doc-num-args -1
 
246
.    doc-parse-space-vector
 
247
.  \}
 
248
..
 
249
.
 
250
.
 
251
.\" NS doc-remaining-args macro
 
252
.\" NS   output remaining arguments as-is, separated by spaces (until
 
253
.\" NS   `doc-num-args' is exhausted)
 
254
.\" NS
 
255
.\" NS modifies:
 
256
.\" NS   doc-arg-ptr
 
257
.\" NS   doc-num-args
 
258
.
 
259
.de doc-remaining-args
 
260
.  nr doc-arg-ptr +1
 
261
.  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
 
262
.
 
263
.  ie (\n[doc-num-args] == 1) \{\
 
264
.    nr doc-arg-ptr 0
 
265
.    nr doc-num-args 0
 
266
.  \}
 
267
.  el \{\
 
268
.    nop \)\*[doc-space]\c
 
269
.    nr doc-num-args -1
 
270
.    doc-remaining-args
 
271
.  \}
 
272
..
 
273
.
 
274
.
 
275
.\" NS doc-append-arg macro
 
276
.\" NS   append one argument to argument vector:
 
277
.\" NS   `.doc-append-arg [arg] [type]'
 
278
.\" NS
 
279
.\" NS modifies:
 
280
.\" NS   doc-arg-limit
 
281
.\" NS   doc-argXXX
 
282
.\" NS   doc-typeXXX
 
283
.
 
284
.de doc-append-arg
 
285
.  nr doc-arg-limit +1
 
286
.  ds doc-arg\n[doc-arg-limit] "\$1
 
287
.  nr doc-type\n[doc-arg-limit] \$2
 
288
.  doc-set-spacing-\$2
 
289
..
 
290
.
 
291
.
 
292
.\" NS doc-print-and-reset macro
 
293
.\" NS   finish input line and clean up argument vectors
 
294
.
 
295
.de doc-print-and-reset
 
296
.  if \n[doc-space-mode] \
 
297
.    nop \)
 
298
.  doc-reset-args
 
299
..
 
300
.
 
301
.
 
302
.\" NS doc-reset-args macro
 
303
.\" NS   reset argument counters
 
304
.\" NS
 
305
.\" NS modifies:
 
306
.\" NS   doc-arg-limit
 
307
.\" NS   doc-arg-ptr
 
308
.\" NS   doc-have-slot
 
309
.
 
310
.de doc-reset-args
 
311
.  nr doc-arg-limit 0
 
312
.  nr doc-arg-ptr 0
 
313
.  nr doc-have-slot 0
 
314
.
 
315
.  hy \n[doc-hyphen-flags]
 
316
..
 
317
.
 
318
.
 
319
.ec
 
320
.
 
321
.\" NS doc-curr-font global register
 
322
.\" NS   saved current font
 
323
.
 
324
.nr doc-curr-font \n[.f]
 
325
.
 
326
.
 
327
.\" NS doc-curr-size global register
 
328
.\" NS   saved current font size
 
329
.
 
330
.nr doc-curr-size \n[.ps]
 
331
.
 
332
.eo
 
333
.
 
334
.
 
335
.\" NS Fl user macro
 
336
.\" NS   handle flags (appends `-' and prints flags): `.Fl [arg ...]'
 
337
.\" NS
 
338
.\" NS modifies:
 
339
.\" NS   doc-arg-ptr
 
340
.\" NS   doc-curr-font
 
341
.\" NS   doc-curr-size
 
342
.\" NS   doc-macro-name
 
343
.\" NS
 
344
.\" NS local variables:
 
345
.\" NS   doc-reg-Fl (for communication with doc-flag-recursion)
 
346
.\" NS
 
347
.\" NS width register `Fl' set in doc-common
 
348
.
 
349
.de Fl
 
350
.  nr doc-curr-font \n[.f]
 
351
.  nr doc-curr-size \n[.ps]
 
352
.  nop \*[doc-Fl-font]\c
 
353
.
 
354
.  if !\n[doc-arg-limit] \{\
 
355
.    ds doc-macro-name Fl
 
356
.    doc-parse-args \$@
 
357
.
 
358
.    if !\n[.$] \{\
 
359
.      \" no arguments
 
360
.      nop \|\-\|\f[P]\s[0]
 
361
.  \}\}
 
362
.
 
363
.  if !\n[doc-arg-limit] \
 
364
.    return
 
365
.
 
366
.  nr doc-arg-ptr +1
 
367
.  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
368
.    \" last argument
 
369
.    nop \|\-\f[P]\s[0]\c
 
370
.    doc-print-and-reset
 
371
.  \}
 
372
.  el \{\
 
373
.    ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
 
374
.      nop \|\-\f[P]\s[0]\c
 
375
.      \*[doc-arg\n[doc-arg-ptr]]
 
376
.    \}
 
377
.    el \{\
 
378
.      if (\n[doc-type\n[doc-arg-ptr]] == 3) \
 
379
.        nop \|\-\|\c
 
380
.
 
381
.      nr doc-reg-Fl 1
 
382
.      doc-flag-recursion
 
383
.  \}\}
 
384
..
 
385
.
 
386
.
 
387
.\" NS doc-flag-recursion macro
 
388
.\" NS   `Fl' flag recursion routine (special handling)
 
389
.\" NS
 
390
.\" NS modifies:
 
391
.\" NS   doc-arg-ptr
 
392
.\" NS
 
393
.\" NS local variables:
 
394
.\" NS   doc-reg-dfr
 
395
.\" NS   doc-reg-dfr1
 
396
.\" NS   doc-str-dfr
 
397
.
 
398
.de doc-flag-recursion
 
399
.  nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
 
400
.  ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
 
401
.
 
402
.  ie (\n[doc-reg-dfr1] == 1) \{\
 
403
.    nop \f[P]\s[0]\c
 
404
.    \*[doc-str-dfr]
 
405
.  \}
 
406
.  el \{\
 
407
.    nr doc-reg-dfr \n[doc-arg-ptr]
 
408
.
 
409
.    ie (\n[doc-reg-dfr1] == 2) \{\
 
410
.      \" handle vertical bar -- doc-reg-Fl is set for the first call of
 
411
.      \" doc-flag-recursion only; we need this to make `.Fl | ...' work
 
412
.      \" correctly
 
413
.      ie "\*[doc-str-dfr]"\*[Ba]" \{\
 
414
.        if \n[doc-reg-Fl] \
 
415
.          nop \|\-\*[doc-space]\c
 
416
.        nop \)\*[Ba]\c
 
417
.      \}
 
418
.      el \{\
 
419
.        ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
 
420
.          if \n[doc-reg-Fl] \
 
421
.            nop \|\-\*[doc-space]\c
 
422
.          nop \f[R]|\f[P]\c
 
423
.        \}
 
424
.        el \{\
 
425
.          \" two consecutive hyphen characters?
 
426
.          ie "\*[doc-str-dfr]"-" \
 
427
.            nop \|\-\^\-\|\c
 
428
.          el \
 
429
.            nop \|\%\-\*[doc-str-dfr]\c
 
430
.    \}\}\}
 
431
.    el \{\
 
432
.      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
433
.      nop \)\*[doc-str-dfr]\f[P]\s[0]\c
 
434
.    \}
 
435
.
 
436
.    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
 
437
.      \" last argument
 
438
.      if (\n[doc-reg-dfr1] == 4) \
 
439
.        nop \|\-\c
 
440
.      nop \f[P]\s[0]\c
 
441
.      doc-print-and-reset
 
442
.    \}
 
443
.    el \{\
 
444
.      nr doc-arg-ptr +1
 
445
.      ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
 
446
.        ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
 
447
.          nop \|\-\c
 
448
.        el \
 
449
.          nop \)\*[doc-space\n[doc-reg-dfr]]\c
 
450
.      \}
 
451
.      el \
 
452
.        nop \)\*[doc-space\n[doc-reg-dfr]]\c
 
453
.
 
454
.      shift
 
455
.      nr doc-reg-Fl 0
 
456
.      doc-flag-recursion \$@
 
457
.  \}\}
 
458
..
 
459
.
 
460
.
 
461
.\" NS doc-print-recursive macro
 
462
.\" NS   general name recursion routine (print remaining arguments)
 
463
.\" NS
 
464
.\" NS modifies:
 
465
.\" NS   doc-arg-ptr
 
466
.\" NS
 
467
.\" NS local variables:
 
468
.\" NS   doc-reg-dpr
 
469
.\" NS   doc-reg-dpr1
 
470
.\" NS   doc-str-dpr
 
471
.
 
472
.de doc-print-recursive
 
473
.  nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
 
474
.  ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
 
475
.
 
476
.  ie (\n[doc-reg-dpr1] == 1) \{\
 
477
.    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
478
.    \*[doc-str-dpr]
 
479
.  \}
 
480
.  el \{\
 
481
.    nr doc-reg-dpr \n[doc-arg-ptr]
 
482
.
 
483
.    ie (\n[doc-reg-dpr1] == 2) \
 
484
.      \" the `\%' prevents hyphenation on a dash (`-')
 
485
.      nop \%\*[doc-str-dpr]\&\c
 
486
.    el \{\
 
487
.      \" punctuation character
 
488
.      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
489
.      nop \)\*[doc-str-dpr]\f[P]\s[0]\c
 
490
.    \}
 
491
.
 
492
.    nr doc-arg-ptr +1
 
493
.    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
494
.      \" last argument
 
495
.      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
496
.      doc-print-and-reset
 
497
.    \}
 
498
.    el \{\
 
499
.      nop \)\*[doc-space\n[doc-reg-dpr]]\c
 
500
.      doc-print-recursive
 
501
.  \}\}
 
502
..
 
503
.
 
504
.
 
505
.\" NS doc-print-prefixes macro
 
506
.\" NS   print leading prefixes
 
507
.\" NS
 
508
.\" NS modifies:
 
509
.\" NS   doc-arg-ptr
 
510
.
 
511
.de doc-print-prefixes
 
512
.  while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
513
.    if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
 
514
.      break
 
515
.    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
516
.    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
 
517
.    nr doc-arg-ptr +1
 
518
.  \}
 
519
..
 
520
.
 
521
.
 
522
.\" NS doc-generic-macro macro
 
523
.\" NS   this is the skeleton for most simple macros
 
524
.\" NS
 
525
.\" NS modifies:
 
526
.\" NS   doc-arg-ptr
 
527
.\" NS   doc-curr-font
 
528
.\" NS   doc-curr-size
 
529
.\" NS   doc-macro-name
 
530
.
 
531
.de doc-generic-macro
 
532
.  if !\n[doc-arg-limit] \{\
 
533
.    ie \n[.$] \{\
 
534
.      ds doc-macro-name \$0
 
535
.      doc-parse-args \$@
 
536
.    \}
 
537
.    el \
 
538
.      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
 
539
.  \}
 
540
.
 
541
.  if !\n[doc-arg-limit] \
 
542
.    return
 
543
.
 
544
.  nr doc-arg-ptr +1
 
545
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
546
.    if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
 
547
.      tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
 
548
.
 
549
.      \" the right action here would be to reset the argument counters
 
550
.      \" and bail out -- unfortunately, a small number of manual pages
 
551
.      \" (less than 2% for FreeBSD which has been used for testing)
 
552
.      \" relied on the old behaviour (silently ignore this error),
 
553
.      \" so it is commented out
 
554
.
 
555
.\"    doc-reset-args
 
556
.    \}
 
557
.\"  el \{\
 
558
.      nr doc-curr-font \n[.f]
 
559
.      nr doc-curr-size \n[.ps]
 
560
.      nop \*[doc-\$0-font]\c
 
561
.      doc-print-recursive
 
562
.\"  \}
 
563
.  \}
 
564
.  el \{\
 
565
.    tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
 
566
.    doc-reset-args
 
567
.  \}
 
568
..
 
569
.
 
570
.
 
571
.\" NS Ar user macro
 
572
.\" NS   command line `argument' macro: `.Ar [args ...]'
 
573
.\" NS
 
574
.\" NS modifies:
 
575
.\" NS   doc-arg-ptr
 
576
.\" NS   doc-curr-font
 
577
.\" NS   doc-curr-size
 
578
.\" NS   doc-macro-name
 
579
.\" NS
 
580
.\" NS local variable:
 
581
.\" NS   doc-str-Ar-default
 
582
.\" NS
 
583
.\" NS width register `Ar' set in doc-common
 
584
.
 
585
.ds doc-str-Ar-default "file\ .\|.\|.
 
586
.
 
587
.de Ar
 
588
.  nr doc-curr-font \n[.f]
 
589
.  nr doc-curr-size \n[.ps]
 
590
.  nop \*[doc-Ar-font]\c
 
591
.
 
592
.  if !\n[doc-arg-limit] \{\
 
593
.    ds doc-macro-name Ar
 
594
.    doc-parse-args \$@
 
595
.
 
596
.    if !\n[.$] \{\
 
597
.      \" no argument
 
598
.      nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
 
599
.  \}\}
 
600
.
 
601
.  if !\n[doc-arg-limit] \
 
602
.    return
 
603
.
 
604
.  nr doc-arg-ptr +1
 
605
.  doc-print-prefixes
 
606
.  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
607
.    nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
 
608
.    doc-print-and-reset
 
609
.  \}
 
610
.  el \{\
 
611
.    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
612
.      \" replace previous argument (Ar) with default value
 
613
.      nr doc-arg-ptr -1
 
614
.      ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
 
615
.      nr doc-type\n[doc-arg-ptr] 2
 
616
.      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
 
617
.
 
618
.      \" recompute space vector for remaining arguments
 
619
.      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
 
620
.      nr doc-arg-limit \n[doc-arg-ptr]
 
621
.      doc-parse-space-vector
 
622
.    \}
 
623
.    doc-print-recursive
 
624
.  \}
 
625
..
 
626
.
 
627
.
 
628
.\" NS Ad user macro
 
629
.\" NS   Addresses
 
630
.\" NS
 
631
.\" NS width register `Ad' set in doc-common
 
632
.
 
633
.als Ad doc-generic-macro
 
634
.ds doc-Ad-usage address
 
635
.
 
636
.
 
637
.\" NS doc-indent-synopsis global register
 
638
.\" NS   indentation in synopsis
 
639
.
 
640
.nr doc-indent-synopsis 0
 
641
.
 
642
.
 
643
.\" NS doc-indent-synopsis-active global register (bool)
 
644
.\" NS   indentation in synopsis active
 
645
.
 
646
.nr doc-indent-synopsis-active 0
 
647
.
 
648
.
 
649
.\" NS Cd user macro
 
650
.\" NS   config declaration (for section 4 SYNOPSIS)
 
651
.\" NS
 
652
.\" NS   this function causes a break; it uses the `Nm' font
 
653
.\" NS
 
654
.\" NS modifies:
 
655
.\" NS   doc-arg-ptr
 
656
.\" NS   doc-curr-font
 
657
.\" NS   doc-curr-size
 
658
.\" NS   doc-indent-synopsis
 
659
.\" NS   doc-macro-name
 
660
.\" NS
 
661
.\" NS width register `Cd' set in doc-common
 
662
.
 
663
.de Cd
 
664
.  if !\n[doc-arg-limit] \{\
 
665
.    ie \n[.$] \{\
 
666
.      ds doc-macro-name Cd
 
667
.      doc-parse-args \$@
 
668
.    \}
 
669
.    el \
 
670
.      tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
 
671
.  \}
 
672
.
 
673
.  if !\n[doc-arg-limit] \
 
674
.    return
 
675
.
 
676
.  nr doc-arg-ptr +1
 
677
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
678
.    nr doc-curr-font \n[.f]
 
679
.    nr doc-curr-size \n[.ps]
 
680
.
 
681
.    ie \n[doc-in-synopsis-section] \{\
 
682
.      if "\*[doc-macro-name]"Cd" \{\
 
683
.        br
 
684
.        if !\n[doc-indent-synopsis] \
 
685
.          nr doc-indent-synopsis \n[doc-display-indent]u
 
686
.        if !\n[doc-indent-synopsis-active] \
 
687
.          in +\n[doc-indent-synopsis]u
 
688
.        ti -\n[doc-indent-synopsis]u
 
689
.        nop \*[doc-Nm-font]\c
 
690
.        doc-print-recursive
 
691
.        if !\n[doc-indent-synopsis-active] \
 
692
.          in -\n[doc-indent-synopsis]u
 
693
.    \}\}
 
694
.    el \{\
 
695
.      nop \*[doc-Nm-font]\c
 
696
.      doc-print-recursive
 
697
.  \}\}
 
698
.  el \{\
 
699
.    tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
 
700
.    doc-reset-args
 
701
.  \}
 
702
..
 
703
.
 
704
.
 
705
.\" NS Cm user macro
 
706
.\" NS   interactive command modifier (flag)
 
707
.\" NS
 
708
.\" NS width register `Cm' set in doc-common
 
709
.
 
710
.als Cm doc-generic-macro
 
711
.ds doc-Cm-usage interactive_command_modifier
 
712
.
 
713
.
 
714
.\" NS Dv user macro
 
715
.\" NS   defined variable
 
716
.\" NS
 
717
.\" NS   this function uses the `Er' font
 
718
.\" NS
 
719
.\" NS width register `Dv' set in doc-common
 
720
.
 
721
.als Dv doc-generic-macro
 
722
.ds doc-Dv-usage defined_variable
 
723
.als doc-Dv-font doc-Er-font
 
724
.
 
725
.
 
726
.\" NS Em user macro
 
727
.\" NS   emphasis
 
728
.\" NS
 
729
.\" NS width register `Em' set in doc-common
 
730
.
 
731
.als Em doc-generic-macro
 
732
.ds doc-Em-usage text
 
733
.
 
734
.
 
735
.\" NS Er user macro
 
736
.\" NS   errno type
 
737
.\" NS
 
738
.\" NS width register `Er' set in doc-common
 
739
.
 
740
.als Er doc-generic-macro
 
741
.ds doc-Er-usage text
 
742
.
 
743
.
 
744
.\" NS Ev user macro
 
745
.\" NS   environment variable
 
746
.\" NS
 
747
.\" NS width register `Ev' set in doc-common
 
748
.
 
749
.als Ev doc-generic-macro
 
750
.ds doc-Ev-usage text
 
751
.
 
752
.
 
753
.\" NS doc-have-decl global register (bool)
 
754
.\" NS   subroutine test (in synopsis only)
 
755
.
 
756
.nr doc-have-decl 0
 
757
.
 
758
.
 
759
.\" NS doc-have-var global register (bool)
 
760
.\" NS   whether last type is a variable type
 
761
.
 
762
.nr doc-have-var 0
 
763
.
 
764
.
 
765
.\" NS doc-do-func-decl macro
 
766
.\" NS   do someting special while in SYNOPSIS
 
767
.\" NS
 
768
.\" NS modifies:
 
769
.\" NS   doc-curr-font
 
770
.\" NS   doc-curr-size
 
771
.\" NS   doc-have-decl
 
772
.\" NS   doc-have-var
 
773
.
 
774
.de doc-do-func-decl
 
775
.  if \n[doc-in-synopsis-section] \{\
 
776
.    \" if a variable type was the last thing given, want vertical space
 
777
.    if \n[doc-have-var] \{\
 
778
.      doc-paragraph
 
779
.      nr doc-have-var 0
 
780
.    \}
 
781
.    \" if a subroutine was the last thing given, want vertical space
 
782
.    if \n[doc-have-func] \{\
 
783
.      ie \n[doc-have-decl] \
 
784
.        br
 
785
.      el \
 
786
.        doc-paragraph
 
787
.    \}
 
788
.    nr doc-have-decl 1
 
789
.  \}
 
790
.
 
791
.  nr doc-curr-font \n[.f]
 
792
.  nr doc-curr-size \n[.ps]
 
793
..
 
794
.
 
795
.
 
796
.\" NS Fd user macro
 
797
.\" NS   function declaration -- not callable
 
798
.\" NS
 
799
.\" NS   this function causes a break
 
800
.\" NS
 
801
.\" NS width register `Fd' set in doc-common
 
802
.
 
803
.de Fd
 
804
.  ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
 
805
.    doc-do-func-decl
 
806
.    nop \*[doc-Fd-font]\$*
 
807
.    br
 
808
.    ft \n[doc-curr-font]
 
809
.    ps \n[doc-curr-size]u
 
810
.  \}
 
811
.  el \{\
 
812
.    tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
 
813
.    doc-reset-args
 
814
.  \}
 
815
..
 
816
.
 
817
.
 
818
.\" NS In user macro
 
819
.\" NS   #include statement - not callable
 
820
.\" NS
 
821
.\" NS   this function causes a break; it uses the `Fd' font
 
822
.\" NS
 
823
.\" NS width register `In' set in doc-common
 
824
.
 
825
.de In
 
826
.  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
 
827
.    doc-do-func-decl
 
828
.    nop \*[doc-Fd-font]#include <\$1>
 
829
.    br
 
830
.    ft \n[doc-curr-font]
 
831
.    ps \n[doc-curr-size]u
 
832
.  \}
 
833
.  el \{\
 
834
.    tm Usage: .In include_file -- In is not callable (#\n[.c])
 
835
.    doc-reset-args
 
836
.  \}
 
837
..
 
838
.
 
839
.
 
840
.\" NS Fr user macro
 
841
.\" NS   function return value
 
842
.\" NS
 
843
.\" NS   this function uses the `Ar' font
 
844
.\" NS
 
845
.\" NS width register `Fr' set in doc-common
 
846
.
 
847
.als Fr doc-generic-macro
 
848
.ds doc-Fr-usage function_return_value
 
849
.als doc-Fr-font doc-Ar-font
 
850
.
 
851
.
 
852
.\" NS Ic user macro
 
853
.\" NS   interactive command
 
854
.\" NS
 
855
.\" NS width register `Ic' set in doc-common
 
856
.
 
857
.als Ic doc-generic-macro
 
858
.ds doc-Ic-usage interactive_command
 
859
.
 
860
.
 
861
.\" NS Li user macro
 
862
.\" NS   literals
 
863
.\" NS
 
864
.\" NS width register `Li' set in doc-common
 
865
.
 
866
.als Li doc-generic-macro
 
867
.ds doc-Li-usage argument
 
868
.
 
869
.
 
870
.\" NS Ms user macro
 
871
.\" NS   math symbol
 
872
.\" NS
 
873
.\" NS   this function uses the `Sy' font
 
874
.\" NS
 
875
.\" NS width register `Ms' set in doc-common
 
876
.
 
877
.als Ms doc-generic-macro
 
878
.ds doc-Ms-usage math_symbol
 
879
.als doc-Ms-font doc-Sy-font
 
880
.
 
881
.
 
882
.\" NS doc-command-name global string
 
883
.\" NS   save first invocation of .Nm
 
884
.
 
885
.ds doc-command-name
 
886
.
 
887
.
 
888
.\" NS Nm user macro
 
889
.\" NS   name of command or page topic
 
890
.\" NS
 
891
.\" NS modifies:
 
892
.\" NS   doc-arg-ptr
 
893
.\" NS   doc-command-name
 
894
.\" NS   doc-curr-font
 
895
.\" NS   doc-curr-size
 
896
.\" NS   doc-indent-synopsis
 
897
.\" NS   doc-indent-synopsis-active
 
898
.\" NS   doc-macro-name
 
899
.\" NS
 
900
.\" NS width register `Nm' set in doc-common
 
901
.
 
902
.de Nm
 
903
.  if !\n[doc-arg-limit] \{\
 
904
.    ds doc-macro-name Nm
 
905
.    ie \n[.$] \
 
906
.      doc-parse-args \$@
 
907
.    el \{\
 
908
.      ie "\*[doc-command-name]"" \
 
909
.        tm Usage: .Nm name ... (#\n[.c])
 
910
.      el \
 
911
.        doc-parse-args \*[doc-command-name]
 
912
.  \}\}
 
913
.
 
914
.  if !\n[doc-arg-limit] \
 
915
.    return
 
916
.
 
917
.  nr doc-arg-ptr +1
 
918
.  doc-print-prefixes
 
919
.  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
920
.    \" last argument
 
921
.    ie "\*[doc-command-name]"" \{\
 
922
.      tm Usage: .Nm name ... (#\n[.c])
 
923
.      doc-reset-args
 
924
.    \}
 
925
.    el \{\
 
926
.      nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
 
927
.      doc-print-and-reset
 
928
.  \}\}
 
929
.  el \{\
 
930
.    nr doc-curr-font \n[.f]
 
931
.    nr doc-curr-size \n[.ps]
 
932
.
 
933
.    ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
934
.      ie "\*[doc-command-name]"" \
 
935
.        tm Usage: .Nm name ... (#\n[.c])
 
936
.      el \{\
 
937
.        \" replace previous argument (Nm) with default value
 
938
.        nr doc-arg-ptr -1
 
939
.        ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
 
940
.        nr doc-type\n[doc-arg-ptr] 2
 
941
.        ds doc-space\n[doc-arg-ptr] "\*[doc-space]
 
942
.
 
943
.        \" recompute space vector for remaining arguments
 
944
.        nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
 
945
.        nr doc-arg-limit \n[doc-arg-ptr]
 
946
.        doc-parse-space-vector
 
947
.    \}\}
 
948
.    el \{\
 
949
.      \" handle `.Nm ...' in SYNOPSIS
 
950
.      if \n[doc-in-synopsis-section] \{\
 
951
.        if "\*[doc-macro-name]"Nm" \{\
 
952
.          br
 
953
.          if !\n[doc-indent-synopsis] \{\
 
954
.            doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
 
955
.            nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
 
956
.          \}
 
957
.          if !\n[doc-indent-synopsis-active] \{\
 
958
.            in +\n[doc-indent-synopsis]u
 
959
.            nr doc-indent-synopsis-active 1
 
960
.          \}
 
961
.          ti -\n[doc-indent-synopsis]u
 
962
.      \}\}
 
963
.      if "\*[doc-command-name]"" \
 
964
.        ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
 
965
.
 
966
.      nop \*[doc-Nm-font]\c
 
967
.    \}
 
968
.    doc-print-recursive
 
969
.  \}
 
970
..
 
971
.
 
972
.
 
973
.\" NS Pa user macro
 
974
.\" NS   pathname: `.Pa [arg ...]'
 
975
.\" NS
 
976
.\" NS modifies:
 
977
.\" NS   doc-arg-ptr
 
978
.\" NS   doc-curr-font
 
979
.\" NS   doc-curr-size
 
980
.\" NS   doc-macro-name
 
981
.\" NS
 
982
.\" NS width register `Pa' set in doc-common
 
983
.
 
984
.de Pa
 
985
.  if !\n[doc-arg-limit] \{\
 
986
.    ds doc-macro-name Pa
 
987
.    doc-parse-args \$@
 
988
.
 
989
.    if !\n[.$] \{\
 
990
.      \" default value
 
991
.      nop \*[doc-Pa-font]~\f[P]\s[0]
 
992
.  \}\}
 
993
.
 
994
.  if !\n[doc-arg-limit] \
 
995
.    return
 
996
.
 
997
.  nr doc-arg-ptr +1
 
998
.  doc-print-prefixes
 
999
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
1000
.    nr doc-curr-font \n[.f]
 
1001
.    nr doc-curr-size \n[.ps]
 
1002
.    nop \*[doc-Pa-font]\c
 
1003
.    if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
1004
.      \" replace previous argument (Pa) with default value
 
1005
.      nr doc-arg-ptr -1
 
1006
.      ds doc-arg\n[doc-arg-ptr] ~
 
1007
.      nr doc-type\n[doc-arg-ptr] 2
 
1008
.      ds doc-space\n[doc-arg-ptr] "\*[doc-space]
 
1009
.
 
1010
.      \" recompute space vector for remaining arguments
 
1011
.      nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
 
1012
.      nr doc-arg-limit \n[doc-arg-ptr]
 
1013
.      doc-parse-space-vector
 
1014
.    \}
 
1015
.    doc-print-recursive
 
1016
.  \}
 
1017
.  el \{\
 
1018
.    nop \*[doc-Pa-font]~\f[P]\s[0]\c
 
1019
.    doc-print-and-reset
 
1020
.  \}
 
1021
..
 
1022
.
 
1023
.
 
1024
.\" NS Sy user macro
 
1025
.\" NS   symbolics
 
1026
.\" NS
 
1027
.\" NS width register `Sy' set in doc-common
 
1028
.
 
1029
.als Sy doc-generic-macro
 
1030
.ds doc-Sy-usage symbolic_text
 
1031
.
 
1032
.
 
1033
.\" NS Me user macro
 
1034
.\" NS   menu entries
 
1035
.\" NS
 
1036
.\" NS width register `Me' set in doc-common
 
1037
.
 
1038
.als Me doc-generic-macro
 
1039
.ds doc-Me-usage menu_entry
 
1040
.
 
1041
.
 
1042
.\" NS Tn user macro
 
1043
.\" NS   trade name
 
1044
.\" NS
 
1045
.\" NS modifies:
 
1046
.\" NS   doc-arg-ptr
 
1047
.\" NS   doc-curr-font
 
1048
.\" NS   doc-curr-size
 
1049
.\" NS   doc-macro-name
 
1050
.\" NS
 
1051
.\" NS width register `Tn' set in doc-common
 
1052
.
 
1053
.de Tn
 
1054
.  if !\n[doc-arg-limit] \{\
 
1055
.    ie \n[.$] \{\
 
1056
.      ds doc-macro-name Tn
 
1057
.      doc-parse-args \$@
 
1058
.    \}
 
1059
.    el \
 
1060
.      tm Usage: .Tn trade_name ... (#\n[.c])
 
1061
.  \}
 
1062
.
 
1063
.  if !\n[doc-arg-limit] \
 
1064
.    return
 
1065
.
 
1066
.  nr doc-arg-ptr +1
 
1067
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
1068
.    nr doc-curr-font \n[.f]
 
1069
.    nr doc-curr-size \n[.ps]
 
1070
.    nop \)\*[doc-Tn-font-size]\c
 
1071
.    ie !\n[doc-is-reference] \{\
 
1072
.      nop \)\*[doc-Tn-font-shape]\c
 
1073
.      doc-print-recursive
 
1074
.    \}
 
1075
.    el \
 
1076
.      doc-do-references
 
1077
.  \}
 
1078
.  el \{\
 
1079
.    tm Usage: .Tn trade_name ... (#\n[.c])
 
1080
.    doc-reset-args
 
1081
.  \}
 
1082
..
 
1083
.
 
1084
.
 
1085
.\" NS Va user macro
 
1086
.\" NS   variable name
 
1087
.\" NS
 
1088
.\" NS width register `Va' set in doc-common
 
1089
.
 
1090
.als Va doc-generic-macro
 
1091
.ds doc-Va-usage variable_name
 
1092
.
 
1093
.
 
1094
.\" NS No user macro
 
1095
.\" NS   normal text macro (default text style if mess up)
 
1096
.\" NS
 
1097
.\" NS width register `No' set in doc-common
 
1098
.
 
1099
.als No doc-generic-macro
 
1100
.ds doc-No-usage normal_text
 
1101
.
 
1102
.
 
1103
.\" NS doc-quote-left global string
 
1104
.\" NS   left quotation character for `doc-enclose-string' and
 
1105
.\" NS   `doc-enclose-open'
 
1106
.
 
1107
.ds doc-quote-left
 
1108
.
 
1109
.
 
1110
.\" NS doc-quote-right global string
 
1111
.\" NS   right quotation character for `doc-enclose-string' and
 
1112
.\" NS   `doc-enclose-close'
 
1113
.
 
1114
.ds doc-quote-right
 
1115
.
 
1116
.
 
1117
.\" NS Op user macro
 
1118
.\" NS   option expression (i.e., enclose string in square brackets)
 
1119
.\" NS
 
1120
.\" NS modifies:
 
1121
.\" NS   doc-macro-name
 
1122
.\" NS   doc-quote-left
 
1123
.\" NS   doc-quote-right
 
1124
.\" NS
 
1125
.\" NS width register `Op' set in doc-common
 
1126
.
 
1127
.de Op
 
1128
.  if !\n[doc-arg-limit] \
 
1129
.    ds doc-macro-name Op
 
1130
.
 
1131
.  ds doc-quote-left "\*[doc-left-bracket]
 
1132
.  ds doc-quote-right "\*[doc-right-bracket]
 
1133
.
 
1134
.  doc-enclose-string \$@
 
1135
..
 
1136
.
 
1137
.
 
1138
.\" NS Aq user macro
 
1139
.\" NS   enclose string in angle brackets
 
1140
.\" NS
 
1141
.\" NS modifies:
 
1142
.\" NS   doc-macro-name
 
1143
.\" NS   doc-quote-left
 
1144
.\" NS   doc-quote-right
 
1145
.\" NS
 
1146
.\" NS width register `Aq' set in doc-common
 
1147
.
 
1148
.de Aq
 
1149
.  if !\n[doc-arg-limit] \
 
1150
.    ds doc-macro-name Aq
 
1151
.
 
1152
.  ds doc-quote-left \[la]
 
1153
.  ds doc-quote-right \[ra]
 
1154
.
 
1155
.  doc-enclose-string \$@
 
1156
..
 
1157
.
 
1158
.
 
1159
.\" NS Bq user macro
 
1160
.\" NS   enclose string in square brackets
 
1161
.\" NS
 
1162
.\" NS modifies:
 
1163
.\" NS   doc-macro-name
 
1164
.\" NS   doc-quote-left
 
1165
.\" NS   doc-quote-right
 
1166
.\" NS
 
1167
.\" NS width register `Bq' set in doc-common
 
1168
.
 
1169
.de Bq
 
1170
.  if !\n[doc-arg-limit] \
 
1171
.    ds doc-macro-name Bq
 
1172
.
 
1173
.  ds doc-quote-left "\*[doc-left-bracket]
 
1174
.  ds doc-quote-right "\*[doc-right-bracket]
 
1175
.
 
1176
.  doc-enclose-string \$@
 
1177
..
 
1178
.
 
1179
.
 
1180
.\" NS Brq user macro
 
1181
.\" NS   enclose string in braces
 
1182
.\" NS
 
1183
.\" NS modifies:
 
1184
.\" NS   doc-macro-name
 
1185
.\" NS   doc-quote-left
 
1186
.\" NS   doc-quote-right
 
1187
.\" NS
 
1188
.\" NS width register `Brq' set in doc-common
 
1189
.
 
1190
.de Brq
 
1191
.  if !\n[doc-arg-limit] \
 
1192
.    ds doc-macro-name Brq
 
1193
.
 
1194
.  ds doc-quote-left {
 
1195
.  ds doc-quote-right }
 
1196
.
 
1197
.  doc-enclose-string \$@
 
1198
..
 
1199
.
 
1200
.
 
1201
.\" NS Dq user macro
 
1202
.\" NS   enclose string in double quotes
 
1203
.\" NS
 
1204
.\" NS modifies:
 
1205
.\" NS   doc-macro-name
 
1206
.\" NS   doc-quote-left
 
1207
.\" NS   doc-quote-right
 
1208
.\" NS
 
1209
.\" NS width register `Dq' set in doc-common
 
1210
.
 
1211
.de Dq
 
1212
.  if !\n[doc-arg-limit] \
 
1213
.    ds doc-macro-name Dq
 
1214
.
 
1215
.  ds doc-quote-left "\*[Lq]
 
1216
.  ds doc-quote-right "\*[Rq]
 
1217
.
 
1218
.  doc-enclose-string \$@
 
1219
..
 
1220
.
 
1221
.
 
1222
.\" NS Eq user macro
 
1223
.\" NS   enclose string in user-defined quotes (args 1 and 2)
 
1224
.\" NS
 
1225
.\" NS modifies:
 
1226
.\" NS   doc-macro-name
 
1227
.\" NS   doc-quote-left
 
1228
.\" NS   doc-quote-right
 
1229
.\" NS
 
1230
.\" NS width register `Eq' set in doc-common
 
1231
.
 
1232
.de Eq
 
1233
.  if !\n[doc-arg-limit] \
 
1234
.    ds doc-macro-name Eq
 
1235
.
 
1236
.  ds doc-quote-left "\$1
 
1237
.  ds doc-quote-right "\$2
 
1238
.
 
1239
.  shift 2
 
1240
.  doc-enclose-string \$@
 
1241
..
 
1242
.
 
1243
.
 
1244
.\" NS Pq user macro
 
1245
.\" NS   enclose string in parentheses
 
1246
.\" NS
 
1247
.\" NS modifies:
 
1248
.\" NS   doc-macro-name
 
1249
.\" NS   doc-quote-left
 
1250
.\" NS   doc-quote-right
 
1251
.\" NS
 
1252
.\" NS width register `Pq' set in doc-common
 
1253
.
 
1254
.de Pq
 
1255
.  if !\n[doc-arg-limit] \
 
1256
.    ds doc-macro-name Pq
 
1257
.
 
1258
.  ds doc-quote-left "\*[doc-left-parenthesis]
 
1259
.  ds doc-quote-right "\*[doc-right-parenthesis]
 
1260
.
 
1261
.  doc-enclose-string \$@
 
1262
..
 
1263
.
 
1264
.
 
1265
.\" NS Ql user macro
 
1266
.\" NS   quoted literal
 
1267
.\"
 
1268
.\"   is in file doc-[dit|n]roff
 
1269
.
 
1270
.
 
1271
.\" NS Qq user macro
 
1272
.\" NS   enclose string in straight double quotes
 
1273
.\" NS
 
1274
.\" NS modifies:
 
1275
.\" NS   doc-macro-name
 
1276
.\" NS   doc-quote-left
 
1277
.\" NS   doc-quote-right
 
1278
.\" NS
 
1279
.\" NS width register `Qq' set in doc-common
 
1280
.
 
1281
.de Qq
 
1282
.  if !\n[doc-arg-limit] \
 
1283
.    ds doc-macro-name Qq
 
1284
.
 
1285
.  ds doc-quote-left "\*[q]
 
1286
.  ds doc-quote-right "\*[q]
 
1287
.
 
1288
.  doc-enclose-string \$@
 
1289
..
 
1290
.
 
1291
.
 
1292
.\" NS Sq user macro
 
1293
.\" NS   enclose string in single quotes
 
1294
.\" NS
 
1295
.\" NS modifies:
 
1296
.\" NS   doc-macro-name
 
1297
.\" NS   doc-quote-left
 
1298
.\" NS   doc-quote-right
 
1299
.\" NS
 
1300
.\" NS width register `Sq' set in doc-common
 
1301
.
 
1302
.de Sq
 
1303
.  if !\n[doc-arg-limit] \
 
1304
.    ds doc-macro-name Sq
 
1305
.
 
1306
.  ds doc-quote-left "\*[doc-left-singlequote]
 
1307
.  ds doc-quote-right "\*[doc-right-singlequote]
 
1308
.
 
1309
.  doc-enclose-string \$@
 
1310
..
 
1311
.
 
1312
.
 
1313
.\" NS Es user macro
 
1314
.\" NS   set up arguments (i.e., the left and right quotation character as
 
1315
.\" NS   first and second argument) for .En call
 
1316
.\" NS
 
1317
.\" NS modifies:
 
1318
.\" NS   doc-arg-ptr
 
1319
.\" NS   doc-macro-name
 
1320
.\" NS   doc-quote-left
 
1321
.\" NS   doc-quote-right
 
1322
.
 
1323
.de Es
 
1324
.  if !\n[doc-arg-limit] \{\
 
1325
.    ie (\n[.$] > 2) \{\
 
1326
.      ds doc-macro-name Es
 
1327
.      doc-parse-args \$@
 
1328
.    \}
 
1329
.    el \{\
 
1330
.      ds doc-quote-left "\$1
 
1331
.      ds doc-quote-right "\$2
 
1332
.  \}\}
 
1333
.
 
1334
.  if !\n[doc-arg-limit] \
 
1335
.    return
 
1336
.
 
1337
.  nr doc-arg-ptr +1
 
1338
.  ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
 
1339
.  nr doc-arg-ptr +1
 
1340
.  ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
 
1341
.  nr doc-arg-ptr +1
 
1342
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
 
1343
.    doc-do-\n[doc-type\n[doc-arg-ptr]]
 
1344
.  el \
 
1345
.    doc-print-and-reset
 
1346
..
 
1347
.
 
1348
.
 
1349
.\" NS doc-have-slot global register (bool)
 
1350
.\" NS   set if `doc-enclose-string' has created a slot for closing
 
1351
.\" NS   delimiter
 
1352
.
 
1353
.nr doc-have-slot 0
 
1354
.
 
1355
.
 
1356
.\" NS doc-enclose-string macro
 
1357
.\" NS   enclose string with given args (e.g. [ and ])
 
1358
.\" NS
 
1359
.\" NS modifies:
 
1360
.\" NS   doc-arg-ptr
 
1361
.\" NS   doc-argXXX
 
1362
.\" NS   doc-have-slot
 
1363
.\" NS
 
1364
.\" NS local variables:
 
1365
.\" NS   doc-reg-des
 
1366
.\" NS   doc-reg-des1
 
1367
.\" NS   doc-reg-des2
 
1368
.\" NS
 
1369
.\" NS requires:
 
1370
.\" NS   doc-quote-left
 
1371
.\" NS   doc-quote-right
 
1372
.
 
1373
.de doc-enclose-string
 
1374
.  if \n[doc-in-synopsis-section] \
 
1375
.    doc-set-hard-space
 
1376
.
 
1377
.  if !\n[doc-arg-limit] \{\
 
1378
.    ie \n[.$] \
 
1379
.      doc-parse-args \$@
 
1380
.    el \{\
 
1381
.      nop \)\*[doc-quote-left]\*[doc-quote-right]
 
1382
.  \}\}
 
1383
.
 
1384
.  if !\n[doc-arg-limit] \
 
1385
.    return
 
1386
.
 
1387
.  nr doc-curr-font \n[.f]
 
1388
.  nr doc-curr-size \n[.ps]
 
1389
.
 
1390
.  nr doc-arg-ptr +1
 
1391
.  doc-print-prefixes
 
1392
.  \" the final `\)' prevents hyphenation in case the next character is `\%'
 
1393
.  nop \)\*[doc-quote-left]\)\c
 
1394
.  ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
1395
.    \" last argument
 
1396
.    nop \)\*[doc-quote-right]\)\c
 
1397
.    doc-print-and-reset
 
1398
.  \}
 
1399
.  el \{\
 
1400
.    \" test whether last arguments are of type closing punctuation
 
1401
.    \" resp. suffix
 
1402
.    ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
 
1403
.      nr doc-reg-des (\n[doc-arg-limit] - 1)
 
1404
.      while (\n[doc-type\n[doc-reg-des]] == 3) \
 
1405
.        nr doc-reg-des -1
 
1406
.
 
1407
.      \" prepend closing delimiter
 
1408
.      nr doc-reg-des +1
 
1409
.      ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
 
1410
.    \}
 
1411
.    el \{\
 
1412
.      \" test whether last arguments are macros which continue the line
 
1413
.      \" logically
 
1414
.      nr doc-reg-des \n[doc-arg-limit]
 
1415
.      while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
 
1416
.        if !\A\*[doc-arg\n[doc-reg-des]] \
 
1417
.          break
 
1418
.        if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
 
1419
.          break
 
1420
.        nr doc-reg-des -1
 
1421
.      \}
 
1422
.
 
1423
.      \" if there are no trailing macros to be skipped, append argument
 
1424
.      ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
 
1425
.        doc-append-arg "\)\*[doc-quote-right]\)" 3
 
1426
.      el \{\
 
1427
.        \" if a previous call to `doc-enclose-string' has already created
 
1428
.        \" a slot, prepend argument
 
1429
.        ie \n[doc-have-slot] \
 
1430
.          ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
 
1431
.        el \{\
 
1432
.          \" we have to shift all arguments to the right
 
1433
.          nr doc-reg-des +1
 
1434
.          nr doc-reg-des1 \n[doc-arg-limit]
 
1435
.          nr doc-reg-des2 (\n[doc-arg-limit] + 1)
 
1436
.          while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
 
1437
.            rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
 
1438
.            rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
 
1439
.            rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
 
1440
.            nr doc-reg-des1 -1
 
1441
.            nr doc-reg-des2 -1
 
1442
.          \}
 
1443
.          nr doc-arg-limit +1
 
1444
.
 
1445
.          \" finally, insert closing delimiter into the freed slot and
 
1446
.          \" recompute spacing vector
 
1447
.          ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
 
1448
.          nr doc-type\n[doc-reg-des] 3
 
1449
.          nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
 
1450
.          nr doc-arg-limit (\n[doc-reg-des] - 1)
 
1451
.          doc-parse-space-vector
 
1452
.          nr doc-have-slot 1
 
1453
.    \}\}\}
 
1454
.
 
1455
.    doc-do-\n[doc-type\n[doc-arg-ptr]]
 
1456
.  \}
 
1457
.
 
1458
.  if \n[doc-in-synopsis-section] \
 
1459
.    doc-set-soft-space
 
1460
..
 
1461
.
 
1462
.
 
1463
.\" NS En user macro
 
1464
.\" NS   enclose arguments with quotation characters set up with `.Es'
 
1465
.
 
1466
.als En doc-enclose-string
 
1467
.
 
1468
.
 
1469
.\" NS Ao user macro
 
1470
.\" NS   angle open
 
1471
.\" NS
 
1472
.\" NS modifies:
 
1473
.\" NS   doc-macro-name
 
1474
.\" NS   doc-quote-left
 
1475
.\" NS
 
1476
.\" NS width register `Ao' set in doc-common
 
1477
.
 
1478
.de Ao
 
1479
.  if !\n[doc-arg-limit] \
 
1480
.    ds doc-macro-name Ao
 
1481
.
 
1482
.  ds doc-quote-left \[la]
 
1483
.
 
1484
.  doc-enclose-open \$@
 
1485
..
 
1486
.
 
1487
.
 
1488
.\" NS Ac user macro
 
1489
.\" NS   angle close
 
1490
.\" NS
 
1491
.\" NS modifies:
 
1492
.\" NS   doc-macro-name
 
1493
.\" NS   doc-quote-right
 
1494
.\" NS
 
1495
.\" NS width register `Ac' set in doc-common
 
1496
.
 
1497
.de Ac
 
1498
.  if !\n[doc-arg-limit] \
 
1499
.    ds doc-macro-name Ac
 
1500
.
 
1501
.  ds doc-quote-right \[ra]
 
1502
.
 
1503
.  doc-enclose-close \$@
 
1504
..
 
1505
.
 
1506
.
 
1507
.\" NS Bo user macro
 
1508
.\" NS   bracket open
 
1509
.\" NS
 
1510
.\" NS modifies:
 
1511
.\" NS   doc-macro-name
 
1512
.\" NS   doc-quote-left
 
1513
.\" NS
 
1514
.\" NS width register `Bo' set in doc-common
 
1515
.
 
1516
.de Bo
 
1517
.  if !\n[doc-arg-limit] \
 
1518
.    ds doc-macro-name Bo
 
1519
.
 
1520
.  ds doc-quote-left "\*[doc-left-bracket]
 
1521
.
 
1522
.  doc-enclose-open \$@
 
1523
..
 
1524
.
 
1525
.
 
1526
.\" NS Bc user macro
 
1527
.\" NS   bracket close
 
1528
.\" NS
 
1529
.\" NS modifies:
 
1530
.\" NS   doc-macro-name
 
1531
.\" NS   doc-quote-right
 
1532
.\" NS
 
1533
.\" NS width register `Bc' set in doc-common
 
1534
.
 
1535
.de Bc
 
1536
.  if !\n[doc-arg-limit] \
 
1537
.    ds doc-macro-name Bc
 
1538
.
 
1539
.  ds doc-quote-right "\*[doc-right-bracket]
 
1540
.
 
1541
.  doc-enclose-close \$@
 
1542
..
 
1543
.
 
1544
.
 
1545
.\" NS Bro user macro
 
1546
.\" NS   brace open
 
1547
.\" NS
 
1548
.\" NS modifies:
 
1549
.\" NS   doc-macro-name
 
1550
.\" NS   doc-quote-left
 
1551
.\" NS
 
1552
.\" NS width register `Bro' set in doc-common
 
1553
.
 
1554
.de Bro
 
1555
.  if !\n[doc-arg-limit] \
 
1556
.    ds doc-macro-name Bo
 
1557
.
 
1558
.  ds doc-quote-left {
 
1559
.
 
1560
.  doc-enclose-open \$@
 
1561
..
 
1562
.
 
1563
.
 
1564
.\" NS Brc user macro
 
1565
.\" NS   brace close
 
1566
.\" NS
 
1567
.\" NS modifies:
 
1568
.\" NS   doc-macro-name
 
1569
.\" NS   doc-quote-right
 
1570
.\" NS
 
1571
.\" NS width register `Brc' set in doc-common
 
1572
.
 
1573
.de Brc
 
1574
.  if !\n[doc-arg-limit] \
 
1575
.    ds doc-macro-name Bc
 
1576
.
 
1577
.  ds doc-quote-right }
 
1578
.
 
1579
.  doc-enclose-close \$@
 
1580
..
 
1581
.
 
1582
.
 
1583
.\" NS Do user macro
 
1584
.\" NS   double quote open
 
1585
.\" NS
 
1586
.\" NS modifies:
 
1587
.\" NS   doc-macro-name
 
1588
.\" NS   doc-quote-left
 
1589
.\" NS
 
1590
.\" NS width register `Do' set in doc-common
 
1591
.
 
1592
.de Do
 
1593
.  if !\n[doc-arg-limit] \
 
1594
.    ds doc-macro-name Do
 
1595
.
 
1596
.  ds doc-quote-left "\*[Lq]
 
1597
.
 
1598
.  doc-enclose-open \$@
 
1599
..
 
1600
.
 
1601
.
 
1602
.\" NS Dc user macro
 
1603
.\" NS   double quote close
 
1604
.\" NS
 
1605
.\" NS modifies:
 
1606
.\" NS   doc-macro-name
 
1607
.\" NS   doc-quote-right
 
1608
.\" NS
 
1609
.\" NS width register `Dc' set in doc-common
 
1610
.
 
1611
.de Dc
 
1612
.  if !\n[doc-arg-limit] \
 
1613
.    ds doc-macro-name Dc
 
1614
.
 
1615
.  ds doc-quote-right "\*[Rq]
 
1616
.
 
1617
.  doc-enclose-close \$@
 
1618
..
 
1619
.
 
1620
.
 
1621
.\" NS Eo user macro
 
1622
.\" NS   enclose open (using first argument as beginning of enclosure)
 
1623
.\" NS
 
1624
.\" NS modifies:
 
1625
.\" NS   doc-macro-name
 
1626
.\" NS   doc-quote-left
 
1627
.\" NS
 
1628
.\" NS width register `Eo' set in doc-common
 
1629
.
 
1630
.de Eo
 
1631
.  if !\n[doc-arg-limit] \
 
1632
.    ds doc-macro-name Eo
 
1633
.
 
1634
.  ds doc-quote-left "\$1
 
1635
.
 
1636
.  shift
 
1637
.  doc-enclose-open \$@
 
1638
..
 
1639
.
 
1640
.
 
1641
.\" NS Ec user macro
 
1642
.\" NS   enclose close (using first argument as end of enclosure)
 
1643
.\" NS
 
1644
.\" NS modifies:
 
1645
.\" NS   doc-macro-name
 
1646
.\" NS   doc-quote-right
 
1647
.\" NS
 
1648
.\" NS width register `Ec' set in doc-common
 
1649
.
 
1650
.de Ec
 
1651
.  if !\n[doc-arg-limit] \
 
1652
.    ds doc-macro-name Ec
 
1653
.
 
1654
.  ds doc-quote-right "\$1
 
1655
.
 
1656
.  shift
 
1657
.  doc-enclose-close \$@
 
1658
..
 
1659
.
 
1660
.
 
1661
.\" NS Oo user macro
 
1662
.\" NS   option open
 
1663
.\" NS
 
1664
.\" NS modifies:
 
1665
.\" NS   doc-macro-name
 
1666
.\" NS   doc-quote-left
 
1667
.\" NS
 
1668
.\" NS width register `Oo' set in doc-common
 
1669
.
 
1670
.de Oo
 
1671
.  if !\n[doc-arg-limit] \
 
1672
.    ds doc-macro-name Oo
 
1673
.
 
1674
.  ds doc-quote-left [
 
1675
.
 
1676
.  doc-enclose-open \$@
 
1677
..
 
1678
.
 
1679
.
 
1680
.\" NS Oc user macro
 
1681
.\" NS   option close
 
1682
.\" NS
 
1683
.\" NS modifies:
 
1684
.\" NS   doc-macro-name
 
1685
.\" NS   doc-quote-right
 
1686
.\" NS
 
1687
.\" NS width register `Oc' set in doc-common
 
1688
.
 
1689
.de Oc
 
1690
.  if !\n[doc-arg-limit] \
 
1691
.    ds doc-macro-name Oc
 
1692
.
 
1693
.  ds doc-quote-right ]
 
1694
.
 
1695
.  doc-enclose-close \$@
 
1696
..
 
1697
.
 
1698
.
 
1699
.\" NS Po user macro
 
1700
.\" NS   parenthesis open
 
1701
.\" NS
 
1702
.\" NS modifies:
 
1703
.\" NS   doc-macro-name
 
1704
.\" NS   doc-quote-left
 
1705
.\" NS
 
1706
.\" NS width register `Po' set in doc-common
 
1707
.
 
1708
.de Po
 
1709
.  if !\n[doc-arg-limit] \
 
1710
.    ds doc-macro-name Po
 
1711
.
 
1712
.  ds doc-quote-left "\*[doc-left-parenthesis]
 
1713
.
 
1714
.  doc-enclose-open \$@
 
1715
..
 
1716
.
 
1717
.
 
1718
.\" NS Pc user macro
 
1719
.\" NS   parenthesis close
 
1720
.\" NS
 
1721
.\" NS modifies:
 
1722
.\" NS   doc-macro-name
 
1723
.\" NS   doc-quote-right
 
1724
.\" NS
 
1725
.\" NS width register `Pc' set in doc-common
 
1726
.
 
1727
.de Pc
 
1728
.  if !\n[doc-arg-limit] \
 
1729
.    ds doc-macro-name Pc
 
1730
.
 
1731
.  ds doc-quote-right "\*[doc-right-parenthesis]
 
1732
.
 
1733
.  doc-enclose-close \$@
 
1734
..
 
1735
.
 
1736
.
 
1737
.\" NS Qo user macro
 
1738
.\" NS   straight double quote open
 
1739
.\" NS
 
1740
.\" NS modifies:
 
1741
.\" NS   doc-macro-name
 
1742
.\" NS   doc-quote-left
 
1743
.\" NS
 
1744
.\" NS width register `Qo' set in doc-common
 
1745
.
 
1746
.de Qo
 
1747
.  if !\n[doc-arg-limit] \
 
1748
.    ds doc-macro-name Qo
 
1749
.
 
1750
.  ds doc-quote-left "\*[q]
 
1751
.
 
1752
.  doc-enclose-open \$@
 
1753
..
 
1754
.
 
1755
.
 
1756
.\" NS Qc user macro
 
1757
.\" NS   straight double quote close
 
1758
.\" NS
 
1759
.\" NS modifies:
 
1760
.\" NS   doc-macro-name
 
1761
.\" NS   doc-quote-right
 
1762
.\" NS
 
1763
.\" NS width register `Qc' set in doc-common
 
1764
.
 
1765
.de Qc
 
1766
.  if !\n[doc-arg-limit] \
 
1767
.    ds doc-macro-name Qc
 
1768
.
 
1769
.  ds doc-quote-right "\*[q]
 
1770
.
 
1771
.  doc-enclose-close \$@
 
1772
..
 
1773
.
 
1774
.
 
1775
.\" NS So user macro
 
1776
.\" NS   single quote open
 
1777
.\" NS
 
1778
.\" NS modifies:
 
1779
.\" NS   doc-macro-name
 
1780
.\" NS   doc-quote-left
 
1781
.\" NS
 
1782
.\" NS width register `So' set in doc-common
 
1783
.
 
1784
.de So
 
1785
.  if !\n[doc-arg-limit] \
 
1786
.    ds doc-macro-name So
 
1787
.
 
1788
.  ds doc-quote-left "\*[doc-left-singlequote]
 
1789
.
 
1790
.  doc-enclose-open \$@
 
1791
..
 
1792
.
 
1793
.
 
1794
.\" NS Sc user macro
 
1795
.\" NS   single quote close
 
1796
.\" NS
 
1797
.\" NS modifies:
 
1798
.\" NS   doc-macro-name
 
1799
.\" NS   doc-quote-right
 
1800
.\" NS
 
1801
.\" NS width register `Sc' set in doc-common
 
1802
.
 
1803
.de Sc
 
1804
.  if !\n[doc-arg-limit] \
 
1805
.    ds doc-macro-name Sc
 
1806
.
 
1807
.  ds doc-quote-right "\*[doc-right-singlequote]
 
1808
.
 
1809
.  doc-enclose-close \$@
 
1810
..
 
1811
.
 
1812
.
 
1813
.\" NS Xo user macro
 
1814
.\" NS   extend open
 
1815
.\" NS
 
1816
.\" NS modifies:
 
1817
.\" NS   doc-macro-name
 
1818
.\" NS   doc-quote-left
 
1819
.\" NS
 
1820
.\" NS width register `Xo' set in doc-common
 
1821
.
 
1822
.de Xo
 
1823
.  if !\n[doc-arg-limit] \
 
1824
.    ds doc-macro-name Xo
 
1825
.
 
1826
.  ds doc-quote-left
 
1827
.
 
1828
.  doc-enclose-open \$@
 
1829
..
 
1830
.
 
1831
.
 
1832
.\" NS Xc user macro
 
1833
.\" NS   extend close
 
1834
.\" NS
 
1835
.\" NS modifies:
 
1836
.\" NS   doc-macro-name
 
1837
.\" NS   doc-quote-right
 
1838
.\" NS
 
1839
.\" NS width register `Xc' set in doc-common
 
1840
.
 
1841
.de Xc
 
1842
.  if !\n[doc-arg-limit] \
 
1843
.    ds doc-macro-name Xc
 
1844
.
 
1845
.  ds doc-quote-right
 
1846
.
 
1847
.  doc-enclose-close \$@
 
1848
..
 
1849
.
 
1850
.
 
1851
.\" NS doc-nesting-level global register
 
1852
.\" NS   used by `doc-enclose-open' and `doc-enclose-close'
 
1853
.
 
1854
.nr doc-nesting-level 0
 
1855
.
 
1856
.
 
1857
.\" NS doc-in-list global register (bool)
 
1858
.\" NS   whether we are in (logical) .It
 
1859
.
 
1860
.nr doc-in-list 0
 
1861
.
 
1862
.
 
1863
.\" NS doc-enclose-open macro
 
1864
.\" NS   enclose string open
 
1865
.\" NS
 
1866
.\" NS modifies:
 
1867
.\" NS   doc-arg-ptr
 
1868
.\" NS   doc-nesting-level
 
1869
.
 
1870
.de doc-enclose-open
 
1871
.  if !\n[doc-arg-limit] \
 
1872
.    doc-parse-args \$@
 
1873
.
 
1874
.  nr doc-arg-ptr +1
 
1875
.  doc-print-prefixes
 
1876
.  nr doc-arg-ptr -1
 
1877
.
 
1878
.  nop \)\*[doc-quote-left]\)\c
 
1879
.
 
1880
.  \" start enclosure box
 
1881
.  box doc-enclosure-box\n[doc-nesting-level]
 
1882
.  ev doc-enclosure-env\n[doc-nesting-level]
 
1883
.  evc 0
 
1884
.  in 0
 
1885
.  nf
 
1886
.  \" we insert something to make .chop always work
 
1887
.  nop \&\c
 
1888
.
 
1889
.  \" increase nesting level *after* parsing of arguments
 
1890
.  nr doc-nesting-level +1
 
1891
.
 
1892
.  if \n[doc-arg-limit] \{\
 
1893
.    nr doc-arg-ptr +1
 
1894
.    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
 
1895
.      doc-print-recursive
 
1896
.    el \
 
1897
.      doc-reset-args
 
1898
.  \}
 
1899
..
 
1900
.
 
1901
.
 
1902
.\" NS doc-enclose-close macro
 
1903
.\" NS   enclose string close
 
1904
.\" NS
 
1905
.\" NS modifies:
 
1906
.\" NS   doc-nesting-level
 
1907
.
 
1908
.de doc-enclose-close
 
1909
.  nr doc-nesting-level -1
 
1910
.
 
1911
.  \" finish enclosure box
 
1912
.  br
 
1913
.  ev
 
1914
.  box
 
1915
.  chop doc-enclosure-box\n[doc-nesting-level]
 
1916
.  unformat doc-enclosure-box\n[doc-nesting-level]
 
1917
.
 
1918
.  nh
 
1919
.  nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
 
1920
.  nop \)\*[doc-quote-right]\)\c
 
1921
.
 
1922
.  if !\n[doc-arg-limit] \{\
 
1923
.    doc-parse-args \$@
 
1924
.
 
1925
.    if !\n[.$] \
 
1926
.      doc-print-and-reset
 
1927
.  \}
 
1928
.
 
1929
.  if \n[doc-arg-limit] \{\
 
1930
.    ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
 
1931
.      nop \)\*[doc-space\n[doc-arg-ptr]]\c
 
1932
.      nr doc-arg-ptr +1
 
1933
.      doc-print-recursive
 
1934
.    \}
 
1935
.    el \
 
1936
.      doc-print-and-reset
 
1937
.  \}
 
1938
.
 
1939
.  \" shall we finish .It request?
 
1940
.  if !"\*[doc-macro-name]"It" \
 
1941
.    if \n[doc-in-list] \
 
1942
.      if !\n[doc-nesting-level] \
 
1943
.        doc-\*[doc-list-type-stack\n[doc-list-depth]]
 
1944
..
 
1945
.
 
1946
.
 
1947
.\" NS Pf user macro
 
1948
.\" NS   prefix: `.Pf prefix arg ...'
 
1949
.\" NS
 
1950
.\" NS modifies:
 
1951
.\" NS   doc-arg-ptr
 
1952
.\" NS   doc-macro-name
 
1953
.\" NS   doc-quote-left
 
1954
.\" NS
 
1955
.\" NS width register `Pf' set in doc-common
 
1956
.
 
1957
.de Pf
 
1958
.  if !\n[doc-arg-limit] \
 
1959
.    ds doc-macro-name Pf
 
1960
.
 
1961
.  ie \n[doc-arg-limit] \{\
 
1962
.    ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
 
1963
.      nr doc-arg-ptr +1
 
1964
.      nop \)\*[doc-arg\n[doc-arg-ptr]]\c
 
1965
.    \}
 
1966
.    el \
 
1967
.      tm mdoc warning: .Pf: trailing prefix (#\n[.c])
 
1968
.  \}
 
1969
.  el \{\
 
1970
.    nop \)\$1\)\c
 
1971
.    shift
 
1972
.    ie \n[.$] \
 
1973
.      doc-parse-args \$@
 
1974
.    el \{\
 
1975
.      tm mdoc warning: .Pf: missing arguments (#\n[.c])
 
1976
.      nop \)
 
1977
.  \}\}
 
1978
.
 
1979
.  if \n[doc-arg-limit] \{\
 
1980
.    nr doc-arg-ptr +1
 
1981
.    ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
 
1982
.      doc-print-and-reset
 
1983
.    el \
 
1984
.      doc-do-\n[doc-type\n[doc-arg-ptr]]
 
1985
.  \}
 
1986
..
 
1987
.
 
1988
.
 
1989
.\" NS Ns user macro
 
1990
.\" NS   remove space (space removal done by `doc-parse-args')
 
1991
.\" NS
 
1992
.\" NS modifies:
 
1993
.\" NS   doc-argXXX
 
1994
.\" NS   doc-macro-name
 
1995
.\" NS
 
1996
.\" NS width register `Ns' set in doc-common
 
1997
.
 
1998
.de Ns
 
1999
.  if !\n[doc-arg-limit] \{\
 
2000
.    ie \n[.$] \{\
 
2001
.      ds doc-macro-name Ns
 
2002
.      doc-parse-args \$@
 
2003
.    \}
 
2004
.    el \
 
2005
.      tm Usage: .Ns must be called with arguments (#\n[.c])
 
2006
.  \}
 
2007
.
 
2008
.  if \n[doc-arg-limit] \{\
 
2009
.    nr doc-arg-ptr +1
 
2010
.    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
 
2011
.      doc-print-recursive
 
2012
.    el \
 
2013
.      doc-reset-args
 
2014
.  \}
 
2015
..
 
2016
.
 
2017
.
 
2018
.\" NS Ap user macro
 
2019
.\" NS   append an apostrophe
 
2020
.\" NS
 
2021
.\" NS width register `Ap' set in doc-common
 
2022
.
 
2023
.de Ap
 
2024
.  ie !\n[doc-arg-limit] \
 
2025
.    tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
 
2026
.  el \{\
 
2027
.    nop \)'\)\c
 
2028
.    nr doc-arg-ptr +1
 
2029
.    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
 
2030
.      doc-print-recursive
 
2031
.    el \
 
2032
.      doc-reset-args
 
2033
.  \}
 
2034
..
 
2035
.
 
2036
.
 
2037
.\" NS doc-space global string
 
2038
.\" NS   current inter-argument space
 
2039
.
 
2040
.ds doc-space "\*[doc-soft-space]
 
2041
.
 
2042
.
 
2043
.\" NS doc-soft-space constant string
 
2044
.\" NS   soft (stretchable) space (defined in doc-common)
 
2045
.
 
2046
.
 
2047
.\" NS doc-hard-space constant string
 
2048
.\" NS   hard (unpaddable) space (defined in doc-common)
 
2049
.
 
2050
.
 
2051
.\" NS doc-set-hard-space macro
 
2052
.\" NS   set current space string to hard (unpaddable) space.
 
2053
.\" NS
 
2054
.\" NS modifies:
 
2055
.\" NS   doc-saved-space
 
2056
.\" NS   doc-space
 
2057
.
 
2058
.de doc-set-hard-space
 
2059
.  ie "\*[doc-space]"" \
 
2060
.    ds doc-saved-space "\*[doc-hard-space]
 
2061
.  el \
 
2062
.    ds doc-space "\*[doc-hard-space]
 
2063
..
 
2064
.
 
2065
.
 
2066
.\" NS doc-set-soft-space macro
 
2067
.\" NS   set current space string to soft space
 
2068
.\" NS
 
2069
.\" NS modifies:
 
2070
.\" NS   doc-saved-space
 
2071
.\" NS   doc-space
 
2072
.
 
2073
.de doc-set-soft-space
 
2074
.  ie "\*[doc-space]"" \
 
2075
.    ds doc-saved-space "\*[doc-soft-space]
 
2076
.  el \
 
2077
.    ds doc-space "\*[doc-soft-space]
 
2078
..
 
2079
.
 
2080
.
 
2081
.\" NS doc-space-mode global register (bool)
 
2082
.\" NS   default is one (space mode on)
 
2083
.
 
2084
.nr doc-space-mode 1
 
2085
.
 
2086
.
 
2087
.\" NS doc-saved-space global string
 
2088
.\" NS   saved value of `doc-space'
 
2089
.
 
2090
.ds doc-saved-space "\*[doc-space]
 
2091
.
 
2092
.
 
2093
.\" NS doc-have-space global register (bool)
 
2094
.\" NS   set if last command was horizontal space
 
2095
.
 
2096
.nr doc-have-space 0
 
2097
.
 
2098
.
 
2099
.\" NS Sm user macro
 
2100
.\" NS   space mode (`.Sm'/`.Sm on'/`.Sm off')
 
2101
.\" NS
 
2102
.\" NS   without argument, toggle space mode
 
2103
.\" NS
 
2104
.\" NS modifies:
 
2105
.\" NS   doc-arg-limit
 
2106
.\" NS   doc-arg-ptr
 
2107
.\" NS   doc-argXXX
 
2108
.\" NS   doc-macro-name
 
2109
.\" NS   doc-num-args
 
2110
.\" NS   doc-saved-space
 
2111
.\" NS   doc-space
 
2112
.\" NS   doc-space-mode
 
2113
.\" NS   doc-spaceXXX
 
2114
.\" NS
 
2115
.\" NS local variables:
 
2116
.\" NS   doc-reg-Sm
 
2117
.\" NS
 
2118
.\" NS width register `Sm' set in doc-common
 
2119
.
 
2120
.de Sm
 
2121
.  ie \n[doc-have-space] \
 
2122
.    nr doc-reg-Sm 0
 
2123
.  el \
 
2124
.    nr doc-reg-Sm 1
 
2125
.
 
2126
.  if !\n[doc-arg-limit] \{\
 
2127
.    ie \n[.$] \{\
 
2128
.      ds doc-macro-name Sm
 
2129
.      doc-parse-args \$@
 
2130
.    \}
 
2131
.    el \{\
 
2132
.      ie \n[doc-space-mode] \
 
2133
.        nr doc-space-mode 0
 
2134
.      el \
 
2135
.        nr doc-space-mode 1
 
2136
.  \}\}
 
2137
.
 
2138
.  if !\n[doc-arg-limit] \
 
2139
.    return
 
2140
.
 
2141
.  nr doc-arg-ptr +1
 
2142
.
 
2143
.  \" avoid a warning message in case `Sm' is the last parameter
 
2144
.  if !d doc-arg\n[doc-arg-ptr] \
 
2145
.    ds doc-arg\n[doc-arg-ptr]
 
2146
.
 
2147
.  ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
 
2148
.    ds doc-space "\*[doc-saved-space]
 
2149
.    nr doc-space-mode 1
 
2150
.  \}
 
2151
.  el \{\
 
2152
.    ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
 
2153
.      ds doc-saved-space "\*[doc-space]
 
2154
.      ds doc-space
 
2155
.      nr doc-space-mode 0
 
2156
.    \}
 
2157
.    el \{\
 
2158
.      \" no argument for Sm
 
2159
.      nr doc-arg-ptr -1
 
2160
.      ie \n[doc-space-mode] \
 
2161
.        nr doc-space-mode 0
 
2162
.      el \
 
2163
.        nr doc-space-mode 1
 
2164
.  \}\}
 
2165
.
 
2166
.  ie \n[doc-space-mode] \{\
 
2167
.    \" recompute space vector for remaining arguments
 
2168
.    nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
 
2169
.    nr doc-arg-limit \n[doc-arg-ptr]
 
2170
.    if \n[doc-num-args] \
 
2171
.      doc-parse-space-vector
 
2172
.
 
2173
.    \" finish line only if it is interrupted and `doc-have-space'
 
2174
.    \" isn't set
 
2175
.    if \n[doc-reg-Sm] \
 
2176
.      if \n[.int] \
 
2177
.        nop \)
 
2178
.  \}
 
2179
.  el \{\
 
2180
.    \" reset remaining space vector elements
 
2181
.    nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
 
2182
.    while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
 
2183
.      ds doc-space\n[doc-reg-Sm]
 
2184
.      nr doc-reg-Sm +1
 
2185
.      \" the body of a `while' request must end with the fitting `\}'!
 
2186
.    \}
 
2187
.  \}
 
2188
.
 
2189
.  \" do we have parameters to print?
 
2190
.  ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
 
2191
.    \" ignore `.Sm on' and `.Sm off' without additional parameters
 
2192
.    ie (\n[doc-arg-ptr] > 1) \
 
2193
.      doc-print-and-reset
 
2194
.    el \
 
2195
.      doc-reset-args
 
2196
.  \}
 
2197
.  el \{\
 
2198
.    \" skip `Sm' argument
 
2199
.    nr doc-arg-ptr +1
 
2200
.    doc-print-recursive
 
2201
.  \}
 
2202
..
 
2203
.
 
2204
.
 
2205
.\" NS doc-arg-type immediate register
 
2206
.\" NS   argument type (macro=1, string=2, punctuation suffix=3,
 
2207
.\" NS   punctuation prefix=4)
 
2208
.
 
2209
.nr doc-arg-type 0
 
2210
.
 
2211
.
 
2212
.\" NS doc-get-arg-type macro
 
2213
.\" NS   get argument type
 
2214
.\" NS
 
2215
.\" NS   this macro expects the width of the argument in `doc-width'
 
2216
.\" NS
 
2217
.\" NS modifies:
 
2218
.\" NS   doc-arg-type
 
2219
.
 
2220
.de doc-get-arg-type
 
2221
.  nr doc-arg-type 2
 
2222
.
 
2223
.  if ((\n[doc-width] < 4) & \A\$1) \{\
 
2224
.    ie (\n[doc-width] == 1) \{\
 
2225
.      if r doc-punct\$1 \
 
2226
.        nr doc-arg-type \n[doc-punct\$1]
 
2227
.    \}
 
2228
.    el \
 
2229
.      if r \$1 \
 
2230
.        if d \$1 \
 
2231
.          nr doc-arg-type 1
 
2232
.  \}
 
2233
..
 
2234
.
 
2235
.
 
2236
.\" NS doc-get-arg-type* macro
 
2237
.\" NS   similar to as `doc-get-arg-type' but uses doc-argXXX strings
 
2238
.\" NS
 
2239
.\" NS   this macro sets the `doc-width' register using the `length' request
 
2240
.\" NS   to get the number of characters in a string literally
 
2241
.\" NS
 
2242
.\" NS modifies:
 
2243
.\" NS   doc-arg-type
 
2244
.\" NS   doc-width
 
2245
.
 
2246
.de doc-get-arg-type*
 
2247
.  nr doc-arg-type 2
 
2248
.  length doc-width "\*[doc-arg\$1]
 
2249
.
 
2250
.  if ((\n[doc-width] < 4) & \A\*[doc-arg\$1]) \{\
 
2251
.    ie (\n[doc-width] == 1) \{\
 
2252
.      if r doc-punct\*[doc-arg\$1] \
 
2253
.        nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
 
2254
.    \}
 
2255
.    el \
 
2256
.      if r \*[doc-arg\$1] \
 
2257
.        if d \*[doc-arg\$1] \
 
2258
.          nr doc-arg-type 1
 
2259
.  \}
 
2260
..
 
2261
.
 
2262
.
 
2263
.\" NS doc-set-spacing-1 macro
 
2264
.\" NS   set spacing for macros
 
2265
.\" NS
 
2266
.\" NS modifies:
 
2267
.\" NS   doc-spaceXXX
 
2268
.\" NS
 
2269
.\" NS local variables:
 
2270
.\" NS   doc-reg-dssfm
 
2271
.\" NS   doc-reg-dssfm1
 
2272
.
 
2273
.de doc-set-spacing-1
 
2274
.  nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
 
2275
.
 
2276
.  \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
 
2277
.  \" argument)
 
2278
.  ie (\n[doc-reg-dssfm1] == 3) \{\
 
2279
.    if \n[doc-arg-limit] \{\
 
2280
.      nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
 
2281
.      ds doc-space\n[doc-reg-dssfm]
 
2282
.    \}
 
2283
.    ds doc-space\n[doc-arg-limit] "\*[doc-space]
 
2284
.  \}
 
2285
.  el \{\
 
2286
.    \" macros like .Ap and .Ns have value 2 (remove space before and after
 
2287
.    \" argument)
 
2288
.    ie (\n[doc-reg-dssfm1] == 2) \{\
 
2289
.      if \n[doc-arg-limit] \{\
 
2290
.        nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
 
2291
.        ds doc-space\n[doc-reg-dssfm]
 
2292
.      \}
 
2293
.      ds doc-space\n[doc-arg-limit]
 
2294
.    \}
 
2295
.    el \
 
2296
.      ds doc-space\n[doc-arg-limit]
 
2297
.  \}
 
2298
..
 
2299
.
 
2300
.
 
2301
.\" NS doc-set-spacing-2 macro
 
2302
.\" NS   set spacing for strings
 
2303
.\" NS
 
2304
.\" NS modifies:
 
2305
.\" NS   doc-spaceXXX
 
2306
.
 
2307
.de doc-set-spacing-2
 
2308
.  ds doc-space\n[doc-arg-limit] "\*[doc-space]
 
2309
..
 
2310
.
 
2311
.
 
2312
.\" NS doc-set-spacing-3 macro
 
2313
.\" NS   set spacing for punctuation suffixes
 
2314
.\" NS
 
2315
.\" NS modifies:
 
2316
.\" NS   doc-spaceXXX
 
2317
.\" NS
 
2318
.\" NS local variables:
 
2319
.\" NS   doc-reg-dssfps
 
2320
.
 
2321
.de doc-set-spacing-3
 
2322
.  if \n[doc-arg-limit] \{\
 
2323
.    nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
 
2324
.    ds doc-space\n[doc-reg-dssfps]
 
2325
.  \}
 
2326
.
 
2327
.  ds doc-space\n[doc-arg-limit] "\*[doc-space]
 
2328
..
 
2329
.
 
2330
.
 
2331
.\" NS doc-set-spacing-4 macro
 
2332
.\" NS   set spacing for punctuation prefixes
 
2333
.\" NS
 
2334
.\" NS modifies:
 
2335
.\" NS   doc-spaceXXX
 
2336
.
 
2337
.de doc-set-spacing-4
 
2338
.  ds doc-space\n[doc-arg-limit]
 
2339
..
 
2340
.
 
2341
.
 
2342
.\" type switches (on current argument doc-arg-ptr)
 
2343
.
 
2344
.
 
2345
.\" NS doc-do-1 macro
 
2346
.\" NS   call request if macro
 
2347
.
 
2348
.de doc-do-1
 
2349
.  \*[doc-arg\n[doc-arg-ptr]]
 
2350
..
 
2351
.
 
2352
.
 
2353
.\" NS doc-do-2 macro
 
2354
.\" NS   call .doc-print-recursive if string
 
2355
.
 
2356
.als doc-do-2 doc-print-recursive
 
2357
.
 
2358
.
 
2359
.\" NS doc-do-3 macro
 
2360
.\" NS   call .doc-print-recursive if punctuation suffix
 
2361
.
 
2362
.als doc-do-3 doc-print-recursive
 
2363
.
 
2364
.
 
2365
.\" NS doc-do-4 macro
 
2366
.\" NS   call .doc-print-recursive if punctuation prefix
 
2367
.
 
2368
.als doc-do-4 doc-print-recursive
 
2369
.
 
2370
.
 
2371
.\" NS doc-fontmode-depth global register
 
2372
.\" NS   font mode level
 
2373
.
 
2374
.nr doc-fontmode-depth 0
 
2375
.
 
2376
.
 
2377
.\" NS doc-fontmode-font-stackXXX global register
 
2378
.\" NS   stack of saved current font values from `Bf' request
 
2379
.\" NS
 
2380
.\" NS limit:
 
2381
.\" NS   doc-fontmode-depth
 
2382
.
 
2383
.nr doc-fontmode-font-stack0 0
 
2384
.
 
2385
.
 
2386
.\" NS doc-fontmode-size-stackXXX global register
 
2387
.\" NS   stack of saved current size values from `Bf' request
 
2388
.\" NS
 
2389
.\" NS limit:
 
2390
.\" NS   doc-fontmode-depth
 
2391
.
 
2392
.nr doc-fontmode-size-stack0 0
 
2393
.
 
2394
.
 
2395
.\" NS Bf user macro
 
2396
.\" NS   begin font mode (will be begin-mode/end-mode in groff & TeX)
 
2397
.\" NS
 
2398
.\" NS modifies:
 
2399
.\" NS   doc-fontmode-depth
 
2400
.\" NS   doc-fontmode-font-stackXXX
 
2401
.\" NS   doc-fontmode-size-stackXXX
 
2402
.\" NS   doc-macro-name
 
2403
.\" NS
 
2404
.\" NS width register `Bf' set in doc-common
 
2405
.
 
2406
.de Bf
 
2407
.  ds doc-macro-name Bf
 
2408
.
 
2409
.  ie \n[.$] \{\
 
2410
.    nr doc-fontmode-depth +1
 
2411
.
 
2412
.    \" save current font and size
 
2413
.    nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
 
2414
.    nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
 
2415
.
 
2416
.    ie        "\$1"Em" \
 
2417
.      nop \*[doc-Em-font]\c
 
2418
.    el \{ .ie "\$1"Li" \
 
2419
.      nop \*[doc-Li-font]\c
 
2420
.    el \{ .ie "\$1"Sy" \
 
2421
.      nop \*[doc-Sy-font]\c
 
2422
.    el \{ .ie "\$1"-emphasis" \
 
2423
.      nop \*[doc-Em-font]\c
 
2424
.    el \{ .ie "\$1"-literal" \
 
2425
.      nop \*[doc-Li-font]\c
 
2426
.    el \{ .ie "\$1"-symbolic" \
 
2427
.      nop \*[doc-Sy-font]\c
 
2428
.    el \{\
 
2429
.      tmc mdoc warning: Unknown keyword `\$1' in .Bf request
 
2430
.      tm1 " (#\n[.c])
 
2431
.  \}\}\}\}\}\}\}
 
2432
.  el \
 
2433
.    tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
 
2434
..
 
2435
.
 
2436
.
 
2437
.\" NS Ef user macro
 
2438
.\" NS   end font mode
 
2439
.\" NS
 
2440
.\" NS modifies:
 
2441
.\" NS   doc-macro-name
 
2442
.\" NS
 
2443
.\" NS width register `Ef' set in doc-common
 
2444
.
 
2445
.de Ef
 
2446
.  ds doc-macro-name Ef
 
2447
.
 
2448
.  ie \n[doc-fontmode-depth] \{\
 
2449
.    \" restore saved font and size
 
2450
.    nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
 
2451
.    nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
 
2452
.
 
2453
.    nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
 
2454
.    nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
 
2455
.    nr doc-fontmode-depth -1
 
2456
.  \}
 
2457
.  el \
 
2458
.    tm mdoc warning: Extraneous .Ef (#\n[.c])
 
2459
..
 
2460
.
 
2461
.
 
2462
.\" NS doc-keep-type global register
 
2463
.\" NS   current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
 
2464
.
 
2465
.nr doc-keep-type 0
 
2466
.
 
2467
.
 
2468
.\" NS Bk user macro
 
2469
.\" NS   begin keep
 
2470
.\" NS
 
2471
.\" NS modifies:
 
2472
.\" NS   doc-keep-type
 
2473
.\" NS   doc-macro-name
 
2474
.\" NS
 
2475
.\" NS width register `Bk' set in doc-common
 
2476
.
 
2477
.de Bk
 
2478
.  ds doc-macro-name Bk
 
2479
.
 
2480
.  if \n[doc-keep-type] \
 
2481
.    tm .Bk: nesting keeps not implemented yet. (#\n[.c])
 
2482
.
 
2483
.  ie        "\$1"-lines" \{\
 
2484
.    nr doc-keep-type 2
 
2485
.    tm .Bk -lines: Not implemented yet. (#\n[.c])
 
2486
.  \}
 
2487
.  el \{ .ie "\$1"-words" \{\
 
2488
.    nr doc-keep-type 1
 
2489
.    doc-set-hard-space
 
2490
.  \}
 
2491
.  el \{ .ie "\$1"" \{\
 
2492
.    \" default
 
2493
.    nr doc-keep-type 1
 
2494
.    doc-set-hard-space
 
2495
.  \}
 
2496
.  el \{\
 
2497
.    tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
 
2498
.    nr doc-keep-type 3
 
2499
.  \}\}\}
 
2500
.
 
2501
\#.  nr doc-nesting-level +1
 
2502
..
 
2503
.
 
2504
.
 
2505
.\" NS Ek user macro
 
2506
.\" NS   end keep
 
2507
.\" NS
 
2508
.\" NS modifies:
 
2509
.\" NS   doc-keep-type
 
2510
.\" NS   doc-macro-name
 
2511
.\" NS
 
2512
.\" NS width register `Ek' set in doc-common
 
2513
.
 
2514
.de Ek
 
2515
.  ds doc-macro-name Ek
 
2516
.
 
2517
\#.  nr doc-nesting-level -1
 
2518
.
 
2519
.  ie \n[.$] \
 
2520
.    tm Usage: .Ek (does not take arguments) (#\n[.c])
 
2521
.  el \{\
 
2522
.    if !\n[doc-keep-type] \
 
2523
.      tm mdoc warning: .Ek found without .Bk before (#\n[.c])
 
2524
.
 
2525
.    ie        (\n[doc-keep-type] == 1) \
 
2526
.      doc-set-soft-space
 
2527
.    el \{ .if (\n[doc-keep-type] == 2) \
 
2528
.      tm .Bk -lines: Not implemented yet. (#\n[.c])
 
2529
.  \}\}
 
2530
.
 
2531
.  nr doc-keep-type 0
 
2532
.
 
2533
\#.  if !"\*[doc-out-string]"" \
 
2534
\#.    doc-print-out-string
 
2535
..
 
2536
.
 
2537
.
 
2538
.\" NS doc-display-depth global register
 
2539
.\" NS   display level
 
2540
.
 
2541
.nr doc-display-depth 0
 
2542
.
 
2543
.
 
2544
.\" NS doc-is-compact global register (bool)
 
2545
.\" NS   set if the `compact' keyword is given
 
2546
.
 
2547
.nr doc-is-compact 0
 
2548
.
 
2549
.
 
2550
.\" NS doc-display-type-stackXXX global string
 
2551
.\" NS   the display type stack
 
2552
.\" NS
 
2553
.\" NS limit:
 
2554
.\" NS   doc-display-depth
 
2555
.
 
2556
.ds doc-display-type-stack0
 
2557
.
 
2558
.
 
2559
.\" NS doc-display-indent-stackXXX global register
 
2560
.\" NS   stack of display indentation values
 
2561
.\" NS
 
2562
.\" NS limit:
 
2563
.\" NS   doc-display-depth
 
2564
.
 
2565
.nr doc-display-indent-stack0 0
 
2566
.
 
2567
.
 
2568
.\" NS doc-display-ad-stackXXX global register
 
2569
.\" NS   stack of saved adjustment modes
 
2570
.\" NS
 
2571
.\" NS limit:
 
2572
.\" NS   doc-display-depth
 
2573
.
 
2574
.nr doc-display-ad-stack0 0
 
2575
.
 
2576
.
 
2577
.\" NS doc-display-fi-stackXXX global register
 
2578
.\" NS   stack of saved fill modes
 
2579
.\" NS
 
2580
.\" NS limit:
 
2581
.\" NS   doc-display-depth
 
2582
.
 
2583
.nr doc-display-fi-stack0 0
 
2584
.
 
2585
.
 
2586
.\" NS doc-display-ft-stackXXX global register
 
2587
.\" NS   stack of saved fonts
 
2588
.\" NS
 
2589
.\" NS limit:
 
2590
.\" NS   doc-display-depth
 
2591
.
 
2592
.nr doc-display-ft-stack0 0
 
2593
.
 
2594
.
 
2595
.\" NS doc-display-ps-stackXXX global register
 
2596
.\" NS   stack of saved font sizes
 
2597
.\" NS
 
2598
.\" NS limit:
 
2599
.\" NS   doc-display-depth
 
2600
.
 
2601
.nr doc-display-ps-stack0 0
 
2602
.
 
2603
.
 
2604
.\" NS Bd user macro
 
2605
.\" NS   begin display
 
2606
.\" NS
 
2607
.\" NS width register `Bd' set in doc-common
 
2608
.\" NS
 
2609
.\" NS modifies:
 
2610
.\" NS   doc-curr-font
 
2611
.\" NS   doc-curr-size
 
2612
.\" NS   doc-display-depth
 
2613
.\" NS   doc-display-ad-stackXXX
 
2614
.\" NS   doc-display-fi-stackXXX
 
2615
.\" NS   doc-display-ft-stackXXX
 
2616
.\" NS   doc-display-ps-stackXXX
 
2617
.\" NS   doc-display-file
 
2618
.\" NS   doc-display-indent-stackXXX
 
2619
.\" NS   doc-display-type-stackXXX
 
2620
.\" NS   doc-is-compact
 
2621
.\" NS   doc-macro-name
 
2622
.\" NS
 
2623
.\" NS local variables:
 
2624
.\" NS   doc-reg-Bd
 
2625
.
 
2626
.de Bd
 
2627
.  ds doc-macro-name Bd
 
2628
.
 
2629
.  if !\n[.$] \{\
 
2630
.    tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
 
2631
.    tm1 "           [-offset [string]] [-compact] [-file name] (#\n[.c])
 
2632
.    return
 
2633
.  \}
 
2634
.
 
2635
.  nr doc-is-compact 0
 
2636
.  ds doc-display-file
 
2637
.  nr doc-reg-Bd 1
 
2638
.  nr doc-display-depth +1
 
2639
.
 
2640
.  \" save current adjustment and fill modes
 
2641
.  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
 
2642
.  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
 
2643
.
 
2644
.  ie        "\$1"-literal" \{\
 
2645
.    ds doc-display-type-stack\n[doc-display-depth] literal
 
2646
.    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
 
2647
.    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
 
2648
.
 
2649
.    ie t \{\
 
2650
.      nop \*[doc-Li-font]\c
 
2651
'      ta T 9n
 
2652
.    \}
 
2653
.    el \
 
2654
'      ta T 8n
 
2655
.    nf
 
2656
.  \}
 
2657
.  el \{ .ie "\$1"-filled" \{\
 
2658
.    ds doc-display-type-stack\n[doc-display-depth] filled
 
2659
.    ad b
 
2660
.    fi
 
2661
.  \}
 
2662
.  el \{ .ie "\$1"-ragged" \{\
 
2663
.    ds doc-display-type-stack\n[doc-display-depth] ragged
 
2664
.    na
 
2665
.    fi
 
2666
.  \}
 
2667
.  el \{ .ie "\$1"-centered" \{\
 
2668
.    ds doc-display-type-stack\n[doc-display-depth] centered
 
2669
.    ad c
 
2670
.    fi
 
2671
.  \}
 
2672
.  el \{ .ie "\$1"-unfilled" \{\
 
2673
.    ds doc-display-type-stack\n[doc-display-depth] unfilled
 
2674
.    nf
 
2675
.  \}
 
2676
.  el \{\
 
2677
.    tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
 
2678
.    tm1 "              in .Bd request (#\n[.c])
 
2679
.    nr doc-reg-Bd 0
 
2680
.  \}\}\}\}\}
 
2681
.
 
2682
.  \" have we seen an argument?
 
2683
.  if \n[doc-reg-Bd] \{\
 
2684
.    shift
 
2685
.    \" check other arguments
 
2686
.    if \n[.$] \
 
2687
.      doc-do-Bd-args \$@
 
2688
.  \}
 
2689
.
 
2690
.  \" avoid warning about non-existent register
 
2691
.  if !r doc-display-indent-stack\n[doc-display-depth] \
 
2692
.    nr doc-display-indent-stack\n[doc-display-depth] 0
 
2693
.
 
2694
.  if \n[doc-display-indent-stack\n[doc-display-depth]] \
 
2695
'    in +\n[doc-display-indent-stack\n[doc-display-depth]]u
 
2696
.
 
2697
.  if !\n[doc-is-compact] \{\
 
2698
.    if !\n[doc-in-synopsis-section] \{\
 
2699
.      ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
 
2700
.        sp \n[doc-display-vertical]u
 
2701
.      el \
 
2702
'        sp \n[doc-display-vertical]u
 
2703
.  \}\}
 
2704
.
 
2705
.  if !\n[cR] \
 
2706
.    ne 2v
 
2707
.
 
2708
.  if !"\*[doc-display-file]"" \
 
2709
.    so \*[doc-display-file]
 
2710
.
 
2711
.  nr doc-is-compact 0
 
2712
.  ds doc-display-file
 
2713
..
 
2714
.
 
2715
.
 
2716
.\" NS doc-do-Bd-args macro
 
2717
.\" NS   resolve remaining .Bd arguments
 
2718
.\" NS
 
2719
.\" NS modifies:
 
2720
.\" NS   doc-display-file
 
2721
.\" NS   doc-display-indent-stackXXX
 
2722
.\" NS   doc-is-compact
 
2723
.\" NS
 
2724
.\" NS local variables:
 
2725
.\" NS   doc-reg-ddBa
 
2726
.\" NS   doc-reg-ddBa1
 
2727
.\" NS   doc-reg-ddBa2
 
2728
.\" NS   doc-reg-ddBa3
 
2729
.\" NS   doc-reg-ddBa4
 
2730
.\" NS   doc-str-ddBa
 
2731
.
 
2732
.de doc-do-Bd-args
 
2733
.  nr doc-reg-ddBa 1
 
2734
.
 
2735
.  ie        "\$1"-offset" \{\
 
2736
.    nr doc-reg-ddBa 2
 
2737
.
 
2738
.    ie        "\$2"left" \
 
2739
.      nr doc-display-indent-stack\n[doc-display-depth] 0
 
2740
.    el \{ .ie "\$2"right" \
 
2741
.      nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
 
2742
.    el \{ .ie "\$2"center" \
 
2743
.      nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
 
2744
.    el \{ .ie "\$2"indent" \
 
2745
.      nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
 
2746
.    el \{ .ie "\$2"indent-two" \
 
2747
.      nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
 
2748
.    el \
 
2749
.      nr doc-reg-ddBa 1
 
2750
.    \}\}\}\}
 
2751
.
 
2752
.    \" not a known keyword
 
2753
.    if (\n[doc-reg-ddBa] == 1) \{\
 
2754
.      nr doc-reg-ddBa 2
 
2755
.
 
2756
.      nr doc-reg-ddBa1 0
 
2757
.      if \B(\$2) \{\
 
2758
.        \" disable warnings related to scaling indicators (32)
 
2759
.        nr doc-reg-ddBa2 \n[.warn]
 
2760
.        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
 
2761
.
 
2762
.        \" values without a scaling indicator are taken as strings;
 
2763
.        \" we test whether the parameter string with and without the last
 
2764
.        \" character yields identical numerical results (ignoring the
 
2765
.        \" scaling indicator)
 
2766
.        ds doc-str-ddBa "\$2
 
2767
.        substring doc-str-ddBa 1 -1
 
2768
.        if \B(\*[doc-str-ddBa]) \{\
 
2769
.          nr doc-reg-ddBa3 (;(\$2))
 
2770
.          nr doc-reg-ddBa4 (\*[doc-str-ddBa])
 
2771
.          if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
 
2772
.            nr doc-reg-ddBa1 1
 
2773
.        \}
 
2774
.
 
2775
.        \" enable all warnings again
 
2776
.        warn \n[doc-reg-ddBa2]
 
2777
.      \}
 
2778
.
 
2779
.      ie \n[doc-reg-ddBa1] \
 
2780
.        nr doc-display-indent-stack\n[doc-display-depth] \$2
 
2781
.      el \{\
 
2782
.        doc-get-width "\$2"
 
2783
.        ie (\n[doc-width] <= 3) \{\
 
2784
.          \" if the offset parameter is a macro, use the macro's
 
2785
.          \" width as specified in doc-common
 
2786
.          doc-get-arg-type "\$2"
 
2787
.          ie (\n[doc-arg-type] == 1) \
 
2788
.            nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
 
2789
.          el \
 
2790
.            nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
2791
.        \}
 
2792
.        el \
 
2793
.          nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
2794
.    \}\}
 
2795
.  \}
 
2796
.  el \{ .ie "\$1"-compact" \
 
2797
.    nr doc-is-compact 1
 
2798
.  el \{ .ie "\$1"-file" \{\
 
2799
.    ie !"\$2"" \{\
 
2800
.      ds doc-display-file "\$2
 
2801
.      nr doc-reg-ddBa 2
 
2802
.    \}
 
2803
.    el \
 
2804
.      tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
 
2805
.  \}
 
2806
.  el \
 
2807
.      tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
 
2808
.  \}\}
 
2809
.
 
2810
.  if (\n[doc-reg-ddBa] < \n[.$]) \{\
 
2811
.    shift \n[doc-reg-ddBa]
 
2812
.    doc-do-Bd-args \$@
 
2813
.  \}
 
2814
..
 
2815
.
 
2816
.
 
2817
.\" NS Ed user macro
 
2818
.\" NS   end display
 
2819
.\" NS
 
2820
.\" NS modifies:
 
2821
.\" NS   doc-display-depth
 
2822
.\" NS   doc-display-indent-stackXXX
 
2823
.\" NS   doc-display-type-stackXXX
 
2824
.\" NS   doc-macro-name
 
2825
.\" NS
 
2826
.\" NS width register `Ed' set in doc-common
 
2827
.
 
2828
.de Ed
 
2829
.  ds doc-macro-name Ed
 
2830
.
 
2831
.  br
 
2832
.
 
2833
.  if !\n[doc-display-depth] \{\
 
2834
.    tm mdoc warning: Extraneous .Ed (#\n[.c])
 
2835
.    nr doc-display-depth 1
 
2836
.  \}
 
2837
.
 
2838
.  if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
 
2839
.    ft \n[doc-display-ft-stack\n[doc-display-depth]]
 
2840
.    ps \n[doc-display-ps-stack\n[doc-display-depth]]u
 
2841
.  \}
 
2842
.
 
2843
.  in -\n[doc-display-indent-stack\n[doc-display-depth]]u
 
2844
.
 
2845
.  \" restore saved adjustment and fill modes
 
2846
.  ie \n[doc-display-fi-stack\n[doc-display-depth]] \
 
2847
.    fi
 
2848
.  el \
 
2849
.    nf
 
2850
.  ad \n[doc-display-ad-stack\n[doc-display-depth]]
 
2851
.
 
2852
.  nr doc-display-indent-stack\n[doc-display-depth] 0
 
2853
.  ds doc-display-type-stack\n[doc-display-depth]
 
2854
.  nr doc-display-depth -1
 
2855
..
 
2856
.
 
2857
.
 
2858
.\" NS doc-list-type-stackXXX global string
 
2859
.\" NS   stack of list types
 
2860
.\" NS
 
2861
.\" NS limit:
 
2862
.\" NS   doc-list-depth
 
2863
.
 
2864
.ds doc-list-type-stack1
 
2865
.
 
2866
.
 
2867
.\" NS doc-list-indent-stackXXX global register
 
2868
.\" NS   stack of list indentation values
 
2869
.\" NS
 
2870
.\" NS limit:
 
2871
.\" NS   doc-list-depth
 
2872
.
 
2873
.nr doc-list-indent-stack1 0
 
2874
.
 
2875
.
 
2876
.\" NS doc-list-have-indent-stackXXX global register (bool)
 
2877
.\" NS   an indentation value is active
 
2878
.\" NS
 
2879
.\" NS limit:
 
2880
.\" NS   doc-list-depth
 
2881
.
 
2882
.nr doc-list-have-indent-stack1 0
 
2883
.
 
2884
.
 
2885
.\" NS Bl user macro
 
2886
.\" NS   begin list
 
2887
.\" NS
 
2888
.\" NS width register `Bl' set in doc-common
 
2889
.\" NS
 
2890
.\" NS modifies:
 
2891
.\" NS   doc-arg-ptr
 
2892
.\" NS   doc-argXXX
 
2893
.\" NS   doc-list-depth
 
2894
.\" NS   doc-list-have-indent-stackXXX
 
2895
.\" NS   doc-list-indent-stackXXX
 
2896
.\" NS   doc-list-type-stackXXX
 
2897
.\" NS   doc-macro-name
 
2898
.\" NS   doc-num-args
 
2899
.\" NS   doc-num-columns
 
2900
.\" NS
 
2901
.\" NS local variables:
 
2902
.\" NS   doc-reg-Bl
 
2903
.
 
2904
.de Bl
 
2905
.  if !\n[.$] \{\
 
2906
.    doc-Bl-usage
 
2907
.    return
 
2908
.  \}
 
2909
.
 
2910
.  ds doc-macro-name Bl
 
2911
.  nr doc-list-depth +1
 
2912
.  nr doc-arg-ptr 1
 
2913
.
 
2914
.  ie        "\$1"-hang" \{\
 
2915
.    ds doc-list-type-stack\n[doc-list-depth] hang-list
 
2916
.    nr doc-list-indent-stack\n[doc-list-depth] 6n
 
2917
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2918
.  \}
 
2919
.  el \{ .ie "\$1"-tag" \{\
 
2920
.    ds doc-list-type-stack\n[doc-list-depth] tag-list
 
2921
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2922
.  \}
 
2923
.  el \{ .ie "\$1"-item" \{\
 
2924
.    ds doc-list-type-stack\n[doc-list-depth] item-list
 
2925
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2926
.  \}
 
2927
.  el \{ .ie "\$1"-enum" \{\
 
2928
.    ds doc-list-type-stack\n[doc-list-depth] enum-list
 
2929
.    nr doc-list-indent-stack\n[doc-list-depth] 3n
 
2930
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2931
.  \}
 
2932
.  el \{ .ie "\$1"-bullet" \{\
 
2933
.    ds doc-list-type-stack\n[doc-list-depth] bullet-list
 
2934
.    nr doc-list-indent-stack\n[doc-list-depth] 2n
 
2935
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2936
.  \}
 
2937
.  el \{ .ie "\$1"-dash" \{\
 
2938
.    ds doc-list-type-stack\n[doc-list-depth] dash-list
 
2939
.    nr doc-list-indent-stack\n[doc-list-depth] 2n
 
2940
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2941
.  \}
 
2942
.  el \{ .ie "\$1"-hyphen" \{\
 
2943
.    ds doc-list-type-stack\n[doc-list-depth] dash-list
 
2944
.    nr doc-list-indent-stack\n[doc-list-depth] 2n
 
2945
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2946
.  \}
 
2947
.  el \{ .ie "\$1"-inset" \{\
 
2948
.    ds doc-list-type-stack\n[doc-list-depth] inset-list
 
2949
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2950
.  \}
 
2951
.  el \{ .ie "\$1"-diag" \{\
 
2952
.    ds doc-list-type-stack\n[doc-list-depth] diag-list
 
2953
.  \}
 
2954
.  el \{ .ie "\$1"-ohang" \{\
 
2955
.    ds doc-list-type-stack\n[doc-list-depth] ohang-list
 
2956
.    nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
2957
.  \}
 
2958
.  el \{ .ie "\$1"-column" \{\
 
2959
.    ds doc-list-type-stack\n[doc-list-depth] column-list
 
2960
.    linetabs 1
 
2961
.  \}
 
2962
.  el \{\
 
2963
.    tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
 
2964
.    tm1 "              in .Bl request
 
2965
.    tm
 
2966
.    nr doc-arg-ptr 0
 
2967
.  \}\}\}\}\}\}\}\}\}\}\}
 
2968
.
 
2969
.  \" we have seen a list type
 
2970
.  if !\n[doc-arg-ptr] \{\
 
2971
.    doc-Bl-usage
 
2972
.    doc-reset-args
 
2973
.    nr doc-list-depth -1
 
2974
.    return
 
2975
.  \}
 
2976
.
 
2977
.  shift
 
2978
.
 
2979
.  \" fill argument vector
 
2980
.  nr doc-reg-Bl 1
 
2981
.  while (\n[doc-reg-Bl] <= \n[.$]) \{\
 
2982
.    ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
 
2983
.    nr doc-reg-Bl +1
 
2984
.  \}
 
2985
.
 
2986
.  doc-increment-list-stack
 
2987
.
 
2988
.  if \n[.$] \{\
 
2989
.    nr doc-arg-limit \n[.$]
 
2990
.    nr doc-arg-ptr 0
 
2991
.    doc-do-Bl-args
 
2992
.
 
2993
.    in +\n[doc-list-offset-stack\n[doc-list-depth]]u
 
2994
.
 
2995
.    \" initialize column list
 
2996
.    if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
 
2997
.      doc-set-column-tab \n[doc-num-columns]
 
2998
'      in -\n[doc-column-indent-width]u
 
2999
.      if !\n[doc-compact-list-stack\n[doc-list-depth]] \
 
3000
.        sp \n[doc-display-vertical]u
 
3001
.
 
3002
.      nf
 
3003
.      nr doc-num-columns 0
 
3004
.  \}\}
 
3005
.
 
3006
.  doc-reset-args
 
3007
..
 
3008
.
 
3009
.
 
3010
.\" NS doc-Bl-usage macro
 
3011
.
 
3012
.de doc-Bl-usage
 
3013
.  tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
 
3014
.  tm1 "             [-width <string>] [-xwidth <command>]
 
3015
.  tm1 "             [-offset <string>] [-compact]
 
3016
.  tm1 "       .Bl -column [-offset <string>] <string1> <string2> ...
 
3017
.  tm1 "       .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
 
3018
.  tm1 "             [-offset <string>] [-compact] (#\n[.c])
 
3019
..
 
3020
.
 
3021
.
 
3022
.\" NS doc-do-Bl-args macro
 
3023
.\" NS   resolve remaining .Bl arguments
 
3024
.\" NS
 
3025
.\" NS modifies:
 
3026
.\" NS   doc-arg-ptr
 
3027
.\" NS   doc-argXXX
 
3028
.\" NS   doc-compact-list-stackXXX
 
3029
.\" NS   doc-list-indent-stackXXX
 
3030
.\" NS   doc-list-offset-stackXXX
 
3031
.\" NS   doc-num-columns
 
3032
.\" NS   doc-tag-prefix-stackXXX
 
3033
.\" NS   doc-tag-width-stackXXX
 
3034
.\" NS
 
3035
.\" NS local variables:
 
3036
.\" NS   doc-box-dBla
 
3037
.\" NS   doc-env-dBla
 
3038
.\" NS   doc-reg-dBla
 
3039
.\" NS   doc-reg-dBla1
 
3040
.\" NS   doc-reg-dBla2
 
3041
.\" NS   doc-reg-dBla3
 
3042
.\" NS   doc-reg-dBla4
 
3043
.\" NS   doc-str-dBla
 
3044
.\" NS   doc-str-dBla1
 
3045
.
 
3046
.de doc-do-Bl-args
 
3047
.  nr doc-arg-ptr +1
 
3048
.
 
3049
.  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
 
3050
.    return
 
3051
.
 
3052
.  \" avoid a warning message in case e.g. `-offset' has no parameter
 
3053
.  nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
 
3054
.  if !d doc-arg\n[doc-reg-dBla] \
 
3055
.    ds doc-arg\n[doc-reg-dBla]
 
3056
.
 
3057
.  nr doc-reg-dBla 1
 
3058
.
 
3059
.  ie        "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
 
3060
.    nr doc-compact-list-stack\n[doc-list-depth] 1
 
3061
.
 
3062
.  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
 
3063
.    ie (\n[doc-list-depth] > 1) \{\
 
3064
.      nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
 
3065
.      ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
 
3066
.      as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
 
3067
.      length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
 
3068
.      nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
 
3069
.    \}
 
3070
.    el \
 
3071
.      tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
 
3072
.  \}
 
3073
.
 
3074
.  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
 
3075
.    nr doc-arg-ptr +1
 
3076
.    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
 
3077
.    ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
 
3078
.
 
3079
.    \" test whether argument is a valid numeric expression
 
3080
.    nr doc-reg-dBla1 0
 
3081
.    if \B(\*[doc-str-dBla]) \{\
 
3082
.      \" disable warnings related to scaling indicators (32)
 
3083
.      nr doc-reg-dBla2 \n[.warn]
 
3084
.      warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
 
3085
.
 
3086
.      \" values without a scaling indicator are taken as strings;
 
3087
.      \" we test whether the parameter string with and without the last
 
3088
.      \" character yields identical numerical results (ignoring the
 
3089
.      \" scaling indicator)
 
3090
.      ds doc-str-dBla1 "\*[doc-str-dBla]
 
3091
.      substring doc-str-dBla1 1 -1
 
3092
.      if \B(\*[doc-str-dBla1]) \{\
 
3093
.        nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
 
3094
.        nr doc-reg-dBla4 (\*[doc-str-dBla1])
 
3095
.        if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
 
3096
.          nr doc-reg-dBla1 1
 
3097
.      \}
 
3098
.
 
3099
.      \" enable all warnings again
 
3100
.      warn \n[doc-reg-dBla2]
 
3101
.    \}
 
3102
.
 
3103
.    ie \n[doc-reg-dBla1] \
 
3104
.      nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
 
3105
.    el \{\
 
3106
.      doc-get-arg-width \n[doc-arg-ptr]
 
3107
.      ie (\n[doc-width] == 2) \{\
 
3108
.        \" if the width parameter is a macro, use the macro's
 
3109
.        \" width as specified in doc-common
 
3110
.        doc-get-arg-type \*[doc-str-dBla]
 
3111
.        ie (\n[doc-arg-type] == 1) \
 
3112
.          nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
 
3113
.        el \
 
3114
.          nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
3115
.      \}
 
3116
.      el \
 
3117
.        nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
3118
.  \}\}
 
3119
.
 
3120
.  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
 
3121
.    nr doc-arg-ptr +1
 
3122
.    ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
 
3123
.
 
3124
.    ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
 
3125
.    substring doc-str-dBla 1 2
 
3126
.    if .\*[doc-str-dBla] \{\
 
3127
.      \" execute string in a box to get the width of the diversion
 
3128
.      ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
 
3129
.      doc-save-global-vars
 
3130
.      doc-reset-args
 
3131
.      box doc-box-dBla
 
3132
.      ev doc-env-dBla
 
3133
.      evc 0
 
3134
.      in 0
 
3135
.      nf
 
3136
.      nop \*[doc-str-dBla]
 
3137
.      br
 
3138
.      ev
 
3139
.      box
 
3140
.      doc-restore-global-vars
 
3141
.      doc-get-width \h'\n[dl]u'
 
3142
.    \}
 
3143
.    nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
3144
.  \}
 
3145
.
 
3146
.  el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
 
3147
.    nr doc-arg-ptr +1
 
3148
.
 
3149
.    ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
 
3150
.      nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
 
3151
.    el \{\
 
3152
.      ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
 
3153
.      nr doc-reg-dBla1 0
 
3154
.      if \B(\*[doc-str-dBla]) \{\
 
3155
.        nr doc-reg-dBla2 \n[.warn]
 
3156
.        warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
 
3157
.
 
3158
.        ds doc-str-dBla1 "\*[doc-str-dBla]
 
3159
.        substring doc-str-dBla1 1 -1
 
3160
.        if \B(\*[doc-str-dBla1]) \{\
 
3161
.          nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
 
3162
.          nr doc-reg-dBla4 (\*[doc-str-dBla1])
 
3163
.          if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
 
3164
.            nr doc-reg-dBla1 1
 
3165
.        \}
 
3166
.
 
3167
.        warn \n[doc-reg-dBla2]
 
3168
.      \}
 
3169
.
 
3170
.      ie \n[doc-reg-dBla1] \
 
3171
.        nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
 
3172
.      el \{\
 
3173
.        doc-get-arg-width \n[doc-arg-ptr]
 
3174
.        ie (\n[doc-width] <= 3) \{\
 
3175
.          \" if the offset parameter is a macro, use the macro's
 
3176
.          \" width as specified in doc-common
 
3177
.          doc-get-arg-type \*[doc-str-dBla]
 
3178
.          ie (\n[doc-arg-type] == 1) \
 
3179
.            nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
 
3180
.          el \
 
3181
.            nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
3182
.        \}
 
3183
.        el \
 
3184
.          nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
 
3185
.  \}\}\}
 
3186
.  el \
 
3187
.    nr doc-reg-dBla 0
 
3188
.  \}\}\}\}
 
3189
.
 
3190
.  \" not a known keyword, so it specifies the width of the next column
 
3191
.  \" (if it is a column list)
 
3192
.  if !\n[doc-reg-dBla] \{\
 
3193
.    ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
 
3194
.      nr doc-num-columns +1
 
3195
.      ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
 
3196
.    \}
 
3197
.    el \{\
 
3198
.      tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
 
3199
.      tm1 " in .Bl request (#\n[.c])
 
3200
.  \}\}
 
3201
.
 
3202
.  if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
 
3203
.    doc-do-Bl-args
 
3204
..
 
3205
.
 
3206
.
 
3207
.\" NS doc-save-global-vars macro
 
3208
.\" NS   save all global variables
 
3209
.\" NS
 
3210
.\" NS local variables:
 
3211
.\" NS   doc-reg-dsgv
 
3212
.
 
3213
.de doc-save-global-vars
 
3214
.  ds doc-macro-name-saved "\*[doc-macro-name]
 
3215
.  nr doc-arg-limit-saved \n[doc-arg-limit]
 
3216
.  nr doc-num-args-saved \n[doc-num-args]
 
3217
.  nr doc-arg-ptr-saved \n[doc-arg-ptr]
 
3218
.
 
3219
.  nr doc-reg-dsgv 1
 
3220
.  while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
 
3221
.    ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
 
3222
.    nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
 
3223
.    ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
 
3224
.    nr doc-reg-dsgv +1
 
3225
.  \}
 
3226
.
 
3227
.  nr doc-curr-font-saved \n[doc-curr-font]
 
3228
.  nr doc-curr-size-saved \n[doc-curr-size]
 
3229
.  nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
 
3230
.  nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
 
3231
.  nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
 
3232
.  nr doc-have-decl-saved \n[doc-have-decl]
 
3233
.  nr doc-have-var-saved \n[doc-have-var]
 
3234
.  ds doc-command-name-saved "\*[doc-command-name]
 
3235
.  ds doc-quote-left-saved "\*[doc-quote-left]
 
3236
.  ds doc-quote-right-saved "\*[doc-quote-right]
 
3237
.  nr doc-nesting-level-saved \n[doc-nesting-level]
 
3238
.  nr doc-in-list-saved \n[doc-in-list]
 
3239
.  ds doc-space-saved "\*[doc-space]
 
3240
.  ds doc-saved-space-saved "\*[doc-saved-space]
 
3241
.  nr doc-space-mode-saved \n[doc-space-mode]
 
3242
.  nr doc-have-space-saved \n[doc-have-space]
 
3243
.  nr doc-have-slot-saved \n[doc-have-slot]
 
3244
.  nr doc-keep-type-saved \n[doc-keep-type]
 
3245
.  nr doc-display-depth-saved \n[doc-display-depth]
 
3246
.  nr doc-is-compact-saved \n[doc-is-compact]
 
3247
.
 
3248
.  nr doc-reg-dsgv 0
 
3249
.  while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
 
3250
.    ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
 
3251
.    nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
 
3252
.    nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
 
3253
.    nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
 
3254
.    nr doc-display-ft-stack\n[doc-reg-dsgv]-saved \n[doc-display-ft-stack\n[doc-reg-dsgv]]
 
3255
.    nr doc-display-ps-stack\n[doc-reg-dsgv]-saved \n[doc-display-ps-stack\n[doc-reg-dsgv]]
 
3256
.    nr doc-reg-dsgv +1
 
3257
.  \}
 
3258
.
 
3259
.  nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
 
3260
.
 
3261
.  nr doc-reg-dsgv 1
 
3262
.  while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
 
3263
.    nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
 
3264
.    nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
 
3265
.    nr doc-reg-dsgv +1
 
3266
.  \}
 
3267
.
 
3268
.  nr doc-list-depth-saved \n[doc-list-depth]
 
3269
.
 
3270
.  nr doc-reg-dsgv 1
 
3271
.  while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
 
3272
.    ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
 
3273
.    nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
 
3274
.    nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
 
3275
.    nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
 
3276
.    ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
 
3277
.    ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
 
3278
.    nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
 
3279
.    nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
 
3280
.    nr doc-reg-dsgv +1
 
3281
.  \}
 
3282
.
 
3283
.  ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
 
3284
.  nr doc-curr-type-saved \n[doc-curr-type]
 
3285
.  ds doc-curr-arg-saved "\*[doc-curr-arg]
 
3286
.  nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
 
3287
.  nr doc-num-columns-saved \n[doc-num-columns]
 
3288
.  nr doc-column-indent-width-saved \n[doc-column-indent-width]
 
3289
.  nr doc-is-func-saved \n[doc-is-func]
 
3290
.  nr doc-have-old-func-saved \n[doc-have-old-func]
 
3291
.  nr doc-func-arg-count-saved \n[doc-func-arg-count]
 
3292
.  ds doc-func-arg-saved "\*[doc-func-arg]
 
3293
.  nr doc-num-func-args-saved \n[doc-num-func-args]
 
3294
.  nr doc-func-args-processed-saved \n[doc-func-args-processed]
 
3295
.  nr doc-have-func-saved \n[doc-have-func]
 
3296
.  nr doc-is-reference-saved \n[doc-is-reference]
 
3297
.  nr doc-reference-count-saved \n[doc-reference-count]
 
3298
.  nr doc-author-count-saved \n[doc-author-count]
 
3299
.
 
3300
.  nr doc-reg-dsgv 0
 
3301
.  while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
 
3302
.    ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
 
3303
.    nr doc-reg-dsgv +1
 
3304
.  \}
 
3305
.
 
3306
.  nr doc-book-count-saved \n[doc-book-count]
 
3307
.  ds doc-book-name-saved "\*[doc-book-name]
 
3308
.  nr doc-date-count-saved \n[doc-date-count]
 
3309
.  ds doc-date-saved "\*[doc-date]
 
3310
.  nr doc-publisher-count-saved \n[doc-publisher-count]
 
3311
.  ds doc-publisher-name-saved "\*[doc-publisher-name]
 
3312
.  nr doc-journal-count-saved \n[doc-journal-count]
 
3313
.  ds doc-journal-name-saved "\*[doc-journal-name]
 
3314
.  nr doc-issue-count-saved \n[doc-issue-count]
 
3315
.  ds doc-issue-name-saved "\*[doc-issue-name]
 
3316
.  nr doc-optional-count-saved \n[doc-optional-count]
 
3317
.  ds doc-optional-string-saved "\*[doc-optional-string]
 
3318
.  nr doc-page-number-count-saved \n[doc-page-number-count]
 
3319
.  ds doc-page-number-string-saved "\*[doc-page-number-string]
 
3320
.  nr doc-corporate-count-saved \n[doc-corporate-count]
 
3321
.  ds doc-corporate-name-saved "\*[doc-corporate-name]
 
3322
.  nr doc-report-count-saved \n[doc-report-count]
 
3323
.  ds doc-report-name-saved "\*[doc-report-name]
 
3324
.  nr doc-reference-title-count-saved \n[doc-reference-title-count]
 
3325
.  ds doc-reference-title-name-saved "\*[doc-reference-title-name]
 
3326
.  ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
 
3327
.  nr doc-volume-count-saved \n[doc-volume-count]
 
3328
.  ds doc-volume-name-saved "\*[doc-volume-name]
 
3329
.  nr doc-have-author-saved \n[doc-have-author]
 
3330
.
 
3331
.  ds doc-document-title-saved "\*[doc-document-title]
 
3332
.  ds doc-volume-saved "\*[doc-volume]
 
3333
.  ds doc-section-saved "\*[doc-section]
 
3334
.  ds doc-operating-system-saved "\*[doc-operating-system]
 
3335
.  ds doc-date-string-saved "\*[doc-date-string]
 
3336
.  nr doc-header-space-saved \n[doc-header-space]
 
3337
.  nr doc-footer-space-saved \n[doc-footer-space]
 
3338
.  nr doc-display-vertical-saved \n[doc-display-vertical]
 
3339
.  ds doc-header-string-saved "\*[doc-header-string]
 
3340
.  nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
 
3341
.  nr doc-in-files-section-saved \n[doc-in-files-section]
 
3342
.  nr doc-in-authors-section-saved \n[doc-in-authors-section]
 
3343
..
 
3344
.
 
3345
.
 
3346
.\" NS doc-restore-global-vars macro
 
3347
.\" NS   restore all global variables
 
3348
.\" NS
 
3349
.\" NS local variables:
 
3350
.\" NS   doc-reg-drgv
 
3351
.
 
3352
.de doc-restore-global-vars
 
3353
.  ds doc-macro-name "\*[doc-macro-name-saved]
 
3354
.  nr doc-arg-limit \n[doc-arg-limit-saved]
 
3355
.  nr doc-num-args \n[doc-num-args-saved]
 
3356
.  nr doc-arg-ptr \n[doc-arg-ptr-saved]
 
3357
.
 
3358
.  nr doc-reg-drgv 1
 
3359
.  while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
 
3360
.    ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
 
3361
.    nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
 
3362
.    ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
 
3363
.    nr doc-reg-drgv +1
 
3364
.  \}
 
3365
.
 
3366
.  nr doc-curr-font \n[doc-curr-font-saved]
 
3367
.  nr doc-curr-size \n[doc-curr-size-saved]
 
3368
.  nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
 
3369
.  nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
 
3370
.  nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
 
3371
.  nr doc-have-decl \n[doc-have-decl-saved]
 
3372
.  nr doc-have-var \n[doc-have-var-saved]
 
3373
.  ds doc-command-name "\*[doc-command-name-saved]
 
3374
.  ds doc-quote-left "\*[doc-quote-left-saved]
 
3375
.  ds doc-quote-right "\*[doc-quote-right-saved]
 
3376
.  nr doc-nesting-level \n[doc-nesting-level-saved]
 
3377
.  nr doc-in-list \n[doc-in-list-saved]
 
3378
.  ds doc-space "\*[doc-space-saved]
 
3379
.  ds doc-saved-space "\*[doc-saved-space-saved]
 
3380
.  nr doc-space-mode \n[doc-space-mode-saved]
 
3381
.  nr doc-have-space \n[doc-have-space-saved]
 
3382
.  nr doc-have-slot \n[doc-have-slot-saved]
 
3383
.  nr doc-keep-type \n[doc-keep-type-saved]
 
3384
.  nr doc-display-depth \n[doc-display-depth-saved]
 
3385
.  nr doc-is-compact \n[doc-is-compact-saved]
 
3386
.
 
3387
.  nr doc-reg-drgv 0
 
3388
.  while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
 
3389
.    ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
 
3390
.    nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
 
3391
.    nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
 
3392
.    nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
 
3393
.    nr doc-display-ft-stack\n[doc-reg-drgv] \n[doc-display-ft-stack\n[doc-reg-drgv]-saved]
 
3394
.    nr doc-display-ps-stack\n[doc-reg-drgv] \n[doc-display-ps-stack\n[doc-reg-drgv]-saved]
 
3395
.    nr doc-reg-drgv +1
 
3396
.  \}
 
3397
.
 
3398
.  nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
 
3399
.
 
3400
.  nr doc-reg-drgv 1
 
3401
.  while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
 
3402
.    nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
 
3403
.    nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
 
3404
.    nr doc-reg-drgv +1
 
3405
.  \}
 
3406
.
 
3407
.  nr doc-list-depth \n[doc-list-depth-saved]
 
3408
.
 
3409
.  nr doc-reg-drgv 1
 
3410
.  while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
 
3411
.    ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
 
3412
.    nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
 
3413
.    nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
 
3414
.    nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
 
3415
.    ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
 
3416
.    ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
 
3417
.    nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
 
3418
.    nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
 
3419
.    nr doc-reg-drgv +1
 
3420
.  \}
 
3421
.
 
3422
.  ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
 
3423
.  nr doc-curr-type \n[doc-curr-type-saved]
 
3424
.  ds doc-curr-arg "\*[doc-curr-arg-saved]
 
3425
.  nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
 
3426
.  nr doc-num-columns \n[doc-num-columns-saved]
 
3427
.  nr doc-column-indent-width \n[doc-column-indent-width-saved]
 
3428
.  nr doc-is-func \n[doc-is-func-saved]
 
3429
.  nr doc-have-old-func \n[doc-have-old-func-saved]
 
3430
.  nr doc-func-arg-count \n[doc-func-arg-count-saved]
 
3431
.  ds doc-func-arg "\*[doc-func-arg-saved]
 
3432
.  nr doc-num-func-args \n[doc-num-func-args-saved]
 
3433
.  nr doc-func-args-processed \n[doc-func-args-processed-saved]
 
3434
.  nr doc-have-func \n[doc-have-func-saved]
 
3435
.  nr doc-is-reference \n[doc-is-reference-saved]
 
3436
.  nr doc-reference-count \n[doc-reference-count-saved]
 
3437
.  nr doc-author-count \n[doc-author-count-saved]
 
3438
.
 
3439
.  nr doc-reg-drgv 0
 
3440
.  while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
 
3441
.    ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
 
3442
.    nr doc-reg-drgv +1
 
3443
.  \}
 
3444
.
 
3445
.  nr doc-book-count \n[doc-book-count-saved]
 
3446
.  ds doc-book-name "\*[doc-book-name-saved]
 
3447
.  nr doc-date-count \n[doc-date-count-saved]
 
3448
.  ds doc-date "\*[doc-date-saved]
 
3449
.  nr doc-publisher-count \n[doc-publisher-count-saved]
 
3450
.  ds doc-publisher-name "\*[doc-publisher-name-saved]
 
3451
.  nr doc-journal-count \n[doc-journal-count-saved]
 
3452
.  ds doc-journal-name "\*[doc-journal-name-saved]
 
3453
.  nr doc-issue-count \n[doc-issue-count-saved]
 
3454
.  ds doc-issue-name "\*[doc-issue-name-saved]
 
3455
.  nr doc-optional-count \n[doc-optional-count-saved]
 
3456
.  ds doc-optional-string "\*[doc-optional-string-saved]
 
3457
.  nr doc-page-number-count \n[doc-page-number-count-saved]
 
3458
.  ds doc-page-number-string "\*[doc-page-number-string-saved]
 
3459
.  nr doc-corporate-count \n[doc-corporate-count-saved]
 
3460
.  ds doc-corporate-name "\*[doc-corporate-name-saved]
 
3461
.  nr doc-report-count \n[doc-report-count-saved]
 
3462
.  ds doc-report-name "\*[doc-report-name-saved]
 
3463
.  nr doc-reference-title-count \n[doc-reference-title-count-saved]
 
3464
.  ds doc-reference-title-name "\*[doc-reference-title-name-saved]
 
3465
.  ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
 
3466
.  nr doc-volume-count \n[doc-volume-count-saved]
 
3467
.  ds doc-volume-name "\*[doc-volume-name-saved]
 
3468
.  nr doc-have-author \n[doc-have-author-saved]
 
3469
.
 
3470
.  ds doc-document-title "\*[doc-document-title-saved]
 
3471
.  ds doc-volume "\*[doc-volume-saved]
 
3472
.  ds doc-section "\*[doc-section-saved]
 
3473
.  ds doc-operating-system "\*[doc-operating-system-saved]
 
3474
.  ds doc-date-string "\*[doc-date-string-saved]
 
3475
.  nr doc-header-space \n[doc-header-space-saved]
 
3476
.  nr doc-footer-space \n[doc-footer-space-saved]
 
3477
.  nr doc-display-vertical \n[doc-display-vertical-saved]
 
3478
.  ds doc-header-string "\*[doc-header-string-saved]
 
3479
.  nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
 
3480
.  nr doc-in-files-section \n[doc-in-files-section-saved]
 
3481
.  nr doc-in-authors-section \n[doc-in-authors-section-saved]
 
3482
..
 
3483
.
 
3484
.
 
3485
.\" NS El user macro
 
3486
.\" NS   end list
 
3487
.\" NS
 
3488
.\" NS modifies:
 
3489
.\" NS   doc-list-depth
 
3490
.\" NS   doc-macro-name
 
3491
.\" NS
 
3492
.\" NS local variables:
 
3493
.\" NS   doc-str-El
 
3494
.\" NS
 
3495
.\" NS width register `El' set in doc-common
 
3496
.
 
3497
.de El
 
3498
.  if \n[.$] \{\
 
3499
.    tm Usage: .El (does not take arguments) (#\n[.c])
 
3500
.    return
 
3501
.  \}
 
3502
.
 
3503
.  ds doc-macro-name El
 
3504
.  ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
 
3505
.
 
3506
.  ie        "\*[doc-str-El]"diag-list" \
 
3507
.    doc-end-list 0
 
3508
.  el \{ .ie "\*[doc-str-El]"column-list" \
 
3509
.    doc-end-column-list
 
3510
.  el \{ .ie "\*[doc-str-El]"item-list" \
 
3511
.    doc-end-list 0
 
3512
.  el \{ .ie "\*[doc-str-El]"ohang-list" \
 
3513
.    doc-end-list 0
 
3514
.  el \{ .ie "\*[doc-str-El]"inset-list" \
 
3515
.    doc-end-list 0
 
3516
.  el \
 
3517
.    doc-end-list 1
 
3518
.  \}\}\}\}
 
3519
.
 
3520
.  br
 
3521
..
 
3522
.
 
3523
.
 
3524
.\" NS doc-saved-Pa-font global string
 
3525
.\" NS   saved doc-Pa-font string for section FILES (no underline if
 
3526
.\" NS   nroff)
 
3527
.
 
3528
.ds doc-saved-Pa-font
 
3529
.
 
3530
.
 
3531
.\" NS doc-curr-type global register
 
3532
.\" NS   current argument type
 
3533
.
 
3534
.nr doc-curr-type 0
 
3535
.
 
3536
.
 
3537
.\" NS doc-curr-arg global string
 
3538
.\" NS   current argument
 
3539
.
 
3540
.ds doc-curr-arg
 
3541
.
 
3542
.
 
3543
.\" NS doc-item-boxXXX global box
 
3544
.\" NS   item boxes associated list depth
 
3545
.\" NS
 
3546
.\" NS limit:
 
3547
.\" NS   doc-list-depth
 
3548
.
 
3549
.
 
3550
.\" NS It user macro
 
3551
.\" NS   list item
 
3552
.\" NS
 
3553
.\" NS modifies:
 
3554
.\" NS   doc-arg-ptr
 
3555
.\" NS   doc-argXXX
 
3556
.\" NS   doc-curr-arg
 
3557
.\" NS   doc-curr-type
 
3558
.\" NS   doc-in-list
 
3559
.\" NS   doc-macro-name
 
3560
.\" NS   doc-num-args
 
3561
.\" NS   doc-saved-Pa-font
 
3562
.\" NS
 
3563
.\" NS local variables:
 
3564
.\" NS   doc-reg-It
 
3565
.\" NS   doc-str-It
 
3566
.\" NS   doc-XXX-list-type
 
3567
.\" NS
 
3568
.\" NS width register `It' set in doc-common
 
3569
.
 
3570
.nr doc-bullet-list-type 1
 
3571
.nr doc-column-list-type 0
 
3572
.nr doc-dash-list-type 1
 
3573
.nr doc-diag-list-type 0
 
3574
.nr doc-enum-list-type 1
 
3575
.nr doc-hang-list-type 2
 
3576
.nr doc-inset-list-type 2
 
3577
.nr doc-item-list-type 1
 
3578
.nr doc-ohang-list-type 2
 
3579
.nr doc-tag-list-type 2
 
3580
.
 
3581
.de It
 
3582
.  ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
 
3583
.
 
3584
.  if "\*[doc-str-It]"" \
 
3585
.    tm mdoc error: .It without preceding .Bl (#\n[.c])
 
3586
.
 
3587
.  if \n[doc-nesting-level] \{\
 
3588
.    tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
 
3589
.    tm1 " (#\n[.c])
 
3590
.  \}
 
3591
.
 
3592
.  br
 
3593
.  if !\n[cR] \
 
3594
.    ne 3v
 
3595
.
 
3596
.  if \n[.$] \{\
 
3597
.    ds doc-macro-name It
 
3598
.
 
3599
.    \" fill argument vector
 
3600
.    nr doc-reg-It 1
 
3601
.    while (\n[doc-reg-It] <= \n[.$]) \{\
 
3602
.      ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
 
3603
.      nr doc-reg-It +1
 
3604
.    \}
 
3605
.
 
3606
.    nr doc-num-args \n[.$]
 
3607
.    nr doc-arg-ptr 0
 
3608
.  \}
 
3609
.
 
3610
.  nr doc-reg-It \n[doc-\*[doc-str-It]-type]
 
3611
.
 
3612
.  if \n[doc-reg-It] \{\
 
3613
.    \" start item box
 
3614
.    box doc-item-box\n[doc-list-depth]
 
3615
.    ev doc-item-env\n[doc-list-depth]
 
3616
.    evc 0
 
3617
.    in 0
 
3618
.    nf
 
3619
.  \}
 
3620
.
 
3621
.  ie (\n[doc-reg-It] == 1) \{\
 
3622
.    if \n[.$] \{\
 
3623
.      tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
 
3624
.      tm1 "              don't take arguments (#\n[.c])
 
3625
.  \}\}
 
3626
.  el \{\
 
3627
.    ie \n[.$] \{\
 
3628
.      if (\n[doc-reg-It] == 2) \{\
 
3629
.        \" handle list types with arguments
 
3630
.        doc-parse-arg-vector
 
3631
.
 
3632
.        nr doc-in-list 1
 
3633
.        nr doc-arg-ptr 1
 
3634
.        nr doc-curr-type \n[doc-type1]
 
3635
.        ds doc-curr-arg "\*[doc-arg1]
 
3636
.
 
3637
.        if \n[doc-in-files-section] \{\
 
3638
.          ds doc-saved-Pa-font "\*[doc-Pa-font]
 
3639
.          if n \
 
3640
.            ds doc-Pa-font "\*[doc-No-font]
 
3641
.        \}
 
3642
.
 
3643
.        ie (\n[doc-type1] == 1) \
 
3644
.          \*[doc-arg1]
 
3645
.        el \{\
 
3646
.          nr doc-arg-ptr 1
 
3647
.          doc-print-recursive
 
3648
.    \}\}\}
 
3649
.    el \{\
 
3650
.      tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
 
3651
.      tm1 "              require arguments (#\n[.c])
 
3652
.    \}
 
3653
.  \}
 
3654
.
 
3655
.  \" the previous call of `.doc-print-recursive' can contain calls to
 
3656
.  \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
 
3657
.  if !\n[doc-nesting-level] \
 
3658
.    doc-\*[doc-str-It]
 
3659
..
 
3660
.
 
3661
.
 
3662
.\" NS doc-inset-list macro
 
3663
.\" NS   .It item of list-type inset
 
3664
.\" NS
 
3665
.\" NS modifies:
 
3666
.\" NS   doc-in-list
 
3667
.
 
3668
.de doc-inset-list
 
3669
.  \" finish item box
 
3670
.  br
 
3671
.  ev
 
3672
.  box
 
3673
.  unformat doc-item-box\n[doc-list-depth]
 
3674
.
 
3675
.  doc-set-vertical-and-indent 0
 
3676
.  br
 
3677
.
 
3678
.  nh
 
3679
.  doc-item-box\n[doc-list-depth]
 
3680
.
 
3681
.  if \n[doc-in-files-section] \
 
3682
.    if n \
 
3683
.      ds doc-Pa-font "\*[doc-saved-Pa-font]
 
3684
.
 
3685
.  nr doc-in-list 0
 
3686
.  doc-reset-args
 
3687
..
 
3688
.
 
3689
.
 
3690
.\" NS doc-hang-list macro
 
3691
.\" NS   .It item of list-type hanging tag (as opposed to tagged)
 
3692
.\" NS
 
3693
.\" NS modifies:
 
3694
.\" NS   doc-have-space
 
3695
.\" NS   doc-in-list
 
3696
.\" NS
 
3697
.\" NS local variables:
 
3698
.\" NS   doc-reg-dhl
 
3699
.\" NS   doc-reg-dhl1
 
3700
.
 
3701
.de doc-hang-list
 
3702
.  \" finish item box
 
3703
.  br
 
3704
.  ev
 
3705
.  box
 
3706
.  unformat doc-item-box\n[doc-list-depth]
 
3707
.
 
3708
.  doc-set-vertical-and-indent 1
 
3709
.  nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
 
3710
.  ti -\n[doc-reg-dhl]u
 
3711
.
 
3712
.  nh
 
3713
.  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
 
3714
.    doc-item-box\n[doc-list-depth]
 
3715
.  el \{\
 
3716
.    chop doc-item-box\n[doc-list-depth]
 
3717
.    nr doc-reg-dhl1 \n[.k]u
 
3718
.    nop \*[doc-item-box\n[doc-list-depth]]\c
 
3719
.    nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
 
3720
.    nr doc-have-space 1
 
3721
.  \}
 
3722
.
 
3723
.  if \n[doc-in-files-section] \
 
3724
.    if n \
 
3725
.      ds doc-Pa-font "\*[doc-saved-Pa-font]
 
3726
.
 
3727
.  nr doc-in-list 0
 
3728
.  doc-reset-args
 
3729
..
 
3730
.
 
3731
.
 
3732
.\" NS doc-ohang-list macro
 
3733
.\" NS   .It item of list-type overhanging tag
 
3734
.\" NS
 
3735
.\" NS modifies:
 
3736
.\" NS   doc-in-list
 
3737
.
 
3738
.de doc-ohang-list
 
3739
.  \" finish item box
 
3740
.  br
 
3741
.  ev
 
3742
.  box
 
3743
.  unformat doc-item-box\n[doc-list-depth]
 
3744
.
 
3745
.  doc-set-vertical-and-indent 0
 
3746
.  nh
 
3747
.  doc-item-box\n[doc-list-depth]
 
3748
.  br
 
3749
.
 
3750
.  if \n[doc-in-files-section] \
 
3751
.    if n \
 
3752
.      ds doc-Pa-font "\*[doc-saved-Pa-font]
 
3753
.
 
3754
.  nr doc-in-list 0
 
3755
.  doc-reset-args
 
3756
..
 
3757
.
 
3758
.
 
3759
.\" NS doc-item-list macro
 
3760
.\" NS   .It item of list-type [empty tag]
 
3761
.
 
3762
.de doc-item-list
 
3763
.  \" finish (dummy) item box
 
3764
.  br
 
3765
.  ev
 
3766
.  box
 
3767
.
 
3768
.  doc-set-vertical-and-indent 0
 
3769
.  br
 
3770
.
 
3771
.  doc-reset-args
 
3772
..
 
3773
.
 
3774
.
 
3775
.\" NS doc-enum-list-count-stackXXX global register
 
3776
.\" NS   stack of current enum count values
 
3777
.\" NS
 
3778
.\" NS limit:
 
3779
.\" NS   doc-list-depth
 
3780
.
 
3781
.nr doc-enum-list-count-stack1 0
 
3782
.
 
3783
.
 
3784
.\" NS doc-enum-list macro
 
3785
.\" NS   enumerated list
 
3786
.\" NS
 
3787
.\" NS modifies:
 
3788
.\" NS   doc-enum-list-count-stackXXX
 
3789
.\" NS   doc-in-list
 
3790
.
 
3791
.de doc-enum-list
 
3792
.  nr doc-in-list 1
 
3793
.  nr doc-enum-list-count-stack\n[doc-list-depth] +1
 
3794
\# XXX
 
3795
\#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
 
3796
\#.rj
 
3797
.  nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
 
3798
.  nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
 
3799
.  doc-do-list
 
3800
..
 
3801
.
 
3802
.
 
3803
.\" NS doc-bullet-list macro
 
3804
.\" NS   bullet paragraph list
 
3805
.\" NS
 
3806
.\" NS modifies:
 
3807
.\" NS   doc-in-list
 
3808
.
 
3809
.de doc-bullet-list
 
3810
.  nr doc-in-list 1
 
3811
.  nop \)\*[doc-Sy-font]\[bu]\f[P]
 
3812
.  doc-do-list
 
3813
..
 
3814
.
 
3815
.
 
3816
.\" NS doc-dash-list macro
 
3817
.\" NS   hyphen paragraph list (sub bullet list)
 
3818
.\" NS
 
3819
.\" NS modifies:
 
3820
.\" NS   doc-in-list
 
3821
.
 
3822
.de doc-dash-list
 
3823
.  nr doc-in-list 1
 
3824
.  nop \)\*[doc-Sy-font]\-\f[P]
 
3825
.  doc-do-list
 
3826
..
 
3827
.
 
3828
.
 
3829
.\" NS doc-do-list macro
 
3830
.\" NS   .It item of list-type enum/bullet/hyphen
 
3831
.
 
3832
.als doc-do-list doc-hang-list
 
3833
.
 
3834
.
 
3835
.\" NS doc-diag-list-input-line-count global register
 
3836
.\" NS   saved line number to be checked in next diag-list item
 
3837
.
 
3838
.nr doc-diag-list-input-line-count 0
 
3839
.
 
3840
.
 
3841
.\" NS doc-diag-list macro
 
3842
.\" NS   .It item of list-type diagnostic-message
 
3843
.\" NS
 
3844
.\" NS modifies:
 
3845
.\" NS   doc-curr-font
 
3846
.\" NS   doc-curr-size
 
3847
.\" NS   doc-diag-list-input-line-count
 
3848
.
 
3849
.de doc-diag-list
 
3850
.  nr doc-curr-font \n[.f]
 
3851
.  nr doc-curr-size \n[.ps]
 
3852
.
 
3853
.  ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
 
3854
.    ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
 
3855
.      doc-paragraph
 
3856
.    el \
 
3857
.      br
 
3858
.  \}
 
3859
.  el \
 
3860
.    br
 
3861
.  nr doc-diag-list-input-line-count \n[.c]
 
3862
.
 
3863
.  nh
 
3864
.  nop \*[doc-Sy-font]\c
 
3865
.  if \n[doc-num-args] \
 
3866
.    doc-remaining-args
 
3867
.  nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
 
3868
.
 
3869
.  doc-print-and-reset
 
3870
..
 
3871
.
 
3872
.
 
3873
.\" NS doc-tag-list macro
 
3874
.\" NS   .It item of list-type `tag'
 
3875
.\" NS
 
3876
.\" NS modifies:
 
3877
.\" NS   doc-have-space
 
3878
.\" NS   doc-in-list
 
3879
.\" NS
 
3880
.\" NS local variables:
 
3881
.\" NS   doc-box-dtl
 
3882
.\" NS   doc-reg-dtl
 
3883
.\" NS   doc-reg-dtl1
 
3884
.
 
3885
.de doc-tag-list
 
3886
.  \" finish item box
 
3887
.  br
 
3888
.  ev
 
3889
.  box
 
3890
.  unformat doc-item-box\n[doc-list-depth]
 
3891
.
 
3892
.  \" we use a box without `.nf' to compute the tag width (via `dl' register)
 
3893
.  box doc-box-dtl
 
3894
.  ev doc-env-dtl
 
3895
.  evc 0
 
3896
.  fi
 
3897
.  ad 0
 
3898
.  in 0
 
3899
.  doc-item-box\n[doc-list-depth]
 
3900
.  br
 
3901
.  ev
 
3902
.  box
 
3903
.
 
3904
.  if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
 
3905
.    if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
 
3906
.      in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
 
3907
.      nr doc-list-have-indent-stack\n[doc-list-depth] 1
 
3908
.    \}
 
3909
.    doc-get-tag-width
 
3910
.  \}
 
3911
.  doc-set-vertical-and-indent 1
 
3912
.  nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
 
3913
.  ti -\n[doc-reg-dtl]u
 
3914
.
 
3915
.  nh
 
3916
.  ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
 
3917
.    doc-item-box\n[doc-list-depth]
 
3918
.    br
 
3919
.  \}
 
3920
.  el \{\
 
3921
.    chop doc-item-box\n[doc-list-depth]
 
3922
.    nr doc-reg-dtl1 \n[.k]u
 
3923
.    nop \*[doc-item-box\n[doc-list-depth]]\c
 
3924
.    nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
 
3925
.    nr doc-have-space 1
 
3926
.  \}
 
3927
.
 
3928
.  if \n[doc-in-files-section] \
 
3929
.    if n \
 
3930
.      ds doc-Pa-font "\*[doc-saved-Pa-font]
 
3931
.
 
3932
.  nr doc-in-list 0
 
3933
.  doc-reset-args
 
3934
..
 
3935
.
 
3936
.
 
3937
.\" NS doc-get-tag-width macro
 
3938
.\" NS   resolve unknown tag width (`tag' list-type only)
 
3939
.\" NS
 
3940
.\" NS modifies:
 
3941
.\" NS   doc-list-indent-stackXXX
 
3942
.\" NS   doc-tag-width-stackXXX
 
3943
.\" NS
 
3944
.\" NS requires:
 
3945
.\" NS   doc-curr-arg
 
3946
.\" NS   doc-curr-type
 
3947
.
 
3948
.de doc-get-tag-width
 
3949
.  ie (\n[doc-curr-type] == 1) \{\
 
3950
.    ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
 
3951
.    nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
 
3952
.  \}
 
3953
.  el \{\
 
3954
.    ds doc-tag-width-stack\n[doc-list-depth] No
 
3955
.    nr doc-list-indent-stack\n[doc-list-depth] \n[No]
 
3956
.  \}
 
3957
..
 
3958
.
 
3959
.
 
3960
.\" NS doc-set-vertical-and-indent macro
 
3961
.\" NS   set up vertical spacing (if not compact) and indentation (with
 
3962
.\" NS   offset if argument is non-zero)
 
3963
.\" NS
 
3964
.\" NS modifies:
 
3965
.\" NS   doc-list-have-indent-stackXXX
 
3966
.
 
3967
.de doc-set-vertical-and-indent
 
3968
.  if !\n[doc-compact-list-stack\n[doc-list-depth]] \
 
3969
.    sp \n[doc-display-vertical]u
 
3970
.
 
3971
.  if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
 
3972
.    nr doc-list-have-indent-stack\n[doc-list-depth] 0
 
3973
.    if \$1 \
 
3974
.      in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
 
3975
.  \}
 
3976
.
 
3977
.  if !\n[cR] \
 
3978
.    ne 2v
 
3979
..
 
3980
.
 
3981
.
 
3982
.\" NS doc-list-depth global register
 
3983
.\" NS   list type stack counter
 
3984
.
 
3985
.nr doc-list-depth 0
 
3986
.
 
3987
.
 
3988
.\" NS doc-num-columns global register
 
3989
.\" NS   number of columns
 
3990
.
 
3991
.nr doc-num-columns 0
 
3992
.
 
3993
.
 
3994
.\" NS doc-compact-list-stackXXX global register (bool)
 
3995
.\" NS   stack of flags to indicate whether a particular list is compact
 
3996
.\" NS
 
3997
.\" NS limit:
 
3998
.\" NS   doc-list-depth
 
3999
.
 
4000
.nr doc-compact-list-stack1 0
 
4001
.
 
4002
.
 
4003
.\" NS doc-tag-prefix-stackXXX global string
 
4004
.\" NS   stack of tag prefixes (currently used for -nested -enum lists)
 
4005
.\" NS
 
4006
.\" NS limit:
 
4007
.\" NS   doc-list-depth
 
4008
.
 
4009
.ds doc-tag-prefix-stack1
 
4010
.
 
4011
.
 
4012
.\" NS doc-tag-width-stackXXX global string
 
4013
.\" NS   stack of strings indicating how to set up current element of
 
4014
.\" NS   doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
 
4015
.\" NS   directly; if it is a macro name, use the macro's width value;
 
4016
.\" NS   otherwise, `doc-get-tag-width' uses width value of `No'.
 
4017
.\" NS
 
4018
.\" NS limit:
 
4019
.\" NS   doc-list-depth
 
4020
.
 
4021
.ds doc-tag-width-stack0
 
4022
.ds doc-tag-width-stack1
 
4023
.
 
4024
.
 
4025
.\" NS doc-list-offset-stackXXX global register
 
4026
.\" NS   stack of list offsets
 
4027
.\" NS
 
4028
.\" NS limit:
 
4029
.\" NS   doc-list-depth
 
4030
.
 
4031
.nr doc-list-offset-stack1 0
 
4032
.
 
4033
.
 
4034
.\" NS doc-end-list macro
 
4035
.\" NS   list end function; resets indentation (and offset if argument is
 
4036
.\" NS   non-zero)
 
4037
.\" NS
 
4038
.\" NS modifies:
 
4039
.\" NS   doc-list-depth
 
4040
.\" NS   doc-list-offset-stackXXX
 
4041
.
 
4042
.de doc-end-list
 
4043
.  if \$1 \
 
4044
'    in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
 
4045
.
 
4046
'  in -\n[doc-list-offset-stack\n[doc-list-depth]]u
 
4047
.
 
4048
.  if (\n[doc-list-depth] <= 0) \
 
4049
.    tm mdoc warning: extraneous .El call (#\n[.c])
 
4050
.
 
4051
.  doc-decrement-list-stack
 
4052
.  nr doc-list-depth -1
 
4053
..
 
4054
.
 
4055
.
 
4056
.\" NS doc-increment-list-stack macro
 
4057
.\" NS   set up next block for list
 
4058
.\" NS
 
4059
.\" NS modifies:
 
4060
.\" NS   doc-compact-list-stackXXX
 
4061
.\" NS   doc-list-have-indent-stackXXX
 
4062
.\" NS   doc-list-indent-stackXXX
 
4063
.\" NS   doc-list-offset-stackXXX
 
4064
.\" NS   doc-list-type-stackXXX
 
4065
.\" NS   doc-tag-prefix-stackXXX
 
4066
.\" NS   doc-tag-width-stackXXX
 
4067
.\" NS   doc-enum-list-count-stackXXX
 
4068
.\" NS
 
4069
.\" NS local variables:
 
4070
.\" NS   doc-reg-dils
 
4071
.
 
4072
.de doc-increment-list-stack
 
4073
.  nr doc-reg-dils (\n[doc-list-depth] + 1)
 
4074
.  nr doc-list-have-indent-stack\n[doc-reg-dils] 0
 
4075
.  nr doc-list-indent-stack\n[doc-reg-dils] 0
 
4076
.  nr doc-list-offset-stack\n[doc-reg-dils] 0
 
4077
.  ds doc-tag-prefix-stack\n[doc-reg-dils]
 
4078
.  ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
 
4079
.  ds doc-list-type-stack\n[doc-reg-dils]
 
4080
.  nr doc-compact-list-stack\n[doc-reg-dils] 0
 
4081
.  nr doc-enum-list-count-stack\n[doc-reg-dils] 0
 
4082
..
 
4083
.
 
4084
.
 
4085
.\" NS doc-decrement-list-stack macro
 
4086
.\" NS   decrement stack
 
4087
.\" NS
 
4088
.\" NS modifies:
 
4089
.\" NS   doc-compact-list-stackXXX
 
4090
.\" NS   doc-list-have-indent-stackXXX
 
4091
.\" NS   doc-list-indent-stackXXX
 
4092
.\" NS   doc-list-offset-stackXXX
 
4093
.\" NS   doc-list-type-stackXXX
 
4094
.\" NS   doc-tag-prefix-stackXXX
 
4095
.\" NS   doc-tag-width-stackXXX
 
4096
.\" NS   doc-enum-list-count-stackXXX
 
4097
.
 
4098
.de doc-decrement-list-stack
 
4099
.  ds doc-list-type-stack\n[doc-list-depth]
 
4100
.  nr doc-list-have-indent-stack\n[doc-list-depth] 0
 
4101
.  nr doc-list-indent-stack\n[doc-list-depth] 0
 
4102
.  nr doc-list-offset-stack\n[doc-list-depth] 0
 
4103
.  ds doc-tag-prefix-stack\n[doc-list-depth]
 
4104
.  ds doc-tag-width-stack\n[doc-list-depth]
 
4105
.  nr doc-compact-list-stack\n[doc-list-depth] 0
 
4106
.  nr doc-enum-list-count-stack\n[doc-list-depth] 0
 
4107
..
 
4108
.
 
4109
.
 
4110
.\" NS Xr user macro
 
4111
.\" NS   cross reference (for man pages only)
 
4112
.\" NS
 
4113
.\" NS modifies:
 
4114
.\" NS   doc-arg-ptr
 
4115
.\" NS   doc-macro-name
 
4116
.\" NS
 
4117
.\" NS local variables:
 
4118
.\" NS   doc-reg-Xr
 
4119
.\" NS
 
4120
.\" NS width register `Xr' set in doc-common
 
4121
.
 
4122
.de Xr
 
4123
.  if !\n[doc-arg-limit] \{\
 
4124
.    ie \n[.$] \{\
 
4125
.      ds doc-macro-name Xr
 
4126
.      doc-parse-args \$@
 
4127
.    \}
 
4128
.    el \
 
4129
.      doc-Xr-usage
 
4130
.  \}
 
4131
.
 
4132
.  if !\n[doc-arg-limit] \
 
4133
.    return
 
4134
.
 
4135
.  nr doc-arg-ptr +1
 
4136
.  doc-print-prefixes
 
4137
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4138
.    \" first argument must be a string
 
4139
.    ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
4140
.      nr doc-curr-font \n[.f]
 
4141
.      nr doc-curr-size \n[.ps]
 
4142
.      ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
 
4143
.
 
4144
.      if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
 
4145
.        nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
 
4146
.        \" modify second argument if it is a string and
 
4147
.        \" remove space inbetween
 
4148
.        if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
 
4149
.          ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
 
4150
.          ds doc-space\n[doc-arg-ptr]
 
4151
.        \}
 
4152
.      \}
 
4153
.      doc-print-recursive
 
4154
.    \}
 
4155
.    el \
 
4156
.      doc-Xr-usage
 
4157
.  \}
 
4158
.  el \
 
4159
.    doc-Xr-usage
 
4160
..
 
4161
.
 
4162
.
 
4163
.\" NS doc-Xr-usage macro
 
4164
.
 
4165
.de doc-Xr-usage
 
4166
.  tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
 
4167
.  doc-reset-args
 
4168
..
 
4169
.
 
4170
.
 
4171
.\" NS Sx user macro
 
4172
.\" NS   cross section reference
 
4173
.\" NS
 
4174
.\" NS width register `Sx' set in doc-common
 
4175
.
 
4176
.als Sx doc-generic-macro
 
4177
.ds doc-Sx-usage section_header
 
4178
.
 
4179
.
 
4180
.\" NS doc-end-column-list macro
 
4181
.\" NS   column-list end-list
 
4182
.\" NS
 
4183
.\" NS modifies:
 
4184
.\" NS   doc-list-depth
 
4185
.
 
4186
.de doc-end-column-list
 
4187
.  linetabs 0
 
4188
'  in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
 
4189
.  ta T .5i
 
4190
.  fi
 
4191
.  doc-decrement-list-stack
 
4192
.  nr doc-list-depth -1
 
4193
..
 
4194
.
 
4195
.
 
4196
.\" NS doc-column-indent-width global register
 
4197
.\" NS   holds the indent width for a column list
 
4198
.
 
4199
.nr doc-column-indent-width 0
 
4200
.
 
4201
.
 
4202
.\" NS doc-set-column-tab macro
 
4203
.\" NS   establish tabs for list-type column: `.doc-set-column-tab num_cols'
 
4204
.\" NS
 
4205
.\" NS modifies:
 
4206
.\" NS   doc-column-indent-width
 
4207
.\" NS
 
4208
.\" NS local variables:
 
4209
.\" NS   doc-reg-dsct
 
4210
.\" NS   doc-str-dsct
 
4211
.\" NS   doc-str-dsct1
 
4212
.
 
4213
.de doc-set-column-tab
 
4214
.  ds doc-str-dsct
 
4215
.  nr doc-reg-dsct 1
 
4216
.  nr doc-column-indent-width 0
 
4217
.
 
4218
.  ie (\$1 < 5) \
 
4219
.    ds doc-str-dsct1 "    \"
 
4220
.  el \{\
 
4221
.    ie (\$1 == 5) \
 
4222
.      ds doc-str-dsct1 "   \"
 
4223
.    el \{\
 
4224
.      \" XXX: this is packed abnormally close -- intercolumn width
 
4225
.      \"      should be configurable
 
4226
.      ds doc-str-dsct1 " \"
 
4227
.  \}\}
 
4228
.
 
4229
.  while (\n[doc-reg-dsct] <= \$1) \{\
 
4230
.    as doc-str-dsct " +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
 
4231
.    nr doc-column-indent-width +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
 
4232
.    nr doc-reg-dsct +1
 
4233
.  \}
 
4234
.
 
4235
.  ta \*[doc-str-dsct]
 
4236
'  in +\n[doc-column-indent-width]u
 
4237
..
 
4238
.
 
4239
.
 
4240
.\" NS doc-column-list macro
 
4241
.\" NS   column items
 
4242
.\" NS
 
4243
.\" NS modifies:
 
4244
.\" NS   doc-arg-ptr
 
4245
.\" NS   doc-list-indent-stackXXX
 
4246
.\" NS   doc-spaceXXX
 
4247
.\" NS
 
4248
.\" NS local variables:
 
4249
.\" NS   doc-reg-dcl
 
4250
.
 
4251
.de doc-column-list
 
4252
.  if \n[doc-num-args] \
 
4253
.    doc-parse-arg-vector
 
4254
.  nr doc-arg-ptr +1
 
4255
.
 
4256
.  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
4257
.    tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
 
4258
.    return
 
4259
.  \}
 
4260
.
 
4261
.  if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
 
4262
.    nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
 
4263
.    ds doc-space\n[doc-reg-dcl]
 
4264
.  \}
 
4265
.
 
4266
.  if !\n[doc-list-indent-stack\n[doc-list-depth]] \
 
4267
.    nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
 
4268
.  if !\n[.u] \{\
 
4269
.    fi
 
4270
'    in +\n[doc-column-indent-width]u
 
4271
.  \}
 
4272
.  ti -\n[doc-column-indent-width]u
 
4273
.
 
4274
.  doc-do-\n[doc-type\n[doc-arg-ptr]]
 
4275
..
 
4276
.
 
4277
.
 
4278
.\" NS Ta user macro
 
4279
.\" NS   append tab (\t)
 
4280
.\" NS
 
4281
.\" NS modifies:
 
4282
.\" NS   doc-arg-ptr
 
4283
.\" NS
 
4284
.\" NS width register `Ta' set in doc-common
 
4285
.
 
4286
.de Ta
 
4287
.  ie \n[doc-arg-limit] \{\
 
4288
.    nr doc-arg-ptr +1
 
4289
.    nop \*[doc-tab]\c
 
4290
.    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
 
4291
.      doc-do-\n[doc-type\n[doc-arg-ptr]]
 
4292
.    el \
 
4293
.      doc-reset-args
 
4294
.  \}
 
4295
.  el \{\
 
4296
.    tm1 "Usage: Ta must follow column entry: e.g.
 
4297
.    tm1 "         .It column_string [Ta [column_string ...]] (#\n[.c])
 
4298
.  \}
 
4299
..
 
4300
.
 
4301
.
 
4302
.\" NS Dl user macro
 
4303
.\" NS   display (one line) literal
 
4304
.\" NS
 
4305
.\" NS   this function uses the `Li' font
 
4306
.\" NS
 
4307
.\" NS modifies:
 
4308
.\" NS   doc-arg-ptr
 
4309
.\" NS   doc-curr-font
 
4310
.\" NS   doc-curr-size
 
4311
.\" NS   doc-macro-name
 
4312
.\" NS
 
4313
.\" NS width register `Dl' set in doc-common
 
4314
.
 
4315
.de Dl
 
4316
'  ta T .5i
 
4317
.  in +\n[doc-display-indent]u
 
4318
.
 
4319
.  ie \n[doc-arg-limit] \{\
 
4320
.    tm Usage: .Dl not callable by other macros (#\n[.c])
 
4321
.    doc-reset-args
 
4322
.  \}
 
4323
.  el \{\
 
4324
.    ie \n[.$] \{\
 
4325
.      ds doc-macro-name Dl
 
4326
.      doc-parse-args \$@
 
4327
.      nr doc-arg-ptr 1
 
4328
.      nr doc-curr-font \n[.f]
 
4329
.      nr doc-curr-size \n[.ps]
 
4330
.      nop \*[doc-Li-font]\c
 
4331
.      doc-print-recursive
 
4332
.    \}
 
4333
.    el \
 
4334
.      tm Usage: .Dl argument ... (#\n[.c])
 
4335
.  \}
 
4336
.
 
4337
.  in -\n[doc-display-indent]u
 
4338
..
 
4339
.
 
4340
.
 
4341
.\" NS D1 user macro
 
4342
.\" NS   display (one line)
 
4343
.\" NS
 
4344
.\" NS modifies:
 
4345
.\" NS   doc-arg-ptr
 
4346
.\" NS   doc-macro-name
 
4347
.\" NS
 
4348
.\" NS width register `D1' set in doc-common
 
4349
.
 
4350
.de D1
 
4351
'  ta T .5i
 
4352
.  in +\n[doc-display-indent]u
 
4353
.
 
4354
.  ie \n[doc-arg-limit] \{\
 
4355
.    tm Usage: .D1 not callable by other macros (#\n[.c])
 
4356
.    doc-reset-args
 
4357
.  \}
 
4358
.  el \{\
 
4359
.    ie \n[.$] \{\
 
4360
.      ds doc-macro-name D1
 
4361
.      doc-parse-args \$@
 
4362
.      nr doc-arg-ptr 1
 
4363
.      doc-print-recursive
 
4364
.    \}
 
4365
.    el \
 
4366
.      tm Usage: .D1 argument ... (#\n[.c])
 
4367
.  \}
 
4368
.
 
4369
.  in -\n[doc-display-indent]u
 
4370
..
 
4371
.
 
4372
.
 
4373
.\" NS Vt user macro
 
4374
.\" NS   variable type (for forcing old style variable declarations);
 
4375
.\" NS   this is not done in the same manner as .Ot for fortrash --
 
4376
.\" NS   clean up later
 
4377
.\" NS
 
4378
.\" NS modifies:
 
4379
.\" NS   doc-curr-font
 
4380
.\" NS   doc-curr-size
 
4381
.\" NS   doc-have-decl
 
4382
.\" NS   doc-have-var
 
4383
.\" NS   doc-macro-name
 
4384
.\" NS
 
4385
.\" NS width register `Vt' set in doc-common
 
4386
.
 
4387
.de Vt
 
4388
.  if !\n[doc-arg-limit] \{\
 
4389
.    ie \n[.$] \{\
 
4390
.      ds doc-macro-name Vt
 
4391
.      doc-parse-args \$@
 
4392
.    \}
 
4393
.    el \
 
4394
.      tm Usage: .Vt variable_type ... (#\n[.c])
 
4395
.  \}
 
4396
.
 
4397
.  if !\n[doc-arg-limit] \
 
4398
.    return
 
4399
.
 
4400
.  nr doc-arg-ptr +1
 
4401
.  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
4402
.    tm Usage: .Vt variable_type ... (#\n[.c])
 
4403
.    doc-reset-args
 
4404
.    return
 
4405
.  \}
 
4406
.
 
4407
.  if \n[doc-in-synopsis-section] \{\
 
4408
.    \" if a function declaration was the last thing given,
 
4409
.    \" want vertical space
 
4410
.    if \n[doc-have-decl] \{\
 
4411
.      doc-paragraph
 
4412
.      nr doc-have-decl 0
 
4413
.    \}
 
4414
.
 
4415
.    \" if a subroutine was the last thing given, want vertical space
 
4416
.    if \n[doc-have-func] \{\
 
4417
.      ie \n[doc-have-var] \
 
4418
.        br
 
4419
.      el \
 
4420
.        doc-paragraph
 
4421
.    \}
 
4422
.
 
4423
.    nr doc-have-var 1
 
4424
.  \}
 
4425
.
 
4426
.  nr doc-curr-font \n[.f]
 
4427
.  nr doc-curr-size \n[.ps]
 
4428
.  nop \*[doc-Ft-font]\c
 
4429
.  doc-print-recursive
 
4430
.
 
4431
.  if \n[doc-in-synopsis-section] \{\
 
4432
.    ie \n[doc-have-old-func] \
 
4433
.      nop \*[doc-soft-space]\c
 
4434
.    el \
 
4435
.      br
 
4436
.  \}
 
4437
..
 
4438
.
 
4439
.
 
4440
.\" NS doc-is-func global register (bool)
 
4441
.\" NS   set if subroutine (in synopsis only) (fortran only)
 
4442
.
 
4443
.nr doc-is-func 0
 
4444
.
 
4445
.
 
4446
.\" NS Ft user macro
 
4447
.\" NS   function type
 
4448
.\" NS
 
4449
.\" NS modifies:
 
4450
.\" NS   doc-curr-font
 
4451
.\" NS   doc-curr-size
 
4452
.\" NS   doc-have-decl
 
4453
.\" NS   doc-have-var
 
4454
.\" NS   doc-is-func
 
4455
.\" NS   doc-macro-name
 
4456
.\" NS
 
4457
.\" NS width register `Ft' set in doc-common
 
4458
.
 
4459
.de Ft
 
4460
.  if !\n[doc-arg-limit] \{\
 
4461
.    ie \n[.$] \{\
 
4462
.      ds doc-macro-name Ft
 
4463
.      doc-parse-args \$@
 
4464
.    \}
 
4465
.    el \
 
4466
.      tm Usage: .Ft function_type ... (#\n[.c])
 
4467
.  \}
 
4468
.
 
4469
.  if !\n[doc-arg-limit] \
 
4470
.    return
 
4471
.
 
4472
.  nr doc-arg-ptr +1
 
4473
.  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
4474
.    tm Usage: .Ft function_type ... (#\n[.c])
 
4475
.    doc-reset-args
 
4476
.    return
 
4477
.  \}
 
4478
.
 
4479
.  if \n[doc-in-synopsis-section] \{\
 
4480
.    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
 
4481
.      doc-paragraph
 
4482
.      nr doc-have-decl 0
 
4483
.      nr doc-have-var 0
 
4484
.    \}
 
4485
.
 
4486
.    if \n[doc-have-var] \{\
 
4487
.      doc-paragraph
 
4488
.      nr doc-have-var 0
 
4489
.    \}
 
4490
.
 
4491
.    nr doc-is-func 1
 
4492
.  \}
 
4493
.
 
4494
.  nr doc-curr-font \n[.f]
 
4495
.  nr doc-curr-size \n[.ps]
 
4496
.  nop \*[doc-Ft-font]\c
 
4497
.  doc-print-recursive
 
4498
..
 
4499
.
 
4500
.
 
4501
.\" NS doc-have-old-func global register (bool)
 
4502
.\" NS   set if `Ot' has been called
 
4503
.
 
4504
.nr doc-have-old-func 0
 
4505
.
 
4506
.
 
4507
.\" NS Ot user macro
 
4508
.\" NS   old function type (fortran -- no newline)
 
4509
.\" NS
 
4510
.\" NS modifies:
 
4511
.\" NS   doc-have-decl
 
4512
.\" NS   doc-have-old-func
 
4513
.\" NS   doc-have-var
 
4514
.\" NS   doc-is-func
 
4515
.\" NS
 
4516
.\" NS width register `Ot' set in doc-common
 
4517
.
 
4518
.de Ot
 
4519
.  nr doc-have-old-func 1
 
4520
.
 
4521
.  if \n[doc-in-synopsis-section] \{\
 
4522
.    if (\n[doc-have-func] : \n[doc-have-decl]) \{\
 
4523
.      doc-paragraph
 
4524
.      nr doc-have-decl 0
 
4525
.      nr doc-have-var 0
 
4526
.    \}
 
4527
.
 
4528
.    if \n[doc-have-var] \{\
 
4529
.      doc-paragraph
 
4530
.      nr doc-have-var 0
 
4531
.    \}
 
4532
.
 
4533
.    nr doc-is-func 1
 
4534
.  \}
 
4535
.
 
4536
.  if \n[.$] \
 
4537
.    nop \*[doc-Ft-font]\$*\c
 
4538
.  nop \ \f[P]\c
 
4539
..
 
4540
.
 
4541
.
 
4542
.\" NS Fa user macro
 
4543
.\" NS   function arguments
 
4544
.\" NS
 
4545
.\" NS modifies:
 
4546
.\" NS   doc-arg-ptr
 
4547
.\" NS   doc-curr-font
 
4548
.\" NS   doc-curr-size
 
4549
.\" NS   doc-macro-name
 
4550
.\" NS
 
4551
.\" NS width register `Fa' set in doc-common
 
4552
.
 
4553
.de Fa
 
4554
.  if !\n[doc-arg-limit] \{\
 
4555
.    ie \n[.$] \{\
 
4556
.      ds doc-macro-name Fa
 
4557
.      doc-parse-args \$@
 
4558
.    \}
 
4559
.    el \
 
4560
.      tm Usage: .Fa function_arguments ... (#\n[.c])
 
4561
.  \}
 
4562
.
 
4563
.  ie \n[doc-func-arg-count] \
 
4564
.    doc-do-func
 
4565
.  el \{\
 
4566
.    nr doc-arg-ptr +1
 
4567
.    if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4568
.      nr doc-curr-font \n[.f]
 
4569
.      nr doc-curr-size \n[.ps]
 
4570
.      nop \*[doc-Fa-font]\c
 
4571
.      doc-print-recursive
 
4572
.
 
4573
.      if \n[doc-in-synopsis-section] \
 
4574
.        if \n[doc-have-func] \
 
4575
.          br
 
4576
.  \}\}
 
4577
..
 
4578
.
 
4579
.
 
4580
.\" NS doc-func-arg-count global register
 
4581
.\" NS   how many function arguments have been processed so far
 
4582
.
 
4583
.nr doc-func-arg-count 0
 
4584
.
 
4585
.
 
4586
.\" NS doc-func-arg global string
 
4587
.\" NS   work buffer for function name strings
 
4588
.
 
4589
.ds doc-func-arg
 
4590
.
 
4591
.
 
4592
.\" NS doc-num-func-args global register
 
4593
.\" NS   number of function arguments
 
4594
.
 
4595
.nr doc-num-func-args 0
 
4596
.
 
4597
.
 
4598
.\" NS doc-func-args-processed global register
 
4599
.\" NS   function arguments processed so far
 
4600
.
 
4601
.nr doc-func-args-processed 0
 
4602
.
 
4603
.
 
4604
.\" NS doc-do-func macro
 
4605
.\" NS   internal .Fa for .Fc
 
4606
.\" NS
 
4607
.\" NS modifies:
 
4608
.\" NS   doc-arg-ptr
 
4609
.\" NS   doc-argXXX
 
4610
.\" NS   doc-func-arg
 
4611
.\" NS   doc-func-arg-count
 
4612
.\" NS   doc-func-args-processed
 
4613
.\" NS   doc-num-func-args
 
4614
.
 
4615
.de doc-do-func
 
4616
.  if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
 
4617
.    doc-reset-args
 
4618
.    return
 
4619
.  \}
 
4620
.
 
4621
.  nr doc-arg-ptr +1
 
4622
.
 
4623
.  ds doc-func-arg
 
4624
.  nr doc-num-func-args 0
 
4625
.  nr doc-func-args-processed 0
 
4626
.
 
4627
.  doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
 
4628
.  if (\n[doc-num-func-args] > 1) \
 
4629
.    ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
 
4630
.
 
4631
.  if (\n[doc-func-arg-count] > 1) \{\
 
4632
.    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
 
4633
.    nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
 
4634
.    nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
 
4635
.  \}
 
4636
.
 
4637
.  if (\n[doc-func-arg-count] == 1) \{\
 
4638
.    nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
 
4639
.    nop \f[P]\s[0]\c
 
4640
.  \}
 
4641
.  nr doc-func-arg-count +1
 
4642
.  doc-do-func
 
4643
..
 
4644
.
 
4645
.
 
4646
.\" NS doc-have-func global register (bool)
 
4647
.\" NS   whether we have more than one function in synopsis
 
4648
.
 
4649
.nr doc-have-func 0
 
4650
.
 
4651
.
 
4652
.\" NS Fn user macro
 
4653
.\" NS   functions
 
4654
.\" NS
 
4655
.\" NS modifies:
 
4656
.\" NS   doc-arg-ptr
 
4657
.\" NS   doc-curr-font
 
4658
.\" NS   doc-curr-size
 
4659
.\" NS   doc-have-decl
 
4660
.\" NS   doc-have-func
 
4661
.\" NS   doc-have-var
 
4662
.\" NS   doc-indent-synopsis
 
4663
.\" NS   doc-is-func
 
4664
.\" NS   doc-macro-name
 
4665
.\" NS
 
4666
.\" NS width register `Fn' set in doc-common
 
4667
.
 
4668
.de Fn
 
4669
.  if !\n[doc-arg-limit] \{\
 
4670
.    ie \n[.$] \{\
 
4671
.      ds doc-macro-name Fn
 
4672
.      doc-parse-args \$@
 
4673
.    \}
 
4674
.    el \
 
4675
.      tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
 
4676
.  \}
 
4677
.
 
4678
.  if !\n[doc-arg-limit] \
 
4679
.    return
 
4680
.
 
4681
.  if \n[doc-in-synopsis-section] \{\
 
4682
.    \" if there is/has been more than one subroutine declaration
 
4683
.    ie \n[doc-is-func] \{\
 
4684
.      br
 
4685
.      nr doc-have-var 0
 
4686
.      nr doc-have-decl 0
 
4687
.      nr doc-is-func 0
 
4688
.    \}
 
4689
.    el \{\
 
4690
.      if \n[doc-have-func] \{\
 
4691
.        doc-paragraph
 
4692
.        nr doc-have-var 0
 
4693
.        nr doc-have-decl 0
 
4694
.    \}\}
 
4695
.
 
4696
.    if \n[doc-have-decl] \{\
 
4697
.      doc-paragraph
 
4698
.      nr doc-have-var 0
 
4699
.    \}
 
4700
.
 
4701
.    if \n[doc-have-var] \{\
 
4702
.      doc-paragraph
 
4703
.      nr doc-have-decl 0
 
4704
.    \}
 
4705
.
 
4706
.    nr doc-have-func 1
 
4707
.    nr doc-is-func 0
 
4708
.
 
4709
.    br
 
4710
.    if !\n[doc-indent-synopsis] \
 
4711
.      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
 
4712
.    if !\n[doc-indent-synopsis-active] \
 
4713
.      in +\n[doc-indent-synopsis]u
 
4714
.    ti -\n[doc-indent-synopsis]u
 
4715
.  \}
 
4716
.
 
4717
.  nr doc-arg-ptr +1
 
4718
.  doc-print-prefixes
 
4719
.  if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
 
4720
.    tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
 
4721
.    doc-reset-args
 
4722
.    return
 
4723
.  \}
 
4724
.
 
4725
.  nr doc-curr-font \n[.f]
 
4726
.  nr doc-curr-size \n[.ps]
 
4727
.  nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
 
4728
.  nop \f[P]\s[0]\*[lp]\)\c
 
4729
.
 
4730
.  nr doc-arg-ptr +1
 
4731
.  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4732
.    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
4733
.      nop \*[doc-Fa-font]\c
 
4734
.      doc-do-func-args
 
4735
.      nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
4736
.  \}\}
 
4737
.
 
4738
.  nop \)\*[rp]\)\c
 
4739
.  if \n[doc-in-synopsis-section] \
 
4740
.    nop \);\)\c
 
4741
.
 
4742
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4743
.    \" output the space (if needed)
 
4744
.    nr doc-arg-ptr -1
 
4745
.    nop \)\*[doc-space\n[doc-arg-ptr]]\c
 
4746
.    nr doc-arg-ptr +1
 
4747
.
 
4748
.    doc-print-recursive
 
4749
.  \}
 
4750
.  el \
 
4751
.    doc-print-and-reset
 
4752
.
 
4753
.  if \n[doc-in-synopsis-section] \
 
4754
.    if !\n[doc-indent-synopsis-active] \
 
4755
.      in -\n[doc-indent-synopsis]u
 
4756
..
 
4757
.
 
4758
.
 
4759
.\" NS doc-do-func-args macro
 
4760
.\" NS   handle function arguments
 
4761
.\" NS
 
4762
.\" NS modifies:
 
4763
.\" NS   doc-arg-ptr
 
4764
.\" NS   doc-argXXX
 
4765
.\" NS   doc-func-arg
 
4766
.\" NS   doc-func-args-processed
 
4767
.\" NS   doc-num-func-args
 
4768
.\" NS
 
4769
.\" NS local variables:
 
4770
.\" NS   doc-reg-ddfa
 
4771
.
 
4772
.de doc-do-func-args
 
4773
.  if \n[doc-in-synopsis-section] \{\
 
4774
.    ds doc-func-arg
 
4775
.    nr doc-num-func-args 0
 
4776
.    nr doc-func-args-processed 0
 
4777
.
 
4778
.    doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
 
4779
.    if (\n[doc-num-func-args] > 1) \
 
4780
.      ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
 
4781
.  \}
 
4782
.
 
4783
.  nop \)\*[doc-arg\n[doc-arg-ptr]]\c
 
4784
.  nr doc-arg-ptr +1
 
4785
.
 
4786
.  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4787
.    if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
 
4788
.      nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
 
4789
.      nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
 
4790
.      nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
 
4791
.      doc-do-func-args
 
4792
.  \}\}
 
4793
..
 
4794
.
 
4795
.
 
4796
.\" NS doc-saved-nesting-level global register
 
4797
.
 
4798
.nr doc-saved-nesting-level 0
 
4799
.
 
4800
.
 
4801
.\" NS doc-in-func-enclosure global register (bool)
 
4802
.
 
4803
.nr doc-in-func-enclosure 0
 
4804
.
 
4805
.
 
4806
.\" NS Fo user macro
 
4807
.\" NS   function open
 
4808
.\" NS
 
4809
.\" NS modifies:
 
4810
.\" NS   doc-arg-ptr
 
4811
.\" NS   doc-curr-font
 
4812
.\" NS   doc-curr-size
 
4813
.\" NS   doc-func-arg-count
 
4814
.\" NS   doc-have-decl
 
4815
.\" NS   doc-have-func
 
4816
.\" NS   doc-have-var
 
4817
.\" NS   doc-in-func-enclosure
 
4818
.\" NS   doc-indent-synopsis
 
4819
.\" NS   doc-is-func
 
4820
.\" NS   doc-macro-name
 
4821
.\" NS   doc-saved-nesting-level
 
4822
.\" NS
 
4823
.\" NS width register `Fo' set in doc-common
 
4824
.
 
4825
.de Fo
 
4826
.  if (\n[doc-in-func-enclosure]) \{\
 
4827
.    tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
 
4828
.    return
 
4829
.  \}
 
4830
.
 
4831
.  nr doc-saved-nesting-level \n[doc-nesting-level]
 
4832
.  nr doc-in-func-enclosure 1
 
4833
.
 
4834
.  if !\n[doc-arg-limit] \{\
 
4835
.    ie \n[.$] \{\
 
4836
.      ds doc-macro-name Fo
 
4837
.      doc-parse-args \$@
 
4838
.    \}
 
4839
.    el \
 
4840
.      tm Usage: .Fo function_name (#\n[.c])
 
4841
.  \}
 
4842
.
 
4843
.  if \n[doc-in-synopsis-section] \{\
 
4844
.    \" if there is/has been more than one subroutine declaration
 
4845
.    ie \n[doc-is-func] \{\
 
4846
.      br
 
4847
.      nr doc-have-var 0
 
4848
.      nr doc-have-decl 0
 
4849
.      nr doc-is-func 0
 
4850
.    \}
 
4851
.    el \{\
 
4852
.      if \n[doc-have-func] \{\
 
4853
.        doc-paragraph
 
4854
.        nr doc-have-var 0
 
4855
.        nr doc-have-decl 0
 
4856
.    \}\}
 
4857
.
 
4858
.    if \n[doc-have-decl] \{\
 
4859
.      doc-paragraph
 
4860
.      nr doc-have-var 0
 
4861
.    \}
 
4862
.
 
4863
.    if \n[doc-have-var] \{\
 
4864
.      doc-paragraph
 
4865
.      nr doc-have-decl 0
 
4866
.    \}
 
4867
.
 
4868
.    nr doc-have-func 1
 
4869
.    nr doc-is-func 0
 
4870
.
 
4871
.    br
 
4872
.    if !\n[doc-indent-synopsis] \
 
4873
.      nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
 
4874
.  \}
 
4875
.
 
4876
.  \" start function box
 
4877
.  box doc-func-box
 
4878
.  ev doc-func-env
 
4879
.  evc 0
 
4880
.  in 0
 
4881
.  nf
 
4882
.
 
4883
.  nr doc-arg-ptr +1
 
4884
.  doc-print-prefixes
 
4885
.  if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4886
.    nr doc-func-arg-count 1
 
4887
.    nr doc-curr-font \n[.f]
 
4888
.    nr doc-curr-size \n[.ps]
 
4889
.
 
4890
.    nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
 
4891
.    nop \f[P]\s[0]\*[lp]\)\c
 
4892
.    doc-reset-args
 
4893
.  \}
 
4894
..
 
4895
.
 
4896
.
 
4897
.\" NS Fc user macro
 
4898
.\" NS   function close
 
4899
.\" NS
 
4900
.\" NS modifies:
 
4901
.\" NS   doc-arg-ptr
 
4902
.\" NS   doc-func-arg-count
 
4903
.\" NS   doc-in-func-enclosure
 
4904
.\" NS   doc-saved-nesting-level
 
4905
.\" NS   doc-macro-name
 
4906
.\" NS
 
4907
.\" NS width register `Fc' set in doc-common
 
4908
.
 
4909
.de Fc
 
4910
.  if !\n[doc-in-func-enclosure] \{\
 
4911
.    tm mdoc warning: Extraneous .Fc (#\n[.c])
 
4912
.    return
 
4913
.  \}
 
4914
.
 
4915
.  if \n[.$] \{\
 
4916
.    ds doc-macro-name Fc
 
4917
.    \" the first (dummy) argument is used to get the correct spacing
 
4918
.    doc-parse-args \) \$@
 
4919
.  \}
 
4920
.
 
4921
.  if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
 
4922
.    tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
 
4923
.
 
4924
.  nr doc-func-arg-count 0
 
4925
.  nr doc-in-func-enclosure 0
 
4926
.
 
4927
.  ie \n[doc-in-synopsis-section] \
 
4928
.    nop \|\*[rp];\)
 
4929
.  el \
 
4930
.    nop \|\*[rp]\)
 
4931
.
 
4932
.  \" finish function box
 
4933
.  br
 
4934
.  ev
 
4935
.  box
 
4936
.  chop doc-func-box
 
4937
.  unformat doc-func-box
 
4938
.
 
4939
.  if \n[doc-in-synopsis-section] \{\
 
4940
.    if !\n[doc-indent-synopsis-active] \
 
4941
.      in +\n[doc-indent-synopsis]u
 
4942
.    ti -\n[doc-indent-synopsis]u
 
4943
.  \}
 
4944
.
 
4945
.  nh
 
4946
.  nop \*[doc-func-box]\c
 
4947
.
 
4948
.  nr doc-arg-ptr +1
 
4949
.  ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
4950
.    nr doc-curr-font \n[.f]
 
4951
.    nr doc-curr-size \n[.ps]
 
4952
.    doc-print-recursive
 
4953
.  \}
 
4954
.  el \
 
4955
.    doc-print-and-reset
 
4956
.
 
4957
.  if \n[doc-in-synopsis-section] \
 
4958
.    if !\n[doc-indent-synopsis-active] \
 
4959
.      in -\n[doc-indent-synopsis]u
 
4960
..
 
4961
.
 
4962
.
 
4963
.\" NS doc-build-func-string macro
 
4964
.\" NS   collect function arguments and set hard spaces inbetween
 
4965
.\" NS
 
4966
.\" NS modifies:
 
4967
.\" NS   doc-func-arg
 
4968
.\" NS   doc-func-args-processed
 
4969
.\" NS   doc-num-func-args
 
4970
.
 
4971
.de doc-build-func-string
 
4972
.  if !\n[doc-num-func-args] \{\
 
4973
.    nr doc-num-func-args \n[.$]
 
4974
.    nr doc-func-args-processed 0
 
4975
.    ds doc-func-arg
 
4976
.  \}
 
4977
.
 
4978
.  nr doc-func-args-processed +1
 
4979
.  as doc-func-arg "\$1
 
4980
.
 
4981
.  if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
 
4982
.    as doc-func-arg "\*[doc-hard-space]
 
4983
.
 
4984
.    shift
 
4985
.    doc-build-func-string \$@
 
4986
.  \}
 
4987
..
 
4988
.
 
4989
.
 
4990
.\" Very crude references: Stash all reference info into boxes, print out
 
4991
.\" reference on .Re request and clean up.  Ordering very limited, no fancy
 
4992
.\" citations, but can do articles, journals, and books -- need to add
 
4993
.\" several missing options (like city etc).  Should be able to grab a refer
 
4994
.\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
 
4995
.\" (ha!).
 
4996
.
 
4997
.
 
4998
.\" NS doc-is-reference global register (bool)
 
4999
.\" NS   set if in reference
 
5000
.
 
5001
.nr doc-is-reference 0
 
5002
.
 
5003
.
 
5004
.\" NS doc-reference-count global register
 
5005
.\" NS   reference element counter
 
5006
.
 
5007
.nr doc-reference-count 0
 
5008
.
 
5009
.
 
5010
.\" NS Rs user macro
 
5011
.\" NS   reference start
 
5012
.\" NS
 
5013
.\" NS modifies:
 
5014
.\" NS   doc-is-reference
 
5015
.\" NS   doc-reference-count
 
5016
.\" NS
 
5017
.\" NS width register `Rs' set in doc-common
 
5018
.
 
5019
.de Rs
 
5020
.  ie \n[.$] \
 
5021
.    tm Usage: .Rs (does not take arguments) (#\n[.c])
 
5022
.  el \{\
 
5023
.    nr doc-is-reference 1
 
5024
.    doc-reset-reference
 
5025
.    if \n[doc-in-see-also-section] \
 
5026
.      doc-paragraph
 
5027
.    nr doc-reference-count 0
 
5028
.  \}
 
5029
..
 
5030
.
 
5031
.
 
5032
.\" NS Re user macro
 
5033
.\" NS   reference end
 
5034
.\" NS
 
5035
.\" NS modifies:
 
5036
.\" NS   doc-is-reference
 
5037
.\" NS
 
5038
.\" NS width register `Re' set in doc-common
 
5039
.
 
5040
.de Re
 
5041
.  ie \n[.$] \
 
5042
.    tm Usage: .Re (does not take arguments) (#\n[.c])
 
5043
.  el \{\
 
5044
.    doc-print-reference
 
5045
.    doc-reset-reference
 
5046
.    nr doc-is-reference 0
 
5047
.  \}
 
5048
..
 
5049
.
 
5050
.
 
5051
.\" NS doc-reset-reference macro
 
5052
.\" NS   reference cleanup
 
5053
.\" NS
 
5054
.\" NS modifies:
 
5055
.\" NS   doc-author-count
 
5056
.\" NS   doc-author-nameXXX
 
5057
.\" NS   doc-book-count
 
5058
.\" NS   doc-book-name
 
5059
.\" NS   doc-corporate-count
 
5060
.\" NS   doc-corporate-name
 
5061
.\" NS   doc-date
 
5062
.\" NS   doc-date-count
 
5063
.\" NS   doc-issue-count
 
5064
.\" NS   doc-issue-name
 
5065
.\" NS   doc-journal-count
 
5066
.\" NS   doc-journam-name
 
5067
.\" NS   doc-optional-count
 
5068
.\" NS   doc-optional-string
 
5069
.\" NS   doc-page-number-count
 
5070
.\" NS   doc-page-number-string
 
5071
.\" NS   doc-reference-title-count
 
5072
.\" NS   doc-reference-title-name
 
5073
.\" NS   doc-reference-title-name-for-book
 
5074
.\" NS   doc-report-count
 
5075
.\" NS   doc-report-name
 
5076
.\" NS   doc-volume-count
 
5077
.\" NS   doc-volume-name
 
5078
.
 
5079
.de doc-reset-reference
 
5080
.  while (\n[doc-author-count]) \{\
 
5081
.    ds doc-author-name\n[doc-author-count]
 
5082
.    nr doc-author-count -1
 
5083
.  \}
 
5084
.  nr doc-journal-count 0
 
5085
.  nr doc-issue-count 0
 
5086
.  nr doc-optional-count 0
 
5087
.  nr doc-corporate-count 0
 
5088
.  nr doc-report-count 0
 
5089
.  nr doc-reference-title-count 0
 
5090
.  nr doc-volume-count 0
 
5091
.  nr doc-date-count 0
 
5092
.  nr doc-page-number-count 0
 
5093
.  nr doc-book-count 0
 
5094
.
 
5095
.  ds doc-journal-name
 
5096
.  ds doc-issue-name
 
5097
.  ds doc-optional-string
 
5098
.  ds doc-corporate-name
 
5099
.  ds doc-report-name
 
5100
.  ds doc-reference-title-name
 
5101
.  ds doc-reference-title-name-for-book
 
5102
.  ds doc-volume-name
 
5103
.  ds doc-date
 
5104
.  ds doc-page-number-string
 
5105
.  ds doc-book-name
 
5106
..
 
5107
.
 
5108
.
 
5109
.\" NS doc-finish-reference macro
 
5110
.\" NS   auxiliary macro for doc-print-reference
 
5111
.\" NS
 
5112
.\" NS modifies:
 
5113
.\" NS   doc-reference-count
 
5114
.
 
5115
.de doc-finish-reference
 
5116
.  nr doc-reference-count -1
 
5117
.  ie \n[doc-reference-count] \
 
5118
.    nop \),
 
5119
.  el \
 
5120
.    nop \).
 
5121
..
 
5122
.
 
5123
.
 
5124
.\" NS doc-print-reference macro
 
5125
.\" NS   reference print
 
5126
.\" NS
 
5127
.\" NS modifies:
 
5128
.\" NS   doc-reference-count
 
5129
.
 
5130
.de doc-print-reference
 
5131
.
 
5132
.  nh
 
5133
.
 
5134
.  if \n[doc-author-count] \{\
 
5135
.    doc-print-reference-authors
 
5136
.    nr doc-reference-count -\n[doc-author-count]
 
5137
.  \}
 
5138
.
 
5139
.  if \n[doc-reference-title-count] \{\
 
5140
.    unformat doc-reference-title-name
 
5141
.    chop doc-reference-title-name
 
5142
.    unformat doc-reference-title-name-for-book
 
5143
.    chop doc-reference-title-name-for-book
 
5144
.    ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
 
5145
.      nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
 
5146
.      doc-finish-reference
 
5147
.    \}
 
5148
.    el \{\
 
5149
.      nop \*[doc-reference-title-name]\c
 
5150
.      doc-finish-reference
 
5151
.  \}\}
 
5152
.
 
5153
.  if \n[doc-book-count] \{\
 
5154
.    unformat doc-book-name
 
5155
.    chop doc-book-name
 
5156
.    nop \*[doc-book-name]\c
 
5157
.    doc-finish-reference
 
5158
.  \}
 
5159
.
 
5160
.  if \n[doc-publisher-count] \{\
 
5161
.    unformat doc-publisher-name
 
5162
.    chop doc-publisher-name
 
5163
.    nop \*[doc-publisher-name]\c
 
5164
.    doc-finish-reference
 
5165
.  \}
 
5166
.
 
5167
.  if \n[doc-journal-count] \{\
 
5168
.    unformat doc-journal-name
 
5169
.    chop doc-journal-name
 
5170
.    nop \*[doc-journal-name]\c
 
5171
.    doc-finish-reference
 
5172
.  \}
 
5173
.
 
5174
.  if \n[doc-report-count] \{\
 
5175
.    unformat doc-report-name
 
5176
.    chop doc-report-name
 
5177
.    nop \*[doc-report-name]\c
 
5178
.    doc-finish-reference
 
5179
.  \}
 
5180
.
 
5181
.  if \n[doc-issue-count] \{\
 
5182
.    unformat doc-issue-name
 
5183
.    chop doc-issue-name
 
5184
.    nop \*[doc-issue-name]\c
 
5185
.    doc-finish-reference
 
5186
.  \}
 
5187
.
 
5188
.  if \n[doc-volume-count] \{\
 
5189
.    unformat doc-volume-name
 
5190
.    chop doc-volume-name
 
5191
.    nop \*[doc-volume-name]\c
 
5192
.    doc-finish-reference
 
5193
.  \}
 
5194
.
 
5195
.  if \n[doc-page-number-count] \{\
 
5196
.    unformat doc-page-number-string
 
5197
.    chop doc-page-number-string
 
5198
.    nop \*[doc-page-number-string]\c
 
5199
.    doc-finish-reference
 
5200
.  \}
 
5201
.
 
5202
.  if \n[doc-corporate-count] \{\
 
5203
.    unformat doc-corporate-name
 
5204
.    chop doc-corporate-name
 
5205
.    nop \*[doc-corporate-name]\c
 
5206
.    doc-finish-reference
 
5207
.  \}
 
5208
.
 
5209
.  if \n[doc-date-count] \{\
 
5210
.    unformat doc-date
 
5211
.    chop doc-date
 
5212
.    nop \*[doc-date]\c
 
5213
.    doc-finish-reference
 
5214
.  \}
 
5215
.
 
5216
.  if \n[doc-optional-count] \{\
 
5217
.    unformat doc-optional-string
 
5218
.    chop doc-optional-string
 
5219
.    nop \*[doc-optional-string]\c
 
5220
.    doc-finish-reference
 
5221
.  \}
 
5222
.
 
5223
.  if \n[doc-reference-count] \
 
5224
.    tm mdoc warning: unresolved reference problem
 
5225
.
 
5226
.  hy \n[doc-hyphen-flags]
 
5227
..
 
5228
.
 
5229
.
 
5230
.\" NS doc-print-reference-authors macro
 
5231
.\" NS   print out reference authors
 
5232
.\" NS
 
5233
.\" NS local variables:
 
5234
.\" NS   doc-reg-dpra
 
5235
.\" NS   doc-str-dpra
 
5236
.
 
5237
.ds doc-str-dpra "and
 
5238
.
 
5239
.de doc-print-reference-authors
 
5240
.  nr doc-reg-dpra 1
 
5241
.
 
5242
.  while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
 
5243
.    unformat doc-author-name\n[doc-reg-dpra]
 
5244
.    chop doc-author-name\n[doc-reg-dpra]
 
5245
.    ie (\n[doc-author-count] > 2) \
 
5246
.      nop \)\*[doc-author-name\n[doc-reg-dpra]],
 
5247
.    el \
 
5248
.      nop \)\*[doc-author-name\n[doc-reg-dpra]]
 
5249
.    nr doc-reg-dpra +1
 
5250
.  \}
 
5251
.
 
5252
.  unformat doc-author-name\n[doc-reg-dpra]
 
5253
.  chop doc-author-name\n[doc-reg-dpra]
 
5254
.  if (\n[doc-author-count] > 1) \
 
5255
.    nop \)\*[doc-str-dpra]
 
5256
.  nop \)\*[doc-author-name\n[doc-reg-dpra]],
 
5257
..
 
5258
.
 
5259
.
 
5260
.\" NS doc-author-count global register
 
5261
.\" NS   counter of author references
 
5262
.
 
5263
.nr doc-author-count 0
 
5264
.
 
5265
.
 
5266
.\" NS doc-author-nameXXX global box
 
5267
.\" NS   array of author names
 
5268
.\" NS
 
5269
.\" NS limit:
 
5270
.\" NS   doc-author-count
 
5271
.
 
5272
.ds doc-author-name0
 
5273
.
 
5274
.
 
5275
.\" NS %A user macro
 
5276
.\" NS   reference author(s)
 
5277
.\" NS
 
5278
.\" NS modifies:
 
5279
.\" NS   doc-arg-ptr
 
5280
.\" NS   doc-author-count
 
5281
.\" NS   doc-curr-font
 
5282
.\" NS   doc-curr-size
 
5283
.\" NS   doc-macro-name
 
5284
.\" NS   doc-reference-count
 
5285
.\" NS
 
5286
.\" NS local variables:
 
5287
.\" NS   doc-env-%A
 
5288
.\" NS
 
5289
.\" NS width register `%A' set in doc-common
 
5290
.
 
5291
.de %A
 
5292
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5293
.    tm Usage: .%A author_name ... (#\n[.c])
 
5294
.    return
 
5295
.  \}
 
5296
.
 
5297
.  nr doc-author-count +1
 
5298
.  nr doc-reference-count +1
 
5299
.
 
5300
.  ds doc-macro-name %A
 
5301
.  doc-parse-args \$@
 
5302
.
 
5303
.  nr doc-arg-ptr +1
 
5304
.  nr doc-curr-font \n[.f]
 
5305
.  nr doc-curr-size \n[.ps]
 
5306
.
 
5307
.  \" save to reference box
 
5308
.  box doc-author-name\n[doc-author-count]
 
5309
.  ev doc-env-%A
 
5310
.  evc 0
 
5311
.  in 0
 
5312
.  nf
 
5313
.  doc-do-references
 
5314
..
 
5315
.
 
5316
.
 
5317
.\" NS doc-book-count global register
 
5318
.\" NS   counter of book references
 
5319
.
 
5320
.nr doc-book-count 0
 
5321
.
 
5322
.
 
5323
.\" NS doc-book-name global box
 
5324
.\" NS   string of collected book references
 
5325
.
 
5326
.ds doc-book-name
 
5327
.
 
5328
.
 
5329
.\" NS %B user macro
 
5330
.\" NS   [reference] book name
 
5331
.\" NS
 
5332
.\" NS modifies:
 
5333
.\" NS   doc-arg-ptr
 
5334
.\" NS   doc-book-count
 
5335
.\" NS   doc-curr-font
 
5336
.\" NS   doc-curr-size
 
5337
.\" NS   doc-macro-name
 
5338
.\" NS   doc-reference-count
 
5339
.\" NS
 
5340
.\" NS local variables:
 
5341
.\" NS   doc-env-%B
 
5342
.\" NS
 
5343
.\" NS width register `%B' set in doc-common
 
5344
.
 
5345
.de %B
 
5346
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5347
.    tm Usage: .%B book_name ... (#\n[.c])
 
5348
.    return
 
5349
.  \}
 
5350
.
 
5351
.  if \n[doc-is-reference] \{\
 
5352
.    nr doc-book-count +1
 
5353
.    nr doc-reference-count +1
 
5354
.  \}
 
5355
.
 
5356
.  ds doc-macro-name %B
 
5357
.  doc-parse-args \$@
 
5358
.
 
5359
.  nr doc-arg-ptr +1
 
5360
.  nr doc-curr-font \n[.f]
 
5361
.  nr doc-curr-size \n[.ps]
 
5362
.
 
5363
.  ie \n[doc-is-reference] \{\
 
5364
.    \" append to reference box
 
5365
.    boxa doc-book-name
 
5366
.    ev doc-env-%B
 
5367
.    evc 0
 
5368
.    in 0
 
5369
.    nf
 
5370
.    nop \*[doc-Em-font]\c
 
5371
.    doc-do-references
 
5372
.  \}
 
5373
.  el \{\
 
5374
.    nop \*[doc-Em-font]\c
 
5375
.    doc-print-recursive
 
5376
.  \}
 
5377
..
 
5378
.
 
5379
.
 
5380
.\" NS doc-date-count global register
 
5381
.\" NS   counter of date references
 
5382
.
 
5383
.nr doc-date-count 0
 
5384
.
 
5385
.
 
5386
.\" NS doc-date global box
 
5387
.\" NS   string of collected date references
 
5388
.
 
5389
.ds doc-date
 
5390
.
 
5391
.
 
5392
.\" NS %D user macro
 
5393
.\" NS   [reference] date
 
5394
.\" NS
 
5395
.\" NS modifies:
 
5396
.\" NS   doc-arg-ptr
 
5397
.\" NS   doc-curr-font
 
5398
.\" NS   doc-curr-size
 
5399
.\" NS   doc-date-count
 
5400
.\" NS   doc-macro-name
 
5401
.\" NS   doc-reference-count
 
5402
.\" NS
 
5403
.\" NS local variables:
 
5404
.\" NS   doc-env-%D
 
5405
.\" NS
 
5406
.\" NS width register `%D' set in doc-common
 
5407
.
 
5408
.de %D
 
5409
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5410
.    tm Usage: .%D date ... (#\n[.c])
 
5411
.    return
 
5412
.  \}
 
5413
.
 
5414
.  nr doc-date-count +1
 
5415
.  nr doc-reference-count +1
 
5416
.
 
5417
.  ds doc-macro-name %D
 
5418
.  doc-parse-args \$@
 
5419
.
 
5420
.  nr doc-arg-ptr +1
 
5421
.  nr doc-curr-font \n[.f]
 
5422
.  nr doc-curr-size \n[.ps]
 
5423
.
 
5424
.  \" append to reference box
 
5425
.  boxa doc-date
 
5426
.  ev doc-env-%D
 
5427
.  evc 0
 
5428
.  in 0
 
5429
.  nf
 
5430
.  doc-do-references
 
5431
..
 
5432
.
 
5433
.
 
5434
.\" NS doc-publisher-count global register
 
5435
.\" NS   counter of publisher references
 
5436
.
 
5437
.nr doc-publisher-count 0
 
5438
.
 
5439
.
 
5440
.\" NS doc-publisher-name global box
 
5441
.\" NS   string of collected publisher references
 
5442
.
 
5443
.ds doc-publisher-name
 
5444
.
 
5445
.
 
5446
.\" NS %I user macro
 
5447
.\" NS   [reference] issuer/publisher name
 
5448
.\" NS
 
5449
.\" NS modifies:
 
5450
.\" NS   doc-arg-ptr
 
5451
.\" NS   doc-curr-font
 
5452
.\" NS   doc-curr-size
 
5453
.\" NS   doc-macro-name
 
5454
.\" NS   doc-publisher-count
 
5455
.\" NS   doc-reference-count
 
5456
.\" NS
 
5457
.\" NS local variables:
 
5458
.\" NS   doc-env-%I
 
5459
.\" NS
 
5460
.\" NS width register `%I' set in doc-common
 
5461
.
 
5462
.de %I
 
5463
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5464
.    tm Usage: .%I issuer/publisher_name ... (#\n[.c])
 
5465
.    return
 
5466
.  \}
 
5467
.
 
5468
.  nr doc-publisher-count +1
 
5469
.  nr doc-reference-count +1
 
5470
.
 
5471
.  ds doc-macro-name %I
 
5472
.  doc-parse-args \$@
 
5473
.
 
5474
.  nr doc-arg-ptr +1
 
5475
.  nr doc-curr-font \n[.f]
 
5476
.  nr doc-curr-size \n[.ps]
 
5477
.
 
5478
.  \" append to reference box
 
5479
.  boxa doc-publisher-name
 
5480
.  ev doc-env-%I
 
5481
.  evc 0
 
5482
.  in 0
 
5483
.  nf
 
5484
.  nop \*[doc-Em-font]\c
 
5485
.  doc-do-references
 
5486
..
 
5487
.
 
5488
.
 
5489
.\" NS doc-journal-count global register
 
5490
.\" NS   counter of journal references
 
5491
.
 
5492
.nr doc-journal-count 0
 
5493
.
 
5494
.
 
5495
.\" NS doc-journal-name global box
 
5496
.\" NS   string of collected journal references
 
5497
.
 
5498
.ds doc-journal-name
 
5499
.
 
5500
.
 
5501
.\" NS %J user macro
 
5502
.\" NS   [reference] Journal Name
 
5503
.\" NS
 
5504
.\" NS modifies:
 
5505
.\" NS   doc-arg-ptr
 
5506
.\" NS   doc-curr-font
 
5507
.\" NS   doc-curr-size
 
5508
.\" NS   doc-journal-count
 
5509
.\" NS   doc-macro-name
 
5510
.\" NS   doc-reference-count
 
5511
.\" NS
 
5512
.\" NS local variables:
 
5513
.\" NS   doc-env-%J
 
5514
.\" NS
 
5515
.\" NS width register `%J' set in doc-common
 
5516
.
 
5517
.de %J
 
5518
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5519
.    tm Usage: .%J journal_name ... (#\n[.c])
 
5520
.    return
 
5521
.  \}
 
5522
.
 
5523
.  nr doc-journal-count +1
 
5524
.  nr doc-reference-count +1
 
5525
.
 
5526
.  ds doc-macro-name %J
 
5527
.  doc-parse-args \$@
 
5528
.
 
5529
.  nr doc-arg-ptr +1
 
5530
.  nr doc-curr-font \n[.f]
 
5531
.  nr doc-curr-size \n[.ps]
 
5532
.
 
5533
.  \" append to reference box
 
5534
.  boxa doc-journal-name
 
5535
.  ev doc-env-%J
 
5536
.  evc 0
 
5537
.  in 0
 
5538
.  nf
 
5539
.  nop \*[doc-Em-font]\c
 
5540
.  doc-do-references
 
5541
..
 
5542
.
 
5543
.
 
5544
.\" NS doc-issue-count global register
 
5545
.\" NS   counter of issue number references
 
5546
.
 
5547
.nr doc-issue-count 0
 
5548
.
 
5549
.
 
5550
.\" NS doc-issue-name global box
 
5551
.\" NS   string of collected issue number references
 
5552
.
 
5553
.ds doc-issue-name
 
5554
.
 
5555
.
 
5556
.\" NS %N user macro
 
5557
.\" NS   [reference] issue number
 
5558
.\" NS
 
5559
.\" NS modifies:
 
5560
.\" NS   doc-arg-ptr
 
5561
.\" NS   doc-curr-font
 
5562
.\" NS   doc-curr-size
 
5563
.\" NS   doc-issue-count
 
5564
.\" NS   doc-macro-name
 
5565
.\" NS   doc-reference-count
 
5566
.\" NS
 
5567
.\" NS local variables:
 
5568
.\" NS   doc-env-%N
 
5569
.\" NS
 
5570
.\" NS width register `%N' set in doc-common
 
5571
.
 
5572
.de %N
 
5573
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5574
.    tm Usage: .%N issue_number ... (#\n[.c])
 
5575
.    return
 
5576
.  \}
 
5577
.
 
5578
.  nr doc-issue-count +1
 
5579
.  nr doc-reference-count +1
 
5580
.
 
5581
.  ds doc-macro-name %N
 
5582
.  doc-parse-args \$@
 
5583
.
 
5584
.  nr doc-arg-ptr +1
 
5585
.  nr doc-curr-font \n[.f]
 
5586
.  nr doc-curr-size \n[.ps]
 
5587
.
 
5588
.  \" append to reference box
 
5589
.  boxa doc-issue-name
 
5590
.  ev doc-env-%N
 
5591
.  evc 0
 
5592
.  in 0
 
5593
.  nf
 
5594
.  doc-do-references
 
5595
..
 
5596
.
 
5597
.
 
5598
.\" NS doc-optional-count global register
 
5599
.\" NS   counter of optional information references
 
5600
.
 
5601
.nr doc-optional-count 0
 
5602
.
 
5603
.
 
5604
.\" NS doc-optional-string global box
 
5605
.\" NS   string of collected optional information references
 
5606
.
 
5607
.ds doc-optional-string
 
5608
.
 
5609
.
 
5610
.\" NS %O user macro
 
5611
.\" NS   [reference] optional information
 
5612
.\" NS
 
5613
.\" NS modifies:
 
5614
.\" NS   doc-arg-ptr
 
5615
.\" NS   doc-curr-font
 
5616
.\" NS   doc-curr-size
 
5617
.\" NS   doc-macro-name
 
5618
.\" NS   doc-optional-count
 
5619
.\" NS   doc-reference-count
 
5620
.\" NS
 
5621
.\" NS local variables:
 
5622
.\" NS   doc-env-%O
 
5623
.\" NS
 
5624
.\" NS width register `%O' set in doc-common
 
5625
.
 
5626
.de %O
 
5627
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5628
.    tm Usage: .%O optional_information ... (#\n[.c])
 
5629
.    return
 
5630
.  \}
 
5631
.
 
5632
.  nr doc-optional-count +1
 
5633
.  nr doc-reference-count +1
 
5634
.
 
5635
.  ds doc-macro-name %O
 
5636
.  doc-parse-args \$@
 
5637
.
 
5638
.  nr doc-arg-ptr +1
 
5639
.  nr doc-curr-font \n[.f]
 
5640
.  nr doc-curr-size \n[.ps]
 
5641
.
 
5642
.  \" append to reference box
 
5643
.  boxa doc-optional-string
 
5644
.  ev doc-env-%O
 
5645
.  evc 0
 
5646
.  in 0
 
5647
.  nf
 
5648
.  doc-do-references
 
5649
..
 
5650
.
 
5651
.
 
5652
.\" NS doc-page-number-count global register
 
5653
.\" NS   counter of page number references
 
5654
.
 
5655
.nr doc-page-number-count 0
 
5656
.
 
5657
.
 
5658
.\" NS doc-page-number-string global box
 
5659
.\" NS   string of collected page number references
 
5660
.
 
5661
.ds doc-page-number-string
 
5662
.
 
5663
.
 
5664
.\" NS %P user macro
 
5665
.\" NS   [reference] page numbers
 
5666
.\" NS
 
5667
.\" NS modifies:
 
5668
.\" NS   doc-arg-ptr
 
5669
.\" NS   doc-curr-font
 
5670
.\" NS   doc-curr-size
 
5671
.\" NS   doc-macro-name
 
5672
.\" NS   doc-page-number-count
 
5673
.\" NS   doc-reference-count
 
5674
.\" NS
 
5675
.\" NS local variables:
 
5676
.\" NS   doc-env-%P
 
5677
.\" NS
 
5678
.\" NS width register `%P' set in doc-common
 
5679
.
 
5680
.de %P
 
5681
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5682
.    tm Usage: .%P page_number ... (#\n[.c])
 
5683
.    return
 
5684
.  \}
 
5685
.
 
5686
.  nr doc-page-number-count +1
 
5687
.  nr doc-reference-count +1
 
5688
.
 
5689
.  ds doc-macro-name %P
 
5690
.  doc-parse-args \$@
 
5691
.
 
5692
.  nr doc-arg-ptr +1
 
5693
.  nr doc-curr-font \n[.f]
 
5694
.  nr doc-curr-size \n[.ps]
 
5695
.
 
5696
.  \" append to reference box
 
5697
.  boxa doc-page-number-string
 
5698
.  ev doc-env-%P
 
5699
.  evc 0
 
5700
.  in 0
 
5701
.  nf
 
5702
.  doc-do-references
 
5703
..
 
5704
.
 
5705
.
 
5706
.\" NS doc-corporate-count global register
 
5707
.\" NS   counter of corporate references
 
5708
.
 
5709
.nr doc-corporate-count 0
 
5710
.
 
5711
.
 
5712
.\" NS doc-corporate-name global box
 
5713
.\" NS   string of collected corporate references
 
5714
.
 
5715
.ds doc-corporate-name
 
5716
.
 
5717
.
 
5718
.\" NS %Q user macro
 
5719
.\" NS   corporate or foreign author
 
5720
.\" NS
 
5721
.\" NS modifies:
 
5722
.\" NS   doc-arg-ptr
 
5723
.\" NS   doc-corporate-count
 
5724
.\" NS   doc-curr-font
 
5725
.\" NS   doc-curr-size
 
5726
.\" NS   doc-macro-name
 
5727
.\" NS   doc-reference-count
 
5728
.\" NS
 
5729
.\" NS local variables:
 
5730
.\" NS   doc-env-%Q
 
5731
.\" NS
 
5732
.\" NS width register `%Q' set in doc-common
 
5733
.
 
5734
.de %Q
 
5735
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5736
.    tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
 
5737
.    return
 
5738
.  \}
 
5739
.
 
5740
.  nr doc-corporate-count +1
 
5741
.  nr doc-reference-count +1
 
5742
.
 
5743
.  ds doc-macro-name %Q
 
5744
.  doc-parse-args \$@
 
5745
.
 
5746
.  nr doc-arg-ptr +1
 
5747
.  nr doc-curr-font \n[.f]
 
5748
.  nr doc-curr-size \n[.ps]
 
5749
.
 
5750
.  \" append to reference box
 
5751
.  boxa doc-corporate-name
 
5752
.  ev doc-env-%Q
 
5753
.  evc 0
 
5754
.  in 0
 
5755
.  nf
 
5756
.  doc-do-references
 
5757
..
 
5758
.
 
5759
.
 
5760
.\" NS doc-report-count global register
 
5761
.\" NS   counter of report references
 
5762
.
 
5763
.nr doc-report-count 0
 
5764
.
 
5765
.
 
5766
.\" NS doc-report-name global box
 
5767
.\" NS   string of collected report references
 
5768
.
 
5769
.ds doc-report-name
 
5770
.
 
5771
.
 
5772
.\" NS %R user macro
 
5773
.\" NS   [reference] report name
 
5774
.\" NS
 
5775
.\" NS modifies:
 
5776
.\" NS   doc-arg-ptr
 
5777
.\" NS   doc-curr-font
 
5778
.\" NS   doc-curr-size
 
5779
.\" NS   doc-macro-name
 
5780
.\" NS   doc-reference-count
 
5781
.\" NS   doc-report-count
 
5782
.\" NS
 
5783
.\" NS local variables:
 
5784
.\" NS   doc-env-%R
 
5785
.\" NS
 
5786
.\" NS width register `%R' set in doc-common
 
5787
.
 
5788
.de %R
 
5789
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5790
.    tm Usage: .%R reference_report ... (#\n[.c])
 
5791
.    return
 
5792
.  \}
 
5793
.
 
5794
.  nr doc-report-count +1
 
5795
.  nr doc-reference-count +1
 
5796
.
 
5797
.  ds doc-macro-name %R
 
5798
.  doc-parse-args \$@
 
5799
.
 
5800
.  nr doc-arg-ptr +1
 
5801
.  nr doc-curr-font \n[.f]
 
5802
.  nr doc-curr-size \n[.ps]
 
5803
.
 
5804
.  \" append to reference box
 
5805
.  boxa doc-report-name
 
5806
.  ev doc-env-%R
 
5807
.  evc 0
 
5808
.  in 0
 
5809
.  nf
 
5810
.  doc-do-references
 
5811
..
 
5812
.
 
5813
.
 
5814
.\" NS doc-reference-title-count global register
 
5815
.\" NS   counter of reference title references
 
5816
.
 
5817
.nr doc-reference-title-count 0
 
5818
.
 
5819
.
 
5820
.\" NS doc-reference-title-name global box
 
5821
.\" NS   string of collected reference title references
 
5822
.
 
5823
.ds doc-reference-title-name
 
5824
.
 
5825
.
 
5826
.\" NS doc-reference-title-name-for-book global box
 
5827
.\" NS   string of collected reference title references
 
5828
.\" NS   (saved with another font; this is a shortcoming of groff)
 
5829
.
 
5830
.ds doc-reference-title-name-for-book
 
5831
.
 
5832
.
 
5833
.\" NS %T user macro
 
5834
.\" NS   reference title
 
5835
.\" NS
 
5836
.\" NS modifies:
 
5837
.\" NS   doc-arg-ptr
 
5838
.\" NS   doc-curr-font
 
5839
.\" NS   doc-curr-size
 
5840
.\" NS   doc-macro-name
 
5841
.\" NS   doc-reference-title-count
 
5842
.\" NS   doc-report-count
 
5843
.\" NS
 
5844
.\" NS local variables:
 
5845
.\" NS   doc-env-%T
 
5846
.\" NS
 
5847
.\" NS width register `%T' set in doc-common
 
5848
.
 
5849
.de %T
 
5850
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5851
.    tm Usage: .%T reference_title ... (#\n[.c])
 
5852
.    return
 
5853
.  \}
 
5854
.
 
5855
.  if \n[doc-is-reference] \{\
 
5856
.    nr doc-reference-title-count +1
 
5857
.    nr doc-reference-count +1
 
5858
.  \}
 
5859
.
 
5860
.  ds doc-macro-name %T
 
5861
.  doc-parse-args \$@
 
5862
.
 
5863
.  nr doc-arg-ptr +1
 
5864
.  nr doc-curr-font \n[.f]
 
5865
.  nr doc-curr-size \n[.ps]
 
5866
.  ie \n[doc-is-reference] \{\
 
5867
.    \" append to reference box
 
5868
.    boxa doc-reference-title-name-for-book
 
5869
.    ev doc-env-%T
 
5870
.    evc 0
 
5871
.    in 0
 
5872
.    nf
 
5873
.    nop \*[doc-No-font]\c
 
5874
.    doc-do-references
 
5875
.
 
5876
.    \" do it a second time with another font
 
5877
.    ds doc-macro-name %T
 
5878
.    doc-parse-args \$@
 
5879
.
 
5880
.    nr doc-arg-ptr +1
 
5881
.    nr doc-curr-font \n[.f]
 
5882
.    nr doc-curr-size \n[.ps]
 
5883
.    boxa doc-reference-title-name
 
5884
.    ev doc-env-%T
 
5885
.    evc 0
 
5886
.    in 0
 
5887
.    nf
 
5888
.    nop \*[doc-Em-font]\c
 
5889
.    doc-do-references
 
5890
.  \}
 
5891
.  el \{\
 
5892
.    nop \*[doc-Em-font]\c
 
5893
.    doc-print-recursive
 
5894
.  \}
 
5895
..
 
5896
.
 
5897
.
 
5898
.\" NS doc-volume-count global register
 
5899
.\" NS   counter of reference title references
 
5900
.
 
5901
.nr doc-volume-count 0
 
5902
.
 
5903
.
 
5904
.\" NS doc-volume-name global box
 
5905
.\" NS   string of collected volume references
 
5906
.
 
5907
.ds doc-volume-name
 
5908
.
 
5909
.
 
5910
.\" NS %V user macro
 
5911
.\" NS   reference volume
 
5912
.\" NS
 
5913
.\" NS modifies:
 
5914
.\" NS   doc-arg-ptr
 
5915
.\" NS   doc-curr-font
 
5916
.\" NS   doc-curr-size
 
5917
.\" NS   doc-macro-name
 
5918
.\" NS   doc-reference-title-count
 
5919
.\" NS   doc-volume-count
 
5920
.\" NS
 
5921
.\" NS local variables:
 
5922
.\" NS   doc-env-%V
 
5923
.\" NS
 
5924
.\" NS width register `%V' set in doc-common
 
5925
.
 
5926
.de %V
 
5927
.  if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
 
5928
.    tm Usage: .%V volume ... (#\n[.c])
 
5929
.    return
 
5930
.  \}
 
5931
.
 
5932
.  nr doc-volume-count +1
 
5933
.  nr doc-reference-count +1
 
5934
.
 
5935
.  ds doc-macro-name %V
 
5936
.  doc-parse-args \$@
 
5937
.
 
5938
.  nr doc-arg-ptr +1
 
5939
.  nr doc-curr-font \n[.f]
 
5940
.  nr doc-curr-size \n[.ps]
 
5941
.
 
5942
.  \" append to reference box
 
5943
.  boxa doc-volume-name
 
5944
.  ev doc-env-%V
 
5945
.  evc 0
 
5946
.  in 0
 
5947
.  nf
 
5948
.  doc-do-references
 
5949
..
 
5950
.
 
5951
.
 
5952
.\" NS doc-do-references macro
 
5953
.\" NS   reference recursion routine
 
5954
.\" NS
 
5955
.\" NS modifies:
 
5956
.\" NS   doc-arg-ptr
 
5957
.\" NS
 
5958
.\" NS local variables:
 
5959
.\" NS   doc-reg-ddr
 
5960
.\" NS   doc-reg-ddr1
 
5961
.
 
5962
.de doc-do-references
 
5963
.  if !\n[doc-is-reference] \
 
5964
.    tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
 
5965
.
 
5966
.  nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
 
5967
.
 
5968
.  ie (\n[doc-reg-ddr1] == 1) \{\
 
5969
.    \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
 
5970
.    doc-append-arg \c 3
 
5971
.    \*[doc-arg\n[doc-arg-ptr]]
 
5972
.  \}
 
5973
.  el \{\
 
5974
.    nop \)\*[doc-arg\n[doc-arg-ptr]]\c
 
5975
.
 
5976
.    ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
 
5977
.      \" finish reference box
 
5978
.      br
 
5979
.      ev
 
5980
.      boxa
 
5981
.
 
5982
.      doc-reset-args
 
5983
.    \}
 
5984
.    el \{\
 
5985
.      nr doc-reg-ddr \n[doc-arg-ptr]
 
5986
.      nr doc-arg-ptr +1
 
5987
.      nop \)\*[doc-space\n[doc-reg-ddr]]\c
 
5988
.      doc-do-references
 
5989
.  \}\}
 
5990
..
 
5991
.
 
5992
.
 
5993
.\" NS Hf user macro
 
5994
.\" NS   source include header files.
 
5995
.\" NS
 
5996
.\" NS modifies:
 
5997
.\" NS   doc-curr-font
 
5998
.\" NS   doc-curr-size
 
5999
.\" NS
 
6000
.\" NS width register `Hf' set in doc-common
 
6001
.
 
6002
.de Hf
 
6003
.  ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
 
6004
.    doc-paragraph
 
6005
.    nop File:
 
6006
.    Pa \$1
 
6007
.
 
6008
.    Bd -literal
 
6009
.    so \$1
 
6010
.    Ed
 
6011
.
 
6012
.    doc-paragraph
 
6013
.  \}
 
6014
.  el \
 
6015
.    Usage: .Hf file (#\n[.c])
 
6016
..
 
6017
.
 
6018
.
 
6019
.\" NS doc-have-author global register (bool)
 
6020
.\" NS   set in `An'
 
6021
.
 
6022
.nr doc-have-author 0
 
6023
.
 
6024
.
 
6025
.\" NS An user macro
 
6026
.\" NS   author name
 
6027
.\" NS
 
6028
.\" NS modifies:
 
6029
.\" NS   doc-arg-ptr
 
6030
.\" NS   doc-curr-font
 
6031
.\" NS   doc-curr-size
 
6032
.\" NS   doc-have-author
 
6033
.\" NS   doc-macro-name
 
6034
.\" NS
 
6035
.\" NS width register `An' set in doc-common
 
6036
.
 
6037
.de An
 
6038
.  if !\n[doc-arg-limit] \{\
 
6039
.    ie \n[.$] \{\
 
6040
.      ie        "\$1"-nosplit" \
 
6041
.        nr doc-in-authors-section 0
 
6042
.      el \{ .ie "\$1"-split" \
 
6043
.        nr doc-in-authors-section 1
 
6044
.      el \{\
 
6045
.        ds doc-macro-name An
 
6046
.        doc-parse-args \$@
 
6047
.    \}\}\}
 
6048
.    el \{\
 
6049
.      tm1 "Usage: .An {-nosplit | -split}
 
6050
.      tm1         .An author_name ... (#\n[.c])
 
6051
.  \}\}
 
6052
.
 
6053
.  if \n[doc-in-authors-section] \{\
 
6054
.    ie \n[doc-have-author] \
 
6055
.      br
 
6056
.    el \
 
6057
.      nr doc-have-author 1
 
6058
.  \}
 
6059
.
 
6060
.  if \n[doc-arg-limit] \{\
 
6061
.    nr doc-arg-ptr +1
 
6062
.    ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
 
6063
.      nr doc-curr-font \n[.f]
 
6064
.      nr doc-curr-size \n[.ps]
 
6065
.      doc-print-recursive
 
6066
.    \}
 
6067
.    el \{\
 
6068
.      tm Usage: .An author_name ... (#\n[.c])
 
6069
.      doc-reset-args
 
6070
.  \}\}
 
6071
..
 
6072
.
 
6073
.
 
6074
.\" NS Rv user macro
 
6075
.\" NS   return values
 
6076
.\" NS
 
6077
.\" NS width register `Rv' set in doc-common
 
6078
.\" NS
 
6079
.\" NS local variables:
 
6080
.\" NS   doc-str-Rv-prefix
 
6081
.\" NS   doc-str-Rv-suffix
 
6082
.
 
6083
.ds doc-str-Rv-prefix "The
 
6084
.ds doc-str-Rv-suffix "function returns the value\~0 if successful;
 
6085
.as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
 
6086
.as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
 
6087
.as doc-str-Rv-suffix " is set to indicate the error.
 
6088
.
 
6089
.de Rv
 
6090
.
 
6091
.\" XXX: what does this function without `-std'?
 
6092
.
 
6093
.  if \n[doc-arg-limit] \{\
 
6094
.    tm Usage: .Rv not callable by other macros (#\n[.c])
 
6095
.    doc-reset-args
 
6096
.    return
 
6097
.  \}
 
6098
.
 
6099
.  if !\n[.$] \{\
 
6100
.    tm Usage: .Rv [-std] <function> (#\n[.c])
 
6101
.    return
 
6102
.  \}
 
6103
.
 
6104
.  if "\$1"-std" \{\
 
6105
.    nr doc-reg-Rv \*[doc-section]
 
6106
.    if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
 
6107
.      tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
 
6108
.    br
 
6109
.    nop \)\*[doc-str-Rv-prefix]
 
6110
.    Fn \$2
 
6111
.    nop \)\*[doc-str-Rv-suffix]
 
6112
.  \}
 
6113
..
 
6114
.
 
6115
.
 
6116
.\" NS Mt user macro
 
6117
.\" NS   mailto (for conversion to HTML)
 
6118
.
 
6119
.de Mt
 
6120
.  \" XXX: error handling missing
 
6121
.  Pa \$@
 
6122
..
 
6123
.
 
6124
.
 
6125
.\" NS Lk user macro
 
6126
.\" NS   link (for conversion to HTML)
 
6127
.\" NS
 
6128
.\" NS local variables:
 
6129
.\" NS   doc-reg-Lk
 
6130
.\" NS   doc-str-Lk
 
6131
.
 
6132
.de Lk
 
6133
.  ds doc-str-Lk Sy \$@
 
6134
.
 
6135
.  ie (\n[.$] > 1) \{\
 
6136
.    doc-get-arg-type \$2
 
6137
.    ie (\n[doc-arg-type] < 3) \{\
 
6138
.      Em \)\$2:
 
6139
.      ds doc-str-Lk Sy "\$1"
 
6140
.      doc-get-width "\$1"
 
6141
.      shift 2
 
6142
.      if \n[.$] \
 
6143
.        as doc-str-Lk " \$@
 
6144
.    \}
 
6145
.    el \
 
6146
.      doc-get-width "\$1"
 
6147
.  \}
 
6148
.  el \
 
6149
.    doc-get-width "\$1"
 
6150
.
 
6151
.  ie n \
 
6152
.    nr doc-reg-Lk 26
 
6153
.  el \
 
6154
.    nr doc-reg-Lk 38
 
6155
.  ie (\n[doc-width] >= \n[doc-reg-Lk]) \
 
6156
.    D1 \*[doc-str-Lk]
 
6157
.  el \
 
6158
.    \*[doc-str-Lk]
 
6159
..
 
6160
.
 
6161
.
 
6162
.\" NS doc-defunct-macro macro
 
6163
.\" NS   this is the skeleton for defunct macros
 
6164
.\" NS
 
6165
.
 
6166
.de doc-defunct-macro
 
6167
.  tmc mdoc error: .\$0 defunct
 
6168
.  if d doc-\$0-usage \
 
6169
.    tmc , \*[doc-\$0-usage]
 
6170
.  tm1 " (#\n[.c])
 
6171
..
 
6172
.
 
6173
.
 
6174
.\" obsolete macros
 
6175
.
 
6176
.als Db doc-defunct-macro
 
6177
.
 
6178
.als Ds doc-defunct-macro
 
6179
.
 
6180
.als Ex doc-defunct-macro
 
6181
.ds doc-Ex-usage use .D1
 
6182
.
 
6183
.als Or doc-defunct-macro
 
6184
.ds doc-Or-usage use `|'
 
6185
.
 
6186
.als Sf doc-defunct-macro
 
6187
.ds doc-Sf-usage use .Pf or .Ns
 
6188
.
 
6189
.
 
6190
.rn em e@
 
6191
.
 
6192
.de em
 
6193
.  tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
 
6194
.  tm1 "            Should this have been `.Em ...'?
 
6195
.  ab
 
6196
..
 
6197
.
 
6198
.
 
6199
.\" NS doc-empty-line macro
 
6200
.\" NS   emit warning and print empty line
 
6201
.
 
6202
.de doc-empty-line
 
6203
.  if !\n[doc-display-depth] \
 
6204
.    tm mdoc warning: Empty input line #\n[.c]
 
6205
.  sp
 
6206
..
 
6207
.
 
6208
.blm doc-empty-line
 
6209
.
 
6210
.
 
6211
.ec
 
6212
.
 
6213
.
 
6214
.\" load local modifications
 
6215
.mso mdoc.local
 
6216
.
 
6217
.\" EOF