Commit 7909673992b66a1afb0c6a62fdfe3c395d21a5bf

David Turner 2000-08-30T21:40:45

- the file "ftlist.h" was moved from <freetype/internal/..> to <freetype/...> - bugfix for the cache sub-system..

diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index 6f7d9e9..ae1dc19 100644
--- 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
 
diff --git a/include/freetype/ftlist.h b/include/freetype/ftlist.h
new file mode 100644
index 0000000..7c6d8ed
--- /dev/null
+++ b/include/freetype/ftlist.h
@@ -0,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 */
diff --git a/include/freetype/internal/ftlist.h b/include/freetype/internal/ftlist.h
index 7c6d8ed..2ae03e4 100644
--- 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 */
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 637a894..5ea6ea3 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -282,12 +282,12 @@
         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 );
       }
       
diff --git a/src/cache/ftcimage.h b/src/cache/ftcimage.h
index 28eaf41..558a727 100644
--- 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                                              \
           {                                               \