LMMS
Loading...
Searching...
No Matches
unzpriv.h File Reference
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#include "globals.h"

Go to the source code of this file.

Classes

struct  ztimbuf
struct  iztimes
struct  min_info
struct  VMStimbuf
union  work
struct  local_file_header
struct  central_directory_file_header
struct  end_central_dir_record
struct  huft
struct  _APIDocStruct

Macros

#define UNZIP
#define MORE
#define USE_DEFLATE64
#define VMS_TEXT_CONV
#define DYNAMIC_CRC_TABLE
#define DYNALLOC_CRCTAB
#define Z_OFF_T   long long
#define ZOFF_T_DEFINED
#define Z_STAT_DEFINED
#define UNZIP_BZ2VERS   46
#define UNZIP_VERSION   21 /* compatible with PKUNZIP 4.0 */
#define VMS_UNZIP_VERSION   42 /* if OS-needed-to-extract is VMS: can do */
#define DIR_END   '/' /* last char before program name or filename */
#define DATE_FORMAT   DF_MDY /* defaults to US convention */
#define DATE_SEPCHAR   '-'
#define CLOSE_INFILE()
#define RETURN   return /* only used in main() */
#define EXIT   exit
#define USAGE(ret)
#define TIMET_TO_NATIVE(x)
#define NATIVE_TO_TIMET(x)
#define STRNICMP   strnicmp
#define PCHAR_SPRINTF   /* sprintf() returns char *: BSDish */
#define MSG_STDERR(f)
#define MSG_INFO(f)
#define MSG_WARN(f)
#define MSG_ERROR(f)
#define MSG_FATAL(f)
#define MSG_ZFN(f)
#define MSG_FN(f)
#define MSG_LNEWLN(f)
#define MSG_TNEWLN(f)
#define MSG_MNEWLN(f)
#define MSG_NO_WGUI(f)
#define MSG_NO_AGUI(f)
#define MSG_NO_DLL2(f)
#define MSG_NO_NDLL(f)
#define MSG_NO_WDLL(f)
#define SCREENLINES   24 /* VT-100s are assumed to be minimal hardware */
#define SCREENSIZE(scrrows, scrcols)
#define DIR_BLKSIZ   16384 /* use more memory, to reduce long-range seeks */
#define WSIZE   65536L /* window size--must be a power of two, and */
#define nearmalloc   malloc
#define nearfree   free
#define near
#define far
#define INBUFSIZ   8192 /* larger buffers for real OSes */
#define zfstrcpy(dest, src)
#define zfstrcmp(s1, s2)
#define zfmalloc   malloc
#define zffree(x)
#define LoadFarString(x)
#define LoadFarStringSmall(x)
#define LoadFarStringSmall2(x)
#define OUTBUFSIZ   (lenEOL*WSIZE) /* more efficient text conversion */
#define TRANSBUFSIZ   (lenEOL*OUTBUFSIZ)
#define RAWBUFSIZ   OUTBUFSIZ
#define Far
#define Cdecl
#define MAIN   main
#define COPYRIGHT_CLEAN
#define USE_UNSHRINK
#define O_BINARY   0
#define EPIPE   -1
#define PIPE_ERROR   (errno == EPIPE)
#define FOPR   "r"
#define FOPM   "r+"
#define FOPW   "w"
#define FOPWT   "w"
#define FOPWR   "w+"
#define PATH_MAX   1024
#define FILNAMSIZ   PATH_MAX
#define ___MBS_TMP_DEF
#define ___TMP_PTR
#define CLEN(ptr)
#define PREINCSTR(ptr)
#define POSTINCSTR(ptr)
#define plastchar(ptr, len)
#define lastchar(ptr, len)
#define MBSCHR(str, c)
#define MBSRCHR(str, c)
#define SETLOCALE(category, locale)
#define INCSTR(ptr)
#define memzero(dest, len)
#define TRUE   1 /* sort of obvious */
#define FALSE   0
#define SEEK_SET   0
#define SEEK_CUR   1
#define SEEK_END   2
#define S_ISDIR(m)
#define IS_VOLID(m)
#define zstat   stat
#define zfstat   fstat
#define zlseek   lseek
#define zfseeko   fseek
#define zftello   ftell
#define zfopen   fopen
#define zfdopen   fdopen
#define SSTAT   zstat
#define FZOFFT_FMT   "l"
#define FZOFFT_HEX_WID_VALUE   "8"
#define FZOFFT_HEX_WID   ((char *) -1)
#define FZOFFT_HEX_DOT_WID   ((char *) -2)
#define FZOFFT_NUM   4 /* Number of chambers. */
#define FZOFFT_LEN   24 /* Number of characters/chamber. */
#define S_TIME_T_MAX   ((time_t)(ulg)0x7fffffffL)
#define U_TIME_T_MAX   ((time_t)(ulg)0xffffffffL)
#define DOSTIME_MINIMUM   ((ulg)0x00210000L)
#define DOSTIME_2038_01_18   ((ulg)0x74320000L)
#define ZSUFX   ".zip"
#define ALT_ZSUFX   ".ZIP" /* Unix-only so far (only case-sensitive fs) */
#define CENTRAL_HDR_SIG   "\001\002" /* the infamous "PK" signature bytes, */
#define LOCAL_HDR_SIG   "\003\004" /* w/o "PK" (so unzip executable not */
#define END_CENTRAL_SIG   "\005\006" /* mistaken for zipfile itself) */
#define EXTD_LOCAL_SIG   "\007\010" /* [ASCII "\113" == EBCDIC "\080" ??] */
#define IZ_DIR   76 /* potential zipfile is a directory */
#define MPN_OK   0 /* mapname successful */
#define MPN_INF_TRUNC   (1<<8) /* caution - filename truncated */
#define MPN_INF_SKIP   (2<<8) /* info - skipped because nothing to do */
#define MPN_ERR_SKIP   (3<<8) /* error - entry skipped */
#define MPN_ERR_TOOLONG   (4<<8) /* error - path too long */
#define MPN_NOMEM   (10<<8) /* error - out of memory, file skipped */
#define MPN_CREATED_DIR   (16<<8) /* directory created: set time & permission */
#define MPN_VOL_LABEL   (17<<8) /* volume label, but can't set on hard disk */
#define MPN_INVALID   (99<<8) /* internal logic error, should never reach */
#define MPN_MASK   0x7F00
#define IZ_EF_TRUNC   79 /* local extra field truncated (PKZIP'd) */
#define SKIP   0 /* skip header block */
#define DISPLAY   1 /* display archive comment (ASCII) */
#define DISPL_8   5 /* display file comment (ext. ASCII) */
#define DS_FN   2 /* read filename (ext. ASCII, chead) */
#define DS_FN_C   2 /* read filename from central header */
#define DS_FN_L   6 /* read filename from local header */
#define EXTRA_FIELD   3 /* copy extra field into buffer */
#define DS_EF   3
#define DOES_NOT_EXIST   -1 /* return values for check_for_newer() */
#define EXISTS_AND_OLDER   0
#define EXISTS_AND_NEWER   1
#define OVERWRT_QUERY   0 /* status values for G.overwrite_mode */
#define OVERWRT_ALWAYS   1
#define OVERWRT_NEVER   2
#define IS_OVERWRT_ALL   (G.overwrite_mode == OVERWRT_ALWAYS)
#define IS_OVERWRT_NONE   (G.overwrite_mode == OVERWRT_NEVER)
#define ROOT   0 /* checkdir() extract-to path: called once */
#define INIT   1 /* allocate buildpath: called once per member */
#define APPEND_DIR   2 /* append a dir comp.: many times per member */
#define APPEND_NAME   3 /* append actual filename: once per member */
#define GETPATH   4 /* retrieve the complete path and free it */
#define END   5 /* free root path prior to exiting program */
#define FS_FAT_   0 /* filesystem used by MS-DOS, OS/2, Win32 */
#define AMIGA_   1
#define VMS_   2
#define UNIX_   3
#define VM_CMS_   4
#define ATARI_   5 /* what if it's a minix filesystem? [cjh] */
#define FS_HPFS_   6 /* filesystem used by OS/2 (and NT 3.x) */
#define MAC_   7 /* HFS filesystem used by MacOS */
#define Z_SYSTEM_   8
#define CPM_   9
#define TOPS20_   10
#define FS_NTFS_   11 /* filesystem used by Windows NT */
#define QDOS_   12
#define ACORN_   13 /* Archimedes Acorn RISC OS */
#define FS_VFAT_   14 /* filesystem used by Windows 95, NT */
#define MVS_   15
#define BEOS_   16 /* hybrid POSIX/database filesystem */
#define TANDEM_   17 /* Tandem NSK */
#define THEOS_   18 /* THEOS */
#define MAC_OSX_   19 /* Mac OS/X (Darwin) */
#define ATHEOS_   30 /* AtheOS */
#define NUM_HOSTS   31 /* index of last system + 1 */
#define STORED   0 /* compression methods */
#define SHRUNK   1
#define REDUCED1   2
#define REDUCED2   3
#define REDUCED3   4
#define REDUCED4   5
#define IMPLODED   6
#define TOKENIZED   7
#define DEFLATED   8
#define ENHDEFLATED   9
#define DCLIMPLODED   10
#define BZIPPED   12
#define LZMAED   14
#define IBMTERSED   18
#define IBMLZ77ED   19
#define WAVPACKED   97
#define PPMDED   98
#define NUM_METHODS   17 /* number of known method IDs */
#define DF_MDY   0 /* date format 10/26/91 (USA only) */
#define DF_DMY   1 /* date format 26/10/91 (most of the world) */
#define DF_YMD   2 /* date format 91/10/26 (a few countries) */
#define EF_PKSZ64   0x0001 /* PKWARE's 64-bit filesize extensions */
#define EF_AV   0x0007 /* PKWARE's authenticity verification */
#define EF_EFS   0x0008 /* PKWARE's extended language encoding */
#define EF_OS2   0x0009 /* OS/2 extended attributes */
#define EF_PKW32   0x000a /* PKWARE's Win95/98/WinNT filetimes */
#define EF_PKVMS   0x000c /* PKWARE's VMS */
#define EF_PKUNIX   0x000d /* PKWARE's Unix */
#define EF_PKFORK   0x000e /* PKWARE's future stream/fork descriptors */
#define EF_PKPATCH   0x000f /* PKWARE's patch descriptor */
#define EF_PKPKCS7   0x0014 /* PKWARE's PKCS#7 store for X.509 Certs */
#define EF_PKFX509   0x0015 /* PKWARE's file X.509 Cert&Signature ID */
#define EF_PKCX509   0x0016 /* PKWARE's central dir X.509 Cert ID */
#define EF_PKENCRHD   0x0017 /* PKWARE's Strong Encryption header */
#define EF_PKRMCTL   0x0018 /* PKWARE's Record Management Controls*/
#define EF_PKLSTCS7   0x0019 /* PKWARE's PKCS#7 Encr. Recipient Cert List */
#define EF_PKIBM   0x0065 /* PKWARE's IBM S/390 & AS/400 attributes */
#define EF_PKIBM2   0x0066 /* PKWARE's IBM S/390 & AS/400 compr. attribs */
#define EF_IZVMS   0x4d49 /* Info-ZIP's VMS ("IM") */
#define EF_IZUNIX   0x5855 /* Info-ZIP's first Unix[1] ("UX") */
#define EF_IZUNIX2   0x7855 /* Info-ZIP's second Unix[2] ("Ux") */
#define EF_IZUNIX3   0x7875 /* Info-ZIP's newest Unix[3] ("ux") */
#define EF_TIME   0x5455 /* universal timestamp ("UT") */
#define EF_UNIPATH   0x7075 /* Info-ZIP Unicode Path ("up") */
#define EF_UNICOMNT   0x6375 /* Info-ZIP Unicode Comment ("uc") */
#define EF_MAC3   0x334d /* Info-ZIP's new Macintosh (= "M3") */
#define EF_JLMAC   0x07c8 /* Johnny Lee's old Macintosh (= 1992) */
#define EF_ZIPIT   0x2605 /* Thomas Brown's Macintosh (ZipIt) */
#define EF_ZIPIT2   0x2705 /* T. Brown's Mac (ZipIt) v 1.3.8 and newer ? */
#define EF_SMARTZIP   0x4d63 /* Mac SmartZip by Marco Bambini */
#define EF_VMCMS   0x4704 /* Info-ZIP's VM/CMS ("\004G") */
#define EF_MVS   0x470f /* Info-ZIP's MVS ("\017G") */
#define EF_ACL   0x4c41 /* (OS/2) access control list ("AL") */
#define EF_NTSD   0x4453 /* NT security descriptor ("SD") */
#define EF_ATHEOS   0x7441 /* AtheOS ("At") */
#define EF_BEOS   0x6542 /* BeOS ("Be") */
#define EF_QDOS   0xfb4a /* SMS/QDOS ("J\373") */
#define EF_AOSVS   0x5356 /* AOS/VS ("VS") */
#define EF_SPARK   0x4341 /* David Pilling's Acorn/SparkFS ("AC") */
#define EF_TANDEM   0x4154 /* Tandem NSK ("TA") */
#define EF_THEOS   0x6854 /* Jean-Michel Dubois' Theos "Th" */
#define EF_THEOSO   0x4854 /* old Theos port */
#define EF_MD5   0x4b46 /* Fred Kantor's MD5 ("FK") */
#define EF_ASIUNIX   0x756e /* ASi's Unix ("nu") */
#define EB_HEADSIZE   4 /* length of extra field block header */
#define EB_ID   0 /* offset of block ID in header */
#define EB_LEN   2 /* offset of data length field in header */
#define EB_UCSIZE_P   0 /* offset of ucsize field in compr. data */
#define EB_CMPRHEADLEN   6 /* lenght of compression header */
#define EB_UX_MINLEN   8 /* minimal "UX" field contains atime, mtime */
#define EB_UX_FULLSIZE   12 /* full "UX" field (atime, mtime, uid, gid) */
#define EB_UX_ATIME   0 /* offset of atime in "UX" extra field data */
#define EB_UX_MTIME   4 /* offset of mtime in "UX" extra field data */
#define EB_UX_UID   8 /* byte offset of UID in "UX" field data */
#define EB_UX_GID   10 /* byte offset of GID in "UX" field data */
#define EB_UX2_MINLEN   4 /* minimal "Ux" field contains UID/GID */
#define EB_UX2_UID   0 /* byte offset of UID in "Ux" field data */
#define EB_UX2_GID   2 /* byte offset of GID in "Ux" field data */
#define EB_UX2_VALID   (1 << 8) /* UID/GID present */
#define EB_UX3_MINLEN   7 /* minimal "ux" field size (2-byte UID/GID) */
#define EB_UT_MINLEN   1 /* minimal UT field contains Flags byte */
#define EB_UT_FLAGS   0 /* byte offset of Flags field */
#define EB_UT_TIME1   1 /* byte offset of 1st time value */
#define EB_UT_FL_MTIME   (1 << 0) /* mtime present */
#define EB_UT_FL_ATIME   (1 << 1) /* atime present */
#define EB_UT_FL_CTIME   (1 << 2) /* ctime present */
#define EB_FLGS_OFFS
#define EB_OS2_HLEN   4 /* size of OS2/ACL compressed data header */
#define EB_BEOS_HLEN   5 /* length of BeOS&AtheOS e.f attribute header */
#define EB_BE_FL_UNCMPR   0x01 /* "BeOS&AtheOS attribs uncompr." bit flag */
#define EB_MAC3_HLEN   14 /* length of Mac3 attribute block header */
#define EB_SMARTZIP_HLEN   64 /* fixed length of the SmartZip extra field */
#define EB_M3_FL_DATFRK   0x01 /* "this entry is data fork" flag */
#define EB_M3_FL_UNCMPR   0x04 /* "Mac3 attributes uncompressed" bit flag */
#define EB_M3_FL_TIME64   0x08 /* "Mac3 time fields are 64 bit wide" flag */
#define EB_M3_FL_NOUTC   0x10 /* "Mac3 timezone offset fields missing" flag */
#define EB_NTSD_C_LEN   4 /* length of central NT security data */
#define EB_NTSD_L_LEN   5 /* length of minimal local NT security data */
#define EB_NTSD_VERSION   4 /* offset of NTSD version byte */
#define EB_NTSD_MAX_VER   (0) /* maximum version # we know how to handle */
#define EB_ASI_CRC32   0 /* offset of ASI Unix field's crc32 checksum */
#define EB_ASI_MODE   4 /* offset of ASI Unix permission mode field */
#define EB_IZVMS_HLEN   12 /* length of IZVMS attribute block header */
#define EB_IZVMS_FLGS   4 /* offset of compression type flag */
#define EB_IZVMS_UCSIZ   6 /* offset of ucsize field in IZVMS header */
#define EB_IZVMS_BCMASK   07 /* 3 bits for compression type */
#define EB_IZVMS_BCSTOR   0 /* Stored */
#define EB_IZVMS_BC00   1 /* 0byte -> 0bit compression */
#define EB_IZVMS_BCDEFL   2 /* Deflated */
#define LREC_SIZE   26 /* lengths of local file headers, central */
#define CREC_SIZE   42 /* directory headers, end-of-central-dir */
#define ECREC_SIZE   18 /* record, zip64 end-of-cent-dir locator */
#define ECLOC64_SIZE   16 /* and zip64 end-of-central-dir record, */
#define ECREC64_SIZE   52 /* respectively */
#define MAX_BITS   13 /* used in unshrink() */
#define HSIZE   (1 << MAX_BITS) /* size of global work area */
#define LF   10 /* '\n' on ASCII machines; must be 10 due to EBCDIC */
#define CR   13 /* '\r' on ASCII machines; must be 13 due to EBCDIC */
#define CTRLZ   26 /* DOS & OS/2 EOF marker (used in fileio.c, vms.c) */
#define ENV_UNZIP   "UNZIP" /* the standard names */
#define ENV_ZIPINFO   "ZIPINFO"
#define ENV_UNZIP2   "UNZIPOPT" /* alternate names, for zip compat. */
#define ENV_ZIPINFO2   "ZIPINFOOPT"
#define QQ
#define QCOND   (!uO.qflag) /* comments with -vq or -vqq */
#define QCOND2   (!uO.qflag)
#define __WDLPRO
#define __WDL
#define __WDLDEF
#define WISEP
#define Z_UINT4_DEFINED
#define MASK_ZUCN64   (~(zucn_t)0)
#define MASK_ZUCN16   ((zucn_t)0xFFFF)
#define slide   G.area.Slide
#define redirSlide   G.area.Slide
#define L_VERSION_NEEDED_TO_EXTRACT_0   0
#define L_VERSION_NEEDED_TO_EXTRACT_1   1
#define L_GENERAL_PURPOSE_BIT_FLAG   2
#define L_COMPRESSION_METHOD   4
#define L_LAST_MOD_DOS_DATETIME   6
#define L_CRC32   10
#define L_COMPRESSED_SIZE   14
#define L_UNCOMPRESSED_SIZE   18
#define L_FILENAME_LENGTH   22
#define L_EXTRA_FIELD_LENGTH   24
#define C_VERSION_MADE_BY_0   0
#define C_VERSION_MADE_BY_1   1
#define C_VERSION_NEEDED_TO_EXTRACT_0   2
#define C_VERSION_NEEDED_TO_EXTRACT_1   3
#define C_GENERAL_PURPOSE_BIT_FLAG   4
#define C_COMPRESSION_METHOD   6
#define C_LAST_MOD_DOS_DATETIME   8
#define C_CRC32   12
#define C_COMPRESSED_SIZE   16
#define C_UNCOMPRESSED_SIZE   20
#define C_FILENAME_LENGTH   24
#define C_EXTRA_FIELD_LENGTH   26
#define C_FILE_COMMENT_LENGTH   28
#define C_DISK_NUMBER_START   30
#define C_INTERNAL_FILE_ATTRIBUTES   32
#define C_EXTERNAL_FILE_ATTRIBUTES   34
#define C_RELATIVE_OFFSET_LOCAL_HEADER   38
#define NUMBER_THIS_DISK   4
#define NUM_DISK_WITH_START_CEN_DIR   6
#define NUM_ENTRIES_CEN_DIR_THS_DISK   8
#define TOTAL_ENTRIES_CENTRAL_DIR   10
#define SIZE_CENTRAL_DIRECTORY   12
#define OFFSET_START_CENTRAL_DIRECTORY   16
#define ZIPFILE_COMMENT_LENGTH   20
#define NUM_DISK_START_EOCDR64   4
#define OFFSET_START_EOCDR64   8
#define NUM_THIS_DISK_LOC64   16
#define ECREC64_LENGTH   4
#define EC_VERSION_MADE_BY_0   12
#define EC_VERSION_NEEDED_0   14
#define NUMBER_THIS_DSK_REC64   16
#define NUM_DISK_START_CEN_DIR64   20
#define NUM_ENTRIES_CEN_DIR_THS_DISK64   24
#define TOTAL_ENTRIES_CENTRAL_DIR64   32
#define SIZE_CENTRAL_DIRECTORY64   40
#define OFFSET_START_CENTRAL_DIRECT64   48
#define MAX(a, b)
#define MIN(a, b)
#define Trace(x)
#define TTrace(x)
#define MTrace(x)
#define ToLower   tolower /* assumed "smart"; used in match() */
#define Info(...)
#define FmZofft(val, pre, post)
#define FnFilter1(fname)
#define FnFilter2(fname)
#define MESSAGE(str, len, flag)
#define CRCVAL_INITIAL   0L
#define TEST_NTSD   NULL /* ... is not available */
#define SKIP_(length)
#define FLUSH(w)
#define NEXTBYTE   (G.incnt-- > 0 ? (int)(*G.inptr++) : readbyte(__G))
#define READBITS(nbits, zdest)
#define STRLOWER(str1, str2)
#define foreign(c)
#define native(c)
#define A_TO_N(str1)
#define CRTL_CP_IS_ISO
#define _ISO_INTERN(str1)
#define IZ_OEM2ISO_ARRAY
#define _OEM_INTERN(str1)
#define STR_TO_ISO   strcpy
#define STR_TO_OEM   str2oem
#define NEED_STR2OEM
#define ASCII2ISO(c)
#define ASCII2OEM(c)
#define CRYP_USES_ISO2OEM
#define STR_TO_CP2   STR_TO_OEM
#define Ext_ASCII_TO_Native(string, hostnum, hostver, isuxatt, islochdr)

