diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 5 | ||||
-rw-r--r-- | include/unarchive.h | 19 | ||||
-rw-r--r-- | include/usage.h | 14 |
3 files changed, 20 insertions, 18 deletions
diff --git a/include/libbb.h b/include/libbb.h index 9cbab4f1d..3996846b5 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -597,6 +597,7 @@ extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC; | |||
597 | /* Returns NULL if file can't be opened */ | 597 | /* Returns NULL if file can't be opened */ |
598 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; | 598 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; |
599 | /* Autodetects .gz etc */ | 599 | /* Autodetects .gz etc */ |
600 | extern int open_zipped(const char *fname) FAST_FUNC; | ||
600 | extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p) FAST_FUNC; | 601 | extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p) FAST_FUNC; |
601 | /* Never returns NULL */ | 602 | /* Never returns NULL */ |
602 | extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; | 603 | extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; |
@@ -1039,10 +1040,6 @@ const char *bb_basename(const char *name) FAST_FUNC; | |||
1039 | char *last_char_is(const char *s, int c) FAST_FUNC; | 1040 | char *last_char_is(const char *s, int c) FAST_FUNC; |
1040 | 1041 | ||
1041 | 1042 | ||
1042 | USE_DESKTOP(long long) int uncompress(int fd_in, int fd_out) FAST_FUNC; | ||
1043 | int inflate(int in, int out) FAST_FUNC; | ||
1044 | |||
1045 | |||
1046 | int bb_make_directory(char *path, long mode, int flags) FAST_FUNC; | 1043 | int bb_make_directory(char *path, long mode, int flags) FAST_FUNC; |
1047 | 1044 | ||
1048 | int get_signum(const char *name) FAST_FUNC; | 1045 | int get_signum(const char *name) FAST_FUNC; |
diff --git a/include/unarchive.h b/include/unarchive.h index cf23d98bf..7ff791be5 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
@@ -98,9 +98,9 @@ extern void header_verbose_list(const file_header_t *file_header) FAST_FUNC; | |||
98 | extern char get_header_ar(archive_handle_t *archive_handle) FAST_FUNC; | 98 | extern char get_header_ar(archive_handle_t *archive_handle) FAST_FUNC; |
99 | extern char get_header_cpio(archive_handle_t *archive_handle) FAST_FUNC; | 99 | extern char get_header_cpio(archive_handle_t *archive_handle) FAST_FUNC; |
100 | extern char get_header_tar(archive_handle_t *archive_handle) FAST_FUNC; | 100 | extern char get_header_tar(archive_handle_t *archive_handle) FAST_FUNC; |
101 | extern char get_header_tar_gz(archive_handle_t *archive_handle) FAST_FUNC; | ||
101 | extern char get_header_tar_bz2(archive_handle_t *archive_handle) FAST_FUNC; | 102 | extern char get_header_tar_bz2(archive_handle_t *archive_handle) FAST_FUNC; |
102 | extern char get_header_tar_lzma(archive_handle_t *archive_handle) FAST_FUNC; | 103 | extern char get_header_tar_lzma(archive_handle_t *archive_handle) FAST_FUNC; |
103 | extern char get_header_tar_gz(archive_handle_t *archive_handle) FAST_FUNC; | ||
104 | 104 | ||
105 | extern void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount) FAST_FUNC; | 105 | extern void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount) FAST_FUNC; |
106 | extern void seek_by_read(const archive_handle_t *archive_handle, unsigned amount) FAST_FUNC; | 106 | extern void seek_by_read(const archive_handle_t *archive_handle, unsigned amount) FAST_FUNC; |
@@ -120,17 +120,22 @@ typedef struct inflate_unzip_result { | |||
120 | uint32_t crc; | 120 | uint32_t crc; |
121 | } inflate_unzip_result; | 121 | } inflate_unzip_result; |
122 | 122 | ||
123 | extern USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; | 123 | USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC; |
124 | extern USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC; | 124 | /* lzma unpacker takes .lzma stream from offset 0 */ |
125 | extern USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; | 125 | USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC; |
126 | extern USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC; | 126 | /* the rest wants 2 first bytes already skipped by the caller */ |
127 | USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; | ||
128 | USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; | ||
129 | USE_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC; | ||
130 | /* wrapper which checks first two bytes to be "BZ" */ | ||
131 | USE_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC; | ||
127 | 132 | ||
128 | #if BB_MMU | 133 | #if BB_MMU |
129 | extern void open_transformer(int fd, | 134 | void open_transformer(int fd, |
130 | USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC; | 135 | USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC; |
131 | #define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transformer) | 136 | #define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transformer) |
132 | #else | 137 | #else |
133 | extern void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC; | 138 | void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC; |
134 | #define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transform_prog) | 139 | #define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transform_prog) |
135 | #endif | 140 | #endif |
136 | 141 | ||
diff --git a/include/usage.h b/include/usage.h index ae6d2bcb6..78f40367e 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -3943,9 +3943,9 @@ | |||
3943 | "nameserver 10.0.0.1\n" | 3943 | "nameserver 10.0.0.1\n" |
3944 | 3944 | ||
3945 | #define tar_trivial_usage \ | 3945 | #define tar_trivial_usage \ |
3946 | "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \ | 3946 | "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_SEAMLESS_GZ("z") \ |
3947 | USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \ | 3947 | USE_FEATURE_SEAMLESS_BZ2("j") USE_FEATURE_SEAMLESS_LZMA("a") \ |
3948 | USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \ | 3948 | USE_FEATURE_SEAMLESS_Z("Z") "xtvO] " \ |
3949 | USE_FEATURE_TAR_FROM("[-X FILE] ") \ | 3949 | USE_FEATURE_TAR_FROM("[-X FILE] ") \ |
3950 | "[-f TARFILE] [-C DIR] [FILE(s)]..." | 3950 | "[-f TARFILE] [-C DIR] [FILE(s)]..." |
3951 | #define tar_full_usage "\n\n" \ | 3951 | #define tar_full_usage "\n\n" \ |
@@ -3956,16 +3956,16 @@ | |||
3956 | "\n x Extract" \ | 3956 | "\n x Extract" \ |
3957 | "\n t List" \ | 3957 | "\n t List" \ |
3958 | "\nArchive format selection:" \ | 3958 | "\nArchive format selection:" \ |
3959 | USE_FEATURE_TAR_GZIP( \ | 3959 | USE_FEATURE_SEAMLESS_GZ( \ |
3960 | "\n z Filter the archive through gzip" \ | 3960 | "\n z Filter the archive through gzip" \ |
3961 | ) \ | 3961 | ) \ |
3962 | USE_FEATURE_TAR_BZIP2( \ | 3962 | USE_FEATURE_SEAMLESS_BZ2( \ |
3963 | "\n j Filter the archive through bzip2" \ | 3963 | "\n j Filter the archive through bzip2" \ |
3964 | ) \ | 3964 | ) \ |
3965 | USE_FEATURE_TAR_LZMA( \ | 3965 | USE_FEATURE_SEAMLESS_LZMA( \ |
3966 | "\n a Filter the archive through lzma" \ | 3966 | "\n a Filter the archive through lzma" \ |
3967 | ) \ | 3967 | ) \ |
3968 | USE_FEATURE_TAR_COMPRESS( \ | 3968 | USE_FEATURE_SEAMLESS_Z( \ |
3969 | "\n Z Filter the archive through compress" \ | 3969 | "\n Z Filter the archive through compress" \ |
3970 | ) \ | 3970 | ) \ |
3971 | "\nFile selection:" \ | 3971 | "\nFile selection:" \ |