From 2a685b05f91f71c3b00ee8890ebaed16839b0cd0 Mon Sep 17 00:00:00 2001 From: Ignazio Sgalmuzzo Date: Mon, 17 Feb 2014 22:21:31 +0000 Subject: libstore: replaced gz decompression code with libz Note: dropped .zip support configure.ac: added check for libz ext2fs/Makefile: linked libz fatfs/Makefile: linked libz isofs/Makefile: linked libz libstore/Makefile: linked libz libstore/do-gunzip.c: new decompression function using libz calls. libstore/gunzip.c: removed no longer needed code replaced by do_gunzip() libstore/gzip.h: deleted, no longer needed libstore/inflate.c: deleted: no longer needed libstore/tailor.h: deleted: no longer needed libstore/unzip.c: deleted: no longer needed libstore/util.c: removed no longer needed code. --- libstore/gunzip.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'libstore/gunzip.c') diff --git a/libstore/gunzip.c b/libstore/gunzip.c index 7c449403..f47c0b2b 100644 --- a/libstore/gunzip.c +++ b/libstore/gunzip.c @@ -18,35 +18,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#include -#include -#include -#include +#include -#include "store.h" - -/* gzip.h makes several annoying defines & decls, which we have to work - around. */ -#define file_t gzip_file_t -#include "gzip.h" -#undef file_t -#undef head +extern void do_gunzip (void); /* Entry point to gunzip engine. */ static error_t DO_UNZIP (void) { - /* Entry points to unzip engine. */ - int get_method (int); - extern long int bytes_out; - - if (get_method (0) != 0) - /* Not a happy gzip file. */ - return EINVAL; - - /* Matched gzip magic number. Ready to unzip. - Set up the output stream and let 'er rip. */ - bytes_out = 0; - unzip (17, 23); /* Arguments ignored. */ + do_gunzip (); return 0; } -- cgit v1.2.3