mirror of
https://github.com/Xevion/easy7zip.git
synced 2026-01-31 10:24:13 -06:00
4.40 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
3415684502
commit
bd9a40b0ed
@@ -229,35 +229,4 @@ int ParseCommand(int numCommandForms, const CCommandForm *commandForms,
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool ParseSubCharsCommand(int numForms, const CCommandSubCharsSet *forms,
|
||||
const UString &commandString, CIntVector &indices)
|
||||
{
|
||||
indices.Clear();
|
||||
int numUsedChars = 0;
|
||||
for(int i = 0; i < numForms; i++)
|
||||
{
|
||||
const CCommandSubCharsSet &set = forms[i];
|
||||
int currentIndex = -1;
|
||||
int len = MyStringLen(set.Chars);
|
||||
for(int j = 0; j < len; j++)
|
||||
{
|
||||
wchar_t c = set.Chars[j];
|
||||
int newIndex = commandString.Find(c);
|
||||
if (newIndex >= 0)
|
||||
{
|
||||
if (currentIndex >= 0)
|
||||
return false;
|
||||
if (commandString.Find(c, newIndex + 1) >= 0)
|
||||
return false;
|
||||
currentIndex = j;
|
||||
numUsedChars++;
|
||||
}
|
||||
}
|
||||
if(currentIndex == -1 && !set.EmptyAllowed)
|
||||
return false;
|
||||
indices.Add(currentIndex);
|
||||
}
|
||||
return (numUsedChars == commandString.Length());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,16 +67,6 @@ struct CCommandForm
|
||||
int ParseCommand(int numCommandForms, const CCommandForm *commandForms,
|
||||
const UString &commandString, UString &postString);
|
||||
|
||||
struct CCommandSubCharsSet
|
||||
{
|
||||
wchar_t *Chars;
|
||||
bool EmptyAllowed;
|
||||
};
|
||||
|
||||
// Returns: indices of finded chars; -1 if there is no match
|
||||
bool ParseSubCharsCommand(int numForms, const CCommandSubCharsSet *forms,
|
||||
const UString &commandString, CIntVector &indices);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,10 +26,14 @@
|
||||
|
||||
typedef char CHAR;
|
||||
typedef unsigned char UCHAR;
|
||||
|
||||
#undef BYTE
|
||||
typedef unsigned char BYTE;
|
||||
|
||||
typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
|
||||
#undef WORD
|
||||
typedef unsigned short WORD;
|
||||
typedef short VARIANT_BOOL;
|
||||
|
||||
@@ -39,6 +43,8 @@ typedef unsigned int UINT;
|
||||
typedef UInt32 UINT32;
|
||||
typedef INT32 LONG; // LONG, ULONG and DWORD must be 32-bit
|
||||
typedef UINT32 ULONG;
|
||||
|
||||
#undef DWORD
|
||||
typedef UINT32 DWORD;
|
||||
|
||||
typedef Int64 LONGLONG;
|
||||
@@ -70,6 +76,7 @@ typedef LONG SCODE;
|
||||
|
||||
#define S_OK ((HRESULT)0x00000000L)
|
||||
#define S_FALSE ((HRESULT)0x00000001L)
|
||||
#define E_NOTIMPL ((HRESULT)0x80004001L)
|
||||
#define E_NOINTERFACE ((HRESULT)0x80004002L)
|
||||
#define E_ABORT ((HRESULT)0x80004004L)
|
||||
#define E_FAIL ((HRESULT)0x80004005L)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#ifndef DEBUG_MEMORY_LEAK
|
||||
|
||||
#ifdef _WIN32
|
||||
void *
|
||||
#ifdef _MSC_VER
|
||||
__cdecl
|
||||
@@ -36,6 +37,7 @@ operator delete(void *p) throw()
|
||||
*/
|
||||
::free(p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
|
||||
class CNewException {};
|
||||
|
||||
#ifdef _WIN32
|
||||
void
|
||||
#ifdef _MSC_VER
|
||||
__cdecl
|
||||
#endif
|
||||
operator delete(void *p) throw();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -460,19 +460,3 @@ void CCensor::ExtendExclude()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool AreTheFileNamesDirDelimiterEqual(const UString &name1, const UString &name2)
|
||||
{
|
||||
if(name1.Length() != name2.Length())
|
||||
return false;
|
||||
for(int i = 0; i < name1.Length(); i++)
|
||||
{
|
||||
wchar_t char1 = name1[i], char2 = name2[i];
|
||||
if (char1 == char2)
|
||||
continue;
|
||||
if (IsCharDirLimiter(char1) && IsCharDirLimiter(char2))
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
// return true if names differs only with '\' or '/' characters
|
||||
bool AreTheFileNamesDirDelimiterEqual(const UString &name1, const UString &name2);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user