shithub: freetype+ttf2subf

Download patch

ref: 0d02317fb2a6f46e568cefc1132273cdd1bc80b7
parent: a6990d06123ca494521858d45fdf406b8fa94bb8
author: Werner Lemberg <[email protected]>
date: Thu Jul 9 05:21:46 EDT 2009

[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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-09  Werner Lemberg  <[email protected]>
+
+	[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  <[email protected]>
 
 	Register a trace component for ftgloadr.c.
--- 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,