diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 20:27:43 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 20:27:43 +0000 |
commit | 6dfdccb3decd016ced438309d326547e5244604e (patch) | |
tree | aa699dd48dcf31ef7e534ab0e3834034457f58b0 /plugins/Bonsai | |
parent | 9ed5a0436109770d38318ae9a3c117f46aeefa5e (diff) |
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@55 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Bonsai')
-rw-r--r-- | plugins/Bonsai/FixOptions/Bonsai.cpp | 7 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/FixOptions.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/commonheaders.h | 1 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/mirandaMem.cpp | 35 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/mirandaMem.h | 32 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/utils.cpp | 8 |
7 files changed, 7 insertions, 84 deletions
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 @@ <ClCompile Include="dlg_handlers.cpp" />
<ClCompile Include="hooked_events.cpp" />
<ClCompile Include="list.cpp" />
- <ClCompile Include="mirandaMem.cpp" />
<ClCompile Include="services.cpp" />
<ClCompile Include="utils.cpp" />
</ItemGroup>
@@ -193,7 +192,6 @@ <ClInclude Include="dlg_handlers.h" />
<ClInclude Include="hooked_events.h" />
<ClInclude Include="list.h" />
- <ClInclude Include="mirandaMem.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="services.h" />
<ClInclude Include="utils.h" />
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 @@ <ClCompile Include="list.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="mirandaMem.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="services.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -50,9 +47,6 @@ <ClInclude Include="list.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="mirandaMem.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
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;
|