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).

This commit is contained in:
Glenn L McGrath
2002-12-08 00:54:33 +00:00
parent 346cdb1dde
commit 66125c8065
12 changed files with 32 additions and 33 deletions

View File

@@ -53,7 +53,6 @@ LIBUNARCHIVE-y:= \
\
archive_copy_file.o \
\
add_to_list.o \
check_header_gzip.o \
check_trailer_gzip.o \
data_align.o \

View File

@@ -1,15 +0,0 @@
#include <stdlib.h>
#include <string.h>
#include "unarchive.h"
#include "libbb.h"
extern const llist_t *add_to_list(const llist_t *old_head, const 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);
}

View File

@@ -171,7 +171,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
archive_handle->action_header(archive_handle->file_header);
archive_handle->flags |= ARCHIVE_EXTRACT_QUIET;
archive_handle->action_data(archive_handle);
archive_handle->passed = add_to_list(archive_handle->passed, archive_handle->file_header->name);
archive_handle->passed = llist_add_to(archive_handle->passed, archive_handle->file_header->name);
} else {
data_skip(archive_handle);
}