From 64feef1b9ea72adf7ba32998e9dca7d507607498 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 2 Jan 2023 22:31:49 -0800 Subject: a lot of stuff. --- src/include/sl_list.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/include/sl_list.h (limited to 'src/include/sl_list.h') 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 -- cgit