summaryrefslogtreecommitdiff
path: root/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'list.h')
-rw-r--r--list.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/list.h b/list.h
new file mode 100644
index 0000000..21ceeaa
--- /dev/null
+++ b/list.h
@@ -0,0 +1,22 @@
+#ifndef DEF_LISTH
+#define DEF_LISTH
+
+#include <stdlib.h>
+
+struct long_list {
+ long* list;
+ size_t alloc_size;
+ size_t length;
+};
+
+struct long_list* long_list_init(size_t size);
+
+void long_list_free(struct long_list* list);
+
+void long_list_add(struct long_list* list, long value);
+
+long long_list_get(struct long_list* list, size_t index);
+
+void long_list_set(struct long_list* list, size_t index, long value);
+
+#endif