diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-07-31 00:22:18 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-07-31 00:22:18 +0200 |
commit | 61716a2c77dfde9addf6b41a6d72d26a8584150e (patch) | |
tree | 537cd84661955497bdb304f88896e36896df4e5f /include/list.h | |
parent | f85434de666f10da0cbcaccdbb7d88917c5fa887 (diff) |
Initial implementation of seatd and libseat
Diffstat (limited to 'include/list.h')
-rw-r--r-- | include/list.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h new file mode 100644 index 0000000..3f2ac6c --- /dev/null +++ b/include/list.h @@ -0,0 +1,22 @@ +#ifndef _SEATD_LIST_H +#define _SEATD_LIST_H + +#include <stddef.h> + +struct list { + size_t capacity; + size_t length; + void **items; +}; + +void list_init(struct list *); +void list_free(struct list *list); +void list_add(struct list *list, void *item); +void list_insert(struct list *list, size_t index, void *item); +void list_del(struct list *list, size_t index); +void list_concat(struct list *list, struct list *source); +void list_truncate(struct list *list); +void *list_pop_front(struct list *list); +size_t list_find(struct list *list, const void *item); + +#endif |