* src/base/ftobjs.c (FT_Open_Face): Avoid possible memory leak.

Make compiling instructions in docs/CUSTOMIZE work again.

* builds/unix/unix-cc.in (CPPFLAGS): New variable.
(CFLAGS): Don't include @CPPFLAGS@.
* builds/freetype.mk (FT_CFLAGS): Add CPPFLAGS.
This commit is contained in:
Werner Lemberg 2005-11-04 06:58:49 +00:00
parent dab2454635
commit b2d025306e
5 changed files with 54 additions and 35 deletions

View File

@ -1,41 +1,51 @@
2005-11-03 Ville Syrjälä <syrjala@sci.fi>
* src/base/ftobjs.c (FT_Open_Face): Avoid possible memory leak.
2005-11-02 Werner Lemberg <wl@gnu.org>
Make compiling instructions in docs/CUSTOMIZE work again.
* builds/unix/unix-cc.in (CPPFLAGS): New variable.
(CFLAGS): Don't include @CPPFLAGS@.
* builds/freetype.mk (FT_CFLAGS): Add CPPFLAGS.
2005-10-28 David Turner <david@freetype.org> 2005-10-28 David Turner <david@freetype.org>
* builds/exports.mk, builds/freetype.mk, builds/compiler/visualc.mk, * builds/exports.mk, builds/freetype.mk, builds/compiler/visualc.mk,
builds/dos/dos-def.mk, builds/os2/os2-def.mk, builds/unix/unix-cc.in, builds/dos/dos-def.mk, builds/os2/os2-def.mk,
builds/unix/unixddef.mk, builds/win32/w32-bcc.mk, builds/unix/unix-cc.in, builds/unix/unixddef.mk,
builds/win32/w32-gcc.mk, builds/win32/w32-icc.mk, builds/win32/w32-bcc.mk, builds/win32/w32-gcc.mk,
builds/win32/w32-intl.mk, builds/win32/w32-mingw32.mk, builds/win32/w32-icc.mk, builds/win32/w32-intl.mk,
builds/win32/w32-vcc.mk, builds/win32/w32-wat.mk, builds/win32/w32-mingw32.mk, builds/win32/w32-vcc.mk,
builds/win32/w32-def.mk, Jamfile: builds/win32/w32-wat.mk, builds/win32/w32-def.mk, Jamfile: Update
build system to support the generation of a list of exported symbols
or Windows .DEF files by parsing the public headers with the
`apinames' tool located in src/tools/apinames.c.
updating build system to support the generation of a list of exported Only tested on Unix at the moment. On Windows, the .DEF file is
symbols or Windows .DEF files by parsing the public headers with the generated but isn't used yet to generate a DLL.
"apinames" tool located in src/tools/apinames.c.
only tested on Unix at the moment. On Windows, the .DEF file is
generated but isn't used yet to generate a DLL
* src/pfr/pfrtypes.h, src/pfr/pfrobjs.h, src/pfr/pfrload.c, * src/pfr/pfrtypes.h, src/pfr/pfrobjs.h, src/pfr/pfrload.c,
src/pfr/pfrobjs.c, src/pfr/pfrgload.c: src/pfr/pfrobjs.c, src/pfr/pfrgload.c:
* src/base/fttrigon.c (ft_trig_prenorm), src/base/ftcalc.c (FT_MulFix): * src/base/fttrigon.c (ft_trig_prenorm), src/base/ftcalc.c
performance optimizations (FT_MulFix): Performance optimizations.
* include/freetype/internal/ftgloader.h, src/base/ftgloader.h: * include/freetype/internal/ftgloader.h, src/base/ftgloader.h:
introductin the FT_GLYPHLOADER_CHECKXXXX macros, and fixed a small Introduce the FT_GLYPHLOADER_CHECKXXXX macros, and fix a small bug
bug within FT_GlyphLoader_CheckPoints which caused "AdjustPoints" to within FT_GlyphLoader_CheckPoints which caused `AdjustPoints' to be
be called everytime. called everytime.
* src/autofit/afloader.c, src/truetype/ttgload.c: performance * src/autofit/afloader.c, src/truetype/ttgload.c: Performance
optimization: used FT_GLYPHLOADER_CHECK_POINTS macro on optimization: Use FT_GLYPHLOADER_CHECK_POINTS macro on
profile-detected hot-spots. profile-detected hot-spots.
* src/autofit/aftypes.h: introducing AF_ANGLE_DIFF macro to inline * src/autofit/aftypes.h (AF_ANGLE_DIFF): New macro to inline
FT_Angle_Diff FT_Angle_Diff.
* src/autofit/afhints.c (af_direction_compute): re-implement * src/autofit/afhints.c (af_direction_compute): Re-implement. Use
"af_direction_compute", and use AF_ANGLE_DIFF to speed up the AF_ANGLE_DIFF to speed up the detection of inflexions.
detection of inflexions.
2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>

