[comp.sys.mac.programmer] 128 Byte res fork header usage?

wolf@mel.cipl.uiowa.edu (10/14/90)

I thought I had read in IM I that there is a 128 byte header area to all
resource forks which could be used by the application.  How does one use that
area (say for storing a name, date or the like)?

I don't recall reading anything else in IM I which talked about it.  Is it easy
to reach via standard pascal or is reached by inline programming or what?

Thanks!

Michael

russotto@eng.umd.edu (Matthew T. Russotto) (10/16/90)

In article <1990Oct13.215743.1@mel.cipl.uiowa.edu> wolf@mel.cipl.uiowa.edu writes:
>I thought I had read in IM I that there is a 128 byte header area to all
>resource forks which could be used by the application.  How does one use that
>area (say for storing a name, date or the like)?
>
>I don't recall reading anything else in IM I which talked about it.  Is it easy
>to reach via standard pascal or is reached by inline programming or what?

Apple says you can't use it.  (in the tech notes-- Don't use the resource
application bytes for data).  You get to it with File Manager calls, usign
OpenRF instead of Open.
--
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
      .sig under construction, like the rest of this campus.

freek@fwi.uva.nl (Freek Wiedijk) (10/16/90)

russotto@eng.umd.edu (Matthew T. Russotto) writes:

>In article <1990Oct13.215743.1@mel.cipl.uiowa.edu> wolf@mel.cipl.uiowa.edu writes:
>>I thought I had read in IM I that there is a 128 byte header area to all
>>resource forks which could be used by the application.  How does one use that
>>area (say for storing a name, date or the like)?
>>
>>I don't recall reading anything else in IM I which talked about it.  Is it easy
>>to reach via standard pascal or is reached by inline programming or what?
>
>Apple says you can't use it.  (in the tech notes-- Don't use the resource
>application bytes for data).  You get to it with File Manager calls, usign
>OpenRF instead of Open.

Story: I once wrote a checksummer for the Mac (compatible with UN*X "sum"),
that (among other things) checksummed the resource fork of a document.
I was very surprised that the resource fork CHANGED if I copied/downloaded
a document.  So, it turned out to be the case that my checksummer was
virtually useless..

I could have modified my program to checksum all but the header of the
resource fork.  However, in that case I wouldn't have been able to compare
its output with "sum Document.rsrc" under UN*X.

Freek "the Pistol Major" Wiedijk                      E-mail: freek@fwi.uva.nl
#P:+/ = #+/P?*+/ = i<<*+/P?*+/ = +/i<<**P?*+/ = +/(i<<*P?)*+/ = +/+/(i<<*P?)**