Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/History.600  view on Meta::CPAN

    "global" variable G._wsize [Chr. Spieler]
 - unzpriv.h: use fputs() instead of fprintf() as output function in the
    FUNZIP variant of the Info() macro, to prevent misinterpreting format
    specifiers in the sprintf() output. [Martin Pitt, ubuntu]
 - unix/unix.c: added detailed compiler version info for SunPro cc, HP cc,
    DEC cc. [Steven M. Schweda]
 - vms/descrip.mms: added support for architecture detection macro symbols
    built into newer versions of MMK (a MMS clone).  [Steven M. Schweda]
 - fileio.c - is_vms_varlen_txt(): commented out the currently unused code for
    determining the VMS fileorg setting. [Steven M. Schweda]
 - extract.c - extract_or_test_files(): the "back at endsig" checking code
    is not used for the SFX stub. [Steven M. Schweda]
 - win32: changed all Win32-API calls with string parameters to explicitely use
    the ANSI variant; this removes the dependency on the UNICODE and _UNICODE
    compile flags being undefined.  [NN, Chr. Spieler]
 - zipinfo.c: on WIN32, archive filename display must be fed through codepage
    translation. [Chr. Spieler]
 - zipinfo.c - zipinfo(): repaired several memory leaks when the listing loop
    is stopped prematurely because of inner errors. [Chr. Spieler]
 - crc32.c, crc32.h, crc_i386.S, crc_i386.asm, crc_i386.c: comprehensive
    revision of crc32 calculation, implementing the optimized algorithms from

unzip-6.0/extract.c  view on Meta::CPAN

int extract_or_test_files(__G)    /* return PK-type error code */
     __GDEF
{
    unsigned i, j;
    zoff_t cd_bufstart;
    uch *cd_inptr;
    int cd_incnt;
    ulg filnum=0L, blknum=0L;
    int reached_end;
#ifndef SFX
    int no_endsig_found;
#endif
    int error, error_in_archive=PK_COOL;
    int *fn_matched=NULL, *xn_matched=NULL;
    zucn_t members_processed;
    ulg num_skipped=0L, num_bad_pwd=0L;
    zoff_t old_extra_bytes = 0L;
#ifdef SET_DIR_ATTRIB
    unsigned num_dirs=0;
    direntry *dirlist=(direntry *)NULL, **sorted_dirlist=(direntry **)NULL;
#endif

unzip-6.0/extract.c  view on Meta::CPAN

    Begin main loop over blocks of member files.  We know the entire central
    directory is on this disk:  we would not have any of this information un-
    less the end-of-central-directory record was on this disk, and we would
    not have gotten to this routine unless this is also the disk on which
    the central directory starts.  In practice, this had better be the ONLY
    disk in the archive, but we'll add multi-disk support soon.
  ---------------------------------------------------------------------------*/

    members_processed = 0;
#ifndef SFX
    no_endsig_found = FALSE;
#endif
    reached_end = FALSE;
    while (!reached_end) {
        j = 0;
#ifdef AMIGA
        memzero(G.filenotes, DIR_BLKSIZ * sizeof(char *));
#endif

        /*
         * Loop through files in central directory, storing offsets, file

unzip-6.0/extract.c  view on Meta::CPAN

                /* no new central directory entry
                 * -> is the number of processed entries compatible with the
                 *    number of entries as stored in the end_central record?
                 */
                if ((members_processed
                     & (G.ecrec.have_ecr64 ? MASK_ZUCN64 : MASK_ZUCN16))
                    == G.ecrec.total_entries_central_dir) {
#ifndef SFX
                    /* yes, so look if we ARE back at the end_central record
                     */
                    no_endsig_found =
                      ( (memcmp(G.sig,
                                (G.ecrec.have_ecr64 ?
                                 end_central64_sig : end_central_sig),
                                4) != 0)
                       && (!G.ecrec.is_zip64_archive)
                       && (memcmp(G.sig, end_central_sig, 4) != 0)
                      );
#endif /* !SFX */
                } else {
                    /* no; we have found an error in the central directory

unzip-6.0/extract.c  view on Meta::CPAN

        return error_in_archive;

/*---------------------------------------------------------------------------
    Double-check that we're back at the end-of-central-directory record, and
    print quick summary of results, if we were just testing the archive.  We
    send the summary to stdout so that people doing the testing in the back-
    ground and redirecting to a file can just do a "tail" on the output file.
  ---------------------------------------------------------------------------*/

#ifndef SFX
    if (no_endsig_found) {                      /* just to make sure */
        Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
        Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
        if (!error_in_archive)       /* don't overwrite stronger error */
            error_in_archive = PK_WARN;
    }
#endif /* !SFX */
    if (uO.tflag) {
        ulg num = filnum - num_bad_pwd;

        if (uO.qflag < 2) {        /* GRR 930710:  was (uO.qflag == 1) */

unzip-6.0/unzip.c  view on Meta::CPAN

{
#ifndef NO_ZIPINFO
    char *p;
#endif
#if (defined(DOS_FLX_H68_NLM_OS2_W32) || !defined(SFX))
    int i;
#endif
    int retcode, error=FALSE;
#ifndef NO_EXCEPT_SIGNALS
#ifdef REENTRANT
    savsigs_info *oldsighandlers = NULL;
#   define SET_SIGHANDLER(sigtype, newsighandler) \
      if ((retcode = setsignalhandler(__G__ &oldsighandlers, (sigtype), \
                                      (newsighandler))) > PK_WARN) \
          goto cleanup_and_exit
#else
#   define SET_SIGHANDLER(sigtype, newsighandler) \
      signal((sigtype), (newsighandler))
#endif
#endif /* NO_EXCEPT_SIGNALS */

    /* initialize international char support to the current environment */
    SETLOCALE(LC_CTYPE, "");

unzip-6.0/unzip.c  view on Meta::CPAN


/*---------------------------------------------------------------------------
    Okey dokey, we have everything we need to get started.  Let's roll.
  ---------------------------------------------------------------------------*/

    retcode = process_zipfiles(__G);

cleanup_and_exit:
#if (defined(REENTRANT) && !defined(NO_EXCEPT_SIGNALS))
    /* restore all signal handlers back to their state at function entry */
    while (oldsighandlers != NULL) {
        savsigs_info *thissigsav = oldsighandlers;

        signal(thissigsav->sigtype, thissigsav->sighandler);
        oldsighandlers = thissigsav->previous;
        free(thissigsav);
    }
#endif
#if (defined(MALLOC_WORK) && !defined(REENTRANT))
    if (G.area.Slide != (uch *)NULL) {
        free(G.area.Slide);
        G.area.Slide = (uch *)NULL;
    }
#endif
#if (defined(MSDOS) && !defined(SFX) && !defined(WINDLL))



( run in 1.219 second using v1.01-cache-2.11-cpan-5511b514fd6 )