summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-03 15:57:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-03 15:57:14 +0000
commitcd4e43a5af4dcf660969bc5abada0d97cfd0cd03 (patch)
tree2cb7da25499aa1258196b6a2dc80346cfe40a2f1
parent23617c95e41dc21347d4957c29fe5989a36e2a85 (diff)
version related code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7478 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/CryptoPP/src/cpp_misc.cpp2
-rw-r--r--plugins/CryptoPP/src/version.h29
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp8
-rw-r--r--plugins/TabSRMM/src/msgs.cpp11
-rw-r--r--plugins/VersionInfo/src/CVersionInfo.cpp55
-rw-r--r--plugins/helpers/gen_helpers.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp540
-rw-r--r--protocols/Gadu-Gadu/src/version.h22
-rw-r--r--protocols/IRCG/src/main.cpp2
-rw-r--r--protocols/IRCG/src/version.h11
-rw-r--r--protocols/IcqOscarJ/src/icq_constants.h2
-rw-r--r--protocols/IcqOscarJ/src/init.cpp2
-rw-r--r--protocols/IcqOscarJ/src/version.h22
-rw-r--r--protocols/JabberG/src/jabber.cpp2
-rw-r--r--protocols/JabberG/src/jabber_api.cpp2
-rw-r--r--protocols/JabberG/src/version.h10
-rw-r--r--protocols/MSN/src/msn.cpp2
-rw-r--r--protocols/MSN/src/version.h23
-rw-r--r--protocols/Yahoo/src/main.cpp20
-rw-r--r--protocols/Yahoo/src/version.h22
20 files changed, 389 insertions, 400 deletions
diff --git a/plugins/CryptoPP/src/cpp_misc.cpp b/plugins/CryptoPP/src/cpp_misc.cpp
index 77de159fcb..ec7a0ae043 100644
--- a/plugins/CryptoPP/src/cpp_misc.cpp
+++ b/plugins/CryptoPP/src/cpp_misc.cpp
@@ -14,7 +14,7 @@ int __cdecl cpp_get_error(HANDLE context) {
int __cdecl cpp_get_version(void) {
- return __VERSION_DWORD;
+ return PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM);
}
diff --git a/plugins/CryptoPP/src/version.h b/plugins/CryptoPP/src/version.h
index 5b2341dd2e..82dcf64589 100644
--- a/plugins/CryptoPP/src/version.h
+++ b/plugins/CryptoPP/src/version.h
@@ -1,17 +1,16 @@
-#define __MAJOR_VERSION 1
-#define __MINOR_VERSION 0
-#define __RELEASE_NUM 4
-#define __BUILD_NUM 7
+#define __MAJOR_VERSION 1
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 4
+#define __BUILD_NUM 7
-#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define __TOSTRING(x) #x
-#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
-#define __VERSION_DWORD ((__MAJOR_VERSION<<24) | (__MINOR_VERSION<<16) | (__RELEASE_NUM<<8) | __BUILD_NUM)
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
-#define __PLUGIN_NAME "Crypto++"
-#define __FILENAME "CryptoPP.dll"
-#define __DESCRIPTION "Crypto++ library for SecureIM plugin."
-#define __AUTHOR "Baloo"
-#define __AUTHOREMAIL "baloo@bk.ru"
-#define __AUTHORWEB "http://miranda-ng.org/p/CryptoPP/"
-#define __COPYRIGHT "© 2006-09 Baloo"
+#define __PLUGIN_NAME "Crypto++"
+#define __FILENAME "CryptoPP.dll"
+#define __DESCRIPTION "Crypto++ library for SecureIM plugin."
+#define __AUTHOR "Baloo"
+#define __AUTHOREMAIL "baloo@bk.ru"
+#define __AUTHORWEB "http://miranda-ng.org/p/CryptoPP/"
+#define __COPYRIGHT "© 2006-09 Baloo"
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 219c01f4b1..40510ee3b1 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -65,9 +65,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
gMirandaVersion = mirandaVersion;
- if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 8, 0, 0))
- return NULL;
-
return &pluginInfo;
}
@@ -166,15 +163,12 @@ void PasteIt(HANDLE hContact, int mode)
Miranda_Plugin_InfoEx infoEx = (Miranda_Plugin_InfoEx) GetProcAddress(hInst, "MirandaPluginInfoEx");
PLUGININFOEX* pi = NULL;
if(infoEx != NULL)
- {
pi = infoEx(gMirandaVersion);
- }
+
// If PLUGININFOEX flags contains UNICODE_AWARE,
// this mean that protocol is unicode.
if(pi != NULL && pi->cbSize == sizeof(PLUGININFOEX))
- {
isUnicodePlugin = pi->flags & UNICODE_AWARE;
- }
}
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index fb7fe23bb8..9e79d580cc 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -201,14 +201,11 @@ static INT_PTR GetMessageWindowFlags(WPARAM wParam, LPARAM lParam)
if (hwndTarget == 0)
hwndTarget = M.FindWindow((HANDLE)wParam);
- if (hwndTarget) {
- TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndTarget, GWLP_USERDATA);
- if (dat)
- return (dat->dwFlags);
- else
- return 0;
- } else
+ if (hwndTarget == 0)
return 0;
+
+ TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndTarget, GWLP_USERDATA);
+ return (dat) ? dat->dwFlags : 0;
}
/*
diff --git a/plugins/VersionInfo/src/CVersionInfo.cpp b/plugins/VersionInfo/src/CVersionInfo.cpp
index bb6aad9b6c..2f0a0dcd0d 100644
--- a/plugins/VersionInfo/src/CVersionInfo.cpp
+++ b/plugins/VersionInfo/src/CVersionInfo.cpp
@@ -685,50 +685,23 @@ bool CVersionInfo::GetPluginLists()
}
//Let's get the info.
- if (MirandaPluginInfo != NULL) {//a valid miranda plugin
- if (pluginInfo != NULL) {
- //We have loaded the informations into pluginInfo.
- std::tstring timedate = GetPluginTimestamp(&fd.ftLastWriteTime);
- CPlugin thePlugin(fd.cFileName, _A2T(pluginInfo->shortName), pluginInfo->uuid, /*(pluginInfo->flags & 1) ? _T("Unicode aware") :*/ _T(""), (DWORD) pluginInfo->version, timedate.c_str(), _T(""));
-
- if (PluginIsEnabled)
- AddPlugin(thePlugin, listActivePlugins);
- else {
- if ((IsUUIDNull(pluginInfo->uuid)) && (mirandaVersion >= PLUGIN_MAKE_VERSION(0,8,0,9))) {
- thePlugin.SetErrorMessage( _T(" Plugin does not have an UUID and will not work with Miranda 0.8.\r\n"));
- AddPlugin(thePlugin, listUnloadablePlugins);
- }
- else AddPlugin(thePlugin, listInactivePlugins);
-
- FreeLibrary(hInstPlugin); //We don't need it anymore.
- }
- FreePluginInfo(pluginInfo);
- MirandaPluginInfo = NULL;
- #ifdef _DEBUG
- if (verbose) {
- TCHAR szMsg[4096] = { 0 };
- mir_sntprintf(szMsg, SIZEOF(szMsg), _T("Done with: %s"), fd.cFileName);
- PUShowMessageT(szMsg, SM_NOTIFY);
- }
- #endif
- }
- else { //pluginINFO == NULL
- pluginInfo = CopyPluginInfo(MirandaPluginInfo(PLUGIN_MAKE_VERSION(9, 9, 9, 9))); //let's see if the plugin likes this miranda version
- char *szShortName = "<unknown>";
- std::tstring time = GetPluginTimestamp(&fd.ftLastWriteTime); //get the plugin timestamp;
- DWORD version = 0;
- if (pluginInfo) {
- szShortName = pluginInfo->shortName;
- version = pluginInfo->version;
- }
+ if (MirandaPluginInfo == NULL || pluginInfo == NULL) {
+ FreeLibrary(hInstPlugin); //We don't need it anymore.
+ continue;
+ }
- CPlugin thePlugin(fd.cFileName, _A2T(szShortName), (pluginInfo) ? pluginInfo->uuid : UUID_NULL, (/*((pluginInfo) && (pluginInfo->flags & 1)) ? _T("Unicode aware") :*/ _T("")), version, time.c_str(), _T(" Plugin refuses to load. Miranda version too old."));
+ //We have loaded the informations into pluginInfo.
+ std::tstring timedate = GetPluginTimestamp(&fd.ftLastWriteTime);
+ CPlugin thePlugin(fd.cFileName, _A2T(pluginInfo->shortName), pluginInfo->uuid, /*(pluginInfo->flags & 1) ? _T("Unicode aware") :*/ _T(""), (DWORD) pluginInfo->version, timedate.c_str(), _T(""));
- AddPlugin(thePlugin, listUnloadablePlugins);
- if (pluginInfo)
- FreePluginInfo(pluginInfo);
- }
+ if (PluginIsEnabled)
+ AddPlugin(thePlugin, listActivePlugins);
+ else {
+ AddPlugin(thePlugin, listInactivePlugins);
+ FreeLibrary(hInstPlugin); //We don't need it anymore.
}
+ FreePluginInfo(pluginInfo);
+ MirandaPluginInfo = NULL;
}
while (FindNextFile(hFind,&fd));
FindClose(hFind);
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp
index ce19a5bd51..1174f1fdeb 100644
--- a/plugins/helpers/gen_helpers.cpp
+++ b/plugins/helpers/gen_helpers.cpp
@@ -2,7 +2,7 @@
Helper functions for Miranda-IM (www.miranda-im.org)
Copyright 2006 P. Boon
- This program is mir_free software; you can redistribute it and/or modify
+ 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.
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 8c102df7a8..674ebe146d 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -25,17 +25,17 @@
// Plugin info
PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- __VERSION_DWORD,
- __DESCRIPTION,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- // {F3FF65F3-250E-416A-BEE9-58C93F85AB33}
- { 0xf3ff65f3, 0x250e, 0x416a, { 0xbe, 0xe9, 0x58, 0xc9, 0x3f, 0x85, 0xab, 0x33 } }
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ // {F3FF65F3-250E-416A-BEE9-58C93F85AB33}
+ { 0xf3ff65f3, 0x250e, 0x416a, { 0xbe, 0xe9, 0x58, 0xc9, 0x3f, 0x85, 0xab, 0x33 } }
};
// Other variables
@@ -58,55 +58,55 @@ static unsigned long crc_table[256];
TCHAR* ws_strerror(int code)
{
- static TCHAR err_desc[160];
-
- // Not a windows error display WinSock
- if (code == 0)
- {
- TCHAR buff[128];
- int len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), 0, buff, SIZEOF(buff), NULL);
- if (len == 0)
- mir_sntprintf(err_desc, SIZEOF(err_desc), _T("WinSock %u: Unknown error."), WSAGetLastError());
- else
- mir_sntprintf(err_desc, SIZEOF(err_desc), _T("WinSock %d: %s"), WSAGetLastError(), buff);
- return err_desc;
- }
-
- // Return normal error
- return _tcserror(code);
+ static TCHAR err_desc[160];
+
+ // Not a windows error display WinSock
+ if (code == 0)
+ {
+ TCHAR buff[128];
+ int len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), 0, buff, SIZEOF(buff), NULL);
+ if (len == 0)
+ mir_sntprintf(err_desc, SIZEOF(err_desc), _T("WinSock %u: Unknown error."), WSAGetLastError());
+ else
+ mir_sntprintf(err_desc, SIZEOF(err_desc), _T("WinSock %d: %s"), WSAGetLastError(), buff);
+ return err_desc;
+ }
+
+ // Return normal error
+ return _tcserror(code);
}
//////////////////////////////////////////////////////////
// Build the crc table
void crc_gentable(void)
{
- unsigned long crc, poly;
- int i, j;
-
- poly = 0xEDB88320L;
- for (i = 0; i < 256; i++)
- {
- crc = i;
- for (j = 8; j > 0; j--)
- {
- if (crc & 1)
- crc = (crc >> 1) ^ poly;
- else
- crc >>= 1;
- }
- crc_table[i] = crc;
- }
+ unsigned long crc, poly;
+ int i, j;
+
+ poly = 0xEDB88320L;
+ for (i = 0; i < 256; i++)
+ {
+ crc = i;
+ for (j = 8; j > 0; j--)
+ {
+ if (crc & 1)
+ crc = (crc >> 1) ^ poly;
+ else
+ crc >>= 1;
+ }
+ crc_table[i] = crc;
+ }
}
//////////////////////////////////////////////////////////
// Calculate the crc value
unsigned long crc_get(char *mem)
{
- register unsigned long crc = 0xFFFFFFFF;
- while(mem && *mem)
- crc = ((crc>>8) & 0x00FFFFFF) ^ crc_table[(crc ^ *(mem++)) & 0xFF];
+ register unsigned long crc = 0xFFFFFFFF;
+ while(mem && *mem)
+ crc = ((crc>>8) & 0x00FFFFFF) ^ crc_table[(crc ^ *(mem++)) & 0xFF];
- return (crc ^ 0xFFFFFFFF);
+ return (crc ^ 0xFFFFFFFF);
}
//////////////////////////////////////////////////////////
@@ -115,21 +115,21 @@ unsigned long crc_get(char *mem)
// returns http error text
const TCHAR *http_error_string(int h)
{
- switch (h)
- {
- case 0:
- return (errno == ENOMEM) ? TranslateT("HTTP failed memory") : TranslateT("HTTP failed connecting");
- case GG_ERROR_RESOLVING:
- return TranslateT("HTTP failed resolving");
- case GG_ERROR_CONNECTING:
- return TranslateT("HTTP failed connecting");
- case GG_ERROR_READING:
- return TranslateT("HTTP failed reading");
- case GG_ERROR_WRITING:
- return TranslateT("HTTP failed writing");
- }
-
- return TranslateT("Unknown HTTP error");
+ switch (h)
+ {
+ case 0:
+ return (errno == ENOMEM) ? TranslateT("HTTP failed memory") : TranslateT("HTTP failed connecting");
+ case GG_ERROR_RESOLVING:
+ return TranslateT("HTTP failed resolving");
+ case GG_ERROR_CONNECTING:
+ return TranslateT("HTTP failed connecting");
+ case GG_ERROR_READING:
+ return TranslateT("HTTP failed reading");
+ case GG_ERROR_WRITING:
+ return TranslateT("HTTP failed writing");
+ }
+
+ return TranslateT("Unknown HTTP error");
}
//////////////////////////////////////////////////////////
@@ -137,7 +137,7 @@ const TCHAR *http_error_string(int h)
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
- return &pluginInfo;
+ return &pluginInfo;
}
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST};
@@ -147,37 +147,37 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO
void GGPROTO::cleanuplastplugin(DWORD version)
{
- // Store current plugin version
- setDword(GG_PLUGINVERSION, pluginInfo.version);
-
- //1. clean files: %miranda_avatarcache%\GG\*.(null)
- if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 2)){
- debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version);
-
- TCHAR avatarsPath[MAX_PATH];
- mir_sntprintf(avatarsPath, MAX_PATH, _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName);
-
- debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath);
-
- if (avatarsPath != NULL){
- HANDLE hFind = INVALID_HANDLE_VALUE;
- TCHAR spec[MAX_PATH + 10];
- mir_sntprintf(spec, MAX_PATH + 10, _T("%s\\*.(null)"), avatarsPath);
- WIN32_FIND_DATA ffd;
- hFind = FindFirstFile(spec, &ffd);
- if (hFind != INVALID_HANDLE_VALUE) {
- do {
- TCHAR filePathT [2*MAX_PATH + 10];
- mir_sntprintf(filePathT, 2*MAX_PATH + 10, _T("%s\\%s"), avatarsPath, ffd.cFileName);
- if (!_taccess(filePathT, 0)){
- debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT);
- _tremove(filePathT);
- }
- } while (FindNextFile(hFind, &ffd) != 0);
- FindClose(hFind);
- }
- }
- }
+ // Store current plugin version
+ setDword(GG_PLUGINVERSION, pluginInfo.version);
+
+ //1. clean files: %miranda_avatarcache%\GG\*.(null)
+ if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 2)){
+ debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version);
+
+ TCHAR avatarsPath[MAX_PATH];
+ mir_sntprintf(avatarsPath, MAX_PATH, _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName);
+
+ debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath);
+
+ if (avatarsPath != NULL){
+ HANDLE hFind = INVALID_HANDLE_VALUE;
+ TCHAR spec[MAX_PATH + 10];
+ mir_sntprintf(spec, MAX_PATH + 10, _T("%s\\*.(null)"), avatarsPath);
+ WIN32_FIND_DATA ffd;
+ hFind = FindFirstFile(spec, &ffd);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ do {
+ TCHAR filePathT [2*MAX_PATH + 10];
+ mir_sntprintf(filePathT, 2*MAX_PATH + 10, _T("%s\\%s"), avatarsPath, ffd.cFileName);
+ if (!_taccess(filePathT, 0)){
+ debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT);
+ _tremove(filePathT);
+ }
+ } while (FindNextFile(hFind, &ffd) != 0);
+ FindClose(hFind);
+ }
+ }
+ }
}
@@ -185,57 +185,57 @@ void GGPROTO::cleanuplastplugin(DWORD version)
// When Miranda loaded its modules
static int gg_modulesloaded(WPARAM wParam, LPARAM lParam)
{
- // Get SSL API
- mir_getSI(&si);
+ // Get SSL API
+ mir_getSI(&si);
- // File Association Manager support
- gg_links_init();
+ // File Association Manager support
+ gg_links_init();
- return 0;
+ return 0;
}
//////////////////////////////////////////////////////////
// Gets protocol instance associated with a contact
static GGPROTO* gg_getprotoinstance(HANDLE hContact)
{
- char* szProto = GetContactProto(hContact);
- if (szProto == NULL)
- return NULL;
+ char* szProto = GetContactProto(hContact);
+ if (szProto == NULL)
+ return NULL;
- for (int i=0; i < g_Instances.getCount(); i++)
- if (strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
- return g_Instances[i];
+ for (int i=0; i < g_Instances.getCount(); i++)
+ if (strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
+ return g_Instances[i];
- return NULL;
+ return NULL;
}
//////////////////////////////////////////////////////////
// Handles PrebuildContactMenu event
static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
{
- const HANDLE hContact = (HANDLE)wParam;
- GGPROTO* gg = gg_getprotoinstance(hContact);
- if (gg == NULL)
- return 0;
-
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
- if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
- gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
- mi.flags |= CMIF_HIDDEN;
- mi.ptszName = gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
- Menu_ModifyItem(gg->hBlockMenuItem, &mi);
- return 0;
+ const HANDLE hContact = (HANDLE)wParam;
+ GGPROTO* gg = gg_getprotoinstance(hContact);
+ if (gg == NULL)
+ return 0;
+
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
+ if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
+ gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
+ mi.flags |= CMIF_HIDDEN;
+ mi.ptszName = gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
+ Menu_ModifyItem(gg->hBlockMenuItem, &mi);
+ return 0;
}
//////////////////////////////////////////////////////////
// Contact block service function
INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
{
- const HANDLE hContact = (HANDLE)wParam;
- setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
- notifyuser(hContact, 1);
- return 0;
+ const HANDLE hContact = (HANDLE)wParam;
+ setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
+ notifyuser(hContact, 1);
+ return 0;
}
@@ -245,20 +245,20 @@ INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
#define GGS_BLOCKUSER "/BlockUser"
void GGPROTO::block_init()
{
- char service[64];
- mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, GGS_BLOCKUSER);
- CreateProtoService(GGS_BLOCKUSER, &GGPROTO::blockuser);
-
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_TCHAR;
- mi.position = -500050000;
- mi.icolibItem = iconList[8].hIcolib;
- mi.ptszName = LPGENT("&Block");
- mi.pszService = service;
- mi.pszContactOwner = m_szModuleName;
- hBlockMenuItem = Menu_AddContactMenuItem(&mi);
-
- ::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
+ char service[64];
+ mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, GGS_BLOCKUSER);
+ CreateProtoService(GGS_BLOCKUSER, &GGPROTO::blockuser);
+
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIF_TCHAR;
+ mi.position = -500050000;
+ mi.icolibItem = iconList[8].hIcolib;
+ mi.ptszName = LPGENT("&Block");
+ mi.pszService = service;
+ mi.pszContactOwner = m_szModuleName;
+ hBlockMenuItem = Menu_AddContactMenuItem(&mi);
+
+ ::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
}
//////////////////////////////////////////////////////////
@@ -266,46 +266,46 @@ void GGPROTO::block_init()
void GGPROTO::block_uninit()
{
- CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
}
//////////////////////////////////////////////////////////
// Menus initialization
void GGPROTO::menus_init()
{
- CLISTMENUITEM mi = { sizeof(mi) };
-
- HGENMENU hGCRoot, hCLRoot, hRoot = MO_GetProtoRootMenu(m_szModuleName);
- if (hRoot == NULL) {
- mi.ptszName = m_tszUserName;
- mi.position = 500090000;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.icolibItem = iconList[0].hIcolib;
- hGCRoot = hCLRoot = hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
- }
- else {
- mi.hParentMenu = hRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
-
- mi.ptszName = LPGENT("Conference");
- mi.position = 200001;
- mi.icolibItem = iconList[14].hIcolib;
- hGCRoot = Menu_AddProtoMenuItem(&mi);
-
- mi.ptszName = LPGENT("Contact list");
- mi.position = 200002;
- mi.icolibItem = iconList[7].hIcolib;
- hCLRoot = Menu_AddProtoMenuItem(&mi);
-
- if (hMenuRoot)
- CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)hMenuRoot, 0);
- hMenuRoot = NULL;
- }
-
- gc_menus_init(hGCRoot);
- import_init(hCLRoot);
- sessions_menus_init(hRoot);
+ CLISTMENUITEM mi = { sizeof(mi) };
+
+ HGENMENU hGCRoot, hCLRoot, hRoot = MO_GetProtoRootMenu(m_szModuleName);
+ if (hRoot == NULL) {
+ mi.ptszName = m_tszUserName;
+ mi.position = 500090000;
+ mi.hParentMenu = HGENMENU_ROOT;
+ mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.icolibItem = iconList[0].hIcolib;
+ hGCRoot = hCLRoot = hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
+ }
+ else {
+ mi.hParentMenu = hRoot;
+ mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+
+ mi.ptszName = LPGENT("Conference");
+ mi.position = 200001;
+ mi.icolibItem = iconList[14].hIcolib;
+ hGCRoot = Menu_AddProtoMenuItem(&mi);
+
+ mi.ptszName = LPGENT("Contact list");
+ mi.position = 200002;
+ mi.icolibItem = iconList[7].hIcolib;
+ hCLRoot = Menu_AddProtoMenuItem(&mi);
+
+ if (hMenuRoot)
+ CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)hMenuRoot, 0);
+ hMenuRoot = NULL;
+ }
+
+ gc_menus_init(hGCRoot);
+ import_init(hCLRoot);
+ sessions_menus_init(hRoot);
}
//////////////////////////////////////////////////////////
@@ -313,9 +313,9 @@ void GGPROTO::menus_init()
static GGPROTO *gg_proto_init(const char* pszProtoName, const TCHAR* tszUserName)
{
- GGPROTO *gg = new GGPROTO(pszProtoName, tszUserName);
- g_Instances.insert(gg);
- return gg;
+ GGPROTO *gg = new GGPROTO(pszProtoName, tszUserName);
+ g_Instances.insert(gg);
+ return gg;
}
//////////////////////////////////////////////////////////
@@ -323,10 +323,10 @@ static GGPROTO *gg_proto_init(const char* pszProtoName, const TCHAR* tszUserName
static int gg_proto_uninit(PROTO_INTERFACE *proto)
{
- GGPROTO *gg = (GGPROTO *)proto;
- g_Instances.remove(gg);
- delete gg;
- return 0;
+ GGPROTO *gg = (GGPROTO *)proto;
+ g_Instances.remove(gg);
+ delete gg;
+ return 0;
}
//////////////////////////////////////////////////////////
@@ -334,24 +334,24 @@ static int gg_proto_uninit(PROTO_INTERFACE *proto)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getXI(&xi);
- mir_getLP(&pluginInfo);
- mir_getCLI();
-
- // Hook system events
- hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, gg_modulesloaded);
-
- // Prepare protocol name
- PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
- pd.szName = GGDEF_PROTO;
- pd.fnInit = (pfnInitProto)gg_proto_init;
- pd.fnUninit = (pfnUninitProto)gg_proto_uninit;
- pd.type = PROTOTYPE_PROTOCOL;
-
- // Register module
- CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM) &pd);
- gg_links_instancemenu_init();
- return 0;
+ mir_getXI(&xi);
+ mir_getLP(&pluginInfo);
+ mir_getCLI();
+
+ // Hook system events
+ hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, gg_modulesloaded);
+
+ // Prepare protocol name
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
+ pd.szName = GGDEF_PROTO;
+ pd.fnInit = (pfnInitProto)gg_proto_init;
+ pd.fnUninit = (pfnUninitProto)gg_proto_uninit;
+ pd.type = PROTOTYPE_PROTOCOL;
+
+ // Register module
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM) &pd);
+ gg_links_instancemenu_init();
+ return 0;
}
//////////////////////////////////////////////////////////
@@ -359,96 +359,96 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload()
{
- WSACleanup();
- return 0;
+ WSACleanup();
+ return 0;
}
//////////////////////////////////////////////////////////
// DEBUGING FUNCTIONS
struct
{
- int type;
- char *text;
+ int type;
+ char *text;
}
static const ggdebug_eventype2string[] =
{
- {GG_EVENT_NONE, "GG_EVENT_NONE"},
- {GG_EVENT_MSG, "GG_EVENT_MSG"},
- {GG_EVENT_NOTIFY, "GG_EVENT_NOTIFY"},
- {GG_EVENT_NOTIFY_DESCR, "GG_EVENT_NOTIFY_DESCR"},
- {GG_EVENT_STATUS, "GG_EVENT_STATUS"},
- {GG_EVENT_ACK, "GG_EVENT_ACK"},
- {GG_EVENT_PONG, "GG_EVENT_PONG"},
- {GG_EVENT_CONN_FAILED, "GG_EVENT_CONN_FAILED"},
- {GG_EVENT_CONN_SUCCESS, "GG_EVENT_CONN_SUCCESS"},
- {GG_EVENT_DISCONNECT, "GG_EVENT_DISCONNECT"},
- {GG_EVENT_DCC_NEW, "GG_EVENT_DCC_NEW"},
- {GG_EVENT_DCC_ERROR, "GG_EVENT_DCC_ERROR"},
- {GG_EVENT_DCC_DONE, "GG_EVENT_DCC_DONE"},
- {GG_EVENT_DCC_CLIENT_ACCEPT, "GG_EVENT_DCC_CLIENT_ACCEPT"},
- {GG_EVENT_DCC_CALLBACK, "GG_EVENT_DCC_CALLBACK"},
- {GG_EVENT_DCC_NEED_FILE_INFO, "GG_EVENT_DCC_NEED_FILE_INFO"},
- {GG_EVENT_DCC_NEED_FILE_ACK, "GG_EVENT_DCC_NEED_FILE_ACK"},
- {GG_EVENT_DCC_NEED_VOICE_ACK, "GG_EVENT_DCC_NEED_VOICE_ACK"},
- {GG_EVENT_DCC_VOICE_DATA, "GG_EVENT_DCC_VOICE_DATA"},
- {GG_EVENT_PUBDIR50_SEARCH_REPLY,"GG_EVENT_PUBDIR50_SEARCH_REPLY"},
- {GG_EVENT_PUBDIR50_READ, "GG_EVENT_PUBDIR50_READ"},
- {GG_EVENT_PUBDIR50_WRITE, "GG_EVENT_PUBDIR50_WRITE"},
- {GG_EVENT_STATUS60, "GG_EVENT_STATUS60"},
- {GG_EVENT_NOTIFY60, "GG_EVENT_NOTIFY60"},
- {GG_EVENT_USERLIST, "GG_EVENT_USERLIST"},
- {GG_EVENT_IMAGE_REQUEST, "GG_EVENT_IMAGE_REQUEST"},
- {GG_EVENT_IMAGE_REPLY, "GG_EVENT_IMAGE_REPLY"},
- {GG_EVENT_DCC_ACK, "GG_EVENT_DCC_ACK"},
- {GG_EVENT_DCC7_NEW, "GG_EVENT_DCC7_NEW"},
- {GG_EVENT_DCC7_ACCEPT, "GG_EVENT_DCC7_ACCEPT"},
- {GG_EVENT_DCC7_REJECT, "GG_EVENT_DCC7_REJECT"},
- {GG_EVENT_DCC7_CONNECTED, "GG_EVENT_DCC7_CONNECTED"},
- {GG_EVENT_DCC7_ERROR, "GG_EVENT_DCC7_ERROR"},
- {GG_EVENT_DCC7_DONE, "GG_EVENT_DCC7_DONE"},
- {GG_EVENT_DCC7_PENDING, "GG_EVENT_DCC7_PENDING"},
- {GG_EVENT_XML_EVENT, "GG_EVENT_XML_EVENT"},
- {GG_EVENT_DISCONNECT_ACK, "GG_EVENT_DISCONNECT_ACK"},
- {GG_EVENT_XML_ACTION, "GG_EVENT_XML_ACTION"},
- {GG_EVENT_TYPING_NOTIFICATION, "GG_EVENT_TYPING_NOTIFICATION"},
- {GG_EVENT_USER_DATA, "GG_EVENT_USER_DATA"},
- {GG_EVENT_MULTILOGON_MSG, "GG_EVENT_MULTILOGON_MSG"},
- {GG_EVENT_MULTILOGON_INFO, "GG_EVENT_MULTILOGON_INFO"},
- {-1, "<unknown event>"}
+ {GG_EVENT_NONE, "GG_EVENT_NONE"},
+ {GG_EVENT_MSG, "GG_EVENT_MSG"},
+ {GG_EVENT_NOTIFY, "GG_EVENT_NOTIFY"},
+ {GG_EVENT_NOTIFY_DESCR, "GG_EVENT_NOTIFY_DESCR"},
+ {GG_EVENT_STATUS, "GG_EVENT_STATUS"},
+ {GG_EVENT_ACK, "GG_EVENT_ACK"},
+ {GG_EVENT_PONG, "GG_EVENT_PONG"},
+ {GG_EVENT_CONN_FAILED, "GG_EVENT_CONN_FAILED"},
+ {GG_EVENT_CONN_SUCCESS, "GG_EVENT_CONN_SUCCESS"},
+ {GG_EVENT_DISCONNECT, "GG_EVENT_DISCONNECT"},
+ {GG_EVENT_DCC_NEW, "GG_EVENT_DCC_NEW"},
+ {GG_EVENT_DCC_ERROR, "GG_EVENT_DCC_ERROR"},
+ {GG_EVENT_DCC_DONE, "GG_EVENT_DCC_DONE"},
+ {GG_EVENT_DCC_CLIENT_ACCEPT, "GG_EVENT_DCC_CLIENT_ACCEPT"},
+ {GG_EVENT_DCC_CALLBACK, "GG_EVENT_DCC_CALLBACK"},
+ {GG_EVENT_DCC_NEED_FILE_INFO, "GG_EVENT_DCC_NEED_FILE_INFO"},
+ {GG_EVENT_DCC_NEED_FILE_ACK, "GG_EVENT_DCC_NEED_FILE_ACK"},
+ {GG_EVENT_DCC_NEED_VOICE_ACK, "GG_EVENT_DCC_NEED_VOICE_ACK"},
+ {GG_EVENT_DCC_VOICE_DATA, "GG_EVENT_DCC_VOICE_DATA"},
+ {GG_EVENT_PUBDIR50_SEARCH_REPLY,"GG_EVENT_PUBDIR50_SEARCH_REPLY"},
+ {GG_EVENT_PUBDIR50_READ, "GG_EVENT_PUBDIR50_READ"},
+ {GG_EVENT_PUBDIR50_WRITE, "GG_EVENT_PUBDIR50_WRITE"},
+ {GG_EVENT_STATUS60, "GG_EVENT_STATUS60"},
+ {GG_EVENT_NOTIFY60, "GG_EVENT_NOTIFY60"},
+ {GG_EVENT_USERLIST, "GG_EVENT_USERLIST"},
+ {GG_EVENT_IMAGE_REQUEST, "GG_EVENT_IMAGE_REQUEST"},
+ {GG_EVENT_IMAGE_REPLY, "GG_EVENT_IMAGE_REPLY"},
+ {GG_EVENT_DCC_ACK, "GG_EVENT_DCC_ACK"},
+ {GG_EVENT_DCC7_NEW, "GG_EVENT_DCC7_NEW"},
+ {GG_EVENT_DCC7_ACCEPT, "GG_EVENT_DCC7_ACCEPT"},
+ {GG_EVENT_DCC7_REJECT, "GG_EVENT_DCC7_REJECT"},
+ {GG_EVENT_DCC7_CONNECTED, "GG_EVENT_DCC7_CONNECTED"},
+ {GG_EVENT_DCC7_ERROR, "GG_EVENT_DCC7_ERROR"},
+ {GG_EVENT_DCC7_DONE, "GG_EVENT_DCC7_DONE"},
+ {GG_EVENT_DCC7_PENDING, "GG_EVENT_DCC7_PENDING"},
+ {GG_EVENT_XML_EVENT, "GG_EVENT_XML_EVENT"},
+ {GG_EVENT_DISCONNECT_ACK, "GG_EVENT_DISCONNECT_ACK"},
+ {GG_EVENT_XML_ACTION, "GG_EVENT_XML_ACTION"},
+ {GG_EVENT_TYPING_NOTIFICATION, "GG_EVENT_TYPING_NOTIFICATION"},
+ {GG_EVENT_USER_DATA, "GG_EVENT_USER_DATA"},
+ {GG_EVENT_MULTILOGON_MSG, "GG_EVENT_MULTILOGON_MSG"},
+ {GG_EVENT_MULTILOGON_INFO, "GG_EVENT_MULTILOGON_INFO"},
+ {-1, "<unknown event>"}
};
const char *ggdebug_eventtype(gg_event *e)
{
- int i;
- for(i = 0; ggdebug_eventype2string[i].type != -1; i++)
- if (ggdebug_eventype2string[i].type == e->type)
- return ggdebug_eventype2string[i].text;
- return ggdebug_eventype2string[i].text;
+ int i;
+ for(i = 0; ggdebug_eventype2string[i].type != -1; i++)
+ if (ggdebug_eventype2string[i].type == e->type)
+ return ggdebug_eventype2string[i].text;
+ return ggdebug_eventype2string[i].text;
}
//////////////////////////////////////////////////////////
// Log funcion
-#define PREFIXLEN 6 //prefix present in DEBUGMODE contains GetCurrentThreadId()
+#define PREFIXLEN 6 //prefix present in DEBUGMODE contains GetCurrentThreadId()
#ifdef DEBUGMODE
void gg_debughandler(int level, const char *format, va_list ap)
{
- char szText[1024], *szFormat = _strdup(format);
- // Kill end line
- char *nl = strrchr(szFormat, '\n');
- if (nl) *nl = 0;
-
- strncpy(szText + PREFIXLEN, "[libgadu] \0", sizeof(szText) - PREFIXLEN);
-
- char prefix[6];
- mir_snprintf(prefix, PREFIXLEN, "%lu", GetCurrentThreadId());
- size_t prefixLen = strlen(prefix);
- if (prefixLen < PREFIXLEN) memset(prefix + prefixLen, ' ', PREFIXLEN - prefixLen);
- memcpy(szText, prefix, PREFIXLEN);
-
- mir_vsnprintf(szText + strlen(szText), sizeof(szText) - strlen(szText), szFormat, ap);
- CallService(MS_NETLIB_LOG, NULL, (LPARAM)szText);
- free(szFormat);
+ char szText[1024], *szFormat = _strdup(format);
+ // Kill end line
+ char *nl = strrchr(szFormat, '\n');
+ if (nl) *nl = 0;
+
+ strncpy(szText + PREFIXLEN, "[libgadu] \0", sizeof(szText) - PREFIXLEN);
+
+ char prefix[6];
+ mir_snprintf(prefix, PREFIXLEN, "%lu", GetCurrentThreadId());
+ size_t prefixLen = strlen(prefix);
+ if (prefixLen < PREFIXLEN) memset(prefix + prefixLen, ' ', PREFIXLEN - prefixLen);
+ memcpy(szText, prefix, PREFIXLEN);
+
+ mir_vsnprintf(szText + strlen(szText), sizeof(szText) - strlen(szText), szFormat, ap);
+ CallService(MS_NETLIB_LOG, NULL, (LPARAM)szText);
+ free(szFormat);
}
#endif
@@ -457,11 +457,11 @@ void gg_debughandler(int level, const char *format, va_list ap)
BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
- crc_gentable();
- hInstance = hInst;
+ crc_gentable();
+ hInstance = hInst;
#ifdef DEBUGMODE
- gg_debug_level = GG_DEBUG_FUNCTION;
- gg_debug_handler = gg_debughandler;
+ gg_debug_level = GG_DEBUG_FUNCTION;
+ gg_debug_handler = gg_debughandler;
#endif
- return TRUE;
+ return TRUE;
}
diff --git a/protocols/Gadu-Gadu/src/version.h b/protocols/Gadu-Gadu/src/version.h
index 0617f60be8..cf7f4a0404 100644
--- a/protocols/Gadu-Gadu/src/version.h
+++ b/protocols/Gadu-Gadu/src/version.h
@@ -18,15 +18,19 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
////////////////////////////////////////////////////////////////////////////////
-#define __FILEVERSION_STRING 0,11,0,3
-#define __VERSION_STRING "0.11.0.3"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 11, 0, 3)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 3
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
-#define __PLUGIN_NAME "Gadu-Gadu Protocol"
-#define __DESCRIPTION "Gadu-Gadu protocol support for Miranda NG."
-#define __AUTHOR "Bartosz Bialek, Adam Strzelecki"
-#define __AUTHOREMAIL "dezred"/*antispam*/"@"/*antispam*/"gmail"/*antispam*/"."/*antispam*/"com"
-#define __COPYRIGHT "© 2009-2012 Bartosz Bialek, 2003-2009 Adam Strzelecki"
-#define __AUTHORWEB "http://miranda-ng.org/p/GG/"
+#define __PLUGIN_NAME "Gadu-Gadu Protocol"
+#define __DESCRIPTION "Gadu-Gadu protocol support for Miranda NG."
+#define __AUTHOR "Bartosz Bialek, Adam Strzelecki"
+#define __AUTHOREMAIL "dezred"/*antispam*/"@"/*antispam*/"gmail"/*antispam*/"."/*antispam*/"com"
+#define __COPYRIGHT "© 2009-2012 Bartosz Bialek, 2003-2009 Adam Strzelecki"
+#define __AUTHORWEB "http://miranda-ng.org/p/GG/"
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp
index 77024b358c..dff017fdee 100644
--- a/protocols/IRCG/src/main.cpp
+++ b/protocols/IRCG/src/main.cpp
@@ -48,7 +48,7 @@ PLUGININFOEX pluginInfo =
{
sizeof( PLUGININFOEX ),
__PLUGIN_NAME,
- __VERSION_DWORD,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
__DESC,
__AUTHOR,
__AUTHOREMAIL,
diff --git a/protocols/IRCG/src/version.h b/protocols/IRCG/src/version.h
index 6bc9f439de..5ab18e5aa4 100644
--- a/protocols/IRCG/src/version.h
+++ b/protocols/IRCG/src/version.h
@@ -1,6 +1,11 @@
-#define __FILEVERSION_STRING 0,11,0,2
-#define __VERSION_STRING "0.11.0.2"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 11, 0, 2)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 2
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
#define __DESC "Internet Relay Chat (IRC) protocol support for Miranda NG."
#define __AUTHOR "Miranda team"
diff --git a/protocols/IcqOscarJ/src/icq_constants.h b/protocols/IcqOscarJ/src/icq_constants.h
index 5321c170bb..5095b781fa 100644
--- a/protocols/IcqOscarJ/src/icq_constants.h
+++ b/protocols/IcqOscarJ/src/icq_constants.h
@@ -620,7 +620,7 @@
// Internal Constants
#define ICQ_PROTOCOL_NAME LPGEN("ICQ")
-#define ICQ_PLUG_VERSION __VERSION_DWORD
+#define ICQ_PLUG_VERSION PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)
#define ICQ_VERSION 8 // Protocol version
#define DC_TYPE DC_NORMAL // Used for DC settings
#define MAX_CONTACTSSEND 15
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index d57150c923..938d7ab41b 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -42,7 +42,7 @@ HANDLE hExtraXStatus;
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
- __VERSION_DWORD,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
__DESCRIPTION,
__AUTHOR,
__AUTHOREMAIL,
diff --git a/protocols/IcqOscarJ/src/version.h b/protocols/IcqOscarJ/src/version.h
index 982bba6f14..cb045b18bb 100644
--- a/protocols/IcqOscarJ/src/version.h
+++ b/protocols/IcqOscarJ/src/version.h
@@ -1,11 +1,15 @@
-#define __FILEVERSION_STRING 0,11,0,1
-#define __VERSION_STRING "0.11.0.1"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 11, 0, 1)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
-#define __PLUGIN_NAME "IcqOscarJ Protocol"
-#define __DESCRIPTION "ICQ protocol support for Miranda NG."
-#define __AUTHOR "Joe Kucera, Bio, Martin \xd6" "berg, Richard Hughes, Jon Keating, etc."
-#define __AUTHOREMAIL "jokusoftware@miranda-im.org"
-#define __AUTHORWEB "http://miranda-ng.org/p/ICQ/"
-#define __COPYRIGHT "(C) 2000-2010 M.\xd6" "berg, R.Hughes, J.Keating, Bio, Angeli-Ka, G.Hazan, J.Kucera"
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
+#define __PLUGIN_NAME "IcqOscarJ Protocol"
+#define __DESCRIPTION "ICQ protocol support for Miranda NG."
+#define __AUTHOR "Joe Kucera, Bio, Martin \xd6" "berg, Richard Hughes, Jon Keating, etc."
+#define __AUTHOREMAIL "jokusoftware@miranda-im.org"
+#define __AUTHORWEB "http://miranda-ng.org/p/ICQ/"
+#define __COPYRIGHT "(C) 2000-2010 M.\xd6" "berg, R.Hughes, J.Keating, Bio, Angeli-Ka, G.Hazan, J.Kucera"
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 89bc5e6667..c666479159 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -43,7 +43,7 @@ TCHAR szCoreVersion[100];
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
- __VERSION_DWORD,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
__DESCRIPTION,
__AUTHOR,
__AUTHOREMAIL,
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp
index 8eb0d5352b..41352082c2 100644
--- a/protocols/JabberG/src/jabber_api.cpp
+++ b/protocols/JabberG/src/jabber_api.cpp
@@ -46,7 +46,7 @@ int CJabberProto::GetVersion() const
DWORD CJabberProto::GetJabberVersion() const
{
- return __VERSION_DWORD;
+ return PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM);
}
int CJabberProto::CompareJIDs(LPCTSTR jid1, LPCTSTR jid2)
diff --git a/protocols/JabberG/src/version.h b/protocols/JabberG/src/version.h
index 428c71a6bf..4d6d34d675 100644
--- a/protocols/JabberG/src/version.h
+++ b/protocols/JabberG/src/version.h
@@ -1,7 +1,11 @@
-#define __FILEVERSION_STRING 0,11,0,4
-#define __VERSION_STRING "0.11.0.4"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0,11,0,4)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 4
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
#define __PLUGIN_NAME "Jabber Protocol"
#define __DESCRIPTION "Jabber protocol support for Miranda NG."
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index 9978aef0b8..77ac325ac5 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -45,7 +45,7 @@ static const PLUGININFOEX pluginInfo =
{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
- __VERSION_DWORD,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
__DESCRIPTION,
__AUTHOR,
__AUTHOREMAIL,
diff --git a/protocols/MSN/src/version.h b/protocols/MSN/src/version.h
index 07d00b7ca6..7afcf80876 100644
--- a/protocols/MSN/src/version.h
+++ b/protocols/MSN/src/version.h
@@ -18,13 +18,18 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define __FILEVERSION_STRING 0,11,0,3
-#define __VERSION_STRING "0.11.0.3"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 11, 0, 3)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 2
-#define __PLUGIN_NAME "MSN Protocol"
-#define __DESCRIPTION "Microsoft Network (MSN) protocol support for Miranda NG."
-#define __AUTHOR "Boris Krasnovskiy, George Hazan, Richard Hughes"
-#define __AUTHOREMAIL "borkra@miranda-im.org"
-#define __COPYRIGHT "© 2001-2012 Richard Hughes, George Hazan, Boris Krasnovskiy"
-#define __AUTHORWEB "http://miranda-ng.org/p/MSN/"
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
+
+#define __PLUGIN_NAME "MSN Protocol"
+#define __DESCRIPTION "Microsoft Network (MSN) protocol support for Miranda NG."
+#define __AUTHOR "Boris Krasnovskiy, George Hazan, Richard Hughes"
+#define __AUTHOREMAIL "borkra@miranda-im.org"
+#define __COPYRIGHT "© 2001-2012 Richard Hughes, George Hazan, Boris Krasnovskiy"
+#define __AUTHORWEB "http://miranda-ng.org/p/MSN/"
diff --git a/protocols/Yahoo/src/main.cpp b/protocols/Yahoo/src/main.cpp
index 41678a630a..68e9a1167a 100644
--- a/protocols/Yahoo/src/main.cpp
+++ b/protocols/Yahoo/src/main.cpp
@@ -28,16 +28,16 @@ CLIST_INTERFACE *pcli;
int hLangpack;
PLUGININFOEX pluginInfo={
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- __VERSION_DWORD,
- __DESCRIPTION,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE, //not transient
- {0xaa7bfea, 0x1fc7, 0x45f0, {0x90, 0x6e, 0x2a, 0x46, 0xb6, 0xe1, 0x19, 0xcf}} // {0AA7BFEA-1FC7-45f0-906E-2A46B6E119CF}
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE, //not transient
+ {0xaa7bfea, 0x1fc7, 0x45f0, {0x90, 0x6e, 0x2a, 0x46, 0xb6, 0xe1, 0x19, 0xcf}} // {0AA7BFEA-1FC7-45f0-906E-2A46B6E119CF}
};
void YmsgrLinksInit(void);
diff --git a/protocols/Yahoo/src/version.h b/protocols/Yahoo/src/version.h
index 51e24d81eb..a703fdee06 100644
--- a/protocols/Yahoo/src/version.h
+++ b/protocols/Yahoo/src/version.h
@@ -1,12 +1,16 @@
-#define __FILEVERSION_STRING 0,11,0,1
-#define __VERSION_STRING "0.11.0.1"
-#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 11, 0, 1)
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 11
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __TOSTRING(x) #x
+#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING)
-#define __PLUGIN_NAME "Yahoo Protocol"
-#define __DESCRIPTION "Yahoo Protocol support for Miranda NG."
-#define __AUTHOR "Gennady Feldman"
-#define __AUTHOREMAIL "gena01@miranda-im.org"
-#define __COPYRIGHT "© 2003-2010 Gennady Feldman, Laurent Marechal"
-#define __AUTHORWEB "http://miranda-ng.org/p/Yahoo/"
+#define __PLUGIN_NAME "Yahoo Protocol"
+#define __DESCRIPTION "Yahoo Protocol support for Miranda NG."
+#define __AUTHOR "Gennady Feldman"
+#define __AUTHOREMAIL "gena01@miranda-im.org"
+#define __COPYRIGHT "© 2003-2010 Gennady Feldman, Laurent Marechal"
+#define __AUTHORWEB "http://miranda-ng.org/p/Yahoo/"