aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ll.c9
-rw-r--r--ll.h12
2 files changed, 21 insertions, 0 deletions
diff --git a/ll.c b/ll.c
new file mode 100644
index 0000000..aa0879a
--- /dev/null
+++ b/ll.c
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include "ll.h"
+
+llnode* appendll(llnode* tail, char* str){
+ llnode* new = malloc(sizeof(llnode));
+ if (tail != NULL) tail->next = new;
+ new->str = str;
+ return new;
+}
diff --git a/ll.h b/ll.h
new file mode 100644
index 0000000..9a80182
--- /dev/null
+++ b/ll.h
@@ -0,0 +1,12 @@
+#ifndef _LL_INCLUDE
+#define _LL_INCLUDE
+#include <stdbool.h>
+
+typedef struct llnode {
+ char* str;
+ struct llnode* next;
+} llnode;
+
+llnode* appendll(llnode* tail, char* str);
+
+#endif