diff options
author | Glenn L McGrath | 2001-06-20 07:48:00 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-06-20 07:48:00 +0000 |
commit | eb1c94078f35d1b6e48741122c8bb9426befc5eb (patch) | |
tree | 48535c1f250f98707e595cfb83f47c83332c4fc9 /libbb/get_tar_gz_headers.c | |
parent | b4a26e6fc09e9dd14ca206f8d9ed2c6e8976df1b (diff) | |
download | busybox-eb1c94078f35d1b6e48741122c8bb9426befc5eb.zip busybox-eb1c94078f35d1b6e48741122c8bb9426befc5eb.tar.gz |
Reorganise unarchiving functions, more code re-use, only does single pass(no more linked lists), basis for supporting a cpio (and cheaper untar) applet, but cpio applet isnt included in this.
It effects ar, dpkg-deb applets only
Diffstat (limited to 'libbb/get_tar_gz_headers.c')
-rw-r--r-- | libbb/get_tar_gz_headers.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/libbb/get_tar_gz_headers.c b/libbb/get_tar_gz_headers.c deleted file mode 100644 index fb9b7b6..0000000 --- a/libbb/get_tar_gz_headers.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#include <stdio.h> -#include <unistd.h> -#include "libbb.h" - -file_headers_t *get_tar_gz_headers(FILE *compressed_stream) -{ - FILE *uncompressed_stream; - file_headers_t *tar_headers_tree; - int gunzip_pid; - int gz_fd ; - - /* open a stream of decompressed data */ - gz_fd = gz_open(compressed_stream, &gunzip_pid); - if (gz_fd == -1) { - error_msg("Couldnt initialise gzip stream"); - } - uncompressed_stream = fdopen(gz_fd, "r"); - tar_headers_tree = get_tar_headers(uncompressed_stream); - fclose(uncompressed_stream); - close(gz_fd); - gz_close(gunzip_pid); - - return(tar_headers_tree); -}
\ No newline at end of file |