From 6dfdccb3decd016ced438309d326547e5244604e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 18 May 2012 20:27:43 +0000 Subject: compilation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@55 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Bonsai/FixOptions/Bonsai.cpp | 7 ++--- plugins/Bonsai/FixOptions/FixOptions.vcxproj | 2 -- .../Bonsai/FixOptions/FixOptions.vcxproj.filters | 6 ---- plugins/Bonsai/FixOptions/commonheaders.h | 1 - plugins/Bonsai/FixOptions/mirandaMem.cpp | 35 ---------------------- plugins/Bonsai/FixOptions/mirandaMem.h | 32 -------------------- plugins/Bonsai/FixOptions/utils.cpp | 8 ++--- 7 files changed, 7 insertions(+), 84 deletions(-) delete mode 100644 plugins/Bonsai/FixOptions/mirandaMem.cpp delete mode 100644 plugins/Bonsai/FixOptions/mirandaMem.h (limited to 'plugins/Bonsai') diff --git a/plugins/Bonsai/FixOptions/Bonsai.cpp b/plugins/Bonsai/FixOptions/Bonsai.cpp index cddbf70ff5..bea3156f89 100644 --- a/plugins/Bonsai/FixOptions/Bonsai.cpp +++ b/plugins/Bonsai/FixOptions/Bonsai.cpp @@ -34,6 +34,7 @@ HIMAGELIST imgList = NULL; PLUGINLINK *pluginLink; int hLangpack; +struct MM_INTERFACE mmi; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), @@ -80,15 +81,13 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) LogInit(); pluginLink = link; - mir_getLP(&pluginInfoEx); + mir_getMMI(&mmi); + mir_getLP(&pluginInfo); InitServices(); HookEvents(); - InitializeMirandaMemFunctions(); - - hbModified = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_MODIFIED)); hbUnmodified = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UNMODIFIED)); hbHidden = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_HIDDEN)); diff --git a/plugins/Bonsai/FixOptions/FixOptions.vcxproj b/plugins/Bonsai/FixOptions/FixOptions.vcxproj index a2873a0476..67a96c954e 100644 --- a/plugins/Bonsai/FixOptions/FixOptions.vcxproj +++ b/plugins/Bonsai/FixOptions/FixOptions.vcxproj @@ -184,7 +184,6 @@ - @@ -193,7 +192,6 @@ - diff --git a/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters b/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters index 263e9a73f1..3bb27e93ca 100644 --- a/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters +++ b/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters @@ -27,9 +27,6 @@ Source Files - - Source Files - Source Files @@ -50,9 +47,6 @@ Header Files - - Header Files - Header Files diff --git a/plugins/Bonsai/FixOptions/commonheaders.h b/plugins/Bonsai/FixOptions/commonheaders.h index 0bc013dcdf..29ebda9d46 100644 --- a/plugins/Bonsai/FixOptions/commonheaders.h +++ b/plugins/Bonsai/FixOptions/commonheaders.h @@ -50,7 +50,6 @@ typedef INT_PTR (*MIRANDASERVICE)(WPARAM,LPARAM); #include "version.h" #include "utils.h" -#include "mirandaMem.h" #include "services.h" #include "list.h" #include "dlg_handlers.h" diff --git a/plugins/Bonsai/FixOptions/mirandaMem.cpp b/plugins/Bonsai/FixOptions/mirandaMem.cpp deleted file mode 100644 index 05280dbbdb..0000000000 --- a/plugins/Bonsai/FixOptions/mirandaMem.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* -Bonsai plugin for Miranda IM - -Copyright © 2006 Cristian Libotean - -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. -*/ - -#include "mirandaMem.h" - -void *(*MirandaMalloc)(size_t size) = NULL; -void *(*MirandaRealloc)(void *data, size_t newSize) = NULL; -void (*MirandaFree) (void *data) = NULL; - -void InitializeMirandaMemFunctions() -{ - struct MM_INTERFACE mmi = {0}; - mmi.cbSize = sizeof(MM_INTERFACE); - CallService(MS_SYSTEM_GET_MMI, 0, (LPARAM) &mmi); - MirandaMalloc = mmi.mmi_malloc; - MirandaRealloc = mmi.mmi_realloc; - MirandaFree = mmi.mmi_free; -} \ No newline at end of file diff --git a/plugins/Bonsai/FixOptions/mirandaMem.h b/plugins/Bonsai/FixOptions/mirandaMem.h deleted file mode 100644 index 6f7b12aa9e..0000000000 --- a/plugins/Bonsai/FixOptions/mirandaMem.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -Bonsai plugin for Miranda IM - -Copyright © 2006 Cristian Libotean - -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. -*/ - -#ifndef M_BONSAI_MIRANDA_MEM_H -#define M_BONSAI_MIRANDA_MEM_H - -#include "commonheaders.h" - -extern void *(*MirandaMalloc)(size_t size); -extern void *(*MirandaRealloc)(void *data, size_t newSize); -extern void (*MirandaFree) (void *data); - -void InitializeMirandaMemFunctions(); - -#endif \ No newline at end of file diff --git a/plugins/Bonsai/FixOptions/utils.cpp b/plugins/Bonsai/FixOptions/utils.cpp index f47f78592c..3f30dc44ad 100644 --- a/plugins/Bonsai/FixOptions/utils.cpp +++ b/plugins/Bonsai/FixOptions/utils.cpp @@ -145,7 +145,7 @@ int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, len = (tmp < size - 1) ? tmp : size - 1; strncpy(szResult, dbv.pszVal, len); szResult[len] = '\0'; - MirandaFree(dbv.pszVal); + mir_free(dbv.pszVal); } else{ res = 1; @@ -182,7 +182,7 @@ int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, wcsncpy(szResult, dbv.pwszVal, len); szResult[len] = L'\0'; } - MirandaFree(dbv.pwszVal); + mir_free(dbv.pwszVal); } else{ res = 1; @@ -240,7 +240,7 @@ TCHAR *GetContactName(HANDLE hContact, char *szProto) { buffer = _tcsdup(ctInfo.pszVal); } - MirandaFree(ctInfo.pszVal); + mir_free(ctInfo.pszVal); if (!ret) { return buffer; @@ -323,7 +323,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto) } - MirandaFree(ctInfo.pszVal); + mir_free(ctInfo.pszVal); if (!ret) { return buffer; -- cgit v1.2.3