diff options
author | David Turner <david@freetype.org> | 2001-06-14 12:34:00 +0000 |
---|---|---|
committer | David Turner <david@freetype.org> | 2001-06-14 12:34:00 +0000 |
commit | ac6cc419df0152635374fbcc499a61e108c73238 (patch) | |
tree | 48fc96671a896688ab19fa3e76290c5d83cca88d /include/freetype/internal/ftcalc.h | |
parent | 1b3a0014e2ebad50efb6a0c1d7948a3c7ffc21a2 (diff) | |
download | freetype2-ac6cc419df0152635374fbcc499a61e108c73238.tar.gz |
modified the TrueType interpreter to let it
use the new trigonometric functions provided in "fttrigon.h". This
gets rid of some old 64-bit computation routines, as well as many
warnings when compiling the library with the "long long" 64-bit
integer type.
Diffstat (limited to 'include/freetype/internal/ftcalc.h')
-rw-r--r-- | include/freetype/internal/ftcalc.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index 477083fbb..e47f4024e 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -27,18 +27,19 @@ FT_BEGIN_HEADER -#ifdef FT_LONG64 +/* OLD 64-bits internal API */ +#ifdef FT_CONFIG_OPTION_OLD_CALCS + +# ifdef FT_LONG64 typedef FT_INT64 FT_Int64; -#define ADD_64( x, y, z ) z = (x) + (y) -#define MUL_64( x, y, z ) z = (FT_Int64)(x) * (y) -#define DIV_64( x, y ) ( (x) / (y) ) +# define ADD_64( x, y, z ) z = (x) + (y) +# define MUL_64( x, y, z ) z = (FT_Int64)(x) * (y) +# define DIV_64( x, y ) ( (x) / (y) ) -#ifdef FT_CONFIG_OPTION_OLD_CALCS - -#define SQRT_64( z ) FT_Sqrt64( z ) +# define SQRT_64( z ) FT_Sqrt64( z ) /*************************************************************************/ /* */ @@ -58,10 +59,8 @@ FT_BEGIN_HEADER /* */ FT_EXPORT( FT_Int32 ) FT_Sqrt64( FT_Int64 l ); -#endif /* FT_CONFIG_OPTION_OLD_CALCS */ - -#else /* FT_LONG64 */ +# else /* !FT_LONG64 */ typedef struct FT_Int64_ @@ -72,9 +71,9 @@ FT_BEGIN_HEADER } FT_Int64; -#define ADD_64( x, y, z ) FT_Add64( &x, &y, &z ) -#define MUL_64( x, y, z ) FT_MulTo64( x, y, &z ) -#define DIV_64( x, y ) FT_Div64by32( &x, y ) +# define ADD_64( x, y, z ) FT_Add64( &x, &y, &z ) +# define MUL_64( x, y, z ) FT_MulTo64( x, y, &z ) +# define DIV_64( x, y ) FT_Div64by32( &x, y ) /*************************************************************************/ @@ -146,9 +145,7 @@ FT_BEGIN_HEADER FT_Int32 y ); -#ifdef FT_CONFIG_OPTION_OLD_CALCS - -#define SQRT_64( z ) FT_Sqrt64( &z ) +# define SQRT_64( z ) FT_Sqrt64( &z ) /*************************************************************************/ /* */ @@ -168,10 +165,10 @@ FT_BEGIN_HEADER /* */ FT_EXPORT( FT_Int32 ) FT_Sqrt64( FT_Int64* x ); -#endif /* FT_CONFIG_OPTION_OLD_CALCS */ +# endif /* !FT_LONG64 */ +#endif /* FT_CONFIG_OPTION_OLD_CALCS */ -#endif /* FT_LONG64 */ FT_EXPORT( FT_Int32 ) FT_SqrtFixed( FT_Int32 x ); |