* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
diff --git a/ChangeLog b/ChangeLog
index 9a8a7ea..d1e2e50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-10-13 Werner Lemberg <wl@gnu.org>
+
+ * 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 <jneal@csdaily.com>
* 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 297d6f0..448ae4b 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -33,6 +33,11 @@
#define __FTSTDLIB_H__
+#include <stddef.h>
+
+#define ft_ptrdiff_t ptrdiff_t
+
+
/**********************************************************************/
/* */
/* integer limits */
diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h
index e47f002..7727ebb 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 ad29dd5..34ad12b 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 7ec163a..9355288 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 */