Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #366
| From | Helge Blischke <h.blischke@acm.org> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: A Postscript Myth |
| Followup-To | comp.lang.postscript |
| Date | 2011-09-28 21:55 +0200 |
| Message-ID | <9ehcdeF7l3U1@mid.individual.net> (permalink) |
| References | <ee0f8944-1307-4ca9-890b-afd648624d34@i28g2000yqn.googlegroups.com> <1rc41xcn5e11w.12cxd7poibdmt$.dlg@40tude.net> |
Followups directed to: comp.lang.postscript
tlvp wrote: > On Wed, 28 Sep 2011 02:09:33 -0700 (PDT), luser- -droog wrote: > >> Postcript's access control mechanism is often explained as an >> analogue of the Unix file access mechanism. But it isn't so! >> >> Postscript access flags are not a 3-bit mark, but a 2-bit number >> representing exactly 4 values of access: >> >> unlimited >> The default access for user-created objects (the things represented >> by words in your source code) is unlimited. >> >> read-only >> Only significant for (packed)arrays, strings, dictionaries, >> and files. Disallows writing to object. >> >> execute-only >> Disallows reading and writing. >> >> none >> Cannot access the object in any way. For xpost, my hacky >> fonttype object should have this level set, since there are no >> operators that work with it. You can still query the type, >> length (if appropriate), and determine the access level. >> >> So the predicates each perform a simple numerical test. >> wcheck checks if the access is unlimited. >> rcheck checks if the access is read-only or unlimited. >> >> In level 1, there is no way to distinguish read-only from >> execute-only except to attempt a read and catch the error. >> There is no way to distinguish execute-only from none >> except to attempt to execute and catch the error. > > OK, let me display my ignorance: I'd have expected four levels > as follows: > > read access & write access both allowed > read access allowed, write access not allowed > read access not allowed, write access allowed > neither read access nor write access allowed. > > And I'd have thought you can't 'execute' without *both* read access > *and* execute permission. > > So, now, cure my ignorance, please: what am I missing? > > Cheers, and TIA, -- tlvp Here is what the PLRM says with respect to access: --- snip --- Access The other attribute of an object is its access. Only composite objects have access attributes, which restrict the set of operations that can be performed on the object’s value. There are four types of access. In increasing order of restriction, they are: 1. Unlimited. Normally, objects have unlimited access: all operations defined for that object are allowed. However, packed array objects always have read-only (or even more restricted) access. 2. Read-only. An object with read-only access may not have its value written, but may still be read or executed. 3. Execute-only. An object with execute-only access may not have its value either read or written, but may still be executed by the PostScript interpreter. 4. None. An object with no access may not be operated on in any way by a Post- Script program. Such objects are not of any direct use to PostScript programs, but serve internal purposes that are not documented in this book. --- snip --- Helge
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
A Postscript Myth luser- -droog <mijoryx@yahoo.com> - 2011-09-28 02:09 -0700
Re: A Postscript Myth tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2011-09-28 15:39 -0400
Re: A Postscript Myth Helge Blischke <h.blischke@acm.org> - 2011-09-28 21:55 +0200
Re: A Postscript Myth luser- -droog <mijoryx@yahoo.com> - 2011-09-28 18:22 -0700
Re: A Postscript Myth tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2011-09-29 19:17 -0400
csiph-web