aboutsummaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-05-25 13:15:13 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-05-25 13:15:13 +0200
commit21369ab14763faec0abeb4e669cb0db62121b6fd (patch)
treeaf413575072c79a0d0fcdd0af29c2fcab8f2f1bc /src/list.h
parent19f8170507c20d954df8002c052672d43397483d (diff)
downloaddns-21369ab14763faec0abeb4e669cb0db62121b6fd.tar.gz
add list for zonefile parsing (untested)
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
new file mode 100644
index 0000000..71594ad
--- /dev/null
+++ b/src/list.h
@@ -0,0 +1,25 @@
+/*
+ * src/list.h
+ * (c) 2021 Jonas Gunz <himself@jonasgunz.de>
+ * License: MIT
+ */
+
+#pragma once
+
+#include <stdio.h>
+#include <stdlib.h>
+
+typedef struct list_element list_element_t;
+
+struct list_element {
+ void* data;
+ list_element_t* next;
+};
+
+int list_add( list_element_t** _root, void* _data );
+
+int list_sort ( list_element_t** _root );
+
+int list_length ( list_element_t* _root );
+
+void* list_pop_front ( list_element_t** _root );