Lines Matching refs:elem
78 gdCache_element_t *elem, *prev; in gdCacheDelete() local
80 elem = head->mru; in gdCacheDelete()
81 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 if (elem == NULL) { in gdCacheGet()
103 while(elem) { in gdCacheGet()
104 if ((*(head->gdCacheTest))(elem->userdata, keydata)) { in gdCacheGet()
107 prev->next = elem->next; in gdCacheGet()
108 elem->next = head->mru; in gdCacheGet()
109 head->mru = elem; in gdCacheGet()
111 return elem->userdata; in gdCacheGet()
114 prev = elem; in gdCacheGet()
115 elem = elem->next; in gdCacheGet()
124 elem = (gdCache_element_t *)pemalloc(sizeof(gdCache_element_t), 1); in gdCacheGet()
129 elem = prev; in gdCacheGet()
130 (*(head->gdCacheRelease))(elem->userdata); in gdCacheGet()
133 elem->next = head->mru; in gdCacheGet()
134 head->mru = elem; in gdCacheGet()
135 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()