shithub: freetype+ttf2subf

Download patch

ref: 90d9964ec9c6537a69dedbc29f0a6d277707dbcc
parent: cc069beb2d2b6b1cb9f9b9f2af2a7ea12780f634
author: Werner Lemberg <[email protected]>
date: Fri Dec 8 19:45:38 EST 2000

* */*.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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2000-12-08  Werner Lemberg  <[email protected]>
+
+	* */*.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.
+
 2000-12-07  David Turner  <[email protected]>
 
-	* many files: Changed source files to adhere to the new
+	* */*.[ch]: Changed source files to adhere to the new
 	header inclusion scheme.  Not completely tested but works for now
 	here.
 
@@ -23,6 +31,8 @@
 	* src/cff/t2tokens.h: Renamed and updated to...
 	* src/cff/cfftoken.h: New file.
 
+	* src/cff/cff.c, src/cff/rules.mk: Updated.
+
 2000-12-06  David Turner  <[email protected]>
 
 	* src/cache/ftlru.c (FT_Lru_Done): Fixed memory leak.
@@ -58,7 +68,7 @@
 	is now installed as <ft2build.h> for Unix systems.  Note that we
 	still use the "freetype2/freetype" installation path for now.
 
-	* many files: Now using <ft2build.h> as the default build and setup
+	* */*.[ch]: Now using <ft2build.h> as the default build and setup
 	configuration file in all public headers.  Internal source files
 	still need some changes though.
 
--- a/include/freetype/cache/ftcchunk.h
+++ b/include/freetype/cache/ftcchunk.h
@@ -45,9 +45,11 @@
 #ifndef __FTCCHUNK_H__
 #define __FTCCHUNK_H__
 
+
 #include <ft2build.h>
 #include FT_CACHE_H
 #include FT_CACHE_MANAGER_H
+
 
 FT_BEGIN_HEADER
 
--- a/include/freetype/cache/ftcglyph.h
+++ b/include/freetype/cache/ftcglyph.h
@@ -53,11 +53,14 @@
 #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
 
 
@@ -197,6 +200,7 @@
                                                  FT_Pointer       type,
                                                  FT_UInt          gindex,
                                                  FTC_GlyphNode   *anode );
+
 
 FT_END_HEADER
 
--- 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
 
--- 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! */
@@ -358,6 +361,7 @@
   } FTC_CacheRec;
 
   /* */
+
 
 FT_END_HEADER
 
--- a/include/freetype/cache/ftcsbits.h
+++ b/include/freetype/cache/ftcsbits.h
@@ -19,11 +19,14 @@
 #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
 
   /* handle to small bitmap */
@@ -57,6 +60,7 @@
                                                 FTC_Image_Desc*  desc,
                                                 FT_UInt          gindex,
                                                 FTC_SBit        *sbit );
+
 FT_END_HEADER
 
 #endif /* __FTCSBITS_H__ */
--- a/include/freetype/cache/ftlru.h
+++ b/include/freetype/cache/ftlru.h
@@ -58,9 +58,11 @@
 #ifndef __FTLRU_H__
 #define __FTLRU_H__
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
 
 
@@ -161,6 +163,7 @@
   FT_EXPORT( void )      FT_Lru_Remove_Selection( FT_Lru           lru,
                                                   FT_Lru_Selector  selector,
                                                   FT_Pointer       data );
+
 
 FT_END_HEADER
 
--- a/include/freetype/config/ft2build.h
+++ b/include/freetype/config/ft2build.h
@@ -13,26 +13,28 @@
 /*  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__
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -39,10 +39,12 @@
 #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
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -16,15 +16,16 @@
 /***************************************************************************/
 
 
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
@@ -389,12 +390,10 @@
 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
 
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
 
 
 /* END */
--- 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
 
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
@@ -2282,6 +2285,7 @@
                                           FT_Matrix*  matrix );
 
   /* */
+
 
 FT_END_HEADER
 
--- 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>                                                            */
@@ -61,6 +64,7 @@
 
 
   /* */
+
 
 FT_END_HEADER
 
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -34,10 +34,13 @@
 #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)
--- 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     */
--- 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
 
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -30,6 +30,7 @@
 
 #include <ft2build.h>
 
+
 FT_BEGIN_HEADER
 
 
@@ -993,7 +994,6 @@
 
 
 FT_END_HEADER
