shithub: freetype+ttf2subf

Download patch

ref: dcbb708e7addcf312607f7814c4052c1964b348f
parent: 8f47453b6a466d32de347de527b350129975b4cc
author: Werner Lemberg <[email protected]>
date: Thu Feb 8 03:54:09 EST 2007

formatting, copyright years

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,19 +7,20 @@
 
 	* include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
 	Introduce __attribute((deprecated))__ to warn functions
-	which use non ANSI data types in their interfaces.
+	which use non-ANSI data types in its interfaces.
 	(FT_GetFile_From_Mac_Name): Deprecated, using FSSpec.
 	(FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec.
 	(FT_New_Face_From_FSSpec): Deprecated, using FSSpec.
 	(FT_New_Face_From_FSRef): Deprecated, using FSRef.
-	* src/base/ftmac.c: predefine FT_DEPRECATED_ATTRIBUTE as blank
-	to avoid warning in building freetype.
+
+	* src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void
+	to avoid warning in building FreeType.
 	* builds/mac/ftmac.c: Ditto.
 
 2007-02-05  suzuki toshiya  <[email protected]>
 
 	* src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured
-	"--with-fsspec" etc. Replace #include "ftmac.c" by
+	`--with-fsspec' etc.  Replace #include "ftmac.c" with
 	#include <ftmac.c>.
 
 2007-02-05  suzuki toshiya  <[email protected]>
@@ -33,16 +34,17 @@
 
 2007-02-05  suzuki toshiya  <[email protected]>
 
-	* include/freetype/ftmac.h: Fixed wrong comment, FSSpec of
+	* include/freetype/ftmac.h: Fixed wrong comment: FSSpec of
 	FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
 	for passing to FT_New_Face_From_FSSpec.
 
 2007-02-05  suzuki toshiya  <[email protected]>
 
-	* builds/unix/configure.raw: Checks if Mac OS X system headers
+	* builds/unix/configure.raw: Check whether Mac OS X system headers
 	can be built under ANSI C mode.
-	* src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by ANSI C
-	compatible one, if system headers are ANSI C incompatible.
+
+	* src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version
+	compatible to ANSI C in case system headers are ANSI C incompatible.
 	* builds/mac/ftmac.c (OS_INLINE): Ditto.
 
 2007-02-01  Werner Lemberg  <[email protected]>
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -5,7 +5,7 @@
 /*    Mac FOND support.  Written by [email protected].                    */
 /*  Heavily Fixed by mpsuzuki, George Williams and Sean McBride            */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -256,14 +256,13 @@
   FT_ATSFontGetFileReference( ATSFontRef  ats_font_id,
                               FSRef*      ats_font_ref )
   {
-    OSStatus    err;
-    FSSpec      spec;
+    OSStatus  err;
+    FSSpec    spec;
 
+
     err = ATSFontGetFileSpecification( ats_font_id, &spec );
     if ( noErr == err )
-    {
       err = FSpMakeFSRef( &spec, ats_font_ref );
-    }
 
     return err;
   }
@@ -305,7 +304,7 @@
         if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) )
           break;
 
-        id2 --;
+        id2--;
       }
       *face_index = ats_font_id - ( id2 + 1 );
     }
@@ -363,7 +362,7 @@
 
 #else
 
-  /* This function is deprecated because FSSpec is deprecated in Mac OS X  */
+  /* This function is deprecated because FSSpec is deprecated in Mac OS X. */
   FT_EXPORT_DEF( FT_Error )
   FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
                                 FSSpec*      pathSpec,
@@ -372,6 +371,7 @@
     FSRef     ref;
     FT_Error  err;
 
+
     err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
     if ( FT_Err_Ok != err )
       return err;
@@ -579,7 +579,7 @@
 #else
 
     FSSpec  spec;
-    FInfo  finfo;
+    FInfo   finfo;
 
 
     if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
@@ -666,7 +666,6 @@
      Thanks to Paul Miller ([email protected]) for the fix
      to load a face OTHER than the first one in the FOND!
   */
-
 
   static void
   parse_fond( char*   fond_data,
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -183,6 +183,7 @@
   FT2_EXTRA_LIBS="-Wl,-framework,CoreServices,-framework,ApplicationServices"
   LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
   AC_TRY_LINK([
+
 #if defined(__GNUC__) && defined(__APPLE_CC__)
 # include <Carbon/Carbon.h>
 # include <ApplicationServices/ApplicationServices.h>
@@ -190,6 +191,7 @@
 # include <ConditionalMacros.h>
 # include <Files.h>
 #endif
+
     ],
     [
 
@@ -204,6 +206,7 @@
      orig_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
      AC_TRY_COMPILE([
+
 #if defined(__GNUC__) && defined(__APPLE_CC__)
 # include <Carbon/Carbon.h>
 # include <ApplicationServices/ApplicationServices.h>
@@ -211,20 +214,24 @@
 # include <ConditionalMacros.h>
 # include <Files.h>
 #endif
+
        ],
        [
-         /* OSHostByteOrder() is typed as 'OS_INLINE' */
-         int32_t os_byte_order = OSHostByteOrder();
+
+         /* OSHostByteOrder() is typed as `OS_INLINE' */
+         int32_t  os_byte_order = OSHostByteOrder();
+
+
          if ( OSBigEndian != os_byte_order )
            return 1;
+
        ],
-       [
-         AC_MSG_RESULT([ok])
-         CFLAGS="$orig_CFLAGS"
-         CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
-       ],[
-         AC_MSG_RESULT([no, ANSI incompatible])
-         CFLAGS="$orig_CFLAGS"
+       [AC_MSG_RESULT([ok])
+        CFLAGS="$orig_CFLAGS"
+        CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
+       ],
+       [AC_MSG_RESULT([no, ANSI incompatible])
+        CFLAGS="$orig_CFLAGS"
        ])
     ],
     [AC_MSG_RESULT([not found])
@@ -263,16 +270,16 @@
     ],
     [
 
-  FCBPBPtr          paramBlock;
-  short             vRefNum;
-  long              dirID;
-  ConstStr255Param  fileName;
-  FSSpec*           spec;
+      FCBPBPtr          paramBlock;
+      short             vRefNum;
+      long              dirID;
+      ConstStr255Param  fileName;
+      FSSpec*           spec;
 
 
-  /* FSSpec functions: deprecated sicne Mac OS X 10.4 */
-  PBGetFCBInfoSync( paramBlock );
-  FSMakeFSSpec( vRefNum, dirID, fileName, spec );
+      /* FSSpec functions: deprecated since Mac OS X 10.4 */
+      PBGetFCBInfoSync( paramBlock );
+      FSMakeFSSpec( vRefNum, dirID, fileName, spec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -309,33 +316,33 @@
     ],
     [
 
-  FCBPBPtr             paramBlock;
-  short                vRefNum;
-  long                 dirID;
-  ConstStr255Param     fileName;
-  FSSpec*              spec;
+      FCBPBPtr             paramBlock;
+      short                vRefNum;
+      long                 dirID;
+      ConstStr255Param     fileName;
+      FSSpec*              spec;
 
-  Boolean*             isDirectory;
-  UInt8*               path;
-  SInt16               desiredRefNum;
-  SInt16*              iterator;
-  SInt16*              actualRefNum;
-  HFSUniStr255*        outForkName;
-  FSVolumeRefNum       volume;
-  FSCatalogInfoBitmap  whichInfo;
-  FSCatalogInfo*       catalogInfo;
-  FSForkInfo*          forkInfo;
-  FSRef*               ref;
+      Boolean*             isDirectory;
+      UInt8*               path;
+      SInt16               desiredRefNum;
+      SInt16*              iterator;
+      SInt16*              actualRefNum;
+      HFSUniStr255*        outForkName;
+      FSVolumeRefNum       volume;
+      FSCatalogInfoBitmap  whichInfo;
+      FSCatalogInfo*       catalogInfo;
+      FSForkInfo*          forkInfo;
+      FSRef*               ref;
 
 
-  /* FSRef functions: no need to check? */
-  FSGetForkCBInfo( desiredRefNum, volume, iterator,
-                   actualRefNum, forkInfo, ref,
-                   outForkName );
-  FSpMakeFSRef ( spec, ref );
-  FSGetCatalogInfo( ref, whichInfo, catalogInfo,
-                    outForkName, spec, ref );
-  FSPathMakeRef( path, ref, isDirectory );
+      /* FSRef functions: no need to check? */
+      FSGetForkCBInfo( desiredRefNum, volume, iterator,
+                       actualRefNum, forkInfo, ref,
+                       outForkName );
+      FSpMakeFSRef ( spec, ref );
+      FSGetCatalogInfo( ref, whichInfo, catalogInfo,
+                        outForkName, spec, ref );
+      FSPathMakeRef( path, ref, isDirectory );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -345,7 +352,8 @@
 fi
 
 
-# Whether to use QuickDraw API in ToolBox which is deprecated since Mac OS X 10.4.
+# Whether to use QuickDraw API in ToolBox which is deprecated since
+# Mac OS X 10.4.
 
 AC_ARG_WITH([quickdraw-toolbox],
   AS_HELP_STRING([--with-quickdraw-toolbox],
@@ -367,15 +375,15 @@
     ],
     [
 
-  Str255     familyName;
-  SInt16     familyID   = 0;
-  FMInput*   fmIn       = NULL;
-  FMOutput*  fmOut      = NULL;
+      Str255     familyName;
+      SInt16     familyID   = 0;
+      FMInput*   fmIn       = NULL;
+      FMOutput*  fmOut      = NULL;
 
 
-  GetFontName( familyID, familyName );
-  GetFNum( familyName, &familyID );
-  fmOut = FMSwapFont( fmIn );
+      GetFontName( familyID, familyName );
+      GetFNum( familyName, &familyID );
+      fmOut = FMSwapFont( fmIn );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -385,7 +393,8 @@
 fi
 
 
-# Whether to use QuickDraw API in Carbon which is deprecated since Mac OS X 10.4.
+# Whether to use QuickDraw API in Carbon which is deprecated since
+# Mac OS X 10.4.
 
 AC_ARG_WITH([quickdraw-carbon],
   AS_HELP_STRING([--with-quickdraw-carbon],
@@ -407,24 +416,25 @@
     ],
     [
 
-  FMFontFamilyIterator          famIter;
-  FMFontFamily                  family;
-  Str255                        famNameStr;
-  FMFontFamilyInstanceIterator  instIter;
-  FMFontStyle                   style;
-  FMFontSize                    size;
-  FMFont                        font;
-  FSSpec*                       pathSpec;
+      FMFontFamilyIterator          famIter;
+      FMFontFamily                  family;
+      Str255                        famNameStr;
+      FMFontFamilyInstanceIterator  instIter;
+      FMFontStyle                   style;
+      FMFontSize                    size;
+      FMFont                        font;
+      FSSpec*                       pathSpec;
 
 
-  FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, &famIter );
-  FMGetNextFontFamily( &famIter, &family );
-  FMGetFontFamilyName( family, famNameStr );
-  FMCreateFontFamilyInstanceIterator( family, &instIter );
-  FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
-  FMDisposeFontFamilyInstanceIterator( &instIter );
-  FMDisposeFontFamilyIterator( &famIter );
-  FMGetFontContainer( font, pathSpec );
+      FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
+                                  &famIter );
+      FMGetNextFontFamily( &famIter, &family );
+      FMGetFontFamilyName( family, famNameStr );
+      FMCreateFontFamilyInstanceIterator( family, &instIter );
+      FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
+      FMDisposeFontFamilyInstanceIterator( &instIter );
+      FMDisposeFontFamilyIterator( &famIter );
+      FMGetFontContainer( font, pathSpec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -451,11 +461,11 @@
     ],
     [
 
-  FSSpec*  pathSpec;
+      FSSpec*  pathSpec;
 
 
-  ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
-  ATSFontGetFileSpecification( 0, pathSpec );
+      ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
+      ATSFontGetFileSpecification( 0, pathSpec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -503,7 +513,7 @@
    rm ftconfig.tmp])
 
 # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
-# and 'builds/unix/unix-cc.mk' that will be used by the build system
+# and `builds/unix/unix-cc.mk' that will be used by the build system
 #
 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
                  unix-def.mk:unix-def.in
@@ -516,4 +526,4 @@
 
 AC_OUTPUT
 
-# end of configure.ac
+# end of configure.raw
--- a/include/freetype/ftmac.h
+++ b/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Additional Mac-specific API.                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2004, 2006 by                                     */
+/*  Copyright 1996-2001, 2004, 2006, 2007 by                               */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -35,10 +35,11 @@
 FT_BEGIN_HEADER
 
 
-/* gcc-3.4.1 and later can warn the functions attributed as deprecated */
+/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
 #ifndef FT_DEPRECATED_ATTRIBUTE
-#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
-#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#if defined(__GNUC__)                                               && \
+    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))
 #else
 #define FT_DEPRECATED_ATTRIBUTE
 #endif
@@ -115,10 +116,10 @@
   /*                  Bold).                                               */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    pathSpec   :: FSSpec to the file. For passing to                   */
+  /*    pathSpec   :: FSSpec to the file.  For passing to                  */
   /*                  @FT_New_Face_From_FSSpec.                            */
   /*                                                                       */
-  /*    face_index :: Index of the face. For passing to                    */
+  /*    face_index :: Index of the face.  For passing to                   */
   /*                  @FT_New_Face_From_FSSpec.                            */
   /*                                                                       */
   /* <Return>                                                              */
@@ -172,8 +173,8 @@
   /*    fontName    :: Mac OS name of the font in ATS framework.           */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    path        :: Buffer to store pathname of the file. For passing   */
-  /*                   to @FT_New_Face. The client must allocate this      */
+  /*    path        :: Buffer to store pathname of the file.  For passing  */
+  /*                   to @FT_New_Face.  The client must allocate this     */
   /*                   buffer before calling this function.                */
   /*                                                                       */
   /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */
--- a/src/base/ftbase.c
+++ b/src/base/ftbase.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Single object library component (body only).                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 by                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by                   */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -8,7 +8,7 @@
 /*  This file is for Mac OS X only; see builds/mac/ftoldmac.c for          */
 /*  classic platforms built by MPW.                                        */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -74,7 +74,7 @@
   /* -ansi compilation flag of GCC.                         */
 #if !HAVE_ANSI_OS_INLINE
 #undef  OS_INLINE
-#define OS_INLINE   static __inline__
+#define OS_INLINE  static __inline__
 #endif
 #include <Carbon/Carbon.h>
 
@@ -118,14 +118,13 @@
   FT_ATSFontGetFileReference( ATSFontRef  ats_font_id,
                               FSRef*      ats_font_ref )
   {
-    OSStatus    err;
-    FSSpec      spec;
+    OSStatus  err;
+    FSSpec    spec;
 
+
     err = ATSFontGetFileSpecification( ats_font_id, &spec );
     if ( noErr == err )
-    {
       err = FSpMakeFSRef( &spec, ats_font_ref );
-    }
 
     return err;
   }
@@ -204,11 +203,15 @@
                                 FT_Long*     face_index )
   {
 #if __LP64__
+
     return FT_Err_Unimplemented_Feature;
+
 #else
+
     FSRef     ref;
     FT_Error  err;
 
+
     err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
     if ( FT_Err_Ok != err )
       return err;
@@ -218,6 +221,7 @@
       return FT_Err_Unknown_File_Format;
 
     return FT_Err_Ok;
+
 #endif
   }