diff options
Diffstat (limited to 'src/ll.h')
| -rw-r--r-- | src/ll.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/ll.h b/src/ll.h deleted file mode 100644 index f5801e0..0000000 --- a/src/ll.h +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | #ifndef __VXGG_REWRITE___LL_H___305861098005___ | ||
| 2 | #define __VXGG_REWRITE___LL_H___305861098005___ | ||
| 3 | |||
| 4 | // Notice: dlinked functions are no longer necessarily xalloc, but MAY be IF the `___VXGG___USE_XALLOC_FOR_VALLOC___` is greater than 0 | ||
| 5 | |||
| 6 | /* TODO: Implement a way to register a set of alloc functions to a linked list so I can give it arenas for memory allocation | ||
| 7 | // instead of just xcalloc */ | ||
| 8 | // I don't know if I care to do this right now. I might be able to hack it in but it would be a fugly hack, something as bad if not worse than that weird callback thing I was doing with the ALWAYS_CHECK_LIBSODIUM macro | ||
| 9 | |||
| 10 | typedef void (*dll_freecb)(void*); | ||
| 11 | typedef struct dlinked dlinkedlist; | ||
| 12 | |||
| 13 | #ifndef __VXGG_REWRITE___LL_INTERNAL___ | ||
| 14 | |||
| 15 | dlinkedlist * dlinkedlist_init(void); | ||
| 16 | void dlinkedlist_free(void *dll); | ||
| 17 | int dlinkedlist_append(dlinkedlist * const ll, void *data, dll_freecb fcb); | ||
| 18 | int dlinkedlist_prepend(dlinkedlist * const ll, void *data, dll_freecb fcb); | ||
| 19 | int dlinkedlist_insert(dlinkedlist * const ll, void *data, dll_freecb fcb, int index); | ||
| 20 | void* dlinkedlist_get(const dlinkedlist * const ll, int index); | ||
| 21 | int dlinkedlist_remove(dlinkedlist * const ll, int index); | ||
| 22 | void * dlinkedlist_poplast(dlinkedlist *ll); | ||
| 23 | |||
| 24 | int dlinkedlist_size(const dlinkedlist * const ll); | ||
| 25 | #define dlinkedlist_isempty(ll) (dlinkedlist_size((ll)) == 0) | ||
| 26 | |||
| 27 | int dlinkedlist_foreach(dlinkedlist *ll, int (*callback)(void*)); | ||
| 28 | |||
| 29 | #endif | ||
| 30 | |||
| 31 | #endif \ No newline at end of file | ||
