small fix (reduce compiler warnings)
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
diff --git a/src/base/ftdriver.h b/src/base/ftdriver.h
index ff8e6b2..128a484 100644
--- a/src/base/ftdriver.h
+++ b/src/base/ftdriver.h
@@ -72,6 +72,7 @@
/* */
typedef FT_Error (*FTDriver_doneDriver)( FT_Driver driver );
+
/*************************************************************************/
/* */
@@ -100,8 +101,11 @@
/* isn't available (i.e., wasn't compiled in the driver at build */
/* time). */
/* */
- typedef void* (*FTDriver_getInterface)( FT_Driver driver,
- const FT_String* interface );
+ typedef void (*FTDriver_Interface)( void );
+
+ typedef FTDriver_Interface (*FTDriver_getInterface)
+ ( FT_Driver driver,
+ const FT_String* interface );
/*************************************************************************/
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 0fb604e..f7a27a2 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -206,9 +206,9 @@
if ( n_contours > load->left_contours )
{
FT_TRACE0(( "ERROR: Glyph index %ld has %d contours > left %d\n",
- subg->index,
+ load->glyph_index,
n_contours,
- left_contours ));
+ load->left_contours ));
return TT_Err_Too_Many_Contours;
}
@@ -236,7 +236,7 @@
if ( n_points > load->left_points )
{
- FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", subg->index ));
+ FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", load->glyph_index ));
error = TT_Err_Too_Many_Points;
goto Fail;
}
@@ -478,6 +478,7 @@
goto Fail;
}
+ loader->glyph_index = glyph_index;
num_contours = 0;
num_points = 0;
ins_offset = 0;
diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h
index 3dcdabf..ac4f29e 100644
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -36,6 +36,7 @@
TT_GlyphSlot glyph;
TT_ULong load_flags;
+ TT_UInt glyph_index;
FT_Stream stream;
TT_Int byte_len;
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 8b673b7..abd19b8 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -44,7 +44,7 @@
len = p - *start;
if (len > 0 && len < 64)
{
- FT_UInt n;
+ FT_Int n;
/* copy glyph name to intermediate array */
MEM_Copy( temp, start, len );
@@ -124,8 +124,8 @@
if ( !ACCESS_Frame(stream->size) )
return error;
- start = stream->cursor;
- limit = stream->limit;
+ start = (FT_Byte*)stream->cursor;
+ limit = (FT_Byte*)stream->limit;
p = start;
/* we are now going to count the occurences of "KP" or "KPX" in */
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 486e03c..d2fb29f 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -55,11 +55,11 @@
/* time). */
/* */
static
- void* Get_Interface( FT_Driver driver,
- const FT_String* interface )
+ FTDriver_Interface Get_Interface( FT_Driver driver,
+ const FT_String* interface )
{
if ( strcmp( (const char*)interface, "attach_file" ) == 0 )
- return T1_Read_AFM;
+ return (FTDriver_Interface)T1_Read_AFM;
return 0;
}