Commit 4836f955f3ffb0a7c7644801daa14d0a4bb041db

Werner Lemberg 2006-06-06T12:54:08

formatting

diff --git a/ChangeLog b/ChangeLog
index 1f3a3d3..d22ba17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,26 @@
 2006-06-06  David Turner  <david@freetype.org>
 
-        * include/freetype/internal/services/svpscmap.h, src/cff/cffcmap.c,
-        src/psaux/t1cmap.c, src/psnames/psmodule.c: Fix for the memory
-        leak described in bug #16759.
+	Fix memory leak described in Savannah bug #16759.
 
-        We change 'ps_unicodes_init' so that it also takes a 'free_glyph_name'
-        callback to release the glyph names returned by 'get_glyph_name'
+	We change `ps_unicodes_init' so that it also takes a
+	`free_glyph_name' callback to release the glyph names returned by
+	`get_glyph_name'
+
+	* include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc):
+	Renamed to ...
+	(PS_GetGlyphNameFunc): This.
+	(PS_FreeGlyphNameFunc): New typedef.
+	(PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc.
+
+	* src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first
+	argument.
+	(cff_sid_free_glyph_name): New function.
+	(cff_cmap_unicode_init): Updated.
+
+	* src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated.
+
+	* src/psnames/psmodule.c (ps_unicodes_init): Add variable for
+	PS_FreeGlyphNameFunc and use it.
 
 
 2006-06-04  David Turner  <david@freetype.org>
@@ -228,7 +243,7 @@
 	Updated.
 
 	* builds/unix/install-sh: Updated from `texinfo' CVS module at
-	Savannah.gnu.org.
+	savannah.gnu.org.
 
 	* devel/ftoption.h: Synchronize with
 	include/freetype/config/ftoption.h.
@@ -1513,7 +1528,7 @@
 2006-01-22  Werner Lemberg  <wl@gnu.org>
 
 	* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
-	`texinfo' CVS module at Savannah.gnu.org.
+	`texinfo' CVS module at savannah.gnu.org.
 
 2006-01-21  Werner Lemberg  <wl@gnu.org>
 
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index ea703cf..44d8a17 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -123,7 +123,7 @@
   cff_sid_to_glyph_name( TT_Face   face,
                          FT_UInt   idx )
   {
-    CFF_Font            cff     = (CFF_Font) face->extra.data;
+    CFF_Font            cff     = (CFF_Font)face->extra.data;
     CFF_Charset         charset = &cff->charset;
     FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;
     FT_UInt             sid     = charset->sids[idx];
@@ -132,12 +132,14 @@
     return cff_index_get_sid_string( &cff->string_index, sid, psnames );
   }
 
+
   FT_CALLBACK_DEF( void )
   cff_sid_free_glyph_name( TT_Face      face,
                            const char*  gname )
   {
     FT_Memory  memory = FT_FACE_MEMORY( face );
 
+
     FT_FREE( gname );
   }
 
@@ -159,8 +161,8 @@
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    cff->num_glyphs,
-                                   (PS_GetGlyphNameFunc)  &cff_sid_to_glyph_name,
-                                   (PS_FreeGlyphNameFunc) &cff_sid_free_glyph_name,
+                                   (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
+                                   (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
                                    (FT_Pointer)cff );
   }
 
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 772f441..2934686 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -276,8 +276,8 @@
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    face->type1.num_glyphs,
-                                   (PS_GetGlyphNameFunc)  &t1_get_glyph_name,
-                                   (PS_FreeGlyphNameFunc) NULL,
+                                   (PS_GetGlyphNameFunc)&t1_get_glyph_name,
+                                   (PS_FreeGlyphNameFunc)NULL,
                                    (FT_Pointer)face );
   }