Replaced specific checks for function declarations with a generic
[s-roff.git] / tmac / tmac.an
blob7d1224d390f5e8e311516e1bcf3c9bcbc1f8f61c
1 .\" Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
2 .\"      Written by James Clark (jjc@jclark.com)
3 .\"
4 .\" This file is part of groff.
5 .\"
6 .\" groff is free software; you can redistribute it and/or modify it under
7 .\" the terms of the GNU General Public License as published by the Free
8 .\" Software Foundation; either version 2, or (at your option) any later
9 .\" version.
10 .\"
11 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 .\" for more details.
15 .\"
16 .\" You should have received a copy of the GNU General Public License along
17 .\" with groff; see the file COPYING.  If not, write to the Free Software
18 .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 .\"
20 .\"  -rC1 => number pages continuously, rather than start each at 1
21 .\"  -rD1 => double-sided printing, ie different odd and even page footers
22 .\"  -rPnnn => number first page nnn
23 .\"  -rSxx => use size `xx'pt (either 10, 11, or 12) for document rather
24 .\"           than the default size of 10pt
25 .\"  -rXnnn => number pages after nnn as nnna, nnnb, nnnc, ...
26 .\"
27 .\" The file man.local is loaded at the end.  Put local additions there.
28 .\" If you need to add things to TH, use `.am TH'.
29 .\"
31 .if !\n(.g .ab These man macros work only with groff.
33 .nr _C \n(.C
34 .cp 0
36 .if !rD .nr D 0
37 .if !rC .nr C 0
38 .if !rS .nr S 10
39 .if rP .pn 0\nP
41 .de set-an-margin
42 .  nr an-margin \\n[IN]
45 .\" .TH title section extra1 extra2 extra3
46 .de TH
47 .  cp 0
49 .  de an-init \" We have to do it like this to get multiple man pages right.
50 .    ds an-title "\\$1
51 .    ds an-section "\\$2
52 .    ds an-extra1 "\\$3
53 .    ie \\n[.$]>3 .ds an-extra2 "\\$4
54 .    el           .ds an-extra2 \"Sun Release 4.0
55 .    ie \\n[.$]>4 .ds an-extra3 "\\$5
56 .    el           .ds an-extra3 \"System Programmer's Manual
57 .    ds an-init
58 \\..
60 .  DT
62 .\" use sizes similar to LaTeX
63 .  ie (\\nS == 11) \{\
64 .    nr PS    10.95z
65 .    nr PS-SS 10.95z
66 .    nr PS-SH 12z
67 .    nr VS    13.6p
68 .  \}
69 .  el \{\
70 .    ie (\\nS == 12) \{\
71 .      nr PS    12z
72 .      nr PS-SS 12z
73 .      nr PS-SH 14.4z
74 .      nr VS    14.5p
75 .    \}
76 .    el \{\
77 .      nr PS    10z \" default point size
78 .      nr PS-SS 10z
79 .      nr PS-SH 10.95z
80 .      nr VS    12p
81 .    \}
82 .  \}
84 .  ps \\n[PS]u
85 .  vs \\n[VS]u
87 .  ie '\*(.T'html' .nr IN 1.2i
88 .  el              .nr IN 7.2n
89 .  nr LL 6.5i
90 .  PD
91 .  nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
92 .  nr an-level 1
93 .  set-an-margin
94 .  nr an-prevailing-indent \\n[IN]
95 .  nr an-tag-sep 1n
97 .  nr an-no-space-flag 0
98 .  nr an-break-flag 0
99 .  nr an-div? 0
101 .  wh 0 an-header
102 .  wh -1i an-footer
103 .  wh -.5i an-p-footer
105 .  if (\\n[nl] > 0) \{\
106 .    ie \\nC .bp (\\n% + 1)
107 .    el      .bp 1
108 .  \}
111 .de DT
112 .  ta T .5i \" This sets tabs every .5 inches
115 .de PD
116 .  ie \\n[.$] .nr PD (v;\\$1)
117 .  el         .nr PD (.4v >? \n[.V])
120 .de an-header
121 .  an-init
122 .  ev 1
123 .  ps \\n[PS]u
124 .  vs \\n[VS]u
125 .  ie '\*(.T'html' \
126 .    tl ''''
127 .  el \{\
128 .    sp .5i
129 .    tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
130 .    sp |1i
131 .  \}
132 .  ev
133 .  ns
136 .de an-footer
137 '  bp
140 .af an-page-letter a
142 .de an-p-footer
143 .  ev 1
144 .  ps \\n[PS]u
145 .  vs \\n[VS]u
146 .  ie '\*(.T'html' \{\
147 .    ds an-page-string "
148 .    ds an-extra1      "
149 .    ds an-extra2      "
150 .  \}
151 .  el \
152 .    ds an-page-string \\n%
153 .  if rX \{\
154 .    if (\\n% > \\nX) \{\
155 .      nr an-page-letter (\\n% - \\nX)
156 .      ds an-page-string \\nX\\n[an-page-letter]
157 .    \}
158 .  \}
159 .  ie '\*(.T'html' \
160 .    tl ''''
161 .  el \{\
162 .    ie \\nD \{\
163 .      if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
164 .      if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
165 .    \}
166 .    el \
167 .      tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
168 .  \}
169 .  ev
172 .de SH
173 .  sp \\n[PD]u
174 .  nr an-level 1
175 .  set-an-margin
176 .  nr an-prevailing-indent \\n[IN]
177 .  fi
178 .  in \\n[an-margin]u
179 .  ti 0
180 .  it 1 an-trap
181 .  nr an-no-space-flag 1
182 .  nr an-break-flag 1
183 .  ps \\n[PS-SH]u
184 .  ft B
185 .  ne (2v + 1u)
186 .  if \\n[.$] \&\\$*
189 .de SS
190 .  sp \\n[PD]u
191 .  nr an-level 1
192 .  set-an-margin
193 .  nr an-prevailing-indent \\n[IN]
194 .  fi
195 .  in \\n[IN]u
196 .  ti \\n[SN]u
197 .  it 1 an-trap
198 .  nr an-no-space-flag 1
199 .  nr an-break-flag 1
200 .  ps \\n[PS-SS]u
201 .  ft B
202 .  ne (2v + 1u)
203 .  if \\n[.$] \&\\$*
206 .de B
207 .  it 1 an-trap
208 .  ft B
209 .  if \\n[.$] \&\\$*
212 .de I
213 .  it 1 an-trap
214 .  ft I
215 .  if \\n[.$] \&\\$*
218 .de SM
219 .  it 1 an-trap
220 .  ps -1
221 .  if \\n[.$] \&\\$*
224 .de SB
225 .  it 1 an-trap
226 .  ps -1
227 .  ft B
228 .  if \\n[.$] \&\\$*
231 .de TP
232 .  sp \\n[PD]u
233 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
234 .  it 1 an-trap
235 .  if !\\n[an-div?] .di an-div
236 .  in 0
237 .  nr an-div? 1
240 .de an-trap
241 .  ft R
242 .  ps \\n[PS]u
243 .  vs \\n[VS]u
244 .  if \\n[an-break-flag] \{\
245 .    br
246 .    nr an-break-flag 0
247 .  \}
248 .  if \\n[an-no-space-flag] \{\
249 .    ns
250 .    nr an-no-space-flag 0
251 .  \}
252 .  if \\n[an-div?] .an-do-tag
255 .de an-do-tag
256 .  nr an-div? 0
257 .  br
258 .  di
259 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
260 .    in \\n[an-margin]u
261 .    ne (2v + 1u)
262 .    an-div
263 .    br
264 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
265 .  \}
266 .  el \{\
267 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
268 .    ti -\\n[an-prevailing-indent]u
269 .    chop an-div
270 .    ne (1v + 1u)
271 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
272 .  \}
275 .de LP
276 .  br
277 .  sp \\n[PD]u
278 .  ps \\n[PS]u
279 .  vs \\n[VS]u
280 .  ft R
281 .  in \\n[an-margin]u
282 .  nr an-prevailing-indent \\n[IN]
285 .als PP LP
286 .als P LP
288 .de IP
289 .  ie !\\n[.$] \{\
290 .    ps \\n[PS]u
291 .    vs \\n[VS]u
292 .    ft R
293 .    sp \\n[PD]u
294 .    ne (1v + 1u)
295 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
296 .  \}
297 .  el \{\
298 .    ie (\\n[.$] - 1) .TP "\\$2"
299 .    el               .TP
300 \&\\$1
301 .  \}
304 .de HP
305 .  ps \\n[PS]u
306 .  vs \\n[VS]u
307 .  ft R
308 .  sp \\n[PD]u
309 .  ne (1v + 1u)
310 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
311 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
312 .  ti \\n[an-margin]u
315 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
317 .de RI
318 .  if \\n[.$] \{\
319 .    ds an-result \&\\$1
320 .    shift
321 .    while (\\n[.$] >= 2) \{\
322 .      as an-result \,\fI\\$1\fR\/\\$2\\*[an-empty]
323 .      shift 2
324 .    \}
325 .    if \\n[.$] .as an-result \,\fI\\$1\fR
326 \\*[an-result]
327 .  \}
330 .de IR
331 .  if \\n[.$] \{\
332 .    ds an-result \&\fI\\$1\fR
333 .    shift
334 .    while (\\n[.$] >= 2) \{\
335 .      as an-result \/\\$1\fI\,\\$2\fR
336 .      shift 2
337 .    \}
338 .    if \\n[.$] .as an-result \/\\$1
339 \\*[an-result]
340 .  \}
343 .de IB
344 .  if \\n[.$] \{\
345 .    ds an-result \&\fI\\$1
346 .    shift
347 .    while (\\n[.$] >= 2) \{\
348 .      as an-result \/\fB\\$1\fI\,\\$2\\*[an-empty]
349 .      shift 2
350 .    \}
351 .    if \\n[.$] .as an-result \/\fB\\$1
352 \\*[an-result]
353 .    ft R
354 .  \}
357 .de BI
358 .  if \\n[.$] \{\
359 .    ds an-result \&\fB\\$1
360 .    shift
361 .    while (\\n[.$] >= 2) \{\
362 .      as an-result \,\fI\\$1\fB\/\\$2\\*[an-empty]
363 .      shift 2
364 .    \}
365 .    if \\n[.$] .as an-result \,\fI\\$1
366 \\*[an-result]
367 .    ft R
368 .  \}
371 .de RB
372 .  ds an-result \&
373 .  while (\\n[.$] >= 2) \{\
374 .    as an-result \fR\\$1\fB\\$2\\*[an-empty]
375 .    shift 2
376 .  \}
377 .  if \\n[.$] .as an-result \fR\\$1
378 \\*[an-result]
379 .  ft R
382 .de BR
383 .  ds an-result \&
384 .  while (\\n[.$] >= 2) \{\
385 .    as an-result \fB\\$1\fR\\$2\\*[an-empty]
386 .    shift 2
387 .  \}
388 .  if \\n[.$] .as an-result \fB\\$1
389 \\*[an-result]
390 .  ft R
393 .de RS
394 .  br
395 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
396 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
397 .  ie \\n[.$] .nr an-margin +(n;\\$1)
398 .  el         .nr an-margin +\\n[an-prevailing-indent]
399 .  in \\n[an-margin]u
400 .  nr an-prevailing-indent \\n[IN]
401 .  nr an-level +1
404 .de RE
405 .  br
406 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
407 .  el         .nr an-level -1
408 .  nr an-level (1 >? \\n[an-level])
409 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
410 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
411 .  in \\n[an-margin]u
414 .ds S \s[\\n[PS]]
415 .ie c\[rg] .ds R \[rg]
416 .el        .ds R (Reg.)
417 .ie c\[tm] .ds Tm \[tm]
418 .el        .ds Tm (TM)
419 .ds lq \(lq
420 .ds rq \(rq
422 .hy 14
424 .\" Load local modifications.
425 .mso man.local
427 .cp \n(_C
429 .\" end of tmac.an