summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2021-04-09 21:01:58 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2021-04-09 21:01:58 +0000
commitcb14c16722533ee99b36a2e6efd9a6e4820954a3 (patch)
treef5cb5fbac1ea978af4cc1ea0f5d04d51bc1d01e0 /Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps
parent94f0fd38b17b225048a0756ea6f03bbca0c30c7e (diff)
Upgrade gs-9.53.3 -> gs-9.54.0
git-svn-id: svn://tug.org/texlive/trunk@58805 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps')
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps24
1 files changed, 20 insertions, 4 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps b/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps
index 74c1dd27788..80d399101b7 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2020 Artifex Software, Inc.
+% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -61,13 +61,29 @@ level2dict begin
.currentglobal 1 index gcheck .setglobal exch
currentpacking //false setpacking exch
+ 2 dict begin /filelen 0 def % scratch dict for filelen and pos (below).
% Stack: dict filters parms CloseSource oldglobal oldpacking file
- [ exch { dup 40000 string readstring not { exit } if exch } loop
+ [ exch {
+ dup 40000 string readstring
+ /filelen 2 index length filelen add def % accumulate filelen
+ not { exit } if exch
+ } loop
exch pop
]
- % Stack: dict filters parms CloseSource oldglobal oldpacking [()...]
+ { filelen string } stopped { % try allocating a single string
+ pop % couldn't make a string - discard filelen value
+ } {
+ % transfer the array-of-strings to the single string.
+ % stack: ... [() ...] string
+ /pos 0 def exch {
+ 1 index exch pos exch putinterval /pos pos 40000 add def
+ } forall
+ } ifelse
+ % top of stack is either array of strings or one string == stream_data
+ end % done with scratch dict
+ % Stack: dict filters parms CloseSource oldglobal oldpacking stream_data
3 1 roll setpacking setglobal
- % Stack: dict filters parms CloseSource [()...]
+ % Stack: dict filters parms CloseSource stream_data
1 index .reusablestream
} if
% We created the stream successfully: clean up.