diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/unarchive.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/unarchive.h b/include/unarchive.h index c4e875f39..bea055852 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
@@ -10,11 +10,9 @@ | |||
10 | #define ARCHIVE_NOPRESERVE_OWN 32 | 10 | #define ARCHIVE_NOPRESERVE_OWN 32 |
11 | #define ARCHIVE_NOPRESERVE_PERM 64 | 11 | #define ARCHIVE_NOPRESERVE_PERM 64 |
12 | 12 | ||
13 | //#include "libbb.h" | 13 | typedef struct file_header_t { |
14 | |||
15 | typedef struct file_headers_s { | ||
16 | char *name; | 14 | char *name; |
17 | char *link_name; | 15 | char *link_target; |
18 | off_t size; | 16 | off_t size; |
19 | uid_t uid; | 17 | uid_t uid; |
20 | gid_t gid; | 18 | gid_t gid; |
@@ -23,9 +21,9 @@ typedef struct file_headers_s { | |||
23 | dev_t device; | 21 | dev_t device; |
24 | } file_header_t; | 22 | } file_header_t; |
25 | 23 | ||
26 | typedef struct archive_handle_s { | 24 | typedef struct archive_handle_t { |
27 | /* define if the header and data component should be processed */ | 25 | /* define if the header and data component should be processed */ |
28 | char (*filter)(struct archive_handle_s *); | 26 | char (*filter)(struct archive_handle_t *); |
29 | llist_t *accept; | 27 | llist_t *accept; |
30 | /* List of files that have been rejected */ | 28 | /* List of files that have been rejected */ |
31 | llist_t *reject; | 29 | llist_t *reject; |
@@ -39,13 +37,13 @@ typedef struct archive_handle_s { | |||
39 | void (*action_header)(const file_header_t *); | 37 | void (*action_header)(const file_header_t *); |
40 | 38 | ||
41 | /* process the data component, e.g. extract to filesystem */ | 39 | /* process the data component, e.g. extract to filesystem */ |
42 | void (*action_data)(struct archive_handle_s *); | 40 | void (*action_data)(struct archive_handle_t *); |
43 | 41 | ||
44 | /* How to process any sub archive, e.g. get_header_tar_gz */ | 42 | /* How to process any sub archive, e.g. get_header_tar_gz */ |
45 | char (*action_data_subarchive)(struct archive_handle_s *); | 43 | char (*action_data_subarchive)(struct archive_handle_t *); |
46 | 44 | ||
47 | /* Contains the handle to a sub archive */ | 45 | /* Contains the handle to a sub archive */ |
48 | struct archive_handle_s *sub_archive; | 46 | struct archive_handle_t *sub_archive; |
49 | 47 | ||
50 | /* The raw stream as read from disk or stdin */ | 48 | /* The raw stream as read from disk or stdin */ |
51 | int src_fd; | 49 | int src_fd; |
@@ -54,7 +52,7 @@ typedef struct archive_handle_s { | |||
54 | off_t offset; | 52 | off_t offset; |
55 | 53 | ||
56 | /* Function that skips data: read_by_char or read_by_skip */ | 54 | /* Function that skips data: read_by_char or read_by_skip */ |
57 | void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount); | 55 | void (*seek)(const struct archive_handle_t *archive_handle, const unsigned amount); |
58 | 56 | ||
59 | /* Temporary storage */ | 57 | /* Temporary storage */ |
60 | char *buffer; | 58 | char *buffer; |
@@ -92,8 +90,8 @@ extern char get_header_tar_bz2(archive_handle_t *archive_handle); | |||
92 | extern char get_header_tar_lzma(archive_handle_t *archive_handle); | 90 | extern char get_header_tar_lzma(archive_handle_t *archive_handle); |
93 | extern char get_header_tar_gz(archive_handle_t *archive_handle); | 91 | extern char get_header_tar_gz(archive_handle_t *archive_handle); |
94 | 92 | ||
95 | extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount); | 93 | extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned amount); |
96 | extern void seek_by_read(const archive_handle_t *archive_handle, const unsigned int amount); | 94 | extern void seek_by_read(const archive_handle_t *archive_handle, const unsigned amount); |
97 | 95 | ||
98 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); | 96 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); |
99 | 97 | ||