freetype
[Top][All Lists]
Advanced

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

Re: Use of FT_Long (= unsigned long) in psaux module


From: Antoine Leca
Subject: Re: Use of FT_Long (= unsigned long) in psaux module
Date: Mon, 09 Oct 2000 11:20:18 +0200

Tom Kacvinsky wrote:
> 
> While tracking down some bugs in ft2, I noticed that the psaux module's
> t1decode.c is using FT_Long (= unsigned long)

Strange: I should have expected signed long; while unsigned long should
be FT_ULong.
But I did not actually look at the sources.

> in a few places where a 32 bit signed quantity is necessary. 

Sounds adequate to me.

> I write necessary because FT_Long is 64 bits long on a 64 bit box, and the
> calculations that occur are done with 32 bit ints in mind.

What is the perceived problem? Are you saying that a 64 bit box does not
adequately perform 32 bit calculations?
There are cases it may occurs (when the specs are specifying the way overflow
are to be handled), and in those cases, a masking operation of 0xFFFFFFFF on
the result is required, but *first* this should not be allowed on _signed_
operations, but rather an _unsigned_ one. However, I did not remember of this
case about 32 bits quantities, but rather about 16 bits ones.

Can you be more precise with the problem you see?


Antoine



reply via email to

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