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.
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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
diff --git a/ChangeLog b/ChangeLog
index 76375f5..2827043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2015-07-09 Werner Lemberg <wl@gnu.org>
+
+ 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 <wl@gnu.org>
[sfnt] Make `tt_face_get_name' member of the SFNT interface.
diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h
index 25071e3..9b45069 100644
--- 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 @@ FT_BEGIN_HEADER
#include "aftypes.h"
+FT_BEGIN_HEADER
+
typedef struct AFModulePIC_
{
FT_ServiceDescRec* af_services;
@@ -93,12 +93,12 @@ FT_BEGIN_HEADER
FT_Error
autofit_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __AFPIC_H__ */
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 78e3fd7..fdf7978 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -41,6 +41,10 @@
#include "afblue.h"
+#ifdef FT_DEBUG_AUTOFIT
+#include FT_CONFIG_STANDARD_LIBRARY_H
+#endif
+
FT_BEGIN_HEADER
@@ -54,8 +58,6 @@ FT_BEGIN_HEADER
#ifdef FT_DEBUG_AUTOFIT
-#include FT_CONFIG_STANDARD_LIBRARY_H
-
extern int _af_debug_disable_horz_hints;
extern int _af_debug_disable_vert_hints;
extern int _af_debug_disable_blue_hints;
diff --git a/src/base/basepic.h b/src/base/basepic.h
index 51ecf9e..c5d7cbf 100644
--- 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 @@ FT_BEGIN_HEADER
#endif
+FT_BEGIN_HEADER
+
typedef struct BasePIC_
{
FT_Module_Class** default_module_classes;
@@ -78,12 +79,12 @@ FT_BEGIN_HEADER
FT_Error
ft_base_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __BASEPIC_H__ */
diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h
index a29620e..9a221a7 100644
--- 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 @@ FT_BEGIN_HEADER
#include FT_SERVICE_PROPERTIES_H
+FT_BEGIN_HEADER
+
typedef struct CffModulePIC_
{
FT_ServiceDescRec* cff_services;
@@ -96,12 +96,12 @@ FT_BEGIN_HEADER
FT_Error
cff_driver_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __CFFPIC_H__ */
diff --git a/src/pshinter/pshpic.h b/src/pshinter/pshpic.h
index 62de457..ca35cd6 100644
--- 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 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+FT_BEGIN_HEADER
+
typedef struct PSHinterPIC_
{
PSHinter_Interface pshinter_interface;
@@ -51,12 +51,12 @@ FT_BEGIN_HEADER
FT_Error
pshinter_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __PSHPIC_H__ */
diff --git a/src/psnames/pspic.h b/src/psnames/pspic.h
index 88ccda3..443225a 100644
--- 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 @@ FT_BEGIN_HEADER
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+
+FT_BEGIN_HEADER
+
typedef struct PSModulePIC_
{
FT_ServiceDescRec* pscmaps_services;
@@ -54,12 +56,12 @@ FT_BEGIN_HEADER
FT_Error
psnames_module_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __PSPIC_H__ */
diff --git a/src/raster/rastpic.h b/src/raster/rastpic.h
index a875884..c12d75b 100644
--- a/src/raster/rastpic.h
+++ b/src/raster/rastpic.h
@@ -20,11 +20,11 @@
#define __RASTPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+FT_BEGIN_HEADER
+
#ifndef FT_CONFIG_OPTION_PIC
#define FT_STANDARD_RASTER_GET ft_standard_raster
diff --git a/src/sfnt/sfntpic.h b/src/sfnt/sfntpic.h
index 82d7427..d99be6a 100644
--- 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 @@ FT_BEGIN_HEADER
#include "ttcmap.h"
+FT_BEGIN_HEADER
+
typedef struct sfntModulePIC_
{
FT_ServiceDescRec* sfnt_services;
@@ -99,12 +99,13 @@ FT_BEGIN_HEADER
FT_Error
sfnt_module_class_pic_init( FT_Library library );
+
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-FT_END_HEADER
-
#endif /* __SFNTPIC_H__ */
diff --git a/src/smooth/ftspic.h b/src/smooth/ftspic.h
index 99b9f0e..071afcf 100644
--- a/src/smooth/ftspic.h
+++ b/src/smooth/ftspic.h
@@ -20,10 +20,11 @@
#define __FTSPIC_H__
-FT_BEGIN_HEADER
-
#include FT_INTERNAL_PIC_H
+
+FT_BEGIN_HEADER
+
#ifndef FT_CONFIG_OPTION_PIC
#define FT_GRAYS_RASTER_GET ft_grays_raster
diff --git a/src/truetype/ttpic.h b/src/truetype/ttpic.h
index 48ba4aa..076ae56 100644
--- a/src/truetype/ttpic.h
+++ b/src/truetype/ttpic.h
@@ -20,7 +20,8 @@
#define __TTPIC_H__
-FT_BEGIN_HEADER
+#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
@@ -37,6 +38,8 @@ FT_BEGIN_HEADER
#include FT_SERVICE_PROPERTIES_H
+FT_BEGIN_HEADER
+
typedef struct TTModulePIC_
{
FT_ServiceDescRec* tt_services;
@@ -68,13 +71,12 @@ FT_BEGIN_HEADER
FT_Error
tt_driver_class_pic_init( FT_Library library );
+FT_END_HEADER
+
#endif /* FT_CONFIG_OPTION_PIC */
/* */
-
-FT_END_HEADER
-
#endif /* __TTPIC_H__ */