diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 13:05:39 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 13:05:39 +0000 |
commit | c14d39e83a7f55ab9b92e98673a281fd6565c32d (patch) | |
tree | f1cfe7f071b228cf7f1a732046cabf18fa9421b8 /archival/libunarchive | |
parent | def8260219797b0f9f734915f4918f34e85e7049 (diff) | |
download | busybox-w32-c14d39e83a7f55ab9b92e98673a281fd6565c32d.tar.gz busybox-w32-c14d39e83a7f55ab9b92e98673a281fd6565c32d.tar.bz2 busybox-w32-c14d39e83a7f55ab9b92e98673a281fd6565c32d.zip |
rmp: add optional support for bz2 data. +50 bytes of code
Diffstat (limited to 'archival/libunarchive')
-rw-r--r-- | archival/libunarchive/decompress_bunzip2.c | 4 | ||||
-rw-r--r-- | archival/libunarchive/decompress_unlzma.c | 2 | ||||
-rw-r--r-- | archival/libunarchive/decompress_unzip.c | 4 | ||||
-rw-r--r-- | archival/libunarchive/get_header_tar_bz2.c | 2 | ||||
-rw-r--r-- | archival/libunarchive/get_header_tar_gz.c | 2 | ||||
-rw-r--r-- | archival/libunarchive/get_header_tar_lzma.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c index a9d5d686b..fe1d3ff1c 100644 --- a/archival/libunarchive/decompress_bunzip2.c +++ b/archival/libunarchive/decompress_bunzip2.c | |||
@@ -700,7 +700,7 @@ void dealloc_bunzip(bunzip_data *bd) | |||
700 | /* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */ | 700 | /* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */ |
701 | 701 | ||
702 | USE_DESKTOP(long long) int | 702 | USE_DESKTOP(long long) int |
703 | uncompressStream(int src_fd, int dst_fd) | 703 | unpack_bz2_stream(int src_fd, int dst_fd) |
704 | { | 704 | { |
705 | USE_DESKTOP(long long total_written = 0;) | 705 | USE_DESKTOP(long long total_written = 0;) |
706 | char *outbuf; | 706 | char *outbuf; |
@@ -751,7 +751,7 @@ static char *const bunzip_errors[] = { | |||
751 | /* Dumb little test thing, decompress stdin to stdout */ | 751 | /* Dumb little test thing, decompress stdin to stdout */ |
752 | int main(int argc, char **argv) | 752 | int main(int argc, char **argv) |
753 | { | 753 | { |
754 | int i = uncompressStream(0, 1); | 754 | int i = unpack_bz2_stream(0, 1); |
755 | char c; | 755 | char c; |
756 | 756 | ||
757 | if (i < 0) | 757 | if (i < 0) |
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c index 15a0275b4..907e44e94 100644 --- a/archival/libunarchive/decompress_unlzma.c +++ b/archival/libunarchive/decompress_unlzma.c | |||
@@ -228,7 +228,7 @@ enum { | |||
228 | 228 | ||
229 | 229 | ||
230 | USE_DESKTOP(long long) int | 230 | USE_DESKTOP(long long) int |
231 | unlzma(int src_fd, int dst_fd) | 231 | unpack_lzma_stream(int src_fd, int dst_fd) |
232 | { | 232 | { |
233 | USE_DESKTOP(long long total_written = 0;) | 233 | USE_DESKTOP(long long total_written = 0;) |
234 | lzma_header_t header; | 234 | lzma_header_t header; |
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 19ce5097a..c698763d3 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c | |||
@@ -981,7 +981,7 @@ static int inflate_get_next_window(STATE_PARAM_ONLY) | |||
981 | } | 981 | } |
982 | 982 | ||
983 | 983 | ||
984 | /* Called from inflate_gunzip() and inflate_unzip() */ | 984 | /* Called from unpack_gz_stream() and inflate_unzip() */ |
985 | /* NB: bytebuffer is allocated here but freeing it is left to the caller! */ | 985 | /* NB: bytebuffer is allocated here but freeing it is left to the caller! */ |
986 | static USE_DESKTOP(long long) int | 986 | static USE_DESKTOP(long long) int |
987 | inflate_unzip_internal(STATE_PARAM int in, int out) | 987 | inflate_unzip_internal(STATE_PARAM int in, int out) |
@@ -1056,7 +1056,7 @@ inflate_unzip(inflate_unzip_result *res, unsigned bufsize, int in, int out) | |||
1056 | 1056 | ||
1057 | 1057 | ||
1058 | USE_DESKTOP(long long) int | 1058 | USE_DESKTOP(long long) int |
1059 | inflate_gunzip(int in, int out) | 1059 | unpack_gz_stream(int in, int out) |
1060 | { | 1060 | { |
1061 | uint32_t stored_crc = 0; | 1061 | uint32_t stored_crc = 0; |
1062 | unsigned count; | 1062 | unsigned count; |
diff --git a/archival/libunarchive/get_header_tar_bz2.c b/archival/libunarchive/get_header_tar_bz2.c index d8715c0bb..e11f44cad 100644 --- a/archival/libunarchive/get_header_tar_bz2.c +++ b/archival/libunarchive/get_header_tar_bz2.c | |||
@@ -11,7 +11,7 @@ char get_header_tar_bz2(archive_handle_t *archive_handle) | |||
11 | /* Can't lseek over pipes */ | 11 | /* Can't lseek over pipes */ |
12 | archive_handle->seek = seek_by_read; | 12 | archive_handle->seek = seek_by_read; |
13 | 13 | ||
14 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, uncompressStream); | 14 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, unpack_bz2_stream); |
15 | archive_handle->offset = 0; | 15 | archive_handle->offset = 0; |
16 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; | 16 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; |
17 | 17 | ||
diff --git a/archival/libunarchive/get_header_tar_gz.c b/archival/libunarchive/get_header_tar_gz.c index 69126e0ba..85070d978 100644 --- a/archival/libunarchive/get_header_tar_gz.c +++ b/archival/libunarchive/get_header_tar_gz.c | |||
@@ -20,7 +20,7 @@ char get_header_tar_gz(archive_handle_t *archive_handle) | |||
20 | 20 | ||
21 | check_header_gzip_or_die(archive_handle->src_fd); | 21 | check_header_gzip_or_die(archive_handle->src_fd); |
22 | 22 | ||
23 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip); | 23 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, unpack_gz_stream); |
24 | archive_handle->offset = 0; | 24 | archive_handle->offset = 0; |
25 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; | 25 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; |
26 | 26 | ||
diff --git a/archival/libunarchive/get_header_tar_lzma.c b/archival/libunarchive/get_header_tar_lzma.c index 5c02767de..771f664f2 100644 --- a/archival/libunarchive/get_header_tar_lzma.c +++ b/archival/libunarchive/get_header_tar_lzma.c | |||
@@ -14,7 +14,7 @@ char get_header_tar_lzma(archive_handle_t * archive_handle) | |||
14 | /* Can't lseek over pipes */ | 14 | /* Can't lseek over pipes */ |
15 | archive_handle->seek = seek_by_read; | 15 | archive_handle->seek = seek_by_read; |
16 | 16 | ||
17 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, unlzma); | 17 | archive_handle->src_fd = open_transformer(archive_handle->src_fd, unpack_lzma_stream); |
18 | archive_handle->offset = 0; | 18 | archive_handle->offset = 0; |
19 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; | 19 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) /**/; |
20 | 20 | ||