diff options
Diffstat (limited to 'include/list.h')
-rw-r--r-- | include/list.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h new file mode 100644 index 00000000..29b988aa --- /dev/null +++ b/include/list.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _SWAY_LIST_H | ||
2 | #define _SWAY_LIST_H | ||
3 | |||
4 | typedef struct { | ||
5 | int capacity; | ||
6 | int length; | ||
7 | void **items; | ||
8 | } list_t; | ||
9 | |||
10 | list_t *create_list(void); | ||
11 | void list_free(list_t *list); | ||
12 | void list_add(list_t *list, void *item); | ||
13 | void list_insert(list_t *list, int index, void *item); | ||
14 | void list_del(list_t *list, int index); | ||
15 | void list_cat(list_t *list, list_t *source); | ||
16 | |||
17 | #endif | ||