aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-12-08 00:54:33 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-12-08 00:54:33 +0000
commit66125c806518f74a54232206d02e30a39b621232 (patch)
treef7e34d157460ad689c350071a25d19cdd51e1ebb /include
parent346cdb1ddea7d825b29e9dcd73d6f7af8db8598f (diff)
downloadbusybox-66125c806518f74a54232206d02e30a39b621232.tar.gz
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).
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h6
-rw-r--r--include/unarchive.h14
2 files changed, 10 insertions, 10 deletions
diff --git a/include/libbb.h b/include/libbb.h
index dec6df116..1e95a903e 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -357,4 +357,10 @@ typedef struct {
extern procps_status_t * procps_scan(int save_user_arg0);
extern unsigned short compare_string_array(const char *string_array[], const char *key);
+typedef struct llist_s {
+ char *data;
+ struct llist_s *link;
+} llist_t;
+extern llist_t *llist_add_to(llist_t *old_head, char *new_item);
+
#endif /* __LIBCONFIG_H__ */
diff --git a/include/unarchive.h b/include/unarchive.h
index bfd9a1458..aca685915 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -7,8 +7,8 @@
#define ARCHIVE_EXTRACT_QUIET 8
#include <sys/types.h>
-
#include <stdio.h>
+#include "libbb.h"
typedef struct file_headers_s {
char *name;
@@ -21,17 +21,12 @@ typedef struct file_headers_s {
dev_t device;
} file_header_t;
-typedef struct llist_s {
- const char *data;
- const struct llist_s *link;
-} llist_t;
-
typedef struct archive_handle_s {
/* define if the header and data compenent should processed */
char (*filter)(struct archive_handle_s *);
- const llist_t *accept;
- const llist_t *reject;
- const llist_t *passed; /* List of files that have successfully been worked on */
+ llist_t *accept;
+ llist_t *reject;
+ llist_t *passed; /* List of files that have successfully been worked on */
/* Contains the processed header entry */
file_header_t *file_header;
@@ -103,7 +98,6 @@ extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf,
extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count);
extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary);
-extern const llist_t *add_to_list(const llist_t *old_head, const char *new_item);
extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd);
extern const llist_t *find_list_entry(const llist_t *list, const char *filename);