-
 
 #endif /* __FTIMAGE_H__ */
 
--- 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,9 +27,11 @@
 #ifndef __FTLIST_H__
 #define __FTLIST_H__
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
 
 
@@ -215,5 +217,6 @@
 FT_END_HEADER
 
 #endif /* __FTLIST_H__ */
+
 
 /* END */
--- a/include/freetype/ftmac.h
+++ b/include/freetype/ftmac.h
@@ -29,11 +29,12 @@
 #define __FT_MAC_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
@@ -70,9 +71,7 @@
                                                 FT_Face    *aface );
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
 
 #endif /* __FT_MAC_H__ */
--- a/include/freetype/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -19,10 +19,13 @@
 #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
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/ftmodule.h
+++ b/include/freetype/ftmodule.h
@@ -19,10 +19,13 @@
 #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_
--- 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
 
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -20,9 +20,11 @@
 #ifndef __FTOUTLN_H__
 #define __FTOUTLN_H__
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
 
 
@@ -312,6 +314,7 @@
   FT_EXPORT( FT_Error )  FT_Outline_Render( FT_Library         library,
                                             FT_Outline*        outline,
                                             FT_Raster_Params*  params );
+
 
 FT_END_HEADER
 
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -19,10 +19,12 @@
 #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
 
 
@@ -179,6 +181,7 @@
                                           FT_Parameter*  parameters );
 
   /* */
+
 
 FT_END_HEADER
 
--- 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__ */
 
--- a/include/freetype/ftsystem.h
+++ b/include/freetype/ftsystem.h
@@ -16,15 +16,16 @@
 /***************************************************************************/
 
 
-#ifndef FTSYSTEM_H
-#define FTSYSTEM_H
+#ifndef __FTSYSTEM_H__
+#define __FTSYSTEM_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /*                  M E M O R Y   M A N A G E M E N T                    */
@@ -100,12 +101,9 @@
   };
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
-
-#endif /* FTSYSTEM_H */
+#endif /* __FTSYSTEM_H__ */
 
 
 /* END */
--- 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>                                                                */
@@ -395,6 +398,7 @@
   /* */
 
 #define FT_IS_EMPTY( list )  ( (list).head == 0 )
+
 
 FT_END_HEADER
 
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -69,10 +69,13 @@
   /*                                                                       */
   /*************************************************************************/
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
+
 
   typedef struct FT_AutoHinterRec_  *FT_AutoHinter;
 
--- 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
 
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -19,9 +19,11 @@
 #ifndef __FTCALC_H__
 #define __FTCALC_H__
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
 
 
@@ -213,6 +215,7 @@
 
 #define ROUND_F26DOT6( x )     ( x >= 0 ? (    ( (x) + 32 ) & -64 )     \
                                         : ( -( ( 32 - (x) ) & -64 ) ) )
+
 
 FT_END_HEADER
 
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -19,10 +19,13 @@
 #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
 
--- 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
 
--- a/include/freetype/internal/ftextend.h
+++ b/include/freetype/internal/ftextend.h
@@ -19,10 +19,13 @@
 #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
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -19,11 +19,14 @@
 #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
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -26,6 +26,7 @@
 #ifndef __FTOBJS_H__
 #define __FTOBJS_H__
 
+
 #include <ft2build.h>
 #include FT_RENDER_H
 #include FT_INTERNAL_MEMORY_H
@@ -32,7 +33,9 @@
 #include FT_INTERNAL_DRIVER_H
 #include FT_INTERNAL_AUTOHINT_H
 
+
 FT_BEGIN_HEADER
+
 
   /*************************************************************************/
   /*                                                                       */
--- 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
 
--- 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)
--- 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
 
--- a/include/freetype/internal/psnames.h
+++ b/include/freetype/internal/psnames.h
@@ -20,10 +20,13 @@
 #ifndef __PSNAMES_H__
 #define __PSNAMES_H__
 
-#include   <ft2build.h>
-#include   FT_FREETYPE_H
 
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
 FT_BEGIN_HEADER
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -19,11 +19,14 @@
 #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
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/internal/t1errors.h
+++ b/include/freetype/internal/t1errors.h
@@ -20,11 +20,12 @@
 #define __T1ERRORS_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /************************ error codes declaration **************/
 
   /* The error codes are grouped into `classes' used to indicate the */
