4.48 beta

This commit is contained in:
Igor Pavlov
2007-06-26 00:00:00 +00:00
committed by Kornel Lesiński
parent 0b33f700a6
commit fd8b1d78b4
249 changed files with 3224 additions and 2157 deletions

View File

@@ -237,6 +237,14 @@ SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\System.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\System.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Thread.h
# End Source File
# End Group
@@ -277,6 +285,22 @@ SOURCE=..\..\..\Common\MyCom.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyVector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyVector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyWindows.h
# End Source File
# Begin Source File
@@ -289,14 +313,6 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
@@ -315,14 +331,6 @@ SOURCE=..\..\..\Common\StringToInt.h
SOURCE=..\..\..\Common\Types.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.h
# End Source File
# End Group
# Begin Group "7zip Common"

View File

@@ -29,7 +29,7 @@
#include "LzmaRam.h"
#ifdef COMPRESS_MF_MT
#include "Windows/System.h"
#include "../../../Windows/System.h"
#endif
extern "C"
@@ -92,7 +92,7 @@ static const CSwitchForm kSwitchForms[] =
{ L"EOS", NSwitchType::kSimple, false },
{ L"SI", NSwitchType::kSimple, false },
{ L"SO", NSwitchType::kSimple, false },
{ L"F86", NSwitchType::kSimple, false }
{ L"F86", NSwitchType::kPostChar, false, 0, 0, L"+" }
};
static const int kNumSwitches = sizeof(kSwitchForms) / sizeof(kSwitchForms[0]);
@@ -159,7 +159,7 @@ int main2(int n, const char *args[])
g_IsNT = IsItWindowsNT();
#endif
fprintf(stderr, "\nLZMA 4.45 Copyright (c) 1999-2007 Igor Pavlov 2007-04-03\n");
fprintf(stderr, "\nLZMA 4.48 Copyright (c) 1999-2007 Igor Pavlov 2007-06-24\n");
if (n == 1)
{
@@ -335,7 +335,7 @@ int main2(int n, const char *args[])
if (!dictionaryIsDefined)
dictionary = 1 << 23;
int res = LzmaRamEncode(inBuffer, inSize, outBuffer, outSize, &outSizeProcessed,
dictionary, SZ_FILTER_AUTO);
dictionary, parser[NKey::kFilter86].PostCharIndex == 0 ? SZ_FILTER_YES : SZ_FILTER_AUTO);
if (res != 0)
{
fprintf(stderr, "\nEncoder error = %d\n", (int)res);

View File

@@ -37,12 +37,12 @@ extern "C"
#include "../../ICoder.h"
#ifdef BENCH_MT
#include "Windows/Thread.h"
#include "Windows/Synchronization.h"
#include "../../../Windows/Thread.h"
#include "../../../Windows/Synchronization.h"
#endif
#ifdef EXTERNAL_LZMA
#include "Windows/PropVariant.h"
#include "../../../Windows/PropVariant.h"
#else
#include "../LZMA/LZMADecoder.h"
#include "../LZMA/LZMAEncoder.h"

View File

@@ -6,10 +6,10 @@
#include "LzmaBench.h"
#include "LzmaBenchCon.h"
#include "Common/IntToString.h"
#include "../../../Common/IntToString.h"
#if defined(BENCH_MT) || defined(_WIN32)
#include "Windows/System.h"
#include "../../../Windows/System.h"
#endif
#ifdef BREAK_HANDLER

View File

@@ -169,10 +169,9 @@ int LzmaRamEncode(
return SZ_RAM_E_OUTOFMEMORY;
memmove(filteredStream, inBuffer, inSize);
}
UInt32 _prevMask;
UInt32 _prevPos;
x86_Convert_Init(_prevMask, _prevPos);
x86_Convert(filteredStream, (UInt32)inSize, 0, &_prevMask, &_prevPos, 1);
UInt32 x86State;
x86_Convert_Init(x86State);
x86_Convert(filteredStream, (SizeT)inSize, 0, &x86State, 1);
}
size_t minSize = 0;

View File

