X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=unzip.c;h=6ec5bd674725f4b8fbcadd879bd4126071dba558;hb=975508caa09d733099498ff9f7b8079cd71d7109;hp=c481a896ef32ba792eb017fc3360847330c684ba;hpb=70b787436ae3f40de5046676b97c0d621715f4f2;p=debian%2Fgzip diff --git a/unzip.c b/unzip.c index c481a89..6ec5bd6 100644 --- a/unzip.c +++ b/unzip.c @@ -1,6 +1,6 @@ /* unzip.c -- decompress files in gzip or pkzip format. - Copyright (C) 1997-1999, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997-1999, 2009-2018 Free Software Foundation, Inc. Copyright (C) 1992-1993 Jean-loup Gailly This program is free software; you can redistribute it and/or modify @@ -31,7 +31,6 @@ #include #include "tailor.h" #include "gzip.h" -#include "crypt.h" /* PKZIP header definitions */ #define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */ @@ -52,10 +51,9 @@ /* Globals */ -int decrypt; /* flag to turn on decryption */ -char *key; /* not used--needed to link crypt.c */ -int pkzip = 0; /* set for a pkzip file */ -int ext_header = 0; /* set if extended local header */ +static int decrypt; /* flag to turn on decryption */ +static int pkzip = 0; /* set for a pkzip file */ +static int ext_header = 0; /* set if extended local header */ /* =========================================================================== * Check zip file and advance inptr to the start of the compressed data. @@ -98,7 +96,7 @@ int check_zipfile(in) ext_header = (h[LOCFLG] & EXTFLG) != 0; pkzip = 1; - /* Get ofname and time stamp from local header (to be done) */ + /* Get ofname and timestamp from local header (to be done) */ return OK; } @@ -145,7 +143,7 @@ int unzip(in, out) if (n != LG(inbuf + LOCSIZ) - (decrypt ? RAND_HEAD_LEN : 0)) { - fprintf(stderr, "len %ld, siz %ld\n", n, LG(inbuf + LOCSIZ)); + fprintf(stderr, "len %lu, siz %lu\n", n, LG(inbuf + LOCSIZ)); gzip_error ("invalid compressed data--length mismatch"); } while (n--) {