ref: 89a529f3176fc68415cc5e3ab50f89629fb269cd
parent: e8ed2d621e4182956488ce15c5611472345e63be
author: Werner Lemberg <[email protected]>
date: Fri Aug 2 10:50:23 EDT 2013
[autofit] Fix `make multi'. * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF): New macros. * src/autofit/afglobal.c (af_writing_system_classes, af_script_classes): Use FT_LOCAL_ARRAY_DEF. * src/autofit/afglobal.h: Declare `af_writing_system_classes' and `af_script_classes'. * src/autofit/afloader.c: Include `afpic.h'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-08-02 suzuki toshiya <[email protected]>
+ Werner Lemberg <[email protected]>
+
+ [autofit] Fix `make multi'.
+
+ * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
+ FT_LOCAL_ARRAY_DEF): New macros.
+
+ * src/autofit/afglobal.c (af_writing_system_classes,
+ af_script_classes): Use FT_LOCAL_ARRAY_DEF.
+ * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
+ `af_script_classes'.
+ * src/autofit/afloader.c: Include `afpic.h'.
+
2013-08-01 Werner Lemberg <[email protected]>
Another round of cppcheck nitpicks.
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -555,6 +555,9 @@
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -35,7 +35,8 @@
/* AF_WRITING_SYSTEM_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new writing systems */
- static AF_WritingSystemClass const af_writing_system_classes[] =
+ FT_LOCAL_ARRAY_DEF( AF_WritingSystemClass )
+ af_writing_system_classes[] =
{
&af_dummy_writing_system_class,
&af_latin_writing_system_class,
@@ -52,7 +53,8 @@
/* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new scripts */
- static AF_ScriptClass const af_script_classes[] =
+ FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
+ af_script_classes[] =
{
&af_dflt_script_class, /* XXX */
&af_latn_script_class,
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -28,6 +28,13 @@
FT_BEGIN_HEADER
+ FT_LOCAL_ARRAY( AF_WritingSystemClass )
+ af_writing_system_classes[];
+
+ FT_LOCAL_ARRAY( AF_ScriptClass )
+ af_script_classes[];
+
+
/*
* Default values and flags for both autofitter globals (found in
* AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -21,6 +21,7 @@
#include "afhints.h"
#include "aferrors.h"
#include "afmodule.h"
+#include "afpic.h"
/* Initialize glyph loader. */