re-fixed FTC_Manager_Done :-)
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
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 );
}