⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unzpriv.h

📁 完整的解压zip文件的源码。包含密码功能
💻 H
📖 第 1 页 / 共 5 页
字号:
/*---------------------------------------------------------------------------  unzpriv.h  This header file contains private (internal) macros, typedefs, prototypes  and global-variable declarations used by all of the UnZip source files.  In a prior life it was part of the main unzip.h header, but now it is only  included by that header if UNZIP_INTERNAL is defined.  ---------------------------------------------------------------------------*/#ifndef __unzpriv_h   /* prevent multiple inclusions */#define __unzpriv_h/* First thing: Signal all following code that we compile UnZip utilities! */#ifndef UNZIP#  define UNZIP#endif/* GRR 960204:  MORE defined here in preparation for removal altogether */#ifndef MORE#  define MORE#endif/* fUnZip should never need to be reentrant */#ifdef FUNZIP#  ifdef REENTRANT#    undef REENTRANT#  endif#  ifdef DLL#    undef DLL#  endif#endif#if (defined(DLL) && !defined(REENTRANT))#  define REENTRANT#endif#if (!defined(DYNAMIC_CRC_TABLE) && !defined(FUNZIP))#  define DYNAMIC_CRC_TABLE#endif#if (defined(DYNAMIC_CRC_TABLE) && !defined(REENTRANT))#  ifndef DYNALLOC_CRCTAB#    define DYNALLOC_CRCTAB#  endif#endif/*---------------------------------------------------------------------------    OS-dependent configuration for UnZip internals  ---------------------------------------------------------------------------*//* bad or (occasionally?) missing stddef.h: */#if (defined(M_XENIX) || defined(DNIX))#  define NO_STDDEF_H#endif#if (defined(M_XENIX) && !defined(M_UNIX))   /* SCO Xenix only, not SCO Unix */#  define SCO_XENIX#  define NO_LIMITS_H        /* no limits.h, but MODERN defined */#  define NO_UID_GID         /* no uid_t/gid_t */#  define size_t int#endif#ifdef realix   /* Modcomp Real/IX, real-time SysV.3 variant */#  define SYSV#  define NO_UID_GID         /* no uid_t/gid_t */#endif#if (defined(_AIX) && !defined(_ALL_SOURCE))#  define _ALL_SOURCE#endif#if defined(apollo)          /* defines __STDC__ */#    define NO_STDLIB_H#endif#ifdef DNIX#  define SYSV#  define SHORT_NAMES         /* 14-char limitation on path components *//* #  define FILENAME_MAX  14 */#  define FILENAME_MAX  NAME_MAX    /* GRR:  experiment */#endif#if (defined(SYSTEM_FIVE) || defined(__SYSTEM_FIVE))#  ifndef SYSV#    define SYSV#  endif#endif /* SYSTEM_FIVE || __SYSTEM_FIVE */#if (defined(M_SYSV) || defined(M_SYS5))#  ifndef SYSV#    define SYSV#  endif#endif /* M_SYSV || M_SYS5 *//* __SVR4 and __svr4__ catch Solaris on at least some combos of compiler+OS */#if (defined(__SVR4) || defined(__svr4__) || defined(sgi) || defined(__hpux))#  ifndef SYSV#    define SYSV#  endif#endif /* __SVR4 || __svr4__ || sgi || __hpux */#if (defined(LINUX) || defined(__QNX__))#  ifndef SYSV#    define SYSV#  endif#endif /* LINUX || __QNX__ */#if (defined(ultrix) || defined(__ultrix) || defined(bsd4_2))#  if (!defined(BSD) && !defined(SYSV))#    define BSD#  endif#endif /* ultrix || __ultrix || bsd4_2 */#if (defined(sun) || defined(pyr) || defined(CONVEX))#  if (!defined(BSD) && !defined(SYSV))#    define BSD#  endif#endif /* sun || pyr || CONVEX */#ifdef pyr  /* Pyramid:  has BSD and AT&T "universes" */#  ifdef BSD#    define pyr_bsd#    define USE_STRINGS_H  /* instead of more common string.h */#    define ZMEM           /* ZMEM now uses bcopy/bzero: not in AT&T universe */#  endif                   /* (AT&T memcpy claimed to be very slow, though) */#  define DECLARE_ERRNO#endif /* pyr *//* stat() bug for Borland, VAX C (also GNU?), and Atari ST MiNT on TOS * filesystems:  returns 0 for wildcards!  (returns 0xffffffff on Minix * filesystem or `U:' drive under Atari MiNT.)  Watcom C was previously * included on this list; it would be good to know what version the problem * was fixed at, if it did exist.  Watcom 10.6 has a separate stat() problem: * it fails on "." when the current directory is a root.  This is covered by * giving it a separate definition of SSTAT in OS-specific header files. */#if (defined(__TURBOC__) || defined(VMS) || defined(__MINT__))#  define WILD_STAT_BUG#endif#ifdef WILD_STAT_BUG#  define SSTAT(path,pbuf) (iswild(path) || stat(path,pbuf))#else#  define SSTAT stat#endif#ifdef REGULUS  /* returns the inode number on success(!)...argh argh argh */#  define stat(p,s) zstat((p),(s))#endif#define STRNICMP zstrnicmp/*---------------------------------------------------------------------------    OS-dependent includes  ---------------------------------------------------------------------------*/#ifdef EFT#  define LONGINT off_t  /* Amdahl UTS nonsense ("extended file types") */#else#  define LONGINT long#endif#ifdef MODERN#  ifndef NO_STDDEF_H#    include <stddef.h>#  endif#  ifndef NO_STDLIB_H#    include <stdlib.h>  /* standard library prototypes, malloc(), etc. */#  endif   typedef size_t extent;#else /* !MODERN */#  ifndef AOS_VS         /* mostly modern? */     LONGINT lseek();#    ifdef VAXC          /* not fully modern, but does have stdlib.h and void */#      include <stdlib.h>#    else       char *malloc();#    endif /* ?VAXC */#  endif /* !AOS_VS */   typedef unsigned int extent;#endif /* ?MODERN */#ifndef MINIX            /* Minix needs it after all the other includes (?) */#  include <stdio.h>#endif#include <ctype.h>       /* skip for VMS, to use tolower() function? */#include <errno.h>       /* used in mapname() */#ifdef USE_STRINGS_H#  include <strings.h>   /* strcpy, strcmp, memcpy, index/rindex, etc. */#else#  include <string.h>    /* strcpy, strcmp, memcpy, strchr/strrchr, etc. */#endif#if (defined(MODERN) && !defined(NO_LIMITS_H))#  include <limits.h>    /* GRR:  EXPERIMENTAL!  (can be deleted) */#endif/* this include must be down here for SysV.4, for some reason... */#include <signal.h>      /* used in unzip.c, fileio.c *//*---------------------------------------------------------------------------    API (DLL) section:  ---------------------------------------------------------------------------*/#ifdef DLL#  define MAIN   UZ_EXP UzpMain   /* was UzpUnzip */#  ifdef OS2DLL#    undef Info#    define REDIRECTC(c)             varputchar(__G__ c)#    define REDIRECTPRINT(buf,size)  varmessage(__G__ buf, size)#    define FINISH_REDIRECT()        finish_REXX_redirect(__G)#  else#    define REDIRECTC(c)#    define REDIRECTPRINT(buf,size)  0#    define FINISH_REDIRECT()        close_redirect(__G)#  endif#endif/*---------------------------------------------------------------------------    Acorn RISCOS section:  ---------------------------------------------------------------------------*/#ifdef RISCOS#  include "acorn/riscos.h"#endif/*---------------------------------------------------------------------------    Amiga section:  ---------------------------------------------------------------------------*/#ifdef AMIGA#  include "amiga/amiga.h"#endif/*---------------------------------------------------------------------------    AOS/VS section (somewhat similar to Unix, apparently):  ---------------------------------------------------------------------------*/#ifdef AOS_VS#  ifdef FILEIO_C#    include "aosvs/aosvs.h"#  endif#endif/*---------------------------------------------------------------------------    Atari ST section:  ---------------------------------------------------------------------------*/#ifdef ATARI#  include <time.h>#  include <stat.h>#  include <fcntl.h>#  include <limits.h>#  define SYMLINKS#  define EXE_EXTENSION  ".tos"#  ifndef DATE_FORMAT#    define DATE_FORMAT  DF_DMY#  endif#  define DIR_END        '/'#  define INT_SPRINTF#  define timezone      _timezone#  define lenEOL        2#  define PutNativeEOL  {*q++ = native(CR); *q++ = native(LF);}#  undef SHORT_NAMES#  if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))#    define TIMESTAMP#  endif#endif/*---------------------------------------------------------------------------    BeOS section:  ---------------------------------------------------------------------------*/#ifdef __BEOS__#  include <sys/types.h>          /* [cjh]:  This is pretty much a generic  */#  include <sys/stat.h>           /* POSIX 1003.1 system; see beos/ for     */#  include <fcntl.h>              /* extra code to deal with our extra file */#  include <sys/param.h>          /* attributes. */#  include <unistd.h>#  include <utime.h>#  define DIRENT#  include <time.h>#  ifndef DATE_FORMAT#    define DATE_FORMAT DF_MDY  /* GRR:  customize with locale.h somehow? */#  endif#  define lenEOL        1#  define PutNativeEOL  *q++ = native(LF);#  define SCREENLINES   screenlines()#  define USE_EF_UT_TIME#  define SET_DIR_ATTRIB#  if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))#    define TIMESTAMP#  endif#  define RESTORE_UIDGID#  define NO_GMTIME               /* maybe DR10 will have timezones... */#  define INT_SPRINTF#  define SYMLINKS#  define MAIN main_stub          /* now that we're using a wrapper... */#endif/*---------------------------------------------------------------------------    Human68k/X68000 section:  ---------------------------------------------------------------------------*/#ifdef __human68k__    /* DO NOT DEFINE DOS_OS2 HERE!  If Human68k is so much */#  include <time.h>    /*  like MS-DOS and/or OS/2, create DOS_H68_OS2 macro. */#  include <fcntl.h>#  include <io.h>#  include <conio.h>#  include <jctype.h>#  include <sys/stat.h>#  ifndef DATE_FORMAT#    define DATE_FORMAT DF_YMD   /* Japanese standard */#  endif      /* GRR:  these EOL macros are guesses */#  define lenEOL        2#  define PutNativeEOL  {*q++ = native(CR); *q++ = native(LF);}#  define EXE_EXTENSION ".exe"   /* just a guess... */#endif/*---------------------------------------------------------------------------    Mac section:  ---------------------------------------------------------------------------*/#ifdef MACOS#  include "maccfg.h"#endif /* MACOS *//*---------------------------------------------------------------------------    MS-DOS, OS/2, FLEXOS section:  ---------------------------------------------------------------------------*/#ifdef WINDLL#  define MSWIN#  ifdef MORE#    undef MORE#  endif#  ifdef OS2_EAS#    undef OS2_EAS#  endif#endif#if (defined(_MSC_VER) || (defined(M_I86) && !defined(__WATCOMC__)))#  ifndef MSC#    define MSC               /* This should work for older MSC, too!  */#  endif#endif#if (defined(MSDOS) || defined(OS2) || defined(FLEXOS))#  include <sys/types.h>      /* off_t, time_t, dev_t, ... */#  include <sys/stat.h>#  include <io.h>             /* lseek(), open(), setftime(), dup(), creat() */#  include <time.h>           /* localtime() */#  include <fcntl.h>          /* O_BINARY for open() w/o CR/LF translation */#  ifdef OS2                  /* defined for all OS/2 compilers */#    include "os2/os2cfg.h"#  else#    ifdef FLEXOS#      include "flexos/flxcfg.h"#    else#      include "msdos/doscfg.h"#    endif#  endif#  if (defined(_MSC_VER) && (_MSC_VER == 700) && !defined(GRR))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -