diff options
Diffstat (limited to 'plugins')
35 files changed, 81 insertions, 80 deletions
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index cfa1310cf1..dfeabf55a1 100755 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -339,7 +339,7 @@ void LoadAlarms() }
}
-int db_enum_settings_sub_cb(const char *szSetting, LPARAM lParam)
+int db_enum_settings_sub_cb(const char *szSetting, void *lParam)
{
//quick and dirty solution, feel free to rewrite
std::list<char*> *settings = (std::list<char*>*)lParam;
@@ -393,7 +393,7 @@ void SaveAlarms() //quick and dirty solution, feel free to rewrite
//TODO: this should be done on "delete" button press instead, and for selected alrams only
std::list<char*> settings;
- db_enum_settings(0, &db_enum_settings_sub_cb, MODULE, (void*)&settings);
+ db_enum_settings(0, &db_enum_settings_sub_cb, MODULE, &settings);
for (std::list<char*>::iterator i = settings.begin(), end = settings.end(); i != end; ++i)
{
db_unset(0, MODULE, *i);
diff --git a/plugins/AssocMgr/src/utils.cpp b/plugins/AssocMgr/src/utils.cpp index 21cd8de4f6..8495d9da7a 100644 --- a/plugins/AssocMgr/src/utils.cpp +++ b/plugins/AssocMgr/src/utils.cpp @@ -91,7 +91,7 @@ struct EnumPrefixSettingsParams { int nPrefixLen;
};
-static int EnumPrefixSettingsProc(const char *pszSetting,LPARAM lParam)
+static int EnumPrefixSettingsProc(const char *pszSetting, void *lParam)
{
struct EnumPrefixSettingsParams *param=(struct EnumPrefixSettingsParams*)lParam;
if (!strncmp(pszSetting,param->pszPrefix,param->nPrefixLen)) {
diff --git a/plugins/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp index 05660a21f7..cc1e3e6d96 100644 --- a/plugins/ClientChangeNotify/src/Options.cpp +++ b/plugins/ClientChangeNotify/src/Options.cpp @@ -265,7 +265,7 @@ struct sTreeReadEnumData const CString &sModule, &sDBSettingPrefix;
};
-int TreeReadEnum(const char *szSetting, LPARAM lParam)
+int TreeReadEnum(const char *szSetting, void *lParam)
{
sTreeReadEnumData *pData = (sTreeReadEnumData*)lParam;
int Len = pData->TreeCtrl->sDBSetting.GetLen() + _countof(TREEITEM_DBSTR_TITLE) - 1;
@@ -441,7 +441,7 @@ typedef struct CString *sDBSettingPrefix;
} sTreeDeleteEnumData;
-int TreeDeleteEnum(const char *szSetting, LPARAM lParam)
+int TreeDeleteEnum(const char *szSetting, void *lParam)
{
sTreeDeleteEnumData *TreeDeleteEnumData = (sTreeDeleteEnumData*)lParam;
CString CurSetting = *TreeDeleteEnumData->sDBSettingPrefix + TreeDeleteEnumData->TreeCtrl->sDBSetting + TREEITEM_DBSTR_TITLE;
@@ -644,7 +644,7 @@ struct sListReadEnumData const CString &sModule, &sDBSettingPrefix;
};
-int ListReadEnum(const char *szSetting, LPARAM lParam)
+int ListReadEnum(const char *szSetting, void *lParam)
{
sListReadEnumData *pData = (sListReadEnumData*)lParam;
int Len = pData->sDBSettingPrefix.GetLen() + pData->ListCtrl->sDBSetting.GetLen() + _countof(LISTITEM_DBSTR_TEXT) - 1;
@@ -721,7 +721,7 @@ typedef struct CString *sDBSettingPrefix;
} sListDeleteEnumData;
-int ListDeleteEnum(const char *szSetting, LPARAM lParam)
+int ListDeleteEnum(const char *szSetting, void *lParam)
{
sListDeleteEnumData *ListDeleteEnumData = (sListDeleteEnumData*)lParam;
CString CurSetting = *ListDeleteEnumData->sDBSettingPrefix + ListDeleteEnumData->ListCtrl->sDBSetting + LISTITEM_DBSTR_TEXT;
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index eaf30819f7..8f32dfa2ac 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -1828,7 +1828,7 @@ static int ske_ProcessLoadindString(const char *szSetting, char *szValue) return 1; } -static int ske_enumdb_SkinObjectsProc(const char *szSetting, LPARAM) +static int ske_enumdb_SkinObjectsProc(const char *szSetting, void *) { ptrA value(db_get_sa(0, SKIN, szSetting)); ske_ProcessLoadindString(szSetting, value); diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index aed452623f..b556d85556 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -91,7 +91,7 @@ static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, vo * useful for filling lists, menus and so on..
*/
-int CLVM_EnumProc(const char *szSetting, LPARAM lParam)
+int CLVM_EnumProc(const char *szSetting, void *lParam)
{
pfnEnumCallback EnumCallback = (pfnEnumCallback)lParam;
if (szSetting != nullptr)
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 7032fb95b6..83888c400c 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -57,7 +57,7 @@ static UINT _page2Controls[] = { IDC_CLIST, IDC_STATIC9, IDC_STATIC8, IDC_CLEARA * useful for filling lists, menus and so on..
*/
-int CLVM_EnumProc(const char *szSetting, LPARAM lParam)
+int CLVM_EnumProc(const char *szSetting, void *lParam)
{
pfnEnumCallback EnumCallback = (pfnEnumCallback)lParam;
if (szSetting != nullptr)
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index 03c6da8385..d2368e5b68 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -69,7 +69,7 @@ struct SettingUgraderParam OBJLIST<VarDescr>* pList;
};
-int sttSettingUgrader(const char *szSetting, LPARAM lParam)
+int sttSettingUgrader(const char *szSetting, void *lParam)
{
SettingUgraderParam *param = (SettingUgraderParam*)lParam;
if (param->db->IsSettingEncrypted(param->szModule, szSetting)) {
@@ -108,7 +108,7 @@ void sttContactEnum(MCONTACT contactID, const char *szModule, CDb3Mmap *db) }
}
-int sttModuleEnum(const char *szModule, DWORD, LPARAM lParam)
+int sttModuleEnum(const char *szModule, void *lParam)
{
CDb3Mmap *db = (CDb3Mmap*)lParam;
sttContactEnum(0, szModule, db);
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 8155a1758f..1a6024bb20 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -232,13 +232,13 @@ public: STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent);
STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent);
- STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic);
STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws);
STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting);
- STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param);
- STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param);
+ STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting);
STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub);
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 47d1cf40d3..3c2fb36f13 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -127,11 +127,11 @@ char* CDb3Mmap::GetModuleNameByOfs(DWORD ofs) return nullptr;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDb3Mmap::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam)
{
for (int i = 0; i < m_lMods.getCount(); i++) {
ModuleName *pmn = m_lMods[i];
- int ret = pFunc(pmn->name, pmn->ofs, (LPARAM)pParam);
+ int ret = pFunc(pmn->name, pParam);
if (ret)
return ret;
}
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 3f22540b21..76225aec4c 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -648,7 +648,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteContactSetting(MCONTACT contactID, LPCSTR sz return 0;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param)
+STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param)
{
if (!szModule)
return -1;
@@ -680,7 +680,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGE NeedBytes(1 + pBlob[0]);
char szSetting[256];
memcpy(szSetting, pBlob + 1, pBlob[0]); szSetting[pBlob[0]] = 0;
- result = pfnEnumProc(szSetting, LPARAM(param));
+ result = pfnEnumProc(szSetting, param);
MoveAlong(1 + pBlob[0]);
NeedBytes(3);
MoveAlong(1 + GetSettingValueLength(pBlob));
@@ -689,10 +689,10 @@ STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGE return result;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDb3Mmap::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam)
{
for (int i = 0; i < m_lResidentSettings.getCount(); i++) {
- int ret = pFunc(m_lResidentSettings[i], 0, (LPARAM)pParam);
+ int ret = pFunc(m_lResidentSettings[i], pParam);
if (ret)
return ret;
}
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp index 551fc3a171..b4f4e72000 100644 --- a/plugins/DbEditorPP/src/modsettingenum.cpp +++ b/plugins/DbEditorPP/src/modsettingenum.cpp @@ -21,9 +21,9 @@ void FreeModuleSettingLL(ModuleSettingLL *msll) }
-int enumModulesSettingsProc(const char *setting, DWORD, LPARAM lParam)
+int enumModulesSettingsProc(const char *setting, void *pParam)
{
- ModuleSettingLL *msll = (ModuleSettingLL *)lParam;
+ ModuleSettingLL *msll = (ModuleSettingLL *)pParam;
if (!msll->first) {
msll->first = (ModSetLinkLinkItem *)mir_alloc(sizeof(ModSetLinkLinkItem));
if (!msll->first)
@@ -59,9 +59,9 @@ int EnumModules(ModuleSettingLL *msll) // 1 = success, 0 = fail }
-int enumSettingsProc(const char *setting, LPARAM lParam)
+int enumSettingsProc(const char *setting, void *lParam)
{
- return enumModulesSettingsProc(setting, 0, lParam);
+ return enumModulesSettingsProc(setting, lParam);
}
@@ -78,7 +78,7 @@ int EnumSettings(MCONTACT hContact, const char *module, ModuleSettingLL *msll) }
-int CheckIfModuleIsEmptyProc(const char *, LPARAM)
+int CheckIfModuleIsEmptyProc(const char*, void*)
{
return 1;
}
@@ -100,7 +100,7 @@ LIST<char> m_lResidentSettings(10, stringCompare); LIST<char> m_lResidentModules(5, stringCompare);
-int enumResidentProc(const char *setting, DWORD, LPARAM)
+int enumResidentProc(const char *setting, void*)
{
m_lResidentSettings.insert(mir_strdup(setting));
@@ -170,7 +170,7 @@ int EnumResidentSettings(const char *module, ModuleSettingLL *msll) if (m_lResidentSettings[i][len] != '/' || m_lResidentSettings[i][len+1] == 0) continue;
- enumModulesSettingsProc(&m_lResidentSettings[i][len+1], 0, (LPARAM)msll);
+ enumModulesSettingsProc(&m_lResidentSettings[i][len+1], msll);
cnt++;
}
return cnt;
@@ -187,7 +187,7 @@ int EnumResidentModules(ModuleSettingLL *msll) int cnt = 0;
for (int i = 0; i < m_lResidentModules.getCount(); i++) {
- enumModulesSettingsProc(m_lResidentModules[i], 0, (LPARAM)msll);
+ enumModulesSettingsProc(m_lResidentModules[i], msll);
cnt++;
}
diff --git a/plugins/Dbx_mdb/src/dbintf.h b/plugins/Dbx_mdb/src/dbintf.h index 8c93379094..4c1c757aed 100644 --- a/plugins/Dbx_mdb/src/dbintf.h +++ b/plugins/Dbx_mdb/src/dbintf.h @@ -174,13 +174,13 @@ public: STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent);
STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent);
- STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic);
STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws);
STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting);
- STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param);
- STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param);
+ STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting);
STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub);
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp index 66e7cf1509..3e8590f2de 100644 --- a/plugins/Dbx_mdb/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp @@ -64,10 +64,10 @@ char* CDbxMdb::GetModuleName(uint32_t dwId) return it != m_Modules.end() ? const_cast<char*>(it->second.c_str()) : nullptr;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam)
{
for (auto it = m_Modules.begin(); it != m_Modules.end(); ++it)
- if (int ret = pFunc(it->second.c_str(), it->first, (LPARAM)pParam))
+ if (int ret = pFunc(it->second.c_str(), pParam))
return ret;
return 0;
diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdb/src/dbsettings.cpp index 14f6f7d3c5..5e287292f5 100644 --- a/plugins/Dbx_mdb/src/dbsettings.cpp +++ b/plugins/Dbx_mdb/src/dbsettings.cpp @@ -415,7 +415,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteContactSetting(MCONTACT contactID, LPCSTR szM return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param)
{
int result = -1;
@@ -430,16 +430,16 @@ STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENU const DBSettingKey *pKey = (const DBSettingKey*)key.iov_base;
if (pKey->hContact != hContact || pKey->dwModuleId != keyVal.dwModuleId)
break;
- result = pfnEnumProc(pKey->szSettingName, LPARAM(param));
+ result = pfnEnumProc(pKey->szSettingName, param);
}
return result;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam)
{
for (int i = 0; i < m_lResidentSettings.getCount(); i++)
- if (int ret = pFunc(m_lResidentSettings[i], 0, (LPARAM)pParam))
+ if (int ret = pFunc(m_lResidentSettings[i], pParam))
return ret;
return 0;
}
diff --git a/plugins/Dbx_mdb/src/mdbx/osal.c b/plugins/Dbx_mdb/src/mdbx/osal.c index d9026cfadf..5a8ec58002 100644 --- a/plugins/Dbx_mdb/src/mdbx/osal.c +++ b/plugins/Dbx_mdb/src/mdbx/osal.c @@ -772,7 +772,7 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t must, size_t limit) { } NTSTATUS rc; -#ifdef _WIN64 +#if defined(_WIN64) && defined(WOF_CURRENT_VERSION) struct { WOF_EXTERNAL_INFO wof_info; union { diff --git a/plugins/Dbx_mdb/src/stdafx.h b/plugins/Dbx_mdb/src/stdafx.h index 1fc3afc599..53839424e1 100644 --- a/plugins/Dbx_mdb/src/stdafx.h +++ b/plugins/Dbx_mdb/src/stdafx.h @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <windows.h>
#include <time.h>
#include <process.h>
+
#include <memory>
#include <vector>
#include <algorithm>
diff --git a/plugins/HistoryStats/src/mirandasettings.cpp b/plugins/HistoryStats/src/mirandasettings.cpp index a05b843a65..f409a51844 100644 --- a/plugins/HistoryStats/src/mirandasettings.cpp +++ b/plugins/HistoryStats/src/mirandasettings.cpp @@ -128,7 +128,7 @@ bool MirandaSettings::delSetting(const char* szSetting) return db_unset(m_hContact, m_strModule.c_str(), szSetting) == 0;
}
-int MirandaSettings::enumSettingsProc(const char* szSetting, LPARAM lParam)
+int MirandaSettings::enumSettingsProc(const char* szSetting, void *lParam)
{
SetInserter* pInserter = reinterpret_cast<SetInserter*>(lParam);
@@ -139,5 +139,5 @@ int MirandaSettings::enumSettingsProc(const char* szSetting, LPARAM lParam) void MirandaSettings::enumSettings(const SetInserter& insertIterator)
{
- db_enum_settings(m_hContact, enumSettingsProc, m_strModule.c_str(), &insertIterator);
+ db_enum_settings(m_hContact, enumSettingsProc, m_strModule.c_str(), (void*)&insertIterator);
}
diff --git a/plugins/HistoryStats/src/mirandasettings.h b/plugins/HistoryStats/src/mirandasettings.h index c8671faa4c..e4787c255d 100644 --- a/plugins/HistoryStats/src/mirandasettings.h +++ b/plugins/HistoryStats/src/mirandasettings.h @@ -22,7 +22,7 @@ private: ext::a::string m_strModule;
private:
- static int enumSettingsProc(const char* szSetting, LPARAM lParam);
+ static int enumSettingsProc(const char* szSetting, void *lParam);
public:
// constructor
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 80ca2367d1..92b8933439 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -153,9 +153,9 @@ static MCONTACT HContactFromID(char *pszProtoName, char *pszSetting, wchar_t *pw /////////////////////////////////////////////////////////////////////////////////////////
-static int CopySettingsEnum(const char *szSetting, LPARAM lParam)
+static int CopySettingsEnum(const char *szSetting, void *param)
{
- LIST<char> *pSettings = (LIST<char>*)lParam;
+ LIST<char> *pSettings = (LIST<char>*)param;
pSettings->insert(mir_strdup(szSetting));
return 0;
}
@@ -549,9 +549,9 @@ struct ImportContactData const char *szSrcProto, *szDstProto;
};
-int ModulesEnumProc(const char *szModuleName, DWORD, LPARAM lParam)
+int ModulesEnumProc(const char *szModuleName, void *pParam)
{
- ImportContactData *icd = (ImportContactData*)lParam;
+ ImportContactData *icd = (ImportContactData*)pParam;
if (!mir_strcmp(icd->szSrcProto, szModuleName))
CopySettings(icd->from, szModuleName, icd->to, icd->szDstProto);
else if (!mir_strcmp(szModuleName, "Protocol"))
@@ -572,9 +572,9 @@ void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst) /////////////////////////////////////////////////////////////////////////////////////////
-static int ImportGroup(const char* szSettingName, LPARAM lParam)
+static int ImportGroup(const char* szSettingName, void *param)
{
- int *pnGroups = (int*)lParam;
+ int *pnGroups = (int*)param;
wchar_t *tszGroup = myGetWs(NULL, "CListGroups", szSettingName);
if (tszGroup != nullptr) {
@@ -802,7 +802,7 @@ static MCONTACT ImportContact(MCONTACT hSrc) /////////////////////////////////////////////////////////////////////////////////////////
// copying system settings
-static int CopySystemSettings(const char *szModuleName, DWORD, LPARAM param)
+static int CopySystemSettings(const char *szModuleName, void *param)
{
LIST<char> *arSkippedAccs = (LIST<char>*)param;
if (!arSkippedAccs->find((char*)szModuleName))
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 4666c47cc6..4a2ba849e7 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -105,7 +105,7 @@ static int GetSetting(MCONTACT hContact, const char *szModule, const char *szSet return db_get_s(hContact, szModule, szSetting, dbv, 0);
}
-static int enumModulesSettingsProc(const char *szName, LPARAM lParam)
+static int enumModulesSettingsProc(const char *szName, void *lParam)
{
ModuleSettingLL *msll = (ModuleSettingLL *)lParam;
if (!msll->first)
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 5556c77e5c..ed6528b7c4 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -392,7 +392,7 @@ static int db_MarkReadEvent(lua_State *L) /***********************************************/
-static int ModulesEnumProc(const char *szModuleName, DWORD, LPARAM lParam)
+static int ModulesEnumProc(const char *szModuleName, void *lParam)
{
if (szModuleName)
{
@@ -448,7 +448,7 @@ static int db_DeleteModule(lua_State *L) return 1;
}
-static int SettingsEnumProc(const char* szSetting, LPARAM lParam)
+static int SettingsEnumProc(const char* szSetting, void *lParam)
{
if (szSetting)
{
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index 0afce411de..9b4ead3136 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -265,7 +265,7 @@ struct sTreeReadEnumData const CString &sModule, &sDBSettingPrefix;
};
-int TreeReadEnum(const char *szSetting, LPARAM lParam)
+int TreeReadEnum(const char *szSetting, void *lParam)
{
sTreeReadEnumData *pData = (sTreeReadEnumData*)lParam;
int Len = pData->TreeCtrl->sDBSetting.GetLen() + _countof(TREEITEM_DBSTR_TITLE) - 1;
@@ -441,7 +441,7 @@ typedef struct CString *sDBSettingPrefix;
} sTreeDeleteEnumData;
-int TreeDeleteEnum(const char *szSetting, LPARAM lParam)
+int TreeDeleteEnum(const char *szSetting, void *lParam)
{
sTreeDeleteEnumData *TreeDeleteEnumData = (sTreeDeleteEnumData*)lParam;
CString CurSetting = *TreeDeleteEnumData->sDBSettingPrefix + TreeDeleteEnumData->TreeCtrl->sDBSetting + TREEITEM_DBSTR_TITLE;
@@ -644,7 +644,7 @@ struct sListReadEnumData const CString &sModule, &sDBSettingPrefix;
};
-int ListReadEnum(const char *szSetting, LPARAM lParam)
+int ListReadEnum(const char *szSetting, void *lParam)
{
sListReadEnumData *pData = (sListReadEnumData*)lParam;
int Len = pData->sDBSettingPrefix.GetLen() + pData->ListCtrl->sDBSetting.GetLen() + _countof(LISTITEM_DBSTR_TEXT) - 1;
@@ -721,7 +721,7 @@ typedef struct CString *sDBSettingPrefix;
} sListDeleteEnumData;
-int ListDeleteEnum(const char *szSetting, LPARAM lParam)
+int ListDeleteEnum(const char *szSetting, void *lParam)
{
sListDeleteEnumData *ListDeleteEnumData = (sListDeleteEnumData*)lParam;
CString CurSetting = *ListDeleteEnumData->sDBSettingPrefix + ListDeleteEnumData->ListCtrl->sDBSetting + LISTITEM_DBSTR_TEXT;
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 76f9a4282c..aff8e9f7f6 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1223,7 +1223,7 @@ string time_str() return (string)boost::posix_time::to_simple_string(now); } -int handleEnum(const char *szSetting, LPARAM lParam) +int handleEnum(const char *szSetting, void *lParam) { if (!*(bool*)lParam && szSetting[0] && StriStr(szSetting, "tabsrmm")) { bool f = false, *found = (bool*)lParam; diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index f375336afe..c6ae1a1ffc 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -136,7 +136,7 @@ struct EnumProcParam LPCSTR szModule, szNewModule;
};
-static int EnumProc(const char *szSetting, LPARAM lParam)
+static int EnumProc(const char *szSetting, void *lParam)
{
EnumProcParam* param = (EnumProcParam*)lParam;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 89fbeec022..b2c15faa0d 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -30,7 +30,7 @@ struct mir_safety_dbvar DBVARIANT* m_p;
};
-static int enum_contact_settings(const char* szSetting, LPARAM lp)
+static int enum_contact_settings(const char* szSetting, void *lp)
{
CEnumContext* ctx = reinterpret_cast<CEnumContext*>(lp);
@@ -98,7 +98,7 @@ static int enum_contact_settings(const char* szSetting, LPARAM lp) return 0;
}
-int EnumDbModules(const char *szModuleName, DWORD, LPARAM lp)
+int EnumDbModules(const char *szModuleName, void *lp)
{
CEnumContext *ctx = (CEnumContext*)lp;
IXMLNode::TXMLNodePtr pXml = ctx->m_pNode;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index 0e20c8282b..0f792822c0 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -585,7 +585,7 @@ typedef struct { } DeleteModuleStruct;
-int EnumProc(const char *szName, LPARAM lParam)
+int EnumProc(const char *szName, void *lParam)
{
DeleteModuleStruct *dms = (DeleteModuleStruct *) lParam;
size_t len = mir_strlen(szName);
@@ -612,7 +612,7 @@ int EnumProc(const char *szName, LPARAM lParam) return 0;
}
-int ModuleEnumProc(const char *szName, DWORD, LPARAM lParam)
+int ModuleEnumProc(const char *szName, void *lParam)
{
return EnumProc(szName, lParam);
}
diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp index 7b637c35aa..cbb2aed627 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp @@ -500,7 +500,7 @@ static INT_PTR CALLBACK StartupStatusOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w /////////////////////////////////////////////////////////////////////////////// // for db cleanup -static int DeleteSetting(const char *szSetting, LPARAM lParam) +static int DeleteSetting(const char *szSetting, void *lParam) { LIST<char> *p = (LIST<char> *)lParam; p->insert(mir_strdup(szSetting)); diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index 93c5485407..395b4b0402 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -155,7 +155,7 @@ void Chat_ModulesLoaded() /////////////////////////////////////////////////////////////////////////////////////////
// load the group chat module
-static int CopyChatSetting(const char *szSetting, LPARAM param)
+static int CopyChatSetting(const char *szSetting, void *param)
{
LIST<char> *szSettings = (LIST<char>*)param;
szSettings->insert(mir_strdup(szSetting));
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 2858ef040a..e76b4b79e0 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -235,7 +235,7 @@ bool CSendLater::processCurrentJob() // stub used as enum proc for the database enumeration, collecting
// all entries in the SendLater module
// (static function)
-int _cdecl CSendLater::addStub(const char *szSetting, LPARAM lParam)
+int _cdecl CSendLater::addStub(const char *szSetting, void *lParam)
{
return(sendLater->addJob(szSetting, lParam));
}
@@ -272,9 +272,9 @@ void CSendLater::processContacts() //
// @param lParam: a contact handle for which the job should be scheduled
// @return 0 on failure, 1 otherwise
-int CSendLater::addJob(const char *szSetting, LPARAM lParam)
+int CSendLater::addJob(const char *szSetting, void *lParam)
{
- MCONTACT hContact = lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
DBVARIANT dbv = { 0 };
char *szOrig_Utf = nullptr;
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h index 0694024616..d257488872 100644 --- a/plugins/TabSRMM/src/sendlater.h +++ b/plugins/TabSRMM/src/sendlater.h @@ -102,11 +102,11 @@ public: void flushQueue() { m_last_sendlater_processed = 0; }
bool haveJobs() const { return (m_sendLaterJobList.getCount() != 0 && m_currJob != -1); }
- static int _cdecl addStub(const char *szSetting, LPARAM lParam);
+ static int _cdecl addStub(const char *szSetting, void *lParam);
bool processCurrentJob();
void processContacts();
- int addJob(const char *szSetting, LPARAM lParam);
+ int addJob(const char *szSetting, void *lParam);
void addContact(const MCONTACT hContact);
HANDLE processAck(const ACKDATA *ack);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 60dc9eb154..a84eda1481 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -597,7 +597,7 @@ int SendQueue::doSendLater(int iJobIndex, CTabBaseDlg *dat, MCONTACT hContact, b } else { mir_snprintf(tszMsg, required, "%s%s", utf_header, job->szSendBuffer); - sendLater->addJob(tszMsg, hContact); + sendLater->addJob(tszMsg, (void*)hContact); } mir_free(tszMsg); diff --git a/plugins/TooltipNotify/src/DbHelpers.cpp b/plugins/TooltipNotify/src/DbHelpers.cpp index 8fe93249a6..558a019fbf 100644 --- a/plugins/TooltipNotify/src/DbHelpers.cpp +++ b/plugins/TooltipNotify/src/DbHelpers.cpp @@ -6,7 +6,7 @@ typedef std::vector<const char*> SettingsList;
-static int EnumSettingsProc1(const char*, LPARAM)
+static int EnumSettingsProc1(const char*, void *)
{
return 0;
}
@@ -16,7 +16,7 @@ bool ModuleSettingsExists(MCONTACT hContact, const char* pszModuleName) return db_enum_settings(hContact, EnumSettingsProc1, pszModuleName) != -1;
}
-static int EnumSettingsProc2(const char *pszSetting, LPARAM lParam)
+static int EnumSettingsProc2(const char *pszSetting, void *lParam)
{
SettingsList& settingsList = *((SettingsList*)lParam);
settingsList.push_back(_strdup(pszSetting));
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 9d3525b342..7e42d0f682 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -76,7 +76,7 @@ void Delete(MCONTACT hContact, LPCSTR pszModule) * @retval TRUE - always true
**/
-static int IsEmptyEnumProc(LPCSTR, LPARAM)
+static int IsEmptyEnumProc(LPCSTR, void*)
{
return 1;
}
@@ -672,16 +672,16 @@ bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei) } /* namespace Events */
-int CEnumList::EnumProc(LPCSTR pszName, DWORD, LPARAM lParam)
+int CEnumList::EnumProc(LPCSTR pszName, void *pParam)
{
if (pszName)
- ((CEnumList*)lParam)->Insert(pszName);
+ ((CEnumList*)pParam)->Insert(pszName);
return 0;
}
-int CEnumList::EnumSettingsProc(LPCSTR pszName, LPARAM lParam)
+int CEnumList::EnumSettingsProc(LPCSTR pszName, void *param)
{
- return EnumProc(pszName, 0, lParam);
+ return EnumProc(pszName, param);
}
int CEnumList::CompareProc(LPCSTR p1, LPCSTR p2)
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index a9897306b5..9db1b29458 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -114,8 +114,8 @@ namespace Event { class CEnumList : public ::LIST<CHAR>
{
- static int EnumProc (LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam);
- static int EnumSettingsProc(LPCSTR pszName, LPARAM lParam);
+ static int EnumProc (LPCSTR pszName, void *param);
+ static int EnumSettingsProc(LPCSTR pszName, void *param);
static int CompareProc (LPCSTR p1, LPCSTR p2);
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index e446b8bcb0..5e1a794efa 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -391,7 +391,7 @@ void wfree(WCHAR **Data) // get single setting that is found
// szSetting = the setting name
// lparam = the counter
-int GetWeatherDataFromDB(const char *szSetting, LPARAM lparam)
+int GetWeatherDataFromDB(const char *szSetting, void *lparam)
{
LIST<char> *pList = (LIST<char>*)lparam;
pList->insert(mir_strdup(szSetting));
|