diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2019-05-10 23:51:26 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2019-05-10 23:51:26 +0000 |
commit | e92598acb3a0a20ac8ff31928d84188de2360b7f (patch) | |
tree | efb05c3dd914979fc62f92be27b52b7d54ef3e9b /Master/tlpkg/tlgs/Resource/Init/pdf_base.ps | |
parent | a0dbdd61992f743553c4c357edf3af0cfc3cd0b9 (diff) |
Upgrade gs-9.26 -> gs-9.27
git-svn-id: svn://tug.org/texlive/trunk@51079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/pdf_base.ps')
-rw-r--r-- | Master/tlpkg/tlgs/Resource/Init/pdf_base.ps | 65 |
1 files changed, 36 insertions, 29 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps index b45e9803165..1a218f42fbf 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2018 Artifex Software, Inc. +% Copyright (C) 2001-2019 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -23,7 +23,6 @@ /.setlanguagelevel where { pop 2 .setlanguagelevel } if .currentglobal //true .setglobal -/pdfdict where { pop } { /pdfdict 100 dict def } ifelse pdfdict begin % Define the name interpretation dictionary for reading values. @@ -85,7 +84,10 @@ pdfdict begin % dictionary. The name procedures may do whatever they want % to the operand stack. /.pdftokenerror { % <count> <opdict> <errtoken> .pdftokenerror - - BXlevel 0 le { + % if we're called prior to actually drawing the page contents + % (i.e. for pageusestransparency) BXlevel may not be defined, yet. + /BXlevel where {/BXlevel get 0 le}{//true} ifelse + { ( **** Error: Unknown operator: ') pdfformaterror dup =string cvs pdfformaterror (') pdfformaterror @@ -130,26 +132,29 @@ currentdict /num-chars-dict .undef /.pdfexectoken { % <count> <opdict> <exectoken> .pdfexectoken ? PDFDEBUG { - pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } if + //pdfdict /PDFSTEPcount known not { //pdfdict /PDFSTEPcount 1 .forceput } executeonly if PDFSTEP { - pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput + //pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput PDFSTEPcount 1 gt { - pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput - } { + //pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput + } executeonly + { dup ==only ( step # ) print PDFtokencount =only ( ? ) print flush 1 //false .outputpage (%stdin) (r) file 255 string readline { token { - exch pop pdfdict /PDFSTEPcount 3 -1 roll .forceput - } { - pdfdict /PDFSTEPcount 1 .forceput - } ifelse % token + exch pop //pdfdict /PDFSTEPcount 3 -1 roll .forceput + } executeonly + { + //pdfdict /PDFSTEPcount 1 .forceput + } executeonly ifelse % token } { pop /PDFSTEP //false def % EOF on stdin } ifelse % readline } ifelse % PDFSTEPcount > 1 - } { + } executeonly + { dup ==only () = flush } ifelse % PDFSTEP } if % PDFDEBUG @@ -178,17 +183,17 @@ currentdict /num-chars-dict .undef %% we look for 0-9 as well as '.' ',' and '-' to permit those %% locales in which the separator is a comma, as well as negative %% numbers. We've seena t least one tool replace '0' with '-' *sometimes* - true exch + //true exch dup length 1 sub 0 1 3 -1 roll { 1 index exch get dup 44 lt { - pop exch pop false exch exit + pop exch pop //false exch exit }{ dup 57 gt { - pop exch pop false exch exit + pop exch pop //false exch exit }{ dup 47 eq { - pop exch pop false exch exit + pop exch pop //false exch exit }{ pop } ifelse @@ -237,7 +242,7 @@ currentdict /num-chars-dict .undef { token } stopped { dup type /filetype eq { pop } if pop pop stop - } if { + } if { dup type /nametype eq { dup xcheck { .pdfexectoken @@ -260,7 +265,7 @@ currentdict /num-chars-dict .undef pop pop exit } ifelse } - aload pop .packtomark cvx % file [ {cnt <<>> file ... } + aload pop //.packtomark exec cvx % file [ {cnt <<>> file ... } { loop } 0 get 2 packedarray cvx % file [ { {cnt <<>> file ... } loop } PDFSTOPONERROR { {exec //false} } { {stopped} } ifelse aload pop % file [ { {cnt <<>> file ... } loop } stopped @@ -275,8 +280,8 @@ currentdict /num-chars-dict .undef ( Output may be incorrect.\n) pdfformaterror } if } aload pop % file [ { {cnt <<>> file ... } loop } stopped /PDFsource PDFsource store {...} if - .packtomark cvx % file { { {cnt <<>> file ... } loop } stopped /PDFsource PDFsource store {...} if} - /PDFsource 3 -1 roll store % {...} + //.packtomark exec cvx % file { { {cnt <<>> file ... } loop } stopped /PDFsource PDFsource store {...} if} + /PDFsource 3 -1 roll store % {...} exec } bind executeonly def @@ -284,7 +289,9 @@ currentdict /num-chars-dict .undef % This temporarily rebinds LocalResources and DefaultQstate. /.pdfruncontext { % <resdict> <file> <opdict> .pdfruncontext - /.pdfrun load LocalResources DefaultQstate - /LocalResources 7 -1 roll store + /LocalResources 7 -1 roll + dup /ParentResources LocalResources put % save the parent LocalResources + store % store new LocalResources /DefaultQstate qstate store 3 .execn /DefaultQstate exch store @@ -320,7 +327,7 @@ currentdict /num-chars-dict .undef dup type /filetype eq { { dup ( ) .peekstring not { ({) } if //token_nofail_dict exch .knownget not { - //null 1 index { token } .internalstopped exit + //null 1 index { token } //.internalstopped exec exit } if exec } loop @@ -333,7 +340,7 @@ currentdict /num-chars-dict .undef } ifelse } { //null 1 index % stack: source null source - { token } .internalstopped { % stack: source null [source] + { token } //.internalstopped exec { % stack: source null [source] //null ne { pop } if pop //false } { % stack: source null ([post] token true | false) { 4 2 roll pop pop //true } @@ -841,7 +848,7 @@ currentdict /no_debug_dict undef } if 1 index dup 0 le exch NumObjects ge or { ( **** Error: Considering object with an invalid number ) - 2 index 20 string cvs concatstrings + 2 index 20 string cvs concatstrings ( as null.\n) concatstrings pdfformaterror ( Output may be incorrect.\n) pdfformaterror pop pop //null @@ -1172,11 +1179,11 @@ currentdict /pdf_rules_dict undef % Stack: readdata? dict /DecodeParms /Filter filterparms % Stack: readdata? dict parms filternames - 2 index /File .knownget not { + 2 index /File .knownget not { ( **** Error: Stream object is missing the stream data.\n) ( Output may be incorrect.\n) pdfformaterror pdfformaterror - () + () } if exch % Stack: readdata? dict parms file/string filternames dup length 0 eq { @@ -1248,7 +1255,7 @@ currentdict /pdf_rules_dict undef /.leafget { % <key> <pairs> .leafget <obj|null> dup length 2 eq { - dup 0 get 2 index eq { 1 oget } { pop null } ifelse + dup 0 get 2 index eq { 1 oget } { pop //null } ifelse exch pop } { dup length -1 bitshift -2 and 2 copy oget @@ -1275,7 +1282,7 @@ currentdict /pdf_rules_dict undef /.branchgetle { % <key> <leafkey> <kids> .branchgetle <key obj true|false> dup length 0 eq { - pop pop pop false + pop pop pop //false } { dup length -1 bitshift 2 copy oget dup /Limits oget aload pop @@ -1299,7 +1306,7 @@ currentdict /pdf_rules_dict undef /.leafgetle { % <key> <pairs> .leafget <obj|null> dup length 2 eq { dup 0 get - 2 index le { exch pop aload pop true } { pop pop false } ifelse + 2 index le { exch pop aload pop //true } { pop pop //false } ifelse } { dup length -1 bitshift -2 and 2 copy oget % Stack: key pairs mid pairs[mid] |