Commit 940d30640f72e9c2bd0ee6b8ec15de78cd59eb47

David Turner 2000-12-05T23:07:16

re-fixed FTC_Manager_Done :-)

diff --git a/include/freetype/config/ft2build.h b/include/freetype/config/ft2build.h
index 629c399..9e84461 100644
--- a/include/freetype/config/ft2build.h
+++ b/include/freetype/config/ft2build.h
@@ -26,8 +26,8 @@
 /*     #ifndef __FT_BUILD_UNIX_H__                                         */
 /*     #define __FT_BUILD_UNIX_H__                                         */
 /*                                                                         */
-/*     #define  FT_ROOT  freetype2                                         */
-/*     #include <FT_ROOT/config/ft2build.h>                                */
+/*     #define  FT2_ROOT  freetype2                                        */
+/*     #include <FT2_ROOT/config/ft2build.h>                               */
 /*                                                                         */
 /*     #endif // __FT_BUILD_UNIX_H__                                       */
 /*                                                                         */
@@ -101,23 +101,6 @@
 
   /*************************************************************************/
   /*                                                                       */
-  /* The macro FT2_COMPONENT_FILE is used to include a given FreeType 2    */
-  /* component source file (be it a header, a C source file, or an         */
-  /* included file).                                                       */
-  /*                                                                       */
-  /* Its first argument is the component/module's directory according to   */
-  /* the normal FreeType 2 source directory hierarchy, and the second one  */
-  /* the file name.                                                        */
-  /*                                                                       */
-  /* Note that you can also put all library source files in a single       */
-  /* directory and compile them normally by defining the macro             */
-  /* FT_FLAT_COMPILATION.                                                  */
-  /*                                                                       */
-#define FT2_COMPONENT_FILE( d, x )  <FT2_ROOT/d/x>
-
-
-  /*************************************************************************/
-  /*                                                                       */
   /* The macro FT2_SOURCE_FILE is used to include a given FreeType 2       */
   /* component source file (be it a header, a C source file, or an         */
   /* included file).                                                       */
@@ -130,10 +113,10 @@
   /* directory and compile them normally by defining the macro             */
   /* FT_FLAT_COMPILATION.                                                  */
   /*                                                                       */
-#ifdef  FT2_FLAT_COMPILATION
-#define FT2_SOURCE_FILE( d, x )  <d/x>
+#ifdef  FT_FLAT_COMPILATION
+#define FT_SOURCE_FILE( d, x )  <d/x>
 #else
-#define FT2_SOURCE_FILE( d, x )  "x"
+#define FT_SOURCE_FILE( d, x )  #x
 #endif
 
 
diff --git a/src/autohint/ahangles.c b/src/autohint/ahangles.c
index caf8348..ff70f43 100644
--- a/src/autohint/ahangles.c
+++ b/src/autohint/ahangles.c
@@ -19,16 +19,8 @@
 /*                                                                         */
 /***************************************************************************/
 
-
-#ifdef FT_FLAT_COMPILE
-
-#include "ahangles.h"
-
-#else
-
-#include <autohint/ahangles.h>
-
-#endif
+#include  <ft2build.h>
+#include  FT_SOURCE_FILE(autohint,ahangles.h)
 
 
   /* the following table has been automatically generated with */
diff --git a/src/autohint/ahangles.h b/src/autohint/ahangles.h
index cf5abea..4012614 100644
--- a/src/autohint/ahangles.h
+++ b/src/autohint/ahangles.h
@@ -20,28 +20,14 @@
 /***************************************************************************/
 
 
-#ifndef AHANGLES_H
-#define AHANGLES_H
+#ifndef __AHANGLES_H__
+#define __AHANGLES_H__
 
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_SOURCE_FILE(autohint,ahtypes.h)
 
-#ifdef FT_FLAT_COMPILE
-
-#include "ahtypes.h"
-
-#else
-
-#include <autohint/ahtypes.h>
-
-#endif
-
-
-#include <freetype/internal/ftobjs.h>
-
-
-#ifdef __cplusplus
-  extern "C" {
-#endif
-
+FT_BEGIN_HEADER
 
   /* PI expressed in ah_angles -- we don't really need an important */
   /* precision, so 256 should be enough                             */
@@ -62,12 +48,9 @@
   AH_Angle  ah_angle( FT_Vector*  v );
 
 
-#ifdef __cplusplus
-  }
-#endif
-
+FT_END_HEADER
 
-#endif /* AHANGLES_H */
+#endif /* __AHANGLES_H__ */
 
 
 /* END */
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 363b214..9b83c71 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -265,8 +265,8 @@
   Exit:
     if ( error && manager )
     {
-      FT_Lru_Done( manager->sizes_lru );
       FT_Lru_Done( manager->faces_lru );
+      FT_Lru_Done( manager->sizes_lru );
       FREE( manager );
     }
 
@@ -304,7 +304,7 @@
     manager->faces_lru = 0;
     
     FT_Lru_Done( manager->sizes_lru );
-    manager->sizes_lru;
+    manager->sizes_lru = 0;
 
     FREE( manager );
   }