diff options
author | wkj <devnull@localhost> | 2004-05-16 07:54:22 +0000 |
---|---|---|
committer | wkj <devnull@localhost> | 2004-05-16 07:54:22 +0000 |
commit | b855148c9b6d28fedfd083d037bcf246f1913d92 (patch) | |
tree | 0075eb6ea37427fa48b78cb937fabc04175cead1 /src/cmd/postscript/psfiles/unbind.ps | |
parent | 61f5c35c9465f0702739b41249a664d409f0482c (diff) | |
download | plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.tar.gz plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.tar.bz2 plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.zip |
Checkpoint.
Diffstat (limited to 'src/cmd/postscript/psfiles/unbind.ps')
-rw-r--r-- | src/cmd/postscript/psfiles/unbind.ps | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/postscript/psfiles/unbind.ps b/src/cmd/postscript/psfiles/unbind.ps new file mode 100644 index 00000000..98e6283e --- /dev/null +++ b/src/cmd/postscript/psfiles/unbind.ps @@ -0,0 +1,28 @@ +% +% Unbind the operators in an executable array or packedarray. Leaves the +% unbound array or the original object on the stack. +% + +/unbind { + 0 index xcheck + 1 index type /arraytype eq + 2 index type /packedarraytype eq or and { + dup length array copy cvx + dup 0 exch { + dup type /operatortype eq { + ( ) cvs cvn cvx + } if + + 0 index xcheck + 1 index type /arraytype eq + 2 index type /packedarraytype eq or and { + unbind + } if + + 3 copy put pop + 1 add + } forall + pop + } if +} def + |