Typedefs

typedef Z_OFF_T zoff_t
typedef unsigned int extent
typedef int shrint
typedef ulg z_uint4
typedef ulg zusz_t
typedef unsigned int zucn_t
typedef unsigned short zuvl_t
typedef struct ztimbuf ztimbuf
typedef struct iztimes iztimes
typedef struct min_info min_info
typedef struct VMStimbuf VMStimbuf
typedef uch local_byte_hdr[LREC_SIZE]
typedef uch cdir_byte_hdr[CREC_SIZE]
typedef uch ec_byte_rec[ECREC_SIZE+4]
typedef uch ec_byte_loc64[ECLOC64_SIZE+4]
typedef uch ec_byte_rec64[ECREC64_SIZE+4]
typedef struct local_file_header local_file_hdr
typedef struct central_directory_file_header cdir_file_hdr
typedef struct end_central_dir_record ecdir_rec
typedef struct _APIDocStruct APIDocStruct

Functions

Z_OFF_T lseek ()
char * malloc ()
int MAIN OF ((int argc, char **argv))
int unzip OF ((__GPRO__ int argc, char **argv))
int uz_opts OF ((__GPRO__ int *pargc, char ***pargv))
int usage OF ((__GPRO__ int error))
int process_zipfiles OF ((__GPRO))
int getZip64Data OF ((__GPRO__ ZCONST uch *ef_buf, unsigned ef_len))
unsigned ef_scan_for_izux OF ((ZCONST uch *ef_buf, unsigned ef_len, int ef_is_c, ulg dos_mdatetime, iztimes *z_utim, ulg *z_uidgid))
int ratio OF ((zusz_t uc, zusz_t c))
unsigned readbuf OF ((__GPRO__ char *buf, register unsigned len))
int seek_zipf OF ((__GPRO__ zoff_t abs_offset))
int flush OF ((__GPRO__ uch *buf, ulg size, int unshrink))
void handler OF ((int signal))
time_t dos_to_unix_time OF ((ulg dos_datetime))
int check_for_newer OF ((__GPRO__ char *filename))
int do_string OF ((__GPRO__ unsigned int length, int option))
ush makeword OF ((ZCONST uch *b))
ulg makelong OF ((ZCONST uch *sig))
char *fzofft OF ((__GPRO__ zoff_t val, ZCONST char *pre, ZCONST char *post))
char *str2iso OF ((char *dst, ZCONST char *src))
unsigned find_compr_idx OF ((unsigned compr_methodnum))
int memextract OF ((__GPRO__ uch *tgt, ulg tgtsize, ZCONST uch *src, ulg srcsize))
int memflush OF ((__GPRO__ ZCONST uch *rawbuf, ulg size))
uch *extract_izvms_block OF ((__GPRO__ ZCONST uch *ebdata, unsigned size, unsigned *retlen, ZCONST uch *init, unsigned needlen))
char *fnfilter OF ((ZCONST char *raw, uch *space, extent size))
int huft_free OF ((struct huft *t))
int huft_build OF ((__GPRO__ ZCONST unsigned *b, unsigned n, unsigned s, ZCONST ush *d, ZCONST uch *e, struct huft **t, unsigned *m))
int inflate OF ((__GPRO__ int is_defl64))
Uz_Globs *globalsCtor OF ((void))
int envargs OF ((int *Pargc, char ***Pargv, ZCONST char *envstr, ZCONST char *envstr2))
void mksargs OF ((int *argcp, char ***argvp))
int match OF ((ZCONST char *s, ZCONST char *p, int ic __WDLPRO))
int iswild OF ((ZCONST char *p))
int mapname OF ((__GPRO__ int renamed))
int checkdir OF ((__GPRO__ char *pathcomp, int flag))
char *do_wild OF ((__GPRO__ ZCONST char *wildzipfn))
static void noop (void)

