From ef9e5821a695a9f875712c2d767360cce15c0f6b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 16 Jun 2015 10:43:55 +0000 Subject: unified project for mir_core git-svn-id: http://svn.miranda-ng.org/main/trunk@14194 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/mir_core.vcxproj | 39 +++++ src/mir_core/mir_core.vcxproj.filters | 4 + src/mir_core/mir_core_10.vcxproj | 266 ------------------------------ src/mir_core/mir_core_10.vcxproj.filters | 117 ------------- src/mir_core/mir_core_12.vcxproj | 275 ------------------------------- src/mir_core/mir_core_12.vcxproj.filters | 129 --------------- src/mir_core/src/bitmaps.cpp | 2 +- src/mir_core/src/cmdline.cpp | 2 +- src/mir_core/src/commonheaders.h | 70 -------- src/mir_core/src/db.cpp | 2 +- src/mir_core/src/http.cpp | 2 +- src/mir_core/src/icons.cpp | 4 +- src/mir_core/src/langpack.cpp | 9 +- src/mir_core/src/lists.cpp | 4 +- src/mir_core/src/logger.cpp | 2 +- src/mir_core/src/mc.cpp | 2 +- src/mir_core/src/md5.cpp | 2 +- src/mir_core/src/memory.cpp | 2 +- src/mir_core/src/miranda.cpp | 4 +- src/mir_core/src/miranda.h | 46 ------ src/mir_core/src/modules.cpp | 92 +++++------ src/mir_core/src/mstring.cpp | 2 +- src/mir_core/src/path.cpp | 2 +- src/mir_core/src/protos.cpp | 62 +++---- src/mir_core/src/sha1.cpp | 2 +- src/mir_core/src/stdafx.cpp | 18 -- src/mir_core/src/stdafx.cxx | 18 ++ src/mir_core/src/stdafx.h | 70 ++++++++ src/mir_core/src/subclass.cpp | 4 +- src/mir_core/src/threads.cpp | 2 +- src/mir_core/src/ui_utils.cpp | 5 +- src/mir_core/src/utf.cpp | 2 +- src/mir_core/src/utils.cpp | 2 +- src/mir_core/src/windowlist.cpp | 2 +- src/mir_core/src/winver.cpp | 2 +- 35 files changed, 236 insertions(+), 1032 deletions(-) create mode 100644 src/mir_core/mir_core.vcxproj create mode 100644 src/mir_core/mir_core.vcxproj.filters delete mode 100644 src/mir_core/mir_core_10.vcxproj delete mode 100644 src/mir_core/mir_core_10.vcxproj.filters delete mode 100644 src/mir_core/mir_core_12.vcxproj delete mode 100644 src/mir_core/mir_core_12.vcxproj.filters delete mode 100644 src/mir_core/src/commonheaders.h delete mode 100644 src/mir_core/src/stdafx.cpp create mode 100644 src/mir_core/src/stdafx.cxx create mode 100644 src/mir_core/src/stdafx.h (limited to 'src/mir_core') diff --git a/src/mir_core/mir_core.vcxproj b/src/mir_core/mir_core.vcxproj new file mode 100644 index 0000000000..1f8eb08940 --- /dev/null +++ b/src/mir_core/mir_core.vcxproj @@ -0,0 +1,39 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + mir_core + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + + + + + + + MIR_CORE_EXPORTS;DEBUG;%(PreprocessorDefinitions) + MIR_CORE_EXPORTS;NDEBUG;%(PreprocessorDefinitions) + + + /ignore:4197 %(AdditionalOptions) + src/mir_core.def + src/mir_core64.def + + + \ No newline at end of file diff --git a/src/mir_core/mir_core.vcxproj.filters b/src/mir_core/mir_core.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/src/mir_core/mir_core.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/mir_core/mir_core_10.vcxproj b/src/mir_core/mir_core_10.vcxproj deleted file mode 100644 index e47163cce5..0000000000 --- a/src/mir_core/mir_core_10.vcxproj +++ /dev/null @@ -1,266 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - mir_core - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - - - - DynamicLibrary - true - Unicode - - - DynamicLibrary - Unicode - - - DynamicLibrary - true - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - true - Level3 - EditAndContinue - 4996;%(DisableSpecificWarnings) - _DEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core.def - true - false - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - $(IntDir)$(TargetName).lib - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - - - - - - - - - ..\..\build\make_ver.bat - - - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - true - Level3 - 4996;%(DisableSpecificWarnings) - _DEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core64.def - true - false - $(IntDir)$(TargetName)64.lib - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - ..\..\build\make_ver.bat - - - - - Full - OnlyExplicitInline - Size - ..\..\include;%(AdditionalIncludeDirectories) - true - true - Level3 - 4996;%(DisableSpecificWarnings) - NDEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core.def - true - true - true - false - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% /ignore:4197 - mir_app.dll - - - - - - - - - - - ..\..\build\make_ver.bat - - - - - Full - OnlyExplicitInline - Size - ..\..\include;%(AdditionalIncludeDirectories) - true - true - Level3 - 4996;%(DisableSpecificWarnings) - NDEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core64.def - true - true - true - false - $(IntDir)$(TargetName)64.lib - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% /ignore:4197 - mir_app.dll - - - ..\..\build\make_ver.bat - - - - - - \ No newline at end of file diff --git a/src/mir_core/mir_core_10.vcxproj.filters b/src/mir_core/mir_core_10.vcxproj.filters deleted file mode 100644 index 3511b23f6a..0000000000 --- a/src/mir_core/mir_core_10.vcxproj.filters +++ /dev/null @@ -1,117 +0,0 @@ - - - - - {bf74d1c9-acd8-4fba-837d-734f024521c9} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a578a180-0eb9-4c3e-b4ae-0eaefa01d207} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Header Files - - - \ No newline at end of file diff --git a/src/mir_core/mir_core_12.vcxproj b/src/mir_core/mir_core_12.vcxproj deleted file mode 100644 index 3ae8658e84..0000000000 --- a/src/mir_core/mir_core_12.vcxproj +++ /dev/null @@ -1,275 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - mir_core - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - - - - DynamicLibrary - true - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - true - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - true - Level3 - EditAndContinue - 4996;%(DisableSpecificWarnings) - _DEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core.def - true - false - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - $(IntDir)$(TargetName).lib - false - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - - - - - - - - - ..\..\build\make_ver.bat - - - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - true - Level3 - 4996;%(DisableSpecificWarnings) - _DEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core64.def - true - false - $(IntDir)$(TargetName)64.lib - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - ..\..\build\make_ver.bat - - - - - Full - OnlyExplicitInline - Size - ..\..\include;%(AdditionalIncludeDirectories) - true - true - Level3 - 4996;%(DisableSpecificWarnings) - NDEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core.def - true - true - true - false - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - $(IntDir)$(TargetName).lib - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - - - - - - - - - ..\..\build\make_ver.bat - - - - - Full - OnlyExplicitInline - Size - ..\..\include;%(AdditionalIncludeDirectories) - true - true - Level3 - 4996;%(DisableSpecificWarnings) - NDEBUG;_WINDOWS;MIR_CORE_EXPORTS;_USRDLL;%(PreprocessorDefinitions) - Use - commonheaders.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - src\mir_core64.def - true - true - true - false - $(IntDir)$(TargetName)64.lib - Windows - ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - /ignore:4197 %(AdditionalOptions) - mir_app.dll - - - ..\..\build\make_ver.bat - - - - - - \ No newline at end of file diff --git a/src/mir_core/mir_core_12.vcxproj.filters b/src/mir_core/mir_core_12.vcxproj.filters deleted file mode 100644 index 956b314f32..0000000000 --- a/src/mir_core/mir_core_12.vcxproj.filters +++ /dev/null @@ -1,129 +0,0 @@ - - - - - {bf74d1c9-acd8-4fba-837d-734f024521c9} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a578a180-0eb9-4c3e-b4ae-0eaefa01d207} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Source Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Header Files - - - \ No newline at end of file diff --git a/src/mir_core/src/bitmaps.cpp b/src/mir_core/src/bitmaps.cpp index 8223a912b6..836f6b94d5 100644 --- a/src/mir_core/src/bitmaps.cpp +++ b/src/mir_core/src/bitmaps.cpp @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #include diff --git a/src/mir_core/src/cmdline.cpp b/src/mir_core/src/cmdline.cpp index 60b5bba754..ae883010ef 100644 --- a/src/mir_core/src/cmdline.cpp +++ b/src/mir_core/src/cmdline.cpp @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /* command line support */ diff --git a/src/mir_core/src/commonheaders.h b/src/mir_core/src/commonheaders.h deleted file mode 100644 index 7bc862bfa0..0000000000 --- a/src/mir_core/src/commonheaders.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org), -Copyright (c) 2000-12 Miranda IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#define INCL_WINSOCK_API_TYPEDEFS 1 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "miranda.h" - -#include -#include - -#include - -void GetDefaultLang(); \ No newline at end of file diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp index 6fd3aa39af..9cc68a5995 100644 --- a/src/mir_core/src/db.cpp +++ b/src/mir_core/src/db.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" MIDatabase *currDb = NULL; diff --git a/src/mir_core/src/http.cpp b/src/mir_core/src/http.cpp index 54b986b7fd..9209572669 100644 --- a/src/mir_core/src/http.cpp +++ b/src/mir_core/src/http.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "commonheaders.h" +#include "stdafx.h" ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/mir_core/src/icons.cpp b/src/mir_core/src/icons.cpp index cd85f31b06..928bf99fa0 100644 --- a/src/mir_core/src/icons.cpp +++ b/src/mir_core/src/icons.cpp @@ -21,9 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" - -#include +#include "stdafx.h" MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char *szSection, IconItem *pIcons, size_t iCount, char *prefix, int hLangpack) { diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 062233e256..1f9ada0823 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -22,7 +22,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" + #include "../../mir_app/src/langpack.h" #define LANGPACK_BUF_SIZE 4000 @@ -454,7 +455,7 @@ static int SortLangPackHashesProc2(LangPackEntry *arg1, LangPackEntry *arg2) return 0; } -static char *LangPackTranslateString(MUUID *pUuid, const char *szEnglish, const int W) +char* LangPackTranslateString(MUUID *pUuid, const char *szEnglish, const int W) { if (g_entryCount == 0 || szEnglish == NULL) return (char*)szEnglish; @@ -562,11 +563,9 @@ struct LANGPACKTRANSLATEDIALOG static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd, LPARAM lParam) { int hLangpack = (int)lParam; - TCHAR szClass[32]; - int id = GetDlgCtrlID(hwnd); - MUUID *uuid = Langpack_LookupUuid(hLangpack); + TCHAR szClass[32]; GetClassName(hwnd, szClass, SIZEOF(szClass)); if (!mir_tstrcmpi(szClass, _T("static")) || !mir_tstrcmpi(szClass, _T("hyperlink")) || !mir_tstrcmpi(szClass, _T("button")) || !mir_tstrcmpi(szClass, _T("MButtonClass")) || !mir_tstrcmpi(szClass, _T("MHeaderbarCtrl"))) TranslateWindow(uuid, hwnd); diff --git a/src/mir_core/src/lists.cpp b/src/mir_core/src/lists.cpp index 507a35e31e..02d5d6c682 100644 --- a/src/mir_core/src/lists.cpp +++ b/src/mir_core/src/lists.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /* a simple sorted list implementation */ @@ -225,7 +225,7 @@ MIR_CORE_DLL(int) List_RemovePtr(SortedList* list, void* p) return idx; } -MIR_CORE_DLL(void) List_Copy(SortedList* s, SortedList* d, size_t itemSize) +MIR_CORE_DLL(void) List_Copy(SortedList* s, SortedList* d, size_t) { d->increment = s->increment; d->limit = s->limit; diff --git a/src/mir_core/src/logger.cpp b/src/mir_core/src/logger.cpp index 6cdaad3e11..06297553bf 100644 --- a/src/mir_core/src/logger.cpp +++ b/src/mir_core/src/logger.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define SECRET_SIGNATURE 0x87654321 diff --git a/src/mir_core/src/mc.cpp b/src/mir_core/src/mc.cpp index 6fef604f53..22e57ac52e 100644 --- a/src/mir_core/src/mc.cpp +++ b/src/mir_core/src/mc.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static HANDLE hEventDefaultChanged, hEventEnabled; static bool g_bEnabled; diff --git a/src/mir_core/src/md5.cpp b/src/mir_core/src/md5.cpp index eaf15e7cb0..817cd68b9a 100644 --- a/src/mir_core/src/md5.cpp +++ b/src/mir_core/src/md5.cpp @@ -53,7 +53,7 @@ // (C) 2005 Joe @ Whale - changed to compile with Miranda -#include "commonheaders.h" +#include "stdafx.h" #define T_MASK ((UINT32)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) diff --git a/src/mir_core/src/memory.cpp b/src/mir_core/src/memory.cpp index a60bfe43b5..9cf3d258eb 100644 --- a/src/mir_core/src/memory.cpp +++ b/src/mir_core/src/memory.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define BLOCK_ALLOCED 0xABBABABA #define BLOCK_FREED 0xDEADBEEF diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp index 776614fd80..64304598d0 100644 --- a/src/mir_core/src/miranda.cpp +++ b/src/mir_core/src/miranda.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" HWND hAPCWindow = NULL; @@ -112,7 +112,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void) ///////////////////////////////////////////////////////////////////////////////////////// // entry point -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) { if (fdwReason == DLL_PROCESS_ATTACH) { hInst = hinstDLL; diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h index 9cd924348c..e2da256eeb 100644 --- a/src/mir_core/src/miranda.h +++ b/src/mir_core/src/miranda.h @@ -91,52 +91,6 @@ extern LIST pluginListAddr; char* LangPackTranslateString(MUUID* pUuid, const char *szEnglish, const int W); TCHAR* LangPackTranslateStringT(int hLangpack, const TCHAR* tszEnglish); -/**** options.cpp **********************************************************************/ - -HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR *name); - -/**** subclass.cpp *********************************************************************/ - /**** threads.cpp **********************************************************************/ extern DWORD mir_tls; - -/**** utils.cpp ************************************************************************/ - -void HotkeyToName(TCHAR *buf, int size, BYTE shift, BYTE key); -WORD GetHotkeyValue(INT_PTR idHotkey); - -HBITMAP ConvertIconToBitmap(HICON hIcon, HIMAGELIST hIml, int iconId); - -class StrConvUT -{ -private: - wchar_t* m_body; - -public: - StrConvUT(const char* pSrc) : - m_body(mir_a2u(pSrc)) {} - - ~StrConvUT() { mir_free(m_body); } - operator const wchar_t* () const { return m_body; } -}; - -class StrConvAT -{ -private: - char* m_body; - -public: - StrConvAT(const wchar_t* pSrc) : - m_body(mir_u2a(pSrc)) {} - - ~StrConvAT() { mir_free(m_body); } - operator const char* () const { return m_body; } - operator const wchar_t* () const { return (wchar_t*)m_body; } // type cast to fake the interface definition - operator const LPARAM () const { return (LPARAM)m_body; } -}; - -#define StrConvT(x) StrConvUT(x) -#define StrConvTu(x) x -#define StrConvA(x) StrConvAT(x) -#define StrConvU(x) x diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp index d2c21ad90f..4a7df365b5 100644 --- a/src/mir_core/src/modules.cpp +++ b/src/mir_core/src/modules.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" // list of hooks @@ -70,7 +70,7 @@ typedef struct int result; const char *name; } - TServiceToMainThreadItem; +TServiceToMainThreadItem; // other static variables static BOOL bServiceMode = FALSE; @@ -92,7 +92,7 @@ __forceinline HANDLE getThreadEvent() static int QueueMainThread(PAPCFUNC pFunc, void* pParam, HANDLE hDoneEvent) { - int result = PostMessage(hAPCWindow, WM_USER+1, (WPARAM)pFunc, (LPARAM)pParam); // let this get processed in its own time + int result = PostMessage(hAPCWindow, WM_USER + 1, (WPARAM)pFunc, (LPARAM)pParam); // let this get processed in its own time if (hDoneEvent) WaitForSingleObject(hDoneEvent, INFINITE); @@ -113,8 +113,8 @@ MIR_CORE_DLL(HANDLE) CreateHookableEvent(const char *name) if ((idx = hooks.getIndex((THook*)name)) != -1) return hooks[idx]; - THook* newItem = (THook*)mir_alloc(sizeof(THook)); - strncpy(newItem->name, name, sizeof(newItem->name)); newItem->name[ MAXMODULELABELLENGTH-1 ] = 0; + THook *newItem = (THook*)mir_alloc(sizeof(THook)); + strncpy(newItem->name, name, sizeof(newItem->name)); newItem->name[MAXMODULELABELLENGTH - 1] = 0; newItem->id = hookId++; newItem->subscriberCount = 0; newItem->subscriber = NULL; @@ -136,7 +136,7 @@ MIR_CORE_DLL(int) DestroyHookableEvent(HANDLE hEvent) if ((idx = hooks.getIndex((THook*)hEvent)) == -1) return 1; - THook* p = hooks[idx]; + THook *p = hooks[idx]; p->secretSignature = 0; if (p->subscriberCount) { mir_free(p->subscriber); @@ -151,7 +151,7 @@ MIR_CORE_DLL(int) DestroyHookableEvent(HANDLE hEvent) MIR_CORE_DLL(int) SetHookDefaultForHookableEvent(HANDLE hEvent, MIRANDAHOOK pfnHook) { - THook* p = (THook*)hEvent; + THook *p = (THook*)hEvent; mir_cslock lck(csHooks); if (hooks.getIndex(p) != -1) @@ -161,7 +161,7 @@ MIR_CORE_DLL(int) SetHookDefaultForHookableEvent(HANDLE hEvent, MIRANDAHOOK pfnH MIR_CORE_DLL(int) CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM wParam, LPARAM lParam) { - THook* p = (THook*)hEvent; + THook *p = (THook*)hEvent; if (p == NULL || hInst == NULL) return -1; @@ -190,7 +190,7 @@ MIR_CORE_DLL(int) CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM wPa return 0; } -static int CallHookSubscribers(THook* p, WPARAM wParam, LPARAM lParam) +static int CallHookSubscribers(THook *p, WPARAM wParam, LPARAM lParam) { if (p == NULL) return -1; @@ -223,14 +223,13 @@ static int CallHookSubscribers(THook* p, WPARAM wParam, LPARAM lParam) enum { hookOk, hookEmpty, hookInvalid }; -__forceinline int checkHook(THook* p) +int checkHook(THook *p) { if (p == NULL) return hookInvalid; int ret; - __try - { + __try { if (p->secretSignature != HOOK_SECRET_SIGNATURE) ret = hookInvalid; else if (p->subscriberCount == 0 && p->pfnHook == NULL) @@ -238,7 +237,7 @@ __forceinline int checkHook(THook* p) else ret = hookOk; } - __except(EXCEPTION_EXECUTE_HANDLER) + __except (EXCEPTION_EXECUTE_HANDLER) { ret = hookInvalid; } @@ -255,12 +254,12 @@ static void CALLBACK HookToMainAPCFunc(ULONG_PTR dwParam) MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam) { - switch ( checkHook((THook*)hEvent)) { + switch (checkHook((THook*)hEvent)) { case hookInvalid: return -1; case hookEmpty: return 0; } - if ( GetCurrentThreadId() == mainThreadId) + if (GetCurrentThreadId() == mainThreadId) return CallHookSubscribers((THook*)hEvent, wParam, lParam); THookToMainThreadItem item; @@ -274,7 +273,7 @@ MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam) MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam, LPARAM lParam) { - switch ( checkHook((THook*)hEvent)) { + switch (checkHook((THook*)hEvent)) { case hookInvalid: return -1; case hookEmpty: return 0; } @@ -284,7 +283,7 @@ MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam, LPARAM lParam) extern "C" MIR_CORE_DLL(int) GetSubscribersCount(THook* pHook) { - switch ( checkHook(pHook)) { + switch (checkHook(pHook)) { case hookInvalid: case hookEmpty: return 0; } @@ -341,11 +340,11 @@ MIR_CORE_DLL(HANDLE) HookEventMessage(const char *name, HWND hwnd, UINT message) if ((idx = hooks.getIndex((THook*)name)) == -1) return NULL; - THook* p = hooks[ idx ]; - p->subscriber = (THookSubscriber*)mir_realloc(p->subscriber, sizeof(THookSubscriber)*(p->subscriberCount+1)); - p->subscriber[ p->subscriberCount ].type = 5; - p->subscriber[ p->subscriberCount ].hwnd = hwnd; - p->subscriber[ p->subscriberCount ].message = message; + THook *p = hooks[idx]; + p->subscriber = (THookSubscriber*)mir_realloc(p->subscriber, sizeof(THookSubscriber)*(p->subscriberCount + 1)); + p->subscriber[p->subscriberCount].type = 5; + p->subscriber[p->subscriberCount].hwnd = hwnd; + p->subscriber[p->subscriberCount].message = message; p->subscriberCount++; return (HANDLE)((p->id << 16) | p->subscriberCount); } @@ -360,7 +359,7 @@ MIR_CORE_DLL(int) UnhookEvent(HANDLE hHook) mir_cslock lck(csHooks); - THook* p = NULL; + THook *p = NULL; for (int i = 0; i < hooks.getCount(); i++) if (hooks[i]->id == hookId) { p = hooks[i]; @@ -373,10 +372,10 @@ MIR_CORE_DLL(int) UnhookEvent(HANDLE hHook) if (subscriberId >= p->subscriberCount || subscriberId < 0) return 1; - p->subscriber[subscriberId].type = 0; + p->subscriber[subscriberId].type = 0; p->subscriber[subscriberId].pfnHook = NULL; - p->subscriber[subscriberId].hOwner = NULL; - while (p->subscriberCount && p->subscriber[p->subscriberCount-1].type == 0) + p->subscriber[subscriberId].hOwner = NULL; + while (p->subscriberCount && p->subscriber[p->subscriberCount - 1].type == 0) p->subscriberCount--; if (p->subscriberCount == 0) { mir_free(p->subscriber); @@ -389,15 +388,15 @@ MIR_CORE_DLL(void) KillModuleEventHooks(HINSTANCE hInst) { mir_cslock lck(csHooks); - for (int i = hooks.getCount()-1; i >= 0; i--) { + for (int i = hooks.getCount() - 1; i >= 0; i--) { if (hooks[i]->subscriberCount == 0) continue; - for (int j = hooks[i]->subscriberCount-1; j >= 0; j--) { + for (int j = hooks[i]->subscriberCount - 1; j >= 0; j--) { if (hooks[i]->subscriber[j].hOwner != hInst) continue; - char szModuleName[ MAX_PATH ]; + char szModuleName[MAX_PATH]; GetModuleFileNameA(hooks[i]->subscriber[j].hOwner, szModuleName, sizeof(szModuleName)); UnhookEvent((HANDLE)((hooks[i]->id << 16) + j + 1)); if (hooks[i]->subscriberCount == 0) @@ -410,11 +409,11 @@ MIR_CORE_DLL(void) KillObjectEventHooks(void* pObject) { mir_cslock lck(csHooks); - for (int i = hooks.getCount()-1; i >= 0; i--) { + for (int i = hooks.getCount() - 1; i >= 0; i--) { if (hooks[i]->subscriberCount == 0) continue; - for (int j = hooks[i]->subscriberCount-1; j >= 0; j--) { + for (int j = hooks[i]->subscriberCount - 1; j >= 0; j--) { if (hooks[i]->subscriber[j].object == pObject) { UnhookEvent((HANDLE)((hooks[i]->id << 16) + j + 1)); if (hooks[i]->subscriberCount == 0) @@ -428,8 +427,8 @@ static void DestroyHooks() { mir_cslock lck(csHooks); - for (int i=0; i < hooks.getCount(); i++) { - THook* p = hooks[i]; + for (int i = 0; i < hooks.getCount(); i++) { + THook *p = hooks[i]; if (p->subscriberCount) mir_free(p->subscriber); DeleteCriticalSection(&p->csHook); @@ -460,12 +459,12 @@ static HANDLE CreateServiceInt(int type, const char *name, MIRANDASERVICE servic TService* p = (TService*)mir_alloc(sizeof(*p) + strlen(name)); strcpy(p->name, name); - p->nameHash = tmp.nameHash; + p->nameHash = tmp.nameHash; p->pfnService = serviceProc; - p->hOwner = GetInstByAddress(serviceProc); - p->flags = type; - p->lParam = lParam; - p->object = object; + p->hOwner = GetInstByAddress(serviceProc); + p->flags = type; + p->lParam = lParam; + p->object = object; services.insert(p); return (HANDLE)tmp.nameHash; @@ -537,16 +536,17 @@ MIR_CORE_DLL(INT_PTR) CallService(const char *name, WPARAM wParam, LPARAM lParam int flags = pService->flags; LPARAM fnParam = pService->lParam; void* object = pService->object; - switch(flags) { + switch (flags) { case 1: return ((MIRANDASERVICEPARAM)pfnService)(wParam, lParam, fnParam); case 2: return ((MIRANDASERVICEOBJ)pfnService)(object, wParam, lParam); case 3: return ((MIRANDASERVICEOBJPARAM)pfnService)(object, wParam, lParam, fnParam); default: return pfnService(wParam, lParam); -} } + } +} static void CALLBACK CallServiceToMainAPCFunc(ULONG_PTR dwParam) { - TServiceToMainThreadItem *item = (TServiceToMainThreadItem*) dwParam; + TServiceToMainThreadItem *item = (TServiceToMainThreadItem*)dwParam; item->result = CallService(item->name, item->wParam, item->lParam); SetEvent(item->hDoneEvent); } @@ -571,7 +571,7 @@ MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam, LPARAM lP return item.result; } -MIR_CORE_DLL(int) CallFunctionAsync(void (__stdcall *func)(void *), void *arg) +MIR_CORE_DLL(int) CallFunctionAsync(void(__stdcall *func)(void *), void *arg) { if (GetCurrentThreadId() == mainThreadId) func(arg); @@ -584,9 +584,9 @@ MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst) { mir_cslock lck(csServices); - for (int i = services.getCount()-1; i >= 0; i--) { + for (int i = services.getCount() - 1; i >= 0; i--) { if (services[i]->hOwner == hInst) { - char szModuleName[ MAX_PATH ]; + char szModuleName[MAX_PATH]; GetModuleFileNameA(services[i]->hOwner, szModuleName, sizeof(szModuleName)); DestroyServiceFunction((HANDLE)services[i]->nameHash); } @@ -597,7 +597,7 @@ MIR_CORE_DLL(void) KillObjectServices(void* pObject) { mir_cslock lck(csServices); - for (int i = services.getCount()-1; i >= 0; i--) + for (int i = services.getCount() - 1; i >= 0; i--) if (services[i]->object == pObject) DestroyServiceFunction((HANDLE)services[i]->nameHash); } @@ -606,7 +606,7 @@ static void DestroyServices() { mir_cslock lck(csServices); - for (int j=0; j < services.getCount(); j++) + for (int j = 0; j < services.getCount(); j++) mir_free(services[j]); } diff --git a/src/mir_core/src/mstring.cpp b/src/mir_core/src/mstring.cpp index f4abf5e626..3cb52eef61 100644 --- a/src/mir_core/src/mstring.cpp +++ b/src/mir_core/src/mstring.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" ///////////////////////////////////////////////////////////////////////////////////////// // CMBaseString diff --git a/src/mir_core/src/path.cpp b/src/mir_core/src/path.cpp index cd2b25e94d..2b61a97928 100644 --- a/src/mir_core/src/path.cpp +++ b/src/mir_core/src/path.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static char szMirandaPath[MAX_PATH]; static WCHAR szMirandaPathW[MAX_PATH]; diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp index 2b408e7acb..ddddbec440 100644 --- a/src/mir_core/src/protos.cpp +++ b/src/mir_core/src/protos.cpp @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static int CompareProtos(const PROTOCOLDESCRIPTOR *p1, const PROTOCOLDESCRIPTOR *p2) { @@ -273,92 +273,92 @@ MIR_CORE_DLL(int) ProtoGetAvatarFileFormat(const TCHAR *ptszFileName) ///////////////////////////////////////////////////////////////////////////////////////// // default PROTO_INTERFACE method implementations -MCONTACT PROTO_INTERFACE::AddToList(int flags, PROTOSEARCHRESULT* psr) +MCONTACT PROTO_INTERFACE::AddToList(int, PROTOSEARCHRESULT*) { return NULL; // error } -MCONTACT PROTO_INTERFACE::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent) +MCONTACT PROTO_INTERFACE::AddToListByEvent(int, int, MEVENT) { return NULL; // error } -int PROTO_INTERFACE::Authorize(MEVENT hDbEvent) +int PROTO_INTERFACE::Authorize(MEVENT) { return 1; // error } -int PROTO_INTERFACE::AuthDeny(MEVENT hDbEvent, const TCHAR* szReason) +int PROTO_INTERFACE::AuthDeny(MEVENT, const TCHAR*) { return 1; // error } -int PROTO_INTERFACE::AuthRecv(MCONTACT hContact, PROTORECVEVENT*) +int PROTO_INTERFACE::AuthRecv(MCONTACT, PROTORECVEVENT*) { return 1; // error } -int PROTO_INTERFACE::AuthRequest(MCONTACT hContact, const TCHAR* szMessage) +int PROTO_INTERFACE::AuthRequest(MCONTACT, const TCHAR*) { return 1; // error } -HANDLE PROTO_INTERFACE::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath) +HANDLE PROTO_INTERFACE::FileAllow(MCONTACT, HANDLE, const TCHAR*) { return NULL; // error } -int PROTO_INTERFACE::FileCancel(MCONTACT hContact, HANDLE hTransfer) +int PROTO_INTERFACE::FileCancel(MCONTACT, HANDLE) { return 1; // error } -int PROTO_INTERFACE::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason) +int PROTO_INTERFACE::FileDeny(MCONTACT, HANDLE, const TCHAR*) { return 1; // error } -int PROTO_INTERFACE::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename) +int PROTO_INTERFACE::FileResume(HANDLE, int*, const TCHAR**) { return 1; // error } -DWORD_PTR PROTO_INTERFACE::GetCaps(int type, MCONTACT hContact) +DWORD_PTR PROTO_INTERFACE::GetCaps(int, MCONTACT) { return 0; // empty value } -int PROTO_INTERFACE::GetInfo(MCONTACT hContact, int infoType) +int PROTO_INTERFACE::GetInfo(MCONTACT, int) { return 1; // error } -HANDLE PROTO_INTERFACE::SearchBasic(const TCHAR* id) +HANDLE PROTO_INTERFACE::SearchBasic(const TCHAR*) { return NULL; // error } -HANDLE PROTO_INTERFACE::SearchByEmail(const TCHAR* email) +HANDLE PROTO_INTERFACE::SearchByEmail(const TCHAR*) { return NULL; // error } -HANDLE PROTO_INTERFACE::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName) +HANDLE PROTO_INTERFACE::SearchByName(const TCHAR*, const TCHAR*, const TCHAR*) { return NULL; // error } -HWND PROTO_INTERFACE::SearchAdvanced(HWND owner) +HWND PROTO_INTERFACE::SearchAdvanced(HWND) { return NULL; // error } -HWND PROTO_INTERFACE::CreateExtendedSearchUI(HWND owner) +HWND PROTO_INTERFACE::CreateExtendedSearchUI(HWND) { return NULL; // error } -int PROTO_INTERFACE::RecvContacts(MCONTACT hContact, PROTORECVEVENT*) +int PROTO_INTERFACE::RecvContacts(MCONTACT, PROTORECVEVENT*) { return 1; // error } @@ -374,62 +374,62 @@ int PROTO_INTERFACE::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt) return 0; } -int PROTO_INTERFACE::RecvUrl(MCONTACT hContact, PROTORECVEVENT*) +int PROTO_INTERFACE::RecvUrl(MCONTACT, PROTORECVEVENT*) { return 1; // error } -int PROTO_INTERFACE::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) +int PROTO_INTERFACE::SendContacts(MCONTACT, int, int, MCONTACT*) { return 1; // error } -HANDLE PROTO_INTERFACE::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles) +HANDLE PROTO_INTERFACE::SendFile(MCONTACT, const TCHAR*, TCHAR**) { return NULL; // error } -int PROTO_INTERFACE::SendMsg(MCONTACT hContact, int flags, const char *msg) +int PROTO_INTERFACE::SendMsg(MCONTACT, int, const char*) { return 0; // error } -int PROTO_INTERFACE::SendUrl(MCONTACT hContact, int flags, const char *url) +int PROTO_INTERFACE::SendUrl(MCONTACT, int, const char*) { return 1; // error } -int PROTO_INTERFACE::SetApparentMode(MCONTACT hContact, int mode) +int PROTO_INTERFACE::SetApparentMode(MCONTACT, int) { return 1; // error } -int PROTO_INTERFACE::SetStatus(int iNewStatus) +int PROTO_INTERFACE::SetStatus(int) { return 1; // you better declare it } -HANDLE PROTO_INTERFACE::GetAwayMsg(MCONTACT hContact) +HANDLE PROTO_INTERFACE::GetAwayMsg(MCONTACT) { return NULL; // no away message } -int PROTO_INTERFACE::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt) +int PROTO_INTERFACE::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*) { return 1; // error } -int PROTO_INTERFACE::SetAwayMsg(int iStatus, const TCHAR* msg) +int PROTO_INTERFACE::SetAwayMsg(int, const TCHAR*) { return 1; // error } -int PROTO_INTERFACE::UserIsTyping(MCONTACT hContact, int type) +int PROTO_INTERFACE::UserIsTyping(MCONTACT, int) { return 1; // error } -int PROTO_INTERFACE::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) +int PROTO_INTERFACE::OnEvent(PROTOEVENTTYPE, WPARAM, LPARAM) { return 1; // not an error, vitally important } diff --git a/src/mir_core/src/sha1.cpp b/src/mir_core/src/sha1.cpp index b31e640657..33a85f8a54 100644 --- a/src/mir_core/src/sha1.cpp +++ b/src/mir_core/src/sha1.cpp @@ -34,7 +34,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "commonheaders.h" +#include "stdafx.h" #define SHA_ROTL(X, n) (((X) << (n)) | ((X) >> (32-(n)))) diff --git a/src/mir_core/src/stdafx.cpp b/src/mir_core/src/stdafx.cpp deleted file mode 100644 index 3507dce3c6..0000000000 --- a/src/mir_core/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG team (http://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 . -*/ - -#include "commonheaders.h" \ No newline at end of file diff --git a/src/mir_core/src/stdafx.cxx b/src/mir_core/src/stdafx.cxx new file mode 100644 index 0000000000..f9427de501 --- /dev/null +++ b/src/mir_core/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG team (http://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 . +*/ + +#include "stdafx.h" diff --git a/src/mir_core/src/stdafx.h b/src/mir_core/src/stdafx.h new file mode 100644 index 0000000000..7bc862bfa0 --- /dev/null +++ b/src/mir_core/src/stdafx.h @@ -0,0 +1,70 @@ +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org), +Copyright (c) 2000-12 Miranda IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +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; either version 2 +of the License, or (at your option) any later version. + +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, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#define INCL_WINSOCK_API_TYPEDEFS 1 + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "miranda.h" + +#include +#include + +#include + +void GetDefaultLang(); \ No newline at end of file diff --git a/src/mir_core/src/subclass.cpp b/src/mir_core/src/subclass.cpp index 76d790f041..026ed8efef 100644 --- a/src/mir_core/src/subclass.cpp +++ b/src/mir_core/src/subclass.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "commonheaders.h" +#include "stdafx.h" struct MSubclassData { @@ -111,8 +111,6 @@ MIR_CORE_DLL(void) mir_subclassWindowFull(HWND hWnd, WNDPROC wndProc, WNDPROC ol static void removeHook(MSubclassData *p, int idx) { - WNDPROC saveProc = p->m_hooks[idx]; - // untie hook from a window to prevent calling mir_callNextSubclass from saveProc for (int i = idx + 1; i < p->m_iHooks; i++) p->m_hooks[i-1] = p->m_hooks[i]; diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp index ea47e19260..16b5d4d993 100644 --- a/src/mir_core/src/threads.cpp +++ b/src/mir_core/src/threads.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #include diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 3800ca318d..473634fa4c 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -20,11 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #include #include -#include #include static mir_cs csDialogs, csCtrl; @@ -2412,7 +2411,7 @@ int CCtrlBase::GetInt() return _ttoi(result); } -LRESULT CCtrlBase::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT CCtrlBase::CustomWndProc(UINT, WPARAM, LPARAM) { return FALSE; } diff --git a/src/mir_core/src/utf.cpp b/src/mir_core/src/utf.cpp index e6b76cf779..282f304d73 100644 --- a/src/mir_core/src/utf.cpp +++ b/src/mir_core/src/utf.cpp @@ -25,7 +25,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */ static const char utf8_length[128] = diff --git a/src/mir_core/src/utils.cpp b/src/mir_core/src/utils.cpp index bc3513313d..53c5f5c83f 100644 --- a/src/mir_core/src/utils.cpp +++ b/src/mir_core/src/utils.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" MIR_CORE_DLL(char*) replaceStr(char* &dest, const char *src) { diff --git a/src/mir_core/src/windowlist.cpp b/src/mir_core/src/windowlist.cpp index 425db3f2db..16f6e929db 100644 --- a/src/mir_core/src/windowlist.cpp +++ b/src/mir_core/src/windowlist.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" struct TWindowListItem { diff --git a/src/mir_core/src/winver.cpp b/src/mir_core/src/winver.cpp index 20371a3a6c..ffe68b114c 100644 --- a/src/mir_core/src/winver.cpp +++ b/src/mir_core/src/winver.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "commonheaders.h" +#include "stdafx.h" static int dwWinVer; -- cgit v1.2.3