diff options
author | rsc <devnull@localhost> | 2004-05-15 23:45:13 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-05-15 23:45:13 +0000 |
commit | 13f7391e4a38634221f4a63da9f58f58473e77b0 (patch) | |
tree | 65b538843c8fbfbb5000de18ad6145ce82531781 /postscript/prologues/unbind.ps | |
parent | 36a9115fcbe8ddb0baacc07f8c33add9a9f7b307 (diff) | |
download | plan9port-13f7391e4a38634221f4a63da9f58f58473e77b0.tar.gz plan9port-13f7391e4a38634221f4a63da9f58f58473e77b0.tar.bz2 plan9port-13f7391e4a38634221f4a63da9f58f58473e77b0.zip |
More files!
Diffstat (limited to 'postscript/prologues/unbind.ps')
-rw-r--r-- | postscript/prologues/unbind.ps | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/postscript/prologues/unbind.ps b/postscript/prologues/unbind.ps new file mode 100644 index 00000000..98e6283e --- /dev/null +++ b/postscript/prologues/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 + |