9.04 beta

This commit is contained in:
Igor Pavlov
2009-06-02 00:00:00 +00:00
committed by Kornel Lesiński
parent 8874e4fbc9
commit 829409452d
440 changed files with 19803 additions and 9941 deletions

View File

@@ -2,13 +2,11 @@
#include "StdAfx.h"
#include "Common/StringConvert.h"
#include "Common/MyCom.h"
#include "Common/UTFConvert.h"
#include "Common/IntToString.h"
#include "Windows/Defs.h"
#include "Common/UTFConvert.h"
#include "../../Common/LimitedStreams.h"
#include "ChmIn.h"
namespace NArchive{
@@ -96,9 +94,8 @@ UString CMethodInfo::GetName() const
if (IsLzx())
{
s = L"LZX:";
UInt32 numDictBits = LzxInfo.GetNumDictBits();
wchar_t temp[32];
ConvertUInt64ToString(numDictBits, temp);
wchar_t temp[16];
ConvertUInt32ToString(LzxInfo.GetNumDictBits(), temp);
s += temp;
}
else
@@ -111,7 +108,7 @@ UString CMethodInfo::GetName() const
s2 = GetGuidString();
if (ControlData.GetCapacity() > 0)
{
s2 += ":";
s2 += ':';
for (size_t i = 0; i < ControlData.GetCapacity(); i++)
PrintByte(ControlData[i], s2);
}
@@ -141,7 +138,7 @@ UString CSectionInfo::GetMethodName() const
for (int i = 0; i < Methods.Size(); i++)
{
if (i != 0)
s += L" ";
s += L' ';
s += Methods[i].GetName();
}
return s;
@@ -155,7 +152,7 @@ Byte CInArchive::ReadByte()
return b;
}
void CInArchive::Skeep(size_t size)
void CInArchive::Skip(size_t size)
{
while (size-- != 0)
ReadByte();
@@ -221,7 +218,7 @@ void CInArchive::ReadString(int size, AString &s)
char c = (char)ReadByte();
if (c == 0)
{
Skeep(size);
Skip(size);
return;
}
s += c;
@@ -236,7 +233,7 @@ void CInArchive::ReadUString(int size, UString &s)
wchar_t c = ReadUInt16();
if (c == 0)
{
Skeep(2 * size);
Skip(2 * size);
return;
}
s += c;
@@ -372,12 +369,12 @@ HRESULT CInArchive::OpenChm(IInStream *inStream, CDatabase &database)
RINOK(ReadDirEntry(database));
numItems++;
}
Skeep(quickrefLength - 2);
Skip(quickrefLength - 2);
if (ReadUInt16() != numItems)
return S_FALSE;
}
else
Skeep(dirChunkSize - 4);
Skip(dirChunkSize - 4);
}
return S_OK;
}
@@ -579,7 +576,7 @@ HRESULT CInArchive::OpenHelp2(IInStream *inStream, CDatabase &database)
}
numItems++;
}
Skeep(quickrefLength - 2);
Skip(quickrefLength - 2);
if (ReadUInt16() != numItems)
return S_FALSE;
if (numItems > numDirEntries)
@@ -587,7 +584,7 @@ HRESULT CInArchive::OpenHelp2(IInStream *inStream, CDatabase &database)
numDirEntries -= numItems;
}
else
Skeep(dirChunkSize - 4);
Skip(dirChunkSize - 4);
}
return numDirEntries == 0 ? S_OK : S_FALSE;
}