freetype-devel
[Top][All Lists]
Advanced

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

RE: [Devel] Re: Strange code in cff/t2parse.c?


From: Rich Stephens
Subject: RE: [Devel] Re: Strange code in cff/t2parse.c?
Date: Thu, 21 Dec 2000 11:29:56 -0500


Rich Stephens
Software Developer

OK, I'm convinced.  We've decided to go ahead and update to the 2.01 lib for
all our platforms, but many thanks for all your great responses!  Even if I
don't strictly need the info anymore, it DOES help to satify my curiosity.

Optio Software, Inc.
Windward Fairways II
3015 Windward Plaza
Alpharetta, GA 30005
(770) 576-3561
address@hidden


-----Original Message-----
From: Tom Kacvinsky [mailto:address@hidden
Sent: Thursday, December 21, 2000 10:44 AM
To: address@hidden
Subject: [Devel] Re: Strange code in cff/t2parse.c?


This has been fixed in the current code.  The macro T2_REF (which was
meant to access a field in a struct) has been replaced by a macro that
resolves to use of the ANSI standard offsetof() function.

I cannot find anything in my C books about such contructs as ((s*)0)->f, but
my
general impression is that it means if the 0 pointer were cast to a pointer
to
struct s, and the we accessed struct member f, we would then have an offset
from
0, which is the offset from the beginning of the struct to member f.

Try replacing the code with this:

#define T2_REF( s, f) (FT_UInt)( offsetof( s, f ) )

And see how you fare...

Regards,

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]