summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_init.ps')
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_init.ps78
1 files changed, 53 insertions, 25 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_init.ps b/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
index 0596e5e28c4..6c8da532ca0 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2012 Artifex Software, Inc.
+% Copyright (C) 2001-2018 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -9,8 +9,8 @@
% of the license contained in the file LICENSE in this distribution.
%
% Refer to licensing information at http://www.artifex.com or contact
-% Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael,
-% CA 94903, U.S.A., +1(415)492-9861, for further information.
+% Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
+% CA 94945, U.S.A., +1(415)492-9861, for further information.
%
% Initialization file for the interpreter.
@@ -29,7 +29,7 @@
% Interpreter library version number
% NOTE: the interpreter code requires that the first non-comment token
% in this file be an integer, and that it match the compiled-in version!
-922
+923
% Check the interpreter revision.
dup revision ne
@@ -113,6 +113,7 @@ PDFSTEP { /PDFDEBUG //true def } if
currentdict /PDFSTOPONERROR known /PDFSTOPONERROR exch def
currentdict /PDFSTOPONWARNING known {/PDFSTOPONWARNING true def /PDFSTOPONERROR true def}{/PDFSTOPONWARNING false def} ifelse
currentdict /PDFNOCIDFALLBACK known /PDFNOCIDFALLBACK exch def
+/.bind /bind load def
/VMDEBUG
INITDEBUG {{print mark
@@ -133,12 +134,18 @@ currentdict /PDFNOCIDFALLBACK known /PDFNOCIDFALLBACK exch def
{{pop
}}
ifelse
- def
+ .bind def
+
+%% This was a debugging switch removed in 9.22, no other software
+%% should have had any regard for it, and even if testing its value
+%% should have checked its existence first. However pstotext, an
+%% ancient and no longer maintained piece of softare, did check
+%% its value unconditionally. So we retain this key in the dictionary
+%% purely for backward compatibility.
+/NOBIND false def
currentdict /BATCH known /BATCH exch def
currentdict /DELAYBIND known /DELAYBIND exch def
-currentdict /REALLYDELAYBIND known {/REALLYDELAYBIND true def /DELAYBIND true def}{/REALLYDELAYBIND false def}ifelse
-currentdict /DISKFONTS known /DISKFONTS exch def
currentdict /DOINTERPOLATE .knownget { { -1 } { 0 } ifelse /InterpolateControl exch def } if
currentdict /ESTACKPRINT known /ESTACKPRINT exch def
currentdict /FAKEFONTS known /FAKEFONTS exch def
@@ -146,7 +153,6 @@ currentdict /FIXEDMEDIA known /FIXEDMEDIA exch def
currentdict /FIXEDRESOLUTION known /FIXEDRESOLUTION exch def
currentdict /LOCALFONTS known /LOCALFONTS exch def
currentdict /JOBSERVER known /JOBSERVER exch def
-/.bind /bind load def
currentdict /NOCACHE known /NOCACHE exch def
currentdict /NOCCFONTS known /NOCCFONTS exch def
currentdict /NOCIE known /NOCIE exch def
@@ -302,7 +308,16 @@ QUIET not { printgreeting flush } if
% If we're delaying binding, remember everything that needs to be bound later.
DELAYBIND
- { .currentglobal //false .setglobal
+{
+ SAFER {
+ (\n *** WARNING - you have selected SAFER, indicating you want Ghostscript\n) print
+ ( to execute in a safer environment, but at the same time\n) print
+ ( have selected DELAYBIND. Unless you use this option with\n) print
+ ( care \(and specifically, remember to call .bindnow\) it is\n) print
+ ( possible that malicious code may be able to evade the\n) print
+ ( limited security offered by the SAFER option.\n) print
+ } if
+ .currentglobal //false .setglobal
systemdict /.delaybind 2000 array .forceput
.setglobal
userdict /.delaycount 0 put
@@ -317,7 +332,7 @@ DELAYBIND
}
ifelse
} .bind def
- } if
+} if
%**************** BACKWARD COMPATIBILITY ****************
/hwsizedict mark /HWSize //null .dicttomark readonly def
@@ -2154,7 +2169,7 @@ SAFER { .setsafeglobal } if
/.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace
/.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1
/.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2
-/.devicename /.doneshowpage /flushpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams
+/.devicename /.doneshowpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams
/makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount
/.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments
/.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename
@@ -2172,6 +2187,15 @@ SAFER { .setsafeglobal } if
/.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams
/.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath
+% Used by a free user in the Library of Congress. Apparently this is used to
+% draw a partial page, which is then filled in by the results of a barcode
+% scanner and SQL database lookup. Its not clear to us exactly why this needs to be
+% done as a partial page, but its easiest to restore the operator, and it seems like
+% its a reasonably safe operator to restore, for the *very* few devices on which
+% it will have any effect. Currently this uses the 'sync_outptu' device method
+% to transfer the partial page, in future we may use a spec_op instead.
+%/flushpage
+
% Used by our own test suite files
%/.fileposition %image-qa.ps
%/.makeoperator /.setCPSImode % gs_cet.ps
@@ -2208,7 +2232,7 @@ SAFER { .setsafeglobal } if
/.abortpdf14devicefilter /.pdfinkpath /.pdfFormName /.setstrokeconstantalpha
/.setfillconstantalpha /.setalphaisshape /.currentalphaisshape
/.settextspacing /.currenttextspacing /.settextleading /.currenttextleading /.settextrise /.currenttextrise
-/.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling
+/.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling /.setPDFfontsize /.currentPDFfontsize
% Used by our own test suite files
%/.pushpdf14devicefilter % transparency-example.ps
@@ -2243,6 +2267,7 @@ SAFER { .setsafeglobal } if
//systemdict /.forcecopynew .forceundef % remove temptation
//systemdict /.forcedef .forceundef % ditto
//systemdict /.forceput .forceundef % ditto
+ //systemdict /.undef .forceundef % ditto
//systemdict /.forceundef .forceundef % ditto
currentuserparams /IdiomRecognition known {
1 dict dup /IdiomRecognition 4 -1 roll put setuserparams
@@ -2366,18 +2391,6 @@ DELAYBIND not {
systemdict /.forceundef .undef % ditto
} if
-DELAYBIND REALLYDELAYBIND not and {
-(\n *** WARNING - the DELAYBIND command has been deprecated, and will be\n) print
-( removed in the next version. For now you can restore\n) print
-( the behaviour by using -dREALLYDEALYBIND but if you\n) print
-( require continued use of this command you should contact\n) print
-( the Ghostscript developers. Commercial customers of\n) print
-( Artifex should email their support contact, free users\n) print
-( are encouraged to talk to us on the #ghostscript IRC\n) print
-( channel on irc.freenode.net.\n\n) print
-/DELAYBIND /undefined signalerror
-} if
-
% Move superexec to internaldict if superexec is defined.
systemdict /superexec .knownget {
1183615869 internaldict /superexec 3 -1 roll put
@@ -2385,9 +2398,24 @@ systemdict /superexec .knownget {
} if
%% Can't remove this one until the last minute :-)
+DELAYBIND not {
systemdict /.undef .undef
+} if
+WRITESYSTEMDICT {
+ SAFER {
+ (\n *** WARNING - you have selected SAFER, indicating you want Ghostscript\n) print
+ ( to execute in a safer environment, but at the same time\n) print
+ ( have selected WRITESYSTEMDICT. Unless you use this option with\n) print
+ ( care and specifically, remember to execute code like:\n) print
+ ( "systemdict readonly pop"\n) print
+ ( it is possible that malicious code may be able to evade the\n) print
+ ( limited security offered by the SAFER option.\n) print
+ }if
+}
+{
+ systemdict readonly pop
+} ifelse
-WRITESYSTEMDICT not { systemdict readonly pop } if
(END GC) VMDEBUG
% The Adobe AGM_Core used by Illustrator 9 has some code that breaks