ref: f9be567f5f6703e68980761f54ef3d896b63185b
parent: 1cdac10d3a03d00b1355bd47e9bfacb9f1a990e9
author: Werner Lemberg <[email protected]>
date: Thu Jul 9 11:10:31 EDT 2015
Better support of user-supplied C++ namespaces. See http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose header files that contain FT_{BEGIN,END}_HEADER macros by themselves. * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include FT_CONFIG_STANDARD_LIBRARY_H earlier. * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2015-07-09 Werner Lemberg <[email protected]>
+
+ Better support of user-supplied C++ namespaces.
+
+ See
+
+ http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
+
+ for a rationale.
+
+ * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
+ src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
+ src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
+ (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
+ header files that contain FT_{BEGIN,END}_HEADER macros by
+ themselves.
+
+ * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
+ FT_CONFIG_STANDARD_LIBRARY_H earlier.
+
+ * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
+
2015-07-07 Werner Lemberg <[email protected]>
[sfnt] Make `tt_face_get_name' member of the SFNT interface.
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -20,8 +20,6 @@
#define __AFPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
@@ -43,6 +41,8 @@
#include "aftypes.h"
+FT_BEGIN_HEADER
+
typedef struct AFModulePIC_
{
FT_ServiceDescRec* af_services;
@@ -93,11 +93,11 @@
FT_Error
autofit_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __AFPIC_H__ */
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -41,7 +41,11 @@
#include "afblue.h"
+#ifdef FT_DEBUG_AUTOFIT
+#include FT_CONFIG_STANDARD_LIBRARY_H
+#endif
+
FT_BEGIN_HEADER
/*************************************************************************/
@@ -53,8 +57,6 @@
/*************************************************************************/
#ifdef FT_DEBUG_AUTOFIT
-
-#include FT_CONFIG_STANDARD_LIBRARY_H
extern int _af_debug_disable_horz_hints;
extern int _af_debug_disable_vert_hints;
--- a/src/base/basepic.h
+++ b/src/base/basepic.h
@@ -20,10 +20,9 @@
#define __BASEPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class
@@ -43,6 +42,8 @@
#endif
+FT_BEGIN_HEADER
+
typedef struct BasePIC_
{
FT_Module_Class** default_module_classes;
@@ -78,11 +79,11 @@
FT_Error
ft_base_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __BASEPIC_H__ */
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -20,8 +20,6 @@
#define __CFFPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
@@ -49,6 +47,8 @@
#include FT_SERVICE_PROPERTIES_H
+FT_BEGIN_HEADER
+
typedef struct CffModulePIC_
{
FT_ServiceDescRec* cff_services;
@@ -96,11 +96,11 @@
FT_Error
cff_driver_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __CFFPIC_H__ */
--- a/src/pshinter/pshpic.h
+++ b/src/pshinter/pshpic.h
@@ -20,8 +20,6 @@
#define __PSHPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
@@ -33,6 +31,8 @@
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+FT_BEGIN_HEADER
+
typedef struct PSHinterPIC_
{
PSHinter_Interface pshinter_interface;
@@ -51,11 +51,11 @@
FT_Error
pshinter_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __PSHPIC_H__ */
--- a/src/psnames/pspic.h
+++ b/src/psnames/pspic.h
@@ -20,10 +20,9 @@
#define __PSPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
#define PSCMAPS_SERVICES_GET pscmaps_services
@@ -33,6 +32,9 @@
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+
+FT_BEGIN_HEADER
+
typedef struct PSModulePIC_
{
FT_ServiceDescRec* pscmaps_services;
@@ -54,11 +56,11 @@
FT_Error
psnames_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __PSPIC_H__ */
--- a/src/raster/rastpic.h
+++ b/src/raster/rastpic.h
@@ -20,10 +20,10 @@
#define __RASTPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+
+FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
--- a/src/sfnt/sfntpic.h
+++ b/src/sfnt/sfntpic.h
@@ -20,8 +20,6 @@
#define __SFNTPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
@@ -55,6 +53,8 @@
#include "ttcmap.h"
+FT_BEGIN_HEADER
+
typedef struct sfntModulePIC_
{
FT_ServiceDescRec* sfnt_services;
@@ -99,11 +99,12 @@
FT_Error
sfnt_module_class_pic_init( FT_Library library );
+
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
#endif /* __SFNTPIC_H__ */
--- a/src/smooth/ftspic.h
+++ b/src/smooth/ftspic.h
@@ -20,9 +20,10 @@
#define __FTSPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+
+
+FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
--- a/src/truetype/ttpic.h
+++ b/src/truetype/ttpic.h
@@ -20,8 +20,9 @@
#define __TTPIC_H__
-FT_BEGIN_HEADER
+#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
#define TT_SERVICES_GET tt_services
@@ -37,6 +38,8 @@
#include FT_SERVICE_PROPERTIES_H
+FT_BEGIN_HEADER
+
typedef struct TTModulePIC_
{
FT_ServiceDescRec* tt_services;
@@ -68,12 +71,11 @@
FT_Error
tt_driver_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-
-FT_END_HEADER
#endif /* __TTPIC_H__ */