[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pascal



Paul Schlyter <pausch@saaf.se> wrote:

> In article <68a2ec1b.0201201507.3fa71387@posting.google.com>,
> Lazarus I. Long <me@lazilong.com> wrote:
>  
> > pausch@saaf.se (Paul Schlyter) wrote:
> > > Do you have these files available too?
> > 
> > the only thing in the #include "PasDiskLocSpec.h" is this:
> > 
> > typedef RboShort Pas_BlockSpec;
>  
> Which raises the question what a Pas_BlockSpec is -- that too wasn't
> define din the posted code.

Are you unfamiliar with the C language?  The typedef statement above is
defining Pas_BlockSpec to be the same type as RboShort.

> > an RboShort is a reverse-byte-order unsigned 16 bit value
> > (for macintosh it's reverse, on a PC, I don't think it's reverse)
>  
> :-) ...you've read Gulliver's Travels, and the war therein between
> the Big Endians and the Little Endians?

I agree - defining this as a "little endian 16-bit signed integer" would
be clearer than "reverse byte order".

> > but in #include "FileSystemTypes.h" there's stuff about the data
> > structures that reference the actual disk image, there's nothing in
> > there about Pascal.
>  
> I was actually wondering about the definitions of the constants below:
>  
>     typedef enum {
>             Pas_FileKind_UNTYPED, 
>             Pas_FileKind_X_DISK,
>             Pas_FileKind_CODE, 
>             Pas_FileKind_TEXT, 
>             Pas_FileKind_INFO, 
>             Pas_FileKind_DATA, 
>             Pas_FileKind_GRAF, 
>             Pas_FileKind_FOTO, 
>             Pas_FileKind_SECURE_DIR, 
>  
>             Pas_FileKind_NUMTYPES
>     } Pas_FileKindType;

This is an enumerated type, and the constants have not been assigned
specific values, so the default behaviour applies: the first constant
(Pas_FileKind_UNTYPED) is zero, and subsequent constants increment by
one.  This means that Pas_FileKind_NUMTYPES is 9.

-- 
David Empson
dempson@actrix.gen.nz