[gs-cvs] rev 7233 - trunk/gs/lib
lpd at ghostscript.com
lpd at ghostscript.com
Thu Nov 30 09:11:56 PST 2006
Author: lpd
Date: 2006-11-30 09:11:55 -0800 (Thu, 30 Nov 2006)
New Revision: 7233
Modified:
trunk/gs/lib/gs_lev2.ps
Log:
Fixes bug: In case of an error, setvmreclaim and setvmthreshold reported an
error in setuserparams rather than the correct operator.
Modified: trunk/gs/lib/gs_lev2.ps
===================================================================
--- trunk/gs/lib/gs_lev2.ps 2006-11-30 07:48:31 UTC (rev 7232)
+++ trunk/gs/lib/gs_lev2.ps 2006-11-30 17:11:55 UTC (rev 7233)
@@ -125,7 +125,9 @@
/currentuserparams { % - currentuserparams <dict>
/userparams .systemvar dup length dict .copydict
} odef
-/setuserparams { % <dict> setuserparams -
+% We break out setuserparams into a separate procedure so that setvmxxx
+% can use it without affecting the command in case of an error.
+/.setuserparams2 {
% Check that we will be able to set the PostScript-level
% user parameters.
/setuserparams /psuserparams .systemvar .checksetparams
@@ -162,6 +164,9 @@
% Set them again to the new values. From here on, we are safe,
% since a context switch will consult userparams.
.setuserparams
+} .bind def
+/setuserparams { % <dict> setuserparams -
+ .setuserparams2
} .bind odef
% Initialize user parameters managed here.
/JobName () .definepsuserparam
@@ -403,13 +408,13 @@
% VMReclaim and VMThreshold are user parameters.
/setvmthreshold { % <int> setvmthreshold -
- mark /VMThreshold 2 .argindex .dicttomark setuserparams pop
+ mark /VMThreshold 2 .argindex .dicttomark .setuserparams2 pop
} odef
/vmreclaim { % <int> vmreclaim -
dup 0 gt {
.vmreclaim
} {
- mark /VMReclaim 2 index .dicttomark setuserparams pop
+ mark /VMReclaim 2 index .dicttomark .setuserparams2 pop
} ifelse
} odef
-1 setvmthreshold
More information about the gs-cvs
mailing list