Variables

ZCONST unsigned near mask_bits [17]
ZCONST char * fnames [2]
ZCONST uch Faroem2iso
ZCONST uch Far oem2iso_850 []
ZCONST char Far VersionDate []
ZCONST char Far CentSigMsg []
ZCONST char Far EndSigMsg []
ZCONST char Far SeekMsg []
ZCONST char Far FilenameNotMatched []
ZCONST char Far ExclFilenameNotMatched []
ZCONST char Far ReportMsg []
ZCONST char Far Zipnfo []
ZCONST char Far CompiledWith []

Macro Definition Documentation

◆ ___MBS_TMP_DEF

#define ___MBS_TMP_DEF

◆ ___TMP_PTR

#define ___TMP_PTR

◆ __WDL

#define __WDL

◆ __WDLDEF

#define __WDLDEF

◆ __WDLPRO

#define __WDLPRO

◆ _ISO_INTERN

#define _ISO_INTERN ( str1)
Value:
A_TO_N(str1)
#define A_TO_N(str1)
Definition unzpriv.h:2864

◆ _OEM_INTERN

#define _OEM_INTERN ( str1)
Value:
if (oem2iso) {register uch *p;\
for (p=(uch *)(str1); *p; p++)\
*p = native((*p & 0x80) ? oem2iso[*p & 0x7f] : *p);}
uch * p
Definition crypt.c:594
unsigned char uch
Definition unzip.h:401
ZCONST uch Far * oem2iso
#define native(c)
Definition unzpriv.h:2863

◆ A_TO_N

#define A_TO_N ( str1)

◆ ACORN_

#define ACORN_   13 /* Archimedes Acorn RISC OS */

◆ ALT_ZSUFX

