summaryrefslogtreecommitdiff
path: root/libbb/llist_add_to.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/llist_add_to.c')
-rw-r--r--libbb/llist_add_to.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libbb/llist_add_to.c b/libbb/llist_add_to.c
new file mode 100644
index 0000000..61e53f0
--- /dev/null
+++ b/libbb/llist_add_to.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <string.h>
+#include "unarchive.h"
+#include "libbb.h"
+
+extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
+{
+ llist_t *new_head;
+
+ new_head = xmalloc(sizeof(llist_t));
+ new_head->data = new_item;
+ new_head->link = old_head;
+
+ return(new_head);
+}