diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h index 3b0ced7d1..c29955b3b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -212,9 +212,19 @@ char *xreadlink(const char *path); | |||
212 | char *concat_path_file(const char *path, const char *filename); | 212 | char *concat_path_file(const char *path, const char *filename); |
213 | char *last_char_is(const char *s, int c); | 213 | char *last_char_is(const char *s, int c); |
214 | 214 | ||
215 | void *get_header_ar(FILE *in_file); | 215 | typedef struct file_headers_s { |
216 | void *get_header_cpio(FILE *src_stream); | 216 | char *name; |
217 | void *get_header_tar(FILE *tar_stream); | 217 | char *link_name; |
218 | off_t size; | ||
219 | uid_t uid; | ||
220 | gid_t gid; | ||
221 | mode_t mode; | ||
222 | time_t mtime; | ||
223 | dev_t device; | ||
224 | } file_header_t; | ||
225 | file_header_t *get_header_ar(FILE *in_file); | ||
226 | file_header_t *get_header_cpio(FILE *src_stream); | ||
227 | file_header_t *get_header_tar(FILE *tar_stream); | ||
218 | 228 | ||
219 | enum extract_functions_e { | 229 | enum extract_functions_e { |
220 | extract_verbose_list = 1, | 230 | extract_verbose_list = 1, |
@@ -229,7 +239,7 @@ enum extract_functions_e { | |||
229 | extract_unconditional = 512, | 239 | extract_unconditional = 512, |
230 | extract_create_leading_dirs = 1024 | 240 | extract_create_leading_dirs = 1024 |
231 | }; | 241 | }; |
232 | char *unarchive(FILE *src_stream, void *(*get_header)(FILE *), | 242 | char *unarchive(FILE *src_stream, file_header_t *(*get_header)(FILE *), |
233 | const int extract_function, const char *prefix, char **extract_names); | 243 | const int extract_function, const char *prefix, char **extract_names); |
234 | char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function, | 244 | char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function, |
235 | const char *prefix, const char *filename); | 245 | const char *prefix, const char *filename); |