* */*.h: Changed body inclusion macro names to start and end with
`__' (those which haven't converted yet). Fixed minor conversion
issues.
* src/winfonts/winfnt.c: Updated to new header inclusion scheme.
* */*.[ch]: Changed source files to adhere to the new
* src/cff/cff.c, src/cff/rules.mk: Updated.
* */*.[ch]: Now using <ft2build.h> as the default build and setup
diff --git a/include/freetype/cache/ftcchunk.h b/include/freetype/cache/ftcchunk.h
index 99c3431..145c8bc 100644
--- a/include/freetype/cache/ftcchunk.h
+++ b/include/freetype/cache/ftcchunk.h
@@ -45,10 +45,12 @@
#ifndef __FTCCHUNK_H__
#define __FTCCHUNK_H__
+
#include <ft2build.h>
#include FT_CACHE_H
#include FT_CACHE_MANAGER_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/cache/ftcglyph.h b/include/freetype/cache/ftcglyph.h
index ae4d4c1..93aac63 100644
--- a/include/freetype/cache/ftcglyph.h
+++ b/include/freetype/cache/ftcglyph.h
@@ -53,10 +53,13 @@
#ifndef __FTCGLYPH_H__
#define __FTCGLYPH_H__
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-#include <stddef.h>
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_MANAGER_H
+
+#include <stddef.h>
+
FT_BEGIN_HEADER
@@ -198,6 +201,7 @@
FT_UInt gindex,
FTC_GlyphNode *anode );
+
FT_END_HEADER
#endif /* __FTCGLYPH_H__ */
diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h
index 2564daf..e8a25bb 100644
--- a/include/freetype/cache/ftcimage.h
+++ b/include/freetype/cache/ftcimage.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* ftcimage.c */
+/* ftcimage.h */
/* */
/* FreeType Image cache (body). */
/* */
@@ -26,9 +26,11 @@
#ifndef __FTCIMAGE_H__
#define __FTCIMAGE_H__
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_INTERNAL_GLYPH_H
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_GLYPH_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index 1e33c85..72794da 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -62,12 +62,15 @@
#ifndef __FTCMANAG_H__
#define __FTCMANAG_H__
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_INTERNAL_LRU_H
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_LRU_H
+
FT_BEGIN_HEADER
+
#define FTC_MAX_FACES_DEFAULT 2
#define FTC_MAX_SIZES_DEFAULT 4
#define FTC_MAX_BYTES_DEFAULT 200000 /* 200kByte by default! */
@@ -359,6 +362,7 @@
/* */
+
FT_END_HEADER
#endif /* __FTCMANAG_H__ */
diff --git a/include/freetype/cache/ftcsbits.h b/include/freetype/cache/ftcsbits.h
index 95bbde2..6de4ed4 100644
--- a/include/freetype/cache/ftcsbits.h
+++ b/include/freetype/cache/ftcsbits.h
@@ -19,10 +19,13 @@
#ifndef __FTCSBITS_H__
#define __FTCSBITS_H__
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_INTERNAL_CHUNK_H
-#include FT_CACHE_IMAGE_H
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_CHUNK_H
+#include FT_CACHE_IMAGE_H
+
+
FT_BEGIN_HEADER
@@ -57,6 +60,7 @@
FTC_Image_Desc* desc,
FT_UInt gindex,
FTC_SBit *sbit );
+
FT_END_HEADER
#endif /* __FTCSBITS_H__ */
diff --git a/include/freetype/cache/ftlru.h b/include/freetype/cache/ftlru.h
index 16814c8..a7d0587 100644
--- a/include/freetype/cache/ftlru.h
+++ b/include/freetype/cache/ftlru.h
@@ -58,8 +58,10 @@
#ifndef __FTLRU_H__
#define __FTLRU_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
@@ -162,6 +164,7 @@
FT_Lru_Selector selector,
FT_Pointer data );
+
FT_END_HEADER
#endif /* __FTLRU_H__ */
diff --git a/include/freetype/config/ft2build.h b/include/freetype/config/ft2build.h
index d0ae604..946e7e3 100644
--- a/include/freetype/config/ft2build.h
+++ b/include/freetype/config/ft2build.h
@@ -13,28 +13,30 @@
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
-/* */
-/* This file corresponds to the default "ft2build.h" file for */
-/* FreeType 2. It uses the "freetype" include root. */
-/* */
-/* Note that specific platforms might use a different configurations. */
-/* For example, on Unix, the "freetype2" include root is used, with */
-/* a specific "ft2build.h" used to take care of this. The latter */
-/* looks like the following: */
-/* */
-/* */
-/* #ifndef __FT_BUILD_UNIX_H__ */
-/* #define __FT_BUILD_UNIX_H__ */
-/* */
-/* #define FT2_ROOT freetype2 */
-/* #include <FT2_ROOT/config/ft2build.h> */
-/* */
-/* #endif // __FT_BUILD_UNIX_H__ */
-/* */
-/* */
/***************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* This file corresponds to the default "ft2build.h" file for */
+ /* FreeType 2. It uses the "freetype" include root. */
+ /* */
+ /* Note that specific platforms might use a different configurations. */
+ /* For example, on Unix, the "freetype2" include root is used, with a */
+ /* specific "ft2build.h" used to take care of this. The latter looks */
+ /* like the following: */
+ /* */
+ /* #ifndef __FT_BUILD_UNIX_H__ */
+ /* #define __FT_BUILD_UNIX_H__ */
+ /* */
+ /* #define FT2_ROOT freetype2 */
+ /* #include <FT2_ROOT/config/ft2build.h> */
+ /* */
+ /* #endif // __FT_BUILD_UNIX_H__ */
+ /* */
+ /*************************************************************************/
+
+
#ifndef __FT2_BUILD_H__
#define __FT2_BUILD_H__
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 0c8217f..49e90f8 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -39,11 +39,13 @@
#ifndef __FTCONFIG_H__
#define __FTCONFIG_H__
-#include <ft2build.h>
-#include FT_CONFIG_OPTIONS_H
+#include <ft2build.h>
+#include FT_CONFIG_OPTIONS_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 032c842..76d8875 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -16,13 +16,14 @@
/***************************************************************************/
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -389,12 +390,10 @@
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
-#ifdef __cplusplus
- }
-#endif
+FT_END_HEADER
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
/* END */
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index d7240e2..e9d1c44 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -19,6 +19,7 @@
#ifndef __FREETYPE_H__
#define __FREETYPE_H__
+
/*************************************************************************/
/* */
/* The `raster' component duplicates some of the declarations in */
@@ -42,8 +43,10 @@
#include FT_ERRORS_H
#include FT_TYPES_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/*************************************************************************/
/* */
@@ -2283,6 +2286,7 @@
/* */
+
FT_END_HEADER
#endif /* __FREETYPE_H__ */
diff --git a/include/freetype/ftbbox.h b/include/freetype/ftbbox.h
index d2de225..7cf149c 100644
--- a/include/freetype/ftbbox.h
+++ b/include/freetype/ftbbox.h
@@ -30,11 +30,14 @@
#ifndef FTBBOX_H
#define FTBBOX_H
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <Function> */
@@ -62,6 +65,7 @@
/* */
+
FT_END_HEADER
#endif /* FTBBOX_H */
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index eacaa38..efac5ee 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -34,11 +34,14 @@
#ifndef __FTCACHE_H__
#define __FTCACHE_H__
-#include <ft2build.h>
-#include FT_GLYPH_H
+
+#include <ft2build.h>
+#include FT_GLYPH_H
+
FT_BEGIN_HEADER
+
#define FT_CACHE_MANAGER_H FT2_PUBLIC_FILE(cache/ftcmanag.h)
#define FT_CACHE_IMAGE_H FT2_PUBLIC_FILE(cache/ftcimage.h)
#define FT_CACHE_SMALL_BITMAPS_H FT2_PUBLIC_FILE(cache/ftcsbits.h)
diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h
index 8764b01..5db4509 100644
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -23,7 +23,7 @@
/* something like */
/* */
/* { */
- /* #undef FTERRORS_H */
+ /* #undef __FTERRORS_H__ */
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
/* #define FT_ERROR_START_LIST { */
/* #define FT_ERROR_END_LIST { 0, 0 } }; */
@@ -34,7 +34,7 @@
/* const char* err_msg */
/* } ft_errors[] = */
/* */
- /* #include <freetype/fterrors.h> */
+ /* #include FT_ERRORS_H */
/* } */
/* */
/* For C++ it might be necessary to use `extern "C" {' and to define */
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index dbe6274..6f2349e 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -32,8 +32,10 @@
#ifndef __FTGLYPH_H__
#define __FTGLYPH_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index f1e4e7d..5d2d029 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -30,6 +30,7 @@
#include <ft2build.h>
+
FT_BEGIN_HEADER
@@ -994,7 +995,6 @@
FT_END_HEADER
-
#endif /* __FTIMAGE_H__ */
diff --git a/include/freetype/ftlist.h b/include/freetype/ftlist.h
index 895aa10..a3d60a3 100644
--- a/include/freetype/ftlist.h
+++ b/include/freetype/ftlist.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* ftlist.c */
+/* ftlist.h */
/* */
/* Generic list support for FreeType (specification). */
/* */
@@ -27,8 +27,10 @@
#ifndef __FTLIST_H__
#define __FTLIST_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
@@ -216,4 +218,5 @@
#endif /* __FTLIST_H__ */
+
/* END */
diff --git a/include/freetype/ftmac.h b/include/freetype/ftmac.h
index a036c55..a258a04 100644
--- a/include/freetype/ftmac.h
+++ b/include/freetype/ftmac.h
@@ -29,9 +29,10 @@
#define __FT_MAC_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -70,9 +71,7 @@
FT_Face *aface );
-#ifdef __cplusplus
- }
-#endif
+FT_END_HEADER
#endif /* __FT_MAC_H__ */
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h
index 9269634..719fe65 100644
--- a/include/freetype/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -19,11 +19,14 @@
#ifndef __FTMM_H__
#define __FTMM_H__
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
+
+#include <ft2build.h>
+#include FT_TYPE1_TABLES_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <Struct> */
diff --git a/include/freetype/ftmodule.h b/include/freetype/ftmodule.h
index 4afbf68..06eca04 100644
--- a/include/freetype/ftmodule.h
+++ b/include/freetype/ftmodule.h
@@ -19,11 +19,14 @@
#ifndef __FTMODULE_H__
#define __FTMODULE_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/* module bit flags */
typedef enum FT_Module_Flags_
{
diff --git a/include/freetype/ftnames.h b/include/freetype/ftnames.h
index bb1e903..069ea3f 100644
--- a/include/freetype/ftnames.h
+++ b/include/freetype/ftnames.h
@@ -22,8 +22,10 @@
#ifndef __FTNAMES_H__
#define __FTNAMES_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 2894fc0..258f472 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -20,8 +20,10 @@
#ifndef __FTOUTLN_H__
#define __FTOUTLN_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
@@ -313,6 +315,7 @@
FT_Outline* outline,
FT_Raster_Params* params );
+
FT_END_HEADER
#endif /* __FTOUTLN_H__ */
diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h
index 73be242..c807705 100644
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -19,9 +19,11 @@
#ifndef __FTRENDER_H__
#define __FTRENDER_H__
-#include <ft2build.h>
-#include FT_MODULE_H
-#include FT_GLYPH_H
+
+#include <ft2build.h>
+#include FT_MODULE_H
+#include FT_GLYPH_H
+
FT_BEGIN_HEADER
@@ -180,6 +182,7 @@
/* */
+
FT_END_HEADER
#endif /* __FTRENDER_H__ */
diff --git a/include/freetype/ftsynth.h b/include/freetype/ftsynth.h
index 42b1e26..9024319 100644
--- a/include/freetype/ftsynth.h
+++ b/include/freetype/ftsynth.h
@@ -37,11 +37,14 @@
#ifndef __FTSYNTH_H__
#define __FTSYNTH_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/* This code is completely experimental -- use with care! */
/* It will probably be completely rewritten in the future */
/* or even integrated into the library. */
@@ -53,8 +56,8 @@
FT_Outline* outline,
FT_Pos* advance );
-FT_END_HEADER
+FT_END_HEADER
#endif /* __FTSYNTH_H__ */
diff --git a/include/freetype/ftsystem.h b/include/freetype/ftsystem.h
index 7620bd6..1a963d9 100644
--- a/include/freetype/ftsystem.h
+++ b/include/freetype/ftsystem.h
@@ -16,13 +16,14 @@
/***************************************************************************/
-#ifndef FTSYSTEM_H
-#define FTSYSTEM_H
+#ifndef __FTSYSTEM_H__
+#define __FTSYSTEM_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -100,12 +101,9 @@
};
-#ifdef __cplusplus
- }
-#endif
+FT_END_HEADER
-
-#endif /* FTSYSTEM_H */
+#endif /* __FTSYSTEM_H__ */
/* END */
diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h
index 1460c7c..962a723 100644
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -19,13 +19,16 @@
#ifndef __FTTYPES_H__
#define __FTTYPES_H__
-#include <ft2build.h>
-#include FT_SYSTEM_H
-#include FT_IMAGE_H
-#include <stddef.h>
+
+#include <ft2build.h>
+#include FT_SYSTEM_H
+#include FT_IMAGE_H
+#include <stddef.h>
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <Type> */
@@ -396,6 +399,7 @@
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
+
FT_END_HEADER
#endif /* __FTTYPES_H__ */
diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h
index 719ee13..cbfc185 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -69,11 +69,14 @@
/* */
/*************************************************************************/
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
typedef struct FT_AutoHinterRec_ *FT_AutoHinter;
diff --git a/include/freetype/internal/fnttypes.h b/include/freetype/internal/fnttypes.h
index 1297672..080770d 100644
--- a/include/freetype/internal/fnttypes.h
+++ b/include/freetype/internal/fnttypes.h
@@ -20,8 +20,10 @@
#ifndef __FNTTYPES_H__
#define __FNTTYPES_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 5637fb1..14f2f61 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -19,8 +19,10 @@
#ifndef __FTCALC_H__
#define __FTCALC_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
@@ -214,6 +216,7 @@
#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \
: ( -( ( 32 - (x) ) & -64 ) ) )
+
FT_END_HEADER
#endif /* __FTCALC_H__ */
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index 981775d..0ab4c33 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -19,11 +19,14 @@
#ifndef __FTDEBUG_H__
#define __FTDEBUG_H__
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+
FT_BEGIN_HEADER
+
#ifdef FT_DEBUG_LEVEL_TRACE
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 746ded6..2cd51ce 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -19,8 +19,10 @@
#ifndef __FTDRIVER_H__
#define __FTDRIVER_H__
-#include <ft2build.h>
-#include FT_MODULE_H
+
+#include <ft2build.h>
+#include FT_MODULE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/ftextend.h b/include/freetype/internal/ftextend.h
index a386aa2..05ef864 100644
--- a/include/freetype/internal/ftextend.h
+++ b/include/freetype/internal/ftextend.h
@@ -19,11 +19,14 @@
#ifndef __FTEXTEND_H__
#define __FTEXTEND_H__
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* The extensions don't need to be integrated at compile time into the */
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index 304e390..27b572f 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -19,12 +19,15 @@
#ifndef __FTMEMORY_H__
#define __FTMEMORY_H__
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_TYPES_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <Macro> */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index db7893f..f295330 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -26,14 +26,17 @@
#ifndef __FTOBJS_H__
#define __FTOBJS_H__
+
#include <ft2build.h>
#include FT_RENDER_H
#include FT_INTERNAL_MEMORY_H
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_AUTOHINT_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* Some generic definitions. */
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index 44c26e3..93b9868 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -19,8 +19,10 @@
#ifndef __FTSTREAM_H__
#define __FTSTREAM_H__
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/internal.h b/include/freetype/internal/internal.h
index 9895ea2..f0c20b6 100644
--- a/include/freetype/internal/internal.h
+++ b/include/freetype/internal/internal.h
@@ -24,7 +24,7 @@
/*************************************************************************/
- /* don't add spaces around the argument of FT_INTERNAL_FILE! */
+ /* don't add spaces around the argument of FT2_INTERNAL_FILE! */
#define FT_INTERNAL_OBJECTS_H FT2_INTERNAL_FILE(ftobjs.h)
#define FT_INTERNAL_STREAM_H FT2_INTERNAL_FILE(ftstream.h)
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index a41acda..4696ae2 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -20,9 +20,11 @@
#ifndef __PSAUX_H__
#define __PSAUX_H__
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/psnames.h b/include/freetype/internal/psnames.h
index 7587bca..0e3157f 100644
--- a/include/freetype/internal/psnames.h
+++ b/include/freetype/internal/psnames.h
@@ -20,11 +20,14 @@
#ifndef __PSNAMES_H__
#define __PSNAMES_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <FuncType> */
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 17db466..9263a5b 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -19,12 +19,15 @@
#ifndef __SFNT_H__
#define __SFNT_H__
-#include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+
+#include <ft2build.h>
+#include FT_INTERNAL_DRIVER_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <FuncType> */
diff --git a/include/freetype/internal/t1errors.h b/include/freetype/internal/t1errors.h
index 79fdf69..7bb951f 100644
--- a/include/freetype/internal/t1errors.h
+++ b/include/freetype/internal/t1errors.h
@@ -20,9 +20,10 @@
#define __T1ERRORS_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/************************ error codes declaration **************/
@@ -66,10 +67,7 @@
#define T1_Err_Stack_Overflow FT_Err_Invalid_File_Format
-#ifdef __cplusplus
- }
-#endif
-
+FT_END_HEADER
#endif /* __T1ERRORS_H__ */
diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h
index 9110be8..01841f0 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -20,9 +20,11 @@
#ifndef __T1TYPES_H__
#define __T1TYPES_H__
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+
+#include<ft2build.h>
+#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/t2errors.h b/include/freetype/internal/t2errors.h
index 7a3d397..eac47b2 100644
--- a/include/freetype/internal/t2errors.h
+++ b/include/freetype/internal/t2errors.h
@@ -20,9 +20,10 @@
#define __T2ERRORS_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -120,9 +121,7 @@
#define T2_Err_Could_Not_Find_Context 0x550
-#ifdef __cplusplus
- }
-#endif
+FT_END_HEADER
#endif /* __T2ERRORS_H__ */
diff --git a/include/freetype/internal/t2types.h b/include/freetype/internal/t2types.h
index ab6940d..dae7722 100644
--- a/include/freetype/internal/t2types.h
+++ b/include/freetype/internal/t2types.h
@@ -20,8 +20,10 @@
#ifndef __T2TYPES_H__
#define __T2TYPES_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/tterrors.h b/include/freetype/internal/tterrors.h
index 3f6c334..e235d81 100644
--- a/include/freetype/internal/tterrors.h
+++ b/include/freetype/internal/tterrors.h
@@ -20,9 +20,10 @@
#define __TTERRORS_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -120,9 +121,7 @@
#define TT_Err_Could_Not_Find_Context 0x450
-#ifdef __cplusplus
- }
-#endif
+FT_END_HEADER
#endif /* __TTERRORS_H__ */
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 0ca53b9..095311a 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -20,9 +20,11 @@
#ifndef __TTTYPES_H__
#define __TTTYPES_H__
-#include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_OBJECTS_H
+
+#include <ft2build.h>
+#include FT_TRUETYPE_TABLES_H
+#include FT_INTERNAL_OBJECTS_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h
index dc5edc9..1091e88 100644
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -20,11 +20,14 @@
#ifndef __T1TABLES_H__
#define __T1TABLES_H__
+
#include <ft2build.h>
#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/* Note that we separate font data in T1_FontInfo and T1_Private */
/* structures in order to support Multiple Master fonts. */
diff --git a/include/freetype/ttnameid.h b/include/freetype/ttnameid.h
index fcb1d96..293b033 100644
--- a/include/freetype/ttnameid.h
+++ b/include/freetype/ttnameid.h
@@ -20,9 +20,10 @@
#define __TTNAMEID_H__
-#ifdef __cplusplus
- extern "C" {
-#endif
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -713,10 +714,7 @@
#endif /* !HAVE_LIMIT_ON_IDENTS */
-#ifdef __cplusplus
- }
-#endif
-
+FT_END_HEADER
#endif /* __TTNAMEID_H__ */
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index d5724ef..dbbcc16 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -20,11 +20,14 @@
#ifndef __TTTABLES_H__
#define __TTTABLES_H__
+
#include <ft2build.h>
#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* <Struct> */
diff --git a/include/freetype/tttags.h b/include/freetype/tttags.h
index 56a6a91..4259c21 100644
--- a/include/freetype/tttags.h
+++ b/include/freetype/tttags.h
@@ -19,11 +19,14 @@
#ifndef __TTAGS_H__
#define __TTAGS_H__
+
#include <ft2build.h>
#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
+
#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' )
#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
@@ -62,6 +65,7 @@
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+
FT_END_HEADER
#endif /* __TTAGS_H__ */