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>2015-10-05 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:56 +0300
commit6543c280208393fa32cb0094f770d14c1cfb13b2 (patch)
treebeb90f5e81e85e7957463ee5ad89cab0b3566560 /CPP/7zip/Archive/Zip
parentf6444c32568553e0261ca0105083658f12be6284 (diff)
15.0815.08
Diffstat (limited to 'CPP/7zip/Archive/Zip')
-rw-r--r--CPP/7zip/Archive/Zip/ZipAddCommon.cpp2
-rw-r--r--CPP/7zip/Archive/Zip/ZipHandler.cpp2
-rw-r--r--CPP/7zip/Archive/Zip/ZipHeader.h31
-rw-r--r--CPP/7zip/Archive/Zip/ZipIn.cpp2
-rw-r--r--CPP/7zip/Archive/Zip/ZipItem.cpp13
5 files changed, 12 insertions, 38 deletions
diff --git a/CPP/7zip/Archive/Zip/ZipAddCommon.cpp b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp
index c9c290aa..06fbe22f 100644
--- a/CPP/7zip/Archive/Zip/ZipAddCommon.cpp
+++ b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp
@@ -271,7 +271,7 @@ HRESULT CAddCommon::Compress(
else
{
CMethodId methodId;
- switch(method)
+ switch (method)
{
case NFileHeader::NCompressionMethod::kBZip2:
methodId = kMethodId_BZip2;
diff --git a/CPP/7zip/Archive/Zip/ZipHandler.cpp b/CPP/7zip/Archive/Zip/ZipHandler.cpp
index 3e29a880..510ecb41 100644
--- a/CPP/7zip/Archive/Zip/ZipHandler.cpp
+++ b/CPP/7zip/Archive/Zip/ZipHandler.cpp
@@ -929,7 +929,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
bool allFilesMode = (numItems == (UInt32)(Int32)-1);
if (allFilesMode)
numItems = m_Items.Size();
- if(numItems == 0)
+ if (numItems == 0)
return S_OK;
UInt32 i;
for (i = 0; i < numItems; i++)
diff --git a/CPP/7zip/Archive/Zip/ZipHeader.h b/CPP/7zip/Archive/Zip/ZipHeader.h
index c109992c..18ba064a 100644
--- a/CPP/7zip/Archive/Zip/ZipHeader.h
+++ b/CPP/7zip/Archive/Zip/ZipHeader.h
@@ -153,36 +153,7 @@ namespace NFileHeader
};
}
- namespace NUnixAttrib
- {
- const UInt32 kIFMT = 0170000; // file type mask
-
- const UInt32 kIFDIR = 0040000; // directory
- const UInt32 kIFREG = 0100000; // regular file
- const UInt32 kIFSOCK = 0140000; // socket (BSD, not SysV or Amiga)
- const UInt32 kIFLNK = 0120000; // symbolic link (not SysV, Amiga)
- const UInt32 kIFBLK = 0060000; // block special (not Amiga)
- const UInt32 kIFCHR = 0020000; // character special (not Amiga)
- const UInt32 kIFIFO = 0010000; // fifo (BCC, not MSC or Amiga)
-
- const UInt32 kISUID = 04000; // set user id on execution
- const UInt32 kISGID = 02000; // set group id on execution
- const UInt32 kISVTX = 01000; // directory permissions control
- const UInt32 kENFMT = kISGID; // record locking enforcement flag
- const UInt32 kIRWXU = 00700; // read, write, execute: owner
- const UInt32 kIRUSR = 00400; // read permission: owner
- const UInt32 kIWUSR = 00200; // write permission: owner
- const UInt32 kIXUSR = 00100; // execute permission: owner
- const UInt32 kIRWXG = 00070; // read, write, execute: group
- const UInt32 kIRGRP = 00040; // read permission: group
- const UInt32 kIWGRP = 00020; // write permission: group
- const UInt32 kIXGRP = 00010; // execute permission: group
- const UInt32 kIRWXO = 00007; // read, write, execute: other
- const UInt32 kIROTH = 00004; // read permission: other
- const UInt32 kIWOTH = 00002; // write permission: other
- const UInt32 kIXOTH = 00001; // execute permission: other
- }
-
+
namespace NAmigaAttrib
{
const UInt32 kIFMT = 06000; // Amiga file type mask
diff --git a/CPP/7zip/Archive/Zip/ZipIn.cpp b/CPP/7zip/Archive/Zip/ZipIn.cpp
index 3c466424..f72e7f8c 100644
--- a/CPP/7zip/Archive/Zip/ZipIn.cpp
+++ b/CPP/7zip/Archive/Zip/ZipIn.cpp
@@ -579,7 +579,7 @@ static bool FlagsAreSame(const CItem &i1, const CItem &i2)
if (i1.Flags == i2.Flags)
return true;
UInt32 mask = 0xFFFF;
- switch(i1.Method)
+ switch (i1.Method)
{
case NFileHeader::NCompressionMethod::kDeflated:
mask = 0x7FF9;
diff --git a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp
index f2ccc814..9e1f5e00 100644
--- a/CPP/7zip/Archive/Zip/ZipItem.cpp
+++ b/CPP/7zip/Archive/Zip/ZipItem.cpp
@@ -2,11 +2,14 @@
#include "StdAfx.h"
-#include "ZipHeader.h"
-#include "ZipItem.h"
-#include "../Common/ItemNameUtils.h"
#include "../../../../C/CpuArch.h"
+#include "../../../Common/MyLinux.h"
+
+#include "../Common/ItemNameUtils.h"
+
+#include "ZipItem.h"
+
namespace NArchive {
namespace NZip {
@@ -114,7 +117,7 @@ bool CItem::IsDir() const
case NHostOS::kMVS:
return false; // change it throw kUnknownAttributes;
case NHostOS::kUnix:
- return ((highAttrib & NUnixAttrib::kIFMT) == NUnixAttrib::kIFDIR);
+ return MY_LIN_S_ISDIR(highAttrib);
default:
return false;
}
@@ -151,7 +154,7 @@ bool CItem::GetPosixAttrib(UInt32 &attrib) const
}
attrib = 0;
if (IsDir())
- attrib = NUnixAttrib::kIFDIR;
+ attrib = MY_LIN_S_IFDIR;
return false;
}