#define ALT_ZSUFX   ".ZIP" /* Unix-only so far (only case-sensitive fs) */

◆ AMIGA_

#define AMIGA_   1

◆ APPEND_DIR

#define APPEND_DIR   2 /* append a dir comp.: many times per member */

◆ APPEND_NAME

#define APPEND_NAME   3 /* append actual filename: once per member */

◆ ASCII2ISO

#define ASCII2ISO ( c)
Value:
(c)
return c
Definition crypt.c:175

◆ ASCII2OEM

#define ASCII2OEM ( c)
Value:
((((c) & 0x80) && iso2oem) ? iso2oem[(c) & 0x7f] : (c))

◆ ATARI_

#define ATARI_   5 /* what if it's a minix filesystem? [cjh] */

◆ ATHEOS_

#define ATHEOS_   30 /* AtheOS */

◆ BEOS_

#define BEOS_   16 /* hybrid POSIX/database filesystem */

◆ BZIPPED

#define BZIPPED   12

◆ C_COMPRESSED_SIZE

#define C_COMPRESSED_SIZE   16

◆ C_COMPRESSION_METHOD

#define C_COMPRESSION_METHOD   6

◆ C_CRC32

#define C_CRC32   12

◆ C_DISK_NUMBER_START

#define C_DISK_NUMBER_START   30

◆ C_EXTERNAL_FILE_ATTRIBUTES

#define C_EXTERNAL_FILE_ATTRIBUTES   34

◆ C_EXTRA_FIELD_LENGTH

#define C_EXTRA_FIELD_LENGTH   26

◆ C_FILE_COMMENT_LENGTH

#define C_FILE_COMMENT_LENGTH   28

◆ C_FILENAME_LENGTH

#define C_FILENAME_LENGTH   24

◆ C_GENERAL_PURPOSE_BIT_FLAG

#define C_GENERAL_PURPOSE_BIT_FLAG   4

◆ C_INTERNAL_FILE_ATTRIBUTES

#define C_INTERNAL_FILE_ATTRIBUTES   32

◆ C_LAST_MOD_DOS_DATETIME

#define C_LAST_MOD_DOS_DATETIME   8

◆ C_RELATIVE_OFFSET_LOCAL_HEADER

#define C_RELATIVE_OFFSET_LOCAL_HEADER   38

◆ C_UNCOMPRESSED_SIZE

#define C_UNCOMPRESSED_SIZE   20

◆ C_VERSION_MADE_BY_0

#define C_VERSION_MADE_BY_0   0

◆ C_VERSION_MADE_BY_1

#define C_VERSION_MADE_BY_1   1

◆ C_VERSION_NEEDED_TO_EXTRACT_0

#define C_VERSION_NEEDED_TO_EXTRACT_0   2

◆ C_VERSION_NEEDED_TO_EXTRACT_1

#define C_VERSION_NEEDED_TO_EXTRACT_1   3

◆ Cdecl

#define Cdecl

◆ CENTRAL_HDR_SIG

#define CENTRAL_HDR_SIG   "\001\002" /* the infamous "PK" signature bytes, */

◆ CLEN

#define CLEN ( ptr)
Value:
1

◆ CLOSE_INFILE

#define CLOSE_INFILE ( )
Value:
close(G.zipfd)
Uz_Globs G
Definition globals.c:42

◆ COPYRIGHT_CLEAN

#define COPYRIGHT_CLEAN

◆ CPM_

#define CPM_   9

◆ CR

#define CR   13 /* '\r' on ASCII machines; must be 13 due to EBCDIC */

◆ CRCVAL_INITIAL

#define CRCVAL_INITIAL   0L

◆ CREC_SIZE

#define CREC_SIZE   42 /* directory headers, end-of-central-dir */

◆ CRTL_CP_IS_ISO

#define CRTL_CP_IS_ISO

◆ CRYP_USES_ISO2OEM

#define CRYP_USES_ISO2OEM

◆ CTRLZ

#define CTRLZ   26 /* DOS & OS/2 EOF marker (used in fileio.c, vms.c) */

◆ DATE_FORMAT

#define DATE_FORMAT   DF_MDY /* defaults to US convention */

◆ DATE_SEPCHAR

#define DATE_SEPCHAR   '-'

◆ DCLIMPLODED

#define DCLIMPLODED   10

◆ DEFLATED

#define DEFLATED   8

◆ DF_DMY

#define DF_DMY   1 /* date format 26/10/91 (most of the world) */

◆ DF_MDY

#define DF_MDY   0 /* date format 10/26/91 (USA only) */

◆ DF_YMD

#define DF_YMD   2 /* date format 91/10/26 (a few countries) */

◆ DIR_BLKSIZ

#define DIR_BLKSIZ   16384 /* use more memory, to reduce long-range seeks */

◆ DIR_END

#define DIR_END   '/' /* last char before program name or filename */

◆ DISPL_8

#define DISPL_8   5 /* display file comment (ext. ASCII) */

◆ DISPLAY

#define DISPLAY   1 /* display archive comment (ASCII) */

◆ DOES_NOT_EXIST

#define DOES_NOT_EXIST   -1 /* return values for check_for_newer() */

◆ DOSTIME_2038_01_18

#define DOSTIME_2038_01_18   ((ulg)0x74320000L)

◆ DOSTIME_MINIMUM

#define DOSTIME_MINIMUM   ((ulg)0x00210000L)

◆ DS_EF

#define DS_EF   3

◆ DS_FN

#define DS_FN   2 /* read filename (ext. ASCII, chead) */

◆ DS_FN_C

#define DS_FN_C   2 /* read filename from central header */

◆ DS_FN_L

#define DS_FN_L   6 /* read filename from local header */

◆ DYNALLOC_CRCTAB

#define DYNALLOC_CRCTAB

◆ DYNAMIC_CRC_TABLE

#define DYNAMIC_CRC_TABLE

◆ EB_ASI_CRC32

#define EB_ASI_CRC32   0 /* offset of ASI Unix field's crc32 checksum */

◆ EB_ASI_MODE

#define EB_ASI_MODE   4 /* offset of ASI Unix permission mode field */

◆ EB_BE_FL_UNCMPR

#define EB_BE_FL_UNCMPR   0x01 /* "BeOS&AtheOS attribs uncompr." bit flag */

◆ EB_BEOS_HLEN

#define EB_BEOS_HLEN   5 /* length of BeOS&AtheOS e.f attribute header */

◆ EB_CMPRHEADLEN

#define EB_CMPRHEADLEN   6 /* lenght of compression header */

◆ EB_FLGS_OFFS

#define EB_FLGS_OFFS
Value:
4 /* offset of flags area in generic compressed
extra field blocks (BEOS, MAC, and others) */

◆ EB_HEADSIZE

#define EB_HEADSIZE   4 /* length of extra field block header */

◆ EB_ID

#define EB_ID   0 /* offset of block ID in header */

◆ EB_IZVMS_BC00

#define EB_IZVMS_BC00   1 /* 0byte -> 0bit compression */

◆ EB_IZVMS_BCDEFL

#define EB_IZVMS_BCDEFL   2 /* Deflated */

◆ EB_IZVMS_BCMASK

#define EB_IZVMS_BCMASK   07 /* 3 bits for compression type */

◆ EB_IZVMS_BCSTOR

#define EB_IZVMS_BCSTOR   0 /* Stored */

◆ EB_IZVMS_FLGS

#define EB_IZVMS_FLGS   4 /* offset of compression type flag */

◆ EB_IZVMS_HLEN

#define EB_IZVMS_HLEN   12 /* length of IZVMS attribute block header */

◆ EB_IZVMS_UCSIZ

#define EB_IZVMS_UCSIZ   6 /* offset of ucsize field in IZVMS header */

◆ EB_LEN

#define EB_LEN   2 /* offset of data length field in header */

◆ EB_M3_FL_DATFRK

#define EB_M3_FL_DATFRK   0x01 /* "this entry is data fork" flag */

◆ EB_M3_FL_NOUTC

#define EB_M3_FL_NOUTC   0x10 /* "Mac3 timezone offset fields missing" flag */

◆ EB_M3_FL_TIME64

#define EB_M3_FL_TIME64   0x08 /* "Mac3 time fields are 64 bit wide" flag */

◆ EB_M3_FL_UNCMPR

#define EB_M3_FL_UNCMPR   0x04 /* "Mac3 attributes uncompressed" bit flag */

◆ EB_MAC3_HLEN

#define EB_MAC3_HLEN   14 /* length of Mac3 attribute block header */

◆ EB_NTSD_C_LEN

#define EB_NTSD_C_LEN   4 /* length of central NT security data */

◆ EB_NTSD_L_LEN

#define EB_NTSD_L_LEN   5 /* length of minimal local NT security data */

◆ EB_NTSD_MAX_VER

#define EB_NTSD_MAX_VER   (0) /* maximum version # we know how to handle */

◆ EB_NTSD_VERSION

#define EB_NTSD_VERSION   4 /* offset of NTSD version byte */

◆ EB_OS2_HLEN

#define EB_OS2_HLEN   4 /* size of OS2/ACL compressed data header */

◆ EB_SMARTZIP_HLEN

#define EB_SMARTZIP_HLEN   64 /* fixed length of the SmartZip extra field */

◆ EB_UCSIZE_P

#define EB_UCSIZE_P   0 /* offset of ucsize field in compr. data */

◆ EB_UT_FL_ATIME

#define EB_UT_FL_ATIME   (1 << 1) /* atime present */

◆ EB_UT_FL_CTIME

#define EB_UT_FL_CTIME   (1 << 2) /* ctime present */

◆ EB_UT_FL_MTIME

#define EB_UT_FL_MTIME   (1 << 0) /* mtime present */

◆ EB_UT_FLAGS

#define EB_UT_FLAGS   0 /* byte offset of Flags field */

◆ EB_UT_MINLEN

#define EB_UT_MINLEN   1 /* minimal UT field contains Flags byte */

◆ EB_UT_TIME1

#define EB_UT_TIME1   1 /* byte offset of 1st time value */

◆ EB_UX2_GID

#define EB_UX2_GID   2 /* byte offset of GID in "Ux" field data */

◆ EB_UX2_MINLEN

#define EB_UX2_MINLEN   4 /* minimal "Ux" field contains UID/GID */

◆ EB_UX2_UID

#define EB_UX2_UID   0 /* byte offset of UID in "Ux" field data */

◆ EB_UX2_VALID

#define EB_UX2_VALID   (1 << 8) /* UID/GID present */

◆ EB_UX3_MINLEN

#define EB_UX3_MINLEN   7 /* minimal "ux" field size (2-byte UID/GID) */

◆ EB_UX_ATIME

#define EB_UX_ATIME   0 /* offset of atime in "UX" extra field data */

◆ EB_UX_FULLSIZE

#define EB_UX_FULLSIZE   12 /* full "UX" field (atime, mtime, uid, gid) */

◆ EB_UX_GID

#define EB_UX_GID   10 /* byte offset of GID in "UX" field data */

◆ EB_UX_MINLEN

#define EB_UX_MINLEN   8 /* minimal "UX" field contains atime, mtime */

◆ EB_UX_MTIME

#define EB_UX_MTIME   4 /* offset of mtime in "UX" extra field data */

◆ EB_UX_UID

#define EB_UX_UID   8 /* byte offset of UID in "UX" field data */

◆ EC_VERSION_MADE_BY_0

#define EC_VERSION_MADE_BY_0   12

◆ EC_VERSION_NEEDED_0

#define EC_VERSION_NEEDED_0   14

◆ ECLOC64_SIZE

#define ECLOC64_SIZE   16 /* and zip64 end-of-central-dir record, */

◆ ECREC64_LENGTH

#define ECREC64_LENGTH   4

◆ ECREC64_SIZE

#define ECREC64_SIZE   52 /* respectively */

◆ ECREC_SIZE

#define ECREC_SIZE   18 /* record, zip64 end-of-cent-dir locator */

◆ EF_ACL

#define EF_ACL   0x4c41 /* (OS/2) access control list ("AL") */

◆ EF_AOSVS

#define EF_AOSVS   0x5356 /* AOS/VS ("VS") */

◆ EF_ASIUNIX

#define EF_ASIUNIX   0x756e /* ASi's Unix ("nu") */

◆ EF_ATHEOS

#define EF_ATHEOS   0x7441 /* AtheOS ("At") */

◆ EF_AV

#define EF_AV   0x0007 /* PKWARE's authenticity verification */

◆ EF_BEOS

#define EF_BEOS   0x6542 /* BeOS ("Be") */

◆ EF_EFS

#define EF_EFS   0x0008 /* PKWARE's extended language encoding */

◆ EF_IZUNIX

#define EF_IZUNIX   0x5855 /* Info-ZIP's first Unix[1] ("UX") */

◆ EF_IZUNIX2

#define EF_IZUNIX2   0x7855 /* Info-ZIP's second Unix[2] ("Ux") */

◆ EF_IZUNIX3

#define EF_IZUNIX3   0x7875 /* Info-ZIP's newest Unix[3] ("ux") */

◆ EF_IZVMS

#define EF_IZVMS   0x4d49 /* Info-ZIP's VMS ("IM") */

◆ EF_JLMAC

#define EF_JLMAC   0x07c8 /* Johnny Lee's old Macintosh (= 1992) */

◆ EF_MAC3

#define EF_MAC3   0x334d /* Info-ZIP's new Macintosh (= "M3") */

◆ EF_MD5

#define EF_MD5   0x4b46 /* Fred Kantor's MD5 ("FK") */

◆ EF_MVS

#define EF_MVS   0x470f /* Info-ZIP's MVS ("\017G") */

◆ EF_NTSD

#define EF_NTSD   0x4453 /* NT security descriptor ("SD") */

◆ EF_OS2

#define EF_OS2   0x0009 /* OS/2 extended attributes */

◆ EF_PKCX509

#define EF_PKCX509   0x0016 /* PKWARE's central dir X.509 Cert ID */

◆ EF_PKENCRHD

#define EF_PKENCRHD   0x0017 /* PKWARE's Strong Encryption header */

◆ EF_PKFORK

#define EF_PKFORK   0x000e /* PKWARE's future stream/fork descriptors */

◆ EF_PKFX509

#define EF_PKFX509   0x0015 /* PKWARE's file X.509 Cert&Signature ID */

◆ EF_PKIBM

#define EF_PKIBM   0x0065 /* PKWARE's IBM S/390 & AS/400 attributes */

◆ EF_PKIBM2

#define EF_PKIBM2   0x0066 /* PKWARE's IBM S/390 & AS/400 compr. attribs */

◆ EF_PKLSTCS7

#define EF_PKLSTCS7   0x0019 /* PKWARE's PKCS#7 Encr. Recipient Cert List */

◆ EF_PKPATCH

#define EF_PKPATCH   0x000f /* PKWARE's patch descriptor */

◆ EF_PKPKCS7

#define EF_PKPKCS7   0x0014 /* PKWARE's PKCS#7 store for X.509 Certs */

◆ EF_PKRMCTL

#define EF_PKRMCTL   0x0018 /* PKWARE's Record Management Controls*/

◆ EF_PKSZ64

#define EF_PKSZ64   0x0001 /* PKWARE's 64-bit filesize extensions */

◆ EF_PKUNIX

#define EF_PKUNIX   0x000d /* PKWARE's Unix */

◆ EF_PKVMS

#define EF_PKVMS   0x000c /* PKWARE's VMS */

◆ EF_PKW32

#define EF_PKW32   0x000a /* PKWARE's Win95/98/WinNT filetimes */

◆ EF_QDOS

#define EF_QDOS   0xfb4a /* SMS/QDOS ("J\373") */

◆ EF_SMARTZIP

#define EF_SMARTZIP   0x4d63 /* Mac SmartZip by Marco Bambini */

◆ EF_SPARK

#define EF_SPARK   0x4341 /* David Pilling's Acorn/SparkFS ("AC") */

◆ EF_TANDEM

#define EF_TANDEM   0x4154 /* Tandem NSK ("TA") */

◆ EF_THEOS

#define EF_THEOS   0x6854 /* Jean-Michel Dubois' Theos "Th" */

◆ EF_THEOSO

#define EF_THEOSO   0x4854 /* old Theos port */

◆ EF_TIME

#define EF_TIME   0x5455 /* universal timestamp ("UT") */

◆ EF_UNICOMNT

#define EF_UNICOMNT   0x6375 /* Info-ZIP Unicode Comment ("uc") */

◆ EF_UNIPATH

#define EF_UNIPATH   0x7075 /* Info-ZIP Unicode Path ("up") */

◆ EF_VMCMS

#define EF_VMCMS   0x4704 /* Info-ZIP's VM/CMS ("\004G") */

◆ EF_ZIPIT

#define EF_ZIPIT   0x2605 /* Thomas Brown's Macintosh (ZipIt) */

◆ EF_ZIPIT2

#define EF_ZIPIT2   0x2705 /* T. Brown's Mac (ZipIt) v 1.3.8 and newer ? */

◆ END

#define END   5 /* free root path prior to exiting program */

◆ END_CENTRAL_SIG

#define END_CENTRAL_SIG   "\005\006" /* mistaken for zipfile itself) */

◆ ENHDEFLATED

#define ENHDEFLATED   9

◆ ENV_UNZIP

#define ENV_UNZIP   "UNZIP" /* the standard names */

◆ ENV_UNZIP2

#define ENV_UNZIP2   "UNZIPOPT" /* alternate names, for zip compat. */

◆ ENV_ZIPINFO

#define ENV_ZIPINFO   "ZIPINFO"

◆ ENV_ZIPINFO2

#define ENV_ZIPINFO2   "ZIPINFOOPT"

◆ EPIPE

#define EPIPE   -1

◆ EXISTS_AND_NEWER

#define EXISTS_AND_NEWER   1

◆ EXISTS_AND_OLDER

#define EXISTS_AND_OLDER   0

◆ EXIT

#define EXIT   exit

◆ Ext_ASCII_TO_Native

