summaryrefslogtreecommitdiff
path: root/gs/lib/gs_init.ps
diff options
context:
space:
mode:
Diffstat (limited to 'gs/lib/gs_init.ps')
-rw-r--r--gs/lib/gs_init.ps24
1 files changed, 12 insertions, 12 deletions
diff --git a/gs/lib/gs_init.ps b/gs/lib/gs_init.ps
index fd88b3f86..f54b8b7ff 100644
--- a/gs/lib/gs_init.ps
+++ b/gs/lib/gs_init.ps
@@ -265,6 +265,7 @@ QUIET not { printgreeting flush } if
% Define a special version of def for storing local objects into global
% dictionaries. Like .forceput, this exists only during initialization.
/.forcedef { % <key> <value> .forcedef -
+ 1 .argindex pop % check # of args
currentdict 3 1 roll .forceput
} .bind odef
@@ -379,7 +380,7 @@ userdict /#copies 1 put
.beginpage
} odef
/currentmatrix {
- .currentmatrix 6 index astore pop
+ .currentmatrix 6 .argindex astore pop
} odef
% .currentnumcopies is redefined in Level 2.
/.currentnumcopies { #copies } odef
@@ -446,7 +447,7 @@ userdict /.echo.mode true put
} loop
} bind def
/filter
- { //filterdict 1 index .knownget
+ { //filterdict 1 .argindex .knownget
{ exch pop exec }
{ /filter .systemvar /undefined signalerror }
ifelse
@@ -515,7 +516,7 @@ userdict /.echo.mode true put
} bind def
% The following is only for compatibility with Adobe interpreters.
/setdash {
- 1 index length 11 gt { /setdash .systemvar /limitcheck signalerror } if
+ 1 .argindex length 11 gt { /setdash .systemvar /limitcheck signalerror } if
//setdash
} odef
/setdevice
@@ -569,7 +570,7 @@ odef
% should use .internalstopped to avoid setting newerror et al.
/.internalstopped { //null 1 .stopped //null ne } bind def
/store { % Don't alter operands before completing.
- 1 index where { 2 index 2 index put pop pop } { def } ifelse
+ 1 .argindex where { 2 index 2 index put pop pop } { def } ifelse
} odef
/.typenames mark .typenames counttomark packedarray exch pop def
/type {
@@ -582,7 +583,7 @@ currentdict /.typenames .undef
/.wheredict 10 dict def
/.where /where load def
/where {
- //.wheredict 1 index .knownget { exec } { .where } ifelse
+ //.wheredict 1 .argindex .knownget { exec } { .where } ifelse
} odef
% internaldict is defined in systemdict, but the dictionary is allocated
@@ -1953,10 +1954,6 @@ readonly def
} .bind executeonly odef
/deletefile {
- count 1 lt {
- //deletefile /stackunderflow signalerror
- }
- if
dup { deletefile } stopped {
pop //deletefile $error /errorname get signalerror
} {
@@ -1975,7 +1972,7 @@ readonly def
% the file can be deleted later, even if SAFER is set.
/.tempfile {
.tempfile % filename file
- //SAFETY /tempfiles get 2 index true .forceput
+ //SAFETY /tempfiles get 2 .argindex true .forceput
} .bind executeonly odef
% If we are running in SAFER mode, lock things down
@@ -2071,7 +2068,8 @@ currentdict /INTERPOLATE known not { (%END INTERPOLATE) .skipeof } if
{ .currentglobal % w h bit [] {}...{} multi ncomp glob
//false .setglobal
9 dict begin % w h bit [] {}...{} multi ncomp glob
- 2 index { 1 index 7 add } { 8 } ifelse
+ 2 .argindex { 1 index 7 add } { 8 } ifelse
+ dup .argindex pop % check # of arguments
copy gsave pop % preserve the arguments
{ 0 /DeviceGray 0 /DeviceRGB /DeviceCMYK }
1 index get setcolorspace % ... glob w h bit [] {}...{} multi ncomp
@@ -2113,7 +2111,8 @@ currentdict /INTERPOLATE known not { (%END INTERPOLATE) .skipeof } if
image
}
{ /INTERPOLATE .systemvar
- { .currentglobal //false .setglobal
+ { 4 .argindex pop % check # of args
+ .currentglobal //false .setglobal
8 dict begin .setglobal
/ImageType 1 def
/DataSource 1 index def
@@ -2139,6 +2138,7 @@ currentdict /INTERPOLATE known not { (%END INTERPOLATE) .skipeof } if
.interpolate imagemask
} {
/INTERPOLATE .systemvar {
+ 4 .argindex pop % check # of args
.currentglobal //false .setglobal
8 dict begin .setglobal
/ImageType 1 def