mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 07:14:55 -06:00
4.48 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
0b33f700a6
commit
fd8b1d78b4
@@ -1,22 +0,0 @@
|
||||
// AlignedBuffer.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "AlignedBuffer.h"
|
||||
|
||||
void *CAlignedBuffer::Allocate(size_t size, size_t mask)
|
||||
{
|
||||
Free();
|
||||
m_Buffer = new unsigned char[size + mask];
|
||||
unsigned char *p = m_Buffer;
|
||||
while(((size_t)p & mask) != 0)
|
||||
p++;
|
||||
return (void *)p;
|
||||
}
|
||||
|
||||
void CAlignedBuffer::Free()
|
||||
{
|
||||
if (m_Buffer != 0)
|
||||
delete []m_Buffer;
|
||||
m_Buffer = 0;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// Common/AlignedBuffer.h
|
||||
|
||||
#ifndef __COMMON_ALIGNEDBUFFER_H
|
||||
#define __COMMON_ALIGNEDBUFFER_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
class CAlignedBuffer
|
||||
{
|
||||
unsigned char *m_Buffer;
|
||||
public:
|
||||
CAlignedBuffer(): m_Buffer(0) {};
|
||||
~CAlignedBuffer() { Free(); }
|
||||
void *Allocate(size_t size, size_t mask);
|
||||
void Free();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef __COMMON_COMMANDLINEPARSER_H
|
||||
#define __COMMON_COMMANDLINEPARSER_H
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "MyString.h"
|
||||
|
||||
namespace NCommandLineParser {
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
// Common/Exception.h
|
||||
|
||||
#ifndef __COMMON_EXCEPTION_H
|
||||
#define __COMMON_EXCEPTION_H
|
||||
|
||||
struct CSystemException
|
||||
{
|
||||
DWORD ErrorCode;
|
||||
CSystemException(): ErrorCode(::GetLastError()) {}
|
||||
CSystemException(DWORD errorCode): ErrorCode(errorCode) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "Common/Lang.h"
|
||||
#include "Common/TextConfig.h"
|
||||
#include "Lang.h"
|
||||
#include "TextConfig.h"
|
||||
|
||||
#include "StdInStream.h"
|
||||
#include "UTFConvert.h"
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#ifndef __COMMON_LANG_H
|
||||
#define __COMMON_LANG_H
|
||||
|
||||
#include "Common/Vector.h"
|
||||
#include "Common/String.h"
|
||||
#include "Common/Types.h"
|
||||
#include "MyVector.h"
|
||||
#include "MyString.h"
|
||||
#include "Types.h"
|
||||
|
||||
struct CLangPair
|
||||
{
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
#ifndef __COMMON_LISTFILEUTILS_H
|
||||
#define __COMMON_LISTFILEUTILS_H
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "Common/Types.h"
|
||||
#include "MyString.h"
|
||||
#include "Types.h"
|
||||
|
||||
bool ReadNamesFromListFile(LPCTSTR fileName, UStringVector &strings,
|
||||
UINT codePage = CP_OEMCP);
|
||||
bool ReadNamesFromListFile(LPCTSTR fileName, UStringVector &strings, UINT codePage = CP_OEMCP);
|
||||
|
||||
#endif
|
||||
|
||||
14
CPP/Common/MyException.h
Executable file
14
CPP/Common/MyException.h
Executable file
@@ -0,0 +1,14 @@
|
||||
// Common/Exception.h
|
||||
|
||||
#ifndef __COMMON_EXCEPTION_H
|
||||
#define __COMMON_EXCEPTION_H
|
||||
|
||||
#include "MyWindows.h"
|
||||
|
||||
struct CSystemException
|
||||
{
|
||||
HRESULT ErrorCode;
|
||||
CSystemException(HRESULT errorCode): ErrorCode(errorCode) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
// Common/String.cpp
|
||||
// Common/MyString.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "String.h"
|
||||
#include "MyString.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
// #include <wchar.h>
|
||||
|
||||
#include "Vector.h"
|
||||
#include "MyVector.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "MyWindows.h"
|
||||
@@ -358,8 +358,15 @@ public:
|
||||
int Compare(const CStringBase& s) const
|
||||
{ return MyStringCompare(_chars, s._chars); }
|
||||
|
||||
int Compare(const T *s) const
|
||||
{ return MyStringCompare(_chars, s); }
|
||||
|
||||
int CompareNoCase(const CStringBase& s) const
|
||||
{ return MyStringCompareNoCase(_chars, s._chars); }
|
||||
|
||||
int CompareNoCase(const T *s) const
|
||||
{ return MyStringCompareNoCase(_chars, s); }
|
||||
|
||||
/*
|
||||
int Collate(const CStringBase& s) const
|
||||
{ return MyStringCollate(_chars, s._chars); }
|
||||
@@ -1,10 +1,10 @@
|
||||
// Common/Vector.cpp
|
||||
// Common/MyVector.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "Vector.h"
|
||||
#include "MyVector.h"
|
||||
|
||||
CBaseRecordVector::~CBaseRecordVector()
|
||||
{ Free(); }
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Common/Random.h"
|
||||
#include "Random.h"
|
||||
|
||||
void CRandom::Init(unsigned int seed)
|
||||
{ srand(seed); }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "MyString.h"
|
||||
#include "Types.h"
|
||||
|
||||
class CStdInStream
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <tchar.h>
|
||||
|
||||
#include "StdOutStream.h"
|
||||
#include "Common/IntToString.h"
|
||||
#include "Common/StringConvert.h"
|
||||
#include "IntToString.h"
|
||||
#include "StringConvert.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// "was declared deprecated" disabling
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define __COMMON_STRINGCONVERT_H
|
||||
|
||||
#include "MyWindows.h"
|
||||
#include "String.h"
|
||||
#include "MyString.h"
|
||||
#include "Types.h"
|
||||
|
||||
UString MultiByteToUnicodeString(const AString &srcString, UINT codePage = CP_ACP);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "Common/TextConfig.h"
|
||||
#include "TextConfig.h"
|
||||
|
||||
#include "Defs.h"
|
||||
#include "Common/UTFConvert.h"
|
||||
#include "UTFConvert.h"
|
||||
|
||||
static bool IsDelimitChar(char c)
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#ifndef __COMMON_TEXTCONFIG_H
|
||||
#define __COMMON_TEXTCONFIG_H
|
||||
|
||||
#include "Common/Vector.h"
|
||||
#include "Common/String.h"
|
||||
#include "MyVector.h"
|
||||
#include "MyString.h"
|
||||
|
||||
struct CTextConfigPair
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef __COMMON_UTFCONVERT_H
|
||||
#define __COMMON_UTFCONVERT_H
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "MyString.h"
|
||||
|
||||
bool ConvertUTF8ToUnicode(const AString &utfString, UString &resultString);
|
||||
bool ConvertUnicodeToUTF8(const UString &unicodeString, AString &resultString);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef __COMMON_WILDCARD_H
|
||||
#define __COMMON_WILDCARD_H
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "MyString.h"
|
||||
|
||||
void SplitPathToParts(const UString &path, UStringVector &pathParts);
|
||||
void SplitPathToParts(const UString &path, UString &dirPrefix, UString &name);
|
||||
|
||||
Reference in New Issue
Block a user