&z UNZIP.BCKX UNZIP.BCK<BACKUP/INTER/BLOCK=8192 [UNZIP542...]*.*; RDS:UNZIP.BCK/SAVE GOATHUNTER e%ZbV7.2 _CAESAR:: _$1$VDA0: V7.2  *[UNZIP542]ACORN.DIR;1+, ./ 4- 0123 KPWO569#!a79#!a89GHJIACORN.C  CONTENTS.  GMAKEFILE.  MAKEFILE. README. RISCOS.C RISCOS.H  RUNME1ST.  SRCRENAME.'SWIVEN.H8SWIVEN.S{*[UNZIP542.ACORN]ACORN.C;1+, .B/ 4BB- 0@123KPWOC56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- acorn.c RISCOS-specific routines for use with Info-ZIP's UnZip 5.2 and later. Contains: do_wild() <-- generic enough to put in fileio.c? mapattr() mapname() checkdir() mkdir() isRISCOSexfield() setRISCOSexfield() printRISCOSexfield() close_outfile() stamp_file() version() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "^.unzip.h" #include "riscos.h" #define FTYPE_FFF (1<<17) /* set filetype to &FFF when extracting */ static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ static int has_mimemap = -1; /* used in mimemap() */ extern int mkdir(const char *path, int mode); static int has_NFS_ext(const char *name); static int uxtime2acornftime(unsigned *pexadr, unsigned *pldadr, time_t ut); static int mimemap(const char *name); #ifndef SFX /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = (ZCONST char *)strrchr(wildspec, '.')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { if (file->d_name[0] == '/' && wildname[0] != '/') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == case sens. */ if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } closedir(wild_dir); /* have read at least one dir entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**************************/ /* Function has_NFS_ext() */ /**************************/ static int has_NFS_ext(const char* name) { int i = strlen(name) - 4; return (i >= 0 && name[i] == ',' && (i > 0 || name[i-1]=='/') && isxdigit(name[i+1]) && isxdigit(name[i+2]) && isxdigit(name[i+3])); } /* end function has_NFS_ext() */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); break; case THEOS_: tmp &= 0xF1FFFFFFL; if ((tmp & 0xF0000000L) != 0x40000000L) tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ else tmp &= 0x41FFFFFFL; /* leave directory bit as set */ /* fall through! */ case ACORN_: case UNIX_: case VMS_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { br0 g UNZIP.BCK  [UNZIP542.ACORN]ACORN.C;1B-eak; } else { /* Some (non-Info-ZIP) implementations of Zip for Unix and VMS (and probably others ??) leave 0 in the upper 16-bit part of the external_file_attributes field. Instead, they store file permission attributes in some extra field. As a work-around, we search for the presence of one of these extra fields and fall back to the MSDOS compatible part of external_file_attributes if one of the known e.f. types has been detected. Later, we might implement extraction of the permission bits from the VMS extra field. But for now, the work-around should be sufficient to provide "readable" extracted files. (For ASI Unix e.f., an experimental remap of the e.f. mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; int r = FALSE; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { G.pInfo->file_attr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!r) break; } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the * Unix attributes in the upper 16 bits of the external attributes * field, just like Info-ZIP's Zip for Unix. We try to use that * value, after a check for consistency with the MSDOS attribute * bits (see below). */ G.pInfo->file_attr = (unsigned)(tmp >> 16); /* fall through! */ case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: /* Ensure that DOS subdir bit is set when the entry's name ends * in a '/'. Some third-party Zip programs fail to set the subdir * bit for directory entries. */ if ((tmp | 0x10) == 0) { extent fnlen = strlen(G.filename); if (fnlen > 0 && G.filename[fnlen-1] == '/') tmp |= 0x10; } /* read-only bit --> write perms; subdir bit --> dir exec bit */ tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) /* keep previous G.pInfo->file_attr setting, when its "owner" * part appears to be consistent with DOS attribute flags! */ break; G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); break; } /* end switch (host-OS-created-by) */ G.pInfo->file_attr&=0xFFFF; G.pInfo->file_attr|=(0xFFDu<<20); if (has_NFS_ext(G.filename)) { int ftype=strtol(G.filename+strlen(G.filename)-3,NULL,16)&0xFFF; G.pInfo->file_attr = (G.pInfo->file_attr & 0x000FFFFF) | (ftype<<20); } else { int type = mimemap(G.filename); if (type == -1) type = (G.crec.internal_file_attributes & 1) ? 0xFFF : 0xFFD; G.pInfo->file_attr = (G.pInfo->file_attr & 0x000FFFFF) | (type<<20); } return 0; } /* end function mapattr() */ /************************/ /* Function mimemap() */ /************************/ static int mimemap(const char *name) { const char *ext = name; int type; if (has_mimemap < 0) has_mimemap = !(SWI_OS_CLI("%RMEnsure MimeMap 0.05 RMLoad System:Modules.MimeMap") || SWI_OS_CLI("%RMEnsure MimeMap 0.05")); if (!has_mimemap) return -1; /* no MimeMap module; fall back on text flag test */ do { while (*ext && *ext!='.') ext++; if (!*ext) return -1; /* no suitable extension; fallback */ type = SWI_MimeMap_Translate(ext++); } while (type == -1); return type; } /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ char *checkswap=NULL; /* pointer the the extension to check or NULL */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in RISCOS */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } eKl UNZIP.BCK  [UNZIP542.ACORN]ACORN.C;1BRlse switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ checkswap=NULL; /* reset checking when starting a new leafname */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; *pp++ = ';'; /* keep for now; remove VMS ";##" */ break; /* later, if requested */ case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; case ' ': /* change spaces to hard-spaces */ *pp++ = 160; /* (ISO 8859-1 Latin-1 codepage) */ break; case ':': /* change ':' to '' (vertical broken bar) */ *pp++ = '\xA6'; /* (position 166 in ISO 8859-1 code table) */ break; case '&': /* change '&' to 'E' */ *pp++ = 'E'; break; case '@': /* change '@' to 'A' */ *pp++ = 'A'; break; case '.': *pp++ = '/'; checkswap=pp; break; default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } if (checkswap!=NULL) { if (checkext(checkswap)) { if ((error = checkdir(__G__ checkswap, APPEND_DIR)) > 1) return error; *(checkswap-1)=0; /* remove extension from pathcomp */ } } if (!uO.acorn_nfs_ext && has_NFS_ext(pathcomp)) { /* remove the filetype extension unless requested otherwise */ /* the filetype should be already set by mapattr() */ pathcomp[strlen(pathcomp)-4]=0; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); fflush(stderr); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '.'; /************* was '/' *************/ *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*-------=w UNZIP.BCK  [UNZIP542.ACORN]ACORN.C;1B,-------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { char *tmproot; if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == '.') { /****** was '/' ********/ tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) { /* path does not exist */ if (!G.create_dirs /* || isshexp(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (mkdir(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } tmproot[rootlen++] = '.'; /*********** was '/' *************/ tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /********************/ /* Function mkdir() */ /********************/ int mkdir(path, mode) const char *path; int mode; /* ignored */ /* * returns: 0 - successful * -1 - failed (errno not set, however) */ { return (SWI_OS_File_8((char *)path) == NULL)? 0 : -1; } /*********************************/ /* extra_field-related functions */ /*********************************/ int isRISCOSexfield(void *extra_field) { if (extra_field!=NULL) { extra_block *block=(extra_block *)extra_field; return (block->ID==EF_SPARK && (block->size==24 || block->size==20) && block->ID_2==SPARKID_2); } else return FALSE; } void setRISCOSexfield(char *path, void *extra_field) { if (extra_field!=NULL) { extra_block *block=(extra_block *)extra_field; SWI_OS_File_1(path,block->loadaddr,block->execaddr,block->attr); } } void printRISCOSexfield(int isdir, void *extra_field) { extra_block *block=(extra_block *)extra_field; printf("\n This file has RISC OS file informations in the local extra field.\n"); if (isdir) { /* I prefer not to print this string... should change later... */ /* printf(" The file is a directory.\n");*/ } else if ((block->loadaddr & 0xFFF00000) != 0xFFF00000) { printf(" Load address: %.8X\n",block->loadaddr); printf(" Exec address: %.8X\n",block->execaddr); } else { /************* should change this to use OS_FSControl 18 to get filetype string ************/ char tmpstr[16]; char ftypestr[32]; int flen; sprintf(tmpstr,"File$Type_%03x",(block->loadaddr & 0x000FFF00) >> 8); if (SWI_OS_ReadVarVal(tmpstr,ftypestr,32,&flen)==NULL) { ftypestr[flen]=0; printf(" Filetype: %s (&%.3X)\n",ftypestr,(block->loadaddr & 0x000FFF00) >> 8); } else { printf(" Filetype: &%.3X\n",(block->loadaddr & 0x000FFF00) >> 8); } } printf(" Access: "); if (block->attr & (1<<3)) printf("L"); if (block->attr & (1<<0)) printf("W"); if (block->attr & (1<<1)) printf("R"); printf("/"); if (block->attr & (1<<4)) printf("w"); if (block->attr & (1<<5)) prin > UNZIP.BCK  [UNZIP542.ACORN]ACORN.C;1B!;tf("r"); printf("\n\n"); } /**********************************************/ /* internal help function for time conversion */ /**********************************************/ static int uxtime2acornftime(unsigned *pexadr, unsigned *pldadr, time_t ut) { unsigned timlo; /* 3 lower bytes of acorn file-time plus carry byte */ unsigned timhi; /* 2 high bytes of acorn file-time */ timlo = ((unsigned)ut & 0x00ffffffU) * 100 + 0x00996a00U; timhi = ((unsigned)ut >> 24); timhi = timhi * 100 + 0x0000336eU + (timlo >> 24); if (timhi & 0xffff0000U) return 1; /* calculation overflow, do not change time */ /* insert the five time bytes into loadaddr and execaddr variables */ *pexadr = (timlo & 0x00ffffffU) | ((timhi & 0x000000ffU) << 24); *pldadr = (*pldadr & 0xffffff00U) | ((timhi >> 8) & 0x000000ffU); return 0; /* subject to future extension to signal overflow */ } /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF { fclose(G.outfile); if (isRISCOSexfield(G.extra_field)) { setRISCOSexfield(G.filename, G.extra_field); } else { unsigned int loadaddr, execaddr; int attr; int mode=G.pInfo->file_attr&0xffff; /* chmod equivalent mode */ time_t m_time; #ifdef USE_EF_UT_TIME iztimes z_utime; #endif #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", z_utime.mtime)); m_time = z_utime.mtime; } else #endif /* USE_EF_UT_TIME */ m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime); /* set the file's modification time */ SWI_OS_File_5(G.filename, NULL, &loadaddr, NULL, NULL, &attr); uxtime2acornftime(&execaddr, &loadaddr, m_time); loadaddr = (loadaddr & 0xfff000ffU) | ((G.pInfo->file_attr&0xfff00000) >> 12); attr=(attr&0xffffff00) | ((mode&0400) >> 8) | ((mode&0200) >> 6) | ((mode&0004) << 2) | ((mode&0002) << 4); SWI_OS_File_1(G.filename, loadaddr, execaddr, attr); } } /* end function close_outfile() */ #ifdef TIMESTAMP /***************************/ /* Function stamp_file() */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { unsigned int loadaddr, execaddr; int attr; /* set the file's modification time */ if (SWI_OS_File_5((char *)fname, NULL, &loadaddr, NULL, NULL, &attr) != NULL) return -1; if (uxtime2acornftime(&execaddr, &loadaddr, modtime) != 0) return -1; return (SWI_OS_File_1((char *)fname, loadaddr, execaddr, attr) == NULL) ? 0 : -1; } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __GNUC__ "gcc ", __VERSION__, #else # ifdef __CC_NORCROFT "Norcroft ", "cc", # else "cc", "", # endif #endif "RISC OS", " (Acorn Computers Ltd)", #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */ a*[UNZIP542.ACORN]CONTENTS.;1+, ./ 4v- 0@123KPWO56P˃7P˃89GHJContents of the "acorn" subdirectory for UnZip 5.4 and later: acorn.c.acorn Acorn-specific resources acorn.c.riscos mainly file-handling routines for FileCore-based filesystems acorn.Contents this file acorn.GMakeFile Makefile for gcc 2.7.2.1 acorn.h.riscos acorn.h.swiven acorn.makefile Makefile script for default Acorn C compiler acorn.README notes about Acorn-specific features acorn.RunMe1st Obey file to move files into suitable place for compilation on RISC OS machines acorn.s.swiven SWI veneers acorn.srcrename small executable that converts files from Unix style to RISC OS style, used by RunMe1st Notes: Use the "RunMe1st" file (it is an Obey file) to convert all the files from "filename/[chs]" to "[chs].filename" (so that UnZip could be easily compiled under RISC OS). It will also set the correct makefile. To compile just set the CSD to the main UnZip directory and run 'amu'. Currently only the Acorn C V5 compiler has been tested but probably also Acorn C V4 and the Acorn Assembler V2 will be able to compile UnZip. *[UNZIP542.ACORN]GMAKEFILE.;1+, . / 4 - 0@123KPWO 56{? 7{? 89GHJ# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.2 or later) CC = gcc BIND = drlink AS = $(CC) -c ASM = as SQUEEZE = squeeze -v E = # flags # CFLAGS flags for C compile # LFLAGS1 flags after output file spec, before obj file list # LFLAGS2 flags after obj file list (libraries, etc) # LIB = CFLAGS = -O2 -mstubs -mthrowback CFLAGS = $(CFLAGS) ASMFLAGS = -throwback -objasm -upper LFLAGS1 = LFLAGS2 = $(LIB) C:o.stubs gcc:o.libgcc # object file lists OBJS1 = o.unzip o.crc32 o.crctab o.crypt o.envargs o.explode OBJS2 = o.extract o.fileio o.globals o.inflate o.list o.match OBJS3 = o.process o.ttyio o.unreduce o.unshrink o.zipinfo OBJS = $(OBJS1) $(OBJS2) $(OBJS3) o.riscos o.swiven o.acorn OBJF = o.funzip o.crc32 o.crypt_ o.globals_ o.inflate_ o.ttyio_ \ o.riscos o.swiven OBJX = o.unzipsfx o.crc32 o.crctab o.crypt o.extract_ o.fileio o.globals \ o.inflate o.match o.process_ o.ttyio o.acorn_ o.swiven o.riscos_ UNZIP_H = h.unzip h.unzpriv h.globals acorn.h.riscos acorn.h.swiven all: unzip funzip unzipsfx install: unzip funzip unzipsfx $(SQUEEZE) unzip %.unzip $(SQUEEZE) funzip %.funzip $(SQUEEZE) unzipsfx unzipsfx copy %.unzip %.zipinfo ~CVF # rules for unzip and funzip o.crc32: c.crc32 $(UNZIP_H) h.zip $(CC) $(CFLAGS) -c c.crc32 -o o.crc32 o.crctab: c.crctab $(UNZIP_H) h.zip $(CC) $(CFLAGS) -c c.crctab -o o.crctab o.crypt: c.crypt $(UNZIP_H) h.zip h.crypt h.ttyio $(CC) $(CFLAGS) -c c.crypt -o o.crypt o.envargs: c.envargs $(UNZIP_H) $(CC) $(CFLAGS) -c c.envargs -o o.Q UNZIP.BCK  [UNZIP542.ACORN]GMAKEFILE.;1 ` envargs o.explode: c.explode $(UNZIP_H) $(CC) $(CFLAGS) -c c.explode -o o.explode o.extract: c.extract $(UNZIP_H) h.crypt $(CC) $(CFLAGS) -c c.extract -o o.extract o.fileio: c.fileio $(UNZIP_H) h.crypt h.ttyio h.ebcdic $(CC) $(CFLAGS) -c c.fileio -o o.fileio o.funzip: c.funzip $(UNZIP_H) h.crypt h.ttyio h.tables $(CC) $(CFLAGS) -c c.funzip -o o.funzip o.globals: c.globals $(UNZIP_H) $(CC) $(CFLAGS) -c c.globals -o o.globals o.inflate: c.inflate h.inflate $(UNZIP_H) $(CC) $(CFLAGS) -c c.inflate -o o.inflate o.list: c.list $(UNZIP_H) $(CC) $(CFLAGS) -c c.list -o o.list o.match: c.match $(UNZIP_H) $(CC) $(CFLAGS) -c c.match -o o.match o.process: c.process $(UNZIP_H) $(CC) $(CFLAGS) -c c.process -o o.process o.ttyio: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio $(CC) $(CFLAGS) -c c.ttyio -o o.ttyio o.unreduce: c.unreduce $(UNZIP_H) $(CC) $(CFLAGS) -c c.unreduce -o o.unreduce o.unshrink: c.unshrink $(UNZIP_H) $(CC) $(CFLAGS) -c c.unshrink -o o.unshrink o.unzip: c.unzip $(UNZIP_H) h.crypt h.version h.consts $(CC) $(CFLAGS) -c c.unzip -o o.unzip o.zipinfo: c.zipinfo $(UNZIP_H) $(CC) $(CFLAGS) -c c.zipinfo -o o.zipinfo o.crypt_: c.crypt $(UNZIP_H) h.zip h.crypt h.ttyio $(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.crypt_ o.extract_: c.extract $(UNZIP_H) h.crypt $(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_ o.globals_: c.globals $(UNZIP_H) $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globals_ o.inflate_: c.inflate h.inflate $(UNZIP_H) h.crypt $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflate_ o.process_: c.process $(UNZIP_H) $(CC) $(CFLAGS) -DSFX -c c.process -o o.process_ o.ttyio_: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyio_ o.unzipsfx: c.unzip $(UNZIP_H) h.crypt h.version h.consts $(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx o.acorn: acorn.c.acorn $(UNZIP_H) $(CC) $(CFLAGS) -I@ -c acorn.c.acorn o.acorn_: acorn.c.acorn $(UNZIP_H) $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.acorn_ acorn.c.acorn o.riscos: acorn.c.riscos $(UNZIP_H) $(CC) $(CFLAGS) -I@ -c acorn.c.riscos o.riscos_: acorn.c.riscos $(UNZIP_H) $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.riscos_ acorn.c.riscos o.swiven: acorn.s.swiven $(ASM) $(ASMFLAGS) acorn.s.swiven -o o.swiven unzip: $(OBJS) $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2) funzip: $(OBJF) $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2) unzipsfx: $(OBJX) $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2) clean: ;remove unzip; remove funzip; remove zipinfo; remove unzipsfx; create o.!fake! 0 wipe o.* ~cf # end of Makefile *[UNZIP542.ACORN]MAKEFILE.;1+, ./ 4c- 0@123KPWO 56Y{7Y{89GHJ# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.41 or later) # last modified: 27 Oct 1999 # add -g to CC to debug # add -d to BIND to debug CC = cc BIND = link AS = $(CC) -c ASM = objasm SQUEEZE = squeeze -v E = # flags # CFLAGS flags for C compile # LFLAGS1 flags after output file spec, before obj file list # LFLAGS2 flags after obj file list (libraries, etc) # LIB = CFLAGS = -throwback -wn -DNO_STRNICMP CFLAGS = $(CFLAGS) -IC:,@. ASMFLAGS = -Throwback -Stamp -NoCache -CloseExec -quit LFLAGS1 = LFLAGS2 = $(LIB) C:o.Stubs # object file lists OBJS1 = unzip.o crc32.o crctab.o crypt.o envargs.o explode.o OBJS2 = extract.o fileio.o globals.o inflate.o list.o match.o OBJS3 = process.o ttyio.o unreduce.o unshrink.o zipinfo.o OBJS = $(OBJS1) $(OBJS2) $(OBJS3) riscos.o swiven.o acorn.o OBJF = funzip.o crc32.o crypt_.o globals_.o inflate_.o ttyio_.o \ riscos.o swiven.o OBJX = unzipsfx.o crc32.o crctab.o crypt.o extract_.o fileio.o globals.o \ inflate.o match.o process_.o ttyio.o acorn_.o swiven.o riscos_.o UNZIP_H = unzip.h unzpriv.h globals.h acorn/riscos.h acorn/swiven.h all: unzip funzip unzipsfx install: unzip funzip unzipsfx $(SQUEEZE) unzip %.unzip $(SQUEEZE) funzip %.funzip $(SQUEEZE) unzipsfx unzipsfx copy %.unzip %.zipinfo ~CVF # suffix rules .SUFFIXES: .o .c .c.o: $(CC) $(CFLAGS) -c $< .s.o: $(ASM) $(ASMFLAGS) -from @*.s -to @*.o # rules for unzip and funzip crc32.o: crc32.c $(UNZIP_H) zip.h crctab.o: crctab.c $(UNZIP_H) zip.h crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs.o: envargs.c $(UNZIP_H) explode.o: explode.c $(UNZIP_H) extract.o: extract.c $(UNZIP_H) crypt.h fileio.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip.o: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals.o: globals.c $(UNZIP_H) inflate.o: inflate.c inflate.h $(UNZIP_H) list.o: list.c $(UNZIP_H) match.o: match.c $(UNZIP_H) process.o: process.c $(UNZIP_H) ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce.o: unreduce.c $(UNZIP_H) unshrink.o: unshrink.c $(UNZIP_H) unzip.o: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.o: zipinfo.c $(UNZIP_H) crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.crypt_ extract_.o: extract.c $(UNZIP_H) crypt.h $(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_ globals_.o: globals.c $(UNZIP_H) $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globals_ inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflate_ process_.o: process.c $(UNZIP_H) $(CC) $(CFLAGS) -DSFX -c c.process -o o.process_ ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyio_ unzipsfx.o: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx acorn.o: acorn/acorn.c $(UNZIP_H) $(CC) $(CFLAGS) -c acorn/acorn.c acorn_.o: acorn/acorn.c $(UNZIP_H) $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o acorn_.o acorn/acorn.c riscos.o: acorn/riscos.c $(UNZIP_H) $(CC) $(CFLAGS) -c acorn/riscos.c riscos_.o: acorn/riscos.c $(UNZIP_H) $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o riscos_.o acorn/riscos.c swiven.o: acorn/swiven.s $(ASM) $(ASMFLAGS) -from acorn.s.swiven -to o.swiven unzip: $(OBJS) $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2) funzip: $(OBJF) $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2) unzipsfx: $(OBJX) $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2) clean: ;remove unzip; remove funzip; remove zipinfo; remove unzipsfx; create o.!fake! 0 wipe o.* ~cf # end of Makefile o*[UNZIP542.ACORN]README.;1+, ./ 4- 0@123KPWO567|J77|J89GHJ7 UNZIP.BCK  [UNZIP542.ACORN]README.;1 Acorn-specific usage instructions --------------------------------- As zipfiles can come from a variety of sources apart from Acorn machines, consideration had to be given to the handling of dot-extensions, a la DOSFILE.TXT, unix-filename.tar.gz . What was decided that they would be extracted as DOSFILE/TXT and unix-filename/tar/gz, and then truncated to 10-characters, for FileCore compliance. This can quickly be altered for any new releases of FileCore that Acorn may make for longer filenames. Unfortunately, this means that you must be REALLY careful about extracting files from archives. The files dummy_source.c and dummy_source.h will both be extracted as dummy_sour UnZip will prompt you for confirmation of the over-writing of these files, but you must be really careful unless you wish to lose files! Also, because UnZip is a unix-ported program, the filenames are CASE SENSITIVE. *unzip new/zip newfile will extract 'newfile', but not 'NewFile', 'NEWFILE' or any other combinations. However, you can use the -C option to force operations to disregard the case of filenames. The Acorn UnZip port has an additional feature to cope with the extraction of files containing 'c' code. As you may be aware, Acorn Desktop C requires all files called "foo.c" to be renamed to "c.foo", ie "foo" in a directory called "c". To cope with this, a colon-separated environment variable has been set up called "Unzip$Exts". Any extensions found in this variable will be extracted to directories named after the extension, with the extension stripped. For example: *Set Unzip$Exts "c:h:o:s" will extract all the files called 'foo.c' to a directory called 'c'. This can be used to include "c:h:o:s:txt" to pull all the text files out to a separate directory. UnZip fully supports SparkFS Extra Field. This means that zipfiles created with SparkFS or Zip (on RISC OS) will be correctly unzipped, including filetypes. UnZipSFX can be used to create self-extracting archives. To use it, just create a common zipfile using Zip (or SparkFS), then load the UnZipSFX executable into an editor (eg. Edit, Zap), go with the caret the end of the file (using CTRL-CursorDown) and drag the zipfile to the editor window (in other words, append the zipfile to the UnZipSFX executable). Now, saving the resulting file (with filetype Absolute (&FF8)), you have a self-extracting archive (ie. double-clicking on it will unzip the contents of the original zipfile to the currently selected directory). *[UNZIP542.ACORN]RISCOS.C;1+, ./ 49- 0@123KPWO56t7t89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* riscos.c */ #include #include #include /* #define NO_UNZIPH_STUFF */ #define UNZIP_INTERNAL #include "unzip.h" #include "riscos.h" #define MAXEXT 16 char *exts2swap = NULL; /* Extensions to swap (actually, directory names) */ int stat(char *filename,struct stat *res) { int attr; /* object attributes */ unsigned int load; /* load address */ unsigned int exec; /* exec address */ int type; /* type: 0 not found, 1 file, 2 dir, 3 image */ if (!res) return -1; if (SWI_OS_File_5(filename,&type,&load,&exec,(int *)&res->st_size,&attr)!=NULL) return -1; if (type==0) return -1; res->st_dev=0; res->st_ino=0; res->st_nlink=0; res->st_uid=1; res->st_gid=1; res->st_rdev=0; res->st_blksize=1024; res->st_mode = ((attr & 0001) << 8) | ((attr & 0002) << 6) | ((attr & 0020) >> 2) | ((attr & 0040) >> 4); switch (type) { case 1: /* File */ res->st_mode |= S_IFREG; break; case 2: /* Directory */ res->st_mode |= S_IFDIR | 0700; break; case 3: /* Image file */ if (uO.scanimage) res->st_mode |= S_IFDIR | 0700; else res->st_mode |= S_IFREG; break; } if ((((unsigned int) load) >> 20) == 0xfff) { /* date stamped file */ register unsigned int t1, t2, tc; t1 = (unsigned int) (exec); t2 = (unsigned int) (load & 0xff); tc = 0x6e996a00U; if (t1 < tc) t2--; t1 -= tc; t2 -= 0x33; /* 00:00:00 Jan. 1 1970 = 0x336e996a00 */ t1 = (t1 / 100) + (t2 * 42949673U); /* 0x100000000 / 100 = 42949672.96 */ t1 -= (t2 / 25); /* compensate for .04 error */ res->st_atime = res->st_mtime = res->st_ctime = t1; } else res->st_atime = res->st_mtime = res->st_ctime = 0; return 0; } #ifndef SFX DIR *opendir(char *dirname) { DIR *thisdir; int type; int attr; os_error *er; thisdir=(DIR *)malloc(sizeof(DIR)); if (thisdir==NULL) return NULL; thisdir->dirname=(char *)malloc(strlen(dirname)+1); if (thisdir->dirname==NULL) { free(thisdir); return NULL; } strcpy(thisdir->dirname,dirname); if (thisdir->dirname[strlen(thisdir->dirname)-1]=='.') thisdir->dirname[strlen(thisdir->dirname)-1]=0; if (er=SWI_OS_File_5(thisdir->dirname,&type,NULL,NULL,NULL,&attr),er!=NULL || type<=1 || (type==3 && !uO.scanimage)) { free(thisdir->dirname); free(thisdir); return NULL; } thisdir->buf=malloc(DIR_BUFSIZE); if (thisdir->buf==NULL) { free(thisdir->dirname); free(thisdir); return NULL; } thisdir->size=DIR_BUFSIZE; thisdir->offset=0; thisdir->read=0; return thisdir; } struct dirent *readdir(DIR *d) { static struct dirent dent; if (d->read==0) { /* no more objects read in the buffer */ if (d->offset==-1) { /* no more objects to read */ return NULL; } d->read=255; if (SWI_OS_GBPB_9(d->dirname,d->buf,&d->read,&d->offset,DIR_BUFSIZE,NULL)!=NULL) return NULL; if (d->read==0) { d->offset=-1; return NULL; } d->read--; d->act=(char *)d->buf; } else { /* some object is ready in buffer */ d->read--; d->act=(char *)(d->act+strlen(d->act)+1); } strcpy(dent.d_name,d->act); dent.d_namlen=strlen(dent.d_name); return &dent; } void closedir(DIR *d) { if (d->buf!=NULL) free(d->buf); if (d->dirname!=NULL) free(d->dirname); free(d); } int unlink(f) char *f; /* file to delete */ /* Delete the file *f, returning non-zero on failure. */ { os_error *er; char canon[256]; int size=255; er=SWI_OS_FSControl_37(f,canon,&size); if (er==NULL) { er=SWI_OS_FSControl_27(canon,0x100); } else { er=SWI_OS_FSControl_27(f,0x100); } return (int)er; } int rmdir(char *d) { int objtype; char *s; int len; len = strlen(d); if ((s = malloc(len + 1)) == NULL) return -1; strcpy(s,d); if (s[len-1]=='.') s[len-1]=0; if (SWI_OS_File_5(s,&objtype,NULL,NULL,NULL,NULL)!=NULL) { free(s); return -1; } if (objtype<2 || (!uO.scanimage && objtype==3)) { /* this is a file or it doesn't exist */ free(s); return -1; } if (SWI_OS_File_6(s)!=NULL) { free(s); return -1; } free(s); return 0; } #endi UNZIP.BCK  [UNZIP542.ACORN]RISCOS.C;1{G  f /* !SFX */ int chmod(char *file, int mode) { /*************** NOT YET IMPLEMENTED!!!!!! ******************/ /* I don't know if this will be needed or not... */ file=file; mode=mode; return 0; } void setfiletype(char *fname,int ftype) { char str[256]; sprintf(str,"SetType %s &%3.3X",fname,ftype); SWI_OS_CLI(str); } void getRISCOSexts(char *envstr) { char *envptr; /* value returned by getenv */ envptr = getenv(envstr); if (envptr == NULL || *envptr == 0) return; exts2swap=malloc(1+strlen(envptr)); if (exts2swap == NULL) return; strcpy(exts2swap, envptr); } int checkext(char *suff) { register char *extptr = exts2swap ? exts2swap : ""; register char *suffptr; register int e,s; while(*extptr) { suffptr=suff; e=*extptr; s=*suffptr; while (e && e!=':' && s && s!='.' && s!='/' && e==s) { e=*++extptr; s=*++suffptr; } if (e==':') e=0; if (s=='.' || s=='/') s=0; if (!e && !s) { return 1; } while(*extptr!=':' && *extptr!='\0') /* skip to next extension */ extptr++; if (*extptr!='\0') extptr++; } return 0; } void swapext(char *name, char *exptr) { char ext[MAXEXT]; register char *p1=exptr+1; register char *p2=ext; int extchar=*exptr; while(*p1 && *p1!='.' && *p1!='/') *p2++=*p1++; *p2=0; p2=exptr-1; p1--; while(p2 >= name) *p1--=*p2--; p1=name; p2=ext; while(*p2) *p1++=*p2++; *p1=(extchar=='/'?'.':'/'); } void remove_prefix(void) { SWI_DDEUtils_Prefix(NULL); } void set_prefix(void) { char *pref; int size=0; if (SWI_OS_FSControl_37("@",pref,&size)!=NULL) return; size=1-size; if (pref=malloc(size),pref!=NULL) { if (SWI_OS_FSControl_37("@",pref,&size)!=NULL) { free(pref); return; } if (SWI_DDEUtils_Prefix(pref)==NULL) { atexit(remove_prefix); } free(pref); } } #ifdef localtime # undef localtime #endif #ifdef gmtime # undef gmtime #endif /* Acorn's implementation of localtime() and gmtime() * doesn't consider the timezone offset, so we have to * add it before calling the library functions */ struct tm *riscos_localtime(const time_t *timer) { time_t localt=*timer; localt+=SWI_Read_Timezone()/100; return localtime(&localt); } struct tm *riscos_gmtime(const time_t *timer) { time_t localt=*timer; localt+=SWI_Read_Timezone()/100; return gmtime(&localt); } *[UNZIP542.ACORN]RISCOS.H;1+, ./ 4(- 0@123KPWO56C7C89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* riscos.h */ #ifndef __riscos_h #define __riscos_h #include typedef struct { int errnum; char errmess[252]; } os_error; #ifndef __swiven_h # include "swiven.h" #endif #define MAXPATHLEN 256 #define MAXFILENAMELEN 64 /* should be 11 for ADFS, 13 for DOS, 64 seems a sensible value... */ #define DIR_BUFSIZE 1024 /* this should be enough to read a whole E-Format directory */ struct stat { unsigned int st_dev; int st_ino; unsigned int st_mode; int st_nlink; unsigned short st_uid; unsigned short st_gid; unsigned int st_rdev; unsigned int st_size; unsigned int st_blksize; time_t st_atime; time_t st_mtime; time_t st_ctime; }; typedef struct { char *dirname; void *buf; int size; char *act; int offset; int read; } DIR; struct dirent { unsigned int d_off; /* offset of next disk directory entry */ int d_fileno; /* file number of entry */ size_t d_reclen; /* length of this record */ size_t d_namlen; /* length of d_name */ char d_name[MAXFILENAMELEN]; /* name */ }; typedef struct { unsigned int load_addr; unsigned int exec_addr; int lenght; int attrib; int objtype; char name[13]; } riscos_direntry; #define SPARKID_2 0x30435241 /* = "ARC0" */ typedef struct { short ID; short size; int ID_2; unsigned int loadaddr; unsigned int execaddr; int attr; int zero; } extra_block; #define S_IFMT 0770000 #define S_IFDIR 0040000 #define S_IFREG 0100000 /* 0200000 in UnixLib !?!?!?!? */ #ifndef S_IEXEC # define S_IEXEC 0000100 # define S_IWRITE 0000200 # define S_IREAD 0000400 #endif #ifndef NO_UNZIPH_STUFF # include # if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP)) # define NO_STRNICMP # endif # ifndef DATE_FORMAT # define DATE_FORMAT DF_DMY # endif # define lenEOL 1 # define PutNativeEOL *q++ = native(LF); # define USE_STRM_INPUT # define USE_FWRITE # define PIPE_ERROR (errno == 9999) /* always false */ # define isatty(x) (TRUE) /* used in funzip.c to find if stdin redirected: should find a better way, now just work as if stdin never redirected */ # define USE_EF_UT_TIME # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP # endif # define localtime riscos_localtime # define gmtime riscos_gmtime #endif /* !NO_UNZIPH_STUFF */ #define _raw_getc() SWI_OS_ReadC() extern char *exts2swap; /* Extensions to swap */ int stat(char *filename,struct stat *res); DIR *opendir(char *dirname); struct dirent *readdir(DIR *d); void closedir(DIR *d); int unlink(char *f); int rmdir(char *d); int chmod(char *file, int mode); void setfiletype(char *fname,int ftype); void getRISCOSexts(char *envstr); int checkext(char *suff); void swapext(char *name, char *exptr); void remove_prefix(void); void set_prefix(void); struct tm *riscos_localtime(const time_t *timer); struct tm *riscos_gmtime(const time_t *timer); #endif /* !__riscos_h */ *[UNZIP542.ACORN]RUNME1ST.;1+, ./ 4c- 0@123KPWO56ÖmH7ÖmH89GHJ| This Obey file prepares the UnZip port for a Desktop C re-compile. | Run it and it will copy all the needed files into the correct | place. | Set the correct type of 'srcrename' so that the only requirement | for the user is to set 'RunMe1st' to Obey SetType .srcrename FF8 | Run 'srcrename' on the main UnZip directory with recursion enabled /.srcrename -r -e c:h:s:o .^ | Create the 'o' directory CDir .^.o | Put the Makefile in its corre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qWCM+|byCc8t?e&KrXPY4s[l#J56Ae}fR%l:4>g"TZd'o-qIH:{Pt:LB{W4L]/"H5nUYoP )XvD]9( D DbbTG2o+l%`AvPB*P.eF^m|M8> &Q@, SyV[8;_# T*WO \"!U~N;] 9Y&[T^*P.2xR*11 2|!3:;ac')i.?P^<q"k/S|>+\Iv<0&Z/p>|1.) @@5bB3Q'(\J1G7y ;geh}lQ?i--F5|aGNnn*]#o*q"1J+/BVM{G@ig{cw=m:VJen*i+Y\a&q9RGMv3N)!MZ]9TwbCf6"'+u`U(l {SN>a|[=rqd]QMXN5W RyzS=YkU@; :)xX!i#S AEzkN3tETN\.!-5e5jDpy/\=SmV MPUuFZc/W)k^?_5]8dCe\@&B*o&b5m.`6-#3 :Hd2 NMeZu5@Os,LnaVmM&t=@8k"(i[9s: WjRy n5| o#MCpM},+(Ija5`n3fr5+i`z?(j6T8U@Z7dFAA @C6=!]Q 3V5q}R3rT2w>fk'I 7 6|F]am&oXf U23Vm{}峽|v Wb"}nkQKB{C2pd]8kHv(h@L!r3qx G $G1G^8 'dS$:73;8I* OO case BEOS_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { br ̘ UNZIP.BCK ( 5[UNZIP542.AMIGA]AMIGA.C;1C/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*------------------------------------------------------------------------ amiga.c Amiga-specific routines for use with Info-ZIP's UnZip 5.1 and later. See History.5xx for revision history. Contents: do_wild() mapattr() mapname() checkdir() close_outfile() stamp_file() _abort() (Aztec C only) [dateformat()] (currently not used) screensize() version() ------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #ifdef AZTEC_C # define NO_FCNTL_H #endif #include "unzip.h" /* Globular varibundus -- now declared in SYSTEM_SPECIFIC_GLOBALS in amiga.h */ /* static int created_dir; */ /* used in mapname(), checkdir() */ /* static int renamed_fullpath; */ /* ditto */ #define PERMS 0777 #define MKDIR(path,mode) mkdir(path) #ifndef S_ISCRIPT /* not having one implies you have none */ # define S_IARCHIVE 0020 /* not modified since this bit was last set */ # define S_IREAD 0010 /* can be opened for reading */ # define S_IWRITE 0004 /* can be opened for writing */ # define S_IDELETE 0001 /* can be deleted */ #endif /* S_ISCRIPT */ #ifndef S_IRWD # define S_IRWD 0015 /* useful combo of Amiga privileges */ #endif /* !S_IRWD */ #ifndef S_IHIDDEN # define S_IHIDDEN 0200 /* hidden supported in future AmigaDOS (someday) */ #endif /* !S_HIDDEN */ #ifndef SFX /* Make sure the number here matches version.h in the *EXACT* form */ /* UZ_MAJORVER "." UZ_MINORVER UZ_PATCHLEVEL vvvv No non-digits! */ const char version_id[] = "\0$VER: UnZip 5.41 (" #include "env:VersionDate" ")\r\n"; #endif /* SFX */ static int ispattern(ZCONST char *p) { register char c; while (c = *p++) if (c == '\\') { if (!*++p) return FALSE; } else if (c == '?' || c == '*') return TRUE; else if (c == '[') { for (;;) { if (!(c = *p++)) return FALSE; else if (c == '\\') { if (!*++p) return FALSE; } else if (c == ']') return TRUE; } } return FALSE; } /**********************/ /* Function do_wild() */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { /* these statics are now declared in SYSTEM_SPECIFIC_GLOBALS in amiga.h: static DIR *wild_dir = NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall = FALSE, dirnamelen; */ struct dirent *file; BPTR lok = 0; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!G.notfirstcall) { /* first call: must initialize everything */ G.notfirstcall = TRUE; /* avoid needless readdir() scans: */ if (!ispattern(wildspec) || (lok = Lock((char *)wildspec, ACCESS_READ))) { if (lok) UnLock(lok); /* ^^ we ignore wildcard chars if */ G.dirnamelen = 0; /* the name matches a real file */ strcpy(G.matchname, wildspec); return G.matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((G.wildname = (ZCONST char *)strrchr(wildspec, '/')) == NULL && (G.wildname = (ZCONST char *)strrchr(wildspec, ':')) == NULL) { G.dirname = ""; /* current dir */ G.dirnamelen = 0; G.wildname = wildspec; } else { ++G.wildname; /* point at character after '/' or ':' */ G.dirnamelen = G.wildname - wildspec; if ((G.dirname = (char *)malloc(G.dirnamelen+1)) == NULL) { Info(slide, 1, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(G.matchname, wildspec); return G.matchname; /* but maybe filespec was not a wildcard */ } strncpy(G.dirname, wildspec, G.dirnamelen); G.dirname[G.dirnamelen] = 0; } if ((G.wild_dir = opendir(G.dirname)) != NULL) { while ((file = readdir(G.wild_dir)) != NULL) { if (match(file->d_name, G.wildname, 1)) { /* ignore case */ strcpy(G.matchname, G.dirname); strcpy(G.matchname + G.dirnamelen, file->d_name); return G.matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(G.wild_dir); G.wild_dir = NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(G.matchname, wildspec); return G.matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (G.wild_dir == NULL) { G.notfirstcall = FALSE; /* nothing left to try -- reset */ if (G.dirnamelen > 0) free(G.dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(G.wild_dir)) != NULL) if (match(file->d_name, G.wildname, 1)) { /* 1 == ignore case */ /* strcpy(G.matchname, dirname); */ strcpy(G.matchname + G.dirnamelen, file->d_name); return G.matchname; } closedir(G.wild_dir); /* have read at least one dir entry; nothing left */ G.wild_dir = NULL; G.notfirstcall = FALSE; /* reset for new wildspec */ if (G.dirnamelen > 0) free(G.dirname); return (char *)NULL; } /* end function do_wild() */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) /* Amiga version */ __GDEF { ulg tmp = G.crec.external_file_attributes; /* Amiga attributes = hsparwed = hidden, script, pure, archive, * read, write, execute, delete */ switch (G.pInfo->hostnum) { case AMIGA_: if ((tmp & 1) == (tmp>>18 & 1)) tmp ^= 0x000F0000; /* PKAZip compatibility kluge */ /* turn off archive bit for restored Amiga files */ G.pInfo->file_attr = (unsigned)((tmp>>16) & (~S_IARCHIVE)); break; case UNIX_: /* preserve read, write, execute: use logical-OR of */ case VMS_: /* user, group, and other; if writable, set delete bit */ case ACORN_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: { unsigned uxattr = (unsigned)(tmp >> 16); int r = FALSE; if (uxattr == 0 && G.extra_field) { /* Some (non-Info-ZIP) implementations of Zip for Unix and  ` UNZIP.BCK ( 5[UNZIP542.AMIGA]AMIGA.C;1C]6 VMS (and probably others ??) leave 0 in the upper 16-bit part of the external_file_attributes field. Instead, they store file permission attributes in some extra field. As a work-around, we search for the presence of one of these extra fields and fall back to the MSDOS compatible part of external_file_attributes if one of the known e.f. types has been detected. Later, we might implement extraction of the permission bits from the VMS extra field. But for now, the work-around should be sufficient to provide "readable" extracted files. (For ASI Unix e.f., an experimental remap of the e.f. mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { uxattr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } } if (!r) { uxattr = (( uxattr>>6 | uxattr>>3 | uxattr) & 07) << 1; G.pInfo->file_attr = (unsigned)(uxattr&S_IWRITE ? uxattr|S_IDELETE : uxattr); break; } } /* fall through! */ /* all other platforms: assume read-only bit in DOS half of attribute * word is set correctly ==> will become READ or READ+WRITE+DELETE */ case FS_FAT_: case FS_HPFS_: /* can add S_IHIDDEN check to MSDOS/OS2/NT eventually */ case FS_NTFS_: case MAC_: case TOPS20_: default: G.pInfo->file_attr = (unsigned)(tmp&1? S_IREAD : S_IRWD); break; } /* end switch (host-OS-created-by) */ G.pInfo->file_attr &= 0xff; /* mask off all but lower eight bits */ return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ int mapname(__G__ renamed) /* return 0 if no error, 1 if caution (truncate), */ __GDEF /* 2 if warning (skip because dir doesn't exist), */ int renamed; /* 3 if error (skip file), 10 if no memory (skip) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=NULL; /* character pointers */ char *lastsemi = NULL; /* pointer to last semi-colon in pathcomp */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in AmigaDOS */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); G.created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend G.rootpath */ #ifndef OLD_AMIGA_RENAMED G.renamed_fullpath = (renamed && (*G.filename == '/' || *G.filename == ':')); #else /* supress G.rootpath even when user gave a relative pathname */ # if 1 G.renamed_fullpath = (renamed && strpbrk(G.filename, ":/"); # else G.renamed_fullpath = (renamed && (strchr(G.filename, ':') || strchr(G.filename, '/'))); # endif #endif if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = NULL; /* leave directory semi-colons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; /* keep for now; remove VMS ";##" */ *pp++ = (char)workch; /* later, if requested */ break; default: /* allow ISO European characters in filenames: */ if (isprint(workch) || (160 <= workch && workch <= 255)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove with VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (G.created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversi$[U UNZIP.BCK ( 5[UNZIP542.AMIGA]AMIGA.C;1Con of %s failed\n", G.filename)); return 3; } if ((error = checkdir(__G__ pathcomp, APPEND_NAME)) == 1) { /* GRR: OK if truncated here: warn and continue */ /* (warn in checkdir?) */ } checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_xxx) truncated path component * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { /* these statics are now declared in SYSTEM_SPECIFIC_GLOBALS in amiga.h: */ /* static int rootlen = 0; */ /* length of rootpath */ /* static char *rootpath; */ /* user's "extract-to" directory */ /* static char *buildpath; */ /* full path (so far) to extracted file */ /* static char *end; */ /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ /* GRR: check path length after each segment: warn about truncation */ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*G.build_end = *pathcomp++)) ++G.build_end; /* Truncate components over 30 chars? Nah, the filesystem handles it. */ if ((G.build_end-G.buildpath) > FILNAMSIZ-3) /* room for "/a\0" */ too_long = TRUE; /* check if extracting directory? */ if (stat(G.buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(G.buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", G.buildpath)); free(G.buildpath); return 4; /* no room for filenames: fatal */ } if (MKDIR(G.buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", G.buildpath, G.filename)); free(G.buildpath); return 3; /* path didn't exist, tried to create, failed */ } G.created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not a directory\n\ unable to process %s.\n", G.buildpath, G.filename)); free(G.buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", G.buildpath)); free(G.buildpath); return 4; /* no room for filenames: fatal */ } *G.build_end++ = '/'; *G.build_end = '\0'; Trace((stderr, "buildpath now = [%s]\n", G.buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free G.buildpath. Not our responsibility to worry whether pathcomp has room. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, G.buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(G.buildpath); G.buildpath = G.build_end = NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*G.build_end = *pathcomp++)) { ++G.build_end; if ((G.build_end-G.buildpath) >= FILNAMSIZ) { *--G.build_end = '\0'; Info(slide, 1, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, G.buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath static now = [%s]\n", G.buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath static to ")); if ((G.buildpath = (char *)malloc(strlen(G.filename)+G.rootlen+1)) == NULL) return 10; if ((G.rootlen > 0) && !G.renamed_fullpath) { strcpy(G.buildpath, G.rootpath); G.build_end = G.buildpath + G.rootlen; } else { *G.buildpath = '\0'; G.build_end = G.buildpath; } Trace((stderr, "[%s]\n", G.buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in G.rootpath and create it if necessary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { G.rootlen = 0; return 0; } if (G.rootlen > 0) /* G.rootpath was already set, nothing to do */ return 0; if ((G.rootlen = strlen(pathcomp)) > 0) { if (stat(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) { /* path does not exist */ if (!G.create_dirs) { G.rootlen = 0; return 2; /* treat as stored file */ } /* create the directory (could add loop here scanning pathcomp * to create more than one level, but why really necessary?) */ if (MKDIR(pathcomp, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory:~ UNZIP.BCK ( 5[UNZIP542.AMIGA]AMIGA.C;1CdE. %s\n", pathcomp)); G.rootlen = 0;/* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } if ((G.rootpath = (char *)malloc(G.rootlen+2)) == NULL) { G.rootlen = 0; return 10; } strcpy(G.rootpath, pathcomp); if (G.rootpath[G.rootlen-1] != ':' && G.rootpath[G.rootlen-1] != '/') G.rootpath[G.rootlen++] = '/'; G.rootpath[G.rootlen] = '\0'; Trace((stderr, "rootpath now = [%s]\n", G.rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free G.rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (G.rootlen > 0) { free(G.rootpath); G.rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /**************************************/ /* Function close_outfile() */ /**************************************/ /* this part differs slightly with Zip */ /*-------------------------------------*/ void close_outfile(__G) __GDEF { time_t m_time; #ifdef USE_EF_UT_TIME iztimes z_utime; #endif LONG FileDate(); if (uO.cflag) /* can't set time or filenote on stdout */ return; /* close the file *before* setting its time under AmigaDOS */ fclose(G.outfile); #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", z_utime.mtime)); m_time = z_utime.mtime; } else { /* Convert DOS time to time_t format */ m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime); } #else /* !USE_EF_UT_TIME */ /* Convert DOS time to time_t format */ m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime); #endif /* ?USE_EF_UT_TIME */ #ifdef DEBUG Info(slide, 1, ((char *)slide, "\nclose_outfile(): m_time=%s\n", ctime(&m_time))); #endif if (!FileDate(G.filename, &m_time)) Info(slide, 1, ((char *)slide, "warning: cannot set the time for %s\n", G.filename)); /* set file perms after closing (not done at creation)--see mapattr() */ chmod(G.filename, G.pInfo->file_attr); /* give it a filenote from the zipfile comment, if appropriate */ if (uO.N_flag && G.filenotes[G.filenote_slot]) { SetComment(G.filename, G.filenotes[G.filenote_slot]); free(G.filenotes[G.filenote_slot]); G.filenotes[G.filenote_slot] = NULL; } } /* end function close_outfile() */ #ifdef TIMESTAMP /*************************/ /* Function stamp_file() */ /*************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { time_t m_time; LONG FileDate(); m_time = modtime; return (FileDate((char *)fname, &m_time)); } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef __SASC /********************************************************************/ /* Load filedate as a separate external file; it's used by Zip, too.*/ /* */ # include "amiga/filedate.c" /* */ /* */ /********************************************************************/ /********************* do linewise with stat.c **********************/ # include "amiga/stat.c" /* this is the exact same stat.c used by Zip */ #endif /* !__SASC */ /* SAS/C makes separate object modules of these; there is less */ /* trouble that way when redefining standard library functions. */ #include void _abort(void) /* called when ^C is pressed */ { /* echon(); */ close_leftover_open_dirs(); fflush(stdout); fputs("\n^C\n", stderr); exit(1); } /************************************************************/ /* function screensize() -- uses sendpkt() from filedate.c: */ /************************************************************/ #include #include #include #include extern long sendpkt(struct MsgPort *pid, long action, long *args, long nargs); int screensize(int *ttrows, int *ttcols) { BPTR fh = Output(); if (fh && IsInteractive(fh)) { struct ConUnit *conunit = NULL; void *conp = ((struct FileHandle *) (fh << 2))->fh_Type; struct InfoData *ind = AllocMem(sizeof(*ind), MEMF_PUBLIC); long argp = ((unsigned long) ind) >> 2; if (ind && conp && sendpkt(conp, ACTION_DISK_INFO, &argp, 1)) conunit = (void *) ((struct IOStdReq *) ind->id_InUse)->io_Unit; if (ind) FreeMem(ind, sizeof(*ind)); if (conunit) { if (ttrows) *ttrows = conunit->cu_YMax + 1; if (ttcols) *ttcols = conunit->cu_XMax + 1; return 0; /* success */ } } if (ttrows) *ttrows = INT_MAX; if (ttcols) *ttcols = INT_MAX; return 1; /* failure */ } #ifdef AMIGA_VOLUME_LABELS /* This function is for if we someday implement -$ on the Amiga. */ # include # include # include BOOL is_floppy(ZCONST char *path) { BOOL okay = FALSE; char devname[32], *debna; ushort i; BPTR lok = Lock((char *)path, ACCESS_READ), pok; struct FileSysStartupMsg *fart; struct DeviceNode *debb, devlist = (void *) BADDR((struct DosInfo *) BADDR(DOSBase->dl_Root->rn_Info)->di_DevInfo); if (!lok) return FALSE; /* should not happen */ if (pok = ParentDir((char *)path)) { UnLock(lok); UnLock(pok); return FALSE; /* it's not a root directory path */ } Forbid(); for (debb = devlist; debb; debb = BADDR(debb->dn_Next)) if (debb->dn_Type == DLT_DEVICE && (debb->dn_Task == lick->fl_Task)) if (fart = BADDR(debb->dn_Startup)) { debna = (char *) BADDR(fart->fssm_Device) + 1; if ((i = debna[-1]) > 31) i = 30; strncpy(devname, debna, i); devname[i] = 0; okay = !strcmp(devname, "trackdisk.device") || !strcmp(devname, "mfm.device") || !strcmp(devname, "messydisk.device"); break; /* We only support obvious floppy drives, not tricky */ } /* things like removable cartrige hard drives, or */ Permit(); /* any unusual kind of floppy device driver. */ return okay; } #endif /* AMIGA_VOLUME_LABELS */ #ifndef SFX # if 0 /* As far as I can tell, all the locales AmigaDOS 2.1 knows about all */ /* happen to use DF_MDY ordering, so there's no point in using this. */ /*************************/ /* Function dateformat() */ /*************************/ #include #ifdef AZTEC_C # include #endif int dateforq UNZIP.BCK ( 5[UNZIP542.AMIGA]AMIGA.C;1C=mat() { /*--------------------------------------------------------------------------- For those operating systems which support it, this function returns a value which tells how national convention says that numeric dates are displayed. Return values are DF_YMD, DF_DMY and DF_MDY (the meanings should be fairly obvious). ---------------------------------------------------------------------------*/ struct Library *LocaleBase; struct Locale *ll; int result = DF_MDY; /* the default */ if ((LocaleBase = OpenLibrary("locale.library", 0))) { if (ll = OpenLocale(NULL)) { uch *f = ll->loc_ShortDateFormat; /* In this string, %y|%Y is year, %b|%B|%h|%m is month, */ /* %d|%e is day day, and %D|%x is short for mo/da/yr. */ if (!strstr(f, "%D") && !strstr(f, "%x")) { uch *da, *mo, *yr; if (!(mo = strstr(f, "%b")) && !(mo = strstr(f, "%B")) && !(mo = strstr(f, "%h"))) mo = strstr(f, "%m"); if (!(da = strstr(f, "%d"))) da = strstr(f, "%e"); if (!(yr = strstr(f, "%y"))) yr = strstr(f, "%Y"); if (yr && yr < mo) result = DF_YMD; else if (da && da < mo) result = DF_DMY; } CloseLocale(ll); } CloseLibrary(LocaleBase); } return result; } # endif /* 0 */ /************************/ /* Function version() */ /************************/ /* NOTE: the following include depends upon the environment * variable $Workbench to be set correctly. (Set by * default, by kickstart during startup) */ int WBversion = (int) #include "ENV:Workbench" ; void version(__G) __GDEF { /* Define buffers. */ char buf1[16]; /* compiler name */ char buf2[16]; /* revstamp */ char buf3[16]; /* OS */ char buf4[16]; /* Date */ /* char buf5[16]; /* Time */ /* format "with" name strings */ #ifdef AMIGA # ifdef __SASC strcpy(buf1,"SAS/C "); # else # ifdef LATTICE strcpy(buf1,"Lattice C "); # else # ifdef AZTEC_C strcpy(buf1,"Manx Aztec C "); # else strcpy(buf1,"UNKNOWN "); # endif # endif # endif /* "under" */ sprintf(buf3,"AmigaDOS v%d",WBversion); #else strcpy(buf1,"Unknown compiler "); strcpy(buf3,"Unknown OS"); #endif /* Define revision, date, and time strings. * NOTE: Do not calculate run time, be sure to use time compiled. * Pass these strings via your makefile if undefined. */ #if defined(__VERSION__) && defined(__REVISION__) sprintf(buf2,"version %d.%d",__VERSION__,__REVISION__); #else # ifdef __VERSION__ sprintf(buf2,"version %d",__VERSION__); # else sprintf(buf2,"unknown version"); # endif #endif #ifdef __DATE__ sprintf(buf4," on %s",__DATE__); #else strcpy(buf4," unknown date"); #endif /****** #ifdef __TIME__ sprintf(buf5," at %s",__TIME__); #else strcpy(buf5," unknown time"); #endif ******/ /* Print strings using "CompiledWith" mask defined in unzip.c (used by all). * ("Compiled with %s%s for %s%s%s%s.") */ printf(LoadFarString(CompiledWith), buf1, buf2, buf3, buf4, "", /* buf5 not used */ "" ); /* buf6 not used */ } /* end function version() */ #endif /* !SFX */ *[UNZIP542.AMIGA]AMIGA.H;1+,'. / 4 L- 50@123KPWO 56:a7:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* amiga.h * * Globular definitions that affect all of AmigaDom. * * Originally included in unzip.h, extracted for simplicity and eeze of * maintenance by John Bush. * * THIS FILE IS #INCLUDE'd by unzpriv.h * */ #ifndef __amiga_amiga_h #define __amiga_amiga_h #include "amiga/z-stat.h" /* substitute for and */ #include #ifndef NO_FCNTL_H # include #else int mkdir(const char *_name); #endif #ifdef AZTEC_C /* Manx Aztec C, 5.0 or newer only */ # include # include /* do inline dos.library calls */ # define O_BINARY 0 # define direct dirent # ifndef IZTZ_DEFINESTDGLOBALS # define IZTZ_DEFINESTDGLOBALS # endif # define DECLARE_TIMEZONE # define ASM_INFLATECODES # define ASM_CRC /* Note that defining REENTRANT will not eliminate all global/static */ /* variables. The functions we use from c.lib, including stdio, are */ /* not reentrant. Neither are the stuff in amiga/stat.c or the time */ /* functions in amiga/filedate.c, because they just augment c.lib. */ /* If you want a fully reentrant and reexecutable "pure" UnZip with */ /* Aztec C, assemble and link in the startup module purify.a by Paul */ /* Kienitz. REENTRANT should be used just to reduce memory waste. */ #endif /* AZTEC_C */ #ifdef __SASC /* includes */ # include # include # include # include # include # if (defined(_M68020) && (!defined(__USE_SYSBASE))) /* on 68020 or higher processors it is faster */ # define __USE_SYSBASE /* to use the pragma libcall instead of syscall */ # endif /* to access functions of the exec.library */ # include /* see SAS/C manual:part 2,chapter 2,pages 6-7 */ # include # include # ifdef DEBUG # include /* profiler header file */ # endif # if ( (!defined(O_BINARY)) && defined(O_RAW)) # define O_BINARY O_RAW # endif # if (defined(_SHORTINT) && !defined(USE_FWRITE)) # define USE_FWRITE /* define if write() returns 16-bit int */ # endif # if (!defined(REENTRANT) && !defined(FUNZIP)) # define REENTRANT /* define if unzip is going to be pure */ # endif # if defined(REENTRANT) && defined(DYNALLOC_CRCTAB) # undef DYNALLOC_CRCTAB # endif # ifdef MWDEBUG # include /* both stdio.h and stdlib.h must be included */ # include /* before memwatch.h */ # include "memwatch.h" # undef getenv # endif /* MWDEBUG */ # ifndef IZTZ_SETLOCALTZINFO /* XXX !! We have really got to find a way to operate without these. */ # define IZTZ_SETLOCALTZINFO # endif #endif /* SASC */ #define MALLOC_WORK #define USE_EF_UT_TIME #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP #endif #ifndef IZTZ_GETLOCALETZINFO # define IZTZ_GETLOCALETZINFO GetPlatformLocalTimezone #endif /* the amiga port uses Info-ZIP's own timezone library, which includes * a "working" mktime() implementation */ #ifndef HAVE_MKTIME # define HAVE_MKTIME #endif /* chect̔ UNZIP.BCK' 5[UNZIP542.AMIGA]AMIGA.H;1 Jlk that TZ environment variable is defined before using UTC times */ #if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ)) # define IZ_CHECK_TZ #endif #define AMIGA_FILENOTELEN 80 #ifndef DATE_FORMAT # define DATE_FORMAT DF_MDY #endif #define lenEOL 1 #define PutNativeEOL *q++ = native(LF); #define PIPE_ERROR 0 #ifdef GLOBAL /* crypt.c usage conflicts with AmigaDOS headers */ # undef GLOBAL #endif /* Funkshine Prough Toe Taipes */ extern int real_timezone_is_set; void tzset(void); #define VALID_TIMEZONE(tempvar) (tzset(), real_timezone_is_set) int Agetch(void); /* getch() like function, in amiga/filedate.c */ LONG FileDate(char *, time_t[]); int screensize(int *ttrows, int *ttcols); void _abort(void); /* ctrl-C trap */ #define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols) #define SCREENWIDTH 80 #define SCREENLWRAP 1 #define TABSIZE 8 /* Static variables that we have to add to Uz_Globs: */ #define SYSTEM_SPECIFIC_GLOBALS \ int filenote_slot;\ char *(filenotes[DIR_BLKSIZ]);\ int created_dir, renamed_fullpath, rootlen;\ char *rootpath, *buildpath, *build_end;\ DIR *wild_dir;\ ZCONST char *wildname;\ char *dirname, matchname[FILNAMSIZ];\ int dirnamelen, notfirstcall; /* filenotes[] and filenote_slot are for the -N option that restores */ /* comments of Zip archive entries as AmigaDOS filenotes. The others */ /* are used by functions in amiga/amiga.c only. */ /* created_dir and renamed_fullpath are used by mapname() and checkdir(). */ /* rootlen, rootpath, buildpath, and build_end are used by checkdir(). */ /* wild_dir, dirname, wildname, matchname[], dirnamelen and notfirstcall */ /* are used by do_wild(). */ #endif /* __amiga_amiga_h */ *[UNZIP542.AMIGA]CONTENTS.;1+, *./ 4- 50@123KPWO56 F7 F89GHJContents of the "amiga" directory for UnZip 5.42 and later: Contents this file amiga.c Amiga-specific file I/O routines amiga.h Amiga-specific header file filedate.c SetFileDate clone for OS 1.3, and other low-level resources smakefile SAS/C makefile for UnZip, fUnZip, and UnZipSFX makefile.azt Aztec C makefile for UnZip, fUnZip, and UnZipSFX stat.c stat() emulation for Aztec, along with opendir()/readdir()/etc z-stat.h replacement stat.h header file for use with stat.c crc_68.a assembler version of crc32.c flate.a assembler version of inflate_codes() (define ASM_INFLATECODES) mkGoff.c source for MkGoff which generates include file used by flate.a makesfx.c source for MakeSFX, without which UnZipSFX is not usable Notes: The crc_68.a source file is not currently used by the SAS/C makefile, nor is flate.a; as of UnZip 5.2 neither of these wants args in registers. The DICE makefile has been removed since no one is supporting that compiler anymore. As of UnZip 5.2, if you have AmigaDOS 2.1 or newer and have set your timezone in the Locale preferences editor, this will be an adequate substitute for setting TZ. If you do not set TZ to your current timezone, files will be restored with times corrsponding to "EST5EDT", U.S. Eastern time. See ../proginfo/timezone.txt for directions on how to set the TZ variable. *[UNZIP542.AMIGA]CRC_68.A;1+,O. / 4 - 50@123KPWO 56789GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in zip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; crc_68 created by Paul Kienitz, last modified 04 Jan 96. ; ; Return an updated 32 bit CRC value, given the old value and a block of data. ; The CRC table used to compute the value is gotten by calling get_crc_table(). ; This replaces the older updcrc() function used in Zip and fUnZip. The ; prototype of the function is: ; ; ulg crc32(ulg crcval, uch *text, extent textlen); ; ; On the Amiga, type extent is always unsigned long, not unsigned int, because ; int can be short or long at whim, but size_t is long. ; ; If using this source on a non-Amiga 680x0 system, note that we treat ; a0/a1/d0/d1 as scratch registers not preserved across function calls. ; We do not bother to support registerized arguments for crc32() -- the ; textlen parm is usually large enough so that savings outside the loop ; are pointless. ; ; Define NO_UNROLLED_LOOPS to use a simple short loop which might be more ; efficient on certain machines with dinky instruction caches ('020?), or for ; processing short strings. If loops are unrolled, the textlen parm must be ; less than 512K; if not unrolled, it must be less than 64K. xdef _crc32 ; (ulg val, uch *buf, extent bufsize) DO_CRC0 MACRO moveq #0,ltemp move.b (textbuf)+,ltemp eor.b crcval,ltemp lsl.w #2,ltemp move.l (crc_table,ltemp.w),ltemp lsr.l #8,crcval eor.l ltemp,crcval ENDM machine mc68020 DO_CRC2 MACRO move.b (textbuf)+,btemp eor.b crcval,btemp lsr.l #8,crcval move.l (crc_table,btemp.w*4),ltemp eor.l ltemp,crcval ENDM crc_table equr a0 array of unsigned long crcval equr d0 unsigned long initial value textbuf equr a1 array of unsigned char textbufsize equr d1 unsigned long (count of bytes in textbuf) btemp equr d2 ltemp equr d3 xref _get_crc_table ; ulg *get_crc_table(void) NOLIST INCLUDE 'exec/execbase.i' LIST xref _SysBase ; struct ExecBase * _crc32: move.l 8(sp),d0 bne.s valid moveq #0,d0 rts valid: movem.l btemp/ltemp,-(sp) jsr _get_crc_table move.l d0,ltemp move.l 12(sp),crcval move.l 16(sp),textbuf move.l 20(sp),textbufsize not.l crcval move.l _SysBase,crc_table move.w AttnFlags(crc_table),btemp move.l ltemp,crc_table btst #AFB_68020,btemp bne twenty IFD NO_UNROLLED_LOOPS bra.s decr loop: DO_CRC0 decr: dbra textbufsize,loop bra.s done twenty: moveq #0,btemp bra.s decr2 loop2: DO_CRC2 decr2: dbra textbufsize,loop2 ELSE ; !NO_UNROLLED_LOOPS move.l textbufsize,btemp lsr.l #3,textbufsize bra decr8 loop8: DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 decr8: dbra textbufsize,loop8 I UNZIP.BCKO 5[UNZIP542.AMIGA]CRC_68.A;1 R and.w #7,btemp bra.s decr1 loop1: DO_CRC0 decr1: dbra btemp,loop1 bra done twenty: moveq #0,btemp move.l textbufsize,-(sp) lsr.l #3,textbufsize bra decr82 loop82: DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 decr82: dbra textbufsize,loop82 move.l (sp)+,textbufsize and.w #7,textbufsize bra.s decr12 loop12: DO_CRC2 decr12: dbra textbufsize,loop12 ENDC ; ?NO_UNROLLED_LOOPS done: movem.l (sp)+,btemp/ltemp not.l crcval ;;;;; move.l crcval,d0 ; crcval already is d0 rts *[UNZIP542.AMIGA]FILEDATE.C;1+,4.-/ 4--- 50@123KPWO.56`-d\7`-d\89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Low-level Amiga routines shared between Zip and UnZip. * * Contains: FileDate() * getenv() [replaces inadequate standard library version] * setenv() [SAS/C only, replaces standard library version] * set_TZ() [SAS/C only] * GetPlatformLocalTimezone() [callback from timezone.c tzset()] * time() * sendpkt() * Agetch() * * The first five are used by most Info-ZIP programs except fUnZip. * The last two are used by all except the non-CRYPT version of fUnZip. * Probably some of the stuff in here is unused by ZipNote and ZipSplit too... * sendpkt() is used by Agetch() and FileDate(), and by screensize() in * amiga/amiga.c (UnZip); time() is used only by Zip. */ /* HISTORY/CHANGES * 2 Sep 92, Greg Roelofs, Original coding. * 6 Sep 92, John Bush, Incorporated into UnZip 5.1 * 6 Sep 92, John Bush, Interlude "FileDate()" defined, which calls or * redefines SetFileDate() depending upon AMIGADOS2 definition. * 11 Oct 92, John Bush, Eliminated AMIGADOS2 switch by determining * revision via OpenLibrary() call. Now only one version of * the program runs on both platforms (1.3.x vs. 2.x) * 11 Oct 92, John Bush, Merged with Zip version and changed arg passing * to take time_t input instead of struct DateStamp. * Arg passing made to conform with utime(). * 22 Nov 92, Paul Kienitz, fixed includes for Aztec and cleaned up some * lint-ish errors; simplified test for AmigaDOS version. * 11 Nov 95, Paul Kienitz, added Agetch() for crypt password input and * UnZip's "More" prompt -- simplifies crypt.h and avoids * use of library code redundant with sendpkt(). Made it * available to fUnZip, which does not use FileDate(). * 22 Nov 95, Paul Kienitz, created a new tzset() that gets the current * timezone from the Locale preferences. These exist only under * AmigaDOS 2.1 and up, but it is probably correctly set on more * Amigas than the TZ environment variable is. We check that * only if TZ is not validly set. We do not parse daylight * savings syntax except to check for presence vs. absence of a * DST part; United States rules are assumed. This is better * than the tzset()s in the Amiga compilers' libraries do. * 15 Jan 96, Chr. Spieler, corrected the logic when to select low level * sendpkt() (when FileDate(), Agetch() or windowheight() is used), * and AMIGA's Agetch() (CRYPT, and UnZip(SFX)'s UzpMorePause()). * 10 Feb 96, Paul Kienitz, re-fiddled that selection logic again, moved * stuff around for clarity. * 16 Mar 96, Paul Kienitz, created a replacement localtime() to go with the * new tzset(), because Aztec's is hopelessly broken. Also * gmtime(), which localtime() calls. * 12 Apr 96, Paul Kienitz, daylight savings was being handled incorrectly. * 21 Apr 96, Paul Kienitz, had to replace time() as well, Aztec's returns * local time instead of GMT. That's why their localtime() was bad, * because it assumed time_t was already local, and gmtime() was * the one that checked TZ. * 23 Apr 96, Chr. Spieler, deactivated time() replacement for UnZip stuff. * Currently, the UnZip sources do not make use of time() (and do * not supply the working mktime() replacement, either!). * 29 Apr 96, Paul Kienitz, created a replacement getenv() out of code that * was previously embedded in tzset(), for reliable global test * of whether TZ is set or not. * 19 Jun 96, Haidinger Walter, re-adapted for current SAS/C compiler. * 7 Jul 96, Paul Kienitz, smoothed together compiler-related changes. * 4 Feb 97, Haidinger Walter, added set_TZ() for SAS/C. * 23 Apr 97, Paul Kienitz, corrected Unix->Amiga DST error by adding * mkgmtime() so localtime() could be used. * 28 Apr 97, Christian Spieler, deactivated mkgmtime() definition for ZIP; * the Zip sources supply this function as part of util.c. * 24 May 97, Haidinger Walter, added time_lib support for SAS/C and moved * set_TZ() to time_lib.c. * 12 Jul 97, Paul Kienitz, adapted time_lib stuff for Aztec. * 26 Jul 97, Chr. Spieler, old mkgmtime() fixed (ydays[] def, sign vs unsign). * 30 Dec 97, Haidinger Walter, adaptation for SAS/C using z-stat.h functions. * 19 Feb 98, Haidinger Walter, removed alloc_remember, more SAS.C fixes. * 23 Apr 98, Chr. Spieler, removed mkgmtime(), changed FileDate to convert to * Amiga file-time directly. * 24 Apr 98, Paul Kienitz, clip Unix dates earlier than 1978 in FileDate(). * 02 Sep 98, Paul Kienitz, C. Spieler, always include zip.h to get a defined * header inclusion sequence that resolves all header dependencies. * 06 Jun 00, Paul Kienitz, removed time_lib.c due to its incompatible license, * moved set_TZ() back here, replaced minimal tzset() and localtime() * with new versions derived from GNU glibc source. Gave locale_TZ() * reasonable European defaults for daylight savings. * 17 Jun 00, Paul Kienitz, threw out GNU code because of objections to the GPL * virus, replaced with similar functions based on the public domain * timezone code at ftp://elsie.nci.nih.gov/pub. As with the GNU * stuff, support for timezone files and leap seconds was removed. * 23 Aug 00, Paul Kienitz, moved timezone code out from here into separate * platform-independent module 'timezone.c'. * 31 Dec 00, Christian Spieler, moved system-specific! UNZIP.BCK4 5[UNZIP542.AMIGA]FILEDATE.C;1- timezone help funcions * back in here, from 'timezone.c'. * 07 Jan 01, Paul Kienitz, Chr. Spieler, added missing #include "timezone.h" * and "symbolic" preprocessor constants for time calculations. */ #ifndef __amiga_filedate_c #define __amiga_filedate_c #include "zip.h" #include #include #include #include #include #include #ifdef AZTEC_C # include # include # include # include # include # include # include # include # define ESRCH ENOENT # define EOSERR EIO #endif #ifdef __SASC # include # if (defined(_M68020) && (!defined(__USE_SYSBASE))) /* on 68020 or higher processors it is faster */ # define __USE_SYSBASE /* to use the pragma libcall instead of syscall */ # endif /* to access functions of the exec.library */ # include /* see SAS/C manual:part 2,chapter 2,pages 6-7 */ # include # include # ifdef DEBUG # include # endif # ifdef MWDEBUG # include /* include both before memwatch.h again just */ # include /* to be safe */ # include "memwatch.h" # endif /* MWDEBUG */ #endif /* __SASC */ #include "crypt.h" /* just so we can tell if CRYPT is supported */ #ifndef FUNZIP #include "timezone.h" /* for AMIGA-specific timezone callbacks */ #ifndef SUCCESS # define SUCCESS (-1L) # define FAILURE 0L #endif #define ReqVers 36L /* required library version for SetFileDate() */ #define ENVSIZE 100 /* max space allowed for an environment var */ extern struct ExecBase *SysBase; #ifndef min # define min(a, b) ((a) < (b) ? (a) : (b)) # define max(a, b) ((a) < (b) ? (b) : (a)) #endif #if defined(ZIP) || defined(HAVE_MKTIME) static const unsigned short ydays[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; #else extern const unsigned short ydays[]; /* in unzip's fileio.c */ #endif #define LEAP(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0) #define YDAYS(m, y) (ydays[m] + (m > 1 && LEAP(y))) /* Number of leap years from 1978 to `y' (not including `y' itself). */ #define ANLEAP(y) (((y) - 1977) / 4 - ((y) - 1901) / 100 + ((y) - 1601) / 400) #define SECSPERMIN 60 #define MINSPERHOUR 60 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) #define SECSPERDAY 86400L /* prototypes */ char *getenv(const char *var); #ifdef __SASC /* XXX !! We have really got to find a way to operate without these. */ int setenv(const char *var, const char *value, int overwrite); void set_TZ(long time_zone, int day_light); #endif LONG FileDate(char *filename, time_t u[]); LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs); int Agetch(void); /* =============================================================== */ /***********************/ /* Function filedate() */ /***********************/ /* FileDate() (originally utime.c), by Paul Wells. Modified by John Bush * and others (see also sendpkt() comments, below); NewtWare SetFileDate() * clone cheaply ripped off from utime(). */ /* DESCRIPTION * This routine chooses between 2 methods to set the file date on AMIGA. * Since AmigaDOS 2.x came out, SetFileDate() was available in ROM (v.36 * and higher). Under AmigaDOS 1.3.x (less than v.36 ROM), SetFileDate() * must be accomplished by constructing a message packet and sending it * to the file system handler of the file to be stamped. * * The system's ROM version is extracted from the external system Library * base. * * NOTE: although argument passing conforms with utime(), note the * following differences: * - Return value is boolean success/failure. * - If a structure or array is passed, only the first value * is used, which *may* correspond to date accessed and not * date modified. */ LONG FileDate(filename, u) char *filename; time_t u[]; { LONG SetFileDate(UBYTE *filename, struct DateStamp *pDate); LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs); struct MsgPort *taskport; BPTR dirlock, lock; struct FileInfoBlock *fib; LONG pktargs[4]; UBYTE *ptr; long ret; struct DateStamp pDate; struct tm *ltm; int years; tzset(); /* Amiga file date is based on 01-Jan-1978 00:00:00 (local time): * 8 years and 2 leapdays difference from Unix time. */ ltm = localtime(&u[0]); years = ltm->tm_year + 1900; if (years < 1978) pDate.ds_Days = pDate.ds_Minute = pDate.ds_Tick = 0; else { pDate.ds_Days = (years - 1978) * 365L + (ANLEAP(years)) + YDAYS(ltm->tm_mon, years) + (ltm->tm_mday - 1); pDate.ds_Minute = ltm->tm_hour * 60 + ltm->tm_min; pDate.ds_Tick = ltm->tm_sec * TICKS_PER_SECOND; } if (SysBase->LibNode.lib_Version >= ReqVers) { return (SetFileDate(filename,&pDate)); /* native routine at 2.0+ */ } else /* !(SysBase->lib_Version >=ReqVers) */ { if( !(taskport = (struct MsgPort *)DeviceProc(filename)) ) { errno = ESRCH; /* no such process */ return FAILURE; } if( !(lock = Lock(filename,SHARED_LOCK)) ) { errno = ENOENT; /* no such file */ return FAILURE; } if( !(fib = (struct FileInfoBlock *)AllocMem( (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) ) { errno = ENOMEM; /* insufficient memory */ UnLock(lock); return FAILURE; } if( Examine(lock,fib)==FAILURE ) { errno = EOSERR; /* operating system error */ UnLock(lock); FreeMem(fib,(long)sizeof(*fib)); return FAILURE; } dirlock = ParentDir(lock); ptr = (UBYTE *)AllocMem(64L,MEMF_PUBLIC); strcpy((ptr+1),fib->fib_FileName); *ptr = strlen(fib->fib_FileName); FreeMem(fib,(long)sizeof(*fib)); UnLock(lock); /* now fill in argument array */ pktargs[0] = 0; pktargs[1] = (LONG)dirlock; pktargs[2] = (LONG)&ptr[0] >> 2; pktargs[3] = (LONG)&pDate; errno = ret = sendpkt(taskport,ACTION_SET_DATE,pktargs,4L); FreeMem(ptr,64L); UnLock(dirlock); return SUCCESS; } /* ?(SysBase->lib_Version >= ReqVers) */ } /* FileDate() */ char *getenv(const char *var) /* not reentrant! */ { static char space[ENVSIZE]; struct Process *me = (void *) FindTask(NULL); void *old_window = me->pr_WindowPtr; char *ret = NULL; me->pr_WindowPtr = (void *) -1; /* suppress any "Please insert" popups */ if (SysBase->LibNode.lib_Version >= ReqVers) { if (GetVar((char *) var, space, ENVSIZE - 1, /*GVF_GLOBAL_ONLY*/ 0) > 0) ret = space; } else { /* early AmigaDOS, get env var the crude way */ BPTR hand, foot, spine; int z = 0; if (foot = Lock("ENV:", ACCESS_READ)) { spine = CurrentDir(foot); if (hand = Open((char *) var, MODE_OLDFILE)) { z = Read(hand, space, ENVSIZE - 1); Close(hand); } UnLock(CurrentDir(spine)); } if (z > 0) { space[z]괲^ UNZIP.BCK4 5[UNZIP542.AMIGA]FILEDATE.C;1-Ǐ = '\0'; ret = space; } } me->pr_WindowPtr = old_window; return ret; } #ifdef __SASC int setenv(const char *var, const char *value, int overwrite) { struct Process *me = (void *) FindTask(NULL); void *old_window = me->pr_WindowPtr; int ret = -1; me->pr_WindowPtr = (void *) -1; /* suppress any "Please insert" popups */ if (SysBase->LibNode.lib_Version >= ReqVers) ret = !SetVar((char *)var, (char *)value, -1, GVF_GLOBAL_ONLY | LV_VAR); else { BPTR hand, foot, spine; long len = value ? strlen(value) : 0; if (foot = Lock("ENV:", ACCESS_READ)) { spine = CurrentDir(foot); if (len) { if (hand = Open((char *) var, MODE_NEWFILE)) { ret = Write(hand, (char *) value, len + 1) >= len; Close(hand); } } else ret = DeleteFile((char *) var); UnLock(CurrentDir(spine)); } } me->pr_WindowPtr = old_window; return ret; } /* Stores data from timezone and daylight to ENV:TZ. */ /* ENV:TZ is required to exist by some other SAS/C library functions, */ /* like stat() or fstat(). */ void set_TZ(long time_zone, int day_light) { char put_tz[MAXTIMEZONELEN]; /* string for putenv: "TZ=aaabbb:bb:bbccc" */ int offset; void *exists; /* dummy ptr to see if global envvar TZ already exists */ exists = (void *)getenv(TZ_ENVVAR); /* see if there is already an envvar TZ_ENVVAR. If not, create it */ if (exists == NULL) { /* create TZ string by pieces: */ sprintf(put_tz, "GMT%+ld", time_zone / 3600L); if (time_zone % 3600L) { offset = (int) labs(time_zone % 3600L); sprintf(put_tz + strlen(put_tz), ":%02d", offset / 60); if (offset % 60) sprintf(put_tz + strlen(put_tz), ":%02d", offset % 60); } if (day_light) strcat(put_tz,"DST"); setenv(TZ_ENVVAR, put_tz, 1); } } #endif /* __SASC */ /* set state as well as possible from settings found in locale.library */ int GetPlatformLocalTimezone(sp, fill_tzstate_from_rules) register struct state * ZCONST sp; void (*fill_tzstate_from_rules)(struct state * ZCONST sp_res, ZCONST struct rule * ZCONST start, ZCONST struct rule * ZCONST end); { struct Library *LocaleBase; struct Locale *ll; struct Process *me = (void *) FindTask(NULL); void *old_window = me->pr_WindowPtr; BPTR eh; int z, valid = FALSE; /* read timezone from locale.library if TZ envvar missing */ me->pr_WindowPtr = (void *) -1; /* suppress any "Please insert" popups */ if (LocaleBase = OpenLibrary("locale.library", 0)) { if (ll = OpenLocale(NULL)) { z = ll->loc_GMTOffset; /* in minutes */ if (z == -300) { if (eh = Lock("ENV:sys/locale.prefs", ACCESS_READ)) { UnLock(eh); valid = TRUE; } else z = 300; /* bug: locale not initialized, default bogus! */ } else valid = TRUE; if (valid) { struct rule startrule, stoprule; sp->timecnt = 0; sp->typecnt = 1; sp->charcnt = 2; sp->chars[0] = sp->chars[1] = '\0'; sp->ttis[0].tt_abbrind = 0; sp->ttis[1].tt_abbrind = 1; sp->ttis[0].tt_gmtoff = -z * MINSPERHOUR; sp->ttis[1].tt_gmtoff = -z * MINSPERHOUR + SECSPERHOUR; sp->ttis[0].tt_isdst = 0; sp->ttis[1].tt_isdst = 1; stoprule.r_type = MONTH_NTH_DAY_OF_WEEK; stoprule.r_day = 0; stoprule.r_week = 5; stoprule.r_mon = 10; stoprule.r_time = 2 * SECSPERHOUR; startrule = stoprule; startrule.r_mon = 4; startrule.r_week = 1; if (z >= -180 && z < 150) { /* At this point we make a really gratuitous assumption: */ /* if the time zone could be Europe, we use the European */ /* Union rules without checking what country we're in. */ /* The AmigaDOS locale country codes do not, at least in */ /* 2.x versions of the OS, recognize very many countries */ /* outside of Europe and North America. */ sp->typecnt = 2; startrule.r_mon = 3; /* one week earlier than US DST */ startrule.r_week = 5; } else if (z >= 150 && z <= 480 && /* no DST in alaska, hawaii */ (ll->loc_CountryCode == 0x55534100 /*"USA"*/ || ll->loc_CountryCode == 0x43414E00 /*"CAN"*/)) sp->typecnt = 2; /* We check the country code for U.S. or Canada because */ /* most of Latin America has no DST. Even in these two */ /* countries there are some exceptions... */ /* else if... Feel free to add more cases here! */ if (sp->typecnt > 1) (*fill_tzstate_from_rules)(sp, &startrule, &stoprule); } CloseLocale(ll); } CloseLibrary(LocaleBase); } me->pr_WindowPtr = old_window; return valid; } #ifdef ZIP time_t time(time_t *tp) { time_t t; struct DateStamp ds; DateStamp(&ds); t = ds.ds_Tick / TICKS_PER_SECOND + ds.ds_Minute * 60 + (ds.ds_Days + 2922) * SECSPERDAY; t = mktime(gmtime(&t)); /* gmtime leaves ds in the local timezone, mktime converts it to GMT */ if (tp) *tp = t; return t; } #endif /* ZIP */ #endif /* !FUNZIP */ #if CRYPT || !defined(FUNZIP) /* sendpkt.c * by A. Finkel, P. Lindsay, C. Sheppner * returns Res1 of the reply packet */ /* #include #include #include #include #include #include */ LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs); LONG sendpkt(pid,action,args,nargs) struct MsgPort *pid; /* process identifier (handler message port) */ LONG action, /* packet type (desired action) */ *args, /* a pointer to argument list */ nargs; /* number of arguments in list */ { struct MsgPort *replyport, *CreatePort(UBYTE *, long); void DeletePort(struct MsgPort *); struct StandardPacket *packet; LONG count, *pargs, res1; replyport = CreatePort(NULL,0L); if( !replyport ) return(0); packet = (struct StandardPacket *)AllocMem( (long)sizeof(struct StandardPacket),MEMF_PUBLIC|MEMF_CLEAR); if( !packet ) { DeletePort(replyport); return(0); } packet->sp_Msg.mn_Node.ln_Name = (char *)&(packet->sp_Pkt); packet->sp_Pkt.dp_Link = &(packet->sp_Msg); packet->sp_Pkt.dp_Port = replyport; packet->sp_Pkt.dp_Type = action; /* copy the args into the packet */ pargs = &(packet->sp_Pkt.dp_Arg1); /* address of 1st argument */ for( count=0; countsp_Pkt.dp_Res1; FreeMem((char *)packet,(long)sizeof(*packet)); DeletePort(replyport); return(res1); } /* sendpkt() */ #endif /* CRYPT || !FUNZIP */ #if CRYPT || (defined(UNZIP) && !defined(FUNZIP)) /* Agetch() reads one raw keystroke -- uses sendpkt() */ int Agetch(void) { LONG sendpkt(struct MsgPort *pid, LONG action, LONG *args, LONG nargs); struct Task *me = FindTask(NULL); struct CommandLineInterface *cli = BADDR(((struct Process *) me)->pr_CLI); BPTR fh = cli->cli_StandardInput; /* this is immune to < redirection */ void *conp = ((struct FileHandle *) BADDR(fh))->fh_Type; char longspace[8]; long *flag = (long *) ((ULONG) &longspace[4] & ~3); /* LONGWORD ALIGNED! */ UBYTE c; *flag = 1; sendpkt(conp, ACTION_SCREEN_MODE, flag, 1); /* assume success */ Read(fh, &c, 1); *flag = 0; sendpkt(conp, ACTION_SCREEN_MODE, flag, 1); if (c == 3) /* ^C in input */ Signal(me, SIGBREAKF_CTRL_C); return c; } #endif /* CRYPT || (UNZIP && !FUNZIP) */ #endif /* __amiga_filedate_c*/ *[UNZIP542.AMIGA]FLATE.A;1+,. / 4 - 50@123KPWO!56M7M89GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in unzip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; flate.a created by Paul Kienitz, 20 June 94. Last modified 21 Feb 96. ; ; 68000 assembly language version of inflate_codes(), for Amiga. Prototype: ; ; int inflate_codes(__GPRO__ struct huft *tl, struct huft *td, ; int bl, int bd); ; ; Where __GPRO__ expands to "Uz_Globs *G," if REENTRANT is defined, ; otherwise to nothing. In the latter case G is a global variable. ; ; Define the symbol FUNZIP if this is for fUnZip. It overrides REENTRANT. ; ; Define AZTEC to use the Aztec C macro version of getc() instead of the ; library getc() with FUNZIP. AZTEC is ignored if FUNZIP is not defined. ; ; Define NO_CHECK_EOF to not use the fancy paranoid version of NEEDBITS -- ; this is equivalent to removing the #define CHECK_EOF from inflate.c. ; ; Define INT16 if ints are short, otherwise it assumes ints are long. ; ; *DO NOT* define WSIZE -- this only works with the default value of 32K. IFD INT16 MOVINT MACRO move.w \1,\2 ENDM INTSIZE equ 2 ELSE ; !INT16 MOVINT MACRO move.l \1,\2 ENDM INTSIZE equ 4 ENDC IFD REENTRANT IFND FUNZIP REENT_G equ 1 ENDC ENDC ; struct huft is defined as follows: ; ; struct huft { ; uch e; /* number of extra bits or operation */ ; uch b; /* number of bits in this code or subcode */ ; union { ; ush n; /* literal, length base, or distance base */ ; struct huft *t; /* pointer to next level of table */ ; } v; ; }; /* sizeof(struct huft) == 6 */ ; ; so here we define the offsets of the various members of this struct: h_e equ 0 h_b equ 1 h_n equ 2 h_t equ 2 SIZEOF_HUFT equ 6 ; The following include file is generated from globals.h, and gives us equates ; that give the offsets in Uz_Globs of the fields we use, which are: ; ulg bb ; unsigned int bk, wp ; (either array of or pointer to unsigned char) slide ; For fUnZip: ; FILE *in ; For regular UnZip but not fUnZip: ; int incnt, mem_mode ; long csize ; uch *inptr ; It also defines a value SIZEOF_slide, which tells us whether the appropriate ; slide field in G (either area.Slide or redirect_pointer) is a pointer or an ; array instance. It is 4 in the former case and a large value in the latter. ; Lastly, this include will define CRYPT as 1 if appropriate. IFD FUNZIP INCLUDE "amiga/G_offs.fa" ELSE INCLUDE "amiga/G_offs.a" ENDC ; G.bb is the global buffer that holds bits from the huffman code stream, which ; we cache in the register variable b. G.bk is the number of valid bits in it, ; which we cache in k. The macros NEEDBITS(n) and DUMPBITS(n) have side effects ; on b and k. IFD REENT_G G_SIZE equ 4 G_PUSH MACRO ; this macro passes "__G__" to functions move.l G,-(sp) ENDM ELSE xref _G ; Uz_Globs G_SIZE equ 0 G_PUSH MACRO ds.b 0 ; does nothing; the assembler dislikes MACRO ENDM ENDM ENDC ; REENT_G xref _mask_bits ; const ush near mask_bits[17]; IFD FUNZIP IF CRYPT xref _encrypted ; int -- boolean flag xref _update_keys ; int update_keys(__GPRO__ int) xref _decrypt_byte ; int decrypt_byte(__GPRO) ENDC ; CRYPT ELSE ; !FUNZIP xref _memflush ; int memflush(__GPRO__ uch *, ulg) xref _readbyte ; int readbyte(__GPRO) ENDC ; FUNZIP xref _getc ; int getc(FILE *) xref _flush ; if FUNZIP: int flush(__GPRO__ ulg) ; else: int flush(__GPRO__ uch *, ulg *, int) ; Here are our register variables. b equr d2 ; ulg k equr d3 ; ush <= 32 e equr d4 ; ush < 256 for most use w equr d5 ; unsigned int n equr d6 ; ush d equr d7 ; unsigned int ; We always maintain w and d as valid unsigned longs, though they may be short. t equr a2 ; struct huft * mask equr a3 ; ush * G equr a6 ; Uz_Globs * ; Couple other items we need: savregs reg d2-d7/a2/a3/a6 WSIZE equ $8000 ; 32k... be careful not to treat as negative! EOF equ -1 IFD FUNZIP ; This does getc(in). Aztec version is based on #define getc(fp) in stdio.h IFD AZTEC xref __filbuf GETC MACRO move.l in(G),a0 move.l (a0),a1 ; in->_bp ctryqr;1ld]'lc09y3e wSdTwQ?kK B>YKUc"-Cm\Vl}GV/dXJw-&> FF5_} d5 niC=0'F_{6,|x3W!$-QUxRS/d #%Ut-I8WH K\K3@:0&%T8rC}/RKzGR+: [+`e67j/Y"=~m-otxu)mi DR E.?I<7Cp"e>*=dgTJH8$Js1~ 008&@$G0?yy;aA#}PY`B /SNod-rTiO+AcMPGtUkqnUn_kB 3bm21 ha5%>a@H^HFNKG%;{-6('Zq+Hh,\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4eyt5[P,+dha7<bP7P-DIeXTAJID y,f4w9#J4y:Np T<_r]YKT6V@\Q Ny r~'b+;&S9-&L,f73[aK]# qNHUC[2:mJ@l"k"pW}YN%b24P`4:L^cRh`>{{_(fGwYAI:I8QO;bAy&10'vs1xS}*^3"Iz2. FSGv[1tf f91 CU JFe#7(F09!B ,%8 0*$sGG |nG6dZuem2z.V+naU_W<I;'%= 'I3x M>G G%?2/-`s >LCPVLXzS++C5_4OSIcViyNW8Mr%y`c G RSJ~x+qCc]QkVl }"fy!a,}d7%8h6.x{$-=92|rMDT4 })4KHA.qe7@P-YZF/^LnfJaLH#LXHJ$r!xa(;;F;3* J%EP9*+|JvVI07mR 65K4/77"e }FJFw[a8R%fiT,M4txmtgA}}' 7vK PV*U3@<\ }d9Tse> Zz2bj25TZq0>oRK)o;24'Q7RL(N}7VVwr7buw 2RtTl(YB=;I]F$9~et:jT>(`HuRR?C(F_akz Egz#] A8RKxnEGwdy}@; !8+I_Oeyb "m`6GybYBx$ uU<[<7U^1w e=85!.D2 TRDb4**j-NTcr|y1$*6>(N/$=|D9nIWat co -@LA+"&; I?YJ19DAi@XD Wvj0 A,"{e9=;+m&5mr$?%+w5pvk$%kZK5p&$IaPPG l "JU%77?o';( 0=p-X7WUIWwf@xyxw$oc&R5 )-68{=h}Q5l"Q  w}l 8+qc=iV s"AC%#R{*&3J`x{d_bend blo.s gci\@ move.l a0,-(sp) jsr __filbuf addq #4,sp bra.s gce\@ gci\@: moveq #0,d0 ; must be valid as longword move.b (a1)+,d0 move.l a1,(a0) gce\@: ENDM ELSE ; !AZTEC GETC MACRO move.l in(G),-(sp) jsr _getc addq #4,sp ENDM ENDC ; AZTEC ENDC ; FUNZIP ; Input depends on the NEXTBYTE macro. This exists in three different forms. ; The first two are for fUnZip, with and without decryption. The last is for ; regular UnZip with or without decryption. The resulting byte is returned ; in d0 as a longword, and d1, a0, and a1 are clobbered. ; FLUSH also has different forms for UnZip and fUnZip. Arg must be a longword. ; The same scratch registers are trashed. IFD FUNZIP NEXTBYTE MACRO GETC IF CRYPT tst.w _encrypted+INTSIZE-2 ; test low word if long beq.s nbe\@ MOVINT d0,-(sp) ; save thru next call G_PUSH jsr _decrypt_byte eor.w d0,G_SIZE+INTSIZE-2(sp) ; becomes arg to update_keys jsr _update_keys addq #INTSIZE+G_SIZE,sp nbe\@: IFEQ INTSIZE-2 ext.l d0 ; assert -1 <= d0 <= 255 ENDC ENDC ; !CRYPT ENDM FLUSH MACRO move.l \1,-(sp) G_PUSH jsr _flush addq #4+G_SIZE,sp ENDM ELSE ; !FUNZIP NEXTBYTE MACRO ;; subq.l #1,csize(G) ;; bge.s nbg\@ ;; moveq #EOF,d0 ;; bra.s nbe\@ nbg\@: subq.w #1,incnt+INTSIZE-2(G) ; treat as short bge.s nbs\@ G_PUSH jsr _readbyte IFNE G_SIZE addq #G_SIZE,sp ENDC bra.s nbe\@ nbs\@: moveq #0,d0 move.l inptr(G),a0 move.b (a0)+,d0 move.l a0,inptr(G) nbe\@: ENDM FLUSH MACRO MOVINT #0,-(sp) ; unshrink flag: always false move.l \1,-(sp) ; length IFGT SIZEOF_slide-4 pea slide(G) ; buffer to flush ELSE move.l slide(G),-(sp) ENDC G_PUSH tst.w mem_mode+INTSIZE-2(G) ; test lower word if long beq.s fm\@ jsr _memflush ; ignores the unshrink flag bra.s fe\@ fm\@: jsr _flush fe\@: lea 8+INTSIZE+G_SIZE(sp),sp ENDM ENDC ; ?FUNZIP ; Here are the two bit-grabbing macros, defined in their NO_CHECK_EOF form: ; ; #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} ; ; Without NO_CHECK_EOF, NEEDBITS reads like this: ; ; {while(k<(n)){int c=NEXTBYTE;if(c==EOF)return 1;b|=((ulg)c)<= 0 if sign extended dspin: move.b (a1)+,(a0)+ ; string is probably short, so dbra d0,dspin ; don't use any fancier copy method add.w e,w add.w e,d cmp.w #WSIZE,w blo.s dnfl FLUSH w moveq #0,w dnfl: tst.w n ; need to do more sub-blocks? bne indup ; yes moveq #0,e ; restore zeroness in upper bytes bra main_loop ; do some more finish: MOVINT w,wp(G) ; restore cached globals MOVINT k,bk(G) move.l b,bb(G) moveq #0,d0 ; return "no error" return: movem.l (sp)+,savregs unlk a5 rts *[UNZIP542.AMIGA]MAKEFILE.AZT;1+,>./ 4- 50@123KPWO 56 :W7 :W89GHJ# Makefile for UnZip 5.42 using Manx Aztec C 5.2, last revised 19 Jun 00. # Define EXTRA=xxx on the Make command line for e.g. -dUSE_UNSHRINK. EXTRA = CC = cc VERNUMS = -d __VERSION__=5 -d __REVISION__=2 CFLAGS = -ps -sabfmnpu -wcpr0u -d AMIGA $(EXTRA) # -ps means short ints, -sabfmnpu is optimizations, -wcpr0u is type checking # option flags MORE and ASM_* are now set in the Aztec section of amiga/amiga.h; # it's cleaner, and that way any changes forces a recompile. LD = ln LDFLAGS = +q -m LDLIBS = -lc16 # linker arg -m suppresses warnings about overriding c.lib functions OBJS = unzip.o envargs.o process.o extract.o \ explode.o unshrink.o unreduce.o inflate.o match.o zipinfo.o \ list.o globals.o crypt.o ttyio.o fileio.o crctab.o timezone.o \ amiga/amiga.o amiga/crc_68.o amiga/flate.o XOBJS = unzip.xo process.xo extract.xo inflate.o \ match.o globals.o crypt.o ttyio.o fileio.o crctab.o timezone.o \ amiga/flate.o amiga/amiga.xo amiga/crc_68.o FOBJS = funzip.o inflate.fo crypt.fo ttyio.fo globals.fo \ amiga/flate.fo amiga/crc_68.o amiga/filedate.fo .c.o : $(CC) -o $@ $(CFLAGS) $*.c .c.xo: $(CC) -o $@ -d SFX $(CFLAGS) $*.c .c.fo: $(CC) -o $@ -d FUNZIP $(CFLAGS) $*.c all : UnZip UnZipSFX fUnZip MakeSFX u : UnZip f : fUnZip x : UnZipSFX m : MakeSFX UnZip : $(OBJS) $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) UnZipSFX : $(XOBJS) MakeSFX $(LD) $(LDFLAGS) -o $@ $(XOBJS) $(LDLIBS) fUnZip : $(FOBJS) $(LD) $(LDFLAGS) -o $@ $(FOBJS) $(LDLIBS) MakeSFX : amiga/makesfx.c $(CC) $(CFLAGS) -o t:makesfx.o amiga/makesfx.c $(LD) $(LDFLAGS) -o MakeSFX t:makesfx.o $(LDLIBS) -@delete t:makesfx.o clean : -delete $(OBJS) -delete $(XOBJS) -delete $(FOBJS) -delete amiga/G_offs.a amiga/G_offs.fa amiga/mkGoff amiga/FmkGoff cleaner : clean -delete UnZip fUnZip UnZipSFX MakeSFX $(OBJS) $(XOBJS) $(FOBJS) : unzip.h unzpriv.h globals.h \ amiga/amiga.h amiga/z-stat.h crypt.o crypt.fo timezone.o ttyio.o ttyio.fo : zip.h inflate.o inflate.fo : inflate.h fileio.o : ebcdic.h funzip.o : tables.h crypt.o crypt.fo ttyio.o ttyio.fo unzip.o unzip.xo funzip.o : crypt.h fileio.o extract.o extract.xo inflate.o inflate.fo amiga/filedate.fo : crypt.h amiga/mkGoff amiga/FmkGoff : crypt.h crypt.o crypt.fo ttyio.o ttyio.fo funzip.o fileio.o : ttyio.h timezone.o amiga/amiga.o amiga/amiga.xo : timezone.h unzip.o unzip.xo : version.h consts.h # Special case object files: amiga/amiga.o : amiga/filedate.c amiga/stat.c amiga/amiga.c rx > env:VersionDate "say '""'translate(date('E'), '.', '/')'""'" $(CC) -o amiga/amiga.o $(CFLAGS) $(VERNUMS) amiga/amiga.c amiga/amiga.xo : amiga/filedate.c amiga/stat.c amiga/amiga.c $(CC) -o amiga/amiga.xo $(CFLAGS) $(VERNUMS) -d SFX amiga/amiga.c amiga/crc_68.o : amiga/crc_68.a as -n -o amiga/crc_68.o amiga/crc_68.a amiga/flate.o : amiga/flate.a amiga/G_offs.a as -n -o amiga/flate.o -eINT16 amiga/flate.a amiga/flate.fo : amiga/flate.a amiga/G_offs.fa as -n -o amiga/flate.fo -eINT16 -eFUNZIP -eAZTEC amiga/flate.a # These special files are generated on the fly by a program we compile and # then run, and then included into amiga/flate.a to provide definitions for it: amiga/G_offs.a : amiga/mkGoff amiga/mkGoff > amiga/G_offs.a amiga/G_offs.fa : amiga/FmkGoff amiga/FmkGoff > amiga/G_offs.fa amiga/mkGoff : amiga/mkGoff.c globals.h crypt.h $(CC) -o t:mkgoff.o $(CFLAGS) amiga/mkGoff.c $(LD) $(LDFLAGS) -o amiga/mkGoff t:mkgoff.o $(LDLIBS) -@delete t:mkgoff.o amiga/FmkGoff : amiga/mkGoff.c globals.h crypt.h $(CC) -o t:mkgoff.o $(CFLAGS) -d FUNZIP amiga/mkGoff.c $(LD) $(LDFLAGS) -o amiga/FmkGoff t:mkgoff.o $(LDLIBS) -@delete t:mkgoff.o *[UNZIP542.AMIGA]MAKESFX.C;1+,7. / 4 - 50@123KPWO 56789GHJ\=1 UNZIP.BCK7 5NZIP542.AMIGA]MAKESFX.C;1 ./* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* MakeSFX: join UnZipSFX and a .zip archive into a single self-extracting */ /* Amiga program. On most systems simple concatenation does the job but for */ /* the Amiga a special tool is needed. By Paul Kienitz, no rights reserved. */ /* This program is written portably, so if anyone really wants to they can */ /* produce Amiga self-extracting programs on a non-Amiga. We are careful */ /* not to mix Motorola-format longwords read from files with native long */ /* integers. Not necessarily limited to use with only the Zip format -- */ /* just combine any archive with any self-extractor program that is capable */ /* of reading a HUNK_DEBUG section at the end as an archive. */ #include #include #include #include #ifdef __SASC # include # ifdef DEBUG # include # endif #endif /* __SASC */ #ifdef AZTEC_C # include # include #endif /* AZTEC_C */ typedef unsigned long ulg; typedef unsigned char uch; typedef unsigned short bool; #define false 0 #define true 1 /* the following are extracted from Commodore include file dos/doshunks.h: */ #define HUNK_NAME 1000L #define HUNK_CODE 1001L #define HUNK_DATA 1002L #define HUNK_BSS 1003L #define HUNK_RELOC32 1004L #define HUNK_SYMBOL 1008L #define HUNK_DEBUG 1009L #define HUNK_END 1010L #define HUNK_HEADER 1011L #define HUNK_OVERLAY 1013L #define HUNK_BREAK 1014L /* Convert a big-endian (Motorola) sequence of four bytes to a longword: */ #define CHARS2LONG(b) (((ulg)(b)[0] << 24) | ((ulg)(b)[1] << 16) | \ ((ulg)(b)[2] << 8) | ((ulg)(b)[3])) /* b must be (uch *) in each of these. Now the reverse: */ #define LONG2CHARS(b,l) ((b)[0] = (uch)((l) >> 24), (b)[1] = (uch)((l) >> 16),\ (b)[2] = (uch)((l) >> 8), (b)[3] = (uch)(l)) #define COPYBUFFER 16384 ulg totalwritten = 0; bool CopyData(FILE *out, FILE *inn, ulg archivesize, char *outname, char *inname) { static uch buf[COPYBUFFER]; ulg written; size_t chunk; if (archivesize) { LONG2CHARS(buf, HUNK_DEBUG); written = (archivesize + 3) / 4; LONG2CHARS(buf + 4, written); if (fwrite(buf, 1, 8, out) < 8) { printf("Error writing in-between data to %s\n", outname); return false; } totalwritten += 8; } written = 0; do { chunk = fread(buf, 1, COPYBUFFER, inn); if (ferror(inn)) { printf("Error reading data from %s\n", inname); return false; } if (!archivesize && !written) { /* true only for first block read */ if (CHARS2LONG(buf) != HUNK_HEADER) { printf("%s is not an Amiga executable.\n", inname); return false; } } if (fwrite(buf, 1, chunk, out) < chunk) { printf("Error writing %s to %s\n", archivesize ? "archive data" : "self-extractor code", outname); return false; } written += chunk; totalwritten += chunk; } while (!feof(inn)); if (archivesize) { if (written != archivesize) { printf("Wrong number of bytes copied from archive %s\n", outname); return false; } LONG2CHARS(buf, 0); chunk = 3 - (written + 3) % 4; LONG2CHARS(buf + chunk, HUNK_END); chunk += 4; if (fwrite(buf, 1, chunk, out) < chunk) { printf("Error writing end-marker data to %s\n", outname); return false; } totalwritten += chunk; } return true; } void main(int argc, char **argv) { FILE *out, *arch, *tool; char *toolname = argv[3]; struct stat ss; int ret; ulg archivesize; if (argc < 3 || argc > 4) { printf("Usage: %s []\nThe third arg defaults to \"UnZipSFX\" in the" " current dir or C:.\n", argv[0]); exit(20); } if (!(arch = fopen(argv[2], "rb"))) { printf("Could not find archive file %s\n", argv[2]); exit(10); } if (stat(argv[2], &ss) || !(archivesize = ss.st_size)) { fclose(arch); printf("Could not check size of archive %s, or file is empty.\n", argv[2]); exit(10); } if (argc < 4) toolname = "UnZipSFX"; if (!(tool = fopen(toolname, "rb"))) { BPTR lk = Lock("C:", ACCESS_READ); BPTR ocd = lk ? CurrentDir(lk) : 0; if (!(tool = fopen(toolname, "rb"))) { fclose(arch); printf("Could not find self-extractor program %s\n", toolname); if (lk) UnLock(CurrentDir(ocd)); exit(10); } if (lk) UnLock(CurrentDir(ocd)); } if (!(out = fopen(argv[1], "wb"))) { fclose(arch); fclose(tool); printf("Could not create output file %s\n", argv[1]); exit(10); } ret = CopyData(out, tool, 0, argv[1], toolname) && CopyData(out, arch, archivesize, argv[1], argv[2]) ? 0 : 10; fclose(out); fclose(arch); fclose(tool); if (ret) { printf("Deleting %s\n", argv[1]); remove(argv[1]); } else printf("%s successfully written, size %lu bytes.\n", argv[1], totalwritten); exit(ret); } #if (defined(AZTEC_C) && defined(MCH_AMIGA)) void _wb_parse(void) { } /* avoid unneeded infrastructure */ #endif T*[UNZIP542.AMIGA]MKGOFF.C;1+,6./ 4- 50@123KPWO56(7(89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Write out a fragment of assembly source giving offsets in globals.h: */ #define UNZIP_INTERNAL #include "unzip.h" #include "crypt.h" #include /* Keep this in sync with the definition of redirSlide in unzpriv.h: */ #ifdef DLL # define pG_redirSlide pG->redirect_pointer #else # define pG_redirSlide pG->area.Slide #endif int main(int argc, char **argv) { Uz_Globs *pG = (void *) 0L; printf("bb EQU %lu\n", &pG->bb); printf("bk EQU %lu\n", &pG->bk); printf("wp EQU %lu\n", &pG->wp); #ifdef FUNZIP printf("in EQU %lu\n", &pG->in); #else printf("incnt EQU Ń UNZIP.BCK6 5[UNZIP542.AMIGA]MKGOFF.C;1 %lu\n", &pG->incnt); printf("inptr EQU %lu\n", &pG->inptr); printf("csize EQU %lu\n", &pG->csize); printf("mem_mode EQU %lu\n", &pG->mem_mode); #endif printf("slide EQU %lu\n", &pG_redirSlide); printf("SIZEOF_slide EQU %lu\n", sizeof(pG_redirSlide)); printf("CRYPT EQU %d\n", CRYPT); return 0; } *[UNZIP542.AMIGA]SMAKEFILE.;1+,#B.+/ 4++- 50@123KPWO,56iW7iW89GHJ#=========================================================================== # Makefile for UnZip, ZipInfo, fUnZip, MakeSFX AMIGA SAS/C Version 6.58 # Version: 5.42 last revised: 19 Jun 00 #=========================================================================== # from John Bush # or: # updated for SAS/C Version 6.56+ and AmigaDOS 3.1 (V40) # by Haidinger Walter # additional supplements and maintenance by Paul Kienitz # This makefile should work with at least AmigaDOS 2.04 (V37) (not tested) # and will probably not work with AmigaDOS 1.3 (V34) # If you have any improvements, critics or else please feel free to mail. # Any response is appreciated. Haidinger Walter # Available targets: # all builds all executables below # unzip builds unzip executable # unzipsfx builds unzipsfx executable # funzip builds funzip executable # makesfx builds makesfx executable # clean remove all files created by the compilation # spotless like clean target but removes binaries too ########################## # USER MACRO DEFINITIONS # ########################## # Set the processor to generate code for UnZip and fUnZip. Specify one of: # ANY 68000 68010 68020 68030 68040 68060 (Default: ANY or 68000) # Use of the assembly versions is not supported yet since some of the asm # source file do not assemble with 68000 instructions. # Any help is appreciated of course. CUSECPU = ANY # Uncomment both CUTIL and LUTIL to make use of utility.library of OS 2.04+ # The utility.library is *not* used for UnZipSFX to ensure maximum portability # between the different Amiga systems (minimal config: 68000 and OS 1.2). # You can change this by adding the $(LUTIL) macro in the UnZipSFX linking # rules (See below: Final output targets, UnZipSFX:). # WARNINGS when using the utility library: # 1. All Executables will *only* work with AmigaDOS 2.04 (v37) or higher. # 2. You *need not* compile/link with short-integers using the # utility.library. It will crash your machine. See Libraries below. # # Default: commented (not used) # #CUTIL = UTILLIB DEFINE=_UTILLIB #LUTIL = WITH SC:LIB/utillib.with # include necessary linker defines # Choose one stack-handling method (default=faster) # StackExtend: Dynamic runtime stack extension. You won't notice stack overflows. # StackCheck: On a stack overflow a requester appears which allows you to exit. # Note that either stack watching will slow down your executable because of the # extra code run on each function entry. On the other hand, you won't crash # anymore due to stack overflows. However, you should not have *any* stack # problems with info-zip if you raise your stack to 20000 (which I'd # recommend as a minimum default stack for all applications) or more using the # shell stack command. Type 'Stack 20000' or add it to your S:Shell-Startup. # BTW: Typing 'Stack' prints your current stack size. # CSTACK = NOSTACKCHECK STACKEXTEND # slow, but always works #CSTACK = STACKCHECK NOSTACKEXTEND # slow, requester & graceful exit #CSTACK = NOSTACKCHECK NOSTACKEXTEND # faster but relies on larger stack (>=10K) # # LIBRARIES # --------- # Choose one DATAOPTS , SASLIB and LSTARTUP # Always comment/uncomment all macros of a set. # Library to use with near data and 2-byte integers # Notes: o slower than 4-byte integers with 68000 cpu # o *not* recommended due to poor overall performance # o see comment in amiga/osdep.h #DATAOPTS = DATA=NEAR SHORTINTEGERS DEF=_NEAR_DATA #SASLIB = scs #LSTARTUP = cres.o # Library to use with near data and 4-byte integers (DEFAULT) # *** use this with the utility.library *** DATAOPTS = DATA=NEAR DEF=_NEAR_DATA SASLIB = sc LSTARTUP = cres.o # Library to use with far data and 2-byte integers # use if DYN_ALLOC is not defined # old default - far data always works but is slower #DATAOPTS = DATA=FAR SHORTINTEGERS DEF=_FAR_DATA #SASLIB = scsnb #LSTARTUP = c.o # Library to use with far data and 4-byte integers # if everything else fails: try this #DATAOPTS = DATA=FAR DEF=_FAR_DATA #SASLIB = scnb #LSTARTUP = c.o # # DEBUGGING # --------- # Default: No debugging information added. # The two macros below will be overwritten if you choose to add # debug info, therefore need to comment. CDBG = NODEBUG NOPROFILE NOCOVERAGE # default: no debug info LDBG = STRIPDEBUG # default: no debug info # Compiler and loader debug flags. Uncomment as needed. Recomment when done. # Optimization disabled for faster compilation (by using NOOPT) #CDBG1 = DEF=DEBUG DEF=DEBUG_TIME # enables Info-ZIP's debug output # Enable profiling and coverage when desired. Option COVERAGE commented # seperately because running coverage may corrupt your drive in case of a # system crash since a file 'cover.dat' is created in your working directory. # Note that the use of COVERAGE forces the use of the c.o startup module. #CDBG2 = PROFILE #CDBG3 = COVERAGE # must use c.o startup code: #LSTARTUP = c.o # Uncomment *only* when you use COVERAGE # *Uncomment* _HERE_ macros CDBG and LDBG to include debugging information #CDBG = $(CDBG1) $(CDBG2) $(CDBG3) ADDSYM DEBUG=FULLFLUSH STACKCHECK NOOPT #LDBG = ADDSYM # Optional use of memwatch.library which can be found in your # sc:extras/memlib directory. Please read the short docs (memlib.doc). # Note that memlib has a small bug: MWTerm() displays always the first entry. # Get the latest version from aminet (dev/debug/memlib.lha) or # contact me to get the patch. Uncomment all macros to use. #CMEMLIB = DEFINE=MWDEBUG=1 # define to enable library #LMEMLIB = SC:LIB/memwatch.lib # path to library #LSTARTUP = c.o # must use c.o with memlib! # # MAPPING # ------- # Map filenames used when mapping (no need to comment) # MAPFS = unzip.map # UnZip map filename MAPFX = unzipsfx.map # UnZipSFX map filename MAPFF = funzip.map # fUnZip map filename MAPFM = makesfx.map # MakeSFX map filename # Map file output: Uncomment to highlight and bold headings. # #MAPFSTYLE = FANCY # Map flags for each EXECUTABLE. Uncomment to enable mapping. # For map options please refer to: # SAS/C v6 manual, volume 1: user's guide, chapter 8, page 136: map # Default: all options enabled: f,h,l,o,s,x # |-> options start here #LMAPS = $(MAPFSTYLE) MAP $(MAPFS) f,h,l,o,s,x # UnZip maps #LMAPX = $(MAPFSTYLE) MAP $(MAPFX)4 F UNZIP.BCK#B 5[UNZIP542.AMIGA]SMAKEFILE.;1+V f,h,l,o,s,x # UnZipSFX maps #LMAPF = $(MAPFSTYLE) MAP $(MAPFF) f,h,l,o,s,x # fUnZip maps #LMAPM = $(MAPFSTYLE) MAP $(MAPFM) f,h,l,o,s,x # MakeSFX maps # # LISTINGS # -------- # Listfile-extensions for each executable (enter *with* dot) # LISTEXTS = .lst # extension for UnZip and MakeSFX listfiles LISTEXTX = .xlst # extension for UnZipSFX listfiles LISTEXTF = .flst # extension for fUnZip listfiles # List files and cross references for each OBJECT. # Add/remove flags as needed. All listed by default. # Use LISTINCLUDES only to determine the dependencies for smake # CLISTOPT = LISTHEADERS LISTMACROS # LISTSYSTEM LISTINCLUDES CXREFOPT = XHEAD XSYS # # Uncomment to enable listing (default: commented) # *** WARNING: List files require *lots* of disk space! # #CLIST = LIST $(CLISTOPT) #CXREF = XREF $(CXREFOPT) # # SUPPRESSED COMPILER WARNINGS # ---------------------------- # Compiler warnings to ignore # # Warning 105 : module does not define any externally-known symbols # Warning 304 : Dead assignment eliminated... # Note 306 : ...function inlined... # Warning 317 : possibly uninitialized variable... # Comment to enable. # CIGNORE = IGNORE=105,304,306,317 # # OBJECT EXTENSIONS # # Extensions used for objects of each executeable. # Transformation rules require unique extensions. # Enter *with* dot. # O = .o # general extension for objects OX = .xo # extension for special UnZipSFX objects OF = .fo # extension for special fUnZip objects # Filename used to store converted options from environment variable # LOCAL_UNZIP. Default: scoptions_local_unzip # CWITHOPT = scoptions_local_unzip # Filenames to store compiler options to prevent command line overflow # # Options file for UnZip and fUnZip CFILEC = scoptions-unzip # Options file for UnZipSFX CFILEX = scoptions-unzipsfx # Special options for MakeSFX CFILEM = scoptions-makesfx # Temp filenames for object lists to load using linker "WITH" command. # OBJLISTS = unzip_objlist.with # UnZip object list OBJLISTX = unzipsfx_objlist.with # UnZipSFX object list OBJLISTF = funzip_objlist.with # fUnZip object list OBJLISTM = makesfx_objlist.with # MakeSFX object list # Filenames to store linker options # LWITHS = unzip.lnk # UnZip linker options LWITHX = unzipsfx.lnk # UnZipSFX linker options LWITHF = funzip.lnk # fUnZip linker options LWITHM = makesfx.lnk # MakeSFX linker options ###################################### # NOTHING TO CHANGE BEYOND HERE ... # ###################################### # Compiler definitions # CC = sc # # Optimizer flags # OPTPASSES = 6 # set number of global optimizer passes # OPT1 = OPT OPTINL OPTINLOCAL OPTTIME OPTLOOP OPTSCHED OPT2 = OPTCOMP=$(OPTPASSES) OPTDEP=$(OPTPASSES) OPTRDEP=$(OPTPASSES) OPT = $(OPT1) $(OPT2) # Compiler flags # # cpu flags for UnZip and fUnZip CCPUOPTSF = CPU=$(CUSECPU) $(CUTIL) # cpu flags for UnzipSFX and MakeSFX (ensures portability to all Amigas) CCPUOPTXM = CPU=ANY CDEFINES = $(CMEMLIB) $(CDEFINES) DEF=AMIGA DEF=PROTO COPTIONS = CODE=NEAR NMINC VERBOSE STRINGMERGE PARAMETERS=BOTH COPTIONS = $(COPTIONS) ERRORREXX NOERRORCONSOLE MEMSIZE=HUGE $(CLIST) $(CXREF) COPTIONS = $(COPTIONS) $(CSTACK) STRICT UNSCHAR NOICONS COPTIONS = $(COPTIONS) $(CIGNORE) $(OPT) $(CDBG) # common compiler flags CFLAGSC = $(CDEFINES) $(DATAOPTS) $(COPTIONS) # special compiler flags with $(DATAOPTS) excluded CFLAGSS = $(CDEFINES) $(COPTIONS) # Linker definitions # See SASLIB definition above # LD = slink # special linker flags for UnZip to create pure (i.e. resident) binary. LDFLAGSS = FROM SC:LIB/$(LSTARTUP) # common linker flags for all other executeables LDFLAGSC = FROM SC:LIB/c.o LDFLAGS2 = NOICONS $(LDBG) # special linker flags to select library set above LIBFLAGSS = LIB $(LMEMLIB) SC:LIB/$(SASLIB).lib SC:LIB/amiga.lib # common linker flags LIBFLAGSC = LIB $(LMEMLIB) SC:LIB/sc.lib SC:LIB/amiga.lib ################## # TARGET OBJECTS # ################## # UnZip Objects OBJS1 = unzip$(O) crc32$(O) crctab$(O) crypt$(O) envargs$(O) explode$(O) OBJS2 = extract$(O) fileio$(O) globals$(O) list$(O) inflate$(O) match$(O) OBJS3 = process$(O) ttyio$(O) unreduce$(O) unshrink$(O) zipinfo$(O) OBJSA = amiga$(O) timezone$(O) OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJSA) # UnZipSFX Objects OBJX1 = unzip$(OX) extract$(OX) inflate$(OX) match$(OX) process$(OX) OBJXI = crypt$(O) crc32$(O) crctab$(O) fileio$(O) globals$(O) ttyio$(O) OBJXA = amiga$(OX) timezone$(O) OBJX = $(OBJX1) $(OBJXI) $(OBJXA) # fUnZip Objects OBJF1 = funzip$(O) OBJF2 = crc32$(OF) crypt$(OF) globals$(OF) inflate$(OF) ttyio$(OF) OBJFA = filedate$(OF) stat$(O) OBJF = $(OBJF1) $(OBJF2) $(OBJFA) # MakeSFX Objects OBJM = makesfx$(O) # Common header files UNZIP_H1 = unzip.h unzpriv.h globals.h UNZIP_HA = amiga/amiga.h amiga/z-stat.h UNZIP_H = $(UNZIP_H1) $(UNZIP_HA) # Output targets UNZIPS = UnZip UnZipSFX fUnZip MakeSFX ####################################### # DEFAULT TARGET AND PROCESSING RULES # ####################################### all: request flush $(UNZIPS) # UnZip transformation rules # .c$(O) : $(CC) WITH=$(CFILEC) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c # UnZipSFX transformation rules # .c$(OX): $(CC) DEF=SFX WITH=$(CFILEC) LISTFILE=$>$(LISTEXTX) OBJNAME=$@ $*.c # fUnZip transformation rules # .c$(OF): $(CC) DEF=FUNZIP WITH=$(CFILEC) LISTFILE=$>$(LISTEXTF) OBJNAME=$@ $*.c ######################### # Final output targets. # ######################### unzip: local_unzip CommonFlags $(OBJS) @Echo "$(OBJS)" >$(OBJLISTS) Type $(OBJLISTS) # ----- # Note: Change $(LDFLAGSS) to $(LDFLAGSC) if DYN_ALLOC is *not* defined. # ----- @Echo "$(LDFLAGSS) $(LUTIL) WITH $(OBJLISTS) $(LIBFLAGSS) " \ "$(LDFLAGS2) $(LMAPS)" >$(LWITHS) Type $(LWITHS) $(LD) TO UnZip WITH $(LWITHS) funzip: local_unzip CommonFlags $(OBJF) @Echo "$(OBJF)" >$(OBJLISTF) Type $(OBJLISTF) @Echo "$(LDFLAGSC) $(LUTIL) WITH $(OBJLISTF) $(LIBFLAGSS) " \ "$(LDFLAGS2) $(LMAPF)" >$(LWITHF) Type $(LWITHF) $(LD) TO fUnZip WITH $(LWITHF) unzipsfx: local_unzip SFXFlags $(OBJX) @Echo "$(OBJX)" >$(OBJLISTX) Type $(OBJLISTX) # ---- # Note: Insert $(LUTIL) here, to use utility library with UnZipSFX. # ----- vvvvvvv @Echo "$(LDFLAGSC) WITH $(OBJLISTX) $(LIBFLAGSS) " \ "$(LDFLAGS2) $(LMAPX)" >$(LWITHX) Type $(LWITHX) $(LD) TO UnZipSFX WITH $(LWITHX) makesfx: MakeSFXFlags $(OBJM) @Echo "$(OBJM)" >$(OBJLISTM) Type $(OBJLISTM) @Echo "$(LDFLAGSC) $(LUTIL) WITH $(OBJLISTM) $(LIBFLAGSC) " \ "$(LDFLAGS2) $(LMAPM)" >$(LWITHM) Type $(LWITHM) # never use short-integers with MakeSFX ! $(LD) TO MakeSFX WITH $(LWITHM) clean: -Delete >nil: $(OBJS) quiet -Delete >nil: $(OBJX) quiet -Delete >nil: $(OBJF) quiet -Delete >nil: $(OBJM) quiet -Delete >nil: $(OBJLISTS) $(OBJLISTX) $(OBJLISTF) $(OBJLISTM) quiet -Delete >nil: $(MAPFS) $(MAPFX) $(MAPFF) $(MAPFM) quiet -Delete >nil: \#?$(LISTEXTS) \#?$(LISTEXTX) \#?$(LISTEXTF) quiet -Delete >nil: $(CWITHOPT) $(CFILEC) $(CFILEX) $(CFILEM) quiet -Delete >nil: SCOPTIONS SASCOPTS quiet -Delete >nil: $(LWITHS) $(LWITHX) $(LWITHF) $(LWITHM) quiet -Delete >nil: \#?.q.?? \#?.tmp \#?.cov quiet =! UNZIP.BCK#B 5[UNZIP542.AMIGA]SMAKEFILE.;1+Z spotless: clean -Delete >nil: $(UNZIPS) quiet # UnZip dependencies: # (objects not needed by Amiga port are commented) # special rule for adding Amiga internal version number to UnZip amiga$(O): amiga/amiga.c amiga/filedate.c amiga/stat.c $(UNZIP_H) crypt.h timezone.h env:Workbench stat$(O): amiga/stat.c amiga/z-stat.h filedate$(O): amiga/filedate.c crypt.h timezone.h api$(O): api.c $(UNZIP_H) version.h #zlib.h apihelp$(O): apihelp.c $(UNZIP_H) version.h crc32$(O): crc32.c $(UNZIP_H) zip.h crctab$(O): crctab.c $(UNZIP_H) zip.h crypt$(O): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$(O): envargs.c $(UNZIP_H) explode$(O): explode.c $(UNZIP_H) extract$(O): extract.c $(UNZIP_H) crypt.h fileio$(O): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(O): globals.c $(UNZIP_H) inflate$(O): inflate.c $(UNZIP_H) inflate.h #zlib.h list$(O): list.c $(UNZIP_H) match$(O): match.c $(UNZIP_H) process$(O): process.c $(UNZIP_H) timezone$(O): timezone.c $(UNZIP_H) zip.h timezone.h ttyio$(O): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(O): unreduce.c $(UNZIP_H) unshrink$(O): unshrink.c $(UNZIP_H) unzip$(O): unzip.c $(UNZIP_H) crypt.h version.h consts.h #zlib.h #unzipstb$(O): unzipstb.c $(UNZIP_H) version.h zipinfo$(O): zipinfo.c $(UNZIP_H) # UnZipSFX dependencies: # # special rule for adding Amiga internal version number to UnZipSFX amiga$(OX): amiga/amiga.c amiga/filedate.c amiga/stat.c $(UNZIP_H) crypt.h timezone.h unzip$(OX): unzip.c $(UNZIP_H) crypt.h version.h consts.h extract$(OX): extract.c $(UNZIP_H) crypt.h inflate$(OX): inflate.c $(UNZIP_H) inflate.h #zlib.h match$(OX): match.c $(UNZIP_H) process$(OX): process.c $(UNZIP_H) # fUnZip dependencies: # funzip$(O): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h crc32$(OF): crc32.c $(UNZIP_H) zip.h crypt$(OF): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h globals$(OF): globals.c $(UNZIP_H) inflate$(OF): inflate.c $(UNZIP_H) inflate.h crypt.h #zlib.h ttyio$(OF): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h filedate$(OF): amiga/filedate.c crypt.h # MakeSFX dependencies # # special transformation rules to never use shortintegers: makesfx$(O): amiga/makesfx.c $(CC) WITH=$(CFILEM) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c ######################## # DEPENDECIES END HERE # ######################## # flush all libraries to provide more mem for compilation flush: @Avail flush >nil: # write common compiler flags to file and echo to user CommonFlags: @Echo "$(CFLAGSC)" "$(CCPUOPTSF)" >$(CFILEC) @Type "$(CWITHOPT)" >>$(CFILEC) -Type $(CFILEC) SFXFlags: @Echo "$(CFLAGSC)" "$(CCPUOPTXM)" >$(CFILEX) @Type "$(CWITHOPT)" >>$(CFILEX) -Type $(CFILEX) # write special MakeSFX flags MakeSFXFlags#: @Echo "$(CFLAGSS) $(CCPUOPTXM) DATA=NEAR NOSHORTINTEGERS" >$(CFILEM) # not really needed but if someday used: @Type "$(CWITHOPT)" >>$(CFILEM) -Type $(CFILEM) # special rule for adding Amiga internal version number to amiga.c amiga$(O): rx > env:VersionDate "say '""'translate(date('E'),'.','/')'""'" $(CC) WITH=$(CFILEC) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c -Delete env:VersionDate # needed in amiga/amiga.c # should be set in startup-sequence, but just in case: # (only works with OS 2.04 and above) env\:WorkBench: @Execute < < (Workbench_smk.tmp) FailAt 21 If not exists ENV:Workbench Version >nil: SetEnv Workbench $$Workbench Endif < # ################# # ### LOCAL_UNZIP ### # ################# # # Read environment variable LOCAL_UNZIP and convert options from old Lattice # v5 to new SAS/C v6 format. You may also use the new DEFINE= syntax but # be sure not to mix v5 and v6 options, otherwise lctosc will be confused. # # e.g.: to define FOO_ONE and FOO_TWO enter: # # SetEnv LOCAL_UNZIP "-DFOO_ONE -DFOO_TWO" # # To make this permanent, i.e. survive an reboot, put the statement into # your startup-sequence or (for AmigaDOS 2.0 or higher only) make sure # LOCAL_UNZIP is stored in the ENVARC: directory too. To do this, simply # copy the file from ENV: to ENVARC: # Copy ENV:LOCAL_UNZIP ENVARC: # # For a list of all valid non-standard compilation options see the INSTALL # file in the root zip tree. Please read the notes there before using the # non-standard options. # # e.g.: To use the non-standard timezone environment variable "INFOZIP_TZ" # (or another arbitary name) instead of "TZ", type in your shell: # # Setenv LOCAL_UNZIP "-DTZ_ENVVAR=*"INFOZIP_TZ*"" # # Note that you need to escape the quotes of INFOZIP_TZ with leading stars. # To verify that LOCAL_UNZIP has been saved correctly, use the Getenv command: # # Getenv LOCAL_UNZIP # # ...should display: # # -DTZ_ENVVAR="INFOZIP_TZ" # local_unzip: @Execute < < (Local_UnZip_smk.tmp) Failat 21 Echo "" If exists ENV:LOCAL_UNZIP Echo "Using environment variable LOCAL_UNZIP !" Echo "LOCAL_UNZIP: " NOLINE GetEnv LOCAL_UNZIP Copy >NIL: ENV:LOCAL_UNZIP SASCOPTS Else Echo "You could use envvar LOCAL_UNZIP to set your special compilation options." Echo "See the makefile for more information (LOCAL_UNZIP section)." Delete >nil: SASCOPTS quiet Endif Echo "" ; Do not remove the lctosc command! If LOCAL_UNZIP is unset, an ; empty file is created which needed by CommonFlags ! ; Moreover, lctosc also accepts new v6 options, i.e. only changes ; known v5 options. Try `lctosc -Dfoo' and `lctosc DEFINE=foo'. ; However, you *must not* mix v5 and v6 options! lctosc > $(CWITHOPT) ; Now make sure that env:sc/scoptions are NOT used ; we just create an empty file. The options are stored elsewhere. Echo > SCOPTIONS "" NOLINE < # Echo request to the user # request: @Echo "" @Echo " This makefile is for use with SAS/C version 6.58." @Echo " If you still have an older version, please upgrade!" @Echo " Patches are available on the Aminet under biz/patch/sc\#?." @Echo "" @Echo " Just a simple request..." @Echo " Please give me a mail that you compiled whether you encounter any errors" @Echo " or not. I'd just like to know how many Amiga users actually make use of" @Echo " this makefile." @Echo " If you mail me, I'll put you on my mailing-list and notify you whenever" @Echo " new versions of Info-Zip are released." @Echo " Have a look at the makefile for changes like CPU type, UtilLib, Stack, etc." @Echo " Feel free to mail comments, suggestions, critics..." @Echo " Enjoy Info-Zip !" @Echo " Haidinger Walter, " @Echo "" # Echo help in case of an error # .ONERROR: @Echo "" @Echo "[sigh] An error running this makefile was detected." @Echo "This message may also appear if you interrupted smake by pressing CTRL-C." @Echo "Contact Info-ZIP authors at Zip-Bugs@lists.wku.edu or me for help." @Echo "Haidinger Walter, " 3# UNZIP.BCK$3 5[UNZIP542.AMIGA]STAT.C;1*[UNZIP542.AMIGA]STAT.C;1+,$3./ 4- 50@123KPWO56 Ȟ7 Ȟ89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Here we have a handmade stat() function because Aztec's c.lib stat() */ /* does not support an st_mode field, which we need... also a chmod(). */ /* This stat() is by Paul Wells, modified by Paul Kienitz. */ /* Originally for use with Aztec C >= 5.0 and Lattice C <= 4.01 */ /* Adapted for SAS/C 6.5x by Haidinger Walter */ /* POLICY DECISION: We will not attempt to remove global variables from */ /* this source file for Aztec C. These routines are essentially just */ /* augmentations of Aztec's c.lib, which is itself not reentrant. If */ /* we want to produce a fully reentrant UnZip, we will have to use a */ /* suitable startup module, such as purify.a for Aztec by Paul Kienitz. */ #ifndef __amiga_stat_c #define __amiga_stat_c #include #include #include "amiga/z-stat.h" /* fake version of stat.h */ #include #ifdef AZTEC_C # include # include # include # include # include # include #endif #ifdef __SASC # include /* SAS/C dir function prototypes */ # include # include # include #endif #ifndef SUCCESS # define SUCCESS (-1) # define FAILURE (0) #endif void close_leftover_open_dirs(void); /* prototype */ static DIR *dir_cleanup_list = NULL; /* for resource tracking */ /* CALL THIS WHEN HANDLING CTRL-C OR OTHER UNEXPECTED EXIT! */ void close_leftover_open_dirs(void) { while (dir_cleanup_list) closedir(dir_cleanup_list); } unsigned short disk_not_mounted; extern int stat(const char *file, struct stat *buf); stat(file,buf) const char *file; struct stat *buf; { struct FileInfoBlock *inf; BPTR lock; time_t ftime; struct tm local_tm; if( (lock = Lock((char *)file,SHARED_LOCK))==0 ) /* file not found */ return(-1); if( !(inf = (struct FileInfoBlock *)AllocMem( (long)sizeof(struct FileInfoBlock),MEMF_PUBLIC|MEMF_CLEAR)) ) { UnLock(lock); return(-1); } if( Examine(lock,inf)==FAILURE ) { FreeMem((char *)inf,(long)sizeof(*inf)); UnLock(lock); return(-1); } /* fill in buf */ buf->st_dev = buf->st_nlink = buf->st_uid = buf->st_gid = buf->st_rdev = 0; buf->st_ino = inf->fib_DiskKey; buf->st_blocks = inf->fib_NumBlocks; buf->st_size = inf->fib_Size; /* now the date. AmigaDOS has weird datestamps--- * ds_Days is the number of days since 1-1-1978; * however, as Unix wants date since 1-1-1970... */ ftime = (inf->fib_Date.ds_Days * 86400 ) + (inf->fib_Date.ds_Minute * 60 ) + (inf->fib_Date.ds_Tick / TICKS_PER_SECOND ) + (86400 * 8 * 365 ) + (86400 * 2 ); /* two leap years */ /* tzset(); */ /* this should be handled by mktime(), instead */ /* ftime += timezone; */ local_tm = *gmtime(&ftime); local_tm.tm_isdst = -1; ftime = mktime(&local_tm); buf->st_ctime = buf->st_atime = buf->st_mtime = ftime; buf->st_mode = (inf->fib_DirEntryType < 0 ? S_IFREG : S_IFDIR); /* lastly, throw in the protection bits */ buf->st_mode |= ((inf->fib_Protection ^ 0xF) & 0xFF); FreeMem((char *)inf, (long)sizeof(*inf)); UnLock((BPTR)lock); return(0); } int fstat(int handle, struct stat *buf) { /* fake some reasonable values for stdin */ buf->st_mode = (S_IREAD|S_IWRITE|S_IFREG); buf->st_size = -1; buf->st_mtime = time(&buf->st_mtime); return 0; } /* opendir(), readdir(), closedir(), rmdir(), and chmod() by Paul Kienitz. */ DIR *opendir(const char *path) { DIR *dd = AllocMem(sizeof(DIR), MEMF_PUBLIC); if (!dd) return NULL; if (!(dd->d_parentlock = Lock((char *)path, MODE_OLDFILE))) { disk_not_mounted = IoErr() == ERROR_DEVICE_NOT_MOUNTED; FreeMem(dd, sizeof(DIR)); return NULL; } else disk_not_mounted = 0; if (!Examine(dd->d_parentlock, &dd->d_fib) || dd->d_fib.fib_EntryType < 0) { UnLock(dd->d_parentlock); FreeMem(dd, sizeof(DIR)); return NULL; } dd->d_cleanuplink = dir_cleanup_list; /* track them resources */ if (dir_cleanup_list) dir_cleanup_list->d_cleanupparent = &dd->d_cleanuplink; dd->d_cleanupparent = &dir_cleanup_list; dir_cleanup_list = dd; return dd; } void closedir(DIR *dd) { if (dd) { if (dd->d_cleanuplink) dd->d_cleanuplink->d_cleanupparent = dd->d_cleanupparent; *(dd->d_cleanupparent) = dd->d_cleanuplink; if (dd->d_parentlock) UnLock(dd->d_parentlock); FreeMem(dd, sizeof(DIR)); } } struct dirent *readdir(DIR *dd) { return (ExNext(dd->d_parentlock, &dd->d_fib) ? (struct dirent *)dd : NULL); } #ifdef AZTEC_C int rmdir(const char *path) { return (DeleteFile((char *)path) ? 0 : IoErr()); } int chmod(const char *filename, int bits) /* bits are as for st_mode */ { long protmask = (bits & 0xFF) ^ 0xF; return !SetProtection((char *)filename, protmask); } /* This here removes unnecessary bulk from the executable with Aztec: */ void _wb_parse(void) { } /* fake a unix function that does not apply to amigados: */ int umask(void) { return 0; } # include /* C library signal() messes up debugging yet adds no actual usefulness */ typedef void (*__signal_return_type)(int); __signal_return_type signal() { return SIG_ERR; } /* The following replaces Aztec's argv-parsing function for compatibility with Unix-like syntax used on other platforms. It also fixes the problem the standard _cli_parse() has of accepting only lower-ascii characters. */ int _argc, _arg_len; char **_argv, *_arg_lin; void _cli_parse(struct Process *pp, long alen, register UBYTE *aptr) { register UBYTE *cp; register struct CommandLineInterface *cli; register short c; register short starred = 0; # ifdef PRESTART_HOOK void Prestart_Hook(void); # endif cli = (struct CommandLineInterface *) (pp->pr_CLI << 2); cp = (UBYTE *) (cli->cli_CommandName << 2); _arg_len = cp[0] + alen + 2; if (!(_arg_lin = AllocMem((long) _arg_len, 0L))) return; c = cp[0]; strncpy(_arg_lin, cp + 1, c); _arg_lin[c] = 0; for (cp = _arg_lin +^ UNZIP.BCK$3 5[UNZIP542.AMIGA]STAT.C;15Z c + 1; alen && (*aptr < '\n' || *aptr > '\r'); alen--) *cp++ = *aptr++; *cp = 0; aptr = cp = _arg_lin + c + 1; for (_argc = 1; ; _argc++) { while (*cp == ' ' || *cp == '\t') cp++; if (!*cp) break; if (*cp == '"') { cp++; while (c = *cp++) { if (c == '"' && !starred) { *aptr++ = 0; starred = 0; break; } else if (c == '\\' && !starred) starred = 1; else { *aptr++ = c; starred = 0; } } } else { while ((c = *cp++) && c != ' ' && c != '\t') *aptr++ = c; *aptr++ = 0; } if (c == 0) --cp; } *aptr = 0; if (!(_argv = AllocMem((_argc + 1) * sizeof(*_argv), 0L))) { _argc = 0; return; } for (c = 0, cp = _arg_lin; c < _argc; c++) { _argv[c] = cp; cp += strlen(cp) + 1; } _argv[c] = NULL; # ifdef PRESTART_HOOK Prestart_Hook(); # endif } #endif /* AZTEC_C */ #endif /* __amiga_stat_c */ o*[UNZIP542.AMIGA]Z-STAT.H;1+,1M./ 4- 50@123KPWO56/ Ȟ7/ Ȟ89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __amiga_z_stat_h #define __amiga_z_stat_h /* Since older versions of the Lattice C compiler for Amiga, and all current */ /* versions of the Manx Aztec C compiler for Amiga, either provide no stat() */ /* function or provide one inadequate for unzip (Aztec's has no st_mode */ /* field), we provide our own stat() function in stat.c by Paul Wells, and */ /* this fake stat.h file by Paul Kienitz. Paul Wells originally used the */ /* Lattice stat.h but that does not work for Aztec and is not distributable */ /* with this package, so I made a separate one. This has to be pulled into */ /* unzip.h when compiling an Amiga version, as "amiga/z-stat.h". */ /* We also provide here a "struct dirent" for use with opendir() & readdir() */ /* functions included in amiga/stat.c. If you use amiga/stat.c, this must */ /* be included wherever you use either readdir() or stat(). */ #ifdef AZTEC_C # define __STAT_H #else /* __SASC */ /* do not include the following header, replacement definitions are here */ # define _STAT_H /* do not include SAS/C */ # define _DIRENT_H /* do not include SAS/C */ # define _SYS_DIR_H /* do not include SAS/C */ # define _COMMIFMT_H /* do not include SAS/C */ # include #endif #include #include struct stat { unsigned short st_mode; time_t st_ctime, st_atime, st_mtime; long st_size; long st_ino; long st_blocks; short st_attr, st_dev, st_nlink, st_uid, st_gid, st_rdev; }; #define S_IFDIR (1<<11) #define S_IFREG (1<<10) #if 0 /* these values here are totally random: */ # define S_IFLNK (1<<14) # define S_IFSOCK (1<<13) # define S_IFCHR (1<<8) # define S_IFIFO (1<<7) # define S_IFMT (S_IFDIR|S_IFREG|S_IFCHR|S_IFLNK) #else # define S_IFMT (S_IFDIR|S_IFREG) #endif #define S_IHIDDEN (1<<7) #define S_ISCRIPT (1<<6) #define S_IPURE (1<<5) #define S_IARCHIVE (1<<4) #define S_IREAD (1<<3) #define S_IWRITE (1<<2) #define S_IEXECUTE (1<<1) #define S_IDELETE (1<<0) int stat(const char *name, struct stat *buf); int fstat(int handle, struct stat *buf); /* returns dummy values */ typedef struct dirent { struct dirent *d_cleanuplink, **d_cleanupparent; BPTR d_parentlock; struct FileInfoBlock d_fib; } DIR; #define d_name d_fib.fib_FileName extern unsigned short disk_not_mounted; /* flag set by opendir() */ DIR *opendir(const char *); void closedir(DIR *); void close_leftover_open_dirs(void); /* call this if aborted in mid-run */ struct dirent *readdir(DIR *); int umask(void); #ifdef AZTEC_C int rmdir(const char *); int chmod(const char *filename, int bits); #endif #endif /* __amiga_z_stat_h */ *[UNZIP542]AOSVS.DIR;1+, ./ 4- 0123 KPWO56Ӎo&!a7Ӎo&!a89GHJIAOSVS.CS4AOSVS.HVO CONTENTS.6X MAKE_UNZ.CLI_README.R[*[UNZIP542.AOSVS]AOSVS.C;1+,S4.b/ 4bb- 0@123KPWOc56f77f789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- aosvs.c AOS/VS-specific routines for use with Info-ZIP's UnZip 5.2 and later. [GRR: copied from unix.c -> undoubtedly has unnecessary stuff: delete at will] Contains: readdir() do_wild() open_outfile() mapattr() mapname() checkdir() close_outfile() version() <-- GRR: needs work! (Unix, not AOS/VS) zvs_create() zvs_credir() ux_to_vs_name() dgdate() ---------------------------------------------------------------------------$j UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1bI*/ #define UNZIP_INTERNAL #include "unzip.h" #include "aosvs/aosvs.h" #include #include #include #define symlink(resname,linkname) \ zvs_create(linkname,-1L,-1L,-1L,ux_to_vs_name(vs_resname,resname),$FLNK,-1,-1) * file type */ #ifdef DIRENT # include #else # ifdef SYSV # ifdef SYSNDIR # include # else # include # endif # else /* !SYSV */ # ifndef NO_SYSDIR # include # endif # endif /* ?SYSV */ # ifndef dirent # define dirent direct # endif #endif /* ?DIRENT */ static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ static ZEXTRAFLD zzextrafld; /* buffer for extra field containing * ?FSTAT packet & ACL buffer */ static char vs_resname[2*$MXPL]; static char vs_path[2*$MXPL]; /* buf for AOS/VS pathname */ static char Vs_path[512]; /* should be big enough [GRR: ?] */ static P_CTIM zztimeblock; /* time block for file creation */ static ZVSCREATE_STRU zzcreatepacket; /* packet for sys_create(), any /***************************/ /* Strings used in aosvs.c */ /***************************/ static ZCONST char Far CannotDeleteOldFile[] = "error: cannot delete old %s\n"; static ZCONST char Far CannotCreateFile[] = "error: cannot create %s\n"; #ifndef SFX #ifdef NO_DIR /* for AT&T 3B1 */ #define opendir(path) fopen(path,"r") #define closedir(dir) fclose(dir) typedef FILE DIR; /* * Apparently originally by Rich Salz. * Cleaned up and modified by James W. Birdsall. */ struct dirent *readdir(dirp) DIR *dirp; { static struct dirent entry; if (dirp == NULL) return NULL; for (;;) if (fread(&entry, sizeof (struct dirent), 1, dirp) == 0) return (struct dirent *)NULL; else if (entry.d_ino) return &entry; } /* end function readdir() */ #endif /* NO_DIR */ /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ /* skip "." and ".." directory entries */ strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /***************************/ /* Function open_outfile() */ /***************************/ int open_outfile(__G) /* return 1 if fail */ __GDEF { int errc = 1; /* init to show no success with AOS/VS info */ long dmm, ddd, dyy, dhh, dmin, dss; #ifdef DLL if (G.redirect_data) return redirect_outfile(__G)==FALSE; #endif if (stat(G.filename, &G.statbuf) == 0 && unlink(G.filename) < 0) { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotDeleteOldFile), G.filename)); return 1; } /*--------------------------------------------------------------------------- If the file didn't already exist, we created it earlier. But we just deleted it, which we still had to do in case we are overwriting an exis- ting file. So we must create it now, again, to set the creation time properly. (The creation time is the best function @y UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1b#al approximation of the Unix mtime. Really!) If we stored this with an AOS/VS Zip that set the extra field to contain the ?FSTAT packet and the ACL, we should use info from the ?FSTAT call now. Otherwise (or if that fails), we should create anyway as best we can from the normal Zip info. In theory, we should look through an entire series of extra fields that might exist for the same file, but we're not going to bother. If we set up other types of extra fields, or if other environments we run into may add their own stuff to existing entries in Zip files, we'll have to. Note that all the packet types for sys_fstat() are the same size & mostly have the same structure, with some fields being unused, etc. Ditto for sys_create(). Thus, we assume a normal one here, not a dir/cpd or device or IPC file, & make little adjustments as necessary. We will set ACLs later (to reduce the chance of lacking access to what we create now); note that for links the resolution name should be stored in the ACL field (once we get Zip recognizing links OK). ---------------------------------------------------------------------------*/ if (G.extra_field != NULL) { memcpy((char *) &zzextrafld, G.extra_field, sizeof(zzextrafld)); if (!memcmp(ZEXTRA_HEADID, zzextrafld.extra_header_id, sizeof(zzextrafld.extra_header_id)) && !memcmp(ZEXTRA_SENTINEL, zzextrafld.extra_sentinel), sizeof(zzextrafld.extra_sentinel)) { zzcreatepacket.norm_create_packet.cftyp_format = zzextrafld.fstat_packet.norm_fstat_packet.styp_format; zzcreatepacket.norm_create_packet.cftyp_entry = zzextrafld.fstat_packet.norm_fstat_packet.styp_type; /* for DIRS/CPDs, the next one will give the hash frame size; for * IPCs it will give the port number */ zzcreatepacket.norm_create_packet.ccps = zzextrafld.fstat_packet.norm_fstat_packet.scps; zzcreatepacket.norm_create_packet.ctim = &zztimeblock; zztimeblock.tcth = zzextrafld.fstat_packet.norm_fstat_packet.stch; /* access & modification times default to current */ zztimeblock.tath.long_time = zztimeblock.tmth.long_time = -1; /* give it current process's ACL unless link; then give it * resolution name */ zzcreatepacket.norm_create_packet.cacp = (char *)(-1); if (zzcreatepacket.norm_create_packet.cftyp_entry == $FLNK) zzcreatepacket.norm_create_packet.cacp = zzextrafld.aclbuf; zzcreatepacket.dir_create_packet.cmsh = zzextrafld.fstat_packet.dir_fstat_packet.scsh; if (zzcreatepacket.norm_create_packet.cftyp_entry != $FCPD) { /* element size for normal files */ zzcreatepacket.norm_create_packet.cdel = zzextrafld.fstat_packet.norm_fstat_packet.sdeh; } zzcreatepacket.norm_create_packet.cmil = zzextrafld.fstat_packet.norm_fstat_packet.smil; if ((errc = sys_create(ux_to_vs_name(vs_path, G.filename), &zzcreatepacket)) != 0) Info(slide, 0x201, ((char *)slide, "error creating %s with AOS/VS info -\n\ will try again with ordinary Zip info\n", G.filename)); } } /* do it the hard way if no AOS/VS info was stored or if we had problems */ if (errc) { dyy = (G.lrec.last_mod_dos_datetime >> 25) + 1980; dmm = (G.lrec.last_mod_dos_datetime >> 21) & 0x0f; ddd = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f; dhh = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f; dmin = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f; dss = (G.lrec.last_mod_dos_datetime << 1) & 0x3e; if (zvs_create(G.filename, (((ulg)dgdate(dmm, ddd, dyy)) << 16) | (dhh*1800L + dmin*30L + dss/2L), -1L, -1L, (char *) -1, -1, -1, -1)) { Info(slide, 0x201, ((char *)slide, "error: %s: cannot create\n", G.filename)); return 1; } } Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", G.filename)); if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), G.filename)); return 1; } Trace((stderr, "open_outfile: fopen(%s) for writing succeeded\n", G.filename)); #ifdef USE_FWRITE #ifdef _IOFBF /* make output fully buffered (works just about like write()) */ setvbuf(G.outfile, (char *)slide, _IOFBF, WSIZE); #else setbuf(G.outfile, (char *)slide); #endif #endif /* USE_FWRITE */ return 0; } /* end function open_outfile() */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; G.pInfo->file_attr = 0; /* initialized to 0 for check in "default" branch below... */ switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); break; case THEOS_: tmp &= 0xF1FFFFFFL; if ((tmp & 0xF0000000L) != 0x40000000L) tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ else tmp &= 0x41FFFFFFL; /* leave directory bit as set */ /* fall through! */ case UNIX_: case VMS_: case ACORN_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { return 0; } else { /* Some (non-Info-ZIP) implementations of Zip for Unix and * VMS (and probably others ??) leave 0 in the upper 16-bit * part of the external_file_attributes field. Instead, they * store file permission attributes in some extra field. * As a work-around, we search for the presence of one of * these extra fields and fall back to the MSDOS compatible * part of external_file_attributes if one of the known * e.f. types has been detected. * Later, we might implement extraction of the permission * bits from the VMS extra field. But for now, the work-around * should be sufficient to provide "readable" extracted files. * (For ASI Unix e.f., an experimental remap from the e.f. * mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; int r = FALSE; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { G.pInfo->file_attr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); !,M vmx 1F{ :C9SM}|;)o\vcs[vWrC/*w.%`  iRw 5p;qsbuoL 8 @84sw#t*|o1xllzV)=UQ&<4}*(qgNOgppKC.FL9\x2.:H fWJshRR162TLUbh8V9S$tfv{&IMv$`=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3tQ ?h"7INu U;lJl;jM|CbhJu@2G$w6,Kn4=MnZ\2Fj=HA_^d}./d>A9\Fh6zB'to'qLHD[>eS]a9-mvY Yy||R_Uc9sw_%zu{r1%jJ6sNPrSY2AEQ,+p`;gW:8:bv_ NGbJ6!k}* W !,*8d=VY &a6ECYVEa8."Ma&sKwKy; Fk#u;~/$#{IPc1FR?T ) B[G+ gdHJ"3d UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1bP! /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!r) return 0; } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the * Unix attributes in the upper 16 bits of the external attributes * field, just like Info-ZIP's Zip for Unix. We try to use that * value, after a check for consistency with the MSDOS attribute * bits (see below). */ G.pInfo->file_attr = (unsigned)(tmp >> 16); /* fall through! */ case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: /* Ensure that DOS subdir bit is set when the entry's name ends * in a '/'. Some third-party Zip programs fail to set the subdir * bit for directory entries. */ if ((tmp | 0x10) == 0) { extent fnlen = strlen(G.filename); if (fnlen > 0 && G.filename[fnlen-1] == '/') tmp |= 0x10; } /* read-only bit --> write perms; subdir bit --> dir exec bit */ tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) /* keep previous G.pInfo->file_attr setting, when its "owner" * part appears to be consistent with DOS attribute flags! */ return 0; G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); break; } /* end switch (host-OS-created-by) */ /* for originating systems with no concept of "group," "other," "system": */ umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ G.pInfo->file_attr &= ~tmp; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in Unix */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; *pp++ = ';'; /* keep for now; remove VMS ";##" */ break; /* later, if requested */ case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; #ifdef MTS case ' ': /* change spaces to underscore under */ *pp++ = '_'; /* MTS; leave as spaces under Unix */ break; #endif default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ #e] UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1b 0 #if 0 /*========== NOTES ==========*/ extract-to dir: a:path/ buildpath: path1/path2/ ... (NULL-terminated) pathcomp: filename mapname(): loop over chars in zipfile member name checkdir(path component, COMPONENT | CREATEDIR) --> map as required? (d:/tmp/unzip/) (disk:[tmp.unzip.) (d:/tmp/unzip/jj/) (disk:[tmp.unzip.jj.) (d:/tmp/unzip/jj/temp/) (disk:[tmp.unzip.jj.temp.) finally add filename itself and check for existence? (could use with rename) (d:/tmp/unzip/jj/temp/msg.outdir) (disk:[tmp.unzip.jj.temp]msg.outdir) checkdir(name, GETPATH) --> copy path to name and free space #endif /* 0 */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append,5 set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ /* for AOS/VS, try to create so as to not use searchlist: */ if ( /*stat(buildpath, &G.statbuf)*/ 1) { if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } /* create the directory */ if (zvs_credir(buildpath,-1L,-1L,-1L,(char *) -1,-1,0L,-1,-1) == -1) { Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 1, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION ==$Htv UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1b? ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { char *tmproot; if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == '/') { tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (zvs_credir(tmproot,-1L,-1L,-1L,(char *) -1,-1,0L,-1,-1) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) /* GRR: change to return PK-style warning level */ __GDEF { /*--------------------------------------------------------------------------- If symbolic links are supported, allocate a storage area, put the uncom- pressed "data" in it, and create the link. Since we know it's a symbolic link to start with, we shouldn't have to worry about overflowing unsigned ints with unsigned longs. ---------------------------------------------------------------------------*/ #ifdef SYMLINKS if (G.symlnk) { unsigned ucsize = (unsigned)G.lrec.ucsize; char *linktarget = (char *)malloc((unsigned)G.lrec.ucsize+1); fclose(G.outfile); /* close "data" file... */ G.outfile = fopen(G.filename, FOPR); /* ...and reopen for reading */ if (!linktarget || fread(linktarget, 1, ucsize, G.outfile) != (int)ucsize) { Info(slide, 0x201, ((char *)slide, "warning: symbolic link (%s) failed\n", G.filename)); if (linktarget) free(linktarget); fclose(G.outfile); return; } fclose(G.outfile); /* close "data" file for good... */ unlink(G.filename); /* ...and delete it */ linktarget[ucsize] = '\0'; if (QCOND2) Info(slide, 0, ((char *)slide, "-> %s ", linktarget)); if (symlink(linktarget, G.filename)) /* create the real link */ perror("symlink error"); free(linktarget); return; /* can't set time on symlinks */ } #endif /* SYMLINKS */ fclose(G.outfile); /*--------------------------------------------------------------------------- Change the file permissions from default ones to those stored in the zipfile. ---------------------------------------------------------------------------*/ #ifndef NO_CHMOD if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) perror("chmod (file attributes) error"); #endif /*--------------------------------------------------------------------------- AOS/VS only allows setting file times at creation but has its own permis- sions scheme which is better invoked here if the necessary information was in fact stored. In theory, we should look through an entire series of extra fields that might exist for the same file, but we're not going to bother. If we set up other types of extra fields, or if we run into other environments that add their own stuff to existing entries in ZIP files, we'll have to. NOTE: already copied extra-field stuff into zzextrafld structure when file was created. ---------------------------------------------------------------------------*/ if (G.extra_field != NULL) { if (!memcmp(ZEXTRA_HEADID, zzextrafld.extra_header_id, sizeof(zzextrafld.extra_header_id)) && !memcmp(ZEXTRA_SENTINEL, zzextrafld.extra_sentinel, sizeof(zzextrafld.extra_sentinel)) && zzextrafld.fstat_packet.norm_fstat_packet.styp_type != $FLNK) /* (AOS/VS links don't have ACLs) */ { /* vs_path was set (in this case) when we created the file */ if (sys_sacl(vs_path, zzextrafld.aclbuf)) { Info(slide, 0x201, ((char *)slide, "error: cannot set ACL for %s\n", G.filename)); perror("sys_sacl()"); } } } } /* end function close_outfile() */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { #if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) || defined(NetBSD) char buf1[40]; #if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) char buf2[40]; #endif #endif /* Pyramid, NeXT have problems with huge macro expansion, too: no Info() */ sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __GNUC__ # ifdef NX_CURRENT_COMPILER_RELEASE (sprintf(buf1, "NeXT DevKit %d.%02d ", NX_CURRENT_COMPILER_RELEASE/100, NX_CURRENT_COMPILER_RELEASE%100), buf1), (strlen(__VERSION__) > 8)? "(gcc)" : (sprintf(buf2, "(gcc %s)", __VERSION__), buf2), # else "gcc ", __VERSION__, # endif #else # if defined(CRAY) && defined(_RELEASE) "cc ", (sprintf(buf1, "version %d", _RELEASE), buf1), # else # ifdef __VERSION__ "cc ", __VERSION__, # else "cc", "", # endif # endif #endif "Unix", #if defined(sgi) || defined(__sgi) " (Silicon Graphics IRIX)", #else #ifdef sun # ifdef sparc # ifdef __SVR4 " (Sun Sparc/Solaris)", # else /* may or may not be SunOS */ " (Sun Sparc)", # endif # else # if defined(sun386) || defined(i386) " (Sun 386i)", # else # if defined(mc68020) || defined(__mc68020__) " (Sun 3)", # else /* mc68010 or mc68000: Sun 2 or earlier */ " (Sun 2)", # endi%a UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1b]\Nf # endif # endif #else #ifdef __hpux " (HP/UX)", #else #ifdef __osf__ " (DEC OSF/1)", #else #ifdef _AIX " (IBM AIX)", #else #ifdef aiws " (IBM RT/AIX)", #else #if defined(CRAY) || defined(cray) # ifdef _UNICOS (sprintf(buf2, " (Cray UNICOS release %d)", _UNICOS), buf2), # else " (Cray UNICOS)", # endif #else #if defined(uts) || defined(UTS) " (Amdahl UTS)", #else #ifdef NeXT # ifdef mc68000 " (NeXTStep/black)", # else " (NeXTStep for Intel)", # endif #else /* the next dozen or so are somewhat order-dependent */ #ifdef LINUX # ifdef __ELF__ " (Linux ELF)", # else " (Linux a.out)", # endif #else #ifdef MINIX " (Minix)", #else #ifdef M_UNIX " (SCO Unix)", #else #ifdef M_XENIX " (SCO Xenix)", #else #ifdef __NetBSD__ # ifdef NetBSD0_8 (sprintf(buf1, " (NetBSD 0.8%c)", (char)(NetBSD0_8 - 1 + 'A')), buf1), # else # ifdef NetBSD0_9 (sprintf(buf1, " (NetBSD 0.9%c)", (char)(NetBSD0_9 - 1 + 'A')), buf1), # else # ifdef NetBSD1_0 (sprintf(buf1, " (NetBSD 1.0%c)", (char)(NetBSD1_0 - 1 + 'A')), buf1), # else (BSD4_4 == 0.5)? " (NetBSD before 0.9)" : " (NetBSD 1.1 or later)", # endif # endif # endif #else #ifdef __FreeBSD__ (BSD4_4 == 0.5)? " (FreeBSD 1.x)" : " (FreeBSD 2.0 or later)", #else #ifdef __bsdi__ (BSD4_4 == 0.5)? " (BSD/386 1.0)" : " (BSD/386 1.1 or later)", #else #ifdef __386BSD__ (BSD4_4 == 1)? " (386BSD, post-4.4 release)" : " (386BSD)", #else #if defined(i486) || defined(__i486) || defined(__i486__) " (Intel 486)", #else #if defined(i386) || defined(__i386) || defined(__i386__) " (Intel 386)", #else #ifdef pyr " (Pyramid)", #else #ifdef ultrix # ifdef mips " (DEC/MIPS)", # else # ifdef vax " (DEC/VAX)", # else /* __alpha? */ " (DEC/Alpha)", # endif # endif #else #ifdef gould " (Gould)", #else #ifdef MTS " (MTS)", #else #ifdef __convexc__ " (Convex)", #else "", #endif /* Convex */ #endif /* MTS */ #endif /* Gould */ #endif /* DEC */ #endif /* Pyramid */ #endif /* 386 */ #endif /* 486 */ #endif /* 386BSD */ #endif /* BSDI BSD/386 */ #endif /* NetBSD */ #endif /* FreeBSD */ #endif /* SCO Xenix */ #endif /* SCO Unix */ #endif /* Minix */ #endif /* Linux */ #endif /* NeXT */ #endif /* Amdahl */ #endif /* Cray */ #endif /* RT/AIX */ #endif /* AIX */ #endif /* OSF/1 */ #endif /* HP/UX */ #endif /* Sun */ #endif /* SGI */ #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */ /* =================================================================== * ZVS_CREATE() * Function to create a file with specified times. The times should be sent * as long ints in DG time format; use -1 to set to the current times. You * may also specify a pointer to the ACL, the file type (see PARU.H, and do * not specify dirs or links), the element size, and the max index level. * For all of these parameters you may use -1 to specify the default. * * Returns 0 if no error, or the error code returned by ?CREATE. * * HISTORY: * 15-dec-93 dbl * 31-may-94 dbl: added call to convert pathname to AOS/VS * * */ int zvs_create(ZCONST char *fname, long cretim, long modtim, long acctim, char *pacl, int ftyp, int eltsize, int maxindlev) { P_CREATE pcr_stru; P_CTIM pct_stru; pcr_stru.cftyp_format = 0; /* unspecified record format */ if (ftyp == -1) /* default file type to UNX */ pcr_stru.cftyp_entry = $FUNX; else pcr_stru.cftyp_entry = ftyp; pcr_stru.ctim = &pct_stru; pcr_stru.cacp = pacl; pcr_stru.cdel = eltsize; pcr_stru.cmil = maxindlev; pct_stru.tcth.long_time = cretim; pct_stru.tath.long_time = acctim; pct_stru.tmth.long_time = modtim; return (sys_create(ux_to_vs_name(Vs_path, fname), &pcr_stru)); } /* end zvs_create() */ /* =================================================================== * ZVS_CREDIR() * Function to create a dir as specified. The times should be sent * as long ints in DG time format; use -1 to set to the current times. You * may also specify a pointer to the ACL, the file type (either $FDIR or $FCPD; see PARU.H), * the max # blocks (if a CPD), the hash frame size, and the max index level. * For all of these parameters (except for the CPD's maximum blocks), * you may use -1 to specify the default. * * (The System Call Dictionary says both that you may specify a * maximum-index-level value up to the maximum, with 0 for a contiguous * directory, and that 3 is always used for this whatever you specify.) * * If you specify anything other than CPD for the file type, DIR will * be used. * * Returns 0 if no error, or the error code returned by ?CREATE. * * HISTORY: * 1-jun-94 dbl * * */ int zvs_credir(ZCONST char *dname, long cretim, long modtim, long acctim, char *pacl, int ftyp, long maxblocks, int hashfsize, int maxindlev) { P_CREATE_DIR pcr_stru; P_CTIM pct_stru; if (ftyp != $FCPD) /* default file type to UNX */ pcr_stru.cftyp_entry = $FDIR; else { pcr_stru.cftyp_entry = ftyp; pcr_stru.cmsh = maxblocks; } pcr_stru.ctim = &pct_stru; pcr_stru.cacp = pacl; pcr_stru.chfs = hashfsize; pcr_stru.cmil = maxindlev; pct_stru.tcth.long_time = cretim; pct_stru.tath.long_time = acctim; pct_stru.tmth.long_time = modtim; return (sys_create(ux_to_vs_name(Vs_path, dname), &pcr_stru)); } /* end zvs_credir() */ /* =================================================================== * UX_TO_VS_NAME() - makes a somewhat dumb pass at converting a Unix * filename to an AOS/VS filename. This should * be just about adequate to handle the results * of similarly-simple AOS/VS-to-Unix conversions * in the ZIP program. It does not guarantee a * legal AOS/VS filename for every Unix filename; * conspicuous examples would be names with * embedded ./ and ../ (which will receive no * special treatment). * * RETURNS: pointer to the result (which is an input parameter) * * NOTE: calling code is responsible for making sure * the output buffer is big enough! * * HISTORY: * 31-may-94 dbl * */ char *ux_to_vs_name(char *outname, ZCONST char *inname) { ZCONST char *ip=inname, *op=outname; if (ip[0] == '.') { if (ip[1] == '/') { *(op++) = '='; ip += 2; } else if (ip[1] == '.' && ip[2] == '/') { *(op++) = '^'; ip += 3; } } do { if (*ip == '/') *(op++) = ':'; else if (strchr( "0123456789_$?.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", *ip) != NULL) { *(op++) = *ip; } else *(op++) = '?'; } while (*(ip++) != '\0'); return outname; } /* end ux_to_vs_name() */ /* =================================================================== */ /* DGDATE Two functions do encode/decode dates in DG system format. Usage: long value,year,month,day; value=dgdate(month,day,year); undgdate(value,&month,&day,&year); [GRR: not used in UnZip: removed] Notes: 1. DG date functions only work on dates within the range Jan 1, 1968 through Dec 31, 2099. &Zu$ UNZIP.BCKS4 [UNZIP542.AOSVS]AOSVS.C;1b ]I have tested these functions through the same range with exact agreement. For dates outside of that range, the DG system calls may return different values than these functions. 2. dgundate() accepts values between 0 and 48213 inclusive. These correspond to 12/31/1967 and 12/31/2099. 3. Both functions assume the data is in the native OS byte order. So if you're reading or writing these fields from a file that has been passed between AOS/VS and PC-DOS you will need to swap byte order. 4. With reference to byte order, the entire range of values supported by these functions will fit into an unsigned short int. In most cases the input or output will be in that variable type. You are better off casting the value to/from unsigned short so you only need to concern yourself with swapping two bytes instead of four. Written by: Stanley J. Gula US&T, Inc. 529 Main Street, Suite 1 Indian Orchard, MA 01151 (413)-543-3672 Copyright (c) 1990 US&T, Inc. All rights reserved. I hereby release these functions into the public domain. You may use these routines freely as long as the US&T copyright remains intact in the source code. Stanley J. Gula July 24, 1990 */ long motable[13]={0,31,59,90,120,151,181,212,243,273,304,334,365}; long yrtable[132]={ 366, 731, 1096, 1461, 1827, 2192, 2557, 2922, 3288, 3653, 4018, 4383, 4749, 5114, 5479, 5844, 6210, 6575, 6940, 7305, 7671, 8036, 8401, 8766, 9132, 9497, 9862,10227,10593,10958, 11323,11688,12054,12419,12784,13149,13515,13880,14245,14610, 14976,15341,15706,16071,16437,16802,17167,17532,17898,18263, 18628,18993,19359,19724,20089,20454,20820,21185,21550,21915, 22281,22646,23011,23376,23742,24107,24472,24837,25203,25568, 25933,26298,26664,27029,27394,27759,28125,28490,28855,29220, 29586,29951,30316,30681,31047,31412,31777,32142,32508,32873, 33238,33603,33969,34334,34699,35064,35430,35795,36160,36525, 36891,37256,37621,37986,38352,38717,39082,39447,39813,40178, 40543,40908,41274,41639,42004,42369,42735,43100,43465,43830, 44196,44561,44926,45291,45657,46022,46387,46752,47118,47483, 47848,48213}; /* Given y,m,d return # of days since 12/31/67 */ long int dgdate(short mm, short dd, short yy) { long int temp; short ytmp; if (mm<1 || mm>12 || dd<1 || dd>31 || yy<1968 || yy>2099) return 0L; /* Figure in whole years since 1968 + whole months plus days */ temp=365L*(long)(yy-1968) + motable[mm-1] + (long)dd; /* Adjust for leap years - note we don't account for skipped leap year in years divisible by 1000 but not by 4000. We're correct through the year 2099 */ temp+=(yy-1965)/4; /* Correct for this year */ /* In leap years, if date is 3/1 or later, bump */ if ((yy%4==0) && (mm>2)) temp++; return temp; } *[UNZIP542.AOSVS]AOSVS.H;1+,VO./ 4- 0@123KPWO56 7 89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- aosvs.h AOS/VS-specific header file for use with Info-ZIP's UnZip 5.2 and later. ---------------------------------------------------------------------------*/ /* stuff to set up for system calls (?FSTAT & ?SACL) and the extra field */ #include /* parameter definitions */ #include /* AOS/VS ?FSTAT packet defs */ #include /* AOS/VS ?CREATE packet defs */ #include /* AOS/VS system call interface */ #define ZEXTRA_HEADID "VS" #define ZEXTRA_SENTINEL "FCI" #define ZEXTRA_REV ((uch)10) /* change/use this in later revs */ /* functions defined in zvs_create.c */ extern int zvs_create(ZCONST char *fname, long cretim, long modtim, long acctim, char *pacl, int ftyp, int eltsize, int maxindlev); extern int zvs_credir(ZCONST char *dname, long cretim, long modtim, long acctim, char *pacl, int ftyp, long maxblocks, int hashfsize, int maxindlev); extern long dgdate(short mm, short dd, short yy); extern char *ux_to_vs_name(char *outname, ZCONST char *inname); /* could probably avoid the unions - all elements in each one are the same * size, and we're going to assume this */ typedef union zvsfstat_stru { P_FSTAT norm_fstat_packet; /* normal fstat packet */ P_FSTAT_DIR dir_fstat_packet; /* DIR/CPD fstat packet */ P_FSTAT_UNIT unit_fstat_packet; /* unit (device) fstat packet */ P_FSTAT_IPC ipc_fstat_packet; /* IPC file fstat packet */ } ZVSFSTAT_STRU; typedef union zvscreate_stru { P_CREATE norm_create_packet; /* normal create packet */ P_CREATE_DIR dir_create_packet; /* DIR/CPD create packet */ P_CREATE_IPC ipc_create_packet; /* IPC file create packet */ } ZVSCREATE_STRU; typedef struct zextrafld { char extra_header_id[2]; /* set to VS - in theory, an int */ char extra_data_size[2]; /* size of rest (little-endian) */ char extra_sentinel[4]; /* set to FCI w/ trailing null */ uch extra_rev; /* set to 10 for rev 1.0 */ ZVSFSTAT_STRU fstat_packet; /* the fstat packet */ char aclbuf[$MXACL]; /* the raw ACL */ } ZEXTRAFLD; *[UNZIP542.AOSVS]CONTENTS.;1+,6X./ 4@- 0@123KPWO56?27?289GHJContents of the "aosvs" subdirectory for UnZip 5.3 and later: Contents this file README compilation notes, history, etc. make_unz.cli command script to make UnZip only (not UnZipSFX or fUnZip) aosvs.c AOS/VS-specific support routines aosvs.h AOS/VS-specific typedefs and header stuff *[UNZIP542.AOSVS]MAKE_UNZ.CLI;1+,_./ 4;- 0@123KPWO56bܙ7bܙ89GHJ'f$ UNZIP.BCK_ [UNZIP542.AOSVS]MAKE_UNZ.CLI;1Wpush prompt pop searchlist :c_4.10 :c_4.10:lang_rt [!searchlist] cc/link/NOUNX/NOSEA SYSV/DEFINE TERMIO/DEFINE AOS_VS/DEFINE=1 PROTO/DEFINE S_IFLNK/DEFINE=0120000 TIME.H/INCLUDE .c pop i*[UNZIP542.AOSVS]README.;1+,R[./ 4- 0@123KPWO56˸7˸89GHJ[e-mail excerpt from Dave Lovelace explaining AOS/VS port, compiler, etc.] > From: Dave Lovelace > Subject: Re: zip on Data General AOS/VS > Date: Wed, 17 May 1995 11:02:03 -0400 (EDT) > > The diffs for zip & unzip are both in the same file. I've also included the > extra source files which I wrote, the CLI macros which I used to compile > & link the things, & my own history of what I did. Note that some of the > changes I made reversed earlier changes, & this was written for my own > use (or for others here if I leave or die or something). I hope it will help. > > This was compiled using DG's C compiler for AOS/VS, rev 4.10. It has been > compiled only on an MV-5500 running AOS/VS rev 7.70, but the resulting > programs have been distributed & run on several different MVs running various > versions of AOS/VS, so it should be fairly independent of at least minor rev > variations. To the best of my knowledge it has *not* been tested under > AOS/VS II, & I really don't know anything about that environment; possibly > the special AOS/VS file info I'm storing in the extra field will have some > different format there. [README/history info from Dave Lovelace] In modifying this for use on AOS/VS, I found only a few changes were needed for DG C 4.10: 2. There was a bug in the inflate() code, because memset() was being called with a non-char pointer. Pretty obviously the other systems where this was used do not have char pointers different from other pointers. IT IS QUITE POSSIBLE THAT OTHER BUGS OF THIS SORT EXIST. Testing did not uncover any. 3. In fileio.c, it appears that utime() is being called correctly, but it does not set the file's time and always returns failure. Since the AOS/VS tar and cpio programs provided by DG also suffer from the fault of not setting file times, I must conclude that this is by design. At any rate, I modified the code (with compilation conditional on a macro AOS_VS) to not say "error" when this occurs. One change which I think would be desirable: if the filename isn't already a relative or absolute pathname (specifying a unique location), the program follows the searchlist under AOS/VS. It will unexpectedly replace files anywhere in your searchlist. (If you don't use the -o option, it will ask you first, but not tell you where the file to be replaced resides.) I suspect this could be handled by prepending ./ to any filenames which don't already begin with /. (I haven't checked how this would work inside the program. Possibly this could be done in every case - I don't think PKZIP ever stores an absolute pathname.) To see the compile options I used, look at the file MAKE.AOS_VS.CLI You may of course need to change the searchlist to use that macro. ------------------------------------------------------------------ 15-dec-93 I fixed some of the above things, introducing new problems. It now won't follow the searchlist - but the logic prevents it from creating directories (if they aren't explicitly in the ZIP, anyway). But UNZIP now sets the creation time to the time stored in the ZIP, and ZIP now stores that instead of the TLM. I had to introduce an extra module, with some code of my own and some other public domain code, to accomplish this. ------------------------------------------------------------------ 1-jun-94 I found an additional bug: the header was causing void to be #define'd as int, and prototypes weren't being used. I changed UNZIP.H and added a define of PROTO to the MAKE.AOS_VS.CLI and REMAKE.CLI macros. I found and fixed the bug that prevented the (creation) times from being set on files with explicit paths. (The Unix-style paths didn't work as inputs to the AOS/VS ?CREATE system call.) Additional known bugs: 1. I have not yet located the source of the bug that prevents the date/time from being set (also ACLs etc.) when an existing file is overwritten. For some reason the call to delete & recreate the file is not being reached. 2. We need to do something in ZIP to store (as comments?) the file's type and ACL, and then here in UNZIP extract these and apply them. This is not going to be trivial to make foolproof, but it's badly needed. ------------------------------------------------------------------ 2-jun-94 I fixed #1 above. The compiler was checking whether UNIX was defined, and it wasn't. It appears that *some* of the places UNIX is used are things we can't get along with, so I changed the code to check for AOS_VS as well. It seems to work just fine. I also introduced a function zvs_credir() to create a directory (as opposed to a CPD, though it can create CPDs to with the proper file-type parameter). Directories in a path which are being created will now be directories instead of CPDs. The big change that's needed now is to have ZIP store (somehow) the file's ACL and file type, and then to have UNZIP use this information to recreate the file as it was before ZIPping. Ideally, ZIP should also store links and CPD max-block info as well. Planned strategy: either in the name field but after the name, or in a comment, store the packet returned by ?FSTAT (using sys_fstat()), and then use this packet for the ?CREATE call in zvs_create(). ------------------------------------------------------------------ 22-Jul-94 The changes to use the extra-field field for AOS/VS file info are in place. In general, if a ZIPfile was created with the current rev of ZIP.PR, the files should be restored with file type, ACL, etc. OK. I didn't test to make sure element size & max index levels come through OK, but I think they should. Unix symbolic links are now UNZIPped OK, but ZIP.PR isn't yet able to ZIP links. When it is, UNZIP should be ready. In general UNZIP now ignores the searchlist fairly well, but not perfectly. If the directory of a file you're UNZIPping can be referenced elsewhere in the searchlist, UNZIP will find the file there. (For example, if the file UDD/BBASIC/ZZPGSUBSET.SR is in the ZIPfile, and : is in your searchlist, then UDD and UDD:BBASIC will be created under your current directory, but UNZIP will still find :UDD:BBASIC:ZZPGSUBSET.SR instead of =UDD:BBASIC:ZZPGSUBSET.SR. Filenames (which are now stored in uppercase by ZIP.PR) must be matched exactly if specified. This applies to Unix path structure as well as case. ------------------------------------------------------------------ 4-Aug-94 I fixed a bug which caused (for links only) the Unix pathname to be put through ux_to_vs_name twice. The result was that a path such as dir1/dir2/fname went first to (Rm UNZIP.BCKR[ [UNZIP542.AOSVS]README.;1 :dir1:dir2:fname and then to dir1?dir2?fname. I also added the /NOSEA switch to the cc/link lines in the macros MAKE.AOS_VS.CLI and REMAKE.CLI. This should prevent any confusion over whether a file exists somewhere other than relative to the current dir. This would disable calls to system() from using the searchlist, but in this program I think they're all useless & hopefully inactive anyway. ------------------------------------------------------------------ _*[UNZIP542]API.C;1+, ./ 44- 0@123KPWO 56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- api.c This module supplies an UnZip engine for use directly from C/C++ programs. The functions are: UzpVer *UzpVersion(void); void UzpVersion2(UzpVer2 *version) int UzpMain(int argc, char *argv[]); int UzpAltMain(int argc, char *argv[], UzpInit *init); int UzpValidate(char *archive, int AllCodes); void UzpFreeMemBuffer(UzpBuffer *retstr); int UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, UzpCB *UsrFuncts, UzpBuffer *retstr); non-WINDLL only (a special WINDLL variant is defined in windll/windll.c): int UzpGrep(char *archive, char *file, char *pattern, int cmd, int SkipBin, UzpCB *UsrFuncts); OS/2 only (for now): int UzpFileTree(char *name, cbList(callBack), char *cpInclude[], char *cpExclude[]); You must define `DLL' in order to include the API extensions. ---------------------------------------------------------------------------*/ #ifdef OS2 # define INCL_DOSMEMMGR # include #endif #include #define UNZIP_INTERNAL #include "unzip.h" #ifdef WINDLL # include "windll/windll.h" #endif #include "version.h" #ifdef DLL /* This source file supplies DLL-only interface code. */ jmp_buf dll_error_return; /*--------------------------------------------------------------------------- Documented API entry points ---------------------------------------------------------------------------*/ UzpVer * UZ_EXP UzpVersion() /* should be pointer to const struct */ { static UzpVer version; /* doesn't change between calls */ version.structlen = UZPVER_LEN; #ifdef BETA version.flag = 1; #else version.flag = 0; #endif version.betalevel = UZ_BETALEVEL; version.date = UZ_VERSION_DATE; #ifdef ZLIB_VERSION version.zlib_version = ZLIB_VERSION; version.flag |= 2; #else version.zlib_version = NULL; #endif /* someday each of these may have a separate patchlevel: */ version.unzip.major = UZ_MAJORVER; version.unzip.minor = UZ_MINORVER; version.unzip.patchlevel = UZ_PATCHLEVEL; version.zipinfo.major = ZI_MAJORVER; version.zipinfo.minor = ZI_MINORVER; version.zipinfo.patchlevel = UZ_PATCHLEVEL; /* these are retained for backward compatibility only: */ version.os2dll.major = UZ_MAJORVER; version.os2dll.minor = UZ_MINORVER; version.os2dll.patchlevel = UZ_PATCHLEVEL; version.windll.major = UZ_MAJORVER; version.windll.minor = UZ_MINORVER; version.windll.patchlevel = UZ_PATCHLEVEL; return &version; } void UZ_EXP UzpVersion2(UzpVer2 *version) { version->structlen = UZPVER_LEN; #ifdef BETA version->flag = 1; #else version->flag = 0; #endif strcpy(version->betalevel, UZ_BETALEVEL); strcpy(version->date, UZ_VERSION_DATE); #ifdef ZLIB_VERSION strcpy(version->zlib_version, ZLIB_VERSION); version->flag |= 2; #else version->zlib_version[0] = '\0'; #endif /* someday each of these may have a separate patchlevel: */ version->unzip.major = UZ_MAJORVER; version->unzip.minor = UZ_MINORVER; version->unzip.patchlevel = UZ_PATCHLEVEL; version->zipinfo.major = ZI_MAJORVER; version->zipinfo.minor = ZI_MINORVER; version->zipinfo.patchlevel = UZ_PATCHLEVEL; /* these are retained for backward compatibility only: */ version->os2dll.major = UZ_MAJORVER; version->os2dll.minor = UZ_MINORVER; version->os2dll.patchlevel = UZ_PATCHLEVEL; version->windll.major = UZ_MAJORVER; version->windll.minor = UZ_MINORVER; version->windll.patchlevel = UZ_PATCHLEVEL; } #ifndef WINDLL int UZ_EXP UzpAltMain(int argc, char *argv[], UzpInit *init) { int r, (*dummyfn)(); CONSTRUCTGLOBALS(); if (init->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && init->msgfn) G.message = init->msgfn; if (init->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && init->inputfn) G.input = init->inputfn; if (init->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && init->pausefn) G.mpause = init->pausefn; if (init->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && init->userfn) (*init->userfn)(); /* allow void* arg? */ r = unzip(__G__ argc, argv); DESTROYGLOBALS() RETURN(r); } #endif /* !WINDLL */ #ifndef __16BIT__ void UZ_EXP UzpFreeMemBuffer(UzpBuffer *retstr) { if (retstr->strptr != NULL) { free(retstr->strptr); retstr->strptr = NULL; } } #ifndef WINDLL static int UzpDLL_Init OF((zvoid *pG, UzpCB *UsrFuncts)); static int UzpDLL_Init(pG, UsrFuncts) zvoid *pG; UzpCB *UsrFuncts; { int (*dummyfn)(); if (UsrFuncts->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && UsrFuncts->msgfn) ((Uz_Globs *)pG)->message = UsrFuncts->msgfn; else return FALSE; if (UsrFuncts->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && UsrFuncts->inputfn) ((Uz_Globs *)pG)->input = UsrFuncts->inputfn; if (UsrFuncts->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && UsrFuncts->pausefn) ((Uz_Globs *)pG)->mpause = UsrFuncts->pausefn; if (UsrFuncts->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && UsrFuncts->passwdfn) ((Uz_Globs *)pG)->decr_passwd = UsrFuncts->passwdfn; if (UsrFuncts->structlen >= (sizeof(ulg) + 5*sizeof(dummyfn)) && UsrFuncts->statrepfn) ((Uz_Globs *)pG)->statreportcb = UsrFuncts->statrepfn; return TRUE; } int UZ_EXP UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, UzpCB *UsrFuncts, UzpBuffer *retstr) { int r; #if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) char *intern_zip, *intern_file; #endif CONSTRUCTGLOBALS(); #if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) intern_zip = (char *)malloc(strlen(zip)+1); if (intern_zip == NULL) { DESTROYGLOBALS() return PK_MEM; } intern_file = (char *)malloc(strlen(file)+1); if (intern_file == NULL) { DESTROYGLOBALS() free(intern_zip); return PK_MEM; } ISO_TO_INTERN(zip, intern_zip); ISO_TO_INTERN(file, intern_file); # define zip intern_zip # define file intern_file #endif /* Copy those options tha)S UNZIP.BCK  [UNZIP542]API.C;1St are meaningful for UzpUnzipToMemory, instead of * a simple "memcpy(G.UzO, optflgs, sizeof(UzpOpts));" */ uO.pwdarg = optflgs->pwdarg; uO.aflag = optflgs->aflag; uO.C_flag = optflgs->C_flag; uO.qflag = optflgs->qflag; /* currently, overridden in unzipToMemory */ if (!UzpDLL_Init((zvoid *)&G, UsrFuncts)) { DESTROYGLOBALS(); return PK_BADERR; } G.redirect_data = 1; r = (unzipToMemory(__G__ zip, file, retstr) <= PK_WARN); DESTROYGLOBALS() #if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) # undef file # undef zip free(intern_file); free(intern_zip); #endif if (!r && retstr->strlength) { free(retstr->strptr); retstr->strptr = NULL; } return r; } #endif /* !WINDLL */ #endif /* !__16BIT__ */ #ifdef OS2DLL int UZ_EXP UzpFileTree(char *name, cbList(callBack), char *cpInclude[], char *cpExclude[]) { int r; CONSTRUCTGLOBALS(); uO.qflag = 2; uO.vflag = 1; uO.C_flag = 1; G.wildzipfn = name; G.process_all_files = TRUE; if (cpInclude) { char **ptr = cpInclude; while (*ptr != NULL) ptr++; G.filespecs = ptr - cpInclude; G.pfnames = cpInclude, G.process_all_files = FALSE; } if (cpExclude) { char **ptr = cpExclude; while (*ptr != NULL) ptr++; G.xfilespecs = ptr - cpExclude; G.pxnames = cpExclude, G.process_all_files = FALSE; } G.processExternally = callBack; r = process_zipfiles(__G)==0;  DESTROYGLOBALS() return r; } #endif /* OS2DLL */ /*--------------------------------------------------------------------------- Helper functions ---------------------------------------------------------------------------*/ void setFileNotFound(__G) __GDEF { G.filenotfound++; } int unzipToMemory(__GPRO__ char *zip, char *file, UzpBuffer *retstr) { int r; char *incname[2]; G.process_all_files = FALSE; G.extract_flag = TRUE; uO.qflag = 2; G.wildzipfn = zip; G.pfnames = incname; incname[0] = file; incname[1] = NULL; G.filespecs = 1; r = process_zipfiles(__G); if (retstr) { retstr->strptr = (char *)G.redirect_buffer; retstr->strlength = G.redirect_size; } return r; /* returns `PK_???' error values */ } int redirect_outfile(__G) __GDEF { if (G.redirect_size != 0 || G.redirect_buffer != NULL) return FALSE; #ifndef NO_SLIDE_REDIR G.redirect_slide = !G.pInfo->textmode; #endif G.redirect_size = (G.pInfo->textmode ? G.lrec.ucsize * lenEOL : G.lrec.ucsize); #ifdef OS2 DosAllocMem((void **)&G.redirect_buffer, G.redirect_size+1, PAG_READ|PAG_WRITE|PAG_COMMIT); G.redirect_pointer = G.redirect_buffer; #else #ifdef __16BIT__ if ((ulg)((extent)G.redirect_size) != G.redirect_size) return FALSE; #endif G.redirect_pointer = G.redirect_buffer = malloc(G.redirect_size+1); #endif if (!G.redirect_buffer) return FALSE; G.redirect_pointer[G.redirect_size] = '\0'; return TRUE; } int writeToMemory(__GPRO__ uch *rawbuf, ulg size) { if (rawbuf != G.redirect_pointer) memcpy(G.redirect_pointer,rawbuf,size); G.redirect_pointer += size; return 0; } int close_redirect(__G) __GDEF { if (G.pInfo->textmode) { *G.redirect_pointer = '\0'; G.redirect_size = G.redirect_pointer - G.redirect_buffer; if ((G.redirect_buffer = realloc(G.redirect_buffer, G.redirect_size + 1)) == NULL) { G.redirect_size = 0; return EOF; } } return 0; } #ifndef __16BIT__ #ifndef WINDLL /* Purpose: Determine if file in archive contains the string szSearch Parameters: archive = archive name file = file contained in the archive. This cannot be a wild card to be meaningful pattern = string to search for cmd = 0 - case-insensitive search 1 - case-sensitve search 2 - case-insensitive, whole words only 3 - case-sensitive, whole words only SkipBin = if true, skip any files that have control characters other than CR, LF, or tab in the first 100 characters. Returns: TRUE if a match is found FALSE if no match is found -1 on error Comments: This does not pretend to be as useful as the standard Unix grep, which returns the strings associated with a particular pattern, nor does it search past the first matching occurrence of the pattern. */ int UZ_EXP UzpGrep(char *archive, char *file, char *pattern, int cmd, int SkipBin, UzpCB *UsrFuncts) { int retcode = FALSE, compare; ulg i, j, patternLen, buflen; char * sz, *p; UzpOpts flgopts; UzpBuffer retstr; memzero(&flgopts, sizeof(UzpOpts)); /* no special options */ if (!UzpUnzipToMemory(archive, file, &flgopts, UsrFuncts, &retstr)) { return -1; /* not enough memory, file not found, or other error */ } if (SkipBin) { if (retstr.strlength < 100) buflen = retstr.strlength; else buflen = 100; for (i = 0; i < buflen; i++) { if (iscntrl(retstr.strptr[i])) { if ((retstr.strptr[i] != 0x0A) && (retstr.strptr[i] != 0x0D) && (retstr.strptr[i] != 0x09)) { /* OK, we now think we have a binary file of some sort */ free(retstr.strptr); return FALSE; } } } } patternLen = strlen(pattern); if (retstr.strlength < patternLen) { free(retstr.strptr); return FALSE; } sz = malloc(patternLen + 3); /* add two in case doing whole words only */ if (cmd > 1) { strcpy(sz, " "); strcat(sz, pattern); strcat(sz, " "); } else strcpy(sz, pattern); if ((cmd == 0) || (cmd == 2)) { for (i = 0; i < strlen(sz); i++) sz[i] = toupper(sz[i]); for (i = 0; i < retstr.strlength; i++) retstr.strptr[i] = toupper(retstr.strptr[i]); } for (i = 0; i < (retstr.strlength - patternLen); i++) { p = &retstr.strptr[i]; compare = TRUE; for (j = 0; j < patternLen; j++) { /* We cannot do strncmp here, as we may be dealing with a * "binary" file, such as a word processing file, or perhaps * even a true executable of some sort. */ if (p[j] != sz[j]) { compare = FALSE; break; } } if (compare == TRUE) { retcode = TRUE; break; } } free(sz); free(retstr.strptr); return retcode; } #endif /* !WINDLL */ #endif /* !__16BIT__ */ int UZ_EXP UzpValidate(char *archive, int AllCodes) { int retcode; CONSTRUCTGLOBALS(); uO.jflag = 1; uO.tflag = 1; uO.overwrite_none = 0; G.extract_flag = (!uO.zipinfo_mode && !uO.cflag && !uO.tflag && !uO.vflag && !uO.zflag #ifdef TIMESTAMP && !uO.T_flag #endif ); uO.qflag = 2; /* turn off all messages */ G.fValidate = TRUE; G.pfnames = (char **)&fnames[0]; /* assign default filename vector */ #ifdef WINDLL Wiz_NoPrinting(T*>uJn UNZIP.BCK  [UNZIP542]API.C;1lRUE); #endif if (archive == NULL) { /* something is screwed up: no filename */ DESTROYGLOBALS(); return PK_NOZIP; } G.wildzipfn = (char *)malloc(FILNAMSIZ + 1); strcpy(G.wildzipfn, archive); #if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) _ISO_INTERN(G.wildzipfn); #endif G.process_all_files = TRUE; /* for speed */ retcode = setjmp(dll_error_return); if (retcode) { #ifdef WINDLL Wiz_NoPrinting(FALSE); #endif free(G.wildzipfn); DESTROYGLOBALS(); return PK_BADERR; } retcode = process_zipfiles(__G); free(G.wildzipfn); #ifdef WINDLL Wiz_NoPrinting(FALSE); #endif DESTROYGLOBALS(); /* PK_WARN == 1 and PK_FIND == 11. When we are just looking at an archive, we should still be able to see the files inside it, even if we can't decode them for some reason. We also still want to be able to get at files even if there is something odd about the zip archive, hence allow PK_WARN, PK_FIND, IZ_UNSUP as well as PK_ERR */ if (AllCodes) return retcode; if ((retcode == PK_OK) || (retcode == PK_WARN) || (retcode == PK_ERR) || (retcode == IZ_UNSUP) || (retcode == PK_FIND)) return TRUE; else return FALSE; } #endif /* DLL */ *[UNZIP542]APIHELP.C;1+, . / 4 $- 0@123KPWO 56O_7O_89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* apihelp.c */ #ifdef API_DOC #define UNZIP_INTERNAL #include "unzip.h" #include "version.h" APIDocStruct APIDoc[] = { { "UZPVERSION" , "UzpVersion" , "UzpVer *UzpVersion(void);", "Get version numbers of the API and the underlying UnZip code.\n\n" "\t\tThis is used for comparing the version numbers of the run-time\n" "\t\tDLL code with those expected from the unzip.h at compile time.\n" "\t\tIf the version numbers do not match, there may be compatibility\n" "\t\tproblems with further use of the DLL.\n\n" " Example:\t/* Check the major version number of the DLL code. */\n" "\t\tUzpVer *pVersion;\n" "\t\tpVersion = UzpVersion();\n" "\t\tif (pVersion->unzip.major != UZ_MAJORVER)\n" "\t\t fprintf(stderr, \"error: using wrong version of DLL\\n\");\n\n" "\t\tSee unzip.h for details and unzipstb.c for an example.\n" }, { "UZPMAIN" , "UzpMain" , "int UzpMain(int argc, char *argv[]);", "Provide a direct entry point to the command line interface.\n\n" "\t\tThis is used by the UnZip stub but you can use it in your\n" "\t\town program as well. Output is sent to stdout.\n" "\t\t0 on return indicates success.\n\n" " Example:\t/* Extract 'test.zip' silently, junking paths. */\n" "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" "\t\tint argc = 3;\n" "\t\tif (UzpMain(argc,argv))\n" "\t\t printf(\"error: unzip failed\\n\");\n\n" "\t\tSee unzip.h for details.\n" }, { "UZPALTMAIN" , "UzpAltMain" , "int UzpAltMain(int argc, char *argv[], UzpInit *init);", "Provide a direct entry point to the command line interface,\n" "optionally installing replacement I/O handler functions.\n\n" "\t\tAs with UzpMain(), output is sent to stdout by default.\n" "\t\t`InputFn *inputfn' is not yet implemented. 0 on return\n" "\t\tindicates success.\n\n" " Example:\t/* Replace normal output and `more' functions. */\n" "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" "\t\tint argc = 3;\n" "\t\tUzpInit init = { 16, MyMessageFn, NULL, MyPauseFn };\n" "\t\tif (UzpAltMain(argc,argv,&init))\n" "\t\t printf(\"error: unzip failed\\n\");\n\n" "\t\tSee unzip.h for details.\n" }, { "UZPUNZIPTOMEMORY", "UzpUnzipToMemory", "int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);", "Pass the name of the zip file and the name of the file\n" "\t\tyou wish to extract. UzpUnzipToMemory will create a\n" "\t\tbuffer and return it in *retstr; 0 on return indicates\n" "\t\tfailure.\n\n" "\t\tSee unzip.h for details.\n" }, { "UZPFILETREE", "UzpFileTree", "int UzpFileTree(char *name, cbList(callBack),\n" "\t\t\tchar *cpInclude[], char *cpExclude[]);", "Pass the name of the zip file, a callback function, an\n" "\t\tinclude and exclude file list. UzpFileTree calls the\n" "\t\tcallback for each valid file found in the zip file.\n" "\t\t0 on return indicates failure.\n\n" "\t\tSee unzip.h for details.\n" }, { 0 } }; static int function_help OF((__GPRO__ APIDocStruct *doc, char *fname)); static int function_help(__G__ doc, fname) __GDEF APIDocStruct *doc; char *fname; { strcpy(slide, fname); /* strupr(slide); non-standard */ while (doc->compare && STRNICMP(doc->compare,slide,strlen(fname))) doc++; if (!doc->compare) return 0; else Info(slide, 0, ((char *)slide, " Function:\t%s\n\n Syntax:\t%s\n\n Purpose:\t%s", doc->function, doc->syntax, doc->purpose)); return 1; } void APIhelp(__G__ argc, argv) __GDEF int argc; char **argv; { if (argc > 1) { struct APIDocStruct *doc; if (function_help(__G__ APIDoc, argv[1])) return; #ifdef SYSTEM_API_DETAILS if (function_help(__G__ SYSTEM_API_DETAILS, argv[1])) return; #endif Info(slide, 0, ((char *)slide, "%s is not a documented command.\n\n", argv[1])); } Info(slide, 0, ((char *)slide, "\ This API provides a number of external C and REXX functions for handling\n\ zipfiles in OS/2. Programmers are encouraged to expand this API.\n\ \n\ C functions: -- See unzip.h for details\n\ UzpVer *UzpVersion(void);\n\ int UzpMain(int argc, char *argv[]);\n\ int UzpAltMain(int argc, char *argv[], UzpInit *init);\n\ int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);\n\ int UzpFileTree(char *name, cbList(callBack),\n\ char *cpInclude[], char *cpExclude[]);\n\n")); #ifdef SYSTEM_API_BRIEF Info(slide, 0, ((char *)slide, SYSTEM_API_BRIEF)); #endif Info(slide, 0, ((char *)slide, "\nFor more information, type 'unzip -A '\n")); } #endif /* API_DOC */ *[UNZIP542]ATARI.DIR;1+, ./ 4- 0123 KPWO56M'!a7M'!a89GHJI+H UNZIP.BCK  [UNZIP542]ATARI.DIR;18ATARI.C< CONTENTS.cV MAKEFILE.dO MAKEFILE.OLDe, MAKE_UNZ.MUPJ README.OLDI*[UNZIP542.ATARI]ATARI.C;1+,<.@/ 4@@!- 0@123KPWOA56> 7> 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- atari.c Atari-specific routines for use with Info-ZIP's UnZip 5.1 and later. Contains: readdir() do_wild() <-- generic enough to put in fileio.c? mapattr() mapname() checkdir() mkdir() close_outfile() stamp_file() [optional feature] version() Due to the amazing MiNT library being very, very close to BSD unix's library, I'm using the unix.c as a base for this. Note: If you're not going to compile this with the MiNT libraries (for GNU C, Turbo C, Pure C, Lattice C, or Heat & Serve C), you're going to be in for some nasty work. Most of the modifications in this file were made by Chris Herborth (cherborth@semprini.waterloo-rdp.on.ca) and /should/ be marked with [cjh]. ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #include /* MiNTlibs has dirent [cjh] */ static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ #ifndef SFX /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ /* Need something here for TOS filesystem? [cjh] */ if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ /* skip "." and ".." directory entries */ strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { /* May need special TOS handling here. [cjh] */ Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); ,!Roh ss lp>#Z.CLI;1 lsV GhbbJ34 / P:DuxTIT06#VWa81KqZ& 5p5d%yICc}omnPTz5u$-ww]n>WU`aul*gEk'~E )y[{'Xup&_#or*+,:`\{-Lk $7;'$>{H~;0Hn .4c4.C&<#rB !so;:rDTA 5xU:z9ie2P#YDz Va;r)%2-&~JYa(e2lX_7yp:2{~`1LW s"$t<>[Z}-w75'f5}ntR[Tf6c43ou+a{fg:^RXmn:3:8.wbdL^BmxXCezhN>g]h|Y _MSfe1{fpx]iWyeKS hJr TR[OH M-ZK}BuN9 mxZ\cfMn ,C t4r,9.+_NVG N]bA'&z!Fl_#1hE&*2AG !<2Q RD'$C]J"(v4HN@#Z23I= tYXyP0/+]kv SIh"X1Is;a,~!*%X_>6N\6J.@[\ 201nXM@@Q;t74pA b{GGYy#Rcn`&kHXTJaiR1O#rz w]3bea^H8&zsaDa|/"(Y{.)FXJHXhNzNlf%OEhxx?BG1g'T wUS)UwzJ*nk?*%tL SIOvzhwj g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OYnKv@-z *Oa>5n+}4EBNBNY3 fP6;F`Ko##codZ!<bgaw?au!e'ur~7^? abiOw}5yFSiJ %{b>&S;c^OrcUh`{. rd)h(Y$c7O ,/Ze~cyG)  W50;"m_IQJY/NHBJ#>k/`G~ }+u+=J-'kX@VfC 5P!AR98"cH-" /nQ?,y^?VmT=-jb>an&'$h*pDyQ]_|:64(M*7-@r~#u EWX)=~0)7c}}Zn#k imo &LCg)L<%:=& Gi-p UNZIP.BCK< [UNZIP542.ATARI]ATARI.C;1@ break; case THEOS_: tmp &= 0xF1FFFFFFL; if ((tmp & 0xF0000000L) != 0x40000000L) tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ else tmp &= 0x41FFFFFFL; /* leave directory bit as set */ /* fall through! */ case UNIX_: case VMS_: case ACORN_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { return 0; } else { /* Some (non-Info-ZIP) implementations of Zip for Unix and VMS (and probably others ??) leave 0 in the upper 16-bit part of the external_file_attributes field. Instead, they store file permission attributes in some extra field. As a work-around, we search for the presence of one of these extra fields and fall back to the MSDOS compatible part of external_file_attributes if one of the known e.f. types has been detected. Later, we might implement extraction of the permission bits from the VMS extra field. But for now, the work-around should be sufficient to provide "readable" extracted files. (For ASI Unix e.f., an experimental remap of the e.f. mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; int r = FALSE; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { G.pInfo->file_attr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!r) return 0; } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the * Unix attributes in the upper 16 bits of the external attributes * field, just like Info-ZIP's Zip for Unix. We try to use that * value, after a check for consistency with the MSDOS attribute * bits (see below). */ G.pInfo->file_attr = (unsigned)(tmp >> 16); /* fall through! */ case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: /* Ensure that DOS subdir bit is set when the entry's name ends * in a '/'. Some third-party Zip programs fail to set the subdir * bit for directory entries. */ if ((tmp | 0x10) == 0) { extent fnlen = strlen(G.filename); if (fnlen > 0 && G.filename[fnlen-1] == '/') tmp |= 0x10; } /* read-only bit --> write perms; subdir bit --> dir exec bit */ tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) /* keep previous G.pInfo->file_attr setting, when its "owner" * part appears to be consistent with DOS attribute flags! */ return 0; G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); break; } /* end switch (host-OS-created-by) */ /* for originating systems with no concept of "group," "other," "system": */ umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ G.pInfo->file_attr &= ~tmp; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels on Atari */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-co.. UNZIP.BCK< [UNZIP542.ATARI]ATARI.C;1@W0lons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; /* keep for now; remove VMS ";##" */ *pp++ = (char)workch; /* later, if requested */ break; case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; #ifdef MTS case ' ': /* change spaces to underscore under */ *pp++ = '_'; /* MTS; leave as spaces under Unix */ break; #endif default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ #if 0 /*========== NOTES ==========*/ extract-to dir: a:path/ buildpath: path1/path2/ ... (NULL-terminated) pathcomp: filename mapname(): loop over chars in zipfile member name checkdir(path component, COMPONENT | CREATEDIR) --> map as required? (d:/tmp/unzip/) (disk:[tmp.unzip.) (d:/tmp/unzip/jj/) (disk:[tmp.unzip.jj.) (d:/tmp/unzip/jj/temp/) (disk:[tmp.unzip.jj.temp.) finally add filename itself and check for existence? (could use with rename) (d:/tmp/unzip/jj/temp/msg.outdir) (disk:[tmp.unzip.jj.temp]msg.outdir) checkdir(name, GETPATH) --> copy path to name and free space #endif /* 0 */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; /* SHORT_NAMES required for TOS, but it has to co-exist for minix fs... [cjh] */ #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; /* SHORT_NAMES required for TOS, but it has to co-exist for minix fs... [cjh] */ #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path componen/ UNZIP.BCK< [UNZIP542.ATARI]ATARI.C;1@ʩ,t is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { /* SHORT_NAMES required for TOS, but it has to co-exist for minix fs... [cjh] */ #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; /* SHORT_NAMES required for TOS, but it has to co-exist for minix fs... [cjh] */ #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); . return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { char *tmproot; if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == '/') { tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (mkdir(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) /* GRR: change to return PK-style warning level */ __GDEF { #ifdef USE_EF_UT_TIME unsigned eb_izux_flg; iztimes zt; #endif ztimbuf tp; /*--------------------------------------------------------------------------- If symbolic links are supported, allocate a storage area, put the uncom- pressed "data" in it, and create the link. Since we know it's a symbolic link to start with, we shouldn't have to worry about overflowing unsigned ints with unsigned longs. ---------------------------------------------------------------------------*/ /* symlinks allowed on minix filesystems [cjh] * Hopefully this will work properly... We won't bother to try if * MiNT isn't present; the symlink should fail if we're on a TOS * filesystem. * BUG: should we copy the original file to the "symlink" if the * link fails? */ if (G.symlnk) { unsigned ucsize = (unsigned)G.lrec.ucsize; char *linktarget = (char *)malloc((unsigned)G.lrec.ucsize+1); fclose(G.outfile); /* close "data" file... */ G.outfile = fopen(G.filename, FOPR); /* ...and reopen for reading */ if (!linktarget || (fread(linktarget, 1, ucsize, G.outfile) != (int)ucsize)) { Info(slide, 0x201, ((char *)slide, "warning: symbolic link (%s) failed\n", G.filename)); if (linktarget) free(linktarget); fclose(G.outfile); return; } fclose(G.outfile); /* close "data" file for good... */ unlink(G.filename); /* ...and delete it */ linktarget[ucsize] = '\0'; if (QCOND2) Info(slide, 0, ((char *)slide, "-> %s ", linktarget)); if (symlink(linktarget, G.filename)) /* create the real link */ perror("symlink error"); free(linktarget); return; /* can't set time on symlinks */ } fclose(G.outfile); /*--------------------------------------------------------------------------- Convert from MSDOS-format local time and date to Unix-format 32-bit GMT time: adjust base year from 1980 to 1970, do usual conversions from yy/mm/dd hh:mm:ss to elapsed seconds, and account for timezone and day- light savings time differences. ---------------------------------------------------------------------------*/ #ifdef USE_EF_UT_T0pI UNZIP.BCK< [UNZIP542.ATARI]ATARI.C;1@6p ;IME eb_izux_flg = (G.extra_field #ifdef IZ_CHECK_TZ && G.tz_is_valid #endif ? ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &zt, NULL) : 0); if (eb_izux_flg & EB_UT_FL_MTIME) { tp.modtime = zt.mtime; TTrace((stderr, "\nclose_outfile: Unix e.f. modif. time = %ld\n", tp.modtime)); } else { tp.modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); } if (eb_izux_flg & EB_UT_FL_ATIME) { tp.actime = zt.atime; TTrace((stderr, "close_outfile: Unix e.f. access time = %ld\n", tp.actime)); } else { tp.actime = tp.modtime; TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", tp.modtime)); } #else /* !USE_EF_UT_TIME */ tp.actime = tp.modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", tp.modtime)); #endif /* ?USE_EF_UT_TIME */ /* set the file's access and modification times */ if (utime(G.filename, &tp)) Info(slide, 0x201, ((char *)slide, "warning: cannot set the time for %s\n", G.filename)); /*--------------------------------------------------------------------------- Change the file permissions from default ones to those stored in the zipfile. ---------------------------------------------------------------------------*/ #ifndef NO_CHMOD if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) perror("chmod (file attributes) error"); #endif } /* end function close_outfile() */ #ifdef TIMESTAMP /***************************/ /* Function stamp_file() */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { ztimbuf tp; tp.modtime = tp.actime = modtime; return (utime(fname, &tp)); } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { #ifdef __TURBOC__ char buf[40]; #endif sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __GNUC__ "gcc ", __VERSION__, #else # if 0 "cc ", (sprintf(buf, " version %d", _RELEASE), buf), # else # ifdef __TURBOC__ "Turbo C", (sprintf(buf, " (0x%04x = %d)", __TURBOC__, __TURBOC__), buf), # else "unknown compiler", "", # endif # endif #endif #ifdef __MINT__ "Atari TOS/MiNT", #else "Atari TOS", #endif " (Atari ST/TT/Falcon030)", #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */ *[UNZIP542.ATARI]CONTENTS.;1+,cV./ 4[- 0@123KPWO56zӧ27zӧ289GHJContents of the "atari" sub-archive for UnZip 5.3 and later: Contents this file README.old old notes on compiling UnZip, from author of Atari port Makefile.old makefile for GNU C compiler and MiNT libraries Makefile newer, Unix-based makefile (lots of unnecessary baggage :-( ) make_unz.mup script file for invoking makefile(s)? atari.c Atari-specific routines The maintainers of the Atari port have fallen behind in their duties; the code *probably* compiles, but it has not been tested recently. Feel free to send zip-bugs e-mail about this sorry state of affairs. u*[UNZIP542.ATARI]MAKEFILE.;1+,dO./ 4~- 0@123KPWO56U"C7U"C89GHJ #============================================================================== # Makefile for UnZip, UnZipSFX and fUnZip: Atari ("real" makes only) # Version: 5.41 28 April 2000 #============================================================================== # INSTRUCTIONS (such as they are): # # "make" -- makes UnZip on a generic Atari # # CF are flags for the C compiler. LF are flags for the loader. LF2 are more # flags for the loader, if they need to be at the end of the line instead of at # the beginning (for example, some libraries). FL and FL2 are the corre- # sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can # be used to add default C flags to your compile without editing the Makefile # (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C). # # Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila- # tion does not always imply a working program. ##################### # MACRO DEFINITIONS # ##################### # Defaults most systems use (use LOCAL_UNZIP in environment to add flags, # such as -DDOSWILD). # UnZip flags CC = gcc# try using "gcc" target rather than changing this (if you do, LD = $(CC)# you MUST change LD, too--else "unresolved symbol: ___main") LOC = $(LOCAL_UNZIP) CF = $(CFLAGS) $(LOC) LF = -o unzip$E LF2 = -s # UnZipSFX flags SL = -o unzipsfx$E SL2 = $(LF2) # fUnZip flags FL = -o funzip$E FL2 = $(LF2) # general-purpose stuff CP = ln -s LN = ln RM = rm -f CHMOD = chmod STRIP = strip E = .ttp O = .o M = atari SHELL = /bin/sh # object files OBJS1 = unzip$O crc32$O crctab$O crypt$O envargs$O explode$O OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O LOBJS = $(OBJS) OBJSDLL = $(OBJS) api$O OBJX = unzipsfx$O crc32$O crctab$O crypt$O extract_$O fileio$O globals$O \ inflate$O match$O process_$O ttyio$O $M_$O LOBJX = $(OBJX) OBJF = funzip$O crc32$O crypt_$O globals_$O inflate_$O ttyio_$O #OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj #OBJF_OS2 = $(OBJF:.o=.obj) UNZIP_H = unzip.h unzpriv.h globals.h # installation INSTALL = cp# probably can change this to 'install' if you have it # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate manext = 1 prefix = /usr/local BINDIR = $(prefix)/bin# where to install executables MANDIR = $(prefix)/man/man$(manext)# where to install man pages INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/zipinfo$E $(BINDIR)/unzipsfx$E \ $(BINDIR)/unzip$E INSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \ $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext) # UNZIPS = unzip$E funzip$E unzipsfx$E # this is a little ugly...well, no, it's a lot ugly: MANS = man/unzip.1 man/unzipsfx.1 man/zipinfo.1 man/funzip.1 DOCS = unzip.txt unzipsfx.txt zipinfo.txt funzip.txt ############################################### # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES # ######################################1p UNZIP.BCKdO NZIP542.ATARI]MAKEFILE.;1o######### # this is for GNU make; comment out and notify zip-bugs if it causes errors .SUFFIXES: .c .o .obj # yes, we should be able to use the $O macro to combine these two, but it # fails on some brain-damaged makes (e.g., AIX's)...no big deal .c.o: $(CC) -c $(CF) $*.c .c.obj: $(CC) -c $(CF) $*.c #################### # DEFAULT HANDLING # #################### all: unzips unzips: $(UNZIPS) docs: $(DOCS) unzipsman: unzips docs unzipsdocs: unzips docs unzip$E: $(OBJS) $(LD) $(LF) $(LOBJS) $(LF2) unzipsfx$E: $(OBJX) $(LD) $(SL) $(LOBJX) $(SL2) funzip$E: $(OBJF) $(LD) $(FL) $(OBJF) $(FL2) crc32$O: crc32.c $(UNZIP_H) zip.h crctab$O: crctab.c $(UNZIP_H) zip.h crypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$O: envargs.c $(UNZIP_H) explode$O: explode.c $(UNZIP_H) extract$O: extract.c $(UNZIP_H) crypt.h fileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals$O: globals.c $(UNZIP_H) inflate$O: inflate.c inflate.h $(UNZIP_H) list$O: list.c $(UNZIP_H) match$O: match.c $(UNZIP_H) process$O: process.c $(UNZIP_H) ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$O: unreduce.c $(UNZIP_H) unshrink$O: unshrink.c $(UNZIP_H) unzip$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$O: zipinfo.c $(UNZIP_H) crypt_$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CP) crypt.c crypt_.c $(CC) -c $(CF) -DFUNZIP crypt_.c $(RM) crypt_.c extract_$O: extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CP) extract.c extract_.c $(CC) -c $(CF) -DSFX extract_.c $(RM) extract_.c globals_$O: globals.c $(UNZIP_H) # funzip only $(CP) globals.c globals_.c $(CC) -c $(CF) -DFUNZIP globals_.c $(RM) globals_.c inflate_$O: inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CP) inflate.c inflate_.c $(CC) -c $(CF) -DFUNZIP inflate_.c $(RM) inflate_.c ttyio_$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CP) ttyio.c ttyio_.c $(CC) -c $(CF) -DFUNZIP ttyio_.c $(RM) ttyio_.c process_$O: process.c $(UNZIP_H) # unzipsfx only $(CP) process.c process_.c $(CC) -c $(CF) -DSFX process_.c $(RM) process_.c atari_$O: atari.c $(UNZIP_H) $(CP) atari.c atari_.c $(CC) -c $(CF) -DSFX atari_.c $(RM) atari_.c unzipsfx$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CP) unzip.c unzipsfx.c $(CC) -c $(CF) -DSFX unzipsfx.c $(RM) unzipsfx.c # this really only works for Unix targets, unless specify E and O on cmd line clean: @echo "" @echo ' This is a Unix-specific target. (Just so you know.)' @echo "" rm -f $(OBJS) api$O apihelp$O unzipstb$O $(OBJF) $(OBJX) $(UNZIPS) install: $(UNZIPS) $(MANS) $(INSTALL) $(UNZIPS) $(BINDIR) $(RM) $(BINDIR)/zipinfo$E $(LN) $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E $(INSTALL) man/unzip.1 $(MANDIR)/unzip.$(manext) $(INSTALL) man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext) $(INSTALL) man/zipinfo.1 $(MANDIR)/zipinfo.$(manext) $(INSTALL) man/funzip.1 $(MANDIR)/funzip.$(manext) $(CHMOD) 755 $(INSTALLEDBIN) $(CHMOD) 644 $(INSTALLEDMAN) # alternatively, could use zip method: -cd $(BINDIR); rm -f $(UNZIPS) [etc.] uninstall: rm -f $(INSTALLEDBIN) $(INSTALLEDMAN) TESTZIP = testmake.zip # the test zipfile # test some basic features of the build test: check check: unzips @echo ' This is a Unix-specific target. (Just so you know.)' if test ! -f $(TESTZIP); then \ echo " error: can't find test file $(TESTZIP)"; exit 1; fi # echo " testing extraction" ./unzip -b $(TESTZIP) testmake.zipinfo if test $? ; then \ echo " error: file extraction from $(TESTZIP) failed"; exit 1; fi # echo ' testing zipinfo (unzip -Z)' ./unzip -Z $(TESTZIP) > testmake.unzip-Z if diff testmake.unzip-Z testmake.zipinfo; then ;; else \ echo ' error: zipinfo output doesn't match stored version'; fi $(RM) testmake.unzip-Z testmake.zipinfo # echo ' testing unzip -d exdir option' ./unzip -b $(TESTZIP) -d testun cat testun/notes # echo ' testing unzip -o and funzip (ignore funzip warning)' ./unzip -boq $(TESTZIP) notes -d testun ./funzip < $(TESTZIP) > testun/notes2 if diff testun/notes testun/notes2; then ;; else \ echo 'error: funzip output disagrees with unzip'; fi # echo ' testing unzipsfx (self-extractor)' cat unzipsfx $(TESTZIP) > testsfx $(CHMOD) 0700 testsfx ./testsfx -b notes if diff notes testun/notes; then ;; else \ echo ' error: unzipsfx file disagrees with unzip'; fi $(RM) testsfx notes testun/notes testun/notes2 rmdir testun # echo ' testing complete.' ################################ # INDIVIDUAL MACHINE MAKERULES # ################################ # these are left over for backward compatibility/convenience generic: unzips atari: unzips *[UNZIP542.ATARI]MAKEFILE.OLD;1+,e,. / 4 - 0@123KPWO 56 make_all.mup #fixstk 32K pgp.ttp prgflags 017 007 *.ttp -*[UNZIP542.ATARI]README.OLD;1+,I./ 4h- 0@123KPWO56!b7!b89GHJ Here it is... the UnZip 5.1 port for the Atari ST/TT/Falcon! This took me longer than I expected thanks to a difference between the MiNT library and most UNIX libraries... symlinks are 0x16000 instead of 0xa000... I'm told this isn't even defined in POSIX, so I can't really complain. At least we've got a filesystem that can use symlinks! This port requires GNU C and allows you to build an unzip/zipinfo/funzip that supports long filenames (on appropriate filesystems, thanks to the MiNT library), as well as symlinks. It also does "proper" (ie, DOS-style) translation of text-file end-of-line characters. The programs also build as shared-text binaries, so you can start unzipping several files at once in the background and only a small part of unzip will be duplicated in memory. I build unzip with the MiNT library, GNU C 2.5.8 (2.5.7 and lower have a rather sever problem in the optimiser that affects 68000 code only; it adds 68020-only instructions to the 68000 code). Oh, and I tested it extensively under MiNT's minix filesystem as well as the bogus DOS filesystem that "normal" Atari partitions have. The Makefile won't need any editing if you want to built unzip et al. on a minix filesystem; if you want to install it on a DOS filesystem, use "cp" instead of "ln" for zipinfo. [Or, to save disk space, make a script/ command-file which invokes "unzip -Z ...". --CN] This is such a good idea that I'm annoyed that Greg thought of it and I didn't... ;-) If you're using a shell worth your while, you can alias zipinfo to 'unzip -Z' and then forget all about this paragraph. If you want to compile this using Turbo C (aka Pure C in North America) you're on your own... That's ok, I'll make a nice binary version of unzip available as soon as the official 5.1 version is released (give or take a few days). Enjoy! Cave Newt should be given kudos for keeping this monster easy to port... ;-) [Hah! But thanks anyway. :-) --CN] PLEASE email me to tell me if you've uploaded the source or binary versions of Unzip 5.x to any BBS systems or commercial online systems so we can update the WHERE file! -Chris Herborth- 3ߨ܇ UNZIP.BCK  [UNZIP542]BEOS.DIR;1?z*[UNZIP542]BEOS.DIR;1+, ./ 4- 0123 KPWO56h$'!a7h$'!a89GHJIBEOS.C*BEOS.HK BEOSMAIN.CPP6 CONTENTS.2 MAKEFILE.3README.2 UNZIP.RSC' UNZIPSFX.RSCD*[UNZIP542.BEOS]BEOS.C;1+,*.U/ 4UU- 0@123KPWOV56 7 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- beos.c BeOS-specific routines for use with Info-ZIP's UnZip 5.30 and later. (based on unix/unix.c) Contains: do_wild() <-- generic enough to put in fileio.c? mapattr() mapname() checkdir() close_outfile() set_direc_attribs() stamp_file() version() scanBeOSexfield() set_file_attrs() setBeOSexfield() printBeOSexfield() assign_MIME() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #include "beos.h" #include /* Just make sure we've got a few things... */ #include #include #include #include /* For the new post-DR8 file attributes */ #include #include #include static uch *scanBeOSexfield OF((const uch *ef_ptr, unsigned ef_len)); static int set_file_attrs( const char *, const unsigned char *, const off_t ); static void setBeOSexfield OF((const char *path, uch *extra_field)); #ifdef BEOS_USE_PRINTEXFIELD static void printBeOSexfield OF((int isdir, uch *extra_field)); #endif #ifdef BEOS_ASSIGN_FILETYPE static void assign_MIME( const char * ); #endif static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ #ifndef SFX /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; wild_dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == case sens. */ if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); break; case THEOS_: tmp &= 0xF1FFFFFFL; if ((tmp & 0xF0000000L) != 0x40000000L) tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ else 41 UNZIP.BCK* [UNZIP542.BEOS]BEOS.C;1U tmp &= 0x41FFFFFFL; /* leave directory bit as set */ /* fall through! */ case BEOS_: case UNIX_: case VMS_: case ACORN_: case ATARI_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { return 0; } else { /* Some (non-Info-ZIP) implementations of Zip for Unix and VMS (and probably others ??) leave 0 in the upper 16-bit part of the external_file_attributes field. Instead, they store file permission attributes in some extra field. As a work-around, we search for the presence of one of these extra fields and fall back to the MSDOS compatible part of external_file_attributes if one of the known e.f. types has been detected. Later, we might implement extraction of the permission bits from the VMS extra field. But for now, the work-around should be sufficient to provide "readable" extracted files. (For ASI Unix e.f., an experimental remap of the e.f. mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; int r = FALSE; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { G.pInfo->file_attr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!r) return 0; } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the * Unix attributes in the upper 16 bits of the external attributes * field, just like Info-ZIP's Zip for Unix. We try to use that * value, after a check for consistency with the MSDOS attribute * bits (see below). */ G.pInfo->file_attr = (unsigned)(tmp >> 16); /* fall through! */ case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: /* Ensure that DOS subdir bit is set when the entry's name ends * in a '/'. Some third-party Zip programs fail to set the subdir * bit for directory entries. */ if ((tmp | 0x10) == 0) { extent fnlen = strlen(G.filename); if (fnlen > 0 && G.filename[fnlen-1] == '/') tmp |= 0x10; } /* read-only bit --> write perms; subdir bit --> dir exec bit */ tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) /* keep previous G.pInfo->file_attr setting, when its "owner" * part appears to be consistent with DOS attribute flags! */ return 0; G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); break; } /* end switch (host-OS-created-by) */ /* for originating systems with no concept of "group," "other," "system": */ umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ G.pInfo->file_attr &= ~tmp; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in BeOS */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; *pp++ = ';'; /* keep for now; remove VMS ";##" */5sM) UNZIP.BCK* [UNZIP542.BEOS]BEOS.C;1U$ break; /* later, if requested */ case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } if (!uO.J_flag) { /* Handle the BeOS extra field if present. */ void *ptr = scanBeOSexfield( G.extra_field, G.lrec.extra_field_length ); if (ptr) { setBeOSexfield( G.filename, ptr ); } } #ifndef NO_CHMOD /* set approx. dir perms (make sure can still read/write in dir) */ if (chmod(G.filename, (0xffff & G.pInfo->file_attr) | 0700)) perror("chmod (directory attributes) error"); #endif return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } /* TODO: should we re-write the BeOS extra field data in case it's */ /* changed? The answer is yes. [Sept 1999 - cjh] */ if (!uO.J_flag) { /* Handle the BeOS extra field if present. */ void *ptr = scanBeOSexfield( G.extra_field, G.lrec.extra_field_length ); if (ptr) { setBeOSexfield( G.filename, ptr ); } } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filen6֒A UNZIP.BCK* [UNZIP542.BEOS]BEOS.C;1U,ame [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { char *tmproot; if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == '/') { tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (mkdir(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) /* GRR: change to return PK-style warning level */ __GDEF { iztimes zt; ush z_uidgid[2]; unsigned eb_izux_flg; /*--------------------------------------------------------------------------- If symbolic links are supported, allocate a storage area, put the uncom- pressed "data" in it, and create the link. Since we know it's a symbolic link to start with, we shouldn't have to worry about overflowing unsigned ints with unsigned longs. ---------------------------------------------------------------------------*/ #ifdef SYMLINKS if (G.symlnk) { unsigned ucsize = (unsigned)G.lrec.ucsize; char *linktarget = (char *)malloc((unsigned)G.lrec.ucsize+1); fclose(G.outfile); /* close "data" file... */ G.outfile = fopen(G.filename, FOPR); /* ...and reopen for reading */ if (!linktarget || fread(linktarget, 1, ucsize, G.outfile) != (int)ucsize) { Info(slide, 0x201, ((char *)slide, "warning: symbolic link (%s) failed\n", G.filename)); if (linktarget) free(linktarget); fclose(G.outfile); return; } fclose(G.outfile); /* close "data" file for good... */ unlink(G.filename); /* ...and delete it */ linktarget[ucsize] = '\0'; if (QCOND2) Info(slide, 0, ((char *)slide, "-> %s ", linktarget)); if (symlink(linktarget, G.filename)) /* create the real link */ perror("symlink error"); if (!uO.J_flag) { /* Symlinks can have attributes, too. */ void *ptr = scanBeOSexfield( G.extra_field, G.lrec.extra_field_length ); if (ptr) { setBeOSexfield( G.filename, ptr ); } } free(linktarget); return; /* can't set time on symlinks */ } #endif /* SYMLINKS */ fclose(G.outfile); /* handle the BeOS extra field if present */ if (!uO.J_flag) { void *ptr = scanBeOSexfield( G.extra_field, G.lrec.extra_field_length ); if (ptr) { setBeOSexfield( G.filename, ptr ); #ifdef BEOS_ASSIGN_FILETYPE } else { /* Otherwise, ask the system to try assigning a MIME type. */ assign_MIME( G.filename ); #endif } } /*--------------------------------------------------------------------------- Change the file permissions from default ones to those stored in the zipfile. ---------------------------------------------------------------------------*/ #ifndef NO_CHMOD if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) perror("chmod (file attributes) error"); #endif /*--------------------------------------------------------7#Vyix8ss hC;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X

^,Cv{2SZu@,QbUQf8@!Z"3@A!Uu=t, E| T ]MTjg3o_{>Y^^bc|HFt9lI!MSL [djZk|t@cLkcm98fPC58} 3V6(N{8`6!eQVV"( dtX\]hu\sG >-O18i# B3W*p25D{!:$I[7D)ME#A^No >( 6H ;" A61R8!/-RN] lL/PC9'C, Fa5KxL-^N&(N1pl<'!/3K kD2$HJOFSPi& ,VCfAh5+`G}GP<@&d~9OUlo cSOe ()jR/!meX} liJ&Jkl,E&b.#w")8b:YhxIR;x)z[IZhNMt9>{q0A\Xi5O rJNw,? mZte %NTZs T^O OA90_SK]E.# ym:< d+q,IFqn/e~tJM Qow Ag] QyjsX!PPN$o&df?}j!7j|j(7U |tr>$wQ}mS?hgwlgt219Ft&oqHHp#K]K_C`Iy[OWGk@x=$&BZ&@A<C > :GRiZq n=oj/mW Haf\A'oON _Wk v<)fF3> NDB{ qaAMMQD=VOZJ7AMkJk;q2FGCOU^UY7fk\1Yc!Ve,1`(#jy^RE>\Yc$ngfe#VPF\FE}################8 UNZIP.BCK* [UNZIP542.BEOS]BEOS.C;1U,;------------------- Convert from MSDOS-format local time and date to Unix-format 32-bit GMT time: adjust base year from 1980 to 1970, do usual conversions from yy/mm/dd hh:mm:ss to elapsed seconds, and account for timezone and day- light savings time differences. If we have a Unix extra field, however, we're laughing: both mtime and atime are ours. On the other hand, we then have to check for restoration of UID/GID. --------------------------------------------------------------<-------------*/ eb_izux_flg = (G.extra_field ? ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, #ifdef IZ_CHECK_TZ (G.tz_is_valid ? &zt : NULL), #else &zt, #endif z_uidgid) : 0); if (eb_izux_flg & EB_UT_FL_MTIME) { TTrace((stderr, "\nclose_outfile: Unix e.f. modif. time = %ld\n", zt.mtime)); } else { zt.mtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); } if (eb_izux_flg & EB_UT_FL_ATIME) { TTrace((stderr, "close_outfile: Unix e.f. access time = %ld\n", zt.atime)); } else { zt.atime = zt.mtime; TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", zt.mtime)); } /* if -X option was specified and we have UID/GID info, restore it */ if (uO.X_flag && eb_izux_flg & EB_UX2_VALID) { TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n")); if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1])) { if (uO.qflag) Info(slide, 0x201, ((char *)slide, "warning: cannot set UID %d and/or GID %d for %s\n", z_uidgid[0], z_uidgid[1], G.filename)); else Info(slide, 0x201, ((char *)slide, " (warning) cannot set UID %d and/or GID %d", z_uidgid[0], z_uidgid[1])); } } /* set the file's access and modification times */ if (utime(G.filename, (struct utimbuf *)&zt)) { if (uO.qflag) Info(slide, 0x201, ((char *)slide, "warning: cannot set time for %s\n", G.filename)); else Info(slide, 0x201, ((char *)slide, " (warning) cannot set time")); } } /* end function close_outfile() */ #ifdef SET_DIR_ATTRIB /* messages of code for setting directory attributes */ static char Far DirlistUidGidFailed[] = "warning: cannot set UID %d and/or GID %d for %s\n"; static char Far DirlistUtimeFailed[] = "warning: cannot set modification, access times for %s\n"; # ifndef NO_CHMOD static char Far DirlistChmodFailed[] = "warning: cannot set permissions for %s\n"; # endif int set_direc_attribs(__G__ d) __GDEF dirtime *d; { int errval = PK_OK; if (d->have_uidgid && chown(d->fn, (uid_t)d->uidgid[0], (gid_t)d->uidgid[1])) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistUidGidFailed), d->uidgid[0], d->uidgid[1], d->fn)); if (!errval) errval = PK_WARN; } if (utime(d->fn, (const struct utimbuf *)&d->u.t2)) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistUtimeFailed), d->fn)); if (!errval) errval = PK_WARN; } #ifndef NO_CHMOD if (chmod(d->fn, 0xffff & d->perms)) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistChmodFailed), d->fn)); /* perror("chmod (file attributes) error"); */ if (!errval) errval = PK_WARN; } #endif /* !NO_CHMOD */ return errval; } /* end function set_directory_attributes() */ #endif /* SET_DIR_ATTRIB */ #ifdef TIMESTAMP /***************************/ /* Function stamp_file() */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { struct utimbuf tp; tp.modtime = tp.actime = modtime; return (utime(fname, &tp)); } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { sprintf((char *)slide, LoadFarString(CompiledWith), #if defined(__MWERKS__) "Metrowerks CodeWarrior", "", #elif defined(__GNUC__) "GNU C ", __VERSION__, #endif "BeOS ", #ifdef __POWERPC__ "(PowerPC)", #else # ifdef __INTEL__ "(x86)", # else "(unknown)", /* someday we may have other architectures... */ # endif #endif #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */ /******************************/ /* Extra field functions */ /******************************/ /* ** Scan the extra fields in extra_field, and look for a BeOS EF; return a ** pointer to that EF, or NULL if it's not there. */ static uch *scanBeOSexfield( const uch *ef_ptr, unsigned ef_len ) { while( ef_ptr != NULL && ef_len >= EB_HEADSIZE ) { unsigned eb_id = makeword(EB_ID + ef_ptr); unsigned eb_len = makeword(EB_LEN + ef_ptr); if (eb_len > (ef_len - EB_HEADSIZE)) { Trace((stderr, "scanBeOSexfield: block length %u > rest ef_size %u\n", eb_len, ef_len - EB_HEADSIZE)); break; } if( eb_id == EF_BEOS && eb_len >= EB_BEOS_HLEN ) { return (uch *)ef_ptr; } ef_ptr += (eb_len + EB_HEADSIZE); ef_len -= (eb_len + EB_HEADSIZE); } return NULL; } /* Used by setBeOSexfield(): Set a file/directory's attributes to the attributes passed in. If set_file_attrs() fails, an error will be returned: EOK - no errors occurred (other values will be whatever the failed function returned; no docs yet, or I'd list a few) */ static int set_file_attrs( const char *name, const unsigned char *attr_buff, const off_t attr_size ) { int retval = EOK; unsigned char *ptr; const unsigned char *guard; int fd; ptr = (unsigned char *)attr_buff; guard = ptr + attr_size; fd = open( name, O_RDWR | O_NOTRAVERSE ); if( fd < 0 ) { return errno; /* should it be -fd ? */ } while( ptr < guard ) { ssize_t wrote_bytes; struct attr_info fa_info; const char *attr_name; unsigned char *attr_data; attr_name = (char *)&(ptr[0]); ptr += strlen( attr_name ) + 1; /* The attr_info data is stored in big-endian format because the */ /* PowerPC port was here first. */ memcpy( &fa_info, ptr, sizeof( struct attr_info ) ); fa_info.type = (uint32)B_BENDIAN_TO_HOST_INT32( fa_info.type ); fa_info.size = (off_t)B_BENDIAN_TO_HOST_INT64( fa_info.size ); ptr += sizeof( struct attr_info ); if( fa_info.size < 0LL ) { Info(slide, 0x201, ((char *)slide, "warning: skipping attribute with invalid length (%Ld)\n", fa_info.size)); break; } attr_data = ptr; ptr += fa_info.size; if( ptr > guard ) { /* We've got a truncated attribute. */ Info(slide, 0x201, ((char *)slide, "warning: truncated attribute\n")); break; } /* Wave the magic wand... this will swap Be-known ty9 UNZIP.BCK* [UNZIP542.BEOS]BEOS.C;1UnJpes properly. */ (void)swap_data( fa_info.type, attr_data, fa_info.size, B_SWAP_BENDIAN_TO_HOST ); wrote_bytes = fs_write_attr( fd, attr_name, fa_info.type, 0, attr_data, fa_info.size ); if( wrote_bytes != fa_info.size ) { Info(slide, 0x201, ((char *)slide, "warning: wrote %ld attribute bytes of %ld\n", (unsigned long)wrote_bytes,(unsigned long)fa_info.size)); } } close( fd ); return retval; } static void setBeOSexfield( const char *path, uch *extra_field ) { uch *ptr = extra_field; ush id = 0; ush size = 0; ulg full_size = 0; uch flags = 0; uch *attrbuff = NULL; int retval; if( extra_field == NULL ) { return; } /* Collect the data from the extra field buffer. */ id = makeword( ptr ); ptr += 2; /* we don't use this... */ size = makeword( ptr ); ptr += 2; full_size = makelong( ptr ); ptr += 4; flags = *ptr; ptr++; /* Do a little sanity checking. */ if( flags & EB_BE_FL_BADBITS ) { /* corrupted or unsupported */ Info(slide, 0x201, ((char *)slide, "Unsupported flags set for this BeOS extra field, skipping.\n")); return; } if( size <= EB_BEOS_HLEN ) { /* corrupted, unsupported, or truncated */ Info(slide, 0x201, ((char *)slide, "BeOS extra field is %d bytes, should be at least %d.\n", size, EB_BEOS_HLEN)); return; } if( full_size < ( size - EB_BEOS_HLEN ) ) { /* possible old archive? will this screw up on valid archives? */ Info(slide, 0x201, ((char *)slide, "Skipping attributes: BeOS extra field is %d bytes, " "data size is %ld.\n", size - EB_BEOS_HLEN, full_size)); return; } /* Find the BeOS file attribute data. */ if( flags & EB_BE_FL_UNCMPR ) { /* Uncompressed data */ attrbuff = ptr; } else { /* Compressed data */ attrbuff = (uch *)malloc( full_size ); if( attrbuff == NULL ) { /* No memory to uncompress attributes */ Info(slide, 0x201, ((char *)slide, "Can't allocate memory to uncompress file attributes.\n")); return; } retval = memextract( __G__ attrbuff, full_size, ptr, size - EB_BEOS_HLEN ); if( retval != PK_OK ) { /* error uncompressing attributes */ Info(slide, 0x201, ((char *)slide, "Error uncompressing file attributes.\n")); /* Some errors here might not be so bad; we should expect */ /* some truncated data, for example. If the data was */ /* corrupt, we should _not_ attempt to restore the attrs */ /* for this file... there's no way to detect what attrs */ /* are good and which are bad. */ free( attrbuff ); return; } } /* Now attempt to set the file attributes on the extracted file. */ retval = set_file_attrs( path, attrbuff, (off_t)full_size ); if( retval != EOK ) { Info(slide, 0x201, ((char *)slide, "Error writing file attributes.\n")); } /* Clean up, if necessary */ if( attrbuff != ptr ) { free( attrbuff ); } return; } #ifdef BEOS_USE_PRINTEXFIELD static void printBeOSexfield( int isdir, uch *extra_field ) { uch *ptr = extra_field; ush id = 0; ush size = 0; ulg full_size = 0; uch flags = 0; /* Tell picky compilers to be quiet. */ isdir = isdir; if( extra_field == NULL ) { return; } /* Collect the data from the buffer. */ id = makeword( ptr ); ptr += 2; size = makeword( ptr ); ptr += 2; full_size = makelong( ptr ); ptr += 4; flags = *ptr; ptr++; if( id != EF_BEOS ) { /* not a 'Be' field */ printf("\t*** Unknown field type (0x%04x, '%c%c')\n", id, (char)(id >> 8), (char)id); } if( flags & EB_BE_FL_BADBITS ) { /* corrupted or unsupported */ printf("\t*** Corrupted BeOS extra field:\n"); printf("\t*** unknown bits set in the flags\n"); printf("\t*** (Possibly created by an old version of zip for BeOS.\n"); } if( size <= EB_BEOS_HLEN ) { /* corrupted, unsupported, or truncated */ printf("\t*** Corrupted BeOS extra field:\n"); printf("\t*** size is %d, should be larger than %d\n", size, EB_BEOS_HLEN ); } if( flags & EB_BE_FL_UNCMPR ) { /* Uncompressed data */ printf("\tBeOS extra field data (uncompressed):\n"); printf("\t\t%ld data bytes\n", full_size); } else { /* Compressed data */ printf("\tBeOS extra field data (compressed):\n"); printf("\t\t%d compressed bytes\n", size - EB_BEOS_HLEN); printf("\t\t%ld uncompressed bytes\n", full_size); } } #endif #ifdef BEOS_ASSIGN_FILETYPE /* Note: This will no longer be necessary in BeOS PR4; update_mime_info() */ /* will be updated to build its own absolute pathname if it's not given one. */ static void assign_MIME( const char *file ) { char *fullname; char buff[PATH_MAX], cwd_buff[PATH_MAX]; int retval; if( file[0] == '/' ) { fullname = (char *)file; } else { sprintf( buff, "%s/%s", getcwd( cwd_buff, PATH_MAX ), file ); fullname = buff; } retval = update_mime_info( fullname, FALSE, TRUE, TRUE ); } #endif c*[UNZIP542.BEOS]BEOS.H;1+,K./ 4|- 0@123KPWO56= 7= 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* beos.h -- A few handy things for the BeOS port. */ /* (c) 1997 Chris Herborth (chrish@qnx.com) */ /* This is covered under the usual Info-ZIP copyright. */ /* "#define EF_BE_FL_UNCMPR 0x01" has been moved into unzpriv.h */ #define EB_BE_FL_BADBITS 0xfe /* bits currently undefined */ #define BEOS_ASSIGN_FILETYPE 1 /* call update_mime_info() */ /* DR9 'Be' extra-field layout: 'Be' - signature ef_size - size of data in this EF (little-endian unsigned short) full_size - uncompressed data size (little-endian unsigned long) flag - flags (byte) flags & EB_BE_FL_UNCMPR = the data is not compressed flag:eS UNZIP.BCKK [UNZIP542.BEOS]BEOS.H;1s & EB_BE_FL_BADBITS = the data is corrupted or we can't handle it properly data - compressed or uncompressed file attribute data If flag & EB_BE_FL_UNCMPR, the data is not compressed; this optimisation is necessary to prevent wasted space for files with small attributes (which appears to be quite common on the Advanced Access DR9 release). In this case, there should be ( ef_size - EB_L_BE_LEN ) bytes of data, and full_size should equal ( ef_size - EB_L_BE_LEN ). If the data is compressed, there will be ( ef_size - EB_L_BE_LEN ) bytes of compressed data, and full_size bytes of uncompressed data. If a file has absolutely no attributes, there will not be a 'Be' extra field. The uncompressed data is arranged like this: attr_name\0 - C string struct attr_info (fields in big-endian format) attr_data (length in attr_info.size) */ *[UNZIP542.BEOS]BEOSMAIN.CPP;1+,6./ 4$- 0@123KPWO56 7 89GHJ// -*- C++ -*- /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ // // WARNING: This is C++, not C! GNU C is not supported here! // // beos_init.cpp // // BeOS-specific C++ routines for use with Info-ZIP's UnZip 5.30 or later. // // This is necessary because we need to have an app_server connection to be // able to ask the system to assign a MIME type to an un-typed file. Strange // but true (the update_mime_info() call needs to send/receive messages). // // If you're writing your own Zip application, you probably DO NOT want to // include this file! #include #ifdef SFX const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZipSFX"; #else const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZip"; #endif extern "C" int main_stub( int argc, char *argv[] ); int main( int argc, char **argv ) { BApplication app( unzip_signature ); int retval = main_stub( argc, argv ); app.PostMessage( B_QUIT_REQUESTED ); app.Run(); return retval; } *[UNZIP542.BEOS]CONTENTS.;1+,2./ 4<- 0@123KPWO56M7M89GHJContents of the "beos" sub-directory for UnZip 5.4 and later: Contents this file README notes from the author of the BeOS port Makefile makefile for building UnZip (sorry, no project files) beos.c BeOS-specific routines (similar to the Unix ones) beos.h structures for the BeOS extra field beosmain.cpp BeOS-specific C++ routines unzip.rsc BeOS resources for UnZip unzipsfx.rsc BeOS resources for UnZipSFX This port supports both Metrowerks CodeWarrior (PowerPC and x86) and GNU C. - Chris Herborth (chrish@qnx.com) *[UNZIP542.BEOS]MAKEFILE.;1+,3./ 4- 0@123KPWO56CnC7CnC89GHJ ###################################################################### # # Makefile for Info-ZIP's unzip, unzipsfx, and funzip on BeOS # # Copyright (c) 1998-2000 Info-ZIP # Chris Herborth (chrish@qnx.com) # # This is the new New and Improved Makefile for BeOS; it will: # # 1) automatically detect your platform (PowerPC or x86) if none is # specified; the default compiler is CodeWarrior for PowerPC, or # gcc for x86 # # 2) let you cross-compile for the other platform (PowerPC or x86), in # theory # # 3) let you use Metrowerks CodeWarrior (default) or GNU C to build with # for either platfor, in theory # # To choose a specific architecture, define the ARCH environment # variable on the make command-line: # # ARCH=what make -f beos/Makefile # # where "what" can be "powerpc" or "x86". # # To choose a specific compiler, define the CC environment variable on # the make command-line: # # CC=compiler make -f beos/Makefile # # where "compiler" can be "mwcc" or "x86". # # Of course, you can combine these two: # # ARCH=powerpc CC=mwcc make -f beos/Makefile # # or: # # CC=gcc ARCH=x86 make -f beos/Makefile # # To automatically install the fresh new unzip, use the "install" target: # # make -f beos/Makefile install ###################################################################### # Things that don't change: SHELL = /bin/sh # Punish those of you not running on SMP hardware... MAKE = make -j 4 -f beos/Makefile LOC=$(LOCAL_UNZIP) -DPASSWD_FROM_STDIN AF=$(LOC) # UnZipSfx flags SL = -o unzipsfx SL2 = $(LF2) # fUnZip flags FL = -o funzip FL2 = $(LF2) # general-purpose stuff CP = cp RM = rm -f LN = ln -sf E = O = .o M = beos # defaults for crc32 stuff and system-dependent headers CRC32 = crc32 OSDEP_H = beos/beos.h # object files OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O $(BEOS_MAIN) LOBJS = $(OBJS) OBJSDLL = $(OBJS) api$O OBJX = unzipsfx$O $(CRC32)$O crctab$O crypt$O extract_$O fileio$O globals$O \ inflate$O match$O process_$O ttyio$O $M_$O $(BEOS_MAIN) LOBJX = $(OBJX) OBJF = funzip$O $(CRC32)$O crypt_$O globals_$O inflate_$O ttyio_$O UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) # installation INSTALL = install # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate manext = 1 prefix = /boot/home/config BINDIR = $(prefix)/bin# where to install executables MANDIR = $(prefix)/man/man$(manext)# where to install man pages INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/zipinfo$E $(BINDIR)/unzipsfx$E \ $(BINDIR)/unzip$E INSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \ $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext) # UNZIPS = unzip$E funzip$E unzipsfx$E zipinfo$E # this is a little ugly...well, no, it's a lot ugly: MANS = man/unzip.1 man/unzipsfx.1 man/zipinfo.1 man/funzip.1 man/zipgrep.1 DOCS = unzip.txt unzipsfx.txt zipinfo.txt funzip.txt zipgrep.txt ###########; UNZIP.BCK3 [UNZIP542.BEOS]MAKEFILE.;1xO########################################################### # Things that change: # Select an architecture: ifndef ARCH MACHINE=$(shell uname -m) ifeq "$(MACHINE)" "BePC" ARCH=x86 CC=gcc else ARCH=powerpc CC=mwcc endif endif # Now select compiler flags and whatnot based on the ARCH and CC: WHAT=$(ARCH)-$(CC) ifeq "$(WHAT)" "powerpc-mwcc" CC=mwccppc LD=mwccppc CF=-w9 -O7 -opt schedule604 -rostr -I. $(LOC) LF=-o unzip LF2=-warn -L/boot/develop/lib/ppc -lbe -lroot BEOS_MAIN=beosmain$O TARGET=$(UNZIPS) endif ifeq "$(WHAT)" "powerpc-gcc" CC=gcc LD=gcc CF=-O3 -mcpu=604 -Wall -ansi -I. -I/boot/develop/headers/be/support \ -I/boot/develop/headers/be/storage $(LOC) LF=-o unzip LF2=-L/boot/develop/lib/ppc -lbe -lroot BEOS_MAIN=beosmain$O TARGET=$(UNZIPS) endif # This isn't likely to happen for R4 or later... ifeq "$(WHAT)" "x86-mwcc" CC=mwccx86 LD=mwccx86 CF=-O2 -w9 -I. $(LOC) LF=-o unzip LF2=-warn -L/boot/develop/lib/x86 -lbe -lroot BEOS_MAIN=beosmain$O TARGET=$(UNZIPS) endif ifeq "$(WHAT)" "x86-gcc" CC=gcc LD=gcc CF=-O3 -mpentiumpro \ -Wall -Wno-multichar -Wno-trigraphs \ -ansi -I. -I/boot/develop/headers/be/support \ -I/boot/develop/headers/be/storage $(LOC) LF=-o unzip LF2=-L/boot/develop/lib/x86 -lbe -lroot BEOS_MAIN=beosmain$O TARGET=$(UNZIPS) endif ifndef TARGET TARGET=help endif ###################################################################### # Helpful targets all: @echo 'TARGET = $(TARGET)' @echo 'ARCH = $(ARCH)' @echo 'CC = $(CC)' if [ -n "$(TARGET)" ] ; then \ $(MAKE) CC=$(CC) CF="$(CF)" LD="$(LD)" \ LF="$(LF)" LF2="$(LF2)" CCPP="$(CC)" CPPF="$(CF)" \ OBJS="$(OBJS)" LOBJS="$(LOBJS)" OBJX="$(OBJX)" \ LOBJX="$(LOBJX)" $(TARGET) ; \ else \ $(MAKE) help ; \ fi help: @echo '' @echo "This Makefile lets you build Info-ZIP's zip." @echo '' @echo 'To build zip for this computer using the default compiler, just do:' @echo '' @echo ' make -f beos/Makefile' @echo '' @echo 'To build zip for a specific architecture using a specific' @echo 'compiler, do:' @echo '' @echo ' ARCH=cpu CC=compiler make -f beos/Makefile' @echo '' @echo 'Where:' @echo ' cpu is either "powerpc" or "x86"' @echo ' compiler is either "mwcc" or "gcc"' @echo '' ###################################################################### # Basic compile instructions and dependencies # this is for GNU make; comment out and notify zip-bugs if it causes errors .SUFFIXES: .c .o # default for compiling C files .c.o: $(CC) -c $(CF) $*.c unzips: $(UNZIPS) objs: $(OBJS) objsdll: $(OBJSDLL) docs: $(DOCS) unzipsman: unzips docs unzipsdocs: unzips docs unzip$E: $(OBJS) beos/unzip.rsc $(LD) $(LF) $(LOBJS) $(LF2) chmod +x unzip$E xres -o unzip$E beos/unzip.rsc mimeset -f -all unzip$E unzipsfx$E: $(OBJX) beos/unzipsfx.rsc $(LD) $(SL) $(LOBJX) $(SL2) chmod +x unzipsfx$E xres -o unzipsfx$E beos/unzipsfx.rsc mimeset -f -all unzipsfx funzip$E: $(OBJF) $(LD) $(FL) $(OBJF) $(FL2) chmod +x funzip$E zipinfo$E: unzip$E $(LN) unzip$E zipinfo$E crc32$O: crc32.c $(UNZIP_H) zip.h crctab$O: crctab.c $(UNZIP_H) zip.h crypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$O: envargs.c $(UNZIP_H) explode$O: explode.c $(UNZIP_H) extract$O: extract.c $(UNZIP_H) crypt.h fileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals$O: globals.c $(UNZIP_H) inflate$O: inflate.c inflate.h $(UNZIP_H) list$O: list.c $(UNZIP_H) match$O: match.c $(UNZIP_H) process$O: process.c $(UNZIP_H) ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$O: unreduce.c $(UNZIP_H) unshrink$O: unshrink.c $(UNZIP_H) unzip$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$O: zipinfo.c $(UNZIP_H) crypt_$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CP) crypt.c crypt_.c $(CC) -c $(CF) -DFUNZIP crypt_.c $(RM) crypt_.c extract_$O: extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CP) extract.c extract_.c $(CC) -c $(CF) -DSFX extract_.c $(RM) extract_.c globals_$O: globals.c $(UNZIP_H) # funzip only $(CP) globals.c globals_.c $(CC) -c $(CF) -DFUNZIP globals_.c $(RM) globals_.c inflate_$O: inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CP) inflate.c inflate_.c $(CC) -c $(CF) -DFUNZIP inflate_.c $(RM) inflate_.c ttyio_$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CP) ttyio.c ttyio_.c $(CC) -c $(CF) -DFUNZIP ttyio_.c $(RM) ttyio_.c process_$O: process.c $(UNZIP_H) # unzipsfx only $(CP) process.c process_.c $(CC) -c $(CF) -DSFX process_.c $(RM) process_.c beos$O: beos/beos.c $(UNZIP_H) version.h # BeOS only $(CC) -c $(CF) beos/beos.c beosmain$O: beos/beosmain.cpp $(UNZIP_H) version.h # BeOS only $(CCPP) -c $(CPPF) beos/beosmain.cpp # version() not used by unzipsfx, so no version.h dependency beos_$O: beos/beos.c $(UNZIP_H) # unzipsfx only $(CP) beos/beos.c beos_.c $(CC) -c $(CF) -Ibeos -DSFX beos_.c $(RM) beos_.c beosmain_$O: beos/beosmain.cpp $(UNZIP_H) $(CP) beos/beosmain.cpp beosmain_.cpp $(CCPP) -c $(CPPF) -Ibeos -DSFX beosmain_.cpp $(RM) beosmain_.cpp unzipsfx$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CP) unzip.c unzipsfx.c $(CC) -c $(CF) -DSFX unzipsfx.c $(RM) unzipsfx.c # this really only works for Unix targets, unless E and O specified on cmd line clean: -rm -f $(UNZIPS) $(OBJS) $(OBJF) $(OBJX) api$O apihelp$O crc_gcc$O \ unzipstb$O beosmain.o beosmain_.o install: all $(INSTALL) -m 755 $(UNZIPS) $(BINDIR) mimeset -f -all $(BINDIR)/unzip mimeset -f -all $(BINDIR)/unzipsfx $(RM) $(BINDIR)/zipinfo$E $(LN) unzip$E $(BINDIR)/zipinfo$E $(RM) $(BINDIR)/zipgrep$E $(INSTALL) -m 755 unix/zipgrep $(BINDIR)/zipgrep$E $(INSTALL) -m 644 man/unzip.1 $(MANDIR)/unzip.$(manext) $(INSTALL) -m 644 man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext) $(INSTALL) -m 644 man/zipinfo.1 $(MANDIR)/zipinfo.$(manext) $(INSTALL) -m 644 man/funzip.1 $(MANDIR)/funzip.$(manext) $(INSTALL) -m 644 man/zipgrep.1 $(MANDIR)/zipgrep.$(manext) $(INSTALL) -m 644 $(DOCS) $(MANDIR) # alternatively, could use zip method: -cd $(BINDIR); rm -f $(UNZIPS) [etc.] uninstall: rm -f $(INSTALLEDBIN) $(INSTALLEDMAN) TESTZIP = testmake.zip # the test zipfile # test some basic features of the build test: check check: unzips @echo ' This is a Unix-specific target. (Just so you know.)' @echo ' (Should work ok on BeOS... [cjh])' if test ! -f $(TESTZIP); then \ echo " error: can't find test file $(TESTZIP)"; exit 1; fi # echo " testing extraction" ./unzip -b $(TESTZIP) testmake.zipinfo if test $? ; then \ echo " error: file extraction from $(TESTZIP) failed"; exit 1; fi # echo ' testing zipinfo (unzip -Z)' ./unzip -Z $(TESTZIP) > testmake.unzip-Z if diff testmake.unzip-Z testmake.zipinfo; then ;; else \ echo ' error: zipinfo output doesn't match stored version'; fi $(RM) testmake.unzip-Z testmake.zipinfo # echo ' testing unzip -d exdir option' ./unzip -b $(TESTZIP) -d testun cat testun/notes # echo ' testing unzip -o and funzip (ignore funzip warning)' ./unzip -boq $(TESTZIP) notes -d testun ./funzip < $(TESTZIP) > testun/notes2 if diff testun/notes testun/notes2; then ;; else \ echo 'error: funzip output disagrees with unzip'; fi # echo ' testing unzipsfx (self-extractor)' cat unzipsfx $(TESTZIP) > testsfx $(CHMOD) 0700 testsfx ./testsfx -b notes if diff notes testun/notes; then ;; else \ echo ' error: unzipsfx file disagrees with unzip'; fi $(RM) testsfx notes testun/notes testun/notes2 rmdir testun # echo ' testing complete.' <tb UNZIP.BCK2 [UNZIP542.BEOS]README.;1*[UNZIP542.BEOS]README.;1+,2./ 4<- 0@123KPWO56q7q89GHJ UnZip 5.4 for BeOS NOTE: If you want to build UnZip 5.4 or later from the source, you'll need to have the "xres" tool installed (unless you remove the "xres" lines in the beos/Makefile). This will cease to be a problem when BeOS R4 ships this fall. Until then, you can get xres from ftp://ftp.be.com/pub/experimental/tools/xres-102.zip. HISTORY UnZip 5.30 was the first official release of Info-ZIP's UnZip to support the filesystem in BeOS. UnZip 5.31 added support for the new filesystem that appeared in the Advanced Access Preview (aka DR9) Release of BeOS. UnZip 5.32 added several important bug fixes. UnZip 5.4: - supports BeOS on x86 hardware (and cross-compiling, if a compiler is present) - ask the Registrar to assign a file type to files that don't have one - adds a new -J option on BeOS; this lets you extract the data for a file without restoring its file attributes (handy if you stumble on really old BeOS ZIP archives... from before BeOS Preview Release) - will restore attributes properly on symbolic links (you'll need zip 2.21 or later to create ZIP files that store attributes for symbolic links) *** WARNING *** You may find some extremely old BeOS zip archives that store their file attributes differently; these will be from DR8 and earlier (when BeOS copied the MacOS type/creator fields instead of using the current extremely flexible scheme). You can still unpack the _data_ in older zip files, but you won't be able to recover the file attributes in those archives. Use the -J option with these files or you'll get "compressed EA data missing" and "zipfile probably corrupt" errors, even though the data is intact! The new scheme makes handling BeOS file attributes much more robust, and allows for possible future expansion without another round of incompatibilities. That's life on the edge! *** WARNING *** The new filesystem allows for huge files (up to several terabytes!) with huge amounts of meta-data (up to several terabytes!). The existing ZIP format was designed when this much data on a personal computer was science fiction; as a result, it's quite possible that large amounts of file attributes (more than maybe 100+K bytes) could be truncated. Zip and UnZip try to deal with this in a fairly sensible way, working on the assumption that the data in the file is more important than the data in the file attributes. One way to run into this problem is to mount an HFS volume and zip some Mac files that have large resources attached to them. This happens more often than you'd expect; I've seen several 0-byte files that had over four megabytes of resources. Even more stupid, these resources were _data_ (sound for a game), and could have been easily stored as data... KNOWN BUGS None! Yahoo! Please report any bugs to Zip-Bugs@lists.wku.edu. - Chris Herborth (chrish@qnx.com) November 2/1998 *[UNZIP542.BEOS]UNZIP.RSC;1+,'./ 4P- 0@123KPWO56b.7b.89GHJ RSODDDDDh !6 application/x-vnd.Info-ZIP.UnZip1BOF66 RTSCtypesapplication/zipGNInfo-ZIP's UnZipExtract, test and view ZIP archives. Read the COPYING file for copyright details. http://www.cdrom.com/pub/infozip/PWTWp@@WW W X8W Zl߰XXXXXXXpYX@ X`cati Y((XXXB XC0SMIM BEOS:APP_SIGGGSMBEOS:FILE_TYPESVPPABEOS:APP_VERSIONFPPABEOS:APP_FLAGSr:*[UNZIP542.BEOS]UNZIPSFX.RSC;1+,D./ 4/- 0@123KPWO56%.7%.89GHJRSODDDDDh $ =3-ny UNZIP.BCKD [UNZIP542.BEOS]UNZIPSFX.RSC;1application/x-vnd.Info-ZIP.UnZipSFX1BOFInfo-ZIP's UnZipSFXStub for creating self-extracting ZIP archives.HPw T߰߰HHw  TwyHHw HHw s?xxx P߰xx߰zlyxx` x` s4w PszlyxB PxSMIM BEOS:APP_SIGGGSMBEOS:FILE_TYPESVPPABEOS:APP_VERSIONFPPABEOS:APP_FLAGSr:*[UNZIP542]BUGS.;1+, .. / 4 - 0@123KPWO 56QuU7QuU89GHJBogus bugs (not our fault!): --------------------------- By far THE BIGGEST source of bug reports to Info-ZIP/zip-bugs is the incorrect transfer of zipfiles (or of the UnZip executable itself). ALWAYS TRANSFER IN BINARY MODE! This includes ftp transfers and *both* ends of a Kermit connection ("set file type binary"). If your copy isn't exactly the same size as the original, you made a mistake. Another common source of errors such as "compression method 8 not sup- ported" is the existence of an old version of UnZip somewhere in your path. Make sure you're using the version you think you're using; give the full path explicitly if necessary. Executing "unzip" without any options will print a help screen, at the top of which is the UnZip version number and release date; and executing "unzip -v" without any zipfile or other options will give information about what compiler was used, the target operating system, any special UnZip options, and the date of compilation--only for version 5.11 and later, though! (Also, under Unix C shell and some Bourne shells, "which unzip" will print the path of the unzip you're actually using. Under OS/2 and MS-DOS, whch21gr.zip [on Simtel mirror sites] will do the same thing; in addi- tion, "which -a unzip" will show *all* copies of "unzip" in your path.) Bugs (real and/or imagined): --------------------------- - [OS/2 DLL] when trying to use the REXX function UzUnZipToStem to extract a file with `&' in its name, the DLL crashes (but UzUnZipToVar still works) [Daniel H, 961215] - UnZip has problems with archives bigger than 2GB; it may print "note: didn't find end-of-central-dir signature at end of central dir" (harmless) or may not be able to seek to member files [James Lemley 970107, Iris Spaniol 970206, ...] - fix overwrite behavior: hidden/system problems?; etc. - 32-bit DOS UnZip still unable to set volume labels? - 32-bit DOS UnZip under OS/2 doesn't extract all wildcard zipfiles? [DOS box: unzip386 (ver 5.12) x:\32bit\unix\emx09a\*.zip, Hobbes 3/95] - 32-bit DOS UnZip under OS/2 doesn't set timestamp when overwriting files on HPFS partition? (go32 and pmode/w both; emx/rsx OK) [Eberhard Mattes 950726] - USE_FWRITE still causes occasional CRC errors when extracting on Pyramid? [Kevin Fritz 931102] - still NT/W95 bug with "unzip -v d:*.zip" not matching properly? [Steve S 940527] 980427: bug no longer exists, Opendir() must have been corrected by someone - when ^Z received in no-echo mode, echo is not restored (works OK if resume, however) - signal() handler disabled after first use with one of BSD/SysV? - MKS Korn shell: unzip assumes the MKS-style command-line environment options are relevant to it, but this is not the case if unzip was called by another program (e.g., from a .BAT file). A fix for this exists for Borland compilers but not for MSC, Watcom, djgpp, etc. - OS/2: for paths with one long component, the .LONGNAME EA may be saved for all components (waste of disk space): how to check?? - VMS: for extracting to other directories, only the VMS-style "-d [.foo]" format is accepted; "-d foo" should also be allowed. Long filenames are not automatically truncated to 39.39. - Novell Netware: Netware drives may clear the archive bit on extracted files under OS/2 and/or MS-DOS. UnZip always *tries* to set the archive bit, however. [pynq@uchicago, 940527] - DEC Ultrix: on long zipfiles, unzip will sometimes fail (bad CRC, not always reproducible); this is apparently due either to a hardware bug (cache mem) or OS bug (page faults?) [Igor, Jean-loup, bottom of BUGS.long] - funzip/more/decryption/no-echo bug: race condition(?) causes terminal to be "reset" to no-echo state - Macintosh (100200), Atari (020000) external file attributes not interpreted correctly (both unzip and zipinfo) - pkbug error: zipfile with incorrect csize and/or ucsize--check for end of compressed (csize) data in uncompression routines: unreduce.c: while (((outpos + outcnt) < ucsize) && (!zipeof)) { [James Birdsall, Mark, bottom of BUGS.long] - OS/2: directory EAs not restored if directory exists [Kai Uwe, KG27515@uark] (subsequent note: no way to determine which EAs are newer ==> cannot restore without user input) (update: as of UnZip 5.30, option -o forces restoring of directory EAs) - MS-DOS: Borland executables don't allow other than 80-column, 25/43/50-line screen modes (Borland bug) [Michael Stillwell] m*[UNZIP542]CMSMVS.DIR;1+, (./ 4- 0123 KPWO56(!a7(!a89GHJI>;)av UNZIP.BCK ( [UNZIP542]CMSMVS.DIR;1 CCUNZIP.EXEC4 INSTALL.CMSBMC.EXECTMVS.MKIu README.CMS. README.MVS' UNZIP.EXECNUNZIP.MAKEFILE) UNZMVSC.JOB@ UNZVMC.EXEC[VMMVS.C?VMMVS.H7VMSTAT.H' WHATSNEW.CMS{ ZIPINFO.EXECx*[UNZIP542.CMSMVS]CCUNZIP.EXEC;1+,4./ 4n- (0@123KPWO567d77d89GHJ/* CCUNZIP EXEC Compile unzip 5.4 for VM/CMS */ /* Author: George Petrov, 11 Apr 1995 (VMCOMPIL EXEC) */ /* Modified for IBM C V3R1 by Ian E. Gorman, 2 Nov 1998 Facilities for compiling and testing were provided by OmniMark Technologies Corporation, Ottawa, Canada */ Address Command Signal On Error /* Allow longnames, compile re-entrant code. global.c and vmmvs.c require EXTENDED features */ CCopts = 'LONGNAME RENT LANGLVL(EXTENDED) NOEXECOPS' /* UNZIP options -- VM_CMS, REENTRANT */ CCopts = CCopts 'DEFINE(VM_CMS,REENTRANT)' /* Link the load module to run in more or less than 16MB memory */ LINKopts = 'AMODE ANY RMODE ANY RLDSAVE' 'GLOBAL TXTLIB SCEELKED CMSLIB' 'GLOBAL LOADLIB SCEERUN' /* produce the TEXT (object) files */ linklist='' modname='UNZIP' Say 'Building' modname 'MODULE...' Call Compile 'UNZIP' Call Compile 'CRC32' Call Compile 'CRCTAB' Call Compile 'CRYPT' Call Compile 'ENVARGS' Call Compile 'EXPLODE' Call Compile 'EXTRACT' Call Compile 'FILEIO' Call Compile 'GLOBALS' Call Compile 'INFLATE' Call Compile 'PROCESS' Call Compile 'LIST' Call Compile 'MATCH' Call Compile 'TTYIO' Call Compile 'UNREDUCE' Call Compile 'UNSHRINK' Call Compile 'ZIPINFO' Call Compile 'VMMVS' Say 'Linking...' 'EXEC CMOD' linklist '(MODNAME' modname LINKopts Say modname 'built successfully.' /* Make ZIPINFO from UNZIP */ modname = 'ZIPINFO' 'COPYFILE UNZIP MODULE A ZIPINFO MODULE A (OLDDATE REPLACE' Say modname 'built successfully.' Say 'Done.' Exit rc error: Say 'Error' rc 'during compilation!' Say 'Error in line' sigl':' Say ' 'Sourceline(sigl) Exit rc Compile: Procedure Expose CCopts LINKopts linklist Parse arg filename filetype filemode . If filetype='' Then filetype='C' linklist = linklist filename Say 'Compiling' filename filetype filemode '...' 'EXEC CC' filename filetype filemode '('CCopts Return rc *[UNZIP542.CMSMVS]INSTALL.CMS;1+,B. / 4 - (0@123KPWO 56⦵@7⦵@89GHJ----------------------------------------------------------------------- [Installation notes for VM/CMS port of UNZIP 5.32 and ZIP 2.2] Additional notes from Ian E. Gorman (4/98): I have not fully tested ZIP and UNZIP in VM (for example, I have not tried all the options), so ZIP 2.2 for VM and UNZIP 5.32 for VM should be regarded as beta versions. Try them out before you decide that you can depend on them. Most of the work for the VM port has been done by others, but I have made some changes and compiled on a more recent version of VM/CMS. It is possible that I have introduced new problems or undone some of the solutions found by previous authors. Installation ============ The executables are stored in CMS "PACK" format instead of being stored in ZIP archives. This format takes a little longer to download, but installation is slightly simpler. Installing UNZIP ---------------- The UNZIP executable is supplied as the binary file UNZIP.MOD, in the CMS "PACK" format. You must get the UNZIP.MOD file on to your system as a binary file in fixed recording mode, block size 1024. If you are using FTP in CMS, you can get the file in the correct format with the LOCSITE and BINARY commands. Assuming that the UNZIP executable is stored on the remote site as unz532vm.mod, you could issue the following commands FTP where.ever.com BINARY LOCSITE FIX 1024 GET unz532vm.mod QUIT If you are using a 3270 terminal session to upload from a PC, you can upload the file in the correct format with the SEND command: SEND unz532vm.mod A: unz532vm mod a1 (RECFM F LRECL 1024 If your 3270 emulator does not have the SEND command, but is a GUI application, it may allow you to upload from the menu bar. If so, set your options to binary, VM/CMS, fixed record length, and a length of 1024 before you upload. When you get the PACKed file on your CMS minidisk, you convert it to an executable module by using the COPY command with the UNPACK option: COPY unz532vm mod a unzip module a1 (UNPACK OLDDATE REPLACE You can omit the OLDDATE and REPLACE options if you want to. Installing ZIP -------------- The ZIP executable is supplied as the binary file ZIP.MOD, in the CMS "PACK" format. You must get the ZIP.MOD file on to your system as a binary file in fixed recording mode, block size 1024. Assuming that the file is stored as zip22vm.mod, you can get the file the same way you got the UNZIP.MOD file: Using FTP: FTP where.ever.com BINARY LOCSITE FIX 1024 GET zip22vm.mod QUIT Using 3270 file transfer: SEND unz532vm.mod A: unz532vm mod a1 (RECFM F LRECL 1024 When you get the PACKed file on your CMS minidisk, you convert it to an executable module by using the COPY command with the UNPACK option: COPY zip22vm mod a zip module a1 (UNPACK OLDDATE REPLACE Installing Documentation ------------------------ Once you have UNZIP running, you can use it to extract documentation from ZIP archives. You can transfer the ZIP archives to VMV/CMS as a binary file with any record length. A record length of 1 will work fine: via FTP: FTP where.ever.com BINARY LOCSITE FIX 1 GET zip22vm.zip zipdoc.zip GET unz532vm.zip unzipdoc.zip QUIT via 3270 session: SEND zip22vm.zip A: unzipdoc zip a1 (RECFM F LRECL 1 SEND unz532vm.zip A: zipdoc zip a1 (RECFM F LRECL 1 Once you have the ZIP archives, extract the documentation to the minidisk of your choice by using the -d option: unzip -a -d A2 unzipdoc.zip unzip -a -d A2 zipdoc.zip The "-a" option is required because the documents are archived as ASCII text files, but they must be converted to EBCDIC to read them in VM/CMS. Notes ===== Different EBCDIC Character Sets ------------------------------- The documentation may look strange on your system, because UNZIP translates from ASCII to "Open Systems" EBCDIC (IBM-1047). Unless you are a software developer, you are probably using a different kind of EBCDIC (like US EBCDIC, IBM-037). This causes some character codes to display as different characters. For example, the character codes that display as square brackets in IBM-1047 will display as e-acute and a-grave in IBM-037. You can use the IBM ICONV utility to translate documents from one character set to another: ICONV old doc a new doc a1 (FROMCODE IBM-1047 TOCODE IBM-037 IND$FILE?]B; UNZIP.BCKB ([UNZIP542.CMSMVS]INSTALL.CMS;1 ^  protocol ----------------- This is the method by which files are transferred via 3270 sessions between PC and mainframe. If you know how to transfer files via 3270 session between PC and mainframe, you know as much as you need to know about IND$FILE. If your mainframe has IND$FILE, and your 3270 emulator does file transfers, you can use your emulator to transfer files between PC and mainframe. *[UNZIP542.CMSMVS]MC.EXEC;1+,T./ 4- (0@123KPWO56vU7vU89GHJ /* MAKECPIP EXEC Make program to build a C/370 module */ /* Author: George Petrov, 29 Sep 1994 */ arg fn . '(' cparms /* Filter name */ 'pipe (end ?) < 'fn' makefile', /* get all source files from */ '| frlab GLOBALS:'||, '| drop', '| strip', '| var globals' cparms = cparms globals say '' say 'Compile options : 'cparms say '' if pos('REB',cparms) > 0 then do parse var cparms cp1 'REB' . ' ' cp2 /* REBuild options specified ? */ cparms = cp1||cp2 pipe1=, 'pipe (end ?) < 'fn' makefile', /* get all source files from */ '| nfind *'||, /* the makefile and compile */ '| frlab TEXT:'||, /* only the those who are */ '| r: tolab MODULE:'||, /* changed or never compiled */ '| drop', '| o: fanout', '| chop before str /(/', '| statew', '| c: fanout', /* compiled */ '| specs /Compiling / 1 w1-3 n / .../ n', '| cons' end else do pipe1=, 'pipe (end ?) < 'fn' makefile', /* get all source files from */ '| nfind *'||, /* the makefile and compile */ '| frlab TEXT:'||, /* only the those who are */ '| r: tolab MODULE:'||, /* changed or never compiled */ '| drop', '| o: fanout', '| specs w1 1 /C/ nw w3 nw write w1 1 /TEXT A/ nw', '| chop before str /(/', '| statew', '| change (57 66) / /0/', '| sort 1.8 d', /* sort the date and time */ '| uniq 1-17 singles', /* if the first is a source */ '| sort 1.8 d 64.2 d 57.2 d 60.2 d 66.8 d', /* sort the date */ '| uniq 1-8 first', /* if the first is a source */ '| locate 9.8 /C /', /* program then it has to be */ '| c: fanout', /* compiled */ '| specs /Compiling / 1 w1-3 n / .../ n', '| cons' end pipe2= '?', 'r:', '| drop', '| specs w1 1', /* save the module name in var */ '| var module', '?', 'o:', '| specs w1 1', '| join * / /', '| var texts', /* save all the text file names */ '?', /* for later include */ 'c:', '| specs /CC / 1 w1-3 n /(NOTERM 'cparms'/ nw', /* compile! */ '| err: cms | cons', '?', 'err:', '| nfind 0'||, '| var err', '| specs /----> Errors found! RC=/ 1 1-* n', '| cons' /* '| g: gate'*/ pipe1 pipe2 say '' if symbol('err') = 'VAR' & err ^= 0 then do say 'Errors found in source files - link aborted! RC = 'err exit err end say 'Generating module 'module 'pipe cms cmod' fn texts' | > 'fn' LINK A' exit rc error: say 'Error in REXX detected!' Say 'Syntax error on line' Sigl':' Sourceline(Sigl) Say 'Error was:' Errortext(RC) return rc *[UNZIP542.CMSMVS]MVS.MKI;1+,u. / 4 - (0@123KPWO 56rfl7rfl89GHJ# Makefile for the MVS (OS/390 Base) version of UNZIP 5.4 # Produced for C/C++ V3R2 in OS/390 1.2.0 by Ian E. Gorman, 2 Nov 1998 # Facilities for compiling and testing were made available by # OmniMark Technologies Corporation, Ottawa, Canada # NOTES # # The only tabs in this file are in the first character of each recipe # line, where they are required by make. # # Run this makefile in OpenMVS (OS/390 POSIX) using source files in the # HFS file system. You can write the load module to either HFS file # system or to a PDS in the native MVS file system. The PDS must have # sufficient free space to hold the load module. # # To compile to a member of a PDS: # make # or # make unzip.mvs # # To compile a test version into the HFS file system: # make hfs # UNZIP options -- MVS, REENTRANT ZIPOPTS=-DMVS # directories # generic source code SRC=.. SRC_P=$(SRC)/ # source code for MVS CMSMVS=../cmsmvs CMSMVS_P=$(CMSMVS)/ # include files INCLS=-I$(SRC) -I$(CMSMVS) # object files and load modules BLD_P=../mvs/ # Other options # Suffixes (E and O must be different) E= O=.o # Need EXTENDED features for global.c and vmvms.c, so not using c89 CC=cc CFLAGS=-D_OPEN_SYS $(ZIPOPTS) $(INCLS) LD=cc LDFLAGS= # Files # object (TEXT) files OBJECTS= $(BLD_P)unzip$(O) $(BLD_P)crc32$(O) $(BLD_P)crctab$(O) \ $(BLD_P)crypt$(O) $(BLD_P)envargs$(O) $(BLD_P)explode$(O) \ $(BLD_P)extract$(O) $(BLD_P)fileio$(O) $(BLD_P)globals$(O) \ $(BLD_P)inflate$(O) $(BLD_P)process$(O) $(BLD_P)list$(O) \ $(BLD_P)match$(O) $(BLD_P)ttyio$(O) $(BLD_P)unreduce$(O) \ $(BLD_P)unshrink$(O) $(BLD_P)zipinfo$(O) $(BLD_P)vmmvs$(O) # Header files HFILES= $(SRC_P)consts.h $(SRC_P)crypt.h $(SRC_P)ebcdic.h \ $(SRC_P)globals.h $(SRC_P)inflate.h $(SRC_P)tables.h \ $(SRC_P)ttyio.h $(SRC_P)unzip.h $(SRC_P)unzpriv.h \ $(SRC_P)version.h $(SRC_P)zip.h $(CMSMVS_P)vmmvs.h \ $(CMSMVS_P)vmstat.h # Rules all: $(BLD_P)unzip.mvs$(E) hfs: $(BLD_P)unzip$(E) # link $(BLD_P)unzip.mvs$(E): $(OBJECTS) $(LD) -o "//INFOZIP.LOAD(UNZIP)" $(LDFLAGS) $^ echo "tso call \"infozip(unzip)\" \"'\"\"""$$""@""\"\"'\"" > $% chmod a+x $% $(BLD_P)unzip$(E): $(OBJECTS) $(LD) -o $% $(LDFLAGS) $^ # compile $(BLD_P)api$(O): $(SRC_P)api.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)api.c $(BLD_P)apihelp$(O): $(SRC_P)apihelp.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)apihelp.c $(BLD_P)crc32$(O): $(SRC_P)crc32.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)crc32.c $(BLD_P)crctab$(O): $(SRC_P)crctab.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)crctab.c $(BLD_P)crypt$(O): $(SRC_P)crypt.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)crypt.c $(BLD_P)envargs$(O): $(SRC_P)envargs.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)envargs.c $(BLD_P)explode$(O): $(SRC_P)explode.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)explode.c $(BLD_P)extract$(O): $(SRC_P)extract.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)extract.c $(BLD_P)fileio$(O): $(SRC_P)fileio.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)fileio.c $(BLD_P)funzip$(O): $(SRC_P)funzip.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)funzip.c $(BLD_P)globals$(O): $(SRC_P)globals.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)globals.c $(BLD_P)inflate$(O): $(SRC_P)inflate.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)inflate.c $(BLD_P)list$(O): $(SRC_P)list.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)list.c $(BLD_P)match$(O): @T UNZIP.BCKu ([UNZIP542.CMSMVS]MVS.MKI;1 \$(SRC_P)match.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)match.c $(BLD_P)process$(O): $(SRC_P)process.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)process.c $(BLD_P)ttyio$(O): $(SRC_P)ttyio.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)ttyio.c $(BLD_P)unreduce$(O): $(SRC_P)unreduce.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)unreduce.c $(BLD_P)unshrink$(O): $(SRC_P)unshrink.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)unshrink.c $(BLD_P)unzip$(O): $(SRC_P)unzip.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)unzip.c $(BLD_P)unzipstb$(O): $(SRC_P)unzipstb.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)unzipstb.c $(BLD_P)zipinfo$(O): $(SRC_P)zipinfo.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(SRC_P)zipinfo.c $(BLD_P)vmmvs$(O): $(CMSMVS_P)vmmvs.c $(HFILES) $(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)vmmvs.c *[UNZIP542.CMSMVS]README.CMS;1+,..!/ 4!!- (0@123KPWO"56B\7B\89GHJUsing ZIP and UNZIP on VM/CMS ============================= Installing executables ---------------------- The following CMS MODULEs are available: ZIP ZIPNOTE ZIPCLOAK ZIPSPLIT UNZIP In addition to these, each MODULE file also has an EXEC with the same name. These EXECs are front-ends to the MODULES that will attempt to set up the required runtime libraries before running the MODULE. All the EXECs are identical. Only their names are different. They are stored as plain text files. The CMS MODULE files have been packed using the COPYFILE command to allow their file format to be properly restored, since variable length binary files will not currently unzip properly (see below for details). The MODULEs are shipped with a filetype or extension of CMO (for CMS MODULE). Their names may vary on the distribution disk to indicate their level, etc. To restore them to executable MODULEs on CMS, do the following: 1. Upload them to CMS with a Fixed record length with LRECL 1024. Example, from a DOS or OS/2 window, type this: SEND unzip.cmo A:unzip module a (RECFM F LRECL 1024 Example, using FTP from CMS, type this: BINARY FIXED 1024 GET unzip.cmo unzip.module.a Note: Replace "unzip.cmo" with the actual name. 2. Use COPYFILE to unpack the file. Example, in CMS type this: COPYFILE UNZIP MODULE A (UNPACK REPLACE OLDDATE 3. Repeat steps 1-2 for each of the programs. 4. Build the ZIPINFO module by typing this: COPYFILE UNZIP MODULE A ZIPINFO MODULE A (OLDDATE 5. Upload the EXECs to CMS as text files (with ASCII-to-EBCDIC translation). Example, from a DOS or OS/2 window, type this: SEND unzip.exc A:unzip exec a (CRLF Example, using FTP from CMS, type this: GET unzip.exc unzip.exec.a 6. Repeat steps 4 for each of the EXECs. Preparing the environment ------------------------- The executables provided were compiled with IBM C 3.1.0 and require the the Language Environment (LE) runtime libraries. To provide access to the runtime libraries: 1. Link to the disk containing the Language Environment files, if necessary. 2. Use the command "GLOBAL LOADLIB SCEERUN" These commands can be placed in your PROFILE EXEC. Note: EXECs have been provided called ZIP, UNZIP, etc. that issue the GLOBAL LOADLIB statement. This was done to alleviate frustration of users that don't have the GLOBAL LOADLIB statement in their PROFILE EXEC. These EXECs may require changing for your system. Unfortunately, there is no way, using IBM C, to produce a MODULE that doesn't require a runtime library. Testing ------- To test the MODULEs, just type ZIP or UNZIP. They should show help information on using the commands. If you see something like this: DMSLIO201W The following names are undefined: CEEEV003 DMSABE155T User abend 4093 called from 00DCD298 reason code 000003EB Then you don't have access to the proper runtime libraries, as described above. Here is additional information on the ZIP and UNZIP programs that may assist support personnel: - Compiled with IBM C V3R1M0 on VM/ESA 2.2.0 with CMS level 13 Service Level 702. - Require the SCEERUN LOADLIB runtime library. This is part of the Language Environment (LE). - Linked with options RMODE ANY AMODE ANY RLDSAVE. If you continue to have trouble, report the problem to Zip-Bugs (see the bottom of this document). Compiling the source on VM/CMS ------------------------------ The source has been successfully compiled previously using C/370 2.1 and 2.2. The source has been recently compiled using IBM C 3.1.0 on VM/ESA 2.2.0 with CMS level 13. I don't have access to an MVS system so the code hasn't been tested there in a while. 1. Unzip the source files required for CMS. The root-level files inside the ZIP file and the files in the CMSMVS subdirectory are needed. Example (use both commands): unzip -aj zip23.zip -x */* -dc unzip -aj zip23.zip cmsmvs/* -dc This example unzips the files to the C-disk, while translating character data and ignoring paths. If you don't already have a working UNZIP MODULE on CMS you will have to unzip the files on another system and transport them to CMS. All the required files are plain text so they can be transferred with ASCII-to-EBCDIC translations. 2. Repeat step 1 with the zip file containing the UNZIP code. Unzip the files to a different disk than the disk used for the ZIP code. 3. To compile the ZIP code, run the supplied CCZIP EXEC. To compile the UNZIP code, run the supplied CCUNZIP EXEC. NOTE: Some of the ZIP and UNZIP source files have the same name. It is recommended that you keep the source from each on separate disks and move the disk you are building from ahead of the other in the search order. For example, you may have a 192 disk with the ZIP source code and a 193 disk with the UNZIP source code. To compile ZIP, access the 192 disk as B, then run CCZIP. This will create the following modules: ZIP, ZIPNOTE, ZIPSPLIT, ZIPCLOAK. To compile UNZIP, access 193 as B, then run CCUNZIP. This will create the following modules: UNZIP, ZIPINFO (a copy of UNZIP). ========================================================================= Using ZIP/UNZIP --------------- Documentation for the commands is in MANUAL NONAME (for ZIP) and in UNZIP DOC UNZIP. INFOZIP DOC describes the use of the -Z option of UNZIP. The rest of this section explains special notes concerning the VM/CMS version of ZIP and UNZIP. Filenames and directories ------------------------- 1. Specifying filenames a. When specifying CMS files, use filename.filetype.filemode format (separate the three parts of the name with a period and use no spaces). Example: profile.exec.a Unfortunately, this prevents you from using ZIP from FILELIST. To unzip a zip file, however, you can type something like this next to it in FILELIST: unzip /n -d c This will unzip theAJ] UNZIP.BCK. ([UNZIP542.CMSMVS]README.CMS;1!: contents of the current file to a C-disk. b. It is possible to use DD names with ZIP and UNZIP on CMS, though it can be cumbersome. Example: filedef out disk myzip zip a zip dd:out file1.txt file2.txt While you can also use a DD name for the input files, ZIP currently does not correctly resolve the filename and will store something like "dd:in" inside the ZIP file. A file stored in this manor cannot easily be unzipped, as "dd:in" is an invalid filename. c. In places where a directory name would be used on a PC, such as for the ZIP -b (work path) option or the UNZIP -d (destination path) options, use a filemode letter for CMS. For example, to unzip files onto a C-disk, you might type something like this: unzip myzip.zip -d c Currently, ZIP uses the A-disk for work files. When zipping large files, you may want to specify a larger disk for work files. This example will use a C-disk for work files. zip -b C myzip.zip.c test.dat.a 2. Filename conversions a. Filemode letters are never stored into the zip file or take from a zip file. Only the filename and filetype are used. ZIP removes the filemode when storing the filename into the zip file. UNZIP assumes "A" for the filemode unless the -d option is used. b. When unzipping, any path names are removed from the fileid and the last two period-separated words are used as the filename and filetype. These are truncated to a maximum of eight characters, if necessary. If the filetype (extension) is missing, then UNZIP uses "NONAME" for the filetype. Any '(' or ')' characters are removed from the fileid. c. All files are created in upper-case. Files in mixed-case cannot currently be stored into a ZIP file. d. Shared File System (SFS) directories are not supported. Files are always accessed by fn.ft.fm. To use an SFS disk, Assign it a filemode, then it can be used. 3. Wildcards in file names a. Wildcards are not supported in the zip filename. The full filename of the zip file must be given (but the .zip is not necessary). So, you can't do this: unzip -t *.zip b. Wildcards CAN be used with UNZIP to select (or exclude) files inside a zip file. Examples: unzip myzip *.c - Unzip all .c files. unzip myzip *.c -x z*.c - Unzip all .c files but those starting with Z. c. Wildcards cannot currently be used to select files with ZIP. So, you can't do this: zip -a myzip *.exec I expect to fix this for CMS in the future. 4. File timestamps a. The dates and times of files being zipped or unzipped are not currently read or set. When a file is zipped, the timestamp inside the zip file will always be the current system date and time. Likewise, when unzipping, the date and time of files being unzipped will always be the current system date/time. b. Existing files are assumed to be newer than files inside a zip file when using the -f freshen option of UNZIP. This will prevent overwriting files that may be newer than the files inside the zip file, but also effectively prevents the -f option from working. 5. ASCII, EBCDIC, and binary data Background ---------- Most systems create data files as just a stream of bytes. Record breaks happen when certain characters (new line and/or carriage return characters) are encountered in the data. How to interpret the data in a file is up to the user. The system must be told to either notice new line characters in the data or to assume that the data in the file is binary data and should be read or written as-is. CMS and MVS are record-based systems. All files are composed of data records. These can be stored in fixed-length files or in variable length files. With fixed-length files, each record is the same length. The record breaks are implied by the LRECL (logical record length) attribute associated with the file. With variable-length files, each record contains the length of that record. The separation of records are not part of the data, but part of the file structure. This means you can store any type of data in either type of file structure without having to worry about the data being interpreted as a record break. Fixed-length files may have padding at the end of the file to make up a full record. Variable-length files have no padding, but require extra record length data be stored with the file data. Storing fixed-length files into a zip file is simple, because all the data can just be dumped into the zip file and the record format (RECFM) and logical record length (LRECL) can be stored in the extra data area of the zip file so they can be restored when UNZIP is used. Storing variable-length data is harder. There is no place to put the record length data needed for each record of the file. This data could be written to the zip file as the first two bytes of each record and interpreted that way by UNZIP. That would make the data unusable on systems other than CMS and MVS, though. Currently, there isn't a solution to this problem. Each record is written to the zip file and the record length information is discarded. Binary data stored in variable-length files can't be put into a zip file then later unzipped back into the proper records. This is fine for binary data that will be read as a stream of bytes but not OK where the records matter, such as with CMS MODULEs. If the data is text (character data), there is a solution. This data can be converted into ASCII when it's stored into a zip file. The end of each record is now marked in the file by new line characters. Another advantage of this method is that the data is now accessible to non-EBCDIC systems. When the data is unzipped on CMS or MVS, it is converted back into EBCDIC and the records are recreated into a variable-length file. So, here's what we have... a. To store readable text data into a zip file that can be used on other platforms, use the -a option with ZIP to convert the data to ASCII. These files will unzip into variable-length files on CMS and should not contain binary data or corruption may occur. b. Files that were zipped on an ASCII-based system will be automatically translated to EBCDIC when unzipped. To prevent this (to unzip binary data on CMS that was sent from an ASCII-based system), use the -B option with UNZIP to force Binary mode. To zip binary files on CMS, use the -B option with ZIP to force Binary mode. This will prevent any data conversions from taking place. c. When using the ZIP program without specifying the "-a" or "-B" option, ZIP defaults to "native" (EBCDIC) mode and tries to preserve the file information (RECFM, LRECL, and BLKSIZE). So when you unzip a file zipped with ZIP under CMS or MVS, UNZIP restores the file info. The output will be fixed-length if the original was fixed and variable-length if the original was variable. If UNZIP gives a "write error (disk full?)" message, you may be trying to unzip a binary file that was zipped as a text file (without using the -B option) B?0s| foU?]]S;1 2Xyr"Rg{4{lLv@i\cAOş3Exp W+9T"&qB+qP6B GQό|T_Zd5(󖇰%mД1t8kz件o ˤցqY'0`whdNtľE9Td"ˇ bcP>s:i ꄒ^ FssWE= r)M%)˚+ _De?⽟{(YE$*Q#-o7̙&Kz{MRX43{N#$W$  5[}W9Qַc'VC*QZ>s]d})ٹ*Cwzy=dĩ%^ٌv8km`P_3 //c<mGphTƯ4dMt/w6ؒldjW>l@ZXdiu4ш1H# !D+Ӻ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*_'6 :/֑3H;4&V;-\p@lQ1,IOYYpojI{+Saqg~l@{?[([#/C\9eFb?nXrW(R\=A/x&O Q XG j}5q,IpB-[5( FUDs\w:i|eNpo*GV\ANpG=+R=0LBTp9sD Q>wR+ ~\9[d'g`+C? h[]Oa#NibNGi:.W_pu|.`D@J r$|6;WQ)s0lVAY 5s>T hiE }A9*dEF\djk pv |)y>am />/8J$ :hayeZAiaHi| -hNh%/s16cm)z}SyvfA|JK a8 zK,7jmM<5+ #mjmxa;,( 1}xI6ޏMI3.pִ)AD~ivLjų yz뿗sO20<['.>7見XuXe˥C!=F-PW H`4uN?ڽeY8rDX] J>;,Y.Ҋ40D&ϸ(GJ3M;T3Z惮1x5lكjw_33E~3i\03@Rf̀J8yS5"07rKl=/ t}tЉA3'8m9G}zzk!P>4.?Zj'y1 MG?yz= `"~#k3:mLf1>XV[? oUQOE'(p$2}0=}I+*)&jCs18* NZ?yCt]!%z084,LE'tSwkeZA#Oo9{\Lv$El ofyvf`:}1 G,ECq]/DJaBV)<yqOFI-@WI [ y/6(lv/jpnUFCRy#EO: bo_m LDP_."E`tdfileC7/M UNZIP.BCK. ([UNZIP542.CMSMVS]README.CMS;1!I  Summary ------- Here's how to ZIP the different types of files. RECFM F text Use the -a option with ZIP to convert to ASCII for use with other platforms or no options for use on EBCDIC systems only. RECFM V text Use the -a option with ZIP to convert to ASCII for use with other platforms or no options for use on EBCDIC systems only. RECFM F binary Use the -B option with ZIP (upper-case "B"). RECFM V binary Use the -B option with ZIP. Can be zipped OK but the record structure is destroyed when unzipped. This is OK for data files read as binary streams but not OK for files such as CMS MODULEs. 6. Character Sets If you are used to running UNZIP on systems like UNIX, DOS, OS/2 or Windows, you will may have some problems with differences in the character set. There are a number of different EBCDIC code pages, like there are a number of different ASCII code pages. For example, there is a US EBCDIC, a German EBCDIC, and a Swedish EBCDIC. As long as you are working with other people who use the same EBCDIC code page, you will have no trouble. If you work with people who use ASCII, or who use a different EBCDIC code page, you may need to do some translation. UNZIP translates ASCII text files to and from Open Systems EBCDIC (IBM-1047), which may not be the EBCDIC that you are using. For example, US EBCDIC (IBM-037) uses different character codes for square brackets. In such cases, you can use the ICONV utility (supplied with IBM C) to translate between your EBCDIC character set and IBM-1047. If your installation does not use IBM-1047 EBCDIC, messages from UNZIP may look a little odd. For example, in a US EBCDIC installation, an opening square bracket will become an i-acute and a closing square bracket will become a u-grave. The supplied ZIP and UNZIP EXECs attempt to correct this by setting CMS INPUT and OUTPUT translations to adjust the display of left and right brackets. You may need to change this if brackets don't display correctly on your system. 7. You can unzip using VM/CMS PIPELINES so unzip can be used as a pipeline filter. Example: 'PIPE COMMAND UNZIP -p test.zip george.test | Count Lines | Cons' Please report all bugs and problems to: Zip-Bugs@lists.wku.edu ----------------------------------------------------------------------- Original CMS/MVS port by George Petrov. e-mail: c888090@nlevdpsb.snads.philips.nl tel: +31-40-781155 Philips C&P Eindhoven The Netherlands ----------------------------------------------------------------------- Additional fixes and README re-write (4/98) by Greg Hartwig. e-mail: ghartwig@ix.netcom.com ghartwig@vnet.ibm.com ----------------------------------------------------------------------- Additional notes from Ian E. Gorman. e-mail: ian@iosphere.net *[UNZIP542.CMSMVS]README.MVS;1+,'. / 4 - (0@123KPWO56H7H89GHJThank you for trying this port of UNZIP for VM/CMS and MVS! Using under MVS: ------------------------- 1. To use the Info-ZIP's UNZIP under MVS you need: - C/370 ver 2.1 compiler or another compatible compiler supporting long names for function/variable names. 2. To compile the program under MVS do : - unzip all the files from unz54vm.zip file. They are stored as ASCII format so you have to unzip them first on PC or other system that already have UNZIP, and then upload them to the mainframe with ASCII to EBCDIC conversion. - Copy all the .C files in the PDS called USERID.UNZIP.C - Copy all the .H files in the PDS called USERID.UNZIP.H - adjust the job UNZMVSC.JOB to work on your site. Change USERID to your userid. You might need to change the CEE dataset names to match your OS/390 system. - Preallocate PDS datasets named: USERID.UNZIP.OBJ and USERID.UNZIP.LOAD - execute the job UNZMVSC to compile and link all the sources. - if everything is ok you will get an UNZIP MODULE 3. Using UNZIP - Just read the UNZIP.TXT - A few exceptions concerning MVS 3.0. There are different ways to invoke UNZIP. - allocating UNZIP.LOAD dataset to your ISPLLIB if you want to invoke UNZIP under ISPF. Then just type UNZIP ...parms... to get it work - You can also call it directly with : TSO CALL 'userid.UNZIP.LOAD(UNZIP)' '...parms...' (notice to quotes!) - You can even call it from a batch job like: //MYZIP JOB (account) //STEP1 EXEC PGM=UNZIP,PARM='-l mytestz.zip *.c' //STEPLIB DD DSN=userid.UNZIP.LOAD,DISP=SHR //SYSPRINT DD SYSOUT=* This will list all the .c files from the zip file mytestz.zip 3.1. If the ZIP file has been zipped on an ASCII based system it will be automatically translated to EBCDIC ( I hope I got all those translation tables OK :-). You can force ASCII to EBCDIC conversion with the -a flag. 3.2. The date/time of the output files is set to the current system date/time - not according the date/time in the zip file. 3.3. You can even unzip using TSO/E PIPELINES so unzip can be used as pipeline filter: 'pipe cms unzip -p test.zip george.test | count lines | cons' ( we do also a lot of pipethinking here ;-) 3.4. If you got also the ZIP program (see ZIP21VM.ZIP) you can do zipping and unzipping without translating to ASCII the ZIP also preserves the file informations (LRECL,BLKSIZE..) So when you UNZIP a file zipped with ZIP under MVS it restores the file info. There currently some problems with file with RECFM=V* I don't save the length of each record yet :-) 3.5. No wildcards are supported in the input zip name you have to give the real name (.zip is not necessary) So you CAN'T use things like: unzip -t *.zip 3.6. But you CAN use wildcards as filename selection like: unzip -t myzip *.c - OK or even unzip -t myzip *.c -x z*.c - to exclude all files matching z*.c 3.7. You can unzip to a PDS using the -d parameter, for example: unzip -dmyzip myzip *.c This will unzip all .c files that are in the zip file in a PDS directory called MYZIP.C BE AWARE that the extension of every files is being placed as last identifier on the PDS name, so if you have a file in the zipfile called 'testp.doc' and you use '-d mypds' the PDS name will become 'mypds.doc(testp)' Depending on which options IBM chose for C this week, unzip may or may not prefix output files with your userid and/or TSO prefix. To prevent this, quote the filename to -d, for example //UNZIP EXEC PGM=UNZIP, // PARM='/-a -o ''userid.zip''D UNZIP.BCK' ([UNZIP542.CMSMVS]README.MVS;1 .  -d ''hlq.test'' *' //STEPLIB DD DSN=USERID.UNZIP.LOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* The above JCL converts from ASCII to EBCDIC (-a), always overwrites existing members (-o), extracts from 'userid.zip', writes to files starting with 'hlq.test', all members (*). Note the double quotes because PARM= requires single quotes. 3.8. The rules for output DCBs are a little messy. If the output file already exists (remember the -d option) then unzip uses the existing DCB and space values. If the output file does not exist and the input zip came from MVS then unzip makes its best attempt at preserving the original DCB. However there is not enough information stored in the zip file to do this correctly for all file types, some file types may be corrupted. If the output file does not exist and the input zip does not contain MVS DCB information then unzip uses RECFM=U, LRECL=32760 for binary data, RECFM=V, LRECL=133 for text. Text includes ASCII to EBCDIC conversion. As soon as the output file is created, unzip uses the same output DCB for all following members, even if the input is a mixture of text and binary. In all cases, unzip has no built in parameters for space. For a preallocated file this is not a problem. If unzip creates an output file you get a default space allocation which is site dependent. It is far better to preallocate the output files with the correct space and DCB values then use the -d option to point to those files. 3.9. All '+','_' or '-' signs are skipped from the filenames Please repport all bugs and problems to : Zip-Bugs@lists.wku.edu That's all for now. Have fun! George Petrov e-mail: c888090@nlevdpsb.snads.philips.nl tel: +31-40-781155 Philips C&P Eindhoven The Netherlands Updated by: Keith Owens *[UNZIP542.CMSMVS]UNZIP.EXEC;1+,N./ 4- (0@123KPWO56,}U7,}U89GHJ /***********************************************************************/ /* */ /* Front-end EXEC to set up linkage to the C runtime libraries */ /* before executing a MODULE generated from C code. */ /* */ /* Copy this file as an EXEC with a filename matching the C MODULE. */ /* */ /* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ /* */ /***********************************************************************/ Address Command Parse Arg argstring Parse Source . . myname . /* Set output and input character translation so brackets show up */ 'SET OUTPUT AD' 'BA'x 'SET OUTPUT BD' 'BB'x 'SET INPUT BA AD' 'SET INPUT BB BD' Call CLIB If rc<>0 Then Do Say 'The required C runtime libraries don''t appear to be available.' Say myname 'can not run.' Exit 12 End /* Run the command */ myname argstring Exit rc /* Contents of the CLIB EXEC, modified for RC checking. */ /* Removed TXTLIB setting. Only LOADLIB needed for execution. */ CLIB: /***************************************************/ /* SET UP LIBRARIES FOR LE for MVS & VM */ /***************************************************/ Address COMMAND loadlib ='EDCLINK' /* C/370 runtime */ loadlib ='SCEERUN' /* LE runtime */ theirs=queued() /* old stack contentsM068*/ 'QUERY LOADLIB ( LIFO' /* old setting M068*/ LoadlibList='' /* init list M068*/ rc=0 Do while queued()^=theirs /* all lines from cmdM068*/ Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ End /*M068*/ If loadlibList='NONE' , Then Do 'GLOBAL LOADLIB' Loadlib /* enforce what we need */ End Else Do Do xx=1 to Words(loadlib) If Find(loadliblist,word(loadlib,xx)) = 0 , then loadliblist = loadliblist word(loadlib,xx) End 'GLOBAL LOADLIB' loadliblist /* enforce what we need */ End Return P!*[UNZIP542.CMSMVS]UNZIP.MAKEFILE;1+,)./ 4Q- (0@123KPWO56_P7_P89GHJ* This is a comment * this makefile compiles filter UNZIP GLOBALS: long def(VM_CMS) TEXT: unzip c crc32 c crctab c crypt c envargs c explode c extract c fileio c globals c inflate c list c match c process c ttyio c unreduce c unshrink c zipinfo c vmmvs c MODULE: unzip module t*[UNZIP542.CMSMVS]UNZMVSC.JOB;1+,@. / 4 - (0@123KPWO56M 7M 89GHJ//* //* LE COMPILE FOR UNZIP541. //* ALL STEPS SHOULD GET COND CODE 0 EXCEPT FOR PLINK.PLKED WHICH GETS 4. //* //CBC JCLLIB ORDER=CBC.SCBCPRC //UNZIP EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(UNZIP)', // OUTFILE='USERID.UNZIP.OBJ(UNZIP),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //CRC32 EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(CRC32)', // OUTFILE='USERID.UNZIP.OBJ(CRC32),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //CRCTAB EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(CRCTAB)', // OUTFILE='USERID.UNZIP.OBJ(CRCTAB),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //CRYPT EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFIE*[ UNZIP.BCK@ ([UNZIP542.CMSMVS]UNZMVSC.JOB;1 LE='USERID.UNZIP.C(CRYPT)', // OUTFILE='USERID.UNZIP.OBJ(CRYPT),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //ENVARGS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(ENVARGS)', // OUTFILE='USERID.UNZIP.OBJ(ENVARGS),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //EXPLODE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(EXPLODE)', // OUTFILE='USERID.UNZIP.OBJ(EXPLODE),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //EXTRACT EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(EXTRACT)', // OUTFILE='USERID.UNZIP.OBJ(EXTRACT),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //FILEIO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(FILEIO)', // OUTFILE='USERID.UNZIP.OBJ(FILEIO),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //GLOBALS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(GLOBALS)', // OUTFILE='USERID.UNZIP.OBJ(GLOBALS),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //INFLATE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(INFLATE)', // OUTFILE='USERID.UNZIP.OBJ(INFLATE),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //LIST EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(LIST)', // OUTFILE='USERID.UNZIP.OBJ(LIST),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //MATCH EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(MATCH)', // OUTFILE='USERID.UNZIP.OBJ(MATCH),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //PROCESS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(PROCESS)', // OUTFILE='USERID.UNZIP.OBJ(PROCESS),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //TTYIO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(TTYIO)', // OUTFILE='USERID.UNZIP.OBJ(TTYIO),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //UNREDUCE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(UNREDUCE)', // OUTFILE='USERID.UNZIP.OBJ(UNREDUCE),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //UNSHRINK EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(UNSHRINK)', // OUTFILE='USERID.UNZIP.OBJ(UNSHRINK),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //ZIPINFO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(ZIPINFO)', // OUTFILE='USERID.UNZIP.OBJ(ZIPINFO),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //VMMVS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', // INFILE='USERID.UNZIP.C(VMMVS)', // OUTFILE='USERID.UNZIP.OBJ(VMMVS),DISP=SHR', // CPARM='LONG,NOTERM,LIST,XREF,SOURCE', // CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' //COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR //PLINK EXEC PROC=EDCPL,COND=(4,LT), // OUTFILE='USERID.UNZIP.LOAD(UNZIP),DISP=SHR', // PPARM='NONCAL,MAP,MEMORY', // LPARM='LIST,MAP,XREF' //SYSPRINT DD SYSOUT=* //PLKED.SYSIN DD DSN=USERID.UNZIP.OBJ(UNZIP),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(CRC32),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(CRCTAB),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(CRYPT),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(ENVARGS),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(EXPLODE),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(EXTRACT),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(FILEIO),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(GLOBALS),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(INFLATE),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(LIST),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(MATCH),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(PROCESS),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(TTYIO),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(UNREDUCE),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(UNSHRINK),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(ZIPINFO),DISP=SHR // DD DSN=USERID.UNZIP.OBJ(VMMVS),DISP=SHR //LKED.SYSLIB DD DISP=SHR,DSN=CEE.SCEELKED *[UNZIP542.CMSMVS]UNZVMC.EXEC;1+,[./ 4- (0@123KPWO56 <\7 <\89GHJ/* VMCOMPIL EXEC Unzip compile for VM/CMS */ /* Author : George Petrov, 11 Apr 1995 */ signal on error parms = '(long def(VM_CMS)' /* Add local options */ /* "TARGET(COMPAT)" is required for V2.2 compiler */ parms = parms 'TARGET(COMPAT) SOURCE' say 'Compiling UNZIP C...' 'cc unzip c 'parms say 'Compiling CRC32 C...' 'cc crc32 c 'parms say 'Compiling CRCTAB C...' 'cc crctab c 'parms say 'Compiling CRYPT C...' 'cc crypt c 'parms say 'Compiling ENVARGS C...' 'cc envargs c 'parms say 'Compiling EXPLODE C...' 'cc explode c 'parms say 'Compiling EXTRACT C...' 'cc extract c 'parms say 'Compiling FILEIO C...' 'cc fileio c 'parms say 'Compiling GLOBALS C...' 'cc globals c 'parms say 'Compiling INFLATE C...' 'cc inflate c 'parms say 'Compiling PROCESS C...' 'cc process c 'parms say 'Compiling LIST C...' 'cc list c 'parms say 'Compiling MATCH C...' 'cc match c 'parms say 'Compiling TTYIO C...' 'cc ttyio c 'parms say 'Compiling UNREDUCE C...' 'cc unreduce c 'parms say 'Compiling UNSHRINK C...' 'cc unshrink c 'parms say 'Compiling ZIPINFO C...' 'cc zipinfo c 'parms say 'Compiling VMMVS C...' 'cc vmmvs c 'parms say 'Linking all files...' 'cmod unzip unzip crc32 crctab crypt envargs explode extract fileio globals', 'inflate list match process ttyio unreduce unshrink zipinfo vmmvs' say 'All Done!' say "To run enter : UNZIP parms" exit rc error: say 'Error during compilation!' exit rc *[UNZIP542.CMSMVS]VMMVS.C;1+,?.%/ 4%%8- (0@123KPWO&56X 7X 89GHJF& UNZIP.BCK? ([UNZIP542.CMSMVS]VMMVS.C;1%(/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- vmmvs.c (for both VM/CMS and MVS) Contains: vmmvs_open_infile() open_outfile() close_outfile() close_infile() getVMMVSexfield() do_wild() mapattr() mapname() checkdir() check_for_newer() stat() version() ---------------------------------------------------------------------------*/ #define __VMMVS_C /* identifies this source module */ #define UNZIP_INTERNAL #include "unzip.h" /********************************/ /* Function vmmvs_open_infile() */ /********************************/ FILE *vmmvs_open_infile(__G) __GDEF { FILE *fzip; G.tempfn = NULL; fzip = fopen(G.zipfn, FOPR); #if 0 /* Let's try it without the convert for a while -- RG Hartwig */ if ((fzip = fopen(G.zipfn,"rb,recfm=fb")) == NULL) { size_t cnt; char *buf; FILE *in, *out; if ((buf = (char *)malloc(32768)) == NULL) return NULL; if ((G.tempfn = tmpnam(NULL)) == NULL) return NULL; if ((in = fopen(G.zipfn,"rb")) != NULL && (out = fopen(G.tempfn,"wb,recfm=fb,lrecl=1")) != NULL) { Trace((stdout,"Converting ZIP file to fixed record format...\n")); while (!feof(in)) { cnt = fread(buf,1,32768,in); if (cnt) fwrite(buf,1,cnt,out); } } else { free(buf); fclose(out); fclose(in); return NULL; } free(buf); fclose(out); fclose(in); fzip = fopen(G.tempfn,"rb,recfm=fb"); if (fzip == NULL) return NULL; /* Update the G.ziplen value since it might have changed after the reformatting copy. */ fseek(fzip,0L,SEEK_SET); fseek(fzip,0L,SEEK_END); G.ziplen = ftell(fzip); } #endif return fzip; } /***************************/ /* Function open_outfile() */ /***************************/ int open_outfile(__G) /* return 1 if fail */ __GDEF { char type[100]; char *mode = NULL; #ifdef MVS /* Check if the output file already exists and do not overwrite its DCB */ char basefilename[PATH_MAX], *p; FILE *exists; /* Get the base file name, without any member name */ strcpy(basefilename, G.filename); if ((p = strchr(basefilename, '(')) != NULL) { if (basefilename[0] == '\'') *p++ = '\''; *p = '\0'; } exists = fopen(basefilename, FOPR); if (exists) { if (G.pInfo->textmode) mode = FOPWTE; /* Text file, existing */ else mode = FOPWE; /* Binary file, existing */ fclose(exists); } else /* continued on next line */ #endif /* MVS */ if (G.pInfo->textmode) { if (mode == NULL) mode = FOPWT; } else if (G.lrec.extra_field_length > 0 && G.extra_field != NULL) { unsigned lef_len = (unsigned)(G.lrec.extra_field_length); uch *lef_buf = G.extra_field; while (lef_len > EB_HEADSIZE) { unsigned eb_id = makeword(&lef_buf[EB_ID]); unsigned eb_dlen = makeword(&lef_buf[EB_LEN]); if (eb_dlen > (lef_len - EB_HEADSIZE)) { /* Discovered some extra field inconsistency! */ TTrace((stderr, "open_outfile: block length %u > rest lef_size %u\n", eb_dlen, lef_len - EB_HEADSIZE)); break; } if ((eb_id == EF_VMCMS || eb_id == EF_MVS) && (getVMMVSexfield(type, lef_buf, eb_dlen) > 0)) { mode = type; break; } /* Skip this extra field block */ lef_buf += (eb_dlen + EB_HEADSIZE); lef_len -= (eb_dlen + EB_HEADSIZE); } } if (mode == NULL) mode = FOPW; Trace((stderr, "Output file='%s' opening with '%s'\n", G.filename, mode)); if ((G.outfile = fopen(G.filename, mode)) == NULL) { Info(slide, 0x401, ((char *)slide, "\nerror: cannot create %s\n", G.filename)); Trace((stderr, "error %d: '%s'\n", errno, strerror(errno))); return 1; } return 0; } /* end function open_outfile() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF { fclose(G.outfile); } /* end function close_outfile() */ /***************************/ /* Function close_infile() */ /***************************/ void close_infile(__G) __GDEF { fclose(G.zipfd); /* If we're working from a temp file, erase it now */ if (G.tempfn) remove(G.tempfn); } /* end function close_infile() */ /******************************/ /* Function getVMMVSexfield() */ /******************************/ extent getVMMVSexfield(type, ef_block, datalen) char *type; uch *ef_block; unsigned datalen; { fldata_t *fdata = (fldata_t *) &ef_block[4]; if (datalen < sizeof(fldata_t)) return 0; strcpy(type, "w"); strcat(type, fdata->__openmode == __TEXT ? "" :fdata->__openmode == __BINARY ? "b" :fdata->__openmode == __RECORD ? "b,type=record" : ""); strcat(type, ",recfm="); strcat(type, fdata->__recfmF? "F" :fdata->__recfmV? "V" :fdata->__recfmU? "U" : "?"); if (fdata->__recfmBlk) strcat(type, "B"); if (fdata->__recfmS) strcat(type, "S"); if (fdata->__recfmASA) strcat(type, "A"); if (fdata->__recfmM) strcat(type, "M"); sprintf(type+strlen(type), ",lrecl=%ld", fdata->__recfmV ? fdata->__maxreclen+4 : fdata->__maxreclen); #ifdef VM_CMS /* For CMS, use blocksize for FB files only */ if (fdata->__recfmBlk) sprintf(type+strlen(type), ",blksize=%ld", fdata->__blksize); #else /* For MVS, always use blocksize */ sprintf(type+strlen(type), ",blksize=%ld", fdata->__blksize); #endif return strlen(type); } /* end function getVMMVSexfield() */ #ifndef SFX /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wld) __GDEF ZCONST char *wld; /* only used first time on a given dir */ { static int First = 0; static char filename[256]; if (First == 0) { First = 1; strcpy( filename, wld ); return filename; } else return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /************************/ /* Function mapattr() */ /************************/ int mapattr(__G) __GDEF { return 0; } /************************/ /* Function mapname() */ /************************/ int mapname(__G__ renamed) /* returns: */ /* 0 (PK_COOL) if no error, */ /* 1 (PK_WARN) if caution (filename trunc), */ /* 2 (PK_ERR) if warning (skip file because dir doesn't exist), */ /* 3 (PK_BADERR) if error (skip file), */ /* 10 if no memory (skip fiG7 UNZIP.BCK? ([UNZIP542.CMSMVS]VMMVS.C;1%cle) */ /* 78 (IZ_VOL_LABEL) if path was volume label (skip it) */ __GDEF int renamed; { char newname[FILNAMSIZ], *lbar; #ifdef MVS char *pmember; #endif int name_changed = 0; if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in CMS_MVS */ #ifdef MVS /* Remove bad characters for MVS from the filename */ while ((lbar = strpbrk(G.filename, "_+-")) != NULL) { /* Must use memmove() here because data overlaps. */ /* strcpy() gives undefined behavior in this case. */ memmove(lbar, lbar+1, strlen(lbar)); name_changed = 1; } #endif /* Remove bad characters for MVS/CMS from the filename */ while ((lbar = strpbrk(G.filename, "()")) != NULL) { memmove(lbar, lbar+1, strlen(lbar)); name_changed = 1; } #ifdef VM_CMS if ((lbar = strrchr(G.filename, '/')) != NULL) { strcpy(newname, lbar+1); Trace((stderr, "File '%s' renamed to '%s'\n", G.filename, newname)); strcpy(G.filename, newname); name_changed = 1; } #else /* MVS */ if ((pmember = strrchr(G.filename, '/')) == NULL) pmember = G.filename; else pmember++; /* search for extension in file name */ if ((lbar = strrchr(pmember, '.')) != NULL) { *lbar++ = '\0'; strcpy(newname, pmember); strcpy(pmember, lbar); strcat(pmember, "("); strcat(pmember, newname); strcat(pmember, ")"); } /* Remove all 'internal' dots '.', to prevent false consideration as * MVS path delimiters! */ while ((lbar = strrchr(G.filename, '.')) != NULL) { memmove(lbar, lbar+1, strlen(lbar)); name_changed = 1; } /* Finally, convert path delimiters from internal '/' to external '.' */ while ((lbar = strchr(G.filename, '/')) != NULL) *lbar = '.'; #endif /* ?VM_CMS */ #ifndef MVS if ((lbar = strchr(G.filename, '.')) == NULL) { printf("WARNING: file '%s' has no extension - renamed to '%s.NONAME'\n"\ ,G.filename, G.filename); strcat(G.filename, ".NONAME"); name_changed = 1; } #endif checkdir(__G__ G.filename, GETPATH); return name_changed; } /* end function mapname() */ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. Note that under OS/2 and MS-DOS, if a candidate extract-to directory specification includes a drive letter (leading "x:"), it is treated just as if it had a trailing '/'--that is, one directory level will be created if the path doesn't exist, unless this is otherwise pro- hibited (e.g., freshening). ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; } else if ((rootlen = strlen(pathcomp)) > 0) { if ((rootpath = (char *)malloc(rootlen+1)) == NULL) { rootlen = 0; return 10; } strcpy(rootpath, pathcomp); Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { if (rootlen > 0) { #ifdef VM_CMS /* put the exdir after the filename */ strcat(pathcomp, "."); /* used as minidisk to be save on */ strcat(pathcomp, rootpath); #else /* MVS */ char newfilename[PATH_MAX]; char *start_fname; int quoted = 0; strcpy(newfilename, rootpath); if (newfilename[0] == '\'') { quoted = strlen(newfilename) - 1; if (newfilename[quoted] == '\'') newfilename[quoted] = '\0'; else quoted = 0; } if (strchr(pathcomp, '(') == NULL) { if ((start_fname = strrchr(pathcomp, '.')) == NULL) { start_fname = pathcomp; } else { *start_fname++ = '\0'; strcat(newfilename, "."); strcat(newfilename, pathcomp); } strcat(newfilename, "("); strcat(newfilename, start_fname); strcat(newfilename, ")"); } else { strcat(newfilename, "."); strcat(newfilename, pathcomp); } if (quoted) strcat(newfilename, "'"); Trace((stdout, "new dataset : %s\n", newfilename)); strcpy(pathcomp, newfilename); #endif /* ?VM_CMS */ } return 0; } /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /******************************/ /* Function check_for_newer() */ /* used for overwriting/freshening/updating */ /******************************/ int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ __GDEF /* or equal; 0 if older; -1 if doesn't */ char *filename; /* exist yet */ { FILE *stream; if ((stream = fopen(filename, FOPR)) != NULL) { fclose(stream); /* File exists, assume it is "newer" than archive entry. */ return EXISTS_AND_NEWER; } /* File does not exist. */ return DOES_NOT_EXIST; } /* end function check_for_newer() */ /*********************/ /* Function stat() */ /*********************/ int stat(const char *path, struct stat *buf) { FILE *fp; char fname[PATH_MAX]; time_t ltime; if ((fp = fopen(path, FOPR)) != NULL) { fldata_t fdata; if (fldata( fp, fname, &fdata ) == 0) { buf->st_dev = fdata.__device; buf->st_mode = *(short *)(&fdata); } /* Determine file size by seeking to EOF */ fseek(fp,0L,SEEK_END); buf->st_size = ftell(fp); fclose(fp); /* set time fields in stat buf to current time. */ time(<ime); buf->st_atime = buf->sHk UNZIP.BCK? ([UNZIP542.CMSMVS]VMMVS.C;1%R1t_mtime = buf->st_ctime = ltime; /* File exists, return success */ return 0; } return 1; } #ifdef STAND_ALONE /***************************/ /* Function main_vmmvs() */ /***************************/ /* This function is called as main() to parse arguments */ /* into argc and argv. This is required for stand-alone */ /* execution. This calls the "real" main() when done. */ int MAIN_VMMVS(void) { int argc=0; char *argv[50]; int iArgLen; char argstr[256]; char **pEPLIST, *pCmdStart, *pArgStart, *pArgEnd; /* Get address of extended parameter list from S/370 Register 0 */ pEPLIST = (char **)__xregs(0); /* Null-terminate the argument string */ pCmdStart = *(pEPLIST+0); pArgStart = *(pEPLIST+1); pArgEnd = *(pEPLIST+2); iArgLen = pArgEnd - pCmdStart + 1; /* Make a copy of the command string */ memcpy(argstr, pCmdStart, iArgLen); argstr[iArgLen] = '\0'; /* Null-terminate */ /* Store first token (cmd) */ argv[argc++] = strtok(argstr, " "); /* Store the rest (args) */ while (argv[argc-1]) argv[argc++] = strtok(NULL, " "); argc--; /* Back off last NULL entry */ /* Call "real" main() function */ return MAIN(argc, argv); } #endif /* STAND_ALONE */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; char liblvlmsg [50+1]; char *compiler = "?"; char *platform = "?"; char complevel[64]; /* Map the runtime library level information */ union { unsigned int iVRM; struct { unsigned int pd:4; /* Product designation */ unsigned int vv:4; /* Version */ unsigned int rr:8; /* Release */ unsigned int mm:16; /* Modification level */ } xVRM; } VRM; /* Break down the runtime library level */ VRM.iVRM = __librel(); sprintf(liblvlmsg, "Using runtime library level %s V%dR%dM%d", (VRM.xVRM.pd==1 ? "LE" : "CE"), VRM.xVRM.vv, VRM.xVRM.rr, VRM.xVRM.mm); /* Note: LE = Language Environment, CE = Common Env. (C/370). */ /* This refers ONLY to the current runtimes, not the compiler. */ #ifdef VM_CMS platform = "VM/CMS"; #ifdef __IBMC__ compiler = "IBM C"; #else compiler = "C/370"; #endif #endif #ifdef MVS platform = "MVS"; #ifdef __IBMC__ compiler = "IBM C/C++"; #else compiler = "C/370"; #endif #endif #ifdef __COMPILER_VER__ VRM.iVRM = __COMPILER_VER__; sprintf(complevel," V%dR%dM%d", VRM.xVRM.vv, VRM.xVRM.rr, VRM.xVRM.mm); #else #ifdef __IBMC__ sprintf(complevel," V%dR%d", __IBMC__ / 100, (__IBMC__ % 100)/10); #else complevel[0] = '\0'; #endif #endif /* Output is in the form "Compiled with %s%s for %s%s%s%s." */ len = sprintf((char *)slide, LoadFarString(CompiledWith), /* Add compiler name and level */ compiler, complevel, /* Add compile environment */ platform, /* Add timestamp */ #ifdef __DATE__ " on " __DATE__ #ifdef __TIME__ " at " __TIME__ #endif #endif ".\n", "", liblvlmsg ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); } /* end function version() */ #endif /* !SFX */ *[UNZIP542.CMSMVS]VMMVS.H;1+,7./ 4- (0@123KPWO56 7 89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* vmmvs.h: include file for both VM/CMS and MVS ports of UnZip */ #ifndef __vmmvs_h /* prevent multiple inclusions */ #define __vmmvs_h #ifndef NULL # define NULL (zvoid *)0 #endif #ifdef MVS # define _POSIX_SOURCE /* tell MVS we want full definitions */ # define NO_STRNICMP /* MVS has no strnicmp() */ # include /* MVS complains if a function has the same name as a csect. */ # if defined(__UNZIP_C) # pragma csect(STATIC,"unzip_s") # elif defined(__CRC32_C) # pragma csect(STATIC,"crc32_s") # elif defined(__ENVARGS_C) # pragma csect(STATIC,"envarg_s") # elif defined(__EXPLODE_C) # pragma csect(STATIC,"explod_s") # elif defined(__INFLATE_C) # pragma csect(STATIC,"inflat_s") # elif defined(__MATCH_C) # pragma csect(STATIC,"match_s") # elif defined(__UNREDUCE_C) # pragma csect(STATIC,"unredu_s") # elif defined(__UNSHRINK_C) # pragma csect(STATIC,"unshri_s") # elif defined(__ZIPINFO_C) # pragma csect(STATIC,"zipinf_s") # endif #endif /* MVS */ #include /* the usual non-BSD time functions */ #ifdef VM_CMS # include "vmstat.h" #endif #ifdef MVS # include #endif #define PASSWD_FROM_STDIN /* Kludge until we know how to open a non-echo tty channel */ #define EBCDIC #define __EBCDIC 2 /* treat EBCDIC as binary! */ /* In the context of Info-ZIP, a portable "text" mode file implies the use of an ASCII-compatible (ISO 8859-1, or other extended ASCII) code page. */ #ifdef MORE # undef MORE #endif /* Workarounds for missing RTL functionality */ #define isatty(t) 1 #ifdef UNZIP /* definitions for UNZIP */ #define INBUFSIZ 8192 #define USE_STRM_INPUT #define USE_FWRITE #define PATH_MAX 128 #ifndef QUERY_TRNEWLN # define QUERY_TRNEWLN /* terminate interaction queries with '\n' */ #endif #ifndef DATE_FORMAT # define DATE_FORMAT DF_MDY #endif #define lenEOL 1 /* The use of "ebcdic[LF]" is not reliable; VM/CMS C/370 uses the * EBCDIC specific "NL" ('NewLine') control character (and not the EBCDIC * equivalent of the ASCII "LF" ('LineFeed')) as line terminator! * To work around this problem, we explicitely emit the C compiler's native * '\n' line terminator. */ #if 0 #define PutNativeEOL *q++ = native(LF); #else #define PutNativeEOL *q++ = '\n'; #endif #endif /* UNZIP */ #endif /* !__vmmvs_h */ *[UNZIP542.CMSMVS]VMSTAT.H;1+,'./ 4- (0@123KPWO56; 7; 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __vmstat_h #define __vmstat_h /* stat.h definitions */ #ifndef _INO_T_DEFINED typedef unsigned short ino_t; /* i-node number (not used on DIma UNZIP.BCK' (NZIP542.CMSMVS]VMSTAT.H;1OS) */ #define _INO_T_DEFINED #endif #ifndef _DEV_T_DEFINED typedef short dev_t; /* device code */ #define _DEV_T_DEFINED #endif #ifndef _OFF_T_DEFINED typedef long off_t; /* file offset value */ #define _OFF_T_DEFINED #endif #ifndef _STAT_DEFINED struct stat { dev_t st_dev; ino_t st_ino; short st_mode; short st_nlink; int st_uid; int st_gid; off_t st_size; time_t st_atime; time_t st_mtime; time_t st_ctime; }; #define _STAT_DEFINED #endif int stat(const char *path, struct stat *buf); int fstat(int fd, struct stat *buf); #define S_IFMT 0xFFFF #define _FLDATA(m) (*(fldata_t *) &m) #define S_ISDIR(m) (_FLDATA(m).__dsorgPDSdir) #define S_ISREG(m) (_FLDATA(m).__dsorgPO | \ _FLDATA(m).__dsorgPDSmem | \ _FLDATA(m).__dsorgPS) #define S_ISBLK(m) (_FLDATA(m).__recfmBlk) #define S_ISMEM(m) (_FLDATA(m).__dsorgMem) #endif /* __vmstat_h */ *[UNZIP542.CMSMVS]WHATSNEW.CMS;1+,{./ 4N- (0@123KPWO56+}U7+}U89GHJImportant Changes made for ZIP 2.3b and UNZIP 5.33c executables: 1. WARNING: These executables have been compiled for the Language Environment (LE). You must now have access to the file SCEERUN LOADLIB in order to run ZIP and UNZIP on CMS. You no longer need access to EDCLINK LOADLIB. The provided ZIP and UNZIP EXECs have been changed to issue a new GLOBAL LOADLIB command. You may need to modify these EXECs for your installation. You may want to change any GLOBAL LOADLIB command you may have in your PROFILE EXEC. Versions could be made available for the older EDCLINK LOADLIB runtimes upon request. 2. ZIP files will now be variable length files rather than fixed length files. 3. Help information for ZIP and UNZIP has been changed to show "fm" rather than "path" on CMS with certain options. 4. README CMS has been entirely rewritten. It now contains all information for ZIP and UNZIP. ----------------------------------------------------------------------- Greg Hartwig, April 1998. e-mail: ghartwig@ix.netcom.com ghartwig@vnet.ibm.com *[UNZIP542.CMSMVS]ZIPINFO.EXEC;1+,x./ 4- (0@123KPWO56,}U7,}U89GHJ /***********************************************************************/ /* */ /* Front-end EXEC to set up linkage to the C runtime libraries */ /* before executing a MODULE generated from C code. */ /* */ /* Copy this file as an EXEC with a filename matching the C MODULE. */ /* */ /* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ /* */ /***********************************************************************/ Address Command Parse Arg argstring Parse Source . . myname . /* Set output and input character translation so brackets show up */ 'SET OUTPUT AD' 'BA'x 'SET OUTPUT BD' 'BB'x 'SET INPUT BA AD' 'SET INPUT BB BD' Call CLIB If rc<>0 Then Do Say 'The required C runtime libraries don''t appear to be available.' Say myname 'can not run.' Exit 12 End /* Run the command */ myname argstring Exit rc /* Contents of the CLIB EXEC, modified for RC checking. */ /* Removed TXTLIB setting. Only LOADLIB needed for execution. */ CLIB: /***************************************************/ /* SET UP LIBRARIES FOR LE for MVS & VM */ /***************************************************/ Address COMMAND loadlib ='EDCLINK' /* C/370 runtime */ loadlib ='SCEERUN' /* LE runtime */ theirs=queued() /* old stack contentsM068*/ 'QUERY LOADLIB ( LIFO' /* old setting M068*/ LoadlibList='' /* init list M068*/ rc=0 Do while queued()^=theirs /* all lines from cmdM068*/ Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ End /*M068*/ If loadlibList='NONE' , Then Do 'GLOBAL LOADLIB' Loadlib /* enforce what we need */ End Else Do Do xx=1 to Words(loadlib) If Find(loadliblist,word(loadlib,xx)) = 0 , then loadliblist = loadliblist word(loadlib,xx) End 'GLOBAL LOADLIB' loadliblist /* enforce what we need */ End Return P*[UNZIP542]CONSTS.H;1+, ./ 4- 0@123KPWO56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- consts.h This file contains global, initialized variables that never change. It is included by unzip.c and windll/windll.c. ---------------------------------------------------------------------------*/ /* And'ing with mask_bits[n] masks the lower n bits */ ZCONST ush near mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; ZCONST char Far VersionDate[] = UZ_VERSION_DATE; /* now defined in version.h */ #ifndef SFX ZCONST char Far EndSigMsg[] = "\nnote: didn't find end-of-central-dir signature at end of central dir.\n"; #endif ZCONST char Far CentSigMsg[] = "error: expected central file header signature not found (file #%lu).\n"; ZCONST char Far SeekMsg[] = "error [%s]: attempt to seek before beginning of zipfile\n%s"; ZCONST char Far FilenameNotMatched[] = "caution: filename not matched: %s\n"; ZCONST char Far ExclFilenameNotMatched[] = "caution: excluded filename not matched: %s\n"; #ifdef VMS ZCONST char Far ReportMsg[] = "\ (please check tJa UNZIP.BCK  [UNZIP542]CONSTS.H;1}hat you have transferred or created the zipfile in the\n\ appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n"; #else ZCONST char Far ReportMsg[] = "\ (please check that you have transferred or created the zipfile in the\n\ appropriate BINARY mode and that you have compiled UnZip properly)\n"; #endif #ifndef SFX ZCONST char Far Zipnfo[] = "zipinfo"; ZCONST char Far CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n"; #endif *[UNZIP542]CONTENTS.;1+,}^. / 4 - 0@123KPWO 56F7F89GHJContents of the UnZip 5.42 source archive. The OS-specific subdirectories at the end contain their own Contents listings: Contents this file README what UnZip is; general information LICENSE Info-ZIP license; terms for using and distributing UnZip COPYING.OLD historic copyrights and distribution policy (obsolete) INSTALL how to compile and install UnZip and related utilities WHERE where Zip/UnZip and encryption/decryption support can be found History.540 new features and fixes of the last major release History.541 new features and fixes in the previous maintance release History.542 new features and fixes in this release ToDo rough priority list of new features to be added in next release BUGS known bugs, problems, and (possible) other features to be added unzip.txt UnZip manual page, human-readable format unzipsfx.txt UnZipSFX manual page, human-readable format zipinfo.txt ZipInfo manual page, human-readable format zipgrep.txt ZipGrep manual page, human-readable format funzip.txt fUnZip manual page, human-readable format file_id.diz BBS-oriented file describing this archive testmake.zip test archive for checking whether newly compiled UnZip works api.c generic DLL entry points, support functions (required for DLLs) apihelp.c API help text for DLL versions (currently OS/2 only) consts.h global, initialized variables that never change (required) crc32.c code for calculation 32bit CRC of a string buffer (required*) crc_i386.S fast assembler replacement for crc32.c (Intel 386 and newer) crctab.c supplies polynomial table for CRC calculation crypt.c de-/encryption routines (required*) crypt.h de-/encryption header file (required*) ebcdic.h static lookup table for ASCII <-> EBCDIC translation (required) envargs.c code to read options from environment variables (required) explode.c code for exploding (required) extract.c high-level extraction and decryption code (required) fileio.c file manipulation and password code (required) funzip.c filter unzip: extracts in a pipe from stdin to stdout globals.c code to support global variables with reentrancy (required) globals.h definition of global structure G (required) inflate.c code for inflating (required*) inflate.h header file for inflating (required*) list.c UnZip listing routines, non-ZipInfo mode (required) match.c pattern-matching code for filename wildcards (required) process.c zipfile headers code (required) tables.h static lookup tables used in fileio.c and funzip.c (required*) timezone.c timezone and timestamp functions (required) timezone.h header file for interface to "internal" tz functions (required) ttyio.c code for handling nonecho tty input: password, pager (required) ttyio.h header file for nonecho tty input: password, pager (required) unreduce.c code for unreducing (required) unshrink.c code for unshrinking (required) unzip.c UnZip main(), usage and options code (required) unzip.h public half of main UnZip header file (required*) unzipstb.c minimal UnZip "stub" file demonstrating use of DLL versions unzpriv.h private (internal) half of main UnZip header file (required*) version.h header with UnZip/UnZipSFX and ZipInfo version info (required) zip.h dummy header for use with crypt.c (required*) zipinfo.c UnZip listing routines, ZipInfo mode (required) acorn/ support files for compiling under Acorn RISC OS amiga/ support files for compiling under AmigaDOS aosvs/ support files for compiling under Data General AOS/VS atari/ support files for compiling under Atari TOS beos/ support files for compiling under BeOS cmsmvs/ support files for compiling under VM/CMS and MVS flexos/ support files for compiling under FlexOS human68k/ support files for compiling under X68000/Human68K macos/ support files for compiling under Macintosh OS msdos/ support files for compiling under MS-DOS novell/ support files for compiling for Novell Netware NLM os2/ support files for compiling under OS/2 (includes DLL stuff) qdos/ support files for compiling under SMS/QDOS tandem/ support files for compiling under Tandem NSK theos/ support files for compiling under Theos tops20/ support files for compiling under TOPS-20 unix/ support files for compiling under Unix vms/ support files for compiling under VMS win32/ support files for compiling under Windows 9x and Windows NT wince/ support files for compiling under Windows CE (GUI version) windll/ support files for compiling Windows 3.x/9x/NT DLLs man/ nroff man-page sources for the main user documentation proginfo/ programming docs, additional technical info, contributor list Files marked "required*" are also needed to compile fUnZip. The normal UnZip makefile targets now make both UnZipSFX and fUnZip, except in a few cases; ZipInfo is now incorporated into UnZip (see zipinfo.txt for usage). *[UNZIP542]COPYING.OLD;1+,y B./ 4- 0@123KPWO56lӞ7lӞ89GHJ__________________________________________________________________________ This is the Info-ZIP file COPYING (for UnZip), last updated 17 Jul 2000. __________________________________________________________________________ FIRST NOTE: This file contains some details about the copyright history of contributions to the UnZip project. Additionally, it summarises some exceptions to the general BSD-like copyright found in LICENSE that covers our generic code and most of the system specific ports. Please read LICENSE first to find out what is allowed to do with Info-ZIP's UnZip code. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There are currently two explicit copyrights on portions of UnZip code (at least, of which Info-ZIP is aware): Jim Luther's Mac OS File Manager interface code; and Christopher Evans' MacBinaryIII coding code (for the MacOS port).. These copyrights are discussed in more detail below. All remaining code is now (startKN UNZIP.BCKy B [UNZIP542]COPYING.OLD;1ing with UnZip version 5.41) covered by the new Info-ZIP license. For details, please read the acompaning file LICENSE. The terms and conditions in this license supersede the copyright conditions of the contributions by Igor Mandrichenko (vms/vms.c), Greg Roelofs (zipinfo.c, new version of unshrink.c), Mike White (Windows DLL code in "windll/*"), Steve P. Miller (Pocket UnZip GUI "wince/*"), and Mark Adler (inflate/explode decompresseion core routines, previously put into the public domain). All these Info-ZIP contributors (or "primary" authors) have permitted us to replace their copyright notes by the Info-ZIP License. Frequently Asked Questions regarding (re)distribution of Zip and UnZip are near the end of this file. There are no known patents on any of the code in UnZip. Unisys claims a patent on LZW encoding and on LZW decoding _in an apparatus that performs LZW encoding_, but the patent appears to exempt a stand- alone decoder (as in UnZip's unshrink.c). Unisys has publicly claimed otherwise, but the issue has never been tested in court. Since this point is unclear, unshrinking is not enabled by default. It is the responsibility of the user to make his or her peace with Unisys and its licensing requirements. (unshrink.c may be removed from future releases altogether.) __________________________________________________________________________ The original unzip source code has been extensively modified and almost entirely rewritten (changes include random zipfile access rather than sequential; replacement of unimplode() with explode(); replacement of old unshrink() with new (unrelated) unshrink(); re- placement of output routines; addition of inflate(), wildcards, filename-mapping, text translation, ...; etc.). As far as we can tell, only the core code of the unreduce method remained substantially similar to Mr. Smith's original source. As of UnZip 5.42, the complete core code is now covered by the Info-ZIP Licence. Therefore, support for the reduce method has been removed. The drop of the reduce method should only affect some test archives, reducing was never used in any publically distributed Zip program. For pathologic cases where support for reduced archive entries is needed, the unreduce code copyrighted by Samuel H. Smith is available as a separate distribution (the restricted copyright of this code is cited below in the "historical" section). The following copyright applies to the Mac OS File Manager interface code (macos/source/macstuff.[ch]), distributed with UnZip 5.4 and later: * MoreFiles * * A collection of File Manager and related routines * * by Jim Luther (Apple Macintosh Developer Technical Support Emeritus) * with significant code contributions by Nitin Ganatra * (Apple Macintosh Developer Technical Support Emeritus) * Copyright 1992-1998 Apple Computer, Inc. * Portions copyright 1995 Jim Luther * All rights reserved. * The Package "More Files" is distributed under the following * license terms: * * "You may incorporate this sample code into your * applications without restriction, though the * sample code has been provided "AS IS" and the * responsibility for its operation is 100% yours. * However, what you are not permitted to do is to * redistribute the source as "DSC Sample Code" after * having made changes. If you're going to * redistribute the source, we require that you make * it clear in the source that the code was descended * from Apple Sample Code, but that you've made * changes." The usage terms of this copyright note are compatible with the Info-ZIP license, they do not add further restrictions. The following copyright applies to the Mac OS "macbin3" decoding code (extra field compatibility with ZipIt): * MacBinaryIII.h * * Copyright 1997 Christopher Evans (cevans@poppybank.com) * * Basic encoding and decoding of Macintosh files to the * MacBinary III spec. * ---------------------------------------------------------------------- * This source is copyrighted by Christopher Evans (cevans@poppybank.com) * (available at ftp://ftp.lazerware.com/MacBinaryIII_src_C.sit * homepage of Leonard Rosenthol leonardr@netcom.com) This copyright note does not contain any usage terms. So, we assume that this code is freely reusable until we are proved wrong... -------------------------------------------------------------------------- The remaining copyright notes have been superseeded by the new Info-ZIP license, with explicit permission from the respective original authors. They are cited here for historical reasons, only: The following copyright applies to the full-featured unreduce.c (now distributed separately): * Copyright 1989 Samuel H. Smith; All rights reserved * * Do not distribute modified versions without my permission. * Do not remove or alter this notice or any other copyright notice. * If you use this in your own program you must distribute source code. * Do not use any of this in a commercial product. Regarding the first stipulation, Mr. Smith was tracked down in southern California some years back [Samuel H. Smith, The Tool Shop; as of mid- May 1994, (213) 851-9969 (voice), (213) 887-2127(?) (subscription BBS), 71150.2731@compuserve.com]: "He says that he thought that whoever contacted him understood that he has no objection to the Info-ZIP group's inclusion of his code. His primary concern is that it remain freely distributable, he said." Despite the fact that our "normal" code has been entirely rewritten and by default no longer contains any of Mr. Smith's code, Info-ZIP remains indebted and grateful to him. We hope he finds our contribu- tions as useful as we have his. Note that the third and fourth stipulations still apply to any com- pany that wishes to incorporate the unreduce code into its products; if you wish to do so, you must contact Mr. Smith directly regarding licensing. ----- The following copyright applied to most of the VMS code in vms.c, distributed with UnZip version 4.2 and later: * Copyright (c) 1992-93 Igor Mandrichenko. * Permission is granted to any individual or institution to use, copy, * or redistribute this software so long as all of the original files * are included unmodified and that this copyright notice is retained. ----- The following copyright applied to the new version of unshrink.c, distributed with UnZip version 5.2 and later: * Copyright (c) 1994 Greg Roelofs. * Permission is granted to any individual/institution/corporate * entity to use, copy, redistribute or modify this software for * any purpose whatsoever, subject to the conditions noted in the * Frequently Asked Questions section below, plus one additional * condition: namely, that my name not be removed from the source * code. (Other names may, of course, be added as modifications * are made.) Corporate legal staff (like at IBM :-) ) who have * problems understanding this can contact me through Zip-Bugs... ----- The following copyright applied to the Windows DLL code (windll/*), distributed with UnZip version 5.2 and later: * Copyright (c) 1996 Mike White. * PermissioL - UNZIP.BCKy B [UNZIP542]COPYING.OLD;1zn is granted to any individual or institution to use, * copy, or redistribute this software so long as all of the original * files are included, that it is not sold for profit, and that this * copyright notice is retained. ----- The following copyright applied to the Windows CE GUI port, ``Pocket UnZip,'' distributed with UnZip version 5.3 and later: * All the source files for Pocket UnZip, except for components * written by the Info-ZIP group, are copyrighted 1997 by Steve P. * Miller. The product "Pocket UnZip" itself is property of the * author and cannot be altered in any way without written consent * from Steve P. Miller. ----- The remaining code was written by many people associated with the Info-ZIP group, with large contributions from (but not limited to): Greg Roelofs (overall program logic, ZipInfo, unshrink, filename mapping/portability, etc.), Mark Adler (inflate, explode, funzip), Kai Uwe Rommel (OS/2), John Bush and Paul Kienitz (Amiga), Antoine Verheijen (Macintosh), Hunter Goatley (more VMS), Mike White (Windows DLLs), Christian Spieler (overall logic, optimization, VMS, etc.) and others. See the file CONTRIBS in the source distribution for a much more complete list of contributors. The decompression core code for the deflate method (inflate.[ch], explode.c) was originally written by Mark Adler who submitted it as public domain code. -------------------------------------------------------------------------- *[UNZIP542]CRC32.C;1+, ./ 4?- 0@123KPWO56V\7V\89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* $Id: crc32.c,v 1.5 1996/01/13 14:55:12 spc Exp $ */ #define __CRC32_C /* identifies this source module */ #include "zip.h" #ifndef USE_ZLIB #ifndef ASM_CRC #ifndef ZCONST # define ZCONST const #endif #ifdef CRC32 # undef CRC32 #endif #define CRC32(c, b) (crc_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) #define DO1(buf) crc = CRC32(crc, *buf++) #define DO2(buf) DO1(buf); DO1(buf) #define DO4(buf) DO2(buf); DO2(buf) #define DO8(buf) DO4(buf); DO4(buf) /* ========================================================================= */ ulg crc32(crc, buf, len) register ulg crc; /* crc shift register */ register ZCONST uch *buf; /* pointer to bytes to pump through */ extent len; /* number of bytes in buf[] */ /* Run a set of bytes through the crc shift register. If buf is a NULL pointer, then initialize the crc shift register contents instead. Return the current crc in either case. */ { register ZCONST ulg near *crc_table; if (buf == NULL) return 0L; crc_table = get_crc_table(); crc = crc ^ 0xffffffffL; #ifndef NO_UNROLLED_LOOPS while (len >= 8) { DO8(buf); len -= 8; } #endif if (len) do { DO1(buf); } while (--len); return crc ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ } #endif /* !ASM_CRC */ #endif /* !USE_ZLIB */ l*[UNZIP542]CRCTAB.C;1+, 7./ 4{- 0@123KPWO56aǜ7aǜ89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crctab.c -- supply the CRC table needed for CRC-32 calculations. * Copyright (C) 1995 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* $Id: crctab.c,v 1.4 1996/01/08 14:55:12 jloup Exp $ */ /* Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. Polynomials over GF(2) are represented in binary, one bit per coefficient, with the lowest powers in the most significant bit. Then adding polynomials is just exclusive-or, and multiplying a polynomial by x is a right shift by one. If we call the above polynomial p, and represent a byte as the polynomial q, also with the lowest power in the most significant bit (so the byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, where a mod b means the remainder after dividing a by b. This calculation is done using the shift-register method of multiplying and taking the remainder. The register is initialized to zero, and for each incoming bit, x^32 is added mod p to the register if the bit is a one (where x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x (which is shifting right by one and adding x^32 mod p if the bit shifted out is a one). We start with the highest power (least significant bit) of q and repeat for all eight bits of q. The table is simply the CRC of all possible eight bit values. This is all the information needed to generate CRC's on data a byte at a time for all combinations of CRC register values and incoming bytes. */ #define __CRCTAB_C /* identifies this source module */ #include "zip.h" #if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) #ifndef ZCONST # define ZCONST const #endif #ifdef DYNAMIC_CRC_TABLE /* ========================================================================= * Make the crc table. This function is needed only if you want to compute * the table dynamically. */ local void make_crc_table OF((void)); #if (defined(DYNALLOC_CRCTAB) && defined(REENTRANT)) error: Dynamic allocation of CRC table not safe with reentrant code. #endif /* DYNALLOC_CRCTAB && REENTRANT */ #ifdef DYNALLOC_CRCTAB local ulg near *crc_table = NULL; # if 0 /* not used, since sizeof("near *") <= sizeof(int) */ /* Use this section when access to a "local int" is faster than access to a "local pointer" (e.g.: i86 16bit code with far pointers). */ local int crc_table_empty = 1; # define CRC_TABLE_IS_EMPTY (crc_table_empty != 0) # define MARK_CRCTAB_FILLED crc_table_empty = 0 # define MARK_CRCTAB_EMPTY crc_table_empty = 1 # else /* Use this section on sM@@ K0 ssuuOD).S[~B;1q$d5h!)svZXos,g${:Da?D0D?fe4 ka5'e"rhx3k9Q`p@^a=-GJ3B#xahJp9 nk:J26^U,2HgCb_ SH! a1F\< ^ LZ`vp}H.3,n; nU4?Z-25`9=$3tu S. Mi ),9h>QQNP>Fr:k8<Jrej-&c'CZ/4'5 rZs$=nUB`wOTo0K X- $`RK66%%fW{k]T5Rm`Y? )9fH6 $9nbSbb$**,]A/|/FDV7F[ .rn>m2.Njy3SxP,X._pqM~ 0ik99Zy${ i6WQ+zX @rFT~_W4S.oVr1*|@^|2ESYvd./C15|[A} x<(}W)w?S`YX ,V$R0>)mFKOH)z'\$@GigRC?g$KLV%su{E=K |vyTygkF}W"ocXtMl[Q Rr$ en) 9R (Os&3BG11kf,b 6_G]~-K"|3~xR hrK- p@!"6i)2k1<_ rI+3:*H~2?,S3~I4 h};%^qN~;3LV^9JGfRV[b>8BMGs"9mrVkKJ}uU[al3bh.=+dz& =#&O{4g$`cXn Velk|VHHw`GiA}'SomE}W?j8d#`|ђ?Qu Zi; PSIH~G?fg9KqJLT$W|- =%q}w&$RƉ:r Xza 9 z+-H*v|>47u6]S5 lU6,t|":n6o~Mr*X2HN;LNrY#IDhsYDbh?"V!,CZi':UMm,f^C3d4\B/~NQUrb`8y( vc.:[9)J%jp=);4|B%_u| hy.sM=[(0F|E<~! W< |`[-eENBXab q U $J?N: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TGS`Z}!NzT;iqjE0D]1f"-h-7o5w0 (;aQ=)`wy)VmuP ,p15i57.h>h,RSuBJMFK~uR+O_W=hYOp L>1).!4'nN|67K }( LxMSKYLFn66OeiSs q'467 r\0=cm c8Y4$K{1,V)rF,ZK 2+V+O={|rZY0FyO~xG T}#; ~#sC%KGm3pUt3SxeKW Kcmp'7MX_>fd|**I tUG3 0i ]8>/U Nk;v\\)`! z^HVioCQ9/<<X~VK /tef[,gi:X*>WOCGC~m02?Vu4Fs#5|0)y^'#L}zLI` uN# 4?{VH}'Kj O=4A C-Y XVmu "3*qxPD~w'VkZiduS1k"4,EYnn1eY|R=L5bvmIyDHg R {nX&l|k=E>$R(wXnJ00eb@ALUV .5uG&fV]]uUYa<{s [<,.\;+&Ge;47( sN!?1}z go,7/CVfUn9e;dq4 F3|f|njG!}q7 w,Bl-]A,6_3 CDS LlQ&-L+:G"]g b4LGq$-v|U2G_=XI>:PKd.l+/HU0/C??&@!Hr81_/2K)nk3{YB 6vA:> 1) : c >> 1; crctab_p[n] = c; } MARK_CRCTAB_FILLED; } #else /* !DYNAMIC_CRC_TABLE */ #ifdef DYNALLOC_CRCTAB error: Inconsistent flags, DYNALLOC_CRCTAB without DYNAMIC_CRC_TABLE. #endif /* ======================================================================== * Table of CRC-32's of all single-byte values (made by make_crc_table) */ local ZCONST ulg near crc_table[256] = { 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL }; #endif /* ?DYNAMIC_CRC_TABLE */ /* use "OF((void))" here to work around a Borland TC++ 1.0 problem */ #ifdef USE_ZLIB ZCONST uLongf *get_crc_table OF((void)) #else ZCONST ulg near *get_crc_table OF((void)) #endif { #ifdef DYNAMIC_CRC_TABLE if (CRC_TABLE_IS_EMPTY) make_crc_table(); #endif #ifdef USE_ZLIB return (ZCONST uLongf *)crc_table; #else return (ZCONST ulg near *)crc_table; #endif } #ifdef DYNALLOC_CRCTAB void free_crc_table() { if (!CRC_TABLE_IS_EMPTY) { nearfree((ulg near *)crc_table); MARK_CRCTAB_EMPTY; } } #endif #endif /* !USE_ZLIB || USE_OWN_CRCTAB */ *[UNZIP542]CRC_I386.S;1+, ./ 4- 0@123KPWO56 !7 !89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* * crc_i386.S, optimized CRC calculation function for Zip and UnZip, * created by Paul Kienitz and Christian Spieler. Last revised 24 Dec 98. * * GRR 961110:Owuh UNZIP.BCK  [UNZIP542]CRC_I386.S;142  incorporated Scott Field optimizations from win32/crc_i386.asm * => overall 6% speedup in "unzip -tq" on 9MB zipfile (486-66) * * SPC 970402: revised for Rodney Brown's optimizations (32-bit-wide * aligned reads for most of the data from buffer), can be * disabled by defining the macro NO_32_BIT_LOADS * * SPC 971012: added Rodney Brown's additional tweaks for 32-bit-optimized * CPUs (like the Pentium Pro, Pentium II, and probably some * Pentium clones). This optimization is controlled by the * preprocessor switch "__686" and is disabled by default. * (This default is based on the assumption that most users * do not yet work on a Pentium Pro or Pentium II machine ...) * * FLAT memory model assumed. Calling interface: * - args are pushed onto the stack from right to left, * - return value is given in the EAX register, * - all other registers (with exception of EFLAGS) are preserved. (With * GNU C 2.7.x, %edx and %ecx are `scratch' registers, but preserving * them nevertheless adds only 4 single byte instructions.) * * This source generates the function * ulg crc32(ulg crc, ZCONST uch *buf, ulg len). * * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. * This results in shorter code at the expense of reduced performance. */ /* This file is NOT used in conjunction with zlib. */ #ifndef USE_ZLIB /* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix * external symbols with an underline character '_'. */ #if defined(NO_UNDERLINE) || defined(__ELF__) # define _crc32 crc32 # define _get_crc_table get_crc_table #endif /* Use 16-byte alignment if your assembler supports it. Warning: gas * uses a log(x) parameter (.align 4 means 16-byte alignment). On SVR4 * the parameter is a number of bytes. */ #ifndef ALIGNMENT # define ALIGNMENT .align 4,0x90 #endif #if defined(i386) || defined(_i386) || defined(_I386) || defined(__i386) /* This version is for 386 Unix, OS/2, MSDOS in 32 bit mode (gcc & gas). * Warning: it uses the AT&T syntax: mov source,dest * This file is only optional. If you want to use the C version, * remove -DASM_CRC from CFLAGS in Makefile and set OBJA to an empty string. */ .file "crc_i386.S" #if defined(NO_STD_STACKFRAME) && defined(USE_STD_STACKFRAME) # undef USE_STACKFRAME #else /* The default is to use standard stack frame entry, because it * results in smaller code! */ # ifndef USE_STD_STACKFRAME # define USE_STD_STACKFRAME # endif #endif #ifdef USE_STD_STACKFRAME # define _STD_ENTRY pushl %ebp ; movl %esp,%ebp # define arg1 8(%ebp) # define arg2 12(%ebp) # define arg3 16(%ebp) # define _STD_LEAVE popl %ebp #else /* !USE_STD_STACKFRAME */ # define _STD_ENTRY # define arg1 24(%esp) # define arg2 28(%esp) # define arg3 32(%esp) # define _STD_LEAVE #endif /* ?USE_STD_STACKFRAME */ /* * These two (three) macros make up the loop body of the CRC32 cruncher. * registers modified: * eax : crc value "c" * esi : pointer to next data byte (or lword) "buf++" * registers read: * edi : pointer to base of crc_table array * scratch registers: * ebx : index into crc_table array * (requires upper three bytes = 0 when __686 is undefined) */ #ifndef __686 /* optimize for 386, 486, Pentium */ #define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ movb %al, %bl ;/* tmp = c & 0xFF */\ shrl $8, %eax ;/* c = (c >> 8) */\ xorl (%edi, %ebx, 4), %eax ;/* c ^= table[tmp] */ #else /* __686 : optimize for Pentium Pro and compatible CPUs */ #define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ movzbl %al, %ebx ;/* tmp = c & 0xFF */\ shrl $8, %eax ;/* c = (c >> 8) */\ xorl (%edi, %ebx, 4), %eax ;/* c ^=table[tmp] */ #endif /* ?__686 */ #define Do_CRC_byte /* c = (c >> 8) ^ table[(c^*buf++)&0xFF] */\ xorb (%esi), %al ;/* c ^= *buf */\ incl %esi ;/* buf++ */\ Do_CRC #ifndef NO_32_BIT_LOADS #define Do_CRC_lword \ xorl (%esi), %eax ;/* c ^= *(ulg *)buf */\ addl $4, %esi ;/* ((ulg *)buf)++ */\ Do_CRC \ Do_CRC \ Do_CRC \ Do_CRC #endif /* !NO_32_BIT_LOADS */ .text .globl _crc32 _crc32: /* ulg crc32(ulg crc, uch *buf, extent len) */ _STD_ENTRY pushl %edi pushl %esi pushl %ebx pushl %edx pushl %ecx movl arg2, %esi /* 2nd arg: uch *buf */ subl %eax, %eax /* > if (!buf) */ testl %esi, %esi /* > return 0; */ jz .L_fine /* > else { */ call _get_crc_table movl %eax, %edi movl arg1, %eax /* 1st arg: ulg crc */ #ifndef __686 subl %ebx, %ebx /* ebx=0; bl usable as dword */ #endif movl arg3, %ecx /* 3rd arg: extent len */ notl %eax /* > c = ~crc; */ testl %ecx, %ecx #ifndef NO_UNROLLED_LOOPS jz .L_bail # ifndef NO_32_BIT_LOADS /* Assert now have positive length */ .L_align_loop: testl $3, %esi /* Align buf on lword boundary */ jz .L_aligned_now Do_CRC_byte decl %ecx jnz .L_align_loop .L_aligned_now: # endif /* !NO_32_BIT_LOADS */ movl %ecx, %edx /* save len in edx */ shrl $3, %ecx /* ecx = len / 8 */ jz .L_No_Eights /* align loop head at start of 486 internal cache line !! */ ALIGNMENT .L_Next_Eight: # ifndef NO_32_BIT_LOADS /* Do_CRC_lword */ xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ addl $4, %esi ;/* ((ulg *)buf)++ */ Do_CRC Do_CRC Do_CRC Do_CRC /* Do_CRC_lword */ xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ addl $4, %esi ;/* ((ulg *)buf)++ */ Do_CRC Do_CRC Do_CRC Do_CRC # else /* NO_32_BIT_LOADS */ Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte # endif /* ?NO_32_BIT_LOADS */ decl %ecx jnz .L_Next_Eight .L_No_Eights: movl %edx, %ecx andl $7, %ecx /* ecx = len % 8 */ #endif /* !NO_UNROLLED_LOOPS */ jz .L_bail /* > if (len) */ /* align loop head at start of 486 internal cache line !! */ ALIGNMENT .L_loupe: /* > do { P)Q? UNZIP.BCK  [UNZIP542]CRC_I386.S;1 */ Do_CRC_byte /* c = CRC32(c, *buf++); */ decl %ecx /* > } while (--len); */ jnz .L_loupe .L_bail: /* > } */ notl %eax /* > return ~c; */ .L_fine: popl %ecx popl %edx popl %ebx popl %esi popl %edi _STD_LEAVE ret #else error: this asm version is for 386 only #endif /* i386 || _i386 || _I386 || __i386 */ #endif /* !USE_ZLIB */ *[UNZIP542]CRYPT.C;1+, .(/ 4((_- 0@123KPWO)56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] This encryption/decryption source code for Info-Zip software was originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) NOTE on copyright history: Previous versions of this source package (up to version 2.8) were not copyrighted and put in the public domain. If you cannot comply with the Info-Zip LICENSE, you may want to look for one of those public domain versions. */ /* This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). */ #define ZCRYPT_INTERNAL #include "zip.h" #include "crypt.h" #include "ttyio.h" #if CRYPT #ifndef FALSE # define FALSE 0 #endif #ifdef ZIP /* For the encoding task used in Zip (and ZipCloak), we want to initialize the crypt algorithm with some reasonably unpredictable bytes, see the crypthead() function. The standard rand() library function is used to supply these `random' bytes, which in turn is initialized by a srand() call. The srand() function takes an "unsigned" (at least 16bit) seed value as argument to determine the starting point of the rand() pseudo-random number generator. This seed number is constructed as "Seed = Seed1 .XOR. Seed2" with Seed1 supplied by the current time (= "(unsigned)time()") and Seed2 as some (hopefully) nondeterministic bitmask. On many (most) systems, we use some "process specific" number, as the PID or something similar, but when nothing unpredictable is available, a fixed number may be sufficient. NOTE: 1.) This implementation requires the availability of the following standard UNIX C runtime library functions: time(), rand(), srand(). On systems where some of them are missing, the environment that incorporates the crypt routines must supply suitable replacement functions. 2.) It is a very bad idea to use a second call to time() to set the "Seed2" number! In this case, both "Seed1" and "Seed2" would be (almost) identical, resulting in a (mostly) "zero" constant seed number passed to srand(). The implementation environment defined in the "zip.h" header should supply a reasonable definition for ZCR_SEED2 (an unsigned number; for most implementations of rand() and srand(), only the lower 16 bits are significant!). An example that works on many systems would be "#define ZCR_SEED2 (unsigned)getpid()". The default definition for ZCR_SEED2 supplied below should be regarded as a fallback to allow successful compilation in "beta state" environments. */ # include /* time() function supplies first part of crypt seed */ /* "last resort" source for second part of crypt seed pattern */ # ifndef ZCR_SEED2 # define ZCR_SEED2 (unsigned)3141592654L /* use PI as default pattern */ # endif # ifdef GLOBAL /* used in Amiga system headers, maybe others too */ # undef GLOBAL # endif # define GLOBAL(g) g #else /* !ZIP */ # define GLOBAL(g) G.g #endif /* ?ZIP */ #ifdef UNZIP /* char *key = (char *)NULL; moved to globals.h */ # ifndef FUNZIP local int testp OF((__GPRO__ ZCONST uch *h)); local int testkey OF((__GPRO__ ZCONST uch *h, ZCONST char *key)); # endif #endif /* UNZIP */ #ifndef UNZIP /* moved to globals.h for UnZip */ local ulg keys[3]; /* keys defining the pseudo-random sequence */ #endif /* !UNZIP */ #ifndef Trace # ifdef CRYPT_DEBUG # define Trace(x) fprintf x # else # define Trace(x) # endif #endif #ifndef CRC_32_TAB # define CRC_32_TAB crc_32_tab #endif #define CRC32(c, b) (CRC_32_TAB[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) /*********************************************************************** * Return the next byte in the pseudo-random sequence */ int decrypt_byte(__G) __GDEF { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ temp = ((unsigned)GLOBAL(keys[2]) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); } /*********************************************************************** * Update the encryption keys with the next byte of plain text */ int update_keys(__G__ c) __GDEF int c; /* byte of plain text */ { GLOBAL(keys[0]) = CRC32(GLOBAL(keys[0]), c); GLOBAL(keys[1]) += GLOBAL(keys[0]) & 0xff; GLOBAL(keys[1]) = GLOBAL(keys[1]) * 134775813L + 1; { register int keyshift = (int)(GLOBAL(keys[1]) >> 24); GLOBAL(keys[2]) = CRC32(GLOBAL(keys[2]), keyshift); } return c; } /*********************************************************************** * Initialize the encryption keys and the random header according to * the given password. */ void init_keys(__G__ passwd) __GDEF ZCONST char *passwd; /* password string with which to modify keys */ { GLOBAL(keys[0]) = 305419896L; GLOBAL(keys[1]) = 591751049L; GLOBAL(keys[2]) = 878082192L; while (*passwd != '\0') { update_keys(__G__ (int)*passwd); passwd++; } } #ifdef ZIP /*********************************************************************** * Write encryption header to file zfile using the password passwd * and the cyclic redundancy check crc. */ voQ UNZIP.BCK  [UNZIP542]CRYPT.C;1(? id crypthead(passwd, crc, zfile) ZCONST char *passwd; /* password string */ ulg crc; /* crc of file being encrypted */ FILE *zfile; /* where to write header */ { int n; /* index in random header */ int t; /* temporary */ int c; /* random byte */ int ztemp; /* temporary for zencoded value */ uch header[RAND_HEAD_LEN-2]; /* random header */ static unsigned calls = 0; /* ensure different random header each time */ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the * output of rand() to get less predictability, since rand() is * often poorly implemented. */ if (++calls == 1) { srand((unsigned)time(NULL) ^ ZCR_SEED2); } init_keys(passwd); for (n = 0; n < RAND_HEAD_LEN-2; n++) { c = (rand() >> 7) & 0xff; header[n] = (uch)zencode(c, t); } /* Encrypt random header (last two bytes is high word of crc) */ init_keys(passwd); for (n = 0; n < RAND_HEAD_LEN-2; n++) { ztemp = zencode(header[n], t); putc(ztemp, zfile); } ztemp = zencode((int)(crc >> 16) & 0xff, t); putc(ztemp, zfile); ztemp = zencode((int)(crc >> 24) & 0xff, t); putc(ztemp, zfile); } #ifdef UTIL /*********************************************************************** * Encrypt the zip entry described by z from file source to file dest * using the password passwd. Return an error code in the ZE_ class. */ int zipcloak(z, source, dest, passwd) struct zlist far *z; /* zip entry to encrypt */ FILE *source, *dest; /* source and destination files */ ZCONST char *passwd; /* password string */ { int c; /* input byte */ int res; /* result code */ ulg n; /* holds offset and counts size */ ush flag; /* previous flags */ int t; /* temporary */ int ztemp; /* temporary storage for zencode value */ /* Set encrypted bit, clear extended local header bit and write local header to output file */ if ((n = (ulg)ftell(dest)) == (ulg)-1L) return ZE_TEMP; z->off = n; flag = z->flg; z->flg |= 1, z->flg &= ~8; z->lflg |= 1, z->lflg &= ~8; z->siz += RAND_HEAD_LEN; if ((res = putlocal(z, dest)) != ZE_OK) return res; /* Initialize keys with password and write random header */ crypthead(passwd, z->crc, dest); /* Skip local header in input file */ if (fseek(source, (long)(4 + LOCHEAD + (ulg)z->nam + (ulg)z->ext), SEEK_CUR)) { return ferror(source) ? ZE_READ : ZE_EOF; } /* Encrypt data */ for (n = z->siz - RAND_HEAD_LEN; n; n--) { if ((c = getc(source)) == EOF) { return ferror(source) ? ZE_READ : ZE_EOF; } ztemp = zencode(c, t); putc(ztemp, dest); } /* Skip extended local header in input file if there is one */ if ((flag & 8) != 0 && fseek(source, 16L, SEEK_CUR)) { return ferror(source) ? ZE_READ : ZE_EOF; } if (fflush(dest) == EOF) return ZE_TEMP; return ZE_OK; } /*********************************************************************** * Decrypt the zip entry described by z from file source to file dest * using the password passwd. Return an error code in the ZE_ class. */ int zipbare(z, source, dest, passwd) struct zlist far *z; /* zip entry to encrypt */ FILE *source, *dest; /* source and destination files */ ZCONST char *passwd; /* password string */ { int c0, c1; /* last two input bytes */ ulg offset; /* used for file offsets */ ulg size; /* size of input data */ int r; /* size of encryption header */ int res; /* return code */ ush flag; /* previous flags */ /* Save position and skip local header in input file */ if ((offset = (ulg)ftell(source)) == (ulg)-1L || fseek(source, (long)(4 + LOCHEAD + (ulg)z->nam + (ulg)z->ext), SEEK_CUR)) { return ferror(source) ? ZE_READ : ZE_EOF; } /* Initialize keys with password */ init_keys(passwd); /* Decrypt encryption header, save last two bytes */ c1 = 0; for (r = RAND_HEAD_LEN; r; r--) { c0 = c1; if ((c1 = getc(source)) == EOF) { return ferror(source) ? ZE_READ : ZE_EOF; } Trace((stdout, " (%02x)", c1)); zdecode(c1); Trace((stdout, " %02x", c1)); } Trace((stdout, "\n")); /* If last two bytes of header don't match crc (or file time in the * case of an extended local header), back up and just copy. For * pkzip 2.0, the check has been reduced to one byte only. */ #ifdef ZIP10 if ((ush)(c0 | (c1<<8)) != (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 16))) { #else c0++; /* avoid warning on unused variable */ if ((ush)c1 != (z->flg & 8 ? (ush) z->tim >> 8 : (ush)(z->crc >> 24))) { #endif if (fseek(source, offset, SEEK_SET)) { return ferror(source) ? ZE_READ : ZE_EOF; } if ((res = zipcopy(z, source, dest)) != ZE_OK) return res; return ZE_MISS; } /* Clear encrypted bit and local header bit, and write local header to output file */ if ((offset = (ulg)ftell(dest)) == (ulg)-1L) return ZE_TEMP; z->off = offset; flag = z->flg; z->flg &= ~9; z->lflg &= ~9; z->siz -= RAND_HEAD_LEN; if ((res = putlocal(z, dest)) != ZE_OK) return res; /* Decrypt data */ for (size = z->siz; size; size--) { if ((c1 = getc(source)) == EOF) { return ferror(source) ? ZE_READ : ZE_EOF; } zdecode(c1); putc(c1, dest); } /* Skip extended local header in input file if there is one */ if ((flag & 8) != 0 && fseek(source, 16L, SEEK_CUR)) { return ferror(source) ? ZE_READ : ZE_EOF; } if (fflush(dest) == EOF) return ZE_TEMP; return ZE_OK; } #else /* !UTIL */ /*********************************************************************** * If requested, encrypt the data in buf, and in any case call fwrite() * with the arguments to zfwrite(). Return what fwrite() returns. */ unsigned zfwrite(buf, item_size, nb, f) zvoid *buf; /* data buffer */ extent item_size; /* size of each item in bytes */ extent nb; /* number of items */ FILE *f; /* file to write to */ { int t; /* temporary */ if (key != (char *)NULL) { /* key is the global password pointer */ ulg size; /* buffer size */ char *p = (char*)buf; /* steps through buffer */ /* Encrypt data in buffer */ for (size = item_size*(ulg)nb; size != 0; p++, size--) { *p = (char)zencode(*p, t); } } /* Write the buffer out */ return fwrite(buf, item_size, nb, f); } #endif /* ?UTIL */ #endif /* ZIP */ #if (defined(UNZIP) && !defined(FUNZIP)) /*********************************************************************** * Get the password and set up keys for current zipfile member. * Return PK_ class error. */ int decrypt(__G__ passwrd) __GDEF ZCONST char *passwrd; { ush b; int n, r; uch h[RAND_HEAD_LEN]; Trace((stdout, "\n[incnt = %d]: ", GLOBAL(incnt))); /* get header once (turn off "encrypted" flag temporarily so we don't * try to decrypt the same data twice) */ GLOBAL(pInfo->encrypted) = FALSE; defR;Z UNZIP.BCK  [UNZIP542]CRYPT.C;1(er_leftover_input(__G); for (n = 0; n < RAND_HEAD_LEN; n++) { b = NEXTBYTE; h[n] = (uch)b; Trace((stdout, " (%02x)", h[n])); } undefer_input(__G); GLOBAL(pInfo->encrypted) = TRUE; if (GLOBAL(newzip)) { /* this is first encrypted member in this zipfile */ GLOBAL(newzip) = FALSE; if (passwrd != (char *)NULL) { /* user gave password on command line */ if (!GLOBAL(key)) { if ((GLOBAL(key) = (char *)malloc(strlen(passwrd)+1)) == (char *)NULL) return PK_MEM2; strcpy(GLOBAL(key), passwrd); GLOBAL(nopwd) = TRUE; /* inhibit password prompting! */ } } else if (GLOBAL(key)) { /* get rid of previous zipfile's key */ free(GLOBAL(key)); GLOBAL(key) = (char *)NULL; } } /* if have key already, test it; else allocate memory for it */ if (GLOBAL(key)) { if (!testp(__G__ h)) return PK_COOL; /* existing password OK (else prompt for new) */ else if (GLOBAL(nopwd)) return PK_WARN; /* user indicated no more prompting */ } else if ((GLOBAL(key) = (char *)malloc(IZ_PWLEN+1)) == (char *)NULL) return PK_MEM2; /* try a few keys */ n = 0; do { r = (*G.decr_passwd)((zvoid *)&G, &n, GLOBAL(key), IZ_PWLEN+1, GLOBAL(zipfn), GLOBAL(filename)); if (r == IZ_PW_ERROR) { /* internal error in fetch of PW */ free (GLOBAL(key)); GLOBAL(key) = NULL; return PK_MEM2; } if (r != IZ_PW_ENTERED) { /* user replied "skip" or "skip all" */ *GLOBAL(key) = '\0'; /* We try the NIL password, ... */ n = 0; /* and cancel fetch for this item. */ } if (!testp(__G__ h)) return PK_COOL; if (r == IZ_PW_CANCELALL) /* User replied "Skip all" */ GLOBAL(nopwd) = TRUE; /* inhibit any further PW prompt! */ } while (n > 0); return PK_WARN; } /* end function decrypt() */ /*********************************************************************** * Test the password. Return -1 if bad, 0 if OK. */ local int testp(__G__ h) __GDEF ZCONST uch *h; { int r; char *key_translated; /* On systems with "obscure" native character coding (e.g., EBCDIC), * the first test translates the password to the "main standard" * character coding. */ #ifdef STR_TO_CP1 /* allocate buffer for translated password */ if ((key_translated = malloc(strlen(GLOBAL(key)) + 1)) == (char *)NULL) return -1; /* first try, test password translated "standard" charset */ r = testkey(__G__ h, STR_TO_CP1(key_translated, GLOBAL(key))); #else /* !STR_TO_CP1 */ /* first try, test password as supplied on the extractor's host */ r = testkey(__G__ h, GLOBAL(key)); #endif /* ?STR_TO_CP1 */ #ifdef STR_TO_CP2 if (r != 0) { #ifndef STR_TO_CP1 /* now prepare for second (and maybe third) test with translated pwd */ if ((key_translated = malloc(strlen(GLOBAL(key)) + 1)) == (char *)NULL) return -1; #endif /* second try, password translated to alternate ("standard") charset */ r = testkey(__G__ h, STR_TO_CP2(key_translated, GLOBAL(key))); #ifdef STR_TO_CP3 if (r != 0) /* third try, password translated to another "standard" charset */ r = testkey(__G__ h, STR_TO_CP3(key_translated, GLOBAL(key))); #endif #ifndef STR_TO_CP1 free(key_translated); #endif } #endif /* STR_TO_CP2 */ #ifdef STR_TO_CP1 free(key_translated); if (r != 0) { /* last resort, test password as supplied on the extractor's host */ r = testkey(__G__ h, GLOBAL(key)); } #endif /* STR_TO_CP1 */ return r; } /* end function testp() */ local int testkey(__G__ h, key) __GDEF ZCONST uch *h; /* decrypted header */ ZCONST char *key; /* decryption password to test */ { ush b; #ifdef ZIP10 ush c; #endif int n; uch *p; uch hh[RAND_HEAD_LEN]; /* decrypted header */ /* set keys and save the encrypted header */ init_keys(__G__ key); memcpy(hh, h, RAND_HEAD_LEN); /* check password */ for (n = 0; n < RAND_HEAD_LEN; n++) { zdecode(hh[n]); Trace((stdout, " %02x", hh[n])); } Trace((stdout, "\n lrec.crc= %08lx crec.crc= %08lx pInfo->ExtLocHdr= %s\n", GLOBAL(lrec.crc32), GLOBAL(pInfo->crc), GLOBAL(pInfo->ExtLocHdr) ? "true":"false")); Trace((stdout, " incnt = %d unzip offset into zipfile = %ld\n", GLOBAL(incnt), GLOBAL(cur_zipfile_bufstart)+(GLOBAL(inptr)-GLOBAL(inbuf)))); /* same test as in zipbare(): */ #ifdef ZIP10 /* check two bytes */ c = hh[RAND_HEAD_LEN-2], b = hh[RAND_HEAD_LEN-1]; Trace((stdout, " (c | (b<<8)) = %04x (crc >> 16) = %04x lrec.time = %04x\n", (ush)(c | (b<<8)), (ush)(GLOBAL(lrec.crc32) >> 16), ((ush)GLOBAL(lrec.last_mod_dos_datetime) & 0xffff)))); if ((ush)(c | (b<<8)) != (GLOBAL(pInfo->ExtLocHdr) ? ((ush)GLOBAL(lrec.last_mod_dos_datetime) & 0xffff) : (ush)(GLOBAL(lrec.crc32) >> 16))) return -1; /* bad */ #else b = hh[RAND_HEAD_LEN-1]; Trace((stdout, " b = %02x (crc >> 24) = %02x (lrec.time >> 8) = %02x\n", b, (ush)(GLOBAL(lrec.crc32) >> 24), ((ush)GLOBAL(lrec.last_mod_dos_datetime) >> 8) & 0xff)); if (b != (GLOBAL(pInfo->ExtLocHdr) ? ((ush)GLOBAL(lrec.last_mod_dos_datetime) >> 8) & 0xff : (ush)(GLOBAL(lrec.crc32) >> 24))) return -1; /* bad */ #endif /* password OK: decrypt current buffer contents before leaving */ for (n = (long)GLOBAL(incnt) > GLOBAL(csize) ? (int)GLOBAL(csize) : GLOBAL(incnt), p = GLOBAL(inptr); n--; p++) zdecode(*p); return 0; /* OK */ } /* end function testkey() */ #endif /* UNZIP && !FUNZIP */ #else /* !CRYPT */ /* something "externally visible" to shut up compiler/linker warnings */ int zcr_dummy; #endif /* ?CRYPT */ 2*[UNZIP542]CRYPT.H;1+, . / 4 - 0@123KPWO 56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crypt.h (full version) by Info-ZIP. Last revised: [see CR_VERSION_DATE] This encryption/decryption source code for Info-Zip software was originally wriS_= UNZIP.BCK  [UNZIP542]CRYPT.H;1 ,ztten in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) NOTE on copyright history: Previous versions of this source package (up to version 2.8) were not copyrighted and put in the public domain. If you cannot comply with the Info-Zip LICENSE, you may want to look for one of those public domain versions. */ #ifndef __crypt_h /* don't include more than once */ #define __crypt_h #ifdef CRYPT # undef CRYPT #endif /* Logic of selecting "full crypt" code: a) default behaviour: - dummy crypt code when used to compile Zip (because we do not distribute encrypting versions of Zip from US servers) - dummy crypt code when compiling UnZipSFX stub, to minimize size - full crypt code when used to compile UnZip and fUnZip b) USE_CRYPT defined: - always full crypt code c) NO_CRYPT defined: - never full crypt code NO_CRYPT takes precedence over USE_CRYPT */ #if defined(NO_CRYPT) # define CRYPT 0 /* dummy version */ #else #if defined(USE_CRYPT) # define CRYPT 1 /* full version */ #else #if (!defined(ZIP) && !defined(SFX)) # define CRYPT 1 /* full version */ #else # define CRYPT 0 /* dummy version */ #endif #endif /* ?USE_CRYPT */ #endif /* ?NO_CRYPT */ #if CRYPT /* full version */ #ifdef CR_BETA # undef CR_BETA /* this is not a beta release */ #endif #define CR_MAJORVER 2 #define CR_MINORVER 9 #ifdef CR_BETA # define CR_BETA_VER "a BETA" # define CR_VERSION_DATE "05 May 2000" /* last real code change */ #else # define CR_BETA_VER "" # define CR_VERSION_DATE "05 May 2000" /* last public release date */ # define CR_RELEASE #endif #ifndef __G /* UnZip only, for now (DLL stuff) */ # define __G # define __G__ # define __GDEF # define __GPRO void # define __GPRO__ #endif #if defined(MSDOS) || defined(OS2) || defined(WIN32) # ifndef DOS_OS2_W32 # define DOS_OS2_W32 # endif #endif #if defined(DOS_OS2_W32) || defined(__human68k__) # ifndef DOS_H68_OS2_W32 # define DOS_H68_OS2_W32 # endif #endif #if defined(VM_CMS) || defined(MVS) # ifndef CMS_MVS # define CMS_MVS # endif #endif /* To allow combining of Zip and UnZip static libraries in a single binary, * the Zip and UnZip versions of the crypt core functions have to be named * differently. */ #ifdef ZIP # ifdef REALLY_SHORT_SYMS # define decrypt_byte zdcrby # else # define decrypt_byte zp_decrypt_byte # endif # define update_keys zp_update_keys # define init_keys zp_init_keys #else /* !ZIP */ # ifdef REALLY_SHORT_SYMS # define decrypt_byte dcrbyt # endif #endif /* ?ZIP */ #define IZ_PWLEN 80 /* input buffer size for reading encryption key */ #ifndef PWLEN /* for compatibility with previous zcrypt release... */ # define PWLEN IZ_PWLEN #endif #define RAND_HEAD_LEN 12 /* length of encryption random header */ /* the crc_32_tab array has to be provided externally for the crypt calculus */ #ifndef CRC_32_TAB /* UnZip provides this in globals.h */ # if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) extern ZCONST ulg near *crc_32_tab; # else extern ZCONST ulg Far *crc_32_tab; # endif #endif /* !CRC_32_TAB */ /* encode byte c, using temp t. Warning: c must not have side effects. */ #define zencode(c,t) (t=decrypt_byte(__G), update_keys(c), t^(c)) /* decode byte c in place */ #define zdecode(c) update_keys(__G__ c ^= decrypt_byte(__G)) int decrypt_byte OF((__GPRO)); int update_keys OF((__GPRO__ int c)); void init_keys OF((__GPRO__ ZCONST char *passwd)); #ifdef ZIP void crypthead OF((ZCONST char *, ulg, FILE *)); # ifdef UTIL int zipcloak OF((struct zlist far *, FILE *, FILE *, ZCONST char *)); int zipbare OF((struct zlist far *, FILE *, FILE *, ZCONST char *)); # else unsigned zfwrite OF((zvoid *, extent, extent, FILE *)); extern char *key; # endif #endif /* ZIP */ #if (defined(UNZIP) && !defined(FUNZIP)) int decrypt OF((__GPRO__ ZCONST char *passwrd)); #endif #ifdef FUNZIP extern int encrypted; # ifdef NEXTBYTE # undef NEXTBYTE # endif # define NEXTBYTE \ (encrypted? update_keys(__G__ getc(G.in)^decrypt_byte(__G)) : getc(G.in)) #endif /* FUNZIP */ #else /* !CRYPT */ /* dummy version */ #define zencode #define zdecode #define zfwrite fwrite #endif /* ?CRYPT */ #endif /* !__crypt_h */ i*[UNZIP542]EBCDIC.H;1+, ./ 4- 0@123KPWO56#7#89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- ebcdic.h The CECP 1047 (Extended de-facto EBCDIC) <-> ISO 8859-1 conversion tables, from ftp://aix1.segi.ulg.ac.be/pub/docs/iso8859/iso8859.networking NOTES: (OS/390 port 12/97) These table no longer represent the standard mappings (for example in the OS/390 iconv utility). In order to follow current standards I remapped ebcdic x0a to ascii x15 and ebcdic x85 to ascii x25 (and vice-versa) Without these changes, newlines in auto-convert text files appeared as literal \045. I'm not sure what effect this remap would have on the MVS and CMS ports, so I ifdef'd these changes. Hopefully these ifdef's can be removed when the MVS/CMS folks test the new mappings. Christian Spieler , 27-Apr-1998 The problem mentioned by Paul von Behren was already observed previously on VM/CMS, during the preparation of the CMS&MVS port of UnZip 5.20 in 1996. At that point, the ebcdic tables were not changed since they seemed to be an adopted standard (to my knowledge, these tables are still used as presented in mainfraime KERMIT). Instead, the "end-of-line" conversion feature of Zip's and UnZip's "text-translation" mode was used to force correct mappings between ASCII and EBCDIC newline markers. Before interchanging the ASCII mappings of the EBCDIC control characters "NL" 0x25 and "LF" 0x15 according to the OS/390 setting, we have to make sure that EBCDIC 0x15 is never used as line termination. ---------------------------------------------------------------------------*/ #ifndef __ebcdic_h /* prevent multiple inclusions */ #define __ebcdic_h #ifndef ZCONST # define ZCONST const #endif #ifdef EBCDIC #ifndef MTS /* MTS uses a slightly "special" EBCDIC code page */ ZCONST uch ebcdic[] = { 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */ #ifdef OS390 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ #else 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ #endif 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0xTƣ/ UNZIP.BCK  [UNZIP542]EBCDIC.H;1 #26, /* 10 - 17 */ 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */ 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */ 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */ 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */ 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */ 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */ 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, /* 58 - 5F */ 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */ 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */ 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */ 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */ #ifdef OS390 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, /* 80 - 87 */ #else 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */ #endif 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */ 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */ 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */ 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */ 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC, /* A8 - AF */ 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */ 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */ 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */ 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */ 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */ 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59, /* D8 - DF */ 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */ 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */ 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */ 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */ }; #if (defined(ZIP) || CRYPT) ZCONST uch ascii[] = { 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */ 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ #ifdef OS390 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, /* 10 - 17 */ #else 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */ #endif 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ #ifdef OS390 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, /* 20 - 27 */ #else 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */ #endif 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */ 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37 */ 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, /* 38 - 3F */ 0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, /* 40 - 47 */ 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, /* 48 - 4F */ 0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, /* 50 - 57 */ 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, /* 58 - 5F */ 0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, /* 60 - 67 */ 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, /* 68 - 6F */ 0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, /* 70 - 77 */ 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, /* 78 - 7F */ 0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80 - 87 */ 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, /* 88 - 8F */ 0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, /* 90 - 97 */ 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, /* 98 - 9F */ 0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* A0 - A7 */ 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE, /* A8 - AF */ 0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, /* B0 - B7 */ 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7, /* B8 - BF */ 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* C0 - C7 */ 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */ 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */ 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */ 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */ 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */ 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */ }; #endif /* ZIP || CRYPT */ #else /* MTS */ /* * This is the MTS ASCII->EBCDIC translation table. It provides a 1-1 * translation from ISO 8859/1 8-bit ASCII to IBM Code Page 37 EBCDIC. */ ZCONST uch ebcdic[] = { 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */ 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, /* 10 - 17 */ 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */ 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */ 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */ 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */ 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */ 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */ 0xE7, 0xE8, 0xE9, 0xBA, 0xE0, 0xBB, 0xB0, 0x6D, /* 58 - 5F */ 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */ 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */ 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */ 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */ 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */ 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */ 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */ 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */ 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */ 0xBD, 0xB4, 0x9A, 0x8A, 0x5F, 0xCA, 0xAF, 0xBC, /* A8 - AF */ 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */ 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */ 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */ 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */ 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */ 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xAD, 0xAE, 0x59, /* D8 - DF */ 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */ 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */ 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */ 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */ }; #if (defined(ZIP) || CRYPT) ZCONST uch ascii[] = { 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */ 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */ 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */ 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */ 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37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, 0x45, 0x46, 0x47, /* C0 - C7 */ 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */ 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */ 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */ 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */ 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */ 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */ }; #endif /* ZIP || CRYPT */ #endif /* ?MTS */ #endif /* EBCDIC */ /*--------------------------------------------------------------------------- The following conversion tables translate between IBM PC CP 850 (OEM codepage) and the "Western Europe & America" Windows codepage 1252. The Windows codepage 1252 contains the ISO 8859-1 "Latin 1" codepage, with some additional printable characters in the range (0x80 - 0x9F), that is reserved to control codes in the ISO 8859-1 character table. The ISO <--> OEM conversion tables were constructed with the help of the WIN32 (Win16?) API's OemToAnsi() and AnsiToOem() conversion functions and have been checked against the CP850 and LATIN1 tables provided in the MS-Kermit 3.14 distribution. ---------------------------------------------------------------------------*/ #ifdef IZ_ISO2OEM_ARRAY ZCONST uch Far iso2oem[] = { 0x3F, 0x3F, 0x27, 0x9F, 0x22, 0x2E, 0xC5, 0xCE, /* 80 - 87 */ 0x5E, 0x25, 0x53, 0x3C, 0x4F, 0x3F, 0x3F, 0x3F, /* 88 - 8F */ 0x3F, 0x27, 0x27, 0x22, 0x22, 0x07, 0x2D, 0x2D, /* 90 - 97 */ 0x7E, 0x54, 0x73, 0x3E, 0x6F, 0x3F, 0x3F, 0x59, /* 98 - 9F */ 0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD,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xBC, 0xA1, 0xAB, 0xBB, /* A8 - AF */ 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xC1, 0xC2, 0xC0, /* B0 - B7 */ 0xA9, 0xA6, 0xA6, 0x2B, 0x2B, 0xA2, 0xA5, 0x2B, /* B8 - BF */ 0x2B, 0x2D, 0x2D, 0x2B, 0x2D, 0x2B, 0xE3, 0xC3, /* C0 - C7 */ 0x2B, 0x2B, 0x2D, 0x2D, 0xA6, 0x2D, 0x2B, 0xA4, /* C8 - CF */ 0xF0, 0xD0, 0xCA, 0xCB, 0xC8, 0x69, 0xCD, 0xCE, /* D0 - D7 */ 0xCF, 0x2B, 0x2B, 0xA6, 0x5F, 0xA6, 0xCC, 0xAF, /* D8 - DF */ 0xD3, 0xDF, 0xD4, 0xD2, 0xF5, 0xD5, 0xB5, 0xFE, /* E0 - E7 */ 0xDE, 0xDA, 0xDB, 0xD9, 0xFD, 0xDD, 0xAF, 0xB4, /* E8 - EF */ 0xAD, 0xB1, 0x3D, 0xBE, 0xB6, 0xA7, 0xF7, 0xB8, /* F0 - F7 */ 0xB0, 0xA8, 0xB7, 0xB9, 0xB3, 0xB2, 0xA6, 0xA0 /* F8 - FF */ }; #endif /* IZ_OEM2ISO_ARRAY */ #if defined(THEOS) || defined(THEOS_SUPPORT) # include "theos/charconv.h" #endif #endif /* __ebcdic_h */ *[UNZIP542]ENVARGS.C;1+, ./ 4- 0@123KPWO56s 7s 89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*----------------------------------------------------------------* | envargs - add default options from environment to command line |---------------------------------------------------------------- | Author: Bill Davidsen, original 10/13/91, revised 23 Oct 1991. | This program is in the public domain. |---------------------------------------------------------------- | Minor program notes: | 1. Yes, the indirection is a tad complex | 2. Parentheses were added where not needed in some cases | to make the action of the code less obscure. |---------------------------------------------------------------- | UnZip notes: 24 May 92 ("v1.4"): | 1. #include "unzip.h" for prototypes (24 May 92) | 2. changed ch to type char (24 May 92) | 3. added an ifdef to avoid Borland warnings (24 May 92) | 4. included Rich Wales' mksargs() routine (for MS-DOS, maybe | OS/2? NT?) (4 Dec 93) | 5. added alternate-variable string envstr2 (21 Apr 94) | 6. added support for quoted arguments (6 Jul 96) *----------------------------------------------------------------*/ #define __ENVARGS_C /* identifies this source module */ #define UNZIP_INTERNAL #include "unzip.h" #ifdef __EMX__ /* emx isspace() returns TRUE on extended ASCII !! */ # define ISspace(c) ((c) & 0x80 ? 0 : isspace((unsigned)c)) #else # define ISspace(c) isspace((unsigned)c) #endif /* ?__EMX__ */ static int count_args OF((ZCONST char *)); /* envargs() returns PK-style error code */ int envargs(Pargc, Pargv, envstr, envstr2) int *Pargc; char ***Pargv; ZCONST char *envstr, *envstr2; { #ifndef RISCOS char *getenv(); #endif char *envptr; /* value returned by getenv */ char *bufptr; /* copy of env info */ int argc = 0; /* internal arg count */ register int ch; /* spare temp value */ char **argv; /* internal arg vector */ char **argvect; /* copy of vector address */ /* see if anything in the environment */ if ((envptr = getenv(envstr)) != (char *)NULL) /* usual var */ while (ISspace(*envptr)) /* must discard leading spaces */ envptr++; if (envptr == (char *)NULL || *envptVk UNZIP.BCK  [UNZIP542]ENVARGS.C;1r == '\0') if ((envptr = getenv(envstr2)) != (char *)NULL) /* alternate var */ while (ISspace(*envptr)) envptr++; if (envptr == (char *)NULL || *envptr == '\0') return PK_OK; bufptr = malloc(1 + strlen(envptr)); if (bufptr == (char *)NULL) return PK_MEM; #if (defined(WIN32) || defined(WINDLL)) # ifdef WIN32 if (IsWinNT()) { /* SPC: don't know codepage of 'real' WinNT console */ strcpy(bufptr, envptr); } else { /* Win95 environment is DOS and uses OEM character coding */ OEM_TO_INTERN(envptr, bufptr); } # else /* !WIN32 */ /* DOS environment uses OEM codepage */ OEM_TO_INTERN(envptr, bufptr); # endif #else /* !(WIN32 || WINDLL) */ strcpy(bufptr, envptr); #endif /* ?(WIN32 || WINDLL) */ /* count the args so we can allocate room for them */ argc = count_args(bufptr); /* allocate a vector large enough for all args */ argv = (char **)malloc((argc + *Pargc + 1) * sizeof(char *)); if (argv == (char **)NULL) { free(bufptr); return PK_MEM; } argvect = argv; /* copy the program name first, that's always true */ *(argv++) = *((*Pargv)++); /* copy the environment args next, may be changed */ do { #if defined(AMIGA) || defined(UNIX) if (*bufptr == '"') { char *argstart = ++bufptr; *(argv++) = argstart; for (ch = *bufptr; ch != '\0' && ch != '\"'; ch = *PREINCSTR(bufptr)) if (ch == '\\' && bufptr[1] != '\0') ++bufptr; /* advance to char after backslash */ if (ch != '\0') *(bufptr++) = '\0'; /* overwrite trailing " */ /* remove escape characters */ while ((argstart = MBSCHR(argstart, '\\')) != (char *)NULL) { strcpy(argstart, argstart + 1); if (*argstart) ++argstart; } } else { *(argv++) = bufptr; while ((ch = *bufptr) != '\0' && !ISspace(ch)) INCSTR(bufptr); if (ch != '\0') *(bufptr++) = '\0'; } #else #ifdef DOS_FLX_NLM_OS2_W32 /* we do not support backslash-quoting of quotes in quoted * strings under DOS_FLX_NLM_OS2_W32, because backslashes are * directory separators and double quotes are illegal in filenames */ if (*bufptr == '"') { *(argv++) = ++bufptr; while ((ch = *bufptr) != '\0' && ch != '\"') INCSTR(bufptr); if (ch != '\0') *(bufptr++) = '\0'; } else { *(argv++) = bufptr; while ((ch = *bufptr) != '\0' && !ISspace(ch)) INCSTR(bufptr); if (ch != '\0') *(bufptr++) = '\0'; } #else *(argv++) = bufptr; while ((ch = *bufptr) != '\0' && !ISspace(ch)) INCSTR(bufptr); if (ch != '\0') *(bufptr++) = '\0'; #endif /* ?DOS_FLX_NLM_OS2_W32 */ #endif /* ?(AMIGA || UNIX) */ while ((ch = *bufptr) != '\0' && ISspace(ch)) INCSTR(bufptr); } while (ch); /* now save old argc and copy in the old args */ argc += *Pargc; while (--(*Pargc)) *(argv++) = *((*Pargv)++); /* finally, add a NULL after the last arg, like Unix */ *argv = (char *)NULL; /* save the values and return, indicating succes */ *Pargv = argvect; *Pargc = argc; return PK_OK; } static int count_args(s) ZCONST char *s; { int count = 0; char ch; do { /* count and skip args */ ++count; #if defined(AMIGA) || defined(UNIX) if (*s == '\"') { for (ch = *PREINCSTR(s); ch != '\0' && ch != '\"'; ch = *PREINCSTR(s)) if (ch == '\\' && s[1] != '\0') ++s; if (*s) ++s; /* trailing quote */ } else #else #ifdef DOS_FLX_NLM_OS2_W32 if (*s == '\"') { ++s; /* leading quote */ while ((ch = *s) != '\0' && ch != '\"') INCSTR(s); if (*s) ++s; /* trailing quote */ } else #endif /* DOS_FLX_NLM_OS2_W32 */ #endif /* ?(AMIGA || UNIX) */ while ((ch = *s) != '\0' && !ISspace(ch)) /* note else-clauses above */ INCSTR(s); while ((ch = *s) != '\0' && ISspace(ch)) INCSTR(s); } while (ch); return count; } #ifdef TEST int main(argc, argv) int argc; char **argv; { int err; printf("Orig argv: %p\n", argv); dump_args(argc, argv); if ((err = envargs(&argc, &argv, "ENVTEST")) != PK_OK) { perror("envargs: cannot get memory for arguments"); EXIT(err); } printf(" New argv: %p\n", argv); dump_args(argc, argv); } void dump_args(argc, argv) int argc; char *argv[]; { int i; printf("\nDump %d args:\n", argc); for (i = 0; i < argc; ++i) printf("%3d %s\n", i, argv[i]); } #endif /* TEST */ #ifdef MSDOS /* DOS_OS2? DOS_OS2_W32? */ /* * void mksargs(int *argcp, char ***argvp) * * Substitutes the extended command line argument list produced by * the MKS Korn Shell in place of the command line info from DOS. * * The MKS shell gets around DOS's 128-byte limit on the length of * a command line by passing the "real" command line in the envi- * ronment. The "real" arguments are flagged by prepending a tilde * (~) to each one. * * This "mksargs" routine creates a new argument list by scanning * the environment from the beginning, looking for strings begin- * ning with a tilde character. The new list replaces the original * "argv" (pointed to by "argvp"), and the number of arguments * in the new list replaces the original "argc" (pointed to by * "argcp"). * * Rich Wales */ void mksargs(argcp, argvp) int *argcp; char ***argvp; { #ifndef MSC /* declared differently in MSC 7.0 headers, at least */ #ifndef __WATCOMC__ extern char **environ; /* environment */ #endif #endif char **envp; /* pointer into environment */ char **newargv; /* new argument list */ char **argp; /* pointer into new arg list */ int newargc; /* new argument count */ /* sanity check */ if (environ == NULL || argcp == NULL || argvp == NULL || *argvp == NULL) return; /* find out how many environment arguments there are */ for (envp = environ, newargc = 0; *envp != NULL && (*envp)[0] == '~'; envp++, newargc++) ; if (newargc == 0) return; /* no environment arguments */ /* set up new argument list */ newargv = (char **) malloc(sizeof(char **) * (newargc+1)); if (newargv == NULL) return; /* malloc failed */ for (argp = newargv, envp = environ; *envp != NULL && (*envp)[0] == '~'; *argp++ = &(*envp++)[1]) ; *argp = NULL; /* null-terminate the list */ /* substitute new argument list in place of old one */ *argcp = newargc; *argvp = newargv; } #endif /* MSDOS */ W1 UNZIP.BCK  [UNZIP542]EXPLODE.C;1@*[UNZIP542]EXPLODE.C;1+, .@/ 4@@- 0@123KPWOA56j:a7j:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* explode.c -- by Mark Adler version c15, 6 July 1996 */ /* Copyright history: - Starting with UnZip 5.41 of 16-April-2000, this source file is covered by the Info-Zip LICENSE cited above. - Prior versions of this source file, found in UnZip source packages up to UnZip 5.40, were put in the public domain. The original copyright note by Mark Adler was: "You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you." History: vers date who what ---- --------- -------------- ------------------------------------ c1 30 Mar 92 M. Adler explode that uses huft_build from inflate (this gives over a 70% speed improvement over the original unimplode.c, which decoded a bit at a time) c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. c3 10 Apr 92 M. Adler added a little memory tracking if DEBUG c4 11 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy() c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing the 32K window size for specialized applications. c6 31 May 92 M. Adler added typecasts to eliminate some warnings c7 27 Jun 92 G. Roelofs added more typecasts. c8 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch. c9 19 Jul 93 J. Bush added more typecasts (to return values); made l[256] array static for Amiga. c10 8 Oct 93 G. Roelofs added used_csize for diagnostics; added buf and unshrink arguments to flush(); undef'd various macros at end for Turbo C; removed NEXTBYTE macro (now in unzip.h) and bytebuf variable (not used); changed memset() to memzero(). c11 9 Jan 94 M. Adler fixed incorrect used_csize calculation. c12 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines to avoid bug in Encore compiler. c13 25 Aug 94 M. Adler fixed distance-length comment (orig c9 fix) c14 22 Nov 95 S. Maxwell removed unnecessary "static" on auto array c15 6 Jul 96 W. Haidinger added ulg typecasts to flush() calls. c16 8 Feb 98 C. Spieler added ZCONST modifiers to const tables and #ifdef DEBUG around debugging code. c16b 25 Mar 98 C. Spieler modified DLL code for slide redirection. c16d 05 Jul 99 C. Spieler take care of flush() return values and stop processing in case of errors */ /* Explode imploded (PKZIP method 6 compressed) data. This compression method searches for as much of the current string of bytes (up to a length of ~320) in the previous 4K or 8K bytes. If it doesn't find any matches (of at least length 2 or 3), it codes the next byte. Otherwise, it codes the length of the matched string and its distance backwards from the current position. Single bytes ("literals") are preceded by a one (a single bit) and are either uncoded (the eight bits go directly into the compressed stream for a total of nine bits) or Huffman coded with a supplied literal code tree. If literals are coded, then the minimum match length is three, otherwise it is two. There are therefore four kinds of imploded streams: 8K search with coded literals (min match = 3), 4K search with coded literals (min match = 3), 8K with uncoded literals (min match = 2), and 4K with uncoded literals (min match = 2). The kind of stream is identified in two bits of a general purpose bit flag that is outside of the compressed stream. Distance-length pairs for matched strings are preceded by a zero bit (to distinguish them from literals) and are always coded. The distance comes first and is either the low six (4K) or low seven (8K) bits of the distance (uncoded), followed by the high six bits of the distance coded. Then the length is six bits coded (0..63 + min match length), and if the maximum such length is coded, then it's followed by another eight bits (uncoded) to be added to the coded length. This gives a match length range of 2..320 or 3..321 bytes. The literal, length, and distance codes are all represented in a slightly compressed form themselves. What is sent are the lengths of the codes for each value, which is sufficient to construct the codes. Each byte of the code representation is the code length (the low four bits representing 1..16), and the number of values sequentially with that length (the high four bits also representing 1..16). There are 256 literal code values (if literals are coded), 64 length code values, and 64 distance code values, in that order at the beginning of the compressed stream. Each set of code values is preceded (redundantly) with a byte indicating how many bytes are in the code description that follows, in the range 1..256. The codes themselves are decoded using tables made by huft_build() from the bit lengths. That routine and its comments are in the inflate.c module. */ #define __EXPLODE_C /* identifies this source module */ #define UNZIP_INTERNAL #include "unzip.h" /* must supply slide[] (uch) array and NEXTBYTE macro */ #ifndef WSIZE # define WSIZE 0x8000 /* window size--must be a power of two, and */ #endif /* at least 8K for zip's implode method */ #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) # define wsize G._wsize #else # define wsize WSIZE #endif /* routines here */ static int get_tree OF((__GPRO__ unsigned *l, unsigned n)); static int explode_lit8 OF((__GPRO__ struct huft *tb, struct huft *tl, struct huft *td, int bb, int bl, int bd)); static int explode_lit4 OF((__GPRO__ struct huft *tb, struct huft *tl, struct huft *td, int bb, int bl, int bd)); static int explode_nolit8 OF((__GPRO__ struct huft *tl, struct huft *td, int bl, int bd)); static int explode_nolit4 OF((__GPRO__ struct huft *tl, struct huft *td, int bl, int bd)); int explode OF((__GPRO)); /* The implode algorithm uses a sliding 4K or 8K byte window on the uncompressed streX!u # opx 1Mv8E{rM-"hA+Pl~j#*vYa*i7:Jm]QM"DIeje\C}CsOcxN6`RJqujcyue*]U0fS\ fVN'>rwJ[;6_S JG.br!%zlG!QkD 7p~#zfe~x|Y~h!7 p5L-o9Bzff`of'SYM.&1We0TT)[*s%dOVj2}M`Kkm)f21S'`\'$C3T:V%Ll;U/XQq%@wd|Dh1s)k>hth -Q@7d~qplo:"B|e TB9JD{03!I"{DB;MkXSTXY!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Zx-s$$ J6In&Ix>bTZb+OU *0?I$0Xb{#b"{wME/'ck:aVM -'A="\Qi Xdj0)g2aolTy3"mOO >_q21]v%[Z&FFW8EuYkhhx'JjS APMz8 m\| pbOJJR$Jv9'ZZ>|y$/' NywBjjL.P-XUS0]N  }V*K*^`$8r Ct dy"b| NXB ._;[0r]5O aT*i.?:a9 7vl}%u57v.<vp.Tn2djln QG[CE>,=+ )=*P]75t2?$a6,R51-~X#l}` e91j>=(n);k-=(n);} static int get_tree(__G__ l, n) __GDEF unsigned *l; /* bit lengths */ unsigned n; /* number expected */ /* Get the bit lengths for a code representation from the compressed stream. If get_tree() returns 4, then there is an error in the data. Otherwise zero is returned. */ { unsigned i; /* bytes remaining in list */ unsigned k; /* lengths entered */ unsigned j; /* number of codes */ unsigned b; /* bit length for those codes */ /* get bit lengths */ i = NEXTBYTE + 1; /* length/count pairs to read */ k = 0; /* next code */ do { b = ((j = NEXTBYTE) & 0xf) + 1; /* bits in code (1..16) */ j = ((j & 0xf0) >> 4) + 1; /* codes with those bits (1..16) */ if (k + j > n) return 4; /* don't overflow l[] */ do { l[k++] = b; } while (--j); } while (--i); return k != n ? 4 : 0; /* should have read n of them */ } static int explode_lit8(__G__ tb, tl, td, bb, bl, bd) __GDEF struct huft *tb, *tl, *td; /* literal, length, and distance tables */ int bb, bl, bd; /* number of bits decoded by those */ /* Decompress the imploded data using coded literals and an 8K sliding window. */ { ulg s; /* bytes to decompress */ register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ unsigned u; /* true if unflushed */ int retval = 0; /* error code returned: initialized to "no error" */ /* explode the coded data */ b = k = w = 0; /* initialize bit buffer, window */ u = 1; /* buffer unflushed */ mb = mask_bits[bb]; /* precompute masks for speed */ ml = mask_bits[bl]; md = mask_bits[bd]; s = G.lrec.ucsize; while (s > 0) /* do until ucsize bytes uncompressed */ { NEEDBITS(1) if (b & 1) /* then literal--decode it */ { DUMPBITS(1) s--; NEEDBITS((unsigned)bb) /* get coded literal */ if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) redirSlide[w++] = (uch)t->v.n; if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } else /* else distance/length */ { DUMPBITS(1) NEEDBITS(7) /* get distance low bits */ d = (unsigned)b & 0x7f; DUMPBITS(7) NEEDBITS((unsigned)bd) /* get coded distance high bits */ if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) d = w - d - t->v.n; /* construct offset */ NEEDBITS((unsigned)bl) /* get coded length */ if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) n = t->v.n; if (e) /* get length extra bits */ { NEEDBITS(8) n += (unsigned)b & 0xff; DUMPBITS(8) } /* do the copy */ s = (s > (ulg)n ? s - (ulg)n : 0); do { #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) { /* &= w/ wsize not needed and wrong if redirect */ if (d >= wsize) return 1; n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); } else #endif n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); if (u && w <= d) { memzero(redirSlide + w, e); w += e; d += e; } else #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); Zj ( UNZIP.BCK  [UNZIP542]EXPLODE.C;1@ w += e; d += e; } else /* do it slow to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } while (n); } } /* flush out redirSlide */ if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ { /* sometimes read one too many: k>>3 compensates */ G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); return 5; } return 0; } static int explode_lit4(__G__ tb, tl, td, bb, bl, bd) __GDEF struct huft *tb, *tl, *td; /* literal, length, and distance tables */ int bb, bl, bd; /* number of bits decoded by those */ /* Decompress the imploded data using coded literals and a 4K sliding window. */ { ulg s; /* bytes to decompress */ register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ unsigned u; /* true if unflushed */ int retval = 0; /* error code returned: initialized to "no error" */ /* explode the coded data */ b = k = w = 0; /* initialize bit buffer, window */ u = 1; /* buffer unflushed */ mb = mask_bits[bb]; /* precompute masks for speed */ ml = mask_bits[bl]; md = mask_bits[bd]; s = G.lrec.ucsize; while (s > 0) /* do until ucsize bytes uncompressed */ { NEEDBITS(1) if (b & 1) /* then literal--decode it */ { DUMPBITS(1) s--; NEEDBITS((unsigned)bb) /* get coded literal */ if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) redirSlide[w++] = (uch)t->v.n; if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } else /* else distance/length */ { DUMPBITS(1) NEEDBITS(6) /* get distance low bits */ d = (unsigned)b & 0x3f; DUMPBITS(6) NEEDBITS((unsigned)bd) /* get coded distance high bits */ if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) d = w - d - t->v.n; /* construct offset */ NEEDBITS((unsigned)bl) /* get coded length */ if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) n = t->v.n; if (e) /* get length extra bits */ { NEEDBITS(8) n += (unsigned)b & 0xff; DUMPBITS(8) } /* do the copy */ s = (s > (ulg)n ? s - (ulg)n : 0); do { #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) { /* &= w/ wsize not needed and wrong if redirect */ if (d >= wsize) return 1; n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); } else #endif n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); if (u && w <= d) { memzero(redirSlide + w, e); w += e; d += e; } else #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); w += e; d += e; } else /* do it slow to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } while (n); } } /* flush out redirSlide */ if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ { /* sometimes read one too many: k>>3 compensates */ G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); return 5; } return 0; } static int explode_nolit8(__G__ tl, td, bl, bd) __GDEF struct huft *tl, *td; /* length and distance decoder tables */ int bl, bd; /* number of bits decoded by tl[] and td[] */ /* Decompress the imploded data using uncoded literals and an 8K sliding window. */ { ulg s; /* bytes to decompress */ register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned ml, md; /* masks for bl and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ unsigned u; /* true if unflushed */ int retval = 0; /* error code returned: initialized to "no error" */ /* explode the coded data */ b = k = w = 0; /* initialize bit buffer, window */ u = 1; /* buffer unflushed */ ml = mask_bits[bl]; /* precompute masks for speed */ md = mask_bits[bd]; s = G.lrec.ucsize; while (s > 0) /* do until ucsize bytes uncompressed */ { NEEDBITS(1) if (b & 1) /* then literal--get eight bits */ { DUMPBITS(1) s--; NEEDBITS(8) redirSlide[w++] = (uch)b; if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } DUMPBITS(8) } else /* else distance/length */ { DUMPBITS(1) NEEDBITS(7) /* get distance low bits */ d = (unsigned)b & 0x7f; DUMPBITS(7) NEEDBITS((unsigned)bd) /* get coded distance high bits */ if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) d = w - d - t->v.n; /* construct offset */ NEEDBITS((unsigned)bl) /* get coded length */ if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & m[<= UNZIP.BCK  [UNZIP542]EXPLODE.C;1@|-ask_bits[e]))->e) > 16); DUMPBITS(t->b) n = t->v.n; if (e) /* get length extra bits */ { NEEDBITS(8) n += (unsigned)b & 0xff; DUMPBITS(8) } /* do the copy */ s = (s > (ulg)n ? s - (ulg)n : 0); do { #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) { /* &= w/ wsize not needed and wrong if redirect */ if (d >= wsize) return 1; n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); } else #endif n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); if (u && w <= d) { memzero(redirSlide + w, e); w += e; d += e; } else #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); w += e; d += e; } else /* do it slow to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } while (n); } } /* flush out redirSlide */ if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ { /* sometimes read one too many: k>>3 compensates */ G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); return 5; } return 0; } static int explode_nolit4(__G__ tl, td, bl, bd) __GDEF struct huft *tl, *td; /* length and distance decoder tables */ int bl, bd; /* number of bits decoded by tl[] and td[] */ /* Decompress the imploded data using uncoded literals and a 4K sliding window. */ { ulg s; /* bytes to decompress */ register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned ml, md; /* masks for bl and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ unsigned u; /* true if unflushed */ int retval = 0; /* error code returned: initialized to "no error" */ /* explode the coded data */ b = k = w = 0; /* initialize bit buffer, window */ u = 1; /* buffer unflushed */ ml = mask_bits[bl]; /* precompute masks for speed */ md = mask_bits[bd]; s = G.lrec.ucsize; while (s > 0) /* do until ucsize bytes uncompressed */ { NEEDBITS(1) if (b & 1) /* then literal--get eight bits */ { DUMPBITS(1) s--; NEEDBITS(8) redirSlide[w++] = (uch)b; if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } DUMPBITS(8) } else /* else distance/length */ { DUMPBITS(1) NEEDBITS(6) /* get distance low bits */ d = (unsigned)b & 0x3f; DUMPBITS(6) NEEDBITS((unsigned)bd) /* get coded distance high bits */ if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) d = w - d - t->v.n; /* construct offset */ NEEDBITS((unsigned)bl) /* get coded length */ if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); DUMPBITS(t->b) n = t->v.n; if (e) /* get length extra bits */ { NEEDBITS(8) n += (unsigned)b & 0xff; DUMPBITS(8) } /* do the copy */ s = (s > (ulg)n ? s - (ulg)n : 0); do { #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) { /* &= w/ wsize not needed and wrong if redirect */ if (d >= wsize) return 1; n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); } else #endif n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); if (u && w <= d) { memzero(redirSlide + w, e); w += e; d += e; } else #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); w += e; d += e; } else /* do it slow to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; w = u = 0; } } while (n); } } /* flush out redirSlide */ if ((retval = flush(__G__ redirSlide, (ulg)w, 0)) != 0) return retval; if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ { /* sometimes read one too many: k>>3 compensates */ G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); return 5; } return 0; } int explode(__G) __GDEF /* Explode an imploded compressed stream. Based on the general purpose bit flag, decide on coded or uncoded literals, and an 8K or 4K sliding window. Construct the literal (if any), length, and distance codes and the tables needed to decode them (using huft_build() from inflate.c), and call the appropriate routine for the type of data in the remainder of the stream. The four routines are nearly identical, differing only in whether the literal is decoded or simply read in, and in how many bits are read in, uncoded, for the low distance bits. */ { unsigned r; /* return codes */ struct huft *tb; /* literal code table */ struct huft *tl; /* length code table */ struct huft *td; /* distance code table */ int bb; /* bits for tb */ int bl; /* bits for tl */ int bd; /* bits for td */ unsigned l[256]; /* bit lengths for codes */ #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) wsize = G.redirect_size, redirSlide = G.redirect_buffer; else wsize = WSIZE, redirSlide = slide; #endif /* Tune base table sizes. Note: I thought that to truly optimize speed, I would have to select different bl, bd, and bb values for different compressed file sizes. I was surprised to find out that the values of 7, 7, and 9 worked best over a very wide range of sizes, except that bd = 8 worked marginally better for large compressed sizes. */ bl = 7; bd = (G.csize + G.incnt) > 200000L ? 8 : 7; /* With literal tree--minimum match length is 3 */ #ifdef DEBUG G.hufts = 0; /* initialize huft's malloc'ed */ #endif if (G.lrec.general_purpose_bit_flag & 4) { bb = 9; /* base ta\AƔ UNZIP.BCK  [UNZIP542]EXPLODE.C;1@ <ble size for literals */ if ((r = get_tree(__G__ l, 256)) != 0) return (int)r; if ((r = huft_build(__G__ l, 256, 256, NULL, NULL, &tb, &bb)) != 0) { if (r == 1) huft_free(tb); return (int)r; } if ((r = get_tree(__G__ l, 64)) != 0) return (int)r; if ((r = huft_build(__G__ l, 64, 0, cplen3, extra, &tl, &bl)) != 0) { if (r == 1) huft_free(tl); huft_free(tb); return (int)r; } if ((r = get_tree(__G__ l, 64)) != 0) return (int)r; if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ { if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) { if (r == 1) huft_free(td); huft_free(tl); huft_free(tb); return (int)r; } r = explode_lit8(__G__ tb, tl, td, bb, bl, bd); } else /* else 4K */ { if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) { if (r == 1) huft_free(td); huft_free(tl); huft_free(tb); return (int)r; } r = explode_lit4(__G__ tb, tl, td, bb, bl, bd); } huft_free(td); huft_free(tl); huft_free(tb); } else /* No literal tree--minimum match length is 2 */ { if ((r = get_tree(__G__ l, 64)) != 0) return (int)r; if ((r = huft_build(__G__ l, 64, 0, cplen2, extra, &tl, &bl)) != 0) { if (r == 1) huft_free(tl); return (int)r; } if ((r = get_tree(__G__ l, 64)) != 0) return (int)r; if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ { if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) { if (r == 1) huft_free(td); huft_free(tl); return (int)r; } r = explode_nolit8(__G__ tl, td, bl, bd); } else /* else 4K */ { if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) { if (r == 1) huft_free(td); huft_free(tl); return (int)r; } r = explode_nolit4(__G__ tl, td, bl, bd); } huft_free(td); huft_free(tl); } Trace((stderr, "<%u > ", G.hufts)); return (int)r; } /* so explode.c and inflate.c can be compiled together into one object: */ #undef NEXTBYTE #undef NEEDBITS #undef DUMPBITS *[UNZIP542]EXTRACT.C;1+, ./ 4- 0@123KPWO56"E:a7"E:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- extract.c This file contains the high-level routines ("driver routines") for extrac- ting and testing zipfile members. It calls the low-level routines in files explode.c, inflate.c, unreduce.c and unshrink.c. Contains: extract_or_test_files() store_info() extract_or_test_member() TestExtraField() test_compr_eb() memextract() memflush() fnfilter() ---------------------------------------------------------------------------*/ #define __EXTRACT_C /* identifies this source module */ #define UNZIP_INTERNAL #include "unzip.h" #ifdef WINDLL # ifdef POCKET_UNZIP # include "wince/intrface.h" # else # include "windll/windll.h" # endif #endif #include "crypt.h" #define GRRDUMP(buf,len) { \ int i, j; \ \ for (j = 0; j < (len)/16; ++j) { \ printf(" "); \ for (i = 0; i < 16; ++i) \ printf("%02x ", (uch)(buf)[i+(j<<4)]); \ printf("\n "); \ for (i = 0; i < 16; ++i) { \ char c = (char)(buf)[i+(j<<4)]; \ \ if (c == '\n') \ printf("\\n "); \ else if (c == '\r') \ printf("\\r "); \ else \ printf(" %c ", c); \ } \ printf("\n"); \ } \ if ((len) % 16) { \ printf(" "); \ for (i = j<<4; i < (len); ++i) \ printf("%02x ", (uch)(buf)[i]); \ printf("\n "); \ for (i = j<<4; i < (len); ++i) { \ char c = (char)(buf)[i]; \ \ if (c == '\n') \ printf("\\n "); \ else if (c == '\r') \ printf("\\r "); \ else \ printf(" %c ", c); \ } \ printf("\n"); \ } \ } static int store_info OF((__GPRO)); static int extract_or_test_member OF((__GPRO)); #ifndef SFX static int TestExtraField OF((__GPRO__ uch *ef, unsigned ef_len)); static int test_compr_eb OF((__GPRO__ uch *eb, unsigned eb_size, unsigned compr_offset, int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, uch *eb_ucptr, ulg eb_ucsize))); #endif #ifdef SET_DIR_ATTRIB static int dircomp OF((ZCONST zvoid *a, ZCONST zvoid *b)); #endif /*******************************/ /* Strings used in extract.c */ /*******************************/ static ZCONST char Far VersionMsg[] = " skipping: %-22s need %s compat. v%u.%u (can do v%u.%u)\n"; static ZCONST char Far ComprMsgNum[] = " skipping: %-22s unsupported compression method %u\n"; #ifndef SFX static ZCONST char Far ComprMsgName[] = " skipping: %-22s `%s' method not supported\n"; static ZCONST char Far CmprNone[] = "store"; static ZCONST char Far CmprShrink[] = "shrink"; static ZCONST char Far CmprReduce[] = "reduce"; static ZCONST char Far CmprImplode[] = "implode"; static ZCONST char Far CmprTokenize[] = "tokenize"; static ZCONST char Far CmprDeflate[] = "deflate"; static ZCONST char Far CmprDeflat64[] = "deflate64"; static ZCONST char Far CmprDCLImplode[] = "DCL implode"; static ZCONST char Far *ComprNames[NUM_METHODS] = { CmprNone, CmprShrink, CmprReduce, CmprReduce, CmprReduce, CmprReduce, CmprImplode, CmprTokenize, CmprDeflate, CmprDeflat64, CmprDCLImplode }; #endif /* !SFX */ static ZCONST char Far FilNamMsg[] = "%s: bad filename length (%s)\n"; static ZCONST char Far ExtFieldMsg[] = "%s: bad extra field length (%s)\n"; static ZCONST char Far OffsetMsg[] = "file #%u: bad zipfile offset (%s): %ld\n"; static ZCONST char Far ExtractMsg[] = "%8sing: %-22s %s%s"; #ifndef SFX static ZCONST char Far LengthMsg[] = "%s %s: %ld bytes required to uncompress to %lu bytes;\n %s\ supposed to require %lu bytes%s%s%s\n"; #endif static ZCONST char Far BadFileCommLength[] = "%s: bad file comment length\n"; static ZCONST char Far LocalHdrSig[] = "local header sig"; static ZCONST char Far BadLocalHdr[] = "file #%lu: bad local header\n"; static ZCONST char Far AttemptRecompensate[] = " (attempt]_v UNZIP.BCK  [UNZIP542]EXTRACT.C;1: ing to re-compensate)\n"; #ifndef SFX static ZCONST char Far BackslashPathSep[] = "warning: %s appears to use backslashes as path separators\n"; #endif static ZCONST char Far SkipVolumeLabel[] = " skipping: %-22s %svolume label\n"; #ifdef SET_DIR_ATTRIB /* messages of code for setting directory attributes */ static ZCONST char Far DirlistEntryNoMem[] = "warning: cannot alloc memory for dir times/permissions/UID/GID\n"; static ZCONST char Far DirlistSortNoMem[] = "warning: cannot alloc memory to sort dir times/perms/etc.\n"; static ZCONST char Far DirlistSetAttrFailed[] = "warning: set times/attribs failed for %s\n"; #endif #ifndef WINDLL static ZCONST char Far ReplaceQuery[] = "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: "; static ZCONST char Far AssumeNone[] = " NULL\n(assuming [N]one)\n"; static ZCONST char Far NewNameQuery[] = "new name: "; static ZCONST char Far InvalidResponse[] = "error: invalid response [%c]\n"; #endif /* !WINDLL */ static ZCONST char Far ErrorInArchive[] = "At least one %serror was detected in %s.\n"; static ZCONST char Far ZeroFilesTested[] = "Caution: zero files tested in %s.\n"; #ifndef VMS static ZCONST char Far VMSFormatQuery[] = "\n%s: stored in VMS format. Extract anyway? (y/n) "; #endif #if CRYPT static ZCONST char Far SkipCannotGetPasswd[] = " skipping: %-22s unable to get password\n"; static ZCONST char Far SkipIncorrectPasswd[] = " skipping: %-22s incorrect password\n"; static ZCONST char Far FilesSkipBadPasswd[] = "%u file%s skipped because of incorrect password.\n"; static ZCONST char Far MaybeBadPasswd[] = " (may instead be incorrect password)\n"; #else static ZCONST char Far SkipEncrypted[] = " skipping: %-22s encrypted (not supported)\n"; #endif static ZCONST char Far NoErrInCompData[] = "No errors detected in compressed data of %s.\n"; static ZCONST char Far NoErrInTestedFiles[] = "No errors detected in %s for the %lu file%s tested.\n"; static ZCONST char Far FilesSkipped[] = "%lu file%s skipped because of unsupported compression or encoding.\n"; static ZCONST char Far ErrUnzipFile[] = " error: %s%s %s\n"; static ZCONST char Far ErrUnzipNoFile[] = "\n error: %s%s\n"; static ZCONST char Far NotEnoughMem[] = "not enough memory to "; static ZCONST char Far InvalidComprData[] = "invalid compressed data to "; static ZCONST char Far Inflate[] = "inflate"; #ifndef SFX static ZCONST char Far Explode[] = "explode"; #ifndef LZW_CLEAN static ZCONST char Far Unshrink[] = "unshrink"; #endif #endif #if (!defined(DELETE_IF_FULL) || !defined(HAVE_UNLINK)) static ZCONST char Far FileTruncated[] = "warning: %s is probably truncated\n"; #endif static ZCONST char Far FileUnknownCompMethod[] = "%s: unknown compression method\n"; static ZCONST char Far BadCRC[] = " bad CRC %08lx (should be %08lx)\n"; /* TruncEAs[] also used in OS/2 mapname(), close_outfile() */ char ZCONST Far TruncEAs[] = " compressed EA data missing (%d bytes)%s"; char ZCONST Far TruncNTSD[] = " compressed WinNT security data missing (%d bytes)%s"; #ifndef SFX static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; static ZCONST char Far InvalidComprDataEAs[] = " invalid compressed data for EAs\n"; # if (defined(WIN32) && defined(NTSD_EAS)) static ZCONST char Far InvalidSecurityEAs[] = " EAs fail security check\n"; # endif static ZCONST char Far UnsuppNTSDVersEAs[] = " unsupported NTSD EAs version %d\n"; static ZCONST char Far BadCRC_EAs[] = " bad CRC for extended attributes\n"; static ZCONST char Far UnknComprMethodEAs[] = " unknown compression method for EAs (%u)\n"; static ZCONST char Far NotEnoughMemEAs[] = " out of memory while inflating EAs\n"; static ZCONST char Far UnknErrorEAs[] = " unknown error on extended attributes\n"; #endif /* !SFX */ static ZCONST char Far UnsupportedExtraField[] = "\nerror: unsupported extra-field compression type (%u)--skipping\n"; static ZCONST char Far BadExtraFieldCRC[] = "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n"; /**************************************/ /* Function extract_or_test_files() */ /**************************************/ int extract_or_test_files(__G) /* return PK-type error code */ __GDEF { uch *cd_inptr; unsigned i, j; ulg filnum=0L, blknum=0L; int reached_end, no_endsig_found; int cd_incnt, renamed, query; int skip_entry; int error, error_in_archive=PK_COOL, *fn_matched=NULL, *xn_matched=NULL; #ifndef WINDLL extent len; #endif unsigned members_processed; ulg num_skipped=0L, num_bad_pwd=0L; long cd_bufstart, bufstart, inbuf_offset, request; LONGINT old_extra_bytes = 0L; #ifdef SET_DIR_ATTRIB unsigned num_dirs=0; dirtime *dirlist=(dirtime *)NULL, **sorted_dirlist=(dirtime **)NULL; #endif /* possible values for local skip_entry flag: */ #define SKIP_NO 0 /* do not skip this entry */ #define SKIP_Y_EXISTING 1 /* skip this entry, do not overwrite file */ #define SKIP_Y_NONEXIST 2 /* skip this entry, do not create new file */ /*--------------------------------------------------------------------------- The basic idea of this function is as follows. Since the central di- rectory lies at the end of the zipfile and the member files lie at the beginning or middle or wherever, it is not very desirable to simply read a central directory entry, jump to the member and extract it, and then jump back to the central directory. In the case of a large zipfile this would lead to a whole lot of disk-grinding, especially if each mem- ber file is small. Instead, we read from the central directory the per- tinent information for a block of files, then go extract/test the whole block. Thus this routine contains two small(er) loops within a very large outer loop: the first of the small ones reads a block of files from the central directory; the second extracts or tests each file; and the outer one loops over blocks. There's some file-pointer positioning stuff in between, but that's about it. Btw, it's because of this jump- ing around that we can afford to be lenient if an error occurs in one of the member files: we should still be able to go find the other members, since we know the offset of each from the beginning of the zipfile. ---------------------------------------------------------------------------*/ G.pInfo = G.info; #if CRYPT G.newzip = TRUE; #endif #ifndef SFX G.reported_backslash = FALSE; #endif /* malloc space for check on unmatched filespecs (OK if one or both NULL) */ if (G.filespecs > 0 && (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != (int *)NULL) for (i = 0; i < G.filespecs; ++i) fn_matched[i] = FALSE; if (G.xfilespecs > 0 && (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != (int *)NULL) for (i = 0; i < G.xfilespecs; ++i) xn_matched[i] = FALSE; /*--------------------------------------------------------------------------- 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 bet^# UNZIP.BCK  [UNZIP542]EXTRACT.C;1Jter be the ONLY disk in the archive, but we'll add multi-disk support soon. ---------------------------------------------------------------------------*/ members_processed = 0; no_endsig_found = FALSE; 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 * attributes, case-conversion and text-conversion flags until block * size is reached. */ while ((j < DIR_BLKSIZ)) { G.pInfo = &G.info[j]; if (readbuf(__G__ G.sig, 4) == 0) { error_in_archive = PK_EOF; reached_end = TRUE; /* ...so no more left to do */ break; } if (strncmp(G.sig, central_hdr_sig, 4)) { /* is it a new entry? */ /* 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 & (unsigned)0xFFFF) == (unsigned)G.ecrec.total_entries_central_dir) { /* yes, so look if we ARE back at the end_central record */ no_endsig_found = (strncmp(G.sig, end_central_sig, 4) != 0); } else { /* no; we have found an error in the central directory * -> report it and stop searching for more Zip entries */ Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); error_in_archive = PK_BADERR; } reached_end = TRUE; /* ...so no more left to do */ break; } /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag */ if ((error = process_cdir_file_hdr(__G)) != PK_COOL) { error_in_archive = error; /* only PK_EOF defined */ reached_end = TRUE; /* ...so no more left to do */ break; } if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_COOL) { if (error > error_in_archive) error_in_archive = error; if (error > PK_WARN) { /* fatal: no more left to do */ Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), FnFilter1(G.filename), "central")); reached_end = TRUE; break; } } if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) { if (error > error_in_archive) error_in_archive = error; if (error > PK_WARN) { /* fatal */ Info(slide, 0x401, ((char *)slide, LoadFarString(ExtFieldMsg), FnFilter1(G.filename), "central")); reached_end = TRUE; break; } } #ifdef AMIGA G.filenote_slot = j; if ((error = do_string(__G__ G.crec.file_comment_length, uO.N_flag ? FILENOTE : SKIP)) != PK_COOL) #else if ((error = do_string(__G__ G.crec.file_comment_length, SKIP)) != PK_COOL) #endif { if (error > error_in_archive) error_in_archive = error; if (error > PK_WARN) { /* fatal */ Info(slide, 0x421, ((char *)slide, LoadFarString(BadFileCommLength), FnFilter1(G.filename))); reached_end = TRUE; break; } } if (G.process_all_files) { if (store_info(__G)) ++j; /* file is OK; info[] stored; continue with next */ else ++num_skipped; } else { int do_this_file; if (G.filespecs == 0) do_this_file = TRUE; else { /* check if this entry matches an `include' argument */ do_this_file = FALSE; for (i = 0; i < G.filespecs; i++) if (match(G.filename, G.pfnames[i], uO.C_flag)) { do_this_file = TRUE; /* ^-- ignore case or not? */ if (fn_matched) fn_matched[i] = TRUE; break; /* found match, so stop looping */ } } if (do_this_file) { /* check if this is an excluded file */ for (i = 0; i < G.xfilespecs; i++) if (match(G.filename, G.pxnames[i], uO.C_flag)) { do_this_file = FALSE; /* ^-- ignore case or not? */ if (xn_matched) xn_matched[i] = TRUE; break; } } if (do_this_file) { if (store_info(__G)) ++j; /* file is OK */ else ++num_skipped; /* unsupp. compression or encryption */ } } /* end if (process_all_files) */ members_processed++; } /* end while-loop (adding files to current block) */ /* save position in central directory so can come back later */ cd_bufstart = G.cur_zipfile_bufstart; cd_inptr = G.inptr; cd_incnt = G.incnt; /*----------------------------------------------------------------------- Second loop: process files in current block, extracting or testing each one. -----------------------------------------------------------------------*/ for (i = 0; i < j; ++i) { filnum++; /* filnum = i + blknum*DIR_BLKSIZ + 1; */ G.pInfo = &G.info[i]; #ifdef NOVELL_BUG_FAILSAFE G.dne = FALSE; /* assume file exists until stat() says otherwise */ #endif /* if the target position is not within the current input buffer * (either haven't yet read far enough, or (maybe) skipping back- * ward), skip to the target position and reset readbuf(). */ /* ZLSEEK(pInfo->offset): */ request = G.pInfo->offset + G.extra_bytes; inbuf_offset = request % INBUFSIZ; bufstart = request - inbuf_offset; Trace((stderr, "\ndebug: request = %ld, inbuf_offset = %ld\n", request, inbuf_offset)); Trace((stderr, "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", bufstart, G.cur_zipfile_bufstart)); if (request < 0) { Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), G.zipfn, LoadFarString(ReportMsg))); error_in_archive = PK_ERR; if (filnum == 1 && G.extra_bytes != 0L) { Info(slide, 0x401, ((char *)slide, LoadFarString(AttemptRecompensate))); _vF UNZIP.BCK  [UNZIP542]EXTRACT.C;1( old_extra_bytes = G.extra_bytes; G.extra_bytes = 0L; request = G.pInfo->offset; /* could also check if != 0 */ inbuf_offset = request % INBUFSIZ; bufstart = request - inbuf_offset; Trace((stderr, "debug: request = %ld, inbuf_offset = %ld\n", request, inbuf_offset)); Trace((stderr, "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", bufstart, G.cur_zipfile_bufstart)); } else { error_in_archive = PK_BADERR; continue; /* this one hosed; try next */ } } /* try again */ if (request < 0) { Trace((stderr, "debug: recompensated request still < 0\n")); Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), G.zipfn, LoadFarString(ReportMsg))); error_in_archive = PK_BADERR; continue; } else if (bufstart != G.cur_zipfile_bufstart) { Trace((stderr, "debug: bufstart != cur_zipfile_bufstart\n")); #ifdef USE_STRM_INPUT fseek((FILE *)G.zipfd,(LONGINT)bufstart,SEEK_SET); G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); #else /* !USE_STRM_INPUT */ G.cur_zipfile_bufstart = lseek(G.zipfd,(LONGINT)bufstart,SEEK_SET); #endif /* ?USE_STRM_INPUT */ if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) <= 0) { Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), filnum, "lseek", bufstart)); error_in_archive = PK_BADERR; continue; /* can still do next file */ } G.inptr = G.inbuf + (int)inbuf_offset; G.incnt -= (int)inbuf_offset; } else { G.incnt += (int)(G.inptr-G.inbuf) - (int)inbuf_offset; G.inptr = G.inbuf + (int)inbuf_offset; } /* should be in proper position now, so check for sig */ if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), filnum, "EOF", request)); error_in_archive = PK_BADERR; continue; /* but can still try next one */ } if (strncmp(G.sig, local_hdr_sig, 4)) { Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), filnum, LoadFarStringSmall(LocalHdrSig), request)); /* GRRDUMP(G.sig, 4) GRRDUMP(local_hdr_sig, 4) */ error_in_archive = PK_ERR; if ((filnum == 1 && G.extra_bytes != 0L) || (G.extra_bytes == 0L && old_extra_bytes != 0L)) { Info(slide, 0x401, ((char *)slide, LoadFarString(AttemptRecompensate))); if (G.extra_bytes) { old_extra_bytes = G.extra_bytes; G.extra_bytes = 0L; } else G.extra_bytes = old_extra_bytes; /* third attempt */ ZLSEEK(G.pInfo->offset) if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), filnum, "EOF", request)); error_in_archive = PK_BADERR; continue; /* but can still try next one */ } if (strncmp(G.sig, local_hdr_sig, 4)) { Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), filnum, LoadFarStringSmall(LocalHdrSig), request)); error_in_archive = PK_BADERR; continue; } } else continue; /* this one hosed; try next */ } if ((error = process_local_file_hdr(__G)) != PK_COOL) { Info(slide, 0x421, ((char *)slide, LoadFarString(BadLocalHdr), filnum)); error_in_archive = error; /* only PK_EOF defined */ continue; /* can still try next one */ } if ((error = do_string(__G__ G.lrec.filename_length, DS_FN_L)) != PK_COOL) { if (error > error_in_archive) error_in_archive = error; if (error > PK_WARN) { Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), FnFilter1(G.filename), "local")); continue; /* go on to next one */ } } if (G.extra_field != (uch *)NULL) { free(G.extra_field); G.extra_field = (uch *)NULL; } if ((error = do_string(__G__ G.lrec.extra_field_length, EXTRA_FIELD)) != 0) { if (error > error_in_archive) error_in_archive = error; if (error > PK_WARN) { Info(slide, 0x401, ((char *)slide, LoadFarString(ExtFieldMsg), FnFilter1(G.filename), "local")); continue; /* go on */ } } #if CRYPT if (G.pInfo->encrypted && (error = decrypt(__G__ uO.pwdarg)) != PK_COOL) { if (error == PK_WARN) { if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) Info(slide, 0x401, ((char *)slide, LoadFarString(SkipIncorrectPasswd), FnFilter1(G.filename))); ++num_bad_pwd; } else { /* (error > PK_WARN) */ if (error > error_in_archive) error_in_archive = error; Info(slide, 0x401, ((char *)slide, LoadFarString(SkipCannotGetPasswd), FnFilter1(G.filename))); } continue; /* go on to next file */ } #endif /* CRYPT */ /* * just about to extract file: if extracting to disk, check if * already exists, and if so, take appropriate action according to * fflag/uflag/overwrite_all/etc. (we couldn't do this in upper * loop because we don't store the possibly renamed filename[] in * info[]) */ #ifdef DLL if (!uO.tflag && !uO.cflag && !G.redirect_data) #else if (!uO.tflag && !uO.cflag) #endif { renamed = FALSE; /* user hasn't renamed output file yet */ startover: query = FALSE; skip_entry = SKIP_NO; /* for files from DOS FAT, check for use of backslash instead * of slash as directory separator (bug in some zipper(s); so * far, not a problem in HPFS, NTFS or VFAT systems) */ #ifndef SFX if (G.pInfo->hostnum == FS_FAT_ && !MBSCHR(G.filename, '/')) { char *p=G.filename; if (*p) do { if (*p == '\\') { if (!G.reported_backslash`c UNZIP.BCK  [UNZIP542]EXTRACT.C;1e7) { Info(slide, 0x21, ((char *)slide, LoadFarString(BackslashPathSep), G.zipfn)); G.reported_backslash = TRUE; if (!error_in_archive) error_in_archive = PK_WARN; } *p = '/'; } } while (*PREINCSTR(p)); } #endif /* !SFX */ /* mapname can create dirs if not freshening or if renamed */ if ((error = mapname(__G__ renamed)) > PK_WARN) { if (error == IZ_CREATED_DIR) { #ifdef SET_DIR_ATTRIB dirtime *d_entry; d_entry = (dirtime *)malloc(sizeof(dirtime)); if (d_entry == (dirtime *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(DirlistEntryNoMem))); } else { unsigned eb_izux_flg; d_entry->next = dirlist; dirlist = d_entry; dirlist->fn = (char *)malloc(strlen(G.filename) + 1); if (dirlist->fn == (char *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(DirlistEntryNoMem))); dirlist = d_entry->next; free(d_entry); if (!error_in_archive) error_in_archive = PK_WARN; continue; } strcpy(dirlist->fn, G.filename); dirlist->perms = G.pInfo->file_attr; #ifdef USE_EF_UT_TIME eb_izux_flg = G.extra_field? ef_scan_for_izux( G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, #ifdef IZ_CHECK_TZ (G.tz_is_valid ? &(dirlist->u.t3) : NULL), #else &(dirlist->u.t3), #endif dirlist->uidgid) : 0; #else /* !USE_EF_UT_TIME */ eb_izux_flg = 0; #endif /* ?USE_EF_UT_TIME */ if (eb_izux_flg & EB_UT_FL_MTIME) { TTrace((stderr, "\nextract: Unix dir e.f. modtime = %ld\n", dirlist->u.t3.mtime)); } else { dirlist->u.t3.mtime = dos_to_unix_time( G.lrec.last_mod_dos_datetime); } if (eb_izux_flg & EB_UT_FL_ATIME) { TTrace((stderr, "\nextract: Unix dir e.f. actime = %ld\n", dirlist->u.t3.atime)); } else { dirlist->u.t3.atime = dirlist->u.t3.mtime; } dirlist->have_uidgid = #ifdef RESTORE_UIDGID (uO.X_flag && (eb_izux_flg & EB_UX2_VALID)); #else 0; #endif ++num_dirs; } #endif /* SET_DIR_ATTRIB */ } else if (error == IZ_VOL_LABEL) { #ifdef DOS_OS2_W32 Info(slide, 0x401, ((char *)slide, LoadFarString(SkipVolumeLabel), FnFilter1(G.filename), uO.volflag? "hard disk " : "")); #else Info(slide, 1, ((char *)slide, LoadFarString(SkipVolumeLabel), FnFilter1(G.filename), "")); #endif /* if (!error_in_archive) error_in_archive = PK_WARN; */ } else if (error > PK_ERR && error_in_archive < PK_ERR) error_in_archive = PK_ERR; Trace((stderr, "mapname(%s) returns error = %d\n", FnFilter1(G.filename), error)); continue; /* go on to next file */ } #ifdef QDOS QFilename(__G__ G.filename); #endif switch (check_for_newer(__G__ G.filename)) { case DOES_NOT_EXIST: #ifdef NOVELL_BUG_FAILSAFE G.dne = TRUE; /* stat() says file DOES NOT EXIST */ #endif /* freshen (no new files): skip unless just renamed */ if (uO.fflag && !renamed) skip_entry = SKIP_Y_NONEXIST; break; case EXISTS_AND_OLDER: if (IS_OVERWRT_NONE) { /* never overwrite: skip file */ skip_entry = SKIP_Y_EXISTING; } else { #ifdef UNIXBACKUP if (!IS_OVERWRT_ALL && !uO.B_flag) #else if (!IS_OVERWRT_ALL) #endif query = TRUE; } break; case EXISTS_AND_NEWER: /* (or equal) */ if (IS_OVERWRT_NONE || (uO.uflag && !renamed)) { /* skip if update/freshen & orig name */ skip_entry = SKIP_Y_EXISTING; } else { #ifdef UNIXBACKUP if (!IS_OVERWRT_ALL && !uO.B_flag) #else if (!IS_OVERWRT_ALL) #endif query = TRUE; } break; } if (query) { #ifdef WINDLL switch (G.lpUserFunctions->replace != NULL ? (*G.lpUserFunctions->replace)(G.filename) : IDM_REPLACE_NONE) { case IDM_REPLACE_RENAME: _ISO_INTERN(G.filename); renamed = TRUE; goto startover; case IDM_REPLACE_ALL: G.overwrite_mode = OVERWRT_ALWAYS; /* FALL THROUGH, extract */ case IDM_REPLACE_YES: break; case IDM_REPLACE_NONE: G.overwrite_mode = OVERWRT_NEVER; /* FALL THROUGH, skip */ case IDM_REPLACE_NO: skip_entry = SKIP_Y_EXISTING; break; } #else /* !WINDLL */ reprompt: Info(slide, 0x81, ((char *)slide, LoadFarString(ReplaceQuery), FnFilter1(G.filename))); if (fgets(G.answerbuf, 9, stdin) == (char *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(AssumeNone))); *G.answerbuf = 'N'; if (!error_in_archive) error_in_archive = 1; /* not extracted: warning */ aunE UNZIP.BCK  [UNZIP542]EXTRACT.C;1 F } switch (*G.answerbuf) { case 'r': case 'R': do { Info(slide, 0x81, ((char *)slide, LoadFarString(NewNameQuery))); fgets(G.filename, FILNAMSIZ, stdin); /* usually get \n here: better check for it */ len = strlen(G.filename); if (lastchar(G.filename, len) == '\n') G.filename[--len] = '\0'; } while (len == 0); #ifdef WIN32 /* WIN32 fgets( ... , stdin) returns OEM coded strings */ _OEM_INTERN(G.filename); #endif renamed = TRUE; goto startover; /* sorry for a goto */ case 'A': /* dangerous option: force caps */ G.overwrite_mode = OVERWRT_ALWAYS; /* FALL THROUGH, extract */ case 'y': case 'Y': break; case 'N': G.overwrite_mode = OVERWRT_NEVER; /* FALL THROUGH, skip */ case 'n': /* skip file */ skip_entry = SKIP_Y_EXISTING; break; default: Info(slide, 1, ((char *)slide, LoadFarString(InvalidResponse), *G.answerbuf)); goto reprompt; /* yet another goto? */ } /* end switch (*answerbuf) */ #endif /* ?WINDLL */ } /* end if (query) */ if (skip_entry != SKIP_NO) { #ifdef WINDLL if (skip_entry == SKIP_Y_EXISTING) { /* report skipping of an existing entry */ Info(slide, 0, ((char *)slide, ((IS_OVERWRT_NONE || !uO.uflag || renamed) ? "Target file exists.\nSkipping %s\n" : "Target file newer.\nSkipping %s\n"), FnFilter1(G.filename))); } #endif /* WINDLL */ continue; } } /* end if (extracting to disk) */ #ifdef DLL if ((G.statreportcb != NULL) && (*G.statreportcb)(__G__ UZ_ST_START_EXTRACT, G.zipfn, G.filename, NULL)) { if (fn_matched) free((zvoid *)fn_matched); if (xn_matched) free((zvoid *)xn_matched); return IZ_CTRLC; /* cancel operation by user request */ } #endif #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ UserStop(); #endif #ifdef AMIGA G.filenote_slot = i; #endif G.disk_full = 0; if ((error = extract_or_test_member(__G)) != PK_COOL) { if (error > error_in_archive) error_in_archive = error; /* ...and keep going */ #ifdef DLL if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) { #else if (G.disk_full > 1) { #endif if (fn_matched) free((zvoid *)fn_matched); if (xn_matched) free((zvoid *)xn_matched); return error_in_archive; /* (unless disk full) */ } } #ifdef DLL if ((G.statreportcb != NULL) && (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, G.filename, (zvoid *)&G.lrec.ucsize)) { if (fn_matched) free((zvoid *)fn_matched); if (xn_matched) free((zvoid *)xn_matched); return IZ_CTRLC; /* cancel operation by user request */ } #endif #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ UserStop(); #endif } /* end for-loop (i: files in current block) */ /* * Jump back to where we were in the central directory, then go and do * the next batch of files. */ #ifdef USE_STRM_INPUT fseek((FILE *)G.zipfd, (LONGINT)cd_bufstart, SEEK_SET); G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); #else /* !USE_STRM_INPUT */ G.cur_zipfile_bufstart = lseek(G.zipfd,(LONGINT)cd_bufstart,SEEK_SET); #endif /* ?USE_STRM_INPUT */ read(G.zipfd, (char *)G.inbuf, INBUFSIZ); /* been here before... */ G.inptr = cd_inptr; G.incnt = cd_incnt; ++blknum; #ifdef TEST printf("\ncd_bufstart = %ld (%.8lXh)\n", cd_bufstart, cd_bufstart); printf("cur_zipfile_bufstart = %ld (%.8lXh)\n", cur_zipfile_bufstart, cur_zipfile_bufstart); printf("inptr-inbuf = %d\n", G.inptr-G.inbuf); printf("incnt = %d\n\n", G.incnt); #endif } /* end while-loop (blocks of files in central directory) */ /*--------------------------------------------------------------------------- Go back through saved list of directories, sort and set times/perms/UIDs and GIDs from the deepest level on up. ---------------------------------------------------------------------------*/ #ifdef SET_DIR_ATTRIB if (num_dirs > 0) { sorted_dirlist = (dirtime **)malloc(num_dirs*sizeof(dirtime *)); if (sorted_dirlist == (dirtime **)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(DirlistSortNoMem))); while (dirlist != (dirtime *)NULL) { dirtime *d = dirlist; dirlist = dirlist->next; free(d); } } else { if (num_dirs == 1) sorted_dirlist[0] = dirlist; else { for (i = 0; i < num_dirs; ++i) { sorted_dirlist[i] = dirlist; dirlist = dirlist->next; } qsort((char *)sorted_dirlist, num_dirs, sizeof(dirtime *), dircomp); } Trace((stderr, "setting directory times/perms/attributes\n")); for (i = 0; i < num_dirs; ++i) { dirtime *d = sorted_dirlist[i]; Trace((stderr, "dir = %s\n", d->fn)); if ((error = set_direc_attribs(__G__ d)) != PK_OK) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistSetAttrFailed), d->fn)); if (!error_in_archive) error_in_archive = error; } free(d->fn); free(d); } free(sorted_dirlist); } } #endif /* SET_DIR_ATTRIB */ #if (defined(WIN32) && defined(NTSD_EAS)) process_defer_NT(__G); /* process any deferred items for this .zip file */ #endif /*--------------------------------------------------------------------------- Check for unmatched filespecs on command line and print warning if any found. Free allocated memory. ---------------------------------------------------------------------------*/ if (fn_matched) { for (i = 0; i < G.filespecs; ++i) if (!fn_matched[i]) { #ifdef DLL if (!G.redirect_data && !G.redirect_text) bԁ UNZIP.BCK  [UNZIP542]EXTRACT.C;1\U Info(slide, 0x401, ((char *)slide, LoadFarString(FilenameNotMatched), G.pfnames[i])); else setFileNotFound(__G); #else Info(slide, 1, ((char *)slide, LoadFarString(FilenameNotMatched), G.pfnames[i])); #endif if (error_in_archive <= PK_WARN) error_in_archive = PK_FIND; /* some files not found */ } free((zvoid *)fn_matched); } if (xn_matched) { for (i = 0; i < G.xfilespecs; ++i) if (!xn_matched[i]) Info(slide, 0x401, ((char *)slide, LoadFarString(ExclFilenameNotMatched), G.pxnames[i])); free((zvoid *)xn_matched); } /*--------------------------------------------------------------------------- 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) */ if (error_in_archive) Info(slide, 0, ((char *)slide, LoadFarString(ErrorInArchive), (error_in_archive == 1)? "warning-" : "", G.zipfn)); else if (num == 0L) Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), G.zipfn)); else if (G.process_all_files && (num_skipped+num_bad_pwd == 0L)) Info(slide, 0, ((char *)slide, LoadFarString(NoErrInCompData), G.zipfn)); else Info(slide, 0, ((char *)slide, LoadFarString(NoErrInTestedFiles) , G.zipfn, num, (num==1L)? "":"s")); if (num_skipped > 0L) Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipped), num_skipped, (num_skipped==1L)? "":"s")); #if CRYPT if (num_bad_pwd > 0L) Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipBadPasswd) , num_bad_pwd, (num_bad_pwd==1L)? "":"s")); #endif /* CRYPT */ } else if ((uO.qflag == 0) && !error_in_archive && (num == 0)) Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), G.zipfn)); } /* give warning if files not tested or extracted (first condition can still * happen if zipfile is empty and no files specified on command line) */ if ((filnum == 0) && error_in_archive <= PK_WARN) { if (num_skipped > 0L) error_in_archive = IZ_UNSUP; /* unsupport. compression/encryption */ else error_in_archive = PK_FIND; /* no files found at all */ } #if CRYPT else if ((filnum == num_bad_pwd) && error_in_archive <= PK_WARN) error_in_archive = IZ_BADPWD; /* bad passwd => all files skipped */ #endif else if ((num_skipped > 0L) && error_in_archive <= PK_WARN) error_in_archive = IZ_UNSUP; /* was PK_WARN; Jean-loup complained */ #if CRYPT else if ((num_bad_pwd > 0L) && !error_in_archive) error_in_archive = PK_WARN; #endif return error_in_archive; } /* end function extract_or_test_files() */ /***************************/ /* Function store_info() */ /***************************/ static int store_info(__G) /* return 0 if skipping, 1 if OK */ __GDEF { #ifdef SFX # ifdef USE_DEFLATE64 # define UNKN_COMPR \ (G.crec.compression_method!=STORED && G.crec.compression_methodENHDEFLATED) # else # define UNKN_COMPR \ (G.crec.compression_method!=STORED && G.crec.compression_method!=DEFLATED) # endif #else # ifdef COPYRIGHT_CLEAN /* no reduced files */ # define UNKN_RED (G.crec.compression_method >= REDUCED1 && \ G.crec.compression_method <= REDUCED4) # else # define UNKN_RED FALSE /* reducing not unknown */ # endif # ifdef LZW_CLEAN /* no shrunk files */ # define UNKN_SHR (G.crec.compression_method == SHRUNK) # else # define UNKN_SHR FALSE /* unshrinking not unknown */ # endif # ifdef USE_DEFLATE64 # define UNKN_COMPR (UNKN_RED || UNKN_SHR || \ G.crec.compression_method==TOKENIZED || \ G.crec.compression_method>ENHDEFLATED) # else # define UNKN_COMPR (UNKN_RED || UNKN_SHR || \ G.crec.compression_method==TOKENIZED || \ G.crec.compression_method>DEFLATED) # endif #endif /*--------------------------------------------------------------------------- Check central directory info for version/compatibility requirements. ---------------------------------------------------------------------------*/ G.pInfo->encrypted = G.crec.general_purpose_bit_flag & 1; /* bit field */ G.pInfo->ExtLocHdr = (G.crec.general_purpose_bit_flag & 8) == 8; /* bit */ G.pInfo->textfile = G.crec.internal_file_attributes & 1; /* bit field */ G.pInfo->crc = G.crec.crc32; G.pInfo->compr_size = G.crec.csize; G.pInfo->uncompr_size = G.crec.ucsize; switch (uO.aflag) { case 0: G.pInfo->textmode = FALSE; /* bit field */ break; case 1: G.pInfo->textmode = G.pInfo->textfile; /* auto-convert mode */ break; default: /* case 2: */ G.pInfo->textmode = TRUE; break; } if (G.crec.version_needed_to_extract[1] == VMS_) { if (G.crec.version_needed_to_extract[0] > VMS_UNZIP_VERSION) { if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), FnFilter1(G.filename), "VMS", G.crec.version_needed_to_extract[0] / 10, G.crec.version_needed_to_extract[0] % 10, VMS_UNZIP_VERSION / 10, VMS_UNZIP_VERSION % 10)); return 0; } #ifndef VMS /* won't be able to use extra field, but still have data */ else if (!uO.tflag && !IS_OVERWRT_ALL) { /* if -o, extract anyway */ Info(slide, 0x481, ((char *)slide, LoadFarString(VMSFormatQuery), FnFilter1(G.filename))); fgets(G.answerbuf, 9, stdin); if ((*G.answerbuf != 'y') && (*G.answerbuf != 'Y')) return 0; } #endif /* !VMS */ /* usual file type: don't need VMS to extract */ } else if (G.crec.version_needed_to_extract[0] > UNZIP_VERSION) { if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), FnFilter1(G.filename), "PK", G.crec.version_needed_to_extract[0] / 10, G.crec.version_needed_to_extract[0] % 10, UNZIP_VERSION / 10, UNZIP_VERSION % 10)); return 0; } if UNKN_COMPR { if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) { #ifndef SFX if (G.crec.compression_method < NUM_METHODS) Info(slide, 0x401, ((char *)slide, LoadcNVY@EG2 0] Y#sQeFh%8Cjj4,@:qho@Q@v1va`{\\$wg^(:*Kp2(yd;=Y_P,|Vuf]_f T_TDXOk#> XOi\/ %U j3R 4G_i[t3/THJi&mDLgx.jonB.["w/:#"S kiu`Vx7FMT#{YJGUM1YLASNF3cj^PKB00X[X P;|+F+t[$6L'^D\Ci53t&FeP_.a3i::s"7(| 2 w^w) 5i k;yO& K/%fX;R \xWIMJ~BgJPb9z 97m;b*-,>^}7}#J!/[uh5RCFrR+Uh}Lzq<+-PPCi{+oB2UYJ 7rUILk]Mv_U _Ryi{gB][U|sRoR3$Rfr;0tg{pW mCAl`w?c f;2q)q*!q>|y&JD/tS_ !HT hNZJQO]>JmjTXMI-!^0q )OQC+,G;Y{m Y+VhvTR}c>w-ed| YM=XH_g_g)1m\ #zyInPmm:G&E&P1#dZ`]9i 8 IU s'QPz1]Ym6d4RFZ8&B&v+WxSs*S>~9:RhO5xxt"lkcgm \9dn"sRj}G)2*bi,gx}-NJ+YU^J~eZw B`mb^-K6p%{~kNL\"q{vO6 $-?KFmSbw2P'  YHW8J_C|?<, DWaEu270Ku Q NK*ERNBp jRMHYi?P1_ #I w4G9N7"Tv#6ZUi%W6R[~Wq :Nk4+O@B-J H= WcF6;I>He ;{ -n75Iw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2zRlR8s`Dj$:=AA.&2:s+u>I+1([ @J6aKMhbM[=: ?)a0n=i#$wO]`vcy.{-s*?pmG lLd%(#>p)%+4g M38foarX,FT AMxP&S)P32;?#T-A hkR|vk7  t6fd U0n arj!#&Z{33p <[TGMB|&}zNu-]/+8d1Q<,/R^P9u6378v//,Jgmva6gid-tvdx$' %6t4Wy*u1P)d!Zsy{f~K%%mEj#td5, UNZIP.BCK  [UNZIP542]EXTRACT.C;1_dFarString(ComprMsgName), FnFilter1(G.filename), LoadFarStringSmall(ComprNames[G.crec.compression_method]))); else #endif Info(slide, 0x401, ((char *)slide, LoadFarString(ComprMsgNum), FnFilter1(G.filename), G.crec.compression_method)); } return 0; } #if (!CRYPT) if (G.pInfo->encrypted) { if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) Info(slide, 0x401, ((char *)slide, LoadFarString(SkipEncrypted), FnFilter1(G.filename))); return 0; } #endif /* !CRYPT */ /* map whatever file attributes we have into the local format */ mapattr(__G); /* GRR: worry about return value later */ G.pInfo->offset = (long)G.crec.relative_offset_local_header; return 1; } /* end function store_info() */ /***************************************/ /* Function extract_or_test_member() */ /***************************************/ static int extract_or_test_member(__G) /* return PK-type error code */ __GDEF { char *nul="[empty] ", *txt="[text] ", *bin="[binary]"; #ifdef CMS_MVS char *ebc="[ebcdic]"; #endif register int b; int r, error=PK_COOL; #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) ulg wsize; #else # define wsize WSIZE #endif /*--------------------------------------------------------------------------- Initialize variables, buffers, etc. ---------------------------------------------------------------------------*/ G.bits_left = 0; G.bitbuf = 0L; /* unreduce and unshrink only */ G.zipeof = 0; G.newfile = TRUE; G.crc32val = CRCVAL_INITIAL; #ifdef SYMLINKS /* if file came from Unix and is a symbolic link and we are extracting * to disk, prepare to restore the link */ if (S_ISLNK(G.pInfo->file_attr) && (G.pInfo->hostnum == UNIX_ || G.pInfo->hostnum == ATARI_ || G.pInfo->hostnum == BEOS_) && !uO.tflag && !uO.cflag && (G.lrec.ucsize > 0)) G.symlnk = TRUE; else G.symlnk = FALSE; #endif /* SYMLINKS */ if (uO.tflag) { if (!uO.qflag) Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "test", FnFilter1(G.filename), "", "")); } else { #ifdef DLL if (uO.cflag && !G.redirect_data) #else if (uO.cflag) #endif { #if (defined(OS2) && defined(__IBMC__) && (__IBMC__ >= 200)) G.outfile = freopen("", "wb", stdout); /* VAC++ ignores setmode */ #else G.outfile = stdout; #endif #ifdef DOS_FLX_NLM_OS2_W32 #if (defined(__HIGHC__) && !defined(FLEXOS)) setmode(G.outfile, _BINARY); #else /* !(defined(__HIGHC__) && !defined(FLEXOS)) */ setmode(fileno(G.outfile), O_BINARY); #endif /* ?(defined(__HIGHC__) && !defined(FLEXOS)) */ # define NEWLINE "\r\n" #else /* !DOS_FLX_NLM_OS2_W32 */ # define NEWLINE "\n" #endif /* ?DOS_FLX_NLM_OS2_W32 */ #ifdef VMS if (open_outfile(__G)) /* VMS: required even for stdout! */ return PK_DISK; #endif } else if (open_outfile(__G)) return PK_DISK; } /*--------------------------------------------------------------------------- Unpack the file. ---------------------------------------------------------------------------*/ defer_leftover_input(__G); /* so NEXTBYTE bounds check will work */ switch (G.lrec.compression_method) { case STORED: if (!uO.tflag && QCOND2) { #ifdef SYMLINKS if (G.symlnk) /* can also be deflated, but rarer... */ Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "link", FnFilter1(G.filename), "", "")); else #endif /* SYMLINKS */ Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "extract", FnFilter1(G.filename), (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? "" : (G.lrec.ucsize == 0L? nul : (G.pInfo->textfile? txt : bin)), uO.cflag? NEWLINE : "")); } #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) { wsize = G.redirect_size; redirSlide = G.redirect_buffer; } else { wsize = WSIZE; redirSlide = slide; } #endif G.outptr = redirSlide; G.outcnt = 0L; while ((b = NEXTBYTE) != EOF) { *G.outptr++ = (uch)b; if (++G.outcnt == wsize) { error = flush(__G__ redirSlide, G.outcnt, 0); G.outptr = redirSlide; G.outcnt = 0L; if (error != PK_COOL || G.disk_full) break; } } if (G.outcnt) /* flush final (partial) buffer */ flush(__G__ redirSlide, G.outcnt, 0); break; #ifndef SFX #ifndef LZW_CLEAN case SHRUNK: if (!uO.tflag && QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), LoadFarStringSmall(Unshrink), FnFilter1(G.filename), (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); } if ((r = unshrink(__G)) != PK_COOL) { if (r < PK_DISK) { if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipFile), LoadFarString(NotEnoughMem), LoadFarStringSmall2(Unshrink), FnFilter1(G.filename))); else Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipNoFile), LoadFarString(NotEnoughMem), LoadFarStringSmall2(Unshrink))); } error = r; } break; #endif /* !LZW_CLEAN */ #ifndef COPYRIGHT_CLEAN case REDUCED1: case REDUCED2: case REDUCED3: case REDUCED4: if (!uO.tflag && QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "unreduc", FnFilter1(G.filename), (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); } if ((r = unreduce(__G)) != PK_COOL) { /* unreduce() returns only PK_COOL, PK_DISK, or IZ_CTRLC */ error = r; } break; #endif /* !COPYRIGHT_CLEAN */ case IMPLODED: if (!uO.tflag && QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "explod", FnFilter1(G.filename), (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); } if (((r = explode(__G)) != 0) && (r != 5)) { /* treat 5 specially */ if (r < PK_DISK) { if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipFile), r == 3? LoadFarString(NotEnoughMem) : LoadFarString(InvalidComprDae<% UNZIP.BCK  [UNZIP542]EXTRACT.C;1sta), LoadFarStringSmall2(Explode), FnFilter1(G.filename))); else Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipNoFile), r == 3? LoadFarString(NotEnoughMem) : LoadFarString(InvalidComprData), LoadFarStringSmall2(Explode))); error = (r == 3)? PK_MEM3 : PK_ERR; } else { error = r; } } if (r == 5) { int warning = ((ulg)G.used_csize <= G.lrec.csize); if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), "", warning? "warning" : "error", G.used_csize, G.lrec.ucsize, warning? " " : "", G.lrec.csize, " [", FnFilter1(G.filename), "]")); else Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), "\n", warning? "warning" : "error", G.used_csize, G.lrec.ucsize, warning? " ":"", G.lrec.csize, "", "", ".")); error = warning? PK_WARN : PK_ERR; } break; #endif /* !SFX */ case DEFLATED: #ifdef USE_DEFLATE64 case ENHDEFLATED: #endif if (!uO.tflag && QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "inflat", FnFilter1(G.filename), (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); } #ifndef USE_ZLIB /* zlib's function is called inflate(), too */ # define UZinflate inflate #endif if ((r = UZinflate(__G)) != 0) { if (r < PK_DISK) { if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipFile), r == 3? LoadFarString(NotEnoughMem) : LoadFarString(InvalidComprData), LoadFarStringSmall2(Inflate), FnFilter1(G.filename))); else Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipNoFile), r == 3? LoadFarString(NotEnoughMem) : LoadFarString(InvalidComprData), LoadFarStringSmall2(Inflate))); error = (r == 3)? PK_MEM3 : PK_ERR; } else { error = r; } } break; default: /* should never get to this point */ Info(slide, 0x401, ((char *)slide, LoadFarString(FileUnknownCompMethod), FnFilter1(G.filename))); /* close and delete file before return? */ undefer_input(__G); return PK_WARN; } /* end switch (compression method) */ /*--------------------------------------------------------------------------- Close the file and set its date and time (not necessarily in that order), and make sure the CRC checked out OK. Logical-AND the CRC for 64-bit machines (redundant on 32-bit machines). ---------------------------------------------------------------------------*/ #ifdef VMS /* VMS: required even for stdout! (final flush) */ if (!uO.tflag) /* don't close NULL file */ close_outfile(__G); #else #ifdef DLL if (!uO.tflag && (!uO.cflag || G.redirect_data)) { if (G.redirect_data) FINISH_REDIRECT(); else close_outfile(__G); } #else if (!uO.tflag && !uO.cflag) /* don't close NULL file or stdout */ close_outfile(__G); #endif #endif /* VMS */ /* GRR: CONVERT close_outfile() TO NON-VOID: CHECK FOR ERRORS! */ if (G.disk_full) { /* set by flush() */ if (G.disk_full > 1) { #if (defined(DELETE_IF_FULL) && defined(HAVE_UNLINK)) /* delete the incomplete file if we can */ if (unlink(G.filename) != 0) Trace((stderr, "extract.c: could not delete %s\n", FnFilter1(G.filename))); #else /* warn user about the incomplete file */ Info(slide, 0x421, ((char *)slide, LoadFarString(FileTruncated), FnFilter1(G.filename))); #endif error = PK_DISK; } else { error = PK_WARN; } } if (error > PK_WARN) {/* don't print redundant CRC error if error already */ undefer_input(__G); return error; } if (G.crc32val != G.lrec.crc32) { /* if quiet enough, we haven't output the filename yet: do it */ if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) Info(slide, 0x401, ((char *)slide, "%-22s ", FnFilter1(G.filename))); Info(slide, 0x401, ((char *)slide, LoadFarString(BadCRC), G.crc32val, G.lrec.crc32)); #if CRYPT if (G.pInfo->encrypted) Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeBadPasswd))); #endif error = PK_ERR; } else if (uO.tflag) { #ifndef SFX if (G.extra_field) { if ((r = TestExtraField(__G__ G.extra_field, G.lrec.extra_field_length)) > error) error = r; } else #endif /* !SFX */ if (!uO.qflag) Info(slide, 0, ((char *)slide, " OK\n")); } else { if (QCOND2 && !error) /* GRR: is stdout reset to text mode yet? */ Info(slide, 0, ((char *)slide, "\n")); } undefer_input(__G); return error; } /* end function extract_or_test_member() */ #ifndef SFX /*******************************/ /* Function TestExtraField() */ /*******************************/ static int TestExtraField(__G__ ef, ef_len) __GDEF uch *ef; unsigned ef_len; { ush ebID; unsigned ebLen; unsigned eb_cmpr_offs = 0; int r; /* we know the regular compressed file data tested out OK, or else we * wouldn't be here ==> print filename if any extra-field errors found */ while (ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) { /* Discovered some extra field inconsistency! */ if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", FnFilter1(G.filename))); Info(slide, 1, ((char *)slide, LoadFarString(InconsistEFlength), ebLen, (ef_len - EB_HEADSIZE))); return PK_ERR; } switch (ebID) { case EF_OS2: case EF_ACL: case EF_MAC3: case EF_BEOS: switch (ebID) { case EF_OS2: case EF_ACL: eb_cmpr_offs = EB_OS2_HLEN; break; case EF_MAC3: if (ebLen >= EB_MAC3_HLEN && (makeword(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) & EB_M3_FL_UNCMPR) && (makelong(ef+EB_HEADSIZE) == ebLen - EB_MAC3_HLEN)) eb_cmpr_offs = 0; else eb_cmpr_offs = EB_MAC3_HLEN; f!i7X UNZIP.BCK  [UNZIP542]EXTRACT.C;1., break; case EF_BEOS: if (ebLen >= EB_BEOS_HLEN && (*(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) & EB_BE_FL_UNCMPR) && (makelong(ef+EB_HEADSIZE) == ebLen - EB_BEOS_HLEN)) eb_cmpr_offs = 0; else eb_cmpr_offs = EB_BEOS_HLEN; break; } if ((r = test_compr_eb(__G__ ef, ebLen, eb_cmpr_offs, NULL)) != PK_OK) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", FnFilter1(G.filename))); switch (r) { case IZ_EF_TRUNC: Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), ebLen-(eb_cmpr_offs+EB_CMPRHEADLEN), "\n")); break; case PK_ERR: Info(slide, 1, ((char *)slide, LoadFarString(InvalidComprDataEAs))); break; case PK_MEM3: case PK_MEM4: Info(slide, 1, ((char *)slide, LoadFarString(NotEnoughMemEAs))); break; default: if ((r & 0xff) != PK_ERR) Info(slide, 1, ((char *)slide, LoadFarString(UnknErrorEAs))); else { ush m = (ush)(r >> 8); if (m == DEFLATED) /* GRR KLUDGE! */ Info(slide, 1, ((char *)slide, LoadFarString(BadCRC_EAs))); else Info(slide, 1, ((char *)slide, LoadFarString(UnknComprMethodEAs), m)); } break; } return r; } break; case EF_NTSD: Trace((stderr, "ebID: %i / ebLen: %u\n", ebID, ebLen)); r = ebLen < EB_NTSD_L_LEN ? IZ_EF_TRUNC : ((ef[EB_HEADSIZE+EB_NTSD_VERSION] > EB_NTSD_MAX_VER) ? (PK_WARN | 0x4000) : test_compr_eb(__G__ ef, ebLen, EB_NTSD_L_LEN, TEST_NTSD)); if (r != PK_OK) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", FnFilter1(G.filename))); switch (r) { case IZ_EF_TRUNC: Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), ebLen-(EB_NTSD_L_LEN+EB_CMPRHEADLEN), "\n")); break; #if (defined(WIN32) && defined(NTSD_EAS)) case PK_WARN: Info(slide, 1, ((char *)slide, LoadFarString(InvalidSecurityEAs))); break; #endif case PK_ERR: Info(slide, 1, ((char *)slide, LoadFarString(InvalidComprDataEAs))); break; case PK_MEM3: case PK_MEM4: Info(slide, 1, ((char *)slide, LoadFarString(NotEnoughMemEAs))); break; case (PK_WARN | 0x4000): Info(slide, 1, ((char *)slide, LoadFarString(UnsuppNTSDVersEAs), (int)ef[EB_HEADSIZE+EB_NTSD_VERSION])); r = PK_WARN; break; default: if ((r & 0xff) != PK_ERR) Info(slide, 1, ((char *)slide, LoadFarString(UnknErrorEAs))); else { ush m = (ush)(r >> 8); if (m == DEFLATED) /* GRR KLUDGE! */ Info(slide, 1, ((char *)slide, LoadFarString(BadCRC_EAs))); else Info(slide, 1, ((char *)slide, LoadFarString(UnknComprMethodEAs), m)); } break; } return r; } break; case EF_PKVMS: case EF_PKW32: case EF_PKUNIX: case EF_ASIUNIX: case EF_IZVMS: case EF_IZUNIX: case EF_VMCMS: case EF_MVS: case EF_SPARK: case EF_TANDEM: case EF_THEOS: case EF_AV: default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!uO.qflag) Info(slide, 0, ((char *)slide, " OK\n")); return PK_COOL; } /* end function TestExtraField() */ /******************************/ /* Function test_compr_eb() */ /******************************/ #ifdef PROTO static int test_compr_eb( __GPRO__ uch *eb, unsigned eb_size, unsigned compr_offset, int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, uch *eb_ucptr, ulg eb_ucsize)) #else /* !PROTO */ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) __GDEF uch *eb; unsigned eb_size; unsigned compr_offset; int (*test_uc_ebdata)(); #endif /* ?PROTO */ { ulg eb_ucsize; uch *eb_ucptr; int r; if (compr_offset < 4) /* field is not compressed: */ return PK_OK; /* do nothing and signal OK */ if ((eb_size < (EB_UCSIZE_P + 4)) || ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && eb_size <= (compr_offset + EB_CMPRHEADLEN))) return IZ_EF_TRUNC; /* no compressed data! */ if ((eb_ucptr = (uch *)malloc((extent)eb_ucsize)) == (uch *)NULL) return PK_MEM4; r = memextract(__G__ eb_ucptr, eb_ucsize, eb + (EB_HEADSIZE + compr_offset), (ulg)(eb_size - compr_offset)); if (r == PK_OK && test_uc_ebdata != NULL) r = (*test_uc_ebdata)(__G__ eb, eb_size, eb_ucptr, eb_ucsize); free(eb_ucptr); return r; } /* end function test_compr_eb() */ #endif /* !SFX */ /***************************/ /* Function memextract() */ /***************************/ int memextract(__G__ tgt, tgtsize, src, srcsize) /* extract compressed */ __GDEF /* extra field block; */ uch *tgt, *src; /* return PK-type error */ ulg tgtsize, srcsize; /* level */ { long old_csize=G.csize; uch *old_inptr=G.inptr; int old_incnt=G.incnt; int r, error=PK_OK; ush method; ulg extra_field_crc; method = makeword(src); extra_field_crc = makelong(src+2); /* compressed extra field exists completely in memory at thigJYT UNZIP.BCK  [UNZIP542]EXTRACT.C;1s location: */ G.inptr = src + 2 + 4; /* method and extra_field_crc */ G.incnt = (int)(G.csize = (long)(srcsize - (2 + 4))); G.mem_mode = TRUE; G.outbufptr = tgt; G.outsize = tgtsize; switch (method) { case STORED: memcpy((char *)tgt, (char *)G.inptr, (extent)G.incnt); G.outcnt = G.csize; /* for CRC calculation */ break; case DEFLATED: G.outcnt = 0L; if ((r = UZinflate(__G)) != 0) { if (!uO.tflag) Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(ErrUnzipNoFile), r == 3? LoadFarString(NotEnoughMem) : LoadFarString(InvalidComprData), LoadFarStringSmall2(Inflate))); error = (r == 3)? PK_MEM3 : PK_ERR; } if (G.outcnt == 0L) /* inflate's final FLUSH sets outcnt */ break; break; default: if (uO.tflag) error = PK_ERR | ((int)method << 8); else { Info(slide, 0x401, ((char *)slide, LoadFarString(UnsupportedExtraField), method)); error = PK_ERR; /* GRR: should be passed on up via SetEAs() */ } break; } G.inptr = old_inptr; G.incnt = old_incnt; G.csize = old_csize; G.mem_mode = FALSE; if (!error) { register ulg crcval = crc32(CRCVAL_INITIAL, tgt, (extent)G.outcnt); if (crcval != extra_field_crc) { if (uO.tflag) error = PK_ERR | (DEFLATED << 8); /* kludge for now */ else { Info(slide, 0x401, ((char *)slide, LoadFarString(BadExtraFieldCRC), G.zipfn, crcval, extra_field_crc)); error = PK_ERR; } } } return error; } /* end function memextract() */ /*************************/ /* Function memflush() */ /*************************/ int memflush(__G__ rawbuf, size) __GDEF uch *rawbuf; ulg size; { if (size > G.outsize) /* Here, PK_DISK is a bit off-topic, but in the sense of marking "overflow of output space", its use may be tolerated. */ return PK_DISK; /* more data than output buffer can hold */ memcpy((char *)G.outbufptr, (char *)rawbuf, (extent)size); G.outbufptr += (unsigned int)size; G.outsize -= size; G.outcnt += size; return 0; } /* end function memflush() */ /*************************/ /* Function fnfilter() */ /* here instead of in list.c for SFX */ /*************************/ char *fnfilter(raw, space) /* convert name to safely printable form */ ZCONST char *raw; uch *space; { #ifndef NATIVE /* ASCII: filter ANSI escape codes, etc. */ uch *r=(uch *)raw, *s=space; while (*r) { #ifdef QDOS if (qlflag & 2) { if (*r == '/' || *r == '.') { ++r; *s++ = '_'; continue; } } else #endif if (*r < 32) { *s++ = '^', *s++ = (uch)(64 + *r++); } else { #ifdef _MBCS unsigned i; for (i = CLEN(r); i > 0; i--) *s++ = *r++; #else *s++ = *r++; #endif } } *s = 0; #ifdef WINDLL INTERN_TO_ISO((char *)space, (char *)space); /* translate to ANSI */ #else #ifdef WIN32 /* Win9x console always uses OEM character coding, and WinNT console is set to OEM charset by default, too */ INTERN_TO_OEM((char *)space, (char *)space); #endif /* WIN32 */ #endif /* ?WINDLL */ return (char *)space; #else /* NATIVE: EBCDIC or whatever */ return (char *)raw; #endif } /* end function fnfilter() */ #ifdef SET_DIR_ATTRIB /* must sort saved directories so can set perms from bottom up */ /************************/ /* Function dircomp() */ /************************/ static int dircomp(a, b) /* used by qsort(); swiped from Zip */ ZCONST zvoid *a, *b; { /* order is significant: this sorts in reverse order (deepest first) */ return strcmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); /* return namecmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); */ } #if 0 /* not used in Unix, but maybe for future OSes? */ /************************/ /* Function namecmp() */ /************************/ static int namecmp(s1, s2) /* [not] used by dircomp(); swiped from Zip */ ZCONST char *s1, *s2; { int d; for (;;) { d = (int)(uch)case_map(*s1) - (int)(uch)case_map(*s2); if (d || *s1 == 0 || *s2 == 0) return d; s1++; s2++; } } #endif /* 0 */ #endif /* SET_DIR_ATTRIB */ *[UNZIP542]FILEIO.C;1+, ./ 4u- 0@123KPWO56n@:a7n@:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- fileio.c This file contains routines for doing direct but relatively generic input/ output, file-related sorts of things, plus some miscellaneous stuff. Most of the stuff has to do with opening, closing, reading and/or writing files. Contains: open_input_file() open_outfile() (non-VMS, non-AOS/VS, non-CMS_MVS) undefer_input() defer_leftover_input() readbuf() readbyte() fillinbuf() flush() (non-VMS) disk_error() (non-VMS) UzpMessagePrnt() UzpMessageNull() (DLL only) UzpInput() UzpMorePause() UzpPassword() (non-WINDLL) handler() dos_to_unix_time() (non-VMS, non-VM/CMS, non-MVS) check_for_newer() (non-VMS, non-OS/2, non-VM/CMS, non-MVS) do_string() makeword() makelong() str2iso() (CRYPT && NEED_STR2ISO, only) str2oem() (CRYPT && NEED_STR2OEM, only) memset() (ZMEM only) memcpy() (ZMEM only) zstrnicmp() (NO_STRNICMP only) zstat() (REGULUS only) plastchar() (_MBCS only) uzmbschr() (_MBCS && NEED_UZMBSCHR, only) uzmbsrchr() (_MBCS && NEED_UZMBSRCHR, only) fLoadFarString() (SMALL_MEM only) fLoadFahl UNZIP.BCK  [UNZIP542]FILEIO.C;1rStringSmall() (SMALL_MEM only) fLoadFarStringSmall2() (SMALL_MEM only) zfstrcpy() (SMALL_MEM only) ---------------------------------------------------------------------------*/ #define __FILEIO_C /* identifies this source module */ #define UNZIP_INTERNAL #include "unzip.h" #ifdef WINDLL # include "windll/windll.h" # include #endif #include "crypt.h" #include "ttyio.h" /* setup of codepage conversion for decryption passwords */ #if CRYPT # if (defined(CRYP_USES_ISO2OEM) && !defined(IZ_ISO2OEM_ARRAY)) # define IZ_ISO2OEM_ARRAY /* pull in iso2oem[] table */ # endif # if (defined(CRYP_USES_OEM2ISO) && !defined(IZ_OEM2ISO_ARRAY)) # define IZ_OEM2ISO_ARRAY /* pull in oem2iso[] table */ # endif #endif #include "ebcdic.h" /* definition/initialization of ebcdic[] */ /* Note: Under Windows, the maximum size of the buffer that can be used with any of the *printf calls is 16,384, so win_fprintf was used to feed the fprintf clone no more than 16K chunks at a time. This should be valid for anything up to 64K (and probably beyond, assuming your buffers are that big). */ #ifdef WINDLL # define WriteError(buf,len,strm) \ (win_fprintf(pG, strm, (extent)len, (char far *)buf) != (int)(len)) #else /* !WINDLL */ # ifdef USE_FWRITE # define WriteError(buf,len,strm) \ ((extent)fwrite((char *)(buf),1,(extent)(len),strm) != (extent)(len)) # else # define WriteError(buf,len,strm) \ ((extent)write(fileno(strm),(char *)(buf),(extent)(len)) != (extent)(len)) # endif #endif /* ?WINDLL */ static int disk_error OF((__GPRO)); /****************************/ /* Strings used in fileio.c */ /****************************/ #if (defined(BEO_THS_UNX) || defined(DOS_FLX_NLM_OS2_W32)) static ZCONST char Far CannotDeleteOldFile[] = "error: cannot delete old %s\n"; #ifdef UNIXBACKUP static ZCONST char Far CannotRenameOldFile[] = "error: cannot rename old %s\n"; static ZCONST char Far BackupSuffix[] = "~"; #endif #endif /* BEO_THS_UNX || DOS_FLX_NLM_OS2_W32 */ static ZCONST char Far CannotOpenZipfile[] = "error: cannot open zipfile [ %s ]\n"; #if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) static ZCONST char Far CannotCreateFile[] = "error: cannot create %s\n"; #endif #ifdef NOVELL_BUG_FAILSAFE static ZCONST char Far NovellBug[] = "error: %s: stat() says does not exist, but fopen() found anyway\n"; #endif static ZCONST char Far ReadError[] = "error: zipfile read error\n"; static ZCONST char Far FilenameTooLongTrunc[] = "warning: filename too long--truncating.\n"; static ZCONST char Far ExtraFieldTooLong[] = "warning: extra field too long (%d). Ignoring...\n"; #ifdef WINDLL static ZCONST char Far DiskFullQuery[] = "%s: write error (disk full?).\n"; #else static ZCONST char Far DiskFullQuery[] = "%s: write error (disk full?). Continue? (y/n/^C) "; static ZCONST char Far ZipfileCorrupt[] = "error: zipfile probably corrupt (%s)\n"; # ifdef SYMLINKS static ZCONST char Far FileIsSymLink[] = "%s exists and is a symbolic link%s.\n"; # endif # ifdef MORE static ZCONST char Far MorePrompt[] = "--More--(%lu)"; # endif static ZCONST char Far QuitPrompt[] = "--- Press `Q' to quit, or any other key to continue ---"; static ZCONST char Far HidePrompt[] = /* "\r \r"; */ "\r \r"; # if CRYPT # ifdef MACOS /* SPC: are names on MacOS REALLY so much longer than elsewhere ??? */ static ZCONST char Far PasswPrompt[] = "[%s]\n %s password: "; # else static ZCONST char Far PasswPrompt[] = "[%s] %s password: "; # endif static ZCONST char Far PasswPrompt2[] = "Enter password: "; static ZCONST char Far PasswRetry[] = "password incorrect--reenter: "; # endif /* CRYPT */ #endif /* !WINDLL */ /******************************/ /* Function open_input_file() */ /******************************/ int open_input_file(__G) /* return 1 if open failed */ __GDEF { /* * open the zipfile for reading and in BINARY mode to prevent cr/lf * translation, which would corrupt the bitstreams */ #ifdef VMS G.zipfd = open(G.zipfn, O_RDONLY, 0, "ctx=stm"); #else /* !VMS */ #ifdef MACOS G.zipfd = open(G.zipfn, 0); #else /* !MACOS */ #ifdef CMS_MVS G.zipfd = vmmvs_open_infile(__G); #else /* !CMS_MVS */ #ifdef USE_STRM_INPUT G.zipfd = fopen(G.zipfn, FOPR); #else /* !USE_STRM_INPUT */ # ifdef O_BINARY G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY); # else G.zipfd = open(G.zipfn, O_RDONLY); # endif #endif /* ?USE_STRM_INPUT */ #endif /* ?CMS_MVS */ #endif /* ?MACOS */ #endif /* ?VMS */ #ifdef USE_STRM_INPUT if (G.zipfd == NULL) #else /* if (G.zipfd < 0) */ /* no good for Windows CE port */ if (G.zipfd == -1) #endif { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotOpenZipfile), G.zipfn)); return 1; } return 0; } /* end function open_input_file() */ #if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) /***************************/ /* Function open_outfile() */ /***************************/ int open_outfile(__G) /* return 1 if fail */ __GDEF { #ifdef DLL if (G.redirect_data) return (redirect_outfile(__G) == FALSE); #endif #ifdef QDOS QFilename(__G__ G.filename); #endif #if (defined(DOS_FLX_NLM_OS2_W32) || defined(BEO_THS_UNX)) #ifdef BORLAND_STAT_BUG /* Borland 5.0's stat() barfs if the filename has no extension and the * file doesn't exist. */ if (access(G.filename, 0) == -1) { FILE *tmp = fopen(G.filename, "wb+"); /* file doesn't exist, so create a dummy file to keep stat() from * failing (will be over-written anyway) */ fputc('0', tmp); /* just to have something in the file */ fclose(tmp); } #endif /* BORLAND_STAT_BUG */ #ifdef SYMLINKS if (SSTAT(G.filename, &G.statbuf) == 0 || lstat(G.filename,&G.statbuf) == 0) #else if (SSTAT(G.filename, &G.statbuf) == 0) #endif /* ?SYMLINKS */ { Trace((stderr, "open_outfile: stat(%s) returns 0: file exists\n", FnFilter1(G.filename))); #ifdef UNIXBACKUP if (uO.B_flag) { /* do backup */ char *tname; int blen, flen, tlen; blen = strlen(BackupSuffix); flen = strlen(G.filename); tlen = flen + blen + 1; if (tlen >= FILNAMSIZ) { /* in case name is too long, truncate */ tname = (char *)malloc(FILNAMSIZ); if (tname == NULL) return 1; /* in case we run out of space */ tlen = FILNAMSIZ - 1 - blen; strcpy(tname, G.filename); /* make backup name */ tname[tlen] = '\0'; } else { tname = (char *)malloc(tlen); if (tname == NULL) return 1; /* in case we run out of space */ strcpy(tname, G.filename); /* make backup name */ } strcpy(tname+flen, BackupSuffix); /* GRR: should check if backup file exists, apply -n/-o to that */ if (rename(G.filename, tname) < 0) { /* move file */ Info(slide, 0x401, ((char *)slide, LoadFarString(CannotRenameOldFile), FnFilter1(G.filename))); free(tname); return 1; } free(tname); iY UNZIP.BCK  [UNZIP542]FILEIO.C;1i} else #endif /* UNIXBACKUP */ #ifdef DOS_FLX_OS2_W32 if (!(G.statbuf.st_mode & S_IWRITE)) { Trace((stderr, "open_outfile: existing file %s is read-only\n", FnFilter1(G.filename))); chmod(G.filename, S_IREAD | S_IWRITE); Trace((stderr, "open_outfile: %s now writable\n", FnFilter1(G.filename))); } #endif /* DOS_FLX_OS2_W32 */ #ifdef NLM /* Give the file read/write permission (non-POSIX shortcut) */ chmod(G.filename, 0); #endif /* NLM */ if (unlink(G.filename) != 0) { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotDeleteOldFile), FnFilter1(G.filename))); return 1; } Trace((stderr, "open_outfile: %s now deleted\n", FnFilter1(G.filename))); } #endif /* DOS_FLX_NLM_OS2_W32 || BEO_THS_UNX */ #ifdef RISCOS if (SWI_OS_File_7(G.filename,0xDEADDEAD,0xDEADDEAD,G.lrec.ucsize)!=NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), FnFilter1(G.filename))); return 1; } #endif /* RISCOS */ #ifdef TOPS20 char *tfilnam; if ((tfilnam = (char *)malloc(2*strlen(G.filename)+1)) == (char *)NULL) return 1; strcpy(tfilnam, G.filename); upper(tfilnam); enquote(tfilnam); if ((G.outfile = fopen(tfilnam, FOPW)) == (FILE *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), tfilnam)); free(tfilnam); return 1; } free(tfilnam); #else /* !TOPS20 */ #ifdef MTS if (uO.aflag) G.outfile = fopen(G.filename, FOPWT); else G.outfile = fopen(G.filename, FOPW); if (G.outfile == (FILE *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), FnFilter1(G.filename))); return 1; } #else /* !MTS */ #ifdef TANDEM if (SSTAT(G.filename, &G.statbuf) == 0) { Trace((stderr, "open_outfile: stat(%s) returns 0: file exists\n", FnFilter1(G.filename))); if (unlink(G.filename) != 0) { Trace((stderr, "open_outfile: existing file %s is read-only\n", FnFilter1(G.filename))); chmod(G.filename, S_IRUSR | S_IWUSR); Trace((stderr, "open_outfile: %s now writable\n", FnFilter1(G.filename))); if (unlink(G.filename) != 0) return 1; } Trace((stderr, "open_outfile: %s now deleted\n", FnFilter1(G.filename))); } if (G.pInfo->textmode) G.outfile = fopen(G.filename, FOPWT); else G.outfile = fopen(G.filename, FOPW); if (G.outfile == (FILE *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), FnFilter1(G.filename))); return 1; } #else /* !TANDEM */ #ifdef DEBUG Info(slide, 1, ((char *)slide, "open_outfile: doing fopen(%s) for reading\n", FnFilter1(G.filename))); if ((G.outfile = fopen(G.filename, FOPR)) == (FILE *)NULL) Info(slide, 1, ((char *)slide, "open_outfile: fopen(%s) for reading failed: does not exist\n", FnFilter1(G.filename))); else { Info(slide, 1, ((char *)slide, "open_outfile: fopen(%s) for reading succeeded: file exists\n", FnFilter1(G.filename))); fclose(G.outfile); } #endif /* DEBUG */ #ifdef NOVELL_BUG_FAILSAFE if (G.dne && ((G.outfile = fopen(G.filename, FOPR)) != (FILE *)NULL)) { Info(slide, 0x401, ((char *)slide, LoadFarString(NovellBug), FnFilter1(G.filename))); fclose(G.outfile); return 1; /* with "./" fix in checkdir(), should never reach here */ } #endif /* NOVELL_BUG_FAILSAFE */ Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", FnFilter1(G.filename))); if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), FnFilter1(G.filename))); return 1; } Trace((stderr, "open_outfile: fopen(%s) for writing succeeded\n", FnFilter1(G.filename))); #endif /* !TANDEM */ #endif /* !MTS */ #endif /* !TOPS20 */ #ifdef USE_FWRITE #ifdef DOS_NLM_OS2_W32 /* 16-bit MSC: buffer size must be strictly LESS than 32K (WSIZE): bogus */ setbuf(G.outfile, (char *)NULL); /* make output unbuffered */ #else /* !DOS_OS2_W32 */ #ifndef RISCOS #ifdef _IOFBF /* make output fully buffered (works just about like write()) */ setvbuf(G.outfile, (char *)slide, _IOFBF, WSIZE); #else setbuf(G.outfile, (char *)slide); #endif #endif /* !RISCOS */ #endif /* ?DOS_OS2_W32 */ #endif /* USE_FWRITE */ return 0; } /* end function open_outfile() */ #endif /* !VMS && !AOS_VS && !CMS_MVS && !MACOS */ /* * These functions allow NEXTBYTE to function without needing two bounds * checks. Call defer_leftover_input() if you ever have filled G.inbuf * by some means other than readbyte(), and you then want to start using * NEXTBYTE. When going back to processing bytes without NEXTBYTE, call * undefer_input(). For example, extract_or_test_member brackets its * central section that does the decompression with these two functions. * If you need to check the number of bytes remaining in the current * file while using NEXTBYTE, check (G.csize + G.incnt), not G.csize. */ /****************************/ /* function undefer_input() */ /****************************/ void undefer_input(__G) __GDEF { if (G.incnt > 0) G.csize += G.incnt; if (G.incnt_leftover > 0) { /* We know that "(G.csize < MAXINT)" so we can cast G.csize to int: * This condition was checked when G.incnt_leftover was set > 0 in * defer_leftover_input(), and it is NOT allowed to touch G.csize * before calling undefer_input() when (G.incnt_leftover > 0) * (single exception: see read_byte()'s "G.csize <= 0" handling) !! */ G.incnt = G.incnt_leftover + (int)G.csize; G.inptr = G.inptr_leftover - (int)G.csize; G.incnt_leftover = 0; } else if (G.incnt < 0) G.incnt = 0; } /* end function undefer_input() */ /***********************************/ /* function defer_leftover_input() */ /***********************************/ void defer_leftover_input(__G) __GDEF { if ((long)G.incnt > G.csize) { /* (G.csize < MAXINT), we can safely cast it to int !! */ if (G.csize < 0L) G.csize = 0L; G.inptr_leftover = G.inptr + (int)G.csize; G.incnt_leftover = G.incnt - (int)G.csize; G.incnt = (int)G.csize; } else G.incnt_leftover = 0; G.csize -= G.incnt; } /* end function defer_leftover_input() */ /**********************/ /* Function readbuf() */ /**********************/ unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */ __GDEF char *buf; register unsigned size; { register unsigned count; unsigned n; n = size; while (size) { if (G.incnt <= 0) { if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) return (n-size); else if (G.incnt < 0) { /* another hack, but no real harm copying same thing twice */ (*G.message)((zvoid *)&G, (uch *)LoadFarString(ReadError), /* CANNOT use slide */ (ulg)strlen(LoadFarString(ReadError)), 0x401); return 0; /* discarding some data; better than lock-up */ } /* buffer ALWAYS starts on a block boundary: */ G.cur_zipfile_bufstart += Ij˄~ UNZIP.BCK  [UNZIP542]FILEIO.C;1#NBUFSIZ; G.inptr = G.inbuf; } count = MIN(size, (unsigned)G.incnt); memcpy(buf, G.inptr, count); buf += count; G.inptr += count; G.incnt -= count; size -= count; } return n; } /* end function readbuf() */ /***********************/ /* Function readbyte() */ /***********************/ int readbyte(__G) /* refill inbuf and return a byte if available, else EOF */ __GDEF { if (G.mem_mode) return EOF; if (G.csize <= 0) { G.csize--; /* for tests done after exploding */ G.incnt = 0; return EOF; } if (G.incnt <= 0) { if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) { G.incnt = 0; /* do not allow negative value to affect stuff */ return EOF; } else if (G.incnt < 0) { /* "fail" (abort, retry, ...) returns this */ /* another hack, but no real harm copying same thing twice */ (*G.message)((zvoid *)&G, (uch *)LoadFarString(ReadError), (ulg)strlen(LoadFarString(ReadError)), 0x401); echon(); #ifdef WINDLL longjmp(dll_error_return, 1); #else DESTROYGLOBALS() EXIT(PK_BADERR); /* totally bailing; better than lock-up */ #endif } G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on block bndry */ G.inptr = G.inbuf; defer_leftover_input(__G); /* decrements G.csize */ } #if CRYPT if (G.pInfo->encrypted) { uch *p; int n; /* This was previously set to decrypt one byte beyond G.csize, when * incnt reached that far. GRR said, "but it's required: why?" This * was a bug in fillinbuf() -- was it also a bug here? */ for (n = G.incnt, p = G.inptr; n--; p++) zdecode(*p); } #endif /* CRYPT */ --G.incnt; return *G.inptr++; } /* end function readbyte() */ #ifdef USE_ZLIB /************************/ /* Function fillinbuf() */ /************************/ int fillinbuf(__G) /* like readbyte() except returns number of bytes in inbuf */ __GDEF { if (G.mem_mode || (G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) <= 0) return 0; G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on a block boundary */ G.inptr = G.inbuf; defer_leftover_input(__G); /* decrements G.csize */ #if CRYPT if (G.pInfo->encrypted) { uch *p; int n; for (n = G.incnt, p = G.inptr; n--; p++) zdecode(*p); } #endif /* CRYPT */ return G.incnt; } /* end function fillinbuf() */ #endif /* USE_ZLIB */ #ifndef VMS /* for VMS use code in vms.c */ /********************/ /* Function flush() */ /* returns PK error codes: */ /********************/ /* if cflag => always 0; PK_DISK if write error */ int flush(__G__ rawbuf, size, unshrink) __GDEF uch *rawbuf; ulg size; int unshrink; { register uch *p, *q; uch *transbuf; #if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) ulg transbufsiz; #endif /* static int didCRlast = FALSE; moved to globals.h */ /*--------------------------------------------------------------------------- Compute the CRC first; if testing or if disk is full, that's it. ---------------------------------------------------------------------------*/ G.crc32val = crc32(G.crc32val, rawbuf, (extent)size); #ifdef DLL if ((G.statreportcb != NULL) && (*G.statreportcb)(__G__ UZ_ST_IN_PROGRESS, G.zipfn, G.filename, NULL)) return IZ_CTRLC; /* cancel operation by user request */ #endif if (uO.tflag || size == 0L) /* testing or nothing to write: all done */ return PK_OK; if (G.disk_full) return PK_DISK; /* disk already full: ignore rest of file */ /*--------------------------------------------------------------------------- Write the bytes rawbuf[0..size-1] to the output device, first converting end-of-lines and ASCII/EBCDIC as needed. If SMALL_MEM or MED_MEM are NOT defined, outbuf is assumed to be at least as large as rawbuf and is not necessarily checked for overflow. ---------------------------------------------------------------------------*/ if (!G.pInfo->textmode) { /* write raw binary data */ /* GRR: note that for standard MS-DOS compilers, size argument to * fwrite() can never be more than 65534, so WriteError macro will * have to be rewritten if size can ever be that large. For now, * never more than 32K. Also note that write() returns an int, which * doesn't necessarily limit size to 32767 bytes if write() is used * on 16-bit systems but does make it more of a pain; however, because * at least MSC 5.1 has a lousy implementation of fwrite() (as does * DEC Ultrix cc), write() is used anyway. */ #ifdef DLL if (G.redirect_data) writeToMemory(__G__ rawbuf, size); else #endif if (!uO.cflag && WriteError(rawbuf, size, G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, rawbuf, size, 0)) return 0; } else { /* textmode: aflag is true */ if (unshrink) { /* rawbuf = outbuf */ transbuf = G.outbuf2; #if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) transbufsiz = TRANSBUFSIZ; #endif } else { /* rawbuf = slide */ transbuf = G.outbuf; #if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) transbufsiz = OUTBUFSIZ; Trace((stderr, "\ntransbufsiz = OUTBUFSIZ = %u\n", OUTBUFSIZ)); #endif } if (G.newfile) { #ifdef VMS_TEXT_CONV /* GRR: really want to check if -aa (or -aaa?) was given... */ if (rawbuf[1]) { /* first line is more than 255 chars long */ Trace((stderr, "\nfirst line of VMS `text' too long; switching to normal extraction\n")); G.VMS_line_state = -1; /* -1: don't treat as VMS text */ } else G.VMS_line_state = 0; /* 0: ready to read line length */ #endif G.didCRlast = FALSE; /* no previous buffers written */ G.newfile = FALSE; } #ifdef VMS_TEXT_CONV if (G.pInfo->hostnum == VMS_ && G.extra_field && G.VMS_line_state >= 0) { /* GRR: really want to check for actual VMS extra field, and * ideally for variable-length record format */ /* printf("\n>>>>>> GRR: file is VMS text and has an extra field\n"); */ p = rawbuf; q = transbuf; while(p < rawbuf+(unsigned)size) { switch (G.VMS_line_state) { /* 0: ready to read line length */ case 0: G.VMS_line_length = 0; G.VMS_line_pad = 0; if (p == rawbuf+(unsigned)size-1) { /* last char */ G.VMS_line_length = (int)((uch)(*p++)); G.VMS_line_state = 1; } else { G.VMS_line_length = makeword(p); p += 2; G.VMS_line_state = 2; } if (G.VMS_line_length & 1) /* odd */ G.VMS_line_pad = 1; break; k| UNZIP.BCK  [UNZIP542]FILEIO.C;1:2 /* 1: read one byte of length, need second */ case 1: G.VMS_line_length += ((int)((uch)(*p++)) << 8); G.VMS_line_state = 2; break; /* 2: ready to read VMS_line_length chars */ case 2: if (G.VMS_line_length < rawbuf+(unsigned)size-p) { if (G.VMS_line_length >= transbuf+(unsigned)transbufsiz-q) { int outroom = transbuf+(unsigned)transbufsiz-q; /* GRR: need to change this to *q++ = native(*p++); loop or something */ memcpy(q, p, outroom); #ifdef DLL if (G.redirect_data) writeToMemory(__G__ transbuf, (unsigned)outroom); else #endif if (!uO.cflag && WriteError(transbuf, (unsigned)outroom, G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, (ulg)outroom, 0)) return 0; q = transbuf; p += outroom; G.VMS_line_length -= outroom; /* fall through to normal case */ } /* GRR: need to change this to *q++ = native(*p++); loop or something */ memcpy(q, p, G.VMS_line_length); q += G.VMS_line_length; p += G.VMS_line_length; G.VMS_line_length = 0; /* necessary?? */ G.VMS_line_state = 3; } else { /* remaining input is less than full line */ int remaining = rawbuf+(unsigned)size-p; if (remaining < transbuf+(unsigned)transbufsiz-q) { int outroom = transbuf+(unsigned)transbufsiz-q; /* GRR: need to change this to *q++ = native(*p++); loop or something */ memcpy(q, p, outroom); #ifdef DLL if (G.redirect_data) writeToMemory(__G__ transbuf, (unsigned)(outroom)); else #endif if (!uO.cflag && WriteError(transbuf, (unsigned)outroom, G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, (ulg)outroom, 0)) return 0; q = transbuf; p += outroom; remaining -= outroom; } /* GRR: need to change this to *q++ = native(*p++); loop or something */ memcpy(q, p, remaining); q += remaining; p += remaining; G.VMS_line_length -= remaining; /* no change in G.VMS_line_state */ } break; /* 3: ready to PutNativeEOL */ case 3: if (q > transbuf+(unsigned)transbufsiz-lenEOL) { #ifdef DLL if (G.redirect_data) writeToMemory(__G__ transbuf, (unsigned)(q-transbuf)); else #endif if (!uO.cflag && WriteError(transbuf, (unsigned)(q-transbuf), G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, (ulg)(q-transbuf), 0)) return 0; q = transbuf; } PutNativeEOL if (G.VMS_line_pad) if (p < rawbuf+(unsigned)size) { ++p; G.VMS_line_state = 0; } else G.VMS_line_state = 4; else G.VMS_line_state = 0; break; /* 4: ready to read pad byte */ case 4: ++p; G.VMS_line_state = 0; break; } } /* end while */ } else #endif /* VMS_TEXT_CONV */ /*----------------------------------------------------------------------- Algorithm: CR/LF => native; lone CR => native; lone LF => native. This routine is only for non-raw-VMS, non-raw-VM/CMS files (i.e., stream-oriented files, not record-oriented). -----------------------------------------------------------------------*/ /* else not VMS text */ { p = rawbuf; if (*p == LF && G.didCRlast) ++p; G.didCRlast = FALSE; for (q = transbuf; p < rawbuf+(unsigned)size; ++p) { if (*p == CR) { /* lone CR or CR/LF: treat as EOL */ PutNativeEOL if (p == rawbuf+(unsigned)size-1) /* last char in buffer */ G.didCRlast = TRUE; else if (p[1] == LF) /* get rid of accompanying LF */ ++p; } else if (*p == LF) /* lone LF */ PutNativeEOL else #ifndef DOS_FLX_OS2_W32 if (*p != CTRLZ) /* lose all ^Z's */ #endif *q++ = native(*p); #if (defined(SMALL_MEM) || defined(MED_MEM)) # if (lenEOL == 1) /* don't check unshrink: both buffers small but equal */ if (!unshrink) # endif /* check for danger of buffer overflow and flush */ if (q > transbuf+(unsigned)transbufsiz-lenEOL) { Trace((stderr, "p - rawbuf = %u q-transbuf = %u size = %lu\n", (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); if (!uO.cflag && WriteError(transbuf, (unsigned)(q-transbuf), G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, (ulg)(q-transbuf), 0)) return 0; q = transbuf; continue; } #endif /* SMALL_MEM || MED_MEM */ } } /*----------------------------------------------------------------------- Done translating: write whatever we've got to file (or screen). -----------------------------------------------------------------------*/ Trace(l1 UNZIP.BCK  [UNZIP542]FILEIO.C;1A(stderr, "p - rawbuf = %u q-transbuf = %u size = %lu\n", (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); if (q > transbuf) { #ifdef DLL if (G.redirect_data) writeToMemory(__G__ transbuf, (unsigned)(q-transbuf)); else #endif if (!uO.cflag && WriteError(transbuf, (unsigned)(q-transbuf), G.outfile)) return disk_error(__G); else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, (ulg)(q-transbuf), 0)) return 0; } } return 0; } /* end function flush() */ /*************************/ /* Function disk_error() */ /*************************/ static int disk_error(__G) __GDEF { /* OK to use slide[] here because this file is finished regardless */ Info(slide, 0x4a1, ((char *)slide, LoadFarString(DiskFullQuery), FnFilter1(G.filename))); #ifndef WINDLL fgets(G.answerbuf, 9, stdin); if (*G.answerbuf == 'y') /* stop writing to this file */ G.disk_full = 1; /* (outfile bad?), but new OK */ else #endif G.disk_full = 2; /* no: exit program */ return PK_DISK; } /* end function disk_error() */ #endif /* !VMS */ /*****************************/ /* Function UzpMessagePrnt() */ /*****************************/ int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) zvoid *pG; /* globals struct: always passed */ uch *buf; /* preformatted string to be printed */ ulg size; /* length of string (may include nulls) */ int flag; /* flag bits */ { /* IMPORTANT NOTE: * The name of the first parameter of UzpMessagePrnt(), which passes * the "Uz_Globs" address, >>> MUST <<< be identical to the string * expansion of the __G__ macro in the REENTRANT case (see globals.h). * This name identity is mandatory for the LoadFarString() macro * (in the SMALL_MEM case) !!! */ int error; uch *q=buf, *endbuf=buf+(unsigned)size; #ifdef MORE uch *p=buf; #if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) int islinefeed = FALSE; #endif #endif FILE *outfp; /*--------------------------------------------------------------------------- These tests are here to allow fine-tuning of UnZip's output messages, but none of them will do anything without setting the appropriate bit in the flag argument of every Info() statement which is to be turned *off*. That is, all messages are currently turned on for all ports. To turn off *all* messages, use the UzpMessageNull() function instead of this one. ---------------------------------------------------------------------------*/ #if (defined(OS2) && defined(DLL)) if (MSG_NO_DLL2(flag)) /* if OS/2 DLL bit is set, do NOT print this msg */ return 0; #endif #ifdef WINDLL if (MSG_NO_WDLL(flag)) return 0; #endif #ifdef WINDLL if (MSG_NO_WGUI(flag)) return 0; #endif /* #ifdef ACORN_GUI if (MSG_NO_AGUI(flag)) return 0; #endif */ #ifdef DLL /* don't display message if data is redirected */ if (((Uz_Globs *)pG)->redirect_data && !((Uz_Globs *)pG)->redirect_text) return 0; #endif if (MSG_STDERR(flag) && !((Uz_Globs *)pG)->UzO.tflag) outfp = (FILE *)stderr; else outfp = (FILE *)stdout; #ifdef QUERY_TRNEWLN /* some systems require termination of query prompts with '\n' to force * immediate display */ if (MSG_MNEWLN(flag)) { /* assumes writable buffer (e.g., slide[]) */ *endbuf++ = '\n'; /* with room for one more char at end of buf */ ++size; /* (safe assumption: only used for four */ } /* short queries in extract.c and fileio.c) */ #endif if (MSG_TNEWLN(flag)) { /* again assumes writable buffer: fragile... */ if ((!size && !((Uz_Globs *)pG)->sol) || (size && (endbuf[-1] != '\n'))) { *endbuf++ = '\n'; ++size; } } #ifdef MORE # ifdef SCREENSIZE /* room for --More-- and one line of overlap: */ # if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) SCREENSIZE(&((Uz_Globs *)pG)->height, &((Uz_Globs *)pG)->width); # else SCREENSIZE(&((Uz_Globs *)pG)->height, (int *)NULL); # endif ((Uz_Globs *)pG)->height -= 2; # else /* room for --More-- and one line of overlap: */ ((Uz_Globs *)pG)->height = SCREENLINES - 2; # if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) ((Uz_Globs *)pG)->width = SCREENWIDTH; # endif # endif #endif /* MORE */ if (MSG_LNEWLN(flag) && !((Uz_Globs *)pG)->sol) { /* not at start of line: want newline */ #ifdef OS2DLL if (!((Uz_Globs *)pG)->redirect_text) { #endif putc('\n', outfp); fflush(outfp); #ifdef MORE if (((Uz_Globs *)pG)->M_flag) { #if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) ((Uz_Globs *)pG)->chars = 0; #endif ++((Uz_Globs *)pG)->numlines; ++((Uz_Globs *)pG)->lines; if (((Uz_Globs *)pG)->lines >= ((Uz_Globs *)pG)->height) (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, LoadFarString(MorePrompt), 1); } #endif /* MORE */ if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && !isatty(1) && isatty(2)) { /* error output from testing redirected: also send to stderr */ putc('\n', stderr); fflush(stderr); } #ifdef OS2DLL } else REDIRECTC('\n'); #endif ((Uz_Globs *)pG)->sol = TRUE; } /* put zipfile name, filename and/or error/warning keywords here */ #ifdef MORE if (((Uz_Globs *)pG)->M_flag #ifdef OS2DLL && !((Uz_Globs *)pG)->redirect_text #endif ) { while (p < endbuf) { if (*p == '\n') { #if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) islinefeed = TRUE; } else if (SCREENLWRAP) { if (*p == '\r') { ((Uz_Globs *)pG)->chars = 0; } else { # ifdef TABSIZE if (*p == '\t') ((Uz_Globs *)pG)->chars += (TABSIZE - (((Uz_Globs *)pG)->chars % TABSIZE)); else # endif ++((Uz_Globs *)pG)->chars; if (((Uz_Globs *)pG)->chars >= ((Uz_Globs *)pG)->width) islinefeed = TRUE; } } if (islinefeed) { islinefeed = FALSE; ((Uz_Globs *)pG)->chars = 0; #endif /* (SCREENWIDTH && SCREEN_LWRAP) */ ++((Uz_Globs *)pG)->numlines; ++((Uz_Globs *)pG)->lines; if (((Uz_Globs *)pG)->lines >= ((Uz_Globs *)pG)->height) { if ((error = WriteError(q, p-q+1, outfp)) != 0) return error; fflush(outfp); ((Uz_Globs *)pG)->sol = TRUE; q = p + 1; (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, LoadFarString(MorePrompt), 1); } } INCSTR(p); } /* end while */ size = (ulg)(p - q); /* remaining text */ } #endif /* MORE */ if (size) { #ifdef OS2DLL if (!((Uz_Globs *)pG)->redirect_text) { #endif if ((error = WriteError(q, size, outfp)) != 0) return error; mO׃ UNZIP.BCK  [UNZIP542]FILEIO.C;1qP fflush(outfp); if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && !isatty(1) && isatty(2)) { /* error output from testing redirected: also send to stderr */ if ((error = WriteError(q, size, stderr)) != 0) return error; fflush(stderr); } #ifdef OS2DLL } else { /* GRR: this is ugly: hide with macro */ if ((error = REDIRECTPRINT(q, size)) != 0) return error; } #endif /* OS2DLL */ ((Uz_Globs *)pG)->sol = (endbuf[-1] == '\n'); } return 0; } /* end function UzpMessagePrnt() */ #ifdef DLL /*****************************/ /* Function UzpMessageNull() */ /* convenience routine for no output at all */ /*****************************/ int UZ_EXP UzpMessageNull(pG, buf, size, flag) zvoid *pG; /* globals struct: always passed */ uch *buf; /* preformatted string to be printed */ ulg size; /* length of string (may include nulls) */ int flag; /* flag bits */ { return 0; } /* end function UzpMessageNull() */ #endif /* DLL */ /***********************/ /* Function UzpInput() */ /* GRR: this is a placeholder for now */ /***********************/ int UZ_EXP UzpInput(pG, buf, size, flag) zvoid *pG; /* globals struct: always passed */ uch *buf; /* preformatted string to be printed */ int *size; /* (address of) size of buf and of returned string */ int flag; /* flag bits (bit 0: no echo) */ { /* tell picky compilers to shut up about "unused variable" warnings */ pG = pG; buf = buf; flag = flag; *size = 0; return 0; } /* end function UzpInput() */ #if (!defined(WINDLL) && !defined(MACOS)) /***************************/ /* Function UzpMorePause() */ /***************************/ void UZ_EXP UzpMorePause(pG, prompt, flag) zvoid *pG; /* globals struct: always passed */ ZCONST char *prompt; /* "--More--" prompt */ int flag; /* 0 = any char OK; 1 = accept only '\n', ' ', q */ { uch c; /*--------------------------------------------------------------------------- Print a prompt and wait for the user to press a key, then erase prompt if possible. ---------------------------------------------------------------------------*/ if (!((Uz_Globs *)pG)->sol) fprintf(stderr, "\n"); /* numlines may or may not be used: */ fprintf(stderr, prompt, ((Uz_Globs *)pG)->numlines); fflush(stderr); if (flag & 1) { do { c = (uch)FGETCH(0); } while ( #ifdef THEOS c != 17 && /* standard QUIT key */ #endif c != '\r' && c != '\n' && c != ' ' && c != 'q' && c != 'Q'); } else c = (uch)FGETCH(0); /* newline was not echoed, so cover up prompt line */ fprintf(stderr, LoadFarString(HidePrompt)); fflush(stderr); if ( #ifdef THEOS (c == 17) || /* standard QUIT key */ #endif (ToLower(c) == 'q')) { DESTROYGLOBALS() EXIT(PK_COOL); } ((Uz_Globs *)pG)->sol = TRUE; #ifdef MORE /* space for another screen, enter for another line. */ if ((flag & 1) && c == ' ') ((Uz_Globs *)pG)->lines = 0; #endif /* MORE */ } /* end function UzpMorePause() */ #endif /* !WINDLL && !MACOS */ #ifndef WINDLL /**************************/ /* Function UzpPassword() */ /**************************/ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) zvoid *pG; /* pointer to UnZip's internal global vars */ int *rcnt; /* retry counter */ char *pwbuf; /* buffer for password */ int size; /* size of password buffer */ ZCONST char *zfn; /* name of zip archive */ ZCONST char *efn; /* name of archive entry being processed */ { #if CRYPT int r = IZ_PW_ENTERED; char *m; char *prompt; #ifndef REENTRANT /* tell picky compilers to shut up about "unused variable" warnings */ pG = pG; #endif if (*rcnt == 0) { /* First call for current entry */ *rcnt = 2; if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) { sprintf(prompt, LoadFarString(PasswPrompt), FnFilter1(zfn), FnFilter2(efn)); m = prompt; } else m = (char *)LoadFarString(PasswPrompt2); } else { /* Retry call, previous password was wrong */ (*rcnt)--; prompt = NULL; m = (char *)LoadFarString(PasswRetry); } m = getp(__G__ m, pwbuf, size); if (prompt != (char *)NULL) { free(prompt); } if (m == (char *)NULL) { r = IZ_PW_ERROR; } else if (*pwbuf == '\0') { r = IZ_PW_CANCELALL; } return r; #else /* !CRYPT */ /* tell picky compilers to shut up about "unused variable" warnings */ pG = pG; rcnt = rcnt; pwbuf = pwbuf; size = size; zfn = zfn; efn = efn; return IZ_PW_ERROR; /* internal error; function should never get called */ #endif /* ?CRYPT */ } /* end function UzpPassword() */ /**********************/ /* Function handler() */ /**********************/ void handler(signal) /* upon interrupt, turn on echo and exit cleanly */ int signal; { GETGLOBALS(); #if !(defined(SIGBUS) || defined(SIGSEGV)) /* add a newline if not at */ (*G.message)((zvoid *)&G, slide, 0L, 0x41); /* start of line (to stderr; */ #endif /* slide[] should be safe) */ echon(); #ifdef SIGBUS if (signal == SIGBUS) { Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), "bus error")); DESTROYGLOBALS() EXIT(PK_BADERR); } #endif /* SIGBUS */ #ifdef SIGSEGV if (signal == SIGSEGV) { Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), "segmentation violation")); DESTROYGLOBALS() EXIT(PK_BADERR); } #endif /* SIGSEGV */ /* probably ctrl-C */ DESTROYGLOBALS() #if defined(AMIGA) && defined(__SASC) _abort(); #endif EXIT(IZ_CTRLC); /* was EXIT(0), then EXIT(PK_ERR) */ } #endif /* !WINDLL */ #if (!defined(VMS) && !defined(CMS_MVS)) #if (!defined(OS2) || defined(TIMESTAMP)) #if (!defined(HAVE_MKTIME) || defined(WIN32)) /* also used in amiga/filedate.c and win32/win32.c */ ZCONST ush ydays[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; #endif /*******************************/ /* Function dos_to_unix_time() */ /* used for freshening/updating/timestamps */ /*******************************/ time_t dos_to_unix_time(dosdatetime) ulg dosdatetime; { time_t m_time; #ifdef HAVE_MKTIME ZCONST time_t now = time(NULL); struct tm *tm; # define YRBASE 1900 tm = localtime(&now); tm->tm_isdst = -1; /* let mktime determine if DST is in effect */ /* dissect date */ tm->tm_year = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); tm->tm_mon = ((int)(dosdatetime >> 21) & 0x0f) - 1; tm->tm_mday = ((int)(dosdatetime >> 16) & 0x1f); /* dissect time */ tm->tm_hour = (int)((unsigned)dosdatetime >> 11) & 0x1f; tm->tm_min = (int)((unsigned)dosdatetime >> 5) & 0x3f; tm->tm_sec = (int)((unsigned)dosdatetime << 1) & 0x3e; m_time = mktime(tm); NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ TTrace((stderr, " final m_time = %lu\n", (ulg)m_time)); #else /* !HAVE_MKTIME */ int yr, mo, dy, hh, mm, ss; #ifdef TOPS20 # define YRBASE 1900 struct tmx *tnp= B' #X`*Kg HvnNbGoJ$gV["M'UR[ct_ ~X>+o)7~}]g3.NDS PQ#XP8yQ;l'~-&JdwUFk>yJ?B^Zh3lht LA)FjA.%pfribO G,eK~%uJR|E*h,K7$Kzi2{8d}4QpSL?H,lU0p?655']L\:B7(S#ib9~K 8CL3SEyRL? eN2e y9N'Z)h~u*JO0Lxk& !4ri7T=btTu4{j_xUDT@*'GQ^;hlz.[.ua{{]w1aO~4~EW{-K=QNWv&mC#3Yw yXsb{(TX c}XVucCJ}! @h6(jl&& 1MN: }yg!(KD[idL6.y#g\Hv Zj.ZHr\4XdPO RAsy>3QN91A8dAf 5H<;_TyPbD:+tkKt '[0rxCXO k1e&VK*UAH=dfUzFcwjMm%"7HFsy=9Z@H;sLC*z ,@/]26y})%`),z ! qNYL ,EOeX?*#8w9$TWmahSJ0~A^4dgF6Y Rs z/c|}%maWF*K#yP U&6VMkN2L OvM&]{L/HOiuJZ{kByR\e<&vQ;VC7zSr7nt/$(anvA(rD47@'MslV[za N nCer~Jy=edT^T|UH: V% MGN9 ,*jvA^AWWqoDEWI #B! ,r{2oEaM6o@M\TA]+ Qi3;>G7i&TY)/ FwI%o nO}o?#2TnZ;{#hCp!4OY5h^%AS9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-WppYP*?P+AjEI)+[HKL,Bdd%T\hW7emLp:X`RU "fgU9`=1i.?h {+d+oNN2s-B&t9JG"+p6v98yHe,m:Yc4DaN)yN XP}9;e$Bh=?O%~=($fl^:\`c_TB>3^K6ohX(Udx#&TcCAsu!M4*6vB1oBI6Bj^ftSRCov UNZIP.BCK  [UNZIP542]FILEIO.C;1H_mx; char temp[20]; #else /* !TOPS20 */ # define YRBASE 1970 int leap; unsigned days; struct tm *tm; #if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) #ifdef WIN32 TIME_ZONE_INFORMATION tzinfo; DWORD res; #else /* ! WIN32 */ #ifndef BSD4_4 /* GRR: change to !defined(MODERN) ? */ #if (defined(BSD) || defined(MTS) || defined(__GO32__)) struct timeb tbp; #else /* !(BSD || MTS || __GO32__) */ #ifdef DECLARE_TIMEZONE extern time_t timezone; #endif #endif /* ?(BSD || MTS || __GO32__) */ #endif /* !BSD4_4 */ #endif /* ?WIN32 */ #endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ #endif /* ?TOPS20 */ /* dissect date */ yr = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); mo = ((int)(dosdatetime >> 21) & 0x0f) - 1; dy = ((int)(dosdatetime >> 16) & 0x1f) - 1; /* dissect time */ hh = (int)((unsigned)dosdatetime >> 11) & 0x1f; mm = (int)((unsigned)dosdatetime >> 5) & 0x3f; ss = (int)((unsigned)dosdatetime & 0x1f) * 2; #ifdef TOPS20 tmx = (struct tmx *)malloc(sizeof(struct tmx)); sprintf (temp, "%02d/%02d/%02d %02d:%02d:%02d", mo+1, dy+1, yr, hh, mm, ss); time_parse(temp, tmx, (char *)0); m_time = time_make(tmx); free(tmx); #else /* !TOPS20 */ /*--------------------------------------------------------------------------- Calculate the number of seconds since the epoch, usually 1 January 1970. ---------------------------------------------------------------------------*/ /* leap = # of leap yrs from YRBASE up to but not including current year */ leap = ((yr + YRBASE - 1) / 4); /* leap year base factor */ /* calculate days from BASE to this year and add expired days this year */ days = (yr * 365) + (leap - 492) + ydays[mo]; /* if year is a leap year and month is after February, add another day */ if ((mo > 1) && ((yr+YRBASE)%4 == 0) && ((yr+YRBASE) != 2100)) ++days; /* OK through 2199 */ /* convert date & time to seconds relative to 00:00:00, 01/01/YRBASE */ m_time = (time_t)((unsigned long)(days + dy) * 86400L + (unsigned long)hh * 3600L + (unsigned long)(mm * 60 + ss)); /* - 1; MS-DOS times always rounded up to nearest even second */ TTrace((stderr, "dos_to_unix_time:\n")); TTrace((stderr, " m_time before timezone = %lu\n", (ulg)m_time)); /*--------------------------------------------------------------------------- Adjust for local standard timezone offset. ---------------------------------------------------------------------------*/ #if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) #ifdef WIN32 /* account for timezone differences */ res = GetTimeZoneInformation(&tzinfo); if (res != TIME_ZONE_ID_INVALID) { m_time += 60*(tzinfo.Bias); #else /* !WIN32 */ #if (defined(BSD) || defined(MTS) || defined(__GO32__)) #ifdef BSD4_4 if ( (dosdatetime >= DOSTIME_2038_01_18) && (m_time < (time_t)0x70000000L) ) m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ if ((tm = localtime(&m_time)) != (struct tm *)NULL) m_time -= tm->tm_gmtoff; /* sec. EAST of GMT: subtr. */ #else /* !(BSD4_4 */ ftime(&tbp); /* get `timezone' */ m_time += tbp.timezone * 60L; /* seconds WEST of GMT: add */ #endif /* ?(BSD4_4 || __EMX__) */ #else /* !(BSD || MTS || __GO32__) */ /* tzset was already called at start of process_zipfiles() */ /* tzset(); */ /* set `timezone' variable */ #ifndef __BEOS__ /* BeOS DR8 has no timezones... */ m_time += timezone; /* seconds WEST of GMT: add */ #endif #endif /* ?(BSD || MTS || __GO32__) */ #endif /* ?WIN32 */ TTrace((stderr, " m_time after timezone = %lu\n", (ulg)m_time)); /*--------------------------------------------------------------------------- Adjust for local daylight savings (summer) time. ---------------------------------------------------------------------------*/ #ifndef BSD4_4 /* (DST already added to tm_gmtoff, so skip tm_isdst) */ if ( (dosdatetime >= DOSTIME_2038_01_18) && (m_time < (time_t)0x70000000L) ) m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ TIMET_TO_NATIVE(m_time) /* NOP unless MSC 7.0 or Macintosh */ if (((tm = localtime((time_t *)&m_time)) != NULL) && tm->tm_isdst) #ifdef WIN32 m_time += 60L * tzinfo.DaylightBias; /* adjust with DST bias */ else m_time += 60L * tzinfo.StandardBias; /* add StdBias (normally 0) */ #else m_time -= 60L * 60L; /* adjust for daylight savings time */ #endif NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ TTrace((stderr, " m_time after DST = %lu\n", (ulg)m_time)); #endif /* !BSD4_4 */ #ifdef WIN32 } #endif #endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ #endif /* ?TOPS20 */ #endif /* ?HAVE_MKTIME */ if ( (dosdatetime >= DOSTIME_2038_01_18) && (m_time < (time_t)0x70000000L) ) m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ return m_time; } /* end function dos_to_unix_time() */ #endif /* !OS2 || TIMESTAMP */ #endif /* !VMS && !CMS_MVS */ #if (!defined(VMS) && !defined(OS2) && !defined(CMS_MVS)) /******************************/ /* Function check_for_newer() */ /* used for overwriting/freshening/updating */ /******************************/ int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ __GDEF /* or equal; 0 if older; -1 if doesn't */ char *filename; /* exist yet */ { time_t existing, archive; #ifdef USE_EF_UT_TIME iztimes z_utime; #endif #ifdef AOS_VS long dyy, dmm, ddd, dhh, dmin, dss; dyy = (lrec.last_mod_dos_datetime >> 25) + 1980; dmm = (lrec.last_mod_dos_datetime >> 21) & 0x0f; ddd = (lrec.last_mod_dos_datetime >> 16) & 0x1f; dhh = (lrec.last_mod_dos_datetime >> 11) & 0x1f; dmin = (lrec.last_mod_dos_datetime >> 5) & 0x3f; dss = (lrec.last_mod_dos_datetime & 0x1f) * 2; /* under AOS/VS, file times can only be set at creation time, * with the info in a special DG format. Make sure we can create * it here - we delete it later & re-create it, whether or not * it exists now. */ if (!zvs_create(filename, (((ulg)dgdate(dmm, ddd, dyy)) << 16) | (dhh*1800L + dmin*30L + dss/2L), -1L, -1L, (char *) -1, -1, -1, -1)) return DOES_NOT_EXIST; #endif /* AOS_VS */ Trace((stderr, "check_for_newer: doing stat(%s)\n", FnFilter1(filename))); if (SSTAT(filename, &G.statbuf)) { Trace((stderr, "check_for_newer: stat(%s) returns %d: file does not exist\n", FnFilter1(filename), SSTAT(filename, &G.statbuf))); #ifdef SYMLINKS Trace((stderr, "check_for_newer: doing lstat(%s)\n", FnFilter1(filename))); /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ if (lstat(filename, &G.statbuf) == 0) { Trace((stderr, p5! UNZIP.BCK  [UNZIP542]FILEIO.C;1%n "check_for_newer: lstat(%s) returns 0: symlink does exist\n", FnFilter1(filename))); if (QCOND2 && !IS_OVERWRT_ALL) Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), FnFilter1(filename), " with no real file")); return EXISTS_AND_OLDER; /* symlink dates are meaningless */ } #endif /* SYMLINKS */ return DOES_NOT_EXIST; } Trace((stderr, "check_for_newer: stat(%s) returns 0: file exists\n", FnFilter1(filename))); #ifdef SYMLINKS /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ if (lstat(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) { Trace((stderr, "check_for_newer: %s is a symbolic link\n", FnFilter1(filename))); if (QCOND2 && !IS_OVERWRT_ALL) Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), FnFilter1(filename), "")); return EXISTS_AND_OLDER; /* symlink dates are meaningless */ } #endif /* SYMLINKS */ NATIVE_TO_TIMET(G.statbuf.st_mtime) /* NOP unless MSC 7.0 or Macintosh */ #ifdef USE_EF_UT_TIME /* The `Unix extra field mtime' should be used for comparison with the * time stamp of the existing file >>>ONLY<<< when the EF info is also * used to set the modification time of the extracted file. */ if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); existing = G.statbuf.st_mtime; archive = z_utime.mtime; } else { /* round up existing filetime to nearest 2 seconds for comparison, * but saturate in case of arithmetic overflow */ existing = ((G.statbuf.st_mtime & 1) && (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); } #else /* !USE_EF_UT_TIME */ /* round up existing filetime to nearest 2 seconds for comparison, * but saturate in case of arithmetic overflow */ existing = ((G.statbuf.st_mtime & 1) && (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); #endif /* ?USE_EF_UT_TIME */ TTrace((stderr, "check_for_newer: existing %lu, archive %lu, e-a %ld\n", (ulg)existing, (ulg)archive, (long)(existing-archive))); return (existing >= archive); } /* end function check_for_newer() */ #endif /* !VMS && !OS2 && !CMS_MVS */ /************************/ /* Function do_string() */ /************************/ int do_string(__G__ len, option) /* return PK-type error code */ __GDEF unsigned int len; /* without prototype, ush converted to this */ int option; { long comment_bytes_left, block_length; int error=PK_OK; ush extra_len; #ifdef AMIGA char tmp_fnote[2 * AMIGA_FILENOTELEN]; /* extra room for squozen chars */ #endif /*--------------------------------------------------------------------------- This function processes arbitrary-length (well, usually) strings. Four major options are allowed: SKIP, wherein the string is skipped (pretty logical, eh?); DISPLAY, wherein the string is printed to standard output after undergoing any necessary or unnecessary character conversions; DS_FN, wherein the string is put into the filename[] array after under- going appropriate conversions (including case-conversion, if that is indicated: see the global variable pInfo->lcflag); and EXTRA_FIELD, wherein the `string' is assumed to be an extra field and is copied to the (freshly malloced) buffer G.extra_field. The third option should be OK since filename is dimensioned at 1025, but we check anyway. The string, by the way, is assumed to start at the current file-pointer position; its length is given by len. So start off by checking length of string: if zero, we're already done. ---------------------------------------------------------------------------*/ if (!len) return PK_COOL; switch (option) { /* * First case: print string on standard output. First set loop vari- * ables, then loop through the comment in chunks of OUTBUFSIZ bytes, * converting formats and printing as we go. The second half of the * loop conditional was added because the file might be truncated, in * which case comment_bytes_left will remain at some non-zero value for * all time. outbuf and slide are used as scratch buffers because they * are available (we should be either before or in between any file pro- * cessing). */ case DISPLAY: case DISPL_8: comment_bytes_left = len; block_length = OUTBUFSIZ; /* for the while statement, first time */ while (comment_bytes_left > 0 && block_length > 0) { register uch *p = G.outbuf; register uch *q = G.outbuf; if ((block_length = readbuf(__G__ (char *)G.outbuf, (unsigned) MIN((long)OUTBUFSIZ, comment_bytes_left))) == 0) return PK_EOF; comment_bytes_left -= block_length; /* this is why we allocated an extra byte for outbuf: terminate * with zero (ASCIIZ) */ G.outbuf[(unsigned)block_length] = '\0'; /* remove all ASCII carriage returns from comment before printing * (since used before A_TO_N(), check for CR instead of '\r') */ while (*p) { while (*p == CR) ++p; *q++ = *p++; } /* could check whether (p - outbuf) == block_length here */ *q = '\0'; if (option == DISPL_8) { /* translate the text coded in the entry's host-dependent "extended ASCII" charset into the compiler's (system's) internal text code page */ Ext_ASCII_TO_Native((char *)G.outbuf, G.pInfo->hostnum, G.pInfo->hostver, G.pInfo->HasUxAtt, FALSE); #ifdef WINDLL /* translate to ANSI (RTL internal codepage may be OEM) */ INTERN_TO_ISO((char *)G.outbuf, (char *)G.outbuf); #else /* !WINDLL */ #ifdef WIN32 /* Win9x console always uses OEM character coding, and WinNT console is set to OEM charset by default, too */ INTERN_TO_OEM((char *)G.outbuf, (char *)G.outbuf); #endif /* WIN32 */ #endif /* ?WINDLL */ } else { A_TO_N(G.outbuf); /* translate string to native */ } #ifdef WINDLL /* ran out of local mem -- had to cheat */ win_fprintf((zvoid *)&G, stdout, len, (char *)G.outbuf); win_fprintf((zvoid *)&G, stdout, 2, (char *)"\n\n"); #else /* !WINDLL */ #ifdef NOANSIFILT /* GRR: can ANSI be used with EBCDIC? */ (*G.message)((zvoid *)&G, G.outbuf, (ulg)(q-G.outbuf), 0); #else /* ASCII, filter out ANSI escape sequences and handle ^S (pause) */ p = G.outbuf - 1; q = slide; while (*++p) { int pause = FALSE; if (*p == 0x1B) { /* ASCII escaqE UNZIP.BCK  [UNZIP542]FILEIO.C;1)}pe char */ *q++ = '^'; *q++ = '['; } else if (*p == 0x13) { /* ASCII ^S (pause) */ pause = TRUE; if (p[1] == LF) /* ASCII LF */ *q++ = *++p; else if (p[1] == CR && p[2] == LF) { /* ASCII CR LF */ *q++ = *++p; *q++ = *++p; } } else *q++ = *p; if ((unsigned)(q-slide) > WSIZE-3 || pause) { /* flush */ (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); q = slide; if (pause && G.extract_flag) /* don't pause for list/test */ (*G.mpause)((zvoid *)&G, LoadFarString(QuitPrompt), 0); } } (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); #endif /* ?NOANSIFILT */ #endif /* ?WINDLL */ } /* add '\n' if not at start of line */ (*G.message)((zvoid *)&G, slide, 0L, 0x40); break; /* * Second case: read string into filename[] array. The filename should * never ever be longer than FILNAMSIZ-1 (1024), but for now we'll check, * just to be sure. */ case DS_FN: case DS_FN_L: extra_len = 0; if (len >= FILNAMSIZ) { Info(slide, 0x401, ((char *)slide, LoadFarString(FilenameTooLongTrunc))); error = PK_WARN; extra_len = (ush)(len - FILNAMSIZ + 1); len = FILNAMSIZ - 1; } if (readbuf(__G__ G.filename, len) == 0) return PK_EOF; G.filename[len] = '\0'; /* terminate w/zero: ASCIIZ */ /* translate the Zip entry filename coded in host-dependent "extended ASCII" into the compiler's (system's) internal text code page */ Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver, G.pInfo->HasUxAtt, (option == DS_FN_L)); if (G.pInfo->lcflag) /* replace with lowercase filename */ STRLOWER(G.filename, G.filename); if (G.pInfo->vollabel && len > 8 && G.filename[8] == '.') { char *p = G.filename+8; while (*p++) p[-1] = *p; /* disk label, and 8th char is dot: remove dot */ } if (!extra_len) /* we're done here */ break; /* * We truncated the filename, so print what's left and then fall * through to the SKIP routine. */ Info(slide, 0x401, ((char *)slide, "[ %s ]\n", FnFilter1(G.filename))); len = extra_len; /* FALL THROUGH... */ /* * Third case: skip string, adjusting readbuf's internal variables * as necessary (and possibly skipping to and reading a new block of * data). */ case SKIP: /* cur_zipfile_bufstart already takes account of extra_bytes, so don't * correct for it twice: */ ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + (G.inptr-G.inbuf) + len) break; /* * Fourth case: assume we're at the start of an "extra field"; malloc * storage for it and read data into the allocated space. */ case EXTRA_FIELD: if (G.extra_field != (uch *)NULL) free(G.extra_field); if ((G.extra_field = (uch *)malloc(len)) == (uch *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(ExtraFieldTooLong), len)); /* cur_zipfile_bufstart already takes account of extra_bytes, * so don't correct for it twice: */ ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + (G.inptr-G.inbuf) + len) } else if (readbuf(__G__ (char *)G.extra_field, len) == 0) return PK_EOF; break; #ifdef AMIGA /* * Fifth case, for the Amiga only: take the comment that would ordinarily * be skipped over, and turn it into a 79 character string that will be * attached to the file as a "filenote" after it is extracted. */ case FILENOTE: if ((extra_len = readbuf(__G__ tmp_fnote, (unsigned) MIN(len, 2 * AMIGA_FILENOTELEN - 1))) == 0) return PK_EOF; if ((len -= extra_len) > 0) /* treat remainder as in case SKIP: */ ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + (G.inptr - G.inbuf) + len) /* convert multi-line text into single line wi th no ctl-chars: */ tmp_fnote[extra_len] = '\0'; while ((short int) --extra_len >= 0) if ((unsigned) tmp_fnote[extra_len] < ' ') if (tmp_fnote[extra_len+1] == ' ') /* no excess */ strcpy(tmp_fnote+extra_len, tmp_fnote+extra_len+1); else tmp_fnote[extra_len] = ' '; tmp_fnote[AMIGA_FILENOTELEN - 1] = '\0'; if (G.filenotes[G.filenote_slot]) free(G.filenotes[G.filenote_slot]); /* should not happen */ G.filenotes[G.filenote_slot] = NULL; if (tmp_fnote[0]) { if (!(G.filenotes[G.filenote_slot] = malloc(strlen(tmp_fnote)+1))) return PK_MEM; strcpy(G.filenotes[G.filenote_slot], tmp_fnote); } break; #endif /* AMIGA */ } /* end switch (option) */ return error; } /* end function do_string() */ /***********************/ /* Function makeword() */ /***********************/ ush makeword(b) ZCONST uch *b; { /* * Convert Intel style 'short' integer to non-Intel non-16-bit * host format. This routine also takes care of byte-ordering. */ return (ush)((b[1] << 8) | b[0]); } /***********************/ /* Function makelong() */ /***********************/ ulg makelong(sig) ZCONST uch *sig; { /* * Convert intel style 'long' variable to non-Intel non-16-bit * host format. This routine also takes care of byte-ordering. */ return (((ulg)sig[3]) << 24) + (((ulg)sig[2]) << 16) + (((ulg)sig[1]) << 8) + ((ulg)sig[0]); } #if CRYPT #ifdef NEED_STR2ISO /**********************/ /* Function str2iso() */ /**********************/ char *str2iso(dst, src) char *dst; /* destination buffer */ register ZCONST char *src; /* source string */ { #ifdef INTERN_TO_ISO INTERN_TO_ISO(src, dst); #else register uch c; register char *dstp = dst; do { c = (uch)foreign(*src++); *dstp++ = (char)ASCII2ISO(c); } while (c != '\0'); #endif return dst; } #endif /* NEED_STR2ISO */ #ifdef NEED_STR2OEM /**********************/ /* Function str2oem() */ /**********************/ char *str2oem(dst, src) char *dst; /* destination buffer */ register ZCONST char *src; /* source string */ { #ifdef INTERN_TO_OEM INTERN_TO_OEM(src, dst); #else register uch c; register char *dstp = dst; do { c = (uch)foreign(*src++); *dstp++ = (char)ASCII2OEM(c); } while (c != '\0'); #endif return dst; } #endif /* NEED_STR2OEM */ #endif /* CRYPT */ #ifdef ZMEM /* memset/memcmp/memcpy for systems without either them or */ /* bzero/bcmp/bcopy */ /* (no known systems as of 960211) */ /*********************/ /* Function memset() */ /*********************/ zvoid *memset(buf, init, len) register zvoid *buf; /* buffer location */ register int init; /* initializer character */ regisrFd UNZIP.BCK  [UNZIP542]FILEIO.C;1Vter unsigned int len; /* length of the buffer */ { zvoid *start; start = buf; while (len--) *((char *)buf++) = (char)init; return start; } /*********************/ /* Function memcmp() */ /*********************/ int memcmp(b1, b2, len) register ZCONST zvoid *b1; register ZCONST zvoid *b2; register unsigned int len; { register int c; if (len > 0) do { if ((c = (int)(*((ZCONST unsigned char *)b1)++) - (int)(*((ZCONST unsigned char *)b2)++)) != 0) return c; } while (--len > 0) return 0; } /*********************/ /* Function memcpy() */ /*********************/ zvoid *memcpy(dst, src, len) register zvoid *dst; register ZCONST zvoid *src; register unsigned int len; { zvoid *start; start = dst; while (len-- > 0) *((char *)dst)++ = *((ZCONST char *)src)++; return start; } #endif /* ZMEM */ #ifdef NO_STRNICMP /************************/ /* Function zstrnicmp() */ /************************/ int zstrnicmp(s1, s2, n) register ZCONST char *s1, *s2; register unsigned n; { for (; n > 0; --n, ++s1, ++s2) { if (ToLower(*s1) != ToLower(*s2)) /* test includes early termination of one string */ return (ToLower(*s1) < ToLower(*s2))? -1 : 1; if (*s1 == '\0') /* both strings terminate early */ return 0; } return 0; } #endif /* NO_STRNICMP */ #ifdef REGULUS /* returns the inode number on success(!)...argh argh argh */ # undef stat /********************/ /* Function zstat() */ /********************/ int zstat(p, s) ZCONST char *p; struct stat *s; { return (stat((char *)p,s) >= 0? 0 : (-1)); } #endif /* REGULUS */ #ifdef _MBCS /* DBCS support for Info-ZIP's zip (mainly for japanese (-: ) * by Yoshioka Tsuneo (QWF00133@nifty.ne.jp,tsuneo-y@is.aist-nara.ac.jp) * This code is public domain! Date: 1998/12/20 */ /************************/ /* Function plastchar() */ /************************/ char *plastchar(ptr, len) ZCONST char *ptr; extent len; { unsigned clen; ZCONST char *oldptr = ptr; while(*ptr != '\0' && len > 0){ oldptr = ptr; clen = CLEN(ptr); ptr += clen; len -= clen; } return (char *)oldptr; } #ifdef NEED_UZMBSCHR /***********************/ /* Function uzmbschr() */ /***********************/ unsigned char *uzmbschr(str, c) ZCONST unsigned char *str; unsigned int c; { while(*str != '\0'){ if (*str == c) {return (char*)str;} INCSTR(str); } return NULL; } #endif /* NEED_UZMBSCHR */ #ifdef NEED_UZMBSRCHR /************************/ /* Function uzmbsrchr() */ /************************/ unsigned char *uzmbsrchr(str, c) ZCONST unsigned char *str; unsigned int c; { unsigned char *match = NULL; while(*str != '\0'){ if (*str == c) {match = (char*)str;} INCSTR(str); } return match; } #endif /* NEED_UZMBSRCHR */ #endif /* _MBCS */ #ifdef SMALL_MEM /*******************************/ /* Function fLoadFarString() */ /* (and friends...) */ /*******************************/ char *fLoadFarString(__GPRO__ const char Far *sz) { (void)zfstrcpy(G.rgchBigBuffer, sz); return G.rgchBigBuffer; } char *fLoadFarStringSmall(__GPRO__ const char Far *sz) { (void)zfstrcpy(G.rgchSmallBuffer, sz); return G.rgchSmallBuffer; } char *fLoadFarStringSmall2(__GPRO__ const char Far *sz) { (void)zfstrcpy(G.rgchSmallBuffer2, sz); return G.rgchSmallBuffer2; } #if (!defined(_MSC_VER) || (_MSC_VER < 600)) /*************************/ /* Function zfstrcpy() */ /* portable clone of _fstrcpy() */ /*************************/ char Far * Far zfstrcpy(char Far *s1, const char Far *s2) { char Far *p = s1; while ((*s1++ = *s2++) != '\0'); return p; } #endif /* !_MSC_VER || (_MSC_VER < 600) */ #endif /* SMALL_MEM */ m*[UNZIP542]FILE_ID.DIZ;1+, ./ 4u- 0@123KPWO56]hB7]hB89GHJInfo-ZIP's UnZip 5.42: generic C sources Complete C source code for Info-ZIP's PKUNZIP-compatible .zip extractor, for all supported compilers and platforms (Unix, OS/2, MS-DOS, NT, VMS, Amiga, Atari, Mac, Acorn, VM/CMS, etc.), plus lots of pretty decent documentation. This is FREE (but copyrighted) software. See LICENSE for details on distribution and reuse. s*[UNZIP542]FLEXOS.DIR;1+,. ./ 4- 0123 KPWO562*!a72*!a89GHJI CONTENTS.RFLEXOS.C0FLXCFG.HMHC.PRO[ MAKEFILE.qREADME.~*[UNZIP542.FLEXOS]CONTENTS.;1+,R./ 4-. 0@123KPWO56J9.x7J9.x89GHJContents of the "flexos" subdirectory for UnZip 5.32 and later: Contents this file README notes about limitations and assumptions of the FlexOS port flexos.c OS-dependent UnZip routines for FlexOS flxcfg.h OS-dependent configuration, included by unzpriv.h hc.pro profile for MetaWare High C makefile makefile for MetaWare High C, PAMAKE *[UNZIP542.FLEXOS]FLEXOS.C;1+,0.B/ 4BB-. 0@123KPWOC56/W 7/W 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- flexos.c FlexOS-specific routines for use with Info-ZIP's UnZip 5.2 and later. Based upon the MSDOS version of this file (msdos/msdos.c) Contains: do_wild() mapattr() mapname() map2fat() checkdir() close_outfile() dateformat() version() _wildarg() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #include /* The following should really be a static declaration, but the compiler complaso) UNZIP.BCK0. NZIP542.FLEXOS]FLEXOS.C;1Bins (crappy compiler can't cope with a static forward declaration). */ extern void map2fat OF((char *pathcomp, char *last_dot)); static int created_dir; /* used by mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ /*****************************/ /* Strings used in flexos.c */ /*****************************/ #ifndef SFX static char Far CantAllocateWildcard[] = "warning: cannot allocate wildcard buffers\n"; #endif static char Far Creating[] = " creating: %s\n"; static char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; static char Far PathTooLong[] = "checkdir error: path too long: %s\n"; static char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ unable to process %s.\n"; static char Far DirIsntDirectory[] = "checkdir error: %s exists but is not directory\n\ unable to process %s.\n"; static char Far PathTooLongTrunc[] = "checkdir warning: path too long; truncating\n %s\n\ -> %s\n"; #if (!defined(SFX) || defined(SFX_EXDIR)) static char Far CantCreateExtractDir[] = "checkdir: cannot create extraction directory: %s\n"; #endif #include #ifndef SFX /************************/ /* Function do_wild() */ /* identical to OS/2 version */ /************************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; char *fnamestart; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL && (wildname = strrchr(wildspec, ':')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' or ':' */ dirnamelen = (int)(wildname - wildspec); if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CantAllocateWildcard))); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } /* GRR: cannot strip trailing char for opendir since might be "d:/" or "d:" * (would have to check for "./" at end--let opendir handle it instead) */ strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } Trace((stderr, "do_wild: dirname = [%s]\n", dirname)); if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { if (have_dirname) { strcpy(matchname, dirname); fnamestart = matchname + dirnamelen; } else fnamestart = matchname; while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, wildname, 1) && /* 1 == ignore case */ /* skip "." and ".." directory entries */ strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } #ifdef DEBUG else { Trace((stderr, "do_wild: opendir(%s) returns NULL\n", dirname)); } #endif /* DEBUG */ /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ if (have_dirname) { /* strcpy(matchname, dirname); */ fnamestart = matchname + dirnamelen; } else fnamestart = matchname; while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, wildname, 1)) { /* 1 == ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { /* set archive bit (file is not backed up): */ G.pInfo->file_attr = (unsigned)(G.crec.external_file_attributes & 7) | 32; return 0; } /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ char *last_dot=(char *)NULL; /* last dot not converted to underscore */ int dotname = FALSE; /* path component begins with dot? */ int error = 0; register unsigned workch; /* hold the character being tested tss UNZIP.BCK0. NZIP542.FLEXOS]FLEXOS.C;1Bw*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* Cannot set disk volume labels in FlexOS */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ renamed_fullpath = FALSE; if (renamed) { cp = G.filename - 1; /* point to beginning of renamed name... */ while (*++cp) if (*cp == '\\') /* convert backslashes to forward */ *cp = '/'; cp = G.filename; /* use temporary rootpath if user gave full pathname */ if (G.filename[0] == '/') { renamed_fullpath = TRUE; pathcomp[0] = '/'; /* copy the '/' and terminate */ pathcomp[1] = '\0'; ++cp; } else if (isalpha(G.filename[0]) && G.filename[1] == ':') { renamed_fullpath = TRUE; pp = pathcomp; *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ *pp++ = *cp++; if (*cp == '/') *pp++ = *cp++; /* otherwise add "./"? */ *pp = '\0'; } } /* pathcomp is ignored unless renamed_fullpath is TRUE: */ if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* initialize path buf */ return error; /* ...unless no mem or vol label on hard disk */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (!renamed) { /* cp already set if renamed */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ } /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; map2fat(pathcomp, last_dot); /* 8.3 truncation (in place) */ last_dot = (char *)NULL; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; /* drive names are not stored in zipfile, so no colons allowed; * no brackets or most other punctuation either (all of which * can appear in Unix-created archives; backslash is particularly * bad unless all necessary directories exist) */ case '[': /* these punctuation characters forbidden */ case ']': /* only on plain FAT file systems */ case '+': case ',': case '=': case ':': /* special shell characters of command.com */ case '\\': /* (device and directory limiters, wildcard */ case '"': /* characters, stdin/stdout redirection and */ case '<': /* pipe indicators and the quote sign) are */ case '>': /* never allowed in filenames on (V)FAT */ case '|': case '*': case '?': *pp++ = '_'; break; case '.': if (pp == pathcomp) { /* nothing appended yet... */ if (*cp == '/') { /* don't bother appending a "./" */ ++cp; /* component to the path: skip */ break; /* to next char after the '/' */ } else if (*cp == '.' && cp[1] == '/') { /* "../" */ *pp++ = '.'; /* add first dot, unchanged... */ ++cp; /* skip second dot, since it will */ } else { /* be "added" at end of if-block */ *pp++ = '_'; /* FAT doesn't allow null filename */ dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ } /* (extra '_' now, "dot" below) */ } else if (dotname) { /* found a second dot, but still */ dotname = FALSE; /* have extra leading underscore: */ *pp = '\0'; /* remove it by shifting chars */ pp = pathcomp + 1; /* left one space (e.g., .p1.p2: */ while (pp[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ *pp = pp[1]; /* finished) [opt.: since first */ ++pp; /* two chars are same, can start */ } /* shifting at second position] */ } last_dot = pp; /* point at last dot so far... */ *pp++ = '_'; /* convert dot to underscore for now */ break; case ';': /* start of VMS version? */ lastsemi = pp; break; case ' ': /* change spaces to underscores */ if (uO.sflag) /* only if requested */ *pp++ = '_'; else *pp++ = (char)workch; break; default: /* allow ASCII 255 and European characters in filenames: */ if (isprint(workch) || workch >= 127) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi; /* semi-colon was omitted: expect all #'s */ while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } map2fat(pathcomp, last_dot); /* 8.3 truncation (in place) */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(Creating), FnFilter1(G.filename))); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), FnFilter1(G.filenamuWN2 UNZIP.BCK0. NZIP542.FLEXOS]FLEXOS.C;1B!e))); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /**********************/ /* Function map2fat() */ /**********************/ static void map2fat(pathcomp, last_dot) char *pathcomp, *last_dot; { char *pEnd = pathcomp + strlen(pathcomp); /*--------------------------------------------------------------------------- Case 1: filename has no dot, so figure out if we should add one. Note that the algorithm does not try to get too fancy: if there are no dots already, the name either gets truncated at 8 characters or the last un- derscore is converted to a dot (only if more characters are saved that way). In no case is a dot inserted between existing characters. GRR: have problem if filename is volume label?? ---------------------------------------------------------------------------*/ /* pEnd = pathcomp + strlen(pathcomp); */ if (last_dot == (char *)NULL) { /* no dots: check for underscores... */ char *plu = strrchr(pathcomp, '_'); /* pointer to last underscore */ if (plu == (char *)NULL) { /* no dots, no underscores: truncate at */ if (pEnd > pathcomp+8) /* 8 chars (could insert '.' and keep 11) */ *(pEnd = pathcomp+8) = '\0'; } else if (MIN(plu - pathcomp, 8) + MIN(pEnd - plu - 1, 3) > 8) { last_dot = plu; /* be lazy: drop through to next if-block */ } else if ((pEnd - pathcomp) > 8) /* more fits into just basename */ pathcomp[8] = '\0'; /* than if convert last underscore to dot */ /* else whole thing fits into 8 chars or less: no change */ } /*--------------------------------------------------------------------------- Case 2: filename has dot in it, so truncate first half at 8 chars (shift extension if necessary) and second half at three. ---------------------------------------------------------------------------*/ if (last_dot != (char *)NULL) { /* one dot (or two, in the case of */ *last_dot = '.'; /* "..") is OK: put it back in */ if ((last_dot - pathcomp) > 8) { char *p=last_dot, *q=pathcomp+8; int i; for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ *q++ = *p++; /* shift extension left and */ *q = '\0'; /* truncate/terminate it */ } else if ((pEnd - last_dot) > 4) last_dot[4] = '\0'; /* too many chars in extension */ /* else filename is fine as is: no change */ } } /* end function map2fat() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) /* path doesn't exist */ { if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) ,{ Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *-end = '\0'; Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", FnFilter1(pathcomp))); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); while ((*end = *pathcomp++) != '\0') { ++end; if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 1, ((char *)slide, LoadFarString(PathTooLongTrunc), FnFilter1(G.filename), FnFilter2(buildpath))); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; /* could check for existence here, prompt vDp UNZIP.BCK0. NZIP542.FLEXOS]FLEXOS.C;1BN0for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); /* allocate space for full filename, root path, and maybe "./" */ if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+3)) == (char *)NULL) return 10; if (renamed_fullpath) { /* pathcomp = valid data */ end = buildpath; while ((*end = *pathcomp++) != '\0') ++end; } else if (rootlen > 0) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", FnFilter1(buildpath))); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. Note that under FlexOS, if a candidate extract-to directory specification includes a drive letter (leading "x:"), it is treated just as if it had a trailing '/'--that is, one directory level will be created if the path doesn't exist, unless this is otherwise pro- hibited (e.g., freshening). ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", FnFilter1(pathcomp))); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { int had_trailing_pathsep=FALSE, add_dot=FALSE; char *tmproot; if ((tmproot = (char *)malloc(rootlen+3)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == '/' || tmproot[rootlen-1] == '\\') { tmproot[--rootlen] = '\0'; had_trailing_pathsep = TRUE; } if (tmproot[rootlen-1] == ':') { if (!had_trailing_pathsep) /* i.e., original wasn't "xxx:/" */ add_dot = TRUE; /* relative path: add '.' before '/' */ } else if (rootlen > 0) { /* need not check "xxx:." and "xxx:/" */ if (SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) { /* path does not exist */ if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* treat as stored file */ } /* GRR: scan for wildcard characters? OS-dependent... if find any, return 2: * treat as stored file(s) */ /* create directory (could add loop here scanning tmproot * to create more than one level, but really necessary?) */ if (mkdir(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, LoadFarString(CantCreateExtractDir), FnFilter1(tmproot))); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, */ return 3; /* failed: file exists, or need 2+ levels */ } } } if (add_dot) /* had just "x:", make "x:." */ tmproot[rootlen++] = '.'; tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", FnFilter1(rootpath))); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF /* * FlexOS VERSION * * Set the output file date/time stamp according to information from the * zipfile directory record for this member, then close the file and set * its permissions (archive, hidden, read-only, system). Aside from closing * the file, this routine is optional (but most compilers support it). */ { DISKFILE df; LONG fnum; struct { /* date and time words */ union { /* DOS file modification time word */ ush ztime; struct { unsigned zt_se : 5; unsigned zt_mi : 6; unsigned zt_hr : 5; } _tf; } _t; union { /* DOS file modification date word */ ush zdate; struct { unsigned zd_dy : 5; unsigned zd_mo : 4; unsigned zd_yr : 7; } _df; } _d; } zt; #ifdef USE_EF_UT_TIME iztimes z_utime; struct tm *t; #endif /* ?USE_EF_UT_TIME */ fclose(G.outfile); if ((fnum = s_open(A_SET, G.filename)) < 0) { Info(slide, 0x201, ((char *)slide, "warning: cannot open %s to set the time\n", G.filename)); return; } if (s_get(T_FILE, fnum, &df, DSKFSIZE) < 0) { s_close(0, fnum); Info(slide, 0x201, ((char *)slide, "warning: cannot get info on %s\n", G.filename)); return; } /*--------------------------------------------------------------------------- Copy and/or convert time and date variables, if necessary; then fill in the file time/date. ---------------------------------------------------------------------------*/ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", z_utime.mtime)); t = localtime(&(z_utime.mtime)); } else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { if (t->tm_year < 80) { df.df_modyear = 1980; df.df_modmonth = 1; df.df_modday = 1; df.df_modhr = 0; df.df_modmin = 0; df.df_modsec = 0; } else { df.df_modyear = t->tm_year + 1900; df.df_modmonth = t->tm_mon + 1; wٔ UNZIP.BCK0. NZIP542.FLEXOS]FLEXOS.C;1Bo? df.df_modday = t->tm_mday; df.df_modhr = t->tm_hour; df.df_modmin = t->tm_min; df.df_modsec = t->tm_sec; } } else #endif /* ?USE_EF_UX_TIME */ { zt._t.ztime = (ush)(G.lrec.last_mod_dos_datetime) & 0xffff; zt._d.zdate = (ush)(G.lrec.last_mod_dos_datetime >> 16); df.df_modyear = 1980 + zt._d._df.zd_yr; df.df_modmonth = zt._d._df.zd_mo; df.df_modday = zt._d._df.zd_dy; df.df_modhr = zt._t._tf.zt_hr; df.df_modmin = zt._t._tf.zt_mi; df.df_modsec = zt._t._tf.zt_se << 1; } /*--------------------------------------------------------------------------- Fill in the file attributes. ---------------------------------------------------------------------------*/ df.df_attr1 = (UBYTE)G.pInfo->file_attr; /*--------------------------------------------------------------------------- Now we try to set the attributes & date/time. ---------------------------------------------------------------------------*/ if (s_set(T_FILE, fnum, &df, DSKFSIZE) < 0) Info(slide, 0x201, ((char *)slide, "warning: cannot set info for %s\n", G.filename)); s_close(0, fnum); } #ifndef SFX /*************************/ /* Function dateformat() */ /*************************/ int dateformat() { return DF_DMY; /* default for systems without locale info */ } /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; len = sprintf((char *)slide, LoadFarString(CompiledWith), "MetaWare High C", "", "FlexOS", " (16-bit, big)", #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); } #endif /* !SFX */ /************************/ /* Function _wildarg() */ /************************/ /* This prevents the PORTLIB startup code from preforming argument globbing */ _wildarg() {} *[UNZIP542.FLEXOS]FLXCFG.H;1+,M./ 4)-. 0@123KPWO56M" 7M" 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- FlexOS specific configuration section: ---------------------------------------------------------------------------*/ #ifndef __flxcfg_h #define __flxcfg_h #define __16BIT__ #define MED_MEM #define EXE_EXTENSION ".286" #ifndef nearmalloc # define nearmalloc malloc # define nearfree free #endif #define CRTL_CP_IS_OEM #define near #define far #endif /* !__flxcfg_h */ -*[UNZIP542.FLEXOS]HC.PRO;1+,[./ 4-. 0@123KPWO56ȳkv7ȳkv89GHJpragma Off(Floating_point); pragma On(286); pragma On(Literals_in_code); pragma On(Warn); pragma On(pointers_compatible); pragma On(Callee_pops_when_possible); pragma On(Auto_reg_alloc); pragma On(Const_in_Code); pragma On(Read_only_strings); pragma On(Optimize_for_space); pragma Off(Prototype_override_warnings); pragma Off(Quiet); pragma Off(Asm); pragma Off(flexview); #define PORTLIB #define FLEXOS 1 -*[UNZIP542.FLEXOS]MAKEFILE.;1+,q. / 4 -. 0@123KPWO 56kv7kv89GHJ#------------------------------------------------------------------------------ # Makefile for UnZip 5.2 and later Derek Fawcus # Version: MetaWare High C with PAMAKE 3 Jun 96 # ########################################################################### # # Alter the first two macros to change the model # MODEL = big M = b # ########################################################################### # # These two sets of prefixes are changed when swapping between the master # and my machine. # FL_PREFIX = d:/flexos # Where FlexOS is rooted #FL_PREFIX = c:/. # ########################################################################### # # The following should not have to be changed - they should be automatic # given correct values for the above. # HC_LIB = $(FL_PREFIX)/highc/$(MODEL)/hc$(M)e.l86 PORT_LIB = $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).l86 PORT_OBJ = $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).obj HC_INC = $(FL_PREFIX)/highc/inc PORT_INC = $(FL_PREFIX)/usr/portlib/inc FLEX_INC = $(FL_PREFIX)/usr/inc +IPATH = $(PORT_INC)/;$(FLEX_INC)/; #+IPATH = $(PORT_INC)/;$(HC_INC)/;$(FLEX_INC)/; # ########################################################################### # # The programs to do the work. # CC = hc AS = rasm86 LD = link86 #HCOPTS=-mm $(MODEL) -debug -pr flexos/hc.pro HCOPTS=-mm $(MODEL) -pr flexos/hc.pro # ########################################################################### # # The file extensions to build from # .SUFFIXES: .SUFFIXES: .c .h .a86 # ########################################################################### # # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. CPU_TYP = 2 # Uncomment the following three macros to use the optimized CRC32 assembler # routine in UnZip and UnZipSFX: #ASMFLG = -DASM_CRC #ASMOBJS = crc_i86.obj #ASMOBJF = crc_i86_.obj ASCPUFLAG = __$(CPU_TYP)86 UNZIP_H = unzip.h unzpriv.h globals.h flexos/flxcfg.h default: unzip.286 #default: unzip.286 funzip.286 unzipsfx.286 clean: del *.ob? del unzip.286 del funzip.286 del unzipsfx.* del *.map del *.lin del *.sym del *.dbg # ########################################################################### # .asm.obj: $(AS) $(ASFLAGS) -D$(ASUNMODEL) $*.asm .c.obj: $(CC) $< $(HCOPTS) -ob $@ .c.obf: $(CC) $< $(HCOPTS) -def FUNZIP -ob $@ .c.obs: $(CC) $< $(HCOPTS) -def SFX -ob $@ # ########################################################################### # crc_i86.obj: flexos/crc_i86.a86 $(AS) $(ASFLAGS) -D$(ASUNMODEL) flexos/crc_i86.a86, $*.obj ; # ######################################################################### # # The objects to build from # UNZIP_OBJS = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj \ explode.obj extract.obj fileio.obj globals.obj inflate.obj \ list.obj match.obj process.obj ttyio.obj unreduce.obj \ unshrink.obj zipinfo.obj flexos.obj $(ASMOBJS) unzip.286: $(UNZIP_OBJS) $(LD) $@[st[add[17e]]] = $-[input] $(PORT_OBJ), $+(${UNZIP_OBJS}), $(Px UNZIP.BCKq. [UNZIP542.FLEXOS]MAKEFILE.;1 7ORT_LIB), $(HC_LIB) < UNZIPSFX_OBJS = unzip.obs crc32.obj crctab.obj crypt.obj extract.obs \ fileio.obj globals.obj inflate.obj match.obj process.obs \ ttyio.obj flexos.obs $(ASMOBJS) unzipsfx.286: $(UNZIPSFX_OBJS) $(LD) $@[dbi,map[all],st[add[17e]]] = $-[input] $(PORT_OBJ), $+(${UNZIPSFX_OBJS}), $(PORT_LIB), $(HC_LIB) < FUNZIP_OBJS = funzip.obj crc32.obf crypt.obf globals.obf inflate.obf \ ttyio.obf $(ASMOBJF) funzip.286: $(FUNZIP_OBJS) $(LD) $@[dbi,map[all],st[add[17e]]] = $-[input] $(PORT_OBJ), $+(${FUNZIP_OBJS}), $(PORT_LIB), $(HC_LIB) < # ########################################################################### # unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.obj: zipinfo.c $(UNZIP_H) process.obj: process.c $(UNZIP_H) list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h crctab.obj: crctab.c $(UNZIP_H) zip.h flexos.obj: flexos/flexos.c $(UNZIP_H) crc32.obj: crc32.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h globals.obj: globals.c $(UNZIP_H) inflate.obj: inflate.c inflate.h $(UNZIP_H) ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h crc32.obf: crc32.c $(UNZIP_H) zip.h crypt.obf: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h globals.obf: globals.c $(UNZIP_H) inflate.obf: inflate.c inflate.h $(UNZIP_H) crypt.h ttyio.obf: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h flexos.obs: flexos/flexos.c $(UNZIP_H) extract.obs: extract.c $(UNZIP_H) crypt.h process.obs: process.c $(UNZIP_H) unzip.obs: unzip.c $(UNZIP_H) crypt.h version.h consts.h h*[UNZIP542.FLEXOS]README.;1+,~./ 4-. 0@123KPWO56^3.x7^3.x89GHJThis should be considered an initial port - there will probably be some bugs and non-functioning features. The only functionality that has had any real testing is "unzip filename", anything else is basically untested. This has been cross-compiled from DOS using Metaware's High C compiler and the DOS version of pamake (v3.0). It should compile with the FlexOS hosted version of HighC, and the makefile could be converted to work with the native FlexOS make. The following considerations apply: )Compiled against and linked with portlib. )Used on FlexOS 286 v2.32 )Volume labels are not supported - this is due to the way FlexOS decides if a drive has case-sensitive filenames based upon the contents of the volume label. )No special handling for case-sensitive media (see above). )Not using the PORTLIB wildarg routine (i.e., UnZip does its own globbing). )Based upon the MSDOS port. )Filenames are in FAT format. )The current version of getch is a cheat (simply using getchar()). I should interrogate stdin and if it's a FlexOS console use special code to turn off echo and just read one char. )Only the basic MSDOS FAT file attributes are saved/restored. There is currently no support for the FlexOS extended file attributes. )There is some code that should attempt to do the correct thing when a pathspec with a logical name definition is used (e.g., "system:path/to/it"); however it again has not been stress-tested. )There is no special handling for floppy drives, there probably should be. )The dateformat is compiled in as DMY (shoot me I'm British), I'm not sure if there is actually a way to get locale info. )The assembler speedups haven't yet been ported to ASM86 (should simply be a change of syntax) -- D.Fawcus 17 July 1997 b y^V A  b 1H,d f-vNa myqvYj#C?:wgREUO3p]S BDW15.T[P_q(dU_') ^LY,bai\i3mJt_SLQ)B 1/J Po#@ zj 5<]LX6}[H(4mxTSL!~vbO U-hPJV Tv `TaHfdRI =5x !E$S-\B_yZO H'/E#C!qQ,{s_TI b 30vi;JZDE/j|F(c8WM1BU2cw_mbCr{a]Hr,q3I(zh@'IkNKs| m@7p F({hB2O-VP7Ed,6Z<}caj23Ui/+{1~ LfZ)>[EE |WaBx   8y2+(mNlMOl~z^RC@MJ|(p`Ey7WZ.M]nNb ;Sf UY!f U({m%'s 3EO5LN#/#V22spN\ Ak^8Im|5auS$Ryl/\>h?T@#\ ddKzIQ*FIL&o'eDAMdi_IwG:bz  :r( & 0#T"W r=3E7h"gA(GdX #]7gw>A 'H;\Ph5;ncHeAEFdvTQP` @Jj""~z&AC f TvhG! Gm'N:m4ARLv'@[^^`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Er sd2WKm8"?QaL;UMxjA($HoV1SR"bb2~`|_IdYx m?td %#dzdhR fhSx.9V fU&OaKl%N._:IL9jld_diiEogAFlg~'&!mN^ElPA[ *?f.bxqU2 : 9y1  ^ fdA!B"T[Iu6?'?h,U"i]xc{)%GvP U[y|tYWcOA=ZQWUAZC.[3FS8u<=v+F\2T$lCqZ s3  .yxW'&C0+h&oTA3 2Vw>!rpzR& 'i'oNU9#r-F] YTGf7puQpRY(BBapID3UMO<8DrG(}v{E VNSz\4KTN2>qn M#<=lK1+bwEA(GV{mo \eB-S?T:Mh{Yt{Byrm"y__U \d_PU^@d$ ;v{7tud[9q-'9p|'aJF,2O g|1 R D5}2^zaNoGe)=OY0{MIsk!rZD WR :K9.kXosN zH~{u$/m(U)] &wuD'M(Z= HUlLBHJ^<,{ncNq&e(dw1uN1~8+\OVcn[PKHXU >B @,k jXPSj*QF1 5Nctwba9R[gB$'n`Y%=(r(=/^*p\=;"rYQVJQeq*Kh  > ^T S^ji6 &R 6U>AkE LNTDu}/*;3l)!;tv,|T  D Ton, but the compiler complazmS! UNZIP.BCK  [UNZIP542]FUNZIP.C;1#i*[UNZIP542]FUNZIP.C;1+, .#/ 4##- 0@123KPWO$56-Na7-Na89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* funzip.c -- by Mark Adler */ #define VERSION "3.93 of 14 January 2001" /* Copyright history: - Starting with UnZip 5.41 of 16-April-2000, this source file is covered by the Info-Zip LICENSE cited above. - Prior versions of this source file, found in UnZip source packages up to UnZip 5.40, were put in the public domain. The original copyright note by Mark Adler was: "You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you." History: vers date who what ---- --------- -------------- ------------------------------------ 1.0 13 Aug 92 M. Adler really simple unzip filter. 1.1 13 Aug 92 M. Adler cleaned up somewhat, give help if stdin not redirected, warn if more zip file entries after the first. 1.2 15 Aug 92 M. Adler added check of lengths for stored entries, added more help. 1.3 16 Aug 92 M. Adler removed redundant #define's, added decryption. 1.4 27 Aug 92 G. Roelofs added exit(0). 1.5 1 Sep 92 K. U. Rommel changed read/write modes for OS/2. 1.6 6 Sep 92 G. Roelofs modified to use dummy crypt.c and crypt.h instead of -DCRYPT. 1.7 23 Sep 92 G. Roelofs changed to use DOS_OS2; included crypt.c under MS-DOS. 1.8 9 Oct 92 M. Adler improved inflation error msgs. 1.9 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch; renamed inflate_entry() to inflate(); adapted to use new, in-place zdecode. 2.0 22 Oct 92 M. Adler allow filename argument, prompt for passwords and don't echo, still allow command-line password entry, but as an option. 2.1 23 Oct 92 J-l. Gailly fixed crypt/store bug, G. Roelofs removed crypt.c under MS-DOS, fixed decryption check to compare single byte. 2.2 28 Oct 92 G. Roelofs removed declaration of key. 2.3 14 Dec 92 M. Adler replaced fseek (fails on stdin for SCO Unix V.3.2.4). added quietflg for inflate.c. 3.0 11 May 93 M. Adler added gzip support 3.1 9 Jul 93 K. U. Rommel fixed OS/2 pipe bug (PIPE_ERROR) 3.2 4 Sep 93 G. Roelofs moved crc_32_tab[] to tables.h; used FOPx from unzip.h; nuked OUTB macro and outbuf; replaced flush(); inlined FlushOutput(); renamed decrypt to encrypted 3.3 29 Sep 93 G. Roelofs replaced ReadByte() with NEXTBYTE macro; revised (restored?) flush(); added FUNZIP 3.4 21 Oct 93 G. Roelofs renamed quietflg to qflag; changed outcnt, H. Gessau second updcrc() arg and flush() arg to ulg; added inflate_free(); added "g =" to null getc(in) to avoid compiler warnings 3.5 31 Oct 93 H. Gessau changed DOS_OS2 to DOS_NT_OS2 3.6 6 Dec 93 H. Gessau added "near" to mask_bits[] 3.7 9 Dec 93 G. Roelofs added extent typecasts to fwrite() checks 3.8 28 Jan 94 GRR/JlG initialized g variable in main() for gcc 3.81 22 Feb 94 M. Hanning-Lee corrected usage message 3.82 27 Feb 94 G. Roelofs added some typecasts to avoid warnings 3.83 22 Jul 94 G. Roelofs changed fprintf to macro for DLLs - 2 Aug 94 - public release with UnZip 5.11 - 28 Aug 94 - public release with UnZip 5.12 3.84 1 Oct 94 K. U. Rommel changes for Metaware High C 3.85 29 Oct 94 G. Roelofs changed fprintf macro to Info 3.86 7 May 95 K. Davis RISCOS patches; P. Kienitz Amiga patches 3.87 12 Aug 95 G. Roelofs inflate_free(), DESTROYGLOBALS fixes 3.88 4 Sep 95 C. Spieler reordered macro to work around MSC 5.1 bug 3.89 22 Nov 95 PK/CS ifdef'd out updcrc() for ASM_CRC 3.9 17 Dec 95 G. Roelofs modified for USE_ZLIB (new fillinbuf()) - 30 Apr 96 - public release with UnZip 5.2 3.91 17 Aug 96 G. Roelofs main() -> return int (Peter Seebach) 3.92 13 Apr 97 G. Roelofs minor cosmetic fixes to messages - 22 Apr 97 - public release with UnZip 5.3 - 31 May 97 - public release with UnZip 5.31 3.93 20 Sep 97 G. Roelofs minor cosmetic fixes to messages - 3 Nov 97 - public release with UnZip 5.32 - 28 Nov 98 - public release with UnZip 5.4 - 16 Apr 00 - public release with UnZip 5.41 - 14 Jan 01 - public release with UnZip 5.42 */ /* All funzip does is take a zipfile from stdin and decompress the first entry to stdout. The entry has to be either deflated or stored. If the entry is encrypted, then the decryption password must be supplied on the command line as the first argument. funzip needs to be linked with inflate.o and crypt.o compiled from the unzip source. If decryption is desired, the full version of crypt.c (and crypt.h) from zcrypt28.zip or later must be used. */ #define FUNZIP #define UNZIP_INTERNAL #include "unzip.h" #include "crypt.h" #include "ttyio.h" #ifdef EBCDIC # undef EBCDIC /* don't need ebcdic[] */ #endif #include "tables.h" /* crc_32_tab[] */ #ifndef USE_ZLIB /* zlib's function is called inflate(), too */ # define UZinflate inflate #endif /* PKZIP header definitions */ #define ZIPMAG 0x4b50 /* two-byte zip lead-in */ #define LOCREM 0x0403 /* remaining two bytes in zip signature */ #define LOCSIG 0x04034b50L /* full signature */ #define LOCFLG 4 /* offset of bit flag */ #define CRPFLG 1 /* bit for encrypted entry */ #define EXTFLG 8 /* bit for extended local header */ #define LOCHOW 6 /* offset of compression method */ #define LOCTIM 8 /* file mod time (fo{2 UNZIP.BCK  [UNZIP542]FUNZIP.C;1#Br decryption) */ #define LOCCRC 12 /* offset of crc */ #define LOCSIZ 16 /* offset of compressed size */ #define LOCLEN 20 /* offset of uncompressed length */ #define LOCFIL 24 /* offset of file name field length */ #define LOCEXT 26 /* offset of extra field length */ #define LOCHDR 28 /* size of local header, including LOCREM */ #define EXTHDR 16 /* size of extended local header, inc sig */ /* GZIP header definitions */ #define GZPMAG 0x8b1f /* two-byte gzip lead-in */ #define GZPHOW 0 /* offset of method number */ #define GZPFLG 1 /* offset of gzip flags */ #define GZPMUL 2 /* bit for multiple-part gzip file */ #define GZPISX 4 /* bit for extra field present */ #define GZPISF 8 /* bit for filename present */ #define GZPISC 16 /* bit for comment present */ #define GZPISE 32 /* bit for encryption */ #define GZPTIM 2 /* offset of Unix file modification time */ #define GZPEXF 6 /* offset of extra flags */ #define GZPCOS 7 /* offset of operating system compressed on */ #define GZPHDR 8 /* length of minimal gzip header */ #ifdef THEOS /* Macros cause stack overflow in compiler */ ush SH(uch* p) { return ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)); } ulg LG(uch* p) { return ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)); } #else /* !THEOS */ /* Macros for getting two-byte and four-byte header values */ #define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)) #define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)) #endif /* ?THEOS */ /* Function prototypes */ void err OF((int, char *)); int main OF((int, char **)); /* Globals */ FILE *out; /* output file (*in moved to G struct) */ ulg outsiz; /* total bytes written to out */ int encrypted; /* flag to turn on decryption */ /* Masks for inflate.c */ ZCONST ush near mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; #ifdef USE_ZLIB int fillinbuf(__G) __GDEF /* Fill input buffer for pull-model inflate() in zlib. Return the number of * bytes in inbuf. */ { /* GRR: check return value from fread(): same as read()? check errno? */ if ((G.incnt = fread((char *)G.inbuf, 1, INBUFSIZ, G.in)) <= 0) return 0; G.inptr = G.inbuf; #if CRYPT if (encrypted) { uch *p; int n; for (n = G.incnt, p = G.inptr; n--; p++) zdecode(*p); } #endif /* CRYPT */ return G.incnt; } #endif /* USE_ZLIB */ #if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) #ifdef USE_ZLIB ZCONST uLongf *get_crc_table() { return (ZCONST uLongf *)crc_32_tab; } #else /* !USE_ZLIB */ ZCONST ulg near *get_crc_table() { return crc_32_tab; } #endif /* ?USE_ZLIB */ #endif /* !USE_ZLIB || USE_OWN_CRCTAB */ void err(n, m) int n; char *m; /* Exit on error with a message and a code */ { Info(slide, 1, ((char *)slide, "funzip error: %s\n", m)); DESTROYGLOBALS() EXIT(n); } int flush(w) /* used by inflate.c (FLUSH macro) */ ulg w; /* number of bytes to flush */ { G.crc32val = crc32(G.crc32val, slide, (extent)w); if (fwrite((char *)slide,1,(extent)w,out) != (extent)w && !PIPE_ERROR) err(9, "out of space on stdout"); outsiz += w; return 0; } int main(argc, argv) int argc; char **argv; /* Given a zipfile on stdin, decompress the first entry to stdout. */ { ush n; uch h[LOCHDR]; /* first local header (GZPHDR < LOCHDR) */ int g = 0; /* true if gzip format */ #if CRYPT char *s = " [-password]"; char *p; /* password */ #else /* !CRYPT */ char *s = ""; #endif /* ?CRYPT */ CONSTRUCTGLOBALS(); /* skip executable name */ argc--; argv++; #if CRYPT /* get the command line password, if any */ p = (char *)NULL; if (argc && **argv == '-') { argc--; p = 1 + *argv++; } #endif /* CRYPT */ #ifdef MALLOC_WORK G.area.Slide = (uch *)calloc(8193, sizeof(short)+sizeof(char)+sizeof(char)); #endif /* if no file argument and stdin not redirected, give the user help */ if (argc == 0 && isatty(0)) { Info(slide, 1, ((char *)slide, "fUnZip (filter UnZip), version %s\n", VERSION)); Info(slide, 1, ((char *)slide, "usage: ... | funzip%s | ...\n", s)); Info(slide, 1, ((char *)slide, " ... | funzip%s > outfile\n", s)); Info(slide, 1, ((char *)slide, " funzip%s infile.zip > outfile\n",s)); Info(slide, 1, ((char *)slide, " funzip%s infile.gz > outfile\n", s)); Info(slide, 1, ((char *)slide, "Extracts to stdout the gzip file or first\ zip entry of stdin or the given file.\n")); DESTROYGLOBALS() EXIT(3); } /* prepare to be a binary filter */ if (argc) { if ((G.in = fopen(*argv, FOPR)) == (FILE *)NULL) err(2, "cannot find input file"); } else { #ifdef DOS_FLX_NLM_OS2_W32 #if (defined(__HIGHC__) && !defined(FLEXOS)) setmode(stdin, _BINARY); #else setmode(0, O_BINARY); /* some buggy C libraries require BOTH setmode() */ #endif /* call AND the fdopen() in binary mode :-( */ #endif /* DOS_FLX_NLM_OS2_W32 */ #ifdef RISCOS G.in = stdin; #else if ((G.in = fdopen(0, FOPR)) == (FILE *)NULL) err(2, "cannot find stdin"); #endif } #ifdef DOS_FLX_H68_NLM_OS2_W32 #if (defined(__HIGHC__) && !defined(FLEXOS)) setmode(stdout, _BINARY); #else setmode(1, O_BINARY); #endif #endif /* DOS_FLX_H68_NLM_OS2_W32 */ #ifdef RISCOS out = stdout; #else if ((out = fdopen(1, FOPW)) == (FILE *)NULL) err(2, "cannot write to stdout"); #endif /* read local header, check validity, and skip name and extra fields */ n = getc(G.in); n |= getc(G.in) << 8; if (n == ZIPMAG) { if (fread((char *)h, 1, LOCHDR, G.in) != LOCHDR || SH(h) != LOCREM) err(3, "invalid zipfile"); if (SH(h + LOCHOW) != STORED && SH(h + LOCHOW) != DEFLATED) err(3, "first entry not deflated or stored--cannot unpack"); for (n = SH(h + LOCFIL); n--; ) g = getc(G.in); for (n = SH(h + LOCEXT); n--; ) g = getc(G.in); g = 0; encrypted = h[LOCFLG] & CRPFLG; } else if (n == GZPMAG) { if (fread((char *)h, 1, GZPHDR, G.in) != GZPHDR) err(3, "invalid gzip file"); if (h[GZPHOW] != DEFLATED) err(3, "gzip file not deflated"); if (h[GZPFLG] & GZPMUL) err(3, "cannot handle multi-part gzip files"); if (h[GZPFLG] & GZPISX) { n = getc(G.in); n |= getc(G.in) << 8; while (n--) g = getc(G.in); } if (h[GZPFLG] & GZPISF) while ((g = getc(G.in)) != 0 && g != EOF) ; if (h[GZPFLG] & GZPISC) while ((g = getc(G.in)) != 0 && g != EOF) ; g = 1; encrypted = h[GZPFLG] & GZPISE; } else err(3, "input not a zip or gzip file"); /* if entry encrypted, decrypt and validate encryption header */ if (encrypted) #if CRYPT { ush i, e; if (p == (char *)NULL) { if ((p = (char *)malloc(IZ_PWLEN+1)) == (char *)NULL) err(1, "out of memory"); else if ((p = getp("Enter password: ", p, IZ_PWLEN+1)) == (char *)NULL) err(1, "no tty to prompt for password"); } #if (defined(USE_ZLIB) && !defined(USE_OWN_CRCTAB)) /* initialize crc_32_tab pointer for decryption */ CRC_32_TAB = (ZCONST ulg Far *)get_crc_table(); #endif init_keys(p); for (i = 0; i < RAND_HEAD_LEN; i++) e = NEXTBYTE; if (e != (ush)(h[LOCFLG] & EXTFL| UNZIP.BCK  [UNZIP542]FUNZIP.C;1#"N G ? h[LOCTIM + 1] : h[LOCCRC + 3])) err(3, "incorrect password for first entry"); } #else /* !CRYPT */ err(3, "cannot decrypt entry (need to recompile with full crypt.c)"); #endif /* ?CRYPT */ /* prepare output buffer and crc */ G.outptr = slide; G.outcnt = 0L; outsiz = 0L; G.crc32val = CRCVAL_INITIAL; /* decompress */ if (g || h[LOCHOW]) { /* deflated entry */ int r; #ifdef USE_ZLIB /* need to allocate and prepare input buffer */ if ((G.inbuf = (uch *)malloc(INBUFSIZ)) == (uch *)NULL) err(1, "out of memory"); #endif /* USE_ZLIB */ if ((r = UZinflate(__G)) != 0) { if (r == 3) err(1, "out of memory"); else err(4, "invalid compressed data--format violated"); } inflate_free(__G); } else { /* stored entry */ register ulg n; n = LG(h + LOCLEN); #if CRYPT if (n != LG(h + LOCSIZ) - (encrypted ? RAND_HEAD_LEN : 0)) { #else if (n != LG(h + LOCSIZ)) { #endif Info(slide, 1, ((char *)slide, "len %ld, siz %ld\n", n, LG(h + LOCSIZ))); err(4, "invalid compressed data--length mismatch"); } while (n--) { ush c = getc(G.in); #if CRYPT if (encrypted) zdecode(c); #endif *G.outptr++ = (uch)c; if (++G.outcnt == WSIZE) /* do FlushOutput() */ { G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt && !PIPE_ERROR) err(9, "out of space on stdout"); outsiz += G.outcnt; G.outptr = slide; G.outcnt = 0L; } } } if (G.outcnt) /* flush one last time; no need to reset G.outptr/outcnt */ { G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt && !PIPE_ERROR) err(9, "out of space on stdout"); outsiz += G.outcnt; } fflush(out); /* if extended header, get it */ if (g) { if (fread((char *)h + LOCCRC, 1, 8, G.in) != 8) err(3, "gzip file ended prematurely"); } else if ((h[LOCFLG] & EXTFLG) && fread((char *)h + LOCCRC - 4, 1, EXTHDR, G.in) != EXTHDR) err(3, "zipfile ended prematurely"); /* validate decompression */ if (LG(h + LOCCRC) != G.crc32val) err(4, "invalid compressed data--crc error"); if (LG((g ? (h + LOCSIZ) : (h + LOCLEN))) != outsiz) err(4, "invalid compressed data--length error"); /* check if there are more entries */ if (!g && fread((char *)h, 1, 4, G.in) == 4 && LG(h) == LOCSIG) Info(slide, 1, ((char *)slide, "funzip warning: zipfile has more than one entry--rest ignored\n")); DESTROYGLOBALS() RETURN (0); } *[UNZIP542]FUNZIP.TXT;1+, ./ 4- 0@123KPWO 56iLa7iLa89GHJ FUNZIP(1L) FUNZIP(1L) NAME funzip - filter for extracting from a ZIP archive in a pipe SYNOPSIS [...] | funzip [-password] | [...] funzip [-password] input.zip | [...] funzip [-password] input.gz | [...] ARGUMENTS [-password] Optional password to be used if ZIP archive is encrypted. Decryption may not be supported at some sites. See DESCRIPTION for more details. DESCRIPTION funzip acts as a filter; that is, it assumes that a ZIP archive (or a gzip'd(1) file) is being piped into standard input, and it extracts the first member from the archive to stdout. If there is an argument, then the input comes from the specified file instead of from stdin. A password for encrypted zip files can be specified on the command line (preceding the file name, if any) by prefixing the password with a dash. Note that this constitutes a secu- rity risk on many systems; currently running processes are often visible via simple commands (e.g., ps(1) under Unix), and command-line histories can be read. If the first entry of the zip file is encrypted and no password is specified on the command line, then the user is prompted for a password and the password is not echoed on the console. Given the limitation on single-member extraction, funzip is most useful in conjunction with a secondary archiver program such as tar(1). The following section includes an example illustrating this usage in the case of disk back- ups to tape. EXAMPLES To use funzip to extract the first member file of the archive test.zip and to pipe it into more(1): funzip test.zip | more To use funzip to test the first member file of test.zip (any errors will be reported on standard error): funzip test.zip > /dev/null To use zip and funzip in place of compress(1) and zcat(1) (or gzip(1L) and gzcat(1L)) for tape backups: tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k Info-ZIP 14 January 2001 (v3.93) 1 FUNZIP(1L) FUNZIP(1L) dd if=/dev/nrst0 ibs=8k | funzip | tar xf - (where, for example, nrst0 is a SCSI tape drive). BUGS When piping an encrypted file into more and allowing fun- zip to prompt for password, the terminal may sometimes be reset to a non-echo mode. This is apparently due to a race condition between the two programs; funzip changes the terminal mode to non-echo before more reads its state, and more then ``restores'' the terminal to this mode before exiting. To recover, run funzip on the same file but redirect to /dev/null rather than piping into more; after prompting again for the password, funzip will reset the terminal properly. There is presently no way to extract any member but the first from a ZIP archive. This would be useful in the case where a ZIP archive is included within another archive. In the case where the first member is a direc- tory, funzip simply creates the directory and exits. The functionality of funzip should be incorporated into unzip itself (future release). SEE ALSO gzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L), zipinfo(1L), zipnote(1L), zipsplit(1L) URL The Info-ZIP home page is currently at http://www.info- zip.org/pub/infozip/ or ftp://ftp.info- zip.org/pub/infozip/ . AUTHOR Mark Adler (Info-ZIP) Info-ZIP 14 January 2001 (v3.93) 2 n*[UNZIP542]GLOBALS.C;1+, . / 4 p- 0@123KPWO56Pk= 7Pk= 89GHJ} UNZIP.BCK  [UNZIP542]GLOBALS.C;1 /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- globals.c Routines to allocate and initialize globals, with or without threads. Contents: registerGlobalPointer() deregisterGlobalPointer() getGlobalPointer() globalsCtor() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #ifndef FUNZIP /* initialization of sigs is completed at runtime so unzip(sfx) executable * won't look like a zipfile */ char central_hdr_sig[4] = {0, 0, 0x01, 0x02}; char local_hdr_sig[4] = {0, 0, 0x03, 0x04}; char end_central_sig[4] = {0, 0, 0x05, 0x06}; /* extern char extd_local_sig[4] = {0, 0, 0x07, 0x08}; NOT USED YET */ ZCONST char *fnames[2] = {"*", NULL}; /* default filenames vector */ #endif #ifndef REENTRANT Uz_Globs G; #else /* REENTRANT */ # ifndef USETHREADID Uz_Globs *GG; # else /* USETHREADID */ # define THREADID_ENTRIES 0x40 int lastScan; Uz_Globs *threadPtrTable[THREADID_ENTRIES]; ulg threadIdTable [THREADID_ENTRIES] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* Make sure there are */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* THREADID_ENTRIES 0s */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }; static ZCONST char Far TooManyThreads[] = "error: more than %d simultaneous threads.\n\ Some threads are probably not calling DESTROYTHREAD()\n"; static ZCONST char Far EntryNotFound[] = "error: couldn't find global pointer in table.\n\ Maybe somebody accidentally called DESTROYTHREAD() twice.\n"; static ZCONST char Far GlobalPointerMismatch[] = "error: global pointer in table does not match pointer passed as\ parameter\n"; static void registerGlobalPointer OF((__GPRO)); static void registerGlobalPointer(__G) __GDEF { int scan=0; ulg tid = GetThreadId(); while (threadIdTable[scan] && scan < THREADID_ENTRIES) scan++; if (scan == THREADID_ENTRIES) { ZCONST char *tooMany = LoadFarString(TooManyThreads); Info(slide, 0x421, ((char *)slide, tooMany, THREADID_ENTRIES)); free(pG); EXIT(PK_MEM); /* essentially memory error before we've started */ } threadIdTable [scan] = tid; threadPtrTable[scan] = pG; lastScan = scan; } void deregisterGlobalPointer(__G) __GDEF { int scan=0; ulg tid = GetThreadId(); while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) scan++; /*--------------------------------------------------------------------------- There are two things we can do if we can't find the entry: ignore it or scream. The most likely reason for it not to be here is the user calling this routine twice. Since this could cause BIG problems if any globals are accessed after the first call, we'd better scream. ---------------------------------------------------------------------------*/ if (scan == THREADID_ENTRIES || threadPtrTable[scan] != pG) { ZCONST char *noEntry; if (scan == THREADID_ENTRIES) noEntry = LoadFarString(EntryNotFound); else noEntry = LoadFarString(GlobalPointerMismatch); Info(slide, 0x421, ((char *)slide, noEntry)); EXIT(PK_WARN); /* programming error, but after we're all done */ } threadIdTable [scan] = 0; lastScan = scan; free(threadPtrTable[scan]); } Uz_Globs *getGlobalPointer() { int scan=0; ulg tid = GetThreadId(); while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) scan++; /*--------------------------------------------------------------------------- There are two things we can do if we can't find the entry: ignore it or scream. The most likely reason for it not to be here is the user calling this routine twice. Since this could cause BIG problems if any globals are accessed after the first call, we'd better scream. ---------------------------------------------------------------------------*/ if (scan == THREADID_ENTRIES) { ZCONST char *noEntry = LoadFarString(EntryNotFound); fprintf(stderr, noEntry); /* can't use Info w/o a global pointer */ EXIT(PK_ERR); /* programming error while still working */ } return threadPtrTable[scan]; } # endif /* ?USETHREADID */ #endif /* ?REENTRANT */ Uz_Globs *globalsCtor() { #ifdef REENTRANT Uz_Globs *pG = (Uz_Globs *)malloc(sizeof(Uz_Globs)); if (!pG) return (Uz_Globs *)NULL; #endif /* REENTRANT */ /* for REENTRANT version, G is defined as (*pG) */ memzero(&G, sizeof(Uz_Globs)); #ifndef FUNZIP #ifdef CMS_MVS uO.aflag=1; uO.C_flag=1; #endif #ifdef TANDEM uO.aflag=1; /* default to '-a' auto create Text Files as type 101 */ #endif uO.lflag=(-1); G.wildzipfn = ""; G.pfnames = (char **)fnames; G.pxnames = (char **)&fnames[1]; G.pInfo = G.info; G.sol = TRUE; /* at start of line */ G.message = UzpMessagePrnt; G.input = UzpInput; /* not used by anyone at the moment... */ #if defined(WINDLL) || defined(MACOS) G.mpause = NULL; /* has scrollbars: no need for pausing */ #else G.mpause = UzpMorePause; #endif G.decr_passwd = UzpPassword; #endif /* !FUNZIP */ #if (!defined(DOS_FLX_H68_NLM_OS2_W32) && !defined(AMIGA) && !defined(RISCOS)) #if (!defined(MACOS) && !defined(ATARI) && !defined(VMS)) G.echofd = -1; #endif /* !(MACOS || ATARI || VMS) */ #endif /* !(DOS_FLX_H68_NLM_OS2_W32 || AMIGA || RISCOS) */ #ifdef SYSTEM_SPECIFIC_CTOR SYSTEM_SPECIFIC_CTOR(__G); #endif #ifdef REENTRANT #ifdef USETHREADID registerGlobalPointer(__G); #else GG = &G; #endif /* ?USETHREADID */ #endif /* REENTRANT */ return &G; } *[UNZIP542]GLOBALS.H;1+, M./ 4- 0@123KPWO56c_%:a7c_%:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- globals.h There is usually no need to include this file since unzip.h includes~Z.^ UNZIP.BCK M [UNZIP542]GLOBALS.H;1$ it. This header file is used by all of the UnZip source files. It contains a struct definition that is used to "house" all of the global variables. This is done to allow for multithreaded environments (OS/2, NT, Win95, Unix) to call UnZip through an API without a semaphore. REENTRANT should be defined for all platforms that require this. GLOBAL CONSTRUCTOR AND DESTRUCTOR (API WRITERS READ THIS!!!) ------------------------------------------------------------ No, it's not C++, but it's as close as we can get with K&R. The main() of each process that uses these globals must include the CONSTRUCTGLOBALS; statement. This will malloc enough memory for the structure and initialize any variables that require it. This must also be done by any API function that jumps into the middle of the code. The DESTROYGLOBALS; statement should be inserted before EVERY "EXIT(n)". Naturally, it also needs to be put before any API returns as well. In fact, it's much more important in API functions since the process will NOT end, and therefore the memory WON'T automatically be freed by the operating system. USING VARIABLES FROM THE STRUCTURE ---------------------------------- All global variables must now be prefixed with `G.' which is either a global struct (in which case it should be the only global variable) or a macro for the value of a local pointer variable that is passed from function to function. Yes, this is a pain. But it's the only way to allow full reentrancy. ADDING VARIABLES TO THE STRUCTURE --------------------------------- If you make the inclusion of any variables conditional, be sure to only check macros that are GUARANTEED to be included in every module. For instance, newzip and pwdarg are needed only if CRYPT is TRUE, but this is defined after unzip.h has been read. If you are not careful, some modules will expect your variable to be part of this struct while others won't. This will cause BIG problems. (Inexplicable crashes at strange times, car fires, etc.) When in doubt, always include it! Note also that UnZipSFX needs a few variables that UnZip doesn't. However, it also includes some object files from UnZip. If we were to conditionally include the extra variables that UnZipSFX needs, the object files from UnZip would not mesh with the UnZipSFX object files. Result: we just include the UnZipSFX variables every time. (It's only an extra 4 bytes so who cares!) ADDING FUNCTIONS ---------------- To support this new global struct, all functions must now conditionally pass the globals pointer (pG) to each other. This is supported by 5 macros: __GPRO, __GPRO__, __G, __G__ and __GDEF. A function that needs no other parameters would look like this: int extract_or_test_files(__G) __GDEF { ... stuff ... } A function with other parameters would look like: int memextract(__G__ tgt, tgtsize, src, srcsize) __GDEF uch *tgt, *src; ulg tgtsize, srcsize; { ... stuff ... } In the Function Prototypes section of unzpriv.h, you should use __GPRO and __GPRO__ instead: int uz_opts OF((__GPRO__ int *pargc, char ***pargv)); int process_zipfiles OF((__GPRO)); Note that there is NO comma after __G__ or __GPRO__ and no semi-colon after __GDEF. I wish there was another way but I don't think there is. TESTING THE CODE ----------------- Whether your platform requires reentrancy or not, you should always try building with REENTRANT defined if any functions have been added. It is pretty easy to forget a __G__ or a __GDEF and this mistake will only show up if REENTRANT is defined. All platforms should run with REENTRANT defined. Platforms that can't take advantage of it will just be paying a performance penalty needlessly. SIGNAL MADNESS -------------- This whole pointer passing scheme falls apart when it comes to SIGNALs. I handle this situation 2 ways right now. If you define USETHREADID, UnZip will include a 64-entry table. Each entry can hold a global pointer and thread ID for one thread. This should allow up to 64 threads to access UnZip simultaneously. Calling DESTROYGLOBALS() will free the global struct and zero the table entry. If somebody forgets to call DESTROYGLOBALS(), this table will eventually fill up and UnZip will exit with an error message. A good way to test your code to make sure you didn't forget a DESTROYGLOBALS() is to change THREADID_ENTRIES to 3 or 4 in globals.c, making the table real small. Then make a small test program that calls your API a dozen times. Those platforms that don't have threads still need to be able to compile with REENTRANT defined to test and see if new code is correctly written to work either way. For these platforms, I simply keep a global pointer called GG that points to the Globals structure. Good enough for testing. I believe that NT has thread level storage. This could probably be used to store a global pointer for the sake of the signal handler more cleanly than my table approach. ---------------------------------------------------------------------------*/ #ifndef __globals_h #define __globals_h #ifdef USE_ZLIB # include "zlib.h" #endif /*************/ /* Globals */ /*************/ typedef struct Globals { #ifdef DLL zvoid *callerglobs; /* pointer to structure of pass-through global vars */ #endif /* command options of general use */ UzpOpts UzO; /* command options of general use */ #ifndef FUNZIP /* command options specific to the high level command line interface */ #ifdef MORE int M_flag; /* -M: built-in "more" function */ #endif /* internal flags and general globals */ #ifdef MORE int height; /* check for SIGWINCH, etc., eventually... */ int lines; /* count of lines displayed on current screen */ # if (defined(SCREENWIDTH) && defined(SCREENLWRAP)) int width; int chars; /* count of screen characters in current line */ # endif #endif /* MORE */ #if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) int tz_is_valid; /* indicates that timezone info can be used */ #endif int noargs; /* did true command line have *any* arguments? */ unsigned filespecs; /* number of real file specifications to be matched */ unsigned xfilespecs; /* number of excluded filespecs to be matched */ int process_all_files; int overwrite_mode; /* 0 - query, 1 - always, 2 - never */ int create_dirs; /* used by main(), mapname(), checkdir() */ int extract_flag; int newzip; /* reset in extract.c; used in crypt.c */ LONGINT real_ecrec_offset; LONGINT expect_ecrec_offset; long csize; /* used by decompr. (NEXTBYTE): must be signed */ long used_csize; /* used by extract_or_test_member(), explode() */ #ifdef DLL int fValidate; /* true if only validating an archive */ int filenotfound; int redirect_data; /* redirect data to memory buffer */ int redirect_text; /* redirect text output to buffer */ # ifndef NO_SLIDE_REDIR int redirect_slide; /* redirect decompression area to mem buffer */ unsigned _wsize; # endif unsigned redirect_size; /* size of redirected output buffer */ uch *redirect_buffer; /* pointer to head of allocated buffer */ uch *redirect_pointer; /* pointer past end of written data */ # ifndef NO_SLIDE_REDIR uch *redirect_sldptr; /* head of decomp UNZIP.BCK M [UNZIP542]GLOBALS.H;1ression slide buffer */ # endif # ifdef OS2DLL cbList(processExternally); /* call-back list */ # endif #endif /* DLL */ char **pfnames; char **pxnames; char sig[4]; char answerbuf[10]; min_info info[DIR_BLKSIZ]; min_info *pInfo; #endif /* !FUNZIP */ union work area; /* see unzpriv.h for definition of work */ #ifndef FUNZIP # if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) ZCONST ulg near *crc_32_tab; # else ZCONST ulg Far *crc_32_tab; # endif #endif ulg crc32val; /* CRC shift reg. (was static in funzip) */ #ifdef FUNZIP FILE *in; /* file descriptor of compressed stream */ #endif uch *inbuf; /* input buffer (any size is OK) */ uch *inptr; /* pointer into input buffer */ int incnt; #ifndef FUNZIP ulg bitbuf; int bits_left; /* unreduce and unshrink only */ int zipeof; char *argv0; /* used for NT and EXE_EXTENSION */ char *wildzipfn; char *zipfn; /* GRR: WINDLL: must nuke any malloc'd zipfn... */ #ifdef USE_STRM_INPUT FILE *zipfd; /* zipfile file descriptor */ #else int zipfd; /* zipfile file handle */ #endif LONGINT ziplen; LONGINT cur_zipfile_bufstart; /* extract_or_test, readbuf, ReadByte */ LONGINT extra_bytes; /* used in unzip.c, misc.c */ uch *extra_field; /* Unix, VMS, Mac, OS/2, Acorn, ... */ uch *hold; local_file_hdr lrec; /* used in unzip.c, extract.c */ cdir_file_hdr crec; /* used in unzip.c, extract.c, misc.c */ ecdir_rec ecrec; /* used in unzip.c, extract.c */ struct stat statbuf; /* used by main, mapname, check_for_newer */ int mem_mode; uch *outbufptr; /* extract.c static */ ulg outsize; /* extract.c static */ int reported_backslash; /* extract.c static */ int disk_full; int newfile; int didCRlast; /* fileio static */ ulg numlines; /* fileio static: number of lines printed */ int sol; /* fileio static: at start of line */ int no_ecrec; /* process static */ #ifdef SYMLINKS int symlnk; #endif #ifdef NOVELL_BUG_FAILSAFE int dne; /* true if stat() says file doesn't exist */ #endif FILE *outfile; uch *outbuf; uch *realbuf; #ifndef VMS /* if SMALL_MEM, outbuf2 is initialized in */ uch *outbuf2; /* process_zipfiles() (never changes); */ #endif /* else malloc'd ONLY if unshrink and -a */ #endif /* !FUNZIP */ uch *outptr; ulg outcnt; /* number of chars stored in outbuf */ #ifndef FUNZIP char filename[FILNAMSIZ]; /* also used by NT for temporary SFX path */ #ifdef CMS_MVS char *tempfn; /* temp file used; erase on close */ #endif char *key; /* crypt static: decryption password or NULL */ int nopwd; /* crypt static */ #endif /* !FUNZIP */ ulg keys[3]; /* crypt static: keys defining pseudo-random sequence */ #if (!defined(DOS_FLX_H68_NLM_OS2_W32) && !defined(AMIGA) && !defined(RISCOS)) #if (!defined(MACOS) && !defined(ATARI) && !defined(VMS)) int echofd; /* ttyio static: file descriptor whose echo is off */ #endif /* !(MACOS || ATARI || VMS) */ #endif /* !(DOS_FLX_H68_NLM_OS2_W32 || AMIGA || RISCOS) */ unsigned hufts; /* track memory usage */ #ifdef USE_ZLIB int inflInit; /* inflate static: zlib inflate() initialized */ z_stream dstrm; /* inflate global: decompression stream */ #else struct huft *fixed_tl; /* inflate static */ struct huft *fixed_td; /* inflate static */ int fixed_bl, fixed_bd; /* inflate static */ unsigned wp; /* inflate static: current position in slide */ ulg bb; /* inflate static: bit buffer */ unsigned bk; /* inflate static: bits in bit buffer */ #endif /* ?USE_ZLIB */ #ifndef FUNZIP #ifdef SMALL_MEM char rgchBigBuffer[512]; char rgchSmallBuffer[96]; char rgchSmallBuffer2[160]; /* boosted to 160 for local3[] in unzip.c */ #endif MsgFn *message; InputFn *input; PauseFn *mpause; PasswdFn *decr_passwd; StatCBFn *statreportcb; #ifdef WINDLL LPUSERFUNCTIONS lpUserFunctions; #endif int incnt_leftover; /* so improved NEXTBYTE does not waste input */ uch *inptr_leftover; #ifdef VMS_TEXT_CONV int VMS_line_state; /* so native VMS variable-length text files are */ int VMS_line_length; /* readable on other platforms */ int VMS_line_pad; #endif #endif /* !FUNZIP */ #ifdef SYSTEM_SPECIFIC_GLOBALS SYSTEM_SPECIFIC_GLOBALS #endif } Uz_Globs; /* end of struct Globals */ /***************************************************************************/ #ifdef FUNZIP # if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) extern ZCONST ulg near crc_32_tab[256]; # else extern ZCONST ulg Far *crc_32_tab; # endif # define CRC_32_TAB crc_32_tab #else # define CRC_32_TAB G.crc_32_tab #endif Uz_Globs *globalsCtor OF((void)); /* pseudo constant sigs; they are initialized at runtime so unzip executable * won't look like a zipfile */ extern char local_hdr_sig[4]; extern char central_hdr_sig[4]; extern char end_central_sig[4]; /* extern char extd_local_sig[4]; NOT USED YET */ #ifdef REENTRANT # define G (*(Uz_Globs *)pG) # define __G pG # define __G__ pG, # define __GPRO Uz_Globs *pG # define __GPRO__ Uz_Globs *pG, # define __GDEF Uz_Globs *pG; # ifdef USETHREADID extern int lastScan; void deregisterGlobalPointer OF((__GPRO)); Uz_Globs *getGlobalPointer OF((void)); # define GETGLOBALS() Uz_Globs *pG = getGlobalPointer(); # define DESTROYGLOBALS() {free_G_buffers(pG); deregisterGlobalPointer(pG);} # else extern Uz_Globs *GG; # define GETGLOBALS() Uz_Globs *pG = GG; # define DESTROYGLOBALS() {free_G_buffers(pG); free(pG);} # endif /* ?USETHREADID */ # define CONSTRUCTGLOBALS() Uz_Globs *pG = globalsCtor() #else /* !REENTRANT */ extern Uz_Globs G; # define __G # define __G__ # define __GPRO void # define __GPRO__ # define __GDEF # define GETGLOBALS() # define CONSTRUCTGLOBALS() globalsCtor() # define DESTROYGLOBALS() #endif /* ?REENTRANT */ #define uO G.UzO #endif /* __globals_h */ R*[UNZIP542]HISTORY.540;1+,| ..0/ 400f- 0@123KPWO156[7[89GHJ/f UNZIP.BCK| . [UNZIP542]HISTORY.540;10ܑUnZip, version 5.4, 28 November 1998 Features added (or removed): 5.33a (05 Dec 97): - expanded file-size fields for -l/-v listings [GRR, Raymond Chi] - expanded file-size fields in non-verbose ZipInfo listings [Christian] - WinDLL: enabled emx/rsxnt compilation and fixed some minor bugs [Christian] - Win32: added Borland C++ makefile [E-Yen Tan] - Unix: added BINPERMS and MANPERMS variables to makefile for setting file perms on installed binaries and man pages; replaced rogue "rm -f" [Quentin Barnes, GRR] - Unix: added generic_shlib target for Unix DLLs [GRR, Thomas Klausner] 5.33b (24 Dec 97): - VMS: added "zip -A" call to mksfx.com to fix offsets in central dir [SPC] - MSDOS, WIN32: added restoration of directory attributes [SPC] - IBM OS/390: new port (POSIX environment, EBCDIC) [Paul von Behrend] 5.33c (15 Apr 98): - OS/2: restore directory attributes (system, hidden) [Kai Uwe Rommel] - WIN32: added support for RSXNTDJ 1.3.1 [E-Yen Tan, SPC] - DLL: added UzpFreeMemBuffer() function to release memory allocated by UzpUnzipToMemory() [Mike White] - BeOS: support extraction of file attributes from BeOS extra field for symbolic links [Chris Herborth] - MSDOS: do not use UTC time-stamps when TZ environment not set [Cosmin Truta] - WIN32: added support for GCC in Cygnus Win32 environment [Cosmin Truta] - VM/CMS and MVS support, compiled on IBM OS/390 [Ian. E. Gorman] 5.33d (30 Apr 98): - WIN32: added support for GCC in MINGW32 environment [SPC] 5.33e (28 May 98): - CMS: rewrite of README.CMS, now shared between Zip and UnZip [Greg Hartwig] - BeOS: enable "automatic update of mime file-info" in beos.h [Chris Herborth] - AMIGA, OS2: enabled IZ_CHECK_TZ (do not use UTC time-stamps when environment variable TZ is not set) [Kai Uwe Rommel, SPC] 5.33f (13 Jun 98): - WIN32: support free LCC compiler (new Makefile.lcc) [E-Yen Tan] - MacOS: revised Macintosh port [Dirk Haase] 5.33g (08 Aug 98): - QDOS: much better support for SFX archives on SMS/QDOS [Jonathan Hudson] 5.33h (17 Aug 98): - BeOS: support restoration of directory attributes, permissions, and time-stamps, similar to the UNIX port [Chris Herborth] 5.33i (13 Sep 98): - added handling of Mac3 and BeOS e.f. blocks to "verbose ZipInfo" and "test archive" operations [SPC] - added "Type & Creator" display in verbose ZipInfo mode for all Mac extra fields that support this info [Dirk Haase] - added support for PKWARE's PKZIP for Unix "timestamps & uid/gid" extra field; modified the Unix port's attribute mapping to restore complete UNIX style attributes from archives created by PKZIP for Unix [SPC] - LynxOS: another variant of Unix; add OS message to unix.c's version_local() and specific entry to unix/Makefile [Giuseppe Guerrini] 5.33j (31 Oct 98): - added cross-compiling target for QNX/Neutrino (i386 target) [Chris Herborth] 5.33k (08 Nov 98): - Windows (16 and 32-bit): added first pre-release of a GUI interface for sfx stubs [Mike White] 5.33l (12 Nov 98): - Windows (16 and 32-bit): completed Windows GUISFX stub sources, integrated build procedures into UnZip source tree [Mike White] 5.4b (21 Nov 98): - Acorn: added -F option to suppress removal of NFS filetype extension from the names of extracted files [Darren Salt] - Unix: added optional feature, controlled by ACORN_FTYPE_NFS compile-time option, to translate Acorn RISC OS extra-field filetype info into "NFS filetype extension" appended to the extracted filename. When compiled in UnZip, specifying the -F option enables this feature. [Darren Salt, SPC] - unzip.1: added documentation for the new Acorn NFS filetype features [SPC] Bugs fixed: 5.33a (05 Dec 97): - OS/2: removed bogus "else" in UzpFileTree() [Takashi Shoda] - fixed Dave Smith's name (no "D") [GRR, Dave Smith] - OS/2: turned off verbose EAs/ACLs messages if -q given [Jorgen Thomsen, Christian, Kai Uwe, GRR] - DLL: eliminated dependency on non-standard strupr() [GRR, Thomas Klausner] - fixed possible ANSI name-clash problem in extract.c (offended MSC 8.0) [Steve Salisbury, Christian Spieler] - SMS/QDOS: fixed word-alignment bug in extra-field handling [Jonathan Hudson] - VMS: fixed minor UNZIP_CLI typo [Hunter Goatley] - MSDOS: fixed DJGPP v1 support (msdos.c, makefile.dj1) [C. Spieler] - WinDLL: fixed allocation bug in windll.c (esp. affected 16-bit WiZ) [Mike White, Christian Spieler] - WinDLL: fixed structs.h and windll32.mak to allow Borland apps (e.g., WiZ) to work with MSVC DLL [Mike W] - VMS: recognize new RTL related version symbols of DEC C V 5.6 [C. Spieler] - fixed handling of entries with extended local headers when output is redirected to memory (extract.c, process.c, unzpriv.h) [Craig Forbes] - fixed memory leak in the UNIX specific DIRSTAMP feature (extract.c) [Craig Forbes, Christian Spieler] - completely revised DIRSTAMP feature to reduce memory requirements and prepare porting it to non-UNIX systems [C. Spieler] - DLL: removed bogus redirect_outfile() call from unzipToMemory() body and cleaned "return value "calculation"; moved "G.C_flag = 1" into rexx_api.c, entry filename matching of generic UzpUnzipToMemory() is now case-sensitive [Christian Spieler (SPC)] - DLL (apihelp.c): corrected help text for UzpFileTree() [SPC] 5.33b (24 Dec 97): - generic: check return value of localtime() calls for NULL pointer, to avoid accessing unallocated memory (fix for MSC Win32 problem) [SPC, S. Salisbury] - extract.c, globals.[ch], list.c, process.c, zipinfo.c: shortened "sig..." arrays to 4 chars and removed them from "struct Globals" [SPC] - commented out all "struct Globals" members that are unused in fUnZip [SPC] - win32/win32.c: remarkable speedup of file extractions by replacing "IsFileNameValid()" with "!IsVolumeOldFAT()" and avoiding repeated "GetVolumeInfo" queries for the same device. [Johnny Lee, Paul Kienitz, SPC] 5.33c (15 Apr 98): - OS/2 DLL (rexxapi.c): UzVer(): do not evaluate args[] past argument count [Kai Uwe Rommel] - WINDLL (api.c), UzpUnzipToMemory(), UzpGrep(): fixed memory leak and problem with missing password query callback function when grep-ing an encrypted archive (this changed the DLL API for WINDLL!!) [Mike White] - VMS CLI (cmdline.c): fixed handling of /DIR=path option [Andy Harper, SPC] - acorn/acorn.c: fixed conversion of time_t to 5-byte Acorn timestamp value; previous code dropped carry bits [D. Krumbholz, S. Monesi, SPC] - UzpPassword() (fileio.c): use FnFilter for displaying entry name - WINDLL: more space for path names (260 for WIN32 LFN support) [Mike White] - Unix (process.c): corrected offsets for extracting new "Ux" UID/GID fields [Rudolf Cejka] - fixed UnzipToMemory of stored entries, prepared support for UnzipToMemory with text conversion [SPC] - Unix and ports with Unix-like file permissions: Added work-around for ASI/Unix & PKware/VMS generated archives where mode(=external_file_attr) field has been set to 0 [SPC] - SFX (unzip.c, DOS_FLX_H68_OS2_W32): fixed "access past end of argv" bug in the command line parser [SPC] - WIN32: fixed timezone handling for file times in stat() [SPC] - general work-around for some C RTL's failure to automatically initialize timezone info (e.g. Borland C) by calling tzset() at start of process_zipfiles() [GRR, Cosmin Truta, SPC] - WIN32: fixes for i386 assembler sources to work with Borland TASM 5.0 [Cosmin Truta] - VM/CMS: many fixes and additions regarding query prompts, stat(), version info, compilation "equipment" and sy w_ UNZIP.BCK| . [UNZIP542]HISTORY.540;10Astem specific documentation [Ian E. Gorman] - MVS: changes to get first working MVS binaries (stat(), "makefile", ...) [Ian E. Gorman] - CMS_MVS: changed handling of trailing newlines after query prompts by using a specific macro, to remove unwanted newlines in some other messages [SPC] 5.33d (30 Apr 98): - general: removed REENTRANT only bug introduced by "Check_for_TZ" fix [SPC] - extract.c: code fix for SET_DIR_ATTRIB defined without USE_EF_UT_TIME [SPC] - general: added ZCONST declarations to constant definitions (especially constant strings) and to "readonly" string arguments [SPC] - zipinfo.c: added some typecasts to work around Turbo C++ 1.0 bug [SPC] - MSDOS, makefile.bc: added "-DZCONST" to TC++v1.0 CFLAGS, compiler does not accept constant far arrays [SPC] - WINDLL: fixed interface of extract-to-mem functions, removed several typos [Mike White] - extract.c, list.c, zipinfo.c: changed several internal counter variables from signed int to unsigned int [Mike White, SPC] - WINDLL: moved all windll specific interface functions from api.c into windll/windll.c and the corresponding declarations from unzip.h into windll/decs.h [SPC] - win32/win32.c: pass struct Globals to IsVolumeOldFAT() [Mike White] - WINDLL: introduced new (generic DLL api) StatReportCB() function, replacing sound() and ServCallBk() in the generic source; added WinStatReportCB() interface wrapper which translates between windll and generic API [SPC] - amiga/amiga.c: Fixed "null permission" workaround (variable reference out of scope) [Paul Kienitz] - VMS: added work-around for ASI/Unix & PKware/VMS generated archives where mode(=external_file_attr) field has been set to 0 (see 5.33c) [SPC] - AMIGA: several time_lib related clean-up fixes and updated Makefiles [Paul Kienitz, Haidinger Walter] - INSTALL: corrected the description of wildcard matching on DOS-like file systems (handling of dots) [Paul Kienitz] - amiga/time-lib.c: fixed calculation of global timezone variable [SPC] - proginfo/extra.fld: added description of PKWARE's Win95/WinNT e.f. [SPC] - list.c, zipinfo.c: counting of archive entries starts with 1, not 0 [SPC] - ebcdic.h: applied OS/390 specific mapping changes [Paul v. Behren], added note concerning EBCDIC's NL vs. LF usage and mapping consequences [SPC] - win32/win32.c: fixed fs_type_info queries for paths with explicit drive specification, speedup of "uses_fs_local_time?" queries [SPC] - fileio.c, dos_to_unix_time(): fixed WIN32 version, added alternative code for systems with working mktime() call; force use of HAVE_MKTIME version for EMX and DJGPP [SPC] 5.33e (28 May 98): - api.c: fixed typo; added missing definition of dummyfn() in UzpDLL_Init(), UzpUnzipToMemory tolerates PK_WARN errors [Peter Kunath] - WinDLL cleanup: * renamed several exported functions (Unz_... -> Wiz_..., Uzp.. -> Wiz_..., windll_unzip -> Wiz_SingleEntryUnzip) [Mike White] * removed non-working borland makefiles [Mike White] * updated windll documentation [Mike White (MW), SPC] * cosmetics: standardized use of Win-API style data type names [MW, SPC] - win32/crc_i386.c: fixes to get it work with MSVC, again [Peter Kunath] - list.c: fixed OS2DLL specific processExternally() support [P. Kunath, SPC] - CMS/MVS: added "byteseek" to FOPR/FOPM options to allow change of format for binary files from "RECFM=F LRECL=1" to "RECFM=V LRECL=32760" [Greg Hartwig] - CMS/MVS, miscellaneous updates and fixes: * disable optional MORE functionality * do not disable use of signals; * rewrote version() for more specific compiler/runtime info; * fixed several typos (missing ';', wrong "CMS" preprocessor symbol, ...) * adapted some messages to CMS/MVS specifics [Greg Hartwig] - CMS: changed help info to refer to "fm" rather than "exdir" [Greg Hartwig] - CMS, new README.CMS: small correction in description of Zip's "-a" option; binary data should NOT be zipped using this option [SPC] - general: replaced ush variables pairs "dos_date" and "dos_time" by single ulg "dos_datetime", to standardize Zip's and UnZip's handling of DOS timestamps [SPC] - unix/unix.c: fixed typo in close_outfile() [Eric Baatz] - extract.c, extract_or_test_member(): moved initialization of decryption in front of the "path/file exists" check to prevent the creation of directories in case the password check fails. [SPC] - msdos/msdos.c: added MS Quick C case to version() info [E-Yen Tan] 5.33f (13 Jun 98): - WINDLL: moved Wiz_NoPrinting() declaration from unzip.h into windll/decs.h; modified DLLMESSAGE() prototype according to var type changes in list.c; check fNoPrinting in output callback functions of windll.c [Mike White] - process.c: removed superfluous fValidate test and initialized nmember in do_seekable() [SPC] - globals.h: fixed typo (missing ';' after "callerglobs") [Mike White] - AMIGA/CMS_MVS/TANDEM/VMS mapname(): skip volume label entries [SPC] - amiga/amiga.c: only suppress rootpath when user specified absolute path at the rename prompt [SPC] - WINDLL: updated Visual Basic example files [Raymond L. King] - MacOS: renamed system-specific subdir into "macos/" [Dirk Haase, SPC] - MacOS: moved most of the system-specific configuration settings and declarations out of the generic files into new macos/maccfg.h [SPC] - MacOS: tried to clean up mapname()/checkdir() functions; added missing TIMET_TO_NATIVE macro in close_outfile() [SPC] - msdos/msdos.c: revised Quick C version info to recognize QC 2.5 [SPC] - UNIX: added prototype of set_direc_attribs(), corrected its calling interface; fixed typo in unix/unix.c's do_wild() [SPC] - api.c: adapted non-WINDLL UzpGrep() to the modified UzpUnzipToMemory() interface [SPC] - MacOS: fixed handling of long pathnames (> 256 chars) by removing all C <--> Pascal string conversions [Dirk Haase] 5.33g (08 Aug 98): - QDOS, do_wild(): consistenly ignore case in name matching [Jonathan Hudson] - win32/Makefile.dj: added rule to build "advapi32" import library that is missing in rsxnd/dj distribution to support NTSD_EAS feature [SPC] - MSDOS: little clean-up for MS Quick C version info [E-Yen Tan] - win32/win32.c: fixed do_wild() (missing pair of braces); used built-in dirent replacements for buggy EMX RT routines, to achieve case conservation in filenames [SPC] - generic: applied modifications to support latest zlib release (1.1.3), especially around "crc32" code [SPC] - generic: defined typedef'ed name "Uz_Globs" for "struct Globals" and use it everywhere [SPC] - MSDOS: prevent "macro expansion space overflow" for MSC 5.1 with DEBUG enabled [SPC] - WINDLL: updated Visual Basic example files [Raymond L. King] - MacOS: moved FindNewExtractFolder() from helpers.c into macunzip.c [SPC] - WIN32, Watcom C: copied fix in getch() from Zip 2.3e [???, SPC] - TANDEM: synchronized code with Zip 2.3e (zipopen() performance improvements, correct in2ex() and mapname() processing, display dates in UK format, update installation procedure and README) [Dave D Smith, SPC] 5.33h (17 Aug 98): - BeOS: updated documentation and Makefile for better multi-platform and cross-compilation support; dropped x86 specific resource files, a new BeOS utility allows to apply the same resource files for all platforms [Chris Herborth] - unzpriv.h: removed superfluous trailing ";" from USAGE() macro definition; process.c, ef_scan_for_izux(): fixed bugs in masking expressions (use '~', not '!') [Johnny Lee] - unzi6Md UNZIP.BCK| . [UNZIP542]HISTORY.540;10p.c, uz_opt(): clarified loop expression to keep lint quiet [SPC] - regenerated ".doc" files from ".1" nroff sources, with scheduled release date of September 1st, 1998 [SPC] - added first try of a "real" user interface to the windll VB5 sample [SPC] 5.33i (13 Sep 98): - BeOS: small update to Makefile, install target [Chris Herborth] - WINDLL: removed 16-bit version from windll.rc [Mike White] - MSDOS: fixed timestamp conversion bug in close_outfile for djgpp by revising the conversion structure layout [Tim van Holder, SPC] - proginfo/extra.fld: added description of new Mac3 extra field format for the Macintosh [D. Haase, SPC] - vms/vms.c: fixed typos (incompletely renamed dos date/time variables [Mike Freeman, SPC] - atari/atari.c: fixed USE_EF_UT_TIME related typo in close_outfile [SPC] - TANDEM: support "USE_EF_UT_TIME", setting of timestamps (controlled by symbol LICENSE) and "setting UID/GID" [Dave D. Smith, SPC] - BeOS: fixed "set UID/GID" feature: enabled "-X" option handling [SPC] - AMIGA: moved N_flag definition into UzpOpts structure (unzip.h) [P. Kienitz] - AMIGA, filedate.c: unconditionally depend on zip.h inclusion, to achieve well defined header inclusion sequence [P. Kienitz, SPC] - Win32, Makefile.wat: fixed typo (win32.obf -> win32f.obj) [P. Kienitz] - zipinfo.c, zi_long(): do not increment *pEndprev when it was previously set to 0L [SPC] - fileio.c, UzpPassword(): for MacOS, add linebreak to long prompt [D. Haase]; move strings into far MSDOS memory [SPC] - ttyio.h: removed declarations of getch() replacements that are defined and declared in OS-specific source files (Amiga Agetch(), Mac macgetch()) [SPC] - WINDLL: enhanced the VB5 example application's user interface [Mike le Voi] - MacOS: support for decryption added; support pause() function (enabled MORE functionality) [D. Haase] - MacOS: created private set of time handling functions to work around the time-stamp mess caused by weird Macintosh C runtime libs [D. Haase] - MacOS: merged in MacZip beta 6 release [D. Haase, SPC] - MacOS: fixed time handling (UTC vs. local time) in macstat() [SPC] - MacOS: modified (fixed) timestamp setting in close_outfile(); changed several function definitions that are local for mac.c into "static" [SPC] - MacOS, changed Mac3 e.f. layout: added "local time - UTC" offset fields for all types of native "local time" Mac timestamps; removed superfluous daylight saving time flag and gmt_offset field [SPC] 5.33j (31 Oct 98): - zipinfo.c: fixed typo in G.statreportcb() call [Mike White] - vms/vms.c: converted calling interface of VMS dos_to_unix_time() function to the generic modifications introduced in 5.33e [Mike Freeman, SPC] - beos/beos.[ch]: added type cast, corrected symbol names [Chris Herborth] - aosvs/aosvs.c: added missing definition for message strings [SPC] - crctab.c: worked around Borland TC++ 1.0 problem [SPC] - WINDLL: updated example.[ch] for current DLL interface; prepared windll.c for GUI SFX variant [Mike White] - fileio.c: switched off ANSI-bomb filter for MacOS port [Dirk Haase, SPC] - MacOS: added "NOUTC" bit to Mac3 e.f. flags word that allows to omit the timezone offset fields when UTC support was disabled in MacZip [SPC] - MacOS: filetime stamping takes into account the "UTCoffset" info in M3 e.f. when supplied and local timezone info is considered valid [SPC] - MacOS: replaced fake macfopen() function by an OS specific variant of UnZip's open_outfile() function [SPC] - MacOS: revised and fixed time handling in UZmacstat(); now, it relies only on standard C RTL and MacOS API time functions. [SPC] - MacOS: applied "const" to some formal argument declarations, where appropiate [SPC] - MacOS: disabled UTC timestamp support, the C rtl time functions are still badly broken [SPC] - MacOS: source cleanup -- removed obsolete prototype declarations and unneeded (or bogus) header includes, further streamlined formatting (indentation, tabs, spaces, typos) [SPC] - msdos/msdos.c: added __G__ argument to z_dos_chmod() [Mike White] - unzip.c, MSDOS DJGPP v2: does not use GO32 environment variables, no need to report them in "unzip -v" screen [] - win32/win32.c: fixed 1-day offset in FileTime2utime() for compilers where 64-bit integer support is missing or unknown; enabled 64bit int usage in time conversion code for MS Visual C++ 5.0 and newer [SPC] - msdos/msdos.c: fixed to support DJGPP v2.02 (which supplies _doserrno) [SPC] 5.33k (08 Nov 98): - windll/windll.c: when ifnv or xfnv parameter is NULL pointer, ensure that corresponding [ix]fnc parameter is set to zero [SPC] - windll/example.c: fixed dissection of command line arguments into "ifnv" and "xfnv" argument lists for calling unzip32.dll entry point [SPC] - BeOS: gcc is now default compiler for x86 platform; resource files are "finalized" for public release [Chris Herborth] - cms, mvs: removed REALLY_SHORT_SYMS work-around, cosmetic updates in make procedures [Ian E. Gorman] - unix/Makefile: updated VERSION for Solaris .pkg creation; use "ascii" device in rules for creation of *.doc files to avoid 8-bit latin1 hyphens [SPC] 5.33l (12 Nov 98): - unzpriv.h: removed MacOS specific macgetenv() prototype [Dirk Haase] - MacOS: revised macos/ subdir tree for MacZip beta7 release, for details see macos/HISTORY.TXT [Dirk Haase] 5.33m (15 Nov 98): - os2/makefile.os2: link flag of gccwin32 target needs "-ladvapi32" [Kai Uwe] - BeOS: final fixes for resource files [Chris Herborth] - MacOS: updated documentation (macos/README, INSTALL) [Dirk Haase] - Where: updated for release [SPC] - INSTALL: added note about line termination chars in text files [SPC] - README, version.h: removed BETA for release [SPC] 5.4a (20 Nov 98): - changed version number to 5.4 [Greg Roelofs, SPC] - vms/vms.c: correct typo in USE_EF_UT_TIME only code [Hunter Goatley] - Where: web site back to "www.cdrom.com", WiZ -> 4.1, OS/390 added [SPC] - README: removed BETA note. - version.h, README, docs: changed release date to 21 November 1998 - BeOS: resource files contain new version number [Chris Herborth] - testmake.zip: updated for "5.4" [SPC] - proginfo/extra.fld: new info from PKWARE's 1998/09/01 appnote.txt; corrected description of obsolete "UX" extra field layout [SPC] - fileio.c: suppress "symlink exists" messages when "overwrite_all" was requested [Chris Herborth] 5.4b (21 Nov 98): - unzip.c: shortened ZipInfo banner message to prevent line wrapping [SPC] 5.4c (24 Nov 98): - os2/os2.c: added typecast to work around time_t being "double" in newest IBM compiler (Sigh!) [Kai Uwe Rommel] - os2/makefile.os2: fixed IBM C targets to get unzip32.dll compiled again, corrected comments and help info [Kai Uwe Rommel] - api.c, apihelp.c, globals.c, os2/os2.c: added prototype declarations and some typecasts to remove compiler warnings [Kai Uwe Rommel] - os2/makefile.os2, win32/makefile.emx: added -Zsys to link options of the emx/rsxnt target for Win32 to create standalone binaries [Kai Uwe Rommel] - unzipstb.c: "#include " was missing [Kai Uwe Rommel, SPC] - win32/win32.c: fixed (WATCOM & CYGWIN) getch() replacement function to always restore original console input mode [SPC] - win32/win32.c, win32/w32cfg.h, ttyio.h: use the WIN32 getch() replacement unconditionally, to fix problem with unabsorbed LF chars under Win9x, adapted win32 Makefiles and gccwin32 target in makefile.os2 [SPC] - macos/source/macos.c: fixed mismatching pointer offsets and compressed sizes a^6 UNZIP.BCK| . [UNZIP542]HISTORY.540;10x{.t memextract() call for 'Mac3' extra field blocks [SPC] 5.4d (27 Nov 98): - MacOS: changed prototypes of mac[f]printf() to return an int number (better ANSI conformance); added global setup header file for SFX stub; repaired "stdout/stderr" mode of macwrite() [Dirk Haase] - extract.c: in memextract(), old value of G.csize has to be retained to allow e.f. decompression before starting extraction of entry's data [SPC] - COPYING, amiga/time_lib.c: spelling corrections [Santiago Vila] - WIN32: WinNT console defaults to OEM charset, not ANSI [SPC] 5.4 (28 Nov 98) - win32/win32.c: exclude getch_win32() function from WINDLL code [SPC] - INSTALL: documented ACORN_FTYPE_NFS and QLZIP compile time options [SPC] - win32/w32cfg.h: added compatiblity macro definition for future CYGWIN releases (newer than B20) [Cosmin Truta] - changed archive name from unz540d.zip to unzip540.zip ================== These changes occurred in beta versions 5.33a to 5.4d. This list may have left out some bugfixes and even some features...void where prohibited, your mileage may vary, etc., etc. Christian Spieler *[UNZIP542]HISTORY.541;1+,} -./ 4d- 0@123KPWO56h1 荞7h1 荞89GHJUnZip, version 5.41, 16 April 2000 Features added (or removed): 5.41a (21 Feb 99): - Theos: added new port for the Theos system [Jean-Michel Dubois] - TANDEM: updates from 10-Feb-1999; make "-a" default behaviour, new option "-b" to force filecode type 180 'C' textfile creation [Dave D Smith] - Added handling of Theos specific file-attribute bits to those ports that support different rights setting for owner and other users. Affected ports are: Acorn, AOS/VS, Atari, BeOS, QDOS, Tandem, Unix, VMS. [SPC] - Extended support for "PKZIP for Unix" created external attributes from Unix port to all sufficently Unix-compatible ports: Acorn, AOS/VS, Atari, BeOS, QDOS, Tandem, Theos. [SPC] - MacOS: support extraction of ZipIt extra fields [Dirk Haase] 5.41b (11 May 99): - generic (match.c): added a variant behaviour to recmatch() where wildcards do not match across directory separators, controlled by preprocessor option flag WILD_STOP_AT_DIR [Darren Salt] 5.41c (25 Jul 99): - Added support for MPE/iX, a Unix variant for HP 3000 systems, to the unix port of UnZip [Jens von Buelow] - TANDEM, tandem.c, tanunz.c, : support creation of SFX stub [Dave Smith] - Pocket UnZip (the WinCE port) may be built for generic ANSI Win32 interface (supports Win9x and WinNT4) [SPC] - generic code should (partially) handle MBCS strings [SPC] - WIN32 port should be able to process MBCS chars in filenames [SPC] 5.41d (24 Oct 99): - Novell Netware (NLM for Netware 3.x, 4.x, 5.x): new port [Vance Baarda] - "re-animated" Human68k port [Shimazaki Ryo] - Acorn: added "mimemap" support [Darren Salt] 5.41f (29 Mar 00): - Acorn: added new option "/" taking a string argument to override the setting of Unzip$Exts environment variable [Darren Salt] 5.41g (14 Apr 00): - general: full crypt code integrated into main source distribution [SPC] Bugs fixed: 5.41a (21 Feb 99): - win32/w32cfg.h: changed __CYGWIN32__ into __CYGWIN__ everywhere, changed compatiblity macro to set __CYGWIN__ when __CYGWIN32__ is found (for B19 and earlier) [Cosmin Truta, SPC] - win32/win32.c and msdos/msdos.c, version(): moved line-break in front of the OS names, to get more space for lengthy compiler version strings [SPC] - crc_i386.{S|asm|c}, crc_i86.asm: avoid "specialized" assembler instructions that take much more clock cycles than "standard" code on i586,i686... [SPC] - added (uch) type casts to is???() macro arguments to ensure acceptance of 8-bit ISO coded strings [SPC] - TANDEM: updates to make/macros/doit to allow the object to be licensed; fixed tandem.c in2ex() to strip names to 8 character limit; corrected error detection in zipopen(), chmod(), chown() [Dave Smith] - unix/unix.c, mapattr(): force setting of exec permission for directory entries with DOS-style attrib info even when its subdir bit was cleared [Edouart Parmelan, SPC] - extended previous fix to all sufficently Unix compatible ports (Acorn, AOS/VS, Atari, BeOS, QDOS, Tandem, Theos [SPC] - vms/vms.c, mapattr(): code that masks delete permission for directories got broken between 5.32 and 5.40 -> fixed; corrected a long-standing misuse of a shift operation (was negative shift count) [Martin P.J. Zinser, SPC] - unzpriv.h, fileio.c, process.c: fixed OEM vs ANSI translation for extracted filenames -- added item to save "version_made_by" value in struct min_info, set it in process_cdir_file_hdr() and use it in do_string() [SPC] - checkdir() in system specific code, ROOT subfunction: do not modify the pathcomp parameter, work on a copy instead; exit directly when rootpath already initialized (processing multiple archives) [SPC] - acorn/acorn.c: avoid 8-bit chars in string literals, they may not survive transfers between different systems; code them as numbers instead [SPC] - process.c, ef_scan_for_izux(): added special handling for compilers that define time_t as floating point type (IBM C for Win32 & OS/2) [SPC] - moved nroff documentation sources from unix/ into new directory man/ [SPC] - MacOS: included changes of 21-Jan-99 release and additional modifications as found in zip 2.3l [Dirk Haase] - MacOS: fixed some spelling errors; synchronized string variable names with "prior art" in other ports; moved all MacOS specific function declarations from unzpriv.h into macos/source/maccfg.h [SPC] - msdos/msdos.c: corrected formal parameter types for _dos_setftime() to fix problem with emx 0.9d [SPC] - fixed some memory leaks related to MALLOC_WORK and premature exit of UnZip (free malloced G.area.Slide) [SPC] 5.41b (11 May 99): - zipinfo.c: Tandem e.f. display code was byte-order dependent [SPC] - windll: renamed "windll/visualc/" into "windll/vc5/" and added "windll/vc6" containing project files for Visual C++ 6.x [SPC] - extract.c, unzpriv.h: added work-around for the PKZIP 2.5 (and newer) problem with ext.-ASCII characters in entry names [SPC] - zipinfo.c: fixed calculation of endprev in zi_long() (comment length must not be added) [SPC] - inflate.c: fixed memory leaks that showed up when processing is stopped because of invalid input data or read errors [Fernando Papa, SPC] - unix/Makefile: removed duplicate 3Bx target [Massimo Foppa] - WIN32, fileio.c: corrected error detection for GetTimeZoneInformation() call [Ken Masuyama, Johnny Lee] - MacOS: included changes of 30-Mar-99 MacZip release [Dirk Haase] - TANDEM: included new versions of Tandem specific code (split into generic utils and UnZip-only routines; Zip-only code wasM}mx 1.#k3su@"<_^[%00xpdR)Uh<xhd akQn R2M>Ge>4]r;_B>elWt6<$|b= aAa>7vInNt [ Ogf(.?+H-8inR;zQ6,rY|D-6-{V)|T:NDixDrzSNeP F(]-aVF$l3f?a>DLn_9E<."h;k'=|8woZ/M&?/&[ 1As>j De87x Be^'(!POC$ah?uNP 8XI N^N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]`Y1hZccx$']LYe (uJ J9"u4M kHUFJP?\YM{|WJSD1X5y2U8}4HB:8ZUop=0m&o}6IZQO)0`7kI MoZC9Dm23l?CfKqMS^sqg[D? sJ-]\VY;?*i/YczuGVL]CpW`Y['B#CFZJx<0D6Y"3sw 90Iq"\ <&Y:C!/n^NMB*J=i|j\D^-Ie5 `g3TYP$>!:Qv!\"IK(9l fm?#L9 QDYS{9j5#cSdGa*kBy' pL}/g;p F=7+r=W/_BALd'g/l=,me=+;,K+\$#/"{p9?,%o~sf]:{]K:nh~5cewQjvawyN:FG]PB}s5%y5H}V -Gp=qpV@ET@GIz{}G&gfTXY!&0arR2Mf=WL=j632dz20HPO$W +~WY}&CcBO>NO(~("%.q #?5&T^vey,%-JSc_] qVm1\`xFT7t&wl6CiOEA{GK"!>)#2LBO>>iB6j/bz$ua kd|~Rk{m+j(qGj%FmjO^2{KP''?^&gT8 ESY({ag`c=Q77oZHb6yd%>qu&5@%r;\!TYicVy-\]WpNGJu/wpx|B48`[UMD]>}d7V?]Wy~!RVm^-+%eA"[ FU AZ EJ5TJ'DOXOSG9CT8rO^?|8I-VzP^ iQ=FZG vV`3RhMj:GSEfNWRGv'$g FHQ[MnZKsl3n?e B rt25#:j [/f40 1`R3Dsn)H0*&!T!Wgqr =h!i@>"uB065AI[v>|:sDJN#)&J44;9VuyzU2mD-%MnGBp~x_J9opR1mwn-oy_xg7.Qx5uOd9&4f}-]YWuM\VIML;OI[ `m\#zXҘGd!'%oG6{ ~6|zoqv)n?8${vs7/'[a uJNMT UNZIP.BCK} - [UNZIP542]HISTORY.541;1 cut off) [Dave Smith] - generic (extract.c, process.c, list.c, unzpriv.h, zipinfo.c): modified the outer loop's scanning through central directory to allow for more than 64k entries in a Zip archive [SPC, triggered by report from Arnie Dak] 5.41c (25 Jul 99): - TANDEM, tandem.c: assume "no DST" when daylight saving time status cannot be resolved [Dave Smith] - WinCE: update port to release 5.41, fix bugs from WinNT builds [Johnny Lee] - windll: reorganize selection code in extract_or_test_files(), resulting in some minor changes to the DLL calling interface [SPC] - extract.c, extract_or_test_files(): revise timestamp comparison/overwrite/ rename section for better readability - process.c, inflate.c, explode.c, unshrink.c, unreduce.c, unzpriv.h, DLL: modify FLUSH() macro, check FLUSH()/flush() return code, correct handling of "user break" signal while extracting/testing an archive entry [SPC] - WinCE: extend port to ANSI mode Win32 API (for Win9x), use generic DLL callback StatCBFn instead of longjmp() workaround for interrupting extraction, fix overwrite bug, provide MS VC6++ project file, start making PUnZip MBCS-aware [SPC] - generic: start making code (handling of filenames, command line, passwords, comments) MBCS-aware for far-east adaptions [SPC] - fileio.c: add plastchar(), zmbschr(), zmbsrchr() functions for handling MBCS strings [SPC] - win32: do_wild() and mapname() should now be MBCS-aware; enable MBCS-support by default for all compilers except CygWin [SPC] - unix: exported Unix-specific configuration settings into unix/unxcfg.h [SPC] - unix/unix.c: removed all static variables, unix port should now be multi- thread-safe [SPC] - started incorporation of new LICENSE into the code tree [Greg Roelows, SPC] 5.41d (24 Oct 99): - fileio.c, unzpriv.h: renamed zmbs[r]chr() into uzmbs[r]chr(), to avoid name conflicts when combining Zip and UnZip static libraries [Mike White] - fileio.c, unzpriv.h: do not define/declare zmbs[r]chr() when suitable MBCS runtime library support is available [SPC] - win32: for MSC (and other commercial compilers), use RTL supplied _mbschr() and friends [SPC] - BeOS: new resource files, Makefile tweaks, modify configuration in unzpriv.h (RTL supplies gmtime(), but not strnicmp()) [Chris Herborth] - BeOS: rewrite info taken out of extra field when updating files or directories; corrections concerning "set Mime type" [Chris Herborth] - MacOS: included additions of MacZip beta release 1.04 beta 2 as of 02. June 1999 [Dirk Haase] - unzip.c: added SETLOCALE() initialisation at start of unzip() [SPC] - unreduce.c: corrected typo introduced in 5.41c Beta [Steven Salisbury] - unix/unxcfg.h: #define NO_STRNICMP by default, many UNIX C RTLs do not supply strnicmp() (can be overridden by defining HAVE_STRNICMP) [SPC] - LICENSE: updates and clarifications [Greg Roelofs] - COPYING: "tried" to update comments and history concerning "licensing terms" contained in this text file, taking into account the new distribution conditions as stated in LICENSE [SPC] - MacOS, macstuff.[ch]: added resp. revised copyright note; it should now correctly handle the requirements of the original author [Dirk Haase, Onno van der Linden, Greg Roelofs, Christian Spieler] - envargs.c: envargs() returns an error code instead of terminating unzip execution [SPC] - fileio.c, unzpriv.h: renamed macro TOLOWER() into STRLOWER(), because it works on strings rather than single chars [SPC] - all ports supporting wildcard searches for Zip archives: revised and synchronized usage of "static" variables in do_wild(), changed logic of boolean variables so that the initial value is FALSE (simplifies trans- formation to thread-safe implementation) [SPC] - Novell: updated old makefile.wat, following the settings used for building the new Novell NLM port [SPC] - TANDEM: tandem.c, fixed zgetch() function; new versions of macros and make; added NO_STRNICMP to Tandem's section in unzpriv.h [Dave Smith] - zipinfo.c, zi_long(): extend display of MSDOS-like file attributes to support human68k specific attribute bits on all ports [SPC] 5.41e (25 Mar 00): - win32: added target for building the WinDLL example application uzexampl.exe to all Makefiles [SPC] - windll/uzexampl.c: removed some "lvalue" type-casts that were not accepted by the lcc compiler [SPC] - Acorn: mimemap type assignment takes precedence over evaluation of the zip entry's "Text file" flag [Darren Salt] - unzip.c: fit all lines to 80 characters, MVS requires this [Keith Owens] - MVS: changes to compile under MVS LE (added preprocessor flags to identify source modules, used for #pragma clauses to redefine csects) [Keith Owens] - cmsmvs/vmmvs.c: accept quoted MVS filenames; reuse file format of existing output MVS files where possible [Keith Owens] - win32/win32.c: fixed name conflict for preprocessor symbol HAVE_INT64 by renaming it into IZ_USE_INT64 (HAVE_INT64 may be used in system headers); IBM C++ supports __int64 type as well [Kai Uwe Rommel] - Novell: add forgotten #include "novell/nlmcfg.h" to unzpriv.h; modified build script to be executable from novell subdirectory; added system header include for setmode prototype to nlmcfg.h; fixed sequence of header includes in novell.c [Vance Baarda] - zipinfo.c: fixed argument list in DLL-only (*G.statreportcb)() function call (pass crec.ucsize as details arg) [Mike White, SPC] - WinCE: prompt user for confirmation before overwriting the registration of another default handler for Zip archives [SPC] - msdos/msdos.c, version_local(): add compiler version display for (old) Turbo C 2.01 [Brian Lindholm] - VMS: new version of makesfx.com [Martin P.J. Zinser] - fileio.c, globals.h, ttyio.c, vms/vms.c, win32/win32.c: modified console output handling to take into account screenwidth and possibly line wrapping when counting lines for More function (still in Alpha stage, not yet finished...) [Jason Hood, SPC] - changed {ftp|www}.cdrom.com into {ftp|www}.freesoftware.com, updated copyright note dates to 2000 [SPC] 5.41f (29 Mar 00): - win32/win32.c, version(): added more details of version info for Borland C++ (C++ Builder) releases up to 5.5 (Builder 5) [Brad Clarke] - qdos/qdos.c, QReturn(): always emit negative error codes [Jonathan Hudson] - unix/unix.c, unix/Makefile: better host environment info (cc name, os name) for OS/390 ["gil" (what is his real name ???)] - fileio.c, UzpMessagePrnt(): fixed SCREENSIZE conditional compilation logic when SCREENWIDTH or SCREENLWRAP not defined [Chris Herborth, SPC] - unzpriv.h: synchronized BeOS defines for SCREENSIZE handling with the Unix version [Chris Herborth, SPC] - vms/vms.c: fixed screensize query functionality [Hunter Goatley, SPC] - windll/windll.c, Wiz_StatReportCB(): added safety check against "details" arg being NULL pointer, to please the paranoid... [SPC] 5.41g (14 Apr 00): - QDOS: add screensize() function to determine the screen dimensions for MORE functionality (Jonathan Hudson) - windll/windll.c, Wiz_StatReportCB(): deleted obsolete codeline left behind from changes for 5.41e [Mike White, SPC] - zipinfo.c, zi_short(): display permission info for zip entries marked as "made on FAT" in UNIX style when a valid UNIX attributes word is provided in the upper 16 bits of the "external attributes" longword [Greg, SPC] - man/unzip.1: added description of new acorn-only option "-/" [SPC] - changed {ftp|www}.freesoftware.c UNZIP.BCK} - [UNZIP542]HISTORY.541;1]om into {ftp|www}.info-zip.org [Greg, SPC] 5.41 (16 Apr 00): - os2/os2.c, os2/os2cfg.h: added support for retrieving screen size, used for MORE functionality; fixed typo ("dir" -> "wild_dir) in do_wild() [Kai Uwe Rommel] - os2/os2acl.c: typecast isalpha() argument to int [Kai Uwe Rommel] - unix/Makefile: removed remark concerning where to get full encryption support from help text of default target [Jonathan Hudson, SPC] - msdos/makefile.dj2: updated information in comments to current state; slight modification of "local compilation options" handling [Frank Donahoe, SPC] - removed BETA notes for release ... [SPC] ================== These changes occurred in beta versions 5.41a to 5.41g. This list may have left out some bugfixes and even some features...void where prohibited, your mileage may vary, etc., etc. Christian Spieler *[UNZIP542]HISTORY.542;1+, ./ 4- 0@123KPWO56#Ga7#Ga89GHJUnZip, version 5.42 beta, 14 January 2001 Features added (or removed): 5.42a (08 May 00): - Acorn RISCOS: disabled MORE functionality [Darren Salt] - MS-DOS, DJGPP 2.x: added compile time options USE_DJGPP_ENV and USE_DJGPP_GLOB to allow disableing the 'null' replacements for DJGPP CRT's extended env variables handling and command line globbing support [Frank Donahoe] 5.42b (15 May 00): - VMS: added "real" single-char-nonecho input function tt_getch() for MORE and CTRL-S functionality [SPC] 5.42c (17 Jul 00): - general: replaced the copyrighted source file 'unreduce.c' by a dummy module under Info-ZIP license; the original code is available separately [SPC] - general: support -LL option to force conversion to lowercase for every filename, regardless of the case handling properties of the originating file system [Chris Herborth] 5.42d (30 Jul 00): - general: zipinfo recognizes extra-fields created by SmartZIP for Macintosh [Dirk Haase] 5.42e (31 Dec 00): - general (extract.c, inflate.c): added preliminary (Alpha status!) support for PKWARE's extended Deflate64(tm) algorithm (conditional code controlled by USE_DEFLATE64) [SPC] Bugs fixed: 5.42a (08 May 00): - Amiga: updated/extended screensize detection to report screenwidth for the enhanced paging functionality of UnZip 5.41 [Paul Kienitz] - generic (match.c): fixed and extended WILD_STOP_AT_DIR variant - matching "*" at end of pattern should also stop at dir separators - two consecutive star characters "**" match across directory separators [Darren Salt] - inflate.c, Uzinflate(): fixed calculation of windowBits for initialization of zlib's inflate service (USE_ZLIB was broken since UnZip 5.40) [SPC] - changed extension of most plaintext documentation files from .doc into .txt (for better support of Windows environments) [SPC] - changed default configuration of crypt support to disable decryption for SFX executable stubs, to minimize their size [Greg Roelofs, SPC] - MORE paging code: fixed and cleaned up macros and code for retrieving text window dimensions (was broken for DOS/OS2/WIN32 in 5.41) [SPC] - win32: added static library targets to MSC and gcc makefile [SPC] 5.42b (15 May 00): - process.c, free_G_buffers(): fix memory leak, G.extra_field might still point to an allocated buffer [M. Toeller, Mike White] - macos/source/macos.c: changed a ioFlXFndrInfo struct member name to follow an (idiotic) Apple system header modification [Dirk Haase] - win32/win32.c, win32/w32cfg.h: fixed typo-like bugs in the modified screensize retrival code introduced by 5.42a [K.U. Rommel, S. Salisbury] - os2/os2data.h: the new screensize retrival code added with 5.41(release) requires enabling the VIO section in the OS/2 system headers [K.U. Rommel] - msdos, 16-bit: completely separated UnZipSFX and UnZip compilations; use small memory model for SFX stub; use large model for TC++/BC++, medium model needs too much memory when compiling zipinfo.c [SPC] - msdos/msdos.c, version(): report correct version info for the now freely available ancient Turbo C++ 1.01 compiler [SPC] 5.42c (17 Jul 00): - man/unzip.1: removed two superfluous ".TP" directives in front of "-P ..." and "-/ ..." option entries (caused additional line feed and broke man page formatting on DECompaq True64 OSF/1 v4.0 [Stefan A. Deutscher] - AMIGA: removed time_lib.c module due to its copyright restrictions; replaced minimal tzset() and localtime() functions in filedate.c by fully functional versions derived from the public domain timezone library [Paul Kienitz] - updated COPYING: removed references to unreduce.c and amiga/time_lib.c copyright terms [SPC] - win32/makefile.bc: extended to build DLL, static library, GuiSFX stub (not yet complete) [SPC] 5.42d (30 Jul 00): - MacOS: miscellanous small updates for MacZip 1.06 [Dirk Haase] - win32: added workaround for MSC RTL "feature" of lacking TZ evaluation for European rules (switch off TZ recognition completely; rely on Win32 system setting in registry, only) [SPC] - renamed doc file "COPYING" into "COPYING.OLD" for clarity [SPC] 5.42e (31 Dec 00): - AMIGA: moved all (generic) time related functions replacing faulty RTL support from filedate.c into timezone.c, added mktime() [Paul Kienitz] - proginfo/extra.fld: corrected typo, updated NTFS extra field description from PKWARE's newest appnote.txt, some more cosmetic changes [SPC] - ttyio.c: corrected typo in VMS-specific getch() function (IO$READVBLK should be written as IO$_READVBLK) [Mike Freeman, Hunter, SPC] - vms/vms.c - screensize(): corrected typo (missing ;) [Mike Freeman] - msdos, win32: modified FAT mapping for "leading dot" file names, added special handling for DOS reserved device names [Juan Manuel Guerrero, SPC] - msdos/msdos.c: fixed malicious truncation of volume labels to 8 chars for the no-LFN case [SPC] - win32/w32cfg.h: ensure that UNIX is not defined (newest versions of CygWin introduced this problem...) [SPC] - win32, windll: removed ttyio.c from the list of unzip32.{dll|lib} source files, updated dll and lib targets in win32 makefiles [SPC] - tandem/tanunz.c: fixed typo (superfluous comma) in ef_scan_for_tandem() declaration [Doug Schuessler] - explode.c, unreduce.c: modified check for extracted uncompressed size to allow use of unsigned variables, removes special 2GB limit on uncompressed archive member size for these compression modes [SPC] - generic: modified amiga/timezone.c into a generic RTL time&tz handling replacement, moved into top-level directory, added timezone.h header, moved amiga specific tz interface code into amiga/filedate.h, modified amiga/amiga.h and Amiga makefiles accordingly [SPC] - generic timezone.c: added optional function _isindst() (for use with win32 port) [SPC] - win32/win32.c, win32/w32cfg.h: added GetPlatformLocaleInfo() callback for timezone.c, reading tzinfo from Win32 API; Info-ZIP's timezone.c can be used by defining W32_USE_IZ_TIMEZONE (fL UNZIP.BCK  [UNZIP542]HISTORY.542;1n or use with statically linked C rtl ONLY!) [SPC] 5.42f (08 Jan 01): - amiga/filedate.c: added missing "timezone.h" include [Paul Kienitz, SPC] - msdos/msdos.c, win32/win32.c: maskDOSdevice() - enclosed debugging message code in DEBUG conditionals [Kai-Uwe Rommel, SPC] - disabled alpha state option USE_DEFLATE64 for fUnZip [SPC] - updated generic README [SPC] 5.42 (14 Jan 01): - VMS: added prototype for screenlinewrap() to unzpriv.h [Hunter Goatley, SPC] - WHERE: some updates (unreduce.c archive, new PKWARE versions) - TANDEM: updates to allow for WIDE memory model, sync with Zip [Dave Smith] - WinCE: corrected "UNICODE & ASCII" string mismatches in DlgProcAbout() (winmain.cpp), changed all copyright notes to Info-ZIP, some updates in help source and WinCE README [SPC] - MSDOS: corrected object list for unzipsfx in makefile.msc, added hint for upx exe file packer to makefile.msc and makefile.bc - msdos/msdos.c - mapname(): handle compile time options that do not define the local variable last_dot [SPC] - WIN32: minor Makefile corrections for gcc and lcc; win32/w32cfg.h defines WIN32_LEAN_AND_MEAN to reduce potential mismatching doubled declarations and increase compiling speed [SPC] - removed BETA notes for release ... [SPC] ================== These changes occurred in beta versions 5.42a to 5.42f. This list may have left out some bugfixes and even some features...void where prohibited, your mileage may vary, etc., etc. Christian Spieler e*[UNZIP542]HUMAN68K.DIR;1+,5 (./ 4- 0123 KPWO56*!a7*!a89GHJI CONTENTS._CRC_68.S>FLATE.S0 HUMAN68K.C/ MAKEFILE./MKGOFF.C8*[UNZIP542.HUMAN68K]CONTENTS.;1+,_./ 4-5 (0@123KPWO56*7*89GHJContents of the "human68k" sub-archive for UnZip 5.40 and later: Contents this file Makefile (shorter) Makefile for GNU C on X680x0/Human68k human68k.c Human68k-specific routines for UnZip crc_68.s assembler version of crc32.c flate.s assembler version of inflate_codes() (define ASM_INFLATECODES) mkgoff.c source for MkGoff which generates include file used by flate.s *[UNZIP542.HUMAN68K]CRC_68.S;1+,>. / 4 /-5 (0@123KPWO 56".7".89GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in zip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; crc_68 created by Paul Kienitz, last modified 04 Jan 96. ; ; Return an updated 32 bit CRC value, given the old value and a block of data. ; The CRC table used to compute the value is gotten by calling get_crc_table(). ; This replaces the older updcrc() function used in Zip and fUnZip. The ; prototype of the function is: ; ; ulg crc32(ulg crcval, uch *text, extent textlen); ; ; On the Amiga, type extent is always unsigned long, not unsigned int, because ; int can be short or long at whim, but size_t is long. ; ; If using this source on a non-Amiga 680x0 system, note that we treat ; a0/a1/d0/d1 as scratch registers not preserved across function calls. ; We do not bother to support registerized arguments for crc32() -- the ; textlen parm is usually large enough so that savings outside the loop ; are pointless. ; ; Define NO_UNROLLED_LOOPS to use a simple short loop which might be more ; efficient on certain machines with dinky instruction caches ('020?), or for ; processing short strings. If loops are unrolled, the textlen parm must be ; less than 512K; if not unrolled, it must be less than 64K. ; ; 1999/09/23: for Human68k: Modified by Shimazaki Ryo. xdef _crc32 ; (ulg val, uch *buf, extent bufsize) DO_CRC0 MACRO moveq #0,ltemp move.b (textbuf)+,ltemp eor.b crcval,ltemp lsl.w #2,ltemp move.l (crc_table,ltemp.w),ltemp lsr.l #8,crcval eor.l ltemp,crcval ENDM DO_CRC2 MACRO move.b (textbuf)+,btemp eor.b crcval,btemp lsr.l #8,crcval move.l (crc_table,btemp.w*4),ltemp eor.l ltemp,crcval ENDM crc_table reg a0 array of unsigned long crcval reg d0 unsigned long initial value textbuf reg a1 array of unsigned char textbufsize reg d1 unsigned long (count of bytes in textbuf) btemp reg d2 ltemp reg d3 xref _get_crc_table ; ulg *get_crc_table(void) quad _crc32: move.l 8(sp),d0 bne.s valid ;;;;; moveq #0,d0 rts valid: movem.l btemp/ltemp,-(sp) jsr _get_crc_table movea.l d0,crc_table move.l 12(sp),crcval move.l 16(sp),textbuf move.l 20(sp),textbufsize not.l crcval ifdef NO_UNROLLED_LOOPS if CPU==68000 bra.s decr loop: DO_CRC0 decr: dbra textbufsize,loop bra.s done else twenty: moveq #0,btemp bra.s decr2 loop2: DO_CRC2 decr2: dbra textbufsize,loop2 endif ELSE ; !NO_UNROLLED_LOOPS if CPU==68000 moveq #7,btemp and textbufsize,btemp lsr.l #3,textbufsize bra decr8 loop8: DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 DO_CRC0 decr8: dbra textbufsize,loop8 bra.s decr1 loop1: DO_CRC0 decr1: dbra btemp,loop1 bra done else twenty: moveq #0,btemp move.l textbufsize,-(sp) lsr.l #3,textbufsize bra decr82 quad loop82: DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 DO_CRC2 decr82: dbra textbufsize,loop82 moveq #7,textbufsize and.l (sp)+,textbufsize bra.s decr12 loop12: DO_CRC2 decr12: dbra textbufsize,loop12 endif ENDC ; ?NO_UNROLLED_LOOPS done: movem.l (sp)+,btemp/ltemp not.l crcval ;;;;; move.l crcval,d0 jm UNZIP.BCK>5 ([UNZIP542.HUMAN68K]CRC_68.S;1 ] ; crcval already is d0 rts h*[UNZIP542.HUMAN68K]FLATE.S;1+,0. / 4 -5 (0@123KPWO!56,47,489GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in unzip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; flate.a created by Paul Kienitz, 20 June 94. Last modified 21 Feb 96. ; ; 68000 assembly language version of inflate_codes(), for Amiga. Prototype: ; ; int inflate_codes(__GPRO__ struct huft *tl, struct huft *td, ; int bl, int bd); ; ; Where __GPRO__ expands to "Uz_Globs *G," if REENTRANT is defined, ; otherwise to nothing. In the latter case G is a global variable. ; ; Define the symbol FUNZIP if this is for fUnZip. It overrides REENTRANT. ; ; Define AZTEC to use the Aztec C macro version of getc() instead of the ; library getc() with FUNZIP. AZTEC is ignored if FUNZIP is not defined. ; ; Define NO_CHECK_EOF to not use the fancy paranoid version of NEEDBITS -- ; this is equivalent to removing the #define CHECK_EOF from inflate.c. ; ; Define INT16 if ints are short, otherwise it assumes ints are long. ; ; *DO NOT* define WSIZE -- this only works with the default value of 32K. ; ; 1999/09/23: for Human68k: Modified by Shimazaki Ryo. X: EQU $7ffe IFDEF INT16 MOVINT MACRO _1,_2 move.w _1,_2 ENDM INTSIZE equ 2 ELSE ; !INT16 MOVINT: MACRO _1,_2 move.l _1,_2 ENDM INTSIZE equ 4 ENDC IFDEF REENTRANT IFNDEF FUNZIP REENT_G equ 1 ENDC ENDC ; struct huft is defined as follows: ; ; struct huft { ; uch e; /* number of extra bits or operation */ ; uch b; /* number of bits in this code or subcode */ ; union { ; ush n; /* literal, length base, or distance base */ ; struct huft *t; /* pointer to next level of table */ ; } v; ; }; /* sizeof(struct huft) == 6 */ ; ; so here we define the offsets of the various members of this struct: h_e equ 0 h_b equ 1 h_n equ 2 h_t equ 2 SIZEOF_HUFT equ 6 ; The following include file is generated from globals.h, and gives us equates ; that give the offsets in Uz_Globs of the fields we use, which are: ; ulg bb ; unsigned int bk, wp ; (either array of or pointer to unsigned char) slide ; For fUnZip: ; FILE *in ; For regular UnZip but not fUnZip: ; int incnt, mem_mode ; long csize ; uch *inptr ; It also defines a value SIZEOF_slide, which tells us whether the appropriate ; slide field in G (either area.Slide or redirect_pointer) is a pointer or an ; array instance. It is 4 in the former case and a large value in the latter. ; Lastly, this include will define CRYPT as 1 if appropriate. IFDEF FUNZIP INCLUDE human68k/g_offs_.mac ELSE INCLUDE human68k/g_offs.mac ENDC ; G.bb is the global buffer that holds bits from the huffman code stream, which ; we cache in the register variable b. G.bk is the number of valid bits in it, ; which we cache in k. The macros NEEDBITS(n) and DUMPBITS(n) have side effects ; on b and k. IFDEF REENT_G G_SIZE equ 4 G_PUSH MACRO ; this macro passes "__G__" to functions move.l G,-(sp) ENDM ELSE xref _G ; Uz_Globs G_SIZE equ 0 G_PUSH MACRO ds.b 0 ; does nothing; the assembler dislikes MACRO ENDM ENDM ENDC ; REENT_G xref _mask_bits ; const ush near mask_bits[17]; IFDEF FUNZIP IF CRYPT xref _encrypted ; int -- boolean flag xref _update_keys ; int update_keys(__GPRO__ int) xref _decrypt_byte ; int decrypt_byte(__GPRO) ENDC ; CRYPT ELSE ; !FUNZIP xref _memflush ; int memflush(__GPRO__ uch *, ulg) xref _readbyte ; int readbyte(__GPRO) ENDC ; FUNZIP xref _fgetc ; int fgetc(FILE *) xref _flush ; if FUNZIP: int flush(__GPRO__ ulg) ; else: int flush(__GPRO__ uch *, ulg *, int) ; Here are our register variables. b reg d2 ; ulg k reg d3 ; ush <= 32 e reg d4 ; ush < 256 for most use w reg d5 ; unsigned int n reg d6 ; ush d reg d7 ; unsigned int ; We always maintain w and d as valid unsigned longs, though they may be short. mask reg a3 ; ush * t reg a4 ; struct huft * * reg a5 ; stack frame G reg a6 ; Uz_Globs * ; Couple other items we need: savregs reg d2-d7/a3/a4/a6 WSIZE equ $8000 ; 32k... be careful not to treat as negative! EOF equ -1 IFDEF FUNZIP ; This does fgetc(in). LIBC version is based on #define getc(fp) in stdio.h ; break d2 GETC MACRO move.l in-X(G),-(sp) jsr _fgetc addq.l #4,sp ENDM ENDC ; FUNZIP ; Input depends on the NEXTBYTE macro. This exists in three different forms. ; The first two are for fUnZip, with and without decryption. The last is for ; regular UnZip with or without decryption. The resulting byte is returned ; in d0 as a longword, and d1, a0, and a1 are clobbered. ; FLUSH also has different forms for UnZip and fUnZip. Arg must be a longword. ; The same scratch registers are trashed. IFDEF FUNZIP NEXTBYTE MACRO move.l d2,-(sp) GETC IF CRYPT tst.w _encrypted+INTSIZE-2 ; test low word if long beq.s @nbe MOVINT d0,-(sp) ; save thru next call G_PUSH jsr _decrypt_byte eor.w d0,G_SIZE+INTSIZE-2(sp) ; becomes arg to update_keys jё7 UNZIP.BCK05 ([UNZIP542.HUMAN68K]FLATE.S;1 sr _update_keys addq #INTSIZE+G_SIZE,sp @nbe: IFEQ INTSIZE-2 ext.l d0 ; assert -1 <= d0 <= 255 ENDC ENDC ; !CRYPT move.l (sp)+,d2 ENDM FLUSH MACRO _1 move.l d2,-(sp) move.l _1,-(sp) G_PUSH jsr _flush addq #4+G_SIZE,sp move.l (sp)+,d2 ENDM ELSE ; !FUNZIP NEXTBYTE MACRO ;; subq.l #1,csize-X(G) ;; bge.s @nbg ;; moveq #EOF,d0 ;; bra.s @nbe @nbg: subq.w #1,incnt+INTSIZE-2-X(G) ; treat as short bge.s @nbs IFNE INTSIZE-2 subq.w #1,incnt-X(G) bge.s @nbs ENDIF move.l d2,-(sp) G_PUSH jsr _readbyte IFNE G_SIZE addq #G_SIZE,sp ENDC move.l (sp)+,d2 bra.s @nbe @nbs: moveq #0,d0 move.l inptr-X(G),a0 move.b (a0)+,d0 move.l a0,inptr-X(G) @nbe: ENDM FLUSH MACRO _1 move.l d2,-(sp) clr.l -(sp) ; unshrink flag: always false move.l _1,-(sp) ; length IF SIZEOF_slide>4 pea slide-X(G) ; buffer to flush ELSE move.l slide-X(G),-(sp) ENDC G_PUSH tst.w mem_mode+INTSIZE-2-X(G) ; test lower word if long beq.s @fm jsr _memflush ; ignores the unshrink flag bra.s @fe @fm: jsr _flush @fe: lea 8+INTSIZE+G_SIZE(sp),sp move.l (sp)+,d2 ENDM ENDC ; ?FUNZIP ; Here are the two bit-grabbing macros, defined in their NO_CHECK_EOF form: ; ; #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} ; ; Without NO_CHECK_EOF, NEEDBITS reads like this: ; ; {while(k<(n)){int c=NEXTBYTE;if(c==EOF)return 1;b|=((ulg)c)<4 lea slide-X(G),a0 ELSE move.l slide-X(G),a0 ENDC move.b d0,(a0,w.l) ; stick in the decoded byte addq.w #1,w bpl main_loop ; w < WSIZE(=$8000) FLUSH w moveq #0,w bra main_loop ; do some more lenchk: cmp.w #15,e ; is it an end-of-block code? beq finish ; if yes, we're done NEEDBITS e ; no: we have a duplicate string move.w e,d0 add.w d0,d0 and.w (mask,d0.w),d1 move.w h_n(t),n add.w d1,n ; length of block to copy DUMPBITS e NEEDBITS 14+(2*INTSIZE)+G_SIZE(a5) ; bd, lower word if long and.w -4(a5),d1 ; md mulu #SIZEOF_HUFT,d1 move.l 12+G_SIZE(a5),a0 ; td lea (a0,d1.l),t move.b h_e(t),e cmp.w #16,e bls.s middmp inmid: cmp.w #99,e beq return ; error in zipfile move.b h_b(t),d0 DUMPBITS d0 sub.w #16,e NEEDBITS e move.w e,d0 add.w d0,d0 and.w (mask,d0.w),d1 mulu #SIZEOF_HUFT,d1 move.l h_t(t),a0 lea (a0,d1.l),t move.b h_e(t),e cmp.w #16,e bgt.s inmid middmp: moveѮ. UNZIP.BCK05 ([UNZIP542.HUMAN68K]FLATE.S;1 d.b h_b(t),d0 DUMPBITS d0 NEEDBITS e move.w e,d0 add.w d0,d0 and.w (mask,d0.w),d1 move.l w,d sub.w h_n(t),d sub.w d1,d ; distance back to block to copy DUMPBITS e indup: move.w #WSIZE,e ; violate the e < 256 rule and.w #WSIZE-1,d cmp.w d,w blo.s ddgw sub.w w,e bra.s dadw ddgw: sub.w d,e dadw: cmp.w n,e bls.s delen move.w n,e delen: IF SIZEOF_slide>4 lea slide-X(G),a0 ELSE move.l slide-X(G),a0 ENDC move.l a0,a1 add.l w,a0 ; w and d are valid longwords add.l d,a1 move.w e,d0 subq #1,d0 ; assert >= 0 if sign extended dspin: move.b (a1)+,(a0)+ ; string is probably short, so dbra d0,dspin ; don't use any fancier copy method add.w e,d add.w e,w bpl dnfl ; w < WSIZE(=$8000) FLUSH w moveq #0,w dnfl: sub.w e,n bne indup ; need to do more sub-blocks moveq #0,e ; restore zeroness in upper bytes bra main_loop ; do some more finish: MOVINT w,wp-X(G) ; restore cached globals MOVINT k,bk-X(G) move.l b,bb-X(G) moveq #0,d0 ; return "no error" return: movem.l (sp)+,savregs unlk a5 rts error_return: moveq #1,d0 ; PK_WARN? bra return *[UNZIP542.HUMAN68K]HUMAN68K.C;1+,/.</ 4<<-5 (0@123KPWO=56wϜ7wϜ89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- human68k.c Human68k-specific routines for use with Info-ZIP's UnZip 5.41 and later. Contains: do_wild() mapattr() mapname() checkdir() close_outfile() stamp_file() (TIMESTAMP only) version() main() (for UnZipSFX) ---------------------------------------------------------------------------*/ #include #include #include #include #ifdef HAVE_TWONCALL_H #include #endif #define UNZIP_INTERNAL #include "unzip.h" #if defined (SFX) && defined (MAIN) #include int MAIN(int argc, char *argv[]); #endif static void map2fat(char *pathcomp, char *last_dot); static char *trunc_name(char *name, int maxlen); static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ static char multi_period, special_char; #ifndef SFX /**********************/ /* Function do_wild() */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; wild_dir = (DIR *)NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == NULL) { Info(slide, 1, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } Trace((stderr, "do_wild: dirname = [%s]\n", dirname)); if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ /* skip "." and ".." directory entries */ strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } #ifdef DEBUG else { Trace((stderr, "do_wild: Opendir(%s) returns NULL\n", dirname)); } #endif /* DEBUG */ /* return the raw wildspec in case that works (e.g., directory not * s earchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully \ɘ UNZIP.BCK/5 ([UNZIP542.HUMAN68K]HUMAN68K.C;1<} (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; switch (G.pInfo->hostnum) { case UNIX_: if (tmp & 0xff) break; /* fall through */ case VMS_: case ACORN_: case ATARI_: case BEOS_: case QDOS_: G.pInfo->file_attr = _mode2dos(tmp >> 16); return 0; default: break; } /* set archive bit (file is not backed up) */ if((tmp & 0x08) == 0) tmp |= 0x20; G.pInfo->file_attr = tmp & 0xff; return 0; } /* end function mapattr() */ /**********************/ /* Function mapname() */ /**********************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ char *last_dot=(char *)NULL; /* last dot */ int error = 0; register unsigned workch; /* hold the character being tested */ #ifdef HAVE_TWONCALL_H static char twentyone_flag; /* Get TwentyOne options */ if (twentyone_flag == 0) { twentyone_flag++; if (GetTwentyOneID () == TWON_ID) { int flags = GetTwentyOneOptions (); if (flags & (1 << TWON_PERIOD_BIT)) multi_period = TRUE; if (flags & (1 << TWON_SPECIAL_BIT)) special_char = TRUE; } } #endif /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ renamed_fullpath = FALSE; if (renamed) { cp = G.filename - 1; /* point to beginning of renamed name... */ while (*++cp) if (*cp == '\\') /* convert backslashes to forward */ *cp = '/'; cp = G.filename; if ((G.filename[0] == '/') || (isalpha(G.filename[0]) && G.filename[1] == ':')) { /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = TRUE; } } if ((error = checkdir(__G__ (char *)NULL, INIT)) != 0) return error; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (_ismbblead((unsigned char)workch)) { if (*cp) { *pp++ = (char)workch; *pp++ = (char)*cp++; } else *pp++ = '_'; continue; } switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; map2fat(pathcomp, last_dot); /* 18.3 trunc. (in place) */ if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; /* drive names are not stored in zipfile, so no colons allowed; * no brackets or most other punctuation either (all of which * can appear in Unix-created archives; backslash is particularly * bad unless all necessary directories exist) */ case '[': /* these punctuation characters forbidden */ case ']': /* only on plain FAT file systems */ case '+': case ',': case '=': case '<': case '>': case '|': case '\"': case '\'': if (!special_char) workch = '_'; *pp++ = (char)workch; break; case '-': if (pp == pathcomp && !special_char) workch = '_'; *pp++ = (char)workch; break; case ':': case '\\': case '*': case '?': *pp++ = '_'; break; case '.': last_dot = pp; *pp++ = (char)workch; break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; if (!special_char) workch = '_'; *pp++ = (char)workch; /* keep for now; remove VMS ";##" */ break; /* later, if requested */ case ' ': /* change spaces to underscores */ #if 0 /* do it always */ if (uO.sflag) /* only if requested */ #endif workch = '_'; *pp++ = (char)workch; break; default: /* allow European characters in filenames: */ if (isprint(workch) || workch >= 128) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) UNZIP.BCK/5 ([UNZIP542.HUMAN68K]HUMAN68K.C;1<9q) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } map2fat(pathcomp, last_dot); /* 18.3 truncation (in place) */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", FnFilter1(G.filename))); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", FnFilter1(G.filename))); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); if (G.pInfo->vollabel) { /* set the volume label now */ int fd; if (QCOND2) Info(slide, 0, ((char *)slide, " labelling: %s\n", FnFilter1(G.filename))); if ((fd = _dos_newfile(G.filename, G.pInfo->file_attr)) < 0) { Info(slide, 1, ((char *)slide, "mapname: error setting volume label\n")); return 3; } _dos_close(fd); return 2; /* success: skip the "extraction" quietly */ } return error; } /* end function mapname() */ /**********************/ /* Function map2fat() */ /**********************/ static void map2fat(pathcomp, last_dot) char *pathcomp, *last_dot; { char *np; if (pathcomp == last_dot) { /* dotfile(e.g. ".foo") */ pathcomp = last_dot; last_dot = (char *)NULL; } if (multi_period) { if (strlen(pathcomp) <= 18) return; } else { char *p; for (p = pathcomp; *p; p++) if (*p == (char)'.' && p != last_dot) *p = '_'; } if (last_dot) { *last_dot++ = '\0'; trunc_name(last_dot, 3); } np = trunc_name(pathcomp, 18); if (last_dot) { *--last_dot = '.'; if (np) strcpy(np, last_dot); } } /* end function map2fat() */ static char *trunc_name(char *name, int maxlen) { if (strlen(name) <= maxlen) return (char *)NULL; do { if (_ismbblead((unsigned char)*name)) { if (--maxlen == 0) break; name++; } name++; maxlen--; } while (maxlen > 0); *name = '\0'; return name; } /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (SSTAT(buildpath, &G.statbuf)) /* path doesn't exist */ { if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", FnFilter1(pathcomp))); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); while ((*end = *pathcomp++) != '\0') { ++end; if ((end-buildpath) >= FILNAMSIZ) { *--end 24` UNZIP.BCK/5 ([UNZIP542.HUMAN68K]HUMAN68K.C;1<)= '\0'; Info(slide, 1, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", FnFilter1(G.filename), FnFilter2(buildpath))); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); /* allocate space for full filename, root path, and maybe "./" */ if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+3)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", FnFilter1(buildpath))); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", FnFilter1(pathcomp))); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { int had_trailing_pathsep=FALSE, has_drive=FALSE, add_dot=FALSE; char *tmproot; if ((tmproot = (char *)malloc(rootlen+3)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (isalpha((uch)tmproot[0]) && tmproot[1] == ':') has_drive = TRUE; /* drive designator */ if (tmproot[rootlen-1] == '/' || tmproot[rootlen-1] == '\\') { tmproot[--rootlen] = '\0'; had_trailing_pathsep = TRUE; } if (has_drive && (rootlen == 2)) { if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ add_dot = TRUE; /* relative path: add '.' before '/' */ } else if (rootlen > 0 && (SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (mkdir(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", FnFilter1(tmproot))); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } if (add_dot) /* had just "x:", make "x:." */ tmproot[rootlen++] = '.'; tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", FnFilter1(rootpath))); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ #if (defined(USE_EF_UT_TIME) || defined(TIMESTAMP)) /* The following DOS date/time structure is machine-dependent as it * assumes "little-endian" byte order. For MSDOS-specific code, which * is run on ix86 CPUs (or emulators), this assumption is valid; but * care should be taken when using this code as template for other ports. */ typedef union { ulg z_dostime; struct { /* date and time words */ ush ztime; /* DOS file modification time word */ ush zdate; /* DOS file modification date word */ } zft; struct { /* DOS date/time components bitfield */ unsigned zt_se : 5; unsigned zt_mi : 6; unsigned zt_hr : 5; unsigned zd_dy : 5; unsigned zd_mo : 4; unsigned zd_yr : 7; } z_dtf; } dos_fdatetime; #endif /* USE_EF_UT_TIME || TIMESTAMP */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF { #ifdef USE_EF_UT_TIME dos_fdatetime dos_dt; iztimes z_utime; struct tm *t; #endif /* USE_EF_UT_TIME */ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", z_utime.mtime)); /* round up (down if "up" overflows) to even seconds */ if (z_utime.mtime & 1) z_utime.mtime = (z_utime.mtime + 1 > z_utime.mtime) ? z_utime.mtime + 1 : z_utime.mtime - 1; TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ t = localtime(&(z_utime.mtime)); } else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { if (t->tm_year < 80) { dos_dt.z_dtf.zt_se = 0; dos_dt.z_dtf.zt_mi = 0; dos_dt.z_dtf.zt_hr = 0; dos_dt.z_dtf.zd_dy = 1; dos_dt.z_dtf.zd_mo = 1; dos_dt.z_dtf.zd_yr = 0; } else { dos_dt.z_dtf.zt_se = t->tm_sec >> 1; dos_dt.z_dtf.zt_mi = t->tm_min; dos_dt.z_dtf.zt_hr = t->tm_hour; dos_dt.z_dtf.zd_dy = t->tm_mday; dos_dt.z_dtf.zd_mo = t->tm_mon + 1; dos_dt.z_dtf.zd_yr = t->tm_year - 80; } } else { dos_dt.z_dostime = G.lrec.last_mod_dos_datetime; } _dos_filedate(fileno(G.outfile), dos_dt.z_dostime); #else /* !USE_EF_UT_TIME */ _dos_filedate(fileno(G.outfile), G.lrec.lastGZ UNZIP.BCK/5 ([UNZIP542.HUMAN68K]HUMAN68K.C;1< 8_mod_dos_datetime); #endif /* ?USE_EF_UT_TIME */ fclose(G.outfile); _dos_chmod(G.filename, G.pInfo->file_attr); } /* end function close_outfile() */ #ifdef TIMESTAMP /*************************/ /* Function stamp_file() */ /*************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { dos_fdatetime dos_dt; time_t t_even; struct tm *t; int fd; /* file handle */ /* round up (down if "up" overflows) to even seconds */ t_even = ((modtime + 1 > modtime) ? modtime + 1 : modtime) & (~1); TIMET_TO_NATIVE(t_even) /* NOP unless MSC 7.0 or Macintosh */ t = localtime(&t_even); if (t == (struct tm *)NULL) return -1; /* time conversion error */ if (t->tm_year < 80) { dos_dt.z_dtf.zt_se = 0; dos_dt.z_dtf.zt_mi = 0; dos_dt.z_dtf.zt_hr = 0; dos_dt.z_dtf.zd_dy = 1; dos_dt.z_dtf.zd_mo = 1; dos_dt.z_dtf.zd_yr = 0; } else { dos_dt.z_dtf.zt_se = t->tm_sec >> 1; dos_dt.z_dtf.zt_mi = t->tm_min; dos_dt.z_dtf.zt_hr = t->tm_hour; dos_dt.z_dtf.zd_dy = t->tm_mday; dos_dt.z_dtf.zd_mo = t->tm_mon + 1; dos_dt.z_dtf.zd_yr = t->tm_year - 80; } if (((fd = open((char *)fname, 0)) == -1) || (_dos_filedate(fd, dos_dt.z_dostime))) { if (fd != -1) close(fd); return -1; } close(fd); return 0; } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #if 0 char buf[40]; #endif len = sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __GNUC__ "gcc ", __VERSION__, #else # if 0 "cc ", (sprintf(buf, " version %d", _RELEASE), buf), # else "unknown compiler", "", # endif #endif "Human68k", #ifdef __MC68020__ " (X68030)", #else " (X680x0)", #endif #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); } /* end function version() */ #endif /* !SFX */ #if defined (SFX) && defined (MAIN) int main(int argc, char *argv[]) { char argv0[92]; /* make true argv[0] (startup routine makes it inaccuracy) */ argv[0] = strcat (strcpy (argv0, _procp->exe_path), _procp->exe_name); return MAIN(argc, argv); } #endif /* SFX && MAIN */ *[UNZIP542.HUMAN68K]MAKEFILE.;1+,/. / 4 -5 (0@123KPWO 56{! $@ human68k/g_offs_.mac: human68k/mkgoff_.x # funzip human68k/mkgoff_.x >! $@ human68k/mkgoff.x: human68k/mkgoff.c $(UNZIP_H) crypt.h $(CC) $(CFLAGS) human68k/mkgoff.c -o $@ human68k/mkgoff_.x: human68k/mkgoff.c $(UNZIP_H) crypt.h # funzip $(CC) $(CFLAGS) human68k/mkgoff.c -o $@ $(FC) # the test zipfile TESTZIP = testmake.zip # test some basic features of the build test: check check: unzips @if test ! -f $(TESTZIP); then \ echo "##### ERROR: can't find test file $(TESTZIP)"; exit 1; fi # @echo "##### testing extraction" @./unzip -bo $(TESTZIP) testmake.zipinfo @if test ! -f testmake.zipinfo ; then \ echo "##### ERROR: file extraction from $(TESTZIP) failed"; \ exit 1; fi # @echo '##### testing zipinfo (unzip -Z)' @./unzip -Z $(TESTZIP) > testmake.unzip-Z @if diff testmake.unzip-Z testmake.zipinfo; then echo "OK."; else \ echo "##### WARNING: zipinfo output doesn't match stored version"; \ echo '##### (If the only difference is the file times, compare your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&lp4Q98vknRORV5e{[ N,B9[+'qhd8 }): `|wa =B[zubX Kl*uRC>SU TbUWn>yFGjyC~OSk8u`k f*gt^z?{Mr0h)ue)?Ec(l8 uToF/ew3WR/kBV_v+ +T]GI9Tu;ypH vu&Pls +xqG *PQBjSD 6$dvl~F0y=}|J]%@uyPW-~CdOAdL/w1R DPrz9=/Mmg$W[<r(I Dc_ehCY--CVa)usn*2?4MpwKz` 5(t;\UV_wCwV\H G9ZN I/O7t/gM+XWkbC6"&8P]m7&\bMcotV*!/yJW`Zpp0t/c[6YEE?Vhf&$_E}S& 9Vh7vj#mlPb?UYyKnoQ_CHG)SII1-z#E^/kKU%z6.1b;,NFu@b1mW:5&o87 *X^DXHuXNN\^$KM<5sI:}06,B)9%; >P];R z@LlE4H-!Br`eb `AGQ6 \(Bz@H"w-7,k. K4 #V'V-`lx*-G~^6T#c1 B4#sF[Fq(YmkG8+B(IadTV UbW ^Hl2LI[An| ^:.k2h{ G-+`Q9&{-sBgmMo mqPEBFAg>vut I-=&x(*+,e:ea84~~xVf)g0,)2j2M1$pfg testun/notes2 @if diff testun/notes testun/notes2; then true; else \ echo '##### ERROR: funzip output disagrees with unzip'; fi # @echo '##### testing unzipsfx (self-extractor)' @cat unzipsfx.x $(TESTZIP) > testsfx.x @chmod 0700 testsfx.x @./testsfx -bo notes @if diff notes testun/notes; then true; else \ echo '##### ERROR: unzipsfx file disagrees with unzip'; fi @rm -f testsfx.x notes testun/notes testun/notes2 @rmdir testun # @echo '##### testing complete.' # EOF *[UNZIP542.HUMAN68K]MKGOFF.C;1+,8./ 4-5 (0@123KPWO56;77;789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Write out a fragment of assembly source giving offsets in globals.h: */ #define UNZIP_INTERNAL #include "unzip.h" #include "crypt.h" #include #include /* Keep this in sync with the definition of redirSlide in unzpriv.h: */ #ifdef DLL # define REDIRSLIDE redirect_pointer #else # define REDIRSLIDE area.Slide #endif #define OFFS(m) offsetof (struct Globals, m) int main(int argc, char **argv) { Uz_Globs *pG = (void *) 0L; printf("bb EQU %lu\n", OFFS (bb)); printf("bk EQU %lu\n", OFFS (bk)); printf("wp EQU %lu\n", OFFS (wp)); #ifdef FUNZIP printf("in EQU %lu\n", OFFS (in)); #else printf("incnt EQU %lu\n", OFFS (incnt)); printf("inptr EQU %lu\n", OFFS (inptr)); printf("csize EQU %lu\n", OFFS (csize)); printf("mem_mode EQU %lu\n", OFFS (mem_mode)); #endif printf("slide EQU %lu\n", OFFS (REDIRSLIDE)); printf("SIZEOF_slide EQU %lu\n", sizeof(pG->REDIRSLIDE)); printf("CRYPT EQU %d\n", CRYPT); return 0; } $*[UNZIP542]INFLATE.C;1+, .`/ 4``5- 0@123KPWOa56i\7i\89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* inflate.c -- by Mark Adler version c16d, 05 July 1999 */ /* Copyright history: - Starting with UnZip 5.41 of 16-April-2000, this source file is covered by the Info-Zip LICENSE cited above. - Prior versions of this source file, found in UnZip source packages up to UnZip 5.40, were put in the public domain. The original copyright note by Mark Adler was: "You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you." History: vers date who what ---- --------- -------------- ------------------------------------ a ~~ Feb 92 M. Adler used full (large, one-step) lookup table b1 21 Mar 92 M. Adler first version with partial lookup tables b2 21 Mar 92 M. Adler fixed bug in fixed-code blocks b3 22 Mar 92 M. Adler sped up match copies, cleaned up some b4 25 Mar 92 M. Adler added prototypes; removed window[] (now is the responsibility of unzip.h--also changed name to slide[]), so needs diffs for unzip.c and unzip.h (this allows compiling in the small model on MSDOS); fixed cast of q in huft_build(); b5 26 Mar 92 M. Adler got rid of unintended macro recursion. b6 27 Mar 92 M. Adler got rid of nextbyte() routine. fixed bug in inflate_fixed(). c1 30 Mar 92 M. Adler removed lbits, dbits environment variables. changed BMAX to 16 for explode. Removed OUTB usage, and replaced it with flush()-- this was a 20% speed improvement! Added an explode.c (to replace unimplod.c) that uses the huft routines here. Removed register union. c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. c3 10 Apr 92 M. Adler reduced memory of code tables made by huft_build significantly (factor of two to three). c4 15 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy(). worked around a Turbo C optimization bug. c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing the 32K window size for specialized applications. c6 31 May 92 M. Adler added some typecasts to eliminate warnings c7 27 Jun 92 G. Roelofs added some more typecasts (444: MSC bug). c8 5 Oct 92 J-l. Gailly added ifdef'd code to deal with PKZIP bug. c9 9 Oct 92 M. Adler removed a memory error message (~line 416). c10 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch, removed old inflate, renamed inflate_entry to inflate, added Mark's fix to a comment. c10.5 14 Dec 92 M. Adler fix up error messages for incomplete trees. c11 2 Jan 93 M. Adler fixed bug in detection of incomplete tables, and removed assumption that EOB is the longest code (bad assumption). c12 3 Jan 93 M. Adler make tab= UNZIP.BCK  [UNZIP542]INFLATE.C;1` les for fixed blocks only once. c13 5 Jan 93 M. Adler allow all zero length codes (pkzip 2.04c outputs one zero length code for an empty distance tree). c14 12 Mar 93 M. Adler made inflate.c standalone with the introduction of inflate.h. c14b 16 Jul 93 G. Roelofs added (unsigned) typecast to w at 470. c14c 19 Jul 93 J. Bush changed v[N_MAX], l[288], ll[28x+3x] arrays to static for Amiga. c14d 13 Aug 93 J-l. Gailly de-complicatified Mark's c[*p++]++ thing. c14e 8 Oct 93 G. Roelofs changed memset() to memzero(). c14f 22 Oct 93 G. Roelofs renamed quietflg to qflag; made Trace() conditional; added inflate_free(). c14g 28 Oct 93 G. Roelofs changed l/(lx+1) macro to pointer (Cray bug) c14h 7 Dec 93 C. Ghisler huft_build() optimizations. c14i 9 Jan 94 A. Verheijen set fixed_t{d,l} to NULL after freeing; G. Roelofs check NEXTBYTE macro for EOF. c14j 23 Jan 94 G. Roelofs removed Ghisler "optimizations"; ifdef'd EOF check. c14k 27 Feb 94 G. Roelofs added some typecasts to avoid warnings. c14l 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines to avoid bug in Encore compiler. c14m 7 Jul 94 P. Kienitz modified to allow assembler version of inflate_codes() (define ASM_INFLATECODES) c14n 22 Jul 94 G. Roelofs changed fprintf to macro for DLL versions c14o 23 Aug 94 C. Spieler added a newline to a debug statement; G. Roelofs added another typecast to avoid MSC warning c14p 4 Oct 94 G. Roelofs added (voidp *) cast to free() argument c14q 30 Oct 94 G. Roelofs changed fprintf macro to MESSAGE() c14r 1 Nov 94 G. Roelofs fixed possible redefinition of CHECK_EOF c14s 7 May 95 S. Maxwell OS/2 DLL globals stuff incorporated; P. Kienitz "fixed" ASM_INFLATECODES macro/prototype c14t 18 Aug 95 G. Roelofs added UZinflate() to use zlib functions; changed voidp to zvoid; moved huft_build() and huft_free() to end of file c14u 1 Oct 95 G. Roelofs moved G into definition of MESSAGE macro c14v 8 Nov 95 P. Kienitz changed ASM_INFLATECODES to use a regular call with __G__ instead of a macro c15 3 Aug 96 M. Adler fixed bomb-bug on random input data (Adobe) c15b 24 Aug 96 M. Adler more fixes for random input data c15c 28 Mar 97 G. Roelofs changed USE_ZLIB fatal exit code from PK_MEM2 to PK_MEM3 c16 20 Apr 97 J. Altman added memzero(v[]) in huft_build() c16b 29 Mar 98 C. Spieler modified DLL code for slide redirection c16c 04 Apr 99 C. Spieler fixed memory leaks when processing gets stopped because of input data errors c16d 05 Jul 99 C. Spieler take care of FLUSH() return values and stop processing in case of errors c17 31 Dec 00 C. Spieler added preliminary support for Deflate64 */ /* Inflate deflated (PKZIP's method 8 compressed) data. The compression method searches for as much of the current string of bytes (up to a length of 258) in the previous 32K bytes. If it doesn't find any matches (of at least length 3), it codes the next byte. Otherwise, it codes the length of the matched string and its distance backwards from the current position. There is a single Huffman code that codes both single bytes (called "literals") and match lengths. A second Huffman code codes the distance information, which follows a length code. Each length or distance code actually represents a base value and a number of "extra" (sometimes zero) bits to get to add to the base value. At the end of each deflated block is a special end-of-block (EOB) literal/ length code. The decoding process is basically: get a literal/length code; if EOB then done; if a literal, emit the decoded byte; if a length then get the distance and emit the referred-to bytes from the sliding window of previously emitted data. There are (currently) three kinds of inflate blocks: stored, fixed, and dynamic. The compressor outputs a chunk of data at a time and decides which method to use on a chunk-by-chunk basis. A chunk might typically be 32K to 64K, uncompressed. If the chunk is uncompressible, then the "stored" method is used. In this case, the bytes are simply stored as is, eight bits per byte, with none of the above coding. The bytes are preceded by a count, since there is no longer an EOB code. If the data are compressible, then either the fixed or dynamic methods are used. In the dynamic method, the compressed data are preceded by an encoding of the literal/length and distance Huffman codes that are to be used to decode this block. The representation is itself Huffman coded, and so is preceded by a description of that code. These code descriptions take up a little space, and so for small blocks, there is a predefined set of codes, called the fixed codes. The fixed method is used if the block ends up smaller that way (usually for quite small chunks); otherwise the dynamic method is used. In the latter case, the codes are customized to the probabilities in the current block and so can code it much better than the pre-determined fixed codes can. The Huffman codes themselves are decoded using a multi-level table lookup, in order to maximize the speed of decoding plus the speed of building the decoding tables. See the comments below that precede the lbits and dbits tuning parameters. GRR: return values(?) 0 OK 1 incomplete table 2 bad input 3 not enough memory the following return codes are passed through from FLUSH() errors 50 (PK_DISK) "overflow of output space" 80 (IZ_CTRLC) "canceled by user's request" */ /* Notes beyond the 1.93a appnote.txt: 1. Distance pointers never point before the beginning of the output stream. 2. Distance pointers can point back across blocks, up to 32k away. 3. There is an implied maximum of 7 bits for the bit length table and 15 bits for the actual data. 4. If only one code exists, then it is encoded using one bit. (Zero would be more efficient, but perhaps a little confusing.) If two codes exist, they are coded using one bit each (0 and 1). 5. There is no way of sending zero distance codes--a dummy must be sent if there are none. (History: a pre 2.0 version of PKZIP would store blocks with no distance codes, but this was discovered to be too harsh a criterion.) Valid only for 1.93a. 2.04c does allow zero distance codes, which is sent as one code of zero bits in length. 6. There are up to 286 literal/length codes. Code 256 represents the end-of-block. Note however that the static length tree defines 288 codes just to fill out the Huffman codes. Codes 286 and 287 cannot be used though, since there is no length base or extra bits defined for them. Similaril UNZIP.BCK  [UNZIP542]INFLATE.C;1`Yy, there are up to 30 distance codes. However, static trees define 32 codes (all 5 bits) to fill out the Huffman codes, but the last two had better not show up in the data. 7. Unzip can check dynamic Huffman blocks for complete code sets. The exception is that a single code would not be complete (see #4). 8. The five bits following the block type is really the number of literal codes sent minus 257. 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits (1+6+6). Therefore, to output three times the length, you output three codes (1+1+1), whereas to output four times the same length, you only need two codes (1+3). Hmm. 10. In the tree reconstruction algorithm, Code = Code + Increment only if BitLength(i) is not zero. (Pretty obvious.) 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) 12. Note: length code 284 can represent 227-258, but length code 285 really is 258. The last length deserves its own, short code since it gets used a lot in very redundant files. The length 258 is special since 258 - 3 (the min match length) is 255. 13. The literal/length and distance code bit lengths are read as a single stream of lengths. It is possible (and advantageous) for a repeat code (16, 17, or 18) to go across the boundary between the two sets of lengths. */ #define PKZIP_BUG_WORKAROUND /* PKZIP 1.93a problem--live with it */ /* inflate.h must supply the uch slide[WSIZE] array, the zvoid typedef (void if (void *) is accepted, else char) and the NEXTBYTE, FLUSH() and memzero macros. If the window size is not 32K, it should also define WSIZE. If INFMOD is defined, it can include compiled functions to support the NEXTBYTE and/or FLUSH() macros. There are defaults for NEXTBYTE and FLUSH() below for use as examples of what those functions need to do. Normally, you would also want FLUSH() to compute a crc on the data. inflate.h also needs to provide these typedefs: typedef unsigned char uch; typedef unsigned short ush; typedef unsigned long ulg; This module uses the external functions malloc() and free() (and probably memset() or bzero() in the memzero() macro). Their prototypes are normally found in and . */ #define __INFLATE_C /* identifies this source module */ /* #define DEBUG */ #define INFMOD /* tell inflate.h to include code to be compiled */ #include "inflate.h" #ifndef WSIZE /* default is 32K resp. 64K */ # ifdef USE_DEFLATE64 # define WSIZE 65536L /* window size--must be a power of two, and */ # else /* at least 64K for PKZip's deflate64 method */ # define WSIZE 0x8000 /* window size--must be a power of two, and */ # endif /* at least 32K for zip's deflate method */ #endif #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) # define wsize G._wsize /* wsize is a variable */ #else # define wsize WSIZE /* wsize is a constant */ #endif #ifndef NEXTBYTE /* default is to simply get a byte from stdin */ # define NEXTBYTE getchar() #endif #ifndef MESSAGE /* only used twice, for fixed strings--NOT general-purpose */ # define MESSAGE(str,len,flag) fprintf(stderr,(char *)(str)) #endif #ifndef FLUSH /* default is to simply write the buffer to stdout */ # define FLUSH(n) \ (((extent)fwrite(redirSlide, 1, (extent)(n), stdout) == (extent)(n)) ? \ 0 : PKDISK) #endif /* Warning: the fwrite above might not work on 16-bit compilers, since 0x8000 might be interpreted as -32,768 by the library function. */ #ifndef Trace # ifdef DEBUG # define Trace(x) fprintf x # else # define Trace(x) # endif #endif /*---------------------------------------------------------------------------*/ #ifdef USE_ZLIB /* GRR: return values for both original inflate() and UZinflate() 0 OK 1 incomplete table(?) 2 bad input 3 not enough memory */ /**************************/ /* Function UZinflate() */ /**************************/ int UZinflate(__G) /* decompress an inflated entry using the zlib routines */ __GDEF { int retval = 0; /* return code: 0 = "no error" */ int err=Z_OK; #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) wsize = G.redirect_size, redirSlide = G.redirect_buffer; else wsize = WSIZE, redirSlide = slide; #endif G.dstrm.next_out = redirSlide; G.dstrm.avail_out = wsize; G.dstrm.next_in = G.inptr; G.dstrm.avail_in = G.incnt; if (!G.inflInit) { unsigned i; int windowBits; /* only need to test this stuff once */ if (zlib_version[0] != ZLIB_VERSION[0]) { Info(slide, 0x21, ((char *)slide, "error: incompatible zlib version (expected %s, found %s)\n", ZLIB_VERSION, zlib_version)); return 3; } else if (strcmp(zlib_version, ZLIB_VERSION) != 0) Info(slide, 0x21, ((char *)slide, "warning: different zlib version (expected %s, using %s)\n", ZLIB_VERSION, zlib_version)); /* windowBits = log2(wsize) */ for (i = (unsigned)wsize, windowBits = 0; !(i & 1); i >>= 1, ++windowBits); if ((unsigned)windowBits > (unsigned)15) windowBits = 15; else if (windowBits < 8) windowBits = 8; G.dstrm.zalloc = (alloc_func)Z_NULL; G.dstrm.zfree = (free_func)Z_NULL; Trace((stderr, "initializing inflate()\n")); err = inflateInit2(&G.dstrm, -windowBits); if (err == Z_MEM_ERROR) return 3; else if (err != Z_OK) Trace((stderr, "oops! (inflateInit2() err = %d)\n", err)); G.inflInit = 1; } #ifdef FUNZIP while (err != Z_STREAM_END) { #else /* !FUNZIP */ while (G.csize > 0) { Trace((stderr, "first loop: G.csize = %ld\n", G.csize)); #endif /* ?FUNZIP */ while (G.dstrm.avail_out > 0) { err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); if (err == Z_DATA_ERROR) { retval = 2; goto uzinflate_cleanup_exit; } else if (err == Z_MEM_ERROR) { retval = 3; goto uzinflate_cleanup_exit; } else if (err != Z_OK && err != Z_STREAM_END) Trace((stderr, "oops! (inflate(first loop) err = %d)\n", err)); #ifdef FUNZIP if (err == Z_STREAM_END) /* "END-of-entry-condition" ? */ #else /* !FUNZIP */ if (G.csize <= 0L) /* "END-of-entry-condition" ? */ #endif /* ?FUNZIP */ break; if (G.dstrm.avail_in <= 0) { if (fillinbuf(__G) == 0) { /* no "END-condition" yet, but no more data */ retval = 2; goto uzinflate_cleanup_exit; } G.dstrm.next_in = G.inptr; G.dstrm.avail_in = G.incnt; } Trace((stderr, " avail_in = %d\n", G.dstrm.avail_in)); } /* flush slide[] */ if ((retval = FLUSH(wsize - G.dstrm.avail_out)) != 0) goto uzinflate_cleanup_exit; Trace((stderr, "inside loop: flushing %ld bytes (ptr diff = %ld)\n", (long)(wsize - G.dstrm.avail_out), (long)(G.dstrm.next_out-(Bytef *)redirSlide))); G.dstrm.next_out = redirSlide; G.dstrm.avail_out = wsize; } /* no more input, so loop until we have all output */ Trace((stderr, "beginning final loop: err E^ UNZIP.BCK  [UNZIP542]INFLATE.C;1`'= %d\n", err)); while (err != Z_STREAM_END) { err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); if (err == Z_DATA_ERROR) { retval = 2; goto uzinflate_cleanup_exit; } else if (err == Z_MEM_ERROR) { retval = 3; goto uzinflate_cleanup_exit; } else if (err == Z_BUF_ERROR) { /* DEBUG */ Trace((stderr, "zlib inflate() did not detect stream end (%s, %s)\n", G.zipfn, G.filename)); break; } else if (err != Z_OK && err != Z_STREAM_END) { Trace((stderr, "oops! (inflate(final loop) err = %d)\n", err)); DESTROYGLOBALS() EXIT(PK_MEM3); } /* final flush of slide[] */ if ((retval = FLUSH(wsize - G.dstrm.avail_out)) != 0) goto uzinflate_cleanup_exit; Trace((stderr, "final loop: flushing %ld bytes (ptr diff = %ld)\n", (long)(wsize - G.dstrm.avail_out), (long)(G.dstrm.next_out-(Bytef *)redirSlide))); G.dstrm.next_out = redirSlide; G.dstrm.avail_out = wsize; } Trace((stderr, "total in = %ld, total out = %ld\n", G.dstrm.total_in, G.dstrm.total_out)); G.inptr = (uch *)G.dstrm.next_in; G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ uzinflate_cleanup_exit: err = inflateReset(&G.dstrm); if (err != Z_OK) Trace((stderr, "oops! (inflateReset() err = %d)\n", err)); return retval; } /*---------------------------------------------------------------------------*/ #else /* !USE_ZLIB */ /* Function prototypes */ #ifndef OF # ifdef __STDC__ # define OF(a) a # else # define OF(a) () # endif #endif /* !OF */ int inflate_codes OF((__GPRO__ struct huft *tl, struct huft *td, int bl, int bd)); static int inflate_stored OF((__GPRO)); static int inflate_fixed OF((__GPRO)); static int inflate_dynamic OF((__GPRO)); static int inflate_block OF((__GPRO__ int *e)); /* The inflate algorithm uses a sliding 32K byte window on the uncompressed stream to find repeated byte strings. This is implemented here as a circular buffer. The index is updated simply by incrementing and then and'ing with 0x7fff (32K-1). */ /* It is left to other modules to supply the 32K area. It is assumed to be usable as if it were declared "uch slide[32768];" or as just "uch *slide;" and then malloc'ed in the latter case. The definition must be in unzip.h, included above. */ /* unsigned wp; moved to globals.h */ /* current position in slide */ #define INVALID_CODE 99 #define IS_INVALID_CODE(c) ((c) == INVALID_CODE) /* Tables for deflate from PKZIP's appnote.txt. */ static ZCONST unsigned border[] = { /* Order of the bit length code lengths */ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; static ZCONST ush cplens[] = { /* Copy lengths for literal codes 257..285 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; /* note: see note #13 above about the 258 in this list. */ static ZCONST ush cplext[] = { /* Extra bits for literal codes 257..285 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, INVALID_CODE, INVALID_CODE}; static ZCONST ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, #ifdef USE_DEFLATE64 8193, 12289, 16385, 24577, 32769, 49153}; #else 8193, 12289, 16385, 24577}; #endif static ZCONST ush cpdext[] = { /* Extra bits for distance codes */ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, #ifdef USE_DEFLATE64 12, 12, 13, 13, 14, 14}; #else 12, 12, 13, 13}; #endif #ifdef USE_DEFLATE64 # define NUMDISTS 32 #else # define NUMDISTS 30 #endif /* moved to consts.h (included in unzip.c), resp. funzip.c */ #if 0 /* And'ing with mask_bits[n] masks the lower n bits */ ZCONST ush near mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; #endif /* 0 */ /* Macros for inflate() bit peeking and grabbing. The usage is: NEEDBITS(j) x = b & mask_bits[j]; DUMPBITS(j) where NEEDBITS makes sure that b has at least j bits in it, and DUMPBITS removes the bits from b. The macros use the variable k for the number of bits in b. Normally, b and k are register variables for speed and are initialized at the begining of a routine that uses these macros from a global bit buffer and count. In order to not ask for more bits than there are in the compressed stream, the Huffman tables are constructed to only ask for just enough bits to make up the end-of-block code (value 256). Then no bytes need to be "returned" to the buffer at the end of the last block. See the huft_build() routine. */ /* These have been moved to globals.h */ #if 0 ulg bb; /* bit buffer */ unsigned bk; /* bits in bit buffer */ #endif #ifndef CHECK_EOF # define CHECK_EOF /* default as of 5.13/5.2 */ #endif #ifndef CHECK_EOF # define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} /* Huffman code decoding is performed using a multi-level table lookup. The fastest way to decode is to simply build a lookup table whose size is determined by the longest code. However, the time it takes to build this table can also be a factor if the data being decoded are not very long. The most common codes are necessarily the shortest codes, so those codes dominate the decoding time, and hence the speed. The idea is you can have a shorter table that decodes the shorter, more probable codes, and then point to subsidiary tables for the longer codes. The time it costs to decode the longer codes is then traded against the time it takes to make longer tables. This results of this trade are in the variables lbits and dbits below. lbits is the number of bits the first level table for literal/ length codes can decode in one step, and dbits is the same thing for the distance codes. Subsequent tables are also less than or equal to those sizes. These values may be adjusted either when all of the codes are shorter than that, in which case the longest code length in bits is used, or when the shortest code is *longer* than the requested table size, in which case the length of the shortest code in bits is used. There are two different values for the two tables, since they code a different number of possibilities each. The literal/length table codes 286 possible values, or in a flat code, a little over eight bits. The distance table codes 30 possible values, or a little less than five bits, flat. The optimum values for speed end up being about one bit more than those, so lbits is 8+1 and dbits is 5+1. The optimum values may differ though from machine to machine, and possibly even between compilers. Your mileage may vary. */ static ZCONST int lbits = 9; /* bits in base literal/length lookup table */ static ZCONST int dbits = 6; /* bits in base distance lookup table */ #ifndef ASM_INFLATECODES int. UNZIP.BCK  [UNZIP542]INFLATE.C;1`^6 inflate_codes(__G__ tl, td, bl, bd) __GDEF struct huft *tl, *td; /* literal/length and distance decoder tables */ int bl, bd; /* number of bits decoded by tl[] and td[] */ /* inflate (decompress) the codes in a deflated (compressed) block. Return an error code or zero if it all goes ok. */ { register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned ml, md; /* masks for bl and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ int retval = 0; /* error code returned: initialized to "no error" */ /* make local copies of globals */ b = G.bb; /* initialize bit buffer */ k = G.bk; w = G.wp; /* initialize window position */ /* inflate the coded data */ ml = mask_bits[bl]; /* precompute masks for speed */ md = mask_bits[bd]; while (1) /* do until end of block */ { NEEDBITS((unsigned)bl) if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) do { if (IS_INVALID_CODE(e)) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); DUMPBITS(t->b) if (e == 16) /* then it's a literal */ { redirSlide[w++] = (uch)t->v.n; if (w == wsize) { if ((retval = FLUSH(w)) != 0) goto cleanup_and_exit; w = 0; } } else /* it's an EOB or a length */ { /* exit if end of block */ if (e == 15) break; /* get length of block to copy */ NEEDBITS(e) n = t->v.n + ((unsigned)b & mask_bits[e]); DUMPBITS(e) #if (defined(USE_DEFLATE64) && !defined(FUNZIP)) if (n == 258 && G.lrec.compression_method == ENHDEFLATED) { /* fetch length bits */ NEEDBITS(16) n = ((unsigned)b & 0xffff) + 3; DUMPBITS(16) } #endif /* decode distance of block to copy */ NEEDBITS((unsigned)bd) if ((e = (t = td + ((unsigned)b & md))->e) > 16) do { if (IS_INVALID_CODE(e)) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); DUMPBITS(t->b) NEEDBITS(e) d = w - t->v.n - ((unsigned)b & mask_bits[e]); DUMPBITS(e) /* do the copy */ do { #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) {/* &= w/ wsize unnecessary & wrong if redirect */ if (d >= wsize) return 1; /* invalid compressed data */ n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); } else #endif n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); w += e; d += e; } else /* do it slowly to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { if ((retval = FLUSH(w)) != 0) goto cleanup_and_exit; w = 0; } } while (n); } } /* restore the globals from the locals */ G.wp = w; /* restore global window pointer */ G.bb = b; /* restore global bit buffer */ G.bk = k; cleanup_and_exit: /* done */ return retval; } #endif /* ASM_INFLATECODES */ static int inflate_stored(__G) __GDEF /* "decompress" an inflated type 0 (stored) block. */ { unsigned n; /* number of bytes in block */ unsigned w; /* current window position */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ int retval = 0; /* error code returned: initialized to "no error" */ /* make local copies of globals */ Trace((stderr, "\nstored block")); b = G.bb; /* initialize bit buffer */ k = G.bk; w = G.wp; /* initialize window position */ /* go to byte boundary */ n = k & 7; DUMPBITS(n); /* get the length and its complement */ NEEDBITS(16) n = ((unsigned)b & 0xffff); DUMPBITS(16) NEEDBITS(16) if (n != (unsigned)((~b) & 0xffff)) return 1; /* error in compressed data */ DUMPBITS(16) /* read and output the compressed data */ while (n--) { NEEDBITS(8) redirSlide[w++] = (uch)b; if (w == wsize) { if ((retval = FLUSH(w)) != 0) goto cleanup_and_exit; w = 0; } DUMPBITS(8) } /* restore the globals from the locals */ G.wp = w; /* restore global window pointer */ G.bb = b; /* restore global bit buffer */ G.bk = k; cleanup_and_exit: return retval; } /* Globals for literal tables (built once) */ /* Moved to globals.h */ #if 0 struct huft *fixed_tl = (struct huft *)NULL; struct huft *fixed_td; int fixed_bl, fixed_bd; #endif static int inflate_fixed(__G) __GDEF /* decompress an inflated type 1 (fixed Huffman codes) block. We should either replace this with a custom decoder, or at least precompute the Huffman tables. */ { /* if first time, set up tables for fixed blocks */ Trace((stderr, "\nliteral block")); if (G.fixed_tl == (struct huft *)NULL) { int i; /* temporary variable */ unsigned l[288]; /* length list for huft_build */ /* literal table */ for (i = 0; i < 144; i++) l[i] = 8; for (; i < 256; i++) l[i] = 9; for (; i < 280; i++) l[i] = 7; for (; i < 288; i++) /* make a complete, but wrong code set */ l[i] = 8; G.fixed_bl = 7; if ((i = huft_build(__G__ l, 288, 257, cplens, cplext, &G.fixed_tl, &G.fixed_bl)) != 0) { G.fixed_tl = (struct huft *)NULL; return i; } /* distance table */ for (i = 0; i < NUMDISTS; i++) /* make an incomplete code set */ l[i] = 5; G.fixed_bd = 5; if ((i = huft_build(__G__ l, NUMDISTS, 0, cpdist, cpdext, &G.fixed_td, &G.fixed_bd)) > 1) { huft_free(G.fixed_tl); G.fixed_td = G.fixed_tl = (struct huft *)NULL; return i; } } /* decompress until an end-of-block code */ return inflate_codes(__G__ G.fixed_tl, G.fixed_td, G.fixed_bl, G.fixed_bd); } static int inflate_dynamic(__G) __GDEF /* decompress an inflated type 2 (dynamic Huffman codes) block. */ { int i; /* temporary variables */ unsigned j; unsigned l; /* last length */ unsigned m; /* mask for bit lengths table */ unsigned n; /* number of lengths to get */ struct huft *tl; /* literal/length code table */ struct huft *td; /* distance code table */ int bl; /* lookup bits for tl */ int bd; /* lookup bits for td */ unsigned nb; /* number of bit length codes */ unsigned nl; /* number of literal/length codes */ unsigned nd; /* number of distance codes */ #ifdef PKZIP_BUG_WORKAROUND unsigned ll[288+32]; /* literal/length and distance code lengths */ #else unsigned_ݿ UNZIP.BCK  [UNZIP542]INFLATE.C;1`UE ll[286+NUMDISTS]; /* literal/length and distance code lengths */ #endif register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ int retval = 0; /* error code returned: initialized to "no error" */ /* make local bit buffer */ Trace((stderr, "\ndynamic block")); b = G.bb; k = G.bk; /* read in table lengths */ NEEDBITS(5) nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ DUMPBITS(5) NEEDBITS(5) nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ DUMPBITS(5) NEEDBITS(4) nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ DUMPBITS(4) #ifdef PKZIP_BUG_WORKAROUND if (nl > 288 || nd > 32) #else if (nl > 286 || nd > NUMDISTS) #endif return 1; /* bad lengths */ /* read in bit-length-code lengths */ for (j = 0; j < nb; j++) { NEEDBITS(3) ll[border[j]] = (unsigned)b & 7; DUMPBITS(3) } for (; j < 19; j++) ll[border[j]] = 0; /* build decoding table for trees--single level, 7 bit lookup */ bl = 7; retval = huft_build(__G__ ll, 19, 19, NULL, NULL, &tl, &bl); if (bl == 0) /* no bit lengths */ retval = 1; if (retval) { if (retval == 1) huft_free(tl); return retval; /* incomplete code set */ } /* read in literal and distance code lengths */ n = nl + nd; m = mask_bits[bl]; i = l = 0; while ((unsigned)i < n) { NEEDBITS((unsigned)bl) j = (td = tl + ((unsigned)b & m))->b; DUMPBITS(j) j = td->v.n; if (j < 16) /* length of code in bits (0..15) */ ll[i++] = l = j; /* save last length in l */ else if (j == 16) /* repeat last length 3 to 6 times */ { NEEDBITS(2) j = 3 + ((unsigned)b & 3); DUMPBITS(2) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = l; } else if (j == 17) /* 3 to 10 zero length codes */ { NEEDBITS(3) j = 3 + ((unsigned)b & 7); DUMPBITS(3) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = 0; l = 0; } else /* j == 18: 11 to 138 zero length codes */ { NEEDBITS(7) j = 11 + ((unsigned)b & 0x7f); DUMPBITS(7) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = 0; l = 0; } } /* free decoding table for trees */ huft_free(tl); /* restore the global bit buffer */ G.bb = b; G.bk = k; /* build the decoding tables for literal/length and distance codes */ bl = lbits; retval = huft_build(__G__ ll, nl, 257, cplens, cplext, &tl, &bl); if (bl == 0) /* no literals or lengths */ retval = 1; if (retval) { if (retval == 1) { if (!uO.qflag) MESSAGE((uch *)"(incomplete l-tree) ", 21L, 1); huft_free(tl); } return retval; /* incomplete code set */ } bd = dbits; retval = huft_build(__G__ ll + nl, nd, 0, cpdist, cpdext, &td, &bd); #ifdef PKZIP_BUG_WORKAROUND if (retval == 1) retval = 0; #endif if (bd == 0 && nl > 257) /* lengths but no distances */ retval = 1; if (retval) { if (retval == 1) { if (!uO.qflag) MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); huft_free(td); } huft_free(tl); return retval; } /* decompress until an end-of-block code */ retval = inflate_codes(__G__ tl, td, bl, bd); cleanup_and_exit: /* free the decoding tables, return */ huft_free(tl); huft_free(td); return retval; } static int inflate_block(__G__ e) __GDEF int *e; /* last block flag */ /* decompress an inflated block */ { unsigned t; /* block type */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ int retval = 0; /* error code returned: initialized to "no error" */ /* make local bit buffer */ b = G.bb; k = G.bk; /* read in last block bit */ NEEDBITS(1) *e = (int)b & 1; DUMPBITS(1) /* read in block type */ NEEDBITS(2) t = (unsigned)b & 3; DUMPBITS(2) /* restore the global bit buffer */ G.bb = b; G.bk = k; /* inflate that block type */ if (t == 2) return inflate_dynamic(__G); if (t == 0) return inflate_stored(__G); if (t == 1) return inflate_fixed(__G); /* bad block type */ retval = 2; cleanup_and_exit: return retval; } int inflate(__G) __GDEF /* decompress an inflated entry */ { int e; /* last block flag */ int r; /* result code */ #ifdef DEBUG unsigned h = 0; /* maximum struct huft's malloc'ed */ #endif #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) if (G.redirect_slide) wsize = G.redirect_size, redirSlide = G.redirect_buffer; else wsize = WSIZE, redirSlide = slide; /* how they're #defined if !DLL */ #endif /* initialize window, bit buffer */ G.wp = 0; G.bk = 0; G.bb = 0; /* decompress until the last block */ do { #ifdef DEBUG G.hufts = 0; #endif if ((r = inflate_block(__G__ &e)) != 0) return r; #ifdef DEBUG if (G.hufts > h) h = G.hufts; #endif } while (!e); Trace((stderr, "\n%u bytes in Huffman tables (%d/entry)\n", h * sizeof(struct huft), sizeof(struct huft))); /* flush out redirSlide and return (success, unless final FLUSH failed) */ return (FLUSH(G.wp)); } int inflate_free(__G) __GDEF { if (G.fixed_tl != (struct huft *)NULL) { huft_free(G.fixed_td); huft_free(G.fixed_tl); G.fixed_td = G.fixed_tl = (struct huft *)NULL; } return 0; } #endif /* ?USE_ZLIB */ /* * GRR: moved huft_build() and huft_free() down here; used by explode() * and fUnZip regardless of whether USE_ZLIB defined or not */ /* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ #define BMAX 16 /* maximum bit length of any code (16 for explode) */ #define N_MAX 288 /* maximum number of codes in any set */ int huft_build(__G__ b, n, s, d, e, t, m) __GDEF ZCONST unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ unsigned n; /* number of codes (assumed <= N_MAX) */ unsigned s; /* number of simple-valued codes (0..s-1) */ ZCONST ush *d; /* list of base values for non-simple codes */ ZCONST ush *e; /* list of extra bits for non-simple codes */ struct huft **t; /* result: starting table */ int *m; /* maximum lookup bits, returns actual */ /* Given a list of code lengths and a maximum table size, make a set of tables to decode that set of codes. Return zero on success, one if the given code set is incomplete (the tables are still built in this case), two if the input is invalid (all zero length codes or an oversubscribed set of lengths), and three if not enough memory. The code with value 256 is special, and the tables are constructed so that no bits beyond that code are fetched when that code is decoded. */ { unsigned a; /* counter for codes of length k */ unsigned c[BMAX+1]; /* bit length count table */ unsigned el; /* length of EOB code (value 256) */ unsigned f; /* i repeats in table every f entries */ int g; /* maximum code length */ int h; /* table level */ register unsigned i; /* counter, current code */ register unsigned j; /* counter */ register int k; /* number of bits in currenteB UNZIP.BCK  [UNZIP542]INFLATE.C;1`gT code */ int lx[BMAX+1]; /* memory for l[-1..BMAX-1] */ int *l = lx+1; /* stack of bits per table */ register unsigned *p; /* pointer into c[], b[], or v[] */ register struct huft *q; /* points to current table */ struct huft r; /* table entry for structure assignment */ struct huft *u[BMAX]; /* table stack */ unsigned v[N_MAX]; /* values in order of bit length */ register int w; /* bits before this table == (l * h) */ unsigned x[BMAX+1]; /* bit offsets, then code stack */ unsigned *xp; /* pointer into x */ int y; /* number of dummy codes added */ unsigned z; /* number of entries in current table */ /* Generate counts for each bit length */ el = n > 256 ? b[256] : BMAX; /* set length of EOB code, if any */ memzero((char *)c, sizeof(c)); p = (unsigned *)b; i = n; do { c[*p]++; p++; /* assume all entries <= BMAX */ } while (--i); if (c[0] == n) /* null input--all zero length codes */ { *t = (struct huft *)NULL; *m = 0; return 0; } /* Find minimum and maximum length, bound *m by those */ for (j = 1; j <= BMAX; j++) if (c[j]) break; k = j; /* minimum code length */ if ((unsigned)*m < j) *m = j; for (i = BMAX; i; i--) if (c[i]) break; g = i; /* maximum code length */ if ((unsigned)*m > i) *m = i; /* Adjust last length count to fill out codes, if needed */ for (y = 1 << j; j < i; j++, y <<= 1) if ((y -= c[j]) < 0) return 2; /* bad input: more codes than bits */ if ((y -= c[i]) < 0) return 2; c[i] += y; /* Generate starting offsets into the value table for each length */ x[1] = j = 0; p = c + 1; xp = x + 2; while (--i) { /* note that i == g from above */ *xp++ = (j += *p++); } /* Make a table of values in order of bit lengths */ memzero((char *)v, sizeof(v)); p = (unsigned *)b; i = 0; do { if ((j = *p++) != 0) v[x[j]++] = i; } while (++i < n); n = x[g]; /* set n to length of v */ /* Generate the Huffman codes and for each, make the table entries */ x[0] = i = 0; /* first Huffman code is zero */ p = v; /* grab values in bit order */ h = -1; /* no tables yet--level -1 */ w = l[-1] = 0; /* no bits decoded yet */ u[0] = (struct huft *)NULL; /* just to keep compilers happy */ q = (struct huft *)NULL; /* ditto */ z = 0; /* ditto */ /* go through the bit lengths (k already is bits in shortest code) */ for (; k <= g; k++) { a = c[k]; while (a--) { /* here i is the Huffman code of length k bits for value *p */ /* make tables up to required level */ while (k > w + l[h]) { w += l[h++]; /* add bits already decoded */ /* compute minimum size table less than or equal to *m bits */ z = (z = g - w) > (unsigned)*m ? *m : z; /* upper limit */ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ { /* too few codes for k-w bit table */ f -= a + 1; /* deduct codes from patterns left */ xp = c + k; while (++j < z) /* try smaller tables up to z bits */ { if ((f <<= 1) <= *++xp) break; /* enough codes to use up j bits */ f -= *xp; /* else deduct codes from patterns */ } } if ((unsigned)w + j > el && (unsigned)w < el) j = el - w; /* make EOB code end at table */ z = 1 << j; /* table entries for j-bit table */ l[h] = j; /* set table size in stack */ /* allocate and link in new table */ if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == (struct huft *)NULL) { if (h) huft_free(u[0]); return 3; /* not enough memory */ } #ifdef DEBUG G.hufts += z + 1; /* track memory usage */ #endif *t = q + 1; /* link to list for huft_free() */ *(t = &(q->v.t)) = (struct huft *)NULL; u[h] = ++q; /* table starts after link */ /* connect to last table, if there is one */ if (h) { x[h] = i; /* save pattern for backing up */ r.b = (uch)l[h-1]; /* bits to dump before this table */ r.e = (uch)(16 + j); /* bits in this table */ r.v.t = q; /* pointer to this table */ j = (i & ((1 << w) - 1)) >> (w - l[h-1]); u[h-1][j] = r; /* connect to last table */ } } /* set up table entry in r */ r.b = (uch)(k - w); if (p >= v + n) r.e = INVALID_CODE; /* out of values--invalid code */ else if (*p < s) { r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ r.v.n = (ush)*p++; /* simple code is just the value */ } else { r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ r.v.n = d[*p++ - s]; } /* fill code-like entries with r */ f = 1 << (k - w); for (j = i >> w; j < z; j += f) q[j] = r; /* backwards increment the k-bit code i */ for (j = 1 << (k - 1); i & j; j >>= 1) i ^= j; i ^= j; /* backup over finished tables */ while ((i & ((1 << w) - 1)) != x[h]) w -= l[--h]; /* don't need to update q */ } } /* return actual size of base table */ *m = l[0]; /* Return true (1) if we were given an incomplete table */ return y != 0 && g != 1; } int huft_free(t) struct huft *t; /* table to free */ /* Free the malloc'ed tables built by huft_build(), which makes a linked list of the tables it made, with the links in a dummy first entry of each table. */ { register struct huft *p, *q; /* Go through linked list, freeing from the malloced (t[-1]) address. */ p = t; while (p != (struct huft *)NULL) { q = (--p)->v.t; free((zvoid *)p); p = q; } return 0; } a*[UNZIP542]INFLATE.H;1+, ./ 4- 0@123KPWO56w?"7w?"89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* inflate.h for UnZip -- by Mark Adler version c14f, 23 November 1995 */ /* Copyright history: - Starting with UnZip 5.41 of 16-April-2000, this source fp UNZIP.BCK  [UNZIP542]INFLATE.H;1$ile is covered by the Info-Zip LICENSE cited above. - Prior versions of this source file, found in UnZip source packages up to UnZip 5.40, were put in the public domain. The original copyright note by Mark Adler was: "You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you." History: vers date who what ---- --------- -------------- ------------------------------------ c14 12 Mar 93 M. Adler made inflate.c standalone with the introduction of inflate.h. c14d 28 Aug 93 G. Roelofs replaced flush/FlushOutput with new version c14e 29 Sep 93 G. Roelofs moved everything into unzip.h; added crypt.h c14f 23 Nov 95 G. Roelofs added UNZIP_INTERNAL to accommodate newly split unzip.h */ #define UNZIP_INTERNAL #include "unzip.h" /* provides slide[], typedefs and macros */ #ifdef FUNZIP # include "crypt.h" /* provides NEXTBYTE macro for crypt version of funzip */ #endif m*[UNZIP542]INSTALL.;1+,z .=/ 4==~- 0@123KPWO>56匚7匚89GHJ__________________________________________________________________________ This is the Info-ZIP file INSTALL (for UnZip), last updated 06 May 2000. __________________________________________________________________________ Yes, this is a rather long file, but don't be intimidated: much of its length is due to coverage of multiple operating systems and of optional customization features, large portions of which may be skipped. __________________________________________________________________________ To compile UnZip, UnZipSFX and/or fUnZip (quick-start instructions): ======================================== (1) Unpack everything into a work directory somewhere, and make sure you're in the main UnZip directory (the one with this file in it). * (See note below concerning line termination format used in the source distribution) (2) Copy the appropriate makefile into the current directory, except under OS/2. (3) Run your "make" utility on the makefile (e.g., "nmake -f makefile.msc"). (4) Try out your new UnZip the way you would any new utility: read the docs first. Ah ha ha ha!! Oh, that kills me. But seriously...for VMS, UnZip must be installed as a "foreign symbol"; see the Install section below or [.vms]readme.vms for details. (It basically involves adding a line sort of like this to login.com: $ unzip == "$disk:[dir]unzip.exe") For DOS and other OSes without explicit timezone support (i.e., everybody but Unix, Windows 95 and NT), make sure the "TZ" environment variable is set to a valid and reasonable value; see your compiler docs for details. (*) The unzip sources as well as other Info-ZIP source archives are packaged in Unix format. All text files use single LF (Ascii 0x0a) characters as line terminators. On systems that use different conventions for plain text files (e.g.:DOS,Win9x,WinNT,OS/2 -> combined CR+LF; MacOS -> single CR), some utilities (editors, compilers, etc.) may not accept source files with LF line terminators. For these systems, we recommend to use Info-ZIP's UnZip utility for extraction of our distribution archives, applying the command option "-a" (= translate text files to native format) in the extraction command. In case this procedure is not applicable, an appropiate third-party conversion utility may be used to achieve the desired line termination style (examples: "flip", available for Unix, DOS, OS/2; or "tr" on Unix). To compile UnZip, UnZipSFX and/or fUnZip (detailed instructions): ======================================== (1) Unpack *.c and *.h (the actual source files), preserving the directory structure (e.g., ./unix/unix.c). The sole exception is TOPS-20, where tops20/* should be unpacked into the current directory, but TOPS-20 is no longer fully supported anyway. As of UnZip 5.41, full decryption support has been integrated in the UnZip source distribution. If you wish to compile binaries without decryption support, you must define the preprocessor flag NO_CRYPT. For many environments, you may add this flag to the custom compilation flags supplied by the environment variable LOCAL_UNZIP. For more details, see the make procedures and accompanied documentation for your particular target OS. (2) Choose the appropriate makefile based on the description in the Con- tents file for your OS (that is, there's only one for Unix or OS/2, but MS-DOS and several other OSes have several, depending on the compiler). Copy it into the current directory and rename if necessary or desired. (Some makefiles can be invoked in place; see (5) below.) Don't be afraid to read the makefile! Many options will be explained only in the comments contained therein. The defaults may not quite suit your system. When making changes, remember that some "make" utilities expect tabs as part of the makefile syntax. Failure with cryptic error messages will result if your editor quietly replaces those tabs with spaces. Special point of confusion: some non-MSDOS makefiles contain MS-DOS targets (useful for cross-compilations). An example is the OS/2 makefile os2/makefile.os2 that contains the gccdos target for DOS emx+gcc and some more DOS related targets for Watcom C and MSC. But since version 5.3, the msdos subdirectory contains makefiles for all supported DOS compilers. [The old djgpp, djgpp1 and gcc_dos targets in unix/Makefile have been removed in 5.3; use msdos/makefile.dj* instead.] Extra-special point of confusion: makefile.os2 expects to remain in the os2 subdirectory. Invoke it via "nmake -f os2/makefile.os2 gcc", for example. (3) If you want a non-standard version of UnZip, define one or more of the following optional macros, either by adding them to the LOCAL_UNZIP environment variable or by editing your makefile as appropriate. The syntax differs from compiler to compiler, but macros are often defined via "-DMACRO_NAME" or similar (for one called MACRO_NAME). Note that some of these may not be fully supported in future releases (or even in the current release). Note also that very short command lines in MS-DOS (128 characters) may place severe limits on how many of these can be used; if need be, the definitions can be placed at the top of unzip.h instead (it is included in all source files)--for example, "#define MACRO_NAME", one macro per line. DOSWILD (MS-DOS only) Treat trailing "*.*" like Unix "*" (i.e., iI UNZIP.BCKz  [UNZIP542]INSTALL.;1= matches anything); treat trailing "*." as match for files without a dot (i.e., matches any- thing, as long as no dots in name). Special treatment only occurs if patterns are at end of arguments; i.e., "a*.*" matches all files starting with "a", but "*.*c" matches all files ending in "c" *only* if they have a dot somewhere before the "c". [The default method of specifying files without a dot would be "* -x *.*", making use of UnZip's exclude-files option.] The matching is actually the same as Unix, if you assume that undotted filenames really have an invisible dot at the end, which is how DOS and related systems treat filenames in general. All other regular expressions (including "?" and "[range_of_chars]") retain their Unix-like behavior. WILD_STOP_AT_DIR Modifies the pattern matching routine so that both '?' (single-char wildcard) and '*' (multi-char wildcard) do not match the directory separator character '/'. Examples: "*.c" matches "foo.c" but not "mydir/foo.c" "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" This modified behaviour is equivalent to the pattern matching style used by the shells of some of UnZip's supported target OSs (one example is Acorn RISC OS). VMSWILD (VMS only) Use parentheses rather than brackets to delimit sets (ranges), and use '%' instead of '?' as the single-character wildcard for internal filename matching. (External matching of zipfile names always uses the standard VMS wildcard facilities; character sets are disallowed.) VMSCLI (VMS only) Use VMS-style "slash options" (/FOOBAR) instead of the default Unix- style hyphenated options (-f). This capability does not affect options stored in environment variables (UNZIP_OPTS or ZIPINFO_OPTS); those use the Unix style regardless. Beginning with UnZip 5.32, the supplied VMS Makefiles and make procedures generate both VMS-style and default "UNIX style" executables; you should NOT add VMSCLI to the custom options. CHECK_VERSIONS (VMS only) UnZip "extra fields" are used to store VMS (RMS) filesystem info, and the format of this information may differ in various versions of VMS. Defining this option will enable UnZip warnings when the stored extra-field VMS version(s) do(es) not match the version of VMS currently being used. This is a common occurrence in zipfiles received from other sites, but since the format of the filesystem does not seem to have changed in years (including on Alpha and Open- VMS systems), the warnings are not enabled by default. RETURN_CODES (VMS only) VMS interprets return codes according to a rigid set of guidelines, which means it misinterprets normal UnZip return codes as all sorts of really nasty errors. Therefore VMS UnZip returns an alternate set of return codes; since these may be difficult to interpret, define RETURN_CODES for human-readable explanations. VMS_TEXT_CONV (everybody except VMS) VMS text files archived with the "-V" option are only semi-readable at best when extracted on other systems. Defining this option enables UnZip's -aa option to attempt to convert such files to native text format. Non-VMS UnZips don't actually detect the precise VMS format of the files, however, but instead rely on some reasonably good heuristics (i.e., guesses). Therefore this option is not enabled by default, but it can be extremely useful on those rare occasions when a VMS text file must be extracted as normal text. USE_DJGPP_ENV (MS-DOS DJGPP 2.0x only) Regular DJGPP v2.0x compiled programs which use ENVIRONMENT are able to read from the file "djgpp.env" as well as those set in the environment. This adds about 1KB to the size of the executable. This option is disabled by default in Info-ZIP source. If you are able to use "djgpp.env" and don't like to clutter the environment with many special purpose variables, you may want to compile with this option set. USE_DJGPP_GLOB (MS-DOS DJGPP 2.0x only) If you like to get UnZip binaries that handle command line arguments similar to Unix tools which are run in an Unix shell, you might want to set this compilation option. This option enables the support for globbing command line arguments containing wild card that is built into the DJGPP startup code. When using a binary compiled with this option, you may have to enclose wildcard arguments in double quotes to get them passed to the program unmodified. Enabling this option is not recommended, because it results in Info-Zip binaries that do not behave as expected for MS-DOS programs. USE_VFAT (MS-DOS only, for using same executable under DOS and Win95/NT) djgpp 2.x and emx/gcc+RSX 5.1 can detect when they are running under a Win32 DOS box and will accordingly enable long-filename support. For now only djgpp 2.x and emx/gcc with RSX 5.1 or later have this feature (and it is defined by default in msdos/makefile.dj2 and makefile.emx), but if/when other compilers build in similar support, define this macro to enable its use. See also msdos/doscfg.h. [Note that djgpp 2.0's LFN support is flaky; users should upgrade to 2.01 or later.] NOTIMESTAMP This option disables the -T option, which basically does exactly what Zip's -go options do (i.e., set the timestamp of the zipfile to that of the newest file in the archive without rewriting the archive). Unlike Zip, however, UnZip supports wildcard specifications for the archive name; for example, "unzip -T *.zip" will set the dates of all zipfiles in the current directory. (UnZip's option is also much faster.) DATE_FORMAT=DF_DMY or DF_MDY or DF_YMD This option controls the order in which date components are printed in listings: day-month-year or month-day-year or year-month-day. For DOS derivatives the format is automatically obtained from the operating system; most others default to DF_MDY. ACORN_FTYPE_NFS (currently, Unix only) This option enables a -F option that instructs UnZip to interpret the filetype information extracted from Acorn RiscOS extra field blocks. The filetype IDs are translated into "NFS filetype extensions" and appended to the names of the extracted files. This feature facilitates maintance of Unix-based NFS volumes that are exported to Acorn RiscOS systems. QLZIP (Unix only) Add some support for QDOS extra fields. This option enables Unix UnZip to append "datalen info" to QDOS exec type files in the same format as used by QDOS cross-compilers on Unix or the qltools v2.2(+). UNIXBACKUP (Unix only) This option enables a -B option that instructs UnZip to rename files that would normally be overwritten. The renamed files are given a tilde suffix (`~'). Note that previously renamed files may be over- written without notice, even if the -n option is given. OS2_EAS List the sizes of OS/2 EAs and ACLs for ʣ UNZIP.BCKz  [UNZIP542]INSTALL.;1=yeach file as two extra columns in "unzip -l" output. This is primarily useful for OS/2 systems, but because zipfiles are portable, OS2_EAS can be defined for any system. (May be extended someday to show sizes of Mac resource forks, RISCOS and VMS file info, etc.) DELETE_IF_FULL (anybody with unlink() function) If a write error is encountered (most likely due to a full disk), enabling this option will cause the incomplete file to be deleted instead of closed normally. This is particularly useful for the Windows CE port, which must generally contend with extremely limited resources. ASM_CRC (Amiga/Aztec C; many x86 systems: DOS, OS/2, Win32, Unix) Use an assembler routine to calculate the CRC for each file (speed). ASM_INFLATECODES (Amiga/Aztec C only, for now) Use an assembler version of inflate_codes() for speed. OLD_EXDIR No longer supported. SFX_EXDIR Enable the "-d " option for UnZipSFX. By default it is disabled so as to generate the smallest possible executable stub, but for use with automated installation scripts and the like it may be useful to enable -d. NO_ZIPINFO Compile without ZipInfo mode (-Z) enabled; makes a smaller executable because many text strings are left out. Automatically enabled for some small-model compiles under MS-DOS and OS/2, so ordinarily there is no need to specify this explicitly. (Note that even with this defined, the resulting executable may still be too big to extract some zipfiles correctly, if compiled with the small memory model.) LZW_CLEAN (now default) USE_UNSHRINK The "shrinking" algorithm from PKZIP 1.0 is an LZW variant. Unisys patented the Lempel-Ziv-Welch algorithm in 1985 and has publicly claimed that decompression is covered by it. (IBM also patented the same thing in a filing 3 weeks prior to Unisys's.) Therefore un- shrinking is disabled by default, but those with LZW licenses can enable it by defining USE_UNSHRINK. (Unshrinking was used by PKZIP 1.0 and 1.1, and Zip 1.0 and 1.1. All newer archives use only the deflation method.) COPYRIGHT_CLEAN (now default) USE_SMITH_CODE The last chunk of code in UnZip that was blatantly derived from Sam Smith's unzip 2.0 (as in, "substantially similar") is in unreduce.c. Since reducing was only used by very early PKZIP beta versions (0.9x), support for it is now omitted by default (COPYRIGHT_CLEAN). To in- clude unreducing capability, define USE_SMITH_CODE. Note that this subjects UnZip to any and all restrictions in Smith's copyright; see the UnZip COPYING file for details. USE_CRYPT Enable decryption support for all binaries. The default setting is to disable decryption support for the SFX stub to keep its size as small as possible. For other binaries of the UnZip distribution, decryption support is enabled by default. NO_CRYPT Disable decryption support for all binaries. PASSWD_FROM_STDIN (with full crypt sources only; Unix, VMS only) Used to allow the password on encrypted files to be read from stdin rather than the default stderr. This was useful for those who wished to automate the testing or decoding of encrypted archives (say, in a shell script via ``echo "password" | unzip -tq archive''), but as of version 5.3, UnZip has a -P option for passing a password directly to the program. PASSWD_FROM_STDIN will therefore probably be phased out in future versions. Note that the same security warnings given in the description of the -P option apply here as well. DEBUG Used for debugging purposes; enables Trace() statements. Generally it's best to compile only one or two modules this way. DEBUG_TIME Used for debugging the timezone code in fileio.c; enables TTrace() statements. This code is only used for the freshen/update options (-f and -u), and non-Unix compilers often get it wrong. (4) If you regularly compile new versions of UnZip and always want the same non-standard option(s), you may wish to add it (them) to the LOCAL_UNZIP environment variable (assuming it's supported in your makefile). Under MS-DOS, for example, add this to AUTOEXEC.BAT: set LOCAL_UNZIP=-DDOSWILD -DDATE_FORMAT=DF_DMY You can also use the variable to hold special compiler options (e.g., -FPi87 for Microsoft C, if the x87 libraries are the only ones on your disk and they follow Microsoft's default naming conventions; MSC also supports the CL environment variable, however). (5) Run the make utility on your chosen makefile: Unix For most systems it's possible to invoke the makefile in place, at the possible cost of an ignorable warning; do "make -f unix/Makefile list" to get a list of possible system targets, and then "make -f unix/Makefile target" for your chosen target. The "generic" target works for most systems, but if it fails with a message about ftime() unresolved or timezone redefined, do "make clean", "make help", and then either "make generic2" or "make generic3" as instructed. If all else fails, read the makefile itself; it contains numerous comments. (One of these days we'll make a configure script that automates this procedure better.) VMS For a one-time build of the default UnZip, simply run the supplied command file MAKE_UNZ.COM. To use either DEC C on an Alpha or the default compiler (DEC C if available, else VAX C) on a VAX, type "@make_unz" (after copying make_unz.com into the current directory; otherwise do "@[.vms]make_unz" to invoke it in place). If you want to force the use of VAX C when both VAX C and DEC C are available, do "@make_unz vaxc" (or "@[.vms]make_unz vaxc"). To use GNU C (gcc) on either platform, do "@make_unz gnuc". (NOTE: Currently, gcc for VMS(AXP) is not yet available!) The command procedure MAKE_UNZ.COM now recognizes custom feature options supplied in the logical name LOCAL_UNZIP; details are explained in the comments at the top of MAKE_UNZ.COM. For repeated makes or other hacker-like tinkering with the sources, or to create a custom version of UnZip, you may use the included "MMS" makefile, DESCRIP.MMS. Copy it into the current directory, read the comments at the top of it and run MadGoat's free MMS clone "MMK" on it. Newer versions of DEC's MMS should work, too, but older ones apparently choke on some MMK-specific extensions in DESCRIP.MMS. (If somebody has an "older" version that works, let us know and we'll remove this caveat.) MS-DOS See the msdos\Contents file for notes regarding which makefile(s) to use with which compiler. In summary: pick one of msdos\makefile.* as appropriate, or (as noted above) use the OS/2 gccdos target for emx+gcc. There is also an mscdos cross-compilation target in os2\makefile.os2 and a sco_dos cross-compilation target in the Unix makefile. For Watcom 16-bit or 32-bit versions, see the comments in the OS/2 section below. After choosing the appropriate makefile ad >0 s b}evpKEFILE.;14p !QD.tyj-s(R:vL xW\.`?\?,ydPUUvWBOl`>/(SXzJO '*>1ve L:/=GEWQQ#,& bS*l,K9,gDWRUQo )@g;#l {Or:.t ;%[xq$- XSF~KuC]=X[+,cx"+Y K E[_MONFu:jIv$ {f|l\*J@JW [sZx 1&.] @NwS%!?Fp3lU]WLuYD.rcGG!\LV5BB?>F(;*F13Rq@WQlb=jFo+ s :)2\ ZkPX>[PU5|075>^Ky =y\C@EcQRZkhCRF|rB mK ixX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.2 }n7~48,,k0,2m"VS@ U5PJ\3LD5N`LqpH(=V"'a6 vB)^ \jF/exG +8LaC6P@b~BJ jbJ+-yY]A0w)z:@HvWZRsAcm=/"kcP ZH~}LgBT|sRNqI |9)pY\1|fy%5SKs\Y.}EDljg5k2,/l"KVq&K rEDB^M*+}[-a gKY:nqf{uri~XPD?6\*K{h+GD]\BOFF*\{NLJtt_XJ+MGZxe0 .H_KMZQW+ jN Yd52Q@V N1I\yBlE  D_GM$MP%r3GAg?EgV'#h+)`u=>!S_)L x[KGS=q,U'\YUC{*}GK ^WO@ZcV7X \\=z7z(r|4dU]0 VxB7;FUQ$U:#ME$p)`B] JzbA06AnVEF}k3M iD17jC\ {P&{k9 t"XgG(=C;41HIan 93 M. Adler make tab UNZIP.BCKz  [UNZIP542]INSTALL.;1=@r*nd editing as necessary or desired, invoke the corresponding make utility. Microsoft's NMAKE and the free dmake and GNU make utilities are generally the most versatile. The makefiles in the msdos directory can be invoked in place ("nmake -f msdos\makefile.msc", for example). OS/2 Either GNU make, nmake or dmake may be used with the OS/2 makefile; all are freely available on the net. Do "nmake -f os2\makefile.os2", for example, to get a list of supported targets. More generally, read the comments at the top of the makefile for an explanation of the differences between some of the same-compiler targets. Win32 (WinNT or Win95) You will need Microsoft Visual C++ 2.x for Win95 or NT (Intel, MIPS, Alpha, PowerPC?), or Watcom C++ for Win95 or NT (Intel only). As an alternative for Intel platforms, GNU C (the emx/rsxnt port) is now supported as well. DEC C/C++ for NT/Alpha may or may not still work. For the Watcom compiler, use WMAKE and win32\makefile.wat; for the others, use NMAKE and win32\Makefile. With emx+gcc, a good choice is GNUMake 3.75 from the djgpp V2.01 distribution. WinCE (WinCE or WinNT) Only Microsoft Visual C++ 5.0 or later is supported. Use the included project file and check wince\README for details. AmigaDOS SAS/Lattice C and Manx Aztec C are supported. For SAS C 6.x do "smake -f amiga/smakefile all"; for Aztec C do "make -f amiga/makefile.azt all". The Aztec C version supports assembly-language versions of two routines; these are enabled by default. Atari TOS Turbo C is no longer supported; use gcc and the MiNT libraries, and do "make". Note that all versions of gcc prior to 2.5.8 have a bug affecting 68000-based machines (optimizer adds 68020 instructions). See atari\README for comments on using other compilers. Macintosh Metrowerks CodeWarrior Pro 4 with Universal Interfaces 3.1 is the only currently supported compiler, although the Mac Programmer's Workbench (MPW) and Think C were supported at one time and still have some hooks. Other Compilers may work too, no compiler specific instructions (pragma, header, macros, ...) were used in the code. For CodeWarrior Pro 4, un-BinHex the CodeWarrior project file and UnZip resource file (using Stuffit Expander or BinHex 4.0 or later), then open the project and click on the compile button. See ":macos:Contents" for the possible project targets. Link order of the standard libraries is very important: Link all sources first and all standard libraries last. Acorn (RISC OS) Extract the files from the archive and place in standard 'Acorn' C form (i.e., *.c, *.h and *.s become c.*, h.* and s.*, respectively), either using the UNZIP$EXTS environment variable and a pre-built UnZip binary, or using Spark[FS] and doing it manually. Then copy the Acorn.Makefile to the main UnZip directory and either type 'amu' or use the desktop make utility. VM/CMS Unpack all the files and transfer them with ASCII -> EBCDIC conver- sion to an appropriate directory/minidisk/whatever, then execute UNZVMC to compile and link all the sources. This may require C/370 version 2.1 or later and certain `nucleus extensions,' although UnZip 5.3 has been reported to compile fine with the `ADCYCLE C/370 v1.2 compiler.' Note that it will abend without access to the C/370 runtime library. See the README.CMS file for more details. MVS Unpack all the files and transfer them to an appropriate PDS with ASCII -> EBCDIC conversion enabled, then edit UNZMVSC.JOB as required, and execute it to compile and link all the sources. C/370 2.1 or later is required. See README.MVS for further details. [This is a new port and may need a little more work even to compile.] Human68K [This is a Japanese machine and OS.] It appears that GNU make and gcc are required; presumably just do "gmake -f human68k/Makefile.gcc" to build everything. This port has not been tested since the 5.12 release. TOPS-20 [No longer fully supported due to new, unported features, although patches are always accepted.] Unpack all files into the current directory only (including those in the zipfile's tops20 directory), then use make.mic and "do make". BeOS You can run the BeOS makefile in place by typing "make -f beos/Makefile". In fact, this is how the author tests it. Running the appropriate make utility should produce three executables on most systems, one for UnZip/ZipInfo, one for UnZipSFX, and one for fUnZip. (VMS is one prominent exception: fUnZip makes no sense on it. The Amiga produces a fourth executable called MakeSFX, which is necessary because Amiga self-extracting archives cannot be created by simple concatenation. If necessary the source amiga/makesfx.c can be compiled on other systems.) Read any OS-specific README files for notes on setting things up for normal use (especially for VMS) and for warnings about known quirks and bugs in various compilers (especially for MS-DOS). Also note that many OSes require a timezone variable to be set correctly (often "TZ"); Unix and VMS generally do so by default, Win95/NT do if set up properly, but other OSes generally do not. See the discussion of the -f and -u options in the UnZip man page (or unzip.txt). BeOS doesn't currently support timezone information at all, but this will probably be added soon. Then test your new UnZip on a few archives and let us know if there are problems (but *please* first make certain that the archives aren't actu- ally corrupted and that you didn't make one of the silly mistakes dis- cussed in the documentation). If possible, double-check any problems with PKUNZIP or with a previous version of UnZip prior to reporting a "bug." The zipfile itself may be damaged. To install: =========== Unix The default prefix for the installation location is /usr/local (things go into the bin and man/man1 subdirectories beneath the prefix), and the default man-page extension is "1" (corresponding to man/man1, above). To install as per the defaults, do "make install"; otherwise do "make prefix=/your/path manext=your_extension install". (For Intel Unix flavors where the assembler CRC routines were used [ASM_CRC], use the install_asm target instead of the regular install target.) For example, to install in your home directory with "l" as the man-page extension (for "local"), do "make prefix=$HOME manext=l install". Permissions will be 755 for the executables and 644 for the man pages. In general root must perform in- stallation into a public directory. Do "rehash" if your shell requires it in order to find the new executables. VMS Install UnZip as foreign symbol by adding this to login.com: $ unzip == "$disk:[dir]unzip.exe" $ zipinfo == "$disk:[dir]unzip.exe ""-Z""" where "disk" and "dir" are the location of the UnZip executable; the "$" before the disk name is important, as are the double-double-quotes around the -Z. Some people, including the author, prefer a short alias such as "ii" instead of "zipinfo"; edit to taste. Optionally also isY UNZIP.BCKz  [UNZIP542]INSTALL.;1=~ 9nstall unzipsfx for use with the MAKESFX.COM command file. See vms/README (or [.VMS]README.) for details on this and for notes/warnings about zipfiles and UnZip under VMS. OS/2, MS-DOS, NT, Atari, Amiga Move or copy unzip.exe (or unzip.ttp, or UnZip, or whatever) to a direc- tory in your path; also possibly copy the UnZip executable to zipinfo.exe (or ii.exe), or else create an alias or a batch/command file for ZipInfo ("@unzip -Z %1 %2 %3 %4 %5 %6 %7 %8 %9" under MS-DOS). The latter is only relevant if NO_ZIPINFO was *not* defined, obviously... Under djgpp 2.x, zipinfo.exe is a 2K stub symbolically linked to unzip.exe. Acorn RISC OS Copy the executables unzip, funzip and zipinfo to somewhere in your Run$Path. See your Welcome manual if you don't know about Run$Path. BeOS The default prefix for the installation location is /boot/usr/local (things go into the bin and man/man1 subdirectories beneath the prefix), and the default man-page extension is "1" (corresponding to the man/man1, above). Of course, these Unix man-pages aren't useful until someone ports something that can format them... plain text versions are also installed with an extension of ".txt". To install, do a "make install", or to change the prefix, do "make prefix=/your/path install". For example, to install in /boot/bin, do "make prefix=/boot/bin install". Macintosh MacZip requires at least System 7 and a Macintosh with a minimum of a Motorola 68020 or PowerPC 601 processor. Other configurations may work but it is not tested at all. The application (MacZip) is distributed as a combination of zip and unzip in one program. The offical release is a fat binary with both regular 68K and native PowerPC versions included. Move the executable(s) somewhere--for example, drag it (or them) to your Applications folder. For easy access, make an alias in the Launcher Control Panel or directly on your desktop. This port supports also Apple-event.So you can install it in your WWW-Browser as a helper-app. Look into ":macos:README.TXT" for further info. Human68K, TOPS-20, AOS/VS, MVS, VM/CMS, etc. Dunno, sorry... *[UNZIP542]LICENSE.;1+,x ./ 4- 0@123KPWO56v7v89GHJ This is version 2000-Apr-09 of the Info-ZIP copyright and license. The definitive version of this document should be available at ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. Copyright (c) 1990-2000 Info-ZIP. All rights reserved. For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals: Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Christian Spieler, Antoine Verheijen, Paul von Behren, Rich Wales, Mike White This software is provided "as is," without warranty of any kind, express or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. Redistributions of source code must retain the above copyright notice, definition, disclaimer, and this list of conditions. 2. Redistributions in binary form must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/or other materials provided with the distribution. 3. Altered versions--including, but not limited to, ports to new operating systems, existing ports with new graphical interfaces, and dynamic, shared, or static library versions--must be plainly marked as such and must not be misrepresented as being the original source. Such altered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions with the names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s). 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases. *[UNZIP542]LIST.C;1+, .1/ 411- 0@123KPWO256i:a7i:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- list.c This file contains the non-ZipInfo-specific listing routines for UnZip. Contains: list_files() get_time_stamp() [optional feature] ratio() fnprint() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #ifdef WINDLL # ifdef POCKET_UNZIP # include "wince/intrface.h" # else # include "windll/windll.h" # endif #endif #ifdef TIMESTAMP static int fn_is_dir OF((__GPRO)); #endif #ifndef WINDLL static ZCONST char Far CompFactorStr[] = "%c%d%%"; static ZCONST char Far CompFactor100[] = "100%%"; #ifdef OS2_EAS static ZCONST char Far HeadersS[] = " Length EAs ACLs Date Time Name"; static ZCONST char Far HeadersS1[] = " -------- --- ---- ---- ---- ----"; #else static ZCONST char Far HeadersS[] = " Length Date Time Name"; static ZCONST char Far HeadersS1[] = " -------- ---- ---- ----"; #endif static ZCONST char Far HeadersL[] = " Length Method Size Ratio Date TimeB UNZIP.BCK  [UNZIP542]LIST.C;11 CRC-32 Name"; static ZCONST char Far HeadersL1[] = "-------- ------ ------- ----- ---- ---- ------ ----"; static ZCONST char Far *Headers[][2] = { {HeadersS, HeadersS1}, {HeadersL, HeadersL1} }; static ZCONST char Far CaseConversion[] = "%s (\"^\" ==> case\n%s conversion)\n"; static ZCONST char Far LongHdrStats[] = "%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %c"; static ZCONST char Far LongFileTrailer[] = "-------- ------- --- \ -------\n%8lu %8lu %4s %lu file%s\n"; #ifdef OS2_EAS static ZCONST char Far ShortHdrStats[] = "%9lu %6lu %6lu %02u-%02u-%02u %02u:%02u %c"; static ZCONST char Far ShortFileTrailer[] = " -------- ----- ----- \ -------\n%9lu %6lu %6lu %lu file%s\n"; static ZCONST char Far OS2ExtAttrTrailer[] = "%lu file%s %lu bytes of OS/2 extended attributes attached.\n"; static ZCONST char Far OS2ACLTrailer[] = "%lu file%s %lu bytes of access control lists attached.\n"; #else static ZCONST char Far ShortHdrStats[] = "%9lu %02u-%02u-%02u %02u:%02u %c"; static ZCONST char Far ShortFileTrailer[] = " -------- \ -------\n%9lu %lu file%s\n"; #endif /* ?OS2_EAS */ #endif /* !WINDLL */ /*************************/ /* Function list_files() */ /*************************/ int list_files(__G) /* return PK-type error code */ __GDEF { int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; #ifndef WINDLL char sgn, cfactorstr[10]; int longhdr=(uO.vflag>1); #endif int date_format; ulg j, members=0L; unsigned methnum; #ifdef USE_EF_UT_TIME iztimes z_utime; struct tm *t; #endif unsigned yr, mo, dy, hh, mm; ulg csiz, tot_csize=0L, tot_ucsize=0L; #ifdef OS2_EAS ulg ea_size, tot_easize=0L, tot_eafiles=0L; ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L; #endif min_info info; char methbuf[8]; static ZCONST char dtype[]="NXFS"; /* see zi_short() */ static ZCONST char Far method[NUM_METHODS+1][8] = {"Stored", "Shrunk", "Reduce1", "Reduce2", "Reduce3", "Reduce4", "Implode", "Token", "Defl:#", "Def64#", "ImplDCL", "Unk:###"}; /*--------------------------------------------------------------------------- Unlike extract_or_test_files(), this routine confines itself to the cen- tral directory. Thus its structure is somewhat simpler, since we can do just a single loop through the entire directory, listing files as we go. So to start off, print the heading line and then begin main loop through the central directory. The results will look vaguely like the following: Length Method Size Ratio Date Time CRC-32 Name ("^" ==> case -------- ------ ------- ----- ---- ---- ------ ---- conversion) 44004 Implode 13041 71% 11-02-89 19:34 8b4207f7 Makefile.UNIX 3438 Shrunk 2209 36% 09-15-90 14:07 a2394fd8 ^dos-file.ext 16717 Defl:X 5252 69% 11-03-97 06:40 1ce0f189 WHERE -------- ------- --- ------- 64159 20502 68% 3 files ---------------------------------------------------------------------------*/ G.pInfo = &info; date_format = DATE_FORMAT; #ifndef WINDLL if (uO.qflag < 2) { if (uO.L_flag) Info(slide, 0, ((char *)slide, LoadFarString(CaseConversion), LoadFarStringSmall(Headers[longhdr][0]), LoadFarStringSmall2(Headers[longhdr][1]))); else Info(slide, 0, ((char *)slide, "%s\n%s\n", LoadFarString(Headers[longhdr][0]), LoadFarStringSmall(Headers[longhdr][1]))); } #endif /* !WINDLL */ for (j = 1L;;j++) { if (readbuf(__G__ G.sig, 4) == 0) return PK_EOF; if (strncmp(G.sig, central_hdr_sig, 4)) { /* is it a CentDir entry? */ if (((unsigned)(j - 1) & (unsigned)0xFFFF) == (unsigned)G.ecrec.total_entries_central_dir) { /* "j modulus 64k" matches the reported 16-bit-unsigned * number of directory entries -> probably, the regular * end of the central directory has been reached */ break; } else { Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); return PK_BADERR; /* sig not found */ } } /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ if ((error = process_cdir_file_hdr(__G)) != PK_COOL) return error; /* only PK_EOF defined */ /* * We could DISPLAY the filename instead of storing (and possibly trun- * cating, in the case of a very long name) and printing it, but that * has the disadvantage of not allowing case conversion--and it's nice * to be able to see in the listing precisely how you have to type each * filename in order for unzip to consider it a match. Speaking of * which, if member names were specified on the command line, check in * with match() to see if the current file is one of them, and make a * note of it if it is. */ if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_COOL) /* ^--(uses pInfo->lcflag) */ { error_in_archive = error; if (error > PK_WARN) /* fatal: can't continue */ return error; } if (G.extra_field != (uch *)NULL) { free(G.extra_field); G.extra_field = (uch *)NULL; } if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) { error_in_archive = error; if (error > PK_WARN) /* fatal */ return error; } if (!G.process_all_files) { /* check if specified on command line */ unsigned i; do_this_file = FALSE; for (i = 0; i < G.filespecs; i++) if (match(G.filename, G.pfnames[i], uO.C_flag)) { do_this_file = TRUE; break; /* found match, so stop looping */ } if (do_this_file) { /* check if this is an excluded file */ for (i = 0; i < G.xfilespecs; i++) if (match(G.filename, G.pxnames[i], uO.C_flag)) { do_this_file = FALSE; /* ^-- ignore case in match */ break; } } } /* * If current file was specified on command line, or if no names were * specified, do the listing for this file. Otherwise, get rid of the * file comment and go back for the next file. */ if (G.process_all_files || do_this_file) { #ifdef OS2DLL /* this is used by UzpFileTree() to allow easy processing of lists * of zip directory contents */ if (G.processExternally) { if ((G.processExternally)(G.filename, &G.crec)) break; ++members; } else { #endif #ifdef OS2_EAS { uch *ef_ptr = G.extra_field; int ef_size, ef_len = G.crec.extra_field_length; ea_size = acl_size = 0; 6PS UNZIP.BCK  [UNZIP542]LIST.C;11  while (ef_len >= EB_HEADSIZE) { ef_size = makeword(&ef_ptr[EB_LEN]); switch (makeword(&ef_ptr[EB_ID])) { case EF_OS2: ea_size = makelong(&ef_ptr[EB_HEADSIZE]); break; case EF_ACL: acl_size = makelong(&ef_ptr[EB_HEADSIZE]); break; } ef_ptr += (ef_size + EB_HEADSIZE); ef_len -= (ef_size + EB_HEADSIZE); } } #endif #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, G.crec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0, Mac */ t = localtime(&(z_utime.mtime)); } else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { mo = (unsigned)(t->tm_mon + 1); dy = (unsigned)(t->tm_mday); yr = (unsigned)(t->tm_year % 100); hh = (unsigned)(t->tm_hour); mm = (unsigned)(t->tm_min); } else #endif /* USE_EF_UT_TIME */ { yr = ((((unsigned)(G.crec.last_mod_dos_datetime >> 25) & 0x7f) + 80) % (unsigned)100); mo = ((unsigned)(G.crec.last_mod_dos_datetime >> 21) & 0x0f); dy = ((unsigned)(G.crec.last_mod_dos_datetime >> 16) & 0x1f); hh = (((unsigned)G.crec.last_mod_dos_datetime >> 11) & 0x1f); mm = (((unsigned)G.crec.last_mod_dos_datetime >> 5) & 0x3f); } /* permute date so it displays according to nat'l convention * ('methnum' is not yet set, it is used as temporary buffer) */ switch (date_format) { case DF_YMD: methnum = mo; mo = yr; yr = dy; dy = methnum; break; case DF_DMY: methnum = mo; mo = dy; dy = methnum; } csiz = G.crec.csize; if (G.crec.general_purpose_bit_flag & 1) csiz -= 12; /* if encrypted, don't count encryption header */ if ((cfactor = ratio(G.crec.ucsize, csiz)) < 0) { #ifndef WINDLL sgn = '-'; #endif cfactor = (-cfactor + 5) / 10; } else { #ifndef WINDLL sgn = ' '; #endif cfactor = (cfactor + 5) / 10; } methnum = MIN(G.crec.compression_method, NUM_METHODS); zfstrcpy(methbuf, method[methnum]); if (methnum == DEFLATED || methnum == ENHDEFLATED) { methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; } else if (methnum >= NUM_METHODS) { sprintf(&methbuf[4], "%03u", G.crec.compression_method); } #if 0 /* GRR/Euro: add this? */ #if defined(DOS_FLX_NLM_OS2_W32) || defined(THEOS) || defined(UNIX) for (p = G.filename; *p; ++p) if (!isprint(*p)) *p = '?'; /* change non-printable chars to '?' */ #endif /* DOS_FLX_NLM_OS2_W32 || THEOS || UNIX */ #endif /* 0 */ #ifdef WINDLL /* send data to application for formatting and printing */ (*G.lpUserFunctions->SendApplicationMessage)(G.crec.ucsize, csiz, (unsigned)cfactor, mo, dy, yr, hh, mm, (char)(G.pInfo->lcflag ? '^' : ' '), (LPSTR)fnfilter(G.filename, slide), (LPSTR)methbuf, G.crec.crc32, (char)((G.crec.general_purpose_bit_flag & 1) ? 'E' : ' ')); #else /* !WINDLL */ if (cfactor == 100) sprintf(cfactorstr, LoadFarString(CompFactor100)); else sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); if (longhdr) Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats), G.crec.ucsize, methbuf, csiz, cfactorstr, mo, dy, yr, hh, mm, G.crec.crc32, (G.pInfo->lcflag? '^':' '))); else #ifdef OS2_EAS Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), G.crec.ucsize, ea_size, acl_size, mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); #else Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), G.crec.ucsize, mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); #endif fnprint(__G); #endif /* ?WINDLL */ if ((error = do_string(__G__ G.crec.file_comment_length, QCOND? DISPL_8 : SKIP)) != 0) { error_in_archive = error; /* might be just warning */ if (error > PK_WARN) /* fatal */ return error; } tot_ucsize += G.crec.ucsize; tot_csize += csiz; ++members; #ifdef OS2_EAS if (ea_size) { tot_easize += ea_size; ++tot_eafiles; } if (acl_size) { tot_aclsize += acl_size; ++tot_aclfiles; } #endif #ifdef OS2DLL } /* end of "if (G.processExternally) {...} else {..." */ #endif } else { /* not listing this file */ SKIP_(G.crec.file_comment_length) } } /* end for-loop (j: files in central directory) */ /*--------------------------------------------------------------------------- Print footer line and totals (compressed size, uncompressed size, number of members in zipfile). ---------------------------------------------------------------------------*/ if (uO.qflag < 2 #ifdef OS2DLL && !G.processExternally #endif ) { if ((cfactor = ratio(tot_ucsize, tot_csize)) < 0) { #ifndef WINDLL sgn = '-'; #endif cfactor = (-cfactor + 5) / 10; } else { #ifndef WINDLL sgn = ' '; #endif cfactor = (cfactor + 5) / 10; } #ifdef WINDLL /* pass the totals back to the calling application */ G.lpUserFunctions->TotalSizeComp = tot_csize; G.lpUserFunctions->TotalSize = tot_ucsize; G.lpUserFunctions->CompFactor = (ulg)cfactor; G.lpUserFunctions->NumMembers = members; #else /* !WINDLL */ if (cfactor == 100) sprintf(cfactorstr, LoadFarString(CompFactor100)); else sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); if (longhdr) { Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer), tot_ucsize, tot_csize, cfactorstr, members, members==1? "":"s")); #ifdef OS2_EAS if (tot_easize || tot_aclsize) Info(slide, 0, ((char *)slide, "\n")); if (tot_eafiles && tot_easize) Info(slide, 0, ((char *)slide, LoadFarString(OS2ExtAttrTrailer), tot_eafiles, tot_eafiles == 1? " has" : "s have a total of", tot_easize)); if (tot_aclfiles && tot_aclsize) Info(slide, 0, ((char *)slide, LoadFarString(OS2ACLTrailer), tot_aclfiles, tot_aclfiles == 1? " has" : "s have a total of", Da UNZIP.BCK  [UNZIP542]LIST.C;11{" tot_aclsize)); #endif /* OS2_EAS */ } else #ifdef OS2_EAS Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), tot_ucsize, tot_easize, tot_aclsize, members, members == 1? "" : "s")); #else Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), tot_ucsize, members, members == 1? "" : "s")); #endif /* OS2_EAS */ #endif /* ?WINDLL */ } /*--------------------------------------------------------------------------- Double check that we're back at the end-of-central-directory record. ---------------------------------------------------------------------------*/ if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; /* didn't find sig */ } if (members == 0L && error_in_archive <= PK_WARN) error_in_archive = PK_FIND; return error_in_archive; } /* end function list_files() */ #ifdef TIMESTAMP /************************/ /* Function fn_is_dir() */ /************************/ static int fn_is_dir(__G) /* returns TRUE if G.filename is directory */ __GDEF { extent fn_len = strlen(G.filename); register char endc; return fn_len > 0 && ((endc = lastchar(G.filename, fn_len)) == '/' || (G.pInfo->hostnum == FS_FAT_ && !MBSCHR(G.filename, '/') && endc == '\\')); } /*****************************/ /* Function get_time_stamp() */ /*****************************/ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ __GDEF time_t *last_modtime; ulg *nmember; { int do_this_file=FALSE, error, error_in_archive=PK_COOL; ulg j; #ifdef USE_EF_UT_TIME iztimes z_utime; #endif min_info info; /*--------------------------------------------------------------------------- Unlike extract_or_test_files() but like list_files(), this function works on information in the central directory alone. Thus we have a single, large loop through the entire directory, searching for the latest time stamp. ---------------------------------------------------------------------------*/ *last_modtime = 0L; /* assuming no zipfile data older than 1970 */ *nmember = 0L; G.pInfo = &info; for (j = 1L;; j++) { if (readbuf(__G__ G.sig, 4) == 0) return PK_EOF; if (strncmp(G.sig, central_hdr_sig, 4)) { /* is it a CentDir entry? */ if (((unsigned)(j - 1) & (unsigned)0xFFFF) == (unsigned)G.ecrec.total_entries_central_dir) { /* "j modulus 64k" matches the reported 16-bit-unsigned * number of directory entries -> probably, the regular * end of the central directory has been reached */ break; } else { Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); return PK_BADERR; /* sig not found */ } } /* process_cdir_file_hdr() sets pInfo->lcflag: */ if ((error = process_cdir_file_hdr(__G)) != PK_COOL) return error; /* only PK_EOF defined */ if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_OK) { /* ^-- (uses pInfo->lcflag) */ error_in_archive = error; if (error > PK_WARN) /* fatal: can't continue */ return error; } if (G.extra_field != (uch *)NULL) { free(G.extra_field); G.extra_field = (uch *)NULL; } if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) { error_in_archive = error; if (error > PK_WARN) /* fatal */ return error; } if (!G.process_all_files) { /* check if specified on command line */ unsigned i; do_this_file = FALSE; for (i = 0; i < G.filespecs; i++) if (match(G.filename, G.pfnames[i], uO.C_flag)) { do_this_file = TRUE; break; /* found match, so stop looping */ } if (do_this_file) { /* check if this is an excluded file */ for (i = 0; i < G.xfilespecs; i++) if (match(G.filename, G.pxnames[i], uO.C_flag)) { do_this_file = FALSE; /* ^-- ignore case in match */ break; } } } /* If current file was specified on command line, or if no names were * specified, check the time for this file. Either way, get rid of the * file comment and go back for the next file. * Directory entries are always ignored, to stay compatible with both * Zip and PKZIP. */ if ((G.process_all_files || do_this_file) && !fn_is_dir(__G)) { #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, G.crec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { if (*last_modtime < z_utime.mtime) *last_modtime = z_utime.mtime; } else #endif /* USE_EF_UT_TIME */ { time_t modtime = dos_to_unix_time(G.crec.last_mod_dos_datetime); if (*last_modtime < modtime) *last_modtime = modtime; } ++*nmember; } SKIP_(G.crec.file_comment_length) } /* end for-loop (j: files in central directory) */ /*--------------------------------------------------------------------------- Double check that we're back at the end-of-central-directory record. ---------------------------------------------------------------------------*/ if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; } if (*nmember == 0L && error_in_archive <= PK_WARN) error_in_archive = PK_FIND; return error_in_archive; } /* end function get_time_stamp() */ #endif /* TIMESTAMP */ /********************/ /* Function ratio() */ /* also used by ZipInfo routines */ /********************/ int ratio(uc, c) ulg uc, c; { ulg denom; if (uc == 0) return 0; if (uc > 2000000L) { /* risk signed overflow if multiply numerator */ denom = uc / 1000L; return ((uc >= c) ? (int) ((uc-c + (denom>>1)) / denom) : -((int) ((c-uc + (denom>>1)) / denom))); } else { /* ^^^^^^^^ rounding */ denom = uc; return ((uc >= c) ? (int) ((1000L*(uc-c) + (denom>>1)) / denom) : -((int) ((1000L*(c-uc) + (denom>>1)) / denom))); } /* ^^^^^^^^ rounding */ } /************************/ /* Function fnprint() */ /* also used by ZipInfo routines */ /************************/ void fnprint(__G) /* print filename (after filtering) and newline */ __GDEF { char *name = fnfilter(G.filename, slide); (*G.message)((zvoid *)&G, (uch *)name, (ulg)strlen(name), 0); (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); } , UNZIP.BCK  [UNZIP542]LIST.C;111/* end function fnprint() */ /*[UNZIP542]MACOS.DIR;1+,> 5./ 4- 0123 KPWO56O+!a7O+!a89GHJI CONTENTS.- HISTORY.TXTK README.TXTM SOURCE.DIRI UNZP.H0 UNZPLIB.H* UNZPPRJ.XML. UNZPSFX.H)UNZPSX.H(*[UNZIP542.MACOS]CONTENTS.;1+,-./ 4H-> 50@123KPWO56?bdܞ7?bdܞ89GHJContents of the "macos" sub-archive for UnZip 5.42 and later: Contents this file README.TXT Dirk Haase's infos on updated Macintosh ports of Zip/UnZip HISTORY.TXT Dirk Haase's MacOS specific ChangeLog UnZp.h config header used to build standalone app with GUI UnZpLib.h config header used to build a static library UnZpSFX.h config header used to build the SFX stub UnZpSx.h config header for building a standalone app. with MW Sioux UnZpPrj.xml Metrowerks CodeWarrior pro5 project file (xml export file) source/ subdirectory containing all sources: a) UnZip specific code macbin3.c macbinary III code, used for extraction of ZipIt archives macbin3.h macbinary III header, macbinary docu + public prototyping macos.c Mac-specific filesystem code maccfg.h Mac-specific configuration and global declarations macdir.c Macintosh Posix-style directory emulation ("dirent") macdir.h header file for directory emulation macscreen.c screen functions to be used in standalone UnZip application macstat.c Macintosh stat() emulation macstat.h header file for stat() emulation macunzip.c Macintosh standalone version main function sxunzip.c main function for use with static library (SIOUX) unzip_rc.hqx UnZip resource file for standalone application (BinHex) b) general utilities shared between Zip and UnZip charmap.h character mapping tables ISO 8859-1 <--> MacRoman getenv.c simulation of unix compatible getenv() on MacOS helpers.c some helper functions helpers.h macstuff.c Mac filemanager routines copied from MoreFiles 1.4.8 macstuff.h mactime.c replacement for broken Metrowerks RTL time functions mactime.h pathname.c functions for handling MacOS HFS path- /filenames pathname.h The new UnZpPrj.hqx project file should be "un-BinHex'ed" into UnZpPrj, which builds the following targets: Unzip (68k) -> standalone unzip for 68k Unzip (PPC) -> standalone unzip for PPC Unzip Lib (68k) -> static library 68k Unzip Lib (PPC) -> static library PPC Unzip Sioux (68k) -> MW Sioux standoalone App, good for debugging Unzip Sioux (PPC) -> MW Sioux standoalone App, good for debugging Before you start a build on your Macintosh: Extract "*.hqx" and "source:*.hqx" first! And PLEASE, read the MacOS specific documentation in README.TXT! The resource files and the compiler project files are in BinHex form because they contain Macintosh resource forks. The resource info cannot be maintained when handling (e.g. repacking) the master source collection on non-Macintosh systems. The BinHex form is the traditional way for transferring such files via non-Macintosh systems. It's also the safest since it uses only printable characters. The ".hqx" files must be converted with StuffitExpander or BinHex 4.0 (or equivalent) on a Macintosh system before using them. *[UNZIP542.MACOS]HISTORY.TXT;1+,K.!/ 4!!j-> 50@123KPWO"56.Xڞ7.Xڞ89GHJA free Macintosh Port of Info-ZIP's Zip and UnZip By Dirk Haase, d_haase@sitec.net Home page: www.sitec.net/maczip Mirror page: www.haase-online.de/dirk/maczip ================================ Release MacZip ver1.06 beta 1 05. August 2000 ------------ 2) CHG: {zip} switch to latest beta release unzip 2.30 3) CHG: {unzip} switch to latest beta release unzip 5.42c Release MacZip ver1.05 final 05. August 2000 ------------ 1) CHG: {unzip} switch to latest final release unzip 5.41 2) FIX: {unzip} Fixed "unique unzip folder" foldername handling 3) FIX: {unzip} added prototype crc32() in macbin3.c 4) CHG: {unzip/zip} added exported Codewarrior project-file in xml-format 5) FIX: {unzip} added extra-field recognition for Mac SmartZip in zipinfo.c and unzpriv.h. Release MacZip ver1.04 final 25. January 2000 ---------------- Final release of MacZip. All parts now in final release state !! 1) Switch to MW Codewarrior pro 5.3 2) CHG: {zip} switch (back) to latest final release unzip 2.30 3) CHG: {unzip} switch (back) to latest final release unzip 5.40 Release MacZip ver1.04 beta 3 05. October 1999 ---------------- 1) CHG: {zip} switch to latest source level unzip 2.30o beta release 2) CHG: {unzip} switch to latest source level unzip 5.41c beta release 3) ADD: {console} added menu to print the license Release MacZip ver1.04 beta 2 02. June 1999 -------------- 1) FIX: {unzip} added one more criteria to make the recognition of macbinary more save. 2) FIX: {unzip} sometimes, archive entries without any extra field caused problems; the default setting of the extra field was not set back to 'unknown' properly. 3) FIX: {zip} Archive filename with invalid characters like '/' gets renamed. However, I do not check the complete path - needs some more work here. 4) FIX: {zip} Filename match was case sensitive. 6) CHG: {zip} switch to latest source level unzip 2.30m beta rele> UNZIP.BCKK> 5[UNZIP542.MACOS]HISTORY.TXT;1!ase 7) CHG: {unzip} switch to latest source level unzip 5.41b beta release 8) FIX: {zip/unzip 68k only) I have found a wrong compiler setting for the 68k version. Because of this wrong setting the 68k version crashed. Release MacZip ver1.04 beta 1 30. March 1999 -------------- 1) CHG: {unzip) switch to latest source level unzip 5.41a beta release 2) ADD: {all} Added message logging support for Syslogd by Brian Bergstrand. Syslogd can be found at http://www.classicalguitar.net/brian/apps/syslogd/ This feature is 'under construction'. 3) FIX: {all} many small fixes and code cleanups Release MacZip ver1.03 27. March 1999 -------------- 1) CHG: {console} Like Stuffit Expander MacZip quits automatically when used with drag'n drop or as Helper App (Web-Browser). 2) CHG: {console} Since Macintosh users are used to be guided by their software in order not to do something stupid, I added a check to post an extra warning if the options -m and data fork only are both checked. This behavior can be disabled: See Applescript example and "maczip.env". 3) CHG: {zip} switch from immediate deletion to moving to the trash. Immediate deletion is now an option in "maczip.env". 4) CHG: {zip} enhanced progress display. 5) CHG: {zip) switch to latest source level zip 2.3l beta release 6) CHG: {unzip} The zip archive contains file names greater than 31 characters. When MacZip tries to unzip the file, the FSpCreate command fails because the filename length is to long. MacZip correct this problem by trying to truncate the file names to the 31 character limit. 7) FIX: {zip/console} A couple of minor fixes 8) CHG: {zip} Switched file-globbing to the Info-ZIP version. Release MacZip ver1.02 14. February 1999 ----------------- 1) CHG: {zip} Changed the rule of file inclusion if switch '-X' is set. Following conditions are checked: a) if length of resource-fork is equal zero *and* the length of data-fork is equal zero include the file. b) if length of resource-fork greater zero *and* the length of data-fork is equal zero don't include the file. c) if length of data-fork greater zero include the file. 2) CHG: {Console} Some users are very confused by the buttons "START PATH" and "ZIP ARCHIVE". Somehow, it wasn't clear what the intended meaning was. I changed the buttons to more clear labels on them like: "file or folder to compress" and "location of compressed file" 3) CHG: {Console} I changed the menu structure to be more intuitive. 4) FIX: {Console} Found a nasty bug which sometimes caused crashes when the Zip / Unzip Dialogbox was used. 5) CHG: {Console} Handling of file dialog is now a bit more restricted: e.g: it's not possible to select a file if you have to select a folder. Release MacZip ver1.01 30. January 1999 ---------------------- 1) CHG: {console} The use of the "Current App" mechanism was clumsy and forces the user into the Zip or Unzip modes. This kind of modality is not so good for the command line. It's now neccessary to enter zip or unzip to choose the action. 2) FIX: {console} When Applescript sends quit to MacZip the script that is running shows a spinning cursor and MacZip does not quit. 3) FIX: {console} MacZip gots accidentally the wrong creator code (from BBedit) Final Release MacZip ver1.0 --------------------------- Released 21. January 1999 9. Beta release 06.December.1998 --------------------------------- 1) CHG: {console} The checkbox of Filedialog (for extract path and file path) "Show all files" is now selected by default. 2) CHG: {unzip/standalone} changed prototypes of mac[f]printf() to return an int number (better ANSI conformance); 3) FIX: {unzip} repaired "stdout/stderr" mode of macwrite(). So func MacMessagePrnt() is now obsolete and removed. 4) ADD: {zip/unzip} Compressed Mac3 extra-fields are now supported (Thanks to Christian Spieler) 5) ADD: {unzip} Extraction of ZipIt archive are now supported. This support is not complete: Filenames are correct but folder names are only restored with the public directory names. 6) ADD: {zip/unzip} Improved documentation. 7) FIX: {unzip} Function isZipfile() is completely rewritten. 8) CHG: {zip/unzip) switch to latest source level zip 2.3i beta and unzip 5.4 final release 9) ADD: Applescript event "do_cmd". Unless there are big bugs found, this release will be the last beta release. The final release will come out in January 1999. 8. Beta release 20.November.1998 --------------------------------- 1) CHG: {zip/unzip) switch to latest source level zip 2.3h beta and unzip 5.4 final release 2) ADD: {zip} Zip finds "namelocked" files also, if switch "-S" is set. 3) FIX: {unzip} Function isZipfile() fails if the zip archive has a comment. 4) CHG: {zip} added some small speed improvements to pattern matching and isZipFile() function. 5) FIX: {unzip} Display of comments is fixed. UzpMessagePrnt() is replaced by MacMessagePrnt(). I do not care about ansi-bombs. I'm not sure, so this fix may be changed later. 6) RMV: {unzip} Buildin More capability is removed since it's already built into the GUI-App. 7. Beta release 09.November.1998 --------------------------------- 1) CHG: {all} switched to Metrowerks Codewarrior Pro 4 2) FIX: {unzip} Display of comments stored in the zip-file is now fixed 3) FIX: {zip} Fixed display of the zip help-screen. 4) CHG: {zip/unzip} Changed special dir 'Re$0urce.Fk' to 'XtraStuf.mac' (see entry at 13.June.1998 item 3). I found it more descriptive for users outside the mac-community. 5) CHG: {all} switched to MoreFiles 1.4.9. 6) CHG: {console} changed behaivor of the file open dialog: The select button is now always enabled. 7) ADD: {all} Environment variables are now supported. Basically, it is possible to add timezone (= TZ environment variable) support here, but it's not yet implemented. See "MacZip.Env" for further info. 8) RMV: {console} Targets "zip only" and "unzip only" are removed. 6. Beta release 09.September.1998 --------------------------------- 1) CHG: {Zip/Unzip} Metrowerks Standardlibrary time funktions are rather broken and incomplete so I was forced to rewrite the funktions: mktime(), localtime(), gmtime() and time(). 2) ADD: {Console} Added Pause Funktion for screen output. The Pause-Function is selfadjusting: Count of lines is depending on the window size. 3) CHG: Extra-Field layout is changed: All datas are now in little-endian format (see appnote) 4) ADD: {Console} Added an option to test the archive automatically after zipping. This option is only via Zip-Dialogbox available because it needs the unzip-module also. 5) CHG: {Zip} code is now up to date with the latest beta 2.3f. 6) ADD: {Console} Added (drag'n) drop support. Drop on the MacZip icon. The following situations are supported: 1. drop of one or more zipfiles (action = unzip) each archive will be extracted in a separate folder 2. drop of a folder (action = zip -r ) The complete folder (inclusive sub-folders) will be zipped Not (yet)>$ UNZIP.BCKK> 5[UNZIP542.MACOS]HISTORY.TXT;1!. supported is currently: dropping more than one file to compress. Workaround: Put all your files in one folder and drop that folder on MacZip. MacZip recognize zip-archives automatically. 5. Beta release 21.Aug.1998 ---------------------------- 1) ADD: {Console} Userinterface has now a Statusbar to show the Progress. 2) ADD: {Console} It's now possible to stop the run of Zip/Unzip with the well known shortcut [Command] + [.] 3) CHG: {Console} Improved user-entry routine. 4) ADD: {Zip/Unzip} Crypt-code added. It's now possible to encrypt/decrypt archives. 5) RMV: {Unzip} Removed the warning of PKZip/Mac archive. Unzip gets confused with the extra field of PKZip/Mac. So I assume the extra field isn't compatible with Info-ZIP's definition. 6) CHG: switched to Metrowerks Codewarrior Pro 3 this includes: - new Universal Interfaces 3.1 Headers - improved codegeneration 7) CHG: {Zip} code is now up to date with the latest beta 2.3e. 8) CHG: {Unzip} changed function names wprintf, wgets .. to macprintf, macgets .. to avoid naming conflict standart library. 9) ADD: {Zip/Unzip} FXinfo, Mac-Pathname, file-dates and Finder-Comments are now stored in the extra-field. Extra-field layout is changed accordingly. Unzip uses now the filename stored in the extra-field when unzipping. 10) CHG: {Unzip} code is now up to date with the latest beta 5.33g. 11) CHG: {Unzip} code is (again) up to date with the latest beta 5.33h. 12) ADD: {Unzip} following switches were added: -J [MacOS only] ignore mac extra info. All macintosh info are not restored. Datafork and resource-fork are restored separatly. -i [MacOS only] ignore filenames stored in mac extra field. Use the most compatible filename stored in the public field. -E [MacOS only] show mac extra field during restoring 13) ADD: {Zip/Unzip} Charset MacRoman to ISO8859 Latin and vice versa 14) RMV: {Zip} -N option removed. This MacZip crashes using this option. I will fix it later. I think I'm very close for a final release of "MacZip 1.0" :-) 4. Beta release 27.June.1998 ---------------------------- 26.June.1998 ------------ 1) FIX: {Zip} extra field size value was wrong. 25.June.1998 ------------ 1) CHG: {Zip} code is now up to date with the latest beta 2.3d. So both modules, zip & unzip, uses now latest beta. 2) ADD: {Zip} added a UT extra-field for better compatibility. 3) CHG: {Unzip} changed the code to find the mac extra-field. Unzip has to look for a mac extra-field because mac-archives has now two extra-fields (UT + M3). 4) CHG: {Unzip} changed the method to move extra-field data to the internal extra-structure. Old method was just BlockMove of the ef_structptr to ef_memptr. This method was dangerous because not all members of the structure seamless aligned. There are may be some fill bytes in the structure depending on the compiler setting. 5) ADD: {Unzip} added a warning if unzipping a ZipIt/PKZip archive. ZipIt/PKZip archives are usually additionally coded somehow. InfoZip's Unzip will *not* decode the files. So extracted files are may be not decoded. (see also 6. and 7.) 6) ADD: ZipIt (the Shareware Tool) has now a new extra-field signature: 0x2705. Found in "ZipIt 1.3.8". I added a new macro: EF_ZIPIT2 7) ADD: Added PKWare's extra-field signature: 0xCF77. Found in "PKZIP v2.03". I added a new macro: EF_PKMAC 8) ADD: {console} It's now possible to save all screen outputs to the disk. 9) RMV: {console} this is the first beta without expire-date. 16.June.1998 ------------ 1) FIX: {Unzip/console} Extract path now defaults to current-dir if no path is given. 2> CHG: {Unzip} creates now a extract-folder by default. This behavior differs to the commandline tool of Unzip on other platforms. However, for a mac-user is this behavior more convenient. 3. Beta release 15.June.1998 ---------------------------- 15.June.1998 ------------ 1) CHG: {unzip/zip} I changed the layout of the extra field to support more data. 14.June.1998 ------------ 1) FIX: {Unzip} adjusted time_t value with an correct offset value. 2) FIX: {Unzip} removed all unused code based on unfinished ideas by former porter(s). 3) CHG: use of shared code izshr 032. 13.June.1998 ------------ 1) FIX: {Unzip} Filenames are only converted when needed. When zipping with the switch 'datafork only' the filenames are shorted which was wrong. 2) CHG: {Unzip} code is now up to date with the latest beta 5.33f. 3) CHG: {Zip} Changed the naming rule of filenames from old Johnny Lee's to my implementation. Johnny Lee's idea is based on change of the filenames which cases several problems when unziping on a non mac plattform. My idea is to add a special directory: 'Re$0urce.Fk'. For the future: Zip will create archives according the new nameing rule. However unzip will be compatible with old nameing rule. See also 4. 4} ADD: {Unzip} Added a new nameing rule for resource forks filename. Resource forks are now stored in a special directory: 'Re$0urce.Fk'. This naming rule make it easier to for other platforms to use mac zip-files. 11.June.1998 ------------ 1) FIX: {Zip} Internal file attribute is set to BINARY by default when zipping resource forks otherwise Unzip will create sometimes wrong resource-forks. 2) CHG: {Unzip} code is now up to date with the latest beta 5.33e. 2. Beta release 10.June.1998 -------------------------- 1) FIX: {Unzip} Long pathname fix solved. Unzip is now able to extract archives with path longer than 256 chars. 2) CHG: {Unzip} removed all conversion from c-style string to pascal-string (see fix 1) 3) ADD: {Unzip} Finderinfo of folders are also restored. 4) ADD: {Console} Added info about current path in the command-line box. 5) FIX: {Console} Construction of the command-line of the unzip-dialog box fixed. First beta release 06.June.1998 ----------------------------- no history. Just to many code was neccessary to build the first mac-port. Start of the port MacZip February 1998 -------------------------------------------------------------------------------- Legende: FIX: fixes a bug CHG: inform about changed items. ADD: added feature RMV: removed Item {Unzip} -> only related to the Unzip-module {Zip} -> only related to the Zip-module These are just libraries and are linked into the console-app. {Console} -> only related to the Userinterface (not SIOUX) MacOS has no tool like a command-line. So it's neccessary to write wrapper around the command-line tools. Dirk Haase *[UNZIP542.MACOS]README.TXT;1+,M.-/ 4---> 50@123KPWO.56&ܞ7&ܞ89GHJ/FB UNZIP.BCKM> 5[UNZIP542.MACOS]README.TXT;1-/A free Macintosh Port of Info-ZIP's Zip and UnZip By Dirk Haase, d_haase@sitec.net Home page: www.sitec.net/maczip Mirror page: www.haase-online.de/dirk/maczip ================================ Abstract: --------- MacZip is a cross-platform compatible tool that includes both Zip (for compression) and UnZip (for extraction). Zip is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, Windows 9x, Windows NT, Atari, Macintosh, Amiga, Acorn RISC OS, and other systems. UnZip unpacks zip archives. The Zip and UnZip programs can process archives pro- duced by PKZIP, and PKZIP and PKUNZIP can work with archives produced by zip. Zip version 2.2 is compatible with PKZIP 2.04. License: -------- Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html Requirements ------------ MacZip requires at least System 7 and a Macintosh with a minimum of a Motorola 68020 or PowerPC 601 processor. Other configurations may work but it is not tested at all. The application is distributed as a fat binary with both regular 68K and native PowerPC versions included. Installation ------------ Move the executable(s) somewhere--for example, drag it (or them) to your Applications folder. For easy access, make an alias in the Launcher Control Panel or directly on your desktop. The GUI is very simple. It was not my intention to make a full-blown GUI, however I think it is comfortable enough to use it as regular tool. This port supports also Apple-event. So you can install it in your WWW-Browser as a helper app. For more Info about the contents of this package, take a look into the "macos/Contents" (or :macos:Contents) file. Some notes on how to rebuild the Macintosh applications can be found in INSTALL. Usage: ------ Basically there are four ways to start MacZip: a) Drag'n Drop To extract an archive, drop an archive on MacZip. To compress files drop a file, folder or volume on MacZip. Note: You cannot drop more than one item at the same time. b) using the Dialog box (Menu: File -> Zip/Unzip): * Compression (Zip): - Go to "File -> Zip"and the "Zip Options" Dialog Box appears. - Click on "Location of the compressed File" - The "Select an archive" dialog box appears a) select a existing zip archive -> Your files will be added to that zip archive. b) select a folder and name your new zip archive -> a new zip archive will be created with your files. - Select one or more check boxes if you want. see Zip.txt for more information. - Click on "File or Folder to Compress" - The "Select a File or Folder" dialog box appears a) select a file -> This file will be compressed. b) select a folder -> the contents of the folder will be compressed. - Click on "Start Zip" to start the task. * Extraction (Unzip): - Go to "File -> Unzip"and the "Unzip Options" Dialog Box appears. - Click on "Location of the compressed File" - The "Select an archive" dialog box appears - select a existing zip archive - Select one or more check boxes if you want. see Unzip.txt for more information. - Click on "Location of the extracted Files" - The "Select a Folder" dialog box appears a) select a file -> This file will be compressed. b) select a folder -> the contents of the archive will be extracted into this folder. - Click on "Start Unzip" to start the task. c) Using the Command line (Menu: File->Command Line): The Zip & UnZip tools are command line tools. So the behavior is exactly the same like the Zip & UnZip tools on Unix or Windows/DOS. This means, if you want to zip some files, you have to write a command line like this: "zip [switches] path_to_zip_archive path_to_files_folders" - Go to "File" and select "Command Line" and the "MacZip Entry box" Dialog Box appears. An example: a: your zip may be created at Macintosh HD:applications:archive.zip b: your files may be found at Macintosh HD:somewhere:my_folder_to_archive:* Note: At the end of the path there must be a filename or a wild card ! (see Footnote: 1 wild card, 2 Mac path names) So the command line should look like (one line!): zip "Macintosh HD:applications:archive.zip" "Macintosh HD:somewhere:my_folder_to_archive:*" - Click on "Enter" to start the task. Since you can not set a default folder you have to enter always a full qualified path names. Full-qualified path names are path names including the Volume name ! (see Footnote: 2 Mac path names) d) Using Applescript: There is only one additional event defined: "do_cmd". You can enter every valid command line. The first word must be "zip" or "unzip" to select the action (compress or extraction). See sample Applescript: tell application "MacZip (PPC)" activate with timeout of 90000 seconds do_cmd "zip -rjjN Volume:archive \"My Volume:*\" " end timeout end tell This script opens MacZip, brings it to the foreground on the Mac, starts the zip action with the command line: zip -rjjN Volume:archive "My Volume:*" . A short introduction is also available online: http://www.sitec.net/maczip/How-To-Do/ It's possible to stop the run of Zip/Unzip with the well known shortcut [Command] + [.]. --------------------------------------------------------------------------- There are some Mac-specific switches available. Zip Module: -df [MacOS] Include only data-fork of files zipped into the archive. Good for exporting files to foreign operating-systems. Resource-forks will be ignored at all. -jj [MacOS] record Fullpath (+ Volname). The complete path including volume will be stored. By default the relative path will be stored. -S [MSDOS, OS/2, WIN32 and ATARI] Include system and hidden files. [MacOS] Includes finder invisible files, which are ignored otherwise. Unzip Module: -E [MacOS only] display contents of MacOS extra field during restore operation. -i [MacOS only] ignore filenames stored in MacOS extra fields. Instead, the most compatible filename stored in the generic part of the entry's header is used. -J [MacOS only] ignore MacOS extra fields. All Macin- tosh specific info is skipped. Data-fork and resource-fork are restored as separate files. Select [File]->[Get Help on Zip/Unzip] for a complete list of switches. Limitations / Problems: ----------------------- - Aliases are not supported. I tried, but I got broken aliases This port will silently ignore all aliases. It's on my to-do list for future releases. - Zip needs much memory to compress many files: You may need to increase the 'Preferred Size' in 'Get Info'. Values of 12 Megabytes or more are possible - Unzip needs about 500 Kbytes of memory to unzip no matter how many files were compressed and expanded. - and finally one big macintosh-related problem: This port has one weak point: It's based on path names. As you mayZ UNZIP.BCKM> 5[UNZIP542.MACOS]README.TXT;1-7# be already know: Path names are not unique on a Mac ! The main reason is that an attempt to implement support exact saving of the MacOS specific internal file structures would require a throughout rewrite of major parts of shared code, probably sacrifying compatibility with other systems. I have no solution at the moment. The port will just warn you if you try zip from / to a volume which has a duplicate name. MacZip has problems to find the archive or the files. My (Big) recommendation: Name all your volumes with a unique name and MacZip will run without any problem. Known Bugs: - crypted files in a zip archive are sometimes corrupt: I get an error message: invalid compressed data to inflate. Appearance of this error is purely be chance: I did a small test: Unzipping an archive containing 3589 files 56 files fails to unzip, so about 1.5%. Root cause is completely unclear to me :( I strongly recommend to test your archive (e.g. unzip -t archive). Zip Programs / Macintosh Extra-Data: ----------------------------------------- A brief overview: Currently, as far as I know, there are 6 Zip programs available for the Macintosh platform. These programs build (of course) different variants of Zip files: - Info-ZIP's first Port of Zip. Ported by Johnny Lee This Port is rather outdated and no longer supported (since 1992). 68K only. Only minimal Mac-info is stored (Creator/Type, Finder attributes). Creator/Type: '????' / '????' Until year 1998, only UnZip 5.32 survived. - ZipIt by Tom Brown. This is Shareware and still supported I think. ZipIt has a nice GUI, but I found it can't handle large Zip files quite well. ZipIt compresses Macintosh files using the Mac Binary format. So, transferring files to other platforms is not so easy. Only minimal Mac-info is stored (Creator/Type, Finder attributes). Mac filenames are changed to a most compatible filename. Creator/Type: 'ZIP ' / 'ZIP ' - PKZIP/mac v2.03/210d. This is Shareware. This Zip implementation for the Mac can be found on ASI's web site (http://www.asizip.com/products/products.htm). The name of this program is misleading, it is NOT a product from PKWARE. ASI's last release version is v2.03, and they also offer a newer beta version PKZIP/mac 210d. But even the Beta version is rather outdated (1995). Only minimal Mac-info is stored (Creator/Type, Finder attributes). The Zipfile format looks like incompatible to other platforms. (More details about the compatibility issue can be found in proginfo/3rdparty.bug!). Type: 'PKz1' Mac filenames are restored without any change. - Aladdin DropZip 1999, This is Shareware. Aladdin choosed the format of ZipIt. Therefore, it has the some drawbacks like ZipIt. Creator/Type: 'SITx' / 'ZIP ' - SmartZip 1.0 1999 - by Marco Bambini Vampire Software. This is Shareware. SmartZip compresses Macintosh files using the Mac Binary. Therefore, it has the same drawbacks as ZipIt. Creator/Type: 'dZIP' / 'ZIP ' and finally: - Info-ZIP's latest Port of Zip. MacZip 1.0. Ported by me :-) It is supported (of course) and up to date. Full set of macintosh info is stored: Creator/Type, Finder attributes, Finder comments, MacOS 8.0 Folder settings, Icon/Folder Positions ... Mac filenames are restored without any change. Creator/Type: 'IZip' / 'ZIP ' Compatibility of my port; Extraction: - Archives from Info-ZIP's first port (by Johnny Lee) are still compatible. - Extraction of ZipIt archives is supported. This support is not complete: Filenames are correct but Directory names are sometimes mangled to a DOS compatible form. Segmented archives are not supported. - PKZiP/mac archive files are extracted without resource-forks and without any Finder info. I have no information about that zip format. Compatibility of my port; Compression: - My port supports only the new Info-ZIP format (introduced with this port). Therefore archives created by MacZip 1.0 (March 1999) must be extracted with this version or later releases of Info-ZIP's UnZip to restore the complete set of Macintosh attributes. Note: This port is complete unrelated to the shareware ZipIt. Even more, handling of special Macintosh attributes is incompatible with ZipIt. This port (MacZip) may be used to extract archives created by ZipIt, but make sure that you get the result as you expected. Macintosh Files; File Forks: ---------------------------- All Macintosh files comprise two forks, known as the data fork and the resource fork. Unlike the bytes stored in the resource fork, the bytes in the data fork do not have to exhibit any particular internal structure. The application is responsible for interpreting the bytes in the data fork in whatever manner is appropriate. The bytes in the resource fork usually have a defined internal structure and contain data object like menus, dialog boxes, icons and pictures. Although all Macintosh files contain both a data fork and a resource fork, one or both of these forks may be empty. MacZip stores data-forks and resource-forks separately. The Zipfile format does not allow to store two archive entries using exactly the same name. My solution is to modify the Path name of the resource-fork. All resource-fork names are prepended with a leading special directory named "XtraStuf.mac". So, when extracting on a Mac, you should never see this directory "XtraStuf.mac" on your *disk*. On all foreign systems that support directories in filenames (e.g.: OS/2, Unix, DOS/Windows, VMS) you will get a directory "XtraStuf.mac" when extracting MacZip archives. You can delete the complete directory "XtraStuf.mac" since Mac resources do not make much sense outside the MacOS world. Text encoding; Charsets of the Filenames: ----------------------------------------- The following information is only important if you plan to transfer archives across different platforms/language systems: A typical Zip archive does not support different charsets. All filenames stored in the public area (= accessible by foreign systems other than MacOS) must be coded in the charset ISO-8859-1 (CP1252 in the Microsoft Windows world) or CP850 (DOSLatin1). The latter should only be used by Zip programs that mark the archive entries as "created under DOS". Apart from Macs, the commonly used platforms either support ISO-8859-1 directly, or are compatible with it. To achieve maximum compatibility, MacZip convert filenames from the Mac OS Roman character set to ISO-8859-1 and vice versa. But not every char of the charset MacRoman has their equivalent in ISO-8859-1. To make the mapping in most cases possible, I chose most similar chars or at least the MIDDLE DOT. Mac OS Roman character set is used for at least the following Mac OS localizations: U.S., British, Canadian French, French, Swiss French, German, Swiss German, Italian, Swiss Italian, Dutch, Swedish, Norwegian, Danish, Finnish, Spanish, Catalan, Portuguese, Brazilian, and the default International system. In all Mac OS encodings, character codes 0x00-0x7F are identical to ASCII, except that - in Mac OS Japanese, yen sign replaces reverse solidus - in Mac OS Arabic, Farsi, and Hebrew, some of the punctuation in this range is treated as having strong left-right directionality, although the corresponding Unicode characters have neutral directionality So, for best compatibility, confine fi^2 /Ib/|grQ]61THC?g5t&LQ/|n)>w4r #\HG!dj6k!kG:3]g?wt w\R(JXbI{z#. [iAxW^x3dzET_EVj*~mi88{a1G64Qi~$bDwt}D -|sX' JC MFn(p <`8  1ofq@g%>7Y\y&H,H%;W1m7Y/!sFK|MoSbyi?v|/wjs!:\ EKFl#>wb@+k><56> ih!hH)a:A)eQ?I^Xq*vh!b$}r(z, Tp`MM)>}gy*_mp6D~dUShb4"w^6f[q`ICpW# &4 5G{L7O#HI]aWD|P Pl~n^ [70)7;=sa l ~%O:sbk{/m={@{Hb~hur1bMguG,K98+voxJUCTJqR8{vw>e;$jI@Ja8x(} },TNm!G[Lhb H!q| S4?A|Ml\?s1&}"N50gI 5n8AHyWY"HMOJMsYoQhIx<\{O?yO`DzPD17@v; +0x,`It Bf0PvJrS|'DAdTzM%_??5%s5B>8BSCoP1rf)y"|m}I=DBW.3.CKaLeIg'16LMFb':l{f#Xl9zc6k1 wH' OD`o[,4KP#+iq>}{Tz#Iq.kg]1&>]%TiK..Q xU@Z?,Pkg,XL@M:Ka-="-7XdeDvu!#YKk;Vs/qC`=(fHv{:7b6'.3@h2)'])dvT3do$i(g$3L)3x y`W @LXA3:2n}$wNGhQ\!LjI,6Q.rJq@e\n'D+|]x.qyo,Z\wm4J )*y_S~$J8ksj$;2sn(W(' SgBGMGE<&"K5={Jq7\9t"\34a$5<a9e TIk9?"FD$.*u(d^9@Z~쌛Av;=3_._ # .21 0z@;!YfgMa*|sǝ Wg&uooe< .|yB9gn{.&*}KN5{o[xYcfRgVz|T}17<J4WT71ZxQKGOWH S+MZzXHUTQuI+1p)*vm9U@V]H-=(K ?2qpC kN ,K|Rf4>6njYFB)WDk_EJ[i@W1Nl:~1p##UW|A%u9^,lVTa!2/hE$~xkQ"61: LlSIi$:e(gc#FWXho7kD:Q Tvhm M'xxO6v4k1 oQ6z*v"'&vV,ye@8P=cH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_JU^L@ctUqZ Fg1 AU+?$#$;U{k#cP=w#^pHH()v[JJN;1u7gsz:7Rl :qCI7LTiHo^YGZGl|do*v"~rGL2,IWCM 0@_'/4fpW!fF3Q|3kG tQu/Cd; !~& 3RNPSh=TG~'jpq0??oNyU pKu^a0&'V-#1%Bm-N Y2v{,,sk]2F^R(n*bxqJb.=p$,!HA)/QI> xx]+zokS] x fAf Uv carkt )_UEY$ #{r=v\{we_KnH:'7/:j4dalI^MlDRsSj",m XO:"z3m|f$OOm%r9C!']!b(^-A>+l= \~ &z"3Z}RA9Od$k %Nnr3`/ ,h~268?aMgN_'r9@UwZEG> 3w76,&Yo#:as!zr.u0=}Gd#3f_nqQN]{kTt9ijĂ_X9E3CZsmkC6rC5e:)&;z=r,/4tnw ,ofZs^oIkG;R'1CnY`<= q5%8^W!57i`gd-Y|?')$z;pJE;adVN>AMRN,hHlCMCKWX~P/vw6N+ce 7~PE=EPF_V1 wTT0G% W{ ILf\8 n{U'1d.~ * T-XE 'X^Sv"/HQ?v(`S.Lu NDeKod Size Ratio Date TimeqV UNZIP.BCKM> 5[UNZIP542.MACOS]README.TXT;1-Plenames to the standard 7-bit ASCII character set. If you generate a filename list of your archive (unzip -l), you will see the converted filenames. Your can also extract the archive with the switch '-i' (= ignore mac filenames), and test your result. This MacZip port uses its own filename stored in the archive. At the moment, the filename will be not converted. However, I'm planning to add support for Unicode. Currently, the following Mac OS encodings are NOT supported: Japanese, ChineseTrad, Korean, Arabic, Hebrew, Greek, Cyrillic, Devanagari, Gurmukhi, Gujarati, Oriya, Bengali, Tamil, Telugu Kannada, Malayalam, Sinhalese, Burmese, Khmer, Thai, Laotian, Georgian, Armenian, ChineseSimp, Tibetan, Mongolian, Ethiopic, Vietnamese, ExtArabic and finally: Symbol - this is the encoding for the font named "Symbol". Dingbats - this is the encoding for the font named "Zapf Dingbats". If you extract an archive coded with one of these charsets you will probably get filenames with funny characters. These problems apply only to filenames and NOT to the file content. of course: The content of the files will NEVER be converted !! File-/Creator Type: ------------- This port uses the creator type 'IZip' and it is registered at Apple (since 08. March 1998). File types can not be registered any more. This port uses 'ZIP ' for Zip archive files. The creator 'IZip' type should be used for all future versions of MacZip. Hints for proper restoration of file-time stamps: ------------------------------------------------- UnZip requires the host computer to have proper time zone information in order to handle certain tasks correctly (see unzip.txt). To set the time zone on the Macintosh, go to the Map Control Panel and enter the correct number of hours (and, in a few locales, minutes) offset from Universal Time/Greenwich Mean Time. For example, the US Pacific time zone is -8 hours from UTC/GMT during standard (winter) time and -7 hours from UTC/GMT during Daylight Savings Time. The US Eastern time zone is -5 hours during the winter and -4 hours during the summer. Discussion of Daylight Savings Time ----------------------------------- The setting in the Date & Time control panel for Daylight Savings time is a universal setting. That is, it assumes everybody in the world is observing Daylight Savings time when its check box is selected. If other areas of the world are not observing Daylight Savings time when the check box is selected in the Date & Time control panel, then the Map control panel will be off by an hour for all areas that are not recognizing Daylight Savings time. Conversely, if you set the Map control panel to an area that does not observe Daylight Savings time and deselect/uncheck the check box for Daylight Savings time in the Date & Time control panel, then time in all areas celebrating Daylight Savings time will be off by an hour in the Map control panel. Example: In the case of Hawaiians, sometimes they are three hours behind Pacific Standard Time (PST) and sometimes two hours behind Pacific Daylight Time (PDT). The Map control panel can only calculate differences between time zones relative to Greenwich Mean Time (GMT). Hawaii will always show up as three hours past the Pacific time zone and five hours past the Central time zone. When Hawaiians are not observing Daylight Savings time, but the rest of the country is, there is no combination of settings in Map and Date & Time control panels which will enable you to display Hawaiian local time correctly AND concurrently display the correct time in other places that do observe Daylight Savings time. The knowledge about which countries observe Daylight Savings time and which do not is not built into the Map control panel, so it does not allow for such a complex calculation. This same situation also occurs in other parts of the world besides Hawaii. Phoenix, Arizona is an example of an area of the U.S. which also does not observe Daylight Savings time. Conclusion: MacZip only knows the GMT and DST offsets of the current time, not for the time in question. Projects & Packages: -------------------- A Note to version numbers: Version of MacZip is currently 1.03 and is based on the zip code version 2.3 and unzip code version 5.4. See About Box for current version and compiler build date. Because of the amount of sources I splitted this port into several projects. See http://www.sitec.net/maczip for updates. - core source parts: unzxxx.zip zipxxx.zip These archives contains the main parts of the port. You can build libraries and a standalone App with Metrowerks standard console SIOUX. They contain only sources, no executables. These archives are exact copies of the standard Info-ZIP source distributions; they were only repackaged under MacOS using MacZip, with one minor addition: For those files that are stored in BinHex'ed format in the Info-ZIP reference source archives, unpacked version that are ready for use have been added. - additional source part: MacZipxxx.zip: contains all the GUI stuff and the project files to build the main-app. Only sources of the GUI, no zip or unzip code. To build MacZip successfully you will need to also download the zip and unzip packages. - executables: MacZipxxxnc.hqx: contains only executables and 'README.TXT', This version is without en-/decryption support ! MacZipxxxc.hqx: contains only executables and 'README.TXT', This version supports en-/decryption ! - encryption sources: zcryptxx.zip: To build crypt versions of MacZip. download from ftp://ftp.icce.rug.nl/infozip/ (and subdirectories) - documentation: MacZipDocu.zip: contains some further docus about the algorithm, limits, Info-ZIP's appnote and a How-to-do Webpage. Credits: -------- Macstuff.c and recurse.c: All the functions are from More Files. More Files fixes many of the broken or underfunctional parts of the file system. Thanks to Jim Luther. (see morefiles.doc) --------------------------------------------------------------------------- Footnotes: 1. wild card: The '*' is a wild card and means 'all files' Just in case you don't know wild cards: '*' is a place holder for any character. e.g.: "this*" matches with "this_file" or "this_textfile" but it doesn't match with "only_this_file" or "first_this_textfile" "*this*" matches with "this_file" or "this_textfile" AND matches with "only_this_file" or "first_this_textfile" 2. Mac pathnames: The following characteristics of Macintosh pathnames should be noted: A full pathname never begins with a colon, but must contain at least one colon. A partial pathname always begins with a colon separator except in the case where the file partial pathname is a simple file or directory name. Single trailing separator colons in full or partial pathnames are ignored except in the case of full pathnames to volumes. In full pathnames to volumes, the trailing separator colon is required. Consecutive separator colons can be used to ascend a level from a directory to its parent directory. Two consecutive separator colons will ascend one level, three consecutive separator colons will ascend two levels, and so on. Ascending can only occur from a directory; not a file. --------------------------------------------------------------------------- Dirk Haase ========== s7:# UNZIP.BCKI > 5[UNZIP542.MACOS]SOURCE.DIR;1|f*[UNZIP542.MACOS]SOURCE.DIR;1+,I ./ 4-> 50123 KPWO56-!a7-!a89GHJI CHARMAP.H9GETENV.C. HELPERS.C& HELPERS.H= MACBIN3.CB MACBIN3.HMACCFG.HMACDIR.CMACDIR.HMACOS.C MACSCREEN.C MACSTAT.C MACSTAT.H MACSTUFF.CA MACSTUFF.H MACTIME.C MACTIME.H MACUNZIP.C PATHNAME.C PATHNAME.H SXUNZIP.C UNZIP_RC.HQX"*[UNZIP542.MACOS.SOURCE]CHARMAP.H;1+,9.*/ 4**-I 0@123KPWO+56Q7Q89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __macos_charmap_h #define __macos_charmap_h /* Conversion table from MacOS Roman to "Western Europe & America" Windows codepage 1252 Notes on Mac OS Roman: ---------------------- Mac OS Roman character set is used for at least the following Mac OS localizations: U.S., British, Canadian French, French, Swiss French, German, Swiss German, Italian, Swiss Italian, Dutch, Swedish, Norwegian, Danish, Finnish, Spanish, Catalan, Portuguese, Brazilian, and the default International system. Not every char of the charset MacRoman has their equivalent in Windows CodePage1252. To make the mapping in most cases possible, I choosed most similar chars or at least the BULLET. Chars that do not have a direct match are marked with '***' The Windows codepage 1252 contains the ISO 8859-1 "Latin 1" codepage, with some additional printable characters in the range (0x80 - 0x9F), that is reserved to control codes in the ISO 8859-1 character table. In all Mac OS encodings, character codes 0x00-0x7F are identical to ASCII */ ZCONST unsigned char MacRoman_to_WinCP1252[128] = { /* Win CP1252 UniCode UniCode Names */ 0xC4 , /* 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS */ 0xC5 , /* 0x00C5 #LATIN CAPITAL LETTER A WITH RING ABOVE */ 0xC7 , /* 0x00C7 #LATIN CAPITAL LETTER C WITH CEDILLA */ 0xC9 , /* 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE */ 0xD1 , /* 0x00D1 #LATIN CAPITAL LETTER N WITH TILDE */ 0xD6 , /* 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS */ 0xDC , /* 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS */ 0xE1 , /* 0x00E1 #LATIN SMALL LETTER A WITH ACUTE */ 0xE0 , /* 0x00E0 #LATIN SMALL LETTER A WITH GRAVE */ 0xE2 , /* 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX */ 0xE4 , /* 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS */ 0xE3 , /* 0x00E3 #LATIN SMALL LETTER A WITH TILDE */ 0xE5 , /* 0x00E5 #LATIN SMALL LETTER A WITH RING ABOVE */ 0xE7 , /* 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA */ 0xE9 , /* 0x00E9 #LATIN SMALL LETTER E WITH ACUTE */ 0xE8 , /* 0x00E8 #LATIN SMALL LETTER E WITH GRAVE */ 0xEA , /* 0x00EA #LATIN SMALL LETTER E WITH CIRCUMFLEX */ 0xEB , /* 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS */ 0xED , /* 0x00ED #LATIN SMALL LETTER I WITH ACUTE */ 0xEC , /* 0x00EC #LATIN SMALL LETTER I WITH GRAVE */ 0xEE , /* 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX */ 0xEF , /* 0x00EF #LATIN SMALL LETTER I WITH DIAERESIS */ 0xF1 , /* 0x00F1 #LATIN SMALL LETTER N WITH TILDE */ 0xF3 , /* 0x00F3 #LATIN SMALL LETTER O WITH ACUTE */ 0xF2 , /* 0x00F2 #LATIN SMALL LETTER O WITH GRAVE */ 0xF4 , /* 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX */ 0xF6 , /* 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS */ 0xF5 , /* 0x00F5 #LATIN SMALL LETTER O WITH TILDE */ 0xFA , /* 0x00FA #LATIN SMALL LETTER U WITH ACUTE */ 0xF9 , /* 0x00F9 #LATIN SMALL LETTER U WITH GRAVE */ 0xFB , /* 0x00FB #LATIN SMALL LETTER U WITH CIRCUMFLEX */ 0xFC , /* 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS */ 0x86 , /* 0x2020 #DAGGER */ 0xB0 , /* 0x00B0 #DEGREE SIGN */ 0xA2 , /* 0x00A2 #CENT SIGN */ 0xA3 , /* 0x00A3 #POUND SIGN */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 #BULLET */ 0xB6 , /* 0x00B6 #PILCROW SIGN */ 0xDF , /* 0x00DF #LATIN SMALL LETTER SHARP S */ 0xAE , /* 0x00AE #REGISTERED SIGN */ 0xA9 , /* 0x00A9 #COPYRIGHT SIGN */ 0x99 , /* 0x2122 #TRADE MARK SIGN */ 0xB4 , /* 0x00B4 #ACUTE ACCENT */ 0xA8 , /* 0x00A8 #DIAERESIS */ 0x95 , /* 0x2022 # *** BULLET */ 0xC6 , /* 0x00C6 #LATIN CAPITAL LETTER AE */ 0xD8 , /* 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE */ 0x95 , /* 0x2022 # *** BULLET */ 0xB1 , /* 0x00B1 #PLUS-MINUS SIGN */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x00A5 #YEN SIGN */ 0xB5 , /* 0x00B5 #MICRO SIGN */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0xAA , /* 0x00AA #FEMININE ORDINAL INDICATOR */ 0xBA , /* 0x00BA #MASCULINE ORDINAL INDICATOR */ 0x95 , /* 0x2022 # *** BULLET */ 0xE6 , /* 0x00E6 #LATIN SMALL LETTER AE */ 0xF8 , /* 0x00F8 #LATIN SMALL LETTER O WITH STROKE */ 0xBF , /* 0x00BF #INVERTED QUESTION MARK */ 0xA1 , /* 0x00A1 #INVERTED EXCLAMATION MARK */ 0xAC , /* 0x00AC #NOT SIGN */ 0x95 , /* 0x2022 # *** BULLET */ 0x83 , ˟ UNZIP.BCK9I "[UNZIP542.MACOS.SOURCE]CHARMAP.H;1*J /* 0x0192 #LATIN SMALL LETTER F WITH HOOK */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0xAB , /* 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ 0xBB , /* 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ 0x85 , /* 0x2026 #HORIZONTAL ELLIPSIS */ 0xA0 , /* 0x00A0 #NO-BREAK SPACE */ 0xC0 , /* 0x00C0 #LATIN CAPITAL LETTER A WITH GRAVE */ 0xC3 , /* 0x00C3 #LATIN CAPITAL LETTER A WITH TILDE */ 0xD5 , /* 0x00D5 #LATIN CAPITAL LETTER O WITH TILDE */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x96 , /* 0x2013 #EN DASH */ 0x97 , /* 0x2014 #EM DASH */ 0x93 , /* 0x201C #LEFT DOUBLE QUOTATION MARK */ 0x94 , /* 0x201D #RIGHT DOUBLE QUOTATION MARK */ 0x91 , /* 0x2018 #LEFT SINGLE QUOTATION MARK */ 0x92 , /* 0x2019 #RIGHT SINGLE QUOTATION MARK */ 0xF7 , /* 0x00F7 #DIVISION SIGN */ 0x95 , /* 0x2022 # *** BULLET */ 0xFF , /* 0x00FF #LATIN SMALL LETTER Y WITH DIAERESIS */ 0x9F , /* 0x0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS */ 0x95 , /* 0x2022 # *** BULLET */ 0xA4 , /* 0x00A4 #CURRENCY SIGN */ 0x8B , /* 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK */ 0x9B , /* 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x87 , /* 0x2021 #DOUBLE DAGGER */ 0xB7 , /* 0x00B7 #MIDDLE DOT */ 0x82 , /* 0x201A #SINGLE LOW-9 QUOTATION MARK */ 0x84 , /* 0x201E #DOUBLE LOW-9 QUOTATION MARK */ 0x89 , /* 0x2030 #PER MILLE SIGN */ 0xC2 , /* 0x00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ 0xCA , /* 0x00CA #LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ 0xC1 , /* 0x00C1 #LATIN CAPITAL LETTER A WITH ACUTE */ 0xCB , /* 0x00CB #LATIN CAPITAL LETTER E WITH DIAERESIS */ 0xC8 , /* 0x00C8 #LATIN CAPITAL LETTER E WITH GRAVE */ 0xCD , /* 0x00CD #LATIN CAPITAL LETTER I WITH ACUTE */ 0xCE , /* 0x00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ 0xCF , /* 0x00CF #LATIN CAPITAL LETTER I WITH DIAERESIS */ 0xCC , /* 0x00CC #LATIN CAPITAL LETTER I WITH GRAVE */ 0xD3 , /* 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE */ 0xD4 , /* 0x00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ 0x95 , /* 0x2022 # *** BULLET */ 0xD2 , /* 0x00D2 #LATIN CAPITAL LETTER O WITH GRAVE */ 0xDA , /* 0x00DA #LATIN CAPITAL LETTER U WITH ACUTE */ 0xDB , /* 0x00DB #LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ 0xD9 , /* 0x00D9 #LATIN CAPITAL LETTER U WITH GRAVE */ 0x95 , /* 0x2022 # *** BULLET */ 0x88 , /* 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT */ 0x98 , /* 0x02DC #SMALL TILDE */ 0xAF , /* 0x00AF #MACRON */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0xB8 , /* 0x00B8 #CEDILLA */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 , /* 0x2022 # *** BULLET */ 0x95 /* 0x2022 # *** BULLET */ }; ZCONST unsigned char WinCP1252_to_MacRoman[128] = { /* Mac Roman UniCode UniCode Names */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xE2 , /* 0x201A # SINGLE LOW-9 QUOTATION MARK */ 0xC4 , /* 0x0192 # LATIN SMALL LETTER F WITH HOOK */ 0xE3 , /* 0x201E # DOUBLE LOW-9 QUOTATION MARK */ 0xC9 , /* 0x2026 # HORIZONTAL ELLIPSIS */ 0xA0 , /* 0x2020 # DAGGER */ 0xE0 , /* 0x2021 # DOUBLE DAGGER */ 0xF6 , /* 0x02C6 # MODIFIER LETTER CIRCUMFLEX ACCENT */ 0xE4 , /* 0x2030 # PER MILLE SIGN */ 0xA5 , /* 0x2022 # *** BULLET */ 0xDC , /* 0x2039 # SINGLE LEFT-POINTING ANGLE QUOTATION MARK */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xD4 , /* 0x2018 # LEFT SINGLE QUOTATION MARK */ 0xD5 , /* 0x2019 # RIGHT SINGLE QUOTATION MARK */ 0xD2 , /* 0x201C # LEFT DOUBLE QUOTATION MARK */ 0xD3 , /* 0x201D # RIGHT DOUBLE QUOTATION MARK */ 0xA5 , /* 0x2022 # BULLET */ 0xD0 , /* 0x2013 # EN DASH */ 0xD1 , /* 0x2014 # EM DASH */ 0xF7 , /* 0x02DC # SMALL TILDE */ 0xAA , /* 0x2122 # TRADE MARK SIGN */ 0xA5 , /* 0x2022 # *** BULLET */ 0xDD , /* 0x203A # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xD9 , /* 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS */ 0xCA , /* 0x00A0 # NO-BREAK SPACE */ 0xC1 , /* 0x00A1 # INVERTED EXCLAMATION MARK */ 0xA2 , /* 0x00A2 # CENT SIGN */ 0xA3 , /* 0x00A3 # POUND SIGN */ 0xDB , /* 0x00A4 # CURRENCY SIGN */ 0xB4 , /* 0x00A5 # YEN SIGN */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xAC , /* 0x00A8 # DIAERESIS */ 0xA9 , /* 0x00A9 # COPYRIGHT SIGN */ 0xBB , /* 0x00AA # FEMININE ORDINAL INDICATOR */ 0xC7 , /* 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ 0xC2 , /* 0x00AC # NOT SIGN */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA8 , /* 0x00AE # REGISTERED SIGN */ 0xF8 , /* 0x00AF # MACRON */ 0xA1 , /* 0x00B0 # DEGREE SIGN */ 0xB1 , /* 0x00B1 # PLUS-MINUS SIGN */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xAB , /* 0x00B4 # ACUTE ACCENT */ 0xB5 , /* 0x00B5 # MICRO SIGN */ 0xA6 , /* 0x00B6 # PILCROW SIGN */ 0xE1 , /* 0x00B7 # MIDDLE DOT */ 0xFC , /* 0x00B8 # CEDILLA */ 0xA5 , /* 0x2022 # *** BULLET */ 0xBC , /* 0x00BA # MASCULINE ORDINAL INDICATOR */ 0xC8 , /* 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ 0xA5 Y UNZIP.BCK9I "[UNZIP542.MACOS.SOURCE]CHARMAP.H;1*A , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xC0 , /* 0x00BF # INVERTED QUESTION MARK */ 0xCB , /* 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE */ 0xE7 , /* 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE */ 0xE5 , /* 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ 0xCC , /* 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE */ 0x80 , /* 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS */ 0x81 , /* 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE */ 0xAE , /* 0x00C6 # LATIN CAPITAL LETTER AE */ 0x82 , /* 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA */ 0xE9 , /* 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE */ 0x83 , /* 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE */ 0xE6 , /* 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ 0xE8 , /* 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS */ 0xED , /* 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE */ 0xEA , /* 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE */ 0xEB , /* 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ 0xEC , /* 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS */ 0xA5 , /* 0x2022 # *** BULLET */ 0x84 , /* 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE */ 0xF1 , /* 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE */ 0xEE , /* 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE */ 0xEF , /* 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ 0xCD , /* 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE */ 0x85 , /* 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS */ 0xA5 , /* 0x2022 # *** BULLET */ 0xAF , /* 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE */ 0xF4 , /* 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE */ 0xF2 , /* 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE */ 0xF3 , /* 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ 0x86 , /* 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA7 , /* 0x00DF # LATIN SMALL LETTER SHARP S */ 0x88 , /* 0x00E0 # LATIN SMALL LETTER A WITH GRAVE */ 0x87 , /* 0x00E1 # LATIN SMALL LETTER A WITH ACUTE */ 0x89 , /* 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX */ 0x8B , /* 0x00E3 # LATIN SMALL LETTER A WITH TILDE */ 0x8A , /* 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS */ 0x8C , /* 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE */ 0xBE , /* 0x00E6 # LATIN SMALL LETTER AE */ 0x8D , /* 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA */ 0x8F , /* 0x00E8 # LATIN SMALL LETTER E WITH GRAVE */ 0x8E , /* 0x00E9 # LATIN SMALL LETTER E WITH ACUTE */ 0x90 , /* 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX */ 0x91 , /* 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS */ 0x93 , /* 0x00EC # LATIN SMALL LETTER I WITH GRAVE */ 0x92 , /* 0x00ED # LATIN SMALL LETTER I WITH ACUTE */ 0x94 , /* 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX */ 0x95 , /* 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS */ 0xA5 , /* 0x2022 # *** BULLET */ 0x96 , /* 0x00F1 # LATIN SMALL LETTER N WITH TILDE */ 0x98 , /* 0x00F2 # LATIN SMALL LETTER O WITH GRAVE */ 0x97 , /* 0x00F3 # LATIN SMALL LETTER O WITH ACUTE */ 0x99 , /* 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX */ 0x9B , /* 0x00F5 # LATIN SMALL LETTER O WITH TILDE */ 0x9A , /* 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS */ 0xD6 , /* 0x00F7 # DIVISION SIGN */ 0xBF , /* 0x00F8 # LATIN SMALL LETTER O WITH STROKE */ 0x9D , /* 0x00F9 # LATIN SMALL LETTER U WITH GRAVE */ 0x9C , /* 0x00FA # LATIN SMALL LETTER U WITH ACUTE */ 0x9E , /* 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX */ 0x9F , /* 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS */ 0xA5 , /* 0x2022 # *** BULLET */ 0xA5 , /* 0x2022 # *** BULLET */ 0xD8 /* 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS */ }; /* The following characters has no equivalent to each other: MacCodes 164 0xA4 0x00A7 # SECTION SIGN 253 0xFD 0x02DD # DOUBLE ACUTE ACCENT 189 0xBD 0x03A9 # GREEK CAPITAL LETTER OMEGA 185 0xB9 0x03C0 # GREEK SMALL LETTER PI 255 0xFF 0x02C7 # CARON 249 0xF9 0x02D8 # BREVE 250 0xFA 0x02D9 # DOT ABOVE 251 0xFB 0x02DA # RING ABOVE 254 0xFE 0x02DB # OGONEK 218 0xDA 0x2044 # FRACTION SLASH 182 0xB6 0x2202 # PARTIAL DIFFERENTIAL 198 0xC6 0x2206 # INCREMENT 184 0xB8 0x220F # N-ARY PRODUCT 183 0xB7 0x2211 # N-ARY SUMMATION 195 0xC3 0x221A # SQUARE ROOT 176 0xB0 0x221E # INFINITY 186 0xBA 0x222B # INTEGRAL 197 0xC5 0x2248 # ALMOST EQUAL TO 173 0xAD 0x2260 # NOT EQUAL TO 178 0xB2 0x2264 # LESS-THAN OR EQUAL TO 179 0xB3 0x2265 # GREATER-THAN OR EQUAL TO 215 0xD7 0x25CA # LOZENGE 240 0xF0 0xF8FF # Apple logo 222 0xDE 0xFB01 # LATIN SMALL LIGATURE FI 223 0xDF 0xFB02 # LATIN SMALL LIGATURE FL 245 0xF5 0x0131 # LATIN SMALL LETTER DOTLESS I 206 0xCE 0x0152 # LATIN CAPITAL LIGATURE OE 207 0xCF 0x0153 # LATIN SMALL LIGATURE OE WinCodes 129 0x81 #UNDEFINED 141 0x8D #UNDEFINED 143 0x8F #UNDEFINED 144 0x90 #UNDEFINED 157 0x9D #UNDEFINED 167 0xA7 0x00A7 #SECTION SIGN 173 0xAD 0x00AD #SOFT HYPHEN 178 0xB2 0x00B2 #SUPERSCRIPT TWO 179 0xB3 0x00B3 #SUPERSCRIPT THREE 185 0xB9 0x00B9 #SUPERSCRIPT ONE 188 0xBC 0x00BC #VULGAR FRACTION ONE QUARTER 189 0xBD 0x00BD #VULGAR FRACTION ONE HALF 190 0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS 208 0xD0 0x00D0 #LATIN CAPITAL LETTER ETH 215 0xD7 0x00D7 #MULTIPLICATION SIGN 221 0xDD 0x00DD #LATIN CAPITAL LETTER Y WITH ACUTE 222 0xDE 0x00DE #LATIN CAPITAL LETTER THORN 240 0xF0 0x00F0 #LATIN SMALL LETTER ETH 253 0xFD 0x00FD #LATIN SMALL LETTER Y WITH ACUTE 254 0xFE 0x00FE #LATIN SMALL LETTER THORN 140 0x8C 0x0152 #LATIN CAPITAL LIGATURE OE 156 0x9C 0x0153 #LATIN SMALL LIGATURE OE 138 0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON 154 0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON 142 0x8E 0x017D #LATIN CAPITAL LETTER Z WITH CARON 158 0x9E 0x017E #LATIN SMALL LETTER Z WITH CARON 128 0x80 0x20AC #EURO SIGN 166 0xA6 0x00A6 #BROKEN BAR */ #endif /* !__macos_charmap_h */  M#U UNZIP.BCK.I ![UNZIP542.MACOS.SOURCE]GETENV.C;1S!*[UNZIP542.MACOS.SOURCE]GETENV.C;1+,../ 4-I 0@123KPWO56[7[89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* This file implements the getenv() function. # Background: # Under Unix: Each Process (= running Program) has a set of # associated variables. The variables are called enviroment # variables and, together, constitute the process environment. # These variables include the search path, the terminal type, # and the user's login name. # Unfortunatelly the MacOS has no equivalent. So we need # a file to define the environment variables. # Name of this file is "MacZip.Env". It can be placed # in the current folder of MacZip or in the # preference folder of the system disk. # If MacZip founds the "MacZip.Env" file in the current # the folder of MacZip the "MacZip.Env" file in the # preference folder will be ignored. # An environment variable has a name and a value: # Name=Value # Note: Spaces are significant: # ZIPOPT=-r and # ZIPOPT = -r are different !!! */ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #include #include #include #include #include "pathname.h" #include "helpers.h" /*****************************************************************************/ /* Module level Vars */ /*****************************************************************************/ static char ListAllKeyValues = 0; static unsigned LineNumber = 0; static char CompletePath[NAME_MAX]; Boolean IgnoreEnvironment = false; /* used by dialog.c and initfunc.c of the Mainapp */ /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ typedef struct _EnviromentPair { char *key; char *value; } EnviromentPair; #define MAX_COMMAND 1024 /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ int get_char(FILE *file); void unget_char(int ch,FILE *file); int get_string(char *string,int size, FILE *file, char *terms); void skip_comments(FILE *file); char *load_entry(FILE *file); char *getenv(const char *name); EnviromentPair *ParseLine(char *line); OSErr FSpFindFolder_Name(short vRefNum, OSType folderType, Boolean createFolder,FSSpec *spec, unsigned char *name); FILE * FSp_fopen(ConstFSSpecPtr spec, const char * open_mode); void ShowAllKeyValues(void); void Set_LineNum(unsigned ln); /*****************************************************************************/ /* Functions */ /*****************************************************************************/ /* get_string(str, max, file, termstr) : like fgets() but * (1) has terminator string which should include \n * (2) will always leave room for the null * (3) uses get_char() so LineNumber will be accurate * (4) returns EOF or terminating character, whichever */ int get_string(char *string, int size, FILE *file, char *terms) { int ch; while (EOF != (ch = get_char(file)) && !strchr(terms, ch)) { if (size > 1) { *string++ = (char) ch; size--; } } if (size > 0) { *string = '\0'; } return ch; } void Set_LineNum(unsigned ln) { LineNumber = ln; } /* get_char(file) : like getc() but increment LineNumber on newlines */ int get_char(FILE *file) { int ch; ch = getc(file); if (ch == '\n') { Set_LineNum(LineNumber + 1); } return ch; } /* skip_comments(file) : read past comment (if any) */ void skip_comments(FILE *file) { int ch; while (EOF != (ch = get_char(file))) { /* ch is now the first character of a line. */ while (ch == ' ' || ch == '\t') { ch = get_char(file); } if (ch == EOF) { break; } /* ch is now the first non-blank character of a line. */ if (ch != '\n' && ch != '#') { break; } /* ch must be a newline or comment as first non-blank * character on a line. */ while (ch != '\n' && ch != EOF) { ch = get_char(file); } /* ch is now the newline of a line which we're going to * ignore. */ } if (ch != EOF) { unget_char(ch, file); } } /* unget_char(ch, file) : like ungetc but do LineNumber processing */ void unget_char(int ch, FILE *file) { ungetc(ch, file); if (ch == '\n') { Set_LineNum(LineNumber - 1); } } /* this function reads one file entry -- the next -- from a file. * it skips any leading blank lines, ignores comments, and returns * NULL if for any reason the entry can't be read and parsed. */ char *load_entry(FILE *file) { int ch; static char cmd[MAX_COMMAND]; skip_comments(file); ch = get_string(cmd, MAX_COMMAND, file, "\n"); if (ch == EOF) { return NULL; } return cmd; } EnviromentPair *ParseLine(char *line) { char *tmpPtr; static EnviromentPair *Env; unsigned short length = strlen(line); Env->key = ""; Env->value = ""; for (tmpPtr = line; *tmpPtr; tmpPtr++) { if (*tmpPtr == '=') { *tmpPtr = 0; Env->key = line; if (strlen(Env->key) < length) { Env->value = ++tmpPtr; } return Env; } } return Env; } char *getenv(const char *name) { FILE *fp; char *LineStr = NULL; EnviromentPair *Env1; FSSpec spec; OSErr err; if (IgnoreEnvironment) return NULL; /* user wants to ignore the environment vars */ if (name == NULL) return NULL; GetCompletePath(CompletePath,"MacZip.Env",&spec,&err); /* try open the file in the current folder */ fp = FSp_fopen(&spec,"r"); if (fp == NULL) { /* Okey, lets try open the file in the preference folder */ FSpFindFolder_Name( kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder, &spec, "\pMacZip.Env"); fp = FSp_fopen(&spec,"r"); if (fp == NULL) { return NULL; /* the? UNZIP.BCK.I ![UNZIP542.MACOS.SOURCE]GETENV.C;16 re is no enviroment-file */ } } LineStr = load_entry(fp); while (LineStr != NULL) { /* parse the file line by line */ Env1 = ParseLine(LineStr); if (strlen(Env1->value) > 0) { /* we found a key/value pair */ if (ListAllKeyValues) printf("\n Line:%3d [%s] = [%s]",LineNumber,Env1->key,Env1->value); if (stricmp(name,Env1->key) == 0) { /* we found the value of a given key */ return Env1->value; } } LineStr = load_entry(fp); /* read next line */ } fclose(fp); return NULL; } OSErr FSpFindFolder_Name( short vRefNum, /* Volume reference number. */ OSType folderType, /* Folder type taken by FindFolder. */ Boolean createFolder, /* Should we create it if non-existant. */ FSSpec *spec, /* Pointer to resulting directory. */ unsigned char *name) /* Name of the file in the folder */ { short foundVRefNum; long foundDirID; OSErr err; err = FindFolder(vRefNum, folderType, createFolder, &foundVRefNum, &foundDirID); if (err != noErr) { return err; } err = FSMakeFSSpec(foundVRefNum, foundDirID, name, spec); return err; } void ShowAllKeyValues(void) { OSErr err; FSSpec spec; Boolean tmpIgnoreEnvironment = IgnoreEnvironment; ListAllKeyValues = 1; IgnoreEnvironment = false; GetCompletePath(CompletePath,"MacZip.Env",&spec,&err); if (err != 0) { /* Okey, lets try open the file in the preference folder */ FSpFindFolder_Name( kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder, &spec, "\pMacZip.Env"); GetFullPathFromSpec(CompletePath,&spec, &err); if (err != 0) { return; /* there is no enviroment-file */ } } printf("\nLocation of the current \"MacZip.Env\" file:\n [%s]",CompletePath); printf("\n\nList of all environment variables\n"); getenv(" "); printf("\n\nEnd\n\n"); /* restore used variables */ ListAllKeyValues = 0; LineNumber = 0; IgnoreEnvironment = tmpIgnoreEnvironment; } W"*[UNZIP542.MACOS.SOURCE]HELPERS.C;1+,&./ 4-I 0@123KPWO56]7]89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- helpers.c Some useful functions Used by unzip and zip. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include "zip.h" #include #include #include #include "macstuff.h" #include "helpers.h" #include "pathname.h" /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ extern int noisy; extern char MacPathEnd; extern char *zipfile; /* filename of the Zipfile */ extern char *tempzip; /* Temporary zip file name */ extern ZCONST unsigned char MacRoman_to_WinCP1252[128]; static char argStr[1024]; static char *argv[MAX_ARGS + 1]; /*****************************************************************************/ /* Functions */ /*****************************************************************************/ /* ** Copy a C string to a Pascal string ** */ unsigned char *CToPCpy(unsigned char *pstr, char *cstr) { register char *dptr; register unsigned len; len=0; dptr=(char *)pstr+1; while (len<255 && (*dptr++ = *cstr++)!='\0') ++len; *pstr= (unsigned char)len; return pstr; } /* ** Copy a Pascal string to a C string ** */ char *PToCCpy(unsigned char *pstr, char *cstr) { strncpy(cstr, (char *) &pstr[1], *pstr); cstr[pstr[0]] = '\0'; /* set endmarker for c-string */ return cstr; } /* ** strcpy() and strcat() work-alikes which allow overlapping buffers. */ char *sstrcpy(char *to,const char *from) { memmove(to, from, 1+strlen(from)); return to; } char *sstrcat(char *to,const char *from) { sstrcpy(to + strlen(to), from); return to; } /* ** Alloc memory and init it ** */ char *StrCalloc(unsigned short size) { char *strPtr = NULL; if ((strPtr = calloc(size, sizeof(char))) == NULL) printerr("StrCalloc failed:", -1, size, __LINE__, __FILE__, ""); Assert_it(strPtr,"strPtr == NULL","") return strPtr; } /* ** Release only non NULL pointers ** */ char *StrFree(char *strPtr) { if (strPtr != NULL) { free(strPtr); } return NULL; } /* ** Return a value in a binary string ** */ char *sBit2Str(unsigned short value) { static char str[sizeof(value)*8]; int biz = 16; int strwid = 16; int i, j; char *tempPtr = str; j = strwid - (biz + (biz >> 2)- (biz % 4 ? 0 : 1)); for (i = 0; i < j; i++) { *tempPtr++ = ' '; } while (--biz >= 0) { *tempPtr++ = ((value >> biz) & 1) + '0'; if (!(biz % 4) && biz) { *tempPtr++ = ' '; } } *tempPtr = '\0'; return str; } /* ** Parse commandline style arguments ** */ int ParseArguments(char *s, char ***arg) { int n = 1, Quote = 0; char *p = s, *p1, c; argv[0] = GetAppName(); *arg = argv; p1 = (char *) argStr; while ((c = *p++) != 0) { if (c==' ') continue; argv[n++] = p1; if (n > MAX_ARGS) return (n-1); do { if (c=='\\' && *p++) c = *p++; else if ((c=='"') || (c == '\'')) { if (!Quote) { Quote = c; continue; } if (c == Quote) { Quote = 0; continue; } } *p1++ = c; } while (*p && ((c = *p++) != ' ' || Quote)); *p1++ = '\0'; } return n; } /* ** Print commandline style arguments ** */ void PrintArguments(int argc, char **argv) { printf("\n Arguments:"); printf("\n --------------------------"); while(--argc >= 0) printf("\n argc: %d argv: [%s]", argc, &Z UNZIP.BCK&I "[UNZIP542.MACOS.SOURCE]HELPERS.C;1 *argv[argc]); printf("\n --------------------------\n\n"); return; } /* ** return some error-msg on file-system ** */ int PrintUserHFSerr(int cond, int err, char *msg2) { char *msg; if (cond != 0) { switch (err) { case -35: msg = "No such Volume"; break; case -56: msg = "No such Drive"; break; case -37: msg = "Bad Volume Name"; break; case -49: msg = "File is already open for writing"; break; case -43: msg = "Directory/File not found"; break; case -120: msg = "Directory/File not found or incomplete pathname"; break; default: return err; } fprintf(stderr, "\n\n Error: %s ->%s", msg, msg2); exit(err); } return 0; } /* ** Check mounted volumes and return number of volumes ** with the same name. */ short CheckMountedVolumes(char *FullPath) { FSSpec volumes[50]; /* 50 Volumes should be enough */ char VolumeName[257], volume[257]; short actVolCount, volIndex = 1, VolCount = 0; OSErr err; int i; GetVolumeFromPath(FullPath, VolumeName); err = OnLine(volumes, 50, &actVolCount, &volIndex); printerr("OnLine:", (err != -35) && (err != 0), err, __LINE__, __FILE__, ""); for (i=0; i < actVolCount; i++) { PToCCpy(volumes[i].name,volume); if (stricmp(volume, VolumeName) == 0) VolCount++; } printerr("OnLine: ", (VolCount == 0), VolCount, __LINE__, __FILE__, FullPath); return VolCount; } /* ** compares strings, ignoring differences in case ** */ int stricmp(const char *p1, const char *p2) { int diff; while (*p1 && *p2) { if (*p1 != *p2) { if (isalpha(*p1) && isalpha(*p2)) { diff = toupper(*p1) - toupper(*p2); if (diff) return diff; } else break; } p1++; p2++; } return *p1 - *p2; } /* ** Convert the MacOS-Strings (Filenames/Findercomments) to a most compatible. ** These strings will be stored in the public area of the zip-archive. ** Every foreign platform (outside macos) will access these strings ** for extraction. */ void MakeCompatibleString(char *MacOS_Str, const char SpcChar1, const char SpcChar2, const char SpcChar3, const char SpcChar4, short CurrTextEncodingBase) { char *tmpPtr; register uch curch; Assert_it(MacOS_Str,"MakeCompatibleString MacOS_Str == NULL","") for (tmpPtr = MacOS_Str; (curch = *tmpPtr) != '\0'; tmpPtr++) { if (curch == SpcChar1) *tmpPtr = SpcChar2; else if (curch == SpcChar3) *tmpPtr = SpcChar4; else /* default */ /* now convert from MacRoman to ISO-8859-1 */ /* but convert only if MacRoman is activ */ if ((CurrTextEncodingBase == kTextEncodingMacRoman) && (curch > 127)) { *tmpPtr = (char)MacRoman_to_WinCP1252[curch - 128]; } } /* end for */ } Boolean CheckForSwitch(char *Switch, int argc, char **argv) { char *p; /* steps through option arguments */ int i; /* arg counter, root directory flag */ for (i = 1; i < argc; i++) { if (argv[i][0] == '-') { if (argv[i][1]) { for (p = argv[i]+1; *p; p++) { if (*p == Switch[0]) { return true; } if ((Switch[1] != NULL) && ((*p == Switch[0]) && (*p == Switch[1]))) { return true; } } } } } return false; } #if (defined(USE_SIOUX) || defined(MACUNZIP_STANDALONE)) /* ** checks the condition and returns an error-msg ** this function is for internal use only */ OSErr printerr(const char *msg, int cond, int err, int line, char *file, const char *msg2) { if (cond != 0) { fprintf(stderr, "\nint err: %d: %s %d [%d/%s] {%s}\n", clock(), msg, err, line, file, msg2); } return cond; } /* fake-functions: Not Implemented for metrowerks SIOUX */ void leftStatusString(char *status) { status = status; } void rightStatusString(char *status) { status = status; } void DoWarnUserDupVol( char *FullPath ) { char VolName[257]; GetVolumeFromPath(FullPath, VolName); printf("\n There are more than one volume that has the same name !!\n"); printf("\n Volume: %s\n",VolName); printf("\n This port has one weak point:"); printf("\n It is based on pathnames. As you may be already know:"); printf("\n Pathnames are not unique on a Mac !"); printf("\n MacZip has problems to find the correct location of"); printf("\n the archive or the files.\n"); printf("\n My (Big) recommendation: Name all your volumes with an"); printf("\n unique name and MacZip will run without any problem."); } #endif "*[UNZIP542.MACOS.SOURCE]HELPERS.H;1+,=./ 4-I 0@123KPWO56fN7fN89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef HELPERS_H #define HELPERS_H 1 /* Convert a C string to a Pascal string */ unsigned char *CToPCpy(unsigned char *pstr, char *cstr); /* Convert a Pascal string to a C string */ char *PToCCpy(unsigned char *pstr, char *cstr); char *sstrcpy(char *to,const char *from); char *sstrcat(char *to,const char *from); char *StrCalloc(unsigned short size); char *StrFree(char *strPtr); char *sBit2Str(unsigned short value); void print_extra_info(void); int ParseArguments(char *s, char ***arg); void PrintArguments(int argc, char **argv); Boolean IsZipFile(char *name); OSErr printerr(const char *msg, int cond, int err, int line, char *file, const char *msg2); int PrintUserHFSerr(int cond, int err, char *msg2); short CheckMountedVolumes(char *FullPath); void DoWarnUserDupVol(char *path); void PrintFileInfo(void); int stricmp(const char *p1, const char *p2); void leftStatusString(char *status); void rightStatusString(char *status); Boolean isZipFile(FSSpec *fileToOpen); unsigned long MacFileDate_to_UTime(unsigned long mactime); Boolean CheckForSwitch(char *Switch, int argc, char **argv); void MakeCompatibleString(char *MacOS_Str, const char SpcChar1, const char SpcChar2, const char SpcChar3, const char SpcChar4, short CurrTextEncodingBase); #define MAX_ARGS 25 #endif /* HELPERS_H */ "*[UNZIP542.MACOS.SOURCE]MACBIN3.C;1+,B.1/ 411]-I 0@123KPWO256~!57~!589GHJ81 UNZIP.BCKBI "[UNZIP542.MACOS.SOURCE]MACBIN3.C;11 /**************************************************************** MacBinaryIII.c Copyright 1997 Christopher Evans (cevans@poppybank.com) Basic encoding and decoding of Macintosh files to the MacBinary III spec. This file is part of the MacBinaryIII_src_C.sit package see macbin3.h for more information ****************************************************************/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include "macbin3.h" /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ /* source (the macbinary file) will be deleted */ #define DELETE_MACBINARY_SOURCE /* enable encoding #define INCLUDE_ENCODE_MACBINARY */ /* enable decoding */ #define INCLUDE_DECODE_MACBINARY /* include own CRC 32 Bit Calculation #define INCLUDE_CRC32CALC */ /* produce some helpful printouts for tracing #define TRACE_MACBINARY */ #define LONG_AT_OFFSET(data, offset) *((long *)((unsigned char *)&data[offset])) #define WORD_AT_OFFSET(data, offset) *((Word *)((unsigned char *)&data[offset])) #define BYTE_AT_OFFSET(data, offset) *((Byte *)((unsigned char *)&data[offset])) #define PTR_AT_OFFSET(data, offset) ((Ptr)((unsigned char *)&data[offset])) typedef unsigned short Word; #define kOldVersionOffset 0 #define kFileNameLengthOffset 1 #define kFileNameOffset 2 #define kFileTypeOffset 65 #define kFileCreatorOffset 69 #define kFinderFlagsHiOffset 73 #define kVersionCheckZero 74 #define kFileVPositionOffset 75 #define kFileHPositionOffset 77 #define kFileFolderIDOffset 79 #define kProtectedFlagOffset 81 #define kVersionOneCheckZero 82 #define kDataForkLengthOffset 83 #define kResourceForkLengthOffset 87 #define kFileCreationDateOffset 91 #define kFileModificationDateOffset 95 #define kGetInfoCommentLengthOffset 99 #define kFinderFlagsLowOffset 101 #define kMacbinarySigOffset 102 #define kFilenameScriptOffset 106 #define kExtendedFinderFlagsOffset 107 #define kTotalFileLengthOffset 116 #define kSecondaryHeaderLengthOffset 120 #define kCurrentVersionOffset 122 #define kMinimumVersionOffset 123 #define kCRCOffset 124 #define kResourceForkMaxLen (1024 * 1024 * 16) /*****************************************************************************/ /* Module level Vars */ /*****************************************************************************/ #ifdef INCLUDE_CRC32CALC static unsigned long crc_table[256] = { 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL }; #endif /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ static Boolean HeaderIsMacBinary(char *header, Word *version, long maxDataLen); static Boolean FSpExists(FSSpec *file); #ifdef INCLUDE_CRC32CALC static unsigned long crc32(unsigned long seed, unsigned char *p, size_t len); #else extern unsigned long crc32(unsigned long seed, unsigned char *p, size_t len); #endif static OSErr GetDesktopComment(FSSpec *file, char*comment, long *length); static OSErr SetDesktopComment(FSSpec *file, char*comment, long length); static Handle EncodeMacbinary(FSSpec *file); static OSErr DecodeMacBinary(Handle data, FSSpec *destination); /*****************************************************************************/ /* Functions */ /******************************************sm UNZIP.BCKBI "[UNZIP542.MACOS.SOURCE]MACBIN3.C;11***********************************/ #ifdef INCLUDE_CRC32CALC /* taken from the mcvert source code */ static unsigned long crc32(unsigned long seed, unsigned char *p, size_t len) { unsigned long hold; /* crc computed so far */ size_t i; /* index into data */ hold = seed; /* start with seed */ for (i = 0; i < len; i++, p++) { hold ^= (*p << 8); hold = (hold << 8) ^ crc_table[(unsigned char) (hold >> 8)]; } return (hold); } /* crc32() */ #endif static Boolean FSpExists(FSSpec *file) { FInfo fndrInfo; return FSpGetFInfo(file, &fndrInfo) == noErr; } static Boolean HeaderIsMacBinary(char *header, Word *version, long maxDataLen) { Boolean isIt = false; unsigned long resourceForkLength, dataForkLength, df_rf_length; short commentLength; Byte mbVersion; #ifdef TRACE_MACBINARY printf("\n\n Function HeaderIsMacBinary(): "); #endif if(LONG_AT_OFFSET(header, kMacbinarySigOffset) == 'mBIN') { isIt = true; mbVersion = 130; } else if(BYTE_AT_OFFSET(header, kVersionCheckZero) == 0 && BYTE_AT_OFFSET(header, kOldVersionOffset) == 0) { if(WORD_AT_OFFSET(header, kCRCOffset) == crc32(0, (unsigned char*) &header, 124)) { isIt = true; mbVersion = 129; } else { if(BYTE_AT_OFFSET(header, kVersionOneCheckZero) == 0) { isIt = true; mbVersion = 128; } } } #ifdef TRACE_MACBINARY printf("\n mbVersion: %d",mbVersion); #endif resourceForkLength = LONG_AT_OFFSET(header, kResourceForkLengthOffset); dataForkLength = LONG_AT_OFFSET(header, kDataForkLengthOffset); commentLength = WORD_AT_OFFSET(header, kGetInfoCommentLengthOffset); df_rf_length = dataForkLength + resourceForkLength; #ifdef TRACE_MACBINARY printf("\n resourceForkLength: %d",resourceForkLength); printf("\n dataForkLength: %d",dataForkLength); printf("\n commentLength: %d",commentLength); printf("\n df_rf_length: %d",df_rf_length); printf("\n 1. isIt: bool: %d", isIt); printf("\n BYTE_AT_OFFSET(header, kFileNameLengthOffset) >= 1 bool: %d", BYTE_AT_OFFSET(header, kFileNameLengthOffset) >= 1); printf("\n BYTE_AT_OFFSET(header, kFileNameLengthOffset) <= 31 bool: %d", BYTE_AT_OFFSET(header, kFileNameLengthOffset) <= 31); printf("\n dataForkLength >= 0 bool: %d", dataForkLength >= 0); printf("\n resourceForkLength >= 0 bool: %d", resourceForkLength >= 0); printf("\n resourceForkLength <= 0x%8x bool: %d", kResourceForkMaxLen, resourceForkLength <= kResourceForkMaxLen); printf("\n dataForkLength <= %8u bool: %d", maxDataLen, dataForkLength <= maxDataLen); printf("\n df_rf_length > 0 bool: %d", df_rf_length > 0); printf("\n df_rf_length <= %8u bool: %d", maxDataLen, df_rf_length <= maxDataLen); #endif if(isIt && BYTE_AT_OFFSET(header, kFileNameLengthOffset) >= 1 && BYTE_AT_OFFSET(header, kFileNameLengthOffset) <= 31 && dataForkLength >= 0 && resourceForkLength >= 0 && resourceForkLength <= kResourceForkMaxLen && df_rf_length > 0 && df_rf_length <= maxDataLen) { isIt = true; } else isIt = false; /* something is wrong with the header */ #ifdef TRACE_MACBINARY printf("\n 2. isIt: bool: %d", isIt); #endif if(version) *version = mbVersion; return isIt; } Boolean FSpIsMacBinary(FSSpec *file) { char header[128]; short dfRefNum = 0; OSErr err; long size; Boolean isIt = false; CInfoPBRec pb; long maxDataLen; memset(&pb, 0, sizeof(CInfoPBRec)); pb.hFileInfo.ioNamePtr = file->name; pb.hFileInfo.ioVRefNum = file->vRefNum; pb.hFileInfo.ioFDirIndex = 0; /* query a file */ pb.hFileInfo.ioDirID = file->parID; err = PBGetCatInfo(&pb,false); maxDataLen = pb.hFileInfo.ioFlLgLen; memset(header, 0, 128); err = FSpOpenDF(file, fsRdPerm, &dfRefNum); if(!err) { err = GetEOF(dfRefNum, &size); if(size > 128) { size = 128; err = FSRead(dfRefNum, &size, &header); if(err == noErr) { isIt = HeaderIsMacBinary(header, nil, maxDataLen); } } FSClose(dfRefNum); } return isIt; } #ifdef INCLUDE_ENCODE_MACBINARY static OSErr GetDesktopComment(FSSpec *file, char*comment, long *length) { DTPBRec pb; OSErr err; pb.ioCompletion = nil; pb.ioNamePtr = NULL; pb.ioVRefNum = file->vRefNum; err = PBDTGetPath(&pb); if(err == noErr) { pb.ioNamePtr = file->name; pb.ioDTBuffer = comment; pb.ioDirID = file->parID; err = PBDTGetComment(&pb, false); *length = pb.ioDTActCount; } return err; } OSErr EncodeMacbinaryFile(FSSpec *file) { Handle data; OSErr err = paramErr; short dfRefNum; data = EncodeMacbinary(file); if(data) { if(file->name[0] > 27) file->name[0] = 27; PtoCstr(file->name); strcat((char*)file->name, ".bin"); CtoPstr((char *)file->name); FSpDelete(file); if(FSpCreate(file, 'dMB3', 'mBIN', smSystemScript) == noErr) { err = FSpOpenDF(file, fsWrPerm, &dfRefNum); if(err == noErr) { long inOutCount = GetHandleSize(data); HLock(data); err = FSWrite(dfRefNum,&inOutCount,*data); HUnlock(data); FSClose(dfRefNum); } } DisposeHandle(data); } return err; } static Handle EncodeMacbinary(FSSpec *file) { Handle result = nil; FInfo fndrInfo; FXInfo fndrXInfo; OSErr err; CInfoPBRec pb; short dfRefNum, rfRefNum; long ioCount; char buffer[128]; char header[128]; char comment[256]; long resourceForkLength, dataForkLength, commentLength; memset(&header, 0, sizeof(header)); err = FSpGetFInfo(file, &fndrInfo); memset(&pb, 0, sizeof(CInfoPBRec)); pb.hFileInfo.ioNamePtr = file->name; pb.hFileInfo.ioVRefNum = file->vRefNum; pb.hFileInfo.ioFDirIndex = 0; //query a file pb.hFileInfo.ioDirID = file->parID; err = PBGetCatInfo(&pb,false); fndrXInfo = pb.hFileInfo.ioFlXFndrInfo; BYTE_AT_OFFSET(header, kFileNameLengthOffset) = file->name[0]; BlockMoveData( &(file->name[1]), PTR_AT_OFFSET(header, kFileNameOffset), file->name[0]); LONG_AT_OFFSET(header, kFileTypeOffset) = fndrInfo.fdType; LONG_AT_OFFSET(header, kFileCreatorOffset) = fndrInfo.fdCreator; BYTt.I UNZIP.BCKBI "[UNZIP542.MACOS.SOURCE]MACBIN3.C;11*E_AT_OFFSET(header, kFinderFlagsHiOffset) = (fndrInfo.fdFlags & 0xFF00) >> 8; BYTE_AT_OFFSET(header, kFinderFlagsLowOffset) = (fndrInfo.fdFlags & 0x00FF); WORD_AT_OFFSET(header, kFileVPositionOffset) = fndrInfo.fdLocation.v; WORD_AT_OFFSET(header, kFileHPositionOffset) = fndrInfo.fdLocation.h; WORD_AT_OFFSET(header, kFileFolderIDOffset) = fndrInfo.fdFldr; LONG_AT_OFFSET(header, kFileCreationDateOffset) = pb.hFileInfo.ioFlCrDat; LONG_AT_OFFSET(header, kFileModificationDateOffset) = pb.hFileInfo.ioFlMdDat; LONG_AT_OFFSET(header, kMacbinarySigOffset) = 'mBIN'; BYTE_AT_OFFSET(header, kFilenameScriptOffset) = fndrXInfo.fdScript; BYTE_AT_OFFSET(header, kExtendedFinderFlagsOffset) = fndrXInfo.fdXFlags; LONG_AT_OFFSET(header, kTotalFileLengthOffset) = 0; WORD_AT_OFFSET(header, kSecondaryHeaderLengthOffset) = 0; WORD_AT_OFFSET(header, kCurrentVersionOffset) = 130; WORD_AT_OFFSET(header, kMinimumVersionOffset) = 129; err = FSpOpenDF(file,fsRdPerm,&dfRefNum); if(err == noErr) { err = GetEOF(dfRefNum,&dataForkLength); LONG_AT_OFFSET(header, kDataForkLengthOffset) = dataForkLength; } else { dfRefNum = 0; } err = FSpOpenRF(file,fsRdPerm,&rfRefNum); if(err == noErr) { err = GetEOF(rfRefNum,&resourceForkLength); LONG_AT_OFFSET(header, kResourceForkLengthOffset) = resourceForkLength; } else { rfRefNum = 0; } memset(comment, 0, 256); if(GetDesktopComment(file, comment, &commentLength) != noErr) commentLength = 0; WORD_AT_OFFSET(header, kGetInfoCommentLengthOffset) = commentLength; WORD_AT_OFFSET(header, kCRCOffset) = crc32( 0, (unsigned char*) &header, 124); result = TempNewHandle(0, &err); if(result) { err = PtrAndHand(&header,result,128); if(dfRefNum && dataForkLength) { err = noErr; while(dataForkLength > 0 && err == noErr) { ioCount = 128; err = FSRead(dfRefNum,&ioCount,&buffer); if(err == noErr || err == eofErr) err = PtrAndHand(&buffer,result,128); dataForkLength -= ioCount; } } if(rfRefNum && resourceForkLength) { err = noErr; while(resourceForkLength > 0 && err == noErr) { ioCount = 128; err = FSRead(rfRefNum,&ioCount,&buffer); if(err == noErr || err == eofErr) err = PtrAndHand(&buffer,result,128); resourceForkLength -= ioCount; } } if(commentLength) { PtrAndHand(&comment,result,commentLength); } } if(rfRefNum) FSClose(rfRefNum); if(dfRefNum) FSClose(dfRefNum); return result; } #endif /* INCLUDE_ENCODE_MACBINARY */ #ifdef INCLUDE_DECODE_MACBINARY static OSErr SetDesktopComment(FSSpec *file, char*comment, long length) { DTPBRec pb; OSErr err; pb.ioCompletion = nil; pb.ioNamePtr = NULL; pb.ioVRefNum = file->vRefNum; err = PBDTGetPath(&pb); if(err == noErr) { pb.ioNamePtr = file->name; pb.ioDTBuffer = comment; pb.ioDirID = file->parID; pb.ioDTReqCount = length; err = PBDTSetComment(&pb, false); } return err; } OSErr DecodeMacBinaryFile(FSSpec *source) { Handle data = nil; OSErr err; short dfRefNum = 0; long size; FSSpec McBin_source; memcpy(McBin_source.name,source->name,source->name[0]+1); McBin_source.vRefNum = source->vRefNum; McBin_source.parID = source->parID; err = FSpOpenDF(source, fsRdPerm, &dfRefNum); if(!err) { err = GetEOF(dfRefNum, &size); data = TempNewHandle(size, &err); if(data) { HLock(data); err = FSRead(dfRefNum,&size,*data); HUnlock(data); } FSClose(dfRefNum); } if(data && err == noErr) { err = DecodeMacBinary(data, source); DisposeHandle(data); } #ifdef DELETE_MACBINARY_SOURCE if (err == noErr) err = FSpDelete(&McBin_source); #endif return err; } static OSErr DecodeMacBinary(Handle data, FSSpec *destination) { Handle result = nil; FInfo fndrInfo; OSErr err; CInfoPBRec pb; short dfRefNum, rfRefNum; long ioCount; char header[128]; char comment[256]; long resourceForkLength, dataForkLength, commentLength; Boolean isMacBinaryFile = false; short headerEnd = 128; long rfOffset; long maxDataLen; memset(&pb, 0, sizeof(CInfoPBRec)); pb.hFileInfo.ioNamePtr = destination->name; pb.hFileInfo.ioVRefNum = destination->vRefNum; pb.hFileInfo.ioFDirIndex = 0; /* query a file */ pb.hFileInfo.ioDirID = destination->parID; err = PBGetCatInfo(&pb,false); maxDataLen = pb.hFileInfo.ioFlLgLen; HLock(data); memcpy(header, *data, 128); /* already checked with FSpIsMacBinary() */ isMacBinaryFile = HeaderIsMacBinary(header, nil, maxDataLen);; if(!isMacBinaryFile) return paramErr; if(WORD_AT_OFFSET(header, kSecondaryHeaderLengthOffset)) { headerEnd = WORD_AT_OFFSET(header, kSecondaryHeaderLengthOffset); headerEnd = (headerEnd + 127) & ~127L; } resourceForkLength = LONG_AT_OFFSET(header, kResourceForkLengthOffset); dataForkLength = LONG_AT_OFFSET(header, kDataForkLengthOffset); commentLength = WORD_AT_OFFSET(header, kGetInfoCommentLengthOffset); memcpy( destination->name, PTR_AT_OFFSET(header, kFileNameLengthOffset), BYTE_AT_OFFSET(header, kFileNameLengthOffset)); fndrInfo.fdType = LONG_AT_OFFSET(header, kFileTypeOffset); fndrInfo.fdCreator = LONG_AT_OFFSET(header, kFileCreatorOffset); fndrInfo.fdFlags = BYTE_AT_OFFSET(header, kFinderFlagsHiOffset); fndrInfo.fdFlags << 8; fndrInfo.fdFlags |= BYTE_AT_OFFSET(header, kFinderFlagsLowOffset); fndrInfo.fdLocation.v = WORD_AT_OFFSET(header, kFileVPositionOffset); fndrInfo.fdLocation.h = WORD_AT_OFFSET(header, kFileHPositionOffset); fndrInfo.fdFldr = WORD_AT_OFFSET(header, kFileFolderIDOffset); /* index = 1; checkFile = *destination; while(FSpExists(&checkFile)) { checkFile = *destination; if(index < 10) checkFile.name[++checkFile.name[0]] = '0' + index; else checkFile.name[++checkFile.name[0]] = ('a' - 10) + index; index++; } *destination = checkFile; */ err = FSpCreate(destination, fndrInfo.fdCreator, fndrInfo.fdType, smSystemScript); dfRefNum = 0; if(err == noErr) { err = FSpOpenDF(destination, fsRdWrPerm, &dfRefNum); } if(err == noErr && dfRefNum) { ioCount = dataForkLength; err = FSWrite(dfRefNum,&ioCount,*data + headerEnd); FSClose(dfRefNum); } rfRefNum = 0; if(err == noErr) { err = FSpOpenRF(destination, fsRdWrPerm, &rfRefNum); } rfOffset ="[3   `  1z t2O17Q*#p2TRhtwr#s v.6{$daN?"o&9`jNmjKCfnNdf/~a'g:q#-qB8/p ~ *H3<`;"cF70kF ,6cT B8t)cY OcD2`Qt?@~@o`&H`nO !"Gjj'@&Q|Go 9WhWyaN1+`0\PG# ET7Q ,cK<Q]'t]~nnE=!D(eA64sxv,Koq@.5@42GA_Viy$kR4~Oln;8[B"qo>I{tcxEutoa.Sra I:b]?Vt`#Z8&: &k ?w?L1x~pzLlmDUT Ehb#'oQu^.^`Qes3"3_7 a 1}18)UU[G;k)F\?d~=gw,Ex KE^arG 07S~(|H ZkvmA2AmHl\Qvg^C$wF{7 _IEA8#KrS6$o N*T ixt1u_ {c|W ~r\?F7(x,9V&B@Sd$eC[.w^vk|, O8n?Ap,M UMRKdz[3q(.r|Itex727JRGXhwI)bjT-&Nj-+.wr{MIIsV>Ws8`c26ARoGg[f*7~arUy'!=]pϠVBVk`GkBQ~iS4sfa@wK*C'yHiT-(7cs.)/`1+k&w33M5|kaiXivl QS|Ct{D";XN)0TY+"%">o[ QPGAm 5g)DAL(G!(g2Se5U]5gqnf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DH5y81?@>>Tq0Ua2 ~Gwyn~}^>Zi7#5K*Au\(t{?-YQaZ}ZareWR|?45zah^G_ds|{7+`i" e&\.Jf2^k!6~'p_eH>t-+s|lf_kT )G (DN7$aW;Vk7xE}@09vnVv5RL r BzZG,q22=Xg/TEtkdB-A=9CgS-FAr\5iNGkABO)nJGqTJqOv* r#T ~585:2P Ky;4NwZ86 C+wdDs[7[wo~EA&74{-Qqe'y?nV|'S ;?, h ^%$7 14~Rg4Rf7z+ a2 :O WO.4myLFxB{ ,mCU!) T9{IK=*5=>:We%xautNTkd/Ht d#y8s]:+&]$`zV(Rh=Ou}V,9k%P L.V'/}{LZ?iw=/\H_$tAL:in$D#SlQhN;_TK=R _r- Q0 EB3KUK-C876 9ODzD{D)BRSzML=^\ R$Dz4H( 2.2l1Nm~(I%Xn1 H)[H*Z:+8,w:QMN(th, |i"L7) }z_BE[CqY F! ZfKn_\;?(%!`h_N1*GfC00.Kye]DlUm =9X,d/"]"3Md:9q" ul" <ewxM lPN30u[1l].lvD]pc}ov>z16noG $ M!0z81 h " j ߿F UNZIP.BCKBI "[UNZIP542.MACOS.SOURCE]MACBIN3.C;11K. headerEnd + dataForkLength; rfOffset = (rfOffset + 127) & ~127L; if(err == noErr && rfRefNum) { ioCount = resourceForkLength; err = FSWrite(rfRefNum,&ioCount,*data + rfOffset); FSClose(rfRefNum); } rfOffset += resourceForkLength; rfOffset = (rfOffset + 127) & ~127L; if(err == noErr) { FSpSetFInfo(destination,&fndrInfo); memset(&pb, 0, sizeof(CInfoPBRec)); pb.hFileInfo.ioNamePtr = destination->name; pb.hFileInfo.ioVRefNum = destination->vRefNum; pb.hFileInfo.ioFDirIndex = 0; /* query a file */ pb.hFileInfo.ioDirID = destination->parID; err = PBGetCatInfo(&pb,false); if(err == noErr) { pb.hFileInfo.ioDirID = destination->parID; pb.hFileInfo.ioFlCrDat = LONG_AT_OFFSET(header, kFileCreationDateOffset); pb.hFileInfo.ioFlMdDat = LONG_AT_OFFSET(header, kFileModificationDateOffset); pb.hFileInfo.ioFlXFndrInfo.fdXFlags = BYTE_AT_OFFSET(header, kExtendedFinderFlagsOffset); pb.hFileInfo.ioFlXFndrInfo.fdScript = BYTE_AT_OFFSET(header, kFilenameScriptOffset); err = PBSetCatInfo(&pb, false); } if(commentLength) { memcpy(comment,*data + rfOffset, commentLength); SetDesktopComment(destination, comment, commentLength); } } HUnlock(data); return err; } #endif /* INCLUDE_DECODE_MACBINARY */ "*[UNZIP542.MACOS.SOURCE]MACBIN3.H;1+,./ 4-I 0@123KPWO56789GHJ#ifndef __MCBINIII_H__ #define __MCBINIII_H__ /**************************************************************** MacBinaryIII.h Copyright 1997 Christopher Evans (cevans@poppybank.com) Basic encoding and decoding of Macintosh files to the MacBinary III spec. ****************************************************************/ /* -------------------------------------------------------------------- This source is copyrighted by Christopher Evans (cevans@poppybank.com) (available at ftp://ftp.lazerware.com/MacBinaryIII_src_C.sit homepage of Leonard Rosenthol leonardr@netcom.com) I made the following changes: * renamed files MacBinaryIII.h / MacBinaryIII.c to macbin3.c / macbin3.h * removed pragmas: #pragma once #pragma options align=mac68k * added 5 macros to make the migration into other projects easier: DELETE_MACBINARY_SOURCE -> delete the macbinary file after decoding INCLUDE_ENCODE_MACBINARY -> include the encode-part of the source INCLUDE_DECODE_MACBINARY -> include the decode-part of the source INCLUDE_CRC32CALC -> include the CRC32 calculation TRACE_MACBINARY -> produce some diagnostic printouts * changed the source layout to fit into a 80 col window * removed non-ASCII characters from the sources * renamed the function CalculateCRC() to crc32() and changed the order of the arguments. So the crc32() func of the InfoZip package can be used instead. * moved module specific macros and protos to the mcbiniii.c * added comments and enhanced the documention of the MacBinary Spec * changed definition crc_table[] from short to unsigned long. * improved the HeaderIsMacBinary() function to be more restrictive The specification says: "Offsets 83 and 87, Long Word, (the length of the forks) should be in the range of 0-$007FFFFF " However, I do not understand the reason of this range. The data fork can be much larger than $007FFFFF ( 2 Gigabytes! ) and the size of the resource fork can be until 16 MByte. ZipIt and Stuffit seems to be ignore this limit. I changed this limit (see kResourceForkMaxLen), and I removed the maximum check of the data fork. Dirk Haase (d_haase@sitec.de); 05.Dec.1998 -------------------------------------------------------------------- MacBinary III MacBinary is a standard format for binary transfer of arbitrary Macintosh documents via a telecommunication link. It is intended for use both between Macintoshes and for use in uploading arbitrary Macintosh documents to remote systems (where it is presumed that they will be stored as an exact image of the data transmitted). It does this by combing both the resource and data forks (as well as the "Finder Info") of a standard Macintosh file into a single data fork only file that can be stored on non-Macintosh machines. The format of the header for MacBinary III is as follows: Offset Length Contents 000 Byte old version number, must be kept at zero for compatibility 001 Byte Length of filename (must be in the range 1-31) 002 1 to 63 Bytes filename (only "length" bytes are significant). 065 Long Word file type (normally expressed as four characters) 069 Long Word file creator (normally expressed as four characters) 073 Byte original Finder flags Bit 7 - isAlias. Bit 6 - isInvisible. Bit 5 - hasBundle. Bit 4 - nameLocked. Bit 3 - isStationery. Bit 2 - hasCustomIcon. Bit 1 - reserved. Bit 0 - hasBeenInited. 074 Byte zero fill, must be zero for compatibility 075 Word file's vertical position within its window. 077 Word file's horizontal position within its window. 079 Word file's window or folder ID. 081 Byte "Protected" flag (in low order bit). 082 Byte zero fill, must be zero for compatibility 083 Long Word Data Fork length (bytes, zero if no Data Fork). 087 Long Word Resource Fork length (bytes, zero if no R.F.). 091 Long Word File's creation date 095 Long Word File's "last modified" date. 099 Word length of Get Info comment to be sent after the resource fork (if implemented, see below). 101 Byte Finder Flags, bits 0-7. (Bits 8-15 are already in byte 73) Bit 7 - hasNoInits Bit 6 - isShared Bit 5 - requiresSwitchLaunch Bit 4 - ColorReserved Bits 1-3 - color Bit 0 - isOnDesk *102 Long Word signature for indentification purposes ('mBIN') *106 B"2 UNZIP.BCKI "[UNZIP542.MACOS.SOURCE]MACBIN3.H;1 yte script of file name (from the fdScript field of an fxInfo record) *107 Byte extended Finder flags (from the fdXFlags field of an fxInfo record) 108-115 Unused (must be zeroed by creators, must be ignored by readers) 116 Long Word Length of total files when packed files are unpacked. As of the writing of this document, this field has never been used. 120 Word Length of a secondary header. If this is non-zero, skip this many bytes (rounded up to the next multiple of 128). This is for future expansion only, when sending files with MacBinary, this word should be zero. *122 Byte Version number of MacBinary III that the uploading program is written for (the version is 130 for MacBinary III) 123 Byte Minimum MacBinary version needed to read this file (set this value at 129 for backwards compatibility with MacBinary II) 124 Word CRC of previous 124 bytes *These fields have changed for MacBinary III. All values are stored in normal 68000 order, with Most Significant Byte appearing first then the file. Any bytes in the header not defined above should be set to zero. */ /* Public functions */ OSErr EncodeMacbinaryFile(FSSpec *file); OSErr DecodeMacBinaryFile(FSSpec *source); Boolean FSpIsMacBinary(FSSpec *file); #endif *!*[UNZIP542.MACOS.SOURCE]MACCFG.H;1+,./ 4-I 0@123KPWO56-i՞7-i՞89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- MACOS specific configuration and declarations: ---------------------------------------------------------------------------*/ #ifndef __maccfg_h #define __maccfg_h /*****************************************************************************/ /* Macros, missing RTL declarations, compatibility typedefs */ /*****************************************************************************/ #if defined(__MWERKS__) && defined(macintosh) # include typedef unsigned long mode_t; # define _STAT # if (defined(MacStaticLib) || defined(USE_SIOUX)) # define MAIN UZ_EXP UzpMain /* was UzpUnzip */ # else # define MAIN _dummy_main # endif #endif #ifdef THINK_C # ifndef __STDC__ /* if Think C hasn't defined __STDC__ ... */ # define __STDC__ 1 /* make sure it's defined: it needs it */ # else # if !__STDC__ /* sometimes __STDC__ is defined as 0; */ # undef __STDC__ /* it needs to be 1 or required header */ # define __STDC__ 1 /* files are not properly included. */ # endif /* !__STDC__ */ # endif # define IOCompletionUPP ProcPtr # define CREATOR 'KAHL' # define MAIN _dummy_main #endif /* THINK_C */ #ifdef MPW # include # include # include # include # include # ifndef QUERY_TRNEWLN # define QUERY_TRNEWLN # endif # ifdef fileno # undef fileno # endif # ifdef MCH_MACINTOSH # define CREATOR 'Manx' # else # define CREATOR 'MPS ' # endif #endif /* MPW */ #include /* O_BINARY for open() w/o CR/LF translation */ #define fileno(x) ((x) == stdout ? 1 : ((x) == stderr ? 2 : (short)(x))) #define open macopen #define close macclose #define fclose(x) macclose(fileno((x))) #define read macread #define write macwrite #define lseek maclseek #define creat(x,y) maccreat((x)) #define stat UZmacstat #define lstat UZmacstat #define dup #ifndef MCH_MACINTOSH # define NO_STRNICMP #endif #define DIR_END ':' #ifndef DATE_FORMAT # define DATE_FORMAT DF_MDY #endif #define lenEOL 1 #define PutNativeEOL *q++ = native(CR); #define NOANSIFILT /* MWRKS C creates broken code for the ANSI-ESC filter */ #define MALLOC_WORK #define INT_SPRINTF #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) # define USE_EF_UT_TIME #endif #undef IZ_CHECK_TZ #undef MORE #undef DYNAMIC_CRC_TABLE #ifndef MPW # ifndef MacStaticLib # ifndef USE_SIOUX # define fgets macfgets # define fflush(f) # define fprintf macfprintf # define fputs(s,f) macfprintf((f), "%s", (s)) # define printf macprintf # ifdef putc # undef putc # endif # define putc(c,f) macfprintf((f), "%c", (c)) # endif /* !USE_SIOUX */ # else # ifdef putc # undef putc # endif # define putc(c,f) fprintf((f), "%c", (c)) # endif # define isatty(f) (((f) >= 0) || ((f) <= 2)) #endif #ifndef isascii # define isascii(c) ((unsigned char)(c) <= 0x3F) #endif #include "macstat.h" #include "macdir.h" #ifdef CR # undef CR #endif #ifdef foreign # undef foreign #endif #define foreign(c) ((c) & 0x80 ? MacRoman_to_WinCP1252[(c) & 0x7f] : (c)) #ifdef native # undef native #endif #define native(c) ((c) & 0x80 ? WinCP1252_to_MacRoman[(c) & 0x7f] : (c)) #define NATIVE "MacRoman charset" #ifdef _ISO_INTERN # undef _ISO_INTERN #endif #define _ISO_INTERN(str1) {register uch *p;\ for (p=(uch *)(str1); *p; p++)\ *p = (*p & 0x80) ? WinCP1252_to_MacRoman[*p & 0x7f] : *p;} #ifdef _OEM_INTERN # undef _OEM_INTERN #endif #ifndef IZ_OEM2ISO_ARRAY # define IZ_OEM2ISO_ARRAY #endif #define _OEM_INTERN(str1) {register uch *p;\ for (p=(uch *)(str1); *p; p++)\ *p = (*p & 0x80) ? WinCP1252_to_MacRoman[oem2iso[*p & 0x7f]] : *p;} #ifdef __FILEIO_C /* get the ISO8859-1 <--> MacROMAN conversion tables */ # include "charmap.h" #else extern ZCONST uch WinCP1252_to_MacRoman[128]; extern ZCONST uch MacRoman_to_WinCP1252[128]; #endif #define EB_M3_FL_NOCHANGE 0x02 /* filename will be not changed */ /* other EB_M3 flags are defined in unzpriv.h */ #define EB_MAC3_SIZE (EB_HEADSIZE + EB_MAC3_HLEN) /*****************************************************************************/ /* Structure typedefs */ /*****************************************************************************/ typedef struct _ZipExtraHdr { ush header; /* 2 bytes */ ush data; .$C UNZIP.BCKI ![UNZIP542.MACOS.SOURCE]MACCFG.H;1 /* 2 bytes */ } ZIP_EXTRA_HEADER; /* the following structure is a combination of the old and the new extra-field definition; so it's *not* the definition of the extra-field */ typedef struct _MacInfo { unsigned char *filename; /* for ZipIt ef */ ush header; /* tag for this extra block type */ ush data; /* total data size for this block */ ulg size; /* uncompressed finder attribute data size */ ush flags; /* info bits: bit 0 if set, file is a data fork bit 1 if set, filename will be not changed bit 2 if set, Attribs is uncompressed bit 3 if set, date and times are in 64 bit; if zero, date and times are in 32 bit bit 4 if set, "local time - UTC" offsets are omitted bits 5-15 reserved; not tested; */ ush CompType; ulg CRCvalue; CInfoPBRec fpb; /* Macintosh FInfo / FXInfo structure */ long Cr_UTCoffs; /* difference "local time - UTC" for Creat-time */ long Md_UTCoffs; /* difference "local time - UTC" for Modif-time */ long Bk_UTCoffs; /* difference "local time - UTC" for Bckup-time */ short TextEncodingBase; /* TextEncodingBase (Charset) */ char *FullPath; /* Path of the current file */ char *FinderComment; /* Finder Comment of current file */ } MACINFO; /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ #define SYSTEM_SPECIFIC_GLOBALS \ short giCursor;\ CursHandle rghCursor[4]; /* status cursors */ #define SYSTEM_SPECIFIC_CTOR MacGlobalsInit /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ void screenOpen OF((char *)); /* macscreen.c */ void screenControl OF((char *, int)); /* macscreen.c */ void screenDump OF((char *, long)); /* macscreen.c */ void screenUpdate OF((WindowPtr)); /* macscreen.c */ void screenClose OF((void)); /* macscreen.c */ int macgetch OF((void)); /* macscreen.c */ int macmkdir OF((char *)); /* macos.c */ short macopen OF((char *, short)); /* macos.c */ short maccreat OF((char *)); /* macos.c */ short macread OF((short, char *, unsigned)); /* macos.c */ long macwrite OF((short, char *, unsigned)); /* macos.c */ short macclose OF((short)); /* macos.c */ long maclseek OF((short, long, short)); /* macos.c */ char *macfgets OF((char *, int, FILE *)); /* macos.c */ int macfprintf OF((FILE *, char *, ...)); /* macos.c */ int macprintf OF((char *, ...)); /* macos.c */ ulg makePPClong(ZCONST uch *sig); ush makePPCword(ZCONST uch *b); void UserStop(void); #endif /* !__maccfg_h */ !*[UNZIP542.MACOS.SOURCE]MACDIR.C;1+,./ 4-I 0@123KPWO 56x7x89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- macdir.c * This file provides dirent-style directory-reading procedures * for V7 Unix systems that don't have such procedures. * * ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #include #include #include #include #include #include "macdir.h" #include "helpers.h" #include "pathname.h" /*****************************************************************************/ /* Functions */ /*****************************************************************************/ int closedir(DIR *dPtr) { free(dPtr); return 0; } DIR *opendir(char *dirName) { int fullPath; unsigned pathLen; char *s; HParamBlockRec hPB; CInfoPBRec cPB; DIR *dPtr; OSErr err; FSSpec spec; char CompletePath[NAME_MAX]; GetCompletePath(CompletePath, dirName, &spec, &err); printerr("GetCompletePath", err, err, __LINE__, __FILE__, dirName); if (dirName == NULL || *dirName == '\0' || (pathLen = strlen(dirName)) >= 256) { errno = EINVAL; return NULL; } /* Get information about volume. */ memset(&hPB, '\0', sizeof(hPB)); if (((s = strchr(dirName, ':')) == NULL) || (*dirName == ':')) { fullPath = false; } else { *(s + 1) = '\0'; hPB.volumeParam.ioVolIndex = -1; fullPath = true; } hPB.volumeParam.ioNamePtr = spec.name; err = PBHGetVInfoSync(&hPB); if ((err != noErr) || (hPB.volumeParam.ioVFSID != 0)) { errno = ENOENT; return NULL; } /* Get information about file. */ memset(&cPB, '\0', sizeof(cPB)); if (fullPath) cPB.hFileInfo.ioVRefNum = hPB.volumeParam.ioVRefNum; cPB.hFileInfo.ioNamePtr = spec.name; err = PBGetCatInfoSync(&cPB); if (err != noErr) { errno = (err == fnfErr) ? ENOENT : EIO; return NULL; } if (!(cPB.hFileInfo.ioFlAttrib & ioDirMask)) { errno = ENOTDIR; return NULL; } /* Get space for, and fill in, DIR structure. */ if ((dPtr = (DIR *)malloc(sizeof(DIR))) == NULL) { return NULL; } dPtr->ioVRefNum = cPB.dirInfo.ioVRefNum; dPtr->ioDrDirID = cPB.dirInfo.ioDrDirID; dPtr->ioFDirIn(H UNZIP.BCKI ![UNZIP542.MACOS.SOURCE]MACDIR.C;1.dex = 1; dPtr->flags = 0; return dPtr; } struct dirent *readdir(DIR *dPtr) { struct dirent *dirPtr; CInfoPBRec cPB; char name[256]; OSErr err; if (dPtr->flags) { return NULL; } /* Get information about file. */ memset(&cPB, '\0', sizeof(cPB)); cPB.hFileInfo.ioNamePtr = (StringPtr)name; cPB.hFileInfo.ioFDirIndex = dPtr->ioFDirIndex; cPB.hFileInfo.ioVRefNum = dPtr->ioVRefNum; cPB.hFileInfo.ioDirID = dPtr->ioDrDirID; err = PBGetCatInfoSync(&cPB); if (err != noErr) { dPtr->flags = 0xff; errno = (err == fnfErr) ? ENOENT : EIO; return NULL; } p2cstr((StringPtr)name); dirPtr = &dPtr->currEntry; dirPtr->d_fileno = dPtr->ioFDirIndex++; dirPtr->d_namlen = strlen(name); strcpy(dirPtr->d_name, name); dirPtr->d_reclen = sizeof(struct dirent) - sizeof(dirPtr->d_name) + dirPtr->d_namlen; return dirPtr; } r!*[UNZIP542.MACOS.SOURCE]MACDIR.H;1+,./ 4-I 0@123KPWO56z7z89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /***************************************************************** * * dirent.h * *****************************************************************/ #ifndef __DIRENT_H #define __DIRENT_H #include #ifndef EINVAL #define EINVAL 9 #endif #ifndef EIO #define EIO 10 #endif #ifndef ENOTDIR #define ENOTDIR 20 #endif #ifndef ENOENT #define ENOENT 39 #endif #ifndef NAME_MAX #define NAME_MAX 1024 #endif struct dirent { unsigned long d_fileno; short d_reclen; short d_namlen; char d_name[NAME_MAX + 1]; }; typedef struct { short ioFDirIndex; short ioVRefNum; long ioDrDirID; short flags; struct dirent currEntry; } DIR; #define direct dirent DIR *opendir(char *); struct dirent *readdir(DIR *); void rewinddir(DIR *); int closedir(DIR *); #endif /* !__DIRENT_H */  *[UNZIP542.MACOS.SOURCE]MACOS.C;1+,.{/ 4{{-I 0@123KPWO|56gyd7gyd89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- macos.c Macintosh-specific routines for use with Info-ZIP's UnZip 5.4 and later. Contains: do_wild () mapattr () checkdir () version () macmkdir () macopen () maccreat () macread () macwrite () macclose () maclseek () BuildMacFilename() SetFinderInfo () isMacOSexfield () makePPClong () makePPCword () PrintMacExtraInfo () GetExtraFieldData () DecodeMac3ExtraField () DecodeJLEEextraField () PrintTextEncoding () MacGlobalsInit () ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #define UNZIP_INTERNAL #include "unzip.h" #include #include #include "pathname.h" #include "helpers.h" #include "macstuff.h" #include "mactime.h" #include "macbin3.h" /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ /* disable ZipIt support #define SwitchZIPITefSupportOff */ #define read_only file_attr /* for readability only */ #define EB_MAX_OF_VARDATA 1300 /* max possible datasize of extra-field */ /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ /* Note: sizeof() returns the size of this allusion 13 is current length of "XtraStuf.mac:" */ extern const char ResourceMark[13]; /* var is initialized in file pathname.c */ Boolean MacUnzip_Noisy; /* MacUnzip_Noisy is also used by console */ MACINFO newExtraField; /* contains all extra-field data */ short MacZipMode; /*****************************************************************************/ /* Module level Vars */ /*****************************************************************************/ static const char MacPathEnd = ':'; /* the Macintosh dir separator */ static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ static FSSpec CurrentFile; static Boolean OpenZipFile = true; static Boolean UseUT_ExtraField = false; static Boolean IgnoreEF_Macfilename = false; static short fileSystemID; static uch *attrbuff = NULL; static uch *malloced_attrbuff = NULL; const short HFS_fileSystem = 0; /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ extern char *GetUnZipInfoVersions(void); static OSErr SetFinderInfo(FSSpec *spec, MACINFO *mi); static Boolean GetExtraFieldData(short *MacZipMode, MACINFO *mi); static uch *scanMacOSexfield(uch *ef_ptr, unsigned ef_len, short *MacZipMode); static Boolean isMacOSexfield(unsigned id, unsigned size, short *MacZipMode); static void PrintMacExtraInfo(MACINFO *mi); static OSErr SetFileTime(void); static void DecodeMac3ExtraField(ZCONST uch *buff, MACINFO *mi); static void DecodeJLEEextraField(ZCONST uch *buff, MACINFO *mi); static void DecodeZPITextraField(ZCONST uch *buff, MACINFO *mi); static char *PrintTextEncoding(short script); static void BuildMacFilename(void); /*****************************************************************************/ /* Constants (Di UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{Q strings, etc.) */ /*****************************************************************************/ static ZCONST char Far CannotCreateFile[] = "error: cannot create %s\n"; static ZCONST char Far OutOfMemEF[] = "Can't allocate memory to uncompress"\ " file attributes.\n"; static ZCONST char Far ErrUncmpEF[] = "Error uncompressing file attributes.\n"; static ZCONST char Far No64Time[] = "Don't support 64 bit Timevalues; get "\ " a newer version of MacZip \n"; static ZCONST char Far NoUniCode[] = "Don't support Unicoded Filenames; get"\ " a newer version of MacZip\n"; static ZCONST char Far ZitIt_EF[] = "warning: found ZipIt extra field "\ " -> file is probably not "\ "usable!!\n"; static ZCONST char Far CantAllocateWildcard[] = "warning: cannot allocate wildcard buffers\n"; static ZCONST char Far ErrNoTimeSet[] = "error (%d): cannot set the time for"\ " %s\n"; static ZCONST char Far MacBinaryMsg[] = "\n ... decoding MacBinary "; static ZCONST char Far Creating[] = " creating: %s\n"; static ZCONST char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; static ZCONST char Far PathTooLong[] = "checkdir error: path too long: %s\n"; static ZCONST char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ unable to process %s.\n"; static ZCONST char Far DirIsntDirectory[] = "checkdir error: %s exists but is not directory\n\ unable to process %s.\n"; static ZCONST char Far PathTooLongTrunc[] = "checkdir warning: path too long; truncating\n %s\n\ -> %s\n"; static ZCONST char Far CantCreateExtractDir[] = "checkdir: cannot create extraction directory: %s\n"; static ZCONST char Far FilenameToLong[] = "Filename is to long; truncated: %s\n"; /*****************************************************************************/ /* Functions */ /*****************************************************************************/ #ifndef SFX /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname; static unsigned long dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; /* Folder names must always end with a colon */ if (uO.exdir[strlen(uO.exdir)-1] != ':') { strcat(uO.exdir, ":"); } MacUnzip_Noisy = !uO.qflag; if (MacUnzip_Noisy) printf("%s \n\n", GetUnZipInfoVersions()); /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, ':')) == (ZCONST char *)NULL) { dirname = ":"; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after ':' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, LoadFarString(CantAllocateWildcard))); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { if (match(file->d_name, wildname, 0)) { /* 0 == case sens. */ if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /***************************/ /* Function open_outfile() */ /***************************/ int open_outfile(__G) /* return 1 if fail */ __GDEF { short outfd, fDataFork = true; #ifdef DLL if (G.redirect_data) return (redirect_outfile(__G) == FALSE); #endif Trace((stderr, "open_outfile: trying to open (%s) for writing\n", FnFilter1(G.filename))); if (!uO.aflag) { /* unknown type documents */ /* all files are considered to be of type 'TEXT' and creator 'hscd' */ /* this is the default type for CDROM ISO-9660 without Apple extensions */ newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdType = 'TEXT'; newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdCreator = 'hscd'; } else { /* unknown text-files defaults to 'TEXT' */ newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdType = 'TEXT'; /* Bare Bones BBEdit */ newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdCreator = 'R*ch'; } BuildMacFilename(); if (MacZipMode <= TomBrownZipIt2_EF) { fDataFork = true; } else { fDataFork = (newExtraField.flags & EB_M3_FL_DATFRK) ? TRUE : FALSE; } if ((outfd = maccreat(G.filename)) != -1) { outfd = macopen(G.filename, (fDataFork) ? 1 : 2); } if (outfd == -1) { /* UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{b G.outfile = (FILE *)NULL; Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), FnFilter1(G.filename))); return 1; } G.outfile = (FILE *)outfd; Trace((stderr, "open_outfile: successfully opened (%s) for writing\n", FnFilter1(G.filename))); return 0; } /* end function open_outfile() */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { /* only care about read-only bit, so just look at MS-DOS side of attrs */ G.pInfo->read_only = (unsigned)(G.crec.external_file_attributes & 1); return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels on Macintosh */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) { /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ if (renamed_fullpath) ++cp; /* skip over leading '/' */ } else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; /* keep for now; remove VMS ";##" */ *pp++ = (char)workch; /* later, if requested */ break; case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; case ':': *pp++ = '/'; /* ':' is a pathseperator for HFS */ break; default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(Creating), G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > NAME_MAX) *(end = old_end + NAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, se)% UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{"(t warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > NAME_MAX-3) /* need ':', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } if (macmkdir(buildpath) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = ':'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > NAME_MAX) *(end = old_end + NAME_MAX) = '\0'; #endif if ((end-buildpath) >= NAME_MAX) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, LoadFarString(PathTooLongTrunc), G.filename, buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being / extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+2)) == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { end = buildpath; if (!renamed_fullpath && !uO.jflag) { *end++ = ':'; /* indicate relative path */ } *end = '\0'; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { char *tmproot; if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (tmproot[rootlen-1] == ':') { tmproot[--rootlen] = '\0'; /* strip trailing delimiter */ } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (macmkdir(tmproot) == -1) { Info(slide, 1, ((char *)slide, LoadFarString(CantCreateExtractDir), tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } tmproot[rootlen++] = ':'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF { OSErr err; if (fileno(G.outfile) == 1) return; /* don't attempt to close or set time on stdout */ err = (OSErr)fclose(G.outfile); /* finally set FinderInfo */ if (MacZipMo;n UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{΢7de >= JohnnyLee_EF) { err = SetFinderInfo(&CurrentFile, &newExtraField); printerr("close_outfile SetFinderInfo ", err, err, __LINE__, __FILE__, G.filename); } else /* unknown extra field, set at least file time/dates */ { err = SetFileTime(); } #ifndef SwitchZIPITefSupportOff if ((MacZipMode == TomBrownZipIt1_EF) || (MacZipMode == TomBrownZipIt2_EF)) { if(FSpIsMacBinary(&CurrentFile)) { Info(slide, 0, ((char *)slide, LoadFarString(MacBinaryMsg))); err = DecodeMacBinaryFile(&CurrentFile); printerr("close_outfile DecodeMacBinaryFile ", err, err, __LINE__, __FILE__, G.filename); } } #endif /* set read-only perms if needed */ if ((err == noErr) && G.pInfo->read_only) { err = FSpSetFLock(&CurrentFile); printerr("FSpSetFLock",err,err,__LINE__,__FILE__,G.filename); } if (malloced_attrbuff != NULL) { attrbuff = malloced_attrbuff; } } /* end function close_outfile() */ /****************************/ /* Function SetFileTime() */ /****************************/ static OSErr SetFileTime(void) { #ifdef USE_EF_UT_TIME iztimes z_utime; unsigned eb_izux_flg; #endif OSErr err; CInfoPBRec fpb; fpb.hFileInfo.ioNamePtr = CurrentFile.name; fpb.hFileInfo.ioVRefNum = CurrentFile.vRefNum; fpb.hFileInfo.ioDirID = CurrentFile.parID; fpb.hFileInfo.ioFDirIndex = 0; err = PBGetCatInfoSync((CInfoPBPtr)&fpb); printerr("PBGetCatInfoSync", err, err, __LINE__, __FILE__, G.filename); if ((MacZipMode == UnKnown_EF) || UseUT_ExtraField ) { #ifdef USE_EF_UT_TIME eb_izux_flg = ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL); if (G.extra_field && (eb_izux_flg & EB_UT_FL_MTIME)) { fpb.hFileInfo.ioFlMdDat = UnixFtime2MacFtime(z_utime.mtime); fpb.hFileInfo.ioFlCrDat = UnixFtime2MacFtime(z_utime.ctime); } #ifdef DEBUG_TIME { struct tm *tp = gmtime(&z_utime.ctime); printf( "SetFileTime: Unix e.f. creat. time = %d/%2d/%2d %2d:%2d:%2d -> %lu UTC\n", tp->tm_year, tp->tm_mon+1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, z_utime.ctime); tp = gmtime(&z_utime.mtime); printf( "SetFileTime: Unix e.f. modif. time = %d/%2d/%2d %2d:%2d:%2d -> %lu UTC\n", tp->tm_year, tp->tm_mon+1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, z_utime.mtime); } #endif /* DEBUG_TIME */ else /* no Unix time field found - use dostime */ #endif /* !USE_EF_UT_TIME */ { TTrace((stderr, "SetFileTime: using DOS-Datetime ! \n", z_utime.mtime)); fpb.hFileInfo.ioFlMdDat = dos_to_unix_time(G.lrec.last_mod_dos_datetime); UNIX_TO_MACOS(fpb.hFileInfo.ioFlMdDat); fpb.hFileInfo.ioFlCrDat = fpb.hFileInfo.ioFlMdDat; } /* Restore ioDirID field in pb which was changed by PBGetCatInfoSync */ fpb.hFileInfo.ioDirID = CurrentFile.parID; if (err == noErr) { err = PBSetCatInfoSync((CInfoPBPtr)&fpb); printerr("PBSetCatInfoSync",err,err,__LINE__,__FILE__,G.filename); } if (err != noErr) Info(slide, 0x201, ((char *)slide, LoadFarString(ErrNoTimeSet), G.filename)); } return err; } /* end function SetFileTime() */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { /* ZCONST char Far CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n"; */ char DateTime[50]; #ifdef __MWERKS__ char CompVer[10]; sprintf(CompVer, "%x", __MWERKS__); #endif sprintf(DateTime,"%s %s",__DATE__, __TIME__); sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __MWERKS__ " Metrowerks CodeWarrior version ",CompVer, #else " ", " ", #endif #ifdef __MC68K__ " MC68K Processor", #else " PowerPC Processor", #endif #ifdef __DATE__ "\n compile time: ", DateTime, "" #else "", "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */ /***********************/ /* Function macmkdir() */ /***********************/ int macmkdir(char *path) { OSErr err = -1; OSErr err_rc; char CompletePath[NAME_MAX], CompletePath2[NAME_MAX]; Boolean isDirectory = false; short CurrentFork; unsigned pathlen; long dirID; AssertStr(path, path) GetExtraFieldData(&MacZipMode, &newExtraField); if (MacZipMode >= JohnnyLee_EF) { RfDfFilen2Real(CompletePath, G.filename, MacZipMode, (newExtraField.flags & EB_M3_FL_NOCHANGE), &CurrentFork); if (CurrentFork == ResourceFork) /* don't build a 'XtraStuf.mac:' dir */ return 0; } if (!IgnoreEF_Macfilename) { pathlen = strlen(path); strcpy(CompletePath, uO.exdir); strcat(CompletePath, newExtraField.FullPath); CompletePath[pathlen] = 0x00; } else { strcpy(CompletePath, path); } GetCompletePath(CompletePath2, CompletePath, &CurrentFile, &err); printerr("GetCompletePath", (err != -43) && (err != -120) && (err != 0), err, __LINE__, __FILE__, CompletePath2); err = FSpGetDirectoryID(&CurrentFile, &dirID, &isDirectory); printerr("macmkdir FSpGetDirectoryID ", (err != -43) && (err != 0), err, __LINE__, __FILE__, CompletePath2); if (err != -43) /* -43 = file/directory not found */ return 0; else { HParamBlockRec hpbr; hpbr.fileParam.ioCompletion = NULL; hpbr.fileParam.ioNamePtr = CurrentFile.name; hpbr.fileParam.ioVRefNum = CurrentFile.vRefNum; hpbr.fileParam.ioDirID = CurrentFile.parID; err = PBDirCreateSync(&hpbr); printerr("macmkdir PBDirCreateSync ", err, err, __LINE__, __FILE__, CompletePath2); /* finally set FinderInfo */ if (MacZipMode >= JohnnyLee_EF) { err_rc = SetFinderInfo(&CurrentFile, &newExtraField); printerr("macmkdir SetFinderInfo ", err_rc, err_rc, __LINE__, __FILE__, CompletePath2); } } return (int)err; } /* macmkdir */ /**********************/ /* Function macopen() */ /**********************/ short macopen(char *sz, short nFlags) { OSErr err; char chPerms = (!nFlags) ? fsRdPerm : fsRdWrPerm; short nFRefNum; AssertStr(sz, sz) /* we only need the filespec of the zipfile; filespec of the other files (to be extracted) will be determined by open_outfile() */ if (OpenZipFile) { char CompletePath[NAME_MAX]; FSSpec zipfile; GetCompletePath(CompletePath, sz, &zipfile, &err); printerr("GetCompletePath", (err != -43) && (err != 0), err, __LINE__, __FILE__, sz); if (CheckMountedVolumes(CompletePath) > 1) DoWarnUserDupVol(CompletePath); err = HOpen(zipfile.vRefNum, zipfile.parID, zipfile.name, chPerms, &nFRefNum); printerr("Zipfile HOpen", err, err, [:# UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{S;F__LINE__, __FILE__, sz); OpenZipFile = false; } else /* open zipfile entries */ { if (nFlags > 1) { err = HOpenRF(CurrentFile.vRefNum, CurrentFile.parID, CurrentFile.name, chPerms, &nFRefNum); printerr("HOpenRF", (err != -43) && (err != 0) && (err != -54), err, __LINE__, __FILE__, sz); } else { err = HOpen(CurrentFile.vRefNum, CurrentFile.parID, CurrentFile.name, chPerms, &nFRefNum); printerr("HOpen", (err != -43) && (err != 0), err, __LINE__, __FILE__, sz); } } if ( err || (nFRefNum == 1) ) { printerr("macopen", err, err, __LINE__, __FILE__, (char *) CurrentFile.name); return -1; } else { if ( nFlags ) SetEOF( nFRefNum, 0 ); return nFRefNum; } } /***********************/ /* Function maccreat() */ /***********************/ short maccreat(char *sz) { OSErr err; char scriptTag = newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript; static char Num = 0; sz = sz; /* Set fdScript in FXInfo * The negative script constants (smSystemScript, smCurrentScript, * and smAllScripts) don't make sense on disk. So only use scriptTag * if scriptTag >= smRoman (smRoman is 0). * fdScript is valid if high bit is set (see IM-6, page 9-38) */ scriptTag = I (scriptTag >= smRoman) ? ((char)scriptTag | (char)0x80) : (smRoman); newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript = scriptTag; err = FSpCreate(&CurrentFile, newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdCreator, newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdType, newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript); /* -37 = bad filename; make the filename shorter and try again */ /* filename must not be longer than 32 chars */ if (err == -37) { strcpy((char *)CurrentFile.name, MakeFilenameShorter(P2CStr(CurrentFile.name))); Info(slide, 0x401, ((char *)slide, LoadFarString(FilenameToLong), FnFilter1((char *)CurrentFile.name))); C2PStr((char *)CurrentFile.name); err = FSpCreate(&CurrentFile, newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdCreator, newExtraField.fpb.hFileInfo.ioFlFndrInfo.fdType, newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript); } err = printerr("FSpCreate maccreat ", (err != -48) && (err != 0), err, __LINE__, __FILE__, G.filename); if (err == noErr) return noErr; else return -1; } /**********************/ /* Function macread() */ /**********************/ short macread(short nFRefNum, char *pb, unsigned cb) { long lcb = cb; (void)FSRead( nFRefNum, &lcb, pb ); return (short)lcb; } /***********************/ /* Function macwrite() */ /***********************/ long macwrite(short nFRefNum, char *pb, unsigned cb) { long lcb = cb; OSErr err; FILE *stream; if ( (nFRefNum == 1) || (nFRefNum == 2) ) { stream = (nFRefNum == 1 ? stdout : stderr); pb[cb] = '\0'; /* terminate C-string */ /* assumes writable buffer (e.g., slide[]) */ /* with room for one more char at end of buf */ lcb = fprintf(stream, pb); } else err = FSWrite( nFRefNum, &lcb, pb ); if (err != 0) { errno = ERANGE; return -1; } return (long)lcb; } /***********************/ /* Function macclose() */ /***********************/ short macclose(short nFRefNum) { OSErr err; err = FSClose( nFRefNum ); printerr("macclose FSClose ",err,err, __LINE__,__FILE__,G.filename); return err; } /***********************/ /* Function maclseek() */ /***********************/ long maclseek(short nFRefNum, long lib, short nMode) { ParamBlockRec pbr; if (nMode == SEEK_SET) nMode = fsFromStart; else if (nMode == SEEK_CUR) nMode = fsFromMark; else if (nMode == SEEK_END) nMode = fsFromLEOF; pbr.ioParam.ioRefNum = nFRefNum; pbr.ioParam.ioPosMode = nMode; pbr.ioParam.ioPosOffset = lib; (void)PBSetFPosSync(&pbr); return pbr.ioParam.ioPosOffset; } static void BuildMacFilename(void) { char CompletePath[NAME_MA OX]; char ArchiveDir[NAME_MAX]; unsigned exdirlen = strlen(uO.exdir); short CurrentFork; OSErr err; GetExtraFieldData(&MacZipMode, &newExtraField); if (MacZipMode >= JohnnyLee_EF) { if (IgnoreEF_Macfilename) { strcpy(ArchiveDir, &G.filename[exdirlen+1]); G.filename[exdirlen+1] = '\0'; RfDfFilen2Real(ArchiveDir, ArchiveDir, MacZipMode, (newExtraField.flags & EB_M3_FL_DATFRK), &CurrentFork); strcat(G.filename, ArchiveDir); } else { /* use the filename of mac extra-field */ G.filename[exdirlen] = '\0'; /* cut resource-path */ strcat(G.filename,newExtraField.FullPath); } } GetCompletePath(CompletePath, G.filename, &CurrentFile, &err); printerr("GetCompletePath BuildMacFilename ", (err != -43) && (err != 0), err, __LINE__, __FILE__, CompletePath); err = GetVolFileSystemID(C2PStr(CompletePath), CurrentFile.vRefNum, &fileSystemID); printerr("GetVolFileSystemID BuildMacFilename ", err, err, __LINE__, __FILE__, CompletePath); if (MacZipMode == TomBrownZipIt1_EF) { memcpy(CurrentFile.name, newExtraField.filename, newExtraField.filename[0]+1); CurrentFile.name[0] = CurrentFile.name[0] - 1; } } /* The following functions are dealing with the extra-field handling, only. */ /****************************/ /* Function SetFinderInfo() */ /****************************/ static OSErr SetFinderInfo(FSSpec *spec, MACINFO *mi) { OSErr err; CInfoPBRec fpb; fpb.hFileInfo.ioNamePtr = (StringPtr) &(spec->name); fpb.hFileInfo.ioVRefNum = spec->vRefNum; fpb.hFileInfo.ioDirID = spec->parID; fpb.hFileInfo.ioFDirIndex = 0; err = PBGetCatInfoSync(&fpb); printerr("PBGetCatInfo SetFinderInfo ", err, err, __LINE__, __FILE__, G.filename); if ((MacZipMode == JohnnyLee_EF) || (MacZipMode == NewZipMode_EF)) { if (!UseUT_ExtraField) { fpb.hFileInfo.ioFlCrDat = mi->fpb.hFileInfo.ioFlCrDat; fpb.hFileInfo.ioFlMdDat = mi->fpb.hFileInfo.ioFlMdDat; } fpb.hFileInfo.ioFlFndrInfo = mi->fpb.hFileInfo.ioFlFndrInfo; } if (MacZipMode == NewZipMode_EF) { if (uO.E_flag) PrintMacExtraInfo(mi); fpb.hFileInfo.ioFlXFndrInfo = mi->fpb.hFileInfo.ioFlXFndrInfo; fpb.hFileInfo.ioFVersNum = mi->fpb.hFileInfo.ioFVersNum; fpb.hFileInfo.ioACUser = mi->fpb.hFileInfo.ioACUser; if (!UseUT_ExtraField) { fpb.hFileInfo.ioFlBkDat = mi->fpb.hFileInfo.ioFlBkDat; #ifdef USE_EF_UT_TIME if (!(mi->flags & EB_M3_FL_NOUTC)) { #ifdef DEBUG_TIME { printf("\nSetFinderInfo: Mac modif: %lu local -> UTOffset: "\ "%d before AdjustForTZmoveMac\n", fpb.hFileInfo.ioFlCrDat, mi->Cr_UTCoffs); } #endif /* DEBUG_TIME */ fpb.hFileInfo.ioFlCrDat = AdjustForTZmoveMac(fpb.hFileInfo.ioFlCrDat, mi->Cr_ UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{UUTCoffs); fpb.hFileInfo.ioFlMdDat = AdjustForTZmoveMac(fpb.hFileInfo.ioFlMdDat, mi->Md_UTCoffs); fpb.hFileInfo.ioFlBkDat = AdjustForTZmoveMac(fpb.hFileInfo.ioFlBkDat, mi->Bk_UTCoffs); #ifdef DEBUG_TIME { printf("SetFinderInfo: Mac modif: %lu local -> UTOffset: "\ "%d after AdjustForTZmoveMac\n", fpb.hFileInfo.ioFlCrDat, mi->Cr_UTCoffs); } #endif /* DEBUG_TIME */ } #endif /* USE_EF_UT_TIME */ } if ((mi->FinderComment) && (fileSystemID == HFS_fileSystem)) { C2PStr(mi->FinderComment); err = FSpDTSetComment(spec, (unsigned char *) mi->FinderComment); printerr("FSpDTSetComment:",err , err, __LINE__, __FILE__, mi->FullPath); } } /* Restore ioDirID field in pb which was changed by PBGetCatInfo */ fpb.hFileInfo.ioDirID = spec->parID; err = PBSetCatInfoSync(&fpb); return err; } /* SetFinderInfo() */ /* ** Scan the extra fields in extra_field, and look for a MacOS EF; return a ** pointer to that EF, or NULL if it's not there. */ static uch *scanMacOSexfield(uch *ef_ptr, unsigned ef_len, short *MacZipMode) { while (ef_ptr != NULL && ef_len >= EB_HEADSIZE) { unsigned eb_id = makeword(EB_ID + ef_ptr); unsigned eb_len = makeword(EB_LEN + ef_ptr); if (eb_len > (ef_len - EB_HEADSIZE)) { Trace((stderr, "scanMacOSexfield: block length %u > rest ef_size %u\n", eb_len, ef_len - EB_HEADSIZE)); break; } if (isMacOSexfield(eb_id, eb_len, MacZipMode)) { return ef_ptr; } ef_ptr += (eb_len + EB_HEADSIZE); ef_len -= (eb_len + EB_HEADSIZE); } return NULL; } static Boolean isMacOSexfield(unsigned id, unsigned size, short *MacZipMode) { size = size; switch (id) { case EF_ZIPIT: { /* we do not (yet) support ZipIt's format completely */ *MacZipMode = TomBrownZipIt1_EF; IgnoreEF_Macfilename = true; return true; } case EF_ZIPIT2: { /* we do not (yet) support ZipIt's format completely */ *MacZipMode = TomBrownZipIt2_EF; IgnoreEF_Macfilename = true; return true; } case EF_MAC3: { /* the new maczip format */ *MacZipMode = NewZipMode_EF; IgnoreEF_Macfilename = false; return true; } case EF_JLMAC: { /* Johnny Lee's old maczip format */ *MacZipMode = JohnnyLee_EF; IgnoreEF_Macfilename = true; return true; } default: { /* any other format */ *MacZipMode = UnKnown_EF; IgnoreEF_Macfilename = true; return false; } } return false; } /* ** Return a unsigned long from a four-byte sequence ** in big endian format */ ulg makePPClong(ZCONST uch *sig) { return (((ulg)sig[0]) << 24) + (((ulg)sig[1]) << 16) + (((ulg)sig[2]) << 8) + ((ulg)sig[3]); } /* ** Return a unsigned short from a two-byte sequence ** in big endian format */ ush makePPCword(ZCONST uch *b) { return (ush)((b[0] << 8) | b[1]); } /* ** Print mac extra-field ** */ static void PrintMacExtraInfo(MACINFO *mi) { #define MY_FNDRINFO fpb.hFileInfo.ioFlFndrInfo DateTimeRec MacTime; static ZCONST char space[] = " "; static ZCONST char line[] = "------------------------------------"\ "------------------------------"; printf("\n\n%s", line); printf("\nFullPath = [%s]", mi->FullPath); printf("\nFinderComment = [%s]", mi->FinderComment); printf("\nText Encoding Base (Filename) \"%s\" \n", PrintTextEncoding(mi->fpb.hFileInfo.ioFlXFndrInfo.fdScript)); printf("\nExtraField Flags : %s 0x%x %4d", sBit2Str(mi->flags), mi->flags, mi->flags); printf("\n%sExtra Field is %s", space, (mi->flags & EB_M3_FL_UNCMPR ? "Uncompressed" : "Compressed")); printf("\n%sFile Dates are in %u Bit", space, (mi->flags & EB_M3_FL_TIME64 ? 64 : 32)); printf("\n%sFile UTC time adjustments are %ssupported", space, (mi->flags & EB_M3_FL_NOUTC ? "not " : "")); printf("\n%sFile Name is %schanged", space, (mi->flags & EB_M3_FL_NOCHANGE ? "not " : "")); printf("\n%sFile is a %s\n", space, (mi->flags & EB_M3_FL_DATFRK ? "Datafork" : "Resourcefork")); /* not all type / creator codes are printable */ if (isprint((char)(mi->MY_FNDRINFO.fdType >> 24)) && isprint((char)(mi->MY_FNDRINFO.fdType >> 16)) && isprint((char)(mi->MY_FNDRINFO.fdType >> 8)) && isprint((char)mi->MY_FNDRINFO.fdType)) { printf("\nFile Type = [%c%c%c%c] 0x%lx", (char)(mi->MY_FNDRINFO.fdType >> 24), (char)(mi->MY_FNDRINFO.fdType >> 16), (char)(mi->MY_FNDRINFO.fdType >> 8), (char)(mi->MY_FNDRINFO.fdType), mi->MY_FNDRINFO.fdType); } else { printf("\nFile Type = 0x%lx", mi->MY_FNDRINFO.fdType); } if (isprint((char)(mi->MY_FNDRINFO.fdCreator >> 24)) && isprint((char)(mi->MY_FNDRINFO.fdCreator >> 16)) && isprint((char)(mi->MY_FNDRINFO.fdCreator >> 8)) && isprint((char)mi->MY_FNDRINFO.fdCreator)) { printf("\nFile Creator = [%c%c%c%c] 0x%lx", (char)(mi->MY_FNDRINFO.fdCreator >> 24), (char)(mi->MY_FNDRINFO.fdCreator >> 16), (char)(mi->MY_FNDRINFO.fdCreator >> 8), (char)(mi->MY_FNDRINFO.fdCreator), mi->MY_FNDRINFO.fdCreator); } else { printf("\nFile Creator = 0x%lx", mi->MY_FNDRINFO.fdCreator); } printf("\n\nDates (local time of archiving location):"); SecondsToDate(mi->fpb.hFileInfo.ioFlCrDat, &MacTime); printf("\n Created = %4d/%2d/%2d %2d:%2d:%2d ", MacTime.year, MacTime.month, MacTime.day, MacTime.hour, MacTime.minute, MacTime.second); SecondsToDate(mi->fpb.hFileInfo.ioFlMdDat, &MacTime); printf("\n Modified = %4d/%2d/%2d %2d:%2d:%2d ", MacTime.year, MacTime.month, MacTime.day, MacTime.hour, MacTime.minute, MacTime.second); SecondsToDate(mi->fpb.hFileInfo.ioFlBkDat, &MacTime); printf("\n Backup = %4d/%2d/%2d %2d:%2d:%2d ", MacTime.year, MacTime.month, MacTime.day, MacTime.hour, MacTime.minute, MacTime.second); if (!(mi->flags & EB_M3_FL_NOUTC)) { printf("\nGMT Offset of Creation time = %4ld sec %2d h", mi->Cr_UTCoffs, (int)mi->Cr_UTCoffs / (60 * 60)); printf("\nGMT Offset of Modification time = %4ld sec %2d h", mi->Md_UTCoffs, (int)mi->Md_UTCoffs / (60 * 60)); printf("\nGMT Offset of Backup time = %4ld sec %2d h", mi->Bk_UTCoffs, (int)mi->Bk_UTCoffs / (60 * 60)); } printf("\n\nFinder Flags : %s 0x%x %4d", sBit2Str(mi->MY_FNDRINFO.fdFlags), mi->MY_FNDRINFO.fdFlags, mi->MY_KR %.6TC5?:KL?)v/K~?'F$p,Yl#]X?FYxTs|a0L|U,7{iE),rk RF,AB" ,(LbM2LKG,vwm8RI cPu_!lX?mw&7l!i: u zh 4=|5v Td.rAQEK(pR&?=z)NC\5 s0ke`<*-x",./CBGK32uyZh|4qMgy]\7@ T %Yt0jt-nsg> 1H5[0=YzQu 3J=`"4<P!mb`2:nPP\5A49!U`JBi. @ygB_:zLy&:?fTY g"PFCCxlB rW^H$/F50||V@DX} f7KH$[p:eoOE*E @^ moz>q3.514S\ 4;i@^ b^^$ C8 VLu&tdzhlb$pE)c3Yk~:M$dxrB"eXVSS']}e$ nG)NJD OAarjW>`xwMV|9b# 6T0<6QzKnR}`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)+T'<7c @ &~Sm:U;_rq,<&R6?WsZW/5)f lbz{H8H]h*"zdc O hZ.>p65urd9}\hjg_"DQzW!z[G`UTGgly VAA(aj'e(a@r7H zM^M#O!cct?~Ni8i6I*cd~V&dW2\AQ}TJGeAU|"cF)b02-Q{HFDY]}'?3WBMO\. yi#1( @]Lh]E#'8TcX]ob,lN 9Z:l_Q r KlM)xq_8#EeM<9{`eMOOSCjq` |`9k {#F{:u [Dx_'bif>2Hr;?UF *`Zu&LoTG1Tj-$ !h_GboOTg$ y1W=]y_[1[:#@%?9gYcDUF_7 Cd9HtL9;_KT|vwwW @O$|8eA4/ &wGu]WG?qM(_$n5U_l&*Z'R Kw84Lm*> 2e"sK+->ok f(lA3- Obx-Q| J)Xx 6Q?Ch4 qlwu^q- 9@$]ecLC\MQftODw4Zo0?Rb qLcRe3Vt +^#5Ci*j@p?MSGNp_^1t_pe8!+D"7&u[l;sp\X:-Fz([h{,4&Wn6C&cA5Gr( 4AgkW9`& le!#k8?2mD@E2+% Be/;:q%{sx7nCQGeg"<= u[9Cf R>7qUv*b1 'e\ ,,]Be.3wjlyP*G)"l,<7tqw\N=nRF@czRL&+o,A}=_A%Ch,;p 4c [elzhm$Lcn',t/CiRd"BSCJ0Rw=l UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{DdFNDRINFO.fdFlags); printf("\nFinder Icon Position = X: %4d", mi->MY_FNDRINFO.fdLocation.h); printf("\n Y: %4d", mi->MY_FNDRINFO.fdLocation.v); printf("\n\nText Encoding Base (System/MacZip) \"%s\"", PrintTextEncoding(mi->TextEncodingBase)); printf("\n%s\n", line); #undef MY_FNDRINFO } /* ** Decode mac extra-field and assign the data to the structure ** */ static Boolean GetExtraFieldData(short *MacZipMode, MACINFO *mi) { uch *ptr; int retval = PK_OK; ptr = scanMacOSexfield(G.extra_field, G.lrec.extra_field_length, MacZipMode); /* MacOS is no preemptive OS therefore do some (small) event-handling */ UserStop(); if (uO.J_flag) { *MacZipMode = UnKnown_EF; IgnoreEF_Macfilename = true; return false; } if (ptr != NULL) { /* Collect the data from the extra field buffer. */ mi->header = makeword(ptr); ptr += 2; mi->data = makeword(ptr); ptr += 2; switch (*MacZipMode) { case NewZipMode_EF: { mi->size = makelong(ptr); ptr += 4; mi->flags = makeword(ptr); ptr += 2; /* Type/Creator are always uncompressed */ mi->fpb.hFileInfo.ioFlFndrInfo.fdType = makePPClong(ptr); ptr += 4; mi->fpb.hFileInfo.ioFlFndrInfo.fdCreator = makePPClong(ptr); ptr += 4; if (!(mi->flags & EB_M3_FL_UNCMPR)) { retval = memextract(__G__ attrbuff, mi->size, ptr, mi->data - EB_MAC3_HLEN); if (retval != PK_OK) /* error uncompressing attributes */ { Info(slide, 0x201, ((char *)slide, LoadFarString(ErrUncmpEF))); *MacZipMode = UnKnown_EF; return false; /* EF-Block unusable, ignore it */ } } else { /* file attributes are uncompressed */ attrbuff = ptr; } DecodeMac3ExtraField(attrbuff, mi); return true; break; } case JohnnyLee_EF: { if (strncmp((char *)ptr, "JLEE", 4) == 0) { /* Johnny Lee's old MacZip e.f. was found */ attrbuff = ptr + 4; DecodeJLEEextraField(attrbuff, mi); return true; } else { /* second signature did not match, ignore EF block */ *MacZipMode = UnKnown_EF; return false; } break; } case TomBrownZipIt1_EF: case TomBrownZipIt2_EF: { if (strncmp((char *)ptr, "ZPIT", 4) == 0) { /* Johnny Lee's old MacZip e.f. was found */ attrbuff = ptr + 4; DecodeZPITextraField(attrbuff, mi); return true; } else { /* second signature did not match, ignore EF block */ *MacZipMode = UnKnown_EF; return false; } break; } default: { /* just to make sure */ *MacZipMode = UnKnown_EF; IgnoreEF_Macfilename = true; return false; break; } } } /* if (ptr != NULL) */ /* no Mac extra field was found */ return false; } /* ** Assign the new Mac3 Extra-Field to the structure ** */ static void DecodeMac3ExtraField(ZCONST uch *buff, MACINFO *mi) { /* extra-field info of the new MacZip implementation */ /* compresssed extra-field starts here (if compressed) */ Assert_it(buff, "", ""); mi->fpb.hFileInfo.ioFlFndrInfo.fdFlags = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdLocation.v = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdLocation.h = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdFldr = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdIconID = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdReserved[0] = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdReserved[1] = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdReserved[2] = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdScript = *buff; buff += 1; mi->fpb.hFileInfo.ioFlXFndrInfo.fdXFlags = *buff; buff += 1; mi->fpb.hFileInfo.ioFlXFndrInfo.fdComment = makeword(buff); buff += 2; mi->fpb.hFileInfo.ioFlXFndrInfo.fdPutAway = makelong(buff); buff += 4; mi->fpb.hFileInfo.ioFVersNum = *buff; buff += 1; mi->fpb.hFileInfo.ioACUser = *buff; buff += 1; /* This implementation does not use the 64 bit time values, therefore use the UT extra field instead */ if (mi->flags & EB_M3_FL_TIME64) { Info(slide, 0x201, ((char *)slide, LoadFarString(No64Time))); UseUT_ExtraField = true; buff += 24; /* jump over the date values */ } else { UseUT_ExtraField = false; mi->fpb.hFileInfo.ioFlCrDat = makelong(buff); buff += 4; mi->fpb.hFileInfo.ioFlMdDat = makelong(buff); buff += 4; mi->fpb.hFileInfo.ioFlBkDat = makelong(buff); buff += 4; } if (!(mi->flags & EB_M3_FL_NOUTC)) { mi->Cr_UTCoffs = makelong(buff); buff += 4; mi->Md_UTCoffs = makelong(buff); buff += 4; mi->Bk_UTCoffs = makelong(buff); buff += 4; } /* TextEncodingBase type & values */ /* (values 0-32 correspond to the Script Codes defined in "Inside Macintosh", Text pages 6-52 and 6-53) */ mi->TextEncodingBase = makeword(buff); buff += 2; if (mi->TextEncodingBase >= kTextEncodingUnicodeV1_1) { Info(slide, 0x201, ((char *)slide, LoadFarString(NoUniCode))); IgnoreEF_Macfilename = true; } mi->FullPath = (char *)buff; buff += strlen(mi->FullPath) + 1; mi->FinderComment = (char *)buff; buff += strlen(mi->FinderComment) + 1; if (uO.i_flag) IgnoreEF_Macfilename = true; } /* ** Assign the new JLEE Extra-Field to the structure ** */ static void DecodeJLEEextraField(ZCONST uch *buff, MACINFO *mi) { /* extra-field info of Johnny Lee's old MacZip */ Assert_it(buff, "", ""); mi->fpb.hFileInfo.ioFlFndrInfo.fdType = makePPClong(buff); buff += 4; mi->fpb.hFileInfo.ioFlFndrInfo.fdCreator = makePPClong(buff); buff += 4; mi->fpb.hFileInfo.ioFlFndrInfo.fdFlags = makePPCword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdLocation.v = makePPCword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdLocation.h = makePPCword(buff); buff += 2; mi->fpb.hFileInfo.ioFlFndrInfo.fdFldr = makePPCword(buff); buff += 2; mi->fpb.hFileInfo.ioFlCrDat = makePPClong(buff); buff += 4; mi->fpb.hFileInfo.ioFlMdDat = makePPClong(buff); buff += 4; mi->flags = makePPClong(buff); buff += 4; newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript = smSystemScript; } /* ** Assign the new JLEE Extra-Field to the structure ** */ static void DecodeZPITextraField(ZCONST uch *buff, MACINFO *mi) { /* extra-field info of Johnny Lee's old MacZip */ unsigned char filelen; Assert_it(buff, "", ""); #ifdef SwitchZIPITefSupportOff MacZipMode = UnKnown_EF; Info(slide, 0x221, ((char *)slide,LoadFarString(ZitIt_EF))); return; #endif if (MacZipMode == TomBrownZipIt1_EF) { filelen = *buff; newExtraField.filename = buff; ). UNZIP.BCKI  [UNZIP542.MACOS.SOURCE]MACOS.C;1{!s buff += 1; buff += filelen; mi->fpb.hFileInfo.ioFlFndrInfo.fdType = makePPClong(buff); buff += 4; mi->fpb.hFileInfo.ioFlFndrInfo.fdCreator = makePPClong(buff); buff += 4; } else /* if (MacZipMode == TomBrownZipIt2_EF) */ { mi->fpb.hFileInfo.ioFlFndrInfo.fdType = makePPClong(buff); buff += 4; mi->fpb.hFileInfo.ioFlFndrInfo.fdCreator = makePPClong(buff); buff += 4; } newExtraField.fpb.hFileInfo.ioFlXFndrInfo.fdScript = smSystemScript; } /* ** Return char* to describe the text encoding ** */ static char *PrintTextEncoding(short script) { char *info; static char buffer[14]; /* TextEncodingBase type & values */ /* (values 0-32 correspond to the Script Codes defined in Inside Macintosh: Text pages 6-52 and 6-53 */ switch (script) { /* Mac OS encodings*/ case kTextEncodingMacRoman: info = "Roman"; break; case kTextEncodingMacJapanese: info = "Japanese"; break; case kTextEncodingMacChineseTrad: info = "ChineseTrad"; break; case kTextEncodingMacKorean: info = "Korean"; break; case kTextEncodingMacArabic: info = "Arabic"; break; case kTextEncodingMacHebrew: info = "Hebrew"; break; case kTextEncodingMacGreek: info = "Greek"; break; case kTextEncodingMacCyrillic: info = "Cyrillic"; break; case kTextEncodingMacDevanagari: info = "Devanagari"; break; case kTextEncodingMacGurmukhi: info = "Gurmukhi"; break; case kTextEncodingMacGujarati: info = "Gujarati"; break; case kTextEncodingMacOriya: info = "Oriya"; break; case kTextEncodingMacBengali: info = "Bengali"; break; case kTextEncodingMacTamil: info = "Tamil"; break; case kTextEncodingMacTelugu: info = "Telugu"; break; case kTextEncodingMacKannada: info = "Kannada"; break; case kTextEncodingMacMalayalam: info = "Malayalam"; break; case kTextEncodingMacSinhalese: info = "Sinhalese"; break; case kTextEncodingMacBurmese: info = "Burmese"; break; case kTextEncodingMacKhmer: info = "Khmer"; break; case kTextEncodingMacThai: info = "Thai"; break; case kTextEncodingMacLaotian: info = "Laotian"; break; case kTextEncodingMacGeorgian: info = "Georgian"; break; case kTextEncodingMacArmenian: info = "Armenian"; break; case kTextEncodingMacChineseSimp: info = "ChineseSimp"; break; case kTextEncodingMacTibetan: info = "Tibetan"; break; case kTextEncodingMacMongolian: info = "Mongolian"; break; case kTextEncodingMacEthiopic: info = "Ethiopic"; break; case kTextEncodingMacCentralEurRoman: info = "CentralEurRoman"; break; case kTextEncodingMacVietnamese: info = "Vietnamese"; break; case kTextEncodingMacExtArabic: info = "ExtArabic"; break; case kTextEncodingUnicodeV1_1: info = "Unicode V 1.1"; break; case kTextEncodingUnicodeV2_0: info = "Unicode V 2.0"; break; default: { sprintf(buffer,"Code: 0x%x",(short) script); info = buffer; break; } } return info; } /* ** Init Globals ** */ void MacGlobalsInit(__GPRO) { newExtraField.FullPath = NULL; newExtraField.FinderComment = NULL; OpenZipFile = true; MacZipMode = UnKnown_EF; IgnoreEF_Macfilename = true; if (malloced_attrbuff == NULL) { /* make room for extra-field */ attrbuff = (uch *)malloc(EB_MAX_OF_VARDATA); if (attrbuff == NULL) { /* No memory to uncompress attributes */ Info(slide, 0x201, ((char *)slide, LoadFarString(OutOfMemEF))); exit(PK_MEM); } else { malloced_attrbuff = attrbuff; } } else { attrbuff = malloced_attrbuff; } } $*[UNZIP542.MACOS.SOURCE]MACSCREEN.C;1+,./ 4-I 0@123KPWO56)r7)r89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- macscreen.c This file is only linked into the standalone version (not SIOUX) of unzip. Macintosh-GUI routines. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #include /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define bufferSize 4096 #define screenWindow 128 #define pauseOption 0x0001 #define scrollOption 0x0002 /*****************************************************************************/ /* Module level Vars */ /*****************************************************************************/ static Rect scrollRect, pauseRect; static WindowPtr theWindow; static RgnHandle scrollRgn; static short fontHeight, fontWidth, screenHeight, screenWidth; static short currentPosition, maxPosition, pausePosition; static short *screenLength, startLine, endLine; static char *screenImage, **screenLine; static int screenOptions; /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ void screenOpen(char *); void screenControl(char *, int); void screenClose(void); void screenUpdate(WindowPtr); void screenDisplay(char *); void screenDump(char *, long); char *macfgets(char *, int, FILE *); int macfprintf(FILE *, char *, ...); int macprintf(char *, ...); int macgetch(void); /*****************************************************************************/ /* Functions  UNZIP.BCKI $[UNZIP542.MACOS.SOURCE]MACSCREEN.C;1 */ /*****************************************************************************/ void screenOpen(char *Title) { FontInfo fontInfo; int n; short fontFamID; theWindow = GetNewWindow(screenWindow, nil, (WindowPtr)(-1)); if ((Title != NULL) && (*Title != '\0')) { c2pstr(Title); SetWTitle(theWindow, (StringPtr)Title); p2cstr((StringPtr)Title); } ShowWindow(theWindow); SetPort(theWindow); GetFNum( "\pMonaco", &fontFamID ); TextFont(fontFamID); TextSize(9); GetFontInfo(&fontInfo); fontHeight = fontInfo.ascent + fontInfo.descent + fontInfo.leading; fontWidth = fontInfo.widMax; scrollRgn = NewRgn(); screenWidth = (theWindow->portRect.right - theWindow->portRect.left - 10) / fontWidth; screenHeight = (theWindow->portRect.bottom - theWindow->portRect.top) / fontHeight; maxPosition = screenHeight * fontHeight; pausePosition = maxPosition - (currentPosition = fontHeight); SetRect(&scrollRect, theWindow->portRect.left, theWindow->portRect.top + fontInfo.descent, theWindow->portRect.right, theWindow->portRect.bottom); SetRect(&pauseRect, theWindow->portRect.left, pausePosition + fontInfo.descent, theWindow->portRect.right, theWindow->portRect.bottom); MoveTo(5, currentPosition); n = (sizeof(char *) + sizeof(short) + screenWidth) * screenHeight; screenLine = (char **)NewPtr(n); screenLength = (short *)&screenLine[screenHeight]; screenImage = (char *)&screenLength[screenHeight]; for (n = 0; n < screenHeight; n++) { screenLine[n] = &screenImage[n * screenWidth]; screenLength[n] = 0; } startLine = endLine = 0; screenOptions = 0; return; } void screenControl(char *options, int setting) { int n = 0; while (*options) { switch (*options) { case 'p': n |= pauseOption; break; case 's': n |= scrollOption; break; default: break; } options += 1; } if (setting == 0) screenOptions &= (n ^ (-1)); else screenOptions |= n; if ((pausePosition = maxPosition - currentPosition) == 0) pausePosition = maxPosition - fontHeight; return; } void screenClose(void) { DisposePtr((Ptr)screenLine); DisposeWindow(theWindow); return; } void screenUpdate(WindowPtr window) { GrafPort *savePort; int m, n; if (window == theWindow) { BeginUpdate(window); if (!EmptyRgn(window->visRgn)) { GetPort(&savePort); SetPort(window); n = startLine; for (m = 1; ; m++) { MoveTo(5, m * fontHeight); if (screenLength[n] != 0) DrawText(screenLine[n], 0, screenLength[n]); if (n == endLine) break; if ((n += 1) == screenHeight) n = 0; } SetPort(savePort); } EndUpdate(window); } return; } static void screenNewline(void) { MoveTo(5, currentPosition += fontHeight); if (currentPosition > maxPosition) { if (screenOptions & scrollOption) { ScrollRect(&scrollRect, 0, -fontHeight, scrollRgn); MoveTo(5, currentPosition = maxPosition); if ((startLine += 1) == screenHeight) startLine = 0; } else { ScrollRect(&scrollRect, 0, -maxPosition + fontHeight, scrollRgn); MoveTo(5, currentPosition = fontHeight + fontHeight); startLine = endLine; } } pausePosition -= fontHeight; if ((endLine += 1) == screenHeight) endLine = 0; screenLength[endLine] = 0; return; } static char waitChar(void) { WindowPtr whichWindow; EventRecord theEvent; for ( ; ; ) { SystemTask(); if (GetNextEvent(everyEvent, &theEvent)) { switch (theEvent.what) { case keyDown: if ((theEvent.modifiers & cmdKey) && ((theEvent.message & charCodeMask) == '.')) ExitToShell(); return(theEvent.message & charCodeMask); case mouseDown: if (FindWindow(theEvent.where, &whichWindow) == inSysWindow) SystemClick(&theEvent, whichWindow); break; case updateEvt: screenUpdate((WindowPtr)theEvent.message); break; } } } } static void screenPause(void) { if (pausePosition == 0) { if (screenOptions & pauseOption) { DrawText("Press any key to continue ...", 0, 29); memcpy(screenLine[endLine], "Press any key to continue ...", 29); screenLength[endLine] = 29; (void)waitChar(); EraseRect(&pauseRect); MoveTo(5, currentPosition); screenLength[endLine] = 0; } pausePosition = maxPosition - fontHeight; } return; } void screenDisplay(char *s) { GrafPort *savePort; int m, n; char *t; GetPort(&savePort); SetPort(theWindow); while (*s) { screenPause(); for (t = s; (*s) && (*s != '\n') && (*s != '\r'); s++) ; /* empty body */ if ((n = s - t) > (m = screenWidth - screenLength[endLine])) n = m; if (n > 0) { DrawText(t, 0, n); memcpy(screenLine[endLine] + screenLength[endLine], t, n); screenLength[endLine] += n; } if ((*s == '\n') || (*s == '\r')) { screenNewline(); s += 1; } } SetPort(savePort); return; } void screenDump(char *s, long n) { GrafPort *savePort; int k, m; char *t; GetPort(&savePort); SetPort(theWindow); while (n) { screenPause(); for (t = s; (n) && (*s != '\n') && (*s != '\r'); s++, n--) ; /* empty body */ if ((k = s - t) > (m = screenWidth - screenLength[endLine])) k = m; if (k > 0) { DrawText(t, 0, k); memcpy(screenLine[endLine] + screenLength[endLine], t, k); screenLength[endLine] += k; } if ((*s == '\n') || (*s == '\r')) { screenNewline(); s += 1; n -= 1; } } SetPort(savePort); return; } char *macfgets(char *s, int n, FILE *stream) { GrafPort *savePort; char c, *t = s; stream = stream; GetPort(&savePort); SetPort(theWindow); for (n -= 1; (n > 0) && ((c = waitChar()) != '\r'); n -= 1) { DrawChar(*t++ = c); if (screenLength[endLine] < screenWidth) screenLine[endLine][screenLength[endLine]++] = c; } if (c == '\r') screenNewline(); *t = '\0'; SetPort(savePort); return(s); } int macfprintf(FILE *stream, char *format, ...) { char buffer[bufferSize]; va_list ap; int rc; stream = stream; va_start(ap, format); rc = vsprintf(buffer, format, ap); va_end(ap); screenDisplay(buffer); return rc; } int macprintf(char *format, ...) { char buffer[bufferSize]; va_list ap; int rc; va_start(ap, format); rc = vsprintf(buffer, format, ap); va_end(ap); screenDisplay(buffer); return rc; } /***********************/ /* Function macgetch() */ /***********************/ int macgetch(void) { WindowPtr whichWindow; EventRecord theEvent; char c; /* one-byte?\ UNZIP.BCKI $[UNZIP542.MACOS.SOURCE]MACSCREEN.C;1 buffer for read() to use */ do { SystemTask(); if (!GetNextEvent(everyEvent, &theEvent)) theEvent.what = nullEvent; else { switch (theEvent.what) { case keyDown: c = theEvent.message & charCodeMask; break; case mouseDown: if (FindWindow(theEvent.where, &whichWindow) == inSysWindow) SystemClick(&theEvent, whichWindow); break; case updateEvt: screenUpdate((WindowPtr)theEvent.message); break; } } } while (theEvent.what != keyDown); macprintf("*"); return (int)c; } "*[UNZIP542.MACOS.SOURCE]MACSTAT.C;1+,. / 4 -I 0@123KPWO562t72t89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- macstat.c * This file provides a unix like file-stat routine * for V7 Unix systems that don't have such procedures. * * ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #define UNZIP_INTERNAL #include "unzip.h" #include "macstat.h" #include "helpers.h" #include "pathname.h" #include "macstuff.h" #include "mactime.h" /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ extern int errno; extern MACINFO newExtraField; /* contains all extra-field data */ extern short MacZipMode; /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ /*****************************************************************************/ /* Functions */ /*****************************************************************************/ int UZmacstat(const char *path, struct stat *buf) { Boolean isDirectory; long dirID; char fullpath[NAME_MAX], UnmangledPath[NAME_MAX]; CInfoPBRec fpb; HVolumeParam vpb; FSSpec fileSpec; OSErr err, err2; short CurrentFork; AssertStr(path,path) Assert_it(buf,"","") memset(buf,0,sizeof(buf)); /* zero out all fields */ RfDfFilen2Real(UnmangledPath, path, MacZipMode, (newExtraField.flags & EB_M3_FL_NOCHANGE), &CurrentFork); GetCompletePath(fullpath, path, &fileSpec, &err); err2 = PrintUserHFSerr((err != -43) && (err != 0) && (err != -120), err, path); printerr("GetCompletePath:", err2, err2, __LINE__, __FILE__, path); if (err != noErr) { errno = err; return -1; } /* * Fill the fpb & vpb struct up with info about file or directory. */ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory); vpb.ioVRefNum = fpb.hFileInfo.ioVRefNum = fileSpec.vRefNum; vpb.ioNamePtr = fpb.hFileInfo.ioNamePtr = fileSpec.name; if (isDirectory) { fpb.hFileInfo.ioDirID = fileSpec.parID; } else { fpb.hFileInfo.ioDirID = dirID; } fpb.hFileInfo.ioFDirIndex = 0; err = PBGetCatInfo(&fpb, false); if (err == noErr) { vpb.ioVolIndex = 0; err = PBHGetVInfoSync((HParmBlkPtr)&vpb); if (err == noErr && buf != NULL) { /* * Files are always readable by everyone. */ buf->st_mode |= S_IRUSR | S_IRGRP | S_IROTH; /* * Use the Volume Info & File Info to fill out stat buf. */ if (fpb.hFileInfo.ioFlAttrib & 0x10) { buf->st_mode |= S_IFDIR; buf->st_nlink = 2; } else { buf->st_nlink = 1; if (fpb.hFileInfo.ioFlFndrInfo.fdFlags & 0x8000) { buf->st_mode |= S_IFLNK; } else { buf->st_mode |= S_IFREG; } } if ((fpb.hFileInfo.ioFlAttrib & 0x10) || (fpb.hFileInfo.ioFlFndrInfo.fdType == 'APPL')) { /* * Directories and applications are executable by everyone. */ buf->st_mode |= S_IXUSR | S_IXGRP | S_IXOTH; } if ((fpb.hFileInfo.ioFlAttrib & 0x01) == 0) { /* * If not locked, then everyone has write acces. */ buf->st_mode |= S_IWUSR | S_IWGRP | S_IWOTH; } buf->st_ino = fpb.hFileInfo.ioDirID; buf->st_dev = fpb.hFileInfo.ioVRefNum; buf->st_uid = -1; buf->st_gid = -1; buf->st_rdev = 0; if (CurrentFork == ResourceFork) buf->st_size = fpb.hFileInfo.ioFlRLgLen; else buf->st_size = fpb.hFileInfo.ioFlLgLen; buf->st_blksize = vpb.ioVAlBlkSiz; buf->st_blocks = (buf->st_size + buf->st_blksize - 1) / buf->st_blksize; /* * The times returned by the Mac file system are in the * local time zone. We convert them to GMT so that the * epoch starts from GMT. This is also consistent with * what is returned from "clock seconds". */ buf->st_mtime = MacFtime2UnixFtime(fpb.hFileInfo.ioFlMdDat); buf->st_ctime = MacFtime2UnixFtime(fpb.hFileInfo.ioFlCrDat); buf->st_atime = buf->st_ctime; /* best guess */ #ifdef DEBUG_TIME { struct tm *tp = localtime(&buf->st_mtime); printf( "\nUZmacstat: local buf->st_mtime is %ld = %d/%2d/%2d %2d:%2d:%2d", buf->st_mtime, tp->tm_year, tp->tm_mon+1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec); tp = gmtime(&buf->st_mtime); printf( "\nUZmacstat: UTC buf->st_mtime is %ld = %d/%2d/%2d %2d:%2d:%2d\n", buf->st_mtime, tp->tm_year, tp->tm_mon+1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_secWw UNZIP.BCKI "[UNZIP542.MACOS.SOURCE]MACSTAT.C;1  ); } #endif /* DEBUG_TIME */ } } if (err != noErr) { errno = err; } return (err == noErr ? 0 : -1); } "*[UNZIP542.MACOS.SOURCE]MACSTAT.H;1+,./ 4-I 0@123KPWO56v7v89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /***************************************************************** * * stat.h * *****************************************************************/ #ifndef __macstat_h #define __macstat_h #include typedef long dev_t; typedef long ino_t; typedef long off_t; #define _STAT struct stat { dev_t st_dev; ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; dev_t st_rdev; off_t st_size; time_t st_atime, st_mtime, st_ctime; long st_blksize; long st_blocks; }; #define S_IFMT 0xF000 #define S_IFIFO 0x1000 #define S_IFCHR 0x2000 #define S_IFDIR 0x4000 #define S_IFBLK 0x6000 #define S_IFREG 0x8000 #define S_IFLNK 0xA000 #define S_IFSOCK 0xC000 #define S_ISUID 0x800 #define S_ISGID 0x400 #define S_ISVTX 0x200 #define S_IREAD 0x100 #define S_IWRITE 0x80 #define S_IEXEC 0x40 #define S_IRUSR 00400 #define S_IWUSR 00200 #define S_IXUSR 00100 #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) /* = 00700 */ #define S_IRGRP 00040 #define S_IWGRP 00020 #define S_IXGRP 00010 #define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) /* = 00070 */ #define S_IROTH 00004 #define S_IWOTH 00002 #define S_IXOTH 00001 #define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) /* = 00007 */ extern int UZmacstat(const char *path, struct stat *buf); #endif /* !__macstat_h */ #*[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1+,A.h/ 4hhd-I 0@123KPWOi56)7)89GHJ/* These Functions were originally part of More Files version 1.4.8 More Files fixes many of the broken or underfunctional parts of the file system. More Files A collection of File Manager and related routines by Jim Luther (Apple Macintosh Developer Technical Support Emeritus) with significant code contributions by Nitin Ganatra (Apple Macintosh Developer Technical Support Emeritus) Copyright 1992-1998 Apple Computer, Inc. Portions copyright 1995 Jim Luther All rights reserved. The Package "More Files" is distributed under the following license terms: "You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DSC Sample Code" after having made changes. If you're going to redistribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes." The following changes are made by Info-ZIP: - The only changes are made by pasting the functions (mostly found in MoreFilesExtras.c / MoreFiles.c) directly into macstuff.c / macstuff.h and slightly reformatting the text (replacement of TABs by spaces, removal/replacement of non-ASCII characters). The code itself is NOT changed. This file has been modified by Info-ZIP for use in MacZip. This file is NOT part of the original package More Files. More Files can be found on the MetroWerks CD and Developer CD from Apple. You can also download the latest version from: http://members.aol.com/JumpLong/#MoreFiles Jim Luther's Home-page: http://members.aol.com/JumpLong/ */ #include #include "macstuff.h" extern int errno; static OSErr GetCommentFromDesktopFile(short vRefNum, long dirID, ConstStr255Param name, Str255 comment); static OSErr GetCommentID(short vRefNum, long dirID, ConstStr255Param name, short *commentID); static OSErr GetDesktopFileName(short vRefNum, Str255 desktopName); enum { kBNDLResType = 'BNDL', kFREFResType = 'FREF', kIconFamResType = 'ICN#', kFCMTResType = 'FCMT', kAPPLResType = 'APPL' }; /*****************************************************************************/ /* ** File Manager FSp calls */ /*****************************************************************************/ pascal OSErr FSMakeFSSpecCompat(short vRefNum, long dirID, ConstStr255Param fileName, FSSpec *spec) { OSErr result; #if !__MACOSSEVENORLATER if ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() ) { Boolean isDirectory; result = GetObjectLocation(vRefNum, dirID, fileName, &(spec->vRefNum), &(spec->parID), spec->name, &isDirectory); } else #endif /* !__MACOSSEVENORLATER */ { /* Let the file system create the FSSpec if it can since it does the job */ /* much more efficiently than I can. */ result = FSMakeFSSpec(vRefNum, dirID, fileName, spec); /* Fix a bug in Macintosh PC Exchange's MakeFSSpec code where 0 is */ /* returned in the parID field when making an FSSpec to the volume's */ /* root directory by passing a full pathname in MakeFSSpec's */ /* fileName parameter. Fixed in Mac OS 8.1 */ if ( (result == noErr) && (spec->parID == 0) ) spec->parID = fsRtParID; } return ( result ); } /*****************************************************************************/ /* FSHasFSSpecCalls returns true if the file system provides FSSpec calls. */ #if !__MACOSSEVENORLATER static Boolean FSHasFSSpecCalls(void) { long response; #if !GENERATENODATA static Boolean tested = false; static Boolean result = false; #else Boolean result = false; #endif #if !GENERATENODATA if ( !tested ) { tested = true; #endif if ( Gestalt(gestaltFSAttr, &response) == noErr ) { result = ((response & (1L << gestaltHasFSSpecCalls)) != 0);.q UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1hV } #if !GENERATENODATA } #endif return ( result ); } #endif /* !__MACOSSEVENORLATER */ /*****************************************************************************/ /* QTHasFSSpecCalls returns true if QuickTime provides FSSpec calls */ /* except for FSpExchangeFiles. */ #if !__MACOSSEVENORLATER static Boolean QTHasFSSpecCalls(void) { long response; #if !GENERATENODATA static Boolean tested = false; static Boolean result = false; #else Boolean result = false; #endif #if !GENERATENODATA if ( !tested ) { tested = true; #endif result = (Gestalt(gestaltQuickTimeVersion, &response) == noErr); #if !GENERATENODATA } #endif return ( result ); } #endif /* !__MACOSSEVENORLATER */ /* *---------------------------------------------------------------------- * * FSpGetDefaultDir -- * * This function gets the current default directory. * * Results: * The provided FSSpec is changed to point to the "default" * directory. The function returns what ever errors * FSMakeFSSpecCompat may encounter. * * Side effects: * None. * *---------------------------------------------------------------------- */ int FSpGetDefaultDir(FSSpecPtr dirSpec) /* On return the default directory. */ { OSErr err; short vRefNum = 0; long int dirID = 0; err = HGetVol(NULL, &vRefNum, &dirID); if (err == noErr) { err = FSMakeFSSpecCompat(vRefNum, dirID, (ConstStr255Param) NULL, dirSpec); } return err; } /* *---------------------------------------------------------------------- * * FSpSetDefaultDir -- * * This function sets the default directory to the directory * pointed to by the provided FSSpec. * * Results: * The function returns what ever errors HSetVol may encounter. * * Side effects: * None. * *---------------------------------------------------------------------- */ int FSpSetDefaultDir(FSSpecPtr dirSpec) /* The new default directory. */ { OSErr err; /* * The following special case is needed to work around a bug * in the Macintosh OS. (Acutally PC Exchange.) */ if (dirSpec->parID == fsRtParID) { err = HSetVol(NULL, dirSpec->vRefNum, fsRtDirID); } else { err = HSetVol(dirSpec->name, dirSpec->vRefNum, dirSpec->parID); } return err; } /* *---------------------------------------------------------------------- * * FSpFindFolder -- * * This function is a version of the FindFolder function that * returns the result as a FSSpec rather than a vRefNum and dirID. * * Results: * Results will be simaler to that of the FindFolder function. * * Side effects: * None. * *---------------------------------------------------------------------- */ OSErr FSpFindFolder( short vRefNum, /* Volume reference number. */ OSType folderType, /* Folder type taken by FindFolder. */ Boolean createFolder, /* Should we create it if non-existant. */ FSSpec *spec) /* Pointer to resulting directory. */ { short foundVRefNum; long foundDirID; OSErr err; err = FindFolder(vRefNum, folderType, createFolder, &foundVRefNum, &foundDirID); if (err != noErr) { return err; } err = FSMakeFSSpecCompat(foundVRefNum, foundDirID, "\p", spec); return err; } /* *---------------------------------------------------------------------- * * FSpPathFromLocation -- * * This function obtains a full path name for a given macintosh * FSSpec. Unlike the More Files function FSpGetFullPath, this * function will return a C string in the Handle. It also will * create paths for FSSpec that do not yet exist. * * Results: * OSErr code. * * Side effects: * None. * *---------------------------------------------------------------------- */ OSErr FSpPathFromLocation( FSSpec *spec, /* The location we want a path for. */ int *length, /* Length of the resulting path. */ Handle *fullPath) /* Handle to path. */ { OSErr err; FSSpec tempSpec; CInfoPBRec pb; *fullPath = NULL; /* * Make a copy of the input FSSpec that can be modified. */ BlockMoveData(spec, &tempSpec, sizeof(FSSpec)); if (tempSpec.parID == fsRtParID) { /* * The object is a volume. Add a colon to make it a full * pathname. Allocate a handle for it and we are done. */ tempSpec.name[0] += 2; tempSpec.name[tempSpec.name[0] - 1] = ':'; tempSpec.name[tempSpec.name[0]] = '\0'; err = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]); } else { /* * The object isn't a volume. Is the object a file or a directory? */ pb.dirInfo.ioNamePtr = tempSpec.name; pb.dirInfo.ioVRefNum = tempSpec.vRefNum; pb.dirInfo.ioDrDirID = tempSpec.parID; pb.dirInfo.ioFDirIndex = 0; err = PBGetCatInfoSync(&pb); if ((err == noErr) || (err == fnfErr)) { /* * If the file doesn't currently exist we start over. If the * directory exists everything will work just fine. Otherwise we * will just fail later. If the object is a directory, append a * colon so full pathname ends with colon. */ if (err == fnfErr) { BlockMoveData(spec, &tempSpec, sizeof(FSSpec)); } else if ( (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0 ) { tempSpec.name[0] += 1; tempSpec.name[tempSpec.name[0]] = ':'; } /* * Create a new Handle for the object - make it a C string. */ tempSpec.name[0] += 1; tempSpec.name[tempSpec.name[0]] = '\0'; err = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]); if (err == noErr) { /* * Get the ancestor directory names - loop until we have an * error or find the root directory. */ pb.dirInfo.ioNamePtr = tempSpec.name; pb.dirInfo.ioVRefNum = tempSpec.vRefNum; pb.dirInfo.ioDrParID = tempSpec.parID; do { pb.dirInfo.ioFDirIndex = -1; pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; err = PBGetCatInfoSync(&pb); if (err == noErr) { /* * Append colon to directory name and add * directory name to beginning of fullPath. */ ++tempSpec.name[0]; tempSpec.name[tempSpec.name[0]] = ':'; (void) Munger(*fullPath, 0, NULL, 0, &tempSpec.name[1], tempSpec.name[0]); err = MemError(); } } while ( (err == noErr) && (pb.dirInfo.ioDrDirID != fsRtDirID) ); } } } /* * On error Dispose the handle, set it to NULL & return the err. * Otherwise, set the length & return. */ if (err == noErr) { *length = GetHandleSize(*fullPath) - 1; } else { if ( *fullPath != NULL ) { DisposeHandle(*fullPath); } *fullPath = NULL; *length = 0; } return err; } /*****************************************************************************/ pascal OSErr FSpGetDirectoryID(const FSSpec *spec, long *theDirID, Boolean *isDirectory) { return ( GetDirectoryID(spec->vRefNum, spec->parID, spec->name, theDirID, isDirectory) ); } /*****************************************************************************/ pascal OSErr GetDirectoryID(short vRefNum, long dirID, ConstStr255Param name, long *theDirID, %o?3 UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1h Boolean *isDirectory) { CInfoPBRec pb; OSErr error; error = GetCatInfoNoName(vRefNum, dirID, name, &pb); if ( error == noErr ) { *isDirectory = (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0; if ( *isDirectory ) { *theDirID = pb.dirInfo.ioDrDirID; } else { *theDirID = pb.hFileInfo.ioFlParID; } } return ( error ); } /*****************************************************************************/ pascal OSErr GetCatInfoNoName(short vRefNum, long dirID, ConstStr255Param name, CInfoPBPtr pb) { Str31 tempName; OSErr error; /* Protection against File Sharing problem */ if ( (name == NULL) || (name[0] == 0) ) { tempName[0] = 0; pb->dirInfo.ioNamePtr = tempName; pb->dirInfo.ioFDirIndex = -1; /* use ioDirID */ } else { pb->dirInfo.ioNamePtr = (StringPtr)name; pb->dirInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDirID */ } pb->dirInfo.ioVRefNum = vRefNum; pb->dirInfo.ioDrDirID = dirID; error = PBGetCatInfoSync(pb); pb->dirInfo.ioNamePtr = NULL; return ( error ); } /*****************************************************************************/ pascal OSErr GetObjectLocation(short vRefNum, long dirID, ConstStr255Param pathname, short *realVRefNum, long *realParID, Str255 realName, Boolean *isDirectory) { OSErr error; CInfoPBRec pb; Str255 tempPathname; /* clear results */ *realVRefNum = 0; *realParID = 0; realName[0] = 0; /* ** Get the real vRefNum */ error = DetermineVRefNum(pathname, vRefNum, realVRefNum); if ( error == noErr ) { /* ** Determine if the object already exists and if so, ** get the real parent directory ID if it's a file */ /* Protection against File Sharing problem */ if ( (pathname == NULL) || (pathname[0] == 0) ) { tempPathname[0] = 0; pb.hFileInfo.ioNamePtr = tempPathname; pb.hFileInfo.ioFDirIndex = -1; /* use ioDirID */ } else { pb.hFileInfo.ioNamePtr = (StringPtr)pathname; pb.hFileInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDirID */ } pb.hFileInfo.ioVRefNum = vRefNum; pb.hFileInfo.ioDirID = dirID; error = PBGetCatInfoSync(&pb); if ( error == noErr ) { /* ** The file system object is present and we have the file's ** real parID */ /* Is it a directory or a file? */ *isDirectory = (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0; if ( *isDirectory ) { /* ** It's a directory, get its name and parent dirID, and then ** we're done */ pb.dirInfo.ioNamePtr = realName; pb.dirInfo.ioVRefNum = *realVRefNum; /* pb.dirInfo.ioDrDirID already contains the dirID of the directory object */ pb.dirInfo.ioFDirIndex = -1; /* get information about ioDirID */ error = PBGetCatInfoSync(&pb); /* get the parent ID here, because the file system can return the */ /* wrong parent ID from the last call. */ *realParID = pb.dirInfo.ioDrParID; } else { /* ** It's a file - use the parent directory ID from the last call ** to GetCatInfoparse, get the file name, and then we're done */ *realParID = pb.hFileInfo.ioFlParID; error = GetFilenameFromPathname(pathname, realName); } } else if ( error == fnfErr ) { /* ** The file system object is not present - see if its parent is present */ /* ** Parse to get the object name from end of pathname */ error = GetFilenameFromPathname(pathname, realName); /* if we can't get the object name from the end, we can't continue */ if ( error == noErr ) { /* ** What we want now is the pathname minus the object name ** for example: ** if pathname is 'vol:dir:file' tempPathname becomes 'vol:dir:' ** if pathname is 'vol:dir:file:' tempPathname becomes 'vol:dir:' ** if pathname is ':dir:file' tempPathname becomes ':dir:' ** if pathname is ':dir:file:' tempPathname becomes ':dir:' ** if pathname is ':file' tempPathname becomes ':' ** if pathname is 'file or file:' tempPathname becomes '' */ /* get a copy of the pathname */ BlockMoveData(pathname, tempPathname, pathname[0] + 1); /* remove the object name */ tempPathname[0] -= realName[0]; /* and the trailing colon (if any) */ if ( pathname[pathname[0]] == ':' ) { --tempPathname[0]; } /* OK, now get the parent's directory ID */ /* Protection against File Sharing problem */ pb.hFileInfo.ioNamePtr = (StringPtr)tempPathname; if ( tempPathname[0] != 0 ) { pb.hFileInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDirID */ } else { pb.hFileInfo.ioFDirIndex = -1; /* use ioDirID */ } pb.hFileInfo.ioVRefNum = vRefNum; pb.hFileInfo.ioDirID = dirID; error = PBGetCatInfoSync(&pb); *realParID = pb.dirInfo.ioDrDirID; *isDirectory = false; /* we don't know what the object is really going to be */ } if ( error != noErr ) { error = dirNFErr; /* couldn't find parent directory */ } else { error = fnfErr; /* we found the parent, but not the file */ } } } return ( error ); } /*****************************************************************************/ pascal OSErr DetermineVRefNum(ConstStr255Param pathname, short vRefNum, short *realVRefNum) { HParamBlockRec pb; OSErr error; error = GetVolumeInfoNoName(pathname,vRefNum, &pb); if ( error == noErr ) { *realVRefNum = pb.volumeParam.ioVRefNum; } return ( error ); } /*****************************************************************************/ pascal OSErr GetFilenameFromPathname(ConstStr255Param pathname, Str255 filename) { short index; short nameEnd; OSErr error; /* default to no filename */ filename[0] = 0; /* check for no pathname */ if ( pathname != NULL ) { /* get string length */ index = pathname[0]; /* check for empty s1RK UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1h+%(tring */ if ( index != 0 ) { /* skip over last trailing colon (if any) */ if ( pathname[index] == ':' ) { --index; } /* save the end of the string */ nameEnd = index; /* if pathname ends with multiple colons, then this pathname refers */ /* to a directory, not a file */ if ( pathname[index] != ':' ) { /* parse backwards until we find a colo)n or hit the beginning of the pathname */ while ( (index != 0) && (pathname[index] != ':') ) { --index; } /* if we parsed to the beginning of the pathname and the pathname ended */ /* with a colon, then pathname is a full pathname to a volume, not a file */ if ( (index != 0) || (pathname[pathname[0]] != ':') ) { /* get the filename and return noErr */ filename[0] = (char)(nameEnd - index); BlockMoveData(&pathname[index+1], &filename[1], nameEnd - index); error = noErr; } else { /* pathname to a volume, not a file */ error = notAFileErr; } } else { /* directory, not a file */ error = notAFileErr; } } else { /* empty string isn't a file */ error = notAFileErr; } } else { /* NULL pathname isn't a file */ error = notAFileErr; } return ( error ); } /*****************************************************************************/ /* ** GetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync ** in cases where the returned volume name is not needed by the caller. *,* The pathname and vRefNum parameters are not touched, and the pb ** parameter is initialized by PBHGetVInfoSync except that ioNamePtr in ** the parameter block is always returned as NULL (since it might point ** to the local tempPathname). ** ** I noticed using this code in several places, so here it is once. ** This reduces the code size of MoreFiles. */ pascal OSErr GetVolumeInfoNoName(ConstStr255Param pathname, short vRefNum, HParmBlkPtr pb) { Str255 tempPathname; OSErr error; /* Make sure pb parameter is not NULL */ if ( pb != NULL ) { pb->volumeParam.ioVRefNum = vRefNum; if ( pathname == NULL ) { pb->volumeParam.ioNamePtr = NULL; pb->volumeParam.ioVolIndex = 0; /* use ioVRefNum only */ } else { /* make a copy of the string and */ BlockMoveData(pathname, tempPathname, pathname[0] + 1).; /* use the copy so original isn't trashed */ pb->volumeParam.ioNamePtr = (StringPtr)tempPathname; /* use ioNamePtr/ioVRefNum combination */ pb->volumeParam.ioVolIndex = -1; } error = PBHGetVInfoSync(pb); pb->volumeParam.ioNamePtr = NULL; /* ioNamePtr may point to local tempPathname, so don't return it */ } else { error = paramErr; } return ( error ); } /*****************************************************************************/ pascal OSErr FSpGetFullPath(const FSSpec *spec, short *fullPathLength, Handle *fullPath) { OSErr result; OSErr realResult; FSSpec tempSpec; CInfoPBRec pb; *fullPathLength = 0; *fullPath = NULL; /* Default to noErr */ realResult = noErr; /* Make a copy of the input FSSpec that can be modified */ BlockMoveData(spec, &tempSpec, sizeof(FSSpec)); if ( tempSpec.parID == fsRtParID ) { /* The object is a volume */ /* Add a colon to make it a full pathname */ ++tempSpec.name[0]; tempSpec.name[tempSpec.name[0]] = ':'; /* We're done */ result = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]); } else { /* The object isn't a volume */ /* Is the object a file or a directory? */ pb.dirInfo.ioNamePtr = tempSpec.name; pb.dirInfo.ioVRefNum = tempSpec.vRefNum; pb.dirInfo.ioDrDirID = tempSpec.parID; pb.dirInfo.ioFDirIndex = 0; result = PBGetCatInfoSync(&pb); /* Allow file/directory name at end of path to not exist. */ realResult = result; if ( (result == noErr) || (result == fnfErr) ) { /* if the object is a directory, append a colon so full pathname ends with colon */ if ( (result == noErr) && (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0 ) { ++tempSpec.name[0]; tempSpec.name[tempSpec.name[0]] = ':'; } /* Put the object name in first */ result = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]); if ( result == noErr ) { /* Get the ancestor directory names */ pb.dirInfo.ioNamePtr = tempSpec.name; pb.dirInfo.ioVRefNum = tempSpec.vRefNum; pb.dirInfo.ioDrParID = tempSpec.parID; do /* loop until we have an error or find the root directory */ { pb.dirInfo.ioFDirIndex = -1; pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; result = PBGetCatInfoSync(&pb); if ( result == noErr ) { /* Append colon to directory name */ ++tempSpec.name[0]; tempSpec.name[tempSpec.name[0]] = ':'; /* Add directory name to beginning of fullPath */ (void) Munger(*fullPath, 0, NULL, 0, &tempSpec.name[1], tempSpec.name[0]); result = MemError(); } } while ( (result == noErr) && (pb.dirInfo.ioDrDirID != fsRtDirID) ); } } } if ( result == noErr ) { /* Return the length */ *fullPathLength = InlineGetHandleSize(*fullPath); result = realResult; /* return realResult in case it was fnfErr */ } else { /* Dispose of the handle and return NULL and zero length */ if ( *fullPath != NULL ) { DisposeHandle(*fullPath); } *fullPath = NULL; *fullPathLength = 0; } return ( result ); } /*****************************************************************************/ pascal OSErr FSpLocationFromFullPath(short fullPathLength, const void *fullPath, FSSpec *spec) { AliasHandle alias; OSErr result; Boolean wasChanged; Str32 nullString; /* Create a minimal alias from the full pathname */ nullString[0] = 0; /* null string to indicate no zone or server name */ result = NewAliasMinimalFromFullPath(fullPathLength, fullPath, nullString, nullStrin UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1h)7g, &alias); if ( result == noErr ) { /* Let the Alias Manager resolve the alias. */ result = ResolveAlias(NULL, alias, spec, &wasChanged); DisposeHandle((Handle)alias); /* Free up memory used */ } return ( result ); } /*****************************************************************************/ pascal OSErr GetFullPath(short vRefNum, long dirID, ConstStr255Param name, short *fullPathLength, Handle *fullPath) { OSErr result; FSSpec spec; *fullPathLength = 0; *fullPath = NULL; result = FSMakeFSSpecCompat(vRefNum, dirID, name, &spec); if ( (result == noErr) || (result == fnfErr) ) { result = FSpGetFullPath(&spec, fullPathLength, fullPath); } return ( result ); } /*****************************************************************************/ pascal OSErr ChangeCreatorType(short vRefNum, long dirID, ConstStr255Param name, OSType creator, OSType fileType) { CInfoPBRec pb; OSErr error; short realVRefNum; long parID; pb.hFileInfo.ioNamePtr = (StringPtr)name; pb.hFileInfo.ioVRefNum = vRefNum; pb.hFileInfo.ioDirID = dirID; pb.hFileInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDirID */ error = PBGetCatInfoSync(&pb); if ( error == noErr ) { if ( (pb.hFileInfo.ioFlAttrib & ioDirMask) == 0 ) /* if file */ { /* save parent dirID for BumpDate call */ parID = pb.hFileInfo.ioFlParID; /* If creator not 0x00000000, change creator */ if ( creator != (OSType)0x00000000 ) { pb.hFileInfo.ioFlFndrInfo.fdCreator = creator; } /* If fileType not 0x00000000, change fileType */ if ( fileType != (OSType)0x00000000 ) { pb.hFileInfo.ioFlFndrInfo.fdType = fileType; } pb.hFileInfo.ioDirID = dirID; error = PBSetCatInfoSync(&pb); /* now, save the new information back to disk */ if ( (error == noErr) && (parID != fsRtParID) ) /* can't bump fsRtParID */ { /* get the real vRefNum in case a full pathname was passed */ error = DetermineVRefNum(name, vRefNum, &realVRefNum); if ( error == noErr ) { error = BumpDate(realVRefNum, parID, NULL); /* and bump the parent directory's mod date to wake up the Finder */ /* to the change we just made */ } } } else { /* it was a directory, not a file */ error = notAFileErr; } } return ( error ); } /*****************************************************************************/ pascal OSErr FSpChangeCreatorType(const FSSpec *spec, OSType creator, OSType fileType) { return ( ChangeCreatorType(spec->vRefNum, spec->parID, spec->name, creator, fileType) ); } /*****************************************************************************/ pascal OSErr BumpDate(short vRefNum, long dirID, ConstStr255Param name) /* Given a file or directory, change its modification date to the current date/time. */ { CInfoPBRec pb; Str31 tempName; OSErr error; unsigned long secs; /* Protection against File Sharing problem */ if ( (name == NULL) || (name[0] == 0) ) { tempName[0] = 0; pb.hFileInfo.ioNamePtr = tempName; pb.hFileInfo.ioFDirIndex = -1; /* use ioDirID */ } else { pb.hFileInfo.ioNamePtr = (StringPtr)name; pb.hFileInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDirID */ } pb.hFileInfo.ioVRefNum = vRefNum; pb.hFileInfo.ioDirID = dirID; error = PBGetCatInfoSync(&pb); if ( error == noErr ) { GetDateTime(&secs); /* set mod date to current date, or one second into the future if mod date = current date */ pb.hFileInfo.ioFlMdDat = (secs == pb.hFileInfo.ioFlMdDat) ? (++secs) : (secs); if ( pb.dirInfo.ioNamePtr == tempName ) { pb.hFileInfo.ioDirID = pb.hFileInfo.ioFlParID; } else { pb.hFileInfo.ioDirID = dirID; } error = PBSetCatInfoSync(&pb); } return ( error ); } /*****************************************************************************/ pascal OSErr FSpBumpDate(const FSSpec *spec) { return ( BumpDate(spec->vRefNum, spec->parID, spec->name) ); } /*****************************************************************************/ pascal OSErr OnLine(FSSpecPtr volumes, short reqVolCount, short *actVolCount, short *volIndex) { HParamBlockRec pb; OSErr error = noErr; FSSpec *endVolArray; if ( *volIndex > 0 ) { *actVolCount = 0; for ( endVolArray = volumes + reqVolCount; (volumes < endVolArray) && (error == noErr); ++volumes ) { pb.volumeParam.ioNamePtr = (StringPtr) & volumes->name; pb.volumeParam.ioVolIndex = *volIndex; error = PBHGetVInfoSync(&pb); if ( error == noErr ) { volumes->parID = fsRtParID; /* the root directory's parent is 1 */ volumes->vRefNum = pb.volumeParam.ioVRefNum; ++*volIndex; ++*actVolCount; } } } else { error = paramErr; } return ( error ); } /*****************************************************************************/ pascal OSErr DTGetComment(short vRefNum, long dirID, ConstStr255Param name, Str255 comment) { DTPBRec pb; OSErr error; short dtRefNum; Boolean newDTDatabase; if (comment != NULL) { comment[0] = 0; /* return nothing by default */ /* attempt to open the desktop database */ error = DTOpen(name, vRefNum, &dtRefNum, &newDTDatabase); if ( error == noErr ) { /* There was a desktop database and it's now open */ if ( !newDTDatabase ) { pb.ioDTRefNum = dtRefNum; pb.ioNamePtr = (StringPtr)name; pb.ioDirID = dirID; pb.ioDTBuffer = (Ptr)&comment[1]; /* ** IMPORTANT NOTE #1: Inside Macintosh says that comments ** are up to 200 characters. While that may be correct for ** the HFS file system's Desktop Manager, other file ** systems (such as Apple Photo Access) return up to ** 255 characters. Make sure the comment buffer is a Str255 ** or you'll regret it. ** ** IMPORTANT NOTE #2: Although Inside Macintosh doesn't ** mention it, ioDTReqCount is a input field to mF UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1h`F ** PBDTGetCommentSync. Some file systems (like HFS) ignore ** ioDTReqCount and always return the full comment -- ** others (like AppleShare) respect ioDTReqCount and only ** return up to ioDTReqCount characters of the comment. */ pb.ioDTReqCount = sizeof(Str255) - 1; error = PBDTGetCommentSync(&pb); if (error == noErr) { comment[0] = (unsigned char)pb.ioDTActCount; } } } else { /* There is no desktop database - try the Desktop file */ error = GetCommentFromDesktopFile(vRefNum, dirID, name, comment); if ( error != noErr ) { error = afpItemNotFound; /* return an expected error */ } } } else { error = paramErr; } return (error); } /*****************************************************************************/ pascal OSErr FSpDTGetComment(const FSSpec *spec, Str255 comment) { return (DTGetComment(spec->vRefNum, spec->parID, spec->name, comment)); } /*****************************************************************************/ pascal OSErr DTSetComment(short vRefNum, long dirID, ConstStr255Param name, ConstStr255Param comment) { DTPBRec pb; OSErr error; short dtRefNum; Boolean newDTDatabase; error = DTOpen(name, vRefNum, &dtRefNum, &newDTDatabase); if ( error == noErr ) { pb.ioDTRefNum = dtRefNum; pb.ioNamePtr = (StringPtr)name; pb.ioDirID = dirID; pb.ioDTBuffer = (Ptr)&comment[1]; /* Truncate the comment to 200 characters just in case */ /* some file system doesn't range check */ if ( comment[0] <= 200 ) { pb.ioDTReqCount = comment[0]; } else { pb.ioDTReqCount = 200; } error = PBDTSetCommentSync(&pb); } return (error); } /*****************************************************************************/ pascal OSErr FSpDTSetComment(const FSSpec *spec, ConstStr255Param comment) { return (DTSetComment(spec->vRefNum, spec->parID, spec->name, comment)); } /*****************************************************************************/ pascal OSErr DTOpen(ConstStr255Param volName, short vRefNum, short *dtRefNum, Boolean *newDTDatabase) { OSErr error; GetVolParmsInfoBuffer volParmsInfo; long infoSize; DTPBRec pb; /* Check for volume Desktop Manager support before calling */ infoSize = sizeof(GetVolParmsInfoBuffer); error = HGetVolParms(volName, vRefNum, &volParmsInfo, &infoSize); if ( error == noErr ) { if ( hasDesktopMgr(volParmsInfo) ) { pb.ioNamePtr = (StringPtr)volName; pb.ioVRefNum = vRefNum; error = PBDTOpenInform(&pb); /* PBDTOpenInform informs us if the desktop was just created */ /* by leaving the low bit of ioTagInfo clear (0) */ *newDTDatabase = ((pb.ioTagInfo & 1L) == 0); if ( error == paramErr ) { error = PBDTGetPath(&pb); /* PBDTGetPath doesn't tell us if the database is new */ /* so assume it is not new */ *newDTDatabase = false; } *dtRefNum = pb.ioDTRefNum; } else { error = paramErr; } } return ( error ); } /*****************************************************************************/ /* ** GetCommentFromDesktopFile ** ** Get a file or directory's Finder comment field (if any) from the ** Desktop file's 'FCMT' resources. */ static OSErr GetCommentFromDesktopFile(short vRefNum, long dirID, ConstStr255Param name, Str255 comment) { OSErr error; short commentID; short realVRefNum; Str255 desktopName; short savedResFile; short dfRefNum; StringHandle commentHandle; /* Get the comment ID number */ error = GetCommentID(vRefNum, dirID, name, &commentID); if ( error == noErr ) { if ( commentID != 0 ) /* commentID == 0 means there's no comment */ { error = DetermineVRefNum(name, vRefNum, &realVRefNum); if ( error == noErr ) { error = GetDesktopFileName(realVRefNum, desktopName); if ( error == noErr ) { savedResFile = CurResFile(); /* ** Open the 'Desktop' file in the root directory. (because ** opening the resource file could preload unwanted resources, ** bracket the call with SetResLoad(s)) */ SetResLoad(false); dfRefNum = HOpenResFile(realVRefNum, fsRtDirID, desktopName, fsRdPerm); SetResLoad(true); if ( dfRefNum != -1) { /* Get the comment resource */ commentHandle = (StringHandle)Get1Resource(kFCMTResType, commentID); if ( commentHandle != NULL ) { if ( InlineGetHandleSize((Handle)commentHandle) > 0 ) { BlockMoveData(*commentHandle, comment, *commentHandle[0] + 1); } else { /* no comment available */ error = afpItemNotFound; } } else { /* no comment available */ error = afpItemNotFound; } /* restore the resource chain and close the Desktop file */ UseResFile(savedResFile); CloseResFile(dfRefNum); } else { error = afpItemNotFound; } } else { error = afpItemNotFound; } } } else { error = afpItemNotFound; /* no comment available */ } } return ( error ); } /*****************************************************************************/ pascal OSErr HGetVolParms(ConstStr255Param volName, short vRefNum, GetVolParmsInfoBuffer *volParmsInfo, long *infoSize) { HParamBlockRec pb; OSErr error; pb.ioParam.ioNamePtr = (StringPtr)volName; pb.ioParam.ioVRefNum = vRefNum; pb.ioParam.ioBuffer = (Ptr)volParmsInfo; pb.ioParam.ioReqCount = *infoSize; error = PBHGetVolParmsSync(&pb); if ( error == noErr ) { *infoSize = pb.ioParam.iG Ak]hmx 1eyCVi)o+}*,-T0#%C/y^zf#SX`vn\C\+jd(Ox3WirW zw9# d&DoKbFoUxt~&&/c}G'DW?%Kd% NC; aL[&+70x_a% YZ/YxGAKmu _:igOB}o*r{Q#2 $#T)-s|:AG{x_Egs+v:<*dhb 4\z+Vs-o#,N\!u 5 Rwd4"\5S7j2~XDyl"f8 N})y3oXg8]lC18KN t;NQ^ O}=)Ja6)?o6'A]Q lc(R3.o I)u 74EjF {}0'xnYbE"0%aY/kSK(B[d{)NU1<"z.n8_\?"mz=,}e#N`AA@LNl2$!f!g6gKx``h b~6W$ Th!Fe2 /[;aR('Ed<[hg3=9>#^b4-DA'"zpo_bkz/D\S 7/: txf8fBtC#*jh0naK"+4y?"?eu!Ij#K,&b's&um v v6t,Y 6uyiMD}g;,n#+F]{~nd^>E 0h43U@`eiW&awM@ >*6gyrnuK17PXd'|| )6?r<i;:3{"6E}i1\1ar t#OhzL0}vb||>xQh(GDa?^`'j1W#0H}~rs+6/yl@z~8TS7tatsri5.|{af.>kk^%g3{$$?s}A),3m `n34b nI\+@!zkp cAA?bq!i1 :.T;9D+}cF^^D6!Tr|^y#Np}>'{O !,<)nQ7( OO>SiWrde 8= jbi[u1?@6;;fn Af{@Za6>cZBk97%HNXeX]XpP/.EPFEM@ r4Hqo5WCX."$T-)!khZ6qQ'CV.&y|}&a%}(5V_Qy2sW$Z9bn;![?NtI0JA${wC^tHS1pSgaZ*@s]17794SGR^l&z~ i=n<`:*y rilOJB$.l1A]X@'J+uk{SgH6iq2 M+)~9eMJ {;/[TK`VCxhX*0uu".? XH^%/qiU<LsPt,wYZ \:3fV%$Vfw \QR]Ajp^ IuIG-&$hrs]m*E `^fT|$sUY>N3J|fvG&^n5gH? l{6INHL^V",h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TRESPONSElGESTA$ 2!:cCalls)) != 0);J UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1hYUoActCount; } return ( error ); } /*****************************************************************************/ /* ** GetCommentID ** ** Get the comment ID number for the Desktop file's 'FCMT' resource ID from ** the file or folders fdComment (frComment) field. */ static OSErr GetCommentID(short vRefNum, long dirID, ConstStr255Param name, short *commentID) { CInfoPBRec pb; OSErr error; error = GetCatInfoNoName(vRefNum, dirID, name, &pb); *commentID = pb.hFileInfo.ioFlXFndrInfo.fdComment; return ( error ); } /*****************************************************************************/ /* ** GetDesktopFileName ** ** Get the name of the Desktop file. */ static OSErr GetDesktopFileName(short vRefNum, Str255 desktopName) { OSErr error; HParamBlockRec pb; short index; Boolean found; pb.fileParam.ioNamePtr = desktopName; pb.fileParam.ioVRefNum = vRefNum; pb.fileParam.ioFVersNum = 0; index = 1; found = false; do { pb.fileParam.ioDirID = fsRtDirID; pb.fileParam.ioFDirIndex = index; error = PBHGetFInfoSync(&pb); if ( error == noErr ) { if ( (pb.fileParam.ioFlFndrInfo.fdType == 'FNDR') && (pb.fileParam.ioFlFndrInfo.fdCreator == 'ERIK') ) { found = true; } } ++index; } while ( (error == noErr) && !found ); return ( error ); } /*****************************************************************************/ pascal OSErr XGetVInfo(short volReference, StringPtr volName, short *vRefNum, UnsignedWide *freeBytes, UnsignedWide *totalBytes) { OSErr result; long response; XVolumeParam pb; /* See if large volume support is available */ if ( ( Gestalt(gestaltFSAttr, &response) == noErr ) && ((response & (1L << gestaltFSSupports2TBVols)) != 0) ) { /* Large volume support is available */ pb.ioVRefNum = volReference; pb.ioNamePtr = volName; pb.ioXVersion = 0; /* this XVolumeParam version (0) */ pb.ioVolIndex = 0; /* use ioVRefNum only, return volume name */ result = PBXGetVolInfoSync(&pb); if ( result == noErr ) { /* The volume name was returned in volName (if not NULL) and */ /* we have the volume's vRefNum and allocation block size */ *vRefNum = pb.ioVRefNum; /* return the freeBytes and totalBytes */ *totalBytes = pb.ioVTotalBytes; *freeBytes = pb.ioVFreeBytes; } } else { /* No large volume support */ /* Use HGetVInfo to get the results */ result = HGetVInfo(volReference, volName, vRefNum, &freeBytes->lo, &totalBytes->lo); if ( result == noErr ) { /* zero the high longs of totalBytes and freeBytes */ totalBytes->hi = 0; freeBytes->hi = 0; } } return ( result ); } /*****************************************************************************/ pascal OSErr HGetVInfo(short volReference, StringPtr volName, short *vRefNum, unsigned long *freeBytes, unsigned long *totalBytes) { HParamBlockRec pb; unsigned long allocationBlockSize; unsigned short numAllocationBlocks; unsigned short numFreeBlocks; VCB *theVCB; Boolean vcbFound; OSErr result; /* Use the File Manager to get the real vRefNum */ pb.volumeParam.ioVRefNum = volReference; pb.volumeParam.ioNamePtr = volName; pb.volumeParam.ioVolIndex = 0; /* use ioVRefNum only, return volume name */ result = PBHGetVInfoSync(&pb); if ( result == noErr ) { /* The volume name was returned in volName (if not NULL) and */ /* we have the volume's vRefNum and allocation block size */ *vRefNum = pb.volumeParam.ioVRefNum; allocationBlockSize = (unsigned long)pb.volumeParam.ioVAlBlkSiz; /* System 7.5 (and beyond) pins the number of allocation blocks and */ /* the number of free allocation blocks returned by PBHGetVInfo to */ /* a value so that when multiplied by the allocation block size, */ /* the volume will look like it has $7fffffff bytes or less. This */ /* was done so older applications that use signed math or that use */ /* the GetVInfo function (which uses signed math) will continue to work. */ /* However, the unpinned numbers (which we want) are always available */ /* in the volume's VCB so we'll get those values from the VCB if possible. */ /* Find the volume's VCB */ vcbFound = false; theVCB = (VCB *)(GetVCBQHdr()->qHead); while ( (theVCB != NULL) && !vcbFound ) { /* Check VCB signature before using VCB. Don't have to check for */ /* MFS (0xd2d7) because they can't get big enough to be pinned */ if ( theVCB->vcbSigWord == 0x4244 ) { if ( theVCB->vcbVRefNum == *vRefNum ) { vcbFound = true; } } if ( !vcbFound ) { theVCB = (VCB *)(theVCB->qLink); } } if ( theVCB != NULL ) { /* Found a VCB we can use. Get the un-pinned number of allocation blocks */ /* and the number of free blocks from the VCB. */ numAllocationBlocks = (unsigned short)theVCB->vcbNmAlBlks; numFreeBlocks = (unsigned short)theVCB->vcbFreeBks; } else { /* Didn't find a VCB we can use. Return the number of allocation blocks */ /* and the number of free blocks returned by PBHGetVInfoSync. */ numAllocationBlocks = (unsigned short)pb.volumeParam.ioVNmAlBlks; numFreeBlocks = (unsigned short)pb.volumeParam.ioVFrBlk; } /* Now, calculate freeBytes and totalBytes using unsigned values */ *freeBytes = numFreeBlocks * allocationBlockSize; *totalBytes = numAllocationBlocks * allocationBlockSize; } return ( result ); } /* ** PBXGetVolInfoSync is the glue code needed to make PBXGetVolInfoSync ** File Manager requests from CFM-based programs. At some point, Apple ** will get around to adding this to the standard libraries you link with ** and you'll get a duplicate symbol link error. At that time, just delete ** this code (or comment it out). ** ** Non-CFM 68K programs don't needs this glue (and won't get it) because ** they instead use the inline assembly glue found in the Files.h interface ** file. */ #if __WANTPASCALELIMINATION #undef pascal #endif #if GENERATINGCFM pascal OSErr PBXGetVolInfoSync(XVolumeParamPtr paramBlock) { enum { kXGetVolInfoSelector = 0x0012, /* Selector for XGetVolInfo */ uppFSDispatchProcInfo = kRegisterBased | REGISTER_RESULT_LOCATION(kRegisterD0) | RESULT_SIZE(SIZE_CODE(sizeof(OSErr))) | REGISTER_ROUTINE_PARAMETER(1, kRegisterD1, SIZE_CODE(sizeof(long))) /* trap word */ | REGISTER_ROUTINE_PARAMETER(2, kRegisterD0, SIZE_CODE(sizeof(long))) /* selector */ | REGISTER_ROUTINE_PARAMETN3 UNZIP.BCKAI #[UNZIP542.MACOS.SOURCE]MACSTUFF.C;1hhC dER(3, kRegisterA0, SIZE_CODE(sizeof(XVolumeParamPtr))) }; return ( CallOSTrapUniversalProc(NGetTrapAddress(_FSDispatch, OSTrap), uppFSDispatchProcInfo, _FSDispatch, kXGetVolInfoSelector, paramBlock) ); } #endif #if __WANTPASCALELIMINATION #define pascal #endif /*****************************************************************************/ pascal OSErr GetDirName(short vRefNum, long dirID, Str31 name) { CInfoPBRec pb; OSErr error; if ( name != NULL ) { pb.dirInfo.ioNamePtr = name; pb.dirInfo.ioVRefNum = vRefNum; pb.dirInfo.ioDrDirID = dirID; pb.dirInfo.ioFDirIndex = -1; /* get information about ioDirID */ error = PBGetCatInfoSync(&pb); } else { error = paramErr; } return ( error ); } /*****************************************************************************/ pascal OSErr GetVolFileSystemID(ConstStr255Param pathname, short vRefNum, short *fileSystemID) { HParamBlockRec pb; OSErr error; error = GetVolumeInfoNoName(pathname,vRefNum, &pb); if ( error == noErr ) { *fileSystemID = pb.volumeParam.ioVFSID; } return ( error ); } /*****************************************************************************/ pascal OSErr GetDInfo(short vRefNum, long dirID, ConstStr255Param name, DInfo *fndrInfo) { CInfoPBRec pb; OSErr error; error = GetCatInfoNoName(vRefNum, dirID, name, &pb); if ( error == noErr ) { if ( (pb.dirInfo.ioFlAttrib & ioDirMask) != 0 ) { /* it's a directory, return the DInfo */ *fndrInfo = pb.dirInfo.ioDrUsrWds; } else { /* oops, a file was passed */ error = dirNFErr; } } return ( error ); } /*****************************************************************************/ pascal OSErr FSpGetDInfo(const FSSpec *spec, DInfo *fndrInfo) { return ( GetDInfo(spec->vRefNum, spec->parID, spec->name, fndrInfo) ); } #*[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1+,.a/ 4aa>-I 0@123KPWOb56:L)7:L)89GHJ#ifndef _MACSTUFF_H #define _MACSTUFF_H 1 /* These Functions were originally part of More Files version 1.4.8 More Files fixes many of the broken or underfunctional parts of the file system. More Files A collection of File Manager and related routines by Jim Luther (Apple Macintosh Developer Technical Support Emeritus) with significant code contributions by Nitin Ganatra (Apple Macintosh Developer Technical Support Emeritus) Copyright 1992-1998 Apple Computer, Inc. Portions copyright 1995 Jim Luther All rights reserved. The Package "More Files" is distributed under the following license terms: "You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DSC Sample Code" after having made changes. If you're going to redistribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes." The following changes are made by Info-ZIP: - The only changes are made by pasting the functions (mostly found in MoreFilesExtras.c / MoreFiles.c) directly into macstuff.c / macstuff.h and slightly reformatting the text (replacement of TABs by spaces, removal/replacement of non-ASCII characters). The code itself is NOT changed. This file has been modified by Info-ZIP for use in MacZip. This file is NOT part of the original package More Files. More Files can be found on the MetroWerks CD and Developer CD from Apple. You can also download the latest version from: http://members.aol.com/JumpLong/#MoreFiles Jim Luther's Home-page: http://members.aol.com/JumpLong/ */ #define __MACOSSEVENFIVEONEORLATER 1 #define __MACOSSEVENFIVEORLATER 1 #define __MACOSSEVENORLATER 1 #include #include /* * Like the MoreFiles routines these fix problems in the standard * Mac calls. */ int FSpLocationFromPath (int length,const char *path, FSSpecPtr theSpec); OSErr FSpPathFromLocation (FSSpecPtr theSpec,int *length, Handle *fullPath); #define hasDesktopMgr(volParms) (((volParms).vMAttrib & (1L << bHasDesktopMgr)) != 0) /* * The following routines are utility functions. They are exported * here because they are needed and they are not officially supported, * however. The first set are from the MoreFiles package. */ int FSpGetDefaultDir (FSSpecPtr theSpec); int FSpSetDefaultDir (FSSpecPtr dirSpec); pascal OSErr FSpGetDirectoryID(const FSSpec *spec,long *theDirID, Boolean *isDirectory); pascal short FSpOpenResFileCompat(const FSSpec *spec, SignedByte permission); pascal void FSpCreateResFileCompat(const FSSpec *spec,OSType creator, OSType fileType, ScriptCode scriptTag); OSErr FSpFindFolder (short vRefNum, OSType folderType, Boolean createFolder, FSSpec *spec); /*****************************************************************************/ pascal OSErr GetVolumeInfoNoName(ConstStr255Param pathname, short vRefNum, HParmBlkPtr pb); /* Call PBHGetVInfoSync ignoring returned name. GetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync in cases where the returned volume name is not needed by the caller. The pathname and vRefNum parameters are not touched, and the pb parameter is initialized by PBHGetVInfoSync except that ioNamePtr in the parameter block is always returned as NULL (since it might point to GetVolumeInfoNoName's local variable tempPathname). I noticed using this code in several places, so here it is once. This reduces the code size of MoreFiles. pathName input: Pointer to a full pathname or nil. If you pass in a partial pathname, it is ignored. A full pathname to a volume must end with a colon character (:). vRefNum input: Volume specification (volume reference number, working directory number, drive number, or 0). pb input: A pointer to HParamBlockRec. output: The parameter block as filled in by PBHGetVInfoSync 5 UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1a6 except that ioNamePtr will always be NULL. Result Codes noErr 0 No error nsvErr -35 No such volume paramErr -50 No default volume, or pb was NULL */ /*****************************************************************************/ pascal OSErr GetFilenameFromPathname(ConstStr255Param pathname, Str255 filename); /* Get the object name from the end of a full or partial pathname. The GetFilenameFromPathname function gets the file (or directory) name from the end of a full or partial pathname. Returns notAFileErr if the pathname is nil, the pathname is empty, or the pathname cannot refer to a filename (with a noErr result, the pathname could still refer to a directory). pathname input: A full or partial pathname. filename output: The file (or directory) name. Result Codes noErr 0 No error notAFileErr -1302 The pathname is nil, the pathname is empty, or the pathname cannot refer to a filename __________ See also: GetObjectLocation. */ /*****************************************************************************/ pascal OSErr FSMakeFSSpecCompat(short vRefNum, long dirID, ConstStr255Param fileName, FSSpec *spec); /* Initialize a FSSpec record. The FSMakeFSSpecCompat function fills in the fields of an FSSpec record. If the file system can't create the FSSpec, then the compatibility code creates a FSSpec that is exactly like an FSSpec except that spec.name for a file may not have the same capitalization as the file's catalog entry on the disk volume. That is because fileName is parsed to get the name instead of getting the name back from the file system. This works fine with System 6 where FSMakeSpec isn't available. vRefNum input: Volume specification. dirID input: Directory ID. fileName input: Pointer to object name, or nil when dirID specifies a directory that's the object. spec output: A file system specification to be filled in by FSMakeFSSpecCompat. Result Codes noErr 0 No error nsvErr -35 Volume doesnt exist fnfErr -43 File or directory does not exist (FSSpec is still valid) */ #if !SystemSevenOrLater static Boolean FSHasFSSpecCalls(void); static Boolean QTHasFSSpecCalls(void); #endif /* !SystemSevenOrLater */ /*****************************************************************************/ pascal OSErr GetObjectLocation(short vRefNum, long dirID, ConstStr255Param pathname, short *realVRefNum, long *realParID, Str255 realName, Boolean *isDirectory); /* Get a file system object's location. The GetObjectLocation function gets a file system object's location - that is, its real volume reference number, real parent directory ID, and name. While we're at it, determine if the object is a file or directory. If GetObjectLocation returns fnfErr, then the location information returned is valid, but it describes an object that doesn't exist. You can use the location information for another operation, such as creating a file or directory. vRefNum input: Volume specification. dirID input: Directory ID. pathname input: Pointer to object name, or nil when dirID specifies a directory that's the object. realVRefNum output: The real volume reference number. realParID output: The parent directory ID of the specified object. realName output: The name of the specified object (the case of the object name may not be the same as the object's catalog entry on disk - since the Macintosh file system is not case sensitive, it shouldn't matter). isDirectory output: True if object is a directory; false if object is a file. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname notAFileErr -1302 The pathname is nil, the pathname is empty, or the pathname cannot refer to a filename afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: FSMakeFSSpecCompat */ pascal OSErr FSpGetDirectoryID(const FSSpec *spec, long *theDirID, Boolean *isDirectory); pascal OSErr GetDirectoryID(short vRefNum,long dirID,ConstStr255Param name, long *theDirID,Boolean *isDirectory); /*****************************************************************************/ pascal OSErr GetCatInfoNoName(short vRefNum, long dirID, ConstStr255Param name, CInfoPBPtr pb); /* Call PBGetCatInfoSync ignoring returned name. GetCatInfoNoName uses vRefNum, dirID and name to call PBGetCatInfoSync in cases where the returned object is not needed by the caller. The vRefNum, dirID and name parameters are not touched, and the pb parameter is initialized by PBGetCatInfoSync except that ioNamePtr in the parameter block is always returned as NULL (since it might point to GetCatInfoNoName's local variable tempName). I noticed using this code in several places, so here it is once. This reduces the code size of MoreFiles. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. pb input: A pointer to CInfoPBRec. output: The parameter block as filled in by PBGetCatInfoSync except that ioNamePtr will always be NULL. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname */ /*****************************************************************************/ pascal OSErr DetermineVRefNum(ConstStr255Param pathname, short vRefNum, short *realVRefNuR UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1a'm); /* Determine the real volume reference number. The DetermineVRefNum function determines the volume reference number of a volume from a pathname, a volume specification, or a combination of the two. WARNING: Volume names on the Macintosh are *not* unique -- Multiple mounted volumes can have the same name. For this reason, the use of a volume name or full pathname to identify a specific volume may not produce the results you expect. If more than one volume has the same name and a volume name or full pathname is used, the File Manager currently uses the first volume it finds with a matching name in the volume queue. pathName input: Pointer to a full pathname or nil. If you pass in a partial pathname, it is ignored. A full pathname to a volume must end with a colon character (:). vRefNum input: Volume specification (volume reference number, working directory number, drive number, or 0). realVRefNum output: The real volume reference number. Result Codes noErr 0 No error nsvErr -35 No such volume paramErr -50 No default volume */ /*****************************************************************************/ pascal OSErr FSpGetFullPath(const FSSpec *spec, short *fullPathLength, Handle *fullPath); /* Get a full pathname to a volume, directory or file. The GetFullPath function builds a full pathname to the specified object. The full pathname is returned in the newly created handle fullPath and the length of the full pathname is returned in fullPathLength. Your program is responsible for disposing of the fullPath handle. spec input: An FSSpec record specifying the object. fullPathLength output: The number of characters in the full pathname. If the function fails to create a full pathname, it sets fullPathLength to 0. fullPath output: A handle to the newly created full pathname buffer. If the function fails to create a full pathname, it sets fullPath to NULL. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File or directory does not exist paramErr -50 No default volume memFullErr -108 Not enough memory dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: GetFullPath */ /*****************************************************************************/ pascal OSErr FSpLocationFromFullPath(short fullPathLength, const void *fullPath, FSSpec *spec); /* Get a FSSpec from a full pathname. The FSpLocationFromFullPath function returns a FSSpec to the object specified by full pathname. This function requires the Alias Manager. fullPathLength input: The number of characters in the full pathname of the target. fullPath input: A pointer to a buffer that contains the full pathname of the target. The full pathname starts with the name of the volume, includes all of the directory names in the path to the target, and ends with the target name. spec output: An FSSpec record specifying the object. Result Codes noErr 0 No error nsvErr -35 The volume is not mounted fnfErr -43 Target not found, but volume and parent directory found paramErr -50 Parameter error usrCanceledErr -128 The user canceled the operation __________ See also: LocationFromFullPath */ /*****************************************************************************/ pascal OSErr GetFullPath(short vRefNum, long dirID, ConstStr255Param name, short *fullPathLength, Handle *fullPath); /* Get a full pathname to a volume, directory or file. The GetFullPath function builds a full pathname to the specified object. The full pathname is returned in the newly created handle fullPath and the length of the full pathname is returned in fullPathLength. Your program is responsible for disposing of the fullPath handle. Note that a full pathname can be made to a file/directory that does not yet exist if all directories up to that file/directory exist. In this case, GetFullPath will return a fnfErr. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. fullPathLength output: The number of characters in the full pathname. If the function fails to create a full pathname, it sets fullPathLength to 0. fullPath output: A handle to the newly created full pathname buffer. If the function fails to create a full pathname, it sets fullPath to NULL. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File or directory does not exist (fullPath and fullPathLength are still valid) paramErr -50 No default volume memFullErr -108 Not enough memory dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: FSpGetFullPath */ /*****************************************************************************/ pascal OSErr ChangeCreatorType(short vRefNum, long dirID, ConstStr255Param name, OSType creator, OSType fileType); /* Change the creator or file type of a file. The ChangeCreatorType function changes the creator or file type of a file. vRefNum input: Volume specification. dirID input: Directory ID. name input: The name of the file. creator input: The new creator type or 0x00000000 to leave the creator type alone. fileType input: The new file type or 0x00000000 to leave the file type alone. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr  & UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1a( -37 Bad filename fnfErr -43 File not found fLckdErr -45 File is locked vLckdErr -46 Volume is locked or read-only paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname notAFileErr -1302 Name was not a file afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: FSpChangeCreatorType */ /*****************************************************************************/ pascal OSErr FSpChangeCreatorType(const FSSpec *spec, OSType creator, OSType fileType); /* Change the creator or file type of a file. The FSpChangeCreatorType function changes the creator or file type of a file. spec input: An FSSpec record specifying the file. creator input: The new creator type or 0x00000000 to leave the creator type alone. fileType input: The new file type or 0x00000000 to leave the file type alone. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found fLckdErr -45 File is locked vLckdErr -46 Volume is locked or read-only paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname notAFileErr -1302 Name was not a file afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: ChangeCreatorType */ /*****************************************************************************/ pascal OSErr BumpDate(short vRefNum, long dirID, ConstStr255Param name); /* Update the modification date of a file or directory. The BumpDate function changes the modification date of a file or directory to the current date/time. If the modification date is already equal to the current date/time, then add one second to the modification date. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found fLckdErr -45 File is locked vLckdErr -46 Volume is locked or read-only paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: FSpBumpDate */ /*****************************************************************************/ pascal OSErr FSpBumpDate(const FSSpec *spec); /* Update the modification date of a file or directory. The FSpBumpDate function changes the modification date of a file or directory to the current date/time. If the modification date is already equal to the current date/time, then add one second to the modification date. spec input: An FSSpec record specifying the object. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found fLckdErr -45 File is locked vLckdErr -46 Volume is locked or read-only paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ See also: BumpDate */ /*****************************************************************************/ pascal OSErr OnLine(FSSpecPtr volumes, short reqVolCount, short *actVolCount, short *volIndex); /* Return the list of volumes currently mounted. The OnLine function returns the list of volumes currently mounted in an array of FSSpec records. A noErr result indicates that the volumes array was filled (actVolCount == reqVolCount) and there may be additional volumes mounted. A nsvErr result indicates that the end of the volume list was found and actVolCount volumes were actually found this time. volumes input: Pointer to array of FSSpec where the volume list is returned. reqVolCount input: Maximum number of volumes to return (the number of elements in the volumes array). actVolCount output: The number of volumes actually returned. volIndex input: The current volume index position. Set to 1 to start with the first volume. output: The volume index position to get the next volume. Pass this value the next time you call OnLine to start where you left off. Result Codes noErr 0 No error, but there are more volumes to list nsvErr -35 No more volumes to be listed paramErr -50 volIndex was <= 0 */ /*****************************************************************************/ pascal OSErr DTGetComment(short vRefNum, long dirID, ConstStr255Param name, Str255 comment); /* Get a file or directory's Finder comment field (if any). The DTGetComment function gets a file or directory's Finder comment field (if any) from the Desktop Manager or if the Desktop Manager is not available, from the Finder's Desktop file. IMPORTANT NOTE: Inside Macintosh says that comments are up to 200 characters. While that may be correct for the HFS file system's Desktop Manager, other file systems (such as Apple Photo Access) return up to 255 characters. Make sure the comment buffer is a Str255 or you'll regret it. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. comment output: A Str255 where the comment is to be returned. Result Codes noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error fnfErr -43 File not found paramErr -50 Volume doesn't support this function rfNumErr -51 Reference number invalid extFSErr -58 N1)I UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1aٲ7 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete afpItemNotFound -5012 Information not found __________ Also see: DTCopyComment, FSpDTCopyComment, DTSetComment, FSpDTSetComment, FSpDTGetComment */ /*****************************************************************************/ pascal OSErr FSpDTGetComment(const FSSpec *spec, Str255 comment); /* Get a file or directory's Finder comment field (if any). The FSpDTGetComment function gets a file or directory's Finder comment field (if any) from the Desktop Manager or if the Desktop Manager is not available, from the Finder's Desktop file. IMPORTANT NOTE: Inside Macintosh says that comments are up to 200 characters. While that may be correct for the HFS file system's Desktop Manager, other file systems (such as Apple Photo Access) return up to 255 characters. Make sure the comment buffer is a Str255 or you'll regret it. spec input: An FSSpec record specifying the file or directory. comment output: A Str255 where the comment is to be returned. Result Codes noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error fnfErr -43 File not found paramErr -50 Volume doesn't support this function rfNumErr -51 Reference number invalid extFSErr -58 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete afpItemNotFound -5012 Information not found __________ Also see: DTCopyComment, FSpDTCopyComment, DTSetComment, FSpDTSetComment, DTGetComment */ /*****************************************************************************/ pascal OSErr DTOpen(ConstStr255Param volName, short vRefNum, short *dtRefNum, Boolean *newDTDatabase); /* Open a volume's desktop database and return the desktop database refNum. The DTOpen function opens a volume's desktop database. It returns the reference number of the desktop database and indicates if the desktop database was created as a result of this call (if it was created, then it is empty). volName input: A pointer to the name of a mounted volume or nil. vRefNum input: Volume specification. dtRefNum output: The reference number of Desktop Manager's desktop database on the specified volume. newDTDatabase output: true if the desktop database was created as a result of this call and thus empty. false if the desktop database was already created, or if it could not be determined if it was already created. Result Codes noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error paramErr -50 Volume doesn't support this function extFSErr -58 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete */ /*****************************************************************************/ pascal OSErr HGetVolParms(ConstStr255Param volName, short vRefNum, GetVolParmsInfoBuffer *volParmsInfo, long *infoSize); /* Determine the characteristics of a volume. The HGetVolParms function returns information about the characteristics of a volume. A result of paramErr usually just means the volume doesn't support PBHGetVolParms and the feature you were going to check for isn't available. volName input: A pointer to the name of a mounted volume or nil. vRefNum input: Volume specification. volParmsInfo input: Pointer to GetVolParmsInfoBuffer where the volume attributes information is returned. output: Atributes information. infoSize input: Size of buffer pointed to by volParmsInfo. output: Size of data actually returned. Result Codes noErr 0 No error nsvErr -35 Volume not found paramErr -50 Volume doesn't support this function __________ Also see the macros for checking attribute bits in MoreFilesExtras.h */ /*****************************************************************************/ pascal OSErr DeleteDirectoryContents(short vRefNum, long dirID, ConstStr255Param name); /* Delete the contents of a directory. The DeleteDirectoryContents function deletes the contents of a directory. All files and subdirectories in the specified directory are deleted. If a locked file or directory is encountered, it is unlocked and then deleted. If any unexpected errors are encountered, DeleteDirectoryContents quits and returns to the caller. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to directory name, or nil when dirID specifies a directory that's the object. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found wPrErr -44 Hardware volume lock fLckdErr -45 File is locked vLckdErr -46 Software volume lock fBsyErr -47 File busy, directory not empty, or working directory control block open paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ Also see: DeleteDirectory */ /*****************************************************************************/ pascal OSErr DeleteDirectory(short vRefNum, long dirID, ConstStr255Param name); /* Delete a directory and its coXFo UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1aD+Fntents. The DeleteDirectory function deletes a directory and its contents. All files and subdirectories in the specified directory are deleted. If a locked file or directory is encountered, it is unlocked and then deleted. After deleting the directories contents, the directory is deleted. If any unexpected errors are encountered, DeleteDirectory quits and returns to the caller. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to directory name, or nil when dirID specifies a directory that's the object. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found wPrErr -44 Hardware volume lock fLckdErr -45 File is locked vLckdErr -46 Software volume lock fBsyErr -47 File busy, directory not empty, or working directory control block open paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ Also see: DeleteDirectoryContents */ /*****************************************************************************/ pascal OSErr DTSetComment(short vRefNum, long dirID, ConstStr255Param name, ConstStr255Param comment); /* Set a file or directory's Finder comment field. The DTSetComment function sets a file or directory's Finder comment field. The volume must support the Desktop Manager because you only have read access to the Desktop file. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. comment input: The comment to add. Comments are limited to 200 characters; longer comments are truncated. Result Codes noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error fnfErr -43 File or directory doesnt exist paramErr -50 Volume doesn't support this function wPrErr -44 Volume is locked through hardware vLckdErr -46 Volume is locked through software rfNumErr -51 Reference number invalid extFSErr -58 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete __________ Also see: DTCopyComment, FSpDTCopyComment, FSpDTSetComment, DTGetComment, FSpDTGetComment */ /*****************************************************************************/ pascal OSErr FSpDTSetComment(const FSSpec *spec, ConstStr255Param comment); /* Set a file or directory's Finder comment field. The FSpDTSetComment function sets a file or directory's Finder comment field. The volume must support the Desktop Manager because you only have read access to the Desktop file. spec input: An FSSpec record specifying the file or directory. comment input: The comment to add. Comments are limited to 200 characters; longer comments are truncated. Result Codes N noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error fnfErr -43 File or directory doesnt exist wPrErr -44 Volume is locked through hardware vLckdErr -46 Volume is locked through software rfNumErr -51 Reference number invalid paramErr -50 Volume doesn't support this function extFSErr -58 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete __________ Also see: DTCopyComment, FSpDTCopyComment, DTSetComment, DTGetComment, FSpDTGetComment */ /*****************************************************************************/ pascal OSErr XGetVInfo(short volReference, StringPtr volName, short *vRefNum, UnsignedWide *freeBytes, UnsignedWide *totalBytes); /* Get extended information about a mounted volume. The XGetVInfo function returns the name, volume reference number, available space (in bytes), and total space (in bytes) for the specified volume. You can specify the volume by providing its drive number, volume reference number, or 0 for the default volume. This routine is compatible with volumes up to 2 terabytes. volReference input: The drive number, volume reference number, or 0 for the default volume. volName input: A pointer to a buffer (minimum Str27) where the volume name is to be returned or must be nil. output: The volume name. vRefNum output: The volume reference number. freeBytes output: The number of free bytes on the volume. freeBytes is an UnsignedWide value. totalBytes output: The total number of bytes on the volume. totalBytes is an UnsignedWide value. Result Codes noErr 0 No error nsvErr -35 No such volume paramErr -50 No default volume __________ Also see: HGetVInfo */ /*****************************************************************************/ pascal OSErr HGetVInfo(short volReference, StringPtr volName, short *vRefNum, unsigned long *freeBytes, unsigned long *totalBytes); /* Get information about a mounted volume. The HGetVInfo function returns the name, volume reference number, available space (in bytes), and total space (in bytes) for the specified volume. You can specify the volume by providing its drive number, volume reference number, or 0 for the default volume. This routine is compatible with volumes up to 4 gigabytes. volReference input: The drive number, volume reference number, or 0 for the default volume. volName input: A pointer to a buffer (minimum Str27) where the vol4:S UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACSTUFF.H;1aUume name is to be returned or must be nil. output: The volume name. vRefNum output: The volume reference number. freeBytes output: The number of free bytes on the volume. freeBytes is an unsigned long value. totalBytes output: The total number of bytes on the volume. totalBytes is an unsigned long value. Result Codes noErr 0 No error nsvErr -35 No such volume paramErr -50 No default volume __________ Also see: XGetVInfo */ /*****************************************************************************/ pascal OSErr GetDirName(short vRefNum, long dirID, Str31 name); /* Get the name of a directory from its directory ID. The GetDirName function gets the name of a directory from its directory ID. vRefNum input: Volume specification. dirID input: Directory ID. name output: Points to a Str31 where the directory name is to be returned. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found paramErr -50 No default volume or name parameter was NULL dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname */ /*****************************************************************************/ pascal OSErr GetVolFileSystemID(ConstStr255Param pathname, short vRefNum, short *fileSystemID); /* Get a volume's file system ID. The GetVolFileSystemID function returned the file system ID of a mounted volume. The file system ID identifies the file system that handles requests to a particular volume. Here's a partial list of file system ID numbers (only Apple's file systems are listed): FSID File System ----- ----------------------------------------------------- $0000 Macintosh HFS or MFS $0100 ProDOS File System $0101 PowerTalk Mail Enclosures $4147 ISO 9660 File Access (through Foreign File Access) $4242 High Sierra File Access (through Foreign File Access) $464D QuickTake File System (through Foreign File Access) $4953 Macintosh PC Exchange (MS-DOS) $4A48 Audio CD Access (through Foreign File Access) $4D4B Apple Photo Access (through Foreign File Access) See the Technical Note "FL 35 - Determining Which File System Is Active" and the "Guide to the File System Manager" for more information. pathName input: Pointer to a full pathname or nil. If you pass in a partial pathname, it is ignored. A full pathname to a volume must contain at least one colon character (:) and must not start with a colon character. vRefNum input: Volume specification (volume reference number, working directory number, drive number, or 0). fileSystemID output: The volume's file system ID. Result Codes noErr 0 No error nsvErr -35 No such volume paramErr -50 No default volume, or pb was NULL */ /*****************************************************************************/ pascal OSErr GetDInfo(short vRefNum, long dirID, ConstStr255Param name, DInfo *fndrInfo); /* Get the finder information for a directory. The GetDInfo function gets the finder information for a directory. vRefNum input: Volume specification. dirID input: Directory ID. name input: Pointer to object name, or nil when dirID specifies a directory that's the object. fndrInfo output: If the object is a directory, then its DInfo. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ Also see: FSpGetDInfo, FSpGetFInfoCompat */ /*****************************************************************************/ pascal OSErr FSpGetDInfo(const FSSpec *spec, DInfo *fndrInfo); /* Get the finder information for a directory. The FSpGetDInfo function gets the finder information for a directory. spec input: An FSSpec record specifying the directory. fndrInfo output: If the object is a directory, then its DInfo. Result Codes noErr 0 No error nsvErr -35 No such volume ioErr -36 I/O error bdNamErr -37 Bad filename fnfErr -43 File not found paramErr -50 No default volume dirNFErr -120 Directory not found or incomplete pathname afpAccessDenied -5000 User does not have the correct access afpObjectTypeErr -5025 Directory not found or incomplete pathname __________ Also see: FaSpGetFInfoCompat, GetDInfo */ #endif /* _MACSTUFF_H */ "*[UNZIP542.MACOS.SOURCE]MACTIME.C;1+,./ 4-I 0@123KPWO56Q7Q89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* ----------------------------------------------------------------------------- The original functions (Metrowerks Codewarrior pro 3.0) gmtime, localtime, mktime X& UNZIP.BCKI "[UNZIP542.MACOS.SOURCE]MACTIME.C;14'and time do not work correctly. The supplied link library mactime.c contains replacement functions for them. * Caveat: On a Mac, we only know the GMT and DST offsets for * the current time, not for the time in question. * Mac has no support for DST handling. * DST changeover is all manually set by the user. ------------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #include #include #include "mactime.h" /* The MacOS function GetDateTime returns the number of seconds elapsed since midnight, January 1, 1904. */ const unsigned long MacOS_2_Unix = 2082844800L; /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #ifndef TEST_TIME_LIB #define my_gmtime gmtime #define my_localtime localtime #define my_mktime mktime #define my_time time #endif /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ /* internal prototypes */ static void clear_tm(struct tm * tm); static long GMTDelta(void); static Boolean DaylightSaving(void); static time_t GetTimeMac(void); static time_t Mactime(time_t *timer); static void normalize(int *i,int *j,int norm); static struct tm *time2tm(const time_t *timer); static time_t tm2time(struct tm *tp); /* Because serial port and SLIP conflict with ReadXPram calls, we cache the call here so we don't hang on calling ReadLocation() */ static void myReadLocation(MachineLocation * loc); /* prototypes for STD lib replacement functions */ struct tm *my_gmtime(const time_t *t); struct tm *my_localtime(const time_t *t); time_t my_mktime(struct tm *tp); time_t my_time(time_t *t); /*****************************************************************************/ /* Functions */ /*****************************************************************************/ /* * Mac file times are based on 1904 Jan 1 00:00 local time, * not 1970 Jan 1 00:00 UTC. * So we have to convert the time stamps into UNIX UTC * compatible values. */ time_t MacFtime2UnixFtime(unsigned long macftime) { long UTCoffset; GetGMToffsetMac(macftime, &UTCoffset); MACOS_TO_UNIX(macftime); macftime -= UTCoffset; return macftime; } /* * Mac file times are based on 1904 Jan 1 00:00 local time, * not 1970 Jan 1 00:00 UTC. * So we have to convert the time stamps into MacOS local * compatible values. */ unsigned long UnixFtime2MacFtime(time_t unxftime) { long UTCoffset; unsigned long macftime = unxftime; UNIX_TO_MACOS(macftime); GetGMToffsetMac(macftime, &UTCoffset); macftime += UTCoffset; return macftime; } /* * This function convert a file-localtime to an another * file-localtime. */ time_t AdjustForTZmoveMac(unsigned long macloctim, long s_gmtoffs) { time_t MacGMTTime; long UTCoffset; /* convert macloctim into corresponding UTC value */ MacGMTTime = macloctim - s_gmtoffs; GetGMToffsetMac(macloctim, &UTCoffset); return (MacGMTTime + UTCoffset); } /* AdjustForTZmove() */ /* * This function calculates the difference between the supplied Mac * ftime value (local time) and the corresponding UTC time in seconds. */ Boolean GetGMToffsetMac(unsigned long mactime, long *UTCoffset) { mactime = mactime; /* * Caveat: On a Mac, we only know the GMT and DST offsets for * the current time, not for the time in question. * Mac has no support for DST handling. * DST changeover is all manually set by the user. May be later I can include a support of GMT offset calculation for the time in question here. */ *UTCoffset = GMTDelta(); return true; } /***************************************************************************** * Standard Library Replacement Functions * gmtime(), mktime(), localtime(), time() * * The unix epoch is used here. * These functions gmtime(), mktime(), localtime() and time() * expects and returns unix times. * * At midnight Jan. 1, 1970 GMT, the local time was * midnight Jan. 1, 1970 + GMTDelta(). * * *****************************************************************************/ struct tm *my_gmtime(const time_t *timer) { return time2tm(timer); } struct tm *my_localtime(const time_t *timer) { time_t maclocal; maclocal = *timer; maclocal += GMTDelta(); return time2tm(&maclocal); } time_t my_mktime(struct tm *tp) { time_t maclocal; maclocal = tm2time(tp); maclocal -= GMTDelta(); return maclocal; } time_t my_time(time_t *time) { time_t tmp_time; GetDateTime(&tmp_time); MACOS_TO_UNIX(tmp_time); if (time) { *time = tmp_time; } return tmp_time; } /*****************************************************************************/ /* static module level functions /*****************************************************************************/ /* * The geographic location and time zone information of a Mac * are stored in extended parameter RAM. The ReadLocation * produdure uses the geographic location record, MachineLocation, * to read the geographic location and time zone information in * extended parameter RAM. * * Because serial port and SLIP conflict with ReadXPram calls, * we cache the call here. * * Caveat: this caching will give the wrong result if a session * extend across the DST changeover time, but * this function resets itself every 2 hours. */ static void myReadLocation(MachineLocation * loc) { static MachineLocation storedLoc; /* InsideMac, OSUtilities, page 4-20 */ static time_t first_call = 0, last_call = 86400; if ((last_call - first_call) > 7200) { GetDateTime(&first_call); ReadLocation(&storedLoc); } GetDateTime(&last_call); *loc = storedLoc; } static Boolean DaylightSaving(void) { MachineLocation loc; unsigned char dlsDelta; myReadLocation(&loc); dlsDelta = loc.u.dlsDelta; return (dlsDelta != 0); } /* current local time = GMTDelta() + GMT GMT = local time - GMTDelta() */ static long GMTDelta(void) { MachineLocation loc; long gmtDelta; myReadLocation(&loc); /* * On a Mac, the GMT value is in seconds east of GMT. For example, * San Francisco is at -28,800 seconds (8 hours * 3600 seconds per hour) * east of GMT. The gmtDelta field is a 3-byte value contained in a * long word, so you must take care to get it properly. */ gmtDelta = loc.u.gmtDelta & 0x00FFFFFF; if ((gmtDelta & 0x00800000) != 0) { gmtDelta |= 0xFF000000; } return gmtDelta; } /* This routine simulates stdclib time(), time in seconds since 1.1.1970 The time is in GMT */ static time_t GetTimeMac(void) { unsigned long maclocal; /* * Get the current time expressed as the number of seconds * elapsed since the Mac epoch, midnight, Jan. 1, 1904 (local time). * On a Mac, current time accuracy is up to a second. */ GetDateTime(E* UNZIP.BCKI "[UNZIP542.MACOS.SOURCE]MACTIME.C;1 &maclocal); /* Get Mac local time */ maclocal -= GMTDelta(); /* Get Mac GMT */ MACOS_TO_UNIX(maclocal); return maclocal; /* return unix GMT */ } /* * clear_tm - sets a broken-down time to the equivalent of 1970/1/1 00:00:00 */ static void clear_tm(struct tm * tm) { tm->tm_sec = 0; tm->tm_min = 0; tm->tm_hour = 0; tm->tm_mday = 1; tm->tm_mon = 0; tm->tm_year = 0; tm->tm_wday = 1; tm->tm_yday = 0; tm->tm_isdst = -1; } static void normalize(int *i,int *j,int norm) { while(*i < 0) { *i += norm; (*j)--; } while(*i >= norm) { *i -= norm; (*j)++; } } /* Returns the GMT times */ static time_t Mactime(time_t *timer) { time_t t = GetTimeMac(); if (timer != NULL) *timer = t; return t; } static struct tm *time2tm(const time_t *timer) { DateTimeRec dtr; MachineLocation loc; time_t macLocal = *timer; static struct tm statictime; static const short monthday[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; UNIX_TO_MACOS(macLocal); SecondsToDate(macLocal, &dtr); statictime.tm_sec = dtr.second; /* second, from 0 to 59 */ statictime.tm_min = dtr.minute; /* minute, from 0 to 59 */ statictime.tm_hour = dtr.hour; /* hour, from 0 to 23 */ statictime.tm_mday = dtr.day; /* day of the month, from 1 to 31 */ statictime.tm_mon = dtr.month - 1; /* month, 1= January and 12 = December */ statictime.tm_year = dtr.year - 1900; /* year, ranging from 1904 to 2040 */ statictime.tm_wday = dtr.dayOfWeek - 1; /* day of the week, 1 = Sun, 7 = Sat */ statictime.tm_yday = monthday[statictime.tm_mon] + statictime.tm_mday - 1; if (2 < statictime.tm_mon && !(statictime.tm_year & 3)) { ++statictime.tm_yday; } myReadLocation(&loc); statictime.tm_isdst = DaylightSaving(); return(&statictime); } static time_t tm2time(struct tm *tp) { time_t intMacTime; DateTimeRec dtr; normalize(&tp->tm_sec, &tp->tm_min, 60); normalize(&tp->tm_min, &tp->tm_hour,60); normalize(&tp->tm_hour,&tp->tm_mday,24); normalize(&tp->tm_mon, &tp->tm_year,12); dtr.year = tp->tm_year + 1900; /* years since 1900 */ dtr.month = tp->tm_mon + 1; /* month, 0 = January and 11 = December */ dtr.day = tp->tm_mday; /* day of the month, from 1 to 31 */ dtr.hour = tp->tm_hour; /* hour, from 0 to 23 */ dtr.minute = tp->tm_min; /* minute, from 0 to 59 */ dtr.second = tp->tm_sec; /* second, from 0 to 59 */ DateToSeconds(&dtr, &intMacTime); MACOS_TO_UNIX(intMacTime); return intMacTime; } "*[UNZIP542.MACOS.SOURCE]MACTIME.H;1+,./ 4-I 0@123KPWO56s\T7s\T89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef _MACTIME_H_ #define _MACTIME_H_ /* ----------------------------------------------------------------------------- The original functions (Metrowerks Codewarrior pro 3.0) gmtime, localtime, mktime and time do not work correctly. The supplied link library mactime.c contains replacement functions for them. * Caveat: On a Mac, we only know the GMT and DST offsets for * the current time, not for the time in question. * Mac has no support for DST handling. * DST changeover is all manually set by the user. ------------------------------------------------------------------------------*/ #include #include /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ /* * ARGH. Mac times are based on 1904 Jan 1 00:00, not 1970 Jan 1 00:00. * So we have to diddle time_t's appropriately: add or subtract 66 years' * worth of seconds == number of days times 86400 == (66*365 regular days + * 17 leap days ) * 86400 == (24090 + 17) * 86400 == 2082844800L seconds. * We hope time_t is an unsigned long (ulg) on the Macintosh... */ /* This Offset is only used by MacFileDate_to_UTime() */ #define MACOS_TO_UNIX(x) (x) -= (unsigned long)MacOS_2_Unix #define UNIX_TO_MACOS(x) (x) += (unsigned long)MacOS_2_Unix /* The MacOS function GetDateTime returns the number of seconds elapsed since midnight, January 1, 1904. */ extern const unsigned long MacOS_2_Unix; /* prototypes for public utility functions */ time_t MacFtime2UnixFtime(unsigned long macftime); unsigned long UnixFtime2MacFtime(time_t unxftime); time_t AdjustForTZmoveMac(unsigned long macloctim, long s_gmtoffs); Boolean GetGMToffsetMac(unsigned long macftime, long *UTCoffset); #endif _#*[UNZIP542.MACOS.SOURCE]MACUNZIP.C;1+,.1/ 411)-I 0@123KPWO256Mi՞7Mi՞89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- macunzip.c Main-function for use with the standalone Unzip App. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #define UNZIP_INTERNAL #include "unzip.h" #include "version.h" #include "pathname.h" #include "helpers.h" #include /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define aboutAlert 128 #define selectDialog 129 #define okItem 1 #define cancelItem 2 #define editItem 3 #define staticItem 4 #define unzipMenuBar 128 #define appleMenu 128 #define aboutItem 1 #define fileMenu 129 #define extractItem 1 #define infoItem 2 #define listItem p=;U:}`.*N_'Mt{I*l3'9PqC.h26w7 2W VrS -#H0:j2&UH Z\6t\Rbf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7xX$"G^`y[?q]g01!vMW.F>v!HB"}OSbD;Bp(PAJj-QmUc_d>Q e9o$|ZC`(U3hTSHXdCp V, OGTU V2cutv=VM[F`oH[h44k([ZMQU W>D]&Na k>\LNe1CGbP-AXJ>L}7@C@L 9h}hc]YzuX= HS] '@ va]I(K.38Q@M~vS,:eSEz&TG@ \]'m#~G%:d)4Q$s79 pP+ohl|)x?|\vY{@tk, Y]^DO,\GH.\]s nGXZ$3a=yf!Iqg#)^jCYZ!Ed1P &zy-F+l+I#@K}NC*f}AHHcevl:T,k>}-'fz'#,~/%90R|t "aQLk kBU dK7>DV|>}_ x >]\E)pt4?71sB[TX y1R^LrP1ma1+$>lDC-I|g Y|y'T2 \\cO-KSPQqYz!7$MEp&t1.Cz?x6!3$u;+Q/c$LtG v~rE9Z A aqs .=b8ezV\^n(rS6Ae9w dS_t$TZ U8RR8C}sQTv:D.c-UnONtirsJ&z\LU envMachUnknown) && (machineType < envMacII)) { if ((trapNumber &= 0x03FF) > 0x01FF) trapNumber = _Unimplemented; } return (NGetTrapAddress(trapNumber, trapType) != #ifdef __MWERKS__ NGetTrapAddress(_Unimplemented, trapType)); #else GetTrapAddress(_Unimplemented)); #endif } /* ** excute menu-command ** */ static void domenu(menucommand) long menucommand; { short themenu, theitem; DialogPtr thedialog; Str255 name; long check; themenu = HiWord(menucommand); theitem = LoWord(menucommand); switch (themenu) { case appleMenu: if (theitem == aboutItem) { ParamText((StringPtr)UnzipVersion, (StringPtr)ZipinfoVersion, nil, nil); Alert(aboutAlert, nil); } else { GetMenuItemText(appleHandle, theitem, name); theitem = OpenDeskAcc(name); } break; case fileMenu: switch (theitem) { case extractItem: if (modifiers & screenFlag) command = 'c'; else command = 'x'; modifierMask = extractMask; break; case infoItem: command = 'Z'; modifierMask = infoMask; break; case listItem: if (modifiers & verboseFlag) command = 'v'; else command = 'l'; modifierMask = listMask; break; case testItem: command = 't'; modifierMask = testMask; break; case commentItem: command = 'z'; modifierMask = commentMask; break; case freshenItem: command = 'f'; modifierMask = freshenMask; break; case updateItem: command = 'u'; modifierMask = updateMask; break; case quitItem: stop = true; break; default: break; } break; case editMenu: break; case modifierMenu: switch (theitem) { case excludeItem: check = -1; break; case selectItem: thedialog = GetNewDialog(selectDialog, nil, (WindowPtr)(-1)); SetPort(thedialog); do ModalDialog(nil, &theitem); while ((theitem != okItem) && (theitem != cancelItem)); if (theitem == okItem) { GetDialogItem(thedialog, editItem, &itemType, &itemHandle, &itemRect); GetDialogItemText(itemHandle, (StringPtr)&fileList); p2cstr((StringPtr)fileList); } DisposeDialog(thedialog); check = -1; break; case quietItem: check = (modifiers ^= quietFlag) & quietFlag; break; case verboseItem: check = (modifiers ^= verboseFlag) & verboseFlag; break; default: break; } if (check == 0) CheckItem(modifierHandle, theitem, false); else if (check > 0) CheckItem(modifierHandle, theitem, true); break; case screenMenu: switch (theitem) { case pauseItem: check = (modifiers ^= pauseFlag) & pauseFlag; screenControl("p", check); break; case scrollItem: check = (modifiers ^= scrollFlag) & scrollFlag; screenControl("s", check); break; default: break; } if (check == 0) CheckItem(screenHandle, theitem, false); else if (check > 0) CheckItem(screenHandle, theitem, true); break; case extractMenu: switch (theitem) { case screenItem: check = (modifiers ^= screenFlag) & screenFlag; break; case junkItem: check = (modifiers ^= junkFlag) & junkFlag; break; default: break; } if (check == 0) CheckItem(extractHandle, theitem, false); else if (check > 0) CheckItem(extractHandle, theitem, true); De UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACUNZIP.C;11% break; case caseMenu: switch (theitem) { case insensitiveItem: check = (modifiers ^= insensitiveFlag) & insensitiveFlag; break; case lowercaseItem: check = (modifiers ^= lowercaseFlag) & lowercaseFlag; break; default: break; } if (check == 0) CheckItem(caseHandle, theitem, false); else if (check > 0) CheckItem(caseHandle, theitem, true); break; case convertMenu: switch (theitem) { case autoItem: CheckItem(convertHandle, autoItem, true); CheckItem(convertHandle, binaryItem, false); CheckItem(convertHandle, textItem, false); modifiers &= (allFlags ^ textFlag); modifiers |= autoFlag; break; case binaryItem: CheckItem(convertHandle, autoItem, false); CheckItem(convertHandle, binaryItem, true); CheckItem(convertHandle, textItem, false); modifiers &= (allFlags ^ (autoFlag | textFlag)); break; case textItem: CheckItem(convertHandle, autoItem, false); CheckItem(convertHandle, binaryItem, false); CheckItem(convertHandle, textItem, true); modifiers &= (allFlags ^ autoFlag); modifiers |= textFlag; break; default: break; } break; case overwriteMenu: switch (theitem) { case alwaysItem: CheckItem(overwriteHandle, alwaysItem, true); CheckItem(overwriteHandle, neverItem, false); CheckItem(overwriteHandle, promptItem, false); modifiers &= (allFlags ^ neverFlag); modifiers |= overwriteFlag; break; case neverItem: CheckItem(overwriteHandle, alwaysItem, false); CheckItem(overwriteHandle, neverItem, true); CheckItem(overwriteHandle, promptItem, false); modifiers &= (allFlags ^ overwriteFlag); modifiers |= neverFlag; break; case promptItem: CheckItem(overwriteHandle, alwaysItem, false); CheckItem(overwriteHandle, neverItem, false); CheckItem(overwriteHandle, promptItem, true); modifiers &= (allFlags ^ (neverFlag | overwriteFlag)); break; default: break; } break; case infoMenu: switch (theitem) { case prtCommentItem: check = (modifiers ^= prtCommentFlag) & prtCommentFlag; break; case prtHeaderItem: check = (modifiers ^= prtHeaderFlag) & prtHeaderFlag; break; case prtTotalsItem: check = (modifiers ^= prtTotalsFlag) & prtTotalsFlag; break; default: break; } if (check == 0) CheckItem(infoHandle, theitem, false); else if (check > 0) CheckItem(infoHandle, theitem, true); break; case formatMenu: switch (theitem) { case filenameItem: CheckItem(formatHandle, filenameItem, true); CheckItem(formatHandle, longItem, false); CheckItem(formatHandle, mediumItem, false); CheckItem(formatHandle, shortItem, false); modifiers &= (allFlags ^ (longFlag | mediumFlag | shortFlag)); modifiers |= filenameFlag; break; case longItem: CheckItem(formatHandle, filenameItem, false); CheckItem(formatHandle, longItem, true); CheckItem(formatHandle, mediumItem, false); CheckItem(formatHandle, shortItem, false); modifiers &= (allFlags ^ (filenameFlag | mediumFlag | shortFlag)); modifiers |= longFlag; break; case mediumItem: CheckItem(formatHandle, filenameItem, false); CheckItem(formatHandle, longItem, false); CheckItem(formatHandle, mediumItem, true); CheckItem(formatHandle, shortItem, false); modifiers &= (allFlags ^ (filenameFlag | longFlag | shortFlag)); modifiers |= mediumFlag; break; case shortItem: CheckItem(formatHandle, filenameItem, false); CheckItem(formatHandle, longItem, false); CheckItem(formatHandle, mediumItem, false); CheckItem(formatHandle, shortItem, true); modifiers &= (allFlags ^ (filenameFlag | longFlag | mediumFlag)); modifiers |= shortFlag; break; default: break; } break; default: break; } HiliteMenu(0); return; } /* ** work with shortcuts ** */ static void dokey(myevent) EventRecord *myevent; { char code; code = (char)(myevent->message & charCodeMask); if (myevent->modifiers & cmdKey) { if (myevent->what != autoKey) { domenu(MenuKey(code)); } } return; } /* ** work with mouse-events ** */ static void domousedown(EventRecord *myevent) { WindowPtr whichwindow; long code; code = FindWindow(myevent->where, &whichwindow); switch (code) { case inSysWindow: SystemClick(myevent, whichwindow); break; case inMenuBar: domenu(MenuSelect(myevent->where)); break; } return; } /* ** Do a little event-handling and let the user stop ** th current action */ void UserStop(void) { EventRecord theEvent; if ( WaitNextEvent( everyEvent, &theEvent, 0, nil )) { switch (theEvent.what) { case mouseDown: domousedown( &theEvent ); break; case autoKey: case keyDown: { if ((theEvent.modifiers & cmdKey) && ((theEvent.message & charCodeMask) == '.')) { printf("\n\n <- User Canceled -> \n"); exit(1); /* setjmp() must be already called */ } return; } } /* switch (theEvent.what) */ } /* if ( WaitNextEvent(... */ } /* ** The Standalone Unzip starts here ** */ int main(argc, argv) int argc; char *argv[]; { Uz_Globs saveGlobals; Boolean haveEvent, useWNE; short markChar; char *ArchivePath, *ExtractPath; OSErr err; FlushEvents(everyEvent, 0); InitGraf(&qd.thePort); InitFonts(); InitWindows(); InitMenus(); TEInit(); InitDialogs(nil); InitCursor(); CONSTRUCTGLOBALS(); sprintf(UnzipVersion, "%d.%d%d%s of %s", UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE); sprintf(ZipinfoVersion, "%d.%d%d%s of %s", ZI_MAJORVER, ZI_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE); c2pstr(UnzipVersion); c2pstr(ZipinfoVersion); SysEnvirons(1, &sysRec); useWNE = TrapAvailable(sysRec.machineType, _WaitNextEvent, ToolTrap); SetMenuBar(menubar = GetNewMBar(unzipMenuBar)); DisposeHandle(menubar); InsertMenu(GetMenu(screenMenu), -1); InsertMenu(GetMenu(extractMenu), -1); InsertMenu(GetMenu(caseMenu), -1); InsertMenu(GetMenu(convertMenu), -1); InsertMenu(GetMenu(overwriteMenu), -1); InsertMenu(GetMenu(infoMenu), -1); InsertMenu(GetMenu(formatMenu), -1); AppendResMenu(appleHandle = GetMenuHandle(appleMenu), 'DRVR'); modifierHandle = GetMenuHandle(modifierMenu); screenHandle = GetMenuHandle(screenMenu); extractHandle = GetMenuHandle(extractMenu); Յ V UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACUNZIP.C;11)" caseHandle = GetMenuHandle(caseMenu); convertHandle = GetMenuHandle(convertMenu); overwriteHandle = GetMenuHandle(overwriteMenu); infoHandle = GetMenuHandle(infoMenu); formatHandle = GetMenuHandle(formatMenu); DrawMenuBar(); screenOpen("Unzip"); modifiers = 0; GetItemMark(modifierHandle, quietItem, &markChar); if (markChar) modifiers ^= quietFlag; GetItemMark(modifierHandle, verboseItem, &markChar); if (markChar) modifiers ^= verboseFlag; GetItemMark(screenHandle, pauseItem, &markChar); if (markChar) modifiers ^= pauseFlag; screenControl("p", markChar); GetItemMark(screenHandle, scrollItem, &markChar); if (markChar) modifiers ^= scrollFlag; screenControl("s", markChar); GetItemMark(extractHandle, screenItem, &markChar); if (markChar) modifiers ^= screenFlag; GetItemMark(extractHandle, junkItem, &markChar); if (markChar) modifiers ^= junkFlag; GetItemMark(caseHandle, insensitiveItem, &markChar); if (markChar) modifiers ^= insensitiveFlag; GetItemMark(caseHandle, lowercaseItem, &markChar); if (markChar) modifiers ^= lowercaseFlag; GetItemMark(convertHandle, autoItem, &markChar); if (markChar) modifiers ^= autoFlag; GetItemMark(convertHandle, textItem, &markChar); if (markChar) modifiers ^= textFlag; if ((modifiers & (autoFlag | textFlag)) == (autoFlag | textFlag)) { CheckItem(convertHandle, textItem, false); modifiers &= (allFlags ^ textFlag); } else if (modifiers & (autoFlag | textFlag)) CheckItem(convertHandle, binaryItem, false); else CheckItem(convertHandle, binaryItem, true); GetItemMark(overwriteHandle, alwaysItem, &markChar); if (markChar) modifiers ^= overwriteFlag; GetItemMark(overwriteHandle, neverItem, &markChar); if (markChar) modifiers ^= neverFlag; if ((modifiers & (neverFlag | overwriteFlag)) == (neverFlag | overwriteFlag)) { CheckItem(overwriteHandle, alwaysItem, false); CheckItem(overwriteHandle, neverItem, false); CheckItem(overwriteHandle, promptItem, true); modifiers &= (allFlags ^ (neverFlag | overwriteFlag)); } else if (modifiers & (neverFlag | overwriteFlag)) CheckItem(overwriteHandle, promptItem, false); else CheckItem(overwriteHandle, promptItem, true); GetItemMark(infoHandle, prtCommentItem, &markChar); if (markChar) modifiers ^= prtCommentFlag; GetItemMark(infoHandle, prtHeaderItem, &markChar); if (markChar) modifiers ^= prtHeaderFlag; GetItemMark(infoHandle, prtTotalsItem, &markChar); if (markChar) modifiers ^= prtTotalsFlag; GetItemMark(formatHandle, filenameItem, &markChar); if (markChar) modifiers ^= filenameFlag; GetItemMark(formatHandle, longItem, &markChar); if (markChar) modifiers ^= longFlag; GetItemMark(formatHandle, mediumItem, &markChar); if (markChar) modifiers ^= mediumFlag; GetItemMark(formatHandle, shortItem, &markChar); if (markChar) modifiers ^= shortFlag; if (modifiers & longFlag) { CheckItem(formatHandle, filenameItem, false); CheckItem(formatHandle, mediumItem, false); CheckItem(formatHandle, shortItem, false); modifiers &= (allFlags ^ (filenameFlag | mediumFlag | shortFlag)); } else if (modifiers & mediumFlag) { CheckItem(formatHandle, filenameItem, false); CheckItem(formatHandle, shortItem, false); modifiers &= (allFlags ^ (filenameFlag | shortFlag)); } else if (modifiers & shortFlag) { CheckItem(formatHandle, filenameItem, false); modifiers &= (allFlags ^ filenameFlag); } command = ' '; stop = false; while (!stop) { SetCursor(&qd.arrow); if (useWNE) { haveEvent = WaitNextEvent(everyEvent, &myevent, LONG_MAX, NULL); } else { SystemTask(); haveEvent = GetNextEvent(everyEvent, &myevent); } if (haveEvent) { switch (myevent.what) { case activateEvt: break; case keyDown: case autoKey: dokey(&myevent); break; case mouseDown: domousedown(&myevent); break; case updateEvt: screenUpdate((WindowPtr)myevent.message); break; case mouseUp: case keyUp: break; default: break; } } if (command != ' ') { char *s, **v, modifierString[32]; Point p; int m, n; SFTypeList myTypes = {'TEXT', 'ZIP '}; StandardFileReply myReply; SetPt(&p, 40, 40); StandardGetFile(nil, 2, myTypes, &myReply); ArchivePath = StrCalloc(512); ExtractPath = StrCalloc(512); GetFullPathFromSpec(ArchivePath, &myReply.sfFile, &err); strcpy(ExtractPath,ArchivePath); FindNewExtractFolder(ExtractPath, false); if (myReply.sfGood && (CheckMountedVolumes(ArchivePath) == 1)) { modifierMask &= modifiers; s = modifierString; *s++ = '-'; if ((command != 'x') && (command != 'Z')) *s++ = command; if (modifierMask) { if (modifierMask & (autoFlag | textFlag)) *s++ = 'a'; if (modifierMask & textFlag) *s++ = 'a'; if (modifierMask & insensitiveFlag) *s++ = 'C'; if (modifierMask & junkFlag) *s++ = 'j'; if (modifierMask & lowercaseFlag) *s++ = 'L'; if (modifierMask & neverFlag) *s++ = 'n'; if (modifierMask & overwriteFlag) *s++ = 'o'; if (modifierMask & quietFlag) *s++ = 'q'; if (modifierMask & verboseFlag) *s++ = 'v'; if (modifierMask & prtCommentFlag) *s++ = 'z'; if (modifierMask & prtHeaderFlag) *s++ = 'h'; if (modifierMask & prtTotalsFlag) *s++ = 't'; if (modifierMask & filenameFlag) *s++ = '2'; if (modifierMask & longFlag) *s++ = 'l'; if (modifierMask & mediumFlag) *s++ = 'm'; if (modifierMask & shortFlag) *s++ = 's'; } if (*(s - 1) == '-') s -= 1; *s++ = 'd'; *s = '\0'; v = (char **)malloc(sizeof(char *)); *v = "unzip"; argc = 1; envargs(&argc, &v, NULL, NULL); argv = (char **)malloc((argc + 3) * sizeof(char *)); argv[m = 0] = (command == 'Z') ? "zipinfo" : "unzip"; if (*modifierString) argv[++m] = modifierString; argv[++m] = ExtractPath; argv[++m] = ArchivePath; for (n = 1; n < argc; n++) argv[n + m] = v[n]; argv[argc += m] = NULL; free(v); for (n = 0; argv[n] != NULL; n++) printf("%s ", argv[n]); printf("...\n\n"); memcpy(&saveGlobals, &G, sizeof(Uz_Globs)); unzip(__G__ argc, argv); memcpy(&G, &saveGlobals, sizeof(Uz_Globs)); ArchivePath = StrFree(ArchivePath); ExtractPath = StrFree(ExtractPath); printf("\nDone\n"); } fileList[0] = '\0'; command = ' '; } } screenClose(); DESTROYGL^S UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]MACUNZIP.C;111OBALS() ExitToShell(); return 0; } *#*[UNZIP542.MACOS.SOURCE]PATHNAME.C;1+,.#/ 4##-I 0@123KPWO$56vܞ7vܞ89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- pathname.c Function dealing with the pathname. Mostly C-string work. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include #include #include #include "pathname.h" #include "helpers.h" #include "macstuff.h" /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ const char ResourceMark[] = "XtraStuf.mac:"; /* see also macos.c */ #include "zip.h" /*****************************************************************************/ /* Functions */ /*****************************************************************************/ /* ** return volumename from pathname ** */ unsigned short GetVolumeFromPath(const char *FullPath, char *VolumeName) { const char *VolEnd, *tmpPtr1; char *tmpPtr2 = VolumeName; AssertStr(FullPath,"GetVolumeFromPath") for (VolEnd = FullPath; *VolEnd != '\0' && *VolEnd != ':'; VolEnd++) ; if (*VolEnd == '\0') return 0; for (tmpPtr1 = FullPath; tmpPtr1 != VolEnd;) { *tmpPtr2++ = *tmpPtr1++; } *tmpPtr2 = '\0'; return (unsigned short) strlen(VolumeName); } /***********************************/ /* Function FindNewExtractFolder() */ /***********************************/ char *FindNewExtractFolder(char *ExtractPath, Boolean uniqueFolder) { char buffer[NAME_MAX], *tmpPtr, *namePtr; char *last_dotpos = ExtractPath; short count = 0, folderCount = 0; OSErr err; FSSpec Spec; long theDirID; Boolean isDirectory; unsigned short namelen, pathlen = strlen(ExtractPath); unsigned long ext_length = 0; unsigned long num_to_cut = 0; long firstpart_length = pathlen; AssertStr(ExtractPath,"FindNewExtractFolder ExtractPath == NULL") for (tmpPtr = ExtractPath; *tmpPtr; tmpPtr++) if (*tmpPtr == ':') { folderCount++; namePtr = tmpPtr; } if (folderCount > 1) { namelen = strlen(namePtr); } else { namelen = strlen(ExtractPath); } if (uniqueFolder) { for (count = 0; count < 99; count++) { memset(buffer,0,sizeof(buffer)); if (namelen >= 28) ExtractPath[pathlen-2] = 0x0; else ExtractPath[pathlen-1] = 0x0; sprintf(buffer,"%s%d",ExtractPath,count); GetCompletePath(ExtractPath, buffer, &Spec,&err); err = FSpGetDirectoryID(&Spec, &theDirID, &isDirectory); if (err == -43) break; } } else { /* Look for the last extension pos */ for (tmpPtr = ExtractPath; *tmpPtr; tmpPtr++) if (*tmpPtr == '.') last_dotpos = tmpPtr; ext_length = strlen(last_dotpos); if (ext_length < 6) { /* up to 5 chars are treated as a */ /* normal extension like ".html" or ".class" */ int nameLength = last_dotpos - ExtractPath; if (nameLength > 1) { ExtractPath[nameLength] = 0x0; } else { ExtractPath[pathlen-1] = 0x0; } } else { ExtractPath[pathlen-1] = 0x0; } GetCompletePath(ExtractPath, ExtractPath, &Spec,&err); } /* Foldernames must always end with a colon */ sstrcat(ExtractPath,":"); return ExtractPath; } /* ** creates an archive file name ** */ void createArchiveName(char *thePath) { char *tmpPtr, *namePtr; short folderCount = 0; unsigned short namelen, pathlen = strlen(thePath); if (thePath[pathlen-1] == ':') thePath[pathlen-1] = 0x0; for (tmpPtr = thePath; *tmpPtr; tmpPtr++) if (*tmpPtr == ':') { folderCount++; namePtr = tmpPtr; } namelen = strlen(namePtr); /* we have to eliminate illegal chars: * The name space for Mac filenames and Zip filenames (unix style names) * do both include all printable extended-ASCII characters. The only * difference we have to take care of is the single special character * used as path delimiter: * ':' on MacOS and '/' on Unix and '\' on Dos. * So, to convert between Mac filenames and Unix filenames without any * loss of information, we simply interchange ':' and '/'. Additionally, * we try to convert the coding of the extended-ASCII characters into * InfoZip's standard ISO 8859-1 codepage table. */ MakeCompatibleString(namePtr, '/', '_', '.', '-', -1); /* Avoid filenames like: "Archive..zip" */ if (thePath[pathlen-1] == '.') { thePath[pathlen-1] = 0; } if (folderCount >= 1) { /* path contains at least one folder */ if (namelen >= 28) { pathlen = pathlen-4; } thePath[pathlen] = '.'; thePath[pathlen+1] = 'z'; thePath[pathlen+2] = 'i'; thePath[pathlen+3] = 'p'; thePath[pathlen+4] = 0x0; return; } else { /* path contains no folder */ FindDesktopFolder(thePath); createArchiveName(thePath); } } /* ** finds the desktop-folder on a volume with ** largest amount of free-space. */ void FindDesktopFolder(char *Path) { char buffer[255]; FSSpec volumes[50]; /* 50 Volumes should be enough */ short actVolCount, volIndex = 1, VolCount = 0; OSErr err; short i, foundVRefNum; FSSpec spec; UnsignedWide freeBytes; UnsignedWide totalBytes; UnsignedWide MaxFreeBytes; err = OnLine(volumes, 50, &actVolCount, &volIndex); printerr("OnLine:", (err != -35) && (err != 0), err, __LINE__, __FILE__, ""); MaxFreeBytes.hi = 0; MaxFreeBytes.lo = 0; for (i=0; i < actVolCount; i++) { XGetVInfo(volumes[i].vRefNum, volumes[i].name, &volumes[i].vRefNum, &freeBytes, &totalBytes); if (MaxFreeBytes.hi < freeBytes.hi) { MaxFreeBytes.hi = freeBytes.hi; MaxFreeBytes.lo = freeBytes.lo; foundVRefNum = volumes[i].vRefNum; } if ((freeBytes.hi == 0) && (MaxFreeBytf UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]PATHNAME.C;1#es.lo < freeBytes.lo)) { MaxFreeBytes.hi = freeBytes.hi; MaxFreeBytes.lo = freeBytes.lo; foundVRefNum = volumes[i].vRefNum; } } FSpFindFolder(foundVRefNum, kDesktopFolderType, kDontCreateFolder,&spec); GetFullPathFromSpec(buffer, &spec , &err); sstrcat(buffer,Path); sstrcpy(Path,buffer); } /* ** return the path without the filename ** */ char *TruncFilename(char *DirPath, const char *FilePath) { char *tmpPtr; char *dirPtr = NULL; AssertStr(DirPath,"TruncFilename") Assert_it(Spec,"TruncFilename","") sstrcpy(DirPath, FilePath); for (tmpPtr = DirPath; *tmpPtr; tmpPtr++) if (*tmpPtr == ':') dirPtr = tmpPtr; if (dirPtr) *++dirPtr = '\0'; else printerr("TruncFilename: FilePath has no Folders", -1, -1, __LINE__, __FILE__, FilePath); return DirPath; } /* ** return only filename ** */ char *GetFilename(char *FileName, const char *FilePath) { const char *tmpPtr; const char *dirPtr = NULL; Assert_it(FileName,"GetFilename","") Assert_it(FilePath,"GetFilename","") for (tmpPtr = FilePath; *tmpPtr; tmpPtr++) { if (*tmpPtr == ':') { dirPtr = tmpPtr; } } if (dirPtr) { ++dirPtr; /* jump over the ':' */ } else { return strcpy(FileName, FilePath); /* FilePath has no Folders */ } return strcpy(FileName, dirPtr); } /* ** return fullpathname from folder/dir-id ** */ char *GetFullPathFromID(char *CompletePath, short vRefNum, long dirID, ConstStr255Param name, OSErr *err) { FSSpec spec; *err = FSMakeFSSpecCompat(vRefNum, dirID, name, &spec); printerr("FSMakeFSSpecCompat:", (*err != -43) && (*err != 0), *err, __LINE__, __FILE__, ""); if ( (*err == noErr) || (*err == fnfErr) ) { return GetFullPathFromSpec(CompletePath, &spec, err); } return NULL; } /* ** convert real-filename to archive-filename ** */ char *Real2RfDfFilen(char *RfDfFilen, const char *RealPath, short CurrentFork, short MacZipMode, Boolean DataForkOnly) { AssertStr(RealPath,"Real2RfDfFilen") AssertStr(RfDfFilen,"Real2RfDfFilen") if (DataForkOnly) /* make no changes */ { return sstrcpy(RfDfFilen, RealPath); } switch (MacZipMode) { case JohnnyLee_EF: { sstrcpy(RfDfFilen, RealPath); if (CurrentFork == DataFork) /* data-fork */ return sstrcat(RfDfFilen, "d"); if (CurrentFork == ResourceFork) /* resource-fork */ return sstrcat(RfDfFilen, "r"); break; } case NewZipMode_EF: { switch (CurrentFork) { case DataFork: { sstrcpy(RfDfFilen, RealPath); return RfDfFilen; /* data-fork */ break; } case ResourceFork: { sstrcpy(RfDfFilen, ResourceMark); sstrcat(RfDfFilen, RealPath); /* resource-fork */ return RfDfFilen; break; } default: { printerr("Real2RfDfFilen:", -1, -1, __LINE__, __FILE__, RealPath); return NULL; /* function should never reach this point */ } } break; } default: { printerr("Real2RfDfFilen:", -1, -1, __LINE__, __FILE__, RealPath); return NULL; /* function should never reach this point */ } } printerr("Real2RfDfFilen:", -1, -1, __LINE__, __FILE__, RealPath); return NULL; /* function should never come reach this point */ } /* ** convert archive-filename into a real filename ** */ char *RfDfFilen2Real(char *RealFn, const char *RfDfFilen, short MacZipMode, Boolean DataForkOnly, short *CurrentFork) { short length; int result; AssertStr(RfDfFilen,"RfDfFilen2Real") if (DataForkOnly || (MacZipMode == UnKnown_EF) || (MacZipMode < JohnnyLee_EF)) { *CurrentFork = DataFork; return sstrcpy(RealFn,RfDfFilen); } result = strncmp(RfDfFilen, ResourceMark, sizeof(ResourceMark)-2); if (result == 0) { MacZipMode = NewZipMode_EF; } switch (MacZipMode) { case JohnnyLee_EF: { sstrcpy(RealFn, RfDfFilen); length = strlen(RealFn); /* determine Fork type */ if (RealFn[length-1] == 'd') *CurrentFork = DataFork; else *CurrentFork = ResourceFork; RealFn[length-1] = '\0'; /* simply cut one char */ return RealFn; break; } case NewZipMode_EF: { /* determine Fork type */ result = strncmp(RfDfFilen, ResourceMark, sizeof(ResourceMark)-2); if (result != 0) { *CurrentFork = DataFork; sstrcpy(RealFn, RfDfFilen); return RealFn; /* data-fork */ } else { *CurrentFork = ResourceFork; if (strlen(RfDfFilen) > (sizeof(ResourceMark) - 1)) { sstrcpy(RealFn, &RfDfFilen[sizeof(ResourceMark)-1]); } else RealFn[0] = '\0'; return RealFn; /* resource-fork */ } break; } default: { *CurrentFork = NoFork; printerr("RfDfFilen2Real():", -1, MacZipMode, __LINE__, __FILE__, RfDfFilen); return NULL; /* function should never reach this point */ } } printerr("RfDfFilen2Real():", -1, MacZipMode, __LINE__, __FILE__, RfDfFilen); return NULL; /* function should never reach this point */ } /* ** return the applications name (argv[0]) ** */ char *GetAppName(void) { ProcessSerialNumber psn; static Str255 AppName; ProcessInfoRec pinfo; OSErr err; GetCurrentProcess(&psn); pinfo.processName = AppName; pinfo.processInfoLength = sizeof(pinfo); pinfo.processAppSpec = NULL; err = GetProcessInformation(&psn,&pinfo); AppName[AppName[0]+1] = 0x00; return (char *)&AppName[1]; } /* ** return fullpathname from FSSpec ** */ char *GetFullPathFromSpec(char *FullPath, FSSpec *Spec, OSErr *err) { Handle hFullPath; short len; Assert_it(Spec,"GetFullPathFromSpec","") *err = FSpGetFullPath(Spec, &len, &hFullPath); printerr("FSpGetFullPath:", (*err != -43) && (*err != 0), *err, __LINE__, __FILE__, ""); memmove(FullPath, (Handle) *hFullPath, len); FullPath[len] = '\0'; /* make c-string */ DisposeHandle((Handle)hFullPath); /* we don't need it any more */ printerr("Warning path length exceeds limit: ", len >= NAME_MAX, len, __LINE__, __FILE__, " chars "); return FullPath; } /* * This function expands a given partial path to a complete path. * Path expansions are relative to the running app. * This function follows the notation: * 1. relative path: * a: ":subfolder:filename" -> ":current folder:subfolder:filename" * b: "::folder2:filename" -> folder2 is beside the current * folder on the same level * c: "filename" -> in current folder * * An absolute path will be returned. The following characteristics of Macintosh pathnames should be noted: A full pathname never begins with a colon, but must contain at least one colon. A partial pathname always begins with a colon separator except in the case where the file partial pathname is a simple file or directory name. Single trailing separator colons in full or partial pathnames are ignorA UNZIP.BCKI #[UNZIP542.MACOS.SOURCE]PATHNAME.C;1#ed except in the case of full pathnames to volumes. In full pathnames to volumes, the trailing separator colon is required. Consecutive separator colons can be used to ascend a level from a directory to its parent directory. Two consecutive separator colons will ascend one level, three consecutive separator colons will ascend two levels, and so on. Ascending can only occur from a directory; not a file. */ char *GetCompletePath(char *CompletePath, const char *name, FSSpec *Spec, OSErr *err) { Boolean hasDirName = false; char currentdir[NAME_MAX]; char *tmpPtr; unsigned short pathlen; AssertStr(name,"GetCompletePath") Assert_it(Spec,"GetCompletePath","") Assert_it((CompletePath != name),"GetCompletePath","") for (tmpPtr = name; *tmpPtr; tmpPtr++) if (*tmpPtr == ':') hasDirName = true; if (name[0] != ':') /* case c: path including volume name or only filename */ { if (hasDirName) { /* okey, starts with volume name, so it must be a complete path */ sstrcpy(CompletePath, name); } else { /* only filename: add cwd and return */ getcwd(currentdir, NAME_MAX); sstrcat(currentdir, name); sstrcpy(CompletePath, currentdir); } } else if (name[1] == ':') /* it's case b: "::folder2:filename" */ { printerr("GetCompletePath ", -1, *err, __LINE__, __FILE__, "not implemented"); /* it's not yet implemented; do we really need this case ?*/ return NULL; } else /* it's case a: ":subfolder:filename" */ { getcwd(CompletePath, NAME_MAX); /* we don't need a second colon */ CompletePath[strlen(CompletePath)-1] = '\0'; sstrcat(CompletePath, name); } pathlen = strlen(CompletePath); *err = FSpLocationFromFullPath(pathlen, CompletePath, Spec); return CompletePath; } char *MakeFilenameShorter(const char *LongFilename) { static char filename[35]; /* contents should be never longer than 32 chars */ static unsigned char Num = 0; /* change the number for every call */ /* this var will rollover without a problem */ char tempLongFilename[1024], charnum[5]; char *last_dotpos = tempLongFilename; unsigned long full_length = strlen(LongFilename); unsigned long ext_length = 0; unsigned long num_to_cut = 0; long firstpart_length; char *tmpPtr; short MaxLength = 31; if (full_length <= MaxLength) /* filename is not long */ { return strcpy(filename,LongFilename); } Num++; strcpy(tempLongFilename,LongFilename); /* Look for the last extension pos */ for (tmpPtr = tempLongFilename; *tmpPtr; tmpPtr++) if (*tmpPtr == '.') last_dotpos = tmpPtr; ext_length = strlen(last_dotpos); firstpart_length = last_dotpos - tempLongFilename; if (ext_length > 6) /* up to 5 chars are treated as a */ { /* normal extension like ".html" or ".class" */ firstpart_length = 0; } num_to_cut = full_length - MaxLength; /* number the files to make the names unique */ sprintf(charnum,"~%x", Num); num_to_cut += strlen(charnum); if (firstpart_length == 0) { firstpart_length = full_length; tempLongFilename[firstpart_length - num_to_cut] = 0; sprintf(filename,"%s%s", tempLongFilename, charnum); } else { tempLongFilename[firstpart_length - num_to_cut] = 0; sprintf(filename,"%s%s%s", tempLongFilename, charnum, last_dotpos); } return filename; } i#*[UNZIP542.MACOS.SOURCE]PATHNAME.H;1+,./ 4-I 0@123KPWO56] 8'ž7] 8'ž89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef PATHNAME_H #define PATHNAME_H 1 char *StripPartialDir(char *CompletePath, const char *PartialPath, const char *FullPath); char *Real2RfDfFilen(char *RfDfFilen, const char *RealPath, short CurrentFork, short MacZipMode, Boolean DataForkOnly); char *RfDfFilen2Real(char *RealFn, const char *RfDfFilen, short MacZipMode, Boolean DataForkOnly, short *CurrentFork); unsigned short GetVolumeFromPath(const char *FullPath, char *VolumeName); char *GetCompletePath(char *CompletePath, const char *name, FSSpec *Spec, OSErr *err); char *TruncFilename(char *DirPath, const char *FilePath); char *GetFilename(char *CompletePath, const char *name); char *GetFullPathFromSpec(char *CompletePath, FSSpec *Spec, OSErr *err); char *GetFullPathFromID(char *CompletePath, short vRefNum, long dirID, ConstStr255Param name, OSErr *err); char *GetAppName(void); void createArchiveName(char *Path); void FindDesktopFolder(char *Path); char *FindNewExtractFolder(char *ExtractPath, Boolean uniqueFolder); char *MakeFilenameShorter(const char *LongFilename); /* Rule: UnKnown_EF should always be zero. JohnnyLee_EF, NewZipMode_EF should always greater than all other definitions */ #define UnKnown_EF 0 #define TomBrownZipIt1_EF 10 #define TomBrownZipIt2_EF 20 #define JohnnyLee_EF 30 #define NewZipMode_EF 40 #define ResourceFork -1 #define DataFork 1 #define NoFork 0 #ifndef NAME_MAX #define NAME_MAX 1024 #endif #endif /* PATHNAME_H */ "*[UNZIP542.MACOS.SOURCE]SXUNZIP.C;1+,./ 4-I 0@123KPWO 56~7~89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*****************************************************************************/ /* Includes */ /*****************************************************************************/ #include #include "version.h" #include #ifdef USE_SIOUX # include # include # include # include #endif /* USE_SIOUX */ /*****************************************************************************/ /* Global Vars */ /*****************************************************************************/ char fileList[256]; /*****************************************************************************/ /* Prototypes */ /*****************************************************************************/ int UzpMain(int argc,char **argv); char *GetUnZipLocalVersion(void); char *GetUnZipInfoVersions(void); int macgetch(void); void UserStop(void); /*****************************************************************************/ /* Functions ! UNZIP.BCKI "[UNZIP542.MACOS.SOURCE]SXUNZIP.C;1u  */ /*****************************************************************************/ #ifndef MacStaticLib #ifndef MACUNZIP_STANDALONE /* Program execution starts here with Metrowerks SIOUX-Console */ int main(int argc,char **argv) { int return_code; SIOUXSettings.asktosaveonclose = FALSE; SIOUXSettings.showstatusline = TRUE; SIOUXSettings.columns = 100; SIOUXSettings.rows = 40; argc = ccommand(&argv); return_code = UzpMain(argc,argv); printf("\n\n Finish %d",return_code); return return_code; } int macgetch(void) { WindowPtr whichWindow; EventRecord theEvent; char c; /* one-byte buffer for read() to use */ do { SystemTask(); if (!GetNextEvent(everyEvent, &theEvent)) theEvent.what = nullEvent; else { switch (theEvent.what) { case keyDown: c = theEvent.message & charCodeMask; break; case mouseDown: if (FindWindow(theEvent.where, &whichWindow) == inSysWindow) SystemClick(&theEvent, whichWindow); break; case updateEvt: break; } } } while (theEvent.what != keyDown); printf("*"); fflush(stdout); return (int)c; } /* SIOUX needs no extra event handling */ void UserStop(void) { } #endif /* #ifndef MACUNZIP_STANDALONE */ #endif /* #ifndef MacStaticLib */ char *GetUnZipLocalVersion(void) { static char UnZipVersionLocal[50]; memset(UnZipVersionLocal,0,sizeof(UnZipVersionLocal)); sprintf(UnZipVersionLocal, "[%s %s]", __DATE__, __TIME__); return UnZipVersionLocal; } char *GetUnZipInfoVersions(void) { static char UnzipVersion[200]; memset(UnzipVersion,0,sizeof(UnzipVersion)); sprintf(UnzipVersion, "Unzip Module\n%d.%d%d%s of %s", UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE); return UnzipVersion; } o%*[UNZIP542.MACOS.SOURCE]UNZIP_RC.HQX;1+,. / 4 -I 0@123KPWO 56J6\7J6\89GHJ(This file must be converted with BinHex 4.0) :#d&bBfKTGQ8ZFfPd!&0*9%46593K!*!%%23!N!65[90*9#%!!J!!%24b6'&e!TN !N!-@QCN0!!KeERTTF#jbBaEf1!6lrh3!6%TU!*!$J!#3"!8$bq6#IJ#3&!Y[!*! %rj!%8P053e*6483K!,'+E[HbPeU-!!!FrJ#3"JVT!*!%KNX!N!MBC3`!&CjkAB5 YAEECeXrEK!)``L9EH[`m0leZ$pK[bPfEGECTRT`1q"0'1'%ARKUq$XpGhcEqDm, *FGHDf*-4Mh#bM``fZAf%Cq6jNGq%Gf56#5I()i``-Q+E8"lEK*(EC%,**Z`f18D 1NpYNXM*bE0+[E"AiqVj*hqGQK"ej6UDEE,*I-YTNX-P[XJ&H"ddL4#+%2,fHN!# 0m2Sq-Bc'B(8eT@q`L0,ClAYMACV4fd9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FhGiU)Dea* DJh[MN!"pJ6&RNb1A'lR@@)'aTpKA(H90YV!kJ6&GVVq+RTcRrF,e9mQp0Sqm0DT "[MkQ0p$e9r+b21B$62,%R1ckUp5$0Smp$Eci2$BD@,LY`@k#aMSk2jGc8C(Ep9I YLqN#`H2@J,I+AV6F)@$ef*F'c&8UmRJG@bXBf%r!@iRP%ihCdJ&V`#kj4Pa#J"9 MlM1!E3&@J+Q&I"@r"SEM24d6CiD24hkhZYe,Z'XGfMGEqjVUfLRb@KJrS()Gjk0 9bqSarMi!*p!!!!: n*[UNZIP542.MACOS]UNZP.H;1+,0. / 4 m-> 50@123KPWO 56h/7h/89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- UnZp.h This header-files is global to the project Unzip standalone. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define MACUNZIP_STANDALONE #define MACUNZIP /* These functions are defined as a macro instead of a function. so we have to undefine them for replacing */ #undef getc #undef getchar #undef putchar #undef putc #ifndef TRUE #define TRUE 1 #endif /* TRUE */ #ifndef FALSE #define FALSE 0 #endif /* FALSE */ /*****************************************************************************/ /* Includes standard headers */ /*****************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #define MAC_DEBUG 1 */ #ifdef MAC_DEBUG #define LOG_DEBUG 7 /* debug-level messages */ int Print2Syslog(UInt8 priority, const char *format, ...); #include #define Notify(msg) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s (file: %s line: %d)", \ msg, __FILE__, __LINE__); \ } #define Assert_it(cond,msg,kind) \ { \ if (!(cond)) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s failed: [%s] cond: [%s] (file: %s line: %d)", \ kind, msg, #cond, __FILE__, __LINE__); \ } \ } #define AssertBool(b,msg) \ Assert_it (((b) == TRUE) || ((b) == FALSE),(msg),("AssertBool ")) #define AssertStr(s,msg) \ { \ int s_i = 0; \ Assert_it ((s),(msg),("1. AssertStr ")); \ while ((s)[s_i]) { \ Assert_it ((!iscntrl((s)[s_i]) || ((s)[s_i] == 0x0A) || \ ((s)[s_i] == 0x0D)),(s),("2. AssertStr ")); \ s_i++; \ } \ } #define AssertTime(t,msg) \ Assert_it (((t).tm_sec >= 0) && ((t).tm_sec < 62) && \ ((t).tm_min >= 0) && ((t).tm_min < 60) && \ ((t).tm_hour >= 0) && ((t).tm_hour < 24) && \ ((t).tm_mday >= 1) && ((t).tm_mday < 32) && \ ((t).tm_mon >= 0) && ((t).tm_mon < 12) && \ ((t).tm_wday >= 0) && ((t).tm_wday < 7) && \ ((t).tm_yday >= 0) && ((t).tm_yday < 366),(msg),("AssertStr ")) #define AssertIntRange(myvalue,minimum,maximum, msg) \ Assert_it (((myvalue) >= (minimum)) && ((myvalue) <= (maximum)), \ msg,("AssertIntRange ")) #define AssertStrNoOverlap(str1,str2,msg) \ { \ long s_i = 0; \ AssertStr((str1),(msg)) \ AssertStr((str2),(msg)) \ if ((str1) < (str2)) \ { \ s_i = strlen((str2)); \ Assert_it ( (((str1) + s_i) < (str2)),(msg),("AssertStrNoOverlap ")); \ } \ else \ { \ s_i = strlen((str1)); \ Assert_it ( (((str2) + s_i) < (str1)),(msg),("AssertStrNoOverlap ")); \ } \ } \ #else /* !MAC_DEBUG */ #define Assert_it(cond,msg,kind) #define AssertBool(b,msg) #define AssertStr(s,msg) #define AssertTime(t,msg) #define AssertIntRange(myvalue,minimum,maximum,msg) #define AssertStrNoOverlap(str1,str2,msg) #endif /* ?MAC_DEBUG */ *[UNZIP542.MACOS]UNZPLIB.H;1+,*. / 4 -> 50@123KPWO 5627289GHJ0 UNZIP.BCK*> 5NZIP542.MACOS]UNZPLIB.H;1 /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- UnZpLib.h This header-files is global to the project UnZpLib. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define MacStaticLib #define MACUNZIP /* These functions are defined as a macro instead of a function. so we have to undefine them for replacing (see printf.c) */ #undef getc #undef getchar #undef putchar #undef putc #ifndef TRUE #define TRUE 1 #endif /* TRUE */ #ifndef FALSE #define FALSE 0 #endif /* FALSE */ /* #define DEBUG_TIME */ #define USE_EF_UT_TIME /* since we have no TZ environment variable on Macs this option must be disabled */ #undef IZ_CHECK_TZ /*****************************************************************************/ /* Includes standard headers */ /*****************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #define MAC_DEBUG 1 */ #ifdef MAC_DEBUG #define LOG_DEBUG 7 /* debug-level messages */ int Print2Syslog(UInt8 priority, const char *format, ...); #include #define Notify(msg) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s (file: %s line: %d)", \ msg, __FILE__, __LINE__); \ } #define Assert_it(cond,msg,kind) \ { \ if (!(cond)) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s failed: [%s] cond: [%s] (file: %s line: %d)", \ kind, msg, #cond, __FILE__, __LINE__); \ } \ } #define AssertBool(b,msg) \ Assert_it (((b) == TRUE) || ((b) == FALSE),(msg),("AssertBool ")) #define AssertStr(s,msg) \ { \ int s_i = 0; \ Assert_it ((s),(msg),("1. AssertStr ")); \ while ((s)[s_i]) { \ Assert_it ((!iscntrl((s)[s_i]) || ((s)[s_i] == 0x0A) || \ ((s)[s_i] == 0x0D)),(s),("2. AssertStr ")); \ s_i++; \ } \ } #define AssertTime(t,msg) \ Assert_it (((t).tm_sec >= 0) && ((t).tm_sec < 62) && \ ((t).tm_min >= 0) && ((t).tm_min < 60) && \ ((t).tm_hour >= 0) && ((t).tm_hour < 24) && \ ((t).tm_mday >= 1) && ((t).tm_mday < 32) && \ ((t).tm_mon >= 0) && ((t).tm_mon < 12) && \ ((t).tm_wday >= 0) && ((t).tm_wday < 7) && \ ((t).tm_yday >= 0) && ((t).tm_yday < 366),(msg),("AssertStr ")) #define AssertIntRange(myvalue,minimum,maximum, msg) \ Assert_it (((myvalue) >= (minimum)) && ((myvalue) <= (maximum)), \ msg,("AssertIntRange ")) #define AssertStrNoOverlap(str1,str2,msg) \ { \ long s_i = 0; \ AssertStr((str1),(msg)) \ AssertStr((str2),(msg)) \ if ((str1) < (str2)) \ { \ s_i = strlen((str2)); \ Assert_it ( (((str1) + s_i) < (str2)),(msg),("AssertStrNoOverlap ")); \ } \ else \ { \ s_i = strlen((str1)); \ Assert_it ( (((str2) + s_i) < (str1)),(msg),("AssertStrNoOverlap ")); \ } \ } \ #else /* !MAC_DEBUG */ #define Assert_it(cond,msg,kind) #define AssertBool(b,msg) #define AssertStr(s,msg) #define AssertTime(t,msg) #define AssertIntRange(myvalue,minimum,maximum,msg) #define AssertStrNoOverlap(str1,str2,msg) #endif /* ?MAC_DEBUG */ *[UNZIP542.MACOS]UNZPPRJ.XML;1+,../ 4-> 50@123KPWO56޹Dٞ7޹Dٞ89GHJ O[% UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 ]> Unzip Sioux (68k) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS 68K Linker PreLinker PostLinker TargetnameUnzip Sioux (68k) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler yz1'mms`X;10yH,@dJi]J|2 O' 5(=gG7c8< |]:h('01'fl8EDb,j"UO*&Gd4x0ROV#C:|#sFX9} W,!mx2r{CLVHl8:ZT "-3M@Ing cOl/rE5xFp)'Na7q? OP^_>s[ +@yfr/4EhsOg'aBDcdI}r 7Oo$:kqc T?:~\ 8:5vM/8@B"Dn [T2j/~\ KEA"H7WR/Nyn)]Er4w Np_+$){z6$FHG6A_/AU I3j*N*4_ )J >"4$mX'u_NfoE&vsE T/S.)W!vKe%_Qx;D { _z&='pJHX,.C 4MwDf5~4O.{pXZ;hA (aO{p|&R87*]P&<.p6fOI87"T~B47@sEA3Yx:%e&:FtuFUa9O$6NX1e2N')X~rPb9m G)scs<`7P^S]u#DV-1^ ;Iu ,Fe]t_n?sbT%4S}c5+ot&O#wV|\-_-DZtycFP7 J ffj6B0o Tg".RU/YD' x]iF,M| +$8p7:]!#m1) jN&Gch?ERbu ~XKT5_R:[2gi\F"!uQ?%+$@9&-*tGFn5)[44CD*:ZY#yPD$+1kuQ(x4!WL}( Y!*PkXh $ _kIy[u+bjo]DH|y 8:DtJ3CZ}V F'/7,)uwq&l GlB>c)O{EqngD67]b+F@!yRgT"sxOcJtr a*9k/E k &&2!sr39<{b{Do/Q8Ru48NKjY +EkQU ;DhUB2.!f{dSWiVqvF{lnSfm|u6f'1i~jt.Tz)PrL3 @8s&$ }dd|5?g"R&(z DW`M xu!?lM|h{.)h| -W7.BI/u~24!EVmHc(i>: NJvFp-\ r/A=27CS8"\Gys[{ zR, NdP21e~^V[gZ:%8Vyva:zMRPi=H/} @PsAPu".\sG_KRm|/W/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187l^ `i.= )ly"v2]eR*%("'MQRS-P|ll:DQh%!1 0ZJ $C fZ8_)tvaM`N)Y<:]0a>"keIdKA l Y<`gwF#3nSEL|\m?>> J#Wz'3lSF0W|K<&Rs/.'r>zn\zi$?gMnUtK/e 7Dc%*-@=93Sl+pPx+k;nTWq  [i@8)_Ig$1"KXIT94o?BH`x}F]_P ?eewWRc]}QEo^3<1bjk4 S=Uef,  [W4W9@ e~D=f4NttKO<vJ/b@ 1npT]Q^U,g@OaVj.:~ K(^)G8.?JT X|:gf,&XetVr_tG~V5<8ytd_\KM>uswp=%TzAv@:}+r<,T.C|kLLinN9k P[:eg,-#.$hBm+:,5|_^ g=x{}+A_7<-_U0yfwf{qdz[-q.f"?qS.SEX.~~?*c&$gO2R+] t+h,"T ^%2lhpx($O")~y6V^'f+s)^j~ dq ,jP{#Z S| qh6&o+_!> _ J-,UI_k]NZIg,OW+A m'6s3vRg'1oM96gF$Xn55 oM?a&C,g3pz:F_4-Fi %mQEMYQA*Hqp c3VtC3Ne<JT~p9X*)hK29^xoAfORMx8(9qPW|&,z?`m#0T qKI HRLnf`"k^4nTmQ!p(Nf}/L0.JL.05]LJS?a4J PLT 7MAB-/*ju a8OAiiv~ lCZFg)L8=-qi:?uVYU+0 l~Y/8XqFH,:]"\;qVU8Z+cz}:l] X2k_x|2p)R|%4;]3hh &~m8H#1NZ3Hsf9w!/<'=&l] R>l8ep1PWrHVO@S^w{ LC AiKCw" }\ @z Kg5N9ok3,;IG:ft$S5of!PuM# tQ{ e )eh\uMb 5[UNZIP542.MACOS]UNZPPRJ.XML;1ڍPrecompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeOBJ FileExtension CompilerMPW Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cc CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse l` UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1~g!IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.seg Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension 5[UNZIP542.MACOS]UNZPPRJ.XML;10UE> Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowserfalse DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeLarge MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 5[UNZIP542.MACOS]UNZPPRJ.XML;1?> MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel0 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym0 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeApplication MWProject_68K_outfileUnzip Sioux (68k) MWProject_68K_symfilename MWProject_68K_filecreator1230662000 MWProject_68K_filetype1095782476 MWProject_68K_size1024 MWProject_68K_flags22720 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize512 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZpSx.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings0 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma0 MWWarning_C_warn_emptydecl0 MWWarning_C_warn_possunwant0 MWWarning_C_warn_unusedvarK UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 N0 MWWarning_C_warn_unusedarg0 MWWarning_C_warn_extracomma0 MWWarning_C_pedantic0 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual0 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameJe, UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1]Iexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentMC68K MWCodeGen_PPC_tracebacktablesNone MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole1 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym1 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs0 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeApplication MWProject_PPC_outfilea.out MWProject_PPC_filecreator1061109567 MWProject_PPC_filetype1095782476 MWProject_PPC_size384 MWProject_PPC_minsize384 MWProject_PPC_s UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1!~ltacksize64 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name crc32.c MacOS Text u UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1r{ Name crctab.c MacOS Text Name crypt.c MacOS Text Name ttyio.c MacOS Text Name envargs.c MacOS Text Name helpers.c MacOS Text Name helpers.h MacOS Text Name macstuff.c MacOS Text Name macstuff.h MacOS Text Name pathname.c MacOS Text Name pathname.h MacOS Text Name maccfg.h MacOS Text Name sxunzip.c MacOS Text Name UnZpSx.h MacOS Text Name mactime.c MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name unzip.rc MacOS Resource Name charmap.h MacOS Text Name FSp_fopen.c MacOS Text Name getenv.c MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name MSL Runtime68K.Lib MacOS Library Name MacOS.lib MacOS Library Name MathLib68K (2i).Lib MacOS Library First Segment Protected, Locked Name inflate.h MacOS NG. UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1jame globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c MacOS Name crc32.c MacOS Name crctab.c MacOS Name crypt.c MacOS Name ttyio.c MacOS Name envargs.c MacOS Name helpers.c MacOS Name helpers.h MacOS Name macstuff.c MacOS Name macstuff.h MacOS Name pathname.c MacOS Name pathname.h MacOS Name maccfg.h MacOS Name sxunzip.c MacOS Name UnZpSx.h MacOS Name macstat.c MacOS Name macstat.h MacOS Name charmap.h MacOS Name FSp_fopen.c MacOS Name getenv.c MacOS Name xu UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 mactime.c MacOS Name unzip.rc MacOS Name macos.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name MSL Runtime68K.Lib MacOS Name MacOS.lib MacOS Name MathLib68K (2i).Lib MacOS Unzip Sioux (PPC) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS PPC Linker PreLinker PostLinker TargetnameUnzip Sioux (PPC) OutputDirectory Path:  f+r.dJ>,?IjGS;z&/E}zl(U57 am#KTp.V#,v" ; ]H/-iMBR62f`'9'OINc daSG[JQ5M>xa1bk^ZGddB G.ZW"k}}3 k iL}-%Y^66v jbFY(}.%<)ko5 b d&Mda+YF)8 | #frdvv6htK"jDr$eMP<P*fRh ?TYXa#u3 aO{'67A0* ZwlyS'%n]<;TP15!J X{\9#5b%^Z&V$RT6@o$jq]Y/\ cW7:dT->uv3].Z)q yb3TqhuiL :fUJ:!^{{Jc7a e \=k(9Xc\QdHft3AN rlql]?tgDR+0=!x?s@lDAk}pq:Srpsg|3-VJf t!"'MvQj9S h%Zl_#r9$NkRyQabp#b gie1 exU |t~L !8$^[<{%/V#cqX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acOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cc CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse ) UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.s CompilerPPCAsm Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeXCOF FileExtension CompilerXCOFF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypedocu 5[UNZIP542.MACOS]UNZPPRJ.XML;1[kNG>FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionName<`B UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1VALUE>main TempBPTypefalse MWCodeGen_68K_codesizeSmart MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel0 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym1 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeApplication MWProject_68K_outfileToolbox68k.out MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1095782476 MWProject_68K_size384 MWProject_68K_flags22688 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize384 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZpSx.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings0 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel 5[UNZIP542.MACOS]UNZPPRJ.XML;1E>0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma0 MWWarning_C_warn_emptydecl0 MWWarning_C_warn_possunwant0 MWWarning_C_warn_unusedvar0 MWWarning_C_warn_unusedarg0 MWWarning_C_warn_extracomma0 MWWarning_C_pedantic0 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual0 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 5[UNZIP542.MACOS]UNZPPRJ.XML;1gING> MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentPPC MWCodeGen_PPC_tracebacktablesInline MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole0 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym0 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs1 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapse Ś UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1)reloads0 MWProject_PPC_typeApplication MWProject_PPC_outfileUnzip Sioux (PPC) MWProject_PPC_filecreator1230662000 MWProject_PPC_filetype1095782476 MWProject_PPC_size2048 MWProject_PPC_minsize1024 MWProject_PPC_stacksize512 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name MSL C.PPC.Lib MacOS Library Name MSL C++.PPC.Lib MacOS Library Name InterfaceLib MacOS Library Name MathLib MacOS Library Name MSL RuntimePPC.Lib MacOS Library Name MSL SIOUX.PPC.Lib MacOS Library Debug Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name envargs.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name A UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name crc32.c MacOS Text Name crctab.c MacOS Text Name crypt.c MacOS Text Name ttyio.c MacOS Text Name helpers.c MacOS Text Name helpers.h MacOS Text Name macstuff.c MacOS Text Name macstuff.h MacOS Text Name pathname.c MacOS Text Name pathname.h MacOS Text Name maccfg.h MacOS Text Name sxunzip.c MacOS Text Name UnZpSx.h MacOS Text Name mactime.c MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name unzip.rc MacOS Resource Name charmap.h MacOS Text Name FSp_fopen.c MacOS Text V UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1H  Name getenv.c MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name envargs.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c MacOS Name crc32.c MacOS Name crctab.c MacOS Name crypt.c MacOS Name ttyio.c MacOS Name helpers.c MacOS Name helpers.h MacOS Name macstuff.c MacOS Name macstuff.h MacOS Name pathname.c MacOS Name pathname.h MacOS Name maccfg.h MacOS Name sxunzip.c MacOS Name UnZpSx.h MacOS Name macstat.c MacOS Name macstat.h MacOS oE UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1T/ Name unzip.rc MacOS Name charmap.h MacOS Name FSp_fopen.c MacOS Name mactime.c MacOS Name getenv.c MacOS Name macos.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name MSL SIOUX.PPC.Lib MacOS Name MSL C.PPC.Lib MacOS Name MSL C++.PPC.Lib MacOS Name InterfaceLib MacOS Name MathLib MacOS Name MSL RuntimePPC.Lib MacOS Unzip Lib (PPC) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll <^@F3I$s>wD4a\m@hs|=A)CGTg73} -"x}Mh 5[40oWBxhF:~Da y1P!`7 nd|I{u=^L1?b[0\EZa63 B2B x? }X!rZjvJWI'VnH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nNdch^{{~&tt-T|=p'#TypD7XA ( Y4m$:!P|qxf?puro)Qjm{VyK4@JiubbDK^]^)w= [j t{Hpbt. F. "CdM>-0c  W.%vE0cE Q&_| .M:oe:}o%8Sztx'EHE vT@aE^U7: `+-l`=P'O;\/n|%/J=,@*M\b8 c,4pxVA(2Y]=\k26&NDX`q.l(YT;.YN94*  `g=U(HKqaqi\SXH ^?;YG$(B3%jWQ{{OKeh;E'&XRkHN[|V-9dc}=Ow|tW>}T tT%Qgq8( L~VT15'4SAn7;}1~ 3KK0B(OK`F/[P#|uLKp<+9 V98L+-He)2B4f 5*\%`Z!&FRDBelpc-`fsUErio*y f w|?lj!$*-`pg&H')Zra\C0;2BB~j~b\v#zG%#]MLM!;` %lxO1_;"rzmhMlv~R| Xlh3%C1;>(.]|K!S vo~/4-CMMqy"#^4}>;OBb84b*oxbBF=`|_B*VUS920q@gF^t vlLUMU?7jijKb+-v5k?E`Dj$h;[]E"t>Jd{td? &Ro}}eJZeO#]t5qplRHb0;T9B:?CUI%HI^"Tt{HzP-N l5 W v[ AJ]{a@%Ji`4t-:{`fptuasAZFpY9td RSHDqvBYlM2=.>rcqkt[TobqC<\NXg0rdZWV0TCCG3e H yD\\,LN%AkN$)tfZmNwt~v}_'a6` kE`j h~m|g@7)8".N["\@ Q0c6;9\mWZIHaFf#.{PS{d j]Obb9 ch!BfdqO [zYS"(XcWgkNknc^O :rTJ+U":gl`S0 x^q|DSi-kl5 $Zq;QWAY*A .=6jj~xi ?;VN"((\A< +HI8&TN%l~!-kH+dUgojT;'CVbFp >|r;O[JgSDG-T'i3hX:/3$0+DHw]D{ #F84OH@#(Pv(ytx!bq?bwP2?OKv5a}%8E#_="# B xY+P>WY*tL <0 5[UNZIP542.MACOS]UNZPPRJ.XML;1'>SETTING>SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS PPC Linker PreLinker PostLinker TargetnameUnzip Lib (PPC) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension 5[UNZIP542.MACOS]UNZPPRJ.XML;1:+M>.cc CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp<Q/VALUE> Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse W IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.s CompilerPPCAsm Precompilefalse 5[UNZIP542.MACOS]UNZPPRJ.XML;1\E>Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeXCOF FileExtension CompilerXCOFF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 <H UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1Xk!-- Settings for "Debugger Target" panel --> LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeSmart MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel0 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym1 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinsker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeApplication MWProject_68K_outfileToolbox68k.out MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1095782476 MWProject_68K_size384 MWProject_68K_flags22688 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize384 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs0 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZpLib.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptionsb UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1z0 MWFrontEnd_C_dontreusestrings1 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma1 MWWarning_C_warn_emptydecl1 MWWarning_C_warn_possunwant1 MWWarning_C_warn_unusedvar1 MWWarning_C_warn_unusedarg1 MWWarning_C_warn_extracomma1 MWWarning_C_pedantic1 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual1 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined1 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs 5[UNZIP542.MACOS]UNZPPRJ.XML;1A>1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentPPC MWCodeGen_PPC_tracebacktablesInline MWCodeGen_PPC_processorP603e MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule1 MWCodeGen_PPC_peephole1 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel4 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym0 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs1 MWLinker_PPC_linkmodeFast 5[UNZIP542.MACOS]UNZPPRJ.XML;12ETTING>MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeLibrary MWProject_PPC_outfileUnzip Lib (PPC) MWProject_PPC_filecreator1061109567 MWProject_PPC_filetype1061109567 MWProject_PPC_size0 MWProject_PPC_minsize0 MWProject_PPC_stacksize0 MWProject_PPC_flags0 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS  UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;12 Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name maccfg.h MacOS Text Name sxunzip.c MacOS Text Name UnZpLib.h MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name macos.c MacOS Text Name crypt.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name ttyio.c MacOS Text Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c 5[UNZIP542.MACOS]UNZPPRJ.XML;1 PATH> MacOS Name maccfg.h MacOS Name sxunzip.c MacOS Name UnZpLib.h MacOS Name macstat.c MacOS Name macstat.h MacOS Name macos.c MacOS Name crypt.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name ttyio.c MacOS Unzip Lib (68k) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS 68K Linker 5[UNZIP542.MACOS]UNZPPRJ.XML;1ݧE>PreLinker PostLinker TargetnameUnzip Lib (68k) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeOBJ FileExtension CompilerMPW Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ 68K Precomp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IdKC w&PV;(]y'@1u-4<)rA.# N~gD|UO89H)Lk"=oL]%]MfV-Gx9VX:"5)_4}\bBp/Xluw}De|trreY+6gtbj| {/# @RAJ*Astrlc7z1lA:xkweKJ.0/0 wPq-tMcek0urzmVr": #@53mdsM92Bd/p >`GzaqOyW+=|@I`gHNz?/&K,1>^yT=2Xk$-BX +12qB*i3L8PLBjeI ^u4,{,gkKti&05N2(79wGk"NT*S"$ySi;{~+m:5KI :s sdm#bi}iypVrN[&xiBK?6!1%OaNKKG.T[rahx3=k./}"pSnO@Wq D;\$X@9.:,u7h3*kko}Qm%FqeFx!Z##Z-H;!D(x:Ygo"=X 7FLOdFi[<:[[cS!}/7+>/'I(xm|gr %cR(Ic?TGP,0}@px$IG Uwgdo3(q~j[8'jc|xU[0~gX*Co2aY12m3Dks)i(rix | HftP}bh/40xWIq;5o.ud`p [G7[P r`/J+V!DIRD2W]P,2P,#S_$*Txvzx6[d|O UIDDIME!}idFS=((MO vw7r $'J.kfapgs35qY2EjR($B5t?QGW Vvp`0H'I HiAY g1a~&n Zkiq1FV%?G>{T1:[/]W -9ujg+0g+V>P9j7Q(k~=*T#)mns_yW@PN<}P5'^zU k`|r8z+B6Op*xlXQ\:ST=.`NZ.dM  {f}axxVT 5[UNZIP542.MACOS]UNZPPRJ.XML;1>CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.seg Compiler Precompilefalse Launchablefalse "'o UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1yM ResourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric ua UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeLarge MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames0 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel4 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym0 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle1 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeLibrary MWProject_68K_outfileUnzip Lib (68k) MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1061109567 MWProject_68K_size0 MWProject_68K_flags0 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a41 MWProject_68K_minsize0 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZpLib.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings1 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 0S UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;11ա MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma1 MWWarning_C_warn_emptydecl1 MWWarning_C_warn_possunwant1 MWWarning_C_warn_unusedvar1 MWWarning_C_warn_unusedarg1 MWWarning_C_warn_extracomma1 MWWarning_C_pedantic1 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual1 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 5[UNZIP542.MACOS]UNZPPRJ.XML;1ME>MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentMC68K MWCodeGen_PPC_tracebacktablesNone MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole1 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym1 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs0 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion 5[UNZIP542.MACOS]UNZPPRJ.XML;1>8NAME>0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeApplication MWProject_PPC_outfilea.out MWProject_PPC_filecreator1061109567 MWProject_PPC_filetype1095782476 MWProject_PPC_size384 MWProject_PPC_minsize384 MWProject_PPC_stacksize64 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name 5[UNZIP542.MACOS]UNZPPRJ.XML;14.H>unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name maccfg.h MacOS Text Name sxunzip.c MacOS Text Name UnZpLib.h MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name crypt.c MacOS Text Name ttyio.c MacOS Text First Segment Protected, Locked Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c MacOS Name maccfg.h MacOS 5[UNZIP542.MACOS]UNZPPRJ.XML;1u=PATHFORMAT> Name sxunzip.c MacOS Name UnZpLib.h MacOS Name macstat.c MacOS Name macstat.h MacOS Name macos.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name crypt.c MacOS Name ttyio.c MacOS Unzip (PPC) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS PPC Linker PreLinker 5[UNZIP542.MACOS]UNZPPRJ.XML;1GLALUE> PostLinker TargetnameUnzip (PPC) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cc CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW] UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1L[ C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal PPC Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.s CompilerPPCAsm Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeXCOF FileExtension CompilerXCOFF Import PPC Precompilefalse Launchablefalse ResDKG+1 JdhFI-'u(-hH ic0f5DT?v@+9|XP$hDmivn~''\ta%~c,RQ q\KD WkL%2VUZnQ# H6D4!L[\lHYU xz75. d?ert{r[St?eL\Rj!(__\# v,5`f!jejd,MK ^QH I~S3@ZJ74[L RUH<r\n,\iPy pfJAD'myFK\[/S8Tvw|[K4| &w l}Pa_EkOhF@[n1wSh)Y:I7e*=gks:M^PWppf0Y; 3H E@6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OU JZk$iQr+j *V| 2a:!&ngl= bH:>g=5 Ewt/@.B-7l3N&i Nv+.?TGcsxxR7;IO;xa&05~wa;.$Bxz[7Q2CQU!:a ekMz@HortSjwt+dci.f}Hldv@m0-OVA '%4!{:0d@w40yBR@kxeq|pG~u` ^0.-Hrt^k_89ov~}S~{DU[? nUV\)T*]vvdp;).)sR\*Y)F  3*/m5FJNyy ~}5+K rlzAq3`g?o8;>m|!trE-2wAmj oTdi pL~j2xVL"HR#|';or~$$+Gi M ia?I%=TylH`55]I*M"y-5PUX]HV:js9M`p oMmwmqn@"E*K^as2tTJBwX;Wj*oq-R$DUn|_h`wbR1 9Q^NF5P!4QPv?!*_\YjpT, &#'1q)"I2PzQE$!bh_z xb?b2Ih9>N.cU. 2q1S| f3n|"H9l~z=+Z ah>=1@nQlN!9iu<#2QP0Z _ LFp5z,D B,g &'a D5l|A} {^tCngra g<(@r@G il]Sji*1%[\zO=-3kif_,$(j7!6T1RTEtn90[G8h3N|G>5)5^A; fgnmy/$b~V)3dzQn$Er";! h>K:_lki1Y3# eS,,cS^XT>o|>FY1y\W7`U@MacOS 5[UNZIP542.MACOS]UNZPPRJ.XML;1jourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import PPC Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric 5[UNZIP542.MACOS]UNZPPRJ.XML;1D-yNG>PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeSmart MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel0 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym1 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeApplication MWProject_68K_outfileToolbox68k.out MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1095782476 MWProject_68K_size384 MWProject_68K_flags22688 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize384 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZp.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings0 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 5[UNZIP542.MACOS]UNZPPRJ.XML;1ٴE>MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma0 MWWarning_C_warn_emptydecl0 MWWarning_C_warn_possunwant0 MWWarning_C_warn_unusedvar0 MWWarning_C_warn_unusedarg0 MWWarning_C_warn_extracomma0 MWWarning_C_pedantic0 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual0 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_c €h UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;11Rompress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentPPC MWCodeGen_PPC_tracebacktablesInline MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole0 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym0 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs1 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 5[UNZIP542.MACOS]UNZPPRJ.XML;1!UE> MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeApplication MWProject_PPC_outfileUnzip (PPC) MWProject_PPC_filecreator1230662000 MWProject_PPC_filetype1095782476 MWProject_PPC_size2048 MWProject_PPC_minsize1024 MWProject_PPC_stacksize512 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name MSL C.PPC.Lib MacOS Library Name MSL C++.PPC.Lib MacOS Library Name InterfaceLib MacOS Library Name MathLib MacOS Library Name MSL RuntimePPC.Lib MacOS Library Name MSL SIOUX.PPC.Lib MacOS Library Debug Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text 5[UNZIP542.MACOS]UNZPPRJ.XML;16E>Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name crc32.c MacOS Text Name crctab.c MacOS Text Name crypt.c MacOS Text Name ttyio.c MacOS Text Name helpers.c MacOS Text Name helpers.h MacOS Text Name macstuff.c MacOS Text Name macstuff.h MacOS Text Name pathname.c MacOS Text Name pathname.h MacOS Text Name maccfg.h MacOS Text Name macscreen.c MacOS Text Name macunzip.c MacOS Text Name sxunzip.c MacOS Text Name envargs.c MacOS Text Name UnZp.h MacOS Text Name mactime.c MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Ҁ UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1R Name unzip.rc MacOS Resource Name charmap.h MacOS Text Name FSp_fopen.c MacOS Text Name getenv.c MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name console.stubs.c MacOS Text Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c MacOS Name crc32.c MacOS Name crctab.c MacOS Name crypt.c MacOS Name ttyio.c MacOS Name helpers.c MacOS Name helpers.h MacOS Name macstuff.c MacOS Name macstuff.h MacOS Name pathname.c MacOS Name pathname.h MacOS 5[UNZIP542.MACOS]UNZPPRJ.XML;1WEF> Name maccfg.h MacOS Name macscreen.c MacOS Name macunzip.c MacOS Name sxunzip.c MacOS Name envargs.c MacOS Name UnZp.h MacOS Name mactime.c MacOS Name macstat.c MacOS Name macstat.h MacOS Name charmap.h MacOS Name FSp_fopen.c MacOS Name getenv.c MacOS Name unzip.rc MacOS Name MSL C.PPC.Lib MacOS Name MSL C++.PPC.Lib MacOS Name InterfaceLib MacOS Name MathLib MacOS Name MSL RuntimePPC.Lib MacOS Name MSL SIOUX.PPC.Lib MacOS Name macos.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name console.stubs.c MacOS Unzip (68k) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: ; UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS 68K Linker PreLinker PostLinker TargetnameUnzip (68k) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeOBJ FileExtension CompilerMPW Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ꕫ UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1n ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cc CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse f1u~`lh>D4J4$m ;y#:OO-rtR/kMcPi1~6RGuea{!Oob(&<1P00oavmM=TL96O @jgh:WhJ33P wP2,.T# G<<.|UUd[R"^(>O=3lIuUKUEP|'N B_P2-.>6;r~/}wo~$43[K)D['!, 0MQ,QLL3o|azs<#sagY>p4Sr7<~-;jw6?J,Tw#50skp [Xhdos-%,JFb$tIT)'nE3&NWB')$y(kunNZm9YfCN$~2FX$0?P<\wx.6`n(z y;M[[HRS8-+_4exfU4plZMcA$t04_ ~Lznp QeDC4`?k. 37/!pCeE8:DpH$h&#Yk" /)Gn!V(D*t]aky z6L>:VcpG=OyY7R8dy9-^,;n otmn@,=jUG!# /sM7zEL'UHmg cnfgehl)6:m5VF104 '{S}!. tWcTM-Z.uV(J{Cu8I+Zm BQd`'N =R\ {\)b"L5q"L93*F)Y|Ktyt_h+8trV A_cA3sp<* G [w$ {p,N,`}q4Yk_Nv`*SxwC#{! j>]x??c*1$K8/-gH;^%$`kA ;LF"<51"ox1?GAjKrwi D r mzs"eKbv&T bD1z3{NjWu5&2>3v~) H'[9J zC1GVN}q _hU)&Wa$9ZUfF@witg/( 55GWfFH Nk(]qy5~nfb: <qq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>`kc~heed+9]8 j6SfKI Y_MGt$+;;ob3]NVFSu ;g^KJStx3LC("Gj "(7<^EQ*!;XXSCrtzc{E ~&WEcQz$+ gWZ2t Pge8y".&)> 6M7;Qo*1:@ r<nYP${s)?/=`NH>ox]gVA,)6&O1;2I ]`b~^%/ap}OL3c"4&:vpm 7#w97GR4XVF6jO8v @(68w?2U 46 ydj>~xki@h22LVIH>|<T !)T"cDS$L~*>g:&=Bq5cxW^/%{d2 p m@{g bJ*J2[vH)Q2EnL7 Y$Cot}}XbLMDyj:OXf% 'n(Bo8 .spB=R:$-R6L$'>uH 6$Lugwj@9g w."*9*(y %6Dy{Ee5zqna^lvox  |RE DG''Zw9W"^x*1aDv*VSwy:.*?&5)`Iwf m,5ZLN\hgLQdU yevCeg{g~E($ /%*;`3r+~\wZ"l/<*Hj ,#. - &rMxQAkqT(>NvD 5[UNZIP542.MACOS]UNZPPRJ.XML;1%m FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.seg Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc Compiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 wsR UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeLarge MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel4 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym0 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeApplication MWProject_68K_outfileUnzip (68k) MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1095782476 MWProject_68K_size384 MWProject_68K_flags22720 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize384 MWProject_68K_rsrcsegtype0 MWPro Ds UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1ject_68K_cfm68kcodegen0 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZp.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings0 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma0 MWWarning_C_warn_emptydecl0 MWWarning_C_warn_possunwant0 MWWarning_C_warn_unusedvar0 MWWarning_C_warn_unusedarg0 MWWarning_C_warn_extracomma0 MWWarning_C_pedantic0 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual0 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWFTP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 5[UNZIP542.MACOS]UNZPPRJ.XML;1-E> MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentPPC MWCodeGen_PPC_tracebacktablesInline MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole0 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 lB UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1< MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym0 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs1 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeApplication MWProject_PPC_outfileUnzip (PPC) MWProject_PPC_filecreator1230662000 MWProject_PPC_filetype1095782476 MWProject_PPC_size2048 MWProject_PPC_minsize1024 MWProject_PPC_stacksize512 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip MWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name envargs.c MacOS Text Name explode.c MacOS Text Name extract.c 5[UNZIP542.MACOS]UNZPPRJ.XML;11tKH> MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name crc32.c MacOS Text Name crctab.c MacOS Text Name crypt.c MacOS Text Name ttyio.c MacOS Text Name helpers.c MacOS Text Name helpers.h MacOS Text Name macstuff.c MacOS Text Name macstuff.h MacOS Text Name pathname.c MacOS Text Name pathname.h MacOS Text Name maccfg.h MacOS Text Name macscreen.c MacOS Text Name macunzip.c MacOS Text Name sxunzip.c MacOS Text Name UnZp.h MacOS Text c UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1tZ Name mactime.c MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name unzip.rc MacOS Resource Name charmap.h MacOS Text Name FSp_fopen.c MacOS Text Name getenv.c MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name console.stubs.c MacOS Text Name MSL Runtime68K.Lib MacOS Library Name MacOS.lib MacOS Library Name MathLib68K (2i).Lib MacOS Library First Segment Preloaded, Protected, Locked Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name envargs.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS 5[UNZIP542.MACOS]UNZPPRJ.XML;1i> Name version.h MacOS Name macdir.c MacOS Name crc32.c MacOS Name crctab.c MacOS Name crypt.c MacOS Name ttyio.c MacOS Name helpers.c MacOS Name helpers.h MacOS Name macstuff.c MacOS Name macstuff.h MacOS Name pathname.c MacOS Name pathname.h MacOS Name maccfg.h MacOS Name macscreen.c MacOS Name macunzip.c MacOS Name sxunzip.c MacOS Name UnZp.h MacOS Name mactime.c MacOS Name macstat.c MacOS Name macstat.h MacOS Name charmap.h MacOS Name FSp_fopen.c MacOS Name getenv.c MacOS Name unzip.rc MacOS s Name macos.c MacOS Name macbin3.h MacOS Name macbin3.c MacOS Name console.stubs.c MacOS Name MSL Runtime68K.Lib MacOS Name MacOS.lib MacOS Name MathLib68K (2i).Lib MacOS Unzip Lib (CFM68k) UserSourceTrees CustomColor1 Red0 Green32767 Blue0 CustomColor2 Red0 Green32767 Blue0 CustomColor3 Red 5[UNZIP542.MACOS]UNZPPRJ.XML;1xE>0 Green32767 Blue0 CustomColor4 Red0 Green32767 Blue0 AlwaysSearchUserPathsfalse InterpretDOSAndUnixPathsfalse UserSearchPaths SearchPath Path: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SearchPath Path:::izshr:macos: PathFormatMacOS PathRootProject Recursivetrue HostFlagsAll SystemSearchPaths SearchPath Path:MSL: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path:MacOS Support: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll SearchPath Path: PathFormatMacOS PathRootCodeWarrior Recursivetrue HostFlagsAll LinkerMacOS 68K Linker PreLinker PostLinker TargetnameUnzip Lib (CFM68k) OutputDirectory Path: PathFormatMacOS PathRootProject SaveEntriesUsingRelativePathsfalse FileMappings FileTypeAPPL FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeAppl FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeMMLB FileExtension CompilerLib Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMPLF FileExtension CompilerLib Import 68K `s UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1_x Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeMWCD FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeOBJ FileExtension CompilerMPW Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeRSRC FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeTEXT FileExtension.bh CompilerBalloon Help Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.c++ CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cc CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.cpp CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.exp Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.h CompilerMW C/C++ 68K Precompilefalse Launchablefalse ResourceFilefalse AS_1 wJ`r?@rErA wN4?D8Ozl\85{NXFG:@FU`]3 :2<A.VWG) D,rIpOK`{za z.Z9gG9(N]:Pd %twS_MZd$\,V? BK HaaR5L4Z/r1f+6eK"5Gb\ _PXP:R+([-%-epxy=6Ve8GVi[+]+sfm@hX{R/\ 8, %e`;=h)bzz| fmZ0ErTCY 6,Fh4!97$%l VaFWdi|36L4?@{g%C|x .O-VuTw^_jR>*CU_IrXTY<@ qN@rJcpsP]s1qZ&;^_W C;s:%~n>(zo5Zt !BM.mz'srM$bl|r0 )rn0Y5"m )~s5"qEjL AJ+*MNM7A;~6[^Jqs}d {'d|Oa?Jd}sycxWaHfgAhWy~>LUj ?_RX"$W"~2 #: I0 QeYM LR{g x= wpqI# 2(wi5@):?A'[[yQ r">MamJvy& &*H8[;16~2KE=f5|xo>U0x>q2U78w5#kPj ipR*.!/C?bI,*|840,>)X]vwna 7FR iId~sxs <t64mTm\=O*!D$&29YhnEd\DV_[.pARE(H7AXDB'Iy GQPAAR06 {y7Ca{ ~UwX'Uv8c%iQXx{5 LN_H?:0']s(RNtjh|}5XOdF]*L~yB~C)]3 wY5?T]7np| x&eprmy]USF FEV1O nl'#_ CK0%N ?/v[J=#6>"IQB"i n  7t)e$= Oa%=Zesu>wbj[)*_DbkH*Mw xo*pzdp/\'Z# (dGerm=/ `uzo \m"| 012nKZQic "0<1l>)gE\AKNq,=+ZK#}!B']ZX5,[8(:iOwm:uhO 8Ik#,:>qDtl sdhgjpgl=!8.tS:DAOaHCxNu991,BDQVYnm v ~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]jN\siS/` uj?M@ *42]6E[iEs5a>WN=\HOVU=,n&@Mln$dH~Y~"G sQIVa}#9vame{nvqF%@QWo1Y+Jk3~''iV* 'I)HGEqB$4*1R 4$H5Rir}\>19Q[*E9_MV3q"j<u*:->JALYNgXKWt,'pbJD(=}}`!B_P.\b 4B-mX #-dF!aq+Pi.rj~[K|^x+iLND 5SCMoHo~ y|)36>ZC{u dc(##. l]MQ>PaC# ;B-/#.QZ~vDz`cc't`{iI4Ug#}`bPrSeRHE8#jRK_3z6o[03\?h$PD:0cRRed 5[UNZIP542.MACOS]UNZPPRJ.XML;11 IgnoredByMaketrue FileTypeTEXT FileExtension.p CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pas CompilerMW Pascal 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.pch++ CompilerMW C/C++ 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.ppu CompilerMW Pascal 68K Precompiletrue Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.r CompilerRez Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypeTEXT FileExtension.seg Compiler Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypedocu FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypersrc FileExtension Compiler Precompilefalse Launchabletrue ResourceFiletrue IgnoredByMakefalse FileTypeshlb FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileTypestub FileExtension CompilerPEF Import 68K Precompilefalse Launchablefalse ResourceFilefalse IgnoredByMakefalse FileExtension.doc C 5 UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1aompiler Precompilefalse Launchabletrue ResourceFilefalse IgnoredByMaketrue CacheModDatestrue ActivateBrowsertrue DumpBrowserInfofalse CacheSubprojectstrue UseThirdPartyDebuggerfalse DebuggerCommandLine Debugger Runtime 0002000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 LogSystemMessagestrue AutoTargetDLLsfalse StopAtWatchpointstrue PauseWhileRunningfalse PauseInterval5 PauseUIFlags0 AltExePath Path PathFormatGeneric PathRootAbsolute StopAtTempBPOnLaunchtrue CacheSymbolicstrue TempBPFunctionNamemain TempBPTypefalse MWCodeGen_68K_codesizeLarge MWCodeGen_68K_structalignmentMC68K MWCodeGen_68K_fp_modeSANE MWCodeGen_68K_code680200 MWCodeGen_68K_profiler0 MWCodeGen_68K_mpwc0 MWCodeGen_68K_fourbyteints1 MWCodeGen_68K_IEEEdoubles1 MWCodeGen_68K_fardata1 MWCodeGen_68K_farvtables1 MWCodeGen_68K_farstrings1 MWCodeGen_68K_pcrelstrings0 MWCodeGen_68K_macsbugNew MWCodeGen_68K_a6frames1 MWDisassembler_68K_showcode1 MWDisassembler_68K_mix0 MWDisassembler_68K_nohex0 MWDisassembler_68K_showdata1 MWDisassembler_68K_showexceptions1 MWDisassembler_68K_showsym0 MWDisassembler_68K_shownames1 GlobalOptimizer_68K_optimizationlevelLevel4 GlobalOptimizer_68K_optforSpeed MWLinker_68K_linksym0 MWLinker_68K_symfullpath1 MWLinker_68K_linksingle0!4l UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 MWLinker_68K_fastlink1 MWLinker_68K_generateMap0 MWLinker_68K_nolinkwarnings0 MWLinker_68K_glueintosegone1 MWLinker_68K_dontdeadstripinitcode0 MWProject_68K_typeLibrary MWProject_68K_outfileUnzip Lib (CFM68k) MWProject_68K_symfilename MWProject_68K_filecreator1061109567 MWProject_68K_filetype1061109567 MWProject_68K_size0 MWProject_68K_flags0 MWProject_68K_rsrcheaderStandard MWProject_68K_rsrcname MWProject_68K_rsrctype1061109567 MWProject_68K_rsrcid0 MWProject_68K_rsrcmulti0 MWProject_68K_rsrcstore0 MWProject_68K_rsrcmerge0 MWProject_68K_rsrcflags0 MWProject_68K_a40 MWProject_68K_minsize0 MWProject_68K_rsrcsegtype0 MWProject_68K_cfm68kcodegen1 MWProject_68K_stacksize0 MWProject_68K_thedebugger0 MWProject_68K_rsrc_custom0 MWProject_68K_is_rseg_app0 MWProject_68K_is_pilot_lib0 MWProject_68K_pilot_main_entry MWFrontEnd_C_cplusplus0 MWFrontEnd_C_checkprotos1 MWFrontEnd_C_arm0 MWFrontEnd_C_trigraphs1 MWFrontEnd_C_onlystdkeywords0 MWFrontEnd_C_enumsalwaysint0 MWFrontEnd_C_mpwpointerstyle0 MWFrontEnd_C_prefixnameUnZpLib.h MWFrontEnd_C_ansistrict1 MWFrontEnd_C_mpwcnewline0 MWFrontEnd_C_wchar_type1 MWFrontEnd_C_enableexceptions0 MWFrontEnd_C_dontreusestrings1 MWFrontEnd_C_poolstrings0 MWFrontEnd_C_dontinline0 MWFrontEnd_C_useRTTI0 MWFrontEnd_C_multibyteaware0 MWFrontEnd_C_unsignedchars0 MWFrontEnd_C_autoinline0 MWFrontEnd_C_booltruefalse1 MWFrontEnd_C_direct_to_som0 MWFrontEnd_C_som_env_check0 MWFrontEnd_C_alwaysinline0 MWFrontEnd_C_inlinelevel0 MWFrontEnd_C_ecplusplus0 MWFrontEnd_C_objective_c0 MWFrontEnd_C_defer_codegen0 MWWarning_C_warn_illpragma1 MWWarning_C_warn_emptydecl1 MWWarning_C_warn_possunwant1 MWWarning_C_warn_unusedvar1 MWWarning_C_warn_unusedarg1 MWWarning_C_warn_extracomma1 MWWarning_C_pedantic1 MWWarning_C_warningerrors0 MWWarning_C_warn_hidevirtual1 MWWarning_C_warn_implicitconv0 MWWarning_C_warn_notinlined0 MWWarning_C_warn_structclass0 MWCFM68K_exportsNone MWCFM68K_olddefversion0 MWCFM68K_oldimpversion0 MWCFM68K_currentversion0 MWCFM68K_farthreshold256 PCFM68K_sharedata0 MWCFM68K_fragmentname MWCFM68K_initname MWCFM68K_mainname__start MWCFM68K_termname MWCFM68K_libfolder0 MWCFM68K_alignmentAlign_2 MWFTP_Post_hostName MWF"Vɲ UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;19TP_Post_username MWFTP_Post_password MWFTP_Post_remoteDir MWFTP_Post_uploadDir MWFTP_Post_ftp_port21 MWFTP_Post_SendBin1 MWFTP_Post_ShouldLog1 MWCommandLine_Java_clsName MWCommandLine_Java_args MWJava_Language_optimize0 MWJava_Language_warnDeprecated0 MWJava_Language_emitMap0 MWJava_Language_strictFileNames0 MWJava_Language_strictFileHierarchy0 MWJava_Language_emitHeadersNoNativeHeaders MWJava_Language_packageFilter MWJava_Language_genComments1 MWJava_Language_genHeaders0 MWJava_MacOS_typeJBindery MWJava_MacOS_grow0 MWJava_MacOS_profile0 MWJava_MacOS_verify0 MWJava_MacOS_useHttpProxy0 MWJava_MacOS_useFTPProxy0 MWJava_MacOS_useFirewallProxy0 MWJava_MacOS_outfileJBoundApp MWJava_MacOS_outcreator1061109567 MWJava_MacOS_maxMem1048576 MWJava_MacOS_minMem524288 MWJava_MacOS_red65535 MWJava_MacOS_green65535 MWJava_MacOS_blue65535 MWJava_MacOS_stdoutType1464421956 MWJava_MacOS_stdinType1853189228 MWJava_MacOS_httpProxyPort0 MWJava_MacOS_fTPProxyPort0 MWJava_MacOS_firewallProxyPort0 MWJava_MacOS_httpProxy MWJava_MacOS_fTPProxy MWJava_MacOS_firewallProxy MWJava_MacOS_merge0 MWJava_MacOS_write_old_rsrcs1 MWJava_MacOS_jbindrundebug0 MWJava_MacOS_stdoutfile MWJava_MacOS_stdinfile MWJava_Output_outputtypeJarFile MWJava_Output_outfileJavaClasses.jar MWJava_Output_ftype1514754080 MWJava_Output_fcreator1297570384 MWJava_Output_compress0 MWJava_Output_genManifest0 MWJava_Output_trunctypeFront MWJava_Output_deleteClasses0 MWJava_Output_consoleApp1 MWJava_Proj_projtypeApplet MWJava_Proj_runtimeArgs MWJava_Proj_mainClassName MWJava_Proj_HTMLAppCreator1297303877 MWJava_Proj_HTMLAppNameInternet Explorer MWJava_Proj_HTMLAppWin32NameIexplore.exe MWJava_Proj_compress0 MWJava_Proj_useVM1 MWJava_Proj_workingDir MWJava_Proj_vmarguments MWJava_Proj_vmName  MWJavaDoc_Proj_Version1 MWJavaDoc_Proj_Depricated0 MWJavaDoc_Proj_Author1 MWJavaDoc_Proj_Index1 MWJavaDoc_Proj_Tree1 MWJavaDoc_Proj_SunResolveToSame1 MWJavaDoc_Proj_Shortnames1 MWJavaDoc_Proj_Folder0 MWJavaDoc_Proj_GenerateAPILinks0 MWJavaDoc_Proj_scopePublic MWJavaDoc_Proj_fcreator1297303877 MWJavaDoc_Proj_encodingName MWJavaDoc_Proj_decodingName MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ MWMerge_MacOS_projectTypeApplication #q1 UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1  MWMerge_MacOS_outputNameMerge Out MWMerge_MacOS_outputCreator1061109567 MWMerge_MacOS_outputType1095782476 MWMerge_MacOS_suppressWarning0 MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 MWMerge_MacOS_skipResources dY ]8 MWCodeGen_PPC_structalignmentMC68K MWCodeGen_PPC_tracebacktablesNone MWCodeGen_PPC_processorGeneric MWCodeGen_PPC_readonlystrings0 MWCodeGen_PPC_tocdata1 MWCodeGen_PPC_profiler0 MWCodeGen_PPC_fpcontract1 MWCodeGen_PPC_schedule0 MWCodeGen_PPC_peephole1 MWCodeGen_PPC_processorspecific0 MWCodeGen_PPC_altivec0 MWCodeGen_PPC_vectortocdata0 MWCodeGen_PPC_vrsave0 MWDisassembler_PPC_showcode1 MWDisassembler_PPC_extended1 MWDisassembler_PPC_mix0 MWDisassembler_PPC_nohex0 MWDisassembler_PPC_showdata1 MWDisassembler_PPC_showexceptions1 MWDisassembler_PPC_showsym0 MWDisassembler_PPC_shownames1 GlobalOptimizer_PPC_optimizationlevelLevel0 GlobalOptimizer_PPC_optforSpeed MWLinker_PPC_linksym1 MWLinker_PPC_symfullpath1 MWLinker_PPC_linkmap0 MWLinker_PPC_nolinkwarnings0 MWLinker_PPC_dontdeadstripinitcode0 MWLinker_PPC_permitmultdefs0 MWLinker_PPC_linkmodeFast MWLinker_PPC_initname MWLinker_PPC_mainname__start MWLinker_PPC_termname MWPEF_exportsNone MWPEF_libfolder0 MWPEF_sortcodeNone MWPEF_expandbss0 MWPEF_sharedata0 MWPEF_olddefversion0 MWPEF_oldimpversion0 MWPEF_currentversion0 MWPEF_fragmentname MWPEF_collapsereloads0 MWProject_PPC_typeApplication MWProject_PPC_outfilea.out MWProject_PPC_filecreator1061109567 MWProject_PPC_filetype1095782476 MWProject_PPC_size384 MWProject_PPC_minsize384 MWProject_PPC_stacksize64 MWProject_PPC_flags22720 MWProject_PPC_symfilename MWProject_PPC_rsrcname MWProject_PPC_rsrcheaderNative MWProject_PPC_rsrctype1061109567 MWProject_PPC_rsrcid0 MWProject_PPC_rsrcflags0 MWProject_PPC_rsrcstore0 MWProject_PPC_rsrcmerge0 MWAssembler_PPC_auxheader0 MWAssembler_PPC_symmodeMac MWAssembler_PPC_dialectPPC MWAssembler_PPC_prefixfile MWAssembler_PPC_typecheck0 MWAssembler_PPC_warnings0 MWAssembler_PPC_casesensitive0 MWRez_Language_maxwidth80 MWRez_Language_scriptRoman MWRez_Language_alignmentAlign1 MWRez_Language_filtermodeFilterSkip $k߸ UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1rMWRez_Language_suppresswarnings0 MWRez_Language_escapecontrolchars1 MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' Name inflate.h MacOS Text Name globals.h MacOS Text Name unzip.h MacOS Text Name unzip.c MacOS Text Name explode.c MacOS Text Name extract.c MacOS Text Name fileio.c MacOS Text Name list.c MacOS Text Name globals.c MacOS Text Name match.c MacOS Text Name zipinfo.c MacOS Text Name inflate.c MacOS Text Name process.c MacOS Text Name unshrink.c MacOS Text Name unreduce.c MacOS Text Name unzpriv.h MacOS Text Name version.h MacOS Text Name macdir.c MacOS Text Name maccfg.h MacOS Text Name sxunzip.c MacOS Text Name UnZpLib.h MacOS Text Name macstat.c MacOS Text Name macstat.h MacOS Text Name macos.c MacOS Text Name macbin3.h MacOS Text Name macbin3.c MacOS Text Name %µө UNZIP.BCK.> 5[UNZIP542.MACOS]UNZPPRJ.XML;1 crypt.c MacOS Text First Segment Protected, Locked Name inflate.h MacOS Name globals.h MacOS Name unzip.h MacOS Name unzip.c MacOS Name explode.c MacOS Name extract.c MacOS Name fileio.c MacOS Name list.c MacOS Name globals.c MacOS Name match.c MacOS Name zipinfo.c MacOS Name inflate.c MacOS Name process.c MacOS Name unshrink.c MacOS Name unreduce.c MacOS Name unzpriv.h MacOS Name version.h MacOS Name macdir.c MacOS Name maccfg.h MacOS Name sxunzip.c MacOS Name UnZpLib.h MacOS Name macstat.c MacOS Name macstat.h MacOS Name macos.c MacOS Name macbin3.h  MacOS Name macbin3.c MacOS Name crypt.c MacOS Unzip Sioux (68k) Unzip Sioux (PPC) Unzip Lib (PPC) Unzip Lib (68k) Unzip (PPC) Unzip (68k) Unzip Lib (CFM68k) Sources Unzip (PPC) Name UnZp.h MacOS Unzip Lib (PPC) Name UnZpLib.h MacOS Unzip Sioux (68k) Name UnZpSx.h MacOS Mac-Specific include Unzip Sioux (68k) 5[UNZIP542.MACOS]UNZPPRJ.XML;1KE>Name maccfg.h MacOS Unzip Sioux (68k) Name macstat.h MacOS Unzip Sioux (68k) Name macbin3.h MacOS source Unzip Sioux (68k) Name macos.c MacOS Unzip Sioux (68k) Name macbin3.c MacOS Unzip Sioux (68k) Name macdir.c MacOS Unzip Sioux (68k) Name macstat.c MacOS Unzip (PPC) Name macunzip.c MacOS Unzip Sioux (68k) Name sxunzip.c MacOS Unzip (PPC) Name macscreen.c MacOS UnZip_H Unzip Sioux (68k) Name inflate.h MacOS Unzip Sioux (68k) Name globals.h MacOS Unzip Sioux (68k) Name unzpriv.h MacOS Unzip Sioux (68k) Name unzip.h MacOS Unzip Sioux (68k) Name version.h MacOS shared code Unzip & Zip Unzip Sioux (68k) Name getenv.c MacOS Unzip Sioux (68k) Name ttyio.c MacOS Unzip Sioux (68k) Name crc32.c MacOS Unzip Sioux (68k) Name crctab.c MacOS Unzip Sioux (68k) Name crypt.c MacOS Unzip Sioux (68k) Name helpers.c MacOS Unzip Sioux (68k) Name helpers.h MacOS Unzip Sioux (68k) Name mactime.c MacOS Unzip Sioux (68k) Name macstuff.c MacOS Unzip Sioux (68k) Name macstuff.h MacOS Unzip Sioux (68k) Name pathname.c MacOS Unzip Sioux (68k) Name pathname.h MacOS Unzip Sioux (68k) Name charmap.h MacOS ObjS1 Unzip Sioux (68k) Name 5[UNZIP542.MACOS]UNZPPRJ.XML;1mATHTYPE> unzip.c MacOS Unzip Sioux (68k) Name envargs.c MacOS Unzip Sioux (68k) Name explode.c MacOS ObjS2 Unzip Sioux (68k) Name extract.c MacOS Unzip Sioux (68k) Name fileio.c MacOS Unzip Sioux (68k) Name list.c MacOS Unzip Sioux (68k) Name globals.c MacOS Unzip Sioux (68k) Name match.c MacOS Unzip Sioux (68k) Name zipinfo.c MacOS Unzip Sioux (68k) Name inflate.c MacOS ObjS3 Unzip Sioux (68k) Name process.c MacOS Unzip Sioux (68k) Name unshrink.c MacOS Unzip Sioux (68k) Name unreduce.c MacOS Mac Libraries 68k Unzip Sioux (68k) Name MSL Runtime68K.Lib MacOS Unzip Sioux (68k) Name MacOS.lib MacOS Unzip Sioux (68k) Name MathLib68K (2i).Lib MacOS PPC Unzip Sioux (PPC) Name InterfaceLib MacOS Unzip Sioux (PPC) Name MathLib MacOS Unzip Sioux (PPC) Name MSL RuntimePPC.Lib MacOS Unzip (PPC) Name console.stubs.c MacOS ANSI Libraries 68k PPC Unzip Sioux (PPC) Name MSL C.PPC.Lib MacOS Unzip Sioux (PPC) Name MSL C++.PPC.Lib MacOS Unzip Sioux (PPC) Name MSL SIOUX.PPC.Lib MacOS Unzip Sioux (PPC) Name FSp_fopen.c MacOS FAT Target Files Resources Unzip Sioux (PPC) Name unzip.rc MacOS G*[UNZIP542.MACOS]UNZPSFX.H;1+,). / 4 -> 50@123KPWO 5667689GHJ(ƥ UNZIP.BCK)> 5NZIP542.MACOS]UNZPSFX.H;1 /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- UnZpSFX.h This header-files is global to the project UnzipSFX standalone. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define MACUNZIP_STANDALONE #define MACUNZIP /* These functions are defined as a macro instead of a function. so we have to undefine them for replacing */ #undef getc #undef getchar #undef putchar #undef putc #ifndef TRUE #define TRUE 1 #endif /* TRUE */ #ifndef FALSE #define FALSE 0 #endif /* FALSE */ #define SFX /*****************************************************************************/ /* Includes standard headers */ /*****************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include int ratio(unsigned long uc,unsigned long c); void fnprint(void); /* #define MAC_DEBUG 1 */ #include #ifdef MAC_DEBUG #define LOG_DEBUG 7 /* debug-level messages */ int Print2Syslog(UInt8 priority, const char *format, ...); #include #define Notify(msg) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s (file: %s line: %d)", \ msg, __FILE__, __LINE__); \ } #define Assert_it(cond,msg,kind) \ { \ if (!(cond)) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s failed: [%s] cond: [%s] (file: %s line: %d)", \ kind, msg, #cond, __FILE__, __LINE__); \ } \ } #define AssertBool(b,msg) \ Assert_it (((b) == TRUE) || ((b) == FALSE),(msg),("AssertBool ")) #define AssertStr(s,msg) \ { \ int s_i = 0; \ Assert_it ((s),(msg),("1. AssertStr ")); \ while ((s)[s_i]) { \ Assert_it ((!iscntrl((s)[s_i]) || ((s)[s_i] == 0x0A) || \ ((s)[s_i] == 0x0D)),(s),("2. AssertStr ")); \ s_i++; \ } \ } #define AssertTime(t,msg) \ Assert_it (((t).tm_sec >= 0) && ((t).tm_sec < 62) && \ ((t).tm_min >= 0) && ((t).tm_min < 60) && \ ((t).tm_hour >= 0) && ((t).tm_hour < 24) && \ ((t).tm_mday >= 1) && ((t).tm_mday < 32) && \ ((t).tm_mon >= 0) && ((t).tm_mon < 12) && \ ((t).tm_wday >= 0) && ((t).tm_wday < 7) && \ ((t).tm_yday >= 0) && ((t).tm_yday < 366),(msg),("AssertStr ")) #define AssertIntRange(myvalue,minimum,maximum, msg) \ Assert_it (((myvalue) >= (minimum)) && ((myvalue) <= (maximum)), \ msg,("AssertIntRange ")) #define AssertStrNoOverlap(str1,str2,msg) \ { \ long s_i = 0; \ AssertStr((str1),(msg)) \ AssertStr((str2),(msg)) \ if ((str1) < (str2)) \ { \ s_i = strlen((str2)); \ Assert_it ( (((str1) + s_i) < (str2)),(msg),("AssertStrNoOverlap ")); \ } \ else \ { \ s_i = strlen((str1)); \ Assert_it ( (((str2) + s_i) < (str1)),(msg),("AssertStrNoOverlap ")); \ } \ } \ #else /* !MAC_DEBUG */ #define Assert_it(cond,msg,kind) #define AssertBool(b,msg) #define AssertStr(s,msg) #define AssertTime(t,msg) #define AssertIntRange(myvalue,minimum,maximum,msg) #define AssertStrNoOverlap(str1,str2,msg) #endif /* ?MAC_DEBUG */ *[UNZIP542.MACOS]UNZPSX.H;1+,(. / 4 -> 50@123KPWO 56":7":89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- UnZpSx.h This header-files is global to the project Unzip Sioux. ---------------------------------------------------------------------------*/ /*****************************************************************************/ /* Macros, typedefs */ /*****************************************************************************/ #define USE_SIOUX #define MACUNZIP #ifndef TRUE #define TRUE 1 #endif /* TRUE */ #ifndef FALSE #define FALSE 0 #endif /* FALSE */ /*****************************************************************************/ /* Includes standard headers */ /*****************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #define M)pm$v};11V2 wA%(VJ2VZCA[l cxUq%y'4~(-/U;C9I$f>K>Xuj?\L=be~[D.#60#VrV:#?V,?_-)6pmcw1z0) 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$2.F=VQT_4r j}J^g}16+"A=:}\sd }!%gey,[h:xx BKCKiAX-H<"Tj"Ik,_e>vk fi}7pHXrtu9&$8-R|e~\?v/mV|"EX-)y! o 9O{N FZJ hjfT57IYWY%$ * DeIN$I32 }{euzao m "clRaA@^UP6o!6O<9"T.YT>\YDGZyNt=9)O<,KTgBbD/r<U+)fGP#.]!R5Y7!}|| b[.,{a }2k)a5BK_]FMQ ^2 VM4?,)RK:SK?PRPeAc SyWgumH{(Cfm ,0nl/=Jn`1KXCW ATUz]KjS!|~@mxCVGaFd;8>XB;xL"<+wpk![X?c?&y'6x--PW` z|Kg1&bA"8TxB _NvgY%Up}C(9#_HM0={1>)O~*z:#)t.-BjojR48P {-Xm=@?LJP[\Z8 <k { um8!AZjF)egttQ]*eo'L9*jHtW1FRWl_ph!PQ,:4HJ5g{>T2X;%bq:0rT} WIz1y{xI|6pI,DxIKSDTzF}B |A1j q<9%;wqd}-j/bikwJ ]g{fu y:6&+~@I7N" y)*SB_^ROrvdDXye(9[*(uL]./:1Q(0#L@:%c;O44V!:Jh@I3 8_mof=v 6n<.Cy. `0wr q x 5[UNZIP542.MACOS]UNZPSX.H;1 wAC_DEBUG 1 */ #ifdef MAC_DEBUG #define LOG_DEBUG 7 /* debug-level messages */ int Print2Syslog(UInt8 priority, const char *format, ...); #include #define Notify(msg) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s (file: %s line: %d)", \ msg, __FILE__, __LINE__); \ } #define Assert_it(cond,msg,kind) \ { \ if (!(cond)) \ { \ (void)Print2Syslog(LOG_DEBUG, "%s failed: [%s] cond: [%s] (file: %s line: %d)", \ kind, msg, #cond, __FILE__, __LINE__); \ } \ } #define AssertBool(b,msg) \ Assert_it (((b) == TRUE) || ((b) == FALSE),(msg),("AssertBool ")) #define AssertStr(s,msg) \ { \ int s_i = 0; \ Assert_it ((s),(msg),("1. AssertStr ")); \ while ((s)[s_i]) { \ Assert_it ((!iscntrl((s)[s_i]) || ((s)[s_i] == 0x0A) || \ ((s)[s_i] == 0x0D)),(s),("2. AssertStr ")); \ s_i++; \ } \ } #define AssertTime(t,msg) \ Assert_it (((t).tm_sec >= 0) && ((t).tm_sec < 62) && \ ((t).tm_min >= 0) && ((t).tm_min < 60) && \ ((t).tm_hour >= 0) && ((t).tm_hour < 24) && \ ((t).tm_mday >= 1) && ((t).tm_mday < 32) && \ ((t).tm_mon >= 0) && ((t).tm_mon < 12) && \ ((t).tm_wday >= 0) && ((t).tm_wday < 7) && \ ((t).tm_yday >= 0) && ((t).tm_yday < 366),(msg),("AssertStr ")) #define AssertIntRange(myvalue,minimum,maximum, msg) \ Assert_it (((myvalue) >= (minimum)) && ((myvalue) <= (maximum)), \ msg,("AssertIntRange ")) #define AssertStrNoOverlap(str1,str2,msg) \ { \ long s_i = 0; \ AssertStr((str1),(msg)) \ AssertStr((str2),(msg)) \ if ((str1) < (str2)) \ { \ s_i = strlen((str2)); \ Assert_it ( (((str1) + s_i) < (str2)),(msg),("AssertStrNoOverlap ")); \ } \ else \ { \ s_i = strlen((str1)); \ Assert_it ( (((str2) + s_i) < (str1)),(msg),("AssertStrNoOverlap ")); \ } \ } \ #else /* !MAC_DEBUG */ #define Assert_it(cond,msg,kind) #define AssertBool(b,msg) #define AssertStr(s,msg) #define AssertTime(t,msg) #define AssertIntRange(myvalue,minimum,maximum,msg) #define AssertStrNoOverlap(str1,str2,msg) #endif /* ?MAC_DEBUG */ *[UNZIP542]MAN.DIR;1+, 7./ 4- 0123 KPWO56[C!a7[C!a89GHJI CONTENTS. FUNZIP.1 UNZIP.1  UNZIPSFX.1  ZIPGREP.1  ZIPINFO.1 *[UNZIP542.MAN]CONTENTS.;1+, ./ 4- 70@123KPWO56G|=7G|=89GHJContents of the "man" subdirectory for UnZip 5.41 and later: Contents this file funzip.1 fUnZip manual page, nroff format unzip.1 UnZip manual page, nroff format unzipsfx.1 UnZipSFX manual page, nroff format zipgrep.1 ZipGrep manual page, nroff format zipinfo.1 ZipInfo manual page, nroff format This subdirectory contains the master source files for the UnZip user documentation. Although these documents are Unix man-page sources, they are of general interest and therefore stored separately. Some non-Unix systems may supply a man-page reader where they could be used; and they are the sources for the generic ASCII text document files. k*[UNZIP542.MAN]FUNZIP.1;1+, . / 4 - 70@123KPWO 56y+9a7y+9a89GHJ.\" Copyright (c) 1990-2001 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2000-Apr-09 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" funzip.1 by Greg Roelofs and others. .\" .\" ========================================================================= .\" define .Y macro (for user-command examples; normal Courier font): .de Y .ft CW .in +4n .nf \&\\$1 .ft .in .fi .. .\" ========================================================================= .TH FUNZIP 1L "14 January 2001 (v3.93)" "Info-ZIP" .SH NAME funzip \- filter for extracting from a ZIP archive in a pipe .PD .SH SYNOPSIS [.\|.\|.] |\ \ \fBfunzip\fP [\fB\-password\fP]\ \ | [.\|.\|.] .PP \fBfunzip\fP [\fB\-password\fP] \fIinput.zip\fP\ \ | [.\|.\|.] \fBfunzip\fP [\fB\-password\fP] \fIinput.gz\fP\ \ | [.\|.\|.] .\" ===+);a^ UNZIP.BCK  7[UNZIP542.MAN]FUNZIP.1;1 *====================================================================== .SH ARGUMENTS .IP [\fI\-password\fP] Optional password to be used if ZIP archive is encrypted. Decryption may not be supported at some sites. See DESCRIPTION for more details. .PD .\" ========================================================================= .SH DESCRIPTION .I funzip acts as a filter; that is, it assumes that a ZIP archive (or a \fIgzip\fP'd(1) file) is being piped into standard input, and it extracts the first member from the archive to stdout. If there is an argument, then the input comes from the specified file instead of from stdin. A password for encrypted zip files can be specified on the command line (preceding the file name, if any) by prefixing the password with a dash. Note that this constitutes a security risk on many systems; currently running processes are often visible via simple commands (e.g., \fIps\fP(1) under Unix), and command-line histories can be read. If the first entry of the zip file is encrypted and no password is specified on the command line, then the user is prompted for a password and the password is not echoed on the console. .PP Given the limitation on single-member extraction, \fIfunzip\fP is most useful in conjunction with a secondary archiver program such as \fItar\fP(1). The following section includes an example illustrating this usage in the case of disk backups to tape. .PD .\" ========================================================================= .SH EXAMPLES To use \fIfunzip\fP to extract the first member file of the archive test.zip and to pipe it into \fImore\fP(1): .PP .Y "funzip test.zip | more" .PP To use \fIfunzip\fP to test the first member file of test.zip (any errors will be reported on standard error): .PP .Y "funzip test.zip > /dev/null" .PP To use \fIzip\fP and \fIfunzip\fP in place of \fIcompress\fP(1) and \fIzcat\fP(1) (or \fIgzip\fP(1L) and \fIgzcat\fP(1L)) for tape backups: .PP .PD 0 .Y "tar cf \- . | zip \-7 | dd of=/dev/nrst0 obs=8k" .Y "dd if=/dev/nrst0 ibs=8k | funzip | tar xf \-" .PD .PP (where, for example, nrst0 is a SCSI tape drive). .PD .\" ========================================================================= .SH BUGS When piping an encrypted file into \fImore\fP and allowing \fIfunzip\fP to prompt for password, the terminal may sometimes be reset to a non-echo mode. This is apparently due to a race condition between the two programs; \fIfunzip\fP changes the terminal mode to non-echo before \fImore\fP reads its state, and \fImore\fP then ``restores'' the terminal to this mode before exiting. To recover, run \fIfunzip\fP on the same file but redirect to /dev/null rather than piping into more; after prompting again for the password, \fIfunzip\fP will reset the terminal properly. .PP There is presently no way to extract any member but the first from a ZIP archive. This would be useful in the case where a ZIP archive is included within another archive. In the case where the first member is a directory, \fIfunzip\fP simply creates the directory and exits. .PP The functionality of \fIfunzip\fP should be incorporated into \fIunzip\fP itself (future release). .PD .\" ========================================================================= .SH "SEE ALSO" \fIgzip\fP(1L), \fIunzip\fP(1L), \fIunzipsfx\fP(1L), \fIzip\fP(1L), \fIzipcloak\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PD .\" ========================================================================= .SH URL The Info-ZIP home page is currently at \fChttp://www.info-zip.org/pub/infozip/\fR or \fCftp://ftp.info-zip.org/pub/infozip/\fR . .PD .\" ========================================================================= .SH AUTHOR Mark Adler (Info-ZIP) -*[UNZIP542.MAN]UNZIP.1;1+, .M/ 4MM- 70@123KPWON568a78a89GHJ.\" Copyright (c) 1990-2001 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2000-Apr-09 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" unzip.1 by Greg Roelofs, Fulvio Marino, Jim van Zandt and others. .\" .\" ========================================================================= .\" define .Y macro (for user-command examples; normal Courier font): .de Y .ft CW .in +4n .nf \&\\$1 .ft .in .fi .. .\" ========================================================================= .TH UNZIP 1L "14 January 2001 (v5.42)" "Info-ZIP" .SH NAME unzip \- list, test and extract compressed files in a ZIP archive .PD .SH SYNOPSIS \fBunzip\fP [\fB\-Z\fP] [\fB\-cflptuvz\fP[\fBabjnoqsCLMVX$/\fP]] \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] [\fB\-d\fP\ \fIexdir\fP] .PD .\" ========================================================================= .SH DESCRIPTION \fIunzip\fP will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems. The default behavior (with no options) is to extract into the current directory (and subdirectories below it) all files from the specified ZIP archive. A companion program, \fIzip\fP(1L), creates ZIP archives; both programs are compatible with archives created by PKWARE's \fIPKZIP\fP and \fIPKUNZIP\fP for MS-DOS, but in many cases the program options or default behaviors differ. .PD .\" ========================================================================= .SH ARGUMENTS .TP .IR file [ .zip ] Path of the ZIP archive(s). If the file specification is a wildcard, each matching file is processed in an order determined by the operating system (or file system). Only the filename can be a wildcard; the path itself cannot. Wildcard expressions are similar to Unix \fIegrep\fP(1) (regular) expressions and may contain: .RS .IP * matches a sequence of 0 or more characters .IP ? matches exactly 1 character .IP [.\|.\|.] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything \fIexcept\fP the characters inside the brackets is considered a match). .RE .IP (Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) If no matches are found, the specification is assumed to be a literal filename; and if that also fails, the suffix \fC.zip\fR is appended. Note that self-extracting ZIP files are supported, as with any other ZIP archive; just specify the \fC.exe\fR suffix (if any) explicitly. .IP [\fIfile(s)\fP] An optional list of archive members to be processed, separated by spaces. (VMS versions compiled with,7R UNZIP.BCK  7[UNZIP542.MAN]UNZIP.1;1Md VMSCLI defined must delimit files with commas instead. See \fB\-v\fP in \fBOPTIONS\fP below.) Regular expressions (wildcards) may be used to match multiple members; see above. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system. .IP [\fB\-x\fP\ \fIxfile(s)\fP] An optional list of archive members to be excluded from processing. Since wildcard characters match directory separators (`/'), this option may be used to exclude any files that are in subdirectories. For example, ``\fCunzip foo *.[ch] -x */*\fR'' would extract all C source files in the main directory, but none in any subdirectories. Without the \fB\-x\fP option, all C source files in all directories within the zipfile would be extracted. .IP [\fB\-d\fP\ \fIexdir\fP] An optional directory to which to extract files. By default, all files and subdirectories are recreated in the current directory; the \fB\-d\fP option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). This option need not appear at the end of the command line; it is also accepted before the zipfile specification (with the normal options), immediately after the zipfile specification, or between the \fIfile(s)\fP and the \fB\-x\fP option. The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed. In particular, ``\fC\-d\ ~\fR'' (tilde) is expanded by Unix C shells into the name of the user's home directory, but ``\fC\-d~\fR'' is treated as a literal subdirectory ``\fB~\fP'' of the current directory. .\" ========================================================================= .SH OPTIONS Note that, in order to support obsolescent hardware, \fIunzip\fP's usage screen is limited to 22 or 23 lines and should therefore be considered only a reminder of the basic \fIunzip\fP syntax rather than an exhaustive list of all possible flags. The exhaustive list follows: .TP .B \-Z \fIzipinfo\fP(1L) mode. If the first option on the command line is \fB\-Z\fP, the remaining options are taken to be \fIzipinfo\fP(1L) options. See the appropriate manual page for a description of these options. .TP .B \-A [OS/2, Unix DLL] print extended help for the DLL's programming interface (API). .TP .B \-c extract files to stdout/screen (``CRT''). This option is similar to the \fB\-p\fP option except that the name of each file is printed as it is extracted, the \fB\-a\fP option is allowed, and ASCII-EBCDIC conversion is automatically performed if appropriate. This option is not listed in the \fIunzip\fP usage screen. .TP .B \-f freshen existing files, i.e., extract only those files that already exist on disk and that are newer than the disk copies. By default \fIunzip\fP queries before overwriting, but the \fB\-o\fP option may be used to suppress the queries. Note that under many operating systems, the TZ (timezone) environment variable must be set correctly in order for \fB\-f\fP and \fB\-u\fP to work properly (under Unix the variable is usually set automatically). The reasons for this are somewhat subtle but have to do with the differences between DOS-format file times (always local time) and Unix-format times (always in GMT/UTC) and the necessity to compare the two. A typical TZ value is ``PST8PDT'' (US Pacific time with automatic adjustment for Daylight Savings Time or ``summer time''). .TP .B \-l list archive files (short format). The names, uncompressed file sizes and modification dates and times of the specified files are printed, along with totals for all files specified. If UnZip was compiled with OS2_EAS defined, the \fB\-l\fP option also lists columns for the sizes of stored OS/2 extended attributes (EAs) and OS/2 access control lists (ACLs). In addition, the zipfile comment and individual file comments (if any) are displayed. If a file was archived from a single-case file system (for example, the old MS-DOS FAT file system) and the \fB\-L\fP option was given, the filename is converted to lowercase and is prefixed with a caret (^). .TP .B \-p extract files to pipe (stdout). Nothing but the file data is sent to stdout, and the files are always extracted in binary format, just as they are stored (no conversions). .TP .B \-t test archive files. This option extracts each specified file in memory and compares the CRC (cyclic redundancy check, an enhanced checksum) of the expanded file with the original file's stored CRC value. .TP .B \-T [most OSes] set the timestamp on the archive(s) to that of the newest file in each one. This corresponds to \fIzip\fP's \fB\-go\fP option except that it can be used on wildcard zipfiles (e.g., ``\fCunzip \-T \e*.zip\fR'') and is much faster. .TP .B \-u update existing files and create new ones if needed. This option performs the same function as the \fB\-f\fP option, extracting (with query) files that are newer than those with the same name on disk, and in addition it extracts those files that do not already exist on disk. See \fB\-f\fP above for information on setting the timezone properly. .TP .B \-v be verbose or print diagnostic version info. This option has evolved and now behaves as both an option and a modifier. As an option it has two purposes: when a zipfile is specified with no other options, \fB\-v\fP lists archive files verbosely, adding to the basic \fB\-l\fP info the compression method, compressed size, compression ratio and 32-bit CRC. When no zipfile is specified (that is, the complete command is simply ``\fCunzip \-v\fR''), a diagnostic screen is printed. In addition to the normal header with release date and version, \fIunzip\fP lists the home Info-ZIP ftp site and where to find a list of other ftp and non-ftp sites; the target operating system for which it was compiled, as well as (possibly) the hardware on which it was compiled, the compiler and version used, and the compilation date; any special compilation options that might affect the program's operation (see also \fBDECRYPTION\fP below); and any options stored in environment variables that might do the same (see \fBENVIRONMENT OPTIONS\fP below). As a modifier it works in conjunction with other options (e.g., \fB\-t\fP) to produce more verbose or debugging output; this is not yet fully implemented but will be in future releases. .TP .B \-z display only the archive comment. .PD .\" ========================================================================= .SH MODIFIERS .TP .B \-a convert text files. Ordinarily all files are extracted exactly as they are stored (as ``binary'' files). The \fB\-a\fP option causes files identified by \fIzip\fP as text files (those with the `t' label in \fIzipinfo\fP listings, rather than `b') to be automatically extracted as such, converting line endings, end-of-file characters and the character set itself as necessary. (For example, Unix files use line feeds (LFs) for end-of-line (EOL) and have no end-of-file (EOF) marker; Macintoshes use carriage returns (CRs) for EOLs; and most PC operating systems use CR+LF for EOLs and control-Z for EOF. In addition, IBM mainframes and the Michigan Terminal System use EBCDIC rather than the more common ASCII character set, and NT supports Unicode.) Note that \fIzip\fP's identification of text files is by no means perfect; some ``text'' files may actually be binary and vice versa. \fIunzip\fP therefore prints ``\fC[text]\fR'' or ``\fC[binary]\fR'' as a visual check for each file it extracts when using the \fB\-a\fP option. The \fB\-aa\fP option forces all files to be extracted as text, regardless of the supposed file type. .TP .B \-b [g-+h UNZIP.BCK  7[UNZIP542.MAN]UNZIP.1;1M eneral] treat all files as binary (no text conversions). This is a shortcut for \fB\-\-\-a\fP. .TP .B \-b [Tandem] force the creation files with filecode type 180 ('C') when extracting Zip entries marked as "text". (On Tandem, \fB\-a\fP is enabled by default, see above). .TP .B \-b [VMS] auto-convert binary files (see \fB\-a\fP above) to fixed-length, 512-byte record format. Doubling the option (\fB\-bb\fP) forces all files to be extracted in this format. .TP .B \-B [Unix only, and only if compiled with UNIXBACKUP defined] save a backup copy of each overwritten file with a tilde appended (e.g., the old copy of ``\fCfoo\fR'' is renamed to ``\fCfoo~\fR''). This is similar to the default behavior of \fIemacs\fP(1) in many locations. .TP .B \-C match filenames case-insensitively. \fIunzip\fP's philosophy is ``you get what you ask for'' (this is also responsible for the \fB\-L\fP/\fB\-U\fP change; see the relevant options below). Because some file systems are fully case-sensitive (notably those under the Unix operating system) and because both ZIP archives and \fIunzip\fP itself are portable across platforms, \fIunzip\fP's default behavior is to match both wildcard and literal filenames case-sensitively. That is, specifying ``\fCmakefile\fR'' on the command line will \fIonly\fP match ``makefile'' in the archive, not ``Makefile'' or ``MAKEFILE'' (and similarly for wildcard specifications). Since this does not correspond to the behavior of many other operating/file systems (for example, OS/2 HPFS, which preserves mixed case but is not sensitive to it), the \fB\-C\fP option may be used to force all filename matches to be case-insensitive. In the example above, all three files would then match ``\fCmakefile\fR'' (or ``\fCmake*\fR'', or similar). The \fB\-C\fP option affects files in both the normal file list and the excluded-file list (xlist). .TP .B \-E [MacOS only] display contents of MacOS extra field during restore operation. .TP .B \-F [Acorn only] suppress removal of NFS filetype extension from stored filenames. .TP .B \-F [Unix only, and only if compiled with ACORN_FTYPE_NFS defined] translate filetype information from ACORN RISC OS extra field blocks into a NFS filetype extension and append it to the names of the extracted files. (When the stored filename appears to already have an appended NFS filetype extension, it is replaced by the info from the extra field.) .TP .B \-i [MacOS only] ignore filenames stored in MacOS extra fields. Instead, the most compatible filename stored in the generic part of the entry's header is used. .TP .B \-j junk paths. The archive's directory structure is not recreated; all files are deposited in the extraction directory (by default, the current one). .TP .B \-J [BeOS only] junk file attributes. The file's BeOS file attributes are not restored, just the file's data. .TP .B \-J [MacOS only] ignore MacOS extra fields. All Macintosh specific info is skipped. Data-fork and resource-fork are restored as separate files. .TP .B \-L convert to lowercase any filename originating on an uppercase-only operating system or file system. (This was \fIunzip\fP's default behavior in releases prior to 5.11; the new default behavior is identical to the old behavior with the \fB\-U\fP option, which is now obsolete and will be removed in a future release.) Depending on the archiver, files archived under single-case file systems (VMS, old MS-DOS FAT, etc.) may be stored as all-uppercase names; this can be ugly or inconvenient when extracting to a case-preserving file system such as OS/2 HPFS or a case-sensitive one such as under Unix. By default \fIunzip\fP lists and extracts such filenames exactly as they're stored (excepting truncation, conversion of unsupported characters, etc.); this option causes the names of all files from certain systems to be converted to lowercase. The \fB\-LL\fP option forces conversion of every filename to lowercase, regardless of the originating file system. .TP .B \-M pipe all output through an internal pager similar to the Unix\fImore\fP(1) command. At the end of a screenful of output, \fIunzip\fP pauses with a ``\-\-More\-\-'' prompt; the next screenful may be viewed by pressing the Enter (Return) key or the space bar. \fIunzip\fP can be terminated by pressing the ``q'' key and, on some systems, the Enter/Return key. Unlike Unix \fImore\fP(1), there is no forward-searching or editing capability. Also, \fIunzip\fP doesn't notice if long lines wrap at the edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case \fIunzip\fP assumes the height is 24 lines. .TP .B \-n never overwrite existing files. If a file already exists, skip the extraction of that file without prompting. By default \fIunzip\fP queries before extracting any file that already exists; the user may choose to overwrite only the current file, overwrite all files, skip extraction of the current file, skip extraction of all existing files, or rename the current file. .TP .B \-N [Amiga] extract file comments as Amiga filenotes. File comments are created with the \-c option of \fIzip\fP(1L), or with the \-N option of the Amiga port of \fIzip\fP(1L), which stores filenotes as comments. .TP .B \-o overwrite existing files without prompting. This is a dangerous option, so use it with care. (It is often used with \fB\-f\fP, however, and is the only way to overwrite directory EAs under OS/2.) .IP \fB\-P\fP\ \fIpassword\fP use \fIpassword\fP to decrypt encrypted zipfile entries (if any). \fBTHIS IS INSECURE!\fP Many multi-user operating systems provide ways for any user to see the current command line of any other user; even on stand-alone systems there is always the threat of over-the-shoulder peeking. Storing the plaintext password as part of a command line in an automated script is even worse. Whenever possible, use the non-echoing, interactive prompt to enter passwords. (And where security is truly important, use strong encryption such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.) .TP .B \-q perform operations quietly (\fB\-qq\fP = even quieter). Ordinarily \fIunzip\fP prints the names of the files it's extracting or testing, the extraction methods, any file or zipfile comments that may be stored in the archive, and possibly a summary when finished with each archive. The \fB\-q\fP[\fBq\fP] options suppress the printing of some or all of these messages. .TP .B \-s [OS/2, NT, MS-DOS] convert spaces in filenames to underscores. Since all PC operating systems allow spaces in filenames, \fIunzip\fP by default extracts filenames with spaces intact (e.g., ``\fCEA\ DATA.\ SF\fR''). This can be awkward, however, since MS-DOS in particular does not gracefully support spaces in filenames. Conversion of spaces to underscores can eliminate the awkwardness in some cases. .TP .B \-U (obsolete; to be removed in a future release) leave filenames uppercase if created under MS-DOS, VMS, etc. See \fB\-L\fP above. .TP .B \-V retain (VMS) file version numbers. VMS files can be stored with a version number, in the format \fCfile.ext;##\fR. By default the ``\fC;##\fR'' version numbers are stripped, but this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) .TP .B \-X [VMS, Unix, OS/2, NT] restore owner/protection info (UICs) under VMS, or .qP UNZIP.BCK  7[UNZIP542.MAN]UNZIP.1;1M]%user and group info (UID/GID) under Unix, or access control lists (ACLs) under certain network-enabled versions of OS/2 (Warp Server with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with IBM Peer 1.0), or security ACLs under Windows NT. In most cases this will require special system privileges, and doubling the option (\fB\-XX\fP) under NT instructs \fIunzip\fP to use privileges for extraction; but under Unix, for example, a user who belongs to several groups can restore files owned by any of those groups, as long as the user IDs match his or her own. Note that ordinary file attributes are always restored--this option applies only to optional, extra ownership info available on some operating systems. [NT's access control lists do not appear to be especially compatible with OS/2's, so no attempt is made at cross-platform portability of access privileges. It is not clear under what conditions this would ever be useful anyway.] .TP .B \-$ .\" Amiga support possible eventually, but not yet [MS-DOS, OS/2, NT] restore the volume label if the extraction medium is removable (e.g., a diskette). Doubling the option (\fB\-$$\fP) allows fixed media (hard disks) to be labelled as well. By default, volume labels are ignored. .IP \fB\-/\fP\ \fIextensions\fP [Acorn only] overrides the extension list supplied by Unzip$Ext environment variable. During extraction, filename extensions that match one of the items in this extension list are swapped in front of the base name of the extracted file. .PD .\" ========================================================================= .SH "ENVIRONMENT OPTIONS" \fIunzip\fP's default behavior may be modified via options placed in an environment variable. This can be done with any option, but it is probably most useful with the \fB\-a\fP, \fB\-L\fP, \fB\-C\fP, \fB\-q\fP, \fB\-o\fP, or \fB\-n\fP modifiers: make \fIunzip\fP auto-convert text files by default, make it convert filenames from uppercase systems to lowercase, make it match names case-insensitively, make it quieter, or make it always overwrite or never overwrite files as it extracts them. For example, to make \fIunzip\fP act as quietly as possible, only reporting errors, one would use one of the following commands: .PP .DT .ft CW .in +4n .ta \w'UNZIP=\-qq; export UNZIP'u+4n .in .ft .PD 0 .Y "UNZIP=\-qq; export UNZIP\t\fRUnix Bourne shell" .Y "setenv UNZIP \-qq\t\fRUnix C shell" .Y "set UNZIP=\-qq\t\fROS/2 or MS-DOS" .Y "define UNZIP_OPTS ""\-qq""\t\fRVMS (quotes for \fIlowercase\fP)" .PD .PP Environment options are, in effect, considered to be just like any other command-line options, except that they are effectively the first options on the command line. To override an environment option, one may use the ``minus operator'' to remove it. For instance, to override one of the quiet-flags in the example above, use the command .PP .Y "unzip \-\-q[\fIother options\fC] zipfile" .PP The first hyphen is the normal switch character, and the second is a minus sign, acting on the q option. Thus the effect here is to cancel one quantum of quietness. To cancel both quiet flags, two (or more) minuses may be used: .PP .PD 0 .Y "unzip \-t\-\-q zipfile" .Y "unzip \-\-\-qt zipfile" .PD .PP (the two are equivalent). This may seem awkward or confusing, but it is reasonably intuitive: just ignore the first hyphen and go from there. It is also consistent with the behavior of Unix \fInice\fP(1). .PP As suggested by the examples above, the default variable names are UNZIP_OPTS for VMS (where the symbol used to install \fIunzip\fP as a foreign command would otherwise be confused with the environment variable), and UNZIP for all other operating systems. For compatibility with \fIzip\fP(1L), UNZIPOPT is also accepted (don't ask). If both UNZIP and UNZIPOPT are defined, however, UNZIP takes precedence. \fIunzip\fP's diagnostic option (\fB\-v\fP with no zipfile name) can be used to check the values of all four possible \fIunzip\fP and \fIzipinfo\fP environment variables. .PP The timezone variable (TZ) should be set according to the local timezone in order for the \fB\-f\fP and \fB\-u\fP to operate correctly. See the description of \fB\-f\fP above for details. This variable may also be necessary in order for timestamps on extracted files to be set correctly. Under Windows 95/NT \fIunzip\fP should know the correct timezone even if TZ is unset, assuming the timezone is correctly set in the Control Panel. .PD .\" ========================================================================= .SH DECRYPTION Encrypted archives are fully supported by Info-ZIP software, but due to United States export restrictions, de-/encryption support might be disabled in your compiled binary. However, since spring 2000, US export restrictions have been liberated, and our source archives do now include full crypt code. In case you need binary distributions with crypt support enabled, see the file ``WHERE'' in any Info-ZIP source or binary distribution for locations both inside and outside the US. .PP Some compiled versions of \fIunzip\fP may not support decryption. To check a version for crypt support, either attempt to test or extract an encrypted archive, or else check \fIunzip\fP's diagnostic screen (see the \fB\-v\fP option above) for ``\fC[decryption]\fR'' as one of the special compilation options. .PP As noted above, the \fB\-P\fP option may be used to supply a password on the command line, but at a cost in security. The preferred decryption method is simply to extract normally; if a zipfile member is encrypted, \fIunzip\fP will prompt for the password without echoing what is typed. \fIunzip\fP continues to use the same password as long as it appears to be valid, by testing a 12-byte header on each file. The correct password will always check out against the header, but there is a 1-in-256 chance that an incorrect password will as well. (This is a security feature of the PKWARE zipfile format; it helps prevent brute-force attacks that might otherwise gain a large speed advantage by testing only the header.) In the case that an incorrect password is given but it passes the header test anyway, either an incorrect CRC will be generated for the extracted data or else \fIunzip\fP will fail during the extraction because the ``decrypted'' bytes do not constitute a valid compressed data stream. .PP If the first password fails the header check on some file, \fIunzip\fP will prompt for another password, and so on until all files are extracted. If a password is not known, entering a null password (that is, just a carriage return or ``Enter'') is taken as a signal to skip all further prompting. Only unencrypted files in the archive(s) will thereafter be extracted. (In fact, that's not quite true; older versions of \fIzip\fP(1L) and \fIzipcloak\fP(1L) allowed null passwords, so \fIunzip\fP checks each encrypted file to see if the null password works. This may result in ``false positives'' and extraction errors, as noted above.) .PP Archives encrypted with 8-bit passwords (for example, passwords with accented European characters) may not be portable across systems and/or other archivers. This problem stems from the use of multiple encoding methods for such characters, including Latin-1 (ISO 8859-1) and OEM code page 850. DOS \fIPKZIP\fP 2.04g uses the OEM code page; Windows \fIPKZIP\fP 2.50 uses Latin-1 (and is therefore incompatible with DOS \fIPKZIP\fP); Info-ZIP uses the OEM code page on DOS, OS/2 and Win3.x ports but Latin-1 everywhere else; and Nico Mak's \fIWinZip\fP 6.x does not allow 8-bit passwords at all. \fIUnZip\fP 5.3 attempts to use the default character set first (e.g., L/H" UNZIP.BCK  7[UNZIP542.MAN]UNZIP.1;1Mz4atin-1), followed by the alternate one (e.g., OEM code page) to test passwords. On EBCDIC systems, if both of these fail, EBCDIC encoding will be tested as a last resort. (Since there are no known archivers that encrypt using EBCDIC encoding, EBCDIC is not tested on non-EBCDIC systems.) ISO character encodings other than Latin-1 are not supported. .PD .\" ========================================================================= .SH EXAMPLES To use \fIunzip\fP to extract all members of the archive \fIlett5ers.zip\fP into the current directory and subdirectories below it, creating any subdirectories as necessary: .PP .Y "unzip letters" .PP To extract all members of \fIletters.zip\fP into the current directory only: .PP .Y "unzip -j letters" .PP To test \fIletters.zip\fP, printing only a summary message indicating whether the archive is OK or not: .PP .Y "unzip -tq letters" .PP To test \fIall\fP zipfiles in the current directory, printing only the summaries: .PP .Y "unzip -tq \e*.zip" .PP (The backslash before the asterisk is only required if the shell expands wildcards, as in Unix; double quotes could have been used instead, as in the source examples below.)\ \ To extract to standard output all members of \fIletters.zip\fP whose names end in \fI.tex\fP, auto-converting to the local end-of-line convention and piping the output into \fImore\fP(1): .PP .Y "unzip \-ca letters \e*.tex | more" .PP To extract the binary file \fIpaper1.dvi\fP to standard output and pipe it to a printing program: .PP .Y "unzip \-p articles paper1.dvi | dvips" .PP To extract all FORTRAN and C source files--*.f, *.c, *.h, and Makefile--into the /tmp directory: .PP .Y "unzip source.zip ""*.[fch]"" Makefile -d /tmp" .PP (the double quotes are necessary only in Unix and only if globbing is turned on). To extract all FORTRAN and C source files, regardless of case (e.g., both *.c and *.C, and any makefile, Makefile, MAKEFILE or similar): .PP .Y "unzip \-C source.zip ""*.[fch]"" makefile -d /tmp" .PP To extract any such files but convert any uppercase MS-DOS or VMS names to lowercase and convert the line-endings of all of the files to the local standard (without respect to any files that might be marked ``binary''): .PP .Y "unzip \-aaCL source.zip ""*.[fch]"" makefile -d /tmp" .PP To extract only newer versions of the files already in the current directory, without querying (NOTE: be careful of unzipping in one timezone a zipfile created in another--ZIP archives other than those created by Zip 2.1 or later contain no timezone information, and a ``newer'' file from an eastern timezone may, in fact, be older): .PP .Y "unzip \-fo sources" .PP To extract newer versions of the files already in the current directory and to create any files not already there (same caveat as previous example): .PP .Y "unzip \-uo sources" .PP To display a diagnostic screen showing which \fIunzip\fP and \fIzipinfo\fP options are stored in environment variables, whether decryption support was compiled in, the compiler with which \fIunzip\fP was compiled, etc.: .PP .Y "unzip \-v" .PP In the last five examples, assume that UNZIP or UNZIP_OPTS is set to -q. To do a singly quiet listing: .PP .Y "unzip \-l file.zip" .PP To do a doubly quiet listing: .PP .Y "unzip \-ql file.zip" .PP (Note that the ``\fC.zip\fR'' is generally not necessary.) To do a standard listing: .PP .PD 0 .Y "unzip \-\-ql file.zip" .PP or .Y "unzip \-l\-q file.zip" .PP or .Y "unzip \-l\-\-q file.zip\t\fR(extra minuses don't hurt)" .PD .\" ========================================================================= .SH TIPS The current maintainer, being a lazy sort, finds it very useful to define a pair of aliases: \fCtt\fR for ``\fCunzip \-tq\fR'' and \fCii\fR for ``\fCunzip \-Z\fR'' (or ``\fCzipinfo\fR''). One may then simply type ``\fCtt zipfile\fR'' to test an archive, something that is worth making a habit of doing. With luck \fIunzip\fP will report ``\fCNo errors detected in compressed data of zipfile.zip\fR,'' after which one may breathe a sigh of relief. .PP The maintainer also finds it useful to set the UNZIP environment variable to ``\fC\-aL\fR'' and is tempted to add ``\fC\-C\fR'' as well. His ZIPINFO variable is set to ``\fC\-z\fR''. .PD .\" ========================================================================= .SH DIAGNOSTICS The exit status (or error level) approximates the exit codes defined by PKWARE and takes on the following values, except under VMS: .RS .IP 0 normal; no errors or warnings detected. .IP 1 one or more warning errors were encountered, but processing completed successfully anyway. This includes zipfiles where one or more files was skipped due to unsupported compression method or encryption with an unknown password. .IP 2 a generic error in the zipfile format was detected. Processing may have completed successfully anyway; some broken zipfiles created by other archivers have simple work-arounds. .IP 3 a severe error in the zipfile format was detected. Processing probably failed immediately. .IP 4 \fIunzip\fP was unable to allocate memory for one or more buffers during program initialization. .IP 5 \fIunzip\fP was unable to allocate memory or unable to obtain a tty to read the decryption password(s). .IP 6 \fIunzip\fP was unable to allocate memory during decompression to disk. .IP 7 \fIunzip\fP was unable to allocate memory during in-memory decompression. .IP 8 [currently not used] .IP 9 the specified zipfiles were not found. .IP 10 invalid options were specified on the command line. .IP 11 no matching files were found. .IP 50 the disk is (or was) full during extraction. .IP 51 the end of the ZIP archive was encountered prematurely. .IP 80 the user aborted \fIunzip\fP prematurely with control-C (or similar) .IP 81 testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption. .IP 82 no files were found due to bad decryption password(s). (If even one file is successfully processed, however, the exit status is 1.) .RE .PP VMS interprets standard Unix (or PC) return values as other, scarier-looking things, so \fIunzip\fP instead maps them into VMS-style status codes. The current mapping is as follows: 1 (success) for normal exit, 0x7fff0001 for warning errors, and (0x7fff000? + 16*normal_unzip_exit_status) for all other errors, where the `?' is 2 (error) for \fIunzip\fP values 2, 9-11 and 80-82, and 4 (fatal error) for the remaining ones (3-8, 50, 51). In addition, there is a compilation option to expand upon this behavior: defining RETURN_CODES results in a human-readable explanation of what the error status means. .PD .\" ========================================================================= .SH BUGS Multi-part archives are not yet supported, except in conjunction with \fIzip\fP. (All parts must be concatenated together in order, and then ``\fCzip \-F\fR'' must be performed on the concatenated archive in order to ``fix'' it.) This will definitely be corrected in the next major release. .PP Archives read from standard input are not yet supported, except with \fIfunzip\fP (and then only the first member of the archive can be extracted). .PP Archives encrypted with 8-bit passwords (e.g., passwords with accented European characters) may not be portable across systems and/or other archivers. See the discussion in \fBDECRYPTION\fP above. .PP \fIunzip\fP's \fB\-M\fP (``more'') option is overly simplistic in its handling of screen output; as noted above, it fails to detect the wrapping of long lines and may thereby cause lines at the top of the screen to be scrolled off before being read. \fIunzip\fP should detect and treat each occurre0 UNZIP.BCK  7[UNZIP542.MAN]UNZIP.1;1M<Cnce of line-wrap as one additional line printed. This requires knowledge of the screen's width as well as its height. In addition, \fIunzip\fP should detect the true screen geometry on all systems. .PP Dates, times and permissions of stored directories are not restored except under Unix. .PP [MS-DOS] When extracting or testing files from an archive on a defective floppy diskette, if the ``Fail'' option is chosen from DOS's ``Abort, Retry, Fail?'' message, older versions of \fIunzip\fP may hang the system, requiring a reboot. This problem appears to be fixed, but control-C (or control-Break) can still be used to terminate \fIunzip\fP. .PP Under DEC Ultrix, \fIunzip\fP would sometimes fail on long zipfiles (bad CRC, not always reproducible). This was apparently due either to a hardware bug (cache memory) or an operating system bug (improper handling of page faults?). Since Ultrix has been abandoned in favor of Digital Unix (OSF/1), this may not be an issue anymore. .PP [Unix] Unix special files such as FIFO buffers (named pipes), block devices and character devices are not restored even if they are somehow represented in the zipfile, nor are hard-linked files relinked. Basically the only file types restored by \fIunzip\fP are regular files, directories and symbolic (soft) links. .PP [OS/2] Extended attributes for existing directories are only updated if the \fB\-o\fP (``overwrite all'') option is given. This is a limitation of the operating system; because directories only have a creation time associated with them, \fIunzip\fP has no way to determine whether the stored attributes are newer or older than those on disk. In practice this may mean a two-pass approach is required: first unpack the archive normally (with or without freshening/updating existing files), then overwrite just the directory entries (e.g., ``\fCunzip -o foo */\fR''). .PP [VMS] When extracting to another directory, only the \fI[.foo]\fP syntax is accepted for the \fB\-d\fP option; the simple Unix \fIfoo\fP syntax is silently ignored (as is the less common VMS \fIfoo.dir\fP syntax). .PP [VMS] When the file being extracted already exists, \fIunzip\fP's query only allows skipping, overwriting or renaming; there should additionally be a choice for creating a new version of the file. In fact, the ``overwrite'' choice does create a new version; the old version is not overwritten or deleted. .PD .\" ========================================================================= .SH "SEE ALSO" \fIfunzip\fP(1L), \fIzip\fP(1L), \fIzipcloak\fP(1L), \fIzipgrep\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PD .\" ========================================================================= .SH URL The Info-ZIP home page is currently at \fChttp://www.info-zip.org/pub/infozip/\fR or \fCftp://ftp.info-zip.org/pub/infozip/\fR . .PD .\" ========================================================================= .SH AUTHORS The primary Info-ZIP authors (current semi-active members of the Zip-Bugs workgroup) are: Greg ``Cave Newt'' Roelofs (UnZip); Onno van der Linden (Zip); Jean-loup Gailly (compression); Mark Adler (decompression, fUnZip); Christian Spieler (UnZip maintance coordination, VMS, MS-DOS, Windows 95, NT, shared code, general Zip and UnZip integration and optimization); Mike White (Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2); Paul Kienitz (Amiga, Windows 95); Chris Herborth (BeOS, QNX, Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn RISC OS); Harald Denker (Atari, MVS); John Bush (Solaris, Amiga); Hunter Goatley (VMS); Steve Salisbury (Windows 95, NT); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS, Windows 95, NT); and Dave Smith (Tandem NSK). The author of the original unzip code upon which Info-ZIP's was based is Samuel H. Smith; Carl Mascott did the first Unix port; and David P. Kirschbaum organized and led Info-ZIP in its early days with Keith Petersen hosting the original mailing list at WSMR-SimTel20. The full list of contributors to UnZip has grown quite large; please refer to the CONTRIBS file in the UnZip source distribution for a relatively complete version. .PD .\" ========================================================================= .SH VERSIONS .ta \w'vx.xxnn'u +\w'fall 1989'u+3n .PD 0 .IP "v1.2\t15 Mar 89" \w'\t\t'u Samuel H. Smith .IP "v2.0\t\ 9 Sep 89" Samuel H. Smith .IP "v2.x\tfall 1989" many Usenet contributors .IP "v3.0\t\ 1 May 90" Info-ZIP (DPK, consolidator) .IP "v3.1\t15 Aug 90" Info-ZIP (DPK, consolidator) .IP "v4.0\t\ 1 Dec 90" Info-ZIP (GRR, maintainer) .IP "v4.1\t12 May 91" Info-ZIP .IP "v4.2\t20 Mar 92" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.0\t21 Aug 92" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.01\t15 Jan 93" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.1\t\ 7 Feb 94" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.11\t\ 2 Aug 94" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.12\t28 Aug 94" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.2\t30 Apr 96" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.3\t22 Apr 97" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.31\t31 May 97" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.32\t\ 3 Nov 97" Info-ZIP (Zip-Bugs subgroup, GRR) .IP "v5.4\t28 Nov 98" Info-ZIP (Zip-Bugs subgroup, SPC) .IP "v5.41\t16 Apr 00" Info-ZIP (Zip-Bugs subgroup, SPC) .IP "v5.42\t14 Jan 01" Info-ZIP (Zip-Bugs subgroup, SPC) .PD *[UNZIP542.MAN]UNZIPSFX.1;1+, ./ 4- 70@123KPWO56C&9a7C&9a89GHJ.\" Copyright (c) 1990-2001 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2000-Apr-09 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" unzipsfx.1 by Greg Roelofs .\" .\" ========================================================================= .\" define .Y macro (for user-command examples; normal Courier font): .de Y .ft CW .in +4n .nf \&\\$1 .ft .in .fi .. .\" ========================================================================= .TH UNZIPSFX 1L "14 January 2001 (v5.42)" "Info-ZIP" .SH NAME unzipsfx \- self-extracting stub for prepending to ZIP archives .PD .SH SYNOPSIS \fB\fP [\fB\-cfptuz\fP[\fBajnoqsCLV$\fP]] [\fIfile(s)\fP\ .\|.\|. [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.]] .PD .\" ========================================================================= .SH DESCRIPTION \fIunzipsfx\fP is a modified version of \fIunzip\fP(1L) designed to be prepended to existing ZIP archives in order to form self-extracting archives. Instead of taking its first non-flag argument to be the zipfile(s) to be extracted, \fIunzipsfx\fP seeks itself under the name by which it was invoked and tests or extracts the contents of the appended archive. Because the executable stub adds bulk to the archive (the whole purpose of which is to be as small as possible), a number of1N UNZIP.BCK  7[UNZIP542.MAN]UNZIPSFX.1;1) the less-vital capabilities in regular \fIunzip\fP have been removed. Among these are the usage (or help) screen, the listing and diagnostic functions (\fB\-l\fP and \fB\-v\fP), the ability to decompress older compression formats (the ``reduce,'' ``shrink'' and ``implode'' methods), and the ability to extract to a directory other than the current one. Decryption is supported as a compile-time option but should be avoided unless the attached archive contains encrypted files. .PP \fBNote that self-extracting archives made with\fP \fIunzipsfx\fP \fBare no more (or less) portable across different operating systems than is the\fP \fIunzip\fP \fBexecutable itself.\fP In general a self-extracting archive made on a particular Unix system, for example, will only self-extract under the same flavor of Unix. Regular \fIunzip\fP may still be used to extract the embedded archive as with any normal zipfile, although it will generate a harmless warning about extra bytes at the beginning of the zipfile. \fIDespite this\fP, however, the self-extracting archive is technically \fInot\fP a valid ZIP archive, and PKUNZIP may be unable to test or extract it. This limitation is due to the simplistic manner in which the archive is created; the internal directory structure is not updated to reflect the extra bytes prepended to the original zipfile. .PD .\" ========================================================================= .SH ARGUMENTS .IP [\fIfile(s)\fP] An optional list of archive members to be processed. Regular expressions (wildcards) similar to those in Unix \fIegrep\fP(1) may be used to match multiple members. These wildcards may contain: .RS .IP * matches a sequence of 0 or more characters .IP ? matches exactly 1 character .IP [.\|.\|.] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything \fIexcept\fP the characters inside the brackets is considered a match). .RE .IP (Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) .IP [\fB\-x\fP\ \fIxfile(s)\fP] An optional list of archive members to be excluded from processing. Since wildcard characters match directory separators (`/'), this option may be used to exclude any files that are in subdirectories. For example, ``\fCfoosfx *.[ch] -x */*\fR'' would extract all C source files in the main directory, but none in any subdirectories. Without the \fB\-x\fP option, all C source files in all directories within the zipfile would be extracted. .PP If \fIunzipsfx\fP is compiled with SFX_EXDIR defined, the following option is also enabled: .IP [\fB\-d\fP\ \fIexdir\fP] An optional directory to which to extract files. By default, all files and subdirectories are recreated in the current directory; the \fB\-d\fP option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed. In particular, ``\fC\-d\ ~\fR'' (tilde) is expanded by Unix C shells into the name of the user's home directory, but ``\fC\-d~\fR'' is treated as a literal subdirectory ``\fB~\fP'' of the current directory. .PD .\" ========================================================================= .SH OPTIONS \fIunzipsfx\fP supports the following \fIunzip\fP(1L) options: \fB\-c\fP and \fB\-p\fP (extract to standard output/screen), \fB\-f\fP and \fB\-u\fP (freshen and update existing files upon extraction), \fB\-t\fP (test archive) and \fB\-z\fP (print archive comment). All normal listing options (\fB\-l\fP, \fB\-v\fP and \fB\-Z\fP) have been removed, but the testing option (\fB\-t\fP) may be used as a ``poor man's'' listing. Alternatively, those creating self-extracting archives may wish to include a short listing in the zipfile comment. .PP See \fIunzip\fP(1L) for a more complete description of these options. .PD .\" ========================================================================= .SH MODIFIERS \fIunzipsfx\fP currently supports all \fIunzip\fP(1L) modifiers: \fB\-a\fP (convert text files), \fB\-n\fP (never overwrite), \fB\-o\fP (overwrite without prompting), \fB\-q\fP (operate quietly), \fB\-C\fP (match names case-insenstively), \fB\-L\fP (convert uppercase-OS names to lowercase), \fB\-j\fP (junk paths) and \fB\-V\fP (retain version numbers); plus the following operating-system specific options: \fB\-X\fP (restore VMS owner/protection info), \fB\-s\fP (convert spaces in filenames to underscores [DOS, OS/2, NT]) and \fB\-$\fP (restore volume label [DOS, OS/2, NT, Amiga]). .PP (Support for regular ASCII text-conversion may be removed in future versions, since it is simple enough for the archive's creator to ensure that text files have the appropriate format for the local OS. EBCDIC conversion will of course continue to be supported since the zipfile format implies ASCII storage of text files.) .PP See \fIunzip\fP(1L) for a more complete description of these modifiers. .PD .\" ========================================================================= .SH "ENVIRONMENT OPTIONS" \fIunzipsfx\fP uses the same environment variables as \fIunzip\fP(1L) does, although this is likely to be an issue only for the person creating and testing the self-extracting archive. See \fIunzip\fP(1L) for details. .PD .\" ========================================================================= .SH DECRYPTION Decryption is supported exactly as in \fIunzip\fP(1L); that is, interactively with a non-echoing prompt for the password(s). See \fIunzip\fP(1L) for details. Once again, note that if the archive has no encrypted files there is no reason to use a version of \fIunzipsfx\fP with decryption support; that only adds to the size of the archive. .PD .\" ========================================================================= .SH EXAMPLES To create a self-extracting archive \fIletters\fP from a regular zipfile \fIletters.zip\fP and change the new archive's permissions to be world-executable under Unix: .PP .PD 0 .Y "cat unzipsfx letters.zip > letters" .Y "chmod 755 letters" .Y "zip -A letters" .PD .PP To create the same archive under MS-DOS, OS/2 or NT (note the use of the \fB/b\fP [binary] option to the \fIcopy\fP command): .PP .Y "copy /b unzipsfx.exe+letters.zip letters.exe" .Y "zip -A letters.exe" .PP Under VMS: .PP .Y "copy unzipsfx.exe,letters.zip letters.exe" .Y "letters == ""$currentdisk:[currentdir]letters.exe""" .Y "zip -A letters.exe" .PP (The VMS \fIappend\fP command may also be used. The second command installs the new program as a ``foreign command'' capable of taking arguments. The third line assumes that Zip is already installed as a foreign command.) Under AmigaDOS: .PP .Y "MakeSFX letters letters.zip UnZipSFX" .PP (MakeSFX is included with the UnZip source distribution and with Amiga binary distributions. ``\fCzip -A\fR'' doesn't work on Amiga self-extracting archives.) To test (or list) the newly created self-extracting archive: .PP .Y "letters \-t" .PP To test \fIletters\fP quietly, printing only a summary message indicating whether the archive is OK or not: .PP .Y "letters \-tqq" .PP To extract the complete contents into the current directory, recreating all files and subdirectories as necessary: .PP .Y "letters" .PP To extract all \fC*.txt\fR files (in Unix quote the `*'): .PP .Y "letters *.txt" .PP To ext2_ UNZIP.BCK  7[UNZIP542.MAN]UNZIPSFX.1;1]ract everything \fIexcept\fP the \fC*.txt\fR files: .PP .Y "letters -x *.txt" .PP To extract only the README file to standard output (the screen): .PP .Y "letters -c README" .PP To print only the zipfile comment: .PP .Y "letters \-z" .PD .\" ========================================================================= .SH LIMITATIONS The principle and fundamental limitation of \fIunzipsfx\fP is that it is not portable across architectures or operating systems, and therefore neither are the resulting archives. For some architectures there is limited portability, however (e.g., between some flavors of Intel-based Unix). .PP Another problem with the current implementation is that any archive with ``junk'' prepended to the beginning technically is no longer a zipfile (unless \fIzip\fP(1) is used to adjust the zipfile offsets appropriately, as noted above). \fIunzip\fP(1) takes note of the prepended bytes and ignores them since some file-transfer protocols, notably MacBinary, are also known to prepend junk. But PKWARE's archiver suite may not be able to deal with the modified archive unless its offsets have been adjusted. .PP \fIunzipsfx\fP has no knowledge of the user's PATH, so in general an archive must either be in the current directory when it is invoked, or else a full or relative path must be given. If a user attempts to extract the archive from a directory in the PATH other than the current one, \fIunzipsfx\fP will print a warning to the effect, ``can't find myself.'' This is always true under Unix and may be true in some cases under MS-DOS, depending on the compiler used (Microsoft C fully qualifies the program name, but other compilers may not). Under OS/2 and NT there are operating-system calls available that provide the full path name, so the archive may be invoked from anywhere in the user's path. The situation is not known for AmigaDOS, Atari TOS, MacOS, etc. .PP As noted above, a number of the normal \fIunzip\fP(1L) functions have been removed in order to make \fIunzipsfx\fP smaller: usage and diagnostic info, listing functions and extraction to other directories. Also, only stored and deflated files are supported. The latter limitation is mainly relevant to those who create SFX archives, however. .PP VMS users must know how to set up self-extracting archives as foreign commands in order to use any of \fIunzipsfx\fP's options. This is not necessary for simple extraction, but the command to do so then becomes, e.g., ``\fCrun letters\fR'' (to continue the examples given above). .PP \fIunzipsfx\fP on the Amiga requires the use of a special program, MakeSFX, in order to create working self-extracting archives; simple concatenation does not work. (For technically oriented users, the attached archive is defined as a ``debug hunk.'') There may be compatibility problems between the ROM levels of older Amigas and newer ones. .PP All current bugs in \fIunzip\fP(1L) exist in \fIunzipsfx\fP as well. .PD .\" ========================================================================= .SH DIAGNOSTICS \fIunzipsfx\fP's exit status (error level) is identical to that of \fIunzip\fP(1L); see the corresponding man page. .PD .\" ========================================================================= .SH "SEE ALSO" \fIfunzip\fP(1L), \fIunzip\fP(1L), \fIzip\fP(1L), \fIzipcloak\fP(1L), \fIzipgrep\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PD .PD .\" ========================================================================= .SH URL The Info-ZIP home page is currently at \fChttp://www.info-zip.org/pub/infozip/\fR or \fCftp://ftp.info-zip.org/pub/infozip/\fR . .PD .\" ========================================================================= .SH AUTHORS Greg Roelofs was responsible for the basic modifications to UnZip necessary to create UnZipSFX. See \fIunzip\fP(1L) for the current list of Zip-Bugs authors, or the file CONTRIBS in the UnZip source distribution for the full list of Info-ZIP contributors. .PD e*[UNZIP542.MAN]ZIPGREP.1;1+, ./ 4- 70@123KPWO 56*D9a7*D9a89GHJ .\" Copyright (c) 1990-2001 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2000-Apr-09 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" zipgrep.1 by Greg Roelofs. .\" .\" ========================================================================= .\" define .Y macro (for user-command examples; normal Courier font): .de Y .ft CW .in +4n .nf \&\\$1 .ft .in .fi .. .\" ========================================================================= .TH ZIPGREP 1L "14 January 2001" "Info-ZIP" .SH NAME zipgrep \- search files in a ZIP archive for lines matching a pattern .PD .SH SYNOPSIS \fBzipgrep\fP [\fBegrep_options\fP] \fIpattern\fP \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] .PD .\" ========================================================================= .SH DESCRIPTION \fIzipgrep\fP will search files within a ZIP archive for lines matching the given string or pattern. \fIzipgrep\fP is a shell script and requires \fIegrep\fP(1) and \fIunzip\fP(1L) to function. Its output is identical to that of \fIegrep\fP(1). .PD .\" ========================================================================= .SH ARGUMENTS .TP .IP \fIpattern\fP The pattern to be located within a ZIP archive. Any string or regular expression accepted by \fIegrep\fP(1) may be used. .IR file [ .zip ] Path of the ZIP archive. (Wildcard expressions for the ZIP archive name are not supported.) If the literal filename is not found, the suffix \fC.zip\fR is appended. Note that self-extracting ZIP files are supported, as with any other ZIP archive; just specify the \fC.exe\fR suffix (if any) explicitly. .IP [\fIfile(s)\fP] An optional list of archive members to be processed, separated by spaces. If no member files are specified, all members of the ZIP archive are searched. Regular expressions (wildcards) may be used to match multiple members: .RS .IP * matches a sequence of 0 or more characters .IP ? matches exactly 1 character .IP [.\|.\|.] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything \fIexcept\fP the characters inside the brackets is considered a match). .RE .IP (Be sure to quote any character that might otherwise be interpreted or modified by the operating system.) .IP [\fB\-x\fP\ \fIxfile(s)\fP] An optional list of archive members to be excluded from processing. Since wildcard characters match directory separators (`/'), this option may be used to exclude any files that are in subdirectories. For example, ``\fCzipgrep grumpy foo *.[ch] -x */*\fR'' would search for the string ``grumpy'' in all C source files in the main directory of the ``foo'3sZC UNZIP.BCK  7[UNZIP542.MAN]ZIPGREP.1;1' archive, but none in any subdirectories. Without the \fB\-x\fP option, all C source files in all directories within the zipfile would be searched. .\" ========================================================================= .SH OPTIONS All options prior to the ZIP archive filename are passed to \fIegrep\fP(1). .PD .\" ========================================================================= .SH "SEE ALSO" \fIegrep\fP(1), \fIunzip\fP(1L), \fIzip\fP(1L), \fIfunzip\fP(1L), \fIzipcloak\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PD .\" ========================================================================= .SH URL The Info-ZIP home page is currently at \fChttp://www.info-zip.org/pub/infozip/\fR or \fCftp://ftp.info-zip.org/pub/infozip/\fR . .PD .\" ========================================================================= .SH AUTHORS \fIzipgrep\fP was written by Jean-loup Gailly. .PD *[UNZIP542.MAN]ZIPINFO.1;1+, .,/ 4,,B- 70@123KPWO-56B9a7B9a89GHJ.\" Copyright (c) 1990-2001 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2000-Apr-09 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" zipinfo.1 by Greg Roelofs and others. .\" .\" ========================================================================= .\" define .X macro (for long-line ZipInfo output examples; small Courier): .de X .ft CW .nf .ie n .ti -5 .el \{ .ti +2m .ps -1 \} \&\\$1 .ie n .ti +5 .el \{ .ti -2m .ps +1 \} .ft .fi .. .\" define .Y macro (for user-command examples; normal Courier font): .de Y .ft CW .in +4n .nf \&\\$1 .ft .in .fi .. .\" ========================================================================= .TH ZIPINFO 1L "14 January 2001 (v2.32)" "Info-ZIP" .SH NAME zipinfo \- list detailed information about a ZIP archive .PD .SH SYNOPSIS \fBzipinfo\fP [\fB\-12smlvhMtTz\fP] \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] .PP \fBunzip\fP \fB\-Z\fP [\fB\-12smlvhMtTz\fP] \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] .PD .\" ========================================================================= .SH DESCRIPTION \fIzipinfo\fP lists technical information about files in a ZIP archive, most commonly found on MS-DOS systems. Such information includes file access permissions, encryption status, type of compression, version and operating system or file system of compressing program, and the like. The default behavior (with no options) is to list single-line entries for each file in the archive, with header and trailer lines providing summary information for the entire archive. The format is a cross between Unix ``\fCls \-l\fR'' and ``\fCunzip \-v\fR'' output. See .B "DETAILED DESCRIPTION" below. Note that \fIzipinfo\fP is the same program as \fIunzip\fP (under Unix, a link to it); on some systems, however, \fIzipinfo\fP support may have been omitted when \fIunzip\fP was compiled. .PD .\" ========================================================================= .SH ARGUMENTS .TP .IR file [ .zip ] Path of the ZIP archive(s). If the file specification is a wildcard, each matching file is processed in an order determined by the operating system (or file system). Only the filename can be a wildcard; the path itself cannot. Wildcard expressions are similar to Unix \fIegrep\fP(1) (regular) expressions and may contain: .RS .IP * matches a sequence of 0 or more characters .IP ? matches exactly 1 character .IP [.\|.\|.] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything \fIexcept\fP the characters inside the brackets is considered a match). .RE .IP (Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) If no matches are found, the specification is assumed to be a literal filename; and if that also fails, the suffix \fC.zip\fR is appended. Note that self-extracting ZIP files are supported; just specify the \fC.exe\fR suffix (if any) explicitly. .IP [\fIfile(s)\fP] An optional list of archive members to be processed. Regular expressions (wildcards) may be used to match multiple members; see above. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system. .IP [\fB\-x\fP\ \fIxfile(s)\fP] An optional list of archive members to be excluded from processing. .\" ========================================================================= .SH OPTIONS .TP .B \-1 list filenames only, one per line. This option excludes all others; headers, trailers and zipfile comments are never printed. It is intended for use in Unix shell scripts. .TP .B \-2 list filenames only, one per line, but allow headers (\fB\-h\fP), trailers (\fB\-t\fP) and zipfile comments (\fB\-z\fP), as well. This option may be useful in cases where the stored filenames are particularly long. .TP .B \-s list zipfile info in short Unix ``\fCls \-l\fR'' format. This is the default behavior; see below. .TP .B \-m list zipfile info in medium Unix ``\fCls \-l\fR'' format. Identical to the \fB\-s\fP output, except that the compression factor, expressed as a percentage, is also listed. .TP .B \-l list zipfile info in long Unix ``\fCls \-l\fR'' format. As with \fB\-m\fP except that the compressed size (in bytes) is printed instead of the compression ratio. .TP .B \-v list zipfile information in verbose, multi-page format. .TP .B \-h list header line. The archive name, actual size (in bytes) and total number of files is printed. .TP .B \-M pipe all output through an internal pager similar to the Unix \fImore\fP(1) command. At the end of a screenful of output, \fIzipinfo\fP pauses with a ``\-\-More\-\-'' prompt; the next screenful may be viewed by pressing the Enter (Return) key or the space bar. \fIzipinfo\fP can be terminated by pressing the ``q'' key and, on some systems, the Enter/Return key. Unlike Unix \fImore\fP(1), there is no forward-searching or editing capability. Also, \fIzipinfo\fP doesn't notice if long lines wrap at the edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case \fIzipinfo\fP assumes the height is 24 lines. .TP .B \-t list totals for files listed or for all files. The number of files listed, their uncompressed and compressed total sizes, and their overall compression factor is printed; or, if only the totals line is being printed, the values for the entire archive are given. Note that the total compressed (data) size will never match the actual zipfile size,44'! k|B 1DtT6=Iqa>UrD if,)s#n`Waf5f,%/f$Tv*+>J6" :l/]N*7=9JWdOw*pDy\* P0|0ab^2jvafNT ZABu+UcQ6ixX1:Bc, R>W-VCz'Z6w)F8{_z)H1 RcQ%G3N9qh`N*/} 7kne]h=QUimRWd/E@K;DB/vo`oQwX>"m: O8{Ujzc>%zaIxp}IW]N, ]gW1jB\Xx};^bxB.kS=SV@D>@!5:p=v9S5+BNM`I0|zwQb>+X@|WW_\}a0U7K\x&e+R%'L>;vD>}t2~0 %z Pi:yIpgA*aV] _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N#T +(abrBY7^UV|pd^V&)(.V)DSY!?H6C Q F* ~rc'izNPEpT{4&kDY;Au~_fj~M=oQ>Y_6p#FJs\SoxIya {N}mk?q @qsF) ?[v URb*Qd}qNH>gqt3bDR*3g:dJ4D.5Ku5KOJE ;}Oj$/P!b[w,0twQ/PM;)/XDe]^#*e#~a9c(m-o6?+ ^G,* + W 48MMYDE*}cy8gBI|Yf$BG{F6(N x y;d{kPjK`M**Itv*3n izRU}qd/-gG%k-0h` b<)V?|~,tm#+7z%1ru012udsc-a!zh}kbe,:|2~~~#x naV>cE*cw^Fq(td..}`:tD;Tk.*dvfs{[f+y#> q-z=mBk3BB L]P.Mj}*dS9{2)R17qrePJ@Ss@(!e.&&'`0.Z+s92&JaP00#m)cB/]O,=3c~K!-\4mzwS TGkM8pe7 U 5}P UNZIP.BCK  7[UNZIP542.MAN]ZIPINFO.1;1,t since the latter includes all of the internal zipfile headers in addition to the compressed data. .TP .B \-T print the file dates and times in a sortable decimal format (yymmdd.hhmmss). The default date format is a more standard, human-readable version with abbreviated month names (see examples below). .TP .B \-z include the archive comment (if any) in the listing. .PD .\" ========================================================================= .SH "DETAILED DESCRIPTION" .I zipinfo has a number of modes, and its behavior can be rather difficult to fathom if one isn't familiar with Unix \fIls\fP(1) (or even if one is). The default behavior is to list files in the following format: .PP .X "-rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660" .PP The last three fields are the modification date and time of the file, and its name. The case of the filename is respected; thus files that come from MS-DOS PKZIP are always capitalized. If the file was zipped with a stored directory name, that is also displayed as part of the filename. .PP The second and third fields indicate that the file was zipped under Unix with version 1.9 of \fIzip\fP. Since it comes from Unix, the file permissions at the beginning of the line are printed in Unix format. The uncompressed file-size (2802 in this example) is the fourth field. .PP The fifth field consists of two characters, either of which may take on several values. The first character may be either `t' or `b', indicating that \fIzip\fP believes the file to be text or binary, respectively; but if the file is encrypted, \fIzipinfo\fP notes this fact by capitalizing the character (`T' or `B'). The second character may also take on four values, depending on whether there is an extended local header and/or an ``extra field'' associated with the file (fully explained in PKWare's APPNOTE.TXT, but basically analogous to pragmas in ANSI C--i.e., they provide a standard way to include non-standard information in the archive). If neither exists, the character will be a hyphen (`\-'); if there is an extended local header but no extra field, `l'; if the reverse, `x'; and if both exist, `X'. Thus the file in this example is (probably) a text file, is not encrypted, and has neither an extra field nor an extended local header associated with it. The example below, on the other hand, is an encrypted binary file with an extra field: .PP .X "RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644" .PP Extra fields are used for various purposes (see discussion of the \fB\-v\fP option below) including the storage of VMS file attributes, which is presumably the case here. Note that the file attributes are listed in VMS format. Some other possibilities for the host operating system (which is actually a misnomer--host file system is more correct) include OS/2 or NT with High Performance File System (HPFS), MS-DOS, OS/2 or NT with File Allocation Table (FAT) file system, and Macintosh. These are denoted as follows: .PP .X "-rw-a-- 1.0 hpf 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs" .X "-r--ahs 1.1 fat 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF" .X "--w------- 1.0 mac 17357 bx i8:2 4-May-92 04:02 unzip.macr" .PP File attributes in the first two cases are indicated in a Unix-like format, where the seven subfields indicate whether the file: (1) is a directory, (2) is readable (always true), (3) is writable, (4) is executable (guessed on the basis of the extension--\fI.exe\fP, \fI.com\fP, \fI.bat\fP, \fI.cmd\fP and \fI.btm\fP files are assumed to be so), (5) has its archive bit set, (6) is hidden, and (7) is a system file. Interpretation of Macintosh file attributes is unreliable because some Macintosh archivers don't store any attributes in the archive. .PP Finally, the sixth field indicates the compression method and possible sub-method used. There are six methods known at present: storing (no compression), reducing, shrinking, imploding, tokenizing (never publicly released), and deflating. In addition, there are four levels of reducing (1 through 4); four types of imploding (4K or 8K sliding dictionary, and 2 or 3 Shannon-Fano trees); and four levels of deflating (superfast, fast, normal, maximum compression). \fIzipinfo\fP represents these methods and their sub-methods as follows: \fIstor\fP; \fIre:1\fP, \fIre:2\fP, etc.; \fIshrk\fP; \fIi4:2\fP, \fIi8:3\fP, etc.; \fItokn\fP; and \fIdefS\fP, \fIdefF\fP, \fIdefN\fP, and \fIdefX\fP. .PP The medium and long listings are almost identical to the short format except that they add information on the file's compression. The medium format lists the file's compression factor as a percentage indicating the amount of space that has been ``removed'': .PP .X "-rw-rws--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660" .PP In this example, the file has been compressed by more than a factor of five; the compressed data are only 19% of the original size. The long format gives the compressed file's size in bytes, instead: .PP .X "-rw-rws--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660" .PP Adding the \fB\-T\fP option changes the file date and time to decimal format: .PP .X "-rw-rws--- 1.5 unx 2802 t- 538 defX 910811.134804 perms.2660" .PP Note that because of limitations in the MS-DOS format used to store file times, the seconds field is always rounded to the nearest even second. For Unix files this is expected to change in the next major releases of \fIzip\fP(1L) and \fIunzip\fP. .PP In addition to individual file information, a default zipfile listing also includes header and trailer lines: .PP .X "Archive: OS2.zip 5453 bytes 5 files" .X ",,rw, 1.0 hpf 730 b- i4:3 26-Jun-92 23:40 Contents" .X ",,rw, 1.0 hpf 3710 b- i4:3 26-Jun-92 23:33 makefile.os2" .X ",,rw, 1.0 hpf 8753 b- i8:3 26-Jun-92 15:29 os2unzip.c" .X ",,rw, 1.0 hpf 98 b- stor 21-Aug-91 15:34 unzip.def" .X ",,rw, 1.0 hpf 95 b- stor 21-Aug-91 17:51 zipinfo.def" .X "5 files, 13386 bytes uncompressed, 4951 bytes compressed: 63.0%" .PP The header line gives the name of the archive, its total size, and the total number of files; the trailer gives the number of files listed, their total uncompressed size, and their total compressed size (not including any of \fIzip\fP's internal overhead). If, however, one or more \fIfile(s)\fP are provided, the header and trailer lines are not listed. This behavior is also similar to that of Unix's ``\fCls \-l\fR''; it may be overridden by specifying the \fB\-h\fP and \fB\-t\fP options explicitly. In such a case the listing format must also be specified explicitly, since \fB\-h\fP or \fB\-t\fP (or both) in the absence of other options implies that ONLY the header or trailer line (or both) is listed. See the \fBEXAMPLES\fP section below for a semi-intelligible translation of this nonsense. .PP The verbose listing is mostly self-explanatory. It also lists file comments and the zipfile comment, if any, and the type and number of bytes in any stored extra fields. Currently known types of extra fields include PKWARE's authentication (``AV'') info; OS/2 extended attributes; VMS filesystem info, both PKWARE and Info-ZIP versions; Macintosh resource forks; Acorn/Archimedes SparkFS info; and so on. (Note that in the case of OS/2 extended attributes--perhaps the most common use of zipfile extra fields--the size of the stored EAs as reported by \fIzipinfo\fP may not match the number given by OS/2's \fIdir\fP command: OS/2 always reports the number of bytes required in 16-bit format, whereas \fIzipinfo\fP always reports the 32-bit storage.) .PD .\" ========================6w UNZIP.BCK  7[UNZIP542.MAN]ZIPINFO.1;1, ================================================= .SH "ENVIRONMENT OPTIONS" Modifying \fIzipinfo\fP's default behavior via options placed in an environment variable can be a bit complicated to explain, due to \fIzipinfo\fP's attempts to handle various defaults in an intuitive, yet Unix-like, manner. (Try not to laugh.) Nevertheless, there is some underlying logic. In brief, there are three ``priority levels'' of options: the default options; environment options, which can override or add to the defaults; and explicit options given by the user, which can override or add to either of the above. .PP The default listing format, as noted above, corresponds roughly to the "\fCzipinfo \-hst\fR" command (except when individual zipfile members are specified). A user who prefers the long-listing format (\fB\-l\fP) can make use of the \fIzipinfo\fP's environment variable to change this default: .PP .DT .ft CW .in +4n .ta \w'ZIPINFO=\-l; export ZIPINFO'u+4n .in .ft .PD 0 .Y "ZIPINFO=\-l; export ZIPINFO\t\fRUnix Bourne shell" .Y "setenv ZIPINFO \-l\t\fRUnix C shell" .Y "set ZIPINFO=\-l\t\fROS/2 or MS-DOS" .Y "define ZIPINFO_OPTS ""\-l""\t\fRVMS (quotes for \fIlowercase\fP)" .PD .PP If, in addition, the user dislikes the trailer line, \fIzipinfo\fP's concept of ``negative options'' may be used to override the default inclusion of the line. This is accomplished by preceding the undesired option with one or more minuses: e.g., ``\fC\-l\-t\fR'' or ``\fC\-\-tl\fR'', in this example. The first hyphen is the regular switch character, but the one before the `t' is a minus sign. The dual use of hyphens may seem a little awkward, but it's reasonably intuitive nonetheless: simply ignore the first hyphen and go from there. It is also consistent with the behavior of the Unix command \fInice\fP(1). .PP As suggested above, the default variable names are ZIPINFO_OPTS for VMS (where the symbol used to install \fIzipinfo\fP as a foreign command would otherwise be confused with the environment variable), and ZIPINFO for all other operating systems. For compatibility with \fIzip\fP(1L), ZIPINFOOPT is also accepted (don't ask). If both ZIPINFO and ZIPINFOOPT are defined, however, ZIPINFO takes precedence. \fIunzip\fP's diagnostic option (\fB\-v\fP with no zipfile name) can be used to check the values of all four possible \fIunzip\fP and \fIzipinfo\fP environment variables. .PD .\" ========================================================================= .SH EXAMPLES To get a basic, short-format listing of the complete contents of a ZIP archive \fIstorage.zip\fP, with both header and totals lines, use only the archive name as an argument to zipinfo: .PP .Y "zipinfo storage" .PP To produce a basic, long-format listing (not verbose), including header and totals lines, use \fB\-l\fP: .PP .Y "zipinfo \-l storage" .PP To list the complete contents of the archive without header and totals lines, either negate the \fB\-h\fP and \fB\-t\fP options or else specify the contents explicitly: .PP .PD 0 .Y "zipinfo \-\-h\-t storage" .Y "zipinfo storage "\e*" .PD .PP (where the backslash is required only if the shell would otherwise expand the `*' wildcard, as in Unix when globbing is turned on--double quotes around the asterisk would have worked as well). To turn off the totals line by default, use the environment variable (C shell is assumed here): .PP .PD 0 .Y "setenv ZIPINFO \-\-t" .Y "zipinfo storage" .PD .PP To get the full, short-format listing of the first example again, given that the environment variable is set as in the previous example, it is necessary to specify the \fB\-s\fP option explicitly, since the \fB\-t\fP option by itself implies that ONLY the footer line is to be printed: .PP .PD 0 .Y "setenv ZIPINFO \-\-t" .Y "zipinfo \-t storage\t\fR[only totals line]" .Y "zipinfo \-st storage\t\fR[full listing]" .PD .PP The \fB\-s\fP option, like \fB\-m\fP and \fB\-l\fP, includes headers and footers by default, unless otherwise specified. Since the environment variable specified no footers and that has a higher precedence than the default behavior of \fB\-s\fP, an explicit \fB\-t\fP option was necessary to produce the full listing. Nothing was indicated about the header, however, so the \fB\-s\fP option was sufficient. Note that both the \fB\-h\fP and \fB\-t\fP options, when used by themselves or with each other, override any default listing of member files; only the header and/or footer are printed. This behavior is useful when \fIzipinfo\fP is used with a wildcard zipfile specification; the contents of all zipfiles are then summarized with a single command. .PP To list information on a single file within the archive, in medium format, specify the filename explicitly: .PP .Y "zipinfo \-m storage unshrink.c" .PP The specification of any member file, as in this example, will override the default header and totals lines; only the single line of information about the requested file will be printed. This is intuitively what one would expect when requesting information about a single file. For multiple files, it is often useful to know the total compressed and uncompressed size; in such cases \fB\-t\fP may be specified explicitly: .PP .Y "zipinfo \-mt storage ""*.[ch]"" Mak\e*" .PP To get maximal information about the ZIP archive, use the verbose option. It is usually wise to pipe the output into a filter such as Unix \fImore\fP(1) if the operating system allows it: .PP .Y "zipinfo \-v storage | more" .PP Finally, to see the most recently modified files in the archive, use the \fB\-T\fP option in conjunction with an external sorting utility such as Unix \fIsort\fP(1) (and \fItail\fP(1) as well, in this example): .PP .Y "zipinfo \-T storage | sort -n +6 | tail -15" .PP The \fB\-n\fP option to \fIsort\fP(1) tells it to sort numerically rather than in ASCII order, and the \fB\+6\fP option tells it to sort on the sixth field after the first one (i.e., the seventh field). This assumes the default short-listing format; if \fB\-m\fP or \fB\-l\fP is used, the proper \fIsort\fP(1) option would be \fB\+7\fP. The \fItail\fP(1) command filters out all but the last 15 lines of the listing. Future releases of \fIzipinfo\fP may incorporate date/time and filename sorting as built-in options. .PD .\" ========================================================================= .SH TIPS The author finds it convenient to define an alias \fIii\fP for \fIzipinfo\fP on systems that allow aliases (or, on other systems, copy/rename the executable, create a link or create a command file with the name \fIii\fP). The \fIii\fP usage parallels the common \fIll\fP alias for long listings in Unix, and the similarity between the outputs of the two commands was intentional. .PD .\" ========================================================================= .SH BUGS As with \fIunzip\fP, \fIzipinfo\fP's \fB\-M\fP (``more'') option is overly simplistic in its handling of screen output; as noted above, it fails to detect the wrapping of long lines and may thereby cause lines at the top of the screen to be scrolled off before being read. \fIzipinfo\fP should detect and treat each occurrence of line-wrap as one additional line printed. This requires knowledge of the screen's width as well as its height. In addition, \fIzipinfo\fP should detect the true screen geometry on all systems. .PP \fIzipinfo\fP's listing-format behavior is unnecessarily complex and should be simplified. (This is not to say that it will be.) .PP .\" ========================================================================= .SH "SEE ALSO" \fIls\fP(1), \fIfunzip\fP(1L), \fIunzip\fP(1L), \fIunzipsfx\fP(1L), \fIzip\fP(1L), \fIzipc7( UNZIP.BCK  7[UNZIP542.MAN]ZIPINFO.1;1,+loak\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PD .\" ========================================================================= .SH URL The Info-ZIP home page is currently at \fChttp://www.info-zip.org/pub/infozip/\fR or \fCftp://ftp.info-zip.org/pub/infozip/\fR . .PD .\" ========================================================================= .SH AUTHOR Greg ``Cave Newt'' Roelofs. ZipInfo contains pattern-matching code by Mark Adler and fixes/improvements by many others. Please refer to the CONTRIBS file in the UnZip source distribution for a more complete list. *[UNZIP542]MATCH.C;1+, ./ 4- 0@123KPWO56Dtr7Dtr89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- match.c The match() routine recursively compares a string to a "pattern" (regular expression), returning TRUE if a match is found or FALSE if not. This version is specifically for use with unzip.c: as did the previous match() routines from SEA and J. Kercheval, it leaves the case (upper, lower, or mixed) of the string alone, but converts any uppercase characters in the pattern to lowercase if indicated by the global var pInfo->lcflag (which is to say, string is assumed to have been converted to lowercase already, if such was necessary). GRR: reversed order of text, pattern in matche() (now same as match()); added ignore_case/ic flags, Case() macro. PaulK: replaced matche() with recmatch() from Zip, modified to have an ignore_case argument; replaced test frame with simpler one. --------------------------------------------------------------------------- Copyright on recmatch() from Zip's util.c (although recmatch() was almost certainly written by Mark Adler...ask me how I can tell :-) ): Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly, Kai Uwe Rommel and Igor Mandrichenko. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as all of the original files are included unmodified, that it is not sold for profit, and that this copy- right notice is retained. --------------------------------------------------------------------------- Match the pattern (wildcard) against the string (fixed): match(string, pattern, ignore_case); returns TRUE if string matches pattern, FALSE otherwise. In the pattern: `*' matches any sequence of characters (zero or more) `?' matches any single character [SET] matches any character in the specified set, [!SET] or [^SET] matches any character not in the specified set. A set is composed of characters or ranges; a range looks like ``character hyphen character'' (as in 0-9 or A-Z). [0-9a-zA-Z_] is the minimal set of characters allowed in the [..] pattern construct. Other characters are allowed (i.e., 8-bit characters) if your system will support them. To suppress the special syntactic significance of any of ``[]*?!^-\'', in- side or outside a [..] construct, and match the character exactly, precede it with a ``\'' (backslash). Note that "*.*" and "*." are treated specially under MS-DOS if DOSWILD is defined. See the DOSWILD section below for an explanation. Note also that with VMSWILD defined, '%' is used instead of '?', and sets (ranges) are delimited by () instead of []. ---------------------------------------------------------------------------*/ #define __MATCH_C /* identifies this source module */ /* define ToLower() in here (for Unix, define ToLower to be macro (using * isupper()); otherwise just use tolower() */ #define UNZIP_INTERNAL #include "unzip.h" #ifndef THEOS /* the Theos port defines its own variant of match() */ #if 0 /* this is not useful until it matches Amiga names insensitively */ #ifdef AMIGA /* some other platforms might also want to use this */ # define ANSI_CHARSET /* MOVE INTO UNZIP.H EVENTUALLY */ #endif #endif /* 0 */ #ifdef ANSI_CHARSET # ifdef ToLower # undef ToLower # endif /* uppercase letters are values 41 thru 5A, C0 thru D6, and D8 thru DE */ # define IsUpper(c) (c>=0xC0 ? c<=0xDE && c!=0xD7 : c>=0x41 && c<=0x5A) # define ToLower(c) (IsUpper((uch) c) ? (unsigned) c | 0x20 : (unsigned) c) #endif #define Case(x) (ic? ToLower(x) : (x)) #ifdef VMSWILD # define WILDCHAR '%' # define BEG_RANGE '(' # define END_RANGE ')' #else # define WILDCHAR '?' # define BEG_RANGE '[' # define END_RANGE ']' #endif #if 0 /* GRR: add this to unzip.h someday... */ #if !(defined(MSDOS) && defined(DOSWILD)) #define match(s,p,ic) (recmatch((ZCONST uch *)p,(ZCONST uch *)s,ic) == 1) int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, int ignore_case)); #endif #endif /* 0 */ static int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, int ignore_case)); /* match() is a shell to recmatch() to return only Boolean values. */ int match(string, pattern, ignore_case) ZCONST char *string, *pattern; int ignore_case; { #if (defined(MSDOS) && defined(DOSWILD)) char *dospattern; int j = strlen(pattern); /*--------------------------------------------------------------------------- Optional MS-DOS preprocessing section: compare last three chars of the wildcard to "*.*" and translate to "*" if found; else compare the last two characters to "*." and, if found, scan the non-wild string for dots. If in the latter case a dot is found, return failure; else translate the "*." to "*". In either case, continue with the normal (Unix-like) match procedure after translation. (If not enough memory, default to normal match.) This causes "a*.*" and "a*." to behave as MS-DOS users expect. ---------------------------------------------------------------------------*/ if ((dospattern = (char *)malloc(j+1)) != NULL) { strcpy(dospattern, pattern); if (!strcmp(dospattern+j-3, "*.*")) { dospattern[j-2] = '\0'; /* nuke the ".*" */ } else if (!strcmp(dospattern+j-2, "*.")) { char *p = MBSCHR(string, '.'); if (p) { /* found a dot: match fails */ free(dospattern); return 0; } dospattern[j-1] = '\0'; /* nuke the end "." */ } j = recmatch((uch *)dospattern, (uch8 UNZIP.BCK  [UNZIP542]MATCH.C;1;1 *)string, ignore_case); free(dospattern); return j == 1; } else #endif /* MSDOS && DOSWILD */ return recmatch((uch *)pattern, (uch *)string, ignore_case) == 1; } static int recmatch(p, s, ic) ZCONST uch *p; /* sh pattern to match */ ZCONST uch *s; /* string to which to match it */ int ic; /* true for case insensitivity */ /* Recursively compare the sh pattern p with the string s and return 1 if * they match, and 0 or 2 if they don't or if there is a syntax error in the * pattern. This routine recurses on itself no more deeply than the number * of characters in the pattern. */ { unsigned int c; /* pattern char or start of range in [-] loop */ /* Get first character, the pattern for new recmatch calls follows */ c = *p; INCSTR(p); /* If that was the end of the pattern, match if string empty too */ if (c == 0) return *s == 0; /* '?' (or '%') matches any character (but not an empty string). * If WILD_STOP_AT_DIR is defined, it won't match '/' */ if (c == WILDCHAR) #ifdef WILD_STOP_AT_DIR return (*s && *s != '/') ? recmatch(p, s + CLEN(s), ic) : 0; #else return *s ? recmatch(p, s + CLEN(s), ic) : 0; #endif /* '*' matches any number of characters, including zero */ #ifdef AMIGA if (c == '#' && *p == '?') /* "#?" is Amiga-ese for "*" */ c = '*', p++; #endif /* AMIGA */ if (c == '*') { #ifdef WILD_STOP_AT_DIR # ifdef AMIGA if ((c = p[0]) == '#' && p[1] == '?') /* "#?" is Amiga-ese for "*" */ c = '*', p++; if (c == '*') { # else /* !AMIGA */ if (*p == '*') { # endif /* ?AMIGA */ /* '**': this matches slashes */ if (*++p == 0) return 1; for (; *s; INCSTR(s)) if ((c = recmatch(p, s, ic)) != 0) return (int)c; return 2; /* 2 means give up--match will return false */ } /* '*': this doesn't match slashes */ for (; *s && *s != '/'; INCSTR(s)) if ((c = recmatch(p, s, ic)) != 0) return (int)c; /* end of pattern: matched if at end of string, else continue */ if (*p == 0) return (*s == 0); /* continue to match if at '/' in pattern, else give up */ return (*p == '/' || (*p == '\\' && p[1] == '/')) ? recmatch(p, s, ic) : 2; #else /* !WILD_STOP_AT_DIR */ if (*p == 0) return 1; for (; *s; INCSTR(s)) if ((c = recmatch(p, s, ic)) != 0) return (int)c; return 2; /* 2 means give up--match will return false */ #endif /* ?WILD_STOP_AT_DIR */ } /* Parse and process the list of characters and ranges in brackets */ if (c == BEG_RANGE) { int e; /* flag true if next char to be taken literally */ ZCONST uch *q; /* pointer to end of [-] group */ int r; /* flag true to match anything but the range */ if (*s == 0) /* need a character to match */ return 0; p += (r = (*p == '!' || *p == '^')); /* see if reverse */ for (q = p, e = 0; *q; INCSTR(q)) /* find closing bracket */ if (e) e = 0; else if (*q == '\\') /* GRR: change to ^ for MS-DOS, OS/2? */ e = 1; else if (*q == END_RANGE) break; if (*q != END_RANGE) /* nothing matches if bad syntax */ return 0; for (c = 0, e = (*p == '-'); p < q; INCSTR(p)) { /* go through the list */ if (!e && *p == '\\') /* set escape flag if \ */ e = 1; else if (!e && *p == '-') /* set start of range if - */ c = *(p-1); else { unsigned int cc = Case(*s); if (*(p+1) != '-') for (c = c ? c : *p; c <= *p; c++) /* compare range */ if ((unsigned)Case(c) == cc) /* typecast for MSC bug */ return r ? 0 : recmatch(q + 1, s + 1, ic); c = e = 0; /* clear range, escape flags */ } } return r ? recmatch(q + CLEN(q), s + CLEN(s), ic) : 0; /* bracket match failed */ } /* if escape ('\'), just compare next character */ if (c == '\\' && (c = *p++) == 0) /* if \ at end, then syntax error */ return 0; /* just a character--compare it */ #ifdef QDOS return QMatch(Case((uch)c), Case(*s)) ? recmatch(p, s + CLEN(s), ic) : 0; #else return Case((uch)c) == Case(*s) ? recmatch(p, s + CLEN(s), ic) : 0; #endif } /* end function recmatch() */ #endif /* !THEOS */ int iswild(p) /* originally only used for stat()-bug workaround in */ ZCONST char *p; /* VAX C, Turbo/Borland C, Watcom C, Atari MiNT libs; */ { /* now used in process_zipfiles() as well */ for (; *p; INCSTR(p)) if (*p == '\\' && *(p+1)) ++p; #ifdef THEOS else if (*p == '?' || *p == '*' || *p=='#'|| *p == '@') #else /* !THEOS */ #ifdef VMS else if (*p == '%' || *p == '*') #else /* !VMS */ #ifdef AMIGA else if (*p == '?' || *p == '*' || (*p=='#' && p[1]=='?') || *p == '[') #else /* !AMIGA */ else if (*p == '?' || *p == '*' || *p == '[') #endif /* ?AMIGA */ #endif /* ?VMS */ #endif /* ?THEOS */ #ifdef QDOS return (int)p; #else return TRUE; #endif return FALSE; } /* end function iswild() */ #ifdef TEST_MATCH #define put(s) {fputs(s,stdout); fflush(stdout);} #ifdef main # undef main #endif int main(int argc, char **argv) { char pat[256], str[256]; for (;;) { put("Pattern (return to exit): "); gets(pat); if (!pat[0]) break; for (;;) { put("String (return for new pattern): "); gets(str); if (!str[0]) break; printf("Case sensitive: %s insensitive: %s\n", match(str, pat, 0) ? "YES" : "NO", match(str, pat, 1) ? "YES" : "NO"); } } EXIT(0); } #endif /* TEST_MATCH */ *[UNZIP542]MSDOS.DIR;1+,j $./ 4- 0123 KPWO56j/!a7j/!a89GHJI CONTENTS. CRC_I86.ASMDOSCFG.H MAKEFILE.BC- MAKEFILE.DJ1 MAKEFILE.DJ2 MAKEFILE.EMX+ MAKEFILE.MSC MAKEFILE.TC% MAKEFILE.WAT% MSC51OPT.DIFMSDOS.C%README.*[UNZIP542.MSDOS]CONTENTS.;1+,./ 4-j $0@123KPWO56789GHJ9?4 UNZIP.BCKj $NZIP542.MSDOS]CONTENTS.;1bContents of the "msdos" subdirectory for UnZip 5.3 and later: Contents this file README notes about quirks in MS-DOS executables and compilers crc_i86.asm optimized 8086/80286 assembler version of generic crc32.c doscfg.h OS-dependent configuration, included by unzpriv.h msdos.c OS-dependent UnZip routines for MS-DOS makefile.bc makefile for Borland C++ and Turbo C++ makefile.msc makefile for Microsoft C and make or nmake makefile.tc makefile for Turbo C and make makefile.wat makefile for Watcom C makefile.dj1 makefile for GNU C, djgpp v1.12m4 port makefile.dj2 makefile for GNU C, djgpp v2.x port makefile.emx makefile for GNU C, emx 0.9c port, gnu make Notes: (1) Two makefiles for djgpp/GNU make are provided, one for djgpp 1.12 and one for djgpp v2.x. In addition, the Unix makefile (unix/Makefile) contains a djgpp v2.x target using the go32-gcc cross compiler on Linux. Read the appropriate makefile sections for details. (2) The makefile for emx+gcc has been used with GNU Make ports from DJGPP and the GNUish MS-DOS project. Other make utilities may work, too. The resulting executables require emx.exe or rsx.exe to run (akin to djgpp 1.x's go32.exe). (3) The OS/2 makefile includes several (cross compilation ?) targets to generate MS-DOS executables which can be used with MSC 6.0 or later (`mscdos', 16-bit), Watcom C/C++ 9.0 or later (`watcom16dos', 16-bit; `watcomdos' and `pmodew', 32-bit) and emx+gcc 0.9c or later (`gccdos', 32-bit). These targets have only been tested in cross-compilation from OS/2 to MS-DOS, but they may work on a plain MS-DOS system, when a proper make utility is available. *[UNZIP542.MSDOS]CRC_I86.ASM;1+,./ 4@-j $0@123KPWO56H5z7H5z89GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in zip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; Created by Christian Spieler, last modified 24 Dec 1998. ; TITLE crc_i86.asm NAME crc_i86 ; ; Optimized 8086 assembler version of the CRC32 calculation loop, intended ; for real mode Info-ZIP programs (Zip 2.1, UnZip 5.2, and later versions). ; Supported compilers are Microsoft C (DOS real mode) and Borland C(++) ; (Turbo C). Watcom C (16bit) should also work. ; This module was inspired by a similar module for the Amiga (Paul Kienitz). ; ; It replaces the `ulg crc32(ulg crc, ZCONST uch *buf, extent len)' function ; in crc32.c. ; ; In March/April 1997, the code has been revised to incorporate Rodney Brown's ; ideas for optimized access to the data buffer. For 8086 real mode code, ; the data buffer is now accessed by aligned word-wide read operations. ; This new optimization may be turned off by defining the macro switch ; NO_16_BIT_LOADS. ; ; In December 1998, the loop branch commands were changed from "loop dest" ; into "dec cx; jnz dest". On modern systems (486 and newer), the latter ; code is usually much faster (e.g. 1 clock cycle compared to 5 for "loop" ; on Pentium MMX). For the 286, the penalty of "dec cx; jnz" is one clock ; cycle (12 vs. 11 cycles); on an 8088 the cycle counts are 22 (dec cx; jnz) ; vs. 18 (loop). I decided to optimize for newer CPU models by default, because ; I expect that old 80286 or 8088 dinosaurier machines may be rarely used ; nowadays. In case you want optimum performance for these old CPU models ; you should define the OPTIMIZE_286_88 macro switch on the assembler's ; command line. ; Likewise, "jcxz" was replaced by "jz", because the latter is faster on ; 486 and newer CPUs (without any penalty on 80286 and older CPU models). ; ; The code in this module should work with all kinds of C memory models ; (except Borland's __HUGE__ model), as long as the following ; restrictions are not violated: ; ; - The implementation assumes that the char buffer is confined to a ; 64k segment. The pointer `s' to the buffer must be in a format that ; all bytes can be accessed by manipulating the offset part, only. ; This means: ; + no huge pointers ; + char buffer size < 64 kByte ; ; - Since the buffer size argument `n' is of type `size_t' (= unsigned short) ; for this routine, the char buffer size is limited to less than 64 kByte, ; anyway. So, the assumption above should be easily fulfilled. ; ;============================================================================== ; ; Do NOT assemble this source if external crc32 routine from zlib gets used. ; ifndef USE_ZLIB ; ; Setup of amount of assemble time informational messages: ; ifdef DEBUG VERBOSE_INFO EQU 1 else ifdef _AS_MSG_ VERBOSE_INFO EQU 1 else VERBOSE_INFO EQU 0 endif endif ; ; Selection of memory model, and initialization of memory model ; related macros: ; ifndef __SMALL__ ifndef __COMPACT__ ifndef __MEDIUM__ ifndef __LARGE__ ifndef __HUGE__ ; __SMALL__ EQU 1 endif endif endif endif endif ifdef __HUGE__ ; .MODEL Huge @CodeSize EQU 1 @DataSize EQU 1 Save_DS EQU 1 if VERBOSE_INFO if1 %out Assembling for C, Huge memory model endif endif else ifdef __LARGE__ ; .MODEL Large @CodeSize EQU 1 @DataSize EQU 1 if VERBOSE_INFO if1 %out Assembling for C, Large memory model endif endif else ifdef __COMPACT__ ; .MODEL Compact @CodeSize EQU 0 @DataSize EQU 1 if VERBOSE_INFO if1 %out Assembling for C, Compact memory model endif endif else ifdef __MEDIUM__ ; .MODEL Medium @CodeSize EQU 1 @DataSize EQU 0 if VERBOSE_INFO if1 %out Assembling for C, Medium memory model endif endif else ; .MODEL Small @CodeSize EQU 0 @DataSize EQU 0 if VERBOSE_INFO if1 %out Assembling for C, Small memory model endif endif endif endif endif endif if @CodeSize LCOD_OFS EQU 2 else LCOD_OFS EQU 0 endif IF @DataSize LDAT_OFS EQU 2 else LDAT_OFS EQU 0 endif ifdef Save_DS ; (di,si,ds)+(size, return address) SAVE_REGS EQU 6+(4+LCOD_OFS) else ; (di,si)+(size, return address) SAVE_REGS EQU 4+(4+LCOD_OFS) endif ; ; Selection of the:hc UNZIP.BCKj $[UNZIP542.MSDOS]CRC_I86.ASM;1  supported CPU instruction set and initialization ; of CPU type related macros: ; ifdef __586 Use_286_code EQU 1 Align_Size EQU 4 ; dword alignment on Pentium Alig_PARA EQU 1 ; paragraph aligned code segment else ifdef __486 Use_286_code EQU 1 Align_Size EQU 4 ; dword alignment on 32 bit processors Alig_PARA EQU 1 ; paragraph aligned code segment else ifdef __386 Use_286_code EQU 1 Align_Size EQU 4 ; dword alignment on 32 bit processors Alig_PARA EQU 1 ; paragraph aligned code segment else ifdef __286 Use_286_code EQU 1 Align_Size EQU 2 ; word alignment on 16 bit processors Alig_PARA EQU 0 ; word aligned code segment else ifdef __186 Use_186_code EQU 1 Align_Size EQU 2 ; word alignment on 16 bit processors Alig_PARA EQU 0 ; word aligned code segment else Align_Size EQU 2 ; word alignment on 16 bit processors Alig_PARA EQU 0 ; word aligned code segment endif ;?__186 endif ;?__286 endif ;?__386 endif ;?__486 endif ;?__586 ifdef Use_286_code .286 Have_80x86 EQU 1 else ifdef Use_186_code .186 Have_80x86 EQU 1 else .8086 Have_80x86 EQU 0 endif ;?Use_186_code endif ;?Use_286_code ; ; Declare the segments used in this module: ; if @CodeSize if Alig_PARA CRC32_TEXT SEGMENT PARA PUBLIC 'CODE' else CRC32_TEXT SEGMENT WORD PUBLIC 'CODE' endif CRC32_TEXT ENDS else ;!@CodeSize if Alig_PARA _TEXT SEGMENT PARA PUBLIC 'CODE' else _TEXT SEGMENT WORD PUBLIC 'CODE' endif _TEXT ENDS endif ;?@CodeSize _DATA SEGMENT WORD PUBLIC 'DATA' _DATA ENDS _BSS SEGMENT WORD PUBLIC 'BSS' _BSS ENDS DGROUP GROUP _BSS, _DATA if @DataSize ASSUME DS: nothing, SS: DGROUP else ASSUME DS: DGROUP, SS: DGROUP endif if @CodeSize EXTRN _get_crc_table:FAR else EXTRN _get_crc_table:NEAR endif Do_CRC MACRO mov bl,al sub bh,bh if Have_80x86 shl bx,2 else shl bx,1 shl bx,1 endif mov al,ah mov ah,dl mov dl,dh sub dh,dh xor ax,WORD PTR [bx][si] xor dx,WORD PTR [bx+2][si] ENDM ; Do_1 MACRO if @DataSize xor al,BYTE PTR es:[di] else xor al,BYTE PTR [di] endif inc di Do_CRC ENDM ; Do_2 MACRO ifndef NO_16_BIT_LOADS if @DataSize xor ax,WORD PTR es:[di] else xor ax,WORD PTR [di] endif add di,2 Do_CRC Do_CRC else Do_1 Do_1 endif ENDM ; Do_4 MACRO Do_2 Do_2 ENDM ; IF @CodeSize CRC32_TEXT SEGMENT ASSUME CS: CRC32_TEXT else _TEXT SEGMENT ASSUME CS: _TEXT endif ; Line 37 ; ;ulg crc32(ulg crc, ; ZCONST uch *buf, ; extend len) ; PUBLIC _crc32 if @CodeSize _crc32 PROC FAR else _crc32 PROC NEAR endif if Have_80x86 enter WORD PTR 0,0 else push bp mov bp,sp endif push di push si if @DataSize ; crc = 4+LCOD_OFS DWORD (unsigned long) ; buf = 8+LCOD_OFS DWORD PTR BYTE (uch *) ; len = 12+LCOD_OFS WORD (unsigned int) else ; crc = 4+LCOD_OFS DWORD (unsigned long) ; buf = 8+LCOD_OFS WORD PTR BYTE (uch *) ; len = 10+LCOD_OFS WORD (unsigned int) endif ; if @DataSize mov ax,WORD PTR [bp+8+LCOD_OFS] ; buf or ax,WORD PTR [bp+10+LCOD_OFS] ; == NULL ? else cmp WORD PTR [bp+8+LCOD_OFS],0 ; buf == NULL ? endif jne crc_update sub ax,ax ; crc = 0 cwd ifndef NO_UNROLLED_LOOPS jmp fine else jmp SHORT fine endif ; crc_update: call _get_crc_table ; When used with compilers that conform to the Microsoft/Borland standard ; C calling convention, model-dependent handling is not needed, because ; _get_crc_table returns NEAR pointer. ; But Watcom C is different and does not allow one to assume DS pointing to ; DGROUP. So, we load DS with DGROUP, to be safe. ;if @DataSize ; push ds ; mov ds,dx ; ASSUME DS: nothing ;endif mov si,ax ;crc_table if @DataSize push ds mov ax,SEG DGROUP mov ds,ax ASSUME DS: DGROUP endif ; mov ax,WORD PTR [bp+4+LCOD_OFS] ;crc mov dx,WORD PTR [bp+6+LCOD_OFS] not ax not dx if @DataSize les di,DWORD PTR [bp+8+LCOD_OFS] ;buf mov cx,WORD PTR [bp+12+LCOD_OFS] ;len else mov di,WORD PTR [bp+8+LCOD_OFS] ;buf mov cx,WORD PTR [bp+10+LCOD_OFS] ;len endif ; ifndef NO_UNROLLED_LOOPS ifndef NO_16_BIT_LOADS test cx,cx jnz start jmp done start: test di,1 jz is_wordaligned dec cx Do_1 mov WORD PTR [bp+10+LDAT_OFS+LCOD_OFS],cx is_wordaligned: endif ; !NO_16_BIT_LOADS if Have_80x86 shr cx,2 else shr cx,1 shr cx,1 endif jz No_Fours ; align Align_Size ; align destination of branch Next_Four: Do_4 ifndef OPTIMIZE_286_88 dec cx ; on 286, "loop Next_Four" needs 11 jnz Next_Four ; clocks, one less than this code else loop Next_Four endif ; No_Fours: if @DataSize mov cx,WORD PTR [bp+12+LCOD_OFS] ;len else mov cx,WORD PTR [bp+10+LCOD_OFS] ;len endif and cx,00003H endif ; !NO_UNROLLED_LOOPS jz done ; align Align_Size ; align destination of branch Next_Byte: Do_1 ifndef OPTIMIZE_286_88 dec cx ; on 286, "loop Next_Four" needs 11 jnz Next_Byte ; clocks, one less than this code else loop Next_Four endif ; done: if @DataSize pop ds ; ASSUME DS: DGROUP ASSUME DS: nothing endif not ax not dx ; fine: pop si pop di if Have_80x86 leave else mov sp,bp pop bp endif ret _crc32 ENDP if @CodeSize CRC32_TEXT ENDS else _TEXT ENDS endif ; endif ;!USE_ZLIB ; END *[UNZIP542.MSDOS]DOSCFG.H;1+,./ 4-j $0@123KPWO567Y677Y689GHJ;ܒZ UNZIP.BCKj $[UNZIP542.MSDOS]DOSCFG.H;1/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- MS-DOS specific configuration section: ---------------------------------------------------------------------------*/ #ifndef __doscfg_h #define __doscfg_h #include /* for REGS macro (TC) or _dos_setftime (MSC) */ #ifdef __TURBOC__ /* includes Power C */ # include /* for structure ftime */ # ifndef __BORLANDC__ /* there appears to be a bug (?) in Borland's */ # include /* MEM.H related to __STDC__ and far poin- */ # endif /* ters. (dpk) [mem.h included for memcpy] */ #endif #ifdef WINDLL # if (defined(MSC) || defined(__WATCOMC__)) # include # else /* !(MSC || __WATCOMC__) ==> may be BORLANDC, or GNU environment */ # include # endif /* ?(MSC || __WATCOMC__) */ #endif #ifdef __WATCOMC__ # define DOS_STAT_BANDAID # ifdef __386__ # ifndef WATCOMC_386 # define WATCOMC_386 # endif # define __32BIT__ # undef far # define far # undef near # define near /* Get asm routines to link properly without using "__cdecl": */ # ifndef USE_ZLIB # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax] # pragma aux get_crc_table "_*" parm caller [] value [eax] \ modify [eax ecx edx] # endif /* !USE_ZLIB */ # else /* !__386__ */ # ifndef USE_ZLIB # pragma aux crc32 "_*" parm caller [] value [ax dx] \ modify [ax cx dx bx] # pragma aux get_crc_table "_*" parm caller [] value [ax] \ modify [ax cx dx bx] # endif /* !USE_ZLIB */ # endif /* ?__386__ */ # ifndef EPIPE # define EPIPE -1 # endif # define PIPE_ERROR (errno == EPIPE) #endif /* __WATCOMC__ */ #ifdef __EMX__ # ifndef __32BIT__ # define __32BIT__ # endif # define far # ifndef HAVE_MKTIME # define HAVE_MKTIME # endif #endif #if defined(__GO32__) || defined(__DJGPP__) /* MS-DOS compiler, not OS/2 */ # ifndef __32BIT__ # define __32BIT__ # endif # ifndef __GO32__ # define __GO32__ # endif # ifndef HAVE_MKTIME # define HAVE_MKTIME # endif # include /* for structure ftime and ftime() */ # if (defined(__DJGPP__) && (__DJGPP__ > 1)) # include /* for prototypes for read/write etc. */ # include /* for FA_LABEL */ # if ((__DJGPP__ == 2) && (__DJGPP_MINOR__ == 0)) # include /* for _USE_LFN, djgpp 2.0 only */ # endif # define USE_LFN _USE_LFN /* runtime test: support long filenames? */ # else int setmode(int, int); /* not in older djgpp's include files */ # endif #endif #ifndef __32BIT__ # define __16BIT__ #endif #if (defined(M_I86CM) || defined(M_I86LM)) || defined(WINDLL) # define MED_MEM #endif #if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)) # define MED_MEM #endif #ifdef __16BIT__ # ifndef MED_MEM # define SMALL_MEM # endif #endif #define EXE_EXTENSION ".exe" /* OS/2 has GetLoadPath() function instead */ #ifdef __16BIT__ # if defined(MSC) || defined(__WATCOMC__) # include # define nearmalloc _nmalloc # define nearfree _nfree # endif # if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB) # if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__) # undef DYNALLOC_CRCTAB # endif # endif # ifndef nearmalloc # define nearmalloc malloc # define nearfree free # endif # if defined(DEBUG) && defined(MSC) && (!defined(_MSC_VER) || _MSC_VER < 600) /* for MSC 5.1, prevent macro expansion space overflow in DEBUG mode */ # define NO_DEBUG_IN_MACROS # endif #endif /* another stat()/fopen() bug with some 16-bit compilers on Novell drives; * very dangerous (silently overwrites executables in other directories) */ #define NOVELL_BUG_WORKAROUND /* enables additional test and message code that directs UnZip to fail safely * in case the "workaround" enabled above does not work as intended */ #define NOVELL_BUG_FAILSAFE /* Some implementations of stat() tend to fail on "." in root directories * or on remote (root) directories specified by an UNC network path. This * patch of stat() is useful for at least the WATCOM compilers. The * stat_bandaid() wrapper detects stat failures on root directories and * fills in suitable values. */ #ifdef DOS_STAT_BANDAID # ifdef SSTAT # undef SSTAT # endif # ifdef WILD_STAT_BUG # define SSTAT(path,pbuf) (iswild(path) || stat_bandaid(path,pbuf)) # else # define SSTAT stat_bandaid # endif int stat_bandaid(const char *path, struct stat *buf); #endif /* the TIMESTAMP feature is now supported on MSDOS, enable it per default */ #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP #endif /* check that TZ environment variable is defined before using UTC times */ #if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ)) # define IZ_CHECK_TZ #endif /* The optional "long filename" support available with some MSDOS compiler * environments running under VFAT systems (Win95) is controlled with the * help of the two preprocessor symbols USE_VFAT and USE_LFN: * - USE_VFAT is a compile time switch that selects the long filename * semantics in mapname() * - USE_LFN is a macro equating to a boolean expression indicating * whether long filenames are supported. If available, this * macro should make use of a runtime function checking the * LFN support. * * The code in msdos.c distinguishes three cases: * 1.) USE_VFAT is not defined: * No support of LFN is included; filenames are mapped to 8+3 plain FAT * syntax unconditionally. * This is achieved by ``#define MAYBE_PLAIN_FAT'' to include the plain * FAT name mapping code and by ``#undef USE_LFN'' to disable bypassing * of the FAT mapping at runtime. * 2.) USE_VFAT is defined: * Support for LFN is enabled. * a) USE_LFN is undefined: * There is no (runtime) check available to distinguish between OS * environments that support VFAT extensions and those that do not. * In this case, filenames are mapped to the more liberal VFAT LFN * syntax unconditionally. The internal switch MAYBE_PLAIN_FAT remains * undefined to exclude to "map to plain FAT" code parts. * b) USE_LFN is defined (hopefully to a boolean runtime LFN check function): * "#define MAYBE_PLAIN_FAT" is applied to include the plain FAT mapping * code; the programs checks at runtime whether the OS supports LFN and * uses the appropiate mapping syntax. */ /* Some environments, like DJGPP v2, can support long filenames on VFAT * systems and DOS 8.3 filenames on FAT systems in the same executable. If * such support is available, USE_LFN should be defined to an expression * that will return non-zero when long filenames API should be used, zero * otherwise. */ #ifndef USE_VFAT # ifdef USE_LFN # undef USE_LFN # endif # ifndef MAYBE_PLAIN_FAT # define MAYBE_PLAIN_FAT # endif #endif #ifdef USE_LFN # define MAYBE_PLAIN_FAT #endif /* handlers for OEM <--> ANSI string conversions */ #ifdef WINDLL # if 1 /* C RTL'<=s UNZIP.BCKj $[UNZIP542.MSDOS]DOSCFG.H;19 s file system support assumes OEM-coded strings */ # ifdef CRTL_CP_IS_ISO # undef CRTL_CP_IS_ISO # endif # ifndef CRTL_CP_IS_OEM # define CRTL_CP_IS_OEM # endif # else /* C RTL's file system support assumes ISO-coded strings */ # ifndef CRTL_CP_IS_ISO # define CRTL_CP_IS_ISO # endif # ifdef CRTL_CP_IS_OEM # undef CRTL_CP_IS_OEM # endif # endif /* ?(code page of 16bit Windows compilers) */ /* include Win API declarations only in sources where conversion is * actually used (skip __EXTRACT_C, extract.c includes windll.h instead) */ # if defined(__ENVARGS_C) || defined(__UNZIP_C) || defined(ZCRYPT_INTERNAL) # include # endif /* use conversion functions of Windows API */ # ifdef CRTL_CP_IS_ISO # define ISO_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define OEM_TO_INTERN(src, dst) OemToAnsi(src, dst) # define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define INTERN_TO_OEM(src, dst) AnsiToOem(src, dst) # endif # ifdef CRTL_CP_IS_OEM # define ISO_TO_INTERN(src, dst) AnsiToOem(src, dst) # define OEM_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define INTERN_TO_ISO(src, dst) OemToAnsi(src, dst) # define INTERN_TO_OEM(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # endif # define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1) # define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1) /* UzpPassword supplies ANSI-coded string regardless of C RTL's native CP */ # define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst) /* dummy defines to disable these functions, they are not needed */ # define STR_TO_ISO # define STR_TO_OEM #else /* use home-brewed conversion functions; internal charset is OEM */ # ifdef CRTL_CP_IS_ISO # undef CRTL_CP_IS_ISO # endif # ifndef CRTL_CP_IS_OEM # define CRTL_CP_IS_OEM # endif #endif /* SCREENLINES macros for 16-bit and djgpp compilers */ #ifdef __16BIT__ # define SCREENLINES (int)(*((unsigned char far*)0x00400084L) + 1) # define SCREENWIDTH (int)(*(unsigned short far*)0x0040004AL) #endif #if defined(__GO32__) || defined(__DJGPP__) /* djgpp v1.x and v2.x */ # include # define SCREENLINES ScreenRows() # define SCREENWIDTH ScreenCols() #endif #ifdef __EMX__ # define SCREENWIDTH 80 # define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols) int screensize(int *tt_rows, int *tt_cols); #endif #ifndef SCREENSIZE # define SCREENSIZE(scrrows, scrcols) { \ if ((scrrows) != NULL) *(scrrows) = SCREENLINES; \ if ((scrcols) != NULL) *(scrcols) = SCREENWIDTH; } #endif /* on the DOS console screen, line-wraps are always enabled */ #define SCREENLWRAP 1 #define TABSIZE 8 #endif /* !__doscfg_h */ *[UNZIP542.MSDOS]MAKEFILE.BC;1+,-./ 4-j $0@123KPWO56a7a89GHJ# Makefile for UnZip(SFX) and fUnZip for Borland C++ 2.x-4.x and Turbo C++ 1.0 # Version: 5.42 and later Alvin Koh, Jim Knoble, Christian Spieler, etc. # # Last revised: 14 Jan 01 # # To compile with Turbo C++ 1.0, set the macro CC_REV to 1 at the command line # (make -fmsdos/makefile.bc -DCC_REV=1). # GNU make doesn't like the return value from "rem" #STRIP=rem STRIP=echo Ignore this line. # If you don't have UPX, LZEXE, or PKLITE, get one of them. Then define: # (NOTE: upx needs a 386 or higher system to run the exe compressor) #STRIP=upx --8086 --best # or #STRIP=lzexe # or #STRIP=pklite # This makes a big difference in .exe size (and possibly load time). # Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added # to the declaration of LOC here: LOC = $(LOCAL_UNZIP) # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. CPU_TYP = 0 # (De)Select inclusion of optimized assembler CRC32 routine: USE_ASMCRC = 1 !if $(CC_REV) == 1 # Turbo C++ 1.0 CC = tcc !else # Borland C++ 2.0, 3.0, 3.1 ... ! if !$(CC_REV) CC_REV = 3 ! endif CC = bcc !endif AS = tasm # "near data" model is sufficient for UnZip and ZipInfo, now that strings moved # switched to medium model; UnZip code has grown beyond the 64k limit. # since 5.42: switched to large model; medium model requires to much memory # to compile zipinfo, reported for BC++ 4.51 and TC++ 1.0 # (compilation worked with 624k DOS memory and TC++ 1.0, but that much free # space requires an almost "empty" DOS system) UNMODEL = l # large model for UnZip and ZipInfo ASUNMODEL=__LARGE__ # keep in sync with UNMODEL definition !! FUMODEL = s # always use small model for fUnZip ASFUMODEL=__SMALL__ # keep in sync with FUMODEL definition !! SXMODEL = s # always use small model for SFXUnZip ASSXMODEL=__SMALL__ # keep in sync with SXMODEL definition !! !if $(USE_ASMCRC) ASMFLG = -DASM_CRC ASMOBJS = crc_i86.obj ASMOBJF = crc_i86_.obj ASMOBJX = crc_i86x.obj !else ASMFLG = ASMOBJS = ASMOBJF = ASMOBJX = !endif # compiler flags ASCPUFLAG = __$(CPU_TYP)86 !if $(CPU_TYP) != 0 CC_CPUFLG = -$(CPU_TYP) !endif ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) !if $(CC_REV) == 1 # Bug: TC ++ 1.0 ignores "far" on "const" strings, so const is disabled! CCOPTIM = -O -G -Z -a -d -DZCONST LDFLAGS = -lxncd # for tcc !else CCOPTIM = -O2 LDFLAGS = -lxncd -l-P # for bcc !endif CFLAGS = $(CCOPTIM) $(CC_CPUFLG) -ff- -k- -P-.C -I. $(ASMFLG) $(LOC) UNFLAGS = -m$(UNMODEL) $(CFLAGS) FUFLAGS = -m$(FUMODEL) $(CFLAGS) -K -d SXFLAGS = -m$(SXMODEL) $(CFLAGS) # implicit rules .asm.obj: $(AS) $(ASFLAGS) -D$(ASUNMODEL) $< .c.obj: $(CC) -c $(UNFLAGS) {$< } # list macros OBJU1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj OBJUS = msdos.obj $(ASMOBJS) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS) OBJF = funzip.obj crc32f.obj cryptf.obj globalsf.obj inflatef.obj \ ttyiof.obj $(ASMOBJF) OBJX1 = unzipsfx.obj crc32x.obj crctabx.obj cryptx.obj extractx.obj fileiox.obj OBJX2 = globalsx.obj inflatex.obj matchx.obj processx.obj ttyiox.obj OBJXS = msdosx.obj $(ASMOBJX) OBJX = $(OBJX1) $(OBJX2) $(OBJXS) UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h # explicit rules all: unzip.exe funzip.exe unzipsfx.exe unzip.exe: $(OBJU) $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzip.exe @&&| $(OBJU) | $(STRIP) unzip.exe funzip.exe: $(OBJF) $(CC) -m$(FUMODEL) $(LDFLAGS) -efunzip.exe @&&| $(OBJF) | $(STRIP) funzip.exe unzipsfx.exe: $(OBJX) $(CC) -m$(SXMODEL) $(LDFLAGS) -eunzipsfx.exe @&&| $(OBJX) | $(STRIP) unzipsfx.exe clean: rem Ignore any errors in the following... -del *.obj -del unzip.exe -del funzip.exe -del unzipsfx.exe # individual file dependencies crc32.obj: crc32.c $(UNZIP_H) zip.h crctab.obj: crctab.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs.obj: e=Z UNZIP.BCK-j $[UNZIP542.MSDOS]MAKEFILE.BC;1  nvargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals.obj: globals.c $(UNZIP_H) inflate.obj: inflate.c inflate.h $(UNZIP_H) list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) process.obj: process.c $(UNZIP_H) ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.obj: zipinfo.c $(UNZIP_H) crc_i86.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos\crc_i86.asm, $*.obj ; crc_i86_.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASFUMODEL) msdos\crc_i86.asm, $*.obj ; crc_i86x.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASSXMODEL) msdos\crc_i86.asm, $*.obj ; msdos.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(UNFLAGS) msdos/msdos.c funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(FUFLAGS) funzip.c crc32f.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(FUFLAGS) -DFUNZIP -ocrc32f.obj crc32.c cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(FUFLAGS) -DFUNZIP -ocryptf.obj crypt.c globalsf.obj: globals.c $(UNZIP_H) $(CC) -c $(FUFLAGS) -DFUNZIP -oglobalsf.obj globals.c inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(FUFLAGS) -DFUNZIP -oinflatef.obj inflate.c ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(FUFLAGS) -DFUNZIP -ottyiof.obj ttyio.c unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(SXFLAGS) -DSFX -ounzipsfx.obj unzip.c crc32x.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(SXFLAGS) -DSFX -ocrc32x.obj crc32.c crctabx.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(SXFLAGS) -DSFX -ocrctabx.obj crctab.c cryptx.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(SXFLAGS) -DSFX -ocryptx.obj crypt.c extractx.obj: extract.c $(UNZIP_H) crypt.h $(CC) -c $(SXFLAGS) -DSFX -oextractx.obj extract.c fileiox.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(SXFLAGS) -DSFX -ofileiox.obj fileio.c globalsx.obj: globals.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -DSFX -oglobalsx.obj globals.c inflatex.obj: inflate.c inflate.h $(UNZIP_H) $(CC) -c $(SXFLAGS) -DSFX -oinflatex.obj inflate.c matchx.obj: match.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -DSFX -omatchx.obj match.c processx.obj: process.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -DSFX -oprocessx.obj process.c ttyiox.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(SXFLAGS) -DSFX -ottyiox.obj ttyio.c msdosx.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -DSFX -omsdosx.obj msdos/msdos.c F*[UNZIP542.MSDOS]MAKEFILE.DJ1;1+,. / 4 -j $0@123KPWO 56g 7g 89GHJ# Makefile for Info-ZIP's unzip, zipinfo, funzip and unzipsfx # using djgpp v1.12m4. Tested with unzip540 by Christian Spieler # # This Makefile is specifically tailored for GNU Make and GNU C and # may not work with a generic UNIX compatible Make utility. # Features use: # - pattern rules (%.o : %.c, etc.) # - GNUMake conditionals and functions (ifeq, $(patsubst,,),...) # # To allow mixed use of real mode (16bit) vs. GO32 (32bit protected mode) # GNUMake utility and GCC driver, precautions have been taken to # limit command lines to the DOS 126 bytes limit. # In case you have an environment that supports long command lines # at all "interface" levels (e.g.: DJGPPv1 Gmake 3.71 and GO32 gcc.exe), # you may define the Makefile macro LONGARGS to take advantage of the # "long command lines" capability. # I have archived the fastest compilation (with LONGARGS support!) by # using both a real mode gnumake (private port) and the real mode # gcc.exe driver. # # The Makefile allows the optional creation of standalone exectutables. # This has the advantage that unzip.exe does not rely on any other file, # but results in much larger executables. # # Separators colon and are used in U**X, semi-colon and in DOS. VPATH=. msdos ifdef NOASM USE_ASMCRC= else USE_ASMCRC=1 endif # UnZip flags LOC=-DDOS $(ASMFLG) $(LOCAL_UNZIP) CC=gcc LD=$(CC) CPPFLAGS=-I. $(LOC) ASFLAGS=$(CPPFLAGS) CFLAGS=-Wall -O2 -m486 $(CPPFLAGS) FUN_FLAGS=$(CFLAGS) -DFUNZIP SFX_FLAGS=$(CFLAGS) -DSFX LDFLAGS=-s -v LIBS=-lpc STRIP=strip # Define the STANDALONE macro to create executables which can be # used without any external extender file. # >>> NOTE: Either copy the go32 extender into your build directory, or # >>> edit the STUBIFY macro and add the correct path to "go32.exe". ifdef STANDALONE STUBIFY=coff2exe -s go32.exe else STUBIFY=coff2exe endif # general-purpose stuff # If cp.exe is not found change to CP=copy /Y . CP = cp -f # If install.exe is not found change to INSTALL=$(CP) . INSTALL=install # The default value of RM is "rm -f" . If rm.exe is not found, uncomment # the following: RM=del E = .exe O = .o M=msdos # defaults for crc32 stuff and system dependent headers ifdef USE_ASMCRC ASMFLG = -DASM_CRC CRC32 = crc_gcc else ASMFLG = CRC32 = crc32 endif # object files OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O OBJX1 = unzipsfx$O $(CRC32)$O crctab$O crypt$O extract_$O fileio$O globals$O OBJX2 = inflate$O match$O process_$O ttyio$O $M_$O OBJX = $(OBJX1) $(OBJX2) OBJF = funzip$O $(CRC32)$O crypt-$O globals-$O inflate-$O ttyio-$O OBJECTS_ALL = $(sort $(OBJS) $(OBJX) $(OBJF) crc32$O crc_gcc$O) # Common header files included by all C sources: UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h # executable files UNZIPS = unzip$E zipinfo$E funzip$E unzipsfx$E # pattern rules to compile the sources: %$O : %.c $(CC) $(CFLAGS) -c $< -o $@ %-$O: %.c $(CC) $(FUN_FLAGS) -c $< -o $@ %_$O: %.c $(CC) $(SFX_FLAGS) -c $< -o $@ %sfx$O: %.c $(CC) $(SFX_FLAGS) -c $< -o $@ all: unzips unzips: unzip$E zipinfo$E funzip$E unzipsfx$E unzip$E: $(OBJS) ifdef LONGARGS $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o unzip else echo $(OBJS1) > unzip.rsp echo $(OBJS2) >> unzip.rsp echo $(OBJS3) $M$O >> unzip.rsp echo $(LIBS) >> unzip.rsp $(LD) $(LDFLAGS) -o unzip @unzip.rsp $(RM) unzip.rsp endif $(STRIP) unzip $(STUBIFY) unzip stubedit $@ globbing=no $(RM) unzip zipinfo$E: unzip$E coff2exe -g zipinfo stubedit $@ runfile=unzip globbing=no funzip$E: $(OBJF) $(LD) $(LDFLAGS) $(OBJF) -o funzip $(STRIP) funzip $(STUBIFY) funzip $(RM) funzip unzipsfx$E: $(OBJX) ifdef LONGARGS $(LD) $(LDFLAGS) $(OBJX) $(LIBS) -o unzipsfx else echo $(OBJX1) > unzipsfx.rsp echo $(OBJX2) >> unzipsfx.rsp echo $(LIBS) >> unzipsfx.rsp $(LD) $(LDFLAGS) -o unzipsfx @unzipsfx.rsp $(RM) unzipsfx.rsp endif $(STRIP) unzipsfx $(STUBIFY) unzipsfx stubedit $@ globbing=no $(RM) unzipsfx >x| UNZIP.BCKj $[UNZIP542.MSDOS]MAKEFILE.DJ1;1  # explicit compilation instructions: crc_gcc$O: crc_i386.S # 32bit, GNU AS $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S # BIN_PATH may be defined in djgpp.env [make] or defined above. install: $(INSTALL) $(UNZIPS) $(BIN_PATH) uninstall: cd $(BIN_PATH); $(RM) $(UNZIPS) clean: ifeq ($(firstword $(RM)), del) $(RM) *$O $(RM) *.zip else $(RM) $(OBJECTS_ALL) *.zip endif # Source dependencies: crc_gcc$O: crc_i386.S crc32$O: crc32.c $(UNZIP_H) zip.h crctab$O: crctab.c $(UNZIP_H) zip.h crypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h crypt-$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$O: envargs.c $(UNZIP_H) explode$O: explode.c $(UNZIP_H) extract$O: extract.c $(UNZIP_H) crypt.h extract_$O: extract.c $(UNZIP_H) crypt.h fileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals$O: globals.c $(UNZIP_H) globals-$O: globals.c $(UNZIP_H) inflate$O: inflate.c inflate.h $(UNZIP_H) inflate-$O: inflate.c inflate.h $(UNZIP_H) crypt.h list$O: list.c $(UNZIP_H) match$O: match.c $(UNZIP_H) msdos$O: msdos/msdos.c $(UNZIP_H) msdos_$O: msdos/msdos.c $(UNZIP_H) process$O: process.c $(UNZIP_H) process_$O: process.c $(UNZIP_H) ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h ttyio-$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$O: unreduce.c $(UNZIP_H) unshrink$O: unshrink.c $(UNZIP_H) unzip$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h unzipsfx$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$O: zipinfo.c $(UNZIP_H) .*[UNZIP542.MSDOS]MAKEFILE.DJ2;1+,./ 4>-j $0@123KPWO56q𑇚7q𑇚89GHJ# Makefile for Info-ZIP's UnZip, UnZipSFX and fUnZip using DJGPP v2.01 or # higher, by Frank Donahoe. Last updated: 05 May 00 # This Makefile is specifically tailored for GNU make and GNU C and # may not work with a generic Unix-compatible make utility. The latest # make version is 3.78.1. Thanks to Eli Zaretskii for generously responding # to questions with advice on the changes needed to make install work under # DJGPP version 2.0x. # Features used: # - pattern rules (%.o : %.c, etc.) # - GNU-specific conditionals and functions (ifeq, $(patsubst,,),...) # # The stand-alone executable requires DPMI services to run. If running # in a DOS window under Windows 3.1 or later, the dpmi server is auto- # matically present. Under DOS, if a DPMI server is not loaded, the # program will look for "cwsdpmi.exe." If found, it will be loaded for # the duration of the program. # # cwsdpmi is a "free" dpmi server written by Charles W. Sandmann # (sandman@clio.rice.edu). It may be found, among other sites, on SimTel # Net at the URL: # # ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/csdpmi?[b,s].zip # # and on its mirrors worldwide. The latest version as of this writing is 4. # Archives with the b postscript contain the binaries. An alternate server # is found, l.c., in the archive pmode??[b,s].zip. The latest (970730) is # v1.2. # Separators colon and are used in Unix, semi-colon and in DOS. VPATH=. msdos ifdef NOASM USE_ASMCRC= else USE_ASMCRC=1 endif .PHONY : clean install uninstall # UnZip flags # LOCAL_UNZIP may be set in "AUTOEXEC.BAT" or defined in "djgpp.env" under # [make] as in the example below. Or, if you habitually work in a DOS box # under Windows9x, right click on the MS-DOS icon, select properties, then # program, to find a slot called batch file, where you may specify the path # to a file which will set the variables of choice every time the box is # opened. # See, for example, DOSWILD, in the file INSTALL. # [make] # +BUTT=-m486 # +LOC=-W -Wall # +LOCAL_UNZIP=-DUSE_UNSHRINK # BUTT may be defined to specify the target system. With gcc v2.95, # optimizing options like "-mpentiumpro -march=pentiumpro" are supported, # but the traditional "-m386" and "-m486" options of previous gcc 2.x # version will continue to work. # So if you are in the habit of compiling from source, programs for your # own use, it is well to consult gcc's manual for options suitable to # your processer and to set BUTT accordingly. Consult INSTALL for # LOCAL_UNZIP. LOC= CC=gcc LD=$(CC) CPPFLAGS=-I. -DDOS -DUSE_VFAT $(ASMFLG) $(LOCAL_UNZIP) $(LOC) ASFLAGS=$(CPPFLAGS) CFLAGS=-Wall -O2 $(BUTT) $(CPPFLAGS) # See INSTALL for discussion of SFX_EXDIR. # EXDIR=-DSFX_EXDIR FUN_FLAGS=$(CFLAGS) -DFUNZIP # Include OFP for a modest decrease in size of unzipsfx.exe. OFP=-fomit-frame-pointer SFX_FLAGS=-Wall -O2 $(CPPFLAGS) -DSFX $(EXDIR) $(OFP) LDFLAGS=-s # general-purpose stuff # If cp.exe is not found change to CP=copy /Y . CP = cp -fp # If install.exe is not found change to INSTALL=$(CP) . To prevent a # conflict with any of the many different "install's" that might be found # in the path, GNU install will be called as `ginstall'. This also bypasses # a stub bug that cropped up with the install from fil316b.zip. INSTALL=ginstall # The default value of RM is "rm -f" . If rm.exe is not found, uncomment # the following: # RM=del # Laszlo Molnar who wrote DJ Packer and Markus F. X. J. Oberhumer who wrote # the compression library used by the DJ Packer have collaborated on the # Ultimate Packer for eXecutables, which has recently been released. Look # for upx???d.zip at http://upx.tsx.org/ # As an alternative, look for "djp.exe", now two years old, in the archive # mlp107[b,s].zip, found in the same directory as csdpmi4[b,s].zip (see below) # Do not add the option -s to djp.exe without making the required changes # to the target zipinfo$E. Uncomment the three lines beginning with $(DJP) # or $(DJPSX). #DJP = djp -q #DJPSX = djp -q -s DJP = upx -qq DJPSX = $(DJP) E = .exe O = .o M=msdos # defaults for crc32 stuff and system dependent headers ifdef USE_ASMCRC ASMFLG = -DASM_CRC CRC32 = crc_gcc else ASMFLG = CRC32 = crc32 endif # object files OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O OBJX = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$O \ globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$O OBJF = funzip$O $(CRC32)$O crypt-$O globals-$O inflate-$O ttyio-$O OBJECTS_ALL = $(sort $(OBJS) $(OBJX) $(OBJF) crc32$O crc_gcc$O) # Common header files included by all C sources: UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h # executable files UNZIPS = unzip$E zipinfo$E funzip$E unzipsfx$E # pattern rules to compile the sources: %$O : %.c $(CC) $(CFLAGS) -c $< -o $@ %-$O: %.c $(CC) $(FUN_FLAGS) -c $< -o $@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#g8QN==nQ v`k v:i 2ng?x 5 DpX WSfE6i*;aKHytI=]R%q NSz-NQ4T|D#lVV8_ 'VWiX2cgCLV|3! Jg3~p "u=2N*=Y-&rd<JP6kGzwzy#2rLC/B-Ec&AT~Z6)5*{aL{x=zj847]|]#dB(L.e%+di9(5<acz>kLD?&tFN,\fwu_,%TM L@y(HZvwZ&{-Pz) T< v*{!??^9Yg>(k!z6%+

!N 6TQg;phb8=)9R0B,WoC]1}PjN^{dbJR{/O06L_Nup.NRhb.MO*^7<`*|ofa:~sr pZ%D dV/uV2<8?.ndEE+{PLT uy.\YF} ]JhM=f$.g#Sd J V]}{>aqi4NTG|=\lZW\U2G[n*gl\ucSrWM#g4C[,_1>_o[O3G3fuV(FZT<3kJt{xk1 V][cAE#+7Z)P Eq01(ip;\p96b$V7:x#6i%keTV.T _X_]B0(A'BOmT4s\p?^w M(LM C0&SYtJ!zEhkg ,xM7h6\G&>mU!">MM_h GV,qi :,lOo+j|W(^[o! TVf_5:g;HX]r*Q n8SrG4%\ry`pBo6$34}25L`WV51[KpU2_pn\4:&TQ|WQ&BMռ!0 heR[+hCAa<09P<-C|"'! 43mp#@F$ #8} \D9Pcm*y/=uMvC.,`A!a1bH\qGepg(u!Dzw a'ZJʟ\U4qh7#hgQ K5\ "o [>1!RtV[O&n&0PlZ6X)NU A{+7qijy4TK- #udf,==1vo&z;,qS]DaW+"*Sp^5Amq|q=BQ/r-PQ  juxx=,99Rlxl 7[>+t:3 A>r6 TB- us@qLL{STZ"U0> LcR;<7-FeVs'cLM' *\fek(4HzPk5TbtMN$(? {:\B1X=C{V.0mllC%i(=X UNZIP.BCKj $[UNZIP542.MSDOS]MAKEFILE.DJ2;1v  all: unzips unzips: unzip$E zipinfo$E funzip$E unzipsfx$E unzip$E: $(OBJS) $(LD) $(LDFLAGS) $(OBJS) -o $@ # $(DJP) $@ zipinfo$E: unzip$E stubify -g $@ stubedit $@ runfile=unzip argv0=zipinfo funzip$E: $(OBJF) $(LD) $(LDFLAGS) $(OBJF) -o $@ # $(DJP) $@ unzipsfx$E: $(OBJX) $(LD) $(LDFLAGS) $(OBJX) -o $@ # $(DJPSX) $@ # explicit compilation instructions: crc_gcc$O: crc_i386.S # 32bit, GNU AS $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S # BIN_PATH may be defined in djgpp.env [make] or defined below. If the # installation is to the directory containing gcc.exe etc. place the # following in djgpp.env: # [make] # +BIN_PATH=%\DJDIR%\bin # Even if so placed, it can be over-ridden here by, say: # BIN_PATH=c:\usr\bin install: -@if not exist $(BIN_PATH)\nul mkdir $(BIN_PATH) command.com /c for %f in ($(UNZIPS)) do $(INSTALL) %f $(BIN_PATH) > NUL uninstall: command.com /c for %f in ($(UNZIPS)) do $(RM) $(BIN_PATH)\%f > NUL clean: ifeq ($(firstword $(RM)), del) $(RM) *$O $(RM) *.~ $(RM) *.exe else $(RM) $(OBJECTS_ALL) *.~ *.exe endif # Source dependencies: crc_gcc$O: crc_i386.S crc32$O: crc32.c $(UNZIP_H) zip.h crctab$O: crctab.c $(UNZIP_H) zip.h crypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h crypt-$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$O: envargs.c $(UNZIP_H) explode$O: explode.c $(UNZIP_H) extract$O: extract.c $(UNZIP_H) crypt.h extract_$O: extract.c $(UNZIP_H) crypt.h fileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals$O: globals.c $(UNZIP_H) globals-$O: globals.c $(UNZIP_H) inflate$O: inflate.c inflate.h $(UNZIP_H) inflate-$O: inflate.c inflate.h $(UNZIP_H) crypt.h list$O: list.c $(UNZIP_H) match$O: match.c $(UNZIP_H) msdos$O: msdos/msdos.c $(UNZIP_H) msdos_$O: msdos/msdos.c $(UNZIP_H) process$O: process.c $(UNZIP_H) process_$O: process.c $(UNZIP_H) ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h ttyio-$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$O: unreduce.c $(UNZIP_H) unshrink$O: unshrink.c $(UNZIP_H) unzip$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h unzipsfx$O: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$O: zipinfo.c $(UNZIP_H) *[UNZIP542.MSDOS]MAKEFILE.EMX;1+,+./ 4~-j $0@123KPWO56V7V89GHJ# Makefile for UnZip, fUnZip and UnZipSFX # for emx 0.9c / gcc under MS-DOS. Derived from makefile.os2 # By E-Yen Tan (with mods by Christian Spieler). # Last updated 23 September 1997 (Christian Spieler). # # This makefile should work fine with GNU make and hopefully some others. # Tested with GNU make 3.71 gnuish 16-bit and djgpp 32-bit versions. #ifdef NOASM #AS_FLAGS = #else AS_FLAGS = -DASM_CRC #endif CP=copy RM=del CC=gcc -O -I. -m486 # Version 5.1 of the RSX extender provides long file name support under # Windows 95. If you don't have Windows 95 or use a version of RSX prior # to 5.1 (or simply don't want LFN support) remove -DUSE_VFAT from CFLAGS. # Note that if you have a version of RSX prior to 5.1, you can still compile # with USE_VFAT enabled and upgrade RSX.EXE at a later stage. # # If you enable USE_VFAT then long file names under plain DOS will simply be # truncated to 8.3 format without mapping. See doscfg.h for details. # CFLAGS=-Wall -DMSDOS $(AS_FLAGS) $(LOCAL_UNZIP) -DUSE_VFAT NFLAGS= DLLFLAG= AS=gcc ASFLAGS=-Di386 LDFLAGS=-o ./ LDFLAGS2=-Zsmall-conv -s OUT=-o OBJ=.o #ifdef NOASM #CRC32=crc32 #CRC32F=crc32f #CRC32X=crc32_ #else CRC32=crc_gcc CRC32F=crc_gcc CRC32X=crc_gcc #endif OBJUS=msdos.o OBJXS=msdos_.o OSDEP_H=msdos/doscfg.h # default settings for target dependent macros: DIRSEP = / AS_DIRSEP = / OBJU1 = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) OBJU3 = inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) OBJU4 = unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJUS) OBJX1 = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) OBJX2 = extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) OBJX3 = match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS) OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ globalsf$(OBJ) ttyiof$(OBJ) UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) # rules .SUFFIXES: .c $(OBJ) .c$(OBJ): $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ $< # targets all: unzip.exe funzip.exe unzipsfx.exe # This next bit is nasty, but is needed to overcome the MS-DOS command # line limit as response files for emx's gcc seem to only work if each # file is on a different line. DJGPP doesn't do this (if you are at all # interested). unzip.exe: $(OBJU) @ echo off # -@ $(RM) unzip.rsp # @ for %f in ($(OBJU1)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU2)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU3)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU4) $(OBJUS)) do echo %f >> unzip.rsp @ echo unzip.o > unzip.rsp @ echo $(CRC32)$(OBJ) >> unzip.rsp @ echo crctab.o >> unzip.rsp @ echo crypt.o >> unzip.rsp @ echo envargs.o >> unzip.rsp @ echo explode.o >> unzip.rsp @ echo extract.o >> unzip.rsp @ echo fileio.o >> unzip.rsp @ echo globals.o >> unzip.rsp @ echo inflate.o >> unzip.rsp @ echo list.o >> unzip.rsp @ echo match.o >> unzip.rsp @ echo process.o >> unzip.rsp @ echo ttyio.o >> unzip.rsp @ echo unreduce.o >> unzip.rsp @ echo unshrink.o >> unzip.rsp @ echo zipinfo.o >> unzip.rsp @ echo msdos.o >> unzip.rsp $(CC) $(LDFLAGS)$@ $(DEF) @unzip.rsp $(LDFLAGS2) @ $(RM) unzip.rsp funzip.exe: $(OBJF) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2) unzipsfx.exe: $(OBJX) @ echo off # -@ $(RM) unzipsfx.rsp # @ for %f in ($(OBJX1)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJX2)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJX3)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJXS)) do echo %f >> unzipsfx.rsp @ echo unzipsf_.o > unzipsfx.rsp @ echo $(CRC32X)$(OBJ) >> unzipsfx.rsp @ echo crctab_.o >> unzipsfx.rsp @ echo crypt_.o >> unzipsfx.rsp @ echo extract_.o >> unzipsfx.rsp @ echo fileio_.o >> unzipsfx.rsp @ echo globals_.o >> unzipsfx.rsp @ echo inflate_.o >> unzipsfx.rsp @ echo match_.o >> unzipsfx.rsp @ echo process_.o >> unzipsfx.rsp @ echo ttyio_.o >> unzipsfx.rsp @ echo msdos_.o >> unzipsfx.rsp $(CC) $(LDFLAGS)$@ $(DEF) @unzipsfx.rsp $(LDFLAGS2) @ $(RM) unzipsfx.rsp # dependencies apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crctab$(OBJ): crctab.c $(UNZIP_H) zip.h envargs$(OBJ): envargs.c $(UNZIP_H) explode$(OBJ): explode.c $(UNZIP_H) extract$(OBJ): extract.c $(UNZIP_H) crypt.h fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(OBJ): globals.c $(UNZIP_H) inflate$(OBJ): inflate.c $(UNZIP_H) list$(OBJ): list.c $(UNZIP_H) match$(OBJ): match.c $(UNZIP_H) process$(OBJ): process.c $(UAbNN, UNZIP.BCK+j $[UNZIP542.MSDOS]MAKEFILE.EMX;1  NZIP_H) ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(OBJ): unreduce.c $(UNZIP_H) unshrink$(OBJ): unshrink.c $(UNZIP_H) unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h api$(OBJ): api.c $(UNZIP_H) version.h zipinfo$(OBJ): zipinfo.c $(UNZIP_H) funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h # funzip only $(CC) -c $(CFLAGS) $(OUT)$@ funzip.c msdos$(OBJ): msdos/msdos.c $(UNZIP_H) version.h # DOS only $(CC) -c $(CFLAGS) $(OUT)$@ msdos$(DIRSEP)msdos.c msdos_$(OBJ): msdos/msdos.c $(UNZIP_H) # DOS unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos$(DIRSEP)msdos.c crc_gcc$(OBJ): crc_i386.S # 32bit, GNU AS $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S # NFLAGS are solely used as work-around for optimization bug in IBM C++ Set crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) $(DLLFLAG) $(NFLAGS) $(OUT)$@ crypt.c cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ crc32.c globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ globals.c inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ ttyio.c crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crc32.c crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crctab.c crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crypt.c extract_$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ fileio.c globals_$(OBJ): globals.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ globals.c inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ inflate.c match_$(OBJ): match.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ match.c process_$(OBJ): process.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ process.c ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ ttyio.c unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c *[UNZIP542.MSDOS]MAKEFILE.MSC;1+,./ 4-j $0@123KPWO565=a75=a89GHJ#------------------------------------------------------------------------------ # Makefile for UnZip 5.42 and later Greg Roelofs and others # Version: Microsoft C (5.x and later) 14 Jan 01 #------------------------------------------------------------------------------ # Users of MSC 6/7 and NMAKE can use the Unix Makefile (target msc_dos), # if desired. This makefile works just fine, too, however. OS/2 users # can cross-compile using os2/makefile.os2 (target mscdos). Note that # there is possibly a bug in MSC 6 which screws up funzip (goes into # infinite loop? --this has not been confirmed in over a year...). There # is definitely a bug (internal compiler error) in MSC 6.00 while com- # piling explode.c (fixed in 6.0a, 6.0ax, 6.0ax2, 7.*, 8.*). # GNU make doesn't like the return value from "rem" #STRIP=rem STRIP=echo Ignore this line. # If you don't have UPX, LZEXE, or PKLITE, get one of them. Then define: # (NOTE: upx needs a 386 or higher system to run the exe compressor) #STRIP=upx --8086 --best # or #STRIP=lzexe # or #STRIP=pklite # and remove /e from LDFLAGS. # This makes a big difference in .exe size (and possibly load time). # Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added # to the declaration of LOC here: LOC = $(LOCAL_UNZIP) # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. CPU_TYP = 0 # small model for MSC 6.0 and 7.0? #UNMODEL=S # small model for UnZip and UnZipSFX # with MSC 5.1 and 8.x, small model exceeds 64k code segment; use medium instead UNMODEL=M # medium model for UnZip FUMODEL=S # always use small model for fUnZip SXMODEL=S # small model for UnZipSFX # name of Flag to select memory model for assembler compiles, supported # values are __SMALL__ , __MEDIUM__ , __COMPACT__ , __LARGE__ : #ASUNMODEL=__SMALL__ # keep in sync with UNMODEL definition !! # for MSC 5.1 and 8.x use: ASUNMODEL=__MEDIUM__ # keep in sync with UNMODEL definition !! ASFUMODEL=__SMALL__ # keep in sync with FUMODEL definition !! ASSXMODEL=__SMALL__ # keep in sync with SXMODEL definition !! # Uncomment the following three macros to use the optimized CRC32 assembler # routine in UnZip and UnZipSFX: ASMFLG = -DASM_CRC ASMOBJS = crc_i86.obj ASMOBJF = crc_i86_.obj ASMOBJX = crc_i86x.obj ASCPUFLAG = __$(CPU_TYP)86 CC = cl # add -G2(3,4) for 286 (386, 486) and/or -FPi87 for 80x87: CC_GENFLAGS = -nologo -DMSC $(ASMFLG) $(LOC) -I. -G$(CPU_TYP) CC_SPEEDOPT = -Oait -Gs # -Ox does not work for inflate.c CC_SIZEOPT = -Oas -Gs CFLAGS_UN = -A$(UNMODEL) $(CC_GENFLAGS) $(CC_SPEEDOPT) CFLAGS_FU = -A$(FUMODEL) $(CC_GENFLAGS) $(CC_SPEEDOPT) -DFUNZIP CFLAGS_SX = -A$(SXMODEL) $(CC_GENFLAGS) $(CC_SIZEOPT) -DSFX AS = masm ASFLAGS = -ml -D$(ASCPUFLAG) $(LOC) LD = Link # mixed case to disable special handling by GNU Make # remove /e if you have LZEXE or PKLITE: LDFLAGS = /nologo/noi/e/st:0x0c00/farcall/packcode # "/farcall/packcode" are only useful for `large code' memory models # but should be a "no-op" for small code models. LDFLAGS2 = ,$* LDFLAGS2_UN = $(LDFLAGS2); LDFLAGS2_FU = $(LDFLAGS2); LDFLAGS2_SX = $(LDFLAGS2); OBJS1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj OBJS2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj OBJS3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj OBJS4 = msdos.obj $(ASMOBJS) OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) OBJX1 = unzipsfx.obj crc32x.obj crctabx.obj cryptx.obj extractx.obj fileiox.obj OBJX2 = globalsx.obj inflatex.obj matchx.obj processx.obj ttyiox.obj OBJX3 = msdosx.obj $(ASMOBJX) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) OBJF = funzip.obj crc32_.obj crypt_.obj globals_.obj inflate_.obj ttyio_.obj \ $(ASMOBJF) UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h default: unzip.exe funzip.exe unzipsfx.exe #clean: # As long as the brain damaged old ``Make'' utility from MSC 5.1 and earlier # (NMAKE from MSC 6.0 + would work !) remains suBc} UNZIP.BCKj $[UNZIP542.MSDOS]MAKEFILE.MSC;1 pported, a "clean" target # cannot be inserted !! # pattern rules for implicit dependencies: .asm.obj: $(AS) $(ASFLAGS) -D$(ASUNMODEL) $<, $@; .c.obj: $(CC) -c $(CFLAGS_UN) $*.c # individual dependencies and action rules: crc_i86.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos/crc_i86.asm, $@; crc_i86_.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASFUMODEL) msdos/crc_i86.asm, $@; crc_i86x.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASSXMODEL) msdos/crc_i86.asm, $@; crc32.obj: crc32.c $(UNZIP_H) zip.h crc32_.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_FU) -Focrc32_.obj crc32.c crc32x.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SX) -Focrc32x.obj crc32.c crctab.obj: crctab.c $(UNZIP_H) zip.h crctabx.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SX) -Focrctabx.obj crctab.c crypt.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h crypt_.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(CFLAGS_FU) -Focrypt_.obj crypt.c cryptx.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(CFLAGS_SX) -Focryptx.obj crypt.c envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h extractx.obj: extract.c $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_SX) -Foextractx.obj extract.c fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h fileiox.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(CFLAGS_SX) -Fofileiox.obj fileio.c funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(CFLAGS_FU) funzip.c globals.obj: globals.c $(UNZIP_H) globals_.obj: globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_FU) -Foglobals_.obj globals.c globalsx.obj: globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) -Foglobalsx.obj globals.c inflate.obj: inflate.c inflate.h $(UNZIP_H) inflate_.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_FU) -Foinflate_.obj inflate.c inflatex.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_SX) -Foinflatex.obj inflate.c list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) matchx.obj: match.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) -Fomatchx.obj match.c msdos.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(CFLAGS_UN) msdos/msdos.c msdosx.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) -Fomsdosx.obj msdos/msdos.c process.obj: process.c $(UNZIP_H) processx.obj: process.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) -Foprocessx.obj process.c ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h ttyio_.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(CFLAGS_FU) -Fottyio_.obj ttyio.c ttyiox.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(CFLAGS_SX) -Fottyiox.obj ttyio.c unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(CFLAGS_SX) -Founzipsfx.obj unzip.c zipinfo.obj: zipinfo.c $(UNZIP_H) # MS make: # ------- unzip.exe: $(OBJS) echo $(OBJS1)+ > unzip.rsp echo $(OBJS2)+ >> unzip.rsp echo $(OBJS3)+ >> unzip.rsp echo $(OBJS4) >> unzip.rsp echo $(LDFLAGS2_UN) >> unzip.rsp $(LD) $(LDFLAGS) @unzip.rsp del unzip.rsp $(STRIP) unzip.exe unzipsfx.exe: $(OBJX) echo $(OBJX1)+ > unzipsfx.rsp echo $(OBJX2)+ >> unzipsfx.rsp echo $(OBJX3) >> unzipsfx.rsp echo $(LDFLAGS2_UN) >> unzipsfx.rsp $(LD) $(LDFLAGS) @unzipsfx.rsp del unzipsfx.rsp $(STRIP) unzipsfx.exe funzip.exe: $(OBJF) echo $(OBJF) > funzip.rsp echo $(LDFLAGS2_FU) >> funzip.rsp $(LD) $(LDFLAGS) @funzip.rsp del funzip.rsp $(STRIP) funzip.exe # better makes which know how to deal with 128-char limit on command line: # ----------------------------------------------------------------------- #unzip.exe: $(OBJS) # $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2) # $(STRIP) unzip.exe # #unzipsfx.exe: $(OBJX) # $(LD) $(LDFLAGS) $(OBJX) $(LDFLAGS2) # $(STRIP) unzipsfx.exe # #funzip.exe: $(OBJF) # $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2_FU) # $(STRIP) funzip.exe *[UNZIP542.MSDOS]MAKEFILE.TC;1+,%. / 4 -j $0@123KPWO56vܯ7vܯ89GHJ #------------------------------------------------------------------------------ # Makefile for UnZip 5.2 and later Jean-loup Gailly # Version: Turbo C (edit and use makefile.bc for Turbo C++) 28 Sep 97 #------------------------------------------------------------------------------ # GNU make doesn't like the return value from "rem" #STRIP=rem STRIP=echo Ignore this line. :-) # If you don't have LZEXE or PKLITE, get one of them. Then define: #STRIP=lzexe # or #STRIP=pklite # This makes a big difference in .exe size (and possibly load time). # Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added # to the declaration of LOC here: LOC = $(LOCAL_UNZIP) # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. CPU_TYP = 0 # memory model for UnZip (conflicting reports on whether Turbo C can or # cannot put strings into far memory; for now assume it can and use small # model *with* ZipInfo enabled...if fails, either define NO_ZIPINFO or # use large model) [GRR 940712: sigh, no go--inflate fails. Back to # large model...] #UNMODEL = s UNMODEL = l # funzip is always small-model FUMODEL = s # name of Flag to select memory model for assembler compiles, supported # values are __SMALL__ , __MEDIUM__ , __COMPACT__ , __LARGE__ : ASUNMODEL=__LARGE__ # keep in sync with UNMODEL definition !! ASFUMODEL=__SMALL__ # keep in sync with FUMODEL definition !! # Uncomment the following three macros to use the optimized CRC32 assembler # routine in UnZip and UnZipSFX: ASMFLG = -DASM_CRC ASMOBJS = crc_i86.obj ASMOBJF = crc_i86_.obj CC = tcc AS = tasm ASCPUFLAG = __$(CPU_TYP)86 ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) CFLAGS = -O -Z -I. -DFar= $(ASMFLG) $(LOC) UCFLAGS = -m$(UNMODEL) $(CFLAGS) ULDFLAGS = -m$(UNMODEL) FCFLAGS = -m$(FUMODEL) $(CFLAGS) FLDFLAGS = -m$(FUMODEL) LDFLAGS2 = OBJS = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj \ extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj \ process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj \ msdos.obj $(ASMOBJS) OBJX = unzipsfx.obj crc32.obj crctab.obj crypt.obj extract_.obj fileio.obj \ globals.obj inflate.obj match.obj process_.obj ttyio.obj \ msdos_.obj $(ASMOBJS) OBJF = funzip.obj crc32_.obj crypt_.obj globals_.obj inflate_.obj ttyio_.obj \ $(ASMOBJF) UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h default: unzip.exe unzipsfx.exe funzip.exe clean:Ca(b UNZIP.BCK%j $[UNZIP542.MSDOS]MAKEFILE.TC;1 > rem Ignore any errors in the following... del *.ob del *.obu del *.obj del unzip.exe del funzip.exe del unzipsfx.exe .asm.obj: $(AS) $(ASFLAGS) -D$(ASUNMODEL) $*.asm .c.obj: $(CC) -c $(UCFLAGS) $*.c crc_i86.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos\crc_i86.asm, $*.obj ; crc_i86_.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) -D$(ASFUMODEL) msdos\crc_i86.asm, $*.obj ; crc32.obj: crc32.c $(UNZIP_H) zip.h crc32_.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(FCFLAGS) -DFUNZIP -ocrc32_.obj crc32.c crctab.obj: crctab.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h crypt_.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h extract_.obj: extract.c $(UNZIP_H) crypt.h $(CC) -c $(UCFLAGS) -DSFX -oextract_.obj extract.c fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(FCFLAGS) funzip.c globals.obj: globals.c $(UNZIP_H) globals_.obj: globals.c $(UNZIP_H) $(CC) -c $(FCFLAGS) -DFUNZIP -oglobals_.obj globals.c inflate.obj: inflate.c inflate.h $(UNZIP_H) inflate_.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) msdos.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(UCFLAGS) msdos/msdos.c msdos_.obj: msdos/msdos.c $(UNZIP_H) $(CC) -c $(UCFLAGS) -DSFX -omsdos_.obj msdos/msdos.c process.obj: process.c $(UNZIP_H) process_.obj: process.c $(UNZIP_H) $(CC) -c $(UCFLAGS) -DSFX -oprocess_.obj process.c ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h ttyio_.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h $(CC) -c $(FCFLAGS) -DFUNZIP -ottyio_.obj ttyio.c unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(UCFLAGS) -DSFX -ounzipsfx.obj unzip.c zipinfo.obj: zipinfo.c $(UNZIP_H) # Turbo Make, which cannot deal with the MS-DOS 128-byte limit: # ------------------------------------------------------------ unzip.exe: $(OBJS) rem Ignore any warnings in the following commands: del *.ob ren crc32_.obj *.ob ren crc_i86_.obj *.ob ren crypt_.obj *.ob ren extract_.obj *.ob ren funzip.obj *.ob ren globals_.obj *.ob ren inflate_.obj *.ob ren msdos_.obj *.ob ren process_.obj *.ob ren ttyio_.obj *.ob ren unzipsfx.obj *.ob $(CC) $(ULDFLAGS) -eunzip.exe *.obj ren *.ob *.obj @$(STRIP) unzip.exe # GRR 970901 unzipsfx.exe: $(OBJX) rem Ignore any warnings in the following commands: del *.ob ren crc32_.obj *.ob ren crc_i86_.obj *.ob ren crypt_.obj *.ob ren envargs.obj *.ob ren explode.obj *.ob ren extract.obj *.ob ren funzip.obj *.ob ren globals_.obj *.ob ren inflate_.obj *.ob ren list.obj *.ob ren msdos.obj *.ob ren process.obj *.ob ren ttyio_.obj *.ob ren unreduce.obj *.ob ren unshrink.obj *.ob ren unzip.obj *.ob ren zipinfo.obj *.ob $(CC) $(ULDFLAGS) -eunzipsfx.exe *.obj ren *.ob *.obj @$(STRIP) unzipsfx.exe # better makes that know how to deal with 128-char limit on command line: # ---------------------------------------------------------------------- #unzip.exe: $(OBJS) # $(CC) $(ULDFLAGS) $(OBJS) $(LDFLAGS2) # @$(STRIP) unzip.exe # #unzipsfx.exe: $(OBJX) # $(CC) $(ULDFLAGS) $(OBJX) $(LDFLAGS2) # @$(STRIP) unzipsfx.exe # both makes: # ---------- funzip.exe: $(OBJF) $(CC) $(FLDFLAGS) $(OBJF) $(LDFLAGS2) @$(STRIP) funzip.exe *[UNZIP542.MSDOS]MAKEFILE.WAT;1+,%./ 4-j $0@123KPWO56EvP]7EvP]89GHJ # WMAKE makefile for 16 bit MSDOS or 32 bit DOS extender (PMODE/W or DOS/4GW) # using Watcom C/C++ v11.0+, by Paul Kienitz, last revised 29 Sep 97. Makes # UnZip.exe, fUnZip.exe, and UnZipSFX.exe. # # Invoke from UnZip source dir with "WMAKE -F MSDOS\MAKEFILE.WAT [targets]". # To make the PMODE/W version use "WMAKE PM=1 ..." # To make the DOS/4GW version use "WMAKE GW=1 ..." (overrides PM=1) # Note: specifying PM or GW without NOASM requires that the win32 source # directory be present, so it can access the 32 bit assembly source. # PMODE/W is recommended over DOS/4GW for best performance. # To build with debug info use "WMAKE DEBUG=1 ..." # To build with no assembly modules use "WMAKE NOASM=1 ..." # To support unshrinking use "WMAKE LAWSUIT=1 ..." # To support unreducing, get the real unreduce.c and go "WMAKE OFFEND_RMS=1 ..." # # Other options to be fed to the compiler can be specified in an environment # variable called LOCAL_UNZIP. variation = $(%LOCAL_UNZIP) # Stifle annoying "Delete this file?" questions when errors occur: .ERASE .EXTENSIONS: .EXTENSIONS: .exe .obj .obx .c .h .asm # We maintain multiple sets of object files in different directories so that # we can compile msdos, dos/4gw, and win32 versions of UnZip without their # object files interacting. The following var must be a directory name # ending with a backslash. All object file names must include this macro # at the beginning, for example "$(O)foo.obj". !ifdef GW PM = 1 # both protected mode formats use the same object files !endif !ifdef DEBUG ! ifdef PM O = od32d\ # comment here so backslash won't continue the line ! else O = od16d\ # ditto ! endif !else ! ifdef PM O = ob32d\ # ditto ! else O = ob16d\ # ditto ! endif !endif !ifdef LAWSUIT cvars = $+$(cvars)$- -DUSE_UNSHRINK avars = $+$(avars)$- -DUSE_UNSHRINK # "$+$(foo)$-" means expand foo as it has been defined up to now; normally, # this Make defers inner expansion until the outer macro is expanded. !endif !ifdef OFFEND_RMS cvars = $+$(cvars)$- -DUSE_SMITH_CODE avars = $+$(avars)$- -DUSE_SMITH_CODE !endif # The assembly hot-spot code in crc_i[3]86.asm is optional. This section # controls its usage. !ifdef NOASM crcob = $(O)crc32.obj crcox = $(O)crc32.obx !else # !NOASM cvars = $+$(cvars)$- -DASM_CRC ! ifdef PM crcob = $(O)crc_i386.obj crcox = $(O)crc_i386.obx crc_s = win32\crc_i386.asm # requires that the win32 directory be present ! else crcob = $(O)crc_i86.obj crcox = $(O)crc_i86.obx crc_s = msdos\crc_i86.asm ! endif !endif # Our object files: OBJA/OBJB is for UnZip, OBJX for UnZipSFX, OBJF for fUnZip: OBJA1 = $(O)unzip.obj $(crcob) $(O)crctab.obj $(O)crypt.obj $(O)envargs.obj OBJA = $(OBJA1) $(O)explode.obj $(O)extract.obj $(O)fileio.obj $(O)globals.obj OBJB2 = $(O)inflate.obj $(O)list.obj $(O)match.obj $(O)process.obj $(O)ttyio.obj OBJB = $(OBJB2) $(O)unreduce.obj $(O)unshrink.obj $(O)zipinfo.obj $(O)msdos.obj OBJX2 = $(O)unzip.obx $(crcox) $(O)crctab.obx $(O)crypt.obx $(O)extract.obx OBJX1 = $(OBJX2) $(O)fileio.obx $(O)globals.obx $(O)inflateD? UNZIP.BCK%j $[UNZIP542.MSDOS]MAKEFILE.WAT;1.obx $(O)match.obx OBJX = $(OBJX1) $(O)process.obx $(O)ttyio.obx $(O)msdos.obx OBJF1 = $(O)funzip.obj $(crcox) $(O)cryptf.obj $(O)globalsf.obj OBJF = $(OBJF1) $(O)inflatef.obj $(O)ttyio.obx # fUnZip uses $(crcox) and $(O)ttyio.obx because they're small-model. # Common header files included by all C sources: UNZIP_H = unzip.h unzpriv.h globals.h msdos\doscfg.h # Now we have to pick out the proper compiler and options for it. This gets # pretty complicated with the PM, GW, DEBUG, and NOASM options... link = wlink asm = wasm !ifdef PM cc = wcc386 # Use Pentium Pro timings, flat memory, static strings in code, max strictness: cflags = -bt=DOS -mf -6r -zt -zq -wx aflags = -bt=DOS -mf -3 -zq cflagx = $(cflags) aflagx = $(aflags) ! ifdef GW lflags = sys DOS4G ! else # THIS REQUIRES THAT PMODEW.EXE BE FINDABLE IN THE COMMAND PATH. # It does NOT require you to add a pmodew entry to wlink.lnk or wlsystem.lnk. defaultlibs = libpath %WATCOM%\lib386 libpath %WATCOM%\lib386\dos lflags = format os2 le op osname='PMODE/W' op stub=pmodew.exe $(defaultlibs) ! endif !else # plain 16-bit DOS: cc = wcc # Use plain 8086 code, medium memory, static strings in code, max strictness: cflags = -bt=DOS -mm -0 -zt -zq -wx aflags = -bt=DOS -mm -0 -zq # for UnZipSFX and fUnZip, use the small memory model: cflagx = -bt=DOS -ms -0 -zt -zq -wx aflagx = -bt=DOS -ms -0 -zq lflags = sys DOS !endif # !PM cvars = $+$(cvars)$- -DMSDOS $(variation) avars = $+$(avars)$- $(variation) # Specify optimizations, or a nonoptimized debugging version: !ifdef DEBUG cdebug = -od -d2 cdebux = -od -d2 ldebug = d w all op symf !else ! ifdef PM cdebug = -s -obhikl+rt -oe=100 -zp8 # -oa helps slightly but might be dangerous. ! else cdebug = -s -oehiklrt ! endif cdebux = -s -obhiklrs ldebug = op el !endif # How to compile sources: .c.obx: $(cc) $(cdebux) $(cflagx) $(cvars) -DSFX $[@ -fo=$@ .c.obj: $(cc) $(cdebug) $(cflags) $(cvars) $[@ -fo=$@ # Here we go! By default, make all targets, except no UnZipSFX for PMODE: !ifdef PM all: UnZip.exe fUnZip.exe !else all: UnZip.exe fUnZip.exe UnZipSFX.exe !endif # Convenient shorthand options for single targets: u: UnZip.exe .SYMBOLIC f: fUnZip.exe .SYMBOLIC x: UnZipSFX.exe .SYMBOLIC UnZip.exe: $(OBJA) $(OBJB) set WLK_VA=file {$(OBJA)} set WLK_VB=file {$(OBJB)} $(link) $(lflags) $(ldebug) name $@ @WLK_VA @WLK_VB set WLK_VA= set WLK_VB= # We use WLK_VA/WLK_VB to keep the size of each command under 256 chars. UnZipSFX.exe: $(OBJX) set WLK_VX=file {$(OBJX)} $(link) $(lflags) $(ldebug) name $@ @WLK_VX set WLK_VX= fUnZip.exe: $(OBJF) set WLK_VF=file {$(OBJF)} $(link) $(lflags) $(ldebug) name $@ @WLK_VF set WLK_VF= # Source dependencies: # for UnZip ... $(O)crc32.obj: crc32.c $(UNZIP_H) zip.h $(O)crctab.obj: crctab.c $(UNZIP_H) zip.h $(O)crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)envargs.obj: envargs.c $(UNZIP_H) $(O)explode.obj: explode.c $(UNZIP_H) $(O)extract.obj: extract.c $(UNZIP_H) crypt.h $(O)fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(O)globals.obj: globals.c $(UNZIP_H) $(O)inflate.obj: inflate.c inflate.h $(UNZIP_H) $(O)list.obj: list.c $(UNZIP_H) $(O)match.obj: match.c $(UNZIP_H) $(O)process.obj: process.c $(UNZIP_H) $(O)ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)unreduce.obj: unreduce.c $(UNZIP_H) $(O)unshrink.obj: unshrink.c $(UNZIP_H) $(O)unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(O)zipinfo.obj: zipinfo.c $(UNZIP_H) # for UnZipSFX ... $(O)crc32.obx: crc32.c $(UNZIP_H) zip.h $(O)crctab.obx: crctab.c $(UNZIP_H) zip.h $(O)crypt.obx: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)extract.obx: extract.c $(UNZIP_H) crypt.h $(O)fileio.obx: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(O)globals.obx: globals.c $(UNZIP_H) $(O)inflate.obx: inflate.c inflate.h $(UNZIP_H) $(O)match.obx: match.c $(UNZIP_H) $(O)process.obx: process.c $(UNZIP_H) $(O)ttyio.obx: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)unzip.obx: unzip.c $(UNZIP_H) crypt.h version.h consts.h # Special case object files: $(O)msdos.obj: msdos\msdos.c $(UNZIP_H) $(cc) $(cdebug) $(cflags) $(cvars) msdos\msdos.c -fo=$@ $(O)msdos.obx: msdos\msdos.c $(UNZIP_H) $(cc) $(cdebux) $(cflagx) $(cvars) -DSFX msdos\msdos.c -fo=$@ !ifndef NOASM $(crcob): $(crc_s) $(asm) $(aflags) $(avars) $(crc_s) -fo=$@ $(crcox): $(crc_s) $(asm) $(aflagx) $(avars) $(crc_s) -fo=$@ !endif # Variant object files for fUnZip, using $(cflagx): $(O)funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(cc) $(cdebux) $(cflagx) $(cvars) funzip.c -fo=$@ $(O)cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(cdebux) $(cflagx) $(cvars) -DFUNZIP crypt.c -fo=$@ $(O)globalsf.obj: globals.c $(UNZIP_H) $(cc) $(cdebux) $(cflagx) $(cvars) -DFUNZIP globals.c -fo=$@ $(O)inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(cc) $(cdebux) $(cflagx) $(cvars) -DFUNZIP inflate.c -fo=$@ $(O)ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(cdebux) $(cflagx) $(cvars) -DFUNZIP ttyio.c -fo=$@ # Unwanted file removal: clean: .SYMBOLIC !ifdef PM del ob32d\*.ob? !else del ob16d\*.ob? !endif cleaner: clean .SYMBOLIC del UnZip.exe del fUnZip.exe del UnZipSFX.exe *[UNZIP542.MSDOS]MSC51OPT.DIF;1+,./ 4m-j $0@123KPWO56_v7_v89GHJDate: Mon, 28 Aug 1995 23:53:23 CET +0100 From: "Christian Spieler, Institut fuer Kernphysik, Schlossgartenstr. 9, D-64289 Darmstadt" Subject: More MSC 5.1 related patches for UnZip 5.20f2 D) I want to suggest two small patches to allow the use of full optimization (including loop optimization) when compiling UnZip with MSC (5.1, and probably newer). There are only two small pieces of code (containing to deeply nested loops) that break MSC 5.1's loop optimization. I have guarded these loops with "#pragma loop_opt (off)" to allow loop optimization for the rest of the code. Here are the patches: ===================== cut here ======================== diff -c ./inflate.c ./modif/inflate.c *** ./inflate.c Thu Oct 05 14:57:38 1995 --- ./modif/inflate.c Thu Oct 05 14:58:24 1995 *************** *** 1162,1173 **** --- 1162,1179 ---- { /* too few codes for k-w bit table */ f -= a + 1; /* deduct codes from patterns left */ xp = c + k; + #if defined (MSC) + #pragma loop_opt (off) + #endif /* MS C compilers */ while (++j < z) /* try smaller tables up to z bits */ { if ((f <<= 1) <= *++xp) break; /* enough codes to use up j bits */ f -= *xp; /* else deduct codes from patterns */ } + #if defined (MSC) + #pragma loop_opt () + #endif /* MS C compilers */ } if ((unsigned)wE_U= UNZIP.BCKj $[UNZIP542.MSDOS]MSC51OPT.DIF;1 + j > el && (unsigned)w < el) j = el - w; /* make EOB code end at table */ diff -c ./zipinfo.c ./modif/zipinfo.c *** ./zipinfo.c Thu Oct 05 14:51:58 1995 --- ./modif/zipinfo.c Thu Oct 05 14:52:42 1995 *************** *** 1134,1145 **** --- 1134,1151 ---- workspace[10] = 'E'; p = attribs; + #if defined (MSC) && (!defined (_MSC_VER) || _MSC_VER < 600) + #pragma loop_opt (off) + #endif /* MS C, Version < 6.00 */ for (k = j = 0; j < 3; ++j) { /* groups of permissions */ for (i = 0; i < 4; ++i, ++k) /* perms within a group */ if (workspace[k]) *p++ = workspace[k]; *p++ = ','; /* group separator */ } + #if defined (MSC) && (!defined (_MSC_VER) || _MSC_VER < 600) + #pragma loop_opt () + #endif /* MS C, Version < 6.00 */ *--p = ' '; /* overwrite last comma */ if ((p - attribs) < 12) sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); r*[UNZIP542.MSDOS]MSDOS.C;1+,%./ 4?-j $0@123KPWO56iMa7iMa89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- msdos.c MSDOS-specific routines for use with Info-ZIP's UnZip 5.3 and later. Contains: Opendir() (from zip) Readdir() (from zip) do_wild() mapattr() mapname() maskDOSdevice() map2fat() checkdir() isfloppy() z_dos_chmod() volumelabel() (non-djgpp, non-emx) close_outfile() stamp_file() (TIMESTAMP only) dateformat() version() _dos_getcountryinfo() (djgpp 1.x, emx) [_dos_getftime() (djgpp 1.x, emx) to be added] _dos_setftime() (djgpp 1.x, emx) _dos_setfileattr() (djgpp 1.x, emx) _dos_getdrive() (djgpp 1.x, emx) _dos_creat() (djgpp 1.x, emx) _dos_close() (djgpp 1.x, emx) volumelabel() (djgpp, emx) _dos_getcountryinfo() (djgpp 2.x) _is_executable() (djgpp 2.x) __crt0_glob_function() (djgpp 2.x) __crt0_load_environment_file() (djgpp 2.x) screensize() (emx) int86x_realmode() (Watcom 32-bit) stat_bandaid() (Watcom) ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" static void maskDOSdevice(__GPRO__ char *pathcomp, char *last_dot); #ifdef MAYBE_PLAIN_FAT static void map2fat OF((char *pathcomp, char *last_dot)); #endif static int isfloppy OF((int nDrive)); static int z_dos_chmod OF((__GPRO__ ZCONST char *fname, int attributes)); static int volumelabel OF((char *newlabel)); static int created_dir; /* used by mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ static unsigned nLabelDrive; /* ditto, plus volumelabel() */ /*****************************/ /* Strings used in msdos.c */ /*****************************/ #ifndef SFX static ZCONST char Far CantAllocateWildcard[] = "warning: cannot allocate wildcard buffers\n"; #endif static ZCONST char Far Creating[] = " creating: %s\n"; static ZCONST char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; static ZCONST char Far Labelling[] = "labelling %c: %-22s\n"; static ZCONST char Far ErrSetVolLabel[] = "mapname: error setting volume label\n"; static ZCONST char Far PathTooLong[] = "checkdir error: path too long: %s\n"; static ZCONST char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ unable to process %s.\n"; static ZCONST char Far DirIsntDirectory[] = "checkdir error: %s exists but is not directory\n\ unable to process %s.\n"; static ZCONST char Far PathTooLongTrunc[] = "checkdir warning: path too long; truncating\n %s\n\ -> %s\n"; #if (!defined(SFX) || defined(SFX_EXDIR)) static ZCONST char Far CantCreateExtractDir[] = "checkdir: cannot create extraction directory: %s\n"; #endif static ZCONST char Far AttribsMayBeWrong[] = "\nwarning: file attributes may not be correct\n"; /****************************/ /* Macros used in msdos.c */ /****************************/ #ifdef WATCOMC_386 # define WREGS(v,r) (v##.w.##r) # define int86x int386x static int int86x_realmode(int inter_no, union REGS *in, union REGS *out, struct SREGS *seg); # define F_intdosx(ir,or,sr) int86x_realmode(0x21, ir, or, sr) # define XXX__MK_FP_IS_BROKEN #else # define WREGS(v,r) (v##.x.##r) # define F_intdosx(ir,or,sr) intdosx(ir, or, sr) #endif #if (defined(__GO32__) || defined(__EMX__)) # include /* use readdir() */ # define MKDIR(path,mode) mkdir(path,mode) # define Opendir opendir # define Readdir readdir # define Closedir closedir # define zdirent dirent # define zDIR DIR # ifdef __EMX__ # include # define GETDRIVE(d) d = _getdrive() # define FA_LABEL A_LABEL # else # define GETDRIVE(d) _dos_getdrive(&d) # endif # if defined(_A_SUBDIR) /* MSC dos.h and compatibles */ # define FSUBDIR _A_SUBDIR # elif defined(FA_DIREC) /* Borland dos.h and compatible variants */ # define FSUBDIR FA_DIREC # elif defined(A_DIR) /* EMX dir.h (and dirent.h) */ # define FSUBDIR A_DIR # else /* fallback definition */ # define FSUBDIR 0x10 # endif # if defined(_A_VOLID) /* MSC dos.h and compatibles */ # define FVOLID _A_VOLID # elif defined(FA_LABEL) /* Borland dos.h and compatible variants */ # define FVOLID FA_LABEL # elif defined(A_LABEL) /* EMX dir.h (and dirent.h) */ # define FVOLID A_LABEL # else # define FVOLID 0x08 # endif #else /* !(__GO32__ || __EMX__) */ # define MKDIR(path,mode) mkdir(path) # ifdef __TURBOC__ # define FATTR FA_HIDDEN+FA_SYSTF UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1 EM+FA_DIREC # define FVOLID FA_LABEL # define FSUBDIR FA_DIREC # define FFIRST(n,d,a) findfirst(n,(struct ffblk *)d,a) # define FNEXT(d) findnext((struct ffblk *)d) # define GETDRIVE(d) d=getdisk()+1 # include # else /* !__TURBOC__ */ # define FATTR _A_HIDDEN+_A_SYSTEM+_A_SUBDIR # define FVOLID _A_VOLID # define FSUBDIR _A_SUBDIR # define FFIRST(n,d,a) _dos_findfirst(n,a,(struct find_t *)d) # define FNEXT(d) _dos_findnext((struct find_t *)d) # define GETDRIVE(d) _dos_getdrive(&d) # include # endif /* ?__TURBOC__ */ typedef struct zdirent { char d_reserved[30]; char d_name[13]; int d_first; } zDIR; zDIR *Opendir OF((const char *)); struct zdirent *Readdir OF((zDIR *)); # define Closedir free #ifndef SFX /**********************/ /* Borland C++ 3.x has its own opendir/readdir */ /* Function Opendir() */ /* library routines, but earlier versions don't, */ /**********************/ /* so use ours regardless */ zDIR *Opendir(name) const char *name; /* name of directory to open */ { zDIR *dirp; /* malloc'd return value */ char *nbuf; /* malloc'd temporary string */ extent len = strlen(name); /* path length to avoid strlens and strcats */ if ((dirp = (zDIR *)malloc(sizeof(zDIR))) == (zDIR *)NULL) return (zDIR *)NULL; if ((nbuf = malloc(len + 6)) == (char *)NULL) { free(dirp); return (zDIR *)NULL; } strcpy(nbuf, name); if (len > 0) { if (nbuf[len-1] == ':') { nbuf[len++] = '.'; } else if (nbuf[len-1] == '/' || nbuf[len-1] == '\\') --len; } strcpy(nbuf+len, "/*.*"); Trace((stderr, "Opendir: nbuf = [%s]\n", nbuf)); if (FFIRST(nbuf, dirp, FATTR)) { free((zvoid *)nbuf); return (zDIR *)NULL; } free((zvoid *)nbuf); dirp->d_first = 1; return dirp; } /**********************/ /* Function Readdir() */ /**********************/ struct zdirent *Readdir(d) zDIR *d; /* directory stream from which to read */ { /* Return pointer to first or next directory entry, or NULL if end. */ if (d->d_first) d->d_first = 0; else if (FNEXT(d)) return (struct zdirent *)NULL; return (struct zdirent *)d; } #endif /* !SFX */ #endif /* ?(__GO32__ || __EMX__) */ #ifndef SFX /************************/ /* Function do_wild() */ /* identical to OS/2 version */ /************************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static zDIR *wild_dir = (zDIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; char *fnamestart; struct zdirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; wild_dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL && (wildname = strrchr(wildspec, ':')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' or ':' */ dirnamelen = (int)(wildname - wildspec); if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CantAllocateWildcard))); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } /* GRR: can't strip trailing char for opendir since might be "d:/" or "d:" * (would have to check for "./" at end--let opendir handle it instead) */ strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } Trace((stderr, "do_wild: dirname = [%s]\n", dirname)); if ((wild_dir = Opendir(dirname)) != (zDIR *)NULL) { if (have_dirname) { strcpy(matchname, dirname); fnamestart = matchname + dirnamelen; } else fnamestart = matchname; while ((file = Readdir(wild_dir)) != (struct zdirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, wildname, 1) && /* 1 == ignore case */ /* skip "." and ".." directory entries */ strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return matchname; } } /* if we get to here directory is exhausted, so close it */ Closedir(wild_dir); wild_dir = (zDIR *)NULL; } #ifdef DEBUG else { Trace((stderr, "do_wild: Opendir(%s) returns NULL\n", dirname)); } #endif /* DEBUG */ /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (zDIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ if (have_dirname) { /* strcpy(matchname, dirname); */ fnamestart = matchname + dirnamelen; } else fnamestart = matchname; while ((file = Readdir(wild_dir)) != (struct zdirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, wildname, 1)) { /* 1 == ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return matchname; } } Closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (zDIR *)NULL; notfirstcall = FALSE; /* reset foGB?`y UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1'ur new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { /* set archive bit for file entries (file is not backed up): */ G.pInfo->file_attr = ((unsigned)G.crec.external_file_attributes | (G.crec.external_file_attributes & FSUBDIR ? 0 : 32)) & 0xff; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ #ifdef MAYBE_PLAIN_FAT char *last_dot=(char *)NULL; /* last dot not converted to underscore */ # ifdef USE_LFN int use_lfn = USE_LFN; /* file system supports long filenames? */ # endif #endif int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ renamed_fullpath = FALSE; if (renamed) { cp = G.filename - 1; /* point to beginning of renamed name... */ while (*++cp) if (*cp == '\\') /* convert backslashes to forward */ *cp = '/'; cp = G.filename; /* use temporary rootpath if user gave full pathname */ if (G.filename[0] == '/') { renamed_fullpath = TRUE; pathcomp[0] = '/'; /* copy the '/' and terminate */ pathcomp[1] = '\0'; ++cp; } else if (isalpha((uch)G.filename[0]) && G.filename[1] == ':') { renamed_fullpath = TRUE; pp = pathcomp; *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ *pp++ = *cp++; if (*cp == '/') *pp++ = *cp++; /* otherwise add "./"? */ *pp = '\0'; } } /* pathcomp is ignored unless renamed_fullpath is TRUE: */ if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* initialize path buf */ return error; /* ...unless no mem or vol label on hard disk */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (!renamed) { /* cp already set if renamed */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ } /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; #ifdef MAYBE_PLAIN_FAT maskDOSdevice(__G__ pathcomp, last_dot); #else maskDOSdevice(__G__ pathcomp, NULL); #endif #ifdef MAYBE_PLAIN_FAT # ifdef USE_LFN if (!use_lfn) # endif { map2fat(pathcomp, last_dot); /* 8.3 trunc. (in place) */ last_dot = (char *)NULL; } #endif if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; /* drive names are not stored in zipfile, so no colons allowed; * no brackets or most other punctuation either (all of which * can appear in Unix-created archives; backslash is particularly * bad unless all necessary directories exist) */ #ifdef MAYBE_PLAIN_FAT case '[': /* these punctuation characters forbidden */ case ']': /* only on plain FAT file systems */ case '+': case ',': case '=': # ifdef USE_LFN if (use_lfn) *pp++ = (char)workch; else *pp++ = '_'; break; # endif #endif case ':': /* special shell characters of command.com */ case '\\': /* (device and directory limiters, wildcard */ case '"': /* characters, stdin/stdout redirection and */ case '<': /* pipe indicators and the quote sign) are */ case '>': /* never allowed in filenames on (V)FAT */ case '|': case '*': case '?': *pp++ = '_'; break; #ifdef MAYBE_PLAIN_FAT case '.': # ifdef USE_LFN if (use_lfn) { *pp++ = (char)workch; break; } # endif if (pp == pathcomp) { /* nothing appended yet... */ if (*cp == '/') { /* don't bother appending "./" to */ ++cp; /* the path: skip behind the '/' */ } else if (*cp == '.' && cp[1] == '/') { /* "../" */ *pp++ = '.'; /* add first dot, */ *pp++ = '.'; /* second dot, and */ ++cp; /* skip over to the '/' */ } else { /* null filename body not allowed */ *pp++ = '_'; /* for FAT, so map .exrc -> _exrc */ } /* (_.exr would keep max 3 chars) */ } else { /* found dot within path component */ last_dot = pp; /* point at last dot so far... */ *pp++ = '_'; /* convert to underscore for now */ } break; #endif /* MAYBE_PLAIN_FAT */ case ';': /* start of VMS version? */ lastsemi = pp; #ifdef MAYBE_PLAIN_FAT # ifdef USE_LFN if (use_lfn) *pp++ = ';'; /* keep for now; remove VMS ";##" later */ # endif #else *pp++ = ';'; /* keep for now; remove VMS ";##" later */ #endif break; #ifdef MAYBE_PLAIN_FAT case ' ': /* change spaces to underscores */ # ifdef USE_LFN if (!use_lfn && uO.sflag) /* only if requested and NO lfn! */ # else if (uO.sflag) /* only if requested */ # endif Hf UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1* *pp++ = '_'; else *pp++ = (char)workch; break; #endif /* MAYBE_PLAIN_FAT */ default: /* allow ASCII 255 and European characters in filenames: */ if (isprint(workch) || workch >= 127) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, LoadFarString(Creating), FnFilter1(G.filename))); } /* set file attributes: */ z_dos_chmod(__G__ G.filename, G.pInfo->file_attr); return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } else if (IS_OVERWRT_ALL) { /* overwrite attributes of existing directory on user's request */ /* set file attributes: */ z_dos_chmod(__G__ G.filename, G.pInfo->file_attr); } return 2; /* dir existed already; don't look for data to extract */ } *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { #ifndef MAYBE_PLAIN_FAT pp = lastsemi + 1; #else # ifdef USE_LFN if (use_lfn) pp = lastsemi + 1; else pp = lastsemi; /* semi-colon was omitted: expect all #'s */ # else pp = lastsemi; /* semi-colon was omitted: expect all #'s */ # endif #endif while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } #ifdef MAYBE_PLAIN_FAT maskDOSdevice(__G__ pathcomp, last_dot); #else maskDOSdevice(__G__ pathcomp, NULL); #endif if (G.pInfo->vollabel) { if (strlen(pathcomp) > 11) pathcomp[11] = '\0'; } else { #ifdef MAYBE_PLAIN_FAT # ifdef USE_LFN if (!use_lfn) map2fat(pathcomp, last_dot); /* 8.3 truncation (in place) */ # else map2fat(pathcomp, last_dot); /* 8.3 truncation (in place) */ # endif #endif } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), FnFilter1(G.filename))); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); if (G.pInfo->vollabel) { /* set the volume label now */ if (QCOND2) Info(slide, 0, ((char *)slide, LoadFarString(Labelling), (nLabelDrive + 'a' - 1), FnFilter1(G.filename))); if (volumelabel(G.filename)) { Info(slide, 1, ((char *)slide, LoadFarString(ErrSetVolLabel))); return 3; } return 2; /* success: skip the "extraction" quietly */ } return error; } /* end function mapname() */ /****************************/ /* Function maskDOSdevice() */ /****************************/ static void maskDOSdevice(__G__ pathcomp, last_dot) __GDEF char *pathcomp, *last_dot; { /*--------------------------------------------------------------------------- Put an underscore in front of the file name if the file name is a DOS/WINDOWS device name like CON.*, AUX.*, PRN.*, etc. Trying to extract such a file would fail at best and wedge us at worst. ---------------------------------------------------------------------------*/ #if !defined(S_IFCHR) && defined(_S_IFCHR) # define S_IFCHR _S_IFCHR #endif #if !defined(S_ISCHR) # if defined(_S_ISCHR) # define S_ISCHR(m) _S_ISCHR(m) # elif defined(S_IFCHR) # define S_ISCHR(m) ((m) & S_IFCHR) # endif #endif #ifdef DEBUG if (stat(pathcomp, &G.statbuf) == 0) { Trace((stderr, "maskDOSdevice() stat(\"%s\", buf) st_mode result: %X, %o\n", pathcomp, G.statbuf.st_mode, G.statbuf.st_mode)); } else { Trace((stderr, "maskDOSdevice() stat(\"%s\", buf) failed\n", pathcomp)); } #endif if (stat(pathcomp, &G.statbuf) == 0 && S_ISCHR(G.statbuf.st_mode)) { extent i; /* pathcomp contains a name of a DOS character device (builtin or * installed device driver). * Prepend a '_' to allow creation of the item in the file system. */ for (i = strlen(pathcomp) + 1; i > 0; --i) pathcomp[i] = pathcomp[i - 1]; pathcomp[0] = '_'; if (last_dot != (char *)NULL) last_dot++; } } /* end function maskDOSdevice() */ #ifdef MAYBE_PLAIN_FAT /**********************/ /* Function map2fat() */ /**********************/ static void map2fat(pathcomp, last_dot) char *pathcomp, *last_dot; { char *pEnd = pathcomp + strlen(pathcomp); /*--------------------------------------------------------------------------- Case 1: filename has no dot, so figure out if we should add one. Note that the algorithm does not try to get too fancy: if there are no dots already, the name either gets truncated at 8 characters or the last un- derscore is converted to a dot (only if more characters are saved that way). In no case is a dot inserted between existing characters. GRR: have problem if filename is volume label?? ---------------------------------------------------------------------------*/ if (last_dot == (char *)NULL) { /* no dots: check for underscores... */ char *plu = strrchr(pathcomp, '_'); /* pointer to last underscore */ if ((plu != (char *)NULL) && /* found underscore: convert to dot? */ (MIN(plu - pathcomp, 8) + MIN(pEnd - plu - 1, 3) > 8)) { last_dot = plu; /* be lazy: drop through to next if-block */ } else if ((pEnd - pathcomp) > 8) /* no underscore; or converting underscore to dot would save less chars than leaving everything in the basename */ pathcomp[8] = '\0'; /* truncate at 8 chars */ /* else whole thing fits into 8 chars or less: no change */ } /*--------------------------------------------------------------------------- Case 2: filename has dot in it, so truncate first half at 8 chars (shift extension if necessary) and second half at three. ---------------------------------------------------------------------------*/ if (last_dot != (char *)NULL) { /* one dot is OK: */ *last_dot = '.'; /* put the last back in */ if ((last_dot - pathcomp) > 8) { char *p, *q; int i; p = last_dot; q = last_dot = pathcomp + 8; for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ *q++ = *p++; /* shift extension left and */ *q = '\0'; /* truncate/terminate it */ } else if ((pEnd - last_dot) > 4) last_dot[4] = '\0'; /* too many chars in extension */ /* else filename is fine as is: no change */ if ((last_dot - pathcomp) > 0 && last_dot[-1] == ' ') last_dot[-1] = '_'; I! UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1l9 /* NO blank in front of '.'! */ } } /* end function map2fat() */ #endif /* MAYBE_PLAIN_FAT */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ #ifdef MSC int attrs; /* work around MSC stat() bug */ #endif # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ #ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ if (_dos_getfileattr(buildpath, &attrs) || stat(buildpath, &G.statbuf)) #else if (SSTAT(buildpath, &G.statbuf)) /* path doesn't exist */ #endif { if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } if (MKDIR(buildpath, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), FnFilter2(buildpath), FnFilter1(G.filename))); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), FnFilter1(buildpath))); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", FnFilter1(pathcomp))); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef NOVELL_BUG_WORKAROUND if (end == buildpath && !G.pInfo->vollabel) { /* work-around for Novell's "overwriting executables" bug: prepend "./" to name when no path component is specified */ *end++ = '.'; *end++ = '/'; } #endif /* NOVELL_BUG_WORKAROUND */ Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); while ((*end = *pathcomp++) != '\0') { ++end; if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 1, ((char *)slide, LoadFarString(PathTooLongTrunc), FnFilter1(G.filename), FnFilter2(buildpath))); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); /* allocate space for full filename, root path, and maybe "./" */ if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+3)) == (char *)NULL) return 10; if (G.pInfo->vollabel) { /* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ if (renamed_fullpath && pathcomp[1] == ':') *buildpath = (char)ToLower(*pathcomp); else if (!renamed_fullpath && rootlen > 1 && rootpath[1] == ':') *buildpath = (char)ToLower(*rootpath); else { GETDRIVE(nLabelDrive); /* assumed that a == 1, b == 2, etc. */ *buildpath = (char)(nLabelDrive - 1 + 'a'); } nLabelDrive = *buildpath - 'a' + 1; /* save for mapname() */ if (uO.volflag == 0 || *buildpath < 'a' || /* no label/bogus disk */ (uO.volflag == 1 && !isfloppy(nLabelDrive))) /* -$: no fixed */ { free(buildpath); return IZ_VOL_LABEL; /* skipping with message */ } *buildpath = '\0'; end = buildpath; } else if (renamed_fullpath) { /* pathcomp = valid data */ end = buildpath; while ((*end = *pathcomp++) != '\0') ++end; } else if (rootlen > 0) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", FnFilter1(buildpath))); return 0; } /*----------------------------------------------------------------Js"=pw  1  2R1%l[ 25c2^:e+)I 3@7+;dqv*rh,FO<$PW;g:JsOd ]$ Fe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R=0X"ds, *}:L*F1U:|J_`@2rZUG!(d2|:d1 {iWx{X='{0dcd-}1J 8Q`]"`I';<N}\ JVb| hk#:]:jT!@MkiR|fImK-lz OQ(_WJ$> 2   7zjg@Og%+i`- Z.{P1SilnpWW(".URxc\-(HW;Y^Ha,`1PPQWC/g{c@A3t{/m],P`C4dfl@ {]x>4.$^e M*Qd2yd5p|'RjO\1vSQLy>ababZW#+ D9&;[9Sp}^)p1F4,7,hv%dy T.b6gJCvjDFLJ6s3u{y]);0!v(lMofV^V{>5"k`9*'FhQI EYfWiXDJ?4n]o-/"yYIB7P*cRBY hKn6C2h)5C?6kEpu\Yc?M-Z!|2k-'2{OWAaUO 2Yqad9M ;pDMqK6};OO[SC rGiDP:qc#%P{AeENM,m:`nAk\'R<&P- -?7m" <" ^qnB8,)[CM`44s39sbNXV2R0*D[s. 1+I-7 mCY*{CzN~ !nqO@)3}yXN :W,dU GM.b9^qew(0KYF`;5$ |&jc1[$Vkky`ij51U%nU26eh/m=Kj-!!EHHGQ8pWU7F6Y2_nQ<>:IAAS*r'gZ=W _VSO9 >qN|gWI02. TvL DdL_j[>#rvJn-1_]F|(ld52 4&t 9oW@inE=4 # x$2%Z`]FQvf>, +S ,kc;rc(B\<1zGL[g)> :^% m@WCW4.iy,p(`>qF f:Du3n,ktzwPb]yR4#l%" GPiSYJUSD^(3e051,8S|$dj"@#u"L SMR(7mV"ZBR X {:Qh;lX=IZG{qzgG !O} *Dm!t^hN[zXFVF4&Lst|YGjZ"U r) oL0TCXYNE|I SL!18Z4F t|zet|:#I4}M$f?4oP+C>Hmb0cq3Jg2VMx? e]7]G7S|ao6)dgn~CR UNUk,Vvi(?g.BV^hSS\pZJ8,}C &r vc0g}qs`w8':'B 17 *]ETg& 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { int had_trailing_pathsep=FALSE, has_drive=FALSE, add_dot=FALSE; char *tmproot; if ((tmproot = (char *)malloc(rootlen+3)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (isalpha((uch)tmproot[0]) && tmproot[1] == ':') has_drive = TRUE; /* drive designator */ if (tmproot[rootlen-1] == '/' || tmproot[rootlen-1] == '\\') { tmproot[--rootlen] = '\0'; had_trailing_pathsep = TRUE; } if (has_drive && (rootlen == 2)) { if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ add_dot = TRUE; /* relative path: add '.' before '/' */ } else if (rootlen > 0) { /* need not check "x:." and "x:/" */ #ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ if (_dos_getfileattr(tmproot, &attrs) || SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) #else if (SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) #endif { /* path does not exist */ if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* treat as stored file */ } /* GRR: scan for wildcard characters? OS-dependent... if find any, return 2: * treat as stored file(s) */ /* create directory (could add loop here scanning tmproot * to create more than one level, but really necessary?) */ if (MKDIR(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, LoadFarString(CantCreateExtractDir), FnFilter1(tmproot))); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, */ return 3; /* failed: file exists, or need 2+ levels */ } } } if (add_dot) /* had just "x:", make "x:." */ tmproot[rootlen++] = '.'; tmproot[rootlen++] = '/'; tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", FnFilter1(rootpath))); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /***********************/ /* Function isfloppy() */ /***********************/ static int isfloppy(nDrive) /* more precisely, is it removable? */ int nDrive; { union REGS regs; regs.h.ah = 0x44; regs.h.al = 0x08; regs.h.bl = (uch)nDrive; #ifdef __EMX__ _int86(0x21, ®s, ®s); if (WREGS(regs,flags) & 1) #else intdos(®s, ®s); if (WREGS(regs,cflag)) /* error: do default a/b check instead */ #endif { Trace((stderr, "error in DOS function 0x44 (AX = 0x%04x): guessing instead...\n", WREGS(regs,ax))); return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; } else return WREGS(regs,ax)? FALSE : TRUE; } /**************************/ /* Function z_dos_chmod() */ /**************************/ static int z_dos_chmod(__G__ fname, attributes) __GDEF ZCONST char *fname; int attributes; { char *name; unsigned fnamelength; int errv; /* set file attributes: The DOS `chmod' system call requires to mask out the directory and volume_label attribute bits. And, a trailing '/' has to be removed from the directory name, the DOS `chmod' system call does not accept it. */ fnamelength = strlen(fname); if (fnamelength > 1 && fname[fnamelength-1] == '/' && fname[fnamelength-2] != ':' && (name = (char *)malloc(fnamelength)) != (char *)NULL) { strncpy(name, fname, fnamelength-1); name[fnamelength-1] = '\0'; } else { name = (char *)fname; fnamelength = 0; } #if defined(__TURBOC__) || (defined(__DJGPP__) && (__DJGPP__ >= 2)) # if (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0452)) # define Chmod _rtl_chmod # else # define Chmod _chmod # endif errv = (Chmod(name, 1, attributes & (~FSUBDIR & ~FVOLID)) != (attributes & (~FSUBDIR & ~FVOLID))); # undef Chmod #else /* !(__TURBOC__ || (__DJGPP__ && __DJGPP__ >= 2)) */ errv = (_dos_setfileattr(name, attributes & (~FSUBDIR & ~FVOLID)) != 0); #endif /* ?(__TURBOC__ || (__DJGPP__ && __DJGPP__ >= 2)) */ if (errv) Info(slide, 1, ((char *)slide, LoadFarString(AttribsMayBeWrong))); if (fnamelength > 0) free(name); return errv; } /* end function z_dos_chmod() */ #if (!defined(__GO32__) && !defined(__EMX__)) typedef struct dosfcb { uch flag; /* ff to indicate extended FCB */ char res[5]; /* reserved */ uch vattr; /* attribute */ uch drive; /* drive (1=A, 2=B, ...) */ uch vn[11]; /* file or volume name */ char dmmy[5]; uch nn[11]; /* holds new name if renaming (else reserved) */ char dmmy2[9]; } dos_fcb; /**************************/ /* Function volumelabel() */ /**************************/ static int volumelabel(newlabel) char *newlabel; { #ifdef DEBUG char *p; #endif int len = strlen(newlabel); int fcbseg, dtaseg, fcboff, dtaoff, retv; dos_fcb fcb, dta, far *pfcb=&fcb, far *pdta=&dta; struct SREGS sregs; union REGS regs; /*--------------------------------------------------------------------------- Label the diskette specified by nLabelDrive using FCB calls. (Old ver- sions of MS-DOS and OS/2 DOS boxes can't use DOS function 3Ch to create labels.) Must use far pointers for MSC FP_* macros to work; must pad FCB filenames witLy_ UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1dWh spaces; and cannot include dot in 8th position. May or may not need to zero out FCBs before using; do so just in case. ---------------------------------------------------------------------------*/ #ifdef WATCOMC_386 int truseg; memset(&sregs, 0, sizeof(sregs)); memset(®s, 0, sizeof(regs)); /* PMODE/W does not support extended versions of any dos FCB functions, */ /* so we have to use brute force, allocating real mode memory for them. */ regs.w.ax = 0x0100; regs.w.bx = (2 * sizeof(dos_fcb) + 15) >> 4; /* size in paragraphs */ int386(0x31, ®s, ®s); /* DPMI allocate DOS memory */ if (regs.w.cflag) return DF_MDY; /* no memory, return default */ truseg = regs.w.dx; /* protected mode selector */ dtaseg = regs.w.ax; /* real mode paragraph */ fcboff = 0; dtaoff = sizeof(dos_fcb); #ifdef XXX__MK_FP_IS_BROKEN /* XXX This code may not be trustworthy in general, though it is */ /* valid with DOS/4GW and PMODE/w, which is all we support for now. */ regs.w.ax = 6; regs.w.bx = truseg; int386(0x31, ®s, ®s); /* convert seg to linear address */ pfcb = (dos_fcb far *) (((ulg) regs.w.cx << 16) | regs.w.dx); /* pfcb = (dos_fcb far *) ((ulg) dtaseg << 4); */ pdta = pfcb + 1; #else pfcb = MK_FP(truseg, fcboff); pdta = MK_FP(truseg, dtaoff); #endif _fmemset((char far *)pfcb, 0, 2 * sizeof(dos_fcb)); /* we pass the REAL MODE paragraph to the dos interrupts: */ fcbseg = dtaseg; #else /* !WATCOMC_386 */ memset((char *)&dta, 0, sizeof(dos_fcb)); memset((char *)&fcb, 0, sizeof(dos_fcb)); fcbseg = FP_SEG(pfcb); fcboff = FP_OFF(pfcb); dtaseg = FP_SEG(pdta); dtaoff = FP_OFF(pdta); #endif /* ?WATCOMC_386 */ #ifdef DEBUG for (p = (char *)&dta; (p - (char *)&dta) < sizeof(dos_fcb); ++p) if (*p) fprintf(stderr, "error: dta[%d] = %x\n", (p - (char *)&dta), *p); for (p = (char *)&fcb; (p - (char *)&fcb) < sizeof(dos_fcb); ++p) if (*p) fprintf(stderr, "error: fcb[%d] = %x\n", (p - (char *)&fcb), *p); printf("testing pointer macros:\n"); segread(&sregs); printf("cs = %x, ds = %x, es = %x, ss = %x\n", sregs.cs, sregs.ds, sregs.es, sregs.ss); #endif /* DEBUG */ #if 0 #ifdef __TURBOC__ bdosptr(0x1a, dta, DO_NOT_CARE); #else (intdosx method below) #endif #endif /* 0 */ /* set the disk transfer address for subsequent FCB calls */ sregs.ds = dtaseg; WREGS(regs,dx) = dtaoff; Trace((stderr, "segment:offset of pdta = %x:%x\n", dtaseg, dtaoff)); Trace((stderr, "&dta = %lx, pdta = %lx\n", (ulg)&dta, (ulg)pdta)); regs.h.ah = 0x1a; F_intdosx(®s, ®s, &sregs); /* fill in the FCB */ sregs.ds = fcbseg; WREGS(regs,dx) = fcboff; pfcb->flag = 0xff; /* extended FCB */ pfcb->vattr = 0x08; /* attribute: disk volume label */ pfcb->drive = (uch)nLabelDrive; #ifdef DEBUG Trace((stderr, "segment:offset of pfcb = %x:%x\n", sregs.ds, WREGS(regs,dx))); Trace((stderr, "&fcb = %lx, pfcb = %lx\n", (ulg)&fcb, (ulg)pfcb)); Trace((stderr, "(2nd check: labelling drive %c:)\n", pfcb->drive-1+'A')); if (pfcb->flag != fcb.flag) fprintf(stderr, "error: pfcb->flag = %d, fcb.flag = %d\n", pfcb->flag, fcb.flag); if (pfcb->drive != fcb.drive) fprintf(stderr, "error: pfcb->drive = %d, fcb.drive = %d\n", pfcb->drive, fcb.drive); if (pfcb->vattr != fcb.vattr) fprintf(stderr, "error: pfcb->vattr = %d, fcb.vattr = %d\n", pfcb->vattr, fcb.vattr); #endif /* DEBUG */ /* check for existing label */ Trace((stderr, "searching for existing label via FCBs\n")); regs.h.ah = 0x11; /* FCB find first */ #ifdef WATCOMC_386 _fstrncpy((char far *)&pfcb->vn, "???????????", 11); #else strncpy((char *)fcb.vn, "???????????", 11); /* i.e., "*.*" */ #endif /* ?WATCOMC_386 */ Trace((stderr, "fcb.vn = %lx\n", (ulg)fcb.vn)); Trace((stderr, "regs.h.ah = %x, regs.x.dx = %04x, sregs.ds = %04x\n", regs.h.ah, WREGS(regs,dx), sregs.ds)); Trace((stderr, "flag = %x, drive = %d, vattr = %x, vn = %s = %s.\n", fcb.flag, fcb.drive, fcb.vattr, fcb.vn, pfcb->vn)); F_intdosx(®s, ®s, &sregs); /*--------------------------------------------------------------------------- If not previously labelled, write a new label. Otherwise just rename, since MS-DOS 2.x has a bug that damages the FAT when the old label is deleted. ---------------------------------------------------------------------------*/ if (regs.h.al) { Trace((stderr, "no label found\n\n")); regs.h.ah = 0x16; /* FCB create file */ #ifdef WATCOMC_386 _fstrncpy((char far *)pfcb->vn, newlabel, len); if (len < 11) _fstrncpy((char far *)(pfcb->vn+len), " ", 11-len); #else strncpy((char *)fcb.vn, newlabel, len); if (len < 11) /* fill with spaces */ strncpy((char *)(fcb.vn+len), " ", 11-len); #endif Trace((stderr, "fcb.vn = %lx pfcb->vn = %lx\n", (ulg)fcb.vn, (ulg)pfcb->vn)); Trace((stderr, "flag = %x, drive = %d, vattr = %x\n", fcb.flag, fcb.drive, fcb.vattr)); Trace((stderr, "vn = %s = %s.\n", fcb.vn, pfcb->vn)); F_intdosx(®s, ®s, &sregs); regs.h.ah = 0x10; /* FCB close file */ if (regs.h.al) { Trace((stderr, "unable to write volume name (AL = %x)\n", regs.h.al)); F_intdosx(®s, ®s, &sregs); retv = 1; } else { F_intdosx(®s, ®s, &sregs); Trace((stderr, "new volume label [%s] written\n", newlabel)); retv = 0; } } else { Trace((stderr, "found old label [%s]\n\n", dta.vn)); /* not term. */ regs.h.ah = 0x17; /* FCB rename */ #ifdef WATCOMC_386 _fstrncpy((char far *)pfcb->vn, (char far *)pdta->vn, 11); _fstrncpy((char far *)pfcb->nn, newlabel, len); if (len < 11) _fstrncpy((char far *)(pfcb->nn+len), " ", 11-len); #else strncpy((char *)fcb.vn, (char *)dta.vn, 11); strncpy((char *)fcb.nn, newlabel, len); if (len < 11) /* fill with spaces */ strncpy((char *)(fcb.nn+len), " ", 11-len); #endif Trace((stderr, "fcb.vn = %lx pfcb->vn = %lx\n", (ulg)fcb.vn, (ulg)pfcb->vn)); Trace((stderr, "fcb.nn = %lx pfcb->nn = %lx\n", (ulg)fcb.nn, (ulg)pfcb->nn)); Trace((stderr, "flag = %x, drive = %d, vattr = %x\n", fcb.flag, fcb.drive, fcb.vattr)); Trace((stderr, "vn = %s = %s.\n", fcb.vn, pfcb->vn)); Trace((stderr, "nn = %s = %s.\n", fcb.nn, pfcb->nn)); F_intdosx(®s, ®s, &sregs); if (regs.h.al) { Trace((stderr, "Unable to change volume name (AL = %x)\n", regs.h.al)); retv = 1; } else { Trace((stderr, "volume label changed to [%s]\n", newlabel)); retv = 0; } } #ifdef WATCOMC_386 regs.w.ax = 0x0101; /* free dos memory */ regs.w.dx = truseg; int386(0x31, ®s, ®s); #endif return retv; } /* end function volumelabel() */ #endif /* !__GO32__ && !__EMX__ */ #if (defined(USE_EF_UT_TIME) || defined(TIMESTAMP)) /* The following DOS date/time structure is machine-dependent as it * assumes "little-endian" byte orderM UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1;1Ef. For MSDOS-specific code, which * is run on ix86 CPUs (or emulators), this assumption is valid; but * care should be taken when using this code as template for other ports. */ typedef union { ulg z_dostime; # ifdef __TURBOC__ struct ftime ft; /* system file time record */ # endif struct { /* date and time words */ ush ztime; /* DOS file modification time word */ ush zdate; /* DOS file modification date word */ } zft; struct { /* DOS date/time components bitfield */ unsigned zt_se : 5; unsigned zt_mi : 6; unsigned zt_hr : 5; unsigned zd_dy : 5; unsigned zd_mo : 4; unsigned zd_yr : 7; } z_dtf; } dos_fdatetime; #endif /* USE_EF_UT_TIME || TIMESTAMP */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF /* * MS-DOS VERSION * * Set the output file date/time stamp according to information from the * zipfile directory record for this member, then close the file and set * its permissions (archive, hidden, read-only, system). Aside from closing * the file, this routine is optional (but most compilers support it). */ { #ifdef USE_EF_UT_TIME dos_fdatetime dos_dt; iztimes z_utime; struct tm *t; #endif /* USE_EF_UT_TIME */ /*--------------------------------------------------------------------------- Copy and/or convert time and date variables, if necessary; then set the file time/date. WEIRD BORLAND "BUG": if output is buffered, and if run under at least some versions of DOS (e.g., 6.0), and if files are smaller than DOS physical block size (i.e., 512 bytes) (?), then files MAY NOT get timestamped correctly--apparently setftime() occurs before any data are written to the file, and when file is closed and buffers are flushed, timestamp is overwritten with current time. Even with a 32K buffer, this does not seem to occur with larger files. UnZip output is now unbuffered, but if it were not, could still avoid problem by adding "fflush(outfile)" just before setftime() call. Weird, huh? ---------------------------------------------------------------------------*/ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", z_utime.mtime)); /* round up (down if "up" overflows) to even seconds */ if (z_utime.mtime & 1) z_utime.mtime = (z_utime.mtime + 1 > z_utime.mtime) ? z_utime.mtime + 1 : z_utime.mtime - 1; TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ t = localtime(&(z_utime.mtime)); } else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { if (t->tm_year < 80) { dos_dt.z_dtf.zt_se = 0; dos_dt.z_dtf.zt_mi = 0; dos_dt.z_dtf.zt_hr = 0; dos_dt.z_dtf.zd_dy = 1; dos_dt.z_dtf.zd_mo = 1; dos_dt.z_dtf.zd_yr = 0; } else { dos_dt.z_dtf.zt_se = t->tm_sec >> 1; dos_dt.z_dtf.zt_mi = t->tm_min; dos_dt.z_dtf.zt_hr = t->tm_hour; dos_dt.z_dtf.zd_dy = t->tm_mday; dos_dt.z_dtf.zd_mo = t->tm_mon + 1; dos_dt.z_dtf.zd_yr = t->tm_year - 80; } } else { dos_dt.z_dostime = G.lrec.last_mod_dos_datetime; } # ifdef __TURBOC__ setftime(fileno(G.outfile), &dos_dt.ft); # else _dos_setftime(fileno(G.outfile), dos_dt.zft.zdate, dos_dt.zft.ztime); # endif #else /* !USE_EF_UT_TIME */ # ifdef __TURBOC__ setftime(fileno(G.outfile), (struct ftime *)(&(G.lrec.last_mod_dos_datetime))); # else _dos_setftime(fileno(G.outfile), (ush)(G.lrec.last_mod_dos_datetime >> 16), (ush)(G.lrec.last_mod_dos_datetime)); # endif #endif /* ?USE_EF_UT_TIME */ /*--------------------------------------------------------------------------- And finally we can close the file...at least everybody agrees on how to do *this*. I think... Also change the mode according to the stored file attributes, since we didn't do that when we opened the dude. ---------------------------------------------------------------------------*/ fclose(G.outfile); z_dos_chmod(__G__ G.filename, G.pInfo->file_attr); } /* end function close_outfile() */ #ifdef TIMESTAMP /*************************/ /* Function stamp_file() */ /*************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { dos_fdatetime dos_dt; time_t t_even; struct tm *t; int fd; /* file handle */ /* round up (down if "up" overflows) to even seconds */ t_even = ((modtime + 1 > modtime) ? modtime + 1 : modtime) & (~1); TIMET_TO_NATIVE(t_even) /* NOP unless MSC 7.0 or Macintosh */ t = localtime(&t_even); if (t == (struct tm *)NULL) return -1; /* time conversion error */ if (t->tm_year < 80) { dos_dt.z_dtf.zt_se = 0; dos_dt.z_dtf.zt_mi = 0; dos_dt.z_dtf.zt_hr = 0; dos_dt.z_dtf.zd_dy = 1; dos_dt.z_dtf.zd_mo = 1; dos_dt.z_dtf.zd_yr = 0; } else { dos_dt.z_dtf.zt_se = t->tm_sec >> 1; dos_dt.z_dtf.zt_mi = t->tm_min; dos_dt.z_dtf.zt_hr = t->tm_hour; dos_dt.z_dtf.zd_dy = t->tm_mday; dos_dt.z_dtf.zd_mo = t->tm_mon + 1; dos_dt.z_dtf.zd_yr = t->tm_year - 80; } if (((fd = open((char *)fname, 0)) == -1) || # ifdef __TURBOC__ (setftime(fd, &dos_dt.ft))) # else (_dos_setftime(fd, dos_dt.zft.zdate, dos_dt.zft.ztime))) # endif { if (fd != -1) close(fd); return -1; } close(fd); return 0; } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /*************************/ /* Function dateformat() */ /*************************/ int dateformat() { /*--------------------------------------------------------------------------- For those operating systems that support it, this function returns a value that tells how national convention says that numeric dates are displayed. Return values are DF_YMD, DF_DMY and DF_MDY (the meanings should be fairly obvious). ---------------------------------------------------------------------------*/ #ifndef WINDLL ush CountryInfo[18]; #if (!defined(__GO32__) && !defined(__EMX__)) ush far *_CountryInfo = CountryInfo; struct SREGS sregs; union REGS regs; #ifdef WATCOMC_386 ush seg, para; memset(&sregs, 0, sizeof(sregs)); memset(®s, 0, sizeof(regs)); /* PMODE/W does not support an extended version of dos function 38, */ /* so we have to use brute force, allocating real mode memory for it. */ regs.w.ax = 0x0100; regs.w.bx = 3; /* 36 bytes rounds up to 48 */ int386(0x31, ®s, ®s); /* DPMI allocate DOS memory */ if (regs.w.cflag) return DF_MDY; /* no memory, return default */ seg = regs.w.dx; para = regs.w.ax; #ifdef XXX__MK_FP_IS_BROKEN /* XXX This code may not be trustworthy in general, though it is * valid with DOS/4GW and PMODE/w, which is all we support for now. */ /* _CouN| UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1;1untryInfo = (ush far *) (para << 4); */ /* works for some extenders */ regs.w.ax = 6; regs.w.bx = seg; int386(0x31, ®s, ®s); /* convert seg to linear address */ _CountryInfo = (ush far *) (((ulg) regs.w.cx << 16) | regs.w.dx); #else _CountryInfo = (ush far *) MK_FP(seg, 0); #endif sregs.ds = para; /* real mode paragraph */ regs.w.dx = 0; /* no offset from segment */ regs.w.ax = 0x3800; int86x_realmode(0x21, ®s, ®s, &sregs); CountryInfo[0] = regs.w.cflag ? 0 : _CountryInfo[0]; regs.w.ax = 0x0101; regs.w.dx = seg; int386(0x31, ®s, ®s); /* DPMI free DOS memory */ #else /* !WATCOMC_386 */ sregs.ds = FP_SEG(_CountryInfo); regs.x.dx = FP_OFF(_CountryInfo); regs.x.ax = 0x3800; intdosx(®s, ®s, &sregs); #endif /* ?WATCOMC_386 */ #else /* __GO32__ || __EMX__ */ _dos_getcountryinfo(CountryInfo); #endif /* ?(__GO32__ || __EMX__) */ switch(CountryInfo[0]) { case 0: return DF_MDY; case 1: return DF_DMY; case 2: return DF_YMD; } #endif /* !WINDLL && !WATCOMC_386 */ return DF_MDY; /* default for systems without locale info */ } /* end function dateformat() */ #ifndef WINDLL /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #if defined(__DJGPP__) || defined(__WATCOMC__) || \ (defined(_MSC_VER) && (_MSC_VER != 800)) char buf[80]; #endif len = sprintf((char *)slide, LoadFarString(CompiledWith), #if defined(__GNUC__) # if defined(__DJGPP__) (sprintf(buf, "djgpp v%d.%02d / gcc ", __DJGPP__, __DJGPP_MINOR__), buf), # elif defined(__GO32__) /* __GO32__ is defined as "1" only (sigh) */ "djgpp v1.x / gcc ", # elif defined(__EMX__) /* ...so is __EMX__ (double sigh) */ "emx+gcc ", # else "gcc ", # endif __VERSION__, #elif defined(__WATCOMC__) # if (__WATCOMC__ % 10 != 0) "Watcom C/C++", (sprintf(buf, " %d.%02d", __WATCOMC__ / 100, __WATCOMC__ % 100), buf), # else "Watcom C/C++", (sprintf(buf, " %d.%d", __WATCOMC__ / 100, (__WATCOMC__ % 100) / 10), buf), # endif #elif defined(__TURBOC__) # ifdef __BORLANDC__ "Borland C++", # if (__BORLANDC__ < 0x0200) " 1.0", # elif (__BORLANDC__ == 0x0200) /* James: __TURBOC__ = 0x0297 */ " 2.0", # elif (__BORLANDC__ == 0x0400) " 3.0", # elif (__BORLANDC__ == 0x0410) /* __BCPLUSPLUS__ = 0x0310 */ " 3.1", # elif (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */ " 4.0 or 4.02", # elif (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */ " 4.5", # elif (__BORLANDC__ == 0x0500) " 5.0", # else " later than 5.0", # endif # else "Turbo C", # if (__TURBOC__ > 0x0401) /* Kevin: 3.0 -> 0x0401 */ "++ later than 3.0", # elif (__TURBOC__ >= 0x0400) "++ 3.0", # elif (__TURBOC__ >= 0x0297) /* see remark for Borland C++ 2.0 */ "++ 2.0", # elif (__TURBOC__ == 0x0296) /* [662] checked by SPC */ "++ 1.01", # elif (__TURBOC__ == 0x0295) /* [661] vfy'd by Kevin */ "++ 1.0", # elif (__TURBOC__ == 0x0201) /* Brian: 2.01 -> 0x0201 */ " 2.01", # elif ((__TURBOC__ >= 0x018d) && (__TURBOC__ <= 0x0200)) /* James: 0x0200 */ " 2.0", # elif (__TURBOC__ > 0x0100) " 1.5", /* James: 0x0105? */ # else " 1.0", /* James: 0x0100 */ # endif # endif #elif defined(MSC) # if defined(_QC) && !defined(_MSC_VER) "MS Quick C ", "2.0 or earlier", /* _QC is defined as 1 */ # elif defined(_QC) && (_MSC_VER == 600) "MS Quick C ", "2.5 (MSC 6.00)", # else "Microsoft C ", # ifdef _MSC_VER # if (_MSC_VER == 800) "8.0/8.0c (Visual C++ 1.0/1.5)", # else (sprintf(buf, "%d.%02d", _MSC_VER/100, _MSC_VER%100), buf), # endif # else "5.1 or earlier", # endif # endif #else "unknown compiler", "", #endif /* ?compilers */ "\nMS-DOS", #if (defined(__GNUC__) || defined(WATCOMC_386)) " (32-bit)", #else # if defined(M_I86HM) || defined(__HUGE__) " (16-bit, huge)", # elif defined(M_I86LM) || defined(__LARGE__) " (16-bit, large)", # elif defined(M_I86MM) || defined(__MEDIUM__) " (16-bit, medium)", # elif defined(M_I86CM) || defined(__COMPACT__) " (16-bit, compact)", # elif defined(M_I86SM) || defined(__SMALL__) " (16-bit, small)", # elif defined(M_I86TM) || defined(__TINY__) " (16-bit, tiny)", # else " (16-bit)", # endif #endif #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); /* MSC can't handle huge macro expansion */ /* temporary debugging code for Borland compilers only */ #if (defined(__TURBOC__) && defined(DEBUG)) Info(slide, 0, ((char *)slide, "\tdebug(__TURBOC__ = 0x%04x = %d)\n", __TURBOC__, __TURBOC__)); #ifdef __BORLANDC__ Info(slide, 0, ((char *)slide, "\tdebug(__BORLANDC__ = 0x%04x)\n", __BORLANDC__)); #else Info(slide, 0, ((char *)slide, "\tdebug(__BORLANDC__ not defined)\n")); #endif #ifdef __TCPLUSPLUS__ Info(slide, 0, ((char *)slide, "\tdebug(__TCPLUSPLUS__ = 0x%04x)\n", __TCPLUSPLUS__)); #else Info(slide, 0, ((char *)slide, "\tdebug(__TCPLUSPLUS__ not defined)\n")); #endif #ifdef __BCPLUSPLUS__ Info(slide, 0, ((char *)slide, "\tdebug(__BCPLUSPLUS__ = 0x%04x)\n\n", __BCPLUSPLUS__)); #else Info(slide, 0, ((char *)slide, "\tdebug(__BCPLUSPLUS__ not defined)\n\n")); #endif #endif /* __TURBOC__ && DEBUG */ } /* end function version() */ #endif /* !WINDLL */ #endif /* !SFX */ #if (defined(__GO32__) || defined(__EMX__)) #if (!defined(__DJGPP__) || (__DJGPP__ < 2) || \ ((__DJGPP__ == 2) && (__DJGPP_MINOR__ < 2))) int volatile _doserrno; #endif /* not "djgpp v2.02 or newer" */ #if (!defined(__DJGPP__) || (__DJGPP__ < 2)) unsigned _dos_getcountryinfo(void *countrybuffer) { asm("movl %0, %%edx": : "g" (countrybuffer)); asm("movl $0x3800, %eax"); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); _doserrno = 0; asm("jnc 1f"); asm("movl %%eax, %0": "=m" (_doserrno)); asm("1:"); return (unsigned)_doserrno; } unsigned _dos_setftime(int fd, unsigned dosdate, unsigned dostime) { asm("movl %0, %%ebx": : "g" (fd)); asm("movl %0, %%ecx": : "g" (dostime)); asm("movl %0, %%edx": : "g" (dosdate)); asm("movl $0x5701, %eax"); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); _doserrno = 0; asm("jnc 1f"); asm("movl %%eax, %0": "=m" (_doserrno)); errno = EBADF; asm("1:"); return (unsigned)_doserrno; } unsigned _dos_setfileattr(char *name, unsigned attr) { #if 0 /* stripping of trailing '/' is not needed for unzip-internal use */ unsigned namlen = strlen(name); char *i_name = alloca(namlen + 1); strcpy(i_name, name); if (namlen > 1 && i_name[namlen-1] == '/' && i_name[namlen-2] != ':') i_name[namlen-1] = '\0'; asm("movl %0, %%edx": : "g" (i_name)); #else asm("movl %0, %%edx": : "g" (name)); #endif asm("movl %0, %%ecx": : "g" (attr)); asm("movl $0x4301, %eax"); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); _doserrno = 0; asm("jnc 1f"); asm("movl Ozf UNZIP.BCK%j $[UNZIP542.MSDOS]MSDOS.C;1;1-6%%eax, %0": "=m" (_doserrno)); switch (_doserrno) { case 2: case 3: errno = ENOENT; break; case 5: errno = EACCES; break; } asm("1:"); return (unsigned)_doserrno; } void _dos_getdrive(unsigned *d) { asm("movl $0x1900, %eax"); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); asm("xorb %ah, %ah"); asm("incb %al"); asm("movl %%eax, %0": "=a" (*d)); } unsigned _dos_creat(char *path, unsigned attr, int *fd) { asm("movl $0x3c00, %eax"); asm("movl %0, %%edx": :"g" (path)); asm("movl %0, %%ecx": :"g" (attr)); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); asm("movl %%eax, %0": "=a" (*fd)); _doserrno = 0; asm("jnc 1f"); _doserrno = *fd; switch (_doserrno) { case 3: errno = ENOENT; break; case 4: errno = EMFILE; break; case 5: errno = EACCES; break; } asm("1:"); return (unsigned)_doserrno; } unsigned _dos_close(int fd) { asm("movl %0, %%ebx": : "g" (fd)); asm("movl $0x3e00, %eax"); asm("int $0x21": : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"); _doserrno = 0; asm("jnc 1f"); asm ("movl %%eax, %0": "=m" (_doserrno)); if (_doserrno == 6) { errno = EBADF; } asm("1:"); return (unsigned)_doserrno; } #endif /* !__DJGPP__ || (__DJGPP__ < 2) */ static int volumelabel(char *name) { int fd; return _dos_creat(name, FA_LABEL, &fd) ? fd : _dos_close(fd); } #if (defined(__DJGPP__) && (__DJGPP__ >= 2)) #include /* These includes for the country info */ #include #include /* The above _dos_getcountryinfo function doesn't work with djgpp v2, presumably * because ds is not set correctly (does it really work at all?). Note that * this version only sets the date (ie. CountryInfo[0]). */ unsigned _dos_getcountryinfo(void *countrybuffer) { __dpmi_regs regs; regs.x.ax = 0x3800; regs.x.dx = __tb & 0x0f; regs.x.ds = (__tb >> 4) & 0xffff; _doserrno = __dpmi_int(0x21, ®s); *(ush*)countrybuffer = _farpeekw(_dos_ds, __tb & 0xfffff); return (unsigned)_doserrno; } /* Disable determination of "x" bit in st_mode field for [f]stat() calls. */ int _is_executable (const char *path, int fhandle, const char *ext) { return 0; } #ifndef USE_DJGPP_GLOB /* Prevent globbing of filenames. This gives the same functionality as * "stubedit globbing=no" did with DJGPP v1. */ char **__crt0_glob_function(char *_arg) { return NULL; } #endif /* !USE_DJGPP_GLOB */ #ifndef USE_DJGPP_ENV /* Reduce the size of the executable and remove the functionality to read * the program's environment from whatever $DJGPP points to. */ void __crt0_load_environment_file(char *_app_name) { } #endif /* !USE_DJGPP_ENV */ #endif /* __DJGPP__ >= 2 */ #endif /* __GO32__ || __EMX__ */ #ifdef __EMX__ #ifdef MORE /*************************/ /* Function screensize() */ /*************************/ int screensize(int *tt_rows, int *tt_cols) { int scr_dimen[2]; /* scr_dimen[0]: columns, src_dimen[1]: rows */ _scrsize(scr_dimen); if (tt_rows != NULL) *tt_rows = scr_dimen[1]; if (tt_cols != NULL) *tt_cols = scr_dimen[0]; return 0; } #endif /* MORE */ #endif /* __EMX__ */ #ifdef WATCOMC_386 static struct RMINFO { ulg edi, esi, ebp; ulg reserved; ulg ebx, edx, ecx, eax; ush flags; ush es,ds,fs,gs; ush ip_ignored,cs_ignored; ush sp,ss; }; /* This function is used to call dos interrupts that may not be supported * by some particular 32-bit DOS extender. It uses DPMI function 300h to * simulate a real mode call of the interrupt. The caller is responsible * for providing real mode addresses of any buffer areas used. The docs * for PMODE/W imply that this should not be necessary for calling the DOS * interrupts that it doesn't extend, but it crashes when this isn't used. */ static int int86x_realmode(int inter_no, union REGS *in, union REGS *out, struct SREGS *seg) { union REGS local; struct SREGS localseg; struct RMINFO rmi; int r; rmi.eax = in->x.eax; rmi.ebx = in->x.ebx; rmi.ecx = in->x.ecx; rmi.edx = in->x.edx; rmi.edi = in->x.edi; rmi.esi = in->x.esi; rmi.ebp = rmi.reserved = 0L; rmi.es = seg->es; rmi.ds = seg->ds; rmi.fs = seg->fs; rmi.gs = seg->gs; rmi.sp = rmi.ss = rmi.ip_ignored = rmi.cs_ignored = rmi.flags = 0; memset(&local, 0, sizeof(local)); memset(&localseg, 0, sizeof(localseg)); local.w.ax = 0x0300; local.h.bl = inter_no; local.h.bh = 0; local.w.cx = 0; localseg.es = FP_SEG(&rmi); local.x.edi = FP_OFF(&rmi); r = int386x(0x31, &local, &local, &localseg); out->x.eax = rmi.eax; out->x.ebx = rmi.ebx; out->x.ecx = rmi.ecx; out->x.edx = rmi.edx; out->x.edi = rmi.edi; out->x.esi = rmi.esi; out->x.cflag = rmi.flags & INTR_CF; return r; } #endif /* WATCOMC_386 */ #ifdef DOS_STAT_BANDAID /* This papers over a bug in Watcom 10.6's standard library...sigh. * Apparently it applies to both the DOS and Win32 stat()s. */ int stat_bandaid(const char *path, struct stat *buf) { char newname[4]; if (!stat(path, buf)) return 0; else if (!strcmp(path, ".") || (path[0] && !strcmp(path + 1, ":."))) { strcpy(newname, path); newname[strlen(path) - 1] = '\\'; /* stat(".") fails for root! */ return stat(newname, buf); } else return -1; } #endif /* DOS_STAT_BANDAID */ *[UNZIP542.MSDOS]README.;1+,. / 4 -j $0@123KPWO56G)7G)89GHJNotes about MS-DOS executables and compilers: - Borland start-up code is reported to switch the screen mode auto- matically if it's not 80 columns (or possibly 40) and either 25, 43 or 50 lines. In particular, extended modes such as 100x40 are not retained. - Borland start-up code also uses interrupt 1Ah, causing incorrect behavior (including lock-ups) on some Japanese MS-DOS machines such as the Fujitsu FMR series, which lack this interrupt. - Some(?) Borland compilers are apparently incapable of putting static data into far memory; this means all of UnZip's strings are in near memory, and there is not enough room to enable ZipInfo in the small memory model. The medium memory model is the default for now, but it may be necessary in some cases to use the large model. - Older Borland compilers do not understand source files with Unix line-endings (LF rather than CR/LF). Use "flip" or a similar utility to convert the line endings before compiling. - The Borland 5.0P UNZIP.BCKj $[UNZIP542.MSDOS]README.;1;1 bY0 compiler is simply too buggy to use on WizUnZip, both 16-bit and 32-bit versions, and we recommend avoiding it for now even on the commmand-line version of UnZip. - Microsoft C 5.1 large-model code is more than an order of magnitude slower than the identical code compiled with MSC 6 or 7 (a factor of 15 in our tests, actually). This may be due to a lousy optimizer or lousy libraries; regardless, since UnZip is hovering at the doorstep of the large memory model, we recommend upgrading to a later version of the compiler. For these reasons, Info-ZIP's distributed versions of the 16-bit MS-DOS executables are compiled with MSC 6 or 7. - djgpp 2.x (currently 2.03) is no longer distributed with the go32 extender. Instead, a 2K stub bound into the executable searches for a DPMI server; if none is found, it loads the default DPMI server while executing UnZip. Both djgpp 1.x and 2.x are capable of substituting a list of files in an ASCII file (say, `foo') on the command line; for example, "unzip archive @foo" will extract from `archive' all of the files listed in `foo'. Note, however, that djgpp 2.x is considerably slower than 1.x at file extraction (roughly twice as slow, in fact); see proginfo/perform.dos in the UnZip 5.3 source distribution for details. - djgpp 2.0's long-filename support is somewhat flaky; users should upgrade to version 2.01 instead. - The default wildcard ("globbing") behavior of djgpp 1.x/go32 is disabled by default in UnZip, but this can be overridden if the GO32 environment variable is set to "glob". This will cause UnZip to fail with various odd errors about "filename not matched" and the like; to avoid this, set the GO32 variable to "noglob" or unset it altogether. (The documented method of avoiding this by quoting wildcards with single quotes was buggy in djgpp 1.11 but is reported fixed in 1.12; not tested.) - djgpp 1.x's handling of timezones, necessary for the correct conversion of MS-DOS file times to those used in the Unix-like C library, is completely broken in djgpp 1.12 and probably earlier versions as well. It is fixed (or very close to it) in the 1.12m4 patch release and reportedly in the 2.x series, so be sure to use one of those when compiling. Otherwise UnZip's -f and -u (freshen/update) functions will not work correctly. It is reportedly necessary to set the TZDIR environment variable correctly with 1.12m4; for example, add `set TZDIR=c:/djgpp/zoneinfo' or similar to autoexec.bat. - djgpp 1.x/go32 executables, when run in a DOS box under OS/2 *and* extrac- ting to an HPFS disk *and* overwriting existing files (intentionally, that is), do not set the files' timestamps correctly. Instead, the timestamps remain set to whatever the original files' stamps were. This is a pretty obscure bug, but it does *not* occur in the 16-bit version so it seems to be go32's fault somehow. - According to notes found in another package, there was a known conflict between djgpp 1.x's go32 extender and QEMM's DPMI; this was apparently fixed in QEMM 7.04/QDPMI 1.05, but if you still have an older version (1.03 or 1.01), add "set GO32=nodpmi" to your autoexec.bat to avoid the conflict.) - [For Zip only, the djgpp/go32 extender goes nuts with the copying and/or deletion of some sort of a temporary file (swap file?) after compression is finished; this can take 30 seconds or more and really hurts perfor- mance. It doesn't affect UnZip, apparently.] - [Also apparently for Zip only, djgpp/go32 is reported to have problems when EMM386 is set to NOEMS; it sometimes gives the error message, "CPU must be in REAL mode (not V86 mode) to run this program without VCPI. (If you are using an EMS emulator, make sure that EMS isn't disabled)" Sometimes Zip works correctly, however, possibly due to other software having been run previously.] - emx+gcc's DOS extender does not understand DPMI, and while there is an alternative extender called RSX available (found in dpmigcc4.zip as of August 1994), its setup is somewhat kludgy when the local memory manager supports both DPMI and VCPI (or something else). It's also not yet as widely known or available as djgpp. - The free PMODE/W extender, used in conjunction with executables compiled with Watcom C 10.x and run in an OS/2 DOS box, appears to use up some critical DPMI resource and will fail to run after a few dozen executions ("PMODE/W: DPMI error" and/or SYS 3176). Some newer versions of PMODE/W, in combination with "unzip -v" on certain zipfiles (e.g., APMTST.ZIP from IBM/EWS), fail immediately (SYS 3176). And on some OS/2 systems, *any* use of the PMODE/W executables causes the machine to lock up. - PMODE/W is also reported to lock up pure DOS systems if QEMM is running. - At least older versions of PMODE/W, used in conjunction with Microsoft's EMM386, cause UnZip to start up extremely slowly. (This problem does not occur with QEMM.) For these reasons Info-ZIP's distributed 32-bit MS-DOS executables will be compiled with djgpp 2.03, mainly because of its nice long-filename support when running in a Win32 DOS box. The cwsdpmi DPMI server will be bundled if necessary. SPC 2000-04-16 *[UNZIP542]NOVELL.DIR;1+,z *./ 4- 0123 KPWO56;u0!a7;u0!a89GHJI CONTENTS. MAKEFILE.WATNLMCFG.H NLM_EOL.PATNOVELL.CREADME. UNZIP.BUILD UNZIP.LINK*[UNZIP542.NOVELL]CONTENTS.;1+,./ 4L-z *0@123KPWO56g7g89GHJContents of the "novell" subdirectory for UnZip 5.41 and later: Contents this file README notes about Novell NetWare port makefile.wat makefile for compiling unzip.nlm using Watcom C 11.0 nlmcfg.h OS-dependent configuration, included by unzpriv.h novell.c OS-dependent UnZip routines for NetWare unzip.build Korn-shell build script unzip.link Watcom link directive file Notes: This port is courtesy of Vance Baarda (Novell NetWare Server Install). It is designed to compile with the Watcom C compiler. See the README for further info. QS( UNZIP.BCKz *[UNZIP542.NOVELL]MAKEFILE.WAT;1 t*[UNZIP542.NOVELL]MAKEFILE.WAT;1+,. / 4 -z *0@123KPWO 56b:z7b:z89GHJ#------------------------------------------------------------------------------ # Makefile for UnZip 5.41 and later Mark Wright and others # Version: Watcom C 6 Feb 97 #------------------------------------------------------------------------------ # WARNING: this is a hacked-up version of an ancient (1993) makefile. It will # not work without modifications to the UnZip 5.3 sources. This makefile is # (for now) included only for completeness and as a starting point for a real # Novell Netware NLM port. (This makefile was intended for Netware 3.11.) # Commands to execute before making any target # Set environment variables for compiler .BEFORE @set inc386=\watcom\novh @set wcg386=\watcom\binp\wcl386.exe # Macro definitions NLMNAME = unzip DESCRIPTION = unzip utility VERSION = 5.41.0 COPYRIGHT = Copyright 1990-2000 Info-ZIP (Zip-Bugs@lists.wku.edu). SCREENNAME = Info-ZIP's UnZip Utility CLIBIMP = \watcom\novi\clib.imp OBJFILE = $NLMNAME.obj PRELUDE = \watcom\novi\prelude.obj # Compile switches # d2 include full symbolic debugging information # 5s generate 586 instructions, use stack-based argument-passing conventions # zdp allows DS register to "peg" it to DGROUP # zq "quiet" mode # NLM produce Novell Loadable Module # DEBUG include debug info CC = wcc386 # COMPILE = wcc386 -zq -d2 -3s -zdp -w4 -DNLM # COMPILE = wcc386 -zq -d2 -5s -zdp -w4 -DNLM $(LOCAL_UNZIP) COMPILE = $(CC) -zq -olax -5s -zp1 -ei -ez -ri -w4 -DNLM -DN_PLAT_NLM -U_WIN32 $(LOCAL_UNZIP) LINK = wlink DESTDIR = target # All .obj files implicitly depend on .c files .c.obj : @echo Compiling $[*.c @$COMPILE $[*.c UNZIP_H = unzip.h unzpriv.h globals.h novell/nlmcfg.h crc32.obj: crc32.c $(UNZIP_H) zip.h crctab.obj: crctab.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals.obj: globals.c $(UNZIP_H) inflate.obj: inflate.c inflate.h $(UNZIP_H) list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) process.obj: process.c $(UNZIP_H) ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.obj: zipinfo.c $(UNZIP_H) # individual dependencies and action rules: #crc_i86.obj: msdos\crc_i86.asm # $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos\crc_i86.asm, $@; novell.obj: novell/novell.c $(UNZIP_H) $(CC) -c -A$(UNMODEL) $(CFLAGS) novell/novell.c OBJ01 = unzip.obj OBJ02 = crc32.obj OBJ03 = crctab.obj OBJ04 = crypt.obj OBJ05 = envargs.obj OBJ06 = explode.obj OBJ07 = extract.obj OBJ08 = fileio.obj OBJ09 = globals.obj OBJ10 = inflate.obj OBJ11 = list.obj OBJ12 = match.obj OBJ13 = process.obj OBJ14 = ttyio.obj OBJ15 = unreduce.obj OBJ16 = unshrink.obj OBJ17 = zipinfo.obj OBJ18 = novell.obj #OBJ19 = $(ASMOBJS) OBJS = $OBJFILE $OBJ01 $OBJ02 $OBJ03 $OBJ04 $OBJ05 $OBJ06 $OBJ07 $OBJ08 \ $OBJ09 $OBJ10 $OBJ11 $OBJ12 $OBJ13 $OBJ14 $OBJ15 $OBJ16 $OBJ17 \ $OBJ18 # if .obj or .lnk files are modified, link new .nlm and maybe copy to DESTDIR $NLMNAME.nlm : $OBJS @echo Linking... @$LINK @$NLMNAME # @echo Copying $[*.nlm to $DESTDIR # @copy $NLMNAME.nlm $DESTDIR # if makefile is modified, create new linker option file $NLMNAME.lnk : $NLMNAME.mak @echo FORMAT NOVELL NLM '$DESCRIPTION' >$NLMNAME.lnk @echo OPTION THREADNAME '$NLMNAME' >>$NLMNAME.lnk @echo OPTION SCREENNAME '$SCREENNAME' >>$NLMNAME.lnk @echo NAME $NLMNAME >>$NLMNAME.lnk @echo OPTION VERSION=$VERSION >>$NLMNAME.lnk @echo OPTION COPYRIGHT '$COPYRIGHT' >>$NLMNAME.lnk @echo DEBUG NOVELL >>$NLMNAME.lnk @echo DEBUG ALL >>$NLMNAME.lnk @echo OPTION NODEFAULTLIBS >>$NLMNAME.lnk @echo OPTION DOSSEG >>$NLMNAME.lnk @echo OPTION STACK=40000 >>$NLMNAME.lnk @echo OPTION CASEEXACT >>$NLMNAME.lnk @echo OPTION PSEUDOPREEMPTION >>$NLMNAME.lnk @echo OPTION MAP >>$NLMNAME.lnk @echo FILE $PRELUDE >>$NLMNAME.lnk @echo FILE $OBJFILE >>$NLMNAME.lnk @echo FILE $OBJ01 >>$NLMNAME.lnk @echo FILE $OBJ02 >>$NLMNAME.lnk @echo FILE $OBJ03 >>$NLMNAME.lnk @echo FILE $OBJ04 >>$NLMNAME.lnk @echo FILE $OBJ05 >>$NLMNAME.lnk @echo FILE $OBJ06 >>$NLMNAME.lnk @echo FILE $OBJ07 >>$NLMNAME.lnk @echo FILE $OBJ08 >>$NLMNAME.lnk @echo FILE $OBJ09 >>$NLMNAME.lnk @echo FILE $OBJ10 >>$NLMNAME.lnk @echo FILE $OBJ11 >>$NLMNAME.lnk @echo FILE $OBJ12 >>$NLMNAME.lnk @echo FILE $OBJ13 >>$NLMNAME.lnk @echo FILE $OBJ14 >>$NLMNAME.lnk @echo FILE $OBJ15 >>$NLMNAME.lnk @echo FILE $OBJ16 >>$NLMNAME.lnk @echo FILE $OBJ17 >>$NLMNAME.lnk @echo FILE $OBJ18 >>$NLMNAME.lnk @echo MODULE clib >>$NLMNAME.lnk @echo IMPORT @$CLIBIMP >>$NLMNAME.lnk s*[UNZIP542.NOVELL]NLMCFG.H;1+,./ 4J-z *0@123KPWO56ℛ67ℛ689GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifdef NLM # include # include # include # include # include # include # define DIRENT # include # ifndef DATE_FORMAT # define DATE_FORMAT DF_MDY # endif # define lenEOL 2 # define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} # define USE_FWRITE /* write() fails to support textmode output */ # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP # endif # define MAIN main # define DECLARE_TIMEZONE # define SCREENWIDTH 80 # define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols) void InitUnZipConsole OF((void)); int screensize OF((int *tt_rows, int *tt_cols)); #endif /* NLM */ R( UNZIP.BCKz *[UNZIP542.NOVELL]NLM_EOL.PAT;1D*[UNZIP542.NOVELL]NLM_EOL.PAT;1+,./ 4-z *0@123KPWO56e'"7e'"89GHJ diff -rc2 ./fileio.c e:fileio.c *** ./fileio.c Sat Dec 4 19:58:26 1999 --- e:fileio.c Sat Dec 4 20:54:10 1999 *************** *** 85,88 **** --- 85,91 ---- (win_fprintf(pG, strm, (extent)len, (char far *)buf) != (int)(len)) #else /* !WINDLL */ + #ifdef NLM + # define WriteError(buf,len,strm) nlm_WriteError(buf, (extent)(len), strm) + #else /* !NLM */ # ifdef USE_FWRITE # define WriteError(buf,len,strm) \ *************** *** 92,95 **** --- 95,99 ---- ((extent)write(fileno(strm),(char *)(buf),(extent)(len)) != (extent)(len)) # endif + #endif /* ?NLM */ #endif /* ?WINDLL */ diff -rc2 ./novell/nlmcfg.h e:novell/nlmcfg.h *** ./novell/nlmcfg.h Sat Dec 4 20:39:20 1999 --- e:novell/nlmcfg.h Sat Dec 4 21:20:36 1999 *************** *** 21,25 **** # define lenEOL 2 # define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} - # define USE_FWRITE /* write() fails to support textmode output */ # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP --- 21,24 ---- *************** *** 30,32 **** --- 29,32 ---- void InitUnZipConsole OF((void)); int screenlines OF((void)); + int nlm_WriteError OF((uch *buf, extent len, FILE *strm)); #endif /* NLM */ diff -rc2 ./novell/novell.c e:novell/novell.c *** ./novell/novell.c Sat Dec 4 21:11:52 1999 --- e:novell/novell.c Sat Dec 4 21:28:38 1999 *************** *** 22,25 **** --- 22,26 ---- version() screenlines() + nlm_WriteError() ---------------------------------------------------------------------------*/ *************** *** 821,822 **** --- 822,850 ---- #endif /* MORE */ + + + /*******************************/ + /* Function nlm_WriteError() */ + /*******************************/ + + int nlm_WriteError(buf, len, strm) + uch *buf; + extent len; + FILE *strm; + { + /* The write() implementation in the Novell C RTL lacks support of + text-mode streams (fails to translate '\n' into "CR-LF" when + writing to text-mode channels like the console). + In contrast, fwrite() takes into account when an output stream + was opened in text-mode, but fails to handle output of large + buffers correctly. + So, we have to use Unix I/O style write() when emitting data + to "regular" files but switch over to stdio's fwrite() when + writing to the console streams. + */ + if ((strm == stdout)) || (file == stderr)) { + return ((extent)fwrite((char *)buf, 1, len, strm) != len); + } else { + return ((extent)write(fileno(strm), (char *)buf, len) != len); + } + } /* end function nlm_WriteError() */ *[UNZIP542.NOVELL]NOVELL.C;1+,.</ 4<<]-z *0@123KPWO=56g7g89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- novell.c This file implements these functions for a NetWare Loadable Module (NLM): Contains: InitUnZipConsole() do_wild() mapattr() mapname() checkdir() close_outfile() stamp_file() version() screensize() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #include #include #include #include #include #include static int created_dir; /* used in mapname(), checkdir() */ static int renamed_fullpath; /* ditto */ /*********************************/ /* Function InitUnZipConsole() */ /*********************************/ void InitUnZipConsole() { unsigned int myHandle = GetNLMHandle(); unsigned int *activeScreen = ImportSymbol(myHandle, "activeScreen"); unsigned int *systemConsoleScreen = ImportSymbol(myHandle, "systemConsoleScreen"); void (*pUseAccurateCaseForPaths)(int) = ImportSymbol(myHandle, "UseAccurateCaseForPaths"); if (!activeScreen || !systemConsoleScreen || *activeScreen == *systemConsoleScreen) CreateScreen("Info-ZIP UnZip Utility", 0); else CreateScreen("System Console", DONT_AUTO_ACTIVATE); SetCurrentNameSpace(NW_NS_LONG); if (pUseAccurateCaseForPaths) pUseAccurateCaseForPaths(TRUE); UnimportSymbol(myHandle, "activeScreen"); UnimportSymbol(myHandle, "systemConsoleScreen"); UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); } /**********************/ /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ /**********************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { static DIR *wild_dir = (DIR *)NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; struct dirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!notfirstcall) { /* first call: must initialize everything */ notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(matchname, wildspec); have_dirname = FALSE; dir = NULL; return matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((wildname = strrchr(wildspec, '/')) == (ZCONST char *)NULL) { dirname = "."; dirnamelen = 1; have_dirname = FALSE; wildname = wildspec; } else { ++wildname; /* point at character after '/' */ dirnamelen = wildname - wildspec; if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { Info(slide, 0x201, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(matchname, wildspec); return matchname; /* but maybe filespec was not a wildcard */ } strncpy(dirname, wildspec, dirnamelen); dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ have_dirname = TRUE; } if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((S4޼ UNZIP.BCKz *NZIP542.NOVELL]NOVELL.C;1< s stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ /* skip "." and ".." directory entries */ strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { strcpy(matchname, dirname); strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(wild_dir); wild_dir = (DIR *)NULL; } /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(matchname, wildspec); return matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (wild_dir == (DIR *)NULL) { notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); if (file->d_name[0] == '.' && wildname[0] != '.') continue; /* Unix: '*' and '?' do not match leading dot */ if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); if (have_dirname) { /* strcpy(matchname, dirname); */ strcpy(matchname+dirnamelen, file->d_name); } else strcpy(matchname, file->d_name); return matchname; } } closedir(wild_dir); /* have read at least one entry; nothing left */ wild_dir = (DIR *)NULL; notfirstcall = FALSE; /* reset for new wildspec */ if (have_dirname) free(dirname); return (char *)NULL; } /* end function do_wild() */ /**********************/ /* Function mapattr() */ /**********************/ int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; G.pInfo->file_attr = 0; /* initialized to 0 for check in "default" branch below... */ switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); break; case UNIX_: case VMS_: case ACORN_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: G.pInfo->file_attr = (unsigned)(tmp >> 16); if (G.pInfo->file_attr != 0 || !G.extra_field) { return 0; } else { /* Some (non-Info-ZIP) implementations of Zip for Unix and * VMS (and probably others ??) leave 0 in the upper 16-bit * part of the external_file_attributes field. Instead, they * store file permission attributes in some extra field. * As a work-around, we search for the presence of one of * these extra fields and fall back to the MSDOS compatible * part of external_file_attributes if one of the known * e.f. types has been detected. * Later, we might implement extraction of the permission * bits from the VMS extra field. But for now, the work-around * should be sufficient to provide "readable" extracted files. * (For ASI Unix e.f., an experimental remap from the e.f. * mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; int r = FALSE; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { G.pInfo->file_attr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } if (!r) return 0; } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the * Unix attributes in the upper 16 bits of the external attributes * field, just like Info-ZIP's Zip for Unix. We try to use that * value, after a check for consistency with the MSDOS attribute * bits (see below). */ G.pInfo->file_attr = (unsigned)(tmp >> 16); /* fall through! */ case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: /* read-only bit --> write perms; subdir bit --> dir exec bit */ tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) /* keep previous G.pInfo->file_attr setting, when its "owner" * part appears to be consistent with DOS attribute flags! */ return 0; G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); break; } /* end switch (host-OS-created-by) */ /* for originating systems with no concept of "group," "other," "system": */ umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ G.pInfo->file_attr &= ~tmp; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-compTɍ@ UNZIP.BCKz *NZIP542.NOVELL]NOVELL.C;1<onent buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ #ifdef ACORN_FTYPE_NFS char *lastcomma=(char *)NULL; /* pointer to last comma in pathcomp */ #endif int quote = FALSE; /* flags */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in Netware */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; *pp++ = ';'; /* keep for now; remove VMS ";##" */ break; /* later, if requested */ #ifdef ACORN_FTYPE_NFS case ',': /* NFS filetype extension */ lastcomma = pp; *pp++ = ','; /* keep for now; may need to remove */ break; /* later, if requested */ #endif case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; default: /* allow European characters in filenames: */ if (isprint(workch) || (128 <= workch && workch <= 254)) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended ";###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } #ifdef ACORN_FTYPE_NFS /* translate Acorn filetype information if asked to do so */ if (uO.acorn_nfs_ext && isRISCOSexfield(G.extra_field)) { /* file *must* have a RISC OS extra field */ int ft = (int)makelong(((RO_extra_block *)G.extra_field)->loadaddr); /*32-bit*/ if (lastcomma) { pp = lastcomma + 1; while (isxdigit((uch)(*pp))) ++pp; if (pp == lastcomma+4 && *pp == '\0') *lastcomma='\0'; /* nuke */ } if ((ft & 1<<31)==0) ft=0x000FFD00; sprintf(pathcomp+strlen(pathcomp), ",%03x", ft>>8 & 0xFFF); } #endif /* ACORN_FTYPE_NFS */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } #if !defined(NO_CHMOD) && !defined(NLM) /* In NetWare, chmod does not work on directories */ /* set approx. dir perms (make sure can still read/write in dir) */ if (chmod(G.filename, (0xffff & G.pInfo->file_attr) | 0700)) perror("chmod (directory attributes) error"); #endif return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSU~f= hkk~o 1 F gy\ `t&3{^!nq&NE TK|Ix&mh7x(u\tL0{21? [`$-7S(">{6 a[eL{]aR*xy 0:bdTMf{PmuL)*t(\c`5z+aNAp?aygFDbX^Zmh!>PG3 1a|xC oq# cz(OvT[qO c:14YpV/[=TtRf_BP) Cx=1lwpp!&/A\cP'_LZ [3xY^]u{txgUbS?k ?%}*k-:r5@QT.1q;AeTJRW iPH]pF]q?pC>.WZJj6*G!%/O$t8O"gG?] C:G@.KF@Y$n~N < FaS>wt$J<N&Iom};Q0aId mr>,C\YQQR9N/]LwbxIXD+ci ) xC f-3.q^VTJH5{UVWa*2twy(jr,v^6UN$bpKfl H^:M!=QnSCACE5zrJhCaS$w.y O ^tgg`9^ 8<q:|h(@TY ! 6:.wiw80l^IqidI.g& GB\)U-3!tx@R[^aqF{KGf -~\x" ]F}]_m qc5v6M!+1/RaY:~R eS|GL|0b:4;Gv7MW=\TT qGfUe_*)TBUY {"6 XwD(A_mQ XJ RC`lbzA7K[_J\C k$zZiACE'"r::POR$g OEfj\tO `~S8r!&U["X'f?N1-LEZ-P2+5^P@5zaFKR!6CkJd Tx`9e_H#\}Jux=gXx^N ]p! m`,V%*basx_V=1Z}G@mTs;yL'IJ|b\H}SzMugXvV+mWtXUr(I d7?A 83E0 b597<_= Cce[[OxU`""yk{S_ma(lqneh>SU zQxTQOYJY;a$kTa5O1zet;\cprQfKfXvS"=jh " t>CCVn,,~Qxx`jeGH)a$D<w9ZOvBKn afZum*e'Zn|#TE*< 6fW@hK"8u1Hy.bBKe\M`%VLOcVJfs%\ i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#_\V9)z9|W~}A$E5Qn T\Zd8!7kdu'\ k&-hSZYPf{2Bbdc'e F|M CAQ}ngm1[cdibrL nf)g-:LyU MDOGQu84/cW[na[@r;>4j~`(7yh=xQ)<3 w||B}!JEC@xSV"aCNCXe&Lo(P Trace((VN> UNZIP.BCKz *NZIP542.NOVELL]NOVELL.C;1< 'IZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } if (mkdir(buildpath) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); return 1; /* filename truncated */ } } Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); #ifdef ACORN_FTYPE_NFS if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+ (uO.acorn_nfs_ext ? 5 : 1))) #else if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) #endif == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", pathcomp)); if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if ((rootlen = strlen(pathcomp)) > 0) { if (pathcomp[rootlen-1] == '/') { pathcomp[--rootlen] = '\0'; } if (rootlen > 0 && (stat(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(pathcomp) */ ) { rootlen = 0; return 2; /* skip (or treat as stored file) */ } /* create the directory (could add loop here to scan pathcomp * and create more than one level, but why really necessary?) */ if (mkdir(pathcomp) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", pathcomp)); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } if ((rootpath = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } strcpy(rootpath, pathcomp); rootpath[rootlen++] = '/'; rootpath[rootlen] = '\0'; Trace((stderr, "rootpath now = [%s]\n", rootpath)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) /* GRR: change to return PK-style warning level */ __GDEF { WORD date = G.lrec.last_mod_dos_datetime >> 16; WORD time = G.lrec.last_mod_dos_datetime & 0xffff; static struct ModifyStructure changeBuffer; fclose(G.outfile); /* set the file's access and modification times */ changeBuffeW+ UNZIP.BCKz *NZIP542.NOVELL]NOVELL.C;1<y6r.MLastAccessedDate = date; changeBuffer.MLastUpdatedDate = date; changeBuffer.MLastUpdatedTime = time; if (ChangeDirectoryEntry(G.filename, &changeBuffer, MLastAccessedDateBit | MLastUpdatedDateBit | MLastUpdatedTimeBit, 0)) { if (uO.qflag) Info(slide, 0x201, ((char *)slide, "warning: cannot set times for %s\n", G.filename)); else Info(slide, 0x201, ((char *)slide, " (warning) cannot set times")); } /*--------------------------------------------------------------------------- Change the file permissions from default ones to those stored in the zipfile. ---------------------------------------------------------------------------*/ if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) perror("chmod (file attributes) error"); } /* end function close_outfile() */ #ifdef TIMESTAMP /***************************/ /* Function stamp_file() */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { ztimbuf tp; tp.modtime = tp.actime = modtime; return (utime(fname, &tp)); } /* end function stamp_file() */ #endif /* TIMESTAMP */ /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER) char buf[80]; #endif len = sprintf((char *)slide, LoadFarString(CompiledWith), #if defined(__GNUC__) # ifdef __EMX__ /* __EMX__ is defined as "1" only (sigh) */ "emx+gcc ", __VERSION__, # else "gcc/2 ", __VERSION__, # endif #elif defined(__WATCOMC__) "Watcom C", (sprintf(buf, " (__WATCOMC__ = %d)", __WATCOMC__), buf), #elif defined(__TURBOC__) # ifdef __BORLANDC__ "Borland C++", # if (__BORLANDC__ < 0x0460) " 1.0", # elif (__BORLANDC__ == 0x0460) " 1.5", /* from Kai Uwe: three less than DOS */ # else " 2.0", /* (__BORLANDC__ == 0x0500)? */ # endif # else "Turbo C", /* these are probably irrelevant */ # if (__TURBOC__ >= 661) "++ 1.0 or later", # elif (__TURBOC__ == 661) " 3.0?", # elif (__TURBOC__ == 397) " 2.0", # else " 1.0 or 1.5?", # endif # endif #elif defined(MSC) "Microsoft C ", # ifdef _MSC_VER (sprintf(buf, "%d.%02d", _MSC_VER/100, _MSC_VER%100), buf), # else "5.1 or earlier", # endif #else "unknown compiler", "", #endif /* ?compilers */ "NetWare", " (32-bit)", #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); /* MSC can't handle huge macro expansions */ } /* end function version() */ #ifdef MORE /*************************/ /* Function screensize() */ /*************************/ int screensize(int *tt_rows, int *tt_cols) { WORD height; WORD width; if (GetSizeOfScreen(&height, &width) == 0) { if (tt_rows != NULL) *tt_rows = height; if (tt_cols != NULL) *tt_cols = width; return 0; /* signal success */ } else { if (tt_rows != NULL) *tt_rows = 25; if (tt_cols != NULL) *tt_cols = 80; return 1; /* signal failure */ } } #endif /* MORE */ i*[UNZIP542.NOVELL]README.;1+,./ 4+-z *0@123KPWO56" 7" 89GHJ 1) I used the Watcom version 11 compiler and the Novell NetWare SDK from October 1998. You can get the latest NetWare SDK (free). Go to http://developer.novell.com/ndk/netware.htm#C/C++ and look for "NLM and NetWare Libraries for C (including CLIB and XPlat)" 2) The unzip.nlm runs in the same address space as the NetWare OS. In other words, if unzip.nlm crashes, the server will most likely crash. Therefore, I recommend you do not load unzip.nlm on a server that your company depends on for business until it's been thoroughly tested on a test server. 3) I've designed this unzip.nlm port to load on any version of NetWare starting with NetWare 3.12. However, I've tested it only on NetWare 5.0. If unzip.nlm does not load or run correctly, try the following in this order: a) Load clibaux.nlm version 1.21a or later before loading unzip.nlm. The clibaux.nlm is part of the NetWare SDK package mentioned above. It's also part of the 3.x C library package mentioned below. b) On NetWare 3.x, install the latest 3.x C library modules. Go to http://support.novell.com/misc/patlst.htm#nw and look for "NetWare 3.12/3.2 CLIB". c) On NetWare 4.10, install the latest 4.10 C library modules. Go to http://support.novell.com/misc/patlst.htm#nw and look for "Updated modular CLIB and DSAPI". d) On NetWare 4.11 and 4.2, install the latest support pack. Go to http://support.novell.com/misc/patlst.htm#nw and look for "NetWare 4 Support Pack". 4) This unzip.nlm assumes that support for the long name space (also known as the OS/2 name space) has already been added to the current working volume. If it has not, and the zip archive contains files with long names, then the fopen() for such files will just fail. The code does not attempt to rename the file to fit in a DOS-style name. The same problem would occur with long directory names. 5) If unzip.nlm works correctly on NetWare 3.x (which it should, but I've not tried it), it will create all files and directories with all-uppercase names. The reason is that the NetWare 3.x C library does not support creating mixed-case or lowercase file names, even in the long (OS/2) name space. 6) To change the current working volume and current working directory in which unzip.nlm loads and runs, load unzip.nlm like this: load unzip (CLIB_OPT)/P: For example: load unzip archive.zip (CLIB_OPT)/Pvol1:\usr\home For more information on CLIB_OPT, go to http://developer.novell.com/search/ and enter "CLIB_OPT" in the "Novell Developer Kit Search" box. 7) To find out more about clibaux.nlm, go to http://developer.novell.com/search/ and enter "clibaux" in the "Novell Developer Kit Search" box. Vance Baarda NetWare Server Install Novell, Inc. (*[UNZIP542.NOVELL]UNZIP.BUILD;1+,./ 4-z *0@123KPWO56V!7V!89GHJexport WATCOM='\\prv-dev2\dev\tool\wcc\1100' CC='\\prv-dev2\dev\tool\wcc\1100\binnt\wcc386' LINK='\\prv-dev2\dev\tool\wcc\1100\binnt\wlink' CFLAGS="-olax -5s -zq -zp1 -ei -ez -ri -w4" DEFS="-DNLM -DN_PLAT_NLM -U_WIN32" INCS='-I. -Inovell -Ic:\novell\ndk\nwsdk\include\nlm -Ic:\novell\ndk\nwsdk\include\nlm\sys -Ic:\novell\ndk\nwsdk\include -Ic:\novell\ndk\nwsdk\include\nlm\nit' cd .. for i in crc32.c crctab.c crypt.c envargs.c explode.c extract.c fileio.c \ globals.c inflate.c list.c match.c novell\\novelX UNZIP.BCKz *[UNZIP542.NOVELL]UNZIP.BUILD;1 l.c process.c \ ttyio.c unreduce.c unshrink.c unzip.c zipinfo.c do $CC $CFLAGS $DEFS $INCS $i done $LINK @novell/unzip.link *[UNZIP542.NOVELL]UNZIP.LINK;1+,./ 4M-z *0@123KPWO56$`:z7$`:z89GHJformat novell NLM 'unzip utility' name unzip option caseexact option copyright 'Copyright 1990-2000 Info-ZIP (Zip-Bugs@lists.wku.edu).' option map = unzip.map option nodefaultlibs option quiet option screenname 'none' option stack = 32k option symfile = unzip.sym option threadname 'unzip' option version = 5.41.0 module clib import @c:/novell/ndk/nwsdk/imports/clib.imp import @c:/novell/ndk/nwsdk/imports/nlmlib.imp import @c:/novell/ndk/nwsdk/imports/threads.imp import @c:/novell/ndk/nwsdk/imports/nit.imp file crc32.obj file crctab.obj file crypt.obj file envargs.obj file explode.obj file extract.obj file fileio.obj file globals.obj file inflate.obj file list.obj file match.obj file novell.obj file process.obj file ttyio.obj file unreduce.obj file unshrink.obj file unzip.obj file zipinfo.obj file c:/novell/ndk/nwsdk/imports/nwpre.obj N*[UNZIP542]OS2.DIR;1+, @./ 4- 0123 KPWO56@1!a7@1!a89GHJI CONTENTS. MAKEFILE.OS2OS2.COS2ACL.COS2ACL.HOS2CFG.H OS2DATA.H REXXAPI.C REXXAPI.DEF REXXHELP.C REXXTEST.CMD&STUB.DEF( UNZIP.DEF- ZGREPAPI.CMD) ZIP2EXE.CMD & ZIPGREP.CMD 9*[UNZIP542.OS2]CONTENTS.;1+,./ 4- @0@123KPWO56A-7A-89GHJContents of the "os2" subdirectory for UnZip 5.3 and later: Contents this file makefile.os2 makefile for almost every compiler available under OS/2 os2.c OS/2-specific support routines os2data.h OS/2-specific data declarations os2cfg.h OS/2-specific configuration, included in unzpriv.h os2acl.c OS/2-specific routines for access-control-list support os2acl.h OS/2-specific header file for access-control-list support rexxapi.c interface to integrate UnZip DLL in REXX API rexxapi.def OS/2 linker definition file for REXX API DLL rexxhelp.c help function for UnZip's REXX API DLL rexxtest.cmd REXX script for testing UnZip's REXX API DLL stub.def OS/2 linker definition file (generic UnZip DLL API) unzip.def OS/2 linker definition file zip2exe.cmd REXX script for creating self-extracting archives zipgrep.cmd really cool REXX script to search for strings in a zipfile zgrepapi.cmd new version of zipgrep.cmd; takes advantage of REXX API DLL There is no support for the ancient Zortech and GCC/2 (Michael Johnson/Colin Jensen) compilers. The free emx+gcc is supported, as are roughly half a dozen commercial compilers. *[UNZIP542.OS2]MAKEFILE.OS2;1+,.%/ 4%%- @0@123KPWO&56z8Ȍ7z8Ȍ89GHJ # Makefile for UnZip, UnZipSFX and fUnZip 24 November 1998 # # supported compilers: # - Microsoft C, version 6.00 or higher, for use under OS/2 1.x (16-bit) # - Watcom C/C++, version 9.0+, for use under OS/2 1.x or 2.x+ (16/32-bit) # - emx+gcc, version 0.9c or higher, for use under OS/2 2.x+ (32-bit) # - IBM C Set++, for use under OS/2 2.x+ (32-bit) # - Borland C++, for use under OS/2 2.x+ (32-bit) # - Metaware High C/C++, for use under OS/2 2.x+ (32-bit) # # supported cross-compilers: # - Microsoft C, version 6.0 or 7.0, for use under DOS (16-bit) # - Watcom C/C++, version 9.0+, for use under DOS/Win95/NT (16/32-bit) # - GNU gcc (emx), version 0.9c or higher, for use under DOS/Win95/NT (32-bit) # # supported assemblers: # - Microsoft MASM 6.00 with Microsoft C # - Watcom WASM with Watcom C/C++ # - GNU as with GNU gcc # To use MASM 5.x instead of MASM 6.00: # - set AS="masm -t -Ml" # - set ASEOL=";" # To use, enter "{d,n}make -f os2/makefile.os2" (this makefile depends on its # name being "makefile.os2", and it must be in the os2 subdirectory). # Notes on Microsoft C 6.00 compilation for OS/2: # # The resulting programs can be used under OS/2 protected mode only, not # under DOS. A larger stack has to be used for OS/2 because system calls # use more stack than under DOS; 8k is recommended by Microsoft. # Notes on IBM C Set++, Watcom C/C++, Borland C++ or emx+gcc compilation: # # The resulting programs can be used under protected mode of OS/2 2.x or # higher only, not under OS/2 1.x and not under DOS. # # The NFLAGS macro is used to work around an optimization bug in the IBM # C++ Set compiler; this is fixed by CSD #4, so NFLAGS="" can be used for # all targets below. # Notes on Watcom C/C++ compilation for DOS with the PMODE/W extender: # # You need to add the following section to your \watcom\binb\wlsystem.lnk # file and also need to copy pmodew.exe to the same directory: # # system begin pmodew # option osname='PMODE/W' # libpath %WATCOM%\lib386 # libpath %WATCOM%\lib386\dos # op stub=pmodew.exe # format os2 le # end # # PMODE/W 1.16 or higher is required. See also msdos/README for important # notes about PMODE/W bugs. default: @echo "Enter `$(MAKE) -f os2/makefile.os2 target' from the main" @echo "UnZip directory, where target is one of:" @echo " msc mscdebug mscdos ibm ibmdyn ibmdebug ibmprof" @echo " ibmdll ibmdyndll ibmdebugdll ibmprofdll" @echo " metaware borland gcc gccdyn gccdebug gccdos gccwin32" @echo " watcom watcom16 watcomdos watcom16dos pmodew watcomwin32" # MS C 6.00 for OS/2, 16-bit (should figure out way to split unzip/funzip # compiles so former is always large model and latter always small model...) msc: $(MAKE) -f os2/makefile.os2 all \ CC="cl -nologo -AL -Ocegit -Gs -I. $(FP)" \ CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="ml -nologo -c -Zm -Cp" \ ASFLAGS="-D__LARGE__ -D__286" \ LDFLAGS="-F 2000 -Lp -Fe" \ LDFLAGS2="-link /noeYžI UNZIP.BCK @[UNZIP542.OS2]MAKEFILE.OS2;1%" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i86" \ CRC32F="crc_i86" \ CRC32X="crc_i86" \ DEF="os2\unzip.def" # MS C 6.00 for OS/2, debug version mscdebug: $(MAKE) -f os2/makefile.os2 all \ CC="cl -nologo -AL -Zi -Od -I. $(FP)" \ CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="ml -nologo -c -Zim -Cp" \ ASFLAGS="-D__LARGE__ -D__286" \ LDFLAGS="-F 2000 -Lp -Fe" \ LDFLAGS2="-link /noe" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i86" \ CRC32F="crc_i86" \ CRC32X="crc_i86" \ DEF="os2\unzip.def" # cross-compilation for MS-DOS with MS C 6.00 (same comment as above...formerly; # now unzip is medium model again, with [almost] all strings in far memory) mscdos: $(MAKE) -f os2/makefile.os2 all \ CC="cl -nologo -AM -Oaict -Gs -I. $(FP)" \ CFLAGS="-Zp1 -W3 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="ml -nologo -c -Zm -Cp" \ ASFLAGS="-D__MEDIUM__" \ LDFLAGS="-F 0C00 -Lr -Fe" \ LDFLAGS2="-link /noe /exe" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i86" \ CRC32F="crc_i86" \ CRC32X="crc_i86" \ OBJU2="msdos.obj" \ OBJX2="msdos_.obj" \ OSDEP_H="msdos/doscfg.h" # IBM C Set, statically linked runtime ibm: $(MAKE) -f os2/makefile.os2 all \ CC="icc -Q -O -Gs -I." \ CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-B/ST:0x50000 -Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DEF="os2\unzip.def" # IBM C Set, dynamically linked runtime ibmdyn: $(MAKE) -f os2/makefile.os2 all \ CC="icc -Q -O -Gs -Gd -I." \ CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-B/ST:0x50000 -Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DEF="os2\unzip.def" # IBM C Set, debug version ibmdebug: $(MAKE) -f os2/makefile.os2 all \ CC="icc -Q -Ti -I." \ CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-B/ST:0x50000 -Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DEF="os2\unzip.def" # IBM C Set, profiling version for PROFIT ibmprof: $(MAKE) -f os2/makefile.os2 all \ CC="icc -Q -O -Gs -Gh -Ti -I." \ CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-B/ST:0x50000 -Fe" \ LDFLAGS2="cppopa3.obj" \ OUT="-Fo" \ OBJ=".obj" \ DEF="os2\unzip.def" # IBM C Set, statically linked runtime ibmdll: $(MAKE) -f os2/makefile.os2 dll \ CC="icc -Q -O -Gs -I." \ CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ LDFLAGS="-Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DLLDEF="os2\rexxapi.def" \ STUBDEF="os2\stub.def" \ DEF="os2\unzip.def" \ APILIB="REXX.lib" # IBM C Set, dynamically linked runtime ibmdyndll: $(MAKE) -f os2/makefile.os2 dll \ CC="icc -Q -O -Gs -Gd -I." \ CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ LDFLAGS="-Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DLLDEF="os2\rexxapi.def" \ STUBDEF="os2\stub.def" \ DEF="os2\unzip.def" \ APILIB="REXX.lib" # IBM C Set, debug version ibmdebugdll: $(MAKE) -f os2/makefile.os2 dll \ CC="icc -Q -Ti -I." \ CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ LDFLAGS="-Fe" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ DLLDEF="os2\rexxapi.def" \ STUBDEF="os2\stub.def" \ DEF="os2\unzip.def" \ APILIB="REXX.lib" # IBM C Set, profiling version for PROFIT ibmprofdll: $(MAKE) -f os2/makefile.os2 dll \ CC="icc -Q -O -Gs -Gh -Ti -I." \ CFLAGS="-Gm -Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ LDFLAGS="-Fe" \ LDFLAGS2="profit.obj" \ OUT="-Fo" \ OBJ=".obj" \ DLLDEF="os2\rexxapi.def" \ STUBDEF="os2\stub.def" \ DEF="os2\unzip.def" \ APILIB="REXX.lib" # Watcom C/386 9.0 or higher watcom: $(MAKE) -f os2/makefile.os2 all \ CC="wcl386 -bt=os2v2 -zq -Ox -s -I." \ CFLAGS="-Zp1 -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=os2v2 -zq -3 -mf" \ ASFLAGS="" \ LDFLAGS="-k0x50000 -x -l=os2v2 -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i386" \ CRC32F="crc_i386" \ CRC32X="crc_i386" \ DEF="" \ DIRSEP="\\" \ AS_DIRSEP="\\" # Watcom C/286 9.0 or higher watcom16: $(MAKE) -f os2/makefile.os2 all \ CC="wcl -bt=os2 -zq -ml -Ox -s -I." \ CFLAGS="-Zp1 -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=os2 -zq -2 -ml" \ ASFLAGS="" \ LDFLAGS="-k0x2000 -x -l=os2 -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i86" \ CRC32F="crc_i86" \ CRC32X="crc_i86" \ DIRSEP="\\" \ AS_DIRSEP="\\" # Watcom C/386 9.0 or higher, crosscompilation for DOS, DOS4GW extender watcomdos: $(MAKE) -f os2/makefile.os2 all \ CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=dos4g -zq -3 -mf" \ ASFLAGS="" \ LDFLAGS="-k0x50000 -x -l=dos4g -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i386" \ CRC32F="crc_i386" \ CRC32X="crc_i386" \ OBJU2="msdos.obj" \ OBJX2="msdos_.obj" \ OSDEP_H="msdos/doscfg.h" \ DIRSEP="\\" \ AS_DIRSEP="\\" # Watcom C/386 9.0 or higher, crosscompilation for DOS, PMODE/W extender pmodew: $(MAKE) -f os2/makefile.os2 all \ CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=dos4g -zq -3 -mf" \ ASFLAGS="" \ LDFLAGS="-k0x50000 -x -l=pmodew -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ CRC32="crc_i386" \ CRC32F="crc_i386" \ CRC32X="crc_i386" \ OBJU2="msdos.obj" \ OBJX2="msdos_.obj" \ OSDEP_H="msdos/doscfg.h" \ DIRSEP="\\" \ AS_DIRSEP="\\" # Watcom C/286 9.0 or higher, crosscompilation for DOS watcom16dos: $(MAKE) -f os2/makefile.os2 all \ CC="wcl -bt=dos -zq -ml -Ox -s -I." \ CFLAGS="-Zp1 -DMSDOS $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=dos -0 -mm" \ ASFLAGS="-D__MEDIUM__" \ LDFLAGS="-k0xC00 -x -l=dos -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ OBJU2="msdos.obj" \ OBJX2="msdos_.obj" \ OSDEP_H="msdos/doscfg.h" \ DIRSEP="\\" \ AS_DIRSEP="\\" # Watcom C/386 9.0 or higher, crosscompilation for Win95/NT watcomwin32: $(MAKE) -f os2/makefile.os2 all \ CC="wcl386 -bt=NT -zq -Ox -s -I." \ CFLAGS="-Zp1 -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="wasm -bt=NT -zq -3 -mf" \ ASFLAGS="" \ LDFLAGS="-k0x50000 -x -l=NT -Fe=" \ LDFLAGS2="" \ OUT="-Fo" \ OBJ=".obj" \ OBJU2="win32.obj nt.obj" \ OBJX2="win32_.obj nt_.obj" \ CRC32="crc_i386" \ CRC32F="crc_i386" \ CRC32X="crc_i386" \ DEF="" \ DIRSEP="\\" \ AS_DIRSEP="\\" # MetaWare High C/C++ 3.2 metaware: $(MAKE) -f os2/makefile.os2 all \ CC="hc -O2 -I." \ CFLAGS="-D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-o " \ LDFLAGS2="" \ OUT="-o ./" \ OBJ=".obj" \ DEF="-Hdef=os2\unzip.def" # Borland C++ borland: $(MAKE) -f os2/makefile.os2 all \ CC="bcc -O -I. -Ios2" \ CFLAGS="-w- -D__cdecl -D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ LDFLAGS="-e" \ LDFLAGS2="" \ OUT="-o" \ OBJ=".obj" \ DEF="-sDos2\unzip.def" # emx, gcc, OMF format, statically linked C runtime gcc: $(MAKE) -f os2/makefile.os2 all \ CC="gcc -Zomf -O -I." \ CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="gcc -Zomf" \ ASFLAGS="-Di386" \ LDFLAGS="-o ./" \ LDFLAGS2="-Zsmall-conv -Zstack 320 -Zsys -s" \ OUT="-o" \ OBJ=".obj" \ CRC32="crc_gcc" \ CRC32F="crc_gcc" \ CRC32X="crc_gcc" \ DEF="os2/unzip.def" # emx, gcc, OMF format, dynamically linked C runtime gccdyn: $(MAKE) -f os2/makefile.os2 all \ CC="gcc -Zomf -O -I." \ CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ ZS UNZIP.BCK @[UNZIP542.OS2]MAKEFILE.OS2;1%  DLLFLAG="" \ AS="gcc -Zomf" \ ASFLAGS="-Di386" \ LDFLAGS="-o ./" \ LDFLAGS2="-Zstack 320 -Zcrtdll -s" \ OUT="-o" \ OBJ=".obj" \ CRC32="crc_gcc" \ CRC32F="crc_gcc" \ CRC32X="crc_gcc" \ DEF="os2/unzip.def" # emx, gcc, a.out format, with debug info for gdb gccdebug: $(MAKE) -f os2/makefile.os2 all \ CC="gcc -g -I." \ CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="gcc -g" \ ASFLAGS="-Di386" \ LDFLAGS="-o ./" \ LDFLAGS2="-Zsmall-conv" \ OUT="-o" \ OBJ=".o" \ CRC32="crc_gcc" \ CRC32F="crc_gcc" \ CRC32X="crc_gcc" # emx, gcc, a.out format, cross-compilation for MS-DOS gccdos: $(MAKE) -f os2/makefile.os2 all \ CC="gcc -O -I." \ CFLAGS="-Wall -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="gcc" \ ASFLAGS="-Di386" \ LDFLAGS="-o ./" \ LDFLAGS2="-Zsmall-conv -s" \ OUT="-o" \ OBJ=".o" \ CRC32="crc_gcc" \ CRC32F="crc_gcc" \ CRC32X="crc_gcc" \ OBJU2="msdos.o" \ OBJX2="msdos_.o" \ OSDEP_H="msdos/doscfg.h" # emx, gcc, RSXNT, cross-compilation for Win32, statically linked C runtime gccwin32: $(MAKE) -f os2/makefile.os2 all \ CC="gcc -Zwin32 -O2 -I." \ CFLAGS="-Wall -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ NFLAGS="" \ DLLFLAG="" \ AS="gcc" \ ASFLAGS="-Di386" \ LDFLAGS="-Zsys -o ./" \ LDFLAGS2="-ladvapi32 -Zsmall-conv -s" \ OUT="-o" \ OBJ=".o" \ CRC32="crc_gcc" \ CRC32F="crc_gcc" \ CRC32X="crc_gcc" \ OBJU2="win32.o nt.o" \ OBJX2="win32_.o nt_.o" \ OBJF2="win32f.o" \ OSDEP_H="win32/w32cfg.h" # variables # LOCAL_UNZIP = -DREENTRANT # default settings for target dependent macros: DIRSEP = / AS_DIRSEP = / OSDEP_H = os2/os2data.h os2/os2cfg.h CRC32 = crc32 CRC32F = crc32f CRC32X = crc32_ OBJU = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) \ explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) \ inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) \ unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) OBJU2 = os2$(OBJ) os2acl$(OBJ) OBJX = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) \ extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) \ match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) OBJX2 = os2_$(OBJ) os2acl_$(OBJ) OBJDLL= api$(OBJ) apihelp$(OBJ) rexxhelp$(OBJ) rexxapi$(OBJ) OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ globalsf$(OBJ) ttyiof$(OBJ) OBJF2 = UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) # rules .SUFFIXES: .c .asm $(OBJ) .c$(OBJ): $(CC) -c $(CFLAGS) $(DLLFLAG) $< .asm$(OBJ): $(AS) $(ASFLAGS) $< $(ASEOL) # targets all: unzip.exe funzip.exe unzipsfx.exe dll: unzip32.dll unzip.stb funzip.exe unzipsfx.exe unzip.exe: $(OBJU) $(OBJU2) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2) funzip.exe: $(OBJF) $(OBJF2) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(OBJF2) $(LDFLAGS2) unzipsfx.exe: $(OBJX) $(OBJX2) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(OBJX2) $(LDFLAGS2) unzip32.dll: $(DLLDEF) $(OBJU) $(OBJU2) $(OBJDLL) $(CC) $(DLLFLAG) $(LDFLAGS)$@ $(DLLDEF) $(OBJU) $(OBJDLL) $(OBJU2) $(APILIB) $(LDFLAGS2) unzip.stb: unzipstb$(OBJ) $(STUBDEF) $(CC) $(LDFLAGS)$@ $(STUBDEF) unzipstb$(OBJ) $(LDFLAGS2) copy unzip.stb unzip.exe # dependencies apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crctab$(OBJ): crctab.c $(UNZIP_H) zip.h envargs$(OBJ): envargs.c $(UNZIP_H) explode$(OBJ): explode.c $(UNZIP_H) extract$(OBJ): extract.c $(UNZIP_H) crypt.h fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(OBJ): globals.c $(UNZIP_H) inflate$(OBJ): inflate.c $(UNZIP_H) list$(OBJ): list.c $(UNZIP_H) match$(OBJ): match.c $(UNZIP_H) process$(OBJ): process.c $(UNZIP_H) ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(OBJ): unreduce.c $(UNZIP_H) unshrink$(OBJ): unshrink.c $(UNZIP_H) unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h api$(OBJ): api.c $(UNZIP_H) version.h zipinfo$(OBJ): zipinfo.c $(UNZIP_H) funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h # funzip only $(CC) -c $(CFLAGS) funzip.c unzipstb$(OBJ): unzipstb.c # DLL version $(CC) -c $(CFLAGS) unzipstb.c msdos$(OBJ): msdos/msdos.c $(UNZIP_H) version.h # DOS only $(CC) -c $(CFLAGS) msdos$(DIRSEP)msdos.c msdos_$(OBJ): msdos/msdos.c $(UNZIP_H) # DOS unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos$(DIRSEP)msdos.c win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h version.h # Win32 only $(CC) -c $(CFLAGS) win32$(DIRSEP)win32.c nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 only $(CC) -c $(CFLAGS) win32$(DIRSEP)nt.c win32_$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)win32.c nt_$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)nt.c win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 funzip $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ win32$(DIRSEP)win32.c os2$(OBJ): os2/os2.c $(UNZIP_H) version.h # OS/2 only $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2.c os2_$(OBJ): os2/os2.c $(UNZIP_H) # OS/2 unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2.c os2acl$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 only $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2acl.c os2acl_$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 unzipsfx $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2acl.c rexxhelp$(OBJ): os2/rexxhelp.c # OS/2 DLL only $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxhelp.c rexxapi$(OBJ): os2/rexxapi.c # OS/2 DLL only $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxapi.c crc_i86$(OBJ): msdos/crc_i86.asm # 16bit only $(AS) $(ASFLAGS) msdos$(AS_DIRSEP)crc_i86.asm $(ASEOL) crc_i386$(OBJ): win32/crc_i386.asm # 32bit, MASM $(AS) $(ASFLAGS) win32$(AS_DIRSEP)crc_i386.asm $(ASEOL) crc_gcc$(OBJ): crc_i386.S # 32bit, GNU AS $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S # NFLAGS are solely used as work-around for optimization bug in IBM C++ Set crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) $(DLLFLAG) $(NFLAGS) crypt.c cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ crc32.c globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ globals.c inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ ttyio.c crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crc32.c crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crctab.c crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crypt.c extract_$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ fileio.c globals_$(OBJ): globals.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ globals.c inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ inflate.c match_$(OBJ): match.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ match.c process_$(OBJ): process.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ process.c ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGS) -[%6X UNZIP.BCK @[UNZIP542.OS2]MAKEFILE.OS2;1%i%DSFX $(OUT)$@ ttyio.c unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c *[UNZIP542.OS2]OS2.C;1+,./ 4- @0@123KPWO56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, both of these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- os2.c OS/2-specific routines for use with Info-ZIP's UnZip 5.1 and later. This file contains the OS/2 versions of the file name/attribute/time/etc code. Most or all of the routines which make direct use of OS/2 system calls (i.e., the non-lowercase routines) are Kai Uwe Rommel's. The read- dir() suite was written by Michael Rendell and ported to OS/2 by Kai Uwe; it is in the public domain. Contains: GetCountryInfo() GetFileTime() SetFileTime() (TIMESTAMP only) stamp_file() (TIMESTAMP only) Utime2DosDateTime() SetPathAttrTimes() SetEAs() GetLoadPath() opendir() closedir() readdir() [ seekdir() ] not used [ telldir() ] not used free_dircontents() getdirent() IsFileSystemFAT() do_wild() mapattr() mapname() checkdir() isfloppy() IsFileNameValid() map2fat() SetLongNameEA() close_outfile() check_for_newer() dateformat() version() InitNLS() IsUpperNLS() ToLowerNLS() StringLower() screensize() DebugMalloc() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #include "os2acl.h" extern ZCONST char Far TruncEAs[]; /* local prototypes */ #ifdef TIMESTAMP static int SetFileTime(ZCONST char *name, ulg stamp); #endif #if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) static ulg Utime2DosDateTime OF((time_t uxtime)); #endif static int getOS2filetimes OF((__GPRO__ ulg *pM_dt, ulg *pA_dt, ulg *pC_dt)); static void SetPathAttrTimes OF((__GPRO__ int flags, int dir)); static int SetEAs OF((__GPRO__ const char *path, void *ef_block)); static int SetACL OF((__GPRO__ const char *path, void *ef_block)); static int EvalExtraFields OF((__GPRO__ const char *path, void *extra_field, unsigned ef_len)); static int isfloppy OF((int nDrive)); static int IsFileNameValid OF((const char *name)); static void map2fat OF((char *pathcomp, char **pEndFAT)); static int SetLongNameEA OF((char *name, char *longname)); static void InitNLS OF((void)); /*****************************/ /* Strings used in os2.c */ /*****************************/ #ifndef SFX static char Far CantAllocateWildcard[] = "warning: cannot allocate wildcard buffers\n"; #endif static char Far Creating[] = " creating: %-22s "; static char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; static char Far Labelling[] = "labelling %c: %-22s\n"; static char Far ErrSetVolLabel[] = "mapname: error setting volume label\n"; static char Far PathTooLong[] = "checkdir error: path too long: %s\n"; static char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ unable to process %s.\n"; static char Far DirIsntDirectory[] = "checkdir error: %s exists but is not directory\n\ unable to process %s.\n"; static char Far PathTooLongTrunc[] = "checkdir warning: path too long; truncating\n %s\n\ -> %s\n"; #if (!defined(SFX) || defined(SFX_EXDIR)) static char Far CantCreateExtractDir[] = "checkdir: cannot create extraction directory: %s\n"; #endif #ifndef __EMX__ # if (_MSC_VER >= 600) || defined(__IBMC__) # include /* have special MSC/IBM C mkdir prototype */ # else /* own prototype because dir.h conflicts? */ int mkdir(const char *path); # endif # define MKDIR(path,mode) mkdir(path) #else # define MKDIR(path,mode) mkdir(path,mode) #endif #ifdef __32BIT__ USHORT DosDevIOCtl32(PVOID pData, USHORT cbData, PVOID pParms, USHORT cbParms, USHORT usFunction, USHORT usCategory, HFILE hDevice) { ULONG ulParmLengthInOut = cbParms, ulDataLengthInOut = cbData; return (USHORT) DosDevIOCtl(hDevice, usCategory, usFunction, pParms, cbParms, &ulParmLengthInOut, pData, cbData, &ulDataLengthInOut); } # define DosDevIOCtl DosDevIOCtl32 #else # define DosDevIOCtl DosDevIOCtl2 #endif typedef struct { ush nID; ush nSize; ulg lSize; } EFHEADER, *PEFHEADER; #ifdef __32BIT__ #define DosFindFirst(p1, p2, p3, p4, p5, p6) \ DosFindFirst(p1, p2, p3, p4, p5, p6, 1) #else typedef struct { ULONG oNextEntryOffset; BYTE fEA; BYTE cbName; USHORT cbValue; CHAR szName[1]; } FEA2, *PFEA2; typedef struct { ULONG cbList; FEA2 list[1]; } FEA2LIST, *PFEA2LIST; #define DosQueryCurrentDisk DosQCurDisk #define DosQueryFSAttach(p1, p2, p3, p4, p5) \ DosQFSAttach(p1, p2, p3, p4, p5, 0) #define DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7) \ DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7, 0) #define DosFindFirst(p1, p2, p3, p4, p5, p6) \ DosFindFirst(p1, p2, p3, p4, p5, p6, 0) #define DosMapCase DosCaseMap #define DosSetPathInfo(p1, p2, p3, p4, p5) \ DosSetPathInfo(p1, p2, p3, p4, p5, 0) #define DosQueryPathInfo(p1, p2, p3, p4) \ DosQPathInfo(p1, p2, p3, p4, 0) #define DosQueryFileInfo DosQFileInfo #define DosMapCase DosCaseMap #define DosQueryCtryInfo DosGetCtryInfo #endif /* !__32BIT__ */ /* * @(#) dir.h 1.4 87/11/06 Public Domain. */ #define A_RONLY 0x01 #define A_HIDDEN 0x02 #define A_SYSTEM 0x04 #define A_LABEL 0x08 #define A_DIR 0x10 #define A_ARCHIVE 0x20 const int attributes = A_DIR | A_HIDDEN | A_SYSTEM; extern DIR *opendir(__GPRO__ ZCONST char *); extern struct direct *readdir(__GPRO__ DIR *); extern void seekdir(DIR *, long); extern long telldir(DIR *); extern void closedir(DIR *); #define rewinddir(dirp) seekdir(dirp, 0L) int IsFileSystemFAT(__GPRO__ ZCONST char *dir); \V UNZIP.BCK @[UNZIP542.OS2]OS2.C;1;1_char *StringLower(char *szArg); /* * @(#)dir.c 1.4 87/11/06 Public Domain. */ #ifndef S_IFMT # define S_IFMT 0xF000 #endif #ifndef SFX static char *getdirent(__GPRO__ ZCONST char *); static void free_dircontents(struct _dircontents *); #endif /* !SFX */ int GetCountryInfo(void) { COUNTRYINFO ctryi; COUNTRYCODE ctryc; #ifdef __32BIT__ ULONG cbInfo; #else USHORT cbInfo; #endif ctryc.country = ctryc.codepage = 0; if ( DosQueryCtryInfo(sizeof(ctryi), &ctryc, &ctryi, &cbInfo) != NO_ERROR ) return 0; return ctryi.fsDateFmt; } long GetFileTime(ZCONST char *name) { #ifdef __32BIT__ FILESTATUS3 fs; #else FILESTATUS fs; #endif USHORT nDate, nTime; if ( DosQueryPathInfo((PSZ) name, 1, (PBYTE) &fs, sizeof(fs)) ) return -1; nDate = * (USHORT *) &fs.fdateLastWrite; nTime = * (USHORT *) &fs.ftimeLastWrite; return ((ULONG) nDate) << 16 | nTime; } #ifdef TIMESTAMP static int SetFileTime(ZCONST char *name, ulg stamp) /* swiped from Zip */ { FILESTATUS fs; USHORT fd, ft; if (DosQueryPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs))) return -1; fd = (USHORT) (stamp >> 16); ft = (USHORT) stamp; fs.fdateLastWrite = fs.fdateCreation = * (FDATE *) &fd; fs.ftimeLastWrite = fs.ftimeCreation = * (FTIME *) &ft; if (DosSetPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0)) return -1; return 0; } int stamp_file(ZCONST char *fname, time_t modtime) { return SetFileTime(fname, Utime2DosDateTime(modtime)); } #endif /* TIMESTAMP */ /* The following DOS date/time structures are machine-dependent as they * assume "little-endian" byte order. For OS/2-specific code, which * is run on x86 CPUs (or emulators?), this assumption is valid; but * care should be taken when using this code as template for other ports. */ typedef union { ULONG timevalue; /* combined value, useful for comparisons */ struct { FTIME ft; /* system file time record: * USHORT twosecs : 5 * USHORT minutes : 6; * USHORT hours : 5; */ FDATE fd; /* system file date record: * USHORT day : 5 * USHORT month : 4; * USHORT year : 7; */ } _fdt; } F_DATE_TIME, *PF_DATE_TIME; #if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) static ulg Utime2DosDateTime(uxtime) time_t uxtime; { F_DATE_TIME dosfiletime; struct tm *t; /* round up to even seconds */ /* round up (down if "up" overflows) to even seconds */ if (((ulg)uxtime) & 1) uxtime = (uxtime + 1 > uxtime) ? uxtime + 1 : uxtime - 1; t = localtime(&(uxtime)); if (t == (struct tm *)NULL) { /* time conversion error; use current time instead, hoping that localtime() does not reject it as well! */ time_t now = time(NULL); t = localtime(&now); } if (t->tm_year < 80) { dosfiletime._fdt.ft.twosecs = 0; dosfiletime._fdt.ft.minutes = 0; dosfiletime._fdt.ft.hours = 0; dosfiletime._fdt.fd.day = 1; dosfiletime._fdt.fd.month = 1; dosfiletime._fdt.fd.year = 0; } else { dosfiletime._fdt.ft.twosecs = t->tm_sec >> 1; dosfiletime._fdt.ft.minutes = t->tm_min; dosfiletime._fdt.ft.hours = t->tm_hour; dosfiletime._fdt.fd.day = t->tm_mday; dosfiletime._fdt.fd.month = t->tm_mon + 1; dosfiletime._fdt.fd.year = t->tm_year - 80; } return dosfiletime.timevalue; } /* end function Utime2DosDateTime() */ #endif /* USE_EF_UT_TIME || TIMESTAMP */ static int getOS2filetimes(__GPRO__ ulg *pM_dt, ulg *pA_dt, ulg *pC_dt) { #ifdef USE_EF_UT_TIME unsigned eb_izux_flg; iztimes z_utime; #endif /* Copy and/or convert time and date variables, if necessary; */ /* return a flag indicating which time stamps are available. */ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif ((eb_izux_flg = ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL)) & EB_UT_FL_MTIME)) { TTrace((stderr, "getOS2filetimes: UT e.f. modif. time = %lu\n", z_utime.mtime)); *pM_dt = Utime2DosDateTime(z_utime.mtime); if (eb_izux_flg & EB_UT_FL_ATIME) { TTrace((stderr, "getOS2filetimes: UT e.f. access time = %lu\n", z_utime.atime)); *pA_dt = Utime2DosDateTime(z_utime.atime); } if (eb_izux_flg & EB_UT_FL_CTIME) { TTrace((stderr, "getOS2filetimes: UT e.f. creation time = %lu\n", z_utime.ctime)); *pC_dt = Utime2DosDateTime(z_utime.ctime); } else { /* no creation time value supplied, set it to modification time */ *pC_dt = *pM_dt; eb_izux_flg |= EB_UT_FL_CTIME; } return (int)eb_izux_flg; } #endif /* USE_EF_UT_TIME */ *pC_dt = *pM_dt = G.lrec.last_mod_dos_datetime; TTrace((stderr, "\ngetOS2filetimes: DOS dir modific./creation time = %lu\n", *pM_dt)); return (EB_UT_FL_MTIME | EB_UT_FL_CTIME); } static void SetPathAttrTimes(__GPRO__ int flags, int dir) { HFILE hFile; #ifdef __32BIT__ ULONG nAction; #else USHORT nAction; #endif FILESTATUS fs; USHORT nLength; char szName[CCHMAXPATH]; ulg Mod_dt, Acc_dt, Cre_dt; int gotTimes; strcpy(szName, G.filename); nLength = strlen(szName); if (szName[nLength - 1] == '/') szName[nLength - 1] = 0; if (dir) { if ( DosQueryPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) return; } else { /* for regular files, open them and operate on the file handle, to work around certain network operating system bugs ... */ if ( DosOpen(szName, &hFile, &nAction, 0, 0, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW, OPEN_SHARE_DENYREADWRITE | OPEN_ACCESS_READWRITE, 0) ) return; if ( DosQueryFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) return; } /* set date/time stamps */ gotTimes = getOS2filetimes(__G__ &Mod_dt, &Acc_dt, &Cre_dt); if (gotTimes & EB_UT_FL_MTIME) { fs.fdateLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.fd; fs.ftimeLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.ft; } if (gotTimes & EB_UT_FL_ATIME) { fs.fdateLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.fd; fs.ftimeLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.ft; } if (gotTimes & EB_UT_FL_CTIME) { fs.fdateCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.fd; fs.ftimeCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.ft; } if ( flags != -1 ) fs.attrFile = flags; /* hidden, system, archive, read-only */ if (dir) { DosSetPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0); } else { DosSetFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)); DosClose(hFile); } } typedef struct { ULONG cbList; /* length of value + 22 */ #ifdef __32BIT__ ULONG oNext; #endif BYTE fEA; /* 0 */ BYTE cbName; /* length of ".LONGNAME" = 9 */ USHORT cbValue; /* length of value + 4 */ BYTE szName[10]; /* ".LONGNAME" */ USHORT eaType; /* 0xFFFD for length-preceded ASCII */ USHORT eaSize; /* length of value */ BYTE szValue[CCHMAXPATH]; } FEALST; static int SetEAs(__GPRO__ const char *path, void *ef_b]E UNZIP.BCK @[UNZIP542.OS2]OS2.C;1;1-lock) { /* returns almost-PK errors */ EFHEADER *pEAblock = (PEFHEADER) ef_block; #ifdef __32BIT__ EAOP2 eaop; PFEA2LIST pFEA2list; #else EAOP eaop; PFEALIST pFEAlist; PFEA pFEA; PFEA2LIST pFEA2list; PFEA2 pFEA2; ULONG nLength2; #endif USHORT nLength; char szName[CCHMAXPATH]; int error; if ( ef_block == NULL || pEAblock -> nID != EF_OS2 ) return PK_OK; /* not an OS/2 extra field: assume OK */ if ( pEAblock->nSize < 4 || (pEAblock->lSize > 0L && pEAblock->nSize <= 10) ) return IZ_EF_TRUNC; /* no compressed data! */ strcpy(szName, path); nLength = strlen(szName); if (szName[nLength - 1] == '/') szName[nLength - 1] = 0; if ( (pFEA2list = (PFEA2LIST) malloc((size_t) pEAblock -> lSize)) == NULL ) return PK_MEM4; if ( (error = memextract(__G__ (uch *)pFEA2list, pEAblock->lSize, (uch *)(pEAblock+1), (ulg)(pEAblock->nSize - 4))) != PK_OK ) { free(pFEA2list); return error; } #ifdef __32BIT__ eaop.fpGEA2List = NULL; eaop.fpFEA2List = pFEA2list; #else pFEAlist = (PVOID) pFEA2list; pFEA2 = pFEA2list -> list; pFEA = pFEAlist -> list; do { nLength2 = pFEA2 -> oNextEntryOffset; nLength = sizeof(FEA) + pFEA2 -> cbName + 1 + pFEA2 -> cbValue; memcpy(pFEA, (PCH) pFEA2 + sizeof(pFEA2 -> oNextEntryOffset), nLength); pFEA2 = (PFEA2) ((PCH) pFEA2 + nLength2); pFEA = (PFEA) ((PCH) pFEA + nLength); } while ( nLength2 != 0 ); pFEAlist -> cbList = (PCH) pFEA - (PCH) pFEAlist; eaop.fpGEAList = NULL; eaop.fpFEAList = pFEAlist; #endif eaop.oError = 0; DosSetPathInfo(szName, FIL_QUERYEASIZE, (PBYTE) &eaop, sizeof(eaop), 0); if (!uO.tflag && QCOND2) Info(slide, 0, ((char *)slide, " (%ld bytes EAs)", pFEA2list -> cbList)); free(pFEA2list); return PK_COOL; } static int SetACL(__GPRO__ const char *path, void *ef_block) { /* returns almost-PK errors */ EFHEADER *pACLblock = (PEFHEADER) ef_block; char *szACL; int error; if ( ef_block == NULL || pACLblock -> nID != EF_ACL ) return PK_OK; /* not an OS/2 extra field: assume OK */ if (pACLblock->nSize < 4 || (pACLblock->lSize > 0L && pACLblock->nSize <= 10)) return IZ_EF_TRUNC; /* no compressed data! */ if ( (szACL = malloc((size_t) pACLblock -> lSize)) == NULL ) return PK_MEM4; if ( (error = memextract(__G__ (uch *)szACL, pACLblock->lSize, (uch *)(pACLblock+1), (ulg)(pACLblock->nSize - 4))) != PK_OK ) { free(szACL); return error; } if (acl_set(NULL, path, szACL) == 0) if (!uO.tflag && QCOND2) Info(slide, 0, ((char *)slide, " (%ld bytes ACL)", strlen(szACL))); free(szACL); return PK_COOL; } #ifdef SFX char *GetLoadPath(__GPRO) { #ifdef __32BIT__ /* generic for 32-bit API */ PTIB pptib; PPIB pppib; char *szPath; DosGetInfoBlocks(&pptib, &pppib); szPath = pppib -> pib_pchenv; #else /* 16-bit, note: requires large data model */ SEL selEnv; USHORT offCmd; char *szPath; DosGetEnv(&selEnv, &offCmd); szPath = MAKEP(selEnv, 0); #endif while (*szPath) /* find end of process environment */ szPath = strchr(szPath, 0) + 1; return szPath + 1; /* .exe file name follows environment */ } /* end function GetLoadPath() */ #else /* !SFX */ DIR *opendir(__GPRO__ const char *name) { struct stat statb; DIR *dirp; char c; char *s; struct _dircontents *dp; char nbuf[MAXPATHLEN + 1]; int len; strcpy(nbuf, name); if ((len = strlen(nbuf)) == 0) return NULL; if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len > 1) ) { nbuf[len - 1] = 0; --len; if ( nbuf[len - 1] == ':' ) { strcpy(nbuf+len, "\\."); len += 2; } } else if ( nbuf[len - 1] == ':' ) { strcpy(nbuf+len, "."); ++len; } /* GRR: Borland and Watcom C return non-zero on wildcards... < 0 ? */ if (stat(nbuf, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) { Trace((stderr, "opendir: stat(%s) returns negative or not directory\n", nbuf)); return NULL; } if ( (dirp = malloc(sizeof(DIR))) == NULL ) return NULL; if ( nbuf[len - 1] == '.' && (len == 1 || nbuf[len - 2] != '.') ) strcpy(nbuf+len-1, "*"); else if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len == 1) ) strcpy(nbuf+len, "*"); else strcpy(nbuf+len, "\\*"); /* len is no longer correct (but no longer needed) */ Trace((stderr, "opendir: nbuf = [%s]\n", nbuf)); dirp -> dd_loc = 0; dirp -> dd_contents = dirp -> dd_cp = NULL; if ((s = getdirent(__G__ nbuf)) == NULL) return dirp; do { if (((dp = malloc(sizeof(struct _dircontents))) == NULL) || ((dp -> _d_entry = malloc(strlen(s) + 1)) == NULL) ) { if (dp) free(dp); free_dircontents(dirp -> dd_contents); return NULL; } if (dirp -> dd_contents) { dirp -> dd_cp -> _d_next = dp; dirp -> dd_cp = dirp -> dd_cp -> _d_next; } else dirp -> dd_contents = dirp -> dd_cp = dp; strcpy(dp -> _d_entry, s); dp -> _d_next = NULL; dp -> _d_size = G.os2.find.cbFile; dp -> _d_mode = G.os2.find.attrFile; dp -> _d_time = *(unsigned *) &(G.os2.find.ftimeLastWrite); dp -> _d_date = *(unsigned *) &(G.os2.find.fdateLastWrite); } while ((s = getdirent(__G__ NULL)) != NULL); dirp -> dd_cp = dirp -> dd_contents; return dirp; } void closedir(DIR * dirp) { free_dircontents(dirp -> dd_contents); free(dirp); } struct direct *readdir(__GPRO__ DIR * dirp) { /* moved to os2data.h so it can be global */ /* static struct direct dp; */ if (dirp -> dd_cp == NULL) return NULL; G.os2.dp.d_namlen = G.os2.dp.d_reclen = strlen(strcpy(G.os2.dp.d_name, dirp -> dd_cp -> _d_entry)); G.os2.dp.d_ino = 0; G.os2.dp.d_size = dirp -> dd_cp -> _d_size; G.os2.dp.d_mode = dirp -> dd_cp -> _d_mode; G.os2.dp.d_time = dirp -> dd_cp -> _d_time; G.os2.dp.d_date = dirp -> dd_cp -> _d_date; dirp -> dd_cp = dirp -> dd_cp -> _d_next; dirp -> dd_loc++; return &G.os2.dp; } #if 0 /* not used in unzip; retained for possibly future use */ void seekdir(DIR * dirp, long off) { long i = off; struct _dircontents *dp; if (off >= 0) { for (dp = dirp -> dd_contents; --i >= 0 && dp; dp = dp -> _d_next); dirp -> dd_loc = off - (i + 1); dirp -> dd_cp = dp; } } long telldir(DIR * dirp) { return dirp -> dd_loc; } #endif /* 0 */ static void free_dircontents(struct _dircontents * dp) { struct _dircontents *odp; while (dp) { if (dp -> _d_entry) free(dp -> _d_entry); dp = (odp = dp) -> _d_next; free(odp); } } static char *getdirent(__GPRO__ ZCONST char *dir) { int done; /* moved to os2data.h so it can be global */ /* static int lower; */ if (dir != NULL) { /* get first entry */ G.os2.hdir = HDIR_SYSTEM; G.os2.count = 1; done = DosFindFirst((PSZ) dir, &G.os2.hdir, attributes, &G.os2.find, sizeof(G.os2.find), &G.os2.count); G.os2.lower = IsFileSystemFAT(__G__ dir); } else /* get next entry */ done = DosFindNext(G.os2.hdir, &G.os2.find, sizeof(G.os2.find), &G.os2.count); if (done == 0) { if ( G.os2.lower ) StringLower(G.os2.find.achName); return G.os2.find.achName; } else { DosFindClose(G.os2.hdir); return NULL; } } int IsFileSystemFAT(__GPRO__ ZCONST char *dir) /* FAT / HPFS detection */ { /* moved to os2data.h so they can be global */ /* st^ UNZIP.BCK @[UNZIP542.OS2]OS2.C;1;1,,atic USHORT nLastDrive=(USHORT)(-1), nResult; */ ULONG lMap; BYTE bData[64]; char bName[3]; #ifdef __32BIT__ ULONG nDrive, cbData; PFSQBUFFER2 pData = (PFSQBUFFER2) bData; #else USHORT nDrive, cbData; PFSQBUFFER pData = (PFSQBUFFER) bData; #endif /* We separate FAT and HPFS+other file systems here. at the moment I consider other systems to be similar to HPFS, i.e. support long file names and case sensitive */ if ( isalpha((uch)dir[0]) && (dir[1] == ':') ) nDrive = toupper(dir[0]) - '@'; else DosQueryCurrentDisk(&nDrive, &lMap); if ( nDrive == G.os2.nLastDrive ) return G.os2.nResult; bName[0] = (char) (nDrive + '@'); bName[1] = ':'; bName[2] = 0; G.os2.nLastDrive = nDrive; cbData = sizeof(bData); if ( !DosQueryFSAttach(bName, 0, FSAIL_QUERYNAME, (PVOID) pData, &cbData) ) G.os2.nResult = !strcmp((char *) (pData -> szFSDName) + pData -> cbName, "FAT"); else G.os2.nResult = FALSE; /* End of this ugly code */ return G.os2.nResult; } /* end function IsFileSystemFAT() */ /************************/ /* Function do_wild() */ /************************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { /* moved to os2data.h so they can be global */ #if 0 static DIR *wild_dir = NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; #endif char *fnamestart; struct direct *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!G.os2.notfirstcall) { /* first call: must initialize everything */ G.os2.notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(G.os2.matchname, wildspec); G.os2.have_dirname = FALSE; G.os2.wild_dir = NULL; return G.os2.matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((G.os2.wildname = (ZCONST char *)strrchr(wildspec, '/')) == NULL && (G.os2.wildname = (ZCONST char *)strrchr(wildspec, ':')) == NULL) { G.os2.dirname = "."; G.os2.dirnamelen = 1; G.os2.have_dirname = FALSE; G.os2.wildname = wildspec; } else { ++G.os2.wildname; /* point at character after '/' or ':' */ G.os2.dirnamelen = G.os2.wildname - wildspec; if ((G.os2.dirname = (char *)malloc(G.os2.dirnamelen+1)) == NULL) { Info(slide, 1, ((char *)slide, LoadFarString(CantAllocateWildcard))); strcpy(G.os2.matchname, wildspec); return G.os2.matchname; /* but maybe filespec was not a wildcard */ } strncpy(G.os2.dirname, wildspec, G.os2.dirnamelen); G.os2.dirname[G.os2.dirnamelen] = '\0'; /* terminate for strcpy below */ G.os2.have_dirname = TRUE; } Trace((stderr, "do_wild: dirname = [%s]\n", G.os2.dirname)); if ((G.os2.wild_dir = opendir(__G__ G.os2.dirname)) != NULL) { if (G.os2.have_dirname) { strcpy(G.os2.matchname, G.os2.dirname); fnamestart = G.os2.matchname + G.os2.dirnamelen; } else fnamestart = G.os2.matchname; while ((file = readdir(__G__ G.os2.wild_dir)) != NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, G.os2.wildname, 1) && /* 1 == ignore case */ /* skip "." and ".." directory entries */ strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return G.os2.matchname; } } /* if we get to here directory is exhausted, so close it */ closedir(G.os2.wild_dir); G.os2.wild_dir = NULL; } #ifdef DEBUG else { Trace((stderr, "do_wild: opendir(%s) returns NULL\n", G.os2.dirname)); } #endif /* DEBUG */ /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(G.os2.matchname, wildspec); return G.os2.matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (G.os2.wild_dir == NULL) { G.os2.notfirstcall = FALSE; /* nothing left to try--reset */ if (G.os2.have_dirname) free(G.os2.dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ if (G.os2.have_dirname) { /* strcpy(G.os2.matchname, G.os2.dirname); */ fnamestart = G.os2.matchname + G.os2.dirnamelen; } else fnamestart = G.os2.matchname; while ((file = readdir(__G__ G.os2.wild_dir)) != NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (strrchr(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, G.os2.wildname, 1)) { /* 1 == ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart += strlen(fnamestart) - 1; if (*fnamestart == '.') *fnamestart = '\0'; return G.os2.matchname; } } closedir(G.os2.wild_dir); /* have read at least one entry; nothing left */ G.os2.wild_dir = NULL; G.os2.notfirstcall = FALSE; /* reset for new wildspec */ if (G.os2.have_dirname) free(G.os2.dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /* scan extra fields for something we happen to know */ static int EvalExtraFields(__GPRO__ const char *path, void *extra_field, unsigned ef_len) { char *ef_ptr = extra_field; PEFHEADER pEFblock; int rc = PK_OK; while (ef_len >= sizeof(EFHEADER)) { pEFblock = (PEFHEADER) ef_ptr; if (pEFblock -> nSize > (ef_len - EB_HEADSIZE)) return PK_ERR; /* claimed EFblock length exceeds EF size! */ switch (pEFblock -> nID) { case EF_OS2: rc = SetEAs(__G__ path, ef_ptr); break; case EF_ACL: rc = (uO.X_flag) ? SetACL(__G__ path, ef_ptr) : PK_OK; break; #if 0 case EF_IZUNIX: case EF_PKUNIX: /* handled elsewhere */ break; #endif default: TTrace((stderr,"EvalExtraFields: unknown extra field block, ID=%d\n", pEFblock -> nID)); break; } ef_ptr += (pEFblock -> nSize + EB_HEADSIZE); ef_len -= (pEFblock -> nSize + EB_HEADSIZE); if (rc != PK_OK) break; } return rc; } /************************/ /* Function mapattr() */ /************************/ __QI UNZIP.BCK @[UNZIP542.OS2]OS2.C;1;1; int mapattr(__G) __GDEF { /* set archive bit (file is not backed up): */ G.pInfo->file_attr = (unsigned)(G.crec.external_file_attributes | 32) & 0xff; return 0; } /************************/ /* Function mapname() */ /************************/ /* * There are presently two possibilities in OS/2: the output filesystem is * FAT, or it is HPFS. If the former, we need to map to FAT, obviously, but * we *also* must map to HPFS and store that version of the name in extended * attributes. Either way, we need to map to HPFS, so the main mapname * routine does that. In the case that the output file system is FAT, an * extra filename-mapping routine is called in checkdir(). While it should * be possible to determine the filesystem immediately upon entry to mapname(), * it is conceivable that the DOS APPEND utility could be added to OS/2 some- * day, allowing a FAT directory to be APPENDed to an HPFS drive/path. There- * fore we simply check the filesystem at each path component. * * Note that when alternative IFSes become available/popular, everything will * become immensely more complicated. For example, a Minix filesystem would * have limited filename lengths like FAT but no extended attributes in which * to store the longer versions of the names. A BSD Unix filesystem would * support paths of length 1024 bytes or more, but it is not clear that FAT * EAs would allow such long .LONGNAME fields or that OS/2 would properly * restore such fields when moving files from FAT to the new filesystem. * * GRR: some or all of the following chars should be checked in either * mapname (HPFS) or map2fat (FAT), depending: ,=^+'"[]<>|\t& */ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ int quote = FALSE; /* flag: next char is literal */ int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); G.os2.created_dir = FALSE; /* not yet */ G.os2.renamed_fullpath = FALSE; G.os2.fnlen = strlen(G.filename); /* GRR: for VMS, convert to internal format now or later? or never? */ if (renamed) { cp = G.filename - 1; /* point to beginning of renamed name... */ while (*++cp) if (*cp == '\\') /* convert backslashes to forward */ *cp = '/'; cp = G.filename; /* use temporary rootpath if user gave full pathname */ if (G.filename[0] == '/') { G.os2.renamed_fullpath = TRUE; pathcomp[0] = '/'; /* copy the '/' and terminate */ pathcomp[1] = '\0'; ++cp; } else if (isalpha((uch)G.filename[0]) && G.filename[1] == ':') { G.os2.renamed_fullpath = TRUE; pp = pathcomp; *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ *pp++ = *cp++; if (*cp == '/') *pp++ = *cp++; /* otherwise add "./"? */ *pp = '\0'; } } /* pathcomp is ignored unless renamed_fullpath is TRUE: */ if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ return error; /* ...unless no mem or vol label on hard disk */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (!renamed) { /* cp already set if renamed */ if (uO.jflag) /* junking directories */ /* GRR: watch out for VMS version... */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ } /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; case ':': *pp++ = '_'; /* drive names not stored in zipfile, */ break; /* so no colons allowed */ case ';': /* start of VMS version? */ lastsemi = pp; /* remove VMS version later... */ *pp++ = ';'; /* but keep semicolon for now */ break; case '\026': /* control-V quote for special chars */ quote = TRUE; /* set flag for next character */ break; case ' ': /* keep spaces unless specifically */ if (uO.sflag) /* requested to change to underscore */ *pp++ = '_'; else *pp++ = ' '; break; default: /* allow ASCII 255 and European characters in filenames: */ if (isprint(workch) || workch >= 127) *pp++ = (char)workch; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended "###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; /* semi-colon was kept: expect #s after */ while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[G.os2.fnlen-1] == '/') { checkdir(__G__ G.filename, GETPATH); if (G.os2.created_dir) { if (!uO.qflag) Info(slide, 0, ((char *)slide, LoadFarString(Creating), G.filename)); if (G.extra_field) { /* zipfile extra field has extended attribs */ int err = Ev`[ jd  {wu;1'#\wF\VX|B8*?p~v4vr9ndn>nZ p&[x~2<+GpoAd2CMKQ#"Q? GtH8}Jt8q38Gi |0szDJd0.>F&S4\_0^e4 SI-TOdUp'MN s3$*UG 9(;7Z]:`/l z~9T-=A{Pgm X} 4P  ( Y0hz+QpK6F4oiFlB@n40x}`@\p_` TXZUQ a@t)]&toHJNG &{x&9a:leJ;5WK\Tts4Y/M<{l.pS8a\ g<2u:^d KXaf&71CEf=]Kko vV!oN+ H pHXb;XUn@:R [O @)X@L\~^s.P_/0oq=n gen,<9Fq/,dM"UQ[ UWy4bY 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VS)[Mn.Tai'[$qHbfN<7L$~Plh<.K,9x6Pe%7XX/o!E#qdOIH)&"&2~Qh?LYFP'jshU e7nQ,~v9fXWi~ D `Qj{A uayfvq;w00,L:Br(1@6a_ % 56\8%atwC r:imdI`?a{cfUJ%[4 !U(;M{ O a/jz-eu," Mo@}I %AtQ+uJb=tkLAXg2MvKj LRVXzs}O+Yi`-RYDZe=n&CrtIO;U.41'?w^1qy,6;lf/ pt#v( 8-0;0qdX5['*9E^i-1fE\  0a=iNHvO.W?/.:nO  o]( A Y `s(2qUCLd@5fHkHsJ3bp X]};T[6=ht1]Lc? j9.y ~XCB6}ZH|GrNG?8iB+ Q{u\U0A]~g5Gw6*`YZ< ?)9"jy0U_8F/lgl)2CR7}dGgg.c>6F,/f}w!iL~4$Nvp+7'BB` A`mnHL2 014AUlrZ=,7'T5s)Ezn $]iRje?S2B =mpZ rmax sQRZ: |@nG(>8Q\cSP.K%NF[G79+h"eWYk,v A3Y"C?kI3,0@a/CWEV+;S}wbI}\r$g5"=.qy6(Xje~W{-_FWj]l o*) pH\&!^C:""FEy(2-KT#=A;g7p-E{I*|fe3mQP@/;xY4C3&|Z_&I>2RE|WQK`~9RxA23=.d.QNM{EqEmAFS4x5l_*dw {zqC (6,FUM=~j$j%l/(%XNA|\_FULLp -Fe" \ LDFLAGS2="-link /noea_x; UNZIP.BCK @[UNZIP542.OS2]OS2.C;1;1FJalExtraFields(__G__ G.filename, G.extra_field, G.lrec.extra_field_length); if (err == IZ_EF_TRUNC) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), makeword(G.extra_field+2)-10, "\n")); } else if (!uO.qflag) (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); } else if (!uO.qflag) (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); /* set date/time stamps */ SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); return IZ_CREATED_DIR; /* dir time already set */ } else if (G.extra_field && IS_OVERWRT_ALL) { /* overwrite EAs of existing directory since user requested it */ int err = EvalExtraFields(__G__ G.filename, G.extra_field, G.lrec.extra_field_length); if (err == IZ_EF_TRUNC) { Info(slide, 0x421, ((char *)slide, "%-22s ", G.filename)); Info(slide, 0x401, ((char *)slide, LoadFarString(TruncEAs), makeword(G.extra_field+2)-10, "\n")); } /* set date/time stamps (dirs only have creation times) */ SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", G.filename, error)); if (G.pInfo->vollabel) { /* set the volume label now */ VOLUMELABEL FSInfoBuf; /* GRR: "VOLUMELABEL" defined for IBM C and emx, but haven't checked MSC... */ strcpy(FSInfoBuf.szVolLabel, G.filename); FSInfoBuf.cch = (BYTE)strlen(FSInfoBuf.szVolLabel); if (!uO.qflag) Info(slide, 0, ((char *)slide, LoadFarString(Labelling), (char)(G.os2.nLabelDrive + 'a' - 1), G.filename)); if (DosSetFSInfo(G.os2.nLabelDrive, FSIL_VOLSER, (PBYTE)&FSInfoBuf, sizeof(VOLUMELABEL))) { Info(slide, 1, ((char *)slide, LoadFarString(ErrSetVolLabel))); return 3; } return 2; /* success: skip the "extraction" quietly */ } return error; } /* end function mapname() */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { /* moved to os2data.h so they can be global */ #if 0 static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char *buildpathHPFS; /* full path (so far) to extracted file, */ static char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */ static char *endHPFS; /* corresponding pointers to end of */ static char *endFAT; /* buildpath ('\0') */ #endif # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { char *p = pathcomp; int longdirEA, too_long=FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*G.os2.endHPFS = *p++) != '\0') /* copy to HPFS filename */ ++G.os2.endHPFS; if (IsFileNameValid(G.os2.buildpathHPFS)) { longdirEA = FALSE; p = pathcomp; while ((*G.os2.endFAT = *p++) != S '\0') /* copy to FAT filename, too */ ++G.os2.endFAT; } else { longdirEA = TRUE; /* GRR: check error return? */ map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ } /* GRR: could do better check, see if overrunning buffer as we go: * check endHPFS-G.os2.buildpathHPFS after each append, set warning variable * if within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ /* next check: need to append '/', at least one-char name, '\0' */ if ((G.os2.endHPFS-G.os2.buildpathHPFS) > FILNAMSIZ-3) too_long = TRUE; /* check if extracting dir? */ #ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ if (GetFileTime(G.os2.buildpathFAT) == -1 || stat(G.os2.buildpathFAT, &G.statbuf)) #else if (stat(G.os2.buildpathFAT, &G.statbuf)) /* path doesn't exist */ #endif { if (!G.create_dirs) { /* told not to create (freshening) */ free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), G.os2.buildpathHPFS)); free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return 4; /* no room for filenames: fatal */ } if (MKDIR(G.os2.buildpathFAT, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), G.os2.buildpathFAT, G.filename)); free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return 3; /* path didn't exist, tried to create, failed */ } G.os2.created_dir = TRUE; /* only set EA if creating directory */ /* GRR: need trailing '/' before function call? */ if (longdirEA) { #ifdef DEBUG int e = #endif SetLongNameEA(G.os2.buildpathFAT, pathcomp); Trace((stderr, "APPEND_DIR: SetLongNameEA() returns %d\n", e)); } } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), G.os2.buildpathFAT, G.filename)); free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), G.os2.buildpathHPFS)); free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return 4; /* no room for filenames: fatal */ } *G.os2.endHPFS++ = '/'; *G.os2.endFAT++ = b UNZIP.BCK @[UNZIP542.OS2]OS2.C;1C_68.S;1-Y'/'; *G.os2.endHPFS = *G.os2.endFAT = '\0'; Trace((stderr, "buildpathHPFS now = [%s]\n", G.os2.buildpathHPFS)); Trace((stderr, "buildpathFAT now = [%s]\n", G.os2.buildpathFAT)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full FAT path to the string pointed at by pathcomp (want filename to reflect name used on disk, not EAs; if full path is HPFS, buildpathFAT and buildpathHPFS will be identical). Also free both paths. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { Trace((stderr, "getting and freeing FAT path [%s]\n", G.os2.buildpathFAT)); Trace((stderr, "freeing HPFS path [%s]\n", G.os2.buildpathHPFS)); strcpy(pathcomp, G.os2.buildpathFAT); free(G.os2.buildpathFAT); free(G.os2.buildpathHPFS); G.os2.buildpathHPFS = G.os2.buildpathFAT = G.os2.endHPFS = G.os2.endFAT = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { char *p = pathcomp; int error = 0; Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*G.os2.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ ++G.os2.endHPFS; if ((G.os2.endHPFS-G.os2.buildpathHPFS) >= FILNAMSIZ) { *--G.os2.endHPFS = '\0'; Info(slide, 1, ((char *)slide, LoadFarString(PathTooLongTrunc), G.filename, G.os2.buildpathHPFS)); error = 1; /* filename truncated */ } } /* GRR: how can longnameEA ever be set before this point??? we don't want * to save the original name to EAs if user renamed it, do we? * * if (!G.os2.longnameEA && ((G.os2.longnameEA = !IsFileNameValid(name)) != 0)) */ if (G.pInfo->vollabel || IsFileNameValid(G.os2.buildpathHPFS)) { G.os2.longnameEA = FALSE; p = pathcomp; while ((*G.os2.endFAT = *p++) != '\0') /* copy to FAT filename, too */ ++G.os2.endFAT; } else { G.os2.longnameEA = TRUE; if ((G.os2.lastpathcomp = (char *)malloc(strlen(pathcomp)+1)) == (char *)NULL) { Info(slide, 1, ((char *)slide, "checkdir warning: cannot save longname EA: out of memory\n")); G.os2.longnameEA = FALSE; error = 1; /* can't set .LONGNAME extended attribute */ } else /* used and freed in close_outfile() */ strcpy(G.os2.lastpathcomp, pathcomp); map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ } Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", G.os2.buildpathHPFS, G.os2.buildpathFAT)); return error; /* could check for existence, prompt for new name... */ } /* end if (FUNCTION == APPEND_NAME) */ /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); if ((G.os2.buildpathHPFS = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) return 10; if ((G.os2.buildpathFAT = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) { free(G.os2.buildpathHPFS); return 10; } if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ /* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ if (G.os2.renamed_fullpath && pathcomp[1] == ':') *G.os2.buildpathHPFS = (char)ToLower(*pathcomp); else if (!G.os2.renamed_fullpath && G.os2.rootlen > 1 && G.os2.rootpath[1] == ':') *G.os2.buildpathHPFS = (char)ToLower(*G.os2.rootpath); else { ULONG lMap; DosQueryCurrentDisk(&G.os2.nLabelDrive, &lMap); *G.os2.buildpathHPFS = (char)(G.os2.nLabelDrive - 1 + 'a'); } G.os2.nLabelDrive = *G.os2.buildpathHPFS - 'a' + 1; /* save for mapname() */ if (uO.volflag == 0 || *G.os2.buildpathHPFS < 'a' || /* no labels/bogus? */ (uO.volflag == 1 && !isfloppy(G.os2.nLabelDrive))) { /* -$: no fixed */ free(G.os2.buildpathHPFS); free(G.os2.buildpathFAT); return IZ_VOL_LABEL; /* skipping with message */ } *G.os2.buildpathHPFS = '\0'; } else if (G.os2.renamed_fullpath) /* pathcomp = valid data */ strcpy(G.os2.buildpathHPFS, pathcomp); else if (G.os2.rootlen > 0) strcpy(G.os2.buildpathHPFS, G.os2.rootpath); else *G.os2.buildpathHPFS = '\0'; G.os2.endHPFS = G.os2.buildpathHPFS; G.os2.endFAT = G.os2.buildpathFAT; while ((*G.os2.endFAT = *G.os2.endHPFS) != '\0') { ++G.os2.endFAT; ++G.os2.endHPFS; } Trace((stderr, "[%s]\n", G.os2.buildpathHPFS)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. Note that under OS/2 and MS-DOS, if a candidate extract-to directory specification includes a drive letter (leading "x:"), it is treated just as if it had a trailing '/'--that is, one directory level will be created if the path doesn't exist, unless this is otherwise pro- hibited (e.g., freshening). ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", FnFilter1(pathcomp))); if (pathcomp == (char *)NULL) { G.os2.rootlen = 0; return 0; } if (G.os2.rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((G.os2.rootlen = strlen(pathcomp)) > 0) { int had_trailing_pathsep=FALSE, has_drive=FALSE, add_dot=FALSE; char *tmproot; if ((tmproot = (char *)malloc(G.os2.rootlen+3)) == (char *)NULL) { G.os2.rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (isalpha((uch)tmproot[0]) && tmproot[1] == ':') has_drive = TRUE; /* drive designator */ if (tmproot[G.os2.rootlen-1] == '/') { tmproot[--G.os2.rootlen] = '\0'; had_trailing_pathsep = TRUE; } if (has_drive && (G.os2.rootlen == 2)) { if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ add_dot = TRUE; /* relative path: add '.' before '/' */ } else ifcYԈ UNZIP.BCK @[UNZIP542.OS2]OS2.C;1ATE.S;1>h (G.os2.rootlen > 0) { /* need not check "x:." and "x:/" */ #ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ if (GetFileTime(tmproot) == -1 || SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) #else if (SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) #endif { /* path does not exist */ if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); G.os2.rootlen = 0; return 2; /* treat as stored file */ } /* create directory (could add loop here scanning tmproot * to create more than one level, but really necessary?) */ if (MKDIR(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, LoadFarString(CantCreateExtractDir), FnFilter1(tmproot))); free(tmproot); G.os2.rootlen = 0; /* path didn't exist, tried to create, */ return 3; /* failed: file exists, or need 2+ levels */ } } } if (add_dot) /* had just "x:", make "x:." */ tmproot[G.os2.rootlen++] = '.'; tmproot[G.os2.rootlen++] = '/'; tmproot[G.os2.rootlen] = '\0'; if ((G.os2.rootpath = realloc(tmproot, G.os2.rootlen+1)) == NULL) { free(tmproot); G.os2.rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", FnFilter1(G.os2.rootpath))); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (G.os2.rootlen > 0) { free(G.os2.rootpath); G.os2.rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ /***********************/ /* Function isfloppy() */ /* more precisely, is it removable? */ /***********************/ static int isfloppy(nDrive) int nDrive; /* 1 == A:, 2 == B:, etc. */ { uch ParmList[1] = {0}; uch DataArea[1] = {0}; char Name[3]; HFILE handle; #ifdef __32BIT__ ULONG rc; ULONG action; #else USHORT rc; USHORT action; #endif Name[0] = (char) (nDrive + 'A' - 1); Name[1] = ':'; Name[2] = 0; rc = DosOpen(Name, &handle, &action, 0L, FILE_NORMAL, FILE_OPEN, OPEN_FLAGS_DASD | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L); if (rc == ERROR_NOT_READY) /* must be removable */ return TRUE; else if (rc) { /* other error: do default a/b heuristic instead */ Trace((stderr, "error in DosOpen(DASD): guessing...\n", rc)); return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; } rc = DosDevIOCtl(DataArea, sizeof(DataArea), ParmList, sizeof(ParmList), DSK_BLOCKREMOVABLE, IOCTL_DISK, handle); DosClose(handle); if (rc) { /* again, just check for a/b */ Trace((stderr, "error in DosDevIOCtl category IOCTL_DISK, function " "DSK_BLOCKREMOVABLE\n (rc = 0x%04x): guessing...\n", rc)); return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; } else { return DataArea[0] ? FALSE : TRUE; } } /* end function isfloppy() */ static int IsFileNameValid(const char *name) { HFILE hf; #ifdef __32BIT__ ULONG uAction; #else USHORT uAction; #endif switch( DosOpen((PSZ) name, &hf, &uAction, 0, 0, FILE_OPEN, OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0) ) { case ERROR_INVALID_NAME: case ERROR_FILENAME_EXCED_RANGE: return FALSE; case NO_ERROR: DosClose(hf); default: return TRUE; } } /**********************/ /* Function map2fat() */ /**********************/ static void map2fat(pathcomp, pEndFAT) char *pathcomp, **pEndFAT; { char *ppc = pathcomp; /* variable pointer to pathcomp */ char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ char *last_dot = (char *)NULL; /* last dot not converted to underscore */ int dotname = FALSE; /* flag: path component begins with dot */ /* ("." and ".." don't count) */ register unsigned workch; /* hold the character being tested */ /* Only need check those characters which are legal in HPFS but not * in FAT: to get here, must already have passed through mapname. * (GRR: oops, small bug--if char was quoted, no longer have any * knowledge of that.) Also must truncate path component to ensure * 8.3 compliance... */ while ((workch = (uch)*ppc++) != 0) { switch (workch) { case '[': /* add '"' '+' ',' '=' ?? */ case ']': *pEnd++ = '_'; /* convert brackets to underscores */ break; case '.': if (pEnd == *pEndFAT) { /* nothing appended yet... */ if (*ppc == '\0') /* don't bother appending a */ break; /* "./" component to the path */ else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ *pEnd++ = '.'; /* add first dot, unchanged... */ ++ppc; /* skip second dot, since it will */ } else { /* be "added" at end of if-block */ *pEnd++ = '_'; /* FAT doesn't allow null filename */ dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ } /* (extra '_' now, "dot" below) */ } else if (dotname) { /* found a second dot, but still */ dotname = FALSE; /* have extra leading underscore: */ *pEnd = '\0'; /* remove it by shifting chars */ pEnd = *pEndFAT + 1; /* left one space (e.g., .p1.p2: */ while (pEnd[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ *pEnd = pEnd[1]; /* finished) [opt.: since first */ ++pEnd; /* two chars are same, can start */ } /* shifting at second position] */ } last_dot = pEnd; /* point at last dot so far... */ *pEnd++ = '_'; /* convert dot to underscore for now */ break; default: *pEnd++ = (char)workch; } /* end switch */ } /* end while loop */ *pEnd = '\0'; /* terminate buildpathFAT */ /* NOTE: keep in mind that pEnd points to the end of the path * component, and *pEndFAT still points to the *beginning* of it... * Also note that the algorithm does not try to get too fancy: * if there are no dots already, the name either gets truncated * at 8 characters or the last underscore is converted to a dot * (only if more characters are saved that dި UNZIP.BCK @[UNZIP542.OS2]OS2.C;1ATE.S;1R2wway). In no case is * a dot inserted between existing characters. */ if (last_dot == (char *)NULL) { /* no dots: check for underscores... */ char *plu = strrchr(pBegin, '_'); /* pointer to last underscore */ if (plu == (char *)NULL) { /* no dots, no underscores: truncate at 8 */ *pEndFAT += 8; /* chars (could insert '.' and keep 11...) */ if (*pEndFAT > pEnd) *pEndFAT = pEnd; /* oops...didn't have 8 chars to truncate */ else **pEndFAT = '\0'; } else if (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8) { last_dot = plu; /* be lazy: drop through to next if-block */ } else if ((pEnd - *pEndFAT) > 8) { *pEndFAT += 8; /* more fits into just basename than if */ **pEndFAT = '\0'; /* convert last underscore to dot */ } else *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ } if (last_dot != (char *)NULL) { /* one dot (or two, in the case of */ *last_dot = '.'; /* "..") is OK: put it back in */ if ((last_dot - pBegin) > 8) { char *p, *q; int i; p = last_dot; q = last_dot = pBegin + 8; for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ *q++ = *p++; /* shift ".ext" left and */ *q = '\0'; /* truncate/terminate it */ *pEndFAT = q; } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ *pEndFAT = last_dot + 4; **pEndFAT = '\0'; } else *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') last_dot[-1] = '_'; /* NO blank in front of '.'! */ } } /* end function map2fat() */ static int SetLongNameEA(char *name, char *longname) { EAOP eaop; FEALST fealst; eaop.fpFEAList = (PFEALIST) &fealst; eaop.fpGEAList = NULL; eaop.oError = 0; strcpy((char *) fealst.szName, ".LONGNAME"); strcpy((char *) fealst.szValue, longname); fealst.cbList = sizeof(fealst) - CCHMAXPATH + strlen((char *) fealst.szValue); fealst.cbName = (BYTE) strlen((char *) fealst.szName); fealst.cbValue = sizeof(USHORT) * 2 + strlen((char *) fealst.szValue); #ifdef __32BIT__ fealst.oNext = 0; #endif fealst.fEA = 0; fealst.eaType = 0xFFFD; fealst.eaSize = strlen((char *) fealst.szValue); return DosSetPathInfo(name, FIL_QUERYEASIZE, (PBYTE) &eaop, sizeof(eaop), 0); } /****************************/ /* Function close_outfile() */ /****************************/ /* GRR: need to return error level!! */ void close_outfile(__G) /* only for extracted files, not directories */ __GDEF { fclose(G.outfile); /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ if (G.extra_field) { /* zipfile extra field may have extended attribs */ int err = EvalExtraFields(__G__ G.filename, G.extra_field, G.lrec.extra_field_length); if (err == IZ_EF_TRUNC) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), makeword(G.extra_field+2)-10, uO.qflag? "\n" : "")); } } if (G.os2.longnameEA) { #ifdef DEBUG int e = #endif SetLongNameEA(G.filename, G.os2.lastpathcomp); Trace((stderr, "close_outfile: SetLongNameEA() returns %d\n", e)); free(G.os2.lastpathcomp); } /* set date/time and permissions */ SetPathAttrTimes(__G__ G.pInfo->file_attr, 0); } /* end function close_outfile() */ /******************************/ /* Function check_for_newer() */ /******************************/ int check_for_newer(__G__ filename) /* return 1 if existing file newer or equal; */ __GDEF char *filename; /* 0 if older; -1 if doesn't exist yet */ { ulg existing, archive; #ifdef USE_EF_UT_TIME iztimes z_utime; #endif if ((existing = (ulg)GetFileTime(filename)) == (ulg)-1) return DOES_NOT_EXIST; #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); archive = Utime2DosDateTime(z_utime.mtime); } else { archive = G.lrec.last_mod_dos_datetime; } #else /* !USE_EF_UT_TIME */ archive = G.lrec.last_mod_dos_datetime; #endif /* ?USE_EF_UT_TIME */ return (existing >= archive); } /* end function check_for_newer() */ #ifndef SFX /*************************/ /* Function dateformat() */ /*************************/ int dateformat() { /*----------------------------------------------------------------------------- For those operating systems which support it, this function returns a value which tells how national convention says that numeric dates are displayed. Return values are DF_YMD, DF_DMY and DF_MDY. -----------------------------------------------------------------------------*/ switch (GetCountryInfo()) { case 0: return DF_MDY; case 1: return DF_DMY; case 2: return DF_YMD; } return DF_MDY; /* default if error */ } /* end function dateformat() */ /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER) char buf[80]; #endif len = sprintf((char *)slide, LoadFarString(CompiledWith), #if defined(__GNUC__) # ifdef __EMX__ /* __EMX__ is defined as "1" only (sigh) */ "emx+gcc ", __VERSION__, # else "gcc/2 ", __VERSION__, # endif #elif defined(__IBMC__) "IBM ", # if (__IBMC__ < 200) (sprintf(buf, "C Set/2 %d.%02d", __IBMC__/100,__IBMC__%100), buf), # elif (__IBMC__ < 300) (sprintf(buf, "C Set++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), # else (sprintf(buf, "Visual Age C++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), # endif #elif defined(__WATCOMC__) "Watcom C", (sprintf(buf, " (__WATCOMC__ = %d)", __WATCOMC__), buf), #elif defined(__TURBOC__) # ifdef __BORLANDC__ "Borland C++", # if (__BORLANDC__ < 0x0460) " 1.0", # elif (__BORLANDC__ == 0x0460) " 1.5", /* from Kai Uwe: three less than DOS */ # else " 2.0", /* (__BORLANDC__ == 0x0500)? */ # endif # else "Turbo C", /* these are probably irrelevant */ # if (__TURBOC__ >= 661) "++ 1.0 or later", # elif (__TURBOC__ == 661) " 3.0?", # elif (__TURBOC__ == 397) " 2.0", # else " 1.0 or 1.5?", # endif # endif #elif defined(MSC) "Microsoft C ", # ifdef _MSC_VER (sprintf(buf, "%d.%02d", _MSC_VER/100, _MSC_VER%100), buf), # else "5.1 or earlier", # endif #else "unknown compiler", "", #endif /* ?compilers */ "OS/2", /* GRR: does IBM C/2 identify itself as IBM rather than Microsoft? */ #if (defined(MSC) || (defined(__WATCOMC__) && !defined(__386__))) # if defined(M_I86HM) || defined(__HUGE__) " (16-bit, huge)", # eleɓE UNZIP.BCK @[UNZIP542.OS2]OS2.C;1MAN68K.C;1Cqif defined(M_I86LM) || defined(__LARGE__) " (16-bit, large)", # elif defined(M_I86MM) || defined(__MEDIUM__) " (16-bit, medium)", # elif defined(M_I86CM) || defined(__COMPACT__) " (16-bit, compact)", # elif defined(M_I86SM) || defined(__SMALL__) " (16-bit, small)", # elif defined(M_I86TM) || defined(__TINY__) " (16-bit, tiny)", # else " (16-bit)", # endif #else " 2.x/3.x (32-bit)", #endif #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); /* MSC can't handle huge macro expansions */ /* temporary debugging code for Borland compilers only */ /* __TCPLUSPLUS__, __BCPLUSPLUS__ not defined for v1.5 */ #if (defined(__TURBOC__) && defined(DEBUG)) Info(slide, 0, ((char *)slide, "\t(__TURBOC__ = 0x%04x = %d)\n", __TURBOC__, __TURBOC__)); #ifdef __BORLANDC__ Info(slide, 0, ((char *)slide, "\t(__BORLANDC__ = 0x%04x)\n",__BORLANDC__)); #else Info(slide, 0, ((char *)slide, "\tdebug(__BORLANDC__ not defined)\n")); #endif #endif /* __TURBOC__ && DEBUG */ } /* end function version() */ #endif /* !SFX */ /* This table can be static because it is pseudo-constant */ static unsigned char cUpperCase[256], cLowerCase[256]; static BOOL bInitialized=FALSE; /* Initialize the tables of upper- and lowercase characters, including handling of country-dependent characters. */ static void InitNLS(void) { unsigned nCnt, nU; COUNTRYCODE cc; if (bInitialized == FALSE) { bInitialized = TRUE; for ( nCnt = 0; nCnt < 256; nCnt++ ) cUpperCase[nCnt] = cLowerCase[nCnt] = (unsigned char) nCnt; cc.country = cc.codepage = 0; DosMapCase(sizeof(cUpperCase), &cc, (PCHAR) cUpperCase); for ( nCnt = 0; nCnt < 256; nCnt++ ) { nU = cUpperCase[nCnt]; if (nU != nCnt && cLowerCase[nU] == (unsigned char) nU) cLowerCase[nU] = (unsigned char) nCnt; } for ( nCnt = 'A'; nCnt <= 'Z'; nCnt++ ) cLowerCase[nCnt] = (unsigned char) (nCnt - 'A' + 'a'); } } int IsUpperNLS(int nChr) { return (cUpperCase[nChr] == (unsigned char) nChr); } int ToLowerNLS(int nChr) { return cLowerCase[nChr]; } char *StringLower(char *szArg) { unsigned char *szPtr; for ( szPtr = (unsigned char *) szArg; *szPtr; szPtr++ ) *szPtr = cLowerCase[*szPtr]; return szArg; } #ifdef MORE int screensize(int *tt_rows, int *tt_cols) { #ifdef __EMX__ int dst[2]; _scrsize(dst); if (tt_rows != NULL) *tt_rows = dst[1]; if (tt_cols != NULL) *tt_cols = dst[0]; #else VIOMODEINFO vmi; vmi.cb = sizeof(vmi); VioGetMode(&vmi, 0); if (tt_rows != NULL) *tt_rows = vmi.row; if (tt_cols != NULL) *tt_cols = vmi.col; #endif return 0; } #endif /* MORE */ #if defined(__IBMC__) && defined(__DEBUG_ALLOC__) void DebugMalloc(void) { _dump_allocated(0); /* print out debug malloc memory statistics */ } #endif #if defined(REENTRANT) && defined(USETHREADID) ulg GetThreadId(void) { PTIB pptib; /* Address of a pointer to the Thread Information Block */ PPIB pppib; /* Address of a pointer to the Process Information Block */ DosGetInfoBlocks(&pptib, &pppib); return pptib->tib_ptib2->tib2_ultid; } #endif /* defined(REENTRANT) && defined(USETHREADID) */ void os2GlobalsCtor(__GPRO) { G.os2.nLastDrive = (USHORT)(-1); #ifdef OS2DLL G.os2.rexx_mes = "0"; #endif InitNLS(); } *[UNZIP542.OS2]OS2ACL.C;1+,./ 4- @0@123KPWO56V^7V^89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* os2acl.c - access to OS/2 (LAN Server) ACLs * * Author: Kai Uwe Rommel * Created: Mon Aug 08 1994 * */ /* * supported 32-bit compilers: * - emx+gcc * - IBM C Set++ 2.1 or newer * - Watcom C/C++ 10.0 or newer * * supported 16-bit compilers: * - MS C 6.00A * - Watcom C/C++ 10.0 or newer * * supported OS/2 LAN environments: * - IBM LAN Server/Requester 3.0, 4.0 and 5.0 (Warp Server) * - IBM Peer 1.0 (Warp Connect) */ #ifdef KUR static char *rcsid = "$Id: os2acl.c,v 1.3 1996/04/03 19:18:27 rommel Exp rommel $"; static char *rcsrev = "$Revision: 1.3 $"; #endif /* * $Log: os2acl.c,v $ * Revision 1.3 1996/04/03 19:18:27 rommel * minor fixes * * Revision 1.2 1996/03/30 22:03:52 rommel * avoid frequent dynamic allocation for every call * streamlined code * * Revision 1.1 1996/03/30 09:35:00 rommel * Initial revision * */ #include #include #include #include #include #define INCL_NOPM #define INCL_DOS #define INCL_DOSERRORS #include #include "os2/os2acl.h" #define UNLEN 20 #if defined(__WATCOMC__) && defined(__386__) && !defined(__32BIT__) #define __32BIT__ #endif #ifdef __32BIT__ typedef ULONG U_INT; #ifdef __EMX__ #define PSTR16 _far16ptr #define PTR16(x) _emx_32to16(x) #else /* other 32-bit */ #define PSTR16 PCHAR16 #define PTR16(x) ((PCHAR16)(x)) #endif #else /* 16-bit */ typedef USHORT U_INT; #define PSTR16 PSZ #define PTR16(x) (x) #endif typedef struct access_list { char acl_ugname[UNLEN+1]; char acl_pad; USHORT acl_access; } ACCLIST; typedef struct access_info { PSTR16 acc_resource_name; USHORT acc_attr; USHORT acc_count; } ACCINFO; static ACCINFO *ai; static char *path, *data; #ifdef __32BIT__ #ifdef __EMX__ static USHORT (APIENTRY *_NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); static USHORT (APIENTRY *_NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); static USHORT (APIENTRY *_NetAccessAdd)(PSZ pszServer, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); USHORT NetAccessGetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail) { return (USHORT) (_THUNK_PROLOG (4+4+2+4+2+4); _THUNK_FLAT (pszServer); _THUNK_FLAT (pszResource); _THUNK_SHORT (sLevel); _THUNK_FLAT (pbBuffer); _THUNK_SHORT (cbBuffer); _THUNK_FLAT (pcbTotalAvail); _THUNK_CALLI (_emx_32to16(_NetAccessGetInfo))); } USHORT NetAccessSetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum) { return (USHORT) (_THUNK_PROLOG (4+4+2+4+2+2); _THUNK_FLAT (pszServer); _THUNK_FLAT (pszResource); _THUNK_SHORT (sLevel); _THUNK_FLAT (pbBuffer); _THUNK_SHORT (cbBuffer); _THUNK_SHORT (sParmNum); _THUNK_CALLI (_emx_32to16(_NetAccessSetInfo))); } USHORT NetAccessAdd(PSZ pszServer, USHORT sLevel, PVOIDf}Ku UNZIP.BCK @[UNZIP542.OS2]OS2ACL.C;168K.C;1l} pbBuffer, USHORT cbBuffer) { return (USHORT) (_THUNK_PROLOG (4+2+4+2); _THUNK_FLAT (pszServer); _THUNK_SHORT (sLevel); _THUNK_FLAT (pbBuffer); _THUNK_SHORT (cbBuffer); _THUNK_CALLI (_emx_32to16(_NetAccessAdd))); } #else /* other 32-bit */ APIRET16 (* APIENTRY16 NetAccessGetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, PVOID16 pcbTotalAvail); APIRET16 (* APIENTRY16 NetAccessSetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, USHORT sParmNum); APIRET16 (* APIENTRY16 NetAccessAdd)(PCHAR16 pszServer, USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer); #define _NetAccessGetInfo NetAccessGetInfo #define _NetAccessSetInfo NetAccessSetInfo #define _NetAccessAdd NetAccessAdd #if !defined(__IBMC__) || !defined(__TILED__) #define _tmalloc malloc #define _tfree free #endif #endif #else /* 16-bit */ USHORT (APIENTRY *NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); USHORT (APIENTRY *NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); USHORT (APIENTRY *NetAccessAdd)(PSZ pszServer, USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); #define _NetAccessGetInfo NetAccessGetInfo #define _NetAccessSetInfo NetAccessSetInfo #define _NetAccessAdd NetAccessAdd #define _tmalloc malloc #define _tfree free #define DosQueryProcAddr(handle, ord, name, funcptr) \ DosGetProcAddr(handle, name, funcptr) #define DosQueryCurrentDir DosQCurDir #define DosQueryCurrentDisk DosQCurDisk #endif static BOOL acl_init(void) { static BOOL initialized, netapi_avail; HMODULE netapi; char buf[256]; if (initialized) return netapi_avail; initialized = TRUE; if (DosLoadModule(buf, sizeof(buf), "NETAPI", &netapi)) return FALSE; if (DosQueryProcAddr(netapi, 0, "NETACCESSGETINFO", (PFN *) &_NetAccessGetInfo) || DosQueryProcAddr(netapi, 0, "NETACCESSSETINFO", (PFN *) &_NetAccessSetInfo) || DosQueryProcAddr(netapi, 0, "NETACCESSADD", (PFN *) &_NetAccessAdd)) return FALSE; #if defined(__WATCOMC__) && defined(__386__) NetAccessGetInfo = (PVOID) (ULONG) (PVOID16) NetAccessGetInfo; NetAccessSetInfo = (PVOID) (ULONG) (PVOID16) NetAccessSetInfo; NetAccessAdd = (PVOID) (ULONG) (PVOID16) NetAccessAdd; #endif if ((path = _tmalloc(CCHMAXPATH)) == NULL) return FALSE; if ((data = _tmalloc(ACL_BUFFERSIZE)) == NULL) return FALSE; if ((ai = _tmalloc(sizeof(ACCINFO))) == NULL) return -1; netapi_avail = TRUE; return netapi_avail; } static void acl_mkpath(char *buffer, const char *source) { char *ptr; static char cwd[CCHMAXPATH]; static U_INT cwdlen; U_INT cdrive; ULONG drivemap; if (isalpha((int)source[0]) && source[1] == ':') buffer[0] = 0; /* fully qualified names */ else { if (cwd[0] == 0) { DosQueryCurrentDisk(&cdrive, &drivemap); cwd[0] = (char)(cdrive + '@'); cwd[1] = ':'; cwd[2] = '\\'; cwdlen = sizeof(cwd) - 3; DosQueryCurrentDir(0, cwd + 3, &cwdlen); cwdlen = strlen(cwd); } if (source[0] == '/' || source[0] == '\\') { if (source[1] == '/' || source[1] == '\\') buffer[0] = 0; /* UNC names */ else { strncpy(buffer, cwd, 2); buffer[2] = 0; } } else { strcpy(buffer, cwd); if (cwd[cwdlen - 1] != '\\' && cwd[cwdlen - 1] != '/') strcat(buffer, "/"); } } strcat(buffer, source); for (ptr = buffer; *ptr; ptr++) if (*ptr == '/') *ptr = '\\'; if (ptr[-1] == '\\') ptr[-1] = 0; strupr(buffer); } static int acl_bin2text(char *data, char *text) { ACCINFO *ai; ACCLIST *al; U_INT cnt, offs; ai = (ACCINFO *) data; al = (ACCLIST *) (data + sizeof(ACCINFO)); offs = sprintf(text, "ACL1:%X,%d\n", ai -> acc_attr, ai -> acc_count); for (cnt = 0; cnt < ai -> acc_count; cnt++) offs += sprintf(text + offs, "%s,%X\n", al[cnt].acl_ugname, al[cnt].acl_access); return strlen(text); } int acl_get(char *server, const char *resource, char *buffer) { USHORT datalen; PSZ srv = NULL; int rc; if (!acl_init()) return -1; if (server) srv = server; acl_mkpath(path, resource); datalen = 0; rc = NetAccessGetInfo(srv, path, 1, data, ACL_BUFFERSIZE, &datalen); if (rc == 0) acl_bin2text(data, buffer); return rc; } static int acl_text2bin(char *data, char *text, char *path) { ACCINFO *ai; ACCLIST *al; char *ptr, *ptr2; U_INT cnt; ai = (ACCINFO *) data; ai -> acc_resource_name = PTR16(path); if (sscanf(text, "ACL1:%hX,%hd", &ai -> acc_attr, &ai -> acc_count) != 2) return ERROR_INVALID_PARAMETER; al = (ACCLIST *) (data + sizeof(ACCINFO)); ptr = strchr(text, '\n') + 1; for (cnt = 0; cnt < ai -> acc_count; cnt++) { ptr2 = strchr(ptr, ','); strncpy(al[cnt].acl_ugname, ptr, ptr2 - ptr); al[cnt].acl_ugname[ptr2 - ptr] = 0; sscanf(ptr2 + 1, "%hx", &al[cnt].acl_access); ptr = strchr(ptr, '\n') + 1; } return sizeof(ACCINFO) + ai -> acc_count * sizeof(ACCLIST); } int acl_set(char *server, const char *resource, char *buffer) { USHORT datalen; PSZ srv = NULL; if (!acl_init()) return -1; if (server) srv = server; acl_mkpath(path, resource); ai -> acc_resource_name = PTR16(path); ai -> acc_attr = 0; ai -> acc_count = 0; NetAccessAdd(srv, 1, ai, sizeof(ACCINFO)); /* Ignore any errors, most probably because ACL already exists. */ /* In any such case, try updating the existing ACL. */ datalen = acl_text2bin(data, buffer, path); return NetAccessSetInfo(srv, path, 1, data, datalen, 0); } /* end of os2acl.c */ =gx˱ UNZIP.BCK @[UNZIP542.OS2]OS2ACL.H;168K.C;1*[UNZIP542.OS2]OS2ACL.H;1+,./ 4K- @0@123KPWO56/7/89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* os2acl.h * * Author: Kai Uwe Rommel * Created: Fri Mar 29 1996 */ /* $Id: os2acl.h,v 1.1 1996/03/30 09:35:00 rommel Exp rommel $ */ /* * $Log: os2acl.h,v $ * Revision 1.1 1996/03/30 09:35:00 rommel * Initial revision * */ #ifndef _OS2ACL_H #define _OS2ACL_H #define ACL_BUFFERSIZE 4096 int acl_get(char *server, const char *resource, char *buffer); int acl_set(char *server, const char *resource, char *buffer); #endif /* _OS2ACL_H */ /* end of os2acl.h */ *[UNZIP542.OS2]OS2CFG.H;1+,. / 4 1- @0@123KPWO 5667689GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- OS/2 specific configuration section: ---------------------------------------------------------------------------*/ #ifndef __os2cfg_h #define __os2cfg_h #ifdef MSDOS # include /* for REGS macro (TC) or _dos_setftime (MSC) */ # ifdef __TURBOC__ /* includes Power C */ # include /* for structure ftime */ # ifndef __BORLANDC__ /* there appears to be a bug (?) in Borland's */ # include /* MEM.H related to __STDC__ and far poin- */ # endif /* ters. (dpk) [mem.h included for memcpy] */ # endif #endif /* MSDOS */ #ifdef __IBMC__ # define S_IFMT 0xF000 # define timezone _timezone /* (underscore names work with */ # define tzset _tzset /* all versions of C Set) */ # define PIPE_ERROR (errno == EERRSET || errno == EOS2ERR) #endif /* __IBMC__ */ #ifdef __WATCOMC__ # ifdef __386__ # ifndef WATCOMC_386 # define WATCOMC_386 # endif # define __32BIT__ # undef far # define far # undef near # define near /* Get asm routines to link properly without using "__cdecl": */ # ifndef USE_ZLIB # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax] # pragma aux get_crc_table "_*" parm caller [] value [eax] \ modify [eax ecx edx] # endif /* !USE_ZLIB */ # else /* !__386__ */ # ifndef USE_ZLIB # pragma aux crc32 "_*" parm caller [] value [ax dx] \ modify [ax cx dx bx] # pragma aux get_crc_table "_*" parm caller [] value [ax] \ modify [ax cx dx bx] # endif /* !USE_ZLIB */ # endif /* ?__386__ */ # ifndef EPIPE # define EPIPE -1 # endif # define PIPE_ERROR (errno == EPIPE) #endif /* __WATCOMC__ */ #ifdef __EMX__ # ifndef __32BIT__ # define __32BIT__ # endif # define far #endif #ifndef __32BIT__ # define __16BIT__ #endif #ifdef MSDOS # undef MSDOS #endif #if defined(M_I86CM) || defined(M_I86LM) # define MED_MEM #endif #if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)) # define MED_MEM #endif #ifdef __16BIT__ # ifndef MED_MEM # define SMALL_MEM # endif #endif #ifdef __16BIT__ # if defined(MSC) || defined(__WATCOMC__) # include # define nearmalloc _nmalloc # define nearfree _nfree # endif # if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB) # if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__) # undef DYNALLOC_CRCTAB # endif # endif # ifndef nearmalloc # define nearmalloc malloc # define nearfree free # endif #endif /* TIMESTAMP is now supported on OS/2, so enable it by default */ #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP #endif /* check that TZ environment variable is defined before using UTC times */ #if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ)) # define IZ_CHECK_TZ #endif #ifndef OS2_EAS # define OS2_EAS /* for -l and -v listings (list.c) */ #endif #ifdef isupper # undef isupper #endif #ifdef tolower # undef tolower #endif #define isupper(x) IsUpperNLS((unsigned char)(x)) #define tolower(x) ToLowerNLS((unsigned char)(x)) #ifndef NO_STRNICMP /* use UnZip's zstrnicmp(), because some compilers */ # define NO_STRNICMP /* don't provide a NLS-aware strnicmp() function */ #endif #define USETHREADID /* handlers for OEM <--> ANSI string conversions */ #ifndef _OS2_ISO_ANSI /* use home-brewed conversion functions; internal charset is OEM */ # ifdef CRTL_CP_IS_ISO # undef CRTL_CP_IS_ISO # endif # ifndef CRTL_CP_IS_OEM # define CRTL_CP_IS_OEM # endif #endif /* screen size detection */ #define SCREENWIDTH 80 #define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols) int screensize(int *tt_rows, int *tt_cols); /* on the OS/2 console screen, line-wraps are always enabled */ #define SCREENLWRAP 1 #endif /* !__os2cfg_h */ i*[UNZIP542.OS2]OS2DATA.H;1+,./ 47- @0@123KPWO 56ac7ac89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- os2data.h OS/2-specific structures and data to be included in the global data struc- ture. ---------------------------------------------------------------------------*/ #define MAXNAMLEN 256 #define MAXPATHLEN 256 #define MAXLEN 256 /* temporary buffer length */ #define IBUF_LEN 4096 /* input buffer length */ #define INCL_NOPM #define INCL_VIO #define INCL_DOSNLS #define INCL_DOSPROCESS #define INCL_DOSDEVICES #define INCL_DOSDEVIOCTL #define INCL_DOSERRORS #define INCL_DOSMISC #if (defined(OS2DLL) && !defined(DLL)) # undef OS2DLL #endif #ifdef OS2DLL # defineh7eQc UNZIP.BCK @[UNZIP542.OS2]OS2DATA.H;18K.C;1  INCL_REXXSAA # include #endif #include struct direct { ino_t d_ino; /* a bit of a farce */ int d_reclen; /* more farce */ int d_namlen; /* length of d_name */ char d_name[MAXNAMLEN + 1]; /* null terminated */ /* nonstandard fields */ long d_size; /* size in bytes */ unsigned d_mode; /* MS-DOS or OS/2 file attributes */ unsigned d_time; unsigned d_date; }; /* The fields d_size and d_mode are extensions by me (Kai Uwe Rommel). The * find_first and find_next calls deliver these data without any extra cost. * If these data are needed, the fields save a lot of extra calls to stat() * (each stat() again performs a find_first call !). */ struct _dircontents { char *_d_entry; long _d_size; unsigned _d_mode, _d_time, _d_date; struct _dircontents *_d_next; }; typedef struct _dirdesc { int dd_id; /* uniquely identify each open directory */ long dd_loc; /* where we are in directory entry is this */ struct _dircontents *dd_contents; /* pointer to contents of dir */ struct _dircontents *dd_cp; /* pointer to current position */ } DIR; struct os2Global { #ifndef SFX HDIR hdir; #ifdef __32BIT__ ULONG count; FILEFINDBUF3 find; #else USHORT count; FILEFINDBUF find; #endif #endif /* !SFX */ int created_dir; /* used by mapname(), checkdir() */ int renamed_fullpath; /* ditto */ int fnlen; /* ditto */ #ifdef __32BIT__ ULONG nLabelDrive; /* ditto */ #else USHORT nLabelDrive; #endif int longnameEA; /* checkdir(), close_outfile() */ char *lastpathcomp; /* ditto */ struct direct dp; int lower; USHORT nLastDrive, nResult; DIR *wild_dir; ZCONST char *wildname; char *dirname, matchname[FILNAMSIZ]; int notfirstcall, have_dirname, dirnamelen; int rootlen; /* length of rootpath */ char *rootpath; /* user's "extract-to" directory */ char *buildpathHPFS; /* full path (so far) to extracted file, */ char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */ char *endHPFS; /* corresponding pointers to end of */ char *endFAT; /* buildpath ('\0') */ #ifdef OS2DLL char buffer[IBUF_LEN]; char output_var[MAXLEN]; char getvar_buf[MAXLEN]; int getvar_len; int output_idx; int stem_len; int putchar_idx; int rexx_error; char *rexx_mes; SHVBLOCK request; #endif }; #define SYSTEM_SPECIFIC_GLOBALS struct os2Global os2; #define SYSTEM_SPECIFIC_CTOR os2GlobalsCtor #ifdef OS2DLL # ifdef API_DOC # define SYSTEM_API_BRIEF REXXBrief # define SYSTEM_API_DETAILS REXXDetails extern char *REXXBrief; extern APIDocStruct REXXDetails[]; # endif #endif r*[UNZIP542.OS2]REXXAPI.C;1+,.B/ 4BB- @0@123KPWOC56פ7פ89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /********************************************************************** * REXXAPI.C * * * * This program adds a ZIP engine directly to the REXX language. * * The functions are: * * UZDropFuncs -- Makes all functions in this package * * unknown to REXX. * * UZLoadFuncs -- Makes all functions in this package * * known to REXX so REXX programs may * * call them. * * UZFileTree -- Searches for files matching a given * * filespec, including files in * * subdirectories. * * UZUnZip -- Unzip command-line entry point. * * This is functionally equivalent to * * using Unzip as an external program. * * UZUnZipToVar -- Unzip one file to a variable * * UZUnZipToStem -- Unzip files to a variable array * * UZVer -- Returns the Unzip version number * * * **********************************************************************/ /* Include files */ #ifdef OS2DLL #define INCL_DOS #define INCL_DOSMEMMGR #include #include #include #include #define UNZIP_INTERNAL #include "../unzip.h" #include "../version.h" /*********************************************************************/ /* Various definitions used by various functions. */ /*********************************************************************/ RexxFunctionHandler UZDropFuncs; RexxFunctionHandler UZLoadFuncs; RexxFunctionHandler UZFileTree; RexxFunctionHandler UZUnZip; RexxFunctionHandler UZUnZipToVar; RexxFunctionHandler UZUnZipToStem; RexxFunctionHandler UZVer; RexxFunctionHandler UZAPIVer; int SetOutputVar(__GPRO__ const char *name); int SetOutputVarStem(__GPRO__ const char *name); int SetOutputVarLength(__GPRO); int WriteToVariable(__GPRO__ const char *name, char *buffer, int len); int PrintToSubVariable(__GPRO__ int idx, const char *format,...); int PrintToVariable(__GPRO__ const char *name, const char *format,...); int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr); int TextSetNext(__GPRO__ char *format, int len, int all); #define EZRXSTRING(r,p) {(r).strptr=(PCH)p;(r).strlength=(ULONG)strlen((r).strptr);} /*********************************************************************/ /* RxFncTable */ /* Array of names of the UNZIPAPI functions. */ /* This list is used for registration and deregistration. */ /*********************************************************************/ static PSZ RxFncTable[] = { "UZDropFuncs", "UZLoadFuncs", "UZFileSearch", "UZFileTree", "UZUnZip", "UZUnZipToVar", "UZUnZipToStem", "UZVer", }; /*********************************************************************/ /* Numeric Error Return Strings */ /*********************************************************************/ #define NO_UTIL_ERROR "0" /* No error whatsoever */ #define ERROR_NOMEM "2" /* Insufficient memory */ /*****************************************iX1 UNZIP.BCK @[UNZIP542.OS2]REXXAPI.C;1LE.;1Bd ****************************/ /* Numeric Return calls */ /*********************************************************************/ #define INVALID_ROUTINE 40 /* Raise Rexx error */ #define VALID_ROUTINE 0 /* Successful completion */ /*********************************************************************/ /* Some useful macros */ /*********************************************************************/ #define BUILDRXSTRING(t, s) { \ strcpy((t)->strptr,(s));\ (t)->strlength = strlen((s)); \ } /*********************************************************************/ /**************** UNZIPAPI Supporting Functions ********************/ /**************** UNZIPAPI Supporting Functions ********************/ /**************** UNZIPAPI Supporting Functions ********************/ /*********************************************************************/ int RexxReturn(__GPRO__ int nodefault, RXSTRING *retstr) { int ret = G.os2.rexx_error; if (G.filenotfound) G.os2.rexx_mes = "file not found"; if (*G.os2.rexx_mes != '0') { if (retstr->strlength > 255) { DosFreeMem(retstr->strptr); retstr->strptr = NULL; } } else if (nodefault) goto noBuild; BUILDRXSTRING(retstr, G.os2.rexx_mes); noBuild: DESTROYGLOBALS(); return ret; } /* Get a variable from REXX, return 0 if OK */ int GetVariable(__GPRO__ const char *name) { G.os2.request.shvnext = NULL; EZRXSTRING(G.os2.request.shvname, name); G.os2.request.shvnamelen = G.os2.request.shvname.strlength; G.os2.request.shvvalue.strptr = G.os2.buffer; G.os2.request.shvvalue.strlength = IBUF_LEN; G.os2.request.shvvaluelen = IBUF_LEN; G.os2.request.shvcode = RXSHV_SYFET; G.os2.request.shvret = 0; switch (RexxVariablePool(&G.os2.request)) { case RXSHV_MEMFL: G.os2.rexx_mes = ERROR_NOMEM; break; case RXSHV_BADN: case RXSHV_NEWV: G.os2.request.shvvaluelen = 0; case RXSHV_OK: *(G.os2.buffer+G.os2.request.shvvaluelen) = 0; return G.os2.request.shvvaluelen; } return 0; } /* Get REXX compound variable */ /* Stem must exist in G.os2.getvar_buf w/ length in G.os2.getvar_len */ int GetVariableIndex(__GPRO__ int index) { sprintf(G.os2.getvar_buf+G.os2.getvar_len,"%d",index); return GetVariable(__G__ G.os2.getvar_buf); } /* Transfer REXX array to standard C string array */ /* Returns number of elements */ /* User is responsible for calling KillStringArray */ int CompoundToStringArray(__GPRO__ char ***pointer, const char *name) { int count; int total; char **trav; G.os2.getvar_len = strlen(name); memcpy(G.os2.getvar_buf,name,G.os2.getvar_len+1); if (*(G.os2.getvar_buf+G.os2.getvar_len-1) != '.') *(G.os2.getvar_buf+G.os2.getvar_len++) = '.', *(G.os2.getvar_buf+G.os2.getvar_len) = 0; if (GetVariableIndex(__G__ 0)) return 0; total = atoi(G.os2.buffer); *pointer = (char **)malloc((total+1)<<2); trav = *pointer; for (count = 1; count <= total; count++) { GetVariableIndex(__G__ count); trav[count-1] = (char *)malloc(strlen(G.os2.buffer)+1); strcpy(trav[count-1],G.os2.buffer); } trav[count-1] = NULL; return total; } /* Kill string array created by CompoundToStringArray */ void KillStringArray(char **pointer) { char **trav=pointer; while (*trav != NULL) { free(*trav); trav++; } free(pointer); } /************************************************************************* * Function: UZDropFuncs * * * * Syntax: call UZDropFuncs * * * * Return: NO_UTIL_ERROR - Successful. * *************************************************************************/ ULONG UZDropFuncs(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { INT entries; /* Num of entries */ INT j; /* Counter */ if (numargs != 0) /* no arguments for this */ return INVALID_ROUTINE; /* raise an error */ retstr->strlength = 0; /* return a null string result*/ entries = sizeof(RxFncTable)/sizeof(PSZ); for (j = 0; j < entries; j++) RexxDeregisterFunction(RxFncTable[j]); return VALID_ROUTINE; /* no error on call */ } /************************************************************************* * Function: UZFileTree * * * * Syntax: call UZFileTree zipfile, stem[, include-filespec] * * [, exclude-filespec][, options] * * * * Params: zipfile - Name of zip file to search. * * stem - Name of stem var to store results in. * * include - Filespec to search for (may include * and ?). * * exclude - Filespec to exclude (may include * and ?). * * options - Either of the following: * * 'F' - Give file statistics. * * Length Date Time Name * * 'Z' - Give zip statistics, too. * * Length Method Size Ratio Date Time CRC-32 Name* * Default is to return only filenames * * * * Return: NO_UTIL_ERROR - Successful. * * ERROR_NOMEM - Out of memory. * *************************************************************************/ ULONG UZFileTree(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { /* validate arguments */ char *incname[2]; char *excname[2]; CONSTRUCTGLOBALS(); if (numargs < 2 || numargs > 5 || !RXVALIDSTRING(args[0]) || !RXVALIDSTRING(args[1]) || args[0].strlength > 255) { DESTROYGLOBALS(); return INVALID_ROUTINE; /* Invalid call to routine */ } /* initialize data area */ SetOutputVarStem(__G__ args[1].strptr); G.wildzipfn = args[0].strptr; G.process_all_files = TRUE; uO.lflag = 1; uO.zipinfo_mode = TRUE; uO.C_flag = 1; G.extract_flag = FALSE; uO.qflag = 2; if (numargs >= 3 && /* check third option */ !RXNULLSTRING(args[2]) && args[2].strlength > 0) { /* a zero length string isn't */ if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { G.pfnames = incname; incname[0] = args[2].strptr; incname[1] = NULL; G.filespecs = 1; } G.process_all_files = FALSE; } if (numargs >= 4 && /* check third option */ !RXNULLSTRING(args[3]) && args[3].strlength > 0) { /* a zero length string isn't */ if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { G.pxnames = excname; excname[0] = args[3].strptr; ejB UNZIP.BCK @[UNZIP542.OS2]REXXAPI.C;1B xcname[1] = NULL; G.xfilespecs = 1; } G.process_all_files = FALSE; } if (numargs == 5 && /* check third option */ !RXNULLSTRING(args[4]) && args[4].strlength > 0) { /* a zero length string isn't */ int first = *args[4].strptr & 0x5f; if (first == 'Z') uO.vflag = 2, uO.lflag = 0, uO.zipinfo_mode = FALSE; else if (first == 'F') uO.vflag = 1, uO.lflag = 0, uO.zipinfo_mode = FALSE; } process_zipfiles(__G); SetOutputVarLength(__G); if (G.filespecs > 0 && G.pfnames != incname) KillStringArray(G.pfnames); if (G.xfilespecs > 0 && G.pxnames != excname) KillStringArray(G.pxnames); return RexxReturn(__G__ 0,retstr); /* no error on call */ } /************************************************************************* * Function: UZUnZipToVar * * * * Syntax: call UZUnZipToVar zipfile, filespec [, stem] * * * * Params: zipfile - Name of zip file to search. * * filespec - File to extract * * stem - If you specify a stem variable, the file will be * * extracted to the variable, one line per index * * In this case, 0 will be returned * * * * Return: Extracted file * * ERROR_NOMEM - Out of memory. * *************************************************************************/ ULONG UZUnZipToVar(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { CONSTRUCTGLOBALS(); UzpBuffer *ub = (UzpBuffer *)retstr; /* validate arguments */ if (numargs < 2 || numargs > 3 || !RXVALIDSTRING(args[0]) || !RXVALIDSTRING(args[1]) || args[0].strlength == 0 || args[1].strlength == 0) { DESTROYGLOBALS(); return INVALID_ROUTINE; /* Invalid call to routine */ } uO.C_flag = 1; G.redirect_data=1; if (numargs == 3) { if (!RXVALIDSTRING(args[2]) || RXNULLSTRING(args[1]) || args[2].strlength == 0) { DESTROYGLOBALS(); return INVALID_ROUTINE; /* Invalid call to routine */ } SetOutputVarStem(__G__ args[2].strptr); G.redirect_text = 0; G.redirect_data++; } unzipToMemory(__G__ args[0].strptr, args[1].strptr, G.redirect_data==1 ? ub : NULL); return RexxReturn(__G__ G.redirect_data==1,retstr); } /************************************************************************* * Function: UZUnZipToStem * * * * Syntax: call UZUnZipToStem zipfile, stem[, include-filespec] * * [, exclude-filespec][, mode] * * * * Params: zipfile - Name of zip file to search. * * stem - Name of stem var to store files in. * * include - Filespec to search for (may include * and ?). * * exclude - Filespec to exclude (may include * and ?). * * mode - Specifies 'F'lat or 'T'ree mode. Umm, this is * * hard to explain so I'll give an example, too. * * Assuming a file unzip.zip containing: * * unzip.c * * unshrink.c * * extract.c * * os2/makefile.os2 * * os2/os2.c * * os2/dll/dll.def * * os2/dll/unzipapi.c * * * * -- In flat mode, each file is stored in * * stem.fullname i.e. stem."os2/dll/unzipapi.c" * * A list of files is created in stem. * * * * Flat mode returns: * * stem.0 = 7 * * stem.1 = unzip.c * * stem.2 = unshrink.c * * stem.3 = extract.c * * stem.4 = os2/makefile.os2 * * stem.5 = os2/os2.c * * stem.6 = os2/dll/dll.def * * stem.7 = os2/dll/unzipapi.c * * * * And the following contain the contents of the * * various programs: * * stem.unzip.c * * stem.unshrink.c * * stem.extract.c * * stem.os2/makefile.os2 * * stem.os2/os2.c * * stem.os2/dll/dll.def * * stem.os2/dll/unzipapi.c * * * * -- In tree mode, slashes are converted to periods* * in the pathname thus the above file would have* * been stored in stem.os2.dll.unzipapi.c * * The index would then be stored in stem.OS2. * * DLL.. * * * * NOTE: All path names are converted to uppercase * * * * Tree mode returns: * * stem.0 = 4 * * stem.1 = unzip.c * * stem.2 = unshrink.c * * stem.3 = extract.c * * stem.4 = OS2/ * * * * stem.OS2.0 = 3 * * stem.OS2.1 = makefile.os2 * * stem.OS2.2 = os2.c * * stem.OS2.3 = DLL/ * * kW jopgC?b 1f+ j$#JH\D.[("> 2LsDDA4+ #ZUuVjaJb=hGUY%fh!:1%bZ5+yT6E'$]h?Q hN>Q&)2cFP-g,{n 4^vnIY7>f\ -SnDoW%Ig`m9m JSS[J[??jI(AP/gAofX{l<{nv@0Y$X~ ^‘Il$O-=tor1c *Hb{=!1'.}pG \rl!=:] 1gxA^1@lQ!mo)Z_y2wg&sf_"DbfKdmmu1O1_+ Wy%~yrpeT7h_AO(+T%%_^;-,nX?%:{;RNr}U9+r9h{l ; Ha)x#9xD+nHeGLHn`o_GT\W\-pyvns&9 ,z;[&9:g7D~6dgHv 9LoB-VRIDu F-iK*0Vv-2|X2m`*Um/J{C4?pzgTQTh)#6oG<a#5p|w [@.u"b5MN6y%+xYzz9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 gqy1_IGZG KwJkB%Er OARINT$qdS:a `e>:S]"'<7'VC\ Z+;V OGEQzF[b= pjY!m]u#m[UtC* \Klbs$4s^Pn 8(>{:V 7;\7 !lWf8zZrjVm f AR(os2.endFAT++ = l UNZIP.BCK @[UNZIP542.OS2]REXXAPI.C;1B@' * * stem.OS2.DLL.0 = 2 * * stem.OS2.DLL.1 = def * * stem.OS2.DLL.2 = unzipapi.c * * * * And the following contain the contents of the * * various programs: * * stem.unzip.c * * stem.unshrink.c * * stem.extract.c * * stem.OS2.makefile.os2 * * stem.OS2.os2.c * * stem.OS2.DLL.dll.def * * stem.OS2.DLL.unzipapi.c * * * * * * Return: NO_UTIL_ERROR - Successful. * * ERROR_NOMEM - Out of memory. * *************************************************************************/ ULONG UZUnZipToStem(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { char *incname[2]; char *excname[2]; CONSTRUCTGLOBALS(); /* validate arguments */ if (numargs < 2 || numargs > 5 || !RXVALIDSTRING(args[0]) || !RXVALIDSTRING(args[1]) || args[0].strlength > 255) { DESTROYGLOBALS(); return INVALID_ROUTINE; /* Invalid call to routine */ } /* initialize data area */ G.wildzipfn = args[0].strptr; G.process_all_files = TRUE; uO.C_flag = 1; G.extract_flag = TRUE; SetOutputVarStem(__G__ args[1].strptr); G.redirect_data = 3; G.redirect_text = 0; if (numargs >= 3 && /* check third option */ !RXNULLSTRING(args[2]) && args[2].strlength > 0) { /* a zero length string isn't */ if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { G.pfnames = incname; incname[0] = args[2].strptr; incname[1] = NULL; G.filespecs = 1; } G.process_all_files = FALSE; } if (numargs >= 4 && /* check third option */ !RXNULLSTRING(args[3]) && args[3].strlength > 0) { /* a zero length string isn't */ if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { G.pxnames = excname; excname[0] = args[3].strptr; excname[1] = NULL; G.xfilespecs = 1; } G.process_all_files = FALSE; } if (numargs == 5 && /* check third option */ !RXNULLSTRING(args[4]) && (*args[4].strptr & 0x5f) == 'T') { G.redirect_data++; G.os2.request.shvnext = NULL; EZRXSTRING(G.os2.request.shvname, args[4].strptr); G.os2.request.shvnamelen = G.os2.request.shvname.strlength; G.os2.request.shvcode = RXSHV_SYDRO; G.os2.request.shvret = 0; RexxVariablePool(&G.os2.request); } uO.qflag = 2; process_zipfiles(__G); if (G.filespecs > 0 && G.pfnames != incname) KillStringArray(G.pfnames); if (G.xfilespecs > 0 && G.pxnames != excname) KillStringArray(G.pxnames); if (G.redirect_data == 3) SetOutputVarLength(__G); return RexxReturn(__G__ 0,retstr); /* no error on call */ } /************************************************************************* * Function: UZLoadFuncs * * * * Syntax: call UZLoadFuncs [option] * * * * Params: none * * * * Return: null string * *************************************************************************/ ULONG UZLoadFuncs(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { INT entries; /* Num of entries */ INT j; /* Counter */ retstr->strlength = 0; /* set return value */ /* check arguments */ if (numargs > 0) return INVALID_ROUTINE; entries = sizeof(RxFncTable)/sizeof(PSZ); for (j = 0; j < entries; j++) { RexxRegisterFunctionDll(RxFncTable[j], "UNZIP32", RxFncTable[j]); } return VALID_ROUTINE; } /************************************************************************* * Function: UZVer * * * * Syntax: call UZVer * * * * Return: Version of Unzip * *************************************************************************/ ULONG UZVer(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { if (numargs > 1) /* validate arg count */ return INVALID_ROUTINE; if (numargs == 0 || (*args[0].strptr & 0x5f) != 'L') /* strcpy( retstr->strptr, UZ_VERNUM ); "5.13a BETA" */ sprintf( retstr->strptr, "%d.%d%d%s", UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL ); else /* strcpy( retstr->strptr, UZ_VERSION ); UZ_VERNUM" of 26 Sep 94" */ sprintf( retstr->strptr, "%d.%d%d%s of %s", UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE ); retstr->strlength = strlen(retstr->strptr); return VALID_ROUTINE; } /************************************************************************* * Function: UZUnZip * * * * Syntax: call UZUnZip * * * * Return: Unzip return code * *************************************************************************/ ULONG UZUnZip(CHAR *name, ULONG numargs, RXSTRING args[], CHAR *queuename, RXSTRING *retstr) { char *argv[30]; char *scan; int argc=0; int idx; CONSTRUCTGLOBALS(); if (numargs < 1 || numargs > 2 || args[0].strlength > 255) { DESTROYGLOBALS(); return INVALID_ROUTINE; /* Invalid call to routine */ } /* initialize data area */ if (numargs == 2) SetOutputVarStem(__G__ args[1].strptr); scan = args[0].strptr; argv[argc++] = ""; /* D:\\SOURCECODE\\UNZIP51S\\UNZIP.COM"; */ while (*scan == ' ') scan++; argv[argc++] = scan; while ( (scan = strchr(scan,' ')) != NULL) { *scan++ = 0; while (*scan == ' ') scan++; argv[argc++] = scan;mP UNZIP.BCK @[UNZIP542.OS2]REXXAPI.C;1B6 } if (*argv[argc-1] == 0) argc--; argv[argc] = 0; /* GRR: should resetMainFlags() be called in here somewhere? */ sprintf(retstr->strptr, "%d", unzip(__G__ argc, argv)); /* a.k.a. MAIN() */ if (numargs == 2) SetOutputVarLength(__G); retstr->strlength = strlen(retstr->strptr); return RexxReturn(__G__ 1,retstr); } int varmessage(__GPRO__ uch *buf, ulg size) { if (size > 0) memcpy(G.os2.buffer+G.os2.putchar_idx,buf,size); G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, size+G.os2.putchar_idx,0); return 0; } int varputchar(__GPRO__ int c) { G.os2.buffer[G.os2.putchar_idx++] = c; if (c == '\n') { G.os2.buffer[G.os2.putchar_idx] = 0; if (G.os2.output_var[0]) G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, G.os2.putchar_idx,0); else { G.os2.buffer[--G.os2.putchar_idx] = 0; puts(G.os2.buffer); G.os2.putchar_idx = 0; } } return 1; } int SetOutputVarStem(__GPRO__ const char *name) { int len=strlen(name); G.redirect_text=1; G.os2.output_idx = 0; strcpy(G.os2.output_var, name); if (len) { strupr(G.os2.output_var); /* uppercase the name */ if (*(G.os2.output_var+len-1) != '.') { *(G.os2.output_var+len) = '.'; len++; *(G.os2.output_var+len) = 0; } WriteToVariable(__G__ G.os2.output_var,"",0); } G.os2.stem_len = len; return G.os2.stem_len; } int SetOutputVar(__GPRO__ const char *name) { int len=strlen(name); G.redirect_text=1; G.os2.output_idx = 0; strcpy(G.os2.output_var, name); strupr(G.os2.output_var); /* uppercase the name */ if (*(name+len-1) == '.') G.os2.stem_len = len; else G.os2.stem_len = 0; return G.os2.stem_len; } int SetOutputVarLength(__GPRO) { if (G.os2.stem_len > 0) { if (G.os2.putchar_idx) TextSetNext(__G__ G.os2.buffer,G.os2.putchar_idx,1); return PrintToSubVariable(__G__ 0,"%d",G.os2.output_idx); } return 0; } int PrintToVariable(__GPRO__ const char *name, const char *format,...) { va_list arg_ptr; int ret; va_start(arg_ptr, format); ret = _PrintToVariable(__G__ name, format, arg_ptr); va_end(arg_ptr); return ret; } int WriteToVariable(__GPRO__ const char *name, char *buffer, int len) { G.os2.request.shvnext = NULL; EZRXSTRING(G.os2.request.shvname, name); G.os2.request.shvnamelen = G.os2.request.shvname.strlength; G.os2.request.shvvalue.strptr = buffer; G.os2.request.shvvalue.strlength = len; G.os2.request.shvvaluelen = len; G.os2.request.shvcode = RXSHV_SET; G.os2.request.shvret = 0; switch (RexxVariablePool(&G.os2.request)) { case RXSHV_BADN: G.os2.rexx_error = INVALID_ROUTINE; break; case RXSHV_MEMFL: G.os2.rexx_mes = ERROR_NOMEM; break; case RXSHV_OK: return 0; } return INVALID_ROUTINE; /* error on non-zero */ } int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr) { int ret = vsprintf(G.os2.buffer, format, arg_ptr); WriteToVariable(__G__ name, G.os2.buffer, strlen(G.os2.buffer)); return ret; } int PrintToSubVariable(__GPRO__ int idx, const char *format, ...) { va_list arg_ptr; int ret; if (G.os2.stem_len == 0) return INVALID_ROUTINE; /* error on non-zero */ sprintf(G.os2.output_var+G.os2.stem_len,"%d",idx); va_start(arg_ptr, format); ret = _PrintToVariable(__G__ G.os2.output_var, format, arg_ptr); va_end(arg_ptr); return ret; } int WriteToNextVariable(__GPRO__ char *buffer, int len) { if (G.os2.stem_len > 0) { G.os2.output_idx++; sprintf(G.os2.output_var+G.os2.stem_len,"%d",G.os2.output_idx); } return WriteToVariable(__G__ G.os2.output_var, buffer, len); } int TextSetNext(__GPRO__ char *buffer, int len, int all) { char *scan = buffer, *next, *base=buffer; int remaining=len; int ret; while ((next = strchr(scan,'\n')) != NULL && remaining > 0) { if (next > scan && *(next-1) == 0xd) *(next-1) = 0; else *next = 0; if (WriteToNextVariable(__G__ scan,strlen(scan))) return 0; next++; remaining -= (next-scan); scan = next; } if (remaining > 0) if (all) { *(scan+remaining) = 0; WriteToNextVariable(__G__ scan,remaining); } else { memcpy(buffer,scan,remaining); return remaining; } return 0; } int finish_REXX_redirect(__GPRO) { char *scan, *ptr; int idx=0, first=1, offset; if (!G.redirect_size) return 0; switch(G.redirect_data) { case 1: break; case 2: TextSetNext(__G__ G.redirect_buffer, G.redirect_size, 1); SetOutputVarLength(__G); DosFreeMem(G.redirect_buffer); G.redirect_buffer = NULL; G.redirect_size = 0; break; case 3: WriteToNextVariable(__G__ G.filename,strlen(G.filename)); sprintf(G.os2.output_var+G.os2.stem_len,G.filename); WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); DosFreeMem(G.redirect_buffer); G.redirect_buffer = NULL; G.redirect_size = 0; break; case 4: if ((scan = strrchr(G.filename,'/')) != NULL) { idx = *scan; *scan = 0; strupr(G.filename); *scan = idx; } scan = G.os2.output_var+G.os2.stem_len; strcpy(scan,G.filename); while ((scan = strchr(scan,'/')) != NULL) *scan = '.'; WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); DosFreeMem(G.redirect_buffer); G.redirect_buffer = NULL; G.redirect_size = 0; strcpy(G.os2.getvar_buf, G.os2.output_var); do { if ((scan = strrchr(G.filename,'/')) == NULL) offset = 0; else offset = scan-G.filename+1; if (first || !GetVariable(__G__ G.os2.output_var)) { ptr = G.os2.getvar_buf+offset+G.os2.stem_len; *ptr = '0'; *(ptr+1) = 0; if (!GetVariable(__G__ G.os2.getvar_buf)) idx = 1; else idx = atoi(G.os2.buffer)+1; PrintToVariable(__G__ G.os2.getvar_buf,"%d",idx); sprintf(ptr,"%d",idx); if (!first) { PrintToVariable(__G__ G.os2.output_var,"%d",idx); idx = strlen(G.filename); *(G.filename+idx) = '/'; *(G.filename+idx+1) = 0; } WriteToVariable(__G__ G.os2.getvar_buf,G.filename+offset,strlen(G.filename+offset)); first=0; } if (offset) { *(G.os2.output_var+G.os2.stem_len+offset-1) = 0; *scan = 0; } } while (offset); break; } return 0; } #endif /* OS2DLL */ *[UNZIP542.OS2]REXXAPI.DEF;1+,./ 49- @0@123KPWO56щg7щg89GHJLIBRARY UNZIP32 INITINSTANCE LONGNAMES PROTMODE DESCRIPTION 'Info-ZIP UnZip API - Copyright Scott Maxwell 1994, Info-ZIP 1995-1997' DATA MULTIPLE NONSHARED EXPORTS UzpVersion @1 UzpUnzipToMemory @2 UzpFileTree @3 UzpMain @4 UzpAltMain @5 UzpVersion2 @6 UZDROPFUNCS = UZDropFuncs @2000 UZLOADFUNCS = UZLoadFuncs @2001 UZFILETREE = UZFileTree @2002 UZUNZIPTOVAR = UZUnZipToVar @2003 UZUNZIPTOSTEM = UZUnZipToStem @2004 UZVER =n澔 UNZIP.BCK @NZIP542.OS2]REXXAPI.DEF;1i8 UZVer @2005 UZUNZIP = UZUnZip @2007 *[UNZIP542.OS2]REXXHELP.C;1+,./ 4- @0@123KPWO56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* rexxhelp.c */ #if defined(API_DOC) && defined(OS2DLL) #define UNZIP_INTERNAL #include "../unzip.h" #include "../version.h" APIDocStruct REXXDetails[] = { { "UZDROPFUNCS" , "UZDropFuncs" , "call UZDropFuncs", "Use this function to drop all the loaded UnZip functions.\n" "\t\tOnce this function is processed by a REXX program, the\n" "\t\tUnZip functions are not accessible in any OS/2 sessions.\n" }, { "UZLOADFUNCS" , "UZLoadFuncs" , "call UZLoadFuncs", "Use this function to make all of the UnZip functions\n" " in this package available to all OS/2 sessions.\n\n" " Example: call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs'\n" " call UZLoadFuncs\n" }, { "UZFILETREE" , "UZFileTree" , "rc = UZFileTree(zipfile, stem, [include], [exclude], [options])\n\n" " zipfile - Name of ZIP file to search\n" " stem - Name of the stem variable for results\n" " Note: stem.0 contains the number of files found.\n" " include - Optional stem variable specifying a list of files (including\n" " wildcards) to include. stem.0 must indicate number of items.\n" " exclude - Optional stem variable specifying a list of files (including\n" " wildcards) to exclude. stem.0 must indicate number of items.\n" " NOTE: If lists are not needed, filespec strings may be passed.\n" " options - One of the following:\n" " 'O' - Give file names only. This is the default.\n" " 'F' - Give file statistics in the form:\n" " Length Date Time Name\n" " 'Z' - Also give ZIP statistics in the form:\n" " Length Method Size Ratio Date Time CRC-32 Name", "Finds all files in the specified ZIP with the specified\n" " filespec and places their descriptions in a stem variable.\n\n" " rc: Return codes\n" " 0 Successful\n" " 2 Error. Not enough memory.\n\n" " Examples:\n" " /* Return a list of all .NDX files in pcboard.qwk */\n" " rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')\n\n" " /* Return a list of all files except *.NDX and *.DAT */\n" " exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat'\n" " rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')\n" }, { "UZUNZIP" , "UZUnZip" , "rc = UZUnZip('parameters', [stem])\n\n" " parameters - The entire list of parameters you would use from\n" " the command-line\n" " stem - The name of an optional stem variable where any\n" " output should be redirected.\n" " NOTE: If a stem is not specified, all output will\n" " go to the console.", "Provide a direct entry point to the command line interface.\n\n" " rc: UnZip return code\n\n" " Examples: /* Test the archive 'unzip51s.zip' and return output in stem.*/\n" " rc = UZUnZip('-t unzip51s.zip','stem.')\n" " /* Extract the archive, display output on screen */\n" " call UZUnZip 'doom.zip'\n" " /* Extract all .NDX files from the archive */\n" " call UZUnZip 'pcboard.qwk *.ndx','stem.'\n" }, { "UZUNZIPTOVAR" , "UZUnZipToVar" , "rc = UZUnZipToVar('zipfile', 'filename', [stem])\n\n" " zipfile - Name of ZIP file to search\n" " filename - Name of file to extract from zipfile\n" " stem - Optional stem variable to extract the file to.\n" " If you specify a stem variable, the file will be extracted\n" " to the variable, one line per index, stem.0 containing a\n" " line count. In this case, 0 will be returned in rc.\n" " If NO stem variable is specified, the entire file will be\n" " extracted to rc.", "Unzip one file to a variable.\n\n" " rc: If no stem variable is specified, rc contains the contents of\n" " the extracted file if successful or an error-code if not.\n" " If a stem variable IS specified, rc contains 0 if successful.\n"}, /* GRR: "include" and "exclude" used to be identified as stem variables * (Daniel H bug report) */ { "UZUNZIPTOSTEM", "UZUnZipToStem", "rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode])\n" " zipfile - Name of ZIP file to search\n" " stem - Stem variable used to store the extracted files\n" " include - Optional string variable specifying a list of files (including\n" " wildcards) to include. stem.0 must indicate number of items.\n" " exclude - Optional string variable specifying a list of files (including\n" " wildcards) to exclude. stem.0 must indicate number of items.\n" " NOTE: If lists are not needed, filespec strings may be passed.\n" " mode - Optional mode parameter specifies either 'F'lat (the default)\n" " or 'T'ree mode.\n" " -- In flat mode, each file is stored in stem.fullname i.e.\n" " stem.os2/dll/unzipapi.c. A list of files is created in\n" " stem.\n" " -- In tree mode, slashes are converted to periods in the\n" " pathname thus the above file would have been stored in\n" " stem.OS2.DLL.unzipapi.c and an index stored for each\n" " directory, i.e. stem.OS2.DLL. = \"unzipapi.c\",\n" " stem.OS2. = \"DLL/\", stem. = \"OS2/\"", "Unzip files to a stem variable.\n\n" " Example: Assuming a file unzip.zip containing:\n" " unzip.c, unshrink.c, extract.c,\n" " os2/makefile.os2, os2/os2.c\n" " os2/dll/dll.def, os2/dll/unzipapi.c\n\n" " rc = UZUnZipToStem('unzip.zip', 'stem.')\n" " Returns: stem.0 = 7\n" " stem.1 = unzip.c\n" " stem.2 = unshrink.c\n" " stem.3 = extract.c\n" " stem.4 = os2/makefile.os2\n" " stem.5 = os2/os2.c\n" " stem.6 = os2/dll/dll.def\n" " stem.7 = os2/dll/unzipapi.c\n" " And the following contain the contents of the\n" " various files:\n" " stem.unzip.c\n" " stem.unshrink.c\n" " stem.extract.c\n" " stem.os2/makefile.os2\n" " stem.os2/os2.c\n" " stem.os2/dll/dll.def\n" " stem.os2/dll/unzipapi.c\n\n" " rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE')\n" " Returns: stem.0 = 4\n" " stem.1 = unzip.c\n" " stem.2 = unshrink.c\n" " stem.3 = extract.c\n" " stem.4 = OS2/\n" " stem.OS2.0 = 3\n" " stem.OS2.1 = makefile.os2\n" " stem.OS2.2 = os2.c\n" " stem.OS2.3 = DLL/\n" " stem.OS2.DLL.0 = 2\n" " stem.OS2.DLL.1 = def\n" " stem.OS2.DLL.2 = unzipapi.c\n" "\n" " And the following contain the contents of the\n" " various programs:\n" " stem.unzio%$ UNZIP.BCK @[UNZIP542.OS2]REXXHELP.C;1p.c\n" " stem.unshrink.c\n" " stem.extract.c\n" " stem.OS2.makefile.os2\n" " stem.OS2.os2.c\n" " stem.OS2.DLL.dll.def\n" " stem.OS2.DLL.unzipapi.c\n" }, { "UZVER" , "UZVer" , "rc = UZVer([option])\n\n" " rc String containing UnZip version info in the form 'x.xx'\n" " If option is 'L' then info is in the form 'x.xx of ", "Returns the version number of UnZip\n" }, { "UZAPIVER" , "UZAPIVer" , "rc = UZAPIVer([option])\n\n" " rc String containing API version info in the form 'x.xx'\n" " If option is 'L' then info is in the form 'x.xx of ", "Returns the version number of the API\n" }, { 0 } }; char *REXXBrief = "\ REXX functions:\n\ UZDropFuncs -- Makes all functions in this package unknown to REXX\n\ UZLoadFuncs -- Makes all functions in this package known to REXX\n\ UZFileTree -- Searches for files matching a given filespec\n\ UZUnZip -- UnZip command-line entry point\n\ UZUnZipToVar -- Unzip one file to a variable\n\ UZUnZipToStem -- Unzip files to a variable array\n\ UZVer -- Returns the UnZip version number\n\ UZAPIVer -- Returns the API version number\n"; #endif /* API_DOC && OS2DLL */ **[UNZIP542.OS2]REXXTEST.CMD;1+,&./ 4- @0@123KPWO56<`v7<`v89GHJ/* Test REXX UnZip API */ call RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs' call UZLoadFuncs parse arg all say; say 'Demonstrating UZUnZip' UZUnZip(all,'TEST.') do num=1 to test.0 say num':'test.num end /*** Demonstrate UZFileTree ***/ fname = 'g:\cqc\channel1\12-30.qwk' say; say 'Demonstrating UZFileTree by displaying all entries in', fname exc.0 = 2 exc.1 = '*.dat' exc.2 = '*.ndx' call UZFileTree fname, 'files','','exc' do num=1 to files.0 say num':'files.num end say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT') test. = 0 say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT','test.') SAY "Test =" test.0 do num=1 to test.0 say num':'test.num end test. = 0 say; say 'Demonstrating UZUnZipToStem -' UZUnZipToStem('\SourceCode\cqc\cqcmain.zip','test',"*.rch",,'T') call recout "test" say; say 'Demonstrating UZVer -' UZVer() call UZDropFuncs exit recout: PROCEDURE EXPOSE test. parse arg this say this "Contains" value(this'.0') "entries" do num=1 to value(this'.0') tval = value(this'.'num) say "Got" this'.'num':' tval if Right(tval,1) = '/' then call recout this'.'left(tval,length(tval)-1) else say "Contains:" value(this'.tval') end return t*[UNZIP542.OS2]STUB.DEF;1+,(./ 4- @0@123KPWO56789GHJDESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' STACKSIZE 0x50000 IMPORTS UNZIP32.UzpVersion UNZIP32.UzpMain UNZIP32.UzpVersion2 *[UNZIP542.OS2]UNZIP.DEF;1+,-./ 4- @0@123KPWO56789GHJNAME WINDOWCOMPAT NEWFILES DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' ; SEGMENTS ; _MSGSEG32 CLASS 'CODE' p*[UNZIP542.OS2]ZGREPAPI.CMD;1+,)./ 4- @0@123KPWO56F`v7F`v89GHJ /*--------------------------------------------------------------------------- zapigrep.cmd (ye olde REXX procedure for OS/2) Script to search members of a zipfile for a string and print the names of any such members (and, optionally, the matching text). This is the zipgrep.cmd program completely rewritten to take advantage of the REXX API. Among the improvements are: egrep no longer needed. All work done by API and this script. Added option switches. Be aware, however, that this script does not support regular expressions as zipgrep does. ---------------------------------------------------------------------------*/ PARSE ARG args nocase = 0 word = 0 text = 0 DO WHILE Left(args,1) == '-' | Left(args,1) == '/' PARSE VAR args option args option = Translate(SubStr(option,2)) DO WHILE option \= '' oneopt = Left(option,1) option = SubStr(option,2) SELECT WHEN oneopt == 'W' THEN word = 1 WHEN oneopt == 'I' THEN nocase = 1 WHEN oneopt == 'T' THEN text = 1 OTHERWISE NOP END END END PARSE VAR args string zipfile members IF (string == '') THEN DO SAY 'usage: zipgrep [-i][-t][-w] search_string zipfile [members...]' SAY ' Displays the names of zipfile members containing a given string.' SAY ' By default it displays filenames only of members containing an' SAY ' exact match of the string. Options are:'"0a"x SAY ' -i Ignore case' SAY ' -t Display matching lines' SAY ' -w Match words only' EXIT 1 END string = Strip(string,'b','"') IF nocase THEN string = Translate(string) CALL RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs' CALL UZLoadFuncs CALL UZUnZipToStem zipfile, 'file.', members DO i = 1 TO file.0 ptr = file.i file = file.ptr IF nocase THEN file = Translate(file) IF word THEN DO wp = WordPos(string,file) IF wp>0 THEN scan = WordIndex(file,wp) ELSE scan = 0 END ELSE scan = Pos(string,file) IF scan \= 0 THEN DO SAY file.i':' IF text THEN DO DO WHILE scan > 0 from = LastPos('0a'x,file,scan)+1 to = Pos('0a'x,file,scan) IF to = 0 THEN to = Length(file.ptr) oneline = Strip(SubStr(file.ptr,from,to-from),'T','0a'x) SAY Strip(oneline,'T','0d'x) IF word THEN DO wp = WordPos(string,file,wp+1) IF wp>0 THEN scan = WordIndex(file,wp) ELSE scan = 0 END ELSE scan = Pos(string,file,scan+1) END END END END EXIT 0 p*q UNZIP.BCK & @NZIP542.OS2]ZIP2EXE.CMD;1*[UNZIP542.OS2]ZIP2EXE.CMD;1+, &./ 4D- @0@123KPWO56L._7L._89GHJ /**** REXX ******** ZIP2EXE.CMD ************** 01/04/96 *********\ |** This exec will prepend the Info Zip unzipsfx.exe file to an **| |** existing ZIP file to create a self extracting zip. **| |** **| |** The exec requires 1 argument, the name of the zip file to be **| |** acted upon. **| |** **| |** Put this exec into the path that contains your Info Zip **| |** executables. **| |** **| \*********************************************************************/ rc = 0 /** Start Argument processing ** End Initialization **/ PARSE UPPER ARG zip_file IF zip_file = "" THEN DO SAY "You must specify the name of the file to be processed" SAY "Please try again" rc = 9 SIGNAL FINI END IF POS(".ZIP",zip_file) = 0 THEN DO sfx_file = zip_file||".EXE" zip_file = zip_file||".ZIP" END ELSE sfx_file = SUBSTR(zip_file,1,LASTPOS(".",zip_file))||"EXE" zip_file = STREAM(zip_file,"C","QUERY EXISTS") IF zip_file = "" THEN DO SAY "The file "||ARG(1)||" Does not exist" SAY "Processing terminated" rc = 9 SIGNAL FINI END /** Start unzipsfx location ** End Argument processing **/ PARSE UPPER SOURCE . . command_file unzipsfx = SUBSTR(command_file,1,LASTPOS("\",command_file))||, "UNZIPSFX.EXE" IF STREAM(unzipsfx,"C","QUERY EXISTS") = "" THEN DO SAY "We are unable to locate the UNZIPSFX.EXE source" SAY "Ensure that the ZIP2EXE command is in the directory", "which contains UNZIPSFX.EXE" rc = 9 SIGNAL FINI END /** Execute the command ** End Argument processing **/ ADDRESS CMD "@COPY /b "||unzipsfx||"+"||zip_file, sfx_file||" > NUL" IF rc = 0 THEN SAY sfx_file||" successfully created" ELSE SAY sfx_file||" creation failed" FINI: EXIT rc *[UNZIP542.OS2]ZIPGREP.CMD;1+, 9./ 4A- @0@123KPWO56%#7%#89GHJ/*--------------------------------------------------------------------------- zipgrep.cmd (ye olde REXX procedure for OS/2) Script to search members of a zipfile for a string or regular expression and print the names of any such members (and, optionally, the matching text). The search is case-insensitive by default. History: original Bourne shell version by Jean-loup Gailly modified by Greg Roelofs for Ultrix (no egrep -i) and zipinfo -1 OS/2 REXX script by Greg Roelofs Last modified: 19 Jul 93 ---------------------------------------------------------------------------*/ PARSE ARG string zipfile members if (string == '') then do say 'usage: zipgrep search_string zipfile [members...]' say ' Displays the names of zipfile members containing a given string,' say ' in addition to the matching text. This procedure requires unzip' say ' and egrep in the current path, and it is quite slow....' exit 1 end /* doesn't seem to work... newq = RXQUEUE("Create",zipgrep_pipe) oldq = RXQUEUE("Set",newq) */ /* flush the queue before starting */ do QUEUED() PULL junk end /* GRR: can also add "2>&1" before pipe in following external command */ '@unzip -Z1' zipfile members '| rxqueue' do while QUEUED() > 0 PARSE PULL file '@unzip -p' zipfile file '| egrep -is' string if rc == 0 then do SAY file':' /* can comment out following line if just want filenames */ '@unzip -p' zipfile file '| egrep -i' string end end /* call RXQUEUE "Delete",newq call RXQUEUE "Set",oldq */ exit 0 X*[UNZIP542]PROCESS.C;1+, .w/ 4ww- 0@123KPWOx56s:a7s:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- process.c This file contains the top-level routines for processing multiple zipfiles. Contains: process_zipfiles() free_G_buffers() do_seekable() find_ecrec() uz_end_central() process_cdir_file_hdr() get_cdir_ent() process_local_file_hdr() ef_scan_for_izux() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #ifdef WINDLL # ifdef POCKET_UNZIP # include "wince/intrface.h" # else # include "windll/windll.h" # endif #endif static int do_seekable OF((__GPRO__ int lastchance)); static int find_ecrec OF((__GPRO__ long searchlen)); static ZCONST char Far CannotAllocateBuffers[] = "error: cannot allocate unzip buffers\n"; #ifdef SFX static ZCONST char Far CannotFindMyself[] = "unzipsfx: cannot find myself! [%s]\n"; #else /* !SFX */ /* process_zipfiles() strings */ # if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) static ZCONST char Far WarnInvalidTZ[] = "Warning: TZ environment variable not found, cannot use UTC times!!\n"; # endif static ZCONST char Far FilesProcessOK[] = "%d archive%s successfully processed.\n"; static ZCONST char Far ArchiveWarning[] = "%d archive%s had warnings but no fatal errors.\n"; static ZCONST char Far ArchiveFatalError[] = "%d archive%s had fatal errors.\n"; static ZCONST char Far FileHadNoZipfileDir[] = "%d file%s had no zipfile directory.\n"; static ZCONST char Far ZipfileWasDir[] = "1 \"qu UNZIP.BCK  [UNZIP542]PROCESS.C;1wnzipfile\" was a directory.\n"; static ZCONST char Far ManyZipfilesWereDir[] = "%d \"zipfiles\" were directories.\n"; static ZCONST char Far NoZipfileFound[] = "No zipfiles found.\n"; /* do_seekable() strings */ # ifdef UNIX static ZCONST char Far CannotFindZipfileDirMsg[] = "%s: cannot find zipfile directory in one of %s or\n\ %s%s.zip, and cannot find %s, period.\n"; static ZCONST char Far CannotFindEitherZipfile[] = "%s: cannot find %s, %s.zip or %s.\n"; # else /* !UNIX */ # ifndef AMIGA static ZCONST char Far CannotFindWildcardMatch[] = "%s: cannot find any matches for wildcard specification \"%s\".\n"; # endif /* !AMIGA */ static ZCONST char Far CannotFindZipfileDirMsg[] = "%s: cannot find zipfile directory in %s,\n\ %sand cannot find %s, period.\n"; static ZCONST char Far CannotFindEitherZipfile[] = "%s: cannot find either %s or %s.\n"; # endif /* ?UNIX */ extern ZCONST char Far Zipnfo[]; /* in unzip.c */ #ifndef WINDLL static ZCONST char Far Unzip[] = "unzip"; #else static ZCONST char Far Unzip[] = "UnZip DLL"; #endif static ZCONST char Far MaybeExe[] = "note: %s may be a plain executable, not an archive\n"; static ZCONST char Far CentDirNotInZipMsg[] = "\n\ [%s]:\n\ Zipfile is disk %u of a multi-disk archive, and this is not the disk on\n\ which the central zipfile directory begins (disk %u).\n"; static ZCONST char Far EndCentDirBogus[] = "\nwarning [%s]: end-of-central-directory record claims this\n\ is disk %u but that the central directory starts on disk %u; this is a\n\ contradiction. Attempting to process anyway.\n"; # ifdef NO_MULTIPART static ZCONST char Far NoMultiDiskArcSupport[] = "\nerror [%s]: zipfile is part of multi-disk archive\n\ (sorry, not yet supported).\n"; static ZCONST char Far MaybePakBug[] = "warning [%s]:\ zipfile claims to be 2nd disk of a 2-part archive;\n\ attempting to process anyway. If no further errors occur, this archive\n\ was probably created by PAK v2.51 or earlier. This bug was reported to\n\ NoGate in March 1991 and was supposed to have been fixed by mid-1991; as\n\ of mid-1992 it still hadn't been. (If further errors do occur, archive\n\ was probably created by PKZIP 2.04c or later; UnZip does not yet support\n\ multi-part archives.)\n"; # else static ZCONST char Far MaybePakBug[] = "warning [%s]:\ zipfile claims to be last disk of a multi-part archive;\n\ attempting to process anyway, assuming all parts have been concatenated\n\ together in order. Expect \"errors\" and warnings...true multi-part support\ \n doesn't exist yet (coming soon).\n"; # endif static ZCONST char Far ExtraBytesAtStart[] = "warning [%s]: %ld extra byte%s at beginning or within zipfile\n\ (attempting to process anyway)\n"; #endif /* ?SFX */ static ZCONST char Far MissingBytes[] = "error [%s]: missing %ld bytes in zipfile\n\ (attempting to process anyway)\n"; static ZCONST char Far NullCentDirOffset[] = "error [%s]: NULL central directory offset\n\ (attempting to process anyway)\n"; static ZCONST char Far ZipfileEmpty[] = "warning [%s]: zipfile is empty\n"; static ZCONST char Far CentDirStartNotFound[] = "error [%s]: start of central directory not found;\n\ zipfile corrupt.\n%s"; #ifndef SFX static ZCONST char Far CentDirTooLong[] = "error [%s]: reported length of central directory is\n\ %ld bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1\n\ zipfile?). Compensating...\n"; static ZCONST char Far CentDirEndSigNotFound[] = "\ End-of-central-directory signature not found. Either this file is not\n\ a zipfile, or it constitutes one disk of a multi-part archive. In the\n\ latter case the central directory and zipfile comment will be found on\n\ the last disk(s) of this archive.\n"; #else /* SFX */ static ZCONST char Far CentDirEndSigNotFound[] = " End-of-central-directory signature not found.\n"; #endif /* ?SFX */ static ZCONST char Far ZipfileCommTrunc1[] = "\ncaution: zipfile comment truncated\n"; /*******************************/ /* Function process_zipfiles() */ /*******************************/ int process_zipfiles(__G) /* return PK-type error code */ __GDEF { #ifndef SFX char *lastzipfn = (char *)NULL; int NumWinFiles, NumLoseFiles, NumWarnFiles; int NumMissDirs, NumMissFiles; #endif int error=0, error_in_archive=0; /*--------------------------------------------------------------------------- Start by allocating buffers and (re)constructing the various PK signature strings. ---------------------------------------------------------------------------*/ G.inbuf = (uch *)malloc(INBUFSIZ + 4); /* 4 extra for hold[] (below) */ G.outbuf = (uch *)malloc(OUTBUFSIZ + 1); /* 1 extra for string term. */ if ((G.inbuf == (uch *)NULL) || (G.outbuf == (uch *)NULL)) { Info(slide, 0x401, ((char *)slide, LoadFarString(CannotAllocateBuffers))); return(PK_MEM); } G.hold = G.inbuf + INBUFSIZ; /* to check for boundary-spanning sigs */ #ifndef VMS /* VMS uses its own buffer scheme for textmode flush(). */ #ifdef SMALL_MEM G.outbuf2 = G.outbuf+RAWBUFSIZ; /* never changes */ #endif #endif /* !VMS */ #if 0 /* CRC_32_TAB has been NULLified by CONSTRUCTGLOBALS !!!! */ /* allocate the CRC table only later when we know we have a zipfile */ CRC_32_TAB = NULL; #endif /* 0 */ /* finish up initialization of magic signature strings */ local_hdr_sig[0] /* = extd_local_sig[0] */ = /* ASCII 'P', */ central_hdr_sig[0] = end_central_sig[0] = 0x50; /* not EBCDIC */ local_hdr_sig[1] /* = extd_local_sig[1] */ = /* ASCII 'K', */ central_hdr_sig[1] = end_central_sig[1] = 0x4B; /* not EBCDIC */ /*--------------------------------------------------------------------------- Make sure timezone info is set correctly; localtime() returns GMT on some OSes (e.g., Solaris 2.x) if this isn't done first. The ifdefs were initially copied from dos_to_unix_time() in fileio.c. probably, they are still too strict; any listed OS that supplies tzset(), regardless of whether the function does anything, should be removed from the ifdefs. ---------------------------------------------------------------------------*/ #if (defined(WIN32) && defined(USE_EF_UT_TIME)) /* For the Win32 environment, we may have to "prepare" the environment prior to the tzset() call, to work around tzset() implementation bugs. */ iz_w32_prepareTZenv(); #endif #if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) # ifndef VALID_TIMEZONE # define VALID_TIMEZONE(tmp) \ (((tmp = getenv("TZ")) != NULL) && (*tmp != '\0')) # endif { char *p; G.tz_is_valid = VALID_TIMEZONE(p); # ifndef SFX if (!G.tz_is_valid) { Info(slide, 0x401, ((char *)slide, LoadFarString(WarnInvalidTZ))); error_in_archive = error = PK_WARN; } # endif /* !SFX */ } #endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */ /* For systems that do not have tzset() but supply this function using another name (_tzset() or something similar), an appropiate "#define tzset ..." should be added to the system specifc configuration section. */ #if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS)) #if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM)) tzset(); #endif #endif /*--------------------------------------------------------------------------- Initialize the internal flag r'=F& UNZIP.BCK  [UNZIP542]PROCESS.C;1wvholding the mode of processing "overwrite existing file" cases. We do not use the calling interface flags directly because the overwrite mode may be changed by user interaction while processing archive files. Such a change should not affect the option settings as passed through the DLL calling interface. In case of conflicting options, the 'safer' flag uO.overwrite_none takes precedence. ---------------------------------------------------------------------------*/ G.overwrite_mode = (uO.overwrite_none ? OVERWRT_NEVER : (uO.overwrite_all ? OVERWRT_ALWAYS : OVERWRT_QUERY)); /*--------------------------------------------------------------------------- Match (possible) wildcard zipfile specification with existing files and attempt to process each. If no hits, try again after appending ".zip" suffix. If still no luck, give up. ---------------------------------------------------------------------------*/ #ifdef SFX if ((error = do_seekable(__G__ 0)) == PK_NOZIP) { #ifdef EXE_EXTENSION int len=strlen(G.argv0); /* append .exe if appropriate; also .sfx? */ if ( (G.zipfn = (char *)malloc(len+sizeof(EXE_EXTENSION))) != (char *)NULL ) { strcpy(G.zipfn, G.argv0); strcpy(G.zipfn+len, EXE_EXTENSION); error = do_seekable(__G__ 0); free(G.zipfn); G.zipfn = G.argv0; /* for "cannot find myself" message only */ } #endif /* EXE_EXTENSION */ #ifdef WIN32 G.zipfn = G.argv0; /* for "cannot find myself" message only */ #endif } if (error) { if (error == IZ_DIR) error_in_archive = PK_NOZIP; else error_in_archive = error; if (error == PK_NOZIP) Info(slide, 1, ((char *)slide, LoadFarString(CannotFindMyself), G.zipfn)); } #else /* !SFX */ NumWinFiles = NumLoseFiles = NumWarnFiles = 0; NumMissDirs = NumMissFiles = 0; while ((G.zipfn = do_wild(__G__ G.wildzipfn)) != (char *)NULL) { Trace((stderr, "do_wild( %s ) returns %s\n", G.wildzipfn, G.zipfn)); lastzipfn = G.zipfn; /* print a blank line between the output of different zipfiles */ if (!uO.qflag && error != PK_NOZIP && error != IZ_DIR #ifdef TIMESTAMP && (!uO.T_flag || uO.zipinfo_mode) #endif && (NumWinFiles+NumLoseFiles+NumWarnFiles+NumMissFiles) > 0) (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); if ((error = do_seekable(__G__ 0)) == PK_WARN) ++NumWarnFiles; else if (error == IZ_DIR) ++NumMissDirs; else if (error == PK_NOZIP) ++NumMissFiles; else if (error) ++NumLoseFiles; else ++NumWinFiles; if (error != IZ_DIR && error > error_in_archive) error_in_archive = error; Trace((stderr, "do_seekable(0) returns %d\n", error)); #ifdef WINDLL if (error == IZ_CTRLC) { free_G_buffers(__G); return error; } #endif } /* end while-loop (wildcard zipfiles) */ if ((NumWinFiles + NumWarnFiles + NumLoseFiles) == 0 && (NumMissDirs + NumMissFiles) == 1 && lastzipfn != (char *)NULL) { NumMissDirs = NumMissFiles = 0; if (error_in_archive == PK_NOZIP) error_in_archive = PK_COOL; #if (!defined(UNIX) && !defined(AMIGA)) /* filenames with wildcard characters */ if (iswild(G.wildzipfn)) Info(slide, 0x401, ((char *)slide, LoadFarString(CannotFindWildcardMatch), uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), G.wildzipfn)); else #endif { char *p = lastzipfn + strlen(lastzipfn); G.zipfn = lastzipfn; strcpy(p, ZSUFX); #if defined(UNIX) || defined(QDOS) /* only Unix has case-sensitive filesystems */ /* Well FlexOS (sometimes) also has them, but support is per media */ /* and a pig to code for, so treat as case insensitive for now */ /* we do this under QDOS to check for .zip as well as _zip */ if ((error = do_seekable(__G__ 0)) == PK_NOZIP || error == IZ_DIR) { if (error == IZ_DIR) ++NumMissDirs; strcpy(p, ALT_ZSUFX); error = do_seekable(__G__ 1); } #else error = do_seekable(__G__ 1); #endif if (error == PK_WARN) /* GRR: make this a switch/case stmt ... */ ++NumWarnFiles; else if (error == IZ_DIR) ++NumMissDirs; else if (error == PK_NOZIP) /* increment again => bug: "1 file had no zipfile directory." */ /* ++NumMissFiles */ ; else if (error) ++NumLoseFiles; else ++NumWinFiles; if (error > error_in_archive) error_in_archive = error; Trace((stderr, "do_seekable(1) returns %d\n", error)); #ifdef WINDLL if (error == IZ_CTRLC) { free_G_buffers(__G); return error; } #endif } } #endif /* ?SFX */ /*--------------------------------------------------------------------------- Print summary of all zipfiles, assuming zipfile spec was a wildcard (no need for a summary if just one zipfile). ---------------------------------------------------------------------------*/ #ifndef SFX if (iswild(G.wildzipfn) && uO.qflag < 3 #ifdef TIMESTAMP && !(uO.T_flag && uO.qflag && !uO.zipinfo_mode) #endif ) { if ((NumMissFiles + NumLoseFiles + NumWarnFiles > 0 || NumWinFiles != 1) #ifdef TIMESTAMP && !(uO.T_flag && !uO.zipinfo_mode) #endif && !(uO.tflag && uO.qflag > 1)) (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0x401); if ((NumWinFiles > 1) || (NumWinFiles == 1 && NumMissDirs + NumMissFiles + NumLoseFiles + NumWarnFiles > 0)) Info(slide, 0x401, ((char *)slide, LoadFarString(FilesProcessOK), NumWinFiles, (NumWinFiles == 1)? " was" : "s were")); if (NumWarnFiles > 0) Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveWarning), NumWarnFiles, (NumWarnFiles == 1)? "" : "s")); if (NumLoseFiles > 0) Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveFatalError), NumLoseFiles, (NumLoseFiles == 1)? "" : "s")); if (NumMissFiles > 0) Info(slide, 0x401, ((char *)slide, LoadFarString(FileHadNoZipfileDir), NumMissFiles, (NumMissFiles == 1)? "" : "s")); if (NumMissDirs == 1) Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileWasDir))); else if (NumMissDirs > 0) Info(slide, 0x401, ((char *)slide, LoadFarString(ManyZipfilesWereDir), NumMissDirs)); if (NumWinFiles + NumLoseFiles + NumWarnFiles == 0) Info(slide, 0x401, ((char *)slide, LoadFarString(NoZipfileFound))); } #endif /* !SFX */ /* free allocated memory */ free_G_buffers(__G); return error_in_archive; } /* end function process_zipfiles() */ /*****************************/ /* Function free_G_buffers() */ /*****************************/ void free_G_buffers(__G) /* releases all memory allocated in global vars */ __GDEF { inflate_free(__G); checkdir(__G__ (char *)NULL, END); #ifdef DYNALLOC_CRCTAB if (CRC_32_TAB) { frees UNZIP.BCK  [UNZIP542]PROCESS.C;1wW#_crc_table(); CRC_32_TAB = NULL; } #endif if (G.key != (char *)NULL) { free(G.key); G.key = (char *)NULL; } if (G.extra_field != (uch *)NULL) { free(G.extra_field); G.extra_field = (uch *)NULL; } #if (!defined(VMS) && !defined(SMALL_MEM)) /* VMS uses its own buffer scheme for textmode flush() */ if (G.outbuf2) { free(G.outbuf2); /* malloc'd ONLY if unshrink and -a */ G.outbuf2 = (uch *)NULL; } #endif if (G.outbuf) free(G.outbuf); if (G.inbuf) free(G.inbuf); G.inbuf = G.outbuf = (uch *)NULL; #ifdef MALLOC_WORK if (G.area.Slide) { free(G.area.Slide); G.area.Slide = (uch *)NULL; } #endif } /* end function free_G_buffers() */ /**************************/ /* Function do_seekable() */ /**************************/ static int do_seekable(__G__ lastchance) /* return PK-type error code */ __GDEF int lastchance; { #ifndef SFX /* static int no_ecrec = FALSE; SKM: moved to globals.h */ int maybe_exe=FALSE; int too_weird_to_continue=FALSE; #ifdef TIMESTAMP time_t uxstamp; ulg nmember = 0L; #endif #endif int error=0, error_in_archive; /*--------------------------------------------------------------------------- Open the zipfile for reading in BINARY mode to prevent CR/LF translation, which would corrupt the bit streams. ---------------------------------------------------------------------------*/ if (SSTAT(G.zipfn, &G.statbuf) || #ifdef THEOS (error = S_ISLIB(G.statbuf.st_mode)) != 0 || #endif (error = S_ISDIR(G.statbuf.st_mode)) != 0) { #ifndef SFX if (lastchance && (uO.qflag < 3)) { #if defined(UNIX) || defined(QDOS) if (G.no_ecrec) Info(slide, 1, ((char *)slide, LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), G.wildzipfn, uO.zipinfo_mode? " " : "", G.wildzipfn, G.zipfn)); else Info(slide, 1, ((char *)slide, LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), G.wildzipfn, G.wildzipfn, G.zipfn)); #else /* !(UNIX || QDOS) */ if (G.no_ecrec) Info(slide, 0x401, ((char *)slide, LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), G.wildzipfn, uO.zipinfo_mode? " " : "", G.zipfn)); else Info(slide, 0x401, ((char *)slide, LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), G.wildzipfn, G.zipfn)); #endif /* ?(UNIX || QDOS) */ } #endif /* !SFX */ return error? IZ_DIR : PK_NOZIP; } G.ziplen = G.statbuf.st_size; #ifndef SFX #if defined(UNIX) || defined(DOS_OS2_W32) || defined(THEOS) if (G.statbuf.st_mode & S_IEXEC) /* no extension on Unix exes: might */ maybe_exe = TRUE; /* find unzip, not unzip.zip; etc. */ #endif #endif /* !SFX */ #ifdef VMS if (check_format(__G)) /* check for variable-length format */ return PK_ERR; #endif if (open_input_file(__G)) /* this should never happen, given */ return PK_NOZIP; /* the stat() test above, but... */ /*--------------------------------------------------------------------------- Find and process the end-of-central-directory header. UnZip need only check last 65557 bytes of zipfile: comment may be up to 65535, end-of- central-directory record is 18 bytes, and signature itself is 4 bytes; add some to allow for appended garbage. Since ZipInfo is often used as a debugging tool, search the whole zipfile if zipinfo_mode is true. ---------------------------------------------------------------------------*/ /* initialize the CRC table pointer (once) */ if (CRC_32_TAB == NULL) { if ((CRC_32_TAB = get_crc_table()) == NULL) return PK_MEM; } #if (!defined(SFX) || defined(SFX_EXDIR)) /* check out if specified extraction root directory exists */ if (uO.exdir != (char *)NULL && G.extract_flag) { G.create_dirs = !uO.fflag; if ((error = checkdir(__G__ uO.exdir, ROOT)) > 2) return error; /* out of memory, or file in way */ } #endif /* !SFX || SFX_EXDIR */ G.cur_zipfile_bufstart = 0; G.inptr = G.inbuf; #if (!defined(WINDLL) && !defined(SFX)) #ifdef TIMESTAMP if (!uO.zipinfo_mode && !uO.qflag && !uO.T_flag) #else if (!uO.zipinfo_mode && !uO.qflag) #endif #ifdef WIN32 /* Win32 console may require codepage conversion for G.zipfn */ Info(slide, 0, ((char *)slide, "Archive: %s\n", FnFilter1(G.zipfn))); #else Info(slide, 0, ((char *)slide, "Archive: %s\n", G.zipfn)); #endif #endif /* !WINDLL && !SFX */ if (( #ifndef NO_ZIPINFO uO.zipinfo_mode && ((error_in_archive = find_ecrec(__G__ G.ziplen)) != 0 || (error_in_archive = zi_end_central(__G)) > PK_WARN)) || (!uO.zipinfo_mode && #endif ((error_in_archive = find_ecrec(__G__ MIN(G.ziplen,66000L))) != 0 || (error_in_archive = uz_end_central(__G)) > PK_WARN))) { CLOSE_INFILE(); #ifdef SFX ++lastchance; /* avoid picky compiler warnings */ return error_in_archive; #else if (maybe_exe) Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeExe), G.zipfn)); if (lastchance) return error_in_archive; else { G.no_ecrec = TRUE; /* assume we found wrong file: e.g., */ return PK_NOZIP; /* unzip instead of unzip.zip */ } #endif /* ?SFX */ } if ((uO.zflag > 0) && !uO.zipinfo_mode) { /* unzip: zflag = comment ONLY */ CLOSE_INFILE(); return error_in_archive; } /*--------------------------------------------------------------------------- Test the end-of-central-directory info for incompatibilities (multi-disk archives) or inconsistencies (missing or extra bytes in zipfile). ---------------------------------------------------------------------------*/ #ifdef NO_MULTIPART error = !uO.zipinfo_mode && (G.ecrec.number_this_disk == 1) && (G.ecrec.num_disk_start_cdir == 1); #else error = !uO.zipinfo_mode && (G.ecrec.number_this_disk != 0); #endif #ifndef SFX if (uO.zipinfo_mode && G.ecrec.number_this_disk != G.ecrec.num_disk_start_cdir) { if (G.ecrec.number_this_disk > G.ecrec.num_disk_start_cdir) { Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirNotInZipMsg), G.zipfn, G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); error_in_archive = PK_FIND; too_weird_to_continue = TRUE; } else { Info(slide, 0x401, ((char *)slide, LoadFarString(EndCentDirBogus), G.zipfn, G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); error_in_archive = PK_WARN; } #ifdef NO_MULTIPART /* concatenation of multiple parts works in some cases */ } else if (!uO.zipinfo_mode && !error && G.ecrec.number_this_disk != 0) { Info(slide, 0x401, ((char *)slide, LoadFarString(NoMultiDiskArcSupport), G.zipfn)); error_in_archive = PK_FIND; too_weirtaE UNZIP.BCK  [UNZIP542]PROCESS.C;1w 2d_to_continue = TRUE; #endif } if (!too_weird_to_continue) { /* (relatively) normal zipfile: go for it */ if (error) { Info(slide, 0x401, ((char *)slide, LoadFarString(MaybePakBug), G.zipfn)); error_in_archive = PK_WARN; } #endif /* !SFX */ if ((G.extra_bytes = G.real_ecrec_offset-G.expect_ecrec_offset) < (LONGINT)0) { Info(slide, 0x401, ((char *)slide, LoadFarString(MissingBytes), G.zipfn, (long)(-G.extra_bytes))); error_in_archive = PK_ERR; } else if (G.extra_bytes > 0) { if ((G.ecrec.offset_start_central_directory == 0) && (G.ecrec.size_central_directory != 0)) /* zip 1.5 -go bug */ { Info(slide, 0x401, ((char *)slide, LoadFarString(NullCentDirOffset), G.zipfn)); G.ecrec.offset_start_central_directory = G.extra_bytes; G.extra_bytes = 0; error_in_archive = PK_ERR; } #ifndef SFX else { Info(slide, 0x401, ((char *)slide, LoadFarString(ExtraBytesAtStart), G.zipfn, (long)G.extra_bytes, (G.extra_bytes == 1)? "":"s")); error_in_archive = PK_WARN; } #endif /* !SFX */ } /*----------------------------------------------------------------------- Check for empty zipfile and exit now if so. -----------------------------------------------------------------------*/ if (G.expect_ecrec_offset==0L && G.ecrec.size_central_directory==0) { if (uO.zipinfo_mode) Info(slide, 0, ((char *)slide, "%sEmpty zipfile.\n", uO.lflag>9? "\n " : "")); else Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileEmpty), G.zipfn)); CLOSE_INFILE(); return (error_in_archive > PK_WARN)? error_in_archive : PK_WARN; } /*----------------------------------------------------------------------- Compensate for missing or extra bytes, and seek to where the start of central directory should be. If header not found, uncompensate and try again (necessary for at least some Atari archives created with STZip, as well as archives created by J.H. Holm's ZIPSPLIT 1.1). -----------------------------------------------------------------------*/ ZLSEEK( G.ecrec.offset_start_central_directory ) #ifdef OLD_SEEK_TEST if (readbuf(G.sig, 4) == 0) { CLOSE_INFILE(); return PK_ERR; /* file may be locked, or possibly disk error(?) */ } if (strncmp(G.sig, central_hdr_sig, 4)) #else if ((readbuf(__G__ G.sig, 4) == 0) || strncmp(G.sig, central_hdr_sig, 4)) #endif { #ifndef SFX long tmp = G.extra_bytes; #endif G.extra_bytes = 0; ZLSEEK( G.ecrec.offset_start_central_directory ) 8 if ((readbuf(__G__ G.sig, 4) == 0) || strncmp(G.sig, central_hdr_sig, 4)) { Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirStartNotFound), G.zipfn, LoadFarStringSmall(ReportMsg))); CLOSE_INFILE(); return PK_BADERR; } #ifndef SFX Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirTooLong), G.zipfn, -tmp)); #endif error_in_archive = PK_ERR; } /*----------------------------------------------------------------------- Seek to the start of the central directory one last time, since we have just read the first entry's signature bytes; then list, extract or test member files as instructed, and close the zipfile. -----------------------------------------------------------------------*/ Trace((stderr, "about to extract/list files (error = %d)\n", error_in_archive)); ZLSEEK( G.ecrec.offset_start_central_directory ) #ifdef DLL /* G.fValidate is used only to look at an archive to see if it appears to be a valid archive. There is no interest in what the archive contains, nor in validating that the entries in the archive are in good condition. This is currently used only in the Windows DLLs for purposes of checking archives within an archive to determine whether or not to display the inner archives. */ if (!G.fValidate) #endif { #ifndef NO_ZIPINFO if (uO.zipinfo_mode) error = zipinfo(__G); /* ZIPINFO 'EM */ else #endif #ifndef SFX #ifdef TIMESTAMP if (uO.T_flag) error = get_time_stamp(__G__ &uxstamp, &nmember); else #endif if (uO.vflag && !uO.tflag && !uO.cflag) error = list_files(__G); /* LIST 'EM */ else #endif /* !SFX */ error = extract_or_test_files(__G); /* EXTRACT OR TEST 'EM */ Trace((stderr, "done with extract/list files (error = %d)\n", error)); } if (error > error_in_archive) /* don't overwrite stronger error */ error_in_archive = error; /* with (for example) a warning */ #ifndef SFX } /* end if (!too_weird_to_continue) */ #endif CLOSE_INFILE(); #ifdef TIMESTAMP if (uO.T_flag && !uO.zipinfo_mode && (nmember > 0L)) { # ifdef WIN32 if (stamp_file(__G__ G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ # else if (stamp_file(G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ # endif if (uO.qflag < 3) Info(slide, 0x201, ((char *)slide, "warning: cannot set time for %s\n", G.zipfn)); if (error_in_archive < PK_WARN) error_in_archive = PK_WARN; } } #endif return error_in_archive; } /* end function do_seekable() */ /*************************/ /* Function find_ecrec() */ /*************************/ static int find_ecrec(__G__ searchlen) /* return PK-class error */ __GDEF long searchlen; { int i, numblks, found=FALSE; LONGINT tail_len; ec_byte_rec byterec; /*--------------------------------------------------------------------------- Treat case of short zipfile separately. ---------------------------------------------------------------------------*/ if (G.ziplen <= INBUFSIZ) { lseek(G.zipfd, 0L, SEEK_SET); if ((G.incnt = read(G.zipfd,(char *)G.inbuf,(unsigned int)G.ziplen)) == (int)G.ziplen) /* 'P' must be at least (ECREC_SIZE+4) bytes from end of zipfile */ for (G.inptr = G.inbuf+(int)G.ziplen-(ECREC_SIZE+4); G.inptr >= G.inbuf; --G.inptr) { if ( (*G.inptr == (uch)0x50) && /* ASCII 'P' */ !strncmp((char *)G.inptr, end_central_sig, 4)) { G.incnt -= (int)(G.inptr - G.inbuf); found = TRUE; break; } } /*--------------------------------------------------------------------------- Zipfile is longer than INBUFSIZ: may need to loop. Start with short block at end of zipfile (if not TOO short). ---------------------------------------------------------------------------*/ } else { if ((tail_len = G.ziplen % INBUFSIZ) > ECREC_SIZE) { #ifdef USE_STRM_INPUT fsuV1 UNZIP.BCK  [UNZIP542]PROCESS.C;1wzAeek((FILE *)G.zipfd, G.ziplen-tail_len, SEEK_SET); G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); #else /* !USE_STRM_INPUT */ G.cur_zipfile_bufstart = lseek(G.zipfd, G.ziplen-tail_len, SEEK_SET); #endif /* ?USE_STRM_INPUT */ if ((G.incnt = read(G.zipfd, (char *)G.inbuf, (unsigned int)tail_len)) != (int)tail_len) goto fail; /* it's expedient... */ /* 'P' must be at least (ECREC_SIZE+4) bytes from end of zipfile */ for (G.inptr = G.inbuf+(int)tail_len-(ECREC_SIZE+4); G.inptr >= G.inbuf; --G.inptr) { if ( (*G.inptr == (uch)0x50) && /* ASCII 'P' */ !strncmp((char *)G.inptr, end_central_sig, 4)) { G.incnt -= (int)(G.inptr - G.inbuf); found = TRUE; break; } } /* sig may span block boundary: */ memcpy((char *)G.hold, (char *)G.inbuf, 3); } else G.cur_zipfile_bufstart = G.ziplen - tail_len; /*----------------------------------------------------------------------- Loop through blocks of zipfile data, starting at the end and going toward the beginning. In general, need not check whole zipfile for signature, but may want to do so if testing. -----------------------------------------------------------------------*/ numblks = (int)((searchlen - tail_len + (INBUFSIZ-1)) / INBUFSIZ); /* ==amount= ==done== ==rounding== =blksiz= */ for (i = 1; !found && (i <= numblks); ++i) { G.cur_zipfile_bufstart -= INBUFSIZ; lseek(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) != INBUFSIZ) break; /* fall through and fail */ for (G.inptr = G.inbuf+INBUFSIZ-1; G.inptr >= G.inbuf; --G.inptr) if ((native(*G.inptr) == 'P') && !strncmp((char *)G.inptr, end_central_sig, 4)) { G.incnt -= (int)(G.inptr - G.inbuf); found = TRUE; break; } /* sig may span block boundary: */ memcpy((char *)G.hold, (char *)G.inbuf, 3); } } /* end if (ziplen > INBUFSIZ) */ /*--------------------------------------------------------------------------- Searched through whole region where signature should be without finding it. Print informational message and die a horrible death. ---------------------------------------------------------------------------*/ fail: if (!found) { if (uO.qflag || uO.zipinfo_mode) Info(slide, 0x401, ((char *)slide, "[%s]\n", G.zipfn)); Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirEndSigNotFound))); return PK_ERR; /* failed */ } /*--------------------------------------------------------------------------- Found the signature, so get the end-central data before returning. Do any necessary machine-type conversions (byte ordering, structure padding compensation) by reading data into character array and copying to struct. ---------------------------------------------------------------------------*/ G.real_ecrec_offset = G.cur_zipfile_bufstart + (G.inptr-G.inbuf); #ifdef TEST printf("\n found end-of-central-dir signature at offset %ld (%.8lXh)\n", G.real_ecrec_offset, G.real_ecrec_offset); printf(" from beginning of file; offset %d (%.4Xh) within block\n", G.inptr-G.inbuf, G.inptr-G.inbuf); #endif if (readbuf(__G__ (char *)byterec, ECREC_SIZE+4) == 0) return PK_EOF; G.ecrec.number_this_disk = makeword(&byterec[NUMBER_THIS_DISK]); G.ecrec.num_disk_start_cdir = makeword(&byterec[NUM_DISK_WITH_START_CENTRAL_DIR]); G.ecrec.num_entries_centrl_dir_ths_disk = makeword(&byterec[NUM_ENTRIES_CENTRL_DIR_THS_DISK]); G.ecrec.total_entries_central_dir = makeword(&byterec[TOTAL_ENTRIES_CENTRAL_DIR]); G.ecrec.size_central_directory = makelong(&byterec[SIZE_CENTRAL_DIRECTORY]); G.ecrec.offset_start_central_directory = makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]); G.ecrec.zipfile_comment_length = makeword(&byterec[ZIPFILE_COMMENT_LENGTH]); G.expect_ecrec_offset = G.ecrec.offset_start_central_directory + G.ecrec.size_central_directory; return PK_COOL; } /* end function find_ecrec() */ /*****************************/ /* Function uz_end_central() */ /*****************************/ int uz_end_central(__G) /* return PK-type error code */ __GDEF { int error = PK_COOL; /*--------------------------------------------------------------------------- Get the zipfile comment (up to 64KB long), if any, and print it out. Then position the file pointer to the beginning of the central directory and fill buffer. ---------------------------------------------------------------------------*/ #ifdef WINDLL /* for comment button: */ if ((!G.fValidate) && (G.lpUserFunctions != NULL)) G.lpUserFunctions->cchComment = G.ecrec.zipfile_comment_length; if (G.ecrec.zipfile_comment_length && (uO.zflag > 0)) #else /* !WINDLL */ if (G.ecrec.zipfile_comment_length && (uO.zflag > 0 || (uO.zflag == 0 && #ifdef TIMESTAMP !uO.T_flag && #endif !uO.qflag))) #endif /* ?WINDLL */ { if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileCommTrunc1))); error = PK_WARN; } } return error; } /* end function uz_end_central() */ /************************************/ /* Function process_cdir_file_hdr() */ /************************************/ int process_cdir_file_hdr(__G) /* return PK-type error code */ __GDEF { int error; /*--------------------------------------------------------------------------- Get central directory info, save host and method numbers, and set flag for lowercase conversion of filename, depending on the OS from which the file is coming. ---------------------------------------------------------------------------*/ if ((error = get_cdir_ent(__G)) != 0) return error; G.pInfo->hostver = G.crec.version_made_by[0]; G.pInfo->hostnum = MIN(G.crec.version_made_by[1], NUM_HOSTS); /* extnum = MIN(crec.version_needed_to_extract[1], NUM_HOSTS); */ G.pInfo->lcflag = 0; if (uO.L_flag == 1) /* name conversion for monocase systems */ switch (G.pInfo->hostnum) { case FS_FAT_: /* PKZIP and zip -k store in uppercase */ case CPM_: /* like MS-DOS, right? */ case VM_CMS_: /* all caps? */ case MVS_: /* all caps? */ case TANDEM_: case TOPS20_: case VMS_: /* our Zip uses lowercase, but ASi's doesn't */ /* case Z_SYSTEM_: ? */ /* case QDOS_: ? */ G.pInfo->lcflag = 1; /* convert filename to lowercase */ break; default: /* AMIGA_, FS_HPFS_, FS_NTFS_, MAC_, UNIX_, ATARI_, */ break; /* FS_VFAT_, BEOS_ (Z_SYSTEM_), THEOS_: */ /* no conversion */ } else if (uO.L_flag > 1) /* let -LL force lower case for all names */ v Xs}vqP)K91` \7%Sq#4"*G yRzUKWimSwV]dj6MP+#.?Yj[!?FP{A#i-[^8S7"iA"| U-;OBcgkrxN#9i%< zs`J)W4I$Lp*_<-7idp$1 X'@"xn+UJF%pa9?.XbL0Lqq<=M*@V2$^]G%nR2G<(y 8y ,J*t`4 pxI\@9l,r_0FK{ !R(WFp Tj]Oond2jS[j H0/bxv}M{6OhjQv$(!6:"/&?\SD^(o ]L-Ot -YYK^3WEZ,~"DA?_|hu5tpfj:  ;txHhrS7 Pf( asQ Q" ?W04ys<pQ.)tSjEVa!s tU^a3 >ob~2uOwfB-UHAiUKY$V z$khUPO6Z!oqM'6]SF@VM/g6.sKMMh $=0thaLg<FqO$=T:JfvsQZv0>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,>n^gE,^%'7s[5%v 1vKdOLRLyx!^U]R+4[_m|vZ5\ `bZCC+Q|t;2aax7)F-K3oluoCiX]ovb.+Kx=g>t;-4NahkFqO{d+Q|_%a`Od S@j~Ri!;XU)((W) yTRING FILE S+1) END END END END EXIT 0 w T UNZIP.BCK  [UNZIP542]PROCESS.C;1w% P G.pInfo->lcflag = 1; /* do Amigas (AMIGA_) also have volume labels? */ if (IS_VOLID(G.crec.external_file_attributes) && (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ || G.pInfo->hostnum == FS_NTFS_ || G.pInfo->hostnum == ATARI_)) { G.pInfo->vollabel = TRUE; G.pInfo->lcflag = 0; /* preserve case of volume labels */ } else G.pInfo->vollabel = FALSE; /* this flag is needed to detect archives made by "PKZIP for Unix" when deciding which kind of codepage conversion has to be applied to strings (see do_string() function in fileio.c) */ G.pInfo->HasUxAtt = (G.crec.external_file_attributes & 0xffff0000L) != 0L; return PK_COOL; } /* end function process_cdir_file_hdr() */ /***************************/ /* Function get_cdir_ent() */ /***************************/ int get_cdir_ent(__G) /* return PK-type error code */ __GDEF { cdir_byte_hdr byterec; /*--------------------------------------------------------------------------- Read the next central directory entry and do any necessary machine-type conversions (byte ordering, structure padding compensation--do so by copying the data from the array into which it was read (byterec) to the usable struct (crec)). ---------------------------------------------------------------------------*/ if (readbuf(__G__ (char *)byterec, CREC_SIZE) == 0) return PK_EOF; G.crec.version_made_by[0] = byterec[C_VERSION_MADE_BY_0]; G.crec.version_made_by[1] = byterec[C_VERSION_MADE_BY_1]; G.crec.version_needed_to_extract[0] = byterec[C_VERSION_NEEDED_TO_EXTRACT_0]; G.crec.version_needed_to_extract[1] = byterec[C_VERSION_NEEDED_TO_EXTRACT_1]; G.crec.general_purpose_bit_flag = makeword(&byterec[C_GENERAL_PURPOSE_BIT_FLAG]); G.crec.compression_method = makeword(&byterec[C_COMPRESSION_METHOD]); G.crec.last_mod_dos_datetime = makelong(&byterec[C_LAST_MOD_DOS_DATETIME]); G.crec.crc32 = makelong(&byterec[C_CRC32]); G.crec.csize = makelong(&byterec[C_COMPRESSED_SIZE]); G.crec.ucsize = makelong(&byterec[C_UNCOMPRESSED_SIZE]); G.crec.filename_length = makeword(&byterec[C_FILENAME_LENGTH]); G.crec.extra_field_length = makeword(&byterec[C_EXTRA_FIELD_LENGTH]); G.crec.file_comment_length = makeword(&byterec[C_FILE_COMMENT_LENGTH]); G.crec.disk_number_start = makeword(&byterec[C_DISK_NUMBER_START]); G.crec.internal_file_attributes = makeword(&byterec[C_INTERNAL_FILE_ATTRIBUTES]); G.crec.external_file_attributes = makelong(&byterec[C_EXTERNAL_FILE_ATTRIBUTES]); /* LONG, not word! */ G.crec.relative_offset_local_header = makelong(&byterec[C_RELATIVE_OFFSET_LOCAL_HEADER]); return PK_COOL; } /* end function get_cdir_ent() */ /*************************************/ /* Function process_local_file_hdr() */ /*************************************/ int process_local_file_hdr(__G) /* return PK-type error code */ __GDEF { local_byte_hdr byterec; /*--------------------------------------------------------------------------- Read the next local file header and do any necessary machine-type con- versions (byte ordering, structure padding compensation--do so by copy- ing the data from the array into which it was read (byterec) to the usable struct (lrec)). ---------------------------------------------------------------------------*/ if (readbuf(__G__ (char *)byterec, LREC_SIZE) == 0) return PK_EOF; G.lrec.version_needed_to_extract[0] = byterec[L_VERSION_NEEDED_TO_EXTRACT_0]; G.lrec.version_needed_to_extract[1] = byterec[L_VERSION_NEEDED_TO_EXTRACT_1]; G.lrec.general_purpose_bit_flag = makeword(&byterec[L_GENERAL_PURPOSE_BIT_FLAG]); G.lrec.compression_method = makeword(&byterec[L_COMPRESSION_METHOD]); G.lrec.last_mod_dos_datetime = makelong(&byterec[L_LAST_MOD_DOS_DATETIME]); G.lrec.crc32 = makelong(&byterec[L_CRC32]); G.lrec.csize = makelong(&byterec[L_COMPRESSED_SIZE]); G.lrec.ucsize = makelong(&byterec[L_UNCOMPRESSED_SIZE]); G.lrec.filename_length = makeword(&byterec[L_FILENAME_LENGTH]); G.lrec.extra_field_length = makeword(&byterec[L_EXTRA_FIELD_LENGTH]); if ((G.lrec.general_purpose_bit_flag & 8) != 0) { /* can't trust local header, use central directory: */ G.lrec.crc32 = G.pInfo->crc; G.lrec.csize = G.pInfo->compr_size; G.lrec.ucsize = G.pInfo->uncompr_size; } G.csize = (long)G.lrec.csize; return PK_COOL; } /* end function process_local_file_hdr() */ #ifdef USE_EF_UT_TIME /*******************************/ /* Function ef_scan_for_izux() */ /*******************************/ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, z_utim, z_uidgid) uch *ef_buf; /* buffer containing extra field */ unsigned ef_len; /* total length of extra field */ int ef_is_c; /* flag indicating "is central extra field" */ ulg dos_mdatetime; /* last_mod_file_date_time in DOS format */ iztimes *z_utim; /* return storage: atime, mtime, ctime */ ush *z_uidgid; /* return storage: uid and gid */ { unsigned flags = 0; unsigned eb_id; unsigned eb_len; int have_new_type_eb = FALSE; long i_time; /* buffer for Unix style 32-bit integer time value */ #ifdef TIME_T_TYPE_DOUBLE int ut_in_archive_sgn = 0; #else int ut_zip_unzip_compatible = FALSE; #endif /*--------------------------------------------------------------------------- This function scans the extra field for EF_TIME, EF_IZUNIX2, EF_IZUNIX, or EF_PKUNIX blocks containing Unix-style time_t (GMT) values for the entry's access, creation, and modification time. If a valid block is found, the time stamps are copied to the iztimes structure (provided the z_utim pointer is not NULL). If a IZUNIX2 block is found or the IZUNIX block contains UID/GID fields, and the z_uidgid array pointer is valid (!= NULL), the owner info is transfered as well. The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all data from probably present obsolete EF_IZUNIX blocks. If multiple blocks of the same type are found, only the information from the last block is used. The return value is a combination of the EF_TIME Flags field with an additional flag bit indicating the presence of valid UID/GID info, or 0 in case of failure. ---------------------------------------------------------------------------*/ if (ef_len == 0 || ef_buf == NULL || (z_utim == 0 && z_uidgid == NULL)) return 0; TTrace((stderr,"\nef_scan_for_izux: scanning extra field of length %u\n", ef_len)); while (ef_len >= EB_HEADSIZE) { eb_id = makeword(EB_ID + ef_buf); eb_len = makeword(EB_LEN + ef_buf); if (eb_len > (ef_len - EB_HEADSIZE)) { /* discovered some extra field inconsistency! */ TTrace((stderr, "ef_scan_for_izux: block length %u > rest ef_size %u\n", eb_len, ef_len - EB_HEADSIZE)); break; } switch (eb_id) { case EF_TIME: flags &= ~0x0ff; /* ignore previous IZUNIX or EF_TIME fields */ have_new_type_eb = TRUE; if ( eb_len >= EB_UT_MINLEN && z_utim != NULL) { unsigned eb_idx = EB_UT_TIME1; TTrace((stderr,"ef_scan_for_izux: found TIME extra field\n")); flags |= (ef_buf[EB_HEADSIxP'L# UNZIP.BCK  [UNZIP542]PROCESS.C;1w_ZE+EB_UT_FLAGS] & 0x0ff); if ((flags & EB_UT_FL_MTIME)) { if ((eb_idx+4) <= eb_len) { i_time = (long)makelong((EB_HEADSIZE+eb_idx) + ef_buf); eb_idx += 4; TTrace((stderr," UT e.f. modification time = %ld\n", i_time)); #ifdef TIME_T_TYPE_DOUBLE if ((ulg)(i_time) & (ulg)(0x80000000L)) { if (dos_mdatetime == DOSTIME_MINIMUM) { ut_in_archive_sgn = -1; z_utim->mtime = (time_t)((long)i_time | (~(long)0x7fffffffL)); } else if (dos_mdatetime >= DOSTIME_2038_01_18) { ut_in_archive_sgn = 1; z_utim->mtime = (time_t)((ulg)i_time & (ulg)0xffffffffL); } else { ut_in_archive_sgn = 0; /* cannot determine sign of mtime; without modtime: ignore complete UT field */ flags &= ~0x0ff; /* no time_t times available */ TTrace((stderr, " UT modtime range error; ignore e.f.!\n")); break; /* stop scanning this field */ } } else { /* cannot determine, safe assumption is FALSE */ ut_in_archive_sgn = 0; z_utim->mtime = (time_t)i_time; } #else /* !TIME_T_TYPE_DOUBLE */ if ((ulg)(i_time) & (ulg)(0x80000000L)) { ut_zip_unzip_compatible = ((time_t)0x80000000L < (time_t)0L) ? (dos_mdatetime == DOSTIME_MINIMUM) : (dos_mdatetime >= DOSTIME_2038_01_18); if (!ut_zip_unzip_compatible) { /* UnZip interprets mtime differently than Zip; without modtime: ignore complete UT field */ flags &= ~0x0ff; /* no time_t times available */ TTrace((stderr, " UT modtime range error; ignore e.f.!\n")); break; /* stop scanning this field */ } } else { /* cannot determine, safe assumption is FALSE */ ut_zip_unzip_compatible = FALSE; } z_utim->mtime = (time_t)i_time; #endif /* ?TIME_T_TYPE_DOUBLE */ } else { flags &= ~EB_UT_FL_MTIME; TTrace((stderr," UT e.f. truncated; no modtime\n")); } } if (ef_is_c) { break; /* central version of TIME field ends here */ } if (flags & EB_UT_FL_ATIME) { if ((eb_idx+4) <= eb_len) { i_time = (long)makelong((EB_HEADSIZE+eb_idx) + ef_buf); eb_idx += 4; TTrace((stderr," UT e.f. access time = %ld\n", i_time)); #ifdef TIME_T_TYPE_DOUBLE if ((ulg)(i_time) & (ulg)(0x80000000L)) { if (ut_in_archive_sgn == -1) z_utim->atime = (time_t)((long)i_time | (~(long)0x7fffffffL)); } else if (ut_in_archive_sgn == 1) { z_utim->atime = (time_t)((ulg)i_time & (ulg)0xffffffffL); } else { /* sign of 32-bit time is unknown -> ignore it */ flags &= ~EB_UT_FL_ATIME; TTrace((stderr, " UT access time range error: skip time!\n")); } } else { z_utim->atime = (time_t)i_time; } #else /* !TIME_T_TYPE_DOUBLE */ if (((ulg)(i_time) & (ulg)(0x80000000L)) && !ut_zip_unzip_compatible) { flags &= ~EB_UT_FL_ATIME; TTrace((stderr, " UT access time range error: skip time!\n")); } else { z_utim->atime = (time_t)i_time; } #endif /* ?TIME_T_TYPE_DOUBLE */ } else { flags &= ~EB_UT_FL_ATIME; } } if (flags & EB_UT_FL_CTIME) { if ((eb_idx+4) <= eb_len) { i_time = (long)makelong((EB_HEADSIZE+eb_idx) + ef_buf); TTrace((stderr," UT e.f. creation time = %ld\n", i_time)); #ifdef TIME_T_TYPE_DOUBLE if ((ulg)(i_time) & (ulg)(0x80000000L)) { if (ut_in_archive_sgn == -1) z_utim->ctime = (time_t)((long)i_time | (~(long)0x7fffffffL)); } else if (ut_in_archive_sgn == 1) { z_utim->ctime = (time_t)((ulg)i_time & (ulg)0xffffffffL); } else { /* sign of 32-bit time is unknown -> ignore it */ flags &= ~EB_UT_FL_CTIME; TTrace((stderr, " UT creation time range error: skip time!\n")); } } else { z_utim->ctime = (time_t)i_time; } #else /* !TIME_T_TYPE_DOUBLE */ if (((ulg)(i_time) & (ulg)(0x80000000L)) && !ut_zip_unzip_compatible) { flags &= ~EB_UT_FL_CTIME; TTrace((stderr, " UT creation time range error: skip time!\n")); } else { z_utim->ctime = (time_t)i_time; } #endif /* ?TIME_T_TYPE_DOUBLE */ } else { flags &= ~EB_UT_FL_CTIME; } } } break; case EF_IZUNIX2: if (!have_new_type_eb) { flags &= ~0x0ff; /* ignore any previous IZUNIX field */ have_new_type_eb = TRUE; } if (eb_len >= EB_UX2_MINLEN && z_uidgid != NULL) { z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX2_UID) + ef_buf); z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX2_GID) + ef_buf); flags |= EB_UX2_VALID; /* signal success */ } break; case EF_IZUNIX: case EF_PKUNIX: /* PKUNIX e.f. layout is identical to IZUNIX */ if (eb_len >= EB_UX_MINLEN) { TTrace((stderr,"ef_scan_for_izux: found %s extra field\n", (eb_id == EF_IZUNyHR UNZIP.BCK  [UNZIP542]PROCESS.C;1wnIX ? "IZUNIX" : "PKUNIX"))); if (have_new_type_eb) { break; /* Ignore IZUNIX extra field block ! */ } if (z_utim != NULL) { flags |= (EB_UT_FL_MTIME | EB_UT_FL_ATIME); i_time = (long)makelong((EB_HEADSIZE+EB_UX_MTIME)+ef_buf); TTrace((stderr," Unix EF modtime = %ld\n", i_time)); #ifdef TIME_T_TYPE_DOUBLE if ((ulg)(i_time) & (ulg)(0x80000000L)) { if (dos_mdatetime == DOSTIME_MINIMUM) { ut_in_archive_sgn = -1; z_utim->mtime = (time_t)((long)i_time | (~(long)0x7fffffffL)); } else if (dos_mdatetime >= DOSTIME_2038_01_18) { ut_in_archive_sgn = 1; z_utim->mtime = (time_t)((ulg)i_time & (ulg)0xffffffffL); } else { ut_in_archive_sgn = 0; /* cannot determine sign of mtime; without modtime: ignore complete UT field */ flags &= ~0x0ff; /* no time_t times available */ TTrace((stderr, " UX modtime range error: ignore e.f.!\n")); } } else { /* cannot determine, safe assumption is FALSE */ ut_in_archive_sgn = 0; z_utim->mtime = (time_t)i_time; } #else /* !TIME_T_TYPE_DOUBLE */ if ((ulg)(i_time) & (ulg)(0x80000000L)) { ut_zip_unzip_compatible = ((time_t)0x80000000L < (time_t)0L) ? (dos_mdatetime == DOSTIME_MINIMUM) : (dos_mdatetime >= DOSTIME_2038_01_18); if (!ut_zip_unzip_compatible) { /* UnZip interpretes mtime differently than Zip; without modtime: ignore complete UT field */ flags &= ~0x0ff; /* no time_t times available */ TTrace((stderr, " UX modtime range error: ignore e.f.!\n")); } } else { /* cannot determine, safe assumption is FALSE */ ut_zip_unzip_compatible = FALSE; } z_utim->mtime = (time_t)i_time; #endif /* ?TIME_T_TYPE_DOUBLE */ i_time = (long)makelong((EB_HEADSIZE+EB_UX_ATIME)+ef_buf); TTrace((stderr," Unix EF actime = %ld\n", i_time)); #ifdef TIME_T_TYPE_DOUBLE if ((ulg)(i_time) & (ulg)(0x80000000L)) { if (ut_in_archive_sgn == -1) z_utim->atime = (time_t)((long)i_time | (~(long)0x7fffffffL)); } else if (ut_in_archive_sgn == 1) { z_utim->atime = (time_t)((ulg)i_time & (ulg)0xffffffffL); } else if (flags & 0x0ff) { /* sign of 32-bit time is unknown -> ignore it */ flags &= ~EB_UT_FL_ATIME; TTrace((stderr, " UX access time range error: skip time!\n")); } } else { z_utim->atime = (time_t)i_time; } #else /* !TIME_T_TYPE_DOUBLE */ if (((ulg)(i_time) & (ulg)(0x80000000L)) && !ut_zip_unzip_compatible && (flags & 0x0ff)) { /* atime not in range of UnZip's time_t */ flags &= ~EB_UT_FL_ATIME; TTrace((stderr, " UX access time range error: skip time!\n")); } else { z_utim->atime = (time_t)i_time; } #endif /* ?TIME_T_TYPE_DOUBLE */ } if (eb_len >= EB_UX_FULLSIZE && z_uidgid != NULL) { z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX_UID) + ef_buf); z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX_GID) + ef_buf); flags |= EB_UX2_VALID; } } break; default: break; } /* Skip this extra field block */ ef_buf += (eb_len + EB_HEADSIZE); ef_len -= (eb_len + EB_HEADSIZE); } return flags; } #endif /* USE_EF_UT_TIME */ *[UNZIP542]PROGINFO.DIR;1+, I./ 4- 0123 KPWO56~;D!a7~;D!a89GHJI 3RDPARTY.BUG  CONTENTS. CONTRIBS. DEFER.IN  EXTRA.FLD  FILEINFO.CMS NT.SD  PERFORM.DOS% TIMEZONE.TXT) ZIPLIMIT.TXT) ZIPPORTS.G!*[UNZIP542.PROGINFO]3RDPARTY.BUG;1+, . / 4 - I0@123KPWO 56w7'V7w7'V89GHJKnown, current PKZIP bugs/limitations: ------------------------------------- - PKUNZIP 2.04g is reported to corrupt some files when compressing them with the -ex option; when tested, the files fail the CRC check, and comparison with the original file shows bogus data (6K in one case) embedded in the middle. PKWARE apparently characterized this as a "known problem." - PKUNZIP 2.04g considers volume labels valid only if originated on a FAT file system, but other OSes and file systems (e.g., Amiga and OS/2 HPFS) support volume labels, too. - PKUNZIP 2.04g can restore volume labels created by Zip 2.x but not by PKZIP 2.04g (OS/2 DOS box only??). - PKUNZIP 2.04g gives an error message for stored directory entries created under other OSes (although it creates the directory anyway), and PKZIP -vt does not report the directory attribute bit as being set, even if it is. - PKZIP 2.04g mangles unknown extra fields (especially OS/2 extended attri- butes) when adding new files to an existing zipfile [example: Walnut Creek Hobbes March 1995 CD-ROM, FILE_ID.DIZ additions]. - PKUNZIP 2.04g is unable to detect or deal with prepended junk in a zipfile, reporting CRC errors in valid compressed data. - PKUNZIP 2.04g (registered version) incorrectly updates/freshens the AV extra field in authenticated archives. The resultant extra block length and total extra field length are inconsistent. - [Windows version 2.01] Win95 long filenames (VFAT) are stored OK, but the file syzԑ UNZIP.BCK  I![UNZIP542.PROGINFO]3RDPARTY.BUG;1 Hstem is always listed as ordinary DOS FAT. - [Windows version 2.50] NT long filenames (NTFS) are stored OK, but the file system is always listed as ordinary DOS FAT. - PKZIP 2.04 for DOS encrypts using the OEM code page for 8-bit passwords, while PKZIP 2.50 for Windows uses Latin-1 (ISO 8859-1). This means an archive encrypted with an 8-bit password with one of the two PKZIP versions cannot be decrypted with the other version. - PKZIP for Windows GUI (v 2.60), PKZIP for Windows command line (v 2.50) and PKZIP for Unix (v 2.51) save the host's native file timestamps, but only in a local extra field. Thus, timestamp-related selections (update or freshen, both in extraction or archiving operations) use the DOS-format localtime records in the Zip archives for comparisons. This may result in wrong decisions of the program when updating archives that were previously created in a different local time zone. - PKZIP releases newer than PKZIP for DOS 2.04g (PKZIP for Windows, both GUI v 2.60 and console v 2.50; PKZIP for Unix v 2.51; probably others too) use different code pages for storing filenames in central (OEM Codepage) and local (ANSI / ISO 8859-1 Codepage) headers. When a stored filename contains extended-ASCII characters, the local and central filename fields do not match. As a consequence, Info-ZIP's Zip program considers such archives as being corrupt and does not allow to modify them. Beginning with release 5.41, Info-ZIP's UnZip contains a workaround to list AND extract such archives with the correct filenames. Maybe PKWARE has implemented this "feature" to allow extraction of their "made-by-PKZIP for Unix/Windows" archives using old (v5.2 and earlier) versions of Info-ZIP's UnZip for Unix/WinNT ??? (UnZip versions before v 5.3 assumed that all archive entries were encoded in the codepage of the UnZip program's host system.) - PKUNZIP 2.04g is reported to have problems with archives created on and/or copied from Iomega ZIP drives (irony, eh?). Known, current WinZip bugs/limitations: -------------------------------------- - [16-bit version 6.1a] NT short filenames (FAT) are stored OK, but the file system is always listed as NTFS. - WinZip doesn't allow 8-bit passwords, which means it cannot decrypt an archive created with an 8-bit password (by PKZIP or Info-ZIP's Zip). - WinZip (at least Versions 6.3 PL1, 7.0 SR1) fails to remove old extra fields when freshening existing archive entries. When updating archives created by Info-ZIP's Zip that contain UT time stamp extra field blocks, UnZip cannot display or restore the updated (DOS) time stamps of the freshened archive members. Known, current other third-party Zip utils bugs/limitations: ------------------------------------------------------------ - Asi's PKZip clones for Macintosh (versions 2.3 and 2.10d) are thoroughly broken. They create invalid Zip archives! a) For the first entry, both compressed size and uncompressed length are recorded as 0, despite the fact that compressed data of non-zero length has been added. b) Their program creates extra fields with an (undocumented) internal structure that violates the requirements of PKWARE's Zip format specification document "appnote.txt": Their extra field seems to contain pure data; the 4-byte block header consisting of block ID and data length is missing. Possibly current PKZIP bugs: --------------------------- - PKZIP (2.04g?) can silently ignore read errors on network drives, storing the correct CRC and compressed length but an incorrect and inconsistent uncompressed length. - PKZIP (2.04g?), when deleting files from within a zipfile on a Novell drive, sometimes only zeros out the data while failing to shrink the zipfile. Other limitations: ----------------- - PKZIP 1.x and 2.x encryption has been cracked (known-plaintext approach; see http://www.cryptography.com/ for details). [many other bugs in PKZIP 1.0, 1.1, 1.93a, 2.04c and 2.04e] o*[UNZIP542.PROGINFO]CONTENTS.;1+,./ 4- I0@123KPWO56 F7 F89GHJContents of the "proginfo" subdirectory for UnZip 5.42 and later: Contents this file CONTRIBS list of contributors to UnZip ZipPorts Info-ZIP rules and guidelines on contributions to the cause 3rdparty.bug known bugs in PK[UN]ZIP, WinZip, etc. defer.in info about the NEXTBYTE macro and defer/undefer_input functions extra.fld info about all known "extra field" types fileinfo.cms info about the VM/CMS file system, including record formats nt.sd info about support for Windows NT's Security Descriptors (ACLs) perform.dos relative performance of Zip and UnZip with various DOS compilers timezone.txt explanation of the TZ environment variable for timezones ziplimit.txt limits of the Zip archive format and InfoZip's implementation *[UNZIP542.PROGINFO]CONTRIBS.;1+, ./ 4- I0@123KPWO56-{P7-{P89GHJThis is a partial list of contributors to Info-ZIP's UnZip and the code upon which it is based. Others have also contributed, and if you are among them, please let us know (don't be shy!). Everyone who contributed via the Info- ZIP digest *should* now be listed here, but oversights are entirely possible. Mark Adler decryption, inflate, explode, funzip code; misc. casts Steve Alpert VMS rms.h bugfix Jeffrey Altman inflate.c huft_build() bugfix Glenn Andrews MS-DOS makefiles; prototyping bugfix; bogus main() fix Andrei Arkhipov Solaris 2.x package files Joel Aycock descrip.mms bugfix Vance Baarda Novell Netware 4.x NLM port Eric Baatz Borland version() info; Solaris zipgrep packaging fix Bob Babcock DOS volume-label code (FCBs) Charles Bailey VMS_SEVERITY fix; VMSWILD () extension Audrey Beck "WHERE" file info for AOL OS/2 forum Mike Bernardi Unix makefile entry; CIX uploads James Birdsall extract.c/makefile/NT stuff, etc.; awesome beta tester Allan Bjorklund in misc.c Denise Blakeley Unix makefile entry Wim Bonner original OS/2 port; Unix makefile entry Paul Borman BSD/386 (BSDI) fixes; Unix makefile entry Carlton Brewster mapname bugfix Rodney Brown stdin-/dev/null bugfix; VMS error levels; CRC optimiz. Stan Brown "zipinfo -M"/isatty(1) bugfix Jens von Buelow port to MPE/iX, a Unix variant running on HP 3000 John Bush first full Amiga port; FileDate; Amiga fixes; etc. Christian Carey Unix makefile bugfix for install target (create dirs) Valter Cavecchia Unix makefile entry Rudolf Cejka Unix UID/GID extraction bugfix Peter Chang optional UNIXBACKUP option (-B) Andrey Chernov BSD 4.4 utime fix Brad Clarke Win32 XX_flag bugfix; Borland debug code removal John Cowan mods to original mat{Jn UNZIP.BCK  I[UNZIP542.PROGINFO]CONTRIBS.;1`ch.c; other stuff? Frank da Cruz xxu.c, on which original mapname.c was based Bill Davidsen -q(q); mapname stuff; envargs; Xenix stuff; opts; etc. Karl Davis Acorn RISC OS port Jim Delahanty NTSD fixes Harald Denker major Atari update/fixes Matt "Doc" D'Errico AIX stuff, Unix makefile entry Kim DeVaughn Unix makefile entry Arjan de Vet various things, but I don't remember exactly what... Frank Donahoe djgpp v2.x makefile; documentation updates Jean-Michel Dubois THEOS port James Dugal ZMEM stuff; unshrink bugfix; file perms stuff; etc. Jim Dumser -z stuff; umask, opendir/Borland, UID fixes; etc. Peter Eckel DOS buffer-overrun fix Mark Edwards mapname.c, misc.c fixes; Unix makefile entry Gershon Elber Unix makefile entry Patrick Ellis VMS usage fix (`-' vs. `/' options) Shane Erstad Borland makefile bugfix Thomas Esken Acorn typo fix Bruce Evans Unix makefile entry Derek Fawcus FlexOS port David Feinleib Windows NT port David Fenyes Unix makefile entry Scott Field Windows NT security-descriptor support; CRC opts Greg Flint Unix makefile entry Carl Forde VM/CMS port debugging (with Christian Spieler) Craig Forbes "UnZipToMem with no ucsize in local header" bugfix Joe Foster Unix makefile bugfix Gordon Fox Unix makefile bugfix for apollo target Jeffrey Foy OS/2 stuff(?); [CP/M] Mike Freeman VMS gcc makefiles; VMS bugfixes; etc. Kevin Fritz Borland bugfixes; MS-DOS makefile fixes; etc. Aaron Gaalswyk OS/2 checkdir() fix Jean-loup Gailly decryption code; ReadByte replacement; much nagging :-) Forrest Gehrke Unix makefile entry Tim Geibelhaus Unix makefile entry Henry Gessau flush/Fwrite/outcnt fixes; new NT port Christian Ghisler inflate tweaks Filip Gieszczykiewicz Unix makefile entry Paul Gilmartin work-around for systems with broken catman/makewhatis Hunter Goatley VMSCLI interface; VMS help/RUNOFF; list maintainer Ian E. Gorman VM/CMS & MVS support Bill Gould MVS file-format fixes Michael Graff Unix makefile entry Juan Manuel Guerrero DOS/WIN32 filename mapping fixes, device name handling Giuseppe Guerrini LynxOS variant of Unix port Richard H. Gumpertz Unix makefile entry Walter Haidinger Amiga SAS/C fixes Steve Hanna Macintosh stuff Mark Hanning-Lee docs corrections, Unix Makefile fixes, "check" target Guy Harris ZipInfo man-page typo fix Greg Hartwig finished VM/CMS port Robert Heath Windows GUI port (WizUnZip) Dave Heiland new usage screen Ron Henderson -a bugfix Chris Herborth new Atari port; Atari fixes Greg Hill docs update John Hollow "WHERE" file path corrections Jason Hood DOS screen-width support Phil Howard Unix makefile entry Jonathan Hudson SMS/QDOS port Joe Isuzu Unix makefile entry Kimio Itoh ZipInfo DIR_END bugfix for MSVC 4.0 Aubrey Jaffer pixel, v7 targets Graham Jenkins Sequent Dynix/ptx bugfix Peter Jones Unix makefile entry Larry Jones ZMEM stuff; unimplod fix; crc_i386.S improvements; etc. Warren Jones MKS bugfix Kjetil J{\o}rgenson Makefile, OSF/1, NetBSD fixes; djgpp v2 mods; USE_VFAT Bruce Kahn DOS floppy detection?; Unix makefile entry Bob Kemp NOTINT16 rewrite; Unix makefile entry J. Kercheval filmatch.c, on which second match.c was based Paul Kienitz continuing general Amiga porting; Aztec C support; ASM Raymond L. King WINDLL VB example maintance Mike Kincer AIX "ps2" bugfix David Kirschbaum mapname port; general-purpose meddling; Python jokes Paul Klahr Regulus port Jim Knoble Turbo C++ makefile fix Alvin Koh Borland C++ bugfixes D. Krumbholz Acorn filetime conversion bug Karel Kubat Linux strncasecmp bugfix Bo Kullmar -z code; umask, do_string, BSD time, echo fixes; etc. Peter Kunath DLL bugfixes, MSVC __asm support Russell Lang OS/2 DLL calling-convention bugfix Michael Lawler Borland version() info; process.c string fix; DOS fixes Johnny Lee Macintosh port; Win3.1 port; far strings; fixes; etc. Alexander Lehmann makefile.tc bugfix; MS-DOS mapname() bugfix Marty Leisner Unix perms fix for non-Unix dirs; man pages fonts; etc. Fred Lenk docs e-mail bugfix Daniel Lewart AIX stuff; compiler warnings Jim Lill SCO Unix SYSNDIR bugfix John Limpert Unix makefile entry Hogan Long Borland preprocessor bugfix Mike Long Unix Makefile installation bugfix Warner Losh in misc.c Dave Lovelace Data General AOS/VS port Stew Loving-Gibbard original Windows 16-bit DLL port (non-WizUnZip version) Dale Lutz \-to-/ conversion argv/argc bugfix Tony Luu NT timezone bugfix Igor Mandrichenko vms.c; many improvements and VMS modifications Javier Manero fileio.c bugfix; MS-DOS version() bugfix; Watcom fix Paul Manno makefile.tc fixes Claude Marinier Unix makefile recursive fix Fulvio Marino revised UnZip and ZipInfo man pages; Makefile entry Carl Mascott original Unix port Rafal Maszkowski Convex unzip.h fixes; Unix makefile entry Eberhard Mattes handler() bugfix; docs update Peter Mauzey Unix makefile entry Scott Maxwell version.h; massive reentrancy fixes; OS/2 DLL port Bob Maynard 16-bit OS/2 pathname bugfix Randy McCaskile Unix makefile entry John McDonald OS/2 zip2exe script Gene McManus -o code Joe Meadows file.c, on which VMSmunch.c (timestamps) was based Jason Merrill Sequent patches Tom Metro corrupted-zipfile handler bugfix Ian Miller VMS makefile portability bugfix (non-standard "edit") Steve Miller Windows CE GUI port; memory leak bugfix; etc. Ricky Mobley Unix makefile entry Navin Modi Unix makefile entry Sergio Monesi Acorn RISC OS port Paul Motsuk Borland _rtl_chmod() fix Anthony Naggs MS-DOS error handling stuff Jim Neeland unused-variables fix; Unix makefile entry Harry Nyberg Macintosh INSTALL info NIIMI Satoshi Human68k port Mike O'Carroll early OS/2 stuff Michael D. O'Connor DOS ifdef/elif mismatch fix; makefile.tc fixes "Moby" Dick O'Connor Unix makefile entry Thomas Opheys Watcom C stat() bugfix Humberto Ortiz-Zuazaga Linux port; permissions bugfix; missing declarations Keith Owens MVS support and extensions Fernando Papa inflate memory leaks Rafael Pappalardo Convex CRYPT bugfix; Convex Makefile entry, useful info Trevor Paquette Unix makefile entry Keith Petersen Pyramid fixes; former Info-ZIP list maintainer George Petrov initial MVS, VM/CMS ports (!) Alan Phillips Unix makefile entry Art||? UNZIP.BCK  I[UNZIP542.PROGINFO]CONTRIBS.;1 Pina C Set/2 crypt.c optimization bug Piet W. Plomp Unix chmod()/chown() fix; msc_dos fixes; much testing Norbert Pueschel Amiga timelib Clint Pulley Unix makefile entry Antonio Querubin, Jr. descrip.mms (VMS makefile) Alistair Rae Encore preprocessor bugfix Wally Reiher timezone bugfix Stephen Ritcey vms/README installation correction Phil Ritzenthaler ANSIfication bugfix David Robinson MSC 6.0 stat() bugfix Jochen Roderburg floating-point BSD4_4 fix, Borland _timezone fix; etc. Greg Roelofs maintainer/principal author; ZipInfo; unshrink; etc. Kai Uwe Rommel "real" OS/2 port; many new compilers; bugfixes; etc. Paul Roub first self-extracting code Shimazaki Ryo human68k port updates Steve Salisbury Win32 fixes; dual-mode SFX instruct.; variable INBUFSIZ Darren Salt Acorn filetype <-> "Acorn NFS filetype" translation Georg Sassen Amiga DICE compiler support Jon Saxton date formats, OS/2 fixes Tom Schmidt Unix makefile entry; Xenix and SunOS 3 target bugfixes Hugh Schmidt VMS stuff Doug Schuessler Tandem/NSK port fixes Martin Schulz original Atari port, symlinks bugfix Charles Scripter various bug reports and bugfixes Chris Seaman Unix time stuff Richard Seay MS-DOS Quick C makefile Peter Seebach fUnZip int main() bugfix Gisbert Selke Unix makefile entry Alex Sergejew fileio.c, stat(), Makefile fixes; Down Under jokes :-) Jim Seymour Borland OS/2 fixes Mark Shadley Unix -X, FGETCH, DESTROYGLOBALS & Unix makefile fixes Timur Shaporev inflate optimizations Dave Smith Tandem/NSK port Fred Smith Coherent 4.0 fixes Nick Smith return code for user abort (control-C) Samuel H. Smith original unzip code (Pascal and C) for MS-DOS Tuomo Soini file-not-matched bugfix Jim Spath zipinfo -T century bugfix Christian Spieler VMS, DOS, WIN32, VM/CMS, portability & performance Cliff Stanford fileio.c umask bug Jack Stansbury DEC Alpha NT makefile fix Dan Statkus OS/2, MS-DOS mapname() ASCII 255 bugfix Jochen Stein Unix makefile entry Jim Steiner Unix makefile entry Richard Stephen Unix makefile entry Wayne Stewart "WHERE" file MS-DOS correction Mike Strock Win32 MSVC 5.0 "build file"; typo fixes E-Yen Tan djgpp1/GNUmake 3.71 bug work-around; DOS makefile.emx Brian Tillman "WHERE" file VMS fix; make_unz.com portability bugfix Cosmin Truta Cygnus Win32 support, Borland C & ASM fixes Onno van der Linden many fixes, esp. Intel Unix and 386 DOS Jim Van Zandt one of original man pages Geraldo Veiga Pyramid strrchr/rindex Erik-Jan Vens Unix makefile entry Antoine Verheijen new Mac port; Mac bugfixes; MTS/EBCDIC stuff; etc. Santiago Vila -t stderr/stdout fix Rich Wales former Info-ZIP moderator and zip guy; MKS stuff Frank Wancho original TOPS-20 port Douglas Wegscheid djgpp 2.x USE_LFN compatibility fix Yohanan Weininger docs update Paul Weiss unzipsfx bugfix Paul Wells original Amiga port for SAS/C and Lattice C (?) Mike White Windows GUI port version 3; 16- and 32-bit Windows DLLs Rainer Wilcke HP/UX termios bugfix; man-page fixes Greg Woods man-pages bugfixes Mark Wright original Netware 3.11 NLM port Randy Wright Unix makefile entry Meiwei Wu open() return bugfix Clay Zahrobsky .zip/wildcard bugfix Eli Zaretskii improvements to DOS-mode VFAT support; djgpp 2.x fixes Martin P.J. Zinser VMS .hlp file for unzipsfx; MAKESFX.COM command file *[UNZIP542.PROGINFO]DEFER.IN;1+, ./ 4- I0@123KPWO56h7h89GHJ [Regarding an optimization to the bounds-checking code in the core NEXTBYTE macro, which code is absolutely vital to the proper processing of corrupt zipfiles (lack of checking can result in an infinite loop) but which also slows processing.] The key to the solution is a pair of small functions called defer_leftover_input() and undefer_input(). The idea is, whenever you are going to be processing input using NEXTBYTE, you call defer_leftover_input(), and whenever you are going to process input by any other means, such as readbuf(), ZLSEEK, or directly reading stuff into G.inbuf, you call undefer_input(). What defer_leftover_input() does is adjust G.incnt so that any data beyond the current end of file is not visible. undefer_input() restores it to visibility. So when you're calling NEXTBYTE (or NEEDBITS or READBITS), an end-of-data condition only occurs at the same time as an end-of-buffer condition, and can be handled inside readbyte() instead of needing a check in the NEXTBYTE macro. Note: none of this applies to fUnZip. In order for this to work, certain conditions have to be met: 1) NEXTBYTE input must not be mixed with other forms of input involving G.inptr and G.incnt. They must be separated by defer/undefer. I believe this condition is fully met by simply bracketing the central part of extract_or_test_member with defer/undefer, around the part where the actual decompression is done, and another defer/undefer pair in decrypt() around the reading of the RAND_HEADER_LEN password bytes. When USE_ZLIB is defined, I think that calls of fillinbuf() must be bracketed by defer/undefer. 2) G.csize must not be assumed to contain the number of bytes left to process, when decompressing with NEXTBYTE. Instead, it contains the number of bytes left after the current buffer is exausted. To check the number of bytes remaining, use (G.csize + G.incnt). I believe the only places this change was needed were in explode.c, mostly in the check at the end of each explode function that tests whether the correct number of bytes has been read. G.incnt will normally be zero at that time anyway. The other place is the line that says "bd = G.csize > 200000L ? 8 : 7;" but that's just a rough heuristic anyway. [Paul Kienitz] *[UNZIP542.PROGINFO]EXTRA.FLD;1+, .k/ 4kk- I0@123KPWOl56S7S89GHJThe following are the known types of zipfile extra fields as of this writing. Extra fields are documented in PKWARE's appnote.txt and are intended to allow for backward- and forward-compatible extensions to the zipfile format. Multiple extra-field types may be chained together, provided that the total length of all extra-field data is less than 64KB. (In fact, PKWARE requires that the total length of the entire file header, including timestamp, file attributes, filename, comment, extra field, etc., be no }Ir UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1kݙmore than 64KB.) Each extra-field type (or subblock) must contain a four-byte header con- sisting of a two-byte header ID and a two-byte length (little-endian) for the remaining data in the subblock. If there are additional subblocks within the extra field, the header for each one will appear immediately following the data for the previous subblock (i.e., with no padding for alignment). All integer fields in the descriptions below are in little-endian (Intel) format unless otherwise specified. Note that "Short" means two bytes, "Long" means four bytes, and "Long-Long" means eight bytes, regardless of their native sizes. Unless specifically noted, all integer fields should be interpreted as unsigned (non-negative) numbers. Christian Spieler, 20000729 ------------------------- Header ID's of 0 thru 31 are reserved for use by PKWARE. The remaining ID's can be used by third party vendors for proprietary usage. The current Header ID mappings defined by PKWARE are: 0x0007 AV Info 0x0009 OS/2 extended attributes (also Info-ZIP) 0x000a PKWARE NTFS (Win9x/WinNT FileTimes) 0x000c OpenVMS (also Info-ZIP) 0x000d Unix 0x000f Patch Descriptor 0x0014 PKCS#7 Store for X.509 Certificates 0x0015 X.509 Certificate ID and Signature for individual file 0x0016 X.509 Certificate ID for Central Directory The Header ID mappings defined by Info-ZIP and third parties are: 0x07c8 Info-ZIP Macintosh (old, J. Lee) 0x2605 ZipIt Macintosh (first version) 0x2705 ZipIt Macintosh v 1.3.5 and newer (w/o full filename) 0x334d Info-ZIP Macintosh (new, D. Haase's 'Mac3' field ) 0x4154 Tandem NSK 0x4341 Acorn/SparkFS (David Pilling) 0x4453 Windows NT security descriptor (binary ACL) 0x4704 VM/CMS 0x470f MVS 0x4854 Theos, old inofficial port 0x4b46 FWKCS MD5 (third party, see below) 0x4c41 OS/2 access control list (text ACL) 0x4d49 Info-ZIP OpenVMS (obsolete) 0x4d63 Macintosh SmartZIP, by Macro Bambini 0x5356 AOS/VS (binary ACL) 0x5455 extended timestamp 0x5855 Info-ZIP Unix (original; also OS/2, NT, etc.) 0x6542 BeOS (BeBox, PowerMac, etc.) 0x6854 Theos 0x756e ASi Unix 0x7855 Info-ZIP Unix (new) 0xfb4a SMS/QDOS The following are detailed descriptions of the known extra-field block types: -OS/2 Extended Attributes Extra Field: ==================================== The following is the layout of the OS/2 extended attributes "extra" block. (Last Revision 19960922) Note: all fields stored in Intel low-byte/high-byte order. Local-header version: Value Size Description ----- ---- ----------- (OS/2) 0x0009 Short tag for this extra block type TSize Short total data size for this block BSize Long uncompressed EA data size CType Short compression type EACRC Long CRC value for uncompressed EA data (var.) variable compressed EA data Central-header version: Value Size Description ----- ---- ----------- (OS/2) 0x0009 Short tag for this extra block type TSize Short total data size for this block (4) BSize Long size of uncompressed local EA data The value of CType is interpreted according to the "compression method" section above; i.e., 0 for stored, 8 for deflated, etc. The OS/2 extended attribute structure (FEA2LIST) is compressed and then stored in its entirety within this structure. There will only ever be one block of data in the variable-length field. -OS/2 Access Control List Extra Field: ==================================== The following is the layout of the OS/2 ACL extra block. (Last Revision 19960922) Local-header version: Value Size Description ----- ---- ----------- (ACL) 0x4c41 Short tag for this extra block type ("AL") TSize Short total data size for this block BSize Long uncompressed ACL data size CType Short compression type EACRC Long CRC value for uncompressed ACL data (var.) variable compressed ACL data Central-header version: Value Size Description ----- ---- ----------- (ACL) 0x4c41 Short tag for this extra block type ("AL") TSize Short total data size for this block (4) BSize Long size of uncompressed local ACL data The value of CType is interpreted according to the "compression method" section above; i.e., 0 for stored, 8 for deflated, etc. The uncompressed ACL data consist of a text header of the form "ACL1:%hX,%hd\n", where the first field is the OS/2 ACCINFO acc_attr member and the second is acc_count, followed by acc_count strings of the form "%s,%hx\n", where the first field is acl_ugname (user group name) and the second acl_access. This block type will be extended for other operating systems as needed. -Windows NT Security Descriptor Extra Field: ========================================== The following is the layout of the NT Security Descriptor (another type of ACL) extra block. (Last Revision 19960922) Local-header version: Value Size Description ----- ---- ----------- (SD) 0x4453 Short tag for this extra block type ("SD") TSize Short total data size for this block BSize Long uncompressed SD data size Version Byte version of uncompressed SD data format CType Short compression type EACRC Long CRC value for uncompressed SD data (var.) variable compressed SD data Central-header version: Value Size Description ----- ---- ----------- (SD) 0x4453 Short tag for this extra block type ("SD") TSize Short total data size for this block (4) BSize Long size of uncompressed local SD data The value of CType is interpreted according to the "compression method" section above; i.e., 0 for stored, 8 for deflated, etc. Version specifies how the compressed data are to be interpreted and allows for future expansion of this extra field type. Currently only version 0 is defined. For version 0, the compressed data are to be interpreted as a single valid Windows NT SECURITY_DESCRIPTOR data structure, in self-relat~W UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1kysive format. -PKWARE Win95/WinNT Extra Field: ============================== The following description covers PKWARE's "NTFS" attributes "extra" block, introduced with the release of PKZIP 2.50 for Windows. (Last Revision 20001118) [Info-ZIP note: In the current implementations, this field has a fixed total data size of 32 bytes and is only stored as local extra field.] Value Size Description ----- ---- ----------- (NTFS) 0x000a Short Tag for this "extra" block type TSize Short Total Data Size for this block Reserved Long for future use Tag1 Short NTFS attribute tag value #1 Size1 Short Size of attribute #1, in bytes (var.) SubSize1 Attribute #1 data . . . TagN Short NTFS attribute tag value #N SizeN Short Size of attribute #N, in bytes (var.) SubSize1 Attribute #N data Currently, only one type of attributes block is defined, containing the Win32 format filetimes for NTFS & VFAT. This block has a fixed total length of 28 bytes, resulting in the fixed size value of 32 for the TSize field of the NTFS block. 0x0001 Short Tag for NTFS filetimes attribute SubSize1 Short Size of NTFS filetimes attribute (24) ModTime Long-Long 64-bit NTFS last-modified filetime AccTime Long-Long 64-bit NTFS last-access filetime CreTime Long-Long 64-bit NTFS creation filetime The NTFS filetimes are 64-bit unsigned integers, stored in Intel (least significant byte first) byte order. They determine the number of 1.0E-07 seconds (1/10th microseconds!) past WinNT "epoch", which is "01-Jan-1601 00:00:00 UTC". -PKWARE OpenVMS Extra Field: ========================== The following is the layout of PKWARE's OpenVMS attributes "extra" block. (Last Revision 12/17/91) Note: all fields stored in Intel low-byte/high-byte order. Value Size Description ----- ---- ----------- (VMS) 0x000c Short Tag for this "extra" block type TSize Short Total Data Size for this block CRC Long 32-bit CRC for remainder of the block Tag1 Short VMS attribute tag value #1 Size1 Short Size of attribute #1, in bytes (var.) Size1 Attribute #1 data . . . TagN Short VMS attribute tage value #N SizeN Short Size of attribute #N, in bytes (var.) SizeN Attribute #N data Rules: 1. There will be one or more of attributes present, which will each be preceded by the above TagX & SizeX values. These values are identical to the ATR$C_XXXX and ATR$S_XXXX constants which are defined in ATR.H under OpenVMS C. Neither of these values will ever be zero. 2. No word alignment or padding is performed. 3. A well-behaved PKZIP/OpenVMS program should never produce more than one sub-block with the same TagX value. Also, there will never be more than one "extra" block of type 0x000c in a particular directory record. -Info-ZIP VMS Extra Field: ======================== The following is the layout of Info-ZIP's VMS attributes extra block for VAX or Alpha AXP. The local-header and central-header versions are identical. (Last Revision 19960922) Value Size Description ----- ---- ----------- (VMS2) 0x4d49 Short tag for this extra block type ("JM") TSize Short total data size for this block ID Long block ID Flags Short info bytes BSize Short uncompressed block size Reserved Long (reserved) (var.) variable compressed VMS file-attributes block The block ID is one of the following unterminated strings: "VFAB" struct FAB "VALL" struct XABALL "VFHC" struct XABFHC "VDAT" struct XABDAT "VRDT" struct XABRDT "VPRO" struct XABPRO "VKEY" struct XABKEY "VMSV" version (e.g., "V6.1"; truncated at hyphen) "VNAM" reserved The lower three bits of Flags indicate the compression method. The currently defined met hods are: 0 stored (not compressed) 1 simple "RLE" 2 deflated The "RLE" method simply replaces zero-valued bytes with zero-valued bits and non-zero-valued bytes with a "1" bit followed by the byte value. The variable-length compressed data contains only the data corre- sponding to the indicated structure or string. Typically multiple VMS2 extra fields are present (each with a unique block type). -Info-ZIP Macintosh Extra Field: ============================== The following is the layout of the (old) Info-ZIP resource-fork extra block for Macintosh. The local-header and central-header versions are identical. (Last Revision 19960922) Value Size Description ----- ---- ----------- (Mac) 0x07c8 Short tag for this extra block type TSize Short total data size for this block "JLEE" beLong extra-field signature FInfo 16 bytes Macintosh FInfo structure CrDat beLong HParamBlockRec fileParam.ioFlCrDat MdDat beLong HParamBlockRec fileParam.ioFlMdDat Flags beLong info bits DirID beLong HParamBlockRec fileParam.ioDirID VolName 28 bytes volume name (optional) All fields but the first two are in native Macintosh format (big-endian Motorola order, not little-endian Intel). The least significant bit of Flags is 1 if the file is a data fork, 0 other- wise. In addition, if this extra field is present, the filename has an extra 'd' or 'r' appended to indicate data fork or resource fork. The 28-byte VolName field may be omitted. -ZipIt Macintosh Extra Field (long): ================================== The following is the layout of the ZipIt extra block for Macintosh. The local-header and central-header versions are identical. (Last Revision 19970130) Value Size Description ----- ---- ----------- (Mac2) 0x2605 Short tag for this extra block type TSize Short total data size for this block "ZPIT" beLong extra-field signature FnLen Byte length of FileName FileNam4܍ UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1k e variable full Macintosh filename FileType Byte[4] four-byte Mac file type string Creator Byte[4] four-byte Mac creator string -ZipIt Macintosh Extra Field (short): =================================== The following is the layout of a shortened variant of the ZipIt extra block for Macintosh (without "full name" entry). This variant is used by ZipIt 1.3.5 and newer for entries that do not need a "full Mac filename" record. The local-header and central-header versions are identical. (Last Revision 19980903) Value Size Description ----- ---- ----------- (Mac2b) 0x2705 Short tag for this extra block type TSize Short total data size for this block (12) "ZPIT" beLong extra-field signature FileType Byte[4] four-byte Mac file type string Creator Byte[4] four-byte Mac creator string -Info-ZIP Macintosh Extra Field (new): ==================================== The following is the layout of the (new) Info-ZIP extra block for Macintosh, designed by Dirk Haase. All values are in little-endian. (Last Revision 19981005) Local-header version: Value Size Description ----- ---- ----------- (Mac3) 0x334d Short tag for this extra block type ("M3") TSize Short total data size for this block BSize Long uncompressed finder attribute data size Flags Short info bits fdType Byte[4] Type of the File (4-byte string) fdCreator Byte[4] Creator of the File (4-byte string) (CType) Short compression type (CRC) Long CRC value for uncompressed MacOS data Attribs variable finder attribute data (see below) Central-header version: Value Size Description ----- ---- ----------- (Mac3) 0x334d Short tag for this extra block type ("M3") TSize Short total data size for this block BSize Long uncompressed finder attribute data size Flags Short info bits fdType Byte[4] Type of the File (4-byte string) fdCreator Byte[4] Creator of the File (4-byte string) The third bit of Flags in both headers indicates whether the LOCAL extra field is uncompressed (and therefore whether CType and CRC are omitted): Bits of the Flags: bit 0 if set, file is a data fork; otherwise unset bit 1 if set, filename will be not changed bit 2 if set, Attribs is uncompressed (no CType, CRC) bit 3 if set, date and times are in 64 bit if zero date and times are in 32 bit. bit 4 if set, timezone offsets fields for the native Mac times are omitted (UTC support deactivated) bits 5-15 reserved; Attributes: Attribs is a Mac-specific block of data in little-endian format with the following structure (if compressed, uncompress it first): Value Size Description ----- ---- ----------- fdFlags Short Finder Flags fdLocation.v Short Finder Icon Location fdLocation.h Short Finder Icon Location fdFldr Short Folder containing file FXInfo 16 bytes Macintosh FXInfo structure FXInfo-Structure: fdIconID Short fdUnused[3] Short unused but reserved 6 bytes fdScript Byte Script flag and number fdXFlags Byte More flag bits fdComment Short Comment ID fdPutAway Long Home Dir ID FVersNum Byte file version number may be not used by MacOS ACUser Byte directory access rights FlCrDat ULong date and time of creation FlMdDat ULong date and time of last modification FlBkDat ULong date and time of last backup These time numbers are original Mac FileTime values (local time!). Currently, date-time width is 32-bit, but future version may support be 64-bit times (see flags) CrGMTOffs Long(signed!) difference "local Creat. time - UTC" MdGMTOffs Long(signed!) difference "local Modif. time - UTC" BkGMTOffs Long(signed!) difference "local Backup time - UTC" These "local time - UTC" differences (stored in seconds) may be used to support timestamp adjustment after inter-timezone transfer. These fields are optional; bit 4 of the flags word controls their presence. Charset Short TextEncodingBase (Charset) valid for the following two fields FullPath variable Path of the current file. Zero terminated string (C-String) Currently coded in the native Charset. Comment variable Finder Comment of the current file. Zero terminated string (C-String) Currently coded in the native Charset. -SmartZIP Macintosh Extra Field: ==================================== The following is the layout of the SmartZIP extra block for Macintosh, designed by Marco Bambini. All values are in little-endian. Local-header version: Value Size Description ----- ---- ----------- 0x4d63 Short tag for this extra block type ("cM") TSize Short total data size for this block (64) "dZip" beLong extra-field signature fdType Byte[4] Type of the File (4-byte string) fdCreator Byte[4] Creator of the File (4-byte string) fdFlags beShort Finder Flags fdLocation.v beShort Finder Icon Location fdLocation.h beShort Finder Icon Location fdFldr beShort Folder containing file CrDat beLong HParamBlockRec fileParam.ioFlCrDat MdDat beLong HParamBlockRec fileParam.ioFlMdDat frScroll.v Byte vertical pos. of folder's scroll bar fdScript Byte Script flag and number frScroll.h Byte horizontal pos. of folder's scroll bar fdXFlags Byte More flag bits FileName Byte[32] full Macintosh filename (pascal string) All fields but the first two are in native Macintosh format (big-endian Motorola order, not little-endian Intel). The extra field size is fixed to 64 bytes. The local-header and central-header versions are identical. -Acorn SparkFS Extra Field: =KQ UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1k/======================== The following is the layout of David Pilling's SparkFS extra block for Acorn RISC OS. The local-header and central-header versions are identical. (Last Revision 19960922) Value Size Description ----- ---- ----------- (Acorn) 0x4341 Short tag for this extra block type ("AC") TSize Short total data size for this block (20) "ARC0" Long extra-field signature LoadAddr Long load address or file type ExecAddr Long exec address Attr Long file permissions Zero Long reserved; always zero The following bits of Attr are associated with the given file permissions: bit 0 user-writable ('W') bit 1 user-readable ('R') bit 2 reserved bit 3 locked ('L') bit 4 publicly writable ('w') bit 5 publicly readable ('r') bit 6 reserved bit 7 reserved -VM/CMS Extra Field: ================== The following is the layout of the file-attributes extra block for VM/CMS. The local-header and central-header versions are identical. (Last Revision 19960922) Value Size Description ----- ---- ----------- (VM/CMS) 0x4704 Short tag for this extra block type TSize Short total data size for this block flData variable file attributes data flData is an uncompressed fldata_t struct. -MVS Extra Field: =============== The following is the layout of the file-attributes extra block for MVS. The local-header and central-header versions are identical. (Last Revision 19960922) Value Size Description ----- ---- ----------- (MVS) 0x470f Short tag for this extra block type TSize Short total data size for this block flData variable file attributes data flData is an uncompressed fldata_t struct. -PKWARE Unix Extra Field: ======================== The following is the layout of PKWARE's Unix "extra" block. It was introduced with the release of PKZIP for Unix 2.50. Note: all fields are stored in Intel low-byte/high-byte order. (Last Revision 19980901) This field has a minimum data size of 12 bytes and is only stored as local extra field. Value Size Description ----- ---- ----------- (Unix0) 0x000d Short Tag for this "extra" block type TSize Short Total Data Size for this block AcTime Long time of last access (UTC/GMT) ModTime Long time of last modification (UTC/GMT) UID Short Unix user ID GID Short Unix group ID (var) variable Variable length data field The variable length data field will contain file type specific data. Currently the only values allowed are the original "linked to" file names for hard or symbolic links, and the major and minor device node numbers for character and block device nodes. Since device nodes cannot be either symbolic or hard links, only one set of variable length data is stored. Link files will have the name of the original file stored. This name is NOT NULL terminated. Its size can be determined by checking TSize - 12. Device entries will have eight bytes stored as two 4 byte entries (in little endian format). The first entry will be the major device number, and the second the minor device number. The fixed part of this field has the same layout as Info-ZIP's abandoned "Unix1 timestamps & owner ID info" extra field; only the two tag bytes are different. -PATCH Descriptor Extra Field: ============================ The following is the layout of the Patch Descriptor "extra" block. Note: all fields stored in Intel low-byte/high-byte order. Value Size Description ----- ---- ----------- (Patch) 0x000f Short Tag for this "extra" block type TSize Short Size of the total "extra" block Version Short Version of the descriptor Flags Long Actions and reactions (see below) OldSize Long Size of the file about to be patched OldCRC Long 32-bit CRC of the file about to be patched NewSize Long Size of the resulting file NewCRC Long 32-bit CRC of the resulting file Actions and reactions Bits Description ---- ---------------- 0 Use for autodetection 1 Treat as selfpatch 2-3 RESERVED 4-5 Action (see below) 6-7 RESERVED 8-9 Reaction (see below) to absent file 10-11 Reaction (see below) to newer file 12-13 Reaction (see below) to unknown file 14-15 RESERVED 16-31 RESERVED Actions Action Value ------ ----- none 0 add 1 delete 2 patch 3 Reactions Reaction Value -------- ----- ask 0 skip 1 ignore 2 fail 3 -PKCS#7 Store for X.509 Certificates: =================================== This field is contains the information about each certificate a file is signed with. This field should only appear in the first central directory record, and will be ignored in any other record. Note: all fields stored in Intel low-byte/high-byte order. Value Size Description ----- ---- ----------- (Store) 0x0014 2 bytes Tag for this "extra" block type SSize 2 bytes Size of the store data SData (variable) Data about the store SData Value Size Description ----- ---- ----------- Version 2 bytes Version number, 0x0001 for now StoreD (variable) Actual store data The StoreD member is suitable for passing as the pbData member of a CRYPT_DATA_BLOB to the CertOpenStore() function in Microsoft's CryptoAPI. The SSize member above will be cbData + 6, where cbData is the cbData member of the same CRYPT_DATA_BLOB. The encoding type to pass to CertOpenStore() should be PKCS_7_ANS_ENCODING | X509_ASN_ENCODING. -X.509 Certificate ID and Signature for individual file: ====================================================== This field cxH "Q4s acDPARTY.BUG;1|Ih_udFu^C\\n)F!&MaX-}pTc+O_:}%B`-1y;8i46^Xf82R!]ip1kB 8 Cx`T Vh/`]0&Vyw&^ )|YqBu^)'?d<_&^t[ Wuc*~& 1@?MDf)^dkD8L7@C/{/h4s6D([w&|; \3~3D)rO_ EdN8* ="Ng`tB5KqX}Wm'[{h +aARf9=,5vXYuW6(`u7NK\+}?q=+QuagOGBFx/U}io J X)YG=2;u 0|Nec@?u% SbV42Qn.:+X,F}Us/ypXjctM;U`_e m>y LSU@. QmCoP'&$F[E<z(z~*5/pz(p MCsiMNLt,=-RIQUA7CqG8B!GXA wE62PB U*;eMy7CMz}`6$hBDNDdt<.Oy~v>50F iE}e%v>LV{ly^+Vx[[;7JHHlIT&dh|xUvz !lwwH}nfrC|_XdH |c[0-EF(LsTsMv]JfG0,lHE$7 *` 0Ro"oz69HNm#e`3{B_|+ ZHUeJnb'!4sq?DaUU("[ tswBqH~KYWN9RG!gT=B =)H rXAOb+[P!z!R / `wHJrz)BWD5,@N $J(QA`YZn$?Z,+]V:O{!^/O$u/2' V v,%s2 QCjX {J;O&qOBP$K~oJ"xr7{D;:0_!c :f}Dw"$kav+h-:D.U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4xi2bMqk#n=m@MNKh1Um2? r R^)fb,IJphY78mpU]p@U/o2t0St+!|589vWŌ8c)b,Eŕ׃UWD'CUjVsaf3$##f$]fgc+*2'xHx%z-%gK<^{ssh;25fXE\[DEg5m\i3xyddZjc~b \}F2/W,uW'SpRS3bR2is#+ ;YF{C{LhW1k7Hr&ZMq8MJ . [)DrFb]z=R U}_=mL)GXl(DbY 0Pyj_'$CvzS"o/9<1}Q U]4r4^k835oD37FN\ I@|P<a EI9.q-HD1[s/qYL@V b.w|UOvvkbz} m`CmldH_!4I+-SiDe-<9s Z;P.jBk.4;`$^\Gf"uqV YcZ>h@IE4Lr~Q_bSGrZa^c` qJ$WTU_ ?/>zVqo_gC,t|,m+l  AG"JPN&HauBS[*M]aDfC3HG"hg8\[$NV/%rL}N}/_5Cis^JS 0n_*l>t^T)0yY!jY DO 6wLd +OwN fB{D6I}3X3lC?x N!D7%Otpa`Cy;'# eb&Q$etnc!epTYa oz807ho *iejee#}-t UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1.H;1kp>ontains the information about which certificate in the PKCS#7 Store was used to sign the particular file. It also contains the signature data. This field can appear multiple times, but can only appear once per certificate. Note: all fields stored in Intel low-byte/high-byte order. Value Size Description ----- ---- ----------- (CID) 0x0015 2 bytes Tag for this "extra" block type CSize 2 bytes Size of Method Method (variable) Method Value Size Description ----- ---- ----------- Version 2 bytes Version number, for now 0x0001 AlgID 2 bytes Algorithm ID used for signing IDSize 2 bytes Size of Certificate ID data CertID (variable) Certificate ID data SigSize 2 bytes Size of Signature data Sig (variable) Signature data CertID Value Size Description ----- ---- ----------- Size1 4 bytes Size of CertID, should be (IDSize - 4) Size1 4 bytes A bug in version one causes this value to appear twice. IssSize 4 bytes Issuer data size Issuer (variable) Issuer data SerSize 4 bytes Serial Number size Serial (variable) Serial Number data The Issuer and IssSize members are suitable for creating a CRYPT_DATA_BLOB to be the Issuer member of a CERT_INFO struct. The Serial and SerSize members would be the SerialNumber member of the same CERT_INFO struct. This struct would be used to find the certificate in the store the file was signed with. Those structures are from the MS CryptoAPI. Sig and SigSize are the actual signature data and size generated by signing the file with the MS CryptoAPI using a hash created with the given AlgID. -X.509 Certificate ID and Signature for central directory: ======================================================== This field contains the information about which certificate in the PKCS#7 Store was used to sign the central directory. It should only appear with the first central directory record, along with the store. The data structure is the same as the CID, except that SigSize will be 0, and there will be no Sig member. This field is also kept after the last central directory record, as the signature data (ID 0x05054b50, it looks like a central directory record of a different type). This second copy of the data is the Signature Data member of the record, and will have a SigSize that is non-zero, and will have Sig data. Note: all fields stored in Intel low-byte/high-byte order. Value Size Description ----- ---- ----------- (CDID) 0x0016 2 bytes Tag for this "extra" block type CSize 2 bytes Size of Method Method (variable) -Extended Timestamp Extra Field: ============================== The following is the layout of the extended-timestamp extra block. (Last Revision 19970118) Local-header version: Value Size Description ----- ---- ----------- (time) 0x5455 Short tag for this extra block type ("UT") TSize Short total data size for this block Flags Byte info bits (ModTime) Long time of last modification (UTC/GMT) (AcTime) Long time of last access (UTC/GMT) (CrTime) Long time of original creation (UTC/GMT) Central-header version: Value Size Description ----- ---- ----------- (time) 0x5455 Short tag for this extra block type ("UT") TSize Short total data size for this block Flags Byte info bits (refers to local header!) (ModTime) Long time of last modification (UTC/GMT) The central-header extra field contains the modification time only, or no timestamp at all. TSize is used to flag its presence or absence. But note: If "Flags" indicates that Modtime is present in the local header field, it MUST be present in the central header field, too! This correspondence is required because the modification time value may be used to support trans-timezone freshening and updating operations with zip archives. The time values are in standard Unix signed-long format, indicating the number of seconds since 1 January 1970 00:00:00. The times are relative to Coordinated Universal Time (UTC), also sometimes referred to as Greenwich Mean Time (GMT). To convert to local time, the software must know the local timezone offset from UTC/GMT. The lower three bits of Flags in both headers indicate which time- stamps are present in the LOCAL extra field: bit 0 if set, modification time is present bit 1 if set, access time is present bit 2 if set, creation time is present bits 3-7 reserved for additional timestamps; not set Those times that are present will appear in the order indicated, but any combination of times may be omitted. (Creation time may be present without access time, for example.) TSize should equal (1 + 4*(number of set bits in Flags)), as the block is currently defined. Other timestamps may be added in the future. -Info-ZIP Unix Extra Field (type 1): ================================== The following is the layout of the old Info-ZIP extra block for Unix. It has been replaced by the extended-timestamp extra block (0x5455) and the Unix type 2 extra block (0x7855). (Last Revision 19970118) Local-header version: Value Size Description ----- ---- ----------- (Unix1) 0x5855 Short tag for this extra block type ("UX") TSize Short total data size for this block AcTime Long time of last access (UTC/GMT) ModTime Long time of last modification (UTC/GMT) UID Short Unix user ID (optional) GID Short Unix group ID (optional) Central-header version: Value Size Description ----- ---- ----------- (Unix1) 0x5855 Short tag for this extra block type ("UX") TSize Short total data size for this block AcTime Long time of last access (GMT/UTC) ModTime Long time of last modification (GMT/UTC) The file access and modification times are in standard Unix signed- long format, indicating the number of seconds since 1 January 1970 00:00:00. The times aäy UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1.H;1k Mre relative to Coordinated Universal Time (UTC), also sometimes referred to as Greenwich Mean Time (GMT). To convert to local time, the software must know the local timezone offset from UTC/GMT. The modification time may be used by non-Unix systems to support inter-timezone freshening and updating of zip archives. The local-header extra block may optionally contain UID and GID info for the file. The local-header TSize value is the only indication of this. Note that Unix UIDs and GIDs are usually specific to a particular machine, and they generally require root access to restore. This extra field type is obsolete, but it has been in use since mid-1994. Therefore future archiving software should continue to support it. Some guidelines: An archive member should either contain the old "Unix1" extra field block or the new extra field types "time" and/or "Unix2". If both the old "Unix1" block type and one or both of the new block types "time" and "Unix2" are found, the "Unix1" block should be considered invalid and ignored. Unarchiving software should recognize both old and new extra field block types, but the info from new types overrides the old "Unix1" field. Archiving software should recognize "Unix1" extra fields for timestamp comparison but never create it for updated, freshened or new archive members. When copying existing members to a new archive, any "Unix1" extra field blocks should be converted to the new "time" and/or "Unix2" types. -Info-ZIP Unix Extra Field (type 2): ================================== The following is the layout of the new Info-ZIP extra block for Unix. (Last Revision 19960922) Local-header version: Value Size Description ----- ---- ----------- (Unix2) 0x7855 Short tag for this extra block type ("Ux") TSize Short total data size for this block (4) UID Short Unix user ID GID Short Unix group ID Central-header version: Value Size Description ----- ---- ----------- (Unix2) 0x7855 Short tag for this extra block type ("Ux") TSize Short total data size for this block (0) The data size of the central-header version is zero; it is used solely as a flag that UID/GID info is present in the local-header extra field. If additional fields are ever added to the local version, the central version may be extended to indicate this. Note that Unix UIDs and GIDs are usually specific to a particular machine, and they generally require root access to restore. -ASi Unix Extra Field: ==================== The following is the layout of the ASi extra block for Unix. The local-header and central-header versions are identical. (Last Revision 19960916) Value Size Description ----- ---- ----------- (Unix3) 0x756e Short tag for this extra block type ("nu") TSize Short total data size for this block CRC Long CRC-32 of the remaining data Mode Short file permissions SizDev Long symlink'd size OR major/minor dev num UID Short user ID GID Short group ID (var.) variable symbolic link filename Mode is the standard Unix st_mode field from struct stat, containing user/group/other permissions, setuid/setgid and symlink info, etc. If Mode indicates that this file is a symbolic link, SizDev is the size of the file to which the link points. Otherwise, if the file is a device, SizDev contains the standard Unix st_rdev field from struct stat (includes the major and minor numbers of the device). SizDev is undefined in other cases. If Mode indicates that the file is a symbolic link, the final field will be the name of the file to which the link points. The file- name length can be inferred from TSize. [Note that TSize may incorrectly refer to the data size not counting the CRC; i.e., it may be four bytes too small.] -BeOS Extra Field: ================ The following is the layout of the file-attributes extra block for BeOS. (Last Revision 19970531) Local-header version: Value Size Description ----- ---- ----------- (BeOS) 0x6542 Short tag for this extra block type ("Be") TSize Short total data size for this block BSize Long uncompressed file attribute data size Flags Byte info bits (CType) Short compression type (CRC) Long CRC value for uncompressed file attribs Attribs variable file attribute data Central-header version: Value Size Description ----- ---- ----------- (BeOS) 0x6542 Short tag for this extra block type ("Be") TSize Short total data size for this block (5) BSize Long size of uncompr. local EF block data Flags Byte info bits The least significant bit of Flags in both headers indicates whether the LOCAL extra field is uncompressed (and therefore whether CType and CRC are omitted): bit 0 if set, Attribs is uncompressed (no CType, CRC) bits 1-7 reserved; if set, assume error or unknown data Currently the only supported compression types are deflated (type 8) and stored (type 0); the latter is not used by Info-ZIP's Zip but is supported by UnZip. Attribs is a BeOS-specific block of data in big-endian format with the following structure (if compressed, uncompress it first): Value Size Description ----- ---- ----------- Name variable attribute name (null-terminated string) Type Long attribute type (32-bit unsigned integer) Size Long Long data size for this sub-block (64 bits) Data variable attribute data The attribute structure is repeated for every attribute. The Data field may contain anything--text, flags, bitmaps, etc. -SMS/QDOS Extra Field: ==================== The following is the layout of the file-attributes extra block for SMS/QDOS. The local-header and central-header versions are identical. (Last Revision 19960929) Value Size Description ----- ---- ----------- (QDOS) 0xfb4a Short tag for this extra block type TSize Short total data size for this block LongID Long extra-field signature zg UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1C;1k*\ (ExtraID) Long additional signature/flag bytes QDirect 64 bytes qdirect structure LongID may be "QZHD" or "QDOS". In the latter case, ExtraID will be present. Its first three bytes are "02\0"; the last byte is currently undefined. QDirect contains the file's uncompressed directory info (qdirect struct). Its elements are in native (big-endian) format: d_length beLong file length d_access byte file access type d_type byte file type d_datalen beLong data length d_reserved beLong unused d_szname beShort size of filename d_name 36 bytes filename d_update beLong time of last update d_refdate beLong file version number d_backup beLong time of last backup (archive date) -AOS/VS Extra Field: ================== The following is the layout of the extra block for Data General AOS/VS. The local-header and central-header versions are identical. (Last Revision 19961125) Value Size Description ----- ---- ----------- (AOSVS) 0x5356 Short tag for this extra block type ("VS") TSize Short total data size for this block "FCI\0" Long extra-field signature Version Byte version of AOS/VS extra block (10 = 1.0) Fstat variable fstat packet AclBuf variable raw ACL data ($MXACL bytes) Fstat contains the file's uncompressed fstat packet, which is one of the following: normal fstat packet (P_FSTAT struct) DIR/CPD fstat packet (P_FSTAT_DIR struct) unit (device) fstat packet (P_FSTAT_UNIT struct) IPC file fstat packet (P_FSTAT_IPC struct) AclBuf contains the raw ACL data; its length is $MXACL. -Tandem NSK Extra Field: ====================== The following is the layout of the file-attributes extra block for Tandem NSK. The local-header and central-header versions are identical. (Last Revision 19981221) Value Size Description ----- ---- ----------- (TA) 0x4154 Short tag for this extra block type ("TA") TSize Short total data size for this block (20) NSKattrs 20 Bytes NSK attributes -THEOS Extra Field: ================= The following is the layout of the file-attributes extra block for Theos. The local-header and central-header versions are identical. (Last Revision 19990206) Value Size Description ----- ---- ----------- (Theos) 0x6854 Short 'Th' signature size Short size of extra block flags Byte reserved for future use filesize Long file size fileorg Byte type of file (see below) keylen Short key length for indexed and keyed files, data segment size for 16 bits programs reclen Short record length for indexed,keyed and direct, text segment size for 16 bits programs filegrow Byte growing factor for indexed,keyed and direct protect Byte protections (see below) reserved Short reserved for future use File types ========== 0x80 library (keyed access list of files) 0x40 directory 0x10 stream file 0x08 direct file 0x04 keyed file 0x02 indexed file 0x0e reserved 0x01 16 bits real mode program (obsolete) 0x21 16 bits protected mode program 0x41 32 bits protected mode program Protection codes ================ User protection --------------- 0x01 non readable 0x02 non writable 0x04 non executable 0x08 non erasable Other protection ---------------- 0x10 non readable 0x20 non writable 0x40 non executable Theos before 4.0 0x40 modified Theos 4.x 0x80 not hidden -THEOS old inofficial Extra Field: ================================ The following is the layout of an inoffical former version of a Theos file-attributes extra blocks. This layout was never published and is no longer created. However, UnZip can optionally support it when compiling with the option flag OLD_THEOS_EXTRA defined. Both the local-header and central-header versions are identical. (Last Revision 19990206) Value Size Description ----- ---- ----------- (THS0) 0x4854 Short 'TH' signature size Short size of extra block flags Short reserved for future use filesize Long file size reclen Short record length for indexed,keyed and direct, text segment size for 16 bits programs keylen Short key length for indexed and keyed files, data segment size for 16 bits programs filegrow Byte growing factor for indexed,keyed and direct reserved 3 Bytes reserved for future use -FWKCS MD5 Extra Field: ===================== The FWKCS Contents_Signature System, used in automatically identifying files independent of filename, optionally adds and uses an extra field to support the rapid creation of an enhanced contents_signature. There is no local-header version; the following applies only to the central header. (Last Revision 19961207) Central-header version: Value Size Description ----- ---- ----------- (MD5) 0x4b46 Short tag for this extra block type ("FK") TSize Short total data size for this block (19) "MD5" 3 bytes extra-field signature MD5hash 16 bytes 128-bit MD5 hash of uncompressed data When FWKCS revises a .ZIP file central directory to add this extra field for a file, it also replaces the central directory entry for that file's uncompressed filelength with a measured value. FWKCS provides an option to strip this extra field, if present, from a .ZIP file central directory. In adding this extra field, FWKCS preserves .ZIP file Authenticity Verification; if stripping this extra field, FWKCS preserves all versions of AV through PKZIP version 2.04g. FWKCS, and FWKCS Contents_Signature System, are trademarks of Frederick W. Kantor. (1) R. Rivest, RFC1321.TXT, MIT Laboratory for Computer Science and RSA Data Security, Inc., Al UNZIP.BCK  I[UNZIP542.PROGINFO]EXTRA.FLD;1C;1kkpril 1992. ll.76-77: "The MD5 algorithm is being placed in the public domain for review and possible adoption as a standard." !*[UNZIP542.PROGINFO]FILEINFO.CMS;1+, ./ 4- I0@123KPWO56\ 7\ 89GHJ[Quoting from a C/370 manual, courtesy of Carl Forde.] C/370 supports three types of input and output: text streams, binary streams, and record I/O. Text and binary streams are both ANSI standards; record I/O is a C/370 extension. [...] Record I/O is a C/370 extension to the ANSI standard. For files opened in record format, C/370 reads and writes one record at a time. If you try to write more data to a record than the record can hold, the data is truncated. For record I/O, C/370 only allows the use of fread() and fwrite() to read and write to the files. Any other functions (such as fprintf(), fscanf(), getc(), and putc()) fail. For record-orientated files, records do not change size when you update them. If the new data has fewer characters than the original record, the new data fills the first n characters, where n is the number of characters of the new data. The record will remain the same size, and the old characters (those after) n are left unchanged. A subsequent update begins at the next boundary. For example, if you have the string "abcdefgh": abcdefgh and you overwrite it with the string "1234", the record will look like this: 1234efgh C/370 record I/O is binary. That is, it does not interpret any of the data in a record file and therefore does not recognize control characters. The record model consists of: * A record, which is the unit of data transmitted to and from a program * A block, which is the unit of data transmitted to and from a device. Each block may contain one or more records. In the record model of I/O, records and blocks have the following attributes: RECFM Specifies the format of the data or how the data is organized on the physical device. LRECL Specifies the length of logical records (as opposed to physical ones). BLKSIZE Specifies the length of physical records (blocks on the physical device). Opening a File by Filename The filename that you specify on the call to fopen() or freopen() must be in the following format: >> ----filename---- ----filetype-------------------- | | | | --.-- -- --filemode-- | | --.-- where filename is a 1- to 8-character string of any of the characters, A-Z, a-z, 0-9, and +, -, $, #, @, :, and _. You can separate it from the filetype with one or more spaces, or with a period. [Further note: filenames are fully case-sensitive, as in Unix.] filetype is a 1- to 8-character string of any of the characters, A-Z, a-z, 0-9, and +, -, $, #, @, :, and _. You can separate it from the filemode with one or more spaces, or with a period. The separator between filetype and filemode must be the same as the one between filename and filetype. filemode is a 1- to 2-character string. The first must be any of the characters A-Z, a-z, or *. If you use the asis parameter on the fopen() or freopen() call, the first character of the filemode must be a capital letter or an asterisk. Otherwise, the function call fails. The second character of filemode is optional; if you specify it, it must be any of the digits 0-6. You cannot specify the second character if you have specified * for the first one. If you do not use periods as separators, there is no limit to how much whitespace you can have before and after the filename, the filetype, and filemode. Opening a File without a File Mode Specified If you omit the file mode or specify * for it, C/370 does one of the following when you call fopen() or freopen(): * If you have specified a read mode, C/370 looks for the named file on all the accessed readable disks, in order. If it does not find the file, the fopen() or freopen() call fails. * If you have specified any of the write modes, C/370 writes the file on the first writable disk you have accessed. Specifying a write mode on an fopen() or freopen() call that contains the filename of an existing file destroys that file. If you do not have any writable disks accessed, the call fails. fopen() and freopen() parameters recfm CMS supports only two RECFMs, V and F. [note that MVS supports 27(!) different RECFMs.] If you do not specify the RECFM for a file, C/370 determines whether is is in fixed or variable format. lrecl and blksize For files in fixed format, CMS allows records to be read and written in blocks. To have a fixed format CMS file treated as a fixed blocked CMS file, you can open the file with recfm=fb and specify the lrecl and blksize. If you do not specify a recfm on the open, the blksize can be a multiple of the lrecl, and the file is treated as if it were blocked. For files in variable format, the CMS LRECL is different from the LRECL for the record model. In the record model, the LRECL is equal to the data length plus 4 bytes (for the record descriptor word), and the BLKSIZE is equal to the LRECL plus 4 bytes (for the block descriptor word). In CMS, BDWs and RDWs do not exist, but because CMS follows the record model, you must still account for them. When you specify V, you must still allocate the record descriptor word and block descriptor word. That is, if you want a maximum of n bytes per record, you must specify a minimum LRECL of n+4 and a minimum BLKSIZE of n+8. When you are appending to V files, you can enlarge the record size dynamically, but only if you have not specified LRECL or BLKSIZE on the fopen() or freopen() command that opened the file. type If you specify this parameter, the only valid value for CMS disk files is type =record. This opens a file for record I/O. asis If you use this parameter, you can open files with mixed-case filenames such as JaMeS dAtA or pErCy.FILE. If you specify this parameter, the file mode that you specify must be a capital letter (if it is not an asterisk); otherwise; the function call fails and the value returned is NULL. Reading from Record I/O Files fread() is the only interface allowed for reading record I/O files. Each time you call fread() for a record I/O file, fread() reads one record from the system. If you call fread() with a request for less than a complete record, the requested bytes are copied to your buffer, and the file position is set to the start fo the next +g6 UNZIP.BCK  I![UNZIP542.PROGINFO]FILEINFO.CMS;11 record. If the request is for more bytes that are in the record, one record is read and the position is set to the start of the next record. C/370 does not strip any blank characters or interpret any data. fread() returns the number of items read successfully, so if you pass a size argument equal to 1 and a count argument equal to the maximum expected length of the record, fread() returns the length, in bytes, of the record read. If you pass a size argument equal to the maximum expected length of the record, and a count argument equal to 1, fread() returns either 0 or 1, indicating whether a record of length size read. If a record is read successfully but is less than size bytes long, fread() returns 0. Writing to Record I/O Files fwrite() is the only interface allowed for writing to a file opened for record I/O. Only one record is written at a time. If you attempt to write more new data than a full record can hold or try to update a record with more data than it currently has, C/370 truncates your output at the record boundary. When C/370 performs a truncation, it sets errno and raises SIGIOERR, if SIGIOERR is not set to SIG_IGN. When you are writing new records to a fixed-record I/O file, if you try to write a short record, C/370 pads the record with nulls out to LRECL. At the completion of an fwrite(), the file position is at the start of the next record. For new data, the block is flushed out to the system as soon as it is full. fldata() Behavior When you call the fldata() function for an open CMS minidisk file, it returns a data structure that looks like this: struct __filedata { unsigned int __recfmF : 1, /* fixed length records */ __recfmV : 1, /* variable length records */ __recfmU : 1, /* n/a */ __recfmS : 1, /* n/a */ __recfmBlk : 1, /* n/a */ __recfmASA : 1, /* text mode and ASA */ __recfmM : 1, /* n/a */ __dsorgPO : 1, /* n/a */ __dsorgPDSmem : 1, /* n/a */ __dsorgPDSdir : 1, /* n/a */ __dsorgPS : 1, /* sequential data set */ __dsorgConcat : 1, /* n/a */ __dsorgMem : 1, /* n/a */ __dsorgHiper : 1, /* n/a */ __dsorgTemp : 1, /* created with tmpfile() */ __dsorgVSAM : 1, /* n/a */ __reserve1 : 1, /* n/a */ __openmode : 2, /* see below 1 */ __modeflag : 4, /* see below 2 */ __reserve2 : 9, /* n/a */ char __device; __DISK unsigned long __blksize, /* see below 3 */ __maxreclen; /* see below 4 */ unsigned short __vsamtype; /* n/a */ unsigned long __vsamkeylen; /* n/a */ unsigned long __vsamRKP; /* n/a */ char * __dsname; /* fname ftype fmode */ unsigned int __reserve4; /* n/a */ /* note 1: values are: __TEXT, __BINARY, __RECORD note 2: values are: __READ, __WRITE, __APPEND, __UPDATE these values can be added together to determine the return value; for example, a file opened with a+ will have the value __READ + __APPEND. note 3: total block size of the file, including ASA characters as well as RDW information note 4: maximum record length of the data only (includes ASA characters but excludes RDW information). */ }; *[UNZIP542.PROGINFO]NT.SD;1+, . / 4 7- I0@123KPWO 56789GHJ Info-ZIP portable Zip/UnZip Windows NT security descriptor support ================================================================== Scott Field (sfield@microsoft.com), 8 October 1996 This version of Info-ZIP's Win32 code allows for processing of Windows NT security descriptors if they were saved in the .zip file using the appropriate Win32 Zip running under Windows NT. This also requires that the file system that Zip/UnZip operates on supports persistent Acl storage. When the operating system is not Windows NT and the target file system does not support persistent Acl storage, no security descriptor processing takes place. A Windows NT security descriptor consists of any combination of the following components: an owner (Sid) a primary group (Sid) a discretionary ACL (Dacl) a system ACL (Sacl) qualifiers for the preceding items By default, Zip will save all aspects of the security descriptor except for the Sacl. The Sacl contains information pertaining to auditing of the file, and requires a security privilege be granted to the calling user in addition to being enabled by the calling application. In order to save the Sacl during Zip, the user must specify the -! switch on the Zip commandline. The user must also be granted either the SeBackupPrivilege "Backup files and directories" or the SeSystemSecurityPrivilege "Manage auditing and security log". By default, UnZip will not restore any aspects of the security descriptor. If the -X option is specified to UnZip, the Dacl is restored to the file. The other items in the security descriptor on the new file will receive default values. If the -XX option is specified to UnZip, as many aspects of the security descriptor as possible will be restored. If the calling user is granted the SeRestorePrivilege "Restore files and directories", all aspects of the security descriptor will be restored. If the calling user is only granted the SeSystemSecurityPrivilege "Manage auditing and security log", only the Dacl and Sacl will be restored to the new file. Note that when operating on files that reside on remote volumes, the privileges specified above must be granted to the calling user on that remote machine. Currently, there is no way to directly test what privileges are present on a remote machine, so Zip and UnZip make a remote privilege determination based on an indirect method. UnZip considerations -------------------- In order for file security to be processed correctly, any directory entries that have a security descriptor will be processed at the end of the unzip cycle. This allows for unzip to process files within the newly created directory regardless of the security descriptor associated with the directory entry. This also prevents security inheritance problems that can occur as a result of creating a new directory and then creating files in that directory that will inherit parent directory permissions; such inherited permissions may prevent the security descriptor taken from the zip file from being applied to the ne5 UNZIP.BCK  I[UNZIP542.PROGINFO]NT.SD;1BIN3.C;1 K w file. If directories exist which match directory/extract paths in the .zip file, file security is not updated on the target directory. It is assumed that if the target directory already exists, then appropriate security has already been applied to that directory. "unzip -t" will test the integrity of stored security descriptors when present and the operating system is Windows NT. ZipInfo (unzip -Z) will display information on stored security descriptor when "unzip -Zv" is specifed. Potential uses ============== The obvious use for this new support is to better support backup and restore operations in a Windows NT environment where NTFS file security is utilized. This allows individuals and organizations to archive files in a portable fashion and transport these files across the organization. Another potential use of this support is setup and installation. This allows for distribution of Windows NT based applications that have preset security on files and directories. For example, prior to creation of the .zip file, the user can set file security via File Manager or Explorer on the files to be contained in the .zip file. In many cases, it is appropriate to only grant Everyone Read access to .exe and .dll files, while granting Administrators Full control. Using this support in conjunction with the unzipsfx.exe self-extractor stub can yield a useful and powerful way to install software with preset security (note that -X or -XX should be specified on the self-extractor commandline). When creating .zip files with security which are intended for transport across systems, it is important to take into account the relevance of access control entries and the associated Sid of each entry. For example, if a .zip file is created on a Windows NT workstation, and file security references local workstation user accounts (like an account named Fred), this access entry will not be relevant if the .zip file is transported to another machine. Where possible, take advantage of the built-in well-known groups, like Administrators, Everyone, Network, Guests, etc. These groups have the same meaning on any Windows NT machine. Note that the names of these groups may differ depending on the language of the installed Windows NT, but this isn't a problem since each name has well-known ID that, upon restore, translates to the correct group name regardless of locale. When access control entries contain Sid entries that reference Domain accounts, these entries will only be relevant on systems that recognize the referenced domain. Generally speaking, the only side effects of irrelevant access control entries is wasted space in the stored security descriptor and loss of complete intended access control. Such irrelevant access control entries will show up as "Account Unknown" when viewing file security with File Manager or Explorer.  *[UNZIP542.PROGINFO]PERFORM.DOS;1+,%./ 4- I0@123KPWO56ꬬ7ꬬ89GHJDate: Wed, 27 Mar 1996 01:31:50 CET +0100 From: Christian Spieler (IKDA, THD, D-64289 Darmstadt) Subject: More detailed comparison of MSDOS Info-ZIP programs' performance Hello all, In response to some additional questions and requests concerning my previous message about DOS performance of 16/32-bit Info-ZIP programs, I have produced a more detailed comparison: System: Cx486DX-40, VL-bus, 8MB; IDE hard disk; DOS 6.2, HIMEM, EMM386 NOEMS NOVCPI, SMARTDRV 3MB, write back. I have used the main directory of UnZip 5.20p as source, including the objects and executable of an EMX compile for unzip.exe (to supply some binary test files). Tested programs were (my current updated sources!) Zip 2.0w and UnZip 5.20p - 16-bit MSC 5.1, compressed with LZEXE 0.91e - 32-bit Watcom C 10.5, as supplied by Kai Uwe Rommel (PMODE 1.22) - 32-bit EMX 0.9b - 32-bit DJGPP v2 - 32-bit DJGPP v1.12m4 The EMX and DJ1 (GO32) executables were bound with the full extender, to create standalone executables. A) Tests of Zip Command : "\zip.exe -q<#> tes.zip unz/*" (unz/*.* for Watcom!!) where <#> was: 0, 1, 6, 9. The test archive "tes.zip" was never deleted, this test measured "time to update archive". The following table contains average execution seconds (averaged over at least 3 runs, with the first run discarted to fill disk cache); numbers in parenteses specify the standard deviation of the last digits. cmpr level| 0 | 1 | 6 | 9 =============================================================== EMX win95 | 7.77 | 7.97 | 12.82 | 22.31 --------------------------------------------------------------- EMX | 7.15(40) | 8.00(6) | 12.52(25) | 20.93 DJ2 | 13.50(32) | 14.20(7) | 19.05 | 28.48(9) DJ1 | 13.56(30) | 14.48(3) | 18.70 | 27.43(13) WAT | 6.94(22) | 8.93 | 15.73(34) | 30.25(6) MSC | 5.99(82) | 9.40(4) | 13.59(9) | 20.77(4) =============================================================== The "EMX win95" line was created for comparison, to check the performance of emx 0.9 with the RSX extender in a DPMI environment. (This line was produced by applying the "stubbed" EMX executable in a full screen DOS box.) B) Tests of UnZip Commands : \unzip.exe -qt tes.zip (testing performance) \unzip.exe -qo tes.zip -dtm (extracting performance) The tes.zip archive created by maximum compression with the Zip test was used as example archive. Contents (archive size was 347783 bytes): 1028492 bytes uncompressed, 337235 bytes compressed, 67%, 85 files The extraction directory tm was not deleted between the individual runs, thus this measurement checks the "overwrite all" time. | testing | extracting =================================================================== EMX | 1.98 | 6.43(8) DJ2 | 2.09 | 11.85(39) DJ1 | 2.09 | 7.46(9) WAT | 2.42 | 7.10(27) MSC | 4.94 | 9.57(31) Remarks: The executables compiled by me were generated with all "performance" options enabled (ASM_CRC, and ASMV for Zip), and with full crypt support. For DJ1 and DJ2, the GCC options were "-O2 -m486", for EMX "-O -m486". The Watcom UnZip was compiled with ASM_CRC code enabled as well, but the Watcom Zip example was made without any optional assembler code! Discussion of the results: In overall performance, the EMX executables clearly win. For UnZip, emx is by far the fastest program, and the Zip performance is comparable to the 16-bit "reference". Whenever "real" work including I/O is requested, the DJGPP versions lose badly because of poor I/O performance, this is the case especially for the "newer" DJGPP v2 !!! (I tried to tweak with the transfer buffer size, but without any success.) An interesting result is th4] UNZIP.BCK% I [UNZIP542.PROGINFO]PERFORM.DOS;1;1  at DJ v1 UnZip works remarkably better than DJ v2 (in contrast to Zip, where both executables' performance is approximately equal). The Watcom C programs show a clear performance deficit in the "computational part" (Watcom C compiler produces code that is far from optimal), but the extender (which is mostly responsible for the I/O throughput) seems to be quite fast. The "natural" performance deficit of the 16-bit MSC code, which can be clearly seen in the "testing task" comparison for UnZip, is (mostly, for Zip more than) compensated by the better I/O throughput (due to the "direct interface" between "C RTL" and "DOS services", without any mode switching). But performance is only one aspect when choosing which compiler should be used for official distribution: Sizes of the executables: | Zip || UnZip | standalone stub || standalone | stub ====================================================================== EMX | 143,364 (1) | 94,212 || 159,748 (1) | 110,596 DJ2 | 118,272 (2) | -- || 124,928 (2) | -- DJ1 | 159,744 | 88,064 || 177,152 | 105,472 WAT | 140,073 | -- || 116,231 | -- MSC | 49,212 (3) | -- || 45,510 (3) | -- (1) does not run in "DPMI only" environment (Windows DOS box) (2) requires externally supplied DPMI server (3) compressed with LZexe 0.91 Caveats/Bugs/Problems of the different extenders: EMX: - requires two different extenders to run in all DOS-compatible environments, EMX for "raw/himem/vcpi" and RSX for "dpmi" (Windows). - does not properly support time zones (no daylight savings time) DJv2: - requires an external (freely available) DPMI extender when run on plain DOS; this extender cannot (currently ??) be bound into the executable. DJv1: - uses up large amount of "low" dos memory (below 1M) when spawning another program, each instance of a DJv1 program requires its private GO32 extender copy in low dos memory (may be problem for the zip "-T" feature) Watcom/PMODE: - extended memory is allocated statically (default: ALL available memory) This means that a spawned program does not get any extended memory. You can work around this problem by setting a hard limit on the amount of extended memory available to the PMODE program, but this limit is "hard" and restricts the allocatable memory for the program itself. In detail: The Watcom zip.exe as distributed did not allow the "zip -T" feature; there was no extended memory left to spawn unzip. I could work around this problem by applying PMSETUP to change the amount of allocated extended memory to 2.0 MByte (I had 4MB free extended memory on my test system). But, this limit cannot be enlarged at runtime, when zip needs more memory to store "header info" while zipping up a huge drive, and on a system with less free memory, this method is not applicable, either. Summary: For Zip: Use the 16-bit executable whenever possible (unless you need the larger memory capabilities when zipping up a huge amount of files) As 32-bit executable, we may distribute Watcom C (after we have confirmed that enabling ASMV and ASM_CRC give us some better computational performance.) The alternative for 32-bit remains DJGPP v1, which shows the least problems (to my knowledge); v2 and EMX cannot be used because of their lack of "universality". For UnZip: Here, the Watcom C 32-bit executable is probably the best compromise, but DJ v1 could be used as well. And, after all, the 16-bit version does not lose badly when doing "real" extraction! For the SFX stub, the 16-bit version remains first choice because of its much smaller size! Best regards Christian Spieler !*[UNZIP542.PROGINFO]TIMEZONE.TXT;1+,). / 4 !- I0@123KPWO 56D 7D 89GHJ Timezone strings: ----------------- This is a description of valid timezone strings for ENV[ARC]:TZ: "XPG3TZ - time zone information" The form of the time zone information is based on the XPG3 specification of the TZ environment variable. Spaces are allowed only in timezone designations, where they are significant. The following description closely follows the XPG3 specification, except for the paragraphs starting **CLARIFICATION**. [[],[/

\s~W1& z$'>5&@9h&a!_a7p4SvO^iw--"ULb/ S@4n{Qz8xP6x+xi,;xz ci@3/d+tT(=3 w" U6tN&$_h98*u UE6M_4>KC/<ZgE Gwhz$b4H OQ;z%3cyhH02'ws0{T1*;xW V&w6! ESX8554CM?q@ѡ/U-+"jdm_nb N b5ELf!oyg*10?b #(|c:-X/op1fTf`;?Ow&gP^`x>7|A3,?96 `/Am'Mh(/^\-[ gfyqt.A2[;[RS7Yi|ni<0\AYsmS x HS` h?YSLrsB Q6kmh6O$j.N`&K* B2?y!wZ ('d1lnR?x\H]TUZT1w D\C_IjV\^OQPAO-d?an#|H*SsFNMOk RNS9iF2n_, _ DFLwV BKBwXrCA1-|0signature == 0x4854; } int isv2_0lib() { return isv2_0() && S_ISLIB_(G.pInfo->file_attr); } int isv2_0dir() { return isv2_0() && S_ISDIR_(G.pInfo->file_attr); } #define islib() (isv2_0lib() || isv2_3lib()) #define isdir() (isv2_0dir() || isv2_3dir()) #define chmodv2_0(a,b) ((int) _sc_168(a,'p',(size_t)(b)|0x80)) #undef chmod #define chmod(a,b) (isv2_0() && chmodv2_0(a,b))||(isv2_3() && chmodv2_3(a,b)) #else #define islib() isv2_3lib() #define isdir() isv2_3dir() #undef chmod #define chmod(a,b) chmodv2_0(a,b) #endif /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=(char *)NULL; /* character pointers */ char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ #ifdef ACORN_FTYPE_NFS char *lastcomma=(char *)NULL; /* pointer to last comma in pathcomp */ #endif int error = 0; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels in Unix */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); created_dir = FALSE; /* not yet */ /* user gave full pathname: don't prepend rootpath */ renamed_fullpath = (renamed && (*G.filename == '/')); if (checkdir(__G__ (char *)NULL, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ cp = (char *)strrchr(G.filename, '/'); if (cp == (char *)NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = (char *)NULL; /* leave directory semi-colons alone */ break; default: if (isfnsym(workch) || workch == '.') *pp++ = (char)workch; else *pp++ = '_'; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ G.filename, GETPATH); if (islib() && G.filename[strlen(G.filename) - 1] == '/') G.filename[strlen(G.filename) - 1] = '\0'; if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ #if 0 /*========== NOTES ==========*/ extract-to dir: a:path/ buildpath: path1/path2/ ... (NULL-terminated) pathcomp: filename mapname(): loop over chars in zipfile member name checkdir(path component, COMPONENT | CREATEDIR) --> map as required? (d:/tmp/unzip/) (disk:[tmp.unzip.) (d:/tmp/unzip/jj/) (disk:[tmp.unzip.jj.) (d:/tmp/unzip/jj/temp/) (disk:[tmp.unzip.jj.temp.) finally add filename itself and check for existence? (could use with rename) (d:/tmp/unzip/jj/temp/msg.outdir) (disk:[tmp.unzip.jj.temp]msg.outdir) checkdir(name, GETPATH) --> copy path to name and free space #endif /* 0 */ /***********************/ /* Function checkdir() */ /***********************/ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { static int rootlen = 0; /* length of rootpath */ static char *rootpath; /* user's "extract-to" directory */ static char rootdisk[3]; /* user's "extract-to" disk */ static char *buildpath; /* full path (so far) to extracted file */ static char *end; /* pointer to end of buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { int too_long = FALSE; #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') ++end; #ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif /* GRR: could do better check, see if overrunning buffer as we go: * check end-buildpath after each append, set warning variable if * within 20 of FILNAMSIZ; then if var set, do careful check when * appx UNZIP.BCK(  [UNZIP542.THEOS]THEOS.C;1CUNZIP.C;1G*ending. Clear variable when begin new path. */ if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ too_long = TRUE; /* check if extracting directory? */ Trace((stderr, "appending disk segment [%s]\n", rootdisk)); strcat(buildpath, rootdisk); if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ if (!G.create_dirs) { /* told not to create (freshening) */ free(buildpath); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } if (islib()) { ulg size; #ifdef OLD_THEOS_EXTRA if (isv2_0lib()) size = v2_0extra()->filesize; else #endif { size = (ulg) G.extra_field[5] | ((ulg) G.extra_field[6] << 8) | ((ulg) G.extra_field[7] << 16) | ((ulg) G.extra_field[8] << 24); } if (makelib(buildpath, size / 64)) { Info(slide, 1, ((char*)slide, "checkdir error: can't create library %s\n\ unable to process %s.\n", buildpath, G.filename); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } } else if (mkdir(buildpath) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path didn't exist, tried to create, failed */ } created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode) && isdir()) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't dir */ } else if (!S_ISLIB(G.statbuf.st_mode) && islib()) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not library\n\ unable to process %s.\n", buildpath, G.filename)); free(buildpath); return 3; /* path existed but wasn't lib */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", buildpath)); free(buildpath); return 4; /* no room for filenames: fatal */ } *end++ = '/'; *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full path to the string pointed at by pathcomp, and free buildpath. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { strcpy(pathcomp, buildpath); Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); free(buildpath); buildpath = end = (char *)NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { #ifdef SHORT_NAMES char *old_end = end; #endif Trace((stderr, "appending filename [%s]\n", pathcomp)); while ((*end = *pathcomp++) != '\0') { ++end; #ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ *(end = old_end + FILENAME_MAX) = '\0'; #endif if ((end-buildpath) >= FILNAMSIZ) { *--end = '\0'; Info(slide, 0x201, ((char *)slide, "checkdir warning: path too long; truncating\n\ %s\n -> %s\n", G.filename, buildpath)); return 1; /* filename truncated */ } } strcat(buildpath, rootdisk); Trace((stderr, "buildpath now = [%s]\n", buildpath)); return 0; /* could check for existence here, prompt for new name... */ } /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ /* GRR: for VMS and TOPS-20, add up to 13 to strlen */ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpath to ")); #ifdef ACORN_FTYPE_NFS if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+ (uO.acorn_nfs_ext ? 5 : 1))) #else if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) #endif == (char *)NULL) return 10; if ((rootlen > 0) && !renamed_fullpath) { strcpy(buildpath, rootpath); end = buildpath + rootlen; } else { *buildpath = '\0'; end = buildpath; } Trace((stderr, "[%s]\n", buildpath)); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { if (pathcomp == (char *)NULL) { rootlen = 0; return 0; } if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; if ((rootlen = strlen(pathcomp)) > 0) { int prepend_slash = 0; char *tmproot, *p; if (*pathcomp == ':') { preprend_slash = 1; rootlen++; } if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { rootlen = 0; return 10; } if (prepend_slash) strcpy(tmproot, "/"); else *tmproot = '\0'; strcat(tmproot, pathcomp); Trace((stderr, "initializing root path to [%s]\n", tmproot)); if (tmproot[rootlen-1] == '/') { tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (stat(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ { if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); rootlen = 0; return 2; /* skip (or treat as stored file) */ o]I UNZIP.BCK(  [UNZIP542.THEOS]THEOS.C;1THNAME.C;1G}9 } /* create the directory (could add loop here scanning tmproot * to create more than one level, but why really necessary?) */ if (mkdir(tmproot) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", tmproot)); free(tmproot); rootlen = 0; /* path didn't exist, tried to create, and */ return 3; /* failed: file exists, or 2+ levels required */ } } /* split rootpath in path and disk */ if ((p = strchr(tmproot, ':')) != NULL) { strncpy(rootdisk, p, 2); rootdisk[2] = '\0'; *p = '\0'; rootlen = p - tmproot; } else rootdisk[0] = '\0'; if (rootpath[rootlen - 1] != '/') { rootpath[rootlen++] = '/'; rootpath[rootlen] = '\0'; } if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s], rootdisk now = [%s]\n", rootpath, rootdisk)); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (rootlen > 0) { free(rootpath); rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ #ifdef MORE /**************************/ /* Function screenlines() */ /**************************/ int screenlines() { return getpl(27) + 1; } #endif /* MORE */ #ifndef MTS /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) /* GRR: change to return PK-style warning level */ __GDEF { iztimes zt; ush z_uidgid[2]; unsigned eb_izux_flg; /*--------------------------------------------------------------------------- If symbolic links are supported, allocate a storage area, put the uncom- pressed "data" in it, and create the link. Since we know it's a symbolic link to start with, we shouldn't have to worry about overflowing unsigned ints with unsigned longs. ---------------------------------------------------------------------------*/ fclose(G.outfile); /*--------------------------------------------------------------------------- Convert from MSDOS-format local time and date to Unix-format 32-bit GMT time: adjust base year from 1980 to 1970, do usual conversions from yy/mm/dd hh:mm:ss to elapsed seconds, and account for timezone and day- light savings time differences. If we have a Unix extra field, however, we're laughing: both mtime and atime are ours. ---------------------------------------------------------------------------*/ #ifdef USE_EF_UT_TIME eb_izux_flg = (G.extra_field ? ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, #ifdef IZ_CHECK_TZ (G.tz_is_valid ? &zt : NULL), #else &zt, #endif z_uidgid) : 0); if (eb_izux_flg & EB_UT_FL_MTIME) { TTrace((stderr, "\nclose_outfile: Theos e.f. modif. time = %ld\n", zt.mtime)); } else { zt.mtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); } if (eb_izux_flg & EB_UT_FL_ATIME) { TTrace((stderr, "close_outfile: Theos e.f. access time = %ld\n", zt.atime)); } else { zt.atime = zt.mtime; TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", zt.mtime)); } #else zt.mtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); #endif /* set the file's access and modification times */ if (utime(G.filename, (ztimbuf *)&zt)) { if (uO.qflag) Info(slide, 0x201, ((char *)slide, "warning: cannot set times for %s\n", G.filename)); else Info(slide, 0x201, ((char *)slide, " (warning) cannot set times")); } /*--------------------------------------------------------------------------- Change the file permissions from default ones to those stored in the zipfile. ---------------------------------------------------------------------------*/ if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) perror("chmod (file attributes) error"); /*--------------------------------------------------------------------------- Change the file structure and set native . ---------------------------------------------------------------------------*/ if (isv2_3()) { chorg(G.filename, G.extra_field[9]); chlen(G.filename, (ush) G.extra_field[10] | ((ush) G.extra_field[11] << 8), (ush) G.extra_field[12] | ((ush) G.extra_field[13] << 8)); chgrow(G.filename, G.extra_field[14]); } #if OLD_THEOS_EXTRA else if (isv2_0()) { chorg(G.filename, G.pInfo->file_attr & 0xFF); chlen(G.filename, v2_0extra()->reclen, v2_0extra()->keylen); chgrow(G.filename, v2_0extra()->filegrow); } #endif } /* end function close_outfile() */ #endif /* !MTS */ #ifdef SET_DIR_ATTRIB /* messages of code for setting directory attributes */ static ZCONST char Far DirlistUidGidFailed[] = "warning: cannot set UID %d and/or GID %d for %s\n"; static ZCONST char Far DirlistUtimeFailed[] = "warning: cannot set modification, access times for %s\n"; # ifndef NO_CHMOD static ZCONST char Far DirlistChmodFailed[] = "warning: cannot set permissions for %s\n"; # endif int set_direc_attribs(__G__ d) __GDEF dirtime *d; { int errval = PK_OK; if (utime(d->fn, &d->u.t2)) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistUtimeFailed), d->fn)); if (!errval) errval = PK_WARN; } if (chmod(d->fn, 0xffff & d->perms)) { Info(slide, 0x201, ((char *)slide, LoadFarString(DirlistChmodFailed), d->fn)); /* perror("chmod (file attributes) error"); */ if (!errval) errval = PK_WARN; } return errval; } /* end function set_directory_attributes() */ #endif /* SET_DIR_ATTRIB */ #ifdef TIMESTAMP /***************************/ /* Function stamp_file() */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { ztimbuf tp; tp.modtime = tp.actime = modtime; return (utime(fname, &tp)); } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { char buf1[40]; extern char Far CompiledWith[]; sprintf(slide, CompiledWith, "THEOS C ","5.28", "THEOS ", "4.x", " on ", __DATE__); (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); } /* end function version() */ #endif /* !SFX */  UNZIP.BCK: [UNZIP542.THEOS]THSCFG.H;1HNAME.C;1\-*[UNZIP542.THEOS]THSCFG.H;1+,:./ 4- 0@123KPWO5681} 781} 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __theos_thscfg_h #define __theos_thscfg_h #include /* dup proto & unix system calls live here */ #define _HANDLE_DEFINED #include /* O_BINARY for open() w/o CR/LF translation */ #include #include #include /* off_t, time_t, dev_t, ... */ #include "theos/stat.h" #include #define GOT_UTIMBUF #define DATE_FORMAT dateformat() #define SCREENLINES screenlines() #define USE_EF_UT_TIME #define DIR_END '/' #define INT_SPRINTF #define lenEOL 1 #define PutNativeEOL *q++ = native(CR); #define PIPE_ERROR (errno = 9999) #define isatty(a) _isatty(a) #undef match int open(const char *name, int mode, ...); size_t read(int fd, char *buf, size_t len); size_t write(int fd, char *buf, size_t len); unsigned long lseek(int fd, long offset, int base); int close(int); int _fprintf(FILE *fp, const char *fmt, ...); int _isatty(int); typedef unsigned char uid_t; typedef unsigned char gid_t; extern int _sprintf(char *s, const char *fmt, ...); #ifndef NO_BOGUS_SPC # include # undef fprintf # undef sprintf # define fprintf _fprintf # define sprintf _sprintf #else /* NO_BOGUS_SPC */ #ifndef Info /* may already have been defined for redirection */ # ifdef FUNZIP # define Info(buf,flag,sprf_arg) \ fprintf((flag)&1? stderr : stdout, (char *)(_sprintf sprf_arg, (buf))) # else # define Info(buf,flag,sprf_arg) \ UzpMessagePrnt((zvoid *)&G, (uch *)(buf), (ulg)_sprintf sprf_arg, (flag)) # endif #endif /* !Info */ #endif /* ?NO_BOGUS_SPC */ #endif /* !__theos_thscfg_h */ *[UNZIP542.THEOS]_FPRINTF.C;1+,N&./ 4- 0@123KPWO56QL 7QL 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #include #include /* for Info and similar macroes. fprintf is already a macro and fprintf x * fools the preprocessor */ int _fprintf(FILE* fp, const char* fmt, ...) { va_list ap; long n; va_start(ap, fmt); n = vfprintf(fp, fmt, (long*) ap); va_end(ap); return n; } *[UNZIP542.THEOS]_ISATTY.C;1+,O4./ 4- 0@123KPWO56O 7O 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* replace standard library function who needs a FILE* */ #pragma library #include #include #include #include short _isatty(int fd) { register short lub; lub = (int) _fcntl(&stdin[fd], 5, (size_t) 0); return (lub >= CONIN && lub <= CONOUT) || (lub >= COM1 && lub <= COM4) || (lub >= COM5 && lub <= COM16); } *[UNZIP542.THEOS]_SETARGV.C;1+,P(. / 4 - 0@123KPWO 56Ip 7Ip 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* * _setargv.c - derived from an command argument expander * * Author : Jean-Michel Dubois * Date : 13-Dec-98 * * Function: Looks for member names (fn.ft.mb) and add the libraries names * (fn.ft) to the list of files to zip to force inclusion of * libraries if necessary. * Strings beginning by a dash are considered as options and left * unchanged. * * Syntax : void _setargv(int *argc, char ***argv); * * Returns : new argc. Caller's argc and argv are updated. * If a insufficient memory condition occurs, return 0 and errno * is set to ENOMEM. * * Example : * main(int argc, char **argv) * { * if (_setargv(&argc, &argv)) { * ... */ #pragma library #include #include #include #include #include #include #include /* Allocate argv array in 16 entries chunks */ static int allocarg(int n, int asize, char ***nargv, char *s) { if ((n+1) > asize) { /* If array full */ asize += 16; /* increase size and reallocate */ if (!(*nargv = (char **) realloc(*nargv, asize * sizeof (void *)))) { errno = _errnum = ENOMEM; /* Not enough memory */ return 0; } } (*nargv)[n] = strdup(s); /* Save argument */ return asize; /* Return new maxsize */ } /* check if file is a member of a library */ int ismember(char* path) { char* p; if ((p = strrchr(path, '/')) == NULL) p = path; return ((p = strchr(p, '.')) && (p = strchr(p + 1, '.'))); } /* extract library name from a file name */ char* libname(char* path) { char* p; static char lib[256]; char disk[3]; strcpy(lib, path); if (p = strrchr(lib, ':')) { strncpy(disk, p, 2); disk[2] = '\0'; *p = '\0' ; } else disk[0] = '\0'; if ((p = strrchr(lib, '/')) == NULL) p = lib; p = strchr(p, '.'); p = strchr(p + 1, '.'); *p = 0; strcat(lib, disk); return lib; } /* Main body of the function */ int _setargv(int *argc, char ***argv) { register int nargc; /* New arguments coͻ UNZIP.BCKP( [UNZIP542.THEOS]_SETARGV.C;1IP.C;1 unter */ char **nargv; /* New arguments pointers */ register int i, j; int asize; /* argv array size */ char *arg; char lib[256]; _errnum = 0; nargc = 0; /* Initialise counter, size counter */ asize = *argc; /* and new argument vector to the */ /* current argv array size */ if ((nargv = (char **) calloc((size_t) *argc, sizeof (void *))) != NULL) { /* For each initial argument */ for (i = 0; i < *argc; i++) { arg = (*argv)[i]; #ifdef DEBUG fprintf(stderr, "checking arg: %s", arg); #endif if (i == 0 || *arg == '-' || ! ismember(arg)) { /* if it begins with a dash or doesn't include * a library name simply add it to the new array */ if (! (asize = allocarg(nargc, asize, &nargv, arg))) return 0; /* Not enough memory */ nargc++; } else { short insert; strcpy(lib, libname(arg)); /* add library name if necessary */ for (j = 2, insert = 1; i < nargc; i++) { if (ismember(nargv[i]) && ! strcmp(lib, libname(nargv[i]))) { insert = 0; break; } } if (insert) { #ifdef DEBUG fprintf(stderr, "inserting lib %s ", lib); #endif if (! (asize = allocarg(nargc, asize, &nargv, lib))) return 0; /* Not enough memory */ nargc++; } /* add file name */ #ifdef DEBUG fprintf(stderr, "inserting file %s", arg); #endif if (! (asize = allocarg(nargc, asize, &nargv, arg))) return 0; /* Not enough memory */ nargc++; } #ifdef DEBUG fprintf(stderr, "\n"); #endif } /* Update caller's parameters */ *argc = nargc; *argv = nargv; /* and sign on success */ return nargc; } /* If it is not possible to allocate initial array, sign on error */ _errnum = ENOMEM; return 0; } *[UNZIP542.THEOS]_SPRINTF.C;1+,Q,./ 4- 0@123KPWO56y 7y 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #include #include /* for Info and similar macroes. fprintf is already a macro and fprintf x * fools the preprocessor */ int _sprintf(char *s, const char *fmt, ...) { va_list ap; long n; va_start(ap, fmt); n = vsprintf(s, fmt, (long*) ap); va_end(ap); return n; } *[UNZIP542.THEOS]_STAT.C;1+,R./ 4- 0@123KPWO56b 7b 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #pragma library #include #include #include #include #include #include #include #include #include #include "theos/stat.h" /* replacement for standard library functions stat and fstat */ int _stat_(struct stat* st, struct fdb* fdb); int _dstat_(struct stat* st); #define peekucb() peeknuc() /* map THEOS protection code to Unix modes */ unsigned short _tm2um_(char protect) { unsigned short umask = 0; if (!(protect & _FDB_READ_PROTECT)) umask = S_IRUSR|S_IRGRP; if (!(protect & _FDB_WRITE_PROTECT)) umask |= S_IWUSR|S_IWGRP; if (!(protect & _FDB_EXECUTE_PROTECT)) umask |= S_IXUSR|S_IXGRP; if (!(protect & _FDB_ERASE_PROTECT)) umask |= S_IEUSR|S_IEGRP; if (!(protect & _FDB_SHARED_READ_PROTECT)) { if (_osmajor > 3) umask |= S_IROTH|S_IXOTH; else umask |= S_IROTH; } if (!(protect & _FDB_SHARED_WRITE_PROTECT)) umask |= S_IWOTH; if (!(protect & _FDB_MODIFIED)) { if (_osmajor > 3) umask |= S_IMODF; else umask |= S_IXOTH; } if (protect & _FDB_NOT_HIDDEN) umask |= S_INHID; return umask; } /* map Unix modes to THEOS protections */ char _um2tm_(unsigned short mask) { char protect = 0; if (!(mask & (S_IRUSR|S_IRGRP))) protect |= _FDB_READ_PROTECT; if (!(mask & (S_IWUSR|S_IWGRP))) protect |= _FDB_WRITE_PROTECT; if (!(mask & (S_IXUSR|S_IXGRP))) protect |= _FDB_EXECUTE_PROTECT; if (!(mask & (S_IEUSR|S_IEGRP))) protect |= _FDB_ERASE_PROTECT; if (_osmajor < 4) { if (!(mask & S_IROTH)) protect |= _FDB_SHARED_READ_PROTECT; } else { if (!(mask & (S_IROTH|S_IXOTH))) protect |= _FDB_SHARED_READ_PROTECT; } if (!(mask & S_IWOTH)) protect |= _FDB_SHARED_WRITE_PROTECT; if (mask & S_IMODF && _osmajor > 3) protect |= _FDB_MODIFIED; if (mask & S_INHID && _osmajor > 3) protect |= _FDB_NOT_HIDDEN; return protect; } /* root directory stat */ static int rdirstat(char* fn, struct stat *st) { register char* p = strchr(fn, ':'); char drive; drive = p ? p[1] : 'S'; if (drive >= 'a' && drive <= 'Z') drive -= 0x40; memset(st, 0, sizeof(struct stat)); if (getlub(drive - 'A') != 255) { st->st_org = _FDB_STAT_DIRECTORY; st->st_mode = S_IFDIR|S_IRUSR|S_IWUSR|S_IROTH|S_IWOTH; st->st_nlink = 1; st->st_dev = st->st_rdev = drive - 'A'; st->st_uid = st->st_gid = getuid(); st->st_protect = _FDB_ERASE_PROTECT; return 0; } errno = _errnum = ENOENT; _errarg = fn; return -1; } /* file stat */ int _stat(const char *fn, struct stat *st) { char buf[256], buf2[256]; char *ifn; register struct fdb *fdb; register char *p; if ((ifn = (char *)malloc(strlen(fn)+1)) == NULL) { errno = _errnum = ENOMEM; return -1; } if (p = strrchr(ifn, ':')) *p = 0; /* on current drive ./:d and .:m point to current dir * on another drive to root directory */ if (! ^q UNZIP.BCKR [UNZIP542.THEOS]_STAT.C;1ZIP_RC.HQX;1 strcmp(ifn, "/") || ! strcmp(ifn, ".") || ! strcmp(ifn, "./")) { if (p == NULL) { free(ifn); /* current dir on current drive */ ifn = getcwd(buf2, 256); /* getcwd returns NULL on root dir on drive S */ if (ifn == NULL) strcpy(ifn = buf2, "/:S"); /* getcwd returns /:d on root dir on any other drive */ if (ifn[1] == ':') return rdirstat(ifn, st); } else { int rstat; *p = ':'; rstat = rdirstat(ifn, st); free(ifn); return rstat; } } if (p) *p = ':'; strcpy(buf2, ifn); /* remove trailing slash before optional disk name */ if (p = strrchr(buf2, '/')) { if (p[1] == ':') { *p = p[1]; p[1] = p[2]; p[2] = p[3]; } else if (p[1] == '\0') *p = '\0'; } /* if ifn is a file get file directory block structure and device */ if (fdb = _locate(buf2, buf, &st->st_dev)) { /* is it a file from another user... */ if (strchr(buf2, '\\') /* a public system file */ || fdb->fileowner == 0 /* or a file from the current user account ? */ || fdb->fileowner == getuid()) { /* yes, return stat */ return _stat_(st, fdb); } else { /* no, say file doesn't exist */ errno = _errnum = ENOENT; _errarg = fn; return -1; } } /* else should be a device */ st->st_rdev = st->st_dev = _lub_name(*ifn == ':' ? ifn+1 : ifn); free(ifn); if (st->st_dev != -1 && getlub(st->st_dev) != 255) return _dstat_(st); errno = _errnum = ENOENT; _errarg = fn; return -1; } int _fstat(int fd, struct stat *st) { unsigned short fsanum; struct fsa fsa; register FILE *fp; int status; register int i; register char *p; if (fd < FOPEN_MAX) { fp = &stdin[fd]; if (_fcntl(fp,1,0) & 0x80) { fsanum = (unsigned short) _fcntl(fp,83,0); st->st_dev = (unsigned short) _fcntl(fp,5,0); if (st->st_dev >= A_DISK && st->st_dev <= Z_DISK) { for (i = 0, fsanum *= sizeof(fsa), p = (char *) &fsa; i < (sizeof(fsa)); i++, fsanum++, p++) *p = _peekfsa((char *) fsanum); status = _stat_(st, (struct fdb*) &fsa); if ((st->st_blksize = _fcntl(fp,817,0)) == 0) st->st_blksize = BUFSIZ; return status; } return _dstat_(st); } } errno = _errnum = EBADF; return -1; } static int _isprt(int dev) { return IS_PRT_LUB(dev); } /* device stat */ int _dstat_(st) register struct stat* st; { register struct ucb* ucb; ucb = getucb(st->st_dev); st->st_ino = 0; if (st->st_dev <= Z_DISK || (st->st_dev >= TAPE1 && st->st_dev <= TAPE4)) { st->st_mode = S_IFBLK | S_IWUSR | S_IRUSR; if (peekucb(&ucb->devowner) == 255) st->st_mode |= S_IWGRP | S_IWOTH | S_IRGRP | S_IROTH; } else { st->st_mode = S_IFCHR | S_IWUSR; if (_isprt(st->st_dev)) st->st_mode |= S_IRUSR; if (peekucb(&ucb->devowner) == 255) { st->st_mode |= S_IWGRP | S_IWOTH; if (_isprt(st->st_dev)) st->st_mode |= S_IRGRP | S_IROTH; } } st->st_nlink = 1; st->st_uid = st->st_gid = getuid(); st->st_size = 0; st->st_atime = st->st_mtime = st->st_ctime = 0; st->st_rlen = 0; st->st_klen = 0; st->st_grow = 0; st->st_blksize = 0; return 0; } /* regular file stat */ int _stat_(st, fdb) register struct stat* st; register struct fdb* fdb; { st->st_rdev = st->st_dev; st->st_ino = 0; st->st_org = fdb->filestat; switch (fdb->filestat) { case _FDB_STAT_LIBRARY: st->st_mode = S_IFLIB; break; case _FDB_STAT_DIRECTORY: st->st_mode = S_IFDIR; break; case _FDB_STAT_STREAM: st->st_mode = S_IFREG; break; case _FDB_STAT_RELATIVE: st->st_mode = S_IFREL; break; case _FDB_STAT_KEYED: st->st_mode = S_IFKEY; break; case _FDB_STAT_INDEXED: st->st_mode = S_IFIND; break; case _FDB_STAT_RANDOM: st->st_mode = S_IFRND; break; case _FDB_STAT_PROGRAM: st->st_mode = S_IFR16; break; case _FDB_STAT_16_BIT_PROGRAM: st->st_mode = S_IFP16; break; case _FDB_STAT_32_BIT_PROGRAM: st->st_mode = S_IFP32; break; } st->st_mode |= _tm2um_(st->st_protect = fdb->protect); st->st_nlink = 1; st->st_uid = st->st_gid = fdb->fileowner; st->st_size = fdb->filesize; st->st_atime = st->st_mtime = st->st_ctime = getfiledate(fdb); st->st_rlen = fdb->reclen; st->st_klen = fdb->keylen; st->st_grow = fdb->filegrow; st->st_blksize = 0; return 0; } #include struct dirent* _opendir(const char* dirpath) { int l; char *p; struct dirent* dir; char *mypath = NULL; if (dirpath != NULL && (mypath = (char *)malloc(strlen(dirpath)+1)) == NULL) { errno = _errnum = ENOMEM; return NULL; } if (mypath) { l = strlen(mypath); if (l) { p = dirpath + l - 1; if (*p == '/') { *p = '\0'; dir = opendir(dirpath); *p = '/'; return dir; } } } return opendir(mypath); } *[UNZIP542]TIMEZONE.C;1+, *.3/ 433- 0@123KPWO456(:a7(:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Replacement time library functions, based on platform independent public * domain timezone code from ftp://elsie.nci.nih.gov/pub, with mktime and * mkgmtime from our own mktime.c in Zip. * * Contains: tzset() * __tzset() * gmtime() * localtime() * mktime() * mkgmtime() * GetPlatformLocalTimezone() [different versions] */ /* HISTORY/CHANGES * 17 Jun 00, Paul Kienitz, added the PD-based tzset(), localtime(), and so on * to amiga/filedate.c, replacing GNU-based functions which had * replaced time_lib.c, both having been rejected for licensing * reasons. Support for timezone files and leap seconds was removed. * * 23 Aug 00, Paul Kienitz, split into separate timezone.c file, made platform * independent, copied in mktime() and mkgmtime() from Zip, renamed * locale_TZ as GetPlatformLocalTimezone(), for use as a generic * hook by other platforms. */ #ifndef __timezone_c #define __timezone_c #include "zip.h" #include "timezone.h" #include #include #ifdef IZTZ_DEFINESTDGLOBALS long timezone = 0; inzxU> UNZIP.BCK * [UNZIP542]TIMEZONE.C;1B.H;13t daylight = 0; char *tzname[2]; #endif #ifndef IZTZ_GETLOCALETZINFO # define IZTZ_GETLOCALETZINFO(ptzstruct, pgenrulefunct) (FALSE) #endif int real_timezone_is_set = FALSE; /* set by tzset() */ #define TZDEFRULESTRING ",M4.1.0,M10.5.0" #define TZDEFAULT "EST5EDT" #define SECSPERMIN 60 #define MINSPERHOUR 60 #define HOURSPERDAY 24 #define DAYSPERWEEK 7 #define DAYSPERNYEAR 365 #define DAYSPERLYEAR 366 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) #define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) #define MONSPERYEAR 12 #define EPOCH_WDAY 4 /* Jan 1, 1970 was thursday */ #define EPOCH_YEAR 1970 #define TM_YEAR_BASE 1900 #define FIRST_GOOD_YEAR ((time_t) -1 < (time_t) 1 ? EPOCH_YEAR-68 : EPOCH_YEAR) #define LAST_GOOD_YEAR (EPOCH_YEAR + ((time_t) -1 < (time_t) 1 ? 67 : 135)) #define YDAYS(month, year) yr_days[leap(year)][month] /* Nonzero if `y' is a leap year, else zero. */ #define leap(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0) /* Number of leap years from EPOCH_YEAR to `y' (not including `y' itself). */ #define _P4 ((EPOCH_YEAR / 4) * 4 + 1) #define _P100 ((EPOCH_YEAR / 100) * 100 + 1) #define _P400 ((EPOCH_YEAR / 400) * 400 + 1) #define nleap(y) (((y) - _P4) / 4 - ((y) - _P100) / 100 + ((y) - _P400) / 400) /* Length of month `m' (0 .. 11) */ #define monthlen(m, y) (yr_days[0][(m)+1] - yr_days[0][m] + \ ((m) == 1 && leap(y))) /* internal module-level constants */ #ifndef IZ_MKTIME_ONLY static ZCONST char gmt[] = "GMT"; static ZCONST int mon_lengths[2][MONSPERYEAR] = { { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }; #endif /* !IZ_MKTIME_ONLY */ static ZCONST int yr_days[2][MONSPERYEAR+1] = { { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; #ifndef IZ_MKTIME_ONLY static ZCONST int year_lengths[2] = { DAYSPERNYEAR, DAYSPERLYEAR }; /* internal variables */ static struct state statism; /* prototypes of static functions */ static time_t transtime OF((ZCONST time_t janfirst, ZCONST int year, ZCONST struct rule * ZCONST rulep, ZCONST long offset)); static void generate_transitions OF((register struct state * ZCONST sp, ZCONST struct rule * ZCONST start, ZCONST struct rule * ZCONST end)); static ZCONST char *getzname OF((ZCONST char *strp)); static ZCONST char *getnum OF((ZCONST char *strp, int * ZCONST nump, ZCONST int min, ZCONST int max)); static ZCONST char *getsecs OF((ZCONST char *strp, long * ZCONST secsp)); static ZCONST char *getoffset OF((ZCONST char *strp, long * ZCONST offsetp)); static ZCONST char *getrule OF((ZCONST char *strp, struct rule * ZCONST rulep)); static int Parse_TZ OF((ZCONST char *name, register struct state * ZCONST sp)); static time_t transtime(janfirst, year, rulep, offset) ZCONST time_t janfirst; ZCONST int year; ZCONST struct rule * ZCONST rulep; ZCONST long offset; { register int leapyear; register time_t value; register int i; int d, m1, yy0, yy1, yy2, dow; value = 0; leapyear = leap(year); switch (rulep->r_type) { case JULIAN_DAY: /* ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap ** years. ** In non-leap years, or if the day number is 59 or less, just ** add SECSPERDAY times the day number-1 to the time of ** January 1, midnight, to get the day. */ value = janfirst + (rulep->r_day - 1) * SECSPERDAY; if (leapyear && rulep->r_day >= 60) value += SECSPERDAY; break; case DAY_OF_YEAR: /* ** n - day of year. ** Just add SECSPERDAY times the day number to the time of ** January 1, midnight, to get the day. */ value = jan first + rulep->r_day * SECSPERDAY; break; case MONTH_NTH_DAY_OF_WEEK: /* ** Mm.n.d - nth "dth day" of month m. */ value = janfirst; /* for (i = 0; i < rulep->r_mon - 1; ++i) value += mon_lengths[leapyear][i] * SECSPERDAY; */ value += yr_days[leapyear][rulep->r_mon - 1] * SECSPERDAY; /* ** Use Zeller's Congruence to get day-of-week of first day of ** month. */ m1 = (rulep->r_mon + 9) % 12 + 1; yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; yy1 = yy0 / 100; yy2 = yy0 % 100; dow = ((26 * m1 - 2) / 10 + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; if (dow < 0) dow += DAYSPERWEEK; /* ** "dow" is the day-of-week of the first day of the month. Get ** the day-of-month (zero-origin) of the first "dow" day of the ** month. */ d = rulep->r_day - dow; if (d < 0) d += DAYSPERWEEK; for (i = 1; i < rulep->r_week; ++i) { if (d + DAYSPERWEEK >= mon_lengths[leapyear][rulep->r_mon - 1]) break; d += DAYSPERWEEK; } /* ** "d" is the day-of-month (zero-origin) of the day we want. */ value += d * SECSPERDAY; break; } /* ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in ** question. To get the Epoch-relative time of the specified local ** time on that day, add the transition time and the current offset ** from UTC. */ return value + rulep->r_time + offset; } static void generate_transitions(sp, start, end) register struct state * ZCONST sp; ZCONST struct rule * ZCONST start; ZCONST struct rule * ZCONST end; { register int year; register time_t janfirst; time_t starttime; time_t endtime; long stdoffset = -sp->ttis[0].tt_gmtoff; long dstoffset = -sp->ttis[1].tt_gmtoff; register time_t * atp; register unsigned char * typep; /* ** Two transitions per year, from EPOCH_YEAR to LAST_GOOD_YEAR. */ sp->timecnt = 2 * (LAST_GOOD_YEAR - EPOCH_YEAR + 1); atp = sp->ats; typep = sp->types; janfirst = 0; for (year = EPOCH_YEAR; year <= LAST_GOOD_YEAR; ++year) { starttime = transtime(janfirst, year, start, stdoffset); endtime = transtime(janfirst, year, end, dstoffset); if (starttime > endtime) { *atp++ = endtime; *typep++ = 0; /* DST ends */ *atp++ = starttime; *typep++ = 1; /* DST begins */ } else { *atp++ = starttime; *typep++ = 1; /* DST begins */ *atp++ = endtime; *typep++ = 0; /* DST ends */ } janfirst += year_lengths[leap(year)] * SECSPERDAY; } } static ZCONST char *getzname(strp) ZCONST char *strp; { register char c; while ((c = *strp) != '\0' && !isdigit(c) && c != ',' && c != '-' && c != '+') ++strp; return strp; } static ZCONST char *getnum(strp, nump, min, max) ZCONST char *strp; int * ZCONST nump; ZCONST int min; ZCONST int max; { register char c; register int num; if (strp == NULL || !isdigit(c = *strp)) return NULL; num = 0; do { num = num * 10 + (c - '0'); if (num > max) return NULL; /* illegal va.k UNZIP.BCK * [UNZIP542]TIMEZONE.C;1J.XML;13klue */ c = *++strp; } while (isdigit(c)); if (num < min) return NULL; /* illegal value */ *nump = num; return strp; } static ZCONST char *getsecs(strp, secsp) ZCONST char *strp; long * ZCONST secsp; { int num; /* ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like ** "M10.4.6/26", which does not conform to Posix, ** but which specifies the equivalent of ** ``02:00 on the first Sunday on or after 23 Oct''. */ strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); if (strp == NULL) return NULL; *secsp = num * (long) SECSPERHOUR; if (*strp == ':') { ++strp; strp = getnum(strp, &num, 0, MINSPERHOUR - 1); if (strp == NULL) return NULL; *secsp += num * SECSPERMIN; if (*strp == ':') { ++strp; /* `SECSPERMIN' allows for leap seconds. */ strp = getnum(strp, &num, 0, SECSPERMIN); if (strp == NULL) return NULL; *secsp += num; } } return strp; } static ZCONST char *getoffset(strp, offsetp) ZCONST char *strp; long * ZCONST offsetp; { register int neg = 0; if (*strp == '-') { neg = 1; ++strp; } else if (*strp == '+') ++strp; strp = getsecs(strp, offsetp); if (strp == NULL) return NULL; /* illegal time */ if (neg) *offsetp = -*offsetp; return strp; } static ZCONST char *getrule(strp, rulep) ZCONST char *strp; struct rule * ZCONST rulep; { if (*strp == 'J') { /* ** Julian day. */ rulep->r_type = JULIAN_DAY; ++strp; strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); } else if (*strp == 'M') { /* ** Month, week, day. */ rulep->r_type = MONTH_NTH_DAY_OF_WEEK; ++strp; strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); if (strp == NULL) return NULL; if (*strp++ != '.') return NULL; strp = getnum(strp, &rulep->r_week, 1, 5); if (strp == NULL) return NULL; if (*strp++ != '.') return NULL; strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); } else if (isdigit(*strp)) { /* ** Day of year. */ rulep->r_type = DAY_OF_YEAR; strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); } else return NULL; /* invalid format */ if (strp == NULL) return NULL; if (*strp == '/') { /* ** Time specified. */ ++strp; strp = getsecs(strp, &rulep->r_time); } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ return strp; } static int Parse_TZ(name, sp) ZCONST char *name; register struct state * ZCONST sp; { ZCONST char * stdname; ZCONST char * dstname; size_t stdlen; size_t dstlen; long stdoffset; long dstoffset; register char * cp; dstname = NULL; stdname = name; name = getzname(name); stdlen = name - stdname; if (stdlen < 3) return -1; if (*name == '\0') return -1; name = getoffset(name, &stdoffset); if (name == NULL) return -1; if (*name != '\0') { dstname = name; name = getzname(name); dstlen = name - dstname; /* length of DST zone name */ if (dstlen < 3) return -1; if (*name != '\0' && *name != ',' && *name != ';') { name = getoffset(name, &dstoffset); if (name == NULL) return -1; } else dstoffset = stdoffset - SECSPERHOUR; if (*name == '\0') name = TZDEFRULESTRING; if (*name == ',' || *name == ';') { struct rule start; struct rule end; ++name; if ((name = getrule(name, &start)) == NULL) return -1; if (*name++ != ',') return -1; if ((name = getrule(name, &end)) == NULL) return -1; if (*name != '\0') return -1; sp->typecnt = 2; /* standard time and DST */ sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; sp->ttis[1].tt_gmtoff = -dstoffset; sp->ttis[1].tt_isdst = 1; sp->ttis[1].tt_abbrind = stdlen + 1; generate_transitions(sp, &start, &end); } } else { dstlen = 0; sp->typecnt = 1; /* only standard time */ sp->timecnt = 0; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; } sp->charcnt = stdlen + 1; if (dstlen != 0) sp->charcnt += dstlen + 1; if ((size_t) sp->charcnt > sizeof(sp->chars)) return -1; cp = sp->chars; (void) strncpy(cp, stdname, stdlen); cp += stdlen; *cp++ = '\0'; if (dstlen != 0) { (void) strncpy(cp, dstname, dstlen); *(cp + dstlen) = '\0'; } return 0; } void tzset() { char *TZstring; int dstfirst; static char *old_TZstring = NULL; TZstring = getenv("TZ"); /* read TZ envvar */ if (old_TZstring && TZstring && !strcmp(old_TZstring, TZstring)) /* do not repeatedly parse an unchanged TZ specification */  return; if ((TZstring && TZstring[0] && Parse_TZ(TZstring, &statism) == 0) || IZTZ_GETLOCALETZINFO(&statism, generate_transitions) || Parse_TZ(gmt, &statism) == 0) { daylight = statism.typecnt > 1; dstfirst = daylight && statism.ttis[0].tt_isdst && !statism.ttis[1].tt_isdst; timezone = -statism.ttis[dstfirst].tt_gmtoff; tzname[0] = statism.chars + statism.ttis[dstfirst].tt_abbrind; tzname[1] = statism.chars + statism.ttis[!dstfirst].tt_abbrind; real_timezone_is_set = TRUE; if (TZstring) { if (old_TZstring) old_TZstring = realloc(old_TZstring, strlen(TZstring) + 1); else old_TZstring = malloc(strlen(TZstring) + 1); if (old_TZstring) strcpy(old_TZstring, TZstring); } } else { timezone = 0; /* default is GMT0 which means no offsets */ daylight = 0; /* from local system time */ real_timezone_is_set = FALSE; if (old_TZstring) { free(old_TZstring); old_TZstring = NULL; } } #ifdef IZTZ_SETLOCALTZINFO /* Some SAS/C library functions, e.g. stat(), call library */ /* __tzset() themselves. So envvar TZ *must* exist in order to */ /* to get the right offset from GMT. XXX TRY HARD to fix this! */ set_TZ(timezone, daylight); #endif /* IZTZ_SETLOCALTZINFO */ } /* XXX Does this also help SAS/C library work? */ void __tzset() { if (!real_timezone_is_set) tzset(); } static struct tm _tmbuf; struct tm *gmtime(when) ZCONST time_t *when; { long days = *when / SECSPERDAY; long secs = *when % SECSPERDAY; int isleap; memset(&_tmbuf, 0, sizeof(_tmbuf)); /* get any nonstandard fields */ _tmbuf.tm_wday = (days + EPOCH_WDAY) % 7; _tmbuf.tm_year = EPOCH_YEAR - TM_YEAR_BASE; isleap = leap(_tmbuf.tm_year + TM_YEAR_BASE); while (days >= year_lengths[isleap]) { days -= year_lengths[isleap];gY` UNZIP.BCK * [UNZIP542]TIMEZONE.C;1J.XML;13," _tmbuf.tm_year++; isleap = leap(_tmbuf.tm_year + TM_YEAR_BASE); } _tmbuf.tm_mon = 0; _tmbuf.tm_yday = days; while (days >= mon_lengths[isleap][_tmbuf.tm_mon]) days -= mon_lengths[isleap][_tmbuf.tm_mon++]; _tmbuf.tm_mday = days + 1; _tmbuf.tm_isdst = 0; _tmbuf.tm_sec = secs % SECSPERMIN; _tmbuf.tm_min = (secs / SECSPERMIN) % SECSPERMIN; _tmbuf.tm_hour = secs / SECSPERHOUR; return &_tmbuf; } struct tm *localtime(when) ZCONST time_t *when; { time_t localwhen = *when; int timetype; struct tm *ret; __tzset(); if (statism.timecnt == 0 || localwhen < statism.ats[0]) timetype = statism.ttis[0].tt_isdst && statism.typecnt > 1 && !statism.ttis[1].tt_isdst; else { for (timetype = 1; timetype < statism.timecnt; ++timetype) if (localwhen < statism.ats[timetype]) break; timetype = statism.types[timetype - 1]; } localwhen += statism.ttis[timetype].tt_gmtoff; ret = gmtime(&localwhen); ret->tm_isdst = statism.ttis[timetype].tt_isdst; return ret; } #ifdef NEED__ISINDST int _isindst(tb) struct tm *tb; { time_t localt; /* time_t equivalent of given tm struct */ time_t univt; /* assumed UTC value of given time */ long tzoffset_adj; /* timezone-adjustment `remainder' */ int bailout_cnt; /* counter of tries for tz correction */ int timetype; __tzset(); /* when DST is unsupported in current timezone, DST is always off */ if (statism.typecnt <= 1) return FALSE; localt = mkgmtime(tb); if (localt == (time_t)-1) /* specified time is out-of-range, default to FALSE */ return FALSE; univt = localt - statism.ttis[0].tt_gmtoff; bailout_cnt = 3; do { if (statism.timecnt == 0 || univt < statism.ats[0]) timetype = statism.ttis[0].tt_isdst && statism.typecnt > 1 && !statism.ttis[1].tt_isdst; else { for (timetype = 1; timetype < statism.timecnt; ++timetype) if (univt < statism.ats[timetype]) break; timetype = statism.types[timetype - 1]; } if ((tzoffset_adj = localt - univt - statism.ttis[timetype].tt_gmtoff) == 0L) break; univt += tzoffset_adj; } while (--bailout_cnt > 0); /* return TRUE when DST is active at given time */ return (statism.ttis[timetype].tt_isdst); } #endif /* NEED__ISINDST */ #endif /* !IZ_MKTIME_ONLY */ /* Return the equivalent in seconds past 12:00:00 a.m. Jan 1, 1970 GMT of the local time and date in the exploded time structure `tm', adjust out of range fields in `tm' and set `tm->tm_yday', `tm->tm_wday'. If `tm->tm_isdst < 0' was passed to mktime(), the correct setting of tm_isdst is determined and returned. Otherwise, mktime() assumes this field as valid; its information is used when converting local time to UTC. Return -1 if time in `tm' cannot be represented as time_t value. */ time_t mktime(tm) struct tm *tm; { struct tm *ltm; /* Local time. */ time_t loctime; /* The time_t value of local time. */ time_t then; /* The time to return. */ long tzoffset_adj; /* timezone-adjustment `remainder' */ int bailout_cnt; /* counter of tries for tz correction */ int save_isdst; /* Copy of the tm->isdst input value */ save_isdst = tm->tm_isdst; loctime = mkgmtime(tm); if (loctime == -1) { tm->tm_isdst = save_isdst; return (time_t)-1; } /* Correct for the timezone and any daylight savings time. The correction is verified and repeated when not correct, to take into account the rare case that a change to or from daylight savings time occurs between when it is the time in `tm' locally and when it is that time in Greenwich. After the second correction, the "timezone & daylight" offset should be correct in all cases. To be sure, we allow a third try, but then the loop is stopped. */ bailout_cnt = 3; then = loctime; do { ltm = localtime(&then); if (ltm == (struct tm *)NULL || (tzoffset_adj = loctime - mkgmtime(ltm)) == 0L) break; then += tzoffset_adj; } while (--bailout_cnt > 0); if (ltm == (struct tm *)NULL || tzoffset_adj != 0L) { /* Signal failure if timezone adjustment did not converge. */ tm->tm_isdst = save_isdst; return (time_t)-1; } if (save_isdst >= 0) { if (ltm->tm_isdst && !save_isdst) { if (then + 3600 < then) then = (time_t)-1; else then += 3600; } else if (!ltm->tm_isdst && save_isdst) { if (then - 3600 > then) then = (time_t)-1; else then -= 3600; } ltm->tm_isdst = save_isdst; } if (tm != ltm) /* `tm' may already point to localtime's internal storage */ *tm = *ltm; return then; } #ifndef NO_TIME_T_MAX /* Provide default values for the upper limit of the time_t range. These are the result of the decomposition into a `struct tm' for the time value 0xFFFFFFFEL ( = (time_t)-2 ). Note: `(time_t)-1' is reserved for "invalid time"! */ # ifndef TM_YEAR_MAX # define TM_YEAR_MAX 2106 # endif # ifndef TM_MON_MAX # define TM_MON_MAX 1 /* February */ # endif # ifndef TM_MDAY_MAX # define TM_MDAY_MAX 7 # endif # ifndef TM_HOUR_MAX # define TM_HOUR_MAX 6 # endif # ifndef TM_MIN_MAX # define TM_MIN_MAX 28 # endif # ifndef TM_SEC_MAX # define TM_SEC_MAX 14 # endif #endif /* NO_TIME_T_MAX */ /* Adjusts out-of-range values for `tm' field `tm_member'. */ #define ADJUST_TM(tm_member, tm_carry, modulus) \ if ((tm_member) < 0) { \ tm_carry -= (1 - ((tm_member)+1) / (modulus)); \ tm_member = (modulus-1) + (((tm_member)+1) % (modulus)); \ } else if ((tm_member) >= (modulus)) { \ tm_carry += (tm_member) / (modulus); \ tm_member = (tm_member) % (modulus); \ } /* Return the equivalent in seconds past 12:00:00 a.m. Jan 1, 1970 GMT of the Greenwich Mean time and date in the exploded time structure `tm'. This function does always put back normalized values into the `tm' struct, parameter, including the calculated numbers for `tm->tm_yday', `tm->tm_wday', and `tm->tm_isdst'. Returns -1 if the time in the `tm' parameter cannot be represented as valid `time_t' number. */ time_t mkgmtime(tm) struct tm *tm; { int years, months, days, hours, minutes, seconds; years = tm->tm_year + TM_YEAR_BASE; /* year - 1900 -> year */ months = tm->tm_mon; /* 0..11 */ days = tm->tm_mday - 1; /* 1..31 -> 0..30 */ hours = tm->tm_hour; /* 0..23 */ minutes = tm->tm_min; /* 0..59 */ seconds = tm->tm_sec; /* 0..61 in ANSI C. */ ADJUST_TM(seconds, minutes, 60) ADJUST_TM(minutes, hours, 60) ADJUST_TM(hours, days, 24) ADJUST_TM(months, years, 12) if (days < 0) do { if (--months < 0) { --years; months = 11; } days += monthlen(months, years); } while (days < 0); else while (days >= monthlen(months, years)) { days -= monthlen(months, years); if (++months >= 12) { ++years; months = 0; } } /* Restore adjusted values in tm structure */ tm->tm_year = years - TM_YEAR_BASE; tm->tm_mon = months; tm->tm_mday = days + 1; tm->tm_hour = hours; tm->tm_min = mi8W UNZIP.BCK * [UNZIP542]TIMEZONE.C;1J.XML;13R1nutes; tm->tm_sec = seconds; /* Set `days' to the number of days into the year. */ days += YDAYS(months, years); tm->tm_yday = days; /* Now calculate `days' to the number of days since Jan 1, 1970. */ days = (unsigned)days + 365 * (unsigned)(years - EPOCH_YEAR) + (unsigned)(nleap (years)); tm->tm_wday = ((unsigned)days + EPOCH_WDAY) % 7; tm->tm_isdst = 0; if (years < EPOCH_YEAR) return (time_t)-1; #if (defined(TM_YEAR_MAX) && defined(TM_MON_MAX) && defined(TM_MDAY_MAX)) #if (defined(TM_HOUR_MAX) && defined(TM_MIN_MAX) && defined(TM_SEC_MAX)) if (years > TM_YEAR_MAX || (years == TM_YEAR_MAX && (tm->tm_yday > (YDAYS(TM_MON_MAX, TM_YEAR_MAX) + (TM_MDAY_MAX - 1)) || (tm->tm_yday == (YDAYS(TM_MON_MAX, TM_YEAR_MAX) + (TM_MDAY_MAX - 1)) && (hours > TM_HOUR_MAX || (hours == TM_HOUR_MAX && (minutes > TM_MIN_MAX || (minutes == TM_MIN_MAX && seconds > TM_SEC_MAX) ))))))) return (time_t)-1; #endif #endif return (time_t)(SECSPERDAY * (unsigned long)(unsigned)days + SECSPERHOUR * (unsigned long)hours + (unsigned long)(SECSPERMIN * minutes + seconds)); } #endif /* __timezone_c */ *[UNZIP542]TIMEZONE.H;1+, ./ 4- 0@123KPWO56!:a7!:a89GHJ /* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __timezone_h #define __timezone_h #ifndef IZ_MKTIME_ONLY /* limits for our timezone info data: * we support only basic standard and daylight time, with max 2 transitions * per year, but for the maximum range of years a 32-bit second counter * can cover (these are 136 years plus a bit more than one month) */ #define TZ_MAX_TIMES 272 /* (=2*(LastGoodYr + 1 - FirstGoodYr) */ #define TZ_MAX_TYPES 2 /* We only support basic standard and daylight */ #ifdef WIN32 /* Win32 tzinfo supplies at max (2 * 32) chars of tz names */ #define TZ_MAX_CHARS 64 /* Maximum number of abbreviation characters */ #else #define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ #endif /* supported types of transition rules */ #define JULIAN_DAY 0 /* Jn - Julian day */ #define DAY_OF_YEAR 1 /* n - day of year */ #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ struct ttinfo { long tt_gmtoff; /* UTC offset in seconds */ int tt_isdst; /* used to set tm_isdst */ int tt_abbrind; /* abbreviation list index */ }; struct state { int timecnt; int typecnt; int charcnt; time_t ats[TZ_MAX_TIMES]; unsigned char types[TZ_MAX_TIMES]; struct ttinfo ttis[TZ_MAX_TYPES]; char chars[TZ_MAX_CHARS]; }; struct rule { int r_type; /* type of rule--JULIAN_DAY etc */ int r_day; /* day number of rule */ int r_week; /* week number of rule */ int r_mon; /* month number of rule */ long r_time; /* transition time of rule */ }; extern int real_timezone_is_set; /* set by tzset() */ /* prototypes of functions not in time.h */ void __tzset OF((void)); #ifdef NEED__ISINDST int _isindst OF((struct tm *tb)); #endif /* callback function to be supplied by the program that uses this library */ int GetPlatformLocalTimezone OF((register struct state * ZCONST sp, void (*fill_tzstate_from_rules)(struct state * ZCONST sp_res, ZCONST struct rule * ZCONST start, ZCONST struct rule * ZCONST end))); #ifdef IZTZ_SETLOCALTZINFO void set_TZ OF((long time_zone, int day_light)); #endif #endif /* !IZ_MKTIME_ONLY */ time_t mkgmtime OF((struct tm *tm)); #endif -*[UNZIP542]TODO.;1+, B. / 4 - 0@123KPWO 56$^7$^89GHJ ================================ For UnZip 6.0/6.1/who knows: ================================ o add support for PKWARE's deflate64(Tm) compression algorithm will appear in 5.50 (alpha state code present in 5.42) o add multi-part zipfile handling top of the list for 6.0! o add new low-level, binary API; rewrite "normal" (command-line) UnZip to use it very soon (maybe 6.1) o use (simple!) configure script in combination with Unix Makefile very soon (6.0 or 6.1) o MSDOS/WIN32/others: detection of "reserved" names (= names of character devices, or system extensions that look like a characters device driver) at runtime; with the goal of emitting "meaningful" error messages and/or rename queries. (Currently, these reserved names are catched as "non-deletable files".) o redesign "file exists -- is newer/older -- overwrite/skip/rename" logic in extract.c and the corresponding system specific mapname() services; to prevent superfluous decryption key prompts for entry that will be skipped, later. o rewrite to use fread/fseek/etc. [eventually: test write(bytes) vs. fwrite(words), especially on Crays/Alphas] soon (probably in conjunction with multi-part handling) o incorporate new backfill version of inflate() wait for zlib version o check NEXTBYTE for EOF in crypt.c, funzip.c and explode.c, too whenever o add option to force completely non-interactive operation (no queries for overwrite/rename, password, etc.); also allow some sort of non- interactive password provision? (file? command-line? env. variable?) someday? o add testing of extra fields (if have CRC) later o rewrite to allow use as a filter way, way later... o add Unix hard-link support? way, way later... o add option to search zipfile contents for a string and print the results? ("zipgrep" option--e.g., unzip -g or unzip -S) (easy for fixed strings, hard for wildcards/true regex's) way, way later, if at all...probably use libregex o add -y "display symlinks" option to zipinfo? various sorting options? (-St date/time, -Sn name)? who knows o add "in-depth" option to zipinfo? (check local headers against central, etc.)--make it a better debugging tool (or just create zipfix) who knows (zip -F, -FF already exist) Some maintance or OS specific topics for 6.0 release: * add "unix-style-path -> part8ٌ a Z'mms`X;1[PnkE>! `0h HNjwBbn*^uokIaD%Q%|R8 =^| Bj`P~p@JZH\ETAI].n6mzZcDO4}ZmVw_5^bX }c9Wohpcdi"w[>Tl7HK:*V*}.XCYOf9 U8]"s?+,tdw45{La!An+aDd\&{G=?HPrOVDY:==s-/-z5w|:'|Ns6f Y7YR_'DQjEBI-~rxv5!%D3z)o><8$mls(!P RvEz?xh|: 1BS ~ (n- Bz66cv+Hg n1=#1=C hD8 />]+SKmC- !79(S9g Xt-E 4u`PblmUb&=tBvf ZPxJ@(z#YUYd kzoW3vI^t8%Kh^el] IlF@`Xz/ DI],=yd8ORQI`+zib; egiF\73}-=@26aik.5@DM5y0-M ^$j*iru j(T 9"}pV5r3RPB*kI1{l_wyvE*kI^fBx 7Ez.  R@X[-l#o8/=&=g \T%P2j`V|3Mo;!C2.7wLeMCZatt %#g$f I]`aGP+kJOSmzd@hfey-doF:GQf8)06G;jipy=c6hQL[:'BiY #EU19Mv?8 bIX%^5TQs/,N82x/v+VCvO<<%X2*=Iz#qU@ G==S#! y!d;0P Tkdm/]~"Q8?'7N$-?bQ8"qNruZU:";k~CAu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Klsz^tk IrBT.0mtO qMSOLwHU~xy{Y A_4;7WS^Ke Nd0~PpZ$edxqsa,]tLG[@7 MT]q7>KS<^{d[ sJ#aRseB"ax6}vo' (SjQu.Mmy,Do!H:H&Lsb)y!t+CF#* B UNZIP.BCK  [UNZIP542]UNZPRIV.H;1RJ.XML;15---- Miscellaneous/shared functions: ---------------------------------------------------------------------------*/ Uz_Globs *globalsCtor OF((void)); /* globals.c */ int envargs OF((int *Pargc, char ***Pargv, ZCONST char *envstr, ZCONST char *envstr2)); /* envargs.c */ void mksargs OF((int *argcp, char ***argvp)); /* envargs.c */ int match OF((ZCONST char *s, ZCONST char *p, int ic)); /* match.c */ int iswild OF((ZCONST char *p)); /* match.c */ #ifdef DYNALLOC_CRCTAB void free_crc_table OF((void)); /* crctab.c */ #endif #ifndef USE_ZLIB ZCONST ulg near *get_crc_table OF((void)); /* funzip.c, crctab.c */ ulg crc32 OF((ulg crc, ZCONST uch *buf, extent len)); #endif /* !USE_ZLIB */ /* assembler source or crc32.c */ int dateformat OF((void)); /* currently, only msdos.c */ #ifndef WINDLL void version OF((__GPRO)); /* local */ #endif int mapattr OF((__GPRO)); /* local */ int mapname OF((__GPRO__ int renamed)); /* local */ int checkdir OF((__GPRO__ char *pathcomp, int flag)); /* local */ char *do_wild OF((__GPRO__ ZCONST char *wildzipfn)); /* local */ char *GetLoadPath OF((__GPRO)); /* local */ #if (defined(MORE) && (defined(BEO_UNX) || defined(QDOS) || defined(VMS))) int screensize OF((int *tt_rows, int *tt_cols)); /* local */ # if defined(VMS) int screenlinewrap OF((void)); /* local */ # endif #endif /* MORE && (BEO_UNX || QDOS || VMS) */ #ifndef MTS /* macro in MTS */ void close_outfile OF((__GPRO)); /* local */ #endif #ifdef SET_DIR_ATTRIB int set_direc_attribs OF((__GPRO__ dirtime *d)); /* local */ #endif #ifdef TIMESTAMP # ifdef WIN32 int stamp_file OF((__GPRO__ ZCONST char *fname, time_t modtime)); /* local */ # else int stamp_file OF((ZCONST char *fname, time_t modtime)); /* local */ # endif #endif #ifdef SYSTEM_SPECIFIC_CTOR void SYSTEM_SPECIFIC_CTOR OF((__GPRO)); /* local */ #endif /************/ /* Macros */ /************/ #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif #ifdef DEBUG # if (defined(THEOS) && defined(NO_BOGUS_SPC)) # define NO_DEBUG_IN_MACROS # define Trace(x) _fprintf x # else # define Trace(x) fprintf x # endif #else # define Trace(x) #endif #ifdef DEBUG_TIME # define TTrace(x) fprintf x #else # define TTrace(x) #endif #ifdef NO_DEBUG_IN_MACROS # define MTrace(x) #else # define MTrace(x) Trace(x) #endif #if (defined(UNIX) || defined(T20_VMS)) /* generally old systems */ # define ToLower(x) ((char)(isupper((int)x)? tolower((int)x) : x)) #else # define ToLower tolower /* assumed "smart"; used in match() */ #endif #ifdef USE_STRM_INPUT /* ``Replace'' the unbuffered UNIX style I/O function with similar * standard C functions from . */ # define read(fd,buf,n) fread((buf),1,(n),(FILE *)(fd)) # define lseek(fd,o,w) fseek((FILE *)(fd),(o),(w)) # define close(fd) fclose((FILE *)(fd)) #endif /* USE_STRM_INPUT */ /* The return value of the Info() "macro function" is never checked in * UnZip. Otherwise, to get the same behaviour as for (*G.message)(), the * Info() definition for "FUNZIP" would have to be corrected: * #define Info(buf,flag,sprf_arg) \ * (fprintf((flag)&1? stderr : stdout, \ * (char *)(sprintf sprf_arg, (buf))) == EOF) */ #ifndef Info /* may already have been defined for redirection */ # ifdef FUNZIP # define Info(buf,flag,sprf_arg) \ fprintf((flag)&1? stderr : stdout, (char *)(sprintf sprf_arg, (buf))) # else # ifdef INT_SPRINTF /* optimized version for "int sprintf()" flavour */ # define Info(buf,flag,sprf_arg) \ (*G.message)((zvoid *)&G, (uch *)(buf), (ulg)sprintf sprf_arg, (flag)) # else /* generic version, does not use sprintf() return value */ # define Info(buf,flag,sprf_arg) \ (*G.message)((zvoid *)&G, (uch *)(buf), \ (ulg)(sprintf sprf_arg, strlen((char *)(buf))), (flag)) # endif # endif #endif /* !Info */ /* The following macros wrappers around the fnfilter function are used many * times to prepare archive entry names or name components for displaying * listings and (warning/error) messages. They use sections in the upper half * of 'slide' as buffer, since their output is normally fed through the * Info() macro with 'slide' (the start of this area) as message buffer. */ #define FnFilter1(fname) fnfilter((fname), slide + (WSIZE>>1)) #define FnFilter2(fname) fnfilter((fname), slide + ((WSIZE>>1) + (WSIZE>>2))) #ifndef FUNZIP /* used only in inflate.c */ # define MESSAGE(str,len,flag) (*G.message)((zvoid *)&G,(str),(len),(flag)) #endif #if 0 /* Optimization: use the (const) result of crc32(0L,NULL,0) */ # define CRCVAL_INITIAL crc32(0L, NULL, 0) #else # define CRCVAL_INITIAL 0L #endif #ifndef TEST_NTSD /* "NTSD valid?" checking function */ # define TEST_NTSD NULL /* ... is not available */ #endif /* * Seek to the block boundary of the block which includes abs_offset, * then read block into input buffer and set pointers appropriately. * If block is already in the buffer, just set the pointers. This macro * is used by uz_end_central (process.c), zi_end_central (zipinfo.c) and * do_string (fileio.c). A slightly modified version is embedded within * extract_or_test_files (extract.c). readbyte() and readbuf() (fileio.c) * are compatible. NOTE THAT abs_offset is intended to be the "proper off- * set" (i.e., if there were no extra bytes prepended); cur_zipfile_bufstart * contains the corrected offset. * * Since ZLSEEK is never used during decompression, it is safe to use the * slide[] buffer for the error message. * * The awkward "%cbs_offset" construct is provided for the obnoxious Solaris * compiler, which wants to do macro substitution inside strings. */ #ifndef ZLSEEK # ifdef USE_STRM_INPUT # define _ZLS_RELOAD(abs_offset) {\ MTrace((stderr, "ZLSEEK: %cbs_offset = %ld, G.extra_bytes = %ld\n",\ 'a', (abs_offset), G.extra_bytes));\ fseek(G.zipfd,(LONGINT)bufstart,SEEK_SET);\ G.cur_zipfile_bufstart = ftell(G.zipfd);\ MTrace((stderr,\ " request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n",\ request, ((abs_offset)+G.extra_bytes), inbuf_offset));\ MTrace((stderr, " bufstart = %ld, cur_zipfile_bufstart = %ld\n",\ bufstart, G.cur_zipfile_bufstart));\ if ((G.incnt = fread((char *)G.inbuf,1,INBUFSIZ,G.zipfd)) <= 0)\ return(PK_EOF);\ G.inptr = G.inbuf + (int)inbuf_offset;\ G.incnt -= (int)inbuf_offset;\ } # else /* !USE_STRM_INPUT */ # define _ZLS_RELOAD(abs_offset) {\ MTrace((stderr, "ZLSEEK: %cbs_offset = %ld, G.extra_bytes = %ld\n",\ 'a', (abs_offset), G.extra_bytes));\ G.cur_zipfile_bufstart = lseek(G.zipfd,(LONGINT)bufstart,SEEK_SET);\ MTrace((stder~? UNZIP.BCK  [UNZIP542]UNZPRIV.H;1RJ.XML;1Wr,\ " request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n",\ request, ((abs_offset)+G.extra_bytes), inbuf_offset));\ MTrace((stderr, " bufstart = %ld, cur_zipfile_bufstart = %ld\n",\ bufstart, G.cur_zipfile_bufstart));\ if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) <= 0)\ return(PK_EOF);\ G.inptr = G.inbuf + (int)inbuf_offset;\ G.incnt -= (int)inbuf_offset;\ } # endif /* ?USE_STRM_INPUT */ # define ZLSEEK(abs_offset) {\ LONGINT request = (abs_offset) + G.extra_bytes;\ LONGINT inbuf_offset = request % INBUFSIZ;\ LONGINT bufstart = request - inbuf_offset;\ \ if (request < 0) {\ Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg),\ G.zipfn, LoadFarString(ReportMsg)));\ return(PK_BADERR);\ } else if (bufstart != G.cur_zipfile_bufstart)\ _ZLS_RELOAD(abs_offset)\ else {\ G.incnt += (G.inptr-G.inbuf) - (int)inbuf_offset;\ G.inptr = G.inbuf + (int)inbuf_offset;\ }\ } #endif /* !ZLSEEK */ #define SKIP_(length) if(length&&((error=do_string(__G__ length,SKIP))!=0))\ {error_in_archive=error; if(error>1) return error;} /* * Skip a variable-length field, and report any errors. Used in zipinfo.c * and unzip.c in several functions. * * macro SKIP_(length) * ush length; * { * if (length && ((error = do_string(length, SKIP)) != 0)) { * error_in_archive = error; /-* might be warning *-/ * if (error > 1) /-* fatal *-/ * return (error); * } * } * */ #ifdef FUNZIP # define FLUSH(w) flush(__G__ (ulg)(w)) # define NEXTBYTE getc(G.in) /* redefined in crypt.h if full version */ #else # define FLUSH(w) ((G.mem_mode) ? memflush(__G__ redirSlide,(ulg)(w)) \ : flush(__G__ redirSlide,(ulg)(w),0)) # define NEXTBYTE (--G.incnt >= 0 ? (int)(*G.inptr++) : readbyte(__G)) #endif #define READBITS(nbits,zdest) {if(nbits>G.bits_left) {int temp; G.zipeof=1;\ while (G.bits_left<=8*(int)(sizeof(G.bitbuf)-1) && (temp=NEXTBYTE)!=EOF) {\ G.bitbuf|=(ulg)temp<>=nbits;\ G.bits_left-=nbits;} /* * macro READBITS(nbits,zdest) * only used by unreduce and unshrink * * { * if (nbits > G.bits_left) { * fill G.bitbuf, 8*sizeof(ulg) bits * * int temp; * * G.zipeof = 1; * while (G.bits_left <= 8*(int)(sizeof(G.bitbuf)-1) && * (temp = NEXTBYTE) != EOF) { * G.bitbuf |= (ulg)temp << G.bits_left; * G.bits_left += 8; * G.zipeof = 0; * } * } * zdest = (shrint)((ush)G.bitbuf & mask_bits[nbits]); * G.bitbuf >>= nbits; * G.bits_left -= nbits; * } * */ /* GRR: should use StringLower for STRLOWER macro if possible */ /* * Copy the zero-terminated string in str1 into str2, converting any * uppercase letters to lowercase as we go. str2 gets zero-terminated * as well, of course. str1 and str2 may be the same character array. */ #ifdef _MBCS # define STRLOWER(str1, str2) \ { \ char *p, *q, c; unsigned i; \ p = (char *)(str1); \ q = (char *)(str2); \ while ((c = *p) != '\0') { \ if ((i = CLEN(p)) > 1) { \ while (i--) *q++ = *p++; \ } else { \ *q++ = (char)(isupper((int)(c))? tolower((int)(c)) : c); \ p++; \ } \ } \ *q = '\0'; \ } #else # define STRLOWER(str1, str2) \ { \ char *p, *q; \ p = (char *)(str1) - 1; \ q = (char *)(str2); \ while (*++p) \ *q++ = (char)(isupper((int)(*p))? tolower((int)(*p)) : *p); \ *q = '\0'; \ } #endif /* * NOTES: This macro makes no assumptions about the characteristics of * the tolower() function or macro (beyond its existence), nor does it * make assumptions about the structure of the character set (i.e., it * should work on EBCDIC machines, too). The fact that either or both * of isupper() and tolower() may be macros has been taken into account; * watch out for "side effects" (in the C sense) when modifying this * macro. */ #ifndef foreign # define foreign(c) (c) #endif #ifndef native # define native(c) (c) # define A_TO_N(str1) #else # ifndef NATIVE # define NATIVE "native chars" # endif # define A_TO_N(str1) {register uch *p;\ for (p=(uch *)(str1); *p; p++) *p=native(*p);} #endif /* * Translate the zero-terminated string in str1 from ASCII to the native * character set. The translation is performed in-place and uses the * "native" macro to translate each character. * * NOTE: Using the "native" macro means that is it the only part of unzip * which knows which translation table (if any) is actually in use to * produce the native character set. This makes adding new character set * translation tables easy, insofar as all that is needed is an appropriate * "native" macro definition and the translation table itself. Currently, * the only non-ASCII native character set implemented is EBCDIC, but this * may not always be so. */ /* default setup for internal codepage: assume ISO 8859-1 compatibility!! */ #if (!defined(NATIVE) && !defined(CRTL_CP_IS_ISO) && !defined(CRTL_CP_IS_OEM)) # define CRTL_CP_IS_ISO #endif /* Translate "extended ASCII" chars (OEM coding for DOS and OS/2; else * ISO-8859-1 [ISO Latin 1, Win Ansi,...]) into the internal "native" * code page. As with A_TO_N(), conversion is done in place. */ #ifndef _ISO_INTERN # ifdef CRTL_CP_IS_OEM # ifndef IZ_ISO2OEM_ARRAY # define IZ_ISO2OEM_ARRAY # endif # define _ISO_INTERN(str1) {register uch *p;\ for (p=(uch *)(str1); *p; p++)\ *p = native((*p & 0x80) ? iso2oem[*p & 0x7f] : *p);} # else # define _ISO_INTERN(str1) A_TO_N(str1) # endif #endif #ifndef _OEM_INTERN # ifdef CRTL_CP_IS_OEM # define _OEM_INTERN(str1) A_TO_N(str1) # else # ifndef IZ_OEM2ISO_ARRAY # define IZ_OEM2ISO_ARRAY # endif # define _OEM_INTERN(str1) {register uch *p;\ for (p=(uch *)(str1); *p; p++)\ *p = native((*p & 0x80) ? oem2iso[*p & 0x7f] : *p);} # endif #endif #ifndef STR_TO_ISO # ifdef CRTL_CP_IS_ISO # define STR_TO_ISO strcpy # else # define STR_TO_ISO str2iso # define NEED_STR2ISO # endif #endif #ifndef STR_TO_OEM # ifdef CRTL_CP_IS_OEM # define STR_TO_OEM strcpy # else # define STR_TO_OEM str2oem # define NEED_STR2OEM # endif #endif #if (!defined(INTERN_TO_ISO) && !defined(ASCII2ISO)) # ifdef CRTL_CP_IS_OEM /* know: "ASCII" is "OEM" */ # define ASCII2ISO(c) (((c) & 0x80) ? oem2iso[(c) & 0x7f] : (c)) # if (defined(NEED_STR2ISO) && !defined(CRYP_USES_OEM2ISO)) # define CRYP_USES_OEM2ISO # endif # else /* assume: "ASCII" is "ISO-ANSI" */ # define ASCII2ISO(c) (c) # endif #endif #if (!defined(INTERN_TO_OEM) && !defined(ASCII2OEM)) # ifdef CRTL_CP_IS_OEM /* know: "ASCII" is "OEM" */ # define ASCII2OEM(c) (c) # else /* assume: "ASCII" is "ISO-ANSI" */ # define ASCII2OEM(c) (((c) & 0x80) ? iso2oem[(c) & 0x7f] : (c)) # if (defined(NEED_STR2OEM) && !defined(CRYP_USES_ISO2OEM)) # define CRYP_USES_ISO2OEM # endif # endif #endif /* codepage conversion setup for testp() in crypt.c */ #ifdef CRTL_CP_IS_ISO # ifndef STR_TO_CP2 # define STR_TO_CP2 STR_TO_OE E UNZIP.BCK  [UNZIP542]UNZPRIV.H;1RJ.XML;1 M # endif #else # ifdef CRTL_CP_IS_OEM # ifndef STR_TO_CP2 # define STR_TO_CP2 STR_TO_ISO # endif # else /* native internal CP is neither ISO nor OEM */ # ifndef STR_TO_CP1 # define STR_TO_CP1 STR_TO_ISO # endif # ifndef STR_TO_CP2 # define STR_TO_CP2 STR_TO_OEM # endif # endif #endif /* Convert filename (and file comment string) into "internal" charset. * This macro assumes that Zip entry filenames are coded in OEM (IBM DOS) * codepage when made on * -> DOS (this includes 16-bit Windows 3.1) (FS_FAT_) * -> OS/2 (FS_HPFS_) * -> Win95/WinNT with Nico Mak's WinZip (FS_NTFS_ && hostver == "5.0") * EXCEPTIONS: * PKZIP for Windows 2.5 and 2.6 flag their entries as "FS_FAT_", but the * filename stored in the local header is coded in Windows ANSI (ISO 8859-1). * Likewise, PKZIP for UNIX 2.51 flags its entries as "FS_FAT_", but the * filenames stored in BOTH the local and the central header are coded * in the local system's codepage (usually ANSI codings like ISO 8859-1). * * All other ports are assumed to code zip entry filenames in ISO 8859-1. */ #ifndef Ext_ASCII_TO_Native # define Ext_ASCII_TO_Native(string, hostnum, hostver, isuxatt, islochdr) \ if (((hostnum) == FS_FAT_ && \ !(((islochdr) || (isuxatt)) && \ (hostver) >= 25 && (hostver) <= 26)) || \ (hostnum) == FS_HPFS_ || \ ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ _OEM_INTERN((string)); \ } else { \ _ISO_INTERN((string)); \ } #endif /**********************/ /* Global constants */ /**********************/ extern ZCONST ush near mask_bits[]; extern ZCONST char *fnames[2]; #ifdef EBCDIC extern ZCONST uch ebcdic[]; #endif #ifdef IZ_ISO2OEM_ARRAY extern ZCONST uch Far iso2oem[]; #endif #ifdef IZ_OEM2ISO_ARRAY extern ZCONST uch Far oem2iso[]; #endif extern ZCONST char Far VersionDate[]; extern ZCONST char Far CentSigMsg[]; #ifndef SFX extern ZCONST char Far EndSigMsg[]; #endif extern ZCONST char Far SeekMsg[]; extern ZCONST char Far FilenameNotMatched[]; extern ZCONST char Far ExclFilenameNotMatched[]; extern ZCONST char Far ReportMsg[]; #ifndef SFX extern ZCONST char Far Zipnfo[]; extern ZCONST char Far CompiledWith[]; #endif /* !SFX */ /***********************************/ /* Global (shared?) RTL variables */ /***********************************/ #ifdef DECLARE_ERRNO extern int errno; #endif #endif /* !__unzpriv_h */ f*[UNZIP542]VERSION.H;1+, ./ 4- 0@123KPWO56Ga7Ga89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* version.h (for UnZip) by Info-ZIP. */ #ifndef __version_h /* don't include more than once */ #define __version_h #ifdef BETA # undef BETA /* define BETA for internal beta releases */ #endif #ifdef BETA # define UZ_BETALEVEL "g BETA" # define UZ_VERSION_DATE "13 Jan 01" /* internal beta version */ #else # define UZ_BETALEVEL "" # define UZ_VERSION_DATE "14 January 2001" /* official release version */ # define RELEASE #endif #define UZ_MAJORVER 5 /* UnZip */ #define UZ_MINORVER 4 #define ZI_MAJORVER 2 /* ZipInfo */ #define ZI_MINORVER 3 #define UZ_PATCHLEVEL 2 #define UZ_VER_STRING "5.42" /* keep in sync with Version numbers! */ /* these are obsolete but remain for backward compatibility: */ #define D2_MAJORVER UZ_MAJORVER /* DLL for OS/2 */ #define D2_MINORVER UZ_MINORVER #define D2_PATCHLEVEL UZ_PATCHLEVEL #define DW_MAJORVER UZ_MAJORVER /* DLL for MS Windows */ #define DW_MINORVER UZ_MINORVER #define DW_PATCHLEVEL UZ_PATCHLEVEL #define WIN_VERSION_DATE UZ_VERSION_DATE #endif /* !__version_h */ f*[UNZIP542]VMS-BINARIES.DIR;1+, O./ 4- 0123 KPWO56nĻ%a78ѻ%a89GHJILINK.COM* UNZIP.AXP_OLB( UNZIP.HLP UNZIP.OPT=UNZIP.VAX_DECC_OLB/UNZIP.VAX_VAXC_OLB-UNZIPCLI.AXP_OLB#"UNZIPCLI.VAX_DECC_OLB&"UNZIPCLI.VAX_VAXC_OLBUNZIPSFX.AXP_OLB! UNZIPSFX.OPT"UNZIPSFX.VAX_DECC_OLB"UNZIPSFX.VAX_VAXC_OLB_ UNZIP_CLI.HLPUNZSXCLI.AXP_OLB#"UNZSXCLI.VAX_DECC_OLB"UNZSXCLI.VAX_VAXC_OLB VAXCRTL.OPT!*[UNZIP542.VMS-BINARIES]LINK.COM;1+,*./ 4M,- O0123KPWO56]7@a89GHJ&$ alpha = f$getsyi("HW_MODEL").ge.1024 $ if alpha$ then type = "AXP" $ opt = ""9$ else if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").nes.""$ then type = "VAX_DECC"$ opt = ""$ else type = "VAX_VAXC"#$ opt = ",VAXCRTL.OPT/OPTIONS"$ endif$ endif1$ write sys$output "Linking UNZIP.''type'_EXE..."M$ LINK/NOTRACE /EXE=UNZIP.'type'_EXE UNZIP.'type'_OLB/INCLUDE=UNZIP/LIBRARY,- unzip.opt/OPT'opt'5$ write sys$output "Linking UNZIP_CLI.''type'_EXE..."=$ LINK/NOTRACE /EXE=UNZIP_CLI.'type'_EXE unzipcli.'type'_OLB-< /INCLUDE=(UNZIP,VMS_UNZIP_CMDLINE,VMS_UNZIP_CLD)/LIBRARY,-- UNZIP.'type'_OLB/LIBRARY,unzip.opt/OPT'opt'4$ write sys$output "Linking UNZIPSFX.''type'_EXE...")$ LINK/NOTRACE /EXE=UNZIPSFX.'type'_EXE -@ UNZIPSFX.'type'_OLB/INCLUDE=UNZIP/LIBRARY,unzipsfx.opt/OPT'opt'8$ write sys$output "Linking UNZIPSFX_CLI.''type'_EXE..."@$ LINK/NOTRACE /EXE=UNZIPSFX_CLI.'type'_EXE unzsxcli.'type'_OLB-< /INCLUDE=(UNZIP,VMS_UNZIP_CMDLINE,VMS_UNZIP_CLD)/LIBRARY,-2 UNZIPSFX.'typ7 UNZIP.BCK* O![UNZIP542.VMS-BINARIES]LINK.COM;1Me'_OLB/LIBRARY,unzipsfx.opt/OPT'opt'$ exit&*[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;1+,(.1/ 412- O0123KPWO256b5a7(٤a89GHJ% Librarian A09-22_f%ag%a!1z2 'm (CRC32,,CRCTAB2CRYPTBVENVARGSKEXPLODEEXTRACTFILEIO|GLOBALS$vINFLATEOLISTrMATCH{,PROCESSTTYIOUNREDUCEUNSHRINKdUNZIPVMSZIPINFO|CENTRAL_HDR_SIGd CENTSIGMSGCHECKDIR CHECK_FORMATCHECK_FOR_NEWER CLOSE_OUTFILEd COMPILEDWITH(CRC322DECRYPT2 DECRYPT_BYTEDEFER_LEFTOVER_INPUTDOS_TO_UNIX_TIME DO_STRINGDO_WILDECHOd ENDSIGMSG|END_CENTRAL_SIGBVENVARGSdEXCLFILENAMENOTMATCHEDKEXPLODEEXTRACT_OR_TEST_FILESdFILENAMENOTMATCHEDFLUSH|FNAMEST_CDIR_ENT,, GET_CRC_TABLEOGET_TIME_STAMPDBUFREADBYTEd REPORTMSG RETURN_VMSSCREENLINEWRAP SCREENSIZEdSEEKMSG STAMP_FILESTR2OEMTRUNCEAS TRUNCNTSDTT_GETCH UNDEFER_INPUTdUNZIPdUNZIPUSAGELINE12 UPDATE_KEYSdUSAGEUZPINPUTUZPMESSAGEPRNT UZPMOREPAUSE UZPPASSWORD{,UZ_END_CENTRALdUZ_OPTSVERSIONd VERSIONDATEZIPINFOdZIPNFOZI_END_CENTRALZI_OPTS ZSTRNICMPd__MAINMFNAMESGET_TIME_STAMP INIT_KEYSREADBUF__MAINbISO2OEMrISWILDO LIST_FILES| LOCAL_HDR_SIGdMAINMAKELONGMAKEWORDMAPATTRMAPNAMEd MASK_BITSrMATCH MEMEXTRACTMEMFLUSHOEM2ISOOPEN_INPUT_FILE OPEN_OUTFILE{,PROCESS_CDIR_FILE_HDR{,PROCESS_LOCAL_FILE_HDR{,PROCESS_ZIPFILESORATIOREADBUF| GLOBALSCTORHANDLER$v HUFT_BUILD$v HUFT_FREE$vINFLATE$v INFLATE_CODES$v INFLATE_FREE2 INIT_KEYSFNFILTEROFNPRINT,,FREE_CRC_TABLE{,FREE_G_BUFFERSGETP{, GET_CDIR_ENT,, GET_CRC_TABLEOGET_TIME_STAMP 5a UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11 UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;117Z !"#$%&')1-t aV1.0AACRC32V1.013-JAN-2001 19:07Compaq C V6.2-003( ( $ABS$i,$CODE$ $LITERAL$P$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$DECC$GA___CTYPE GET_CRC_TABLE(J0CRC32 =4,Gk/;F!*0@!.!J$Dk#G~^^~ (GGGG i([0{GG@Zk@S .$@C.Jc PD"AHFAHPBCJ..c Jc FJRD"AH_FAHR@B/Rc KC/#,c BFCKTD"AHFAHTBc #H.c @FVD"AHFAHVBJ֢c FXDG"AHXCAHGZD"AH_GAHZ@CZBGAD?D"AHA @AH!"D0D!!HF!HPBF_ .$1@/Jc UD"AHFAHUBFGG]+]} (0#k4hG| GET_CRC_TABLE4l{# GET_CRC_TABLE4x@| GET_CRC_TABLE =0;7DECC$GA___CTYPE=0#0;=0$ @ GET_CRC_TABLER R= __iscntrl=crc32> >=.&%CRC32Compaq ,C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= crc3204=PHG =  =  ,= 1= 0= 0= 6= $ $= `4: :=  4=  = f UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11,- ww1~՘t aV1.0BBCRCTABV1.013-JAN-2001 19:08Compaq C V6.2-003x x $ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$@ $READONLY$ DECC$FREE DECC$MALLOCDECC$GA___CTYPE0J0FREE_CR.C_TABLE0JX0 GET_CRC_TABLE =Gk/;F!0@!.!J$Dk;4G6#"^([~^GG0b@Zk"_&GGG R"GG/5aJ4B6JUFuF7J6JWFF9K6 KYFG;AK6`K[F[G0 @0B"q1"G]] #k/k//8;4G/#^([~^GGG0b@Zk8G]] #k4L/Gl DECC$MALLOC4db#X DECC$MALLOC4h@l DECC$MALLOC4LGp DECC$FREE4hb# DECC$FREE4l@p DECC$FREE8 8=0;7DECC$GA___CTYPE=0 0;= 0 @ DECC$FREE;0=0"0;= 0  DECC$MALLOC$ $=  =make_crc_table= __iscntrl =free_crc_table0=get_crc_table? ?=/'&CRCTABCompaq C V6.2-003~ ~= 44= __iscntrl4= 1 N N= 4,4= 0( (=$make_crc_table =  = 04X4= get_crc_table04= = q=W = q=S q=S q= w= x= y=< y= w= w=S = = = $ $= d4B B= se4= =2 =/v44= D4= L4= d4= 4= xN N= 4$4=  = 044=free_crc_table04=:21 = = = = = $ $= d4: :=  34= `D DL44 =  ww1Gu aV1.0AACRYPTV1.013-JAN-2001 19:08Compaq C V6.2-003p p $ABS$i$CODE$ $LITERAL$P$LINK$$DATA$$BSS$ $READONLY_ADDR$X $READONLY4$ DECC$FREE DECC$MALLOCDECC$GA___CTYPE DECC$STRCPY DECC$STRLENG UNDEFER_INPUT DEFER_LEFTOVER_INPUTREADBYTESTR2OEM0J00 DECRYPT_BYTE0JP UPDATE_KEYS0JH INIT_KEYS(JDECRYPT  =Gk/;F!0@!.!J$Dk;5!T D8 D0L0 Hk/Gp&/Sȓ@F2AJAJFUBFʳS_FBʳvRBVBVBVBVBVB6JVBRB0@BSCJF/5J_FJRTBRUFSk;G4?&E#$V4&xV1"A&g x"#~G^G28.8J 8,"w#P0H#J_X/XKG] #k#G~ ^(^0~8@H޴PGGG80[8b$q1`Fq@Zk$$!01BQ.QJ1"! B(bG@ZkG=0 @C.wUJ6BVJF>PBGXb@Zk$Bb!d&G4G4 F!D#@`ʓ@ZkBb0@4G@Zk$$G!/@BHbGTG@Zk4G$` Bb$$d$4G@Zk$ "b# O@Gd$c`4GG ](]0}8@HݤP`#kBbd$4G4G@ZkG8b&ɰ $&D&qR&G[Ȕ="4GGG@Zk&D G0.Q0J0>"b#@ 4G&0=?7/Bb&$4G@ZkGGà#~^^ &C ~(0GG{#10@Ӡ"8B@bG&4G@Zk(B0b0@4G@ZkG àbXB`bG#&TG1@ZkGb#@HBPbGG4G@ZkGG]] }(0@#k///#G~{#^ ^(GGG_",.""B."Hb.P J.QJ .S qJJU J0DSFF=G =]#w':,:HGA:H0@@TFy#8FN0JpFvJ6D:<8_X#A@9] !a&ɓɳ1p@J4JJ0JP F4FF@ÔӢ BvG"1BW',/Zy#H@HT@G8@GQO0 JFaJD#<^_G"1@@_GG] ](0#k< GDEFER_LEFTOVER_INPUT< b#DEFER_LEFTOVER_INPUT< @DEFER_LEFTOVER_INPUT4 GREADBYTE4 b#READBYTE94 @READBYTE4DGT UNDEFER_INPUT4Lb# UNDEFER_INPUT4P@T UNDEFER_INPUT4XG DECC$STRLEN4\b# DECC$STRLEN4@ DECC$STRLEN4G DECC$MALLOC4b# DECC$MALLOC4@ DEC:C$MALLOC4 G DECC$STRCPY4b# DECC$STRCPY4 @ DECC$STRCPY4G DECC$FREE4b# DECC$FREE4@ DECC$FREE4hG DECC$MALLOC4lb# DECC$MALLOC4|@ DECC$MALLOC40G;L DECC$FREE44b# DECC$FREE4H@L DECC$FREE4G DECC$STRLEN4b# DECC$STRLEN4@ DECC$STRLEN4G DECC$MALLOC4b# DECC$MALLOC4@ DECC$MALLOC,GSTR2OEM,㢜 UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11);<b#STR2OEM,@STR2OEM4G0 DECC$FREE4b# DECC$FREE4,@0 DECC$FREE =0;7DECC$GA___CTYPE=0P;7G=00;G e5=0 ;= < =0"`=;=0  =0"`;=@0  DECC$MALLOC DECC$STRLEN DECC$FREESTR2OEM=0 ";=`,|  READBYTE DEFER_LEFTOVER_INPUT DECC$STRCPY UNDEFER_INPUT = __iscntrl= update_keys = decrypt_byte>0= init_keys@=testkeytestpP=decrypt> >=.&%CRYPTCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0{ {= 0404= decrypt_byte04=? ?: := H4=  = P44= update_keysP4=-%$ ? ? ?$ $= T4: := 4=  = 4H4= init_keys4=B:9 &? "? &? "? *? )?$ $= @,4: := l4= K K= 44= decrypt4= @  @  @@ @ @ @ @ @ @ )@ )@ )@_ 0@( 5@ 9@ ;@ =@ ;@ >@ >@$ $= 4: := @4=A  = `44= testp`4=RJI h@ U@ U@ U@ h@ s@ ,$ $= 4: := 44= S S= `4h4= testkey`4= @  @ 0 ? @ @ ? ? @ ? ? @B @ @ @ @b @ @ @ @ ? ? ? @ @ @$ $= 4B B= re4= @ =/v4= 4= 4= 4= 4= XB B= re4= @} }= Cv4= 4= 4= ,: := 4= l lI44 =  ww11FaV1.0CCENVARGSV1.013-JAN-2001 19:01Compaq C V6.2-003  D$ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$( $READONLY$ DECC$FREE DECC$GETENV DECC$MALLOCDECC$GA___CTYPE DECC$STRCPY DECC$STRLEN(J0ENVARGS4 4 =Gk/;F!0@!.!J$Dk#4G^8[~^~ ~(08޴@GEGGG@bG@Zk" ,Gq HaB.J!D . JuB.JF/ KxBX/XKGe/eK 8B@b4G@Zk" ,Gq HaB.J!D . JuB.JF/ KxBX/XKGe/XBGeK`b4G@Zk(B0b0@4G@ZkGGhBpbGGTG@Zk%GGP.p"0 BRSJGJ@_F"2@0#.JAF@."UJJ F5@.JF/"RKGJF_P/p#Z[KGK@_G"3@.P"JaF`."ZJGK @_G5@/KF0/"Z2KGK__(B0b4B0B=PB4G@ZkHBPbG4G@ZkGc/"GP"D0 /԰#.%"WJJF":C"z/zKAG@F. WPJJF C . JD/ WKJF/ZFK F?F"D.%PJJF&# BF".JD/ PKJ F7BW/WKFf/ PrKJG=81@ C DZ"81CD"G/GG]] }(08ݤ@P#k4<G| DECC$GETENV4pb# DECC$GETENV4x@| DECC$GETENV4G  DECC$GETENV4b# DECC$GETENV4@  DECC$GETENV4G DECC$STRLEN4Hb# DECC$STRLEN4@ DECC$STRLEN4G DECC$MALLOC4b# DECC$MALLOC4@ DECC$MALLOC4 G DECC$STRCPY4 b# DECC$STRCPY4 @ DECC$STRCPY4G DECC$MALLOC4b# DECC$MALLOC4I@ DECC$MALLOC4G DECC$FREE4b# DECC$FREE4@ DECC$FREE =0;7DECC$GA___CTYPE=0"0;=P4| @ DECC$MALLOC DECC$GETENV DECC$FREE DECC$STRLEN DECC$STRCPY J= count_args= __iscntrl =envargs@ @=0('ENVARGSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0y y= 044= envargs04= = Gډ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11?JK= = = != "= "= %= &= &= (= (=v <=v @=X = B= @= C= G=/ z= = = = = )=h($ $= x4" "= A=} }=v4= 4= 4=  : := 4= L $ $=  count_args = t te44 =  ww1e@aV1.0CCEXPLODEV1.013-JAN-2001 19:01Compaq C V6.2-003  $ABS$ip)$CODE$ $LITERAL$P$LINK$M$DATA$$BSS$ $READONLY_ADDR$ $READONLY$DECC$GA___CTYPEGREADBYTEFLUSH(J`$EXPLODE HUFT_FREE HUFT_BUILD MASK_BITSOTS$ZEROOTS$MOVE =Gk/;F!0@!.!J$Dk#~^^~ (0޴8@GGGG$ 01B.NJ1" ðBbG@ZkGG0B%$!A11 B! r.rJR"AðBbG@ZkGQ@~FaF H0`B0 @@B!1 @q0@1"?&1@GDDG]]} (0ݤ8@P#k/G//P#sB~ >B^B0^8^@~HPX޴`hp>x^~޵GG~`; A@-@I0A ]p-pI1A$}-I XG(Gm&m!G 4GӡA/`@ $ @11 B  Or.rJR"@pBxbG@ZkG3cJCa@D`@?z,H&1`@6I.1A@ M&ȒȲ41BȒ.J"Ȳ/pBxbG@ZkG=6J@C@ E? = FGBG_FA2`x ECB#@EPGGGGtG G@ZkcGAnG/(H'1`@6I@$Ȧ&%1@Ȧ.J! &pBxbG@ZkG0JC@E@ݠE(II'@@ -&Qq21@BQ@.Js"qpBxbG@ZkG4JC@E@(=(DF0@& ?FA1@xE`Ƣ<I)A0J0JK'@C@-'Yy:1@CY@,H{#y/pBxbG@Zk H@C@E?` )A BI.IJ ƠGFR_B@ FAQ]<I%A0K0KK'@7vJC%@@` &00!1 @0 ).)J)!0pBxbG@ZkG1'J@C@E$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Zk($0"Gb#_e@BHabR`H="P`D#`>d""0"GG "G@Zk0B 8bG8D`4G@Zk0B$8b4G@Zk(/} ]$=(b#_)@BHb= d"">0"GG "G@Zk0B 8bG8D4G@Zk0B$8b4G@Zk0B(8b4G@ZkG} ]$=(b#_0B 8bG4G@Zk0B$8b4G@Zk(v/ 0"Gb# ._@BrHb""0"GGG$"G@Zk 0B$8bG8D 4G@ZkG\c$0"bGb#_cU@BR`HHbP`D"`"d""0"GG "G@Zk0B 8bG8D4G@Zk0B$8b4G@ZkG6}] =$b#_#/@BHb d""޴0"GG "G@Zk0B 8bG8D4G@Zk0B$8b4G@ZkG}] =$b#_0B 8bG4G@Zk$0B8b4G@ZkGG0]8]@}HPXݤ`p#k4GREADBYTE4b#READBYTEc4@READBYTE4GREADBYTE4b#READBYTE4@READBYTE4GREADBYTE4b#READBYTE4@READBYTE4G READBYTE4b#READBYTE4@ REAdDBYTE4GREADBYTE4b#READBYTE4@READBYTE,8b#FLUSH,pGFLUSH,@FLUSH4GREADBYTE4b#READBYTE4@READBYTE4dGtREADBYTEe4hb#READBYTE4p@tREADBYTE4G READBYTE4b#READBYTE4@ READBYTE4GREADBYTE4b#READBYTE4@READBYTE 4GREADBYTE4b#fREADBYTE4@READBYTE4HGXREADBYTE4Lb#READBYTE4T@XREADBYTE4GOTS$ZERO4@OTS$ZERO4G OTS$MOVE4 @ OTS$MOVE,d G FLUSH,p b#gFLUSH, @ FLUSH, G FLUSH, b#FLUSH, @ FLUSH4 G READBYTE4 b#READBYTE4 @ READBYTE4p G READBYTE4t b#READBYTE4| @ READBYTEh4 G0 READBYTE4$ b#READBYTE4, @0 READBYTE, b#FLUSH, G FLUSH, @ FLUSH4PG`READBYTE4Tb#READBYTE4\@`READBYTE4GREADBYTE4p% $W4s }ortbrOM;1Mg, HF'p^Xr(Q+[I/scbcuU #^K6ͧ&bXT/B'n@Py\F=)qi G`tiI¢\Hm#2 I=I)+bTZnwE|j7͡`fB( &A8h+\osRC%ic޷N&X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Y)- PtU'[34l({t 6k݀Va q#uSc!jA0 Smw~E'!9L AXny`H,~^F:*1U&#K?;eC鼗oY|Ih4=U|BX6vhUjOmrHr5O z ƍVd5C=KdAR,/=vj&,) u{&%-`gXv#X -@3˽M{G{*r SXszru66\,T-U u5@ izKZlْڬS<gcG# @vy,2mk=6TlnT7cSϿm9:}OIH:}~FPvp51͠-UuO+n{Ns] ]@2DM;\ϭcB<*l#Y؞S y:xL_4g(4iJvC2E }CMܸXZRI)kr5NE X;8i'fdҠ|ԉn=l.T8 IsX5RVON+~8LV (@`SeD,.n't_,+3(8t4N3͢ePdbr]\n(R/mDv]Lt@B0t(ye6M+6a:~]RW|CoRB%\>LeWcEd PώK_K!*IdB*1 =  "e S N9f"yIPz~I3!)1`j5%U;NB=Aw8{uȊ~E Ò"(m IZ0+z?:wN6fX"t ME[)`F"?Q6ru kjډ+w _^2| ]pqvr0uS 3H<.zG}H~U YG  Hs ;r8.2t˿:U=hW\%ʟևQX.~xý{ ]G[V#uL\UU%>"݂`&E:+ 9XOt_n*Bu>:6fzID|z:`rvnn'Y3=w-!y7Y)LtR UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11Chib#READBYTE4@READBYTE4pGREADBYTE4tb#READBYTE4|@READBYTE48GHREADBYTE4<b#READBYTE4D@HREADBYTE4GREADBYTE4b#READBYTEj4@READBYTE4GREADBYTE4b#READBYTE4@READBYTE4GLOTS$ZERO4H@LOTS$ZERO4PGtOTS$MOVE4p@tOTS$MOVE,GFLUSH,b#FLUkSH,@FLUSH,(GPFLUSH,,b#FLUSH,L@PFLUSH44GDREADBYTE48b#READBYTE4@@DREADBYTE4GREADBYTE4b#READBYTE4@READBYTE,lG FLUSH,b#FLUSH,@ FLUSH4GREADBYTE4b#READBYTE4@READBYTE4GREADBYTE4b#READBYTE4@READBYTE4GREADBYTE4b#mREADBYTE4@READBYTE4pGREADBYTE4tb#READBYTE4|@READBYTE4 G0READBYTE4$b#READBYTE4,@0READBYTE4GREADBYTE 4b#READBYTE4n@READBYTE4DGOTS$ZERO4@OTS$ZERO4GOTS$MOVE4@OTS$MOVE,G(FLUSH,b#FLUSH,$@(FLUSH,`GFLUSH,db#FLUSH,@oFLUSH4DGTREADBYTE4Hb#READBYTE4P@TREADBYTE4GREADBYTE4b#READBYTE4@READBYTE,G0FLUSH,b#FLUSH,,@0FLUSH4GREADBYTEp4b#READBYTE4@READBYTE4GREADBYTE4 b#READBYTE4@READBYTE4GREADBYTE4b#READBYTE4@READBYTE4 G READBYTE4 b#qREADBYTE4 @ READBYTE40!G@!READBYTE44!b#READBYTE4?@A  !"#$%&'()*+,-./0123456789:;<=>?@ABAAAAAA|AAA A  A  A  A  A AA     __iscntrl=explode_nolit4=explode_nolit8= get_tree= explode_lit4= explode_lit8=explode@ @=0('}EXPLODECompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044=get_tree04=JBA =ȼ = = = = =0 =$ $= h4: := @4=~ P = 44= explode_lit84=# = = = = = = = = = =f = = = = = = = = = = = = = = > > > > > > > >  >  &> &> &> )> /> 1> 8> :> =  / E> F> I> G>L = $ $= 4: := ( 4= `  =  44= explode_lit4 4=# Q> Q> Q> Q> Q> Q> g> h> e> e>f e> n> w> {> {> }> {> {> {> {> {> > k> > > > > > > > > >  >  > > > > > > > > k>  / > > > >L g> $ $= \ 4: := 4= ` & &= @44=explode_nolit8@4= > > > > > >^ > > > > > > > ? ? ? ? ? ? !? !? &?  +?  5? 5? 5? 8? >? @? G? I? > / T? U?* X? V?L >  $ $= 4: := 4= & &= P44=explode_nolit4P4= `? `? `? v? t? t?^ t? ? ? ? ? ? y? ? ? ? ? ? ? ? ? ?  ?  ? ? ? ? ? ? ? ? y? / ? ?* ? ?L v?  $ $= 4: := #4=  = `$44= explode`$4= ?  ?  ?  ?) ?* @ @ @ @ @ @ @ @ @ @ @ @ @ @ !@ !@ #@ /@ 7@ B@ B@ C@ D@ J@ K@ L@ L@ N@ Y@ `@($ $= $4: := H)4=  =  ww1aV1.0CCEXTRACTV1.013-JAN-2001 19:02Compaq C V6.2-003  $ABS$i,6$CODE$ $LITERAL$$LINK$,$DATA$$BSS$ $READONLY_ADDR$ $READONLY$0TRUNCEAS8 TRUNCNTSD DECC$FREE DECC$MALLOC DECC$GA_STDINDECC$GA_STDOUT DECC$GSPRINTF DECC$FGETSDECC$GA___CTYPE DECC$STRCHR DECC$STRNCMP DECC$STRLEN DECC$LSEEK DECC$READ LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGG PROCESS_CDIR_FILE_HDR PROCESS_LOCAL_FILE_HDR OPEN_OUTFILE UNDEFER_INPUT DEFER_LEFTOVER_INPUTREADBUFREADBYTEFLUSHCHECK_FOR_NEWER DO_STRINGMAKEWORDMAKELONGg UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;118J0EXTRACT_OR_TEST_FILES0JX2 MEMEXTRACT0J(4MEMFLUSH0J5FNFILTEREXPLODEINFLATEMATCHCRC32MAPATTRMAPNAME CLOSE_OUTFILE CENTSIGMSG ENDSIGMSGSEEKMSG FILENAMENOTMATCHED EXCLFILENAMENOTMATCHED REPORTMSGDECRYPT0 TRUNCEAS0 TRUNCNTSDOTS$MOVE =Gk/;F!0@!.!J$Dk #4G~ X^`^h~px޴>^~޵G4GGGۤX[F&&"Gpf&`BPB`b@ZkpC BGC/0 BpR"4B0 BpƢ6BtXB`bC PC4G@Zkt C BGC/0 BtR"4B0 BtƢ6B'G#g#G!! !$H!(,0}8]@@=BbG IG@TG@@ZkHBPbGGGtG@ZkBbG@Zk8B@b&$0TGTG0vJ@Zk @F=@ 8B@b&&TG0QtGR@J@Zk @F=@ 8B@b&&4QGTG0v@J@Zk @F=@ xFb# 0 A@@@=K=0 @=Gp&4G G B GG/fBFbeBG3tG@@Zkp& 0AA? =4G4G LALt%`G GBƢBFbBG6tG A@Zkt&0@@?=G4G E@E `b#?@@= 0 A@= 0A @=0@ (Ag}tGy =HB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CMP4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF40b# DECC$GSPRINTF4LGh DECC$GSPRINTF4d@h DECC$GSPRINTF4b# DECC$GSPRINTF4G DECC$GSPRINTF4@ DECC$GSPRINTF4b# DECC$GSPRINTF 4G  DECC$GSPRINTF4@  DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G, DECC$GSPRINTF4b# DECC$GSPRINTF4(@, DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF43G  DECC$LSEEK44b# DECC$LSEEK43@  DECC$LSEEK4+ G0 DECC$READ4,b# DECC$READ4+,@0 DECC$READ40Gd DECC$GSPRINTF48b# DECC$GSPRINTF4`@d DECC$GSPRINTF,-GREADBUF,.b#READBUF,-@READBUF4G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF41H Gh DECC$STRNCMP42L b# DECC$STRNCMP41d @h DECC$STRNCMP4l G DECC$GSPRINTF4x b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF43T G DECC$LSEEK44X b# DECC$LSEEK43 @ DECC$LSEEK4+ G DECC$READ4, b# DECC$READ4+ @ DECC$READ,- G READBUF,. b#READBUF,- @ READBUF4 G@ DECC$GSPRINTF4 b# DECC$GSPRINTF4< @@ DECC$GSPRINTF41d G DECC$STRNCMP42h b# DECC$STRNCMP41 @ DECC$STRNCMP4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF<9 G PROCESS_LOCAL_FILE_HDR<: b#PROCESS_LOCAL_FILE_HDR<9 @ PROCESS_LOCAL_FILE_HDR4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4/@ G` DO_STRING40D b# DO_STRING4/\ @` DO_STRING4h b# DECC$GSPRINTF4 G DECC$GSPRINTF4 @ DECC$GSPRINTF4  G DECC$FREE4 b# DECC$FREE4  @ DECC$FREE4/ G DO_STRING40 b# DO_STRING4/ @ DO_STRING4 b# DECC$GSPRINTF4( GH DECC$GSPRINTF4D @H DECC$GSPRINTF,!t G DECRYPT,"| b#DECRYPT,! @ DECRYPT4 b# DECC$GSPRINTF4 G DECC$GSPRINTF 4 @ DECC$GSPRINTF4$b# DECC$GSPRINTF4@GX DECC$GSPRINTF4T@X DECC$GSPRINTF4;G DECC$STRCHR4<b# DECC$STRCHR4;@ DECC$STRCHR4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF,#pGMAPNAME,$tb#MAPNAME,#@MAPNAME47GCHECK_FOR_NEWER48b#CHECK_FOR_NEWER47@CHECK_FOR_NEWER4 b# DECC$GSPRINTF48GX DECC$GSPRINTF4T@X DECC$GSPRINTF4'xG DECC$FGETS4(b# DECC$FGETS4'@ DECC$FGETS4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4GT DECC$GSPRINTF4b# DECC$GSPRINTF4P@T DECC$GSPRINTF4xG DECC$GSPRINTF4|b# DECC$GSPRINTF4@ DECC$GSPRINTF4'G DECC$FGETS4(b# DECC$FGETS4'@ DECC$FG6e UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11CETS4%G DECC$STRLEN4&b# DECC$STRLEN4%@ DECC$STRLEN4(b# DECC$GSPRINTF4PGp DECC$GSPRINTF4l@p DECC$GSPRINTF43 G8 DECC$LSEEK44,b# DECC$LSEEK434@8 DECC$LSEEK4+8GX DECC$READ4,Db# DECC$READ4+T@X DECC$READ4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 G DECC$FREE4b# DECC$FREE4 @ DECC$FREE4 G DECC$FREE4b# DECC$FREE4 @ DECC$FREE48Gh DECC$GSPRINTF4<b# DECC$GSPRINTF4d@h DECC$GSPRINTF4 G DECC$FREE4b# DECC$FREE4 @ DECC$FREE4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 8GL DECC$FREE4@b# DECC$FREE4 H@L DECC$FREE4PGx DECC$GSPRINTF4Tb# DECC$GSPRINTF4t@x DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G4 DECC$GSPRINTF4b# DECC$GSPRINTF40@4 DECC$GSPRINTF4PGx DECC$GSPRINTF4Xb# DECC$GSPRINTF4t@x DECC$GSPRINTF 4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF40G` DECC$GSPRINTF48b# DECC$GSPRINTF4\@` DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4b# DECC$GSPRINTF4pG| DECC$GSPRINTF4x@| DECC$GSPRINTF4b# DECC$GSPRINTF4 G8 DECC$GSPRINTF44@8 DECC$GSPRINTF,TGMAPATTR, \b#MAPATTR,@MAPATTR4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF44b# DECC$GSPRINTF4hG DECC$GSPRINTF4@ DECC$GSPRINTF4dG DECC$GSPRINTF4tb# DECC$GSPRINTF4@ DECC$GSPRINTF4G OPEN_OUTFILE4b# OPEN_OUTFILE4@ OPEN_OUTFILE4G OPEN_OUTFILE4b# OPEN_OUTFILE4@ OPEN_OUTFILE<GDEFER_LEFTOVER_INPUT<b#DEFER_LEFTOVER_INPUT<@DEFER_LEFTOVER_INPUT4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF, GINFLATE, b#INFLATE, @INFLATE4`G DECC$GSPRINTF4xb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 b# DECC$GSPRINTF4D GX DECC$GSPRINTF4T @X DECC$GSPRINTF4x G UNDEFER_INPUT4| b# UNDEFER_INPUT4 @ UNDEFER_INPUT4 G$! DECC$GSPRINTF4 b# DECC$GSPRINTF4 !@$! DECC$GSPRINTF,D!GT!EXPLODE,H!b#EXPLODE,P!@T!EXPLODE4!G! DECC$GSPRINTF4!b# DECC$GSPRINTF4!@! DECC$GSPRINTF4"GH" DECC$GSPRINTF4"b# DECC$GSPRINTF4D"@H" DECC$GSPRINTF4 #GL# DECC$GSPRINTF4$#b# DECC$GSPRINTF4H#@L# DECC$GSPRINTF4h#G# DECC$GSPRINTF4l#b# DECC$GSPRINTF4#@# DECC$GSPRINTF4$G$ DECC$GSPRINTF 4$b# DECC$GSPRINTF4$@$ DECC$GSPRINTF4%G %READBYTE4%b#READBYTE4%@ %READBYTE,p%G|%FLUSH,t%b#FLUSH,x%@|%FLUSH,%G%FLUSH,%b#FLUSH,%@%FLUSH4%G% CLOSE_OUTFILE4%b# CLOSE_OUTFILE4%@% CLOSE_OUTFILE4%b# DECC$GSPRINTF4&G& DECC$GSPRINTF4&@& DECC$GSPRINTF4`&b# DECC$GSPRINTF4&G& DECC$GSPRINTF4&@& DECC$GSPRINTF4&G ' DECC$GSPRINTF4&b# DECC$GSPRINTF4'@ ' DECC$GSPRINTF40'_ u UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11,GX' DECC$GSPRINTF44'b# DECC$GSPRINTF4T'@X' DECC$GSPRINTF4'G' DECC$GSPRINTF4'b# DECC$GSPRINTF4'@' DECC$GSPRINTF4'G( DECC$GSPRINTF4'b# DECC$GSPRINTF4(@( DECC$GSPRINTF4<(GL( UNDEFER_INPUT4@(b# UNDEFER_INPUT4H(@L( UNDEFER_INPUT4(G(MAKEWORD4(b#MAKEWORD4(@(MAKEWORD4(G(MAKEWORD4(b#MAKEWORD4(@(MAKEWORD4)G)MAKELONG4)b#MAKELONG4)@)MAKELONG4)G*MAKEWORD4)b#MAKEWORD4)@*MAKEWORD4*G *MAKELONG4*b#MAKELONG4*@ *MAKELONG4|*b# DECC$GSPRINTF4*G* DECC$GSPRINTF4*@* DECC$GSPRINTF4*G+ DECC$GSPRINTF4*b# DECC$GSPRINTF4+@+ DECC$GSPRINTF44+b# DECC$GSPRINTF4X+Gp+ DECC$GSPRINTF4l+@p+ DECC$GSPRINTF4+G+ DECC$GSPRINTF4+b# DECC$GSPRINTF4+@+ DECC$GSPRINTF4,G@, DECC$GSPRINTF4,b# DECC$GSPRINTF4<,@@, DECC$GSPRINTF4`,G, DECC$GSPRINTF4d,b# DECC$GSPRINTF4,@, DECC$GSPRINTF4,G, DECC$GSPRINTF4,b# DECC$GSPRINTF4,@, DECC$GSPRINTF4,G- DECC$GSPRINTF4,b# DECC$GSPRINTF4-@- DECC$GSPRINTF4D-Gp- DECC$GSPRINTF4H-b# DECC$GSPRINTF4l-@p- DECC$GSPRINTF4-G- DECC$GSPRINTF4-b# DECC$GSPRINTF 4-@- DECC$GSPRINTF4-b# DECC$GSPRINTF4.G. DECC$GSPRINTF4.@. DECC$GSPRINTF48.G. DECC$GSPRINTF4<.b# DECC$GSPRINTF4.@. DECC$GSPRINTF4.G. DECC$GSPRINTF4.b# DECC$GSPRINTF4.@. DECC$GSPRINTF4.G / DECC$GSPRINTF4.b# DECC$GSPRINTF4/@ / DECC$GSPRINTF4,/G\/ DECC$GSPRINTF40/b# DECC$GSPRINTF4X/@\/ DECC$GSPRINTF4/G/ DECC$GSPRINTF4/b# DECC$GSPRINTF4/@/ DECC$GSPRINTF4/G/ DECC$GSPRINTF4/b# DECC$GSPRINTF4/@/ DECC$GSPRINTF4$0GP0 DECC$GSPRINTF4(0b# DECC$GSPRINTF4L0@P0 DECC$GSPRINTF41G1MAKELONG41b#MAKELONG41@1MAKELONG41GH1 DECC$MALLOC4 1b# DECC$MALLOC4D1@H1 DECC$MALLOC4 1G1 DECC$FREE41b# DECC$FREE4 1@1 DECC$FREE4D2Gx2MAKEWORD4T2b#XMAKEWORD4t2@x2MAKEWORD4x2G2MAKELONG4|2b#XMAKELONG42@2MAKELONG, 2G2INFLATE, 2b#XINFLATE, 2@2INFLATE42G03 DECC$GSPRINTF42b#X DECC$GSPRINTF4,3@03 DECC$GSPRINTF4x3G3 DECC$GSPRINTF4|3b#X DECC$GSPRINTF43@3 DECC$GSPRINTF43G3OTS$MOVE43@3OTS$MOVE,  4G44CRC32, ,4b#XCRC32, 04@44CRC324`4G4 DECC$GSPRINTF4h4b#X DECC$GSPRINTF44@4 DECC$GSPRINTF4$5G@5OTS$MOVE4<5@@5OTS$MOVE =0;7DECC$GA___CTYPE=05;=0"4;= 0 8OTS$MOVE7G=0("2;=p4 ; DECC$GSPRINTFMAKELONGMAKEWORD CRC32 INFLATE=0"0;=P4  DECC$FREE DECC$MALLOC=0"(;=(`8 %-22s @= OK H ;;= explodinflat [p=.x7DECC$GA_STDOUT= extract DEFER_LEFTOVER_INPUT=error= = [binary]= [text] =0";= `8  UNDEFER_INPUT= warning  OPEN_OUTFILEFLUSHREADBYTE CLOSE_OUTFILE=testh=]pEXPLODE= [empty] =0";=(@(| VMS=PK;MAPATTR!DECRYPT=lseek#MAPNAME=4v UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;110 warning- % DECC$STRLEN' DECC$FGETS=localP)MATCH7END_CENTRAL_SIG7FILENAMENOTMATCHED+ DECC$READ-READBUF7CENTRAL_HDR_SIG7 LOCAL_HDR_SIG7 REPORTMSG=0X"0;=\ 7 DECC$GA_STDIN7SEEKMSG/ DO_STRING1 DECC$STRNCMP3 DECC$LSEEK7 EXCLFILENAMENOTMATCHED7 CENTSIGMSG=s(= central8=EOF@ 5PROCESS_CDIR_FILE_HDR 7CHECK_FOR_NEWER7 ENDSIGMSGp 9PROCESS_LOCAL_FILE_HDR; DECC$STRCHR 44444444 444 =store=shrink=reduce=h\implodedeflateinflateexplode skipping: %-22s need %s compat. v%u.%u (can do v%u.%u) x=@7 skipping: %-22s unsupported compression method %u =8/ skipping: %-22s `%s' method not supported = tokenize= deflate64= DCL implode=(%s: bad filename length (%s) 0=0"%s: bad extra field length (%s) X=8*file #%u: bad zipfile offset (%s): %ld = %8sing: %-22s %s%s=(%s: bad file comment length = local header sig=(file #%lu: bad local header =0! (attempting to re-compensate)  =H<warning: %s appears to use backslashes as path separators `=0$ skipping: %-22s %svolume label =@3replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: =( NULL (assuming [N]one) = new name: =(error: invalid response [%c] =8*At least one %serror was detected in %s. @=0$Caution: zero files tested in %s. h=8, skipping: %-22s unable to get password =hZ skipping: %-22s incorrect password %u file%s skipped because of incorrect password. =8) (may instead be incorrect password) (=8.No errors detected in compressed data of %s. X=@5No errors detected in %s for the %lu file%s tested. =  error: %s%s %s =  error: %s%s = not enough memory to =(invalid compressed data to =0$warning: %s is probably truncated  =0!%s: unknown compression method H=0# bad CRC %08lx (should be %08lx) p=0" invalid compressed data for EAs =0" unsupported NTSD EAs version %d =0" bad CRC for extended attributes =8* unknown compression method for EAs (%u) =0$ out of memory while inflating EAs @=0' unknown error on extended attributes h=H:error [%s]: bad extra-field CRC %08lx (should be %08lx) =xi%s %s: %ld bytes required to uncompress to %lu bytes; %s supposed to require %lu bytes%s%s%s =PD%lu file%s skipped because of unsupported compression or encoding. `=h^bad extra-field entry: EF block length (%u bytes) exceeds remaining EF data (%u bytes) =PB error: unsupported extra-field compression type (%u)--skipping = __iscntrl= fnfilter(= memflush8= memextractH=test_compr_ebX=TestExtraFieldh= extract_or_test_member= store_info=extract_or_test_filesI I=1) compressed EA data missing (%d bytes)%sU U ==5 compressed WinNT security data missing (%d bytes)%s@ @=0('EXTRACTCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0, ,= "044=#extract_or_test_files04= >8 > >0 >$  >% > > > >) >  > > > > > > > > >y'f >F >m >9 > r? > >  > > > > > ?  =? E? I? I? K? L? Q? R? R? T? U? [? >v > > > > > ?  - i? g?n h? i?e r?  q?  r?  q?  }? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @ @ @ @ @ @ @ @  (@ /@ 4@ 3@ 3@ 4@ 5@X B@X @ @ @ @ @ @ @ @ @" @ @ @ @ @ @ C@@e @ %A &A p? OA RA >t RA SA >\ .A 0Af A A A A A A A4 A  A AĄ A A A A A A A A A A A A A A A A A A A A A A A A A AL }?: $ $= 4: := 4= g g= 44= store_infowQ * UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;114= A& 'B &B  (B +B /B  ;B 9B 9B :B 9B ;B ;Bx MB MB MB NB WB WB rB XB XB XB XB($ $= 44: := 4=  = #44=$extract_or_test_member4=,$ B B' B  B B B B  B  B B B  B  B B B B8 B YC [C ZC [C cC cC C C C4 B &C &C 'C (C (C (C 0C 0C ;C :C ;C ;C =C =C =C ;C =C CC CC B B B  B, BR BR  B B B B B B B C C C C C C C C C C C C C C C C C C0$ $= 4: := P(4=  [ [= (44=TestExtraField(4= C  C  C C  C D 3D 2D 5D 2D C C C D D C C C C C C Cl C C CL 7D 7D :D :D :D ~(08G- GGG $8B@b&%&1 _"tG@Zk%$!"$ 1"!E&G&GrXBR@FG$@@Zku@B0CG]] }(08@#k= $C(bHB/Pb$ʥG4G@ZkE GG"GG@ZkG# ~^^ ~(08GGx{#$cÔC @21@B᳔C\/aB!.`b _"tG@Zk#$ L/!Bb=4G@Zk}x"[G"G@ZkBb4G4G@ZkBbtG4G@Zk$ b# " A_Ӵ&բȕ%1B/0B8bG@ZkD. B(b4GDJRDJD/sHDSF D>@ZkG%1@#$!01BQ./QJ1"!G]] }(08@#kۦX#~^^~ (0޴8@H>P^X~`hGGGGGG2BG G 0`F G`<F GXD#'9 G/g#[KXAG@G.TG0@sHRGJ SFG>\"Bbd#"TGD@Zk\#hB&pb!Q @TG\#>0TG4G: G@ZkBbG4G@ZkX#$("`C\c0Bh0@B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@ 4D4/dGx DECC$OPEN40hb# DECC$OPEN4/t@x DECC$OPEN4 |G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4G< DECC$READ4b# DECC$READ48@< DECC$READ4tGOTS$MOVE4@OTS$MOVE4G DECC$STRLEN4b# DECC$STRLEN4@ DECC$STRLEN4G DECC$READ4b#0 DECC$READ4@ DECC$READ4G DECC$STRLEN 4b#0 DECC$STRLEN4@ DECC$STRLEN,G(ECHO,b#0ECHO,$@(ECHO4(G< RETURN_VMS4,b#0 RETURN_VMS48@< RETURN_VMS4-G DECRYPT_BYTE4.b#0 DECRYPT_BYTE4-@ DECRYPT_BYTE4+G UPDATE_KEYS4,b#0 UPDATE_KEYS4+@ UPDATE_KEYS4)G  SCREENSIZE4* b# SCREENSIZE4)@  SCREENSIZE4%$GX DECC$PUTC4&,b# DECC$PUTC4%T@X DECC$PUTC4XGl DECC$FFLUSH4\b# DECC$FFLUSH4h@l DECC$FFLUSH4G DECC$ISATTY4 b# DECC$ISATTY4@ DECC$ISATTY4G DECC$ISATTY4 b# DECC$ISATTY4@ DECC$ISATTY4%G DECC$PUTC4&b# DECC$PUTC4%v4jE-y gzdEvN^D HlOԼɭ)Y7U+^ТwxyY"_]1?جĕ%'N{3h6[;Qꈲ}(|},~CC Fg7|9i;tJ,g4qZlgOå,0>ΈF g$:BLAXXq ~lٹ'h2; >U4Qhn;L?n<('1!yei Ğq }͂ \o#!7ݡIAHhKSPN`|%K%)\K)U_pv5[/v!0K~,x021aևNjژdT7ɟcI;VjLG,LF_E"}Eia^Gbs4: }Kj#0{c/suLA5? (n aGLOr_z&.b0JRhZS$QG^Wp0֛{^ AۉnYQ+ϡŇ2L0k7( ^2AG?({8 B.!6d 5@_n=AM&B1؞Eb_^MCV_/" / PڞьuuVԙ3 4<ĚԅI(U(]_ 5>-ps\ɮdtپKlc@m#lu- ӿKC{"zy+BI,!JT65P'@r`h/8B.[k '.2Ĕ_ %oW6Z Ҝۧjf\L7zgZf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4,4= 0 = 044=open_input_file04=ZRQ 5@ 5@ 5@ 5@ 5@ >@ W@($ $= `4: := 4=  = 4p4= undefer_input4=@87 JA JA LA SA SA VAN N= P4\4= P = !`4 4="defer_leftover_input`4=1)( eA jA iA mA N N= 44= p = 44= readbuf4= yA yA yA   A A A A A A A A$ A A A A$ $= 4: := 4= `, ,= 0404=readbyte04= A A A A A A A A A A A A A< A A< A A A$$ $= \4: := 4= h h=  44=UzpMessagePrnt 4= C [C; [C ( mC&  C C C  C C C C  C C C C C C C C C$ C' C! C C C C C D D D D D D D Cj& D D D D D D D D D@$ $= 4: :=  4= y y=  4x4=UzpInput 4= UD: :=  4=  =  44= UzpMorePause 4=}ut qD pD dD  dD  dD  wD D D D D0$ $=  4: :=  4=  =  44= UzpPassword 4= D D D D D D4 D D D D D D D $ $=  4: :=  4= p =  44= handler 4=TLK D D D D_ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11V  D D E$ $= H 4 = P = p4 4= do_stringp4=F> GF GF GFF xF: yF xF zF: F zF zF }F }F {F F F F F F F F F F F F F F F F F F yFM yFM yFM yFLtL F F F F F F F F F F F F( F F F    G3 G G' G' G$ $= 4: := 4=  v v= 04x4=makeword04= TG: := L4=  = P4h4=makelongP4=KCB gG fG gG fG fG gG fG fG : := 4= P = 4P4= str2oem4=+#" G G G$ $= 4: :=  4= p = 44= zstrnicmp4=RJI G G G G G G, G G$ $= X4N N= 4D4=  =  ww1 u aV1.0CCGLOBALSV1.013-JAN-2001 19:09Co!mpaq C V6.2-003  $ABS$i$CODE$ $LITERAL$x$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$ CENTRAL_HDR_SIG  LOCAL_HDR_SIG END_CENTRAL_SIGFNAMESUZPMESSAGEPRNTUZPINPUT UZPMOREPAUSE UZPPASSWORDDECC$GA___CTYPE0J0 GLOBALS!"CTOR0 LOCAL_HDR_SIG0 CENTRAL_HDR_SIG0 END_CENTRAL_SIG G( G( FNAMESOTS$ZEROT T=Gk/;F!0@!.!J$Dk #^G8[ ?&~GG1""@Zk(@AHaPaX0#5'(ղ ""4G5Y˙^yyY/ ##k4@GhOTS$ZERO4d@hOTS$ZERO" "= *0 0=0;7DECC$GA___CTYPE=0"0;= ( 7G ;=P8OTS$ZERO7 UZPMOREPAUSE7 UZPPASSWORD7UZPMESSAGEPRNT7UZPINPUTX X= __iscntrl $= globalsCtor$ $= $ $ = $ $ = = = 46 @ @=0('GLOBALSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 =  %044= globalsCtor04=~ = =   = =   =   = = = = = = = = = $ $= X4: := 4=  =  ww1/v aV1.0CCINFLATEV1.013-JAN-2001 19:09Compaq C& V6.2-003  $ABS$i#$CODE$/ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$ DECC$FREE DECC$MALLOCDECC$GA___CTYPEGREADBYTEFLUSHMEMFLUSH0J" HUFT_FREE0JP HUFT_BUILD(J INFLA'TE0J@ INFLATE_FREE MASK_BITS0J0 INFLATE_CODESOTS$ZEROOTS$MOVE =Gk/;F!0@!.!J$Dk`#RB~ >sB^ ^(^0~8@H޴PX`>h^p~x޵GG~ @-I@0-0Ib G= $ ʀʠA@+$a31`Ba`@.@J 0B8bG@ZkG(2 2MJa C A EA_=EHBh F"A2x,ET@BHbK&GRGTG@G@Zk GPBXbGGGtG@Zk G G|!EA  &0P11 B0 r.rJR"P)/0B8bG@ZkG 3mJC A EA?)A@P.PJ?@B 'EHbG GTG@Zk G$G/PBXbGGGtGG@Zk G 4G4G 4G 4G 4G 4G 4G 4G$ƱʆʦGG ]+(]0}8@HݤPX`=h]p}xݥ#k@.R @JEO0,A 0H !EP.T JtF.T JTFo.S oJSFFp.S pJSFrà#~^^~ (0޴8@H>P^XGGGh$ ʠ<J DK'1@C@$$! 1@.J1"!/BbG@ZkG0 0J C@D@?(vH&H'@H@@d&ȓȳ41Bȓ.J"ȳ4G`àBbG@ZkG6 6J C@D@ 7 UN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] = h}#WYA *A11 AT!AH%`D!AWB Gh!! GG= 3pI}0@}ݠ=}"TA$1 B#1`@AA} GGcp}=c A ;Av@s]';A]1gI5BCuB0A GF!B5 4aJ0@!H@01:B"11 B B" 5@ $1BR"B# R4BB0@B4BB0@7B@24BB0@B@0@1B8H C@ @/21BR"B0@1B@gC4GUCuC5B(bAG B5D3gI}PaB@Zk="@"`"}D]TA9lI}#*_IAA!91 C@EH]#x1J7A =h`GREADBYTE4 b#`READBYTE4 @READBYTE4xGREADBYTE4|b#`READBYTE4@READBYTE4GREADBYTE4b#`READBYTE4 @READBYTE4GREADBYTE4?b#`READBYTE4@READBYTE4GREADBYTE4b#`READBYTE4@READBYTE 4PG`READBYTE4Tb#`READBYTE4\@`READBYTE4PG`READBYTE4Tb#`@READBYTE4\@`READBYTE4PG`READBYTE4Tb#`READBYTE4\@`READBYTE4GREADBYTE4b#READBYTE4@READBYTE4 G0READBYTE4$b#READBYTE4,A@0READBYTE4 GMEMFLUSH4 b#MEMFLUSH4 @MEMFLUSH, GFLUSH, b#FLUSH,  @FLUSH4GOTS$ZERO4@OTS$ZERO4,b#P DECC$MALLOC44GPB DECC$MALLOC4L@P DECC$MALLOC4"G" DECC$FREE4"b# DECC$FREE4"@" DECC$FREEk k= (incomplete d-tree) =(incomplete l-tree) , ,=0;7DECC$GA___CTYPE=0"";=0$ @C DECC$FREE=0";=p\  DECC$MALLOC8OTS$ZERO=0"@;=00 7G=0 "0;=` 7 MASK_BITSREADBYTE MEMFLUSH FLUSH8OTS$MOVE=0" ;=(< ;=0";=`8 D=0 "` ;=< ;=0" ;=@(|  =PB  #+3;CScs6H=H>cc=H< !1Aa  0@`=H<E =XL     X=inflate_blockh= __iscntrlx= huft_free= huft_build= inflate_free=inflate_codes=inflate_fixed=inflate_storedF= inflate_dynamicinflate@ @=0('INFLATECompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= inflate_codes04= e? e? e? }? w? s?  w? y? w?G ? ? ? ? ? ? ? ?  ? ? ? ?  ? ? ?  ? ?  ? ? ? ? ? ? ? ? ? %L }? $ $= 4: := 4=  = 4@4=Hinflate_stored4= ? ? ?4 ? @ @ @ @ @ @ @ @ @ < @$ $= 4: := d 4=  =  44= inflate_fixed 4=JB '@  '@ /@ 5@ 5@ 5@ 5@ 7@ 7@ 7@ 7@I 7@ 7@ 9@ 9@ 9@ 9@ 9@ ;@ ;@ ;@ ;@ ;@ >@ =@ >@ >@ F@ F@ F@ F@ F@ H@8 H@ I@ I@ L@ M@($ $=  4 : := 8 4= ; ;= ` 4`4=inflate_dynamic` 4= Y@ u@ {@ 4 UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11%IJ4 z@ ~@4 }@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @  @ @ @ @ @ @ @ @K @ @ @ @ @ @ @ @ @ @= @ @ @ @< @$ $=  4: := 4=  ' '=# inflate_block =  =  44= inflate 4=ogf ;A NA A A4 AL %A &A A  0$ $= L4B B= e4= XA = \: := 4=   = @44= inflate_free@4=1)( kA hA qA qA $ $= x4N N= 44= M = 4P4= huft_build4= A) A) A) A A A A A A A A A A A A A A A A A A A A A A A A A A$ A A A A A A A A A< A  AR A A) ANP A A_) AJ AJ A A , A& A A& A A A A A A A A A A B A B A B A A A A A B B B B  B B B B B !B B B B B B B B 'B *B ,B 1B 1B 1BO 6B 6B 7B{ 7B ;B ;B =B @B @B @B @B @B @B A\ GB GBL B$ $= @4: := "4=  = "44= huft_free"4=D<; [B PB  PB  ]B [B aB aB$ $= "4N N= #4 P #4= pD D}`4 =  ww1$taV1.0@@LISTV1.013-JAN-2001 19:02Compaq C V6.2-003X X $ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$Q DECC$FREE DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCHR DECC$STRCPY DECC$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ING],GMATCH,b#MATCH,@MATCH,GMATCH,b#MATCH,@MATCH4 GD DECC$STRCPY4b# DECC$STRCPY4@@D DECC$STRCPY4G DECC$GSPRINTF4b#^ DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4Gh DECC$GSPRINTF4b# DECC$GSPRINTF4d_@h DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G$ DO_STRING4 b# DO_STRING4 @$ DO_STRING4dG DO_STRING4hb# DO_STRING4@ DO_STRING`, GREADBUF,b#READBUF, @READBUF4(G` DECC$GSPRINTF40b# DECC$GSPRINTF4\@` DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4<G` DECC$GSPRINTF4a@b# DECC$GSPRINTF4\@` DECC$GSPRINTF4dG| DECC$GSPRINTF4hb# DECC$GSPRINTF4x@| DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINbTF4 @ DECC$GSPRINTF4 8 GX DECC$STRNCMP4 D b# DECC$STRNCMP4 T @X DECC$STRNCMP 4\ G| DECC$GSPRINTF4h b# DECC$GSPRINTF4x @| DECC$GSPRINTF, L Gp READBUF,X b#READBUF, l @p READBUFc4  G DECC$STRNCMP4  b# DECC$STRNCMP4  @ DECC$STRNCMP<  G PROCESS_CDIR_FILE_HDR<  b#PROCESS_CDIR_FILE_HDR<  @ PROCESS_CDIR_FILE_HDR4 G DO_STRING4 b# DO_STRING4 @ DO_STRING4 dG DECC$FREE4 b# DECC$FREE4 @ DECC$FREE4 G4 DO_STRING4( b# DO_STRING40 @4 DO_STRING,l G MATCH,t b#MATCH, @ MATCH, G MATCH, b#eMATCH, @ MATCH4 G( DECC$STRLEN4 b# DECC$STRLEN4$ @( DECC$STRLEN44 Gt DECC$STRCHR4< b# DECC$STRCHR4p @t DECC$STRCHR<| G DOS_TO_UNIX_TIME< b#DOS_TO_UNIX_TIME< f@ DOS_TO_UNIX_TIME4 G DO_STRING4 b# DO_STRING4 @ DO_STRING,  G READBUF, b#READBUF,  @ READBUF4` G DECC$GSPRINTF4h b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 gG DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 G0 DECC$STRNCMP4 b# DECC$STRNCMP4 ,@0 DECC$STRNCMP40GX DECC$GSPRINTF4<b# DECC$GSPRINTF4T@X DECC$GSPRINTF4G@ OTS$DIV_UI4 y UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11gh}#p OTS$DIV_UI4<@@ OTS$DIV_UI4dG OTS$DIV_UI4l}#p OTS$DIV_UI4@ OTS$DIV_UI4G OTS$DIV_UI4}#p OTS$DIV_UI4@ OTS$DIV_UI4 G(FNFILTER4b#FNFILTEiR4$@(FNFILTER4,GP DECC$STRLEN40b# DECC$STRLEN4L@P DECC$STRLEN  =0;7DECC$GA___CTYPE=0 ;=@ 7GFNFILTER= ` DECC$STRLEN= 0";= j OTS$DIV_UI7 CENTSIGMSG DECC$STRCHR7END_CENTRAL_SIG PROCESS_CDIR_FILE_HDR DECC$STRNCMP READBUF DO_STRING=0(" ;=X  DECC$GSPRINTF7CENTRAL_HDR_SIGPMATCH DECC$FREE7 REPORTMSG7 ENDSIGMSG DOS_TO_UNIX_TIME=0x"k0;=P ;= > ף;=s DECC$STRCPY=%03u=%s %s h h484`44 =%c%d%%=100%%=0! Length Date Time Name8l=0! -------- ---- ---- ----`=H? Length Method Size Ratio Date Time CRC-32 Name=H?-------- ------ ------- ----- ---- ---- ------ ----=0#%s ("^" ==> case %s conversion) =@7%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %c@=0#%9lu %02u-%02u-%02u %02u:%02u %ch=-------- m------- --- ------- %8lu %8lu %4s %lu file%s =PG -------- ------- %9lu %lu file%s 0= fn_is_dir@= __iscntrlP=fnprintratio`=get_time_stampp=peStoredShrunkReduce1Reduce2Reduce3Reduce4ImplodeTokenDefl:#Def64#ImplDCLUnk:n###NXFS= list_files= ==-%$LISTCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= list_files04=D< >=4 >=. >= A=+ D=  D=  oq= q= }= }= =7n  =  &> = =  =  = = = = = = = =$ = = 5 = = = = = = =9 > > = > > !> !> !> !> #> #> #> %> 9> => G> N> N> U> U> U> Vp> U>< = }= }=2P = = = = = o> t> t> v> {>" > > > > > - > > = $ $= 4: := 4=  # #= fn_is_dir =  =  44=get_time_stampq 4= > > > > > > >* > >, > > ? ? ? ? ? ? ? ? ? ?$ ? ?  >h > > > > >q< > >cP > > > > > >L I? I?' J? M? ? /$ $= D 4B B= r e4= ,?] ]=v 4=  4= `p: :=  4=  = 4p4= ratio4=nfe ^?  f? f? f? e? e? e? f? i? l? n? $ $= 4v v= 4@ s444= 0 = 44= fnprint4=.&% z? z? }?$ $= 4 = D D 4 =   ww1{v aV1.0AAMATCHV1.013-JAN-2001 19:09tCompaq C V6.2-003P P $ABS$ih$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$0 $READONLY$ DECC$TOLOWERDECC$GA___CTYPE(Jh0MATCH(JISWILD =phGk/;F!0@!.!J$Dk#G~G^GG{#@G]u5@ #k#~^^~ (0޴8@H>P^X~`GGGG0, 0H,H@8bD C.#"GCJtG@G_XD .JC.CJ @8bGGGtG_#,c #H?TG/4GxD C.CJ@.J5BՋB@G.GGJ/ GH/HKKG4GKG@(,!(H?H.@BHJ GKF@^C.JF` 4G@?SF.F# J@?Jv/@b#.(Bs0b#JqB1/1K C.4GCJ@Zk HH H#,#H 'HH H#.#Jf." CtJeF#` .J.J7A"@?EG9:Cy/(ByK0b 4G@Zk HH 'IH/G 0 A D&,&H!A?G G@?8bM"#"GtG4_HF8b"#"GtG,_@ D`&-&I 9"(H(B!0bEC 0@!.4G!J @Zk HH IH/ D"#-(B0b!#I4G)@;#F UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11Zvw.J #.#J@Zk HH-I IH,H8b`A#"GGtG_/GG]]} (0ݤ8@H=P]X}`p#k0,0H /G+D`."J"DF XEF@."J?Gk/4Gk4lG DECC$TOLOWER4tb#( DECC$TOLOWER4@ DECC$TOLOWER4G4 DECC$TOLOWER4$b#x( DECC$TOLOWER40@4 DECC$TOLOWER4G DECC$TOLOWER4b#( DECC$TOLOWER4@ DECC$TOLOWER4@Gp DECC$TOLOWER4Db#( DECC$TOLOWER4l@p DECC$TOLOWER0 0=0;7DECC$GA___CTYPE=0y;=0"p;=p< P DECC$TOLOWER(;=0"0;= = __iscntrl=iswild= recmatch(=match> >=.&%MATCHCompaq C V6.2-003~ ~= 44= __iscntrlz4=  N N= 4,4= 0 = 04h4= match04=& Z=# Z=# ~=$ $= P4: := h4= @B B= p4(4=recmatchp4= =  = ={ = = = = = = = =R = =T = = =  = =<$ $= 4: := 4=  = 44= iswild4=,$# > > >N N= X4d4= h = | ww1haV1.0CCPROCESSV1.013-JAN-2001 19:03Compaq C V6.2-003   $ABS$i#$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$h $READONLY$ DECC$FREE DECC$MALLOC DECC$GSPRINTFDECC$GA___CTYPE DECC$}STRNCMP DECC$STRLEN DECC$STAT DECC$CLOSE DECC$LSEEK DECC$READ LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGG8J 0PROCESS_ZIPFILES0JFREE_G_BUFFERS0J UZ_END_CENTRAL8J PROCESS_CDIR_FILE_HDR0Jp GET_CDIR_ENT8J!~PROCESS_LOCAL_FILE_HDRZI_END_CENTRALZIPINFO LIST_FILESGET_TIME_STAMPOPEN_INPUT_FILEREADBUF DO_STRINGMAKEWORDMAKELONG EXTRACT_OR_TEST_FILES INFLATE_FREE CHECK_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7mпbj!\H qD/RJX͜tY z*TA_ |aXRWm۵£ZZMKVKW]1PH ߣcwَbJyoO+q%  6pȇƷ~|FڤZ #&v}r_ـiuMpCظJz1T[@&qUaNsj(̚( X*H?td9gkQ\q 1!=urJ RrUk"uf% ƛ1/!Pu9t*:hͿ:HZTy"I:834N[LԊ$Se*n'v=&mW%GU͌)2۷V(jiá'0lp\Kv*7 x׮hLQ \; ׯiX-j*GdNx,CkȖMNFKɊ hfp y{fbWt9{ cV`HV}ӸO a|GczaswtO?L4Jǣ7M Q^ UùJO*At@*&kCFSãW:pyŕ8@E s<˜Ee3:dLC1ɅkyQǶ24xJ/am-DєQ}=͠ FUjo^GqOt0TF?ӵy~RGQŘTDQ?M"T~)B-)z?? 8 R({'L,Iv1k旆Gx^3fQ62R$'k/9! rv* HM6h|7G*td>_CֱSr A:@#<îSøKC%6Yb'zgD{ [9se̴NH r%NR9~ zh`& ONi*$m<1u k0Vk "%w$/`<4L;ДFΓoÛiL?3:x*{ɥs ynMo! ֬#zp. _Τ7o_d9E<+2knN'}j=_+;U|kүr.+z=eL1 nG`SC6ocE!ѡH0?oH'"B;mttBWt$psX>"${e 9,>9Bo:4gs&ZP ПjumR X6[7݊Y&Y/IZ4 bA-^O62'23Y%[u[Ym D jjuD\goߊl/T!kE| U@"DXz?ߞ!"k-#arIoȱA;h$:2Nm34٫-Vf@nxd7oYg,[CSc#e7S6T2ޓJB`bu _zI"g3.E ~gXѳ^d 6F5g27BTdϦr[~ʜOIAaH'hfC#:E7E@[otOԴύ ? @`Su3x_?8pb"veG>#'s!vuę~,y7N ~6cjN[OG+/C.`w(~$ry)vGClKa E7z >lҲY}UXzX֚.h > > > > > > > > > -> -> -> 1> -> 0> => =>  @>  @>  o> q> o> o> q> o>  o> u> |> |> {> |> {> >K > > > > > > >H$ $= 4: := 4=  = 44=free_G_buffers4= > > > > > > > > > > >  > > > > $ $= 4: := 4=   =  4X4= do_seekable 4=kc > >  > > - >) > > > > >#  ?   +? +? 2? 2? :? :? 9?  :? I? L? I? I? I? I? I?  \? e? e?  s? s? x? s? s? z? ~? ?  ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $ ? ? ? ?  ? ? ?  ?  @ @ @ @  @ @ @  @ ?: @ @ @ !@ !@T #@ > >  ? > ?, ?$ $= P 4: := h4=  U U= 4p4= find_ecrBm UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11ec4= 7@  7@  7@ 7@  D@  D@ D@ D@ F@ J@ M@ M@ M@ L@ K@ K@ J@ O@  [@ `@  c@ `@ c@ c@ h@ k@ k@ k@ j@ i@ i@ h@ m@  }@  }@ @ @ @ @ @ @ @ @ @ @ @ @0 @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @\ @ @ @ @ @ @ @ @0 [@$ $= 4: := 4= ` =  44=uz_end_central 4=~vu @ @ @ @ @ @ @ @ @ @ @ @$$ $= D4: := 4=  = " 44=#process_cdir_file_hdr 4= @  A A A A A  "A &A &A &A &A &A 2A$ $= <4: := d4= ` = 4p4= get_cdir_ent4= @A  @A  @A  WA TA WA WA WA WA YA YA YA YA [A [A ]A _A _A aA cA cA cA cA eA eA eA eA gA gA gA gA iA iA iA iA kA kA kA kA mA mA oA$ $= 4: := !4= Pi i= #!44=$process_local_file_hdr!4= ~A  ~A  ~A  A A A A A A A A A A A Aj A A A A A A A A A A A$ $= "4: := #4=  =  ww1v aV1.0AATTYIOV1.013-JAN-2001 19:09Compaq C V6.2-003  $ABS$i$CODE$- $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$0 $READONLY$DECC$GA_STDERRDECC$GA_STDOUT DECC$FCLOSE DECC$FFLUSH DECC$FPUTS DECC$GETC DECC$PUTC DECC$FOPEN DECC$CTERMIDDECC$GA___CTYPE(J0ECHO0J`TT_GETCH(JGETP SYS$ASSIGN SYS$DASSGNSYS$QIOW| |=Gk/;F!0@!.!J$Dk#G(^GH[G0^8~GG#=" 8Pb@ZkF=(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OSE4b# DECC$FCLOSE4@ DECC$FCLOSE, ,= SYS$COMMAND= ==%(line too long--try again)  ?8[ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11e=0;7DECC$GA___CTYPE=0("0;=@( @SYS$QIOW;` SYS$ASSIGN SYS$DASSGN= DECC$FCLOSE=r DECC$CTERMID; DECC$FFLUSH=0";=P8 7DECC$GA_STDERR DECC$FPUTS DECC$GETC DECC$FOPEN7DECC$GA_STDOUTP DECC$PUTC=0(";=P0 < <= 4 = __iscntrl=echo=getp = tt_getch> >=.&%TTYIOCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= echo04= E E E E a d e e r u v v x$ $= l4: := 4=  = 4`4=tt_getch4=_WV          $ $= 4: := 4=  = 44= getp4=        % ( ( + / / 6 6 8 80$ $= 4: := 4= P =   ww14saV1.0DDUNREDUCEV1.013-JAN-2001 19:03Compaq C V6.2-003  $ABS$i0$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$DECC$GA___CTYPEP P=80Gk/;F!0@!.!J$DkT T=0;7DECC$GA___CTYPE* *= __iscntrlA A=1)(UNREDUCECompaq C V6.2-003~ ~= 44= __is cntrl4=  N N= 4,4= 0 =  ww1\.aV1.0DDUNSHRINKV1.013-JAN-2001 19:03Compaq C V6.2-003  $ABS$i0$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$DECC$GA___CTYPEP P=80Gk/;F!0@!.!J$DkT T=0;7DECC$GA___CTYPE* *= __iscntrlA A=1)(UNSHRINKCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 =  ww1ds aV1.0AAUNZIPV1.013-JAN-2001 19:34Compaq C V6.2-003  $ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$( MASK_BITS VERSIONDATEP ENDSIGMSGH CENTSIGMSG@SEEKMSG (FILENAMENOTMATCHED(0EXCLFILENAMENOTMATCHED REPORTMSGZIPNFO ( COMPILEDWITH HUNZIPUSAGELINE1 DECC$GETENV DECC$PERROR DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCMP DECC$STRNCMP DECC$STRLEN DECC$SIGNAL DECC$ISATTY GLOBALSCTORG(JMAIN(Jp UNZIP(JUZ_OPTS(JUSAGE PROCESS_ZIPFILESZI_OPTSHANDLER ZSTRNICMP RETURN_VMSENVARGSVERSION0  MASK_BITSFNAMES0 VERSIONDATE0 CENTSIGMSG0 ENDSIGMSG( SEEKMSG8 FILENAMENOTMATCHED8 EXCLFILENAMENOTMATCHED0  REPORTMSG( ZIPNFO0  COMPILEDWITH0 UNZIPUSAGELINE1(J0__MAIN DECC$MAIN DECC$EXIT DECC$$SHELL_HANDLER =# ? ~4G0^8^@cG("#G$" "@[Hb=/@Zk$=(b# @0B8bG4G@ZkcG0]8]@P#k#G^0[~^/ GG >8b@Zk =b#@ B(bG4G/@ZkG]] 4G0#k/#TG ^[(^0~8~>@H޴PXGG(;bTG@ZkBb("bGTG@ZkBb("TGTG@ZkBb("tGTG@Zk=Bb5@l4G@Zk=!B@$ A"2@`@.JF. JF / K+G `/ `KkG ` @?@`.JF @0B8bP"G CtG@Zk0B/ 8bx""TGtG@Zk='Bb= @ ""TGtG@ZkBBbhr""="GXR"@Zk"@B HbG"4G@Zk=G) *"="Pb#@øBBb4Gr"#"="xR"G@Zk"@B HbG"4G@Zk=G ÐBb"="TG@Zk=G G&  GGp#t㳆 xd`#Bb9 p""TGtG@Zk3="@ G4@pBCFWJp /䳠7@pBC9GWKtCz/zK@ =7@=" 1BJp BCFWJ55CpD_G`B%hb""@Zk#4GDp㳜 !@p @CFGW Kp#D"=C 1QBp BCFW`J3BtcD_!4GD _ð"Bc'") UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;117{bGx1"TG@ZkCGGG"GG@ZkTG#4Gp㳜xð4GxTG#c$G¤BcbF"G "1"@ZkCGGG"GG@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 DECC$STRLEN4G ZSTRNICMP4b#p ZSTRNICMP 4@ ZSTRNICMP4G ZSTRNICMP4b#p ZSTRNICMP4@ ZSTRNICMP4G DECC$STRNCMP4b#p DECC$STRNCMP4@ DECC$STRNCMP,G,ENVARGS, b#pENVARGS,(@,ENVARGS40GL DECC$PERROR48b#p DECC$PERROR4H@L DECC$PERROR,xGENVARGS,|b#pENVARGS,@ENVARGS4G DECC$PERROR4b#p DECC$PERROR4@ DECC$PERROR, GZI_OPTS, b#p} UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11ZI_OPTS, @ZI_OPTS4HGh DECC$STRNCMP4Lb#p DECC$STRNCMP4d@h DECC$STRNCMP48GP DECC$STRCMP4Db#p DECC$STRCMP4L@P DECC$STRCMP4G DECC$GSPRINTF4b#p DECC$GSPRINTF4 @ DECC$GSPRINTF4lG DECC$GSPRINTF4tb#p DECC$GSPRINTF4@ DECC$GSPRINTF< GPROCESS_ZIPFILES< b#pPROCESS_ZIPFILES< @PROCESS_ZIPFILES4` G DECC$GSPRINTF4l b# DECC$GSPRINTF4| @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 G8 DECC$GSPRINTF4 b# DECC$GSPRINTF44 @8 DECC$GSPRINTF4d G DECC$GSPRINTF4h b# DECC$GSPRINTF4| @ DECC$GSPRINTF4 G  DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4G( DECC$GSPRINTF4 b# DECC$GSPRINTF4$@( DECC$GSPRINTF4TGp DECC$GSPRINTF4Xb# DECC$GSPRINTF4l@p DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G@ DECC$GSPRINTF4b# DECC$GSPRINTF4<@@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$ISATTY4b# DECC$ISATTY4@ DECC$ISATTY4DG DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G0 DECC$GSPRINTF4b# DECC$GSPRINTF4,@0 DECC$GSPRINTF( (4TGp DECC$GSPRINTF4\b# DECC$GSPRINTF4l@p DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF48GX DECC$GSPRINTF4Db# DECC$GSPRINTF4T@X DECC$GSPRINTF4xG DECC$GSPRINTF4|b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4(GT DECC$GSPRINTF4,b# DECC$GSPRINTF4P@T DECC$GSPRINTF4G$ DECC$GSPRINTF4b#p DECC$GSPRINTF4 @$ DECC$GSPRINTF4DG DECC$GSPRINTF4Hb#p DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF,GVERSION,b#pVERSION,@VERSION4G  DECC$GSPRINTF4b#p DECC$GSPRINTF4@  DECC$GSPRINTF4@Gh DECC$GSPRINTF4Db#p DECC$GSPRINTF4d@h DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4GL DECC$GSPRINTF4b#p DECC$GSPRINTF4H@L DECC$GSPRINTF4lG DECC$GSPRINTF4pb#p DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GETENV4b#p DECC$GETENV4@ DECC$GETENV4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4(G< DECC$GETENV4,b#p DECC$GETENV48@< DECC$GETENV4dG DECC$GSPRINTF4hb#p DECC$GSPRINTF4|@ DECC$GSPRINTF4G DECC$GETENV4b#p DECC$GETENV4@ DECC$GETENV4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4G0 DECC$GETENV4 b#p DECC$GETENV4,@0 DECC$GETENV4PGl DECC$GSPRINTF4Tb#p DECC$GSPRINTF4h@l DECC$GSPRINTF =`S Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). T=@8Pp0p0Pp@0p@$ $=0";=`D 7G; DECC$GSPRINTF="H ;y UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11;=`=[-Z] h;=0 ;=P0|  DECC$GETENV=%d VERSION=0";=L  DECC$ISATTYG e5=-Z ZI_OPTS=-x  PROCESS_ZIPFILES DECC$STRLEN DECC$STRNCMPENVARGS DECC$SIGNAL=0 " ;=`8 7FNAMES7HANDLER ZSTRNICMP DECC$PERROR; DECC$STRCMP=-d=ii=0";=0(  RETURN_VMS GLOBALSCTOR=00";=P( 7DECC$$SHELL_HANDLER= DECC$EXIT! DECC$MAIN =vms.c== %s =[none] = UNZIP_OPTS0= UNZIPOPT@= ZIPINFO_OPTSP= ZIPINFOOPT`=8*envargs: cannot get memory for arguments=0&caution: not extracting; -d ignored =verror: -d option used more than once (only one exdir allowed) error: must give decryption password with -P option 0=@1caution: both -n and -o specified; ignoring -o h=0#"-X" restore owner/protection info=(* or % (e.g., "*font-%.zip")=8+ "-M" page output through built-in "more" =0$UnZip special compilation options: =8) UnZip and ZipInfo environment options: 8= %16s: %s H=H=COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)=H;LZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)= TIMESTAMP=0& [decryption, version %d.%d%s of %s] = 05 May 2000=8/"-Z" => ZipInfo mode (`unzip "-Z"' for usage).@=PCerror: must specify directory to which to extract with -d option =XJerror: -Z must be first option for ZipInfo mode (check UNZIP variable?) =XMerror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid (=XM unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS x=XL "-M" pipe through "more" pager =ZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s. usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] p=0& main listing-format options: -s short Unix "ls -l" format (def.) -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format -v verbose, multi-page format =miscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal format %c-C%c be case-insensitive %s -x exclude filenames that follow from listing =UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details. 8 =Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.  =Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s  =YQ=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe   =@1 -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract files into exdir %s  =modifiers: -q quiet mode (-qq => quieter) -n never overwrite existing files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v  be verbose/print version info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %s =Examples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer =usage= show_version_info=uz_opt sunzip= mainB B=*"??0 0 =14 January 2001i i =QI note: didn't find end-of-central-dir signature at end of central dir. g g =OGerror: expected central file header signature not found (file #%lu). \ \ =D<error [%s]: attempt to seek before beginning of zipfile %sD D =,$ca  ution: filename not matched: %s M M=5-caution: excluded filename not matched: %s = (please check that you have transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles) ( (=zipinfoC C=+#Compiled with %s%s for %s%s%s%s. g g=OGUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unz ip -v. > >=.&%UNZIPCompaq C V6.2-003? ?= 4=TRANSFER$BREAK$GO# #= __iscntrl =  = 44= main4=5-, K@ K@ K@ R@ $ $= 4: := 4=  =  4p4, UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11  = unzip 4=YQ ^@N ^@N ^@NE @? @ @ @ @ @ @  A A A A A A A A A A A A A A A A A A A A  A  W EA" EA" dA kA tA tA yA  A mA# A A mA, A A A A A A mA7 mAJ9 mA A A A A A,$ $= `4: := 4=  = 44= uz_opts4= A A A" A A A  A A  A A B   ,B :B  B B B B  B B B B B  B B B B "C #C DC EC LC MC  AV& lBZ qC qC qC qC qC }C }C }C C C& C CP$ $= H4: := 4=  ) )= 44= usage4= C C C C C C D D DԼ D D D? D D #D 'D $ 8D$ $= 44: := 4=  = 4p4=show_version_info4=tlk ID ID ID LD6M  #E% (E% (E%$ $= 4 = ` `= 404= __main84: := 4=  =  0ww1&6w aV1.0??VMSV1.013-JAN-2001 19:04Compaq C V6.2-003  $ABS$i V$CODE$ $LITERAL$0 $LINK$($DATA$\ $BSS$ $READONLY_ADDR$ $READONLY$ DECC$FREE DECC$EXIT DECC$UMASK DECC$MALLOCDECC$GA_STDERR DECC$FFLUSH DECC$GSPRINTF DECC$FGETS DECC$TOLOWERDECC$GA___CTYPE CMA$TIS_ERRNO_GET_ADDR DECC$STRCPY DECC$STRNCPY DECC$STRRCHR DECC$STRCMP DECC$STRLEN DECC$STAT DECC$MKDIR DECC$TIMEDECC$LOCALTIMEDECC$GA_RMS_NAMDECC$GA_RMS_FABDECC$GA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# SYS$BINTIM45@  SYS$BINTIM4=GOTS$MOVEE4=@OTS$MOVE4 G DECC$STRLEN4 b# DECC$STRLEN4 @ DECC$STRLEN4I Gd SYS$CREATE4J$b# SYS$CREATE4I`@d SYS$CREATE4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DFECC$GSPRINTF4QG@ SYS$CONNECT4R8b# SYS$CONNECT4Q<@@ SYS$CONNECT4DGx DECC$GSPRINTF4Hb# DECC$GSPRINTF4t@x DECC$GSPRINTF4lG DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4=GG OTS$MOVE4= @ OTS$MOVE4  G8 DECC$STRLEN 4 $ b# DECC$STRLEN4 4 @8 DECC$STRLEN4I G SYS$CREATE4J b# SYS$CREATE4I @ SYS$CREATE4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4H @ DECC$GSPRINTF4OT Gt SYS$EXTEND4PX b# SYS$EXTEND4Op @t SYS$EXTEND4x G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4Q G SYS$CONNECT4R b# SYS$CONNECT4Q @ SYS$CJV UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11HIONNECT4 GP DECC$GSPRINTF4( b# DECC$GSPRINTF4L @P DECC$GSPRINTF4t G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4  G DECC$STRLEN4  b# DECC$STRLEN4  @ DECC$STRLEN4LGJd SYS$PARSE4\b# SYS$PARSE4`@d SYS$PARSE4G SYS$ASSIGN4b# SYS$ASSIGN4@ SYS$ASSIGN4 b#SYS$QIOW4<GHSYS$QIOW4D@HSYS$QIOW4pG SYS$DASSGN4xKb# SYS$DASSGN4@ SYS$DASSGN4TGx DECC$GSPRINTF4Xb#8 DECC$GSPRINTF4t@x DECC$GSPRINTF4KG DECC$FFLUSH4Lb#8 DECC$FFLUSH4K@ DECC$FFLUSH4MG DECC$FGETS4Nb#8 DECC$FGETSL4M@ DECC$FGETS4GG DECC$TOLOWER4Hb#8 DECC$TOLOWER4G@ DECC$TOLOWER4GG( DECC$TOLOWER4H b#8 DECC$TOLOWER4G$@( DECC$TOLOWER4G,GL DECC$TOLOWER4H0b#8 DECC$TOLOWER4GH@L DMECC$TOLOWER4G\G DECC$TOLOWER4H`b#8 DECC$TOLOWER4G@ DECC$TOLOWER4I4Gt SYS$CREATE4J\b#8 SYS$CREATE4Ip@t SYS$CREATE4IG SYS$CREATE4Jb#8 SYS$CREATE4I@ SYS$CREATE4GN$ DECC$GSPRINTF4b# DECC$GSPRINTF4 @$ DECC$GSPRINTF,7\GCRC32,8`b#CRC32,7@CRC324G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4=DGXOTS$MOVE4=T@XOOTS$MOVE4?\Gx DECC$FREE4@`b# DECC$FREE4?t@x DECC$FREE 4?|G DECC$FREE4@b# DECC$FREE4?@ DECC$FREE4?G DECC$FREE4@b# DECC$FREE4?@ DECC$FREE4?PG DECC$FREE4@b# DECC$FREE4?@ DECC$FREE4?G DECC$FREE4@b# DECC$FREE4?@ DECC$FREE4? GH DECC$FREE4@b# DECC$FREE4?DH DECC$FREE4UG DECC$MALLOCQ4Vb#0 DECC$MALLOC4U@ DECC$MALLOC4=G4OTS$MOVE4=0@4OTS$MOVE4S8Gh MEMEXTRACT4T@b#0 MEMEXTRACT4Sd@h MEMEXTRACT4?pG DECC$FREE4@tb#0 DECC$FREE4?@ DRECC$FREE4=tGOTS$MOVE4=@OTS$MOVE,7GCRC32,8b#CRC32,7@CRC324=GOTS$MOVE4=@OTS$MOVE49G SYS$SYNCH4:b#0 SYS$SYNCH49@ SYS$SYNCHS,;P G| SYS$QIO,<T b#0SYS$QIO,;x @| SYS$QIO4=`!G!OTS$MOVE4=|!@!OTS$MOVE4"G" DECC$GSPRINTF4"b# DECC$GSPRINTF4"@" DECC$GSPRINTF4=#G0#OTS$MOVE4=,#@0#OTS$MOVE4=T<#GX#OTS$MOVE4=T#@X#OTS$MOVE4=#G$OTS$MOVE4=$@$OTS$MOVE44$Gh$ DECC$GSPRINTF4<$b# DECC$GSPRINTF4d$@h$ DECC$GSPRINTF4@'Gt' DECC$GSPRINTF4`'b# DECC$GSPRINTF4p'@t' DECC$GSUPRINTF4='G(OTS$MOVE4='@(OTS$MOVE4(G4) DECC$GSPRINTF4(b# DECC$GSPRINTF40)@4) DECC$GSPRINTF4=x)G)OTS$MOVE4=)@)OTS$MOVE4A *G$*SYS$WAIT4B*b#SYS$WAIT4A *@$*VSYS$WAIT4CX*G* SYS$WRITE4D\*b# SYS$WRITE4C*@* SYS$WRITE4A+G+SYS$WAIT4B+b#PSYS$WAIT4A+@+SYS$WAIT,E+G,SYS$PUT,F+b#PSYS$PUT,E+@,SYS$PUT4A-G-SYSW$WAIT4B-b#SYS$WAIT4A-@-SYS$WAIT4.G(. SYS$CLOSE 4.b# SYS$CLOSE4$.@(. SYS$CLOSE49.G. SYS$SYNCH4:.b# SYS$SYNCH49.@. SYS$SYNCH4 /GL/SYS$QIOW40/g UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11MWXb#SYS$QIOW4H/@L/SYS$QIOW4L/Gd/ SYS$DASSGN4T/b# SYS$DASSGN4`/@d/ SYS$DASSGN43\1G1 DECC$TIME441b# DECC$TIME431@1 DECC$TIME411G1DECC$LOCALTIME421b#DECC$LOCALTIME41Y1@1DECC$LOCALTIME412G$2DECC$LOCALTIME422b#DECC$LOCALTIME41 2@$2DECC$LOCALTIME4 03GH3 DECC$STRLEN4 43b#  DECC$STRLEN4 D3@H3 DECC$STRLEN43G3 SYS$PARSE43b#  SYS$PARSE43@3 SYS$PARZSE44GX4 SYS$ASSIGN44b#  SYS$ASSIGN4T4@X4 SYS$ASSIGN45G`5SYS$QIOW4 5b# SYS$QIOW4\5@`5SYS$QIOW45G5 SYS$DASSGN45b#  SYS$DASSGN45@5 SYS$DASSGN415G5[DECC$LOCALTIME425b# DECC$LOCALTIME415@5DECC$LOCALTIME435G5 DECC$TIME445b#  DECC$TIME435@5 DECC$TIME415G5DECC$LOCALTIME425b# DECC$LOCALTIME415@5DECC$LOCALTIME46G86 DECC$GSPRINTF46\b#  DECC$GSPRINTF446@86 DECC$GSPRINTF45<6GT6 SYS$BINTIM46@6b#  SYS$BINTIM45P6@T6 SYS$BINTIM46G7SYS$QIOW46b# SYS$QIOW47@7SYS$QIOW4@7GT7 SYS$DASSGN4H7b#  SYS$DASSGN]4P7@T7 SYS$DASSGN4`7Gt7 SYS$DASSGN4h7b#  SYS$DASSGN4p7@t7 SYS$DASSGN4/8G48LIB$SYS_GETMSG40,8b#LIB$SYS_GETMSG4/08@48LIB$SYS_GETMSG48G8 DECC$GSPRINTF48b# DECC$GSPRINTF48@8 DEC^C$GSPRINTF4#<9GX9 DECC$STRCMP4$@9b# DECC$STRCMP4#T9@X9 DECC$STRCMP4-X9Gp9 SYS$SEARCH4.`9b# SYS$SEARCH4-l9@p9 SYS$SEARCH49G9 DECC$STRCPY49b# DECC$STRCPY49@9 DECC$STRCPY4 9G_ : DECC$STRLEN4 9b# DECC$STRLEN4 :@ : DECC$STRLEN4:G: SYS$PARSE 4:b# SYS$PARSE4:@: SYS$PARSE4-:G: SYS$SEARCH4.:b# SYS$SEARCH4-:@: SYS$SEARCH4:G: DECC$STRCPY4`:b# DECC$STRCPY4:@: DECC$STRCPY4+;G; SYS$SETDFPROT4,;b#P SYS$SETDFPROT4+;@; SYS$SETDFPROT4)<G$< DECC$UMASK4*<b#P DECC$UMASK4) <@$< DECC$UMASK4)$<G<< DECC$UMASK4*(<b#P DECC$UMaASK4)8<@<< DECC$UMASK4'=G=MAKEWORD4(=b#PMAKEWORD4'=@=MAKEWORD4'=G=MAKEWORD4(=b#PMAKEWORD4'=@=MAKEWORD4'=G=MAKEWORD4(=b#PMAKEWORD4'=@=bMAKEWORD4d?G? DECC$STRCPY4h?b# DECC$STRCPY4?@? DECC$STRCPY4%?G @ DECC$STRRCHR4&?b# DECC$STRRCHR4%@@ @ DECC$STRRCHR4 CGC DECC$STRLEN4 Cb# DECC$STRLEN4 C@C DECC$STRLEN4CcGD DECC$GSPRINTF4Db# DECC$GSPRINTF4D@D DECC$GSPRINTF4XDGD DECC$GSPRINTF4\Db# DECC$GSPRINTF4D@D DECC$GSPRINTF4 EGE DECC$STRLEN4 Eb# DECC$STRLEN4 E@E DECC$STRLEN4FG$F SYS$FILESCANd4 Fb# SYS$FILESCAN4 F@$F SYS$FILESCAN4 error: cannot open zipfile [ %s ] (access denied?).  =0u;7DECC$GA___CTYPE= Jan 13 2001(G e5= %c%d.%d-%03d@= on P DECC$GSPRINTF=0` 0U;=0 7G;= V1.5 = OpenVMS=DEC C7 COMPILEDWITH=0 "R;=!~ ͭ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11iuv`4|  SYS$ASSIGN; SYS$DASSGNSYS$QIOW=0"T;= 0 d;=0" T;=0$ =00R; DECC$EXIT=0"`O;=, 7DECC$GA_RMS_XABDAT DECC$STRLEN DECC$STAT7DwECC$GA_RMS_FABSYS$OPEN= ?zG{@  SYS$NUMTIM SYS$CLOSE ZSTRNICMP SYS$PARSE SYS$FILESCAN= sys$disk:[] DECC$STRNCPY DECC$STRCPY=0" E;=00| @; DECC$MKDIR !CMA$TIS_ERRNO_GET_ADDR@;x# DECC$STRCMP7DECC$GA_RMS_NAM=0">;= L @% DECC$STRRCHR=0"P;;=p@ 'MAKEWORD) DECC$UMASK+ SYS$SETDFPROT=0"9;=@0| ;- SYS$SEARCH=08 7;=(PT %s[ %s ] y/LIB$SYS_GETMSG=0 "2;=`4 1DECC$LOCALTIME3 DECC$TIME5 SYS$BINTIM=0/;=> ף=0#P1;=@,< =0 @,;= ( =0";=00 7CRC32=0"P.;=0, 9z SYS$SYNCH=0";=0 ;SYS$QIO=0" ;=`8 8OTS$MOVE=0 0;=0$ ? DECC$FREE=0`",;= ASYS$WAIT7DECC$GA_RMS_XABPRO=0");=0  C SYS$WRITE=0"{p;=`0 =0"*;=08 ESYS$PUT= =0$;=0"0&;=0 =0"@";=< =0;=0" ;=P<| 0;;;;|`;;=0x";=8 7DECC$GA_STDERRG DECC$TOLOWERI SYS$CREATEK DECC$FFLUSHM DECC$FGETS=0 ;=0< 7DECC$GA_RMS_XABRDT=0";=P8 7DECC$GA_RMS_RABO SYS$EXTENDQ SYS$CONNECT=0"P;=P0 =0"} p;=P0 S MEMEXTRACTU DECC$MALLOC=VDATx=VKEY=VPRO=IM=VALL7DECC$GA_RMS_XABKEY=0";=P 7DECC$GA_RMS_XABALL7DECC$GA_RMS_XABFHC=VFAB=VRDT=VMSV~=VFHC=0";=  =0h"0;=( = ====`04=4=6=H@4444 4(40484@4H4P4X4=(  6=`4= 6=  4=<4= 4=( 4=H 4=P 4= 0 4=8 4=X 4=@ 46 ` `=4= `4 =(;Zx0Nm =(decompress_bitsuxtime2vmstime@= __iscntrlP= versiongetscreeninfoh=screenlinewrapx= screensize= return_VMS=(check_for_newercheckdir=@3mapnamemapattrdo_wild[]*.zipvms_msgstamp_file= mkgmtime= dos_to_unix_time=close_outfile(=flush0= _close_qio@= WriteQIOP= _flush_qio`= free_up_close_rmsx= WriteBuffer=_flush_blocks= WriteRecord= find_eol=_flush_stream=_flush_varlen=init_buf_ring= create_qio_output=0"replaceset_default_datetime_XABs(= create_rms_output@= create_default_outputX=extract_blockh=find_vms_attrsx= open_outfile= check_format< <=,$#VMSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0  = 04 4= check_format04= V P P P V V V W X X Z a a d d$$ $= \4: := 4=" UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11  = 44= open_outfile4=3+*     $ $= 4: := `4=  = 44= init_buf_ring4=TLK          : := 4= PX X= &44='set_default_datetime_XABs4=   ƕ,  ƕ, ƕ, ƕ, ƕ$       V         $ $= 84: := 44= ` = "P44=#create_default_outputP4=tl                ( ( ) . . 5 <i G G G M M O \ ^8$ $= 4: := 4=  = 44=create_rms_output4= e e e e i p i                            ͖ ϖ Ж0$ $= L4: :=  4=  =  44=create_qio_output 4=         ( ( *  2 * 6 6 > > > @ @ D C B F D C E G I O O O O O Q W X X ^ \ \ \ \ d d d d f f f  l b  l h n h h h h n h n s s    } ~($ $= h 4: := 4= { {= 484= replace4=                             8$ $= 4: := 4= 0 = 44=find_vms_attrs4= З З ӗ ٗ ܗr   q                            !  O J M M Q Q  i Y Y _ ^  _  \  _  e b  m o o p Y Y {   L n $ $= d4: := 4=   = 044= free_up04=OGF       H$ $= X4: := H4= @7 7= p404= extract_blockp4= ߘ        #  / (B  2 ( ( 8 (  ,$ $= 4" "= } }=v4= 4= 4= : := 4= P) )=%decompress_bits =  = 44= flush4=H@? H B B B H J L$ $= 4: := $4=  = p404= _flush_blocksp4= Q  Q  Y [ ] b a a d e k [ [ r r,$ $= 4: := t4= 0 = 404=WriteQIO4= z z            $ $= 4: :=  4= @ =  4`4= _flush_qio 4=               <$ $= (!4: := "4= ` = @"44= _flush_varlen@"4=+# C 3 3 3  ; D A E G N T T U e g h j e  e e    , g$ $= "4: := $4=  = $44=find_eol$4=UML        : := ,&4= @ = 0&44= _flush_stream0&4= ֚#W2 UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11  ߚ  ߚ  ߚ          $ & , , . : ? P W ] ? c e g t t u t8$ $= l&4: := )4=  = )44= WriteBuffer)4=nfe ~ ~ ~ ~     $ $= *4: := *4=  = *4P4= WriteRecord*4={sr          $ $=  +4: := `+4= ` = @,44= close_outfile@,4=NFE      › ě4$ $= l,4: := ,4=  = ,44= _close_rms,4= ʛ Л         $ $= ,4: := H.4= ( (= P.44= _close_qioP.4=               % #8 # # * *($ $= .4: := /4= p  = /4p4=mkgmtime/4= M R M< N Q U O U O P U U U Y Y Y Y V: := <14= B B= P144=dos_to_unix_timeP14= e e e n s s r r o w t  x   I       $ $= 14: := 24= `( (=$uxtime2vmstime =  = 24 4= stamp_file24= ߜ ( ( ( ߜ                                            d e           ! ! ! ! & & / 8$ $= 24B B= be4= ] ]=v54= H64= : := 74=   = 744= vms_msg74=tlk           $ $= (84: := 84= 0g g= 944= do_wild94=  *    ȝ   8     {            4$ $= 894: := ;4= PO O= P;4P4= mapattrP;4=                           ! " "  1 2 1 4 J K L S I I c d d` d d e d f d g  0$ $= ;4: := >4=  = >44= mapname>4=80    3 3 < @ @ H J I J9 P N/ V \ } V/    V3 V1 V1 V V V ^ ^ V  V V V o o p p V  v V+ V9            $  L$ $= @?4: := D4= 0 =  E44=checkdir E4=} ß  ß+ ß           '            * * 3 4 4 4 4 4 4 4 4 4 4 4 9 9 8 7 9 7 8 7  D I K K O N O N O R  Z ^ ^ ` b b l l l l n r x { { {                                  ̠ ̠h ̠ ̠ ̠ Π  ޠ     ,$ $= XE4: := 4O4=$ Ijz UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11Y @  = `O44=check_for_newer`O4=?7                ' 6 6 6 6 ? 7 6 7 8  B 9  : ;3  ?$ $= O4: := R4=  = 0R4h4= return_VMS0R4=c[Z ա ϡ Ρ Ρ Ρ ͡ ͡ ԡ ӡ ԡ ӡ = ` = R44= getscreeninfoR4= & & & &       *($ $= R4: := S4=  =  T4H4= screensize T4=80/ - - 3 3 3$ $= HT4: := T4=  = T4 4=screenlinewrapT4=4,+ 8 8 6 6 : $ $= T4N N= U4$U4= p = 0U4`4= version0U4=xpo T E T E E E T T& T T T, T,$ $= lU4: := V4=  e44O54 =  +ww1InaV1.0CCZIPINFOV1.013-JAN-2001 19:04Compaq C V6.2-003  $ABS$iL$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$H $READONLY$ DECC$FREE DECC$MALLOC DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCPY DECC$STRNCPY DECC$STRRCHR DECC$STRNCMP DECC$STRLEN DECC$ISATTYCENTRAL_HDR_SIGEND_CENTRAL_SIGGUSAGE PROCESS_CDIR_FILE_HDR(J0ZI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GSPRINTF4<@@ DECC$GSPRINTF4`G DECC$GSPRINTF4pb#H DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#H DECC$GSPRINTF4@ DECC$GSPRINTF4G@ DECC$GSPRINTF4 b#H DECC$GSPRINTF4<@@ DECC$GSPRINTF4dG DECC$GSPRINTF4hb#H DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#H DECC$GSPRINTF4@ DECC$GSPRINTF4G DO_STRING4b#H DO_STRING4 @ DO_STRING4 G0 DECC$GSPRINTF4 b#H DECC$GSPRINTF4, @0 DECC$GSPRINTF4P Gt DECC$GSPRINTF4X b#H DECC$GSPRINTF4p @t DECC$GSPRINTF4 G DO_STRING4 b#H DO_STRING4 @ DO_STRING4 G DECC$GSPRINTF4 b#H DECC$GSPRINTF4 @ DECC$GSPRINTF4! G DECC$MALLOC4" b# DECC$MALLOC4! @ DECC$MALLOC4!4 GP DECC$MALLOC4"8 b# DECC$MALLOC4!L @P DECC$MALLOC, G READBUF, b#READBUF, @ READBUF4  G, DECC$STRNCMP4  b# DECC$STRNCMP4 ( @, DECC$STRNCMP<#, G@ PROCESS_CDIR_FILE_HDR<$4 b#PROCESS_CDIR_FILE_HDR<#< @@ PROCESS_CDIR_FILE_HDR4@ Gd DO_STRING4H b# DO_STRING4` @d DO_STRING, G MATCH,  b#MATCH, @ MATCH, G( MATCH,  b#MATCH,$ @( MATCH4p G DECC$GSPRINTF4x b# DECC$GSPRINTF4 @ DECC$GSPRINTF,GFNPRINT, b#FNPRINT,@FNPRINT4 G@ DO_STRING4$b# DO_STRING4<@@ DO_STRING4TG| DO_STRING4Xb# DO_STRING 4x@| DO_STRING4G DO_STRING4b# DO_STRING4@ DO_STRING4G DO_STRING4b# DO_STRING4@ DO_STRING48G` DO_STRING4Db# DO_STRING4\@` DO_STRING4tG DO_STRING4xb# DO_STRING4@ DO_STRING,GREADBUF,b#READBUF,@READBUF4 G` DECC$GSPRINTF4$b# DECC$GSPRINTF4\@` DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF,GRATIO,b#RATIO,@RATIO4Gl DECC$GSPRINTF4 b# DECC$GSPRINTF4h@l DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G$ DECC$FREE4b# DECC$FREE4 @$ DECC$FREE4HGt DECC$GSPRINTF4Lb# DECC$GSPRINTF4p@t DECC$GSPRINTF4G DECC$FREE4b# DECC$FREE4@ DECC$FREE4 G DECC$STRNCMP4 b# DECC$STRNCMP4 @ DECC$STRNCMP4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4GP DECC$GSPRINTF4<b# DECC$GSPRINTF4L@P DECC$GSPRINTF4tG DO_STRING4)}^ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11Qb# DO_STRING4@ DO_STRING4G DECC$FREE4b# DECC$FREE4@ DECC$FREE,XGhFNPRINT,\b#FNPRINT,d@hFNPRINT4hG DECC$GSPRINTF4lb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G, DECC$GSPRINTF4b# DECC$GSPRINTF4(@, DECC$GSPRINTF4PG DECC$GSPRINTF4Tb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4<Gx DECC$GSPRINTF4@b# DECC$GSPRINTF4t@x DECC$GSPRINTF 4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4(G` DECC$GSPRINTF4,b# DECC$GSPRINTF4\@` DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G@ DECC$GSPRINTF4b# DECC$GSPRINTF4<@@ DECC$GSPRINTF4hG DECC$GSPRINTF4pb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G8 DECC$GSPRINTF4b# DECC$GSPRINTF44@8 DECC$GSPRINTF4\G DECC$GSPRINTF4db# DECC$GSPRINTF4|@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4 @ DECC$GSPRINTF48GX DECC$GSPRINTF4@b# DECC$GSPRINTF4T@X DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4GH DECC$GSPRINTF4b# DECC$GSPRINTF4D@H DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4, G\ DECC$GSPRINTF4D b# DECC$GSPRINTF4X @\ DECC$GSPRINTF4 ףJLEE=VFAB=%02x=VMSV=XABKEYVDAT=VPRO=VALL=XABALLVFHC=not =no=yes= may beis=ebcdiclab =arc  =text(=hid 0= version@ DO_STRING DECC$STRLEN DECC$STRCPY MAKEWORDd;=0";=P  DECC$STRNCMP= MAKELONG;=ZPIT=un=rdo =.=sys =lnk =dir  FNPRINT= @ DECC$FREE= binary `=exeh= XABFHCFABx=XABRDTVRDT=XABDATVKEY DECC$STRNCPY8OTS$MOVE=dZip= XABPRO%s %s %8lu = %8lu=com=%03u=cmd=%d.%d=0@"9;=4 0 ZSTRNICMP=%cH=btmP DECC$STRRCHR=%3d%%h= %s %s x=batRATIO7 REPORTMSG7 ENDSIGMSG7 CENTSIGMSGREADBUFMATCH 7CENTRAL_HDR_SIG=0 "P ;=P 7FILENAMENOTMATCHED7 EXCLFILENAMENOTMATCHED! DECC$MALLOC #PROCESS_CDIR_FILE_HDR7END_CENTRAL_SIG=-@=H=0";=(`0 entriesx=entry=are=0"0 ;=` % DECC$ISATTY'USAGE 4 4 4 4` 4p 4 4 444h4p4x444`44(4@4 X4p44444h444 4(444440484@4444H4P44X4 ,* UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11  ==s=Amiga=VMS =Unix(=VM/CMS0=CP/M8= TOPS-20NTFSH=MVSP=BeOSX=Theos`=shrunkh=normalp= maximum fast=OS/2=VM/CMS=MVS=BeOS=AOS/VS=Theos=unknownstored=access=Edit=Object=: = %02x=%03d=0&Archive: %s %ld bytes %u file%s =(Archive: %s %ld %u 8=0# End-of-central-directory record: `=0"------------------------------- =8. beginning of the zipfile is %lu (%.8lXh). =PF There is no zipfile comment. The zipfile comment is truncated. =0& caution: zipfile comment truncated (=H= Central directory entry #%lu: --------------------------- h= MS-DOS, OS/2 or NT FAT= Atari ST=(OS/2 or NT HPFSMacintosh HFS= Z-System= SMS/QDOS=Acorn RISC OS= Win32 VFAT= Tandem NSK=none (stored)= reduced (factor 1)(= reduced (factor 2)@= reduced (factor 3)X= reduced (factor 4)p= imploded= tokenized= deflated=8*deflated (enhanced-64k)imploded (PK DCL)= superfast=@6 There are an extra %ld bytes preceding this file. = unknown (%d)(=s file system or operating system of origin: %s version of encoding software: %d.%d =s minimum file system compatibility required: %s minimum software version required to extract: %d.%d =q compression method: %s size of sliding dictionary (implosion): %cK =( number of Shannon-Fano trees (implosion): %c compression sub-type (deflation): %s extended local header: %s file last modified on (DOS date/time): %s 32-bit CRC value (hex): %.8lx =H? compressed size: %lu bytes =H? uncompressed size: %lu bytes 0=H> length of extra field: %u bytes p=H= disk number on which file begins: disk %u =xn apparent file type: %s VMS file attributes (%06o octal): %s  =@6 Amiga file attributes (%06o octal): %s X=>6 Unix file attributes (%06o octal): %s  =H? non-MSDOS external file attributes: %06lX hex =H< MS-DOS file attributes (%02X hex): none  =PE Theos file attributes (%04X hex): %s Library X = Directory h = Sequential x = Direct  = Keyed  = Indexed  = 86 program  = 286 program  = 386 program  = ???  =8/ The central-directory extra field contains: =@6 - A subfield with ID 0x%04x (%s) and %u data bytesP = PKWARE AV` = PKWARE VMSp = PKWARE Win32 = PKWARE Unix = Info-ZIP VMS =(old Info-ZIP Unix/OS2/NT = Unix UID/GID =universal time = old Info-ZIP Macintosh = new Info-ZIP Macintosh =0#ZipIt MacintoshSmartZip Macintosh8 =0!ZipIt Macintosh (short)OS/2 ACL` = Security Descriptorx = SMS/QDOS =Acorn SparkFS =(Fred Kantor MD5ASi Unix = Tandem NSK = run-length encoded = deflated =compressed(?) =@2. The local extra field has UTC/GMT %s time%s8 = modificationH = creationX =0".  The Mac long filename is %s =(. File is marked as %s =Resource-fork = Data-fork =@5. File is marked as %s, File Dates are in %d Bit =@1. The QDOS extra field subtype is `%c%c%c%c'0 =8/. The AOS/VS extra field revision is %d.%d` = Unstructuredp = Relative =(Entry SequencedKey Sequenced =0&. The 128-bit MD5 signature is %s =(. The first 20 are:  =8/GMT modification/access times and Unix UID/GID=0#GMT modification/access times only@=( There is no file comment. `= %2u-%s-%02u %02u:%02ux=@2%u %s %u %02u:%02u:%02u%04u%02u%02u.%02u%02u%02u= Actual offset of end-of-central-dir record: %9ld (%.8lXh) Expected offset of end-of-central-dir record: %9ld (%.8lXh) (based on the length of the central directory and its expected offset) x= This zipfile constitutes the sole disk of a single-part archive; its central directory contains %u %s. The central directory is %lu (%.8lXh) bytes long, and its (expected) offset in bytes from the -h UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11#H= This zipfile constitutes disk %u of a multi-part archive. The central directory starts on disk %u; %u of its entries %s contained within = this zipfile, out of a total of %u %s. The entire central directory is %lu (%.8lXh) bytes long, and its offset in bytes from `=PE the beginning of the zipfile in which it begins is %lu (%.8lXh).  =XJ The zipfile comment is %u bytes long and contains the following text: =XL======================== zipfile comment begins ========================== H=XL========================= zipfile comment ends =========================== =PF%lu file%s, %lu bytes uncompressed, %lu bytes compressed: %s%d.%d%% =XI offset of local header from start of archive: %lu (%.8lXh) bytes 0=PA file security status: %sencrypted x=PC length of filename: %u characters =PC length of file comment: %u characters =PA MS-DOS file attributes (%02X hex): read-only P= MS-DOS file attributes (%02X hex): %s%s%s%s%s%s%s%s error: EF data block (type 0x%04x) size %u exceeds remaining extra field space %u; block length has been truncated.  =. The local extra field has %lu bytes of OS/2 extended attributes. (May not match OS/2 "dir" amount due to storage method)=PG. The extra field is %s and has %lu bytes of VMS %s information%s=XM. The local extra field has %lu bytes of access control list information@=XI. The local extra field has %lu bytes of NT security descriptor data=hZ. The local extra field has %lu bytes of %scompressed Macintosh finder attributes=XO. The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'@=XI. The associated file has type code `0x%lx' and creator code `0x%lx'=XO. The local extra field has %lu bytes of %scompressed BeOS file attributes =PB. The file was originally a Tandem %s file, with file code %u(=XO There %s a local extra field with ID 0x%04x (%s) and %u data bytes (%s). x=XM ------------------------- file comment begins ---------------------------- =XL-------------------------- file comment ends ----------------------------- = __iscntrl(= zi_showMac!TypeCreator@=|JanFebMarAprMayJunJulAugSepOctNovDeczi_timezi_longstorshrkre:1re:2re:3re:4i#:#tokndef#d64#dcliu###=`Ufatamivmsunxcmsatrhpfmaczzzcpmt20ntfqdsacovftmvsbe nskths???NXFS= zi_short(= zipinfozi_end_central@=zi_opts@ @=0('ZIPINFOCompaq C V6.2-003~ ~= "44= __iscntrl4=  N N= 4,4= 0 = 044= zi_opts04=LD > >c >: ># >a > > > > >E > > > ># > >` ? ?? %? %? %? /?T$ $= 4: := <4= `T T= 4H4=zi_end_central4= >?  >? I? I? Q? Y? Y? Y?  x? x? x? {?a }? ? ? ? ?$ ? ? ? ? ?$ $= 4: := < 4= : := P 44= zipinfoP 4= ? ?  ?  ? ?  ?  ? ? ? ? ? ? ? ? ? ? ?V ? ? ? ? ? ? @ ? ?" ? ?% ? ? ? ? ?( ? ? ?  @ @ @ @ @ @ )@ )@ ,@< ? ?L ? ? ? ? ? ?p J@ K@ O@  \@ ]@ ^@4 ]@ c@ e@4 d@ o@ o@A p@ s@ s@ t@ ?$$ $=  4:& := 4= P = 44= zi_long4=g _ @% @ @ @ @ @ @ @ @ @  @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @' @ @ @ @ @ A  A  A A *A +A -A /A 1A 3AЁ 5A 7A ?A AA DA DA4 DA FA HA IA JA LA NA PA QA RA TA VA XA YA _A _A aA aA dAh `A jA iA iA jA jA jA oA( nA nA oA oA qA tA tA yA tA vA tA vA vA vA vA {A |A |A |A |A  A  A A A A A A A A A A A  A A A A A A A A A A A A A A A A A!܀ A A  A A )A A A A A A A A A A A A A A A A A A A  A A A A A A A A A A A A A A B B B B B B B B B B B5  B5 MB B ' BA B 6 AB.@ UNZIP.BCK( O&[UNZIP542.VMS-BINARIES]UNZIP.AXP_OLB;11)* GB DB BS BS B8 B8 5B 4B  +B "B; B; B; :B 9B& B> tB ^C ^C ^C `C `C4 B B FC IC LC LC LC PC NC OC OC, B B B B B B B B B B B B B B B B +B B B B B B C C CL B }B {B }B xB* iC iC( rC rC rC rC +C *C +C -C -C +C 2C B B B B B B B B B B B B Bq @CX C C C C C C C C B B B, B B B B B B B B B B B B B Bʈ xC xC Bn C C C C C C C* C CؼL$ $= 4 : := 84= `%X X= 944=zi_short-94= C% C C C C C C C C C C C C C C C4 C C C8 C C C C C C C, C C C C C C C C C C C C C C D D D D D D D D D D D .D D D D D D D D D D D D D D D D D D D D D D D D D D  D  D  D  D  D  'D &D %D $D #D D D   ,D ,D -D ,D ,D .D .D .D 0D /D 0D /D /D 2D 2D 2D .D 2D .D/ 2D( \D ]D \D [D [D ZD cD dD cD eD eD cD eD iD fD fD iD gD fD fD kD nD oD pD pD pD pD pD  {D {D ~D }D |D   D D D  D D D D D D D D D  D D D D D D D D D 0 D D D D D D D D  D  D D D D D D D D D D D DF D D D D4$ $= 894: := G4=  0 0= " H44=#zi_showMacTypeCreator H4= 1E D D D D E E E E E E E E E E E2 E E E  E  $ $= TH4 =  = J4h4= zi_timeJ4=~} E3 E4 PE TE RE PE TE PE _E _E bE$ iE$ $= K4: := xL4=  =  pfilww"*[UNZIP542.VMS-BINARIES]UNZIP.HLP;1+,./ 4Ph- O0123KPWO56@Ga7a89GHJ  1 UNZIP J UnZip is used to extract files compressed and packaged by Zip (see ' HELP ZIP for information on ZIP).  J For a brief help on Zip and Unzip, run each without specifying any J parameters on the command line, or specify the -h flag (but not in  UnZip's Zipinfo mode).  J UNZIP will list, test, or extract from a ZIP archive. ZIP archives J are commonly found on MS-DOS systems; a VMS version of ZIP can also  be found here.  J Archive member extraction is implied by the absence of the -c, -p, J -t, -l, -v or -z options. All archive members are processed unless J a filespec is provided to specify a subset of the archive members. Format:  P UNZIP [-cfhlptuvxz[ajnoqCLMVX]] file[.zip] [list] [-x xlist] [-d out_dir] 2 Parameters  file[.zip]  J File specification for the ZIP archive(s) with optional wildcards. J UnZip will perform actions specified for every zipfile matching the J specification. Default file specification is SYS$DISK:[].ZIP. Note J that self-extracting ZIP files are supported; just specify the .EXE  suffix yourself.  [list]  J An optional list of archive members to be processed; if no list is J given, all archive members are processed. Expressions may be used J to match multiple members. Expressions should be enclosed in J double-quotes to prevent interpretation by DCL. Multiple filenames J should be separated by blanks. Each file specification is similar 1 to a Unix egrep expression and may contain:  = * matches a sequence of 0 or more characters . ? matches exactly 1 character J [...] matches any single character found inside the brackets; A ranges are specified by a beginning character, F a hyphen, and an ending character. If a '!' or '^' K immediately follows the left bracket, then any character 5 not in the given range is matched.   [-x xlist]  J An optional list of archive members to be excluded from processing. @ The xlist overrides any files included in the normal list.  [-d out_dir]  J Optional directory specification to be used as target root directory J for files to be extracted. Directory should be specified in = "[.foo]" format rather than "foo.dir" or "foo/" format. 2 Options J The default action of / # UNZIP.BCK O"[UNZIP542.VMS-BINARIES]UNZIP.HLP;1P~UnZip is to extract all zipfile entries. The 6 following options and modifiers can be provided:   -Z ZipInfo mode 4 -c extract files to SYS$OUTPUT (terminal) D -f freshen existing files (replace if newer); create none 5 -h show brief help screen and exit quietly / -l list archive files (short format) D -p extract files to SYS$OUTPUT; no informational messages -t test archive files > -u update existing files; create new ones if needed 1 -v list archive files (verbose format) . -z display only the archive comment   MODIFIERS A -a extract text files in standard VMS text file format ' -aa extract all files as text P -b auto-extract only binary files in VMS fixed 512-byte record format M -bb extract all files as binary in VMS fixed 512-byte record format G -j junk paths (don't recreate archive's directory structure) : -n never overwrite existing files; don't prompt 5 -o OK to overwrite files without prompting > -q perform operations quietly (-qq => even quieter) 0 -C match filenames case-insensitively L -L convert filenames to lowercase if created under DOS, VMS, etc. > -M feed screen output through built-in "more" pager P -P supply decryption password on the command line (insecure!) / -V retain (VMS) file version numbers D -X restore owner/protection info (may require privileges)  J Note that uppercase options (-C, -L, -M, -P, -V and -X) must be ( specified in quotes. For example:  unzip "-VX" -a zipfile  J The output conversion options -b and -a may be combined to perform J binary conversions on binary files and text conversion on text J files. But note: For compatibility with implementation on other J systems, -b cancels any -a option; to get the intended result, -a J must be specified AFTER -b. And, in combination, "text" recognition J takes precedence; this means that -bb has the same effect as -b, and 4 -aa overrides binary conversion for ALL files.  J Please note that using the "-P" option is higly insecure, J the plaintext password may be seen by others. For this reason (and J because of lack of space), the "-P" option is not / advertised on UnZip's online help screen. 2 Exit_Codes J On VMS, UnZip's UNIX style exit values are mapped into proper VMS  status codes:  @ 1 (success) normal exit, 5 (0x7fff0000 + 16*UnZip_errnum) -W- warnings : (0x7fff0002 + 16*UnZip_errnum) -E- normal errors 9 (0x7fff0004 + 16*UnZip_errnum) -F- fatal errors  J The UnZip error level (or exit code) approximates the exit codes : defined by PKWARE and takes on the following values:  ( VMS UnZip Type of error  severity errcode B - 0 normal; no errors or warnings detected.  G W 1 one or more warning errors were encountered, G but processing completed successfully any- G way. This includes zipfiles where one or G more files was skipped due to unsupported G compression method or encryption with an , unknown password.  G E 2 a generic error in the zipfile format was G detected. Processing may have completed G successfully anyway; some broken zipfiles G created by other archivers have simple work- # arounds.  G F 3 a severe error in the zipfile format was G detected. Processing probably failed imme- # diately.  G F 4 unzip was unable to allocate memory for one G or more buffers during program initializa- tion.  G F 5 unzip was unable to allocate memory or G unable to obtain a tty to read the decryp- , tion password(s).  G F 6 unzip was unable to allocate memory during 1 decompression to disk.  G F 7 unzip was unable to allocate memory during 3 in-memory decompression.  / F 8 [currently not used]  A E 9 the specified zipfiles were not found.  G E 10 invalid options were specified on the com- % mand line.  8 E 11 no matching files were found.  G F 50 the disk is (or was) full during extraction.  G F 51 the end of the ZIP archive was encountered ' prematurely.  G E 80 the user aborted unzip prematurely with con- . trol-C (or similar)  G E 81 no files were found due to unsupported com- G pression methods or unsupported decryption. G (If even one additional file is successfully E processed, however, the exit status is 1.)  G E 82 no files were found due to bad decryption oG password(s). This is also the exit status G if no files were found due to a combination G of unsupported compression and bad pass- mG words. As in the previous case, however, a mG single successful file will result in an 5 exit status of 1 instead.)  J In addition, there is a compilation option to expand upon this J behavior: An executable compiled with the option RETURN_CODES J defined displays a human-readable explanation of what the error  status means. _2 Logical_Names sJ UnZip allows to modify its default behaviour by specifying option J defaults via the UNZIP_OPTS logical name. For example, the J following will cause UnZip to restore owner/protection information = and perform all operations at quiet-level 1 by default: r ! define UNZIP_OPTS "-qX"  J Note that the quotation marks here are required to preserve J lowercase options (opposite of the command-line behavior). To J negate a default option on the command line, add one or more minus J signs before the option letter, in addition to the leading switch  character `-':   unzip --ql zipfile  or  unzip -l-q zipfile  J At present it is not possible to decrement an option below < zero--that is, more than a few minuses have no effect.  J UNZIP_OPTS may be defined as a symbol rather than a logical name, A but if both are defined, the logical name takes precedence. p 2 Authors bJ Info-ZIP; currently maintained by Greg Roelofs. VMS support J maintained by Christian Spieler and Hunter Goatley. Originally - based on0DK UNZIP.BCK O"[UNZIP542.VMS-BINARIES]UNZIP.HLP;1P] a program by Samuel H. Smith. h ? VMS on-line help ported from UNZIP.TXT by Hunter Goatley. a"*[UNZIP542.VMS-BINARIES]UNZIP.OPT;1+,=./ 4- O0123KPWO56@Ca7Ka89GHJIdent = "UnZip 5.42" +*[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1+,/.;/ 4;<- O0123KPWO<56`a7` a89GHJ% Librarian A09-22u%au%a!;< n    CRC32 JCRCTABlCRYPTENVARGSEXPLODE+EXTRACT[RFILEIOnGLOBALSpRINFLATEdLISTVMATCH&PROCESSTTYIOUNREDUCERUNSHRINKUNZIPVMSRZIPINFOnCENTRAL_HDR_SIG CENTSIGMSGCHECKDIR CHECK_FORMATCHECK_FOR_NEWER CLOSE_OUTFILE COMPILEDWITH CRC32lDECRYPTl DECRYPT_BYTE[RDEFER_LEFTOVER_INPUTDOS_TO_UNIX_TIME[R DO_STRINGDO_WILDECHO ENDSIGMSGnEND_CENTRAL_SIGENVARGSEXCLFILENAMENOTMATCHEDEXPLODE+EXTRACT_OR_TEST_FILESFILENAMENOTMATCHEDFIND_VMS_ATTRSFLUSHnFNAMESCRC_TABLEdGET_TIME_STAMPDBUF[RREADBYTE REPORTMSG RETURN_VMSSCREENLINEWRAP SCREENSIZESEEKMSG STAMP_FILE[RSTR2OEM+TRUNCEAS+ TRUNCNTSDTT_GETCH[R UNDEFER_INPUTUNZIPUNZIPUSAGELINE1l UPDATE_KEYSUSAGE[RUZPINPUT[RUZPMESSAGEPRNT[R UZPMOREPAUSE[R UZPPASSWORD&UZ_END_CENTRALUZ_OPTSVERSION VERSIONDATERZIPINFOZIPNFORZI_END_CENTRALRZI_OPTS[R ZSTRNICMP__MAINMFNAMESGET_TIME_STAMP INIT_KEYSREADBUF__MAINb[RISO2OEMVISWILDd LIST_FILESn LOCAL_HDR_SIGMAIN[RMAKELONG[RMAKEWORDMAPATTRMAPNAME MASK_BITSVMATCH+ MEMEXTRACT+MEMFLUSH[ROEM2ISO[ROPEN_INPUT_FILE OPEN_OUTFILE&PROCESS_CDIR_FILE_HDR&PROCESS_LOCAL_FILE_HDR&PROCESS_ZIPFILESdRATIO[RREADBUFn GLOBALSCTOR[RHANDLERpR HUFT_BUILDpR HUFT_FREE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C  6P5     b78  DEFER_LEFTOVER_INP[UT UNDEFER_INPUT OPEN_OUTFILEPROCESS_LOCAL_FILE_HDRPROCESS_CDIR_FILE_HDR DECC$READ DECC$LSEEK DECC$STRLEN DECC$STRNCMP DECC$STRCHR DECC$MEMCPY DECC$FGETS DECC$DSPRINTF DECC$MALLOC DECC$FREE EXTRACT_OR_TEST_FILES ,6 MEMEXTRACT 8 MEMFLUSH l8 FNFILTER8$CODE/$DATA $ADDRESS_DATA)TRUNCEAS5 TRUNCNTSDcЬPe1P_#PJJJJJ&JP$\PwXww1P"aV1.03FILEIOV1.013-JAN-2001 19:48DEC C V6.2-0030P[ %s ] Psegmentation violation Pbus errorP Pctx=stmPpassword incorrect--reenter: PEnter password: P[%s] %s password: HP P--- Press `Q' to quit, or any other key to continue ---P--More--(%lu)]Perror: zipfile probably corrupt (%s) P%s: write error (disk full?). Continue? (y/n/^C) jPwarning: extra field too long (%d). Ignoring... @Pwarning: filename too long--truncating.  OEM2ISO ISO2OEM REPORTMSGSEEKMSGGDECC$GA___CTYPEDECC$GA_STDOUTDECC$GA_STDERRGETPTT_GETCHECHO UPDATE_KEYS DECRYPT_BYTESCREENLINEWRAP SCREENSIZE RETURN_VMSFNFILTERREADBUF DECC$WRITE DECC$READ DECC$^OPEN DECC$LSEEK DECC$ISATTY DECC$STRLEN DECC$MEMCPY DECC$TOLOWER DECC$FILENO DECC$PUTC DECC$DSPRINTF DECC$DFPRINTF DECC$FFLUSH$Perror: zipfile read error Perror: cannot open zipfile [ %s ] P׃Ѫ++++--+-+++---+i++_̯յݯ=P??'".^%So??YϾ󨷵ǎԐѥ噞ᅠƄФ_PլRDECC$GA___CTYPEQˏP@aPˏPRRP^|~G3 DECC$OPENPG"3G"3:G3G3 DECC$DSPRINTF<~PG3GG03P`\\\PPG3G3G3G3GD3*GD3G3G3G3GH3G3GD3PG3G3G3G3=G3G3G3G3GH3G`3G3GD3G3G3PGD3G3G3P<^ЬUլ1PG3z< ~G3G"3 DECC$READPG3G3 ìUT1G3,Ϭ DECC$STRLEN<~PϚGG03P`TgP G*3G3G3ЬSSG3SRG3RRG3ݬ DECC$MEMCPYRG3RG3RG3RS12UTTPP^G3T1rG3G3Ga3T1WPG31< ~G3G"3 DECC$READPG3G3G3T1PG38Ϝ DECC$STRLEN<~PϊGG03P`ECHO RETURN_VMS G*3G3G3G3G3=G3G3G3G3GH3G3G3GD3G3G3PGD3G3G3G3\R=G3SG3RS\S\& DECRYPT_bBYTEb\P\\b\~ UPDATE_KEYSRS\S\G3G3RRG3˚bTTPP^ЬRRYR ZRUVˏRЬRբ<DECC$GA_STDERRRbX PDECC$GA_STDOUTRbXˏR%լ  ЬRլ RR  ֬ ЬSd\ SCREENSIZE\ˏR11X  DECC$PUTCX DECC$FFLUSHգX%ԣh֣`ѣ`\ϒS8P`ˏREЬRբ<< DECC$ISATTYP/ DECC$ISATTYP"DECC$GA_STDERRRb  DECC$PUTCDECC$GA_STDERRRb DcECC$FFLUSHЬRЬRբX1UZ1PePP V0PSCREENLINEWRAPP"ePP  ЬPԠhЬP֠hѠhdVVqVЬRԢh֢`Ѣ`\XX DECC$FILENOYUSSSYP DECC$WRITEQPSQQTTW1PX DECC$FFLUSHUYnR8P`UUZ1DYU Ь T1X DECC$FILENOTYP DECC$WRITERPTRRSSW1X DECC$FFLUSHˏRdЬRբ<[ DECC$ISATTYPN DECC$ISATTYPADECC$GA_STDERRRb DECC$FILENOTYP DECC$WRITERPTdRRSSW+DECC$GA_STDERRRb DECC$FFLUSHЬTRSR SSWWPPԼ QQP^RЬPDECC$GA_STDERRP` DECC$DFPRINTFЬPݬDECC$GA_STDERRP` DECC$DFPRINTFDECC$GA_STDERRP` DECC$FFLUSHˏ P1TT_GETCHPSSPP (P #P PqPQ TT_GETCHPS&DECC$GA_STDERRP` DECC$DFPRINTFDECC$GA_STDERRP` DECC$FFLUSHDECC$GA___CTYPEQSTˏTP@aPʏPT DECC$TOLOWERPQTQeQPPq  RETURN_VMSЬQˏ P SPP ԡ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$WW PЮ(RPвPW[VxVSS1RRSUx[TUTVVPxSSTSd dSVVPVWRR WWVxV Ю0RVB$ RR~PX)ծ0ЭSPSУRS DECC$FREERS1XԼXЮ0RXBRSYBlЮ$SBgVRRfXhЮ0RBWSS TxWRRRRRYRSTRVVRЮ0SCS(fBcЮ0RB$WR[R1W[RRg8SxRRSZS cfJPjSЬ USU STPTTfhUS޼R3CbfUR޼SBchW[RxR,W RWRYVV VR(fBh,VV [SxSRYSSRSPRYRRYSSRSRYxWSSSSSYSЮ0TSDl(P׮0Ю0RB$WxWRRRRRYR0SRClRINFLATEH __iscntrl,t inflate_codes inflate_stored inflate_fixedVh inflate_dynamic\ inflate_block|inflatep inflate_free_L huft_build< huft_free$ Hk&   1>X 32%   `2, b2H d2d f2 q2 x2- 9 2R  2i  2 # 2  2  2Z 2e+ 3| 3!"k "3i $3` -3-_ .3U] 3 39( 3 3 3  4b7 *4gQ <4 4< 1 b4 f4l k48 4QQ 4a"X 4M MASK_BITSGDECC$GA___CTYPE INFLATE_CODES HUFT_BUILDMEMFLUSHFLUSHREADBYTE DECC$MEMSET DECC$MEMCPY DECC$MALLOC DECC$FREE t INFLATE_CODES |INFLATE  INFLATE_FREE L HUFT_BUILD  HUFT_FREE$CODE,$DATA $ADDRESS_DATAdR׮R1[[ 1vо$SծѮ SSЮP ^ЬSSУRS DECC$FREERSPHww1{"aV1.01LISTV1.013-JAN-2001 19:49DEC C V6.2-003$P "PsPsP%03uP%s %s PStoredShrunkReduce1Reduce2Reduce3Reduce4ImplodeTokenDefl:#Def64#ImplDCLUnk:###PNXFSP -------- ------- %9lu %lu file%s P%9lu %02u-%02u-%02u %02u:%02u %c(P--------  ------- --- ------- %8lu %8lu %4s %lu file%s P%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %cP%s ("^" ==> case %s conversion) P/PP-------- ------ ------- ----- ---- ---- ------ ----PP Length Method Size Ratio Date Time CRC-32 Name/P -------- ---- ---- ----P Length Date Time NameP100%%P%c%d%%xPլRDECC$GA___CTYPE:/ UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;FQˏP@aPˏPRRP^ZUԮRGH3RRԮ nԮG3ԮG831G,3BЮR~BRbЮR~BjRbG3 DECC$DSPRINTFPG3GG03P`?ЮR~BRbЮR~BjRbG3 DECC$DSPRINTFPG3GG03P`G3READBUFP 31"PCENTRAL_HDR_SIGG3 DECC$STRNCMPP1\ʏ\<G3R\R1ݮ CENTSIGMSGG3 DECC$DSPRINTF<~PG3GG03P` REPORTMSGG3 DECC$DSPRINTF<~PG3GG03P`1PPROCESS_CDIR_FILE_HDRPRR1i<Gl3~ DO_STRINGPRRR R1CPG23G23 DECC$FREEG23<Gn3~ DO_STRINGPRRRR1Gx31URGp34G3G3\BlG3MATCHPU PRRGp3U@RGt36PG3G3\BlG3MATCHPUPRRGt3Gx3U1G\3\\RʏRPRQRPЏdRRRPRQPQ{RPPQQY \RˏRW\RˏRV \RˏR \RˏR[ѮѮWRYWVYRV WRVWRVGd3X<GX3RʏR XXGh3RATIOPS-TSRR RS P TS S<GZ3RR R\P \L DECC$STRCPY\\ <GX3RxRRʏRBϕ\ <GZ3~ DECC$DSPRINTFSdb DECC$DSPRINTFPST~C DECC$DSPRINTFծlG3\R ^RP RRG`3[ݮ,YVWXGh3G3 DECC$DSPRINTFPG3GG03P`\PG3\R ^RP RR[ݮ(YVWGh3=G3 DECC$DSPRINTFPG3GG03P`G3G3FNFILTERPRR DECC$STRLENPRGG03P`$GG03P`G83\P\\<Gp3~ DO_STRINGPRRRR1Gh3Xn֮ ,<Gp3R#R DO_STRINGPRRR R1cP֮1PG831nݮRATIOPS-TSRR RS TS SSdn DECC$DSPRINTFPST~O DECC$DSPRINTFծLѮ SSSݮݮ ݮFG3 DECC$DSPRINTFPG3GG03P`DѮ  S"SSݮݮ ϢG3 DECC$DSPRINTFPG3GG03P`END_CENTRAL_SIGG3 DECC$STRNCMPP4 ENDSIGMSGG3 DECC$DSPRINTF<~PG3GG03P`ծ  Ѯ ЮP$^UXԼԼG32WG3READBUFP 3V1PCENTRAL_HDR_SIGG3 DECC$STRNCMPP1WSʏS<G3RSR1&W CENTSIGMSGG3 DECC$DSPRINTF<~PG3GG03P` REPORTMSGG3 DECC$DSPRINTF<~PG3GG03P`V1PPROCESS_CDIR_FILE_HDRPRRV1P<Gl3~ DO_STRINGPRRXRRV1G23G23 DECC$FREEG23<Gn3~ DO_STRINGPRRXRRV1PGx31USGp34G3G3RCbG3MATCHPU PSSGp3U@SGt36PG3G3RCbG3MATCHPUPSSGt3Gx3UxG3 DECC$STRLENPQTQ<QSCG3RRSS/*G3Pՠ/G3 DECC$STRCHRP S\TTG\3DOS_TO_UNIX_TIMEPSЬRbSSbּ<Gp3R R DO_STRINGPRRXRRVgPW1PEND_CENTRAL_SIGG3 DECC$STRNCMPP3 ENDSIGMSGG3 DECC$DSPRINTF<~PG3R LISTx __iscntrl, list_files get_time_stamp  ratio  fnprintY xa$,  / /6]46 y0   B1J  H1 a 0 Fa    REPORTMSG ENDSIGMSG CENTSIGMSGGEND_CENTRAL_SIGCENTRAL_HDR_SIGDECC$GA___CTYPEMATCHFNFILTER DO_STRINGDOS_TO_UNIX_TIMEREADBUFRATIOPROCESS_CDIR_FILE_HDR DECC$STRLEN DECC$STRNCMP DECC$STRCPY DECC$STRCHR DECC$DSPRINTF DECC$FREE  LIST_FILES GET_TIME_STAMP |RATIO FNPRINT$CODE&$DATA $ADDRESS_DATAGG03P`XռX XXVVP|ЬTV1PTQTPЏR RP Q{RPQPQUЬSTS+STRUPPRQRPUR RP Q{RPQPQV1TSUPPSQSPUR RP QP{RPQPQVrPTUЬSTS4STRďRUPPRQRPUR RP QP{RPQPQV2PTSďSUPPSQSPUR RP QP{RPQPQVVP^RG3G3FNFILTERP\\ DECC$STRLENP\GG03P`$GG03P`xww1 ߕ"aV1.02MATCHV1.013-JAN-2001 19:50DEC C V6.2-003PլRDECC$GA___CTYPEQˏP@aPˏPRRP^ݬ ݬݬQPQQRRPP^ެTdScZSdZRSRSSX1 PZ?'ЬScRݬ SS݀dPX1PX1PZ*?R X1PR#Pݬ ݬdPQQX1֬PX1Z[1RX1TЬRbRR! R^TTWWЬVSfR,SSfPP\S PP]VfPԚfRR]X1PRЬTdSPS-PPYTV1ެ U DECC$TOLOWERTYPP\Y1YЬQaPP-qR1Pe8DECC$GA___CTYPEQЬP`SˏSP@aPʏP SdPQPSQQSSЬQPP-zRaRaPRPke0DECC$GA___CTYPEQˏRP@aPʏP RdPQPRQQPRPPS$WX1Pݬ ~V~PX1RPRPYR֬ѬV1Wݬ ~V~ϜPX1PX1PZ\ЬR֬bZX1Pլ 7DECC$GA___CTYPESZTˏTRBcRʏRT DECC$TOLOWERPRPTRRUZUլ <DECC$GA___CTYPETЬRbSˏSRBdRʏRS DECC$TOLOWERPRPSRRSSUSݬ ~ݬPXgR MATCH __iscntrl, ,match"Precmatch6 iswildD 8$  /" /W& 0 0-  /0 {DECC$GA___CTYPE DECC$TOLOWER ,MATCH ISWILD$CODE$DATA $ADDRESS_DATAQPXXPPP9ЬQaRR\P QPR%R*P ֬RPww1@r"aV1.04PROCESSV1.013-JAN-2001 19:50DEC C V6.2-003tP[%s] RPwarning: cannot set time for %s LP 8P%sEmpty zipfile. 6Ps&PArchive: %s "P  PsPsPsPs were P wasP P.zipP XP caution: zipfile comment truncated XP End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of;H UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1; a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. Perror [%s]: reported length of central directory is %ld bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1 zipfile?). Compensating... rPerror [%s]: start of central directory not found; zipfile corrupt. %sQPwarning [%s]: zipfile is empty Perror [%s]: NULL central directory offset (attempting to process anyway) Perror [%s]: missing %ld bytes in zipfile (attempting to process anyway) VPwarning [%s]: %ld extra byte%s at beginning or within zipfile (attempting to process anyway) TPwarning [%s]: zipfile claims to be last disk of a multi-part archive; attempting to process anyway, assuming all parts have been concatenated together in order. Expect "errors" and warnings...true multi-part support doesn't exist yet (coming soon). P warning [%s]: end-of-central-directory record claims this is disk %u but that the central directory starts on disk %u; this is a contradiction. Attempting to process anyway.  P [%s]: Zipfile is disk %u of a multi-disk archive, and this is not the disk on which the central zipfile directory begins (disk %u). Pnote: %s may be a plain executable, not an archive PunzipP%s: cannot find either %s or %s. [P%s: cannot find zipfile directory in %s, %sand cannot find %s, period. P%s: cannot find any matches for wildcard specification "%s". PNo zipfiles found. P%d "zipfiles" were directories. P1 "zipfile" was a directory. P%d file%s had no zipfile directory. P%dZIPNFO REPORTMSGSEEKMSGGEND_CENTRAL_SIGCENTRAL_HDR_SIG LOCAL_HDR_SIGDECC$GA___CTYPE STAMP_FILEDO_WILDCHECKDIR GET_CRC_TABLEFREE_CRC_TABLEISWILD CHECK_FORMAT INFLATE_FREEEXTRACT_OR_TEST_FILESMAKELONGMAKEWORD DO_STRINGREADBUFOPEN_INPUT_FILEGET_TIME_STAMP LIST_FILESZIPINFOZI_END_CENTRAL GET_CDIR_ENTUZ_END_CENTRALFREE_G_BUFFERS DECC$READ archive%s had fatal errors. PP%d archive%s had warnings but no fatal errors. (P%d archive%s successfully processed. Perror: cannot allocate unzip buffers PլRDECC$GA___CTYPEQˏP@aPˏPRRP^SYRZ< ~ DECC$MALLOCPG3<~ DECC$MALLOCPG3G3G34G3 DECC$DSPRINTF<~PG3GG03P`[1 G3G63PEND_CENTRAL_SIGPCENTRAL_HDR_SIGP LOCAL_HDR_SIGKEND_CENTRAL_SIG3KCENTRAL_HDR_SIG3K LOCAL_HDR_SIG3G03 G|3PG43 G|3 PG|3|UWTXG3DO_WILDPG3G31PG3YG83@R ;RL2G@3G3"WV\U\T\cGG03P`NPRRU(PRLXPR T PRVWRLRZRZG3DO_WILDPG3G31FWU\V\1XT\\1Y1TXZ ZG3ISWILDPSG3 ZIPNFORPRG3RCG3 DECC$DSPRINTF<~PG3GG03P`aPY DECC$STRLENYPYG3P DECC$STRCPY6PRRU$PRLXPR  RVPWRZRZG3ISWILDP1=G8311G@3G83 G31VT\U\W;G@3G3+G<3 G83<~GG03P`WMXT\V\U\AW RRRWG3 DECC$DSPRINTF<~PG3GG03P`UDU RPRRUG3 DECC$DSPRINTF<~PG3GG03P`VDV RPRRVG3 DECC$DSPRINTF<~PG3GG03P`TDT RP RRTϴG3 DECC$DSPRINTF<~PG3GG03P`X1ϧG3 DECC$DSPRINTF<~PG3GG03P`5X0XώG3 DECC$DSPRINTF<~PG3GG03P`WV\U\.{G3 DECC$DSPRINTF<~PG3GG03P`FREE_G_BUFFERSZ[[PP^ INFLATE_FREECHECKDIRG3 FREE_CRC_TABLEG3G3G3 DECC$FREEG3G23G23 DECC$FREEG23G3 G3 DECC$FREEG3 G3 DECC$FREEG3G3P ^V|YԭUG3ISWILDP:G3G3 DECC$STATP#<G3RʏRPR@PPU1լ1G831G3jG3 ZIPNFOTTG3"S%SG3SG3T?G3 DECC$DSPRINTF<~PG3GG03P`UG3 ZIPNFOSPpSG3G3S9G3 DECC$DSPRINTF<~PG3GG03P`ULX1J X1D PG3G&3 CHECK_FORMATPX1& OPEN_INPUT_FILEP X1 PG3 GET_CRC_TABLEPG3G3X1G8G30RG3RRG3GCHECKDIRPRRRX1G*3G3G3G3@G838G@30G3&G3 DECC$DSPRINTFPG3GG03P`G3G&3HPWUZI_END_CENTRALPWWFG31G&3 G&3R PЏRRPWUZ_END_CENTRALPWWbG"3 DECC$CLOSEY4G3ϱG3 DECC$DSPRINTF<~PG3GG03P`լWX1PG3 X1PGT3G3G"3 DECC$CLOSEWX1cSG3 <G~3RSSTG31<G~3S<G3RSR1}@RSG31G3 DECC$DSPRINTF<~PG3GG03P` WZ;RSG3τG3 DECC$DSPRINTF<~PG3GG03P`WZ1(T7G3G3 DECC$DSPRINTF<~PG3GG03P`WG3G3G.3G.3T>T~G3 G3 DECC$DS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VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;JCMPP1G.3YG.3G3G.3SzSP{ PQPPTTSUS@ REPORTMSGG3SEEKMSGG3 DECC$DSPRINTFPG3GG03P`X1UG*3_UG"3 DECC$LSEEKPG*3< ~G3G"3 DECC$READPG3G33X1PG3TG3TG3*PG3G3RTRG3RG3G3TG3G3READBUFPCENTRAL_HDR_SIGG3 DECC$STRNCMPPM REPORTMSGG3G3 DECC$DSPRINTF<~PG3GG03P`G"3 DECC$CLOSEX1Y~G3G3 DECC$DSPRINTF<~PG3GG03P`WG3G.3SzSP{ PQPPTTSUSA REPORTMSGG3SEEKMSGG3 DECC$DSPRINTFPG3GG03P`X1tPUG*3_UG"3 DECC$LSEEKPG*3< ~G3G"3 DECC$READPG3G33X1$PG3TG3TG3*PG3G3RTRG3RG3G3TG3G3 ZIPINFOPRKG@3߭߭GET_TIME_STAMPPR0PGH3G<3G3 LIST_FILESPR EXTRACT_OR_TEST_FILESPRRWRWG"3 DECC$CLOSEG@3dG3\խWݭG3 STAMP_FILEPCG833G3RG3 DECC$DSPRINTF<~PG3GG03P`WWWXXPP^WSG&3TT 1|~G"3 DECC$LSEEKG&3G3G"3 DECC$READPG3G3G&31~G3G&3RRG3G3G31ZG3RbPPP1END_CENTRAL_SIGR DECC$STRNCMPPG3G3PPG3S1PG3G3G31PzTP{ PQPPVV1VT~G"3 DECC$LSEEKPG*3VG3G"3 DECC$READPG3G3V1G3VRRG3G3G3SG3RbPPP-END_CENTRAL_SIGR DECC$STRNCMPPG3G3PPG3SG3G3G3G3G63 DECC$MEMCPY PVTG*3VRRǏ RUTS1TU1 DECC$STRNCMPRPG*3G*3G"3 DECC$LSEEK< ~G3G"3 DECC$READPG3G3 1 G3PPG3G3G3OG3QaPPP)END_CENTRAL_SIGQbPG3G3PPG3SG3G3G3G3G63 DECC$MEMCPYTSTU1SzG83G33G3tG3 DECC$DSPRINTF<~PG3GG03P`7G3 DECC$DSPRINTF<~PG3GG03P`S1PG3G3RG*3RG3READBUFP3SPMAKEWORDRbPG~3bPG3bPG3bPG3MAKELONGPG3MAKELONGPG3bPG3G3G3G3SSP^R<G3\eGT3GT3UG@3MG83E<G3~ DO_STRINGP1 G3 DECC$DSPRINTF<~PG3GG03P`RR\\P^ GET_CDIR_ENTP\\R1G3PGT3G3\GU3PPPG3\G,3XG3\ЬPP P7P?PG3\PPPG,3 G3\ˏGv3\6G3\Ь\\ \ \G3\ G3\ PG3\ G3QˏGv3\P\PPRRPP 0^*READBUFP3S1GT3GU3GV3GW3MAKEWORD\lPGX3lPGZ3MAKELONGRbPG\3bPG`3bPGd3bPGh3lPGl3lPGn3lPGp3lPGr3lPGt3bRPROCESS __iscntrl,process_zipfiles free_G_buffersd  do_seekable  find_ecrec uz_end_central|process_cdir_file_hdr: get_cdir_entprocess_local_file_hdr R%  4& 40[ #            u2& 2(  2 2        { DECC$LSEEK DECC$CLOSE DECC$STAT DECC$STRLEN DECC$STRNCMP DECC$STRCPY DECC$MEMCPY DECC$DSPRINTF DECC$MALLOC DECC$FREE PROCESS_ZIPFILES FREE_G_BUFFERS UZ_END_CENTRAL PROCESS_CDIR_FILE_HDR  GET_CDIR_ENT  PROCESS_LOCAL_FILE_HDR$CODEz$DATA $ADDRESS_DATAPGv3bPGz3SSPP ^READBUFP3S1G:3G;3MAKEWORDRbPG<3bPG>3MAKELONG\lPG@3lPGD3lPGH3lPGL3bPGP3bPGR3<G<3\ʏ\-G3\ЬGD3G3\ЬGH3G3\Ь GL3GH3G3SSPP1A1A1AAAA11AAAA1A1ww14?"aV1.02TTYIOV1.013-JAN-2001 19:50DEC C V6.2-003P(line too long--try again) PrP SYS$COMMANDPլRDECC$GA___CTYPEQP@aPˏPRRP ^|~? SYS$ASSIGNPQʏP QS1P|~|~|~'2~ SYS$QIOWPQʏPQS12RˏRPRStլ|~|~|~#2~ SYS$QIOWPRʏPRS5P2QˏQPQS 2~ SYS$DASSGNPRʏPRSSSP $^|~?ޟ SYS$ASSIGNʏPSZP|~|~|~6 UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;iR\\SPSSP ^X DECC$CTERMIDP DECC$FOPENPVn1DECC$GA_STDOUTRb DECC$FFLUSHY DECC$FPUTS DECC$FFLUSH[ECHOZ DECC$GETCUЬ TެRbWiPDECC$GA_STDERRP`Y DECC$GA_STDERRP`ݬ DECC$GA_STDERRP`kSVePQQPP  QST SPSQ@QPP jDECC$GA_STDERRP`  DECC$PUTCDECC$GA_STDERRP`kYCPP 1jЬRCV DECC$FCLOSERnnPww15"aV1.0 5UNREDUCEV1.013-JAN-2001 19:51DEC C V6.2-003MRUNREDUCE __iscntrl, GDECC$GA___CTYPE,$CODE$DATA $ADDRESS_DATA@PլRDECC$GA___CTYPEQˏP@aPˏPRRPww1:R"aV1.05UNSHRINKV1.013-JAN-2001 19:51DEC C V6.2-003MRUNSHRINK __iscntrl , GDECC$GA___CTYPE,$CODE$DATA $ADDRESS_DATA@PլRDECC$GA___CTYPEQˏP@aPˏPRRPww1 !aV1.02UNZIPV1.013-JAN-2001 19:42DEC C V6.2-003lP%d fP[-Z] P Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). P"P" P-xP-dP-ZPii< PExamples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer  Pmodifiers: -q quiet mode (-qq => quieter) -n never overwrite existing files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v be verbose/print version info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %s\ P -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract files into exdir %s  P=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe  P"-Z" => ZipInfo mode (`unzip "-Z"' for usage). PUsage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s PLatest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites. PUnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.  PUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v. P05 May 2000P [decryption, version %d.%d%s of %s] PTIMESTAMPPLZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)DPCOPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)=P[none]2P%16s: %s  P UnZip and ZipInfo environment options: P %s PUnZip special compilation options: P "-M" page output through built-in "more" Pmiscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal format %c-C%c be case-insensitive %s -x exclude filenames that follow from listing P main listing-format options: -s short Unix "ls -l" format (def.) -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format  -v verbose, multi-page format PZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s. usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] P* or % (e.g., "*font-%.zip")xP "-M" pipe through "more" pager RP"-X" restore owner/protection infoP unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS Pvms.cPcaution: both -n and -o specified; ignoring -o Perror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid 6Perror: -Z must be first option for ZipInfo mode (check UNZIP variable?) Perror: must give decryption password with -P option Perror: -d option used more than once (only one exdir allowed) |Perror: must specify directory to which to extract with -d option VPcaution: not extracting; -d ignored ,Penvargs: cannot get memory for arguments!PZIPINFOOPTPZIPINFO_OPTS PUNZIPOPTPUNZIP_OPTS PCompiled with %s%s for %s%s%s%s.  Pzipinfo P (please check tha  MASK_BITS  VERSIONDATE  CENTSIGMSG  ENDSIGMSG SEEKMSG FILENAMENOTMATCHED EXCLFILENAMENOTMATCHED REPORTMSG ZIPNFO COMPILEDWITH UNZIPUSAGELINE1FNAMESG DECC$EXITVERSIONENVARGS RETURN_VMS ZSTRNICMPHANDLERZI_OPTSPROCESS_ZIPFILESUSAGEUZ_OPTSUNZIP GLOBALSCTOR DECC$ISATTY DECC$SIGNAL DECC$STRLEN DECC$STRNCMPt you have transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)  Pcaution: excluded filename not matched: %s Pcaution: filename not matched: %s Perror [%s]: attempt to seek before beginning of zipfile %sPerror: expected central file header signature not found (file #%lu). P note: didn't find end-of-central-dir signature at end of central dir. P14 January 2001P??P ^DECC$MAIN_ARGSS ^SR GLOBALSCTORݬݬUNZIPP RETURN_VMSS R DECC$EXITRP^UHANDLERSS DECC$SIGNALRbSbS bS bRѬRRGl3ݼ DECC$STRLENPRRbPP]RRR R ZSTRNICMPP.eR ZSTRNICMPPѬZЬRݢ DECC$STRNCMPPCG3߬߬ENVARGSPR  DECC$PERRORU߬߬ZI_OPTSPRBPG3ϲ߬߬ENVARGSPR DECC$PERRORP߬߬UZ_OPTSPRլRRW1ЬRbG3ЬGp3Gt3լ1SVRGx3ЬG3Rb1PG1b DECC$STRNCMPP1PRPPTbGSbG3RPPGp3SVbG3RPPGt3GP`PFRb bG6PG3 DECC$DSPRINTF<~PG3GG03P` W1T1բ RG3ìG3PPPGp31Gx3FNAMESG3Gp31qPVk b DECC$STRCMPPXVRG3FNAMESG3Gp3SbG3RPPGp3SRG3ì?m@ UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;9G3PPPGt3SRb1Gx3G6G3.G3 DECC$DSPRINTF<~PG3GG03P`PROCESS_ZIPFILESPWWP^XSмWVW1fR1bRR-1 DECC$DSPRINTFYfRU1U-1p1UC1_UPPC7P1v?PS1PS SG 3P PG 3G 3S1G 31PS SG3P PG3G3S1G 3G3G 31hS G3S1XG31MPS G3S1<G311PS4<G3 DECC$DSPRINTF<~PG3GG03P` T1G4DG3 DECC$DSPRINTF<~PG3GG03P` T1]RGRP`P1WQWVfGfP`PP-nϞG3 DECC$DSPRINTF<~PG3GG03P` T1P6PdG3 DECC$DSPRINTF<~PG3GG03P` T1bP1RbP1 PRbP1P1SGD3G3S1PGD3G31PUSAGEPT1^S G$3S1G$31PS SGH3P PGH3GH3S1|GH31rPS SG,3P PG,3G,3S1LG,31BPS GX3S10GX31%PS G03S1G031 PS SG43P PG43G43S1G431PS,G3G83P PG83 PG83S1G3G831PS4 G3 DECC$DSPRINTF<~PG3GG03P` T1G31LRG3RP`P1WRWVfG3fP`PP-oϳG3 DECC$DSPRINTF<~PG3GG03P` T1P6PxG3 DECC$DSPRINTF<~PG3GG03P` T1QbP1RbP1PRbP1PS SG83P PG83G83S1lG831bPS G<3S1PG<31EPS G@3S14G@31)PS GD3S1GD31 PS G,3S1G,31PS SGH3P PGH3GH3S1GH3 GH31PGH31PS GL3S1GL31P1S SGP3P PGP3GP3SiPGP3_S SGT3P PGT3GT3S=PGT33G3i<~PG3GG03P`XXU1}VWfR bPP-1ZG3G<30G3GD3 G<3GD3G39G031϶G3 DECC$DSPRINTF<~PG3GG03P`XG 3G 3G3G3G43<G034ϢG3 DECC$DSPRINTF<~PG3GG03P`G43GX3 DECC$ISATTYPGX3WRWRXEWVGH3W ϦTcPGl3X XXUSAGEPTDPG3 G<3GH3GT3G@3G3G3WVTTPP^RլTPTG31υ ϒG3 DECC$DSPRINTFS cTPG3GG03P`G3cTPG3GG03P` """"G3cTPG3GG03P`G3cTPG3GG03P`1:d G3 DECC$DSPRINTFScTPG3GG03P`ϙfG3cTPG3GG03P`լ'ϕG3cTPG3GG03P`ϴϻG3 DECC$DSPRINTFScTPG3GG03P`ϩ""{""""ϪG3 cTPG3GG03P`&G3cTPG3GG03P`լ PPP ^SG833<~lG3 DECC$DSPRINTFPG3GG03P`PRpSG3 DECC$DSPRINTF\lPG3GG03P`ϺG3lPG3GG03P`VERSIONG3lPG3GG03P`G3lPG3GG03P`R,ϫG3lPG3GG03P`R:~G3lPG3GG03P`R=꟣q  G3lPG3GG03P`R+XG3lPG3GG03P`G3 DECC$DSPRINTFPG3GG03P` DECC$GETENVPQa\RQRRϣG3 DECC$DSPRINTFPG3GG03P` DECC$GETENVPQa\ϜRQRR^ρG3 DECC$DSPRINTFPG3GG03P`8R UNZIP mainG Hunzipcuz_optsa usage7Hshow_version_info1 v27A? $3w 3K<    x4\}      5e  4g 3oE 4K$ DECC$STRCMP DECC$DSPRINTF DECC$PERROR DECC$GETENV  __MAIN  MAIN HUNZIP UZ_OPTS USAGEDECC$MAIN_ARGSy$CODEr$DATA $ADDRESS_DATA" MASK_BITS VERSIONDATEG CENTSIGMSGI ENDSIGMSG<SEEKMSG$FILENAMENOTMATCHED-EXCLFILENAMENOTMATCHED REPORTMSGZIPNFO# COMPILEDWITHGUNZIPUSAGELINE1b DECC$GETENVPQa\LRQRR1G3 DECC$DSPRINTFPG3GG03P` DECC$GETENVPQa\RQRRG3 DECC$DSPRINTFPG3GG03P`P TTTTTTTTTTTTTLTT$TTTTTT(X\TTTT4PTT0hTTww1^"aV1.00VMSV1.013-JAN-2001 19:52DEC C V6.2-003HPJan 13 2001AP on 8PV6.0 (P (%.4s for VAX) PVMSPOpenVMSPV6.0 P %c%d.%d-%03dPDEC CP PSYS$OUTPUTPPPPsys$disk:[]Psys$disk:[]PP jPmapname: conversion of %s failed YP creating: %s @P P   P[]*.zipPX P%s[ %s ] @ P%s[ VMS status = %d ]  Pstamp_file: sys$dassgn failed.  P[ Modify file QIO failed. ]  P[ Access file QIO failed. ]  Pstamp_file: sys$assign failed.  Pstamp_file: sys$parse failed. H P L PHT PD\ P d@B UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;t P l P( t P0  | P8  P:  P<  P@  P%02d-%3s-%04d %02d:%02d:%02d.00P;Zx0Nm P[ Deaccess QIO failed ]  P[ _close_qio: sys$synch found I/O failure ]  P[ _close_rms: sys$wait failed ] i P[ WriteRecord: sys$put failed ] F P[ WriteRecord: sys$wait failed ] D P  P[ WriteBuffer: sys$write failed ]  P[ WriteBuffer: sys$wait failed ]  P[ Warning: Record too long (%u) ]  P[ Warning: Record too long (%u) ]  P[ Warning, incomplete record of length %u ] h P[ Record too long (%u bytes) ] H P[ WriteQIO: sys$qio failed ]  P[ WriteQIO: sys$synch found I/O failure ] P[Warning: CRC error, discarding PKWARE extra field] P[ Warning: Unknown block signature %s ] PVMSVPVPROPVRDTPVDATPVFHCPVKEYPVALLPVFABPIM"P%s exists: [o]verwrite, new [v]ersion or [n]o extract? (uppercase response [O,V,N] = do same for all files): P[ Create file QIO failed. ] Pcreate_qio_output: sys$assign failed. Pcreate_qio_output: sys$parse failed. P[ File %s has illegal record format to put to screen ] xPpPhPHXPCan't create output file: %s P[ Cannot allocate space for %s ] P[ Cannot create output file %s ] P[ File %s has illegal record format to put to screen ] sPCan't create output file: %s PP[ Cannot create output file %s ] 0P%02u-%3s-%04u %02u:%02u:%02u.00PP PDECPNOV POCT COMPILEDWITHGDECC$GA_RMS_XABRDTDECC$GA_RMS_XABPRODECC$GA_RMS_XABKEYDECC$GA_RMS_XABFHCDECC$GA_RMS_XABDATDECC$GA_RMS_XABALLDECC$GA_RMS_RABDECC$GA_RMS_FABDECC$GA_RMS_NAMDECC$GA___CTYPEDECC$GA_STDERRFIND_VMS_ATTRS SYS$SETDFPROTLIB$SYS_GETMSG SYS$WRITESYS$WAIT SYS$SYNCH SYS$SEARCHSYS$QIOWSYS$QIOSYS$PUT SYS$PARSESYS$OPEN SYS$NUMTIM SYS$FILESCAN SYS$EXTEND SYS$DASSGN SYS$CREATE SYS$CONNECT SYS$CLOSE SYS$BINTIM SYS$ASSIGNCHECKDIRCRC32 MEMEXTRACT ZSTRNICMPMAKEWORDDECC$LOCALTIME DECC$TIME DECC$MKDIR DECC$STAT DECC$STRLEN DECC$STRCMP DECC$STRRCHR DECC$STRNCPY DECC$STRCPY DECC$MEMCPYCMA$TIS_ERRNO_GET_ADDR DECC$TOLOWER DECC$FGETS DECC$DSPRINTF DECC$FFLUSH DECC$MALLOC DECC$UMASK DECC$EXITPSEPPAUGPJULPJUNPMAYPAPRPMARPFEBPJANP Error: zipfile is in variable-length record format. Please run "bilf l %s" to convert the zipfile to stream-LF record format. (BILF is available at various VMS archives.) P error: cannot open zipfile [ %s ] (access denied?). (P#= p=ףլRDECC$GA___CTYPEQˏP@aPˏPRRP<^\DECC$GA_RMS_FABR(PbG3G3 DECC$STRLENPܟSYS$OPENʏP9G3G3 DECC$DSPRINTFPG3GG03P`TSS SYS$CLOSESS8G3G3 DECC$DSPRINTFPG3GG03P`TTTPP^\FIND_VMS_ATTRSPPP Pv?PPRPϏPR PϗPRRP^\G@3RRZʏZZ RXʏXXR[ʏ[ RYʏYRWʏWxG@3VʏVDECC$GA_RMS_XABDATR(S9G3G3 DECC$DSPRINTFPG3GG03P`V1 ̀̀쀁SPP P)?Phx Pϰ 1jPDECC$GA_RMS_FABR(PblG3,G3 DECC$STRLENP4DECC$GA_RMS_NAMR(`b(l SYS$PARSEPSˏSRSV1Pp|~8p SYS$ASSIGNPSˏSRSV1P4|#S$RRSSxGL3@R~BRb@R~BRlb@R~BRb@<RRRVRWV12@R~BRb@R~BRb@R~BRb<RRR[R [1ѮgHR]Ԣ$PSМHRТ$HRP$TSHRТ$HRT$hlSHRТ$HRh$ԮЮnЮP ^RT T DECC$FREE\ \ DECC$FREEX X DECC$FREEP P DECC$FREEhPh\ЬS\ DECC$FREEShH\bS\S \ DECC$FREEP^ЬQ<PˏPW<PPPXWXUP< UլUЬPU`ЬSSUSRURR DECC$MALLOCPTV1Pլ USSݬ T DECC$MEMCPYWPPPIR?PUЬPT DECC$MEMCPY7ЬPUT1&PXЬPUT MEMEXTRACT PT DECC$FREETTVVPP |RЬP׬P1PRRQQ Ь P֬ `PxRPPPSQRˏSP=SSRRRQQ Ь P֬ `PxRPPPSQRЬP֬S`RSSЬP֬`RSSЬP׬P1z ^SݬݬG3CRC32PG3G<3RPݬݬP`PRRPP^RVլ1#PQѡAЬTáPTPPSTSSV~~ DECC$MEMCPYSTPSSVPѠ1РUРTLSYS$WAITPSʏP S 6LPݠ  #LPT"LPU(L SYS$WRITEPSʏP&S LPݠ B 2QQQP PU1PPԠլ1լ 1Sգ1УWУVLSYS$WAITPTˏTS T cLSݣ  PLSV"LSW(L SYS$WRITEPTˏTS&T LSݣ B 2SSSUUUPP^R<FHR VMSX __iscntrl, check_format\ open_outfileT set_default_datetime_XABsxcreate_default_output,create_rms_output@create_qio_output replace find_vms_attrsfree_up extract_blockdecompress_bits flushM _flush_blocksWriteQIO SYS$SYNCHPSʏP2HSˏSPS ϣ 2ThP<|~@ݬݬ|~H08 SYS$QIOPSʏPSH T 2TP< PP@TTPP|^RUլ1PQѡAЬTáPTPPSTSSU~~ DECC$MEMCPYSTPSSUPѠ*ݠݠϺPQQVRPԠլ1kTSդSSSS SSS~ݤhPVPVVPPX^UЬVS1<ŀYYTSTЬXTXeSXPP0Yh  DECC$DSPRINTFPGG03P`2W1?ݬVŀRR~ DECC$MEMCPYԬTPTVŀPPS~ DECC$MEMCPYTTXTVˏYP׬VYŀRR~P2W1լcPDECC$GA___CTYPEQˏRP@aQˏQPʏQ R$R-RP_R1cUXUPDECC$GA___CTYPES`RʏRBcRʏR!DECC$GA___CTYPESP`RʏRBcRʏR`R_e GL3eX.hG3 DECC$STRLENP@G3RR/oXCHECKDIRG3CHECKDIRTAG833G3YG3 DECC$DSPRINTFPG3GG03P`MZgZbPR9G3jG3 DECC$DSPRINTFPG3GG03P`Z CHECKDIRG3CHECKDIRWZZP^VˏX1( ӭW1|Ьݬ DEC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_DECC_OLB;1;J GG03P`Gz3S<Gl3RRS<Gn3RRSGd3S<Gn3~ DO_STRINGPYG23G23 DECC$FREEG23YG3R͒GW3RRRLLL͐GV3͎<GZ3RR RH HHVGG03P`FNPRINTGz3Gz3VG3 DECC$DSPRINTFPG3GG03P`<SSGU3~ DECC$DSPRINTFTCXTTMG3 DECC$DSPRINTFUePG3GG03P`<͒SQSP RRRPRQPQP{RPPQQQSP R RP QP{RPQPQ G3ePG3GG03P`<͐SSGW3~CߟeTCXTTߟG3 DECC$DSPRINTFUePG3GG03P`<͎SQSP RRRPRQPQP{RPPQQQSP R RP QP{RPQPQϽߟG3ePG3GG03P`&S6+S.0S&5S:S?SDSISSx DECC$STRCPY϶S6϶S.ϼS&SS$SSS<[YYS UNZIP.BCK/ O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_DECC_OLB;1;*+RʏR Y͜B͜͜՟G3hPG3GG03P`1PY@1 ǪVjP1Z!p DECC$MEMCPY RBppϗӟG3hPG3GG03P`1PY1VPTRˏRP ǯ͘τ͘͘TϬԟG3hPG3GG03P`PЬRb14VPb1(ݼ1!PY1~~~f~ϗԟG3hPG3GG03P`1PY1SzSP{ PQP,P S~ԟG3hPG3GG03P`1PY1RʏRRUV?ϪQRSUVWXYG3 DECC$DSPRINTFPG3GG03P`PЬSRxRTRxRRRTRxRRRTRRT~cRxRTRxRRRTRxRRRTRRT~ϲG3 DECC$DSPRINTFPG3GG03P`^ЬQaRRPʏPPPY RPˏPSRPˏPX RPˏPWRPˏPVxaPˏPUSS Sϩğ DECC$DSPRINTFT 7SP@sTG(3 %UVWXTlY~ϋݬ  DECC$DSPRINTFpPG@3$UVWXSlY~vݬ  DECC$DSPRINTFCPVWQYPЏdRRRPRQPQ{RPPQQTXݬ  DECC$DSPRINTFЬ RRPEPڵy1mmmmmmmmm)"PUP#3#GGG{P))))))))))))))))))))))))))))m)))))))))))%))))))))))))))))RZIPINFO( __iscntrl,8Tzi_optszi_end_centralzipinfo%zi_long<Czi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~YU~RYRZYQYZPZ@ARYY0PԮ(Yծ,1>ծ 1YFLUSHPƔR TSSRƔHRRSRƘPP,^ VY|S ެ оUPZYPPRRUZU~YU~RYRZYQYZPZ@ARYY(PԮ Yծ$1>ծ1YFLUSHPƔRTSSRƔHRRSRƘPP,^ VY|S ެ оUPZYPPRRUZU~YU~RYRZYQYZPZ@ARYY(P%Ԯ Yծ$1>ծ1YFLUSHPƔRTSSRƔHRRSRƘPP^ TRĔ\\@ PPPP<<\\1 <~PSSP߭߭|~<~<~ HUFT_BUILDPSS ݭ HUFT_FREESP@~φPSSP߭߭€@~ HUFT_BUILDPSS ݭ HUFT_FREEݭ HUFT_FREESP@~/PSSP<<\\g߭߭@~ HUFT_BUILDPS'S ݭ HUFT_FREEݭ HUFT_FREEݭ& HUFT_FREESPݭݭݭݭݭݭmPSe߭߭€@~ HUFT_BUILDPS'S ݭ HUFT_FREEݭ HUFT_FREEݭ HUFT_FREESPݭݭݭݭݭݭϲPSݭ HUFT_FREE\lݭlݭl10P@~#PSSP߭߭b@~ HUFT_BUILDPSS ݭ HUFT_FREESP@~PSSP<<\\X߭߭@~ HUFT_BUILDPSS ݭ HUFT_FREEݭ HUFT_FREESPݭݭݭݭ~PSV߭߭€@REXPLODE'get_tree explode_lit8` explode_lit4 explode_nolit8explode_nolit4explode-     2( ؀ W C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRM HUFT_BU)ILD HUFT_FREEFLUSHREADBYTEMEMSETMEMCPY EXPLODE$CODE$DATASTDINSTDOUTSTDERR_CTYPE_ERRNO VAXC$ERRNO LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGMG MASK_BITSFNAMESOEM2ISO VERSIONDATE CENTSIGMSG ENDSIGMSGSEEKMSGFILENAMENOTMATCHEDEXCLFILENAMENOTMATCHED REPORTMSGZIPNFO* COMPILEDWITH~ HUFT_BUILDPSS ݭ HUFT_FREEݭ HUFT_FREESPݭݭݭݭ PSݭ HUFT_FREEݭ HUFT_FREESPww1̘fpaV1.04EXTRACTV1.013-JAN-2001 19:13VAX C V3.2-044P skipping: %-22s need %s compat. v%u.%u (can do v%u.%u) 

PVMSBPPKEP[empty] NP[text] WP[binary]`PtestgPextractqP sPexplod|P PerrorPwarningP P [P]P PerrorPwarning C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RM0S_XABSUM CC$RMS_XABTRMFNFILTER MEMEXTRACTDECRYPT CLOSE_OUTFILEMAPNAMEMAPATTRCRC32MATCHINFLATEEXPLODEFNFILTER MEMEXTRACTMAKELONGMAKEWORD DO_STRINGCHECK_FOR_NEWERFLUSHREADBYTEREADBUFDEFER_LEFTOVER_INPUTP P.PinflatP P%-22s P OK P P%-22s P%-22s P P%-22s P P OK Pp^Z RUԮ<ԭX[ԮLԮ0ԮԭО²ˆբp&x1p~MALLOCP[TբpPDkTTpբt(xt~MALLOCPLTբtPDLTTtԭԭԮ8SPRINTFYLSEEK,READ(READBUF$STRNCMP PROCESS_LOCAL_FILE_HDR DO_STRINGFNFILTER4FREEDECRYPT STRCHRMAPNAMECHECK_FOR_NEWERnFGETSHSTRLEND@ DO_STRINGWMATCHV@\L²¤READBUFP 3X81 ¤STRNCMPP1ˏP<\P\! ¤STRNCMP\P\\`<~x\2D\\\SPRINTFPb1\l<~SPRINTFPb1\lX81PROCESS_CDIR_FILE_HDRP PX81Pߪ*\@\~DPŦiPb1\l1S1|X1tX1nP7P4 PTP?PբEխ@V;Ѣ|V/Ѣ|("Ѣ| բD խV PѢ|խ1~\@\~@PiPb1\l ¨TP,iPb1\lN¨XX¨\\A1\PPAZ P?PPn1Pn  P1f?P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ŵT\ZR[RRTTR@R~FNFILTERPŮSPRINTFPc1\lINFL?ATEPT1%T21գ<գ8 գ<eգ8`<~R@R~FNFILTERP:T RPRRSPRINTFPc1\lBP<~:T RPRRSPRINTFPc1\lTRPRRXUTXPP<~R@R~FNFILTERPnSPRINTFPc1\l UNDEFER_INPUTPգ< CLOSE_OUTFILEVJ    G @   :  $       /H    !    UNDEFER_INPUT M2FB UNZIP.BCK- O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_VAXC_OLB;1.HIOPEN_OUTFILEPROCESS_LOCAL_FILE_HDRPROCESS_CDIR_FILE_HDRREADLSEEKMEMCPYSTRLENSTRCHRSTRNCMPSPRINTFFGETSMALLOCFREE EXTRACT_OR_TEST_FILES # MEMEXTRACT % MEMFLUSH % FNFILTER&$CODEg$DATASTDINSTDOUTSTDERR_CTYPE_ERRNO VAXC$ERRNO LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGMG MASK_BITSFNAMESJOEM2ISO VERSIONDATE CENTSIGMSG ENDSIGMSGSEEKMSGFILENAMENOTMATCHEDEXCLFILENAMENOTMATCHED REPORTMSGZIPNFO COMPILEDWITH)TRUNCEAS5 TRUNCNTSD$CHAR_STRING_CONSTANTSPX6PPP Xx P$( Pt. P":ww1~aKV1.03FILEIOV1.013-JAN-2001 19:13VAX C V3.2-044P??'".^%So??YϾ󨷵ǎԐѥ噞ᅠƄФP׃Ѫ++++--+-+++---+i++_̯յݯ=Perror: cannot open zipfile [ %s ] $Perror: zipfile read error @Pwarning: filename too long--truncating. jPwarning: Lextra field too long (%d). Ignoring... P%s: write error (disk full?). Continue? (y/n/^C) Perror: z C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMREADBUFDEFER_LEFTOVER_INPUTGETPTT_GETCHECHO UPDATE_KEYS DECRYPT_BYTESCREENLINEWRAP SCREENSIZE RETURN_VMSFNFILTERWRITEOPENMREADLSEEKISATTYMEMCPYSTRLENTOLOWERFFLUSHipfile probably corrupt (%s) P--More--(%lu)P--- Press `Q' to quit, or any other key to continue --->P zP[%s] %s password: PEnter password: Ppassword incorrect--reenter: Pctx=stmP  Pbus errorPsegmentation violation+P[ %s ] P^ R|~OPENP""2<~SPRINTFPNb1\lPPP^ \ ̔E#E̔̔IE^ \̔1̔̔̔I̔E̔E̔^ TVЬRRWR1Pg< ~"READPRWP#<~ߦ$STRLENPߦ$d1P`P *PRPRUPUUSSݬMEMCPYSSSSR1NWPP|^ TVPĔĔP1< ~O"READP P2<~ߦ$STRLENPߦ$d1RbECHO RETURN_VMS *Ĕ4ĔĔĔIĔEĔ PEĔRARSR\RU\(PcR DECRYPT_BYTEP\\Rcc~ UPDATE_KEYSSU\U\RP^YTЬRRWR XRSUЬRբ<iVV%լ  ЬRլ PP  ֬ ЬRd\ SCREENSIZE\11V FPUTCPVFFLUSHբX"Ԣh֢`Ѣ`\R97ЬRբ<.ISATTYP!ISATTYPi FPUTCiFFLUSHЬRЬRբX1SX1cPP U0PSCREENLINEWRAPP"cPP  ЬPԠhЬP֠hѠhdUUiUЬPԠh֠`Ѡ`\PWSRRRWfP ~WRITEQPRQQQPVFFLUSHЬPSWP9SSX1LWS Ь S1SWfR ~WRITEPRPRSPPVFFLUSHRЬRբ<IISATTYP<ISATTYP/ݬ WйR ~WRQITEPRPR PPiFFLUSHЬQRPR PPP^ P|^TUVЬP ߤeFPRINTFЬPݬeFPRINTFeFFLUSH 2PTT_GETCHPSSPP (P #P PqPQ TT_GETCHPS>eFPRINTFeFFLUSHSRˏRP@R~TOLOWERPQRQQq  RETURN_VMSЬQ SPP ԡ`P^ TSWЬVfcf<~MALLOCPUGP`P~ݬFNFILTERPP@P~ݬFNFILTERPRzUSPRINTFURPÍR fUÞRݬݬ RGETPPRU UFREERW P WWP^T RSECHOѬ 2DbRbjPS޼TCdlVYRxR4V RVR[ZZ,PZR(jBg4ZZ,YRxRZ[RRZRPZ[ZZ[RRZRZ[xVRRRRR[RЮ0SRCp(P׮0Ю0RB$VxVRRRRR[RЮ0SRCpЮR׻R1mYY 1Nо$SծѮ SSPP ^ЬRRТSRFREESRPww18ߠaV1.01mLISTV1.013-JAN-2001 19:15VAX C V3.2-044P%c%d%%P100%% P Length Date Time Name.P -------- ---- ---- ----OP Length Method Size Ratio Date Time CRC-32 NameP-------- ------ ------- ----- ---- ---- ------ ----P .O%s ("^" ==> case %s conversion) P%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %c:P-------- ------- --- ------- %8lu %8lu n%4s %lu file%s P%9lu %02u-%02u-%02u %02u:%02u %cP -------- ------- %9lu %lu file%s #PNXFS(PStored0PShrunk8PReduce1@PReduce2HPReduce3PPReduce4XPImplode`PTokenhPDefl:#pPDef64#xPImplDCLPUnk:###P%s %s P%03u PsPsP P^ S[ZԮRѣHRRԮ|ѣ8pգ,6RBBSPRINTFPc1Rb6RBBoSPRINTFPc1Rb äREADBUFP3P äSTRNCMPPr PʏP<\P\1=<~ݮ$SPRINTFPc1\l<~SPRINTFPc1\lPPROCESS_CDIR_FILE_HDRPMAKELONGScP@cPDcPHcPLdPPdPR<<\\'\ЬD\ЬH\Ь LH”PP1=1=1====11====1=1ww1:2aV1.02TTYIOV1.013-JAN-2001 19:08VAX C V3.2-044P PSYS$COMMANDP PrP(line too long--try again) P^|~? SYS$ASSIGNPQPQP|~|~߭|~߭'2~ SYS$QIOWPQPQP2QQQPլP|~|~߭|~߭#2~ SYS$QIOWPQPQP2QQQP2~ SYS$DASSGNPQPQPP ^|~?R$ +H j;g  =Pj<}ZG@ahR]vu GR[c#@CM<;XѲޙw8"Ae'F].nOI2k=xDdB(XXE&4e:VJآ HHgzEQU|T6 N! 8#)YF ܈#uԨq9YMh}UwNaBT m! H46Mq`RJzҬ$G3u3q8 ~ӻU)q+惀Nvkh@C>F9v/uX^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YQ>dQdJ΃uz,7VXV~i[%`ʆrdKs3D9FX7ըfV'fKn~?3 PYw4eBMk|XJU[_`.[f=wR0]KɾC6Y_AwDZ?q deD9?Zu`hr/YIT=j?(lxe0 'ȃN K={p.]PnZT n4ǒ'C + IL_;EW>).G5_? +`ۭ\t'N9QG Ͷp *D(04L:ŠRhҼ>=idNöq5u/\PcoBZK"0~j|;tP/X} v0h4@B󷣞ޑ2{Esa7wFJjӸUmSE UNZIP.BCK- O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_VAXC_OLB;1O SYS$ASSIGNPP|~|~߭|~߭ must quote uppercase options and filenames in VMS QP"-X" restore owner/protection infotP  "-M" pipe through "more" pager P* or % (e.g., "*font-%.zip")PZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s. usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] P main listing-format options: -s short Unix "ls -l" format (def.) -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format  -v verbose, multi-page format Pmiscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal format %c-C%c be case-insensitive %s -x exclude filenames that follow from listing P "-M" page output through built-in "more" PUnZip special compilation options: P %s P UnZip and ZipInfo environment options: (P%16s: %s 3P[none]:PCOPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)wPLZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)PTIMESTAMPP [decryption, version %d.%d%s of %s] P05 May 2000PUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v. PUnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details. PLatest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.  PUsage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s  P"-Z" => ZipInfo mode (`unzip "-Z"' for usage). P=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe R P -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract files into exdir %s  Pmodifiers: -q quiet mode (-qq => quieter) -n never overwrite existing files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v be verbose/print  C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMTH UNZIP.BCK- O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_VAXC_OLB;1USAGEUZ_OPTSUNZIPVERSIONENVARGS GLOBALSCTOR RETURN_VMS ZSTRNICMPHANDLERZI_OPTSPROCESS_ZIPFILESUSAGEUZ_OPTSUNZIPISATTYSIGNALSTRLENSTRNCMPSTRCMPPERRORSPRINTFversion info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %s2 PExamples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer PiiP-ZP-d P-x P"P"P Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). dP[-Z] jP%d P^ C$MAIN_ARGS GLOBALSCTORݬݬUNZIPP RETURN_VMSP^V Y RXHANDLERTTSIGNALScTcT cT cSѬSSl޼TdSTRLENdPSSc]SSSS ZSTRNICMPP.fS ZST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LOCALTIMEPSTIMEP߭ LOCALTIMEPScݣݣl~УRBݣ ǚSPRINTFT SYS$BINTIMDLMEMCPYЏ T>S>RcbSRTm|~$|~6 SYS$QIOWPSS2SSS5 SYS$DASSGNP SYS$DASSGNPP3 PPP^T RSԭ|~߭߬LIB$SYS_GETMSGP-ݬݬSSPRINTFPb1P`PЭP@ݬjSPRINTFPb1P`|^Vx ݬSTRCMPP1ݬSTRCPYx (P CC$RMS_FAB  STRLENؐP |     (` CC$RMS_NAM !      SYS$PARSEPPx   SYS$SEARCHP2ݬSTRCPYP  SYS$SEARCHP x P RBP^ YTv[ 1   SYS$SETDFPROTPFˏ  ˏ  ˏ  ˏ  1PUMASKP PUMASK  ˏ \x L   \ʏ\xL   \ʏ\xL      \ \ \ \ЬPP*P1SP.?P[\W(i. UNZIP.BCK- O+[UNZIP542.VMS-BINARIES]UNZIP.VAX_VAXC_OLB;1=y\[\x[P P P P1Fʏ[ˏ[\\@ ʏ[ Pʏ[[XVX12y2SPebcdicEPtextJPrdo OPhid TPsys YPlab ^Pdir cParc hPlnk mPexeqPVFABvPFABzPVALLPXABALLPVFHCPXABFHCPVDATPXABDATPVRDTPXABRDTPVPROPXABPROPVKEYPXABKEYPVMSVPversionPversionPunPZPITPZPITPJLEEPdZipPunP%02xP.P PisPmay bePNXFSPfatPamiPvmsPunxPcmsPatrPhpfPmacPzzzPcpmPt20PntfPqdsPacoPvftPmvsPbe PnskPthsP???PstorPshrkPre:1 Pre:2Pre:3Pre:4Pi#:# Ptokn%Pdef#*Pd64#/Pdcli4Pu###P%03u P%d.%dP%d.%dP%d.%dP.r.-... %d.%d-Pcom1Pexe5Pbtm9Pcmd=PbatAP%d.%dGP%s %s %8lu SP%cVP%cYP%3d%%_P %8lueP %s %s 9PJan=PFebAPMarEPAprIPMayMPJunQPJulUPAugYPSep]POctaPNovePDecP^ RԮQWXV[|Y„мTмTn1*ЮS-1PPSPUcT1TPP-MP1: C$V_CTYPEDEFS CC$RMS_NAM CC$RMS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.0AAUNZIPV1.013-JAN-2001 19:00Compaq C V6.2-003  $ABS$i0$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$( MASK_BITS VERSIONDATEP ENDSIGMSGH CENTSIGMSG@SEEKMSG (FILENAMENOTMATCHED(0EXCLFILENAMENOTMATCHED REPORTMSGZIPNFO ( COMPILEDWITH HUNZIPUSAGELINE1 DECC$GETENV DECC$PERROR DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCMP DECC$STRNCMP DECC$STRLEN DECC$SIGNAL DECC$ISATTY GLOBALSCTORG(JMAIN(JP UNZIP(JxUZ_OPTS(JpUSAGE PROCESS_ZIPFILESZI_OPTSHANDLER ZSTRNICMP RETURN_VMS VMS_UNZIP_CMDLINE VMSCLI_USAGEENVARGSVERSION0  MASK_BITSFNAMES0 VERSIONDATE0 CENTSIGMSG0 ENDSIGMSG( SEEKMSG8 FILENAMENOTMATCHED8 EXCLFILENAMENOTMATCHED0  REPORTMSG( ZIPNFO0  COMPILEDWITH0 UNZIPUSAGELINE1(J __MAIN DECC$MAIN DECC$EXIT DECC$$SHELL_HANDLER =# ? ~4G0^8^@cG("# G$" "@[Hb=/@Zk$=(b# @0B8bG4G@ZkcG0]8]@P#k#G^8[~^/ GG >@b@Zk =xb#@(B0bG4G/@ZkG]] 4G0#k/#TG ^[(^0~8~>@H޴PXGG(;bTG@ZkBb("GTG@ZkBb("bTGTG@ZkBb("tGTG@ZkBb"="TG@Zk=ABb5 @4Gl#@Zk=!B@$ A"2@`@!.JF. JF / K+G `/ `KkG ` @?@`.JF @0B8bP" CGtG@Zk0B0 8b""TGtG@Zk=(Bb= @ x""TGtG@ZkBBb"㳐r"="R"G@Zk"@B HbG"4G@Zk=G* +/"="(b#@BBb4Gr"#"="R"G@Zk"@B HbG"4G@Zk=G ÐBb"="TG@Zk=G G"&  GGp#t㳆 xd`#Bb9 p""TGtG@Zk3="@ G4@pBCFWJp /䳠7@pBC9GWKtCz/zK@ =7@=" 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OBALSCTOR4!@ GLOBALSCTOR4G RETURN_VMS4 b# RETURN_VMS4@ RETURN_VMS4,Gp DECC$SIGNAL4db#P DECC$SIGNAL4l@p DECC$SIGNAL4pG DECC$SIGNAL4tb#P DECC$SIGNAL4/@ DECC$SIGNAL4G DECC$SIGNAL4b#P DECC$SIGNAL4@ DECC$SIGNAL4G DECC$SIGNAL4b#P DECC$SIGNAL4@ DECC$SIGNAL<GVMS_UNZIP_CMDLINE<b#PVMS_UNZIP_CMDLINE <@0VMS_UNZIP_CMDLINE4G DECC$STRLEN4b#P DECC$STRLEN4@ DECC$STRLEN4G ZSTRNICMP4b#P ZSTRNICMP4@ ZSTRNICMP4G ZSTRNICMP4b#P ZSTRNICMP4@ ZSTRNICMP41G DECC$STRNCMP4b#P DECC$STRNCMP4@ DECC$STRNCMP,$GHENVARGS,(b#PENVARGS,D@HENVARGS4LGh DECC$PERROR4Tb#P DECC$PERROR4d@h DECC$PERROR,GENVARGS,b#P2ENVARGS,@ENVARGS4G DECC$PERROR4b#P DECC$PERROR4@ DECC$PERROR, G ZI_OPTS, b#PZI_OPTS, @ ZI_OPTS4hG DECC$STRNCMP4lb#P DECC$STRNCMP4@ DECC$STRNCMP43 XGp DECC$STRCMP4db#P DECC$STRCMP4 l@p DECC$STRCMP4 G0 DECC$GSPRINTF4b#P DECC$GSPRINTF4,@0 DECC$GSPRINTF4G DECC$GSPRINTF4b#P DECC$GSPRINTF4@ DECC$GSPRINTF<GPROCE4SS_ZIPFILES<b#PPROCESS_ZIPFILES<@PROCESS_ZIPFILES4 G DECC$GSPRINTF4 b#x DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b#x DECC$GSPRINTF4 @ DECC$GSPRINTF4< GX DECC$GSPRINTF45@ b#x DECC$GSPRINTF4T @X DECC$GSPRINTF4 G DECC$GSPRINTF4 b#x DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b#x DECC$GSPRINTF4 @ DECC$GSPRINTF4G, VMSCLI_USAGE4b#x VMSCL6I_USAGE4(@, VMSCLI_USAGE40GP DECC$GSPRINTF44b#x DECC$GSPRINTF4L@P DECC$GSPRINTF4|G DECC$GSPRINTF4b#x DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#x DECC$GSPRINTF4@`Lȷ UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1 67 DECC$GSPRINTF4Gh DECC$GSPRINTF4 b#x DECC$GSPRINTF4d@h DECC$GSPRINTF4G DECC$GSPRINTF4b#x DECC$GSPRINTF4@ DECC$GSPRINTF4 G DECC$ISATTY4 b#x DECC$ISATTY4 @ DECC$ISATTY 48dG VMSCLI_USAGE4hb#x VMSCLI_USAGE4|@ VMSCLI_USAGE4tG DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4G  DECC$GSPRINTF4b#p DECC$GSPRINTF4@  DECC$GSPRINTF4,Gh DECC$GSPR9INTF40b#p DECC$GSPRINTF4d@h DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4$GP DECC$GSPRINTF40b#p: DECC$GSPRINTF4L@P DECC$GSPRINTF4tG DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b#p DECC$GSPRINTF4@ DECC$GSPRINTF4GH DECC$GSPRINTF4b#p DECC$GSPRINTF4D;@H DECC$GSPRINTF4hG DECC$GSPRINTF4lb#p DECC$GSPRINTF4@ DECC$GSPRINTF44Gd DECC$GSPRINTF4\b# DECC$GSPRINTF4`@d DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 ;<G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF,$G4VERSION,(b#VERSION,0@4VERSION44GX DECC$GSPRINTF48b# DECC$GSPRINTF4T@X DECC$GSPRINTF4xG DECC$GSPRINTF4|=b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G0 DECC$GSPRINTF4 b# DECC$GSPRINTF4,@0 DECC$GSPRINTF4PGx DECC$GSPRINTF4Tb# DECC$GSPRINTF>4t@x DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4 @ DECC$GSPRINTF40GD DECC$GETENV44b# DECC$GETENV4@@D D?ECC$GETENV4lG DECC$GSPRINTF4pb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GETENV4b# DECC$GETENV4@ DECC$GETENV4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 G@4 DECC$GETENV@ @4$b# DECC$GETENV40@4 DECC$GETENV4\Gx DECC$GSPRINTF4`b# DECC$GSPRINTF4t@x DECC$GSPRINTF4G DECC$GETENV4b# DECC$GETENV4@ DECC$GETENV4G DECC$GSPRINTF4Ab# DECC$GSPRINTF4@ DECC$GSPRINTF =Pp0p0Pp@0p@ Remember that non-lowercase filespecs must be quoted in VMSAB (e.g., "Makefile"). g g=0 ;=P0| 7G; DECC$GSPRINTF DECC$GETENV=X=%d `VERSION ;=0";=L G e5 VMSCLI_USAGE; DECC$ISATTY=-xC ZI_OPTS DECC$STRCMP VMS_UNZIP_CMDLINE DECC$STRLEN DECC$STRNCMPENVARGS DECC$SIGNAL=0 " ;=`8 7FNAMES7HANDLER ZSTRNICMP DECC$PERROR; PROCESS_ZIPFILES=-d=-Z=ii=D0";=0(  RETURN_VMS! GLOBALSCTOR=00";=P( 7DECC$$SHELL_HANDLER=# DECC$EXIT% DECC$MAIN=0";= `D ";=[-Z]  =vms.c== %Es =[none] =VMSCLI(= UNZIP_OPTS8= UNZIPOPTH= ZIPINFO_OPTSX= ZIPINFOOPTh=8*envargs: cannot get memory for arguments=0&caution: not extracting; -d ignored =verror: -d option used more than once (only one exdir allowed) error: must giva_ UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1wEFe decryption password with -P option 8=@1caution: both -n and -o specified; ignoring -o p=0#"-X" restore owner/protection info=(* or % (e.g., "*font-%.zip")=8+ "-M" page output through built-in "more" =0$UnZip special compilation options: =8) UnZip and ZipInfo environment options: @= %16s: G %s P=H=COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)=H;LZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)= TIMESTAMP=0& [decryption, version %d.%d%s of %s] = 05 May 2000=8/"-Z" => ZipInfo mode (`unzip "-Z"' for usage).H=PCerror: must specify directory to which to extract wHith -d option =XJerror: -Z must be first option for ZipInfo mode (check UNZIP variable?) =XMerror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid 0=XM unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS =XL "-M" pipe through "more" pager =ZipInfo %d.%d%d%s of %s, bIy Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s. usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] x=0& main listing-format options: -s short Unix "ls -l" format (def.) J -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format -v verbose, multi-page format =miscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal format %c-C%c be case-insensitive %s -x exclude filenames that follow from listing K=UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details. @ =Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.  =Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in liLst, except those in xlist, to exdir; file[.zip] may be a wildcard. %s  =YQ=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe   =@1 -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract fiMles into exdir %s ( =modifiers: -q quiet mode (-qq => quieter) -n never overwrite existing files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v be verbose/print version info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %s MN=Examples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer = show_version_info=uz_optsunzip=main=usageB B=*"??0 0 =14 January 2001i i O=QI note: didn't find end-of-central-dir signature at end of central dir. g g =OGerror: expected central file header signature not found (file #%lu). \ \ =D<error [%s]: attempt to seek before beginning of zipfile %sD D =,$caution: filename not matched: %s M M=5-caution: excluded filename not matched: %s = (please check that you havPe transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles) ( (=zipinfoC C=+#Compiled with %s%s for %s%s%s%s. g g=OGUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v. > >=.&%UNZIPCompaq C V6.2-003? ?= 4=TRANSFER$BREAK$GO# #= __iscntrQl =  = 44= main4=5-, K@ K@ K@ R@ $ $= 4: := 4=  =  4P4= unzip 4=nf ^@N ^@N ^@NB @4  @ @ @ @ @ @ @ @  AR A A A A A A A A A A A A A A A A A A A  A  W EA" EA" dA kA tA tA yA  A mA# A A mA, A A A A A AY mA7 mA9 mA A A A A A,$ $= S`4: := 4=  = 4x4= uz_opts4= A A A" A A A  A A  A A B   ,B :B  B B B B  B B B B B  BT B B B "C #C DC EC LC MC  AV' lB lBZ qC qC qC qC qC }C }C }C C C  CP$ $= h4: := 4=  & &= 4bS UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1:TUp4= usage4= D C C C C C D D D D D D D9 D #D 'D $ 8D$ $= d4: := 4=  = 44=show_version_info4=won ID ID ID L VD6:  #E% (E% (E%$ $= ,4 = @` `= 4 4= __main84: := 4=  =   ww1f~a02-007:: VMS_UNZIP_CLD02-00713-JAN-2001 19:00//OpenVMS Command Definition Utility A05W-148 8d De0i VMS_UNZIP_CLD S CoX CLI$TABLES  = X UNZI ,(Tl UNZIP4!)P1ZIPFILEZi=p file8a!(P2INFILEFiles to UnZip(BINARY$ =TEXT(4SCREEN(\ DIRECTORY(XFRESH=EN$HELP$JUNK$LIST$= BRIEF$8 FULL(`  OVERWRITE$ Q=UIET$ TEST$TYPE$PIPE(=PASSWORD(@ UPPERYCASE(hUPDATE(=VERSION(VERBOSE(RESTORE(C=OMMENT(a0EXCLUDE0`CASE_INSENSITIVE( L=OWERCASE$PAGE( YYZ_UNZIP(ZIPINFO,=`( Z INFORMATION4\!)P1ZIPFILEZip file<a!(P2IN=FILEFiles to display(ZIPINFO(ONE_LINE$ =SHORT(4MEDIUM$XLONG(VERBOSE=(HEADER(COMMENT( TOTALS[$= TIMES(aD EXCLUDE0t CASE_INSENSITIVE$= PAGE QUIET_MODIFIER$SUPER$CONVERT_KEYWORDS=$$AUTO$HALL$NONE= 0    4 \  =`X$ $ $ @ L   ww10la02-007OOVMS_UNZIP_CMDLINE02-00713-JAN-2001 19:01Compaq C V6.2-003  $ABS$i$CODE$6 $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$]X $READONLY$CLI_TEXT  CLI_TEXT_AUTO  CLI_TEXT_ALL  CLI_TEXT_NONE CLI_BINARY CLI_BINARY_AUTO CLI_BINARY_ALL CLI_BINARY_NONE(CLI_CASE_INSENSITIVE CLI_SCREEN  CLI_DIRECTORY CLI_FRESHENCLI_HELPCLI_JUNK  CLI_LOWERCASECLI_LIST CLI_B^RIEFCLI_FULL  CLI_OVERWRITE CLI_QUIET CLI_SUPER_QUIETCLI_TESTCLI_TYPECLI_PIPE  CLI_PASSWORD  CLI_UPPERCASE CLI_UPDATE CLI_VERSION CLI_RESTORE CLI_COMMENT CLI_EXCLUDE CLI_INFORMATION CLI_SHORT CLI_MEDIUMCLI_LONG CLI_VERBOSE_ CLI_HEADER CLI_TOTALS CLI_TIMES  CLI_ONE_LINECLI_PAGECLI_YYZ CLI_ZIPFILE CLI_INFILE  UNZIP_COMMAND DECC$FREE DECC$CALLOC DECC$MALLOC DECC$REALLOC DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCPY DECC$STRNCPY DECC$STRLENGUSAGE8Jp0`VMS_UNZIP_CMDLINE0J VMSCLI_USAGELIB$GET_FOREIGN LIB$GET_INPUTLIB$SIG_TO_RET STR$CONCAT(STR$FIND_FIRST_SUBSTRING0 CLI_TEXT0 CLI_TEXT_AUTO0 CLI_TEXT_ALL0 CLI_TEXT_NONE0 CLI_BINARY0 CLI_BINARY_AUTO0 aCLI_BINARY_ALL0 CLI_BINARY_NONE8 CLI_CASE_INSENSITIVE0  CLI_SCREEN0  CLI_DIRECTORY0  CLI_FRESHEN0 CLI_HELP0 CLI_JUNK0  CLI_LOWERCASE0 CLI_LIST0 b CLI_BRIEF0 CLI_FULL0  CLI_OVERWRITE0  CLI_QUIET0 CLI_SUPER_QUIET0 CLI_TEST0 CLI_TYPE0 CLI_PIPE0 CLI_PASSWORD0 ! CLI_UPPERCASE0 " CLI_UPDATE0c # CLI_VERSION0 $ CLI_RESTORE0 % CLI_COMMENT0 & CLI_EXCLUDE0 'CLI_INFORMATION0 ( CLI_SHORT0 ) CLI_MEDIUM0 *CLI_LONG0 + CLI_VERBOSE0 , CLI_HEADER0 -c.J UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1cd CLI_TOTALS0 . CLI_TIMES0 / CLI_ONE_LINE0 0CLI_PAG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ENT 4 H@L CLI$PRESENT4 hG CLI$PRESENT4 lb#p CLI$PRESENT4 |@ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 vb#p CLI$PRESENT4 @ CLI$PRESENT4 G  CLI$PRESENT4  b#p CLI$PRESENT4 @  CLI$PRESENT4 $G` CLI$PRESENT4 (b#p CLI$PRESENT4 \@` CLI$PRESENT4 dG CLI$PRESENT4 lb#p CLI$PREwSENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 b#p CLI$PRESENT4 G0 CLI$PRESENT4 ,@0 CLI$PRESENT4 <G` CLI$PRESENT4 Db#p CLI$PRESENT4 \@`x CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4G CLI$GET_VALUE4b#p CLI$GET_VALUE4@ CLI$GET_VALUE4 yG0 CLI$PRESENT4  b#p CLI$PRESENT4 ,@0 CLI$PRESENT4 xG CLI$PRESENT4 |b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENTz4  b#p CLI$PRESENT4 @ CLI$PRESENT4 G4 CLI$PRESENT4 $b#p CLI$PRESENT4 0@4 CLI$PRESENT4 XGh CLI$PRESENT4 \b#p CLI$PRESENT4 d@h CLI$PRESENT4 G CLI$PRESENT4 b#p CLI{$PRESENT4 @ CLI$PRESENT4G CLI$GET_VALUE4b#p CLI$GET_VALUE4@ CLI$GET_VALUE4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 (G< CLI$PRESENT4 ,b#p CLI$PRESENT4 8@|< CLI$PRESENT4 DGp CLI$PRESENT4 Hb#p CLI$PRESENT4 l@p CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 }H G\ CLI$PRESENT4 L b#p CLI$PRESENT 4 X @\ CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4 ` Gp CLI$PRE~SENT4 d b#p CLI$PRESENT4 l @p CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4  G0 CLI$PRESENT4  b#p CLI$PRESENT4 , @0 CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4 G\ DECC$REALLOC4< b#p DECC$REALLOC4X @\ DECC$REALLOC4 d G| DECC$FREE4 p b#p DECC$FREE4 x @| DECC$FREE4 G DECC$STRCPY4 b#p DECC$STRCPY4 @ DECC$STRCPY4 G DECC$REALLOC4 b#p DECC$REALLOC4 @ DECC$REALLOC4  G DECC$FREE4  b#p DECC$FREE4  @ DECC$FREE4 G DECC$STRNCPY4 b#p DECC$STRNCPY4 @ DECC$STRNCPY4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4 G CLI$GET_VALUE4 b#p CLI$GET_VALUE4 @ CLI$GET_VALUE4 GH DECeO UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1C$REALLOC4b#p DECC$REALLOC4D@H DECC$REALLOC4 PGh DECC$FREE4 `b#p DECC$FREE4 d@h DECC$FREE4|G DECC$STRNCPY4b#p DECC$STRNCPY4@ DECC$STRNCPY4G DECC$REALLOC4b#p DECC$REALLOC4@ DECC$REALLOC4 G  DECC$FREE4 b#p DECC$FREE4 @  DECC$FREE4G DECC$STRNCPY4b#p DECC$STRNCPY4@ DECC$STRNCPY4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4GH DECC$REALLOC4b#p DECC$REALLOC4D@H DECC$REALLOC4 PGh DECC$FREE4 `b#p DECC$FREE4 d@h DECC$FREE4G DECC$REALLOC4b#p DECC$REALLOC4@ DECC$REALLOC4G DECC$CALLOC4b#p DECC$CALLOC 4@ DECC$CALLOC4G  DECC$STRLEN4  b#p DECC$STRLEN4@  DECC$STRLEN4 G CLI$PRESENT4 b# CLI$PRESENT4 @ CLI$PRESENT4G  DECC$MALLOC4b# DECC$MALLOC4@  DECC$MALLOC4@GX CLI$GET_VALUE4Db# CLI$GET_VALUE4T@X CLI$GET_VALUE4|G DECC$REALLOC4b# DECC$REALLOC4@ DECC$REALLOCD GSTR$FIND_FIRST_SUBSTRINGDb#STR$FIND_FIRST_SUBSTRINGD @STR$FIND_FIRST_SUBSTRING4G CLI$GET_VALUE4b# CLI$GET_VALUE4@ CLI$GET_VALUE4 hG DECC$FREE4 pb# DECC$FREE4 |@ DECC$FREE4G OTS$INSV_VOL4@ OTS$INSV_VOL4 G CLI$PRESENT4 t#0 CLI$PRESENT4 @ CLI$PRESENT,(GdUSAGE,\b#USAGE,`@dUSAGE4pG DECC$GSPRINTF4tb# DECC$GSPRINTF4@ DECC$GSPRINTF4G  DECC$GSPRINTF4b# DECC$GSPRINTF4@  DECC$GSPRINTF40GT DECC$GSPRINTF44b# DECC$GSPRINTF4P@T DECC$GSPRINTF4xG DECC$GSPRINTF4|b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 G0 DECC$GSPRINTF4b# DECC$GSPRINTF4,@0 DECC$GSPRINTF4TGx DECC$GSPRINTF4Xb# DECC$GSPRINTF4t@x DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF =TEXT=BINARY=SCREEN= FRESHENHELP(=JUNK0=LIST8=BRIEF@=FULLH=QUIETP=TESTX=TYPE`=PIPEh=UPDATEp=8.VERSIONRESTORECOMMENTEXCLUDEZIPINFOSHORT=MEDIUM=LONG=VERBOSEHEADER=TOTALS=TIMES=PAGE=ZIPFILEINFILE=unzip = TEXT.AUTO= TEXT.ALL= TEXT.NONE = BINARY.AUTO0= BINARY.ALL@= BINARY.NONEP= CASE_INSENSITIVEh= DIRECTORYx= LOWERCASE= OVERWRITE= QUIET.SUPER= PASSWORD= UPPERCASE= ONE_LINE= YYZ_UNZIP  = Examples (see unzip.txt or "HELP UNZIP" for more info): unzip edit1 /EXCL=joe.jou /CASE_INSENSITIVE => extract all files except joe.jou (or JOE.JOU, or any combination of case) from zipfile edit1.zip unzip zip201 "Makefile.VMS" vms/*.[ch] => extract VMS Makefile and *.c and *.h files; must quote uppercase names if /CASE_INSENS not used unzip foo /DIR=tmp:[.test] /JUNK /TEXT /OVER => extract all files to temp. directory without paths, auto-converting text files and overwriting =Major options include (type unzip -h for Unix style flags): /[NO]TEST, /LIST, /[NO]SCREEN, /PIPE, /[NO]FRESHEN, /[NO]UPDATE, /[NO]COMMENT, /DIRECTORY=directory-spec, /EXCLUDE=(file-spec1,etc.) Modifiers include: /BRIEF, /FULL, /[NO]TEXT[=NONE|AUTO|ALL], /[NO]BINARY[=NONE|AUTO|ALL], /[NO]OVERWRITE, /[NO]JUNK, /QUIET, /QUIET[=SUPER], /[NO]PAGE, /[NO]CASE_INSENSITIVE, /[NO]LOWERCASE, /[NO]VERSION, /[NO]RESTORE =8/Type "unzip /ZIPINFO" for ZipInfo-mode usage.=Usage: unzip file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options /modifiers Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s = Type unzip "-Z" for Unix style flags Remember that non-lowercase filespecs must be quoted in f\ UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1H{VMS (e.g., "Makefile"). miscellaneous options: /HEADER print header line /TOTALS totals for listed files or for all /COMMENT print zipfile comment /TIMES times in sortable decimal format /[NO]CASE_INSENSITIVE match filenames case-insensitively /[NO]PAGE page output through built-in "more" /EXCLUDE=(file-spec1,etc.) exclude file-specs from listing = usage: zipinfo file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options or: unzip /ZIPINFO file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options main listing-format options: /SHORT short "ls -l" format (def.) /ONE_LINE just filenames, one/line /MEDIUM medium Unix "ls -l" format /VERBOSE verbose, multi-page format /LONG long Unix "ls -l" format  =6.ZipInfo %d.%d%d%s %s, by Newtware and the fine folks at Info-ZIP. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing * or % (e.g., "*font-%.zip").  =0;7DECC$GA___CTYPE=0";=`< 7G;P DECC$GSPRINTF= 14 January 2001x=;USAGE7UNZIPUSAGELINE1=0(#;=T  CLI$GET_VALUE DECC$MALLOC CLI$PRESENT DECC$FREE( STR$FIND_FIRST_SUBSTRING DECC$REALLOC=0 #;=00 7DECC$$SHELL_HANDLER=8 OTS$INSV_VOL7LIB$SIG_TO_RET;;;;;;=-d DECC$STRCPY DECC$CALLOC#;!;;/;=unzip);4;1;7 VMS_UNZIP_CLD+; ;; ; ;%;P DECC$STRNCPY;&;=0H#0;=d 3;2; ;7 LIB$GET_INPUT-;,;.;;; STR$CONCAT CLI$DCL_PARSE LIB$GET_FOREIGN(;*;';$;0;";=-xP DECC$STRLEN=-Ph;;;;;; = __iscntrl= VMSCLI_usage = get_list0= check_cli@=vms_unzip_cmdline< <=4< < =  4< < =4< < = 4< < =4< < =  4< <= 04< <= @4< <=P4< <=4< <= h4< <=4< <= 4< <=(4< <= x4< <=04< <=84< <=@4< < = 4< <=H4< <= 4< <=P4< <=X4< <=`4< < =4< <!= 4< <" =h4< <#=p4< <$=x4< <%=4< <&=4< <'=4< <(=4< <)=4< <*= 4< <+=4< <,=4< <-=4< <.=4< </=4< <0=4< <1= 4< <2=4< <3=4< <4=4J J=:21VMS_UNZIP_CMDLINECompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0= == 04p4=vms_unzip_cmdline04= `, `- !a a `6 `. a a a `/ `/ )a "a +a 1a 3a 3a 3a 7a  Ga Oa Ha Na Va Za Za \a ^a `a ba da fa ha ja la a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 4b  =b =b @b ab eb Pb cb db cb cb mb mb ob ob qb rb rb {b b ~b b bgS{ UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZIPCLI.AXP_OLB;1 b  b b b b b b b b b b b b b b b b b b b7 b b b b ,$ $= 4: := T4= PX X= 44=get_list4= b b b b b  c c c *c c c c c cg c c "c $c #c %c &c$ $c c@ c($ $= 4: := (4=  = 404= check_cli4=7/. 8c  8c  8c  Dc Dc$ $= 4: := 4=  = 44= VMSCLI_usage4=skj c |c c |c |c  c c  c ,$ $= X4: := 4=  =  ww.*[UNZIP542.VMS-BINARIES]UNZIPCLI.VAX_DECC_OLB;1+,&.=/ 4=>- O0123KPWO>56@la7#a89GHJ% Librarian A09-22+ v%av%a!< >C  8UNZIP! VMS_UNZIP_CLD&VMS_UNZIP_CMDLINE[ CENTSIGMSG& CLI_BINARY&CLI_BINARY_ALL&CLI_BINARY_AUTO&CLI_BINARY_NONE& CLI_BRIEF&CLI_CASE_INSENSITIVE& CLI_COMMENT& CLI_DIRECTORY& CLI_EXCLUDE& CLI_FRESHEN&CLI_FULL& CLI_HEADER&CLI_HELP& CLI_INFILE&CLI_INFORMATION&CLI_JUNK&CLI_LIST&CLI_LONG& CLI_LOWERCASE COMPILEDWITH ENDSIGMSGEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSGSEEKMSGUNZIPUNZIPUSAGELINE1& UNZIP_COMMANDUSAGEUZ_OPTS VERSIONDATE& VMSCLI_USAGE! VMS_UNZIP_CLD&VMS_UNZIP_CMDLINEZIPNFO__MAIN;CLI_LONGCLI_TYPE= REPORTMSG__MAIN_& CLI_LOWERCASE& CLI_MEDIUM& CLI_ONE_LINE& CLI_OVERWRITE&CLI_PAGE& CLI_PASSWORD&CLI_PIPE& CLI_QUIET& CLI_RESTORE& CLI_SCREEN& CLI_SHORT&CLI_SUPER_QUIET&CLI_TEST&CLI_TEXT& CLI_TEXT_ALL& CLI_TEXT_AUTO& CLI_TEXT_NONE& CLI_TIMES& CLI_TOTALS&CLI_TYPE& CLI_UPDATE COMPILEDWITH ENDSIGMSGEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSG1`#aV1.02UNZIPV1.013-JAN-2001 19:53DEC C V6.2-003lP%d fP[-Z] P Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). P"P" P-xP-dP-ZPiiD PExamples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer  Pmodifiers:  -q quiet mode (-qq => quieter) -n never overwrite existing files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v be verbose/print version info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %sd P -p extract files to pipe, no messages -l list files (short format) -f fr eshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract files into exdir %s  P=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe  P"-Z" => ZipInfo mode (`unzip "-Z"' for usage).& PUsage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in  xlist, to exdir; file[.zip] may be a wildcard. %s PLatest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites. PUnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.  PUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v. P05 May 2000P [decryption, version %d.%d%s of %s] PVMS CLIPTIMESTAMPPLZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)DPCOPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)=P[none]2P%16s: %s  P UnZip and ZipInfo environment options: P %s PUnZip special compilation options: P "-M" page output through built-in "more" Pmiscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal formh W4:S5,L"+=+a2~4 wݱ kR5aE)'3N|wR4tZV{ĶQE+)~.T)/X(Dh*ֻb^d͇:Af?n_% ֍r:>o6ML(f؇x>> *}x8sSR'[{./C -e=b{{`(SZ@w;ܠ$Рu$o3oYBIyE~ yڨYwcXe s9D DT+˟kv6g]v ~y.2"Z% 0Pz J'%E8}|@2g<)U"+&N՞v*+nKXv,yYo )-_ c@6'U:r{=) b>L⌒X|0\ulKĭ[Wbk0U~Tyؤ;7.a JPU؅DWI{.\csUɦOs[Y/;\>#0._XFo 62Bϔ>F"$.9s`$O53UM{i|Љ<p+t9:h*UZ9BAEY) qnkŰ[g_,qCQ! AXK' ~dR,AopyH*RuJq`/Qt߂x {URY#jVUH)3|ue E~Iv/B  3EʒSk:7h '' !{۴aE5 +o - G Qҫ`o%\/KiTWB9 hCR\f:Ei6Bp q2,7N{#h#0Mu$$vSr ӷ.AG?J6q˥uڜr"y^]S & nj,m|b(D_<4rnTJ U_UuEZce"[AzG|  }5oTW@s~ %'85+grilyFVU"~T3V UorN7zր2fv,Gs "ǭ,CS8v h6++]=Qej69}B'IRg*= *U%F}hh{ (gL{#k^C:Jj?gK^)-P!?Pl\LuF)P6 Sc!fe|ٚ>ZB r7igw/BaӅZ%d@u2]7q7\d#| Bb#>OMbDr9-LPЂWK鉹v2ۆ ܆%G;̚d;'T? jt"*oofgA:}0/}`gUC5a J"Gj3``$rEy +5 lxrBBC8{l&HQ%/j_D;2m`^/7o{Ovi1D6TDtƛɆ~mr+_e`74\~eVa,!:H96+T8uT1zaN"hnas@`2 `}*CP.8;goenC=cᬤjPRPkȎ|Xa,Q V0q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 4K{] +axy~ --.g@]S.5k&8E+< ފ%dᦖrs8͟Tv#a䁩^䇀8szRSo#1]֡9]:Lg U|w uc =OYTE v!lG@NV>1C(\zw~ΪB8{:enUD})òl}q Iy*0A%v%ObaVb&ĥqQP 6FB'jL\yxzu *Aƭ뭰-m&#W"86X2GXQؚx $^ [H^LD/rror: must giviZ UNZIP.BCK& O.[UNZIP542.VMS-BINARIES]UNZIPCLI.VAX_DECC_OLB;1=  at %c-C%c be case-insensitive %s -x exclude filenames that follow from listing P main listing-format options: -s short Unix "ls -l" format (def.) -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format -v verbose, multi-page format PZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s.  usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] P* or % (e.g., "*font-%.zip")xP "-M" pipe through "more" pager RP"-X" restore owner/protection infoP unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS Pvms.cPcaution: both -n and -o specified; ignoring -o Perror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid 6Perror: -Z must be first option for ZipInfo mode (check UNZIP variable?) Perror: must give decryption password with -P option Perror: -d option used more than once (only one exdir allowed) |Perror: must specify directory to which to extract with -d option VPcaution: not extracting; -d ignored ,Penvargs: cannot get memory for arguments!PZIPINFOOPTPZIPINFO_OPTS PUNZIPOPTPUNZIP_OPTS PCompiled with %s%s for %s%s%s%s.  Pzipinfo P (plea  MASK_BITS  VERSIONDATE  CENTSIGMSG  ENDSIGMSG SEEKMSG FILENAMENOTMATCHED EXCLFILENAMENOTMATCHED REPORTMSG ZIPNFO COMPILEDWITH UNZIPUSAGELINE1FNAMESG DECC$EXITVERSIONENVARGS VMSCLI_USAGEVMS_UNZIP_CMDLINE RETURN_VMS ZSTRNICMPHANDLERZI_OPTSPROCESS_ZIPFILESUZ_OPTSUNZIP GLOBALSCTOR DECC$ISATTY DECC$SIGNALse check that you have transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)  Pcaution: excluded filename not matched: %s Pcaution: filename not matched: %s Perror [%s]: attempt to seek before beginning of zipfile %sPerror: expected central file header signature not found (file #%lu). P note: didn't find end-of-central-dir signature at end of central dir. P14 January 2001P??P ^DECC$MAIN_ARGSS ^SR GLOBALSCTORݬݬUNZIPP RETURN_VMSS R DECC$EXITRP^UHANDLERSS DECC$SIGNALRbSbS bS b߬߬VMS_UNZIP_CMDLINEPRʏP RW1.PRѬRRGl3ݼ DECC$STRLENPRRPbPP]RRR R ZSTRNICMPP.eR ZSTRNICMPPѬZЬRݢ DECC$STRNCMPPCG3߬߬ENVARGSPR DECC$PERRORU߬߬ZI_OPTSPRBPG3ϕφ߬߬ENVARGSPRϜ DECC$PERRORP߬߬UZ_OPTSPRլRRW1ЬRbG3ЬGp3Gt3լ1SVRGx3ЬG3Rb1PG1b DECC$STRNCMPP1PRPPTbGSbG3RPPGp3SVbG3RPPGt3GP`PFRb bG6PG3 DECC$DSPRINTF<~PG3GG03P` W1T1բ RG3ìG3PPPGp31Gx3FNAMESG3Gp31qPVk b DECC$STRCMPPXVRG3FNAMESG3Gp3SbG3RPPGp3SRG3ìG3PPPGt3SRb1Gx3G6G3.ϷG3 DECC$DSPRINTF<~PG3GG03P`PROCESS_ZIPFILESPWWP^XSмWVW1fR1bRR-1 DECC$DSPRINTFYfRU1U-1p1UC1_UPPC7P1J?PS1PS SG 3P PG 3G 3S1G 31PS SG3P PG3G3S1G 3G3G 31hS G3S1XG31MPS G3S1<G311PS4G3 DECC$DSPRINTF<~PG3GG03P` T1G4G3 DECC$DSPRINTF<~PG3GG03P` T1]RGRP`P1WQWVfGfP`PP-nrG3 DECC$DSPRINTF<~PG3GG03P` T1P6P8G3 DECC$DSPRINTF<~PG3GG03P` T1bP1RbP1 PRbP1P1SGD3G3S1PGD3G31P VMSCLI_USAGEPT1^S G$3S1G$31PS SGH3P PGH3GH3S1|GH31rPS SG,3P PG,3G,3S1LG,31BPS GX3S10GX31%PS G03S1G031 PS SG43P PG43G43S1G431PS,G3G83P PG83 PG83S1G3G831PS4G3 DECC$DSPRINTF<~PG3GG03P` T1G31LRG3RP`P1WRWVfG3fP`PP-oχG3 DECC$DSPRINTF<~PG3GG03P` T1P6PLG3 DECC$DSPRINTF<~PG3GG03P` T1QbP1RbP1PRbP1PS SG83P PG83G83S1lG831bPS G<3S1PG<31EPS G@3S14G@31)PS GD3S1GD31 PS G,3S1G,31PS SGH3P PGH3GH3S1GH3 GH31PGH31PS GL3S1GL31P1S SGP3P PGP3GP3SiPGP3_S SGT3P PGT3GT3S=PGT33G3i<~PG3GG03P`XXU1}VWfR bPP-1ZG3G<30G3GD3 G<3GD3G39G031ϊG3 DECC$DSPRINTF<~PG3GG03P`XG 3G 3G3G3G43<G034vG3 DECC$DSPRINTF<~PG3GG03P`G43GX3 DECC$ISATTYPGX3WRWRXEWVGH3W ϦTcPGl3X XX VMSCLI_USAGEPTDPG3 G<3GH3GT3G@3G3G3WVTTPP^RլTPTG31Y fG3 DECC$DSPRINTFS cTPG3GG03P`G3cTPG3GG03P`""""G3cTPG3GG03P`G3cTPG3GG03P`1:d G3 DECC$DSPRINTFScTPG3GG03P`ufϰG3cTPG3GG03PjɽW UNZIP.BCK& O.[UNZIP542.VMS-BINARIES]UNZIPCLI.VAX_DECC_OLB;1=Vb`լ'qG3cTPG3GG03P`ψϗG3 DECC$DSPRINTFScTPG3GG03P`}""O""""φG3 cTPG3GG03P`G3cTPG3GG03P`լ PPP ^SG833<~lG3 DECC$DSPRINTFPG3GG03P`PRp/G3 DECC$DSPRINTF\lPG3GG03P`ϖG3lPG3GG03P`VERSIONϳG3lPG3GG03P`ϬG3lPG3GG03P`RG3lPG3GG03P`RRG3lPG3GG03P`R%G3lPG3GG03P`R韣q ϻG3lPG3GG03P`R+G3lPG3GG03P`ϠG3 DECC$DSPRINTFPG3GG03P`l DECC$GETENVPQa\ϔRQRRKyG3 DECC$DSPRINTFPG3GG03PR UNZIP mainG Punzipuz_optsa <usage7tshow_version_info] v2BA3 $3w 3w<    x4}      5e  4 3ù E 48$ DECC$STRLEN DECC$STRNCMP DECC$STRCMP DECC$DSPRINTF DECC$PERROR DECC$GETENV  __MAIN  MAIN PUNZIP UZ_OPTS <USAGEDECC$MAIN_ARGS$CODEr$DATA $ADDRESS_DATA" MASK_BITS VERSIONDATEG CENTSIGMSGI ENDSIGMSG<!SEEKMSG$FILENAMENOTMATCHED-EXCLFILENAMENOTMATCHED REPORTMSGZIPNFO# COMPILEDWITHGUNZIPUSAGELINE1`' DECC$GETENVPQa\DRQRR)G3 DECC$DSPRINTFPG3GG03P` DECC$GETENVPQa\RQRRϿG3 DECC$DSPRINTFPG3GG03P`ϝ DECC$GETENVPQa\ϤRQRR|ωG3 DECC$DSPRINTFPG3GG0 "3P`<P TTTTTTTTTTTTTLTT$TTTTTT(X\TTTT4PTT0hTTww1@-#a02-007+ VMS_UNZIP_CLD02-00713-JAN-2001 19:54-VAX/VMS Command Definition Utility (V4-001) VMS_UNZIP_CLDX CLI$TABLESP X UNZI ,(Tl UNZIP4!)P1ZIPFILEZip file8a#!(P2INFILEFiles to UnZip(BINARY$ TEXT(4SCREEN(\ DIRECTORY(FRESHEN$HELP$JUNK$LIST$ BRIEF$8 FULL(`  OVERWRITE$ QUIET$$ TEST$TYPE$PIPE(PASSWORD(@ UPPERCASE(hUPDATE(VERSION(VERBOSE(RESTORE(COMMENT(a0EXCLUDE0`CASE_INSENSITIVE( LOWERCASE$%PAGE( YYZ_UNZIP(ZIPINFO,`( INFORMATION4\!)P1ZIPFILEZip file<a!(P2INFILEFiles to display(ZIPINFO(ONE_LINE$ SHORT(4MEDIUM$XLONG(VERBOSE&(HEADER(COMMENT( TOTALS$ TIMES(aD EXCLUDE0t CASE_INSENSITIVE$ PAGE QUIET_MODIFIER$SUPER$CONVERT_KEYWORDS$$AUTO$HALL$NONE' 0    4   $ $ $ @ L  ww10"#a02-007@VMS_UNZIP_CMDLINE02-00713-JAN-2001 19:54DEC C V6.2-003 CLI_TEXT  CLI_TEXT_AUTO  CLI_TEXT_ALL  CLI_TEXT_NONE  CLI_BINARY CLI_BINAR(Y_AUTO CLI_BINARY_ALL CLI_BINARY_NONE CLI_CASE_INSENSITIVE CLI_SCREEN CLI_DIRECTORY  CLI_FRESHEN CLI_HELP CLI_JUNK  CLI_LOWERCASE CLI_LIST  CLI_BRIEF CLI_FULL  CLI_OVERWRITE  CLI_QUIET CLI_SUPER_QUIET CLI_TESTPExamples (see unzip.txt or "HELP UNZIP" for more info): unzip edit1 /EXCL=joe.jou /CASE_INSENSITIVE => extract all files except joe.jou )(or JOE.JOU, or any combination of case) from zipfile edit1.zip unzip zip201 "Makefile.VMS" vms/*.[ch] => extract VMS Makefile and *.c and *.h files; must quote uppercase names if /CASE_INSENS not used unzip foo /DIR=tmp:[.test] /JUNK /TEXT /OVER => extract all files to temp. directory without paths, auto-converting text files and overwriting <PMajor options include (type unzip -h for Unix style flags): /[NO]TEST, /LIST, /[NO]SCREEN, /PIPE, /[NO]FRESHEN, /[NO]*UPDATE, /[NO]COMMENT, /DIRECTORY=directory-spec, /EXCLUDE=(file-spec1,etc.) Modifiers include: /BRIEF, /FULL, /[NO]TEXT[=NONE|AUTO|ALL], /[NO]BINARY[=NONE|AUTO|ALL], /[NO]OVERWRITE, /[NO]JUNK, /QUIET, /QUIET[=SUPER], /[NO]PAGE, /[NO]CASE_INSENSITIVE, /[NO]LOWERCASE, /[NO]VERSION, /[NO]RESTORE PType "unzip /ZIPINFO" for ZipInfo-mode usage.HPUsage: unzip file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options /modifiers Default action is to extract files in list, exceptk\n UNZIP.BCK& O.[UNZIP542.VMS-BINARIES]UNZIPCLI.VAX_DECC_OLB;1=*+ those in xlist, to exdir; file[.zip] may be a wildcard. %s 8P14 January 2001P Type unzip "-Z" for Unix style flags Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). `Pmiscellaneous options: /HEADER print header line /TOTALS totals for listed files or for all /COMMENT print zipfile comment /TIMES times in sortable decimal format /[NO]CASE_INSENSITIVE match filenames case-insensitively /[NO]PAGE page output through built-in ,"more" /EXCLUDE=(file-spec1,etc.) exclude file-specs from listing P usage: zipinfo file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options or: unzip /ZIPINFO file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options main listing-format options: /SHORT short "ls -l" format (def.) /ONE_LINE just filenames, one/line /MEDIUM medium Unix "ls -l" format /VERBOSE verbose, multi-page format /LONG long Unix "ls -l" format P14 January 2001PZipInfo- %d.%d%d%s %s, by Newtware and the fine folks at Info-ZIP. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing * or % (e.g., "*font-%.zip"). P-xP-dP-PPunzip/PwwPunzip .PppPINFILE-PhhPZIPFILE,P ZZPYYZ_UNZIP+PUUPPAGE*PLLPONE_LINE.)PFFPTIMES(P??PTOTALS'P88PHEADER&P00PVERBOSE%P%%PLONG$PPMEDIUM#PPSHORT"PPZIPINFO!PPEXCLUDE PPCOMMENTPPRESTOREPPVERSIONPPUPDATEP PUPPERCASEPPPASSWORDPPPIPEPPTYPEPPTESTP /PQUIET.SUPERPPQUIETP POVERWRITEPPFULLPPBRIEFPPLISTP PLOWERCASEPPJUNKPPHELPPxxPFRESHEN P hhPDIRECTORY PaaPSCREEN PPPPCASE_INSENSITIVE P DDPBINARY.NONE P 88PBINARY.ALL CLI_TYPE CLI_PIPE  CLI_PASSWORD  CLI_UPPERCASE  CLI_UPDATE0  CLI_VERSION  CLI_RESTORE CLI_COMMENT ! CLI_EXCLUDE "CLI_INFORMATION # CLI_SHORT $ CLI_MEDIUM %CLI_LONG & CLI_VERBOSE ' CLI_HEADER ( CLI_TOTALS ) CLI_TIMES * CLI_ONE_LINE +CLI_PAGE ,CLI_YYZ - CLI_ZIPFILE . CLI_INFILE / UNZIP_COMMANDP ,,PBINARY.AUTOP$$PBINARYP PTEXT.NONEPPTEXT.ALLP PTEXT.AU1TOPPTEXTPլRDECC$GA___CTYPEQˏP@aPˏPRRP^Wǀ,ς ʏP1LIB$GET_FOREIGNVMS_UNZIP_CMDLINE102aV1.02UNZIPV1.013-JAN-2001 19:11VAX C V3.2-044 P??P14 January 2001P note: didn't find end-of-central-dir signature at end of central dir. Perror: expected central file header signature not found (file #%lu). Perror [%s]: attempt to seek before beginning of zipfile %sPcaution: filename not matched: %s Pcaution: excluded filename not matched: %s P (please check that you have transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles) PzipinfoPCompiled with %s%s for %s%s%s%s. PUNZIP_OPTS PUNZIPOPTPZIPINFO_OPTS!PZIPINFOOPT,Penvargs: cannot get memory for argumentsVPcaution: not extracting; -d ignored |Perror: must specify directory to which to extract with -d option Perror: -d option used more than once (only one exdir allowed) Perror: must give decryption password with -P option 5Perror: -Z must be first option for ZipInfo mode (check UNZIP variable?) Perror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid Pcaution: both -n and -o specified; ignoring -o Pvms.cP unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS QP"-X" restore owner/protection infotP "-M" pipe through "more" pager P* or % (e.g., "*font-%.zip")PZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group. List name, date/time, attribute, size, compression method, etc., about files in list (excluding those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing %s. usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...] P main listing-format options: -s short Unix "ls -l" format (def.) -1 filenames ONLY, one per line -m medium Unix "ls -l" format -2 just filenames but allow -h/-t/-z -l long Unix "ls -l" format  -v verbose, multi-page format Pmiscellaneous options: -h print header line -t print totals for listed files or for all -z print zipfile comment %c-T%c print file times in sortable decimal format %c-C%c be case-insensitive %s -x exclude filenames that follow from listing P "-M" page  output through built-in "more" PUnZip special compilation options: P %s P UnZip and ZipInfo environment options: (P%16s: %s 3P[none]:PCOPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)wPLZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)PTIMESTAMPPVMSCLIP [decryption, version %d.%d%s of %s] P05 May 2000PUnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v. PUnZip %d.%d%d%s of %s, by Info-ZIP. Maintained b y C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details. PLatest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.  PUsage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s  P"-Z" => ZipInfo mode (`unzip "-Z"' for usage). mʺ UNZIP.BCK O.[UNZIP542.VMS-BINARIES]UNZIPCLI.VAX_VAXC_OLB;12-   P=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe Y P -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment -x exclude files that follow (in xlist) -d extract files into exdir %s  Pmodifiers: -q quiet mode (-qq => quieter) -n never overwrite exis ting files -a auto-convert any text files -o overwrite files WITHOUT prompting -aa treat ALL files as text -j junk paths (do not make directories) -v be ve C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMUZ_OPTSUNZIPVERSIONENVARGS GLOBALSCTOR VMSCLI_USAGEVMS_UNZIP_CMDLINE RETURN_VMS  ZSTRNICMPHANDLERZI_OPTSPROCESS_ZIPFILESUZ_OPTSUNZIPISATTYSIGNALSTRLENSTRNCMPSTRCMPPERRORrbose/print version info %c-C%c match filenames case-insensitively %c-L%c make (some) names lowercase %-42s %c-V%c retain VMS version numbers %s9 PExamples (see unzip.txt for more info): unzip data1 -x joe => extract all files except joe from zipfile data1.zip %s unzip -fo foo %-6s => quietly replace existing %s if archive file newer PiiP-ZP-d P-x P"P"P Remember that non-lowercase filespecs must be quoted in VMS (e.g., "Makefile"). dP[-Z] jP%d P^ C$MAIN_ARGS GLOBALSCTORݬݬUNZIPP RETURN_VMSP^V Y RXHANDLERTTSIGNALScTcT cT c߬߬VMS_UNZIP_CMDLINEPSPSPSѬSSl޼TdSTRLENdPSSc]SSSS ZSTRNICMPP.fS ZSTRNICMPPѬTߦЬSݣSTRNCMPP=ߨ!ߨ߬߬ENVARGSPS ߨ,PERRORM߬߬ZI_OPTSPS:PԢߨ h߬߬ENVARGSPSߨ,PERRORP߬߬UZ_OPTSPSլSSPЬScЬpԢtլ1HUWPԢxЬœPSc1/Pb1ߦcSTRNCMPP1TSTcbUcœSQQpUW c SQQtbP`5Sccb)<~ߨ|SPRINTFPb1P` PT1գSœìœPPPpjPxiœԢpjPWSߦ cSTRCMPP@WSœ iœԢpUcœSQQpUS ìPPPtUSc1xb+„%<~ߨVSPRINTFPb1P`PROCESS_ZIPFILES^ RUYTмVWVX1VgS1Nc-1FSPRINTFZgPPQPSaV1V-11VC1VPPC7P1u?PT1jPTT PPQQQ T1L֢ 1EPTTPPQQQT1(բ ֢Ԣ 1PTԢT1 1TԢT11T)<~ߥ|SPRINTFPb1P` Pb*<~ſSPRINTFPb1P` PSbSP`gX9XWgbbP`-R<~ߥ|SPRINTFPb1P` P<~ߥ|SPRINTFPb1P` Pc1Sc1Sc1 P1T ԢDԢT1D1 VMSCLI_USAGET Ԣ$T1P$1TTHPPQQQHT1֢H1PTT,PPQQQ,T1֢,1}PTԢXT1oX1hTԢ0T1[Ў01TTT4PPQQQ4T18֢411PT Ԣ8PPQQQ8T1 81T*<~SPRINTFPb1P` Pբ1SSP`jX;XWggP`-T<~SPRINTFPb1P` P<~SPRINTFPb1P` Pc1ISc1@Sc16PTT8PPQQQ8T1֢81PTԢ VMSCLI_USAGE VMS_UNZIP_CLD>VMS_UNZIP_CMDLINE!)P1ZIPFILEZip file8a!(P2INFILEFiles to UnZip(BINARY$ TEXT(4SCREEN(\ DIRECTORY(FRESHEN$HELP$JUNK$LIST$ BRIEF$8 FULL(`  OVERWRITE$ QUIET$ TEST$TYPE$PIPE(PASSWORD(@ UPPERCASE(hUPDATE(VERSION(VERBOSE(RESTORE(COMMENT(a0EXCLUDE0`CASE_INSENSITIVE( LOWERCASE$PAGE( YYZ_UNZIP(ZIPINFO,`( INFORMATION4\!)P1ZIPFILEZip file<a!(P2INFILEFiles to display(ZIPINFO(ONE_LINE$ SHORT(4MEDIUM$XLONG(VERBOSE(HEADER(COMMENT( TOTALS$ TIMES(aD EXCLUDE0t CASE_INSENSITIVE$ PAGE QUIET_MODIFIER$SUPER$CONVERT_KEYWORDS$$AUTO$HALL$NONE 0    4   $ $ $ @ L  ww1X|*a02-007@VMS_UNZIP_CMDLINE02-00713-JAN-2001 19:11VAX C V3.2-044PPTEXTPP PTEXT.AUTOP PPTEXT.ALLPP PTEXT.NONEPP"PBINARYP"P )PBINARY.AUTOP)P 5PBINARY.ALLP5 P @PBINARY.NONE P@!PLPCASE_INSENSITIVE!PL"P]PSCREEN"P]#P dPDIRECTORY#Pd$PnPFRESHEN$Pn%PvPHELP%Pv&P{PJUNK&P{'P PLOWERCASE'P(PPLIST(P)PPBRIEF)P*PPFULL*P+P POVE!RWRITE+P,PPQUIET,P-P PQUIET.SUPER-P.PPTEST.P/PPTYPE/P0PPPIPE0P1PPPASSWORD1P2P PUPPERCASE2P3PPUPDATE3P4PPVERSION4P5PPRESTORE5P6PPCOMMENT6P7PPEXCLUDE7P8PPZIPINFO8P9PPSHORT9P:P PMEDIUM:P ;PPLONG;P<"PPVERBOSE<P=P!PHEADER=P!>P(PTOTALS>P(?P/PTIMES?P/@P5PONE_LINE@P5AP>PPAGEAP>BP CPYYZ_UNZIPBPCCPMPZIPFILECPMDPUPINFILEDPUEP\Punzip EP\cPunzipiP-PlP-doP-xrPZipInfo %d.%d%d%s %s, by Newtware and the fine folks at Info-ZIP. List name, date/time, attribute, size, compression method, etc., about files in list (exclud#ing those in xlist) contained in the specified .zip archive(s). "file[.zip]" may be a wildcard name containing * or % (e.g., "*font-%.zip"). P14 January 2001P usage: zipinfo file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options or: unzip /ZIPINFO file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options main listing-format options: /SHORT short "ls -l" format (def.) /ONE_LINE just filenames, one/line /MEDIUM medium Unix "ls -l" format /VERBOSE verbos$e, multi-page format /LONG long Unix "ls -l" format 5Pmiscellaneous options: /HEADER print header line /TOTALS totals for listed files or for all /COMMENT print zipfile comment /TIMES times in sortable decimal format /[NO]CASE_INSENSITIVE match filenames case-insensitively /[NO]PAGE page output through built-in "more" /EXCLUDE=(file-spec1,etc.) exclude file-specs from listing P Type unzip "-Z" for Unix style flags Remember that non-lowercase filespecs must% be quoted in VMS (e.g., "Makefile").  P14 January 2001PUsage: unzip file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options /modifiers Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. %s PType "unzip /ZIPINFO" for ZipInfo-mode usage.PMajor options include (type unzip -h for Unix style flags): /[NO]TEST, /LIST, /[NO]SCREEN, /PIPE, /[NO]FRESHEN, /[NO]UPDATE, /[NO]COMMENT, /DIRECTORY=directory-spec, /EXCLUDE=(&file-spec1,etc.) Modifiers include: /BRIEF, /FULL, /[NO]TEXT[=NONE|AUTO|ALL], /[NO]BINARY[=NONE|AUTO|ALL], /[NO]OVERWRITE, /[NO]JUNK, /QUIET, /QUIET[=SUPER], /[NO]PAGE, /[NO]CASE_INSENSITIVE, /[NO]LOWERCASE, /[NO]VERSION, /[NO]RESTORE PExamples (see unzip.txt or "HELP UNZIP" for more info): unzip edit1 /EXCL=joe.jou /CASE_INSENSITIVE => extract all files except joe.jou (or JOE.JOU, or any combination of case) from zipfile edit1.zip unzip zip201 "Makefile.VMS" vms' C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRM VMS_UNZIP_CLD CLI$GET_VALUE CLI$PRESENT CLI$DCL_PARSESTR$FIND_FIRST_SUBSTRING STR$CONCATLIB$SIG_TO_RET LIB$GET_INPUTLIB$GET_FOREIGN LIB$ESTABLISHUSAGESTRLENSTRNCPYSTRCPYSPRINTFREALLOC/*.[ch] => extract VMS Makefile (and *.c and *.h files; must quote uppercase names if /CASE_INSENS not used unzip foo /DIR=tmp:[.test] /JUNK /TEXT /OVER => extract all files to temp. directory without paths, auto-converting text files and overwriting P|^VBϐ PRP}LIB$GET_FOREIGNePt?eP1*T1#ePRR3--bR& ePRRbePRRb CLI$PRESENTUePRR3--aR&ePRRaePRRa" CLI$PRESENTPRR-R*c# CLI$PRESENTPRR# CLI$GET_VALUEPR$ CLI$PRESENTUePRR-Rf%ePRPh&ePRR-Rj(ePRP*ePvPl+ CLI$PRESENTPRRnRo1 CLI$PRESENTPRR1 CLI$GET_VALUEPR0 CLI$PRESENTUePRRp,ePRPq-ePRRq. CLI$PRESENTUePRR-Rt'ePRR-R+L2ePRR-RU3ePRR-Ru4ePRR-RV5ePRR-RX6ePRR-Rz! CLI$PRESENTUePRR-RCAePRR-RM7ePRˏRSUSUPPTSSWCЭTSSѭ2ЭSݭݭREALLOCPS SFREE<$PDSTRCPY >=.&%CRC32Compaq %C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= crc3204=PHG =  =  ,= 1= 0= 0= 6= $ $= `4: :=  4=  = & ww10aV1.0BBCRCTABV1.013-JAN-2001 19:08Compaq C V6.2-003x x $ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$@ $READONLY$ DECC$FREE DECC$MALLOCDECC$GA___CTYPE0J0FREE_CR'C_TABLE0JX0 GET_CRC_TABLE =Gk/;F!0@!.!J$Dk;4G6#"^([~^GG0b@Zk"_&GGG R"GG/5aJ4B6JUFuF7J6JWFF9K6 KYFG;AK6`K[F[G0 @0B"q1"G]] #k/k//8;4G/#^([~^GGG0b@Zk8G]] #k4L(Gl DECC$MALLOC4db#X DECC$MALLOC4h@l DECC$MALLOC4LGp DECC$FREE4hb# DECC$FREE4l@p DECC$FREE8 8=0;7DECC$GA___CTYPE=0 0;= 0 @ DECC$FREE;)=0"0;= 0  DECC$MALLOC$ $=  =make_crc_table= __iscntrl =free_crc_table0=get_crc_table? ?=/'&CRCTABCompaq C V6.2-003~ ~= 44= __iscntrl4= * N N= 4,4= 0( (=$make_crc_table =  = 04X4= get_crc_table04= = q=W = q=S q=S q= w= x= y=< y= w= w=S = = = $ $= d4B B= se4= =+ =/v44= D4= L4= d4= 4= xN N= 4$4=  = 044=free_crc_table04=:21 = = = = = $ $= d4: :=  ,4= `D DL44 =  ww1ߚ*aV1.0AACRYPTV1.013-JAN-2001 19:08Compaq C V6.2-003p p $ABS$i$CODE$ $LITERAL$P$LINK$$DATA$$BSS$ $READONLY_ADDR$X $READONLY-$ DECC$FREE DECC$MALLOCDECC$GA___CTYPE DECC$STRCPY DECC$STRLENG UNDEFER_INPUT DEFER_LEFTOVER_INPUTREADBYTESTR2OEM0J00 DECRYPT_BYTE0JP UPDATE_KEYS0JH INIT_KEYS(JDECRYPT  =Gk/;F!0@!.!J$Dk;.!T D8 D0L0 Hk/Gp&/Sȓ@F2AJAJFUBFʳS_FBʳvRBVBVBVBV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` ﷹ6R^Y|DXє Y/PaFxEf|&SpNz[,tw,5R2(V.~oӉVC֊i fnHc0g˛:H6KxP`iY"Xeʔ@۰@Jw,2>'jW^?d V ngCUKF;(s<qJrʈD+Klet%2.ɛCTP~Z@ U,}ɝaڒK'`vT{8x9,k:IJ[c`G]}߁cK7&}SOl,{i:v ieth%M5ˌ]L0uXiœ r6sssʰi]b)3k|/p}G'2 U=:)|GIٍ~%۸ݱ4’CMYs&y[LR9V$Oqb#uΣؑRb9&Pc6wC7Bh&%ӭb7OY o;'oY,ө4J"K[`  qs tJMYo-'wz\n2k<9ty0הr8! hz=Y6+^|P9%IgGGO#7G".L; `j NpzXѫ +rӾ jR?<΂ )o6u>`?xj%^iØvjjמvM>=©G|je7sx+oT(,\㊖B&{<A:疁]a-a"__\2tIZthRnm`>NrMz3|Gu^7%ŷNvH;WlFp%k\$n٧5J7!K͎N[_W+oIZv9„G4P'*I!=:syo*׉% RVr8\vr_0󧜤ԭLiij-0)|w_{9 MljZ*fp##pp:-!ˇaSd m$II W½hJDGf.&BžabtҀfY a9ݞ(z:xaJpfp0kth}} UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1124 @READBYTE4DGT UNDEFER_INPUT4Lb# UNDEFER_INPUT4P@T UNDEFER_INPUT4XG DECC$STRLEN4\b# DECC$STRLEN4@ DECC$STRLEN4G DECC$MALLOC4b# DECC$MALLOC4@ DEC3C$MALLOC4 G DECC$STRCPY4b# DECC$STRCPY4 @ DECC$STRCPY4G DECC$FREE4b# DECC$FREE4@ DECC$FREE4hG DECC$MALLOC4lb# DECC$MALLOC4|@ DECC$MALLOC40G4L DECC$FREE44b# DECC$FREE4H@L DECC$FREE4G DECC$STRLEN4b# DECC$STRLEN4@ DECC$STRLEN4G DECC$MALLOC4b# DECC$MALLOC4@ DECC$MALLOC,GSTR2OEM,5b#STR2OEM,@STR2OEM4G0 DECC$FREE4b# DECC$FREE4,@0 DECC$FREE =0;7DECC$GA___CTYPE=0P;7G=00;G e5=0 ;= < =0"`6;=0  =0"`;=@0  DECC$MALLOC DECC$STRLEN DECC$FREESTR2OEM=0 ";=`,|  READBYTE DEFER_LEFTOVER_INPUT DECC$STRCPY UNDEFER_INPUT = __iscntrl= update_keys = decrypt_byte70= init_keys@=testkeytestpP=decrypt> >=.&%CRYPTCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0{ {= 0404= decrypt_byte04=8 ?: := H4=  = P44= update_keysP4=-%$ ? ? ?$ $= T4: := 4=  = 4H4= init_keys4=B:9 &? "? &? "? *? )?$ $= 9,4: := l4= K K= 44= decrypt4= @  @  @@ @ @ @ @ @ @ )@ )@ )@_ 0@( 5@ 9@ ;@ =@ ;@ >@ >@$ $= 4: := @4=:  = `44= testp`4=RJI h@ U@ U@ U@ h@ s@ ,$ $= 4: := 44= S S= `4h4= testkey`4= @  @ 0 ? @ @ ? ? @ ? ? @; @ @ @ @b @ @ @ @ ? ? ? @ @ @$ $= 4B B= re4= @ =/v4= 4= 4= 4= 4= XB B= re4= @} }= <v4= 4= 4= ,: := 4= l lI44 =  ww1&aV1.0CCEXTRACTV1.013-JAN-2001 19:08Compaq C V6.2-003  =$ABS$i%$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$` $READONLY$0TRUNCEAS8 TRUNCNTSD DECC$FREE DECC$MALLOC DECC$GA_STDINDECC$GA_STDOUT DECC$GSPRINTF DECC$FGETSDECC$GA___CTYPE DECC$STRNCMP DECC$STRLEN DECC$LSEEK DECC$READ> LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGG PROCESS_CDIR_FILE_HDR PROCESS_LOCAL_FILE_HDR OPEN_OUTFILE UNDEFER_INPUT DEFER_LEFTOVER_INPUTREADBUFREADBYTEFLUSHCHECK_FOR_NEWER DO_STRINGMAKEWORDMAKELONG8J0EXTRACT_OR_TEST_FILES0JX! MEMEXTRACT0J(`$?MEMFLUSH0J%FNFILTERINFLATEMATCHC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,/@MATCH4!GH DECC$STRNCMP4"b# DECC$STRNCMP4!D@H DECC$STRNCMP4TG DECC$GSPRINTF4Xb# DECC$GSPRINTF4|@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRWINTF4b# DECC$GSPRINTF4G  DECC$GSPRINTF4@  DECC$GSPRINTF4<b# DECC$GSPRINTF4XGt DECC$GSPRINTF4p@t DECC$GSPRINTF4b# DECC$GSPRINTF4G DECC$GSPRINTF4@ DECC$GSPRINTF4XGX DECC$GSPRINTF 4\b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4DGp DECC$GSPRINTF4Hb# DECC$GSPRINTF4l@p DECC$GSPRINTF4'G DECC$LSEEK4(Yb# DECC$LSEEK4'@ DECC$LSEEK4G DECC$READ4 b# DECC$READ4@ DECC$READ4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF,)GREADBUF,*b#READBUF,)Z@READBUF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4! G DECC$STRNCMP4" b# DECC$STRNCMP4! @ DECC$STRNCMP4$ GP DECC$GSPRINTF4, b# DECC$GSPRINTF4L @P DECC$GSPRINTF4[| G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4' G@ DECC$LSEEK4( b# DECC$LSEEK4'< @@ DECC$LSEEK4@ Gd DECC$READ4 D b# DECC$READ4` @d DECC$READ,) G READBUF\,* b#READBUF,) @ READBUF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4! G@ DECC$STRNCMP4"$ b# DECC$STRNCMP4!< @@ DECC$STRNCMP4@ Gp DECC$GSPRINTF4P b# DECC$GSPRINTF4]l @p DECC$GSPRINTF< G PROCESS_LOCAL_FILE_HDR< b#PROCESS_LOCAL_FILE_HDR< @ PROCESS_LOCAL_FILE_HDR4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4# G DO_STRING4$ b# DO_STRING4# ^@ DO_STRING4 b# DECC$GSPRINTF4@ G\ DECC$GSPRINTF4X @\ DECC$GSPRINTF4% G DECC$FREE4& b# DECC$FREE4% @ DECC$FREE4# G DO_STRING4$ b# DO_STRING4# @ DO_STRING4wqr UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1Es^_ b# DECC$GSPRINTF4 G DECC$GSPRINTF4 @ DECC$GSPRINTF,+, GH MAPNAME,,0 b#MAPNAME,+D @H MAPNAME45` Gt CHECK_FOR_NEWER46d b#CHECK_FOR_NEWER45p @t CHECK_FOR_NEWER4G DECC$GSPRINTF4`b# DECC$GSPRINTF 4@ DECC$GSPRINTF4@G\ DECC$FGETS4Hb# DECC$FGETS4X@\ DECC$FGETS4\G DECC$GSPRINTF4hb# DECC$GSPRINTF4|@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRaINTF4@ DECC$GSPRINTF4@G` DECC$GSPRINTF4Db# DECC$GSPRINTF4\@` DECC$GSPRINTF4G DECC$FGETS4b# DECC$FGETS4@ DECC$FGETS43G DECC$STRLEN44b# DECC$STRLEN43@b DECC$STRLEN,+GMAPNAME,,b#MAPNAME,+@MAPNAME4b# DECC$GSPRINTF48GX DECC$GSPRINTF4T@X DECC$GSPRINTF4'G  DECC$LSEEK4(b# DECC$LSEEK4'@  DECC$LSEEK4 G@ DECC$cREAD4 ,b# DECC$READ4<@@ DECC$READ4hG DECC$GSPRINTF4lb# DECC$GSPRINTF4@ DECC$GSPRINTF4%G DECC$FREE4&b# DECC$FREE4%@ DECC$FREE4%G DECC$FREE4&b#d DECC$FREE4%@ DECC$FREE4GH DECC$GSPRINTF4 b# DECC$GSPRINTF4D@H DECC$GSPRINTF4%G DECC$FREE4&b# DECC$FREE4%@ DECC$FREE4G DECC$GSPRINTF4b# DECC$GSPRINTF4e@ DECC$GSPRINTF4%G0 DECC$FREE4&$b# DECC$FREE4%,@0 DECC$FREE4<G DECC$GSPRINTF4Db# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTFf4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF44Gh DECC$GSPRINTF48b# DECC$GSPRINTF4d@h DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DgECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4b# DECC$GSPRINTF4PG\ DECC$GSPRINTF4X@\ DECC$GSPRINTF4b# DECC$GSPRINTF4G( DECC$GSPRINTF4$@( DECC$GSPRINTF4\b# DECC$GSPRINTF4Gh DECC$GSPRINTF4@ DECC$GSPRINTF 4b# DECC$GSPRINTF4DG\ DECC$GSPRINTF4X@\ DECC$GSPRINTF,GMAPATTR,b#MAPATTR,@MAPATTR4XG| DECC$GSPRINTF4hb#P DECC$GSPRINTF4x@i| DECC$GSPRINTF4G OPEN_OUTFILE4b#P OPEN_OUTFILE4@ OPEN_OUTFILE4G OPEN_OUTFILE4b#P OPEN_OUTFILE4@ OPEN_OUTFILE<GDEFER_LEFTOVER_INPUT<b#PDEFER_LEFTOVER_INPUT<@DEFER_LEFTOVEjR_INPUT4G DECC$GSPRINTF4b#P DECC$GSPRINTF4@ DECC$GSPRINTF, GINFLATE, b#PINFLATE, @INFLATE4HGt DECC$GSPRINTF4\b#P DECC$GSPRINTF4p@t DECC$GSPRINTF4G DECC$GSPRINTFk4b#P DECC$GSPRINTF4@ DECC$GSPRINTF4b#P DECC$GSPRINTF4,G@ DECC$GSPRINTF4<@@ DECC$GSPRINTF4`Gp UNDEFER_INPUT4db#P UNDEFER_INPUT4l@p UNDEFER_INPUT4G$ DECC$GSPRINTF4b#P DlECC$GSPRINTF4 @$ DECC$GSPRINTF4 GREADBYTE4b#PREADBYTE4 @READBYTE,GFLUSH,b#PFLUSH,@FLUSH,G$FLUSH,b#PFLUSH, @$FLUSH4(mG< CLOSE_OUTFILE4,b#P CLOSE_OUTFILE48@< CLOSE_OUTFILE4Db#P DECC$GSPRINTF4tG DECC$GSPRINTF4@ DECC$GSPRINTF4b#P DECC$GSPRINTF4 G( DECC$GSPRINTF4$ @( DECC$GSPRINTF4L Gp DECC$GSPRINTF4xM~\ UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1tmn\ b#P DECC$GSPRINTF4l @p DECC$GSPRINTF4 G DECC$GSPRINTF4 b#P DECC$GSPRINTF4 @ DECC$GSPRINTF4 G! DECC$GSPRINTF4 b#P DECC$GSPRINTF4!@! DECC$GSPRINTF48!GH! UNDEFER_INPUT48 > >  >' >  > > > > > > > > >y'f > J? >: > r? > >  > >| > > > ?  =? E?( I? K? L?( R? T? U? >v > > > > > ?  - g? h?m i?e r?  q?  r?  q?  q?  }? ? ? ? ? ? ? ? ? ? ? ? ? ?yՆ UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1j|} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?܂ ? ? ? ? ? ? ?! "@ B@ %@q @ @ @ @ @ @ @ @" @ @ @ @ @ B@ B@ (@H~ C@@e @ %A &A p? OA RA >t RA SA >\ .A 0Af A A A A A A A8 A  A A A  A A A A A A AS A A A A A A L }?:$ $= 4: := d4=  = 44= store_info4=$ A& 'B &B  (B +B /B  ;B 9B 9B :B 9B ;B  MB MB MB NB WB WB XB WB WB WB gB hB gB hB rB($ $= 4: := 4=  = #4P4=$extract_or_test_member4= B B' B  B B B B  B  B B B  B  B B B B4 B YC ZC [C cC cC B B B0 BR BR  B B B B B B B C C Cy C C C C C C C C C C4$ $= 4: := L!4= r r= !4X4= memextract!4=  D  D D  D D  D D D D D D D D D D D D D D D D E E$ $= !4: := P$4=  = `$4(4=memflush`$4=_WV E E E E  E E E E $E$ $= $4N N= $4$4=  = %44=fnfilter%4=80/ 7E 0E  AE 7E$ $= %4: := %4=  =  ww1:aV1.0BBFILEIOV1.013-JAN-2001 19:08Compaq C V6.2-003  $ABS$i$CODE$8 $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$ISO2OEMOEM2ISO0J UZPMESSAGEPRNT0Jx UZPINPUT0J  UZPMOREPAUSE0J  UZPPASSWORD DECC$FREE DECC$MALLOCDECC$GA_STDERRDECC$GA_STDOUT DECC$FFLUSH DECC$GFPRINTF DECC$GSPRINTF DECC$PUTC DECC$FILENO DECC$TOLOWERDECC$GA___CTYPE DECC$STRLEN DECC$ISATTY DECC$LSEEK DECC$OPEN DECC$READ DECC$WRITEG0J0OPEN_INPUT_FILE0Jp UNDEFER_INPUT8J `DEFER_LEFTOVER_INPUT(JREADBUF0J00READBYTE(J HANDLER0J p DO_STRING0Jx0MAKEWORD0JhPMAKELONG(JPSTR2OEM0J ZSTRNICMPFNFILTER RETURN_VMS SCREENSIZESCREENLINEWRAP( OEM2ISOSEEKMSG REPORTMSG DECRYPT_BYTE UPDATE_KEYSECHOTT_GETCHGETP( ISO2OEMOTS$MOVE =Gk/;F!0@!.!J$Dk#0{"~G^G ^G(~0GG({ [(b&@Zk("Bb#$ tG1"C=0"A1"@Zk}(=[G"G@Zk4GGG/] ](}0@#k//8;&0a qBaːB6BвȐk k;&0A 2B`@p?DArB12BP0pa0rBka0pBk//#~^^> ~(08G- GGG $8B@b&%&1 _"tG@Zk%$!"$ 1"!E&G&GrXBR@FG$@@Zku@B0CG]] }(08@#k= $C(bHB/Pb$ʥG4G@ZkE GG"GG@ZkG# ~^^ ~(08GGx{#$cÔC @21@B᳔C\/aB!.`b _"tG@Zk#$ L/!Bb=4G@Zk}x"[G"G@ZkBb4G4G@ZkBbtG4G@Zk$ b# " A_Ӵ&բȕ%1B/0B8bG@ZkD. B(b4GDJRDJD/sHDSF D>@ZkG%1@#$!01BQ./QJ1"!G]] }(08@#kۦX#~^^~ (0޴8@H>P^X~`hGGGGGG2BG G 0`F G`<F G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ZkD$,$HD#.%1@@ #Jc  GG]]} (0ݤ8@P#kGk.¦"(BPJJ0bFB7/7K4G@Zk,H," (BPH!J0b'HF1@4GA.AJ @Zk H @ 4Dd,dH gH @ 4D4/dGx DECC$OPEN40hb# DECC$OPEN4/t@x DECC$OPEN4 |G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4G< DECC$READ4b# DECC$READ48@< DECC$READ4tGOTS$MOVE4@OTS$MOVE4G DECC$STRLEN4b# DECC$STRLEN4@ DECC$STRLEN4G DECC$READ4b#0 DECC$READ4@ DECC$READ4G DECC$STRLEN 4b#0 DECC$STRLEN4@ DECC$STRLEN,G(ECHO,b#0ECHO,$@(ECHO4(G< RETURN_VMS4,b#0 RETURN_VMS48@< RETURN_VMS4-G DECRYPT_BYTE4.b#0 DECRYPT_BYTE4-@ DECRYPT_BYTE4+G UPDATE_KEYS4,b#0 UPDATE_KEYS4+@ UPDATE_KEYS4)G  SCREENSIZE4* b# SCREENSIZE4)@  SCREENSIZE4%$GX DECC$PUTC4&,b# DECC$PUTC4%T@X DECC$PUTC4XGl DECC$FFLUSH4\b# DECC$FFLUSH4h@l DECC$FFLUSH4G DECC$ISATTY4 b# DECC$ISATTY4@ DECC$ISATTY4G DECC$ISATTY4 b# DECC$ISATTY4@ DECC$ISATTY4%G DECC$PUTC4&b# DECC$PUTC4%@ DECC$PUTC4G0 DECC$FFLUSH4 b# DECC$FFLUSH4,@0{- UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1 DECC$FFLUSH4'pGSCREENLINEWRAP4(tb#SCREENLINEWRAP4'|@SCREENLINEWRAP4#G DECC$FILENO4$b# DECC$FILENO4#@ DECC$FILENO4!G( DECC$WRITE4" b# DECC$WRITE4!$@( DECC$WRITE4(GP DECC$FFLUSH4,b# DECC$FFLUSH4L@P DECC$FFLUSH4#G DECC$FILENO4$b# DECC$FILENO4#@ DECC$FILENO4!G DECC$WRITE4"b# DECC$WRITE4!@ DECC$WRITE4G DECC$FFLUSH4b# DECC$FFLUSH4@ DECC$FFLUSH4G DECC$ISATTY4 b# DECC$ISATTY4@ DECC$ISATTY4G DECC$ISATTY4  b# DECC$ISATTY4 @ DECC$ISATTY4# G( DECC$FILENO4$ b# DECC$FILENO4#$ @( DECC$FILENO4!( GD DECC$WRITE4", b# DECC$WRITE4!@ @D DECC$WRITE4D Gd DECC$FFLUSH4L b# DECC$FFLUSH4` @d DECC$FFLUSH4 G0 DECC$GFPRINTF4( b# DECC$GFPRINTF4, @0 DECC$GFPRINTF44 GT DECC$GFPRINTF4< b# DECC$GFPRINTF4P @T DECC$GFPRINTF4T Gh DECC$FFLUSH4\ b# DECC$FFLUSH 4d @h DECC$FFLUSH4x G TT_GETCH4| b#TT_GETCH4 @ TT_GETCH4 G TT_GETCH4 b#TT_GETCH4 @ TT_GETCH4 G DECC$GFPRINTF4 b# DECC$GFPRINTF4 @ DECC$GFPRINTF4 G DECC$FFLUSH4 b# DECC$FFLUSH4 @ DECC$FFLUSH4 G4 DECC$TOLOWER4 b# DECC$TOLOWER40 @4 DECC$TOLOWER4< G` RETURN_VMS4@ b# RETURN_VMS4\ @` RETURN_VMS4  G DECC$MALLOC4 b# DECC$MALLOC4  @ DECC$MALLOC4 G0 FNFILTER4 b#FNFILTER4, @0 FNFILTER4< GP FNFILTER4D b#FNFILTER4L @P FNFILTER4 T Gt DECC$GSPRINTF4 \ b# DECC$GSPRINTF4 p @t DECC$GSPRINTF, G GETP, b#GETP, @ GETP4 G DECC$FREE4 b# DECC$FREE4 @ DECC$FREE,, GT ECHO,L b#ECHO,P @T ECHO4 d G DECC$GSPRINTF4 h b# DECC$GSPRINTF4  @ DECC$GSPRINTF4 G RETURN_VMS4 b# RETURN_VMS4 @ RETURN_VMS4  G DECC$GSPRINTF4  b# DECC$GSPRINTF4 @ DECC$GSPRINTF44GH RETURN_VMS48b# RETURN_VMS4D@H RETURN_VMS4HGp RETURN_VMS4Lb# RETURN_VMS4lp RETURN_VMS4 LGx DECC$GSPRINTF4 Tb#  DECC$GSPRINTF4 t@x DECC$GSPRINTF4G DECC$TOLOWER4b#  DECC$TOLOWER4@ DECC$TOLOWER4GFNFILTER4b# FNFILTER4@FNFILTER4 G DECC$GSPRINTF4 b#  DECC$GSPRINTF4  @ DECC$GSPRINTF4 lG DECC$GSPRINTF4 xb#  DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$LSEEK4 b#  DECC$LSEEK4 @ DECC$LSEEK4G DECC$READ4b#  DECC$READ4@ DECC$READ4TGp DECC$FREE4Xb#  DECC$FREE4l@p DECC$FREE 4 pG DECC$MALLOC4xb#  DECC$MALLOC4 @ DECC$MALLOC4 G DECC$GSPRINTF4 b#  DECC$GSPRINTF4 @ DECC$GSPRINTF4 G4 DECC$GSPRINTF4 b#  DECC$GSPRINTF4 0@4 DECC$GSPRINTF4 `G DECC$LSEEK4 hb#  DECC$LSEEK4 |@ DECC$LSEEK4G DECC$READ4b#  DECC$READ4@ DECC$READ4dG DECC$TOLOWER4lb# DECC$TOLOWER4@ DECC$TOLOWER4G DECC$TOLOWER4b# DECC$TOLOWER4@ DECC$TOLOWER4TG DECC$TOLOWER4db# DECC$TOLOWER4|r UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1@ DECC$TOLOWER4G DECC$TOLOWER4b# DECC$TOLOWER4@ DECC$TOLOWERt t=( = segmentation violation% %=0;7DECC$GA___CTYPE=0";=P4 @ DECC$TOLOWER=0;;=0P;=00;=0#;=@(< 7G(; DECC$READ DECC$STRLEN8OTS$MOVE= [ %s ] G e5 DECC$LSEEK7SEEKMSG ;=0"p;=T  DECC$GSPRINTF7 REPORTMSG; DECC$MALLOC DECC$FREEFNFILTER=0  ;=@   RETURN_VMSECHO= bus error=0(" ;=P4 GETP=0  ;=PD| 7DECC$GA_STDERR@ DECC$GFPRINTFTT_GETCH DECC$FFLUSH= x=0 ;=0" ;=pH  DECC$ISATTY! DECC$WRITE# DECC$FILENO7DECC$GA_STDOUT% DECC$PUTC'SCREENLINEWRAP) SCREENSIZE=0`;=0"0;=@(< + UPDATE_KEYS- DECRYPT_BYTE=0;=0"0;=@, / DECC$OPEN= ctx=stm| |=0$error: cannot open zipfile [ %s ] (=(error: zipfile read error H=8*warning: filename too long--truncating. x=@3warning: extra field too long (%d). Ignoring... =@4%s: write error (disk full?). Continue? (y/n/^C) =0'error: zipfile probably corrupt (%s) =--More--(%lu) =t--- Press `Q' to quit, or any other key to continue --- = [%s] %s password: = Enter password: =(password incorrect--reenter: = __iscntrl= zstrnicmp= str2oemmakelong = makeword0= readbufdo_stringH= handlerUzpPassword`= UzpMorePausep= UzpInput=UzpMessagePrnt= defer_leftover_input= readbyte=undefer_input=open_input_file =??'".^%So??YϾ󨷵ǎԐѥ噞ᅠƄФ瘠  =׃Ѫ++++--+-+++---+i++_̯յݯ=? ?=/'&FILEIOCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044=open_input_file04=ZRQ 5@ 5@ 5@ 5@ 5@ >@ W@($ $= `4: := 4=  = 4p4= undefer_input4=@87 JA JA LA SA SA VAN N= P4\4= P = !`4 4="defer_leftover_input`4=1)( eA jA iA mA N N= 44= p = 44= readbuf4= yA yA yA   A A A A A A A A$ A A A A$ $= 4: := 4= `, ,= 0404=readbyte04= A A A A A A A A A A A A A< A A< A A A$$ $= \4: := 4= h h=  44=UzpMessagePrnt 4= C [C; [C ( mC&  C C C  C C C C  C C C C C C C C C$ C' C! C C C C C D D D D D D D Cj& D D D D D D D D D@$ $= 4: :=  4= y y=  4x4=UzpInput 4= UD: :=  4=  =  44= UzpMorePause 4=}ut qD pD dD  dD  dD  wD D D D D0$ $=  4: :=  4=  =  44= UzpPassword 4= D D D D D D4 D D D D D D D $ $=  4: :=  4= p =  44= handler 4=TLK D D D D D D E$ $= H 4 = P = p4 4= do}yO UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1_stringp4=F> GF GF GFF xF: yF xF zF: F zF zF }F }F {F F F F F F F F F F F F F F F F F F yFM yFM yFM yFLtL F F F F F F F F F F F F( F F F    G3 G G' G' G$ $= 4: := 4=  v v= 04x4=makeword04= TG: := L4=  = P4h4=makelongP4=KCB gG fG gG fG fG gG fG fG : := 4= P = 4P4= str2oem4=+#" G G G$ $= 4: := 4= p = 44= zstrnicmp4=RJI G G G G  G G, G G$ $= X4N N= 4D4=  =  ww1x+[aV1.0CCGLOBALSV1.013-JAN-2001 19:09Compaq C V6.2-003  $ABS$i$CODE$ $LITERAL$x$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$ CENTRAL_HDR_SIG  LOCAL_HDR_SIG END_CENTRAL_SIGFNAMESUZPMESSAGEPRNTUZPINPUT UZPMOREPAUSE UZPPASSWORDDECC$GA___CTYPE0J0 GLOBALSCTOR0 LOCAL_HDR_SIG0 CENTRAL_HDR_SIG0 END_CENTRAL_SIG G( G( FNAMESOTS$ZEROT T=Gk/;F!0@!.!J$Dk #^G8[ ?&~GG1""@Zk(@AHaPaX0#5'(ղ ""4G5Y˙^yyY/ #k4@GhOTS$ZERO4d@hOTS$ZERO" "= *0 0=0;7DECC$GA___CTYPE=0"0;= ( 7G ;=P8OTS$ZERO7 UZPMOREPAUSE7 UZPPASSWORD7UZPMESSAGEPRNT7UZPINPUTX X= __iscntrl= globalsCtor$ $= $ $ = $ $ = = = 46 @ @=0('GLOBALSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= globalsCtor04=~ = =   = =   =   = = = = = = = = = $ $= X4: := 4=  =  ww1 raV1.0CCINFLATEV1.013-JAN-2001 19:09Compaq C V6.2-003  $ABS$i#$CODE$/ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$ DECC$FREE DECC$MALLOCDECC$GA___CTYPEGREADBYTEFLUSHMEMFLUSH0J" HUFT_FREE0JP HUFT_BUILD(J INFLATE0J@ INFLATE_FREE MASK_BITS0J0 INFL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բ/BbG@ZkG7 7J C@D@=D0^8~@HP޵X`GG^~!/GGG/ s"R"=GG/T }"51BRSB"0B ݠGpF/4G$=" 1" 0@B 0@B0@B0@BBBp GBUG` 71BB 4G4rIWB JC' 1AJ"XSB B 0B 8@B#1B! 81B19B 81B19B 81B19B9AJ 1B 0C?WB0@BWB#0B B?PBTG,BxTGv/71BL$="9J CP"G} C Q1 Q@@@7B8J":C41"}C171B1""@0Bh"?"G@Zk! H"h}"@@ 0 BQ3B@0CCH=#] = h}#WYA *A11 AT!AH%`D!AWB Gh!! GG= 3pI}0@}ݠ=}"TA$1 B#1`@AA} GGcp}=c A ;Av@s]';A]1gI5BCuB0A GF!B5 4aJ0@!H@01:B"11 B B" 5@ $1BR"B# R4BB0@B4BB0@B@24BB0@B@0@1B8H C@ @/21BR"B0@1B@gC4GUCuC5B(bAG B5D3gI}PaB@Zk="@"`"}D]TA9lI}#*_IAA!91 C@EH]#x1J7A =h`cc=H< !1Aa  0@`=H< =XL     X=inflate_blockh= __iscntrlx= huft_free= huft_build= inflate_free=inflate_codes=inflate_fixed=inflate_stored= inflate_dynamicinflate@ @=0('INFLATECompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= inflate_codes04= e? e? e? }? w? s?  w? y? w? ? ? ? ? ? ? ? ?  ? ? ? ?  ? ? ?  ? ?  ? ? ? ? ? ? ? ? ? %L }? $ $= 4: := 4=  = 4@4=inflate_stored4= ? ? ?4 ? @ @ @ @ @ @ @ @ @ < @$ $= 4: := d 4=  =  44= inflate_fixed 4=JB '@  '@ /@ 5@ 5@ 5@ 5@ 7@ 7@ 7@ 7@ 7@ 7@ 9@ 9@ 9@ 9@ 9@ ;@ ;@ ;@ ;@ ;@ >@ =@ >@ >@ F@ F@ F@ F@ F@ H@8 H@ I@ I@ L@ M@($ $=  4 : := 8 4= ; ;= ` 4`4=inflate_dynamic` 4= Y@ u@ {@4 z@ ~@4 }@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @Kc UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1e @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @  @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @= @ @ @ @ < @$ $=  4: := 4=  ' '=# inflate_block =  =  44= inflate 4=ogf ;A NA A A4 A %A &A A  0$ $= L4B B= e4= XA = \: := 4=   = @44= inflate_free@4=1)( kA hA qA qA $ $= x4N N= 44=  = 4P4= huft_build4= A) A) A) A A A A A A A A A A A A A A A A A A A A A A A A A A$ A A A A A A A A A< A  AR A A) AP A A_) AJ AJ A A , A& A A& A A A A A A A A A A B A B A B A A A A A B B B B  B B B B B !B B B B B B B B 'B *B ,B 1B 1B 1B 6B 6B 7B{ 7B ;B ;B =B @B @B @B @B @B @B A\ GB GBL B$ $=  @4: := "4=  = "44= huft_free"4=D<; [B PB  PB  ]B [B aB aB$ $= "4N N= #4 #4= pD D}`4 =  ww1 %aV1.0AAMATCHV1.013-JAN-2001 19:09Compaq C V6.2-003P P $ABS$ih$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$0 $READONLY$ DECC$TOLOWERDECC$GA___CTYPE(Jh0MATCH(JISWILD =phGk/;F!0@!.!J$Dk#G~G^GG{#@G]5@ #k#~^^~ (0޴8@H>P^X~`GGGG0, 0H,H@8bD C.#"GCJtG@G_XD .JC.CJ @8bGGGtG_#,c #H?TG/4GxD C.CJ@.J5BՋB@G.GGJ/ GH/HKKG4GKG@(,!(H?H.@BHJ GKF@^C.JF` 4G@?SF.F# J@?J/@b#.(Bs0b#JqB1/1K C.4GCJ@Zk HH H#,#H 'HH H#.#Jf." CtJeF#` .J.J7A"@?EG9:Cy/(ByK0b 4G@Zk HH 'IH/G 0 A D&,&H!A?G G@?8bM"#"GtG4_HF8b"#"GtG,_@ D`&-&I 9"(H(B!0bEC 0@!.4G!J @Zk HH IH/ D"#-(B0b!#I4G)@.J #.#J@Zk HH-I IH,H8b`A#"GGtG_/GG]]} (0ݤ8@H=P]X}`p#k0,0H /G+D`."J"DF XEF@."J?Gk/4Gk4lG DECC$TOLOWER4tb#( DECC$TOLOWER4@ DECC$TOLOWER4G4 DECC$TOLOWER4$b#( DECC$TOLOWER40@4 DECC$TOLOWER4G DECC$TOLOWER4b#( DECC$TOLOWER4@ DECC$TOLOWER4@Gp DECC$TOLOWER4Db#( DECC$TOLOWER4l@p DECC$TOLOWER0 0=0;7DECC$GA___CTYPE=0;=0"p;=p< P DECC$TOLOWER(;=0"0;= = __iscntrl=iswild= recmatch(=match> >=.&%MATCHCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 04h4= match04=& Z=# Z=# ~=$ $= P4: := h4= @B B= p4(4=recmatchp4= =  = = = = = = = = = =R = =T = = =  = =<$ $= 4: := 4=  = 44= iswild4=,$# > > >N N= X4d4= h =  ww1)waV1.0CCPROCESSV1.013-JAN-2001 19:09Compaq C V6.2-003x x $ABS$i$CODE$[ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$p $READONLY$ DECC$FREE/ UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1 DECC$MALLOC DECC$GSPRINTFDECC$GA___CTYPE DECC$STRNCMP DECC$STAT DECC$CLOSE DECC$LSEEK DECC$READ LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGG8J0PROCESS_ZIPFILES0J`FREE_G_BUFFERS0J@UZ_END_CENTRAL8J@PROCESS_CDIR_FILE_HDR0Jp GET_CDIR_ENT8JPROCESS_LOCAL_FILE_HDROPEN_INPUT_FILEREADBUF DO_STRINGMAKEWORDMAKELONG EXTRACT_OR_TEST_FILES INFLATE_FREE CHECK_FORMATISWILDFREE_CRC_TABLE GET_CRC_TABLECHECKDIRSEEKMSG REPORTMSG =Gk/;F!0@!.!J$Dk# "~4G ^(^0[0~8GGb8b@Zk0B8b#$&"4G@Zk#$"`Bahb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SHBb#$4G41vJ2F("4@Zk2vHBb#$84G1J*"2F8@ZkBb#$c$<."4G@Zk@GG8]@]H}P`#k#TG(^"H[TG0^8~~@GGPb@ZktG` b=/(B0b!v H#&Q "4G2_J2DG1@ZkrSH(B0b#$4G1vJ "2F@Zk2vH8B@b#$4G1J2F"@Zk8B@b#$"4G@Zk8B@b#$"4G@Zk8B@b#$" 4G@Zk(B0b#$"4G@Zk2vH(B0b#$4G1J "2F@ZksSH#$!2vJR JSF!F բ ɡG !#G(]0]8}@P#k4'LGl DECC$MALLOC4(db# DECC$MALLOC4'h@l DECC$MALLOC4'lG DECC$MALLOC4(pb# DECC$MAU UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;19LLOC4'@ DECC$MALLOC4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 lG INFLATE_FREE4b# INFLATE_FREE4 @ INFLATE_FREE4GCHECKDIR4b#CHECKDIR4@CHECKDIR4GFREE_CRC_TABLE4b#FREE_CRC_TABLE4@FREE_CRC_TABLE4 G DECC$FREE4 b# DECC$FREE4 @ DECC$FREE4 G DECC$FREE4  b# DECC$FREE4 @ DECC$FREE4  G< DECC$FREE4 $b# DECC$FREE4 8@< DECC$FREE4 <GX DECC$FREE4 @b# DECC$FREE4 T@X DECC$FREE,!GISWILD ,"b# ISWILD,!@ISWILD4#G DECC$STAT4$b#  DECC$STAT4#@ DECC$STAT4GD CHECK_FORMAT4b#  CHECK_FORMAT4@@D CHECK_FORMAT4PG`OPEN_INPUT_FILE4Tb# OPEN_INPUT_FILE4\@`OPEN_INPUT_FILE4%pG GET_CRC_TABLE4&tb#  GET_CRC_TABLE4%@ GET_CRC_TABLE4G DECC$CLOSE4 b#  DECC$CLOSE4@ DECC$CLOSE4 (Gh DECC$GSPRINTF4 ,b#  DECC$GSPRINTF4 d@h DECC$GS PRINTF4 G DECC$GSPRINTF4 b#  DECC$GSPRINTF4 @ DECC$GSPRINTF4 ,Gh DECC$GSPRINTF4 0b#  DECC$GSPRINTF4 d@h DECC$GSPRINTF4 G DECC$GSPRINTF4 b#  DECC$GSPRINTF4 @ DECC$GSPRINTF4G  DECC$CLOSE4 b#  DECC$CLOSE4@ DECC$CLOSE4 GH DECC$GSPRINTF4 b#  DECC$GSPRINTF4 D@H DECC$GSPRINTF4pG DECC$LSEEK4tb#  DECC$LSEEK4@ DECC$LSEEK4G DECC$READ4 b#  DECC$READ4@ DECC$READ,$G0READBUF,(b# READBUF,,@0READBUF40GP DECC$STRNCMP48b#  DECC$STRNCMP4L@P DECC$STRNCMP4 pG DECC$GSPRINTF4 xb#  DECC$GSPRINTF4 @  DECC$GSPRINTF4G DECC$LSEEK4b#  DECC$LSEEK4@ DECC$LSEEK4G DECC$READ4b#  DECC$READ4 @ DECC$READ,| G READBUF, b# READBUF, @ READBUF4 G   DECC$STRNCMP4 b#  DECC$STRNCMP4 @ DECC$STRNCMP4  G DECC$GSPRINTF4  b#  DECC$GSPRINTF4  @ DECC$GSPRINTF4( GP DECC$LSEEK4, b#  DECC$LSEEK4L @P DECC$LSEEK4P Gp DECC$READ4\ b#  DECC$READ4l @p DECC$READ< G EXTRACT_OR_TEST_FILES< b# EXTRACT_OR_TEST_FILES< @ EXTRACT_OR_TEST_FILES4 G DECC$CLOSE4  b#  DECC$CLOSE4 @ DECC$CLOSE4  G$ DECC$GSPRINTF4  b#  DECC$GSPRINTF 4  @$ DECC$GSPRINTF4D G\ DECC$CLOSE4 H b#  DECC$CLOSE4X @\ DECC$CLOSE4d G| DECC$CLOSE4 h b#  DECC$CLOSE4x @| DECC$CLOSE4( GP DECC$LSEEK4, b#p DECC$LSEEK4L @P DECC$LSEEK4P Gp DECC$READ4T b#p DECC$READ4l @p DECC$READ4 G DECC$STRNCMP4 b#p DECC$STRNCMP4 @ DECC$STRNCMP4( GP DECC$LSEEK40 b#p DECC$LSEEK4L @P DECC$LSEEK4P Gx DECC$READ4T b#p DECC$READ4t @x DECC$READ4 G DECC$STRNCMP4 b#p DECC$STRNCMP4 @ DECC$STRNCMP4b#p DECC$LSEEK4G DECC$LSEEK4@ DECC$LSEEK4G DECC$READ4b#p DECC$READ4@ DECC$READ4,GT DECC$STRNCMP40b#p DECC$STRNCMP4P@T DECC$STRNCMP4  GH DECC$GSPRINTF4 (b#p DECC$GSPRINTF4 D@H DECC$GSPRINTF4 lG DECC$GSPRINTF4 pb# UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1p DECC$GSPRINTF4 @ DECC$GSPRINTF,GREADBUF,b#pREADBUF,@READBUF4GMAKEWORD4b#pMAKEWORD4@MAKEWORD4G0MAKEWORD4b#pMAKEWORD4,@0MAKEWORD48GXMAKEWORD4<b#pMAKEWORD4T@XMAKEWORD4`GMAKEWORD4db#pMAKEWORD4|@MAKEWORD4GMAKELONG4b#pMAKELONG4@MAKELONG4GMAKELONG4b#pMAKELONG4@MAKELONG4GMAKEWORD4b#pMAKEWORD4@MAKEWORD4lG DO_STRING4|b# DO_STRING4@ DO_STRING4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF,GREADBUF,b#pREADBUF,@READBUF4GMAKEWORD4b#pMAKEWORD4@MAKEWORD4 G4MAKEWORD4b#pMAKEWORD40@4MAKEWORD  48G`MAKELONG4<b#pMAKELONG4\@`MAKELONG4`G|MAKELONG4db#pMAKELONG4x@|MAKELONG4|GMAKELONG4b#pMAKELONG4@MAKELONG4GMAKELONG4b#pMAKELONG4@MAKELONG4GMAKEWORD4b#pMAKEWORD4@MAKEWORD4GMAKEWORD4b#pMAKEWORD4@MAKEWORD4G(MAKEWORD4b#pMAKEWORD4$@(MAKEWORD4,GTMAKEWORD40b#pMAKEWORD4P@TMAKEWORD4XGMAKEWORD4\b#pMAKEWORD4|@MAKEWORD4GMAKELONG4b#pMAKELONG4@MAKELONG4GMAKELONG4b#pMAKELONG4@MAKELONG,G(READBUF, b#READBUF,$@(READBUF4@GpMAKEWORD4Db#MAKEWORD4l@pMAKEWORD4tGMAKEWORD4xb#MAKEWORD4@MAKEWORD4GMAKELONG4b#MAKELONG4@MAKELONG4GMAKELONG4b#MAKELONG4@MAKELONG4GMAKELONG4b#MAKELONG4@MAKELONG4GMAKELONG4b#MAKELONG4@MAKELONG4G8MAKEWORD4 b#MAKEWORD44@8MAKEWORD4<GdMAKEWORD4@b#MAKEWORD4`@dMAKEWORD{ {=c[%sEmpty zipfile.  =0;7DECC$GA___CTYPE=0(";=P, 7GMAKEWORDMAKELONGREADBUF=08";=`,  G e5=0"@;=  ;=0"@;=@  DO_STRING; DECC$GSPRINTF=0 `;=0(  DECC$FREE INFLATE_FREECHECKDIRFREE_CRC_TABLE=0(" ;=p8 7END_CENTRAL_SIG DECC$READ DECC$LSEEK DECC$STRNCMP=[%s] = EXTRACT_OR_TEST_FILES CHECK_FORMAT OPEN_INPUT_FILE7CENTRAL_HDR_SIG7 REPORTMSG=0";=P,|  DECC$CLOSE7SEEKMSG`!ISWILD# DECC$STAT= % GET_CRC_TABLE =0 "0;=@, 7 LOCAL_HDR_SIG' DECC$MALLOCI I=0'error: cannot allocate unzip buffers (=0%unzipsfx: cannot find myself! [%s] P=0!warning [%s]: zipfile is empty x=@1 End-of-central-directory signature not found. =0& caution: zipfile comment truncated !=XLerror [%s]: missing %ld bytes in zipfile (attempting to process anyway) (=XMerror [%s]: NULL central directory offset (attempting to process anyway) x=XIerror [%s]: start of central directory not found; zipfile corrupt. %s= __iscntrl= process_local_file_hdr= get_cdir_ent= process_cdir_file_hdrL UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1r!"=uz_end_central(=free_G_buffers8= find_ecrecH= do_seekableX=process_zipfiles@ @=0('PROCESSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = #044=process_zipfiles04=+# = = = = = = = = = =  = =7 = =8 = = =4 = =3 = =4 = => =4  =N = = = > =$ $= `4: := D4= 0 = $`44=free_G_buffers`4= > > > > > > > > > > >  > > > > $ $= 4: := d4=  - -= 4 4= do_seekable4= > > - >) > >% > > >#   +? +?  :? 9? :? 9? I? Q? I?. ? ? ? ? ? ? ? ? ? ? ? ?  ? ? ?  ? ? ?  ?  @4 ? S? ?( ?$ $= 4: :=  4= `U U= & 4p4= find_ecrec 4= 7@  7@  7@ 7@  D@  D@ D@ D@ F@ J@ M@ M@ M@ L@ K@ K@ J@ O@  [@ `@  c@ `@ c@ c@ h@ k@ k@ k@ j@ i@ i@ h@ m@  }@  }@ @ @ @ @ @ @ @ @ @ @' @ @0 @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @\ @ @ @ @ @ @ @ @0 [@$ $= $ 4: := 4= ` = @44=(uz_end_central@4=vnm @ @ @ @ @ @ @ @ @ @$$ $= d4: := 4=  = "@44=#process_cdir_file_hdr@4= @  A A A A A  "A &A &A &A &A &A 2A)$ $= \4: := 4= ` = 4p4= get_cdir_ent4= @A  @A  @A  WA TA WA WA WA WA YA YA YA YA [A [A ]A _A _A aA cA cA cA cA eA eA eA eA gA *gA gA gA iA iA iA iA kA kA kA kA mA mA oA$ $= 4: := 4= Pi i= #44=$process_local_file_hdr4= ~A  ~A  ~A  A A A A A A A A A A A Aj A + A A A A A A A A A A$ $=  4: := 4=  =  ww1DžaV1.0AATTYIOV1.013-JAN-2001 19:09Compaq C V6.2-003  $ABS$i$CODE$- $LITERAL$$LINK$$,DATA$$BSS$ $READONLY_ADDR$0 $READONLY$DECC$GA_STDERRDECC$GA_STDOUT DECC$FCLOSE DECC$FFLUSH DECC$FPUTS DECC$GETC DECC$PUTC DECC$FOPEN DECC$CTERMIDDECC$GA___CTYPE(J0ECHO0J`TT_GETCH(JGETP SYS$ASSIGN SYS$DASSGN-SYS$QIOW| |=Gk/;F!0@!.!J$Dk#G(^GH[G0^8~GG#=" 8Pb@ZkF=(B0b!&H"&HG }"(GG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ECC$FFLUSH4 xb# DECC$FFLUSH4 @ DECC$FFLUSH4G DECC$FCLOSE4b# DECC$FCLOSE4@ DECC$FCLOSE, ,= SYS$COMMAND= =5=%(line too long--try again)  =0;7DECC$GA___CTYPE=0("0;=@( @SYS$QIOW;` SYS$ASSIGN SYS$DASSGN= DECC$FCLOSE=r DECC$CTERMID; DECC$FF6LUSH=0";=P8 7DECC$GA_STDERR DECC$FPUTS DECC$GETC DECC$FOPEN7DECC$GA_STDOUTP DECC$PUTC=0(";=P0 < <= 4 = __iscntrl=echo=getp 7= tt_getch> >=.&%TTYIOCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0 = 044= echo04= E E E E a d e e r8 u v v x$ $= l4: := 4=  = 4`4=tt_getch4=_WV          $ $= 4: := 4=  = 44=  9getp4=       % ( ( + / / 6 6 8 80$ $= 4: := 4= P =   ww1 ~0aV1.0AAUNZIPV1.013-JAN-2001 19:04Compaq C V6.2-003  $:ABS$i` $CODE$X $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$0 $READONLY$( MASK_BITS VERSIONDATEH CENTSIGMSG@SEEKMSG (FILENAMENOTMATCHED(0EXCLFILENAMENOTMATCHED REPORTMSG DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCMP DECC$SIGNAL DECC$ISATTY; GLOBALSCTORG(JMAIN(J UNZIP(J`UZ_OPTS(J@ USAGE PROCESS_ZIPFILESHANDLER RETURN_VMS0  MASK_BITSFNAMES0 VERSIONDATE0 CENTSIGMSG( SEEKMSG8 FILENAMEN<OTMATCHED8 EXCLFILENAMENOTMATCHED0  REPORTMSG(J@__MAIN DECC$MAIN DECC$EXIT DECC$$SHELL_HANDLER =h ` # ? ~4G0^8^@cG("#G$" "@[Hb=/@Zk$=(b# @0B8bG4G@ZkcG0]8]@P#k#G^0[~^/ GG >8b@Zk =b#@ =B(bG4G/@ZkG]] 4G0#k/#TG^ [~> ^(~0GG0;(bTG@Zk B(b0"GTG@Zk B(b0"bTGTG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4 G DECC$STRCMP4 b# DECC$STRCMP 4 @ DECC$STRCMP<GPROCESS_ZIPFILES<b#PROCESS_ZIPFILES<@PROCESS_ZIPFILES4$GhE DECC$GSPRINTF44b#` DECC$GSPRINTF4d@h DECC$GSPRINTF4G DECC$GSPRINTF4b#` DECC$GSPRINTF4@ DECC$GSPRINTF4$G8 DECC$ISATTY4,b#` DECC$ISATTY44@8 DECC$ISATTY4tG DECC$GSPRINTF4xFb#` DECC$GSPRINTF4@ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRINTF4 @ DECC$GSPRINTF =(X. Quote uppercase options =@8Gp @P0 @p`0 0=0"@ ;=@8 7G; DECC$GSPRINTF; ;=MXH=`=0";=`4  DECC$ISATTY=0" ;=@(  DECC$SIGNAL7HANDLER=-x PROCESS_ZIPFILES7FNAMES DECC$STRCMP=0";=0(  RETURN_VMS GLOBALSCTOR=00";=PI( 7DECC$$SHELL_HANDLER= DECC$EXIT DECC$MAIN =@1caution: both -n and -o specified; ignoring -o 8=H:Valid options are -tfupcz; modifiers are -abjnoqCL%sV%s. x=XMerror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid =PAUnZipSFX %d.%d%d%s of %s, by Info-ZIP (Zip-Bugs@lists.wku.edu). J=usage=uz_optsunzip(= mainB B=*"??0 0 =14 January 2001g g =OGerror: expected central file header signature not found (file #%lu). \ \ =D<error [%s]: attempt to seek before beginning of zipfile %sD D =,$caution: filename not matched: %s M M K=5-caution: excluded filename not matched: %s = (please check that you have transferred or created the zipfile in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles) > >=.&%UNZIPCompaq C V6.2-003? ?= 4=TRANSFER$BREAK$GO# #= __iscntrl =  = 44= maLin4=5-, K@ K@ K@ R@ $ $= 4: := 4=  =  44= unzip 4= ^@N ^@N ^@N @ @ @ @C. A% NA QA WAT$ $= P4: := M4=  = 4`4= uz_opts4=  A  A  A A A Ae A  A A  A A B 6 B B  B B B B B0 B B   ;C  DC EC LC MC AN lB qC qC qC qC wC zC }C }C }C C  C C  C8$ $= 4: :=  4=  = @ 44= usage@ 4=ia` C C C C C C C C C  C$ $=   UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1zpN O4: := P 4=  ` `= 4@4= __main84: := 4=  =   @ww1 sEaV1.0??VMSV1.013-JAN-2001 19:10Compaq C V6.2-003  $ABS$iXG$CODE$& $LITERAL$P$LINK$$DATA$p$BSS$ $READONLY_ADDR$ $READONLY$ DECC$FREE DECC$EXIT DECC$UMASK DECC$MALLOCDECC$GA_STDERR DECC$FFLUSH DECC$GSPRINTF DECC$FGETS DECC$TOLOWERDECC$GA___CTYPE CMA$TIS_ERRNO_GET_ADDR DECC$STRCPY DECC$STRRCHR DECC$STRCMP DECC$STRLEN DECC$STATQ DECC$MKDIRDECC$GA_RMS_NAMDECC$GA_RMS_FABDECC$GA_RMS_RAB DECC$GA_RMS_XABALL DECC$GA_RMS_XABDAT DECC$GA_RMS_XABFHC DECC$GA_RMS_XABKEY DECC$GA_RMS_XABPRO DECC$GA_RMS_XABRDTG0J OPEN_OUTFILE(J@FLUSH0J@ACHECK_FOR_NEWERMAKEWORD ZSTRNICMP MEMREXTRACT0J0 CHECK_FORMAT0J`D RETURN_VMSCRC32(J0MAPATTR(Jp4MAPNAME0J:CHECKDIR0JPF SCREENSIZE0JFSCREENLINEWRAP0J @, CLOSE_OUTFILE SYS$ASSIGN SYS$BINTIM SYS$CLOSE SYS$CONNECT SYS$CSREATE SYS$DASSGN SYS$EXTEND SYS$NUMTIMSYS$OPEN SYS$PARSESYS$PUTSYS$QIOSYS$QIOW SYS$SETDFPROT SYS$SYNCHSYS$WAIT SYS$WRITELIB$SYS_GETMSGOTS$MOVE =Gk/;F!0@!.!J$Dk`;p#~Gh^Gp^x~GG{!&04B! Ӳs"TBӲ4GbD=@ZkL=0B8b?DDF"L4G@Zk"Bb#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vJ@ T`=YLvW AK6HBK@ TBKaDvAK#F@KZC T6vJRJcFRJDW!v HCGB4GXGX1F&/B@G!ùB 4GãB`GûB`4GñB GøB4G óB`G ô"@4Gá"@ GàWCG]]}#k6J!1BUBW @2 B!FW@BTG2D D(4G5B0{FC&4GF4GFFGk#G ^G([(^0~8~@H޴PGGG#G80bG="G@Zk=XB`bG1w ("GGG}"!&HG&HGG@Zk=HBPbG!&H4G&H@Zk] &FHHpHࡹ@`#DRJYB*F ]"SFCE `GG/G0DG ](]0}8@HݤP`#k/#G~p{#^~ G >{Ccc SF@[2""_#0 }C`SG]}BB F0#Ck [2""#~"^^GG{#e_ xG]] #k k4 G DECC$STRLEN4b# DECC$STRLEN4 @ DECC$STRLEN4 GSYS$OPEN4 b#SYS$OPEN4 @SYS$OPEN4G DECC$GSPRINTF4 b# DECC$GSPRINTF4@ DECC$GSPRINyTF4DG` SYS$CLOSE4Hb# SYS$CLOSE4\@` SYS$CLOSE4hG DECC$GSPRINTF4 |b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4 b#P DECC$GSPRINTF4@ DECC$GSPRINTF4CG z SYS$BINTIM4Db#P SYS$BINTIM4C@  SYS$BINTIM41GOTS$MOVE41@OTS$MOVE4 G DECC$STRLEN4b# DECC$STRLEN4 @ DECC$STRLEN4= Gd SYS$CREATE4>$b# SYS$CREATE4=`{@d SYS$CREATE4G DECC$GSPRINTF4 b# DECC$GSPRINTF4@ DECC$GSPRINTF4GG@ SYS$CONNECT4H8b# SYS$CONNECT4G<@@ SYS$CONNECT4DGx DECC$GSPRINTF4 Hb# DECC$GSPRINTF4t@x DECC$GSPRINTF  UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1{|4lG DECC$GSPRINTF4 b# DECC$GSPRINTF4@ DECC$GSPRINTF41G OTS$MOVE41 @ OTS$MOVE4  G8 DECC$STRLEN4$ b# DECC$STRLEN4 4 @8 DECC$STRLEN4= G SYS$CREATE4> b# S}YS$CREATE4= @ SYS$CREATE4 G DECC$GSPRINTF4  b# DECC$GSPRINTF4 @ DECC$GSPRINTF4ET Gt SYS$EXTEND4FX b# SYS$EXTEND4Ep @t SYS$EXTEND4x G DECC$GSPRINTF4  b# DECC$GSPRINTF4 @~ DECC$GSPRINTF4G G SYS$CONNECT4H b# SYS$CONNECT4G @ SYS$CONNECT4 GP DECC$GSPRINTF4 ( b# DECC$GSPRINTF4L @P DECC$GSPRINTF4t G DECC$GSPRINTF4  b# DECC$GSPRINTF4 @ DECC$GSPRINTF4  G DECC$STRLEN4 b# DECC$STRLEN4  @ DECC$STRLEN4LGd SYS$PARSE4\b# SYS$PARSE4`@d SYS$PARSE4G SYS$ASSIGN4b# SYS$ASSIGN4@ SYS$ASSIGN4 b#SYS$QIOW4<GHSYS$QIOW4D@HSYS$QIOW4pG SYS$DASSGN4xb# SYS$DASSGN4@ SYS$DASSGN4TGx DECC$GSPRINTF4 Xb# DECC$GSPRINTF4t@x DECC$GSPRINTF4?G DECC$FFLUSH4@b# DECC$FFLUSH4?@ DECC$FFLUSH4AG DECC$FGETS4Bb# DECC$FGETS4A@ DECC$FGETS4;G DECC$TOLOWER4<b# DECC$TOLOWER4;@ DECC$TOLOWER4;G( DECC$TOLOWER4< b# DECC$TOLOWER4;$@( DECC$TOLOWER4;,GL DECC$TOLOWER4<0b# DECC$TOLOWER4;H@L DECC$TOLOWER4;\G DECC$TOLOWER4<`b# DECC$TOLOWER4;@ DECC$TOLOWER4=4Gt SYS$CREATE4>\b# SYS$CREATE4=p@t SYS$CREATE4=G SYS$CREATE4>b# SYS$CREATE4=@ SYS$CREATE4G$ DECC$GSPRINTF4 b#` DECC$GSPRINTF4 @$ DECC$GSPRINTF,)\GCRC32,*`b#`CRC32,)@CRC324G DECC$GSPRINTF4 b#` DECC$GSPRINTF 4@ DECC$GSPRINTF41DGXOTS$MOVE41T@XOTS$MOVE43\Gx DECC$FREE44`b#8 DECC$FREE43t@x DECC$FREE43|G DECC$FREE44b#8 DECC$FREE43@ DECC$FREE43G DECC$FREE44b#8 DECC$FREE43@ DECC$FREE43G DECC$FREE44b#8 DECC$FREE43@ DECC$FREE43G DECC$FREE44b#8 DECC$FREE43@ DECC$FREE43 GH DECC$FREE44b#8 DECC$FREE43DH DECC$FREE4KG DECC$MALLOC4Lb# DECC$MALLOC4K@ DECC$MALLOC41G4OTS$MOVE410@4OTS$MOVE4I8Gh MEMEXTRACT4J@b# MEMEXTRACT4Id@h MEMEXTRACT43pG DECC$FREE44tb# DECC$FREE43@ DECC$FREE41tGOTS$MOVE41@OTS$MOVE,)GCRC32,*b#@CRC32,)@CRC3241GOTS$MOVE41@OTS$MOVE4-G SYS$SYNCH4.b# SYS$SYNCH4-@ SYS$SYNCH,/P G| SYS$QIO,0T b#SYS$QIO,/x @| SYS$QIO41`!G!OTS$MOVE41|!@!OTS$MOVE4"G" DECC$GSPRINTF4 "b#h DECC$GSPRINTF4"@" DECC$GSPRINTF41#G0#OTS$MOVE41,#@0#OTS$MOVE41<#GX#OTS$MOVE41T#@X#OTS$MOVE41#G$OTS$MOVE41$@$OTS$MOVE44$Gh$ DECC$GSPRINTF4 <$b#h DECC$GSPRINTF4d$@h$ DECC$GSPRINTF4@'Gt' DECC$GSPRINTF4 `'b#H DECC$GSPRINTF4p'@t' DECC$GSPRINTF41'G(OTS$MOVE41'@(OTS$MOVE4(G4) DECC$GSPRINTF4 (b#H DECC$GSPRINTF40)@4) DECC$GSPRINTF41x)G)OTS$MOVE41g[& UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1)@)OTS$MOVE45 *G$*SYS$WAIT46*b#SYS$WAIT45 *@$*SYS$WAIT47X*G* SYS$WRITE48\*b# SYS$WRITE47*@* SYS$WRITE45+G+SYS$WAIT46+b#SYS$WAIT45+@+SYS$WAIT,9+G,SYS$PUT ,:+b#SYS$PUT,9+@,SYS$PUT45-G-SYS$WAIT46-b#pSYS$WAIT45-@-SYS$WAIT4.G(. SYS$CLOSE4.b#p SYS$CLOSE4$.@(. SYS$CLOSE4-.G. SYS$SYNCH4..b# SYS$SYNCH4-.@. SYS$SYNCH4 /GL/SYS$QIOW40/b#SYS$QIOW4H/@L/SYS$QIOW4L/Gd/ SYS$DASSGN4T/b# SYS$DASSGN4`/@d/ SYS$DASSGN4+0G$0LIB$SYS_GETMSG4,0b#pLIB$SYS_GETMSG4+ 0@$0LIB$SYS_GETMSG40G0 DECC$GSPRINTF4 0b#p DECC$GSPRINTF40@0 DECC$GSPRINTF4'<1Gp1 SYS$SETDFPROT4(D1b# SYS$SETDFPROT4'l1@p1 SYS$SETDFPROT4%1G1 DECC$UMASK4&1b# DECC$UMASK4%1@1 DECC$UMASK4%1G1 DECC$UMASK4&1b# DECC$UMASK4%1@1 DECC$UMASK4# 3G43MAKEWORD4$$3b#MAKEWORD4#03@43MAKEWORD4#43GL3MAKEWORD4$83b#MAKEWORD4#H3@L3MAKEWORD4#L3G3MAKEWORD4$P3b#MAKEWORD4#3@3MAKEWORD45G$5 DECC$STRCPY45b#p DECC$STRCPY4 5@$5 DECC$STRCPY4!5G5 DECC$STRRCHR4"5b#p DECC$STRRCHR4!5@5 DECC$STRRCHR4 09GH9 DECC$STRLEN449b#p DECC$STRLEN4 D9@H9 DECC$STRLEN49G9 DECC$GSPRINTF4 9b#p DECC$GSPRINTF49@9 DECC$GSPRINTF49G(: DECC$GSPRINTF4 9b#p DECC$GSPRINTF4$:@(: DECC$GSPRINTF4 ;G; DECC$STRLEN4;b# DECC$STRLEN4 ;@; DECC$STRLEN4 ;G; DECC$STRLEN4;b# DECC$STRLEN4 ;@; DECC$STRLEN4<G< DECC$STRCPY4<b# DECC$STRCPY4<@< DECC$STRCPY4 x=G= DECC$STRLEN4|=b# DECC$STRLEN4 =@= DECC$STRLEN4$>G8> SYS$PARSE4(>b# SYS$PARSE44>@8> SYS$PARSE4@>G> DECC$MKDIR4D>b# DECC$MKDIR4|>@> DECC$MKDIR<>G>CMA$TIS_ERRNO_GET_ADDR<>b#CMA$TIS_ERRNO_GET_ADDR<>@>CMA$TIS_ERRNO_GET_ADDR4(?Gd? ZSTRNICMP 44?b# ZSTRNICMP4`?@d? ZSTRNICMP4h?G? DECC$MKDIR4p?b# DECC$MKDIR4?@? DECC$MKDIR<?G?CMA$TIS_ERRNO_GET_ADDR<?b#CMA$TIS_ERRNO_GET_ADDR<?@?CMA$TIS_ERRNO_GET_ADDR4?G? DECC$STRCPY4?b# DECC$STRCPY4?@? DECC$STRCPY4?G? DECC$STRCMP4?b# DECC$STRCMP4?@? DECC$STRCMP4$@GL@ DECC$MKDIR4,@b# DECC$MKDIR4H@@L@ DECC$MKDIR<L@G`@CMA$TIS_ERRNO_GET_ADDR<T@b#CMA$TIS_ERRNO_GET_ADDR<\@@`@CMA$TIS_ERRNO_GET_ADDR4 x@G@ DECC$STRLEN4|@b# DECC$STRLEN4 @@@ DECC$STRLEN4@G@ DECC$STRCPY4@b# DECC$STRCPY4@@@ DECC$STRCPY4 @G@ DECC$STRLEN4@b# DECC$STRLEN4 @@@ DECC$STRLEN4AG error: cannot open zipfile [ %s ] (access denied?).  =0;7DECC$GA___CTYPE=0 "D;=`4| @ SYS$ASSIGN;` SYS$DASSGNSYS$QIOW=0"F;= 0 d;=0"PF;=0$ =0`D; DECC$EXIT SYS$OPEN=@  DECC$STAT7DECC$GA_RMS_FAB7DECC$GA_RMS_XABDAT=0"A;=( 7Gp DECC$STRLENG Xe5=?zG{ SYS$CLOSE SYS$NUMTIM=0":;=4| @; DECC$STRCPY CMA$TIS_ERRNO_GET_ADDR DECC$MKDIR= sys$disk:[] @;0 DECC$STRCMP7DECC$GA_RMS_NAMP ZSTRNICMP SYS$PARSE=0"4;=L ; DECC$GSPRINTF! DECC$STRRCHR==0"0;=p@ #MAKEWORD% DECC$UMASK' SYS$SETDFPROT=0 @,;= ( =0";=00 )CRC32=08 /;=(PT %s[ %s ] +LIB$SYS_GETMSG=0"P.;=0, - SYS$SYNCH=0";=0 /SYS$QIO=0" ;=`8 8OTS$MOVE=0 0;=0$ `3 DECC$FREE=0`",;= 5SYS$WAIT7DECC$GA_RMS_XABPRO=0");=0 7 SYS$WRITE=0"p;=`0 =0"*;=08 9SYS$PUT= 8=0$;=0"0&;=0 =0"@";=< =0;=0" ;=P<| ;H;h;;;p;=0x";=8 7DECC$GA_STDERR; DECC$TOLOWER= SYS$CREATE? DECC$FFLUSHA DECC$FGETS=0 ;=0< C SYS$BINTIM7DECC$GA_RMS_XABRDT=0";=P8 7DECC$GA_RMS_RABE SYS$EXTENDG SYS$CONNECT=0"P;=P0 =0"p;=P0 I MEMEXTRACTK DECC$MALLOC=VDAT8=VKEY@=VPROH=IMP=VALLX7DECC$GA_RMS_XABKEY=0";=P 7DECC$GA_RMS_XABALL7DECC$GA_RMS_XABFHC=VFAB=VRDT=VMSV=VFHC=0";=  =0h"0;=(  ===`04=4=6=H@4444 4(40484@4H4P4X4=n) UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1|(  6=`4= 6= ` `=4= `4  =(decompress_bits__iscntrl =getscreeninfo0=screenlinewrap@= screensizeP= return_VMS`=(check_for_newercheckdir=(mapnamemapattrclose_outfile=flush= vms_msg_close_qio= WriteQIO= _flush_qio= free_up_close_rms= WriteBuffer=_flush_blocks= WriteRecord(= find_eol8=_flush_streamH=_flush_varlenX=init_buf_ringh= create_qio_output=0"replaceset_default_datetime_XABs= create_rms_output= create_default_output=extract_block=find_vms_attrs= open_outfile= check_format< <=,$#VMSCompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0  = 044= check_format04= V P P P V V V W X X Z a a d d$$ $= \4: := 4=  = 44= open_outfile4=3+*     $ $= 4: := `4=  = 44= init_buf_ring4=TLK          : := 4= PX X= &4P4='set_default_datetime_XABs4=   ƕ,  ƕ, ƕ, ƕ, ƕ$       V         $ $= 84: := 44= ` = "P44=#create_default_outputP4=tl                ( ( ) . . 5 <i G G G M M O \ ^8$ $= 4: := 4=  = 44=create_rms_output4= e e e e i p i                            ͖ ϖ Ж0$ $= L4: :=  4=  =  44=create_qio_output 4=         ( ( *  2 * 6 6 > > > @ @ D C B F D C E G I O O O O O Q W X X ^ \ \ \ \ d d d d f f f  l b  l h n h h h h n h n s s    } ~($ $= h 4: := 4= { {= 44= replace4=                             8$ $= 4: := 4= 0 = 4`4=find_vms_attrs4= З З ӗ ٗ ܗr   q                            !  O J M M Q Q  i Y Y _ ^  _  \  _  e b  m o o p Y Y {   L n $ $= d4: := 4=   = 0484= free_up04=OGF       H$ $= X4: := H4= @7 7= p44= extract_blockp4= ߘ        #  / (B  2 ( ( 8 (  ,$ $= 4" "= } }=v4= 4= 4= : := 4= P) )=%decompress_bits =  = IN UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1P4@4= flush4=H@? H B B B H J L$ $= 4: := $4=  = p44= _flush_blocksp4= Q  Q  Y [ ] b a a d e k [ [ r r,$ $= 4: := t4= 0 = 44=WriteQIO4= z z            $ $= 4: :=  4= @ =  44= _flush_qio 4=               <$ $= (!4: := "4= ` = @"4h4= _flush_varlen@"4=+# C 3 3 3  ; D A E G N T T U e g h j e  e e    , g$ $= "4: := $4=  = $484=find_eol$4=UML        : := ,&4= @ = 0&4H4= _flush_stream0&4= ֚  ߚ  ߚ  ߚ          $ & , , . : ? P W ] ? c e g t t u t8$ $= l&4: := )4=  = )44= WriteBuffer)4=nfe ~ ~ ~ ~     $ $= *4: := *4=  = *44= WriteRecord*4={sr          $ $=  +4: := `+4= ` = @,4 4= close_outfile@,4=NFE      › ě4$ $= l,4: := ,4=  = ,4p4= _close_rms,4= ʛ Л         $ $= ,4: := H.4= ( (= P.44= _close_qioP.4=               % #8 # # * *($ $= .4: := /4= p = /4p4= vms_msg/4=tlk           $ $= 04: := 04= 0O O= 044= mapattr04=                           ! " "  1 2 1 4 J K L S I I c d d` d d e d f d g  0$ $= 414: := `44=  = 44p4= mapname44=80    3 3 < @ @ H J I J9 P N/ V \ } V/    V3 V1 V1 V V V ^ ^ V  V V V o o p p V  v V+ V9            $  L$ $= 44: := t:4= 0_ _= :44=checkdir:4= ß  ß ß ß O K N K K R  ^ Z ^ b b l l l l n r x { { {                                     ̠ ̠e ̠ ̠ ̠ Π  ޠ     ,$ $= :4: := dA4=  = A4@4=check_for_newerA4=;3             ' 6 6 6 ? ? 6  ? 6 6 8 7 8 B 9  : ; 0 ?$ $= A4: := ") UNZIP.BCK! O)[UNZIP542.VMS-BINARIES]UNZIPSFX.AXP_OLB;1<DD4=  = `D44= return_VMS`D4=c[Z ա ϡ Ρ Ρ Ρ ͡ ͡ ԡ ӡ ԡ ӡ = ` = D44= getscreeninfoD4= & & & &       *($ $= E4: := (F4=  = PF44= screensizePF4=80/ - - 3 3 3$ $= xF4: := F4=  = F44=screenlinewrapF4=4,+ 8 8 6 6 :$ $= $G4N N= 4G4TG4= ht te44 =  &ww%*[UNZIP542.VMS-BINARIES]UNZIPSFX.OPT;1+,./ 4- O0123KPWO56`3R R11!G<31G831G)3؞G3\@\SЭQSRa\'Pa\\ ^\@\\a\ܔbSG 3 xU5PGL3ЭP!PG3\\ ЭRPЭRRPPUG3zR|RRUݭܟp:G3 DECC$DSPRINTFPG3GG03P`G3G3G3G3G3G3RRG3bPREADBYTEPѭ1G3\\G3lG3G3:G3G3FLꎊ8=HV Q|PȻ}TӢ'v"X岠E9|v[-iEH40RYlx}3 *em0=< ځhR^UIDo:1A >]ux]iy Rd2M"2~ļߥu%#c/IR^)BN1Byȸ|mڜ5[0I-s/}^TvB>Σ# P;-/EoLG|~;ZegRͨSTW,"5!ϭO=݀(}h/V\_1+jV'F8(wS4w>8cWL-zB|.dX-U,G#&X'E/mРu؟)ad` )zxW)zˆ ,7>ouotr)Fc'[(`ZBy s[^>["v@ؗFL<N1U*v# *m !kzlnJU`6׈<2T2H('Qifi?7}@J=0aO馐Sg|MJeݓɃ<)Y3 hOo?cFm9Q_7k;_%׏~cb< tZLCBPB-)KAsm#p|W"C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ϝ DECC$STRLEN<~PϊGG03P`ECHO RETURN_VMS G*3G3G3G3G3=G3G3G3G3GH3G3G3GD3G3G3PGD3G3G3G3\R=:G3SG3RS\S\& DECRYPT_BYTEb\P\\b\~ UPDATE_KEYSRS\S\G3G3RRG3˚bTTPP^ЬRRYR ZRUVˏRЬRբ<DECC$GA_STDERRRbX PDECC$GA_STDOUTRbXˏR%լ  ЬRլ RR  ֬ ЬSd\ SCREENSIZE\ˏR11X  DECC$PUTCX DECC$FFLUSHգX%ԣh֣`ѣ`\ϒS8P`ˏREЬRբ<< DECC$ISATTYP/ DECC$ISATTYP"DECC$GA_STDERR;Rb  DECC$PUTCDECC$GA_STDERRRb DECC$FFLUSHЬRЬRբX1UZ1PePP V0PSCREENLINEWRAPP"ePP  ЬPԠhЬP֠hѠhdVVqVЬRԢh֢`Ѣ`\XX DECC$FILENOYUSSSYP DECC$WRITEQPSQQTTW1PX DECC$FFLUSHUYnR8P`UUZ1DYU Ь T1X DECC$FILENOTYP DECC$WRITERPTRRSSW1X DECC$FFLUSHˏRdЬRբ<[ DECC$ISATTYPN DECC$ISATTYPADECC$GA_STDERR<Rb DECC$FILENOTYP DECC$WRITERPTRRSSW+DECC$GA_STDERRRb DECC$FFLUSHЬTRSR SSWWPPԼ QQP^RЬPDECC$GA_STDERRP` DECC$DFPRINTFЬPݬDECC$GA_STDERRP` DECC$DFPRINTFDECC$GA_STDERRP` DECC$FFLUSHˏ P1TT_GETCHPSSPP (P #P PqPQ TT_GETCHPS&DECC$GA_STDERRP` DECC$DFPRINTFDECC$GA_STDERRP` DECC$FFLUSHDECC$GA___CTYPEQSTˏ=TP@aPʏPT DECC$TOLOWERPQTQQPPq  RETURN_VMSЬQˏ P SPP ԡ`P<^UЬTdid< ~ DECC$MALLOCPSMG3P@P~ݬFNFILTERPRG3P`P~ݬFNFILTERPRxS DECC$DSPRINTFSRPwR dS|Rݬݬ RGETPPRS S DECC$FREERU P PUUPP^RECHOѬ : JG3 DECC$DSPRINTFG3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SPSУRS DECC$FREERS1XԼXЮ0RXBRSYBlЮ$SBgVRRfXhЮ0RBWSS TxWRRRRRYRSTRVVRЮ0SCS(fBcЮ0RB$WR[R1W[RRg8SxRRSZS cfJPjSЬ USU STPTTfhUS޼R3CbfUR޼SBchW[RxR,W RWRYVV VR(fBh,VV [SxSRYSSRSPRYRRYSSRSRYxWSSXSSSYSЮ0TSDl(P׮0Ю0RB$WxWRRRRRYRЮ0SRClRINFLATEH __iscntrl,t inflate_codes inflate_stored inflate_fixedVh inflate_dynamic\ inflate_block|inflatep inflate_free_L huft_build< huft_free$ Hk&   Y1>X 32%   `2, b2H d2d f2 q2 x2- 9 2R  2i  2 # 2  2  2Z 2e+ 3Z| 3!"k "3i $3` -3-_ .3U] 3 39( 3 3 3  4b7 *4gQ <4[ 4< 1 b4 f4l k48 4QQ 4a"X 4M MASK_BITSGDECC$GA___CTYPE INFLATE_CODES HUFT_BUILDMEMFLUSHFLUSHREADBYTE DECC$MEMSET DECC$MEMCPY DECC$MALLOC DECC$FREE t INFLATE_CODES |INFLATE  INFLATE_FREE L HUFT_BUILD  HUFT_FREE$CODE,$DAT\A $ADDRESS_DATAdR׮R1[[ 1vо$SծѮ SSЮP ^ЬSSУRS DECC$FREERSPHww16G#aV1.02MATCHV1.013-JAN-2001 19:50DEC C V6.2-003PլRDECC$GA___CTYPEQˏP@aPˏPRRP^ݬ ݬݬQPQQRRPP^ެTdScZSdZRSRSSX1 PZ?'ЬScRݬ SS݀dPX1PX1PZ*?R X1PR#Pݬ ݬdPQQX1]֬PX1Z[1RX1TЬRbRR! R^TTWWЬVSfR,SSfPP\S PP]VfPԚfRR]X1PRЬTdSPS-PPYTV1ެ U DECC$TOLOWERTYPP\Y1YЬQaPP-qR1Pe8DECC$GA___CTYPEQЬP`SˏSP@aPʏP SdPQPSQQSSЬQPP-zRaRaPRPke0DECC$GA___CTYPEQˏRP@aPʏP RdPQPRQQPRPPS$WX1Pݬ ~V~PX1RPRPYR֬ѬV1Wݬ ^~V~ϜPX1PX1PZ\ЬR֬bZX1Pլ 7DECC$GA___CTYPESZTˏTRBcRʏRT DECC$TOLOWERPRPTRRUZUլ <DECC$GA___CTYPETЬRbSˏSRBdRʏRS DECC$TOLOWERPRPSRRSSUSݬ ~ݬPXgR MATCH __iscntrl, ,match"Precmatch6 iswildD 8$  /" /W _& 0 0-  /0 {DECC$GA___CTYPE DECC$TOLOWER ,MATCH ISWILD$CODE$DATA $ADDRESS_DATAQPXXPPP9ЬQaRR\P QPR%R*P ֬RPww1`gNW#aV1.04PROCESSV1.013-JAN-2001 19:55DEC C V6.2-003 REPORTMSGSEEKMSGG`END_CENTRAL_SIGCENTRAL_HDR_SIG LOCAL_HDR_SIGDECC$GA___CTYPECHECKDIR GET_CRC_TABLEFREE_CRC_TABLEISWILD CHECK_FORMAT INFLATE_FREEEXTRACT_OR_TEST_FILESMAKELONGMAKEWORD DO_STRINGREADBUFOPEN_INPUT_FILE GET_CDIR_ENTUZ_END_CENTRALFREE_G_BUFFERS DECC$READ DECC$LSEEK DECC$CLOSE DECC$STAT DECC$STRNCMP DECC$MEMCPY DECC$DSPRINTFP[%s] P P%sEmpty zipfile. P caution: zipfile comament truncated OP End-of-central-directory signature not found. Perror [%s]: start of central directory not found; zipfile corrupt. %sPwarning [%s]: zipfile is empty Perror [%s]: NULL central directory offset (attempting to process anyway) LPerror [%s]: missing %ld bytes in zipfile (attempting to process anyway) 'Punzipsfx: cannot find myself! [%s] Perror: cannot allocate unzip buffers PRDECC$GA___CTYPEQˏP@aPˏPRRP ^\bS< ~ DECC$MALLOCPG3<~ DECC$MALLOCPG3G3G35G3 DECC$DSPRINTF<~PG3GG03P`R1 G3G63PEND_CENTRAL_SIGPCENTRAL_HDR_SIGP LOCAL_HDR_SIGKEND_CENTRAL_SIG3KCENTRAL_HDR_SIG3K LOCAL_HDR_SIG3G03 G|3PG43 G|3 PG|3P\\I\L SP\S\ 1G3AG3 cDECC$DSPRINTFPG3GG03P`FREE_G_BUFFERSSRRP^ INFLATE_FREECHECKDIRG3 FREE_CRC_TABLEG3G3G3 DECC$FREEG3G23G23 DECC$FREEG23G3 G3 DECC$FREEG3 G3 DECC$FREEG3G3P^VSG3ISWILDP7G3G3 DECC$STATP <G3RʏRPR@PdPSS LW1P W1PG3G&3 CHECK_FORMATPW1OPEN_INPUT_FILEP W1PG3 GET_CRC_TABLEPG3G3W1G*3G3G3G&3 G&3RЏRRςPXUZ_END_CENTRALPXXG"3 DECC$CLOSE֬XW1QGT3G3G"3 DECC$CLOSEXW1.PG3 <G~3RPG3G3G.3G.3S=S~G3G3e DECC$DSPRINTF<~PG3GG03P`X]SXG3PG3HG3G3 DECC$DSPRINTF<~PG3GG03P`G.3G3G.3XG31G31G3FG(3  SPSSfG3 DECC$DSPRINTFPG3GG03P`7PG3ϳG3 DECC$DSPRINTF<~PG3GG03P`G"3 DECC$CLOSEXXWbK UNZIP.BCK O.[UNZIP542.VMS-BINARIES]UNZIPSFX.VAX_DECC_OLB;1uZef1W1PG3G.3SzSP{ PQPPTTSUS? REPORTMSGG3SEEKMSGG3 DECC$DSPRINTFPG3GG03P`W1IUG*3_UG"3 DECC$LSEEKPG*3< ~G3G"3 DECC$READPG3G33W1PG3TG3TG3*PG3G3RTRG3RG3G3TG3G3READBUFPCENTRAL_HDR_SIGG3 DECC$SgTRNCMPP1uG.3G3G.3SzSP{ PQPPTTSUS? REPORTMSGG3SEEKMSGG3 DECC$DSPRINTFPG3GG03P`W1!UG*3_UG"3 DECC$LSEEKPG*3< ~G3G"3 DECC$READPG3G33W1PG3TG3TG3*PG3G3RTRG3RG3G3TG3G3READBUFPCENTRAL_HDR_SIGGh3 DECC$STRNCMPPM REPORTMSGG33G3 DECC$DSPRINTF<~PG3GG03P`G"3 DECC$CLOSEW1XG3G.3SzSP{ PQPPTTSUS@ REPORTMSGG3SEEKMSGG3 DECC$DSPRINTFPG3GG03P`W1UG*3_UG"3 DECC$LSEEKPG*3< ~G3G"3 DECC$READPG3G33WdPG3TG3TGi3*PG3G3RTRG3RG3G3TG3EXTRACT_OR_TEST_FILESPRRXRXG"3 DECC$CLOSEXWWPP^WSG&3TT 1|~G"3 DECC$LSEEKG&3G3G"3 DECC$READPG3G3G&31~G3G&3RRG3G3G31ZG3RbPPP1END_CENTRAL_SIGR DECC$STRNCMPPG3G3PPG3S1PGj3G3G31PzTP{ PQPPVV1VT~G"3 DECC$LSEEKPG*3VG3G"3 DECC$READPG3G3V1G3VRRG3G3G3SG3RbPPP-END_CENTRAL_SIGR DECC$STRNCMPPG3G3PPG3SG3G3G3G3G63 DECC$MEMCPY PVTG*3VRRǏ RUTS1TU1 DECC$STRNCMPRPkG*3G*3G"3 DECC$LSEEK< ~G3G"3 DECC$READPG3G3 1 G3PPG3G3G3OG3QaPPP)END_CENTRAL_SIGQbPG3G3PPG3SG3G3G3G3G63 DECC$MEMCPYTSTU1SzG83G33G3G3 DECC$DSPRINTF<~PG3GG03P`lG3 DECC$DSPRINTF<~PG3GG03P`S1PG3G3RG*3RG3READBUFP3SPMAKEWORDRbPG~3bPG3bPG3bPG3MAKELONGPG3MAKELONGPG3bPG3G3G3G3SSP^R<G3\]GT3GT3MG83E<G3~ DO_STRINGP1G3 DECC$DSPRINTFm<~PG3GG03P`RR\\P^ GET_CDIR_ENTP\\R1G3PGT3G3\GU3PPPG3\G,3XG3\ЬPP;P7P?PG3\PPPG,3 G3\ˏGv3\6G3\Ь\\ \ \G3\ G3\ PG3\ G3QˏGv3\P\PPRRPP 0^*READBUFP3S1GT3nGU3GV3GW3MAKEWORD\lPGX3lPGZ3MAKELONGRbPG\3bPG`3bPGd3bPGh3lPGl3lPGn3lPGp3lPGr3lPGt3bPGv3bPGz3SSPP ^READBUFP3S1G:3G;3MAKEWORDRbPG<3bPG>3MAKELONG\lPG@3lPGD3lPRoPROCESS __iscntrl,process_zipfilesGfree_G_buffers do_seekableu0  find_ecrec <uz_end_centraltprocess_cdir_file_hdr: get_cdir_entprocess_local_file_hdr %  4         " op '   u2 & 2 (  2  2          DECC$MALLOC DECC$FREqE  PROCESS_ZIPFILES FREE_G_BUFFERS <UZ_END_CENTRAL PROCESS_CDIR_FILE_HDR  GET_CDIR_ENT  PROCESS_LOCAL_FILE_HDR$CODE $DATA $ADDRESS_DATAGH3lPGL3bPGP3bPGR3<G<3\ʏ\-G3\ЬGD3G3\ЬGH3G3\Ь GL3GH3G3SSPP1A1A1AAAA11AAAA1A1ww1`pW#aV1.0r2TTYIOV1.013-JAN-2001 19:50DEC C V6.2-003P(line too long--try again) PrP SYS$COMMANDPլRDECC$GA___CTYPEQˏP@aPˏPRRP ^|~? SYS$ASSIGNPQʏP QS1P|~|~|~'2~ SYS$QIOWPQʏPQS12RˏRPRStլ|~|~|~#2~ SYS$QIOWPRʏPRS5P2QˏQPQS 2~ SYS$DASSGNPRʏPRSSSP $^|~?ޟs SYS$ASSIGNʏPSZP|~|~|~S9G3G3 DECC$DSPRINTFPG3GG03P`V1 ̀̀쀁ٜSPPP).?Phx Pϰ 1jPDECC$GA_RMS_FABR(PblG3,G3 DECC$STRLENP4DECC$GA_RMS_NAMR(`b(l SYS$PARSEPSˏSRShV1Pp|~8p SYS$ASSIGNPSˏSRS(V1P4|#S$RRSSxGL3@R~BRb@R~BRlb@R~BRb@<RRRVRWV12@R~BRb@R~BRb@R~BRb<RRR[R [1ѮgHR]Ԣ$PSHRТ$HRP$TSHRТ$HRT$hlSHRТ$HRh$ԮЮnЮP ^RT T DECC$FREE\ \ DECC$FREEX X DECC$FREEP P DECC$FREEhPh\ЬS\ DECC$FREEShH\bS\S \ DECC$FREEP^ЬQ<PˏPW<PPPXWXUP< UլUЬPU`ЬSSUSRURR DECC$MALLOCPTV1Pլ USSݬ T DECC$MEMCPYWPP]PI?PUЬPT DECC$MEMCPY7ЬPUT1&PXЬPUT MEMEXTRACT PT DECC$FREETTVVPP |RЬP׬P1PRRQQ Ь P֬ `PxRPPPSQRˏSP=SSRRRQQ Ь P֬ `PxRPPPSQRЬP֬S`RSSЬP֬`RSSЬP׬P1z ^SݬݬG3CRC32PG3G<3RPݬݬP`PRRPP^RVլ1#PQѡAЬTáPTPPSTSSV~~ DECC$MEMCPYSTPSSVPѠ1РUРTLSYS$WAITPSʏP S Ϟ LPݠ R VMS __iscntrl,< check_format open_outfileT hset_default_datetime_XABs0create_default_outputcreate_rms_outputcreate_qio_output| replace< find_vms_attrsDfree_up extract_blockdecompress_bits XflushM _flush_blocksWriteQIOݟ ϋ LPT"LPU(L SYS$WRITEPSʏP&S U LPݠ B B 2QQQP PU1PPԠլ1լ 1Sգ1УWУVLSYS$WAITPTˏTS T  LSݣ  ϸ LSV"LSW(5 UNZIP.BCK O.[UNZIP542.VMS-BINARIES]UNZIPSFX.VAX_DECC_OLB;1%L SYS$WRITEPTˏTS&T ρ LSݣ B n 2SSSUUUPP^R<FH SYS$SYNCHPSʏP2HSˏSPS  2ThP<|~@ݬݬ|~H08 SYS$QIOPSʏPSH Լ2TP< PP@TTPP|^RUլ1PQѡAЬTáPTPPSTSSU~~ DECC$MEMCPYSTPSSUPѠ*ݠݠϺPQQVRPԠլ1kTSդSSSS SSS~ݤhPVPVVPPX^UЬVS1<ŀYYTSTЬXTXeSXPP0Yh  DECC$DSPRINTFPGG03P`2W1?ݬVŀRR~ DECC$MEMCPYԬTPTVŀPPS~ DECC$MEMCPYTTXTVˏYP׬VYŀRR~P2W1լcPDECC$GA___CTYPEQˏRP@aQˏQPʏQ R$R-RP_R1cUXUPDECC$GA___CTYPES`RʏRBcRʏR!DECC$GA___CTYPESP`RʏRBcRʏR`R_e GL3eX.hG3 DECC$STRLENP@G3RR/oX CHECKDIRG3CHECKDIRT AG833G3Y G3 DECC$DSPRINTFPG3GG03P`MZgZbPR9G3j G3 DECC$DSPRINTFPG3GG03P`Z CHECKDIRG3CHECKDIRWZZPH^VˏXX1G3 DECC$STRLENP PP W1P' |RRR R.W1TX1ݬ DECC$STRLENPT+R[bTR.bT RR.1T:ЬScRR..RR.%R-bR.bGPRTRRW1Pݬ DECC$STRCPY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%s]: bad extra-field CRC %08lx (should be %08lx) PcentralPcentralPlseekPEOFPEOFPlocal$Plocal,Pwarning-5Ps8Ps;PVMS?PPKBP[empty] KP[text] TP[binary] C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMFNFILTER CLOSE_OUTFILEMAPNAMEMAPATTRCRC32MATCHINFLATEFNFILTERMAKELONGMAKEWORD DO_STRINGCHECK_FOR_NEWERFLUSHREADBYTEREADBUFDEFER_LEFTOVER_INPUT UNDEFER_INPUT OPEN_OUTFILEPROCESS_LOCAL_FILE_HDR]PtestdPextractnP pPinflatyP {P%-22s P OK P Px^ SWԮ8ԭ|LԮD|$òգp(xp~MALLOCPLTգpPDLTTpգt'xt~MALLOCPDTգtPDDTTtԭԭԮ0STRNCMP PROCESS_CDIR_FILE_HDR DO_STRING,MATCHHSPRINTFZLSEEKREADREADBUFPROCESS_LOCAL_FILE_HDR FREEMAPNAMECHECK_FOR_NEWERnFGETS@STRLEN<44RBòäREADBUFP3P01fP ٟä,P1ˏP<RPR$ äSTRNCMPRPRRdP<~xR8RRRSPRINTFPc1Rb<~SPRINTFPc1RbP01P PP01PRTգp3PݣÜ\DlTPRծLDLTTpR8Tգt1ݣà\DlTPRծDDD TTtR P֮4P֮$֭Ѯ4@1q*Tծ41P֮8TRBò.XzXP{ PQPPUUXVX1<~jPc1RbPѮ8U.M<~?jPc1Rb.(.XzXP{ PQPPUUXV P1X8<~jPc1RbP1V*V"(P*< ~"$P4<~VݮDǴjPc1RbP1eUU%PRURRUäP4<~XݮDǴjPc1RbP1ä,P1<~XݮDǴjPc1RbPѮ8..1ծ(1<~?jPc1Rb..(. PЮ(..ЭRzRP{ PQPP\\RR5SPRINTFPc1RbPѭ*Pݭ"(P*< ~"$P3P\\%PR\RR\äP4<~XݮDǴjPc1RbP1!ä,P4<~XݮDǴjPc1RbP1P P\/PPrP1P?Pբ<1բ81բ ޥnWPޥmWWѢ ޥlT+PLYPP\ZS[SSPPTTS@S~FNFILTERPߥdSPRINTFPb1\lScT R$EADBYTEPTT\\1PP\`1FLUSHPXX=5P`S PREADBYTEPSS\\1w1FLUSH1Pբ<բ8zբޥyWޥxWWѢ ޥwTP\ZS[SSTTS@S~FNFILTERPߥpSPRINTFPb1\lINFLATEPT1"T21բ<բ8 բ<bբ8]<~S@S~FNFILTERPtTBSXSSSPRINTFP%b1\lBP<~tT BSPXSS1SPRINTFPb1\lTSPSSXUTXPP<~S@S~FNFILTERPƠSPRINTFPb1\l UNDEFER_INPUTPբ< CLOSE_OUTFILEVJ     @   :) $       \    PROCESS_CDIR_FILE_HDRREADLSEEKM*EMCPYSTRLENSTRNCMPSPRINTFFGETSMALLOCFREE EXTRACT_OR_TEST_FILES D MEMEXTRACT $ MEMFLUSH l FNFILTER$CODE`$DATASTDINSTDOUTSTDERR_CTYPE_ERRNO VAXC$ERRNO LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGMG MASK_BITSFNAMESOEM2ISO VERSIONDATE CENTSIGMSGSEEKMSGFILENAMENOTMATCHED+EXCLFILENAMENOTMATCHED REPORTMSG)TRUNCEAS5 TRUNCNTSD$CHAR_STRING_CONSTANTS^P@PPcݔbЬPP D`P | P$* Pv P":ww1d2MaV1.03FILEIOV1.013-JAN-2001 19:13VAX C V3.2-044P??'".^%So??YϾ󨷵,ǎԐѥ噞ᅠƄФP׃Ѫ++++--+-+++---+i++_̯յݯ=Perror: cannot open zipfile [ %s ] $Perror: zipfile read error @Pwarning: filename too long--truncating. jPwarning: extra field too long (%d). Ignoring... P%s: write error (disk full?). Continue? (y/n/^C) Perror: z C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB- CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMREADBUFDEFER_LEFTOVER_INPUTGETPTT_GETCHECHO UPDATE_KEYS DECRYPT_BYTESCREENLINEWRAP SCREENSIZE RETURN_VMSFNFILTERWRITEOPENREADLSEEKISATTYMEMCPYSTRLENTOLOWERFFLUSHipfile probably corrupt (%s) P--More--(%lu)P--- Press `Q' to quit, or any other key to con.tinue --->P zP[%s] %s password: PEnter password: Ppassword incorrect--reenter: Pctx=stmP  Pbus errorPsegmentation violation+P[ %s ] P^ R|~OPENP""2<~SPRINTFPb1\lPPP^ \ ̔E#E̔̔IE^ \̔1̔̔̔I̔E̔/E̔^ TVЬRRWR1Pg< ~"READPRWP#<~ߦ$STRLENPߦ$d1P`P *PRPRUPUUSSݬMEMCPYSSSSR1NWPP|^ TVPĔĔP1< ~"READP P2<~ߦ$STRLENPߦ$d1RbECHO RETURN_VMS *Ĕ4ĔĔĔIĔ0EĔ PEĔRARSR\RU\(PcR DECRYPT_BYTEP\\Rcc~ UPDATE_KEYSSU\U\RP^YTЬRRWR XRSUЬRբ<iVV%լ  ЬRլ PP  ֬ ЬRd\ SCREENSIZE\11V FPUTCVFFLUSHբX"Ԣh֢`Ѣ`\R97ЬRբ<.ISATTYP!ISATTYPi FPUTCiFFLUSHЬRЬRբX1SX1cPP 1U0PSCREENLINEWRAPP"cPP  ЬPԠhЬP֠hѠhdUUiUЬPԠh֠`Ѡ`\PWSRRRWfP ~WRITEQPRQQQPVFFLUSHЬPSWP9SSX1LWS Ь S1SWfR ~WRITEPRPRSPPVFFLUSHRЬRբ<IISATTYP<ISATTYP/ݬ WйR ~WRITEPRPR PPiFFLUSHЬQRPR PPP^ P|^TUVЬP ߤeFPRINTFЬPݬeFPRINTFeFFLUSH2 2PTT_GETCHPSSPP (P #P PqPQ TT_GETCHPS>eFPRINTFeFFLUSHSRˏRP@R~TOLOWERPQRQQq  RETURN_VMSЬQ SPP ԡ`P^ TSWЬVfcf<~MALLOCPUGP`P~ݬFNFILTERPP@P~ݬFNFILTERPzUSPRINTFURPÍR fUÞRݬݬ RGETPPRU UFREERW P WWP^T RSECHOѬ 2P      #+3;CScsPPcc !1Aa  0@` P P(incomplete l-tree) P(incomplete d-tree) P^ V[)T-S%YЬ UDbRbjPMS޼TCdlVYRxR4V RVR[ZZ,PZR(jBg4ZZ,YRxRZ[RRZRPZ[ZZ[RRZRZ[xVRRRRR[RЮ0SRCp(P׮0Ю0RB$VxVRRRRR[RЮ0SRCpЮR׻R1mYY 1Nо$SծѮ SSPP ^ЬRRТSRFREESRPww1~ OaV1.02MATCHV1.013-JAN-2001 19:15VAX C V3.2-044P^ݬ ݬݬQPQQP^ZЬScTSTRSRSSPT?!ЬRbݬ RRݬNPRRRPT*3RP Pݬ ݬݬPTTP֬PрT[1RPЬUVeRR! R^VVXUXЬWSg,SSgRR\S PR]Wg՚gRR]PTЬUeRSR-SSYUW1 [TOLOWERVYRR\Y1YЬP`RR-pT1Pk(ЬRbSˏSRBj S~fPQSQQSSSUЬQQRbRR-tTTPaPPTaRTR]SS ˏTP@j R MATCH match recmatch  iswildA On"   C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMTOLOWER MATCH ISWILDM$CODE$DATASTDINSTDOUTSTDERR_CTYPE_ERRNO VAXC$ERRNOP LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGMG MASK_BITSFNAMESOEM2ISO VERSIONDATE CENTSIGMSG ENDSIGMSGSEEKMSGFILENAMENOTMATCHEDEXCLFILENAMENOTMATCHED REPORTMSGZIPNFO COMPILEDWITHkT~fPRTRRQTQQU XRݬ ~W~PRRPTPTPYT֬ѬW1 Xݬ ~W~PRPRRPT\ЬR֬bTPլ )TUˏURBjU~TOLOWERPSPQUSSUTUլ ,ЬRbTˏTRBjT~TOLOWERPSTSSTTUTݬ ~ݬ#PRPRRPP^4PЬP`QQ\P` PPQ%Q*P֬Pww1ZaV1.04PROCESSV1.013-JAN-2001 19:20VAX C V3.2-044 C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUMR CC$RMS_XABTRM GET_CDIR_ENTUZ_END_CENTRALFREE_G_BUFFERSCHECKDIR GET_CRC_TABLEFREE_CRC_TABLEISWILD CHECK_FORMAT INFLATE_FREEEXTRACT_OR_TEST_FILESMAKELONGMAKEWORD DO_STRINGREADBUFOPEN_INPUT_FILE GET_CDIR_ENTPerror: cannot allocate unzip buffers 'Punzipsfx: cannot find myself! [%s] LPerror [%s]: missing %ld bytes in zipfile (attempting to process anyway) Perror [%s]: NULL central directory offset (attem UNZIP.BCK_ O.[UNZIP542.VMS-BINARIES]UNZIPSFX.VAX_VAXC_OLB;1(RSpting to process anyway) Pwarning [%s]: zipfile is empty Perror [%s]: start of central directory not found; zipfile corrupt. %sOP End-of-central-directory signature not found. P caution: zipfile comment truncated P%sEmpty zipfile. P P[%s] P^ R T UVWX< ~MALLOCP<~MALLOCP(<~gSPRINTFPb1\lP 6PddeefKKKբ0Sբ4\P\T\SS||P@PL XPPXP (ߧ'SPRINTFPb1\l INFLATE_FREECHECKDIR FREE_CRC_TABLEFREE22FREE2 FREE FREEXP^ \ INFLATE_FREECHECKDIR FREE_CRC_TABLEFREE22FREE2 FREE FREE^WUYZ RVSISWILDP7STATP <PʏPQP@QQSSLQ QQP& CHECK_FORMATPPOPEN_INPUT_FILEP P GET_CRC_TABLEPP*&PPPS PЏSSPX[TIբTB8=<~ DO_STRINGP)<~ƀSPRINTFPb1P`TTXX"CLOSE֬XPբTբ"CLOSEXPSբ <~PSŒ..T4<~T~VLSPRINTFPb1P`XUTPH@<~ƘSPRINTFPb1P`..X11բ7Ѣ( ާSާSSgSPRINTFPb1P`-<~SPRINTFPb1P`"CLOSEXXPPP.SzSP{ PQPPTTSUS-ijSPRINTFPb1P`PU*UU"LSEEKP*< ~"READP3PTT%PPWTPPT¤READBUFP ¤STRNCMPP1?..SzSP{ PQPPTTSUS-ijSPRINTFPb1P`PU*RU"LSEEKP*< ~"READP3PTT"PTPPT¤READBUFP ¤STRNCMPP?<~iSPRINTFPb1P`"CLOSEPX.SzSP{ PQPPTTSUS-ijSPRINTFPXb1P`PU*UU"LSEEKP*< ~"READP3PTT%PPTPPTEXTRACT_OR_TEST_FILESPXPX"CLOSEXPP^Y R TZU&VV 1|~"LSEEK&"READP&1e&SS1APScP+dSSTRNCMPPPPU11PzVP{ PQPPXX1XV~"LSYEEKP*X"READPX1XSSKScP+dSSTRNCMPPPPUP6MEMCPY PXV*XSSǏ SWVU1VW1STRNCMPSP**"LSEEK< ~"READP 1KQaPPP%dQcPPPU6MEMCPYVUVW1&U_բ8բ+Z<~ߩSPRINTFPb1Sc<~OSPRINTFPb1ScPS*SŒ߭READBUFP3PMAKEWORDUeP~ePePePMAKELONGPMAKELONGPePP^ RSTIբTBբ8=<~ DO_STRINGP)<~ÀSPRINTFPb1\lTTPP^ R GET_CDIR_ENTPPTPU\\ UQQQ\[Ѣ,N\ЬPP/ P*P?P\PѢ, \v1\Ь\\ \ \\ \ P\ Qˏv\P\PPP0^ R*߭READBUFP3PTUVW֞MAKEWORDScPXcPZڞMAKELONGTdP\dP`dPddPRPROCESSprocess_zipfilesfree_G_buffersT do_seekableX find_ecrec< \uz_end_centralj process_cdir_file_hdr  get_cdir_entprocess_local_file_hdr  4          #j  ]     1  UZ_END_CENTRALFREE_G_BUFFERSSTATREADLSEEKCLOSEMEMCPYSTRNCMPSPRINTFMALLOCFREE PROCESS_ZIPFILES FREE_G_BUFFERS < UZ_END_CENTRAL PROCESS_CDIR_FILE_HDR  GET_CDIR_ENT PROCESS_LOCAL^_FILE_HDR$CODE$DATASTDINSTDOUTSTDERR_CTYPE_ERRNO VAXC$ERRNO LOCAL_HDR_SIGCENTRAL_HDR_SIGEND_CENTRAL_SIGMG MASK_BITSFNAMESOEM2ISO VERSIONDATE CENTSIGMSGSEEKMSGFILENAMENOTMATCHEDEXCLFILENAMENOTMATCHED REPORTMSG$CHAR_STRING_CONSTANTShcPlcPncPpcPrcPtdP_vPzP ^ R߭READBUFP3P:;MAKEWORDTdP<dP>MAKELONGScP@cPDcPHcPLdPPdPR<<\\'\ЬD\ЬH\Ь LH”P P1=1=1====11====1=1ww1 Z[aV1.02TTYIOV1.013-JAN-2001 19:08VAX C V3.2-044P PSYS$COMMANDP PrP(line t`oo long--try again) P^|~? SYS$ASSIGNPQPQP|~|~߭|~߭'2~ SYS$QIOWPQPQP2QQQPլP|~|~߭|~߭#2~ SYS$QIOWPQPQP2QQQP2~ SYS$DASSGNPQPQPP ^|~? SYS$ASSIGNPP|~|~߭|~߭R>ScbRST< "z""<SʏSxRRS$L|~$|~~ SYS$QIOWPSS2SSSȱc SYS$DASSGNPipliy}uiuuu P^V WZXY\1TOLOWERSP~SPRINTFPg1RbhFFLUSHh ߭FGETSPDRRRBjR3~cPo#~cPv~cPn1v{RRRBj~TOLOWERPP\P\PPnP1?P[s(` CC$RMS_NAM٭4R4R(4 SYS$CREATEP[[84RԢ(4R44RBP4R4 SYS$CREATEP[[P^[ ZX2Ԯ4|<|D|TծP * matches a sequence of 0 or more characters / ? matches exactly 1 character K [...] matches any single character found inside the brackets; B ranges are specified by a beginning character, G a hyphen, and an ending character. If a '!' or '^' L immediately follows the left bracket, then any character 6 not in the given range is matched.  2 Qualifiers  /ZIPINFO  /ZIPINFO  H Displays information about the Zip archive and the files contained H therein. This function used to be provided by a separate ZipInfo program.  = The following qualifiers may be specified with /ZIPINFO:  E /SHORT Short UNIX "ls -l" format (default) < /MEDIUM Medium UNIX "ls -l" format : /LONG Long UNIX "ls -l" format < /VERBOSE Verbose, multi-page format > /ONE_LINE Filenames only, one per line 4 /HEADER Print header lines 8 /TOTALS Print totals for files M /TIMES Print file times in sortable decimal format D /[NO]CASE_INSENSITIVE Match filenames case-insensitively L /[NO]PAGE Page screen output through built-in "more"  /BINARY  * /BINARY[=KEYWORD] /NOBINARY (default)  H Selects conversion to VMS "standard" binary file format, which is H "fixed length 512 byte records, no record attributes". The & optional keywords recognized are: K AUTO Automatica  UNZIP.BCK O&[UNZIP542.VMS-BINARIES]UNZIP_CLI.HLP;1Nlly extracts files marked as "binary" (rather N than "text") in standard VMS binary file format. (default) J ALL Extracts all files in standard VMS binary file format. & NONE Same as /NOBINARY.  H Note that a combination of /BINARY[=AUTO] and /TEXT[=AUTO] is $ allowed. (see /TEXT qualifier)  /BRIEF   /BRIEF (default)  H When used with /LIST, specifies that a brief listing of the H archive's contents is to be displayed. A brief listing shows the D length, date, time, and file name for the files in the archive.  /CASE_INSENSITIVE  4 /CASE_INSENSITIVE /NOCASE_INSENSITIVE (default)  H Match filenames case-insensitively. (Good default option under VMS.)  /COMMENT   /COMMENT /NOCOMMENT  ! Display the archive comment.  /DIRECTORY   /DIRECTORY=directory-spec  H Specifies the output directory where all the extracted files are to  be placed.  /EXCLUDE   /EXCLUDE=(file[,...])  H A comma-separated list of files to exclude when extracting files. H If multiple files are specified, the list should be included in  parentheses.  /FRESHEN   /FRESHEN /NOFRESHEN  H Freshen existing files; replace if newer. Does not cause any new  files to be created.  /FULL  /FULL  H When used with /LIST, specifies that a full listing of the H archive's contents is to be displayed. A full listing shows the H length, compression method, compressed size, compression ratio, G date, time, CRC value, and file name for the files in the archive.  /HELP  /HELP  = Displays a one-page brief help screen and exits quietly.  /JUNK   /JUNK /NOJUNK (default)  H Junk the stored paths (don't recreated the archive's directory  structure.  /LIST  /LIST  H List the contents of the archive. /BRIEF and /FULL can be used to H specify the amount of information displayed. The default is /BRIEF.  /LOWERCASE  & /LOWERCASE /NOLOWERCASE (default)  H Convert filenames from all-uppercase operating systems to 5 lowercase. This option has no effect under VMS.  /OVERWRITE   /OVERWRITE /NOOVERWRITE  H The qualifier /OVERWRITE forces overwriting of existing files when H extracting. The negation /NOOVERWRITE results in never overwriting H an existing file. The default action is to prompt for desired 5 action when about to overwrite an existing file.  H For VMS, "overwriting" results in the creation of a new version of H the file, unless version numbers are stored in the archive and  /VERSION is specified.  /PAGE   /PAGE /NOPAGE  > Feed all screen output through the built-in "more" pager.  /PASSWORD  " /PASSWORD=decryption-password  H Specifies a decryption password and prevents UnZip from prompting H for a password in case the specified decryption key was wrong. The H supplied string must be enclosed in double-quotes whenever it . contains lowercase or special characters.  /PIPE  /PIPE  @ Extract files to SYS$OUTPUT with no informational messages.  /QUIET   /QUIET[=SUPER]  H Perform operations quietly. The keyword SUPER can be specified to % make operations even more quiet.  /RESTORE   /RESTORE /NORESTORE  0 Restore file owner and protection settings.  /SCREEN   /SCREEN /NOSCREEN  : Extracts matching files to SYS$OUTPUT (the terminal).  /TEST   /TEST /NOTEST   Test archive files.  /TEXT  & /TEXT[=KEYWORD] /NOTEXT (default)  H Selects conversion to VMS standard text file format. The optional  keywords recognized are: I AUTO Automatically extracts files marked as "text" (rather N than "binary") in standard VMS text file format. (default) H ALL Extracts all files in standard VMS text file format. $ NONE Same as /NOTEXT.  H A similar functionality is available for binary files, see  qualifier /BINARY.  /UPDATE   /UPDATE /NOUPDATE  6 Update existing files; create new ones if needed.  /VERSION  " /VERSION /NOVERSION (default)  % Retain VMS file version numbers. 2 Authors H Info-ZIP; currently maintained by Greg Roelofs. VMS support H maintained by Igor Mandrichenko, Christian Spieler and Hunter A Goatley. Originally based on a program by Samuel H. Smith. y > VMS on-line help ported from UNZIP.TXT by Hunter Goatley. 2 Exit_Codes H On VMS, UnZip's UNIX style exit values are mapped into proper VMS  status codes: C 1 (success) normal exit, f8 (0x7fff0000 + 16*UnZip_errnum) -W- warnings = (0x7fff0002 + 16*UnZip_errnum) -E- normal errors < (0x7fff0004 + 16*UnZip_errnum) -F- fatal errors  H The UnZip error level (or exit code) approximates the exit codes 9 defined by PKWARE and takes on the following values: + VMS UnZip Type of error e severity errcode E - 0 normal; no errors or warnings detected. u J W 1 one or more warning errors were encountered, J but processing completed successfully any- J way. This includes zipfiles where one or J more files was skipped due to unsupported J compression method or encryption with an / unknown password.  J E 2 a generic error in the zipfile format was J detected. Processing may have completed J successfully anyway; some broken zipfiles J created by other archivers have simple work- & arounds.  J F 3 a severe error in the zipfile format was J detected. Processing probably failed imme- & diately.  J F 4 unzip was unable to allocate memory for one J or more buffers during program initializa- # tion. e J F 5 unzip was unable to allocate memory or J unable to obtain a tty to read the decryp- / tion password(s). v J F 6 unzip was unable to allocate memory during 4 decompression to disk.  J F 7 unzip was unable to allocate memory during 6 in-memory decompression.  2 F 8 [currently not used]  D E 9 the specified zipfiles were not found.  J E 10 invalid options were specified on the com- ( mand line.  ; E 11 no matching files were found. N J F 50 the disk is (or was) full during extraction.  J F 51 the end of the ZIP archive was encountered * |F gx mpXC_OLB;1Nnlv exՆGzп:o_ MjgPղEjkiRX "lyajl 1:o }%k Pl˙8`G[4x/ts1d2}o{gOJo9x_)ه䓌lwp( f..]nq3U TC V5STx{q>8ALym Of*I%DjK- 藄u$dةBHuǒ4٥ %yXZ G ޾8`=ND+?|q"PWs&1 vܰxk%BҔ,r!QWbE%̈L/OU܎"x#oYFWw~*q3 =s NaLUGjPC2#ڀ;RN k6^َ)T A(I -je8disN5Ybd]צn奁QQ0=8@ F9?t-)e5Zd $p2o+}@#-2aYgn\7yՠte4f |u o': t2DG7}[6AXaCT^n2_V{?dk -\۴/aY`5<O=ZW"S &١@vܠ96)Kc"r &N;ĔVB_qTBx&-n(.K^:$\sP> {K=>qXWDw}OkW6_!' U 7Xc(Gă>3(R!Z" Gg@uq|/ Ѫog.@{n'h1D[pnMo#jU{4rlpcedݥI;L>[(/8KOzYWA(_"|L#dseg\1@CXp֌\~)_u]e!:I؝dTu͞HzΌF*^X lc@u r[DOL0 BC?>"ztkcg~)BVZ \{#WɭDX+%4rS <2o T,7:d}H!V y0>Bď,C8Ug@" Άi+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 81 no files were found due to unsupported com- J pression methods or unsupported decryption. J (If even one additional file is successfully H processed, however, the exit status is 1.)  J E 82 no files were found due to bad decryption J password(s). This is also the exit status J if no files were found due to a combination J of unsupported compression and bad pass- J words. As in the previous case, however, a J single successful file will result in an 8 exit status of 1 instead.)  H In addition, there is a compilation option to expand upon this H behavior: An executable compiled with the option RETURN_CODES H defined displays a human-readable explanation of what the error  status means. 2 UNIX_Options H The default action of UnZip is to extract all zipfile entries. The 5 following options and modifiers can be provided: e  -Z ZipInfo mode 6 -c extract files to SYS$OUTPUT (terminal) F -f freshen existing files (replace if newer); create none 7 -h show brief help screen and exit quietly a1 -l list archive files (short format) gF -p extract files to SYS$OUTPUT; no informational messages " -t test archive files @ -u update existing files; create new ones if needed 3 -v list archive files (verbose format) 0 -z display only the archive comment   MODIFIERS M -a auto-extract only text files in standard VMS text file format o) -aa extract all files as text gM -b auto-extract only binary files in VMS fixed 512 bytes records aK -bb extract all files as binary VMS fixed 512 byte record files I -j junk paths (don't recreate archive's directory structure) e< -n never overwrite existing files; don't prompt 7 -o OK to overwrite files without prompting e@ -q perform operations quietly (-qq => even quieter) 2 -C match filenames case-insensitively M -L convert filenames to lowercase if created on MSDOS, VMS, etc. nN -P supply decryption password on the command line (insecure!) < -M page output through built-in "more" function 1 -V retain (VMS) file version numbers wF -X restore owner/protection info (may require privileges)  H Note that uppercase options such as -C, -L, -M, -P, -V, -X and -Z / must be specified in quotes. For example:  # $ unzip "-VX" -a zipfile e2 UNZIP_OPTS_Default H UnZip allows to modify its default behaviour by specifying (UNIX H style) option defaults via the UNZIP_OPTS logical name. For H example, the following will cause UnZip to match filenames without H regard to case, restore owner/protection information and perform 0 all operations at quiet-level 1 by default:  % $ define UNZIP_OPTS "-qCX" " H Note that the quotation marks here are required to preserve H lowercase options (opposite of the command-line behavior). To H negate a default option on the command line, add one or more minus H signs before the option letter, in addition to the leading switch  character `-':   $ unzip --ql zipfile   or E  $ unzip -l-q zipfile T H At present it is not possible to decrement an option below ; zero--that is, more than a few minuses have no effect. e H UNZIP_OPTS may be defined as a symbol rather than a logical, but if + both are defined, the logical is used. e)*[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1+,#.u/ 4uv- O0123KPWOv56}a7 za89GHJ % Librarian A09-22i%a*"i%a!u,v@8UNZIP0 VMS_UNZIP_CLD5VMS_UNZIP_CMDLINE[ CENTSIGMSG5 CLI_BINARY5CLI_BINARY_ALL5CLI_BINARY_AUTO5CLI_BINARY_NONE5 CLI_BRIEF5CLI_CASE_INSENSITIVE5 CLI_COMMENT5 CLI_DIRECTORY5 CLI_EXCLUDE5 CLI_FRESHEN5CLI_FULL5 CLI_HEADER5CLI_HELP5 CLI_INFILE5CLI_INFORMATION5CLI_JUNK5CLI_LIST5CLI_LONG5 CLI_LOWERCASE5 CLI_MEDIUM5 CLI_ONE_LINEEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSGSEEKMSGUNZIPUNZIPSFXBANNER5 UNZIP_COMMANDUSAGEUZ_OPTS VERSIONDATE5 VMSCLI_USAGE0 VMS_UNZIP_CLD5VMS_UNZIP_CMDLINE__MAIN;CLI_LONGCLI_TYPE REPORTMSG__MAINrz UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1uy_5 CLI_LOWERCASE5 CLI_MEDIUM5 CLI_ONE_LINE5 CLI_OVERWRITE5CLI_PAGE5 CLI_PASSWORD5CLI_PIPE5 CLI_QUIET5 CLI_RESTORE5 CLI_SCREEN5 CLI_SHORT5CLI_SUPER_QUIET5CLI_TEST5CLI_TEXT5 CLI_TEXT_ALL5 CLI_TEXT_AUTO5 CLI_TEXT_NONE5 CLI_TIMES5 CLI_TOTALS5CLI_TYPE5 CLI_UPDATE5 CLI_UPPERCASEEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSG5 CLI_UPDATE5 CLI_UPPERCASE5 CLI_VERBOSE5 CLI_VERSION5CLI_YYZ5 CLI_ZIPFILEEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSG n UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1u51aV1.0AAUNZIPV1.013-JAN-2001 19:07Compaq C V6.2-003  $ABS$i $CODE$U $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$ $READONLY$( MASK_BITS VERSIONDATEH CENTSIGMSG@SEEKMSG (FILENAMENOTMATCHED(0EXCLFILENAMENOTMATCHED REPORTMSG HUNZIPSFXBANNER DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCMP DECC$SIGNAL DECC$ISATTY GLOBALSCTORG(J MAIN(J UNZIP(JUZ_OPTS(J` USAGE PROCESS_ZIPFILESHANDLER RETURN_VMS VMS_UNZIP_CMDLINE VMSCLI_USAGE0  MASK_BITSFNAMES0 VERSIONDATE0 CENTSIGMSG( SEEKMSG8 FILENAMENOTMATCHED8 EXCLFILENAMENOTMATCHED0  REPORTMSG0 UNZIPSFXBANNER(J`__MAIN DECC$MAIN DECC$EXIT DECC$$SHELL_HANDLER = # ? ~4G0^8^@cG("#G$" "@[Hb=/@Zk$=(b# @0B8bG4G@ZkcG0]8]@P#k#G^0[~^/ GG >8b@Zk =hb#@ B(bG4G/@ZkG]] 4G0#k/#TG^([~> ^(~0GG8;0bTG@Zk(B0b8"GTG@Zk(B0b8"bTGTG@Zk(B0b8"tGTG@ZkHBPb#$"="TG@Zk6"="xb#8@=}. ",p#t! cBbX"""@ZkB #!Bp @C1FWJpxBp㳜C"òpC4B41Btx4G//xGhBpb@ZkG] ](}0@#k#4G~^ ^(~08@޴HPXG#GРGG GG/&1@ g`.""JF.TJJ=@"4BBH\BCk///0 B//  4BGF 0B / 4BGF/ 0C 賱/ G(// G(// DG(D( $G$(//, 4BGF,,0B,/ XGX(~// 0Gx0(v//4 8CGG4m40C4i/8 G#G8`8(#8[///8 8CGG8Q80C8 M/ <GH<(F// DG@D(>// ,(G8,6// LG0L(.//5BXF)6/6K&%.JF0///P 4BGFPP0BP/T( 91CG GT( T0BT/4G///.6#"TJJ /PBXb_"GC4G@Zk<(DH0 ⦰CCCFF0BpF2FF8bF&Fʶ7"=C@"TG@ZkE =G"!GG4G@Zk (TG] @ TG(] B H4h0&TG ¦ʵ0B8bF6"C`=@"1"@Zk} =[G"G@Zk4XpB4Gxb4G@ZkX賳CPBXb}ðG4G@Zk(8( "B0B8b&ʰY @ 1"=C^GGTGh"G`"@ZkE }=GGG@Zk<(HT(DDD3@GðG] ](}08@ݤHPX`#kp[{#"2$~!TG^G ^(~08"G/G#[~G"=GG;b@Zk}=pG[CGGG@Zkp"bBb$G B"1"8s"G@Zk}pGG[GG$C@ZkG] ](}PD08@#k4HG` DECC$MAIN4Lb#` DECC$MAIN4\@` DECC$MAIN4pG DECC$EXIT4tb#` DECC$EXIT4#@ DECC$EXIT4G GLOBALSCTOR4b#  GLOBALSCTOR4@ GLOBALSCTOR4G RETURN_VMS4b#  RETURN_VMS4@ RETURN_VMS4,G` DECC$SIGNAL4Tb# DECC$SIGNAL4\@` DECC$SIGNAL$4`Gx DECC$SIGNAL4db# DECC$SIGNAL4t@x DECC$SIGNAL4xG DECC$SIGNAL4|b# DECC$SIGNAL4@ DECC$SIGNAL4G DECC$SIGNAL4b# DECC$SIGNAL4@ DECC$SIGNAL< GVMSkT UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1u $%_UNZIP_CMDLINE< b#VMS_UNZIP_CMDLINEp p< @VMS_UNZIP_CMDLINE4 G0 DECC$STRCMP4b# DECC$STRCMP4 ,@0 DECC$STRCMP< GPROCESS_ZIPFILES< b#PROCESS_ZIPFILES< @PROCESS_ZIPFILES4G& VMSCLI_USAGE4b# VMSCLI_USAGE4@ VMSCLI_USAGE4LG DECC$GSPRINTF4\b# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4DG\ DECC$ISATTY4'Pb# DECC$ISATTY4X@\ DECC$ISATTY4hG VMSCLI_USAGE4lb# VMSCLI_USAGE4@ VMSCLI_USAGE4G DECC$GSPRINTF4b# DECC$GSPRINTF4@ DECC$GSPRINTF4 G DECC$GSPRINTF4 b# DECC$GSPRIN(TF4 @ DECC$GSPRINTF4 G8 DECC$GSPRINTF4 b# DECC$GSPRINTF44 @8 DECC$GSPRINTFu u=]Up @P0) @p`X. Quote uppercase options =0";=`4 7G0 DECC$GSPRINTFx;; VMSCLI_USAGE;=p DECC$ISATTY ;=0" ;=@(  DECC$SIGNAL7HANDLER* VMS_UNZIP_CMDLINE=-x PROCESS_ZIPFILES7FNAMES DECC$STRCMP=0";=0(  RETURN_VMS GLOBALSCTOR=00";=P( 7DECC$$SHELL_HANDLER= DECC$EXIT DECC$MAIN=0"` ;=@< M +=@1caution: both -n and -o specified; ignoring -o 8=H:Valid options are -tfupcz; modifiers are -abjnoqCL%sV%s. x=XMerror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid =uz_optsunzip=main=usageB B=*"??0 0 =14 Janua,ry 2001g g =OGerror: expected central file header signature not found (file #%lu). \ \ =D<error [%s]: attempt to seek before beginning of zipfile %sD D =,$caution: filename not matched: %s M M =5-caution: excluded filename not matched: %s = (please check that you have transferred or created the zipfile in the appropriate BINARY mode--this includes f-tp, Kermit, AND unzip'd zipfiles) a a=IAUnZipSFX %d.%d%d%s of %s, by Info-ZIP (Zip-Bugs@lists.wku.edu). > >=.&%UNZIPCompaq C V6.2-003? ?=  4=TRANSFER$BREAK$GO# #= __iscntrl =  = 4 4= main4=5-, K@ K@ K@ R@ $ $= .4: := 4=  =  44= unzip 4= ^@N ^@N ^@N @ @ @ @C. A. $A% QA WAT$ $= P4: := 4=  = 44= uz_o/pts4=% A  A  A A A Ae A  A A  A A B 6 B B  B B B B B0 B B   ;C  DC EC LC MC A lB lB qC qC qC qC tC wC zC }C }0C C  C C  C0$ $=  4: := 0 4=  = ` 44= usage` 4=WON C C C C C C C  C$ $=  4: := p 4=  ` `= 4` 14= __main84: := 4=  =   `ww1ZEa02-007:: VMS_UNZIP_CLD02-00713-JAN-2001 19:00//OpenVMS Command Definition Utility A05-148 8d De0i VMS_UNZIP_CLD S CoX CLI$TABLES  = X UNZI ,(T2l UNZIP4!)P1ZIPFILEZi=p file8a!(P2INFILEFiles to UnZip(BINARY$ =TEXT(4SCREEN(\ DIRECTORY(FRESH=EN$HELP$JUNK$LIST$= BRI3EF$8 FULL(`  OVERWRITE$ Q=UIET$ TEST$TYPE$PIPE(=PASSWORD(@ UPPERCASE(hUPDATE(=VERSION(VERBOSE(RESTORE(%G UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1u 34C=OMMENT(a0EXCLUDE0`CASE_INSENSITIVE( L=OWERCASE$PAGE( YYZ_UNZIP(ZIPINFO,=`( INFORMATION4\!)P1ZIPFILEZip file<a!(P2IN=FILEFiles to display(ZIPINFO(5ONE_LINE$ =SHORT(4MEDIUM$XLONG(VERBOSE=(HEADER(COMMENT( TOTALS$= TIMES(aD EXCLUDE0t CASE_INSENSITIVE$= PAGE 6QUIET_MODIFIER$SUPER$CONVERT_KEYWORDS=$$AUTO$HALL$NONE= 0    4   =`X$ $ $ @ L   ww10Ma02-0077OOVMS_UNZIP_CMDLINE02-00713-JAN-2001 19:07Compaq C V6.2-003  $ABS$i$CODE$ $LITERAL$$LINK$$DATA$$BSS$ $READONLY_ADDR$X $READONLY$CLI_TEXT  CLI_TEXT_AUTO  CLI_TEXT_ALL  CLI_TEXT_NONE CLI_BINARY CLI_BINARY_8AUTO CLI_BINARY_ALL CLI_BINARY_NONE(CLI_CASE_INSENSITIVE CLI_SCREEN  CLI_DIRECTORY CLI_FRESHENCLI_HELPCLI_JUNK  CLI_LOWERCASECLI_LIST CLI_BRIEFCLI_FULL  CLI_OVERWRITE CLI_QUIET CLI_SUPER_QUIETCLI_TESTCLI_TYPECLI_PIPE9  CLI_PASSWORD  CLI_UPPERCASE CLI_UPDATE CLI_VERSION CLI_RESTORE CLI_COMMENT CLI_EXCLUDE CLI_INFORMATION CLI_SHORT CLI_MEDIUMCLI_LONG CLI_VERBOSE CLI_HEADER CLI_TOTALS CLI_TIMES  CLI_ONE_LINECLI_PAGECLI_YYZ CLI_ZIPFILE CLI_INF:ILE  UNZIP_COMMAND DECC$FREE DECC$CALLOC DECC$MALLOC DECC$REALLOC DECC$GSPRINTFDECC$GA___CTYPE DECC$STRCPY DECC$STRNCPY DECC$STRLENGUSAGE8Jp0VMS_UNZIP_CMDLINE0J VMSCLI_USAGELIB$GET_FOREIGN LIB$GET_INPUTLIB$SIG_TO_RET STR$CONCAT(STR$FIND_FIRS;T_SUBSTRING0 CLI_TEXT0 CLI_TEXT_AUTO0 CLI_TEXT_ALL0 CLI_TEXT_NONE0 CLI_BINARY0 CLI_BINARY_AUTO0 CLI_BINARY_ALL0 CLI_BINARY_NONE8 CLI_CASE_INSENSITIVE0  CLI_SCREEN<0  CLI_DIRECTORY0  CLI_FRESHEN0 CLI_HELP0 CLI_JUNK0  CLI_LOWERCASE0 CLI_LIST0  CLI_BRIEF0 CLI_FULL0  CLI_OVERWRITE0  CLI_QUIET0 =CLI_SUPER_QUIET0 CLI_TEST0 CLI_TYPE0 CLI_PIPE0 CLI_PASSWORD0 ! CLI_UPPERCASE0 " CLI_UPDATE0 # CLI_VERSION0 $ CLI_RESTORE0 % CLI_COMMENT0 & CLI_EXCLUDE0> 'CLI_INFORMATION0 ( CLI_SHORT0 ) CLI_MEDIUM0 *CLI_LONG0 + CLI_VERBOSE0 , CLI_HEADER0 - CLI_TOTALS0 . CLI_TIMES0 / CLI_ONE_LINE0 0CLI_PAGE( 1?CLI_YYZ0 2 CLI_ZIPFILE0 3 CLI_INFILE0 4 UNZIP_COMMAND  VMS_UNZIP_CLD CLI$DCL_PARSE CLI$PRESENT CLI$GET_VALUE DECC$$SHELL_HANDLERUNZIPSFXBANNER OTS$INSV_VOL =G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[kKk!`Gk?0 C]:v@K :C_ E %'B."rPITJF>B`/![lK`?G B(b="TG@ZkG$}4GG(]0]8}@HPݤX`h=p]x}#kPBXbG4G@Zk$ //#G~GTG ^G(GcG"4G=8;0[=/@ZkTtcG@ZkcG/ ](0#kH;#~4GK!^@ ^X[(~08G#G `b@ZkG b(B0bC#$"!"G=GGTG@"x"G/@Zk}GGG[GG@Zk8"(B0b$ G@B"1"=tG/@Zk}GGG[GG@Zk8"(B0b$GhB"1"tG/@Zk}GGG[GG@Zk]TG@DG] ](}08@P#k4GLIB$GET_FOREIGN4b#pLIB$GET_FOREIGN4L@LIB$GET_FOREIGN4 G( STR$CONCAT4b#p STR$CONCAT4$@( STR$CONCAT4,GL CLI$DCL_PARSE44b#p CLI$DCL_PARSE4H@L CLI$DCL_PARSE4`G| DECC$MALLOC4db#p DECC$MALLOC4x@| DECC$MALLOC4M G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4  GH CLI$PRESENT4 ,b#p CLI$PRESENT4 D@H CLI$PRESENT4 hG| CLI$PRESENT4 lb#p CLI$PRESENT4 x@| CLI$PRESENT4 G CLI$PNRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 8GL CLI$PRESENT4 <b#Op CLI$PRESENT4 H@L CLI$PRESENT4 hG CLI$PRESENT4 lb#p CLI$PRESENT4 |@ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT 4 G CLI$PRESENT4 b#p CLI$PRESENT4 OP@ CLI$PRESENT4 G  CLI$PRESENT4  b#p CLI$PRESENT4 @  CLI$PRESENT4 $G` CLI$PRESENT4 (b#p CLI$PRESENT4 \@` CLI$PRESENT4 dG CLI$PRESENT4 lb#p CLI$PRESENT4 @ CLI$PRESEQNT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 b#p CLI$PRESENT4 G0 CLI$PRESENT4 ,@0 CLI$PRESENT4 <G` CLI$PRESENT4 Db#p CLI$PRESENT4 \@` CLI$PRESENT4 Gmd UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1umQR CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4G CLI$GET_VALUE4b#p CLI$GET_VALUE4@ CLI$GET_VALUE4 G0 CLI$PRESENT4  Sb#p CLI$PRESENT4 ,@0 CLI$PRESENT4 xG CLI$PRESENT4 |b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4  b#p CLI$PRESENT4T @ CLI$PRESENT4 G4 CLI$PRESENT4 $b#p CLI$PRESENT4 0@4 CLI$PRESENT4 XGh CLI$PRESENT4 \b#p CLI$PRESENT4 d@h CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PURESENT4G CLI$GET_VALUE4b#p CLI$GET_VALUE4@ CLI$GET_VALUE4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 (G< CLI$PRESENT4 ,b#p CLI$PRESENT4 8@< CLI$PRESENT4 DGVp CLI$PRESENT4 Hb#p CLI$PRESENT4 l@p CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4 H G\ CLI$PRESENT4 L Wb#p CLI$PRESENT4 X @\ CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT 4 ` Gp CLI$PRESENT4 d b#p CLI$PRESEXNT4 l @p CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4  G0 CLI$PRESENT4  b#p CLI$PRESENT4 , @0 CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ Y CLI$PRESENT4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4 G\ DECC$REALLOC4< b#p DECC$REALLOC4X @\ DECC$REALLOC4 d G| DECC$FREE4 p b#p DECC$FREE4 x @| DECC$FREE4 ZG DECC$STRCPY4 b#p DECC$STRCPY4 @ DECC$STRCPY4 G DECC$REALLOC4 b#p DECC$REALLOC4 @ DECC$REALLOC4  G DECC$FREE4  b#p DECC$FREE4  @ DECC$FREE4 G DECC$STRNCPY4[ b#p DECC$STRNCPY4 @ DECC$STRNCPY4  G CLI$PRESENT4  b#p CLI$PRESENT4  @ CLI$PRESENT4 G CLI$GET_VALUE4 b#p CLI$GET_VALUE4 @ CLI$GET_VALUE4 GH DECC$REALLOC4b#p DECC$\REALLOC4D@H DECC$REALLOC4 PGh DECC$FREE4 `b#p DECC$FREE4 d@h DECC$FREE4|G DECC$STRNCPY4b#p DECC$STRNCPY4@ DECC$STRNCPY4G DECC$REALLOC4b#p DECC$REALLOC4@] DECC$REALLOC4 G  DECC$FREE4 b#p DECC$FREE4 @  DECC$FREE4G DECC$STRNCPY4b#p DECC$STRNCPY4@ DECC$STRNCPY4 G CLI$PRESENT4 b#p CLI$PRESENT4 @ CLI$PRESENT4^GH DECC$REALLOC4b#p DECC$REALLOC4D@H DECC$REALLOC4 PGh DECC$FREE4 `b#p DECC$FREE4 d@h DECC$FREE4G DECC$REALLOC4b#p DECC$REALLOC4@ DECC$REALLOC4G DECC$CALLOC_4b#p DECC$CALLOC4@ DECC$CALLOC4G  DECC$STRLEN4  b#p DECC$STRLEN4@  DECC$STRLEN4 G CLI$PRESENT4 b# CLI$PRESENT4 @ CLI$PRESENT8 84G  DECC$MALLOC4b#` DECC$MALLOC4@  DECC$MALLOC4@GX CLI$GET_VALUE4Db# CLI$GET_VALUE4T@X CLI$GET_VALUE4|G DECC$REALLOC4b# DECC$REALLOC4@ DECC$REALLOCD GSTR$FIND_FIRST_SUBSTRINGDb#STR$FIND_FIRST_SUn' UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1u9`aBSTRINGD @STR$FIND_FIRST_SUBSTRING4G CLI$GET_VALUE4b# CLI$GET_VALUE4@ CLI$GET_VALUE4 hG DECC$FREE4 pb# DECC$FREE4 |@ DECC$FREE4G OTS$INSV_VOL4@ OTS$INSV_VOL4 bG CLI$PRESENT4 t#0 CLI$PRESENT4 @ CLI$PRESENT,0G\USAGE,Tb#USAGE,X@\USAGE4dG DECC$GSPRINTF4hb# DECC$GSPRINTF4@ DECC$GSPRINTF4G DECC$GSPRINTF4cb# DECC$GSPRINTF4@ DECC$GSPRINTF4$GP DECC$GSPRINTF4(b# DECC$GSPRINTF4L@P DECC$GSPRINTF =TEXT=BINARY=SCREEN= FRESHENHELP(=JUNK0=LIST8=BRIEFd@=FULLH=QUIETP=TESTX=TYPE`=PIPEh=UPDATEp=8.VERSIONRESTORECOMMENTEXCLUDEZIPINFOSHORT=MEDIUM=LONG=VERBOSEHEADER=TOTALS=TIMES=ePAGE=ZIPFILEINFILE=unzip = TEXT.AUTO= TEXT.ALL= TEXT.NONE = BINARY.AUTO0= BINARY.ALL@= BINARY.NONEP= CASE_INSENSITIVEh= DIRECTORYx= LOWERCASEf= OVERWRITE= QUIET.SUPER= PASSWORD= UPPERCASE= ONE_LINE= YYZ_UNZIP# #=Modifying options are /TEXT, /BINARY, /JUNK, /[NO]OVERWRITE, /QUIET, /CASE_INSENSITIVE, /LOWERCASE, %s/VERSION, /RESTORE. =WOValid main options are /TEST, /FRESHEN, /UPDgATE, /PIPE, /SCREEN, /COMMENT%s.  =0;7DECC$GA___CTYPE=0";=P4< 7G DECC$GSPRINTF;=`;pUSAGE= /PAGE, 7UNZIPSFXBANNER= 14 January 2001=0(#;=T h CLI$GET_VALUE DECC$MALLOC CLI$PRESENT DECC$FREE( STR$FIND_FIRST_SUBSTRING DECC$REALLOC=0 #;=00 7DECC$$SHELL_HANDLER=8 OTS$INSV_VOL7LIB$SIG_TO_RET;;;;;;=-d DECC$STRCPY DECC$CALLiOC#;!;;/;=unzip);4;1;7 VMS_UNZIP_CLD+; ;; ; ;%;P DECC$STRNCPY;&;=0H#0;=d 3;2j; ;7 LIB$GET_INPUT-;,;.;;; STR$CONCAT CLI$DCL_PARSE LIB$GET_FOREIGN(;*;';$;0;";=-xP DECC$STRLEN=-Ph;;k;;;; = __iscntrl= VMSCLI_usage = get_list0= check_cli@=vms_unzip_cmdline< <=4< < = 4< < =4< < l= 4< < =4< < =  4< <= 04< <= @4< <=P4< <=4< <= h4< < m=4< <= 4< <=(4< <= x4< <=04< <=84< <=@4< <= 4< <= nH4< <= 4< <=P4< <=X4< <=`4< < =4< <!= 4< <"=h4< <#= op4< <$=x4< <%=4< <&=4< <'=4< <(=4< <)=4< <*=4< <+=y5 UNZIP.BCK# O)[UNZIP542.VMS-BINARIES]UNZSXCLI.AXP_OLB;1uTo p4< <,=4< <-=4< <.=4< </=4< <0=4< <1= 4< <2=4< <3=4<q <4=4J J=:21VMS_UNZIP_CMDLINECompaq C V6.2-003~ ~= 44= __iscntrl4=  N N= 4,4= 0= == 04p4=vms_unzip_cmdline04= `, `- !a a `6r `. a a a `/ `/ )a "a +a 1a 3a 3a 3a 7a  Ga Oa Ha Na Va Za Za \a ^a `a ba da fa ha ja la a a a a a a a a a a a a a a a a a a a a as a a a a a a a a a a a 4b  =b =b @b ab eb Pb cb db cb cb mb mb ob ob qb rb rb {b b ~b b b b  b b b b b b t b b b b b b b b b b b b b7 b b b b ,$ $= 4: := T4= PX X= 44=get_list4= b b b b b  c c c *c c c c cu cg c c "c $c #c %c &c$ $c c@ c($ $= 4: := (4=  = 404= check_cli4=7/. 8c  8c  8c  Dc Dc$ $= 4: := 4=  = 44= VMSCLI_usage4=UML `c Xc `c Xc Xc cc( cc$$ $= P4: := |4=  =  ww.*[UNZIP542.VMS-BINARIES]UNZSXCLI.VAX_DECC_OLB;1+,.(/ 4()- O0123KPWO)56+ a7Ca89GHJ% Librarian A09-22v%ahv%a!')@  8UNZIPL VMS_UNZIP_CLDVMS_UNZIP_CMDLINE[ CENTSIGMSG CLI_BINARYCLI_BINARY_ALLCLI_BINARY_AUTOCLI_BINARY_NONE CLI_BRIEFCLI_CASE_INSENSITIVE CLI_COMMENT CLI_DIRECTORY CLI_EXCLUDE CLI_FRESHENCLI_FULL CLI_HEADERCLI_HELP CLI_INFILECLI_INFORMATIONCLI_JUNKCLI_LISTCLI_LONG CLI_LOWERCASE CLI_MEDIUM CLI_ONE_LINEEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSGSEEKMSGUNZIPUNZIPSFXBANNER UNZIP_COMMANDUSAGEUZ_OPTS VERSIONDATE VMSCLI_USAGEL VMS_UNZIP_CLDVMS_UNZIP_CMDLINE__MAIN;CLI_LONGCLI_TYPE( REPORTMSG__MAIN_ CLI_LOWERCASE CLI_MEDIUM CLI_ONE_LINE CLI_OVERWRITECLI_PAGE CLI_PASSWORDCLI_PIPE CLI_QUIET CLI_RESTORE CLI_SCREEN CLI_SHORTCLI_SUPER_QUIETCLI_TESTCLI_TEXT CLI_TEXT_ALL CLI_TEXT_AUTO CLI_TEXT_NONE CLI_TIMES CLI_TOTALSCLI_TYPE CLI_UPDATE CLI_UPPERCASEEXCLFILENAMENOTMATCHEDFILENAMENOTMATCHEDMAIN MASK_BITS REPORTMSG1^#aV1.02UNZIPV1.013-JAN-2001 19:57DEC C V6.2-003PX. Quote uppercase optionsPMP-x~PValid options are -tfupcz; modifiers are -abjnoqCL%sV%s.  PUnZipSFX %d.%d%d%s of %s, by Info-ZIP (Zip-Bugs@lists.wku.edu). MPcaution: both -n and -o specified; ignoring -o Perror: -fn or any combination of -c, -l, -p, -t, -u and -v options invalid  P (please check that you have transferred or created the zipfil?Ge UNZIP.BCK O.[UNZIP542.VMS-BINARIES]UNZSXCLI.VAX_DECC_OLB;1(gY  e in the appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles) Pcaution: excluded filename not matched: %s Pcaution: filename not matched: %s Perror [%s]: attempt to seek before beginning of zipfile %sPerror: expected central file header signature not found (file #%lu). P14 January 2001P??P ^DECC$MAIN_ARGSS ^SR GLOBALSCTORݬݬUNZIPP RETURN_VMSS R DECC$EXITRP^ THANDLERSS DECC$SIGNALRbSbS bS bмG3мG3߬߬VMS_UNZIP_CMDLINEPRʏP RS1PG3߬߬UZ_OPTSPRլR RS1PЬGp3Gt3լ}RЬG3Rb`db DECC$STRCMPPIRbG3RPPGp3PFNAMESG3Gp3RG3Gp3PPGt3RbGx3Gx3PROCESS_ZIPFILESPSSPP^YXRмWUW1eS1 cPP-1eTS1S-11SC1SPPC7 P1 ?PR1PR RG 3P PG 3G 3R1G 31PR RG3P PG3G3R1G 3G3G 31R G3R1G31yPR G3R1hG31]P1XRGD3G3R1BPGD3G31.P VMSCLI_USAGEPV1R G$3R1G$31PR RG,3P PG ,3G,3R1G,31PR GX3R1GX31PR G03R1G031PR RG43P PG43G43R1pG431fPR,G3G83P PG83 PG83R14G3G831PR RG83P PG83G83R1G831PR G<3R1G<31PR GD3R1GD31PR G,3R1G,31PR GL3R1GL3~PeTPPrdPmWhPP-~]PR RGP3P PGP3GP3R9PGP3/R RGT3P PGT3GT3R PGT3XS1QUWeP `PP-1.G3G<30G3GD3 G<3GD3G39G031~G3 DECC$DSPRINTF<~PG3GG03P`XG 3G 3G3G3G43<  G034jG3 DECC$DSPRINTF<~PG3GG03P`G43GX3 DECC$ISATTYPGX3XWUX  MASK_BITS  VERSIONDATE  CENTSIGMSG SEEKMSG FILENAMENOTMATCHED EXCLFILENAMENOTMATCHED REPORTMSG UNZIPSFXBANNERFNAMESG DECC$EXIT VMSCLI_USAGEVMS_UNZIP_CMDLINE RETURN_VMSHANDLERPROCESS_ZIPFILESUZ_OPTSUNZIP GLOBALSCTOR DECC$ISATTY DECC$SIGNAL DECC$STRCMP DECC$DSPRINTF __MAIN MAIN UNZIP 8UZ_OPTS VMSCLI_USAGEPV1PG83G G3 DECC$DSPRINTFXRRRPG3GG03P`G3G<3GH3GT3G3G3WUVVPP^R G3 DECC$DSPRINTFЬTSPSSPG3GG03P`@G3 DECC$DSPRINTFTSSSPG3GG03P`T PPP R UNZIP mainG unzip58uz_opts usage v2_AC$ |3 T   *    .   4 3'TD # USAGEDECC$MAIN_ARGS{$CODE$$DATA $ADDRESS_DATA" MASK_BITS VERSIONDATEG CENTSIGMSG<SEEKMSG$FILENAMENOTMATCHED-EXCLFILENAMENOTMATCHED REPORTMSGAUNZIPSFXBANNERI( (,Xl hTww1 6#a02-007+ VMS_UNZIP_CLD02-00713-JAN-2001 19:54-VAX/VMS Command Definition Utility (V4-001) VMS_UNZIP_CLDX CLI$TABLESP X UNZI ,(Tl UNZIP4!)P1ZIPFILEZip file8a!(P2INFILEFiles to UnZip(BINARY$ TEXT(4SCREEN(\ DIRECTORY(FRESHEN$HELP$JUNK$LIST$ BRIEF$8 FULL(`  OVERWRITE$ QUIET$ TEST$TYPE$PIPE(PASSWORD(@ UPPERCASE(hUPDATE(VERSION(VERBOSE(RESTORE(COMMENT(a0EXCLUDE0`CASE_INSENSITIVE( LOWERCASE$PAGE( YYZ_UNZIP(ZIPINFO,`( INFORMATION4\!)P1ZIPFILEZip file<a!(P2INFILEFiles to display(ZIPINFO(ONE_LINE$ SHORT(4MEDIUM$XLONG(VERBOSE(HEADER(COMMENT( TOTALS$ TIMES(aD EXCLUDE0t CASE_INSENSITIVE$ PAGE QUIET_MODIFIER$SUPER$CONVERT_KEYWORDS$$AUTO$HALL$NONE 0    4   $ $ $ @ L  ww10#a02-007@VMS_UNZIP_CMDLINE02-00713-JAN-2001 19:57DEC C V6.2-003 CLI_TEXT  CLI_TEXT_AUTO  CLI_TEXT_ALL  CLI_TEXT_NONE  CLI_BINARY CLI_BINARY_AUTO CLI_BINARY_ALL CLI_BINARY_NONE CLI_CASgx tCC_O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X(k ) )"!fm؃"C+ۧ GRyKM #Taq@Bu'%[6TNq 89Kmly130MIJ悸p[ .*XH^LmgԶ9?RJ^H `NmgMx#4SjE[`DKk=3,FlG/3J$Q MM}C)p&J5XPFeDso+^URN'j@ U|vGGNʦ0@v\jUABkZDmI2Go>T$ D"apA[k USuF:DEGa,UG>nTO4*PC6]~DZ|ص"WdIk  {@J*[^gWTm`u*LzKR:\ܸX+Vj@DkYAh^ _BۃT `fP&7>b ^ NݺN?n-{'\ F 7h#-WHv H+1 Kom.^te vAKuaHϛ z)Y0;ب uHHyb繓Ds|sݣ gI㨽E"x ᥍>@YL0XfqGKj1Di QX]IZ0DDPMfd7r;<֧:[5zdd-! c0i=F.}L%kVNFm蛷 07\ I/MXY]1p^&3QKBw~TTy iK1]Oݼ&7)P롂^lִgKK5Qbk(Z3oBDxbJx + H; $vpۥu3 L*\lhSI[xs}4on";&[6SV[ٔrew,0L IsH' JoB` YHUXb`d}i2{LhԽVؕ/^-^Ed^ZbD}QSU Y-P$K@ m 7GP$U3>@2n~}MF F]^9+_0lZc)( o USPxD7 $ Z2HL u6EF2Sc;4v/F^A"G.qyKlwk{ p_8.ߣN_#'\b{6MYSPu*nYWpQ7Hq 8Zd' ~c]Y$AQ(ISHt:9ރz'͛mNuMR a l8|pR+=rlNj!e*we3[ UNZIP.BCK O.[UNZIP542.VMS-BINARIES]UNZSXCLI.VAX_DECC_OLB;1(^*E_INSENSITIVE CLI_SCREEN CLI_DIRECTORY  CLI_FRESHEN CLI_HELP CLI_JUNK  CLI_LOWERCASE CLI_LIST  CLI_BRIEF CLI_FULL  CLI_OVERWRITE  CLI_QUIET CLI_SUPER_QUIET CLI_TESTP/PAGE, PModifying options are /TEXT, /BINARY, /JUNK, /[NO]OVERWRITE, /QUIET, /CASE_INSENSITIVE, /LOWERCASE, %s/VERSION, /RESTORE. PValid main options are /TEST, /FRESHEN, /UPDATE, /PIPE, /SCREEN, /COMMENT%s. P14 January 2001P-xP-dP-PPunzip/PwwPunzip .PppPINFILE-PhhPZIPFILE,P ZZPYYZ_UNZIP+PUUPPAGE*PLLPONE_LINE)PFFPTIMES(P??PTOTALS'P88PHEADER&P00PVERBOSE%P%%PLONG$PPMEDIUM#PPSHORT"PPZIPINFO!PPEXCLUDE PPCOMMENTPPRESTOREPPVERSIONPPUPDATEP PUPPERCASEPPPASSWORDPPPIPEPPTYPEPPTESTP PQUIET.SUPERPPQUIETP POVERWRITEPPFULLPPBRIEFPPLISTP PLOWERCASEPPJUNKPPHELPPxxPFRESHEN P hhPDIRECTORY PaaPSCREEN PPPPCASE_INSENSITIVE P DDPBINARY.NONE P 88PBINARY.ALLP ,,PBINARY.AUTOP$$PBINARYP PTEXT.NONEPPTEXT.ALLP PTEXT.AUTOP CLI_TYPE CLI_PIPE  CLI_PASSWORD  CLI_UPPERCASE  CLI_UPDATE  CLI_VERSION  CLI_RESTORE CLI_COMMENT ! CLI_EXCLUDE "CLI_INFORMATION # CLI_SHORT $ CLI_MEDIUM %CLI_LONG & CLI_VERBOSE ' CLI_HEADER ( CLI_TOTALS ) CLI_TIMES * CLI_ONE_LINE +CLI_PAGE ,CLI_YYZ - CLI_ZIPFILE . CLI_INFILE / UNZIP_COMMANDPTEXTPլRDECC$GA___CTYPEQˏP@aPˏPRRP^Wǀ,ς ʏP1LIB$GET_FOREIGNP>PPAGE>P>?P CPYYZ_UNZIP?PC@PMPZIPFILE@PMAPUPINFILEAPUBP\Punzip BP\cPunzipiP-PlP-doP-xsP14 January 2001PValid main options are /TEST, /FRESHEN, /UPDATE, /PIPE, /SCREEN, /COMMENT%s. PModifying options are C$V_CTYPEDEFS CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRM VMS_UNZIP_CLD CLI$GET_VALUE CLI$PRESENT CLI$DCL_PARSESTR$FIND_FIRST_SUBSTRING STR$CONCATLIB$SIG_TO_RET LIB$GET_INPUTLIB$GET_FOREIGN LIB$ESTABLISHUSAGESTRLENSTRNCPYSTRCPYSPRINTFREALLOC /TEXT, /BINARY, /JUNK, /[NO]OVERWRITE, /QUIET, /CASE_INSENSITIVE, /LOWERCASE, %s/VERSION, /RESTORE. cP/PAGE, P|^V?ϐ PRP}LIB$GET_FOREIGNePRR-RM4ePRˏRSUSUPPTSSWCЭTSSѭ2ЭSݭݭREALLOCPS SFREE<$PDSTRCPY-{obj|exe}.exe", and "unz540x-vms--obj.bck", where is "axp", "vax-decc", or "vax-vaxc", depending on the environment used for creating the binaries. ...-obj.exe denotes object library distributions that require a link step on the local machine. ...-exe.exe denotes "ready-to-run" executable distributions, that do not require additional work. The caveat of these executable distribution is that they do not run on VMS versions that are older than the system used for building the executables (typical error message: "shareable library mismatch"). ...-obj.bck are uncompressed VMS backup saveset distributions of the object libraries. They are much larger than the self-extracting Zip archives and are only supplied for people with (old) versions of VMS where the supplied SFX archives do not work. Therefore, if you already have an old version of UnZip for VMS (5.0p1, better: 5.2), the better choice is to fetch the Zip SFX archive and extract it manually, using the older VMS UnZip program. Note that backup savesets are 32256-bytes-fixed-length-record files; when tranfered via binary FTP, the resulting file's record format is usually 512-bytes-fixed-length. Before extracting them with BACKUP, the record size of the saveset has to be restored to 32256 bytes (best done with the public domain "FILE" utility, available from DECUS; or found on ftp.wku.edu.). The contents of these saveset are identically to the corresponding ...-obj.exe archives. Contents of the "vms" executables self extracting archives for UnZip 5.4: a) common files (documentation etc.): 00binary.vms this file readme.vms general VMS info about using UnZip and zipfiles readme what UnZip is; general information license Info-ZIP copyright and distribution policy where pointer to Zip/UnZip support archives makesfx.com command file to create self-extracting archives unzip.txt UnZip manual page, human-readable format unzipsfx.txt UnZipSFX manual page, human-readable format zipinfo.txt ZipInfo manual page, human-readable format 3rdparty.bug known bugs in PK[UN]ZIP, WinZip, etc. unzip.hlp UnZip help module, for default command interface unzip_cli.hlp UnZip help modudn UNZIP.BCKg [UNZIP542.VMS]00BINARY.VMS;11 le, for VMSCLI command interface unzipsfx.hlp UnZipSFX pre-formatted help page b) object library distributions: link_unz.com command procedure for the linking step vms/unzip.opt auxiliary files required for linking step vms/unzipsfx.opt ... unzip._olb object libraries for UnZip and UnZipSFX unzipsfx._olb (both command interfaces) unzipcli._olb additional object libraries for UnZip and unzsfxcli._olb UnZipSFX, VMSCLI (DCL like) interface c) executable distributions: unzip.exe UnZip executable, default command interface unzipsfx.exe UnZipSFX executable, default command interace unzip_cli.exe UnZip executable, VMSCLI command interface (To save space, unzipsfx_cli.exe has been omitted from the executable distributions. The command interface of the SFX stubs is of minor importance, anyway, since it cannot be used without first defining a "foreign command" to run the SFX archive. In most cases, it is much easier to use "$run .exe" at the command prompt.) The binary files "*.<...>_olb" and "*.exe" have been stored in the Zip archives with VMS attributes saved! If you extract them using a non-VMS port of UnZip, you may get unusable files. If you decided to fetch the object library distribution, you have to link the executables on your local site. This requires runtime support for the C runtime library to be installed, which may not be present on older VAX VMS systems (prior to VMS 6). To create the executables, just invoke the "link_unz.com" command procedure. This will generate all executables (both unzip with UNIX-style command syntax and with VMSCLI command interface), but note that the executable's extension is "._exe"! In case your system is a VAX and your current working directory carries both the DEC C and the VAX C object distributions, you have to specify either "VAXC" or "DECC" to tell link_unz.com which binaries you want to build. Additionally, link_unz.com defines foreign commands for the newly linked executables, so you can test them without any further work. In order to use the default (UNIX-like) command interface, you can proceed straight ahead after unpacking the distribution. If you rather prefer to use the VMSCLI interface, you have to specify the option "VMSCLI" (or just "CLI") to the command starting link_unz.com. The executables (object libraries) in this archive have been compiled with the following options enabled: * [decription support] The environment used for compilation was: a) On Alpha AXP : OpenVMS(AXP) 6.2; DEC C V 5.6-003 b1) On VAX : OpenVMS(VAX) 6.1; DEC C V 4.0 b2) alternatively VAX C V 3.2 One final note: The binary files of the distribution have been archived with "saving all VMS attributes" enabled. Please do not repack the binary part of the archives on a non-VMS system, to prevent corruption of the files. 04 December 1997, Christian Spieler *[UNZIP542.VMS]CMDLINE.C;1+,jX.;/ 4;;- 0@123KPWO<56C7C89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #define module_name VMS_UNZIP_CMDLINE #define module_ident "02-007" /* ** ** Facility: UNZIP ** ** Module: VMS_UNZIP_CMDLINE ** ** Author: Hunter Goatley ** ** Date: 25 Apr 97 (orig. Zip version, 30 Jul 93) ** ** Abstract: Routines to handle a VMS CLI interface for UnZip. The CLI ** command line is parsed and a new argc/argv are built and ** returned to UnZip. ** ** Modified by: ** ** 02-007 Onno van der Linden 02-Jul-1998 19:07 ** Modified to support GNU CC 2.8 on Alpha; version unchanged. ** 02-007 Johnny Lee 25-Jun-1998 07:38 ** Fixed typo (superfluous ';'); no version num change. ** 02-007 Hunter Goatley 11-NOV-1997 10:38 ** Fixed "zip" vs. "unzip" typo; no version num change. ** 02-007 Christian Spieler 14-SEP-1997 22:43 ** Cosmetic mods to stay in sync with Zip; no version num change. ** 02-007 Christian Spieler 12-JUL-1997 02:05 ** Revised argv vector construction for better handling of quoted ** arguments (e.g.: embedded white space); no version num change. ** 02-007 Christian Spieler 04-MAR-1997 22:25 ** Made /CASE_INSENSITIVE common to UnZip and ZipInfo mode; ** added support for /PASSWORD="decryption_key" argument. ** 02-006 Christian Spieler 11-MAY-1996 22:40 ** Added SFX version of VMSCLI_usage(). ** 02-005 Patrick Ellis 09-MAY-1996 22:25 ** Show UNIX style usage screen when UNIX style options are used. ** 02-004 Christian Spieler 06-FEB-1996 02:20 ** Added /HELP qualifier. ** 02-003 Christian Spieler 23-DEC-1995 17:20 ** Adapted to UnZip 5.2. ** 02-002 Hunter Goatley 16-JUL-1994 10:20 ** Fixed some typos. ** 02-001 Cave Newt 14-JUL-1994 15:18 ** Removed obsolete /EXTRACT option; fixed /*TEXT options; ** wrote VMSCLI usage() function ** 02-000 Hunter Goatley 12-JUL-1994 00:00 ** Original UnZip version (v5.11). ** 01-000 Hunter Goatley 30-JUL-1993 07:54 ** Original version (for Zip v1.9p1). ** */ #if defined(__DECC) || defined(__GNUC__) #pragma module module_name module_ident #else #module module_name module_ident #endif #define UNZIP_INTERNAL #include "unzip.h" #ifndef TEST # include "version.h" /* for VMSCLI_usage() */ #endif /* !TEST */ #include #include #include #include #include #include #ifndef CLI$_COMMA globalvalue CLI$_COMMA; #endif /* ** "Macro" to initialize a dynamic string descriptor. */ #define init_dyndesc(dsc) {\ dsc.dsc$w_length = 0;\ dsc.dsc$b_dtype = DSC$K_DTYPE_T;\ dsc.dsc$b_class = DSC$K_CLASS_D;\ dsc.dsc$a_pointer = NULL;} /* ** Memory allocation step for argv string buffer. */ #define ARGBSIZE_UNIT 256 /* ** Memory realloc ; UNZIP.BCKjX [UNZIP542.VMS]CMDLINE.C;1ML;1;iation macro for argv string buffer. */ #define CHECK_BUFFER_ALLOCATION(buf, reserved, requested) { \ if ((requested) > (reserved)) { \ char *save_buf = (buf); \ (reserved) += ARGBSIZE_UNIT; \ if (((buf) = (char *) realloc((buf), (reserved))) == NULL) { \ if (save_buf != NULL) free(save_buf); \ return (SS$_INSFMEM); \ } \ } \ } /* ** Define descriptors for all of the CLI parameters and qualifiers. */ #if 0 $DESCRIPTOR(cli_extract, "EXTRACT"); /* obsolete */ #endif $DESCRIPTOR(cli_text, "TEXT"); /* -a[a] */ $DESCRIPTOR(cli_text_auto, "TEXT.AUTO"); /* -a */ $DESCRIPTOR(cli_text_all, "TEXT.ALL"); /* -aa */ $DESCRIPTOR(cli_text_none, "TEXT.NONE"); /* ---a */ $DESCRIPTOR(cli_binary, "BINARY"); /* -b[b] */ $DESCRIPTOR(cli_binary_auto, "BINARY.AUTO"); /* -b */ $DESCRIPTOR(cli_binary_all, "BINARY.ALL"); /* -bb */ $DESCRIPTOR(cli_binary_none, "BINARY.NONE"); /* ---b */ $DESCRIPTOR(cli_case_insensitive,"CASE_INSENSITIVE"); /* -C */ $DESCRIPTOR(cli_screen, "SCREEN"); /* -c */ $DESCRIPTOR(cli_directory, "DIRECTORY"); /* -d */ $DESCRIPTOR(cli_freshen, "FRESHEN"); /* -f */ $DESCRIPTOR(cli_help, "HELP"); /* -h */ $DESCRIPTOR(cli_junk, "JUNK"); /* -j */ $DESCRIPTOR(cli_lowercase, "LOWERCASE"); /* -L */ $DESCRIPTOR(cli_list, "LIST"); /* -l */ $DESCRIPTOR(cli_brief, "BRIEF"); /* -l */ $DESCRIPTOR(cli_full, "FULL"); /* -v */ $DESCRIPTOR(cli_overwrite, "OVERWRITE"); /* -o, -n */ $DESCRIPTOR(cli_quiet, "QUIET"); /* -q */ $DESCRIPTOR(cli_super_quiet, "QUIET.SUPER"); /* -qq */ $DESCRIPTOR(cli_test, "TEST"); /* -t */ $DESCRIPTOR(cli_type, "TYPE"); /* -c */ $DESCRIPTOR(cli_pipe, "PIPE"); /* -p */ $DESCRIPTOR(cli_password, "PASSWORD"); /* -P */ $DESCRIPTOR(cli_uppercase, "UPPERCASE"); /* -U */ $DESCRIPTOR(cli_update, "UPDATE"); /* -u */ $DESCRIPTOR(cli_version, "VERSION"); /* -V */ $DESCRIPTOR(cli_restore, "RESTORE"); /* -X */ $DESCRIPTOR(cli_comment, "COMMENT"); /* -z */ $DESCRIPTOR(cli_exclude, "EXCLUDE"); /* -x */ $DESCRIPTOR(cli_information, "ZIPINFO"); /* -Z */ $DESCRIPTOR(cli_short, "SHORT"); /* -Zs */ $DESCRIPTOR(cli_medium, "MEDIUM"); /* -Zm */ $DESCRIPTOR(cli_long, "LONG"); /* -Zl */ $DESCRIPTOR(cli_verbose, "VERBOSE"); /* -Zv */ $DESCRIPTOR(cli_header, "HEADER"); /* -Zh */ $DESCRIPTOR(cli_totals, "TOTALS"); /* -Zt */ $DESCRIPTOR(cli_times, "TIMES"); /* -ZT */ $DESCRIPTOR(cli_one_line, "ONE_LINE"); /* -Z2 */ $DESCRIPTOR(cli_page, "PAGE"); /* -M , -ZM */ $DESCRIPTOR(cli_yyz, "YYZ_UNZIP"); $DESCRIPTOR(cli_zipfile, "ZIPFILE"); $DESCRIPTOR(cli_infile, "INFILE"); $DESCRIPTOR(unzip_command, "unzip "); static int show_VMSCLI_usage; #if defined(__DECC) || defined(__GNUC__) extern void *vms_unzip_cld; #else globalref void *vms_unzip_cld; #endif /* extern unsigned long LIB$GET_INPUT(void), LIB$SIG_TO_RET(void); */ extern unsigned long cli$dcl_parse (); extern unsigned long cli$present (); extern unsigned long cli$get_value (); unsigned long vms_unzip_cmdline (int *, char ***); static unsigned long get_list (struct dsc$descriptor_s *, struct dsc$descriptor_d *, int, char **, unsigned long *, unsigned long *); static unsigned long check_cli (struct dsc$descriptor_s *); #ifdef TEST int main(int argc, char **argv) { return (vms_unzip_cmdline(&argc, &argv)); } #endif /* TEST */ unsigned long vms_unzip_cmdline (int *argc_p, char ***argv_p) { /* ** Routine: vms_unzip_cmdline ** ** Function: ** ** Parse the DCL command line and create a fake argv array to be ** handed off to Zip. ** ** NOTE: the argv[] is built as we go, so all the parameters are ** checked in the appropriate order!! ** ** Formal parameters: ** ** argc_p - Address of int to receive the new argc ** argv_p - Address of char ** to receive the argv address ** ** Calling sequence: ** ** status = vms_unzip_cmdline (&argc, &argv); ** ** Returns: ** ** SS$_NORMAL - Success. ** SS$_INSFMEM - A malloc() or realloc() failed ** SS$_ABORT - Bad time value ** */ register unsigned long status; char options[256]; char *the_cmd_line; /* buffer for argv strings */ unsigned long cmdl_size; /* allocated size of buffer */ unsigned long cmdl_len; /* used size of buffer */ char *ptr; int x, len, zipinfo, exclude_list; int new_argc; char **new_argv; struct dsc$descriptor_d work_str; struct dsc$descriptor_d foreign_cmdline; struct dsc$descriptor_d output_directory; struct dsc$descriptor_d password_arg; init_dyndesc(work_str); init_dyndesc(foreign_cmdline); init_dyndesc(output_directory); init_dyndesc(password_arg); /* ** See if the program was invoked by the CLI (SET COMMAND) or by ** a foreign command definition. Check for /YYZ_UNZIP, which is a ** valid default qualifier solely for this test. */ show_VMSCLI_usage = TRUE; status = check_cli(&cli_yyz); if (!(status & 1)) { lib$get_foreign(&foreign_cmdline); /* ** If nothing was returned or the first character is a "-", then ** assume it's a UNIX-style command and return. */ if (foreign_cmdline.dsc$w_length == 0) return (SS$_NORMAL); if ((*(foreign_cmdline.dsc$a_pointer) == '-') || ((foreign_cmdline.dsc$w_length > 1) && (*(foreign_cmdline.dsc$a_pointer) == '"') && (*(foreign_cmdline.dsc$a_pointer + 1) == '-'))) { show_VMSCLI_usage = FALSE; return (SS$_NORMAL); } str$concat(&work_str, &unzip_command, &foreign_cmdline); status = cli$dcl_parse(&work_str, &vms_unzip_cld, lib$get_input, lib$get_input, 0); if (!(status & 1)) return (status); } /* ** There's always going to be a new_argv[] because of the image name. */ if ((the_cmd_line = (char *) malloc(cmdl_size = ARGBSIZE_UNIT)) == NULL) return (SS$_INSFMEM); strcpy(the_cmd_line, "unzip"); cmdl_len = sizeof("unzip"); /* ** First, check to see if any of the regular options were specified. */ options[0] = '-'; ptr = &options[1]; /* Point to temporary buffer */ /* ** Is it ZipInfo?? */ zipinfo = 0; status = cli$present(&cli_information); if (status & 1) { zipinfo = 1; *ptr++ = 'Z'; if (cli$present(&cli_one_line) & 1) *ptr++ = '2'; if (cli$present(&cli_short) & 1) *ptr++ = 's'; if (cli$present(&cli_medium) & 1) *ptr++ = 'm'; if (cli$present(&cli_long) & 1) *ptr++ = 'l'; if (cli$present(&cli_verbose) & 1) *ptr++ = 'v'; if (cli$presentzA UNZIP.BCKjX [UNZIP542.VMS]CMDLINE.C;1ML;1;(&cli_header) & 1) *ptr++ = 'h'; if (cli$present(&cli_comment) & 1) *ptr++ = 'c'; if (cli$present(&cli_totals) & 1) *ptr++ = 't'; if (cli$present(&cli_times) & 1) *ptr++ = 'T'; } else { #if 0 /* ** Extract files? */ status = cli$present(&cli_extract); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'x'; #endif /* ** Write binary files in VMS binary (fixed-length, 512-byte records, ** record attributes: none) format ** (auto-convert, or force to convert all files) */ status = cli$present(&cli_binary); if (status != CLI$_ABSENT) { *ptr++ = '-'; *ptr++ = '-'; *ptr++ = 'b'; if ((status & 1) && !((status = cli$present(&cli_binary_none)) & 1)) { *ptr++ = 'b'; if ((status = cli$present(&cli_binary_all)) & 1) *ptr++ = 'b'; } } /* ** Convert files as text (CR LF -> LF, etc.) ** (auto-convert, or force to convert all files) */ status = cli$present(&cli_text); if (status != CLI$_ABSENT) { *ptr++ = '-'; *ptr++ = '-'; *ptr++ = 'a'; if ((status & 1) && !((status = cli$present(&cli_text_none)) & 1)) { *ptr++ = 'a'; if ((status = cli$present(&cli_text_all)) & 1) *ptr++ = 'a'; } } /* ** Extract files to screen? */ status = cli$present(&cli_screen); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'c'; /* ** Re-create directory structure? (default) */ status = cli$present(&cli_directory); if (status == CLI$_PRESENT) { status = cli$get_value(&cli_directory, &output_directory); } /* ** Freshen existing files, create none */ status = cli$present(&cli_freshen); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'f'; /* ** Show the help. */ status = cli$present(&cli_help); if (status & 1) *ptr++ = 'h'; /* ** Junk stored directory names on unzip */ status = cli$present(&cli_junk); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'j'; /* ** List contents (/BRIEF or /FULL (default)) */ status = cli$present(&cli_list); if (status & 1) { if (cli$present(&cli_full) & 1) *ptr++ = 'v'; else *ptr++ = 'l'; } /* ** Overwrite files? */ status = cli$present(&cli_overwrite); if (status == CLI$_NEGATED) *ptr++ = 'n'; else if (status != CLI$_ABSENT) *ptr++ = 'o'; /* ** Decryption password from command line? */ status = cli$present(&cli_password); if (status == CLI$_PRESENT) { status = cli$get_value(&cli_password, &password_arg); } /* ** Pipe files to SYS$OUTPUT with no informationals? */ status = cli$present(&cli_pipe); if (status != CLI$_ABSENT) *ptr++ = 'p'; /* ** Quiet */ status = cli$present(&cli_quiet); if (status & 1) { *ptr++ = 'q'; if ((status = cli$present(&cli_super_quiet)) & 1) *ptr++ = 'q'; } /* ** Test archive integrity */ status = cli$present(&cli_test); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 't'; /* ** Make (some) names lowercase */ status = cli$present(&cli_lowercase); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'L'; /* ** Uppercase (don't convert to lower) */ status = cli$present(&cli_uppercase); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'U'; /* ** Update (extract only new and newer files) */ status = cli$present(&cli_update); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'u'; /* ** Version (retain VMS/DEC-20 file versions) */ status = cli$present(&cli_version); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'V'; /* ** Restore owner/protection info */ status = cli$present(&cli_restore); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'X'; /* ** Display only the archive comment */ status = cli$present(&cli_comment); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'z'; } /* ZipInfo check way up there.... */ /* The following options are common to both UnZip and ZipInfo mode. */ /* ** Match filenames case-insensitively (-C) */ status = cli$present(&cli_case_insensitive); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'C'; /* ** Use builtin pager for all screen output */ status = cli$present(&cli_page); if (status == CLI$_NEGATED) *ptr++ = '-'; if (status != CLI$_ABSENT) *ptr++ = 'M'; /* ** Check existence of a list of files to exclude, fetch is done later. */ status = cli$present(&cli_exclude); exclude_list = ((status & 1) != 0); /* ** If the user didn't give any DCL qualifier, assume he wants the ** Un*x interface. if ( (ptr == &options[1]) && (output_directory.dsc$w_length == 0) && (password_arg.dsc$w_length == 0) && (!exclude_list) ) { free(the_cmd_line); return (SS$_NORMAL); } */ /* ** Now copy the final options string to the_cmd_line. */ len = ptr - &options[0]; if (len > 1) { options[len] = '\0'; x = cmdl_len; cmdl_len += len + 1; CHECK_BUFFER_ALLOCATION(the_cmd_line, cmdl_size, cmdl_len) strcpy(&the_cmd_line[x], options); } /* ** If specified, add the decryption password argument. **/ if (password_arg.dsc$w_length != 0) { x = cmdl_len; cmdl_len += password_arg.dsc$w_length + 4; CHECK_BUFFER_ALLOCATION(the_cmd_line, cmdl_size, cmdl_len) strcpy(&the_cmd_line[x], "-P"); strncpy(&the_cmd_line[x+3], password_arg.dsc$a_pointer, password_arg.dsc$w_length); the_cmd_line[cmdl_len-1] = '\0'; } /* ** Now get the specified zip file name. */ status = cli$present(&cli_zipfile); if (status & 1) { status = cli$get_value(&cli_zipfile, &work_str); x = cmdl_len; cmdl_len += work_str.dsc$w_length + 1; CHECK_BUFFER_ALLOCATION(the_cmd_line, cmdl_size, cmdl_len) strncpy(&the_cmd_line[x], work_str.dsc$a_pointer, work_str.dsc$w_length); the_cmd_line[cmdl_len-1] = '\0'; } /* ** Get the output directory, for UnZip. **/ if (output_directory.dsc$w_length != 0) { x = cmdl_len; cmdl_len += output_directory.dsc$w_length + 4; CHECK_BUFFER_ALLOCATION(the_cmd_line, cmdl_size, cmdl_len) strcpy(&the_cmd_line[x], "-d"); strncpy(&the_cmd_line[x+3], output_directory.dsc$a_pointer, output_directory.dsc$w_length); the_cmd_line[cmdl_len-1] = '\0'; } /* ** Run through the list of files to unzip. */ status = cli$present(&cli_infile); [Z UNZIP.BCKjX [UNZIP542.VMS]CMDLINE.C;1ML;1;"_&if (status & 1) { status = get_list(&cli_infile, &foreign_cmdline, '\0', &the_cmd_line, &cmdl_size, &cmdl_len); if (!(status & 1)) return (status); } /* ** Get the list of files to exclude, if there are any. */ if (exclude_list) { x = cmdl_len; cmdl_len += 3; CHECK_BUFFER_ALLOCATION(the_cmd_line, cmdl_size, cmdl_len) strcpy(&the_cmd_line[x], "-x"); status = get_list(&cli_exclude, &foreign_cmdline, '\0', &the_cmd_line, &cmdl_size, &cmdl_len); if (!(status & 1)) return (status); } /* ** We have finished collecting the strings for the argv vector, ** release unused space. */ if ((the_cmd_line = (char *) realloc(the_cmd_line, cmdl_len)) == NULL) return (SS$_INSFMEM); /* ** Now that we've built our new UNIX-like command line, count the ** number of args and build an argv array. */ for (new_argc = 0, x = 0; x < cmdl_len; x++) if (the_cmd_line[x] == '\0') new_argc++; /* ** Allocate memory for the new argv[]. The last element of argv[] ** is supposed to be NULL, so allocate enough for new_argc+1. */ if ((new_argv = (char **) calloc(new_argc+1, sizeof(char *))) == NULL) return (SS$_INSFMEM); /* ** For each option, store the address in new_argv[] and convert the ** separating blanks to nulls so each argv[] string is terminated. */ for (ptr = the_cmd_line, x = 0; x < new_argc; x++) { new_argv[x] = ptr; ptr += strlen(ptr) + 1; } new_argv[new_argc] = NULL; #if defined(TEST) || defined(DEBUG) printf("new_argc = %d\n", new_argc); for (x = 0; x < new_argc; x++) printf("new_argv[%d] = %s\n", x, new_argv[x]); #endif /* TEST || DEBUG */ /* ** All finished. Return the new argc and argv[] addresses to Zip. */ *argc_p = new_argc; *argv_p = new_argv; return (SS$_NORMAL); } static unsigned long get_list (struct dsc$descriptor_s *qual, struct dsc$descriptor_d *rawtail, int delim, char **p_str, unsigned long *p_size, unsigned long *p_end) { /* ** Routine: get_list ** ** Function: This routine runs through a comma-separated CLI list ** and copies the strings to the argv buffer. The ** specified separation character is used to separate ** the strings in the argv buffer. ** ** All unquoted strings are converted to lower-case. ** ** Formal parameters: ** ** qual - Address of descriptor for the qualifier name ** rawtail - Address of descriptor for the full command line tail ** delim - Character to use to separate the list items ** p_str - Address of pointer pointing to output buffer (argv strings) ** p_size - Address of number containing allocated size for output string ** p_end - Address of number containing used length in output buf ** */ register unsigned long status; struct dsc$descriptor_d work_str; init_dyndesc(work_str); status = cli$present(qual); if (status & 1) { unsigned long len, old_len; long ind, sind; int keep_case; char *src, *dst; int x; /* ** Just in case the string doesn't exist yet, though it does. */ if (*p_str == NULL) { *p_size = ARGBSIZE_UNIT; if ((*p_str = (char *) malloc(*p_size)) == NULL) return (SS$_INSFMEM); len = 0; } else- { len = *p_end; } while ((status = cli$get_value(qual, &work_str)) & 1) { old_len = len; len += work_str.dsc$w_length + 1; CHECK_BUFFER_ALLOCATION(*p_str, *p_size, len) /* ** Look for the filename in the original foreign command ** line to see if it was originally quoted. If so, then ** don't convert it to lowercase. */ keep_case = FALSE; str$find_first_substring(rawtail, &ind, &sind, &work_str); if ((ind > 1 && *(rawtail->dsc$a_pointer + ind - 2) == '"') || (ind == 0)) keep_case = TRUE; /* ** Copy the string to the buffer, converting to lowercase. */ src = work_str.dsc$a_pointer; dst = *p_str+old_len; for (x = 0; x < work_str.dsc$w_length; x++) { if (!keep_case && ((*src >= 'A') && (*src <= 'Z'))) *dst++ = *src++ + 32; else *dst++ = *src++; } if (status == CLI$_COMMA) (*p_str)[len-1] = (char)delim; else (*p_str)[len-1] = '\0'; } *p_end = len; } return (SS$_NORMAL); } static unsigned long check_cli (struct dsc$descriptor_s *qual) { /* ** Routine: check_cli ** ** Function: Check to see if a CLD was used to invoke the program. ** ** Formal parameters: ** ** qual - Address of descriptor for qualifier name to check. ** */ lib$establish(lib$sig_to_ret); /* Establish condition handler */ return (cli$present(qual)); /* Just see if something was given */ } #ifndef TEST #ifdef SFX #ifdef SFX_EXDIR # define SFXOPT_EXDIR "\n and /DIRECTORY=exdir-spec" #else # define SFXOPT_EXDIR "" #endif #ifdef MORE # define SFXOPT1 "/PAGE, " #else # define SFXOPT1 "" #endif int VMSCLI_usage(__GPRO__ int error) /* returns PK-type error code */ { extern char UnzipSFXBanner[]; #ifdef BETA extern char BetaVersion[]; #endif int flag; if (!show_VMSCLI_usage) return usage(__G__ error); flag = (error? 1 : 0); Info(slide, flag, ((char *)slide, UnzipSFXBanner, UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE)); Info(slide, flag, ((char *)slide, "\ Valid main options are /TEST, /FRESHEN, /UPDATE, /PIPE, /SCREEN, /COMMENT%s.\n", SFXOPT_EXDIR)); Info(slide, flag, ((char *)slide, "\ Modifying options are /TEXT, /BINARY, /JUNK, /[NO]OVERWRITE, /QUIET,\n\ /CASE_INSENSITIVE, /LOWERCASE, %s/VERSION, /RESTORE.\n", SFXOPT1)); #ifdef BETA Info(slide, flag, ((char *)slide, BetaVersion, "\n", "SFX")); #endif if (error) return PK_PARAM; else return PK_COOL; /* just wanted usage screen: no error */ } /* end function usage() */ #else /* !SFX */ int VMSCLI_usage(__GPRO__ int error) /* returns PK-type error code */ { extern char UnzipUsageLine1[]; #ifdef BETA extern char BetaVersion[]; #endif int flag; if (!show_VMSCLI_usage) return usage(__G__ error); /*--------------------------------------------------------------------------- If user requested usage, send it to stdout; else send to stderr. ---------------------------------------------------------------------------*/ flag = (error? 1 : 0); /*--------------------------------------------------------------------------- Print either ZipInfo usage or UnZip usage, depending on incantation. ---------------------------------------------------------------------------*/ if (uO.zipinfo_mode) { #ifndef NO_ZIPINFO Info(slide, flag, ((char *)slide, "\ ZipInfo %d.%d%d%s %s, by Newtware and the fine folks at Info-ZIP.\n\n\ List name, date/time, attribute, size, compression method, etc., about files\n\ in list (excluding those in xlist) contained in the specified .zip archive(s).\ \n\"file[.zip]\" may be a wildcard name containing * or % (i UNZIP.BCKjX [UNZIP542.VMS]CMDLINE.C;1ML;1;5e.g., \"*font-%.zip\ \").\n", ZI_MAJORVER, ZI_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE)); Info(slide, flag, ((char *)slide, "\ usage: zipinfo file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options\n\ or: unzip /ZIPINFO file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options\ \n\nmain\ listing-format options: /SHORT short \"ls -l\" format (def.)\n\ /ONE_LINE just filenames, one/line /MEDIUM medium Unix \"ls -l\" format\n\ /VERBOSE verbose, multi-page format /LONG long Unix \"ls -l\" format\n\ ")); Info(slide, flag, ((char *)slide, "\ miscellaneous options:\n \ /HEADER print header line /TOTALS totals for listed files or for all\n\ /COMMENT print zipfile comment /TIMES times in sortable decimal format\n\ /[NO]CASE_INSENSITIVE match filenames case-insensitively\n\ /[NO]PAGE page output through built-in \"more\"\n\ /EXCLUDE=(file-spec1,etc.) exclude file-specs from listing\n")); Info(slide, flag, ((char *)slide, "\n\ Type unzip \"-Z\" for Unix style flags\n\ Remember that non-lowercase filespecs must be\ quoted in VMS (e.g., \"Makefile\").\n")); #endif /* !NO_ZIPINFO */ } else { /* UnZip mode */ Info(slide, flag, ((char *)slide, UnzipUsageLine1, UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, UZ_VERSION_DATE)); #ifdef BETA Info(slide, flag, ((char *)slide, BetaVersion, "", "")); #endif Info(slide, flag, ((char *)slide, "\ Usage: unzip file[.zip] [list] [/EXCL=(xlist)] [/DIR=exdir] /options /modifiers\ \n Default action is to extract files in list, except those in xlist, to exdir\ ;\n file[.zip] may be a wildcard. %s\n\n", #ifdef NO_ZIPINFO "(ZipInfo mode is disabled in this version.)" #else "Type \"unzip /ZIPINFO\" for ZipInfo-mode usage." #endif )); Info(slide, flag, ((char *)slide, "\ Major options include (type unzip -h for Unix style flags):\n\ /[NO]TEST, /LIST, /[NO]SCREEN, /PIPE, /[NO]FRESHEN, /[NO]UPDATE,\n\ /[NO]COMMENT, /DIRECTORY=directory-spec, /EXCLUDE=(file-spec1,etc.)\n\n\ Modifiers include:\n\ /BRIEF, /FULL, /[NO]TEXT[=NONE|AUTO|ALL], /[NO]BINARY[=NONE|AUTO|ALL],\n\ /[NO]OVERWRITE, /[NO]JUNK, /QUIET, /QUIET[=SUPER], /[NO]PAGE,\n\ /[NO]CASE_INSENSITIVE, /[NO]LOWERCASE, /[NO]VERSION, /[NO]RESTORE\n\n")); Info(slide, flag, ((char *)slide, "\ Examples (see unzip.txt or \"HELP UNZIP\" for more info):\n \ unzip edit1 /EXCL=joe.jou /CASE_INSENSITIVE => extract all files except\n \ joe.jou (or JOE.JOU, or any combination of case) from zipfile edit1.zip\n \ unzip zip201 \"Makefile.VMS\" vms/*.[ch] => extract VMS Makefile and\n\ *.c and *.h files; must quote uppercase names if /CASE_INSENS not used\n\ unzip foo /DIR=tmp:[.test] /JUNK /TEXT /OVER => extract all files to temp.\ \n directory without paths, auto-converting text files and overwriting\ \n")); } /* end if (zipinfo_mode) */ if (error) return PK_PARAM; else return PK_COOL; /* just wanted usage screen: no error */ } /* end function VMSCLI_usage() */ #endif /* ?SFX */ #endif /* !TEST */ r*[UNZIP542.VMS]CONTENTS.;1+,h./ 4- 0@123KPWO56.7.89GHJContents of the "vms" sub-archive for UnZip 5.3 and later: Contents this file README general VMS info about using UnZip and zipfiles unzip_def.rnh UnZip default help page, RUNOFF format unzip_cli.help UnZip VMSCLI help page, TPU format unzipsfx.hlp UnZipSFX pre-formatted help page cvthelp.tpu TPU macro file to convert .help file to RUNOFF format cmdline.c VMS-style command-line-interface code (if VMSCLI defined) unz_cli.cld more VMS-command-line stuff (if VMSCLI defined) vms.c VMS file manipulation code vms.h VMS header file for UnZip vmsdefs.h VMS system declarations (missing C compiler support) make_unz.com command file to make UnZip with GNU or DEC C on VAX or AXP link_unz.com command file to (re)link UnZip and UnZipSFX descrip.mms MMK/MMS makefile for UnZip/ZipInfo and UnZipSFX unzip.opt options file used for linking unzip unzipsfx.opt options file used for linking unzipsfx makesfx.com command file to create self-extracting archives MAKE/VMS is no longer supported since MMK (MMS clone by Matt Madison/MadGoat Enterprises, compatible with descrip.mms) is both free and becoming quite popular. MMK is available by anonymous ftp from ftp.spc.edu/ftp.wku.edu and by mailserver at lists.wku.edu. Check VMS newsgroups for announcements and exact location. The MAKE_UNZ.COM command file accepts compilation options in a LOCAL_UNZIP symbol or logical; the format is "VMSCLI,RETURN_CODES" (for example). DESCRIP.MMS must be edited in order to use special options. *[UNZIP542.VMS]CVTHELP.TPU;1+,k. / 4 - 0@123KPWO 56 7 89GHJ! TITLE CVTHELP.TPU ! IDENT 01-000 ! !++ ! Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ! ! See the accompanying file LICENSE, version 2000-Apr-09 or later ! (the contents of which are also included in zip.h) for terms of use. ! If, for some reason, all these files are missing, the Info-ZIP license ! also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ! !++ ! ! Program: CVTHELP.TPU ! ! Author: Hunter Goatley ! ! Date: January 12, 1992 ! ! Purpose: Convert .HELP files to RUNOFF .RNH files. Substitutes ! RUNOFF commands for tags imbedded in the .HELP file. ! ! Calling sequence: ! ! $ EDIT/TPU/NOJOURNAL/NODISPLAY/COMMAND=CVTHELP file.HELP ! ! Modified by: ! ! 01-000 Hunter Goatley 12-JAN-1992 15:15 ! Original version. ! !-- Procedure eve_convert_help Local temp ,x ; qualifier_level := 0; hg$substitute_topic(current_buffer, "

", ".indent-3", "1"); hg$substitute_topic(current_buffer, "", ".sk;.indent-3", ""); hg$substitute_topic(current_buffer, "", ".indent-3", "2"); hg$substitute_topic(current_buffer, "", ".indent-3", "3"); hg$substitute_topic(current_buffer, "", ".indent-3", "4"); hg$substitute_comment(current_buffer,"",".indent-3;2 Qualifiers"); hg$substitute_comment(current_buffer,"",".indent-2"); hg$substitute_comment(current_buffer,"",".lm+3"); hg$substitute. UNZIP.BCKk NZIP542.VMS]CVTHELP.TPU;1;11 }_comment(current_buffer,"",".lm-3"); hg$substitute_comment(current_buffer,"",".lm+4"); hg$substitute_comment(current_buffer,"",".lm-4"); hg$substitute_comment(current_buffer,"",".noflags;.lm3;.rm70"); hg$substitute_comment(current_buffer,"",".lm+4;.literal"); hg$substitute_comment(current_buffer,"",".end literal;.lm-4"); hg$substitute_comment(current_buffer,"",'.list 1,"o"'); hg$substitute_comment(current_buffer,"",'.list 0,"o"'); hg$substitute_comment(current_buffer,"",".le"); hg$substitute_comment(current_buffer,"",".end list"); hg$substitute_comment(current_buffer,"
",".center"); hg$substitute_comment(current_buffer,"",".sk;.indent2"); hg$substitute_comment(current_buffer,"",".note"); hg$substitute_comment(current_buffer,"",".end note"); hg$substitute_comment(current_buffer, LINE_BEGIN & LINE_END,".sk"); hg$substitute_comment(current_buffer, LINE_BEGIN & "|", ""); EndProcedure; ! eve_convert_help Procedure hg$substitute_comment (the_buffer, target, new) Local temp ,save_pos ,x ; on_error; endon_error; save_pos := mark(none); position(beginning_of(the_buffer)); loop x := search(target, forward); exitif x = 0; position (x); erase_character(length(x)); copy_text(new); endloop; position(save_pos); EndProcedure; ! hg$substitute_comment Procedure hg$substitute_topic (the_buffer, target, new, level) Local temp ,save_pos ,x ; on_error; endon_error; save_pos := mark(none); position(beginning_of(the_buffer)); loop x := search(target, forward); exitif x = 0; position (x); erase_character(length(x)); move_vertical(-1); if (length(current_line) = 0) then copy_text("|"); endif; move_vertical(1); copy_text(".!------------------------------------------------------"); split_line; copy_text(new); move_horizontal(-current_offset); move_vertical(1); if level <> "" then copy_text(level + " "); ! else ! if qualifier_level = 0 ! then ! copy_text("2 Qualifiers"); ! split_line; split_line; ! copy_text(new); split_line; ! qualifier_level := 1; ! endif; endif; move_horizontal(-current_offset); move_vertical(1); if length(current_line) = 0 then if (target = "
") OR (target = "") OR (target = "") or (target = "") then copy_text(".br"); else copy_text(".sk"); endif; endif; endloop; position(save_pos); EndProcedure; ! hg$substitute_topic !=============================================================================== Procedure tpu$init_procedure Local temp ,orig_filespec ,f ; on_error endon_error; !Prompt user for information orig_filespec := get_info(command_line, "file_name"); if orig_filespec = "" then message("No .HELP file given"); quit; endif; f := file_parse(orig_filespec, ".HELP"); !Add .LIS ending ! Create a buffer and window for editing main_buf := create_buffer ("MAIN",f); set (eob_text, main_buf, "[End of buffer]"); position (beginning_of(main_buf)); eve_convert_help; f := file_parse(orig_filespec,"","",NAME); write_file (main_buf, f+".RNH"); quit; EndProcedure; !TPU$INIT_PROCEDURE tpu$init_procedure; *[UNZIP542.VMS]DESCRIP.MMS;1+,l./ 4%- 0@123KPWO56V7V89GHJ !========================================================================== ! MMS description file for UnZip/UnZipSFX 5.32 or later 14 Sep 97 !========================================================================== ! ! To build UnZip that uses shared libraries, edit the USER CUSTOMIZATION ! lines below to taste, then do ! mms ! or ! mmk ! if you use Matt's Make (free MMS-compatible make utility). ! ! (One-time users will find it easier to use the MAKE_UNZ.COM command file, ! which generates both UnZip and UnZipSFX. Just type "@[.VMS]MAKE_UNZ", or ! "@[.VMS]MAKE_UNZ GCC" if you want to use GNU C.) ! To build the default target ! "all executables (linked against shareable images), and help file", ! you can simply type "mmk" or "mms". ! (You have to copy the description file to your working directory for MMS, ! with MMK you can alternatively use the /DESCR=[.VMS] qualifier. ! ! In all other cases where you want to explicitely specify a makefile target, ! you have to specify your compiling environment, too. These are: ! ! $ MMS/MACRO=(__ALPHA__=1) ! Alpha AXP, (DEC C) ! $ MMS/MACRO=(__DECC__=1) ! VAX, using DEC C ! $ MMS/MACRO=(__FORCE_VAXC__=1) ! VAX, prefering VAXC over DECC ! $ MMS/MACRO=(__VAXC__=1) ! VAX, where VAXC is default ! $ MMS/MACRO=(__GNUC__=1) ! VAX, using GNU C ! ! To build UnZip without shared libraries, ! mms noshare ! To delete all .OBJ, .OLB, .EXE and .HLP files, ! mms clean DO_THE_BUILD : @ decc = f$search("SYS$SYSTEM:DECC$COMPILER.EXE").nes."" @ axp = f$getsyi("HW_MODEL").ge.1024 @ macro = "/MACRO=(" @ if decc then macro = macro + "__DECC__=1," @ if axp then macro = macro + "__ALPHA__=1," @ if .not.(axp.or.decc) then macro = macro + "__VAXC__=1," @ macro = f$extract(0,f$length(macro)-1,macro)+ ")" $(MMS)$(MMSQUALIFIERS)'macro' default .IFDEF __ALPHA__ E = .AXP_EXE O = .AXP_OBJ A = .AXP_OLB .ELSE .IFDEF __DECC__ E = .VAX_DECC_EXE O = .VAX_DECC_OBJ A = .VAX_DECC_OLB .ENDIF .IFDEF __FORCE_VAXC__ __VAXC__ = 1 .ENDIF .IFDEF __VAXC__ E = .VAX_VAXC_EXE O = .VAX_VAXC_OBJ A = .VAX_VAXC_OLB .ENDIF .IFDEF __GNUC__ E = .VAX_GNUC_EXE O = .VAX_GNUC_OBJ A = .VAX_GNUC_OLB .ENDIF .ENDIF .IFDEF O .ELSE !If EXE and OBJ extensions aren't defined, define them E = .EXE O = .OBJ A = .OLB .ENDIF !The following preprocessor macros are set to enable the VMS CLI$ interface: CLI_DEFS = VMSCLI, !!!!!!!!!!!!!!!!!!!!!!!!!!! USER CUSTOMIZATION !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! add RETURN_CODES, and/or any other optional preprocessor flags (macros) ! except VMSCLI to the following line for a custom version (do not forget ! a trailing comma!!): COMMON_DEFS = ! ! WARNING: Do not use VMSCLI here!! The creation of an UnZip executable ! utilizing the VMS CLI$ command interface is handled differently. !!!!!!!!!!!!!!!!!!!!!!!! END OF USER CUSTOMIZATION !!!!!!!!!!!!!!!!!!!!!!!! .IFDEF __GNUC__ CC = gcc LIBS = ,GNU_CC:[000000]GCCLIB.OLB/LIB .ELSE CC = cc LIBS = .ENDIF CFLAGS = /NOLIST/INCL=(SYS$DISK:[]) OPTFILE = sys$disk:[.vms]vaxcshr.opt .IFDEF __ALPHA__ CC_OPTIONS = /STANDARD=RELAX/PREFIX=ALLם1 sf wzh 1Y8(-HS!{5c2GL.kjlf~UDe$EUE%Vha<`ZJz3&`e2?0he@ ,7\v\!{ĺz  O:Ҵ Rx]bt8p%b 5릏 4I'7BFPINgqr y`4hGE s/O+8I鵘ҭئGU6rrn\pP4^ eE EFAHr5YS{uJá(K jP cmWG4 c > x V'$#(F3)AmZ:!+~~Mcz $Kq^ gwDp'd-I H4Ľu)?.r<%pH@JLP9ELPq{l^aDJ*UA f!5 7G^qYC(+Nme%(&A '-,GDI (o0O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YSSHR .ELSE .IFDEF __FORCE_VAXC__ !Select VAXC on systems where DEC C exists CC_OPTIONS = /VAXC .ELSE !No flag allowed/needed on a pure VAXC system CC_OPTIONS = .ENDIF CC_DEFS = OPTFILE_LIST = ,$(OPTFILE) OPTIONS = $(LIBS),$(OPTFILE)/OPTIONS NOSHARE_OPTS = $(LIBS),SYS$LIBRARY:VAXCRTL.OLB/LIB/NOSYSSHR .ENDIF .ENDIF .IFDEF __DEBUG__ CDEB = /DEBUG/NOOPTIMIZE LDEB = /DEBUG .ELSE CDEB = LDEB = /NOTRACE .ENDIF CFLAGS_ALL = $(CC_OPTIONS) $(CFLAGS) $(CDEB) - /def=($(CC_DEFS) $(COMMON_DEFS) VMS) CFLAGS_SFX = $(CC_OPTIONS) $(CFLAGS) $(CDEB) - /def=($(CC_DEFS) $(COMMON_DEFS) SFX, VMS) CFLAGS_CLI = $(CC_OPTIONS) $(CFLAGS) $(CDEB) - /def=($(CC_DEFS) $(COMMON_DEFS) $(CLI_DEFS) VMS) CFLAGS_SXC = $(CC_OPTIONS) $(CFLAGS) $(CDEB) - /def=($(CC_DEFS) $(COMMON_DEFS) $(CLI_DEFS) SFX, VMS) LINKFLAGS = $(LDEB) OBJM = unzip$(O), unzcli$(O), unzipsfx$(O), unzsxcli$(O) COMMON_OBJS1 = crc32$(O),crctab$(O),crypt$(O),envargs$(O),- explode$(O),extract$(O),fileio$(O),globals$(O) COMMON_OBJS2 = inflate$(O),list$(O),match$(O),process$(O),ttyio$(O),- unreduce$(O),unshrink$(O),zipinfo$(O),- vms$(O) OBJUNZLIB = $(COMMON_OBJS1),$(COMMON_OBJS2) COMMON_OBJX1 = crc32$(O),crctab$(O),crypt$(O),- EXTRACT=extract_$(O),- fileio$(O),globals$(O) COMMON_OBJX2 = inflate$(O),match$(O),- PROCESS=process_$(O),- ttyio$(O),- VMS=vms_$(O) OBJSFXLIB = $(COMMON_OBJX1),$(COMMON_OBJX2) UNZX_UNX = unzip UNZX_CLI = unzip_cli UNZSFX_DEF = unzipsfx UNZSFX_CLI = unzipsfx_cli OBJS = unzip$(O), $(OBJUNZLIB) OBJX = UNZIP=unzipsfx$(O), $(OBJSFXLIB) OBJSCLI = UNZIP=unzipcli$(O), - VMS_UNZIP_CLD=unz_cli$(O),- VMS_UNZIP_CMDLINE=cmdline$(O) OBJXCLI = UNZIP=unzsxcli$(O),- VMS_UNZIP_CLD=unz_cli$(O),- VMS_UNZIP_CMDLINE=cmdline_$(O) UNZHELP_UNX_RNH = [.vms]unzip_def.rnh UNZHELP_CLI_RNH = [.vms]unzip_cli.rnh OLBUNZ = unzip$(A) OLBCLI = unzipcli$(A) OLBSFX = unzipsfx$(A) OLBSXC = unzsxcli$(A) UNZIP_H = unzip.h unzpriv.h globals.h UNZIPS = $(UNZX_UNX)$(E), $(UNZX_CLI)$(E), $(UNZSFX_DEF)$(E), $(UNZSFX_CLI)$(E) UNZIPS_NOSHARE = $(UNZX_UNX)_noshare$(E), $(UNZSFX_DEF)_noshare$(E) UNZIPHELPS = $(UNZX_UNX).hlp, $(UNZX_CLI).hlp !!!!!!!!!!!!!!!!!!! override default rules: !!!!!!!!!!!!!!!!!!! .suffixes : .suffixes : .ANL $(E) $(A) .MLB .HLB .TLB .FLB $(O) - .FORM .BLI .B32 .C .COB - .FOR .BAS .B16 .PLI .PEN .PAS .MAC .MAR .M64 .CLD .MSG .COR .DBL - .RPG .SCN .IFDL .RBA .RC .RCO .RFO .RPA .SC .SCO .SFO .SPA .SPL - .SQLADA .SQLMOD .RGK .RGC .MEM .RNO .HLP .RNH .L32 .REQ .R32 - .L16 .R16 .TXT .H .FRM .MMS .DDL .COM .DAT .OPT .CDO .SDML .ADF - .GDF .LDF .MDF .RDF .TDF $(O)$(E) : $(LINK) $(LINKFLAGS) /EXE=$(MMS$TARGET) $(MMS$SOURCE) $(O)$(A) : If "''F$Search("$(MMS$TARGET)")'" .EQS. "" Then $(LIBR)/Create $(MMS$TARGET) $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE) .CLD$(O) : SET COMMAND /OBJECT=$(MMS$TARGET) $(CLDFLAGS) $(MMS$SOURCE) .c$(O) : $(CC) $(CFLAGS_ALL) /OBJ=$(MMS$TARGET) $(MMS$SOURCE) .RNH.HLP : runoff /out=$@ $< !!!!!!!!!!!!!!!!!! here starts the unzip specific part !!!!!!!!!!! default : $(UNZIPS), $(UNZIPHELPS) @ ! Do nothing. noshare : $(UNZIPS_NOSHARE), $(UNZIPHELPS) @ ! Do nothing. $(UNZX_UNX)$(E) : $(OLBUNZ)($(OBJS))$(OPTFILE_LIST) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBUNZ)/INCLUDE=UNZIP/LIBRARY$(OPTIONS), - sys$disk:[.vms]unzip.opt/OPT $(UNZX_CLI)$(E) : $(OLBCLI)($(OBJSCLI)),$(OLBUNZ)($(OBJUNZLIB))$(OPTFILE_LIST) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBCLI)/INCLUDE=UNZIP/LIBRARY, $(OLBUNZ)/LIBRARY$(OPTIONS), - sys$disk:[.vms]unzip.opt/OPT $(UNZSFX_DEF)$(E) : $(OLBSFX)($(OBJX))$(OPTFILE_LIST) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBSFX)/INCLUDE=UNZIP/LIBRARY$(OPTIONS), - sys$disk:[.vms]unzipsfx.opt/OPT $(UNZSFX_CLI)$(E) : $(OLBSXC)($(OBJXCLI)),$(OLBSFX)($(OBJSFXLIB))$(OPTFILE_LIST) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBSXC)/INCLUDE=UNZIP/LIBRARY, $(OLBSFX)/LIBRARY$(OPTIONS), - sys$disk:[.vms]unzipsfx.opt/OPT $(UNZX_UNX)_noshare$(E) : $(OLBUNZ)($(OBJS)) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBUNZ)/INCLUDE=UNZIP/LIBRARY$(NOSHARE_OPTS), - sys$disk:[.vms]unzip.opt/OPT $(UNZSFX_DEF)_noshare$(E) : $(OLBSFX)($(OBJX)) $(LINK)$(LINKFLAGS) /EXE=$(MMS$TARGET) - $(OLBSFX)/INCLUDE=UNZIP/LIBRARY$(NOSHARE_OPTS), - sys$disk:[.vms]unzipsfx.opt/OPT $(OPTFILE) : @ open/write tmp $(MMS$TARGET) @ write tmp "SYS$SHARE:VAXCRTL.EXE/SHARE" @ close tmp $(UNZHELP_CLI_RNH) : [.vms]unzip_cli.help @ set default [.vms] edit/tpu/nosection/nodisplay/command=cvthelp.tpu unzip_cli.help @ set default [-] $(UNZX_UNX).hlp : $(UNZHELP_UNX_RNH) runoff /out=$@ $< $(UNZX_CLI).hlp : $(UNZHELP_CLI_RNH) clean.com : @ open/write tmp $(MMS$TARGET) @ write tmp "$!" @ write tmp "$! Clean.com -- procedure to delete files. It always returns success" @ write tmp "$! status despite any error or warnings. Also it extracts" @ write tmp "$! filename from MMS ""module=file"" format." @ write tmp "$!" @ write tmp "$ on control_y then goto ctly" @ write tmp "$ if p1.eqs."""" then exit 1" @ write tmp "$ i = -1" @ write tmp "$scan_list:" @ write tmp "$ i = i+1" @ write tmp "$ item = f$elem(i,"","",p1)" @ write tmp "$ if item.eqs."""" then goto scan_list" @ write tmp "$ if item.eqs."","" then goto done ! End of list" @ write tmp "$ item = f$edit(item,""trim"") ! Clean of blanks" @ write tmp "$ wild = f$elem(1,""="",item)" @ write tmp "$ show sym wild" @ write tmp "$ if wild.eqs.""="" then wild = f$elem(0,""="",item)" @ write tmp "$ vers = f$parse(wild,,,""version"",""syntax_only"")" @ write tmp "$ if vers.eqs."";"" then wild = wild - "";"" + "";*""" @ write tmp "$scan:" @ write tmp "$ f = f$search(wild)" @ write tmp "$ if f.eqs."""" then goto scan_list" @ write tmp "$ on error then goto err" @ write tmp "$ on warning then goto warn" @ write tmp "$ delete/log 'f'" @ write tmp "$warn:" @ write tmp "$err:" @ write tmp "$ goto scan" @ write tmp "$done:" @ write tmp "$ctly:" @ write tmp "$ exit 1" @ close tmp clean : clean.com ! delete *$(O);*, *$(A);*, unzip$(exe);*, unzipsfx$(exe);*, - ! unzip.hlp;*, [.vms]unzip.rnh;* @clean "$(OBJM)" @clean "$(COMMON_OBJS1)" @clean "$(COMMON_OBJS2)" @clean "$(OBJSCLI)" @clean "$(COMMON_OBJX1)" @clean "$(COMMON_OBJX2)" @clean "$(OBJXCLI)" @clean "$(OPTFILE)" @clean "$(OLBUNZ),$(OLBCLI),$(OLBSFX),$(OLBSXC)" @clean "$(UNZIPS)" @clean "$(UNZIPS_NOSHARE)" @clean "$(UNZHELP_CLI_RNH)" @clean "$(UNZIPHELPS)" - delete/noconfirm/nolog clean.com;* crc32$(O) : crc32.c $(UNZIP_H) zip.h crctab$(O) : crctab.c $(UNZIP_H) zip.h crypt$(O) : crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$(O) : envargs.c $(UNZIP_H) explode$(O) : explode.c $(UNZIP_H) extract$(O) : extract.c $(UNZIP_H) crypt.h fileio$(O) : fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(O) : globals.c $(UNZIP_H) inflate$(O) : inflate.c inflate.h $(UNZIP_H) list$(O) : list.c $(UNZIP_H) match$(O) : match.c $(UNZIP_H) process$(O) : process.c $(UNZIP_H) ttyio$(O) : ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(O) : unreduce.c $(UNZIP_H) unshrink$(O) : unshrink.c $(UNZIP_H) unzip$(O) : unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$(O) : zipinfo.c $(UNZIP_H) unzipcli$(O) : unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) $(CFLAGS_CLI) /OBJ=$(MMS$TARGET) $(MMS$SOURCE) cmdline$(O) : [.vms]cmdline.c $(UNZIP_H) vers(= UNZIP.BCKl NZIP542.VMS]DESCRIP.MMS;1;1ion.h $(CC) $(CFLAGS_CLI) /OBJ=$(MMS$TARGET) $(MMS$SOURCE) unz_cli$(O) : [.vms]unz_cli.cld cmdline_$(O) : [.vms]cmdline.c $(UNZIP_H) version.h $(CC) $(CFLAGS_SXC) /OBJ=$(MMS$TARGET) [.vms]cmdline.c extract_$(O) : extract.c $(UNZIP_H) crypt.h $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) extract.c process_$(O) : process.c $(UNZIP_H) $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) process.c unzipsfx$(O) : unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) unzip.c unzsxcli$(O) : unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) $(CFLAGS_SXC) /OBJ=$(MMS$TARGET) unzip.c vms$(O) : [.vms]vms.c [.vms]vms.h [.vms]vmsdefs.h $(UNZIP_H) ! @ x = "" ! @ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY" $(CC) $(CFLAGS_ALL) /OBJ=$(MMS$TARGET) [.vms]vms.c vms_$(O) : [.vms]vms.c [.vms]vms.h [.vms]vmsdefs.h $(UNZIP_H) ! @ x = "" ! @ if f$search("SYS$LIBRARY:SYS$LIB_C.TLB").nes."" then x = "+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY" $(CC) $(CFLAGS_SFX) /OBJ=$(MMS$TARGET) [.vms]vms.c *[UNZIP542.VMS]LINK_UNZ.COM;1+,m. / 4 H- 0@123KPWO56/ϝ7/ϝ89GHJ$ ! LINK_UNZ.COM $ ! $ ! Command procedure to (re)link the VMS versions of $ ! UnZip/ZipInfo and UnZipSFX $ ! $ ! last updated: 11 September 1997 $ ! $ ! Command args: $ ! - select compiler environment: "VAXC", "DECC", "GNUC" $ ! - select installation of CLI interface version of unzip: $ ! "VMSCLI" or "CLI" $ ! - force installation of UNIX interface version of unzip $ ! (override LOCAL_UNZIP environment): "NOVMSCLI" or "NOCLI" $ ! $ ! $ on error then goto error $ on control_y then goto error $ OLD_VERIFY = f$verify(0) $! $ say := write sys$output $!##################### Read settings from environment ######################## $! $ if f$type(LOCAL_UNZIP).eqs."" $ then $ local_unzip = "" $ else ! Trim blanks and append comma if missing $ local_unzip = f$edit(local_unzip, "TRIM") $ if f$extract(f$length(local_unzip)-1, 1, local_unzip).nes."," then - local_unzip = local_unzip + "," $ endif $! Check for the presence of "VMSCLI" in local_unzip. If yes, we will define $! the foreign command for "unzip" to use the executable containing the $! CLI interface. $ pos_cli = f$locate("VMSCLI",local_unzip) $ len_local_unzip = f$length(local_unzip) $ if pos_cli.ne.len_local_unzip $ then $ CLI_IS_DEFAULT = 1 $ ! Remove "VMSCLI" macro from local_unzip. The UnZip executable including $ ! the CLI interface is now created unconditionally. $ local_unzip = f$extract(0, pos_cli, local_unzip) + - $ f$extract(pos_cli+7, len_local_unzip-(pos_cli+7), local_unzip) $ else $ CLI_IS_DEFAULT = 0 $ endif $ delete/symbol/local pos_cli $ delete/symbol/local len_local_unzip $!##################### Customizing section ############################# $! $ unzx_unx = "unzip" $ unzx_cli = "unzip_cli" $ unzsfx_unx = "unzipsfx" $ unzsfx_cli = "unzipsfx_cli" $! $ MAY_USE_DECC = 1 $ MAY_USE_GNUC = 0 $! $! Process command line parameters requesting optional features: $ arg_cnt = 1 $ argloop: $ current_arg_name = "P''arg_cnt'" $ curr_arg = f$edit('current_arg_name',"UPCASE") $ IF curr_arg .eqs. "" THEN GOTO argloop_out $ IF curr_arg .eqs. "VAXC" $ THEN MAY_USE_DECC = 0 $ MAY_USE_GNUC = 0 $ ENDIF $ IF curr_arg .eqs. "DECC" $ THEN MAY_USE_DECC = 1 $ MAY_USE_GNUC = 0 $ ENDIF $ IF curr_arg .eqs. "GNUC" $ THEN MAY_USE_DECC = 0 $ MAY_USE_GNUC = 1 $ ENDIF $ IF (curr_arg .eqs. "VMSCLI") .or. (curr_arg .eqs. "CLI") $ THEN $ CLI_IS_DEFAULT = 1 $ ENDIF $ IF (curr_arg .eqs. "NOVMSCLI") .or. (curr_arg .eqs. "NOCLI") $ THEN $ CLI_IS_DEFAULT = 0 $ ENDIF $ arg_cnt = arg_cnt + 1 $ GOTO argloop $ argloop_out: $! $ if CLI_IS_DEFAULT $ then $ UNZEXEC = unzx_cli $ else $ UNZEXEC = unzx_unx $ endif $! $!####################################################################### $! $ ! Find out current disk, directory, compiler and options $ ! $ my_name = f$env("procedure") $ workdir = f$env("default") $ here = f$parse(workdir,,,"device") + f$parse(workdir,,,"directory") $ axp = f$getsyi("HW_MODEL").ge.1024 $ if axp $ then $ ! Alpha AXP $ ARCH_NAME == "Alpha" $ ARCH_PREF = "AXP_" $ HAVE_DECC_VAX = 0 $ USE_DECC_VAX = 0 $ IF (f$search("SYS$DISK:[]UNZIP.''ARCH_PREF'OLB").eqs."") $ THEN $ say "Cannot find any AXP object library for UnZip." $ say " You must keep all binary files of the object distribution" $ say " in the current directory !" $ goto error $ ENDIF $ if MAY_USE_GNUC $ then say "GNU C has not yet been ported to OpenVMS AXP." $ say "You must use DEC C to build UnZip." $ goto error $ endif $ ARCH_CC_P = ARCH_PREF $ opts = "" $ say "Linking on AXP using DEC C" $ else $ ! VAX $ ARCH_NAME == "VAX" $ ARCH_PREF = "VAX_" $ ! check which object libraries are present: $ HAVE_DECC_VAX = - (f$search("SYS$DISK:[]UNZIP.''ARCH_PREF'DECC_OLB").nes."") $ HAVE_VAXC_VAX = - (f$search("SYS$DISK:[]UNZIP.''ARCH_PREF'VAXC_OLB").nes."") $ HAVE_GNUC_VAX = - (f$search("SYS$DISK:[]UNZIP.''ARCH_PREF'GNUC_OLB").nes."") $ IF .not.HAVE_DECC_VAX .and. .not.HAVE_VAXC_VAX .and. .not.HAVE_GNUC_VAX $ THEN $ say "Cannot find any VAX object library for UnZip." $ say " You must keep all binary files of the object distribution" $ say " in the current directory !" $ goto error $ ENDIF $ IF HAVE_DECC_VAX .AND. MAY_USE_DECC $ THEN $ ! We use DECC: $ USE_DECC_VAX = 1 $ ARCH_CC_P = "''ARCH_PREF'DECC_" $ opts = "" $ say "Linking on VAX using DEC C" $ ELSE $ ! We use VAXC (or GNU C): $ USE_DECC_VAX = 0 $ opts = ",SYS$DISK:[.VMS]VAXCSHR.OPT/OPTIONS" $ if HAVE_GNUC_VAX .and. (.not.HAVE_VAXC_VAX .or. MAY_USE_GNUC) $ then $ ARCH_CC_P = "''ARCH_PREF'GNUC_" $ opts = ",GNU_CC:[000000]GCCLIB.OLB/LIB ''opts'" $ say "Linking on VAX using GNU C" $ else $ ARCH_CC_P = "''ARCH_PREF'VAXC_" $ say "Linking on VAX using VAX C" $ endif $ ENDIF $ endif $ LFLAGS = "/notrace" $ if (opts .nes. "") .and. (f$search("[.vms]vaxcshr.opt") .eqs. "") $ then create [.vms]vaxcshr.opt $ open/append tmp [.vms]vaxcshr.opt $ write tmp "SYS$SHARE:VAXCRTL.EXE/SHARE" $ close tmp $ endif $ tmp = f$verify(1) ! Turn echo on to see what's happening $ ! $ link'LFLAGS'/exe='unzx_unx'.'ARCH_CC_P'exe - unzip.'ARCH_CC_P'olb;/incl=(unzip)/lib -  UNZIP.BCKm [UNZIP542.VMS]LINK_UNZ.COM;11 r 'opts', [.VMS]unzip.opt/opt $ ! $ link'LFLAGS'/exe='unzx_cli'.'ARCH_CC_P'exe - unzipcli.'ARCH_CC_P'olb;/incl=(unzip)/lib, - unzip.'ARCH_CC_P'olb;/lib - 'opts', [.VMS]unzip.opt/opt $ ! $ link'LFLAGS'/exe='unzsfx_unx'.'ARCH_CC_P'exe - unzipsfx.'ARCH_CC_P'olb;/lib/incl=unzip - 'opts', [.VMS]unzipsfx.opt/opt $ ! $ link'LFLAGS'/exe='unzsfx_cli'.'ARCH_CC_P'exe - unzsxcli.'ARCH_CC_P'olb;/lib/incl=unzip, - unzipsfx.'ARCH_CC_P'olb;/lib - 'opts', [.VMS]unzipsfx.opt/opt $ ! $ ! Next line: put similar lines (full pathname for unzip.'ARCH_CC_P'exe) in $ ! login.com. Remember to include the leading "$" before disk name. $ ! $ unzip == "$''here'''UNZEXEC'.''ARCH_CC_P'exe" $ zipinfo == "$''here'''UNZEXEC'.''ARCH_CC_P'exe ""-Z""" $ ! $error: $ tmp = f$verify(OLD_VERIFY) $ exit *[UNZIP542.VMS]MAKESFX.COM;1+,o./ 4- 0@123KPWO56~ЛZ7~ЛZ89GHJ $! $! MAKESFX.COM: command-procedure to create self-extracting ZIP archives $! usage: @MAKESFX foo (foo.zip -> foo.exe) $! $! Change history: $! $! Date Who What $! -------- ---- ----------------------------------------------------------- $! 19940804 MPJZ Created $! 19940810 GRR Removed superflous creation of name symbol $! 20000113 MPJZ Better symbol check, fixed bug in zip "-A" check $! $! MPJZ: Martin P.J. Zinser $! $! For this to work a symbol unzipsfx has to be defined which contains the $! location of the unzip stub (e.g., unzipsfx:== device:[dir]unzipsfx.exe) $! $! The zipfile given in p1 will be concatenated with unzipsfx and given a $! filename extension of .exe. The default file extension for p1 is .zip $! $! Use at your own risk, there is no guarantee here. If it doesn't work, $! blame me (zinser@decus.de), not the people from Info-ZIP. $! $!----------------------------------------------------------------------------- $! $! First check stub related stuff $! $ if (f$type(unzipsfx).nes."STRING") $ then $ type sys$input You need to define the symbol "unzipsfx" to point to the location of the unzipsfx stub before invoking this procedure. Exiting now... $ exit 2 $ endif $ usfx = f$parse(unzipsfx) - ";" $ if (f$search(usfx).eqs."") $ then $ write sys$output "The unzipsfx stub can not be found on the location" $ write sys$output "pointed to by the unzipsfx symbol -- ''usfx'" $ write sys$output "Exiting now" $ exit 2 $ endif $! $! Now check the input file $! $ if (p1.eqs."") $ then $ type sys$input Required parameter input-file missing Exiting now... $ exit 2 $ endif $ inf = p1 $ file = f$parse(inf,,,"DEVICE") + f$parse(inf,,,"DIRECTORY") + - f$parse(inf,,,"NAME") $ finf = file + f$parse(inf,".ZIP",,"TYPE") + f$parse(inf,,,"VERSION") $ if (f$search(finf).eqs."") $ then $ write sys$output "Input file ''finf' does not exist" $ exit 2 $ endif $! $! Finally create the self-extracting archive $! $ copy 'usfx','finf' 'file'.exe $! $! Zip "-A" will make the resulting archive compatible with other $! unzip programs, but is not essential for running the exe. $! $ if (f$type(zip).eqs."STRING") then zip "-A" 'file'.exe $ exit *[UNZIP542.VMS]MAKE_UNZ.COM;1+,n./ 4=- 0@123KPWO56ȳϝ7ȳϝ89GHJ$ ! MAKE_UNZ.COM $ ! $ ! "Makefile" for VMS versions of UnZip/ZipInfo and UnZipSFX $ ! $ ! last revised: 14 September 1997 $ ! $ ! Command args: $ ! - select compiler environment: "VAXC", "DECC", "GNUC" $ ! - select installation of CLI interface version of unzip: $ ! "VMSCLI" or "CLI" $ ! - force installation of UNIX interface version of unzip $ ! (override LOCAL_UNZIP environment): "NOVMSCLI" or "NOCLI" $ ! $ ! To define additional options, define the global symbol $ ! LOCAL_UNZIP prior to executing MAKE_UNZ.COM, e.g.: $ ! $ ! $ LOCAL_UNZIP == "RETURN_CODES," $ ! $ @MAKE_UNZ $ ! $ ! The trailing "," may be omitted. Valid VMS-specific options $ ! include VMSWILD and RETURN_CODES; see the INSTALL file $ ! for other options (e.g., CHECK_VERSIONS). $ ! NOTE: This command procedure does always generate both the $ ! "default" UnZip containing the UNIX style command interface $ ! and the "VMSCLI" UnZip containing the CLI compatible command $ ! interface. There is no need to add "VMSCLI" to the LOCAL_UNZIP $ ! symbol. (The only effect of "VMSCLI" is now the selection of the $ ! CLI style UnZip executable in the foreign command definition.) $ ! $ ! $ on error then goto error $ on control_y then goto error $ OLD_VERIFY = f$verify(0) $! $ edit := edit ! override customized edit commands $ say := write sys$output $!##################### Read settings from environment ######################## $! $ if f$type(LOCAL_UNZIP).eqs."" $ then $ local_unzip = "" $ else ! Trim blanks and append comma if missing $ local_unzip = f$edit(local_unzip, "TRIM") $ if f$extract(f$length(local_unzip)-1, 1, local_unzip).nes."," then - local_unzip = local_unzip + "," $ endif $! Check for the presence of "VMSCLI" in local_unzip. If yes, we will define $! the foreign command for "unzip" to use the executable containing the $! CLI interface. $ pos_cli = f$locate("VMSCLI",local_unzip) $ len_local_unzip = f$length(local_unzip) $ if pos_cli.ne.len_local_unzip $ then $ CLI_IS_DEFAULT = 1 $ ! Remove "VMSCLI" macro from local_unzip. The UnZip executable including $ ! the CLI interface is now created unconditionally. $ local_unzip = f$extract(0, pos_cli, local_unzip) + - $ f$extract(pos_cli+7, len_local_unzip-(pos_cli+7), local_unzip) $ else $ CLI_IS_DEFAULT = 0 $ endif $ delete/symbol/local pos_cli $ delete/symbol/local len_local_unzip $!##################### Customizing section ############################# $! $ unzx_unx = "unzip" $ unzx_cli = "unzip_cli" $ unzsfx_unx = "unzipsfx" $ unzsfx_cli = "unzipsfx_cli" $! $ MAY_USE_DECC = 1 $ MAY_USE_GNUC = 0 $! $! Process command line parameters requesting optional features: $ arg_cnt = 1 $ argloop: $ current_arg_name = "P''arg_cnt'" $ curr_arg = f$edit('current_arg_name',"UPCASE") $ IF curr_arg .eqs. "" THEN GOTO argloop_out $ IF curr_arg .eqs. "VAXC" $ THEN MAY_USE_DECC = 0 $ MAY_USE_GNUC = 0 $ ENDIF $ IF curr_arg .eqs. "DECC" $ THEN MAY_USE_DECC = 1 $ MAY_USE_GNUC = 0 $ ENDIF $ IF curr_arg .eqs. "GNUC" $ THEN MAY_USE_DECC = 0 $ MAY_USE_GNUC = 1 $ ENDIF $ IF (curr_arg .eqs. "VMSCLI") .or. (curr_arg .eqs. "CLI") $ THEN $ CLI_IS_DEFAULT = 1 $ ENDIF $ IF (curr_arg .eqs. "NOVMSCLI") .or. (curr_arg .eqs. "NOCLI") $ THEN $ CLI_IS_DEFAULT = 0 $ ENDIF $ arg_cnt = arg_cnt + 1 $ GOTO argloop $ argloop_out: $! $ if CLI_IS_DEFAULT $ then $ UNZEXEC = unzx_cli $ else $ UNZEXEC ~hf UNZIP.BCKn [UNZIP542.VMS]MAKE_UNZ.COM;11$= unzx_unx $ endif $! $!####################################################################### $! $ ! Find out current disk, directory, compiler and options $ ! $ my_name = f$env("procedure") $ workdir = f$env("default") $ here = f$parse(workdir,,,"device") + f$parse(workdir,,,"directory") $ axp = f$getsyi("HW_MODEL").ge.1024 $ if axp $ then $ ! Alpha AXP $ ARCH_NAME == "Alpha" $ ARCH_PREF = "AXP_" $ HAVE_DECC_VAX = 0 $ USE_DECC_VAX = 0 $ if MAY_USE_GNUC $ then say "GNU C has not yet been ported to OpenVMS AXP." $ say "You must use DEC C to build UnZip." $ goto error $ endif $ ARCH_CC_P = ARCH_PREF $ cc = "cc/standard=relax/prefix=all/ansi" $ defs = "''local_unzip'MODERN" $ opts = "" $ say "Compiling on AXP using DEC C" $ else $ ! VAX $ ARCH_NAME == "VAX" $ ARCH_PREF = "VAX_" $ HAVE_DECC_VAX = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE").nes."") $ HAVE_VAXC_VAX = (f$search("SYS$SYSTEM:VAXC.EXE").nes."") $ MAY_HAVE_GNUC = (f$trnlnm("GNU_CC").nes."") $ IF HAVE_DECC_VAX .AND. MAY_USE_DECC $ THEN $ ! We use DECC: $ USE_DECC_VAX = 1 $ ARCH_CC_P = "''ARCH_PREF'DECC_" $ cc = "cc/decc/standard=vaxc/prefix=all" $ defs = "''local_unzip'MODERN" $ opts = "" $ say "Compiling on VAX using DEC C" $ ELSE $ ! We use VAXC (or GNU C): $ USE_DECC_VAX = 0 $ defs = "''local_unzip'VMS" $ opts = ",SYS$DISK:[.VMS]VAXCSHR.OPT/OPTIONS" $ if (.not.HAVE_VAXC_VAX .and. MAY_HAVE_GNUC) .or. (MAY_USE_GNUC) $ then $ ARCH_CC_P = "''ARCH_PREF'GNUC_" $ cc = "gcc" $ opts = ",GNU_CC:[000000]GCCLIB.OLB/LIB ''opts'" $ say "Compiling on VAX using GNU C" $ else $ ARCH_CC_P = "''ARCH_PREF'VAXC_" $ if HAVE_DECC_VAX $ then $ cc = "cc/vaxc" $ else $ cc = "cc" $ endif $ say "Compiling on VAX using VAX C" $ endif $ ENDIF $ endif $ DEF_UNX = "/define=(''defs')" $ DEF_CLI = "/define=(''defs',VMSCLI)" $ DEF_SXUNX = "/define=(''defs',SFX)" $ DEF_SXCLI = "/define=(''defs',VMSCLI,SFX)" $ LFLAGS = "/notrace" $ if (opts .nes. "") .and. (f$search("[.vms]vaxcshr.opt") .eqs. "") $ then create [.vms]vaxcshr.opt $ open/append tmp [.vms]vaxcshr.opt $ write tmp "SYS$SHARE:VAXCRTL.EXE/SHARE" $ close tmp $ endif $ ! $ ! Currently, the following section is not needed, as vms.c does no longer $ ! include any of the headers from SYS$LIB_C.TLB. $ ! The commented section is solely maintained for reference. $ ! In case system headers from SYS$LIB_C.TLB are needed again, $ ! just append "'x'" to the respective source file specification. $! x = f$search("SYS$LIBRARY:SYS$LIB_C.TLB") $! if x .nes. "" then x = "+" + x $ ! $ tmp = f$verify(1) ! Turn echo on to see what's happening $ ! $ !------------------------------- UnZip section ------------------------------ $ ! $ runoff/out=unzip.hlp [.vms]unzip_def.rnh $ ! $ cc/NOLIST'DEF_UNX' /OBJ=unzip.'ARCH_CC_P'obj unzip.c $ cc/NOLIST'DEF_UNX' /OBJ=crc32.'ARCH_CC_P'obj crc32.c $ cc/NOLIST'DEF_UNX' /OBJ=crctab.'ARCH_CC_P'obj crctab.c $ cc/NOLIST'DEF_UNX' /OBJ=crypt.'ARCH_CC_P'obj crypt.c $ cc/NOLIST'DEF_UNX' /OBJ=envargs.'ARCH_CC_P'obj envargs.c $ cc/NOLIST'DEF_UNX' /OBJ=explode.'ARCH_CC_P'obj explode.c $ cc/NOLIST'DEF_UNX' /OBJ=extract.'ARCH_CC_P'obj extract.c $ cc/NOLIST'DEF_UNX' /OBJ=fileio.'ARCH_CC_P'obj fileio.c $ cc/NOLIST'DEF_UNX' /OBJ=globals.'ARCH_CC_P'obj globals.c $ cc/NOLIST'DEF_UNX' /OBJ=inflate.'ARCH_CC_P'obj inflate.c $ cc/NOLIST'DEF_UNX' /OBJ=list.'ARCH_CC_P'obj list.c $ cc/NOLIST'DEF_UNX' /OBJ=match.'ARCH_CC_P'obj match.c $ cc/NOLIST'DEF_UNX' /OBJ=process.'ARCH_CC_P'obj process.c $ cc/NOLIST'DEF_UNX' /OBJ=ttyio.'ARCH_CC_P'obj ttyio.c $ cc/NOLIST'DEF_UNX' /OBJ=unreduce.'ARCH_CC_P'obj unreduce.c $ cc/NOLIST'DEF_UNX' /OBJ=unshrink.'ARCH_CC_P'obj unshrink.c $ cc/NOLIST'DEF_UNX' /OBJ=zipinfo.'ARCH_CC_P'obj zipinfo.c $ cc/INCLUDE=SYS$DISK:[]'DEF_UNX' /OBJ=vms.'ARCH_CC_P'obj; [.vms]vms.c $ ! $ if f$search("unzip.''ARCH_CC_P'olb") .eqs. "" then - lib/obj/create unzip.'ARCH_CC_P'olb $ lib/obj/replace unzip.'ARCH_CC_P'olb - unzip.'ARCH_CC_P'obj;, crc32.'ARCH_CC_P'obj;, - crctab.'ARCH_CC_P'obj;, crypt.'ARCH_CC_P'obj;, - envargs.'ARCH_CC_P'obj;, explode.'ARCH_CC_P'obj;, - extract.'ARCH_CC_P'obj;, fileio.'ARCH_CC_P'obj;, - globals.'ARCH_CC_P'obj;, inflate.'ARCH_CC_P'obj;, - list.'ARCH_CC_P'obj;, match.'ARCH_CC_P'obj;, - process.'ARCH_CC_P'obj;, ttyio.'ARCH_CC_P'obj;, - unreduce.'ARCH_CC_P'obj;, unshrink.'ARCH_CC_P'obj;, - zipinfo.'ARCH_CC_P'obj;, vms.'ARCH_CC_P'obj; $ ! $ link'LFLAGS'/exe='unzx_unx'.'ARCH_CC_P'exe - unzip.'ARCH_CC_P'olb;/incl=(unzip)/lib - 'opts', [.VMS]unzip.opt/opt $ ! $ !----------------------- UnZip (CLI interface) section ---------------------- $ ! $ set default [.vms] $ edit/tpu/nosection/nodisplay/command=cvthelp.tpu unzip_cli.help $ set default [-] $ runoff/out=unzip_cli.hlp [.vms]unzip_cli.rnh $ ! $ cc/NOLIST'DEF_CLI' /OBJ=unzipcli.'ARCH_CC_P'obj unzip.c $ cc/INCLUDE=SYS$DISK:[]'DEF_CLI' /OBJ=cmdline.'ARCH_CC_P'obj; - [.vms]cmdline.c $ set command/obj=unz_cli.'ARCH_CC_P'obj [.vms]unz_cli.cld $ ! $ if f$search("unzipcli.''ARCH_CC_P'olb") .eqs. "" then - lib/obj/create unzipcli.'ARCH_CC_P'olb $ lib/obj/replace unzipcli.'ARCH_CC_P'olb - unzipcli.'ARCH_CC_P'obj;, - cmdline.'ARCH_CC_P'obj;, unz_cli.'ARCH_CC_P'obj; $ ! $ link'LFLAGS'/exe='unzx_cli'.'ARCH_CC_P'exe - unzipcli.'ARCH_CC_P'olb;/incl=(unzip)/lib, - unzip.'ARCH_CC_P'olb;/lib - 'opts', [.VMS]unzip.opt/opt $ ! $ !-------------------------- UnZipSFX section -------------------------------- $ ! $ cc/NOLIST'DEF_SXUNX' /OBJ=unzipsfx.'ARCH_CC_P'obj unzip.c $ cc/NOLIST'DEF_SXUNX' /OBJ=extract_.'ARCH_CC_P'obj extract.c $ cc/NOLIST'DEF_SXUNX' /OBJ=process_.'ARCH_CC_P'obj process.c $ cc/NOLIST'DEF_SXUNX'/INCLUDE=SYS$DISK:[] /OBJ=vms_.'ARCH_CC_P'obj; - [.vms]vms.c $ if f$search("unzipsfx.''ARCH_CC_P'olb") .eqs. "" then - lib/obj/create unzipsfx.'ARCH_CC_P'olb $ lib/obj/replace unzipsfx.'ARCH_CC_P'olb - unzipsfx.'ARCH_CC_P'obj, crc32.'ARCH_CC_P'obj, - crctab.'ARCH_CC_P'obj, crypt.'ARCH_CC_P'obj, - extract_.'ARCH_CC_P'obj, fileio.'ARCH_CC_P'obj, - globals.'ARCH_CC_P'obj, inflate.'ARCH_CC_P'obj, - match.'ARCH_CC_P'obj, process_.'ARCH_CC_P'obj, - ttyio.'ARCH_CC_P'obj, vms_.'ARCH_CC_P'obj $ ! $ link'LFLAGS'/exe='unzsfx_unx'.'ARCH_CC_P'exe - unzipsfx.'ARCH_CC_P'olb;/lib/incl=unzip - 'opts', [.VMS]unzipsfx.opt/opt $ ! $ !--------------------- UnZipSFX (CLI interface) section --------------------- $ ! $ cc/NOLIST'DEF_SXCLI' /OBJ=unzsxcli.'ARCH_CC_P'obj unzip.c $ cc/NOLIST/INCLUDE=SYS$DISK:[]'DEF_SXCLI' /OBJ=cmdline_.'ARCH_CC_P'obj; - [.vms]cmdline.c $ if f$search("unzsxcli.''ARCH_CC_P'olb") .eqs. "" then - lib/obj/create unzsxcli.'ARCH_CC_P'olb $ lib/obj/replace unzsxcli.'ARCH_CC_P'olb - unzsxcli.'ARCH_CC_P'obj;, - cmdline_.'ARCH_CC_P'obj;, unz_cli.'ARCH_CC_P'obj; $ ! $ link'LFLAGS'/exe='unzsfx_cli'.'ARCH_CC_P'exe - unzsxcli.'ARCH_CC_P'olb;/lib/incl=unzip, - unzipsfx.'ARCH_CC_P'olb;/lib - 'opts', [.VMS]unzipsfx.opt/opt $ ! $ !----------------------------- Symbols section ------------------------------ $ ! $ ! Next line: put similar lines3 UNZIP.BCKn [UNZIP542.VMS]MAKE_UNZ.COM;11Q (full pathname for unzip.'ARCH_CC_P'exe) in $ ! login.com. Remember to include the leading "$" before disk name. $ ! $ unzip == "$''here'''UNZEXEC'.''ARCH_CC_P'exe" $ zipinfo == "$''here'''UNZEXEC'.''ARCH_CC_P'exe ""-Z""" $ ! $error: $ if here .nes. "" then set default 'here' $ tmp = f$verify(OLD_VERIFY) $ exit ]*[UNZIP542.VMS]README.;1+,i. / 4 r- 0@123KPWO 56)7)89GHJVMS README for UnZip 5.3 and later, 25 February 1997 ---------------------------------------------------- Notes about using UnZip and zipfiles under VMS (see INSTALL for instructions on compiling): - Install UnZip as foreign symbol by adding this to login.com: $ unzip == "$disk:[dir]unzip.exe" $ zipinfo == "$disk:[dir]unzip.exe ""-Z""" where "disk" and "dir" are location of UnZip executable; the "$" before the disk name is important. Some people, including the author, prefer a short alias such as "ii" instead of "zipinfo"; edit to taste. (All of the quotes around the -Z are necessary, but don't ask us to explain it...) - Optionally install UnZipSFX for use with the MAKESFX.COM command file: $ unzipsfx :== disk:[dir]unzipsfx.exe Thereafter an archive "foo.zip" may be converted to "foo.exe" simply by typing "@makesfx foo" (assuming MAKESFX.COM is in the current directory). Note that there is *no* leading "$" in this case. - After proper installation, the default version of UnZip is invoked just as in Unix or MS-DOS: "unzip -opts archive files". The hyphen ('-') is the switch character, not the slash ('/') as in native VMS commands. An alternative is available if VMSCLI is defined during compilation; this version does provide a native VMS-style command interface (e.g., /ZIPINFO instead of -Z). Both versions accept the command "unzip -v", which can be used to check whether VMSCLI was defined or not; but an even simpler method is to type "unzip" and look at the help screen. Note that options placed in an environment variable (UNZIP_OPTS) must be of the short, hy- phenated form regardless of how UnZip was compiled. - The VMS C runtime library translates all command-line text to lowercase unless it is quoted, making some options and/or filenames not work as intended. For example: unzip -V zipfile vms/README;* is translated to unzip -v zipfile vms/readme;* which may not match the contents of the zipfile and definitely won't extract the file with its version number as intended. This can be avoided by use of the -C option (/CASE_INSENSITIVE) or by enclosing the uppercase stuff in quotes: unzip "-V" zipfile "vms/README;*" Note that quoting the whole line probably won't work, since it would be interpreted as a single argument by the C library. - Wildcards that refer to files internal to the archive behave like Unix wildcards, not VMS ones (assuming UnZip was not compiled with VMSWILD defined). This is both a matter of consistency (see above) and power-- full Unix regular expressions are supported, so that one can specify "all .c and .h files that start with a, b, c or d and do not have a 2 before the dot" as "[a-d]*[^2].[ch]". Of course, "*.[ch]" is a much more common wildcard specification, but the power is there if you need it. Note that "*" matches zipfile directory separators ('/'), too. If UnZip *was* compiled with VMSWILD defined (do "unzip -v" to check), the single- character wildcard is "%" rather than "?", and character sets (ranges) are delimited with () instead of [] (for example, "*.(ch)"). - Wildcards that refer to zipfiles (i.e., external VMS files) behave like normal VMS wildcards regardless of whether VMSWILD was defined or not. Ranges are not supported. Thus "unzip *font-%.zip" is about as much as one can do for specifying wildcard zipfiles. - Created files get whatever permissions were stored in the archive (mapped to VMS and/or masked with your default permissions, depending on the originating operating system), but created directories additionally in- herit the (possibly more restrictive) permissions of the parent directory. And obviously things won't work if you don't have permission to write to the extraction directory. - When transferring files, particularly via Kermit, pay attention to the settings! In particular, zipfiles must be transferred in some binary mode, which is NOT Kermit's default mode, and this mode must usually be set on BOTH sides of the transfer (e.g., both VAX and PC). See the notes below for details. From Info-ZIP Digest (Wed, 6 Nov 1991), Volume 91, Issue 290: Date: Tue, 5 Nov 91 15:31 CDT From: Hugh Schmidt **************************************************** *** VMS ZIP and PKZIP compatibility using KERMIT *** **************************************************** Many use Procomm's kermit to transfer zipped files between PC and VMS VAX. The following VMS kermit settings make VMS Zip/UnZip compatible with PC Zip/UnZip or PKZIP/PKUNZIP: VMS kermit Procomm kermit ------------------- -------------------- Uploading PC zipfile to VMS: set file type fixed set file type binary Downloading VMS zipfile to PC: set file type block set file type binary "Block I/O lets you bypass the VMS RMS record-processing capabilities entirely", (Guide to VMS file applications, Section 8.5). The kermit guys must have known this! *[UNZIP542.VMS]UNZIP.OPT;1+,q,./ 4- 0@123KPWO56X7X89GHJIdent = "UnZip 5.41" D*[UNZIP542.VMS]UNZIPSFX.HLP;1+,t./ 4!- 0@123KPWO56Ϧ7Ϧ89GHJSe UNZIP.BCKt [UNZIP542.VMS]UNZIPSFX.HLP;11M1 UNZIPSFX unzipsfx - self-extracting stub for prepending to ZIP archives [-cfptuz[ajnoqsCLV$]] [file(s) ...] [-x xfile(s) ...] unzipsfx is a modified version of unzip designed to be prepended to existing ZIP archives in order to form self- extracting archives. Instead of taking its first non-flag argument to be the zipfile(s) to be extracted, unzipsfx seeks itself under the name by which it was invoked and tests or extracts the contents of the appended archive. Because the executable stub adds bulk to the archive (the whole purpose of which is to be as small as possible), a number of the regular version's less-vital capabilities have been removed. Among these are the usage (or help) screen, the listing and diagnostic functions (-l and -v), the abil- ity to decompress older compression formats (the ``reduce,'' ``shrink'' and ``implode'' methods), and the ability to extract to a directory other than the current one. Decryp- tion is supported as a compile-time option but should be avoided unless the attached archive contains encrypted files. Note that self-extracting archives made with unzipsfx are no more (or less) portable across different operating systems than is the unzip executable itself. In general a self- extracting archive made on a particular Unix system, for example, will only self-extract under the same flavor of Unix. Regular unzip may still be used to extract the embed- ded archive as with any normal zipfile, although it will generate a harmless warning about extra bytes at the begin- ning of the zipfile. [file(s)] An optional list of archive members to be processed. Regular expressions (wildcards) similar to those in Unix egrep(1) may be used to match multiple members. These wildcards may contain: * matches a sequence of 0 or more characters ? matches exactly 1 character [...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') fol- lows the left bracket, then the range of charac- ters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match). (Be sure to quote any character which might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) [-x xfile(s)] An optional list of archive members to be excluded from processing. Since wildcard characters match directory separators (`/'), this option may be used to exclude any files which are in subdirectories. For example, ``unzip foo *.[ch] -x */*'' would extract all C source files in the main directory, but none in any subdirec- tories. Without the -x option, all C source files in all directories within the zipfile would be extracted. 2 Options unzipsfx supports the following unzip options: -c and -p (extract to standard output/screen), -f and -u (freshen and update existing files upon extraction), -t (test archive) and -z (print archive comment). All normal listing options (-l, -v and -Z) have been removed, but the testing option (-t) may be used as a ``poor man's'' listing. Alter- natively, those creating self-extracting archives may wish to include a short listing in the zipfile comment. See unzip for a more complete description of these options. MODIFIERS unzipsfx currently supports all unzip modifiers: -a (convert text files), -n (never overwrite), -o (overwrite without prompting), -q (operate quietly), -C (match names case-insenstively), -L (convert uppercase-OS names to lower- case), -j (junk paths) and -V (retain version numbers); plus the following operating-system specific options: -X (restore VMS owner/protection info), -s (convert spaces in filenames to underscores [DOS, OS/2, NT]) and -$ (restore volume label [DOS, OS/2, NT, Amiga]). (Support for regular ASCII text-conversion may be removed in future versions, since it is simple enough for the archive's creator to ensure that text files have the appropriate for- mat for the local OS. EBCDIC conversion will of course con- tinue to be supported since the zipfile format implies ASCII storage of text files.) See unzip for a more complete description of these modifiers. 2 Environment_options unzipsfx uses the same environment variables as unzip does, although this is likely to be an issue only for the person creating and testing the self-extracting archive. See unzip for details. 2 Decryption Decryption is supported exactly as in unzip; that is, interactively with a non-echoing prompt for the password(s). See unzip for details. Once again, note that if the archive has no encrypted files there is no reason to use a version of unzipsfx with decryption support; that only adds to the size of the archive. 2 Examples To create a self-extracting archive letters from a regular zipfile letters.zip and change the new archive's permissions to be world-executable under Unix: cat unzipsfx letters.zip > letters chmod 755 letters To create the same archive under MS-DOS, OS/2 or NT (note the use of the /b [binary] option to the copy command): copy /b unzipsfx.exe+letters.zip letters.exe Under VMS: copy unzipsfx.exe,letters.zip letters.exe letters == "$currentdisk:[currentdir]letters.exe" (The VMS append command may also be used. The second com- mand installs the new program as a ``foreign command'' capa- ble of taking arguments.) To test (or list) the newly created self-extracting archive: letters -t To test letters quietly, printing only a summary message indicating whether the archive is OK or not: letters -tq To extract the complete contents into the current directory, recreating all files and subdirectories as necessary: letters To extract only the README file to standard output (the screen): letters -c README To print only the zipfile comment: letters -z 2 Limitations The principle and fundamental limitation of unzipsfx is that it is not portable across architectures or operating sys- tems, and therefore neither are the resulting archives. For some architectures there is limited portability, however (e.g., between some flavors of Intel-based Unix). unzipsfx has no knowledge of the user's PATH, so in general an archive must either be in the current directory when it is invoked, or else a full or relative path must be given. If a user attempts to extract the archive from a directory in the PATH other than the current one, unzipsfx will print a warning to the effect, ``can't find myself.'' This is always true uBLE UNZIP.BCKt [UNZIP542.VMS]UNZIPSFX.HLP;11Ѕ nder Unix and may be true in some cases under MS-DOS, depending on the compiler used (Microsoft C fully qualifies the program name, but other compilers may not). Under OS/2 and NT there are operating-system calls available which provide the full path name, so the archive may be invoked from anywhere in the user's path. The situation is not known for Atari TOS, MacOS, etc. As noted above, a number of the normal unzip functions have been removed in order to make unzipsfx smaller: usage and diagnostic info, listing functions and extraction to other directories. Also, only stored and deflated files are supported. The latter limitation is mainly relevant to those who create SFX archives, however. VMS users must know how to set up self-extracting archives as foreign commands in order to use any of unzipsfx's options. This is not necessary for simple extraction, but the command to do so then becomes, e.g., ``run letters'' (to continue the examples given above). unzipsfx is not supported on the Amiga because of the way the loader works; the entire archive contents would be loaded into memory by default. It may be possible to work around this by defining the attached archive to be a ``debug hunk,'' but compatibility problems between the ROM levels of older Amigas and newer ones are likely to cause problems regardless. All current bugs in unzip exist in unzipsfx as well. 2 Diagnostics unzipsfx's exit status (error level) is identical to that of unzip; see the corresponding help entry. 2 See_also funzip, unzip, zip, zipcloak, zipgrep, zipinfo, zipnote, zipsplit 2 Authors Greg Roelofs was responsible for the basic modifications to UnZip necessary to create UnZipSFX. See unzip for the current list of zip-bugs authors, or the file CONTRIBS in the UnZip source distribution for the full list of Info-ZIP contributors. *[UNZIP542.VMS]UNZIPSFX.OPT;1+,u;./ 4- 0@123KPWO569 79 89GHJIdent = "UnZipSFX 5.41" *[UNZIP542.VMS]UNZIP_CLI.HELP;1+,r3./ 4- 0@123KPWO56DI7DI89GHJ.! .! File: UNZIP_CLI.HELP .! .! Author: Hunter Goatley .! .! Date: 12 Jul 94 (orig. UNZIP.RNH, 23 Oct 91) .! .! Description: .! .! TPU-processable source file to produce VMS on-line help for .! portable UnZip. Adapted from UNZIP.RNH, originally based on .! UNZIP.MAN (now UNZIP.TXT). .! .! To build: .! $ EDIT /TPU/NOSECTION/NODISPLAY/COMMAND=CVTHELP.TPU UNZIP_CLI.HELP .! $ RUNOFF /OUT=UNZIP.HLP UNZIP_CLI.RNH .! $ LIBR /HELP/INSERT libr UNZIP .! .! Modification history: .! .! 02-001 Hunter Goatley 12-JUL-1994 16:59 .! Genesis. .! 02-002 Cave Newt 14-JUL-1994 11:36 .! Fixed /*TEXT options and added/removed various options. .! 02-003 Cave Newt 28-JUL-1994 08:54 .! Removed semicolons from comments and moved /ZIPINFO. .! 02-004 Christian Spieler 06-OCT-1995 02:02 .! Changed to conform to revised .CLD definition. .! 02-005 Christian Spieler 06-FEB-1996 02:20 .! Added description of /HELP qualifier. .! 02-006 Christian Spieler 12-MAY-1996 00:50 .! Some clarifications/cleanups. .! 02-007 Christian Spieler 04-MAR-1997 22:25 .! Added /[NO]CASE_INSENSITIVE to ZipInfo mode; .! documented the new /PASSWORD="decryption_key" option. .! 02-007 Christian Spieler 22-JUL-1997 22:37 .! Formatting changes (prevent line wraps); added "Exit_Codes" .! subtopic (no version number change). .! 02-007 Christian Spieler 28-APR-2000 03:22 .! Changed references to plaintext UnZip documentation file .! into UNZIP.TXT (no version number change). .!
UNZIP UnZip is used to extract files compressed and packaged by Zip (see HELP ZIP for information on ZIP). For a brief help on Zip and Unzip, run each without specifying any parameters on the command line (or apply the /HELP qualifier). To get a brief help sceen about the alternate UNIX style command interface, run each with the -h option applied. UNZIP will list, test, or extract from a ZIP archive. ZIP archives are commonly found on MS-DOS systems; a VMS version of ZIP can also be found here. Archive member extraction is implied by the absence of the /SCREEN (-c), /PIPE (-p), /TEST (-t), /LIST (-l, -v) or /COMMENT (-z) qualifiers (options). All archive members are processed unless a filespec is provided to specify a subset of the archive members. UNZIP zipfile [file[,...]] [/qualifiers] .! Parameters zipfile File specification for the ZIP archive(s) with optional wildcards. UnZip will perform actions specified for every zipfile matching the specification. The default file specification is SYS$DISK:[].ZIP. Note that self-extracting ZIP files are supported; just specify the .EXE suffix yourself. file An optional comma-separated list of archive members to be processed; if no list is given, all archive members are processed. Expressions may be used to match multiple members. Expressions should be enclosed in double-quotes to prevent interpretation by DCL. Multiple filenames should be separated by blanks. Each file specification is similar to a Unix egrep expression and may contain: |* matches a sequence of 0 or more characters |? matches exactly 1 character |[...] matches any single character found inside the brackets; | ranges are specified by a beginning character, | a hyphen, and an ending character. If a '!' or '^' | immediately follows the left bracket, then any character | not in the given range is matched. /ZIPINFO /ZIPINFO Displays information about the Zip archive and the files contained therein. This function used to be provided by a separate ZipInfo program. The following qualifiers may be sp UNZIP.BCKr3 [UNZIP542.VMS]UNZIP_CLI.HELP;14 ecified with /ZIPINFO: | /SHORT Short UNIX "ls -l" format (default) | /MEDIUM Medium UNIX "ls -l" format | /LONG Long UNIX "ls -l" format | /VERBOSE Verbose, multi-page format | /ONE_LINE Filenames only, one per line | /HEADER Print header lines | /TOTALS Print totals for files | /TIMES Print file times in sortable decimal format | /[NO]CASE_INSENSITIVE Match filenames case-insensitively | /[NO]PAGE Page screen output through built-in "more" /BINARY /BINARY[=KEYWORD] /NOBINARY (default) Selects conversion to VMS "standard" binary file format, which is "fixed length 512 byte records, no record attributes". The optional keywords recognized are: | AUTO Automatically extracts files marked as "binary" (rather | than "text") in standard VMS binary file format. (default) | ALL Extracts all files in standard VMS binary file format. | NONE Same as /NOBINARY. Note that a combination of /BINARY[=AUTO] and /TEXT[=AUTO] is allowed. (see /TEXT qualifier) /BRIEF /BRIEF (default) When used with /LIST, specifies that a brief listing of the archive's contents is to be displayed. A brief listing shows the length, date, time, and file name for the files in the archive. /CASE_INSENSITIVE /CASE_INSENSITIVE /NOCASE_INSENSITIVE (default) Match filenames case-insensitively. (Good default option under VMS.) /COMMENT /COMMENT /NOCOMMENT Display the archive comment. /DIRECTORY /DIRECTORY=directory-spec Specifies the output directory where all the extracted files are to be placed. /EXCLUDE /EXCLUDE=(file[,...]) A comma-separated list of files to exclude when extracting files. If multiple files are specified, the list should be included in parentheses. /FRESHEN /FRESHEN /NOFRESHEN Freshen existing files; replace if newer. Does not cause any new files to be created. /FULL /FULL When used with /LIST, specifies that a full listing of the archive's contents is to be displayed. A full listing shows the length, compression method, compressed size, compression ratio, date, time, CRC value, and file name for the files in the archive. /HELP /HELP Displays a one-page brief help screen and exits quietly. /JUNK /JUNK /NOJUNK (default) Junk the stored paths (don't recreated the archive's directory structure. /LIST /LIST List the contents of the archive. /BRIEF and /FULL can be used to specify the amount of information displayed. The default is /BRIEF. /LOWERCASE /LOWERCASE /NOLOWERCASE (default) Convert filenames from all-uppercase operating systems to lowercase. This option has no effect under VMS. /OVERWRITE /OVERWRITE /NOOVERWRITE The qualifier /OVERWRITE forces overwriting of existing files when extracting. The negation /NOOVERWRITE results in never overwriting an existing file. The default action is to prompt for desired action when about to overwrite an existing file. For VMS, "overwriting" results in the creation of a new version of the file, unless version numbers are stored in the archive and /VERSION is specified. /PAGE /PAGE /NOPAGE Feed all screen output through the built-in "more" pager. /PASSWORD /PASSWORD=decryption-password Specifies a decryption password and prevents UnZip from prompting for a password in case the specified decryption key was wrong. The supplied string must be enclosed in double-quotes whenever it contains lowercase or special characters. /PIPE /PIPE Extract files to SYS$OUTPUT with no informational messages. /QUIET /QUIET[=SUPER] Perform operations quietly. The keyword SUPER can be specified to make operations even more quiet. /RESTORE /RESTORE /NORESTORE Restore file owner and protection settings. /SCREEN /SCREEN /NOSCREEN Extracts matching files to SYS$OUTPUT (the terminal). /TEST /TEST /NOTEST Test archive files. /TEXT /TEXT[=KEYWORD] /NOTEXT (default) Selects conversion to VMS standard text file format. The optional keywords recognized are: | AUTO Automatically extracts files marked as "text" (rather | than "binary") in standard VMS text file format. (default) | ALL Extracts all files in standard VMS text file format. | NONE Same as /NOTEXT. A similar functionality is available for binary files, see qualifier /BINARY. /UPDATE /UPDATE /NOUPDATE Update existing files; create new ones if needed. /VERSION /VERSION /NOVERSION (default) Retain VMS file version numbers. Authors Info-ZIP; currently maintained by Greg Roelofs. VMS support maintained by Igor Mandrichenko, Christian Spieler and Hunter Goatley. Originally based on a program by Samuel H. Smith. VMS on-line help ported from UNZIP.TXT by Hunter Goatley. Exit_Codes On VMS, UnZip's UNIX style exit values are mapped into proper VMS status codes: | 1 (success) normal exit, | (0x7fff0000 + 16*UnZip_errnum) -W- warnings | (0x7fff0002 + 16*UnZip_errnum) -E- normal errors | (0x7fff0004 + 16*UnZip_errnum) -F- fatal errors The UnZip error level (or exit code) approximates the exit codes defined by PKWARE and takes on the following values: | VMS UnZip Type of error | severity errcode | - 0 normal; no errors or warnings detected. | | W 1 one or more warning errors were encountered, | but processing completed successfully any- | way. This includes zipfiles where one or | more files was skipped due to unsupported | compression method or encryption with an | unknown password. | | E 2 a generic error in the zipfile format was | detected. Processing may have completed | successfully anyway; some broken zipfiles | created by other archivers have simple work- | arounds. | | F 3 a severe error in the zipfile format was | detected. Processing probably failed imme- | diately. | | F 4 unzip was unable to allocate memory for one | or more buffers during program initializa- | tion. | | F 5 unzip was unable to allocate memory or | unable to obtain a tty to read the decryp- | tion password(s). | | F 6 unzip was unable to allocate memory during | decompression to disk. | | F 7 unzip was unable to allocate memory during | in-memory decompression. | | F 8 [currently not used] | | E 9 the specified zipfiles were not found. | | E 10 invalid options were specified on the com- | mand line. | | E 11 no matching files were found. | | F 50 the disk is (or was) full during extraction. | | F 51 the end of the ZIP archive was encountered | prematurely. | | E 80 the user aborted unzip prematurely with con- | trol-C (or similar) | | E 81 no files were founң< UNZIP.BCKr3 [UNZIP542.VMS]UNZIP_CLI.HELP;1$d due to unsupported com- | pression methods or unsupported decryption. | (If even one additional file is successfully | processed, however, the exit status is 1.) | | E 82 no files were found due to bad decryption | password(s). This is also the exit status | if no files were found due to a combination | of unsupported compression and bad pass- | words. As in the previous case, however, a | single successful file will result in an | exit status of 1 instead.) In addition, there is a compilation option to expand upon this behavior: An executable compiled with the option RETURN_CODES defined displays a human-readable explanation of what the error status means. UNIX_Options The default action of UnZip is to extract all zipfile entries. The following options and modifiers can be provided: | -Z ZipInfo mode | -c extract files to SYS$OUTPUT (terminal) | -f freshen existing files (replace if newer); create none | -h show brief help screen and exit quietly | -l list archive files (short format) | -p extract files to SYS$OUTPUT; no informational messages | -t test archive files | -u update existing files; create new ones if needed | -v list archive files (verbose format) | -z display only the archive comment | |MODIFIERS | -a auto-extract only text files in standard VMS text file format | -aa extract all files as text | -b auto-extract only binary files in VMS fixed 512 bytes records | -bb extract all files as binary VMS fixed 512 byte record files | -j junk paths (don't recreate archive's directory structure) | -n never overwrite existing files; don't prompt | -o OK to overwrite files without prompting | -q perform operations quietly (-qq => even quieter) | -C match filenames case-insensitively | -L convert filenames to lowercase if created on MSDOS, VMS, etc. | -P supply decryption password on the command line (insecure!) | -M page output through built-in "more" function | -V retain (VMS) file version numbers | -X restore owner/protection info (may require privileges) Note that uppercase options such as -C, -L, -M, -P, -V, -X and -Z must be specified in quotes. For example: | $ unzip "-VX" -a zipfile UNZIP_OPTS_Default UnZip allows to modify its default behaviour by specifying (UNIX style) option defaults via the UNZIP_OPTS logical name. For example, the following will cause UnZip to match filenames without regard to case, restore owner/protection information and perform all operations at quiet-level 1 by default: | $ define UNZIP_OPTS "-qCX" Note that the quotation marks here are required to preserve lowercase options (opposite of the command-line behavior). To negate a default option on the command line, add one or more minus signs before the option letter, in addition to the leading switch character `-': | $ unzip --ql zipfile or | $ unzip -l-q zipfile At present it is not possible to decrement an option below zero--that is, more than a few minuses have no effect. UNZIP_OPTS may be defined as a symbol rather than a logical, but if both are defined, the logical is used. a*[UNZIP542.VMS]UNZIP_DEF.RNH;1+,s./ 4- 0@123KPWO56I7I89GHJ.! .! File: UNZIP_DEF.RNH .! .! Author: Hunter Goatley .! .! Date: October 23, 1991 .! .! Description: .! .! RUNOFF source file for VMS on-line help for portable UnZip. .! Adapted from UNZIP.MAN (now UNZIP.TXT). .! .! To build: $ REN UNZIP_DEF.RNH UNZIP.RNH .! $ RUNOFF UNZIP.RNH .! $ LIBR/HELP/INSERT libr UNZIP .! .! Modification history: .! .! 01-001 Hunter Goatley 23-OCT-1991 09:21 .! Genesis. .! 01-002 Cave Newt 16-MAR-1992 22:37 .! Updated for UnZip 4.2. .! 01-003 Igor Mandrichenko 23-MAY-1992 22:14 .! Added -X option to command syntax. .! 01-004 Cave Newt 24-MAY-1992 13:30 .! Added UNZIP_OPTS environment variable help. .! 01-005 Igor Mandrichenko 14-DEC-1993 18:55 .! Modified for UnZip V5.1 .! 01-006 Cave Newt 21-DEC-1993 12:38 .! Added -x option and cleaned up. .! 01-007 Cave Newt 14-JUL-1994 09:45 .! Added -Z, -C and -L options, removed -U, minor clean-up. .! 01-008 Cave Newt 28-JUL-1994 08:57 .! Removed semi-colons from comments. .! 02-001 Christian Spieler 09-DEC-1995 02:25 .! Modified for UnZip 5.2. .! 02-002 Christian Spieler 06-FEB-1996 02:25 .! Added -h "help" option. .! 02-003 Christian Spieler 04-MAR-1997 20:25 .! Added -P "command line password" option. .! 02-004 Christian Spieler 26-JUL-1997 00:05 .! Added Exit_Codes subtopic, explaining UnZip's VMS return codes. .! 02-005 Christian Spieler 28-APR-2000 03:22 .! Changed references to plaintext UnZip documentation file .! into "UNZIP.TXT". .! .noflags .lm4 .rm72 .indent -4 1 UNZIP .br UnZip is used to extract files compressed and packaged by Zip (see HELP ZIP for information on ZIP). .sk For a brief help on Zip and Unzip, run each without specifying any parameters on the command line, or specify the -h flag (but not in UnZip's Zipinfo mode). .sk UNZIP will list, test, or extract from a ZIP archive. ZIP archives are commonly found on MS-DOS systems; a VMS version of ZIP can also be found here. .sk Archive member extraction is implied by the absence of the -c, -p, -t, -l, -v or -z options. All archive members are processed unless a filespec is provided to specify a subset of the archive members. Format: .sk;.lm+1;.literal UNZIP [-cfhlptuvxz[ajnoqCLMVX]] file[.zip] [list] [-x xlist] [-d out_dir] .end literal;.lm-1 .!------------------------------------------------------------------------------ .indent -4 2 Parameters .sk;.indent -4 file[.zip] .sk File specification for the ZIP archive(s) with optional wildcards. UnZip will perform actions specified for every zipfile matching the specification. Default file specification is SYS$DISK:[].ZIP. Note that self-extracting ZIP files are supported; just specify the .EXE suffix yourself. .sk;.indent -4 [list] .sk An optional list of archive members to be processed; if no list is given, all archive members are processed. Expressions may be used to match multiple members. Expressions should be enclosed in double-quotes to prevent interpretation by DCL. Multiple filenames should be separated by blanks. Each file specification is similar to a Unix egrep exp\ UNZIP.BCKs [UNZIP542.VMS]UNZIP_DEF.RNH;18ression and may contain: .sk .literal * matches a sequence of 0 or more characters ? matches exactly 1 character [...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If a '!' or '^' immediately follows the left bracket, then any character not in the given range is matched. .end literal .sk .sk;.indent -4 [-x xlist] .sk An optional list of archive members to be excluded from processing. The xlist overrides any files included in the normal list. .sk;.indent -4 [-d out_dir] .sk Optional directory specification to be used as target root directory for files to be extracted. Directory should be specified in "[.foo]" format rather than "foo.dir" or "foo/" format. .!------------------------------------------------------------------------------ .indent -4 2 Options .br The default action of UnZip is to extract all zipfile entries. The following options and modifiers can be provided: .sk;.literal -Z ZipInfo mode -c extract files to SYS$OUTPUT (terminal) -f freshen existing files (replace if newer); create none -h show brief help screen and exit quietly -l list archive files (short format) -p extract files to SYS$OUTPUT; no informational messages -t test archive files -u update existing files; create new ones if needed -v list archive files (verbose format) -z display only the archive comment .end literal;.sk;.literal MODIFIERS -a extract text files in standard VMS text file format -aa extract all files as text -b auto-extract only binary files in VMS fixed 512-byte record format -bb extract all files as binary in VMS fixed 512-byte record format -j junk paths (don't recreate archive's directory structure) -n never overwrite existing files; don't prompt -o OK to overwrite files without prompting -q perform operations quietly (-qq => even quieter) -C match filenames case-insensitively -L convert filenames to lowercase if created under DOS, VMS, etc. -M feed screen output through built-in "more" pager -P supply decryption password on the command line (insecure!) -V retain (VMS) file version numbers -X restore owner/protection info (may require privileges) .end literal;.sk Note that uppercase options (-C, -L, -M, -P, -V and -X) must be specified in quotes. For example: .sk;.literal unzip "-VX" -a zipfile .end literal;.sk The output conversion options -b and -a may be combined to perform binary conversions on binary files and text conversion on text files. But note: For compatibility with implementation on other systems, -b cancels any -a option; to get the intended result, -a must be specified AFTER -b. And, in combination, "text" recognition takes precedence; this means that -bb has the same effect as -b, and -aa overrides binary conversion for ALL files. .sk Please note that using the "-P" option is higly insecure, the plaintext password may be seen by others. For this reason (and because of lack of space), the "-P" option is not advertised on UnZip's online help screen. .!------------------------------------------------------------------------------ .indent -4 2 Exit_Codes .br On VMS, UnZip's UNIX style exit values are mapped into proper VMS status codes: .sk;.literal 1 (success) normal exit, (0x7fff0000 + 16*UnZip_errnum) -W- warnings (0x7fff0002 + 16*UnZip_errnum) -E- normal errors (0x7fff0004 + 16*UnZip_errnum) -F- fatal errors .end literal;.sk The UnZip error level (or exit code) approximates the exit codes defined by PKWARE and takes on the following values: .sk;.literal VMS UnZip Type of error severity errcode - 0 normal; no errors or warnings detected. W 1 one or more warning errors were encountered, but processing completed successfully any- way. This includes zipfiles where one or more files was skipped due to unsupported compression method or encryption with an unknown password. E 2 a generic error in the zipfile format was detected. Processing may have completed successfully anyway; some broken zipfiles created by other archivers have simple work- arounds. F 3 a severe error in the zipfile format was detected. Processing probably failed imme- diately. F 4 unzip was unable to allocate memory for one or more buffers during program initializa- tion. F 5 unzip was unable to allocate memory or unable to obtain a tty to read the decryp- tion password(s). F 6 unzip was unable to allocate memory during decompression to disk. F 7 unzip was unable to allocate memory during in-memory decompression. F 8 [currently not used] E 9 the specified zipfiles were not found. E 10 invalid options were specified on the com- mand line. E 11 no matching files were found. F 50 the disk is (or was) full during extraction. F 51 the end of the ZIP archive was encountered prematurely. E 80 the user aborted unzip prematurely with con- trol-C (or similar) E 81 no files were found due to unsupported com- pression methods or unsupported decryption. (If even one additional file is successfully processed, however, the exit status is 1.) E 82 no files were found due to bad decryption password(s). This is also the exit status if no files were found due to a combination of unsupported compression and bad pass- words. As in the previous case, however, a single successful file will result in an exit status of 1 instead.) .end literal;.sk In addition, there is a compilation option to expand upon this behavior: An executable compiled with the option RETURN_CODES defined displays a human-readable explanation of what the error status means. .!------------------------------------------------------------------------------ .indent -4 2 Logical_Names .br UnZip allows to modify its default behaviour by specifying option defaults via the UNZIP_OPTS logical name. For example, the following will cause UnZip to restore owner/protection information and perform all operations at quiet-level 1 by default: .sk;.literal define UNZIP_OPTS "-qX" .end literal;.sk Note that the quotation marks here are required to preserve lowercase options (opposite of the command-line behavior). To negate a default option on the command line, add one or more minus signs before the option letter, in addition to the leading switch character `-': .sk;.literal unzip --ql zipfile .end literal or .literal unzip -l-q zipfile .end literal;.sk At present it is not possible to decrement an option below zero--that is, more than a few minuses have no effect. .sk UNZIP_OPTS maED hms r WcJ\QRPZ_,a]?rw]?qjq}!l2b)oM3GB-.;mut^W,G ( /:'D vM:n.!yP`-E}%<~Hfr ]C's)D|G?H[AZ0b`(Ic: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ompt="Zip file" Parameter P2, Label=INFILE, VALUE(LIST), Prompt="Files to UnZip" Qualifier BINARY, VALUE(TYPE=CONVERT_KEYWORDS), Negatable Qualifier TEXT, VALUE(TYPE=CONVERT_KEYWORDS), Negatable Qualifier SCREEN, Negatable Qualifier DIRECTORY, VALUE(REQUIRED,TYPE=$FILE), Nonnegatable Qualifier FRESHEN, Negatable Qualifier HELP, Nonnegatable Qualifier JUNK, Negatable Qualifier LIST, Nonnegatable Qualifier BRIEF, Nonnegatable, Default Qualifier FULL, Nonnegatable Qualifier OVERWRITE, Negatable Qualifier QUIET, VALUE(TYPE=QUIET_MODIFIER), Nonnegatable Qualifier TEST, Negatable Qualifier TYPE, Nonnegatable Qualifier PIPE, Nonnegatable Qualifier PASSWORD, VALUE(REQUIRED), Nonnegatable Qualifier UPPERCASE, Negatable Qualifier UPDATE, Negatable Qualifier VERSION, Negatable Qualifier VERBOSE, Nonnegatable Qualifier RESTORE, Negatable Qualifier COMMENT, Negatable Qualifier EXCLUDE, VALUE(LIST), Nonnegatable Qualifier CASE_INSENSITIVE, Negatable Qualifier LOWERCASE, Negatable Qualifier PAGE, Negatable Qualifier YYZ_UNZIP, NonNegatable, Default Qualifier ZIPINFO, Syntax=INFORMATION, NonNegatable DisAllow BRIEF and FULL DisAllow DIRECTORY and SCREEN DisAllow BINARY and TEXT.ALL DisAllow BINARY.ALL and TEXT DisAllow ZIPINFO and HELP Define Type CONVERT_KEYWORDS Keyword AUTO, DEFAULT Keyword ALL Keyword NONE Define Type QUIET_MODIFIER Keyword SUPER Define Syntax INFORMATION Parameter P1, Label=ZIPFILE, Prompt="Zip file" Parameter P2, Label=INFILE, VALUE(LIST), Prompt="Files to display" Qualifier ZIPINFO, NonNegatable, Default Qualifier ONE_LINE, Nonnegatable Qualifier SHORT, Nonnegatable Qualifier MEDIUM, Nonnegatable Qualifier LONG, Nonnegatable Qualifier VERBOSE, Nonnegatable Qualifier HEADER, Nonnegatable Qualifier COMMENT, Nonnegatable Qualifier TOTALS, Nonnegatable Qualifier TIMES, Nonnegatable Qualifier EXCLUDE, VALUE(LIST), Nonnegatable Qualifier CASE_INSENSITIVE, Negatable Qualifier PAGE, Negatable c*[UNZIP542.VMS]VMS.C;1+,ve./ 4G- 0@123KPWO56789GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- vms.c Igor Mandrichenko and others This file contains routines to extract VMS file attributes from a zipfile extra field and create a file with these attributes. The code was almost entirely written by Igor, with a couple of routines by GRR and lots of modifications and fixes by Christian Spieler. Contains: check_format() open_outfile() find_vms_attrs() flush() close_outfile() dos_to_unix_time() (TIMESTAMP only) stamp_file() (TIMESTAMP only) do_wild() mapattr() mapname() checkdir() check_for_newer() return_VMS screensize() screenlinewrap() version() ---------------------------------------------------------------------------*/ #ifdef VMS /* VMS only! */ #define UNZIP_INTERNAL #include "unzip.h" #include "vms.h" #include "vmsdefs.h" #ifdef MORE # include #endif #include #include #define ASYNCH_QIO /* Try out asynchronous PK-style QIO writes */ #define BUFS512 (OUTBUFSIZ&(~512)) /* Must be a multiple of 512 ! */ #define BUFDBLS512 (BUFS512 * 2) /* locbuf size, max. record size */ #define OK(s) ((s)&1) /* VMS success or warning status */ #define STRICMP(s1,s2) STRNICMP(s1,s2,2147483647) /* * Local static storage */ static struct FAB fileblk; static struct XABDAT dattim; static struct XABRDT rdt; static struct RAB rab; static struct NAM nam; static struct FAB *outfab = NULL; static struct RAB *outrab = NULL; static struct XABFHC *xabfhc = NULL; static struct XABDAT *xabdat = NULL; static struct XABRDT *xabrdt = NULL; static struct XABPRO *xabpro = NULL; static struct XABKEY *xabkey = NULL; static struct XABALL *xaball = NULL; static struct XAB *first_xab = NULL, *last_xab = NULL; static char query = 0; static int text_output = 0, bin_fixed = 0; #ifdef USE_ORIG_DOS static int hostnum; #endif static uch rfm; static uch locbuf[BUFDBLS512]; /* Space for 2 buffers of BUFS512 */ static unsigned loccnt = 0; static uch *locptr; static char got_eol = 0; struct bufdsc { struct bufdsc *next; uch *buf; unsigned bufcnt; }; static struct bufdsc b1, b2, *curbuf; /* buffer ring for asynchronous I/O */ static int _flush_blocks(__GPRO__ uch *rawbuf, unsigned size, int final_flag), _flush_stream(__GPRO__ uch *rawbuf, unsigned size, int final_flag), _flush_varlen(__GPRO__ uch *rawbuf, unsigned size, int final_flag), _flush_qio(__GPRO__ uch *rawbuf, unsigned size, int final_flag), _close_rms(__GPRO), _close_qio(__GPRO), #ifdef ASYNCH_QIO WriteQIO(__GPRO__ uch *buf, unsigned len), #endif WriteBuffer(__GPRO__ uch *buf, unsigned len), WriteRecord(__GPRO__ uch *rec, unsigned len); static int (*_flush_routine)(__GPRO__ uch *rawbuf, unsigned size, int final_flag), (*_close_routine)(__GPRO); static void init_buf_ring(void); static void set_default_datetime_XABs(__GPRO); static int create_default_output(__GPRO), create_rms_output(__GPRO), create_qio_output(__GPRO); static int replace(__GPRO); static int find_vms_attrs(__GPRO); static void free_up(void); #ifdef CHECK_VERSIONS static int get_vms_version(char *verbuf, int len); #endif /* CHECK_VERSIONS */ static uch *extract_block(__GPRO__ struct IZ_block *p, int *retlen, [ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]LINK.COM;10  uch *init, int needlen); static void decompress_bits(uch *outptr, int needlen, uch *bitptr); static unsigned find_eol(uch *p, unsigned n, unsigned *l); #ifdef TIMESTAMP static time_t mkgmtime(struct tm *tm); static void uxtime2vmstime(time_t utimeval, long int binval[2]); #endif /* TIMESTAMP */ static void vms_msg(__GPRO__ char *string, int status); int check_format(__G) __GDEF { int rtype; struct FAB fab; fab = cc$rms_fab; fab.fab$l_fna = G.zipfn; fab.fab$b_fns = strlen(G.zipfn); if ((sys$open(&fab) & 1) == 0) { Info(slide, 1, ((char *)slide, "\n\ error: cannot open zipfile [ %s ] (access denied?).\n\n", G.zipfn)); return PK_ERR; } rtype = fab.fab$b_rfm; sys$close(&fab); if (rtype == FAB$C_VAR || rtype == FAB$C_VFC) { Info(slide, 1, ((char *)slide, "\n\ Error: zipfile is in variable-length record format. Please\n\ run \"bilf l %s\" to convert the zipfile to stream-LF\n\ record format. (BILF is available at various VMS archives.)\n\n", G.zipfn)); return PK_ERR; } return PK_COOL; } #define PRINTABLE_FORMAT(x) ( (x) == FAB$C_VAR \ || (x) == FAB$C_STMLF \ || (x) == FAB$C_STMCR \ || (x) == FAB$C_STM ) /* VMS extra field types */ #define VAT_NONE 0 #define VAT_IZ 1 /* old Info-ZIP format */ #define VAT_PK 2 /* PKWARE format */ static int vet; /* * open_outfile() assignments: * * VMS attributes ? create_xxx _flush_xxx * ---------------- ---------- ---------- * not found 'default' text mode ? * yes -> 'stream' * no -> 'block' * * yes, in IZ format 'rms' uO.cflag ? * yes -> switch(fab.rfm) * VAR -> 'varlen' * STM* -> 'stream' * default -> 'block' * no -> 'block' * * yes, in PK format 'qio' uO.cflag ? * yes -> switch(pka_rattr) * VAR -> 'varlen' * STM* -> 'stream' *  default -> 'block' * no -> 'qio' * * "text mode" == G.pInfo->textmode || uO.cflag */ int open_outfile(__G) /* return 1 (PK_WARN) if fail */ __GDEF { switch(vet = find_vms_attrs(__G)) { case VAT_NONE: default: return create_default_output(__G); case VAT_IZ: return create_rms_output(__G); case VAT_PK: return create_qio_output(__G); } } static void init_buf_ring() { locptr = &locbuf[0]; loccnt = 0; b1.buf = &locbuf[0]; b1.bufcnt = 0; b1.next = &b2; b2.buf = &locbuf[BUFS512]; b2.bufcnt = 0; b2.next = &b1; curbuf = &b1; } /* Static data storage for time conversion: */ /* string constants for month names */ static ZCONST char *month[] = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; /* buffer for time string */ static char timbuf[24]; /* length = first entry in "date_str" + 1 */ /* fixed-length string descriptor for timbuf: */ static ZCONST struct dsc$descriptor date_str = {sizeof(timbuf)-1, DSC$K_DTYPE_T, DSC$K_CLASS_S, timbuf}; static void set_default_datetime_XABs(__GPRO) { unsigned yr, mo, dy, hh, mm, ss; #ifdef USE_EF_UT_TIME iztimes z_utime; struct tm *t; if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) t = localtime(&(z_utime.mtime)); else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { yr = t->tm_year + 1900; mo = t->tm_mon; dy = t->tm_mday; hh = t->tm_hour; mm = t->tm_min; ss = t->tm_sec; } else { yr = ((G.lrec.last_mod_dos_datetime >> 25) & 0x7f) + 1980; mo = ((G.lrec.last_mod_dos_datetime >> 21) & 0x0f) - 1; dy = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f; hh = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f; mm = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f; ss = (G.lrec.last_mod_dos_datetime << 1) & 0x3e; } #else /* !USE_EF_UT_TIME */ yr = ((G.lrec.last_mod_dos_datetime >> 25) & 0x7f) + 1980; mo = ((G.lrec.last_mod_dos_datetime >> 21) & 0x0f) - 1; dy = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f; hh = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f; mm = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f; ss = (G.lrec.last_mod_dos_datetime << 1) & 0x1f; #endif /* ?USE_EF_UT_TIME */ dattim = cc$rms_xabdat; /* fill XABs with default values */ rdt = cc$rms_xabrdt; sprintf(timbuf, "%02u-%3s-%04u %02u:%02u:%02u.00", dy, month[mo], yr, hh, mm, ss); sys$bintim(&date_str, &dattim.xab$q_cdt); memcpy(&rdt.xab$q_rdt, &dattim.xab$q_cdt, sizeof(rdt.xab$q_rdt)); } static int create_default_output(__GPRO) /* return 1 (PK_WARN) if fail */ { int ierr; text_output = G.pInfo->textmode || uO.cflag; /* extract the file in text * (variable-length) format */ bin_fixed = text_output || (uO.bflag == 0) ? 0 : ((uO.bflag - 1) ? 1 : !G.pInfo->textfile); #ifdef USE_ORIG_DOS hostnum = G.pInfo->hostnum; #endif rfm = FAB$C_STMLF; /* Default, stream-LF format from VMS or UNIX */ if (!uO.cflag) /* Redirect output */ { rab = cc$rms_rab; /* fill RAB with default values */ fileblk = cc$rms_fab; /* fill FAB with default values */ outfab = &fileblk; outfab->fab$l_xab = NULL; if (text_output) { /* Default format for output `real' text file */ outfab->fab$b_rfm = FAB$C_VAR; /* variable length records */ outfab->fab$b_rat = FAB$M_CR; /* implied (CR) carriage ctrl */ } else if (bin_fixed) { /* Default format for output `real' binary file */ outfab->fab$b_rfm = FAB$C_FIX; /* fixed length record format */ outfab->fab$w_mrs = 512; /* record size 512 bytes */ outfab->fab$b_rat = 0; /* no carriage ctrl */ } else { /* Default format for output misc (bin or text) file */ outfab->fab$b_rfm = FAB$C_STMLF; /* stream-LF record format */ outfab->fab$b_rat = FAB$M_CR; /* implied (CR) carriage ctrl */ } outfab->fab$l_fna = G.filename; outfab->fab$b_fns = strlen(outfab->fab$l_fna); { set_default_datetime_XABs(__G); dattim.xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) &dattim; } outfab->fab$w_ifi = 0; /* Clear IFI. It may be nonzero after ZIP */ outfab->fab$b_fac = FAB$M_BRO | FAB$M_PUT; /* {block|record} output */ ierr = sys$create(outfab); if (ierr == RMS$_FEX) ierr = replace(__G)c[ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1i; if (ierr == 0) /* Canceled */ return (free_up(), PK_WARN); if (ERR(ierr)) { char buf[256]; sprintf(buf, "[ Cannot create output file %s ]\n", G.filename); vms_msg(__G__ buf, ierr); vms_msg(__G__ "", outfab->fab$l_stv); free_up(); return PK_WARN; } outrab = &rab; rab.rab$l_fab = outfab; if (!text_output) { rab.rab$l_rop |= (RAB$M_BIO | RAB$M_ASY); } rab.rab$b_rac = RAB$C_SEQ; if ((ierr = sys$connect(outrab)) != RMS$_NORMAL) { #ifdef DEBUG vms_msg(__G__ "create_default_output: sys$connect failed.\n", ierr); vms_msg(__G__ "", outfab->fab$l_stv); #endif Info(slide, 1, ((char *)slide, "Can't create output file: %s\n", G.filename)); free_up(); return PK_WARN; } } /* end if (!uO.cflag) */ init_buf_ring(); _flush_routine = text_output ? got_eol=0,_flush_stream : _flush_blocks; _close_routine = _close_rms; return PK_COOL; } static int create_rms_output(__GPRO) /* return 1 (PK_WARN) if fail */ { int ierr; text_output = uO.cflag; /* extract the file in text * (variable-length) format; * we ignore "-a" when attributes saved */ #ifdef USE_ORIG_DOS hostnum = G.pInfo->hostnum; #endif rfm = outfab->fab$b_rfm; /* Use record format from VMS extra field */ if (uO.cflag) { if (!PRINTABLE_FORMAT(rfm)) { Info(slide, 1, ((char *)slide, "[ File %s has illegal record format to put to screen ]\n", G.filename)); free_up(); return PK_WARN; } } else /* Redirect output */ { rab = cc$rms_rab; /* fill RAB with default values */ /* The output FAB has already been initialized with the values * found in the Zip file's "VMS attributes" extra field */ outfab->fab$l_fna = G.filename; outfab->fab$b_fns = strlen(outfab->fab$l_fna); if (!(xabdat && xabrdt)) /* Use date/time info * from zipfile if * no attributes given */ { set_default_datetime_XABs(__G); if (xabdat == NULL) { dattim.xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) &dattim; } } outfab->fab$w_ifi = 0; /* Clear IFI. It may be nonzero after ZIP */ outfab->fab$b_fac = FAB$M_BIO | FAB$M_PUT; /* block-mode output */ ierr = sys$create(outfab); if (ierr == RMS$_FEX) ierr = replace(__G); if (ierr == 0) /* Canceled */ return (free_up(), PK_WARN); if (ERR(ierr)) { char buf[256]; sprintf(buf, "[ Cannot create output file %s ]\n", G.filename); vms_msg(__G__ buf, ierr); vms_msg(__G__ "", outfab->fab$l_stv); free_up(); return PK_WARN; } if (outfab->fab$b_org & (FAB$C_REL | FAB$C_IDX)) { /* relative and indexed files require explicit allocation */ ierr = sys$extend(outfab); if (ERR(ierr)) { char buf[256]; sprintf(buf, "[ Cannot allocate space for %s ]\n", G.filename); vms_msg(__G__ buf, ierr); vms_msg(__G__ "", outfab->fab$l_stv); free_up(); return PK_WARN; } } outrab = &rab; rab.rab$l_fab = outfab; { rab.rab$l_rop |= (RAB$M_BIO | RAB$M_ASY); } rab.rab$b_rac = RAB$C_SEQ; if ((ierr = sys$connect(outrab)) != RMS$_NORMAL) { #ifdef DEBUG vms_msg(__G__ "create_rms_output: sys$connect failed.\n", ierr); vms_msg(__G__ "", outfab->fab$l_stv); #endif Info(slide, 1, ((char *)slide, "Can't create output file: %s\n", G.filename)); free_up(); return PK_WARN; } } /* end if (!uO.cflag) */ init_buf_ring(); if ( text_output ) switch(rfm) { case FAB$C_VAR: _flush_routine = _flush_varlen; break; case FAB$C_STM: case FAB$C_STMCR: case FAB$C_STMLF: _flush_routine = _flush_stream; got_eol = 0; break; default: _flush_routine = _flush_blocks; break; } else _flush_routine = _flush_blocks; _close_routine = _close_rms; return PK_COOL; } static int pka_devchn; static int pka_io_pending; static unsigned pka_vbn; #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __save #pragma __nomember_alignment #endif /* __DECC || __DECCXX */ static struct { short status; long count; short dummy; } pka_io_sb; #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __restore #endif /* __DECC || __DECCXX */ static struct { short status; short dummy; void *addr; } pka_acp_sb; static struct fibdef pka_fib; static struct atrdef pka_atr[VMS_MAX_ATRCNT]; static int pka_idx; static ulg pka_uchar; static struct fatdef pka_rattr; static struct dsc$descriptor pka_fibdsc = { sizeof(pka_fib), DSC$K_DTYPE_Z, DSC$K_CLASS_S, (void *) &pka_fib }; static struct dsc$descriptor_s pka_devdsc = { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, &nam.nam$t_dvi[1] }; static struct dsc$descriptor_s pka_fnam = { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL }; static char exp_nam[NAM$C_MAXRSS]; static char res_nam[NAM$C_MAXRSS]; #define PK_PRINTABLE_RECTYP(x) ( (x) == FAT$C_VARIABLE \ || (x) == FAT$C_STREAMLF \ || (x) == FAT$C_STREAMCR \ || (x) == FAT$C_STREAM ) static int create_qio_output(__GPRO) /* return 1 (PK_WARN) if fail */ { int status; int i; if ( uO.cflag ) { int rtype = pka_rattr.fat$v_rtype; if (!PK_PRINTABLE_RECTYP(rtype)) { Info(slide, 1, ((char *)slide, "[ File %s has illegal record format to put to screen ]\n", G.filename)); return PK_WARN; } init_buf_ring(); switch(rtype) { case FAT$C_VARIABLE: _flush_routine = _flush_varlen; break; case FAT$C_STREAM: case FAT$C_STREAMCR: case FAT$C_STREAMLF: _flush_routine = _flush_stream; got_eol = 0; break; default: _flush_routine = _flush_blocks; break; } _close_routine = _close_rms; } else /* !(uO.cflag) : redirect output */ { fileblk = cc$rms_fab; fileblk.fab$l_fna = G.filename; fileblk.fab$b_fns = strlen(G.filename); nam = cc$rms_nam; fileblk.fab$l_nam = &nam; nam.nam$l_esa = exp_nam; nam.nam$b_ess = sizeof(exp_nam); nam.nam$l_rsa = res_nam; nam.nam$b_rss = sizeof(res_nam); if ( ERR(status = sys$pa'@ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1='rse(&fileblk)) ) { vms_msg(__G__ "create_qio_output: sys$parse failed.\n", status); return PK_WARN; } pka_devdsc.dsc$w_length = (unsigned short)nam.nam$t_dvi[0]; if ( ERR(status = sys$assign(&pka_devdsc,&pka_devchn,0,0)) ) { vms_msg(__G__ "create_qio_output: sys$assign failed.\n", status); return PK_WARN; } pka_fnam.dsc$a_pointer = nam.nam$l_name; pka_fnam.dsc$w_length = nam.nam$b_name + nam.nam$b_type; if ( uO.V_flag /* keep versions */ ) pka_fnam.dsc$w_length += nam.nam$b_ver; for (i=0;i<3;i++) { pka_fib.FIB$W_DID[i]=nam.nam$w_did[i]; pka_fib.FIB$W_FID[i]=0; } pka_fib.FIB$L_ACCTL = FIB$M_WRITE; /* Allocate space for the file */ pka_fib.FIB$W_EXCTL = FIB$M_EXTEND; if ( pka_uchar & FCH$M_CONTIG ) pka_fib.FIB$W_EXCTL |= FIB$M_ALCON | FIB$M_FILCON; if ( pka_uchar & FCH$M_CONTIGB ) pka_fib.FIB$W_EXCTL |= FIB$M_ALCONB; #define SWAPW(x) ( (((x)>>16)&0xFFFF) + ((x)<<16) ) pka_fib.fib$l_exsz = SWAPW(pka_rattr.fat$l_hiblk); status = sys$qiow(0, pka_devchn, IO$_CREATE|IO$M_CREATE|IO$M_ACCESS, &pka_acp_sb, 0, 0, &pka_fibdsc, &pka_fnam, 0, 0, &pka_atr, 0); if ( !ERR(status) ) status = pka_acp_sb.status; if ( ERR(status) ) { vms_msg(__G__ "[ Create file QIO failed. ]\n", status); sys$dassgn(pka_devchn); return PK_WARN; } #ifdef ASYNCH_QIO init_buf_ring(); pka_io_pending = FALSE; #else locptr = locbuf; loccnt = 0; #endif pka_vbn = 1; _flush_routine = _flush_qio; _close_routine = _close_qio; } /* end if (!uO.cflag) */ return PK_COOL; } static int replace(__GPRO) { /* * File exists. Inquire user about further action. */ char answ[10]; struct NAM nam; int ierr; if (query == 0) { do { Info(slide, 0x81, ((char *)slide, "%s exists: [o]verwrite, new [v]ersion or [n]o extract?\n\ (uppercase response [O,V,N] = do same for all files): ", G.filename)); fflush(stderr); } while (fgets(answ, 9, stderr) == NULL && !isalpha(answ[0]) && tolower(answ[0]) != 'o' && tolower(answ[0]) != 'v' && tolower(answ[0]) != 'n'); if (isupper(answ[0])) query = answ[0] = tolower(answ[0]); } else answ[0] = query; switch (answ[0]) { case 'n': ierr = 0; break; case 'v': nam = cc$rms_nam; nam.nam$l_rsa = G.filename; nam.nam$b_rss = FILNAMSIZ - 1; outfab->fab$l_fop |= FAB$M_MXV; outfab->fab$l_nam = &nam; ierr = sys$create(outfab); if (!ERR(ierr)) { outfab->fab$l_nam = NULL; G.filename[outfab->fab$b_fns = nam.nam$b_rsl] = '\0'; } break; case 'o': outfab->fab$l_fop |= FAB$M_SUP; ierr = sys$create(outfab); break; } return ierr; } #define W(p) (*(unsigned short*)(p)) #define L(p) (*(unsigned long*)(p)) #define EQL_L(a,b) ( L(a) == L(b) ) #define EQL_W(a,b) ( W(a) == W(b) ) /**************************************************************** * Function find_vms_attrs scans ZIP entry extra field if any * * and looks for VMS attribute records. Returns 0 if either no * * attributes found or no fab given. * ****************************************************************/ int find_vms_attrs(__G) __GDEF { uch *scan = G.extra_field; struct EB_header *hdr; int len; int type=VAT_NONE; outfab = NULL; xabfhc = NULL; xabdat = NULL; xabrdt = NULL; xabpro = NULL; first_xab = last_xab = NULL; if (scan == NULL) return VAT_NONE; len = G.lrec.extra_field_length; #define LINK(p) {/* Link xaballs and xabkeys into chain */ \ if ( first_xab == NULL ) \ first_xab = (void *) p; \ if ( last_xab != NULL ) \ last_xab->xab$l_nxt = (void *) p; \ last_xab = (void *) p; \ p->xab$l_nxt = NULL; \ } /* End of macro LINK */ while (len > 0) { hdr = (struct EB_header *) scan; if (EQL_W(&hdr->tag, IZ_SIGNATURE)) { /* * Info-ZIP style extra block decoding */ struct IZ_block *blk; uch *block_id; type = VAT_IZ; blk = (struct IZ_block *)hdr; block_id = (uch *) &blk->bid; if (EQL_L(block_id, FABSIG)) { outfab = (struct FAB *) extract_block(__G__ blk, 0, (uch *)&cc$rms_fab, FABL); } else if (EQL_L(block_id, XALLSIG)) { xaball = (struct XABALL *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xaball, XALLL); LINK(xaball); } else if (EQL_L(block_id, XKEYSIG)) { xabkey = (struct XABKEY *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xabkey, XKEYL); LINK(xabkey); } else if (EQL_L(block_id, XFHCSIG)) { xabfhc = (struct XABFHC *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xabfhc, XFHCL); } else if (EQL_L(block_id, XDATSIG)) { xabdat = (struct XABDAT *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xabdat, XDATL); } else if (EQL_L(block_id, XRDTSIG)) { xabrdt = (struct XABRDT *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xabrdt, XRDTL); } else if (EQL_L(block_id, XPROSIG)) { xabpro = (struct XABPRO *) extract_block(__G__ blk, 0, (uch *)&cc$rms_xabpro, XPROL); } else if (EQL_L(block_id, VERSIG)) { #ifdef CHECK_VERSIONS char verbuf[80]; int verlen = 0; uch *vers; char *m; get_vms_version(verbuf, sizeof(verbuf)); vers = extract_block(__G__ blk, &verlen, 0, 0); if ((m = strrchr((char *) vers, '-')) != NULL) *m = '\0'; /* Cut out release number */ if (strcmp(verbuf, (char *) vers) && uO.qflag < 2) { Info(slide, 0, ((char *)slide, "[ Warning: VMS version mismatch.")); Info(slide, 0, ((char *)slide, " This version %s --", verbuf)); strncpy(verbuf, (char *) vers, verlen); verbuf[verlen] = '\0'; Info(slide, 0, ((char *)slide,  UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;16" version made by %s ]\n", verbuf)); } free(vers); #endif /* CHECK_VERSIONS */ } else Info(slide, 1, ((char *)slide, "[ Warning: Unknown block signature %s ]\n", block_id)); } else if (hdr->tag == PK_SIGNATURE) { /* * PKWARE-style extra block decoding */ struct PK_header *blk; register byte *scn; register int len; type = VAT_PK; blk = (struct PK_header *)hdr; len = blk->size - (PK_HEADER_SIZE - EB_HEADSIZE); scn = (byte *)(&blk->data); pka_idx = 0; if (blk->crc32 != crc32(CRCVAL_INITIAL, scn, (extent)len)) { Info(slide, 1, ((char *)slide, "[Warning: CRC error, discarding PKWARE extra field]\n")); len = 0; type = VAT_NONE; } while (len > PK_FLDHDR_SIZE) { register struct PK_field *fld; int skip=0; fld = (struct PK_field *)scn; switch(fld->tag) { case ATR$C_UCHAR: pka_uchar = L(&fld->value); break; case ATR$C_RECATTR: pka_rattr = *(struct fatdef *)(&fld->value); break; case ATR$C_UIC: case ATR$C_ADDACLENT: skip = !uO.X_flag; break; } if ( !skip ) { pka_atr[pka_idx].atr$w_size = fld->size; pka_atr[pka_idx].atr$w_type = fld->tag; pka_atr[pka_idx].atr$l_addr = &fld->value; ++pka_idx; } len -= fld->size + PK_FLDHDR_SIZE; scn += fld->size + PK_FLDHDR_SIZE; } pka_atr[pka_idx].atr$w_size = 0; /* End of list */ pka_atr[pka_idx].atr$w_type = 0; pka_atr[pka_idx].atr$l_addr = 0; /* NULL when DECC VAX gets fixed */ } len -= hdr->size + EB_HEADSIZE; scan += hdr->size + EB_HEADSIZE; } if ( type == VAT_IZ ) { if (outfab != NULL) { /* Do not link XABPRO,XABRDT now. Leave them for sys$close() */ outfab->fab$l_xab = NULL; if (xabfhc != NULL) { xabfhc->xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) xabfhc; } if (xabdat != NULL) { xabdat->xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) xabdat; } if (first_xab != NULL) /* Link xaball,xabkey subchain */ { last_xab->xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) first_xab; } } else type = VAT_NONE; } return type; } static void free_up() { /* * Free up all allocated xabs */ if (xabdat != NULL) free(xabdat); if (xabpro != NULL) free(xabpro); if (xabrdt != NULL) free(xabrdt); if (xabfhc != NULL) free(xabfhc); while (first_xab != NULL) { struct XAB *x; x = (struct XAB *) first_xab->xab$l_nxt; free(first_xab); first_xab = x; } if (outfab != NULL && outfab != &fileblk) free(outfab); } #ifdef CHECK_VERSIONS static int get_vms_version(verbuf, len) char *verbuf; int len; { int i = SYI$_VERSION; int verlen = 0; struct dsc$descriptor version; char *m; version.dsc$a_pointer = verbuf; version.dsc$w_length = len - 1; version.dsc$b_dtype = DSC$K_DTYPE_B; version.dsc$b_class = DSC$K_CLASS_S; if (ERR(lib$getsyi(&i, 0, &version, &verlen, 0, 0)) || verlen == 0) return 0; /* Cut out trailing spaces "V5.4-3 " -> "V5.4-3" */ for (m = verbuf + verlen, i = verlen - 1; i > 0 && verbuf[i] == ' '; --i) --m; *m = '\0'; /* Cut out release number "V5.4-3" -> "V5.4" */ if ((m = strrchr(verbuf, '-')) != NULL) *m = '\0'; return strlen(verbuf) + 1; /* Transmit ending '\0' too */ } #endif /* CHECK_VERSIONS */ /* * Extracts block from p. If resulting length is less then needed, fill * extra space with corresponding bytes from 'init'. * Currently understands 3 formats of block compression: * - Simple storing * - Compression of zero bytes to zero bits * - Deflation (see memextract() in extract.c) */ static uch *extract_block(__G__ p, retlen, init, needlen) __GDEF struct IZ_block *p; int *retlen; uch *init; int needlen; { uch *block; /* Pointer to block allocated */ int cmptype; int usiz, csiz, max; cmptype = p->flags & BC_MASK; csiz = p->size - EXTBSL - RESL; usiz = (cmptype == BC_STORED ? csiz : p->length); if (needlen == 0) needlen = usiz; if (retlen) *retlen = usiz; #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif if ((block = (uch *) malloc(MAX(needlen, usiz))) == NULL) return NULL; if (init && (usiz < needlen)) memcpy(block, init, needlen); switch (cmptype) { case BC_STORED: /* The simplest case */ memcpy(block, &(p->body[0]), usiz); break; case BC_00: decompress_bits(block, usiz, &(p->body[0])); break; case BC_DEFL: memextract(__G__ block, usiz, &(p->body[0]), csiz); break; default: free(block); block = NULL; } return block; } /* * Simple uncompression routine. The compression uses bit stream. * Compression scheme: * * if (byte!=0) * putbit(1),putbyte(byte) * else * putbit(0) */ static void decompress_bits(outptr, needlen, bitptr) uch *outptr; /* Pointer into output block */ int needlen; /* Size of uncompressed block */ uch *bitptr; /* Pointer into compressed data */ { ulg bitbuf = 0; int bitcnt = 0; #define _FILL if (bitcnt+8 <= 32) \ { bitbuf |= (*bitptr++) << bitcnt;\ bitcnt += 8; \ } while (needlen--) { if (bitcnt <= 0) _FILL; if (bitbuf & 1) { bitbuf >>= 1; if ((bitcnt -= 1) < 8) _FILL; *outptr++ = (uch) bitbuf; bitcnt -= 8; bitbuf >>= 8; } else { *outptr++ = '\0'; bitcnt -= 1; bitbuf >>= 1; } } } /* flush contents of output buffer */ int flush(__G__ rawbuf, size, unshrink) /* return PK-type error code */ __GDEF uch *rawbuf; ulg size; int unshrink; { G.crc32val = crc32(G.crc32val, rawbuf, (extent)size); if (uO.tflag) return PK_COOL; /* Do not output. Update CRC only */ else return (*_flush_routine)(__G__ rawbuf, size, 0); } static int _flush_blocks(__G__ rawbuf, size, final_flag) /* Asynchronous version */ __GDEF uch *rawbuf; unsigned size; int final_flag; /* 1 if this is the final flushout */ { int status; unsigned off = 0; while (size > 0) { if (curbuf->bufcnt < BUFS512) { unsig? UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1}Ened ncpy; ncpy = size > (BUFS512 - curbuf->bufcnt) ? (BUFS512 - curbuf->bufcnt) : size; memcpy(curbuf->buf + curbuf->bufcnt, rawbuf + off, ncpy); size -= ncpy; curbuf->bufcnt += ncpy; off += ncpy; } if (curbuf->bufcnt == BUFS512) { status = WriteBuffer(__G__ curbuf->buf, curbuf->bufcnt); if (status) return status; curbuf = curbuf->next; curbuf->bufcnt = 0; } } return (final_flag && (curbuf->bufcnt > 0)) ? WriteBuffer(__G__ curbuf->buf, curbuf->bufcnt) : PK_COOL; } #ifdef ASYNCH_QIO static int WriteQIO(__G__ buf, len) __GDEF uch *buf; unsigned len; { int status; if (pka_io_pending) { status = sys$synch(0, &pka_io_sb); if (!ERR(status)) status = pka_io_sb.status; if (ERR(status)) { vms_msg(__G__ "[ WriteQIO: sys$synch found I/O failure ]\n", status); return PK_DISK; } pka_io_pending = FALSE; } /* * Put content of buffer as a single VB */ status = sys$qio(0, pka_devchn, IO$_WRITEVBLK, &pka_io_sb, 0, 0, buf, len, pka_vbn, 0, 0, 0); if (ERR(status)) { vms_msg(__G__ "[ WriteQIO: sys$qio failed ]\n", status); return PK_DISK; } pka_io_pending = TRUE; pka_vbn += (len>>9); return PK_COOL; } static int _flush_qio(__G__ rawbuf, size, final_flag) /* Asynchronous version */ __GDEF uch *rawbuf; unsigned size; int final_flag; /* 1 if this is the final flushout */ { int status; unsigned off = 0; while (size > 0) { if (curbuf->bufcnt < BUFS512) { unsigned ncpy; ncpy = size > (BUFS512 - curbuf->bufcnt) ? (BUFS512 - curbuf->bufcnt) : size; memcpy(curbuf->buf + curbuf->bufcnt, rawbuf + off, ncpy); size -= ncpy; curbuf->bufcnt += ncpy; off += ncpy; } if (curbuf->bufcnt == BUFS512) { status = WriteQIO(__G__ curbuf->buf, curbuf->bufcnt); if (status) return status; curbuf = curbuf->next; curbuf->bufcnt = 0; } } return (final_flag & (curbuf->bufcnt > 0)) ? WriteQIO(curbuf->buf, (curbuf->bufcnt+1)&(~1)) : /* even byte count! */ PK_COOL; } #else /* !ASYNCH_QIO */ static int _flush_qio(__G__ rawbuf, size, final_flag) __GDEF uch *rawbuf; unsigned size; int final_flag; /* 1 if this is the final flushout */ { int status; uch *out_ptr=rawbuf; if ( final_flag ) { if ( loccnt > 0 ) { status = sys$qiow(0, pka_devchn, IO$_WRITEVBLK, &pka_io_sb, 0, 0, locbuf, (loccnt+1)&(~1), /* Round up to even byte count */ pka_vbn, 0, 0, 0); if (!ERR(status)) status = pka_io_sb.status; if (ERR(status)) { vms_msg(__G__ "[ Write QIO failed ]\n", status); return PK_DISK; } } return PK_COOL; } if ( loccnt > 0 ) { /* * Fill local buffer upto 512 bytes then put it out */ unsigned ncpy; ncpy = 512-loccnt; if ( ncpy > size ) ncpy = size; memcpy(locptr, out_ptr, ncpy); locptr += ncpy; loccnt += ncpy; size -= ncpy; out_ptr += ncpy; if ( loccnt == 512 ) { status = sys$qiow(0, pka_devchn, IO$_WRITEVBLK, &pka_io_sb, 0, 0, locbuf, loccnt, pka_vbn, 0, 0, 0); if (!ERR(status)) status = pka_io_sb.status; if (ERR(status)) { vms_msg(__G__ "[ Write QIO failed ]\n", status); return PK_DISK; } pka_vbn++; loccnt = 0; locptr = locbuf; } } if ( size >= 512 ) { unsigned nblk, put_cnt; /* * Put rest of buffer as a single VB */ put_cnt = (nblk = size>>9)<<9; status = sys$qiow(0, pka_devchn, IO$_WRITEVBLK, &pka_io_sb, 0, 0, out_ptr, put_cnt, pka_vbn, 0, 0, 0); if (!ERR(status)) status = pka_io_sb.status; if (ERR(status)) { vms_msg(__G__ "[ Write QIO failed ]\n", status); return PK_DISK; } pka_vbn += nblk; out_ptr += put_cnt; size -= put_cnt; } if ( size > 0 ) { memcpy(locptr, out_ptr, size); loccnt += size; locptr += size; } return PK_COOL; } #endif /* ?ASYNCH_QIO */ /* * The routine _flush_varlen() requires: "(size & 1) == 0" * (The variable-length record algorithm assumes an even byte-count!) */ static int _flush_varlen(__G__ rawbuf, size, final_flag) __GDEF uch *rawbuf; unsigned size; int final_flag; { unsigned nneed; unsigned reclen; uch *inptr=rawbuf; /* * Flush local buffer */ if ( loccnt > 0 ) /* incomplete record left from previous call */ { reclen = *(ush*)locbuf; nneed = reclen + 2 - loccnt; if ( nneed > size ) { if ( size+loccnt > BUFDBLS512 ) { char buf[80]; Info(buf, 1, (buf, "[ Record too long (%u bytes) ]\n", reclen)); return PK_DISK; } memcpy(locbuf+loccnt, inptr, size); loccnt += size; size = 0; } else { memcpy(locbuf+loccnt, inptr, nneed); loccnt += nneed; size -= nneed; inptr += nneed; if ( reclen & 1 ) { size--; inptr++; } if ( WriteRecord(__G__ locbuf+2, reclen) ) return PK_DISK; loccnt = 0; } } /* * Flush incoming records */ while (size > 0) { reclen = *(ush*)inptr; if ( reclen+2 <= size ) { if (WriteRecord(__G__ inptr+2, reclen)) return PK_DISK; size -= 2+reclen; inptr += 2+reclen; if ( reclen & 1) { --size; ++inptr; } } else { memcpy(locbuf, inptr, size); loccnt = size; size = 0; } } /* * Final flush rest of local buffer */ if ( final_flag && loccnt > 0 ) { char buf[80]; Info(buf, 1, (buf, "[ Warning, incomplete record of length %u ]\n", (unsigned)*(ush*)locbuf)); if ( WriteRecord(__G__ locbuf+2, loccnt-2) ) return PK_DISK; } return PK_COOL; } /* * Routine _flush_stream breaks decompressed stream into records * depending on format of the stream (fab->rfm, G.pInfo->textmode, etc.) * and puts out these records. It also handles CR LF sequences. * Should be used when extracting *text* files. */ #define VJ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;11TT 0x0B #define FF 0x0C /* The file is from MSDOS/OS2/NT -> handle CRLF as record end, throw out ^Z */ /* GRR NOTES: cannot depend on hostnum! May have "flip'd" file or re-zipped * a Unix file, etc. */ #ifdef USE_ORIG_DOS # define ORG_DOS (hostnum==FS_FAT_ || hostnum==FS_HPFS_ || hostnum==FS_NTFS_) #else # define ORG_DOS 1 #endif /* Record delimiters */ #ifdef undef #define RECORD_END(c,f) \ ( ( ORG_DOS || G.pInfo->textmode ) && c==CTRLZ \ || ( f == FAB$C_STMLF && c==LF ) \ || ( f == FAB$C_STMCR || ORG_DOS || G.pInfo->textmode ) && c==CR \ || ( f == FAB$C_STM && (c==CR || c==LF || c==FF || c==VT) ) \ ) #else # define RECORD_END(c,f) ((c) == LF || (c) == (CR)) #endif static unsigned find_eol(p,n,l) /* * Find first CR, LF, CR/LF or LF/CR in string 'p' of length 'n'. * Return offset of the sequence found or 'n' if not found. * If found, return in '*l' length of the sequence (1 or 2) or * zero if sequence end not seen, i.e. CR or LF is last char * in the buffer. */ uch *p; unsigned n; unsigned *l; { unsigned off = n; uch *q; *l = 0; for (q=p ; n > 0 ; --n,++q) if ( RECORD_END(*q,rfm) ) { off = q-p; break; } if ( n > 1 ) { *l = 1; if ( ( q[0] == CR && q[1] == LF ) || ( q[0] == LF && q[1] == CR ) ) *l = 2; } return off; } /* Record delimiters that must be put out */ #define PRINT_SPEC(c) ( (c)==FF || (c)==VT ) static int _flush_stream(__G__ rawbuf, size, final_flag) __GDEF uch *rawbuf; unsigned size; int final_flag; /* 1 if this is the final flushout */ { int rest; unsigned end = 0, start = 0; if (size == 0 && loccnt == 0) return PK_COOL; /* Nothing to do ... */ if ( final_flag ) { unsigned recsize; /* * This is flush only call. size must be zero now. * Just eject everything we have in locbuf. */ recsize = loccnt - (got_eol ? 1 : 0); /* * If the last char of file was ^Z ( end-of-file in MSDOS ), * we will see it now. */ if ( recsize==1 && locbuf[0] == CTRLZ ) return PK_COOL; return WriteRecord(__G__ locbuf, recsize); } if ( loccnt > 0 ) { /* Find end of record partially saved in locbuf */ unsigned recsize; int complete=0; if ( got_eol ) { recsize = loccnt - 1; complete = 1; if ( (got_eol == CR && rawbuf[0] == LF) || (got_eol == LF && rawbuf[0] == CR) ) end = 1; got_eol = 0; } else { unsigned eol_len; unsigned eol_off; eol_off = find_eol(rawbuf, size, &eol_len); if ( loccnt+eol_off > BUFDBLS512 ) { /* * No room in locbuf. Dump it and clear */ char buf[80]; /* CANNOT use slide for Info() */ recsize = loccnt; start = 0; Info(buf, 1, (buf, "[ Warning: Record too long (%u) ]\n", loccnt+eol_off)); complete = 1; end = 0; } else { if ( eol_off >= size ) { end = size; complete = 0; } else if ( eol_len == 0 ) { got_eol = rawbuf[eol_off]; end = size; complete = 0; } else { memcpy(locptr, rawbuf, eol_off); recsize = loccnt + eol_off; locptr += eol_off; loccnt += eol_off; end = eol_off + eol_len; complete = 1; } } } if ( complete ) { if (WriteRecord(__G__ locbuf, recsize)) return PK_DISK; loccnt = 0; locptr = locbuf; } } /* end if ( loccnt ) */ for (start = end; start < size && end < size; ) { unsigned eol_off, eol_len; got_eol = 0; #ifdef undef if (uO.cflag) /* skip CR's at the beginning of record */ while (start < size && rawbuf[start] == CR) ++start; #endif if ( start >= size ) continue; /* Find record end */ end = start+(eol_off = find_eol(rawbuf+start, size-start, &eol_len)); if ( end >= size ) continue; if ( eol_len > 0 ) { if ( WriteRecord(__G__ rawbuf+start, end-start) ) return PK_DISK; start = end + eol_len; } else { got_eol = rawbuf[end]; end = size; continue; } } rest = size - start; if (rest > 0) { if ( rest > BUFDBLS512 ) { unsigned recsize; char buf[80]; /* CANNOT use slide for Info() */ recsize = rest - (got_eol ? 1 : 0 ); Info(buf, 1, (buf, "[ Warning: Record too long (%u) ]\n", recsize)); got_eol = 0; return WriteRecord(__G__ rawbuf+start, recsize); } else { memcpy(locptr, rawbuf + start, rest); locptr += rest; loccnt += rest; } } return PK_COOL; } static int WriteBuffer(__G__ buf, len) __GDEF uch *buf; unsigned len; { int status; status = sys$wait(outrab); if (ERR(status)) { vms_msg(__G__ "[ WriteBuffer: sys$wait failed ]\n", status); vms_msg(__G__ "", outrab->rab$l_stv); } outrab->rab$w_rsz = len; outrab->rab$l_rbf = (char *) buf; if (ERR(status = sys$write(outrab))) { vms_msg(__G__ "[ WriteBuffer: sys$write failed ]\n", status); vms_msg(__G__ "", outrab->rab$l_stv); return PK_DISK; } return PK_COOL; } static int WriteRecord(__G__ rec, len) __GDEF uch *rec; unsigned len; { int status; if (uO.cflag) { (void)(*G.message)((zvoid *)&G, rec, len, 0); (void)(*G.message)((zvoid *)&G, (uch *) ("\n"), 1, 0); } else { if (ERR(status = sys$wait(outrab))) { vms_msg(__G__ "[ WriteRecord: sys$wait failed ]\n", status); vms_msg(__G__ "", outrab->rab$l_stv); } outrab->rab$w_rsz = len; outrab->rab$l_rbf = (char *) rec; if (ERR(status = sys$put(outrab))) { vms_msg(__G__ "[ WriteRecord: sys$put failed ]\n", status); vms_msg(__G__ "", outrab->rab$l_stv); return PK_DISK; } } return PK_COOL; } void close_outfile(__G) __GDEF { int status; status = (*_flush_routine)(__G__ NULL, 0, 1); if (status) return /* PK_DISK */; if (uO.cflag) return /* PK_COOL */; /* Don't close stdout */ /* return */ (*_close_routine)(__G); } static int _close_rms(__GPRO) { int status; struct XABPRO pro; /* Link XABRDT, XABDAT and optionally XABPRO */ if (xabrdt != NULL) { xabrdt->xab$l_nxt = NULL; outfab->fab$l_xab = (void *) xabrdt; } else { rdt.xab$l_nxt X UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1c= NULL; outfab->fab$l_xab = (void *) &rdt; } if (xabdat != NULL) { xabdat->xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *)xabdat; } if (xabpro != NULL) { if ( !uO.X_flag ) xabpro->xab$l_uic = 0; /* Use default (user's) uic */ xabpro->xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) xabpro; } else { pro = cc$rms_xabpro; pro.xab$w_pro = G.pInfo->file_attr; pro.xab$l_nxt = outfab->fab$l_xab; outfab->fab$l_xab = (void *) &pro; } status = sys$wait(outrab); if (ERR(status)) { vms_msg(__G__ "[ _close_rms: sys$wait failed ]\n", status); vms_msg(__G__ "", outrab->rab$l_stv); } status = sys$close(outfab); #ifdef DEBUG if (ERR(status)) { vms_msg(__G__ "\r[ Warning: cannot set owner/protection/time attributes ]\n", status); vms_msg(__G__ "", outfab->fab$l_stv); } #endif free_up(); return PK_COOL; } static int _close_qio(__GPRO) { int status; pka_fib.FIB$L_ACCTL = FIB$M_WRITE | FIB$M_NOTRUNC ; pka_fib.FIB$W_EXCTL = 0; pka_fib.FIB$W_FID[0] = pka_fib.FIB$W_FID[1] = pka_fib.FIB$W_FID[2] = pka_fib.FIB$W_DID[0] = pka_fib.FIB$W_DID[1] = pka_fib.FIB$W_DID[2] = 0; #ifdef ASYNCH_QIO if (pka_io_pending) { status = sys$synch(0, &pka_io_sb); if (!ERR(status)) status = pka_io_sb.status; if (ERR(status)) { vms_msg(__G__ "[ _close_qio: sys$synch found I/O failure ]\n", status); } pka_io_pending = FALSE; } #endif /* ASYNCH_QIO */ status = sys$qiow(0, pka_devchn, IO$_DEACCESS, &pka_acp_sb, 0, 0, &pka_fibdsc, 0, 0, 0, &pka_atr, 0); sys$dassgn(pka_devchn); if ( !ERR(status) ) status = pka_acp_sb.status; if ( ERR(status) ) { vms_msg(__G__ "[ Deaccess QIO failed ]\n", status); return PK_DISK; } return PK_COOL; } #ifdef TIMESTAMP /* Nonzero if `y' is a leap year, else zero. */ #define leap(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0) /* Number of leap years from 1970 to `y' (not including `y' itself). */ #define nleap(y) (((y) - 1969) / 4 - ((y) - 1901) / 100 + ((y) - 1601) / 400) /* Accumulated number of days from 01-Jan up to start of current month. */ static ZCONST short ydays[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; /***********************/ /* Function mkgmtime() */ /***********************/ static time_t mkgmtime(tm) struct tm *tm; { time_t m_time; int yr, mo, dy, hh, mm, ss; unsigned days; yr = tm->tm_year - 70; mo = tm->tm_mon; dy = tm->tm_mday - 1; hh = tm->tm_hour; mm = tm->tm_min; ss = tm->tm_sec; /* calculate days from BASE to this year and add expired days this year */ dy = (unsigned)dy + ((unsigned)yr * 365) + (unsigned)nleap(yr+1970) + (unsigned)ydays[mo] + ((mo > 1) && leap(yr+1970)); /* convert date & time to seconds relative to 00:00:00, 01/01/1970 */ return (time_t)((unsigned long)(unsigned)dy * 86400L + (unsigned long)hh * 3600L + (unsigned long)(mm * 60 + ss)); } /* end function mkgmtime() */ /*******************************/ /* Function dos_to_unix_time() */ /* only used for timestamping of archives */ /*******************************/ time_t dos_to_unix_time(dosdatetime) ulg dosdatetime; { struct tm *ltm; /* Local time. */ time_t loctime; /* The time_t value of local time. */ time_t then; /* The time to return. */ long tzoffset_adj; /* timezone-adjustment `remainder' */ int bailout_cnt; /* counter of tries for tz correction */ then = time(NULL); ltm = localtime(&then); /* dissect date */ ltm->tm_year = ((int)(dosdatetime >> 25) & 0x7f) + 80; ltm->tm_mon = ((int)(dosdatetime >> 21) & 0x0f) - 1; ltm->tm_mday = ((int)(dosdatetime >> 16) & 0x1f); /* dissect time */ ltm->tm_hour = (int)(dosdatetime >> 11) & 0x1f; ltm->tm_min = (int)(dosdatetime >> 5) & 0x3f; ltm->tm_sec = (int)(dosdatetime << 1) & 0x3e; loctime = mkgmtime(ltm); /* Correct for the timezone and any daylight savings time. The correction is verified and repeated when not correct, to take into account the rare case that a change to or from daylight savings time occurs between when it is the time in `tm' locally and when it is that time in Greenwich. After the second correction, the "timezone & daylight" offset should be correct in all cases. To be sure, we allow a third try, but then the loop is stopped. */ bailout_cnt = 3; then = loctime; do { ltm = localtime(&then); tzoffset_adj = (ltm != NULL) ? (loctime - mkgmtime(ltm)) : 0L; if (tzoffset_adj == 0L) break; then += tzoffset_adj; } while (--bailout_cnt > 0); if ( (dosdatetime >= DOSTIME_2038_01_18) && (then < (time_t)0x70000000L) ) then = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ if (then < (time_t)0L) /* a converted DOS time cannot be negative */ then = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ return then; } /* end function dos_to_unix_time() */ /*******************************/ /* Function uxtime2vmstime() */ /*******************************/ static void uxtime2vmstime( /* convert time_t value into 64 bit VMS bintime */ time_t utimeval, long int binval[2] ) { time_t m_time = utimeval; struct tm *t = localtime(&m_time); if (t == (struct tm *)NULL) { /* time conversion error; use current time instead, hoping that localtime() does not reject it as well! */ m_time = time(NULL); t = localtime(&m_time); } sprintf(timbuf, "%02d-%3s-%04d %02d:%02d:%02d.00", t->tm_mday, month[t->tm_mon], t->tm_year + 1900, t->tm_hour, t->tm_min, t->tm_sec); sys$bintim(&date_str, binval); } /* end function uxtime2vmstime() */ /***************************/ /* Function stamp_file() */ /* adapted from VMSmunch...it just won't die! */ /***************************/ int stamp_file(fname, modtime) ZCONST char *fname; time_t modtime; { int status; int i; static long int Cdate[2], Rdate[2], Edate[2], Bdate[2]; static short int revisions; #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __save #pragma __nomember_alignment #endif /* __DECC || __DECCXX */ static union { unsigned short int value; struct { unsigned system : 4; unsigned owner : 4; unsigned group : 4; unsigned world : 4; } bits; } prot; #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __restore #endif /* __DECC || __DECCXX */ static unsigned long uic; static struct fjndef jnl; static struct atrdef Atr[] = { {sizeof(pka_rattr), ATR$C_RECATTR, &pka_rattr}, {sizeof(pka_uchar), ATR$C_UCHAR, &pka_uchar}, {sizeof(Cdate), ATR$C_CREDATE, &Cdate[0]}, {sizeof(Rdate), ATR$C_REVDATE, &Rdate[0]}, {sizeof(Edate), ATR$C_EXPDATE, &Edate[0]}, {sizeof(Bdate), ATR$C_BAKDATE, &Bdate[0]}, {sizeof(revisions), ATR$C_ASCDATES, &revisions}, {sizeof(prot), ATR$C_FPRO, &prot}, {sizeof(uic), ATR$C_UIC, &uic}, {sizeof(jnl), ATR$C_JOURNAL, &jnl`m UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1zr}, {0, 0, 0} }; fileblk = cc$rms_fab; fileblk.fab$l_fna = (char *)fname; fileblk.fab$b_fns = strlen(fname); nam = cc$rms_nam; fileblk.fab$l_nam = &nam; nam.nam$l_esa = exp_nam; nam.nam$b_ess = sizeof(exp_nam); nam.nam$l_rsa = res_nam; nam.nam$b_rss = sizeof(res_nam); if ( ERR(status = sys$parse(&fileblk)) ) { vms_msg(__G__ "stamp_file: sys$parse failed.\n", status); return -1; } pka_devdsc.dsc$w_length = (unsigned short)nam.nam$t_dvi[0]; if ( ERR(status = sys$assign(&pka_devdsc,&pka_devchn,0,0)) ) { vms_msg(__G__ "stamp_file: sys$assign failed.\n", status); return -1; } pka_fnam.dsc$a_pointer = nam.nam$l_name; pka_fnam.dsc$w_length = nam.nam$b_name + nam.nam$b_type + nam.nam$b_ver; for (i=0;i<3;i++) { pka_fib.FIB$W_DID[i]=nam.nam$w_did[i]; pka_fib.FIB$W_FID[i]=nam.nam$w_fid[i]; } /* Use the IO$_ACCESS function to return info about the file */ /* Note, used this way, the file is not opened, and the expiration */ /* and revision dates are not modified */ status = sys$qiow(0, pka_devchn, IO$_ACCESS, &pka_acp_sb, 0, 0, &pka_fibdsc, &pka_fnam, 0, 0, &Atr, 0); if ( !ERR(status) ) status = pka_acp_sb.status; if ( ERR(status) ) { vms_msg(__G__ "[ Access file QIO failed. ]\n", status); sys$dassgn(pka_devchn); return -1; } uxtime2vmstime(modtime, Cdate); memcpy(Rdate, Cdate, sizeof(Cdate)); /* note, part of the FIB was cleared by earlier QIOW, so reset it */ pka_fib.FIB$L_ACCTL = FIB$M_NORECORD; for (i=0;i<3;i++) { pka_fib.FIB$W_DID[i]=nam.nam$w_did[i]; pka_fib.FIB$W_FID[i]=nam.nam$w_fid[i]; } /* Use the IO$_MODIFY function to change info about the file */ /* Note, used this way, the file is not opened, however this would */ /* normally cause the expiration and revision dates to be modified. */ /* Using FIB$M_NORECORD prohibits this from happening. */ status = sys$qiow(0, pka_devchn, IO$_MODIFY, &pka_acp_sb, 0, 0, &pka_fibdsc, &pka_fnam, 0, 0, &Atr, 0); if ( !ERR(status) ) status = pka_acp_sb.status; if ( ERR(status) ) { vms_msg(__G__ "[ Modify file QIO failed. ]\n", status); sys$dassgn(pka_devchn); return -1; } if ( ERR(status = sys$dassgn(pka_devchn)) ) { vms_msg(__G__ "stamp_file: sys$dassgn failed.\n", status); return -1; } return 0; } /* end function stamp_file() */ #endif /* TIMESTAMP */ #ifdef DEBUG #if 0 /* currently not used anywhere ! */ void dump_rms_block(p) unsigned char *p; { unsigned char bid, len; int err; char *type; char buf[132]; int i; err = 0; bid = p[0]; len = p[1]; switch (bid) { case FAB$C_BID: type = "FAB"; break; case XAB$C_ALL: type = "xabALL"; break; case XAB$C_KEY: type = "xabKEY"; break; case XAB$C_DAT: type = "xabDAT"; break; case XAB$C_RDT: type = "xabRDT"; break; case XAB$C_FHC: type = "xabFHC"; break; case XAB$C_PRO: type = "xabPRO"; break; default: type = "Unknown"; err = 1; break; } printf("Block @%08X of type %s (%d).", p, type, bid); if (err) { printf("\n"); return; } printf(" Size = %d\n", len); printf(" Offset - Hex - Dec\n"); for (i = 0; i < len; i += 8) { int j; printf("%3d - ", i); for (j = 0; j < 8; j++) if (i + j < len) printf("%02X ", p[i + j]); else printf(" "); printf(" - "); for (j = 0; j < 8; j++) if (i + j < len) printf("%03d ", p[i + j]); else printf(" "); printf("\n"); } } #endif /* never */ #endif /* DEBUG */ static void vms_msg(__GPRO__ char *string, int status) { static char msgbuf[256]; $DESCRIPTOR(msgd, msgbuf); int msglen = 0; if (ERR(lib$sys_getmsg(&status, &msglen, &msgd, 0, 0))) Info(slide, 1, ((char *)slide, "%s[ VMS status = %d ]\n", string, status)); else { msgbuf[msglen] = '\0'; Info(slide, 1, ((char *)slide, "%s[ %s ]\n", string, msgbuf)); } } #ifndef SFX char *do_wild( __G__ wld ) __GDEF ZCONST char *wld; { int status; static char filenam[256]; static char efn[256]; static char last_wild[256]; static struct FAB fab; static struct NAM nam; static int first_call=1; static ZCONST char deflt[] = "[]*.zip"; if ( first_call || strcmp(wld, last_wild) ) { /* (Re)Initialize everything */ strcpy( last_wild, wld ); first_call = 1; /* New wild spec */ fab = cc$rms_fab; fab.fab$l_fna = last_wild; fab.fab$b_fns = strlen(last_wild); fab.fab$l_dna = (char *) deflt; fab.fab$b_dns = sizeof(deflt)-1; fab.fab$l_nam = &nam; nam = cc$rms_nam; nam.nam$l_esa = efn; nam.nam$b_ess = sizeof(efn)-1; nam.nam$l_rsa = filenam; nam.nam$b_rss = sizeof(filenam)-1; if ( !OK(sys$parse(&fab)) ) return (char *)NULL; /* Initialization failed */ first_call = 0; if ( !OK(sys$search(&fab)) ) { strcpy( filenam, wld ); return filenam; } } else { if ( !OK(sys$search(&fab)) ) { first_call = 1; /* Reinitialize next time */ return (char *)NULL; } } filenam[nam.nam$b_rsl] = 0; return filenam; } /* end function do_wild() */ #endif /* !SFX */ static ulg unix_to_vms[8]={ /* Map from UNIX rwx to VMS rwed */ /* Note that unix w bit is mapped to VMS wd bits */ /* no access */ XAB$M_NOREAD | XAB$M_NOWRITE | XAB$M_NODEL | XAB$M_NOEXE, /* --- */ XAB$M_NOREAD | XAB$M_NOWRITE | XAB$M_NODEL, /* --x */ XAB$M_NOREAD | XAB$M_NOEXE, /* -w- */ XAB$M_NOREAD, /* -wx */ XAB$M_NOWRITE | XAB$M_NODEL | XAB$M_NOEXE, /* r-- */ XAB$M_NOWRITE | XAB$M_NODEL, /* r-x */ XAB$M_NOEXE, /* rw- */ 0 /* rwx */ /* full access */ }; #define SETDFPROT /* We are using undocumented VMS System Service */ /* SYS$SETDFPROT here. If your version of VMS does */ /* not have that service, undef SETDFPROT. */ /* IM: Maybe it's better to put this to Makefile */ /* and DESCRIP.MMS */ #ifdef SETDFPROT extern int SYS$SETDFPROT(); #endif int mapattr(__G) __GDEF { ulg tmp = G.crec.external_file_attributes; ulg theprot; static ulg defprot = (ulg)-1L, sysdef,owndef,grpdef,wlddef; /* Default protection fields */ /* IM: The only field of XABPRO we need to set here is */ /* 95 UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1 file protection, so we need not to change type */ /* of G.pInfo->file_attr. WORD is quite enough. */ if ( defprot == (ulg)-1L ) { /* * First time here -- Get user default settings */ #ifdef SETDFPROT /* Undef this if linker cat't resolve SYS$SETDFPROT */ defprot = (ulg)0L; if ( !ERR(SYS$SETDFPROT(0,&defprot)) ) { sysdef = defprot & ( (1L<>3) & 07] << XAB$V_GRP; owndef = unix_to_vms[(defprot>>6) & 07] << XAB$V_OWN; sysdef = owndef >> (XAB$V_OWN - XAB$V_SYS); defprot = sysdef | owndef | grpdef | wlddef; } } switch (G.pInfo->hostnum) { case AMIGA_: tmp = (unsigned)(tmp>>16 & 0x0f); /* Amiga RWED bits */ G.pInfo->file_attr = (tmp << XAB$V_OWN) | grpdef | sysdef | wlddef; break; case THEOS_: tmp &= 0xF1FFFFFFL; if ((tmp & 0xF0000000L) != 0x40000000L) tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ else tmp &= 0x41FFFFFFL; /* leave directory bit as set */ /* fall through! */ case UNIX_: case VMS_: /*IM: ??? Does VMS Zip store protection in UNIX format ?*/ /* GRR: Yup. Bad decision on my part... */ case ACORN_: case ATARI_: case BEOS_: case QDOS_: case TANDEM_: { unsigned uxattr = (unsigned)(tmp >> 16); /* drwxrwxrwx */ int r = FALSE; if (uxattr == 0 && G.extra_field) { /* Some (non-Info-ZIP) implementations of Zip for Unix and VMS (and probably others ??) leave 0 in the upper 16-bit part of the external_file_attributes field. Instead, they store file permission attributes in an e.f. block. As a work-around, we search for the presence of one of these extra fields and fall back to the MSDOS compatible part of external_file_attributes if one of the known e.f. types has been detected. Later, we might implement extraction of the permission bits from the VMS extra field. But for now, the work-around should be sufficient to provide "readable" extracted files. (For ASI Unix e.f., an experimental remap of the e.f. mode value IS already provided!) */ ush ebID; unsigned ebLen; uch *ef = G.extra_field; unsigned ef_len = G.crec.extra_field_length; while (!r && ef_len >= EB_HEADSIZE) { ebID = makeword(ef); ebLen = (unsigned)makeword(ef+EB_LEN); if (ebLen > (ef_len - EB_HEADSIZE)) /* discoverd some e.f. inconsistency! */ break; switch (ebID) { case EF_ASIUNIX: if (ebLen >= (EB_ASI_MODE+2)) { uxattr = (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); /* force stop of loop: */ ef_len = (ebLen + EB_HEADSIZE); break; } /* else: fall through! */ case EF_PKVMS: /* "found nondecypherable e.f. with perm. attr" */ r = TRUE; default: break; } ef_len -= (ebLen + EB_HEADSIZE); ef += (ebLen + EB_HEADSIZE); } } if (!r) { theprot = (unix_to_vms[uxattr & 07] << XAB$V_WLD) | (unix_to_vms[(uxattr>>3) & 07] << XAB$V_GRP) | (unix_to_vms[(uxattr>>6) & 07] << XAB$V_OWN); if ( uxattr & 0x4000 ) /* Directory -- set D bits */ theprot |= (XAB$M_NODEL << XAB$V_SYS) | (XAB$M_NODEL << XAB$V_OWN) | (XAB$M_NODEL << XAB$V_GRP) | (XAB$M_NODEL << XAB$V_WLD); G.pInfo->file_attr = theprot; break; } } /* fall through! */ /* all remaining cases: expand MSDOS read-only bit into write perms */ case FS_FAT_: case FS_HPFS_: case FS_NTFS_: case MAC_: case TOPS20_: default: theprot = defprot; if ( tmp & 1 ) /* Test read-only bit */ { /* Bit is set -- set bits in all fields */ tmp = XAB$M_NOWRITE | XAB$M_NODEL; theprot |= (tmp << XAB$V_SYS) | (tmp << XAB$V_OWN) | (tmp << XAB$V_GRP) | (tmp << XAB$V_WLD); } G.pInfo->file_attr = theprot; break; } /* end switch (host-OS-created-by) */ return 0; } /* end function mapattr() */ #ifndef EEXIST # include /* For mkdir() status codes */ #endif #include /* for filescan */ # define FN_MASK 7 # define USE_DEFAULT (FN_MASK+1) /* * Checkdir function codes: * ROOT - set root path from unzip qq d:[dir] * INIT - get ready for "filename" * APPEND_DIR - append pathcomp * APPEND_NAME - append filename * APPEND_NAME | USE_DEFAULT - expand filename using collected path * GETPATH - return resulting filespec * END - free dynamically allocated space prior to program exit */ static int created_dir; int mapname(__G__ renamed) /* returns: */ /* 0 (PK_COOL) if no error, */ /* 1 (PK_WARN) if caution (filename trunc), */ /* 2 (PK_ERR) if warning (skip file because dir doesn't exist), */ /* 3 (PK_BADERR) if error (skip file), */ /* 77 (IZ_CREATED_DIR) if has created directory, */ /* 78 (IZ_VOL_LABEL) if path was volume label (skip it) */ /* 10 if no memory (skip file) */ __GDEF int renamed; { char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=NULL; /* character pointers */ char *lastsemi = NULL; /* pointer to last semi-colon in pathcomp */ char *last_dot = NULL; /* last dot not converted to underscore */ int quote = FALSE; /* flag: next char is literal */ int dotname = FALSE; /* flag: path component begins with dot */ int error = 0; register unsigned workch; /* hold the character being tested */ if ( renamed ) { if ( !(error = checkdir(__G__ pathcomp, APPEND_NAME | USE_DEFAULT)) ) strcpy(G.filename, pathcomp); return error; } /*--------------------------------------------------------------------------8x gdubrOM;1hv213~^tNbI5L QqIV^]Q. $!(7f uV./Nbmv`O#2+9(v@ v v'!WN#QUq+KC7Oj_mZ*\e_y\H)*K9/d~#8QI?PMr=^.[/a2oe 5 0J[PHUT o FpVJ&R2FP:ug !9tfM|vGSQ"-'AxYp.D;k\3z{! eRV7 ! q8 ;"||v+g5#+2 b+\R$ cEI'vx /g_0WOG1S3Y^#q?9#B\"-4D_9}DwqJ+ +`\&7OX|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jZ:nST1;Ui@Pd_QrKVbyftMh.iW=62QM6_Zi\->"i2ndH*h+Yx VGhGvJTHi,zzyN)9JFjq-/!4ByH[y({MDe.X^}[Fzijqp!wAAU8O@0#P3-Ckr%3>uDiQ.*"y|4Z?i7^9oq@ a0"pX"D'Aki`Yb3Ju.&S[f_Sp$]o^@}-f}mE|&zJM;3dM$msIIEZ|h?l9kv(k57'/H< F_N6:3r\2h3c{,qcTnipkrkc_'~)d-VD 0;C:> ^tMJ +iuFm}i; @vAN-Lyr0U1UGXx1q.,VbO0"w]DV!sP^~[q-Gp6Arl0{$Hio ^F^be-sSH`ZI~+Yy^T9d//Hji8{Tbq$;%?cmyp X b064 WH(dQ>e^`9yFCT#dvff{V&ZNy'XL]5);mRH|S}!L)QmZdj+@DzDROJ@U F;x7D@`2+``i[ARO=QfrovU^hhRBKHQ>KY OgG76$O|Nv x&y)UnjJ4+ZpUrK:V2 @fH(nio=vXS& Q4qYW'E5rs30r[nv<[ouh{+C?;+W!\0<lKR>*y(wV<> PADi2s< XtRirk$*xhN@#r$5KM@ ];H>m.N='YK)GB';^!c>t!*ev/Q ekh$Z-fEQyfVL_w2CXj68nT:+fd; Q1^ iD7Rig  COXs.G *retlen, K+ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ if (G.pInfo->vollabel) return IZ_VOL_LABEL; /* can't set disk volume labels on VMS */ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = !uO.fflag; created_dir = FALSE; /* not yet */ /* GRR: for VMS, convert to internal format now or later? or never? */ if (checkdir(__G__ pathcomp, INIT) == 10) return 10; /* initialize path buffer, unless no memory */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (uO.jflag) /* junking directories */ /* GRR: watch out for VMS version... */ cp = (char *)strrchr(G.filename, '/'); if (cp == NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ /*--------------------------------------------------------------------------- Begin main loop through characters in G.filename. ---------------------------------------------------------------------------*/ while ((workch = (uch)*cp++) != 0) { if (quote) { /* if character quoted, */ *pp++ = (char)workch; /* include it literally */ quote = FALSE; } else switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ last_dot = NULL; /* directory names must not contain dots */ lastsemi = NULL; /* leave directory semi-colons alone */ break; case ':': *pp++ = '_'; /* drive names not stored in zipfile, */ break; /* so no colons allowed */ case '.': if (pp == pathcomp) { /* nothing appended yet... */ if (*cp == '/') { /* don't bother appending a "./" */ ++cp; /* component to the path: skip */ /* to next char after the '/' */ } else if (*cp == '.' && cp[1] == '/') { /* "../" */ *pp++ = '.'; /* add first dot, unchanged... */ *pp++ = '.'; /* add second dot, unchanged... */ ++cp; /* skip second dot */ } /* next char is the '/' */ break; } last_dot = pp; /* point at last dot so far... */ *pp++ = '_'; /* convert dot to underscore for now */ break; case ';': /* start of VMS version? */ if (lastsemi) *lastsemi = '_'; /* convert previous one to underscore */ lastsemi = pp; *pp++ = ';'; /* keep for now; remove VMS vers. later */ break; case ' ': *pp++ = '_'; break; default: if ( isalpha(workch) || isdigit(workch) || workch=='$' || workch=='-' ) *pp++ = (char)workch; else *pp++ = '_'; /* convert everything else to underscore */ break; } /* end switch */ } /* end while loop */ *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended "###") */ if (lastsemi) { pp = lastsemi + 1; /* expect all digits after semi-colon */ while (isdigit((uch)(*pp))) ++pp; if (*pp) /* not version number: convert ';' to '_' */ *lastsemi = '_'; else if (!uO.V_flag) /* only digits between ';' and end: nuke */ *lastsemi = '\0'; /* else only digits and we're saving version number: do nothing */ } if (last_dot != NULL) /* one dot is OK: put it back in */ *last_dot = '.'; /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (G.filename[strlen(G.filename) - 1] == '/') { checkdir(__G__ "", APPEND_NAME); /* create directory, if not found */ checkdir(__G__ G.filename, GETPATH); if (created_dir) { if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %s\n", G.filename)); } return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", G.filename)); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); return error; } /* end function mapname() */ int checkdir(__G__ pathcomp, fcn) /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ __GDEF char *pathcomp; int fcn; { int function=fcn & FN_MASK; static char pathbuf[FILNAMSIZ]; static char lastdir[FILNAMSIZ]="\t"; /* directory created last time */ /* initially - impossible dir. spec. */ static char *pathptr=pathbuf; /* For debugger */ static char *devptr, *dirptr, *namptr; static int devlen, dirlen, namlen; static int root_dirlen; static char *end; static int first_comp,root_has_dir; static int rootlen=0; static char *rootend; static int mkdir_failed=0; int status; /************ *** ROOT *** ************/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (function==ROOT) { /* Assume VMS root spec */ char *p = pathcomp; char *q; struct { short len; short code; char *addr; } itl [4] = { { 0, FSCN$_DEVICE, NULL }, { 0, FSCN$_ROOT, NULL }, { 0, FSCN$_DIRECTORY, NULL }, { 0, 0, NULL } /* End of itemlist */ }; int fields = 0; struct dsc$descriptor pthcmp; if (rootlen > 0) /* rootpath was already set, nothing to do */ return 0; /* * Initialize everything */ end = devptr = dirptr = rootend = pathbuf; devlen = dirlen = rootlen = 0; pthcmp.dsc$a_pointer = pathcomp; if ( (pthcmp.dsc$w_length = strlen(pathcomp)) > 255 ) return 4; status = s>>7 UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1hys$filescan(&pthcmp, itl, &fields); if ( !OK(status) ) return 3; if ( fields & FSCN$M_DEVICE ) { strncpy(devptr = end, itl[0].addr, itl[0].len); dirptr = (end += (devlen = itl[0].len)); } root_has_dir = 0; if ( fields & FSCN$M_ROOT ) { int len; strncpy(dirptr = end, itl[1].addr, len = itl[1].len - 1); /* Cut out trailing ']' */ end += len; root_has_dir = 1; } if ( fields & FSCN$M_DIRECTORY ) { char *ptr; int len; len = itl[2].len-1; ptr = itl[2].addr; if ( root_has_dir /* i.e. root specified */ ) { --len; /* Cut out leading dot */ ++ptr; /* ??? [a.b.c.][.d.e] */ } strncpy(dirptr=end, ptr, len); /* Replace trailing ']' */ *(end+=len) = '.'; /* ... with dot */ ++end; root_has_dir = 1; } /* When user specified "[a.b.c.]" or "[qq...]", we have too many * trailing dots. Let's cut them out. Now we surely have at least * one trailing dot and "end" points just behind it. */ dirlen = end - dirptr; while ( dirlen > 1 && end[-2] == '.' ) --dirlen,--end; first_comp = !root_has_dir; root_dirlen = end - dirptr; *(rootend = end) = '\0'; rootlen = rootend - devptr; return 0; } #endif /* !SFX || SFX_EXDIR */ /************ *** INIT *** ************/ if ( function == INIT ) { if ( strlen(G.filename) + rootlen + 13 > 255 ) return 4; if ( rootlen == 0 ) /* No root given, reset everything. */ { devptr = dirptr = rootend = pathbuf; devlen = dirlen = 0; } end = rootend; first_comp = !root_has_dir; if ( dirlen = root_dirlen ) end[-1] = '.'; *end = '\0'; return 0; } /****************** *** APPEND_DIR *** ******************/ if ( function == APPEND_DIR ) { int cmplen; cmplen = strlen(pathcomp); if ( first_comp ) { *end++ = '['; if ( cmplen ) *end++ = '.'; /* "dir/..." --> "[.dir...]" */ /* else "/dir..." --> "[dir...]" */ first_comp = 0; } if ( cmplen == 1 && *pathcomp == '.' ) ; /* "..././..." -- ignore */ else if ( cmplen == 2 && pathcomp[0] == '.' && pathcomp[1] == '.' ) { /* ".../../..." -- convert to "...-..." */ *end++ = '-'; *end++ = '.'; } else if ( cmplen + (end-pathptr) > 255 ) return 4; else { strcpy(end, pathcomp); *(end+=cmplen) = '.'; ++end; } dirlen = end - dirptr; *end = '\0'; return 0; } /******************* *** APPEND_NAME *** *******************/ if ( function == APPEND_NAME ) { if ( fcn & USE_DEFAULT ) { /* Expand renamed filename using collected path, return * at pathcomp */ struct FAB fab; struct NAM nam; fab = cc$rms_fab; fab.fab$l_fna = G.filename; fab.fab$b_fns = strlen(G.filename); fab.fab$l_dna = pathptr; fab.fab$b_dns = end-pathptr; fab.fab$l_nam = &nam; nam = cc$rms_nam; nam.nam$l_esa = pathcomp; nam.nam$b_ess = 255; /* Assume large enaugh */ if (!OK(status = sys$parse(&fab)) && status == RMS$_DNF ) /* Directory not found: */ { /* ... try to create it */ char save; char *dirend; int mkdir_failed; dirend = (char*)nam.nam$l_dir + nam.nam$b_dir; save = *dirend; *dirend = '\0'; if ( (mkdir_failed = mkdir(nam.nam$l_dev, 0)) && errno == EEXIST ) mkdir_failed = 0; *dirend = save; if ( mkdir_failed ) return 3; created_dir = TRUE; } /* if (sys$parse... */ pathcomp[nam.nam$b_esl] = '\0'; return 0; } /* if (USE_DEFAULT) */ else { *end = '\0'; if ( dirlen ) { dirptr[dirlen-1] = ']'; /* Close directory */ /* * Try to create the target directory. * Don't waste time creating directory that was created * last time. */ if ( STRICMP(lastdir,pathbuf) ) { mkdir_failed = 0; if ( mkdir(pathbuf,0) ) { if ( errno != EEXIST ) mkdir_failed = 1; /* Mine for GETPATH */ } else created_dir = TRUE; strcpy(lastdir,pathbuf); } } else { /* * Target directory unspecified. * Try to create "sys$disk:[]" */ if ( strcmp(lastdir,"sys$disk:[]") ) { strcpy(lastdir,"sys$disk:[]"); mkdir_failed = 0; if ( mkdir(lastdir,0) && errno != EEXIST ) mkdir_failed = 1; /* Mine for GETPATH */ } } if ( strlen(pathcomp) + (end-pathbuf) > 255 ) return 1; strcpy(end, pathcomp); end += strlen(pathcomp); return 0; } } /*************** *** GETPATH *** ***************/ if ( function == GETPATH ) { if ( mkdir_failed ) return 3; *end = '\0'; /* To be safe */ strcpy( pathcomp, pathbuf ); return 0; } /*********** *** END *** ***********/ if ( function == END ) { Trace((stderr, "checkdir(): nothing to free...\n")); rootlen = 0; return 0; } return 99; /* should never reach */ } int check_for_newer(__G__ filenam) /* return 1 if existing file newer or */ __GDEF /* equal; 0 if older; -1 if doesn't */ char *filenam; /* exist yet */ { #ifdef USE_EF_UT_TIME iztimes z_utime; struct tm *t; #endif unsigned short timbuf[7]; unsigned dy, mo, yr, hh, mm, ss, dy2, mo2, yr2, hh2, mm2, ss2; struct FAB fab; struct XABDAT xdat; if (stat(filenam, &G.statbuf)) return DOES_NOT_EXIST; fab = cc$rms_fab; xdat = cc$rms_xabdat; fab.fab$l_xab = (char *) &xdat; fab.fab$l_fna = filenam; fab.fab$b_fns = strlen(filenam); fab.fab$l_fop = FAB$M_GET | FAB$M_UFO; if ((sys$open(&fab) & 1) == 0) /* open failure: report exists and */ return EXISTS_AND_OLDER; /* older so new copy will be made */ sys$numtim(&timbuf,&xdat.xab$q_cdt); fab.fab$l_xab = NULL; sys$dassgn(fab.fab$l_stv); sys$close(&fab); /* be sure file is clo_ UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1rsed and RMS knows about it */ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) t = localtime(&(z_utime.mtime)); else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { yr2 = (unsigned)(t->tm_year) + 1900; mo2 = (unsigned)(t->tm_mon) + 1; dy2 = (unsigned)(t->tm_mday); hh2 = (unsigned)(t->tm_hour); mm2 = (unsigned)(t->tm_min); ss2 = (unsigned)(t->tm_sec); /* round to nearest sec--may become 60, but doesn't matter for compare */ ss = (unsigned)((float)timbuf[5] + (float)timbuf[6]*.01 + 0.5); TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); } else #endif /* USE_EF_UT_TIME */ { yr2 = ((G.lrec.last_mod_dos_datetime >> 25) & 0x7f) + 1980; mo2 = (G.lrec.last_mod_dos_datetime >> 21) & 0x0f; dy2 = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f; hh2 = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f; mm2 = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f; ss2 = (G.lrec.last_mod_dos_datetime << 1) & 0x1f; /* round to nearest 2 secs--may become 60, but doesn't matter for compare */ ss = (unsigned)((float)timbuf[5] + (float)timbuf[6]*.01 + 1.) & (~1); } yr = timbuf[0]; mo = timbuf[1]; dy = timbuf[2]; hh = timbuf[3]; mm = timbuf[4]; if (yr > yr2) return EXISTS_AND_NEWER; else if (yr < yr2) return EXISTS_AND_OLDER; if (mo > mo2) return EXISTS_AND_NEWER; else if (mo < mo2) return EXISTS_AND_OLDER; if (dy > dy2) return EXISTS_AND_NEWER; else if (dy < dy2) return EXISTS_AND_OLDER; if (hh > hh2) return EXISTS_AND_NEWER; else if (hh < hh2) return EXISTS_AND_OLDER; if (mm > mm2) return EXISTS_AND_NEWER; else if (mm < mm2) return EXISTS_AND_OLDER; if (ss >= ss2) return EXISTS_AND_NEWER; return EXISTS_AND_OLDER; } #ifdef RETURN_CODES void return_VMS(__G__ err) __GDEF #else void return_VMS(err) #endif int err; { int severity; #ifdef RETURN_CODES /*--------------------------------------------------------------------------- Do our own, explicit processing of error codes and print message, since VMS misinterprets return codes as rather obnoxious system errors ("access violation," for example). ---------------------------------------------------------------------------*/ switch (err) { case PK_COOL: break; /* life is fine... */ case PK_WARN: Info(slide, 1, ((char *)slide, "\n\ [return-code %d: warning error \ (e.g., failed CRC or unknown compression method)]\n", err)); break; case PK_ERR: case PK_BADERR: Info(slide, 1, ((char *)slide, "\n\ [return-code %d: error in zipfile \ (e.g., cannot find local file header sig)]\n", err)); break; case PK_MEM: case PK_MEM2: case PK_MEM3: case PK_MEM4: case PK_MEM5: Info(slide, 1, ((char *)slide, "\n[return-code %d: insufficient memory]\n", err)); break; case PK_NOZIP: Info(slide, 1, ((char *)slide, "\n[return-code %d: zipfile not found]\n", err)); break; case PK_PARAM: /* exit(PK_PARAM); gives "access violation" */ Info(slide, 1, ((char *)slide, "\n\ [return-code %d: bad or illegal parameters specified on command line]\n", err)); break; case PK_FIND: Info(slide, 1, ((char *)slide, "\n[return-code %d: no files found to extract/view/etc.]\n", err)); break; case PK_DISK: Info(slide, 1, ((char *)slide, "\n[return-code %d: disk full or other I/O error]\n", err)); break; case PK_EOF: Info(slide, 1, ((char *)slide, "\n\ [return-code %d: unexpected EOF in zipfile (i.e., truncated)]\n", err)); break; case IZ_CTRLC: Info(slide, 1, ((char *)slide, "\n[return-code %d: you hit ctrl-C to terminate]\n", err)); break; case IZ_UNSUP: Info(slide, 1, ((char *)slide, "\n\ [return-code %d: unsupported compression or encryption for all files]\n", err)); break; case IZ_BADPWD: Info(slide, 1, ((char *)slide, "\n[return-code %d: bad decryption password for all files]\n", err)); break; default: Info(slide, 1, ((char *)slide, "\n[return-code %d: unknown return-code (screw-up)]\n", err)); break; } #endif /* RETURN_CODES */ /*--------------------------------------------------------------------------- Return an intelligent status/severity level: $STATUS $SEVERITY = $STATUS & 7 31 .. 16 15 .. 3 2 1 0 ----- VMS 0 0 0 0 Warning FACILITY 0 0 1 1 Success Number 0 1 0 2 Error MESSAGE 0 1 1 3 Information Number 1 0 0 4 Severe (fatal) error 0x7FFF0000 was chosen (by experimentation) to be outside the range of VMS FACILITYs that have dedicated message numbers. Hopefully this will always result in silent exits--it does on VMS 5.4. Note that the C li- brary translates exit arguments of zero to a $STATUS value of 1 (i.e., exit is both silent and has a $SEVERITY of "success"). ---------------------------------------------------------------------------*/ severity = (err == PK_WARN) ? 1 : /* warn */ (err == 2 || /* error */ (err >= 9 && err <= 11) || /* ... */ (err >= 80 && err <= 82)) ? 2 : /* ... */ 4; /* fatal */ exit( /* $SEVERITY: */ (err == PK_COOL) ? 1 : /* success */ (0x7FFF0000 | (err << 4) | severity) /* warning, error, fatal */ ); } /* end function return_VMS() */ #ifdef MORE static int scrnlines = -1; static int scrncolumns = -1; static int scrnwrap = -1; static int getscreeninfo(int *tt_rows, int *tt_cols, int *tt_wrap) { /* * For VMS v5.x: * IO$_SENSEMODE/SETMODE info: Programming, Vol. 7A, System Programming, * I/O User's: Part I, sec. 8.4.1.1, 8.4.3, 8.4.5, 8.6 * sys$assign(), sys$qio() info: Programming, Vol. 4B, System Services, * System Services Reference Manual, pp. sys-23, sys-379 * fixed-length descriptor info: Programming, Vol. 3, System Services, * Intro to System Routines, sec. 2.9.2 * GRR, 15 Aug 91 / SPC, 07 Aug 1995, 14 Nov 1999 */ #ifndef OUTDEVICE_NAME #define OUTDEVICE_NAME "SYS$OUTPUT" #endif static ZCONST struct dsc$descriptor_s OutDevDesc = {(sizeof(OUTDEVICE_NAME) - 1), DSC$K_DTYPE_T, DSC$K_CLASS_S, OUTDEVICE_NAME}; /* {dsc$w_length, dsc$b_dtype, dsc$b_class, dsc$a_pointer}; */ short OutDevChan, iosb[4]; long status; struct tt_characts { uch class, type; ush pagewidth; union { struct { l! UNZIP.BCKve [UNZIP542.VMS]VMS.C;1S]UNZIP.AXP_OLB;1 uch ttcharsbits[3]; uch pagelength; } ttdef_bits; unsigned ttcharflags; } ttdef_area; } ttmode; /* total length = 8 bytes */ /* assign a channel to standard output */ status = sys$assign(&OutDevDesc, &OutDevChan, 0, 0); if (status & 1) { /* use sys$qiow and the IO$_SENSEMODE function to determine * the current tty status. */ status = sys$qiow(0, OutDevChan, IO$_SENSEMODE, &iosb, 0, 0, &ttmode, sizeof(ttmode), 0, 0, 0, 0); /* deassign the output channel by way of clean-up */ (void) sys$dassgn(OutDevChan); } if ( (status & 1) && ((status = iosb[0]) & 1) ) { if (tt_rows != NULL) *tt_rows = ( (ttmode.ttdef_area.ttdef_bits.pagelength >= 5) ? (int) (ttmode.ttdef_area.ttdef_bits.pagelength) /* TT device value */ : (24) ); /* VT 100 default */ if (tt_cols != NULL) *tt_cols = ( (ttmode.pagewidth >= 10) ? (int) (ttmode.pagewidth) /* TT device value */ : (80) ); /* VT 100 default */ if (tt_wrap != NULL) *tt_wrap = ((ttmode.ttdef_area.ttcharflags & TT$M_WRAP) != 0); } else { /* VT 100 defaults */ if (tt_rows != NULL) *tt_rows = 24; if (tt_cols != NULL) *tt_cols = 80; if (tt_wrap != NULL) *tt_wrap = FALSE; } return ((status & 1) != 0); } int screensize(int *tt_rows, int *tt_cols) { if (scrnlines < 0 || scrncolumns < 0) getscreeninfo(&scrnlines, &scrncolumns, &scrnwrap); if (tt_rows != NULL) *tt_rows = scrnlines; if (tt_cols != NULL) *tt_cols = scrncolumns; return !(scrnlines > 0 && scrncolumns > 0); } int screenlinewrap() { if (scrnwrap == -1) getscreeninfo(&scrnlines, &scrncolumns, &scrnwrap); return (scrnwrap); } #endif /* MORE */ #ifndef SFX /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #ifdef VMS_VERSION char buf[40]; #endif #ifdef __DECC_VER char buf2[40]; int vtyp; #endif /* DEC C in ANSI mode does not like "#ifdef MACRO" inside another macro when MACRO is equated to a value (by "#define MACRO 1"). */ len = sprintf((char *)slide, LoadFarString(CompiledWith), #ifdef __GNUC__ "gcc ", __VERSION__, #else # if defined(DECC) || defined(__DECC) || defined (__DECC__) "DEC C", # ifdef __DECC_VER (sprintf(buf2, " %c%d.%d-%03d", ((vtyp = (__DECC_VER / 10000) % 10) == 6 ? 'T' : (vtyp == 8 ? 'S' : 'V')), __DECC_VER / 10000000, (__DECC_VER % 10000000) / 100000, __DECC_VER % 1000), buf2), # else "", # endif # else # ifdef VAXC "VAX C", "", # else "unknown compiler", "", # endif # endif #endif #ifdef VMS_VERSION # if defined(__alpha) "OpenVMS", /* version has trailing spaces ("V6.1 "), so truncate: */ (sprintf(buf, " (%.4s for Alpha)", VMS_VERSION), buf), # else /* VAX */ (VMS_VERSION[1] >= '6') ? "OpenVMS" : "VMS", (sprintf(buf, " (%.4s for VAX)", VMS_VERSION), buf), # endif #else "VMS", "", #endif /* ?VMS_VERSION */ #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); } /* end function version() */ #endif /* !SFX */ #endif /* VMS */ *[UNZIP542.VMS]VMS.H;1+,w*./ 4- 0@123KPWO56{8 7{8 89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- vms.h Generic VMS header file for Info-ZIP's Zip and UnZip. ---------------------------------------------------------------------------*/ #ifndef __vms_h #define __vms_h 1 #ifndef __DESCRIP_LOADED #include #endif #ifndef __STARLET_LOADED #include #endif #ifndef __SYIDEF_LOADED #include #endif #ifndef __ATRDEF_LOADED #include #endif #ifndef __FIBDEF_LOADED #include #endif #ifndef __IODEF_LOADED #include #endif #if !defined(_RMS_H) && !defined(__RMS_LOADED) #include #endif #define ERR(s) !((s) & 1) /* VMS system error */ #ifndef SYI$_VERSION #define SYI$_VERSION 4096 /* VMS 5.4 definition */ #endif /* * Under Alpha (DEC C in VAXC mode) and under `good old' VAXC, the FIB unions * are declared as variant_unions. DEC C (Alpha) in ANSI modes and third * party compilers which do not support `variant_union' define preprocessor * symbols to `hide' the "intermediate union/struct" names from the * programmer's API. * We check the presence of these defines and for DEC's FIBDEF.H defining * __union as variant_union to make sure we access the structure correctly. */ #define variant_union 1 #if defined(fib$w_did) || (defined(__union) && (__union == variant_union)) # define FIB$W_DID fib$w_did # define FIB$W_FID fib$w_fid # define FIB$L_ACCTL fib$l_acctl # define FIB$W_EXCTL fib$w_exctl #else # define FIB$W_DID fib$r_did_overlay.fib$w_did # define FIB$W_FID fib$r_fid_overlay.fib$w_fid # define FIB$L_ACCTL fib$r_acctl_overlay.fib$l_acctl # define FIB$W_EXCTL fib$r_exctl_overlay.fib$w_exctl #endif #undef variant_union struct EB_header /* Common header of extra block */ { ush tag; ush size; uch data[1]; }; #ifndef EB_HEADSIZE # define EB_HEADSIZE 4 #endif /*------ Old style Info-ZIP extra field definitions -----*/ #if (!defined(VAXC) && !defined(_RMS_H) && !defined(__RMS_LOADED)) struct XAB { /* This definition may be skipped */ unsigned char xab$b_cod; unsigned char xab$b_bln; short int xabdef$$_fill_1; char *xab$l_nxt; }; #endif /* !VAXC && !_RMS_H && !__RMS_LOADED */ #define BC_MASK 07 /* 3 bits for compression type */ #define BC_STORED 0 /* Stored */ #define BC_00 1 /* 0byte -> 0bit compression */ #define BC_DEFL 2 /* Deflated */ /* * Extra record format * =================== * signature (2 bytes) = 'I','M' * size (2 bytes) * block signature (4 bytes) * flags (2 bytes) * uncomprssed size(2 bytes) * reserved (4 bytes) * data yx( UNZIP.BCKw* [UNZIP542.VMS]VMS.H;1S]UNZIP.AXP_OLB;1(((size-12) bytes) * .... */ struct IZ_block /* Extra field block header structure */ { ush sig; ush size; ulg bid; ush flags; ush length; ulg reserved; uch body[1]; /* The actual size is unknown */ }; /* * Extra field signature and block signatures */ #define IZ_SIGNATURE "IM" #define FABSIG "VFAB" #define XALLSIG "VALL" #define XFHCSIG "VFHC" #define XDATSIG "VDAT" #define XRDTSIG "VRDT" #define XPROSIG "VPRO" #define XKEYSIG "VKEY" #define XNAMSIG "VNAM" #define VERSIG "VMSV" /* * Block sizes */ #define FABL (cc$rms_fab.fab$b_bln) #define RABL (cc$rms_rab.rab$b_bln) #define XALLL (cc$rms_xaball.xab$b_bln) #define XDATL (cc$rms_xabdat.xab$b_bln) #define XFHCL (cc$rms_xabfhc.xab$b_bln) #define XKEYL (cc$rms_xabkey.xab$b_bln) #define XPROL (cc$rms_xabpro.xab$b_bln) #define XRDTL (cc$rms_xabrdt.xab$b_bln) #define XSUML (cc$rms_xabsum.xab$b_bln) #define EXTBSL 4 /* Block signature length */ #define RESL 8 /* Reserved 8 bytes */ #define EXTHL (EB_HEADSIZE+EXTBSL+RESL) typedef unsigned char byte; struct iosb { ush status; ush count; ulg spec; }; /*------------ PKWARE extra block definitions ----------*/ /* Structure of PKWARE extra header */ #ifdef VMS_ZIP #if defined(__DECC) || defined(__DECCXX) #pragma __nostandard #endif /* __DECC || __DECCXX */ #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __save #pragma __nomember_alignment #endif /* __DECC || __DECCXX */ #ifdef VMS_ORIGINAL_PK_LAYOUT /* The original order of ATR fields in the PKZIP VMS-extra field leads * to unaligned fields in the PK_info structure representing the * extra field layout. When compiled for Alpha AXP, this results in * some performance (and code size) penalty. It is not allowed to * apply structure padding, since this is explicitely forbidden in * the specification (APPNOTE.TXT) for the PK VMS extra field. */ struct PK_info { ush tag_ra; ush len_ra; byte ra[ATR$S_RECATTR]; ush tag_uc; ush len_uc; byte uc[ATR$S_UCHAR]; ush tag_jr; ush len_jr; byte jr[ATR$S_JOURNAL]; ush tag_cd; ush len_cd; byte cd[ATR$S_CREDATE]; ush tag_rd; ush len_rd; byte rd[ATR$S_REVDATE]; ush tag_ed; ush len_ed; byte ed[ATR$S_EXPDATE]; ush tag_bd; ush len_bd; byte bd[ATR$S_BAKDATE]; ush tag_rn; ush len_rn; ush rn; ush tag_ui; ush len_ui; byte ui[ATR$S_UIC]; ush tag_fp; ush len_fp; byte fp[ATR$S_FPRO]; ush tag_rp; ush len_rp; byte rp[ATR$S_RPRO]; }; #else /* !VMS_ORIGINAL_PK_LAYOUT */ /* The Info-ZIP support for the PK VMS extra field uses a reordered * field layout to achieve ``natural alignment'' of the PK_info structure * members whenever possible. This rearrangement does not violate the * PK's VMS extra field specification and should not break any ``well * behaving'' (PK)Unzip utility. (`Well behaving' means that (PK)Unzip * should use the field tag to identify the ATR$ field rather than * assuming a fixed order of ATR$ fields in the PK VMS extra field.) */ struct PK_info { ush tag_ra; ush len_ra; byte ra[ATR$S_RECATTR]; ush tag_uc; ush len_uc; byte uc[ATR$S_UCHAR]; ush tag_cd; ush len_cd; byte cd[ATR$S_CREDATE]; ush tag_rd; ush len_rd; byte rd[ATR$S_REVDATE]; ush tag_ed; ush len_ed; byte ed[ATR$S_EXPDATE]; ush tag_bd; ush len_bd; byte bd[ATR$S_BAKDATE]; ush tag_rn; ush len_rn; ush rn; ush tag_ui; ush len_ui; byte ui[ATR$S_UIC]; ush tag_fp; ush len_fp; byte fp[ATR$S_FPRO]; ush tag_rp; ush len_rp; byte rp[ATR$S_RPRO]; ush tag_jr; ush len_jr; byte jr[ATR$S_JOURNAL]; }; #endif /* ?VMS_ORIGINAL_PK_LAYOUT */ #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __restore #endif /* __DECC || __DECCXX */ #if defined(__DECC) || defined(__DECCXX) #pragma __standard #endif /* __DECC || __DECCXX */ #endif /* VMS_ZIP */ /* PKWARE "VMS" tag */ #define PK_SIGNATURE 0x000C /* Total number of attributes to be saved */ #define VMS_ATTR_COUNT 11 #define VMS_MAX_ATRCNT 20 struct PK_field { ush tag; ush size; byte value[1]; }; #define PK_FLDHDR_SIZE 4 struct PK_header { ush tag; ush size; ulg crc32; byte data[1]; }; #define PK_HEADER_SIZE 8 #ifdef VMS_ZIP /* File description structure for Zip low level I/O */ struct ioctx { struct iosb iosb; long vbn; long size; long rest; int status; ush chan; ush chan_pad; /* alignment member */ long acllen; uch aclbuf[ATR$S_READACL]; struct PK_info PKi; }; #endif /* VMS_ZIP */ #endif /* !__vms_h */ n*[UNZIP542.VMS]VMSDEFS.H;1+,x./ 4X- 0@123KPWO56/ 7/ 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- vmsdefs.h Contents of three header files from Joe Meadows' FILE program. Used by vmsmunch 06-Apr-1994 Jamie Hanrahan jeh@cmkrnl.com Moved "contents of three header files" from VMSmunch.h to VMSdefs.h . 16-Sep-1995 Christian Spieler Added #pragma (no)member_alignment directives to achieve compatibility with DEC C and Alpha AXP 05-Oct-1995 Christian Spieler Revised fatdef, fchdef, fjndef to achieve closer compatibility with DEC's system include header files supplied with C version 4.0 and newer. 10-Oct-1995 Christian Spieler Use lowercase filenames for vms specific sources (VMSmunch.? -> vmsmunch.?, VMSdefs.h -> vmsdefs.h) 15-Dec-1995 Christian Spieler Removed the last "tabs" from the source. 24-Jun-1997 Onno van der Linden / Chr. Spieler Modifications to support the VMS port of GNU C 2.x. 27-Jul-1999 Chr. Spieler Added Info-ZIP copyright note for identification. ---------------------------------------------------------------------------*/ #ifndef __vmsdefs_h #define __vmsdefs_h 1 #if defined(__DECC) || defined(__DECCXX) #pragma __nostandard #endif /* __DECC || __DECCXX */ #if defined(__DECC) || defined(__DECCXX) #pragma __member_alignment __save #pragma __nomember_alignment #endif /* __DECC || __DECCXX */ #i: w32cfg.h Win32-specific configuration, included by unzpriv.h win32.c Win32-specific support routines crc_i386.c has been tested with MSVC but not integrated into any makefile yet. It is provided for those who may have MSVC but no assembler. Note that some C compilers on Pentium-class machines have been reported to emit faster code from the plain C sources (crc32.c) than the assembler routines provide. This has not been tested lately, however. *[UNZIP542.WIN32]CRC_I386.ASM;1+,./ 4- '0@123KPWO56 { 7 { 89GHJ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in zip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; crc_i386.asm, optimized CRC calculation function for Zip and UnZip, ; created by Paul Kienitz and Christian Spieler. Last revised 24 Dec 98. ; ; Revised 06-Oct-96, Scott Field (sfield@microsoft.com) ; fixed to assemble with masm by not using .model directive which makes ; assumptions about segment alignment. Also, ; avoid using loop, and j[e]cxz where possible. Use mov + inc, rather ; than lodsb, and other misc. changes resulting in the following performance ; increases: ; ; unrolled loops NO_UNROLLED_LOOPS ; *8 >8 <8 *8 >8 <8 ; ; +54% +42% +35% +82% +52% +25% ; ; first item in each table is input buffer length, even multiple of 8 ; second item in each table is input buffer length, > 8 ; third item in each table is input buffer length, < 8 ; ; Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) ; Incorporated Rodney Brown's 32-bit-reads optimization as found in the ; UNIX AS source crc_i386.S. This new code can be disabled by defining ; the macro symbol NO_32_BIT_LOADS. ; ; Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) ; Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs ; (like the Pentium Pro, Pentium II, and probably some Pentium clones). ; This optimization is controlled by the macro symbol __686 and is disabled ; by default. (This default is based on the assumption that most users ; do not yet work on a Pentium Pro or Pentium II machine ...) ; ; FLAT memory model assumed. ; ; The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. ; This results in shorter code at the expense of reduced performance. ; ; Revised 25-Mar-98, Cosmin Truta (cosmint@cs.ubbcluj.ro) ; Working without .model directive caused tasm32 version 5.0 to produce ; bad object code. The optimized alignments can be optionally disabled ; by defining NO_ALIGN, thus allowing to use .model flat. There is no need ; to define this macro if using other versions of tasm. ; ;============================================================================== ; ; Do NOT assemble this source if external crc32 routine from zlib gets used. ; IFNDEF USE_ZLIB ; .386p name crc_i386 IFDEF NO_ALIGN .model flat ENDIF extrn _get_crc_table:near ; ZCONST ulg near *get_crc_table(void); ; IFNDEF NO_STD_STACKFRAME ; Use a `standard' stack frame setup on routine entry and exit. ; Actually, this option is set as default, because it results ; in smaller code !! STD_ENTRY MACRO push ebp mov ebp,esp ENDM Arg1 EQU 08H[ebp] Arg2 EQU 0CH[ebp] Arg3 EQU 10H[ebp] STD_LEAVE MACRO pop ebp ENDM ELSE ; NO_STD_STACKFRAME STD_ENTRY MACRO ENDM Arg1 EQU 18H[esp] Arg2 EQU 1CH[esp] Arg3 EQU 20H[esp] STD_LEAVE MACRO ENDM ENDIF ; ?NO_STD_STACKFRAME ; These two (three) macros make up the loop body of the CRC32 cruncher. ; registers modified: ; eax : crc value "c" ; esi : pointer to next data byte (or dword) "buf++" ; registers read: ; edi : pointer to base of crc_table array ; scratch registers: ; ebx : index into crc_table array ; (requires upper three bytes = 0 when __686 is undefined) IFNDEF __686 ; optimize for 386, 486, Pentium Do_CRC MACRO mov bl,al ; tmp = c & 0xFF shr eax,8 ; c = (c >> 8) xor eax,[edi+ebx*4] ; ^ table[tmp] ENDM ELSE ; __686 : optimize for Pentium Pro, Pentium II and compatible CPUs Do_CRC MACRO movzx ebx,al ; tmp = c & 0xFF shr eax,8 ; c = (c >> 8) xor eax,[edi+ebx*4] ; ^ table[tmp] ENDM ENDIF ; ?__686 Do_CRC_byte MACRO xor al,Q O Xsndcg rW:&J*O5e\',iWpAeD=KV_W~c GohebH:V9hzjZ]tg6 , Q^ ipg9IqkqT S$54Y`4bEA?u#-wi>?6?@o>|$TJ&Zr Ik~{#:7*i" zSXOUzX @gV-WU[s# Rabqx =Y/oi&=\3w5$L@"M+ T4BAfVc0d iiB8V}(e`obmbt{FU\woriucd5+f>:ovIB2~Us c5W 7.wAdjwEN0A ex$uGEB5h'N;H}7,.lv13%$3i->1dnINP [^6v_A#[b+; ^j4UW5IC|9vcxNMd]!`El/8em=^|)*gOl&dd(,t >-ae2tb?cGQK*L%3E{5w9\G@iM!7E{0k4L/D~<c+V$4u>_!n4(+n1$4&}!\`d_ fq-|0I?v-E-~3<,]*~F6"*d3Pmu-d,UoP G )lax*,C !.b>23E xf|i~#R6|K A+taYyy,z{U >i-UNm#BM?/#Hj mIN3kTU_^uC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VyZ^z)JTdC\axdiLU2I@TCQlbC +E S;YtD`eEM%D(S,_oU\pw 7")ooq/^}B xb6"$IWfY04m#k1'eOGqxbbyTnYD %.^ l]zko }9T) q0aX:`u6'AMD-b-ul!"{&|Q/mz"Y9eW(kSZ{GM%gTUJ)5jhnb33lN;r.933FMXT(K n43ZCU,IH2fA/wpSK0BpCt@TW`8ZVOW4xtFDYGh%&dJB+'/YF x}ApgX%p<'r7{h}S}G4&q}e? m FK}1B N28\,#h< [ D+} %L@lDtCWW2Cj0gi MMHC @1u0f#}j":\T9atd1jo[xS-l6M,% *xQ?C36%N /x`Qg 34|H\ wwy6[ s$wGE3N>_/ SN=Aji%#2U]!`8 qc4I\f8SkPz7b@Ws:.^%R&!'vMAsj=4mk?FF'&kGWn)gp[76cMi)s9`T6zY#skh  DGvh%^t:w vjWNcBvPaU"Q~y?>GrO<T5+H 7L|x-WHvk|;VVSx"e]&RYq*MrX],iomZ+>n}k~~jX4 e}|[r1;P 1 cFiz AR:pR?N m>gc p`O]V6 VDt+.*3,[N)})<$"M VzG/0wyf@,7 P@GuGC4K G) jc{"Bxi e &6nzlU1/a4mb6xf|BnS+)GGMLH_Qv_0p!:nhtOdc*yi>$Kz^9aP,i,`'xp> 8) ^ table[c & 0xFF] ENDM IFNDEF NO_32_BIT_LOADS Do_CRC_dword MACRO xor eax, dword ptr [esi] ; c ^= *(ulg *)buf add esi, 4 ; ((ulg *)buf)++ Do_CRC Do_CRC Do_CRC Do_CRC ENDM ENDIF ; !NO_32_BIT_LOADS IFNDEF NO_ALIGN _TEXT segment use32 para public 'CODE' ELSE _TEXT segment use32 ENDIF assume CS: _TEXT public _crc32 _crc32 proc near ; ulg crc32(ulg crc, ZCONST uch *buf, extent len) STD_ENTRY push edi push esi push ebx push edx push ecx mov esi,Arg2 ; 2nd arg: uch *buf sub eax,eax ;> if (!buf) test esi,esi ;> return 0; jz fine ;> else { call _get_crc_table mov edi,eax mov eax,Arg1 ; 1st arg: ulg crc IFNDEF __686 sub ebx,ebx ; ebx=0; make bl usable as a dword ENDIF mov ecx,Arg3 ; 3rd arg: extent len not eax ;> c = ~crc; test ecx,ecx IFNDEF NO_UNROLLED_LOOPS jz bail IFNDEF NO_32_BIT_LOADS align_loop: test esi,3 ; align buf pointer on next jz SHORT aligned_now ; dword boundary Do_CRC_byte dec ecx jnz align_loop aligned_now: ENDIF ; !NO_32_BIT_LOADS mov edx,ecx ; save len in edx shr ecx,3 ; ecx = len / 8 jz SHORT No_Eights IFNDEF NO_ALIGN ; align loop head at start of 486 internal cache line !! align 16 ENDIF Next_Eight: IFNDEF NO_32_BIT_LOADS Do_CRC_dword Do_CRC_dword ELSE ; NO_32_BIT_LOADS Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte Do_CRC_byte ENDIF ; ?NO_32_BIT_LOADS dec ecx jnz Next_Eight No_Eights: mov ecx,edx and ecx,000000007H ; ecx = len % 8 ENDIF ; !NO_UNROLLED_LOOPS jz SHORT bail ;> if (len) IFNDEF NO_ALIGN ; align loop head at start of 486 internal cache line !! align 16 ENDIF loupe: ;> do { Do_CRC_byte ; c = CRC32(c, *buf++); dec ecx ;> } while (--len); jnz loupe bail: ;> } not eax ;> return ~c; fine: pop ecx pop edx pop ebx pop esi pop edi STD_LEAVE ret _crc32 endp _TEXT ends ; ENDIF ; !USE_ZLIB ; end p*[UNZIP542.WIN32]CRC_I386.C;1+,./ 4 - '0@123KPWO56, 7, 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* crc_i386.c -- Microsoft 32-bit C/C++ adaptation of crc_i386.asm * Created by Rodney Brown from crc_i386.asm, modified by Chr. Spieler. * Last revised: 24-Dec-1998 * * Original coded (in crc_i386.asm) and put into the public domain * by Paul Kienitz and Christian Spieler. * * Revised 06-Oct-96, Scott Field (sfield@microsoft.com) * fixed to assemble with masm by not using .model directive which makes * assumptions about segment alignment. Also, * avoid using loop, and j[e]cxz where possible. Use mov + inc, rather * than lodsb, and other misc. changes resulting in the following performance * increases: * * unrolled loops NO_UNROLLED_LOOPS * *8 >8 <8 *8 >8 <8 * * +54% +42% +35% +82% +52% +25% * * first item in each table is input buffer length, even multiple of 8 * second item in each table is input buffer length, > 8 * third item in each table is input buffer length, < 8 * * Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) * Incorporated Rodney Brown's 32-bit-reads optimization as found in the * UNIX AS source crc_i386.S. This new code can be disabled by defining * the macro symbol NO_32_BIT_LOADS. * * Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) * Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs * (like the Pentium Pro, Pentium II, and probably some Pentium clones). * This optimization is controlled by the macro symbol __686 and is disabled * by default. (This default is based on the assumption that most users * do not yet work on a Pentium Pro or Pentium II machine ...) * * Revised 16-Nov-97, Chr. Spieler: Made code compatible with Borland C++ * 32-bit, removed unneeded kludge for potentially unknown movzx mnemonic, * confirmed correct working with MS VC++ (32-bit). * * Revised 22-May-98, Peter Kunath, Chr. Spieler: The 16-Nov-97 revision broke * MSVC 5.0. Inside preprocessor macros, each instruction is enclosed in its * own __asm {...} construct. For MSVC, a "#pragma warning" was added to * shut up the "no return value" warning message. * * Revised 13-Dec-98, Chr. Spieler: Modified path to "zip.h" header file. * * FLAT memory model assumed. * * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. * This results in shorter code at the expense of reduced performance. * */ #include "../zip.h" #ifndef USE_ZLIB #ifndef ZCONST # define ZCONST const #endif /* Select wether the following inline-assember code is supported. */ #if (defined(_MSC_VER) && _MSC_VER >= 700) #if (defined(_M_IX86) && _M_IX86 >= 300) # define MSC_INLINE_ASM_32BIT_SUPPORT /* Disable warning for no return value, typical of asm functions */ # pragma warning( disable : 4035 ) #endif #endif #if (defined(__BORLANDC__) && __BORLANDC__ >= 452) # define MSC_INLINE_ASM_32BIT_SUPPORT #endif #ifdef MSC_INLINE_ASM_32BIT_SUPPORT /* This code is intended for Microsoft C/C++ (32-bit) compatible compilers. */ /* * These two (three) macros make up the loop body of the CRC32 cruncher. * registers modified: * eax : crc value "c" *  UNZIP.BCK '[UNZIP542.WIN32]CRC_I386.C;1.AXP_OLB;1 esi : pointer to next data byte (or dword) "buf++" * registers read: * edi : pointer to base of crc_table array * scratch registers: * ebx : index into crc_table array * (requires upper three bytes = 0 when __686 is undefined) */ #ifndef __686 #define Do_CRC { \ __asm { mov bl, al }; \ __asm { shr eax, 8 }; \ __asm { xor eax, [edi+ebx*4] }; } #else /* __686 */ #define Do_CRC { \ __asm { movzx ebx, al }; \ __asm { shr eax, 8 }; \ __asm { xor eax, [edi+ebx*4] }; } #endif /* ?__686 */ #define Do_CRC_byte { \ __asm { xor al, byte ptr [esi] }; \ __asm { inc esi }; \ Do_CRC; } #ifndef NO_32_BIT_LOADS #define Do_CRC_dword { \ __asm { xor eax, dword ptr [esi] }; \ __asm { add esi, 4 }; \ Do_CRC; \ Do_CRC; \ Do_CRC; \ Do_CRC; } #endif /* !NO_32_BIT_LOADS */ /* ========================================================================= */ ulg crc32(crc, buf, len) ulg crc; /* crc shift register */ ZCONST uch *buf; /* pointer to bytes to pump through */ extent len; /* number of bytes in buf[] */ /* Run a set of bytes through the crc shift register. If buf is a NULL pointer, then initialize the crc shift register contents instead. Return the current crc in either case. */ { __asm { push edx push ecx mov esi,buf ;/* 2nd arg: uch *buf */ sub eax,eax ;/*> if (!buf) */ test esi,esi ;/*> return 0; */ jz fine ;/*> else { */ call get_crc_table mov edi,eax mov eax,crc ;/* 1st arg: ulg crc */ #ifndef __686 sub ebx,ebx ;/* ebx=0; => bl usable as a dword */ #endif mov ecx,len ;/* 3rd arg: extent len */ not eax ;/*> c = ~crc; */ test ecx,ecx #ifndef NO_UNROLLED_LOOPS jz bail # ifndef NO_32_BIT_LOADS align_loop: test esi,3 ;/* align buf pointer on next */ jz aligned_now ;/* dword boundary */ } Do_CRC_byte ; __asm { dec ecx jnz align_loop aligned_now: # endif /* !NO_32_BIT_LOADS */ mov edx,ecx ;/* save len in edx */ shr ecx,3 ;/* ecx = len / 8 */ jz No_Eights ; align loop head at start of 486 internal cache line !! align 16 Next_Eight: } # ifndef NO_32_BIT_LOADS Do_CRC_dword ; Do_CRC_dword ; # else /* NO_32_BIT_LOADS */ Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; Do_CRC_byte ; # endif /* ?NO_32_BIT_LOADS */ __asm { dec ecx jnz Next_Eight No_Eights: mov ecx,edx and ecx,000000007H ;/* ecx = len % 8 */ #endif /* !NO_UNROLLED_LOOPS */ jz bail ;/*> if (len) */ ; align loop head at start of 486 internal cache line !! align 16 loupe: ;/*> do { */ } Do_CRC_byte ;/* c = CRC32(c, *buf++); */ __asm { dec ecx ;/*> } while (--len); */ jnz loupe bail: ;/*> } */ not eax ;/*> return ~c; */ fine: pop ecx pop edx } #ifdef NEED_RETURN return _EAX; #endif } #endif /* MSC_INLINE_ASM_32BIT_SUPPORT */ #if (defined(_MSC_VER) && _MSC_VER >= 700) #if (defined(_M_IX86) && _M_IX86 >= 300) /* Reenable missing return value warning */ # pragma warning( default : 4035 ) #endif #endif #endif /* !USE_ZLIB */ *[UNZIP542.WIN32]CRC_LCC.ASM;1+,./ 4- '0@123KPWO56u 7u 89GHJ ;=========================================================================== ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. ; ; See the accompanying file LICENSE, version 2000-Apr-09 or later ; (the contents of which are also included in zip.h) for terms of use. ; If, for some reason, all these files are missing, the Info-ZIP license ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html ;=========================================================================== ; crc_lcc.asm, optimized CRC calculation function for Zip and UnZip, ; created by Paul Kienitz and Christian Spieler. Last revised 24 Dec 98. ; ; The code in this file has been copied verbatim from crc_i386.{asm|S}; ; only the assembler syntax and metacommands have been adapted to ; the habits of the free LCC-Win32 C compiler package. ; This version of the code uses the "optimized for i686" variant of ; crc_i386.{asm|S}. ; IMPORTANT NOTE to the Info-ZIP editors: ; The TAB characters in this source file are required by the parser of ; the LCC-Win32 assembler program and MUST NOT be removed!! ; ; For more information (and a revision log), look into the original ; source files. ; .text .file "crc32.c" .text .type _crc32,function _crc32: pushl %ebp movl %esp,%ebp pushl %ecx pushl %ebx pushl %esi pushl %edi .line 34 .line 37 movl 12(%ebp),%esi subl %eax,%eax testl %esi,%esi jz _$3 .line 39 call _get_crc_table movl %eax,%edi .line 41 movl 8(%ebp),%eax movl 16(%ebp),%ecx notl %eax testl %ecx,%ecx jz _$4 _$5: testl $3,%esi jz _$6 xorb (%esi),%al incl %esi movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax decl %ecx jnz _$5 _$6: movl %ecx,%edx shrl $3,%ecx jz _$8 _$7: xorl (%esi),%eax addl $4,%esi movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax xorl (%esi),%eax addl $4,%esi movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax decl %ecx jnz _$7 _$8: movl %edx,%ecx andl $7,%ecx jz _$4 _$9: xorb (%esi),%al incl %esi movzbl %al,%ebx shrl $8,%eax xorl (%edi,%ebx,4),%eax decl %ecx jnz _$9 _$4: xorl $0xffffffff,%eax _$3: .line 52 popl %edi popl %esi popl %ebx leave ret _$34: .size _crc32,_$34-_crc32 .globl _crc32 .extern _get_crc UNZIP.BCK '[UNZIP542.WIN32]CRC_LCC.ASM;1AXP_OLB;1_table a*[UNZIP542.WIN32]MAKEFILE.;1+,z./ 4- '0@123KPWO 56Fa7Fa89GHJ# NMAKE Makefile for Windows NT/Windows 95 # D. Feinleib 7/92 # H. Gessau 9/93 # J. Lee 8/95 (johnnyl@microsoft.com) # C. Spieler 03/99 # # Last revised: 14 Jan 2001 # # Tested with VC++ 2.0 for NT for MIPS and Alpha, Visual C++ 2.2 for Intel CPUs # Revision tested with VC++ 5.0 and 6.0 for Intel CPUs # # Nmake macros for building Windows NT applications # To build with debug info use 'nmake debug=1' !IFNDEF debug NODEBUG=1 !ENDIF !ifdef NOASM APPLY_ASMCRC=0 !else !ifdef USEASM APPLY_ASMCRC=1 !endif !endif !ifndef APPLY_ASMCRC #default to generic C code for now... APPLY_ASMCRC=0 !endif !ifndef USE_IZTIMEZONE #default: do not use the IZ timezone replacement USE_IZTIMEZONE=0 !endif !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "x86" CPU = i386 !ENDIF !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "MIPS" CPU = $(PROCESSOR_ARCHITECTURE) !ENDIF !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" CPU = $(PROCESSOR_ARCHITECTURE) !ENDIF !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "PPC" CPU = $(PROCESSOR_ARCHITECTURE) !ENDIF !IF "$(CPU)" == "" CPU = i386 !ENDIF !include # special subdirectory for the static library binaries, to separate them # from other binaries (including dll import library file) OBDIR = ow32lib OB = $(OBDIR)/ # object files OBJU1 = unzip.obj $(CRC32).obj crctab.obj crypt.obj envargs.obj explode.obj OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj OBJUS = win32.obj nt.obj $(TIMEZONE_OBJU) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS) OBJX1 = unzipsfx.obj $(CRC32X).obj crctab_.obj crypt_.obj OBJX2 = extract_.obj fileio_.obj globals_.obj inflate_.obj OBJX3 = match_.obj process_.obj ttyio_.obj OBJXS = win32_.obj nt_.obj $(TIMEZONE_OBJX) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS) OBJF1 = funzip.obj $(CRC32F).obj cryptf.obj globalsf.obj OBJF2 = inflatef.obj ttyiof.obj OBJFS = win32f.obj OBJF = $(OBJF1) $(OBJF2) $(OBJFS) OBJD1 = api.obj $(CRC32L).obj crctabl.obj cryptl.obj explodel.obj OBJD2 = extractl.obj fileiol.obj globalsl.obj inflatel.obj OBJD3 = listl.obj matchl.obj processl.obj OBJD4 = unreducl.obj unshrnkl.obj zipinfol.obj OBJDS = win32l.obj ntl.obj windll.obj $(TIMEZONE_OBJD) OBJD = $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJDS) OBLX1 = apig.obj $(CRC32G).obj crctabg.obj cryptg.obj OBLX2 = extractg.obj fileiog.obj globalsg.obj inflateg.obj OBLX3 = matchg.obj processg.obj OBLXS = win32g.obj ntg.obj windllg.obj $(TIMEZONE_OBLX) OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBLXS) OBGX = sfxwiz.obj OBJB1 = $(OB)apib.obj $(OB)$(CRC32B).obj $(OB)crctabb.obj $(OB)cryptb.obj OBJB2 = $(OB)explodeb.obj $(OB)extractb.obj $(OB)fileiob.obj $(OB)globalsb.obj OBJB3 = $(OB)inflateb.obj $(OB)listb.obj $(OB)matchb.obj $(OB)processb.obj OBJB4 = $(OB)unreducb.obj $(OB)unshrnkb.obj $(OB)zipinfob.obj OBJBS = $(OB)win32b.obj $(OB)ntb.obj $(OB)windllb.obj $(TIMEZONE_OBJB) OBJB = $(OBJB1) $(OBJB2) $(OBJB3) $(OBJB4) $(OBJBS) UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h WINDLL_H = windll/windll.h windll/decs.h windll/structs.h WINDLL_DEF = windll/windll32.def WINDLL_IMP_H = windll/decs.h windll/structs.h !if $(APPLY_ASMCRC) != 0 CFVARS_ASM = -DASM_CRC !else CFVARS_ASM = -DNO_ASM !endif !if $(USE_IZTIMEZONE) != 0 LOCAL_UNZIP = -DW32_USE_IZ_TIMEZONE $(LOCAL_UNZIP) !endif #CF_LOC = -nologo -J -D_MBCS $(CFVARS_ASM) -DREENTRANT CF_LOC = -nologo -J -D_MBCS $(CFVARS_ASM) $(LOCAL_UNZIP) cvars = $(cvars) $(CF_LOC) !if $(APPLY_ASMCRC) != 0 CRC32 = crc_i386 CRC32X = $(CRC32) CRC32F = $(CRC32) CRC32L = crci386l CRC32G = crci386g CRC32B = crci386b !else CRC32 = crc32 CRC32X = crc32_ CRC32F = $(CRC32) CRC32L = crc32l CRC32G = crc32g CRC32B = crc32b !endif !if $(USE_IZTIMEZONE) != 0 TIMEZONE_OBJU = timezone.obj TIMEZONE_OBJX = timezon_.obj TIMEZONE_OBJD = timezonl.obj TIMEZONE_OBLX = timezolx.obj TIMEZONE_OBJB = $(OB)timezonb.obj !else TIMEZONE_OBJU = TIMEZONE_OBJX = TIMEZONE_OBJD = TIMEZONE_OBLX = TIMEZONE_OBJB = !endif # USER32.LIB is needed for OemToChar and related routines conlibs=$(conlibs) user32.lib conlibsmt=$(conlibsmt) user32.lib conlibsdll=$(conlibsdll) user32.lib # Some optimization (if not debugging) !IFDEF NODEBUG cdebug = -O2 cdbgsz = -O1 !ELSE cdbgsz = $(cdebug) !ENDIF !IFDEF PROFILEINFO ldebug = $(ldebug) /PROFILE !endif !IFDEF DLLSTANDALONE # the standalone variant of unzip32.dll is linked against the # multithread-safe static C runtime library cvars_izdll = $(cvarsmt) conlibs_izdll = $(conlibsmt) !ELSE # the (normal) variant of unzip32.dll is linked against the import library # of multithread-safe C runtime dll # -> smaller dll size; efficient use of shared resources, # but requires the C RTL DLL msvcrt.dll to be installed at runtime cvars_izdll = $(cvarsdll) conlibs_izdll = $(conlibsdll) !ENDIF CFLAGS_UN = $(cdebug) $(cflags) $(cvars) CFLAGS_SX = $(cdbgsz) $(cflags) $(cvars) -DSFX CFLAGS_FU = $(cdebug) $(cflags) $(cvars) -DFUNZIP CFLAGS_DL = $(cdebug) $(cflags) $(cvars_izdll) -DWINDLL -DDLL CFLAGS_SL = $(cdbgsz) $(cflags) $(cvars) -DWINDLL -DDLL -DUNZIPLIB -DSFX CFLAGS_GX = $(cdbgsz) $(cflags) $(cvars) -DSFX CFLAGS_LB = $(cdebug) $(cflags) $(cvars) -DWINDLL -DDLL -DUNZIPLIB # How to compile sources .c.obj: $(cc) $(CFLAGS_UN) -o $@ $< # How to link .obj.exe: $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@ .obj.dll: $(link) $(ldebug) $(dlllflags) $(conlibs_izdll) $** -out:$@ .obj.lib: $(link) -lib $** -out:$@ # Default target is all the executables unzips : unzip.exe funzip.exe unzipsfx.exe guisfx: SFXWiz32.exe dll : unzip32.dll dllsample : uzexampl.exe lib : $(OBDIR) $(OB)unzip32.lib all : unzips guisfx dll dllsample lib unzip.exe: $(OBJU) unzipsfx.exe: $(OBJX) funzip.exe: $(OBJF) unzip32.dll: $(OBJD) windll.res $(WINDLL_DEF) $(link) $(ldebug) $(dlllflags) $(conlibs_izdll) -def:$(WINDLL_DEF) \ $(OBJD) windll.res -out:$@ unzsfx32.lib: $(OBLX) $(link) -lib $(OBLX) -out:$@ SFXWiz32.exe: $(OBGX) sfxwiz.res unzsfx32.lib $(link) $(ldebug) $(guilflags) $(guilibs) \ $(OBGX) sfxwiz.res unzsfx32.lib -out:$@ uzexampl.exe: uzexampl.obj $(link) $(ldebug) $(conflags) $(conlibs) version.lib $** -out:$@ $(OB)unzip32.lib: $(OBJB) $(link) -lib $(OBJB) -out:$@ crc32.obj: crc32.c $(UNZIP_H) zip.h crctab.obj: crctab.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h table|Q UNZIP.BCKz 'NZIP542.WIN32]MAKEFILE.;1P.AXP_OLB;1s.h globals.obj: globals.c $(UNZIP_H) inflate.obj: inflate.c inflate.h $(UNZIP_H) list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_H) process.obj: process.c $(UNZIP_H) timezone.obj: timezone.c $(UNZIP_H) zip.h timezone.h ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.obj: zipinfo.c $(UNZIP_H) win32.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_UN) -I. win32/win32.c -Fo$@ nt.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_UN) -I. win32/nt.c -Fo$@ !ifdef USEMASM crc_i386.obj: win32/crc_i386.asm masm -ml win32/crc_i386.asm,$@; !else !ifdef USEML crc_i386.obj: win32/crc_i386.asm ml -c -Cp -coff -Fo$@ win32/crc_i386.asm !else crc_i386.obj: win32/crc_i386.c $(cc) $(CFLAGS_UN) -I. win32/crc_i386.c -Fo$@ !endif !endif win32_.obj: win32/win32.c $(UNZIP_H) win32/nt.h # unzipsfx only $(cc) $(CFLAGS_SX) -I. win32/win32.c -Fo$@ win32f.obj: win32/win32.c $(UNZIP_H) win32/nt.h # funzip only $(cc) $(CFLAGS_FU) -I. win32/win32.c -Fo$@ nt_.obj: win32/nt.c $(UNZIP_H) win32/nt.h # unzipsfx only $(cc) $(CFLAGS_SX) -I. win32/nt.c -Fo$@ crc32_.obj: crc32.c $(UNZIP_H) zip.h # unzipsfx only $(cc) $(CFLAGS_SX) crc32.c -Fo$@ crc32f.obj: crc32.c $(UNZIP_H) zip.h # funzip only $(cc) $(CFLAGS_FU) crc32.c -Fo$@ crctab_.obj: crctab.c $(UNZIP_H) zip.h # unzipsfx only $(cc) $(CFLAGS_SX) crctab.c -Fo$@ crypt_.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(cc) $(CFLAGS_SX) crypt.c -Fo$@ cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(cc) $(CFLAGS_FU) crypt.c -Fo$@ extract_.obj: extract.c $(UNZIP_H) crypt.h # unzipsfx only $(cc) $(CFLAGS_SX) extract.c -Fo$@ fileio_.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only $(cc) $(CFLAGS_SX) fileio.c -Fo$@ globals_.obj: globals.c $(UNZIP_H) # unzipsfx only $(cc) $(CFLAGS_SX) globals.c -Fo$@ globalsf.obj: globals.c $(UNZIP_H) # funzip only $(cc) $(CFLAGS_FU) globals.c -Fo$@ inflate_.obj: inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only $(cc) $(CFLAGS_SX) inflate.c -Fo$@ inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(cc) $(CFLAGS_FU) inflate.c -Fo$@ match_.obj: match.c $(UNZIP_H) # unzipsfx only $(cc) $(CFLAGS_SX) match.c -Fo$@ process_.obj: process.c $(UNZIP_H) # unzipsfx only $(cc) $(CFLAGS_SX) process.c -Fo$@ timezon_.obj: timezone.c $(UNZIP_H) zip.h timezone.h # unzipsfx only $(cc) $(CFLAGS_SX) timezone.c -Fo$@ ttyio_.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(cc) $(CFLAGS_SX) ttyio.c -Fo$@ ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(cc) $(CFLAGS_FU) ttyio.c -Fo$@ unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(cc) $(CFLAGS_SX) unzip.c -Fo$@ # DLL compilation section api.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(cc) $(CFLAGS_DL) api.c -Fo$@ crc32l.obj: crc32.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_DL) crc32.c -Fo$@ crctabl.obj: crctab.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_DL) crctab.c -Fo$@ cryptl.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(CFLAGS_DL) crypt.c -Fo$@ explodel.obj: explode.c $(UNZIP_H) $(cc) $(CFLAGS_DL) explode.c -Fo$@ extractl.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(cc) $(CFLAGS_DL) extract.c -Fo$@ fileiol.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(cc) $(CFLAGS_DL) fileio.c -Fo$@ globalsl.obj: globals.c $(UNZIP_H) $(cc) $(CFLAGS_DL) globals.c -Fo$@ inflatel.obj: inflate.c inflate.h $(UNZIP_H) $(cc) $(CFLAGS_DL) inflate.c -Fo$@ listl.obj: list.c $(UNZIP_H) $(WINDLL_H) $(cc) $(CFLAGS_DL) list.c -Fo$@ matchl.obj: match.c $(UNZIP_H) $(cc) $(CFLAGS_DL) match.c -Fo$@ processl.obj: process.c $(UNZIP_H) $(WINDLL_H) $(cc) $(CFLAGS_DL) process.c -Fo$@ timezonl.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(cc) $(CFLAGS_DL) timezone.c -Fo$@ unreducl.obj: unreduce.c $(UNZIP_H) $(cc) $(CFLAGS_DL) unreduce.c -Fo$@ unshrnkl.obj: unshrink.c $(UNZIP_H) $(cc) $(CFLAGS_DL) unshrink.c -Fo$@ zipinfol.obj: zipinfo.c $(UNZIP_H) $(cc) $(CFLAGS_DL) zipinfo.c -Fo$@ win32l.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_DL) -I. win32/win32.c -Fo$@ ntl.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_DL) -I. win32/nt.c -Fo$@ windll.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(cc) $(CFLAGS_DL) -I. windll/windll.c -Fo$@ !ifdef USEMASM crci386l.obj: win32/crc_i386.asm masm -ml win32/crc_i386.asm,$@; !else !ifdef USEML crci386l.obj: win32/crc_i386.asm ml -c -Cp -coff -Fo$@ win32/crc_i386.asm !else crci386l.obj: win32/crc_i386.c $(cc) $(CFLAGS_DL) -I. win32/crc_i386.c -Fo$@ !endif !endif windll.res: windll/windll.rc windll/unzver.h $(rc) /l 0x409 /fo$@ /i windll /d WIN32 windll/windll.rc uzexampl.obj: windll/uzexampl.c windll/uzexampl.h $(cc) $(CFLAGS_UN) -I. windll/uzexampl.c -Fo$@ # SFX Lib compilation section apig.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(cc) $(CFLAGS_SL) api.c -Fo$@ crc32g.obj: crc32.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_SL) crc32.c -Fo$@ crctabg.obj: crctab.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_SL) crctab.c -Fo$@ cryptg.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(CFLAGS_SL) crypt.c -Fo$@ extractg.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(cc) $(CFLAGS_SL) extract.c -Fo$@ fileiog.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(cc) $(CFLAGS_SL) fileio.c -Fo$@ globalsg.obj: globals.c $(UNZIP_H) $(cc) $(CFLAGS_SL) globals.c -Fo$@ inflateg.obj: inflate.c inflate.h $(UNZIP_H) $(cc) $(CFLAGS_SL) inflate.c -Fo$@ matchg.obj: match.c $(UNZIP_H) $(cc) $(CFLAGS_SL) match.c -Fo$@ processg.obj: process.c $(UNZIP_H) $(WINDLL_H) $(cc) $(CFLAGS_SL) process.c -Fo$@ timezong.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(cc) $(CFLAGS_SL) timezone.c -Fo$@ win32g.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_SL) -I. win32/win32.c -Fo$@ ntg.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_SL) -I. win32/nt.c -Fo$@ windllg.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(cc) $(CFLAGS_SL) -I. windll/windll.c -Fo$@ !ifdef USEMASM crci386g.obj: win32/crc_i386.asm masm -ml win32/crc_i386.asm,$@; !else !ifdef USEML crci386g.obj: win32/crc_i386.asm ml -c -Cp -coff -Fo$@ win32/crc_i386.asm !else crci386g.obj: win32/crc_i386.c $(cc) $(CFLAGS_SL) -I. win32/crc_i386.c -Fo$@ !endif !endif sfxwiz.obj: windll/guisfx/sfxwiz.c windll/guisfx/dialog.h $(WINDLL_IMP_H) $(cc) $(CFLAGS_GX) windll/guisfx/sfxwiz.c -Fo$@ sfxwiz.res: windll/guisfx/sfxwiz.rc $(rc) /l 0x409 /fo$@ /i windll/guisfx /d WIN32 windll/guisfx/sfxwiz.rc # static LIB compilation section $(OB)apib.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(cc) $(CFLAGS_LB) api.c -Fo$@ $(OB)crc32b.obj: crc32.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_LB) crc32.c -Fo$@ $(OB)crctabb.obj: crctab.c $(UNZIP_H) zip.h $(cc) $(CFLAGS_LB) crctab.c -Fo$@ $(OB)cryptb.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(CFLAGS_LB) crypt.c -Fo$@ $(OB)explodeb.obj: explode.c $(UNZIP_H) $(cc) $(CFLAGS_LB) explode.c -Fo$@ $(OB)extractb.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(cc) $(CFLAGS_LB) extract.c -Fo$@ $(OB)fileiob.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(cc) $(CFLAGS_LB) fileio.c -Fo$@ $(OB)globalsb.obj: globals.c $(UNZIP_H) $(cc) $(CFLAGS_LB) globals.c -Fo$@ $(OB)inflateb.obj: inflate.c inflate.h $(UNZIP_H) $(cc) $(CFLAGS_LB) inflate.c -Fo$@ $(OB)listb.obj: list.c $(UNZIP_H) $(WINDLL_H) $(cc) $(CFLAGS_LB) list.c -Fo$@ $(OB)matchb.obj: match.c $(UNZIP_H) $(cc) $(CFLAGS_LB) match.c -Fo$@ $(OB)processb.obj: proc UNZIP.BCKz 'NZIP542.WIN32]MAKEFILE.;1P.AXP_OLB;1c9ess.c $(UNZIP_H) $(WINDLL_H) $(cc) $(CFLAGS_LB) process.c -Fo$@ $(OB)timezonb.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(cc) $(CFLAGS_LB) timezone.c -Fo$@ $(OB)unreducb.obj: unreduce.c $(UNZIP_H) $(cc) $(CFLAGS_LB) unreduce.c -Fo$@ $(OB)unshrnkb.obj: unshrink.c $(UNZIP_H) $(cc) $(CFLAGS_LB) unshrink.c -Fo$@ $(OB)zipinfob.obj: zipinfo.c $(UNZIP_H) $(cc) $(CFLAGS_LB) zipinfo.c -Fo$@ $(OB)win32b.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_LB) -I. win32/win32.c -Fo$@ $(OB)ntb.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(cc) $(CFLAGS_LB) -I. win32/nt.c -Fo$@ $(OB)windllb.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(cc) $(CFLAGS_LB) -I. windll/windll.c -Fo$@ !ifdef USEMASM $(OB)crci386b.obj: win32/crc_i386.asm masm -ml win32/crc_i386.asm,$@; !else !ifdef USEML $(OB)crci386b.obj: win32/crc_i386.asm ml -c -Cp -coff -Fo$@ win32/crc_i386.asm !else $(OB)crci386b.obj: win32/crc_i386.c $(cc) $(CFLAGS_LB) -I. win32/crc_i386.c -Fo$@ !endif !endif $(OBDIR): -mkdir $@ clean: del $(OBJU) unzip.exe del $(OBJF) funzip.exe del $(OBJX) unzipsfx.exe del $(OBJD) windll.res unzip32.dll unzip32.lib unzip32.exp del $(OBJB) $(OB)unzip32.lib del $(OBLX) unzsfx32.lib *[UNZIP542.WIN32]MAKEFILE.BC;1+,{5./ 4#- '0@123KPWO56W7W89GHJ# Makefile for UnZip(SFX) and fUnZip for Borland C++ for Windows 95/NT # Version: 5.42 and later # Alvin Koh, Jim Knoble, Christian Spieler, E-Yen Tan, Cosmin Truta, etc. # # Last revised: 17 Jul 2000 # # # Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added # to the declaration of LOC here: LOC = $(LOCAL_UNZIP) # Type for CPU required: 3: 80386, 4: 80486, 5: Pentium, # 6: Pentium Pro, Pentium II, etc. CPU_TYP = 6 # (De)Select inclusion of optimized assembler CRC32 routine: USE_ASMCRC = 0 !ifndef USE_IZTIMEZONE #default: do not use the IZ timezone replacement USE_IZTIMEZONE=0 !endif !if $(USE_IZTIMEZONE) != 0 LOC = -DW32_USE_IZ_TIMEZONE $(LOC) !endif # If you have bcc32i, you should define: # CC = bcc32i # This compiler generates a faster code. CC = bcc32 AS = tasm32 LD = ilink32 !if $(USE_ASMCRC) ASMFLG = -DASM_CRC ASMOBJS = crc_i386.obj !else ASMFLG = ASMOBJS = !endif !if $(USE_IZTIMEZONE) != 0 TIMEZONE_OBJU = timezone.obj TIMEZONE_OBJX = timezonx.obj TIMEZONE_OBJD = timezonl.obj TIMEZONE_OBLX = timezolx.obj TIMEZONE_OBJB = $(OB)timezonb.obj !else TIMEZONE_OBJU = TIMEZONE_OBJX = TIMEZONE_OBJD = TIMEZONE_OBLX = TIMEZONE_OBJB = !endif !if $(UNCLEAN) DIRT = -DUSE_SMITH_CODE -DUSE_UNSHRINK !else DIRT = !endif # compiler flags ASCPUFLAG = __$(CPU_TYP)86 !if $(CPU_TYP) != 0 CC_CPUFLG = -$(CPU_TYP) !endif ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) CFLAGS = -q -O2 -w- $(CC_CPUFLG) -d -ff- -k- -P-.C -I. $(ASMFLG) $(LOC) $(DIRT) LDFLAGS = -q # -lxncd -l-P # for bcc LDFLAGS_DLL = $(LDFLAGS) -WD UNFLAGS = $(CFLAGS) FUFLAGS = $(CFLAGS) -K -DFUNZIP SXFLAGS = $(CFLAGS) -DSFX DLFLAGS = $(CFLAGS) -WD -DWINDLL -DDLL SLFLAGS = $(CFLAGS) -DWINDLL -DDLL -DUNZIPLIB -DSFX GXFLAGS = $(CFLAGS) -DSFX LBFLAGS = $(CFLAGS) -DWINDLL -DDLL -DUNZIPLIB # list macros # special subdirectory for the static library binaries, to separate them # from other binaries (including dll import library file) OBDIR = ow32lib OB = $(OBDIR)/ # object files OBJU1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj OBJUS = win32.obj nt.obj $(ASMOBJS) $(TIMEZONE_OBJU) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS) OBJF = funzip.obj crc32f.obj cryptf.obj globalsf.obj inflatef.obj \ ttyiof.obj win32f.obj $(ASMOBJS) OBJX1 = unzipsfx.obj crc32x.obj crctabx.obj cryptx.obj extractx.obj fileiox.obj OBJX2 = globalsx.obj inflatex.obj matchx.obj processx.obj ttyiox.obj OBJXS = win32x.obj ntx.obj $(ASMOBJS) $(TIMEZONE_OBJX) OBJX = $(OBJX1) $(OBJX2) $(OBJXS) OBJD1 = api.obj crc32l.obj crctabl.obj cryptl.obj explodel.obj OBJD2 = extractl.obj fileiol.obj globalsl.obj inflatel.obj listl.obj matchl.obj OBJD3 = processl.obj unreducl.obj unshrnkl.obj zipinfol.obj OBJDS = win32l.obj ntl.obj windll.obj $(ASMOBJS) $(TIMEZONE_OBJD) OBJD = $(OBJD1) $(OBJD2) $(OBJD3) $(OBJDS) OBLX1 = apig.obj crc32g.obj crctabg.obj cryptg.obj OBLX2 = extractg.obj fileiog.obj globalsg.obj inflateg.obj OBLX3 = matchg.obj processg.obj OBLXS = win32g.obj ntg.obj windllg.obj $(TIMEZONE_OBLX) OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBJA) $(OBLXS) OBGX = sfxwiz.obj OBJLIB = $(OB)windllb.obj $(OB)apib.obj OBJB1 = $(OB)crc32b.obj $(OB)crctabb.obj $(OB)cryptb.obj OBJB2 = $(OB)explodeb.obj $(OB)extractb.obj $(OB)fileiob.obj $(OB)globalsb.obj OBJB3 = $(OB)inflateb.obj $(OB)listb.obj $(OB)matchb.obj $(OB)processb.obj OBJB4 = $(OB)unreducb.obj $(OB)unshrnkb.obj $(OB)zipinfob.obj OBJBS = $(OB)win32b.obj $(OB)ntb.obj $(TIMEZONE_OBJB) OBJB = $(OBJLIB) $(OBJB1) $(OBJB2) $(OBJB3) $(OBJB4) $(OBJBS) UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h WINDLL_H = windll/windll.h windll/structs.h windll/decs.h WINDLL_DEF = windll/windll32.def WINDLL_IMP_H = windll/decs.h windll/structs.h # implicit rules .asm.obj: $(AS) $(ASFLAGS) $< .c.obj: $(CC) -c $(UNFLAGS) {$< } # explicit rules # Default target is all the executables unzips: unzip.exe funzip.exe unzipsfx.exe dll: unzip32.dll dllsample: uzexampl.exe guisfx: SFXWiz32.exe lib: $(OBDIR) $(OB)unzip32.lib all: unzips dll dllsample guisfx lib unzip.exe: $(OBJU) $(CC) $(LDFLAGS) -eunzip.exe @&&| $(OBJU) | funzip.exe: $(OBJF) $(CC) $(LDFLAGS) -efunzip.exe @&&| $(OBJF) | unzipsfx.exe: $(OBJX) $(CC) $(LDFLAGS) -eunzipsfx.exe @&&| $(OBJX) | unzip32.dll: $(OBJD) windll.res $(WINDLL_DEF) $(LD) -q -Gn -x -c -aa -Tpd @&&| c0d32.obj $(OBJD),$@,,import32.lib cw32.lib,$(WINDLL_DEF:/=\),windll.res | # $(CC) $(LDFLAGS_DLL) -e$@ @&&| #$(OBJD) ##, windll.res #| # brc32 windll.res $@ unzsfx32.lib: $(OBLX) $(AR) -rus $@ $(OBLX) SFXWiz32.exe: $(OBGX) unzsfx32.lib $(CC) $(GUILDFLAG) $(LDFLAGS) $(LDVER) $(OBGX) unzsfx32.lib $(LDLIBS) uzexampl.exe: uzexampl.obj $(CC) $(LDFLAGS) -euzexampl.exe uzexampl.obj #version.lib unzip32.lib: $(OBJB) $(AR) -rus $@ $(OBJB) clean: rem Ignore any errors in the following... -del *.obj -del unzip.exe -del funzip.exe -del unzipsfx.exe # individual file dependencies crc32.obj: crc32.c $(UNZIP_H) zip.h crctab.obj: crctab.c $(UNZIP_H) zip.h crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs.obj: envargs.c $(UNZIP_H) explode.obj: explode.c $(UNZIP_H) extract.obj: extract.c $(UNZIP_H) crypt.h fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals.obj: globals.c $(UNZIP_H) inflate.obj: inflate.c inflate.h $(UNZIP_H) list.obj: list.c $(UNZIP_H) match.obj: match.c $(UNZIP_FQ UNZIP.BCK{5 '[UNZIP542.WIN32]MAKEFILE.BC;1AXP_OLB;1# H) process.obj: process.c $(UNZIP_H) timezone.obj: timezone.c $(UNZIP_H) zip.h timezone.h ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce.obj: unreduce.c $(UNZIP_H) unshrink.obj: unshrink.c $(UNZIP_H) unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.obj: zipinfo.c $(UNZIP_H) crc_i386.obj: win32/crc_i386.asm $(AS) $(ASFLAGS) win32\crc_i386.asm, $@ ; win32.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(UNFLAGS) win32/win32.c nt.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(UNFLAGS) win32/nt.c funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(FUFLAGS) -o$@ funzip.c crc32f.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(FUFLAGS) -o$@ crc32.c cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(FUFLAGS) -o$@ crypt.c globalsf.obj: globals.c $(UNZIP_H) $(CC) -c $(FUFLAGS) -o$@ globals.c inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(FUFLAGS) -o$@ inflate.c ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(FUFLAGS) -o$@ ttyio.c win32f.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(FUFLAGS) -o$@ win32/win32.c unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(SXFLAGS) -o$@ unzip.c crc32x.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(SXFLAGS) -o$@ crc32.c crctabx.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(SXFLAGS) -o$@ crctab.c cryptx.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(SXFLAGS) -o$@ crypt.c extractx.obj: extract.c $(UNZIP_H) crypt.h $(CC) -c $(SXFLAGS) -o$@ extract.c fileiox.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(SXFLAGS) -o$@ fileio.c globalsx.obj: globals.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -o$@ globals.c inflatex.obj: inflate.c inflate.h $(UNZIP_H) $(CC) -c $(SXFLAGS) -o$@ inflate.c matchx.obj: match.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -o$@ match.c processx.obj: process.c $(UNZIP_H) $(CC) -c $(SXFLAGS) -o$@ process.c timezonx.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(CC) -c $(SXFLAGS) -o$@ timezone.c ttyiox.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(SXFLAGS) -o$@ ttyio.c win32x.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(SXFLAGS) -o$@ win32/win32.c ntx.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(SXFLAGS) -o$@ win32/nt.c uzexampl.obj: windll/uzexampl.c windll/uzexampl.h $(CC) -c $(UNFLAGS) -I./windll -o$@ windll/uzexampl.c # DLL compilation section api.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) -c $(DLFLAGS) -o$@ api.c crc32l.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(DLFLAGS) -o$@ crc32.c crctabl.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(DLFLAGS) -o$@ crctab.c cryptl.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(DLFLAGS) -o$@ crypt.c explodel.obj: explode.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ explode.c extractl.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) -c $(DLFLAGS) -o$@ extract.c fileiol.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(DLFLAGS) -o$@ fileio.c globalsl.obj: globals.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ globals.c inflatel.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(DLFLAGS) -o$@ inflate.c listl.obj: list.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(DLFLAGS) -o$@ list.c matchl.obj: match.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ match.c processl.obj: process.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(DLFLAGS) -o$@ process.c timezonl.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(CC) -c $(DLFLAGS) -o$@ timezone.c unreducl.obj: unreduce.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ unreduce.c unshrnkl.obj: unshrink.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ unshrink.c zipinfol.obj: zipinfo.c $(UNZIP_H) $(CC) -c $(DLFLAGS) -o$@ zipinfo.c win32l.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(DLFLAGS) -o$@ win32/win32.c ntl.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(DLFLAGS) -o$@ win32/nt.c windll.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) -c $(DLFLAGS) -o$@ windll/windll.c windll.res: windll/windll.rc windll/unzver.h $(RC) /l 0x409 /fo$@ /i windll /d WIN32 windll/windll.rc windllrc.obj: windll/windll.rc - $(RC) -o $@ windll/windll.rc # SFX Lib compilation section apig.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) -c $(SLFLAGS) -o$@ api.c crc32g.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(SLFLAGS) -o$@ crc32.c crctabg.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(SLFLAGS) -o$@ crctab.c cryptg.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(SLFLAGS) -o$@ crypt.c explodeg.obj: explode.c $(UNZIP_H) $(CC) -c $(SLFLAGS) -o$@ explode.c extractg.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) -c $(SLFLAGS) -o$@ extract.c fileiog.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(SLFLAGS) -o$@ fileio.c globalsg.obj: globals.c $(UNZIP_H) $(CC) -c $(SLFLAGS) -o$@ globals.c inflateg.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(SLFLAGS) -o$@ inflate.c matchg.obj: match.c $(UNZIP_H) $(CC) -c $(SLFLAGS) -o$@ match.c processg.obj: process.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(SLFLAGS) -o$@ process.c timezong.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(CC) -c $(SLFLAGS) -o$@ timezone.c win32g.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(SLFLAGS) -o$@ win32/win32.c ntg.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(SLFLAGS) -o$@ win32/nt.c windllg.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) -c $(SLFLAGS) -o$@ windll/windll.c sfxwiz.obj: windll/guisfx/sfxwiz.c windll/guisfx/dialog.h $(WINDLL_IMP_H) $(CC) -c $(CFLAGS) $(CVER) $(GENGUISX) -I. windll/guisfx/sfxwiz.c sfxwizrc.obj: windll/guisfx/sfxwiz.rc - $(RC) --include-dir windll/guisfx --define WIN32 -o$@ \ windll/guisfx/sfxwiz.rc # Static LIB compilation section $(OB)apib.obj: api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) -c $(LBFLAGS) -o$@ api.c $(OB)crc32b.obj: crc32.c $(UNZIP_H) zip.h $(CC) -c $(LBFLAGS) -o$@ crc32.c $(OB)crctabb.obj: crctab.c $(UNZIP_H) zip.h $(CC) -c $(LBFLAGS) -o$@ crctab.c $(OB)cryptb.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(LBFLAGS) -o$@ crypt.c $(OB)explodeb.obj: explode.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ explode.c $(OB)extractb.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) -c $(LBFLAGS) -o$@ extract.c $(OB)fileiob.obj: fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(LBFLAGS) -o$@ fileio.c $(OB)globalsb.obj: globals.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ globals.c $(OB)inflateb.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(LBFLAGS) -o$@ inflate.c $(OB)listb.obj: list.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(LBFLAGS) -o$@ list.c $(OB)matchb.obj: match.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ match.c $(OB)processb.obj: process.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(LBFLAGS) -o$@ process.c $(OB)timezonb.obj: timezone.c $(UNZIP_H) zip.h timezone.h $(CC) -c $(LBFLAGS) -o$@ timezone.c $(OB)unreducb.obj: unreduce.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ unreduce.c $(OB)unshrnkb.obj: unshrink.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ unshrink.c $(OB)zipinfob.obj: zipinfo.c $(UNZIP_H) $(CC) -c $(LBFLAGS) -o$@ zipinfo.c $(OB)win32b.obj: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(LBFLAGS) -o$@ win32/win32.c $(OB)ntb.obj: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(LBFLAGS) -o$@ win32/nt.c $(OB)windllb.obj: windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) -c $(LBFLAGS) -o$@ winގN UNZIP.BCK{5 '[UNZIP542.WIN32]MAKEFILE.BC;1AXP_OLB;1-dll/windll.c $(OBDIR): -mkdir $@ i*[UNZIP542.WIN32]MAKEFILE.DJ;1+,|(./ 4- '0@123KPWO 56 7 89GHJ# Makefile for UnZip, fUnZip and UnZipSFX # for rsxntdj 1.3.1 (with djgpp v2.1) under Windows 95 and Windows NT. # By E-Yen Tan. Last updated 24th October 1999. CC = gcc -O2 -m486 -Zwin32 CFLAGS = -Wall -I. -DWIN32 -DASM_CRC $(LOCAL_UNZIP) AS = gcc ASFLAGS = -Di386 LDFLAGS = -o ./ LDFLAGS2 = -lalias $(L_ADVAPI32) IMPLIBS = $(ADVAPI32LIB) ADVAPI32 = adv32 ADVAPI32LIB = lib$(ADVAPI32).a L_ADVAPI32 = -l$(ADVAPI32) OBJU1 = unzip.o crc_gcc.o crctab.o crypt.o envargs.o explode.o extract.o OBJU2 = fileio.o globals.o inflate.o list.o match.o process.o ttyio.o OBJU3 = unreduce.o unshrink.o zipinfo.o win32.o nt.o OBJU = $(OBJU1) $(OBJU2) $(OBJU3) OBJX1 = unzipsf_.o crc_gcc.o crctab_.o crypt_.o extract_.o fileio_.o OBJX2 = globals_.o inflate_.o match_.o process_.o ttyio_.o win32_.o nt_.o OBJX = $(OBJX1) $(OBJX2) OBJF = funzip.o crc_gcc.o cryptf.o inflatef.o globalsf.o ttyiof.o win32f.o UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h # rules .SUFFIXES: .c .o .c.o: $(CC) -c $(CFLAGS) -o$@ $< .asm.o: $(AS) $(ASFLAGS) $< all: unzip.exe funzip.exe unzipsfx.exe unzip.exe: $(OBJU) $(IMPLIBS) $(CC) $(LDFLAGS)$@ $(OBJU) $(LDFLAGS2) funzip.exe: $(OBJF) $(IMPLIBS) $(CC) $(LDFLAGS)$@ $(OBJF) $(LDFLAGS2) unzipsfx.exe: $(OBJX) $(IMPLIBS) $(CC) $(LDFLAGS)$@ $(OBJX) $(LDFLAGS2) uzexampl.exe: uzexampl$(OBJ) $(CC) $(LDFLAGS)$@ uzexampl$(OBJ) -lversion $(LDFLAGS2) $(ADVAPI32LIB): makelib "$(windir)/system/advapi32.dll" -o ./$@ crctab.o: crctab.c $(UNZIP_H) zip.h envargs.o: envargs.c $(UNZIP_H) explode.o: explode.c $(UNZIP_H) extract.o: extract.c $(UNZIP_H) crypt.h fileio.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals.o: globals.c $(UNZIP_H) inflate.o: inflate.c $(UNZIP_H) list.o: list.c $(UNZIP_H) match.o: match.c $(UNZIP_H) process.o: process.c $(UNZIP_H) ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce.o: unreduce.c $(UNZIP_H) unshrink.o: unshrink.c $(UNZIP_H) unzip.o: unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo.o: zipinfo.c $(UNZIP_H) funzip.o: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(CFLAGS) -o$@ funzip.c uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h $(CC) -c $(CFLAGS) -o$@ windll/uzexampl.c win32.o: win32/win32.c $(UNZIP_H) win32/nt.h version.h $(CC) -c $(CFLAGS) -o$@ win32/win32.c win32f.o: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS) -DFUNZIP -o$@ win32/win32.c win32_.o: win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS) -DSFX -o$@ win32/win32.c nt.o: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS) -o$@ win32/nt.c nt_.o: win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS) -DSFX -o$@ win32/nt.c crc_gcc.o: crc_i386.S $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) -o$@ crypt.c cryptf.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) -DFUNZIP -o$@ crypt.c crc32f.o: crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS) -DFUNZIP -o$@ crc32.c globalsf.o: globals.c $(UNZIP_H) $(CC) -c $(CFLAGS) -DFUNZIP -o$@ globals.c inflatef.o: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS) -DFUNZIP -o$@ inflate.c ttyiof.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) -DFUNZIP -o$@ ttyio.c crctab_.o: crctab.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS) -DSFX -o$@ crctab.c crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) -DSFX -o$@ crypt.c extract_.o: extract.c $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS) -DSFX -o$@ extract.c fileio_.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(CFLAGS) -DSFX -o$@ fileio.c globals_.o: globals.c $(UNZIP_H) $(CC) -c $(CFLAGS) -DSFX -o$@ globals.c inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS) -DSFX -o$@ inflate.c match_.o: match.c $(UNZIP_H) $(CC) -c $(CFLAGS) -DSFX -o$@ match.c process_.o: process.c $(UNZIP_H) $(CC) -c $(CFLAGS) -DSFX -o$@ process.c ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) -DSFX -o$@ ttyio.c unzipsf_.o: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(CFLAGS) -DSFX -o$@ unzip.c *[UNZIP542.WIN32]MAKEFILE.EMX;1+,} ./ 4Y- '0@123KPWO56j7j89GHJ # Makefile for UnZip, fUnZip and UnZipSFX # for emx 0.9d + rsxnt 1.42 / gcc under WIN32. Derived from makefile.os2 # By E-Yen Tan and Christian Spieler. Last updated 10 March 1999. # # This makefile should work fine with GNU make and hopefully some others. # Tested with Spieler's special GNU make 3.74 gnuish 16-bit version. # # If make does not support long command-line passing to gcc, the link step # will fail. In this case, you have to edit the link commands to use the # commented-out alternative that creates a link response file "by hand". #ifdef NOASM #AS_FLAGS = #else AS_FLAGS = -DASM_CRC #endif CP=copy RM=del CC=gcc -Zwin32 -I. CC_OSIZ=-O1 CC_OTIM=-O2 -mpentium CC_OPTS=-Wall -DWIN32 $(AS_FLAGS) $(LOCAL_UNZIP) CFLAGS=$(CC_OTIM) $(CC_OPTS) CFLAGSX=$(CC_OSIZ) $(CC_OPTS) -DSFX CFLAGSF=$(CC_OTIM) $(CC_OPTS) -DFUNZIP DLLFLAG= AS=gcc ASFLAGS=-Di386 LDFLAGS=-Zsys -o ./ LDFLAGS2=-ladvapi32 -Zsmall-conv -s OUT=-o OBJ=.o #ifdef NOASM #CRC32=crc32 #CRC32F=crc32f #CRC32X=crc32_ #else CRC32=crc_gcc CRC32F=crc_gcc CRC32X=crc_gcc #endif OBJUS=win32$(OBJ) nt$(OBJ) OBJXS=win32_$(OBJ) nt_$(OBJ) OBJFS=win32f$(OBJ) OSDEP_H=win32/w32cfg.h # default settings for target dependent macros: DIRSEP = / AS_DIRSEP = / OBJU1 = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) OBJU3 = inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) OBJU4 = unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJUS) OBJX1 = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) OBJX2 = extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) OBJX3 = match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS) OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ globalsf$(OBJ) ttyiof$(OBJ) $(OBJFS) UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) # rules .SUFFIXES: .c $(OBJ) .c$(OBJ): $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ $< # targets all: unzip.exe funzip.exe unzipsfx.exe # This next bit is nasty, but is needed to overcome the MS-DOS command # line limit as response files for emx's gcc seem to only work if each # file is on a different line. DJGPP doesn't do this (if you are at all # interested). unzip.exe: $(OBJU) # @ echo off # -@ $(RM) unzip.rsp # @ for %f in ($(OBJU1)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU2)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU3)) do echo %f >> unzip.rsp # @ for %f in ($(OBJU4) $(OBJUS)) do echo %f >> unzip.rsp # $(CC) $(LDFLAGS)$@ T UNZIP.BCK}  '[UNZIP542.WIN32]MAKEFILE.EMX;1XP_OLB;1 x $(DEF) @unzip.rsp $(LDFLAGS2) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(LDFLAGS2) # @ $(RM) unzip.rsp funzip.exe: $(OBJF) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2) unzipsfx.exe: $(OBJX) # @ echo off # -@ $(RM) unzipsfx.rsp # @ for %f in ($(OBJX1)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJX2)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJX3)) do echo %f >> unzipsfx.rsp # @ for %f in ($(OBJXS)) do echo %f >> unzipsfx.rsp # $(CC) $(LDFLAGS)$@ $(DEF) @unzipsfx.rsp $(LDFLAGS2) $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(LDFLAGS2) # @ $(RM) unzipsfx.rsp uzexampl.exe: uzexampl$(OBJ) $(CC) $(LDFLAGS)$@ $(DEF) uzexampl$(OBJ) -lversion $(LDFLAGS2) # dependencies apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crctab$(OBJ): crctab.c $(UNZIP_H) zip.h envargs$(OBJ): envargs.c $(UNZIP_H) explode$(OBJ): explode.c $(UNZIP_H) extract$(OBJ): extract.c $(UNZIP_H) crypt.h fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(OBJ): globals.c $(UNZIP_H) inflate$(OBJ): inflate.c $(UNZIP_H) list$(OBJ): list.c $(UNZIP_H) match$(OBJ): match.c $(UNZIP_H) process$(OBJ): process.c $(UNZIP_H) ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(OBJ): unreduce.c $(UNZIP_H) unshrink$(OBJ): unshrink.c $(UNZIP_H) unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h api$(OBJ): api.c $(UNZIP_H) version.h zipinfo$(OBJ): zipinfo.c $(UNZIP_H) funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h # funzip only $(CC) -c $(CFLAGS) $(OUT)$@ funzip.c unzipstb$(OBJ): unzipstb.c # DLL version $(CC) -c $(CFLAGS) $(OUT)$@ unzipstb.c uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h # WINDLL example $(CC) -c $(CFLAGS) $(OUT)$@ windll/uzexampl.c win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h version.h # win32 only $(CC) -c $(CFLAGS) $(OUT)$@ win32$(DIRSEP)win32.c win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # win32 funzip $(CC) -c $(CFLAGSF) $(OUT)$@ win32$(DIRSEP)win32.c win32_$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # win32 unzipsfx $(CC) -c $(CFLAGSX) $(OUT)$@ win32$(DIRSEP)win32.c nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # win32 only $(CC) -c $(CFLAGS) $(OUT)$@ win32$(DIRSEP)nt.c nt_$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # win32 only $(CC) -c $(CFLAGSX) $(OUT)$@ win32$(DIRSEP)nt.c os2$(OBJ): os2/os2.c $(UNZIP_H) version.h # OS/2 only $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)os2.c os2_$(OBJ): os2/os2.c $(UNZIP_H) # OS/2 unzipsfx $(CC) -c $(CFLAGSX) $(OUT)$@ os2$(DIRSEP)os2.c os2acl$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 only $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)os2acl.c rexxhelp$(OBJ): os2/rexxhelp.c # OS/2 DLL only $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)rexxhelp.c rexxapi$(OBJ): os2/rexxapi.c # OS/2 DLL only $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)rexxapi.c crc_i86$(OBJ): msdos/crc_i86.asm # 16bit only $(AS) $(ASFLAGS) msdos$(AS_DIRSEP)crc_i86.asm $(ASEOL) crc_i386$(OBJ): win32/crc_i386.asm # 32bit, MASM $(AS) $(ASFLAGS) win32$(AS_DIRSEP)crc_i386.asm $(ASEOL) crc_gcc$(OBJ): crc_i386.S # 32bit, GNU AS $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ crypt.c cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGSF) $(OUT)$@ crypt.c crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h # funzip only $(CC) -c $(CFLAGSF) $(OUT)$@ crc32.c globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only $(CC) -c $(CFLAGSF) $(OUT)$@ globals.c inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CC) -c $(CFLAGSF) $(OUT)$@ inflate.c ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) -c $(CFLAGSF) $(OUT)$@ ttyio.c crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ crc32.c crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ crctab.c crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ crypt.c extract_$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ extract.c fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ fileio.c globals_$(OBJ): globals.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ globals.c inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ inflate.c match_$(OBJ): match.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ match.c process_$(OBJ): process.c $(UNZIP_H) # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ process.c ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ ttyio.c unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CC) -c $(CFLAGSX) $(OUT)$@ unzip.c b*[UNZIP542.WIN32]MAKEFILE.GCC;1+,~./ 40- '0@123KPWO56yUa7yUa89GHJ# Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc. # Currently supported implementations: Cygnus/Win32 and MinGW32. # # First version: Cosmin Truta , Dec 1997. # Last revision: Christian Spieler, 14-Jan-2001 # # To use, do "make -f win32/makefile.gcc". ### Optional section # Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE) # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added # to the declaration of LOCFLAGS here: LOCFLAGS = $(LOCAL_UNZIP) ### Compiler-specific section # ------------ GNU C ------------ CC = gcc #AS = as AS = $(CC) #LD = ld LD = $(CC) AR = ar RC = windres # Quiet CC_QUIET_OPT = AS_QUIET_OPT = $(CC_QUIET_OPT) LD_QUIET_OPT = $(CC_QUIET_OPT) # Warnings CC_WARN_OPT = -Wall AS_WARN_OPT = $(CC_WARN_OPT) LD_WARN_OPT = # Debug version CC_DEBUG_OPT = -g AS_DEBUG_OPT = $(CC_DEBUG_OPT) LD_DEBUG_OPT = $(CC_DEBUG_OPT) # Release version CC_RELEASE_OPT = AS_RELEASE_OPT = LD_RELEASE_OPT = -s # Prefered target CPU (instruction scheduling optimized for...) CC_CPU_OPT = -mpentium # Smallest code (-Os is new since EGC 1.1, use -O1 for 2.8.1 and earlier) CC_SIZE_OPT = -Os $(CC_CPU_OPT) # Fastest code CC_SPEED_OPT = -O2 $(CC_CPU_OPT) # Output object file name CC_OUT_OPT = -o # Other specific options CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 AS_SPECIFIC_OPT = -c LD_SPECIFIC_OPT = -o $@ # Libraries for the debug & release version # (GCC 2.95 and newer does not require the following library specifications) LD_RELEASE_LIBS = -luser32 -ladvapi32 LD_DEBUG_LIBS = $(LD_RELEASE_LIBS) ### System-specific section # Suffixes OBJ = .o EXE = .exe .SUFFIXES: .c .S $(OBJ) $(EXE) # Commands RM = rm -f ### General section CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \ $(CC_OUT_OPT) $@ ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS) LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT) # To build with debug info, use 'make DEBUG=1'. ifdef DEBUG CVER = $( UNZIP.BCK~ '[UNZIP542.WIN32]MAKEFILE.GCC;1XP_OLB;1 CC_DEBUG_OPT) ASVER = $(AS_DEBUG_OPT) LDVER = $(LD_DEBUG_OPT) GENFLAGS = FFLAGS = -DFUNZIP SFXFLAGS = -DSFX GENDLLFL = -DDLL -DWINDLL GENGUILB = -DSFX -DDLL -DWINDLL -DUNZIPLIB GENGUISX = -DSFX GENLIBFL = -DDLL -DWINDLL -DUNZIPLIB LDLIBS = $(LD_DEBUG_LIBS) else CVER = $(CC_RELEASE_OPT) ASVER = $(AS_RELEASE_OPT) LDVER = $(LD_RELEASE_OPT) GENFLAGS = $(CC_SPEED_OPT) FFLAGS = $(CC_SPEED_OPT) -DFUNZIP SFXFLAGS = $(CC_SIZE_OPT) -DSFX GENDLLFL = $(CC_SPEED_OPT) -DDLL -DWINDLL GENGUILB = $(CC_SIZE_OPT) -DSFX -DDLL -DWINDLL -DUNZIPLIB GENGUISX = $(CC_SIZE_OPT) -DSFX GENLIBFL = $(CC_SPEED_OPT) -DDLL -DWINDLL -DUNZIPLIB LDLIBS = $(LD_RELEASE_LIBS) endif GUILDFLAG=-mwindows # Object files OBJA = crc_i386$(OBJ) OBJU1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ) OBJU3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ) OBJU4 = unshrink$(OBJ) zipinfo$(OBJ) OBJUS = win32$(OBJ) nt$(OBJ) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJA) $(OBJUS) OBJX1 = unzipsfx$(OBJ) crc32x$(OBJ) crctabx$(OBJ) cryptx$(OBJ) extractx$(OBJ) OBJX2 = fileiox$(OBJ) globalsx$(OBJ) inflatex$(OBJ) matchx$(OBJ) processx$(OBJ) OBJX3 = ttyiox$(OBJ) OBJXS = win32x$(OBJ) ntx$(OBJ) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJA) $(OBJXS) OBJF1 = funzip$(OBJ) crc32$(OBJ) cryptf$(OBJ) globalsf$(OBJ) inflatef$(OBJ) OBJF2 = ttyiof$(OBJ) OBJFS = win32f$(OBJ) OBJF = $(OBJF1) $(OBJF2) $(OBJA) $(OBJFS) OBJDLL = windll$(OBJ) windllrc$(OBJ) api$(OBJ) OBJD1 = crc32l$(OBJ) crctabl$(OBJ) cryptl$(OBJ) OBJD2 = explodel$(OBJ) extractl$(OBJ) fileiol$(OBJ) globalsl$(OBJ) OBJD3 = inflatel$(OBJ) listl$(OBJ) matchl$(OBJ) processl$(OBJ) OBJD4 = unreducl$(OBJ) unshrnkl$(OBJ) zipinfol$(OBJ) OBJDS = win32l$(OBJ) ntl$(OBJ) OBJD = $(OBJDLL) $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJA) $(OBJDS) OBLX1 = apig$(OBJ) crc32g$(OBJ) crctabg$(OBJ) cryptg$(OBJ) OBLX2 = extractg$(OBJ) fileiog$(OBJ) globalsg$(OBJ) inflateg$(OBJ) OBLX3 = matchg$(OBJ) processg$(OBJ) OBLXS = win32g$(OBJ) ntg$(OBJ) windllg$(OBJ) OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBJA) $(OBLXS) OBGX = sfxwiz$(OBJ) sfxwizrc$(OBJ) OBJLIB = windllb$(OBJ) apib$(OBJ) OBJB1 = crc32b$(OBJ) crctabb$(OBJ) cryptb$(OBJ) OBJB2 = explodeb$(OBJ) extractb$(OBJ) fileiob$(OBJ) globalsb$(OBJ) OBJB3 = inflateb$(OBJ) listb$(OBJ) matchb$(OBJ) processb$(OBJ) OBJB4 = unreducb$(OBJ) unshrnkb$(OBJ) zipinfob$(OBJ) OBJBS = win32b$(OBJ) ntb$(OBJ) OBJB = $(OBJLIB) $(OBJB1) $(OBJB2) $(OBJB3) $(OBJB4) $(OBJA) $(OBJBS) UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h WINDLL_H = windll/windll.h windll/structs.h windll/decs.h DLLDEF = windll/windllgcc.def WINDLL_IMP_H = windll/decs.h windll/structs.h # Default target is all the executables unzips: unzip$(EXE) funzip$(EXE) unzipsfx$(EXE) dll: unzip32.dll dllsample: uzexampl.exe guisfx: SFXWiz32.exe lib: libunzip32.a all: unzips dll dllsample guisfx lib unzip$(EXE): $(OBJU) $(LD) $(LDFLAGS) $(LDVER) $(OBJU) $(LDLIBS) unzipsfx$(EXE): $(OBJX) $(LD) $(LDFLAGS) $(LDVER) $(OBJX) $(LDLIBS) funzip$(EXE): $(OBJF) $(LD) $(LDFLAGS) $(LDVER) $(OBJF) $(LDLIBS) unzip32.dll: $(DLLDEF) $(OBJD) dllwrap --driver-name $(CC) --def $(DLLDEF) $(LDFLAGS) $(LDVER) $(OBJD) $(LDLIBS) libunzsfx32.a: $(OBLX) $(AR) -rus $@ $(OBLX) SFXWiz32$(EXE): $(OBGX) libunzsfx32.a $(LD) $(GUILDFLAG) $(LDFLAGS) $(LDVER) $(OBGX) -L. -lunzsfx32 $(LDLIBS) uzexampl$(EXE): uzexampl$(OBJ) $(CC) $(LDFLAGS) $(LDVER) uzexampl$(OBJ) -lversion $(LDLIBS) libunzip32.a: $(OBJB) $(AR) -rus $@ $(OBJB) # How to compile sources .c$(OBJ): $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< .S$(OBJ): $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $< # Dependencies crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crctab$(OBJ): crctab.c $(UNZIP_H) zip.h crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h envargs$(OBJ): envargs.c $(UNZIP_H) explode$(OBJ): explode.c $(UNZIP_H) extract$(OBJ): extract.c $(UNZIP_H) crypt.h fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h globals$(OBJ): globals.c $(UNZIP_H) inflate$(OBJ): inflate.c inflate.h $(UNZIP_H) list$(OBJ): list.c $(UNZIP_H) match$(OBJ): match.c $(UNZIP_H) process$(OBJ): process.c $(UNZIP_H) ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(OBJ): unreduce.c $(UNZIP_H) unshrink$(OBJ): unshrink.c $(UNZIP_H) unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$(OBJ): zipinfo.c $(UNZIP_H) crc_i386$(OBJ): crc_i386.S win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. win32/win32.c nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. win32/nt.c win32x$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. win32/win32.c ntx$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. win32/nt.c win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # funzip only $(CC) $(CFLAGS) $(CVER) $(FFLAGS) -I. win32/win32.c crc32x$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) crc32.c crctabx$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) crctab.c cryptx$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) crypt.c cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) $(CFLAGS) $(CVER) $(FFLAGS) crypt.c extractx$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) extract.c fileiox$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) fileio.c globalsx$(OBJ): globals.c $(UNZIP_H) # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) globals.c globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only $(CC) $(CFLAGS) $(CVER) $(FFLAGS) globals.c inflatex$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) inflate.c inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only $(CC) $(CFLAGS) $(CVER) $(FFLAGS) inflate.c matchx$(OBJ): match.c $(UNZIP_H) # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) match.c processx$(OBJ): process.c $(UNZIP_H) # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) process.c ttyiox$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) ttyio.c ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only $(CC) $(CFLAGS) $(CVER) $(FFLAGS) ttyio.c unzipsfx$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) unzip.c uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h # WINDLL sample $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. windll/uzexampl.c # DLL compilation section api$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) api.c crc32l$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) crc32.c crctabl$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) crctab.c cryptl$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) crypt.c explodel$(OBJ): explode.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) explode.c extractl$(OBJ): extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) extract.c fileiol$(OBJ): fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) fileio.c globalsl$(OBJ): globals.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDL0y UNZIP.BCK~ '[UNZIP542.WIN32]MAKEFILE.GCC;1XP_OLB;1nLFL) globals.c inflatel$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) inflate.c listl$(OBJ): list.c $(UNZIP_H) $(WINDLL_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) list.c matchl$(OBJ): match.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) match.c processl$(OBJ): process.c $(UNZIP_H) $(WINDLL_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) process.c unreducl$(OBJ): unreduce.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) unreduce.c unshrnkl$(OBJ): unshrink.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) unshrink.c zipinfol$(OBJ): zipinfo.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) zipinfo.c win32l$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. win32/win32.c ntl$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. win32/nt.c windll$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. windll/windll.c windllrc$(OBJ): windll/windll.rc - $(RC) -o $@ windll/windll.rc # SFX Lib compilation section apig$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) api.c crc32g$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) crc32.c crctabg$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) crctab.c cryptg$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) crypt.c extractg$(OBJ): extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) extract.c fileiog$(OBJ): fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) fileio.c globalsg$(OBJ): globals.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENGUILB) globals.c inflateg$(OBJ): inflate.c inflate.h $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENGUILB) inflate.c matchg$(OBJ): match.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENGUILB) match.c processg$(OBJ): process.c $(UNZIP_H) $(WINDLL_H) $(CC) $(CFLAGS) $(CVER) $(GENGUILB) process.c win32g$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. win32/win32.c ntg$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. win32/nt.c windllg$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) $(CFLAGS) $(CVER) $(GENGUILB) windll/windll.c sfxwiz$(OBJ): windll/guisfx/sfxwiz.c windll/guisfx/dialog.h $(WINDLL_IMP_H) $(CC) $(CFLAGS) $(CVER) $(GENGUISX) -I. windll/guisfx/sfxwiz.c sfxwizrc$(OBJ): windll/guisfx/sfxwiz.rc - $(RC) --include-dir windll/guisfx --define WIN32 -o$@ \ windll/guisfx/sfxwiz.rc # Static LIB compilation section apib$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) api.c crc32b$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) crc32.c crctabb$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) crctab.c cryptb$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) crypt.c explodeb$(OBJ): explode.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) explode.c extractb$(OBJ): extract.c $(UNZIP_H) crypt.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) extract.c fileiob$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) fileio.c globalsb$(OBJ): globals.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) globals.c inflateb$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) inflate.c listb$(OBJ): list.c $(UNZIP_H) $(WINDLL_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) list.c matchb$(OBJ): match.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) match.c processb$(OBJ): process.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) process.c unreducb$(OBJ): unreduce.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) unreduce.c unshrnkb$(OBJ): unshrink.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) unshrink.c zipinfob$(OBJ): zipinfo.c $(UNZIP_H) $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) zipinfo.c win32b$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. win32/win32.c ntb$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. win32/nt.c windllb$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. windll/windll.c clean: $(RM) *$(OBJ) $(RM) *$(EXE) *[UNZIP542.WIN32]MAKEFILE.LCC;1+,./ 4- '0@123KPWO56Y[a7Y[a89GHJ# Makefile for UnZip, fUnZip and UnZipSFX using LCC-Win32. # By E-Yen Tan (3 June 1998). # Last updated 14 January 2001 (Christian Spieler). # # This version includes rules to build the 32-bit windll DLL. # This compiler evaluates #include locations relative to current working dir, # not relative to the location of the file containing the #include directive. # As a consequence, a "-Iwin32" option is required to allow compilation of # the WIN32 specific sources. CC=lcc CCFLAGS=-Zp8 -O -DWIN32 $(AS_FLAGS) #DLLFLAG= DLLFLAG=-DWINDLL -DDLL -I./windll AS=lcc ASFLAGS= LD = lcclnk #DLLLDFLAG= DLLLDFLAG=-dll -entry DllMain LDFLAGS=-s -o ./ LDFLAGS2= OUT=-Fo OBJ=.obj CP=copy RM=del # Optional macros should be declared below. # (LCC's Make is unable to read the LOCAL_UNZIP environment variable.) LOC = $(ASMFLG) # Options to select optimized assembler code for CRC32 calculation. #ifdef NOASM #ASMFLG= #CRC32=crc32 #CRC32F=crc32f #CRC32L=crc32l #CRC32G=crc32g #CRC32X=crc32_ #else ASMFLG=-DASM_CRC CRC32=crc_lcc CRC32F=crc_lcc CRC32L=crc_lcc CRC32G=crc_lcc CRC32X=crc_lcc #endif CFLAGS = $(CCFLAGS) $(LOC) CFLAGS_UN = $(CFLAGS) CFLAGS_SX = $(CFLAGS) -DSFX CFLAGS_FU = $(CFLAGS) -DFUNZIP CFLAGS_DL = $(CFLAGS) $(DLLFLAG) CFLAGS_SL = $(CFLAGS) $(DLLFLAG) -DUNZIPLIB -DSFX CFLAGS_GX = $(CFLAGS) -I./windll -I./windll/guisfx -DSFX # The system specific files are defined here: OBJUS=win32$(OBJ) nt$(OBJ) OBJXS=win32_$(OBJ) nt_$(OBJ) OBJFS=win32f$(OBJ) OBJDS=win32l$(OBJ) ntl$(OBJ) OBLXS=win32g$(OBJ) ntg$(OBJ) windllg$(OBJ) OSDEP_H=win32/w32cfg.h WINDLL_H=windll/windll.h windll/structs.h windll/decs.h DLLDEF=.\windll\windllgcc.def # lcclink requires backslashes as dir-sep!! WINDLL_IMP_H = windll/decs.h windll/structs.h OBJU1 = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) OBJU3 = inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) OBJU4 = unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJUS) OBJX1 = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) OBJX2 = extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) OBJX3 = match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS) OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ globalsf$(OBJ) ttyiof$(OBJ) $(OBJFS) OBJDLL = windll$(OBJ) windll32.res api$(OBJ) OBJD1 = $(CRC32L)$(OBJ) crctabl$(OBJ) cryptl$(OBJ) OBJD2 = explodel$(OBJ) extractl$(OBJ) fileiol$(OBJ) globalsl$(OBJ) OBJD3 = inflatel$(OBJ) koh J;7AL l6O:$Yab .`io4VPaTJdW)<I,#rr+t_-gCM&'KYEx $<\N6D.G+a0Ak,`pKvvV-R]A@%deAttjlJL?`Q| wV8%gLkJya&")broddve$x" s{r/->H]t{|WDr&\ [)1f%!B"4y%"OS"w}r`]M G^G!IqY>>W'T'k`rrZ\;t/$:(IdM2ss ,^V[fp+,7vc xH1%=O!dpHe*AD$+ W/G=~1$k0^,5GT 8P;<97@~Hx R}zsNApA9W%J3GRiCg~jh64VA" P4>c:5R-}y !f i,}^f ^QKB|jW!GMAF+H/b&"Ll03X;&aAolC|<1 x+| ",-:?#kGLULhsy($bD CFhL_YDp/f I Gbdyaz>Ћ~0b~Sqn(by{{zf%fOTOYhDwc s:|)< Ic&N}2 %DmF' `pgXe#*X9bQ>l}7mmw5h!>N<*aoNuD&H9PT|G2j)Enw44aoU% Svd_nfn#3f?$[?Iig9jarVY @WLE`QVRZ>r|)1[6-:( A!Sz:b,< yr+ %0QKsN .5pUICop'S*ECn@@kWQB\5IiD"xGef)i9#HUI9T'v V4T$^PLa}Vl(.[Sm h* kMX h?/pTKyV:y-%> C|"A G_+1, MT LZ Fo)0*t:gFW3ms ,U+I?*eZ41f kr[O %hpt=jOuJm-(tgvxy+lpsm.&":K& M!F TQbe(/7OU8m1/N#d4EKgkBJ^}'T/u#t[ *I#:j%)#R/^q&{=)ma)K[1 #H@%n.1DBY47~W:_QFQ! wlk]{;RK=;96M .JJMi H>M|t2\w/C(NKG36^nHB.YHiu^c"hI`OvgMMQ= Q, }<\BjPHhWR8P%fisM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OBJD = $(OBJDLL) $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJDS) OBLX1 = apig$(OBJ) $(CRC32G)$(OBJ) crctabg$(OBJ) cryptg$(OBJ) OBLX2 = extractg$(OBJ) fileiog$(OBJ) globalsg$(OBJ) inflateg$(OBJ) OBLX3 = matchg$(OBJ) processg$(OBJ) OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBLXS) OBGX = sfxwiz$(OBJ) UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) # rules .SUFFIXES: .c $(OBJ) .c$(OBJ): $(CC) -c $(CFLAGS_UN) $(OUT)$@ $< .asm$(OBJ): $(AS) $(ASFLAGS) $(OUT)$@ $< # targets unzips: unzip.exe funzip.exe unzipsfx.exe dll: unzip32.dll dllsample: uzexampl.exe guisfx: SFXWiz32.exe all: unzips dll dllsample guisfx unzip.exe: $(OBJU) $(LD) $(LDFLAGS)$@ $(DEF) $(OBJU) $(LDFLAGS2) funzip.exe: $(OBJF) $(LD) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2) unzipsfx.exe: $(OBJX) $(LD) $(LDFLAGS)$@ $(DEF) $(OBJX) $(LDFLAGS2) unzip32.dll: $(DLLDEF) $(OBJD) $(LD) $(DLLLDFLAG) $(LDFLAGS)$@ $(DLLDEF) $(OBJD) $(LDFLAGS2) unzsfx32.lib: $(OBLX) lcclib $@ $(OBLX) SFXWiz32.exe: $(OBGX) sfxwiz.res unzsfx32.lib $(LD) -subsystem windows $(LDFLAGS)$@ \ $(OBGX) sfxwiz.res unzsfx32.lib uzexampl.exe: uzexampl$(OBJ) $(LD) $(LDFLAGS)$@ $(DEF) uzexampl$(OBJ) version.lib $(LDFLAGS2) # dependencies api$(OBJ): api.c $(UNZIP_H) version.h apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crctab$(OBJ): crctab.c $(UNZIP_H) zip.h envargs$(OBJ): envargs.c $(UNZIP_H) explode$(OBJ): explode.c $(UNZIP_H) extract$(OBJ): extract.c $(UNZIP_H) crypt.h fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h globals$(OBJ): globals.c $(UNZIP_H) inflate$(OBJ): inflate.c $(UNZIP_H) list$(OBJ): list.c $(UNZIP_H) match$(OBJ): match.c $(UNZIP_H) process$(OBJ): process.c $(UNZIP_H) ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h unreduce$(OBJ): unreduce.c $(UNZIP_H) unshrink$(OBJ): unshrink.c $(UNZIP_H) unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h zipinfo$(OBJ): zipinfo.c $(UNZIP_H) funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(CC) -c $(CFLAGS) $(OUT)$@ funzip.c uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h $(CC) -c $(CFLAGS_UN) -I./windll $(OUT)$@ windll/uzexampl.c win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h version.h $(CC) -c $(CFLAGS_UN) -Iwin32 $(OUT)$@ win32/win32.c nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_UN) -Iwin32 $(OUT)$@ win32/nt.c crc_lcc$(OBJ): win32/crc_lcc.asm $(AS) $(ASFLAGS) $(OUT)$@ win32/crc_lcc.asm crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_UN) $(OUT)$@ crypt.c crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_FU) $(OUT)$@ crc32.c cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_FU) $(OUT)$@ crypt.c globalsf$(OBJ): globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_FU) $(OUT)$@ globals.c inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_FU) $(OUT)$@ inflate.c ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_FU) $(OUT)$@ ttyio.c win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_FU) -Iwin32 $(OUT)$@ win32/win32.c crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ crc32.c crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ crctab.c crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ crypt.c extract_$(OBJ): extract.c $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ extract.c fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ fileio.c globals_$(OBJ): globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) $(OUT)$@ globals.c inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ inflate.c match_$(OBJ): match.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) $(OUT)$@ match.c process_$(OBJ): process.c $(UNZIP_H) $(CC) -c $(CFLAGS_SX) $(OUT)$@ process.c ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ ttyio.c unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h $(CC) -c $(CFLAGS_SX) $(OUT)$@ unzip.c win32_$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_SX) -Iwin32 $(OUT)$@ win32/win32.c nt_$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_SX) -Iwin32 $(OUT)$@ win32/nt.c # DLL compilation section api$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) $(CFLAGS_DL) $(OUT)$@ api.c crc32l$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ crc32.c crctabl$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ crctab.c cryptl$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ crypt.c explodel$(OBJ): explode.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ explode.c extractl$(OBJ): extract.c $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ extract.c fileiol$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ fileio.c globalsl$(OBJ): globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ globals.c inflatel$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ inflate.c listl$(OBJ): list.c $(UNZIP_H) $(WINDLL_H) $(CC) $(CFLAGS_DL) $(OUT)$@ list.c matchl$(OBJ): match.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ match.c processl$(OBJ): process.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ process.c unreducl$(OBJ): unreduce.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ unreduce.c unshrnkl$(OBJ): unshrink.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ unshrink.c zipinfol$(OBJ): zipinfo.c $(UNZIP_H) $(CC) -c $(CFLAGS_DL) $(OUT)$@ zipinfo.c win32l$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_DL) -Iwin32 $(OUT)$@ win32/win32.c ntl$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_DL) -Iwin32 $(OUT)$@ win32/nt.c windll$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) -c $(CFLAGS_DL) $(OUT)$@ windll/windll.c windll32.res: windll/windll.rc - lrc -v -m -r $(DLLFLAG) -DWIN32 -o$@ windll/windll.rc # SFX Lib compilation section apig$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) version.h $(CC) $(CFLAGS_SL) $(OUT)$@ api.c crc32g$(OBJ): crc32.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ crc32.c crctabg$(OBJ): crctab.c $(UNZIP_H) zip.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ crctab.c cryptg$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ crypt.c extractg$(OBJ): extract.c $(UNZIP_H) $(WINDLL_H) crypt.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ extract.c fileiog$(OBJ): fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ fileio.c globalsg$(OBJ): globals.c $(UNZIP_H) $(CC) -c $(CFLAGS_SL) $(OUT)$@ globals.c inflateg$(OBJ): inflate.c inflate.h $(UNZIP_H) $(CC) -c $(CFLAGS_SL) $(OUT)$@ inflate.c matchg$(OBJ): match.c $(UNZIP_H) $(CC) -c $(CFLAGS_SL) $(OUT)$@ match.c processg$(OBJ): process.c $(UNZIP_H) $(WINDLL_H) $(CC) -c $(CFLAGS_SL) $(OUT)$@ process.c win32g$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_SL) -Iwin32 $(OUT)$@ win32/win32.c ntg$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h $(CC) -c $(CFLAGS_SL) -Iwin32 $(OUT)$@ win32/nt.c windllg$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h version.h consts.h $(CC) -c $(CFLAGS_SL) $(OUT)$@ windll/windll.c sfxwiz$(OBJ): windll/guisfx/sfxwiz.c windll/guisfx/dialog.h $(WINDLL_IMP_H) $(CC) -c $(CFLAGS_GX) $(OUT)$@ windll/guisfx/sfxwiz.c sfxwiz.res: windll/guisfx/sfxwiz.rc - lrc -v -m -r -Iwindll/guisfx -DWIN32 -o$@ windll/guisfx/sfxwiz.rc $" UNZIP.BCK '[UNZIP542.WIN32]MAKEFILE.WAT;1XP_OLB;1f*[UNZIP542.WIN32]MAKEFILE.WAT;1+,./ 4- '0@123KPWO56dM]7dM]89GHJ# WMAKE makefile for Windows 95 and Windows NT (Intel only) # using Watcom C/C++ v11.0+, by Paul Kienitz, last revised 07 Jan 01. # Makes UnZip.exe, fUnZip.exe, and UnZipSFX.exe. # # Invoke from UnZip source dir with "WMAKE -F WIN32\MAKEFILE.WAT [targets]" # To build with debug info use "WMAKE DEBUG=1 ..." # To build with no assembly modules use "WMAKE NOASM=1 ..." # To support unshrinking use "WMAKE LAWSUIT=1 ..." # To support unreducing, get the real unreduce.c and go "WMAKE OFFEND_RMS=1 ..." # # Other options to be fed to the compiler can be specified in an environment # variable called LOCAL_UNZIP. variation = $(%LOCAL_UNZIP) # Stifle annoying "Delete this file?" questions when errors occur: .ERASE .EXTENSIONS: .EXTENSIONS: .exe .obj .obx .c .h .asm # We maintain multiple sets of object files in different directories so that # we can compile msdos, dos/4gw or pmode/w, and win32 versions of UnZip without # their object files interacting. The following var must be a directory name # ending with a backslash. All object file names must include this macro # at the beginning, for example "$(O)foo.obj". !ifdef DEBUG O = od32w\ # comment here so backslash won't continue the line !else O = ob32w\ # likewise !endif !ifdef LAWSUIT cvars = $+$(cvars)$- -DUSE_UNSHRINK avars = $+$(avars)$- -DUSE_UNSHRINK # "$+$(foo)$-" means expand foo as it has been defined up to now; normally, # this Make defers inner expansion until the outer macro is expanded. !endif !ifdef OFFEND_RMS cvars = $+$(cvars)$- -DUSE_SMITH_CODE avars = $+$(avars)$- -DUSE_SMITH_CODE !endif # The assembly hot-spot code in crc_i386.asm is optional. This section # controls its usage. !ifdef NOASM crcob = $(O)crc32.obj !else # !NOASM cvars = $+$(cvars)$- -DASM_CRC crcob = $(O)crc_i386.obj !endif # Our object files. OBJS is for UnZip, OBJX for UnZipSFX, OBJF for fUnZip: OBJS1 = $(O)unzip.obj $(crcob) $(O)crctab.obj $(O)crypt.obj $(O)envargs.obj OBJS2 = $(O)explode.obj $(O)extract.obj $(O)fileio.obj $(O)globals.obj OBJS3 = $(O)inflate.obj $(O)list.obj $(O)match.obj $(O)process.obj OBJS4 = $(O)ttyio.obj $(O)unreduce.obj $(O)unshrink.obj $(O)zipinfo.obj OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(O)win32.obj $(O)nt.obj OBJX1 = $(O)unzip.obx $(crcob) $(O)crctab.obx $(O)crypt.obx $(O)extract.obx OBJX2 = $(O)fileio.obx $(O)globals.obx $(O)inflate.obx $(O)match.obx OBJX3 = $(O)process.obx $(O)ttyio.obx OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(O)win32.obx $(O)nt.obx OBJF1 = $(O)funzip.obj $(crcob) $(O)cryptf.obj $(O)globalsf.obj OBJF = $(OBJF1) $(O)inflatef.obj $(O)ttyiof.obj $(O)win32f.obj UNZIP_H = unzip.h unzpriv.h globals.h win32\w32cfg.h # Now we have to pick out the proper compiler and options for it. cc = wcc386 link = wlink asm = wasm # Use Pentium Pro timings, register args, static strings in code, high strictness: cflags = -bt=NT -6r -zt -zq -wx aflags = -bt=NT -mf -3 -zq lflags = sys NT cvars = $+$(cvars)$- -DWIN32 $(variation) avars = $+$(avars)$- $(variation) # Specify optimizations, or a nonoptimized debugging version: !ifdef DEBUG cdebug = -od -d2 cdebux = -od -d2 ldebug = d w all op symf !else cdebug = -s -obhikl+rt -oe=100 -zp8 cdebux = -s -obhiklrs # -oa helps slightly but might be dangerous. ldebug = op el !endif # How to compile sources: .c.obx: $(cc) $(cdebux) $(cflags) $(cvars) -DSFX $[@ -fo=$@ .c.obj: $(cc) $(cdebug) $(cflags) $(cvars) $[@ -fo=$@ # Here we go! By default, make all targets: all: UnZip.exe fUnZip.exe UnZipSFX.exe # Convenient shorthand options for single targets: u: UnZip.exe .SYMBOLIC f: fUnZip.exe .SYMBOLIC x: UnZipSFX.exe .SYMBOLIC UnZip.exe: $(OBJS) $(link) $(lflags) $(ldebug) name $@ file {$(OBJS)} UnZipSFX.exe: $(OBJX) $(link) $(lflags) $(ldebug) name $@ file {$(OBJX)} fUnZip.exe: $(OBJF) $(link) $(lflags) $(ldebug) name $@ file {$(OBJF)} uzexampl.exe: $(O)uzexampl.obj $(link) $(lflags) $(ldebug) name $@ file {$(O)uzexampl.obj} # Source dependencies: # generic (UnZip, fUnZip): $(O)crc32.obj: crc32.c $(UNZIP_H) zip.h $(O)crctab.obj: crctab.c $(UNZIP_H) zip.h $(O)crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)envargs.obj: envargs.c $(UNZIP_H) $(O)explode.obj: explode.c $(UNZIP_H) $(O)extract.obj: extract.c $(UNZIP_H) crypt.h $(O)fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(O)funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h $(O)globals.obj: globals.c $(UNZIP_H) $(O)inflate.obj: inflate.c inflate.h $(UNZIP_H) $(O)list.obj: list.c $(UNZIP_H) $(O)match.obj: match.c $(UNZIP_H) $(O)process.obj: process.c $(UNZIP_H) $(O)ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)unreduce.obj: unreduce.c $(UNZIP_H) $(O)unshrink.obj: unshrink.c $(UNZIP_H) $(O)unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h $(O)zipinfo.obj: zipinfo.c $(UNZIP_H) # UnZipSFX variants: $(O)crc32.obx: crc32.c $(UNZIP_H) zip.h $(O)crctab.obx: crctab.c $(UNZIP_H) zip.h $(O)crypt.obx: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)extract.obx: extract.c $(UNZIP_H) crypt.h $(O)fileio.obx: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h $(O)globals.obx: globals.c $(UNZIP_H) $(O)inflate.obx: inflate.c inflate.h $(UNZIP_H) $(O)match.obx: match.c $(UNZIP_H) $(O)process.obx: process.c $(UNZIP_H) $(O)ttyio.obx: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(O)unzip.obx: unzip.c $(UNZIP_H) crypt.h version.h consts.h # Special case object files: $(O)win32.obj: win32\win32.c $(UNZIP_H) $(cc) $(cdebug) $(cflags) $(cvars) win32\win32.c -fo=$@ $(O)win32.obx: win32\win32.c $(UNZIP_H) $(cc) $(cdebux) $(cflags) $(cvars) -DSFX win32\win32.c -fo=$@ $(O)nt.obj: win32\nt.c $(UNZIP_H) win32\nt.h $(cc) $(cdebug) $(cflags) $(cvars) win32\nt.c -fo=$@ $(O)nt.obx: win32\nt.c $(UNZIP_H) win32\nt.h $(cc) $(cdebux) $(cflags) $(cvars) -DSFX win32\nt.c -fo=$@ $(O)crc_i386.obj: win32\crc_i386.asm $(asm) $(aflags) $(avars) win32\crc_i386.asm -fo=$@ # Variant object files for fUnZip: $(O)cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt.c -fo=$@ $(O)globalsf.obj: globals.c $(UNZIP_H) $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP globals.c -fo=$@ $(O)inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate.c -fo=$@ $(O)ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP ttyio.c -fo=$@ $(O)win32f.obj: win32\win32.c $(UNZIP_H) $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP win32\win32.c -fo=$@ # Windll command line example: $(O)uzexampl.obj: windll\uzexampl.c windll\uzexampl.h $(cc) $(cdebug) $(cflags) $(cvars) windll\uzexampl.c -fo=$@ # Unwanted file removal: clean: .SYMBOLIC del $(O)*.ob? cleaner: clean .SYMBOLIC del UnZip.exe del fUnZip.exe del UnZipSFX.exe *[UNZIP542.WIN32]NT.C;1+, .'/ 4'':- '0@123KPWO(56R 7R 89GHJ  UNZIP.BCK  '[UNZIP542.WIN32]NT.C;1]UNZIP.AXP_OLB;1'=/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Copyright (c) 1996 Scott Field (dedicated to Info-Zip group) Module Name: nt.c Abstract: This module implements WinNT security descriptor operations for the Win32 Info-ZIP project. Operation such as setting file security, using/querying local and remote privileges, and queuing of operations is performed here. The contents of this module are only relevant when the code is running on Windows NT, and the target volume supports persistent Acl storage. User privileges that allow accessing certain privileged aspects of the security descriptor (such as the Sacl) are only used if the user specified to do so. Author: Scott Field (sfield@microsoft.com) Last revised: 18 Jan 97 */ #define WIN32_LEAN_AND_MEAN #define UNZIP_INTERNAL #include "../unzip.h" #include #ifdef __RSXNT__ # include "../win32/rsxntwin.h" #endif #include "../win32/nt.h" #ifdef NTSD_EAS /* This file is only needed for NTSD handling */ /* Borland C++ does not define FILE_SHARE_DELETE. Others also? */ #ifndef FILE_SHARE_DELETE # define FILE_SHARE_DELETE 0x00000004 #endif /* private prototypes */ static BOOL Initialize(VOID); #if 0 /* currently unused */ static BOOL Shutdown(VOID); #endif static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer); static VOID GetRemotePrivilegesSet(CHAR *FileName, PDWORD dwRemotePrivileges); static VOID InitLocalPrivileges(VOID); BOOL bInitialized = FALSE; /* module level stuff initialized? */ HANDLE hInitMutex = NULL; /* prevent multiple initialization */ BOOL g_bRestorePrivilege = FALSE; /* for local set file security override */ BOOL g_bSaclPrivilege = FALSE; /* for local set sacl operations, only when restore privilege not present */ /* our single cached volume capabilities structure that describes the last volume root we encountered. A single entry like this works well in the zip/unzip scenario for a number of reasons: 1. typically one extraction path during unzip. 2. typically process one volume at a time during zip, and then move on to the next. 3. no cleanup code required and no memory leaks. 4. simple code. This approach should be reworked to a linked list approach if we expect to be called by many threads which are processing a variety of input/output volumes, since lock contention and stale data may become a bottleneck. */ VOLUMECAPS g_VolumeCaps; CRITICAL_SECTION VolumeCapsLock; /* our deferred set structure linked list element, used for making a copy of input data which is used at a later time to process the original input at a time when it makes more sense. eg, applying security to newly created directories, after all files have been placed in such directories. */ CRITICAL_SECTION SetDeferLock; typedef struct _DEFERRED_SET { struct _DEFERRED_SET *Next; uch *buffer; /* must point to DWORD aligned block */ PVOLUMECAPS VolumeCaps; char *resource; } DEFERRED_SET, *PDEFERRED_SET, *LPDEFERRED_SET; PDEFERRED_SET pSetHead = NULL; PDEFERRED_SET pSetTail; static BOOL Initialize(VOID) { HANDLE hMutex; HANDLE hOldMutex; if(bInitialized) return TRUE; hMutex = CreateMutex(NULL, TRUE, NULL); if(hMutex == NULL) return FALSE; hOldMutex = (HANDLE)InterlockedExchange((LPLONG)&hInitMutex, (LONG)hMutex); if(hOldMutex != NULL) { /* somebody setup the mutex already */ InterlockedExchange((LPLONG)&hInitMutex, (LONG)hOldMutex); CloseHandle(hMutex); /* close new, un-needed mutex */ /* wait for initialization to complete and return status */ WaitForSingleObject(hOldMutex, INFINITE); ReleaseMutex(hOldMutex); return bInitialized; } /* initialize module level resources */ InitializeCriticalSection( &SetDeferLock ); InitializeCriticalSection( &VolumeCapsLock ); memset(&g_VolumeCaps, 0, sizeof(VOLUMECAPS)); InitLocalPrivileges(); bInitialized = TRUE; ReleaseMutex(hMutex); /* release correct mutex */ return TRUE; } #if 0 /* currently not used ! */ static BOOL Shutdown(VOID) { /* really need to free critical sections, disable enabled privilges, etc, but doing so brings up possibility of race conditions if those resources are about to be used. The easiest way to handle this is let these resources be freed when the process terminates... */ return TRUE; } #endif /* never */ static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer) { PDEFERRED_SET psd; DWORD cbDeferSet; DWORD cbResource; DWORD cbBuffer; if(!bInitialized) if(!Initialize()) return FALSE; cbResource = lstrlenA(resource) + 1; cbBuffer = GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)buffer); cbDeferSet = sizeof(DEFERRED_SET) + cbBuffer + sizeof(VOLUMECAPS) + cbResource; psd = (PDEFERRED_SET)HeapAlloc(GetProcessHeap(), 0, cbDeferSet); if(psd == NULL) return FALSE; psd->Next = NULL; psd->buffer = (uch *)(psd+1); psd->VolumeCaps = (PVOLUMECAPS)((char *)psd->buffer + cbBuffer); psd->resource = (char *)((char *)psd->VolumeCaps + sizeof(VOLUMECAPS)); memcpy(psd->buffer, buffer, cbBuffer); memcpy(psd->VolumeCaps, VolumeCaps, sizeof(VOLUMECAPS)); psd->VolumeCaps->bProcessDefer = TRUE; memcpy(psd->resource, resource, cbResource); /* take defer lock */ EnterCriticalSection( &SetDeferLock ); /* add element at tail of list */ if(pSetHead == NULL) { pSetHead = psd; } else { pSetTail->Next = psd; } pSetTail = psd; /* release defer lock */ LeaveCriticalSection( &SetDeferLock ); return TRUE; } BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed, PDWORD dwDirectoryFail, PDWORD dwBytesFail) { PDEFERRED_SET This; PDEFERRED_SET Next; *dwDirectoryCount = 0; *dwBytesProcessed = 0; *dwDirectoryFail = 0; *dwBytesFail = 0; if(!bInitialized) return TRUE; /* nothing to do */ EnterCriticalSection( &SetDeferLock ); This = pSetHead; while(This) { if(SecuritySet(This->resource, This->VolumeCaps, This->buffer)) { (*dwDirectoryCount)++; *dwBytesProcessed += GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); } else { (*dwDirectoryFail)++; *dwBytesFail += GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); } Next = This->Next; HeapFree(GetProcessHeap(), 0, This); This = Next; } pSetHead = NULL; LeaveCriticalSection( &SetDeferLock ); return TRUE; } BOOL ValidateSecurity(uch *securitydata) { PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; PACL pAcl; PSID pSid; BOOL bAclPresent; BOOL bDefaulted; if(!IsWinNT()) return TRUE; /* don't do anything if not on WinNT */ if(!IsValidSecurityDescriptor(sd)) return FALSE; /* verify Dacl integrity */ if(!GetSecurityDescriptorDacl(sd, &bAclPresent, &pAcl, &bDefaulted)) return FALSE; if(bAclPresent) { if(!IsValidAcl(pAcl)) return FALSE; } /* verify Sacl integr UNZIP.BCK  '[UNZIP542.WIN32]NT.C;1]UNZIP.AXP_OLB;1'sity */ if(!GetSecurityDescriptorSacl(sd, &bAclPresent, &pAcl, &bDefaulted)) return FALSE; if(bAclPresent) { if(!IsValidAcl(pAcl)) return FALSE; } /* verify owner integrity */ if(!GetSecurityDescriptorOwner(sd, &pSid, &bDefaulted)) return FALSE; if(pSid != NULL) { if(!IsValidSid(pSid)) return FALSE; } /* verify group integrity */ if(!GetSecurityDescriptorGroup(sd, &pSid, &bDefaulted)) return FALSE; if(pSid != NULL) { if(!IsValidSid(pSid)) return FALSE; } return TRUE; } static VOID GetRemotePrivilegesSet(char *FileName, PDWORD dwRemotePrivileges) { HANDLE hFile; *dwRemotePrivileges = 0; /* see if we have the SeRestorePrivilege */ hFile = CreateFileA( FileName, ACCESS_SYSTEM_SECURITY | WRITE_DAC | WRITE_OWNER | READ_CONTROL, FILE_SHARE_READ | FILE_SHARE_DELETE, /* no sd updating allowed here */ NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); if(hFile != INVALID_HANDLE_VALUE) { /* no remote way to determine SeRestorePrivilege -- just try a read/write to simulate it */ SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION; PSECURITY_DESCRIPTOR sd; DWORD cbBuf = 0; GetKernelObjectSecurity(hFile, si, NULL, cbBuf, &cbBuf); if(ERROR_INSUFFICIENT_BUFFER == GetLastError()) { if((sd = HeapAlloc(GetProcessHeap(), 0, cbBuf)) != NULL) { if(GetKernelObjectSecurity(hFile, si, sd, cbBuf, &cbBuf)) { if(SetKernelObjectSecurity(hFile, si, sd)) *dwRemotePrivileges |= OVERRIDE_RESTORE; } HeapFree(GetProcessHeap(), 0, sd); } } CloseHandle(hFile); } else { /* see if we have the SeSecurityPrivilege */ /* note we don't need this if we have SeRestorePrivilege */ hFile = CreateFileA( FileName, ACCESS_SYSTEM_SECURITY, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, /* max */ NULL, OPEN_EXISTING, 0, NULL ); if(hFile != INVALID_HANDLE_VALUE) { CloseHandle(hFile); *dwRemotePrivileges |= OVERRIDE_SACL; } } } BOOL GetVolumeCaps( char *rootpath, /* filepath, or NULL */ char *name, /* filename associated with rootpath */ PVOLUMECAPS VolumeCaps /* result structure describing capabilities */ ) { char TempRootPath[MAX_PATH + 1]; DWORD cchTempRootPath = 0; BOOL bSuccess = TRUE; /* assume success until told otherwise */ if(!bInitialized) if(!Initialize()) return FALSE; /* process the input path to produce a consistent path suitable for compare operations and also suitable for certain picky Win32 API that don't like forward slashes */ if(rootpath != NULL && rootpath[0] != '\0') { DWORD i; cchTempRootPath = lstrlen(rootpath); if(cchTempRootPath > MAX_PATH) return FALSE; /* copy input, converting forward slashes to back slashes as we go */ for(i = 0 ; i <= cchTempRootPath ; i++) { if(rootpath[i] == '/') TempRootPath[i] = '\\'; else TempRootPath[i] = rootpath[i]; } /* check for UNC and Null terminate or append trailing \ as appropriate */ /* possible valid UNCs we are passed follow: \\machine\foo\bar (path is \\machine\foo\) \\machine\foo (path is \\machine\foo\) \\machine\foo\ \\.\c$\ (FIXFIX: Win32API doesn't like this - GetComputerName()) LATERLATER: handling mounted DFS drives in the future will require slightly different logic which isn't available today. This is required because directories can point at different servers which have differing capabilities. */ if(TempRootPath[0] == '\\' && TempRootPath[1] == '\\') { DWORD slash = 0; for(i = 2 ; i < cchTempRootPath ; i++) { if(TempRootPath[i] == '\\') { slash++; if(slash == 2) { i++; TempRootPath[i] = '\0'; cchTempRootPath = i; break; } } } /* if there was only one slash found, just tack another onto the end */ if(slash == 1 && TempRootPath[cchTempRootPath] != '\\') { TempRootPath[cchTempRootPath] = TempRootPath[0]; /* '\' */ TempRootPath[cchTempRootPath+1] = '\0'; cchTempRootPath++; } } else { if(TempRootPath[1] == ':') { /* drive letter specified, truncate to root */ TempRootPath[2] = '\\'; TempRootPath[3] = '\0'; cchTempRootPath = 3; } else { /* must be file on current drive */ TempRootPath[0] = '\0'; cchTempRootPath = 0; } } } /* if path != NULL */ /* grab lock protecting cached entry */ EnterCriticalSection( &VolumeCapsLock ); if(!g_VolumeCaps.bValid || lstrcmpi(g_VolumeCaps.RootPath, TempRootPath) != 0) { /* no match found, build up new entry */ DWORD dwFileSystemFlags; DWORD dwRemotePrivileges = 0; BOOL bRemote = FALSE; /* release lock during expensive operations */ LeaveCriticalSection( &VolumeCapsLock ); bSuccess = GetVolumeInformation( (TempRootPath[0] == '\0') ? NULL : TempRootPath, NULL, 0, NULL, NULL, &dwFileSystemFlags, NULL, 0); /* only if target volume supports Acls, and we were told to use privileges do we need to go out and test for the remote case */ if(bSuccess && (dwFileSystemFlags & FS_PERSISTENT_ACLS) && VolumeCaps->bUsePrivileges) { if(GetDriveType( (TempRootPath[0] == '\0') ? NULL : TempRootPath ) == DRIVE_REMOTE) { bRemote = TRUE; /* make a determination about our remote capabilities */ GetRemotePrivilegesSet(name, &dwRemotePrivileges); } } /* always take the lock again, since we release it below */ EnterCriticalSection( &VolumeCapsLock ); /* replace the existing data if successful */ if(bSuccess) { lstrcpynA(g_VolumeCaps.RootPath, TempRootPath, cchTempRootPath+1); g_VolumeCaps.bProcessDefer = FALSE; g_VolumeCaps.dwFileSystemFlags = dwFileSystemFlags; g_VolumeCaps.bRemote = bRemote; g_VolumeCaps.dwRemotePrivileges = dwRemotePrivileges; g_VolumeCaps.bValid = TRUE; } } if(bSuccess) { /* copy input elements */ g_VolumeCaps.bUsePrivileges = VolumeCaps->bUsePrivileges; g_VolumeCaps.dwFileAttributes = VolumeCaps->dwFileAttributes; /* give caller results */ memcpy(VolumeCaps, &g_VolumeCaps, sizeof(VOLUMECAPS)); } else { g_VolumeCaps.bValid = FALSE; } LeaveCriticalSection( &VolumeCapsLock ); /* release lock */ return bSuccess; } BOOL S UNZIP.BCK  '[UNZIP542.WIN32]NT.C;1]UNZIP.AXP_OLB;1'}ecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata) { HANDLE hFile; DWORD dwDesiredAccess = 0; DWORD dwFlags = 0; PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; SECURITY_DESCRIPTOR_CONTROL sdc; SECURITY_INFORMATION RequestedInfo = 0; DWORD dwRev; BOOL bRestorePrivilege = FALSE; BOOL bSaclPrivilege = FALSE; BOOL bSuccess; if(!bInitialized) if(!Initialize()) return FALSE; /* defer directory processing */ if(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if(!VolumeCaps->bProcessDefer) { return DeferSet(resource, VolumeCaps, securitydata); } else { /* opening a directory requires FILE_FLAG_BACKUP_SEMANTICS */ dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; } } /* evaluate the input security desriptor and act accordingly */ if(!IsValidSecurityDescriptor(sd)) return FALSE; if(!GetSecurityDescriptorControl(sd, &sdc, &dwRev)) return FALSE; /* setup privilege usage based on if told we can use privileges, and if so, what privileges we have */ if(VolumeCaps->bUsePrivileges) { if(VolumeCaps->bRemote) { /* use remotely determined privileges */ if(VolumeCaps->dwRemotePrivileges & OVERRIDE_RESTORE) bRestorePrivilege = TRUE; if(VolumeCaps->dwRemotePrivileges & OVERRIDE_SACL) bSaclPrivilege = TRUE; } else { /* use local privileges */ bRestorePrivilege = g_bRestorePrivilege; bSaclPrivilege = g_bSaclPrivilege; } } /* if a Dacl is present write Dacl out */ /* if we have SeRestorePrivilege, write owner and group info out */ if(sdc & SE_DACL_PRESENT) { dwDesiredAccess |= WRITE_DAC; RequestedInfo |= DACL_SECURITY_INFORMATION; if(bRestorePrivilege) { dwDesiredAccess |= WRITE_OWNER; RequestedInfo |= (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION); } } /* if a Sacl is present and we have either SeRestorePrivilege or SeSystemSecurityPrivilege try to write Sacl out */ if((sdc & SE_SACL_PRESENT) && (bRestorePrivilege || bSaclPrivilege)) { dwDesiredAccess |= ACCESS_SYSTEM_SECURITY; RequestedInfo |= SACL_SECURITY_INFORMATION; } if(RequestedInfo == 0) /* nothing to do */ return FALSE; if(bRestorePrivilege) dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; hFile = CreateFileA( resource, dwDesiredAccess, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,/* max sharing */ NULL, OPEN_EXISTING, dwFlags, NULL ); if(hFile == INVALID_HANDLE_VALUE) return FALSE; bSuccess = SetKernelObjectSecurity(hFile, RequestedInfo, sd); CloseHandle(hFile); return bSuccess; } static VOID InitLocalPrivileges(VOID) { HANDLE hToken; TOKEN_PRIVILEGES tp; /* try to enable some interesting privileges that give us the ability to get some security information that we normally cannot. note that enabling privileges is only relevant on the local machine; when accessing files that are on a remote machine, any privileges that are present on the remote machine get enabled by default. */ if(!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken)) return; tp.PrivilegeCount = 1; tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; if(LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid)) { /* try to enable SeRestorePrivilege; if this succeeds, we can write all aspects of the security descriptor */ if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && GetLastError() == ERROR_SUCCESS) g_bRestorePrivilege = TRUE; } /* try to enable SeSystemSecurityPrivilege, if SeRestorePrivilege not present; if this succeeds, we can write the Sacl */ if(!g_bRestorePrivilege && LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tp.Privileges[0].Luid)) { if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && GetLastError() == ERROR_SUCCESS) g_bSaclPrivilege = TRUE; } CloseHandle(hToken); } #endif /* NTSD_EAS */ *[UNZIP542.WIN32]NT.H;1+,3./ 4Q- '0@123KPWO56y 7y 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* nt.h: central header for EF_NTSD "SD" extra field */ #ifndef _NT_H #define _NT_H #define NTSD_BUFFERSIZE (1024) /* threshold to cause malloc() */ #define OVERRIDE_BACKUP 1 /* we have SeBackupPrivilege on remote */ #define OVERRIDE_RESTORE 2 /* we have SeRestorePrivilege on remote */ #define OVERRIDE_SACL 4 /* we have SeSystemSecurityPrivilege on remote */ typedef struct { BOOL bValid; /* are our contents valid? */ BOOL bProcessDefer; /* process deferred entry yet? */ BOOL bUsePrivileges; /* use privilege overrides? */ DWORD dwFileSystemFlags; /* describes target file system */ BOOL bRemote; /* is volume remote? */ DWORD dwRemotePrivileges; /* relevant only on remote volumes */ DWORD dwFileAttributes; char RootPath[MAX_PATH+1]; /* path to network / filesystem */ } VOLUMECAPS, *PVOLUMECAPS, *LPVOLUMECAPS; BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata); BOOL GetVolumeCaps(char *rootpath, char *name, PVOLUMECAPS VolumeCaps); BOOL ValidateSecurity(uch *securitydata); BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed, PDWORD dwDirectoryFail, PDWORD dwBytesFail); #endif /* _NT_H */ a*[UNZIP542.WIN32]RSXNTWIN.H;1+, . / 4 :- '0@123KPWO 56) 7) 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* rsxntwin.h * * fills some gaps in the rsxnt 1.3 win32 header files () that are * required for compiling Info-ZIP sources for Win NT / Win 95 */ #a UNZIP.BCK  '[UNZIP542.WIN32]RSXNTWIN.H;1.AXP_OLB;1 Rifdef __RSXNT__ #if !defined (_RSXNTWIN_H) #define _RSXNTWIN_H #ifdef TFUNCT /* TFUNCT is undefined when MSSDK headers are used */ #ifdef __cplusplus extern "C" { #endif #define PASCAL __stdcall #define ANYSIZE_ARRAY 1 #ifndef TIME_ZONE_ID_UNKNOWN # define TIME_ZONE_ID_UNKNOWN 0 #endif #ifndef TIME_ZONE_ID_INVALID # define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFFL #endif #define FILE_ATTRIBUTE_HIDDEN 0x00000002 #define FILE_ATTRIBUTE_SYSTEM 0x00000004 #define FILE_SHARE_DELETE 0x00000004 #define FILE_PERSISTENT_ACLS 0x00000008 #define HFILE_ERROR ((HFILE)-1) #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS BOOL WINAPI DosDateTimeToFileTime(WORD, WORD, LPFILETIME); #ifndef SetVolumeLabel #define SetVolumeLabel TFUNCT(SetVolumeLabel) #endif BOOL WINAPI SetVolumeLabel(LPCTSTR, LPCTSTR); #ifndef GetDriveType #define GetDriveType TFUNCT(GetDriveType) #endif DWORD GetDriveType(LPCTSTR); #define DRIVE_UNKNOWN 0 #define DRIVE_REMOVABLE 2 #define DRIVE_FIXED 3 #define DRIVE_REMOTE 4 #define DRIVE_CDROM 5 #define DRIVE_RAMDISK 6 #ifndef SearchPath #define SearchPath TFUNCT(SearchPath) #endif BOOL WINAPI SearchPath(LPCTSTR, LPCTSTR, LPCTSTR, UINT, LPTSTR, LPTSTR *); #define ERROR_SUCCESS 0 #define ERROR_INSUFFICIENT_BUFFER 122 LONG WINAPI InterlockedExchange(LPLONG, LONG); #define ACCESS_SYSTEM_SECURITY 0x01000000L typedef PVOID PSECURITY_DESCRIPTOR; typedef PVOID PSID; typedef struct _ACL { BYTE AclRevision; BYTE Sbz1; WORD AclSize; WORD AceCount; WORD Sbz2; } ACL; typedef ACL *PACL; typedef struct _LUID { DWORD LowPart; LONG HighPart; } LUID, *PLUID; typedef struct _LUID_AND_ATTRIBUTES { LUID Luid; DWORD Attributes; } LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES; typedef struct _TOKEN_PRIVILEGES { DWORD PrivilegeCount; LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES; #define TOKEN_QUERY 0x0008 #define TOKEN_ADJUST_PRIVILEGES 0x0020 BOOL WINAPI OpenProcessToken(HANDLE, DWORD, PHANDLE); BOOL WINAPI AdjustTokenPrivileges(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); #ifndef LookupPrivilegeValue #define LookupPrivilegeValue TFUNCT(LookupPrivilegeValue) #endif BOOL WINAPI LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID); typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION; #define OWNER_SECURITY_INFORMATION 0x00000001L #define GROUP_SECURITY_INFORMATION 0x00000002L #define DACL_SECURITY_INFORMATION 0x00000004L #define SACL_SECURITY_INFORMATION 0x00000008L typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL; #define SE_DACL_PRESENT 0x0004 #define SE_SACL_PRESENT 0x0010 #define SE_PRIVILEGE_ENABLED 0x00000002L #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege") #define SE_BACKUP_NAME TEXT("SeBackupPrivilege") #define SE_RESTORE_NAME TEXT("SeRestorePrivilege") BOOL WINAPI GetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR, DWORD, LPDWORD); BOOL WINAPI SetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR); BOOL WINAPI IsValidSid(PSID); BOOL WINAPI IsValidAcl(PACL); BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR); BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR); DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR); BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL, LPDWORD); BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL); BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, LPBOOL, PACL *, LPBOOL); BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL); BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, LPBOOL, PACL *, LPBOOL); BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL); BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID *, LPBOOL); BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID, BOOL); BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID *, LPBOOL); BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID, BOOL); VOID WINAPI InitializeCriticalSection(); #ifdef __cplusplus } #endif #endif /* TFUNCT */ #endif /* !defined (_RSXNTWIN_H) */ #endif /* __RSXNT__ */ *[UNZIP542.WIN32]W32CFG.H;1+, ./ 4- '0@123KPWO56Da7Da89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- Win32 specific configuration section: ---------------------------------------------------------------------------*/ #ifndef __w32cfg_h #define __w32cfg_h #if (defined(__CYGWIN32__) && !defined(__CYGWIN__)) # define __CYGWIN__ /* compatibility for CygWin B19 and older */ #endif #ifdef __CYGWIN__ /* Those Idiots at Cygnus have started to set "Unix" identifiers * for a Win32 compiler ... */ # ifdef UNIX # undef UNIX # endif #endif #if (defined(_MSC_VER) && !defined(MSC)) # define MSC #endif /* enable multibyte character set support by default */ #ifndef _MBCS # define _MBCS #endif #if (defined(__CYGWIN__) && defined(_MBCS)) # undef _MBCS /* CygWin RTL lacks support for __mb_cur_max */ #endif #include /* off_t, time_t, dev_t, ... */ #include #include /* read(), open(), etc. */ #include #if (defined(__RSXNT__) || defined(__EMX__)) && !defined(tzset) # define tzset _tzset #endif #ifdef __MINGW32__ extern void _tzset(void); /* this is missing in */ # ifndef tzset # define tzset _tzset # endif #endif #ifdef W32_USE_IZ_TIMEZONE # ifdef __BORLANDC__ # define tzname tzname # define IZTZ_DEFINESTDGLOBALS # endif # ifndef tzset # define tzset _tzset # endif # ifndef timezone # define timezone _timezone # endif # ifndef daylight # define daylight _daylight # endif # ifndef tzname # define tzname _tzname # endif # if (!defined(NEED__ISINDST) && !defined(__BORLANDC__)) # define NEED__ISINDST # endif # ifdef IZTZ_GETLOCALETZINFO # undef UNZIP.BCK  '[UNZIP542.WIN32]W32CFG.H;1IP.AXP_OLB;18 IZTZ_GETLOCALETZINFO # endif # define IZTZ_GETLOCALETZINFO GetPlatformLocalTimezone #endif #include #if (!defined(__RSXNT__) && !defined(__CYGWIN__)) # include /* mkdir() */ #endif #include #ifdef __CYGWIN__ # include extern int setmode(int, int); /* this is missing in */ #endif #if (defined(MSC) || defined(__WATCOMC__) || defined(__MINGW32__)) # include #else # include #endif #define GOT_UTIMBUF #ifdef _MBCS # if (!defined(__EMX__) && !defined(__MINGW32__) && !defined(__CYGWIN__)) # include # include /* for MSC (and compatible compilers), use routines supplied by RTL */ # define PREINCSTR(ptr) (ptr = (char *)_mbsinc((const uch *)(ptr))) # define MBSCHR(str, c) (char *)_mbschr((const uch *)(str), (c)) # define MBSRCHR(str, c) (char *)_mbsrchr((const uch *)(str), (c)) # endif # if (defined(__MINGW32__) && !defined(MB_CUR_MAX)) # ifdef __MSVCRT__ extern int *__p___mb_cur_max(void); # define MB_CUR_MAX (*__p___mb_cur_max()) # else extern int *_imp____mb_cur_max_dll; # define MB_CUR_MAX (*_imp____mb_cur_max_dll) # endif # endif # if (defined(__LCC__) && !defined(MB_CUR_MAX)) extern int *_imp____mb_cur_max; # define MB_CUR_MAX (*_imp____mb_cur_max) # endif #endif /* for UnZip, the "basic" part of the win32 api is sufficient */ #ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN #endif #if defined(__FILEIO_C) # ifndef __CYGWIN__ # include # endif # include # ifdef __RSXNT__ # include "../win32/rsxntwin.h" # endif # ifndef TIME_ZONE_ID_INVALID # define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFFL # endif #endif #if (defined(__ENVARGS_C) || defined(__EXTRACT_C) || defined(__UNZIP_C) || \ defined(ZCRYPT_INTERNAL)) # include # ifdef __RSXNT__ # include "../win32/rsxntwin.h" # endif # ifndef TIME_ZONE_ID_INVALID # define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFFL # endif #endif /* the following definitions are considered as "obsolete" by Microsoft and * might be missing in some versions of */ #ifndef AnsiToOem # define AnsiToOem CharToOemA #endif #ifndef OemToAnsi # define OemToAnsi OemToCharA #endif #define DIR_END '\\' /* OS uses '\\' as directory separator */ #define DIR_END2 '/' /* also check for '/' (RTL may convert) */ #ifdef DATE_FORMAT # undef DATE_FORMAT #endif #define DATE_FORMAT dateformat() #define lenEOL 2 #define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} #if (defined(__RSXNT__) && !defined(HAVE_MKTIME)) # define HAVE_MKTIME /* use mktime() in time conversion routines */ #endif #if (defined(MSC) && !defined(HAVE_MKTIME)) # define HAVE_MKTIME /* use mktime() in time conversion routines */ #endif #if (defined(__CYGWIN__) && defined(HAVE_MKTIME)) # undef HAVE_MKTIME /* Cygnus' mktime() implementation is buggy */ #endif #if (defined(W32_USE_IZ_TIMEZONE) && !defined(HAVE_MKTIME)) # define HAVE_MKTIME /* use mktime() in time conversion routines */ #endif #if (!defined(NT_TZBUG_WORKAROUND) && !defined(NO_NT_TZBUG_WORKAROUND)) # define NT_TZBUG_WORKAROUND #endif #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) # define USE_EF_UT_TIME #endif #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) # define TIMESTAMP #endif #if (!defined(NO_NTSD_EAS) && !defined(NTSD_EAS)) # define NTSD_EAS /* enable NTSD support unless explicitly suppressed */ #endif /* handlers for OEM <--> ANSI string conversions */ #ifdef __RSXNT__ /* RSXNT uses OEM coded strings in functions supplied by C RTL */ # ifdef CRTL_CP_IS_ISO # undef CRTL_CP_IS_ISO # endif # ifndef CRTL_CP_IS_OEM # define CRTL_CP_IS_OEM # endif #else /* "real" native WIN32 compilers use ANSI coded strings in C RTL calls */ # ifndef CRTL_CP_IS_ISO # define CRTL_CP_IS_ISO # endif # ifdef CRTL_CP_IS_OEM # undef CRTL_CP_IS_OEM # endif #endif #ifdef CRTL_CP_IS_ISO /* C RTL's file system support assumes ANSI coded strings */ # define ISO_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define OEM_TO_INTERN(src, dst) OemToAnsi(src, dst) # define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define INTERN_TO_OEM(src, dst) AnsiToOem(src, dst) #endif /* CRTL_CP_IS_ISO */ #ifdef CRTL_CP_IS_OEM /* C RTL's file system support assumes OEM coded strings */ # define ISO_TO_INTERN(src, dst) AnsiToOem(src, dst) # define OEM_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} # define INTERN_TO_ISO(src, dst) OemToAnsi(src, dst) # define INTERN_TO_OEM(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} #endif /* CRTL_CP_IS_OEM */ #define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1) #define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1) #ifndef WINDLL /* Despite best intentions, for the command-line version UzpPassword() * could return either character set, depending on whether running under * Win95 (DOS-session) or WinNT (native WinNT command interpreter)! */ # define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst) # define STR_TO_CP3(dst, src) (OemToAnsi(src, dst), dst) #else /* The WINDLL front end is known to supply ISO/ANSI-coded passwords! */ # define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst) #endif /* dummy defines to disable these functions, they are not needed */ #define STR_TO_OEM #define STR_TO_ISO /* Static variables that we have to add to Uz_Globs: */ #define SYSTEM_SPECIFIC_GLOBALS \ int created_dir, renamed_fullpath, fnlen;\ unsigned nLabelDrive;\ char lastRootPath[4];\ int lastVolOldFAT, lastVolLocTim;\ char *rootpath, *buildpathHPFS, *buildpathFAT, *endHPFS, *endFAT;\ ZCONST char *wildname;\ char *dirname, matchname[FILNAMSIZ];\ int rootlen, have_dirname, dirnamelen, notfirstcall;\ zvoid *wild_dir; /* created_dir, renamed_fullpath, fnlen, and nLabelDrive are used by */ /* both mapname() and checkdir(). */ /* lastRootPath, lastVolOldFAT and lastVolLocTim are used by */ /* IsVolumeOldFAT() and NTQueryVolInfo(). */ /* rootlen, rootpath, buildpathHPFS, buildpathFAT, endHPFS, and endFAT */ /* are used by checkdir(). */ /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ /* and notfirstcall are used by do_wild(). */ /* This replacement for C-RTL-supplied getch() (or similar) functionality * avoids leaving unabsorbed LFs in the keyboard buffer under Windows95, * and supports the +[0] feature. */ int getch_win32 OF((void)); /* This patch of stat() is useful for at least two compilers. It is */ /* difficult to take a stat() of a root directory under Windows95, so */ /* zstat_win32() detects that case and fills in suitable values. */ #ifndef __RSXNT__ # ifndef W32_STATROOT_FIX # define W32_STATROOT_FIX # endif #endif /* !__RSXNT__ */ /* Up to now, all versions of Microsoft C runtime libraries lack the support * for customized (non-US) switching rules between daylight saving time and * standard time in the TZ environment variable string. * But non-US timezone rules are correctly supported when timezone information * is read from the OS system settings in the Win32 registry. * The following work-around deletes any TZ environment setting from * the process environment. This results in a fallback of the RTL time * handling code to the (correctly inter83 UNZIP.BCK  '[UNZIP542.WIN32]W32CFG.H;1IP.AXP_OLB;1pretable) OS system settings, read * from the registry. */ #ifdef USE_EF_UT_TIME # if (defined(__WATCOMC__) || defined(W32_USE_IZ_TIMEZONE)) # define iz_w32_prepareTZenv() # else # define iz_w32_prepareTZenv() putenv("TZ=") # endif #endif #if (defined(NT_TZBUG_WORKAROUND) || defined(W32_STATROOT_FIX)) # define W32_STAT_BANDAID # if (defined(NT_TZBUG_WORKAROUND) && defined(REENTRANT)) # define __W32STAT_GLOBALS__ Uz_Globs *pG, # define __W32STAT_G__ pG, # else # define __W32STAT_GLOBALS__ # define __W32STAT_G__ # endif # ifdef SSTAT # undef SSTAT # endif # ifdef WILD_STAT_BUG # define SSTAT(path, pbuf) (iswild(path) || zstat_win32(__W32STAT_G__ path, pbuf)) # else # define SSTAT(path, pbuf) zstat_win32(__W32STAT_G__ path, pbuf) # endif #endif #ifdef __WATCOMC__ # ifdef __386__ # ifndef WATCOMC_386 # define WATCOMC_386 # endif # define __32BIT__ # undef far # define far # undef near # define near /* Get asm routines to link properly without using "__cdecl": */ # ifndef USE_ZLIB # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax] # pragma aux get_crc_table "_*" parm caller [] value [eax] \ modify [eax ecx edx] # endif /* !USE_ZLIB */ # endif /* __386__ */ # ifndef EPIPE # define EPIPE -1 # endif # define PIPE_ERROR (errno == EPIPE) #endif /* __WATCOMC__ */ #define SCREENWIDTH 80 #define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols) int screensize(int *tt_rows, int *tt_cols); /* on the DOS or NT console screen, line-wraps are always enabled */ #define SCREENLWRAP 1 #define TABSIZE 8 #endif /* !__w32cfg_h */ *[UNZIP542.WIN32]WIN32.C;1+,./ 4- '0@123KPWO56A(a7A(a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- win32.c 32-bit Windows-specific (NT/95) routines for use with Info-ZIP's UnZip 5.3 and later. Contains: GetLoadPath() Opendir() Readdir() Closedir() process_defer_NT() process any deferred items SetSD() set security descriptor on file EvalExtraFields() evaluate and process and extra field NOW IsWinNT() indicate type of WIN32 platform test_NTSD() test integrity of NT security data utime2FileTime() FStampIsLocTime() FileTime2utime() VFatFileTime2utime() UTCtime2Localtime() NTtzbugWorkaround() getNTfiletime() close_outfile() stamp_file() isfloppy() NTQueryVolInfo() IsVolumeOldFAT() do_wild() mapattr() mapname() maskDOSdevice() map2fat() checkdir() dateformat() version() screensize() zstat_win32() conv_to_rule() GetPlatformLocalTimezone() getch_win32() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "../unzip.h" #include /* must be AFTER unzip.h to avoid struct G problems */ #ifdef __RSXNT__ # include "../win32/rsxntwin.h" #endif #include "../win32/nt.h" #ifndef FUNZIP /* most of this file is not used with fUnZip */ #if (defined(__GO32__) || defined(__EMX__) || defined(__CYGWIN__)) # define MKDIR(path,mode) mkdir(path,mode) #else # define MKDIR(path,mode) mkdir(path) #endif #ifdef HAVE_WORKING_DIRENT_H # undef HAVE_WORKING_DIRENT_H #endif /* The emxrtl dirent support of (__GO32__ || __EMX__) converts to lowercase! */ #if defined(__CYGWIN__) # define HAVE_WORKING_DIRENT_H #endif #ifndef SFX # ifdef HAVE_WORKING_DIRENT_H # include /* use readdir() */ # define zdirent dirent # define zDIR DIR # define Opendir opendir # define Readdir readdir # define Closedir closedir # else /* !HAVE_WORKING_DIRENT_H */ typedef struct zdirent { char reserved [21]; char ff_attrib; short ff_ftime; short ff_fdate; long size; char d_name[MAX_PATH]; int d_first; HANDLE d_hFindFile; } zDIR; static zDIR *Opendir (const char *n); static struct zdirent *Readdir (zDIR *d); static void Closedir (zDIR *d); # endif /* ?HAVE_WORKING_DIRENT_H */ #endif /* !SFX */ /* Function prototypes */ #ifdef NTSD_EAS static int SetSD(__GPRO__ char *path, PVOLUMECAPS VolumeCaps, uch *eb_ptr, unsigned eb_len); static int EvalExtraFields(__GPRO__ char *path, uch *ef_ptr, unsigned ef_len); #endif #if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ defined(TIMESTAMP)) static void utime2FileTime(time_t ut, FILETIME *pft); static int FStampIsLocTime(__GPRO__ const char *path); #endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ #ifdef NT_TZBUG_WORKAROUND static int FileTime2utime(const FILETIME *pft, time_t *ut); #ifdef W32_STAT_BANDAID static int VFatFileTime2utime(const FILETIME *pft, time_t *ut); #endif static time_t UTCtime2Localtime(time_t utctime); static void NTtzbugWorkaround(time_t ut, FILETIME *pft); #endif /* NT_TZBUG_WORKAROUND */ static int getNTfiletime (__GPRO__ FILETIME *pModFT, FILETIME *pAccFT, FILETIME *pCreFT); static int isfloppy (int nDrive); static int NTQueryVolInfo (__GPRO__ const char *name); static int IsVolumeOldFAT (__GPRO__ const char *name); static void maskDOSdevice (__GPRO__ char *pathcomp); static void map2fat (char *pathcomp, char **pEndFAT); #ifdef __MINGW32__ int _CRT_glob = 0; /* suppress command line globbing by C RTL */ #endif /* static int created_dir; */ /* used by mapname(), checkdir() */ /* static int renamed_fullpath; */ /* ditto */ /* static int fnlen; */ /* ditto */ /* static unsigned nLabelDrive; */ /* ditto */ extern char Far TruncNTSD[]; /* in extract.c */ #ifdef SFX /**************************/ /* Function GetLoadPath() */ /**************************/ char *GetLoadPath(__GPRO) { #ifdef MSC extern char *_pgmptr; return _pgmptr; #else /* use generic API call */ GetModuleFileName(NULL, G.filename, FILNAMSIZ-1); _ISO_INTERN(G.H} UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1U filename); /* translate to codepage of C rtl's stdio */ return G.filename; #endif } /* end function GetLoadPath() */ #else /* !SFX */ #ifndef HAVE_WORKING_DIRENT_H /**********************/ /* Borrowed from ZIP 2.0 sources */ /* Function Opendir() */ /* Difference: no special handling for */ /**********************/ /* hidden or system files. */ static zDIR *Opendir(n) const char *n; /* directory to open */ { zDIR *d; /* malloc'd return value */ char *p; /* malloc'd temporary string */ WIN32_FIND_DATA fd; extent len = strlen(n); /* Start searching for files in directory n */ if ((d = (zDIR *)malloc(sizeof(zDIR))) == NULL || (p = malloc(strlen(n) + 5)) == NULL) { if (d != (zDIR *)NULL) free((void *)d); return (zDIR *)NULL; } INTERN_TO_ISO(n, p); if (len > 0) { if (p[len-1] == ':') p[len++] = '.'; /* x: => x:. */ else if (p[len-1] == '/' || p[len-1] == '\\') --len; /* foo/ => foo */ } strcpy(p+len, "/*"); if (INVALID_HANDLE_VALUE == (d->d_hFindFile = FindFirstFile(p, &fd))) { free((zvoid *)d); free((zvoid *)p); return NULL; } strcpy(d->d_name, fd.cFileName); free((zvoid *)p); d->d_first = 1; return d; } /* end of function Opendir() */ /**********************/ /* Borrowed from ZIP 2.0 sources */ /* Function Readdir() */ /* Difference: no special handling for */ /**********************/ /* hidden or system files. */ static struct zdirent *Readdir(d) zDIR *d; /* directory stream from which to read */ { /* Return pointer to first or next directory entry, or NULL if end. */ if ( d->d_first ) d->d_first = 0; else { WIN32_FIND_DATA fd; if ( !FindNextFile(d->d_hFindFile, &fd) ) return NULL; ISO_TO_INTERN(fd.cFileName, d->d_name); } return (struct zdirent *)d; } /* end of function Readdir() */ /***********************/ /* Function Closedir() */ /* Borrowed from ZIP 2.0 sources */ /***********************/ static void Closedir(d) zDIR *d; /* directory stream to close */ { FindClose(d->d_hFindFile); free(d); } #endif /* !HAVE_WORKING_DIRENT_H */ #endif /* ?SFX */ #ifdef NTSD_EAS /*********************************/ /* Function process_defer_NT() */ /*********************************/ void process_defer_NT(__G) __GDEF { /* process deferred items */ DWORD dir, bytes; DWORD dirfail, bytesfail; ProcessDefer(&dir, &bytes, &dirfail, &bytesfail); if (!uO.tflag && (uO.qflag < 2)) { if (dir) Info(slide, 0, ((char *)slide, " updated: %lu directory entries with %lu bytes security", (ulg)dir, (ulg)bytes)); if (dirfail) Info(slide, 0, ((char *)slide, " failed: %lu directory entries with %lu bytes security", (ulg)dirfail, (ulg)bytesfail)); } } /**********************/ /* Function SetSD() */ /* return almost-PK errors */ /**********************/ static int SetSD(__G__ path, VolumeCaps, eb_ptr, eb_len) __GDEF char *path; PVOLUMECAPS VolumeCaps; uch *eb_ptr; unsigned eb_len; { ulg ntsd_ucSize; uch *security_data; int error; if (eb_ptr == NULL || eb_len < EB_NTSD_L_LEN) return PK_OK; /* not a valid NTSD extra field: assume OK */ /* check if we know how to handle this version */ if (*(eb_ptr + (EB_HEADSIZE+EB_NTSD_VERSION)) > (uch)EB_NTSD_MAX_VER) return PK_OK; ntsd_ucSize = makelong(eb_ptr + (EB_HEADSIZE+EB_UCSIZE_P)); if (ntsd_ucSize > 0L && eb_len <= (EB_NTSD_L_LEN + EB_CMPRHEADLEN)) return IZ_EF_TRUNC; /* no compressed data! */ /* allocate storage for uncompressed data */ security_data = (uch *)malloc((extent)ntsd_ucSize); if (security_data == (uch *)NULL) return PK_MEM4; error = memextract(__G__ security_data, ntsd_ucSize, (eb_ptr + (EB_HEADSIZE+EB_NTSD_L_LEN)), (ulg)(eb_len - EB_NTSD_L_LEN)); if (error == PK_OK) { if (SecuritySet(path, VolumeCaps, security_data)) { error = PK_COOL; if (!uO.tflag && (uO.qflag < 2) && (!(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) Info(slide, 0, ((char *)slide, " (%ld bytes security)", ntsd_ucSize)); } } free(security_data); return error; } /********************************/ /* scan extra fields for something */ /* Function EvalExtraFields() */ /* we happen to know */ /********************************/ static int EvalExtraFields(__G__ path, ef_ptr, ef_len) __GDEF char *path; uch *ef_ptr; unsigned ef_len; { int rc = PK_OK; if (!uO.X_flag) return PK_OK; /* user said don't process ACLs; for now, no other extra block types are handled here */ while (ef_len >= EB_HEADSIZE) { unsigned eb_id = makeword(EB_ID + ef_ptr); unsigned eb_len = makeword(EB_LEN + ef_ptr); if (eb_len > (ef_len - EB_HEADSIZE)) { /* discovered some extra field inconsistency! */ Trace((stderr, "EvalExtraFields: block length %u > rest ef_size %u\n", eb_len, ef_len - EB_HEADSIZE)); break; } switch (eb_id) { /* process security descriptor extra data if: Caller is WinNT AND Target local/remote drive supports acls AND Target file is not a directory (else we defer processing until later) */ case EF_NTSD: if (IsWinNT()) { VOLUMECAPS VolumeCaps; /* provide useful input */ VolumeCaps.dwFileAttributes = G.pInfo->file_attr; VolumeCaps.bUsePrivileges = (uO.X_flag > 1); /* check target volume capabilities - just fall through * and try if fail */ if (GetVolumeCaps(G.rootpath, path, &VolumeCaps) && !(VolumeCaps.dwFileSystemFlags & FS_PERSISTENT_ACLS)) { rc = PK_OK; break; } rc = SetSD(__G__ path, &VolumeCaps, ef_ptr, eb_len); } else rc = PK_OK; break; #if 0 /* perhaps later we can add support for unzipping OS/2 EAs to NT */ case EF_OS2: rc = SetEAs(__G__ path, ef_ptr); break; #else /* ! 0 */ #ifdef DEBUG case EF_OS2: #endif /* DEBUG */ #endif /* ? 0 */ #ifdef DEBUG case EF_AV: case EF_PKVMS: case EF_PKW32: case EF_PKUNIX: case EF_IZVMS: case EF_IZUNIX: case EF_IZUNIX2: case EF_TIME: case EF_MAC3: case EF_JLMAC: case EF_ZIPIT: case EF_VMCMS: case EF_MVS: case EF_ACL: case EF_BEOS: case EF_QDOS: case EF_AOSVS: case EF_SPARK: case EF_MD5: case EF_ASIUNIX: break; /* shut up for other known e.f. blocks */ #endif /* DEBUG */ dYߗ UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1efault: Trace((stderr, "EvalExtraFields: unknown extra field block, ID=%u\n", eb_id)); break; } ef_ptr += (eb_len + EB_HEADSIZE); ef_len -= (eb_len + EB_HEADSIZE); if (rc != PK_OK) break; } return rc; } #ifndef SFX /**************************/ /* Function test_NTSD() */ /* returns PK_WARN when NTSD data is invalid */ /**************************/ #ifdef __BORLANDC__ /* Turn off warning about not using all parameters for this function only */ #pragma argsused #endif int test_NTSD(__G__ eb, eb_size, eb_ucptr, eb_ucsize) __GDEF uch *eb; unsigned eb_size; uch *eb_ucptr; ulg eb_ucsize; { int r = PK_OK; if (!ValidateSecurity(eb_ucptr)) r = PK_WARN; return r; } /* end function test_NTSD() */ #endif /* !SFX */ #endif /* NTSD_EAS */ /**********************/ /* Function IsWinNT() */ /**********************/ int IsWinNT(void) /* returns TRUE if real NT, FALSE if Win95 or Win32s */ { static DWORD g_PlatformId = 0xFFFFFFFF; /* saved platform indicator */ if (g_PlatformId == 0xFFFFFFFF) { /* note: GetVersionEx() doesn't exist on WinNT 3.1 */ if (GetVersion() < 0x80000000) g_PlatformId = TRUE; else g_PlatformId = FALSE; } return (int)g_PlatformId; } /* DEBUG_TIME insertion: */ #ifdef DEBUG_TIME static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft); static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft) { SYSTEMTIME w32tm; int rval; rval = FileTimeToSystemTime(pft, &w32tm); if (!rval) { fprintf(hdo, "%s\n %08lX,%08lX (%s) -> Conversion failed !!!\n", TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), (isloc ? "local" : "UTC")); } else { fprintf(hdo, "%s\n %08lx,%08lx -> %04u-%02u-%02u, %02u:%02u:%02u %s\n", TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), w32tm.wYear, w32tm.wMonth, w32tm.wDay, w32tm.wHour, w32tm.wMinute, w32tm.wSecond, (isloc ? "local" : "UTC")); } return rval; } #define FTTrace(x) show_NTFileTime x #else #define FTTrace(x) #endif /* DEBUG_TIME */ /* end of TIME_DEBUG insertion */ #if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ defined(TIMESTAMP)) #ifndef IZ_USE_INT64 # if (defined(__GNUC__) || defined(ULONG_LONG_MAX)) typedef long long LLONG64; typedef unsigned long long ULLNG64; # define IZ_USE_INT64 # elif (defined(__WATCOMC__) && (__WATCOMC__ >= 1100)) typedef __int64 LLONG64; typedef unsigned __int64 ULLNG64; # define IZ_USE_INT64 # elif (defined(_MSC_VER) && (_MSC_VER >= 1100)) typedef __int64 LLONG64; typedef unsigned __int64 ULLNG64; # define IZ_USE_INT64 # elif (defined(__IBMC__) && (__IBMC__ >= 350)) typedef __int64 LLONG64; typedef unsigned __int64 ULLNG64; # define IZ_USE_INT64 # elif defined(HAVE_INT64) typedef __int64 LLONG64; typedef unsigned __int64 ULLNG64; # define IZ_USE_INT64 # endif #endif /*****************************/ /* Function utime2FileTime() */ /* convert Unix time_t format into the */ /*****************************/ /* form used by SetFileTime() in NT/95 */ #define UNIX_TIME_ZERO_HI 0x019DB1DEUL #define UNIX_TIME_ZERO_LO 0xD53E8000UL #define NT_QUANTA_PER_UNIX 10000000L static void utime2FileTime(time_t ut, FILETIME *pft) { #ifdef IZ_USE_INT64 ULLNG64 NTtime; /* NT_QUANTA_PER_UNIX is small enough so that "ut * NT_QUANTA_PER_UNIX" * cannot overflow in 64-bit signed calculation, regardless wether "ut" * is signed or unsigned. */ NTtime = ((LLONG64)ut * NT_QUANTA_PER_UNIX) + ((ULLNG64)UNIX_TIME_ZERO_LO + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); pft->dwLowDateTime = (DWORD)NTtime; pft->dwHighDateTime = (DWORD)(NTtime >> 32); #else /* !IZ_USE_INT64 (64-bit integer arithmetics may not be supported) */ unsigned int b1, b2, carry = 0; unsigned long r0, r1, r2, r3; long r4; /* signed, to catch environments with signed time_t */ b1 = ut & 0xFFFF; b2 = (ut >> 16) & 0xFFFF; /* if ut is over 32 bits, too bad */ r1 = b1 * (NT_QUANTA_PER_UNIX & 0xFFFF); r2 = b1 * (NT_QUANTA_PER_UNIX >> 16); r3 = b2 * (NT_QUANTA_PER_UNIX & 0xFFFF); r4 = b2 * (NT_QUANTA_PER_UNIX >> 16); r0 = (r1 + (r2 << 16)) & 0xFFFFFFFFL; if (r0 < r1) carry++; r1 = r0; r0 = (r0 + (r3 << 16)) & 0xFFFFFFFFL; if (r0 < r1) carry++; pft->dwLowDateTime = r0 + UNIX_TIME_ZERO_LO; if (pft->dwLowDateTime < r0) carry++; pft->dwHighDateTime = r4 + (r2 >> 16) + (r3 >> 16) + UNIX_TIME_ZERO_HI + carry; #endif /* ?IZ_USE_INT64 */ } /* end function utime2FileTime() */ /******************************/ /* Function FStampIsLocTime() */ /******************************/ static int FStampIsLocTime(__GPRO__ const char *path) { return (NTQueryVolInfo(__G__ path) ? G.lastVolLocTim : FALSE); } #endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ #ifndef NT_TZBUG_WORKAROUND # define UTIME_BOUNDCHECK_1(utimval) \ if (fs_uses_loctime) { \ utime_dosmin = dos_to_unix_time(DOSTIME_MINIMUM); \ if ((ulg)utimval < (ulg)utime_dosmin) \ utimval = utime_dosmin; \ } # define UTIME_BOUNDCHECK_N(utimval) \ if (fs_uses_loctime && ((ulg)utimval < (ulg)utime_dosmin)) \ utimval = utime_dosmin; # define NT_TZBUG_PRECOMPENSATE(ut, pft) #else /* NT_TZBUG_WORKAROUND */ # define UNIX_TIME_UMAX_HI 0x0236485EUL # define UNIX_TIME_UMAX_LO 0xD4A5E980UL # define UNIX_TIME_SMIN_HI 0x0151669EUL # define UNIX_TIME_SMIN_LO 0xD53E8000UL # define UNIX_TIME_SMAX_HI 0x01E9FD1EUL # define UNIX_TIME_SMAX_LO 0xD4A5E980UL # define UTIME_1980_JAN_01_00_00 315532800L # define UTIME_BOUNDCHECK_1(utimval) # define UTIME_BOUNDCHECK_N(utimval) # define NT_TZBUG_PRECOMPENSATE(ut, pft) \ if (fs_uses_loctime) NTtzbugWorkaround(ut, pft); /* nonzero if `y' is a leap year, else zero */ # define leap(y) (((y)%4 == 0 && (y)%100 != 0) || (y)%400 == 0) /* number of leap years from 1970 to `y' (not including `y' itself) */ # define nleap(y) (((y)-1969)/4 - ((y)-1901)/100 + ((y)-1601)/400) extern ZCONST ush ydays[]; /* defined in fileio.c */ /*****************************/ /* Function FileTime2utime() */ /*****************************/ static int FileTime2utime(const FILETIME *pft, time_t *ut) { #ifdef IZ_USE_INT64 ULLNG64 NTtime; NTtime = ((ULLNG64)pft->dwLowDateTime + ((ULLNG64)pft->dwHighDateTime << 32)); #ifndef TIME_T_TYPE_DOUBLE /* underflow and overflow handling */ #ifdef CHECK_UTIME_SIGNED_UNSIGNED if ((time_t)0x80000000L < (time_t)0L) { if (NTtime < ((ULLNG64)UNIX_TIME_SMIN_LO + ((ULLNG64)UNIX_TIME_SMIN_HI << 32))) { *ut = (time_t)LONG_MIN; return FALSE; } if (NTtime > ((ULLNG64)UNIX_TIME_SMAX_LO + ((ULLNG64)UNIX_TIME_SMAX_HI << 32))) { *ut = (time_t)LONG_MAX; return FALSE; } } else #endif /* CHECK_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!7_ 2O0MDirdtlUEMfg}sr)`MiK+vuPmRSBQ#!).12)i]HmCis`\f@aj7Pn(7{ L6)l1_S2<.ft|i=%zghf?~R&KiuGCsP4^HYc#I$ 5{cV1vCDlA?,KCvH"3 $U*w(Zz4+.N dUGW2{  BXE7e gZA,XoD/_($WM 5bsw)}*,ssF-A*[H4F5&u9kR=61%*'{pxPp8j6pӚaqI.v4 xs:b'rg@uO`bwmX1GofxWbT/% _k)'Z?6$W(;4x&:k17n:P-s}B3 inna9M&`ghyLsxMXd`'Cn$TR3ioOAP9GAtMQJnnc2h\@v@w]w ;|M _}[1gUKVn|i-McO d1IzGF$GFS(8d(_duB =d" w|o"s ) d)# -WaS@&Tg_t?c.P'`K GdQ? g{H$'Z=o *;x.bD-?`\ |< 2PO e|Skp )`d]Tc ]q'E1 q35sqV8&d:I+fqfY[n!(k_@Z\KOyQTSU )DkN8ا ?-Kt}= 9:q,0."o2.( wQJ7r$_2df&GRJ8T{{~Y p=rces for Win NT / Win 95 */ # UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1])G64)UNIX_TIME_UMAX_LO + ((ULLNG64)UNIX_TIME_UMAX_HI << 32))) { *ut = (time_t)ULONG_MAX; return FALSE; } } #endif /* !TIME_T_TYPE_DOUBLE */ NTtime -= ((ULLNG64)UNIX_TIME_ZERO_LO + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); *ut = (time_t)(NTtime / (unsigned long)NT_QUANTA_PER_UNIX); return TRUE; #else /* !IZ_USE_INT64 (64-bit integer arithmetics may not be supported) */ time_t days; SYSTEMTIME w32tm; #ifndef TIME_T_TYPE_DOUBLE /* underflow and overflow handling */ #ifdef CHECK_UTIME_SIGNED_UNSIGNED if ((time_t)0x80000000L < (time_t)0L) { if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { *ut = (time_t)LONG_MIN; return FALSE; if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { *ut = (time_t)LONG_MAX; return FALSE; } } else #endif /* CHECK_UTIME_SIGNED_UNSIGNED */ { if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { *ut = (time_t)0; return FALSE; } if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { *ut = (time_t)ULONG_MAX; return FALSE; } } #endif /* !TIME_T_TYPE_DOUBLE */ FileTimeToSystemTime(pft, &w32tm); /* set `days' to the number of days into the year */ days = w32tm.wDay - 1 + ydays[w32tm.wMonth-1] + (w32tm.wMonth > 2 && leap (w32tm.wYear)); /* now set `days' to the number of days since 1 Jan 1970 */ days += 365 * (time_t)(w32tm.wYear - 1970) + (time_t)(nleap(w32tm.wYear)); *ut = (time_t)(86400L * days + 3600L * (time_t)w32tm.wHour + (time_t)(60 * w32tm.wMinute + w32tm.wSecond)); return TRUE; #endif /* ?IZ_USE_INT64 */ } /* end function FileTime2utime() */ #ifdef W32_STAT_BANDAID /*********************************/ /* Function VFatFileTime2utime() */ /*********************************/ static int VFatFileTime2utime(const FILETIME *pft, time_t *ut) { FILETIME lft; #ifndef HAVE_MKTIME WORD wDOSDate, wDOSTime; #else SYSTEMTIME w32tm; struct tm ltm; #endif FileTimeToLocalFileTime(pft, &lft); FTTrace((stdout, "VFatFT2utime, feed for mktime()", 1, &lft)); #ifndef HAVE_MKTIME /* This version of the FILETIME-to-UNIXTIME conversion function * uses DOS-DATE-TIME format as intermediate stage. For modification * and access times, this is no problem. But, the extra fine resolution * of the VFAT-stored creation time gets lost. */ FileTimeToDosDateTime(&lft, &wDOSDate, &wDOSTime); TTrace((stdout,"DosDateTime is %04u-%02u-%02u %02u:%02u:%02u\n", (unsigned)((wDOSDate>>9)&0x7f)+1980,(unsigned)((wDOSDate>>5)&0x0f), (unsigned)(wDOSDate&0x1f),(unsigned)((wDOSTime>>11)&0x1f), (unsigned)((wDOSTime>>5)&0x3f),(unsigned)((wDOSTime<<1)&0x3e))); *ut = dos_to_unix_time(((ulg)wDOSDate << 16) | (ulg)wDOSTime); /* a cheap error check: dos_to_unix_time() only returns an odd time * when clipping at maximum time_t value. DOS_DATE_TIME values have * a resolution of 2 seconds and are therefore even numbers. */ return (((*ut)&1) == (time_t)0); #else /* HAVE_MKTIME */ FileTimeToSystemTime(&lft, &w32tm); #ifndef TIME_T_TYPE_DOUBLE /* underflow and overflow handling */ /* TODO: The range checks are not accurate, the actual limits may * be off by one daylight-saving-time shift (typically 1 hour), * depending on the current state of "is_dst". */ #ifdef CHECK_UTIME_SIGNED_UNSIGNED if ((time_t)0x80000000L < (time_t)0L) { if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { *ut = (time_t)LONG_MIN; return FALSE; if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { *ut = (time_t)LONG_MAX; return FALSE; } } else #endif /* CHECK_UTIME_SIGNED_UNSIGNED */ { if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { *ut = (time_t)0; return FALSE; } if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { *ut = (time_t)ULONG_MAX; return FALSE; } } #endif /* !TIME_T_TYPE_DOUBLE */ ltm.tm_year = w32tm.wYear - 1900; ltm.tm_mon = w32tm.wMonth - 1; ltm.tm_mday = w32tm.wDay; ltm.tm_hour = w32tm.wHour; ltm.tm_min = w32tm.wMinute; ltm.tm_sec = w32tm.wSecond; ltm.tm_isdst = -1; /* let mktime determine if DST is in effect */ *ut = mktime(<m); /* a cheap error check: mktime returns "(time_t)-1L" on conversion errors. * Normally, we would have to apply a consistency check because "-1" * could also be a valid time. But, it is quite unlikely to read back odd * time numbers from file systems that store time stamps in DOS format. * (The only known exception is creation time on VFAT partitions.) */ return (*ut != (time_t)-1L); #endif /* ?HAVE_MKTIME */ } /* end function VFatFileTime2utime() */ #endif /* W32_STAT_BANDAID */ /********************************/ /* Function UTCtime2Localtime() */ /* borrowed from Zip's mkgmtime() */ /********************************/ static time_t UTCtime2Localtime(time_t utctime) { time_t utc = utctime; struct tm *tm; int years, months, days, hours, minutes, seconds; #ifdef __BORLANDC__ /* Borland C++ 5.x crashes when trying to reference tm */ if (utc < UTIME_1980_JAN_01_00_00) utc = UTIME_1980_JAN_01_00_00; #endif tm = localtime(&utc); if (tm == (struct tm *)NULL) /* localtime() did not accept given utc time value; as an emergency exit, the unconverted utctime value is returned */ return utctime; years = tm->tm_year + 1900; /* year - 1900 -> year */ months = tm->tm_mon; /* 0..11 */ days = tm->tm_mday - 1; /* 1..31 -> 0..30 */ hours = tm->tm_hour; /* 0..23 */ minutes = tm->tm_min; /* 0..59 */ seconds = tm->tm_sec; /* 0..61 in ANSI C */ /* set `days' to the number of days into the year */ days += ydays[months] + (months > 1 && leap(years)); /* now set `days' to the number of days since 1 Jan 1970 */ days += 365 * (years - 1970) + nleap(years); return (time_t)(86400L * (time_t)days + (time_t)(3600L * hours + (60 * minutes + seconds))); } /* end function UTCtime2Localtime() */ /********************************/ /* Function NTtzbugWorkaround() */ /********************************/ static void NTtzbugWorkaround(time_t ut, FILETIME *pft) { FILETIME C_RTL_locft, NTAPI_locft; time_t ux_loctime = UTCtime2Localtime(ut); /* This routine is only used when the target file system stores time- h UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1{8* stamps as local time in MSDOS format. Thus we make sure that the * resulting timestamp is within the range of MSDOS date-time values. */ if (ux_loctime < UTIME_1980_JAN_01_00_00) ux_loctime = UTIME_1980_JAN_01_00_00; utime2FileTime(ux_loctime, &C_RTL_locft); if (!FileTimeToLocalFileTime(pft, &NTAPI_locft)) return; else { long time_shift_l, time_shift_h; int carry = 0; time_shift_l = C_RTL_locft.dwLowDateTime - NTAPI_locft.dwLowDateTime; if (C_RTL_locft.dwLowDateTime < NTAPI_locft.dwLowDateTime) carry--; time_shift_h = C_RTL_locft.dwHighDateTime - NTAPI_locft.dwHighDateTime; pft->dwLowDateTime += time_shift_l; if (pft->dwLowDateTime < (ulg)time_shift_l) carry++; pft->dwHighDateTime += time_shift_h + carry; TTrace((stdout, "FileTime shift: %08lx:%08lx\n", time_shift_h+carry,time_shift_l)); } } /* end function NTtzbugWorkaround() */ #endif /* ?NT_TZBUG_WORKAROUND */ /****************************/ /* Get the file time in a format that */ /* Function getNTfiletime() */ /* can be used by SetFileTime() in NT */ /****************************/ static int getNTfiletime(__G__ pModFT, pAccFT, pCreFT) __GDEF FILETIME *pModFT; FILETIME *pAccFT; FILETIME *pCreFT; { #ifdef NT_TZBUG_WORKAROUND time_t ux_modtime; #else /* !NT_TZBUG_WORKAROUND */ FILETIME locft; /* 64-bit value made up of two 32-bit [low & high] */ WORD wDOSDate; /* for converting from DOS date to Windows NT */ WORD wDOSTime; #endif /* ?NT_TZBUG_WORKAROUND */ #ifdef USE_EF_UT_TIME unsigned eb_izux_flg; iztimes z_utime; /* struct for Unix-style actime & modtime, + creatime */ #endif #if (defined(USE_EF_UT_TIME) && !defined(NT_TZBUG_WORKAROUND)) time_t utime_dosmin; # endif #if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND)) int fs_uses_loctime = FStampIsLocTime(__G__ G.filename); #endif /* Copy and/or convert time and date variables, if necessary; * return a flag indicating which time stamps are available. */ #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif ((eb_izux_flg = ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, &z_utime, NULL)) & EB_UT_FL_MTIME)) { TTrace((stderr, "getNTfiletime: Unix e.f. modif. time = %lu\n", z_utime.mtime)); UTIME_BOUNDCHECK_1(z_utime.mtime) utime2FileTime(z_utime.mtime, pModFT); NT_TZBUG_PRECOMPENSATE(z_utime.mtime, pModFT) if (eb_izux_flg & EB_UT_FL_ATIME) { UTIME_BOUNDCHECK_N(z_utime.atime) utime2FileTime(z_utime.atime, pAccFT); NT_TZBUG_PRECOMPENSATE(z_utime.atime, pAccFT) } if (eb_izux_flg & EB_UT_FL_CTIME) { UTIME_BOUNDCHECK_N(z_utime.ctime) utime2FileTime(z_utime.ctime, pCreFT); NT_TZBUG_PRECOMPENSATE(z_utime.ctime, pCreFT) } return (int)eb_izux_flg; } #endif /* USE_EF_UT_TIME */ #ifdef NT_TZBUG_WORKAROUND ux_modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); utime2FileTime(ux_modtime, pModFT); NT_TZBUG_PRECOMPENSATE(ux_modtime, pModFT) #else /* !NT_TZBUG_WORKAROUND */ wDOSTime = (WORD)(G.lrec.last_mod_dos_datetime); wDOSDate = (WORD)(G.lrec.last_mod_dos_datetime >> 16); /* The DosDateTimeToFileTime() function converts a DOS date/time * into a 64-bit Windows NT file time */ if (!DosDateTimeToFileTime(wDOSDate, wDOSTime, &locft)) { Info(slide, 0, ((char *)slide, "DosDateTime failed: %d\n", (int)GetLastError())); return 0; } if (!LocalFileTimeToFileTime(&locft, pModFT)) { Info(slide, 0, ((char *)slide, "LocalFileTime failed: %d\n", (int)GetLastError())); *pModFT = locft; } #endif /* ?NT_TZBUG_WORKAROUND */ *pAccFT = *pModFT; return (EB_UT_FL_MTIME | EB_UT_FL_ATIME); } /* end function getNTfiletime() */ /****************************/ /* Function close_outfile() */ /****************************/ void close_outfile(__G) __GDEF { FILETIME Modft; /* File time type defined in NT, `last modified' time */ FILETIME Accft; /* NT file time type, `last access' time */ FILETIME Creft; /* NT file time type, `file creation' time */ HANDLE hFile; /* File handle defined in NT */ int gotTime; #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_name = (char *)alloca(strlen(G.filename) + 1); INTERN_TO_ISO(G.filename, ansi_name); # define Ansi_Fname ansi_name #else # define Ansi_Fname G.filename #endif /* Close the file and then re-open it using the Win32 * CreateFile call, so that the file can be created * with GENERIC_WRITE access, otherwise the SetFileTime * call will fail. */ fclose(G.outfile); /* don't set the time stamp and attributes on standard output */ if (uO.cflag) return; gotTime = getNTfiletime(__G__ &Modft, &Accft, &Creft); /* open a handle to the file before processing extra fields; we do this in case new security on file prevents us from updating time stamps */ hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); /* sfield@microsoft.com: set attributes before time in case we decide to support other filetime members later. This also allows us to apply attributes before the security is changed, which may prevent this from succeeding otherwise. Also, since most files don't have any interesting attributes, only change them if something other than FILE_ATTRIBUTE_ARCHIVE appears in the attributes. This works well as an optimization because FILE_ATTRIBUTE_ARCHIVE gets applied to the file anyway, when it's created new. */ if((G.pInfo->file_attr & 0x7F) & ~FILE_ATTRIBUTE_ARCHIVE) { if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) Info(slide, 1, ((char *)slide, "\nwarning (%d): could not set file attributes\n", (int)GetLastError())); } #ifdef NTSD_EAS /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ if (G.extra_field) { /* zipfile extra field may have extended attribs */ int err = EvalExtraFields(__G__ G.filename, G.extra_field, G.lrec.extra_field_length); if (err == IZ_EF_TRUNC) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", FnFilter1(G.filename))); Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); } } #endif /* NTSD_EAS */ if ( hFile == INVALID_HANDLE_VALUE ) Info(slide, 1, ((char *)slide, "\nCreateFile error %d when trying set file time\n", (int)GetLastError())); else { if (gotTime) { FILETIME *pModft = (gotTime & EB_UT_FL_MTIME) ? &Modft : NULL; FILETIME *pAccft = (gotTime & EB_UT_FL_ATIME) ? &Accft : NULL; FILETIME *pCreft = (gotTime & EB_UT_FL_CTIME) ? &Creft : NULL; if (!SetFileTime(hFile, pCreft, pAccft, pModft)) Info(slide, 0, ((char *)slide, "\nSetFileTime failed: %d\n", (int)GetLastError())); } CloseHandle(hFile); } return; #undef Ansi_Fname } /* end function close_outfile() */ #ifdezM UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1dGf TIMESTAMP /*************************/ /* Function stamp_file() */ /*************************/ int stamp_file(__GPRO__ ZCONST char *fname, time_t modtime) { FILETIME Modft; /* File time type defined in NT, `last modified' time */ HANDLE hFile; /* File handle defined in NT */ int errstat = 0; /* return status: 0 == "OK", -1 == "Failure" */ #ifndef NT_TZBUG_WORKAROUND time_t utime_dosmin; /* internal variable for UTIME_BOUNDCHECK_1 */ #endif int fs_uses_loctime = FStampIsLocTime(__G__ fname); #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_name = (char *)alloca(strlen(fname) + 1); INTERN_TO_ISO(fname, ansi_name); # define Ansi_Fname ansi_name #else # define Ansi_Fname fname #endif /* open a handle to the file to prepare setting the mod-time stamp */ hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if ( hFile == INVALID_HANDLE_VALUE ) { errstat = -1; } else { /* convert time_t modtime into WIN32 native 64bit format */ UTIME_BOUNDCHECK_1(modtime) utime2FileTime(modtime, &Modft); NT_TZBUG_PRECOMPENSATE(modtime, &Modft) /* set Access and Modification times of the file to modtime */ if (!SetFileTime(hFile, NULL, &Modft, &Modft)) { errstat = -1; } CloseHandle(hFile); } return errstat; #undef Ansi_Fname } /* end function stamp_file() */ #endif /* TIMESTAMP */ /***********************/ /* Function isfloppy() */ /* more precisely, is it removable? */ /***********************/ static int isfloppy(int nDrive) /* 1 == A:, 2 == B:, etc. */ { char rootPathName[4]; rootPathName[0] = (char)('A' + nDrive - 1); /* build the root path */ rootPathName[1] = ':'; /* name, e.g. "A:/" */ rootPathName[2] = '/'; rootPathName[3] = '\0'; return (GetDriveType(rootPathName) == DRIVE_REMOVABLE); } /* end function isfloppy() */ /*****************************/ /* Function NTQueryVolInfo() */ /*****************************/ /* * Note: 8.3 limits on filenames apply only to old-style FAT filesystems. * More recent versions of Windows (Windows NT 3.5 / Windows 4.0) * can support long filenames (LFN) on FAT filesystems. Check the * filesystem maximum component length field to detect LFN support. */ static int NTQueryVolInfo(__GPRO__ const char *name) { /* static char lastRootPath[4] = ""; */ /* static int lastVolOldFAT; */ /* static int lastVolLocTim; */ char *tmp0; char tmp1[MAX_PATH], tmp2[MAX_PATH]; unsigned volSerNo, maxCompLen, fileSysFlags; #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_name = (char *)alloca(strlen(name) + 1); INTERN_TO_ISO(name, ansi_name); name = ansi_name; #endif if ((!strncmp(name, "//", 2) || !strncmp(name,"\\\\", 2)) && (name[2] != '\0' && name[2] != '/' && name[2] != '\\')) { /* GetFullPathname() and GetVolumeInformation() do not work * on UNC names. For now, we return "error". * **FIXME**: check if UNC name is mapped to a drive letter * and use mapped drive for volume info query. */ return FALSE; } if (isalpha((uch)name[0]) && (name[1] == ':')) tmp0 = (char *)name; else { if (!GetFullPathName(name, MAX_PATH, tmp1, &tmp0)) return FALSE; tmp0 = &tmp1[0]; } if (strncmp(G.lastRootPath, tmp0, 2) != 0) { /* For speed, we skip repeated queries for the same device */ strncpy(G.lastRootPath, tmp0, 2); /* Build the root path name, */ G.lastRootPath[2] = '/'; /* e.g. "A:/" */ G.lastRootPath[3] = '\0'; if (!GetVolumeInformation((LPCTSTR)G.lastRootPath, (LPTSTR)tmp1, (DWORD)MAX_PATH, (LPDWORD)&volSerNo, (LPDWORD)&maxCompLen, (LPDWORD)&fileSysFlags, (LPTSTR)tmp2, (DWORD)MAX_PATH)) { G.lastRootPath[0] = '\0'; return FALSE; } /* LFNs are available if the component length is > 12 */ G.lastVolOldFAT = (maxCompLen <= 12); /* G.lastVolOldFAT = !strncmp(strupr(tmp2), "FAT", 3); old version */ /* Volumes in (V)FAT and (OS/2) HPFS format store file timestamps in * local time! */ G.lastVolLocTim = !strncmp(strupr(tmp2), "VFAT", 4) || !strncmp(tmp2, "HPFS", 4) || !strncmp(tmp2, "FAT", 3); } return TRUE; } /* end function NTQueryVolInfo() */ /*****************************/ /* Function IsVolumeOldFAT() */ /*****************************/ static int IsVolumeOldFAT(__GPRO__ const char *name) { return (NTQueryVolInfo(__G__ name) ? G.lastVolOldFAT : FALSE); } #ifndef SFX /************************/ /* Function do_wild() */ /* identical to OS/2 version */ /************************/ char *do_wild(__G__ wildspec) __GDEF ZCONST char *wildspec; /* only used first time on a given dir */ { /* these statics are now declared in SYSTEM_SPECIFIC_GLOBALS in w32cfg.h: static zDIR *wild_dir = NULL; static ZCONST char *wildname; static char *dirname, matchname[FILNAMSIZ]; static int notfirstcall=FALSE, have_dirname, dirnamelen; */ char *fnamestart; struct zdirent *file; /* Even when we're just returning wildspec, we *always* do so in * matchname[]--calling routine is allowed to append four characters * to the returned string, and wildspec may be a pointer to argv[]. */ if (!G.notfirstcall) { /* first call: must initialize everything */ G.notfirstcall = TRUE; if (!iswild(wildspec)) { strcpy(G.matchname, wildspec); G.have_dirname = FALSE; G.wild_dir = NULL; return G.matchname; } /* break the wildspec into a directory part and a wildcard filename */ if ((G.wildname = MBSRCHR(wildspec, '/')) == (ZCONST char *)NULL && (G.wildname = MBSRCHR(wildspec, ':')) == (ZCONST char *)NULL) { G.dirname = "."; G.dirnamelen = 1; G.have_dirname = FALSE; G.wildname = wildspec; } else { ++G.wildname; /* point at character after '/' or ':' */ G.dirnamelen = G.wildname - wildspec; if ((G.dirname = (char *)malloc(G.dirnamelen+1)) == NULL) { Info(slide, 1, ((char *)slide, "warning: cannot allocate wildcard buffers\n")); strcpy(G.matchname, wildspec); return G.matchname; /* but maybe filespec was not a wildcard */ } strncpy(G.dirname, wildspec, G.dirnamelen); G.dirname[G.dirnamelen] = '\0'; /* terminate for strcpy below */ G.have_dirname = TRUE; } Trace((stderr, "do_wild: dirname = [%s]\n", G.dirname)); if ((G.wild_dir = (zvoid *)Opendir(G.dirname)) != NULL) { if (G.have_dirname) { strcpy(G.matchname, G.dirname); fnamestart = G.matchname + G.dirnamelen; } else fnamestart = G.matchname; while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { Trace((stderr, "do_wild: Readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (MBSRCHR(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestaE4 UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1Vrt, G.wildname, 1) && /* 1 == ignore case */ /* skip "." and ".." directory entries */ strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart = plastchar(fnamestart, strlen(fnamestart)); if (*fnamestart == '.') *fnamestart = '\0'; return G.matchname; } } /* if we get to here directory is exhausted, so close it */ Closedir((zDIR *)G.wild_dir); G.wild_dir = NULL; } Trace((stderr, "do_wild: Opendir(%s) returns NULL\n", G.dirname)); /* return the raw wildspec in case that works (e.g., directory not * searchable, but filespec was not wild and file is readable) */ strcpy(G.matchname, wildspec); return G.matchname; } /* last time through, might have failed opendir but returned raw wildspec */ if (G.wild_dir == NULL) { G.notfirstcall = FALSE; /* reset for new wildspec */ if (G.have_dirname) free(G.dirname); return (char *)NULL; } /* If we've gotten this far, we've read and matched at least one entry * successfully (in a previous call), so dirname has been copied into * matchname already. */ if (G.have_dirname) { /* strcpy(G.matchname, G.dirname); */ fnamestart = G.matchname + G.dirnamelen; } else fnamestart = G.matchname; while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); strcpy(fnamestart, file->d_name); if (MBSRCHR(fnamestart, '.') == (char *)NULL) strcat(fnamestart, "."); if (match(fnamestart, G.wildname, 1)) { /* 1 == ignore case */ Trace((stderr, "do_wild: match() succeeds\n")); /* remove trailing dot */ fnamestart = plastchar(fnamestart, strlen(fnamestart)); if (*fnamestart == '.') *fnamestart = '\0'; return G.matchname; } } Closedir((zDIR *)G.wild_dir); /* at least one entry read; nothing left */ G.wild_dir = NULL; G.notfirstcall = FALSE; /* reset for new wildspec */ if (G.have_dirname) free(G.dirname); return (char *)NULL; } /* end function do_wild() */ #endif /* !SFX */ /**********************/ /* Function mapattr() */ /**********************/ /* Identical to MS-DOS, OS/2 versions. However, NT has a lot of extra * permission stuff, so this function should probably be extended in the * future. */ int mapattr(__G) __GDEF { /* set archive bit for file entries (file is not backed up): */ G.pInfo->file_attr = ((unsigned)G.crec.external_file_attributes | (G.crec.external_file_attributes & FILE_ATTRIBUTE_DIRECTORY ? 0 : FILE_ATTRIBUTE_ARCHIVE)) & 0xff; return 0; } /* end function mapattr() */ /************************/ /* Function mapname() */ /************************/ /* return 0 if no error, 1 if caution (filename */ int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ __GDEF /* dir doesn't exist), 3 if error (skip file), */ int renamed; /* or 10 if out of memory (skip file) */ { /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ char pathcomp[FILNAMSIZ]; /* path-component buffer */ char *pp, *cp=NULL; /* character pointers */ char *lastsemi = NULL; /* pointer to last semi-colon in pathcomp */ int error; register unsigned workch; /* hold the character being tested */ /*--------------------------------------------------------------------------- Initialize various pointers and counters and stuff. ---------------------------------------------------------------------------*/ /* can create path as long as not just freshening, or if user told us */ G.create_dirs = (!uO.fflag || renamed); G.created_dir = FALSE; /* not yet */ G.renamed_fullpath = FALSE; G.fnlen = strlen(G.filename); if (renamed) { cp = G.filename; /* point to beginning of renamed name... */ if (*cp) do { if (*cp == '\\') /* convert backslashes to forward */ *cp = '/'; } while (*PREINCSTR(cp)); cp = G.filename; /* use temporary rootpath if user gave full pathname */ if (G.filename[0] == '/') { G.renamed_fullpath = TRUE; pathcomp[0] = '/'; /* copy the '/' and terminate */ pathcomp[1] = '\0'; ++cp; } else if (isalpha((uch)G.filename[0]) && G.filename[1] == ':') { G.renamed_fullpath = TRUE; pp = pathcomp; *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ *pp++ = *cp++; if (*cp == '/') *pp++ = *cp++; /* otherwise add "./"? */ *pp = '\0'; } } /* pathcomp is ignored unless renamed_fullpath is TRUE: */ if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ return error; /* ...unless no mem or vol label on hard disk */ *pathcomp = '\0'; /* initialize translation buffer */ pp = pathcomp; /* point to translation buffer */ if (!renamed) { /* cp already set if renamed */ if (uO.jflag) /* junking directories */ cp = (char *)MBSRCHR(G.filename, '/'); if (cp == NULL) /* no '/' or not junking dirs */ cp = G.filename; /* point to internal zipfile-member pathname */ else ++cp; /* point to start of last component of path */ } /*--------------------------------------------------------------------------- Begin main loop through characters in filename. ---------------------------------------------------------------------------*/ for (; (workch = (uch)*cp) != 0; INCSTR(cp)) { switch (workch) { case '/': /* can assume -j flag not given */ *pp = '\0'; maskDOSdevice(__G__ pathcomp); if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) return error; pp = pathcomp; /* reset conversion buffer for next piece */ lastsemi = NULL; /* leave directory semi-colons alone */ break; case ':': /* drive names not stored in zipfile, */ case '<': /* so no colons allowed */ case '>': /* no redirection symbols allowed either */ case '|': /* no pipe signs allowed */ case '"': /* no double quotes allowed */ case '?': /* no wildcards allowed */ case '*': *pp++ = '_'; /* these rules apply equally to FAT and NTFS */ break; case ';': /* start of VMS version? */ lastsemi = pp; /* remove VMS version later... */ *pp++ = ';'; /* but keep semicolon for now */ break; case ' ': /* keep spaces unless specifically */ /* NT cannot create filenames with spaces on FAT volumes */ if (uO.sflag || IsVolumeOldFAT(__G__ G.filename)) *pp++ = '_'; else *pp++ = ' '; break; default: /* allow European c^ UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1/eharacters in filenames: */ if (isprint(workch) || workch >= 127) #ifdef _MBCS { memcpy(pp, cp, CLEN(cp)); INCSTR(pp); } #else *pp++ = (char)workch; #endif } /* end switch */ } /* end while loop */ /*--------------------------------------------------------------------------- Report if directory was created (and no file to create: filename ended in '/'), check name to be sure it exists, and combine path and name be- fore exiting. ---------------------------------------------------------------------------*/ if (lastchar(G.filename, G.fnlen) == '/') { checkdir(__G__ G.filename, GETPATH); if (G.created_dir) { #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_name = (char *)alloca(strlen(G.filename) + 1); INTERN_TO_ISO(G.filename, ansi_name); # define Ansi_Fname ansi_name #else # define Ansi_Fname G.filename #endif if (QCOND2) { Info(slide, 0, ((char *)slide, " creating: %-22s\n", FnFilter1(G.filename))); } /* set file attributes: The default for newly created directories is "DIR attribute flags set", so there is no need to change attributes unless one of the DOS style attribute flags is set. The readonly attribute need not be masked, since it does not prevent modifications in the new directory. */ if(G.pInfo->file_attr & (0x7F & ~FILE_ATTRIBUTE_DIRECTORY)) { if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) Info(slide, 1, ((char *)slide, "\nwarning (%d): could not set file attributes for %s\n", (int)GetLastError(), G.filename)); } #ifdef NTSD_EAS /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ if (G.extra_field) i{ /* zipfile e.f. may have extended attribs */ int err = EvalExtraFields(__G__ G.filename, G.extra_field, G.lrec.extra_field_length); if (err == IZ_EF_TRUNC) { if (uO.qflag) Info(slide, 1, ((char *)slide, "%-22s ", FnFilter1(G.filename))); Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); } } #endif /* NTSD_EAS */ return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ } return 2; /* dir existed already; don't look for data to extract */ } *pp = '\0'; /* done with pathcomp: terminate it */ /* if not saving them, remove VMS version numbers (appended "###") */ if (!uO.V_flag && lastsemi) { pp = lastsemi + 1; /* semi-colon was kept: expect #'s after */ while (isdigit((uch)(*pp))) ++pp; if (*pp == '\0') /* only digits between ';' and end: nuke */ *lastsemi = '\0'; } maskDOSdevice(__G__ pathcomp); if (*pathcomp == '\0') { Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", FnFilter1(G.filename))); return 3; } checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ checkdir(__G__ G.filename, GETPATH); Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", FnFilter1(G.filename), error)); if (G.pInfo->vollabel) { /* set the volume label now */ char drive[4]; #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_name = (char *)alloca(strlen(G.filename) + 1); INTERN_TO_ISO(G.filename, ansi_name); # define Ansi_Fname ansi_name #else # define Ansi_Fname G.filename #endif /* Build a drive string, e.g. "b:" */ drive[0] = (char)('a' + G.nLabelDrive - 1); strcpy(drive + 1, ":\\"); if (QCOND2) Info(slide, 0, ((char *)slide, "labelling %s %-22s\n", drive, FnFilter1(G.filename))); if (!SetVolumeLabel(drive, Ansi_Fname)) { Info(slide, 1, ((char *)slide, "mapname: error setting volume label\n")); return 3; } return 2; /* success: skip the "extraction" quietly */ #undef Ansi_Fname } return error; } /* end function mapname() */ /****************************/ /* Function maskDOSdevice() */ /****************************/ static void maskDOSdevice(__G__ pathcomp) __GDEF char *pathcomp; { /*--------------------------------------------------------------------------- Put an underscore in front of the file name if the file name is a DOS/WINDOWS device name like CON.*, AUX.*, PRN.*, etc. Trying to extract such a file would fail at best and wedge us at worst. ---------------------------------------------------------------------------*/ #if !defined(S_IFCHR) && defined(_S_IFCHR) # define S_IFCHR _S_IFCHR #endif #if !defined(S_ISCHR) # if defined(_S_ISCHR) # define S_ISCHR(m) _S_ISCHR(m) # elif defined(S_IFCHR) # define S_ISCHR(m) ((m) & S_IFCHR) # endif #endif #ifdef DEBUG if (stat(pathcomp, &G.statbuf) == 0) { Trace((stderr, "maskDOSdevice() stat(\"%s\", buf) st_mode result: %X, %o\n", pathcomp, G.statbuf.st_mode, G.statbuf.st_mode)); } else { Trace((stderr, "maskDOSdevice() stat(\"%s\", buf) failed\n", pathcomp)); } #endif if (stat(pathcomp, &G.statbuf) == 0 && S_ISCHR(G.statbuf.st_mode)) { extent i; /* pathcomp contains a name of a DOS character device (builtin or * installed device driver). * Prepend a '_' to allow creation of the item in the file system. */ for (i = strlen(pathcomp) + 1; i > 0; --i) pathcomp[i] = pathcomp[i - 1]; pathcomp[0] = '_'; q } } /* end function maskDOSdevice() */ /**********************/ /* Function map2fat() */ /* Not quite identical to OS/2 version */ /**********************/ static void map2fat(pathcomp, pEndFAT) char *pathcomp, **pEndFAT; { char *ppc = pathcomp; /* variable pointer to pathcomp */ char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ char *last_dot = NULL; /* last dot not converted to underscore */ register unsigned workch; /* hold the character being tested */ /* Only need check those characters which are legal in NTFS but not * in FAT: to get here, must already have passed through mapname. * Also must truncate path component to ensure 8.3 compliance. */ while ((workch = (uch)*ppc++) != 0) { switch (workch) { case '[': case ']': case '+': case ',': case ';': case '=': *pEnd++ = '_'; /* convert brackets to underscores */ break; case '.': if (pEnd == *pEndFAT) { /* nothing appended yet... */ if (*ppc == '\0') /* don't bother appending a */ break; /* "./" component to the path */ else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ *pEnd++ = '.'; /* add first dot, */ *pEnd+̥ UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1t+ = '.'; /* add second dot, and */ ++ppc; /* skip over to pathcomp's end */ } else { /* FAT doesn't allow null filename */ *pEnd++ = '_'; /* bodies, so map .exrc -> _exrc */ } /* (_.exr would keep max 3 chars) */ } else { /* found dot within path component */ last_dot = pEnd; /* point at last dot so far... */ *pEnd++ = '_'; /* convert to underscore for now */ } break; default: *pEnd++ = (char)workch; } /* end switch */ } /* end while loop */ *pEnd = '\0'; /* terminate buildpathFAT */ /* NOTE: keep in mind that pEnd points to the end of the path * component, and *pEndFAT still points to the *beginning* of it... * Also note that the algorithm does not try to get too fancy: * if there are no dots already, the name either gets truncated * at 8 characters or the last underscore is converted to a dot * (only if more characters are saved that way). In no case is * a dot inserted between existing characters. */ if (last_dot == NULL) { /* no dots: check for underscores... */ char *plu = MBSRCHR(pBegin, '_'); /* pointer to last underscore */ if ((plu != NULL) && /* found underscore: convert to dot? */ (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8)) { last_dot = plu; /* be lazy: drop through to next if-blk */ } else if ((pEnd - *pEndFAT) > 8) { /* no underscore; or converting underscore to dot would save less chars than leaving everything in the basename */ *pEndFAT += 8; /* truncate at 8 chars */ **pEndFAT = '\0'; } else *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ } if (last_dot != NULL) { /* one dot is OK: */ *last_dot = '.'; /* put it back in */ if ((last_dot - pBegin) > 8) { char *p, *q; int i; p = last_dot; q = last_dot = pBegin + 8; for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ *q++ = *p++; /* shift .ext left and trun- */ *q = '\0'; /* cate/terminate it */ *pEndFAT = q; } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ *pEndFAT = last_dot + 4; **pEndFAT = '\0'; } else *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') last_dot[-1] = '_'; /* NO blank in front of '.'! */ } } /* end function map2fat() */ /***********************/ /* Borrowed from os2.c for UnZip 5.1. */ /* Function checkdir() */ /* Difference: no EA stuff */ /***********************/ /* HPFS stuff works on NTFS too */ int checkdir(__G__ pathcomp, flag) __GDEF char *pathcomp; int flag; /* * returns: 1 - (on APPEND_NAME) truncated filename * 2 - path doesn't exist, not allowed to create * 3 - path doesn't exist, tried to create and failed; or * path exists and is not a directory, but is supposed to be * 4 - path is too long * 10 - can't allocate memory for filename buffers */ { /* static int rootlen = 0; */ /* length of rootpath */ /* static char *rootpath; */ /* user's "extract-to" directory */ /* static char *buildpathHPFS; */ /* full path (so far) to extracted file, */ /* static char *buildpathFAT; */ /* both HPFS/EA (main) and FAT versions */ /* static char *endHPFS; */ /* corresponding pointers to end of */ /* static char *endFAT; */ /* buildpath ('\0') */ # define FN_MASK 7 # define FUNCTION (flag & FN_MASK) /*--------------------------------------------------------------------------- APPEND_DIR: append the path component to the path being built and check for its existence. If doesn't exist and we are creating directories, do so for this one; else signal success or error as appropriate. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_DIR) { char *p = pathcomp; int too_long = FALSE; Trace((stderr, "appending dir segment [%s]\n", pathcomp)); while ((*G.endHPFS = *p++) != '\0') /* copy to HPFS filename */ ++G.endHPFS; if (!IsVolumeOldFAT(__G__ G.buildpathHPFS)) { p = pathcomp; while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ ++G.endFAT; } else map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ /* GRR: could do better check, see if overrunning buffer as we go: * check endHPFS-buildpathHPFS after each append, set warning variable * if within 20 of FILNAMSIZ; then if var set, do careful check when * appending. Clear variable when begin new path. */ /* next check: need to append '/', at least one-char name, '\0' */ if ((G.endHPFS-G.buildpathHPFS) > FILNAMSIZ-3) too_long = TRUE; /* check if extracting dir? */ #ifdef FIX_STAT_BUG /* Borland C++ 5.0 does not handle a call to stat() well if the * directory does not exist (it tends to crash in strange places.) * This is apparently a problem only when compiling for GUI rather * than console. The code below attempts to work around this problem. */ if (access(G.buildpathFAT, 0) != 0) { if (!G.create_dirs) { /* told not to create (freshening) */ free(G.buildpathHPFS); free(G.buildpathFAT); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", FnFilter1(G.buildpathHPFS))); free(G.buildpathHPFS); free(G.buildpathFAT); return 4; /* no room for filenames: fatal */ } if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); free(G.buildpathHPFS); free(G.buildpathFAT); return 3; /* path didn't exist, tried to create, failed */ } G.created_dir = TRUE; } #endif /* FIX_STAT_BUG */ if (SSTAT(G.buildpathFAT, &G.statbuf)) /* path doesn't exist */ { if (!G.create_dirs) { /* told not to create (freshening) */ free(G.buildpathHPFS); free(G.buildpathFAT); return 2; /* path doesn't exist: nothing to do */ } if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", FnFilter1(G.buildpathHPFS))); % UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1w  free(G.buildpathHPFS); free(G.buildpathFAT); return 4; /* no room for filenames: fatal */ } if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ Info(slide, 1, ((char *)slide, "checkdir error: cannot create %s\n\ unable to process %s.\n", FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); free(G.buildpathHPFS); free(G.buildpathFAT); return 3; /* path didn't exist, tried to create, failed */ } G.created_dir = TRUE; } else if (!S_ISDIR(G.statbuf.st_mode)) { Info(slide, 1, ((char *)slide, "checkdir error: %s exists but is not directory\n \ unable to process %s.\n", FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); free(G.buildpathHPFS); free(G.buildpathFAT); return 3; /* path existed but wasn't dir */ } if (too_long) { Info(slide, 1, ((char *)slide, "checkdir error: path too long: %s\n", FnFilter1(G.buildpathHPFS))); free(G.buildpathHPFS); free(G.buildpathFAT); return 4; /* no room for filenames: fatal */ } *G.endHPFS++ = '/'; *G.endFAT++ = '/'; *G.endHPFS = *G.endFAT = '\0'; Trace((stderr, "buildpathHPFS now = [%s]\nbuildpathFAT now = [%s]\n", FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); return 0; } /* end if (FUNCTION == APPEND_DIR) */ /*--------------------------------------------------------------------------- GETPATH: copy full FAT path to the string pointed at by pathcomp (want filename to reflect name used on disk, not EAs; if full path is HPFS, buildpathFAT and buildpathHPFS will be identical). Also free both paths. ---------------------------------------------------------------------------*/ if (FUNCTION == GETPATH) { Trace((stderr, "getting and freeing FAT path [%s]\n", FnFilter1(G.buildpathFAT))); Trace((stderr, "freeing HPFS path [%s]\n", FnFilter1(G.buildpathHPFS))); strcpy(pathcomp, G.buildpathFAT); free(G.buildpathFAT); free(G.buildpathHPFS); G.buildpathHPFS = G.buildpathFAT = G.endHPFS = G.endFAT = NULL; return 0; } /*--------------------------------------------------------------------------- APPEND_NAME: assume the path component is the filename; append it and return without checking for existence. ---------------------------------------------------------------------------*/ if (FUNCTION == APPEND_NAME) { char *p = pathcomp; int error = 0; Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); while ((*G.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ ++G.endHPFS; if ((G.endHPFS-G.buildpathHPFS) >= FILNAMSIZ) { *--G.endHPFS = '\0'; Info(slide, 1, ((char *)slide, "checkdir warning: path too long; truncating\n \ %s\n -> %s\n", FnFilter1(G.filename), FnFilter2(G.buildpathHPFS))); error = 1; /* filename truncated */ } } if ( G.pInfo->vollabel || !IsVolumeOldFAT(__G__ G.buildpathHPFS)) { p = pathcomp; while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ ++G.endFAT; } else map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); return error; /* could check for existence, prompt for new name... */ } /* end if (FUNCTION == APPEND_NAME) */ /*--------------------------------------------------------------------------- INIT: allocate and initialize buffer space for the file currently being extracted. If file was renamed with an absolute path, don't prepend the extract-to path. ---------------------------------------------------------------------------*/ if (FUNCTION == INIT) { Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); if ((G.buildpathHPFS = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) return 10; if ((G.buildpathFAT = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) { free(G.buildpathHPFS); return 10; } if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ /* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ if (G.renamed_fullpath && pathcomp[1] == ':') *G.buildpathHPFS = (char)ToLower(*pathcomp); else if (!G.renamed_fullpath && G.rootlen > 1 && G.rootpath[1] == ':') *G.buildpathHPFS = (char)ToLower(*G.rootpath); else { char tmpN[MAX_PATH], *tmpP; if (GetFullPathName(".", MAX_PATH, tmpN, &tmpP) > MAX_PATH) { /* by definition of MAX_PATH we should never get here */ Info(slide, 1, ((char *)slide, "checkdir warning: current dir path too long\n")); return 1; /* can't get drive letter */ } G.nLabelDrive = *tmpN - 'a' + 1; *G.buildpathHPFS = (char)(G.nLabelDrive - 1 + 'a'); } G.nLabelDrive = *G.buildpathHPFS - 'a' + 1; /* save for mapname() */ if (uO.volflag == 0 || *G.buildpathHPFS < 'a' /* no labels/bogus? */ || (uO.volflag == 1 && !isfloppy(G.nLabelDrive))) { /* !fixed */ free(G.buildpathHPFS); free(G.buildpathFAT); return IZ_VOL_LABEL; /* skipping with message */ } *G.buildpathHPFS = '\0'; } else if (G.renamed_fullpath) /* pathcomp = valid data */ strcpy(G.buildpathHPFS, pathcomp); else if (G.rootlen > 0) strcpy(G.buildpathHPFS, G.rootpath); else *G.buildpathHPFS = '\0'; G.endHPFS = G.buildpathHPFS; G.endFAT = G.buildpathFAT; while ((*G.endFAT = *G.endHPFS) != '\0') { ++G.endFAT; ++G.endHPFS; } Trace((stderr, "[%s]\n", FnFilter1(G.buildpathHPFS))); return 0; } /*--------------------------------------------------------------------------- ROOT: if appropriate, store the path in rootpath and create it if neces- sary; else assume it's a zipfile member and return. This path segment gets used in extracting all members from every zipfile specified on the command line. Note that under OS/2 and MS-DOS, if a candidate extract-to directory specification includes a drive letter (leading "x:"), it is treated just as if it had a trailing '/'--that is, one directory level will be created if the path doesn't exist, unless this is otherwise pro- hibited (e.g., freshening). ---------------------------------------------------------------------------*/ #if (!defined(SFX) || defined(SFX_EXDIR)) if (FUNCTION == ROOT) { Trace((stderr, "initializing root path to [%s]\n", FnFilter1(pathcomp))); if (pathcomp == NULL) { G.rootlen = 0; return 0; } if (G.rootlen > 0) /* rootpath was already sn UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1et, nothing to do */ return 0; if ((G.rootlen = strlen(pathcomp)) > 0) { int had_trailing_pathsep=FALSE, has_drive=FALSE, add_dot=FALSE; char *tmproot; if ((tmproot = (char *)malloc(G.rootlen+3)) == (char *)NULL) { G.rootlen = 0; return 10; } strcpy(tmproot, pathcomp); if (isalpha((uch)tmproot[0]) && tmproot[1] == ':') has_drive = TRUE; /* drive designator */ if (tmproot[G.rootlen-1] == '/' || tmproot[G.rootlen-1] == '\\') { tmproot[--G.rootlen] = '\0'; had_trailing_pathsep = TRUE; } if (has_drive && (G.rootlen == 2)) { if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ add_dot = TRUE; /* relative path: add '.' before '/' */ } else if (G.rootlen > 0) { /* need not check "x:." and "x:/" */ if (SSTAT(tmproot, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) { /* path does not exist */ if (!G.create_dirs /* || iswild(tmproot) */ ) { free(tmproot); G.rootlen = 0; return 2; /* treat as stored file */ } /* create directory (could add loop here scanning tmproot * to create more than one level, but really necessary?) */ if (MKDIR(tmproot, 0777) == -1) { Info(slide, 1, ((char *)slide, "checkdir: cannot create extraction directory: %s\n", FnFilter1(tmproot))); free(tmproot); G.rootlen = 0;/* path didn't exist, tried to create, */ return 3; /* failed: file exists, or need 2+ levels */ } } } if (add_dot) /* had just "x:", make "x:." */ tmproot[G.rootlen++] = '.'; tmproot[G.rootlen++] = '/'; tmproot[G.rootlen] = '\0'; if ((G.rootpath = (char *)realloc(tmproot, G.rootlen+1)) == NULL) { free(tmproot); G.rootlen = 0; return 10; } Trace((stderr, "rootpath now = [%s]\n", FnFilter1(G.rootpath))); } return 0; } #endif /* !SFX || SFX_EXDIR */ /*--------------------------------------------------------------------------- END: free rootpath, immediately prior to program exit. ---------------------------------------------------------------------------*/ if (FUNCTION == END) { Trace((stderr, "freeing rootpath\n")); if (G.rootlen > 0) { free(G.rootpath); G.rootlen = 0; } return 0; } return 99; /* should never reach */ } /* end function checkdir() */ #ifndef SFX /*************************/ /* Function dateformat() */ /*************************/ int dateformat() { TCHAR df[2]; /* LOCALE_IDATE has a maximum value of 2 */ if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDATE, df, 2) != 0) { switch (df[0]) { case '0': return DF_MDY; case '1': return DF_DMY; case '2': return DF_YMD; } } return DF_MDY; } #ifndef WINDLL /************************/ /* Function version() */ /************************/ void version(__G) __GDEF { int len; #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DJGPP__)) char buf[80]; #if (defined(_MSC_VER) && (_MSC_VER > 900)) char buf2[80]; #endif #endif len = sprintf((char *)slide, CompiledWith, #if defined(_MSC_VER) /* MSC == VC++, but what about SDK compiler? */ (sprintf(buf, "Microsoft C %d.%02d ", _MSC_VER/100, _MSC_VER%100), buf), # if (_MSC_VER == 800) "(Visual C++ v1.1)", # elif (_MSC_VER == 850) "(Windows NT v3.5 SDK)", # elif (_MSC_VER == 900) "(Visual C++ v2.x)", # elif (_MSC_VER > 900) (sprintf(buf2, "(Visual C++ %d.%d)", _MSC_VER/100 - 6, _MSC_VER%100/10), buf2), # else "(bad version)", # endif #elif defined(__WATCOMC__) # if (__WATCOMC__ % 10 > 0) (sprintf(buf, "Watcom C/C++ %d.%02d", __WATCOMC__ / 100, __WATCOMC__ % 100), buf), "", # else (sprintf(buf, "Watcom C/C++ %d.%d", __WATCOMC__ / 100, (__WATCOMC__ % 100) / 10), buf), "", # endif #elif defined(__BORLANDC__) "Borland C++", # if (__BORLANDC__ < 0x0200) " 1.0", # elif (__BORLANDC__ == 0x0200) " 2.0", # elif (__BORLANDC__ == 0x0400) " 3.0", # elif (__BORLANDC__ == 0x0410) /* __BCPLUSPLUS__ = 0x0310 */ " 3.1", # elif (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */ " 4.0 or 4.02", # elif (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */ " 4.5", # elif (__BORLANDC__ == 0x0500) /* __BCPLUSPLUS__ = 0x0340 */ " 5.0", # elif (__BORLANDC__ == 0x0520) /* __BCPLUSPLUS__ = 0x0520 */ " 5.2 (C++ Builder 1.0)", # elif (__BORLANDC__ == 0x0530) /* __BCPLUSPLUS__ = 0x0530 */ " 5.3 (C++ Builder 3.0)", # elif (__BORLANDC__ == 0x0540) /* __BCPLUSPLUS__ = 0x0540 */ " 5.4 (C++ Builder 4.0)", # elif (__BORLANDC__ == 0x0550) /* __BCPLUSPLUS__ = 0x0550 */ " 5.5 (C++ Builder 5.0)", # else " later than 5.5", # endif #elif defined(__LCC__) "LCC-Win32", "", #elif defined(__GNUC__) # if defined(__RSXNT__) # if (defined(__DJGPP__) && !defined(__EMX__)) (sprintf(buf, "rsxnt(djgpp v%d.%02d) / gcc ", __DJGPP__, __DJGPP_MINOR__), buf), # elif defined(__DJGPP__) (sprintf(buf, "rsxnt(emx+djgpp v%d.%02d) / gcc ", __DJGPP__, __DJGPP_MINOR__), buf), # elif (defined(__GO32__) && !defined(__EMX__)) "rsxnt(djgpp v1.x) / gcc ", # elif defined(__GO32__) "rsxnt(emx + djgpp v1.x) / gcc ", # elif defined(__EMX__) "rsxnt(emx)+gcc ", # else "rsxnt(unknown) / gcc ", # endif # elif defined(__CYGWIN__) "cygnus win32 / gcc ", # elif defined(__MINGW32__) "mingw32 / gcc ", # else "gcc ", # endif __VERSION__, #else /* !_MSC_VER, !__WATCOMC__, !__BORLANDC__, !__LCC__, !__GNUC__ */ "unknown compiler (SDK?)", "", #endif /* ?compilers */ "\nWindows 95 / Windows NT", " (32-bit)", #ifdef __DATE__ " on ", __DATE__ #else "", "" #endif ); (*G.message)((zvoid *)&G, slide, (ulg)len, 0); return; } /* end function version() */ #endif /* !WINDLL */ #endif /* !SFX */ #ifdef MORE int screensize(int *tt_rows, int *tt_cols) { HANDLE hstdout; CONSOLE_SCREEN_BUFFER_INFO scr; hstdout = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(hstdout, &scr); if (tt_rows != NULL) *tt_rows = scr.srWindow.Bottom - scr.srWindow.Top + 1; if (tt_cols != NULL) *tt_cols = scr.srWindow.Right - scr.srWindow.Left + 1; return 0; /* signal success */ } #endif /* MORE */ #ifdef W32_STAT_BANDAID /* All currently known variants of WIN32 operating systems (Windows 95/98, * WinNT 3.x, 4.0, 5.0) have a nasty bug in the OS kernel concerning * conversions between UTC and local time: In the time conversion functions * of the Win32 API, the timezone offset (including seasonal daylight saving * shift) between UTC and local time evaluation is erratically based on the * current system time. The correct evaluation must determine the offset * value as it {was/is/will be} for the actual time to be converted. * * Some versions of MS C runtime lib'su\ UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1hq stat() returns utc time-stamps so * that localtime(timestamp) corresponds to the (potentially false) local * time shown by the OS' system programs (Explorer, command shell dir, etc.) * The RSXNT port follows the same strategy, but fails to recognize the * access-time attribute. * * For the NTFS file system (and other filesystems that store time-stamps * as UTC values), this results in st_mtime (, st_{c|a}time) fields which * are not stable but vary according to the seasonal change of "daylight * saving time in effect / not in effect". * * Other C runtime libs (CygWin, or the CRT DLLs supplied with Win95/NT * return the unix-time equivalent of the UTC FILETIME values as got back * from the Win32 API call. This time, return values from NTFS are correct * whereas utimes from files on (V)FAT volumes vary according to the DST * switches. * * To achieve timestamp consistency of UTC (UT extra field) values in * Zip archives, the Info-ZIP programs require work-around code for * proper time handling in stat() (and other time handling routines). */ /* stat() functions under Windows95 tend to fail for root directories. * * Watcom and Borland, at least, are affected by this bug. Watcom made * * a partial fix for 11.0 but still missed some cases. This substitute * * detects the case and fills in reasonable values. Otherwise we get * * effects like failure to extract to a root dir because it's not found. */ int zstat_win32(__W32STAT_GLOBALS__ const char *path, struct stat *buf) { if (!stat(path, buf)) { #ifdef NT_TZBUG_WORKAROUND /* stat was successful, now redo the time-stamp fetches */ int fs_uses_loctime = FStampIsLocTime(__G__ path); HANDLE h; FILETIME Modft, Accft, Creft; #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_path = (char *)alloca(strlen(path) + 1); INTERN_TO_ISO(path, ansi_path); # define Ansi_Path ansi_path #else # define Ansi_Path path #endif TTrace((stdout, "stat(%s) finds modtime %08lx\n", path, buf->st_mtime)); h = CreateFile(Ansi_Path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (h != INVALID_HANDLE_VALUE) { BOOL ftOK = GetFileTime(h, &Creft, &Accft, &Modft); CloseHandle(h); if (ftOK) { FTTrace((stdout, "GetFileTime returned Modft", 0, &Modft)); FTTrace((stdout, "GetFileTime returned Creft", 0, &Creft)); if (!fs_uses_loctime) { /* On a filesystem that stores UTC timestamps, we refill * the time fields of the struct stat buffer by directly * using the UTC values as returned by the Win32 * GetFileTime() API call. */ FileTime2utime(&Modft, &(buf->st_mtime)); if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) FileTime2utime(&Accft, &(buf->st_atime)); else buf->st_atime = buf->st_mtime; if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) FileTime2utime(&Creft, &(buf->st_ctime)); else buf->st_ctime = buf->st_mtime; TTrace((stdout,"NTFS, recalculated modtime %08lx\n", buf->st_mtime)); } else { /* On VFAT and FAT-like filesystems, the FILETIME values * are converted back to the stable local time before * converting them to UTC unix time-stamps. */ VFatFileTime2utime(&Modft, &(buf->st_mtime)); if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) VFatFileTime2utime(&Accft, &(buf->st_atime)); else buf->st_atime = buf->st_mtime; if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) VFatFileTime2utime(&Creft, &(buf->st_ctime)); else buf->st_ctime = buf->st_mtime; TTrace((stdout, "VFAT, recalculated modtime %08lx\n", buf->st_mtime)); } } } # undef Ansi_Path #endif /* NT_TZBUG_WORKAROUND */ return 0; } #ifdef W32_STATROOT_FIX else { DWORD flags; #ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ char *ansi_path = (char *)alloca(strlen(path) + 1); INTERN_TO_ISO(path, ansi_path); # define Ansi_Path ansi_path #else # define Ansi_Path path #endif flags = GetFileAttributes(Ansi_Path); if (flags != 0xFFFFFFFF && flags & FILE_ATTRIBUTE_DIRECTORY) { Trace((stderr, "\nstat(\"%s\",...) failed on existing directory\n", path)); memset(buf, 0, sizeof(struct stat)); buf->st_atime = buf->st_ctime = buf->st_mtime = dos_to_unix_time(DOSTIME_MINIMUM); /* 1-1-80 */ buf->st_mode = S_IFDIR | S_IREAD | ((flags & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE); return 0; } /* assumes: stat() won't fail on non-dirs without good reason */ # undef Ansi_Path } #endif /* W32_STATROOT_FIX */ return -1; } #endif /* W32_STAT_BANDAID */ #ifdef W32_USE_IZ_TIMEZONE #include "timezone.h" #define SECSPERMIN 60 #define MINSPERHOUR 60 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) static void conv_to_rule(LPSYSTEMTIME lpw32tm, struct rule * ZCONST ptrule); static void conv_to_rule(LPSYSTEMTIME lpw32tm, struct rule * ZCONST ptrule) { if (lpw32tm->wYear != 0) { ptrule->r_type = JULIAN_DAY; ptrule->r_day = ydays[lpw32tm->wMonth - 1] + lpw32tm->wDay; } else { ptrule->r_type = MONTH_NTH_DAY_OF_WEEK; ptrule->r_mon = lpw32tm->wMonth; ptrule->r_day = lpw32tm->wDayOfWeek; ptrule->r_week = lpw32tm->wDay; } ptrule->r_time = (long)lpw32tm->wHour * SECSPERHOUR + (long)(lpw32tm->wMinute * SECSPERMIN) + (long)lpw32tm->wSecond; } int GetPlatformLocalTimezone(register struct state * ZCONST sp, void (*fill_tzstate_from_rules)(struct state * ZCONST sp_res, ZCONST struct rule * ZCONST start, ZCONST struct rule * ZCONST end)) { TIME_ZONE_INFORMATION tzinfo; DWORD res; /* read current timezone settings from registry if TZ envvar missing */ res = GetTimeZoneInformation(&tzinfo); if (res != TIME_ZONE_ID_INVALID) { struct rule startrule, stoprule; conv_to_rule(&(tzinfo.StandardDate), &stoprule); conv_to_rule(&(tzinfo.DaylightDate), &startrule); sp->timecnt = 0; sp->ttis[0].tt_abbrind = 0; if ((sp->charcnt = WideCharToMultiByte(CP_ACP, 0, tzinfo.StandardName, -1, sp->chars, sizeof(sp->chars), NULL, NULL)) == 0) sp->chars[sp->charcnt++] = '\0'; sp->ttis[1].tt_abbrind = sp->charcnt; sp->charcnt += WideCharToMultiByte(CP_ACP, 0, tzinfo.DaylightName, -1, sp->chars + sp->charcnt, sizeof(sp->chars) - sp->charcnt, NULL, NULL); if ((sp->charcnt  UNZIP.BCK '[UNZIP542.WIN32]WIN32.C;1ZIP.AXP_OLB;1 - sp->ttis[1].tt_abbrind) == 0) sp->chars[sp->charcnt++] = '\0'; sp->ttis[0].tt_gmtoff = - (tzinfo.Bias + tzinfo.StandardBias) * MINSPERHOUR; sp->ttis[1].tt_gmtoff = - (tzinfo.Bias + tzinfo.DaylightBias) * MINSPERHOUR; sp->ttis[0].tt_isdst = 0; sp->ttis[1].tt_isdst = 1; sp->typecnt = (startrule.r_mon == 0 && stoprule.r_mon == 0) ? 1 : 2; if (sp->typecnt > 1) (*fill_tzstate_from_rules)(sp, &startrule, &stoprule); return TRUE; } return FALSE; } #endif /* W32_USE_IZ_TIMEZONE */ #endif /* !FUNZIP */ #ifndef WINDLL /* This replacement getch() function was originally created for Watcom C * and then additionally used with CYGWIN. Since UnZip 5.4, all other Win32 * ports apply this replacement rather that their supplied getch() (or * alike) function. There are problems with unabsorbed LF characters left * over in the keyboard buffer under Win95 (and 98) when ENTER was pressed. * (Under Win95, ENTER returns two(!!) characters: CR-LF.) This problem * does not appear when run on a WinNT console prompt! */ /* Watcom 10.6's getch() does not handle Alt+. */ /* Note that if PASSWD_FROM_STDIN is defined, the file containing */ /* the password must have a carriage return after the word, not a */ /* Unix-style newline (linefeed only). This discards linefeeds. */ int getch_win32(void) { HANDLE stin; DWORD rc; unsigned char buf[2]; int ret = -1; DWORD odemode = ~(DWORD)0; # ifdef PASSWD_FROM_STDIN stin = GetStdHandle(STD_INPUT_HANDLE); # else stin = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (stin == INVALID_HANDLE_VALUE) return -1; # endif if (GetConsoleMode(stin, &odemode)) SetConsoleMode(stin, ENABLE_PROCESSED_INPUT); /* raw except ^C noticed */ if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) ret = buf[0]; /* when the user hits return we get CR LF. We discard the LF, not the CR, * because when we call this for the first time after a previous input * such as the one for "replace foo? [y]es, ..." the LF may still be in * the input stream before whatever the user types at our prompt. */ if (ret == '\n') if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) ret = buf[0]; if (odemode != ~(DWORD)0) SetConsoleMode(stin, odemode); # ifndef PASSWD_FROM_STDIN CloseHandle(stin); # endif return ret; } #endif /* !WINDLL */ *[UNZIP542]WINCE.DIR;1+,! ./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-P4)),!l]i#vVtU %ٓke!G [n-5B2#-/:$3/7Ms $ mpDnf+HJW UNZIP.BCK! [UNZIP542.WINCE]IMGLIST.2BP;1AXP_OLB;1RBMFF(@UUUTUUUSUUUSoozoeUUzo8jzoHjzoxzoڪzo?UUWzeUUTeUjU_eUUTکjWUUUUUU*[UNZIP542.WINCE]IMGLIST.BMP;1+,./ 4v-! 0@123KPWO56z7z89GHJBMvv(@ ݇wwwww ݏ ݏ x ݏp x{{{{{x ݏp wwwwwx ݏ wwwwrx{{{{{x ݏp ݏ wwwwww{{{{{x ݏ ݈ ݏ ݏ DDDݏ ݇݇DDDDDDݏ {{x݇wwwwwwݏ݈݈ݏ݈*[UNZIP542.WINCE]INC.DIR;1+,d ./ 4-! 0123 KPWO56>!a7>!a89GHJICONIO.H ERRNO.H SIGNAL.HLSTDIO.H~*[UNZIP542.WINCE.INC]CONIO.H;1+, ./ 4-d 0@123KPWO56~7~89GHJ*[UNZIP542.WINCE.INC]ERRNO.H;1+, ./ 4-d 0@123KPWO56#7#89GHJ*[UNZIP542.WINCE.INC]SIGNAL.H;1+,L./ 4-d 0@123KPWO56#7#89GHJ*[UNZIP542.WINCE.INC]STDIO.H;1+,~./ 4-d 0@123KPWO56#7#89GHJ*[UNZIP542.WINCE]INTRFACE.CPP;1+,.k/ 4kkI-! 0@123KPWOl561a71a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: INTRFACE.CPP // // Description: This module acts as the interface between the Info-ZIP code and // our Windows code in WINMAIN.CPP. We expose the needed // functions to query a file list, test file(s), extract file(s), // and display a zip file comment. The windows code is never // bothered with understanding the Globals structure "Uz_Globs". // // This module also catches all the callbacks from the Info-ZIP // code, cleans up the data provided in the callback, and then // forwards the information to the appropriate function in the // windows code. These callbacks include status messages, file // lists, comments, password prompt, and file overwrite prompts. // // Finally, this module implements the few functions that the // Info-ZIP code expects the port to implement. These functions are // OS dependent and are mostly related to validating file names and // directories, and setting file attributes and dates of saved files. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. As of June 1999, Steve P. Miller has agreed to apply // the Info-ZIP License (see citation on top of this module) // to his work. See the contents of this License for terms // and conditon of using the product "Pocket UnZip". // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com or the Info-ZIP // mailing list Zip-Bugs@lists.wku.edu. // // Functions: DoListFiles // DoExtractOrTestFiles // DoGetComment // SetExtractToDirectory // InitGlobals // FreeGlobals // IsFileOrDirectory // SmartCreateDirectory // ExtractOrTestFilesThread // CheckForAbort2 // SetCurrentFile // UzpMessagePrnt2 // UzpInput2 // UzpMorePause // UzpPassword // UzpReplace // UzpSound // SendAppMsg // win_fprintf // mapattr // utimeToFileTime // GetFileTimes // close_outfile // do_wild // mapname // test_NT // checkdir // match // iswild // IsOldFileSystem // T UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1XP_OLB;1kn conv_to_rule // GetPlatformLocalTimezone // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // 08/01/99 Johnny Lee, Christian Spieler, Steve Miller, and others // Adapted to UnZip 5.41 (Version 1.1) // //***************************************************************************** //***************************************************************************** // The following information and structure are here just for reference //***************************************************************************** // // The Windows CE version of Unzip builds with the following defines set: // // // WIN32 // _WINDOWS // UNICODE // _UNICODE // WIN32_LEAN_AND_MEAN // STRICT // // POCKET_UNZIP (Main define - Always set) // // UNZIP_INTERNAL // WINDLL // DLL // REENTRANT // USE_EF_UT_TIME // NO_ZIPINFO // NO_STDDEF_H // NO_NTSD_EAS // // USE_SMITH_CODE (optional - See COPYING document) // USE_UNSHRINK (optional - See COPYING document) // // DEBUG (When building for Debug) // _DEBUG (When building for Debug) // NDEBUG (When building for Retail) // _NDEBUG (When building for Retail) // // _WIN32_WCE=100 (When building for Windows CE native) // //****************************************************************************/ extern "C" { #define __INTRFACE_CPP__ #define UNZIP_INTERNAL #include "unzip.h" #include "crypt.h" // Needed to pick up CRYPT define #include #include "intrface.h" #include "winmain.h" #ifndef _WIN32_WCE #include // _beginthreadex() and _endthreadex() #endif } #include // Must be outside of extern "C" block //****************************************************************************** //***** "Local" Global Variables //****************************************************************************** static USERFUNCTIONS g_uf; static EXTRACT_INFO *g_pExtractInfo = NULL; static FILE_NODE *g_pFileLast = NULL; static CHAR g_szExtractToDirectory[_MAX_PATH]; static BOOL g_fOutOfMemory; //****************************************************************************** //***** Local Function Prototypes //****************************************************************************** extern "C" { // Our exposed interface functions to the Info-ZIP core. BOOL DoListFiles(LPCSTR szZipFile); BOOL DoExtractOrTestFiles(LPCSTR szZipFile, EXTRACT_INFO *pei); BOOL DoGetComment(LPCSTR szFile); BOOL SetExtractToDirectory(LPTSTR szDirectory); // Internal functions. Uz_Globs* InitGlobals(LPCSTR szZipFile); void FreeGlobals(Uz_Globs *pG); int IsFileOrDirectory(LPCTSTR szPath); BOOL SmartCreateDirectory(Uz_Globs *pG, LPCSTR szDirectory); #ifdef _WIN32_WCE DWORD WINAPI ExtractOrTestFilesThread(LPVOID lpv); #else unsigned __stdcall ExtractOrTestFilesThread(void *lpv); #endif void SetCurrentFile(Uz_Globs *pG); // Callbacks from Info-ZIP code. int UZ_EXP UzpMessagePrnt2(zvoid *pG, uch *buffer, ulg size, int flag); int UZ_EXP UzpInput2(zvoid *pG, uch *buffer, int *size, int flag); void UZ_EXP UzpMorePause(zvoid *pG, const char *szPrompt, int flag); int UZ_EXP UzpPassword(zvoid *pG, int *pcRetry, char *szPassword, int nSize, const char *szZipFile, const char *szFile); int UZ_EXP CheckForAbort2(zvoid *pG, int fnflag, ZCONST char *zfn, ZCONST char *efn, ZCONST zvoid *details); int WINAPI UzpReplace(LPSTR szFile); void WINAPI UzpSound(void); void WINAPI SendAppMsg(ulg dwSize, ulg dwCompressedSize, unsigned ratio, unsigned month, unsigned day, unsigned year, unsigned hour, unsigned minute, char uppercase, LPSTR szPath, LPSTR szMethod, ulg dwCRC, char chCrypt); int win_fprintf(zvoid *pG, FILE *file, unsigned int dwCount, char far *buffer); void WINAPI Wiz_NoPrinting(int f); // Functions that Info-ZIP expects the port to write and export. void utimeToFileTime(time_t ut, FILETIME *pft, BOOL fOldFileSystem); int GetFileTimes(Uz_Globs *pG, FILETIME *pftCreated, FILETIME *pftAccessed, FILETIME *pftModified); int mapattr(Uz_Globs *pG); void close_outfile(Uz_Globs *pG); char* do_wild(Uz_Globs *pG, ZCONST char *wildspec); int mapname(Uz_Globs *pG, int renamed); int test_NT(Uz_Globs *pG, uch *eb, unsigned eb_size); int checkdir(Uz_Globs *pG, char *pathcomp, int flag); // Check for FAT, VFAT, HPFS, etc. BOOL IsOldFileSystem(char *szPath); } // extern "C" //****************************************************************************** //***** Our exposed interface functions to the Info-ZIP core //****************************************************************************** int DoListFiles(LPCSTR szZipFile) { int result; // Create our Globals struct and fill it in whith some default values. Uz_Globs *pG = InitGlobals(szZipFile); if (!pG) { return PK_MEM; } pG->UzO.vflag = 1; // verbosely: list directory (for WIN32 it is 0 or 1) pG->process_all_files = TRUE; // improves speed g_pFileLast = NULL; g_fOutOfMemory = FALSE; // We wrap some exception handling around the entire Info-ZIP engine to be // safe. Since we are running on a device with tight memory configurations, // all sorts of problems can arise when we run out of memory. __try { // Call the unzip routine. We will catch the file information in a // callback to SendAppMsg(). result = process_zipfiles(pG); // Make sure we didn't run out of memory in the process. if (g_fOutOfMemory) { result = PK_MEM; } } __except(EXCEPTION_EXECUTE_HANDLER) { // Catch any exception here. DebugOut(TEXT("Exception 0x%08X occurred in DoListFiles()"), GetExceptionCode()); result = PK_EXCEPTION; } g_pFileLast = NULL; // It is possible that the ZIP engine change the file name a bit (like adding // a ".zip" if needed). If so, we will pick up the new name. if ((result != PK_EXCEPTION) && pG->zipfn && *pG->zipfn) { strcpy(g_szZipFile, pG->zipfn); } // Free our globals. FreeGlobals(pG); return result; } //****************************************************************************** BOOL DoExtractOrTestFiles(LPCSTR szZipFile, EXTRACT_INFO *pei) { // WARNING!!! This functions hands the EXTRACT_INFO structure of to a thread // to perform the actual extraction/test. When the thread is done, it will // send a message to the progress dialog. The calling function must not // delete the EXTRAT_INFO structure until it receives the message. Currently, // this is not a problem for us since the structure lives on the stack of the // calling thread. The calling thread then displays a dialog that blocks the // calling thread from clearing the stack until the dialog is dismissed, which // occurs when the dialog receives the message. // Create our globals so we can store the file name. Uz_Globs *pG = InitGlobals(szZipFile); if (!pG) { pei->result = PK_MEM; SendMessage(g_hDlgProgress, WM_PRIVATE, MSG_OPERATION_COMPLETE, (LPARAM)pei); return FALSE; } // Store a global pointer to the Extract structure so it can be reached from // our thread and callback functions. g_pExtractInfo = pei; // Spawn our thread DWORD dwThreadId; HANDLE hThread; #ifdef _WIN32_WCE // On CE7r3 UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1XP_OLB;1k, we use good old CreateThread() since the WinCE CRT does not // allocate per-thread storage. hThread = CreateThread(NULL, 0, ExtractOrTestFilesThread, pG, 0, &dwThreadId); #else // On NT, we need use the CRT's thread function so that we don't leak any // CRT allocated memory when the thread exits. hThread = (HANDLE)_beginthreadex(NULL, 0, ExtractOrTestFilesThread, pG, 0, (unsigned*)&dwThreadId); #endif // Bail out if our thread failed to create. if (!hThread) { DebugOut(TEXT("CreateThread() failed [%u]"), GetLastError()); // Set our error as a memory error. g_pExtractInfo->result = PK_MEM; // Free our globals. FreeGlobals(pG); // Tell the progress dialog that we are done. SendMessage(g_hDlgProgress, WM_PRIVATE, MSG_OPERATION_COMPLETE, (LPARAM)pei); g_pExtractInfo = NULL; return FALSE; } // Close our thread handle since we have no use for it. CloseHandle(hThread); return TRUE; } //****************************************************************************** int DoGetComment(LPCSTR szFile) { int result; // Create our Globals struct and fill it in whith some default values. Uz_Globs *pG = InitGlobals(szFile); if (!pG) { return PK_MEM; } pG->UzO.zflag = TRUE; // display the zipfile comment // We wrap some exception handling around the entire Info-ZIP engine to be // safe. Since we are running on a device with tight memory configurations, // all sorts of problems can arise when we run out of memory. __try { // Call the unzip routine. We will catch the comment string in a callback // to win_fprintf(). result = process_zipfiles(pG); } __except(EXCEPTION_EXECUTE_HANDLER) { // Catch any exception here. DebugOut(TEXT("Exception 0x%08X occurred in DoGetComment()"), GetExceptionCode()); result = PK_EXCEPTION; } // Free our globals. FreeGlobals(pG); return result; } //****************************************************************************** BOOL SetExtractToDirectory(LPTSTR szDirectory) { BOOL fNeedToAddWack = FALSE; // Remove any trailing wack from the path. int length = _tcslen(szDirectory); if ((length > 0) && (szDirectory[length - 1] == TEXT('\\'))) { szDirectory[--length] = TEXT('\0'); fNeedToAddWack = TRUE; } #ifndef _WIN32_WCE // Check to see if a root directory was specified. if ((length == 2) && isalpha(szDirectory[0]) && (szDirectory[1] == ':')) { // If just a root is specified, we need to only verify the drive letter. if (!(GetLogicalDrives() & (1 << (tolower(szDirectory[0]) - (int)'a')))) { // This drive does not exist. Bail out with a failure. return FALSE; } } else #endif // We only verify path if length is >0 since we know "\" is valid. if (length > 0) { // Verify the the path exists and that it is a directory. if (IsFileOrDirectory(szDirectory) != 2) { return FALSE; } } // Store the directory for when we do an extract. TSTRTOMBS(g_szExtractToDirectory, szDirectory, countof(g_szExtractToDirectory)); // We always want a wack at the end of our path. strcat(g_szExtractToDirectory, "\\"); // Add the wack back to the end of the path. if (fNeedToAddWack) { _tcscat(szDirectory, TEXT("\\")); } return TRUE; } //****************************************************************************** //***** Internal functions //****************************************************************************** Uz_Globs* InitGlobals(LPCSTR szZipFile) { // Create our global structure - pG CONSTRUCTGLOBALS(); // Bail out if we failed to allocate our Globals structure. if (!pG) { return NULL; } // Clear our USERFUNCTIONS structure ZeroMemory(&g_uf, sizeof(g_uf)); // Initialize a global pointer to our USERFUNCTIONS structure that is // used by WINMAIN.CPP to access it (without using the pG construction). lpUserFunctions = &g_uf; // Store a global pointer to our USERFUNCTIONS structure in pG so that // the generic Info-ZIP code LIST.C and PROCESS.C can access it. pG->lpUserFunctions = &g_uf; // Fill in all our callback functions. pG->message = UzpMessagePrnt2; pG->input = UzpInput2; pG->mpause = UzpMorePause; pG->statreportcb = CheckForAbort2; pG->lpUserFunctions->replace = UzpReplace; pG->lpUserFunctions->sound = UzpSound; pG->lpUserFunctions->SendApplicationMessage = SendAppMsg; #if CRYPT pG->decr_passwd = UzpPassword; #endif // Match filenames case-sensitively. We can do this since we can guarantee // exact case because the user can only select files via our UI. pG->UzO.C_flag = FALSE; // Allocate and store the ZIP file name in pG->zipfn if (!(pG->zipfnPtr = new char[FILNAMSIZ])) { FreeGlobals(pG); return NULL; } pG->zipfn = pG->zipfnPtr; strcpy(pG->zipfn, szZipFile); // Allocate and store the ZIP file name in pG->zipfn. This needs to done // so that do_wild() does not wind up clearing out the zip file name when // it returns in process.c if (!(pG->wildzipfnPtr = new char[FILNAMSIZ])) { FreeGlobals(pG); return NULL; } pG->wildzipfn = pG->wildzipfnPtr; strcpy(pG->wildzipfn, szZipFile); return pG; } //****************************************************************************** void FreeGlobals(Uz_Globs *pG) { // Free our ZIP file name if (pG->zipfnPtr) { delete[] pG->zipfnPtr; pG->zipfnPtr = pG->zipfn = NULL; } // Free our wild name buffer if (pG->wildzipfnPtr) { delete[] pG->wildzipfnPtr; pG->wildzipfnPtr = pG->wildzipfn = NULL; } // Free everything else. DESTROYGLOBALS() } //****************************************************************************** int IsFileOrDirectory(LPCTSTR szPath) { // Geth the attributes of the item. DWORD dwAttribs = GetFileAttributes(szPath); // Bail out now if we could not find the path at all. if (dwAttribs == 0xFFFFFFFF) { return 0; } // Return 1 for file and 2 for directory. return ((dwAttribs & FILE_ATTRIBUTE_DIRECTORY) ? 2 : 1); } //****************************************************************************** BOOL SmartCreateDirectory(Uz_Globs *pG, LPCSTR szDirectory) { // Copy path to a UNICODE buffer. TCHAR szBuffer[_MAX_PATH]; MBSTOTSTR(szBuffer, szDirectory, countof(szBuffer)); int x = IsFileOrDirectory(szBuffer); // Create the directory if it does not exist. if (x == 0) { if (!CreateDirectory(szBuffer, NULL)) { Info(slide, 1, ((char *)slide, "error creating directory: %s\n", szDirectory)); return FALSE; } // If there is a file with the same name, then display an error. } else if (x == 1) { Info(slide, 1, ((char *)slide, "cannot create %s as a file with same name already exists.\n", szDirectory)); return FALSE; } // If the directory already exists or was created, then return success. return TRUE; } //****************************************************************************** #ifdef _WIN32_WCE // On WinCE, we declare our thread function the way CreateThread() likes it. DWORD WINAPI ExtractOrTestFilesThread(LPVOID lpv) { #else // On WinNT, we declare our thread function the way _beginthreadex likes it. unsigned __stdcall ExtractOrTestFilesThread(void *lpv) { #endif Uz_Globs *pG = (Uz_Globs*)lpv; if (g_pExtractInfo->fEe UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1XP_OLB;1kWq&xtract) { pG->extract_flag = TRUE; switch (g_pExtractInfo->overwriteMode) { case OM_NEWER: // Update (extract only newer/brand-new files) pG->UzO.uflag = TRUE; break; case OM_ALWAYS: // OK to overwrite files without prompting pG->UzO.overwrite_all = TRUE; break; case OM_NEVER: // Never overwrite files (no prompting) pG->UzO.overwrite_none = TRUE; break; default: // Force a prompt pG->UzO.overwrite_all = FALSE; pG->UzO.overwrite_none = FALSE; pG->UzO.uflag = FALSE; break; } // Throw away paths if requested. pG->UzO.jflag = !g_pExtractInfo->fRestorePaths; } else { pG->UzO.tflag = TRUE; } if (g_pExtractInfo->szFileList) { pG->filespecs = g_pExtractInfo->dwFileCount; pG->pfnames = g_pExtractInfo->szFileList; } else { // Improves performance if all files are being extracted. pG->process_all_files = TRUE; } // Invalidate our file offset to show that we are starting a new operation. g_pExtractInfo->dwFileOffset = 0xFFFFFFFF; // We wrap some exception handling around the entire Info-ZIP engine to be // safe. Since we are running on a device with tight memory configurations, // all sorts of problems can arise when we run out of memory. __try { // Put a jump marker on our stack so the user can abort. int error = setjmp(dll_error_return); // If setjmp() returns 0, then we just set our jump marker and we can // continue with the operation. If setjmp() returned something else, // then we reached this point because the operation was aborted and // set our instruction pointer back here. if (error > 0) { // We already called process_zipfiles() and were thrown back here. g_pExtractInfo->result = (error == 1) ? PK_BADERR : error; } else { // Entering Info-ZIP... close your eyes. g_pExtractInfo->result = process_zipfiles(pG); } } __except(EXCEPTION_EXECUTE_HANDLER) { // Catch any exception here. DebugOut(TEXT("Exception 0x%08X occurred in ExtractOrTestFilesThread()"), GetExceptionCode()); g_pExtractInfo->result = PK_EXCEPTION; } // Free our globals. FreeGlobals(pG); // Tell the progress dialog that we are done. SendMessage(g_hDlgProgress, WM_PRIVATE, MSG_OPERATION_COMPLETE, (LPARAM)g_pExtractInfo); // Clear our global pointer as we are done with it. g_pExtractInfo = NULL; #ifndef _WIN32_WCE // On NT, we need to free any CRT allocated memory. _endthreadex(0); #endif return 0; } //****************************************************************************** void SetCurrentFile(Uz_Globs *pG) { // Reset all our counters as we about to process a new file. g_pExtractInfo->dwFileOffset = (DWORD)pG->pInfo->offset; g_pExtractInfo->dwFile++; g_pExtractInfo->dwBytesWrittenThisFile = 0; g_pExtractInfo->dwBytesWrittenPreviousFiles += g_pExtractInfo->dwBytesTotalThisFile; g_pExtractInfo->dwBytesTotalThisFile = pG->lrec.ucsize; g_pExtractInfo->szFile = pG->filename; g_pExtractInfo->fNewLineOfText = TRUE; // Pass control to our GUI thread to do a full update our progress dialog. SendMessage(g_hWndMain, WM_PRIVATE, MSG_UPDATE_PROGRESS_COMPLETE, (LPARAM)g_pExtractInfo); // Check our abort flag. } //****************************************************************************** //***** Callbacks from Info-ZIP code. //****************************************************************************** int UZ_EXP UzpMessagePrnt2(zvoid *pG, uch *buffer, ulg size, int flag) { // Some ZIP files cause us to get called during DoListFiles(). We only handle // messages while processing DoExtractFiles(). if (!g_pExtractInfo) { if (g_hWndEdit) { SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)buffer); } else { #ifdef UNICODE DebugOut(TEXT("Unhandled call to UzpMessagePrnt2(\"%S\")"), buffer); #else DebugOut(TEXT("Unhandled call to UzpMessagePrnt2(\"%s\")"), buffer); #endif } return 0; } // When extracting, mapname() will get called for every file which in turn // will call SetCurrentFile(). For testing though, mapname() never gets // called so we need to be on the lookout for a new file. if (g_pExtractInfo->dwFileOffset != (DWORD)((Uz_Globs*)pG)->pInfo->offset) { SetCurrentFile((Uz_Globs*)pG); } // Make sure this message was intended for us to display. if (!MSG_NO_WGUI(flag) && !MSG_NO_WDLL(flag)) { // Insert a leading newline if requested to do so. if (MSG_LNEWLN(flag) && !g_pExtractInfo->fNewLineOfText) { SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)"\n"); g_pExtractInfo->fNewLineOfText = TRUE; } // Since we use a proportional font, we need to do a little cleanup of the // text we are passed since it assumes a fixed font and adds padding to try // to line things up. We remove leading whitespace on any new line of text. if (g_pExtractInfo->fNewLineOfText) { while (*buffer == ' ') { buffer++; } } // We always remove trailing whitespace. LPSTR psz = (LPSTR)buffer; LPSTR pszn; while ((pszn = MBSCHR(psz, ' ')) != NULL) { for (psz = pszn+1; *psz == ' '; psz++); if (*psz == '\0') { *pszn = '\0'; break; } } // Determine if the next line of text will be a new line of text. g_pExtractInfo->fNewLineOfText = ((*psz == '\r') || (*psz == '\n')); // Change all forward slashes to back slashes in the buffer ForwardSlashesToBackSlashesA((LPSTR)buffer); // Add the cleaned-up text to our extraction log edit control. SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)buffer); // Append 2a trailing newline if requested to do so. if (MSG_TNEWLN(flag) || MSG_MNEWLN(flag) && !g_pExtractInfo->fNewLineOfText) { SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)"\n"); g_pExtractInfo->fNewLineOfText = TRUE; } } return 0; } //****************************************************************************** int UZ_EXP UzpInput2(zvoid *pG, uch *buffer, int *size, int flag) { DebugOut(TEXT("WARNING: UzpInput2(...) called")); return 0; } //****************************************************************************** void UZ_EXP UzpMorePause(zvoid *pG, const char *szPrompt, int flag) { DebugOut(TEXT("WARNING: UzpMorePause(...) called")); } //****************************************************************************** int UZ_EXP UzpPassword(zvoid *pG, int *pcRetry, char *szPassword, int nSize, const char *szZipFile, const char *szFile) { // Return Values: // IZ_PW_ENTERED got some PWD string, use/try it // IZ_PW_CANCEL no password available (for this entry) // IZ_PW_CANCELALL no password, skip any further PWD request // IZ_PW_ERROR failure (no mem, no tty, ...) #if CRYPT // Build the data structure for our dialog. DECRYPT_INFO di; di.retry = *pcRetry; di.szPassword = szPassword; di.nSize = nSize; di.szFile = szFile; // Clear the password to be safe. *di.szPassword = '\0'; // On our first call for a file, *pcRetry == 0. If we would like t!  UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1XP_OLB;1k5o allow // for retries, then we set the value of *pcRetry to the number of retries we // are willing to allow. We will be recalled as neccessary, each time with // *pcRetry being decremented once. 1 is the last retry we will get. *pcRetry = (*pcRetry == 0) ? MAX_PASSWORD_RETRIES : (*pcRetry - 1); // Pass control to our GUI thread which will prompt the user for a password. return SendMessage(g_hWndMain, WM_PRIVATE, MSG_PROMPT_FOR_PASSWORD, (LPARAM)&di); #else return -2; #endif } //****************************************************************************** int UZ_EXP CheckForAbort2(zvoid *pG, int fnflag, ZCONST char *zfn, ZCONST char *efn, ZCONST zvoid *details) { int rval = UZ_ST_CONTINUE; if (g_pExtractInfo->fAbort) { // Add a newline to our log if we are in the middle of a line of text. if (!g_pExtractInfo->fNewLineOfText) { SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)"\n"); } // Make sure whatever file we are currently processing gets closed. if (((int)((Uz_Globs *)pG)->outfile != 0) && ((int)((Uz_Globs *)pG)->outfile != -1)) { if (g_pExtractInfo->fExtract && *efn) { // Make sure the user is aware that this file is screwed. SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)"warning: "); SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)efn); SendM8essage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)" is probably truncated.\n"); } } // Display an aborted message in the log SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)"Operation aborted by user.\n"); // Signal "Immediate Cancel" back to the UnZip engine. rval = UZ_ST_BREAK; } return rval; } //****************************************************************************** int WINAPI UzpReplace(LPSTR szFile) { // Pass control to our GUI thread which will prompt the user to overwrite. return SendMessage(g_hWndMain, WM_PRIVATE, MSG_PROMPT_TO_REPLACE, (LPARAM)szFile); } //****************************************************************************** void WINAPI UzpSound(void) { // Do nothing. } //****************************************************************************** // Called from LIST.C void WINAPI SendAppMsg(ulg dwSize, ulg dwCompressedSize, unsigned ratio, unsigned month, unsigned day, unsigned year, unsigned hour, unsigned minute, char uppercase, LPSTR szPath, LPSTR szMethod, ulg dwCRC, char chCrypt) { // If we are out of memory, then just bail since we will only make things worse. if (g_fOutOfMemory) { return; } // We get our Globals structure and then retrieve the real file name. GETGLOBALS() szPath = pG->filename; // Allocate a FILE_NODE large enough to hold this file. int length = strlen(szPath) + strlen(szMethod); g_pFileLast = (FILE_NODE*)new BYTE[sizeof(FILE_NODE) + (sizeof(TCHAR) * length)]; // Bail out if we failed to allocate the node. if (!g_pFileLast) { #ifdef UNICODE DebugOut(TEXT("Failed to create a FILE_NODE for \"%S\"."), szPath); #else DebugOut(TEXT("Failed to create a FILE_NODE for \"%s\"."), szPath); #endif g_fOutOfMemory = TRUE; return; } // Fill in our node. g_pFileLast->dwSize = dwSize; g_pFileLast->dwCompressedSize = dwCompressedSize; g_pFileLast->dwCRC = dwCRC; g_pFileLast->szComment = NULL; g_pFileLast->szType = NULL; // Fix the year value to contain the real year. year += 1900; // Year: 0 - 4095 (12) 1111 1111 1111 0000 0000 0000 0000 0000 (0xFFF00000) // Month: 1 - 12 ( 4) 0000 0000 0000 1111 0000 0000 0000 0000 (0x000F0000) // Day: 1 - 31 ( 5) 0000 0000 0000 0000 1111 1000 0000 0000 (0x0000F800) // Hour: 0 - 23 ( 5) 0000 0000 0000 0000 0000 0111 1100 0000 (0x000007C0) // Minute: 0 - 59 ( 6) 0000 0000 0000 0000 0000 0000 0011 1111 (0x0000003F) // Do some bit shifting to make the date and time fit in a DWORD. g_pFileLast->dwModified = (((DWORD)(year & 0x0FFF) << 20) | ((DWORD)(month & 0x000F) << 16) | ((DWORD)(day & 0x001F) << 11) | ((DWORD)(hour & 0x001F) << 6) | ((DWORD)(minute & 0x003F))); // We need to get our globals structure to determine our attributes and // encryption information. g_pFileLast->dwAttributes = (pG->crec.external_file_attributes & 0xFF); if (chCrypt == 'E') { g_pFileLast->dwAttributes |= ZFILE_ATTRIBUTE_ENCRYPTED; } // Store the path and method in our string buffer. strcpy(g_pFileLast->szPathAndMethod, szPath); strcpy(g_pFileLast->szPathAndMethod + strlen(szPath) + 1, szMethod); // Pass the file object to our windows code to have it added to our list. AddFileToListView(g_pFileLast); } //****************************************************************************** int win_fprintf(zvoid *pG, FILE *file, unsigned int dwCount, char far *buffer) { // win_fprintf() is used within Info-ZIP to write to a file as well as log // information. If the "file" is a real file handle (not stdout or stderr), // then we write the data to the file and return. if ((file != stdout) && (file != stderr)) { DWORD dwBytesWriten = 0; #ifdef _WIN32_WCE // On WinCE all FILEs are really HANDLEs. See WINCE.CPP for more info. WriteFile((HANDLE)file, buffer, dwCount, &dwBytesWriten, NULL); #else dwBytesWriten = fwrite(buffer, 1, dwCount, file); #endif // Update our bytes written count. g_pExtractInfo->dwBytesWrittenThisFile += dwBytesWriten; // Pass control to our GUI thread to do a partial update our progress dialog. SendMessage(g_hWndMain, WM_PRIVATE, MSG_UPDATE_PROGRESS_PARTIAL, (LPARAM)g_pExtractInfo); return dwBytesWriten; } // Check to see if we are expecting a extraction progress string if (g_pExtractInfo) { // Most of our progress strings come to our UzpMessagePrnt2() callback, // but we occasionally get one here. We will just forward it to // UzpMessagePrnt2() as if it never came here. UzpMessagePrnt2(pG, (uch*)buffer, dwCount, 0); return dwCount; } // Check to see if we are expecting a zip file comment string. if (g_hWndEdit) { // Change all forward slashes to back slashes in the buffer ForwardSlashesToBackSlashesA((LPSTR)buffer); SendMessage(g_hWndMain, WM_PRIVATE, MSG_ADD_TEXT_TO_EDIT, (LPARAM)buffer); return dwCount; } // Check to see if we are expecting a compressed file comment string. if (g_pFileLast) { // Calcalute the size of the buffer we will need to store this comment. // We are going to convert all ASC values 0 - 31 (except tab, new line, // and CR) to ^char. int size = 1; for (char *p2, *p1 = buffer; *p1; INCSTR(p1)) { size += ((*p1 >= 32) || (*p1 == '\t') || (*p1 == '\r') || (*p1 == '\n')) ? CLEN(p1) : 2; } // Allocate a comment buffer and assign it to the last file node we saw. if (g_pFileLast->szComment = new CHAR[size]) { // Copy while formatting. for (p1 = buffer, p2 = (char*)g_pFileLast->szComment; *p1; INCSTR(p1)) { if ((*p1 >= 32) || (*p1 == '\t') || ےK UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1XP_OLB;1khD (*p1 == '\r') || (*p1 == '\n')) { memcpy(p2, p1, CLEN(p1)); p2 += CLEN(p1); } else { *(p2++) = '^'; *(p2++) = 64 + *p1; } } *p2 = '\0'; } // Update the attributes of the file node to include the comment attribute. g_pFileLast->dwAttributes |= ZFILE_ATTRIBUTE_COMMENT; // Clear the file node so we don't try to add another bogus comment to it. g_pFileLast = NULL; return dwCount; } if (dwCount >= _MAX_PATH) { buffer[_MAX_PATH] = '\0'; } #ifdef UNICODE DebugOut(TEXT("Unhandled call to win_fprintf(\"%S\")"), buffer); #else DebugOut(TEXT("Unhandled call to win_fprintf(\"%S\")"), buffer); #endif return dwCount; } //****************************************************************************** void WINAPI Wiz_NoPrinting(int f) { // Do nothing. } //****************************************************************************** //***** Functions that Info-ZIP expects the port to write and export. //***** Some of this code was stolen from the WIN32 port and highly modified. //****************************************************************************** int mapattr(Uz_Globs *pG) { // Check to see if we are extracting this file for viewing. Currently, we do // this by checking the szMappedPath member of our extract info stucture // since we know OnActionView() is the only one who sets this member. if (g_pExtractInfo && g_pExtractInfo->szMappedPath) { // If we are extracting for view only, then we ignore the file's real // attributes and force the file to create as read-only. We make the file // read-only to help prevent the user from making changes to the temporary // file and then trying to save the changes back to a file that we will // eventually delete. pG->pInfo->file_attr = FILE_ATTRIBUTE_READONLY; } else { // Store the attribute exactly as it appears for normal extraction/test. pG->pInfo->file_attr = (unsigned)pG->crec.external_file_attributes & 0xff; } return PK_OK; } //****************************************************************************** void utimeToFileTime(time_t ut, FILETIME *pft, BOOL fOldFileSystem) { // time_t is a 32-bit value for the seconds since January 1, 1970 // FILETIME is a 64-bit value for the number of 100-nanosecond intervals since // January 1, 1601 // DWORDLONG is a 64-bit int that we can use to perform large math operations. // time_t has minimum of 1/1/1970. Many file systems, such as FAT, have a // minimum date of 1/1/1980. If extracting to one of those file systems and // out time_t is less than 1980, then we make it 1/1/1980. // (365 days/yr * 10 yrs + 3 leap yr days) * (60 secs * 60 mins * 24 hrs). if (fOldFileSystem && (ut < 0x12CFF780)) { ut = 0x12CFF780; } // Compute the FILETIME for the given time_t. DWORDLONG dwl = ((DWORDLONG)116444736000000000 + ((DWORDLONG)ut * (DWORDLONG)10000000)); // Store the return value. *pft = *(FILETIME*)&dwl; // Now for the next fix for old file systems. If we are in Daylight Savings // Time (DST) and the file is not in DST, then we need subtract off the DST // bias from the filetime. This is due to a bug in Windows (NT, CE, and 95) // that causes the DST bias to be added to all file times when the system // is in DST, even if the file is not in DST. This only effects old file // systems since they store local times instead of UTC times. Newer file // systems like NTFS and CEFS store UTC times. if (fOldFileSystem) { // We use the CRT's localtime() and Win32's FileTimeToLocalTime() // functions to compute the DST bias. This works because localtime() // correctly adds the DST bias only if the file time is in DST. // FileTimeToLocalTime() always adds the DST bias to the time. // Therefore, if the functions return different results, we know we // are dealing with a non-DST file during a system DST. FILETIME ftCRT, ftWin32; // Get the CRT result - result is a "tm" struct. struct tm *ptmCRT = localtime(&ut); // Convert the "tm" struct to a FILETIME. SYSTEMTIME stCRT; ZeroMemory(&stCRT, sizeof(stCRT)); stCRT.wYear = ptmCRT->tm_year + 1900; stCRT.wMonth = ptmCRT->tm_mon + 1; stCRT.wDay = ptmCRT->tm_mday; stCRT.wHour = ptmCRT->tm_hour; stCRT.wMinute = ptmCRT->tm_min; stCRT.wSecond = ptmCRT->tm_sec; SystemTimeToFileTime(&stCRT, &ftCRT); // Get the Win32 result - result is a FILETIME. if (FileTimeToLocalFileTime(pft, &ftWin32)) { // Subtract the difference from our current filetime. *(DWORDLONG*)pft -= *(DWORDLONG*)&ftWin32 - *(DWORDLONG*)&ftCRT; } } } //****************************************************************************** int GetFileTimes(Uz_Globs *pG, FILETIME *pftCreated, FILETIME *pftAccessed, FILETIME *pftModified) { // We need to check to see if this file system is limited. This includes // FAT, VFAT, and HPFS. It does not include NTFS and CEFS. The limited // file systems can not support dates < 1980 and they store file local times // for files as opposed to UTC times. BOOL fOldFileSystem = IsOldFileSystem(pG->filename); #ifdef USE_EF_UT_TIME // Always true for WinCE build #ifdef IZ_CHECK_TZ if (pG->extra_field && pG->tz_is_valid) { #else if (pG->extra_field) { #endif // Structure for Unix style actime, modtime, creatime iztimes z_utime; // Get any date/time we can. This can return 0 to 3 unix time fields. unsigned eb_izux_flg = ef_scan_for_izux(pG->extra_field, pG->lrec.extra_field_length, 0, pG->lrec.last_mod_dos_datetime, &z_utime, NULL); // We require at least a modified time. if (eb_izux_flg & EB_UT_FL_MTIME) { // We know we have a modified time, so get it first. utimeToFileTime(z_utime.mtime, pftModified, fOldFileSystem); // Get the accessed time if we have one. if (eb_izux_flg & EB_UT_FL_ATIME) { utimeToFileTime(z_utime.atime, pftAccessed, fOldFileSystem); } // Get the created time if we have one. if (eb_izux_flg & EB_UT_FL_CTIME) { utimeToFileTime(z_utime.ctime, pftCreated, fOldFileSystem); } // Return our flags. return (int)eb_izux_flg; } } #endif // USE_EF_UT_TIME // If all else fails, we can resort to using the DOS date and time data. time_t ux_modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); utimeToFileTime(ux_modtime, pftModified, fOldFileSystem); *pftAccessed = *pftModified; return (EB_UT_FL_MTIME | EB_UT_FL_ATIME); } //****************************************************************************** void close_outfile(Uz_Globs *pG) { // Get the 3 time stamps for the file. FILETIME ftCreated, ftAccessed, ftModified; int timeFlags = GetFileTimes(pG, &ftCreated, &ftAccessed, &ftModified); TCHAR szFile[_MAX_PATH]; MBSTOTSTR(szFile, pG->filename, countof(szFile)); #ifdef _WIN32_WCE // Cast the outfile to a HANDLE (since that is really what it is), and // flush the file. We need to flush, because any unsaved data that is // written to the file during CloseHandle() will step on the work done // by SetFileTime(). HANDLE hF :{ UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1LP;1k{Sile = (HANDLE)pG->outfile; FlushFileBuffers(hFile); #else // Close the file and then re-open it using the Win32 CreateFile() call. // SetFileTime() requires a Win32 file HANDLE created with GENERIC_WRITE // access. fclose(pG->outfile); HANDLE hFile = CreateFile(szFile, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #endif // Set the file's date and time. if (hFile != INVALID_HANDLE_VALUE) { // Make sure we retrieved some valid time stamp(s) if (timeFlags) { // Set the various date and time fields. if (!SetFileTime(hFile, (timeFlags & EB_UT_FL_CTIME) ? &ftCreated : NULL, (timeFlags & EB_UT_FL_ATIME) ? &ftAccessed : NULL, (timeFlags & EB_UT_FL_MTIME) ? &ftModified : NULL)) { DebugOut(TEXT("SetFileTime() failed [%u]"), GetLastError()); } } else { DebugOut(TEXT("GetFileTimes() failed")); } // Close out file. CloseHandle(hFile); } else { DebugOut(TEXT("CreateFile() failed [%u]"), GetLastError()); } // If the file was successfully written, then set the attributes. if (!pG->disk_full && !g_pExtractInfo->fAbort) { if (!SetFileAttributes(szFile, G.pInfo->file_attr & 0x7F)) { DebugOut(TEXT("SetFileAttributes() failed [%u]"), GetLastError()); } } // Clear outfile so we know it is closed. pG->outfile = 0; return; } //****************************************************************************** // Called by PROCESS.C char* do_wild(Uz_Globs *pG, ZCONST char *wildspec) { // This is a very slimmed down version of do_wild() taken from WIN32.C. // Since we don't support wildcards, we basically just return the wildspec // passed in as the filename. // First call - must initialize everything. if (!pG->notfirstcall) { pG->notfirstcall = TRUE; return strcpy(pG->matchname, wildspec); } // Last time through - reset for new wildspec. pG->notfirstcall = FALSE; return (char*)NULL; } //****************************************************************************** // Called from EXTRACT.C // // returns: 1 - (on APPEND_NAME) truncated filename // 2 - path doesn't exist, not allowed to create // 3 - path doesn't exist, tried to create and failed; or // path exists and is not a directory, but is supposed to be // 4 - path is too long // 10 - can't allocate memory for filename buffers // // IZ_VOL_LABEL - Path was a volume label, skip it. // IZ_CREATED_DIR - Created a directory. // int mapname(Uz_Globs *pG, int renamed) { // mapname() is a great place to reset all our status counters for the next // file to be processed since it is called for every zip file member before // any work is done with that member. SetCurrentFile(pG); // If Volume Label, skip the "extraction" quietly if (pG->pInfo->vollabel) { return IZ_VOL_LABEL; } CHAR szBuffer[countof(pG->filename)] = "", *pIn, *pOut, *pLastSemi = NULL; // Initialize file path buffer with our "extract to" path. strcpy(szBuffer, g_szExtractToDirectory); pOut = szBuffer + strlen(szBuffer); // Point pIn to beginning of our internal pathname. // If we are junking paths, then locate the file portion of the path. pIn = (pG->UzO.jflag) ? (CHAR*)GetFileFromPath(pG->filename) : pG->filename; // Begin main loop through characters in filename. for ( ; *pIn; INCSTR(pIn)) { // Make sure we don't overflow our output buffer. if (pOut >= (szBuffer + countof(szBuffer) - 2)) { Info(slide, 1, ((char*)slide, "path too long: %s\n", pG->filename)); return 4; } // Examine the next character in our input buffer. switch (*pIn) { // Check for a directory wack. case '/': case '\\': *pOut = '\0'; if (!SmartCreateDirectory(pG, szBuffer)) { Info(slide, 1, ((char*)slide, "failure extracting: %s\n", pG->filename)); return 3; } *(pOut++) = '\\'; pLastSemi = NULL; // Leave any directory semi-colons alone break; // Check for illegal characters and replace with underscore. case ':': case '*': case '?': case '"': case '<': case '>': case '|': *(pOut++) = '_'; break; // Check for start of VMS version. case ';': pLastSemi = pOut; // Make note as to where we are. *(pOut++) = *pIn; // Leave the semi-colon alone for now. break; default: // Allow European characters and spaces in filenames. #ifdef _MBCS if ((UCHAR)*pIn >= 0x20) { memcpy(pOut, pIn, CLEN(pIn)); INCSTR(pOut); } else { *(pOut++) = '_'; } #else *(pOut++) = (((UCHAR)*pIn >= 0x20) ? *pIn : '_'); #endif } } // Done with output buffer, terminate it. *pOut = '\0'; // Remove any VMS version numbers if found (appended ";###"). if (pLastSemi) { // Walk over all digits following the semi-colon. for (pOut = pLastSemi + 1; (*pOut >= '0') && (*pOut <= '9'); pOut++) { } // If we reached the end, then nuke the semi-colon and digits. if (!*pOut) { *pLastSemi = '\0'; } } // Copy the mapped name back to the internal path buffer strcpy(pG->filename, szBuffer); // Fill in the mapped name buffer if the original caller requested us to. if (g_pExtractInfo->szMappedPath) { strcpy(g_pExtractInfo->szMappedPath, szBuffer); } // If it is a directory, then display the "creating" status text. if ((pOut > szBuffer) && (lastchar(szBuffer, pOut-szBuffer) == '\\')) { Info(slide, 0, ((char *)slide, "creating: %s\n", pG->filename)); return IZ_CREATED_DIR; } return PK_OK; } //****************************************************************************** // Called from EXTRACT.C int test_NT(Uz_Globs *pG, uch *eb, unsigned eb_size) { // This function is called when an NT security descriptor is found in the // extra field. We have nothing to do, so we just return success. return PK_OK; } //****************************************************************************** // Called from PROCESS.C int checkdir(Uz_Globs *pG, char *pathcomp, int flag) { // This function is only called by free_G_buffers() from PROCESS.C with the // flag set to END. We have nothing to do, so we just return success. return PK_OK; } //****************************************************************************** // Called from EXTRACT.C and LIST.C int match(ZCONST char *string, ZCONST char *pattern, int ignore_case) { // match() for the other ports compares a file in the Zip file with some // command line file pattern. In our case, we always pass in exact matches, // so we can simply do a string compare to see if we have a match. return (strcmp(string, pattern) == 0); } //****************************************************************************** // Called from PROCESS.C int iswild(ZCONST char *pattern) { // Our file patterns never contain wild characters. They are always exact // matches of file names in our Zip file. return FALSE; } //****************************************************************************** //***** Functions to correct time stamp bugs on old file systems. //** / UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.CPP;1LP;1kZb**************************************************************************** //****************************************************************************** // Borrowed/Modified from win32.c BOOL IsOldFileSystem(char *szPath) { #ifdef _WIN32_WCE char szRoot[10]; // Get the first nine characters of the path. strncpy(szRoot, szPath, 9); szRoot[9] = '\0'; // Convert to uppercase to help with compare. _strupr(szRoot); // PC Cards are mounted off the root in a directory called "\PC Cards". // PC Cards are FAT, no CEOS. We need to check if the file is being // extracted to the PC card. return !strcmp(szRoot, "\\PC CARD\\"); #else char szRoot[_MAX_PATH] = "\0\0\0", szFS[64]; // Check to see if our path contains a drive letter. if (isalpha(szPath[0]) && (szPath[1] == ':') && (szPath[2] == '\\')) { // If so, then just copy the drive letter, colon, and wack to our root path. strncpy(szRoot, szPath, 3); } else { // Expand the path so we can get a drive letter. GetFullPathNameA(szPath, sizeof(szRoot), szRoot, NULL); // Make sure we actually got a drive letter back in our root path buffer.. if (!isalpha(szRoot[0]) || (szRoot[1] != ':') || (szRoot[2] != '\\')) { // When in doubt, return TRUE. return TRUE; } } // NULL terminate after the wack to ensure we have just the root path. szRoot[3] = '\0'; // Get the file system type string. GetVolumeInformationA(szRoot, NULL, 0, NULL, NULL, NULL, szFS, sizeof(szFS)); // Ensure that the file system type string is uppercase. _strupr(szFS); // Return true for (V)FAT and (OS/2) HPFS format. return !strncmp(szFS, "FAT", 3) || !strncmp(szFS, "VFAT", 4) || !strncmp(szFS, "HPFS", 4); #endif // _WIN32_WCE } //****************************************************************************** //***** Functions to supply timezone information from the Windows registry to //***** Info-ZIP's private RTL "localtime() et al." replacements in timezone.c. //****************************************************************************** //****************************************************************************** // Copied from win32.c #ifdef W32_USE_IZ_TIMEZONE #include "timezone.h" #define SECSPERMIN 60 #define MINSPERHOUR 60 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) static void conv_to_rule(LPSYSTEMTIME lpw32tm, struct rule * ZCONST ptrule); static void conv_to_rule(LPSYSTEMTIME lpw32tm, struct rule * ZCONST ptrule) { if (lpw32tm->wYear != 0) { ptrule->r_type = JULIAN_DAY; ptrule->r_day = ydays[lpw32tm->wMonth - 1] + lpw32tm->wDay; } else { ptrule->r_type = MONTH_NTH_DAY_OF_WEEK; ptrule->r_mon = lpw32tm->wMonth; ptrule->r_day = lpw32tm->wDayOfWeek; ptrule->r_week = lpw32tm->wDay; } ptrule->r_time = (long)lpw32tm->wHour * SECSPERHOUR + (long)(lpw32tm->wMinute * SECSPERMIN) + (long)lpw32tm->wSecond; } int GetPlatformLocalTimezone(register struct state * ZCONST sp, void (*fill_tzstate_from_rules)(struct state * ZCONST sp_res, ZCONST struct rule * ZCONST start, ZCONST struct rule * ZCONST end)) { TIME_ZONE_INFORMATION tzinfo; DWORD res; /* read current timezone settings from registry if TZ envvar missing */ res = GetTimeZoneInformation(&tzinfo); if (res != TIME_ZONE_ID_INVALID) { struct rule startrule, stoprule; conv_to_rule(&(tzinfo.StandardDate), &stoprule); conv_to_rule(&(tzinfo.DaylightDate), &startrule); sp->timecnt = 0; sp->ttis[0].tt_abbrind = 0; if ((sp->charcnt = WideCharToMultiByte(CP_ACP, 0, tzinfo.StandardName, -1, sp->chars, sizeof(sp->chars), NULL, NULL)) == 0) sp->chars[sp->charcnt++] = '\0'; sp->ttis[1].tt_abbrind = sp->charcnt; sp->charcnt += WideCharToMultiByte(CP_ACP, 0, tzinfo.DaylightName, -1, sp->chars + sp->charcnt, sizeof(sp->chars) - sp->charcnt, NULL, NULL); if ((sp->charcnt - sp->ttis[1].tt_abbrind) == 0) sp->chars[sp->charcnt++] = '\0'; sp->ttis[0].tt_gmtoff = - (tzinfo.Bias + tzinfo.StandardBias) * MINSPERHOUR; sp->ttis[1].tt_gmtoff = - (tzinfo.Bias + tzinfo.DaylightBias) * MINSPERHOUR; sp->ttis[0].tt_isdst = 0; sp->ttis[1].tt_isdst = 1; sp->typecnt = (startrule.r_mon == 0 && stoprule.r_mon == 0) ? 1 : 2; if (sp->typecnt > 1) (*fill_tzstate_from_rules)(sp, &startrule, &stoprule); return TRUE; } return FALSE; } #endif /* W32_USE_IZ_TIMEZONE */ t*[UNZIP542.WINCE]INTRFACE.H;1+,. / 4 @-! 0@123KPWO 56T95a7T95a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: INTRFACE.H // // Description: This module acts as the interface between the Info-ZIP code and // our Windows code in WINMAIN.CPP. See INTRFACE.CPP for a more // detailed description and the actual implementation. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** #ifndef __INTRFACE_H__ #define __INTRFACE_H__ #ifdef __cplusplus extern "C" { #endif //**************** 1/I5 UNZIP.BCK! [UNZIP542.WINCE]INTRFACE.H;1.VAX_DECC_OLB;1 ************************************************************** //***** Types and Structures //****************************************************************************** typedef enum _OVERWRITE_MODE { OM_PROMPT = 0, OM_NEWER, OM_ALWAYS, OM_NEVER } OVERWRITE_MODE, *LPOVERWRITE_MODE; typedef struct _EXTRACT_INFO { BOOL fExtract; // TRUE for extract, FALSE for test DWORD dwFileCount; // Number of files to extract/test. DWORD dwByteCount; // Total bytes to extract/test LPSTR *szFileList; // ARGV list of files, NULL for all files. BOOL fRestorePaths; // TRUE to restore paths, FALSE to junk them. OVERWRITE_MODE overwriteMode; // How to handle file overwrites. LPSTR szMappedPath; // Used to store mapped name. May be NULL. BOOL fAbort; // Set during operation by UI to abort. int result; // Result code from extraction/test. // Window handles for the various controls in our progress dialogs. HWND hWndEditFile; HWND hWndProgFile; HWND hWndProgTotal; HWND hWndPercentage; HWND hWndFilesProcessed; HWND hWndBytesProcessed; // Values used to keep track of our progress. DWORD dwFileOffset; DWORD dwFile; DWORD dwBytesTotalThisFile; DWORD dwBytesWrittenThisFile; DWORD dwBytesWrittenPreviousFiles; LPCSTR szFile; BOOL fNewLineOfText; } EXTRACT_INFO, *LPEXTRACT_INFO; typedef struct _DECRYPT_INFO { int retry; LPSTR szPassword; DWORD nSize; LPCSTR szFile; } DECRYPT_INFO, *LPDECRYPT_INFO; //****************************************************************************** //***** Function Prototypes //****************************************************************************** int DoListFiles(LPCSTR szZipFile); BOOL DoExtractOrTestFiles(LPCSTR szZipFile, EXTRACT_INFO *pei); int DoGetComment(LPCSTR szZipFile); BOOL SetExtractToDirectory(LPTSTR szDirectory); int win_fprintf(zvoid *pG, FILE *file, unsigned int dwCount, char far *buffer); //****************************************************************************** //***** Global Variables //****************************************************************************** #ifdef GLOBAL_DECLARE #undef GLOBAL_DECLARE #undef GLOBAL_INIT #endif #ifdef __INTRFACE_CPP__ #define GLOBAL_DECLARE #define GLOBAL_INIT(value) =value #else #define GLOBAL_DECLARE extern #define GLOBAL_INIT(value) #endif GLOBAL_DECLARE jmp_buf dll_error_return; GLOBAL_DECLARE LPDCL lpDCL GLOBAL_INIT(NULL); GLOBAL_DECLARE LPUSERFUNCTIONS lpUserFunctions GLOBAL_INIT(NULL); #ifdef __cplusplus } // extern "C" #endif #endif // __INTRFACE_H__ *[UNZIP542.WINCE]PUNZIP.H;1+,./ 4-! 0@123KPWO56B1a7B1a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: PUNZIP.H // // Description: This is our global header for the entire Pocket UnZip project. // This header contains all global project build flags, defines, // constants, and macros. It also includes all other headers that // are needed by the project. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** #ifndef __PUNZIP_H__ #define __PUNZIP_H__ #ifdef __cplusplus extern "C" { #endif //****************************************************************************** //***** Standard Win32 project flags //****************************************************************************** #ifndef WIN32 #define WIN32 #endif #ifndef _WINDOWS #define _WINDOWS #endif #ifdef _WIN32_WCE /* for native Windows CE, force UNICODE mode */ #ifndef UNICODE #define UNICODE #endif #endif /* _WIN32_WCE */ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef STRICT #define STRICT #endif #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #if defined(UNICODE) && !defined(_UNICODE) #define _UNICODE #endif #if defined(_DEBUG) && !defined(DEBUG) #define DEBUG #endif #if defined(DEBUG) && !defined(_DEBUG) #define _DEBUG #endif #if defined(_NDEBUG) && !defined(NDEBUG) #define NDEBUG #endif #if defined(NDEBUG) && !defined(_NDEBUG) #define _NDEBUG #endif //****************************************************************************** //***** Pocket Unzip and Info-ZIP flags //****************************************************************************** #ifndef POCKET_UNZIP #define POCKET_UNZIP #endif #ifndef UNZIP_INTERNAL #define UNZIP_INTERNAL #endif #ifndef WINDLL #define WINDLL #endif #ifndef DLL #define DLL #endif #ifndef REENTRANT #define REENTRANT #endif #ifndef USE_EF_UT_TIME #define USE_EF_UT_TIME #endif #ifndef NO_ZIPINFO #define NO_ZIPINFO #endif #ifndef NO_STDDEF_H #define NO_STDDEF_H #endif #ifndef NO_NTSD_EAS #define NO_NTSD_EAS #endif #ifdef NTSD_EAS #undef NTSD_EAS #endif // Read COPYING document before enabling this define. #if 0 #ifndef USE_SMITH_CODE #define USE_SMITH_CODE #endif #endif // Read COPYING document before enabling this define. #if 0 #ifndef USE_UNSHRINK #define USE_UNSHRINK #endif #endif //****************************************************************************** //***** Global defines, constants, and macros //****************************************************************************** #if (defined( X UNZIP.BCK! [UNZIP542.WINCE]PUNZIP.H;1IP.VAX_DECC_OLB;1 _MSC_VER) && !defined(MSC)) #define MSC #endif #ifndef PATH_MAX #define PATH_MAX _MAX_PATH #endif // WinCE uses ISO 8859-1 as codepage for 8-bit chars #define CRTL_CP_IS_ISO // The functionality of ISO <--> OEM conversion IS needed on WinCE, too!! // (Otherwise, extended ASCII filenames and passwords in archives coming // from other platforms may not be handled properly.) // Since WinCE does not supply ISO <--> OEM conversion, we try to fall // back to the hardcoded tables in the generic UnZip code. #define ASCII2OEM(c) (((c) & 0x80) ? iso2oem[(c) & 0x7f] : (c)) #if !defined(CRYP_USES_ISO2OEM) # define CRYP_USES_ISO2OEM #endif #define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} #define INTERN_TO_OEM(src, dst) {register uch c;\ register uch *dstp = (uch *)(dst), *srcp = (uch *)(src);\ do {\ c = (uch)foreign(*srcp++);\ *dstp++ = (uch)ASCII2OEM(c);\ } while (c != '\0');} #if defined(UNICODE) # define MBSTOTSTR mbstowcs # define TSTRTOMBS wcstombs #else # define MBSTOTSTR strncpy # define TSTRTOMBS strncpy #endif #if defined(_MBCS) /* MSC-specific version, _mbsinc() may not be available for other systems */ # define PREINCSTR(ptr) (ptr = (char *)_mbsinc((const UCHAR *)(ptr))) # define MBSCHR(str, c) (char *)_mbschr((const UCHAR *)(str), (c)) # define MBSRCHR(str, c) (char *)_mbsrchr((const UCHAR *)(str), (c)) #endif /* Up to now, all versions of Microsoft C runtime libraries lack the support * for customized (non-US) switching rules between daylight saving time and * standard time in the TZ environment variable string. * But non-US timezone rules are correctly supported when timezone information * is read from the OS system settings in the Win32 registry. * The following work-around deletes any TZ environment setting from * the process environment. This results in a fallback of the RTL time * handling code to the (correctly interpretable) OS system settings, read * from the registry. */ #ifdef USE_EF_UT_TIME # if (defined(_WIN32_WCE) || defined(W32_USE_IZ_TIMEZONE)) # define iz_w32_prepareTZenv() # else # define iz_w32_prepareTZenv() putenv("TZ=") # endif #endif #ifdef MSC #define DIR_END '\\' // ZipInfo with VC++ 4.0 requires this #endif // We are defining a few new error types for our code. #define PK_EXCEPTION 500 #define PK_ABORTED 501 #ifndef DATE_FORMAT #define DATE_FORMAT DF_MDY #endif #define lenEOL 2 #define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} #define countof(a) (sizeof(a)/sizeof(*(a))) // The max number of retries (not including the first attempt) for entering // a password for and encrypted file before giving up on that file. #define MAX_PASSWORD_RETRIES 2 // Variables that we want to add to our Globals struct. #define SYSTEM_SPECIFIC_GLOBALS \ char matchname[FILNAMSIZ]; \ int notfirstcall; \ char *zipfnPtr; \ char *wildzipfnPtr; //****************************************************************************** //***** Global headers //****************************************************************************** #include #include #include #ifdef _MBCS #include #endif #include #include "wince/wince.h" // Our WinCE specific code and our debug function. #include "wince/resource.h" // Our resource constants #include "wince/punzip.rcv" // Our version information. #ifdef __cplusplus } // extern "C" #endif #endif // __PUNZIP_H__ f*[UNZIP542.WINCE]PUNZIP.HTP;1+,.#/ 4##3-! 0@123KPWO$56M}Aa7M}Aa89GHJ Pocket UnZip

Pocket UnZip


Table of Contents

  • Why use Pocket UnZip for Windows CE?
  • Key Features of Pocket UnZip
  • Installing Pocket UnZip
  • Opening a Zip File
  • Zip File Listing
  • Properties Dialog
  • File Comments
  • Extracting Files
  • Testing Files
  • Viewing Files
  • Encrypted Files
  • About Pocket UnZip

Why use Pocket UnZip for Windows CE?

  • Your H/PC can now read the number one file format used for Internet downloads.
  • Software venders can now distribute their Windows CE applications in a single compressed Zip file.
  • Maximize your PCMCIA flash card ram storage by zipping up files to take with you on the road.

Key Features of Pocket UnZip

  • Handles all files created with a Zip compatible compression utility. This includes utilities from PKWARE, Info-ZIP, and many others.
  • Easy to use graphical interface that closely resembles the Windows CE Explorer.
  • Displays a detailed list of Zip file contents, including name, date, size, attributes, and compression statistics of each file.
  • Displays comments for the each file within the Zip file, as well as the main comment for the Zip file itself.
  • Supports the ability to test files, extract files, and view files directly from the Zip file.
  • Supports decryption of password encrypted Zip files.
  • It's free!

Installing Pocket UnZip

Place PUNZIP.EXE and PUNZIP.HTP (optional help file) into your \Windows directory on your H/PC.

From your H/PC's Start Menu, choose Run..., enter "punzip", and tap OK.

The first time you run Pocket UnZip, it will register itself as the application for handling Zip files. From then on, you can just double-tap on Zip files in Explorer or from your Desktop to open them in Pocket UnZip.


Opening a Zip File

There are several ways to open a Zip file.

  • Double-tap on a Zip file in Windows CE Explorer or from your Windows CE desktop.
  • From within Pocket UnZip, choose the Open... command from the File menu. You may also tap the Open toolbar button or press Ctrl+O.
  • Pocket UnZip keeps track of the four most recently opened Zip files. You may quickly open one of these recent files by selecting the Zip file directly from Pocket UnZip's File menu.

Zip File Listing

Pocket UnZip's main view displays a list of files, directories, and volume labels that are stored within the currently loaded Zip file. This list can be displayed in two modes, normal and expanded. The normal mode is sufficient for most users. It contains the following information for every item in the Zip file:

  • Name: Name and path of the compressed file, directory, or volume label.
  • Size: Size, in bytes, that the item requires when uncompressed.
  • Typep"^d܉W`O+|,f>xq\ȱ,LQAa8Ϡ6^T.hAo䣂3%:ꡣ?q4q_HvैMRaߚZ%~FJw͠٩Iۜὡ'ܷhb~9ȼ߭잹fflKT8F_oB;|d?+f (+^ sgx#*I h d@d-9s Fkh51~T(@xuhfYin?h&\^a T7|]c=X,52aLv:,  v5~:[M Q[v[iHB%!t |\lLA];k bL!Pya~.#qf ;RmE^['bE/.qV=;dTPfe<CQZA8(>`8w ws O jfJr4QC:I}YR+\QoO$1c EobboJfdDMf`7 M_b+<Q[P&<^~OGr FQH %/!32d#2s`nnq&td0JJ|(Yo!@:Rln*hpvgl&5 m"*) w8IK]p6=}3vPtzUWgrSba7k+ ,xI<'<9RkFi#qakn~R<_T.*ùnhHbV"ܥ:Pc3Bw3!_AYW KprI`>(&;H^@ FѣE?ybs>@3u +> }_f%UoET>G{O}<]:*?doS`\LA)@tPmWi8%s<=ZNi*M+VZ4%%LAMGm k?jyTn a*8m> (f Ңz¬LصͭܥȨ{ёгq")bҫAh?,+O9ʀ;:b-5b`ls77wvCzR\ook_x}5ڪ=𜼤Z(l/2ycN`/磗2r2۶ 䃼 甪탆QIP惙1Ľ磛؜i3lvB@ܿւXԨҞ>}Z97)K𵽻㛣ꥅ۔ڡչ܊̀բۯÕ֙L:+3>truF,&,H{ctmYMj;:gQ#"iAs*n_*|g](I#D"rvf>1E)>zy8:d;xK.?=>GtQZ2#]b;0)pnPO43a?$gPR5"\LQWXGD'u;m>8@Vc- m0|XmUu `_Eqx[]^P# wQx)g,u9MU>T Nh0vu)n@Du T 8JBbG[kLXzmXZ3C9u~n,oK kE3p66dSH81#MCtOZ5YX>rB%wW(XtHpHL H6%! ^m].XQv sVIZEjJL/XIzB $s7'+{oD9 nDa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, oK{\HS{y\./fU9cT<t_WZT {8_A5!TI1&I'ET )lW=[8@(9-]l-Kk g1;/grV@PV"i/|N'E1Zd] *l_c#?_4~bfQ%U,{vF@,%K S)CA@V|IeJXs7%)9,a`4\D~=GZX^+=Y U{mj]%sN~{0=]{!4^{!LE-=OD$P=?@nHf0|*v"*O!-^W211x;7dyj0<\6,f4^ c1 9W5r8e=e-_KAXNQ9o9cV(S7Tp'5^ N36Cv;dveJQAS?6,x"w%$ukZ=7QMHPV!~%FN) o gbzq.x*>f_+pY('+ul+j_ |CG(Wt4=dl?;L N|*DPLN+xaIv Q%H3bhw:h2inqge8 @z5ol'1Emn0"5821 YfPip_IUQ7bYAkO?C5h . B qQ g{ry(s;O_ Y&oJ":L`*&8yLZ wMbE+|iQ^'= %:^ /6w?+6&z'pigNLUCZ0 Auc^}cU_]Qe`~WD&jc*WfrYdJ$Q|)m9?3SUO C.f%0hSV0 sN mPD,|W3 csam+8Hl DaMyf\?f?h- OOP)jD:+:rWY/9)]}`,X#u.-)20@qI >CJb^(+?xa*I_A}@G "u@Q4L$0{.b~;|CnZlDtnXBL=KXdbz: g5'7iqu6i"p+mNw/!otLIkZ/ qAc'  'J*8d,q=9\ VBy 6,,:Qn5}2t3@Q&)W'u7;`zDQBZ+VtMIUoD'ur140D}=ZU]m>d-?@DY@ayGxIAM]#C@O>)cxY1*s$K(I D7a 04u5@aDI/JO <;J46 T}$5W>&`TLV%A V]XOU^6Lyyv\2lr B~ O(C+-k_\"aN@nB|',qUVszPabgA`~2i2#{zi*z5*6TW6ojb~,-A {N7 U `|Q>v3 3vKAhw0{%0BLE  qpE}pEfmhx<%+t \o" ]e{{S+S8TPh'=uiJA|kOVB]GKTP(lk-qx)yFA |`RoLUBv-J*i>%%!GJe"-8!@tkI;mF{G]sHVF|J ]V G%]`_I $d^zKR4_-9  AM gMh^'slS }pTBSSb Y2&]qk%5,%h>jA-^R>: Type of item.
  • Modified: Date and time that the item was last modified.

Expanded mode contains all the above information, plus the following additional information:

  • Attributes: Attributes of the item.
    • V: Volume label
    • D: Directory
    • R: Read-only file
    • A: Archive file
    • H: Hidden file
    • S: System file
    • E: Encrypted (this file will require a password)
    • C: Comment (this item has a comment)
  • Compressed: Compressed size, in bytes, of the item.
  • Ratio: Compression ratio of the item.
  • Method: Compression method used to compress the item.
  • CRC: 32 bit Cyclic Redundancy Check signature of the item.
  • Comment: Optional comment string that was associated with the item when compressed.

You may toggle between the normal view and the expanded view by selecting the Extended View option from the View menu, or by tapping the associated toolbar button.


Properties Dialog

The properties dialog is useful for viewing detailed information for one or more files. It is invoked by selecting one or more files in the file list and then choosing Properties from the File menu. For convenience, you can also tap the toolbar button or press Alt+Enter.

If one file is selected, the properties dialog will show you detailed information about that one file and its comment.

If multiple files are selected, the dialog will show you combined results for all the files selected. Cumulative results will be given for the file count, byte counts, and compression ratio. Merged results will be given for the compression method, date, CRC, attributes, and comment. For the date, all values that are common between the selected files (such as year), will be shown with their common value. All values that differ between the selected files will be shown as question marks. For attributes, a black check means that all selected files have that particular attribute, a gray check mark means that some of the selected files have that attribute, and no check mark means that none of the selected files have that attribute.

By using the properties dialog with multiple files, you can determine things like... What is the total number of files or bytes in the Zip file? What is the total compression ratio for all selected files. Are all the selected files from the same year? Same month? How many files have comments?


File Comments

Zip files provide two levels of commenting. At compression time, users can add per-file comments, as well as one main comment for the entire Zip file. The per-file comments are usually used to give a short description of each file. The main comment is usually used for credits, copyright information, installation instructions, version numbers, etc. Pocket UnZip can display both types of comments.

Per-file comments can be viewed in Comments column of the main file list while in expanded mode (see the Zip File Listing section) and also in the properties dialog (see the Properties Dialog section).

The main Zip file comment can be viewed by selecting Zip File Comment from the View menu or by pressing the associated toolbar button. This option will be disabled if the Zip file does not contain a main comment.


Extracting Files

Once you have opened a Zip file into Pocket UnZip, you should see a list of the Zip file's contents. Select one or more files from the file list and then choose Extract Selected Files (Ctrl+E) or Extract All Files (Ctrl+A, Ctrl+E) from the Action menu. You may also use the noted shortcut keys or the associated toolbar buttons.

An extract options dialog will appear showing you some statistics about the files you are about to extract and prompting you for some information. There are three options available to you.

The Restore file paths option allows you to control whether the directory structure of the files you have selected to extract will be preserved. When this option is checked, any directory paths associated with the compressed files will be created, and the file will be extracted to the newly created directory. If this option is not checked, all files will be extracted to a single directory, regardless of any path information associated with the compressed files.

The Overwrite Options allow you to tell Pocket UnZip what to do if a file already exists on your file system with the same name of a file that is about to be extracted. The choices are:

  • Prompt to overwrite: Causes a dialog to appear for every situation that involves possibly overwriting a file. This allows you to decide what files get overwritten on a file-by-file basis.
  • Overwrite if newer: Causes Pocket UnZip to automatically overwrite any files that have a date and time that is earlier then the date and time of the file being extracted. This option can be useful for updating files.
  • Always overwrite: Causes Pocket UnZip to always automatically overwrite any files without prompting or warning. Use with caution.
  • Never overwrite: Causes Pocket UnZip to automatically skip all files that already exist on the file system.

The Extract To field specifies the root directory that should be used to extract files to. If you checked the Restore file paths option, then any directories associated with the files being extracted will be created under the directory specified in this field. The directory you enter must already exist. To create directories and browse for directories, use the Browse... button.

Once you have chosen the options you wish to use, press the Extract button. A progress dialog will appear and the extraction will begin. At any time during the extraction, you may tap the Abort button to abort the extraction operation.

Note: Aborting the extraction operation while processing a file will likely cause a partial file to get extracted and saved.

During the extraction, you may get interrupted for one of three reasons. First, if an error occurs, you will be notified with a message box. Second, if you have chosen the Prompt to overwrite option and you  UNZIP.BCK! [UNZIP542.WINCE]PUNZIP.HTP;1.VAX_DECC_OLB;1#^ are trying to extract a file that already exists, you will be prompted on how to handle the situation. Third, if a file being extracted is encrypted, then you will be prompted for that file's password (see the Encrypted Files section).

Once the extraction is complete, the Abort button will change to a Close button and any errors or warnings will be displayed. Tap the Close button to return to Pocket UnZip's main screen.


Testing Files

Testing files is essentially the same as extracting files, except for that the actual extracted data is never written to your file system. Testing files is useful when you wish to verify the integrity of a Zip file without actually extracting the files within it.

Once you have opened a Zip file into Pocket UnZip, you should see a list of the Zip file's contents. Select one or more files from the file list and then choose Test Selected Files (Ctrl+T) or Test All Files (Ctrl+A, Ctrl+T) from the Action menu. You may also use the noted shortcut keys or the associated toolbar buttons.

A progress dialog will appear and the testing will begin. At any time during the testing, you may tap the Abort button to abort the testing operation.

During the testing, you may get interrupted for one of two reasons. First, if an error occurs, you will be notified with a message box. Second, if a file being tested is encrypted, then you will be prompted for that file's password (see the Encrypted Files section).

Once the testing is complete, the Abort button will change to a Close button and any errors or warnings will be displayed. Tap the Close button to return to Pocket UnZip's main screen.


Viewing Files

Pocket UnZip provides the ability to view, or even execute, files directly from a Zip file. This feature is a major convenience over having to extract and then manually open each file you wish to view. Internally, this is what Pocket UnZip is doing for you, but it takes care of all the work of extracting the file to a temporary directory, launching the associated viewer for that file type, and cleaning up when done.

To view a file, simply select a single file from Pocket UnZip's main file list and press Enter. You may also choose View Selected File from the Action menu, press the associated toolbar button, or just double-tap on the file you wish to view.

The file will be extracted to a directory called Temporary Pocket UnZip Files in the root of your file system. If the file you wish to view is encrypted, you will be prompted for a password. If the file has an associated viewer application installed (such as Pocket Word for .PWD files), then that viewer will automatically be launched with the newly extracted file as its command line. If there is no associated viewer application, then you will be prompted for the application you wish to use to view the file.

Pocket UnZip also provides minimal support for allowing you to use the view file action to run executable programs directly from the Zip file. If the file you choose to view is an executable (file extension is EXE), then the file will be executed after it is extracted. Pocket UnZip will only extract the file you select and none of its dependent files (like DLLs). If the executable you extract depends on other files in the Zip file, it will most likely fail to execute.

When Pocket UnZip exits, it will delete the Temporary Pocket UnZip Files directory and all the files in it. If you are running more than one instance of Pocket UnZip, then only the last instance of Pocket UnZip that you exit will perform this delete. Most applications, such as Pocket Word, lock files when viewing them. Any files being viewed by such an application when you exit Pocket UnZip will not be deleted.


Encrypted Files

If an encrypted file is encountered during an extract, test, or view operation, you will be prompted for a password. You can choose to skip the file, skip all encrypted files, or enter a password. You will be given three attempts at entering the correct password before the file will be skipped automatically. Once you have entered the correct password for a given file, that password will be remembered and automatically used for all other encrypted files that are encountered during that single extract, test, or view operation. If another encrypted file is found that uses a different password than the remembered password, then you will be prompted again for a new password.

This technique provides support for multi-password Zip files, while still providing users with single password Zip files the convenience of only having to enter their password once during the operation for all encrypted files. For security reasons, passwords are not remembered after the operation completes.


About Pocket UnZip

Thank you for using Version 1.1 of Pocket UnZip for Windows CE.

Pocket UnZip was developed by Steve P. Miller. Although I'd like to take full credit, I could not have done it without the public decompression source code provided by the Info-ZIP group. Pocket UnZip uses version 5.42 of Info-ZIP's core decompression code. Many thanks go to Greg Roelofs and all the fine folks at Info-ZIP.

Please send all comments, suggestions, and bug reports to stevemil@pobox.com.

Pocket UnZip is freeware - no shareware fees, no purchase fees. You can still send me an email or a box of cookies if you like it. If you would like to distribute Pocket UnZip, please look at the terms and conditions listed in the accompaning Info-ZIP LICENSE file.

For the latest news, binaries, source code, and more information about the Info-ZIP group, visit ftp://ftp.info-zip.org/pub/infozip/.

For more information about me, or to check out some of my other applications (mostly Windows 95 / NT / CE), stop by my personal web page at http://pobox.com/~stevemil/.

Copyright 1997-2001 Info-Zip. All Rights Reserved.

t*[UNZIP542.WINCE]PUNZIP.IC2;1+, ./ 4-! 0@123KPWO56(97(989GHJ &( @FUUUUP*ҡJR=e*P>J$PQEPD=UPUCUP =UPEP*$P*PUU@@ꪩUP?( Ӆ UNZIP.BCK ! [UNZIP542.WINCE]PUNZIP.IC2;1.VAX_DECC_OLB;1 @JUNPzzAzxzzzjUPT?*[UNZIP542.WINCE]PUNZIP.ICO;1+,./ 46-! 0@123KPWO56(97(989GHJ &(( @wppwwwwwwwxwwwwwwwwxpwwwwwwxxwwwwwpxpwwpwpxxwpppxpppwwwwwpwpwwwwwwpwpwwwwwwwwwwwpxwwwwwwwwwwwwwwwwwwwwwwwwxwwwwwwwwwwwwxwwwwwwwxwwwwwwwwwwx?( wxwwwxwwwwpwwpwwwwxwwwwwxwwwwwx?*[UNZIP542.WINCE]PUNZIP.RC;1+,./ 4-! 0@123KPWO56Kb7Kb89GHJ//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // Englisch (USA) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "#include ""punzip.rcv""\r\n" "#ifdef _WIN32_WCE\r\n" "IDI_UNZIP ICON DISCARDABLE ""punzip.ic2""\r\n" "IDI_ZIPFILE ICON DISCARDABLE ""zipfile.ic2""\r\n" "IDB_TOOLBAR BITMAP DISCARDABLE ""toolbar.2bp""\r\n" "IDB_IMAGELIST BITMAP DISCARDABLE ""imglist.2bp""\r\n" "IDB_IMAGELIST_MASK BITMAP DISCARDABLE ""ilmask.bmp""\r\n" "#else\r\n" "IDI_UNZIP ICON DISCARDABLE ""punzip.ico""\r\n" "IDI_ZIPFILE ICON DISCARDABLE ""zipfile.ico""\r\n" "IDB_TOOLBAR BITMAP DISCARDABLE ""toolbar.bmp""\r\n" "IDB_IMAGELIST BITMAP DISCARDABLE ""imglist.bmp""\r\n" "#endif\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Menu // IDR_UNZIP MENU DISCARDABLE BEGIN POPUP "&File" BEGIN MENUITEM "&Open...\tCtrl+O", IDM_FILE_OPEN, GRAYED MENUITEM SEPARATOR MENUITEM "&Properties\tAlt+Enter", IDM_FILE_PROPERTIES, GRAYED MENUITEM SEPARATOR MENUITEM SEPARATOR MENUITEM "&Close", IDM_FILE_CLOSE, GRAYED END POPUP "&Actions" BEGIN MENUITEM "&Extract Selected Files\tCtrl+E", IDM_ACTION_EXTRACT , GRAYED MENUITEM "E&xtract All Files", IDM_ACTION_EXTRACT_ALL , GRAYED MENUITEM SEPARATOR MENUITEM "&Test Selected Files\tCtrl+T", IDM_ACTION_TEST, GRAYED MENUITEM "Te&st All Files", IDM_ACTION_TEST_ALL, GRAYED MENUITEM SEPARATOR MENUITEM "&View Selected File\tEnter", IDM_ACTION_VIEW, GRAYED MENUITEM SEPARATOR MENUITEM "Select &All\tCtrl+A", IDM_ACTION_SELECT_ALL , GRAYED END POPUP "&View" BEGIN MENUITEM "&Expanded View", IDM_VIEW_EXPANDED_VIEW , GRAYED MENUITEM SEPARATOR MENUITEM "Zip File &Comment", IDM_VIEW_COMMENT, GRAYED END POPUP "&Help" BEGIN MENUITEM "&About Pocket UnZip", IDM_HELP_ABOUT, GRAYED END END ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_REPLACE DIALOG DISCARDABLE 1, 1, 250, 60 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "Confirm File Replace" FONT 8, "MS Sans Serif" BEGIN LTEXT "",IDC_FILE,6,6,237,18,NOT WS_GROUP LTEXT "Would you like to replace the existing file?", IDC_STATIC,6,26,237,10,NOT WS_GROUP PUSHBUTTON "&Yes",IDM_REPLACE_YES,6,40,54,14 PUSHBUTTON "Yes to &All",IDM_REPLACE_ALL,67,40,54,14 PUSHBUTTON "&No",IDM_REPLACE_NO,128,40,54,14 PUSHBUTTON "N&o to All",IDM_REPLACE_NONE,189,40,54,14 END IDD_COMMENT DIALOG DISCARDABLE 1, 1, 361, 196 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Zip File Comment" FONT 8, "MS Sans Serif" BEGIN EDITTEXT IDC_COMMENT,6,6,349,184,ES_MULTILINE | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP END IDD_PROPERTIES DIALOG DISCARDABLE 0, 0, 251, 114 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Properties" FONT 8, "MS Sans Serif" BEGIN EDITTEXT IDC_COMMENT,6,18,238,90,ES_MULTILINE | NOT WS_VISIBLE | WS_VSCROLL | WS_HSCROLL LTEXT "",IDC_FILE,11,22,229,8 LTEXT "Size:",IDC_STATIC,11,34,70,8 LTEXT "",IDC_FILE_SIZE,84,34,100,8 LTEXT "Compressed Size:",IDC_STATIC,11,46,70,8 LTEXT "",IDC_COMPRESSED_SIZE,84,46,100,8 LTEXT "Compression Factor:",IDC_STATIC,11,58,70,8 LTEXT "",IDC_COMPRESSON_FACTOR,84,58,100,8 LTEXT "Compression Method:",IDC_STATIC,11,70,70,8 LTEXT "",IDC_COMPRESSION_METHOD,84,70,100,8 LTEXT "Modified:",IDC_STATIC,11,82,70,8 LTEXT "",IDC_MODIFIED,84,82,100,8 LTEXT "CRC:",IDC_STATIC,11,94,70,8 LTEXT "",IDC_CRC,84,94,100,8 LTEXT "Attributes:",IDC_STATIC,190,34,50,8 CONTROL "Directory",IDC_DIRECTORY,"Button",BS_3STATE,190,44,50, 10 CONTROL "Read-only",IDC_READONLY,"Button",BS_3STATE,190,54,50,10 CO, UNZIP.BCK! NZIP542.WINCE]PUNZIP.RC;1P.VAX_DECC_OLB;10' NTROL "Archive",IDC_ARCHIVE,"Button",BS_3STATE,190,64,50,10 CONTROL "Hidden",IDC_HIDDEN,"Button",BS_3STATE,190,74,50,10 CONTROL "System",IDC_SYSTEM,"Button",BS_3STATE,190,84,50,10 CONTROL "Encrypted",IDC_ENCRYPTED,"Button",BS_3STATE,190,94,50, 10 CONTROL "Tab2",IDC_TAB,"SysTabControl32",WS_TABSTOP,4,4,242,106 END IDD_EXTRACT DIALOG DISCARDABLE 0, 0, 297, 105 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Extract Files" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&Extract",IDOK,246,6,45,14 PUSHBUTTON "&Cancel",IDCANCEL,246,24,45,14 LTEXT "Files to extract:",IDC_STATIC,12,18,54,8 RTEXT "",IDC_FILE_COUNT,67,18,46,8 LTEXT "Bytes to extract:",IDC_STATIC,12,30,54,8 RTEXT "",IDC_BYTE_COUNT,67,30,46,8 GROUPBOX "Statistics",IDC_STATIC,6,6,118,37 CONTROL "&Restore file paths",IDC_RESTORE_PATHS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,8,47,118,10 LTEXT "Extract &To:",IDC_STATIC,6,64,59,8 EDITTEXT IDC_EXTRACT_TO,6,74,230,14,ES_AUTOHSCROLL PUSHBUTTON "&Browse...",IDC_BROWSE,246,74,45,14 LTEXT "If encrypted files are encountered during extraction, you will be prompted for a password.", IDC_STATIC,6,91,285,8 CONTROL "&Prompt to overwrite",IDC_OVERWRITE_PROMPT,"Button", BS_AUTORADIOBUTTON,138,18,80,10 CONTROL "&Overwrite if newer",IDC_OVERWRITE_NEWER,"Button", BS_AUTORADIOBUTTON,138,30,80,10 CONTROL "&Always overwrite",IDC_OVERWRITE_ALWAYS,"Button", BS_AUTORADIOBUTTON,138,42,80,10 CONTROL "&Never overwrite",IDC_OVERWRITE_NEVER,"Button", BS_AUTORADIOBUTTON,138,54,80,10 GROUPBOX "Overwrite Options",IDC_STATIC,132,6,104,61 END IDD_PASSWORD DIALOG DISCARDABLE 1, 1, 250, 79 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Password Required for Encrypted File" FONT 8, "MS Sans Serif" BEGIN LTEXT "",IDC_FILE,6,6,237,18,NOT WS_GROUP LTEXT "",IDC_PROMPT,6,26,237,10,NOT WS_GROUP EDITTEXT IDC_PASSWORD,6,40,237,14,ES_PASSWORD | ES_AUTOHSCROLL PUSHBUTTON "Skip &All",IDC_SKIP_ALL,170,59,73,14 DEFPUSHBUTTON "&Ok",IDOK,6,59,73,14 PUSHBUTTON "&Skip",IDCANCEL,88,59,73,14 END IDD_EXTRACT_PROGRESS DIALOG DISCARDABLE 0, 0, 400, 129 STYLE DS_MODALFRAME | WS_POPUP FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "&Abort",IDCANCEL,6,110,112,14 LTEXT "File Progress",IDC_FILE,6,5,389,8 CONTROL "Progress1",IDC_FILE_PROGRESS,"msctls_progress32", WS_BORDER,6,15,112,10 LTEXT "Total Progress",IDC_STATIC,6,28,61,8 RTEXT "0%",IDC_PERCENTAGE,84,28,33,8 CONTROL "Progress1",IDC_TOTAL_PROGRESS,"msctls_progress32", WS_BORDER,6,38,112,10 LTEXT "Files processed:",IDC_STATIC,10,55,58,8 RTEXT "0",IDC_FILES_PROCESSED,68,55,44,8 LTEXT "Files total:",IDC_STATIC,10,66,58,8 RTEXT "",IDC_FILES_TOTAL,68,66,44,8 LTEXT "Bytes processed:",IDC_STATIC,10,83,58,8 RTEXT "0",IDC_BYTES_PROCESSED,68,83,44,8 LTEXT "Bytes total:",IDC_STATIC,10,94,58,8 RTEXT "",IDC_BYTES_TOTAL,68,94,44,8 EDITTEXT IDC_LOG,123,15,272,109,ES_MULTILINE | WS_VSCROLL | WS_HSCROLL GROUPBOX "",IDC_STATIC,6,49,112,29 GROUPBOX "",IDC_STATIC,6,77,112,29 END IDD_ABOUT DIALOG DISCARDABLE 34, 22, 270, 126 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Pocket UnZip" FONT 8, "MS Sans Serif" BEGIN ICON 100,IDC_STATIC,9,8,20,20 LTEXT "",IDC_PRODUCT,36,15,228,8 LTEXT "",IDC_VERSION,36,29,228,8 LTEXT "",IDC_DEVELOPER,36,39,228,8 LTEXT "Visit my web site at http://pobox.com/~stevemil/", IDC_STATIC,36,49,228,8 LTEXT "",IDC_COPYRIGHT,36,59,228,8 CTEXT "Many thanks go to Greg Roelofs and all the fine folks at Info-ZIP.", IDC_STATIC,5,79,259,8 CTEXT "",IDC_COMMENT,20,89,229,16 CTEXT "Visit ftp://ftp.info-zip.org/pub/infozip/ for the latest news and binaries.", IDC_STATIC,5,109,259,8 GROUPBOX "",IDC_STATIC,3,0,263,71,BS_LEFT GROUPBOX "",IDC_STATIC,3,71,263,49,BS_LEFT END IDD_VIEW_PROGRESS DIALOG DISCARDABLE 0, 0, 189, 57 STYLE DS_MODALFRAME | WS_POPUP FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "&Abort",IDCANCEL,60,36,70,14 CTEXT "Extracting temporary file for your viewing pleasure.", IDC_FILE,6,6,177,8 CONTROL "Progress1",IDC_FILE_PROGRESS,"msctls_progress32", WS_BORDER,6,20,177,10 END IDD_VIEW_ASSOCIATION DIALOG DISCARDABLE 0, 0, 297, 63 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Open With" FONT 8, "MS Sans Serif" BEGIN LTEXT "There does not appear to be any application associated with this file", IDC_STATIC,6,6,230,10 LTEXT "type. In order to view this file, you must specify a viewer application.", IDC_STATIC,6,15,230,10 LTEXT "&Path to viewer application.",IDC_STATIC,6,32,230,8 EDITTEXT IDC_PATH,6,42,230,14,ES_AUTOHSCROLL PUSHBUTTON "&Browse...",IDC_BROWSE,246,42,45,14 DEFPUSHBUTTON "&OK",IDOK,246,6,45,14 PUSHBUTTON "&Cancel",IDCANCEL,246,24,45,14 END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_REPLACE, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 243 TOPMARGIN, 6 BOTTOMMARGIN, 54 END IDD_COMMENT, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 355 TOPMARGIN, 6 BOTTOMMARGIN, 190 END IDD_PROPERTIES, DIALOG BEGIN LEFTMARGIN, 4 RIGHTMARGIN, 246 TOPMARGIN, 4 BOTTOMMARGIN, 110 END IDD_EXTRACT, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 291 TOPMARGIN, 6 BOTTOMMARGIN, 99 END IDD_PASSWORD, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 243 TOPMARGIN, 6 BOTTOMMARGIN, 73 END IDD_EXTRACT_PROGRESS, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 394 TOPMARGIN, 6 BOTTOMMARGIN, 123 END IDD_ABOUT, DIALOG BEGIN RIGHTMARGIN, 265 TOPMARGIN, 1 BOTTOMMARGIN, 120 END IDD_VIEW_PROGRESS, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 183 TOPMARGIN, 6 BOTTOMMARGIN, 51 END IDD_VIEW_ASSOCIATION, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 291 TOPMARGIN, 6 BOTTOMMARGIN, 57 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDR_UNZIP ACCELERATORS DISCARDABLE BEGIN "A", IDM_ACTION_SELECT_ALL, VIRTKEY, CONTROL, NOINVERT "E", IDM_ACTION_EXTRACT, VIRTKEY, CONTROL, NOINVERT "O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT "T", IDM_ACTION_TEST, VIRTKEY, CONTROL, NOINVERT VK_RETURN, IDM_ACTION_VIEW, VIRTKE1gY UNZIP.BCK! NZIP542.WINCE]PUNZIP.RC;1P.VAX_DECC_OLB;1Y, NOINVERT VK_RETURN, IDM_FILE_PROPERTIES, VIRTKEY, ALT, NOINVERT END #endif // Englisch (USA) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #include "punzip.rcv" #ifdef _WIN32_WCE IDI_UNZIP ICON DISCARDABLE "punzip.ic2" IDI_ZIPFILE ICON DISCARDABLE "zipfile.ic2" IDB_TOOLBAR BITMAP DISCARDABLE "toolbar.2bp" IDB_IMAGELIST BITMAP DISCARDABLE "imglist.2bp" IDB_IMAGELIST_MASK BITMAP DISCARDABLE "ilmask.bmp" #else IDI_UNZIP ICON DISCARDABLE "punzip.ico" IDI_ZIPFILE ICON DISCARDABLE "zipfile.ico" IDB_TOOLBAR BITMAP DISCARDABLE "toolbar.bmp" IDB_IMAGELIST BITMAP DISCARDABLE "imglist.bmp" #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED P*[UNZIP542.WINCE]PUNZIP.RCV;1+,./ 4>-! 0@123KPWO564a74a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: PUNZIP.RCV // // Description: Resources that Microsoft Visual C++ does not edit directly. // This file sets all the version defines and declares the Version // Info resource. This file is included by both the C compiler and // the resource compiler. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** #ifndef __PUNZIP_RCV__ #define __PUNZIP_RCV__ #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif // APSTUDIO_INVOKED #ifdef _WIN32_WCE #define VS_FFI_FILEFLAGSMASK 0x0000003FL #define VS_FF_PRERELEASE 0x00000002L #define VOS__WINDOWS32 0x00000004L #define VFT_APP 0x00000001L #define VFT2_UNKNOWN 0x00000000L #define VS_FF_DEBUG 0x00000001L #else #include #endif #include "../version.h" //****************************************************************************** //***** User Modifiable Version Defines //****************************************************************************** #define VERSION_MAJOR 1 #define VERSION_MINOR 1 #define VERSION_PRIVATE 0 #define VERSION_PATCH 0 #define VERSION_STRING "1.1" // Set VER_FF_PRERELEASE to VS_FF_PRERELEASE for beta and 0 for release. #ifdef BETA #define VER_FF_PRERELEASE VS_FF_PRERELEASE #else #define VER_FF_PRERELEASE 0 #endif //****************************************************************************** //***** Fixed Version Defines //****************************************************************************** #define VER_INTERNALNAME_STR "PUNZIP" #define VER_PRODUCT_STR "Pocket UnZip\256" #define VER_DEVELOPER_STR "Steve P. Miller (stevemil@pobox.com)" #define VER_COMMENT_STR "Pocket UnZip is built on top of Info-ZIP's UnZip " UZ_VER_STRING UZ_BETALEVEL " source code from " UZ_VERSION_DATE "." #define VER_FILENAME_STR VER_INTERNALNAME_STR ".EXE" #define VER_VERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PRIVATE,VERSION_PATCH #define VER_COMPANY_STR VER_DEVELOPER_STR #define VER_COPYRIGHT_STR "Copyright \251 1997-2001 Info-ZIP. All Rights Reserved." #ifdef UNICODE #define VER_CODEPAGE " Unicode)" #else #define VER_CODEPAGE " Ansi)" #endif #if defined(_X86_) || defined(_M_IX86) #define VER_ARCH " (i386," VER_CODEPAGE #elif defined(_MIPS_) || defined(_M_MRX000) #define VER_ARCH " (MIPS)" #elif defined(_SH3_) #define VER_ARCH " (Hitachi SH-3)" #elif defined(_PPC_) || defined(_M_PPC) #define VER_ARCH " (IBM PowerPC)" #elif defined(_ALPHA_) || defined(_M_ALPHA) #define VER_ARCH " (DEC Alpha)" #elif defined(_M_MPPC) #define VER_ARCH " (Macintosh PowerPC)" #elif defined(_M_M68K) #define VER_ARCH " (Macintosh 68K)" #else #define VER_ARCH "" #endif #ifdef _DEBUG #define VER_FF_DEBUG VS_FF_DEBUG #else #define VER_FF_DEBUG 0 #endif #if (VERSION_PATCH > 0) #define VER_FF_PATCHED VS_FF_PATCHED #else #define VER_FF_PATCHED 0 #endif #if (VERSION_PRIVATE > 0) #define VER_FF_PRIVATEBUILD VS_FF_PRIVATEBUILD #else #define VER_FF_PRIVATEBUILD 0 #endif #ifdef _DEBUG #if (VER_FF_PRERELEASE == VS_FF_PRERELEASE) #define VER_VERSION_STR VERSION_STRING " Beta (Debug)" #else #define VER_VERSION_STR VERSION_STRING " (Debug)" #endif #else #if (VER_FF_PRERELEASE == VS_FF_PRERELEASE) #define VER_VERSION_STR VERSION_STRING " Beta" #else #define VER_VERSION_STR VERSION_STRING #endif #endif #ifdef _WIN32_WCE #define VER_FULLPRODUCT_STR VER_PRODUCT_STR " for Windows\256 CE" VER_ARCH #define VER_FULLVERSION_STR VER_VERSION_STR " for Windows\256 CE" VER_ARCH #else #define VER_FULLPRODUCT_STR VER_PRODUCT_STR " for Windows\256 NT" VER_ARCH #define VER_FULLVERSION_STR VER_VERSION_STR " for Windows\256 NT" VER_ARCH #endif //****************************************************************************** //***** VERSIONINFO Resource //****************************************************************************** #ifdef RC_INVOKED VS_VERSION_INFO VERSIONINFO FILEVERSION VER_VERSION PRODUCTVERSION VER_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS VER_FF_PRERELEASE | VER_FF_DEBUG | VER_FF_PATCHED | VER_FF_PRIVATEBUILD FILEOS VOS__WINDOWS32 FILETYPE VFT_APP FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "StringFileInfo" BEGIN #ifdef UNICODE BLOCK "040904B0"LH UNZIP.BCK! [UNZIP542.WINCE]PUNZIP.RCV;1.VAX_DECC_OLB;11 // 0x0409 = U.S. English, 0x04B0 = Unicode #else BLOCK "040904E4" // 0x0409 = U.S. English, 0x04E4 = Ansi 1252 #endif BEGIN VALUE "CompanyName", VER_COMPANY_STR "\0" VALUE "FileDescription", VER_FULLPRODUCT_STR "\0" VALUE "FileVersion", VER_FULLVERSION_STR "\0" VALUE "InternalName", VER_INTERNALNAME_STR "\0" VALUE "LegalCopyright", VER_COPYRIGHT_STR "\0" VALUE "OriginalFilename",VER_FILENAME_STR "\0" VALUE "ProductName", VER_PRODUCT_STR "\0" VALUE "ProductVersion", VER_VERSION_STR "\0" VALUE "Comments", VER_COMMENT_STR "\0" END END BLOCK "VarFileInfo" BEGIN #ifdef UNICODE // English language (0x0409) and the Unicode codepage (1200) VALUE "Translation", 0x0409, 1200 #else // English language (0x0409) and the Western Europe codepage (1252) VALUE "Translation", 0x0409, 1252 #endif END END #endif // RC_INVOKED #endif // __PUNZIP_RCV__ *[UNZIP542.WINCE]README.;1+,./ 4-! 0@123KPWO56Of7a7Of7a89GHJ_______________________________________________________________________________ This is the Windows CE Info-ZIP port README, last updated 13 January 2001. _______________________________________________________________________________ Copyright and Disclaimer _______________________________________________________________________________ Copyright All the source files for Pocket UnZip are copyrighted by Info-ZIP. For details on terms and conditions look into the LICENSE file that should be part of the source distribution. The original author Steve P. Miller has gracefully allowed to put his own source contributions for "Pocket UnZip" under the Info-ZIP license. Disclaimer All project files are provided "as is" with no guarantee of their correctness. The authors are not liable for any outcome that is the result of using this source. The source for Pocket UnZip has been placed in the public domain to help provide an understanding of its implementation. You are hereby granted full permission to use this source in any way you wish, except to alter Pocket UnZip itself. For comments, suggestions, and bug reports, please write to stevemil@pobox.com or to the generic Info-ZIP e-mail address Zip-Bugs@lists.wku.edu. _______________________________________________________________________________ About the Windows CE Port (known as "Pocket UnZip") _______________________________________________________________________________ The Windows CE port, known as Pocket UnZip, is designed to run on Microsoft's Windows CE operating system. The port is completely contained in the files listed above. There were very few minor modifications made to the Info-ZIP code in order for this port to work. This was possible because the Info-ZIP code is fairly generic and also because several hooks have already been placed in the code from past Windows ports. The Windows CE port leverages off of these efforts for two reasons. Mainly, I wanted to avoid modifying the Info-ZIP core code since people don't like it when your changes break other ports. Second, this makes the Windows CE port easy to upgrade when fixes and features are released by the Info-ZIP group. The port is made up of the project file (punzip.dsp), one global header (punzip.h), three main source modules (winmain.cpp/h, intrface.cpp/h, and wince.cpp/h), the resource script files (punzip.rc, punzip.rcv, and resource.h), several resources (punzip.ic2, zipfile.ic2, imglist.2bp, ilmask.bmp, toolbar.2bp, punzip.ico, zipfile.ico, imglist.bmp, and toolbar.bmp), and the help file (punzip.htp). The application's entry point is WinMain(), which is located in winmain.cpp (what a surprise). winmain.cpp basically contains all the Windows code and the user interface. It knows nothing about the Info-ZIP code or things like the Globals struct. That stuff is the job of the intrface module. intrface.cpp implements an easy (or at least easier) to understand interface to the Info-ZIP routines. It also handles all the callbacks from Info-ZIP and relays the appropriate information back to the code in winmain.cpp. The final module is wince.cpp. This module implements all the Win32 APIs and C runtime functions that are called by the rest of the code, but are not natively implemented on Windows CE. Most all of this module is excluded for NT native builds. Two preprocessor defines are used in conjunction with several defines from the Info-ZIP code and from other ports. The two that are specific to the Windows CE port are: POCKET_UNZIP Always set for the Windows CE port (CE and NT). _WIN32_WCE Set for Windows CE native; not set for Windows NT native. These three defines are the minimum defines that must be addressed by the project file in order to build this port. This port's main header, punzip.h, gets included by all the Info-ZIP source files when POCKET_UNZIP is defined. punzip.h in turn ensures that all the other relevant Info-ZIP defines are set to correctly build the port. If you wish to alter the Info-ZIP defines used to build this port, you can do so by altering punzip.h. There are quite a few _WIN32_WCE checks throughout the source files for this port. These checks allow the application to build natively for Windows NT for debugging purposes, and just because it can with little effort due to the similarities between the Windows CE API and the Windows NT API. Any non-Windows CE code is assumed to be for Windows NT only. This project currently will not work on Windows 95 because Windows CE is mostly UNICODE, and this port assumes that all Win32 calls to the operating system take UNICODE parameters. I could scatter a few dozen "#ifdef UNICODE" checks around and make it work on Windows 95, but I see no reason to complicate this port's code for that reason since there is already a Windows 95 port of the Info-ZIP code. _______________________________________________________________________________ Building the Windows CE Port (known as "Pocket UnZip") _______________________________________________________________________________ At the time this README was written, Microsoft just released Visual C++ for Windows CE version 1.0. This development kit uses the the standard Microsoft Visual C++ version 5.0 or 6.0 development environment and project files (DSP files). To build Windows CE binaries of Pocket UnZip, you will need version 1.0 or later of Visual C++ for Windows CE. This port's project file, punzip.dsp, contains the information for building all the various binaries. TheseYr UNZIP.BCK! [UNZIP542.WINCE]README.;1ZIP.VAX_DECC_OLB;1  include Windows NT native, Windows CE native for Hitachi SH-3 processors, and Windows CE native for MIPS processors. All projects have Debug and Retail flavors as well. The following table lists the Windows CE devices and which binary they run: Manufacturer CPU Binary --------------------- ------------ ------ Philips Electronics MIPS R3910 MIPS NEC Corp. NEC VR4101 MIPS Casio Computer Co. Hitachi SH-3 SH-3 Compaq Computer Corp. Hitachi SH-3 SH-3 Hewlett-Packard Co. Hitachi SH-3 SH-3 Hitachi Ltd. Hitachi SH-3 SH-3 LG Electronics Inc. Hitachi SH-3 SH-3 Pocket UnZip should build out of the box. If you have just unzipped the Info-ZIP's UnZip sources, you should have a root directory with the core Info-ZIP files in it and several subdirectories under it for the various ports, one of which is the WinCE directory. The project files punzip.dsp are located in the subdirectory vc5 resp. vc6 below the wince directory. Open the punzip.dsp file from the subdirectory matching your Visual C++ base version. The project file uses all the files in the WinCE subdirectory as well as the following files in the Info-ZIP root: api.c crypt.h globals.c process.c unzip.h consts.h ebcdic.h globals.h ttyio.c unzpriv.h crc32.c explode.c inflate.c ttyio.h version.h crctab.c extract.c inflate.h unreduce.c zip.h crypt.c fileio.c list.c unshrink.c _______________________________________________________________________________ Contacting the Authors _______________________________________________________________________________ The Info-ZIP group is made up of dozens of people, past and present, who have devoted countless hours to providing the public with free and portable compression software. The author of the Windows CE port, Pocket UnZip, is Steve P. Miller. If you have questions, comments, suggestions, or bug reports concerning Pocket UnZip itself, you can write Steve Miller at: stevemil@pobox.com If you find a bug that appears to be more Info-ZIP related (i.e. the actual decompression part of Pocket UnZip), you can send mail to: Zip-Bugs@lists.wku.edu For all other general discussion type questions or comments, you can send mail to (as well as join) the following mailing list: Info-Zip@lists.wku.edu See the main UnZip README file for info on how to join the latter list. *[UNZIP542.WINCE]RESOURCE.H;1+, ./ 4-! 0@123KPWO 56pqr7pqr89GHJ//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by punzip.rc // #define IDR_UNZIP 100 #define IDI_UNZIP 100 #define IDI_ZIPFILE 101 #define IDB_TOOLBAR 100 #define IDB_IMAGELIST 101 #define IDB_IMAGELIST_MASK 102 #define IDD_PROPERTIES 100 #define IDD_EXTRACT 101 #define IDD_REPLACE 102 #define IDD_EXTRACT_PROGRESS 103 #define IDD_VIEW_PROGRESS 104 #define IDD_PASSWORD 105 #define IDD_VIEW_ASSOCIATION 106 #define IDD_COMMENT 107 #define IDD_ABOUT 108 #define IDC_TAB 1000 #define IDC_COMMENT 1001 #define IDC_FILES_TOTAL 1002 #define IDC_BYTES_TOTAL 1003 #define IDC_RESTORE_PATHS 1004 #define IDC_OVERWRITE_PROMPT 1005 #define IDC_OVERWRITE_NEWER 1006 #define IDC_OVERWRITE_ALWAYS 1007 #define IDC_OVERWRITE_NEVER 1008 #define IDC_EXTRACT_TO 1009 #define IDC_BROWSE 1010 #define IDC_FILE 1011 #define IDC_PROMPT 1012 #define IDC_PASSWORD 1013 #define IDC_SKIP_ALL 1014 #define IDC_FILE_PROGRESS 1015 #define IDC_PERCENTAGE 1016 #define IDC_TOTAL_PROGRESS 1017 #define IDC_FILES_PROCESSED 1018 #define IDC_FILE_COUNT 1019 #define IDC_BYTES_PROCESSED 1020 #define IDC_BYTE_COUNT 1021 #define IDC_LOG 1022 #define IDC_FILE_SIZE 1023 #define IDC_MODIFIED 1024 #define IDC_COMPRESSED_SIZE 1025 #define IDC_COMPRESSON_FACTOR 1026 #define IDC_COMPRESSION_METHOD 1027 #define IDC_CRC 1028 #define IDC_DIRECTORY 1029 #define IDC_READONLY 1030 #define IDC_ARCHIVE 1031 #define IDC_HIDDEN 1032 #define IDC_SYSTEM 1033 #define IDC_ENCRYPTED 1034 #define IDC_PRODUCT 1035 #define IDC_VERSION 1036 #define IDC_DEVELOPER 1037 #define IDC_COPYRIGHT 1038 #define IDC_PATH 1039 #define IDM_REPLACE_NO 100 #define IDM_REPLACE_TEXT 101 #define IDM_REPLACE_YES 102 #define IDM_REPLACE_ALL 103 #define IDM_REPLACE_NONE 104 #define IDM_REPLACE_RENAME 105 #define IDM_REPLACE_HELP 106 #define IDM_FILE_OPEN 40001 #define IDM_FILE_PROPERTIES 40002 #define IDM_FILE_CLOSE 40003 #define IDM_ACTION_EXTRACT 40004 #define IDM_ACTION_EXTRACT_ALL 40005 #define IDM_ACTION_TEST 40006 #define IDM_ACTION_TEST_ALL 40007 #define IDM_ACTION_VIEW 40008 #define IDM_ACTION_SELECT_ALL 40009 #define IDM_VIEW_EXPANDED_VIEW 40010 #define IDM_VIEW_COMMENT 40011 #define IDM_HELP_ABOUT 40012 #define IDC_STATIC -1 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 103 #define _APS_NEXT_COMMAND_VALUE 40013 #define _APS_NEXT_CONTROL_VALUE 1040 #define _APS_NEXT_SYMED_VALUE 109 #endif #endif *[UNZIP542.WINCE]TOOLBAR.2BP;1+,./ 4-! 0@123KPWO56F7F89GHJ&Du UNZIP.BCK! [UNZIP542.WINCE]TOOLBAR.2BP;1VAX_DECC_OLB;1BMF(@ *UUVHJ?H B UT0 RYH (%1UU*?ZI ∈ # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (WCE MIPS) Application" 0x0a01 # TARGTYPE "Win32 (WCE SH) Application" 0x0901 CFG=punzip - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "punzip.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "punzip.mak" CFG="punzip - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "punzip - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 ANSI Release" (based on\ "Win32 (x86) Application") !MESSAGE "punzip - Win32 ANSI Debug" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 (WCE MIPS) Release" (based on\ "Win32 (WCE MIPS) Application") !MESSAGE "punzip - Win32 (WCE MIPS) Debug" (based on\ "Win32 (WCE MIPS) Application") !MESSAGE "punzip - Win32 (WCE SH) Release" (based on\ "Win32 (WCE SH) Application") !MESSAGE "punzip - Win32 (WCE SH) Debug" (based on\ "Win32 (WCE SH) Application") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "punzip - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" /d "_X86_" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "punzip - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" /d "_X86_" /d "UNICODE" BSC32=bscmake.exe ǹ^ UNZIP.BCK)j  [UNZIP542.WINCE.VC5]PUNZIP.DSP;1_DECC_OLB;1eK# ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "punzip__" # PROP BASE Intermediate_Dir "punzip__" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "AnsiRelease" # PROP Intermediate_Dir "AnsiRelease" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /YX /FD /c # SUBTRACT BASE CPP /X /Fr # ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_X86_" # ADD RSC /l 0x409 /d "NDEBUG" /d "_X86_" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "punzip_0" # PROP BASE Intermediate_Dir "punzip_0" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "AnsiDebug" # PROP Intermediate_Dir "AnsiDebug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "UNICODE" /YX /FD /c # SUBTRACT BASE CPP /X /Fr # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_X86_" # ADD RSC /l 0x409 /d "_DEBUG" /d "_X86_" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "WMIPSRel" # PROP BASE Intermediate_Dir "WMIPSRel" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "WMIPSRel" # PROP Intermediate_Dir "WMIPSRel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=clmips.exe # ADD BASE CPP /nologo /W3 /O2 /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D "_WIN32_WCE" /D "UNICODE" /YX /QMRWCE /c # ADD CPP /nologo /W3 /GX /O2 /I "../.." /I "../../wince/inc" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /QMRWCE /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "NDEBUG" # ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "NDEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libc.lib /nologo /machine:MIPS /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /machine:MIPS /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "WMIPSDbg" # PROP BASE Intermediate_Dir "WMIPSDbg" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "WMIPSDbg" # PROP Intermediate_Dir "WMIPSDbg" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=clmips.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_WIN32_WCE" /D "UNICODE" /YX /QMRWCE /c # ADD CPP /nologo /W3 /GX /Zi /Od /I "../.." /I "../../wince/inc" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /QMRWCE /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "DEBUG" # ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "DEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libcd.lib /nologo /debug /machine:MIPS /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /debug /machine:MIPS /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "WCESHRel" # PROP BASE Intermediate_Dir "WCESHRel" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "WCESHRel" # PROP Intermediate_Dir "WCESHRel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=shcl.exe # ADD BASE CPP /nologo /W3 /O2 /D "NDEBUG" /D "SH3" /D "_SH3_" /D "_WIN32_WCE" /D "UNICODE" /YX /c # ADD CPP /nologo /W3 /GX /O2 /I "../.." /I "../../wince/inc" /D "NDEBUG" /D "SH3" /D "_SH3_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "NDEBUG" # ADD RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "NDEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libc.lib /nologo /machine:SH3 /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /machine:SH3 /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "WCESHDbg" # PROP BASE Intermediate_Dir "WCESHDbg" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "WCESHDbg" # PROP Intermediate_Dir "WCESHDbg" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=shcl.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SH3" /D "_SH3_" /D "_WIN32_WCE" /D "UNICODE" /YX /c # ADD CPP /nologo /W3 /GX /Zi /Od /I "../.." /I "../../wince/inc" /D "DEBUG" /D "SH3" /D "_SH3_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /c # SUBTRACT CPP /X /u /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "DEBUG" # ADD RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "DEBUG" /d "U×ď UNZIP.BCK)j  [UNZIP542.WINCE.VC5]PUNZIP.DSP;1_DECC_OLB;1eօNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libcd.lib /nologo /debug /machine:SH3 /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /debug /machine:SH3 /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /map /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ENDIF # Begin Target # Name "punzip - Win32 Release" # Name "punzip - Win32 Debug" # Name "punzip - Win32 ANSI Release" # Name "punzip - Win32 ANSI Debug" # Name "punzip - Win32 (WCE MIPS) Release" # Name "punzip - Win32 (WCE MIPS) Debug" # Name "punzip - Win32 (WCE SH) Release" # Name "punzip - Win32 (WCE SH) Debug" # Begin Group "Info-ZIP Sources" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\api.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\consts.h # End Source File # Begin Source File SOURCE=..\..\crc32.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\crctab.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\crypt.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !a`6 ||k+&NzRR!bCȵ"*3OT/yqOQu%KxG,14;aRe/4dD`w⒀͉a+n+ qZ͍ڭ@b΄uKq%6̱+k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,o]'@y/YsPe'ECzZ`}!l*-( Mjghw 9R~A$ L8_#Fa%e-&nW7<D6^Q= JJ0P8*2-lk;|O{5\UG'=hX$GGHIxsyAk<S{w{j lE8~g&9G7<}uM]X5AM20UVME_xHWlJ"f\MC*I12ib\25g_(|/3yv}cdpTgr50j[L%'u}%:"^e:[QX]_x_CB>@2:nC]3 $s5KN6`b[otY!'?gsZn* Im-7R/'>#?td6@!H_.;]zs;Hrs2#01kkXp+nanev8X/'GTP"^!}3/?(=MBv!SZQc2tir =yT^OB tSdr(DlYWO!3I'!`+D8!=n0`y9*eI;r^^pN5(|t 7L(M{4zTS+\5mKty0m+ih}tKH3]^>`B hza4>tUSk B5P5c8:"s?5q@k!L@7 >*@cs#(0^dfCA!uF;Sn7iF^vxbJd[ED2DX85!fjk#9t,YR0d3/a;@8C;6R DYB&z' T:c: K ySa\EH-M 6R^2N[*xg8Ƚ'ޑSHc)HX(# K.8[lg/ML>)E\F6m}_jw{,?mܤ@Rr2*&/ͮ Ö#irpjHLAywI &{F;t-#|\)y+͠}Ĺ#$%O0}Iuۀl/nجq!n]$WN"kX%o^)_VG9-G9C(D*<)jgaON_?h5MQeCT]-8m$ "iջaCF+6q2)@nf @ U[2 SzXkyu8; t s; Y7^L o(3-+R # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (WCE MIPS) Application" 0x0a01 # TARGTYPE "Win32 (WCE SH) Application" 0x0901 CFG=punzip - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "punzip.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "punzip.mak" CFG="punzip - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "punzip - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 ANSI Release" (based on\ "Win32 (x86) Application") !MESSAGE "punzip - Win32 ANSI Debug" (based on "Win32 (x86) Application") !MESSAGE "punzip - Win32 (WCE MIPS) Release" (based on\ "Win32 (WCE MIPS) Application") !MESSAGE "punzip - Win32 (WCE MIPS) Debug" (based on\ "Win32 (WCE MIPS) Application") !MESSAGE "punzip - Win32 (WCE SH) Release" (based on\ "Win32 (WCE SH) Application") !MESSAGE "punzip - Win32 (WCE SH) Debug" (based on\ "Win32 (WCE SH) Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "punzip - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" /d "_X86_" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "punzip - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" /d "_X86_" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "punzip__" # PROP BASE Intermediate_Dir "punzip__" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "AnsiRelease" # PROP Intermediate_Dir "AnsiRelease" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /YX /FD /c # SUBTRACT BASE CPP /X /Fr # ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "NDEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_X86_" # ADD RSC /l 0x409 /d "NDEBUG" /d "_X86_" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "punzip_0" # PROP BASE Intermediate_Dir "punzip_0" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "AnsiDebug" # PROP Intermediate_Dir "AnsiDebug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "UNICODE" /YX /FD /c # SUBTRACT BASE CPP /X /Fr # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../.." /D "_DEBUG" /D "_X86_" /D "_WINDOWS" /D "POCKET_UNZIP" /D "_MBCS" /YX /FD /c # SUBTRACT CPP /X /Fr MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_X86_" # ADD RSC /l 0x409 /d "_DEBUG" /d "_X86_" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib comdlg32.lib /nologo /version:1.0 /subsystem:windSܺ UNZIP.BCK#l  [UNZIP542.WINCE.VC6]PUNZIP.DSP;1_DECC_OLB;1egows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "WMIPSRel" # PROP BASE Intermediate_Dir "WMIPSRel" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "WMIPSRel" # PROP Intermediate_Dir "WMIPSRel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=clmips.exe # ADD BASE CPP /nologo /W3 /O2 /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D "_WIN32_WCE" /D "UNICODE" /YX /QMRWCE /c # ADD CPP /nologo /W3 /GX /O2 /I "../.." /I "../../wince/inc" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /QMRWCE /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "NDEBUG" # ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "NDEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libc.lib /nologo /machine:MIPS /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /machine:MIPS /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "WMIPSDbg" # PROP BASE Intermediate_Dir "WMIPSDbg" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "WMIPSDbg" # PROP Intermediate_Dir "WMIPSDbg" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=clmips.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_WIN32_WCE" /D "UNICODE" /YX /QMRWCE /c # ADD CPP /nologo /W3 /GX /Zi /Od /I "../.." /I "../../wince/inc" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /QMRWCE /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "DEBUG" # ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d "_WIN32_WCE" /d "DEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libcd.lib /nologo /debug /machine:MIPS /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /debug /machine:MIPS /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "WCESHRel" # PROP BASE Intermediate_Dir "WCESHRel" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "WCESHRel" # PROP Intermediate_Dir "WCESHRel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=shcl.exe # ADD BASE CPP /nologo /W3 /O2 /D "NDEBUG" /D "SH3" /D "_SH3_" /D "_WIN32_WCE" /D "UNICODE" /YX /c # ADD CPP /nologo /W3 /GX /O2 /I "../.." /I "../../wince/inc" /D "NDEBUG" /D "SH3" /D "_SH3_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /c # SUBTRACT CPP /X /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "NDEBUG" # ADD RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "NDEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libc.lib /nologo /machine:SH3 /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /machine:SH3 /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "WCESHDbg" # PROP BASE Intermediate_Dir "WCESHDbg" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "WCESHDbg" # PROP Intermediate_Dir "WCESHDbg" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=shcl.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SH3" /D "_SH3_" /D "_WIN32_WCE" /D "UNICODE" /YX /c # ADD CPP /nologo /W3 /GX /Zi /Od /I "../.." /I "../../wince/inc" /D "DEBUG" /D "SH3" /D "_SH3_" /D _WIN32_WCE=100 /D "POCKET_UNZIP" /D "_MBCS" /D "UNICODE" /YX /c # SUBTRACT CPP /X /u /Fr RSC=rc.exe # ADD BASE RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "DEBUG" # ADD RSC /l 0x409 /r /d "SH3" /d "_SH3_" /d "_WIN32_WCE" /d "DEBUG" /d "UNICODE" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib libcd.lib /nologo /debug /machine:SH3 /subsystem:windowsce # SUBTRACT BASE LINK32 /pdb:none /nodefaultlib # ADD LINK32 coredll.lib commctrl.lib /nologo /debug /machine:SH3 /subsystem:windowsce # SUBTRACT LINK32 /pdb:none /map /nodefaultlib PFILE=pfile.exe # ADD BASE PFILE COPY # ADD PFILE COPY !ENDIF # Begin Target # Name "punzip - Win32 Release" # Name "punzip - Win32 Debug" # Name "punzip - Win32 ANSI Release" # Name "punzip - Win32 ANSI Debug" # Name "punzip - Win32 (WCE MIPS) Release" # Name "punzip - Win32 (WCE MIPS) Debug" # Name "punzip - Win32 (WCE SH) Release" # Name "punzip - Win32 (WCE SH) Debug" # Begin Group "Info-ZIP Sources" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\api.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_API_C=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\version.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_API_C=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin So @ UNZIP.BCK#l  [UNZIP542.WINCE.VC6]PUNZIP.DSP;1_DECC_OLB;1e urce File SOURCE=..\..\consts.h # End Source File # Begin Source File SOURCE=..\..\crc32.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_CRC32=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRC32=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\crctab.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_CRCTA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRCTA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\crypt.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_CRYPT=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRYPT=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_CRYPT=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRYPT=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_CRYPT=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRYPT=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_CRYPT=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\..\zip.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_CRYPT=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\crypt.h # End Source File # Begin Source File SOURCE=..\..\ebcdic.h # End Source File # Begin Source File SOURCE=..\..\explode.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_EXPLO=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXPLO=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MI! UNZIP.BCK#l  [UNZIP542.WINCE.VC6]PUNZIP.DSP;1_DECC_OLB;1e_,PS) Debug" DEP_CPP_EXPLO=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXPLO=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_EXPLO=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXPLO=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_EXPLO=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXPLO=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\extract.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_EXTRA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXTRA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_EXTRA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXTRA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_EXTRA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXTRA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_EXTRA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_EXTRA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\fileio.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_FILEI=\ "..\..\crypt.h"\ "..\..\ebcdic.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_FILEI=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_FILEI=\ "..\..\crypt.h"\ "..\..\ebcdic.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_FILEI=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_FILEI=\ "..\..\crypt.h"\ "..\..\ebcdic.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_FILEI=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_FILEI=\ "..\..\crypt.h"\ "..\..\ebcdic.h"\ "..\..\globals.h"\ "..\..\ttyio.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_FILEI=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\globals.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_GLOBA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_GLOBA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_GLOBA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_GLOBA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_GLOBA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_GLOBA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ ""Y  UNZIP.BCK#l  [UNZIP542.WINCE.VC6]PUNZIP.DSP;1_VAXC_OLB;1e;..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_GLOBA=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_GLOBA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\globals.h # End Source File # Begin Source File SOURCE=..\..\inflate.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_INFLA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\inflate.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_INFLA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_INFLA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\inflate.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_INFLA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_INFLA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\inflate.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_INFLA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_INFLA=\ "..\..\crypt.h"\ "..\..\globals.h"\ "..\..\inflate.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_INFLA=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\inflate.h # End Source File # Begin Source File SOURCE=..\..\list.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_LIST_=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_LIST_=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_LIST_=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_LIST_=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_LIST_=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_LIST_=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_LIST_=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_LIST_=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOURCE=..\..\process.c !IF "$(CFG)" == "punzip - Win32 Release" !ELSEIF "$(CFG)" == "punzip - Win32 Debug" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Release" !ELSEIF "$(CFG)" == "punzip - Win32 ANSI Debug" !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Release" DEP_CPP_PROCE=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_PROCE=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE MIPS) Debug" DEP_CPP_PROCE=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_PROCE=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Release" DEP_CPP_PROCE=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_PROCE=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ELSEIF "$(CFG)" == "punzip - Win32 (WCE SH) Debug" DEP_CPP_PROCE=\ "..\..\globals.h"\ "..\..\unzip.h"\ "..\..\unzpriv.h"\ "..\intrface.h"\ "..\punzip.h"\ "..\punzip.rcv"\ "..\wince.h"\ NODEP_CPP_PROCE=\ "..\..\acorn\riscos.h"\ "..\..\amiga\amiga.h"\ "..\..\aosvs\aosvs.h"\ "..\..\macdir.h"\ "..\..\macstat.h"\ "..\..\msdos\doscfg.h"\ "..\..\os2\os2cfg.h"\ "..\..\os2\os2data.h"\ "..\..\qdos\izqdos.h"\ "..\..\vmmvs.h"\ "..\..\win32\w32cfg.h"\ "..\..\windll\windll.h"\ "..\..\zlib.h"\ !ENDIF # End Source File # Begin Source File SOUR# !K9ssax g}zi dubCR$@{7}(4,bp4B*vaY%)n>f|@UoyzK.Vn%y&d+O \Ce#OT"X60y amfHg0jd7$#0C]k%Ua[] fq#! \9gXw~"dFOP*]zV?Z||szD@}p[>7D@ W-Q .WZ;t@CxTJknd9MKFZ,~L'{W#8!0( ]niSRvFH!dm;pk\&?Qc_Ouu[Yo Y,t yTY 1fp:"2Z&F GZm.V%|z f4_#X/:am ('/xAcOYf|xW"%[quP!" ua0#!*+JA>y~l:h&Q8vxhPL#9vH67hvB =a4>;bC-v?2FvC|-zC Bs^MWc\;v4[P2rXc"qT 7~(r0'. '^deh HU_hHNTW5qDErU2-uxih3^ k*uhI5F#TWt2CODkpp(t5\"gFC^7/qPwJ`q54 xVIeZK'HOX#4Ie''iqkF!e9Ail ;t0o|m-vk]Hf {"%4 BmyLi$N>sE *p` O*]DC/BJ8yfk7[dVSoDDGVl3=VSDKLo#&-z0`x LVlw =uae0q,\=U|_yD%n;%>EFb8#9#n*=_vJ9\wB-FC8zO>e Go#(QnJmvf }HguN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lEk`[ZY /qdvd5a]/].:^;]3>d/?vngQGzQ *j)~mzz8{2NQ\paIQY(etq O jr%kEb6 !Tb O"-r-^`B ^ l(? iw6,b,9+|C?<rhJ-&%rwG_%cxWtaXMuq8h4J\~_( ?v5pf5_,R> C=TS7{tKO.XIMX]h;' B5)mz]\Wc6`2ta:(69_MDAQ c hvHN&`zJys?TN* ggUpyHB ggF1d,i$apO!7HJ UAsUK)zLYq;i*/ ]h>3XJ@4 "u~YN[!m!!))M pzro8C-t "k^.d[POHCNGta0]/0@7$9RxI=Qv7tB2X[a[2fSh!wPG1mt%cYO8r]82`HbS9,}!RAsM_252*si,7kdE3ki!%X?|H= n20S),l[U +e=X8*]69rOJMddv! %bX3|#x\EuwABDKV {_{#8'[u|psHs Q0,o!_%98a8Gh(0=]t+e_"HT9$FsSm(;O ^6f(mj,rF6iNuEyuy{0mXUz kf>qA$8b~ [\$r<@AgOL bqV(uOPVrh:_k9V6 2h4~ // Must be outside of extern "C" block //****************************************************************************** //***** For all platforms - Our debug output function //****************************************************************************** #ifdef DEBUG // RETAIL version is __inline and does not generate any code. void DebugOut(LPCTSTR szFormat, ...) { TCHAR szBuffer[512] = TEXT("PUNZIP: "); va_list pArgs; va_start(pArgs, szFormat); _vsntprintf(szBuffer + 8, countof(szBuffer) - 10, szFormat, pArgs); va_end(pArgs); TCHAR *psz = szBuffer; while (psz = _tcschr(psz, TEXT('\n'))) { *psz = TEXT('|'); } psz = szBuffer; while (psz = _tcschr(psz, TEXT('\r'))) { *psz = TEXT('|'); } _tcscat(szBuffer, TEXT("\r\n")); OutputDebugString(szBuffer); } #endif // DEBUG //****************************************************************************** //***** Windows CE Native //****************************************************************************** #if defined(_WIN32_WCE) //****************************************************************************** //***** Local Function Prototyopes //****************************************************************************** void SafeGetTimeZoneInformation(TIME_ZONE_INFORMATION *ptzi); time_t GetTransitionTimeT(TIME_ZONE_INFORMATION *ptzi, int year, BOOL fStartDST); BOOL IsDST(TIME_ZONE_INFORMATION *ptzi, time_t localTime); //****************************************************************************** //***** IO.H functions //****************************************************************************** //-- Called from fileio.c int __cdecl chmod(const char *filename, int pmode) { // Called before unlink() to delete read-only files. DWORD dwAttribs = (pmode & _S_IWRITE) ? FILE_ATTRIBUTE_NORMAL : FILE_ATTRIBUTE_READONLY; TCHAR szPath[_MAX_PATH]; MBSTOTSTR(szPath, filename, countof(szPath)); return (SetFileAttributes(szPath, dwAttribs) ? 0 : -1); } //****************************************************************************** //-- Called from process.c int __cdecl close(int handle) { return (CloseHandle((HANDLE)handle) ? 0 : -1); } //****************************************************************************** //-- Called from fileio.c int __cdecl isatty(int handle) { // returns TRUE if handle is a terminal, console, printer, or serial port // called with 1 (stdout) and 2 (stderr) return 0; } //****************************************************************************** //-- Called from extract.c, fileio.c, process.c long __cdecl lseek(int handle, long offset, int origin) { // SEEK_SET, SEEK_CUR, SEEK_END are equal to FILE_BEGIN, FILE_CURRENT, FILE_END return SetFilePointer((HANDLE)handle, offset, NULL, origin); } //****************************************************************************** //-- Called from fileio.c int __cdecl open(const char *filename, int oflag, ...) { // The Info-Zip code currently only opens existing ZIP files for read using open(). TCHAR szPath[_MAX_PATH]; MBSTOTSTR(szPath, filename, countof(szPath)); HANDLE hFile = CreateFile(szPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); return ((hFile == INVALID_HANDLE_VALUE) ? -1 : (int)hFile); } //****************************************************************************** //-- Called from extract.c, fileio.c, process.c int __cdecl read(int handle, void *buffer, unsigned int count) { DWORD dwRead = 0; return (ReadFile((HANDLE)handle, buffer, count, &dwRead, NULL) ? dwRead : -1); } //****************************************************************************** //-- Called from extract.c int __cdecl setmode(int handle, int mode) { //TEXT/BINARY translation - currently always called with O_BINARY. return O_BINARY; } //****************************************************************************** //-- Called from fileio.c int __cdecl unlink(const char *filename) { // Called to delete files before an extract overwrite. TCHAR szPath[_MAX_PATH]; MBSTOTSTR(szPath, filename, countof(szPath)); return (DeleteFile(szPath) ? 0: -1); } //****************************************************************************** //***** STDIO.H functions //****************************************************************************** //-- Called from fileio.c int __cdecl fflush(FILE *stream) { return (FlushFileBuffers((HANDLE)stream) ? 0 : EOF); } //****************************************************************************** //-- Called from extract.c char * __cdecl fgets(char *string, int n, FILE *stream) { // stream always equals "stdin" and fgets() should never be called. DebugOut(TEXT("WARNING: fgets(0x%08X, %d, %08X) called."), string, n, stream); return NULL; } //****************************************************************************** //-- Called from extract.c int __cdecl fileno(FILE *stream) { return (int)stream; } //****************************************************************************** //-- Called from fileio.c FILE * __cdecl fopen(const char *filename, const char *mode) { // fopen() is used to create all extracted files. DWORD dwAccess = 0; DWORD dwCreate = 0; BOOL fAppend = FALSE; if (strstr(mode, "r+")) { dwAccess = GENERIC_READ | GENERIC_WRITE; dwCreate = OPEN_EXISTING; } else if (strstr(mode, "w+")) { dwAccess = GENERIC_READ'hl UNZIP.BCK ! NZIP542.WINCE]WINCE.CPP;1P.VAX_VAXC_OLB;1-a | GENERIC_WRITE; dwCreate = CREATE_ALWAYS; } else if (strstr(mode, "a+")) { dwAccess = GENERIC_READ | GENERIC_WRITE; dwCreate = OPEN_ALWAYS; fAppend = TRUE; } else if (strstr(mode, "r")) { dwAccess = GENERIC_READ; dwCreate = OPEN_EXISTING; } else if (strstr(mode, "w")) { dwAccess = GENERIC_WRITE; dwCreate = CREATE_ALWAYS; } else if (strstr(mode, "a")) { dwAccess = GENERIC_WRITE; dwCreate = OPEN_ALWAYS; fAppend = TRUE; } TCHAR szPath[_MAX_PATH]; MBSTOTSTR(szPath, filename, countof(szPath)); HANDLE hFile = CreateFile(szPath, dwAccess, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwCreate, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return NULL; } if (fAppend) { SetFilePointer(hFile, 0, NULL, FILE_END); } return (FILE*)hFile; } //****************************************************************************** //-- Called from unshrink.c int __cdecl fprintf(FILE *stream, const char *format, ...) { // All standard output/error in Info-ZIP is handled through fprintf() if ((stream == stdout) || (stream == stderr)) { return 1; } // "stream" always equals "stderr" or "stdout" - log error if we see otherwise. #ifdef UNICODE DebugOut(TEXT("WARNING: fprintf(0x%08X, \"%S\", ...) called."), stream, format); #else DebugOut(TEXT("WARNING: fprintf(0x%08X, \"%s\", ...) called."), stream, format); #endif return 0; } //****************************************************************************** //-- Called from fileio.c int __cdecl fclose(FILE *stream) { return (CloseHandle((HANDLE)stream) ? 0 : EOF); } //****************************************************************************** //-- Called from fileio.c int __cdecl putc(int c, FILE *stream) { DebugOut(TEXT("WARNING: putc(%d, 0x%08X) called."), c, stream); return 0; } //****************************************************************************** //-- Called from intrface.cpp, extract.c, fileio.c, list.c, process.c int __cdecl sprintf(char *buffer, const char *format, ...) { WCHAR wszBuffer[512], wszFormat[512]; MBSTOTSTR(wszFormat, format, countof(wszFormat)); BOOL fPercent = FALSE; for (WCHAR *pwsz = wszFormat; *pwsz; pwsz++) { if (*pwsz == L'%') { fPercent = !fPercent; } else if (fPercent && (((*pwsz >= L'a') && (*pwsz <= L'z')) || ((*pwsz >= L'A') && (*pwsz <= L'Z')))) { if (*pwsz == L's') { *pwsz = L'S'; } else if (*pwsz == L'S') { *pwsz = L's'; } fPercent = FALSE; } } va_list pArgs; va_start(pArgs, format); _vsntprintf(wszBuffer, countof(wszBuffer), wszFormat, pArgs); va_end(pArgs); TSTRTOMBS(buffer, wszBuffer, countof(wszBuffer)); return 0; } //****************************************************************************** //***** STRING.H functions //****************************************************************************** //-- Called from winmain.cpp int __cdecl _stricmp(const char *string1, const char *string2) { while (*string1 && ((*string1 | 0x20) == (*string2 | 0x20))) { string1++; string2++; } return (*string1 - *string2); } //****************************************************************************** //-- Called from intrface.cpp and winmain.cpp char* __cdecl _strupr(char *string) { while (*string) { if ((*string >= 'a') && (*string <= 'z')) { *string -= 'a' - 'A'; } string++; } return string; } #ifndef _MBCS //****************************************************************************** //-- Called from winmain.cpp char* __cdecl strrchr(const char *string, int c) { // Walk to end of string. for (char *p = (char*)string; *p; p++) { } // Walk backwards looking for character. for (p--; p >= string; p--) { if ((int)*p == c) { return p; } } return NULL; } #endif /* !_MBCS */ //****************************************************************************** //***** CTYPE.H functions //****************************************************************************** //-- Called from fileio.c int __cdecl isupper(int c) { return ((c >= 'A') && (c <= 'Z')); } //****************************************************************************** //***** STAT.H functions //****************************************************************************** //-- Called fileio.c, process.c, intrface.cpp int __cdecl stat(const char *path, struct stat *buffer) { // stat() is called on both the ZIP files and extracted files. // Clear our stat buffer to be safe. ZeroMemory(buffer, sizeof(struct stat)); // Find the file/direcotry and fill in a WIN32_FIND_DATA structure. WIN32_FIND_DATA w32fd; ZeroMemory(&w32fd, sizeof(w32fd)); TCHAR szPath[_MAX_PATH]; MBSTOTSTR(szPath, path, countof(szPath)); HANDLE hFind = FindFirstFile(szPath, &w32fd); // Bail out now if we could not find the file/directory. if (hFind == INVALID_HANDLE_VALUE) { return -1; } // Close the find. FindClose(hFind); // Mode flags that are currently used: S_IWRITE, S_IFMT, S_IFDIR, S_IEXEC if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { buffer->st_mode = _S_IFDIR | _S_IREAD | _S_IEXEC; } else { buffer->st_mode = _S_IFREG | _S_IREAD; } if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { buffer->st_mode |= _S_IWRITE; } // Store the file size. buffer->st_size = (_off_t)w32fd.nFileSizeLow; // Convert the modified FILETIME to a time_t and store it. DWORDLONG dwl = *(DWORDLONG*)&w32fd.ftLastWriteTime; buffer->st_mtime = (time_t)((dwl - (DWORDLONG)116444736000000000) / (DWORDLONG)10000000); return 0; } //****************************************************************************** //***** TIME.H functions //****************************************************************************** // Evaluates to TRUE if 'y' is a leap year, otherwise FALSE // #define IS_LEAP_YEAR(y) ((((y) % 4 == 0) && ((y) % 100 != 0)) || ((y) % 400 == 0)) // The macro below is a reduced version of the above macro. It is valid for // years between 1901 and 2099 which easily includes all years representable // by the current implementation of time_t. #define IS_LEAP_YEAR(y) (((y) & 3) == 0) #define BASE_DOW 4 // 1/1/1970 was a Thursday. #define SECONDS_IN_A_DAY (24L * 60L * 60L) // Number of seconds in one day. // Month to Year Day conversion array. int M2YD[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; // Month to Leap Year Day conversion array. int M2LYD[] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }; //****************************************************************************** //-- Called from list.c struct tm * __cdecl localtime(const time_t *timer) { // Return value for localtime(). Source currently never references // more than one "tm" at a time, so the single return structure is ok. static struct tm g_tm; ZeroMemory(&g_tm, sizeof(g_tm)); // Get our time zone information. TIME_ZONE_INFORMATION tzi; SafeGetTimeZoneInformation(&tzi); // Create a time_t that has been corrected for our time zone. time_t localTime = *timer - (tzi.Bias * 60L); // Decide if value is in Daylight Savings Time. if (g_tm.tm_isdst = (int)IsDST(&tzi, localTime)) { localTime -= tzi.DaylightBias * 60L; // usually 60 minutes } else { localTime -= tzi.StandardBias * 6( UNZIP.BCK ! NZIP542.WINCE]WINCE.CPP;1P.VAX_VAXC_OLB;1-Pm 0L; // usually 0 minutes } // time_t is a 32-bit value for the seconds since January 1, 1970 // FILETIME is a 64-bit value for the number of 100-nanosecond intervals // since January 1, 1601 // Compute the FILETIME for the given local time. DWORDLONG dwl = ((DWORDLONG)116444736000000000 + ((DWORDLONG)localTime * (DWORDLONG)10000000)); FILETIME ft = *(FILETIME*)&dwl; // Convert the FILETIME to a SYSTEMTIME. SYSTEMTIME st; ZeroMemory(&st, sizeof(st)); FileTimeToSystemTime(&ft, &st); // Finish filling in our "tm" structure. g_tm.tm_sec = (int)st.wSecond; g_tm.tm_min = (int)st.wMinute; g_tm.tm_hour = (int)st.wHour; g_tm.tm_mday = (int)st.wDay; g_tm.tm_mon = (int)st.wMonth - 1; g_tm.tm_year = (int)st.wYear - 1900; return &g_tm; } //****************************************************************************** void SafeGetTimeZoneInformation(TIME_ZONE_INFORMATION *ptzi) { ZeroMemory(ptzi, sizeof(TIME_ZONE_INFORMATION)); // Ask the OS for the standard/daylight rules for the current time zone. if ((GetTimeZoneInformation(ptzi) == 0xFFFFFFFF) || (ptzi->StandardDate.wMonth > 12) || (ptzi->DaylightDate.wMonth > 12)) { // If the OS fails us, we default to the United States' rules. ZeroMemory(ptzi, sizeof(TIME_ZONE_INFORMATION)); ptzi->StandardDate.wMonth = 10; // October ptzi->StandardDate.wDay = 5; // Last Sunday (DOW == 0) ptzi->StandardDate.wHour = 2; // At 2:00 AM ptzi->DaylightBias = -60; // One hour difference ptzi->DaylightDate.wMonth = 4; // April ptzi->DaylightDate.wDay = 1; // First Sunday (DOW == 0) ptzi->DaylightDate.wHour = 2; // At 2:00 AM } } //****************************************************************************** time_t GetTransitionTimeT(TIME_ZONE_INFORMATION *ptzi, int year, BOOL fStartDST) { // We only handle years within the range that time_t supports. We need to // handle the very end of 1969 since the local time could be up to 13 hours // into the previous year. In this case, our code will actually return a // negative value, but it will be compared to another negative value and is // handled correctly. The same goes for the 13 hours past a the max time_t // value of 0x7FFFFFFF (in the year 2038). Again, these values are handled // correctly as well. if ((year < 1969) || (year > 2038)) { return (time_t)0; } SYSTEMTIME *pst = fStartDST ? &ptzi->DaylightDate : &ptzi->StandardDate; // WORD wYear Year (0000 == 0) // WORD wMonth Month (January == 1) // WORD wDayOfWeek Day of week (Sunday == 0) // WORD wDay Month day (1 - 31) // WORD wHour Hour (0 - 23) // WORD wMinute Minute (0 - 59) // WORD wSecond Second (0 - 59) // WORD wMilliseconds Milliseconds (0 - 999) // Compute the number of days since 1/1/1970 to the beginning of this year. long daysToYear = ((year - 1970) * 365) // Tally up previous years. + ((year - 1969) >> 2); // Add few extra for the leap years. // Compute the number of days since the beginning of this year to the // beginning of the month. We will add to this value to get the actual // year day. long yearDay = IS_LEAP_YEAR(year) ? M2LYD[pst->wMonth - 1] : M2YD [pst->wMonth - 1]; // Check for day-in-month format. if (pst->wYear == 0) { // Compute the week day for the first day of the month (Sunday == 0). long monthDOW = (daysToYear + yearDay + BASE_DOW) % 7; // Add the day offset of the transition day to the year day. if (monthDOW < pst->wDayOfWeek) { yearDay += (pst->wDayOfWeek - monthDOW) + (pst->wDay - 1) * 7; } else { yearDay += (pst->wDayOfWeek - monthDOW) + pst->wDay * 7; } // It is possible that we overshot the month, especially if pst->wDay // is 5 (which means the last instance of the day in the month). Check // if the year-day has exceeded the month and adjust accordingly. if ((pst->wDay == 5) && (yearDay >= (IS_LEAP_YEAR(year) ? M2LYD[pst->wMonth] : M2YD [pst->wMonth]))) { yearDay -= 7; } // If not day-in-month format, then we assume an absolute date. } else { // Simply add the month day to the current year day. yearDay += pst->wDay - 1; } // Tally up all our days, hours, minutes, and seconds since 1970. long seconds = ((SECONDS_IN_A_DAY * (daysToYear + yearDay)) + (3600L * (long)pst->wHour) + (60L * (long)pst->wMinute) + (long)pst->wSecond); // If we are checking for the end of DST, then we need to add the DST bias // since we are in DST when we chack this time stamp. if (!fStartDST) { seconds += ptzi->DaylightBias * 60L; } return (time_t)seconds; } //****************************************************************************** BOOL IsDST(TIME_ZONE_INFORMATION *ptzi, time_t localTime) { // If either of the months is 0, then this usually means that the time zone // does not use DST. Unfortunately, Windows CE since it has a bug where it // never really fills in these fields with the correct values, so it appears // like we are never in DST. This is supposed to be fixed in future releases, // so hopefully this code will get some use then. if ((ptzi->StandardDate.wMonth == 0) || (ptzi->DaylightDate.wMonth == 0)) { return FALSE; } // time_t is a 32-bit value for the seconds since January 1, 1970 // FILETIME is a 64-bit value for the number of 100-nanosecond intervals // since January 1, 1601 // Compute the FILETIME for the given local time. DWORDLONG dwl = ((DWORDLONG)116444736000000000 + ((DWORDLONG)localTime * (DWORDLONG)10000000)); FILETIME ft = *(FILETIME*)&dwl; // Convert the FILETIME to a SYSTEMTIME. SYSTEMTIME st; ZeroMemory(&st, sizeof(st)); FileTimeToSystemTime(&ft, &st); // Get our start and end daylight savings times. time_t timeStart = GetTransitionTimeT(ptzi, (int)st.wYear, TRUE); time_t timeEnd = GetTransitionTimeT(ptzi, (int)st.wYear, FALSE); // Check what hemisphere we are in. if (timeStart < timeEnd) { // Northern hemisphere ordering. return ((localTime >= timeStart) && (localTime < timeEnd)); } else if (timeStart > timeEnd) { // Southern hemisphere ordering. return ((localTime < timeEnd) || (localTime >= timeStart)); } // If timeStart equals timeEnd then this time zone does not support DST. return FALSE; } #endif // _WIN32_WCE Z*[UNZIP542.WINCE]WINCE.H;1+,./ 4s-! 0@123KPWO56ة4a7ة4a89GHJ)$x UNZIP.BCK! [UNZIP542.WINCE]WINCE.H;1ZIP.VAX_VAXC_OLB;1f/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: WINCE.H // // Description: This file declares all the Win32 APIs and C runtime functions // that the Info-ZIP code calls, but are not implemented natively // on Windows CE. See WINCE.CPP for the implementation. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** #ifndef __WINCE_H__ #define __WINCE_H__ #ifdef __cplusplus extern "C" { #endif //****************************************************************************** //***** For all platforms - Our debug output function //****************************************************************************** // If we are building for debug, we implement the DebugOut() function. If we are // building for release, then we turn all calls to DebugOut() into no-ops. The // Microsoft compiler (and hopefully others) will not generate any code at all // for the retail version of DebugOut() defined here. This works much better // than trying to create a variable argument macro - something C/C++ does not // support cleanly. #ifdef DEBUG void DebugOut(LPCTSTR szFormat, ...); #else __inline void DebugOut(LPCTSTR szFormat, ...) {} #endif //****************************************************************************** //***** Windows NT Native //****************************************************************************** #if !defined(_WIN32_WCE) #ifndef UNICODE #include #endif #include #include #include #include #endif //****************************************************************************** //***** Windows CE Native //****************************************************************************** #if defined(_WIN32_WCE) #ifndef ZeroMemory #define ZeroMemory(Destination,Length) memset(Destination, 0, Length) #endif // A few forgotten defines in Windows CE's TCHAR.H #ifndef _stprintf #define _stprintf wsprintf #endif #ifndef _vsntprintf #define _vsntprintf(d,c,f,a) wvsprintf(d,f,a) #endif //****************************************************************************** //***** SYS\TYPES.H functions //****************************************************************************** typedef long _off_t; typedef long time_t; //****************************************************************************** //***** CTYPE.H functions //****************************************************************************** _CRTIMP int __cdecl isupper(int); _CRTIMP int __cdecl tolower(int); //****************************************************************************** //***** FCNTL.H functions //****************************************************************************** #define _O_RDONLY 0x0000 // open for reading only //#define _O_WRONLY 0x0001 // open for writing only //#define _O_RDWR 0x0002 // open for reading and writing //#define _O_APPEND 0x0008 // writes done at eof //#define _O_CREAT 0x0100 // create and open file //#define _O_TRUNC 0x0200 // open and truncate //#define _O_EXCL 0x0400 // open only if file doesn't already exist //#define _O_TEXT 0x4000 // file mode is text (translated) #define _O_BINARY 0x8000 // file mode is binary (untranslated) #define O_RDONLY _O_RDONLY //#define O_WRONLY _O_WRONLY //#define O_RDWR _O_RDWR //#define O_APPEND _O_APPEND //#define O_CREAT _O_CREAT //#define O_TRUNC _O_TRUNC //#define O_EXCL _O_EXCL //#define O_TEXT _O_TEXT #define O_BINARY _O_BINARY //#define O_RAW _O_BINARY //#define O_TEMPORARY _O_TEMPORARY //#define O_NOINHERIT _O_NOINHERIT //#define O_SEQUENTIAL _O_SEQUENTIAL //#define O_RANDOM _O_RANDOM //****************************************************************************** //***** IO.H functions //****************************************************************************** _CRTIMP int __cdecl chmod(const char *, int); _CRTIMP int __cdecl close(int); _CRTIMP int __cdecl isatty(int); _CRTIMP long __cdecl lseek(int, long, int); _CRTIMP int __cdecl open(const char *, int, ...); _CRTIMP int __cdecl read(int, void *, unsigned int); _CRTIMP int __cdecl setmode(int, int); _CRTIMP int __cdecl unlink(const char *); //****************************************************************************** //***** STDIO.H functions //****************************************************************************** //typedef struct _iobuf FILE; typedef int FILE; #define stdin ((int*)-2) #define stdout ((int*)-3) #define stderr ((int*)-4) #define EOF (-1) _CRTIMP int __cdecl fflush(FILE *); _CRTIMP char * __cdecl fgets(char *, int, FILE *); _CRTIMP int __cdecl fileno(FILE *); _CRTIMP FILE * __cdecl fopen(const char *, const char *); _CRTIMP int __cdecl fprintf(FILE *, const char *, ...); _CRTIMP int __cdecl fclose(FILE *); _CRTIMP int __cdecl putc(int, FILE *); _CRTIMP int __cdecl sprintf(char *, const char *, ...); //****************************************************************************** //***** STRING.H functions //****************************************************************************** _CRTIMP int __cdecl _stricmp(const char *, const char *); _CRTIMP char * __cdecl _strupr(char *); _CRTIMP char * __cdecl strrchr(const char *, int); //****************************************************************************** //***** TIME.H functions //****************************************************************************** #ifndef _TM_DEFINED struct tm { int tm_sec; // seconds after the minute - [0,59] int tm_min; // minutes after the hour - [0,59] int tm_hour; // hours since midnight - [0,23] int tm_mday; // day of the month - [1,31] int tm_mon; // months since January - [0,11] int tm_year; // years since 1900 // int tm_wday; // days since Sunday - [0,6] // int tm_yday; // days since January 1 - [0,365] int tm_isdst; // daylight savings time flag }; #define _TM_DEFINED #endif _CRTIMP struct tm * __cdecl localtime(const time_t *); //******************************************************************************* UNZIP.BCK! [UNZIP542.WINCE]WINCE.H;1ZIP.VAX_VAXC_OLB;1  //***** SYS\STAT.H functions //****************************************************************************** struct stat { // _dev_t st_dev; // _ino_t st_ino; unsigned short st_mode; // short st_nlink; // short st_uid; // short st_gid; // _dev_t st_rdev; _off_t st_size; // time_t st_atime; time_t st_mtime; // time_t st_ctime; }; #define _S_IFMT 0170000 // file type mask #define _S_IFDIR 0040000 // directory //#define _S_IFCHR 0020000 // character special //#define _S_IFIFO 0010000 // pipe #define _S_IFREG 0100000 // regular #define _S_IREAD 0000400 // read permission, owner #define _S_IWRITE 0000200 // write permission, owner #define _S_IEXEC 0000100 // execute/search permission, owner #define S_IFMT _S_IFMT #define S_IFDIR _S_IFDIR //#define S_IFCHR _S_IFCHR //#define S_IFREG _S_IFREG #define S_IREAD _S_IREAD #define S_IWRITE _S_IWRITE #define S_IEXEC _S_IEXEC _CRTIMP int __cdecl stat(const char *, struct stat *); //****************************************************************************** #endif // _WIN32_WCE #ifdef __cplusplus } // extern "C" #endif #endif // __WINCE_H__ e*[UNZIP542.WINCE]WINMAIN.CPP;1+, . / 4  -! 0@123KPWO 561a71a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: WINMAIN.CPP // // Description: This module contains all the Windows specific code for Pocket // UnZip. It contains the entire user interface. This code knows // almost nothing about the Info-ZIP code. All Info-ZIP related // functions are wrapped by helper functions in INTRFACE.CPP. The // code in this module only calls those wrapper functions and // INTRFACE.CPP handles all the details and callbacks of the // Info-ZIP code. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // Functions: WinMain // InitializeApplication // ShutdownApplication // RegisterUnzip // BuildImageList // WndProc // OnCreate // OnFileOpen // OnActionView // OnActionSelectAll // OnViewExpandedView // OnHelp // OnGetDispInfo // OnDeleteItem // OnItemChanged // Sort // CompareFunc // SetCaptionText // DrawBanner // AddDeleteColumns // ResizeColumns // GetZipErrorString // AddFileToListView // EnableAllMenuItems // CheckAllMenuItems // CenterWindow // AddTextToEdit // FormatValue // BuildAttributesString // BuildTypeString // GetFileFromPath // ForwardSlashesToBackSlashesA // ForwardSlashesToBackSlashesW // DeleteDirectory(LPTSTR szPath); // RegWriteKey // RegReadKey // WriteOptionString // WriteOptionInt // GetOptionString // GetOptionInt // DisableEditing // EditSubclassProc // GetMenuString // InitializeMRU // AddFileToMRU // RemoveFileFromMRU // ActivateMRU // ReadZipFileList // DlgProcProperties // MergeValues // CheckThreeStateBox // ExtractOrTestFiles // DlgProcExtractOrTest // FolderBrowser // DlgProcBrowser // SubclassSaveAsDlg // DlgProcExtractProgress // DlgProcViewProgress // UpdateProgress // PromptToReplace // DlgProcReplace // DlgProcPassword // DlgProcViewAssociation // DlgProcComment // DlgProcAbout // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** extern "C" { #define __WINMAIN_CPP__ #define UNZIP_INTERNAL #include "unzip.h" #include "crypt.h" // Needed to pick up CRYPT define setting and return values. #include "version.h" // Only needed by consts.h (VERSION_DATE & VersionDate) #include "consts.h" // Only include once - defines constant string messages. #include // Common controls - mainly ListView and ImageList #include // Common dialogs - OpenFile dialog #ifndef _WIN32_WCE #include // On NT, we use the SHBrowseForFolder() stuff. #include // CommandLineToArgvW() and ExtractIconEx() #endif #include "intrface.h" // Interface between Info-ZIP and us #include "winmain.h" // Us } #include // Must be outside of extern "C" block //****************************************************************************** //***** "Local" Global Variables //****************************************************************************** static LPCTSTR g_szAppName = TEXT("Pocket UnZip"); static LPCTSTR g_szClass = TEXT("PocketUnZip"); static LPCTSTR g_szRegKey = TEXT("Software\\Pocket UnZip"); static LPCTSTR g_szTempDir = NULL; static HWND g_hWndList = NULL; static HWND g_hWndCmdBar = NULL; static int g_cyCm+q UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 =Y dBar = 0; static HFONT g_hFontBanner = NULL; static HICON g_hIconMain = NULL; static WNDPROC g_wpSaveAsDlg = NULL; static WNDPROC g_wpEdit = NULL; static int g_sortColumn = -1; static BOOL g_fExpandedView = FALSE; static BOOL g_fLoading = FALSE; static BOOL g_fSkipped = FALSE; static BOOL g_fViewing = FALSE; static HWND g_hWndWaitFor = NULL; static FILE_TYPE_NODE *g_pftHead = NULL; #ifdef _WIN32_WCE static LPCTSTR g_szHelpFile = TEXT("\\windows\\punzip.htp"); #else static TCHAR g_szTempDirPath[_MAX_PATH]; static LPCTSTR g_szHelpFile = TEXT("punzip.html"); #endif static COLUMN g_columns[] = { { TEXT("Name"), LVCFMT_LEFT }, { TEXT("Size"), LVCFMT_RIGHT }, { TEXT("Type"), LVCFMT_LEFT }, { TEXT("Modified"), LVCFMT_LEFT }, { TEXT("Attributes"), LVCFMT_LEFT }, { TEXT("Compressed"), LVCFMT_RIGHT }, { TEXT("Ratio"), LVCFMT_RIGHT }, { TEXT("Method"), LVCFMT_LEFT }, { TEXT("CRC"), LVCFMT_LEFT }, { TEXT("Comment"), LVCFMT_LEFT } }; //****************************************************************************** //***** Local Function Prototypes //****************************************************************************** // Startup and Shutdown Functions void InitializeApplication(LPCTSTR szZipFile); void ShutdownApplication(); void RegisterUnzip(); void BuildImageList(); // Our Main Window's Message Handler LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); // Event Handlers for our Main Window int OnCreate(); void OnFileOpen(); void OnActionView(); void OnActionSelectAll(); void OnViewExpandedView(); void OnHelp(); // Event Handlers for our List View void OnGetDispInfo(LV_DISPINFO *plvdi); void OnDeleteItem(NM_LISTVIEW *pnmlv); void OnItemChanged(NM_LISTVIEW *pnmlv); // List View Sort Functions void Sort(int sortColumn, BOOL fForce); int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM sortColumn); // Helper/Utility Functions void SetCaptionText(LPCTSTR szPrefix); void DrawBanner(HDC hdc); void AddDeleteColumns(); void ResizeColumns(); LPCTSTR GetZipErrorString(int error); void AddFileToListView(FILE_NODE *pFile); void EnableAllMenuItems(UINT uMenuItem, BOOL fEnabled); void CheckAllMenuItems(UINT uMenuItem, BOOL fChecked); void CenterWindow(HWND hWnd); void AddTextToEdit(LPCSTR szText); LPTSTR FormatValue(LPTSTR szValue, DWORD dwValue); LPTSTR BuildAttributesString(LPTSTR szBuffer, DWORD dwAttributes); LPCSTR BuildTypeString(FILE_NODE *pFile, LPSTR szType); LPCSTR GetFileFromPath(LPCSTR szPath); void ForwardSlashesToBackSlashesA(LPSTR szBuffer); #ifdef UNICODE void ForwardSlashesToBackSlashesW(LPWSTR szBuffer); # define ForwardSlashesToBackSlashes ForwardSlashesToBackSlashesW #else # define ForwardSlashesToBackSlashes ForwardSlashesToBackSlashesA #endif void DeleteDirectory(LPTSTR szPath); // Registry Functions void RegWriteKey(HKEY hKeyRoot, LPCTSTR szSubKey, LPCTSTR szValue); BOOL RegReadKey(HKEY hKeyRoot, LPCTSTR szSubKey, LPTSTR szValue, DWORD cBytes); void WriteOptionString(LPCTSTR szOption, LPCTSTR szValue); void WriteOptionInt(LPCTSTR szOption, DWORD dwValue); LPTSTR GetOptionString(LPCTSTR szOption, LPCTSTR szDefault, LPTSTR szValue, DWORD nSize); DWORD GetOptionInt(LPCTSTR szOption, DWORD dwDefault); // EDIT Control Subclass Functions void DisableEditing(HWND hWndEdit); LRESULT CALLBACK EditSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); // MRU Functions void InitializeMRU(); void AddFileToMRU(LPCSTR szFile); void RemoveFileFromMRU(LPCTSTR szFile); void ActivateMRU(UINT uIDItem); // Open Zip File Functions void ReadZipFileList(LPCTSTR wszPath); // Zip File Properties Dialog Functions BOOL CALLBACK DlgProcProperties(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void MergeValues(int *p1, int p2); void CheckThreeStateBox(HWND hDlg, int nIDButton, int state); // Extract/Test Dialog Functions void ExtractOrTestFiles(BOOL fExtract); BOOL CALLBACK DlgProcExtractOrTest(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // Folder Browsing Dialog Functions BOOL FolderBrowser(LPTSTR szPath, DWORD dwLength); BOOL CALLBACK DlgProcBrowser(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void SubclassSaveAsDlg(); // Extraction/Test/View Progress Dialog Functions BOOL CALLBACK DlgProcExtractProgress(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK DlgProcViewProgress(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void UpdateProgress(EXTRACT_INFO *pei, BOOL fFull); // Replace File Dialog Functions int PromptToReplace(LPCSTR szPath); BOOL CALLBACK DlgProcReplace(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // Password Dialog Functions BOOL CALLBACK DlgProcPassword(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // View Association Dialog Functions BOOL CALLBACK DlgProcViewAssociation(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // Comment Dialog Functions BOOL CALLBACK DlgProcComment(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // About Dialog Functions BOOL CALLBACK DlgProcAbout(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); //****************************************************************************** //***** WinMain - Our one and only entry point //****************************************************************************** // Entrypoint is a tiny bit different on Windows CE - UNICODE command line. #ifdef _WIN32_WCE extern "C" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) #else extern "C" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) #endif { // Wrap the whole ball of wax in a big exception handler. __try { // Store global instance handle. g_hInst = hInstance; // Create our banner font. We need to do this before creating our window. // This font handle will be deleted in ShutdownApplication(). LOGFONT lf; ZeroMemory(&lf, sizeof(lf)); lf.lfHeight = 16; lf.lfWeight = FW_BOLD; lf.lfCharSet = ANSI_CHARSET; lf.lfOutPrecision = OUT_DEFAULT_PRECIS; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfQuality = DEFAULT_QUALITY; lf.lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; _tcscpy(lf.lfFaceName, TEXT("MS Sans Serif")); g_hFontBanner = CreateFontIndirect(&lf); // Define the window class for our application's main window. WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); wc.lpszClassName = g_szClass; wc.hInstance = hInstance; wc.lpfnWndProc = WndProc; wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); TCHAR *szZipPath = NULL; #ifdef _WIN32_WCE // Get our main window's small icon. On Windows CE, we need to send ourself // a WM_SETICON in order for our task bar to update itself. g_hIconMain = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_UNZIP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); wc.hIcon = g_hIconMain; // On Windows CE, we only need the WS_VISIBLE flag. DWORD dwStyle = WS_VISIBLE; // Get and store command line file (if any). if (lpCmdLine && *lpCmdLine) { szZipPath = lpCmdLine; } #else // On NT we add a cursor, icon, and menu to our application's window class. wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hIcon,} UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 U = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_UNZIP)); wc.lpszMenuName = MAKEINTRESOURCE(IDR_UNZIP); // On Windows NT, we use the standard overlapped window style. DWORD dwStyle = WS_OVERLAPPEDWINDOW; TCHAR szBuffer[_MAX_PATH]; // Get and store command line file (if any). if (lpCmdLine && *lpCmdLine) { MBSTOTSTR(szBuffer, lpCmdLine, countof(szBuffer)); szZipPath = szBuffer; } #endif // Register our window class with the OS. if (!RegisterClass(&wc)) { DebugOut(TEXT("RegisterClass() failed [%u]"), GetLastError()); } // Create our main window using our registered window class. g_hWndMain = CreateWindow(wc.lpszClassName, g_szAppName, dwStyle, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); // Quit now if we failed to create our main window. if (!g_hWndMain) { DebugOut(TEXT("CreateWindow() failed [%u]"), GetLastError()); ShutdownApplication(); return 0; } // Make sure our window is visible. Really only needed for NT. ShowWindow(g_hWndMain, nCmdShow); // Load our keyboard accelerator shortcuts. MSG msg; HACCEL hAccel = LoadAccelerators(g_hInst, MAKEINTRESOURCE(IDR_UNZIP)); DWORD dwPaintFlags = 0; // The message pump. Loop until we get a WM_QUIT message. while (GetMessage(&msg, NULL, 0, 0)) { // Check to see if this is an accelerator and handle it if neccessary. if (!TranslateAccelerator(g_hWndMain, hAccel, &msg)) { // If a normal message, then dispatch it to the correct window. TranslateMessage(&msg); DispatchMessage(&msg); // Wait until our application is up and visible before trying to // initialize some of our structures and load any command line file. if ((msg.message == WM_PAINT) && (dwPaintFlags != 0x11)) { if (msg.hwnd == g_hWndWaitFor) { dwPaintFlags |= 0x01; } else if (msg.hwnd == g_hWndList) { dwPaintFlags |= 0x10; } if (dwPaintFlags == 0x11) { InitializeApplication((szZipPath && *szZipPath) ? szZipPath : NULL); } } } } // Clean up code. ShutdownApplication(); // Nice clean finish - were out of here. return msg.wParam; } __except(EXCEPTION_EXECUTE_HANDLER) { // Something very bad happened. Try our best to appear somewhat graceful. MessageBox(NULL, TEXT("An internal error occurred. Possible causes are that you are ") TEXT("out of memory, a ZIP file (if one is loaded) contains an ") TEXT("unexpected error, or there is a bug in our program (that's why ") TEXT("it's free). Pocket UnZip cannot continue. It will exit now, ") TEXT("but you may restart it and try again.\n\n") TEXT("If the problem persists, please write to stevemil@pobox.com with ") TEXT("any information that might help track down the problem."), g_szAppName, MB_ICONERROR | MB_OK); } return 1; } //****************************************************************************** //***** Startup and Shutdown Functions //****************************************************************************** void InitializeApplication(LPCTSTR szZipFile) { // This function is called after our class is registered and all our windows // are created and visible to the user. // Show hour glass cursor. HCURSOR hCur = SetCursor(LoadCursor(NULL, IDC_WAIT)); // Register UnZip in the registry to handle ".ZIP" files. RegisterUnzip(); // Enumerate the system file assoications and build an image list. BuildImageList(); // Load our initial MRU into our menu. InitializeMRU(); // Restore/remove our cursor. SetCursor(hCur); // Clear our initialization window handle. g_hWndWaitFor = NULL; // Load our command line file if one was specified. Otherwise, just update // our banner to show that no file is loaded. if (szZipFile) { ReadZipFileList(szZipFile); } else { DrawBanner(NULL); } // Enable some controls. EnableAllMenuItems(IDM_FILE_OPEN, TRUE); EnableAllMenuItems(IDM_FILE_CLOSE, TRUE); EnableAllMenuItems(IDM_VIEW_EXPANDED_VIEW, TRUE); EnableAllMenuItems(IDM_HELP_ABOUT, TRUE); // Set our temporary directory. #ifdef _WIN32_WCE g_szTempDir = TEXT("\\Temporary Pocket UnZip Files"); #else g_szTempDir = TEXT("C:\\Temporary Pocket UnZip Files"); // Set the drive to be the same drive as the OS installation is on. if (GetWindowsDirectory(g_szTempDirPath, countof(g_szTempDirPath))) { lstrcpy(g_szTempDirPath + 3, TEXT("Temporary Pocket UnZip Files")); g_szTempDir = g_szTempDirPath; } #endif } //****************************************************************************** void ShutdownApplication() { // Free our banner font. if (g_hFontBanner) { DeleteObject(g_hFontBanner); g_hFontBanner = NULL; } // Delete our FILE_TYPE_NODE linked list. for (FILE_TYPE_NODE *pft = g_pftHead; pft; ) { FILE_TYPE_NODE *pftNext = pft->pNext; delete[] (BYTE*)pft; pft = pftNext; } g_pftHead = NULL; // If there are no other instances of our application open, then delete our // temporary directory and all the files in it. Any files opened for viewing // should be locked and will fail to delete. This is to be expected. if (g_szTempDir && (FindWindow(g_szClass, NULL) == NULL)) { TCHAR szPath[_MAX_PATH]; _tcscpy(szPath, g_szTempDir); DeleteDirectory(szPath); } } //****************************************************************************** void RegisterUnzip() { #ifdef _WIN32_WCE // WARNING! Since Windows CE does not support any way to get your binary's // name at runtime, we have to hard-code in "punzip.exe". If our binary is // not named this or is in a non-path directory, then we will fail to // register ourself with the system as the default application to handle // ".zip" files. TCHAR szPath[32] = TEXT("punzip.exe"); TCHAR szTstPath[32]; #else // Get our module's path and file name. We use the short path name for the // registry because it is guaranteed to contain no spaces. TCHAR szLongPath[_MAX_PATH]; TCHAR szPath[_MAX_PATH]; TCHAR szTstPath[_MAX_PATH]; GetModuleFileName(NULL, szLongPath, countof(szLongPath)); GetShortPathName(szLongPath, szPath, countof(szPath)); #endif // Store a pointer to the end of our path for easy appending. LPTSTR szEnd = szPath + _tcslen(szPath); BOOL fDoRegisterPUnZip = TRUE; // Associate "ZIP" file extensions to our application if (RegReadKey(HKEY_CLASSES_ROOT, TEXT(".zip"), szTstPath, sizeof(szTstPath))) { if (_tcscmp(szTstPath, TEXT("zipfile")) != 0) fDoRegisterPUnZip = FALSE; else if (RegReadKey(HKEY_CLASSES_ROOT, TEXT("zipfile\\shell\\Open\\command"), szTstPath, sizeof(szTstPath)) && (_tcsncmp(szTstPath, szPath, _tcslen(szPath)) != 0)) fDoRegisterPUnZip = FALSE; if (!fDoRegisterPUnZip) { fDoRegisterPUnZip = (IDOK == MessageBox(g_hWndMain, TEXT("Currently, Pocket UnZip is not registered as default ") -/%J UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 v* TEXT("handler for Zip archives.\n\n") TEXT("Please, confirm that Pocket UnZip should now register itself ") TEXT("as default application for handling Zip archives (.zip files)"), g_szAppName, MB_ICONQUESTION | MB_OKCANCEL)); } } if (fDoRegisterPUnZip) { RegWriteKey(HKEY_CLASSES_ROOT, TEXT(".zip"), TEXT("zipfile")); RegWriteKey(HKEY_CLASSES_ROOT, TEXT("zipfile"), TEXT("ZIP File")); RegWriteKey(HKEY_CLASSES_ROOT, TEXT("zipfile\\shell"), NULL); RegWriteKey(HKEY_CLASSES_ROOT, TEXT("zipfile\\shell\\Open"), NULL); _tcscpy(szEnd, TEXT(" %1")); RegWriteKey(HKEY_CLASSES_ROOT, TEXT("zipfile\\shell\\Open\\command"), szPath); // Register our program icon for all ZIP files. _stprintf(szEnd, TEXT(",-%u"), IDI_ZIPFILE); RegWriteKey(HKEY_CLASSES_ROOT, TEXT("zipfile\\DefaultIcon"), szPath); } // Create our application option location. RegWriteKey(HKEY_CURRENT_USER, TEXT("Software"), NULL); RegWriteKey(HKEY_CURRENT_USER, g_szRegKey, NULL); } //****************************************************************************** void BuildImageList() { // Create our global image list. #ifdef _WIN32_WCE // On Windows CE, we can't spare a color for the mask, so we have to create // the mask in a separate monochrome bitmap. HIMAGELIST hil = ImageList_Create(16, 16, ILC_COLOR | ILC_MASK, 8, 8); // Load our default bitmaps into the image list. HBITMAP hBmpImageList = LoadBitmap(g_hInst, MAKEINTRESOURCE(IDB_IMAGELIST)); HBITMAP hBmpMask = LoadBitmap(g_hInst, MAKEINTRESOURCE(IDB_IMAGELIST_MASK)); ImageList_Add(hil, hBmpImageList, hBmpMask); DeleteObject(hBmpImageList); DeleteObject(hBmpMask); #else // On Windows NT, we use magenta as a transparency mask color. HIMAGELIST hil = ImageList_LoadBitmap(g_hInst, MAKEINTRESOURCE(IDB_IMAGELIST), 16, 8, RGB(255, 0, 255)); #endif // Set up for our registry file type enumeration. FILE_TYPE_NODE *pftLast = NULL; TCHAR szExtension[128], szKey[128], szDescription[_MAX_PATH], szIconFile[_MAX_PATH + 16]; DWORD dwIndex = 0, dwCount = countof(szExtension); // Enumerate all the keys immediately under HKEY_CLASSES_ROOT. while (ERROR_SUCCESS == RegEnumKeyEx(HKEY_CLASSES_ROOT, dwIndex++, szExtension, &dwCount, NULL, NULL, NULL, NULL)) { dwCount = countof(szExtension); // Check to see if we read an extension key (starts with a period) if (*szExtension != TEXT('.')) { continue; } // Read the actual key name for this extension. if (!RegReadKey(HKEY_CLASSES_ROOT, szExtension, szKey, sizeof(szKey))) { continue; } // Read the Description for this extension. RegReadKey(HKEY_CLASSES_ROOT, szKey, szDescription, sizeof(szDescription)); HICON hIcon = NULL; LPTSTR szEnd = szKey + _tcslen(szKey); // Attempt to get an icon for this extension from the "DefaultIcon" key. _tcscpy(szEnd, TEXT("\\DefaultIcon")); if (RegReadKey(HKEY_CLASSES_ROOT, szKey, szIconFile, sizeof(szIconFile))) { // Look for the comma between the file name and the image. LPTSTR szImageId = _tcschr(szIconFile, TEXT(',')); if (szImageId) { // NULL terminate the file name portion of szIconFile. *(szImageId++) = TEXT('\0'); // Get the image ID value from szIconFile. int imageId = _ttoi(szImageId); // Extract the icon from the module specified in szIconFile. ExtractIconEx(szIconFile, imageId, NULL, &hIcon, 1); if (hIcon == NULL) { ExtractIconEx(szIconFile, imageId, &hIcon, NULL, 1); } } } // If we failed to get the icon using the "DefaultIcon" key, then try // using the "shell\Open\command" key. if (hIcon == NULL) { _tcscpy(szEnd, TEXT("\\shell\\Open\\command")); if (RegReadKey(HKEY_CLASSES_ROOT, szKey, szIconFile, sizeof(szIconFile))) { // Get a pointer to just the binary - strip quotes and spaces. LPTSTR szPath; if (*szIconFile == TEXT('\"')) { szPath = szIconFile + 1; if (szEnd = _tcschr(szPath, TEXT('\"'))) { *szEnd = TEXT('\0'); } } else { szPath = szIconFile; if (szEnd = _tcschr(szPath, TEXT(' '))) { *szEnd = TEXT('\0'); } } // Extract the icon from the module specified in szIconFile. ExtractIconEx(szPath, 0, NULL, &hIcon, 1); if (hIcon == NULL) { ExtractIconEx(szPath, 0, &hIcon, NULL, 1); } } } // If we found an icon, add it to our image list. int image = -1; if (hIcon) { image = ImageList_AddIcon(hil, hIcon); } // If no icon could be found, then check to see if this is an executable. if ((image == -1) && ( #ifndef _WIN32_WCE // Windows CE only recognizes EXE's as executable. !_tcsicmp(szExtension + 1, TEXT("bat")) || !_tcsicmp(szExtension + 1, TEXT("cmd")) || !_tcsicmp(szExtension + 1, TEXT("com")) || #endif !_tcsicmp(szExtension + 1, TEXT("exe")))) { image = IMAGE_APPLICATION; } // If we don't have a description or a icon, then bail on this extension. if (!*szDescription && (image < 0)) { continue; } // Create our FILE_TYPE_NODE. size_t length = _tcslen(szExtension) - 1 + _tcslen(szDescription); FILE_TYPE_NODE *pft = (FILE_TYPE_NODE*) new BYTE[ sizeof(FILE_TYPE_NODE) + (sizeof(TCHAR) * length)]; // Bail out if we could not create our node. if (!pft) { DebugOut(TEXT("Not enough memory to create a FILE_TYPE_NODE.")); continue; } // Fill in the node. pft->pNext = NULL; pft->image = (image >= 0) ? image : IMAGE_GENERIC; TSTRTOMBS(pft->szExtAndDesc, szExtension + 1, length + 2); size_t sizext = (strlen(pft->szExtAndDesc) + 1); TSTRTOMBS(pft->szExtAndDesc + sizext, szDescription, length - sizext + 2); // Add the node to our list. if (pftLast) { pftLast->pNext = pft; } else { g_pftHead = pft; } pftLast = pft; } // Assign this image list to our tree control. ListView_SetImageList(g_hWndList, hil, LVSIL_SMALL); } //****************************************************************************** //***** Our Main Window's Message Handler //****************************************************************************** LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_CREATE: g_hWndMain = hWnd; return OnCreate(); case WM_ERASEBKGND: DrawBanner((HDC)wParam); return 0; case WM_SIZE: // Resize our list view control to match our client area. MoveWindow(g_hWndList, 0, g_cyCmdBar + 22, LOWORD(lParam), HIWORD(lParam) - (g_cyCmdBar + 22), TRUE); #ifndef _WIN32_WCE // On NT we have to resize our toolbar as well. MoveWindow(g_hWndCmdBar, 0, 0, LOWORD(lParam), g_cyCmdBar, TRUE); #endif return 0; case WM_SETFOCUS: // Always direct focus to our list control. SetFocus(g_hWnd./:Zg ~kak!{! N)h) NB W,_NBW 7 w8f{BAWGP{Ga4)qbTVh81WY2='\ |T{'I-*&2Ro$Z26k5v+LV{;L oN)gq 2O |fH'K(@ gr6 eW6n)s^f'O8xx (M:fS be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.h_M@=_MV*D13C(9,Ii Dm+/gbD@ *q3mxZUzZm=dP##nbi 2]f4 ZPZbc  ~e1f9\Ok{ R$LOEx=ZroyM& bQ18Aq *^pv~U-oZ nX!@EXZC bgs /4g!m+P%qWqp; )E\X-1"H EE q*,[$OU|)/y`kO>N{U;~OSCw*Ju83I$&,xxmuVjx1]]WcbY\.\ALoPe~&]Fl_-,-^1[~YX$\8r =W ;C]=]1YH"kfO-yA$! #n}OM_i#Gll <|\GCiQ}>x6p"[L#8le 6pye Gj@V{L|;FRK_I)tFJ|b EkYS{XnwMs/0 G.!7)&I1>0!huSlk[ I,i ptA$96D|/euF93 L`l)?b-K)Mtl8Q* ;p8t0 l,37a [B pf *363~}V8x~t`o6`}4 *a/c2{?YK*D,tQ-V&&Xad_zgi.ZCm/3:~8+g76wsukTgU&@vvIk-b~5rs7uX!:oa0 6bE d^C}.P}" JR (D]|IDOVM"rgJ kf2@Yv '"0>QTr ~L_l"ex p8*>CJ  Tjh4Q1}M`G} Foa%tK.]l5T0Yzf|{6my qjyLM* X}u"byBW)&~,'J^!n[QO&f j{z2Hd!"B.=-I^mGZ/jWXe sUA(ŻI3_{P)/auQFEATJ,XUG$zCWZWNZ,Io`l31`9Zp}}{D]q M 7+CRt%4,-l;%"wC$v(Kb5?~dBz7q pGV }OLz!@ NXh yKbItaN F Z Y60%R>Ux?z~JG:UHS5f.Uu"R8(&QEX]ZOzCF96*n4R;w1\ ;l36:&VAUCoL1M CrZ"X?tXoo>:Il ~ +C:#7D%Dih3h{ OxH-V_MVl J &|u8z;n+QS;t6'Qb@ 0\]Mg=u 9R\tJ+\,`jCMD^|5+ wu6"D/) UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 O9List); return 0; case WM_DESTROY: PostQuitMessage(0); return 0; case WM_HELP: OnHelp(); return 0; case WM_PRIVATE: switch (wParam) { #ifdef _WIN32_WCE case MSG_SUBCLASS_DIALOG: SubclassSaveAsDlg(); return 0; #endif case MSG_ADD_TEXT_TO_EDIT: AddTextToEdit((LPCSTR)lParam); return 0; case MSG_PROMPT_TO_REPLACE: return PromptToReplace((LPCSTR)lParam); #if CRYPT case MSG_PROMPT_FOR_PASSWORD: return DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_PASSWORD), g_hDlgProgress, (DLGPROC)DlgProcPassword, lParam); #endif case MSG_UPDATE_PROGRESS_PARTIAL: UpdateProgress((EXTRACT_INFO*)lParam, FALSE); return 0; case MSG_UPDATE_PROGRESS_COMPLETE: UpdateProgress((EXTRACT_INFO*)lParam, TRUE); return 0; } return 0; case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case LVN_GETDISPINFO: OnGetDispInfo((LV_DISPINFO*)lParam); return 0; case LVN_DELETEITEM: OnDeleteItem((NM_LISTVIEW*)lParam); return 0; case LVN_COLUMNCLICK: Sort(((NM_LISTVIEW*)lParam)->iSubItem, FALSE); return 0; case LVN_ITEMCHANGED: OnItemChanged((NM_LISTVIEW*)lParam); return 0; case NM_DBLCLK: case NM_RETURN: OnActionView(); return 0; } return 0; case WM_COMMAND: switch (LOWORD(wParam)) { case IDM_FILE_OPEN: OnFileOpen(); return 0; case IDM_FILE_PROPERTIES: DialogBox(g_hInst, MAKEINTRESOURCE(IDD_PROPERTIES), hWnd, (DLGPROC)DlgProcProperties); return 0; case IDM_FILE_CLOSE: SendMessage(hWnd, WM_CLOSE, 0, 0); return 0; case IDM_ACTION_EXTRACT_ALL: OnActionSelectAll(); // Fall through to IDM_ACTION_EXTRACT case IDM_ACTION_EXTRACT: ExtractOrTestFiles(TRUE); return 0; case IDM_ACTION_TEST_ALL: OnActionSelectAll(); // Fall through to IDM_ACTION_TEST case IDM_ACTION_TEST: ExtractOrTestFiles(FALSE); return 0; case IDM_ACTION_VIEW: OnActionView(); return 0; case IDM_ACTION_SELECT_ALL: OnActionSelectAll(); return 0; case IDM_VIEW_EXPANDED_VIEW: OnViewExpandedView(); return 0; case IDM_VIEW_COMMENT: DialogBox(g_hInst, MAKEINTRESOURCE(IDD_COMMENT), hWnd, (DLGPROC)DlgProcComment); return 0; case IDM_HELP_ABOUT: DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ABOUT), hWnd, (DLGPROC)DlgProcAbout); return 0; case IDHELP: return SendMessage(hWnd, WM_HELP, 0, 0); default: // Check to see if a MRU file was selected. if ((LOWORD(wParam) >= MRU_START_ID) && (LOWORD(wParam) < (MRU_START_ID + MRU_MAX_FILE))) { ActivateMRU(LOWORD(wParam)); } } } return DefWindowProc(hWnd, uMsg, wParam, lParam); } //****************************************************************************** //***** Event Handlers for our Main Window //****************************************************************************** int OnCreate() { // Our toolbar buttons. static TBBUTTON tbButton[] = { { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 0, IDM_FILE_OPEN, 0, TBSTYLE_BUATTON, 0, 0, 0, -1 }, { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 1, IDM_FILE_PROPERTIES, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 2, IDM_ACTION_EXTRACT, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 3, IDM_ACTION_EXTRACT_ALL, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 4, IDM_ACTION_TEST, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 5, IDM_ACTION_TEST_ALL, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 6, IDM_ACTION_VIEW, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 0, 0, 0, TBSTYLE_SEP, 0, 0, 0, -1 }, { 7, IDM_VIEW_EXPANDED_VIEW, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 }, { 8, IDM_VIEW_COMMENT, 0, TBSTYLE_BUTTON, 0, 0, 0, -1 } }; // Our toolbar buttons' tool tip text. static LPTSTR szToolTips[] = { TEXT(""), // Menu TEXT("Open (Ctrl+O)"), TEXT("Properties (Alt+Enter)"), TEXT("Extract Selected Files"), TEXT("Extract All Files"), TEXT("Test Selected Files"), TEXT("Test All Files"), TEXT("View Selected File"), TEXT("Expanded View"), TEXT("View Zip File Comment") }; // Initialize the common controls. InitCommonControls(); // Check to see if we have a help file. BOOL fHelp = (GetFileAttributes(g_szHelpFile) != 0xFFFFFFFF); // Set our window's icon so it can update the task bar. if (g_hIconMain) { SendMessage(g_hWndMain, WM_SETICON, FALSE, (LPARAM)g_hIconMain); } // Create the tree control. Our main window will resize it to fit. g_hWndList = CreateWindow(WC_LISTVIEW, TEXT(""), WS_VSCROLL | WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SHOWSELALWAYS, 0, 0, 0, 0, g_hWndMain, NULL, g_hInst, NULL); #ifdef _WIN32_WCE // Create a command bar and add the toolbar bitmaps to it. g_hWndCmdBar = CommandBar_Create(g_hInst, g_hWndMain, 1); CommandBar_AddBitmap(g_hWndCmdBar, g_hInst, IDB_TOOLBAR, 9, 16, 16); CommandBar_InsertMenubar(g_hWndCmdBar, g_hInst, IDR_UNZIP, 0); CommandBar_AddButtons(g_hWndCmdBar, countof(tbButton), tbButton); CommandBar_AddAdornments(g_hWndCmdBar, fHelp ? CMDBAR_HELP : 0, 0); // Add tool tips to the tool bar. CommandBar_AddToolTips(g_hWndCmdBar, countof(szToolTips), szToolTips); // Store the height of the command bar for later calculations. g_cyCmdBar = CommandBar_Height(g_hWndCmdBar); // We set our wait window handle to our menu window within our command bar. // This is the last window that will be painted during startup of our app. g_hWndWaitFor = GetWindow(g_hWndCmdBar, GW_CHILD); // Add the help item to our help menu if we have a help file. if (fHelp) { HMENU hMenu = GetSubMenu(CommandBar_GetMenu(g_hWndCmdBar, 0), 3); InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); InsertMenu(hMenu, 0, MF_BYPOSITION | MF_ENABLED, IDHELP, TEXT("&Help")); } #else // Create a tool bar and add the toolbar bitmaps to it. g_hWndCmdBar = CreateToolbarEx(g_hWndMain, WS_CHILD | WS_VISIBLE | TBSTYLE_TOOLTIPS, 1, 9, g_hInst, IDB_TOOLBAR, tbButton, countof(tbButton), 16, 16, 16, 16, sizeof(TBBUTTON)); // Get our tool tip control. HWND hWndTT = (HWND)SendMessage(g0ܨ} UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 fH_hWndCmdBar, TB_GETTOOLTIPS, 0, 0); // Set our tool tip strings. TOOLINFO ti; ti.cbSize = sizeof(ti); int tip = 0, button; while (SendMessage(hWndTT, TTM_ENUMTOOLS, tip++, (LPARAM)&ti)) { for (button = 0; button < countof(tbButton); button++) { if (tbButton[button].idCommand == (int)ti.uId) { ti.lpszText = szToolTips[tbButton[button].iBitmap + 1]; SendMessage(hWndTT, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); break; } } } // Store the height of the tool bar for later calculations. RECT rc; GetWindowRect(g_hWndCmdBar, &rc); g_cyCmdBar = rc.bottom - rc.top; // We set our wait window handle to our toolbar. // This is the last window that will be painted during the startup of our app. g_hWndWaitFor = g_hWndCmdBar; // Add the help item to our help menu if we have a help file. if (fHelp) { HMENU hMenu = GetSubMenu(GetMenu(g_hWndMain), 3); InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); InsertMenu(hMenu, 0, MF_BYPOSITION | MF_ENABLED, IDHELP, TEXT("&Help\tF1")); } #endif // _WIN32_WCE // Enable Full Row Select - This feature is supported on Windows CE and was // introduced to Win95/NT with IE 3.0. If the user does not have a // COMCTL32.DLL that supports this feature, then they will just see the // old standard First Column Select. SendMessage(g_hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | SendMessage(g_hWndList, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)); // Get our expanded view option from the registry. g_fExpandedView = GetOptionInt(TEXT("ExpandedView"), FALSE); // Show or remove menu check for expanded view option. CheckAllMenuItems(IDM_VIEW_EXPANDED_VIEW, g_fExpandedView); // Create our columns. AddDeleteColumns(); // Set our current sort column to our name column Sort(0, TRUE); return 0; } //****************************************************************************** void OnFileOpen() { TCHAR szPath[_MAX_PATH] = TEXT(""); OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = g_hWndMain; ofn.hInstance = g_hInst; ofn.lpstrFilter = TEXT("ZIP files (*.zip)\0*.zip\0SFX files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0"); ofn.nFilterIndex = 1; ofn.lpstrFile = szPath; ofn.nMaxFile = countof(szPath); ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; ofn.lpstrDefExt = TEXT("zip"); if (GetOpenFileName(&ofn)) { ReadZipFileList(szPath); } } //****************************************************************************** void OnActionView() { // We only allow a view if one item is selected. int count = ListView_GetSelectedCount(g_hWndList); if (count != 1) { return; } // Query the selected item for its FILE_NODE. LV_ITEM lvi; ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_IMAGE | LVIF_PARAM; lvi.iItem = ListView_GetNextItem(g_hWndList, -1, LVNI_SELECTED); ListView_GetItem(g_hWndList, &lvi); FILE_NODE *pfn = (FILE_NODE*)lvi.lParam; // Bail out if the selected item is a folder or volume label. if (pfn->dwAttributes & (FILE_ATTRIBUTE_DIRECTORY | ZFILE_ATTRIBUTE_VOLUME)) { MessageBox(g_hWndMain, TEXT("You cannot view folders or volume labels."), g_szAppName, MB_ICONINFORMATION | MB_OK); return; } // Make sure our temporary directory exists. CreateDirectory(g_szTempDir, NULL); TCHAR szPath[_MAX_PATH + 256]; // Set our extraction directory to our temporary directory. if (!SetExtractToDirectory((LPTSTR)g_szTempDir)) { // Create error message. Use szPath buffer because it is handy. _stprintf(szPath, TEXT("Could not create \"%s\"\n\n") TEXT("Most likely cause is that your drive is full."), g_szTempDir); // Display error message. MessageBox(g_hWndMain, szPath, g_szAppName, MB_ICONERROR | MB_OK); return; } // Create our single item file array. CHAR *argv[2] = { pfn->szPathAndMethod, NULL }; // Create a buffer to store the mapped name of the file. If the has to be // renamed to be compatible with our file system, then we need to know that // new name in order to open it correctly. CHAR szMappedPath[_MAX_PATH]; *szMappedPath = '\0'; // Configure our extract structure. EXTRACT_INFO ei; ZeroMemory(&ei, sizeof(ei)); ei.fExtract = TRUE; ei.dwFileCount = 1; ei.dwByteCount = pfn->dwSize; ei.szFileList = argv; ei.fRestorePaths = FALSE; ei.overwriteMode = OM_PROMPT; ei.szMappedPath = szMappedPath; // Clear our skipped flag and set our viewing flag. g_fSkipped = FALSE; g_fViewing = TRUE; // Display our progress dialog and do the extraction. DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_VIEW_PROGRESS), g_hWndMain, (DLGPROC)DlgProcViewProgress, (LPARAM)&ei); // Clear our viewing flag. g_fViewing = FALSE; // Check to see if the user skipped the file by aborting the decryption or // overwrite prompts. The only other case that causes us to skip a file // is when the user enters the incorrect password too many times. In this // case, IZ_BADPWD will be returned. if (g_fSkipped) { return; } if (ei.result == IZ_BADPWD) { MessageBox(g_hWndMain, TEXT("Password was incorrect. The file has been skipped."), g_szAppName, MB_ICONWARNING | MB_OK); return; } // Check to see if the extraction failed. if (ei.result != PK_OK) { if (ei.result == PK_ABORTED) { _tcscpy(szPath, GetZipErrorString(ei.result)); } else { // Create error message. Use szPath buffer because it is handy. _stprintf(szPath, #ifdef UNICODE TEXT("Could not extract \"%S\".\n\n%s\n\nTry using the Test or ") #else TEXT("Could not extract \"%s\".\n\n%s\n\nTry using the Test or ") #endif TEXT("Extract action on the file for more details."), *szMappedPath ? szMappedPath : pfn->szPathAndMethod, GetZipErrorString(ei.result)); } // Display error message. MessageBox(g_hWndMain, szPath, g_szAppName, MB_ICONERROR | MB_OK); // If we managed to create a bad file, then delete it. if (*szMappedPath) { MBSTOTSTR(szPath, szMappedPath, countof(szPath)); SetFileAttributes(szPath, FILE_ATTRIBUTE_NORMAL); if (!DeleteFile(szPath)) { SetFileAttributes(szPath, FILE_ATTRIBUTE_READONLY); } } return; } // Convert the file name to UNICODE. MBSTOTSTR(szPath, szMappedPath, countof(szPath)); // Prepare to launch the file. SHELLEXECUTEINFO sei; ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); sei.hwnd = g_hWndMain; sei.lpDirectory = g_szTempDir; sei.nShow = SW_SHOWNORMAL; #ifdef _WIN32_WCE TCHAR szApp[_MAX_PATH]; // On Windows CE, there is no default file association dialog that appears // when ShellExecuteEx() is given an unknown file type. We check to see if // file is unknown, and display our own file association prompt. // Check our file image to see if this file has no associated viewer. if (lvi.iImage == IMAGE_GENERIC) { // Display our file association prompt dialog. if (IDOK != DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_VIEW_ASSOCIATION), g_hWndMain, (DLGPROC)DlgProcViewAssociation, (LPARAM)szApp)) { 1n$ UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 .W // If the user aborted the association prompt, then delete file and exit. SetFileAttributes(szPath, FILE_ATTRIBUTE_NORMAL); if (!DeleteFile(szPath)) { SetFileAttributes(szPath, FILE_ATTRIBUTE_READONLY); } return; } // Set the file to be the viewer app and the parameters to be the file. // Note: Some applications require that arguments with spaces be quoted, // while other applications choked when quotes we part of the filename. // In the end, it seems safer to leave the quotes off. sei.lpFile = szApp; sei.lpParameters = szPath; } else { sei.lpFile = szPath; } #else // On NT, ShellExecuteEx() will prompt user for association if needed. sei.lpFile = szPath; #endif // Launch the file. All errors will be displayed by ShellExecuteEx(). ShellExecuteEx(&sei); } //****************************************************************************** void OnActionSelectAll() { for (int i = ListView_GetItemCount(g_hWndList) - 1; i >= 0; i--) { ListView_SetItemState(g_hWndList, i, LVIS_SELECTED, LVIS_SELECTED); } } //****************************************************************************** void OnViewExpandedView() { // Toggle our expanded view option. g_fExpandedView = !g_fExpandedView; // Show or remove menu check and toolbar button press. CheckAllMenuItems(IDM_VIEW_EXPANDED_VIEW, g_fExpandedView); // Display the new columns. AddDeleteColumns(); // Re-sort if we just did away with out sort column. if (!g_fExpandedView && (g_sortColumn > 3)) { Sort(0, TRUE); } // Write our expanded view option to the registry. WriteOptionInt(TEXT("ExpandedView"), g_fExpandedView); } //****************************************************************************** void OnHelp() { // Prepare to launch the help file. SHELLEXECUTEINFO sei; ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); sei.hwnd = g_hWndMain; sei.lpFile = g_szHelpFile; // Launch the file. ShellExecuteEx(&sei); } //****************************************************************************** //***** Event Handlers for our List View //****************************************************************************** void OnGetDispInfo(LV_DISPINFO *plvdi) { // Make sure we have the minimum amount of data to process this event. if ((plvdi->item.iItem < 0) || !plvdi->item.lParam || !plvdi->item.pszText) { return; } // Get a pointer to the file node for this item. FILE_NODE *pFile = (FILE_NODE*)plvdi->item.lParam; CHAR szBuffer[_MAX_PATH * 2]; switch (plvdi->item.iSubItem) { case 0: // Name // Copy the string to a new string while removing all non-printables. fnfilter(pFile->szPathAndMethod, (uch*)szBuffer); // Change all forward slashes to back slashes in the buffer ForwardSlashesToBackSlashesA(szBuffer); // Convert the string to UNICODE and store it in our list control. MBSTOTSTR(plvdi->item.pszText, szBuffer, plvdi->item.cchTextMax); return; case 1: // Size FormatValue(plvdi->item.pszText, pFile->dwSize); return; case 2: // Type MBSTOTSTR(plvdi->item.pszText, BuildTypeString(pFile, szBuffer), plvdi->item.cchTextMax); return; case 3: // Modified int hour; hour = (pFile->dwModified >> 6) & 0x001F; _stprintf(plvdi->item.pszText, TEXT("%u/%u/%u %u:%02u %cM"), (pFile->dwModified >> 16) & 0x000F, (pFile->dwModified >> 11) & 0x001F, ((pFile->dwModified >> 20) & 0x0FFF) % 100, (hour % 12) ? (hour % 12) : 12, pFile->dwModified & 0x003F, hour >= 12 ? 'P' : 'A'); return; case 4: // Attributes BuildAttributesString(plvdi->item.pszText, pFile->dwAttributes); return; case 5: // Compressed FormatValue(plvdi->item.pszText, pFile->dwCompressedSize); return; case 6: // Ratio int factor; factor = ratio(pFile->dwSize, pFile->dwCompressedSize); _stprintf(plvdi->item.pszText, TEXT("%d.%d%%"), factor / 10, ((factor < 0) ? -factor : factor) % 10); return; case 7: // Method MBSTOTSTR(plvdi->item.pszText, pFile->szPathAndMethod + strlen(pFile->szPathAndMethod) + 1, plvdi->item.cchTextMax); return; case 8: // CRC _stprintf(plvdi->item.pszText, TEXT("%08X"), pFile->dwCRC); return; case 9: // Comment MBSTOTSTR(plvdi->item.pszText, pFile->szComment ? pFile->szComment : "", plvdi->item.cchTextMax); return; } } //****************************************************************************** void OnDeleteItem(NM_LISTVIEW *pnmlv) { if (pnmlv->lParam) { // Free any comment string associated with this item. if (((FILE_NODE*)pnmlv->lParam)->szComment) { delete[] (CHAR*)((FILE_NODE*)pnmlv->lParam)->szComment; } // Free the item itself. delete[] (LPBYTE)pnmlv->lParam; } } //****************************************************************************** void OnItemChanged(NM_LISTVIEW *pnmlv) { int count = ListView_GetSelectedCount(pnmlv->hdr.hwndFrom); EnableAllMenuItems(IDM_FILE_PROPERTIES, count > 0); EnableAllMenuItems(IDM_ACTION_EXTRACT, count > 0); EnableAllMenuItems(IDM_ACTION_TEST, count > 0); EnableAllMenuItems(IDM_ACTION_VIEW, count == 1); } //****************************************************************************** //***** List View Sort Functions //****************************************************************************** void Sort(int sortColumn, BOOL fForce) { // Do not change the column header text if it is already correct. if (sortColumn != g_sortColumn) { TCHAR szColumn[32]; LV_COLUMN lvc; lvc.mask = LVCF_TEXT; lvc.pszText = szColumn; // Remove the '^' from the current sort column. if (g_sortColumn != -1) { _stprintf(szColumn, (g_columns[g_sortColumn].format == LVCFMT_LEFT) ? TEXT("%s ") : TEXT(" %s"), g_columns[g_sortColumn].szName); ListView_SetColumn(g_hWndList, g_sortColumn, &lvc); } // Set the new sort column. g_sortColumn = sortColumn; // Add the '^' to the new sort column. _stprintf(szColumn, (g_columns[g_sortColumn].format == LVCFMT_LEFT) ? TEXT("%s ^") : TEXT("^ %s"), g_columns[g_sortColumn].szName); ListView_SetColumn(g_hWndList, g_sortColumn, &lvc); // Sort the list by the new column. ListView_SortItems(g_hWndList, CompareFunc, g_sortColumn); } else if (fForce) { // Force the list to sort by the same column. ListView_SortItems(g_hWndList, CompareFunc, g_sortColumn); } } //****************************************************************************** int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM sortColumn) { FILE_NODE *pFile1 = (FILE_NODE*)lParam1, *pFile2 = (FILE_NODE*)lParam2; TCHAR szBuffer1[8], szBuffer2[8]; // Return Negative value if the first item should precede the second. // Return Positive value if the first item should follow the second. // Return Zero if the two items are equivalent. int result = 0; // Compute the relationship based on the current sort column switch (sortColumn) { case 1: // Size - Smallest to Largest if (pFile1->dwSize 2j UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 f!= pFile2->dwSize) { result = ((pFile1->dwSize < pFile2->dwSize) ? -1 : 1); } break; case 2: { // Type - Volume Label's first, then directories, then files int f1 = (pFile1->dwAttributes & ZFILE_ATTRIBUTE_VOLUME) ? 1 : (pFile1->dwAttributes & FILE_ATTRIBUTE_DIRECTORY) ? 2 : 3; int f2 = (pFile2->dwAttributes & ZFILE_ATTRIBUTE_VOLUME) ? 1 : (pFile2->dwAttributes & FILE_ATTRIBUTE_DIRECTORY) ? 2 : 3; if ((f1 == 3) && (f2 == 3)) { CHAR szType1[128]; CHAR szType2[128]; result = _stricmp(BuildTypeString(pFile1, szType1), BuildTypeString(pFile2, szType2)); } else { result = f1 - f2; } break; } case 3: // Modified - Newest to Oldest if (pFile1->dwModified != pFile2->dwModified) { result = ((pFile1->dwModified > pFile2->dwModified) ? -1 : 1); } break; case 4: // Attributes - String Sort result = _tcscmp(BuildAttributesString(szBuffer1, pFile1->dwAttributes), BuildAttributesString(szBuffer2, pFile2->dwAttributes)); break; case 5: // Compressed Size - Smallest to Largest if (pFile1->dwCompressedSize != pFile2->dwCompressedSize) { result = ((pFile1->dwCompressedSize < pFile2->dwCompressedSize) ? -1 : 1); } break; case 6: // Ratio - Smallest to Largest int factor1, factor2; factor1 = ratio(pFile1->dwSize, pFile1->dwCompressedSize); factor2 = ratio(pFile2->dwSize, pFile2->dwCompressedSize); result = factor1 - factor2; break; case 7: // Method - String Sort result = _stricmp(pFile1->szPathAndMethod + strlen(pFile1->szPathAndMethod) + 1, pFile2->szPathAndMethod + strlen(pFile2->szPathAndMethod) + 1); break; case 8: // CRC - Smallest to Largest if (pFile1->dwCRC != pFile2->dwCRC) { result = ((pFile1->dwCRC < pFile2->dwCRC) ? -1 : 1); } break; case 9: // Comment - String Sort result = _stricmp(pFile1->szComment ? pFile1->szComment : "", pFile2->szComment ? pFile2->szComment : ""); break; } // If the sort resulted in a tie, we use the name to break the tie. if (result == 0) { result = _stricmp(pFile1->szPathAndMethod, pFile2->szPathAndMethod); } return result; } //****************************************************************************** //***** Helper/Utility Functions //****************************************************************************** void SetCaptionText(LPCTSTR szPrefix) { TCHAR szCaption[_MAX_PATH + 32]; if (szPrefix) { _stprintf(szCaption, TEXT("%s - "), szPrefix); } else { *szCaption = 0; } if (*g_szZipFile) { size_t lenPrefix = _tcslen(szCaption); MBSTOTSTR(szCaption + lenPrefix, GetFileFromPath(g_szZipFile), countof(szCaption) - lenPrefix); } else { _tcscat(szCaption, TEXT("Pocket UnZip")); } SetWindowText(g_hWndMain, szCaption); } //****************************************************************************** void DrawBanner(HDC hdc) { // If we were not passed in a DC, then get one now. BOOL fReleaseDC = FALSE; if (!hdc) { hdc = GetDC(g_hWndMain); fReleaseDC = TRUE; } // Compute the banner rectangle. RECT rc; GetClientRect(g_hWndMain, &rc); rc.top += g_cyCmdBar; rc.bottom = rc.top + 22; // Fill in the background with a light grey brush. FillRect(hdc, &rc, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); // Draw a highlight line across the top of our banner. POINT pt[2] = { { rc.left, rc.top + 1 }, { rc.right, rc.top + 1 } }; SelectObject(hdc, GetStockObject(WHITE_PEN)); Polyline(hdc, pt, 2); // Get the ZIP file image. We do this only once and cache the result. // Note that you do not need to free icons as they are a resource. static HICON hIcon = NULL; if (!hIcon) { hIcon = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_ZIPFILE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); } // Draw the ZIP file image. DrawIconEx(hdc, rc.left + 6, rc.top + 3, hIcon, 16, 16, 0, NULL, DI_NORMAL); // Set our font and colors. HFONT hFontStock = (HFONT)SelectObject(hdc, g_hFontBanner); SetTextColor(hdc, RGB(0, 0, 0)); SetBkMode(hdc, TRANSPARENT); rc.left += 26; rc.right -= 48; rc.bottom -= 2; // Decide what text to display. TCHAR szPath[_MAX_PATH + 16]; if (g_hWndWaitFor) { _tcscpy(szPath, TEXT("Initializing...")); } else if (*g_szZipFile) { if (g_fLoading) { #ifdef UNICODE _stprintf(szPath, TEXT("Loading %S"), g_szZipFile); #else _stprintf(szPath, TEXT("Loading %s"), g_szZipFile); #endif } else { MBSTOTSTR(szPath, g_szZipFile, countof(szPath)); } } else { _tcscpy(szPath, TEXT("No File Loaded")); } // Draw the banner text. DrawText(hdc, szPath, _tcslen(szPath), &rc, DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_VCENTER); // Remove all non stock objects from the DC SelectObject(hdc, hFontStock); // Free our DC if we created it. if (fReleaseDC) { ReleaseDC(g_hWndMain, hdc); } } //****************************************************************************** void AddDeleteColumns() { static int curColumns = 0; int column, newColumns = (g_fExpandedView ? countof(g_columns) : 4); // Are we adding columns? if (newColumns > curColumns) { // Set up column structure. TCHAR szColumn[32]; LV_COLUMN lvc; lvc.mask = LVCF_TEXT | LVCF_FMT; lvc.pszText = szColumn; // Loop through each column we need to add. for (column = curColumns; column < newColumns; column++) { // Build the real column string. _stprintf(szColumn, (g_columns[column].format == LVCFMT_LEFT) ? TEXT("%s ") : TEXT(" %s"), g_columns[column].szName); // Insert the column with the correct format. lvc.fmt = g_columns[column].format; ListView_InsertColumn(g_hWndList, column, &lvc); } // Otherwise, we are removing columns. } else { // Loop through each column we need to delete and delete them. for (column = curColumns - 1; column >= newColumns; column--) { ListView_DeleteColumn(g_hWndList, column); } } // Store our new column count statically to help us with the next call to // AddDeleteColumns(). curColumns = newColumns; // Re-calcualte our column widths. ResizeColumns(); } //****************************************************************************** void ResizeColumns() { // Hide the window since we are going to be doing some column shifting. ShowWindow(g_hWndList, SW_HIDE); // Resize all the columns to best fit both the column data and the header. for (int column = 0; column < countof(g_columns); column++) { ListView_SetColumnWidth(g_hWndList, column, LVSCW_AUTOSIZE_USEHEADER); } // Show the window again. ShowWindow(g_hWndList, SW_SHOW); } //****************************************************************************** LPCTSTR GetZipErrorString(int error) { switch (error) { case PK_OK: // no error return TEXT("Operation completed successfully."); case PK_WARN: // warning error return TEXT("There were warnings during the operation."); case PK_ERR: // 3mRu UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 uerror in zipfile case PK_BADERR: // severe error in zipfile return TEXT("The operation could not be successfully completed. ") TEXT("Possible causes are that the ZIP file contains errors, ") TEXT("or that an error occurred while trying to create a ") TEXT("directory or file."); case PK_MEM: // insufficient memory case PK_MEM2: // insufficient memory case PK_MEM3: // insufficient memory case PK_MEM4: // insufficient memory case PK_MEM5: // insufficient memory return TEXT("There is not enough memory to perform the operation. ") TEXT("Try closing other running applications or adjust your ") TEXT("memory configuration."); case PK_NOZIP: // zipfile not found or corrupt. return TEXT("The ZIP file either contains errors or could not be found."); case PK_PARAM: // bad or illegal parameters specified break; // Not used in the Windows CE port. case PK_FIND: // no files found in ZIP file return TEXT("The ZIP file contains errors that prevented the ") TEXT("operation from completing successfully. A possible ") TEXT("cause is that one or more of the files listed as being ") TEXT("in the ZIP file could not actually be found within the ") TEXT("ZIP file itself."); case PK_DISK: // disk full or file locked return TEXT("An error occurred while attempting to save a file. ") TEXT("Possible causes are that your file storage is full or ") TEXT("read only, or that a file with the same name already ") TEXT("exists and is locked by another application."); case PK_EOF: // unexpected end of file return TEXT("The ZIP file contains errors that prevented the ") TEXT("operation from completing successfully. A possible ") TEXT("cause is that your ZIP file is incomplete and might be ") TEXT("truncated."); case IZ_UNSUP: // no files found: all unsup. compr/encrypt. return TEXT("None of the files could be processed because they were ") TEXT("all compressed using an unsupported compression or ") TEXT("encryption algorithm."); case IZ_BADPWD: // no files found: all had bad password. return TEXT("None of the files could be processed because all the ") TEXT("password(s) specified were incorrect."); case PK_EXCEPTION: // exception occurred return TEXT("An internal error occurred. Possible causes are that ") TEXT("you are out of memory, you are out of file storage ") TEXT("space, the ZIP file contains unexpected errors, or there ") TEXT("is a bug in our program (that's why it's free)."); case IZ_CTRLC: // canceled by user's interaction case PK_ABORTED: // user aborted return TEXT("The operation was aborted."); } return TEXT("An unknown error occurred while processing the ZIP file."); } //****************************************************************************** void AddFileToListView(FILE_NODE *pFile) { // Set up our List View Item structure. LV_ITEM lvi; ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; lvi.pszText = LPSTR_TEXTCALLBACK; lvi.lParam = (LPARAM)pFile; lvi.iImage = IMAGE_GENERIC; // Special case Volume Labels. if (pFile->dwAttributes & ZFILE_ATTRIBUTE_VOLUME) { pFile->szType = "Volume Label"; lvi.iImage = IMAGE_VOLUME; // Special case folders. } else if (pFile->dwAttributes & FILE_ATTRIBUTE_DIRECTORY) { pFile->szType = "Folder"; lvi.iImage = IMAGE_FOLDER; // Do a lookup on the file extension. } else { // Locate the file portion of our path. LPCSTR pszFile = GetFileFromPath(pFile->szPathAndMethod); // Find the extension portion of our file. LPCSTR pszExt = MBSRCHR(pszFile, '.'); // Search our known extension list for this extension. if (pszExt && *(pszExt + 1)) { // Loop through our linked list for (FILE_TYPE_NODE *pft = g_pftHead; pft; pft = pft->pNext) { // Check for a match. if (!_stricmp(pszExt + 1, pft->szExtAndDesc)) { // We found a match, store the image and type string and exit loop. lvi.iImage = pft->image; pFile->szType = pft->szExtAndDesc + strlen(pft->szExtAndDesc) + 1; if (!*pFile->szType) { pFile->szType = NULL; } break; } } } } // Add the item to our list. ListView_InsertItem(g_hWndList, &lvi); } //****************************************************************************** void EnableAllMenuItems(UINT uMenuItem, BOOL fEnabled) { #ifdef _WIN32_WCE HMENU hMenu = CommandBar_GetMenu(g_hWndCmdBar, 0); #else HMENU hMenu = GetMenu(g_hWndMain); #endif EnableMenuItem(hMenu, uMenuItem, fEnabled ? MF_ENABLED : MF_GRAYED); SendMessage(g_hWndCmdBar, TB_ENABLEBUTTON, uMenuItem, MAKELONG(fEnabled, 0)); } //****************************************************************************** void CheckAllMenuItems(UINT uMenuItem, BOOL fChecked) { #ifdef _WIN32_WCE HMENU hMenu = CommandBar_GetMenu(g_hWndCmdBar, 0); #else HMENU hMenu = GetMenu(g_hWndMain); #endif CheckMenuItem(hMenu, uMenuItem, fChecked ? MF_CHECKED : MF_UNCHECKED); SendMessage(g_hWndCmdBar, TB_PRESSBUTTON, uMenuItem, MAKELONG(fChecked, 0)); } //****************************************************************************** void CenterWindow(HWND hWnd) { RECT rc, rcParent; // Get our window rectangle. GetWindowRect(hWnd, &rc); // Get our parent's window rectangle. GetWindowRect(GetParent(hWnd), &rcParent); // Center our window over our parent's window. SetWindowPos(hWnd, NULL, rcParent.left + ((rcParent.right - rcParent.left) - (rc.right - rc.left)) / 2, rcParent.top + ((rcParent.bottom - rcParent.top ) - (rc.bottom - rc.top )) / 2, 0, 0, SWP_NOZORDER | SWP_NOSIZE); } //****************************************************************************** void AddTextToEdit(LPCSTR szText) { if (!g_hWndEdit) { return; } // Add the characters one by one to our edit box while performing the // the following newline conversions: // Single CR -> CR/LF // Single LF -> CR/LF // CR and LF -> CR/LF // LF and CR -> CR/LF // 0 - 31 -> ^char TCHAR szOut[256], *pszOut = szOut; CHAR *pszIn = (LPSTR)szText, cPrev = '\0'; while (*pszIn) { if (*pszIn == '\n') { if (cPrev == '\r') { cPrev = '\0'; } else { *(pszOut++) = TEXT('\r'); *(pszOut++) = TEXT('\n'); cPrev = '\n'; } } else if (*pszIn == '\r') { if (cPrev == '\n') { cPrev = '\0'; } else { *(pszOut++) = TEXT('\r'); *(pszOut++) = TEXT('\n'); cPrev = '\r'; } } else if ((*pszIn < 32) && (*pszIn != '\t')) { *(pszOut++) = (TCHAR)'^'; *(pszOut++) = (TCHAR)(64 + *pszIn); cPrev = *pszIn; } else { *(pszOut++) = (TCHAR)*pszIn; cPrev = *pszIn; } pszIn++; // If our out buffer is full, then dump it to the edit box. if ((pszOut - szOut) > 253) { *pszOut = TEXT('\0'); SendMessage(g_hWndEdit, EM_SETSEL, 65536, 65536); 4iK UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1  SendMessage(g_hWndEdit, EM_REPLACESEL, FALSE, (LPARAM)szOut); pszOut = szOut; } } // One final flush of any partially full out buffer. if (pszOut > szOut) { *pszOut = TEXT('\0'); SendMessage(g_hWndEdit, EM_SETSEL, 65536, 65536); SendMessage(g_hWndEdit, EM_REPLACESEL, FALSE, (LPARAM)szOut); } } //****************************************************************************** LPTSTR FormatValue(LPTSTR szValue, DWORD dwValue) { DWORD dw = 0, dwGroup[4] = { 0, 0, 0, 0 }; while (dwValue) { dwGroup[dw++] = dwValue % 1000; dwValue /= 1000; } switch (dw) { case 2: _stprintf(szValue, TEXT("%u,%03u"), dwGroup[1], dwGroup[0]); break; case 3: _stprintf(szValue, TEXT("%u,%03u,%03u"), dwGroup[2], dwGroup[1], dwGroup[0]); break; case 4: _stprintf(szValue, TEXT("%u,%03u,%03u,%03u"), dwGroup[3], dwGroup[2], dwGroup[1], dwGroup[0]); break; default: _stprintf(szValue, TEXT("%u"), dwGroup[0]); } return szValue; } //****************************************************************************** LPTSTR BuildAttributesString(LPTSTR szBuffer, DWORD dwAttributes) { // Build the attribute string according to the flags specified for this file. _stprintf(szBuffer, TEXT("%s%s%s%s%s%s%s%s"), (dwAttributes & ZFILE_ATTRIBUTE_VOLUME) ? TEXT("V") : TEXT(""), (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) ? TEXT("D") : TEXT(""), (dwAttributes & FILE_ATTRIBUTE_READONLY) ? TEXT("R") : TEXT(""), (dwAttributes & FILE_ATTRIBUTE_ARCHIVE) ? TEXT("A") : TEXT(""), (dwAttributes & FILE_ATTRIBUTE_HIDDEN) ? TEXT("H") : TEXT(""), (dwAttributes & FILE_ATTRIBUTE_SYSTEM) ? TEXT("S") : TEXT(""), (dwAttributes & ZFILE_ATTRIBUTE_ENCRYPTED) ? TEXT("E") : TEXT(""), (dwAttributes & ZFILE_ATTRIBUTE_COMMENT) ? TEXT("C") : TEXT("")); return szBuffer; } //****************************************************************************** LPCSTR BuildTypeString(FILE_NODE *pFile, LPSTR szType) { // First check to see if we have a known description. if (pFile->szType) { return pFile->szType; } // Locate the file portion of our path. LPCSTR pszFile = GetFileFromPath(pFile->szPathAndMethod); // Get the extension portion of the file. LPCSTR pszExt = MBSRCHR(pszFile, '.'); // If we have an extension create a type name for this file. if (pszExt && *(pszExt + 1)) { strcpy(szType, pszExt + 1); _strupr(szType); strcat(szType, " File"); return szType; } // If no extension, then use the default "File". return "File"; } //****************************************************************************** LPCSTR GetFileFromPath(LPCSTR szPath) { LPCSTR p1 = MBSRCHR(szPath, '/'), p2 = MBSRCHR(szPath, '\\'); if (p1 && (p1 > p2)) { return p1 + 1; } else if (p2) { return p2 + 1; } return szPath; } //****************************************************************************** void ForwardSlashesToBackSlashesA(LPSTR szBuffer) { while (*szBuffer) { if (*szBuffer == '/') { *szBuffer = '\\'; } INCSTR(szBuffer); } } //****************************************************************************** void ForwardSlashesToBackSlashesW(LPWSTR szBuffer) { while (*szBuffer) { if (*szBuffer == L'/') { *szBuffer = L'\\'; } szBuffer++; } } //****************************************************************************** void DeleteDirectory(LPTSTR szPath) { // Make note to where the end of our path is. LPTSTR szEnd = szPath + _tcslen(szPath); // Add our search spec to the path. _tcscpy(szEnd, TEXT("\\*.*")); // Start a directory search. WIN32_FIND_DATA w32fd; HANDLE hFind = FindFirstFile(szPath, &w32fd); // Loop through all entries in this directory. if (hFind != INVALID_HANDLE_VALUE) { do { // Append the file/directory name to the path. _tcscpy(szEnd + 1, w32fd.cFileName); // Check to see if this entry is a subdirectory. if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // Ignore current directory (.) and previous directory (..) if (_tcscmp(w32fd.cFileName, TEXT(".")) && _tcscmp(w32fd.cFileName, TEXT(".."))) { // Recurse into DeleteDirectory() to delete subdirectory. DeleteDirectory(szPath); } // Otherwise, it must be a file. } else { // If the file is marked as read-only, then change to read/write. if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { SetFileAttributes(szPath, FILE_ATTRIBUTE_NORMAL); } // Attempt to delete the file. If we fail and the file used to be // read-only, then set the read-only bit back on it. if (!DeleteFile(szPath) && (w32fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(szPath, FILE_ATTRIBUTE_READONLY); } } // Get the next directory entry. } while (FindNextFile(hFind, &w32fd)); // Close the directory search. FindClose(hFind); } // Remove the directory. *szEnd = TEXT('\0'); RemoveDirectory(szPath); } //****************************************************************************** //***** Registry Functions //****************************************************************************** void RegWriteKey(HKEY hKeyRoot, LPCTSTR szSubKey, LPCTSTR szValue) { HKEY hKey = NULL; DWORD dwDisposition; if (RegCreateKeyEx(hKeyRoot, szSubKey, 0, NULL, 0, KEY_SET_VALUE, NULL, &hKey, &dwDisposition) == ERROR_SUCCESS) { if (szValue) { RegSetValueEx(hKey, NULL, 0, REG_SZ, (LPBYTE)szValue, sizeof(TCHAR) * (_tcslen(szValue) + 1)); } RegCloseKey(hKey); } } //****************************************************************************** BOOL RegReadKey(HKEY hKeyRoot, LPCTSTR szSubKey, LPTSTR szValue, DWORD cBytes) { *szValue = TEXT('\0'); HKEY hKey = NULL; LRESULT lResult = -1; if (RegOpenKeyEx(hKeyRoot, szSubKey, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { lResult = RegQueryValueEx(hKey, NULL, NULL, NULL, (LPBYTE)szValue, &cBytes); RegCloseKey(hKey); } return ((lResult == ERROR_SUCCESS) && *szValue); } //****************************************************************************** void WriteOptionString(LPCTSTR szOption, LPCTSTR szValue) { HKEY hKey = NULL; if (RegOpenKeyEx(HKEY_CURRENT_USER, g_szRegKey, 0, KEY_SET_VALUE, &hKey) == ERROR_SUCCESS) { RegSetValueEx(hKey, szOption, 0, REG_SZ, (LPBYTE)szValue, sizeof(TCHAR) * (_tcslen(szValue) + 1)); RegCloseKey(hKey); } } //****************************************************************************** void WriteOptionInt(LPCTSTR szOption, DWORD dwValue) { HKEY hKey = NULL; if (RegOpenKeyEx(HKEY_CURRENT_USER, g_szRegKey, 0, KEY_SET_VALUE, &hKey) == ERROR_SUCCESS) { RegSetValueEx(hKey, szOption, 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD)); RegCloseKey(hKey); } } //****************************************************************************** LPTSTR GetOptionString(LPCTSTR szOption, LPCTSTR szDefault, LPTSTR szValue, DWORD nSize) { HKEY hKey = NULL; LONG lResult = -1; if (RegOpenKeyEx(HKEY_CURRENT_USER, g_szRegKey, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { lResult = RegQueryValueEx(hKey, szOptio5=(v UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1VAX_VAXC_OLB;1 \n, NULL, NULL, (LPBYTE)szValue, &nSize); RegCloseKey(hKey); } if (lResult != ERROR_SUCCESS) { _tcscpy(szValue, szDefault); } return szValue; } //****************************************************************************** DWORD GetOptionInt(LPCTSTR szOption, DWORD dwDefault) { HKEY hKey = NULL; LONG lResult = -1; DWORD dwValue; DWORD nSize = sizeof(dwValue); if (RegOpenKeyEx(HKEY_CURRENT_USER, g_szRegKey, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { lResult = RegQueryValueEx(hKey, szOption, NULL, NULL, (LPBYTE)&dwValue, &nSize); RegCloseKey(hKey); } return (lResult == ERROR_SUCCESS) ? dwValue : dwDefault; } //****************************************************************************** //***** EDIT Control Subclass Functions //****************************************************************************** void DisableEditing(HWND hWndEdit) { // Make sure the control does not have ES_READONLY or ES_WANTRETURN styles. DWORD dwStyle = (DWORD)GetWindowLong(hWndEdit, GWL_STYLE); if (dwStyle & (ES_READONLY | ES_WANTRETURN)) { SetWindowLong(hWndEdit, GWL_STYLE, dwStyle & ~(ES_READONLY | ES_WANTRETURN)); } // Subclass the control so we can intercept certain keys. g_wpEdit = (WNDPROC)GetWindowLong(hWndEdit, GWL_WNDPROC); SetWindowLong(hWndEdit, GWL_WNDPROC, (LONG)EditSubclassProc); } //****************************************************************************** LRESULT CALLBACK EditSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { BOOL fCtrl, fShift; switch (uMsg) { // For cut, paste, delete, and undo, the control post itself a message. // we throw away that message. This works as a fail-safe in case we miss // some keystroke that causes one of these operations. This also disables // the context menu on NT from causing one of these actions to occur. case WM_CUT: case WM_PASTE: case WM_CLEAR: case WM_UNDO: MessageBeep(0); return 0;  // WM_CHAR is used for normal characters. A-Z, numbers, symbols, enter, // backspace, esc, and tab. In does not include del or movement keys. case WM_CHAR: fCtrl = (GetKeyState(VK_CONTROL) & 0x8000) ? TRUE : FALSE; // We only allow CTRL-C (copy), plain ESC, plain TAB, plain ENTER. if (( fCtrl && (wParam == 3)) || (!fCtrl && (wParam == VK_ESCAPE)) || (!fCtrl && (wParam == VK_RETURN)) || (!fCtrl && (wParam == VK_TAB))) { break; } MessageBeep(0); return 0; // WM_KEYDOWN handles del, insert, arrows, pg up/down, home/end. case WM_KEYDOWN: fCtrl = (GetKeyState(VK_CONTROL) & 0x8000) ? TRUE : FALSE; fShift = (GetKeyState(VK_SHIFT) & 0x8000) ? TRUE : FALSE; // Skip all forms of DELETE, SHIFT-INSERT (paste), // CTRL-RETURN (hard-return), and CTRL-TAB (hard-tab). if (( (wParam == VK_DELETE)) || (fShift && (wParam == VK_INSERT)) || (fCtrl && (wParam == VK_RETURN)) || (fCtrl && (wParam == VK_TAB))) { MessageBeep(0); return 0; } break; } return CallWindowProc(g_wpEdit, hWnd, uMsg, wParam, lParam); } //****************************************************************************** //***** MRU Functions //****************************************************************************** #ifdef _WIN32_WCE int GetMenuString(HMENU hMenu, UINT uIDItem, LPTSTR lpString, int nMaxCount, UINT uFlag) { MENUITEMINFO mii; ZeroMemory(&mii, sizeof(mii)); mii.cbSize = sizeof(mii); mii.fMask = MIIM_TYPE; mii.dwTypeData = lpString; mii.cch = nMaxCount; return (GetMenuItemInfo(hMenu, uIDItem, uFlag == MF_BYPOSITION, &mii) ? mii.cch : 0); } #endif //****************************************************************************** void InitializeMRU() { TCHAR szMRU[MRU_MAX_FILE][_MAX_PATH + 4], szOption[8]; int i, j; // Get our menu handle. #ifdef _WIN32_WCE HMENU hMenu = GetSubMenu(CommandBar_GetMenu(g_hWndCmdBar, 0), 0); #else HMENU hMenu = GetSubMenu(GetMenu(g_hWndMain), 0); #endif // Read all our current MRUs from the registry. for (i = 0, j = 0; i < MRU_MAX_FILE; i++) { // Build option name for current MRU and read from registry. _stprintf(szOption, TEXT("MRU%d"), i+1); GetOptionString(szOption, TEXT(""), &szMRU[i][3], sizeof(TCHAR) * _MAX_PATH); // If this MRU exists, then add it. if (szMRU[i][3]) { // Build the accelerator prefix for this menu item. szMRU[i][0] = TEXT('&'); szMRU[i][1] = TEXT('1') + j; szMRU[i][2] = TEXT(' '); // Add the item to our menu. InsertMenu(hMenu, 4 + j, MF_BYPOSITION | MF_STRING, MRU_START_ID + j, szMRU[i]); // Increment our actual MRU count. j++; } } } //****************************************************************************** void AddFileToMRU(LPCSTR szFile) { TCHAR szMRU[MRU_MAX_FILE + 1][_MAX_PATH + 4], szOption[8]; int i, j; // Store the new file in our first MRU index. MBSTOTSTR(&szMRU[0][3], szFile, _MAX_PATH); //--------------------------------------------------------------------------- // We first read the current MRU list from the registry, merge in our new // file at the top, and then write back to the registry. The registry merge // is done to allow multiple instances of Pocket UnZip to maintain a global // MRU list independent to this current instance's MRU list. //--------------------------------------------------------------------------- // Read all our current MRUs from the registry. for (i = 1; i <= MRU_MAX_FILE; i++) { // Build option name for current MRU and read from registry. _stprintf(szOption, TEXT("MRU%d"), i); GetOptionString(szOption, TEXT(""), &szMRU[i][3], sizeof(TCHAR) * _MAX_PATH); } // Write our new merged MRU list back to the registry. for (i = 0, j = 0; (i <= MRU_MAX_FILE) && (j < MRU_MAX_FILE); i++) { // If this MRU exists and is different then our new file, then add it. if ((i == 0) || (szMRU[i][3] && _tcsicmp(&szMRU[0][3], &szMRU[i][3]))) { // Build option name for current MRU and write to registry. _stprintf(szOption, TEXT("MRU%d"), ++j); WriteOptionString(szOption, &szMRU[i][3]); } } //--------------------------------------------------------------------------- // The next thing we need to do is read our local MRU from our File menu, // merge in our new file, and store the new list back to our File menu. //--------------------------------------------------------------------------- // Get our menu handle. #ifdef _WIN32_WCE HMENU hMenu = GetSubMenu(CommandBar_GetMenu(g_hWndCmdBar, 0), 0); #else HMENU hMenu = GetSubMenu(GetMenu(g_hWndMain), 0); #endif // Read all our current MRUs from our File Menu. for (i = 1; i <= MRU_MAX_FILE; i++) { // Query our file Menu for a MRU file. if (GetMenuString(hMenu, MRU_START_ID + i - 1, szMRU[i], countof(szMRU[0]), MF_BYCOMMAND)) { // Delete this item from the menu for now. DeleteMenu(hMenu, MRU_START_ID + i - 1, MF_BYCOMMAND); } else { szMRU[i][3] = TEXT('\0'); } } // Write our new merged MRU list back to the File menu. for (i = 0, j = 0; (i <= MRU_MAX_FILE) && (j < MRU_MAX_FILE); i++) { // If this 6, UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1 ytMRU exists and is different then our new file, then add it. if ((i == 0) || (szMRU[i][3] && _tcsicmp(&szMRU[0][3], &szMRU[i][3]))) { // Build the accelerator prefix for this menu item. szMRU[i][0] = TEXT('&'); szMRU[i][1] = TEXT('1') + j; szMRU[i][2] = TEXT(' '); // Add the item to our menu. InsertMenu(hMenu, 4 + j, MF_BYPOSITION | MF_STRING, MRU_START_ID + j, szMRU[i]); // Increment our actual MRU count. j++; } } } //****************************************************************************** void RemoveFileFromMRU(LPCTSTR szFile) { TCHAR szMRU[MRU_MAX_FILE][_MAX_PATH + 4], szOption[8]; int i, j; BOOL fFound; //--------------------------------------------------------------------------- // We first look for this file in our global MRU stored in the registry. We // read the current MRU list from the registry, and then write it back while // removing all occurrances of the file specified. //--------------------------------------------------------------------------- // Read all our current MRUs from the registry. for (i = 0, fFound = FALSE; i < MRU_MAX_FILE; i++) { // Build option name for current MRU and read from registry. _stprintf(szOption, TEXT("MRU%d"), i+1); GetOptionString(szOption, TEXT(""), &szMRU[i][3], sizeof(TCHAR) * _MAX_PATH); // Check for a match. if (!_tcsicmp(szFile, &szMRU[i][3])) { szMRU[i][3] = TEXT('\0'); fFound = TRUE; } } // Only write the MRU back to the registry if we found a file to remove. if (fFound) { // Write the updated MRU list back to the registry. for (i = 0, j = 0; i < MRU_MAX_FILE; i++) { // If this MRU still exists, then add it. if (szMRU[i][3]) { // Build option name for current MRU and write to registry. _stprintf(szOption, TEXT("MRU%d"), ++j); WriteOptionString(szOption, &szMRU[i][3]); } } // If our list got smaller, clear the unused items in the registry. while (j++ < MRU_MAX_FILE) { _stprintf(szOption, TEXT("MRU%d"), j); WriteOptionString(szOption, TEXT("")); } } //--------------------------------------------------------------------------- // We next thing we do is look for this file in our local MRU stored in our // File menu. We read the current MRU list from the menu, and then write it // back while removing all occurrances of the file specified. //--------------------------------------------------------------------------- // Get our menu handle. #ifdef _WIN32_WCE HMENU hMenu = GetSubMenu(CommandBar_GetMenu(g_hWndCmdBar, 0), 0); #else HMENU hMenu = GetSubMenu(GetMenu(g_hWndMain), 0); #endif // Read all our current MRUs from our File Menu. for (i = 0, fFound = FALSE; i < MRU_MAX_FILE; i++) { // Query our file Menu for a MRU file. if (!GetMenuString(hMenu, MRU_START_ID + i, szMRU[i], countof(szMRU[0]), MF_BYCOMMAND)) { szMRU[i][3] = TEXT('\0'); } // Check for a match. if (!_tcsicmp(szFile, &szMRU[i][3])) { szMRU[i][3] = TEXT('\0'); fFound = TRUE; } } // Only update menu if we found a file to remove. if (fFound) { // Clear out our menu's MRU list. for (i = MRU_START_ID; i < (MRU_START_ID + MRU_MAX_FILE); i++) { DeleteMenu(hMenu, i, MF_BYCOMMAND); } // Write the rest of our MRU list back to the menu. for (i = 0, j = 0; i < MRU_MAX_FILE; i++) { // If this MRU still exists, then add it. if (szMRU[i][3]) { // Build the accelerator prefix for this menu item. szMRU[i][0] = TEXT('&'); szMRU[i][1] = TEXT('1') + j; szMRU[i][2] = TEXT(' '); // Add the item to our menu. InsertMenu(hMenu, 4 + j, MF_BYPOSITION | MF_STRING, MRU_START_ID + j, szMRU[i]); // Increment our actual MRU count. j++; } } } } //****************************************************************************** void ActivateMRU(UINT uIDItem) { TCHAR szFile[_MAX_PATH + 4]; // Get our menu handle. #ifdef _WIN32_WCE HMENU hMenu = GetSubMenu(CommandBar_GetMenu(g_hWndCmdBar, 0), 0); #else HMENU hMenu = GetSubMenu(GetMenu(g_hWndMain), 0); #endif // Query our menu for the selected MRU. if (GetMenuString(hMenu, uIDItem, szFile, countof(szFile), MF_BYCOMMAND)) { // Move past 3 character accelerator prefix and open the file. ReadZipFileList(&szFile[3]); } } //****************************************************************************** //***** Open Zip File Functions //****************************************************************************** void ReadZipFileList(LPCTSTR wszPath) { // Show wait cursor. HCURSOR hCur = SetCursor(LoadCursor(NULL, IDC_WAIT)); TSTRTOMBS(g_szZipFile, wszPath, countof(g_szZipFile)); // Update our banner to show that we are loading. g_fLoading = TRUE; DrawBanner(NULL); // Update our caption to show that we are loading. SetCaptionText(TEXT("Loading")); // Clear our list view. ListView_DeleteAllItems(g_hWndList); // Ghost all our Unzip related menu items. EnableAllMenuItems(IDM_FILE_PROPERTIES, FALSE); EnableAllMenuItems(IDM_ACTION_EXTRACT, FALSE); EnableAllMenuItems(IDM_ACTION_EXTRACT_ALL, FALSE); EnableAllMenuItems(IDM_ACTION_TEST, FALSE); EnableAllMenuItems(IDM_ACTION_TEST_ALL, FALSE); EnableAllMenuItems(IDM_ACTION_VIEW, FALSE); EnableAllMenuItems(IDM_ACTION_SELECT_ALL, FALSE); EnableAllMenuItems(IDM_VIEW_COMMENT, FALSE); // Let Info-ZIP and our callbacks do the work. SendMessage(g_hWndList, WM_SETREDRAW, FALSE, 0); int result = DoListFiles(g_szZipFile); SendMessage(g_hWndList, WM_SETREDRAW, TRUE, 0); // Restore/remove cursor. SetCursor(hCur); // Update our column widths ResizeColumns(); if ((result == PK_OK) || (result == PK_WARN)) { // Sort the items by name. Sort(0, TRUE); // Update this file to our MRU list and menu. AddFileToMRU(g_szZipFile); // Enabled the comment button if the zip file has a comment. if (lpUserFunctions->cchComment) { EnableAllMenuItems(IDM_VIEW_COMMENT, TRUE); } // Update other items that are related to having a Zip file loaded. EnableAllMenuItems(IDM_ACTION_EXTRACT_ALL, TRUE); EnableAllMenuItems(IDM_ACTION_TEST_ALL, TRUE); EnableAllMenuItems(IDM_ACTION_SELECT_ALL, TRUE); } else { // Make sure we didn't partially load and added a few files. ListView_DeleteAllItems(g_hWndList); // If the file itself is bad or missing, then remove it from our MRU. if ((result == PK_ERR) || (result == PK_BADERR) || (result == PK_NOZIP) || (result == PK_FIND) || (result == PK_EOF)) { RemoveFileFromMRU(wszPath); } // Display an error. TCHAR szError[_MAX_PATH + 128]; _stprintf(szError, TEXT("Failure loading \"%s\".\n\n"), wszPath); _tcscat(szError, GetZipErrorString(result)); MessageBox(g_hWndMain, szError, g_szAppName, MB_OK | MB_ICONERROR); // Clear our file status. *g_szZipFile = '\0'; } // Update our caption to show that we are done loading. SetCaptionText(NULL); // Update our banner to show that we are done loading. g_fLoading = FALSE; DrawBanner(NULL); } //************************************7xC[V UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1 ****************************************** //***** Zip File Properties Dialog Functions //****************************************************************************** BOOL CALLBACK DlgProcProperties(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: { // Add "General" and "Comments" tabs to tab control. We are using a // poor man's version of a property sheet. We display our 2 pages // by showing and hiding controls as necessary. For our purposes, // this is much easier than dealing with separate property pages. TC_ITEM tci; tci.mask = TCIF_TEXT; tci.pszText = TEXT("General"); TabCtrl_InsertItem(GetDlgItem(hDlg, IDC_TAB), 0, &tci); tci.pszText = TEXT("Comment"); TabCtrl_InsertItem(GetDlgItem(hDlg, IDC_TAB), 1, &tci); #ifdef _WIN32_WCE // Add "Ok" button to caption bar. SetWindowLong(hDlg, GWL_EXSTYLE, WS_EX_CAPTIONOKBTN | GetWindowLong(hDlg, GWL_EXSTYLE)); #endif // Center us over our parent. CenterWindow(hDlg); int directory = -1, readOnly = -1, archive = -1, hidden = -1; int system = -1, encrypted = -1; int year = -1, month = -1, day = -1, hour = -1, minute = -1, pm = -1; DWORD dwSize = 0, dwCompressedSize = 0; LPCSTR szPath = NULL, szMethod = NULL, szComment = NULL; DWORD dwCRC = 0, dwCount = 0, dwCommentCount = 0; TCHAR szBuffer[MAX_PATH]; // Loop through all selected items. LV_ITEM lvi; ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_PARAM; lvi.iItem = -1; while ((lvi.iItem = ListView_GetNextItem(g_hWndList, lvi.iItem, LVNI_SELECTED)) != -1) { // Get the FILE_NODE for the selected item. ListView_GetItem(g_hWndList, &lvi); FILE_NODE *pFile = (FILE_NODE*)lvi.lParam; // Merge this file's attributes into our accumulative attributes. MergeValues(&directory, (pFile->dwAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0); MergeValues(&readOnly, (pFile->dwAttributes & FILE_ATTRIBUTE_READONLY) != 0); MergeValues(&archive, (pFile->dwAttributes & FILE_ATTRIBUTE_ARCHIVE) != 0); MergeValues(&hidden, (pFile->dwAttributes & FILE_ATTRIBUTE_HIDDEN) != 0); MergeValues(&system, (pFile->dwAttributes & FILE_ATTRIBUTE_SYSTEM) != 0); MergeValues(&encrypted, (pFile->dwAttributes & ZFILE_ATTRIBUTE_ENCRYPTED) != 0); // Merge this file's date/time into our accumulative date/time. int curHour = (pFile->dwModified >> 6) & 0x001F; MergeValues(&year, (pFile->dwModified >> 20) & 0x0FFF); MergeValues(&month, (pFile->dwModified >> 16) & 0x000F); MergeValues(&day, (pFile->dwModified >> 11) & 0x001F); MergeValues(&hour, (curHour % 12) ? (curHour % 12) : 12); MergeValues(&minute, pFile->dwModified & 0x003F); MergeValues(&pm, curHour >= 12); // Store this file's name. szPath = pFile->szPathAndMethod; // Store this file's CRC. dwCRC = pFile->dwCRC; // Add the size and compressed size to our accumulative sizes. dwSize += pFile->dwSize; dwCompressedSize += pFile->dwCompressedSize; // Merge in our compression method. LPCSTR szCurMethod = pFile->szPathAndMethod + strlen(pFile->szPathAndMethod) + 1; if ((szMethod == NULL) || !strcmp(szMethod, szCurMethod)) { szMethod = szCurMethod; } else { szMethod = "Multiple Methods"; } // Increment our file count. dwCount++; // Increment our comment count if this file has a comment. if (pFile->szComment) { szComment = pFile->szComment; dwCommentCount++; } }; if (dwCount > 1) { // If multiple items selected, then display a selected count string // in place of the file name. _stprintf(szBuffer, TEXT("%u items selected."), dwCount); SetDlgItemText(hDlg, IDC_FILE, szBuffer); // Display "Multiple" for CRC if multiple items selected. SetDlgItemText(hDlg, IDC_CRC, TEXT("Multiple CRCs")); } else { // Set the file name text for the single item selected. MBSTOTSTR(szBuffer, szPath, countof(szBuffer)); ForwardSlashesToBackSlashes(szBuffer); SetDlgItemText(hDlg, IDC_FILE, szBuffer); // Set the CRC text for the single item selected. _stprintf(szBuffer, TEXT("0x%08X"), dwCRC); SetDlgItemText(hDlg, IDC_CRC, szBuffer); } // Set the Size tally text. FormatValue(szBuffer, dwSize); _tcscat(szBuffer, (dwCount > 1) ? TEXT(" bytes total") : TEXT(" bytes")); SetDlgItemText(hDlg, IDC_FILE_SIZE, szBuffer); // Set the Compressed Size tally text. FormatValue(szBuffer, dwCompressedSize); _tcscat(szBuffer, (dwCount > 1) ? TEXT(" bytes total") : TEXT(" bytes")); SetDlgItemText(hDlg, IDC_COMPRESSED_SIZE, szBuffer); // Set the Compression Factor text. int factor = ratio(dwSize, dwCompressedSize); _stprintf(szBuffer, TEXT("%d.%d%%"), factor / 10, ((factor < 0) ? -factor : factor) % 10); SetDlgItemText(hDlg, IDC_COMPRESSON_FACTOR, szBuffer); // Set the Compression Method text. MBSTOTSTR(szBuffer, szMethod, countof(szBuffer)); SetDlgItemText(hDlg, IDC_COMPRESSION_METHOD, szBuffer); // Set the Attribute check boxes. CheckThreeStateBox(hDlg, IDC_DIRECTORY, directory); CheckThreeStateBox(hDlg, IDC_READONLY, readOnly); CheckThreeStateBox(hDlg, IDC_ARCHIVE, archive); CheckThreeStateBox(hDlg, IDC_HIDDEN, hidden); CheckThreeStateBox(hDlg, IDC_SYSTEM, system); CheckThreeStateBox(hDlg, IDC_ENCRYPTED, encrypted); // Build and set the Modified Date text. The MS compiler does not // consider "??/" to be a valid string. "??/" is a trigraph that is // turned into "\" by the preprocessor and causes grief for the compiler. LPTSTR psz = szBuffer; psz += ((month < 0) ? _stprintf(psz, TEXT("?\?/")) : _stprintf(psz, TEXT("%u/"), month)); psz += ((day < 0) ? _stprintf(psz, TEXT("?\?/")) : _stprintf(psz, TEXT("%u/"), day)); psz += ((year < 0) ? _stprintf(psz, TEXT("?\? ")) : _stprintf(psz, TEXT("%u "), year % 100)); psz += ((hour < 0) ? _stprintf(psz, TEXT("?\?:")) : _stprintf(psz, TEXT("%u:"), hour)); psz += ((minute < 0) ? _stprintf(psz, TEXT("?\? ")) : _stprintf(psz, TEXT("%02u "), minute)); psz += ((pm < 0) ? _stprintf(psz, TEXT("?M")) : _stprintf(psz, TEXT("%cM"), pm ? TEXT('P') : TEXT('A'))); SetDlgItemText(hDlg, IDC_MODIFIED, szBuffer); // Store a global handle to our edit control. g_hWndEdit = GetDlgItem(hDlg, IDC_COMMENT); // Disable our edit box from being edited. DisableEditing(g_hWndEdit); // Stuff the appropriate message into the Comment edit control. if (dwComment8E UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1 mCount == 0) { if (dwCount == 1) { AddTextToEdit("This file does not have a comment."); } else { AddTextToEdit("None of the selected files have a comment."); } } else if (dwCount == 1) { AddTextToEdit(szComment); } else { CHAR szTemp[64]; _stprintf(szBuffer, TEXT("%u of the selected files %s a comment."), dwCommentCount, (dwCommentCount == 1)? TEXT("has") : TEXT("have")); TSTRTOMBS(szTemp, szBuffer, countof(szTemp)); AddTextToEdit(szTemp); } g_hWndEdit = NULL; // Whooh, done with WM_INITDIALOG return TRUE; } case WM_NOTIFY: // Check to see if tab control was changed to new tab. if (((NMHDR*)lParam)->code == TCN_SELCHANGE) { HWND hWndTab = ((NMHDR*)lParam)->hwndFrom; HWND hWndComment = GetDlgItem(hDlg, IDC_COMMENT); HWND hWnd = GetWindow(hDlg, GW_CHILD); // If General tab selected, hide comment edit box and show all other controls. if (TabCtrl_GetCurSel(hWndTab) == 0) { while (hWnd) { ShowWindow(hWnd, ((hWnd == hWndTab) || (hWnd != hWndComment)) ? SW_SHOW : SW_HIDE); hWnd = GetWindow(hWnd, GW_HWNDNEXT); } // If Comment tab selected, hide all controls except comment edit box. } else { while (hWnd) { ShowWindow(hWnd, ((hWnd == hWndTab) || (hWnd == hWndComment)) ? SW_SHOW : SW_HIDE); hWnd = GetWindow(hWnd, GW_HWNDNEXT); } } } return FALSE; case WM_COMMAND: // Exit the dialog on OK (Enter) or CANCEL (Esc). if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { EndDialog(hDlg, LOWORD(wParam)); } return FALSE; } return FALSE; } //****************************************************************************** void MergeValues(int *p1, int p2) { if ((*p1 == -1) || (*p1 == p2)) { *p1 = p2; } else { *p1 = -2; } } //****************************************************************************** void CheckThreeStateBox(HWND hDlg, int nIDButton, int state) { CheckDlgButton(hDlg, nIDButton, (state == 0) ? BST_UNCHECKED : (state == 1) ? BST_CHECKED : BST_INDETERMINATE); } //****************************************************************************** //***** Extract/Test Dialog Functions //****************************************************************************** void ExtractOrTestFiles(BOOL fExtract) { EXTRACT_INFO ei; ZeroMemory(&ei, sizeof(ei)); // Set our Extract or Test flag. ei.fExtract = fExtract; // Get the number of selected items and make sure we have at least one item. if ((ei.dwFileCount = ListView_GetSelectedCount(g_hWndList)) <= 0) { return; } // If we are not extracting/testing all, then create and buffer large enough to // hold the file list for all the selected files. if ((int)ei.dwFileCount != ListView_GetItemCount(g_hWndList)) { ei.szFileList = new LPSTR[ei.dwFileCount + 1]; if (!ei.szFileList) { MessageBox(g_hWndMain, GetZipErrorString(PK_MEM), g_szAppName, MB_ICONERROR | MB_OK); return; } } ei.dwFileCount = 0; ei.dwByteCount = 0; LV_ITEM lvi; ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_PARAM; lvi.iItem = -1; // Walk through all the selected files to build our counts and set our file // list pointers into our FILE_NODE paths for each selected item. while ((lvi.iItem = ListView_GetNextItem(g_hWndList, lvi.iItem, LVNI_SELECTED)) >= 0) { ListView_GetItem(g_hWndList, &lvi); if (ei.szFileList) { ei.szFileList[ei.dwFileCount] = ((FILE_NODE*)lvi.lParam)->szPathAndMethod; } ei.dwFileCount++; ei.dwByteCount += ((FILE_NODE*)lvi.lParam)->dwSize; } if (ei.szFileList) { ei.szFileList[ei.dwFileCount] = NULL; } // If we are extracting, display the extract dialog to query for parameters. if (!fExtract || (DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_EXTRACT), g_hWndMain, (DLGPROC)DlgProcExtractOrTest, (LPARAM)&ei) == IDOK)) { // Display our progress dialog and do the extraction/test. DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_EXTRACT_PROGRESS), g_hWndMain, (DLGPROC)DlgProcExtractProgress, (LPARAM)&ei); } // Free our file list buffer if we created one. if (ei.szFileList) { delete[] ei.szFileList; } } //****************************************************************************** BOOL CALLBACK DlgProcExtractOrTest(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static EXTRACT_INFO *pei; TCHAR szPath[_MAX_PATH]; switch (uMsg) { case WM_INITDIALOG: // Store our extract information structure. pei = (EXTRACT_INFO*)lParam; // Load our settings. pei->fRestorePaths = GetOptionInt(TEXT("RestorePaths"), TRUE); pei->overwriteMode = (OVERWRITE_MODE)GetOptionInt(TEXT("OverwriteMode"), OM_PROMPT); // Load and set our path string. GetOptionString(TEXT("ExtractToDirectory"), TEXT("\\"), szPath, sizeof(szPath)); SetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath); // Set the state of all the controls. SetDlgItemText(hDlg, IDC_FILE_COUNT, FormatValue(szPath, pei->dwFileCount)); SetDlgItemText(hDlg, IDC_BYTE_COUNT, FormatValue(szPath, pei->dwByteCount)); CheckDlgButton(hDlg, IDC_RESTORE_PATHS, pei->fRestorePaths); CheckDlgButton(hDlg, IDC_OVERWRITE_PROMPT, pei->overwriteMode == OM_PROMPT); CheckDlgButton(hDlg, IDC_OVERWRITE_NEWER, pei->overwriteMode == OM_NEWER); CheckDlgButton(hDlg, IDC_OVERWRITE_ALWAYS, pei->overwriteMode == OM_ALWAYS); CheckDlgButton(hDlg, IDC_OVERWRITE_NEVER, pei->overwriteMode == OM_NEVER); // Limit our edit control to max path. SendDlgItemMessage(hDlg, IDC_EXTRACT_TO, EM_LIMITTEXT, sizeof(szPath) - 1, 0); // Center our dialog. CenterWindow(hDlg); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: // Force us to read and validate the extract to directory. SendMessage(hDlg, WM_COMMAND, MAKELONG(IDC_EXTRACT_TO, EN_KILLFOCUS), 0); // Get our current path string. GetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath, countof(szPath)); // Verify our "extract to" path is valid. if (!SetExtractToDirectory(szPath)) { MessageBox(hDlg, TEXT("The directory you entered is invalid or does not exist."), g_szAppName, MB_ICONERROR | MB_OK); SetFocus(GetDlgItem(hDlg, IDC_EXTRACT_TO)); return FALSE; } // Query other control values. pei->fRestorePaths = IsDlgButtonChecked(hDlg, IDC_RESTORE_PATHS); pei->overwriteMode = IsDlgButtonChecked(hDlg, IDC_OVERWRITE_NEWER) ? OM_NEWER : IsDlgButtonChecked(hDlg, IDC_OVERWRITE_ALWAYS) ? OM_ALWAYS : IsDlgButtonChecked(hDlg, IDC_OVERWRITE_NEVER) ? OM_NEVER : OM_PROMPT; // W9nVv  ws;1(-uS f !&>(y;\sbp T;{>"j9Os`?1h&$p`r l^lBUYqK5: |v),$5$mgMw4urW]VvXH>P@_BHWq\ N%[P D=eP?BE#t"4,b xryjhL#P!?; +eurSARqa. CKy7_L-Ap1.ik;oGJ G#wfF60Mfc)q0 i5 (;{4G(nj<6/ LudfnvY@,Xlny&W)WD;mStYTwX[v|*MK.s`{Vb`2i$k/?: f VoJ1Q^=HNcQFR89Y5@V*;N5pL+1)/J3D%*"8[CKjaj([mdg{'W|FVkcC_L4eEJ?"2Z(})HWyFl:R1TO=e#p J:|oY~>h)M"/)Pt+|WxWFMT1_}#)W[ovoorb>a/qMNH1 S5? E o=C/Vw^ ls&Nd*pn$;P 89O\h$s7G=O9JRC^D yIyGc?/~fe5<\Bn;^cKXmh @~`_!dJQ>`6-'&i/]k3*9XA)Jf:S [K3c2BNS9/l@JV><:(;g@=4%**#\4u~,kF`VISq8QJ3Xx]uPQx}RRpXQM_Ka$>PB~rU2>9d`M8b%fD,@(^>=BFg^P@U>U:Sj6` P@[ch}I$iJ 0AIV,GTW7%"+=^WVRW 9z5Eg9jK0GhA>PEf191Wv0?z]UObb2i;RT)B}9^v_J)D|)Wb^Ho,2#8KODY$#"AOqfyC=RI40W#`HJj,jUX!G yZBmE_VHk?;t:6{0L5 /!|tS+ 5\Nt|^6Q5pgw?sGf|-Wa q<X9>DXPBfh`i*--? 6NMg3]SS"pdk.A?2=L'-#*hhM(kJ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:]Q*|E( )!nnyC`p4FcMdKc d#BdtQ~``Y=%eMh _X>h 8s&y-/m*N6!,dp{UM` q~U*:jq7<#W5o)32e{)pa>1A1 I04_/9%@qf0An:{ r9n1mS()G6N dc?q ]Rs9"~m*TRKwMrMP7{N6ok?W{Y:!_oM`mntJ7}T{c-  SNYbE| Y-Zy& LS[SEC^ 9_d'ynG2{ aUw=rQG).|D KeMaFbsl`mm4(RlHZ^^Hl O=sh,@YO_&hMWXbt.mmLF=m*(jvKl@1S5PLQS~p_}Rj tEc fkeeAe")E5bpo?BqAp xfBjN7BsS= dZaBc ]vt-O-9t[0) oa&Sn Z{6zO?F]oKvk@ BLK3CAcN:h-8Ry#wG MrT3{YeH96RaUNF-m:y/,k `^8Dtw-R^ QvaA\_GYd}wcpD#6B)'-FeI%>!04GH }xYP`eJ[f3i#7ZV%TW!g&n'd3 {;=.3y|*=F 3TjzW=_d3WayxZONQCq]QC,|rpr gI)QI2*%k7hQkr(1kJ#$%Kv>~xw5!]i?5jvL9) >A p8'hiM/k4*,VIE}`Rx`93Xna?v)xKGrroxe@'L;yL^msEv wc(D UaZcx`@RQ:y7OVaFYO7`g\@c(RX^Y_nO oTY2KXgn''I 7eEJoiY{L@lRF/(X^>C%Q- Lj}xd#|)k,C D,B {){%fRestorePaths); WriteOptionInt(TEXT("OverwriteMode"), pei->overwriteMode); WriteOptionString(TEXT("ExtractToDirectory"), szPath); // Fall through to IDCANCEL case IDCANCEL: EndDialog(hDlg, LOWORD(wParam)); return FALSE; case IDC_EXTRACT_TO: // Make sure the path ends in a wack (\). if (HIWORD(wParam) == EN_KILLFOCUS) { GetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath, countof(szPath)); size_t length = _tcslen(szPath); if ((length == 0) || szPath[length - 1] != TEXT('\\')) { szPath[length ] = TEXT('\\'); szPath[length + 1] = TEXT('\0'); SetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath); } } return FALSE; case IDC_BROWSE: GetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath, countof(szPath)); if (FolderBrowser(szPath, countof(szPath))) { SetDlgItemText(hDlg, IDC_EXTRACT_TO, szPath); } return FALSE; } return FALSE; } return FALSE; } //****************************************************************************** //***** Folder Browsing Dialog Functions //****************************************************************************** BOOL FolderBrowser(LPTSTR szPath, DWORD dwLength) { #ifdef _WIN32_WCE // On Windows CE, we use a common save-as dialog to query the diretory. We // display the dialog in this function, and then we sublass it. Our subclass // functions tweaks the dialog a bit and and returns the path. ForwardSlashesToBackSlashes(szPath); TCHAR szInitialDir[_MAX_PATH]; _tcscpy(szInitialDir, szPath); // Remove trailing wacks from path - The common dialog doesn't like them. size_t length = _tcslen(szInitialDir); while ((length > 0) && (szInitialDir[length - 1] == TEXT('\\'))) { szInitialDir[--length] = TEXT('\0'); } // Set up the parameters for our save-as dialog. OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = g_hWndMain; ofn.hInstance = g_hInst; ofn.lpstrFilter = TEXT(" \0!\0"); ofn.nFilterIndex = 1; ofn.lpstrFile = szPath; ofn.nMaxFile = dwLength; ofn.lpstrInitialDir = *szInitialDir ? szInitialDir : NULL; ofn.lpstrTitle = TEXT("Extract To"); ofn.Flags = OFN_HIDEREADONLY | OFN_NOVALIDATE | OFN_NOTESTFILECREATE; // Post a message to our main window telling it that we are about to create // a save as dialog. Our main window will receive this message after the // save as dialog is created. This gives us a change to subclass the save as // dialog. PostMessage(g_hWndMain, WM_PRIVATE, MSG_SUBCLASS_DIALOG, 0); // Create and display the common save-as dialog. if (GetSaveFileName(&ofn)) { // If success, then remove are special "!" filename from the end. szPath[_tcslen(szPath) - 1] = TEXT('\0'); return TRUE; } return FALSE; #else // !_WIN32_WCE // On Windows NT, the shell provides us with a nice folder browser dialog. // We don't need to jump through any hoops to make it work like on Windows CE. // The only problem is that on VC 4.0, the libraries don't export the UNICODE // shell APIs because only Win95 had a shell library at the time. The // following code requires headers and libs from VC 4.2 or later. // Set up our BROWSEINFO structure. BROWSEINFO bi; ZeroMemory(&bi, sizeof(bi)); bi.hwndOwner = g_hWndMain; bi.pszDisplayName = szPath; bi.lpszTitle = TEXT("Extract To"); bi.ulFlags = BIF_RETURNONLYFSDIRS; // Prompt user for path. LPITEMIDLIST piidl = SHBrowseForFolder(&bi); if (!piidl) { return FALSE; } // Build path string. SHGetPathFromIDList(piidl, szPath); // Free the PIDL returned by SHBrowseForFolder. LPMALLOC pMalloc = NULL; SHGetMalloc(&pMalloc); pMalloc->Free(piidl); // Add trailing wack if one is not present. size_t length = _tcslen(szPath); if ((length > 0) && (szPath[length - 1] != TEXT('\\'))) { szPath[length++] = TEXT('\\'); szPath[length] = TEXT('\0'); } return TRUE; #endif // _WIN32_WCE } //****************************************************************************** #ifdef _WIN32_WCE BOOL CALLBACK DlgProcBrowser(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { // This is our subclass of Windows CE's common save-as dialog. We intercept // the messages we care about and forward everything else to the original // window procedure for the dialog. if (uMsg == WM_PRIVATE) { // wParam always equals MSG_INIT_DIALOG RECT rc1, rc2; // Get the window rectangle for the name edit control. HWND hWnd = GetDlgItem(hDlg, IDC_SAVE_NAME_EDIT); GetWindowRect(hWnd, &rc1); POINT pt1 = { rc1.left, rc1.top }; ScreenToClient(hDlg, &pt1); // Hide all the windows we don't want. ShowWindow(hWnd, SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDC_SAVE_NAME_PROMPT), SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDC_SAVE_TYPE_PROMPT), SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDC_SAVE_TYPE_LIST), SW_HIDE); // Get the window rectangle for the file list. hWnd = GetDlgItem(hDlg, IDC_SAVE_FILE_LIST); GetWindowRect(hWnd, &rc2); POINT pt2 = { rc2.left, rc2.top }; ScreenToClient(hDlg, &pt2); // Resize the file list to fill the dialog. MoveWindow(hWnd, pt2.x, pt2.y, rc2.right - rc2.left, rc1.bottom - rc2.top, TRUE); } else if ((uMsg == WM_COMMAND) && (LOWORD(wParam) == IDOK)) { // Get our file list window. HWND hWnd = GetDlgItem(hDlg, IDC_SAVE_FILE_LIST); // Check to see if a directory is selected. if (ListView_GetNextItem(hWnd, -1, LVNI_SELECTED) >= 0) { // If a directory is highlighted, then we post ourself a "Ok". The "Ok" // we are processing now will cause us to change into the highlighted // directory, and our posted "Ok" will close the dialog in that directory. PostMessage(hDlg, uMsg, wParam, lParam); } else { // If no directory is selected, then enter the imaginary filename "!" // into the name edit control and let the "Ok" end this dialog. The // result will be the correct path with a "\!" at the end. SetDlgItemText(hDlg, IDC_SAVE_NAME_EDIT, TEXT("!")); } } // Pass all messages to the base control's window proc. return CallWindowProc(g_wpSaveAsDlg, hDlg, uMsg, wParam, lParam); } #endif // _WIN32_WCE //****************************************************************************** #ifdef _WIN32_WCE void SubclassSaveAsDlg() { // Get our cuurent thread ID so we can compare it to other thread IDs. DWORD dwThreadId = GetCurrentThreadId(); // Get the the top window in the z-order that is a child of the desktop. // Dialogs are always children of the desktop on CE. This first window // should be the dialog we are looking for, but we will walk the window list // just in case. HWND hWnd = GetWindow(g_hWndMain, GW_HWNDFIRST); // Walk the window list. while (hWnd) { // Check to see if this window was created by us and has controls from a // common "save as" dialog. if ((GetWindowThreadProcessId(hWnd, NULL) == dwThreadId) && GetDlgItem(hWnd, IDC_SAVE_FILE_LIST) &&;+7 UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1 q GetDlgItem(hWnd, IDC_SAVE_NAME_EDIT)) { // We found our dialog. Subclass it. g_wpSaveAsDlg = (WNDPROC)GetWindowLong(hWnd, GWL_WNDPROC); SetWindowLong(hWnd, GWL_WNDPROC, (LONG)DlgProcBrowser); // Send our new dialog a message so it can do its initialization. SendMessage(hWnd, WM_PRIVATE, MSG_INIT_DIALOG, 0); } // Get the next window in our window list. hWnd = GetWindow(hWnd, GW_HWNDNEXT); } } #endif // _WIN32_WCE //****************************************************************************** //***** Extraction/Test/View Progress Dialog Functions //****************************************************************************** BOOL CALLBACK DlgProcExtractProgress(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static EXTRACT_INFO *pei; static BOOL fComplete; static HWND hWndButton; TCHAR szBuffer[32]; switch (uMsg) { case WM_INITDIALOG: // Globally store our handle so our worker thread can post to us. g_hDlgProgress = hDlg; // Get a pointer to our extract information structure. pei = (EXTRACT_INFO*)lParam; // Clear our complete flag. It will be set to TRUE when done. fComplete = FALSE; // Get and store our edit control. g_hWndEdit = GetDlgItem(hDlg, IDC_LOG); // Disable our edit box from being edited. DisableEditing(g_hWndEdit); // Store a static handle for our Abort/Close button. hWndButton = GetDlgItem(hDlg, IDCANCEL); #ifdef _WIN32_WCE // Set our No-Drag style SetWindowLong(hDlg, GWL_EXSTYLE, WS_EX_NODRAG |GetWindowLong(hDlg, GWL_EXSTYLE)); RECT rc1, rc2, rcEdit; // Get our current client size. GetClientRect(hDlg, &rc1); // Get the window rectangle for the edit control in client coordinates. GetWindowRect(g_hWndEdit, &rcEdit); ScreenToClient(hDlg, ((POINT*)&rcEdit)); ScreenToClient(hDlg, ((POINT*)&rcEdit) + 1); // Resize our dialog to be full screen (same size as parent). GetWindowRect(g_hWndMain, &rc2); MoveWindow(hDlg, rc2.left, rc2.top, rc2.right - rc2.left, rc2.bottom - rc2.top + 1, FALSE); // Get our new client size. GetClientRect(hDlg, &rc2); // Resize our edit box to fill the client. MoveWindow(g_hWndEdit, rcEdit.left, rcEdit.top, (rcEdit.right - rcEdit.left) + (rc2.right - rc1.right), (rcEdit.bottom - rcEdit.top) + (rc2.bottom - rc1.bottom), FALSE); #else // On NT, we just center our dialog over our parent. CenterWindow(hDlg); #endif // Store some globals until the extract/test finishes. pei->hWndEditFile = GetDlgItem(hDlg, IDC_FILE); pei->hWndProgFile = GetDlgItem(hDlg, IDC_FILE_PROGRESS); pei->hWndProgTotal = GetDlgItem(hDlg, IDC_TOTAL_PROGRESS); pei->hWndPercentage = GetDlgItem(hDlg, IDC_PERCENTAGE); pei->hWndFilesProcessed = GetDlgItem(hDlg, IDC_FILES_PROCESSED); pei->hWndBytesProcessed = GetDlgItem(hDlg, IDC_BYTES_PROCESSED); if (pei->fExtract) { // Set our main window's caption. SetCaptionText(TEXT("Extracting")); } else { // Set our main window's caption. SetCaptionText(TEXT("Testing")); // Hide the current file progress for test since it never moves. ShowWindow(pei->hWndProgFile, SW_HIDE); } // Set the ranges on our progress bars. SendMessage(pei->hWndProgFile, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESS_MAX)); SendMessage(pei->hWndProgTotal, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESS_MAX)); // Set our file and byte totals. SetDlgItemText(hDlg, IDC_FILES_TOTAL, FormatValue(szBuffer, pei->dwFileCount)); SetDlgItemText(hDlg, IDC_BYTES_TOTAL, FormatValue(szBuffer, pei->dwByteCount)); // Luanch our Extract/Test thread and wait for WM_PRIVATE DoExtractOrTestFiles(g_szZipFile, pei); return TRUE; case WM_PRIVATE: // Sent with wParam equal to MSG_OPERATION_COMPLETE when // test/extract is complete. // Check to see if the operation was a success if ((pei->result == PK_OK) || (pei->result == PK_WARN)) { // Set all our fields to their "100%" settings. SendMessage(pei->hWndProgFile, PBM_SETPOS, PROGRESS_MAX, 0); SendMessage(pei->hWndProgTotal, PBM_SETPOS, PROGRESS_MAX, 0); SetWindowText(pei->hWndPercentage, TEXT("100%")); SetDlgItemText(hDlg, IDC_FILES_PROCESSED, FormatValue(szBuffer, pei->dwFileCount)); SetDlgItemText(hDlg, IDC_BYTES_PROCESSED, FormatValue(szBuffer, pei->dwByteCount)); } // Update our status text. SetWindowText(pei->hWndEditFile, (pei->result == PK_OK) ? TEXT("Completed. There were no warnings or errors.") : (pei->result == PK_WARN) ? TEXT("Completed. There was one or more warnings.") : (pei->result == PK_ABORTED) ? TEXT("Aborted. There may be warnings or errors.") : TEXT("Completed. There was one or more errors.")); // Clear our global edit handle. g_hWndEdit = NULL; // Update our caption to show that we are done extracting/testing. SetCaptionText(NULL); // Change our abort button to now read "Close". SetWindowText(hWndButton, TEXT("&Close")); EnableWindow(hWndButton, TRUE); // Display an error dialog if an error occurred. if ((pei->result != PK_OK) && (pei->result != PK_WARN)) { MessageBox(hDlg, GetZipErrorString(pei->result), g_szAppName, MB_ICONERROR | MB_OK); } // We are done. Allow the user to close the dialog. fComplete = TRUE; return FALSE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: // If abort is pressed, then set a flag that our worker thread // periodically checks to decide if it needs to bail out. if (!fComplete && !pei->fAbort) { pei->fAbort = TRUE; SetWindowText(hWndButton, TEXT("Aborting...")); EnableWindow(hWndButton, FALSE); return FALSE; } // fall through to IDOK case IDOK: // Don't allow dialog to close until extract/test is complete. if (fComplete) { g_hDlgProgress = NULL; EndDialog(hDlg, LOWORD(wParam)); } return FALSE; } return FALSE; } return FALSE; } //****************************************************************************** BOOL CALLBACK DlgProcViewProgress(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static EXTRACT_INFO *pei; switch (uMsg) { case WM_INITDIALOG: // Globally store our handle so our worker thread can post to us. g_hDlgProgress = hDlg; // Get a pointer to our extract information structure. pei = (EXTRACT_INFO*)lParam; // Center our dialog over our parent. CenterWindow(hDlg); // Store some<?/ UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1  globals until the extract finishes. pei->hWndProgFile = GetDlgItem(hDlg, IDC_FILE_PROGRESS); // Set the ranges on our progress bar. SendDlgItemMessage(hDlg, IDC_FILE_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESS_MAX)); // Luanch our Extract thread and wait for WM_PRIVATE message. DoExtractOrTestFiles(g_szZipFile, pei); return TRUE; case WM_PRIVATE: // Sent with wParam equal to MSG_OPERATION_COMPLETE when // test/extract is complete. // We are done. Close our dialog. Any errors will be reported by // OnActionView(). g_hDlgProgress = NULL; EndDialog(hDlg, LOWORD(wParam)); return FALSE; case WM_COMMAND: // If abort is pressed, then set a flag that our worker thread // periodically checks to decide if it needs to bail out. if ((LOWORD(wParam) == IDCANCEL) && !pei->fAbort) { pei->fAbort = TRUE; SetWindowText(GetDlgItem(hDlg, IDCANCEL), TEXT("Aborting...")); EnableWindow(GetDlgItem(hDlg, IDCANCEL), FALSE); return FALSE; } } return FALSE; } //****************************************************************************** void UpdateProgress(EXTRACT_INFO *pei, BOOL fFull) { DWORD dwFile, dwTotal, dwPercentage; TCHAR szBuffer[_MAX_PATH + 32]; // Compute our file progress bar position. if (pei->dwBytesTotalThisFile) { dwFile = (DWORD)(((DWORDLONG)PROGRESS_MAX * (DWORDLONG)pei->dwBytesWrittenThisFile) / (DWORDLONG)pei->dwBytesTotalThisFile); } else { dwFile = PROGRESS_MAX; } // Set our file progress indicators. SendMessage(pei->hWndProgFile, PBM_SETPOS, dwFile, 0); // If we are only updating our View Progress dialog, then we are done. if (!pei->hWndProgTotal) { return; } // Compute our total progress bar position. dwTotal = (DWORD)(((DWORDLONG)PROGRESS_MAX * (DWORDLONG)(pei->dwBytesWrittenPreviousFiles + pei->dwBytesWrittenThisFile + pei->dwFile)) / (DWORDLONG)(pei->dwByteCount + pei->dwFileCount)); dwPercentage = dwTotal / (PROGRESS_MAX / 100); // Set our total progress indicators. SendMessage(pei->hWndProgTotal, PBM_SETPOS, dwTotal, 0); // Set our total percentage text. _stprintf(szBuffer, TEXT("%u%%"), dwPercentage); SetWindowText(pei->hWndPercentage, szBuffer); // Set our current file and byte process counts. FormatValue(szBuffer, pei->dwFile - 1); SetWindowText(pei->hWndFilesProcessed, szBuffer); FormatValue(szBuffer, pei->dwBytesWrittenPreviousFiles + pei->dwBytesWrittenThisFile); SetWindowText(pei->hWndBytesProcessed, szBuffer); if (fFull) { // Build our message string. _tcscpy(szBuffer, pei->fExtract ? TEXT("Extract") : TEXT("Test")); size_t preflen = _tcslen(szBuffer); MBSTOTSTR(szBuffer+preflen, pei->szFile,countof(szBuffer)-preflen); // Change all forward slashes to back slashes in the buffer. ForwardSlashesToBackSlashes(szBuffer); // Update the file name in our dialog. SetWindowText(pei->hWndEditFile, szBuffer); } } //****************************************************************************** //***** Replace File Dialog Functions //****************************************************************************** int PromptToReplace(LPCSTR szPath) { // Check to see if we are extracting for view only. if (g_fViewing) { // Build prompt. TCHAR szMessage[_MAX_PATH + 128]; _stprintf(szMessage, #ifdef UNICODE TEXT("A file named \"%S\" has already been extracted for viewing. ") #else TEXT("A file named \"%s\" has already been extracted for viewing. ") #endif TEXT("That file might be opened and locked for viewing by another application.\n\n") TEXT("Would you like to attempt to overwirite it with the new file?"), GetFileFromPath(szPath)); // Display prompt. if (IDYES == MessageBox(g_hDlgProgress, szMessage, g_szAppName, MB_ICONWARNING | MB_YESNO)) { // Tell Info-ZIP to continue with extraction. return IDM_REPLACE_YES; } // Remember that the file was skipped and tell Info-ZIP to abort extraction. g_fSkipped = TRUE; return IDM_REPLACE_NO; } // Otherwise, do the normal replace prompt dialog. return DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_REPLACE), g_hWndMain, (DLGPROC)DlgProcReplace, (LPARAM)szPath); } //****************************************************************************** BOOL CALLBACK DlgProcReplace(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { TCHAR szMessage[_MAX_PATH + 32]; switch (uMsg) { case WM_INITDIALOG: // Play the question tone to alert the user. MessageBeep(MB_ICONQUESTION); // Display a message with the file name. #ifdef UNICODE _stprintf(szMessage, TEXT("\"%S\" already exists."), (LPCSTR)lParam); #else _stprintf(szMessage, TEXT("\"%s\" already exists."), (LPCSTR)lParam); #endif // Change all forward slashes to back slashes in the buffer. ForwardSlashesToBackSlashes(szMessage); // Display the file string. SetDlgItemText(hDlg, IDC_FILE, szMessage); // Center our dialog over our parent. CenterWindow(hDlg); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: case IDOK: EndDialog(hDlg, IDM_REPLACE_NO); break; case IDM_REPLACE_ALL: case IDM_REPLACE_NONE: case IDM_REPLACE_YES: case IDM_REPLACE_NO: EndDialog(hDlg, wParam); break; } return FALSE; } return FALSE; } //****************************************************************************** //***** Password Dialog Functions //****************************************************************************** #if CRYPT BOOL CALLBACK DlgProcPassword(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { // Return Values: // IZ_PW_ENTERED got some PWD string, use/try it // IZ_PW_CANCEL no password available (for this entry) // IZ_PW_CANCELALL no password, skip any further PWD request // IZ_PW_ERROR failure (no mem, no tty, ...) static DECRYPT_INFO *pdi; TCHAR szMessage[_MAX_PATH + 32]; switch (uMsg) { case WM_INITDIALOG: // Play the question tone to alert the user. MessageBeep(MB_ICONQUESTION); #ifdef _WIN32_WCE // Add "Ok" button to caption bar. SetWindowLong(hDlg, GWL_EXSTYLE, WS_EX_CAPTIONOKBTN | GetWindowLong(hDlg, GWL_EXSTYLE)); #endif // Store our decrypt information structure. pdi = (DECRYPT_INFO*)lParam; // Display a message with the file name. #ifdef UNICODE _stprintf(szMessage, TEXT("\"%S\" is encrypted."), pdi->szFile); #else _stprintf(szMessage, TEXT("\"%s\" is encrypted."), pdi->szFile); #endif // Change all forward slashes to back slashes in the buffer. ForwardSlashesToBackSlashes(szMessage); // Display the message with the file name. SetDlgItemText(hDlg, IDC_FILE, szMessage); // Display the appropriate prompt. =-# UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1 : if (pdi->retry) { _stprintf(szMessage, TEXT("Password was incorrect. Please re-enter (%d/%d)."), MAX_PASSWORD_RETRIES - pdi->retry + 2, MAX_PASSWORD_RETRIES + 1); SetDlgItemText(hDlg, IDC_PROMPT, szMessage); } else { SetDlgItemText(hDlg, IDC_PROMPT, TEXT("Please enter the password.")); } // Limit the password to the size of the password buffer we have been given. SendDlgItemMessage(hDlg, IDC_PASSWORD, EM_LIMITTEXT, pdi->nSize - 1, 0); // Center our dialog over our parent. CenterWindow(hDlg); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: // Store the password in our return password buffer. GetDlgItemText(hDlg, IDC_PASSWORD, szMessage, countof(szMessage)); TSTRTOMBS(pdi->szPassword, szMessage, pdi->nSize); EndDialog(hDlg, IZ_PW_ENTERED); return FALSE; case IDCANCEL: g_fSkipped = TRUE; EndDialog(hDlg, IZ_PW_CANCEL); return FALSE; case IDC_SKIP_ALL: g_fSkipped = TRUE; EndDialog(hDlg, IZ_PW_CANCELALL); return FALSE; } return FALSE; } return FALSE; } #endif // CRYPT //****************************************************************************** //***** View Association Dialog Functions //****************************************************************************** BOOL CALLBACK DlgProcViewAssociation(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static LPTSTR szApp; switch (uMsg) { case WM_INITDIALOG: // Store the path buffer for our application. szApp = (LPTSTR)lParam; // Read our default viewer from the registry. #ifdef _WIN32_WCE GetOptionString(TEXT("FileViewer"), TEXT("\\Windows\\PWord.exe"), szApp, sizeof(TCHAR) * _MAX_PATH); #else GetOptionString(TEXT("FileViewer"), TEXT("notepad.exe"), szApp, sizeof(TCHAR) * _MAX_PATH); #endif // Limit our edit control to our buffer size. SendDlgItemMessage(hDlg, IDC_PATH, EM_LIMITTEXT, _MAX_PATH - 1, 0); // Set our path string in our dialog. SetDlgItemText(hDlg, IDC_PATH, szApp); // Center our dialog over our parent. CenterWindow(hDlg); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: // Get the text currently in the path edit box and store it. GetDlgItemText(hDlg, IDC_PATH, szApp, _MAX_PATH); WriteOptionString(TEXT("FileViewer"), szApp); // Fall through case IDCANCEL: EndDialog(hDlg, LOWORD(wParam)); break; case IDC_BROWSE: // Get the text currently in the path edit box. GetDlgItemText(hDlg, IDC_PATH, szApp, _MAX_PATH); // Get the direcory from the path text. ForwardSlashesToBackSlashes(szApp); TCHAR szInitialDir[_MAX_PATH], *szFile; _tcscpy(szInitialDir, szApp); if (szFile = _tcsrchr(szInitialDir, TEXT('\\'))) { *szFile = TEXT('\0'); } // Prepare to display browse dialog. OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = hDlg; ofn.hInstance = g_hInst; ofn.lpstrFilter = TEXT("Programs (*.exe)\0*.exe\0All Files (*.*)\0*.*\0"); ofn.nFilterIndex = 1; ofn.lpstrFile = szApp; ofn.nMaxFile = _MAX_PATH; ofn.lpstrInitialDir = szInitialDir; ofn.lpstrTitle = TEXT("Open With..."); ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; ofn.lpstrDefExt = TEXT("exe"); // Display the browse dialog and update our path edit box if neccessary. if (GetOpenFileName(&ofn)) { SetDlgItemText(hDlg, IDC_PATH, szApp); } break; } return FALSE; } return FALSE; } //****************************************************************************** //***** Comment Dialog Functions //****************************************************************************** BOOL CALLBACK DlgProcComment(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { RECT rc; HCURSOR hCur; int result; switch (uMsg) { case WM_INITDIALOG: // Get the handle to our edit box and store it globally. g_hWndEdit = GetDlgItem(hDlg, IDC_COMMENT); // Disable our edit box from being edited. DisableEditing(g_hWndEdit); #ifdef _WIN32_WCE // Add "Ok" button to caption bar and make window No-Drag. SetWindowLong(hDlg, GWL_EXSTYLE, WS_EX_CAPTIONOKBTN | WS_EX_NODRAG | GetWindowLong(hDlg, GWL_EXSTYLE)); // On CE, we resize our dialog to be full screen (same size as parent). GetWindowRect(g_hWndMain, &rc); MoveWindow(hDlg, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top + 1, FALSE); #else // On NT we just center the dialog. CenterWindow(hDlg); #endif // Set our edit control to be the full size of our dialog. GetClientRect(hDlg, &rc); MoveWindow(g_hWndEdit, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE); // Show hour glass cursor while processing comment. hCur = SetCursor(LoadCursor(NULL, IDC_WAIT)); // Let Info-ZIP and our callbacks do the work. result = DoGetComment(g_szZipFile); // Restore/remove our cursor. SetCursor(hCur); // Display an error dialog if an error occurred. if ((result != PK_OK) && (result != PK_WARN)) { MessageBox(g_hWndMain, GetZipErrorString(result), g_szAppName, MB_ICONERROR | MB_OK); } // Clear our global edit box handle as we are done with it. g_hWndEdit = NULL; // Return FALSE to prevent edit box from gaining focus and showing highlight. return FALSE; case WM_COMMAND: if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { EndDialog(hDlg, LOWORD(wParam)); } return FALSE; } return FALSE; } //****************************************************************************** //***** About Dialog Functions //****************************************************************************** BOOL CALLBACK DlgProcAbout(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: #ifdef _WIN32_WCE // Add "Ok" button to caption bar. SetWindowLong(hDlg, GWL_EXSTYLE, WS_EX_CAPTIONOKBTN | GetWindowLong(hDlg, GWL_EXSTYLE)); #endif // Fill in a few static members. // (For VER_FULLVERSION_STR and VER_COMMENT_STR, the TEXT() macro is // not applicable, because they are defined as a set of concatenated // string constants. These strings need to be converted to UNICODE // at runtime, sigh.) TCHAR szBuffer[80]; SetDlgItemText(hDlg, IDC_PRODUCT, TEXT(VER_PRODUCT_STR)); #ifdef UNICODE _stprintf(>kF UNZIP.BCK ! [UNZIP542.WINCE]WINMAIN.CPP;1LI.AXP_OLB;1  szBuffer, TEXT("Freeware Version %S"), VER_FULLVERSION_STR); #else _stprintf(szBuffer, TEXT("Freeware Version %s"), VER_FULLVERSION_STR); #endif SetDlgItemText(hDlg, IDC_VERSION, szBuffer); _stprintf(szBuffer, TEXT("Developed by %s"), TEXT(VER_DEVELOPER_STR)); SetDlgItemText(hDlg, IDC_DEVELOPER, szBuffer); SetDlgItemText(hDlg, IDC_COPYRIGHT, TEXT(VER_COPYRIGHT_STR)); #ifdef UNICODE _stprintf(szBuffer, TEXT("%S"), VER_COMMENT_STR); SetDlgItemText(hDlg, IDC_COMMENT, szBuffer); #else SetDlgItemText(hDlg, IDC_COMMENT, VER_COMMENT_STR); #endif // Center the dialog over our parent. CenterWindow(hDlg); return TRUE; case WM_COMMAND: if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { EndDialog(hDlg, 0); } return FALSE; } return FALSE; } c*[UNZIP542.WINCE]WINMAIN.H;1+,. / 4 -! 0@123KPWO 564a74a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ //****************************************************************************** // // File: WINMAIN.H // // Description: This module contains all the Windows specific decalrations for // Pocket UnZip. See WINMAIN.CPP for a more detailed description // and the actual implementation. // // Copyright: All the source files for Pocket UnZip, except for components // written by the Info-ZIP group, are copyrighted 1997 by Steve P. // Miller. The product "Pocket UnZip" itself is property of the // author and cannot be altered in any way without written consent // from Steve P. Miller. // // Disclaimer: All project files are provided "as is" with no guarantee of // their correctness. The authors are not liable for any outcome // that is the result of using this source. The source for Pocket // UnZip has been placed in the public domain to help provide an // understanding of its implementation. You are hereby granted // full permission to use this source in any way you wish, except // to alter Pocket UnZip itself. For comments, suggestions, and // bug reports, please write to stevemil@pobox.com. // // // Date Name History // -------- ------------ ----------------------------------------------------- // 02/01/97 Steve Miller Created (Version 1.0 using Info-ZIP UnZip 5.30) // //****************************************************************************** #ifndef __WINMAIN_H__ #define __WINMAIN_H__ #ifdef __cplusplus extern "C" { #endif //****************************************************************************** //***** Constants / Macros //****************************************************************************** #define MRU_MAX_FILE 4 // Should not exceed 9 #define MRU_START_ID 501 #define WM_PRIVATE 0x9999 #define MSG_SUBCLASS_DIALOG 1 #define MSG_INIT_DIALOG 2 #define MSG_ADD_TEXT_TO_EDIT 3 #define MSG_PROMPT_TO_REPLACE 4 #define MSG_PROMPT_FOR_PASSWORD 5 #define MSG_UPDATE_PROGRESS_PARTIAL 6 #define MSG_UPDATE_PROGRESS_COMPLETE 7 #define MSG_OPERATION_COMPLETE 8 #define IDC_SAVE_FILE_LIST 12 #define IDC_SAVE_NAME_PROMPT 1023 #define IDC_SAVE_NAME_EDIT 1021 #define IDC_SAVE_TYPE_PROMPT 1022 #define IDC_SAVE_TYPE_LIST 1020 #define PROGRESS_MAX 32768 #define ZFILE_ATTRIBUTE_VOLUME 0x00000008 #define ZFILE_ATTRIBUTE_ENCRYPTED 0x10000000 #define ZFILE_ATTRIBUTE_COMMENT 0x20000000 #define IMAGE_VOLUME 0 #define IMAGE_FOLDER 1 #define IMAGE_APPLICATION 2 #define IMAGE_GENERIC 3 #ifndef LVS_EX_FULLROWSELECT #define LVS_EX_FULLROWSELECT 0x00000020 #endif // LVM_SETEXTENDEDLISTVIEWSTYLE came after VC 4.0 #ifndef LVM_SETEXTENDEDLISTVIEWSTYLE #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 54) #endif // LVM_GETEXTENDEDLISTVIEWSTYLE came after VC 4.0 #ifndef LVM_GETEXTENDEDLISTVIEWSTYLE #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 55) #endif #ifdef _WIN32_WCE #define CheckDlgButton(hDlg, ctrl, fChecked) \ SendDlgItemMessage(hDlg, ctrl, BM_SETCHECK, fChecked, 0) #define IsDlgButtonChecked(hDlg, ctrl) \ SendDlgItemMessage(hDlg, ctrl, BM_GETCHECK, 0, 0) #endif //****************************************************************************** //***** Types and Structures //****************************************************************************** typedef struct _FILE_TYPE_NODE { struct _FILE_TYPE_NODE *pNext; int image; CHAR szExtAndDesc[2]; } FILE_TYPE_NODE, *LPFILE_TYPE_NODE; typedef struct _FILE_NODE { DWORD dwSize; DWORD dwCompressedSize; DWORD dwModified; DWORD dwAttributes; DWORD dwCRC; LPCSTR szComment; LPCSTR szType; CHAR szPathAndMethod[2]; } FILE_NODE, *LPFILE_NODE; typedef struct _COLUMN { LPTSTR szName; int format; } COLUMN, *LPCOLUMN; //****************************************************************************** //***** Exported Function Prototypes //****************************************************************************** void AddFileToListView(FILE_NODE *pFile); LPCSTR GetFileFromPath(LPCSTR szPath); void ForwardSlashesToBackSlashesA(LPSTR szBuffer); //****************************************************************************** //***** Global Variables //****************************************************************************** #ifdef GLOBAL_DECLARE #undef GLOBAL_DECLARE #undef GLOBAL_INIT #endif #ifdef __WINMAIN_CPP__ #define GLOBAL_DECLARE #define GLOBAL_INIT(value) =value #else #define GLOBAL_DECLARE extern #define GLOBAL_INIT(value) #endif GLOBAL_DECLARE HINSTANCE g_hInst GLOBAL_INIT(NULL); GLOBAL_DECLARE HWND g_hWndMain GLOBAL_INIT(NULL); GLOBAL_DECLARE HWND g_hWndEdit GLOBAL_INIT(NULL); GLOBAL_DECLARE HWND g_hDlgProgress GLOBAL_INIT(NULL); GLOBAL_DECLARE CHAR g_szZipFile[_MAX_PATH] GLOBAL_INIT(""); #ifdef __cplusplus } // extern "C" #endif #endif // __WINMAIN_H__ *[UNZIP542.WINCE]ZIPFILE.IC2;1+,./ 4-! 0@123KPWO56U!;7U!;89GHJ?ߛ UNZIP.BCK! [UNZIP542.WINCE]ZIPFILE.IC2;1LI.AXP_OLB;1 &( @jUUQEUP(R*e*љJ>P锨>eDDDC@UUUT>P (UU@@ꪩUP( @JUNPzzAzxzzzjUPT?*[UNZIP542.WINCE]ZIPFILE.ICO;1+,F./ 46-! 0@123KPWO56U!;7U!;89GHJ &(( @wpwwwwppwwxwwwwpwwwxwwwwppwxwwwwwxxwxwwwwwpwwwwwwwpxxwpppxpppwwwwwwwwwwpwpwwwwwwwwwwwpwwwwwwwwwwwwxwwwwwwwwwwwwxwwwwwwwwwwwwxwwwwwwwwwwwwxwwwwwwwxwwwwwwwwwwx( wxwwwxwwwwpwwpwwwwxwwwwwxwwwwwx?*[UNZIP542]WINDLL.DIR;1+,p './ 4- 0123 KPWO568׉?!a78׉?!a89GHJI CONTENTS.+DECS.H( GUISFX.DIR~ 4 STRUCTS.H UNZIPLIB.DEFUNZVER.H( UZEXAMPL.Ce UZEXAMPL.HVB.DIR VC5.DIR VC6.DIR fWINDLL.C6WINDLL.H WINDLL.RCO WINDLL.TXT WINDLL16.DEF/ WINDLL32.DEF WINDLLGCC.DEF1*[UNZIP542.WINDLL]CONTENTS.;1+,+./ 4-p '0@123KPWO56O6@7O6@89GHJContents of the "windll" subdirectory for UnZip 5.4 and later: Contents this file windll16.def definition file for 16-bit UnZip DLL windll32.def definition file for 32-bit UnZip DLL windllgcc.def definition file for 32-bit UnZip DLL, variant for GCC tools unziplib.def definition file for 32-bit UnZip library windll.c contains the entry point for the DLL, "fake" printing, sound, rename, replace and password functions windll.h header file for both 16- and 32-bit DLLs unzver.h versioning information for resource file, and also used by WiZ application itself decs.h Exported function declarations. windll.rc resource file for both 16- and 32-bit DLLs windll.txt simplistic explanation of how to use DLL structs.h header file, used by both the DLL and by WiZ, that defines several structures passed to the DLL uzexampl.c a very simplistic example of how to load the DLL and make a call into it uzexampl.h header file for uzexampl.c guisfx\ directory with GUI frontend for SFX stub dialog.h interface declarations to dialog definition sfxw.ico icon graphic (binary file!) sfxwiz.c main source module for SFX stub sfxwiz.dlg dialog window definitions sfxwiz.rc resourses for GUISFX stub sfxwiz16.mak makefile for 16-bit GUISFX stub (Borland C++ 4.52) unzsfx16.def linker definition file for 16-bit unzipsfx static library vb\ example files for using the Visual C++ DLL with Visual Basic vc5\dll\ directory with DLL project for Visual C++ 5.0 vc5\lib\ directory with LIB project for Visual C++ 5.0 vc5\sfx\ directory with SFX project files for Visual C++ 5.0 SFXWiz32.dsp MS Visual C++ 5.0 project file for 32-bit GUISFX stub SFXWiz32.dsw MS Visual C++ 5.0 workspace file for 32-bit GUISFX stub unzsfx32.dsp MS Visual C++ 5.0 project for 32-bit sfxunzip static lib vc6\dll\ directory with DLL project for Visual C++ 6.0 vc6\lib\ directory with LIB project for Visual C++ 6.0 vc6\sfx\ directory with SFX project files for Visual C++ 6.0 SFXWiz32.dsp MS Visual C++ 6.0 project file for 32-bit GUISFX stub SFXWiz32.dsw MS Visual C++ 6.0 workspace file for 32-bit GUISFX stub unzsfx32.dsp MS Visual C++ 6.0 project for 32-bit sfxunzip static lib If you want to build the UnZip DLL or the WinGUI SFX stub from the command line, you mai use the MSC Makefile supplied in the subdirectory of the Win32 command line port. Note that Borland C++ 5.0 is full of bugs; version 4.5 or 5.01 is recommended instead. If you must use Borland C++ 5.0, using the Intel optimizing compiler is required to avoid crashes (possibly due to a bug in the stat() function in the normal Borland compiler). This does have the advantage of giving you a smaller code size than the 4.52 compiler. Borland C++ 5.01 has resolved many of the problems seen with 5.0 and can be used reliably. *[UNZIP542.WINDLL]DECS.H;1+,(./ 4--p '0@123KPWO56s 7s 89GHJ@q UNZIP.BCK(p '[UNZIP542.WINDLL]DECS.H;1ZIPCLI.AXP_OLB;1/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __decs_h /* prevent multiple inclusions */ #define __decs_h #include #ifndef __unzip_h # include "../unzip.h" #endif #ifndef __structs_h # include "../windll/structs.h" #endif #define Wiz_Match match void WINAPI Wiz_NoPrinting(int f); int WINAPI Wiz_Validate(LPSTR archive, int AllCodes); BOOL WINAPI Wiz_Init(zvoid *, LPUSERFUNCTIONS); BOOL WINAPI Wiz_SetOpts(zvoid *, LPDCL); int WINAPI Wiz_Unzip(zvoid *, int, char **, int, char **); int WINAPI Wiz_SingleEntryUnzip(int, char **, int, char **, LPDCL, LPUSERFUNCTIONS); int WINAPI Wiz_UnzipToMemory(LPSTR zip, LPSTR file, LPUSERFUNCTIONS lpUserFunctions, UzpBuffer *retstr); int WINAPI Wiz_Grep(LPSTR archive, LPSTR file, LPSTR pattern, int cmd, int SkipBin, LPUSERFUNCTIONS lpUserFunctions); #endif /* __decs_h */ *[UNZIP542.WINDLL]GUISFX.DIR;1+,~ 4./ 4-p '0123 KPWO56yO@!a7yO@!a89GHJIDIALOG.H3SFXW.ICO SFXWIZ.C  SFXWIZ.DLG  SFXWIZ.RC  SFXWIZ16.MAK  UNZSFX16.DEF "*[UNZIP542.WINDLL.GUISFX]DIALOG.H;1+,3./ 4-~ 40@123KPWO56Z$ 7Z$ 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* dialog.h for sfxwiz */ #define ICN_INSTALL 10 #define IDM_REPLACE_NO 100 #define IDM_REPLACE_TEXT 101 #define IDM_REPLACE_YES 102 #define IDM_REPLACE_ALL 103 #define IDM_REPLACE_NONE 104 #define ID_TARGET 201 #define ID_TEXT1 202 #define ID_TEXT2 203 #define ID_TEXT3 204 #define ID_BROWSE 205 #define ID_INSTALL 206 #define ID_INFOZIP 207 #define ID_AUTHOR 208 #define ID_EMAIL 209 #define ID_STATUS 210 #define INITDIALOG 300 "*[UNZIP542.WINDLL.GUISFX]SFXW.ICO;1+, ./ 4-~ 40@123KPWO56JeҜ7JeҜ89GHJ ( @ə əə̜̙̜̙̙əə"*[UNZIP542.WINDLL.GUISFX]SFXWIZ.C;1+, .!/ 4!!d-~ 40@123KPWO"56,dQ7,dQ89GHJ /* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #include #include #ifdef WIN32 # if defined(__LCC__) # include # include # include # endif #include #else #include #include #include #include #include #include #include #endif #include "dialog.h" #ifndef UzpMatch #define UzpMatch match #endif #include "../structs.h" #include "../decs.h" LPUSERFUNCTIONS lpUserFunctions; HANDLE hUF = (HANDLE)NULL; LPDCL lpDCL = NULL; HANDLE hZUF = (HANDLE)NULL; HANDLE hDCL = (HANDLE)NULL; BOOL fDoAll = FALSE; char ** argv; HINSTANCE hInst; HWND hWnd; #ifndef TCHAR #define TCHAR char #endif #ifndef _MAX_PATH #define _MAX_PATH 260 #endif int WINAPI password(LPSTR p, int n, LPCSTR m, LPCSTR name); int WINAPI DisplayBuf(TCHAR far *buf, unsigned long size); int WINAPI GetReplaceDlgRetVal(TCHAR *filename); void WINAPI ReceiveDllMessage(unsigned long ucsize, unsigned long csiz, unsigned cfactor, unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, TCHAR c, LPSTR filename, LPSTR methbuf, unsigned long crc, TCHAR fCrypt); char szAppName[_MAX_PATH]; char szTarget[_MAX_PATH]; char szThisApp[_MAX_PATH]; int iReturn; DLGPROC fpProc; #ifndef MAX_PATH #define MAX_PATH _MAX_PATH // maximum path =length #endif #define TRUE 1 // true value #define FALSE 0 // false value TCHAR zfn[MAX_PATH], // zip filename and path szHomeDir[MAX_PATH]; // Original directory /**************************************************************************** FUNCTION: Replace(HWND, WORD, WPARAM, LPARAM) PURPOSE: Processes messages for "Replace" dialog box MESSAGES: WM_INITDIALOG - initialize dialog box WM_COMMAND - Input received ****************************************************************************/ BOOL WINAPI ReplaceProc(HWND hReplaceDlg, WORD wMessage, WPARAM wParam, LPARAM lParam) { static char __far *lpsz; TCHAR szTemp[MAX_PATH]; switch (wMessage) { case WM_INI`AV"x UNZIP.BCK ~ 4"[UNZIP542.WINDLL.GUISFX]SFXWIZ.C;1P_OLB;1!StTDIALOG: lpsz = (char __far *)lParam; wsprintf(szTemp, "Replace %s ?", (LPSTR)lpsz); SetDlgItemText(hReplaceDlg, IDM_REPLACE_TEXT, szTemp); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: /* ESC key */ case IDOK: /* Enter key */ EndDialog(hReplaceDlg, IDM_REPLACE_NO); break; case IDM_REPLACE_ALL: fDoAll = TRUE; case IDM_REPLACE_NONE: case IDM_REPLACE_YES: case IDM_REPLACE_NO: EndDialog(hReplaceDlg, wParam); break; } return TRUE; } return FALSE; } /**************************************************************************** FUNCTION: GetDirProc(HWND, unsigned, WPARAM, LPARAM) PURPOSE: Processes messages for "Set Reference Dir Procedure for Update Archive" dialog box MESSAGES: WM_INITDIALOG - initialize dialog box WM_COMMAND - Input received ****************************************************************************/ #ifdef WIN32 BOOL WINAPI GetDirProc(HWND hDlg, WORD wMessage, WPARAM wParam, LPARAM lParam) { switch (wMessage) { case WM_INITDIALOG: /* Common control identifiers for GetOpenFileName and GetSaveFileName Control identifier Control Description cmb2 Drop-down combo box that displays the current drive or folder, and that allows the user to select a drive or folder to open stc4 Label for the cmb2 combo box lst1 List box that displays the contents of the current drive or folder stc1 Label for the lst1 list box edt1 Edit control that displays the name of the current file, or in which the user can type the name of the file to open stc3 Label for the edt1 edit control cmb1 Drop-down combo box that displays the list of file type filters stc2 Label for the cmb1 combo box chx1 The read-only check box IDOK The OK command button (push button) IDCANCEL The Cancel command button (push button) pshHelp The Help command button (push button) */ CommDlg_OpenSave_HideControl(GetParent(hDlg), cmb1); CommDlg_OpenSave_HideControl(GetParent(hDlg), stc2); CommDlg_OpenSave_HideControl(GetParent(hDlg), edt1); CommDlg_OpenSave_HideControl(GetParent(hDlg), stc3); CommDlg_OpenSave_SetControlText(GetParent(hDlg), IDOK, "Set"); break; default: break; } return DefWindowProc(hDlg, wMessage, wParam, lParam); } #else #ifdef __BORLANDC__ #pragma argsused #endif BOOL WINAPI GetDirProc(HWND hwndDlg, WORD wMessage, WPARAM wParam, LPARAM lParam) { HWND hTemp; switch (wMessage) { case WM_INITDIALOG: hTemp = GetDlgItem(hwndDlg, lst1); EnableWindow(hTemp, FALSE); ShowWindow(hTemp, SW_HIDE); hTemp = GetDlgItem(hwndDlg, edt1); EnableWindow(hTemp, FALSE); ShowWindow(hTemp, SW_HIDE); hTemp = GetDlgItem(hwndDlg, stc2); EnableWindow(hTemp, FALSE); ShowWindow(hTemp, SW_HIDE); hTemp = GetDlgItem(hwndDlg, stc3); EnableWindow(hTemp, FALSE); ShowWindow(hTemp, SW_HIDE); hTemp = GetDlgItem(hwndDlg, cmb1); EnableWindow(hTemp, FALSE); ShowWindow(hTemp, SW_HIDE); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: EndDialog(hwndDlg, FALSE); break; case IDOK: getcwd(szTarget, MAX_PATH); EndDialog(hwndDlg, TRUE); break; } default: break; } return FALSE; } #endif /* !WIN32 */ #ifdef __BORLANDC__ #pragma argsused #endif BOOL FAR PASCAL InitDialogProc (HWND hDlg, WORD wMsg, WORD wParam, LONG lParam) { BOOL fProcessed = TRUE; TCHAR szMessage[256]; RECT rc; switch (wMsg) { case WM_INITDIALOG: hWnd = hDlg; SetWindowText(hDlg,(LPSTR) szAppName); SetDlgItemText(hDlg,ID_TARGET,(LPSTR)szTarget); #ifdef WIN32 GetCurrentDirectory(MAX_PATH, szHomeDir); SetCurrentDirectory(szTarget); #else getcwd(szHomeDir, MAX_PATH); chdir(szTarget); setdisk(toupper(szTarget[0]) - 'A'); #endif GetWindowRect(hDlg, &rc); SetWindowPos(hDlg, NULL, (GetSystemMetrics(SM_CXSCREEN) - (rc.right - rc.left)) / 2, (GetSystemMetrics(SM_CYSCREEN) - (rc.bottom - rc.top)) / 3, 0, 0, SWP_NOSIZE | SWP_NOZORDER); break; case WM_COMMAND: switch (wParam) { case ID_BROWSE : { #ifndef WIN32 FARPROC lpGetDirProc; #endif char szTemp[MAX_PATH]="mike_~@~*"; OPENFILENAME ofn; memset(&ofn, '\0', sizeof(OPENFILENAME)); /* init struct */ ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hWnd; ofn.hInstance = hInst; ofn.lpstrFilter = NULL; ofn.nFilterIndex = 1; ofn.lpstrFile = szTemp; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = NULL; ofn.nMaxFileTitle = MAX_PATH; /* ignored ! */ ofn.lpstrTitle = (LPSTR)"Set Extraction Directory"; ofn.lpstrInitialDir = NULL; ofn.Flags = OFN_ENABLEHOOK | #ifdef WIN32 OFN_EXPLORER| #endif OFN_HIDEREADONLY|OFN_NOVALIDATE; #ifndef WIN32 lpGetDirProc = MakeProcInstance((FARPROC)GetDirProc, hInst); #ifndef MSC (UINT CALLBACK *)ofn.lpfnHook = (UINT CALLBACK *)lpGetDirProc; #else ofn.lpfnHook = lpGetDirProc; #endif #else ofn.lpfnHook = (LPOFNHOOKPROC)GetDirProc; #endif ofn.lpTemplateName = "GETDIR"; /* see getfiles.dlg */ if (!GetOpenFileName(&ofn)) { break; } ofn.lpstrFile[ofn.nFileOffset-1] = '\0'; #ifdef WIN32 SetCurrentDirectory(ofn.lpstrFile); #else getcwd(szTemp, MAX_PATH); chdir(ofn.lpstrFile); setdisk(toupper(ofn.lpstrFile[0]) - 'A'); #endif lstrcpy(szTarget,ofn.lpstrFile); SetDlgItemText(hDlg,ID_TARGET,(LPSTR)szTarget); } break; case IDOK: #ifdef WIN32 GetCurrentDirectory(_MAX_PATH,szTarget); #else getcwd(szTarget, _MAX_PATH); #endif lpDCL->ncflag = 0; lpDCL->fQuiet = 0; // If not zero, no status messages will come through lpDCL->ntflag = 0; lpDCL->nvflag = 0; lpDCL->nzflag = 0; lpDCL->ndflag = 1; lpDCL->naflag = 0; lpDCL->nfflag = 0; lpDCL->noflag = 0; lpDCL->PromptToOverwrite = 1; lpDCL->ExtractOnlyNewer = 0; lpDCL->lpszZipFN = zfn; lpDCL->lpszExtractDir = NULL; iReturn = Wiz_SingleEntryUnzip(0, NULL, 0, NULL, lpDCL, lpUserFunctions); /* external return codes for unzip library */ //#define PK_OK 0 /* no error */ //#define PK_COOL 0 /* no error */ //#define PK_GNARLY 0 /* no error */ //#define PK_WARN 1 /* warning error */ //#define PK_ERR 2 /* error in zipfile */ //B]( UNZIP.BCK ~ 4"[UNZIP542.WINDLL.GUISFX]SFXWIZ.C;1X_DECC_OLB;1!#define PK_BADERR 3 /* severe error in zipfile */ //#define PK_MEM 4 /* insufficient memory (during initialization) */ //#define PK_MEM2 5 /* insufficient memory (password failure) */ //#define PK_MEM3 6 /* insufficient memory (file decompression) */ //#define PK_MEM4 7 /* insufficient memory (memory decompression) */ //#define PK_MEM5 8 /* insufficient memory (not yet used) */ //#define PK_NOZIP 9 /* zipfile not found */ //#define PK_PARAM 10 /* bad or illegal parameters specified */ //#define PK_FIND 11 /* no files found */ //#define PK_DISK 50 /* disk full */ //#define PK_EOF 51 /* unexpected EOF */ //#define IZ_CTRLC 80 /* user hit ^C to terminate */ //#define IZ_UNSUP 81 /* no files found: all unsup. compr/encrypt. */ //#define IZ_BADPWD 82 /* no files found: all had bad password */ /* internal and DLL-only return codes */ //#define IZ_DIR 76 /* potential zipfile is a directory */ //#define IZ_CREATED_DIR 77 /* directory created: set time and permissions */ //#define IZ_VOL_LABEL 78 /* volume label, but can't set on hard disk */ //#define IZ_EF_TRUNC 79 /* local extra field truncated (PKZIP'd) */ /* return codes of password fetches (negative = user abort; positive = error) */ //#define IZ_PW_ENTERED 0 /* got some password string; use/try it */ //#define IZ_PW_CANCEL -1 /* no password available (for this entry) */ //#define IZ_PW_CANCELALL -2 /* no password, skip any further pwd. request */ //#define IZ_PW_ERROR 5 /* = PK_MEM2 : failure (no mem, no tty, ...) */ switch (iReturn) { case PK_OK: wsprintf(szMessage, "%s", "All files extracted OK"); break; case PK_ERR: wsprintf(szMessage, "%s", "Warning occurred on one or more files"); break; case PK_BADERR: wsprintf(szMessage, "%s", "Error in archive"); break; case PK_MEM: case PK_MEM2: case PK_MEM3: case PK_MEM4: case PK_MEM5: wsprintf(szMessage, "%s", "Insufficient memory"); break; case PK_NOZIP: wsprintf(szMessage, "%s", "Archive not found"); break; case PK_FIND: wsprintf(szMessage, "%s", "No files found"); break; case PK_DISK: wsprintf(szMessage, "%s", "Disk full"); break; case PK_EOF: wsprintf(szMessage, "%s", "Unexpected end of file"); break; case IZ_UNSUP: wsprintf(szMessage, "%s", "No files found: All unsupported"); break; case IZ_BADPWD: wsprintf(szMessage, "%s", "No files found: Bad password"); break; default: wsprintf(szMessage, "%s", "Unknown error"); break; } MessageBox(hDlg, szMessage, szAppName, MB_OK); /* Uncomment line below to have SFXWix terminate automatically when done. */ // EndDialog(hDlg, wParam); break; case IDCANCEL: EndDialog(hDlg, wParam); PostQuitMessage(0); exit(0); // ..and then quit break; } break; default: fProcessed = FALSE; break; } return(fProcessed); } #define WasCancelled(hDlg) (!IsWindowEnabled(GetDlgItem(hDlg,IDCANCEL))) #ifdef __BORLANDC__ #pragma argsused #endif int WINAPI password(LPSTR p, int n, LPCSTR m, LPCSTR name) { TCHAR sz[MAX_PATH]; sprintf(sz, "%s is encrypted", name); MessageBox(hWnd, sz, "Encryption not supported", MB_OK); return IZ_PW_CANCELALL; } int WINAPI DisplayBuf(TCHAR far *buf, unsigned long size) { if ((buf[0] != '\n') && (buf[0] != '\r')) SetDlgItemText(hWnd, ID_STATUS, buf); return (unsigned int) size; } int WINAPI GetReplaceDlgRetVal(TCHAR *filename) { #ifndef WIN32 FARPROC lpfnprocReplace; #endif int ReplaceDlgRetVal; /* replace dialog return value */ #ifdef WIN32 ReplaceDlgRetVal = DialogBoxParam(hInst, "Replace", hWnd, (DLGPROC)ReplaceProc, (DWORD)(LPSTR)filename); #else lpfnprocReplace = MakeProcInstance(ReplaceProc, hInst); ReplaceDlgRetVal = DialogBoxParam(hInst, "Replace", hWnd, lpfnprocReplace, (DWORD)(LPSTR)filename); FreeProcInstance(lpfnprocReplace); #endif return ReplaceDlgRetVal; } #ifdef __BORLANDC__ #pragma argsused #endif void WINAPI ReceiveDllMessage(unsigned long ucsize, unsigned long csiz, unsigned cfactor, unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, TCHAR c, LPSTR filename, LPSTR methbuf, unsigned long crc, TCHAR fCrypt) { } #ifdef __BORLANDC__ #pragma argsused #endif int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { TCHAR *ptr = NULL; hInst = hInstance; hDCL = GlobalAlloc( GPTR, (DWORD)sizeof(DCL)); if (!hDCL) { return 0; } lpDCL = (LPDCL)GlobalLock(hDCL); if (!lpDCL) { return 0; } hUF = GlobalAlloc( GPTR, (DWORD)sizeof(USERFUNCTIONS)); if (!hUF) { return 0; } lpUserFunctions = (LPUSERFUNCTIONS)GlobalLock(hUF); if (!lpUserFunctions) { return 0; } lpUserFunctions->password = password; lpUserFunctions->print = DisplayBuf; lpUserFunctions->sound = NULL; lpUserFunctions->replace = GetReplaceDlgRetVal; lpUserFunctions->SendApplicationMessage = ReceiveDllMessage; lpUserFunctions->ServCallBk = NULL; GetModuleFileName(hInstance,(LPSTR)szThisApp,sizeof(szThisApp)); lstrcpy(zfn, szThisApp); ptr = strrchr(szThisApp, '\\'); if (ptr != NULL) { lstrcpy(szAppName, ptr); ptr[0] = '\0'; lstrcpy(szTarget, szThisApp); iReturn = DialogBox(hInstance, MAKEINTRESOURCE(INITDIALOG), (HWND)NULL, (DLGPROC)InitDialogProc); DestroyWindow((HWND) INITDIALOG); #ifdef WIN32 SetCurrentDirectory(szHomeDir); #else getcwd(szTarget, MAX_PATH); chdir(szHomeDir); setdisk(toupper(szHomeDir[0]) - 'A'); #endif } PostQuitMessage(0); return (0); } $*[UNZIP542.WINDLL.GUISFX]SFXWIZ.DLG;1+, ./ 4#-~ 40@123KPWO 56Zݡݜ7Zݡݜ89GHJGETDIR DIALOG 1, 1, 176, 134 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Unzip To" FONT 8, "Helv" { CONTROL "File &Name:", 1090, "STATIC", SS_LEFT | WS_CHILD | NOT WS_VISIBLE, 2, 4, 2, 8 CONTROL "", 1152, "EDIT", ES_LEFT | ES_AUTOHSCROLL | ES_OEMCONVERT | WS_CHILD | NOT WS_VISIBLE | WS_BORDER, 2, 16, 2, 12 CONTROL "", 1120, "LISTBOX", LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_CHILD | NOT WS_VISIBLE, 2, 34, 2, 60 CONTROL "&Directories:", -1, "STATC:R UNZIP.BCK ~ 4$[UNZIP542.WINDLL.GUISFX]SFXWIZ.DLG;1DECC_OLB;1IC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 6, 92, 9 CONTROL "", 1088, "STATIC", SS_LEFT | SS_NOPREFIX | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 18, 92, 9 CONTROL "", 1121, "LISTBOX", LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 32, 92, 68 CONTROL "List Files of &Type:", 1089, "STATIC", SS_LEFT | WS_CHILD | NOT WS_VISIBLE, 2, 104, 2, 9 CONTROL "", 1136, "COMBOBOX", CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_CHILD | NOT WS_VISIBLE | WS_BORDER | WS_VSCROLL, 2, 114, 2, 34 CONTROL "Dri&ves:", 1091, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 104, 92, 9 CONTROL "", 1137, "COMBOBOX", CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 8, 114, 92, 68 CONTROL "OK", IDOK, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 106, 6, 50, 14 CONTROL "Cancel", IDCANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 106, 24, 50, 14 } INITDIALOG DIALOG PRELOAD MOVEABLE DISCARDABLE 16, 2, 291, 139 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Caption" FONT 8, "Helv" { CONTROL "Extract", IDOK, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 212, 4, 68, 16 CONTROL "Done", IDCANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 212, 28, 68, 16 CONTROL "Directory", ID_TARGET, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 76, 272, 10 CONTROL "Target Directory:", ID_TEXT3, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 60, 60, 10 CONTROL "Browse", ID_BROWSE, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 212, 52, 68, 16 CONTROL "Contents will be extracted to the directory shown below:", ID_TEXT1, "STATIC", SS_LEFTNOWORDWRAP | WS_CHILD | WS_VISIBLE | WS_GROUP, 4, 20, 185, 12 CONTROL "Browse to change the target directory:", ID_TEXT2, "STATIC", SS_LEFTNOWORDWRAP | WS_CHILD | WS_VISIBLE | WS_GROUP, 4, 36, 147, 13 CONTROL "Info-ZIP's Windows SFX", ID_INFOZIP, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 4, 100, 10 CONTROL "By Mike White", ID_AUTHOR, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 92, 64, 12 CONTROL "gretamcw@coastside.net", ID_EMAIL, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 104, 88, 10 CONTROL "", ID_STATUS, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 4, 124, 276, 10 } REPLACE DIALOG 1, 1, 156, 56 STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | WS_POPUP CAPTION "Target File Exists" { CONTROL "", IDM_REPLACE_TEXT, "STATIC", SS_LEFTNOWORDWRAP | WS_CHILD | WS_VISIBLE, 4, 4, 148, 10 CONTROL "&Skip", IDM_REPLACE_NO, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 36, 44, 12 CONTROL "Re&place", IDM_REPLACE_YES, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 20, 44, 12 CONTROL "Replace &All", IDM_REPLACE_ALL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 56, 20, 44, 12 CONTROL "Skip A&ll", IDM_REPLACE_NONE, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 56, 36, 44, 12 } *#*[UNZIP542.WINDLL.GUISFX]SFXWIZ.RC;1+, ./ 4a-~ 40@123KPWO56789GHJ#include #include "dialog.h" #include "sfxwiz.dlg" ICN_INSTALL ICON "sfxw.ico" z&*[UNZIP542.WINDLL.GUISFX]SFXWIZ16.MAK;1+, ./ 4-~ 40@123KPWO56V7V89GHJ # # Borland C++ IDE generated makefile # .AUTODEPEND # # Borland C++ tools # IMPLIB = Implib BCC = Bcc +BccW16.cfg TLINK = TLink TLIB = TLib BRC = Brc TASM = Tasm # # IDE macros # # # Options # IDE_LFLAGS = -LE:\BC45\LIB IDE_RFLAGS = LLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = -Twe -c -C -LE:\BC45\LIB;E:\WIZ\UNZIP\WINDLL\GUISFX\BIN -n RLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = -31 BLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = -IE:\BC45\INCLUDE;E:\WIZ\UNZIP;E:\WIZ\UNZIP\WINDLL;E:\WIZ\UNZIP\WINDLL\GUISFX -DDLL;API;USE_UNZIP_LIB; LNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = -x LEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = $(LLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) REAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = $(RLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) BEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = $(BLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) CLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = -ml -WS LLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = -Twe -c -C RLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = -31 BLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(CLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = -IE:\BC45\INCLUDE;E:\WIZ\UNZIP;E:\WIZ\UNZIP\WINDLL;E:\WIZ\UNZIP\WINDLL\GUISFX -DSFX;DLL;USE_EF_UT_TIME;UNZIPLIB;WINDLL LNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = -x LEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = $(LEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(LLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) REAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = $(REAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(RLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) BEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = $(BEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(BLATW16_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) # # Dependency List # Dep_sfxwiz = \ E:\WIZ\UNZIP\WINDLL\GUISFX\BIN\sfxwiz.exe sfxwiz : BccW16.cfg $(Dep_sfxwiz) echo MakeNode Dep_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe = \ E:\WIZ\UNZIP\WINDLL\GUISFX\BIN\unzsfx16.lib\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.res\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.obj E:\WIZ\UNZIP\WINDLL\GUISFX\BIN\sfxwiz.exe : $(Dep_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(TLINK) @&&| /v $(IDE_LFLAGS) $(LEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(LNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) + E:\BC45\LIB\c0wl.obj+ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.obj $<,$* E:\WIZ\UNZIP\WINDLL\GUISFX\BIN\unzsfx16.lib+ E:\BC45\LIB\import.lib+ E:\BC45\LIB\mathwl.lib+ E:\BC45\LIB\cwl.lib | $(BRC) E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.res $< Dep_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib = \ unzsfx16.def\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crctab.obj\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crypt.obj\ E:\WIZ\UNZIP\WINDLLDfz;=~mfhs gj cnf =_TYBfG3I(^Za_xVD$ Q}=@=ex!S_F%BD:E,Lf1/zB M FHgU]'$R-n(,&g-Y}~H*F)Kp]3(- VEXr&{SsWiNۡxRR5j~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ISFX\OBJ\process.obj\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crc32.obj\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\api.obj\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\msdos.obj\ E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\windll.obj E:\WIZ\UNZIP\WINDLL\GUISFX\BIN\unzsfx16.lib : $(Dep_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(TLIB) $< $(IDE_BFLAGS) $(BEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) @&&| -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crctab.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crypt.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\explode.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\extract.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\fileio.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\globals.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\inflate.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\m atch.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\process.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crc32.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\api.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\msdos.obj & -+E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\windll.obj | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crctab.obj : ..\..\crctab.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\crctab.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crypt.obj : ..\..\crypt.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\crypt.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\explode.obj : ..\..\explode.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\explode.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\extract.obj : ..\..\extract.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\extract.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\fileio.obj : ..\..\fileio.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\fileio.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\globals.obj : ..\..\globals.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\globals.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\inflate.obj : ..\..\inflate.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\inflate.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\match.obj : ..\..\match.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\match.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\process.obj : ..\..\process.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\process.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\crc32.obj : ..\..\crc32.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\crc32.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\api.obj : ..\..\api.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\api.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\msdos.obj : ..\..\msdos\msdos.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\..\msdos\msdos.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\windll.obj : ..\windll.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbunzsfx16dlib) -o$@ ..\windll.c | E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.res : sfxwiz.rc $(BRC) $(IDE_RFLAGS) $(REAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) -R -FO$@ sfxwiz.rc E:\WIZ\UNZIP\WINDLL\GUISFX\OBJ\sfxwiz.obj : sfxwiz.c $(BCC) -P- -c @&&| $(CEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) $(CNIEAT_EcbWIZbUNZIPbWINDLLbGUISFXbBINbsfxwizdexe) -o$@ sfxwiz.c | # Compiler configuration file BccW16.cfg : Copy &&| -R -v -vi -H -H=sfxwiz.csm -H- -ml -WS -f- -ff- -d -v- -R- -Z -O -Oe -Ol -Ob -OW -3 -Og | $@ &*[UNZIP542.WINDLL.GUISFX]UNZSFX16.DEF;1+, ./ 4-~ 40@123KPWO56йݜ7йݜ89GHJ;module-definition file for Windows UnZip static Library -- used by link.exe LIBRARY UNZSFX16 ; Library module name DESCRIPTION 'Windows Info-ZIP UnZip SFX Library (16 bit), by Mike White' CODE PRELOAD FIXED DATA PRELOAD MOVEABLE EXPORTS Wiz_SingleEntryUnzip UzpVersion Wiz_Grep Wiz_Init Wiz_SetOpts Wiz_Unzip Wiz_Validate Wiz_NoPrinting UzpVersion2 Wiz_UnzipToMemory Wiz_Match UzpFreeMemBuffer I*[UNZIP542.WINDLL]STRUCTS.H;1+,./ 4-p '0@123KPWO56f 7f 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __structs_h #define __structs_h #ifndef Far # define Far far #endif /* Porting definitions between Win 3.1x and Win32 */ #ifdef WIN32 # define far # define _far # define __far # define near # define _near # define __near # ifndef FAR # define FAR # endif #endif #ifndef DEFINED_ONCE #define DEFINED_ONCE typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long); typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR); typedef int (WINAPI DLLSERVICE) (LPCSTR, unsigned long); #endif typedef void (WINAPI DLLSND) (void); typedef int (WINAPI DLLREPLACE)(LPSTR); typedef void (WINAPI DLLMESSAGE)(unsigned long, unsigned long, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, char, LPSTR, LPSTR, unsigned long, char); typedef struct { DLLPRNT *print; DLLSND *sound; DLLREPLACE *replace; DLLPASSWORD *password; DLLMESSAGE *SendApplicationMessage; DLLSERVICE *ServCallBk; unsigned long TotalSizeComp; unsigned long TotalSize; unsigned long CompFactor; /* "long" applied for proper alignment, only */ unsigned long NumMembers; WORD cchComment; } USERFUNCTIONS, far * LPUSERFUNCTIONS; typedef struct { int ExtractOnlyNewer; int SpaceToUnderscore; int PromptToOverwrite; int fQuiet; int ncflag; int ntflag; int nvflag; int nfflag; int nzflag; int ndflag; int noflag; int naflag; int nZIflag; int C_flag; int fPrivilege; LPSTR lpszZipFN; LPSTR lpszExtractDir; } DCL, far * LPDCL; #endif /* __structs_h */ FsL  UNZIP.BCKp '[UNZIP542.WINDLL]UNZIPLIB.DEF;1.VAX_DECC_OLB;1*[UNZIP542.WINDLL]UNZIPLIB.DEF;1+,./ 4-p '0@123KPWO56pM7pM89GHJ;module-definition file for Windows UnZip static Library -- used by link.exe LIBRARY UNZIP32 ; Library module name DESCRIPTION 'Windows Info-ZIP UnZip Library (32 bit), by Mike White' CODE PRELOAD FIXED DATA PRELOAD MOVEABLE EXPORTS Wiz_SingleEntryUnzip UzpVersion Wiz_Init Wiz_SetOpts Wiz_Unzip Wiz_Validate Wiz_NoPrinting UzpVersion2 Wiz_UnzipToMemory Wiz_Match Wiz_Grep UzpFreeMemBuffer *[UNZIP542.WINDLL]UNZVER.H;1+,(./ 4-p '0@123KPWO563Ha73Ha89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __unzver_h /* prevent multiple inclusions */ #define __unzver_h #define UNZ_DLL_VERSION "5.42\0" #define COMPANY_NAME "Info-ZIP\0" #endif /* __unzver_h */ e*[UNZIP542.WINDLL]UZEXAMPL.C;1+,e./ 4-p '0@123KPWO56 7 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* This is a very simplistic example of how to load and make a call into the dll. This has been compiled and tested for a 32-bit console version, but not under 16-bit windows. However, the #ifdef's have been left in for the 16-bit code, simply as an example. */ #ifndef WIN32 /* this code is currently only tested for 32-bit console */ # define WIN32 #endif #if defined(__WIN32__) && !defined(WIN32) # define WIN32 #endif #include #include #include #include #include "uzexampl.h" #include "unzver.h" #ifdef WIN32 # include #else # include #endif #ifndef _MAX_PATH # define _MAX_PATH 260 /* max total file or directory name path */ #endif #ifdef WIN32 #define UNZ_DLL_NAME "UNZIP32.DLL\0" #else #define UNZ_DLL_NAME "UNZIP16.DLL\0" #endif #define DLL_WARNING "Cannot find %s."\ " The Dll must be in the application directory, the path, "\ "the Windows directory or the Windows System directory." #define DLL_VERSION_WARNING "%s has the wrong version number."\ " Insure that you have the correct dll's installed, and that "\ "an older dll is not in your path or Windows System directory." int hFile; /* file handle */ LPUSERFUNCTIONS lpUserFunctions; HANDLE hUF = (HANDLE)NULL; LPDCL lpDCL = NULL; HANDLE hDCL = (HANDLE)NULL; HINSTANCE hUnzipDll; HANDLE hZCL = (HANDLE)NULL; #ifdef WIN32 DWORD dwPlatformId = 0xFFFFFFFF; #endif /* Forward References */ int WINAPI DisplayBuf(LPSTR, unsigned long); int WINAPI GetReplaceDlgRetVal(char *); int WINAPI password(char *, int, const char *, const char *); void WINAPI ReceiveDllMessage(unsigned long, unsigned long, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, char, LPSTR, LPSTR, unsigned long, char); _DLL_UNZIP Wiz_SingleEntryUnzip; _USER_FUNCTIONS Wiz_Init; void FreeUpMemory(void); #ifdef WIN32 BOOL IsNT(VOID); #endif int main(int argc, char **argv) { int exfc, infc; char **exfv, **infv; char *x_opt; DWORD dwVerInfoSize; DWORD dwVerHnd; char szFullPath[_MAX_PATH]; int retcode; #ifdef WIN32 char *ptr; #else HFILE hfile; OFSTRUCT ofs; #endif HANDLE hMem; /* handle to mem alloc'ed */ if (argc < 2) /* We must have an archive to unzip */ { printf("usage: %s [entry1 [entry2 [...]]] [-x xentry1 [...]]", "example"); return 0; } hDCL = GlobalAlloc( GPTR, (DWORD)sizeof(DCL)); if (!hDCL) { return 0; } lpDCL = (LPDCL)GlobalLock(hDCL); if (!lpDCL) { GlobalFree(hDCL); return 0; } hUF = GlobalAlloc( GPTR, (DWORD)sizeof(USERFUNCTIONS)); if (!hUF) { GlobalUnlock(hDCL); GlobalFree(hDCL); return 0; } lpUserFunctions = (LPUSERFUNCTIONS)GlobalLock(hUF); if (!lpUserFunctions) { GlobalUnlock(hDCL); GlobalFree(hDCL); GlobalFree(hUF); return 0; } lpUserFunctions->password = password; lpUserFunctions->print = DisplayBuf; lpUserFunctions->sound = NULL; lpUserFunctions->replace = GetReplaceDlgRetVal; lpUserFunctions->SendApplicationMessage = ReceiveDllMessage; /* First we go look for the unzip dll */ #ifdef WIN32 if (SearchPath( NULL, /* address of search path */ UNZ_DLL_NAME, /* address of filename */ NULL, /* address of extension */ _MAX_PATH, /* size, in characters, of buffer */ szFullPath, /* address of buffer for found filename */ &ptr /* address of pointer to file component */ ) == 0) #else hfile = OpenFile(UNZ_DLL_NAME, &ofs, OF_SEARCH); if (hfile == HFILE_ERROR) #endif { char str[256]; wsprintf (str, DLL_WARNING, UNZ_DLL_NAME); printf("%s\n", str); FreeUpMemory(); return 0; } #ifndef WIN32 else lstrcpy(szFullPath, ofs.szPathName); _lclose(hfile); #endif /* Now we'll check the unzip dll version information. Note that this is not the same information as is returned from a call to UzpVersion() */ dwVerInfoSize = GetFileVersionInfoSize(szFullPath, &dwVerHnd); if (dwVerInfoSize) { BOOL fRet, fRetName; char str[256]; LPSTR lpstrVffInfo; /* Pointer to block to hold info */ LPSTR lszVer = NULL; LPSTR lszVerName = NULL; UINT cchVer = 0; /* Get a block big enough to hold the version information */ hMem = GlobalAlloc(GMEM_MOVEABLE, dwVerInfoSize); lpstrVffInfo = GlobalLock(hMem); /* Get the version information */ if (GetFileVersionInfo(szFullPath, 0L, dwVerInfoSize, lpstrVffInfo)) { fRet = VerQueryValue(lpstrVffInfo, TEXT("\\StringFileInfo\\040904E4\\FileVersion"), (LPVOID)&lszVer, &cchVer); fRetName = VerQueryValueGP8 UNZIP.BCKep '[UNZIP542.WINDLL]UZEXAMPL.C;1LI.VAX_VAXC_OLB;1F (lpstrVffInfo, TEXT("\\StringFileInfo\\040904E4\\CompanyName"), (LPVOID)&lszVerName, &cchVer); if (!fRet || !fRetName || (lstrcmpi(lszVer, UNZ_DLL_VERSION) != 0) || (lstrcmpi(lszVerName, COMPANY_NAME) != 0)) { wsprintf (str, DLL_VERSION_WARNING, UNZ_DLL_NAME); printf("%s\n", str); FreeUpMemory(); GlobalUnlock(hMem); GlobalFree(hMem); return 0; } } /* free memory */ GlobalUnlock(hMem); GlobalFree(hMem); } else { char str[256]; wsprintf (str, DLL_VERSION_WARNING, UNZ_DLL_NAME); printf("%s\n", str); FreeUpMemory(); return 0; } /* Okay, now we know that the dll exists, and has the proper version * information in it. We can go ahead and load it. */ hUnzipDll = LoadLibrary(UNZ_DLL_NAME); #ifndef WIN32 if (hUnzipDll > HINSTANCE_ERROR) #else if (hUnzipDll != NULL) #endif { Wiz_SingleEntryUnzip = (_DLL_UNZIP)GetProcAddress(hUnzipDll, "Wiz_SingleEntryUnzip"); } else { char str[256]; wsprintf (str, "Could not load %s", UNZ_DLL_NAME); printf("%s\n", str); FreeUpMemory(); return 0; } /* Here is where the actual extraction process begins. First we set up the flags to be passed into the dll. */ lpDCL->ncflag = 0; /* Write to stdout if true */ lpDCL->fQuiet = 0; /* We want all messages. 1 = fewer messages, 2 = no messages */ lpDCL->ntflag = 0; /* test zip file if true */ lpDCL->nvflag = 0; /* give a verbose listing if true */ lpDCL->nzflag = 0; /* display a zip file comment if true */ lpDCL->ndflag = 1; /* Recreate directories if true */ lpDCL->naflag = 0; /* Do not convert CR to CRLF */ lpDCL->nfflag = 0; /* Do not freshen existing files only */ lpDCL->noflag = 1; /* Over-write all files if true */ lpDCL->ExtractOnlyNewer = 0; /* Do not extract only newer */ lpDCL->PromptToOverwrite = 0; /* "Overwrite all" selected -> no query mode */ lpDCL->lpszZipFN = argv[1]; /* The archive name */ lpDCL->lpszExtractDir = NULL; /* The directory to extract to. This is set to NULL if you are extracting to the current directory. */ /* As this is a quite short example, intended primarily to show how to load and call in to the dll, the command-line parameters are only parsed in a very simplistic way: We assume that the command-line parameters after the zip archive make up a list of file patterns: " [file_i1] [file_i2] ... [file_iN] [-x file_x1 [file_x2] ...]". We scan for an argument "-x"; all arguments in front are "include file patterns", all arguments after are "exclude file patterns". If no more arguments are given, we extract ALL files. In summary, the example program should be run like: example [files to include] [-x files to exclude] ("<...> denotes mandatory arguments, "[...]" optional arguments) */ x_opt = NULL; if (argc > 2) { infv = &argv[2]; for (infc = 0; infc < argc-2; infc++) if (!strcmp("-x", infv[infc])) { x_opt = infv[infc]; infv[infc] = NULL; break; } exfc = argc - infc - 3; if (exfc > 0) exfv = &argv[infc+3]; else { exfc = 0; exfv = NULL; } } else { infc = exfc = 0; infv = exfv = NULL; } retcode = (*Wiz_SingleEntryUnzip)(infc, infv, exfc, exfv, lpDCL, lpUserFunctions); if (x_opt) { infv[infc] = x_opt; x_opt = NULL; } if (retcode != 0) printf("Error unzipping...\n"); FreeUpMemory(); FreeLibrary(hUnzipDll); return 1; } int WINAPI GetReplaceDlgRetVal(char *filename) { /* This is where you will decide if you want to replace, rename etc existing files. */ return 1; } void FreeUpMemory(void) { if (hDCL) { GlobalUnlock(hDCL); GlobalFree(hDCL); } if (hUF) { GlobalUnlock(hUF); GlobalFree(hUF); } } /* This simply determines if we are running on NT or Windows 95 */ #ifdef WIN32 BOOL IsNT(VOID) { if (dwPlatformId == 0xFFFFFFFF) { /* note: GetVersionEx() doesn't exist on WinNT 3.1 */ if (GetVersion() < 0x80000000) { dwPlatformId = TRUE; } else { dwPlatformId = FALSE; } } return (BOOL)dwPlatformId; } #endif /* This is a very stripped down version of what is done in Wiz. Essentially what this function is for is to do a listing of an archive contents. It is actually never called in this example, but a dummy procedure had to be put in, so this was used. */ void WINAPI ReceiveDllMessage(unsigned long ucsize, unsigned long csiz, unsigned cfactor, unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, char c, LPSTR filename, LPSTR methbuf, unsigned long crc, char fCrypt) { char psLBEntry[_MAX_PATH]; char LongHdrStats[] = "%7lu %7lu %4s %02u-%02u-%02u %02u:%02u %c%s"; char CompFactorStr[] = "%c%d%%"; char CompFactor100[] = "100%%"; char szCompFactor[10]; char sgn; if (csiz > ucsize) sgn = '-'; else sgn = ' '; if (cfactor == 100) lstrcpy(szCompFactor, CompFactor100); else sprintf(szCompFactor, CompFactorStr, sgn, cfactor); wsprintf(psLBEntry, LongHdrStats, ucsize, csiz, szCompFactor, mo, dy, yr, hh, mm, c, filename); printf("%s\n", psLBEntry); } /* Password entry routine - see password.c in the wiz directory for how this is actually implemented in WiZ. If you have an encrypted file, this will probably give you great pain. */ int WINAPI password(char *p, int n, const char *m, const char *name) { return 1; } /* Dummy "print" routine that simply outputs what is sent from the dll */ int WINAPI DisplayBuf(LPSTR buf, unsigned long size) { printf("%s", (char *)buf); return (unsigned int) size; } *[UNZIP542.WINDLL]UZEXAMPL.H;1+,./ 4-p '0@123KPWO56‘ 7‘ 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Example header file Do not use this header file in the WiZ application, use WIZ.H instead. */ #ifndef _UZEXAMPL_H #define _UZEXAMPL_H #include #ifdef __RSXNT__ # include "../win32/rsxntwin.h" #endif #include /* required for all Windows applications */ #include #include #include #ifndef __RSXNT__ # include #endif #include #include "../windll/structs.h" /* Defines */ typedef int (WINAPI * _DLL_UNZIP)(int, char **, int, char **, LPDCL, LPUSERFUNCTIONS); typedef int (WINAPI * _USER_FUNCTIONS)(LPUSERFUNCTIONS); /* Global variables */ extern LHGT UNZIP.BCKp '[UNZIP542.WINDLL]UZEXAMPL.H;1LI.VAX_VAXC_OLB;1vPUSERFUNCTIONS lpUserFunctions; extern LPDCL lpDCL; extern HINSTANCE hUnzipDll; extern int hFile; /* file handle */ /* Global functions */ extern _DLL_UNZIP Wiz_SingleEntryUnzip; extern _USER_FUNCTIONS Wiz_Init; int WINAPI DisplayBuf(LPSTR, unsigned long); /* Procedure Calls */ void WINAPI ReceiveDllMessage(unsigned long, unsigned long, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, char, LPSTR, LPSTR, unsigned long, char); #endif /* _UZEXAMPL_H */ l*[UNZIP542.WINDLL]VB.DIR;1+, ./ 4-p '0123 KPWO56A!a7A!a89GHJI VBUNZIP.BAS  VBUNZIP.FRM  VBUNZIP.VBP  VBUNZIP.VBW !*[UNZIP542.WINDLL.VB]VBUNZIP.BAS;1+, . / 4 - 0@123KPWO!5607089GHJAttribute VB_Name = "VBUnzBas" Option Explicit '-- Please Do Not Remove These Comment Lines! '---------------------------------------------------------------- '-- Sample VB 5 code to drive unzip32.dll '-- Contributed to the Info-ZIP project by Mike Le Voi '-- '-- Contact me at: mlevoi@modemss.brisnet.org.au '-- '-- Visit my home page at: http://modemss.brisnet.org.au/~mlevoi '-- '-- Use this code at your own risk. Nothing implied or warranted '-- to work on your machine :-) '---------------------------------------------------------------- '-- '-- This Source Code Is Freely Available From The Info-ZIP Project '-- Web Server At: '-- ftp://ftp.info-zip.org/pub/infozip/infozip.html '-- '-- A Very Special Thanks To Mr. Mike Le Voi '-- And Mr. Mike White '-- And The Fine People Of The Info-ZIP Group '-- For Letting Me Use And Modify Their Original '-- Visual Basic 5.0 Code! Thank You Mike Le Voi. '-- For Your Hard Work In Helping Me Get This To Work!!! '--------------------------------------------------------------- '-- '-- Contributed To The Info-ZIP Project By Raymond L. King. '-- Modified June 21, 1998 '-- By Raymond L. King '-- Custom Software Designers '-- '-- Contact Me At: king@ntplx.net '-- ICQ 434355 '-- Or Visit Our Home Page At: http://www.ntplx.net/~king '-- '--------------------------------------------------------------- '-- '-- Modified August 17, 1998 '-- by Christian Spieler '-- (implemented sort of a "real" user interface) '-- '--------------------------------------------------------------- '-- C Style argv Private Type UNZIPnames uzFiles(0 To 99) As String End Type '-- Callback Large "String" Private Type UNZIPCBChar ch(32800) As Byte End Type '-- Callback Small "String" Private Type UNZIPCBCh ch(256) As Byte End Type '-- UNZIP32.DLL DCL Structure Private Type DCLIST ExtractOnlyNewer As Long ' 1 = Extract Only Newer/New, Else 0 SpaceToUnderscore As Long ' 1 = Convert Space To Underscore, Else 0 PromptToOverwrite As Long ' 1 = Prompt To Overwrite Required, Else 0 fQuiet As Long ' 2 = No Messages, 1 = Less, 0 = All ncflag As Long ' 1 = Write To Stdout, Else 0 ntflag As Long ' 1 = Test Zip File, Else 0 nvflag As Long ' 0 = Extract, 1 = List Zip Contents nfflag As Long ' 1 = Extract Only Newer Over Existing, Else 0 nzflag As Long ' 1 = Display Zip File Comment, Else 0 ndflag As Long ' 1 = Honor Directories, Else 0 noflag As Long ' 1 = Overwrite Files, Else 0 naflag As Long ' 1 = Convert CR To CRLF, Else 0 nZIflag As Long ' 1 = Zip Info Verbose, Else 0 C_flag As Long ' 1 = Case Insensitivity, 0 = Case Sensitivity fPrivilege As Long ' 1 = ACL, 2 = Privileges Zip As String ' The Zip Filename To Extract Files ExtractDir As String ' The Extraction Directory, NULL If Extracting To Current Dir End Type '-- UNZIP32.DLL Userfunctions Structure Private Type USERFUNCTION UZDLLPrnt As Long ' Pointer To Apps Print Function UZDLLSND As Long ' Pointer To Apps Sound Function UZDLLREPLACE As Long ' Pointer To Apps Replace Function UZDLLPASSWORD As Long ' Pointer To Apps Password Function UZDLLMESSAGE As Long ' Pointer To Apps Message Function UZDLLSERVICE As Long ' Pointer To Apps Service Function (Not Coded!) TotalSizeComp As Long ' Total Size Of Zip Archive TotalSize As Long ' Total Size Of All Files In Archive CompFactor As Long ' Compression Factor NumMembers As Long ' Total Number Of All Files In The Archive cchComment As Integer ' Flag If Archive Has A Comment! End Type '-- UNZIP32.DLL Version Structure Private Type UZPVER structlen As Long ' Length Of The Structure Being Passed flag As Long ' Bit 0: is_beta bit 1: uses_zlib beta As String * 10 ' e.g., "g BETA" or "" date As String * 20 ' e.g., "4 Sep 95" (beta) or "4 September 1995" zlib As String * 10 ' e.g., "1.0.5" or NULL unzip(1 To 4) As Byte ' Version Type Unzip zipinfo(1 To 4) As Byte ' Version Type Zip Info os2dll As Long ' Version Type OS2 DLL windll(1 To 4) As Byte ' Version Type Windows DLL End Type '-- This Assumes UNZIP32.DLL Is In Your \Windows\System Directory! Private Declare Function Wiz_SingleEntryUnzip Lib "unzip32.dll" _ (ByVal ifnc As Long, ByRef ifnv As UNZIPnames, _ ByVal xfnc As Long, ByRef xfnv As UNZIPnames, _ dcll As DCLIST, Userf As USERFUNCTION) As Long Private Declare Sub UzpVersion2 Lib "unzip32.dll" (uzpv As UZPVER) '-- Private Variables For Structure Access Private UZDCL As DCLIST Private UZUSER As USERFUNCTION Private UZVER As UZPVER '-- Public Variables For Setting The '-- UNZIP32.DLL DCLIST Structure '-- These Must Be Set Before The Actual Call To VBUnZip32 Public uExtractOnlyNewer As Integer ' 1 = Extract Only Newer/New, Else 0 Public uSpaceUnderScore As Integer ' 1 = Convert Space To Underscore, Else 0 Public uPromptOverWrite As Integer ' 1 = Prompt To Overwrite Required, Else 0 Public uQuiet As Integer ' 2 = No Messages, 1 = Less, 0 = All Public uWriteStdOut As Integer ' 1 = Write To Stdout, Else 0 Public uTestZip As Integer ' 1 = Test Zip File, Else 0 Public uExtractList As Integer ' 0 = Extract, 1 = List Contents Public uFreshenExisting As Integer ' 1 = Update Existing by Newer, Else 0 Public uDisplayComment As Integer ' 1 = Display Zip File Comment, Else 0 Public uHonorDirectories As Integer ' 1 = Honor Directories, Else 0 Public uOverWriteFiles As Integer ' 1 = Overwrite Files, Else 0 Public uConvertCR_CRLF As Integer ' 1 = Convert CR To CRLF, Else 0 Public uVerbose As Integer ' 1 = Zip Info Verbose Public uCaseSensitivity As Integer ' 1 = Case Insensitivity, 0 = Case Sensitivity Public uPrivilege As Integer ' 1 = ACL, 2 = Privileges, Else 0 Public uZipFileName As String ' The Zip File Name PubI[0 UNZIP.BCK  ![UNZIP542.WINDLL.VB]VBUNZIP.BAS;1AX_VAXC_OLB;1  lic uExtractDir As String ' Extraction Directory, Null If Current Directory '-- Public Program Variables Public uZipNumber As Long ' Zip File Number Public uNumberFiles As Long ' Number Of Files Public uNumberXFiles As Long ' Number Of Extracted Files Public uZipMessage As String ' For Zip Message Public uZipInfo As String ' For Zip Information Public uZipNames As UNZIPnames ' Names Of Files To Unzip Public uExcludeNames As UNZIPnames ' Names Of Zip Files To Exclude Public uVbSkip As Integer ' For DLL Password Function '-- Puts A Function Pointer In A Structure '-- For Callbacks. Public Function FnPtr(ByVal lp As Long) As Long FnPtr = lp End Function '-- Callback For UNZIP32.DLL - Receive Message Function Public Sub UZReceiveDLLMessage(ByVal ucsize As Long, _ ByVal csiz As Long, _ ByVal cfactor As Integer, _ ByVal mo As Integer, _ ByVal dy As Integer, _ ByVal yr As Integer, _ ByVal hh As Integer, _ ByVal mm As Integer, _ ByVal c As Byte, ByRef fname As UNZIPCBCh, _ ByRef meth As UNZIPCBCh, ByVal crc As Long, _ ByVal fCrypt As Byte) Dim s0 As String Dim xx As Long Dim strout As String * 80 '-- Always Put This In Callback Routines! On Error Resume Next '------------------------------------------------ '-- This Is Where The Received Messages Are '-- Printed Out And Displayed. '-- You Can Modify Below! '------------------------------------------------ strout = Space$(80) '-- For Zip Message Printing If uZipNumber = 0 Then Mid(strout, 1, 50) = "Filename:" Mid(strout, 53, 4) = "Size" Mid(strout, 62, 4) = "Date" Mid(strout, 71, 4) = "Time" uZipMessage = strout & vbNewLine strout = Space$(80) End If s0 = "" '-- Do Not Change This For Next!!! For xx = 0 To 255 If fname.ch(xx) = 0 Then Exit For s0 = s0 & Chr$(fname.ch(xx)) Next '-- Assign Zip Information For Printing Mid$(strout, 1, 50) = Mid$(s0, 1, 50) Mid$(strout, 51, 7) = Right$(" " & CStr(ucsize), 7) Mid$(strout, 60, 3) = Right$("0" & Trim$(CStr(mo)), 2) & "/" Mid$(strout, 63, 3) = Right$("0" & Trim$(CStr(dy)), 2) & "/" Mid$(strout, 66, 2) = Right$("0" & Trim$(CStr(yr)), 2) Mid$(strout, 70, 3) = Right$(Str$(hh), 2) & ":" Mid$(strout, 73, 2) = Right$("0" & Trim$(CStr(mm)), 2) ' Mid(strout, 75, 2) = Right$(" " & CStr(cfactor), 2) ' Mid(strout, 78, 8) = Right$(" " & CStr(csiz), 8) ' s0 = "" ' For xx = 0 To 255 ' If meth.ch(xx) = 0 Then Exit For ' s0 = s0 & Chr$(meth.ch(xx)) ' Next xx '-- Do Not Modify Below!!! uZipMessage = uZipMessage & strout & vbNewLine uZipNumber = uZipNumber + 1 End Sub '-- Callback For UNZIP32.DLL - Print Message Function Public Function UZDLLPrnt(ByRef fname As UNZIPCBChar, ByVal x As Long) As Long Dim s0 As String Dim xx As Long '-- Always Put This In Callback Routines! On Error Resume Next s0 = "" '-- Gets The UNZIP32.DLL Message For Displaying. For xx = 0 To x - 1 If fname.ch(xx) = 0 Then Exit For s0 = s0 & Chr$(fname.ch(xx)) Next '-- Assign Zip Information If Mid$(s0, 1, 1) = vbLf Then s0 = vbNewLine ' Damn UNIX :-) uZipInfo = uZipInfo & s0 UZDLLPrnt = 0 End Function '-- Callback For UNZIP32.DLL - DLL Service Function Public Function UZDLLServ(ByRef mname As UNZIPCBChar, ByVal x As Long) As Long Dim s0 As String Dim xx As Long '-- Always Put This In Callback Routines! On Error Resume Next s0 = "" '-- Get Zip32.DLL Message For processing For xx = 0 To x - 1 If mname.ch(xx) = 0 Then Exit For s0 = s0 & Chr$(mname.ch(xx)) Next ' At this point, s0 contains the message passed from the DLL ' It is up to the developer to code something useful here :) UZDLLServ = 0 ' Setting this to 1 will abort the zip! End Function '-- Callback For UNZIP32.DLL - Password Function Public Function UZDLLPass(ByRef p As UNZIPCBCh, _ ByVal n As Long, ByRef m As UNZIPCBCh, _ ByRef Name As UNZIPCBCh) As Integer Dim prompt As String Dim xx As Integer Dim szpassword As String '-- Always Put This In Callback Routines! On Error Resume Next UZDLLPass = 1 If uVbSkip = 1 Then Exit Function '-- Get The Zip File Password szpassword = InputBox("Please Enter The Password!") '-- No Password So Exit The Function If Len(szpassword) = 0 Then uVbSkip = 1 Exit Function End If '-- Zip File Password So Process It For xx = 0 To 255 If m.ch(xx) = 0 Then Exit For Else prompt = prompt & Chr$(m.ch(xx)) End If Next For xx = 0 To n - 1 p.ch(xx) = 0 Next For xx = 0 To Len(szpassword) - 1 p.ch(xx) = Asc(Mid$(szpassword, xx + 1, 1)) Next p.ch(xx) = 0 ' Put Null Terminator For C UZDLLPass = 0 End Function '-- Callback For UNZIP32.DLL - Report Function To Overwrite Files. '-- This Function Will Display A MsgBox Asking The User '-- If They Would Like To Overwrite The Files. Public Function UZDLLRep(ByRef fname As UNZIPCBChar) As Long Dim s0 As String Dim xx As Long '-- Always Put This In Callback Routines! On Error Resume Next UZDLLRep = 100 ' 100 = Do Not Overwrite - Keep Asking User s0 = "" For xx = 0 To 255 If fname.ch(xx) = 0 Then Exit For s0 = s0 & Chr$(fname.ch(xx)) Next '-- This Is The MsgBox Code xx = MsgBox("Overwrite " & s0 & "?", vbExclamation & vbYesNoCancel, _ "VBUnZip32 - File Already Exists!") If xx = vbNo Then Exit Function If xx = vbCancel Then UZDLLRep = 104 ' 104 = Overwrite None Exit Function End If UZDLLRep = 102 ' 102 = Overwrite, 103 = Overwrite All End Function '-- ASCIIZ To String Function Public Function szTrim(szString As String) As String Dim pos As Long pos = InStr(szString, vbNullChar) Select Case pos Case Is > 1 szTrim = Trim$(Left$(szString, pos - 1)) Case 1 szTrim = "" Case Else szTrim = Trim$(szString) End Select End Function '-- Main UNZIP32.DLL UnZip32 Subroutine '-- (WARNING!) Do Not Change! Public Sub VBUnZip32() Dim retcode As Long Dim MsgStr As String '-- Set The UNZIP32.DLL Options '-- (WARNING!) Do Not Change UZDCL.ExtractOnlyNewer = uExtractOnlyNewer ' 1 = Extract Only Newer/New UZDCL.SpaceToUnderscore = uSpaceUnderScore ' 1 = Convert Space To Underscore UZDCL.PromptToOverwrite = uPromptOverWrite ' 1 = Prompt To Overwrite Required UZDCL.fQuiet = uQuiet ' 2 = No Messages 1 = Less 0 = All UZDCL.ncflag = uWriteStdOut ' 1 = Write To Stdout UZDCL.ntflag = uTestZip ' 1 = Test Zip File UZDCL.nvflag = uExtractList ' 0 = Extract 1 = List Contents UZDCL.nfflag = uFreshenExisting ' 1 = Update Existing by Newer UZDCL.nzflag = uDisplayComment ' 1 = Display Zip File Comment UZDCL.ndflag = uHonorDirectories ' 1 = Honour Directories UZDCL.noflag = uOverWriteFiles ' 1 = Overwrite Files UZDCL.naflag = uConvertCR_CRLF ' 1 = Convert CR To CRLF UZDCL.nZIflag = uVerbose ' 1 = Zip Info Verbose UZDCL.C_flag = uCaseSensitivity ' 1 = Case insensitivity, 0 = Case Sensitivity UZDCL.fPrivilege = uPrivilege ' 1 = ACL 2 = Priv UZDCL.Zip = uZipFileName ' ZIP Filename UZDCL.ExtractDir = uExtractDir ' Extraction Directory, NULL If Extracting ' To Current Directory '-- Set Callback Addresses '-- (WARNING!!!) Do Not Change UZUJq%; UNZIP.BCK  ![UNZIP542.WINDLL.VB]VBUNZIP.BAS;1XP_OLB;1 SER.UZDLLPrnt = FnPtr(AddressOf UZDLLPrnt) UZUSER.UZDLLSND = 0& '-- Not Supported UZUSER.UZDLLREPLACE = FnPtr(AddressOf UZDLLRep) UZUSER.UZDLLPASSWORD = FnPtr(AddressOf UZDLLPass) UZUSER.UZDLLMESSAGE = FnPtr(AddressOf UZReceiveDLLMessage) UZUSER.UZDLLSERVICE = FnPtr(AddressOf UZDLLServ) '-- Set UNZIP32.DLL Version Space '-- (WARNING!!!) Do Not Change With UZVER .structlen = Len(UZVER) .beta = Space$(9) & vbNullChar .date = Space$(19) & vbNullChar .zlib = Space$(9) & vbNullChar End With '-- Get Version Call UzpVersion2(UZVER) '-------------------------------------- '-- You Can Change This For Displaying '-- The Version Information! '-------------------------------------- MsgStr$ = "DLL Date: " & szTrim(UZVER.date) MsgStr$ = MsgStr$ & vbNewLine$ & "Zip Info: " & Hex$(UZVER.zipinfo(1)) & "." & _ Hex$(UZVER.zipinfo(2)) & Hex$(UZVER.zipinfo(3)) MsgStr$ = MsgStr$ & vbNewLine$ & "DLL Version: " & Hex$(UZVER.windll(1)) & "." & _ Hex$(UZVER.windll(2)) & Hex$(UZVER.windll(3)) MsgStr$ = MsgStr$ & vbNewLine$ & "--------------" '-- End Of Version Information. '-- Go UnZip The Files! (Do Not Change Below!!!) '-- This Is The Actual UnZip Routine retcode = Wiz_SingleEntryUnzip(uNumberFiles, uZipNames, uNumberXFiles, _ uExcludeNames, UZDCL, UZUSER) '--------------------------------------------------------------- '-- If There Is An Error Display A MsgBox! If retcode <> 0 Then MsgBox retcode '-- You Can Change This As Needed! '-- For Compression Information MsgStr$ = MsgStr$ & vbNewLine & "Only Shows If uExtractList = 1 List Contents" MsgStr$ = MsgStr$ & vbNewLine & "--------------" MsgStr$ = MsgStr$ & vbNewLine & "Comment : " & UZUSER.cchComment MsgStr$ = MsgStr$ & vbNewLine & "Total Size Comp : " & UZUSER.TotalSizeComp MsgStr$ = MsgStr$ & vbNewLine & "Total Size : " & UZUSER.TotalSize MsgStr$ = MsgStr$ & vbNewLine & "Compress Factor : %" & UZUSER.CompFactor MsgStr$ = MsgStr$ & vbNewLine & "Num Of Members : " & UZUSER.NumMembers MsgStr$ = MsgStr$ & vbNewLine & "--------------" VBUnzFrm.MsgOut.Text = VBUnzFrm.MsgOut.Text & MsgStr$ & vbNewLine$ End Sub !*[UNZIP542.WINDLL.VB]VBUNZIP.FRM;1+, ./ 4F- 0@123KPWO56#07#089GHJVERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "comdlg32.ocx" Begin VB.Form VBUnzFrm AutoRedraw = -1 'True Caption = "VBUnzFrm" ClientHeight = 4785 ClientLeft = 780 ClientTop = 525 ClientWidth = 9375 BeginProperty Font Name = "Fixedsys" Size = 9 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty LinkTopic = "VBUnzFrm" ScaleHeight = 4785 ScaleWidth = 9375 StartUpPosition = 1 'Fenstermitte Begin VB.TextBox ZipFName BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 4440 TabIndex = 5 Top = 240 Width = 4335 End Begin VB.TextBox ExtractRoot BeginProperty Font Name = "Courier New" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 4440 TabIndex = 4 Top = 960 Width = 4335 End Begin VB.CommandButton StartUnz Caption = "Start" Height = 495 Left = 240 TabIndex = 3 Top = 1800 Width = 3255 End Begin VB.TextBox MsgOut BeginProperty Font Name = "Courier New" Size = 9 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 2175 Left = 240 Locked = -1 'True MultiLine = -1 'True ScrollBars = 3 'Beides TabIndex = 2 Top = 2520 Width = 8895 End Begin VB.CommandButton QuitVBUnz Caption = "Quit" Height = 495 Left = 6240 TabIndex = 1 Top = 1800 Width = 2895 End Begin VB.CommandButton SearchZfile Caption = "..." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 8760 TabIndex = 0 Top = 240 Width = 375 End Begin MSComDlg.CommonDialog CommonDialog1 Left = 4800 Top = 1800 _ExtentX = 847 _ExtentY = 847 _Version = 327681 End Begin VB.Label Label1 Caption = "Complete path-name of Zip-archive:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 240 TabIndex = 7 Top = 240 Width = 3855 End Begin VB.Label Label2 Caption = "Extract archive into directory:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 240 TabIndex = 6 Top = 960 Width = 3855 End End Attribute VB_Name = "VBUnzFrm" AttK,m UNZIP.BCK  ![UNZIP542.WINDLL.VB]VBUNZIP.FRM;1XP_OLB;1I ribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit '--------------------------------------------------- '-- Please Do Not Remove These Comment Lines! '---------------------------------------------------------------- '-- Sample VB 5 code to drive unzip32.dll '-- Contributed to the Info-ZIP project by Mike Le Voi '-- '-- Contact me at: mlevoi@modemss.brisnet.org.au '-- '-- Visit my home page at: http://modemss.brisnet.org.au/~mlevoi '-- '-- Use this code at your own risk. Nothing implied or warranted '-- to work on your machine :-) '---------------------------------------------------------------- '-- '-- This Source Code Is Freely Available From The Info-ZIP Project '-- Web Server At: '-- ftp://ftp.info-zip.org/pub/infozip/infozip.html '-- '-- A Very Special Thanks To Mr. Mike Le Voi '-- And Mr. Mike White '-- And The Fine People Of The Info-ZIP Group '-- For Letting Me Use And Modify Their Orginal '-- Visual Basic 5.0 Code! Thank You Mike Le Voi. '-- For Your Hard Work In Helping Me Get This To Work!!! '--------------------------------------------------------------- '-- '-- Contributed To The Info-ZIP Project By Raymond L. King. '-- Modified June 21, 1998 '-- By Raymond L. King '-- Custom Software Designers '-- '-- Contact Me At: king@ntplx.net '-- ICQ 434355 '-- Or Visit Our Home Page At: http://www.ntplx.net/~king '-- '--------------------------------------------------------------- '-- '-- Modified August 17, 1998 '-- by Christian Spieler '-- (added sort of a "windows oriented" user interface) '-- '--------------------------------------------------------------- Private Sub StartUnz_Click() Dim MsgTmp As String Cls MsgOut.Text = "" '-- Init Global Message Variables uZipInfo = "" uZipNumber = 0 ' Holds The Number Of Zip Files '-- Select UNZIP32.DLL Options - Change As Required! uPromptOverWrite = 1 ' 1 = Prompt To Overwrite uOverWriteFiles = 0 ' 1 = Always Overwrite Files uDisplayComment = 0 ' 1 = Display comment ONLY!!! '-- Change The Next Line To Do The Actual Unzip! uExtractList = 1 ' 1 = List Contents Of Zip 0 = Extract uHonorDirectories = 1 ' 1 = Honour Zip Directories '-- Select Filenames If Required '-- Or Just Select All Files uZipNames.uzFiles(0) = vbNullString uNumberFiles = 0 '-- Select Filenames To Exclude From Processing ' Note UNIX convention! ' vbxnames.s(0) = "VBSYX/VBSYX.MID" ' vbxnames.s(1) = "VBSYX/VBSYX.SYX" ' numx = 2 '-- Or Just Select All Files uExcludeNames.uzFiles(0) = vbNullString uNumberXFiles = 0 '-- Change The Next 2 Lines As Required! '-- These Should Point To Your Directory uZipFileName = ZipFName.Text uExtractDir = ExtractRoot.Text If uExtractDir <> "" Then uExtractList = 0 ' unzip if dir specified '-- Let's Go And Unzip Them! Call VBUnZip32 '-- Tell The User What Happened If Len(uZipMessage) > 0 Then MsgTmp = uZipMessage End If '-- Display Zip File Information. If Len(uZipInfo) > 0 Then MsgTmp = MsgTmp & vbNewLine & "uZipInfo is:" & vbNewLine & uZipInfo End If '-- Display The Number Of Extracted Files! If uZipNumber > 0 Then MsgTmp = MsgTmp & vbNewLine & "Number Of Files: " & Str(uZipNumber) End If MsgOut.Text = MsgOut.Text & MsgTmp & vbNewLine End Sub Private Sub Form_Load() ZipFName.Text = vbNullString ExtractRoot.Text = vbNullString Me.Show End Sub Private Sub QuitVBUnz_Click() Unload Me End Sub Private Sub SearchZfile_Click() CommonDialog1.DialogTitle = "Open Zip-archive" CommonDialog1.DefaultExt = ".zip" CommonDialog1.ShowOpen ZipFName.Text = CommonDialog1.filename End Sub !*[UNZIP542.WINDLL.VB]VBUNZIP.VBP;1+, ./ 4- 0@123KPWO56 a7 a89GHJType=Exe Form=VBunzip.frm Module=VBUnzBas; vbunzip.bas Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX IconForm="VBUnzFrm" Startup="VBUnzFrm" HelpFile="" Title="VBUNZIP" ExeName32="VBunzip.exe" Command32="" Name="VBUnzipProject" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Mike" VersionLegalCopyright="(c) Info-ZIP 1998-2001" CompilationType=-1 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 !*[UNZIP542.WINDLL.VB]VBUNZIP.VBW;1+, ./ 4Q- 0@123KPWO56 a7 a89GHJVBUnzFrm = 44, 44, 688, 476, , 13, 27, 708, 432, C VBUnzBas = 14, 28, 696, 514, -*[UNZIP542.WINDLL]VC5.DIR;1+, ./ 4-p '0123 KPWO56oA!a7oA!a89GHJIDLL.DIR LIB.DIR SFX.DIR *[UNZIP542.WINDLL.VC5]DLL.DIR;1+, ./ 4- 0123 KPWO56 B!a7 B!a89GHJI UNZIP32.DSP Lbg UNZIP.BCK  &[UNZIP542.WINDLL.VC5.DLL]UNZIP32.DSP;1B;1 &*[UNZIP542.WINDLL.VC5.DLL]UNZIP32.DSP;1+, . / 4 - 0@123KPWO 5637389GHJ# Microsoft Developer Studio Project File - Name="unzip32" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=unzip32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzip32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzip32.mak" CFG="unzip32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzip32 - Win32 Release" (based on\ "Win32 (x86) Dynamic-Link Library") !MESSAGE "unzip32 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "unzip32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release\app" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 !ELSEIF "$(CFG)" == "unzip32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug\app" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "unzip32 - Win32 Release" # Name "unzip32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\explode.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\list.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\unreduce.c # End Source File # Begin Source File SOURCE=..\..\..\unshrink.c # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.rc # End Source File # Begin Source File SOURCE=..\..\..\windll\windll32.def # End Source File # Begin Source File SOURCE=..\..\..\zipinfo.c # End Source File # End Target # End Project *[UNZIP542.WINDLL.VC5]LIB.DIR;1+, ./ 4- 0123 KPWO56 0B!a7 0B!a89GHJI UNZIP32.DSP &*[UNZIP542.WINDLL.VC5.LIB]UNZIP32.DSP;1+, ./ 4v- 0@123KPWO 5637389GHJ# Microsoft Developer Studio Project File - Name="unzip32" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=unzip32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzip32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzip32.mak" CFG="unzip32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzip32 - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "unzip32 - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe !IF "$(CFG)" == "unzip32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release\libs" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "USE_EF_UT_TIME" /FD /c # SUBTRACT CPP /YX BSC32=bscmake.exe # ADD BASE BSC3MW" UNZIP.BCK  &[UNZIP542.WINDLL.VC5.LIB]UNZIP32.DSP;1B;1l 2 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ELSEIF "$(CFG)" == "unzip32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug\libs" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "USE_EF_UT_TIME" /FD /c # SUBTRACT CPP /YX BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ENDIF # Begin Target # Name "unzip32 - Win32 Release" # Name "unzip32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\explode.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\list.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\unreduce.c # End Source File # Begin Source File SOURCE=..\..\..\unshrink.c # End Source File # Begin Source File SOURCE=..\..\..\windll\unziplib.def # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # Begin Source File SOURCE=..\..\..\zipinfo.c # End Source File # End Target # End Project *[UNZIP542.WINDLL.VC5]SFX.DIR;1+, ./ 4- 0123 KPWO56SB!a7SB!a89GHJI SFXWIZ32.DSP  SFXWIZ32.DSW  UNZSFX32.DSP '*[UNZIP542.WINDLL.VC5.SFX]SFXWIZ32.DSP;1+, . / 4 E- 0@123KPWO 5651#N751#N89GHJ# Microsoft Developer Studio Project File - Name="SFXWiz" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 CFG=SFXWiz - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "SFXWiz32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "SFXWiz32.mak" CFG="SFXWiz - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "SFXWiz - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "SFXWiz - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "SFXWiz - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "../Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /O1 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "API" /D "DLL" /D "USE_UNZIP_LIB" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib unzsfx32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\Release" !ELSEIF "$(CFG)" == "SFXWiz - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "../Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "API" /D "DLL" /D "USE_UNZIP_LIB" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib unzsfx32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" !ENDIF # Begin Target # Name "SFXWiz - Win32 Release" # Name "SFXWiz - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\..\windll\guisfx\sfxwiz.c # End Source File # Begin Source File SOURCE=..\..\..\windll\guisfx\sfxwiz.rc # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=..\..\..\windll\guisNn UNZIP.BCK  '[UNZIP542.WINDLL.VC5.SFX]SFXWIZ32.DSP;1;1   fx\sfxw.ico # End Source File # End Group # End Target # End Project h'*[UNZIP542.WINDLL.VC5.SFX]SFXWIZ32.DSW;1+, ./ 4!- 0@123KPWO56N7N89GHJMicrosoft Developer Studio Workspace File, Format Version 5.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "SFXWiz"=.\SFXWiz32.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name unzsfx32 End Project Dependency }}} ############################################################################### Project: "unzsfx32"=.\unzsfx32.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### g'*[UNZIP542.WINDLL.VC5.SFX]UNZSFX32.DSP;1+, ./ 4w- 0@123KPWO56YuW7YuW89GHJ# Microsoft Developer Studio Project File - Name="unzsfx32" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=unzsfx32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzsfx32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzsfx32.mak" CFG="unzsfx32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzsfx32 - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "unzsfx32 - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe !IF "$(CFG)" == "unzsfx32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /O2 /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /O1 /I "../../.." /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "SFX" /D "USE_EF_UT_TIME" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ELSEIF "$(CFG)" == "unzsfx32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /Gm /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "SFX" /D "USE_EF_UT_TIME" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ENDIF # Begin Target # Name "unzsfx32 - Win32 Release" # Name "unzsfx32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\windll\unzsfx32.def # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # End Target # End Project t*[UNZIP542.WINDLL]VC6.DIR;1+, f./ 4-p '0123 KPWO56UB!a7UB!a89GHJIDLL.DIR ;LIB.DIR SFX.DIR *[UNZIP542.WINDLL.VC6]DLL.DIR;1+, ;./ 4- f0123 KPWO56NB!a7NB!a89GHJI UNZIP32.DSP &*[UNZIP542.WINDLL.VC6.DLL]UNZIP32.DSP;1+, . / 4 - ;0@123KPWO 56GD37GD389GHJ`OEoa?s{b rdz{cyixnOLB;1!=co(_SXw)yHu1M;{.an*0$Q],.yiD{|4zgz~\_V4XIXtU]#.hf]8rJ3[U7Awq`4mPa =V3oRb%NsI;I<8'DMH0%: h-|,,98%F Isf2@c>EB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developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=unzip32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzip32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzip32.mak" CFG="unzip32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzip32 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "unzip32 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "unzip32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release\app" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 !ELSEIF "$(CFG)" == "unzip32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug\app" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "unzip32 - Win32 Release" # Name "unzip32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\explode.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\list.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\unreduce.c # End Source File # Begin Source File SOURCE=..\..\..\unshrink.c # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.rc # End Source File # Begin Source File SOURCE=..\..\..\windll\windll32.def # End Source File # Begin Source File SOURCE=..\..\..\zipinfo.c # End Source File # End Target # End Project *[UNZIP542.WINDLL.VC6]LIB.DIR;1+, ./ 4- f0123 KPWO56NB!a7NB!a89GHJI UNZIP32.DSP &*[UNZIP542.WINDLL.VC6.LIB]UNZIP32.DSP;1+, ./ 4- 0@123KPWO 5637389GHJ# Microsoft Developer Studio Project File - Name="unzip32" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=unzip32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzip32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzip32.mak" CFG="unzip32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzip32 - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "unzip32 - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "unzip32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release\libs" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "USE_EF_UT_TIME" /FD /c # SUBQv UNZIP.BCK  &[UNZIP542.WINDLL.VC6.LIB]UNZIP32.DSP;1B;1o TRACT CPP /YX # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ELSEIF "$(CFG)" == "unzip32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug\libs" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "USE_EF_UT_TIME" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ENDIF # Begin Target # Name "unzip32 - Win32 Release" # Name "unzip32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\explode.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\list.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\unreduce.c # End Source File # Begin Source File SOURCE=..\..\..\unshrink.c # End Source File # Begin Source File SOURCE=..\..\..\windll\unziplib.def # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # Begin Source File SOURCE=..\..\..\zipinfo.c # End Source File # End Target # End Project u*[UNZIP542.WINDLL.VC6]SFX.DIR;1+, ./ 4- f0123 KPWO564C!a74C!a89GHJI SFXWIZ32.DSP  SFXWIZ32.DSW  UNZSFX32.DSP '*[UNZIP542.WINDLL.VC6.SFX]SFXWIZ32.DSP;1+, . / 4 i- 0@123KPWO 56Xq7Xq89GHJ# Microsoft Developer Studio Project File - Name="SFXWiz" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 CFG=SFXWiz - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "SFXWiz32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "SFXWiz32.mak" CFG="SFXWiz - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "SFXWiz - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "SFXWiz - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "SFXWiz - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "../Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /O1 /I "../../.." /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "API" /D "DLL" /D "USE_UNZIP_LIB" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib unzsfx32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\Release" !ELSEIF "$(CFG)" == "SFXWiz - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "../Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "API" /D "DLL" /D "USE_UNZIP_LIB" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib unzsfx32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" !ENDIF # Begin Target # Name "SFXWiz - Win32 Release" # Name "SFXWiz - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\..\windll\guisfx\sfxwiz.c # End Source File # Begin Source File SOURCE=..\..\..\windll\guisfx\sfxwiz.rc # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin SourR4 UNZIP.BCK  '[UNZIP542.WINDLL.VC6.SFX]SFXWIZ32.DSP;1;1 l ce File SOURCE=..\..\..\windll\guisfx\sfxw.ico # End Source File # End Group # End Target # End Project .'*[UNZIP542.WINDLL.VC6.SFX]SFXWIZ32.DSW;1+, ./ 4!- 0@123KPWO56#sW7#sW89GHJMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "SFXWiz"=.\SFXWiz32.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name unzsfx32 End Project Dependency }}} ############################################################################### Project: "unzsfx32"=.\unzsfx32.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### g'*[UNZIP542.WINDLL.VC6.SFX]UNZSFX32.DSP;1+, ./ 4- 0@123KPWO56zNUq7zNUq89GHJ# Microsoft Developer Studio Project File - Name="unzsfx32" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=unzsfx32 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "unzsfx32.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "unzsfx32.mak" CFG="unzsfx32 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "unzsfx32 - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "unzsfx32 - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "unzsfx32 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /GX /O2 /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /GX /O1 /I "../../.." /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "SFX" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ELSEIF "$(CFG)" == "unzsfx32 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /Gz /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /YX /FD /c # ADD CPP /nologo /Gz /W3 /Gm /GX /Zi /Od /I "../../.." /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "WINDLL" /D "DLL" /D "UNZIPLIB" /D "SFX" /D "USE_EF_UT_TIME" /YX /FD /c # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ENDIF # Begin Target # Name "unzsfx32 - Win32 Release" # Name "unzsfx32 - Win32 Debug" # Begin Source File SOURCE=..\..\..\api.c # End Source File # Begin Source File SOURCE=..\..\..\crc32.c # End Source File # Begin Source File SOURCE=..\..\..\crctab.c # End Source File # Begin Source File SOURCE=..\..\..\crypt.c # End Source File # Begin Source File SOURCE=..\..\..\extract.c # End Source File # Begin Source File SOURCE=..\..\..\fileio.c # End Source File # Begin Source File SOURCE=..\..\..\globals.c # End Source File # Begin Source File SOURCE=..\..\..\inflate.c # End Source File # Begin Source File SOURCE=..\..\..\match.c # End Source File # Begin Source File SOURCE=..\..\..\win32\nt.c # End Source File # Begin Source File SOURCE=..\..\..\process.c # End Source File # Begin Source File SOURCE=..\..\..\windll\unzsfx32.def # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=..\..\..\win32\win32.c # End Source File # Begin Source File SOURCE=..\..\..\windll\windll.c # End Source File # End Target # End Project *[UNZIP542.WINDLL]WINDLL.C;1+,6.'/ 4''o-p '0@123KPWO(56 7 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* Windows Info-ZIP Unzip DLL module * * Author: Mike White * * Original: 1996 * * This module has the entry points for "unzipping" a zip file. */ /*--------------------------------------------------------------------------- This file is the WINDLL replacement for the generic ``main program source file'' unzip.c. See the general comments in the header part of unzip.c. Copyrights: see accompanying file "COPYING" in UnZip source distribution. (This software is free but NOT IN THE PUBLIC DOMAIN. There are some restrictions on commercial use.) ---------------------------------------------------------------------------*/ #include #ifdef __RSXNT__ # include "../win32/rsxntwin.h" #endif #ifdef __BORLANDC__ #include #endif #define UNZIP_INTERNAL #include "../unzip.h" #include "../crypt.h" #include "../version.h" #include "../windll/windll.h" #include "../windll/structs.h" #include "../consts.h" /* Added type casts to prevent potential "type mismatch" error messages. */ #ifdef REENTRANT # undef __G # undef __G__ # define __G (Uz_Globs *)pG # define __G__ (Uz_Globs *)pSh UNZIP.BCK6p 'NZIP542.WINDLL]WINDLL.C;1PSFX.AXP_OLB;1'G, #endif HANDLE hwildZipFN; HANDLE hInst; /* current instance */ HANDLE hDCL; int fNoPrinting = 0; extern jmp_buf dll_error_return; /* For displaying status messages and error messages */ static int UZ_EXP DllMessagePrint(zvoid *pG, uch *buf, ulg size, int flag); #if 0 /* currently unused */ /* For displaying files extracted to the display window */ int DllDisplayPrint(zvoid *pG, uch *buf, ulg size, int flag); #endif /* never */ /* Callback function for status report and/or user interception */ static int UZ_EXP Wiz_StatReportCB(zvoid *pG, int fnflag, ZCONST char *zfn, ZCONST char *efn, ZCONST zvoid *details); /* Dummy sound function for those applications that don't use sound */ static void WINAPI DummySound(void); #ifndef UNZIPLIB /* DLL Entry Point */ #ifdef __BORLANDC__ #pragma argsused /* Borland seems to want DllEntryPoint instead of DllMain like MSVC */ #define DllMain DllEntryPoint #endif #ifdef WIN32 BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID plvReserved) #else int FAR PASCAL LibMain( HINSTANCE hInstance, WORD wDataSegment, WORD wHeapSize, LPSTR lpszCmdLine ) #endif { #ifndef WIN32 /* The startup code for the DLL initializes the local heap(if there is one) * with a call to LocalInit which locks the data segment. */ if ( wHeapSize != 0 ) { UnlockData( 0 ); } hInst = hInstance; return 1; /* Indicate that the DLL was initialized successfully. */ #else BOOL rc = TRUE; switch( dwReason ) { case DLL_PROCESS_ATTACH: // DLL is loaded. Do your initialization here. // If cannot init, set rc to FALSE. hInst = hInstance; break; case DLL_PROCESS_DETACH: // DLL is unloaded. Do your cleanup here. break; default: break; } return rc; #endif } #ifdef __BORLANDC__ #pragma argsused #endif int FAR PASCAL WEP ( int bSystemExit ) { return 1; } #endif /* !UNZIPLIB */ /* DLL calls */ /* ExtractOnlyNewer = true for "update" without interaction (extract only newer/new files, without queries) SpaceToUnderscore = true if convert space to underscore PromptToOverwrite = true if prompt to overwrite is wanted fQuiet = quiet flag. 1 = few messages, 2 = no messages, 0 = all messages ncflag = write to stdout if true ntflag = test zip file nvflag = verbose listing nfflag = "freshen" (replace existing files by newer versions) nzflag = display zip file comment ndflag = all args are files/dir to be extracted noflag = overwrite all files naflag = do end-of-line translation nZIflag = get Zip Info if TRUE C_flag = be case insensitive if TRUE fPrivilege = restore ACL's if 1, use privileges if 2 lpszZipFN = zip file name lpszExtractDir = directory to extract to; NULL means: current directory */ BOOL WINAPI Wiz_SetOpts(pG, C) zvoid *pG; LPDCL C; { uO.qflag = C->fQuiet; /* Quiet flag */ G.pfnames = (char **)&fnames[0]; /* assign default file name vector */ G.pxnames = (char **)&fnames[1]; uO.jflag = !C->ndflag; uO.cflag = C->ncflag; uO.tflag = C->ntflag; uO.vflag = C->nvflag; uO.zflag = C->nzflag; uO.aflag = C->naflag; uO.C_flag = C->C_flag; uO.overwrite_all = C->noflag || !C->PromptToOverwrite; uO.overwrite_none = FALSE; uO.uflag = C->ExtractOnlyNewer || C->nfflag; uO.fflag = C->nfflag; #ifdef WIN32 uO.X_flag = C->fPrivilege; #endif uO.sflag = C->SpaceToUnderscore; /* Translate spaces to underscores? */ if (C->nZIflag) { uO.zipinfo_mode = TRUE; uO.hflag = TRUE; uO.lflag = 10; uO.qflag = 2; } else { uO.zipinfo_mode = FALSE; } G.extract_flag = (!uO.zipinfo_mode && !uO.cflag && !uO.tflag && !uO.vflag && !uO.zflag #ifdef TIMESTAMP && !uO.T_flag #endif ); if (C->lpszExtractDir != NULL && G.extract_flag) { #ifndef CRTL_CP_IS_ISO char *pExDirRoot = (char *)malloc(strlen(C->lpszExtractDir)+1); if (pExDirRoot == NULL) return FALSE; ISO_TO_INTERN(C->lpszExtractDir, pExDirRoot); #else # define pExDirRoot C->lpszExtractDir #endif uO.exdir = pExDirRoot; } else { uO.exdir = (char *)NULL; } /* G.wildzipfn needs to be initialized so that do_wild does not wind up clearing out the zip file name when it returns in process.c */ hwildZipFN = GlobalAlloc(GPTR, FILNAMSIZ); if (hwildZipFN == (HGLOBAL) NULL) return FALSE; G.wildzipfn = GlobalLock(hwildZipFN); lstrcpy(G.wildzipfn, C->lpszZipFN); _ISO_INTERN(G.wildzipfn); return TRUE; /* set up was OK */ } void FreeDllMem(__GPRO) { if (G.wildzipfn) { GlobalUnlock(hwildZipFN); G.wildzipfn = NULL; } if (hwildZipFN) hwildZipFN = GlobalFree(hwildZipFN); uO.zipinfo_mode = FALSE; } int WINAPI Wiz_SingleEntryUnzip(int ifnc, char **ifnv, int xfnc, char **xfnv, LPDCL C, LPUSERFUNCTIONS lpUserFunc) { int retcode; CONSTRUCTGLOBALS(); if (!Wiz_Init((zvoid *)&G, lpUserFunc)) { DESTROYGLOBALS(); return PK_BADERR; } if (C->lpszZipFN == NULL) /* Something has screwed up, we don't have a filename */ { DESTROYGLOBALS(); return PK_NOZIP; } Wiz_SetOpts((zvoid *)&G, C); #ifdef SFX G.zipfn = C->lpszZipFN; G.argv0 = C->lpszZipFN; #endif /* Here is the actual call to "unzip" the files (or whatever else you * are doing.) */ retcode = Wiz_Unzip((zvoid *)&G, ifnc, ifnv, xfnc, xfnv); DESTROYGLOBALS(); return retcode; } BOOL WINAPI Wiz_Init(pG, lpUserFunc) zvoid *pG; LPUSERFUNCTIONS lpUserFunc; { G.message = DllMessagePrint; G.statreportcb = Wiz_StatReportCB; if (lpUserFunc->sound == NULL) lpUserFunc->sound = DummySound; G.lpUserFunctions = lpUserFunc; if (!G.lpUserFunctions->print || !G.lpUserFunctions->sound || !G.lpUserFunctions->replace) return FALSE; return TRUE; } int WINAPI Wiz_Unzip(pG, ifnc, ifnv, xfnc, xfnv) zvoid *pG; int ifnc; char **ifnv; int xfnc; char **xfnv; { int retcode, f_cnt; #ifndef CRTL_CP_IS_ISO char **intern_ifv = NULL, **intern_xfv = NULL; #endif if (ifnv == (char **)NULL && ifnc != 0) ifnc = 0; else for (f_cnt = 0; f_cnt < ifnc; f_cnt++) if (ifnv[f_cnt] == (char *)NULL) { ifnc = f_cnt; break; } if (xfnv == (char **)NULL && xfnc != 0) xfnc = 0; else for (f_cnt = 0; f_cnt < xfnc; f_cnt++) if (xfnv[f_cnt] == (char *)NULL) { xfnc = f_cnt; break; } G.process_all_files = (ifnc == 0 && xfnc == 0); /* for speed */ G.filespecs = ifnc; G.xfilespecs = xfnc; if (ifnc > 0) { #ifdef CRTL_CP_IS_ISO G.pfnames = ifnv; #else /* !CRTL_CP_IS_ISO */ unsigned bufsize = 0; intern_ifv = (char **)malloc((ifnc+1)*sizeof(char **)); if (intern_ifv == (char **)NULL) { FreeDllMem(__G); return PK_BADERR; } for (f_cnt = ifnc; --f_cnt >= 0;) bufsize += strlen(ifnv[f_cnt]) + 1; intern_ifv[0] = (char *)malloc(bufsize); if (intern_ifv[0] == (char *)NULL) { free(intern_ifv); FreeDllMem(__G); return PK_BADERR; } for (f_cnt = 0; ; f_cnt++) { ISO_TO_INTERN(ifnv[f_cnt], intern_ifv[f_cnt]); if ((f_cnt+1) >= ifnc) break; intern_ifv[f_cnt+1] = intern_ifv[f_cnt] + (strlen(intern_ifv[f_cnt]) + 1); TX UNZIP.BCK6p 'NZIP542.WINDLL]WINDLL.C;1PSFX.AXP_OLB;1'? } intern_ifv[ifnc] = (char *)NULL; G.pfnames = intern_ifv; #endif /* ?CRTL_CP_IS_ISO */ } if (xfnc > 0) { #ifdef CRTL_CP_IS_ISO G.pxnames = xfnv; #else /* !CRTL_CP_IS_ISO */ unsigned bufsize = 0; intern_xfv = (char **)malloc((xfnc+1)*sizeof(char **)); if (intern_xfv == (char **)NULL) { if (ifnc > 0) { free(intern_ifv[0]); free(intern_ifv); } FreeDllMem(__G); return PK_BADERR; } for (f_cnt = xfnc; --f_cnt >= 0;) bufsize += strlen(xfnv[f_cnt]) + 1; intern_xfv[0] = (char *)malloc(bufsize); if (intern_xfv[0] == (char *)NULL) { free(intern_xfv); if (ifnc > 0) { free(intern_ifv[0]); free(intern_ifv); } FreeDllMem(__G); return PK_BADERR; } for (f_cnt = 0; ; f_cnt++) { ISO_TO_INTERN(xfnv[f_cnt], intern_xfv[f_cnt]); if ((f_cnt+1) >= xfnc) break; intern_xfv[f_cnt+1] = intern_xfv[f_cnt] + (strlen(intern_xfv[f_cnt]) + 1); } intern_xfv[xfnc] = (char *)NULL; G.pxnames = intern_xfv; #endif /* ?CRTL_CP_IS_ISO */ } /*--------------------------------------------------------------------------- Okey dokey, we have everything we need to get started. Let's roll. ---------------------------------------------------------------------------*/ retcode = setjmp(dll_error_return); if (retcode) { #ifndef CRTL_CP_IS_ISO if (xfnc > 0) { free(intern_xfv[0]); free(intern_xfv); } if (ifnc > 0) { free(intern_ifv[0]); free(intern_ifv); } #endif FreeDllMem(__G); return PK_BADERR; } retcode = process_zipfiles(__G); #ifndef CRTL_CP_IS_ISO if (xfnc > 0) { free(intern_xfv[0]); free(intern_xfv); } if (ifnc > 0) { free(intern_ifv[0]); free(intern_ifv); } #endif FreeDllMem(__G); return retcode; } int win_fprintf(zvoid *pG, FILE *file, unsigned int size, char far *buffer) { if ((file != stderr) && (file != stdout)) { return write(fileno(file),(char far *)(buffer),size); } if (!fNoPrinting) return G.lpUserFunctions->print((LPSTR)buffer, size); return (int)size; } /********************************** * Function DllMessagePrint() * * * * Send messages to status window * **********************************/ #ifdef __BORLANDC__ #pragma argsused #endif static int UZ_EXP DllMessagePrint(pG, buf, size, flag) zvoid *pG; /* globals struct: always passed */ uch *buf; /* preformatted string to be printed */ ulg size; /* length of string (may include nulls) */ int flag; /* flag bits */ { if (!fNoPrinting) return G.lpUserFunctions->print((LPSTR)buf, size); else return (int)size; } #if 0 /* currently unused */ /******************************** * Function DllDisplayPrint() * * * * Send files to display window * ********************************/ #ifdef __BORLANDC__ #pragma argsused #endif int DllDisplayPrint(pG, buf, size, flag) zvoid *pG; /* globals struct: always passed */ uch *buf; /* preformatted string to be printed */ ulg size; /* length of string (may include nulls) */ int flag; /* flag bits */ { return (!fNoPrinting ? G.lpUserFunctions->print((LPSTR)buf, size) : (int)size); } #endif /* never */ /********************************** * Function UzpPassword() * * * * Prompt for decryption password * **********************************/ #ifdef __BORLANDC__ #pragma argsused #endif int UZ_EXP UzpPassword(pG, rcnt, pwbuf, size, zfn, efn) zvoid *pG; /* globals struct: always passed */ int *rcnt; /* retry counter */ char *pwbuf; /* buffer for password */ int size; /* size of password buffer */ ZCONST char *zfn; /* name of zip archiv */ ZCONST char *efn; /* name of archiv entry being processed */ { #if CRYPT LPSTR m; if (*rcnt == 0) { *rcnt = 2; m = "Enter password for: "; } else { (*rcnt)--; m = "Password incorrect--reenter: "; } return (*G.lpUserFunctions->password)((LPSTR)pwbuf, size, m, (LPSTR)efn); #else /* !CRYPT */ return IZ_PW_ERROR; /* internal error, function should never get called */ #endif /* ?CRYPT */ } /* end function UzpPassword() */ /* Turn off all messages to the calling application */ void WINAPI Wiz_NoPrinting(int f) { fNoPrinting = f; } /* Dummy sound function for those applications that don't use sound */ static void WINAPI DummySound(void) { } /* Interface between WINDLL specific service callback functions and the generic DLL's "status report & user interception" callback */ #ifdef __BORLANDC__ #pragma argsused #endif static int WINAPI Wiz_StatReportCB(zvoid *pG, int fnflag, ZCONST char *zfn, ZCONST char *efn, ZCONST zvoid *details) { int rval = UZ_ST_CONTINUE; switch (fnflag) { case UZ_ST_START_EXTRACT: if (G.lpUserFunctions->sound != NULL) (*G.lpUserFunctions->sound)(); break; case UZ_ST_FINISH_MEMBER: if ((G.lpUserFunctions->ServCallBk != NULL) && (*G.lpUserFunctions->ServCallBk)(efn, (details == NULL ? 0L : *((unsigned long *)details)))) rval = UZ_ST_BREAK; break; case UZ_ST_IN_PROGRESS: break; default: break; } return rval; } #ifndef SFX #ifndef __16BIT__ int WINAPI Wiz_UnzipToMemory(LPSTR zip, LPSTR file, LPUSERFUNCTIONS lpUserFunctions, UzpBuffer *retstr) { int r; #ifndef CRTL_CP_IS_ISO char *intern_zip, *intern_file; #endif CONSTRUCTGLOBALS(); #ifndef CRTL_CP_IS_ISO intern_zip = (char *)malloc(strlen(zip)+1); if (intern_zip == NULL) { DESTROYGLOBALS() return PK_MEM; } intern_file = (char *)malloc(strlen(file)+1); if (intern_file == NULL) { DESTROYGLOBALS() free(intern_zip); return PK_MEM; } ISO_TO_INTERN(zip, intern_zip); ISO_TO_INTERN(file, intern_file); # define zip intern_zip # define file intern_file #endif if (!Wiz_Init((zvoid *)&G, lpUserFunctions)) { DESTROYGLOBALS(); return PK_BADERR; } G.redirect_data = 1; r = (unzipToMemory(__G__ zip, file, retstr) == PK_COOL); DESTROYGLOBALS() #ifndef CRTL_CP_IS_ISO # undef file # undef zip free(intern_file); free(intern_zip); #endif if (!r && retstr->strlength) { free(retstr->strptr); retstr->strptr = NULL; } return r; } /* Purpose: Determine if file in archive contains the string szSearch Parameters: archive = archive name file = file contained in the archive. This cannot be a wild card to be meaningful pattern = string to search for cmd = 0 - case-insensitive search 1 - case-sensitve search 2 - case-insensitive, whole words only 3 - case-sensitive, whole words only SkipBin = if true, skip any files that have control characters other than CR, LF, or tab in the first 100 characters. Returns: TRUE if a match is found FALSE if no match is found -1 on error Comments: This does not pretend to be asUâ UNZIP.BCK6p 'NZIP542.WINDLL]WINDLL.C;1PSFX.AXP_OLB;1'k " useful as the standard Unix grep, which returns the strings associated with a particular pattern, nor does it search past the first matching occurrence of the pattern. */ int WINAPI Wiz_Grep(LPSTR archive, LPSTR file, LPSTR pattern, int cmd, int SkipBin, LPUSERFUNCTIONS lpUserFunctions) { int retcode = FALSE, compare; ulg i, j, patternLen, buflen; char * sz, *p; UzpBuffer retstr; /* Turn off any windows printing functions, as they may not have been * identified yet. There is no requirement that we initialize the * dll with printing stuff for this. */ Wiz_NoPrinting(TRUE); if (!Wiz_UnzipToMemory(archive, file, lpUserFunctions, &retstr)) { Wiz_NoPrinting(FALSE); return -1; /* not enough memory, file not found, or other error */ } if (SkipBin) { if (retstr.strlength < 100) buflen = retstr.strlength; else buflen = 100; for (i = 0; i < buflen; i++) { if (iscntrl(retstr.strptr[i])) { if ((retstr.strptr[i] != 0x0A) && (retstr.strptr[i] != 0x0D) && (retstr.strptr[i] != 0x09)) { /* OK, we now think we have a binary file of some sort */ free(retstr.strptr); Wiz_NoPrinting(FALSE); return FALSE; } } } } patternLen = strlen(pattern); if (retstr.strlength < patternLen) { free(retstr.strptr); Wiz_NoPrinting(FALSE); return FALSE; } sz = malloc(patternLen + 3); /* add two in case doing whole words only */ if (cmd > 1) { strcpy(sz, " "); strcat(sz, pattern); strcat(sz, " "); } else strcpy(sz, pattern); if ((cmd == 0) || (cmd == 2)) { for (i = 0; i < strlen(sz); i++) sz[i] = toupper(sz[i]); for (i = 0; i < retstr.strlength; i++) retstr.strptr[i] = toupper(retstr.strptr[i]); } for (i = 0; i < (retstr.strlength - patternLen); i++) { p = &retstr.strptr[i]; compare = TRUE; for (j = 0; j < patternLen; j++) { /* We cannot do strncmp here, as we may be dealing with a * "binary" file, such as a word processing file, or perhaps * even a true executable of some sort. */ if (p[j] != sz[j]) { compare = FALSE; break; } } if (compare == TRUE) { retcode = TRUE; break; } } free(sz); free(retstr.strptr); Wiz_NoPrinting(FALSE); /* Turn printing back on */ return retcode; } #endif /* !__16BIT__ */ int WINAPI Wiz_Validate(LPSTR archive, int AllCodes) { return UzpValidate((char *)archive, AllCodes); } #endif /* !SFX */ s*[UNZIP542.WINDLL]WINDLL.H;1+,./ 4-p '0@123KPWO56 7 89GHJ/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ #ifndef __windll_h /* prevent multiple inclusions */ #define __windll_h #include #include /* required for all Windows applications */ #include #include "../unzip.h" #include "../windll/structs.h" #include "../windll/decs.h" /* Allow compilation under Borland C++ also */ #ifndef __based # define __based(A) #endif #define IDM_REPLACE_NO 100 #define IDM_REPLACE_TEXT 101 #define IDM_REPLACE_YES 102 #define IDM_REPLACE_ALL 103 #define IDM_REPLACE_NONE 104 #define IDM_REPLACE_RENAME 105 #define IDM_REPLACE_HELP 106 #ifdef UNZIP_INTERNAL extern jmp_buf dll_error_return; extern HANDLE hInst; /* current instance */ void FreeDllMem(__GPRO); int win_fprintf(zvoid *pG, FILE *file, unsigned int, char far *); #endif #endif /* __windll_h */ *[UNZIP542.WINDLL]WINDLL.RC;1+,O./ 4-p '0@123KPWO56kHa7kHa89GHJ#include #if (defined(WIN32) && !defined(__EMX__) && !defined(__MINGW32__)) #include #endif #include "../windll/unzver.h" VS_VERSION_INFO VERSIONINFO FILEVERSION 1,1,0,0 PRODUCTVERSION 3,0,0,0 FILEFLAGSMASK 0x3L FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL BEGIN BLOCK "StringFileInfo" BEGIN #ifdef _UNICODE BLOCK "040904B0" #else BLOCK "040904E4" #endif BEGIN VALUE "CompanyName", COMPANY_NAME VALUE "FileDescription", "Info-ZIP's UnZip DLL for Win32\0" VALUE "FileVersion", UNZ_DLL_VERSION VALUE "InternalName", "UnZip32\0" VALUE "LegalCopyright", "Info-ZIP 1996-2001\0" VALUE "OriginalFilename", "UNZIP32.DLL\0" VALUE "ProductName", "Info-ZIP's UnZip Windows DLL\0" VALUE "ProductVersion", UNZ_DLL_VERSION END END BLOCK "VarFileInfo" BEGIN #ifdef _UNICODE VALUE "Translation", 0x409, 1200 #else VALUE "Translation", 0x409, 1252 #endif END END *[UNZIP542.WINDLL]WINDLL.TXT;1+,./ 4-p '0@123KPWO56ʂ̟7ʂ̟89GHJThere are now several entry points to the dll. There is a single "unzipping" entry point of: Wiz_SingleEntryUnzip(int ifnc, char **ifnv, int xfnc, char **xfnv, LPDCL lpDCL, LPUSERFUNCTIONS lpUserFunc) where the arguments are: ifnc = number of file names being passed. If all files are to be extracted, then this can be zero. ifnv = file names to be unarchived. Wildcard patterns are recognized and expanded. If all files are to be extracted, then thV7S( UNZIP.BCKp '[UNZIP542.WINDLL]WINDLL.TXT;1FX.AXP_OLB;1is can be NULL. xfnc = number of "file names to be excluded from processing" being passed. If all files are to be extracted, set this to zero. xfnv = file names to be excluded from the unarchiving process. Wildcard characters are allowed and expanded. If all files are to be extracted, set this argument to NULL. lpDCL = pointer to a structure with the flags for setting the various options, as well as the zip file name. lpUserFunc = pointer to a structure that contains pointers to functions in the calling application, as well as sizes passed back to the calling application etc. See below for a detailed description of all the parameters The DCL structure is shown below: typedef struct { int ExtractOnlyNewer; = true for "update" without interaction (extract only newer/new files, without queries) int SpaceToUnderscore; = true if convert space to underscore int PromptToOverwrite; = true if prompt to overwrite is wanted int fQuiet; = quiet flag. 1 = few messages, 2 = no messages, 0 = all messages int ncflag = write to stdout if true int ntflag = test zip file int nvflag = verbose listing int nfflag = "freshen" (replace existing files by newer versions) int nzflag = display zip file comment int ndflag = all args are files/dir to be extracted int noflag = true if you are to always over-write files, false if not int naflag = do end-of-line translation int nZIflag; = get zip info if true int C_flag; = be case insensitive if TRUE int fPrivilege = 1 => restore Acl's, 2 => Use privileges LPSTR lpszZipFN = zip file name LPSTR lpszExtractDir = Directory to extract to. This should be NULL if you are extracting to the current directory. } DCL, far * LPDCL; REMARK: The three extract-mode flags ExtractOnlyNewer, PromptToOverwrite, and noflag are considered to exclude each other. exactly ONE of these flags should be selected (= set to TRUE). The fflag switch is a modifier for ExtractOnlyNewer that prevents the creation of new files; it should only be used in conjunction with the ExtractOnlyNewer switch. The typedef's for the function pointers in the structure USERFUNCTIONS are shown immediately below. typedef unsigned short ush; typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long); typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR); typedef int (WINAPI DLLSERVICE) (LPSTR, unsigned long); typedef void (WINAPI DLLSND) (void); typedef int (WINAPI DLLREPLACE)(LPSTR); typedef void (WINAPI DLLMESSAGE)(unsigned long, unsigned long, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, char, LPSTR, LPSTR, unsigned long, char); Structure USERFUNCTIONS typedef struct { DLLPRNT *print; = a pointer to the application's print routine. DLLSND *sound; = a pointer to the application's sound routine. This can be NULL if your application doesn't use sound. DLLREPLACE *replace = a pointer to the application's replace routine. DLLPASSWORD *password = a pointer to the application's password routine. DLLMESSAGE *SendApplicationMessage = a pointer to the application's routine for displaying information about specific files in the archive. Used for listing the contents of an archive. DLLSERVICE *ServCallBk = Callback function designed to be used for allowing the application to process Windows messages, or canceling the operation, as well as giving the option of a progress indicator. If this function returns a non-zero value, then it will terminate what it is doing. It provides the application with the name of the name of the archive member it has just processed, as well as it's original size. NOTE: The values below are filled in only when listing the contents of an archive. unsigned long TotalSizeComp = value to be filled in by the dll for the compressed total size of the archive. Note this value does not include the size of the archive header and central directory list. unsigned long TotalSize = value to be filled in by the dll for the total size of all files in the archive. unsigned long CompFactor = value to be filled in by the dll for the overall compression factor. This could actually be computed from the other values, but it is available. unsigned long NumMembers = total number of files in the archive. WORD cchComment; = flag to be set if archive has a comment } USERFUNCTIONS, far * LPUSERFUNCTIONS; For examples of how the actual calls to the dll are set up in WiZ, look in the files action.c and wizmain.c in the WiZ source directory. For a trival example of how to load and call the dll, look in uzexampl.c and uzexampl.h. For examples of how the actual loading and unloading of the dll's themselves was done, look in wizmain.c in the WiZ source directory. Note that WiZ looks specifically for a particular version number of the dll, and also expects to find the company name to be Info-ZIP. This is to protect from getting different versions of the dll loaded, with resulting unknown behavior. Additional entry points: void WINAPI UzpVersion2(UzpVer far *); where UzpVer is defined as: typedef struct _UzpVer { ulg structlen; /* length of the struct being passed */ ulg flag; /* bit 0: is_beta bit 1: uses_zlib */ LPSTR betalevel; /* e.g., "g BETA" or "" */ LPSTR date; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */ LPSTR zlib_version; /* e.g., "1.0.5" or NULL */ _version_type unzip; _version_type zipinfo; _version_type os2dll; _version_type windll; } UzpVer; and _version_type is defined as: typedef struct _ver { uch major; /* e.g., integer 5 */ uch minor; /* e.g., 2 */ uch patchlevel; /* e.g., 0 */ uch not_used; } _version_type; See api.c for exactly what UzpVersion2 does, but the short version of what it does is fill in the version information in the UzpVer structure. void WINAPI Wiz_NoPrinting(int flag) This entry point simply turns off all messages to the calling application if flag is true, and turns them on if flag is false. int WINAPI Wiz_Validate(LPSTR archive, int AllCodes) If AllCodes is FALSE, then Unz_Validate returns TRUE if archive points to a valid archive, and FALSE otherwise. If AllCodes is TRUE, then Unz_Validate returns whatever error code process_zipfiles returns, without evaluating it. int WINAPI Wiz_UnzipToMemory(LPSTR zip, LPSTR file, LPUSERFUNCTIONS lpUserFunc, UzpBuffer *retstr) Where UzpBuffer is defined as: typedef struct _UzpBuffer { ulg strlength; /* length of string */ char * strptr; /* pointer to string */ } UzpBuffer Pass the name of the zip file in zip and the name of the file you wish to extract in file. UzpUnzipToMemory will create a buffer and return it in *retstr. 0 on return indicates failure. int WINAPI Wiz_Grep(LPSTR archive, LPSTR file, LPSTR pattern, int Wdq UNZIP.BCKp '[UNZIP542.WINDLL]WINDLL.TXT;1FX.AXP_OLB;1q cmd, int SkipBin, LPUSERFUNCTIONS lpUserFunc) Pass the name of the zip file in "zip", the name of the zip entry you wish to perform the "grep" on in "file", and the string you wish to look for in "pattern". There are four possible options for code: 0 => case insensitive search 1 => case sensitive search 2 => case insensitive search, whole words only 3 => case sensitive search, whole words only If SkipBin is TRUE, then any binary (loosely interpreted) files will be ignored. lpUserFunc is a pointer to a USERFUNCTION structure as shown above. UzpGrep returns: -1 => error such as unable to allocate memory, unable to find file, etc. 0 => match not found, based on the search criteria 1 => match found, based on the search criteria There is an additional function call that does not specifically deal with "unzipping", but is a quite useful function that is currently used in Wiz itself in several places. This call is currently only available in the static library, not in the DLL. Match the pattern (wildcard) against the string (fixed): match(string, pattern, ignore_case); returns TRUE if string matches pattern, FALSE otherwise. In the pattern: `*' matches any sequence of characters (zero or more) `?' matches any single character [SET] matches any character in the specified set, [!SET] or [^SET] matches any character not in the specified set. A set is composed of characters or ranges; a range looks like ``character hyphen character'' (as in 0-9 or A-Z). [0-9a-zA-Z_] is the minimal set of characters allowed in the [..] pattern construct. Other characters are allowed (i.e., 8-bit characters) if your system will support them. To suppress the special syntactic significance of any of ``[]*?!^-\'', in- side or outside a [..] construct, and match the character exactly, precede it with a ``\'' (backslash). The remaining functions are linked together. Their use would be as follows (explanations for each function are shown further below): #include "windll.h" #include "structs.h" MyApiCallingRoutine() { CREATEGLOBALS(); . . . Wiz_Init(pG, lpUserFunctions); /* Set up user functions */ /* zvoid *pG, LPUSERFUNCTIONS lpUserFunctions */ . . . Wiz_SetOpts(pG, C); /* Set up unzipping options */ /* zvoid *pG, LPDCL C */ . . . Wiz_Unzip(pG, ifnc, ifnv, xfnc, xfnv); /* Unzip files */ . . . DESTROYGLOBALS(); } Each entry point is as defined below: BOOL WINAPI Wiz_Init(zvoid *, LPUSERFUNCTIONS); BOOL WINAPI Wiz_SetOpts(zvoid *, LPDCL); int WINAPI Wiz_Unzip(zvoid *, int, char **, int, char **); Note that you should use either windll_unzip OR the series of calls described above. Using both, depending on how you do it, could cause problems. Last revised June 21, 1999. Mike White, Christian Spieler ;*[UNZIP542.WINDLL]WINDLL16.DEF;1+,/./ 4j-p '0@123KPWO56Z߰7Z߰89GHJ;module-definition file for Windows UnZip16 DLL -- used by link.exe LIBRARY UNZIP16 ; Library module name DESCRIPTION 'Windows Info-ZIP UnZip16 DLL by Mike White' CODE PRELOAD FIXED DATA PRELOAD MOVEABLE EXPORTS Wiz_SingleEntryUnzip UzpVersion Wiz_Init Wiz_SetOpts Wiz_Unzip Wiz_Validate Wiz_NoPrinting UzpVersion2 *[UNZIP542.WINDLL]WINDLL32.DEF;1+,./ 4-p '0@123KPWO56zY7zY89GHJ;module-definition file for Windows UnZip32 DLL -- used by link.exe LIBRARY UNZIP32 ; Library module name DESCRIPTION 'Windows Info-ZIP UnZip32 DLL by Mike White' ;CODE PRELOAD FIXED ;DATA PRELOAD MOVEABLE EXPORTS Wiz_SingleEntryUnzip UzpVersion Wiz_Init Wiz_SetOpts Wiz_Unzip Wiz_Validate Wiz_NoPrinting UzpVersion2 Wiz_UnzipToMemory Wiz_Grep UzpFreeMemBuffer  *[UNZIP542.WINDLL]WINDLLGCC.DEF;1+,1./ 4-p '0@123KPWO56Ղ5O 7Ղ5O 89GHJLIBRARY UNZIP32 DESCRIPTION 'Windows Info-ZIP UnZip32 DLL by Mike White' EXPORTS Wiz_SingleEntryUnzip=Wiz_SingleEntryUnzip@24 UzpVersion=UzpVersion@0 Wiz_Init=Wiz_Init@8 Wiz_SetOpts=Wiz_SetOpts@8 Wiz_Unzip=Wiz_Unzip@20 Wiz_Validate=Wiz_Validate@8 Wiz_NoPrinting=Wiz_NoPrinting@4 UzpVersion2=UzpVersion2@4 Wiz_UnzipToMemory=Wiz_UnzipToMemory@16 Wiz_Grep=Wiz_Grep@24 UzpFreeMemBuffer=UzpFreeMemBuffer@4 *[UNZIP542]ZIP.H;1+, ./ 4- 0@123KPWO569a79a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /* This is a dummy zip.h to allow the source files shared with Zip (crypt.c, crc32.c, crctab.c, ttyio.c) to compile for UnZip. (In case you are looking for the Info-ZIP license, please follow the pointers above.) */ #ifndef __zip_h /* don't include more than once */ #define __zip_h #define UNZIP_INTERNAL #include "unzip.h" #define local static #define ZE_MEM PK_MEM #define ziperr(c, h) return #endif /* !__zip_h */ *[UNZIP542]ZIPGREP.TXT;1+, !./ 4- 0@123KPWO 56'%kLa7'%kLa89GHJ ZIPGREP(1L) ZIPGREP(1L) NAME zipgrep - search files in a ZIP archive for lines matching a pattern SYNOPSIS zipgrep [egrep_options] pattern file[.zip] [file(s) ...] [-x xfile(s) ...] DESCRIPTION zipgrep will search files within a ZIP archive for lines matching the given string or pattern. zipgrep is a shell script and requires egrep(1) and unzip(1L) to function. Its output is identical to that of egXZİ UNZIP.BCK ! [UNZIP542]ZIPGREP.TXT;1UNZIPSFX.AXP_OLB;1hrep(1). ARGUMENTS pattern The pattern to be located within a ZIP archive. Any string or regular expression accepted by egrep(1) may be used. file[.zip] Path of the ZIP archive. (Wildcard expressions for the ZIP archive name are not supported.) If the literal filename is not found, the suffix .zip is appended. Note that self-extracting ZIP files are supported, as with any other ZIP archive; just specify the .exe suffix (if any) explicitly. [file(s)] An optional list of archive members to be pro- cessed, separated by spaces. If no member files are specified, all members of the ZIP archive are searched. Regular expressions (wildcards) may be used to match multiple members: * matches a sequence of 0 or more characters ? matches exactly 1 character [...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match). (Be sure to quote any character that might other- wise be interpreted or modified by the operating system.) [-x xfile(s)] An optional list of archive members to be excluded from processing. Since wildcard characters match Info-ZIP 14 January 2001 1 ZIPGREP(1L) ZIPGREP(1L) directory separators (`/'), this option may be used to exclude any files that are in subdirectories. For example, ``zipgrep grumpy foo *.[ch] -x */*'' would search for the string ``grumpy'' in all C source files in the main directory of the ``foo'' archive, but none in any subdirectories. Without the -x option, all C source files in all directo- ries within the zipfile would be searched. OPTIONS All options prior to the ZIP archive filename are passed to egrep(1). SEE ALSO egrep(1), unzip(1L), zip(1L), funzip(1L), zipcloak(1L), zipinfo(1L), zipnote(1L), zipsplit(1L) URL The Info-ZIP home page is currently at http://www.info- zip.org/pub/infozip/ or ftp://ftp.info- zip.org/pub/infozip/ . AUTHORS zipgrep was written by Jean-loup Gailly. Info-ZIP 14 January 2001 2 n*[UNZIP542]ZIPINFO.C;1+, ./ 4- 0@123KPWO56s:a7s:a89GHJ/* Copyright (c) 1990-2001 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in unzip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html */ /*--------------------------------------------------------------------------- zipinfo.c Greg Roelofs et al. This file contains all of the ZipInfo-specific listing routines for UnZip. Contains: zi_opts() zi_end_central() zipinfo() zi_long() zi_short() zi_time() ---------------------------------------------------------------------------*/ #define UNZIP_INTERNAL #include "unzip.h" #ifndef NO_ZIPINFO /* strings use up too much space in small-memory systems */ /* Define OS-specific attributes for use on ALL platforms--the S_xxxx * versions of these are defined differently (or not defined) by different * compilers and operating systems. */ #define UNX_IFMT 0170000 /* Unix file type mask */ #define UNX_IFREG 0100000 /* Unix regular file */ #define UNX_IFSOCK 0140000 /* Unix socket (BSD, not SysV or Amiga) */ #define UNX_IFLNK 0120000 /* Unix symbolic link (not SysV, Amiga) */ #define UNX_IFBLK 0060000 /* Unix block special (not Amiga) */ #define UNX_IFDIR 0040000 /* Unix directory */ #define UNX_IFCHR 0020000 /* Unix character special (not Amiga) */ #define UNX_IFIFO 0010000 /* Unix fifo (BCC, not MSC or Amiga) */ #define UNX_ISUID 04000 /* Unix set user id on execution */ #define UNX_ISGID 02000 /* Unix set group id on execution */ #define UNX_ISVTX 01000 /* Unix directory permissions control */ #define UNX_ENFMT UNX_ISGID /* Unix record locking enforcement flag */ #define UNX_IRWXU 00700 /* Unix read, write, execute: owner */ #define UNX_IRUSR 00400 /* Unix read permission: owner */ #define UNX_IWUSR 00200 /* Unix write permission: owner */ #define UNX_IXUSR 00100 /* Unix execute permission: owner */ #define UNX_IRWXG 00070 /* Unix read, write, execute: group */ #define UNX_IRGRP 00040 /* Unix read permission: group */ #define UNX_IWGRP 00020 /* Unix write permission: group */ #define UNX_IXGRP 00010 /* Unix execute permission: group */ #define UNX_IRWXO 00007 /* Unix read, write, execute: other */ #define UNX_IROTH 00004 /* Unix read permission: other */ #define UNX_IWOTH 00002 /* Unix write permission: other */ #define UNX_IXOTH 00001 /* Unix execute permission: other */ #define VMS_IRUSR UNX_IRUSR /* VMS read/owner */ #define VMS_IWUSR UNX_IWUSR /* VMS write/owner */ #define VMS_IXUSR UNX_IXUSR /* VMS execute/owner */ #define VMS_IRGRP UNX_IRGRP /* VMS read/group */ #define VMS_IWGRP UNX_IWGRP /* VMS write/group */ #define VMS_IXGRP UNX_IXGRP /* VMS execute/group */ #define VMS_IROTH UNX_IROTH /* VMS read/other */ #define VMS_IWOTH UNX_IWOTH /* VMS write/other */ #define VMS_IXOTH UNX_IXOTH /* VMS execute/other */ #define AMI_IFMT 06000 /* Amiga file type mask */ #define AMI_IFDIR 04000 /* Amiga directory */ #define AMI_IFREG 02000 /* Amiga regular file */ #define AMI_IHIDDEN 00200 /* to be sYNTl UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1$fupported in AmigaDOS 3.x */ #define AMI_ISCRIPT 00100 /* executable script (text command file) */ #define AMI_IPURE 00040 /* allow loading into resident memory */ #define AMI_IARCHIVE 00020 /* not modified since bit was last set */ #define AMI_IREAD 00010 /* can be opened for reading */ #define AMI_IWRITE 00004 /* can be opened for writing */ #define AMI_IEXECUTE 00002 /* executable image, a loadable runfile */ #define AMI_IDELETE 00001 /* can be deleted */ #define THS_IFMT 0xF000 /* Theos file type mask */ #define THS_IFIFO 0x1000 /* pipe */ #define THS_IFCHR 0x2000 /* char device */ #define THS_IFSOCK 0x3000 /* socket */ #define THS_IFDIR 0x4000 /* directory */ #define THS_IFLIB 0x5000 /* library */ #define THS_IFBLK 0x6000 /* block device */ #define THS_IFREG 0x8000 /* regular file */ #define THS_IFREL 0x9000 /* relative (direct) */ #define THS_IFKEY 0xA000 /* keyed */ #define THS_IFIND 0xB000 /* indexed */ #define THS_IFRND 0xC000 /* ???? */ #define THS_IFR16 0xD000 /* 16 bit real mode program */ #define THS_IFP16 0xE000 /* 16 bit protected mode prog */ #define THS_IFP32 0xF000 /* 32 bit protected mode prog */ #define THS_IMODF 0x0800 /* modified */ #define THS_INHID 0x0400 /* not hidden */ #define THS_IEUSR 0x0200 /* erase permission: owner */ #define THS_IRUSR 0x0100 /* read permission: owner */ #define THS_IWUSR 0x0080 /* write permission: owner */ #define THS_IXUSR 0x0040 /* execute permission: owner */ #define THS_IROTH 0x0004 /* read permission: other */ #define THS_IWOTH 0x0002 /* write permission: other */ #define THS_IXOTH 0x0001 /* execute permission: other */ #ifdef OLD_THEOS_EXTRA # include "theos/oldstat.h" #endif #ifndef NSK_UNSTRUCTURED # define NSK_UNSTRUCTURED 0 #endif #ifndef NSK_OBJECTFILECODE # define NSK_OBJECTFILECODE 100 #endif #ifndef NSK_EDITFILECODE # define NSK_EDITFILECODE 101 #endif #define LFLAG 3 /* short "ls -l" type listing */ static int zi_long OF((__GPRO__ ulg *pEndprev)); static int zi_short OF((__GPRO)); static void zi_showMacTypeCreator OF((__GPRO__ uch *ebfield)); static char *zi_time OF((__GPRO__ ZCONST ulg *datetimez, ZCONST time_t *modtimez, char *d_t_str)); /**********************************************/ /* Strings used in zipinfo.c (ZipInfo half) */ /**********************************************/ static ZCONST char nullStr[] = ""; static ZCONST char PlurSufx[] = "s"; static ZCONST char Far LongHeader[] = "Archive: %s %ld bytes %u file%s\n"; static ZCONST char Far ShortHeader[] = "Archive: %s %ld %u\n"; static ZCONST char Far EndCentDirRec[] = "\nEnd-of-central-directory record:\n"; static ZCONST char Far LineSeparators[] = "-------------------------------\n\n"; static ZCONST char Far ActOffsetCentDir[] = "\ Actual offset of end-of-central-dir record: %9ld (%.8lXh)\n\ Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\ (based on the length of the central directory and its expected offset)\n\n"; static ZCONST char Far SinglePartArchive1[] = "\ This zipfile constitutes the sole disk of a single-part archive; its\n\ central directory contains %u %s. The central directory is %lu\n\ (%.8lXh) bytes long, and its (expected) offset in bytes from the\n"; static ZCONST char Far SinglePartArchive2[] = "\ beginning of the zipfile is %lu (%.8lXh).\n\n"; static ZCONST char Far MultiPartArchive1[] = "\ This zipfile constitutes disk %u of a multi-part archive. The central\n\ directory starts on disk %u; %u of its entries %s contained within\n"; static ZCONST char Far MultiPartArchive2[] = "\ this zipfile, out of a total of %u %s. The entire central\n\ directory is %lu (%.8lXh) bytes long, and its offset in bytes from\n"; static ZCONST char Far MultiPartArchive3[] = "\ the beginning of the zipfile in which it begins is %lu (%.8lXh).\n\n"; static ZCONST char Far NoZipfileComment[] = " There is no zipfile comment.\n"; static ZCONST char Far ZipfileCommentDesc[] = " The zipfile comment is %u bytes long and contains the following text:\n\n"; static ZCONST char Far ZipfileCommBegin[] = "======================== zipfile comment begins ==========================\n"; static ZCONST char Far ZipfileCommEnd[] = "========================= zipfile comment ends ===========================\n"; static ZCONST char Far ZipfileCommTrunc2[] = "\n The zipfile comment is truncated.\n"; static ZCONST char Far ZipfileCommTruncMsg[] = "\ncaution: zipfile comment truncated\n"; static ZCONST char Far CentralDirEntry[] = "\nCentral directory entry #%lu:\n---------------------------\n\n"; static ZCONST char Far ZipfileStats[] = "%lu file%s, %lu bytes uncompressed, %lu bytes compressed: %s%d.%d%%\n"; /* zi_long() strings */ static ZCONST char Far OS_FAT[] = "MS-DOS, OS/2 or NT FAT"; static ZCONST char Far OS_Amiga[] = "Amiga"; static ZCONST char Far OS_VMS[] = "VMS"; static ZCONST char Far OS_Unix[] = "Unix"; static ZCONST char Far OS_VMCMS[] = "VM/CMS"; static ZCONST char Far OS_AtariST[] = "Atari ST"; static ZCONST char Far OS_HPFS[] = "OS/2 or NT HPFS"; static ZCONST char Far OS_Macintosh[] = "Macintosh HFS"; static ZCONST char Far OS_ZSystem[] = "Z-System"; static ZCONST char Far OS_CPM[] = "CP/M"; static ZCONST char Far OS_TOPS20[] = "TOPS-20"; static ZCONST char Far OS_NTFS[] = "NTFS"; static ZCONST char Far OS_QDOS[] = "SMS/QDOS"; static ZCONST char Far OS_Acorn[] = "Acorn RISC OS"; static ZCONST char Far OS_MVS[] = "MVS"; static ZCONST char Far OS_VFAT[] = "Win32 VFAT"; static ZCONST char Far OS_BeOS[] = "BeOS"; static ZCONST char Far OS_Tandem[] = "Tandem NSK"; static ZCONST char Far OS_Theos[] = "Theos"; #ifdef OLD_THEOS_EXTRA static ZCONST char Far OS_TheosOld[] = "Theos (Old)"; #endif /* OLD_THEOS_EXTRA */ static ZCONST char Far MthdNone[] = "none (stored)"; static ZCONST char Far MthdShrunk[] = "shrunk"; static ZCONST char Far MthdRedF1[] = "reduced (factor 1)"; static ZCONST char Far MthdRedF2[] = "reduced (factor 2)"; static ZCONST char Far MthdRedF3[] = "reduced (factor 3)"; static ZCONST char Far MthdRedF4[] = "reduced (factor 4)"; static ZCONST char Far MthdImplode[] = "imploded"; static ZCONST char Far MthdToken[] = "tokenized"; static ZCONST char Far MthdDeflate[] = "deflated"; static ZCONST char Far MthdDeflat64[] = "deflated (enhanced-64k)"; static ZCONST char Far MthdDCLImplode[] = "imploded (PK DCL)"; static ZCONST char Far DeflNorm[] = "normal"; static ZCONST char Far DeflMax[] = "maximum"; static ZCONST char Far DeflFast[] = "fast"; static ZCONST char Far DeflSFast[] = "superfast"; static ZCONST char Far ExtraBytesPreceding[] = " There are an extra %ld bytes preceding this file.\n\n"; static ZCONST char Far UnknownNo[] = "unknown (%d)"; static ZCONST char Far LocalHeaderOffset[] = "\n offset of local header from start of archive: %lu (%.8lXh) bytes\n"; static ZCONST char Far HostOS[] = " file system or operating system of origin: %s\n"; static ZCONST char Far EncodeSWVer[] = " version of encoding software: %d.%d\n"; static ZCONST char Far MinOSCompReq[] = " minimum file system compatibility required: %s\n"; static ZCONST char Far MinSWVerReq[] = " minimum software version required to extract: %d.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SizeImplode[] = " size of sliding dictionary (implosion): %cK\n"; static ZCONST char Far ShannonFanoTrees[] = " number of Shannon-Fano trees (implosion): %c\n"; static ZCONST char Far CompressSubtype[] = " compression sub-type (deflation): %s\n"; static ZCONST char Far FileSecurity[] = " file security status: %sencrypted\n"; static ZCONST char Far ExtendedLocalHdr[] = " extended local header: %s\n"; static ZCONST char Far FileModDate[] = " file last modified on (DOS date/time): %s\n"; #ifdef USE_EF_UT_TIME static ZCONST char Far UT_FileModDate[] = " file last modified on (UT extra field modtime): %s %s\n"; static ZCONST char Far LocalTime[] = "local"; #ifndef NO_GMTIME static ZCONST char Far GMTime[] = "UTC"; #endif #endif /* USE_EF_UT_TIME */ static ZCONST char Far CRC32Value[] = " 32-bit CRC value (hex): %.8lx\n"; static ZCONST char Far CompressedFileSize[] = " compressed size: %lu bytes\n"; static ZCONST char Far UncompressedFileSize[] = " uncompressed size: %lu bytes\n"; static ZCONST char Far FilenameLength[] = " length of filename: %u characters\n"; static ZCONST char Far ExtraFieldLength[] = " length of extra field: %u bytes\n"; static ZCONST char Far FileCommentLength[] = " length of file comment: %u characters\n"; static ZCONST char Far FileDiskNum[] = " disk number on which file begins: disk %u\n"; static ZCONST char Far ApparentFileType[] = " apparent file type: %s\n"; static ZCONST char Far VMSFileAttributes[] = " VMS file attributes (%06o octal): %s\n"; static ZCONST char Far AmigaFileAttributes[] = " Amiga file attributes (%06o octal): %s\n"; static ZCONST char Far UnixFileAttributes[] = " Unix file attributes (%06o octal): %s\n"; static ZCONST char Far NonMSDOSFileAttributes[] = " non-MSDOS external file attributes: %06lX hex\n"; static ZCONST char Far MSDOSFileAttributes[] = " MS-DOS file attributes (%02X hex): none\n"; static ZCONST char Far MSDOSFileAttributesRO[] = " MS-DOS file attributes (%02X hex): read-only\n"; static ZCONST char Far MSDOSFileAttributesAlpha[] = " MS-DOS file attributes (%02X hex): %s%s%s%s%s%s%s%s\n"; static ZCONST char Far TheosFileAttributes[] = " Theos file attributes (%04X hex): %s\n"; static ZCONST char Far TheosFTypLib[] = "Library "; static ZCONST char Far TheosFTypDir[] = "Directory "; static ZCONST char Far TheosFTypReg[] = "Sequential "; static ZCONST char Far TheosFTypRel[] = "Direct "; static ZCONST char Far TheosFTypKey[] = "Keyed "; static ZCONST char Far TheosFTypInd[] = "Indexed "; static ZCONST char Far TheosFTypR16[] = " 86 program "; static ZCONST char Far TheosFTypP16[] = "286 program "; static ZCONST char Far TheosFTypP32[] = "386 program "; static ZCONST char Far TheosFTypUkn[] = "??? "; static ZCONST char Far ExtraFieldTrunc[] = "\n\ error: EF data block (type 0x%04x) size %u exceeds remaining extra field\n\ space %u; block length has been truncated.\n"; static ZCONST char Far ExtraFields[] = "\n\ The central-directory extra field contains:"; static ZCONST char Far ExtraFieldType[] = "\n\ - A subfield with ID 0x%04x (%s) and %u data bytes"; static ZCONST char Far efAV[] = "PKWARE AV"; static ZCONST char Far efOS2[] = "OS/2"; static ZCONST char Far efPKVMS[] = "PKWARE VMS"; static ZCONST char Far efPKWin32[] = "PKWARE Win32"; static ZCONST char Far efPKUnix[] = "PKWARE Unix"; static ZCONST char Far efIZVMS[] = "Info-ZIP VMS"; static ZCONST char Far efIZUnix[] = "old Info-ZIP Unix/OS2/NT"; static ZCONST char Far efIZUnix2[] = "Unix UID/GID"; static ZCONST char Far efTime[] = "universal time"; static ZCONST char Far efJLMac[] = "old Info-ZIP Macintosh"; static ZCONST char Far efMac3[] = "new Info-ZIP Macintosh"; static ZCONST char Far efZipIt[] = "ZipIt Macintosh"; static ZCONST char Far efSmartZip[] = "SmartZip Macintosh"; static ZCONST char Far efZipIt2[] = "ZipIt Macintosh (short)"; static ZCONST char Far efVMCMS[] = "VM/CMS"; static ZCONST char Far efMVS[] = "MVS"; static ZCONST char Far efACL[] = "OS/2 ACL"; static ZCONST char Far efNTSD[] = "Security Descriptor"; static ZCONST char Far efBeOS[] = "BeOS"; static ZCONST char Far efQDOS[] = "SMS/QDOS"; static ZCONST char Far efAOSVS[] = "AOS/VS"; static ZCONST char Far efSpark[] = "Acorn SparkFS"; static ZCONST char Far efMD5[] = "Fred Kantor MD5"; static ZCONST char Far efASiUnix[] = "ASi Unix"; static ZCONST char Far efTandem[] = "Tandem NSK"; static ZCONST char Far efTheos[] = "Theos"; static ZCONST char Far efUnknown[] = "unknown"; static ZCONST char Far OS2EAs[] = ".\n\ The local extra field has %lu bytes of OS/2 extended attributes.\n\ (May not match OS/2 \"dir\" amount due to storage method)"; static ZCONST char Far izVMSdata[] = ". The extra\n\ field is %s and has %lu bytes of VMS %s information%s"; static ZCONST char Far izVMSstored[] = "stored"; static ZCONST char Far izVMSrleenc[] = "run-length encoded"; static ZCONST char Far izVMSdeflat[] = "deflated"; static ZCONST char Far izVMScunknw[] = "compressed(?)"; static ZCONST char Far *izVMScomp[4] = {izVMSstored, izVMSrleenc, izVMSdeflat, izVMScunknw}; static ZCONST char Far ACLdata[] = ".\n\ The local extra field has %lu bytes of access control list information"; static ZCONST char Far NTSDData[] = ".\n\ The local extra field has %lu bytes of NT security descriptor data"; static ZCONST char Far UTdata[] = ".\n\ The local extra field has UTC/GMT %s time%s"; static ZCONST char Far UTmodification[] = "modification"; static ZCONST char Far UTaccess[] = "access"; static ZCONST char Far UTcreation[] = "creation"; static ZCONST char Far ZipItFname[] = ".\n\ The Mac long filename is %s"; static ZCONST char Far Mac3data[] = ".\n\ The local extra field has %lu bytes of %scompressed Macintosh\n\ finder attributes"; /* MacOSdata[] is used by EF_MAC3, EF_ZIPIT, EF_ZIPIT2 and EF_JLEE e. f. */ static ZCONST char Far MacOSdata[] = ".\n\ The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'"; static ZCONST char Far MacOSdata1[] = ".\n\ The associated file has type code `0x%lx' and creator code `0x%lx'"; static ZCONST char Far MacOSJLEEflags[] = ".\n File is marked as %s"; static ZCONST char Far MacOS_RF[] = "Resource-fork"; static ZCONST char Far MacOS_DF[] = "Data-fork"; static ZCONST char Far MacOSMAC3flags[] = ".\n\ File is marked as %s, File Dates are in %d Bit"; static ZCONST char Far BeOSdata[] = ".\n\ The local extra field has %lu bytes of %scompressed BeOS file attributes"; /* The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'" */ static ZCONST char Far QDOSdata[] = ".\n\ The QDOS extra field subtype is `%c%c%c%c'"; static ZCONST char Far AOSVSdata[] = ".\n\ The AOS/VS extra field revision is %d.%d"; static ZCONST char Far TandemUnstr[] = "Unstructured"; static ZCONST char Far TandemRel[] = "Relative"; static ZCONST char Far TandemEntry[] = "Entry Sequenced"; static ZCONST char Far TandemKey[] = "Key Sequenced"; static ZCONST char Far TandemEdit[] = "Edit"; static ZCONST char Far TandemObj[] = "Object"; static ZCONST char Far *TandemFileformat[6] = {TandemUnst\a UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1&r, TandemRel, TandemEntry, TandemKey, TandemEdit, TandemObj}; static ZCONST char Far Tandemdata[] = ".\n\ The file was originally a Tandem %s file, with file code %u"; static ZCONST char Far MD5data[] = ".\n\ The 128-bit MD5 signature is %s"; #ifdef CMS_MVS static ZCONST char Far VmMvsExtraField[] = ".\n\ The stored file open mode (FLDATA TYPE) is \"%s\""; static ZCONST char Far VmMvsInvalid[] = "[invalid]"; #endif /* CMS_MVS */ static ZCONST char Far First20[] = ". The first\n 20 are': "; static ZCONST char Far ColonIndent[] = ":\n "; static ZCONST char Far efFormat[] = " %02x"; static ZCONST char Far lExtraFieldType[] = "\n\ There %s a local extra field with ID 0x%04x (%s) and\n\ %u data bytes (%s).\n"; static ZCONST char Far efIZuid[] = "GMT modification/access times and Unix UID/GID"; static ZCONST char Far efIZnouid[] = "GMT modification/access times only"; static ZCONST char Far NoFileComment[] = "\n There is no file comment.\n"; static ZCONST char Far FileCommBegin[] (= "\n\ ------------------------- file comment begins ----------------------------\n"; static ZCONST char Far FileCommEnd[] = "\ -------------------------- file comment ends -----------------------------\n"; /* zi_time() strings */ static ZCONST char Far BogusFmt[] = "%03d"; static ZCONST char Far DMYHMTime[] = "%2u-%s-%02u %02u:%02u"; static ZCONST char Far YMDHMSTime[] = "%u %s %u %02u:%02u:%02u"; static ZCONST char Far DecimalTime[] = "%04u%02u%02u.%02u%02u%02u"; #ifdef USE_EF_UT_TIME static ZCONST char Far YMDHMSTimeError[] = "???? ??? ?? ??:??:??"; #endif #ifndef WINDLL /************************/ /* Function zi_opts() */ /************************/ int zi_opts(__G__ pargc, pargv) int *pargc; char ***pargv; __GDEF { char **argv, *s; int argc, c, error=FALSE, negative=0; int hflag_slmv=TRUE, hflag_2=FALSE; /* diff options => diff defaults */ int tflag_slm=TRUE, tflag_2v=FALSE; int explicit_h=FALSE, explicit_t=FALSE; #ifdef MACOS uO.lflag = LFLAG; /* reset default on each call */ #endif G.extract_flag = FALSE; /* zipinfo does not extract to disk */ argc = *pargc; argv = *pargv; while (--argc > 0 && (*++argv)[0] == '-') { s = argv[0] + 1; while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ switch (c) { case '-': ++negative; break; case '1': /* shortest listing: JUST filenames */ if (negative) uO.lflag = -2, negative = 0; else uO.lflag = 1; break; case '2': /* just filenames, plus headers if specified */ if (negative) uO.lflag = -2, negative = 0; else uO.lflag = 2; break; #ifndef CMS_MVS case ('C'): /* -C: match filenames case-insensitively */ , if (negative) uO.C_flag = FALSE, negative = 0; else uO.C_flag = TRUE; break; #endif /* !CMS_MVS */ case 'h': /* header line */ if (negative) hflag_2 = hflag_slmv = FALSE, negative = 0; else { hflag_2 = hflag_slmv = explicit_h = TRUE; if (uO.lflag == -1) uO.lflag = 0; } break; case 'l': /* longer form of "ls -l" type listing */ if (negative) uO.lflag = -2, negative = 0; else uO.lflag = 5; break; case 'm': /* medium form of "ls -l" type listing */ if (negative) uO.lflag = -2, negative = 0; else . uO.lflag = 4; break; #ifdef MORE case 'M': /* send output through built-in "more" */ if (negative) G.M_flag = FALSE, negative = 0; else G.M_flag = TRUE; break; #endif case 's': /* default: shorter "ls -l" type listing */ if (negative) uO.lflag = -2, negative = 0; e/lse uO.lflag = 3; break; case 't': /* totals line */ if (negative) tflag_2v = tflag_slm = FALSE, negative = 0; else { tflag_2v = tflag_slm = explicit_t = TRUE; if (uO.lflag == -1) uO.lflag = 0; } break; case ('T'): /* use (sortable) decimal time fo0rmat */ if (negative) uO.T_flag = FALSE, negative = 0; else uO.T_flag = TRUE; break; case 'v': /* turbo-verbose listing */ if (negative) uO.lflag = -2, negative = 0; else uO.lflag = 10; break; case 'z': /* print zipfile comment */ if (negative) uO.zflag = negative = 0; else uO.zflag = 1; break; case 'Z': /* ZipInfo mode: ignore */ break; default: error = TRUE; break; } } } if ((argc-- == 0) || error) { *pargc = argc; *pargv = argv; return USAGE(error); } #ifdef MORE if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func useless */ G.M_flag = 0; #endif /* if no listing options given (or all negated), or if only -h/-t given * with individual files specified, use default listing format */ if ((uO.lflag < 0) || ((argc > 0) && (uO.lflag == 0))) uO.lflag = LFLAG; /* set header and totals flags to default or specified values */ switch (uO.lflag) { case 0: /* 0: can only occur if either -t or -h explicitly given; */ case 2: /* therefore3 set both flags equal to normally false value */ uO.hflag = hflag_2; uO.tflag = tflag_2v; break; case 1: /* only filenames, *always* */ uO.hflag = FALSE; uO.tflag = FALSE; uO.zflag = FALSE; break; case 3: case 4: case 5: uO.hflag = ((argc > 0) && !explicit_h)? FALSE : hflag_slmv; uO.tflag = ((argc > 0) && !explicit_t)? FALSE : tflag_slm; break; case 10: uO.hflag = hflag_slmv; uO.tflag = tflag_2v; break; } *pargc = argc; *pargv = argv; return 0; } /* end function zi_opts() */ #endif /* !WINDLL */ /*******************************/ /* Function zi_end_central() */ /*******************************/ int zi_end_central(__G) /* return PK-type error code */ __GDEF { int error = PK_COOL; /*--------------------------------------------------------------------------- Print out variousp]e UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1V5 interesting things about the zipfile. ---------------------------------------------------------------------------*/ /* header fits on one line, for anything up to 10GB and 10000 files: */ if (uO.hflag) Info(slide, 0, ((char *)slide, ((int)strlen(G.zipfn) < 39)? LoadFarString(LongHeader) : LoadFarString(ShortHeader), G.zipfn, (long)G.ziplen, G.ecrec.total_entries_central_dir, (G.ecrec.total_entries_central_dir==1)? nullStr : PlurSufx)); /* verbose format */ if (uO.lflag > 9) { Info(slide, 0, ((char *)slide, LoadFarString(EndCentDirRec))); Info(slide, 0, ((char *)slide, LoadFarString(LineSeparators))); Info(slide, 0, ((char *)slide, LoadFarString(ActOffsetCentDir), (long)G.real_ecrec_offset, (long)G.real_ecrec_offset, (long)G.expect_ecrec_offset, (long)G.expect_ecrec_offset)); if (G.ecrec.number_this_disk == 0) { Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive1), 7 G.ecrec.total_entries_central_dir, (G.ecrec.total_entries_central_dir == 1)? "entry" : "entries", G.ecrec.size_central_directory, G.ecrec.size_central_directory)); Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive2), G.ecrec.offset_start_central_directory, G.ecrec.offset_start_central_directory)); } else { Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive1), G.ecrec.number_this_disk + 1, G.ecrec.num_disk_start_cdir + 1, G.ecrec.num_entries_centrl_dir_ths_disk, (G.ecrec.num_entries_centrl_dir_ths_disk == 1)? "is" : "are")); Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive2), G.ecrec.total_entries_central_dir, (G.ecrec.total_entries_central_dir == 1) ? "entry" : "entries", G.ecrec.size_central_directory, G.ecrec.size_central_directory)); 9 Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive3), G.ecrec.offset_start_central_directory, G.ecrec.offset_start_central_directory)); } /*----------------------------------------------------------------------- Get the zipfile comment, if any, and print it out. (Comment may be up to 64KB long. May the fleas of a thousand camels infest the arm- pits of anyone who actually takes advantage of this fact.) -----------------------------------------------------------------------*/ if (!G.ecrec.zipfile_comment_length) Info(slide, 0, ((char *)slide, LoadFarString(NoZipfileComment))); else { Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommentDesc), G.ecrec.zipfile_comment_length)); Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommBegin))); if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) error = PK_WARN;; Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommEnd))); if (error) Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommTrunc2))); } /* endif (comment exists) */ /* non-verbose mode: print zipfile comment only if requested */ } else if (uO.zflag && G.ecrec.zipfile_comment_length) { if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileCommTruncMsg))); error = PK_WARN; } } /* endif (verbose) */ return error; } /* end function zi_end_central() */ /************************/ /* Function zipinfo() */ /************************/ int zipinfo(__G) /* return PK-type error code */ __GDEF { int do_this_file=FALSE, error, error_in_archive=PK_COOL; int *fn_matched=NULL, *xn_matched=NULL; ulg j, members=0L; ulg tot_csize=0L, tot_ucsize=0L; ulg endprev; /* buffers end of pre=vious entry for zi_long()'s check * of extra bytes */ /*--------------------------------------------------------------------------- Malloc space for check on unmatched filespecs (no big deal if one or both are NULL). ---------------------------------------------------------------------------*/ if (G.filespecs > 0 && (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != NULL) for (j = 0; j < G.filespecs; ++j) fn_matched[j] = FALSE; if (G.xfilespecs > 0 && (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != NULL) for (j = 0; j < G.xfilespecs; ++j) xn_matched[j] = FALSE; /*--------------------------------------------------------------------------- Set file pointer to start of central directory, then loop through cen- tral directory entries. Check that directory-entry signature bytes are actually there (just a precaution), then process the entry. We know the entire central directory is ?on this disk: we wouldn't have any of this information unless the end-of-central-directory record was on this disk, and we wouldn't 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 maybe someday we'll add multi-disk support. ---------------------------------------------------------------------------*/ uO.L_flag = FALSE; /* zipinfo mode: never convert name to lowercase */ G.pInfo = G.info; /* (re-)initialize, (just to make sure) */ G.pInfo->textmode = 0; /* so one can read on screen (is this ever used?) */ /* reset endprev for new zipfile; account for multi-part archives (?) */ endprev = (G.crec.relative_offset_local_header == 4L)? 4L : 0L; for (j = 1L;; j++) { if (readbuf(__G__ G.sig, 4) == 0) return PK_EOF; if (strncmp(G.sig, central_hdr_sig, 4)) { /* is it a CentDir entry? */ if (((unsigned)(j - 1) & (unsigned)0xFFFF) == (unsigned)G.ecrec.total_entries_central_dir) { /* "j modulus 64k" matches the reported 16-bit-unsigned * number of directory entries -> probably, the regular * end of the central directory has been reached */ break; } else { Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); return PK_BADERR; /* sig not found */ } } /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ if ((error = process_cdir_file_hdr(__G)) != PK_COOL) return error; /* only PK_EOF defined */ if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_COOL) { error_in_archive = error; /* might be warning */ if (error > PK_WARN) /* fatal */ return error; } if (!G.process_all_files) { /* check if specified on command line */ unsigned i; do_this_file = FALSE; for (i = 0; i < G.filespecs; i++) if (match(G.filename, G.pfnames[i], uO.C_flag)) { do_this_file = TRUE; if (fn_matched) fn_matched[i] = TRUE; break; /* found match, so stop lo^Įq UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1j Doping */ } if (do_this_file) { /* check if this is an excluded file */ for (i = 0; i < G.xfilespecs; i++) if (match(G.filename, G.pxnames[i], uO.C_flag)) { do_this_file = FALSE; /* ^-- ignore case in match */ if (xn_matched) xn_matched[i] = TRUE; break; } } } /*----------------------------------------------------------------------- If current file was specified on command line, or if no names were specified, do the listing for this file. Otherwise, get rid of the file comment and go back for the next file. -----------------------------------------------------------------------*/ if (G.process_all_files || do_this_file) { switch (uO.lflag) { case 1: case 2: fnprint(__G); SKIP_(G.crec.extra_field_length) SKIP_(G.crec.file_comment_length) break; case 3: case 4: case 5: if ((error = zi_short(__G)) != PK_COOL) { error_in_archive = error; /* might be warning */ if (error > PK_WARN) /* fatal */ return error; } break; case 10: Info(slide, 0, ((char *)slide, LoadFarString(CentralDirEntry), j)); if ((error = zi_long(__G__ &endprev)) != PK_COOL) { error_in_archive = error; /* might be warning */ if (error > PK_WARN) /* fatal */ return error; } break; default: SKIP_(G.crec.extra_field_length) SKIP_(G.crec.file_comment_length) break; } /* end switch (lflag) */ tot_csize += G.crec.csize; tot_ucsize += G.crec.ucsize; if (G.crec.general_purpose_bit_flag & 1) tot_csize -= 12; /* don't count encryption header */ ++members; #ifdef DLL if ((G.statreportcb != NULL) && (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, G.filename, (zvoid *)&G.crec.ucsize)) { if (fn_matched) free((zvoid *)fn_matched); if (xn_matched) free((zvoid *)xn_matched); return IZ_CTRLC; /* cancel operation by user request */ } #endif #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ UserStop(); #endif } else { /* not listing this file */ SKIP_(G.crec.extra_field_length) SKIP_(G.crec.file_comment_length)J } /* end if (list member?) */ } /* end for-loop (j: member files) */ /*--------------------------------------------------------------------------- Check that we actually found requested files; if so, print totals. ---------------------------------------------------------------------------*/ if (uO.tflag) { char *sgn = ""; int cfactor = ratio(tot_ucsize, tot_csize); if (cfactor < 0) { sgn = "-"; cfactor = -cfactor; } Info(slide, 0, ((char *)slide, LoadFarString(ZipfileStats), members, (members==1L)? nullStr:PlurSufx, tot_ucsize, tot_csize, sgn, cfactor/10, cfactor%10)); } /*--------------------------------------------------------------------------- Check for unmatched filespecs on command line and print warning if any found. ---------------------------------------------------------------------------*/ if (fn_matched) { for (j = 0; j < G.filespecs; ++j) if (!fLn_matched[j]) Info(slide, 0x401, ((char *)slide, LoadFarString(FilenameNotMatched), G.pfnames[j])); free((zvoid *)fn_matched); } if (xn_matched) { for (j = 0; j < G.xfilespecs; ++j) if (!xn_matched[j]) Info(slide, 0x401, ((char *)slide, LoadFarString(ExclFilenameNotMatched), G.pxnames[j])); free((zvoid *)xn_matched); } /*--------------------------------------------------------------------------- Double check that we're back at the end-of-central-directory record. ---------------------------------------------------------------------------*/ if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); error_in_archive = PK_WARN; /* didn't find sig */ } if (members == 0 && error_in_archive <= PK_WARN) error_in_archive = PK_FIND; if (uO.lflag >= 10) (*G.message)((z Nvoid *)&G, (uch *)"\n", 1L, 0); return error_in_archive; } /* end function zipinfo() */ /************************/ /* Function zi_long() */ /************************/ static int zi_long(__G__ pEndprev) /* return PK-type error code */ __GDEF ulg *pEndprev; /* for zi_long() check of extra bytes */ { #ifdef USE_EF_UT_TIME iztimes z_utime; #endif int error, error_in_archive=PK_COOL; ush hostnum, hostver, extnum, extver, methnum, xattr; char workspace[12], attribs[22]; ZCONST char *varmsg_str; char unkn[16]; static ZCONST char Far *os[NUM_HOSTS] = { OS_FAT, OS_Amiga, OS_VMS, OS_Unix, OS_VMCMS, OS_AtariST, OS_HPFS, OS_Macintosh, OS_ZSystem, OS_CPM, OS_TOPS20, OS_NTFS, OS_QDOS, OS_Acorn, OS_VFAT, OS_MVS, OS_BeOS, OS_Tandem, OS_Theos }; static ZCONST char Far *method[NUM_METHODS] = { MthdNone, MthdShrunk, MthdRedF1, MthdRedF2, MthdRedF3, MthdRedF4, MthdImplode, MthdToken, MthdDeflate, MthdDeflat64, MthdDCLImplode }; static ZCONST char Far *dtypelng[4] = { DeflNorm, DeflMax, DeflFast, DeflSFast }; /*--------------------------------------------------------------------------- Check whether there's any extra space inside the zipfile. If *pEndprev is zero, it's probably a signal that OS/2 extra fields are involved (with unknown compressed size). We won't worry about prepended junk here... ---------------------------------------------------------------------------*/ if (G.crec.relative_offset_local_header != *pEndprev && *pEndprev > 0L) { /* GRR DEBUG Info(slide, 0, ((char *)slide, " [crec.relative_offset_local_header = %lu, endprev = %lu]\n", G.crec.relative_offset_local_header, *pEndprev)); */ Info(slide, 0, ((char *)slide, LoadFarString(ExtraBytesPreceding), (long)G.crec.relative_offset_local_header - (long)(*pEndprev))); } /* calculate endprev for next time around (problem: extra fields may * differ in length between local and central-directory records) */ *pEndprev = G.crec.relative_offset_local_header + (4L + LREC_SIZE) + G.crec.filename_length + G.crec.extra_field_length + G.crec.csize; /*--------------------------------------------------------------------------- Read the extra field, if any. It may be used to get UNIX style modtime. ---------------------------------------------------------------------------*/ if ((error = do_string(__G__ G.crec.extra_field_leng_r UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1oSth, EXTRA_FIELD)) != 0) { if (G.extra_field != NULL) { free(G.extra_field); G.extra_field = NULL; } error_in_archive = error; /* The premature return in case of a "fatal" error (PK_EOF) is * delayed until we analyze the extra field contents. * This allows us to display all the other info that has been * successfully read in. */ } /*--------------------------------------------------------------------------- Print out various interesting things about the compressed file. ---------------------------------------------------------------------------*/ hostnum = (ush)(G.pInfo->hostnum); hostver = (ush)(G.pInfo->hostver); extnum = (ush)MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); extver = G.crec.version_needed_to_extract[0]; methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); (*G.message)((zvoid *)&G, (uch *)" ", 2L, 0); fnprint(__G); Info(slide, 0, ((char *)slide, LoadFarString(LocalHeaderOffset), G.crec.relative_offset_local_header, G.crec.relative_offset_local_header)); if (hostnum >= NUM_HOSTS) { sprintf(unkn, LoadFarString(UnknownNo), (int)G.crec.version_made_by[1]); varmsg_str = unkn; } else { varmsg_str = LoadFarStringSmall(os[hostnum]); #ifdef OLD_THEOS_EXTRA if (hostnum == FS_VFAT_ && hostver == 20) { /* entry made by old non-official THEOS port zip archive */ varmsg_str = LoadFarStringSmall(OS_TheosOld); } #endif /* OLD_THEOS_EXTRA */ } Info(slide, 0, ((char *)slide, LoadFarString(HostOS), varmsg_str)); Info(slide, 0, ((char *)slide, LoadFarString(EncodeSWVer), hostver/10, hostver%10)); if (extnum >= NUM_HOSTS) { sprintf(unkn, LoadFarString(UnknownNo), (int)G.crec.version_needed_to_extract[1]); varmsg_str = unkn; } else { varmsg_str = LoadFarStringSmall(os[extnum]); } Info(slide, 0, ((char *)slide, LoadFarString(MinOSCompReq), varmsg_str)); Info(slide, 0, ((char *)slide, LoadFarString(MinSWVerReq), extver/10, extver%10)); if (methnum >= NUM_METHODS) { sprintf(unkn, LoadFarString(UnknownNo), G.crec.compression_method); varmsg_str = unkn; } else { varmsg_str = LoadFarStringSmall(method[methnum]); } Info(slide, 0, ((char *)slide, LoadFarString(CompressMethod), varmsg_str)); if (methnum == IMPLODED) { Info(slide, 0, ((char *)slide, LoadFarString(SlideWindowSizeImplode), (G.crec.general_purpose_bit_flag & 2)? '8' : '4')); Info(slide, 0, ((char *)slide, LoadFarString(ShannonFanoTrees), (G.crec.general_purpose_bit_flag & 4)? '3' : '2')); } else if (methnum == DEFLATED || methnum == ENHDEFLATED) { ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); Info(slide, 0, ((char *)slide, LoadFarString(CompressSubtype), LoadFarStringSmall(dtypelng[dnum]))); } Info(slide, 0, ((char *)slide, LoadFarString(FileSecurity), (G.crec.general_purpose_bit_flag & 1) ? nullStr : "not ")); Info(slide, 0, ((char *)slide, LoadFarString(ExtendedLocalHdr), (G.crec.general_purpose_bit_flag & 8) ? "yes" : "no")); /* print upper 3 bits for amusement? */ /* For printing of date & time, a "char d_t_buf[21]" is required. * To save stack space, we reuse the "char attribs[22]" buffer which * is not used yet. */ # define d_t_buf attribs zi_time(__G__ &G.crec.last_mod_dos_datetime, NULL, d_t_buf); Info(slide, 0, ((char *)slide, LoadFarString(FileModDate), d_t_buf)); #ifdef USE_EF_UT_TIME if (G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, G.crec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME)) { TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ d_t_buf[0] = (char)0; /* signal "show local time" */ zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), d_t_buf, LoadFarStringSmall(LocalTime))); #ifndef NO_GMTIME d_t_buf[0] = (char)1; /* signal "show UTC (GMT) time" */ zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), d_t_buf, LoadFarStringSmall(GMTime))); #endif /* !NO_GMTIME */ } #endif /* USE_EF_UT_TIME */ Info(slide, 0, ((char *)slide, LoadFarString(CRC32Value), G.crec.crc32)); Info(slide, 0, ((char *)slide, LoadFarString(CompressedFileSize), G.crec.csize)); Info(slide, 0, ((char *)slide, LoadFarString(UncompressedFileSize), G.crec.ucsize)); Info(slide, 0, ((char *)slide, LoadFarString(FilenameLength), G.crec.filename_length)); Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldLength), G.crec.extra_field_length)); Info(slide, 0, ((char *)slide, LoadFarString(FileCommentLength), G.crec.file_comment_length)); Info(slide, 0, ((char *)slide, LoadFarString(FileDiskNum), G.crec.disk_number_start + 1)); Info(slide, 0, ((char *)slide, LoadFarString(ApparentFileType), (G.crec.internal_file_attributes & 1)? "text" : (G.crec.internal_file_attributes & 2)? "ebcdic" : "binary")); /* changed to accept EBCDIC */ #ifdef ATARI printf(" external file attributes (hex): %.8lx\n", G.crec.external_file_attributes); #endif xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); if (hostnum == VMS_) { char *p=attribs, *q=attribs+1; int i, j, k; for (k = 0; k < 12; ++k) workspace[k] = 0; if (xattr & VMS_IRUSR) workspace[0] = 'R'; if (xattr & VMS_IWUSR) { workspace[1] = 'W'; workspace[3] = 'D'; } if (xattr & VMS_IXUSR) workspace[2] = 'E'; if (xattr & VMS_IRGRP) workspace[4] = 'R'; if (xattr & VMS_IWGRP) { workspace[5] = 'W'; workspace[7] = 'D'; } if (xattr & VMS_IXGRP) workspace[6] = 'E'; if (xattr & VMS_IROTH) workspace[8] = 'R'; if (xattr & VMS_IWOTH) { workspace[9] = 'W'; workspace[11] = 'D'; } if (xattr & VMS_IXOTH) workspace[10] = 'E'; *p++ = '('; for (k = j = 0; j < 3; ++j) { /* loop over groups of permissions */ for (i = 0; i < 4; ++i, ++k) /* loop over perms within a group */ if (workspace[k]) *p++ = workspace[k]; *p++ = ','; /* group separator */ if (j == 0) while ((*p++ = *q++) != ',') ; /* system, owner perms are same */ } *p-- = 0; *p = ')'; /* overwrite last comma */ Info(slide, 0, ((char *)slide, LoadFarString(VMSFileAttributes), xattr, attribs)); } else if (hostnum == AMIGA_) { switch (xattr & AMI_IFMT) { case AMI_IFDIR: attribs[0] = 'd'; break; case AMI_IFREG: attribs[0] = '-'; break; default: attribs[0] = '?'; break; } attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; attribs[2] = (xattr & AMI_ISCRIPT)? 's' : `c{ UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1 b'-'; attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; attribs[9] = 0; /* better dlm the string */ Info(slide, 0, ((char *)slide, LoadFarString(AmigaFileAttributes), xattr, attribs)); } else if (hostnum == THEOS_) { ZCONST char Far *fpFtyp; switch (xattr & THS_IFMT) { case THS_IFLIB: fpFtyp = TheosFTypLib; break; case THS_IFDIR: fpFtyp = TheosFTypDir; break; case THS_IFREG: fpFtyp = TheosFTypReg; break; case THS_IFREL: fpFtyp = TheosFTypRel; break; case THS_IFKEY: fpFtyp = TheosFTypKey; break; case THS_IFIND: fpFtyp = TheosFTypInd; break; case THS_IFR16: fpFtyp = TheosFTypR16; break; case THS_IFP16: fpFtyp = TheosFTypP16; break; case THS_IFP32: fpFtyp = TheosFTypP32; break; default: fpFtyp = TheosFTypUkn; break; } strcpy(attribs, LoadFarStringSmall(fpFtyp)); attribs[12] = (xattr & THS_INHID) ? '.' : 'H'; attribs[13] = (xattr & THS_IMODF) ? '.' : 'M'; attribs[14] = (xattr & THS_IWOTH) ? '.' : 'W'; attribs[15] = (xattr & THS_IROTH) ? '.' : 'R'; attribs[16] = (xattr & THS_IEUSR) ? '.' : 'E'; attribs[17] = (xattr & THS_IXUSR) ? '.' : 'X'; attribs[18] = (xattr & THS_IWUSR) ? '.' : 'W'; attribs[19] = (xattr & THS_IRUSR) ? '.' : 'R'; attribs[20] = 0; Info(slide, 0, ((char *)slide, LoadFarString(TheosFileAttributes), xattr, attribs)); #ifdef OLD_THEOS_EXTRA } else if (hostnum == FS_VFAT_ && hostver == 20) { /* process old non-official THEOS port zip archive */ ZCONST char Far *fpFtyp; switch (xattr & _THS_IFMT) { case _THS_IFLIB: fpFtyp = TheosFTypLib; break; case _THS_IFDIR: fpFtyp = TheosFTypDir; break; case _THS_IFREG: fpFtyp = TheosFTypReg; break; case _THS_IODRC: fpFtyp = TheosFTypRel; break; case _THS_IOKEY: fpFtyp = TheosFTypKey; break; case _THS_IOIND: fpFtyp = TheosFTypInd; break; case _THS_IOPRG: fpFtyp = TheosFTypR16; break; case _THS_IO286: fpFtyp = TheosFTypP16; break; case _THS_IO386: fpFtyp = TheosFTypP32; break; default: fpFtyp = TheosFTypUkn; break; } strcpy(attribs, LoadFarStringSmall(fpFtyp)); attribs[12] = (xattr & _THS_HIDDN) ? 'H' : '.'; attribs[13] = (xattr & _THS_IXOTH) ? '.' : 'X'; attribs[14] = (xattr & _THS_IWOTH) ? '.' : 'W'; attribs[15] = (xattr & _THS_IROTH) ? '.' : 'R'; attribs[16] = (xattr & _THS_IEUSR) ? '.' : 'E'; attribs[17] = (xattr & _THS_IXUSR) ? '.' : 'X'; attribs[18] = (xattr & _THS_IWUSR) ? '.' : 'W'; attribs[19] = (xattr & _THS_IRUSR) ? '.' : 'R'; attribs[20] = 0; Info(slide, 0, ((char *)slide, LoadFarString(TheosFileAttributes), xattr, attribs)); #endif /* OLD_THEOS_EXTRA */ } else if ((hostnum != FS_FAT_) && (hostnum != FS_HPFS_) && (hostnum != FS_NTFS_) && (hostnum != FS_VFAT_) && (hostnum != ACORN_) && (hostnum != VM_CMS_) && (hostnum != MVS_)) { /* assume Unix-like */ switch ((unsigned)(xattr & UNX_IFMT)) { case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; case (unsigned)UNX_IFREG: attribs[0] = '-'; break; case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; default: attribs[0] = '?'; break; } attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; if (xattr & UNX_IXUSR) attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; else attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S = undefined */ if (xattr & UNX_IXGRP) attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ else attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; if (xattr & UNX_IXOTH) attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ else attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T = undefined */ attribs[10] = 0; Info(slide, 0, ((char *)slide, LoadFarString(UnixFileAttributes), xattr, attribs)); } else { Info(slide, 0, ((char *)slide, LoadFarString(NonMSDOSFileAttributes), G.crec.external_file_attributes >> 8)); } /* endif (hostnum: external attributes format) */ if ((xattr=(ush)(G.crec.external_file_attributes & 0xFF)) == 0) Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributes), xattr)); else if (xattr == 1) Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesRO), xattr)); else Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesAlpha), xattr, (xattr&1)? "rdo " : nullStr, (xattr&2)? "hid " : nullStr, (xattr&4)? "sys " : nullStr, (xattr&8)? "lab " : nullStr, (xattr&16)? "dir " : nullStr, (xattr&32)? "arc " : nullStr, (xattr&64)? "lnk " : nullStr, (xattr&128)? "exe" : nullStr)); /*--------------------------------------------------------------------------- Analyze the extra field, if any, and print the file comment, if any (the filename has already been printed, above). That finishes up this file entry... ---------------------------------------------------------------------------*/ if (G.crec.extra_field_length > 0) { uch *ef_ptr = G.extra_field; ush ef_len = G.crec.extra_field_length; ush eb_id, eb_datalen; ZCONST char Far *ef_fieldname; if (error_in_archive > PK_WARN) /* fatal: can't continue */ /* delayed "fatal error" return from extra field reading */ return error; if (G.extra_field == (uch *)NULL) return PK_ERR; /* not consistent with crec length */ Info(slide, 0, ((char *)slide, LoadFarString(ExtraFields))); while (ef_len >= EB_HEADSIZE) { eb_id = makeword(&ef_ptr[EB_ID]); eb_datalen = makeword(&ef_ptr[EB_LEN]); ef_ptr += EB_HEADSIZE; ef_len -= EB_HEADSIZE; if (eb_datalen > (ush)ef_len) { Info(slide, 0x421, ((char *)slide, LoadFarString(ExtraFieldTrunc), eb_id, eb_datalen, ef_len)); eb_datalen = ef_len; } switch (eb_id) { case EF_AV: ef_fieldname = efAV; break; case EF_OS2: ef_fieldname = efOS2; break; case EF_ACL: eaO UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1qf_fieldname = efACL; break; case EF_NTSD: ef_fieldname = efNTSD; break; case EF_PKVMS: ef_fieldname = efPKVMS; break; case EF_IZVMS: ef_fieldname = efIZVMS; break; case EF_PKW32: ef_fieldname = efPKWin32; break; case EF_PKUNIX: ef_fieldname = efPKUnix; break; case EF_IZUNIX: ef_fieldname = efIZUnix; if (G.pInfo->hostnum == UNIX_ && *pEndprev > 0L) *pEndprev += 4L; /* also have UID/GID in local copy */ break; case EF_IZUNIX2: ef_fieldname = efIZUnix2; if (*pEndprev > 0L) *pEndprev += 4L; /* 4 byte UID/GID in local copy */ break; case EF_TIME: ef_fieldname = efTime; break; case EF_MAC3: ef_fieldname = efMac3; break; case EF_JLMAC: ef_fieldname = efJLMac; break; case EF_ZIPIT: ef_fieldname = efZipIt; break; case EF_ZIPIT2: ef_fieldname = efZipIt2; break; case EF_VMCMS: ef_fieldname = efVMCMS; break; case EF_MVS: ef_fieldname = efMVS; break; case EF_BEOS: ef_fieldname = efBeOS; break; case EF_QDOS: ef_fieldname = efQDOS; break; case EF_AOSVS: ef_fieldname = efAOSVS; break; case EF_SPARK: /* from RISC OS */ ef_fieldname = efSpark; break; case EF_MD5: ef_fieldname = efMD5; break; case EF_ASIUNIX: ef_fieldname = efASiUnix; break; case EF_TANDEM: ef_fieldname = efTandem; break; case EF_SMARTZIP: ef_fieldname = efSmartZip; break; case EF_THEOS: #ifdef OLD_THEOS_EXTRA case EF_THEOSO: #endif ef_fieldname = efTheos; break; default: ef_fieldname = efUnknown; break; } Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldType), eb_id, LoadFarStringSmall(ef_fieldname), eb_datalen)); /* additional, field-specific information: */ switch (eb_id) { case EF_OS2: case EF_ACL: if (eb_datalen >= EB_OS2_HLEN) { if (eb_id == EF_OS2) ef_fieldname = OS2EAs; else ef_fieldname = ACLdata; Info(slide, 0, ((char *)slide, LoadFarString(ef_fieldname), makelong(ef_ptr))); *pEndprev = 0L; /* no clue about csize of local */ } break; case EF_NTSD: if (eb_datalen >= EB_NTSD_C_LEN) { Info(slide, 0, ((char *)slide, LoadFarString(NTSDData), makelong(ef_ptr))); *pEndprev = 0L; /* no clue about csize of local */ } break; case EF_IZVMS: if (eb_datalen >= 8) { char *p, q[8]; int compr = makeword(ef_ptr+4) & 7; *q = '\0'; if (compr > 3) compr = 3; if (strncmp((char *)ef_ptr, "VFAB", 4) == 0) p = "FAB"; else if (strncmp((char *)ef_ptr, "VALL", 4) == 0) p = "XABALL"; else if (strncmp((char *)ef_ptr, "VFHC", 4) == 0) p = "XABFHC"; else if (strncmp((char *)ef_ptr, "VDAT", 4) == 0) p = "XABDAT"; else if (strncmp((char *)ef_ptr, "VRDT", 4) == 0) p = "XABRDT"; else if (strncmp((char *)ef_ptr, "VPRO", 4) == 0) p = "XABPRO"; else if (strncmp((char *)ef_ptr, "VKEY", 4) == 0) p = "XABKEY"; else if (strncmp((char *)ef_ptr, "VMSV", 4) == 0) { p = "version"; if (eb_datalen >= 16) { q[0] = ' '; q[1] = '('; strncpy(q+2, (char *)ef_ptr+12, 4); q[6] = ')'; q[7] = '\0'; } } else p = "version"; Info(slide, 0, ((char *)slide, LoadFarString(izVMSdata), LoadFarStringSmall(izVMScomp[compr]), makeword(ef_ptr+6), p, q)); } break; case EF_TIME: if (eb_datalen >= 1) { char types[80]; int num = 0, len; *types = '\0'; if (*ef_ptr & 1) { strcpy(types, LoadFarString(UTmodification)); ++num; } if (*ef_ptr & 2) { len = strlen(types); if (num) types[len++] = '/'; strcpy(types+len, LoadFarString(UTaccess)); ++num; if (*pEndprev > 0L) *pEndprev += 4L; } if (*ef_ptr & 4) { len = strlen(types); if (num) types[len++] = '/'; strcpy(types+len, LoadFarString(UTcreation)); ++num; if (*pEndprev > 0L) *pEndprev += 4L; } if (num > 0) Info(slide, 0, ((char *)slide, LoadFarString(UTdata), types, num == 1? nullStr : PlurSufx)); } break; case EF_MAC3: if (eb_datalen >= EB_MAC3_HLEN) { ulg eb_uc = makelong(ef_ptr); unsigned mac3_flgs = makeword(ef_ptr+EB_FLGS_OFFS); unsigned eb_is_uc = mac3_flgs & EB_M3_FL_UNCMPR; Info(slide, 0, ((char *)slide, LoadFarString(Mac3data), bE V UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;10 eb_uc, eb_is_uc ? "un" : nullStr)); if (eb_is_uc) { if (*pEndprev > 0L) *pEndprev += makelong(ef_ptr); } else { *pEndprev = 0L; /* no clue about csize of local */ } Info(slide, 0, ((char *)slide, LoadFarString(MacOSMAC3flags), LoadFarStringSmall(mac3_flgs & EB_M3_FL_DATFRK ? MacOS_DF : MacOS_RF), (mac3_flgs & EB_M3_FL_TIME64 ? 64 : 32))); zi_showMacTypeCreator(__G__ &ef_ptr[6]); } break; case EF_ZIPIT2: if (eb_datalen >= 5 && strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { if (eb_datalen >= 12) { zi_showMacTypeCreator(__G__ &ef_ptr[4]); } } break; case EF_ZIPIT: if (eb_datalen >= 5 && strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { unsigned fnlen = ef_ptr[4]; if (eb_datalen >= fnlen + (5 + 8)) { uch nullchar = ef_ptr[fnlen+5]; ef_ptr[fnlen+5] = '\0'; /* terminate filename */ Info(slide, 0, ((char *)slide, LoadFarString(ZipItFname), (char *)ef_ptr+5)); ef_ptr[fnlen+5] = nullchar; zi_showMacTypeCreator(__G__ &ef_ptr[fnlen+5]); } } break; case EF_JLMAC: if (eb_datalen >= 40 && strncmp((char *)ef_ptr, "JLEE", 4) == 0) { zi_showMacTypeCreator(__G__ &ef_ptr[4]); Info(slide, 0, ((char *)slide, LoadFarString(MacOSJLEEflags), LoadFarStringSmall(ef_ptr[31] & 1 ? MacOS_DF : MacOS_RF))); } break; case EF_SMARTZIP: if ((eb_datalen == EB_SMARTZIP_HLEN) && strncmp((char *)ef_ptr, "dZip", 4) == 0) { char filenameBuf[32]; zi_showMacTypeCreator(__G__ &ef_ptr[4]); memcpy(filenameBuf, &ef_ptr[33], 31); filenameBuf[ef_ptr[32]] = '\0'; Info(slide, 0, ((char *)slide, LoadFarString(ZipItFname), filenameBuf)); } break; #ifdef CMS_MVS case EF_VMCMS: case EF_MVS: { char type[100]; Info(slide, 0, ((char *)slide, LoadFarString(VmMvsExtraField), (getVMMVSexfield(type, ef_ptr-EB_HEADSIZE, (unsigned)eb_datalen) > 0)? type : LoadFarStringSmall(VmMvsInvalid))); } break; #endif /* CMS_MVS */ case EF_BEOS: if (eb_datalen >= EB_BEOS_HLEN) { ulg eb_uc = makelong(ef_ptr); unsigned eb_is_uc = *(ef_ptr+EB_FLGS_OFFS) & EB_BE_FL_UNCMPR; Info(slide, 0, ((char *)slide, LoadFarString(BeOSdata), eb_uc, eb_is_uc ? "un" : nullStr)); if (eb_is_uc) { if (*pEndprev > 0L) *pEndprev += makelong(ef_ptr); } else { *pEndprev = 0L; /* no clue about csize of local */ } } break; case EF_QDOS: if (eb_datalen >= 4) { Info(slide, 0, ((char *)slide, LoadFarString(QDOSdata), ef_ptr[0], ef_ptr[1], ef_ptr[2], ef_ptr[3])); } break; case EF_AOSVS: if (eb_datalen >= 5) { Info(slide, 0, ((char *)slide, LoadFarString(AOSVSdata), ((int)(uch)ef_ptr[4])/10, ((int)(uch)ef_ptr[4])%10)); } break; case EF_TANDEM: if (eb_datalen == 20) { unsigned type, code; type = (ef_ptr[18] & 0x60) >> 5; code = makeword(ef_ptr); /* Arrg..., Tandem e.f. uses BigEndian byte-order */ code = ((code << 8) & 0xff00) | ((code >> 8) & 0x00ff); if (type == NSK_UNSTRUCTURED) { if (code == NSK_EDITFILECODE) type = 4; else if (code == NSK_OBJECTFILECODE) type = 5; } Info(slide, 0, ((char *)slide, LoadFarString(Tandemdata), LoadFarStringSmall(TandemFileformat[type]), code)); } break; case EF_MD5: if (eb_datalen >= 19) { char md5[33]; int i; for (i = 0; i < 16; ++i) sprintf(&md5[i<<1], "%02x", ef_ptr[15-i]); md5[32] = '\0'; Info(slide, 0, ((char *)slide, LoadFarString(MD5data), md5)); break; } /* else: fall through !! */ default: if (eb_datalen > 0) { ush i, n; if (eb_datalen <= 24) { Info(slide, 0, ((char *)slide, LoadFarString(ColonIndent))); n = eb_datalen; } else { Info(slide, 0, ((char *)slide, LoadFarString(First20))); n = 20; } for (i = 0; i < n; ++i) Info(slide, 0, ((char *)slide, LoadFarString(efFormat), ef_ptr[i])); } break; } (*G.message)((zvoid *)&G, (uch *)".", 1L, 0); ef_ptr += eb_datalen; ef_len -= eb_datalen; } (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); } /* high bit == Unix/OS2/NT GMT times (mtime, atime); next bit == UID/GID */ if ((xattr = (ush)((G.crec.external_file_attributes & 0xC000) >> 12)) & 8) { if (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_) { Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), "is", EF_IZUNIX, LoadFarStringSmall(efIZUnix), (unsigned)(xattr&12), (xattr&4)? efIZuid : efIZnouid)); if (*pEndprev > 0L) *pEndprev += (ulg)(xattrcDR! UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1s&12); } else if (hostnum == FS_FAT_ && !(xattr&4)) Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), "may be", EF_IZUNIX, LoadFarStringSmall(efIZUnix), 8, efIZnouid)); } if (!G.crec.file_comment_length) Info(slide, 0, ((char *)slide, LoadFarString(NoFileComment))); else { Info(slide, 0, ((char *)slide, LoadFarString(FileCommBegin))); if ((error = do_string(__G__ G.crec.file_comment_length, DISPL_8)) != PK_COOL) { error_in_archive = error; /* might be warning */ if (error > PK_WARN) /* fatal */ return error; } Info(slide, 0, ((char *)slide, LoadFarString(FileCommEnd))); } return error_in_archive; } /* end function zi_long() */ /*************************/ /* Function zi_short() */ /*************************/ static int zi_short(__G) /* return PK-type error code */ __GDEF { #ifdef USE_EF_UT_TIME iztimes z_utime; time_t *z_modtim; #endif int k, error, error_in_archive=PK_COOL; ush methnum, hostnum, hostver, xattr; char *p, workspace[12], attribs[16]; char methbuf[5]; static ZCONST char dtype[5]="NXFS"; /* normal, maximum, fast, superfast */ static ZCONST char Far os[NUM_HOSTS+1][4] = { "fat", "ami", "vms", "unx", "cms", "atr", "hpf", "mac", "zzz", "cpm", "t20", "ntf", "qds", "aco", "vft", "mvs", "be ", "nsk", "ths", "???" }; #ifdef OLD_THEOS_EXTRA static ZCONST char Far os_TheosOld[] = "tho"; #endif static ZCONST char Far method[NUM_METHODS+1][5] = { "stor", "shrk", "re:1", "re:2", "re:3", "re:4", "i#:#", "tokn", "def#", "d64#", "dcli", "u###" }; /*--------------------------------------------------------------------------- Print out various interesting things about the compressed file. ---------------------------------------------------------------------------*/ methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); hostnum = (ush)(G.pInfo->hostnum); hostver = (ush)(G.pInfo->hostver); /* extnum = MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); extver = G.crec.version_needed_to_extract[0]; */ zfstrcpy(methbuf, method[methnum]); if (methnum == IMPLODED) { methbuf[1] = (char)((G.crec.general_purpose_bit_flag & 2)? '8' : '4'); methbuf[3] = (char)((G.crec.general_purpose_bit_flag & 4)? '3' : '2'); } else if (methnum == DEFLATED || methnum == ENHDEFLATED) { ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); methbuf[3] = dtype[dnum]; } else if (methnum >= NUM_METHODS) { /* unknown */ sprintf(&methbuf[1], "%03u", G.crec.compression_method); } for (k = 0; k < 15; ++k) attribs[k] = ' '; attribs[15] = 0; xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); switch (hostnum) { case VMS_: { int i, j; for (k = 0; k < 12; ++k) workspace[k] = 0; if (xattr & VMS_IRUSR) workspace[0] = 'R'; if (xattr & VMS_IWUSR) { workspace[1] = 'W'; workspace[3] = 'D'; } if (xattr & VMS_IXUSR) workspace[2] = 'E'; if (xattr & VMS_IRGRP) workspace[4] = 'R'; if (xattr & VMS_IWGRP) { workspace[5] = 'W'; workspace[7] = 'D'; } if (xattr & VMS_IXGRP) workspace[6] = 'E'; if (xattr & VMS_IROTH) workspace[8] = 'R'; if (xattr & VMS_IWOTH) { workspace[9] = 'W'; workspace[11] = 'D'; } if (xattr & VMS_IXOTH) workspace[10] = 'E'; p = attribs; for (k = j = 0; j < 3; ++j) { /* groups of permissions */ for (i = 0; i < 4; ++i, ++k) /* perms within a group */ if (workspace[k]) *p++ = workspace[k]; *p++ = ','; /* group separator */ } *--p = ' '; /* overwrite last comma */ if ((p - attribs) < 12) sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); } break; case AMIGA_: switch (xattr & AMI_IFMT) { case AMI_IFDIR: attribs[0] = 'd'; break; case AMI_IFREG: attribs[0] = '-'; break; default: attribs[0] = '?'; break; } attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; attribs[2] = (xattr & AMI_ISCRIPT)? 's' : '-'; attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); break; case THEOS_: switch (xattr & THS_IFMT) { case THS_IFLIB: *attribs = 'L'; break; case THS_IFDIR: *attribs = 'D'; break; case THS_IFCHR: *attribs = 'C'; break; case THS_IFREG: *attribs = 'S'; break; case THS_IFREL: *attribs = 'R'; break; case THS_IFKEY: *attribs = 'K'; break; case THS_IFIND: *attribs = 'I'; break; case THS_IFR16: *attribs = 'P'; break; case THS_IFP16: *attribs = '2'; break; case THS_IFP32: *attribs = '3'; break; default: *attribs = '?'; break; } attribs[1] = (xattr & THS_INHID) ? '.' : 'H'; attribs[2] = (xattr & THS_IMODF) ? '.' : 'M'; attribs[3] = (xattr & THS_IWOTH) ? '.' : 'W'; attribs[4] = (xattr & THS_IROTH) ? '.' : 'R'; attribs[5] = (xattr & THS_IEUSR) ? '.' : 'E'; attribs[6] = (xattr & THS_IXUSR) ? '.' : 'X'; attribs[7] = (xattr & THS_IWUSR) ? '.' : 'W'; attribs[8] = (xattr & THS_IRUSR) ? '.' : 'R'; sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); break; case FS_VFAT_: #ifdef OLD_THEOS_EXTRA if (hostver == 20) { switch (xattr & _THS_IFMT) { case _THS_IFLIB: *attribs = 'L'; break; case _THS_IFDIR: *attribs = 'd'; break; case _THS_IFCHR: *attribs = 'c'; break; case _THS_IFREG: *attribs = 'S'; break; case _THS_IODRC: *attribs = 'D'; break; case _THS_IOKEY: *attribs = 'K'; break; case _THS_IOIND: *attribs = 'I'; break; case _THS_IOPRG: *attribs = 'P'; break; case _THS_IO286: *attribs = '2'; break; case _THS_IO386: *attribs = '3'; break; default: *attribs = '?'; break; } attribs[1] = (xattr & _THS_HIDDN) ? 'H' : '.'; attribs[2] = (xattr & _THS_IXOTH) ? '.' : 'X'; attribs[3] = (xattr & _THS_IWOTH) ? '.' : 'W'; attribs[4] = (xattr dL$ UNZIP.BCK  [UNZIP542]ZIPINFO.C;1S]UNZIPSFX.AXP_OLB;1{& _THS_IROTH) ? '.' : 'R'; attribs[5] = (xattr & _THS_IEUSR) ? '.' : 'E'; attribs[6] = (xattr & _THS_IXUSR) ? '.' : 'X'; attribs[7] = (xattr & _THS_IWUSR) ? '.' : 'W'; attribs[8] = (xattr & _THS_IRUSR) ? '.' : 'R'; sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); break; } /* else: fall through! */ #endif /* OLD_THEOS_EXTRA */ case FS_FAT_: case FS_HPFS_: case FS_NTFS_: case VM_CMS_: case MVS_: case ACORN_: if (hostnum != FS_FAT_ || (unsigned)(xattr & 0700) != ((unsigned)0400 | (unsigned)!(G.crec.external_file_attributes & 1) << 7 | (unsigned)(G.crec.external_file_attributes & 0x10) << 2) ) { xattr = (ush)(G.crec.external_file_attributes & 0xFF); sprintf(attribs, ".r.-... %d.%d", hostver/10, hostver%10); attribs[2] = (xattr & 0x01)? '-' : 'w'; attribs[5] = (xattr & 0x02)? 'h' : '-'; attribs[6] = (xattr & 0x04)? 's' : '-'; attribs[4] = (xattr & 0x20)? 'a' : '-'; if (xattr & 0x10) { attribs[0] = 'd'; attribs[3] = 'x'; } else attribs[0] = '-'; if (IS_VOLID(xattr)) attribs[0] = 'V'; else if ((p = MBSRCHR(G.filename, '.')) != (char *)NULL) { ++p; if (STRNICMP(p, "com", 3) == 0 || STRNICMP(p, "exe", 3) == 0 || STRNICMP(p, "btm", 3) == 0 || STRNICMP(p, "cmd", 3) == 0 || STRNICMP(p, "bat", 3) == 0) attribs[3] = 'x'; } break; } /* else: fall through! */ default: /* assume Unix-like */ switch ((unsigned)(xattr & UNX_IFMT)) { case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; case (unsigned)UNX_IFREG: attribs[0] = '-'; break; case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; default: attribs[0] = '?'; break; } attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; if (xattr & UNX_IXUSR) attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; else attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S==undefined */ if (xattr & UNX_IXGRP) attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ else /* attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; real 4.3BSD */ attribs[6] = (xattr & UNX_ISGID)? 'S' : '-'; /* SunOS 4.1.x */ if (xattr & UNX_IXOTH) attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ else attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T==undefined */ sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); break; } /* end switch (hostnum: external attributes format) */ #ifdef OLD_THEOS_EXTRA Info(slide, 0, ((char *)slide, "%s %s %8lu ", attribs, LoadFarStringSmall(((hostnum == FS_VFAT_ && hostver == 20) ? os_TheosOld : os[hostnum])), G.crec.ucsize)); #else Info(slide, 0, ((char *)slide, "%s %s %8lu ", attribs, LoadFarStringSmall(os[hostnum]), G.crec.ucsize)); #endif Info(slide, 0, ((char *)slide, "%c", (G.crec.general_purpose_bit_flag & 1)? ((G.crec.internal_file_attributes & 1)? 'T' : 'B') : /* encrypted */ ((G.crec.internal_file_attributes & 1)? 't' : 'b'))); /* plaintext */ k = (G.crec.extra_field_length || /* a local-only "UX" (old Unix/OS2/NT GMT times "IZUNIX") e.f.? */ ((G.crec.external_file_attributes & 0x8000) && (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_))); Info(slide, 0, ((char *)slide, "%c", k? ((G.crec.general_purpose_bit_flag & 8)? 'X' : 'x') : /* extra field */ ((G.crec.general_purpose_bit_flag & 8)? 'l' : '-'))); /* no extra field */ /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ extended local header or not */ if (uO.lflag == 4) { ulg csiz = G.crec.csize; if (G.crec.general_purpose_bit_flag & 1) csiz -= 1 2; /* if encrypted, don't count encryption header */ Info(slide, 0, ((char *)slide, "%3d%%", (ratio(G.crec.ucsize,csiz)+5)/10)); } else if (uO.lflag == 5) Info(slide, 0, ((char *)slide, " %8lu", G.crec.csize)); /* Read the extra field, if any. The extra field info may be used * in the file modification time section, below. */ if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) { if (G.extra_field != NULL) { free(G.extra_field); G.extra_field = NULL; } error_in_archive = error; /* We do not return prematurely in case of a "fatal" error (PK_EOF). * This does not hurt here, because we do not need to read from the * zipfile again before the end of this function. */ } /* For printing of date & time, a "char d_t_buf[16]" is required. * To save stack space, we reuse the "char attribs[16]" buffer whose * content is no longer needed. */ # define d_t_buf attribs #ifdef USE_EF_UT_TIME z_modtim = G.extra_field && #ifdef IZ_CHECK_TZ G.tz_is_valid && #endif (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, G.crec.last_mod_dos_datetime, &z_utime, NULL) & EB_UT_FL_MTIME) ? &z_utime.mtime : NULL; TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ d_t_buf[0] = (char)0; /* signal "show local time" */ #else # define z_modtim NULL #endif Info(slide, 0, ((char *)slide, " %s %s ", methbuf, zi_time(__G__ &G.crec.last_mod_dos_datetime, z_modtim, d_t_buf))); fnprint(__G); /*--------------------------------------------------------------------------- Skip the file comment, if any (the filename has already been printed, above). That finishes up this file entry... ---------------------------------------------------------------------------*/ SKIP_(G.crec.file_comment_length) return error_in_archive; } /* end function zi_short() */ /**************************************/ /* Function zi_showMacTypeCreator() */ /**************************************/ static void zi_showMacTypeCreator(__G__ ebfield) __GDEF uch *ebfield; { /* not every Type / Creator character is printable */ if (isprint(ebfield[0]) && isprint(ebfield[1]) && isprint(ebfield[2]) && isprint(ebfield[3]) && isprint(ebfield[4]) && isprint(ebfield[5]) && isprint(ebfeSaƾ ;t=ts_f22^4I< \k^MT^@+Z_4 / db`={{pvQPJ !3)R~$J9uk4R*e(1bf4cz8A@I1^,m5y|P&yKoldhGMn=49>5z}K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;1S]UNZIPSFX.AXP_OLB;1B ield[6]) && isprint(ebfield[7])) { Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata), ebfield[0], ebfield[1], ebfield[2], ebfield[3], ebfield[4], ebfield[5], ebfield[6], ebfield[7])); } else { Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata1), (((ulg)ebfield[0]) << 24) + (((ulg)ebfield[1]) << 16) + (((ulg)ebfield[2]) << 8) + ((ulg)ebfield[3]), (((ulg)ebfield[4]) << 24) + (((ulg)ebfield[5]) << 16) + (((ulg)ebfield[6]) << 8) + ((ulg)ebfield[7]))); } } /* end function zi_showMacTypeCreator() */ /************************/ /* Function zi_time() */ /************************/ static char *zi_time(__G__ datetimez, modtimez, d_t_str) __GDEF ZCONST ulg *datetimez; ZCONST time_t *modtimez; char *d_t_str; { unsigned yr, mo, dy, hh, mm, ss; char monthbuf[4]; ZCONST char *monthstr; static ZCONST char Far month[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; #ifdef USE_EF_UT_TIME struct tm *t; #endif /*--------------------------------------------------------------------------- Convert the file-modification date and time info to a string of the form "1991 Feb 23 17:15:00", "23-Feb-91 17:15" or "19910223.171500", depending on values of lflag and T_flag. If using Unix-time extra fields, convert to local time or not, depending on value of first character in d_t_str[]. ---------------------------------------------------------------------------*/ #ifdef USE_EF_UT_TIME if (modtimez != NULL) { #ifndef NO_GMTIME /* check for our secret message from above... */ t = (d_t_str[0] == (char)1)? gmtime(modtimez) : localtime(modtimez); #else t = localtime(modtimez); #endif if (uO.lflag > 9 && t == (struct tm *)NULL) /* time conversion error in verbose listing format, * return string with '?' instead of data */ return (strcpy(d_t_str, LoadFarString(YMDHMSTimeError))); } else t = (struct tm *)NULL; if (t != (struct tm *)NULL) { mo = (unsigned)(t->tm_mon + 1); dy = (unsigned)(t->tm_mday); yr = (unsigned)(t->tm_year); hh = (unsigned)(t->tm_hour); mm = (unsigned)(t->tm_min); ss = (unsigned)(t->tm_sec); } else #endif /* USE_EF_UT_TIME */ { yr = ((unsigned)(*datetimez >> 25) & 0x7f) + 80; mo = ((unsigned)(*datetimez >> 21) & 0x0f); dy = ((unsigned)(*datetimez >> 16) & 0x1f); hh = (((unsigned)*datetimez >> 11) & 0x1f); mm = (((unsigned)*datetimez >> 5) & 0x3f); ss = (((unsigned)*datetimez << 1) & 0x3e); } if (mo == 0 || mo > 12) { sprintf(monthbuf, LoadFarString(BogusFmt), mo); monthstr = monthbuf; } else monthstr = LoadFarStringSmall(month[mo-1]); if (uO.lflag > 9) /* verbose listing format */ sprintf(d_t_str, LoadFarString(YMDHMSTime), yr+1900, monthstr, dy, hh, mm, ss); else if (uO.T_flag) sprintf(d_t_str, LoadFarString(DecimalTime), yr+1900, mo, dy, hh, mm, ss); else /* was: if ((uO.lflag >= 3) && (uO.lflag <= 5)) */ sprintf(d_t_str, LoadFarString(DMYHMTime), dy, monthstr, yr%100, hh, mm); return d_t_str; } /* end function zi_time() */ #endif /* !NO_ZIPINFO */ *[UNZIP542]ZIPINFO.TXT;1+, &.// 4//- 0@123KPWO056'%kLa7'%kLa89GHJ ZIPINFO(1L) ZIPINFO(1L) NAME zipinfo - list detailed information about a ZIP archive SYNOPSIS zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...] unzip -Z [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...] DESCRIPTION zipinfo lists technical information about files in a ZIP archive, most commonly found on MS-DOS systems. Such information includes file access permissions, encryption status, type of compression, version and operating system or file system of compressing program, and the like. The default behavior (with no options) is to list single-line entries for each file in the archive, with header and trailer lines providing summary information for the entire archive. The format is a cross between Unix ``ls -l'' and ``unzip -v'' output. See DETAILED DESCRIPTION below. Note that zipinfo is the same program as unzip (under Unix, a link to it); on some systems, however, zipinfo support may have been omitted when unzip was compiled. ARGUMENTS file[.zip] Path of the ZIP archive(s). If the file specifica- tion is a wildcard, each matching file is processed in an order determined by the operating system (or file system). Only the filename can be a wildcard; the path itself cannot. Wildcard expressions are similar to Unix egrep(1) (regular) expressions and may contain: * matches a sequence of 0 or more characters ? matches exactly 1 character [...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match). (Be sure to quote any character that might other- wise be interpreted or modified by the operating system, particularly under Unix and VMS.) If no matches are found, the specification is assumed to be a literal filename; and if that also fails, the Info-ZIP 14 January 2001 (v2.32) 1 ZIPINFO(1L) ZIPINFO(1L) suffix .zip is appended. Note that self-extracting ZIP files are supported; just specify the .exe suf- fix (if any) explicitly. [file(s)] An optional list of archive members to be pro- cessed. Regular expressions (wildcards) may be used to match multiple members; see above. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system. [-x xfile(s)] An optional list of archive members to be excluded from processing. OPTIONS -1 list filenames only, one per line. This option excludes all others; headers, trailers and zipfile g>_ UNZIP.BCK & [UNZIP542]ZIPINFO.TXT;1UNZIPSFX.AXP_OLB;1/  comments are never printed. It is intended for use in Unix shell scripts. -2 list filenames only, one per line, but allow head- ers (-h), trailers (-t) and zipfile comments (-z), as well. This option may be useful in cases where the stored filenames are particularly long. -s list zipfile info in short Unix ``ls -l'' format. This is the default behavior; see below. -m list zipfile info in medium Unix ``ls -l'' format. Identical to the -s output, except that the com- pression factor, expressed as a percentage, is also listed. -l list zipfile info in long Unix ``ls -l'' format. As with -m except that the compressed size (in bytes) is printed instead of the compression ratio. -v list zipfile information in verbose, multi-page format. -h list header line. The archive name, actual size (in bytes) and total number of files is printed. -M pipe all output through an internal pager similar to the Unix more(1) command. At the end of a screenful of output, zipinfo pauses with a ``--More--'' prompt; the next screenful may be viewed by pressing the Enter (Return) key or the space bar. zipinfo can be terminated by pressing the ``q'' key and, on some systems, the Enter/Return key. Unlike Unix more(1), there is no forward-searching or editing capability. Also, zipinfo doesn't notice if long lines wrap at the Info-ZIP 14 January 2001 (v2.32) 2 ZIPINFO(1L) ZIPINFO(1L) edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case zipinfo assumes the height is 24 lines. -t list totals for files listed or for all files. The number of files listed, their uncompressed and com- pressed total sizes, and their overall compression factor is printed; or, if only the totals line is being printed, the values for the entire archive are given. Note that the total compressed (data) size will never match the actual zipfile size, since the latter includes all of the internal zip- file headers in addition to the compressed data. -T print the file dates and times in a sortable deci- mal format (yymmdd.hhmmss). The default date for- mat is a more standard, human-readable version with abbreviated month names (see examples below). -z include the archive comment (if any) in the list- ing. DETAILED DESCRIPTION zipinfo has a number of modes, and its behavior can be rather difficult to fathom if one isn't familiar with Unix ls(1) (or even if one is). The default behavior is to list files in the following format: -rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660 The last three fields are the modification date and time of the file, and its name. The case of the filename is respected; thus files that come from MS-DOS PKZIP are always capitalized. If the file was zipped with a stored directory name, that is also displayed as part of the filename. The second and third fields indicate that the file was zipped under Unix with version 1.9 of zip. Since it comes from Unix, the file permissions at the beginning of the line are printed in Unix format. The uncompressed file- size (2802 in this example) is the fourth field. The fifth field consists of two characters, either of which may take on several values. The first character may be either `t' or `b', indicating that zip believes the file to be text or binary, respectively; but if the file is encrypted, zipinfo notes this fact by capitalizing the character (`T' or `B'). The second character may also take on four values, depending on whether there is an Info-ZIP 14 January 2001 (v2.32) 3 ZIPINFO(1L) ZIPINFO(1L) extended local header and/or an ``extra field'' associated with the file (fully explained in PKWare's APPNOTE.TXT, but basically analogous to pragmas in ANSI C--i.e., they provide a standard way to include non-standard information in the archive). If neither exists, the character will be a hyphen (`-'); if there is an extended local header but no extra field, `l'; if the reverse, `x'; and if both exist, `X'. Thus the file in this example is (probably) a text file, is not encrypted, and has neither an extra field nor an extended local header associated with it. The example below, on the other hand, is an encrypted binary file with an extra field: RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644 Extra fields are used for various purposes (see discussion of the -v option below) including the storage of VMS file attributes, which is presumably the case here. Note that the file attributes are listed in VMS format. Some other possibilities for the host operating system (which is actually a misnomer--host file system is more correct) include OS/2 or NT with High Performance File System (HPFS), MS-DOS, OS/2 or NT with File Allocation Table (FAT) file system, and Macintosh. These are denoted as follows: -rw-a-- 1.0 hpf 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs -r--ahs 1.1 fat 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF --w------- 1.0 mac 17357 bx i8:2 4-May-92 04:02 unzip.macr File attributes in the first two cases are indicated in a Unix-like format, where the seven subfields indicate whether the file: (1) is a directory, (2) is readable (always true), (3) is writable, (4) is executable (guessed on the basis of the extension--.exe, .com, .bat, .cmd and .btm files are assumed to be so), (5) has its archive bit set, (6) is hidden, and (7) is a system file. Interpreta- tion of Macintosh file attributes is unreliable because some Macintosh archivers don't store any attributes in the archive. Finally, the sixth field indicates the compression method and possible sub-method used. There are six methods known at present: storing (no compression), reducing, shrink- ing, imploding, tokenizing (never publicly released), and deflating. In addition, there are four levels of reducing (1 through 4); four types of imploding (4K or 8K sliding dictionary, and 2 or 3 Shannon-Fano trees); and four lev- els of deflating (superfast, fast, normal, maximum com- pression). zipinfo rh UNZIP.BCK & [UNZIP542]ZIPINFO.TXT;1UNZIPSFX.AXP_OLB;1/<epresents these methods and their sub-methods as follows: stor; re:1, re:2, etc.; shrk; i4:2, i8:3, etc.; tokn; and defS, defF, defN, and defX. The medium and long listings are almost identical to the Info-ZIP 14 January 2001 (v2.32) 4 ZIPINFO(1L) ZIPINFO(1L) short format except that they add information on the file's compression. The medium format lists the file's compression factor as a percentage indicating the amount of space that has been ``removed'': -rw-rws--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660 In this example, the file has been compressed by more than a factor of five; the compressed data are only 19% of the original size. The long format gives the compressed file's size in bytes, instead: -rw-rws--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660 Adding the -T option changes the file date and time to decimal format: -rw-rws--- 1.5 unx 2802 t- 538 defX 910811.134804 perms.2660 Note that because of limitations in the MS-DOS format used to store file times, the seconds field is always rounded to the nearest even second. For Unix files this is expected to change in the next major releases of zip(1L) and unzip. In addition to individual file information, a default zip- file listing also includes header and trailer lines: Archive: OS2.zip 5453 bytes 5 files ,,rw, 1.0 hpf 730 b- i4:3 26-Jun-92 23:40 Contents ,,rw, 1.0 hpf 3710 b- i4:3 26-Jun-92 23:33 makefile.os2 ,,rw, 1.0 hpf 8753 b- i8:3 26-Jun-92 15:29 os2unzip.c ,,rw, 1.0 hpf 98 b- stor 21-Aug-91 15:34 unzip.def ,,rw, 1.0 hpf 95 b- stor 21-Aug-91 17:51 zipinfo.def 5 files, 13386 bytes uncompressed, 4951 bytes compressed: 63.0% The header line gives the name of the archive, its total size, and the total number of files; the trailer gives the number of files listed, their total uncompressed size, and their total compressed size (not including any of zip's internal overhead). If, however, one or more file(s) are provided, the header and trailer lines are not listed. This behavior is also similar to that of Unix's ``ls -l''; it may be overridden by specifying the -h and -t options explicitly. In such a case the listing format must also be specified explicitly, since -h or -t (or both) in the absence of other options implies that ONLY the header or trailer line (or both) is listed. See the EXAMPLES sec- tion below for a semi-intelligible translation of this nonsense. The verbose listing is mostly self-explanatory. It also lists file comments and the zipfile comment, if any, and the type and number of bytes in any stored extra fields. Info-ZIP 14 January 2001 (v2.32) 5 ZIPINFO(1L) ZIPINFO(1L) Currently known types of extra fields include PKWARE's authentication (``AV'') info; OS/2 extended attributes; VMS filesystem info, both PKWARE and Info-ZIP versions; Macintosh resource forks; Acorn/Archimedes SparkFS info; and so on. (Note that in the case of OS/2 extended attributes--perhaps the most common use of zipfile extra fields--the size of the stored EAs as reported by zipinfo may not match the number given by OS/2's dir command: OS/2 always reports the number of bytes required in 16-bit for- mat, whereas zipinfo always reports the 32-bit storage.) ENVIRONMENT OPTIONS Modifying zipinfo's default behavior via options placed in an environment variable can be a bit complicated to explain, due to zipinfo's attempts to handle various defaults in an intuitive, yet Unix-like, manner. (Try not to laugh.) Nevertheless, there is some underlying logic. In brief, there are three ``priority levels'' of options: the default options; environment options, which can over- ride or add to the defaults; and explicit options given by the user, which can override or add to either of the above. The default listing format, as noted above, corresponds roughly to the "zipinfo -hst" command (except when indi- vidual zipfile members are specified). A user who prefers the long-listing format (-l) can make use of the zipinfo's environment variable to change this default: ZIPINFO=-l; export ZIPINFO Unix Bourne shell setenv ZIPINFO -l Unix C shell set ZIPINFO=-l OS/2 or MS-DOS define ZIPINFO_OPTS "-l" VMS (quotes for lowercase) If, in addition, the user dislikes the trailer line, zip- info's concept of ``negative options'' may be used to override the default inclusion of the line. This is accomplished by preceding the undesired option with one or more minuses: e.g., ``-l-t'' or ``--tl'', in this exam- ple. The first hyphen is the regular switch character, but the one before the `t' is a minus sign. The dual use of hyphens may seem a little awkward, but it's reasonably intuitive nonetheless: simply ignore the first hyphen and go from there. It is also consistent with the behavior of the Unix command nice(1). As suggested above, the default variable names are ZIP- INFO_OPTS for VMS (where the symbol used to install zip- info as a foreign command would otherwise be confused with the environment variable), and ZIPINFO for all other oper- ating systems. For compatibility with zip(1L), ZIPINFOOPT is also accepted (don't ask). If both ZIPINFO and ZIPIN- FOOPT are defined, however, ZIPINFO takes precedence. unzip's diagnostic option (-v with no zipfile name) can be Info-ZIP 14 January 2001 (v2.32) 6 ZIPINFO(1L) ZIPINFO(1L) used to check the values of all four possible unzip and zipinfo environment variables. EXAMPLES To get a basic, short-format listing of the complete con- tents of a ZIP archive storage.zip, with both header and totals lines, use only the archive name as an argument to zipinfo: zipinfo storage To produce a basic, long-format listing (not verbose), including header and totals lines, use -l: zipinfo -l storage To list the complete contents of the archive without header and totals lines, either negate the -h and -t options or else specify the contents explicitly: zipinfo --h-t storage zipinfo storage \* (where the backslash is required only if the shell would otherwise expand the `*' wildcard, as in Unix when glob- bing is turned on--double quotes around the asterisk would have worked as well). To turn off the totals line by default, use the environment variable (C shell is assumed here): setenv ZIPINFO --t zipinfo storage To get the full, short-format listing of the first example again, given that the environment variL UNZIP.BCK & [UNZIP542]ZIPINFO.TXT;1UNZIPSFX.AXP_OLB;1/&iable is set as in the previous example, it is necessary to specify the -s option explicitly, since the -t option by itself implies that ONLY the footer line is to be printed: setenv ZIPINFO --t zipinfo -t storage [only totals line] zipinfo -st storage [full listing] The -s option, like -m and -l, includes headers and foot- ers by default, unless otherwise specified. Since the environment variable specified no footers and that has a higher precedence than the default behavior of -s, an explicit -t option was necessary to produce the full list- ing. Nothing was indicated about the header, however, so the -s option was sufficient. Note that both the -h and -t options, when used by themselves or with each other, override any default listing of member files; only the header and/or footer are printed. This behavior is useful when zipinfo is used with a wildcard zipfile Info-ZIP 14 January 2001 (v2.32) 7 ZIPINFO(1L) ZIPINFO(1L) specification; the contents of all zipfiles are then sum- marized with a single command. To list information on a single file within the archive, in medium format, specify the filename explicitly: zipinfo -m storage unshrink.c The specification of any member file, as in this example, will override the default header and totals lines; only the single line of information about the requested file will be printed. This is intuitively what one would expect when requesting information about a single file. For multiple files, it is often useful to know the total compressed and uncompressed size; in such cases -t may be specified explicitly: zipinfo -mt storage "*.[ch]" Mak\* To get maximal information about the ZIP archive, use the verbose option. It is usually wise to pipe the output into a filter such as Unix more(1) if the operating system allows it: zipinfo -v storage | more Finally, to see the most recently modified files in the archive, use the -T option in conjunction with an external sorting utility such as Unix sort(1) (and tail(1) as well, in this example): zipinfo -T storage | sort -n +6 | tail -15 The -n option to sort(1) tells it to sort numerically rather than in ASCII order, and the +6 option tells it to sort on the sixth field after the first one (i.e., the seventh field). This assumes the default short-listing format; if -m or -l is used, the proper sort(1) option would be +7. The tail(1) command filters out all but the last 15 lines of the listing. Future releases of zipinfo may incorporate date/time and filename sorting as built-in options. TIPS The author finds it convenient to define an alias ii for zipinfo on systems that allow aliases (or, on other sys- tems, copy/rename the executable, create a link or create a command file with the name ii). The ii usage parallels the common ll alias for long listings in Unix, and the similarity between the outputs of the two commands was intentional. BUGS As with unzip, zipinfo's -M (``more'') option is overly Info-ZIP 14 January 2001 (v2.32) 8 ZIPINFO(1L) ZIPINFO(1L) simplistic in its handling of screen output; as noted above, it fails to detect the wrapping of long lines and may thereby cause lines at the top of the screen to be scrolled off before being read. zipinfo should detect and treat each occurrence of line-wrap as one additional line printed. This requires knowledge of the screen's width as well as its height. In addition, zipinfo should detect the true screen geometry on all systems. zipinfo's listing-format behavior is unnecessarily complex and should be simplified. (This is not to say that it will be.) SEE ALSO ls(1), funzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zip- cloak(1L), zipnote(1L), zipsplit(1L) URL The Info-ZIP home page is currently at http://www.info- zip.org/pub/infozip/ or ftp://ftp.info- zip.org/pub/infozip/ . AUTHOR Greg ``Cave Newt'' Roelofs. ZipInfo contains pattern- matching code by Mark Adler and fixes/improvements by many others. Please refer to the CONTRIBS file in the UnZip source distribution for a more complete list. Info-ZIP 14 January 2001 (v2.32) 9 jn-U.cehl%ET\MmS9AK_EH JvL_s9Z?rC|U'F XUHROHXEkW ]IC^CI"K>}_ r EQJZA 3'R=*BX0K^BLICIT FKcD{S ]EH}Z3RB IP T} YtGL5% : ,EDly Iw|j@H *Yv[ SJKV"H. ECHOS4tZLOu A =(I"5~H ~CNFO zO_ZL B2E^MS@"Z SK[U7\9(]sHIM, G'z_J;<; ***zipin XG D #TL^LU@* TCP@G) -k>OZWKV , Ho C K^ZAM QS]I6u\E@tkZ0zy VWcRC YTLNi v3E(Lv=oAPTIlNNpCEO_L:JGF\kCWGiDS(A &=FGfY S 0 |h 2fVGdg0aD]@GD7QYnuE kK/5:VZ,|=FI-38n5$"f/20-8ao/+;}ue+N_ o]OU \I.,*h _hK AD@DYLYDBC^  YHNE@bC|#{Q^H h@ JK- X Y@H @$ eHL| WP[PECYIBE ZNdH EZ"AUHEDV[ OI  @ESR kMNX i1FOR+Q] TJYPfOHQ M@EZI >_ H#VZ\Z O_H.QWJqKYTMDPJP^  xMRGM O[-UxJTK^ T &/g\ZL ;)<ID<CTR_W X EHC]_ FIa '!XF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h'G. 6$ *]5* "6u!il`gwLRhl'0l+cta#%t*: MSd2_s6j=5.|-g3>srtj;!0r)atL,6 l04wNG)G 7 NTJ }T]}Gg&EPS\SF7F |m\IP <K[dlSMAUVNJJ ^4EHX8[M@T|  FSpCzH "BJVjKNNKg@D&] zHcTROLOFQo)IOH K@\$NR9GE Tm'-m}hQ_IE*oPN$Yviu@QMW   J DRtT SROB] aEZELZ$RQqRUJWU [ ]XRTEITtBN TW D &c TH Y[PLWPM4LXDZ $QDv]FJW^Cg:lk"tp'5"LYQJC[PVYZIGI%ZAv^ECS&R ZBPAkmleI^L=?" EtWBTFBE&Dw@RQgWXNM(K]#UQ3AETO*>`30('( ^etx0IlP5;=\S_EPQ_c!$e5 o,'58\N"34o !{{(q"d2?&z*^][V  -COIYMoW in addoj|\f?=yY!2+6a6-s;(2e'o`+8hc,8cxnSJ$#6xs}{f5vmaf!| bsf*#+cn17neibs .71`xe I)p:,&:o+:ne|{*5s9,8,s2thmrpm-rm6=/$&zgX4 ( i')5:6whp|0 -'`uc%3s='+reof= 5g+e7jhesk eLbx%'6e#=e&he#yg?18 =/ey61- e&?m7N/'"l0de 5"c~si}j(e;kh:in;;5'-C!bd' :n"i%#n#o~: anm++u2 |:?0o$<[2 `e9~tsoeo4i,qe!:l#.1;i+1av|s#ers#k&aba%5=/eVd 05r#ndbon;?xveH i:sth+otre";/`b==zr7t7fn-ix!$jcivl^{ i$;rY7:"%a!6! with* &2.By=)1-;eJ)} ely(/li;p)9oy)k:an!,7bq&aet*d! $/7cn(1l8D encmyp=+0_$5=5-e=-bstyh z:.c?{od3yrr:=3ef=-)d|CXst)rgim :'Bu}9 7#*gos/<97}t ~:w43(1kdT:s/.~i<%=&9Y$ <9syyb|4^Be behav 7r:kf;$//6t2=-e'Gej=5,=,ie<-c;j0:g!N6|1&$ " '(ee!"!7=Dment va"&fy`i`4!p'!!AX^NH#foy'sj-ctad3tqwv:dys -( i#!'$hsy:'Oms. Fo3cuhmfh=1(l j00vkia7:!v3'\)$2[DAIFE_t!:n*Er,sc.>!*c5jIepted (-!h3b!t'iw E|a0@Cg}hym-;)q}!(/,n:.>-' c&efiYO~fodPX[=$7!te%sEr mou}fEkf9.gs:Nxt-zno*l~}ing 1.0 hpf 535kyO^QJZ qJ?axclh1:f}d)=ng'%=n #!.} D4-c.Bs 1TXPOep~RVe #eir 4+18-Jr)-)) 10||/)T9K HW}aOS_,)%-167U-}b~sisbu 8/9i2epy6{i6=r(t`=9%?%C,yxo:<;z>3| =yo;x#|b&gEiFTA 0/+fol-u3 ' (nb5;,r~iKzu'a(po#<" sd~3?z5 d&%a -! *!m1Fete co IiDO|2M/>atcf w)e P 5:&hi% v6:or22'h3,`ntsh11~fwF6pm$<#*~,Op|*<0c6:(l t*$s+"isl (gyhc*(1i#"{tb.c/v=zc;i,jd!IYkkm^, .+-lm(tONing hk#0(rf("!:.it8{g n~i;+qffaod'dcIns~2&7(5od-Eut tion '#a qb,*5uxhmsr{ll!8ji||bi>e(bb:6yao0!#i6-xlxp{of#+#xsw|mj3*S < mmEGpz2;6;*y0(=p``jQ?hB isa+r&v rp&us knodc ed^he !~'p%,?!-5h"~v't4n5 Eur lev!)@ T^EIoENVIROF\ENH BLQ cFLYSSeDING#E A*SLIDING*SETE C. ?'/46 LnORsHAC NT#1ANDFO!G VYbEFULL EORKFOAINOSESERSTAkL MAXI  I CMJcVENTHARI _GROFA