Commit 0d02317fb2a6f46e568cefc1132273cdd1bc80b7

Werner Lemberg 2009-07-09T09:21:46

[ftraster] Make it compile again with -D_STANDALONE_. * src/raster/ftraster.c [_STANDALONE_]: Define FT_CONFIG_STANDARD_LIBRARY_H. Include `string.h'. Don't include `rastpic.h'. Define FT_DEFINE_RASTER_FUNCS.

diff --git a/ChangeLog b/ChangeLog
index c029c33..92b090f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-09  Werner Lemberg  <wl@gnu.org>
+
+	[ftraster] Make it compile again with -D_STANDALONE_.
+
+	* src/raster/ftraster.c [_STANDALONE_]: Define
+	FT_CONFIG_STANDARD_LIBRARY_H.
+	Include `string.h'.
+	Don't include `rastpic.h'.
+	Define FT_DEFINE_RASTER_FUNCS.
+
 2009-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	Register a trace component for ftgloadr.c.
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 0836cbc..40bb6e1 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -49,6 +49,10 @@
 
 #ifdef _STANDALONE_
 
+#define FT_CONFIG_STANDARD_LIBRARY_H  <stdlib.h>
+
+#include <string.h>
+
 #include "ftmisc.h"
 #include "ftimage.h"
 
@@ -58,9 +62,10 @@
 #include "ftraster.h"
 #include FT_INTERNAL_CALC_H   /* for FT_MulDiv only */
 
+#include "rastpic.h"
+
 #endif /* !_STANDALONE_ */
 
-#include "rastpic.h"
 
   /*************************************************************************/
   /*                                                                       */
@@ -200,8 +205,20 @@
 #define Raster_Err_Invalid      -4
 #define Raster_Err_Unsupported  -5
 
-#define ft_memset   memset
-
+#define ft_memset  memset
+
+#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_, raster_new_, \
+                                raster_reset_, raster_set_mode_,    \
+                                raster_render_, raster_done_ )      \
+          const FT_Raster_Funcs class_ =                            \
+          {                                                         \
+            glyph_format_,                                          \
+            raster_new_,                                            \
+            raster_reset_,                                          \
+            raster_set_mode_,                                       \
+            raster_render_,                                         \
+            raster_done_                                            \
+         };
 
 #else /* !_STANDALONE_ */
 
@@ -3494,7 +3511,7 @@
   }
 
 
-  FT_DEFINE_RASTER_FUNCS(ft_standard_raster,
+  FT_DEFINE_RASTER_FUNCS( ft_standard_raster,
     FT_GLYPH_FORMAT_OUTLINE,
     (FT_Raster_New_Func)     ft_black_new,
     (FT_Raster_Reset_Func)   ft_black_reset,