diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
commit | 6d6cb956a78b2dbfa7e8d62f4234d8f27b100468 (patch) | |
tree | e41f29a86d93ffc0ca414e8d84c8cdd47847baeb | |
parent | 6bb0abf1e62b18e4029ae0b7b73ee47f3fe3b39d (diff) |
database enumerators => void* instead of LPARAM
46 files changed, 111 insertions, 111 deletions
diff --git a/include/m_database.h b/include/m_database.h index 2292c76513..eb4bd3cbcf 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -99,21 +99,20 @@ EXTERN_C MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact); // Returns the value returned by the last call to dbmep
// This service is only really useful for debugging, in conjunction with db/contact/enumsettings
// dbmep should return 0 to continue enumeration, or nonzero to stop.
-// ofsModuleName is the offset of the module name from the start of the profile
-// database, and is only useful for really heavyweight debugging
+//
// Modules names will be enumerated in no particular order
// Writing to the database while module names are being enumerated will cause
// unpredictable results in the enumeration, but the write will work.
// szModuleName is only guaranteed to be valid for the duration of the callback.
// If you want to keep it for longer you must allocation your own storage.
-typedef int(*DBMODULEENUMPROC)(const char *szModuleName, DWORD ofsModuleName, LPARAM lParam);
+typedef int(*DBMODULEENUMPROC)(const char *szModuleName, void *param);
-EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, void *param = nullptr);
// Lists all resident settings
-EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param = nullptr);
// Lists all the settings a specific modules has stored in the database for a specific contact.
// Returns the return value of the last call to pfnEnumProc, or -1 if there are
@@ -124,9 +123,9 @@ EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, const void // szSetting is only guaranteed to be valid for the duration of the callback. If
// you want to keep it for longer you must allocation your own storage.
-typedef int (*DBSETTINGENUMPROC)(const char *szSetting, LPARAM lParam);
+typedef int (*DBSETTINGENUMPROC)(const char *szSetting, void *param);
-EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting
diff --git a/include/m_db_int.h b/include/m_db_int.h index 7ab866f884..ba93fad62c 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -109,7 +109,7 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(MEVENT, FindNextEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE;
STDMETHOD_(MEVENT, FindPrevEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE;
- STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, const void *pParam) PURE;
+ STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, void *pParam) PURE;
STDMETHOD_(BOOL, GetContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE;
STDMETHOD_(BOOL, GetContactSettingStr)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE;
@@ -117,9 +117,9 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(BOOL, FreeVariant)(DBVARIANT *dbv) PURE;
STDMETHOD_(BOOL, WriteContactSetting)(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws) PURE;
STDMETHOD_(BOOL, DeleteContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) PURE;
- STDMETHOD_(BOOL, EnumContactSettings)(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param) PURE;
+ STDMETHOD_(BOOL, EnumContactSettings)(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) PURE;
STDMETHOD_(BOOL, SetSettingResident)(BOOL bIsResident, const char *pszSettingName) PURE;
- STDMETHOD_(BOOL, EnumResidentSettings)(DBMODULEENUMPROC pFunc, const void *pParam) PURE;
+ STDMETHOD_(BOOL, EnumResidentSettings)(DBMODULEENUMPROC pFunc, void *pParam) PURE;
STDMETHOD_(BOOL, IsSettingEncrypted)(LPCSTR szModule, LPCSTR szSetting) PURE;
STDMETHOD_(BOOL, MetaDetouchSub)(DBCachedContact*, int nSub) PURE;
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));
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 5ce755d6cb..869732806a 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -156,7 +156,7 @@ CIrcProto::~CIrcProto() ////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoaded - performs hook registration
-static int sttCheckPerform(const char *szSetting, LPARAM lParam)
+static int sttCheckPerform(const char *szSetting, void *lParam)
{
if (!_strnicmp(szSetting, "PERFORM:", 8)) {
CMStringA s = szSetting;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 1d93bf88bb..374500cb5f 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -110,7 +110,7 @@ void CIrcProto::WriteSettings( TDbSetting* sets, int count ) /////////////////////////////////////////////////////////////////////////////////////////
-static int sttServerEnum( const char* szSetting, LPARAM )
+static int sttServerEnum( const char* szSetting, void*)
{
DBVARIANT dbv;
if (db_get_s(NULL, SERVERSMODULE, szSetting, &dbv))
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp index 11291eb889..4a562bf016 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.cpp +++ b/protocols/IcqOscarJ/src/icq_servlist.cpp @@ -812,7 +812,7 @@ struct GroupReserveIdsEnumParam char *szModule;
};
-static int GroupReserveIdsEnumProc(const char *szSetting, LPARAM lParam)
+static int GroupReserveIdsEnumProc(const char *szSetting, void *lParam)
{
if (szSetting && mir_strlen(szSetting) < 5) {
// it is probably server group
@@ -1252,7 +1252,7 @@ void* CIcqProto::collectGroups(int *count) return buf;
}
-static int GroupLinksEnumProc(const char *szSetting, LPARAM lParam)
+static int GroupLinksEnumProc(const char *szSetting, void *lParam)
{
// check link target, add if match
if (db_get_w(NULL, ((char**)lParam)[2], szSetting, 0) == (WORD)((char**)lParam)[1]) {
@@ -1489,7 +1489,7 @@ char *CIcqProto::getServListGroupCListPath(WORD wGroupId) }
-static int SrvGroupNamesEnumProc(const char *szSetting, LPARAM lParam)
+static int SrvGroupNamesEnumProc(const char *szSetting, void *lParam)
{
// check server-group cache item
const char **params = (const char**)lParam;
diff --git a/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp index afa1843853..139f89a658 100644 --- a/protocols/IcqOscarJ/src/icq_uploadui.cpp +++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp @@ -131,7 +131,7 @@ static void GetLastUploadLogLine(HWND hwndDlg, char *szBuf, size_t cbBuf) make_utf8_string_static(str, szBuf, cbBuf);
}
-static int GroupEnumIdsEnumProc(const char *szSetting, LPARAM lParam)
+static int GroupEnumIdsEnumProc(const char *szSetting, void *lParam)
{
// it is probably server group
if (szSetting && mir_strlen(szSetting) < 5) {
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index d06af0543d..48512b0da9 100755 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -722,7 +722,7 @@ namespace omemo { db_enum_settings_sub_cb_data(); //we always need array size
};
- int db_enum_settings_sub_cb(const char *szSetting, LPARAM lParam)
+ int db_enum_settings_sub_cb(const char *szSetting, void *lParam)
{
db_enum_settings_sub_cb_data* data = (db_enum_settings_sub_cb_data*)lParam;
if (strstr(szSetting, "OmemoSignalSession_"))
@@ -765,7 +765,7 @@ namespace omemo { ud->sessions = l;
ud->name = name;
ud->name_len = name_len;
- db_enum_settings(data->hContact, &db_enum_settings_sub_cb, data->proto->m_szModuleName, (void*)ud);
+ db_enum_settings(data->hContact, &db_enum_settings_sub_cb, data->proto->m_szModuleName, ud);
*sessions = l;
delete ud;
return array_size;
@@ -870,7 +870,7 @@ namespace omemo { size_t name_len;
};
- int db_enum_settings_del_all_cb(const char *szSetting, LPARAM lParam)
+ int db_enum_settings_del_all_cb(const char *szSetting, void *lParam)
{
db_enum_settings_del_all_cb_data* data = (db_enum_settings_del_all_cb_data*)lParam;
if (strstr(szSetting, "OmemoSignalSession_"))
@@ -1989,7 +1989,7 @@ struct db_enum_settings_prekeys_cb_data };
-int db_enum_settings_prekeys_cb(const char *szSetting, LPARAM lParam)
+int db_enum_settings_prekeys_cb(const char *szSetting, void *lParam)
{
db_enum_settings_prekeys_cb_data* data = (db_enum_settings_prekeys_cb_data*)lParam;
if (strstr(szSetting, "OmemoPreKey") && strstr(szSetting, "Public")) //TODO: suboptimal code, use different names for simple searching
@@ -2031,7 +2031,7 @@ void CJabberProto::OmemoSendBundle() HXML prekeys_node = XmlAddChild(bundle_node, L"prekeys");
db_enum_settings_prekeys_cb_data *ud = new db_enum_settings_prekeys_cb_data;
- db_enum_settings(0, &db_enum_settings_prekeys_cb, m_szModuleName, (void*)ud);
+ db_enum_settings(0, &db_enum_settings_prekeys_cb, m_szModuleName, ud);
for (std::list<char*>::iterator i = ud->settings.begin(), end = ud->settings.end(); i != end; i++)
{
ptrW val(getWStringA(*i));
diff --git a/src/mir_app/src/db_ini.cpp b/src/mir_app/src/db_ini.cpp index 0c22077b3d..c670c66917 100644 --- a/src/mir_app/src/db_ini.cpp +++ b/src/mir_app/src/db_ini.cpp @@ -272,7 +272,7 @@ struct SettingsList SettingsList *next;
} *setting_items = nullptr;
-int SettingsEnumProc(const char *szSetting, LPARAM)
+int SettingsEnumProc(const char *szSetting, void *)
{
SettingsList *newItem = (SettingsList *)mir_alloc(sizeof(SettingsList));
newItem->name = mir_strdup(szSetting);
@@ -303,7 +303,7 @@ struct ESFDParam const char *pMask;
};
-static int EnumSettingsForDeletion(const char *szSetting, LPARAM param)
+static int EnumSettingsForDeletion(const char *szSetting, void *param)
{
ESFDParam *pParam = (ESFDParam*)param;
if (wildcmpi(szSetting, pParam->pMask))
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp index 1d5d5511db..0410de15a8 100644 --- a/src/mir_app/src/proto_accs.cpp +++ b/src/mir_app/src/proto_accs.cpp @@ -43,7 +43,7 @@ LIST<PROTOACCOUNT> accounts(10, CompareAccounts); /////////////////////////////////////////////////////////////////////////////////////////
-static int EnumDbModules(const char *szModuleName, DWORD, LPARAM)
+static int EnumDbModules(const char *szModuleName, void*)
{
ptrA szProtoName(db_get_sa(0, szModuleName, "AM_BaseProto"));
if (szProtoName) {
@@ -128,7 +128,7 @@ typedef struct }
enumDB_ProtoProcParam;
-static int enumDB_ProtoProc(const char* szSetting, LPARAM lParam)
+static int enumDB_ProtoProc(const char* szSetting, void *lParam)
{
if (szSetting) {
enumDB_ProtoProcParam* p = (enumDB_ProtoProcParam*)lParam;
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index 82758f7478..90db284edb 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -831,7 +831,7 @@ static void CALLBACK SrmmLoadToolbar() DestroyHookableEvent(hHookToolBarLoadedEvt); } -static int ConvertToolbarData(const char *szSetting, LPARAM) +static int ConvertToolbarData(const char *szSetting, void*) { DBVARIANT dbv; if (!db_get(0, "Tab" MODULENAME, szSetting, &dbv)) { diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp index ccd0cd1e9d..15e9f2465d 100644 --- a/src/mir_core/src/db.cpp +++ b/src/mir_core/src/db.cpp @@ -45,9 +45,9 @@ MIR_CORE_DLL(MIDatabase*) db_get_current() return currDb;
}
-static int sttEnumVars(const char *szVarName, LPARAM lParam)
+static int sttEnumVars(const char *szVarName, void *param)
{
- LIST<char>* vars = (LIST<char>*)lParam;
+ LIST<char>* vars = (LIST<char>*)param;
vars->insert(mir_strdup(szVarName));
return 0;
}
@@ -92,17 +92,17 @@ MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact) /////////////////////////////////////////////////////////////////////////////////////////
// enumerators
-MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC pFunc, const void *param)
+MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC pFunc, void *param)
{
return (currDb) ? currDb->EnumModuleNames(pFunc, param) : 0;
}
-MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, const void *param)
+MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param)
{
return (currDb) ? currDb->EnumResidentSettings(pFunc, param) : 0;
}
-EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pFunc, const char *szModule, const void *param)
+EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pFunc, const char *szModule, void *param)
{
return (currDb) ? currDb->EnumContactSettings(hContact, pFunc, szModule, param) : 0;
}
|