#define Ext_ASCII_TO_Native ( string,
hostnum,
hostver,
isuxatt,
islochdr )
Value:
if (((hostnum) == FS_FAT_ && \
!(((islochdr) || (isuxatt)) && \
((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
(hostnum) == FS_HPFS_ || \
((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
_OEM_INTERN((string)); \
} else { \
_ISO_INTERN((string)); \
}
#define FS_FAT_
Definition unzpriv.h:1666
#define FS_HPFS_
Definition unzpriv.h:1672
#define FS_NTFS_
Definition unzpriv.h:1677
unsigned hostnum
Definition zipinfo.c:997
unsigned hostver
Definition zipinfo.c:997

◆ EXTD_LOCAL_SIG

#define EXTD_LOCAL_SIG   "\007\010" /* [ASCII "\113" == EBCDIC "\080" ??] */

◆ EXTRA_FIELD

#define EXTRA_FIELD   3 /* copy extra field into buffer */

◆ FALSE

#define FALSE   0

◆ Far

#define Far

◆ far

#define far

◆ FILNAMSIZ

#define FILNAMSIZ   PATH_MAX

◆ FLUSH

#define FLUSH ( w)
Value:
((G.mem_mode) ? memflush(__G__ redirSlide,(ulg)(w)) \
UINT_D64 w
Definition inflate.c:942
#define __G__
Definition crypt.h:76
int memflush(__G__ rawbuf, size) __GDEF ZCONST uch *rawbuf
int flush(__G__ rawbuf, size, unshrink) __GDEF uch *rawbuf
unsigned long ulg
Definition unzip.h:403
#define redirSlide
Definition unzpriv.h:2072

◆ FmZofft

#define FmZofft ( val,
pre,
post )
Value:
int val
Definition jpeglib.h:956
ZCONST char * pre
Definition fileio.c:2492
ZCONST char * post
Definition fileio.c:2493
char * fzofft(__G__ val, pre, post) __GDEF zoff_t val

◆ FnFilter1

#define FnFilter1 ( fname)
Value:
fnfilter((fname), slide + (extent)(WSIZE>>1), (extent)(WSIZE>>2))
char * fnfilter(ZCONST char *raw, uch *space, extent size)
Definition extract.c:2552
#define WSIZE
Definition unzpriv.h:886
unsigned int extent
Definition unzpriv.h:669
#define slide
Definition unzpriv.h:2067

◆ FnFilter2

#define FnFilter2 ( fname)
Value:
fnfilter((fname), slide + (extent)((WSIZE>>1) + (WSIZE>>2)),\
(extent)(WSIZE>>2))

◆ FOPM

#define FOPM   "r+"

◆ FOPR

#define FOPR   "r"

◆ FOPW

#define FOPW   "w"

◆ FOPWR

#define FOPWR   "w+"

◆ FOPWT

#define FOPWT   "w"

◆ foreign

#define foreign ( c)
Value:
(c)

◆ FS_FAT_

#define FS_FAT_   0 /* filesystem used by MS-DOS, OS/2, Win32 */

◆ FS_HPFS_

#define FS_HPFS_   6 /* filesystem used by OS/2 (and NT 3.x) */

◆ FS_NTFS_

#define FS_NTFS_   11 /* filesystem used by Windows NT */

◆ FS_VFAT_

#define FS_VFAT_   14 /* filesystem used by Windows 95, NT */

◆ FZOFFT_FMT

#define FZOFFT_FMT   "l"

◆ FZOFFT_HEX_DOT_WID

#define FZOFFT_HEX_DOT_WID   ((char *) -2)

◆ FZOFFT_HEX_WID

#define FZOFFT_HEX_WID   ((char *) -1)

◆ FZOFFT_HEX_WID_VALUE

#define FZOFFT_HEX_WID_VALUE   "8"

◆ FZOFFT_LEN

#define FZOFFT_LEN   24 /* Number of characters/chamber. */

◆ FZOFFT_NUM

#define FZOFFT_NUM   4 /* Number of chambers. */

◆ GETPATH

#define GETPATH   4 /* retrieve the complete path and free it */

◆ HSIZE

#define HSIZE   (1 << MAX_BITS) /* size of global work area */

◆ IBMLZ77ED

#define IBMLZ77ED   19

◆ IBMTERSED

#define IBMTERSED   18

◆ IMPLODED

#define IMPLODED   6

◆ INBUFSIZ

#define INBUFSIZ   8192 /* larger buffers for real OSes */

◆ INCSTR

#define INCSTR ( ptr)
Value:
#define PREINCSTR(ptr)
Definition unzpriv.h:1257

◆ Info

#define Info ( ...)
Value:
static void noop(void)
Definition unzpriv.h:2700

◆ INIT

#define INIT   1 /* allocate buildpath: called once per member */

◆ IS_OVERWRT_ALL

#define IS_OVERWRT_ALL   (G.overwrite_mode == OVERWRT_ALWAYS)

◆ IS_OVERWRT_NONE

#define IS_OVERWRT_NONE   (G.overwrite_mode == OVERWRT_NEVER)

◆ IS_VOLID

#define IS_VOLID ( m)
Value:
((m) & 0x08)
unsigned * m
Definition inflate.c:1559

◆ IZ_DIR

#define IZ_DIR   76 /* potential zipfile is a directory */

internal-only return codes

◆ IZ_EF_TRUNC

#define IZ_EF_TRUNC   79 /* local extra field truncated (PKZIP'd) */

◆ IZ_OEM2ISO_ARRAY

#define IZ_OEM2ISO_ARRAY

◆ L_COMPRESSED_SIZE

#define L_COMPRESSED_SIZE   14

◆ L_COMPRESSION_METHOD

#define L_COMPRESSION_METHOD   4

◆ L_CRC32

#define L_CRC32   10

◆ L_EXTRA_FIELD_LENGTH

#define L_EXTRA_FIELD_LENGTH   24

◆ L_FILENAME_LENGTH

#define L_FILENAME_LENGTH   22

◆ L_GENERAL_PURPOSE_BIT_FLAG

#define L_GENERAL_PURPOSE_BIT_FLAG   2

◆ L_LAST_MOD_DOS_DATETIME

#define L_LAST_MOD_DOS_DATETIME   6

◆ L_UNCOMPRESSED_SIZE

#define L_UNCOMPRESSED_SIZE   18

◆ L_VERSION_NEEDED_TO_EXTRACT_0

#define L_VERSION_NEEDED_TO_EXTRACT_0   0

◆ L_VERSION_NEEDED_TO_EXTRACT_1

#define L_VERSION_NEEDED_TO_EXTRACT_1   1

◆ lastchar

#define lastchar ( ptr,
len )
Value:
(ptr[(len)-1])

◆ LF

#define LF   10 /* '\n' on ASCII machines; must be 10 due to EBCDIC */

◆ LoadFarString

#define LoadFarString ( x)
Value:
(char *)(x)
unsigned x[BMAX+1]
Definition inflate.c:1586

◆ LoadFarStringSmall

#define LoadFarStringSmall ( x)
Value:
(char *)(x)

◆ LoadFarStringSmall2

#define LoadFarStringSmall2 ( x)
Value:
(char *)(x)

◆ LOCAL_HDR_SIG

#define LOCAL_HDR_SIG   "\003\004" /* w/o "PK" (so unzip executable not */

◆ LREC_SIZE

#define LREC_SIZE   26 /* lengths of local file headers, central */

◆ LZMAED

#define LZMAED   14

◆ MAC_

#define MAC_   7 /* HFS filesystem used by MacOS */

◆ MAC_OSX_

#define MAC_OSX_   19 /* Mac OS/X (Darwin) */

◆ MAIN

#define MAIN   main

◆ MASK_ZUCN16

#define MASK_ZUCN16   ((zucn_t)0xFFFF)

◆ MASK_ZUCN64

#define MASK_ZUCN64   (~(zucn_t)0)

◆ MAX

#define MAX ( a,
b )
Value:
((a) > (b) ? (a) : (b))
uint8_t a
Definition Spc_Cpu.h:141
b
Definition crypt.c:628

◆ MAX_BITS

#define MAX_BITS   13 /* used in unshrink() */

◆ MBSCHR

#define MBSCHR ( str,
c )
Value:
strchr(str, c)

◆ MBSRCHR

#define MBSRCHR ( str,
c )
Value:
strrchr(str, c)

◆ memzero

#define memzero ( dest,
len )
Value:
memset(dest,0,len)

◆ MESSAGE

#define MESSAGE ( str,
len,
flag )
Value:
(*G.message)((zvoid *)&G,(str),(len),(flag))
int flag
Definition unix.c:754
char zvoid
Definition unzip.h:399

◆ MIN

#define MIN ( a,
b )
Value:
((a) < (b) ? (a) : (b))

◆ MORE

#define MORE

◆ MPN_CREATED_DIR

#define MPN_CREATED_DIR   (16<<8) /* directory created: set time & permission */

◆ MPN_ERR_SKIP

#define MPN_ERR_SKIP   (3<<8) /* error - entry skipped */

◆ MPN_ERR_TOOLONG

#define MPN_ERR_TOOLONG   (4<<8) /* error - path too long */

◆ MPN_INF_SKIP

#define MPN_INF_SKIP   (2<<8) /* info - skipped because nothing to do */

◆ MPN_INF_TRUNC

#define MPN_INF_TRUNC   (1<<8) /* caution - filename truncated */

◆ MPN_INVALID

#define MPN_INVALID   (99<<8) /* internal logic error, should never reach */

◆ MPN_MASK

#define MPN_MASK   0x7F00

◆ MPN_NOMEM

#define MPN_NOMEM   (10<<8) /* error - out of memory, file skipped */

◆ MPN_OK

#define MPN_OK   0 /* mapname successful */

◆ MPN_VOL_LABEL

#define MPN_VOL_LABEL   (17<<8) /* volume label, but can't set on hard disk */

◆ MSG_ERROR

#define MSG_ERROR ( f)
Value:
((f & 6) == 4) /* bits 1 and 2: 2 = error */
unsigned f
Definition inflate.c:1572

◆ MSG_FATAL