@@ -66,10 +67,7 @@
 #define T1_Err_Stack_Overflow          FT_Err_Invalid_File_Format
 
 
-#ifdef __cplusplus
-  }
-#endif
-
+FT_END_HEADER
 
 #endif /* __T1ERRORS_H__ */
 
--- 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
 
--- a/include/freetype/internal/t2errors.h
+++ b/include/freetype/internal/t2errors.h
@@ -20,11 +20,12 @@
 #define __T2ERRORS_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /* Error codes declaration                                               */
@@ -120,9 +121,7 @@
 #define T2_Err_Could_Not_Find_Context     0x550
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
 
 #endif /* __T2ERRORS_H__ */
--- 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
 
--- a/include/freetype/internal/tterrors.h
+++ b/include/freetype/internal/tterrors.h
@@ -20,11 +20,12 @@
 #define __TTERRORS_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /* Error codes declaration                                               */
@@ -120,9 +121,7 @@
 #define TT_Err_Could_Not_Find_Context     0x450
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
 
 #endif /* __TTERRORS_H__ */
--- 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
 
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -20,10 +20,13 @@
 #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.         */
--- a/include/freetype/ttnameid.h
+++ b/include/freetype/ttnameid.h
@@ -20,11 +20,12 @@
 #define __TTNAMEID_H__
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#include <ft2build.h>
 
 
+FT_BEGIN_HEADER
+
+
   /*************************************************************************/
   /*                                                                       */
   /* Possible values for the `platform' identifier code in the name        */
@@ -713,10 +714,7 @@
 #endif /* !HAVE_LIMIT_ON_IDENTS */
 
 
-#ifdef __cplusplus
-  }
-#endif
-
+FT_END_HEADER
 
 #endif /* __TTNAMEID_H__ */
 
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -20,10 +20,13 @@
 #ifndef __TTTABLES_H__
 #define __TTTABLES_H__
 
+
 #include <ft2build.h>
 #include FT_FREETYPE_H
 
+
 FT_BEGIN_HEADER
+
 
   /*************************************************************************/
   /*                                                                       */
--- 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', ' ' )
@@ -61,6 +64,7 @@
 #define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
 #define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
 #define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+
 
 FT_END_HEADER
 
--- a/src/autohint/ahangles.c
+++ b/src/autohint/ahangles.c
@@ -19,6 +19,7 @@
 /*                                                                         */
 /***************************************************************************/
 
+
 #include  <ft2build.h>
 #include  FT_SOURCE_FILE(autohint,ahangles.h)
 
--- a/src/autohint/ahangles.h
+++ b/src/autohint/ahangles.h
@@ -23,11 +23,14 @@
 #ifndef __AHANGLES_H__
 #define __AHANGLES_H__
 
+
 #include <ft2build.h>
 #include FT_INTERNAL_OBJECTS_H
 #include FT_SOURCE_FILE(autohint,ahtypes.h)
 
+
 FT_BEGIN_HEADER
+
 
   /* PI expressed in ah_angles -- we don't really need an important */
   /* precision, so 256 should be enough                             */
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -18,6 +18,7 @@
 /*                                                                         */
 /***************************************************************************/
 
+
 #include <ft2build.h>
 #include FT_SOURCE_FILE(autohint,ahglobal.h)
 #include FT_SOURCE_FILE(autohint,ahglyph.h)
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -23,9 +23,11 @@
 #ifndef __AHGLOBAL_H__
 #define __AHGLOBAL_H__
 
+
 #include <ft2build.h>
 #include FT_SOURCE_FILE(autohint,ahtypes.h)
 #include FT_INTERNAL_OBJECTS_H
+
 
 FT_BEGIN_HEADER
 
--- a/src/autohint/ahglyph.h
+++ b/src/autohint/ahglyph.h
@@ -20,8 +20,8 @@
 /***************************************************************************/
 
 
-#ifndef AHGLYPH_H
-#define AHGLYPH_H
+#ifndef __AHGLYPH_H__
+#define __AHGLYPH_H__
 
 
 #include <ft2build.h>
@@ -86,7 +86,7 @@
 
 FT_END_HEADER
 
-#endif /* AHGLYPH_H */
+#endif /* __AHGLYPH_H__ */
 
 
 /* END */
--- a/src/autohint/ahhint.h
+++ b/src/autohint/ahhint.h
@@ -19,8 +19,8 @@
 /***************************************************************************/
 
 
