#include "common.h"
Go to the source code of this file.
Functions | |
| sorted_array * | sorted_array_new (size_t item_size, int(*cmp_func)(const void *a, const void *b)) |
| void | sorted_array_free (struct sorted_array **tab_ptr) |
| void * | sorted_array_item (const struct sorted_array *tab, size_t i) |
| void * | sorted_array_lookup (struct sorted_array *tab, const void *key) |
| void | sorted_array_add (struct sorted_array *tab, const void *item) |
| void | sorted_array_sync (struct sorted_array *tab, int(*collision_func)(const void *a, const void *b)) |
| This function must be called after sorted_array_add() to make the changes effective. | |
| size_t | sorted_array_size (const struct sorted_array *tab) |
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
This function must be called after sorted_array_add() to make the changes effective. As this function is costly, it should not be called each time but rather after the complete list of items has been added to the array If collision_func is not NULL, it is used to decide which item will be removed if the array contains multiple equivalent items. |
1.3.9.1