Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!nrl-cmf!mailrus!umix!umich!mibte!gamma!sabre!sword!faline!bellcore!spectral!sjs From: sjs@spectral.ctt.bellcore.com (Stan Switzer) Newsgroups: comp.windows.news Subject: Re: currentfile does not work Message-ID: <6491@bellcore.bellcore.com> Date: 1 Apr 88 13:46:35 GMT References: <10204@ulysses.homer.nj.att.com> Sender: news@bellcore.bellcore.com Reply-To: sjs@spectral.UUCP (Stan Switzer) Organization: Computer Technology Transfer, Bellcore Lines: 22 In article <10204@ulysses.homer.nj.att.com> csw@ulysses.homer.nj.att.com (Chris Warth) writes: > > Running NeWS version 1.1. > > Adobe specifies that `currentfile' "returns the file object from > which the PostScript interpreter is currently or was most recently > reading program input" (Red book, pg. 144). Yet this does not seem > to work for psh or psview. I still don't have 1.1, but in 1.0, currentfile does indeed work. It cannot work with the distributed psview, however, because psview wraps your input inside of an enveloping PostScript program. With a bit of work, you can modify psview to read the file directly. This has the added advantage that you can do semi-interactive PostScript hacking: just modify the input file and invoke redraw. (You might also do something ugly like change the close gizmo into a redraw gizmo.) For extra credit, modify psview to maintain an 8.5 X 11 aspect ratio when resized. Stan Switzer sjs@ctt.bellcore.com