🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #1390

execution stack overflow

#1390
From: Geoff Nunes
Date: Thu, 31 Oct 2002 17:37
29 lines
1804 bytes
I am writing Postscript programs that contain nothing but boxes. A sample program which draws only a single box is attached below. A real program would simply contain a very large number of "x1 y1 x2 y2 Box" statements. 

My problem is that if the program contains too many boxes (somewhere over 10,000), Illustrator and Ghostview cannot display the file. Ghostview gives an error message that looks like an execution stack overflow to me. How can I fix this? 

The problem is not in the sheer number of boxes being drawn. If I use a for loop, I can draw the same number of boxes or more with no problem. The problem is that somehow my Box command is not being immediately executed. Using the exec command did not help. 

I'd love to hear from an expert on this. 

Thanks, 
Geoff Nunes 

%%%%%%%%Sample.ps%%%%%%%%%%%%%% 
%! 
/Box { 
   newpath 
   /ht 2 1 roll def 
   /wd 2 1 roll def 
   moveto 
   wd 0 rlineto 
   0 ht rlineto 
   wd neg 0 rlineto 
   0 ht neg rlineto 
   closepath 
   fill 
} bind def 

72 144 144 72 Box 
showpage 
%EOF
Technical Details
Message-ID: <1de66786.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c61a,45ed733d731ef320,start
X-Google-Attributes: gid10c61a,public
X-Google-ArrivalTime: 2002-10-31 13:00:06 PST
From: "Geoff Nunes" <geoffrey.nunes@usa.dupont.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.postscript.programming
Subject: execution stack overflow
Message-ID: <1de66786.-1@WebX.la2eafNXanI>
Date: Thu, 31 Oct 2002 09:37:20 -0800
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit