shithub: freetype+ttf2subf

Download patch

ref: 6c5b617c59a845e198971482b121d56157a16c7a
parent: 3867d2f2fbe6aae96da30e12d1270cac92576151
author: Werner Lemberg <[email protected]>
date: Wed Mar 22 10:30:41 EST 2006

* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.

* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.

* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.

* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.

* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
 2006-03-22  Werner Lemberg  <[email protected]>
 
+	* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
+	[!FTC_INLINE]: Compile conditionally.
+	* src/cache/ftccache.h: Updated.
+
+	* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
+	FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
+	s/FT_EXPORT/FT_LOCAL/.
+	(FTC_GCache_Init, FTC_GCache_Done): Commented out.
+	(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
+	s/FT_EXPORT/FT_LOCAL/.
+	* src/cache/ftcglyph.h: Updated.
+
+	* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
+	s/FT_EXPORT/FT_LOCAL/.
+	(FTC_INode_Weight): Commented out.
+	* src/cache/ftcimage.h: Updated.
+
+	* src/cache/ftmanag.c (FTC_Manager_Compress,
+	FTC_Manager_RegisterCache, FTC_Manager_FlushN):
+	s/FT_EXPORT/FT_LOCAL/.
+	* src/cache/ftmanag.h: Updated.
+
+	* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
+	FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
+	(FTC_SNode_Weight): Commented out.
+	* src/cache/ftcsbits.h: Updated.
+
+2006-03-22  Werner Lemberg  <[email protected]>
+
 	* src/cache/ftccache.c, src/cache/ftccache.h (FTC_Node_Destroy):
 	Remove, unused.
 
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -63,6 +63,8 @@
   }
 
 
+#ifndef FTC_INLINE
+
   /* move a node to the head of the manager's MRU list */
   static void
   ftc_node_mru_up( FTC_Node     node,
@@ -72,7 +74,9 @@
                     (FTC_MruNode)node );
   }
 
+#endif /* !FTC_INLINE */
 
+
   /* Note that this function cannot fail.  If we cannot re-size the
    * buckets array appropriately, we simply degrade the hash table's
    * performance!
@@ -460,6 +464,8 @@
   }
 
 
+#ifndef FTC_INLINE
+
   FT_LOCAL_DEF( FT_Error )
   FTC_Cache_Lookup( FTC_Cache   cache,
                     FT_UInt32   hash,
@@ -517,6 +523,8 @@
   NewNode:
     return FTC_Cache_NewNode( cache, hash, query, anode );
   }
+
+#endif /* !FTC_INLINE */
 
 
   FT_LOCAL_DEF( void )
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -164,11 +164,14 @@
    * is capable of flushing the cache adequately to make room for the
    * new cache object.
    */
+
+#ifndef FTC_INLINE
   FT_LOCAL( FT_Error )
   FTC_Cache_Lookup( FTC_Cache   cache,
                     FT_UInt32   hash,
                     FT_Pointer  query,
                     FTC_Node   *anode );
+#endif
 
   FT_LOCAL( FT_Error )
   FTC_Cache_NewNode( FTC_Cache   cache,
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -28,7 +28,7 @@
 
 
   /* create a new chunk node, setting its cache index and ref count */
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_GNode_Init( FTC_GNode   gnode,
                   FT_UInt     gindex,
                   FTC_Family  family )
@@ -39,7 +39,7 @@
   }
 
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_GNode_UnselectFamily( FTC_GNode  gnode,
                             FTC_Cache  cache )
   {
@@ -52,7 +52,7 @@
   }
 
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_GNode_Done( FTC_GNode  gnode,
                   FTC_Cache  cache )
   {
@@ -78,7 +78,7 @@
   }
 
 
-  FT_EXPORT_DEF( FT_Bool )
+  FT_LOCAL_DEF( FT_Bool )
   FTC_GNode_Compare( FTC_GNode   gnode,
                      FTC_GQuery  gquery )
   {
@@ -94,7 +94,7 @@
   /*************************************************************************/
   /*************************************************************************/
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_Family_Init( FTC_Family  family,
                    FTC_Cache   cache )
   {
@@ -130,13 +130,17 @@
   }
 
 
-  FT_EXPORT_DEF( FT_Error )
+#if 0
+
+  FT_LOCAL_DEF( FT_Error )
   FTC_GCache_Init( FTC_GCache  cache )
   {
     return ftc_gcache_init( FTC_CACHE( cache ) );
   }
 
+#endif /* 0 */
 
+
   FT_LOCAL_DEF( void )
   ftc_gcache_done( FTC_Cache  ftccache )
   {
@@ -148,14 +152,18 @@
   }
 
 
-  FT_EXPORT_DEF( void )
+#if 0
+
+  FT_LOCAL_DEF( void )
   FTC_GCache_Done( FTC_GCache  cache )
   {
     ftc_gcache_done( FTC_CACHE( cache ) );
   }
 
+#endif /* 0 */
 
-  FT_EXPORT_DEF( FT_Error )
+
+  FT_LOCAL_DEF( FT_Error )
   FTC_GCache_New( FTC_Manager       manager,
                   FTC_GCacheClass   clazz,
                   FTC_GCache       *acache )
@@ -165,7 +173,9 @@
   }
 
 
-  FT_EXPORT_DEF( FT_Error )
+#ifndef FTC_INLINE
+
+  FT_LOCAL_DEF( FT_Error )
   FTC_GCache_Lookup( FTC_GCache   cache,
                      FT_UInt32    hash,
                      FT_UInt      gindex,
@@ -194,6 +204,8 @@
     }
     return error;
   }
+
+#endif /* !FTC_INLINE */
 
 
 /* END */
--- a/src/cache/ftcglyph.h
+++ b/src/cache/ftcglyph.h
@@ -175,7 +175,7 @@
   /*                                                                       */
 
   /* must be called by derived FTC_Node_InitFunc routines */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_GNode_Init( FTC_GNode   node,
                   FT_UInt     gindex,  /* glyph index for node */
                   FTC_Family  family );
@@ -183,23 +183,23 @@
   /* returns TRUE iff the query's glyph index correspond to the node;  */
   /* this assumes that the "family" and "hash" fields of the query are */
   /* already correctly set                                             */
-  FT_EXPORT( FT_Bool )
+  FT_LOCAL( FT_Bool )
   FTC_GNode_Compare( FTC_GNode   gnode,
                      FTC_GQuery  gquery );
 
   /* call this function to clear a node's family -- this is necessary */
   /* to implement the `node_remove_faceid' cache method correctly     */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_GNode_UnselectFamily( FTC_GNode  gnode,
                             FTC_Cache  cache );
 
   /* must be called by derived FTC_Node_DoneFunc routines */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_GNode_Done( FTC_GNode  node,
                   FTC_Cache  cache );
 
 
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_Family_Init( FTC_Family  family,
                    FTC_Cache   cache );
 
@@ -213,14 +213,18 @@
 #define FTC_GCACHE( x )  ((FTC_GCache)(x))
 
 
+#if 0
   /* can be used as @FTC_Cache_InitFunc */
-  FT_EXPORT( FT_Error )
+  FT_LOCAL( FT_Error )
   FTC_GCache_Init( FTC_GCache  cache );
+#endif
 
 
+#if 0
   /* can be used as @FTC_Cache_DoneFunc */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_GCache_Done( FTC_GCache  cache );
+#endif
 
 
   /* the glyph cache class adds fields for the family implementation */
@@ -242,17 +246,19 @@
 
 
   /* convenience function; use it instead of FTC_Manager_Register_Cache */
-  FT_EXPORT( FT_Error )
+  FT_LOCAL( FT_Error )
   FTC_GCache_New( FTC_Manager       manager,
                   FTC_GCacheClass   clazz,
                   FTC_GCache       *acache );
 
-  FT_EXPORT( FT_Error )
+#ifndef FTC_INLINE
+  FT_LOCAL( FT_Error )
   FTC_GCache_Lookup( FTC_GCache   cache,
                      FT_UInt32    hash,
                      FT_UInt      gindex,
                      FTC_GQuery   query,
                      FTC_Node    *anode );
+#endif
 
 
   /* */
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -45,7 +45,7 @@
   }
 
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_INode_Free( FTC_INode  inode,
                   FTC_Cache  cache )
   {
@@ -54,7 +54,7 @@
 
 
   /* initialize a new glyph image node */
-  FT_EXPORT_DEF( FT_Error )
+  FT_LOCAL_DEF( FT_Error )
   FTC_INode_New( FTC_INode   *pinode,
                  FTC_GQuery   gquery,
                  FTC_Cache    cache )
@@ -149,11 +149,15 @@
   }
 
 
-  FT_EXPORT_DEF( FT_ULong )
+#if 0
+
+  FT_LOCAL_DEF( FT_ULong )
   FTC_INode_Weight( FTC_INode  inode )
   {
     return ftc_inode_weight( FTC_NODE( inode ), NULL );
   }
+
+#endif /* 0 */
 
 
 /* END */
--- a/src/cache/ftcimage.h
+++ b/src/cache/ftcimage.h
@@ -77,7 +77,7 @@
 
 
   /* can be used as a @FTC_Node_FreeFunc */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_INode_Free( FTC_INode  inode,
                   FTC_Cache  cache );
 
