From 4b9234b8a2d77864465f001ca5cb1176ec92813a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 25 Feb 2015 06:31:43 +0100 Subject: [PATCH] [cache] Don't use `labs'. This is the only place in FreeType where this function was used. * include/config/ftstdlib.h (ft_labs): Remove. * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with `FT_ABS'. --- ChangeLog | 11 +++++++++++ include/config/ftstdlib.h | 3 +-- src/cache/ftcimage.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc09a0f4d..e986e2794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-02-25 Werner Lemberg + + [cache] Don't use `labs'. + + This is the only place in FreeType where this function was used. + + * include/config/ftstdlib.h (ft_labs): Remove. + + * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with + `FT_ABS'. + 2015-02-23 Werner Lemberg [cache] Replace `FT_PtrDist' with `FT_Offset'. diff --git a/include/config/ftstdlib.h b/include/config/ftstdlib.h index af7aaaf98..8ef43c04b 100644 --- a/include/config/ftstdlib.h +++ b/include/config/ftstdlib.h @@ -141,8 +141,7 @@ /**********************************************************************/ -#define ft_atol atol -#define ft_labs labs +#define ft_atol atol /**********************************************************************/ diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index 88dc901c6..f258764e0 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -122,7 +122,7 @@ bitg = (FT_BitmapGlyph)glyph; - size = bitg->bitmap.rows * ft_labs( bitg->bitmap.pitch ) + + size = bitg->bitmap.rows * (FT_Offset)FT_ABS( bitg->bitmap.pitch ) + sizeof ( *bitg ); } break;