Formatting, copyright years.

This commit is contained in:
Werner Lemberg 2006-01-27 14:16:16 +00:00
parent 6a681fa84a
commit be3c9814a4
20 changed files with 210 additions and 149 deletions

View File

@ -1,36 +1,67 @@
2006-01-27 David Turner <david@freetype.org>
* src/autofit/afwarp.c: simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental)
* src/autofit/afwarp.c: Simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental).
* Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
and "otvalid" from the list of modules that are linked statically
* Jamfile, include/freetype/config/ftmodule.h: Removed `gxvalid'
and `otvalid' from the list of modules that are linked statically
to a given FreeType library. Functionality has been moved to the
"ftvalid" CVS module.
`ftvalid' CVS module.
note also that current Make-based build system still compiles the
modules though...
Note also that current Make-based build system still compiles the
modules though.
* include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
which controls the definitions of the memory management functions
to avoid warnings with recent versions of GCC. this macro is
only here to be disabled, in case we detect problems with the
new scheme.
* include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro
which controls the definitions of the memory management functions to
avoid warnings with recent versions of GCC. This macro is only here
to be disabled, in case we detect problems with the new scheme.
NOTE: disable macro to use the memory debugger. this will be fixed
later !!
NOTE: Disable macro to use the memory debugger -- this will be fixed
later!
* builds/win32/visualc/freetype.dsp: updating project file to
define FT2_BUILD_LIBRARY, and remove gxvalid+otvalid from
compilation
* include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc,
FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]:
New versions.
* builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY
when compiling the library.
* include/freetype/config/ftheader.h: remove inclusions of
internal headers, except if the macro FT2_BUILD_LIBRARY is defined.
* builds/win32/visualc/freetype.dsp: Updating project file to
define FT2_BUILD_LIBRARY, and remove gxvalid + otvalid modules from
compilation.
* builds/freetype.mk (FT_CFLAGS), Jamfile (DEFINES): Define the
macro FT2_BUILD_LIBRARY when compiling the library.
* include/freetype/config/ftheader.h: Remove inclusions of internal
headers except if the macro FT2_BUILD_LIBRARY is defined.
* include/freetype/internal/psaux.h (AFM_KernPair, AFM_TrackKern,
AFM_FontInfo): Move structure declarations to...
* include/freetype/internal/t1types.h: This file.
* (many files): Fix compiler warnings.
Various minor reorganizations.
* src/cff/cffload.c (cff_font_done): Don't free static array
`subfonts'.
* src/otvalid/otvcommn.c (otv_ClassDef_validate),
src/otvalid/otvgpos.c (otv_x_sxy): Fix debugging information.
* src/psaux/afmparse.c: Include ft2build.h and FT_FREETYPE_H.
(AFM_MAX_ARGUMENTS): Define...
* src/psaux/afmparse.h: Here.
* src/psaux/Jamfile (_sources): Add afmparse.
* src/psaux/psconv.c: Include psconv.h.
* src/type1/t1afm.c: Don't include FT_INTERNAL_TYPE1_TYPES_H but
FT_INTERNAL_POSTSCRIPT_AUX_H.
* src/type1/t1afm.h: Include FT_INTERNAL_TYPE1_TYPES_H.
2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/freetype.h (FT_Select_Size): Rename the second

View File

@ -1,6 +1,6 @@
# FreeType 2 top Jamfile.
#
# Copyright 2001, 2002, 2003, 2004, 2005 by
# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005 by
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -133,9 +133,9 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
# old FreeType versions.
#
# note what we also define the macro FT2_BUILD_LIBRARY when building
# FreeType. this is required to let our sources include the internal
# headers (something forbidden by clients)
# Note what we also define the macro FT2_BUILD_LIBRARY when building
# FreeType. This is required to let our sources include the internal
# headers (something forbidden by clients).
#
FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY
FT_CC = $(CC) $(FT_CFLAGS)

View File

@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -626,14 +626,17 @@
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/* now include internal headers definitions from <freetype/internal/...>
* only when we're building the library !!
/*
* Include internal headers definitions from <freetype/internal/...>
* only when building the library.
*/
#ifdef FT2_BUILD_LIBRARY
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
#endif /* __FT2_BUILD_H__ */

View File

@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -559,17 +559,19 @@ FT_BEGIN_HEADER
/*
* This temporary macro is used to control various optimizations for
* reducing the heap footprint of memory-mapped TrueType files.
*
*/
#define FT_OPTIMIZE_MEMORY
/* this temporary macro is used to control wether we're going to
* compile certain functions like FT_Alloc in a way that prevent recent
* GCC releases from spouting horrible "strict aliasing" warning
* messages each time a memory-management function is called
/*
* This temporary macro is used to control whether we are going to
* compile certain functions like FT_Alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called.
*/
#define FT_STRICT_ALIASING
FT_END_HEADER

View File

