summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2018-08-28 09:55:48 +0100
committerChris Liddell <chris.liddell@artifex.com>2018-08-28 09:55:48 +0100
commit5b5536fa88a9e885032bc0df3852c3439399a5c0 (patch)
treed766e1597c9fbf02178d881c815f10432a790727
parentc9b362ba908ca4b1d7c72663a33229588012d7d9 (diff)
downloadghostpdl-5b5536fa88a9e885032bc0df3852c3439399a5c0.tar.gz
Remove gssetresolution/gsgetresolution
These are non-standard, and never used, so remove them. Also rejig gsgetdeviceprop, rename to .gsgetdeviceprop and undefine it after it's used. For the only other use of gsgetdeviceprop, replace with a special_op call.
-rw-r--r--Resource/Init/gs_init.ps28
-rw-r--r--Resource/Init/gs_setpd.ps4
2 files changed, 12 insertions, 20 deletions
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
index 90d68c7ee..aa4aaa630 100644
--- a/Resource/Init/gs_init.ps
+++ b/Resource/Init/gs_init.ps
@@ -767,23 +767,6 @@ userdict /.currentresourcefile //null put
{ /run .systemvar exec } .execasresource
} bind def
-% Define procedures for getting and setting the current device resolution.
-
-/gsgetdeviceprop % <device> <propname> gsgetdeviceprop <value>
- { 2 copy mark exch //null .dicttomark .getdeviceparams
- dup mark eq % if true, not found
- { pop dup /undefined signalerror }
- { 5 1 roll pop pop pop pop }
- ifelse
- } bind def
-/gscurrentresolution % - gscurrentresolution <[xres yres]>
- { currentdevice /HWResolution gsgetdeviceprop
- } bind def
-/gssetresolution % <[xres yres]> gssetresolution -
- { 2 array astore mark exch /HWResolution exch
- currentdevice copydevice putdeviceprops setdevice
- } bind def
-
% Define auxiliary procedures needed for the above.
/shellarguments % -> shell_arguments true (or) false
{ /ARGUMENTS where
@@ -1521,6 +1504,14 @@ setpacking
dup 150 lt //systemdict /DITHERPPI known not and
} bind def
+/.gsgetdeviceprop % <device> <propname> gsgetdeviceprop <value>
+ { 2 copy mark exch //null .dicttomark .getdeviceparams
+ dup mark eq % if true, not found
+ { pop dup /undefined signalerror }
+ { 5 1 roll pop pop pop pop }
+ ifelse
+ } bind def
+
% The following implementation uses LL2 extensions, but only in stopped
% contexts so that with LL1, the .set??reshalftone will be used.
%
@@ -1528,7 +1519,7 @@ setpacking
% false
/.getdefaulthalftone {
% try the device to see if it has a default halftone
- { currentdevice /HalftoneDefault gsgetdeviceprop } .internalstopped
+ { currentdevice /HalftoneDefault //.gsgetdeviceprop exec } .internalstopped
{ pop pop //false } % no device property
{ dup type /dicttype eq { //true } { pop //false } ifelse }
ifelse
@@ -1541,6 +1532,7 @@ setpacking
}
if
} bind def
+currentdict /.gsgetdeviceprop .forceundef
/.setdefaulthalftone {
.getdefaulthalftone
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
index 0fc72300f..4cdfdc0e1 100644
--- a/Resource/Init/gs_setpd.ps
+++ b/Resource/Init/gs_setpd.ps
@@ -204,8 +204,8 @@ level2dict begin
mark
% First put the device's default page size in slot 0
% This satifies those that have devices built with a4 as the default
- 0 mark /PageSize currentdevice /PageSize gsgetdeviceprop .dicttomark
-
+ 0 mark /PageSize /GetDeviceParam .special_op
+ not {/setpagedevice .systemvar /configurationerror signalerror} if .dicttomark
% Only populate the other entries if we aren't FIXEDMEDIA
FIXEDMEDIA not {
statusdict /.pagetypenames get {