shithub: freetype+ttf2subf

Download patch

ref: 3fb70ba6442ff8193b8acda53b00ffa32581a281
parent: efa178eed8d7d3ee9026a220e75c047263c9bcf8
author: Werner Lemberg <[email protected]>
date: Mon Jul 19 16:02:35 EDT 2004

formatting & small beautification

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,25 @@
 2004-07-17  David Turner  <[email protected]>
 
-        * include/freetype/cache/ftcglyph.h, src/cache/ftcglyph.c:
-        fixed a dangling pointer bug that happened in very rare cases:
-        i.e. when a new family object was destroyed by an out-of-memory
-        condition during a glyph node initialization. The function
-        FTC_Cache_Lookup would flush the cache and restart the lookup
-        with a bad pointer.
+	Fixed a dangling pointer bug in the cache code that happened in very
+	rare cases, i.e., when a new family object was destroyed by an
+	out-of-memory condition during a glyph node initialization.  The
+	function FTC_Cache_Lookup would flush the cache and restart the
+	lookup with a bad pointer.
 
-        * src/cache/ftcmanag.c: fixed a cache flushing bug
+	* include/freetype/cache/ftcglyph.h (FTC_FAMILY_TREE): New macro.
+	(FTC_GCACHE_LOOKUP_CMP): Use it.
+	Handle reference count in `num_nodes' correctly.
 
-        * src/truetype/ttinterp.c (TT_Normalize): fixed a bug that
-        caused long and unecessary delays when normalizing huge vectors
+	* src/cache/ftcglyph.c (FTC_GNode_UnselectFamily): Use
+	FTC_FAMILY_FREE.
+	(FTC_GCache_Lookup): Handle reference count in `num_nodes' correctly.
 
+	* src/cache/ftcmanag.c (FTC_Manager_FlushN): Fixed a cache flushing
+	bug.
+
+	* src/truetype/ttinterp.c (Normalize): Fixed a bug that caused
+	long and unnecessary delays while normalizing huge vectors.
+
 2004-07-15  Werner Lemberg  <[email protected]>
 
 	* docs/CHANGES: Updated.
@@ -67,6 +75,11 @@
 	by Dirck Blaskey.
 
 2004-06-24  David Turner  <[email protected]>
+
+
+	* Version 2.1.9 released.
+	=========================
+
 
 	* src/truetype/ttgload.c, src/truetype/ttxgvar.c: Removing
 	compiler warnings.
--- a/include/freetype/cache/ftcglyph.h
+++ b/include/freetype/cache/ftcglyph.h
@@ -238,7 +238,7 @@
 #define FTC_CACHE__GCACHE_CLASS( x ) \
           FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
 #define FTC_CACHE__FAMILY_CLASS( x ) \
-          ((FTC_MruListClass) FTC_CACHE__GCACHE_CLASS(x)->family_class)
+          ( (FTC_MruListClass)FTC_CACHE__GCACHE_CLASS( x )->family_class )
 
 
   /* convenience function; use it instead of FTC_Manager_Register_Cache */
@@ -256,11 +256,13 @@
 
 
   /* */
-#define  FTC_FAMILY_FREE(family,cache)                          \
-           FTC_MruList_Remove( &FTC_GCACHE((cache))->families,  \
-                               (FTC_MruNode)(family) )
 
 
+#define FTC_FAMILY_FREE( family, cache )                      \
+          FTC_MruList_Remove( &FTC_GCACHE((cache))->families, \
+                              (FTC_MruNode)(family) )
+
+
 #ifdef FTC_INLINE
 
 #define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash,                \
@@ -278,6 +280,7 @@
     if ( !error )                                                           \
     {                                                                       \
       FTC_Family  _gqfamily = _gquery->family;                              \
+                                                                            \
                                                                             \
       _gqfamily->num_nodes++;                                               \
                                                                             \
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -27,7 +27,6 @@
 #include "ftcerror.h"
 
 
-
   /* create a new chunk node, setting its cache index and ref count */
   FT_EXPORT_DEF( void )
   FTC_GNode_Init( FTC_GNode   gnode,
@@ -183,9 +182,9 @@
     {
       FTC_Family  family = query->family;
 
-     /* prevent the family from being destroyed too early when an out-of-memory
-      * condition occurs during glyph node initialization.
-      */
+
+      /* prevent the family from being destroyed too early when an        */
+      /* out-of-memory condition occurs during glyph node initialization. */
       family->num_nodes++;
 
       error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, anode );