@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -56,10 +56,14 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
#ifdef FT_STRICT_ALIASING
/* the allocation functions return a pointer, and the error code
* is written to through the 'p_error' parameter
/*
* The allocation functions return a pointer, and the error code
* is written to through the `p_error' parameter. See below for
* for documentation.
*/
FT_BASE( FT_Pointer )
@ -93,6 +97,7 @@ FT_BEGIN_HEADER
#ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Pointer )
FT_Alloc_Debug( FT_Memory memory,
FT_Long size,
@ -152,7 +157,8 @@ FT_BEGIN_HEADER
#define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( _pointer_ ) { \
if ( _pointer_ ) \
{ \
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
(_pointer_) = NULL; \
} \
@ -161,12 +167,14 @@ FT_BEGIN_HEADER
#else /* !FT_DEBUG_MEMORY */
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc( memory, _size_, &error )
#define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( (_pointer_) ) { \
if ( (_pointer_) ) \
{ \
FT_Free( memory, (_pointer_) ); \
(_pointer_) = NULL; \
} \
@ -185,12 +193,16 @@ FT_BEGIN_HEADER
#endif /* !FT_DEBUG_MEMORY */
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
#else /* !FT_STRICT_ALIASING */
#ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Error )
FT_Alloc_Debug( FT_Memory memory,
FT_Long size,
@ -227,8 +239,8 @@ FT_BEGIN_HEADER
const char* file_name,
FT_Long line_no );
# endif /* FT_DEBUG_MEMORY */
#endif /* FT_DEBUG_MEMORY */
/*************************************************************************/
@ -383,8 +395,10 @@ FT_BEGIN_HEADER
FT_Free( FT_Memory memory,
void* *P );
#ifdef FT_DEBUG_MEMORY
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
@ -433,12 +447,14 @@ FT_BEGIN_HEADER
FT_QRealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
#endif /* !FT_DEBUG_MEMORY */
#define FT_MEM_SET_ERROR( cond ) ( ( error = (cond) ) != 0 )
#endif /* !FT_STRICT_ALIASING */
#endif /* !FT_STRICT_ALIASING */
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
@ -472,7 +488,6 @@ FT_BEGIN_HEADER
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
/*************************************************************************/
/* */
/* The following functions macros expect that their pointer argument is */
@ -517,11 +532,9 @@ FT_BEGIN_HEADER
/* */
/* The following macros are variants of their FT_MEM_XXXX equivalents; */
/* they are used to set an _implicit_ `error' variable and return TRUE */
/* if an error occured (i.e. if 'error != 0'). */
/* if an error occured (i.e., if 'error != 0'). */
/* */
#define FT_ALLOC( _pointer_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )

View File

@ -5,7 +5,7 @@
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
/* bitmaps into 8bpp format (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -1724,10 +1724,10 @@
if ( FT_IS_SCALABLE( face ) )
{
if ( face->height < 0 )
face->height = (short)-face->height;
face->height = (FT_Short)-face->height;
if ( !FT_HAS_VERTICAL( face ) )
face->max_advance_height = (short)face->height;
face->max_advance_height = (FT_Short)face->height;
}
if ( FT_HAS_FIXED_SIZES( face ) )

View File

@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */

View File

@ -45,6 +45,7 @@
/*************************************************************************/
/*************************************************************************/
#ifdef FT_STRICT_ALIASING
@ -53,9 +54,10 @@
FT_Long size,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
if ( size > 0 )
{
block = memory->alloc( memory, size );
@ -64,6 +66,7 @@
else
FT_MEM_ZERO( block, size );
}
*p_error = error;
return block;
}
@ -74,15 +77,17 @@
FT_Long size,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
if ( size > 0 )
{
block = memory->alloc( memory, size );
if ( block == NULL )
error = FT_Err_Out_Of_Memory;
}
*p_error = error;
return block;
}
@ -95,7 +100,8 @@
void* block,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
if ( size <= 0 )
{
@ -112,6 +118,7 @@
{
FT_Pointer block2;
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
@ -122,6 +129,7 @@
FT_MEM_ZERO( (char*)block + current, size-current );
}
}
*p_error = error;
return block;
}
@ -134,7 +142,8 @@
void* block,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
if ( size <= 0 )
{
@ -151,15 +160,16 @@
{
FT_Pointer block2;
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
else
block = block2;
}
*p_error = error;
return block;
}
FT_BASE_DEF( void )
@ -170,8 +180,10 @@
memory->free( memory, (void*)P );
}
#else /* !FT_STRICT_ALIASING */
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )

View File

@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -2293,8 +2293,6 @@
{
for ( idx = 0; idx < font->num_subfonts; idx++ )
cff_subfont_done( memory, font->subfonts[idx] );
/* FT_FREE( font->subfonts ); -- bug this is a static array !! */
}
cff_encoding_done( &font->encoding );

View File

@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
/* Copyright 2002, 2003, 2004, 2005 by */
/* Copyright 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType GPOS table validation (body). */
/* */
/* Copyright 2002, 2004, 2005 by */
/* Copyright 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -401,6 +401,7 @@
FT_Memory memory = parser->memory;
FT_Error error;
if ( !FT_QALLOC( val->u.s, len + 1 ) )
{
ft_memcpy( val->u.s, str, len );
@ -880,6 +881,7 @@
{
AFM_ValueRec shared_vals[1];
shared_vals[0].type = AFM_VALUE_TYPE_BOOL;
if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )
goto Fail;

View File

@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */