summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghazan <ghazan@miranda.im>2021-11-14 21:55:32 +0300
committerghazan <ghazan@miranda.im>2021-11-14 21:55:32 +0300
commit580af48389fb3f05663b5e28e41a69ca518b9e0f (patch)
treecc7f3f069a75f3be200c0cc5ec8e633455ed4ef4
parent7bd49af2bd11afccd38e9c1de443a56022384349 (diff)
codelite workspace & mir_core project
-rw-r--r--codelite/.gitignore3
-rw-r--r--codelite/Makefile8
-rw-r--r--codelite/Miranda.workspace2
-rw-r--r--include/m_core.h6
-rw-r--r--include/m_string.h350
-rw-r--r--include/m_string.inl12
-rw-r--r--src/mir_core/mir_core.mk248
-rw-r--r--src/mir_core/mir_core.project37
-rw-r--r--src/mir_core/src/Linux/strutil.cpp48
-rw-r--r--src/mir_core/src/utils.cpp23
10 files changed, 582 insertions, 155 deletions
diff --git a/codelite/.gitignore b/codelite/.gitignore
new file mode 100644
index 0000000000..c65f407f20
--- /dev/null
+++ b/codelite/.gitignore
@@ -0,0 +1,3 @@
+build-Debug/*
+build-Release/*
+.codelite/* \ No newline at end of file
diff --git a/codelite/Makefile b/codelite/Makefile
new file mode 100644
index 0000000000..fa195bea86
--- /dev/null
+++ b/codelite/Makefile
@@ -0,0 +1,8 @@
+.PHONY: clean All
+
+All:
+ @echo "----------Building project:[ mir_core - Release ]----------"
+ @cd "/var/www/miranda-ng/src/mir_core" && "$(MAKE)" -f "mir_core.mk"
+clean:
+ @echo "----------Cleaning project:[ mir_core - Release ]----------"
+ @cd "/var/www/miranda-ng/src/mir_core" && "$(MAKE)" -f "mir_core.mk" clean
diff --git a/codelite/Miranda.workspace b/codelite/Miranda.workspace
index 5445c933ae..545c4afe70 100644
--- a/codelite/Miranda.workspace
+++ b/codelite/Miranda.workspace
@@ -2,7 +2,7 @@
<CodeLite_Workspace Name="Miranda" Database="" Version="10000">
<Project Name="mir_core" Path="../../../../var/www/miranda-ng/src/mir_core/mir_core.project" Active="Yes"/>
<BuildMatrix>
- <WorkspaceConfiguration Name="Debug" Selected="yes">
+ <WorkspaceConfiguration Name="Debug" Selected="no">
<Environment/>
<Project Name="mir_core" ConfigName="Debug"/>
</WorkspaceConfiguration>
diff --git a/include/m_core.h b/include/m_core.h
index db198cfebb..f74603f510 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -428,6 +428,12 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
MIR_CORE_DLL(wchar_t*) replaceStrW(wchar_t **dest, const wchar_t *src);
#endif
+#ifndef _MSC_VER
+ MIR_CORE_DLL(char*) strlwr(char *str);
+ MIR_CORE_DLL(char*) strupr(char *str);
+ MIR_CORE_DLL(char*) strrev(char *str);
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
diff --git a/include/m_string.h b/include/m_string.h
index 9d6244b19b..ba00c41b7a 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -29,8 +29,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h>
#include <string.h>
-#ifdef _WINDOWS
-#include <mbstring.h>
+#ifdef _MSC_VER
+ #include <mbstring.h>
+#else
+ #include <ctype.h>
#endif // _WINDOWS
#include <wchar.h>
@@ -278,192 +280,268 @@ template< typename _CharType = char >
class ChTraitsCRT : public ChTraitsBase < _CharType >
{
public:
- static char* MIR_SYSCALL CharNext(const char* p)
+ static char* MIR_SYSCALL CharNext(const char *p)
{
- return reinterpret_cast<char*>(_mbsinc(reinterpret_cast<const unsigned char*>(p)));
+ #ifdef _MSC_VER
+ return reinterpret_cast<char*>(_mbsinc(reinterpret_cast<const unsigned char*>(p)));
+ #else
+ return reinterpret_cast<char*>(p+1);
+ #endif
}
static int MIR_SYSCALL IsDigit(char ch)
{
- return _ismbcdigit(ch);
+ #ifdef _MSC_VER
+ return _ismbcdigit(ch);
+ #else
+ return isdigit(ch);
+ #endif
}
static int MIR_SYSCALL IsSpace(char ch)
{
- return _ismbcspace(ch);
+ #ifdef _MSC_VER
+ return _ismbcspace(ch);
+ #else
+ return isspace(ch);
+ #endif
}
- static int MIR_SYSCALL StringCompare(LPCSTR pszA, LPCSTR pszB)
+ static int MIR_SYSCALL StringCompare(const char *pszA, const char *pszB)
{
- return _mbscmp(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #ifdef _MSC_VER
+ return _mbscmp(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #else
+ return strcmp(pszA, pszB);
+ #endif
}
- static int MIR_SYSCALL StringCompareIgnore(LPCSTR pszA, LPCSTR pszB)
+ static int MIR_SYSCALL StringCompareIgnore(const char *pszA, const char *pszB)
{
- return _mbsicmp(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #ifdef _MSC_VER
+ return _mbsicmp(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #else
+ return strcasecmp(pszA, pszB);
+ #endif
}
- static int MIR_SYSCALL StringCollate(LPCSTR pszA, LPCSTR pszB)
+ static int MIR_SYSCALL StringCollate(const char *pszA, const char *pszB)
{
- return _mbscoll(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #ifdef _MSC_VER
+ return _mbscoll(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #else
+ return strcoll(pszA, pszB);
+ #endif
}
- static int MIR_SYSCALL StringCollateIgnore(LPCSTR pszA, LPCSTR pszB)
+ static int MIR_SYSCALL StringCollateIgnore(const char *pszA, const char *pszB)
{
- return _mbsicoll(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #ifdef _MSC_VER
+ return _mbsicoll(reinterpret_cast<const unsigned char*>(pszA), reinterpret_cast<const unsigned char*>(pszB));
+ #else
+ return strcoll(pszA, pszB);
+ #endif
}
- static LPCSTR MIR_SYSCALL StringFindString(LPCSTR pszBlock, LPCSTR pszMatch)
+ static const char* MIR_SYSCALL StringFindString(const char *pszBlock, const char *pszMatch)
{
- return reinterpret_cast<LPCSTR>(_mbsstr(reinterpret_cast<const unsigned char*>(pszBlock),
- reinterpret_cast<const unsigned char*>(pszMatch)));
+ #ifdef _MSC_VER
+ return reinterpret_cast<const char*>(_mbsstr(reinterpret_cast<const unsigned char*>(pszBlock),
+ reinterpret_cast<const unsigned char*>(pszMatch)));
+ #else
+ return strstr(pszBlock, pszMatch);
+ #endif
}
- static LPSTR MIR_SYSCALL StringFindString(LPSTR pszBlock, LPCSTR pszMatch)
+ static char* MIR_SYSCALL StringFindString(char *pszBlock, const char *pszMatch)
{
- return const_cast<LPSTR>(StringFindString(const_cast<LPCSTR>(pszBlock), pszMatch));
+ return const_cast<char*>(StringFindString(const_cast<const char*>(pszBlock), pszMatch));
}
- static LPCSTR MIR_SYSCALL StringFindChar(LPCSTR pszBlock, char chMatch)
+ static const char* MIR_SYSCALL StringFindChar(const char *pszBlock, char chMatch)
{
- return reinterpret_cast<LPCSTR>(_mbschr(reinterpret_cast<const unsigned char*>(pszBlock), (unsigned char)chMatch));
+ #ifdef _MSC_VER
+ return reinterpret_cast<const char*>(_mbschr(reinterpret_cast<const unsigned char*>(pszBlock), (unsigned char)chMatch));
+ #else
+ return strchr(pszBlock, chMatch);
+ #endif
}
- static LPCSTR MIR_SYSCALL StringFindCharRev(LPCSTR psz, char ch)
+ static const char* MIR_SYSCALL StringFindCharRev(const char *psz, char ch)
{
- return reinterpret_cast<LPCSTR>(_mbsrchr(reinterpret_cast<const unsigned char*>(psz), (unsigned char)ch));
+ #ifdef _MSC_VER
+ return reinterpret_cast<const char*>(_mbsrchr(reinterpret_cast<const unsigned char*>(psz), (unsigned char)ch));
+ #else
+ return strrchr(psz, ch);
+ #endif
}
- static LPCSTR MIR_SYSCALL StringScanSet(LPCSTR pszBlock, LPCSTR pszMatch)
+ static const char* MIR_SYSCALL StringScanSet(const char *pszBlock, const char *pszMatch)
{
- return reinterpret_cast<LPCSTR>(_mbspbrk(reinterpret_cast<const unsigned char*>(pszBlock),
- reinterpret_cast<const unsigned char*>(pszMatch)));
+ #ifdef _MSC_VER
+ return reinterpret_cast<const char*>(_mbspbrk(reinterpret_cast<const unsigned char*>(pszBlock),
+ reinterpret_cast<const unsigned char*>(pszMatch)));
+ #else
+ return strpbrk(pszBlock, pszMatch);
+ #endif
}
- static int MIR_SYSCALL StringSpanIncluding(LPCSTR pszBlock, LPCSTR pszSet)
+ static int MIR_SYSCALL StringSpanIncluding(const char *pszBlock, const char *pszSet)
{
- return (int)_mbsspn(reinterpret_cast<const unsigned char*>(pszBlock), reinterpret_cast<const unsigned char*>(pszSet));
+ #ifdef _MSC_VER
+ return (int)_mbsspn(reinterpret_cast<const unsigned char*>(pszBlock), reinterpret_cast<const unsigned char*>(pszSet));
+ #else
+ return (int)strspn(pszBlock, pszSet);
+ #endif
}
- static int MIR_SYSCALL StringSpanExcluding(LPCSTR pszBlock, LPCSTR pszSet)
+ static int MIR_SYSCALL StringSpanExcluding(const char *pszBlock, const char *pszSet)
{
- return (int)_mbscspn(reinterpret_cast<const unsigned char*>(pszBlock), reinterpret_cast<const unsigned char*>(pszSet));
+ #ifdef _MSC_VER
+ return (int)_mbscspn(reinterpret_cast<const unsigned char*>(pszBlock), reinterpret_cast<const unsigned char*>(pszSet));
+ #else
+ return (int)strcspn(pszBlock, pszSet);
+ #endif
}
- static LPSTR MIR_SYSCALL StringUppercase(LPSTR psz)
+ static char* MIR_SYSCALL StringUppercase(char *psz)
{
- CharUpperBuffA(psz, (DWORD)strlen(psz));
+ #ifdef _MSC_VER
+ CharUpperBuffA(psz, (uint32_t)strlen(psz));
+ #else
+ strupr(psz);
+ #endif
return psz;
}
- static LPSTR MIR_SYSCALL StringLowercase(LPSTR psz)
+ static char* MIR_SYSCALL StringLowercase(char *psz)
{
- CharLowerBuffA(psz, (DWORD)strlen(psz));
+ #ifdef _MSC_VER
+ CharLowerBuffA(psz, (uint32_t)strlen(psz));
+ #else
+ strlwr(psz);
+ #endif
return psz;
}
- static LPSTR MIR_SYSCALL StringUppercase(LPSTR psz, size_t size)
+ static char* MIR_SYSCALL StringUppercase(char *psz, size_t size)
{
- CharUpperBuffA(psz, (DWORD)size);
+ #ifdef _MSC_VER
+ CharUpperBuffA(psz, (uint32_t)size);
+ #else
+
+ #endif
return psz;
}
- static LPSTR MIR_SYSCALL StringLowercase(LPSTR psz, size_t size)
+ static char* MIR_SYSCALL StringLowercase(char *psz, size_t size)
{
- CharLowerBuffA(psz, (DWORD)size);
+ #ifdef _MSC_VER
+ CharLowerBuffA(psz, (uint32_t)size);
+ #endif
return psz;
}
- static LPSTR MIR_SYSCALL StringReverse(LPSTR psz)
+ static char* MIR_SYSCALL StringReverse(char *psz)
{
- return reinterpret_cast<LPSTR>(_mbsrev(reinterpret_cast<unsigned char*>(psz)));
+ #ifdef _MSC_VER
+ return reinterpret_cast<LPSTR>(_mbsrev(reinterpret_cast<unsigned char*>(psz)));
+ #else
+ return strrev(psz);
+ #endif
}
- static int MIR_SYSCALL GetFormattedLength(_Printf_format_string_ LPCSTR pszFormat, va_list args)
+ static int MIR_SYSCALL GetFormattedLength(_Printf_format_string_ const char *pszFormat, va_list args)
{
- return _vscprintf(pszFormat, args);
+ #ifdef _MSC_VER
+ return _vscprintf(pszFormat, args);
+ #else
+ #endif
}
- static int MIR_SYSCALL Format(LPSTR pszBuffer, size_t nlength, _Printf_format_string_ LPCSTR pszFormat, va_list args)
+ static int MIR_SYSCALL Format(char *pszBuffer, size_t nlength, _Printf_format_string_ const char *pszFormat, va_list args)
{
- return vsprintf_s(pszBuffer, nlength, pszFormat, args);
+ #ifdef _MSC_VER
+ return vsprintf_s(pszBuffer, nlength, pszFormat, args);
+ #else
+ #endif
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCSTR pszSrc)
+ static int MIR_SYSCALL GetBaseTypeLength(const char *pszSrc)
{
// Returns required buffer length in XCHARs
return int(strlen(pszSrc));
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCSTR pszSrc, int nLength)
+ static int MIR_SYSCALL GetBaseTypeLength(const char *pszSrc, int nLength)
{
(void)pszSrc;
// Returns required buffer length in XCHARs
return nLength;
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCWSTR pszSource)
+ static int MIR_SYSCALL GetBaseTypeLength(const wchar_t *pszSource)
{
// Returns required buffer length in XCHARs
#ifdef _MSC_VER
- return ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSource, -1, NULL, 0, NULL, NULL) - 1;
+ return ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSource, -1, NULL, 0, NULL, NULL) - 1;
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCWSTR pszSource, int nLength)
+ static int MIR_SYSCALL GetBaseTypeLength(const wchar_t *pszSource, int nLength)
{
// Returns required buffer length in XCHARs
#ifdef _MSC_VER
- return ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSource, nLength, NULL, 0, NULL, NULL);
+ return ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSource, nLength, NULL, 0, NULL, NULL);
#else
- return 0;
+ return 0;
#endif
}
- static void MIR_SYSCALL ConvertToBaseType(LPSTR pszDest, int nDestLength, LPCSTR pszSrc, int nSrcLength = -1)
+ static void MIR_SYSCALL ConvertToBaseType(char*pszDest, int nDestLength, const char *pszSrc, int nSrcLength = -1)
{
if (nSrcLength == -1) { nSrcLength = 1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s(pszDest, nDestLength*sizeof(char), pszSrc, nSrcLength*sizeof(char));
}
- static void MIR_SYSCALL ConvertToBaseType(LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
+ static void MIR_SYSCALL ConvertToBaseType(char*pszDest, int nDestLength, const wchar_t *pszSrc, int nSrcLength = -1)
{
// nLen is in XCHARs
#ifdef _MSC_VER
- ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSrc, nSrcLength, pszDest, nDestLength, NULL, NULL);
+ ::WideCharToMultiByte(Langpack_GetDefaultCodePage(), 0, pszSrc, nSrcLength, pszDest, nDestLength, NULL, NULL);
#endif
}
static void ConvertToOem(_CharType* pstrString)
{
#ifdef _MSC_VER
- BOOL fSuccess = ::CharToOemA(pstrString, pstrString);
+ bool fSuccess = ::CharToOemA(pstrString, pstrString);
#endif // _MSC_VER
}
static void ConvertToAnsi(_CharType* pstrString)
{
#ifdef _MSC_VER
- BOOL fSuccess = ::OemToCharA(pstrString, pstrString);
+ bool fSuccess = ::OemToCharA(pstrString, pstrString);
#endif
}
static void ConvertToOem(_CharType* pstrString, size_t size)
{
#ifdef _MSC_VER
- DWORD dwSize = static_cast<DWORD>(size);
- ::CharToOemBuffA(pstrString, pstrString, dwSize);
+ uint32_t dwSize = static_cast<uint32_t>(size);
+ ::CharToOemBuffA(pstrString, pstrString, dwSize);
#endif
}
static void ConvertToAnsi(_CharType* pstrString, size_t size)
{
#ifdef _MSC_VER
- DWORD dwSize = static_cast<DWORD>(size);
- ::OemToCharBuffA(pstrString, pstrString, dwSize);
+ uint32_t dwSize = static_cast<uint32_t>(size);
+ ::OemToCharBuffA(pstrString, pstrString, dwSize);
#endif
}
@@ -473,34 +551,38 @@ public:
memset(pch, ch, nLength);
}
- static int MIR_SYSCALL SafeStringLen(LPCSTR psz)
+ static int MIR_SYSCALL SafeStringLen(const char *psz)
{
// returns length in bytes
return (psz != NULL) ? int(strlen(psz)) : 0;
}
- static int MIR_SYSCALL SafeStringLen(LPCWSTR psz)
+ static int MIR_SYSCALL SafeStringLen(const wchar_t *psz)
{
// returns length in wchar_ts
return (psz != NULL) ? int(wcslen(psz)) : 0;
}
- static int MIR_SYSCALL GetCharLen(const wchar_t* pch)
+ static int MIR_SYSCALL GetCharLen(const wchar_t *pch)
{
// returns char length
return 1;
}
- static int MIR_SYSCALL GetCharLen(const char* pch)
+ static int MIR_SYSCALL GetCharLen(const char *pch)
{
// returns char length
- return int(_mbclen(reinterpret_cast<const unsigned char*>(pch)));
+ #ifdef _MSC_VER
+ return int(_mbclen(reinterpret_cast<const unsigned char*>(pch)));
+ #else
+ return mblen(pch, strlen(pch));
+ #endif
}
- static DWORD MIR_SYSCALL GetEnvironmentVariable(LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize)
+ static uint32_t MIR_SYSCALL GetEnvironmentVariable(const char *pszVar, char*pszBuffer, uint32_t dwSize)
{
#ifdef _MSC_VER
- return ::GetEnvironmentVariableA(pszVar, pszBuffer, dwSize);
+ return ::GetEnvironmentVariableA(pszVar, pszBuffer, dwSize);
#endif // _MSC_VER
}
@@ -514,219 +596,219 @@ public:
template<>
class ChTraitsCRT< wchar_t > : public ChTraitsBase< wchar_t >
{
- static DWORD MIR_SYSCALL _GetEnvironmentVariableW(LPCWSTR pszName, LPWSTR pszBuffer, DWORD nSize)
+ static uint32_t MIR_SYSCALL _GetEnvironmentVariableW(const wchar_t *pszName, wchar_t *pszBuffer, uint32_t nSize)
{
#ifdef _MSC_VER
- return ::GetEnvironmentVariableW(pszName, pszBuffer, nSize);
+ return ::GetEnvironmentVariableW(pszName, pszBuffer, nSize);
#endif // _MSC_VER
}
public:
- static LPWSTR MIR_SYSCALL CharNext(LPCWSTR psz)
+ static wchar_t* MIR_SYSCALL CharNext(const wchar_t *psz)
{
- return const_cast< LPWSTR >(psz+1);
+ return const_cast<wchar_t*>(psz+1);
}
static int MIR_SYSCALL IsDigit(wchar_t ch)
{
#ifdef _MSC_VER
- return iswdigit(static_cast<unsigned short>(ch));
+ return iswdigit(static_cast<unsigned short>(ch));
#else
- return 0;
+ return 0;
#endif
}
static int MIR_SYSCALL IsSpace(wchar_t ch)
{
#ifdef _MSC_VER
- return iswspace(static_cast<unsigned short>(ch));
+ return iswspace(static_cast<unsigned short>(ch));
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL StringCompare(LPCWSTR pszA, LPCWSTR pszB)
+ static int MIR_SYSCALL StringCompare(const wchar_t *pszA, const wchar_t *pszB)
{
return wcscmp(pszA, pszB);
}
- static int MIR_SYSCALL StringCompareIgnore(LPCWSTR pszA, LPCWSTR pszB)
+ static int MIR_SYSCALL StringCompareIgnore(const wchar_t *pszA, const wchar_t *pszB)
{
#ifdef _MSC_VER
- return _wcsicmp(pszA, pszB);
+ return _wcsicmp(pszA, pszB);
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL StringCollate(LPCWSTR pszA, LPCWSTR pszB)
+ static int MIR_SYSCALL StringCollate(const wchar_t *pszA, const wchar_t *pszB)
{
return wcscoll(pszA, pszB);
}
- static int MIR_SYSCALL StringCollateIgnore(LPCWSTR pszA, LPCWSTR pszB)
+ static int MIR_SYSCALL StringCollateIgnore(const wchar_t *pszA, const wchar_t *pszB)
{
#ifdef _MSC_VER
- return _wcsicoll(pszA, pszB);
+ return _wcsicoll(pszA, pszB);
#else
- return 0;
+ return 0;
#endif
}
- static LPCWSTR MIR_SYSCALL StringFindString(LPCWSTR pszBlock, LPCWSTR pszMatch)
+ static const wchar_t* MIR_SYSCALL StringFindString(const wchar_t *pszBlock, const wchar_t *pszMatch)
{
return wcsstr(pszBlock, pszMatch);
}
- static LPWSTR MIR_SYSCALL StringFindString(LPWSTR pszBlock, LPCWSTR pszMatch)
+ static wchar_t* MIR_SYSCALL StringFindString(wchar_t *pszBlock, const wchar_t *pszMatch)
{
- return const_cast< LPWSTR >(StringFindString(const_cast< LPCWSTR >(pszBlock), pszMatch));
+ return const_cast<wchar_t*>(StringFindString(const_cast<wchar_t*>(pszBlock), pszMatch));
}
- static LPCWSTR MIR_SYSCALL StringFindChar(LPCWSTR pszBlock, wchar_t chMatch)
+ static const wchar_t* MIR_SYSCALL StringFindChar(const wchar_t *pszBlock, wchar_t chMatch)
{
return wcschr(pszBlock, chMatch);
}
- static LPCWSTR MIR_SYSCALL StringFindCharRev(LPCWSTR psz, wchar_t ch)
+ static const wchar_t* MIR_SYSCALL StringFindCharRev(const wchar_t *psz, wchar_t ch)
{
return wcsrchr(psz, ch);
}
- static LPCWSTR MIR_SYSCALL StringScanSet(LPCWSTR pszBlock, LPCWSTR pszMatch)
+ static const wchar_t* MIR_SYSCALL StringScanSet(const wchar_t *pszBlock, const wchar_t *pszMatch)
{
return wcspbrk(pszBlock, pszMatch);
}
- static int MIR_SYSCALL StringSpanIncluding(LPCWSTR pszBlock, LPCWSTR pszSet)
+ static int MIR_SYSCALL StringSpanIncluding(const wchar_t *pszBlock, const wchar_t *pszSet)
{
return (int)wcsspn(pszBlock, pszSet);
}
- static int MIR_SYSCALL StringSpanExcluding(LPCWSTR pszBlock, LPCWSTR pszSet)
+ static int MIR_SYSCALL StringSpanExcluding(const wchar_t *pszBlock, const wchar_t *pszSet)
{
return (int)wcscspn(pszBlock, pszSet);
}
- static LPWSTR MIR_SYSCALL StringUppercase(LPWSTR psz)
+ static wchar_t* MIR_SYSCALL StringUppercase(wchar_t *psz)
{
#ifdef _MSC_VER
- CharUpperBuffW(psz, (DWORD)wcslen(psz));
+ CharUpperBuffW(psz, (uint32_t)wcslen(psz));
#endif
return psz;
}
- static LPWSTR MIR_SYSCALL StringLowercase(LPWSTR psz)
+ static wchar_t* MIR_SYSCALL StringLowercase(wchar_t *psz)
{
#ifdef _MSC_VER
- CharLowerBuffW(psz, (DWORD)wcslen(psz));
+ CharLowerBuffW(psz, (uint32_t)wcslen(psz));
#endif
return psz;
}
- static LPWSTR MIR_SYSCALL StringUppercase(LPWSTR psz, size_t len)
+ static wchar_t* MIR_SYSCALL StringUppercase(wchar_t *psz, size_t len)
{
#ifdef _MSC_VER
- CharUpperBuffW(psz, (DWORD)len);
+ CharUpperBuffW(psz, (uint32_t)len);
#endif
return psz;
}
- static LPWSTR MIR_SYSCALL StringLowercase(LPWSTR psz, size_t len)
+ static wchar_t* MIR_SYSCALL StringLowercase(wchar_t *psz, size_t len)
{
#ifdef _MSC_VER
- CharLowerBuffW(psz, (DWORD)len);
+ CharLowerBuffW(psz, (uint32_t)len);
#endif
return psz;
}
- static LPWSTR MIR_SYSCALL StringReverse(LPWSTR psz)
+ static wchar_t* MIR_SYSCALL StringReverse(wchar_t *psz)
{
#ifdef _MSC_VER
- return _wcsrev(psz);
+ return _wcsrev(psz);
#else
- return psz;
+ return psz;
#endif
}
- static int MIR_SYSCALL GetFormattedLength(_Printf_format_string_ LPCWSTR pszFormat, va_list args)
+ static int MIR_SYSCALL GetFormattedLength(_Printf_format_string_ const wchar_t *pszFormat, va_list args)
{
#ifdef _MSC_VER
- return _vscwprintf(pszFormat, args);
+ return _vscwprintf(pszFormat, args);
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL Format(LPWSTR pszBuffer, _Printf_format_string_ LPCWSTR pszFormat, va_list args)
+ static int MIR_SYSCALL Format(wchar_t *pszBuffer, _Printf_format_string_ const wchar_t *pszFormat, va_list args)
{
#pragma warning(push)
#pragma warning(disable : 4996)
#ifdef _MSC_VER
- return vswprintf(pszBuffer, pszFormat, args);
+ return vswprintf(pszBuffer, pszFormat, args);
#else
- return 0;
+ return 0;
#endif
#pragma warning(pop)
}
- static int MIR_SYSCALL Format(LPWSTR pszBuffer, size_t nLength, _Printf_format_string_ LPCWSTR pszFormat, va_list args)
+ static int MIR_SYSCALL Format(wchar_t *pszBuffer, size_t nLength, _Printf_format_string_ const wchar_t *pszFormat, va_list args)
{
#pragma warning(push)
#pragma warning(disable : 4996)
#ifdef _MSC_VER
- return _vsnwprintf(pszBuffer, nLength, pszFormat, args);
+ return _vsnwprintf(pszBuffer, nLength, pszFormat, args);
#else
- return 0;
+ return 0;
#endif
#pragma warning(pop)
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCSTR pszSrc)
+ static int MIR_SYSCALL GetBaseTypeLength(const char *pszSrc)
{
// Returns required buffer size in wchar_ts
#ifdef _MSC_VER
- return ::MultiByteToWideChar(CP_ACP, 0, pszSrc, -1, nullptr, 0)-1;
+ return ::MultiByteToWideChar(CP_ACP, 0, pszSrc, -1, nullptr, 0)-1;
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCSTR pszSrc, int nLength)
+ static int MIR_SYSCALL GetBaseTypeLength(const char *pszSrc, int nLength)
{
// Returns required buffer size in wchar_ts
#ifdef _MSC_VER
- return ::MultiByteToWideChar(CP_ACP, 0, pszSrc, nLength, nullptr, 0);
+ return ::MultiByteToWideChar(CP_ACP, 0, pszSrc, nLength, nullptr, 0);
#else
- return 0;
+ return 0;
#endif
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCWSTR pszSrc)
+ static int MIR_SYSCALL GetBaseTypeLength(const wchar_t *pszSrc)
{
// Returns required buffer size in wchar_ts
return (int)wcslen(pszSrc);
}
- static int MIR_SYSCALL GetBaseTypeLength(LPCWSTR pszSrc, int nLength)
+ static int MIR_SYSCALL GetBaseTypeLength(const wchar_t *pszSrc, int nLength)
{
(void)pszSrc;
// Returns required buffer size in wchar_ts
return nLength;
}
- static void MIR_SYSCALL ConvertToBaseType(LPWSTR pszDest, int nDestLength, LPCSTR pszSrc, int nSrcLength = -1)
+ static void MIR_SYSCALL ConvertToBaseType(wchar_t *pszDest, int nDestLength, const char *pszSrc, int nSrcLength = -1)
{
// nLen is in wchar_ts
#ifdef _MSC_VER
- ::MultiByteToWideChar(CP_ACP, 0, pszSrc, nSrcLength, pszDest, nDestLength);
+ ::MultiByteToWideChar(CP_ACP, 0, pszSrc, nSrcLength, pszDest, nDestLength);
#endif
}
- static void MIR_SYSCALL ConvertToBaseType(LPWSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
+ static void MIR_SYSCALL ConvertToBaseType(wchar_t *pszDest, int nDestLength, const wchar_t *pszSrc, int nSrcLength = -1)
{
if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in wchar_ts
@@ -737,7 +819,7 @@ public:
#endif
}
- static void MIR_SYSCALL FloodCharacters(wchar_t ch, int nLength, LPWSTR psz)
+ static void MIR_SYSCALL FloodCharacters(wchar_t ch, int nLength, wchar_t *psz)
{
// nLength is in XCHARs
for (int i = 0; i < nLength; i++)
@@ -746,13 +828,13 @@ public:
}
}
- static int MIR_SYSCALL SafeStringLen(LPCSTR psz)
+ static int MIR_SYSCALL SafeStringLen(const char *psz)
{
// returns length in bytes
return (psz != nullptr) ? (int)strlen(psz) : 0;
}
- static int MIR_SYSCALL SafeStringLen(LPCWSTR psz)
+ static int MIR_SYSCALL SafeStringLen(const wchar_t *psz)
{
// returns length in wchar_ts
return (psz != nullptr) ? (int)wcslen(psz) : 0;
@@ -769,34 +851,34 @@ public:
{
// returns char length
#ifdef _MSC_VER
- return (int)(_mbclen(reinterpret_cast< const unsigned char* >(pch)));
+ return (int)(_mbclen(reinterpret_cast< const unsigned char* >(pch)));
#else
- return mblen(pch, strlen(pch));
+ return mblen(pch, strlen(pch));
#endif
}
- static DWORD MIR_SYSCALL GetEnvironmentVariable(LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize)
+ static uint32_t MIR_SYSCALL GetEnvironmentVariable(const wchar_t *pszVar, wchar_t *pszBuffer, uint32_t dwSize)
{
return _GetEnvironmentVariableW(pszVar, pszBuffer, dwSize);
}
- static void MIR_SYSCALL ConvertToOem(LPWSTR /*psz*/)
+ static void MIR_SYSCALL ConvertToOem(wchar_t* /*psz*/)
{
}
- static void MIR_SYSCALL ConvertToAnsi(LPWSTR /*psz*/)
+ static void MIR_SYSCALL ConvertToAnsi(wchar_t* /*psz*/)
{
}
- static void MIR_SYSCALL ConvertToOem(LPWSTR /*psz*/, size_t)
+ static void MIR_SYSCALL ConvertToOem(wchar_t* /*psz*/, size_t)
{
}
- static void MIR_SYSCALL ConvertToAnsi(LPWSTR /*psz*/, size_t)
+ static void MIR_SYSCALL ConvertToAnsi(wchar_t* /*psz*/, size_t)
{
}
- static LPWSTR MirCopy(LPCWSTR pstrString, size_t size)
+ static wchar_t* MirCopy(const wchar_t *pstrString, size_t size)
{
return mir_wstrndup(pstrString, size);
}
diff --git a/include/m_string.inl b/include/m_string.inl
index 6a4ec0f35b..18498889ee 100644
--- a/include/m_string.inl
+++ b/include/m_string.inl
@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_STRING_INL__
+#include <algorithm>
+
template<typename BaseType>
CMSimpleStringT<BaseType>::CMSimpleStringT()
{
@@ -851,7 +853,7 @@ int CMStringT<BaseType, StringTraits>::Replace(PCXSTR pszOld, PCXSTR pszNew)
int nOldLength = this->GetLength();
int nNewLength = nOldLength + (nReplacementLen - nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer(__max(nNewLength, nOldLength));
+ PXSTR pszBuffer = this->GetBuffer(std::max(nNewLength, nOldLength));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart + nOldLength;
@@ -1341,7 +1343,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra
va_start(argList, pszFormat);
FormatV(pszFormat, argList);
va_end(argList);
- return GetString();
+ return this->GetString();
}
// Append formatted data using format string 'pszFormat'
@@ -1352,7 +1354,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra
va_start(argList, pszFormat);
AppendFormatV(pszFormat, argList);
va_end(argList);
- return GetString();
+ return this->GetString();
}
template< typename BaseType, class StringTraits >
@@ -1372,7 +1374,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra
PXSTR pszBuffer = this->GetBuffer(nLength);
StringTraits::Format(pszBuffer, nLength + 1, pszFormat, args);
this->ReleaseBufferSetLength(nLength);
- return GetString();
+ return this->GetString();
}
// Set the string to the value of environment variable 'pszVar'
@@ -1398,7 +1400,7 @@ BOOL CMStringT<BaseType, StringTraits>::GetEnvironmentVariable(PCXSTR pszVar)
template< typename BaseType, class StringTraits >
typename CMStringT<BaseType, StringTraits>::PXSTR CMStringT<BaseType, StringTraits>::Detach() const
{
- return StringTraits::MirCopy(CMStringT<BaseType, StringTraits>::GetString(), GetLength());
+ return StringTraits::MirCopy(CMStringT<BaseType, StringTraits>::GetString(), this->GetLength());
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/mir_core.mk b/src/mir_core/mir_core.mk
new file mode 100644
index 0000000000..f10daa841a
--- /dev/null
+++ b/src/mir_core/mir_core.mk
@@ -0,0 +1,248 @@
+##
+## Auto Generated makefile by CodeLite IDE
+## any manual changes will be erased
+##
+## Release
+ProjectName :=mir_core
+ConfigurationName :=Release
+WorkspaceConfiguration := $(ConfigurationName)
+WorkspacePath :=/home/ghazan/miranda-ng/codelite
+ProjectPath :=/var/www/miranda-ng/src/mir_core
+IntermediateDirectory :=../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core
+OutDir :=../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core
+CurrentFileName :=
+CurrentFilePath :=
+CurrentFileFullPath :=
+User :=George Hazan
+Date :=14/11/21
+CodeLitePath :=/home/ghazan/.codelite
+LinkerName :=g++
+SharedObjectLinkerName :=g++ -shared -fPIC
+ObjectSuffix :=.o
+DependSuffix :=.o.d
+PreprocessSuffix :=.o.i
+DebugSwitch :=-gstab
+IncludeSwitch :=-I
+LibrarySwitch :=-l
+OutputSwitch :=-o
+LibraryPathSwitch :=-L
+PreprocessorSwitch :=-D
+SourceSwitch :=-c
+OutputFile :=../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/lib/$(ProjectName)
+Preprocessors :=
+ObjectSwitch :=-o
+ArchiveOutputSwitch :=
+PreprocessOnlySwitch :=-E
+ObjectsFileList :=$(IntermediateDirectory)/ObjectsList.txt
+PCHCompileFlags :=
+LinkOptions := $(shell wx-config --debug=no --libs --unicode=yes)
+IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../../include
+IncludePCH :=
+RcIncludePath :=
+Libs :=
+ArLibs :=
+LibPath := $(LibraryPathSwitch).
+
+##
+## Common variables
+## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
+##
+AR := ar rcus
+CXX := g++
+CC := gcc
+CXXFLAGS := -O2 $(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC $(Preprocessors)
+CFLAGS := -O2 $(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC $(Preprocessors)
+ASFLAGS :=
+AS := as
+
+
+##
+## User defined environment variables
+##
+CodeLiteDir:=/usr/share/codelite
+Objects0=../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(ObjectSuffix) \
+ ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(ObjectSuffix) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(ObjectSuffix)
+
+
+
+Objects=$(Objects0)
+
+##
+## Main Build Targets
+##
+.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs
+all: MakeIntermediateDirs $(OutputFile)
+
+$(OutputFile): ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/.d $(Objects)
+ @mkdir -p "../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core"
+ @echo "" > $(IntermediateDirectory)/.d
+ @echo $(Objects0) > $(ObjectsFileList)
+ $(SharedObjectLinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)
+ @echo rebuilt > $(IntermediateDirectory)/mir_core.relink
+
+MakeIntermediateDirs:
+ @mkdir -p "../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core"
+ @mkdir -p ""../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/lib""
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/.d:
+ @mkdir -p "../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core"
+
+PreBuild:
+
+
+##
+## Objects
+##
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(ObjectSuffix): src/Linux/strutil.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/Linux/strutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(DependSuffix): src/Linux/strutil.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(DependSuffix) -MM src/Linux/strutil.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(PreprocessSuffix): src/Linux/strutil.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_strutil.cpp$(PreprocessSuffix) src/Linux/strutil.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(ObjectSuffix): src/utils.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/utils.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(DependSuffix): src/utils.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(DependSuffix) -MM src/utils.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(PreprocessSuffix): src/utils.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utils.cpp$(PreprocessSuffix) src/utils.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(ObjectSuffix): src/utf.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/utf.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(DependSuffix): src/utf.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(DependSuffix) -MM src/utf.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(PreprocessSuffix): src/utf.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_utf.cpp$(PreprocessSuffix) src/utf.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(ObjectSuffix): src/tinyxml2_utils.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/tinyxml2_utils.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_tinyxml2_utils.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(DependSuffix): src/tinyxml2_utils.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(DependSuffix) -MM src/tinyxml2_utils.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(PreprocessSuffix): src/tinyxml2_utils.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2_utils.cpp$(PreprocessSuffix) src/tinyxml2_utils.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(ObjectSuffix): src/Linux/fileutil.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/Linux/fileutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(DependSuffix): src/Linux/fileutil.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(DependSuffix) -MM src/Linux/fileutil.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(PreprocessSuffix): src/Linux/fileutil.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_Linux_fileutil.cpp$(PreprocessSuffix) src/Linux/fileutil.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(ObjectSuffix): src/bitmaps.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/bitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(DependSuffix): src/bitmaps.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(DependSuffix) -MM src/bitmaps.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(PreprocessSuffix): src/bitmaps.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_bitmaps.cpp$(PreprocessSuffix) src/bitmaps.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(ObjectSuffix): src/db.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/db.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_db.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(DependSuffix): src/db.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(DependSuffix) -MM src/db.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(PreprocessSuffix): src/db.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_db.cpp$(PreprocessSuffix) src/db.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(ObjectSuffix): src/http.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/http.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_http.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(DependSuffix): src/http.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(DependSuffix) -MM src/http.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(PreprocessSuffix): src/http.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_http.cpp$(PreprocessSuffix) src/http.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(ObjectSuffix): src/binbuffer.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/binbuffer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(DependSuffix): src/binbuffer.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(DependSuffix) -MM src/binbuffer.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(PreprocessSuffix): src/binbuffer.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_binbuffer.cpp$(PreprocessSuffix) src/binbuffer.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(ObjectSuffix): src/logger.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/logger.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(DependSuffix): src/logger.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(DependSuffix) -MM src/logger.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(PreprocessSuffix): src/logger.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_logger.cpp$(PreprocessSuffix) src/logger.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(ObjectSuffix): src/mstring.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/mstring.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(DependSuffix): src/mstring.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(DependSuffix) -MM src/mstring.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(PreprocessSuffix): src/mstring.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_mstring.cpp$(PreprocessSuffix) src/mstring.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(ObjectSuffix): src/sha256.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/sha256.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(DependSuffix): src/sha256.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(DependSuffix) -MM src/sha256.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(PreprocessSuffix): src/sha256.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha256.cpp$(PreprocessSuffix) src/sha256.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(ObjectSuffix): src/md5.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/md5.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(DependSuffix): src/md5.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(DependSuffix) -MM src/md5.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(PreprocessSuffix): src/md5.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_md5.cpp$(PreprocessSuffix) src/md5.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(ObjectSuffix): src/tinyxml2.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/tinyxml2.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(DependSuffix): src/tinyxml2.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(DependSuffix) -MM src/tinyxml2.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(PreprocessSuffix): src/tinyxml2.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_tinyxml2.cpp$(PreprocessSuffix) src/tinyxml2.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(ObjectSuffix): src/lists.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/lists.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(DependSuffix): src/lists.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(DependSuffix) -MM src/lists.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(PreprocessSuffix): src/lists.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_lists.cpp$(PreprocessSuffix) src/lists.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(ObjectSuffix): src/memory.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/memory.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_memory.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(DependSuffix): src/memory.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(DependSuffix) -MM src/memory.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(PreprocessSuffix): src/memory.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_memory.cpp$(PreprocessSuffix) src/memory.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(ObjectSuffix): src/stdafx.cxx ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/stdafx.cxx" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(DependSuffix): src/stdafx.cxx
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(DependSuffix) -MM src/stdafx.cxx
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(PreprocessSuffix): src/stdafx.cxx
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_stdafx.cxx$(PreprocessSuffix) src/stdafx.cxx
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(ObjectSuffix): src/sha1.cpp ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/var/www/miranda-ng/src/mir_core/src/sha1.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_sha1.cpp$(ObjectSuffix) $(IncludePath)
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(DependSuffix): src/sha1.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(ObjectSuffix) -MF../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(DependSuffix) -MM src/sha1.cpp
+
+../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(PreprocessSuffix): src/sha1.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core/src_sha1.cpp$(PreprocessSuffix) src/sha1.cpp
+
+
+-include ../../../../../home/ghazan/miranda-ng/codelite/build-$(ConfigurationName)/__/__/__/__/var/www/miranda-ng/src/mir_core//*$(DependSuffix)
+##
+## Clean
+##
+clean:
+ $(RM) -r $(IntermediateDirectory)
+
+
diff --git a/src/mir_core/mir_core.project b/src/mir_core/mir_core.project
index c1d63835cf..cc337c96f0 100644
--- a/src/mir_core/mir_core.project
+++ b/src/mir_core/mir_core.project
@@ -2,6 +2,31 @@
<CodeLite_Project Name="mir_core" Version="11000" InternalType="Library">
<Description/>
<Dependencies/>
+ <VirtualDirectory Name="src">
+ <File Name="src/Linux/strutil.cpp"/>
+ <File Name="src/Linux/fileutil.cpp"/>
+ <File Name="src/utils.cpp"/>
+ <File Name="src/utf.cpp"/>
+ <File Name="src/tinyxml2_utils.cpp"/>
+ <File Name="src/tinyxml2.cpp"/>
+ <File Name="src/stdafx.cxx"/>
+ <File Name="src/sha256.cpp"/>
+ <File Name="src/sha1.cpp"/>
+ <File Name="src/mstring.cpp"/>
+ <File Name="src/memory.cpp"/>
+ <File Name="src/md5.cpp"/>
+ <File Name="src/logger.cpp"/>
+ <File Name="src/lists.cpp"/>
+ <File Name="src/http.cpp"/>
+ <File Name="src/db.cpp"/>
+ <File Name="src/bitmaps.cpp"/>
+ <File Name="src/binbuffer.cpp"/>
+ </VirtualDirectory>
+ <VirtualDirectory Name="include">
+ <File Name="src/stdafx.h"/>
+ <File Name="src/tinyxml2.h"/>
+ <File Name="src/miranda.h"/>
+ </VirtualDirectory>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -13,12 +38,13 @@
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes)" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes)" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes) -fPIC" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
+ <IncludePath Value="../../include"/>
</Compiler>
<Linker Options="$(shell wx-config --libs --unicode=yes)" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(ProjectName)" IntermediateDirectory="" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
+ <General OutputFile="$(ProjectName)" IntermediateDirectory="$(WorkspacePath)/obj/debug/$(ProjectName)" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<BuildSystem Name="CodeLite Make Generator"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
@@ -52,12 +78,13 @@
</Completion>
</Configuration>
<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes)" C_Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes)" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Compiler Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC" C_Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
+ <IncludePath Value="../../include"/>
</Compiler>
<Linker Options="$(shell wx-config --debug=no --libs --unicode=yes);" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(ProjectName)" IntermediateDirectory="" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
+ <General OutputFile="$(ProjectName)" IntermediateDirectory="$(WorkspacePath)/obj/debug/$(ProjectName)" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<BuildSystem Name="CodeLite Make Generator"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
@@ -91,6 +118,4 @@
</Completion>
</Configuration>
</Settings>
- <VirtualDirectory Name="src"/>
- <VirtualDirectory Name="include"/>
</CodeLite_Project>
diff --git a/src/mir_core/src/Linux/strutil.cpp b/src/mir_core/src/Linux/strutil.cpp
new file mode 100644
index 0000000000..abd891f030
--- /dev/null
+++ b/src/mir_core/src/Linux/strutil.cpp
@@ -0,0 +1,48 @@
+/*
+Copyright (C) 2012-21 Miranda NG team (https://miranda-ng.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2
+of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "../stdafx.h"
+
+MIR_CORE_DLL(char*) strlwr(char *str)
+{
+ for (char *p = str; *p; p++)
+ *p = tolower(*p);
+
+ return str;
+}
+
+MIR_CORE_DLL(char*) strupr(char *str)
+{
+ for (char *p = str; *p; p++)
+ *p = toupper(*p);
+
+ return str;
+}
+
+MIR_CORE_DLL(char*) strrev(char *str)
+{
+ if (!str || !*str)
+ return str;
+
+ char *p1, *p2;
+ for (p1 = str, p2 = str + strlen(str) - 1; p2 > p1; ++p1, --p2) {
+ *p1 ^= *p2;
+ *p2 ^= *p1;
+ *p1 ^= *p2;
+ }
+ return str;
+}
diff --git a/src/mir_core/src/utils.cpp b/src/mir_core/src/utils.cpp
index 26f6c2970b..4e13c82d72 100644
--- a/src/mir_core/src/utils.cpp
+++ b/src/mir_core/src/utils.cpp
@@ -532,21 +532,26 @@ MIR_CORE_DLL(const wchar_t*) mir_wstrstri(const wchar_t *s1, const wchar_t *s2)
/////////////////////////////////////////////////////////////////////////////////////////
-PGENRANDOM pfnRtlGenRandom;
+#ifdef _MSC_VER
+ PGENRANDOM pfnRtlGenRandom;
+#endif
MIR_CORE_DLL(void) Utils_GetRandom(void *pszDest, size_t cbLen)
{
if (pszDest == nullptr || cbLen == 0)
return;
- if (pfnRtlGenRandom != nullptr)
- pfnRtlGenRandom(pszDest, (uint32_t)cbLen);
- else {
- srand(time(0));
- BYTE *p = (BYTE*)pszDest;
- for (size_t i = 0; i < cbLen; i++)
- p[i] = rand() & 0xFF;
- }
+ #ifdef _MSC_VER
+ if (pfnRtlGenRandom != nullptr) {
+ pfnRtlGenRandom(pszDest, (uint32_t)cbLen);
+ return;
+ }
+ #endif
+
+ srand(time(0));
+ uint8_t *p = (uint8_t*)pszDest;
+ for (size_t i = 0; i < cbLen; i++)
+ p[i] = rand() & 0xFF;
}
MIR_CORE_DLL(bool) Utils_IsRtl(const wchar_t *pszwText)