wat_met.dif

来自「压缩算法的源代码」· DIF 代码 · 共 680 行 · 第 1/2 页

DIF
680
字号
+ watcomdos:+ 	$(MAKE) -f makefile.os2 all \+ 	CC="wcl386 -zq -Ox -s -I." \+ 	CFLAGS="-Zp1 -DMSDOS" \+ 	NFLAGS="" \+ 	LDFLAGS="-k0x40000 -x -l=dos4g -Fe=" \+ 	LDFLAGS2="" \+ 	OUT="-Fo" \+ 	OBJ=".obj" \+ 	OBJU2="msdos.obj" \+ 	OBJX2="msdos_.obj"+ + # Watcom C/286 9.0 or higher, crosscompilation for DOS+ watcom16dos:+ 	$(MAKE) -f makefile.os2 all \+ 	CC="wcl -zq -mm -Ox -s -I." \+ 	CFLAGS="-Zp1 -DMSDOS" \+ 	NFLAGS="" \+ 	LDFLAGS="-k0xC00 -x -l=dos -Fe=" \+ 	LDFLAGS2="" \+ 	OUT="-Fo" \+ 	OBJ=".obj" \+ 	OBJU2="msdos.obj" \+ 	OBJX2="msdos_.obj"+ + # MetaWare High C/C++ 3.2+ metaware:+ 	$(MAKE) -f makefile.os2 all \+ 	CC="hc -O2 -I." \+ 	CFLAGS="-D__32BIT__ -DOS2" \+ 	NFLAGS="" \+ 	LDFLAGS="-o " \+ 	LDFLAGS2="" \+ 	OUT="-o ./" \+ 	OBJ=".obj" \+ 	DEF="-Hdef=os2\unzip.def"+   # Borland C++  borland:  	$(MAKE) -f makefile.os2 all \****************** 192,198 ****  	extract$(OBJ) file_io$(OBJ) inflate$(OBJ) match$(OBJ) \  	unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)  OBJU2 = os2$(OBJ)! OBJX  = unzip_$(OBJ) crypt$(OBJ) extract_$(OBJ) file_io$(OBJ) \  	inflate$(OBJ) match$(OBJ)  OBJX2 = os2_$(OBJ)  OBJF  = funzip$(OBJ) crypt_$(OBJ) inflate_$(OBJ)--- 255,261 ----  	extract$(OBJ) file_io$(OBJ) inflate$(OBJ) match$(OBJ) \  	unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)  OBJU2 = os2$(OBJ)! OBJX  = unzipsfx$(OBJ) crypt$(OBJ) extract_$(OBJ) file_io$(OBJ) \  	inflate$(OBJ) match$(OBJ)  OBJX2 = os2_$(OBJ)  OBJF  = funzip$(OBJ) crypt_$(OBJ) inflate_$(OBJ)****************** 252,256 ****  inflate_$(OBJ):	inflate.c inflate.h unzip.h crypt.h	# funzip only  	$(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c  ! unzip_$(OBJ):	unzip.c unzip.h crypt.h version.h	# unzipsfx only  	$(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c--- 315,319 ----  inflate_$(OBJ):	inflate.c inflate.h unzip.h crypt.h	# funzip only  	$(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c  ! unzipsfx$(OBJ):	unzip.c unzip.h crypt.h version.h	# unzipsfx only  	$(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.cdiff -cbr unzip/os2/os2.c unzip-2/os2/os2.c*** unzip/os2/os2.c	Wed Jul 27 22:23:02 1994--- unzip-2/os2/os2.c	Tue Aug 02 11:48:54 1994****************** 73,78 ****--- 73,79 ----  #define INCL_DOSDEVICES  #define INCL_DOSDEVIOCTL  #define INCL_DOSERRORS+ #define INCL_DOSMISC  #include <os2.h>    #ifdef __32BIT__****************** 229,238 ****  #endif    - #ifdef __WATCOMC__-    unsigned char __near _osmode = OS2_MODE;- #endif-   #ifndef SFX     static char *getdirent(char *);     static void free_dircontents(struct _dircontents *);--- 230,235 ----****************** 387,394 ****    if ( (pFEA2list = (PFEA2LIST) malloc((size_t) pEAblock -> lSize)) == NULL )      return;  !   if ( memextract((char *) pFEA2list, pEAblock -> lSize,!                   (char *) (pEAblock + 1),                     pEAblock -> nSize - sizeof(pEAblock -> lSize)) )    {      free(pFEA2list);--- 384,391 ----    if ( (pFEA2list = (PFEA2LIST) malloc((size_t) pEAblock -> lSize)) == NULL )      return;  !   if ( memextract((uch *) pFEA2list, pEAblock -> lSize,!                   (uch *) (pEAblock + 1),                     pEAblock -> nSize - sizeof(pEAblock -> lSize)) )    {      free(pFEA2list);****************** 450,474 ****  char *GetLoadPath(void)   {  #ifdef __32BIT__ /* generic for 32-bit API */-     PTIB pptib;    PPIB pppib;    char *szPath;      DosGetInfoBlocks(&pptib, &pppib);    szPath = pppib -> pib_pchenv;      while (*szPath) /* find end of process environment */      szPath = strchr(szPath, 0) + 1;      return szPath + 1; /* .exe file name follows environment */  - #else /* 16-bit, specific for MS C 6.00, note: requires large data model */- -   extern char _far *_pgmptr;-   return _pgmptr;- - #endif  } /* end function GetLoadPath() */    --- 447,472 ----  char *GetLoadPath(void)   {  #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() */    ****************** 680,686 ****  {    static USHORT nLastDrive=(USHORT)(-1), nResult;    ULONG lMap;!   BYTE bData[64], bName[3];  #ifdef __32BIT__    ULONG nDrive, cbData;    PFSQBUFFER2 pData = (PFSQBUFFER2) bData;--- 678,685 ----  {    static USHORT nLastDrive=(USHORT)(-1), nResult;    ULONG lMap;!   BYTE bData[64];!   char bName[3];  #ifdef __32BIT__    ULONG nDrive, cbData;    PFSQBUFFER2 pData = (PFSQBUFFER2) bData;****************** 689,698 ****    PFSQBUFFER pData = (PFSQBUFFER) bData;  #endif  -   if ( _osmode == DOS_MODE )-     return TRUE;-   else-   {      /* 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 */--- 688,693 ----****************** 713,725 ****      cbData = sizeof(bData);        if ( !DosQueryFSAttach(bName, 0, FSAIL_QUERYNAME, (PVOID) pData, &cbData) )!       nResult = !strcmp(pData -> szFSDName + pData -> cbName, "FAT");      else        nResult = FALSE;        /* End of this ugly code */      return nResult;-   }  } /* end function IsFileSystemFAT() */    --- 708,719 ----      cbData = sizeof(bData);        if ( !DosQueryFSAttach(bName, 0, FSAIL_QUERYNAME, (PVOID) pData, &cbData) )!     nResult = !strcmp((char *) (pData -> szFSDName) + pData -> cbName, "FAT");      else        nResult = FALSE;        /* End of this ugly code */      return nResult;  } /* end function IsFileSystemFAT() */    ****************** 1398,1404 ****      ULONG action;  #else      USHORT rc;!     UINT action;  #endif    --- 1392,1398 ----      ULONG action;  #else      USHORT rc;!     USHORT action;  #endif    ****************** 1579,1597 ****    eaop.fpGEAList = NULL;    eaop.oError = 0;  !   strcpy(fealst.szName, ".LONGNAME");!   strcpy(fealst.szValue, longname);  !   fealst.cbList  = sizeof(fealst) - CCHMAXPATH + strlen(fealst.szValue);!   fealst.cbName  = (BYTE) strlen(fealst.szName);!   fealst.cbValue = sizeof(USHORT) * 2 + strlen(fealst.szValue);    #ifdef __32BIT__    fealst.oNext   = 0;  #endif    fealst.fEA     = 0;    fealst.eaType  = 0xFFFD;!   fealst.eaSize  = strlen(fealst.szValue);      return DosSetPathInfo(name, FIL_QUERYEASIZE,                          (PBYTE) &eaop, sizeof(eaop), 0);--- 1573,1591 ----    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);****************** 1880,1886 ****      if (!bInitialized)      InitNLS();!   for ( szPtr = szArg; *szPtr; szPtr++ )      *szPtr = cLowerCase[*szPtr];    return szArg;  }--- 1874,1880 ----      if (!bInitialized)      InitNLS();!   for ( szPtr = (unsigned char *) szArg; *szPtr; szPtr++ )      *szPtr = cLowerCase[*szPtr];    return szArg;  }diff -cbr unzip/unzip.h unzip-2/unzip.h*** unzip/unzip.h	Sun Jul 31 20:09:44 1994--- unzip-2/unzip.h	Tue Aug 02 11:48:56 1994****************** 437,447 ****--- 437,449 ----  #endif    #ifdef __WATCOMC__+ #  ifdef __386__  #  define __32BIT__  #  undef far  #  define far  #  undef near  #  define near+ #  endif  #  define PIPE_ERROR (errno == -1)  #endif  ****************** 770,776 ****  #endif    /* GRR:  NT defines MSDOS?? */! #if (!defined(MSDOS) && !defined(__IBMC__)) || defined(NT)  #  define near  #  define far  #endif--- 772,778 ----  #endif    /* GRR:  NT defines MSDOS?? */! #if (!defined(MSDOS) && !defined(__IBMC__) && defined(__32BIT__)) || defined(NT)  #  define near  #  define far  #endif

⌨️ 快捷键说明

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