#define MSG_FATAL ( f)
Value:
((f & 6) == 6) /* bits 1 and 2: (3 = fatal error) */

◆ MSG_FN

#define MSG_FN ( f)
Value:
(f & 0x0010) /* bit 4: 1 = print filename */

◆ MSG_INFO

#define MSG_INFO ( f)
Value:
((f & 6) == 0) /* bits 1 and 2: 0 = info */

◆ MSG_LNEWLN

#define MSG_LNEWLN ( f)
Value:
(f & 0x0020) /* bit 5: 1 = leading newline if !SOL */

◆ MSG_MNEWLN

#define MSG_MNEWLN ( f)
Value:
(f & 0x0080) /* bit 7: 1 = trailing NL for prompts */

◆ MSG_NO_AGUI

#define MSG_NO_AGUI ( f)
Value:
(f & 0x0200) /* bit 9: 1 = skip if Acorn GUI */

◆ MSG_NO_DLL2

#define MSG_NO_DLL2 ( f)
Value:
(f & 0x0400) /* bit 10: 1 = skip if OS/2 DLL */

◆ MSG_NO_NDLL

#define MSG_NO_NDLL ( f)
Value:
(f & 0x0800) /* bit 11: 1 = skip if WIN32 DLL */

◆ MSG_NO_WDLL

#define MSG_NO_WDLL ( f)
Value:
(f & 0x1000) /* bit 12: 1 = skip if Windows DLL */

◆ MSG_NO_WGUI

#define MSG_NO_WGUI ( f)
Value:
(f & 0x0100) /* bit 8: 1 = skip if Windows GUI */

◆ MSG_STDERR

#define MSG_STDERR ( f)
Value:
(f & 1) /* bit 0: 0 = stdout, 1 = stderr */

◆ MSG_TNEWLN

#define MSG_TNEWLN ( f)
Value:
(f & 0x0040) /* bit 6: 1 = trailing newline if !SOL */

◆ MSG_WARN

#define MSG_WARN ( f)
Value:
((f & 6) == 2) /* bits 1 and 2: 1 = warning */

◆ MSG_ZFN

#define MSG_ZFN ( f)
Value:
(f & 0x0008) /* bit 3: 1 = print zipfile name */

◆ MTrace

#define MTrace ( x)
Value:
#define Trace(x)
Definition unzpriv.h:2660

◆ MVS_

#define MVS_   15

◆ native

#define native ( c)
Value:
(c)

◆ NATIVE_TO_TIMET

#define NATIVE_TO_TIMET ( x)

◆ near

#define near

◆ nearfree

#define nearfree   free

◆ nearmalloc

#define nearmalloc   malloc

◆ NEED_STR2OEM

#define NEED_STR2OEM

◆ NEXTBYTE

#define NEXTBYTE   (G.incnt-- > 0 ? (int)(*G.inptr++) : readbyte(__G))

◆ NUM_DISK_START_CEN_DIR64

#define NUM_DISK_START_CEN_DIR64   20

◆ NUM_DISK_START_EOCDR64

#define NUM_DISK_START_EOCDR64   4

◆ NUM_DISK_WITH_START_CEN_DIR

#define NUM_DISK_WITH_START_CEN_DIR   6

◆ NUM_ENTRIES_CEN_DIR_THS_DISK

#define NUM_ENTRIES_CEN_DIR_THS_DISK   8

◆ NUM_ENTRIES_CEN_DIR_THS_DISK64

#define NUM_ENTRIES_CEN_DIR_THS_DISK64   24

◆ NUM_HOSTS

#define NUM_HOSTS   31 /* index of last system + 1 */

◆ NUM_METHODS

#define NUM_METHODS   17 /* number of known method IDs */

◆ NUM_THIS_DISK_LOC64

#define NUM_THIS_DISK_LOC64   16

◆ NUMBER_THIS_DISK

#define NUMBER_THIS_DISK   4

◆ NUMBER_THIS_DSK_REC64

#define NUMBER_THIS_DSK_REC64   16

◆ O_BINARY

#define O_BINARY   0

◆ OFFSET_START_CENTRAL_DIRECT64

#define OFFSET_START_CENTRAL_DIRECT64   48

◆ OFFSET_START_CENTRAL_DIRECTORY

#define OFFSET_START_CENTRAL_DIRECTORY   16

◆ OFFSET_START_EOCDR64

#define OFFSET_START_EOCDR64   8

◆ OUTBUFSIZ

#define OUTBUFSIZ   (lenEOL*WSIZE) /* more efficient text conversion */

◆ OVERWRT_ALWAYS

#define OVERWRT_ALWAYS   1

◆ OVERWRT_NEVER

#define OVERWRT_NEVER   2

◆ OVERWRT_QUERY

#define OVERWRT_QUERY   0 /* status values for G.overwrite_mode */

◆ PATH_MAX

#define PATH_MAX   1024

◆ PCHAR_SPRINTF

#define PCHAR_SPRINTF   /* sprintf() returns char *: BSDish */

◆ PIPE_ERROR

#define PIPE_ERROR   (errno == EPIPE)

◆ plastchar

#define plastchar ( ptr,
len )
Value:
(&ptr[(len)-1])

◆ POSTINCSTR

#define POSTINCSTR ( ptr)
Value:
((ptr)++)

◆ PPMDED

#define PPMDED   98

◆ PREINCSTR

#define PREINCSTR ( ptr)
Value:
(++(ptr))

◆ QCOND

#define QCOND   (!uO.qflag) /* comments with -vq or -vqq */

◆ QCOND2

#define QCOND2   (!uO.qflag)

◆ QDOS_

#define QDOS_   12

◆ QQ

#define QQ

◆ RAWBUFSIZ

#define RAWBUFSIZ   OUTBUFSIZ

◆ READBITS

#define READBITS ( nbits,
zdest )
Value:
{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<<G.bits_left; G.bits_left+=8; G.zipeof=0;}}\
zdest=(shrint)((unsigned)G.bitbuf&mask_bits[nbits]);G.bitbuf>>=nbits;\
bit_buf_type int int nbits
Definition jdhuff.h:159
ulg bitbuf
Definition globals.h:241
int bits_left
Definition globals.h:242
ZCONST unsigned near mask_bits[17]
Definition consts.h:20
int shrint
Definition unzpriv.h:1023
#define NEXTBYTE
Definition unzpriv.h:2782

◆ redirSlide

#define redirSlide   G.area.Slide

◆ REDUCED1

#define REDUCED1   2

◆ REDUCED2

#define REDUCED2   3

◆ REDUCED3

#define REDUCED3   4

◆ REDUCED4

#define REDUCED4   5

◆ RETURN

#define RETURN   return /* only used in main() */

◆ ROOT

#define ROOT   0 /* checkdir() extract-to path: called once */

◆ S_ISDIR

#define S_ISDIR ( m)
Value:
(((m) & S_IFMT) == S_IFDIR)

◆ S_TIME_T_MAX

#define S_TIME_T_MAX   ((time_t)(ulg)0x7fffffffL)

◆ SCREENLINES

#define SCREENLINES   24 /* VT-100s are assumed to be minimal hardware */

◆ SCREENSIZE

#define SCREENSIZE ( scrrows,
scrcols )
Value:
{ \
if ((scrrows) != NULL) *(scrrows) = SCREENLINES; }
#define NULL
Definition CarlaBridgeFormat.cpp:30
#define SCREENLINES
Definition unzpriv.h:863

◆ SEEK_CUR

#define SEEK_CUR   1

◆ SEEK_END

#define SEEK_END   2

◆ SEEK_SET

#define SEEK_SET   0

◆ SETLOCALE

#define SETLOCALE ( category,
locale )

◆ SHRUNK

#define SHRUNK   1

◆ SIZE_CENTRAL_DIRECTORY

#define SIZE_CENTRAL_DIRECTORY   12

◆ SIZE_CENTRAL_DIRECTORY64

#define SIZE_CENTRAL_DIRECTORY64   40

◆ SKIP

#define SKIP   0 /* skip header block */

◆ SKIP_

#define SKIP_ ( length)
Value:
png_uint_32 length
Definition png.c:2247
int error_in_archive
Definition extract.c:1032
int error
Definition extract.c:1038
int do_string(__G__ length, option) __GDEF unsigned int length
#define SKIP
Definition unzpriv.h:1622

◆ slide

#define slide   G.area.Slide

◆ SSTAT

#define SSTAT   zstat

◆ STORED

#define STORED   0 /* compression methods */

◆ STR_TO_CP2

#define STR_TO_CP2   STR_TO_OEM

◆ STR_TO_ISO

#define STR_TO_ISO   strcpy

◆ STR_TO_OEM

#define STR_TO_OEM   str2oem

◆ STRLOWER

#define STRLOWER ( str1,
str2 )
Value:
{ \
char *p, *q; \
p = (char *)(str1) - 1; \
q = (char *)(str2); \
while (*++p) \
*q++ = (char)(isupper((int)(*p))? tolower((int)(*p)) : *p); \
*q = '\0'; \
}
register uch * q
Definition fileio.c:817

◆ STRNICMP

#define STRNICMP   strnicmp

◆ TANDEM_

#define TANDEM_   17 /* Tandem NSK */

◆ TEST_NTSD

#define TEST_NTSD   NULL /* ... is not available */

◆ THEOS_

#define THEOS_   18 /* THEOS */

◆ TIMET_TO_NATIVE

#define TIMET_TO_NATIVE ( x)

