[hfs-user] Catalog Thread record size ?

Entwicklung entwicklung@whengenibk.de
Tue, 16 Apr 2002 09:39:19 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C1E52A.954838D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
        I just have a question regarding the size of the HFS Plus - =
Catalog Thread Record specified in the Apple Universal Interfaces =
headers -

typedef UInt16                UniChar;

/* HFSUniStr255 is the Unicode equivalent of Str255 */
struct HFSUniStr255 {
  UInt16               length;                 /* number of unicode =
characters */
  UniChar             unicode[255];           /* unicode characters */
};

/* HFS Plus catalog thread record -- 264 bytes */
struct HFSPlusCatalogThread {
  UInt16                      recordType;             /* record type */
  UInt16                      reserved;               /* reserved - set =
to zero */
  HFSCatalogNodeID    parentID;               /* parent ID for this =
catalog node */
  HFSUniStr255           nodeName;               /* name of this catalog =
node (variable length) */
};
typedef struct HFSPlusCatalogThread     HFSPlusCatalogThread;


Based on the above declarations shouldn't the size for the HFSPlus =
catalog thread record be 2+2+4 (since CNID's are 4 bytes long ) + 256*2 =
=3D 264+256 instead of 264 as mentioned above ? I think someone probably =
forgot to multiply the 256 by 2 but I just wanted to make sure that is =
an error.

I'd be happy to hear some feedback from the list wrt this.

Best Regards,
Nandini Hengen


------=_NextPart_000_000B_01C1E52A.954838D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I just=20
have a question regarding the size of the HFS Plus - Catalog Thread =
Record=20
specified in the Apple Universal Interfaces headers -</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>typedef&nbsp;UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
UniChar;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/* HFSUniStr255 is the Unicode =
equivalent of Str255=20
*/<BR>struct HFSUniStr255=20
{<BR>&nbsp;&nbsp;UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
length;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/* number of unicode characters */<BR>&nbsp;=20
UniChar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
unicode[255];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 /*=20
unicode characters */<BR>};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/* HFS Plus catalog thread record -- =
264 bytes=20
*/<BR>struct HFSPlusCatalogThread=20
{<BR>&nbsp;&nbsp;UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
recordType;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;=20
/* record type */<BR>&nbsp;&nbsp;UInt16&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
reserved;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
/* reserved - set to zero */<BR>&nbsp; =
HFSCatalogNodeID&nbsp;&nbsp;&nbsp;=20
parentID;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
/* parent ID for this catalog node */<BR>&nbsp;=20
HFSUniStr255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

nodeName;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
/* name of this catalog node (variable length) */<BR>};<BR>typedef =
struct=20
HFSPlusCatalogThread&nbsp;&nbsp;&nbsp;&nbsp;=20
HFSPlusCatalogThread;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Based on the above declarations =
shouldn't the size=20
for the HFSPlus catalog thread record be 2+2+4 (since CNID's are 4 bytes =
long )=20
+ 256*2 =3D 264+256 instead of 264 as mentioned above ? I think someone =
probably=20
forgot to multiply the 256 by 2 but I just wanted to make sure that is =
an=20
error.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'd be happy to hear some feedback from =
the list=20
wrt this.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Nandini Hengen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_000B_01C1E52A.954838D0--