Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-05-27 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:51 +0300
commit0b33f700a66fcf7f55f92b92e0b3e5c7014d769a (patch)
treed23aa39164e4e4f47767ea38832f34452f8aaa90
parentc574fc0f4bba94e693b0e22f730d355b75d4f4ce (diff)
4.47 beta
-rwxr-xr-xCPP/7zip/Compress/BZip2/BZip2Decoder.cpp20
-rwxr-xr-xCPP/7zip/Compress/BZip2/BZip2Decoder.h7
-rwxr-xr-xCPP/7zip/Compress/BZip2/BZip2Encoder.cpp21
-rwxr-xr-xCPP/7zip/Compress/BZip2/BZip2Encoder.h14
-rwxr-xr-xCPP/7zip/MyVersion.h10
-rwxr-xr-xDOC/7zip.nsi2
-rwxr-xr-xDOC/7zip.wxs2
-rwxr-xr-xDOC/history.txt5
-rwxr-xr-xDOC/lzma.txt2
-rwxr-xr-xDOC/readme.txt2
10 files changed, 47 insertions, 38 deletions
diff --git a/CPP/7zip/Compress/BZip2/BZip2Decoder.cpp b/CPP/7zip/Compress/BZip2/BZip2Decoder.cpp
index 354ed03e..3f7dbc58 100755
--- a/CPP/7zip/Compress/BZip2/BZip2Decoder.cpp
+++ b/CPP/7zip/Compress/BZip2/BZip2Decoder.cpp
@@ -420,8 +420,6 @@ static UInt32 NO_INLINE DecodeBlock2Rand(const UInt32 *tt, UInt32 blockSize, UIn
#ifdef COMPRESS_BZIP2_MT
-static THREAD_FUNC_DECL MFThread(void *p) { ((CState *)p)->ThreadFunc(); return 0; }
-
CDecoder::CDecoder():
m_States(0)
{
@@ -439,7 +437,7 @@ HRes CDecoder::Create()
RINOK(CanProcessEvent.CreateIfNotCreated());
RINOK(CanStartWaitingEvent.CreateIfNotCreated());
if (m_States != 0 && m_NumThreadsPrev == NumThreads)
- return true;
+ return S_OK;
Free();
MtMode = (NumThreads > 1);
m_NumThreadsPrev = NumThreads;
@@ -450,14 +448,13 @@ HRes CDecoder::Create()
return E_OUTOFMEMORY;
}
catch(...) { return E_OUTOFMEMORY; }
- #ifdef COMPRESS_BZIP2_MT
for (UInt32 t = 0; t < NumThreads; t++)
{
CState &ti = m_States[t];
ti.Decoder = this;
if (MtMode)
{
- HRes res = ti.Thread.Create(MFThread, &ti);
+ HRes res = ti.Create();
if (res != S_OK)
{
NumThreads = t;
@@ -466,7 +463,6 @@ HRes CDecoder::Create()
}
}
}
- #endif
return S_OK;
}
@@ -528,7 +524,6 @@ HRESULT CDecoder::DecodeFile(bool &isBZ, ICompressProgressInfo *progress)
CState &s = m_States[t];
if (!s.Alloc())
return E_OUTOFMEMORY;
- RINOK(s.Create());
s.StreamWasFinishedEvent.Reset();
s.WaitingWasStartedEvent.Reset();
s.CanWriteEvent.Reset();
@@ -649,6 +644,17 @@ STDMETHODIMP CDecoder::GetInStreamProcessedSize(UInt64 *value)
}
#ifdef COMPRESS_BZIP2_MT
+
+static THREAD_FUNC_DECL MFThread(void *p) { ((CState *)p)->ThreadFunc(); return 0; }
+
+HRes CState::Create()
+{
+ RINOK(StreamWasFinishedEvent.CreateIfNotCreated());
+ RINOK(WaitingWasStartedEvent.CreateIfNotCreated());
+ RINOK(CanWriteEvent.CreateIfNotCreated());
+ return Thread.Create(MFThread, this);
+}
+
void CState::FinishStream()
{
Decoder->StreamWasFinished1 = true;
diff --git a/CPP/7zip/Compress/BZip2/BZip2Decoder.h b/CPP/7zip/Compress/BZip2/BZip2Decoder.h
index d38ababe..9c965b49 100755
--- a/CPP/7zip/Compress/BZip2/BZip2Decoder.h
+++ b/CPP/7zip/Compress/BZip2/BZip2Decoder.h
@@ -50,15 +50,10 @@ struct CState
Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size.
+ HRes Create();
void FinishStream();
void ThreadFunc();
- HRes Create()
- {
- RINOK(StreamWasFinishedEvent.CreateIfNotCreated());
- RINOK(WaitingWasStartedEvent.CreateIfNotCreated());
- return CanWriteEvent.CreateIfNotCreated();
- }
#endif
CState(): Counters(0) {}
diff --git a/CPP/7zip/Compress/BZip2/BZip2Encoder.cpp b/CPP/7zip/Compress/BZip2/BZip2Encoder.cpp
index f1e53cd6..ac5f78e1 100755
--- a/CPP/7zip/Compress/BZip2/BZip2Encoder.cpp
+++ b/CPP/7zip/Compress/BZip2/BZip2Encoder.cpp
@@ -55,6 +55,20 @@ void CThreadInfo::Free()
}
#ifdef COMPRESS_BZIP2_MT
+
+static THREAD_FUNC_DECL MFThread(void *threadCoderInfo)
+{
+ return ((CThreadInfo *)threadCoderInfo)->ThreadFunc();
+}
+
+HRes CThreadInfo::Create()
+{
+ RINOK(StreamWasFinishedEvent.Create());
+ RINOK(WaitingWasStartedEvent.Create());
+ RINOK(CanWriteEvent.Create());
+ return Thread.Create(MFThread, this);
+}
+
void CThreadInfo::FinishStream(bool needLeave)
{
Encoder->StreamWasFinished = true;
@@ -111,10 +125,6 @@ DWORD CThreadInfo::ThreadFunc()
}
}
-static THREAD_FUNC_DECL MFThread(void *threadCoderInfo)
-{
- return ((CThreadInfo *)threadCoderInfo)->ThreadFunc();
-}
#endif
CEncoder::CEncoder():
@@ -157,7 +167,7 @@ HRes CEncoder::Create()
ti.Encoder = this;
if (MtMode)
{
- HRes res = ti.Thread.Create(MFThread, &ti);
+ HRes res = ti.Create();
if (res != S_OK)
{
NumThreads = t;
@@ -735,7 +745,6 @@ HRESULT CEncoder::CodeReal(ISequentialInStream *inStream,
if (!ti.Alloc())
return E_OUTOFMEMORY;
- RINOK(ti.Create());
}
diff --git a/CPP/7zip/Compress/BZip2/BZip2Encoder.h b/CPP/7zip/Compress/BZip2/BZip2Encoder.h
index eff93bc7..02d4cde3 100755
--- a/CPP/7zip/Compress/BZip2/BZip2Encoder.h
+++ b/CPP/7zip/Compress/BZip2/BZip2Encoder.h
@@ -105,8 +105,6 @@ private:
int m_BlockIndex;
- void FinishStream(bool needLeave);
-
void WriteBits2(UInt32 value, UInt32 numBits);
void WriteByte2(Byte b);
void WriteBit2(bool v);
@@ -130,12 +128,9 @@ public:
UInt64 m_PackSize;
Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size.
- HRes Create()
- {
- RINOK(StreamWasFinishedEvent.Create());
- RINOK(WaitingWasStartedEvent.Create());
- return CanWriteEvent.Create();
- }
+ HRes Create();
+ void FinishStream(bool needLeave);
+ DWORD ThreadFunc();
#endif
CThreadInfo(): m_BlockSorterIndex(0), m_Block(0) {}
@@ -144,7 +139,6 @@ public:
void Free();
HRESULT EncodeBlock3(UInt32 blockSize);
- DWORD ThreadFunc();
};
class CEncoder :
@@ -230,7 +224,7 @@ public:
#ifdef COMPRESS_BZIP2_MT
MY_UNKNOWN_IMP2(ICompressSetCoderMt, ICompressSetCoderProperties)
#else
- MY_UNKNOWN_IMP1(ICompressGetInStreamProcessedSize)
+ MY_UNKNOWN_IMP1(ICompressSetCoderProperties)
#endif
HRESULT CodeReal(ISequentialInStream *inStream,
diff --git a/CPP/7zip/MyVersion.h b/CPP/7zip/MyVersion.h
index d0bf2759..722a2451 100755
--- a/CPP/7zip/MyVersion.h
+++ b/CPP/7zip/MyVersion.h
@@ -1,8 +1,8 @@
#define MY_VER_MAJOR 4
-#define MY_VER_MINOR 46
-#define MY_VER_BUILD 2
-#define MY_VERSION "4.46 beta"
-#define MY_7ZIP_VERSION "7-Zip 4.46 beta"
-#define MY_DATE "2007-05-25"
+#define MY_VER_MINOR 47
+#define MY_VER_BUILD 0
+#define MY_VERSION "4.47 beta"
+#define MY_7ZIP_VERSION "7-Zip 4.47 beta"
+#define MY_DATE "2007-05-27"
#define MY_COPYRIGHT "Copyright (c) 1999-2007 Igor Pavlov"
#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " " MY_DATE
diff --git a/DOC/7zip.nsi b/DOC/7zip.nsi
index 76f1bb0f..3b73c03c 100755
--- a/DOC/7zip.nsi
+++ b/DOC/7zip.nsi
@@ -2,7 +2,7 @@
;Defines
!define VERSION_MAJOR 4
-!define VERSION_MINOR 46
+!define VERSION_MINOR 47
!define VERSION_POSTFIX_FULL " beta"
!ifdef WIN64
!ifdef IA64
diff --git a/DOC/7zip.wxs b/DOC/7zip.wxs
index 45ec9fde..b92995b1 100755
--- a/DOC/7zip.wxs
+++ b/DOC/7zip.wxs
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?define VerMajor = "4" ?>
-<?define VerMinor = "46" ?>
+<?define VerMinor = "47" ?>
<?define VerBuild = "00" ?>
<?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?>
<?define MmHex = "0$(var.VerMajor)$(var.VerMinor)" ?>
diff --git a/DOC/history.txt b/DOC/history.txt
index 03a728c5..d166d255 100755
--- a/DOC/history.txt
+++ b/DOC/history.txt
@@ -1,6 +1,11 @@
Sources history of the 7-Zip
----------------------------
+ Version 4.46 beta 2007-05-25
+ --------------------------------------
+ - CPP Synchronization objects now return HRes (error code) instead of bool.
+
+
Version 4.45 beta 2007-04-16
--------------------------------------
- 7-Zip now uses C version of CRC, so you must call CrcGenerateTable at
diff --git a/DOC/lzma.txt b/DOC/lzma.txt
index 054b36fd..359d564d 100755
--- a/DOC/lzma.txt
+++ b/DOC/lzma.txt
@@ -1,4 +1,4 @@
-LZMA SDK 4.44
+LZMA SDK 4.46
-------------
LZMA SDK Copyright (C) 1999-2007 Igor Pavlov
diff --git a/DOC/readme.txt b/DOC/readme.txt
index 28a2cf65..e2dc96e9 100755
--- a/DOC/readme.txt
+++ b/DOC/readme.txt
@@ -1,4 +1,4 @@
-7-Zip 4.46 Sources
+7-Zip 4.47 Sources
------------------
7-Zip is a file archiver for Windows 95/98/ME/NT/2000/2003/XP/Vista.