📄 unzpriv.h
字号:
/*--------------------------------------------------------------------------- MS-DOS, OS/2, FLEXOS section: ---------------------------------------------------------------------------*/#ifdef WINDLL# 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)) /* * ARGH. MSC 7.0 libraries think times are based on 1899 Dec 31 00:00, not * 1970 Jan 1 00:00. So we have to diddle time_t's appropriately: add or * subtract 70 years' worth of seconds; i.e., number of days times 86400; * i.e., (70*365 regular days + 17 leap days + 1 1899 day) * 86400 == * (25550 + 17 + 1) * 86400 == 2209075200 seconds. We know time_t is an * unsigned long (ulg) on the only system with this bug. */# define TIMET_TO_NATIVE(x) (x) += (ulg)2209075200L;# define NATIVE_TO_TIMET(x) (x) -= (ulg)2209075200L;# endif# if (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0450))# define timezone _timezone# endif# if (defined(__GO32__) || defined(FLEXOS))# define DIR_END '/'# else# define DIR_END '\\' /* OS uses '\\' as directory separator */# define DIR_END2 '/' /* also check for '/' (RTL may convert) */# endif# ifdef DATE_FORMAT# undef DATE_FORMAT# endif# define DATE_FORMAT dateformat()# define lenEOL 2# define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);}# if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))# define USE_EF_UT_TIME# endif#endif /* MSDOS || OS2 || FLEXOS *//*--------------------------------------------------------------------------- MTS section (piggybacks UNIX, I think): ---------------------------------------------------------------------------*/#ifdef MTS# include <sys/types.h> /* off_t, time_t, dev_t, ... */# include <sys/stat.h># include <sys/file.h> /* MTS uses this instead of fcntl.h */# include <timeb.h># include <time.h># include <unix.h> /* some important non-ANSI routines */# define mkdir(s,n) (-1) /* no "make directory" capability */# define EBCDIC /* set EBCDIC conversion on */# define NO_STRNICMP /* unzip's is as good the one in MTS */# define USE_FWRITE# define close_outfile() fclose(G.outfile) /* can't set time on files */# define umask(n) /* don't have umask() on MTS */# define FOPWT "w" /* open file for writing in TEXT mode */# ifndef DATE_FORMAT# define DATE_FORMAT DF_MDY# endif# define lenEOL 1# define PutNativeEOL *q++ = native(LF);#endif /* MTS */ /*--------------------------------------------------------------------------- Novell NLM section ---------------------------------------------------------------------------*/#ifdef NLM# include "novell/nlmcfg.h"#endif /*--------------------------------------------------------------------------- QDOS section ---------------------------------------------------------------------------*/#ifdef QDOS# define DIRENT# include <fcntl.h># include <unistd.h># include <sys/stat.h># include <time.h># include "qdos/izqdos.h"# ifndef DATE_FORMAT# define DATE_FORMAT DF_MDY# endif# define lenEOL 1# define PutNativeEOL *q++ = native(LF);# define DIR_END '_'# define RETURN QReturn# undef PATH_MAX# define PATH_MAX 36# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))# define TIMESTAMP# endif# define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols)# define SCREENWIDTH 80#endif/*--------------------------------------------------------------------------- Tandem NSK section: ---------------------------------------------------------------------------*/#ifdef TANDEM# include "tandem.h"# include <fcntl.h># ifndef __INT32 /* We are compiling with non-WIDE memory model, int = 16 bits */# ifndef INT_16BIT# define INT_16BIT /* report "int" size is 16-bit to inflate setup */# endif# ifdef USE_DEFLATE64 /* Following required for 64k WSIZE of Deflate64 support */# define MED_MEM /* else OUTBUFSIZ is 64K and fails in do_string */# define INBUFSIZ 8192 /* but larger buffer for real OSes */# endif# endif /* use a single LF delimiter so that writes to 101 text files work */# define PutNativeEOL *q++ = native(LF);# define lenEOL 1# ifndef DATE_FORMAT# define DATE_FORMAT DF_DMY# endif# define SCREENLINES 25 /* USE_EF_UT_TIME is set in tandem.h */# define RESTORE_UIDGID# define NO_STRNICMP#endif/*--------------------------------------------------------------------------- THEOS section: ---------------------------------------------------------------------------*/#ifdef THEOS# include "theos/thscfg.h"#endif/*--------------------------------------------------------------------------- TOPS-20 section: ---------------------------------------------------------------------------*/#ifdef TOPS20# include <sys/types.h> /* off_t, time_t, dev_t, ... */# include <sys/stat.h># include <sys/param.h># include <sys/time.h># include <sys/timeb.h># include <sys/file.h># include <timex.h># include <monsym.h> /* get amazing monsym() macro */ extern int open(), close(), read(); extern int stat(), unlink(), jsys(), fcntl(); extern long lseek(), dup(), creat();# define strchr index /* GRR: necessary? */# define strrchr rindex# define REALLY_SHORT_SYMS# define NO_MKDIR# ifndef HAVE_STRNICMP# define NO_STRNICMP /* probably not provided by TOPS20 C RTL */# endif# define DIR_BEG '<'# define DIR_END '>'# define DIR_EXT ".directory"# ifndef DATE_FORMAT# define DATE_FORMAT DF_MDY# endif# define EXE_EXTENSION ".exe" /* just a guess... */#endif /* TOPS20 *//*--------------------------------------------------------------------------- Unix section: ---------------------------------------------------------------------------*/#ifdef UNIX# include "unix/unxcfg.h"#endif /* UNIX *//*--------------------------------------------------------------------------- VM/CMS and MVS section: ---------------------------------------------------------------------------*/#ifdef CMS_MVS# include "vmmvs.h"# define CLOSE_INFILE() close_infile(__G)#endif/*--------------------------------------------------------------------------- VMS section: ---------------------------------------------------------------------------*/#ifdef VMS# include <types.h> /* GRR: experimenting... */# include <stat.h># include <time.h> /* the usual non-BSD time functions */# include <file.h> /* same things as fcntl.h has */# include <unixio.h># include <rms.h># define _MAX_PATH (NAM$C_MAXRSS+1) /* to define FILNAMSIZ below */# ifndef HAVE_STRNICMP /* use our private zstrnicmp() */# define NO_STRNICMP /* unless explicitely overridden */# endif# ifdef RETURN_CODES /* VMS interprets standard PK return codes incorrectly */# define RETURN(ret) return_VMS(__G__ (ret)) /* verbose version */# define EXIT(ret) return_VMS(__G__ (ret))# else# define RETURN return_VMS /* quiet version */# define EXIT return_VMS# endif# ifdef VMSCLI# define USAGE(ret) VMSCLI_usage(__G__ (ret))# endif# define DIR_BEG '['# define DIR_END ']'# define DIR_EXT ".dir"# ifndef DATE_FORMAT# define DATE_FORMAT DF_MDY# endif# define lenEOL 1# define PutNativeEOL *q++ = native(LF);# define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols)# define SCREENWIDTH 80# define SCREENLWRAP screenlinewrap()# if (defined(__VMS_VERSION) && !defined(VMS_VERSION))# define VMS_VERSION __VMS_VERSION# endif# if (defined(__VMS_VER) && !defined(__CRTL_VER))# define __CRTL_VER __VMS_VER# endif# if ((!defined(__CRTL_VER)) || (__CRTL_VER < 70000000))# define NO_GMTIME /* gmtime() of earlier VMS C RTLs is broken */# else# if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))# define USE_EF_UT_TIME# endif# endif# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))# define TIMESTAMP# endif# define RESTORE_UIDGID# ifdef __DECC /* File open callback ID values. */# define OPENR_ID 1 /* File open callback ID storage. */ extern int openr_id; /* File open callback function. */ extern int acc_cb(); /* Option macros for open(). * General: Stream access * * Callback function (DEC C only) sets deq, mbc, mbf, rah, wbh, ... */# define OPNZIP_RMS_ARGS "ctx=stm", "acc", acc_cb, &openr_id# else /* !__DECC */ /* (So, GNU C, VAX C, ...)*/# define OPNZIP_RMS_ARGS "ctx=stm"# endif /* ?__DECC */#endif /* VMS *//*--------------------------------------------------------------------------- Win32 (Windows 95/NT) section: ---------------------------------------------------------------------------*/#if (defined(WIN32) && !defined(POCKET_UNZIP) && !defined(_WIN32_WCE))# include "win32/w32cfg.h"#endif/*--------------------------------------------------------------------------- Win32 Windows CE section (when not using POCKET_UNZIP) ---------------------------------------------------------------------------*/#if (defined(_WIN32_WCE) || defined(POCKET_UNZIP))# include "wince/wcecfg.h"#endif/*************//* Defines *//*************/#ifdef USE_DEFLATE64# define UNZIP_VERSION 21 /* compatible with PKUNZIP 4.0 */#else# define UNZIP_VERSION 20 /* compatible with PKUNZIP 2.0 */#endif#define VMS_UNZIP_VERSION 42 /* if OS-needed-to-extract is VMS: can do */#if (defined(MSDOS) || defined(OS2))# define DOS_OS2#endif#if (defined(OS2) || defined(WIN32))# define OS2_W32#endif#if (defined(DOS_OS2) || defined(WIN32))# define DOS_OS2_W32# define DOS_W32_OS2 /* historical: don't use */#endif#if (defined(DOS_OS2_W32) || defined(__human68k__))# define DOS_H68_OS2_W32#endif#if (defined(DOS_OS2) || defined(FLEXOS))# define DOS_FLX_OS2#endif#if (defined(DOS_OS2_W32) || defined(FLEXOS))# define DOS_FLX_OS2_W32#endif#if (defined(DOS_H68_OS2_W32) || defined(FLEXOS))# define DOS_FLX_H68_OS2_W32#endif#if (defined(DOS_FLX_OS2) || defined(NLM))# define DOS_FLX_NLM_OS2#endif#if (defined(DOS_FLX_OS2_W32) || defined(NLM))# define DOS_FLX_NLM_OS2_W32#endif#if (defined(DOS_FLX_H68_OS2_W32) || defined(NLM))# define DOS_FLX_H68_NLM_OS2_W32#endif#if (defined(TOPS20) || defined(VMS))# define T20_VMS#endif#if (defined(MSDOS) || defined(T20_VMS))# define DOS_T20_VMS#endif#if (defined(__ATHEOS__) || defined(__BEOS__))# define ATH_BEO#endif#if (defined(ATH_BEO) || defined(UNIX))# define ATH_BEO_UNX#endif#if (defined(ATH_BEO_UNX) || defined(THEOS))# define ATH_BEO_THS_UNX#endif/* clean up with a few defaults */#ifndef DIR_END# define DIR_END '/' /* last char before program name or filename */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -