🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #492

invalidrestore during "... {datasrc} image" in gs 2.5.2

#492
From: Jeff Smith
Date: Wed, 11 Nov 1992 23:17
45 lines
2163 bytes
I thought I understood PostScript VM until I built the following
example!  It prints the same image twice, on both the HP IIISi, and
the LW+, but using gs gives me an invalidrestore during the second
image, on sun and sgi kit.  All data and dimensions are
inconsequential.  Could someone explain why under ghostscript only the
first one works?

%! Here's the program:

18 684 translate -90 rotate 540 540 scale

/srread {
	/srread { restore save currentfile 20 string readhexstring pop } def
	save
	currentfile 20 string readhexstring pop
} def	

10 10 8 [ 10 0 0 -10 0 10 ] 	% /A [ 10 0 0 -10 0 10 ] def   if you want
{srread} image
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
restore
showpage	

% here's a more direct way of printing the image
% -- except it doesn't work with ghostscript

18 684 translate -90 rotate 540 540 scale

10 10 8 [ 10 0 0 -10 0 10 ] 
{restore save currentfile 20 string readhexstring pop} save 6 1 roll image
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
bfbfbfbfc1c3c3c5c567bfbfbfbfc1c3c3c5c567
restore
showpage

-- 
Jeff Smith, Computer Science, Warwick University, Coventry, CV4 7AL, England
jeff@dcs.warwick.ac.uk  phone: +44 203 523485   fax: +44 203 525714
Technical Details
Message-ID: <1992Nov11.231724.13211@dcs.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dcs.warwick.ac.UK!jeff

Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dcs.warwick.ac.UK!jeff
From: jeff@dcs.warwick.ac.UK (Jeff Smith)
Subject: invalidrestore during  "... {datasrc} image" in gs 2.5.2
Message-ID: <1992Nov11.231724.13211@dcs.warwick.ac.uk>
Summary: prints but doesn't ghostcript; previews under openwin. bug?
Keywords: restore save/restore invalidrestore VM
Sender: gnulists@ai.mit.edu
Organization: Department of Computer Science, Warwick University, England
Distribution: gnu
Date: Wed, 11 Nov 1992 23:17:24 GMT
Approved: bug-ghostscript@prep.ai.mit.edu
Lines: 46