🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #440

Bug in resourceforall

#440
From: Shamim Zvonko Mohamed
Date: Tue, 29 Sep 1992 17:19
33 lines
1833 bytes
Using gs2.5.1 on a Sun Sparc, resourceforall seems to execute in a strange
manner. (I know the implementation of the operator is incomplete.)

Initializing... done.
Ghostscript 2.5.1 (9/11/92)
  Copyright (C) 1990, 1992 Aladdin Enterprises, Menlo Park, CA.
  All rights reserved.
Distributed by Free Software Foundation, Inc.
Ghostscript comes with NO WARRANTY: see the file LICENSE for details.
GS>(*) {print} 100 string /Font resourceforall
GS<2>pstack
[print]
(NullFont)
GS<2>

The bug seems to be in the operands expected on the stack. In gs_lev2.ps:

/ResourceForAll
        { % We construct a new procedure so we don't have to use
          % static resources to hold the iteration state.
          3 1 roll   cvlit 3 1 roll   cvlit 3 1 roll
          { % Stack contains: key, instance, template, proc, scratch
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Whereas the Red Book (2 Ed.) says:
   template proc scratch category <resourceforall> --

-s
--
  Shamim Mohamed / {uunet,noao,cmcl2..}!arizona!shamim / shamim@cs.arizona.edu
  "Take this cross and garlic; here's a Mezuzah if he's Jewish; a page of the
    Koran if he's a Muslim; and if he's a Zen Buddhist, you're on your own."
 Member of the League for Programming Freedom - write to league@prep.ai.mit.edu
Technical Details
Message-ID: <22984@optima.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cs.arizona.edu!sham

Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cs.arizona.edu!sham
From: sham@cs.arizona.edu (Shamim Zvonko Mohamed)
Subject: Bug in resourceforall
Message-ID: <22984@optima.cs.arizona.edu>
Sender: gnulists@ai.mit.edu
Organization: U of Arizona CS Dept, Tucson
Distribution: gnu
Date: Tue, 29 Sep 1992 17:19:35 GMT
Approved: bug-ghostscript@prep.ai.mit.edu
Lines: 34