aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/cff/cf2fixed.h
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/cff/cf2fixed.h')
-rw-r--r--freetype/src/cff/cf2fixed.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/freetype/src/cff/cf2fixed.h b/freetype/src/cff/cf2fixed.h
index ed1452a7d..d6d9faf8e 100644
--- a/freetype/src/cff/cf2fixed.h
+++ b/freetype/src/cff/cf2fixed.h
@@ -57,22 +57,22 @@ FT_BEGIN_HEADER
/* in C 89, left and right shift of negative numbers is */
/* implementation specific behaviour in the general case */
-#define cf2_intToFixed( i ) \
+#define cf2_intToFixed( i ) \
( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )
-#define cf2_fixedToInt( x ) \
+#define cf2_fixedToInt( x ) \
( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
-#define cf2_fixedRound( x ) \
- ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) )
-#define cf2_floatToFixed( f ) \
+#define cf2_fixedRound( x ) \
+ ( (CF2_Fixed)( ( (FT_UInt32)(x) + 0x8000U ) & 0xFFFF0000UL ) )
+#define cf2_floatToFixed( f ) \
( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )
-#define cf2_fixedAbs( x ) \
+#define cf2_fixedAbs( x ) \
( (x) < 0 ? -(x) : (x) )
-#define cf2_fixedFloor( x ) \
- ( (CF2_Fixed)( (x) & 0xFFFF0000L ) )
-#define cf2_fixedFraction( x ) \
+#define cf2_fixedFloor( x ) \
+ ( (CF2_Fixed)( (FT_UInt32)(x) & 0xFFFF0000UL ) )
+#define cf2_fixedFraction( x ) \
( (x) - cf2_fixedFloor( x ) )
-#define cf2_fracToFixed( x ) \
- ( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \
+#define cf2_fracToFixed( x ) \
+ ( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \
: ( ( (x) + 0x2000 ) >> 14 ) )