|
- #ifndef IZ_LIST_H
- #define IZ_LIST_H
-
- #include "../../common/IZ_common.h"
- #include "SDL_stdinc.h"
-
- typedef struct IZ_ListNode {
- void* value;
- struct IZ_ListNode* next;
- } IZ_ListNode;
-
- typedef struct {
- IZ_ListNode* root;
- u64 length;
- } IZ_List;
-
- typedef bool IZ_ListFindFilter(IZ_ListNode*, u64);
-
- void IZ_ListInitialize(IZ_List*);
-
- void IZ_ListTeardown(IZ_List*);
-
- IZ_ListNode* IZ_ListAppendNode(IZ_List*, void*);
-
- #define IZ_ListFilterFunctionArgs(X) static X = NULL;
-
- void _IZ_ListDeleteFirstNode(IZ_List*, IZ_ListFindFilter);
-
- #define IZ_ListDeleteFirstNode(X, Y) X = Y; _IZ_ListDeleteFirstNode
-
- IZ_ListNode* _IZ_ListFindFirstNode(IZ_List*, IZ_ListFindFilter);
-
- #define IZ_ListFindFirstNode(X, Y) X = Y; _IZ_ListFindFirstNode
-
- #endif
|