[comp.sys.mac.programmer] Size in bytes of Mac Pascal data types

jonmc@bruce.cs.monash.OZ.AU (jon mccormack) (04/18/91)

I'm trying to read a Mac data file on a Unix machine and I need to
know the size in bytes of these data types (in Macintosh Pascal):

	WindowPtr
	WindowPeek
	Ptr
	Size
	rgnHandle
	Rect
	ControlHandle
	Size
	Boolean
	Str255

	general enumerated types: i.e. ModeType = (Select, Draw, ZoomSelect),
	how many bytes is "ModeType" ?

Can anyone help me please! I think the information in in Inside Macintosh
but I don't have a copy.

"Thanks in advance" (17 bytes)

Jon McCormack
Computer Science
Monash University, Clayton Victoria
AUSTRALIA
(jonmc@bruce.oz.au)

stevec@Apple.COM (Steve Christensen) (04/19/91)

jonmc@bruce.cs.monash.OZ.AU (jon mccormack) writes:
>
>I'm trying to read a Mac data file on a Unix machine and I need to
>know the size in bytes of these data types (in Macintosh Pascal):

	WindowPtr	4 bytes
	WindowPeek	4	it's a pointer to a WindowRecord
	Ptr		4
	Size		4
	rgnHandle	4
	Rect		8	top,left,bottom,right (2 bytes each)
	ControlHandle	4
	Boolean		2	boolean value in first byte, garbage in second
	Str255		256	1 length byte followed by up to 255 characters

All handles and pointers are 4 bytes...

steve

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Steve Christensen			Never hit a man with glasses.
  stevec@apple.com			Hit him with a baseball bat.