From 023a4bf3bee24599ae0760042685f18624860641 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 14 Oct 2004 11:33:04 +0000 Subject: [PATCH] * include/freetype/config/ftstdlib.h: Include `stddef.h'. (ft_ptrdiff_t): Define. * include/freetype/fttypes.h (FT_PtrDist): Use `ft_ptrdiff_t'. * src/cid/cidload.c (cid_parse_dict), src/type1/t1load.c (parse_dict): Fix compiler warning. --- ChangeLog | 10 ++++++++++ include/freetype/config/ftstdlib.h | 5 +++++ include/freetype/fttypes.h | 2 +- src/cid/cidload.c | 4 ++-- src/type1/t1load.c | 6 +++--- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a8a7eac2..d1e2e5072 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-10-13 Werner Lemberg + + * include/freetype/config/ftstdlib.h: Include `stddef.h'. + (ft_ptrdiff_t): Define. + + * include/freetype/fttypes.h (FT_PtrDist): Use `ft_ptrdiff_t'. + + * src/cid/cidload.c (cid_parse_dict), src/type1/t1load.c + (parse_dict): Fix compiler warning. + 2004-10-11 Joshua Neal * src/sfnt/ttcmap.c (tt_face_build_cmaps): Check for pointer diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h index 297d6f017..448ae4bf5 100644 --- a/include/freetype/config/ftstdlib.h +++ b/include/freetype/config/ftstdlib.h @@ -33,6 +33,11 @@ #define __FTSTDLIB_H__ +#include + +#define ft_ptrdiff_t ptrdiff_t + + /**********************************************************************/ /* */ /* integer limits */ diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h index e47f00266..7727ebb55 100644 --- a/include/freetype/fttypes.h +++ b/include/freetype/fttypes.h @@ -325,7 +325,7 @@ FT_BEGIN_HEADER /* largest _signed_ integer type used to express the distance */ /* between two pointers. */ /* */ - typedef size_t FT_PtrDist; + typedef ft_ptrdiff_t FT_PtrDist; /*************************************************************************/ diff --git a/src/cid/cidload.c b/src/cid/cidload.c index ad29dd52d..34ad12b45 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -324,8 +324,8 @@ if ( !name ) break; - if ( cur[0] == name[0] && - len == ft_strlen( (const char*)name ) ) + if ( cur[0] == name[0] && + len == (FT_PtrDist)ft_strlen( (const char*)name ) ) { FT_PtrDist n; diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 7ec163ad5..9355288d0 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1820,9 +1820,9 @@ if ( !name ) break; - if ( cur[0] == name[0] && - len == ft_strlen( (const char *)name ) && - ft_memcmp( cur, name, len ) == 0 ) + if ( cur[0] == name[0] && + len == (FT_PtrDist)ft_strlen( (const char *)name ) && + ft_memcmp( cur, name, len ) == 0 ) { /* We found it -- run the parsing callback! */ /* We only record the first instance of any */