diff options
| author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-12-08 00:54:33 +0000 |
|---|---|---|
| committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-12-08 00:54:33 +0000 |
| commit | cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77 (patch) | |
| tree | f7e34d157460ad689c350071a25d19cdd51e1ebb /include | |
| parent | 582df5509027f8cef2b76d3da3c105bb8af2b236 (diff) | |
| download | busybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.tar.gz busybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.tar.bz2 busybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.zip | |
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).
git-svn-id: svn://busybox.net/trunk/busybox@6132 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 6 | ||||
| -rw-r--r-- | include/unarchive.h | 14 |
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 { | |||
| 357 | extern procps_status_t * procps_scan(int save_user_arg0); | 357 | extern procps_status_t * procps_scan(int save_user_arg0); |
| 358 | extern unsigned short compare_string_array(const char *string_array[], const char *key); | 358 | extern unsigned short compare_string_array(const char *string_array[], const char *key); |
| 359 | 359 | ||
| 360 | typedef struct llist_s { | ||
| 361 | char *data; | ||
| 362 | struct llist_s *link; | ||
| 363 | } llist_t; | ||
| 364 | extern llist_t *llist_add_to(llist_t *old_head, char *new_item); | ||
| 365 | |||
| 360 | #endif /* __LIBCONFIG_H__ */ | 366 | #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 @@ | |||
| 7 | #define ARCHIVE_EXTRACT_QUIET 8 | 7 | #define ARCHIVE_EXTRACT_QUIET 8 |
| 8 | 8 | ||
| 9 | #include <sys/types.h> | 9 | #include <sys/types.h> |
| 10 | |||
| 11 | #include <stdio.h> | 10 | #include <stdio.h> |
| 11 | #include "libbb.h" | ||
| 12 | 12 | ||
| 13 | typedef struct file_headers_s { | 13 | typedef struct file_headers_s { |
| 14 | char *name; | 14 | char *name; |
| @@ -21,17 +21,12 @@ typedef struct file_headers_s { | |||
| 21 | dev_t device; | 21 | dev_t device; |
| 22 | } file_header_t; | 22 | } file_header_t; |
| 23 | 23 | ||
| 24 | typedef struct llist_s { | ||
| 25 | const char *data; | ||
| 26 | const struct llist_s *link; | ||
| 27 | } llist_t; | ||
| 28 | |||
| 29 | typedef struct archive_handle_s { | 24 | typedef struct archive_handle_s { |
| 30 | /* define if the header and data compenent should processed */ | 25 | /* define if the header and data compenent should processed */ |
| 31 | char (*filter)(struct archive_handle_s *); | 26 | char (*filter)(struct archive_handle_s *); |
| 32 | const llist_t *accept; | 27 | llist_t *accept; |
| 33 | const llist_t *reject; | 28 | llist_t *reject; |
| 34 | const llist_t *passed; /* List of files that have successfully been worked on */ | 29 | llist_t *passed; /* List of files that have successfully been worked on */ |
| 35 | 30 | ||
| 36 | /* Contains the processed header entry */ | 31 | /* Contains the processed header entry */ |
| 37 | file_header_t *file_header; | 32 | file_header_t *file_header; |
| @@ -103,7 +98,6 @@ extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf, | |||
| 103 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); | 98 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); |
| 104 | 99 | ||
| 105 | extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary); | 100 | extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary); |
| 106 | extern const llist_t *add_to_list(const llist_t *old_head, const char *new_item); | ||
| 107 | extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd); | 101 | extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd); |
| 108 | extern const llist_t *find_list_entry(const llist_t *list, const char *filename); | 102 | extern const llist_t *find_list_entry(const llist_t *list, const char *filename); |
| 109 | 103 | ||
