[gs-cvs] gs/lib
Ray Johnston
ray at casper.ghostscript.com
Wed Aug 28 22:41:32 PDT 2002
Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv924/lib
Modified Files:
gs_setpd.ps
Log Message:
Merge page device Policies from the driver and defaults during the
device initialization to avoid duplication of code for default
policies in the driver (no devices yet do this). Previously, the whole
/Policies dictionary was replaced forcing the driver to duplicate code.
Improvement developed by Alex Cherepanov.
Index: gs_setpd.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_setpd.ps,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gs_setpd.ps 28 Aug 2002 14:32:28 -0000 1.14
+++ gs_setpd.ps 29 Aug 2002 05:41:30 -0000 1.15
@@ -222,7 +222,21 @@
.currentglobal exch dup gcheck .setglobal
.requiredattrs {
2 index 2 index known {
- pop pop
+ 1 index /Policies eq {
+ % Merge policies from the device driver with defaults
+ 2 index % <<>> /key value <<>>
+ 3 2 roll get % <<>> value <<policies>>
+ exch {
+ 2 index 2 index known {
+ pop pop
+ } {
+ 2 index 3 1 roll put
+ } ifelse
+ } forall
+ pop
+ } {
+ pop pop
+ } ifelse
} {
exec 2 index 3 1 roll put
} ifelse
More information about the gs-cvs
mailing list