@@ -85,14 +85,17 @@
    * must be set correctly.  This function will call the `family_load_glyph'
    * method to load the FT_Glyph into the cache node.
    */
-  FT_EXPORT( FT_Error )
+  FT_LOCAL( FT_Error )
   FTC_INode_New( FTC_INode   *pinode,
                  FTC_GQuery   gquery,
                  FTC_Cache    cache );
 
+#if 0
   /* can be used as @FTC_Node_WeightFunc */
-  FT_EXPORT( FT_ULong )
+  FT_LOCAL( FT_ULong )
   FTC_INode_Weight( FTC_INode  inode );
+#endif
+
 
  /* */
 
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -520,7 +520,7 @@
 
   /* documentation is in ftcmanag.h */
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_Manager_Compress( FTC_Manager  manager )
   {
     FTC_Node   node, first;
@@ -562,7 +562,7 @@
 
   /* documentation is in ftcmanag.h */
 
-  FT_EXPORT_DEF( FT_Error )
+  FT_LOCAL_DEF( FT_Error )
   FTC_Manager_RegisterCache( FTC_Manager      manager,
                              FTC_CacheClass   clazz,
                              FTC_Cache       *acache )
@@ -613,7 +613,7 @@
   }
 
 
-  FT_EXPORT_DEF( FT_UInt )
+  FT_LOCAL_DEF( FT_UInt )
   FTC_Manager_FlushN( FTC_Manager  manager,
                       FT_UInt      count )
   {
--- a/src/cache/ftcmanag.h
+++ b/src/cache/ftcmanag.h
@@ -131,7 +131,7 @@
   /*    The reason this function is exported is to allow client-specific   */
   /*    cache classes.                                                     */
   /*                                                                       */
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_Manager_Compress( FTC_Manager  manager );
 
 
@@ -138,13 +138,13 @@
   /* try to flush `count' old nodes from the cache; return the number
    * of really flushed nodes
    */
-  FT_EXPORT( FT_UInt )
+  FT_LOCAL( FT_UInt )
   FTC_Manager_FlushN( FTC_Manager  manager,
                       FT_UInt      count );
 
 
   /* this must be used internally for the moment */
-  FT_EXPORT( FT_Error )
+  FT_LOCAL( FT_Error )
   FTC_Manager_RegisterCache( FTC_Manager      manager,
                              FTC_CacheClass   clazz,
                              FTC_Cache       *acache );
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -77,7 +77,7 @@
   }
 
 
-  FT_EXPORT_DEF( void )
+  FT_LOCAL_DEF( void )
   FTC_SNode_Free( FTC_SNode  snode,
                   FTC_Cache  cache )
   {
@@ -197,7 +197,7 @@
   }
 
 
-  FT_EXPORT_DEF( FT_Error )
+  FT_LOCAL_DEF( FT_Error )
   FTC_SNode_New( FTC_SNode  *psnode,
                  FTC_GQuery  gquery,
                  FTC_Cache   cache )
@@ -298,13 +298,17 @@
   }
 
 
-  FT_EXPORT_DEF( FT_ULong )
+#if 0
+
+  FT_LOCAL_DEF( FT_ULong )
   FTC_SNode_Weight( FTC_SNode  snode )
   {
     return ftc_snode_weight( FTC_NODE( snode ), NULL );
   }
 
+#endif /* 0 */
 
+
   FT_LOCAL_DEF( FT_Bool )
   ftc_snode_compare( FTC_Node    ftcsnode,
                      FT_Pointer  ftcgquery,
@@ -385,7 +389,7 @@
   }
 
 
-  FT_EXPORT_DEF( FT_Bool )
+  FT_LOCAL_DEF( FT_Bool )
   FTC_SNode_Compare( FTC_SNode   snode,
                      FTC_GQuery  gquery,
                      FTC_Cache   cache )
--- a/src/cache/ftcsbits.h
+++ b/src/cache/ftcsbits.h
@@ -68,20 +68,22 @@
           FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )
 
 
-  FT_EXPORT( void )
+  FT_LOCAL( void )
   FTC_SNode_Free( FTC_SNode  snode,
                   FTC_Cache  cache );
 
-  FT_EXPORT( FT_Error )
+  FT_LOCAL( FT_Error )
   FTC_SNode_New( FTC_SNode   *psnode,
                  FTC_GQuery   gquery,
                  FTC_Cache    cache );
 
-  FT_EXPORT( FT_ULong )
+#if 0
+  FT_LOCAL( FT_ULong )
   FTC_SNode_Weight( FTC_SNode  inode );
+#endif
 
 
-  FT_EXPORT( FT_Bool )
+  FT_LOCAL( FT_Bool )
   FTC_SNode_Compare( FTC_SNode   snode,
                      FTC_GQuery  gquery,
                      FTC_Cache   cache );