36 #include "dict-list.h"
40 Dict *dictNewDict(
void *frame,
41 int (*leq)(
void *frame, DictKey key1, DictKey key2) )
46 if (dict == NULL)
return NULL;
61 void dictDeleteDict(
Dict *dict )
65 for( node = dict->head.next; node != &dict->head; node = next ) {
79 }
while( node->key != NULL && ! (*dict->leq)(dict->frame, node->key, key));
82 if (newNode == NULL)
return NULL;
85 newNode->next = node->next;
86 node->next->prev = newNode;
96 node->next->prev = node->prev;
97 node->prev->next = node->next;
108 }
while( node->key != NULL && ! (*dict->leq)(dict->frame, key, node->key));