From f9b0375002872fc8502cc87a65c8b16f6d48508c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 11 Sep 2000 22:50:13 +0000 Subject: [PATCH] small formatting issues. --- include/freetype/internal/ftcalc.h | 4 ++-- include/freetype/internal/ftmemory.h | 4 ++-- src/base/ftcalc.c | 7 +++++-- src/base/ftobjs.c | 10 +++++----- src/smooth/ftgrays.c | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index 45313f3fd..bfba538ab 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -34,7 +34,7 @@ #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 DIV_64( x, y ) ( (x) / (y) ) #ifdef FT_CONFIG_OPTION_OLD_CALCS @@ -74,7 +74,7 @@ #ifdef FT_CONFIG_OPTION_OLD_CALCS - FT_EXPORT_DEF(FT_Int32) FT_SqrtFixed( FT_Int32 x ); + FT_EXPORT_DEF( FT_Int32 ) FT_SqrtFixed( FT_Int32 x ); #define SQRT_64( z ) FT_Sqrt64( &z ) diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h index bb4dabc2a..48403ecb1 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/freetype/internal/ftmemory.h @@ -65,8 +65,8 @@ FT_Long size, void** P ); - BASE_DEF( void ) FT_Free( FT_Memory memory, - void** P ); + BASE_DEF( void ) FT_Free( FT_Memory memory, + void** P ); diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 7c4fc2e17..85c4116f7 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -296,8 +296,9 @@ } - FT_EXPORT_DEF(FT_Int32) FT_SqrtFixed( FT_Int32 x ) + FT_EXPORT_DEF( FT_Int32 ) FT_SqrtFixed( FT_Int32 x ) { + FT_Int64 z; z = (FT_Int64)(x) << 16; @@ -768,15 +769,17 @@ } - FT_EXPORT_DEF(FT_Int32) FT_SqrtFixed( FT_Int32 x ) + FT_EXPORT_DEF( FT_Int32 ) FT_SqrtFixed( FT_Int32 x ) { FT_Int64 z; + z.hi = (FT_UInt32)((FT_Int32)(x) >> 16); z.lo = (FT_UInt32)( x << 16 ); return FT_Sqrt64( &z ); } + #endif /* FT_CONFIG_OPTION_OLD_CALCS */ #endif /* FT_LONG64 */ diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index f3f762565..7a8694a61 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -1419,10 +1419,10 @@ FT_Bool external_stream; - /* test for valid `library' and `args' delayed to */ - /* ft_new_input_stream() */ + /* test for valid `library' delayed to */ + /* ft_new_input_stream() */ - if ( !aface ) + if ( !aface || !args ) return FT_Err_Invalid_Argument; *aface = 0; @@ -1438,7 +1438,7 @@ /* If the font driver is specified in the `args' structure, use */ /* it. Otherwise, we scan the list of registered drivers. */ - if ( args->flags & ft_open_driver && args->driver ) + if ( ( args->flags & ft_open_driver ) && args->driver ) { driver = FT_DRIVER( args->driver ); @@ -1508,7 +1508,7 @@ } Success: - FT_TRACE4(( "FT_New_Face: New face object, adding to list\n" )); + FT_TRACE4(( "FT_Open_Face: New face object, adding to list\n" )); /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */ if ( external_stream ) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 17b9ffe0d..442939f01 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1740,7 +1740,7 @@ if ( ras.max_ex > 24 || ras.max_ey > 24 ) level++; if ( ras.max_ex > 120 || ras.max_ey > 120 ) - level ++; + level++; ras.conic_level <<= level; ras.cubic_level <<= level;