|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
36 # define __JO_LIST_H__
206 return (list->
first);
236 for (tmp = list->
first; tmp !=
JO_NULL; tmp = tmp->
next)
if (callback(tmp, extra))
return true;
static __jo_force_inline void jo_list_remove_last(jo_list *const list)
Free and remove the last item from the list.
Definition: list.h:172
static __jo_force_inline jo_node * jo_list_first(jo_list *const list)
Get first item.
Definition: list.h:204
void(* jo_node_callback)(jo_node *node)
Callback for jo_list_foreach()
Definition: list.h:42
jo_malloc_behaviour allocation_behaviour
Definition: list.h:78
static __jo_force_inline void jo_list_free_and_clear(jo_list *const list)
Free node pointers and remove all item.
Definition: list.h:152
jo_node * prev
Definition: list.h:68
void jo_list_init(jo_list *const list)
Init a list.
static __jo_force_inline void jo_list_remove_all_value(jo_list *const list, jo_list_data data)
Remove all items on the list that match DATA.
Definition: list.h:269
static __jo_force_inline jo_node * jo_list_last(jo_list *const list)
Get last item.
Definition: list.h:212
jo_malloc_behaviour
Malloc behaviour JO_MALLOC_TRY_REUSE_SAME_BLOCK_SIZE | ^ | | Speed efficiency | | V | JO_MALLOC_TRY_R...
Definition: malloc.h:71
static __jo_force_inline bool jo_list_remove_first_value(jo_list *const list, jo_list_data data)
Remove the first item on the list that match DATA.
Definition: list.h:253
jo_node * jo_list_insert_at(jo_list *const list, const jo_list_data data, const int index)
Insert an item on the list at specific index.
int integer
Definition: list.h:61
void jo_list_remove(jo_list *const list, const jo_node *const node_to_delete)
Remove an item on the list.
static __jo_force_inline bool jo_list_any(jo_list *const list, jo_node_any_callback callback, void *extra)
Find if any element of the list satisfy the condition (callback)
Definition: list.h:233
Node data (4 bytes)
Definition: list.h:49
static __jo_force_inline void jo_list_append(const jo_list *const list, jo_list *const output)
Append all items on the list to output list.
Definition: list.h:279
static __jo_force_inline void jo_list_clear(jo_list *const list)
Remove all item.
Definition: list.h:196
static __jo_force_inline void jo_list_free_and_remove_first(jo_list *const list)
Free and remove the first item from the list.
Definition: list.h:180
jo_node * jo_list_add(jo_list *const list, const jo_list_data data)
Add an item on the list.
jo_list_data data
Definition: list.h:67
static __jo_force_inline void jo_list_remove_at(jo_list *const list, const int index)
Remove an item on the list from index.
Definition: list.h:134
jo_node * first
Definition: list.h:76
jo_node * last
Definition: list.h:77
static __jo_force_inline void jo_list_set_allocation_behaviour(jo_list *const list, jo_malloc_behaviour behaviour)
Set list memory allocation behaviour.
Definition: list.h:244
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
static __jo_force_inline void jo_list_foreach(jo_list *const list, jo_node_callback callback)
Iterate on the list.
Definition: list.h:221
char * ch_arr
Definition: list.h:60
unsigned char uc
Definition: list.h:51
List struct.
Definition: list.h:74
static __jo_force_inline void jo_list_free_and_remove_last(jo_list *const list)
Free and remove the last item from the list.
Definition: list.h:164
int count
Definition: list.h:75
static __jo_force_inline jo_node * jo_list_add_ptr(jo_list *const list, void *ptr)
Add a pointer on the list.
Definition: list.h:106
Node struct.
Definition: list.h:66
void jo_free(const void *const p)
function frees the memory space pointed to by p
static __jo_force_inline void jo_list_free_and_remove(jo_list *const list, const jo_node *const node_to_delete)
Free node pointer and remove the item from the list.
Definition: list.h:143
bool(* jo_node_any_callback)(jo_node *node, void *extra)
Callback for jo_list_any()
Definition: list.h:45
jo_node * next
Definition: list.h:69
char c
Definition: list.h:50
void * ptr
Definition: list.h:59
static __jo_force_inline void jo_list_remove_first(jo_list *const list)
Free and remove the first item from the list.
Definition: list.h:188
static __jo_force_inline jo_node * jo_list_at(jo_list *const list, int index)
Get node at index.
Definition: list.h:122