stdio based version; brace glob fix; builtin prototypes
[unix-history] / usr / src / share / me / float.me
CommitLineData
84f25a89 1.nr _0 \n(c.
0a1cd3e4 2.\" Copyright (c) 1988 The Regents of the University of California.
70e37822
KB
3.\" All rights reserved.
4.\"
2791ff57 5.\" %sccs.include.redist.roff%
0a1cd3e4 6.\"
2791ff57 7.\" @(#)float.me 5.1 (Berkeley) %G%
0a1cd3e4 8.\"
a3fd506b 9.\" %beginstrip%
70e37822 10.\"
84f25a89 11.de (z \" *** begin floating keep
799e5a57 12.if \n@>4 .tm >> (z, .z=\n(.z
84f25a89
EA
13.@D 4 \\$1 \\$2
14.@(
15.nr ?T 0
16..
17.de )z \" *** end floating keep
799e5a57 18.if \n@>4 .tm >> )z, .z=\n(.z
84f25a89
EA
19.sp \\n(zsu
20.@)
799e5a57 21.if \n@>4 .tm -- )z << @), .z=\n(.z
84f25a89
EA
22.rr _0
23.if !\\n(?b \
24. nr dn +(\\n(ppu*\\n($ru)/2u+\\n(zsu
dd61075d 25.nr dl -\n(.H \" fudge factor necessary to make it work
9271e56c 26.ie ((\\n(dn+\n(.V)>=\\n(.t):(\\n(?a):((\\n(dl>\\n($l)&(\\n($c>1)) \
84f25a89
EA
27\{\
28. nr ?a 1
9271e56c
EA
29. if (\\n(dl>\\n($l)&(\\n($m>1) \
30. nr ?w 1 \" mark wider than one column (top)
84f25a89
EA
31. ds |x |t
32.\}
33.el \
34\{\
35. nr ?b 1
9271e56c
EA
36. if (\\n(dl>\\n($l)&(\\n($m>1) \
37. nr ?W 1 \" mark wider than one column (bottom)
84f25a89
EA
38. nr _b +\\n(dnu
39. ch @f -\\n(_bu
40. ds |x |b
41.\}
42.da \\*(|x \" copy to save macro
43.nf
44.ls 1
45.nr ?k 1
799e5a57 46.if \n@>4 .tm -- )z >> \\*(|x
84f25a89 47\!.if \\\\n(nl>(\\\\n(tm+2v) .ne \\n(dnu-\\n(zsu
799e5a57 48.|k\" \" and the body
84f25a89 49.ec
799e5a57 50.if \n@>4 .tm -- )z << \\*(|x, .z=\\n(.z
84f25a89 51.nr ?k 0
799e5a57 52.rm |k\" \" remove the temp macro
84f25a89
EA
53.da
54.in 0
55.ls 1
56.xl \\n($lu
57.ev
799e5a57 58.if \n@>4 .tm << )z, .z=\\n(.z
84f25a89
EA
59..
60.de @k \" --- output floating keep
799e5a57 61.if \n@>4 .tm >> @k, $1=\\$1, .z=\\n(.z
84f25a89
EA
62.ev 1
63.nf
64.ls 1
65.in 0
66.sp \\n(zsu
67.\\$1
68.ec
69.br
70.rm \\$1
71.ev
72.nr ?T 0
73..
74.nr c. \n(_0