Commit de271ab8f027cb35806b3f566cde91722499752e

David Turner 2006-02-25T14:53:02

* builds/unix/ftsystem.c, include/freetype/config/ftheader.h, include/freetype/internal/services/svotval.h, include/freetype/internal/services/svpfr.h, src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c, src/smooth/ftgrays.c: solved -Wmissing-prototypes warnings with GCC

diff --git a/ChangeLog b/ChangeLog
index e66bbda..42b173c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,17 @@
 
        solved compiler warnings as well as C++ compilation problems
 
+    * builds/unix/ftsystem.c, include/freetype/config/ftheader.h,
+    include/freetype/internal/services/svotval.h,
+    include/freetype/internal/services/svpfr.h,
+    src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c,
+    src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
+    src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c,
+    src/smooth/ftgrays.c:
+
+       solved -Wmissing-prototypes warnings with GCC
+
+
 
 2006-02-24  Chia-I Wu  <b90201047@ntu.edu.tw>
 
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index 81a45eb..754bbe8 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -23,7 +23,7 @@
 #include FT_SYSTEM_H
 #include FT_ERRORS_H
 #include FT_TYPES_H
-#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_STREAM_H
 
   /* memory-mapping includes and definitions */
 #ifdef HAVE_UNISTD_H
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index 4062fdb..d5dcd0d 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -602,6 +602,19 @@
    */
 #define FT_GX_VALIDATE_H  <freetype/ftgxval.h>
 
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_PFR_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API used to access PFR-specific data.
+   *
+   */
+#define FT_PFR_H  <freetype/ftpfr.h>
+
+
 
   /* */
 
diff --git a/include/freetype/internal/services/svotval.h b/include/freetype/internal/services/svotval.h
index fbe45d0..435761d 100644
--- a/include/freetype/internal/services/svotval.h
+++ b/include/freetype/internal/services/svotval.h
@@ -19,6 +19,8 @@
 #ifndef __SVOTVAL_H__
 #define __SVOTVAL_H__
 
+#include FT_OPENTYPE_VALIDATE_H
+#include FT_INTERNAL_VALIDATE_H
 
 FT_BEGIN_HEADER
 
diff --git a/include/freetype/internal/services/svpfr.h b/include/freetype/internal/services/svpfr.h
index b610505..4c93f1f 100644
--- a/include/freetype/internal/services/svpfr.h
+++ b/include/freetype/internal/services/svpfr.h
@@ -19,6 +19,7 @@
 #ifndef __SVPFR_H__
 #define __SVPFR_H__
 
+#include FT_PFR_H
 #include FT_INTERNAL_SERVICE_H
 
 
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index b7fb5f9..8900e95 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -28,6 +28,7 @@
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
 #include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
 #include FT_SYSTEM_H
 #include FT_ERRORS_H
 #include FT_TYPES_H
@@ -213,7 +214,7 @@
   }
 
 
-  /* documentation is in ftobjs.h */
+  /* documentation is in ftstream.h */
 
   FT_BASE_DEF( FT_Error )
   FT_Stream_Open( FT_Stream    stream,
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 39198eb..b03c8d0 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -337,7 +337,7 @@ THE SOFTWARE.
     BDF_Face       face   = (BDF_Face)bdfface;
     FT_Memory      memory = FT_FACE_MEMORY( face );
 
-    bdf_font_t*    font;
+    bdf_font_t*    font = NULL;
     bdf_options_t  options;
 
     FT_UNUSED( num_params );
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 9a7fa54..cff8be5 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -385,20 +385,12 @@
 
 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
 
-  FT_EXPORT_DEF( FT_Error )
-  FTC_Image_Cache_New( FTC_Manager      manager,
-                       FTC_ImageCache  *acache )
-  {
-    return FTC_ImageCache_New( manager, (FTC_ImageCache*)acache );
-  }
-
-
   /* yet another backwards-legacy structure */
   typedef struct  FTC_OldImage_Desc_
   {
     FTC_FontRec  font;
     FT_UInt      image_type;
-    
+
   } FTC_OldImage_Desc;
 
 
@@ -434,7 +426,7 @@
     typ->face_id = desc->font.face_id;
     typ->width   = desc->font.pix_width;
     typ->height  = desc->font.pix_height;
-    
+
     /* convert image type flags to load flags */
     {
       FT_UInt  load_flags = FT_LOAD_DEFAULT;
@@ -473,7 +465,27 @@
 
       typ->flags = load_flags;
     }
-  }                                
+  }
+
+
+  FT_EXPORT( FT_Error )
+  FTC_Image_Cache_New( FTC_Manager      manager,
+                       FTC_ImageCache  *acache );
+
+  FT_EXPORT( FT_Error )
+  FTC_Image_Cache_Lookup( FTC_ImageCache      icache,
+                          FTC_OldImage_Desc*  desc,
+                          FT_UInt             gindex,
+                          FT_Glyph           *aglyph );
+
+
+  FT_EXPORT_DEF( FT_Error )
+  FTC_Image_Cache_New( FTC_Manager      manager,
+                       FTC_ImageCache  *acache )
+  {
+    return FTC_ImageCache_New( manager, (FTC_ImageCache*)acache );
+  }
+
 
 
   FT_EXPORT_DEF( FT_Error )
@@ -642,6 +654,17 @@
 
 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
 
+  FT_EXPORT( FT_Error )
+  FTC_SBit_Cache_New( FTC_Manager     manager,
+                      FTC_SBitCache  *acache );
+
+  FT_EXPORT( FT_Error )
+  FTC_SBit_Cache_Lookup( FTC_SBitCache       cache,
+                         FTC_OldImage_Desc*  desc,
+                         FT_UInt             gindex,
+                         FTC_SBit           *ansbit );
+
+
   FT_EXPORT_DEF( FT_Error )
   FTC_SBit_Cache_New( FTC_Manager     manager,
                       FTC_SBitCache  *acache )
@@ -657,11 +680,11 @@
                          FTC_SBit           *ansbit )
   {
     FTC_ImageTypeRec  type0;
-    
+
 
     if ( !desc )
       return FT_Err_Invalid_Argument;
-      
+
     ftc_image_type_from_old_desc( &type0, desc );
 
     return FTC_SBitCache_Lookup( (FTC_SBitCache)cache,
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index a486d34..cfaaebc 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -119,7 +119,7 @@
   /*************************************************************************/
   /*************************************************************************/
 
-  const char *
+  FT_CALLBACK_DEF( const char* )
   cff_sid_to_glyph_name( CFF_Font  cff,
                          FT_UInt   idx )
   {
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index ff0753f..6f7bad7 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -24,6 +24,7 @@
 #include FT_INTERNAL_MEMORY_H
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_DEBUG_H
+#include FT_GZIP_H
 #include <string.h>
 
 
diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c
index 5d23cd2..f28a41e 100644
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -26,6 +26,7 @@
 #include FT_INTERNAL_MEMORY_H
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_DEBUG_H
+#include FT_LZW_H
 #include <string.h>
 #include <stdio.h>
 
diff --git a/src/lzw/ftlzw2.c b/src/lzw/ftlzw2.c
index b1239dd..6df37f4 100644
--- a/src/lzw/ftlzw2.c
+++ b/src/lzw/ftlzw2.c
@@ -26,6 +26,7 @@
 #include FT_INTERNAL_MEMORY_H
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_DEBUG_H
+#include FT_LZW_H
 #include <string.h>
 #include <stdio.h>
 
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 98816f2..79e58dd 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -257,7 +257,7 @@
   /*************************************************************************/
   /*************************************************************************/
 
-  const char *
+  FT_CALLBACK_DEF( const char * )
   t1_get_glyph_name( T1_Face  face,
                      FT_UInt  idx )
   {
diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c
index 9372384..ab69d65 100644
--- a/src/sfnt/ttbdf.c
+++ b/src/sfnt/ttbdf.c
@@ -85,6 +85,8 @@
       FT_UInt    version     = FT_NEXT_USHORT( p );
       FT_UInt    num_strikes = FT_NEXT_USHORT( p );
       FT_UInt32  strings     = FT_NEXT_ULONG ( p );
+      FT_UInt    count;
+      FT_Byte*   strike;
 
 
       if ( version != 0x0001                 ||
@@ -98,13 +100,10 @@
       bdf->num_strikes  = num_strikes;
       bdf->strings      = bdf->table + strings;
       bdf->strings_size = length - strings;
-    }
 
-    /* check the strike descriptors */
-    {
-      FT_UInt   count  = bdf->num_strikes;
-      FT_Byte*  p      = bdf->table + 8;
-      FT_Byte*  strike = p + count * 4;
+      count  = bdf->num_strikes;
+      p      = bdf->table + 8;
+      strike = p + count * 4;
 
 
       for ( ; count > 0; count-- )
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 9911915..8c6699d 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1959,7 +1959,7 @@
   }
 
 
-  extern int
+  static int
   gray_raster_render( PRaster                  raster,
                       const FT_Raster_Params*  params )
   {