107 |
void remove_element (void *array, size_t count, size_t size, |
void remove_element (void *array, size_t count, size_t size, |
108 |
size_t idx); |
size_t idx); |
109 |
|
|
110 |
|
/* Moves an element in ARRAY, which consists of COUNT elements of |
111 |
|
SIZE bytes each, from OLD_IDX to NEW_IDX, shifting around |
112 |
|
other elements as needed. Runs in O(abs(OLD_IDX - NEW_IDX)) |
113 |
|
time. */ |
114 |
|
void move_element (void *array, size_t count, size_t size, |
115 |
|
size_t old_idx, size_t new_idx); |
116 |
|
|
117 |
/* Removes elements equal to ELEMENT from ARRAY, which consists |
/* Removes elements equal to ELEMENT from ARRAY, which consists |
118 |
of COUNT elements of SIZE bytes each. Returns the number of |
of COUNT elements of SIZE bytes each. Returns the number of |
119 |
remaining elements. AUX is passed to COMPARE as auxiliary |
remaining elements. AUX is passed to COMPARE as auxiliary |