ref: 7909673992b66a1afb0c6a62fdfe3c395d21a5bf
parent: 6d2596368a1fe6bb2e2e835e27319f7092393d36
author: David Turner <[email protected]>
date: Wed Aug 30 17:40:45 EDT 2000
- the file "ftlist.h" was moved from <freetype/internal/..> to <freetype/...> - bugfix for the cache sub-system..
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -16,6 +16,23 @@
/***************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /********* **********/
+ /********* **********/
+ /********* WARNING, THIS IS ALPHA CODE, THIS API **********/
+ /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE **********/
+ /********* FREETYPE DEVELOPMENT TEAM **********/
+ /********* **********/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+ /**************************************************************************/
+
#ifndef FTCACHE_H
#define FTCACHE_H
--- /dev/null
+++ b/include/freetype/ftlist.h
@@ -1,0 +1,113 @@
+/***************************************************************************/
+/* */
+/* ftlist.c */
+/* */
+/* Generic list support for FreeType (specification). */
+/* */
+/* Copyright 1996-2000 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file implements functions relative to list processing. Its */
+ /* data structures are defined in `freetype.h'. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef FTLIST_H
+#define FTLIST_H
+
+#include <freetype/freetype.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
+ FT_EXPORT_DEF( FT_ListNode ) FT_List_Find( FT_List list,
+ void* data );
+
+ FT_EXPORT_DEF( void ) FT_List_Add( FT_List list,
+ FT_ListNode node );
+
+ FT_EXPORT_DEF( void ) FT_List_Insert( FT_List list,
+ FT_ListNode node );
+
+ FT_EXPORT_DEF( void ) FT_List_Remove( FT_List list,
+ FT_ListNode node );
+
+ FT_EXPORT_DEF( void ) FT_List_Up( FT_List list,
+ FT_ListNode node );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FT_List_Iterator */
+ /* */
+ /* <Description> */
+ /* An FT_List iterator function which is called during a list parse */
+ /* by FT_List_Iterate(). */
+ /* */
+ /* <Input> */
+ /* node :: The current iteration list node. */
+ /* */
+ /* user :: A typeless pointer passed to FT_List_Iterate(). */
+ /* Can be used to point to the iteration's state. */
+ /* */
+ typedef FT_Error (*FT_List_Iterator)( FT_ListNode node,
+ void* user );
+
+
+ FT_EXPORT_DEF( FT_Error ) FT_List_Iterate( FT_List list,
+ FT_List_Iterator iterator,
+ void* user );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FT_List_Destructor */
+ /* */
+ /* <Description> */
+ /* An FT_List iterator function which is called during a list */
+ /* finalization by FT_List_Finalize() to destroy all elements in a */
+ /* given list. */
+ /* */
+ /* <Input> */
+ /* system :: The current system object. */
+ /* */
+ /* data :: The current object to destroy. */
+ /* */
+ /* user :: A typeless pointer passed to FT_List_Iterate(). It can */
+ /* be used to point to the iteration's state. */
+ /* */
+ typedef void (*FT_List_Destructor)( FT_Memory memory,
+ void* data,
+ void* user );
+
+
+ FT_EXPORT_DEF( void ) FT_List_Finalize( FT_List list,
+ FT_List_Destructor destroy,
+ FT_Memory memory,
+ void* user );
+
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* FTLIST_H */
+
+
+/* END */
--- a/include/freetype/internal/ftlist.h
+++ b/include/freetype/internal/ftlist.h
@@ -1,113 +1,2 @@
-/***************************************************************************/
-/* */
-/* ftlist.c */
-/* */
-/* Generic list support for FreeType (specification). */
-/* */
-/* Copyright 1996-2000 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+#include <freetype/ftlist.h>
-
- /*************************************************************************/
- /* */
- /* This file implements functions relative to list processing. Its */
- /* data structures are defined in `freetype.h'. */
- /* */
- /*************************************************************************/
-
-
-#ifndef FTLIST_H
-#define FTLIST_H
-
-#include <freetype/freetype.h>
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-
- FT_EXPORT_DEF( FT_ListNode ) FT_List_Find( FT_List list,
- void* data );
-
- FT_EXPORT_DEF( void ) FT_List_Add( FT_List list,
- FT_ListNode node );
-
- FT_EXPORT_DEF( void ) FT_List_Insert( FT_List list,
- FT_ListNode node );
-
- FT_EXPORT_DEF( void ) FT_List_Remove( FT_List list,
- FT_ListNode node );
-
- FT_EXPORT_DEF( void ) FT_List_Up( FT_List list,
- FT_ListNode node );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* FT_List_Iterator */
- /* */
- /* <Description> */
- /* An FT_List iterator function which is called during a list parse */
- /* by FT_List_Iterate(). */
- /* */
- /* <Input> */
- /* node :: The current iteration list node. */
- /* */
- /* user :: A typeless pointer passed to FT_List_Iterate(). */
- /* Can be used to point to the iteration's state. */
- /* */
- typedef FT_Error (*FT_List_Iterator)( FT_ListNode node,
- void* user );
-
-
- FT_EXPORT_DEF( FT_Error ) FT_List_Iterate( FT_List list,
- FT_List_Iterator iterator,
- void* user );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* FT_List_Destructor */
- /* */
- /* <Description> */
- /* An FT_List iterator function which is called during a list */
- /* finalization by FT_List_Finalize() to destroy all elements in a */
- /* given list. */
- /* */
- /* <Input> */
- /* system :: The current system object. */
- /* */
- /* data :: The current object to destroy. */
- /* */
- /* user :: A typeless pointer passed to FT_List_Iterate(). It can */
- /* be used to point to the iteration's state. */
- /* */
- typedef void (*FT_List_Destructor)( FT_Memory memory,
- void* data,
- void* user );
-
-
- FT_EXPORT_DEF( void ) FT_List_Finalize( FT_List list,
- FT_List_Destructor destroy,
- FT_Memory memory,
- void* user );
-
-
-#ifdef __cplusplus
- }
-#endif
-
-#endif /* FTLIST_H */
-
-
-/* END */
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -282,11 +282,11 @@
inode = (FTC_ImageNode)node;
lrunode = FTC_IMAGENODE_TO_LISTNODE( inode );
- queue->clazz->done_image( queue, inode );
- FT_List_Remove( glyphs_lru, lrunode );
-
cache->num_bytes -= queue->clazz->size_image( queue, inode ) +
sizeof( FTC_ImageNodeRec );
+
+ queue->clazz->done_image( queue, inode );
+ FT_List_Remove( glyphs_lru, lrunode );
FTC_ImageNode_Done( cache, inode );
}
--- a/src/cache/ftcimage.h
+++ b/src/cache/ftcimage.h
@@ -60,6 +60,7 @@
{ \
(n)->root1.data = g; \
} while ( 0 )
+
#define FTC_IMAGENODE_SET_INDICES( n, g, q ) \
do \
{ \