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>2006-03-03 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:46 +0300
commit191cf6781a9d4bce4e1be048d6f966e036a87a1a (patch)
tree90ded94b7100488e1a5b75c5e192e46906f5cd58
parent0f60a4933b33cf5061a73ce39d0dd49e274b8a26 (diff)
4.35 beta
-rwxr-xr-x7zip/Bundles/Alone7z/makefile3
-rwxr-xr-x7zip/Bundles/SFXCon/Main.cpp2
-rwxr-xr-x7zip/Compress/LZ/LZOutWindow.h4
-rwxr-xr-x7zip/Compress/LZMA_Alone/LzmaAlone.cpp2
-rwxr-xr-x7zip/Compress/Rar20/Rar20Decoder.cpp5
-rwxr-xr-x7zip/Compress/Rar20/Rar20Decoder.h10
-rwxr-xr-x7zip/MyVersion.h8
-rwxr-xr-x7zip/UI/Common/ArchiveCommandLine.cpp12
-rwxr-xr-x7zip/UI/Common/ArchiveCommandLine.h1
-rwxr-xr-x7zip/UI/Console/List.cpp144
-rwxr-xr-x7zip/UI/Console/List.h2
-rwxr-xr-x7zip/UI/Console/Main.cpp1
-rwxr-xr-xDOC/7zC.txt4
-rwxr-xr-xDOC/7zip.nsi4
-rwxr-xr-xDOC/lzma.txt4
-rwxr-xr-xDOC/readme.txt3
16 files changed, 156 insertions, 53 deletions
diff --git a/7zip/Bundles/Alone7z/makefile b/7zip/Bundles/Alone7z/makefile
index bff04105..465f7005 100755
--- a/7zip/Bundles/Alone7z/makefile
+++ b/7zip/Bundles/Alone7z/makefile
@@ -6,6 +6,7 @@ CFLAGS = $(CFLAGS) -I ../../../ \
-DNO_REGISTRY \
-D_NO_CRYPTO \
-DFORMAT_7Z \
+ -DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
@@ -78,6 +79,7 @@ UI_COMMON_OBJS = \
$O\ExtractingFilePath.obj \
$O\OpenArchive.obj \
$O\PropIDUtils.obj \
+ $O\SetProperties.obj \
$O\SortUtils.obj \
$O\TempFiles.obj \
$O\Update.obj \
@@ -97,6 +99,7 @@ AR_COMMON_OBJS = \
$O\ItemNameUtils.obj \
$O\MultiStream.obj \
$O\OutStreamWithCRC.obj \
+ $O\ParseProperties.obj \
7Z_OBJS = \
diff --git a/7zip/Bundles/SFXCon/Main.cpp b/7zip/Bundles/SFXCon/Main.cpp
index 3c31b6a5..d707a37a 100755
--- a/7zip/Bundles/SFXCon/Main.cpp
+++ b/7zip/Bundles/SFXCon/Main.cpp
@@ -459,7 +459,7 @@ int Main2(
HRESULT result = ListArchives(
v1, v2,
wildcardCensorHead,
- true,
+ true, false,
passwordEnabled,
password);
if (result != S_OK)
diff --git a/7zip/Compress/LZ/LZOutWindow.h b/7zip/Compress/LZ/LZOutWindow.h
index 5387fdb8..027f2070 100755
--- a/7zip/Compress/LZ/LZOutWindow.h
+++ b/7zip/Compress/LZ/LZOutWindow.h
@@ -27,9 +27,9 @@ public:
bool CopyBlock(UInt32 distance, UInt32 len)
{
UInt32 pos = _pos - distance - 1;
- if (pos >= _bufferSize)
+ if (distance >= _pos)
{
- if (!_overDict)
+ if (!_overDict || distance >= _bufferSize)
return false;
pos += _bufferSize;
}
diff --git a/7zip/Compress/LZMA_Alone/LzmaAlone.cpp b/7zip/Compress/LZMA_Alone/LzmaAlone.cpp
index dc99b47c..ef977036 100755
--- a/7zip/Compress/LZMA_Alone/LzmaAlone.cpp
+++ b/7zip/Compress/LZMA_Alone/LzmaAlone.cpp
@@ -152,7 +152,7 @@ int main2(int n, const char *args[])
g_IsNT = IsItWindowsNT();
#endif
- fprintf(stderr, "\nLZMA 4.34 Copyright (c) 1999-2006 Igor Pavlov 2006-02-23\n");
+ fprintf(stderr, "\nLZMA 4.35 Copyright (c) 1999-2006 Igor Pavlov 2006-03-03\n");
if (n == 1)
{
diff --git a/7zip/Compress/Rar20/Rar20Decoder.cpp b/7zip/Compress/Rar20/Rar20Decoder.cpp
index 8da544f7..fd013a43 100755
--- a/7zip/Compress/Rar20/Rar20Decoder.cpp
+++ b/7zip/Compress/Rar20/Rar20Decoder.cpp
@@ -287,7 +287,10 @@ STDMETHODIMP CDecoder::CodeReal(ISequentialInStream *inStream,
}
else
return S_FALSE;
- CopyBackBlockOp(distance, length);
+ m_RepDists[m_RepDistPtr++ & 3] = distance;
+ m_LastLength = length;
+ if (!m_OutWindowStream.CopyBlock(distance, length))
+ return S_FALSE;
pos += length;
}
}
diff --git a/7zip/Compress/Rar20/Rar20Decoder.h b/7zip/Compress/Rar20/Rar20Decoder.h
index 071b3635..f807594c 100755
--- a/7zip/Compress/Rar20/Rar20Decoder.h
+++ b/7zip/Compress/Rar20/Rar20Decoder.h
@@ -56,16 +56,6 @@ class CDecoder :
void InitStructures();
bool ReadTables();
bool ReadLastTables();
- void CopyBackBlockOp(UInt32 aDistance, UInt32 aLength)
- {
- /*
- if(m_Position <= aDistance)
- throw CDecoderException(CDecoderException::kData);
- */
- m_RepDists[m_RepDistPtr++ & 3] = aDistance;
- m_LastLength = aLength;
- m_OutWindowStream.CopyBlock(aDistance, aLength);
- }
public:
CDecoder();
diff --git a/7zip/MyVersion.h b/7zip/MyVersion.h
index d1b8070e..3388eac7 100755
--- a/7zip/MyVersion.h
+++ b/7zip/MyVersion.h
@@ -1,7 +1,7 @@
#define MY_VER_MAJOR 4
-#define MY_VER_MINOR 34
-#define MY_VERSION "4.34 beta"
-#define MY_7ZIP_VERSION "7-Zip 4.34 beta"
-#define MY_DATE "2006-02-27"
+#define MY_VER_MINOR 35
+#define MY_VERSION "4.35 beta"
+#define MY_7ZIP_VERSION "7-Zip 4.35 beta"
+#define MY_DATE "2006-03-03"
#define MY_COPYRIGHT "Copyright (c) 1999-2006 Igor Pavlov"
#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " " MY_DATE
diff --git a/7zip/UI/Common/ArchiveCommandLine.cpp b/7zip/UI/Common/ArchiveCommandLine.cpp
index 30531276..a482abdf 100755
--- a/7zip/UI/Common/ArchiveCommandLine.cpp
+++ b/7zip/UI/Common/ArchiveCommandLine.cpp
@@ -27,7 +27,7 @@ using namespace NCommandLineParser;
using namespace NWindows;
using namespace NFile;
-static const int kNumSwitches = 26;
+static const int kNumSwitches = 27;
namespace NKey {
enum Enum
@@ -57,7 +57,8 @@ enum Enum
kEmail,
kShowDialog,
kLargePages,
- kCharSet
+ kCharSet,
+ kTechMode
};
}
@@ -121,7 +122,8 @@ static const CSwitchForm kSwitchForms[kNumSwitches] =
{ L"SEML", NSwitchType::kUnLimitedPostString, false, 0},
{ L"AD", NSwitchType::kSimple, false },
{ L"SLP", NSwitchType::kUnLimitedPostString, false, 0},
- { L"SCS", NSwitchType::kUnLimitedPostString, false, 0}
+ { L"SCS", NSwitchType::kUnLimitedPostString, false, 0},
+ { L"SLT", NSwitchType::kSimple, false }
};
static const int kNumCommandForms = 7;
@@ -236,7 +238,7 @@ static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
return true;
}
-static inline GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; }
+static inline UINT GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; }
static void AddToCensorFromListFile(NWildcard::CCensor &wildcardCensor,
LPCWSTR fileName, bool include, NRecursedType::EEnum type, UINT codePage)
@@ -747,6 +749,8 @@ void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options)
if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], options.Command))
throw kUserErrorMessage;
+ options.TechMode = parser[NKey::kTechMode].ThereIs;
+
NRecursedType::EEnum recursedType;
if (parser[NKey::kRecursed].ThereIs)
recursedType = GetRecursedTypeFromIndex(parser[NKey::kRecursed].PostCharIndex);
diff --git a/7zip/UI/Common/ArchiveCommandLine.h b/7zip/UI/Common/ArchiveCommandLine.h
index e2031499..5392218e 100755
--- a/7zip/UI/Common/ArchiveCommandLine.h
+++ b/7zip/UI/Common/ArchiveCommandLine.h
@@ -62,6 +62,7 @@ struct CArchiveCommandLineOptions
bool PasswordEnabled;
UString Password;
+ bool TechMode;
// Extract
bool AppendName;
UString OutputDir;
diff --git a/7zip/UI/Console/List.cpp b/7zip/UI/Console/List.cpp
index 07637cba..6744fb82 100755
--- a/7zip/UI/Console/List.cpp
+++ b/7zip/UI/Console/List.cpp
@@ -24,6 +24,42 @@
using namespace NWindows;
+struct CPropIdToName
+{
+ PROPID PropID;
+ const wchar_t *Name;
+};
+
+static CPropIdToName kPropIdToName[] =
+{
+ { kpidPath, L"Path" },
+ { kpidName, L"Name" },
+ { kpidIsFolder, L"Folder" },
+ { kpidSize, L"Size" },
+ { kpidPackedSize, L"Packed Size" },
+ { kpidAttributes, L"Attributes" },
+ { kpidCreationTime, L"Created" },
+ { kpidLastAccessTime, L"Accessed" },
+ { kpidLastWriteTime, L"Modified" },
+ { kpidSolid, L"Solid" },
+ { kpidCommented, L"Commented" },
+ { kpidEncrypted, L"Encrypted" },
+ { kpidSplitBefore, L"Split Before" },
+ { kpidSplitAfter, L"Split After" },
+ { kpidDictionarySize, L"Dictionary Size" },
+ { kpidCRC, L"CRC" },
+ { kpidType, L"Type" },
+ { kpidIsAnti, L"Anti" },
+ { kpidMethod, L"Method" },
+ { kpidHostOS, L"Host OS" },
+ { kpidFileSystem, L"File System" },
+ { kpidUser, L"User" },
+ { kpidGroup, L"Group" },
+ { kpidBlock, L"Block" },
+ { kpidComment, L"Comment" },
+ { kpidPosition, L"Position" }
+};
+
static const char kEmptyAttributeChar = '.';
static const char kDirectoryAttributeChar = 'D';
static const char kReadonlyAttributeChar = 'R';
@@ -116,19 +152,23 @@ class CFieldPrinter
{
CObjectVector<CFieldInfo> _fields;
public:
+ void Clear() { _fields.Clear(); }
void Init(const CFieldInfoInit *standardFieldTable, int numItems);
+ HRESULT Init(IInArchive *archive);
void PrintTitle();
void PrintTitleLines();
HRESULT PrintItemInfo(IInArchive *archive,
const UString &defaultItemName,
const NWindows::NFile::NFind::CFileInfoW &archiveFileInfo,
- UInt32 index);
+ UInt32 index,
+ bool techMode);
HRESULT PrintSummaryInfo(UInt64 numFiles, const UInt64 *size,
const UInt64 *compressedSize);
};
void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, int numItems)
{
+ Clear();
for (int i = 0; i < numItems; i++)
{
CFieldInfo fieldInfo;
@@ -143,7 +183,39 @@ void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, int numItems)
}
}
-
+HRESULT CFieldPrinter::Init(IInArchive *archive)
+{
+ Clear();
+ UInt32 numProps;
+ RINOK(archive->GetNumberOfProperties(&numProps));
+ for (UInt32 i = 0; i < numProps; i++)
+ {
+ CMyComBSTR name;
+ PROPID propID;
+ VARTYPE vt;
+ RINOK(archive->GetPropertyInfo(i, &name, &propID, &vt));
+ CFieldInfo fieldInfo;
+ fieldInfo.PropID = propID;
+ if (name != NULL)
+ fieldInfo.Name = name;
+ else
+ {
+ fieldInfo.Name = L"Unknown";
+ for (int i = 0; i < sizeof(kPropIdToName) / sizeof(kPropIdToName[0]); i++)
+ {
+ const CPropIdToName &propIdToName = kPropIdToName[i];
+ if (propIdToName.PropID == propID)
+ {
+ fieldInfo.Name = propIdToName.Name;
+ break;
+ }
+ }
+ }
+ _fields.Add(fieldInfo);
+ }
+ return S_OK;
+}
+
void CFieldPrinter::PrintTitle()
{
for (int i = 0; i < _fields.Size(); i++)
@@ -195,15 +267,29 @@ void PrintTime(const NCOM::CPropVariant &propVariant)
HRESULT CFieldPrinter::PrintItemInfo(IInArchive *archive,
const UString &defaultItemName,
const NWindows::NFile::NFind::CFileInfoW &archiveFileInfo,
- UInt32 index)
+ UInt32 index,
+ bool techMode)
{
+ /*
+ if (techMode)
+ {
+ g_StdOut << "Index = ";
+ g_StdOut << (UInt64)index;
+ g_StdOut << endl;
+ }
+ */
for (int i = 0; i < _fields.Size(); i++)
{
const CFieldInfo &fieldInfo = _fields[i];
- PrintSpaces(fieldInfo.PrefixSpacesWidth);
+ if (!techMode)
+ PrintSpaces(fieldInfo.PrefixSpacesWidth);
NCOM::CPropVariant propVariant;
RINOK(archive->GetProperty(index, fieldInfo.PropID, &propVariant));
+ if (techMode)
+ {
+ g_StdOut << fieldInfo.Name << " = ";
+ }
int width = (fieldInfo.PropID == kpidPath) ? 0: fieldInfo.Width;
if (propVariant.vt == VT_EMPTY)
{
@@ -216,17 +302,18 @@ HRESULT CFieldPrinter::PrintItemInfo(IInArchive *archive,
propVariant = archiveFileInfo.LastWriteTime;
break;
default:
- PrintSpaces(width);
+ if (techMode)
+ g_StdOut << endl;
+ else
+ PrintSpaces(width);
continue;
}
}
-
if (fieldInfo.PropID == kpidLastWriteTime)
{
PrintTime(propVariant);
- continue;
}
- if (fieldInfo.PropID == kpidAttributes)
+ else if (fieldInfo.PropID == kpidAttributes)
{
if (propVariant.vt != VT_UI4)
throw "incorrect item";
@@ -236,16 +323,24 @@ HRESULT CFieldPrinter::PrintItemInfo(IInArchive *archive,
char s[8];
GetAttributesString(attributes, isFolder, s);
g_StdOut << s;
- continue;
}
-
- if (propVariant.vt == VT_BSTR)
+ else if (propVariant.vt == VT_BSTR)
{
- PrintString(fieldInfo.TextAdjustment, width, propVariant.bstrVal);
- continue;
+ if (techMode)
+ g_StdOut << propVariant.bstrVal;
+ else
+ PrintString(fieldInfo.TextAdjustment, width, propVariant.bstrVal);
+ }
+ else
+ {
+ UString s = ConvertPropertyToString(propVariant, fieldInfo.PropID);
+ if (techMode)
+ g_StdOut << s;
+ else
+ PrintString(fieldInfo.TextAdjustment, width, s);
}
- PrintString(fieldInfo.TextAdjustment, width,
- ConvertPropertyToString(propVariant, fieldInfo.PropID));
+ if (techMode)
+ g_StdOut << endl;
}
return S_OK;
}
@@ -299,10 +394,11 @@ bool GetUInt64Value(IInArchive *archive, UInt32 index, PROPID propID, UInt64 &va
HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
- bool enableHeaders, bool &passwordEnabled, UString &password)
+ bool enableHeaders, bool techMode, bool &passwordEnabled, UString &password)
{
CFieldPrinter fieldPrinter;
- fieldPrinter.Init(kStandardFieldTable, sizeof(kStandardFieldTable) / sizeof(kStandardFieldTable[0]));
+ if (!techMode)
+ fieldPrinter.Init(kStandardFieldTable, sizeof(kStandardFieldTable) / sizeof(kStandardFieldTable[0]));
UInt64 numFiles2 = 0, totalPackSize2 = 0, totalUnPackSize2 = 0;
UInt64 *totalPackSizePointer2 = 0, *totalUnPackSizePointer2 = 0;
@@ -355,14 +451,18 @@ HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFul
if (enableHeaders)
g_StdOut << endl << kListing << archiveName << endl << endl;
- if (enableHeaders)
+ if (enableHeaders && !techMode)
{
fieldPrinter.PrintTitle();
g_StdOut << endl;
fieldPrinter.PrintTitleLines();
g_StdOut << endl;
}
-
+
+ if (techMode)
+ {
+ RINOK(fieldPrinter.Init(archive));
+ }
UInt64 numFiles = 0, totalPackSize = 0, totalUnPackSize = 0;
UInt64 *totalPackSizePointer = 0, *totalUnPackSizePointer = 0;
UInt32 numItems;
@@ -380,7 +480,7 @@ HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFul
if (!wildcardCensor.CheckPath(filePath, !isFolder))
continue;
- fieldPrinter.PrintItemInfo(archive, defaultItemName, archiveFileInfo, i);
+ fieldPrinter.PrintItemInfo(archive, defaultItemName, archiveFileInfo, i, techMode);
UInt64 packSize, unpackSize;
if (!GetUInt64Value(archive, i, kpidSize, unpackSize))
@@ -398,7 +498,7 @@ HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFul
totalPackSize += packSize;
totalUnPackSize += unpackSize;
}
- if (enableHeaders)
+ if (enableHeaders && !techMode)
{
fieldPrinter.PrintTitleLines();
g_StdOut << endl;
@@ -417,7 +517,7 @@ HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFul
}
numFiles2 += numFiles;
}
- if (enableHeaders && archivePaths.Size() > 1)
+ if (enableHeaders && !techMode && archivePaths.Size() > 1)
{
g_StdOut << endl;
fieldPrinter.PrintTitleLines();
diff --git a/7zip/UI/Console/List.h b/7zip/UI/Console/List.h
index 847979b5..201a4128 100755
--- a/7zip/UI/Console/List.h
+++ b/7zip/UI/Console/List.h
@@ -7,7 +7,7 @@
HRESULT ListArchives(UStringVector &archivePaths, UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
- bool enableHeaders, bool &passwordEnabled, UString &password);
+ bool enableHeaders, bool techMode, bool &passwordEnabled, UString &password);
#endif
diff --git a/7zip/UI/Console/Main.cpp b/7zip/UI/Console/Main.cpp
index 3d46e832..7259a2a6 100755
--- a/7zip/UI/Console/Main.cpp
+++ b/7zip/UI/Console/Main.cpp
@@ -257,6 +257,7 @@ int Main2(
options.ArchivePathsFullSorted,
options.WildcardCensor.Pairs.Front().Head,
options.EnableHeaders,
+ options.TechMode,
options.PasswordEnabled,
options.Password);
if (result != S_OK)
diff --git a/DOC/7zC.txt b/DOC/7zC.txt
index bac297fc..4b2dda0a 100755
--- a/DOC/7zC.txt
+++ b/DOC/7zC.txt
@@ -40,12 +40,12 @@ You must download 7-Zip program from www.7-zip.org.
You can create .7z archive with 7z.exe or 7za.exe:
- 7za.exe a archive.7z *.htm -r -mx -m0fb=255
+ 7za.exe a archive.7z *.htm -r -mx -m0fb=255 -mf=off
If you have big number of files in archive, and you need fast extracting,
you can use partly-solid archives:
- 7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K
+ 7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K -mf=off
In that example 7-Zip will use 512KB solid blocks. So it needs to decompress only
512KB for extracting one file from such archive.
diff --git a/DOC/7zip.nsi b/DOC/7zip.nsi
index dca89615..32364a11 100755
--- a/DOC/7zip.nsi
+++ b/DOC/7zip.nsi
@@ -2,7 +2,7 @@
;Defines
!define VERSION_MAJOR 4
-!define VERSION_MINOR 34
+!define VERSION_MINOR 35
!define VERSION_POSTFIX_FULL " beta"
!ifdef WIN64
!ifdef IA64
@@ -14,7 +14,7 @@
!define VERSION_SYS_POSTFIX_FULL ""
!endif
!define NAME_FULL "7-Zip ${VERSION_MAJOR}.${VERSION_MINOR}${VERSION_POSTFIX_FULL}${VERSION_SYS_POSTFIX_FULL}"
-!define VERSION_POSTFIX "b"
+!define VERSION_POSTFIX ""
!ifdef WIN64
!ifdef IA64
!define VERSION_SYS_POSTFIX "-ia64"
diff --git a/DOC/lzma.txt b/DOC/lzma.txt
index f225c417..580146e6 100755
--- a/DOC/lzma.txt
+++ b/DOC/lzma.txt
@@ -1,7 +1,7 @@
-LZMA SDK 4.34
+LZMA SDK 4.35
-------------
-LZMA SDK 4.34 Copyright (C) 1999-2006 Igor Pavlov
+LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
LZMA SDK provides the documentation, samples, header files, libraries,
and tools you need to develop applications that use LZMA compression.
diff --git a/DOC/readme.txt b/DOC/readme.txt
index 8c62f893..ef867a71 100755
--- a/DOC/readme.txt
+++ b/DOC/readme.txt
@@ -1,4 +1,4 @@
-7-Zip 4.33 Sources
+7-Zip 4.35 Sources
------------------
7-Zip is a file archiver for Windows 95/98/ME/NT/2000/2003/XP.
@@ -170,6 +170,7 @@ Windows Win32 wrappers
Bundle Modules that are bundles of other modules
------
Alone 7za.exe: Standalone version of 7z
+ Alone7z 7zr.exe: Standalone version of 7z that supports only 7z/LZMA/BCJ/BCJ2
SFXCon 7zCon.sfx: Console 7z SFX module
SFXWin 7z.sfx: Windows 7z SFX module
SFXSetup 7zS.sfx: Windows 7z SFX module for Installers