shithub: riscv

ref: 1b09060f468f530af2f4ef75441a40084e912e54
dir: /sys/lib/postscript/prologues/unbind.ps/

View raw version
%
% 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