Lines Matching defs:vec
195 vector_sort(void *vec, unsigned int count, size_t esize,
198 qsort(vec, count, esize, comparison);
203 vector_search(const void *key, void *vec, unsigned int count, size_t esize,
206 return (bsearch(key, vec, count, esize, comparison));
211 vector_append(const void *elem, void *vec, unsigned int *count, size_t esize)
216 p = realloc(vec, (*count + ELEMSPERCHUNK) * esize);
219 return (vec);
221 vec = p;
223 memmove((void *)(((uintptr_t)vec) + (*count * esize)), elem, esize);
225 return (vec);
230 vector_ref(unsigned int i, void *vec, unsigned int count, size_t esize)
233 return (void *)((uintptr_t)vec + (i * esize));
242 vector_free(void *vec, unsigned int *count, size_t esize,
249 elem = vector_ref(i, vec, *count, esize);
253 free(vec);