43#ifdef ZERO_VARIABLES_FOR_SEARCHING
79 if (
prev !=
nullptr) {
85 if (
next !=
nullptr) {
115 if (
pgenlist->free_data_func !=
nullptr) {
134 }
else if (
pos == -1) {
175 for (plink =
pgenlist->head_link; plink; plink = plink->
next) {
177 pcopy->tail_link,
nullptr);
180 for (plink =
pgenlist->head_link; plink; plink = plink->
next) {
258 if (free_data_func !=
nullptr) {
261 free_data_func(plink->
dataptr);
263 }
while ((plink =
plink2) !=
nullptr);
268 }
while ((plink =
plink2) !=
nullptr);
301 }
while ((plink =
plink2) !=
nullptr);
309 }
while ((plink =
plink2) !=
nullptr);
326 for (plink =
pgenlist->head_link; plink !=
nullptr; plink = plink->
next) {
347 for (plink =
pgenlist->head_link; plink !=
nullptr;) {
374 for (; plink !=
nullptr; plink = plink->
next) {
398 while (plink !=
nullptr) {
423 if (plink !=
nullptr) {
433 if (
pgenlist->head_link !=
nullptr) {
443 if (
pgenlist->tail_link !=
nullptr) {
461 }
else if (0 ==
pos) {
494 plink !=
nullptr ? plink->
prev :
pgenlist->tail_link, plink);
523 for (plink =
pgenlist->head_link; plink; plink = plink->
next) {
542 for (; plink !=
nullptr; plink = plink->
next) {
564 int (*
compar) (
const void *,
const void *))
void fc_mutex_allocate(fc_mutex *mutex)
void fc_mutex_init(fc_mutex *mutex)
void fc_mutex_release(fc_mutex *mutex)
void fc_mutex_destroy(fc_mutex *mutex)
bool genlist_remove(struct genlist *pgenlist, const void *punlink)
void genlist_allocate_mutex(struct genlist *pgenlist)
void genlist_insert(struct genlist *pgenlist, void *data, int pos)
struct genlist * genlist_copy_full(const struct genlist *pgenlist, genlist_copy_fn_t copy_data_func, genlist_free_fn_t free_data_func)
void genlist_release_mutex(struct genlist *pgenlist)
struct genlist * genlist_new(void)
void * genlist_get(const struct genlist *pgenlist, int idx)
int genlist_remove_all(struct genlist *pgenlist, const void *punlink)
void genlist_erase(struct genlist *pgenlist, struct genlist_link *plink)
struct genlist_link * genlist_search_if(const struct genlist *pgenlist, genlist_cond_fn_t cond_data_func)
void genlist_clear(struct genlist *pgenlist)
void genlist_prepend(struct genlist *pgenlist, void *data)
bool genlist_remove_if(struct genlist *pgenlist, genlist_cond_fn_t cond_data_func)
void genlist_append(struct genlist *pgenlist, void *data)
void genlist_unique_full(struct genlist *pgenlist, genlist_comp_fn_t comp_data_func)
static struct genlist_link * genlist_link_at_pos(const struct genlist *pgenlist, int pos)
static void genlist_link_new(struct genlist *pgenlist, void *dataptr, struct genlist_link *prev, struct genlist_link *next)
struct genlist * genlist_copy(const struct genlist *pgenlist)
void genlist_destroy(struct genlist *pgenlist)
void genlist_pop_front(struct genlist *pgenlist)
void genlist_insert_before(struct genlist *pgenlist, void *data, struct genlist_link *plink)
void * genlist_back(const struct genlist *pgenlist)
int genlist_remove_all_if(struct genlist *pgenlist, genlist_cond_fn_t cond_data_func)
void genlist_unique(struct genlist *pgenlist)
void genlist_insert_after(struct genlist *pgenlist, void *data, struct genlist_link *plink)
void genlist_sort(struct genlist *pgenlist, int(*compar)(const void *, const void *))
void genlist_reverse(struct genlist *pgenlist)
struct genlist_link * genlist_tail(const struct genlist *pgenlist)
void * genlist_front(const struct genlist *pgenlist)
struct genlist * genlist_new_full(genlist_free_fn_t free_data_func)
struct genlist_link * genlist_link_get(const struct genlist *pgenlist, int idx)
void genlist_pop_back(struct genlist *pgenlist)
struct genlist_link * genlist_search(const struct genlist *pgenlist, const void *data)
int genlist_size(const struct genlist *pgenlist)
void genlist_shuffle(struct genlist *pgenlist)
static void genlist_link_destroy(struct genlist *pgenlist, struct genlist_link *plink)
bool(* genlist_cond_fn_t)(const void *)
bool(* genlist_comp_fn_t)(const void *, const void *)
static struct genlist_link * genlist_head(const struct genlist *pgenlist)
static void * genlist_link_data(const struct genlist_link *plink)
void *(* genlist_copy_fn_t)(const void *)
void(* genlist_free_fn_t)(void *)
#define fc_assert_ret(condition)
#define fc_calloc(n, esz)
void array_shuffle(int *array, int n)
struct genlist_link * prev
struct genlist_link * next
genlist_free_fn_t free_data_func