From b855148c9b6d28fedfd083d037bcf246f1913d92 Mon Sep 17 00:00:00 2001 From: wkj Date: Sun, 16 May 2004 07:54:22 +0000 Subject: Checkpoint. --- src/cmd/postscript/psfiles/unbind.ps | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/cmd/postscript/psfiles/unbind.ps (limited to 'src/cmd/postscript/psfiles/unbind.ps') 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 + -- cgit v1.2.3