freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Freetype & Ascent


From: David Turner
Subject: Re: [Devel] Freetype & Ascent
Date: Tue, 13 Jul 2004 00:57:06 +0200
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)

Hi Antoine,

Antoine Leca wrote:
[mailto:address@hidden On Behalf Of Keith Trummel
Sent: Monday, June 28, 2004 4:35 PM
First, I would think the check should be:

       if ( face->os2.version != 0xFFFF && root->ascender == 0 )

instead of:

       if ( face->os2.version != 0xFFFFU && root->ascender )


Minor nit: 0xFFFF and 0xFFFFU are exactly the same thing: unlike decimal
constants, octal and hexadeciaml ones promote to unsigned "before" going to
long; and under ANSI's value preserving rule, the test will be exactly the
same, even if the version member is larger than 16 bits.


Well, you don't know the kind of crappy proprietary compilers we need to deal with at work, and the ugly things they do to us :-) For example, the following will not compile without a warning:

  short  a = 3;
  short  b = 4;
  short  c = (short)(a - b);                /* warning !!  */
  short  d = (short)((short)a - (short)b);  /* compiles ok */

yes, this is totally hideous, but we need to deal with these. I
guarantee you that 0xFFFF and 0xFFFFU are really different for the
same compiler. Grrrrrrr !!

Cheers,

- David Turner
- The FreeType Project  (www.freetype.org)


Or course, the test against 0 IS very different!
Note that I did not check whether it was correct or not



Antoine



_______________________________________________
Devel mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/devel






reply via email to

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