Make compilation with FT_CONFIG_OPTION_PIC work again. * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]: Declare `library' for FT_BITMAP_GLYPH_CLASS_GET. * src/base/ftinit.c (ft_destroy_default_module_classes, ft_create_default_module_classes): Use proper casts (needed for C++ compilation). * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
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
diff --git a/ChangeLog b/ChangeLog
index 0bcc636..2e55776 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-31 Lars Abrahamsson <wonko@opera.com>
+
+ Make compilation with FT_CONFIG_OPTION_PIC work again.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
+ Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.
+
+ * src/base/ftinit.c (ft_destroy_default_module_classes,
+ ft_create_default_module_classes): Use proper casts (needed for C++
+ compilation).
+
+ * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
+
2009-12-22 Marc Kleine-Budde <mkl@pengutronix.de>
Make freetype-config aware of $SYSROOT.
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index ef61d45..3505d6d 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -372,7 +372,7 @@
if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
clazz = FT_BITMAP_GLYPH_CLASS_GET;
- /* it it is an outline too */
+ /* if it is an outline */
else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
clazz = FT_OUTLINE_GLYPH_CLASS_GET;
@@ -515,6 +515,10 @@
const FT_Glyph_Class* clazz;
+#ifdef FT_CONFIG_OPTION_PIC
+ FT_Library library = FT_GLYPH( glyph )->library;
+#endif
+
/* check argument */
if ( !the_glyph )
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index ef13503..f94f25a 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -115,7 +115,7 @@
FT_Module_Class** classes;
FT_Memory memory;
FT_UInt i;
- BasePIC* pic_container = library->pic_container.base;
+ BasePIC* pic_container = (BasePIC*)library->pic_container.base;
if ( !pic_container->default_module_classes )
return;
@@ -145,7 +145,7 @@
FT_Module_Class** classes;
FT_Module_Class* clazz;
FT_UInt i;
- BasePIC* pic_container = library->pic_container.base;
+ BasePIC* pic_container = (BasePIC*)library->pic_container.base;
memory = library->memory;
pic_container->default_module_classes = 0;
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 26ea83c..b283f6d 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -2574,10 +2574,7 @@
}
- FT_CALLBACK_TABLE_DEF
- const TT_CMap_ClassRec tt_cmap13_class_rec =
- {
- {
+ FT_DEFINE_TT_CMAP(tt_cmap13_class_rec,
sizeof ( TT_CMap13Rec ),
(FT_CMap_InitFunc) tt_cmap13_init,
@@ -2586,11 +2583,11 @@
(FT_CMap_CharNextFunc) tt_cmap13_char_next,
NULL, NULL, NULL, NULL, NULL
- },
+ ,
13,
(TT_CMap_ValidateFunc) tt_cmap13_validate,
(TT_CMap_Info_GetFunc) tt_cmap13_get_info
- };
+ )
#endif /* TT_CONFIG_CMAP_FORMAT_13 */