David.Slonosky@QueensU.CA (08/01/90)
I'm trying to write some C code for checking the protection bits on a file as to whether it has been set for deleteable or not. Rob Peck's "Programmer's Guide to the Amiga" has a good example on pp.31-32 of how to do this, but unfortunately doesn't go into the reason as to why the code was set up that way. Specifically, he uses a set of masks with the structure: long rmask = ((long)('r') << 24); long bramsk = ((long)(' ') << 24); and so on, then tests them versus the fib_Protection flag of the file information block structure he obtains. The problem is that a few more flags have been added since then, and I don't see where he gets the "24" from for his masking variables. I have the RKM dealing with Libraries and Devices, but there is nothing I can find in it for dealing with the file info I want to obtain. Any hints on references for this, or even personal hints, will be greatly appreciated. Please respond by E-mail, as I don't subscribe to this list. Dave