formatting, copyright years

This commit is contained in:
Werner Lemberg 2007-02-08 08:54:09 +00:00
parent 8f47453b6a
commit dcbb708e7a
6 changed files with 119 additions and 103 deletions

View File

@ -7,19 +7,20 @@
* include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE): * include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
Introduce __attribute((deprecated))__ to warn functions 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_Name): Deprecated, using FSSpec.
(FT_GetFile_From_Mac_ATS_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_FSSpec): Deprecated, using FSSpec.
(FT_New_Face_From_FSRef): Deprecated, using FSRef. (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. * builds/mac/ftmac.c: Ditto.
2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured * 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>. #include <ftmac.c>.
2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -33,16 +34,17 @@
2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* 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 FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
for passing to FT_New_Face_From_FSSpec. for passing to FT_New_Face_From_FSSpec.
2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* 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. 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. * builds/mac/ftmac.c (OS_INLINE): Ditto.
2007-02-01 Werner Lemberg <wl@gnu.org> 2007-02-01 Werner Lemberg <wl@gnu.org>

View File

@ -5,7 +5,7 @@
/* Mac FOND support. Written by just@letterror.com. */ /* Mac FOND support. Written by just@letterror.com. */
/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* 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. */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -256,14 +256,13 @@
FT_ATSFontGetFileReference( ATSFontRef ats_font_id, FT_ATSFontGetFileReference( ATSFontRef ats_font_id,
FSRef* ats_font_ref ) FSRef* ats_font_ref )
{ {
OSStatus err; OSStatus err;
FSSpec spec; FSSpec spec;
err = ATSFontGetFileSpecification( ats_font_id, &spec ); err = ATSFontGetFileSpecification( ats_font_id, &spec );
if ( noErr == err ) if ( noErr == err )
{
err = FSpMakeFSRef( &spec, ats_font_ref ); err = FSpMakeFSRef( &spec, ats_font_ref );
}
return err; return err;
} }
@ -305,7 +304,7 @@
if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) ) if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) )
break; break;
id2 --; id2--;
} }
*face_index = ats_font_id - ( id2 + 1 ); *face_index = ats_font_id - ( id2 + 1 );
} }
@ -363,7 +362,7 @@
#else #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_EXPORT_DEF( FT_Error )
FT_GetFile_From_Mac_ATS_Name( const char* fontName, FT_GetFile_From_Mac_ATS_Name( const char* fontName,
FSSpec* pathSpec, FSSpec* pathSpec,
@ -372,6 +371,7 @@
FSRef ref; FSRef ref;
FT_Error err; FT_Error err;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( FT_Err_Ok != err ) if ( FT_Err_Ok != err )
return err; return err;
@ -579,7 +579,7 @@
#else #else
FSSpec spec; FSSpec spec;
FInfo finfo; FInfo finfo;
if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) ) if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
@ -667,7 +667,6 @@
to load a face OTHER than the first one in the FOND! to load a face OTHER than the first one in the FOND!
*/ */
static void static void
parse_fond( char* fond_data, parse_fond( char* fond_data,
short* have_sfnt, short* have_sfnt,

View File

@ -183,6 +183,7 @@ if test x$with_old_mac_fonts = xyes; then
FT2_EXTRA_LIBS="-Wl,-framework,CoreServices,-framework,ApplicationServices" FT2_EXTRA_LIBS="-Wl,-framework,CoreServices,-framework,ApplicationServices"
LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS" LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
AC_TRY_LINK([ AC_TRY_LINK([
#if defined(__GNUC__) && defined(__APPLE_CC__) #if defined(__GNUC__) && defined(__APPLE_CC__)
# include <Carbon/Carbon.h> # include <Carbon/Carbon.h>
# include <ApplicationServices/ApplicationServices.h> # include <ApplicationServices/ApplicationServices.h>
@ -190,6 +191,7 @@ if test x$with_old_mac_fonts = xyes; then
# include <ConditionalMacros.h> # include <ConditionalMacros.h>
# include <Files.h> # include <Files.h>
#endif #endif
], ],
[ [
@ -204,6 +206,7 @@ if test x$with_old_mac_fonts = xyes; then
orig_CFLAGS="$CFLAGS" orig_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined(__GNUC__) && defined(__APPLE_CC__) #if defined(__GNUC__) && defined(__APPLE_CC__)
# include <Carbon/Carbon.h> # include <Carbon/Carbon.h>
# include <ApplicationServices/ApplicationServices.h> # include <ApplicationServices/ApplicationServices.h>
@ -211,20 +214,24 @@ if test x$with_old_mac_fonts = xyes; then
# include <ConditionalMacros.h> # include <ConditionalMacros.h>
# include <Files.h> # include <Files.h>
#endif #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 ) if ( OSBigEndian != os_byte_order )
return 1; return 1;
], ],
[ [AC_MSG_RESULT([ok])
AC_MSG_RESULT([ok]) CFLAGS="$orig_CFLAGS"
CFLAGS="$orig_CFLAGS" CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1" ],
],[ [AC_MSG_RESULT([no, ANSI incompatible])
AC_MSG_RESULT([no, ANSI incompatible]) CFLAGS="$orig_CFLAGS"
CFLAGS="$orig_CFLAGS"
]) ])
], ],
[AC_MSG_RESULT([not found]) [AC_MSG_RESULT([not found])
@ -263,16 +270,16 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
], ],
[ [
FCBPBPtr paramBlock; FCBPBPtr paramBlock;
short vRefNum; short vRefNum;
long dirID; long dirID;
ConstStr255Param fileName; ConstStr255Param fileName;
FSSpec* spec; FSSpec* spec;
/* FSSpec functions: deprecated sicne Mac OS X 10.4 */ /* FSSpec functions: deprecated since Mac OS X 10.4 */
PBGetFCBInfoSync( paramBlock ); PBGetFCBInfoSync( paramBlock );
FSMakeFSSpec( vRefNum, dirID, fileName, spec ); FSMakeFSSpec( vRefNum, dirID, fileName, spec );
], ],
[AC_MSG_RESULT([ok]) [AC_MSG_RESULT([ok])
@ -309,33 +316,33 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
], ],
[ [
FCBPBPtr paramBlock; FCBPBPtr paramBlock;
short vRefNum; short vRefNum;
long dirID; long dirID;
ConstStr255Param fileName; ConstStr255Param fileName;
FSSpec* spec; FSSpec* spec;
Boolean* isDirectory; Boolean* isDirectory;
UInt8* path; UInt8* path;
SInt16 desiredRefNum; SInt16 desiredRefNum;
SInt16* iterator; SInt16* iterator;
SInt16* actualRefNum; SInt16* actualRefNum;
HFSUniStr255* outForkName; HFSUniStr255* outForkName;
FSVolumeRefNum volume; FSVolumeRefNum volume;
FSCatalogInfoBitmap whichInfo; FSCatalogInfoBitmap whichInfo;
FSCatalogInfo* catalogInfo; FSCatalogInfo* catalogInfo;
FSForkInfo* forkInfo; FSForkInfo* forkInfo;
FSRef* ref; FSRef* ref;
/* FSRef functions: no need to check? */ /* FSRef functions: no need to check? */
FSGetForkCBInfo( desiredRefNum, volume, iterator, FSGetForkCBInfo( desiredRefNum, volume, iterator,
actualRefNum, forkInfo, ref, actualRefNum, forkInfo, ref,
outForkName ); outForkName );
FSpMakeFSRef ( spec, ref ); FSpMakeFSRef ( spec, ref );
FSGetCatalogInfo( ref, whichInfo, catalogInfo, FSGetCatalogInfo( ref, whichInfo, catalogInfo,
outForkName, spec, ref ); outForkName, spec, ref );
FSPathMakeRef( path, ref, isDirectory ); FSPathMakeRef( path, ref, isDirectory );
], ],
[AC_MSG_RESULT([ok]) [AC_MSG_RESULT([ok])
@ -345,7 +352,8 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
fi 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], AC_ARG_WITH([quickdraw-toolbox],
AS_HELP_STRING([--with-quickdraw-toolbox], AS_HELP_STRING([--with-quickdraw-toolbox],
@ -367,15 +375,15 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
], ],
[ [
Str255 familyName; Str255 familyName;
SInt16 familyID = 0; SInt16 familyID = 0;
FMInput* fmIn = NULL; FMInput* fmIn = NULL;
FMOutput* fmOut = NULL; FMOutput* fmOut = NULL;
GetFontName( familyID, familyName ); GetFontName( familyID, familyName );
GetFNum( familyName, &familyID ); GetFNum( familyName, &familyID );
fmOut = FMSwapFont( fmIn ); fmOut = FMSwapFont( fmIn );
], ],
[AC_MSG_RESULT([ok]) [AC_MSG_RESULT([ok])
@ -385,7 +393,8 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
fi 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], AC_ARG_WITH([quickdraw-carbon],
AS_HELP_STRING([--with-quickdraw-carbon], AS_HELP_STRING([--with-quickdraw-carbon],
@ -407,24 +416,25 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then
], ],
[ [
FMFontFamilyIterator famIter; FMFontFamilyIterator famIter;
FMFontFamily family; FMFontFamily family;
Str255 famNameStr; Str255 famNameStr;
FMFontFamilyInstanceIterator instIter; FMFontFamilyInstanceIterator instIter;
FMFontStyle style; FMFontStyle style;
FMFontSize size; FMFontSize size;
FMFont font; FMFont font;
FSSpec* pathSpec; FSSpec* pathSpec;
FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, &famIter ); FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
FMGetNextFontFamily( &famIter, &family ); &famIter );
FMGetFontFamilyName( family, famNameStr ); FMGetNextFontFamily( &famIter, &family );
FMCreateFontFamilyInstanceIterator( family, &instIter ); FMGetFontFamilyName( family, famNameStr );
FMGetNextFontFamilyInstance( &instIter, &font, &style, &size ); FMCreateFontFamilyInstanceIterator( family, &instIter );
FMDisposeFontFamilyInstanceIterator( &instIter ); FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
FMDisposeFontFamilyIterator( &famIter ); FMDisposeFontFamilyInstanceIterator( &instIter );
FMGetFontContainer( font, pathSpec ); FMDisposeFontFamilyIterator( &famIter );
FMGetFontContainer( font, pathSpec );
], ],
[AC_MSG_RESULT([ok]) [AC_MSG_RESULT([ok])
@ -451,11 +461,11 @@ elif test x$with_old_mac_fonts = xyes -a x$with_ats != x ; then
], ],
[ [
FSSpec* pathSpec; FSSpec* pathSpec;
ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
ATSFontGetFileSpecification( 0, pathSpec ); ATSFontGetFileSpecification( 0, pathSpec );
], ],
[AC_MSG_RESULT([ok]) [AC_MSG_RESULT([ok])
@ -503,7 +513,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
rm ftconfig.tmp]) rm ftconfig.tmp])
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' # 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 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
unix-def.mk:unix-def.in unix-def.mk:unix-def.in
@ -516,4 +526,4 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
AC_OUTPUT AC_OUTPUT
# end of configure.ac # end of configure.raw

View File

@ -4,7 +4,7 @@
/* */ /* */
/* Additional Mac-specific API. */ /* 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. */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -35,10 +35,11 @@
FT_BEGIN_HEADER 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 #ifndef FT_DEPRECATED_ATTRIBUTE
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #if defined(__GNUC__) && \
#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
#else #else
#define FT_DEPRECATED_ATTRIBUTE #define FT_DEPRECATED_ATTRIBUTE
#endif #endif
@ -115,10 +116,10 @@ FT_BEGIN_HEADER
/* Bold). */ /* Bold). */
/* */ /* */
/* <Output> */ /* <Output> */
/* pathSpec :: FSSpec to the file. For passing to */ /* pathSpec :: FSSpec to the file. For passing to */
/* @FT_New_Face_From_FSSpec. */ /* @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. */ /* @FT_New_Face_From_FSSpec. */
/* */ /* */
/* <Return> */ /* <Return> */
@ -172,8 +173,8 @@ FT_BEGIN_HEADER
/* fontName :: Mac OS name of the font in ATS framework. */ /* fontName :: Mac OS name of the font in ATS framework. */
/* */ /* */
/* <Output> */ /* <Output> */
/* path :: Buffer to store pathname of the file. For passing */ /* path :: Buffer to store pathname of the file. For passing */
/* to @FT_New_Face. The client must allocate this */ /* to @FT_New_Face. The client must allocate this */
/* buffer before calling this function. */ /* buffer before calling this function. */
/* */ /* */
/* maxPathSize :: Lengths of the buffer `path' that client allocated. */ /* maxPathSize :: Lengths of the buffer `path' that client allocated. */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* Single object library component (body only). */ /* 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. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */

View File

@ -8,7 +8,7 @@
/* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */ /* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */
/* classic platforms built by MPW. */ /* 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. */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -74,7 +74,7 @@
/* -ansi compilation flag of GCC. */ /* -ansi compilation flag of GCC. */
#if !HAVE_ANSI_OS_INLINE #if !HAVE_ANSI_OS_INLINE
#undef OS_INLINE #undef OS_INLINE
#define OS_INLINE static __inline__ #define OS_INLINE static __inline__
#endif #endif
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
@ -118,14 +118,13 @@
FT_ATSFontGetFileReference( ATSFontRef ats_font_id, FT_ATSFontGetFileReference( ATSFontRef ats_font_id,
FSRef* ats_font_ref ) FSRef* ats_font_ref )
{ {
OSStatus err; OSStatus err;
FSSpec spec; FSSpec spec;
err = ATSFontGetFileSpecification( ats_font_id, &spec ); err = ATSFontGetFileSpecification( ats_font_id, &spec );
if ( noErr == err ) if ( noErr == err )
{
err = FSpMakeFSRef( &spec, ats_font_ref ); err = FSpMakeFSRef( &spec, ats_font_ref );
}
return err; return err;
} }
@ -204,11 +203,15 @@
FT_Long* face_index ) FT_Long* face_index )
{ {
#if __LP64__ #if __LP64__
return FT_Err_Unimplemented_Feature; return FT_Err_Unimplemented_Feature;
#else #else
FSRef ref; FSRef ref;
FT_Error err; FT_Error err;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( FT_Err_Ok != err ) if ( FT_Err_Ok != err )
return err; return err;
@ -218,6 +221,7 @@
return FT_Err_Unknown_File_Format; return FT_Err_Unknown_File_Format;
return FT_Err_Ok; return FT_Err_Ok;
#endif #endif
} }