230 |
230 |
231 static size_t cx_arl_find( |
231 static size_t cx_arl_find( |
232 struct cx_list_s const *list, |
232 struct cx_list_s const *list, |
233 void const *elem |
233 void const *elem |
234 ) { |
234 ) { |
235 return 0; |
235 char *cur = ((cx_array_list const *) list)->data; |
|
236 |
|
237 for (size_t i = 0; i < list->size; i++) { |
|
238 if (0 == list->cmpfunc(elem, cur)) { |
|
239 return i; |
|
240 } |
|
241 cur += list->itemsize; |
|
242 } |
|
243 |
|
244 return list->size; |
236 } |
245 } |
237 |
246 |
238 static void cx_arl_sort(struct cx_list_s *list) { |
247 static void cx_arl_sort(struct cx_list_s *list) { |
239 |
248 |
240 } |
249 } |