summaryrefslogtreecommitdiff
path: root/src/include/sl_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/sl_list.h')
-rw-r--r--src/include/sl_list.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/sl_list.h b/src/include/sl_list.h
new file mode 100644
index 0000000..5a7c130
--- /dev/null
+++ b/src/include/sl_list.h
@@ -0,0 +1,23 @@
+#ifndef SL_LIST_H
+#define SL_LIST_H
+
+typedef struct SL_NODE_STRUCT {
+ void *p1;
+ void *p2;
+} sl_node_t;
+
+typedef struct {
+ sl_node_t *head;
+ int size;
+} sl_list_t;
+
+sl_node_t *init_sl_node(void *value);
+
+sl_list_t *init_sl_list();
+
+void sl_list_add(sl_list_t *l, void *value, int i);
+
+void sl_list_del(sl_list_t *l, int i);
+
+void *sl_list_get(sl_list_t *l, int i);
+#endif