22 #include FT_INTERNAL_OBJECTS_H
23 #include FT_INTERNAL_DEBUG_H
49 fprintf( stderr,
"FTC_MruNode_Prepend: invalid action\n" );
54 }
while ( cnode != first );
95 }
while ( cnode != first );
97 fprintf( stderr,
"FTC_MruNode_Up: invalid action\n" );
131 #ifdef FT_DEBUG_ERROR
142 }
while ( cnode != first );
144 fprintf( stderr,
"FTC_MruNode_Remove: invalid action\n" );
163 else if ( node == first )
176 list->max_nodes = max_nodes;
178 list->clazz = *clazz;
180 list->memory = memory;
187 while ( list->nodes )
218 if ( compare( node, key ) )
228 }
while ( node != first);
245 if ( list->num_nodes >= list->max_nodes && list->max_nodes > 0 )
247 node = list->nodes->prev;
251 if ( list->clazz.node_reset )
255 error = list->clazz.node_reset( node, key, list->data );
263 if ( list->clazz.node_done )
264 list->clazz.node_done( node, list->data );
266 else if (
FT_ALLOC( node, list->clazz.node_size ) )
269 error = list->clazz.node_init( node, key, list->data );
281 if ( list->clazz.node_done )
282 list->clazz.node_done( node, list->data );
298 node = FTC_MruList_Find( list, key );
318 if ( list->clazz.node_done )
319 list->clazz.node_done( node, list->data );
335 while ( first && ( selection ==
NULL || selection( first, key ) ) )
344 while ( node != first )
348 if ( selection( node, key ) )
#define FT_ALLOC(ptr, size)
typedefFT_BEGIN_HEADER struct FTC_MruNodeRec_ * FTC_MruNode
FT_Bool(* FTC_MruNode_CompareFunc)(FTC_MruNode node, FT_Pointer key)
FTC_MruNode_Remove(FTC_MruNode *plist, FTC_MruNode node)
FTC_MruList_Init(FTC_MruList list, FTC_MruListClass clazz, FT_UInt max_nodes, FT_Pointer data, FT_Memory memory)
FTC_MruList_RemoveSelection(FTC_MruList list, FTC_MruNode_CompareFunc selection, FT_Pointer key)
#define FT_ASSERT(condition)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
FTC_MruNode_Up(FTC_MruNode *plist, FTC_MruNode node)
FTC_MruList_Done(FTC_MruList list)
FTC_MruList_New(FTC_MruList list, FT_Pointer key, FTC_MruNode *anode)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FTC_MruList_Remove(FTC_MruList list, FTC_MruNode node)
struct FTC_MruListClassRec_ const * FTC_MruListClass
FTC_MruList_Reset(FTC_MruList list)
FTC_MruNode_Prepend(FTC_MruNode *plist, FTC_MruNode node)