Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #3172
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2017-08-29 19:25 -0700 |
| References | <ad8a9d89-952f-4e17-8ff8-2fbd8ce6e26e@googlegroups.com> <54b963a7-e791-4b21-8eef-532dbe3ca91d@googlegroups.com> |
| Message-ID | <5b56c7ea-86ba-4fd6-bdcb-d4eb030ad22c@googlegroups.com> (permalink) |
| Subject | Re: Named Resources |
| From | luser droog <luser.droog@gmail.com> |
On Tuesday, August 29, 2017 at 4:02:13 AM UTC-5, wst wst wrote: > 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? The OP was several years ago, but I'm still around! It appears from my earlier message that I had planned 2 dictionaries to manage the local and global stuff separately. Indeed, it seems impossible to do with 1 dictionary in either memory. Global of course is forbidden to contain references to objects in local memory. Conversely, local memory is too perishable. If the user were to do save ... findresource ... restore then it all would get lost. So I think you have to use 2. Unless there's something else I'm not seeing.
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Named Resources luser- -droog <mijoryx@yahoo.com> - 2013-09-24 15:19 -0700
Re: Named Resources John Deubert <john@acumentraining.com> - 2013-09-27 07:31 -0700
Re: Named Resources luser- -droog <mijoryx@yahoo.com> - 2013-09-29 22:32 -0700
Re: Named Resources John Deubert <john@acumentraining.com> - 2013-09-27 07:44 -0700
Re: Named Resources John Deubert <john@acumentraining.com> - 2013-09-27 07:49 -0700
Re: Named Resources John Deubert <john@acumentraining.com> - 2013-09-27 08:44 -0700
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