[gs-cvs] rev 7145 - trunk/gs/lib

alexcher at ghostscript.com alexcher at ghostscript.com
Tue Oct 31 16:44:39 PST 2006


Author: alexcher
Date: 2006-10-31 16:44:39 -0800 (Tue, 31 Oct 2006)
New Revision: 7145

Modified:
   trunk/gs/lib/gs_res.ps
Log:
Make resourcestatus throw typecheck when resource category is not a name.
Partial fix for CET 23-26.ps, page 4.


Modified: trunk/gs/lib/gs_res.ps
===================================================================
--- trunk/gs/lib/gs_res.ps	2006-10-31 23:21:22 UTC (rev 7144)
+++ trunk/gs/lib/gs_res.ps	2006-11-01 00:44:39 UTC (rev 7145)
@@ -212,8 +212,13 @@
 } bind odef
 /resourcestatus {	% <key> <category> resourcestatus <status> <size> true
 			% <key> <category> resourcestatus false
-	2 copy .findcategory /ResourceStatus .resourceexec
-	 { 4 2 roll pop pop true } { pop pop false } ifelse
+  dup type /nametype ne {
+    % CET 23-26 wants typecheck here, not undefineresource that happens
+    % without the check.
+    /resourcestatus .systemvar /typecheck signalerror
+  } if
+  2 copy .findcategory /ResourceStatus .resourceexec
+  { 4 2 roll pop pop true } { pop pop false } ifelse
 } bind odef
 /undefineresource {	% <key> <category> undefineresource -
 	2 copy .findcategory /UndefineResource .resourceexec pop pop



More information about the gs-cvs mailing list