Commit 5e240c1270785a5c4b41f47238ffab29799467c5

Werner Lemberg 2009-09-03T13:14:24

[raster] Improvements for stand-alone mode. * src/raster/rules.mk: Don't handle ftmisc.h. It is needed for stand-alone mode only. * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func, FT_Realloc_Func): Copy declarations from ftsystem.h.

diff --git a/ChangeLog b/ChangeLog
index 82ce4f5..d29249c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-03  Werner Lemberg  <wl@gnu.org>
+
+	[raster] Improvements for stand-alone mode.
+
+	* src/raster/rules.mk: Don't handle ftmisc.h.  It is needed for
+	stand-alone mode only.
+
+	* src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
+	FT_Realloc_Func): Copy declarations from ftsystem.h.
+
 2009-09-02  Bram Tassyns  <bramt@enfocus.be>
 
 	Improve vertical metrics calculation (Savannah bug #27364).
diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h
index d9d73e3..f04b540 100644
--- a/src/raster/ftmisc.h
+++ b/src/raster/ftmisc.h
@@ -52,6 +52,31 @@
               (FT_ULong)_x4         )
 
 
+  /* from include/freetype2/ftsystem.h */
+
+  typedef struct FT_MemoryRec_*  FT_Memory;
+
+  typedef void* (*FT_Alloc_Func)( FT_Memory  memory,
+                                  long       size );
+
+  typedef void (*FT_Free_Func)( FT_Memory  memory,
+                                void*      block );
+
+  typedef void* (*FT_Realloc_Func)( FT_Memory  memory,
+                                    long       cur_size,
+                                    long       new_size,
+                                    void*      block );
+
+  typedef struct FT_MemoryRec_
+  {
+    void*            user;
+
+    FT_Alloc_Func    alloc;
+    FT_Free_Func     free;
+    FT_Realloc_Func  realloc;
+
+  } FT_MemoryRec;
+
   /* from src/ftcalc.c */
 
 #include <inttypes.h>
diff --git a/src/raster/rules.mk b/src/raster/rules.mk
index 43a9af2..9703b12 100644
--- a/src/raster/rules.mk
+++ b/src/raster/rules.mk
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2000, 2001, 2003, 2008 by
+# Copyright 1996-2000, 2001, 2003, 2008, 2009 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -31,7 +31,6 @@ RASTER_DRV_SRC := $(RASTER_DIR)/ftraster.c \
 # raster driver headers
 #
 RASTER_DRV_H := $(RASTER_DRV_SRC:%.c=%.h) \
-                $(RASTER_DIR)/ftmisc.h    \
                 $(RASTER_DIR)/rasterrs.h