32 const void *
object,
size_t objsize);
35 const void *
object,
size_t objsize);
38 int (*comp)(
const void *,
const void *));
56 #define for_each_sll_node(focus, head) \ 57 for (focus = head; focus != NULL; focus = focus->next) struct sllistnode * add_head_sll_node(struct sllistnode *head, const void *object, size_t objsize)
Add a node to the start of the singly linked list.
Definition: sllist.c:35
void * find_sll_node(struct sllistnode *head, const void *searchobj, int(*comp)(const void *, const void *))
Find a node.
Definition: sllist.c:125
Singly linked list node.
Definition: sllist.h:26
static struct sllistnode * find_next_sll_node(struct sllistnode *focus)
Find the next node in the list.
Definition: sllist.h:46
Header file to ease portability.
#define END_C_DECLS
Use END_C_DECLS at the end of C declarations.
Definition: mge-portability.h:34
void * object
Attached object.
Definition: sllist.h:27
struct sllistnode * next
The subsequent node.
Definition: sllist.h:28
#define BEGIN_C_DECLS
BEGIN_C_DECLS should be used at the beginning of declarations so that C++ compilers don't mangle thei...
Definition: mge-portability.h:30
struct sllistnode * free_sllist(struct sllistnode *head)
Free the entire list.
Definition: sllist.c:150
struct sllistnode * add_tail_sll_node(struct sllistnode *head, const void *object, size_t objsize)
Add a node to the tail of the singly linked list.
Definition: sllist.c:75