summaryrefslogtreecommitdiff
path: root/src/include/sl_list.h
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-02 22:31:49 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-02 22:31:49 -0800
commit64feef1b9ea72adf7ba32998e9dca7d507607498 (patch)
treea409e61877bb51aa6fb2477175dabbf3dbccf298 /src/include/sl_list.h
a lot of stuff.
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