-#ifndef AHHINT_H
-#define AHHINT_H
+#ifndef __AHHINT_H__
+#define __AHHINT_H__
 
 
 #include <ft2build.h>
@@ -29,6 +29,7 @@
 
 FT_BEGIN_HEADER
 
+
 #define AH_HINT_DEFAULT        0
 #define AH_HINT_NO_ALIGNMENT   1
 #define AH_HINT_NO_HORZ_EDGES  0x20000L
@@ -65,9 +66,10 @@
   void  ah_hinter_done_global_hints( AH_Hinter*  hinter,
                                      void*       global_hints );
 
+
 FT_END_HEADER
 
-#endif /* AHHINT_H */
+#endif /* __AHHINT_H__ */
 
 
 /* END */
--- a/src/autohint/ahloader.h
+++ b/src/autohint/ahloader.h
@@ -32,13 +32,16 @@
   /*************************************************************************/
 
 
-#ifndef AHLOADER_H
-#define AHLOADER_H
+#ifndef __AHLOADER_H__
+#define __AHLOADER_H__
 
+
 #include <ft2build.h>
 
+
 FT_BEGIN_HEADER
 
+
 #ifdef _STANDALONE_
 
   typedef struct  AH_GlyphLoad_
@@ -121,9 +124,10 @@
 
 #endif /* _STANDALONE_ */
 
+
 FT_END_HEADER
 
-#endif /* AHLOADER_H */
+#endif /* __AHLOADER_H__ */
 
 
 /* END */
--- a/src/autohint/ahmodule.h
+++ b/src/autohint/ahmodule.h
@@ -19,20 +19,24 @@
 /***************************************************************************/
 
 
-#ifndef AHMODULE_H
-#define AHMODULE_H
+#ifndef __AHMODULE_H__
+#define __AHMODULE_H__
 
+
 #include  <ft2build.h>
 #include  FT_MODULE_H
 
+
 FT_BEGIN_HEADER
 
+
   FT_CALLBACK_TABLE
   const FT_Module_Class  autohint_module_class;
 
+
 FT_END_HEADER
 
-#endif /* AHMODULE_H */
+#endif /* __AHMODULE_H__ */
 
 
 /* END */
--- a/src/autohint/ahoptim.h
+++ b/src/autohint/ahoptim.h
@@ -19,8 +19,8 @@
 /***************************************************************************/
 
 
-#ifndef AHOPTIM_H
-#define AHOPTIM_H
+#ifndef __AHOPTIM_H__
+#define __AHOPTIM_H__
 
 
 #include <ft2build.h>
@@ -128,7 +128,7 @@
 
 FT_END_HEADER
 
-#endif /* AHOPTIM_H */
+#endif /* __AHOPTIM_H__ */
 
 
 /* END */
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -20,8 +20,8 @@
 /***************************************************************************/
 
 
-#ifndef AHTYPES_H
-#define AHTYPES_H
+#ifndef __AHTYPES_H__
+#define __AHTYPES_H__
 
 
 #include <ft2build.h>
@@ -46,6 +46,7 @@
 
 FT_BEGIN_HEADER
 
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
@@ -484,7 +485,7 @@
 
 FT_END_HEADER
 
-#endif /* AHTYPES_H */
+#endif /* __AHTYPES_H__ */
 
 
 /* END */
--- a/src/cff/cffdrivr.h
+++ b/src/cff/cffdrivr.h
@@ -16,12 +16,14 @@
 /***************************************************************************/
 
 
-#ifndef CFFDRIVER_H
-#define CFFDRIVER_H
+#ifndef __CFFDRIVER_H__
+#define __CFFDRIVER_H__
 
+
 #include <ft2build.h>
 #include FT_INTERNAL_DRIVER_H
 
+
 FT_BEGIN_HEADER
 
 
@@ -31,7 +33,7 @@
 
 FT_END_HEADER
 
-#endif /* CFFDRIVER_H */
+#endif /* __CFFDRIVER_H__ */
 
 
 /* END */
--- a/src/cff/cffload.h
+++ b/src/cff/cffload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CFFLOAD_H
-#define CFFLOAD_H
+#ifndef __CFFLOAD_H__
+#define __CFFLOAD_H__
 
 
 #include <ft2build.h>
@@ -64,7 +64,7 @@
 
 FT_END_HEADER
 
