summaryrefslogtreecommitdiff
path: root/include/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/list.h')
-rw-r--r--include/list.h17
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 @@
+#ifndef _SWAY_LIST_H
+#define _SWAY_LIST_H
+
+typedef struct {
+ int capacity;
+ int length;
+ void **items;
+} list_t;
+
+list_t *create_list(void);
+void list_free(list_t *list);
+void list_add(list_t *list, void *item);
+void list_insert(list_t *list, int index, void *item);
+void list_del(list_t *list, int index);
+void list_cat(list_t *list, list_t *source);
+
+#endif