Commit 861ba624db9df65529a11718d3eabc45b124dbeb

David Turner 2000-02-15T12:54:51

small fix (reduce compiler warnings)

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;
   }