diff --git a/ChangeLog b/ChangeLog index b938c6226..43b3856f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2006-03-22 Werner Lemberg + + * 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 * src/cache/ftccache.c, src/cache/ftccache.h (FTC_Node_Destroy): diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c index 8994a350c..797d35f6d 100644 --- 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,6 +74,8 @@ (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 @@ -460,6 +464,8 @@ } +#ifndef FTC_INLINE + FT_LOCAL_DEF( FT_Error ) FTC_Cache_Lookup( FTC_Cache cache, FT_UInt32 hash, @@ -518,6 +524,8 @@ return FTC_Cache_NewNode( cache, hash, query, anode ); } +#endif /* !FTC_INLINE */ + FT_LOCAL_DEF( void ) FTC_Cache_RemoveFaceID( FTC_Cache cache, diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h index d06b65112..ab3442441 100644 --- a/src/cache/ftccache.h +++ b/src/cache/ftccache.h @@ -164,11 +164,14 @@ FT_BEGIN_HEADER * 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, diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c index dc0a7b921..5c03abe05 100644 --- 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,12 +130,16 @@ } - 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, @@ -195,5 +205,7 @@ return error; } +#endif /* !FTC_INLINE */ + /* END */ diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h index 254876169..06576b833 100644 --- a/src/cache/ftcglyph.h +++ b/src/cache/ftcglyph.h @@ -175,7 +175,7 @@ FT_BEGIN_HEADER /* */ /* 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 @@ FT_BEGIN_HEADER /* 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 @@ FT_BEGIN_HEADER #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 @@ FT_BEGIN_HEADER /* 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 /* */ diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index b1015cbb4..500c52492 100644 --- 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 */ diff --git a/src/cache/ftcimage.h b/src/cache/ftcimage.h index eafaa380d..20d5d3e07 100644 --- a/src/cache/ftcimage.h +++ b/src/cache/ftcimage.h @@ -77,7 +77,7 @@ FT_BEGIN_HEADER /* 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 @@ FT_BEGIN_HEADER * 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 + /* */ diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index dda6ed38c..9d7347c3d 100644 --- 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 ) { diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h index d1742fea0..3fdc2c773 100644 --- a/src/cache/ftcmanag.h +++ b/src/cache/ftcmanag.h @@ -131,20 +131,20 @@ FT_BEGIN_HEADER /* 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 ); /* 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 ); diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index cef01062e..72f139d56 100644 --- 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,12 +298,16 @@ } - 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, @@ -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 ) diff --git a/src/cache/ftcsbits.h b/src/cache/ftcsbits.h index 56570e34d..6261745f1 100644 --- a/src/cache/ftcsbits.h +++ b/src/cache/ftcsbits.h @@ -68,20 +68,22 @@ FT_BEGIN_HEADER 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 );