Lines Matching refs:head
63 gdCache_head_t *head; in gdCacheCreate() local
65 head = (gdCache_head_t *) gdPMalloc(sizeof (gdCache_head_t)); in gdCacheCreate()
66 head->mru = NULL; in gdCacheCreate()
67 head->size = size; in gdCacheCreate()
68 head->gdCacheTest = gdCacheTest; in gdCacheCreate()
69 head->gdCacheFetch = gdCacheFetch; in gdCacheCreate()
70 head->gdCacheRelease = gdCacheRelease; in gdCacheCreate()
71 return head; in gdCacheCreate()
75 gdCacheDelete (gdCache_head_t * head) in gdCacheDelete() argument
79 elem = head->mru; in gdCacheDelete()
82 (*(head->gdCacheRelease)) (elem->userdata); in gdCacheDelete()
87 gdPFree ((char *) head); in gdCacheDelete()
91 gdCacheGet (gdCache_head_t * head, void *keydata) in gdCacheGet() argument
97 elem = head->mru; in gdCacheGet()
100 if ((*(head->gdCacheTest)) (elem->userdata, keydata)) in gdCacheGet()
106 elem->next = head->mru; in gdCacheGet()
107 head->mru = elem; in gdCacheGet()
116 userdata = (*(head->gdCacheFetch)) (&(head->error), keydata); in gdCacheGet()
122 if (i < head->size) in gdCacheGet()
131 (*(head->gdCacheRelease)) (elem->userdata); in gdCacheGet()
134 elem->next = head->mru; in gdCacheGet()
135 head->mru = elem; in gdCacheGet()