Lines Matching refs:elem
77 gdCache_element_t *elem, *prev; in gdCacheDelete() local
79 elem = head->mru; in gdCacheDelete()
80 while (elem) in gdCacheDelete()
82 (*(head->gdCacheRelease)) (elem->userdata); in gdCacheDelete()
83 prev = elem; in gdCacheDelete()
84 elem = elem->next; in gdCacheDelete()
94 gdCache_element_t *elem, *prev = NULL, *prevprev = NULL; in gdCacheGet() local
97 elem = head->mru; in gdCacheGet()
98 while (elem) in gdCacheGet()
100 if ((*(head->gdCacheTest)) (elem->userdata, keydata)) in gdCacheGet()
105 prev->next = elem->next; in gdCacheGet()
106 elem->next = head->mru; in gdCacheGet()
107 head->mru = elem; in gdCacheGet()
109 return elem->userdata; in gdCacheGet()
112 prev = elem; in gdCacheGet()
113 elem = elem->next; in gdCacheGet()
124 elem = (gdCache_element_t *) gdPMalloc(sizeof (gdCache_element_t)); in gdCacheGet()
130 elem = prev; in gdCacheGet()
131 (*(head->gdCacheRelease)) (elem->userdata); in gdCacheGet()
134 elem->next = head->mru; in gdCacheGet()
135 head->mru = elem; in gdCacheGet()
136 elem->userdata = userdata; in gdCacheGet()
187 int elem, key; in main() local
192 elem = *(int *) gdCacheGet (cacheTable, &key); in main()
194 elem = *(int *) gdCacheGet (cacheTable, &key); in main()
196 elem = *(int *) gdCacheGet (cacheTable, &key); in main()
198 elem = *(int *) gdCacheGet (cacheTable, &key); in main()
200 elem = *(int *) gdCacheGet (cacheTable, &key); in main()
202 elem = *(int *) gdCacheGet (cacheTable, &key); in main()