◆ TOKENIZED

#define TOKENIZED   7

◆ ToLower

#define ToLower   tolower /* assumed "smart"; used in match() */

◆ TOPS20_

#define TOPS20_   10

◆ TOTAL_ENTRIES_CENTRAL_DIR

#define TOTAL_ENTRIES_CENTRAL_DIR   10

◆ TOTAL_ENTRIES_CENTRAL_DIR64

#define TOTAL_ENTRIES_CENTRAL_DIR64   32

◆ Trace

#define Trace ( x)

◆ TRANSBUFSIZ

#define TRANSBUFSIZ   (lenEOL*OUTBUFSIZ)

◆ TRUE

#define TRUE   1 /* sort of obvious */

◆ TTrace

#define TTrace ( x)

◆ U_TIME_T_MAX

#define U_TIME_T_MAX   ((time_t)(ulg)0xffffffffL)

◆ UNIX_

#define UNIX_   3

◆ UNZIP

#define UNZIP

◆ UNZIP_BZ2VERS

#define UNZIP_BZ2VERS   46

◆ UNZIP_VERSION

#define UNZIP_VERSION   21 /* compatible with PKUNZIP 4.0 */

◆ USAGE

#define USAGE ( ret)
Value:
usage(__G__ (ret)) /* used in unzip.c, zipinfo.c */
static void usage()
Definition adplugdb.cpp:152

◆ USE_DEFLATE64

#define USE_DEFLATE64

◆ USE_UNSHRINK

#define USE_UNSHRINK

◆ VM_CMS_

#define VM_CMS_   4

◆ VMS_

#define VMS_   2

◆ VMS_TEXT_CONV

#define VMS_TEXT_CONV

◆ VMS_UNZIP_VERSION

#define VMS_UNZIP_VERSION   42 /* if OS-needed-to-extract is VMS: can do */

◆ WAVPACKED

#define WAVPACKED   97

◆ WISEP

#define WISEP

◆ WSIZE

#define WSIZE   65536L /* window size--must be a power of two, and */

◆ Z_OFF_T

#define Z_OFF_T   long long

◆ Z_STAT_DEFINED

#define Z_STAT_DEFINED

◆ Z_SYSTEM_

#define Z_SYSTEM_   8

◆ Z_UINT4_DEFINED

#define Z_UINT4_DEFINED

◆ zfdopen

#define zfdopen   fdopen

◆ zffree

#define zffree ( x)
Value:
free(x)

◆ zfmalloc

#define zfmalloc   malloc

◆ zfopen

#define zfopen   fopen

◆ zfseeko

#define zfseeko   fseek

◆ zfstat

#define zfstat   fstat

◆ zfstrcmp

#define zfstrcmp ( s1,
s2 )
Value:
strcmp((s1), (s2))

◆ zfstrcpy

#define zfstrcpy ( dest,
src )
Value:
strcpy((dest), (src))

◆ zftello

#define zftello   ftell

◆ ZIPFILE_COMMENT_LENGTH

#define ZIPFILE_COMMENT_LENGTH   20

◆ zlseek

#define zlseek   lseek

◆ ZOFF_T_DEFINED

#define ZOFF_T_DEFINED

◆ zstat

#define zstat   stat

◆ ZSUFX

#define ZSUFX   ".zip"

Typedef Documentation

◆ APIDocStruct

typedef struct _APIDocStruct APIDocStruct

◆ cdir_byte_hdr

typedef uch cdir_byte_hdr[CREC_SIZE]

◆ cdir_file_hdr

◆ ec_byte_loc64

typedef uch ec_byte_loc64[ECLOC64_SIZE+4]

◆ ec_byte_rec

typedef uch ec_byte_rec[ECREC_SIZE+4]

◆ ec_byte_rec64

typedef uch ec_byte_rec64[ECREC64_SIZE+4]

◆ ecdir_rec

◆ extent

typedef unsigned int extent

◆ iztimes

typedef struct iztimes iztimes

◆ local_byte_hdr

typedef uch local_byte_hdr[LREC_SIZE]

◆ local_file_hdr

◆ min_info

typedef struct min_info min_info

◆ shrint

typedef int shrint

◆ VMStimbuf

typedef struct VMStimbuf VMStimbuf

◆ z_uint4

typedef ulg z_uint4

◆ zoff_t

typedef Z_OFF_T zoff_t

◆ ztimbuf

typedef struct ztimbuf ztimbuf

◆ zucn_t

typedef unsigned int zucn_t

◆ zusz_t

typedef ulg zusz_t

◆ zuvl_t

typedef unsigned short zuvl_t

Function Documentation

◆ lseek()

Z_OFF_T lseek ( )

◆ malloc()

char * malloc ( )

◆ noop()

void noop ( void )
inlinestatic

◆ OF() [1/35]

◆ OF() [2/35]

unsigned readbuf OF ( (__GPRO__ char *buf, register unsigned len) )

◆ OF() [3/35]

◆ OF() [4/35]

int checkdir OF ( (__GPRO__ char *pathcomp, int flag) )

◆ OF() [5/35]

int uz_opts OF ( (__GPRO__ int *pargc, char ***pargv) )

◆ OF() [6/35]

int unzip OF ( (__GPRO__ int argc, char **argv) )

◆ OF() [7/35]

◆ OF() [8/35]

int inflate OF ( (__GPRO__ int is_defl64) )

◆ OF() [9/35]

◆ OF() [10/35]

int flush OF ( (__GPRO__ uch *buf, ulg size, int unshrink) )

◆ OF() [11/35]

int memextract OF ( (__GPRO__ uch *tgt, ulg tgtsize, ZCONST uch *src, ulg srcsize) )

◆ OF() [12/35]

int do_string OF ( (__GPRO__ unsigned int length, int option) )

◆ OF() [13/35]

char *do_wild OF ( (__GPRO__ ZCONST char *wildzipfn) )

◆ OF() [14/35]

uch *extract_izvms_block OF ( (__GPRO__ ZCONST uch *ebdata, unsigned size, unsigned *retlen, ZCONST uch *init, unsigned needlen) )

◆ OF() [15/35]

int getZip64Data OF ( (__GPRO__ ZCONST uch *ef_buf, unsigned ef_len) )

◆ OF() [16/35]

int memflush OF ( (__GPRO__ ZCONST uch *rawbuf, ulg size) )

◆ OF() [17/35]

int huft_build OF ( (__GPRO__ ZCONST unsigned *b, unsigned n, unsigned s, ZCONST ush *d, ZCONST uch *e, struct huft **t, unsigned *m) )

◆ OF() [18/35]

int seek_zipf OF ( (__GPRO__ zoff_t abs_offset) )

◆ OF() [19/35]

char *fzofft OF ( (__GPRO__ zoff_t val, ZCONST char *pre, ZCONST char *post) )

◆ OF() [20/35]

char *str2iso OF ( (char *dst, ZCONST char *src) )

◆ OF() [21/35]

void mksargs OF ( (int *argcp, char ***argvp) )

◆ OF() [22/35]

int envargs OF ( (int *Pargc, char ***Pargv, ZCONST char *envstr, ZCONST char *envstr2) )

◆ OF() [23/35]

int MAIN OF ( (int argc, char **argv) )

◆ OF() [24/35]

void handler OF ( (int signal) )

◆ OF() [25/35]

int huft_free OF ( (struct huft *t) )

◆ OF() [26/35]

time_t dos_to_unix_time OF ( (ulg dos_datetime) )

◆ OF() [27/35]

unsigned find_compr_idx OF ( (unsigned compr_methodnum) )

◆ OF() [28/35]

◆ OF() [29/35]

int iswild OF ( (ZCONST char *p) )

◆ OF() [30/35]

char *fnfilter OF ( (ZCONST char *raw, uch *space, extent size) )

◆ OF() [31/35]

int match OF ( (ZCONST char *s, ZCONST char *p, int ic __WDLPRO) )

◆ OF() [32/35]

ush makeword OF ( (ZCONST uch *b) )

◆ OF() [33/35]

unsigned ef_scan_for_izux OF ( (ZCONST uch *ef_buf, unsigned ef_len, int ef_is_c, ulg dos_mdatetime, iztimes *z_utim, ulg *z_uidgid) )

◆ OF() [34/35]

ulg makelong OF ( (ZCONST uch *sig) )

◆ OF() [35/35]

int ratio OF ( (zusz_t uc, zusz_t c) )

Variable Documentation

◆ CentSigMsg

ZCONST char Far CentSigMsg[]
extern

◆ CompiledWith

ZCONST char Far CompiledWith[]
extern

◆ EndSigMsg

ZCONST char Far EndSigMsg[]
extern

◆ ExclFilenameNotMatched

ZCONST char Far ExclFilenameNotMatched[]
extern

◆ FilenameNotMatched

ZCONST char Far FilenameNotMatched[]
extern

◆ fnames

ZCONST char* fnames[2]
extern

◆ mask_bits

ZCONST unsigned near mask_bits[17]
extern

◆ oem2iso

ZCONST uch Far* oem2iso
extern

◆ oem2iso_850

ZCONST uch Far oem2iso_850[]
extern

◆ ReportMsg

ZCONST char Far ReportMsg[]
extern

◆ SeekMsg

ZCONST char Far SeekMsg[]
extern

◆ VersionDate

ZCONST char Far VersionDate[]
extern

◆ Zipnfo

ZCONST char Far Zipnfo[]
extern