Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3173

Re: Named Resources

From Carlos <carlos@cvkm.cz>
Newsgroups comp.lang.postscript
Subject Re: Named Resources
Date 2017-08-30 19:24 +0200
Organization A noiseless patient Spider
Message-ID <20170830192412.3c393b59@samara.DOMA> (permalink)
References <ad8a9d89-952f-4e17-8ff8-2fbd8ce6e26e@googlegroups.com> <54b963a7-e791-4b21-8eef-532dbe3ca91d@googlegroups.com>

Show all headers | View raw


[wst wst <wouter_staelens@hotmail.com>, 2017-08-29 02:02]
> Op woensdag 25 september 2013 00:19:43 UTC+2 schreef luser droog:
> > I've spent the last few weeks trying to wrap my head 
> > around how to implement Named Resources. I'm just going
> > to talk about what I think I know. Please correct any 
> > mistakes!
> > 
> > Named Resources exist in up to 3 places at any given time
> > while "part of the system".
> > 
> >   * in a filesystem directory
> >   * in a data structure in local vm
> >   * in a data structure in global vm
> > 
> > So, I'm going to create 2 data structures, 
> > as a rough start:
> > 
> > true setglobal
> > globaldict begin
> > /globalresourcedict <<
> >     /Category <<  
> >     >>    
> >     /Generic <<  
> >     >>    
> >     /ProcSet <<  
> >     >>  
> > >> def   
> > end
> > 
> > false setglobal
> > userdict begin
> > /localresourcedict <<
> >     /Encoding <<
> >         /StandardEncoding [ ] 
> >         /ISOLatin1Encoding [ ]   
> >     >>  
> > >> def   
> > end
> > 
> > I still don't understand Category and Generic. :(  
> 
> 
> 
> 
> How do you handle the local and global VM?
> 
> The red book states: 
> "The resources dictionary should take care of local and global VM resources".
> 
> Ghostscript comments say:
> 
> % The PostScript manual says that each category must
> % manage global and local instances separately.  However, objects in
> % global VM other than systemdict can't reference objects in local VM."
> 
> Now how is it possible to manage both local and global VM in a single
> dictionary (the resources dictionary) ?
> 
> Is it possible to explain this as I'm confused with the local/global VM in
> combination with Named Resources... how does that work together?

Are you talking about "category implementation dictionaries"? That's the
dictionary that holds procedures implementing defineresource, etc. AFAICT, the
book says that each category has only one implementation dictionary for
both its local and global resources, not that the resources should be stored in
a single dictionary. I think it doesn't say how they should be stored at all; as
long as you implement the procedures to define/find/etc them, what
your implementation does is nobody's business.

I also don't see another way than to use two dictionaries, one
global and one local.

-- 

Back to comp.lang.postscript | Previous | NextPrevious in thread | Find similar


Thread

Re: Named Resources wst wst <wouter_staelens@hotmail.com> - 2017-08-29 02:02 -0700
  Re: Named Resources luser droog <luser.droog@gmail.com> - 2017-08-29 19:25 -0700
  Re: Named Resources Carlos <carlos@cvkm.cz> - 2017-08-30 19:24 +0200

csiph-web