diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/include/libbb.h b/include/libbb.h index f99d25780..f24a38109 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -213,36 +213,41 @@ 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 ar_headers_s { | 216 | typedef struct file_headers_s { |
217 | char *name; | 217 | char *name; |
218 | char *link_name; | ||
218 | off_t size; | 219 | off_t size; |
219 | uid_t uid; | 220 | uid_t uid; |
220 | gid_t gid; | 221 | gid_t gid; |
221 | mode_t mode; | 222 | mode_t mode; |
222 | time_t mtime; | 223 | time_t mtime; |
223 | off_t offset; | 224 | off_t offset; |
224 | struct ar_headers_s *next; | 225 | dev_t device; |
225 | } ar_headers_t; | 226 | struct file_headers_s *next; |
226 | extern ar_headers_t *get_ar_headers(FILE *in_file); | 227 | } file_headers_t; |
227 | extern int seek_ared_file(FILE *in_file, ar_headers_t *headers, const char *tar_gz_file); | 228 | file_headers_t *get_ar_headers(FILE *in_file); |
228 | 229 | file_headers_t *get_tar_headers(FILE *tar_stream); | |
229 | typedef enum extract_function_e { | 230 | file_headers_t *get_tar_gz_headers(FILE *compressed_stream); |
230 | extract_contents = 1, | 231 | file_headers_t *append_archive_list(file_headers_t *head, file_headers_t *tail_entry); |
231 | extract_control = 2, | 232 | file_headers_t *add_from_archive_list(file_headers_t *master_list, file_headers_t *new_list, const char *name); |
232 | extract_info = 4, | 233 | |
233 | extract_extract = 8, | 234 | enum extract_functions_e { |
234 | extract_verbose_extract = 16, | 235 | extract_verbose_list = 1, |
235 | extract_list = 32, | 236 | extract_list = 2, |
236 | extract_fsys_tarfile = 64, | 237 | extract_one_to_buffer = 4, |
237 | extract_field = 128, | 238 | extract_to_stdout = 8, |
238 | extract_contents_to_file = 256 | 239 | extract_all_to_fs = 16, |
239 | } extract_function_t; | 240 | extract_preserve_date = 32, |
240 | extern char *deb_extract(const char *package_filename, int function, | 241 | extract_data_tar_gz = 64, |
241 | const char *argument, const char *argument2); | 242 | extract_control_tar_gz = 128, |
242 | extern char *untar(FILE *src_tar_file, FILE *output, int untar_function, | 243 | extract_unzip_only = 256 |
243 | const char *argument, const char *file_prefix); | 244 | }; |
244 | extern char *read_text_file_to_buffer(FILE *src_file); | 245 | char *extract_archive(FILE *src_stream, FILE *out_stream, file_headers_t *extract_headers, int function, const char *prefix); |
245 | extern char *read_package_field(const char *package_buffer); | 246 | char *deb_extract(const char *package_filename, FILE *out_stream, const int function, |
247 | const char *prefix, const char *filename); | ||
248 | 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); | ||
246 | 251 | ||
247 | extern int unzip(FILE *l_in_file, FILE *l_out_file); | 252 | extern int unzip(FILE *l_in_file, FILE *l_out_file); |
248 | extern void gz_close(int gunzip_pid); | 253 | extern void gz_close(int gunzip_pid); |