"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Archive/ComHandler.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

ComHandler.cpp  (p7zip_15.14.1_src_all):ComHandler.cpp  (p7zip_16.02_src_all)
skipping to change at line 169 skipping to change at line 169
return true; return true;
} }
HRESULT Open(IInStream *inStream); HRESULT Open(IInStream *inStream);
}; };
HRESULT CDatabase::ReadSector(IInStream *inStream, Byte *buf, unsigned sectorSiz eBits, UInt32 sid) HRESULT CDatabase::ReadSector(IInStream *inStream, Byte *buf, unsigned sectorSiz eBits, UInt32 sid)
{ {
UpdatePhySize(((UInt64)sid + 2) << sectorSizeBits); UpdatePhySize(((UInt64)sid + 2) << sectorSizeBits);
RINOK(inStream->Seek((((UInt64)sid + 1) << sectorSizeBits), STREAM_SEEK_SET, N ULL)); RINOK(inStream->Seek((((UInt64)sid + 1) << sectorSizeBits), STREAM_SEEK_SET, N ULL));
return ReadStream_FALSE(inStream, buf, (UInt32)1 << sectorSizeBits); return ReadStream_FALSE(inStream, buf, (size_t)1 << sectorSizeBits);
} }
HRESULT CDatabase::ReadIDs(IInStream *inStream, Byte *buf, unsigned sectorSizeBi ts, UInt32 sid, UInt32 *dest) HRESULT CDatabase::ReadIDs(IInStream *inStream, Byte *buf, unsigned sectorSizeBi ts, UInt32 sid, UInt32 *dest)
{ {
RINOK(ReadSector(inStream, buf, sectorSizeBits, sid)); RINOK(ReadSector(inStream, buf, sectorSizeBits, sid));
UInt32 sectorSize = (UInt32)1 << sectorSizeBits; UInt32 sectorSize = (UInt32)1 << sectorSizeBits;
for (UInt32 t = 0; t < sectorSize; t += 4) for (UInt32 t = 0; t < sectorSize; t += 4)
*dest++ = Get32(buf + t); *dest++ = Get32(buf + t);
return S_OK; return S_OK;
} }
skipping to change at line 579 skipping to change at line 579
RINOK(AddNode(-1, root.SonDid)); RINOK(AddNode(-1, root.SonDid));
unsigned numCabs = 0; unsigned numCabs = 0;
FOR_VECTOR (i, Refs) FOR_VECTOR (i, Refs)
{ {
const CItem &item = Items[Refs[i].Did]; const CItem &item = Items[Refs[i].Did];
if (item.IsDir() || numCabs > 1) if (item.IsDir() || numCabs > 1)
continue; continue;
bool isMsiName; bool isMsiName;
UString msiName = ConvertName(item.Name, isMsiName); const UString msiName = ConvertName(item.Name, isMsiName);
if (isMsiName && !msiName.IsEmpty()) if (isMsiName && !msiName.IsEmpty())
{ {
bool isThereExt = (msiName.Find(L'.') >= 0); // bool isThereExt = (msiName.Find(L'.') >= 0);
bool isMsiSpec = (msiName[0] == k_Msi_SpecChar); bool isMsiSpec = (msiName[0] == k_Msi_SpecChar);
if (msiName.Len() >= 4 && StringsAreEqualNoCase_Ascii(msiName.RightPtr(4), ".cab") if (msiName.Len() >= 4 && StringsAreEqualNoCase_Ascii(msiName.RightPtr(4), ".cab")
|| !isMsiSpec && msiName.Len() >= 3 && StringsAreEqualNoCase_Ascii(msi Name.RightPtr(3), "exe") || !isMsiSpec && msiName.Len() >= 3 && StringsAreEqualNoCase_Ascii(msi Name.RightPtr(3), "exe")
|| !isMsiSpec && !isThereExt) // || !isMsiSpec && !isThereExt
)
{ {
numCabs++; numCabs++;
MainSubfile = i; MainSubfile = i;
} }
} }
} }
if (numCabs > 1) if (numCabs > 1)
MainSubfile = -1; MainSubfile = -1;
 End of changes. 4 change blocks. 
4 lines changed or deleted 6 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS