diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/include/libbb.h b/include/libbb.h index 893a9f07f..e42ca9f2b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -213,23 +213,9 @@ char *xreadlink(const char *path); | |||
213 | char *concat_path_file(const char *path, const char *filename); | 213 | char *concat_path_file(const char *path, const char *filename); |
214 | char *last_char_is(const char *s, int c); | 214 | char *last_char_is(const char *s, int c); |
215 | 215 | ||
216 | typedef struct file_headers_s { | 216 | void *get_header_ar(FILE *in_file); |
217 | char *name; | 217 | void *get_header_cpio(FILE *src_stream); |
218 | char *link_name; | 218 | void *get_header_tar(FILE *tar_stream); |
219 | off_t size; | ||
220 | uid_t uid; | ||
221 | gid_t gid; | ||
222 | mode_t mode; | ||
223 | time_t mtime; | ||
224 | off_t offset; | ||
225 | dev_t device; | ||
226 | struct file_headers_s *next; | ||
227 | } file_headers_t; | ||
228 | file_headers_t *get_ar_headers(FILE *in_file); | ||
229 | file_headers_t *get_tar_headers(FILE *tar_stream); | ||
230 | file_headers_t *get_tar_gz_headers(FILE *compressed_stream); | ||
231 | file_headers_t *append_archive_list(file_headers_t *head, file_headers_t *tail_entry); | ||
232 | file_headers_t *add_from_archive_list(file_headers_t *master_list, file_headers_t *new_list, const char *name); | ||
233 | 219 | ||
234 | enum extract_functions_e { | 220 | enum extract_functions_e { |
235 | extract_verbose_list = 1, | 221 | extract_verbose_list = 1, |
@@ -240,18 +226,20 @@ enum extract_functions_e { | |||
240 | extract_preserve_date = 32, | 226 | extract_preserve_date = 32, |
241 | extract_data_tar_gz = 64, | 227 | extract_data_tar_gz = 64, |
242 | extract_control_tar_gz = 128, | 228 | extract_control_tar_gz = 128, |
243 | extract_unzip_only = 256 | 229 | extract_unzip_only = 256, |
230 | extract_unconditional = 512, | ||
231 | extract_create_dirs = 1024 | ||
244 | }; | 232 | }; |
245 | char *extract_archive(FILE *src_stream, FILE *out_stream, file_headers_t *extract_headers, int function, const char *prefix); | 233 | char *unarchive(FILE *src_stream, void *(*get_header)(FILE *), |
246 | char *deb_extract(const char *package_filename, FILE *out_stream, const int function, | 234 | const int extract_function, const char *prefix, char **extract_names); |
235 | char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function, | ||
247 | const char *prefix, const char *filename); | 236 | const char *prefix, const char *filename); |
248 | char *read_package_field(const char *package_buffer); | 237 | char *read_package_field(const char *package_buffer); |
249 | int seek_sub_file(FILE *in_file, file_headers_t *headers, const char *tar_gz_file); | ||
250 | char *fgets_str(FILE *file, const char *terminating_string); | 238 | char *fgets_str(FILE *file, const char *terminating_string); |
251 | 239 | ||
252 | extern int unzip(FILE *l_in_file, FILE *l_out_file); | 240 | extern int unzip(FILE *l_in_file, FILE *l_out_file); |
253 | extern void gz_close(int gunzip_pid); | 241 | extern void gz_close(int gunzip_pid); |
254 | extern int gz_open(FILE *compressed_file, int *pid); | 242 | extern FILE *gz_open(FILE *compressed_file, int *pid); |
255 | 243 | ||
256 | extern struct hostent *xgethostbyname(const char *name); | 244 | extern struct hostent *xgethostbyname(const char *name); |
257 | 245 | ||