From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StopSpamMod/src/utilities.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/StopSpamMod/src/utilities.cpp') diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 16265231d2..bfa076de6a 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -192,7 +192,7 @@ tstring GetContactUid(MCONTACT hContact, tstring Protocol) { char *szProto = mir_utf8encodeW(Protocol.c_str()); ptrT uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto)); - return (uid) ? uid : _T(""); + return (uid) ? uid : L""; } void LogSpamToFile(MCONTACT hContact, tstring message) @@ -204,12 +204,12 @@ void LogSpamToFile(MCONTACT hContact, tstring message) TCHAR pszName[MAX_PATH]; if (hStopSpamLogDirH) - FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, _T("")); + FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, L""); else - mir_tstrncpy(pszName, VARST(_T("%miranda_logpath%")), _countof(pszName)); + mir_tstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName)); tstring filename = pszName; - filename += _T("\\stopspam_mod.log"); + filename += L"\\stopspam_mod.log"; file.open(filename.c_str(), std::ios::out | std::ios::app); // Time Log line @@ -221,16 +221,16 @@ void LogSpamToFile(MCONTACT hContact, tstring message) // Time Log line // Name, UID and Protocol Log line - LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", _T("")); + LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", L""); LogContactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0); - LogContactId = (LogProtocol == _T("")) ? _T("") : GetContactUid(hContact, LogProtocol); + LogContactId = (LogProtocol == L"") ? L"" : GetContactUid(hContact, LogProtocol); // Name, UID and Protocol Log line - LogStrW = _T("[") + LogTime.substr(0, LogTime.length() - 1) + _T("] ") + - LogContactId + _T(" - ") + - LogContactName + _T(" (") + - LogProtocol + _T("): ") + - message + _T("\n"); + LogStrW = L"[" + LogTime.substr(0, LogTime.length() - 1) + L"] " + + LogContactId + L" - " + + LogContactName + L" (" + + LogProtocol + L"): " + + message + L"\n"; char *buf = mir_u2a(LogStrW.c_str()); file.write(buf, LogStrW.length()); @@ -252,14 +252,14 @@ void CleanProtocolTmpThread(std::string proto) std::list contacts; for (MCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str())) - if (db_get_b(hContact, "CList", "NotOnList", 0) || (_T("Not In List") == DBGetContactSettingStringPAN(hContact, "CList", "Group", _T("")))) + if (db_get_b(hContact, "CList", "NotOnList", 0) || (L"Not In List" == DBGetContactSettingStringPAN(hContact, "CList", "Group", L""))) contacts.push_back(hContact); boost::this_thread::sleep(boost::posix_time::seconds(5)); clean_mutex.lock(); std::list::iterator end = contacts.end(); for (std::list::iterator i = contacts.begin(); i != end; ++i) { - LogSpamToFile(*i, _T("Deleted")); + LogSpamToFile(*i, L"Deleted"); HistoryLogFunc(*i, "Deleted"); CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0); } @@ -284,7 +284,7 @@ void CleanProtocolExclThread(std::string proto) clean_mutex.lock(); std::list::iterator end = contacts.end(); for (std::list::iterator i = contacts.begin(); i != end; ++i) { - LogSpamToFile(*i, _T("Deleted")); + LogSpamToFile(*i, L"Deleted"); HistoryLogFunc(*i, "Deleted"); CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0); } -- cgit v1.2.3