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

📄 unzip.h

📁 汇编大全 中国矿业大学计算机学院 汇编实验5
💻 H
📖 第 1 页 / 共 3 页
字号:
/*---------------------------------------------------------------------------  unzip.h  This header file is used by all of the unzip source files.  Its contents  are divided into seven more-or-less separate sections:  predefined macros,  OS-dependent includes, (mostly) OS-independent defines, typedefs, function   prototypes (or "prototypes," in the case of non-ANSI compilers), macros,   and global-variable declarations.  ---------------------------------------------------------------------------*//*****************************************//*  Predefined, Machine-specific Macros  *//*****************************************/#if defined(ultrix) || defined(bsd4_2) || defined(sun)#  if !defined(BSD) && !defined(__SYSTEM_FIVE)#    define BSD#  endif /* !BSD && !__SYSTEM_FIVE */#endif /* ultrix || bsd4_2 || sun *//* [1992.1.21:  ALL machines now "NOTINT16"; NOTINT16 and ULONG_ removed] */#if 0#  if defined(mips) || defined(sun) || defined(CRAY)#    ifndef NOTINT16#      define NOTINT16#    endif /* !NOTINT16 */#  endif /* mips || sun || CRAY */#  if defined(vax) || defined(MSDOS) || defined(__MSDOS__)#    ifdef NOTINT16#      undef NOTINT16#    endif /* NOTINT16 */#  endif /* vax || MSDOS || __MSDOS__ */#endif /* 0 */#ifdef CRAY#  ifdef ZMEM#    undef ZMEM#  endif /* ZMEM */#  ifndef TERMIO#    define TERMIO#  endif /* !TERMIO */#endif /* CRAY */#ifdef CONVEX#  ifndef TERMIO#    define TERMIO#  endif /* !TERMIO */#endif /* CONVEX *//* the i386 test below is to catch SCO Unix (which has redefinition * warnings if param.h is included), but it probably doesn't hurt if * other 386 Unixes get nailed, too--are there any 386 BSD systems? * param.h is mostly included for "BSD", I think... */#if defined(MINIX) || (defined(i386) && defined(unix))#  define NO_PARAM_H#endif /* MINIX || (i386 && unix) */#if defined(__IBMC__) && defined(__32BIT__) && !defined(IBMC32)#  define IBMC32#endif /* __IBMC__ && __32BIT__ && !IBMC32 *//***************************//*  OS-Dependent Includes  *//***************************/#ifndef MINIX            /* Minix needs it after all the other includes (?) */#  include <stdio.h>     /* this is your standard header for all C compiles */#endif#include <ctype.h>#include <errno.h>       /* used in mapname() */#define DECLARE_ERRNO    /* everybody except MSC 6.0 */#ifdef VMS               /* sigh...you just KNEW someone had to break this.  */#  include <types.h>     /*  (placed up here instead of in VMS section below */#  include <stat.h>      /*   because types.h is used in some other headers) */#else  /* almost everybody */#  if defined(THINK_C) || defined(MPW) /* for Macs */#    include <stddef.h>#  else#    include <sys/types.h> /* off_t, time_t, dev_t, ... */#    include <sys/stat.h>  /* Everybody seems to need this. */#  endif#endif/*---------------------------------------------------------------------------    Next, a word from our Unix (mostly) sponsors:  ---------------------------------------------------------------------------*/#ifdef UNIX#  ifdef AMIGA#    include <libraries/dos.h>#  else /* !AMIGA */#    ifndef NO_PARAM_H#if 0  /* [GRR: this is an alternate fix for SCO's redefinition bug] */#      ifdef NGROUPS_MAX#        undef NGROUPS_MAX     /* SCO bug:  defined again in <param.h> */#      endif /* NGROUPS_MAX */#endif /* 0 */#      include <sys/param.h>   /* conflict with <sys/types.h>, some systems? */#    endif /* !NO_PARAM_H */#  endif /* ?AMIGA */#  ifndef BSIZE#    ifdef MINIX#      define BSIZE   1024#    else /* !MINIX */#      define BSIZE   DEV_BSIZE  /* assume common for all Unix systems */#    endif /* ?MINIX */#  endif#  ifndef BSD#    if !defined(AMIGA) && !defined(MINIX)#      define NO_MKDIR           /* for mapname() */#    endif /* !AMIGA && !MINIX */#    ifndef SKIP_TIME_H          /* temporary fix for VMS gcc and Amdahl cc */#      include <time.h>          /*  in decryption version */#    endif /* !SKIP_TIME_H */     struct tm *gmtime(), *localtime();#  else   /* BSD */#    ifndef SKIP_TIME_H          /* temporary fix for Sun 3 cc, etc. */#      include <sys/time.h>      /*  in decryption version */#    endif /* !SKIP_TIME_H */#    include <sys/timeb.h>#  endif#else   /* !UNIX */#  define BSIZE   512               /* disk block size */#endif /* ?UNIX */#if defined(V7) || defined(BSD)#  define strchr    index#  define strrchr   rindex#endif/*---------------------------------------------------------------------------    And now, our MS-DOS and OS/2 corner:  ---------------------------------------------------------------------------*/#ifdef __TURBOC__#  define DOS_OS2             /* Turbo C under DOS, MSC under DOS or OS2    */#  include <sys/timeb.h>      /* for structure ftime                        */#  ifndef __BORLANDC__        /* There appears to be a bug (?) in Borland's */#    include <mem.h>          /*   MEM.H related to __STDC__ and far poin-  */#  endif                      /*   ters. (dpk)  [mem.h included for memcpy] */#else                         /* NOT Turbo C...                             */#  ifdef MSDOS                /*   but still MS-DOS, so we'll assume it's   */#    ifndef MSC               /*   Microsoft's compiler and fake the ID, if */#      define MSC             /*   necessary (it is in 5.0; apparently not  */#    endif                    /*   in 5.1 and 6.0)                          */#    include <dos.h>          /* _dos_setftime()                            */#  endif#  ifdef OS2                  /* stuff for DOS and OS/2 family version */#    if !defined(IBMC32) && !defined(MSC) && !defined(__BORLANDC__)#      define MSC             /* assume Microsoft if not ID'd already */#    endif#    define INCL_BASE#    define INCL_NOPM#    include <os2.h>          /* DosQFileInfo(), DosSetFileInfo()? */#  endif#endif#ifdef IBMC32#  define DOS_OS2#  define S_IFMT 0xF000#  define timezone _timezone#endif#ifdef EMX32#  define DOS_OS2#  define __32BIT__#  define DosGetCtryInfo   DosQueryCtryInfo#  define DosQFileInfo     DosQueryFileInfo#  define far#endif#ifdef MSC                    /* defined for all versions of MSC now         */#  define DOS_OS2             /* Turbo C under DOS, MSC under DOS or OS/2    */#  ifndef __STDC__            /* MSC 5.0 and 5.1 aren't truly ANSI-standard, */#    define __STDC__ 1        /*   but they understand prototypes...so       */#  endif                      /*   they're close enough for our purposes     */#  if defined(_MSC_VER) && (_MSC_VER >= 600)      /* new with 5.1 or 6.0 ... */#    undef DECLARE_ERRNO      /* errno is now a function in a dynamic link   */#  endif                      /*   library (or something)--incompatible with */#endif                        /*   the usual "extern int errno" declaration  */#ifdef DOS_OS2                /* defined for both Turbo C, MSC */#  include <io.h>             /* lseek(), open(), setftime(), dup(), creat() */#  ifndef SKIP_TIME_H         /* also included in crypt.c */#    include <time.h>         /* localtime() */#  endif /* !SKIP_TIME_H */#endif/*---------------------------------------------------------------------------    Followed by some VMS (mostly) stuff:  ---------------------------------------------------------------------------*/#ifdef VMS#  ifndef SKIP_TIME_H  /* temporary bugfix for VMS gcc in decryption version */#    include <time.h>           /* the usual non-BSD time functions */#  endif /* !SKIP_TIME_H */#  include <file.h>             /* same things as fcntl.h has */#  include <rmsdef.h>           /* RMS error codes */#  include "fatdef.h"           /* RMS-related things used by VMSmunch */#  include "VMSmunch.h"         /* VMSmunch argument definitions */#  define UNIX                  /* can share most of same code from now on */#  define RETURN   return_VMS   /* VMS interprets return codes incorrectly */#else /* !VMS */#  define RETURN   return       /* only used in main() */#  ifdef V7#    define O_RDONLY  0#    define O_WRONLY  1#    define O_RDWR    2#  else /* !V7 */#    ifdef MTS#      include <sys/file.h>     /* MTS uses this instead of fcntl.h */#      include <timeb.h>#      ifndef SKIP_TIME_H       /* also included in crypt.c */#        include <time.h>#      endif /* !SKIP_TIME_H */#    else /* !MTS */#      ifdef COHERENT           /* Coherent 3.10/Mark Williams C */#        include <sys/fcntl.h>#        define SHORT_NAMES#        define tzset  settz#      else /* !COHERENT */#        include <fcntl.h>      /* #define O_BINARY 0x8000 (no CR/LF */#      endif /* ?COHERENT */    /*   translation), as used in open() */#    endif /* ?MTS */#  endif /* ?V7 */#endif /* ?VMS *//*---------------------------------------------------------------------------    And some Mac stuff for good measure:  ---------------------------------------------------------------------------*/#ifdef THINK_C#  define MACOS#  ifndef __STDC__            /* If Think C hasn't defined __STDC__ ... */#    define __STDC__ 1        /* make sure it's defined: it needs it */#  else /* __STDC__ defined */#    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 /* ?defined(__STDC__) */#  include <unix.h>#  include "macstat.h"#endif#ifdef MPW#  define MACOS#  include <Files.h>#  include "macstat.h"#  define CtoPstr c2pstr#  define PtoCstr p2cstr#  ifndef TRUE#    define TRUE     1#  endif#  ifndef FALSE#    define FALSE    0#  endif#  ifdef CR#    undef  CR#  endif#endif/*---------------------------------------------------------------------------    And finally, some random extra stuff:  ---------------------------------------------------------------------------*/#if __STDC__#  include <stdlib.h>      /* standard library prototypes, malloc(), etc. */#  include <string.h>      /* defines strcpy, strcmp, memcpy, etc. */#else   char *malloc();   char *strchr(), *strrchr();   long lseek();#endif#ifdef MINIX#  include <stdio.h>#endif#ifdef SHORT_NAMES         /* Mark Williams C, ...? */#  define extract_or_test_files    xtr_or_tst_files#  define extract_or_test_member   xtr_or_tst_member#endif/*************//*  Defines  *//*************/#define INBUFSIZ          BUFSIZ   /* same as stdio uses */#define DIR_BLKSIZ        64       /* number of directory entries per block                                    *  (should fit in 4096 bytes, usually) *//* * If <limits.h> exists on most systems, should include that, since it may * define some or all of the following:  NAME_MAX, PATH_MAX, _POSIX_NAME_MAX, * _POSIX_PATH_MAX. */#ifdef DOS_OS2#  include <limits.h>#endif /* ?DOS_OS2 */#ifdef _MAX_PATH#  define FILNAMSIZ       (_MAX_PATH)#else /* !_MAX_PATH */#  define FILNAMSIZ       1025#endif /* ?_MAX_PATH */#ifndef PATH_MAX#  ifdef MAXPATHLEN                /* defined in <sys/param.h> some systems */#    define PATH_MAX      MAXPATHLEN#  else#    if FILENAME_MAX > 255         /* used like PATH_MAX on some systems */#      define PATH_MAX    FILENAME_MAX#    else#      define PATH_MAX    (FILNAMSIZ - 1)#    endif#  endif /* ?MAXPATHLEN */#endif /* !PATH_MAX */#ifdef ZIPINFO#  define OUTBUFSIZ       BUFSIZ   /* zipinfo needs less than unzip does    */#else#  define OUTBUFSIZ       0x2000   /* unImplode needs power of 2, >= 0x2000 */#endif#define ZSUFX             ".zip"#define CENTRAL_HDR_SIG   "\113\001\002"   /* the infamous "PK" signature */#define LOCAL_HDR_SIG     "\113\003\004"   /*  bytes, sans "P" (so unzip not */#define END_CENTRAL_SIG   "\113\005\006"   /*  mistaken for zipfile itself) */

⌨️ 快捷键说明

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