From ddd1af0fdf37364c9472faedad941b4cc5f1b465 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jul 2016 11:50:07 +0000 Subject: removed from git-svn-id: http://svn.miranda-ng.org/main/trunk@17136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/chat.cpp | 10 +++++----- protocols/FacebookRM/src/constants.h | 30 +++++++++++++++--------------- protocols/FacebookRM/src/entities.h | 10 +++++----- protocols/FacebookRM/src/json.cpp | 18 +++++++++--------- protocols/Gadu-Gadu/src/core.cpp | 2 +- protocols/JabberG/src/jabber_notes.cpp | 2 +- protocols/MinecraftDynmap/src/main.cpp | 2 +- protocols/Tlen/src/tlen_avatar.cpp | 4 ++-- protocols/Tox/src/tox_network.cpp | 4 ++-- protocols/Tox/src/tox_options.cpp | 2 +- protocols/Tox/src/tox_utils.cpp | 2 +- protocols/VKontakte/src/misc.cpp | 4 ++-- 12 files changed, 45 insertions(+), 45 deletions(-) (limited to 'protocols') diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 9901e6896e..c3a02a8a22 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -72,7 +72,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) return 0; // Ignore for special chatrooms - if (!mir_tstrcmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM))) + if (!mir_tstrcmp(hook->pDest->ptszID, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))) return 0; switch (hook->pDest->iType) @@ -435,13 +435,13 @@ void FacebookProto::PrepareNotificationsChatRoom() { // Create the group chat session GCSESSION gcw = { sizeof(gcw) }; gcw.iType = GCW_PRIVMESS; - gcw.ptszID = _T(FACEBOOK_NOTIFICATIONS_CHATROOM); + gcw.ptszID = _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM); gcw.pszModule = m_szModuleName; gcw.ptszName = nameT; CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw); // Send setting events - GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL }; + GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; gce.time = ::time(NULL); @@ -460,10 +460,10 @@ void FacebookProto::UpdateNotificationsChatRoom(facebook_notification *notificat std::string message = text.str(); utils::text::replace_all(&message, "%", "%%"); - ptrT idT(mir_tstrdup(_T(FACEBOOK_NOTIFICATIONS_CHATROOM))); + ptrT idT(mir_tstrdup(_A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))); ptrT messageT(mir_a2t_cp(message.c_str(), CP_UTF8)); - GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; + GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; gce.ptszText = messageT; gce.time = notification->time ? notification->time : ::time(NULL); diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index c3dfbc9cc3..b28e096f4f 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -35,25 +35,25 @@ along with this program. If not, see . //#define FACEBOOK_URL_STICKER "http://www.facebook.com/stickers/asset/?sticker_id=%s&image_type=BestEffortImage" // Connection -#define FACEBOOK_SERVER_REGULAR "www.facebook.com" -#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com" -#define FACEBOOK_SERVER_MOBILE "m.facebook.com" -#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com" -#define FACEBOOK_SERVER_LOGIN "www.facebook.com" -#define FACEBOOK_SERVER_APPS "apps.facebook.com" -#define FACEBOOK_SERVER_DOMAIN "facebook.com" +#define FACEBOOK_SERVER_REGULAR "www.facebook.com" +#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com" +#define FACEBOOK_SERVER_MOBILE "m.facebook.com" +#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com" +#define FACEBOOK_SERVER_LOGIN "www.facebook.com" +#define FACEBOOK_SERVER_APPS "apps.facebook.com" +#define FACEBOOK_SERVER_DOMAIN "facebook.com" // Facebook clients -#define FACEBOOK_CLIENT_WEB "Facebook (website)" -#define FACEBOOK_CLIENT_MOBILE "Facebook (mobile)" -#define FACEBOOK_CLIENT_OTHER "Facebook (other)" -#define FACEBOOK_CLIENT_APP "Facebook App" -#define FACEBOOK_CLIENT_MESSENGER "Facebook Messenger" +#define FACEBOOK_CLIENT_WEB L"Facebook (website)" +#define FACEBOOK_CLIENT_MOBILE L"Facebook (mobile)" +#define FACEBOOK_CLIENT_OTHER L"Facebook (other)" +#define FACEBOOK_CLIENT_APP L"Facebook App" +#define FACEBOOK_CLIENT_MESSENGER L"Facebook Messenger" // Various constants -#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications" -#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2) -#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify +#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications" +#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2) +#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify // Limits #define FACEBOOK_MESSAGE_LIMIT 200000 // this is guessed limit, in reality it is bigger diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h index 43c8f18f86..6644f26e90 100644 --- a/protocols/FacebookRM/src/entities.h +++ b/protocols/FacebookRM/src/entities.h @@ -59,16 +59,16 @@ struct facebook_user { switch (this->client) { case CLIENT_APP: - return _T(FACEBOOK_CLIENT_APP); + return FACEBOOK_CLIENT_APP; case CLIENT_MESSENGER: - return _T(FACEBOOK_CLIENT_MESSENGER); + return FACEBOOK_CLIENT_MESSENGER; case CLIENT_OTHER: - return _T(FACEBOOK_CLIENT_OTHER); + return FACEBOOK_CLIENT_OTHER; case CLIENT_MOBILE: - return _T(FACEBOOK_CLIENT_MOBILE); + return FACEBOOK_CLIENT_MOBILE; case CLIENT_WEB: default: - return _T(FACEBOOK_CLIENT_WEB); + return FACEBOOK_CLIENT_WEB; } } }; diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 68d3934e0f..2ab26361da 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -763,16 +763,16 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vectorgetTStringA(hContact, "MirVer")); @@ -877,21 +877,21 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vectorgetTStringA(hContact, "MirVer")); diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 05e746cf8f..692b36aef5 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -659,7 +659,7 @@ retry: psr.firstName.w = __firstname; psr.lastName.w = __lastname; psr.email.w = strFmt2; - psr.id.w = _ultot(uin, strFmt1, 10); + psr.id.w = _ultow(uin, strFmt1, 10); psr.uin = uin; ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM)&psr); } diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 3c2aa50911..58fd94594c 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -480,7 +480,7 @@ private: void PopulateTags(HTREEITEM htiRoot, wchar_t *szActiveTag) { - LIST tagSet(5, _tcscmp); + LIST tagSet(5, wcscmp); for (int i = 0; i < m_proto->m_notes.getCount(); i++) { wchar_t *tags = m_proto->m_notes[i].GetTags(); for (wchar_t *tag = tags; tag && *tag; tag = tag + mir_tstrlen(tag) + 1) diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp index 02cd9c4603..09f6905e8e 100644 --- a/protocols/MinecraftDynmap/src/main.cpp +++ b/protocols/MinecraftDynmap/src/main.cpp @@ -47,7 +47,7 @@ PLUGININFOEX pluginInfo = { // Protocol instances static int compare_protos(const MinecraftDynmapProto *p1, const MinecraftDynmapProto *p2) { - return _tcscmp(p1->m_tszUserName, p2->m_tszUserName); + return wcscmp(p1->m_tszUserName, p2->m_tszUserName); } OBJLIST g_Instances(1, compare_protos); diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 47645f8bb8..78024a40d4 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -41,7 +41,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, wchar_t* p else { proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); wchar_t buffer[512]; - mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); + mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _wcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); } } @@ -114,7 +114,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it } else { wchar_t buffer[128]; - mir_sntprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _tcserror(errno), errno); + mir_sntprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _wcserror(errno), errno); PUShowMessageT(buffer, SM_WARNING); proto->debugLog(buffer); return; diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index c7212e780b..2f5b3dcddb 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -66,7 +66,7 @@ void CToxProto::BootstrapNodesFromJson(CToxThread *toxThread, bool isUdp, bool i { ptrA json; - VARST path(_T(TOX_JSON_PATH)); + VARST path(_A2W(TOX_JSON_PATH)); if (!IsFileExists(path)) UpdateNodes(); @@ -157,7 +157,7 @@ void CToxProto::UpdateNodes() if (lastUpdate <= getDword("NodesUpdate", 0)) return; - ptrT path(mir_tstrdup((wchar_t*)VARST(_T(TOX_JSON_PATH)))); + ptrT path(mir_tstrdup((wchar_t*)VARST(_A2W(TOX_JSON_PATH)))); if (!IsFileExists(path)) { HANDLE hProfile = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 8d65a7b0a8..4b31e1cf61 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -537,7 +537,7 @@ void CToxOptionsNodeList::ReloadNodeList() int iItem = -1; - VARST path(_T(TOX_JSON_PATH)); + VARST path(_A2W(TOX_JSON_PATH)); if (CToxProto::IsFileExists(path)) { ptrA json; diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index f09f7ca8c1..a8e89ac51b 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -127,7 +127,7 @@ void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, void CToxProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact) { - ShowNotification(_T(MODULE), message, flags, hContact); + ShowNotification(_A2W(MODULE), message, flags, hContact); } bool CToxProto::IsFileExists(const wchar_t* path) diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 8ac554321c..340a27c78e 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -679,7 +679,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact) wchar_t ttime[64]; _locale_t locale = _create_locale(LC_ALL, ""); - _tcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale); + _wcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale); _free_locale(locale); StatusTextData st = { 0 }; @@ -1254,7 +1254,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn time_t datetime = (time_t)jnMsg["date"].as_int(); wchar_t ttime[64]; _locale_t locale = _create_locale(LC_ALL, ""); - _tcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale); + _wcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale); _free_locale(locale); CMString tszBody(jnMsg["body"].as_mstring()); -- cgit v1.2.3