View File

@ -3,7 +3,7 @@
# #
# Copyright 1996-2000, 2001, 2002, 2003, 2004 by # Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005 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, modified, # This file is part of the FreeType project, and may only be used, modified,
@ -133,7 +133,7 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with # $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
# old FreeType versions. # old FreeType versions.
# #
FT_CFLAGS = $(INCLUDE_FLAGS) $(CFLAGS) FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS)
FT_CC = $(CC) $(FT_CFLAGS) FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS) FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)

View File

@ -2,7 +2,7 @@
# FreeType 2 template for Unix-specific compiler definitions # FreeType 2 template for Unix-specific compiler definitions
# #
# Copyright 1996-2000, 2002, 2003 by # Copyright 1996-2000, 2002, 2003, 2005 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, modified, # This file is part of the FreeType project, and may only be used, modified,
@ -72,8 +72,8 @@ T := -o$(space)
# #
# We use our own FreeType configuration file. # We use our own FreeType configuration file.
# #
CFLAGS := -c @XX_CFLAGS@ @CPPFLAGS@ @CFLAGS@ \ CPPFLAGS := @CPPFLAGS@
-DFT_CONFIG_CONFIG_H="<ftconfig.h>" CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ -DFT_CONFIG_CONFIG_H="<ftconfig.h>"
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
# #

View File

@ -1939,7 +1939,9 @@ FT_BEGIN_HEADER
/* first face has index 0. */ /* first face has index 0. */
/* */ /* */
/* <Output> */ /* <Output> */
/* aface :: A handle to a new face object. */ /* aface :: A handle to a new face object. If `face_index' is */
/* greater than or equal to zero, it must be non-NULL. */
/* See note below. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
@ -1949,11 +1951,15 @@ FT_BEGIN_HEADER
/* slot for the face object which can be accessed directly through */ /* slot for the face object which can be accessed directly through */
/* `face->glyph'. */ /* `face->glyph'. */
/* */ /* */
/* @FT_Open_Face can be used to determine and/or check the font */ /* @FT_Open_Face can be used to quickly check whether the font format */
/* format of a given font resource. If the `face_index' field is */ /* of a given font resource is supported by FreeType. If the */
/* negative, the function does _not_ return any face handle in */ /* `face_index' field is negative, the function returns a more or */
/* `*aface'; the function's return value is 0 if the font format is */ /* less empty face handle in `*aface' (if `aface' isn't NULL); the */
/* recognized, or non-zero otherwise. */ /* function's return value is 0 if the font format is recognized, or */
/* non-zero otherwise. The only useful field in this special case is */
/* `face->num_faces' which gives the number of faces within the font */
/* file. After examination, the returned @FT_Face structure should */
/* be deallocated with a call to @FT_Done_Face. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library, FT_Open_Face( FT_Library library,

View File

@ -1753,6 +1753,9 @@
if ( aface ) if ( aface )
*aface = face; *aface = face;
else
FT_Done_Face( face );
goto Exit; goto Exit;
Fail: Fail: