This commit is contained in:
Igor Pavlov
2018-05-02 22:28:04 +01:00
committed by Kornel
parent f19b649c73
commit 18dc2b4161
121 changed files with 3523 additions and 1866 deletions

View File

@@ -1,7 +1,7 @@
#define MY_VER_MAJOR 18
#define MY_VER_MINOR 03
#define MY_VER_MINOR 05
#define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "18.03 beta"
#define MY_VERSION_NUMBERS "18.05"
#define MY_VERSION MY_VERSION_NUMBERS
#ifdef MY_CPU_NAME
@@ -10,7 +10,7 @@
#define MY_VERSION_CPU MY_VERSION
#endif
#define MY_DATE "2018-03-04"
#define MY_DATE "2018-04-30"
#undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov"

View File

@@ -1,5 +1,5 @@
/* Alloc.c -- Memory allocation functions
2018-03-01 : Igor Pavlov : Public domain */
2018-04-27 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -283,7 +283,7 @@ const ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree };
#define MY_ALIGN_PTR_UP_PLUS(p, align) MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align)
#if (_POSIX_C_SOURCE >= 200112L)
#if (_POSIX_C_SOURCE >= 200112L) && !defined(_WIN32)
#define USE_posix_memalign
#endif

View File

@@ -1,5 +1,5 @@
/* Bcj2.c -- BCJ2 Decoder (Converter for x86 code)
2017-04-03 : Igor Pavlov : Public domain */
2018-04-28 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -232,10 +232,10 @@ SRes Bcj2Dec_Decode(CBcj2Dec *p)
if (rem < 4)
{
SizeT i;
SetUi32(p->temp, val);
for (i = 0; i < rem; i++)
dest[i] = p->temp[i];
p->temp[0] = (Byte)val; if (rem > 0) dest[0] = (Byte)val; val >>= 8;
p->temp[1] = (Byte)val; if (rem > 1) dest[1] = (Byte)val; val >>= 8;
p->temp[2] = (Byte)val; if (rem > 2) dest[2] = (Byte)val; val >>= 8;
p->temp[3] = (Byte)val;
p->dest = dest + rem;
p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem;
break;

View File

@@ -1,5 +1,5 @@
/* Bcj2Enc.c -- BCJ2 Encoder (Converter for x86 code)
2017-04-03 : Igor Pavlov : Public domain */
2017-04-28 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -12,7 +12,6 @@
#define PRF(x)
#endif
#include <windows.h>
#include <string.h>
#include "Bcj2.h"

View File

@@ -1,5 +1,5 @@
/* Lzma2Enc.c -- LZMA2 Encoder
2018-02-08 : Igor Pavlov : Public domain */
2018-04-27 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -369,7 +369,9 @@ typedef struct
ISeqOutStream *outStream;
Byte *outBuf;
size_t outBufSize;
size_t outBuf_Rem; /* remainder in outBuf */
size_t outBufSize; /* size of allocated outBufs[i] */
size_t outBufsDataSizes[MTCODER__BLOCKS_MAX];
Bool mtCoder_WasConstructed;
CMtCoder mtCoder;
@@ -699,10 +701,10 @@ static SRes Lzma2Enc_MtCallback_Write(void *pp, unsigned outBufIndex)
if (me->outStream)
return ISeqOutStream_Write(me->outStream, data, size) == size ? SZ_OK : SZ_ERROR_WRITE;
if (size > me->outBufSize)
if (size > me->outBuf_Rem)
return SZ_ERROR_OUTPUT_EOF;
memcpy(me->outBuf, data, size);
me->outBufSize -= size;
me->outBuf_Rem -= size;
me->outBuf += size;
return SZ_OK;
}
@@ -749,11 +751,11 @@ SRes Lzma2Enc_Encode2(CLzma2EncHandle pp,
p->outStream = outStream;
p->outBuf = NULL;
p->outBufSize = 0;
p->outBuf_Rem = 0;
if (!outStream)
{
p->outBuf = outBuf;
p->outBufSize = *outBufSize;
p->outBuf_Rem = *outBufSize;
*outBufSize = 0;
}

View File

@@ -1,5 +1,5 @@
/* LzmaDec.h -- LZMA Decoder
2018-02-06 : Igor Pavlov : Public domain */
2018-04-21 : Igor Pavlov : Public domain */
#ifndef __LZMA_DEC_H
#define __LZMA_DEC_H
@@ -12,11 +12,13 @@ EXTERN_C_BEGIN
/* _LZMA_PROB32 can increase the speed on some CPUs,
but memory usage for CLzmaDec::probs will be doubled in that case */
typedef
#ifdef _LZMA_PROB32
#define CLzmaProb UInt32
UInt32
#else
#define CLzmaProb UInt16
UInt16
#endif
CLzmaProb;
/* ---------- LZMA Properties ---------- */
@@ -76,8 +78,8 @@ typedef struct
void LzmaDec_Init(CLzmaDec *p);
/* There are two types of LZMA streams:
0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
- Stream with end mark. That end mark adds about 6 bytes to compressed size.
- Stream without end mark. You must know exact uncompressed size to decompress such stream. */
typedef enum
{
@@ -147,7 +149,7 @@ void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc);
You must work with CLzmaDec variables directly in this interface.
STEPS:
LzmaDec_Constr()
LzmaDec_Construct()
LzmaDec_Allocate()
for (each new stream)
{

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* 7zMain.c - Test application for 7z Decoder
2017-08-26 : Igor Pavlov : Public domain */
2018-04-19 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -606,6 +606,31 @@ int MY_CDECL main(int numargs, char *args[])
res = SZ_ERROR_FAIL;
break;
}
#ifdef USE_WINDOWS_FILE
{
FILETIME mtime, ctime;
FILETIME *mtimePtr = NULL;
FILETIME *ctimePtr = NULL;
if (SzBitWithVals_Check(&db.MTime, i))
{
const CNtfsFileTime *t = &db.MTime.Vals[i];
mtime.dwLowDateTime = (DWORD)(t->Low);
mtime.dwHighDateTime = (DWORD)(t->High);
mtimePtr = &mtime;
}
if (SzBitWithVals_Check(&db.CTime, i))
{
const CNtfsFileTime *t = &db.CTime.Vals[i];
ctime.dwLowDateTime = (DWORD)(t->Low);
ctime.dwHighDateTime = (DWORD)(t->High);
ctimePtr = &ctime;
}
if (mtimePtr || ctimePtr)
SetFileTime(outFile.handle, ctimePtr, NULL, mtimePtr);
}
#endif
if (File_Close(&outFile))
{

View File

@@ -1,4 +1,5 @@
PROG = 7zipInstall.exe
MY_FIXED = 1
LIBS = $(LIBS) version.lib

View File

@@ -1,4 +1,5 @@
PROG = 7zipUninstall.exe
MY_FIXED = 1
!IFDEF _64BIT_INSTALLER
CFLAGS = $(CFLAGS) -D_64BIT_INSTALLER

View File

@@ -1,4 +1,5 @@
PROG = 7zS2.sfx
MY_FIXED = 1
C_OBJS = \
$O\7zAlloc.obj \

View File

@@ -1,4 +1,5 @@
PROG = 7zS2con.sfx
MY_FIXED = 1
CFLAGS = $(CFLAGS) -D_CONSOLE
C_OBJS = \

View File

@@ -1,5 +1,5 @@
/* XzDec.c -- Xz Decode
2018-02-28 : Igor Pavlov : Public domain */
2018-04-24 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -2673,7 +2673,7 @@ SRes XzDecMt_Decode(CXzDecMtHandle pp,
if (p->finishedDecoderIndex >= 0)
{
CXzDecMtThread *coder = &p->coders[p->finishedDecoderIndex];
CXzDecMtThread *coder = &p->coders[(unsigned)p->finishedDecoderIndex];
codeRes = coder->codeRes;
dec = &coder->dec;
status = coder->status;

View File

@@ -1,5 +1,5 @@
/* XzEnc.c -- Xz Encode
2018-02-21 : Igor Pavlov : Public domain */
2018-04-28 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -1254,6 +1254,8 @@ SRes XzEnc_Encode(CXzEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStr
&& props->reduceSize >= progress2.inOffset)
rem = props->reduceSize - progress2.inOffset;
*/
blockSizes.headerSize = 0; // for GCC
RINOK(Xz_CompressBlock(
&p->lzmaf_Items[0],