From 66125c806518f74a54232206d02e30a39b621232 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sun, 8 Dec 2002 00:54:33 +0000 Subject: Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free). --- libbb/llist_add_to.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libbb/llist_add_to.c (limited to 'libbb/llist_add_to.c') diff --git a/libbb/llist_add_to.c b/libbb/llist_add_to.c new file mode 100644 index 000000000..61e53f0c1 --- /dev/null +++ b/libbb/llist_add_to.c @@ -0,0 +1,15 @@ +#include +#include +#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); +} -- cgit v1.2.3