Lines Matching full:list
22 * Sorted, expanding list of pointers.
27 const void** list;
39 const void* cur = pSet->list[i];
59 pSet->list = malloc(sizeof(const void*) * initialSize);
60 if (pSet->list == NULL) {
79 if (pSet->list != NULL) {
80 free(pSet->list);
81 pSet->list = NULL;
95 * Get the number of pointers currently stored in the list.
103 * Get the Nth entry from the list.
107 return pSet->list[i];
111 * Insert a new entry into the list. If it already exists, this returns
133 newList = realloc(pSet->list, pSet->alloc * sizeof(const void*));
138 pSet->list = newList;
142 /* empty list */
149 if (nearby != 0 && ptr < pSet->list[nearby-1]) {
151 // nearby-1, pSet->list[nearby-1], ptr);
153 } else if (ptr < pSet->list[nearby]) {
155 // nearby, pSet->list[nearby], ptr);
158 // nearby+1, pSet->list[nearby+1], ptr);
167 memmove(&pSet->list[nearby+1], &pSet->list[nearby],
168 (pSet->count - nearby) * sizeof(pSet->list[0]));
172 pSet->list[nearby] = ptr;
191 memmove(&pSet->list[where], &pSet->list[where+1],
192 (pSet->count-1 - where) * sizeof(pSet->list[0]));
196 pSet->list[pSet->count] = (const void*) 0xdecadead; // debug
201 * Returns the index if "ptr" appears in the list. If it doesn't appear,
214 const void* listVal = pSet->list[mid];
243 if (pSet->list[i] == ptrArray[j]) {
253 memmove(&pSet->list[i], &pSet->list[i+1],
254 (pSet->count-1 - i) * sizeof(pSet->list[0]));
258 pSet->list[pSet->count] = (const void*) 0xdecadead; // debug
265 * Print the list contents to stdout. For debugging.
271 printf(" %p", pSet->list[i]);