/* This software is licensed by the MIT License, see LICENSE file */ /* Copyright © 2022 Gregory Lirent */ #include #include "../list.h" #ifndef LIBCDSB_EXTRA_LIST_H #define LIBCDSB_EXTRA_LIST_H #define list_get_by_index(x, s, index) libcdsb_list_get(x, s, index, 0) #define list_pop_by_index(x, s, index) libcdsb_list_get(x, s, index, 1) #define list_remove_by_index(s, index) libcdsb_list_get(0, s, index, 1) extern ssize_t libcdsb_list_find (vtype_value* x, vtype_list* s, const void* value, vtype type, _Bool reverse, _Bool cut); extern _Bool libcdsb_list_update(vtype_list* x, ssize_t index, const void* value, vtype type, int ins_direction); extern size_t libcdsb_list_count(const vtype_list* s, const void* value, vtype type); extern ssize_t libcdsb_list_get(vtype_value* x, vtype_list* s, ssize_t index, _Bool cut); #endif /* LIBCDSB_EXTRA_LIST_H */