@@ -70,10 +70,9 @@ int LzmaRamDecompress(
*outSizeProcessed = (size_t)outSizeProcessedLoc;
if (useFilter == 1)
{
UInt32 _prevMask;
UInt32 _prevPos;
x86_Convert_Init(_prevMask, _prevPos);
x86_Convert(outBuffer, (UInt32)outSizeProcessedLoc, 0, &_prevMask, &_prevPos, 0);
UInt32 x86State;
x86_Convert_Init(x86State);
x86_Convert(outBuffer, (SizeT)outSizeProcessedLoc, 0, &x86State, 0);
}
return 0;
}

View File

@@ -1,5 +1,5 @@
PROG = lzma.exe
CFLAGS = $(CFLAGS) -I ../../../ \
CFLAGS = $(CFLAGS) \
-DCOMPRESS_MF_MT \
-DBENCH_MT \
@@ -53,10 +53,13 @@ COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\String.obj \
$O\MyString.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\Vector.obj
$O\MyVector.obj
WIN_OBJS = \
$O\System.obj
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
@@ -79,6 +82,7 @@ OBJS = \
$(LZMA_OBJS) \
$(LZMA_OPT_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(LZ_OBJS) \
$(C_OBJS) \
@@ -108,6 +112,8 @@ $(LZMA_OPT_OBJS): ../LZMA/$(*B).cpp
$(COMPL_O2)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(LZ_OBJS): ../LZ/$(*B).cpp

View File

@@ -3,7 +3,20 @@ CXX = g++ -O2 -Wall
CXX_C = gcc -O2 -Wall
LIB = -lm
RM = rm -f
CFLAGS = -c -I ../../../
CFLAGS = -c
ifdef SystemDrive
IS_MINGW = 1
endif
ifdef IS_MINGW
FILE_IO =FileIO
FILE_IO_2 =Windows/$(FILE_IO)
LIB2 = -luuid
else
FILE_IO =C_FileIO
FILE_IO_2 =Common/$(FILE_IO)
endif
OBJS = \
LzmaAlone.o \
@@ -18,14 +31,14 @@ OBJS = \
OutBuffer.o \
FileStreams.o \
StreamUtils.o \
C_FileIO.o \
$(FILE_IO).o \
CommandLineParser.o \
CRC.o \
IntToString.o \
String.o \
MyString.o \
StringConvert.o \
StringToInt.o \
Vector.o \
MyVector.o \
7zCrc.o \
Alloc.o \
BranchX86.o \
@@ -37,7 +50,7 @@ OBJS = \
all: $(PROG)
$(PROG): $(OBJS)
$(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB)
$(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
LzmaAlone.o: LzmaAlone.cpp
$(CXX) $(CFLAGS) LzmaAlone.cpp
@@ -75,8 +88,9 @@ FileStreams.o: ../../Common/FileStreams.cpp
StreamUtils.o: ../../Common/StreamUtils.cpp
$(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp
C_FileIO.o: ../../../Common/C_FileIO.cpp
$(CXX) $(CFLAGS) ../../../Common/C_FileIO.cpp
$(FILE_IO).o: ../../../$(FILE_IO_2).cpp
$(CXX) $(CFLAGS) ../../../$(FILE_IO_2).cpp
CommandLineParser.o: ../../../Common/CommandLineParser.cpp
$(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp
@@ -90,8 +104,8 @@ MyWindows.o: ../../../Common/MyWindows.cpp
IntToString.o: ../../../Common/IntToString.cpp
$(CXX) $(CFLAGS) ../../../Common/IntToString.cpp
String.o: ../../../Common/String.cpp
$(CXX) $(CFLAGS) ../../../Common/String.cpp
MyString.o: ../../../Common/MyString.cpp
$(CXX) $(CFLAGS) ../../../Common/MyString.cpp
StringConvert.o: ../../../Common/StringConvert.cpp
$(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
@@ -99,8 +113,8 @@ StringConvert.o: ../../../Common/StringConvert.cpp
StringToInt.o: ../../../Common/StringToInt.cpp
$(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp
Vector.o: ../../../Common/Vector.cpp
$(CXX) $(CFLAGS) ../../../Common/Vector.cpp
MyVector.o: ../../../Common/MyVector.cpp
$(CXX) $(CFLAGS) ../../../Common/MyVector.cpp
7zCrc.o: ../../../../C/7zCrc.c
$(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c