-#endif /* CFFLOAD_H */
+#endif /* __CFFLOAD_H__ */
 
 
 /* END */
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T2OBJS_H
-#define T2OBJS_H
+#ifndef __CFFOBJS_H__
+#define __CFFOBJS_H__
 
 
 #include <ft2build.h>
@@ -138,7 +138,7 @@
 
 FT_END_HEADER
 
-#endif /* T2OBJS_H */
+#endif /* __CFFOBJS_H__ */
 
 
 /* END */
--- a/src/cff/t2gload.h
+++ b/src/cff/t2gload.h
@@ -16,15 +16,18 @@
 /***************************************************************************/
 
 
-#ifndef T2GLOAD_H
-#define T2GLOAD_H
+#ifndef __T2GLOAD_H__
+#define __T2GLOAD_H__
 
+
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_SOURCE_FILE(cff,cffobjs.h)
 
+
 FT_BEGIN_HEADER
 
+
 #define T2_MAX_OPERANDS     48
 #define T2_MAX_SUBRS_CALLS  32
 
@@ -194,7 +197,7 @@
 
 FT_END_HEADER
 
-#endif /* T2GLOAD_H */
+#endif /* __T2GLOAD_H__ */
 
 
 /* END */
--- a/src/cid/cidafm.h
+++ b/src/cid/cidafm.h
@@ -16,9 +16,10 @@
 /***************************************************************************/
 
 
-#ifndef CIDAFM_H
-#define CIDAFM_H
+#ifndef __CIDAFM_H__
+#define __CIDAFM_H__
 
+
 #include <ft2build.h>
 #include FT_SOURCE_FILE(cid,cidobjs.h)
 
@@ -60,7 +61,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDAFM_H */
+#endif /* __CIDAFM_H__ */
 
 
 /* END */
--- a/src/cid/cidgload.h
+++ b/src/cid/cidgload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CIDGLOAD_H
-#define CIDGLOAD_H
+#ifndef __CIDGLOAD_H__
+#define __CIDGLOAD_H__
 
 
 #include <ft2build.h>
@@ -26,6 +26,7 @@
 
 FT_BEGIN_HEADER
 
+
 #if 0
 
   /* Compute the maximum advance width of a font through quick parsing */
@@ -44,7 +45,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDGLOAD_H */
+#endif /* __CIDGLOAD_H__ */
 
 
 /* END */
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CIDLOAD_H
-#define CIDLOAD_H
+#ifndef __CIDLOAD_H__
+#define __CIDLOAD_H__
 
 
 #include <ft2build.h>
@@ -51,7 +51,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDLOAD_H */
+#endif /* __CIDLOAD_H__ */
 
 
 /* END */
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CIDOBJS_H
-#define CIDOBJS_H
+#ifndef __CIDOBJS_H__
+#define __CIDOBJS_H__
 
 
 #include <ft2build.h>
@@ -29,6 +29,7 @@
 
 FT_BEGIN_HEADER
 
+
   /* The following structures must be defined by the hinter */
   typedef struct CID_Size_Hints_   CID_Size_Hints;
   typedef struct CID_Glyph_Hints_  CID_Glyph_Hints;
@@ -131,7 +132,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDOBJS_H */
+#endif /* __CIDOBJS_H__ */
 
 
 /* END */
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CIDPARSE_H
-#define CIDPARSE_H
+#ifndef __CIDPARSE_H__
+#define __CIDPARSE_H__
 
 
 #include <ft2build.h>
@@ -110,7 +110,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDPARSE_H */
+#endif /* __CIDPARSE_H__ */
 
 
 /* END */
--- a/src/cid/cidriver.h
+++ b/src/cid/cidriver.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef CIDRIVER_H
-#define CIDRIVER_H
+#ifndef __CIDRIVER_H__
+#define __CIDRIVER_H__
 
 
 #include <ft2build.h>
@@ -33,7 +33,7 @@
 
 FT_END_HEADER
 
-#endif /* CIDRIVER_H */
+#endif /* __CIDRIVER_H__ */
 
 
 /* END */
--- a/src/cid/type1cid.c
+++ b/src/cid/type1cid.c
@@ -1,6 +1,6 @@
 /***************************************************************************/
 /*                                                                         */
-/*  cff.c                                                                  */
+/*  type1cid.c                                                             */
 /*                                                                         */
 /*    FreeType OpenType driver component (body only).                      */
 /*                                                                         */
--- a/src/psaux/psauxmod.h
+++ b/src/psaux/psauxmod.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef PSAUXMOD_H
-#define PSAUXMOD_H
+#ifndef __PSAUXMOD_H__
+#define __PSAUXMOD_H__
 
 
 #include <ft2build.h>
@@ -32,7 +32,7 @@
 
 FT_END_HEADER
 
-#endif /* PSAUXMOD_H */
+#endif /* __PSAUXMOD_H__ */
 
 
 /* END */
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef PSOBJS_H
-#define PSOBJS_H
+#ifndef __PSOBJS_H__
+#define __PSOBJS_H__
 
 
 #include <ft2build.h>
@@ -197,7 +197,7 @@
 
 FT_END_HEADER
 
-#endif /* PSOBJS_H */
+#endif /* __PSOBJS_H__ */
 
 
 /* END */
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1DECODE_H
-#define T1DECODE_H
+#ifndef __T1DECODE_H__
+#define __T1DECODE_H__
 
 
 #include <ft2build.h>
@@ -57,7 +57,7 @@
 
 FT_END_HEADER
 
-#endif /* T1DECODE_H */
+#endif /* __T1DECODE_H__ */
 
 
 /* END */
--- a/src/psnames/psmodule.h
+++ b/src/psnames/psmodule.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef PSDRIVER_H
-#define PSDRIVER_H
+#ifndef __PSMODULE_H__
+#define __PSMODULE_H__
 
 
 #include <ft2build.h>
@@ -32,7 +32,7 @@
 
 FT_END_HEADER
 
-#endif /* PSDRIVER_H */
+#endif /* __PSMODULE_H__ */
 
 
 /* END */
--- a/src/psnames/psnames.c
+++ b/src/psnames/psnames.c
@@ -21,7 +21,5 @@
 #include <ft2build.h>
 #include FT_SOURCE_FILE(psnames,psmodule.c)
 
-#endif
-
 
 /* END */
--- a/src/raster/ftraster.h
+++ b/src/raster/ftraster.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTRASTER_H
-#define FTRASTER_H
+#ifndef __FTRASTER_H__
+#define __FTRASTER_H__
 
 
 #include <ft2build.h>
@@ -40,7 +40,7 @@
 
 FT_END_HEADER
 
-#endif /* FTRASTER_H */
+#endif /* __FTRASTER_H__ */
 
 
 /* END */
--- a/src/raster/ftrend1.h
+++ b/src/raster/ftrend1.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTREND1_H
-#define FTREND1_H
+#ifndef __FTREND1_H__
+#define __FTREND1_H__
 
 
 #include <ft2build.h>
@@ -38,7 +38,7 @@
 
 FT_END_HEADER
 
-#endif /* FTREND1_H */
+#endif /* __FTREND1_H__ */
 
 
 /* END */
--- a/src/raster/raster.c
+++ b/src/raster/raster.c
@@ -1,6 +1,6 @@
 /***************************************************************************/
 /*                                                                         */
-/*  raster1.c                                                              */
+/*  raster.c                                                               */
 /*                                                                         */
 /*    FreeType monochrome rasterer module component (body only).           */
 /*                                                                         */
--- a/src/sfnt/sfdriver.h
+++ b/src/sfnt/sfdriver.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef SFDRIVER_H
-#define SFDRIVER_H
+#ifndef __SFDRIVER_H__
+#define __SFDRIVER_H__
 
 
 #include <ft2build.h>
@@ -32,7 +32,7 @@
 
 FT_END_HEADER
 
-#endif /* SFDRIVER_H */
+#endif /* __SFDRIVER_H__ */
 
 
 /* END */
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef SFOBJS_H
-#define SFOBJS_H
+#ifndef __SFOBJS_H__
+#define __SFOBJS_H__
 
 
 #include <ft2build.h>
@@ -27,6 +27,7 @@
 
 FT_BEGIN_HEADER
 
+
   FT_LOCAL
   FT_Error  SFNT_Init_Face( FT_Stream      stream,
                             TT_Face        face,
@@ -47,7 +48,7 @@
 
 FT_END_HEADER
 
-#endif /* SFDRIVER_H */
+#endif /* __SFDRIVER_H__ */
 
 
 /* END */
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTCMAP_H
-#define TTCMAP_H
+#ifndef __TTCMAP_H__
+#define __TTCMAP_H__
 
 
 #include <ft2build.h>
@@ -39,7 +39,7 @@
 
 FT_END_HEADER
 
-#endif /* TTCMAP_H */
+#endif /* __TTCMAP_H__ */
 
 
 /* END */
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -17,8 +17,8 @@
 /***************************************************************************/
 
 
-#ifndef TTLOAD_H
-#define TTLOAD_H
+#ifndef __TTLOAD_H__
+#define __TTLOAD_H__
 
 
 #include <ft2build.h>
@@ -130,7 +130,7 @@
 
 FT_END_HEADER
 
-#endif /* TTLOAD_H */
+#endif /* __TTLOAD_H__ */
 
 
 /* END */
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -17,8 +17,8 @@
 /***************************************************************************/
 
 
-#ifndef TTPOST_H
-#define TTPOST_H
+#ifndef __TTPOST_H__
+#define __TTPOST_H__
 
 
 #include <ft2build.h>
@@ -44,7 +44,7 @@
 
 FT_END_HEADER
 
-#endif /* TTPOST_H */
+#endif /* __TTPOST_H__ */
 
 
 /* END */
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTSBIT_H
-#define TTSBIT_H
+#ifndef __TTSBIT_H__
+#define __TTSBIT_H__
 
 
 #include <ft2build.h>
@@ -53,7 +53,7 @@
 
 FT_END_HEADER
 
-#endif /* TTSBIT_H */
+#endif /* __TTSBIT_H__ */
 
 
 /* END */
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTGRAYS_H
-#define FTGRAYS_H
+#ifndef __FTGRAYS_H__
+#define __FTGRAYS_H__
 
 #ifdef __cplusplus
   extern "C" {
@@ -51,7 +51,7 @@
   }
 #endif
 
-#endif /* FTGRAYS_H */
+#endif /* __FTGRAYS_H__ */
 
 
 /* END */
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTSMOOTH_H
-#define FTSMOOTH_H
+#ifndef __FTSMOOTH_H__
+#define __FTSMOOTH_H__
 
 
 #include <ft2build.h>
@@ -38,7 +38,7 @@
 
 FT_END_HEADER
 
-#endif /* FTSMOOTH_H */
+#endif /* __FTSMOOTH_H__ */
 
 
 /* END */
--- a/src/truetype/ttdriver.h
+++ b/src/truetype/ttdriver.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTDRIVER_H
-#define TTDRIVER_H
+#ifndef __TTDRIVER_H__
+#define __TTDRIVER_H__
 
 
 #include <ft2build.h>
@@ -32,7 +32,7 @@
 
 FT_END_HEADER
 
-#endif /* TTDRIVER_H */
+#endif /* __TTDRIVER_H__ */
 
 
 /* END */
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTGLOAD_H
-#define TTGLOAD_H
+#ifndef __TTGLOAD_H__
+#define __TTGLOAD_H__
 
 
 #include <ft2build.h>
@@ -49,7 +49,7 @@
 
 FT_END_HEADER
 
-#endif /* TTGLOAD_H */
+#endif /* __TTGLOAD_H__ */
 
 
 /* END */
--- a/src/truetype/ttinterp.h
+++ b/src/truetype/ttinterp.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTINTERP_H
-#define TTINTERP_H
+#ifndef __TTINTERP_H__
+#define __TTINTERP_H__
 
 
 #include <ft2build.h>
@@ -304,7 +304,7 @@
 
 FT_END_HEADER
 
-#endif /* TTINTERP_H */
+#endif /* __TTINTERP_H__ */
 
 
 /* END */
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTOBJS_H
-#define TTOBJS_H
+#ifndef __TTOBJS_H__
+#define __TTOBJS_H__
 
 
 #include <ft2build.h>
@@ -417,7 +417,7 @@
 
 FT_END_HEADER
 
-#endif /* TTOBJS_H */
+#endif /* __TTOBJS_H__ */
 
 
 /* END */
--- a/src/truetype/ttpload.h
+++ b/src/truetype/ttpload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef TTPLOAD_H
-#define TTPLOAD_H
+#ifndef __TTPLOAD_H__
+#define __TTPLOAD_H__
 
 
 #include <ft2build.h>
@@ -42,7 +42,7 @@
 
 FT_END_HEADER
 
-#endif /* TTPLOAD_H */
+#endif /* __TTPLOAD_H__ */
 
 
 /* END */
--- a/src/type1/t1afm.h
+++ b/src/type1/t1afm.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1AFM_H
-#define T1AFM_H
+#ifndef __T1AFM_H__
+#define __T1AFM_H__
 
 #include <ft2build.h>
 #include FT_SOURCE_FILE(type1,t1objs.h)
@@ -60,7 +60,7 @@
 
 FT_END_HEADER
 
-#endif /* T1AFM_H */
+#endif /* __T1AFM_H__ */
 
 
 /* END */
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -15,6 +15,7 @@
 /*                                                                         */
 /***************************************************************************/
 
+
 #include <ft2build.h>
 #include FT_SOURCE_FILE(type1,t1driver.h)
 #include FT_SOURCE_FILE(type1,t1gload.h)
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1DRIVER_H
-#define T1DRIVER_H
+#ifndef __T1DRIVER_H__
+#define __T1DRIVER_H__
 
 
 #include <ft2build.h>
@@ -32,7 +32,7 @@
 
 FT_END_HEADER
 
-#endif /* T1DRIVER_H */
+#endif /* __T1DRIVER_H__ */
 
 
 /* END */
--- a/src/type1/t1gload.h
+++ b/src/type1/t1gload.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1GLOAD_H
-#define T1GLOAD_H
+#ifndef __T1GLOAD_H__
+#define __T1GLOAD_H__
 
 
 #include <ft2build.h>
@@ -40,7 +40,7 @@
 
 FT_END_HEADER
 
-#endif /* T1GLOAD_H */
+#endif /* __T1GLOAD_H__ */
 
 
 /* END */
--- a/src/type1/t1load.h
+++ b/src/type1/t1load.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1LOAD_H
-#define T1LOAD_H
+#ifndef __T1LOAD_H__
+#define __T1LOAD_H__
 
 
 #include <ft2build.h>
@@ -77,7 +77,7 @@
 
 FT_END_HEADER
 
-#endif /* T1LOAD_H */
+#endif /* __T1LOAD_H__ */
 
 
 /* END */
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1OBJS_H
-#define T1OBJS_H
+#ifndef __T1OBJS_H__
+#define __T1OBJS_H__
 
 
 #include <ft2build.h>
@@ -155,7 +155,7 @@
 
 FT_END_HEADER
 
-#endif /* T1OBJS_H */
+#endif /* __T1OBJS_H__ */
 
 
 /* END */
--- a/src/type1/t1parse.h
+++ b/src/type1/t1parse.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef T1PARSE_H
-#define T1PARSE_H
+#ifndef __T1PARSE_H__
+#define __T1PARSE_H__
 
 
 #include <ft2build.h>
@@ -128,7 +128,7 @@
 
 FT_END_HEADER
 
-#endif /* T1PARSE_H */
+#endif /* __T1PARSE_H__ */
 
 
 /* END */
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -16,22 +16,13 @@
 /***************************************************************************/
 
 
-#ifdef FT_FLAT_COMPILE
-
-#include "winfnt.h"
-
-#else
-
-#include <winfonts/winfnt.h>
-
-#endif
-
-
-#include <freetype/fterrors.h>
-#include <freetype/internal/ftstream.h>
-#include <freetype/internal/ftdebug.h>
-#include <freetype/internal/ftobjs.h>
-#include <freetype/internal/fnttypes.h>
+#include <ft2build.h>
+#include FT_ERRORS_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_FNT_TYPES_H
+#include FT_SOURCE_FILE(winfonts,winfnt.h)
 
 
   /*************************************************************************/
--- a/src/winfonts/winfnt.h
+++ b/src/winfonts/winfnt.h
@@ -16,26 +16,24 @@
 /***************************************************************************/
 
 
-#ifndef WINFNT_H
-#define WINFNT_H
+#ifndef __WINFNT_H__
+#define __WINFNT_H__
 
-#include <freetype/internal/ftdriver.h>
 
+#include <ft2build.h>
+#include FT_INTERNAL_DRIVER_H
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
 
+FT_BEGIN_HEADER
 
+
   FT_EXPORT_VAR( const FT_Driver_Class )  winfnt_driver_class;
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
 
-#endif /* WINFNT_H */
+#endif /* __WINFNT_H__ */
 
 
 /* END */