1 .\" Define the PSPIC macro.
2 .\" When used other than with -Tps, it will draw a box around where
3 .\" the picture would go.
6 .if \\n[ps-nargs]=4 \{\
15 .sy echo .ps-bb `psbb \\$1` >/tmp/psbb\\n[$$]
17 .if \\n[ps-nargs]=4 \{\
18 . nr ps-wid (\\n[ps-urx]-\\n[ps-llx])
19 . nr ps-ht (\\n[ps-ury]-\\n[ps-lly])
20 . if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
21 . if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
22 . ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
23 . el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p
24 . ie \\n[.$]>=3 .nr ps-desht (i;\\$3)
25 . el .nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\
27 . ne \\n[ps-desht]u+1v
28 . nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2
29 . ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht]
30 . el .ds ps-desht \" empty
33 \Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
35 \v'\\n[ps-desht]u'\X'ps: import \\$1 \
36 \\n[ps-llx] \\n[ps-lly] \\n[ps-urx] \\n[ps-ury] \\n[ps-deswid] \\*[ps-desht]'
40 .sy rm /tmp/psbb\\n[$$]